@camstack/addon-provider-amcrest 0.2.134 → 0.2.135

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
@@ -5391,7 +5391,7 @@ var ZodIssueCode = {
5391
5391
  var ZodFirstPartyTypeKind;
5392
5392
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5393
5393
  //#endregion
5394
- //#region ../types/dist/sleep-r3RWkGVx.mjs
5394
+ //#region ../types/dist/sleep-DwAQ9sqX.mjs
5395
5395
  /**
5396
5396
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5397
5397
  * window to float samples (D455).
@@ -9387,6 +9387,16 @@ var CompositionSchema = object({
9387
9387
  seen.add(feature.cap);
9388
9388
  });
9389
9389
  });
9390
+ var NodeColorIdSchema = _enum([
9391
+ "node-a",
9392
+ "node-b",
9393
+ "node-c",
9394
+ "node-d",
9395
+ "node-e",
9396
+ "node-f",
9397
+ "node-g",
9398
+ "node-h"
9399
+ ]);
9390
9400
  new Set([
9391
9401
  "track",
9392
9402
  "face",
@@ -18549,14 +18559,14 @@ var LlmProfileSchema = object({
18549
18559
  /** ConfigUISchema tree passed through untyped on the wire (the
18550
18560
  * notification-output `ConfigSchemaPassthrough` precedent at
18551
18561
  * notification-output.cap.ts:151); the exported TS type re-tightens it. */
18552
- var ConfigSchemaPassthrough$1 = unknown();
18562
+ var ConfigSchemaPassthrough$3 = unknown();
18553
18563
  var LlmProfileKindDescriptorSchema = object({
18554
18564
  kind: LlmProfileKindSchema,
18555
18565
  label: string(),
18556
18566
  icon: string(),
18557
18567
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
18558
18568
  addonId: string(),
18559
- configSchema: ConfigSchemaPassthrough$1
18569
+ configSchema: ConfigSchemaPassthrough$3
18560
18570
  });
18561
18571
  var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
18562
18572
  var LlmDefaultSchema = object({
@@ -19677,7 +19687,7 @@ var TargetKindCapsSchema = object({
19677
19687
  * the union is large and not meant for runtime validation here; the exported
19678
19688
  * `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
19679
19689
  */
19680
- var ConfigSchemaPassthrough = unknown();
19690
+ var ConfigSchemaPassthrough$2 = unknown();
19681
19691
  var TargetKindSchema = object({
19682
19692
  kind: string(),
19683
19693
  label: string(),
@@ -19714,7 +19724,7 @@ var TargetKindSchema = object({
19714
19724
  * its raster path, which is the safe default for an unknown image.
19715
19725
  */
19716
19726
  iconMediaType: string().optional(),
19717
- configSchema: ConfigSchemaPassthrough,
19727
+ configSchema: ConfigSchemaPassthrough$2,
19718
19728
  /**
19719
19729
  * The config keys that decide WHERE this kind's secrets are sent (server,
19720
19730
  * base URL, instance, chat, recipient). A save that changes any of them
@@ -23051,6 +23061,61 @@ var OauthIntegrationDescriptorSchema = object({
23051
23061
  });
23052
23062
  method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" });
23053
23063
  /**
23064
+ * `oidc-connections` — CRUD for IdP rows under `auth-oidc` (D828 sibling).
23065
+ *
23066
+ * One hub-only singleton (`auth-oidc`). The Settings UI is a DataTable +
23067
+ * ItemFormDialog; there is no `editable-array` in `globalSettingsSchema`.
23068
+ * Operator-chosen `id` is the URL slug (`/addon/auth-oidc/<id>/…`) and is
23069
+ * immutable after create.
23070
+ */
23071
+ var ConfigSchemaPassthrough$1 = unknown();
23072
+ var OidcConnectionSchema = object({
23073
+ id: string().min(1),
23074
+ displayName: string(),
23075
+ icon: string(),
23076
+ issuerUrl: string(),
23077
+ clientId: string(),
23078
+ /** Client id + secret present — never the secret value. */
23079
+ configured: boolean(),
23080
+ /**
23081
+ * Values for the connection form schema. `clientSecret` is a keychain
23082
+ * {@link SecretFieldView} or `null` / `''`, never plaintext (D789).
23083
+ */
23084
+ formValues: record(string(), unknown()).optional()
23085
+ });
23086
+ /**
23087
+ * Patch one connection. Omitted or empty `clientSecret` keeps the stored
23088
+ * secret (D787). `{ $secretClear: true }` clears it. `id` is never renamed.
23089
+ */
23090
+ var OidcConnectionUpdateInputSchema = object({
23091
+ id: string().min(1),
23092
+ displayName: string().min(1),
23093
+ icon: string().optional(),
23094
+ issuerUrl: string().optional(),
23095
+ clientId: string().optional(),
23096
+ clientSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
23097
+ redirectUri: string().optional(),
23098
+ scopes: string().optional(),
23099
+ usernameClaim: _enum([
23100
+ "preferred_username",
23101
+ "email",
23102
+ "sub"
23103
+ ]).optional()
23104
+ });
23105
+ method(object({}), ConfigSchemaPassthrough$1, { auth: "admin" }), method(object({}), array(OidcConnectionSchema).readonly(), { auth: "admin" }), method(object({
23106
+ id: string().min(1).regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "id must be a lowercase slug"),
23107
+ displayName: string().min(1)
23108
+ }), object({ id: string() }), {
23109
+ kind: "mutation",
23110
+ auth: "admin"
23111
+ }), method(OidcConnectionUpdateInputSchema, object({ ok: literal(true) }), {
23112
+ kind: "mutation",
23113
+ auth: "admin"
23114
+ }), method(object({ id: string().min(1) }), object({ ok: literal(true) }), {
23115
+ kind: "mutation",
23116
+ auth: "admin"
23117
+ });
23118
+ /**
23054
23119
  * What started a camera's onboard motion (D672). `camera` is the camera's own
23055
23120
  * firmware; `sensor` is a device the operator ATTACHED to it. Absent on the
23056
23121
  * wire means the camera: only the camera-sensors bridge ever says `sensor`.
@@ -24407,24 +24472,69 @@ var RetrainFrameListSchema = object({
24407
24472
  /** What the page pre-selects — the native key frame when one survives. */
24408
24473
  autoPickMediaId: number().int().optional()
24409
24474
  });
24475
+ /** Exclusive partition of a corpus copy's annotation progress (design §4.2). */
24476
+ var RetrainFrameWorkStateSchema = _enum([
24477
+ "unannotated",
24478
+ "annotated",
24479
+ "complete"
24480
+ ]);
24481
+ /**
24482
+ * Filters for paginated corpus list, KPI, and matching export (design §4.4).
24483
+ * Every narrowing field is ANDed; omitted fields impose no constraint.
24484
+ */
24485
+ var RetrainCorpusFilterSchema = object({
24486
+ workState: RetrainFrameWorkStateSchema.optional(),
24487
+ deviceIds: array(number()).max(500).optional(),
24488
+ /** When set, only frames in this named collection. */
24489
+ collectionId: string().optional(),
24490
+ /** Frames that carry at least one saved annotation in one of these classes. */
24491
+ classes: array(RetrainMacroClassSchema).optional(),
24492
+ page: number().int().positive().default(1),
24493
+ pageSize: number().int().positive().max(100).default(50)
24494
+ });
24495
+ var RetrainCorpusPageSchema = object({
24496
+ frames: array(RetrainFrameSchema.extend({ workState: RetrainFrameWorkStateSchema })).readonly(),
24497
+ total: number().int().nonnegative(),
24498
+ page: number().int().positive(),
24499
+ pageSize: number().int().positive()
24500
+ });
24501
+ var RetrainCorpusKpiCameraRowSchema = object({
24502
+ deviceId: number(),
24503
+ unannotated: number().int().nonnegative(),
24504
+ annotated: number().int().nonnegative(),
24505
+ complete: number().int().nonnegative(),
24506
+ /** This camera's `complete` count divided by corpus `total`, in `[0,1]`.
24507
+ * `null` when the corpus is empty (no ratio). */
24508
+ pctOfCorpus: number().min(0).max(1).nullable()
24509
+ });
24510
+ var RetrainCorpusKpiSchema = object({
24511
+ total: number().int().nonnegative(),
24512
+ unannotated: number().int().nonnegative(),
24513
+ annotated: number().int().nonnegative(),
24514
+ complete: number().int().nonnegative(),
24515
+ cameras: array(RetrainCorpusKpiCameraRowSchema).readonly()
24516
+ });
24410
24517
  /**
24411
24518
  * Which frames an annotated export carries. Every field narrows; an empty
24412
- * filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
24413
- * list owned by whoever trains (the training orchestrator), so `frameIds` is
24414
- * the primitive a version export uses; `batchId` re-selects what an earlier
24415
- * export carried (`exportedInBatch`).
24519
+ * filter is every annotated copy. `frameIds` is the primitive a job or
24520
+ * download uses; `batchId` re-selects what an earlier export carried
24521
+ * (`exportedInBatch`). Frozen dataset versions were removed — live selection
24522
+ * resolves to `frameIds` at plan/start.
24416
24523
  */
24417
24524
  var RetrainExportFilterSchema = object({
24418
24525
  deviceIds: array(number()).optional(),
24419
24526
  frameIds: array(string()).max(2e4).optional(),
24420
24527
  /** Only frames in at least one of these named collections. */
24421
24528
  collectionIds: array(string()).max(200).optional(),
24422
- /** Exactly the frames of this dataset version (and its completeOnly). An
24423
- * unknown id selects nothing. */
24424
- datasetVersionId: string().optional(),
24529
+ /** Single collection (Frames filter bar). ANDed with `collectionIds` when both set. */
24530
+ collectionId: string().optional(),
24425
24531
  batchId: string().optional(),
24426
24532
  /** Only frames the operator marked complete (all subjects boxed). */
24427
- completeOnly: boolean().optional()
24533
+ completeOnly: boolean().optional(),
24534
+ /** Exclusive work-state partition (`workStateOf`); same as the corpus list. */
24535
+ workState: RetrainFrameWorkStateSchema.optional(),
24536
+ /** Frames with at least one saved annotation in one of these classes. */
24537
+ classes: array(RetrainMacroClassSchema).optional()
24428
24538
  });
24429
24539
  /**
24430
24540
  * `frames`: the full frame copies, boxes in `annotations.json`.
@@ -24624,8 +24734,7 @@ var RetrainDatasetStatsSchema = object({
24624
24734
  completeFrames: number().int()
24625
24735
  })).readonly()
24626
24736
  });
24627
- /** An immutable dataset version, without its frame list. */
24628
- var RetrainDatasetVersionSchema = object({
24737
+ object({
24629
24738
  id: string(),
24630
24739
  name: string(),
24631
24740
  createdAt: number(),
@@ -24633,22 +24742,33 @@ var RetrainDatasetVersionSchema = object({
24633
24742
  layout: RetrainExportLayoutSchema,
24634
24743
  completeOnly: boolean(),
24635
24744
  frameCount: number().int(),
24636
- /** sha256 of what the frames taught when the version was frozen. */
24637
24745
  annotationHash: string(),
24638
- /** The export manifest schema the version was cut under. */
24639
24746
  manifestSchema: string(),
24640
24747
  stats: RetrainDatasetStatsSchema
24641
24748
  });
24642
- var CreateRetrainDatasetVersionResultSchema = discriminatedUnion("kind", [object({
24643
- kind: literal("created"),
24644
- version: RetrainDatasetVersionSchema
24749
+ /**
24750
+ * Live training corpus criteria — same shape as `TrainingCorpusSelection` on
24751
+ * the training cap. Resolved here so plan/start and the annotated export share
24752
+ * one definition of "the frames" (`buildRetrainExportPlan`).
24753
+ */
24754
+ var RetrainTrainingCorpusSelectionSchema = object({
24755
+ collectionIds: array(string()).min(1),
24756
+ workState: _enum([
24757
+ "complete",
24758
+ "annotated_or_complete",
24759
+ "any_annotated"
24760
+ ]).default("complete")
24761
+ });
24762
+ var RetrainTrainingCorpusResolveResultSchema = discriminatedUnion("kind", [object({
24763
+ kind: literal("resolved"),
24764
+ frameIds: array(string()).max(2e4).readonly(),
24765
+ stats: RetrainDatasetStatsSchema,
24766
+ annotationHash: string(),
24767
+ layout: RetrainExportLayoutSchema
24645
24768
  }), object({
24646
24769
  kind: literal("refused"),
24647
- reason: _enum([
24648
- "empty-name",
24649
- "duplicate-name",
24650
- "no-frames"
24651
- ])
24770
+ reason: _enum(["unknown-collection", "no-frames"]),
24771
+ detail: string()
24652
24772
  })]);
24653
24773
  /** The outcome of a lifecycle move owned by the retrain page. */
24654
24774
  var RetrainTransitionResultSchema = object({
@@ -25355,6 +25475,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25355
25475
  }), array(RetrainTrackSchema).readonly(), {
25356
25476
  kind: "query",
25357
25477
  auth: "admin"
25478
+ }), method(RetrainCorpusFilterSchema, RetrainCorpusPageSchema, {
25479
+ kind: "query",
25480
+ auth: "admin"
25481
+ }), method(object({}), RetrainCorpusKpiSchema, {
25482
+ kind: "query",
25483
+ auth: "admin"
25358
25484
  }), method(object({ trackId: string() }), RetrainFrameListSchema, {
25359
25485
  kind: "query",
25360
25486
  auth: "admin"
@@ -25450,36 +25576,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25450
25576
  kind: "mutation",
25451
25577
  auth: "admin",
25452
25578
  timeoutMs: 12e4
25453
- }), method(object({
25454
- selection: RetrainDatasetSelectionSchema,
25455
- completeOnly: boolean().optional()
25456
- }), RetrainDatasetStatsSchema, {
25457
- kind: "query",
25458
- auth: "admin"
25459
- }), method(object({
25460
- name: string().max(120),
25461
- selection: RetrainDatasetSelectionSchema,
25462
- layout: RetrainExportLayoutSchema,
25463
- completeOnly: boolean()
25464
- }), CreateRetrainDatasetVersionResultSchema, {
25465
- kind: "mutation",
25466
- auth: "admin",
25467
- timeoutMs: 12e4
25468
- }), method(object({}), array(RetrainDatasetVersionSchema).readonly(), {
25469
- kind: "query",
25470
- auth: "admin"
25471
- }), method(object({ id: string() }), object({ deleted: boolean() }), {
25472
- kind: "mutation",
25473
- auth: "admin"
25474
- }), method(object({ id: string() }), object({
25475
- found: boolean(),
25476
- annotationHash: string(),
25477
- matches: boolean(),
25478
- missingFrames: number().int()
25479
- }), {
25480
- kind: "query",
25481
- auth: "admin",
25482
- timeoutMs: 12e4
25483
25579
  }), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
25484
25580
  kind: "query",
25485
25581
  auth: "admin"
@@ -25506,6 +25602,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25506
25602
  }), method(object({}), array(RetrainCollectionSchema).readonly(), {
25507
25603
  kind: "query",
25508
25604
  auth: "admin"
25605
+ }), method(RetrainTrainingCorpusSelectionSchema, RetrainTrainingCorpusResolveResultSchema, {
25606
+ kind: "query",
25607
+ auth: "admin",
25608
+ timeoutMs: 6e4
25509
25609
  }), method(object({
25510
25610
  id: string(),
25511
25611
  name: string().max(120)
@@ -26122,11 +26222,14 @@ var HardwareClassIdSchema = _enum([
26122
26222
  "intel-n-series",
26123
26223
  "apple-m-base",
26124
26224
  "apple-m-pro",
26225
+ "amd-phoenix",
26125
26226
  "unknown"
26126
26227
  ]);
26127
26228
  var AcceleratorKindSchema = _enum([
26128
26229
  "intel-npu",
26129
26230
  "intel-igpu",
26231
+ "amd-igpu",
26232
+ "amd-npu",
26130
26233
  "x86-cpu",
26131
26234
  "arm-cpu",
26132
26235
  "apple-ane",
@@ -28056,6 +28159,8 @@ var AgentPipelineSettingsSchema = object({
28056
28159
  * address is wrong (multi-homed host, NAT, custom interface).
28057
28160
  */
28058
28161
  reachableHost: string().optional(),
28162
+ /** Hub-persisted UI colour (`--color-node-*` theme tokens). */
28163
+ color: NodeColorIdSchema.optional(),
28059
28164
  /**
28060
28165
  * Multi-device inference opt-in (Phase 4). Per-node map deviceKey → {enabled,
28061
28166
  * weight, steps}. Absent / all-disabled ⇒ the node's single default
@@ -28605,8 +28710,9 @@ method(object({
28605
28710
  auth: "admin"
28606
28711
  }), method(object({
28607
28712
  agentNodeId: string(),
28608
- reachableHost: string().nullable()
28609
- }), object({ success: literal(true) }), {
28713
+ reachableHost: string().nullable().optional(),
28714
+ color: NodeColorIdSchema.nullable().optional()
28715
+ }).refine((v) => v.reachableHost !== void 0 || v.color !== void 0, { message: "reachableHost or color required" }), object({ success: literal(true) }), {
28610
28716
  kind: "mutation",
28611
28717
  auth: "admin"
28612
28718
  }), method(object({
@@ -32195,7 +32301,7 @@ var CustomActionInputSchema = object({
32195
32301
  action: string().min(1),
32196
32302
  input: unknown()
32197
32303
  });
32198
- method(_void(), array(AddonListItemSchema).readonly()), method(object({
32304
+ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSchema).readonly()), method(object({
32199
32305
  addonId: string(),
32200
32306
  limit: number().min(1).max(500).default(100),
32201
32307
  level: LogLevelSchema$2.optional()
@@ -37257,7 +37363,13 @@ var TopologyNodeSchema = object({
37257
37363
  })).readonly(),
37258
37364
  processes: array(TopologyProcessSchema).readonly(),
37259
37365
  categories: array(TopologyCategorySchema).readonly(),
37260
- rootPackage: TopologyRootPackageSchema.nullable()
37366
+ rootPackage: TopologyRootPackageSchema.nullable(),
37367
+ /**
37368
+ * How an online AGENT reaches the hub (mesh mTLS Release A): `tls` once it has
37369
+ * completed a mutual-TLS handshake, `clear` otherwise. Absent for the hub,
37370
+ * for offline rows and when the hub cannot tell.
37371
+ */
37372
+ meshTransport: _enum(["tls", "clear"]).optional()
37261
37373
  });
37262
37374
  var CapUsageEdgeSchema = object({
37263
37375
  callerAddonId: string(),
@@ -37716,6 +37828,7 @@ var OsdNamedTemplateSchema = object({
37716
37828
  });
37717
37829
  /** Where a slot's value comes from. */
37718
37830
  var OsdSourceSchema = discriminatedUnion("kind", [
37831
+ object({ kind: literal("none") }),
37719
37832
  object({
37720
37833
  kind: literal("static"),
37721
37834
  text: string().max(64)
@@ -37842,6 +37955,13 @@ method(object({ deviceId: number().int() }), object({
37842
37955
  }), object({ success: literal(true) }), {
37843
37956
  kind: "mutation",
37844
37957
  auth: "admin"
37958
+ }), method(object({
37959
+ deviceId: number().int(),
37960
+ slotId: string().min(1),
37961
+ enabled: boolean()
37962
+ }), object({ success: literal(true) }), {
37963
+ kind: "mutation",
37964
+ auth: "admin"
37845
37965
  }), method(object({
37846
37966
  sourceDeviceId: number().int(),
37847
37967
  targetDeviceId: number().int()
@@ -38273,7 +38393,15 @@ var GpuInfoSchema = object({
38273
38393
  name: string(),
38274
38394
  memoryMB: number().optional()
38275
38395
  });
38276
- var NpuInfoSchema = object({ type: _enum(["apple-ane", "intel-npu"]) });
38396
+ var NpuInfoSchema = object({
38397
+ type: _enum([
38398
+ "apple-ane",
38399
+ "intel-npu",
38400
+ "amd-xdna"
38401
+ ]),
38402
+ name: string().optional(),
38403
+ generation: _enum(["xdna1", "xdna2"]).optional()
38404
+ });
38277
38405
  var CoralInfoSchema = object({
38278
38406
  type: literal("coral-edgetpu"),
38279
38407
  bus: string().optional()
@@ -43432,9 +43560,11 @@ var zoneRulesCapability = {
43432
43560
  * once is what makes a second provider (RunPod, a local NVIDIA node) a new
43433
43561
  * manifest entry and nothing else.
43434
43562
  *
43435
- * Collection, routed by the `addonId` in every single-row input (the `llm` /
43436
- * `notification-output` posture); `describe` concat-fans across providers.
43437
- * Every method is `admin`: these spend money.
43563
+ * Collection of provider **types** (addons). Each addon owns zero or more
43564
+ * **entries** (credentials + defaults). Concat-fans: `describe`,
43565
+ * `describeTypes`, `listEntries`, `listJobs`. Single-row work is keyed by
43566
+ * `entryId`; callers also pass the owning `addonId` as the collection
43567
+ * selector (broker posture). Every method is `admin`: these spend money.
43438
43568
  *
43439
43569
  * Every cloud object a provider creates is tagged with the orchestrator's
43440
43570
  * `jobKey`, so a retried submit finds the job it already started instead of
@@ -43458,8 +43588,8 @@ var TrainingRegionOptionSchema = object({
43458
43588
  priceMultiplier: number().positive()
43459
43589
  });
43460
43590
  /**
43461
- * The provider's per-account settings, as the orchestrator reads them. They
43462
- * live in the PROVIDER addon's settings (operator decision 2026-10-08: they
43591
+ * The provider's per-entry settings, as the orchestrator reads them. They
43592
+ * live on the PROVIDER addon's entry (operator decision 2026-10-08: they
43463
43593
  * depend on the user's account), never hard-coded in the orchestrator.
43464
43594
  */
43465
43595
  var TrainingProviderDefaultsSchema = object({
@@ -43470,9 +43600,44 @@ var TrainingProviderDefaultsSchema = object({
43470
43600
  /** Hours a FAILED job's cloud dataset is kept for debugging; 0 = delete at once. */
43471
43601
  failedDatasetGraceHours: number().nonnegative()
43472
43602
  });
43603
+ /**
43604
+ * Entry form schema for a provider type — same seam as notification
43605
+ * `TargetKind.configSchema` (`z.unknown()` at the wire; callers tighten to
43606
+ * {@link ConfigUISchema}). Drives `ConfigFormBuilder` on Training → Providers.
43607
+ */
43608
+ var ConfigSchemaPassthrough = unknown();
43609
+ /** One creatable provider type, for the Add-entry dialog. */
43610
+ var TrainingProviderTypeSchema = object({
43611
+ typeId: string(),
43612
+ label: string(),
43613
+ /** Path under the addon package (e.g. `assets/training-modal/icon.svg`). */
43614
+ iconAsset: string(),
43615
+ /** Owning `training-provider` addon — collection selector for createEntry. */
43616
+ addonId: string(),
43617
+ /**
43618
+ * Fields for one entry of this type (credentials + defaults). Absent on a
43619
+ * type that only needs a name. Password fields are keychain-backed on the
43620
+ * provider addon (`secretStatePaths`), not D634 plaintext.
43621
+ */
43622
+ configSchema: ConfigSchemaPassthrough.optional()
43623
+ });
43624
+ /** One configured account / workspace under a provider type. */
43625
+ var TrainingProviderEntrySchema = object({
43626
+ entryId: string(),
43627
+ typeId: string(),
43628
+ name: string(),
43629
+ addonId: string(),
43630
+ /** Credentials are present — never the values. */
43631
+ configured: boolean()
43632
+ });
43473
43633
  var TrainingProviderDescriptorSchema = object({
43474
43634
  addonId: string(),
43475
- /** `modal`, `runpod`, `fake`, … */
43635
+ entryId: string(),
43636
+ typeId: string(),
43637
+ /** Operator-chosen entry name. */
43638
+ name: string(),
43639
+ iconAsset: string(),
43640
+ /** `modal`, `runpod`, `fake`, … — same as typeId for current providers. */
43476
43641
  kind: string(),
43477
43642
  label: string(),
43478
43643
  gpuTypes: array(TrainingGpuOptionSchema).readonly(),
@@ -43484,7 +43649,30 @@ var TrainingProviderDescriptorSchema = object({
43484
43649
  dataResidencyNote: string(),
43485
43650
  /** Credentials are present — never the values. */
43486
43651
  configured: boolean(),
43487
- defaults: TrainingProviderDefaultsSchema
43652
+ defaults: TrainingProviderDefaultsSchema,
43653
+ /**
43654
+ * Values for {@link TrainingProviderTypeSchema}'s `configSchema` — password
43655
+ * fields are keychain {@link SecretFieldView} or `null` / `''` (create),
43656
+ * never plaintext. Same hydrate contract as settings forms (D789).
43657
+ */
43658
+ formValues: record(string(), unknown()).optional()
43659
+ });
43660
+ /**
43661
+ * Patch one entry's name, credentials and defaults. Pin with owning `{ addonId }`.
43662
+ * An omitted or empty `tokenSecret` means KEEP the stored secret (D787).
43663
+ * `{ $secretClear: true }` clears it.
43664
+ */
43665
+ var TrainingProviderUpdateEntryInputSchema = object({
43666
+ entryId: string().min(1),
43667
+ name: string().min(1),
43668
+ tokenId: string().optional(),
43669
+ tokenSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
43670
+ environment: string().optional(),
43671
+ gpuType: string().optional(),
43672
+ region: string().optional(),
43673
+ costCapUsd: number().nonnegative().optional(),
43674
+ maxRuntimeSec: number().int().positive().optional(),
43675
+ failedDatasetGraceHours: number().nonnegative().optional()
43488
43676
  });
43489
43677
  var TrainingCredentialCheckSchema = object({
43490
43678
  ok: boolean(),
@@ -43536,20 +43724,33 @@ var TrainerSourceRefSchema = object({
43536
43724
  /** A commit sha (never a branch) — the job must be reproducible. */
43537
43725
  revision: string().regex(/^[0-9a-f]{7,64}$/)
43538
43726
  });
43727
+ /** Cloud job identity — route with the owning addon's `addonId` selector. */
43539
43728
  var JobRef = {
43540
- addonId: string(),
43729
+ entryId: string().min(1),
43541
43730
  jobKey: string().uuid()
43542
43731
  };
43543
43732
  var TrainingLogLineSchema = object({
43544
43733
  ts: number(),
43545
43734
  text: string()
43546
43735
  });
43547
- method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({ addonId: string() }), TrainingCredentialCheckSchema, {
43736
+ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderTypeSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderEntrySchema).readonly(), { auth: "admin" }), method(object({
43737
+ typeId: string().min(1),
43738
+ name: string().min(1)
43739
+ }), object({ entryId: string() }), {
43740
+ kind: "mutation",
43741
+ auth: "admin"
43742
+ }), method(object({ entryId: string().min(1) }), object({ ok: literal(true) }), {
43743
+ kind: "mutation",
43744
+ auth: "admin"
43745
+ }), method(TrainingProviderUpdateEntryInputSchema, object({ ok: literal(true) }), {
43746
+ kind: "mutation",
43747
+ auth: "admin"
43748
+ }), method(object({ entryId: string().min(1) }), TrainingCredentialCheckSchema, {
43548
43749
  kind: "mutation",
43549
43750
  auth: "admin",
43550
43751
  timeoutMs: 3e4
43551
43752
  }), method(object({
43552
- addonId: string(),
43753
+ entryId: string().min(1),
43553
43754
  gpuType: string(),
43554
43755
  region: string(),
43555
43756
  datasetBytes: number().int().nonnegative(),
@@ -43615,7 +43816,7 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
43615
43816
  kind: "mutation",
43616
43817
  auth: "admin",
43617
43818
  timeoutMs: 5 * 6e4
43618
- }), method(object({ addonId: string() }), array(ProviderJobStatusSchema).readonly(), {
43819
+ }), method(object({ entryId: string().min(1).optional() }), array(ProviderJobStatusSchema).readonly(), {
43619
43820
  auth: "admin",
43620
43821
  timeoutMs: 2 * 6e4
43621
43822
  });
@@ -43625,20 +43826,31 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
43625
43826
  *
43626
43827
  * It owns what every provider must agree on, written once:
43627
43828
  *
43628
- * - **Dataset versions.** Taken over from pipeline-analytics (D796): the rows
43629
- * live here (D808); pipeline-analytics still CUTS a version (it owns the corpus and
43630
- * the export plan) and reaches this store through the five row methods
43631
- * below, so the Retrain page and the export did not change.
43632
43829
  * - **Jobs.** A persisted state machine, a reconcile loop against the
43633
43830
  * provider, a cost guard, a daily orphan sweep and the retention rules.
43634
43831
  * - **The return flow.** Verified artefacts → Model Studio
43635
43832
  * (`custom-model-registry.importModelBundle`) → canary on cameras →
43636
43833
  * rollback. Nothing is ever registered automatically.
43637
43834
  *
43835
+ * Plan/start takes a live {@link TrainingCorpusSelection} (collections +
43836
+ * work-state rule); frame ids are resolved via pipeline-analytics at that
43837
+ * moment and snapshotted on the job. No frozen dataset version.
43838
+ *
43638
43839
  * Every method is `admin`.
43639
43840
  */
43640
- /** A version WITH its frame list — what the export and a job read. */
43641
- var TrainingDatasetVersionRowSchema = RetrainDatasetVersionSchema.omit({ frameCount: true }).extend({ frameIds: array(string()).max(2e4).readonly() });
43841
+ /**
43842
+ * Live corpus criteria for plan/start (design §5.2). Default is complete-only.
43843
+ * Frame ids are resolved at plan/start — never a frozen version id.
43844
+ */
43845
+ var TrainingCorpusSelectionSchema = object({
43846
+ collectionIds: array(string()).min(1),
43847
+ /** Default complete-only for v1 */
43848
+ workState: _enum([
43849
+ "complete",
43850
+ "annotated_or_complete",
43851
+ "any_annotated"
43852
+ ]).default("complete")
43853
+ });
43642
43854
  /** A base model a detector job can fine-tune, and the baseline it is judged against. */
43643
43855
  var TrainingBaseModelSchema = object({
43644
43856
  modelId: string(),
@@ -43656,9 +43868,13 @@ var TrainingPresetSchema = _enum([
43656
43868
  "thorough"
43657
43869
  ]);
43658
43870
  var TrainingJobRequestSchema = object({
43659
- datasetVersionId: string().min(1),
43660
- /** The `training-provider` addon that runs it. */
43661
- addonId: string().min(1),
43871
+ /** Live collection + work-state criteria; resolved at plan/start. */
43872
+ selection: TrainingCorpusSelectionSchema,
43873
+ /**
43874
+ * The provider **entry** that runs it (credentials + defaults).
43875
+ * Resolve to an owning addon via `training-provider.describe` / `listEntries`.
43876
+ */
43877
+ entryId: string().min(1),
43662
43878
  gpuType: string().min(1),
43663
43879
  region: string(),
43664
43880
  baseModelId: string().min(1),
@@ -43717,6 +43933,7 @@ var TrainingJobPlanSchema = object({
43717
43933
  * result lives after the operator acted on it.
43718
43934
  */
43719
43935
  var TrainingJobStateSchema = _enum([
43936
+ "queued",
43720
43937
  "uploading",
43721
43938
  "submitted",
43722
43939
  "starting",
@@ -43770,6 +43987,11 @@ var TrainingJobSchema = object({
43770
43987
  createdAt: number(),
43771
43988
  updatedAt: number(),
43772
43989
  state: TrainingJobStateSchema,
43990
+ /**
43991
+ * Shared by every job enqueued together via `startJobBatch`.
43992
+ * `null` for a lone `startJob`. The engine advances queued siblings by this id.
43993
+ */
43994
+ batchId: string().nullable().default(null),
43773
43995
  stage: TrainingStageSchema.nullable(),
43774
43996
  failure: object({
43775
43997
  reason: TrainingFailureReasonSchema,
@@ -43781,6 +44003,12 @@ var TrainingJobSchema = object({
43781
44003
  maxRuntimeSec: number().int().positive(),
43782
44004
  trainer: TrainerSourceRefSchema,
43783
44005
  datasetLayout: RetrainExportLayoutSchema,
44006
+ /** Frame count snapshotted when the job started (audit; equals `frameIds.length`). */
44007
+ frameCount: number().int().nonnegative(),
44008
+ /** Resolved frame ids at start — the archive ships exactly these. */
44009
+ frameIds: array(string()).max(2e4).readonly(),
44010
+ /** Hash of what those frames taught at start (trainer `dataset.annotationHash`). */
44011
+ annotationHash: string(),
43784
44012
  dataset: object({
43785
44013
  bytes: number().int(),
43786
44014
  sha256: string(),
@@ -43822,13 +44050,7 @@ var TrainingJobSchema = object({
43822
44050
  canary: TrainingCanarySchema.nullable()
43823
44051
  });
43824
44052
  var IdInput = object({ id: string().min(1) });
43825
- method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
43826
- kind: "mutation",
43827
- auth: "admin"
43828
- }), 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() }), {
43829
- kind: "mutation",
43830
- auth: "admin"
43831
- }), method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
44053
+ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
43832
44054
  auth: "admin",
43833
44055
  timeoutMs: 6e4
43834
44056
  }), method(TrainingJobRequestSchema.extend({
@@ -43847,6 +44069,24 @@ method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
43847
44069
  kind: "mutation",
43848
44070
  auth: "admin",
43849
44071
  timeoutMs: 12e4
44072
+ }), method(TrainingJobRequestSchema.omit({ baseModelId: true }).extend({
44073
+ baseModelIds: array(string().min(1)).min(1),
44074
+ name: string().min(1).max(120),
44075
+ maxCostUsd: number().positive(),
44076
+ maxRuntimeSec: number().int().positive(),
44077
+ idempotencyKey: string().min(8).max(80)
44078
+ }), discriminatedUnion("kind", [object({
44079
+ kind: literal("started"),
44080
+ batchId: string(),
44081
+ jobs: array(TrainingJobSchema).min(1).readonly()
44082
+ }), object({
44083
+ kind: literal("refused"),
44084
+ reason: TrainingRefusalReasonSchema,
44085
+ detail: string()
44086
+ })]), {
44087
+ kind: "mutation",
44088
+ auth: "admin",
44089
+ timeoutMs: 12e4
43850
44090
  }), method(object({}), array(TrainingJobSchema).readonly(), { auth: "admin" }), method(IdInput, TrainingJobSchema.nullable(), { auth: "admin" }), method(IdInput, TrainingJobSchema, {
43851
44091
  kind: "mutation",
43852
44092
  auth: "admin",
@@ -49405,6 +49645,36 @@ Object.freeze({
49405
49645
  addonId: null,
49406
49646
  access: "view"
49407
49647
  },
49648
+ "oidcConnections.connectionFormSchema": {
49649
+ capName: "oidc-connections",
49650
+ capScope: "system",
49651
+ addonId: null,
49652
+ access: "view"
49653
+ },
49654
+ "oidcConnections.createConnection": {
49655
+ capName: "oidc-connections",
49656
+ capScope: "system",
49657
+ addonId: null,
49658
+ access: "create"
49659
+ },
49660
+ "oidcConnections.deleteConnection": {
49661
+ capName: "oidc-connections",
49662
+ capScope: "system",
49663
+ addonId: null,
49664
+ access: "delete"
49665
+ },
49666
+ "oidcConnections.listConnections": {
49667
+ capName: "oidc-connections",
49668
+ capScope: "system",
49669
+ addonId: null,
49670
+ access: "view"
49671
+ },
49672
+ "oidcConnections.updateConnection": {
49673
+ capName: "oidc-connections",
49674
+ capScope: "system",
49675
+ addonId: null,
49676
+ access: "create"
49677
+ },
49408
49678
  "osd.getStatus": {
49409
49679
  capName: "osd",
49410
49680
  capScope: "device",
@@ -49477,6 +49747,12 @@ Object.freeze({
49477
49747
  addonId: null,
49478
49748
  access: "create"
49479
49749
  },
49750
+ "osdManager.setSlotCameraEnabled": {
49751
+ capName: "osd-manager",
49752
+ capScope: "system",
49753
+ addonId: null,
49754
+ access: "create"
49755
+ },
49480
49756
  "osdManager.upsertTemplate": {
49481
49757
  capName: "osd-manager",
49482
49758
  capScope: "system",
@@ -49615,12 +49891,6 @@ Object.freeze({
49615
49891
  addonId: null,
49616
49892
  access: "create"
49617
49893
  },
49618
- "pipelineAnalytics.createRetrainDatasetVersion": {
49619
- capName: "pipeline-analytics",
49620
- capScope: "device",
49621
- addonId: null,
49622
- access: "create"
49623
- },
49624
49894
  "pipelineAnalytics.deleteDeviceEvents": {
49625
49895
  capName: "pipeline-analytics",
49626
49896
  capScope: "device",
@@ -49633,12 +49903,6 @@ Object.freeze({
49633
49903
  addonId: null,
49634
49904
  access: "delete"
49635
49905
  },
49636
- "pipelineAnalytics.deleteRetrainDatasetVersion": {
49637
- capName: "pipeline-analytics",
49638
- capScope: "device",
49639
- addonId: null,
49640
- access: "delete"
49641
- },
49642
49906
  "pipelineAnalytics.deleteTracks": {
49643
49907
  capName: "pipeline-analytics",
49644
49908
  capScope: "device",
@@ -49741,6 +50005,12 @@ Object.freeze({
49741
50005
  addonId: null,
49742
50006
  access: "view"
49743
50007
  },
50008
+ "pipelineAnalytics.getRetrainCorpusKpi": {
50009
+ capName: "pipeline-analytics",
50010
+ capScope: "device",
50011
+ addonId: null,
50012
+ access: "view"
50013
+ },
49744
50014
  "pipelineAnalytics.getRetrainExportUrl": {
49745
50015
  capName: "pipeline-analytics",
49746
50016
  capScope: "device",
@@ -49861,7 +50131,7 @@ Object.freeze({
49861
50131
  addonId: null,
49862
50132
  access: "view"
49863
50133
  },
49864
- "pipelineAnalytics.listRetrainDatasetVersions": {
50134
+ "pipelineAnalytics.listRetrainCorpusPage": {
49865
50135
  capName: "pipeline-analytics",
49866
50136
  capScope: "device",
49867
50137
  addonId: null,
@@ -49915,12 +50185,6 @@ Object.freeze({
49915
50185
  addonId: null,
49916
50186
  access: "create"
49917
50187
  },
49918
- "pipelineAnalytics.previewRetrainDataset": {
49919
- capName: "pipeline-analytics",
49920
- capScope: "device",
49921
- addonId: null,
49922
- access: "view"
49923
- },
49924
50188
  "pipelineAnalytics.proposeRetrainAnnotations": {
49925
50189
  capName: "pipeline-analytics",
49926
50190
  capScope: "device",
@@ -49999,6 +50263,12 @@ Object.freeze({
49999
50263
  addonId: null,
50000
50264
  access: "create"
50001
50265
  },
50266
+ "pipelineAnalytics.resolveRetrainTrainingCorpus": {
50267
+ capName: "pipeline-analytics",
50268
+ capScope: "device",
50269
+ addonId: null,
50270
+ access: "view"
50271
+ },
50002
50272
  "pipelineAnalytics.restageRetrainTrack": {
50003
50273
  capName: "pipeline-analytics",
50004
50274
  capScope: "device",
@@ -50059,12 +50329,6 @@ Object.freeze({
50059
50329
  addonId: null,
50060
50330
  access: "create"
50061
50331
  },
50062
- "pipelineAnalytics.verifyRetrainDatasetVersion": {
50063
- capName: "pipeline-analytics",
50064
- capScope: "device",
50065
- addonId: null,
50066
- access: "view"
50067
- },
50068
50332
  "pipelineAnalytics.wipeAllAnalytics": {
50069
50333
  capName: "pipeline-analytics",
50070
50334
  capScope: "device",
@@ -52459,18 +52723,6 @@ Object.freeze({
52459
52723
  addonId: null,
52460
52724
  access: "create"
52461
52725
  },
52462
- "training.findDatasetVersionIdByName": {
52463
- capName: "training",
52464
- capScope: "system",
52465
- addonId: null,
52466
- access: "view"
52467
- },
52468
- "training.getDatasetVersion": {
52469
- capName: "training",
52470
- capScope: "system",
52471
- addonId: null,
52472
- access: "view"
52473
- },
52474
52726
  "training.getJob": {
52475
52727
  capName: "training",
52476
52728
  capScope: "system",
@@ -52489,12 +52741,6 @@ Object.freeze({
52489
52741
  addonId: null,
52490
52742
  access: "view"
52491
52743
  },
52492
- "training.listDatasetVersions": {
52493
- capName: "training",
52494
- capScope: "system",
52495
- addonId: null,
52496
- access: "view"
52497
- },
52498
52744
  "training.listJobs": {
52499
52745
  capName: "training",
52500
52746
  capScope: "system",
@@ -52507,54 +52753,66 @@ Object.freeze({
52507
52753
  addonId: null,
52508
52754
  access: "view"
52509
52755
  },
52510
- "training.putDatasetVersion": {
52756
+ "training.registerResult": {
52511
52757
  capName: "training",
52512
52758
  capScope: "system",
52513
52759
  addonId: null,
52514
52760
  access: "create"
52515
52761
  },
52516
- "training.registerResult": {
52762
+ "training.rollbackCanary": {
52517
52763
  capName: "training",
52518
52764
  capScope: "system",
52519
52765
  addonId: null,
52520
52766
  access: "create"
52521
52767
  },
52522
- "training.removeDatasetVersion": {
52768
+ "training.startJob": {
52523
52769
  capName: "training",
52524
52770
  capScope: "system",
52525
52771
  addonId: null,
52526
- access: "delete"
52772
+ access: "create"
52527
52773
  },
52528
- "training.rollbackCanary": {
52774
+ "training.startJobBatch": {
52529
52775
  capName: "training",
52530
52776
  capScope: "system",
52531
52777
  addonId: null,
52532
52778
  access: "create"
52533
52779
  },
52534
- "training.startJob": {
52535
- capName: "training",
52780
+ "trainingProvider.cancelJob": {
52781
+ capName: "training-provider",
52536
52782
  capScope: "system",
52537
52783
  addonId: null,
52538
52784
  access: "create"
52539
52785
  },
52540
- "trainingProvider.cancelJob": {
52786
+ "trainingProvider.cleanupJob": {
52541
52787
  capName: "training-provider",
52542
52788
  capScope: "system",
52543
52789
  addonId: null,
52544
52790
  access: "create"
52545
52791
  },
52546
- "trainingProvider.cleanupJob": {
52792
+ "trainingProvider.createEntry": {
52547
52793
  capName: "training-provider",
52548
52794
  capScope: "system",
52549
52795
  addonId: null,
52550
52796
  access: "create"
52551
52797
  },
52798
+ "trainingProvider.deleteEntry": {
52799
+ capName: "training-provider",
52800
+ capScope: "system",
52801
+ addonId: null,
52802
+ access: "delete"
52803
+ },
52552
52804
  "trainingProvider.describe": {
52553
52805
  capName: "training-provider",
52554
52806
  capScope: "system",
52555
52807
  addonId: null,
52556
52808
  access: "view"
52557
52809
  },
52810
+ "trainingProvider.describeTypes": {
52811
+ capName: "training-provider",
52812
+ capScope: "system",
52813
+ addonId: null,
52814
+ access: "view"
52815
+ },
52558
52816
  "trainingProvider.estimateJob": {
52559
52817
  capName: "training-provider",
52560
52818
  capScope: "system",
@@ -52567,6 +52825,12 @@ Object.freeze({
52567
52825
  addonId: null,
52568
52826
  access: "view"
52569
52827
  },
52828
+ "trainingProvider.listEntries": {
52829
+ capName: "training-provider",
52830
+ capScope: "system",
52831
+ addonId: null,
52832
+ access: "view"
52833
+ },
52570
52834
  "trainingProvider.listJobEvents": {
52571
52835
  capName: "training-provider",
52572
52836
  capScope: "system",
@@ -52597,6 +52861,12 @@ Object.freeze({
52597
52861
  addonId: null,
52598
52862
  access: "create"
52599
52863
  },
52864
+ "trainingProvider.updateEntry": {
52865
+ capName: "training-provider",
52866
+ capScope: "system",
52867
+ addonId: null,
52868
+ access: "create"
52869
+ },
52600
52870
  "trainingProvider.uploadDataset": {
52601
52871
  capName: "training-provider",
52602
52872
  capScope: "system",
@@ -56009,6 +56279,11 @@ Object.freeze({
56009
56279
  form: "single",
56010
56280
  optional: false
56011
56281
  }],
56282
+ "osdManager.setSlotCameraEnabled": [{
56283
+ name: "deviceId",
56284
+ form: "single",
56285
+ optional: false
56286
+ }],
56012
56287
  "petFeeder.callPet": [{
56013
56288
  name: "deviceId",
56014
56289
  form: "single",
@@ -56229,6 +56504,11 @@ Object.freeze({
56229
56504
  form: "array",
56230
56505
  optional: false
56231
56506
  }],
56507
+ "pipelineAnalytics.listRetrainCorpusPage": [{
56508
+ name: "deviceIds",
56509
+ form: "array",
56510
+ optional: true
56511
+ }],
56232
56512
  "pipelineAnalytics.listRetrainStaging": [{
56233
56513
  name: "deviceIds",
56234
56514
  form: "array",
@@ -57338,6 +57618,7 @@ Object.freeze({
57338
57618
  });
57339
57619
  Object.freeze({
57340
57620
  "broker": "broker",
57621
+ "calendar-source": "calendar",
57341
57622
  "device-export": "device-export",
57342
57623
  "llm": "ai",
57343
57624
  "mesh-network": "mesh",
@@ -57823,6 +58104,8 @@ var STATE_SUMMARY_VARS = [
57823
58104
  [...RULE_TEXT],
57824
58105
  [...RULE_TEXT],
57825
58106
  [...RULE_TEXT],
58107
+ [...RULE_TEXT],
58108
+ [...RULE_TEXT],
57826
58109
  ([...RULE_TEXT], [...UPDATES]),
57827
58110
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),
57828
58111
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),