@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.js CHANGED
@@ -5412,7 +5412,7 @@ var ZodIssueCode = {
5412
5412
  var ZodFirstPartyTypeKind;
5413
5413
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5414
5414
  //#endregion
5415
- //#region ../types/dist/sleep-r3RWkGVx.mjs
5415
+ //#region ../types/dist/sleep-DwAQ9sqX.mjs
5416
5416
  /**
5417
5417
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5418
5418
  * window to float samples (D455).
@@ -9408,6 +9408,16 @@ var CompositionSchema = object({
9408
9408
  seen.add(feature.cap);
9409
9409
  });
9410
9410
  });
9411
+ var NodeColorIdSchema = _enum([
9412
+ "node-a",
9413
+ "node-b",
9414
+ "node-c",
9415
+ "node-d",
9416
+ "node-e",
9417
+ "node-f",
9418
+ "node-g",
9419
+ "node-h"
9420
+ ]);
9411
9421
  new Set([
9412
9422
  "track",
9413
9423
  "face",
@@ -18570,14 +18580,14 @@ var LlmProfileSchema = object({
18570
18580
  /** ConfigUISchema tree passed through untyped on the wire (the
18571
18581
  * notification-output `ConfigSchemaPassthrough` precedent at
18572
18582
  * notification-output.cap.ts:151); the exported TS type re-tightens it. */
18573
- var ConfigSchemaPassthrough$1 = unknown();
18583
+ var ConfigSchemaPassthrough$3 = unknown();
18574
18584
  var LlmProfileKindDescriptorSchema = object({
18575
18585
  kind: LlmProfileKindSchema,
18576
18586
  label: string(),
18577
18587
  icon: string(),
18578
18588
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
18579
18589
  addonId: string(),
18580
- configSchema: ConfigSchemaPassthrough$1
18590
+ configSchema: ConfigSchemaPassthrough$3
18581
18591
  });
18582
18592
  var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
18583
18593
  var LlmDefaultSchema = object({
@@ -19698,7 +19708,7 @@ var TargetKindCapsSchema = object({
19698
19708
  * the union is large and not meant for runtime validation here; the exported
19699
19709
  * `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
19700
19710
  */
19701
- var ConfigSchemaPassthrough = unknown();
19711
+ var ConfigSchemaPassthrough$2 = unknown();
19702
19712
  var TargetKindSchema = object({
19703
19713
  kind: string(),
19704
19714
  label: string(),
@@ -19735,7 +19745,7 @@ var TargetKindSchema = object({
19735
19745
  * its raster path, which is the safe default for an unknown image.
19736
19746
  */
19737
19747
  iconMediaType: string().optional(),
19738
- configSchema: ConfigSchemaPassthrough,
19748
+ configSchema: ConfigSchemaPassthrough$2,
19739
19749
  /**
19740
19750
  * The config keys that decide WHERE this kind's secrets are sent (server,
19741
19751
  * base URL, instance, chat, recipient). A save that changes any of them
@@ -23072,6 +23082,61 @@ var OauthIntegrationDescriptorSchema = object({
23072
23082
  });
23073
23083
  method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" });
23074
23084
  /**
23085
+ * `oidc-connections` — CRUD for IdP rows under `auth-oidc` (D828 sibling).
23086
+ *
23087
+ * One hub-only singleton (`auth-oidc`). The Settings UI is a DataTable +
23088
+ * ItemFormDialog; there is no `editable-array` in `globalSettingsSchema`.
23089
+ * Operator-chosen `id` is the URL slug (`/addon/auth-oidc/<id>/…`) and is
23090
+ * immutable after create.
23091
+ */
23092
+ var ConfigSchemaPassthrough$1 = unknown();
23093
+ var OidcConnectionSchema = object({
23094
+ id: string().min(1),
23095
+ displayName: string(),
23096
+ icon: string(),
23097
+ issuerUrl: string(),
23098
+ clientId: string(),
23099
+ /** Client id + secret present — never the secret value. */
23100
+ configured: boolean(),
23101
+ /**
23102
+ * Values for the connection form schema. `clientSecret` is a keychain
23103
+ * {@link SecretFieldView} or `null` / `''`, never plaintext (D789).
23104
+ */
23105
+ formValues: record(string(), unknown()).optional()
23106
+ });
23107
+ /**
23108
+ * Patch one connection. Omitted or empty `clientSecret` keeps the stored
23109
+ * secret (D787). `{ $secretClear: true }` clears it. `id` is never renamed.
23110
+ */
23111
+ var OidcConnectionUpdateInputSchema = object({
23112
+ id: string().min(1),
23113
+ displayName: string().min(1),
23114
+ icon: string().optional(),
23115
+ issuerUrl: string().optional(),
23116
+ clientId: string().optional(),
23117
+ clientSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
23118
+ redirectUri: string().optional(),
23119
+ scopes: string().optional(),
23120
+ usernameClaim: _enum([
23121
+ "preferred_username",
23122
+ "email",
23123
+ "sub"
23124
+ ]).optional()
23125
+ });
23126
+ method(object({}), ConfigSchemaPassthrough$1, { auth: "admin" }), method(object({}), array(OidcConnectionSchema).readonly(), { auth: "admin" }), method(object({
23127
+ id: string().min(1).regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "id must be a lowercase slug"),
23128
+ displayName: string().min(1)
23129
+ }), object({ id: string() }), {
23130
+ kind: "mutation",
23131
+ auth: "admin"
23132
+ }), method(OidcConnectionUpdateInputSchema, object({ ok: literal(true) }), {
23133
+ kind: "mutation",
23134
+ auth: "admin"
23135
+ }), method(object({ id: string().min(1) }), object({ ok: literal(true) }), {
23136
+ kind: "mutation",
23137
+ auth: "admin"
23138
+ });
23139
+ /**
23075
23140
  * What started a camera's onboard motion (D672). `camera` is the camera's own
23076
23141
  * firmware; `sensor` is a device the operator ATTACHED to it. Absent on the
23077
23142
  * wire means the camera: only the camera-sensors bridge ever says `sensor`.
@@ -24428,24 +24493,69 @@ var RetrainFrameListSchema = object({
24428
24493
  /** What the page pre-selects — the native key frame when one survives. */
24429
24494
  autoPickMediaId: number().int().optional()
24430
24495
  });
24496
+ /** Exclusive partition of a corpus copy's annotation progress (design §4.2). */
24497
+ var RetrainFrameWorkStateSchema = _enum([
24498
+ "unannotated",
24499
+ "annotated",
24500
+ "complete"
24501
+ ]);
24502
+ /**
24503
+ * Filters for paginated corpus list, KPI, and matching export (design §4.4).
24504
+ * Every narrowing field is ANDed; omitted fields impose no constraint.
24505
+ */
24506
+ var RetrainCorpusFilterSchema = object({
24507
+ workState: RetrainFrameWorkStateSchema.optional(),
24508
+ deviceIds: array(number()).max(500).optional(),
24509
+ /** When set, only frames in this named collection. */
24510
+ collectionId: string().optional(),
24511
+ /** Frames that carry at least one saved annotation in one of these classes. */
24512
+ classes: array(RetrainMacroClassSchema).optional(),
24513
+ page: number().int().positive().default(1),
24514
+ pageSize: number().int().positive().max(100).default(50)
24515
+ });
24516
+ var RetrainCorpusPageSchema = object({
24517
+ frames: array(RetrainFrameSchema.extend({ workState: RetrainFrameWorkStateSchema })).readonly(),
24518
+ total: number().int().nonnegative(),
24519
+ page: number().int().positive(),
24520
+ pageSize: number().int().positive()
24521
+ });
24522
+ var RetrainCorpusKpiCameraRowSchema = object({
24523
+ deviceId: number(),
24524
+ unannotated: number().int().nonnegative(),
24525
+ annotated: number().int().nonnegative(),
24526
+ complete: number().int().nonnegative(),
24527
+ /** This camera's `complete` count divided by corpus `total`, in `[0,1]`.
24528
+ * `null` when the corpus is empty (no ratio). */
24529
+ pctOfCorpus: number().min(0).max(1).nullable()
24530
+ });
24531
+ var RetrainCorpusKpiSchema = object({
24532
+ total: number().int().nonnegative(),
24533
+ unannotated: number().int().nonnegative(),
24534
+ annotated: number().int().nonnegative(),
24535
+ complete: number().int().nonnegative(),
24536
+ cameras: array(RetrainCorpusKpiCameraRowSchema).readonly()
24537
+ });
24431
24538
  /**
24432
24539
  * Which frames an annotated export carries. Every field narrows; an empty
24433
- * filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
24434
- * list owned by whoever trains (the training orchestrator), so `frameIds` is
24435
- * the primitive a version export uses; `batchId` re-selects what an earlier
24436
- * export carried (`exportedInBatch`).
24540
+ * filter is every annotated copy. `frameIds` is the primitive a job or
24541
+ * download uses; `batchId` re-selects what an earlier export carried
24542
+ * (`exportedInBatch`). Frozen dataset versions were removed — live selection
24543
+ * resolves to `frameIds` at plan/start.
24437
24544
  */
24438
24545
  var RetrainExportFilterSchema = object({
24439
24546
  deviceIds: array(number()).optional(),
24440
24547
  frameIds: array(string()).max(2e4).optional(),
24441
24548
  /** Only frames in at least one of these named collections. */
24442
24549
  collectionIds: array(string()).max(200).optional(),
24443
- /** Exactly the frames of this dataset version (and its completeOnly). An
24444
- * unknown id selects nothing. */
24445
- datasetVersionId: string().optional(),
24550
+ /** Single collection (Frames filter bar). ANDed with `collectionIds` when both set. */
24551
+ collectionId: string().optional(),
24446
24552
  batchId: string().optional(),
24447
24553
  /** Only frames the operator marked complete (all subjects boxed). */
24448
- completeOnly: boolean().optional()
24554
+ completeOnly: boolean().optional(),
24555
+ /** Exclusive work-state partition (`workStateOf`); same as the corpus list. */
24556
+ workState: RetrainFrameWorkStateSchema.optional(),
24557
+ /** Frames with at least one saved annotation in one of these classes. */
24558
+ classes: array(RetrainMacroClassSchema).optional()
24449
24559
  });
24450
24560
  /**
24451
24561
  * `frames`: the full frame copies, boxes in `annotations.json`.
@@ -24645,8 +24755,7 @@ var RetrainDatasetStatsSchema = object({
24645
24755
  completeFrames: number().int()
24646
24756
  })).readonly()
24647
24757
  });
24648
- /** An immutable dataset version, without its frame list. */
24649
- var RetrainDatasetVersionSchema = object({
24758
+ object({
24650
24759
  id: string(),
24651
24760
  name: string(),
24652
24761
  createdAt: number(),
@@ -24654,22 +24763,33 @@ var RetrainDatasetVersionSchema = object({
24654
24763
  layout: RetrainExportLayoutSchema,
24655
24764
  completeOnly: boolean(),
24656
24765
  frameCount: number().int(),
24657
- /** sha256 of what the frames taught when the version was frozen. */
24658
24766
  annotationHash: string(),
24659
- /** The export manifest schema the version was cut under. */
24660
24767
  manifestSchema: string(),
24661
24768
  stats: RetrainDatasetStatsSchema
24662
24769
  });
24663
- var CreateRetrainDatasetVersionResultSchema = discriminatedUnion("kind", [object({
24664
- kind: literal("created"),
24665
- version: RetrainDatasetVersionSchema
24770
+ /**
24771
+ * Live training corpus criteria — same shape as `TrainingCorpusSelection` on
24772
+ * the training cap. Resolved here so plan/start and the annotated export share
24773
+ * one definition of "the frames" (`buildRetrainExportPlan`).
24774
+ */
24775
+ var RetrainTrainingCorpusSelectionSchema = object({
24776
+ collectionIds: array(string()).min(1),
24777
+ workState: _enum([
24778
+ "complete",
24779
+ "annotated_or_complete",
24780
+ "any_annotated"
24781
+ ]).default("complete")
24782
+ });
24783
+ var RetrainTrainingCorpusResolveResultSchema = discriminatedUnion("kind", [object({
24784
+ kind: literal("resolved"),
24785
+ frameIds: array(string()).max(2e4).readonly(),
24786
+ stats: RetrainDatasetStatsSchema,
24787
+ annotationHash: string(),
24788
+ layout: RetrainExportLayoutSchema
24666
24789
  }), object({
24667
24790
  kind: literal("refused"),
24668
- reason: _enum([
24669
- "empty-name",
24670
- "duplicate-name",
24671
- "no-frames"
24672
- ])
24791
+ reason: _enum(["unknown-collection", "no-frames"]),
24792
+ detail: string()
24673
24793
  })]);
24674
24794
  /** The outcome of a lifecycle move owned by the retrain page. */
24675
24795
  var RetrainTransitionResultSchema = object({
@@ -25376,6 +25496,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25376
25496
  }), array(RetrainTrackSchema).readonly(), {
25377
25497
  kind: "query",
25378
25498
  auth: "admin"
25499
+ }), method(RetrainCorpusFilterSchema, RetrainCorpusPageSchema, {
25500
+ kind: "query",
25501
+ auth: "admin"
25502
+ }), method(object({}), RetrainCorpusKpiSchema, {
25503
+ kind: "query",
25504
+ auth: "admin"
25379
25505
  }), method(object({ trackId: string() }), RetrainFrameListSchema, {
25380
25506
  kind: "query",
25381
25507
  auth: "admin"
@@ -25471,36 +25597,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25471
25597
  kind: "mutation",
25472
25598
  auth: "admin",
25473
25599
  timeoutMs: 12e4
25474
- }), method(object({
25475
- selection: RetrainDatasetSelectionSchema,
25476
- completeOnly: boolean().optional()
25477
- }), RetrainDatasetStatsSchema, {
25478
- kind: "query",
25479
- auth: "admin"
25480
- }), method(object({
25481
- name: string().max(120),
25482
- selection: RetrainDatasetSelectionSchema,
25483
- layout: RetrainExportLayoutSchema,
25484
- completeOnly: boolean()
25485
- }), CreateRetrainDatasetVersionResultSchema, {
25486
- kind: "mutation",
25487
- auth: "admin",
25488
- timeoutMs: 12e4
25489
- }), method(object({}), array(RetrainDatasetVersionSchema).readonly(), {
25490
- kind: "query",
25491
- auth: "admin"
25492
- }), method(object({ id: string() }), object({ deleted: boolean() }), {
25493
- kind: "mutation",
25494
- auth: "admin"
25495
- }), method(object({ id: string() }), object({
25496
- found: boolean(),
25497
- annotationHash: string(),
25498
- matches: boolean(),
25499
- missingFrames: number().int()
25500
- }), {
25501
- kind: "query",
25502
- auth: "admin",
25503
- timeoutMs: 12e4
25504
25600
  }), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
25505
25601
  kind: "query",
25506
25602
  auth: "admin"
@@ -25527,6 +25623,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25527
25623
  }), method(object({}), array(RetrainCollectionSchema).readonly(), {
25528
25624
  kind: "query",
25529
25625
  auth: "admin"
25626
+ }), method(RetrainTrainingCorpusSelectionSchema, RetrainTrainingCorpusResolveResultSchema, {
25627
+ kind: "query",
25628
+ auth: "admin",
25629
+ timeoutMs: 6e4
25530
25630
  }), method(object({
25531
25631
  id: string(),
25532
25632
  name: string().max(120)
@@ -26143,11 +26243,14 @@ var HardwareClassIdSchema = _enum([
26143
26243
  "intel-n-series",
26144
26244
  "apple-m-base",
26145
26245
  "apple-m-pro",
26246
+ "amd-phoenix",
26146
26247
  "unknown"
26147
26248
  ]);
26148
26249
  var AcceleratorKindSchema = _enum([
26149
26250
  "intel-npu",
26150
26251
  "intel-igpu",
26252
+ "amd-igpu",
26253
+ "amd-npu",
26151
26254
  "x86-cpu",
26152
26255
  "arm-cpu",
26153
26256
  "apple-ane",
@@ -28077,6 +28180,8 @@ var AgentPipelineSettingsSchema = object({
28077
28180
  * address is wrong (multi-homed host, NAT, custom interface).
28078
28181
  */
28079
28182
  reachableHost: string().optional(),
28183
+ /** Hub-persisted UI colour (`--color-node-*` theme tokens). */
28184
+ color: NodeColorIdSchema.optional(),
28080
28185
  /**
28081
28186
  * Multi-device inference opt-in (Phase 4). Per-node map deviceKey → {enabled,
28082
28187
  * weight, steps}. Absent / all-disabled ⇒ the node's single default
@@ -28626,8 +28731,9 @@ method(object({
28626
28731
  auth: "admin"
28627
28732
  }), method(object({
28628
28733
  agentNodeId: string(),
28629
- reachableHost: string().nullable()
28630
- }), object({ success: literal(true) }), {
28734
+ reachableHost: string().nullable().optional(),
28735
+ color: NodeColorIdSchema.nullable().optional()
28736
+ }).refine((v) => v.reachableHost !== void 0 || v.color !== void 0, { message: "reachableHost or color required" }), object({ success: literal(true) }), {
28631
28737
  kind: "mutation",
28632
28738
  auth: "admin"
28633
28739
  }), method(object({
@@ -32216,7 +32322,7 @@ var CustomActionInputSchema = object({
32216
32322
  action: string().min(1),
32217
32323
  input: unknown()
32218
32324
  });
32219
- method(_void(), array(AddonListItemSchema).readonly()), method(object({
32325
+ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSchema).readonly()), method(object({
32220
32326
  addonId: string(),
32221
32327
  limit: number().min(1).max(500).default(100),
32222
32328
  level: LogLevelSchema$2.optional()
@@ -37278,7 +37384,13 @@ var TopologyNodeSchema = object({
37278
37384
  })).readonly(),
37279
37385
  processes: array(TopologyProcessSchema).readonly(),
37280
37386
  categories: array(TopologyCategorySchema).readonly(),
37281
- rootPackage: TopologyRootPackageSchema.nullable()
37387
+ rootPackage: TopologyRootPackageSchema.nullable(),
37388
+ /**
37389
+ * How an online AGENT reaches the hub (mesh mTLS Release A): `tls` once it has
37390
+ * completed a mutual-TLS handshake, `clear` otherwise. Absent for the hub,
37391
+ * for offline rows and when the hub cannot tell.
37392
+ */
37393
+ meshTransport: _enum(["tls", "clear"]).optional()
37282
37394
  });
37283
37395
  var CapUsageEdgeSchema = object({
37284
37396
  callerAddonId: string(),
@@ -37737,6 +37849,7 @@ var OsdNamedTemplateSchema = object({
37737
37849
  });
37738
37850
  /** Where a slot's value comes from. */
37739
37851
  var OsdSourceSchema = discriminatedUnion("kind", [
37852
+ object({ kind: literal("none") }),
37740
37853
  object({
37741
37854
  kind: literal("static"),
37742
37855
  text: string().max(64)
@@ -37863,6 +37976,13 @@ method(object({ deviceId: number().int() }), object({
37863
37976
  }), object({ success: literal(true) }), {
37864
37977
  kind: "mutation",
37865
37978
  auth: "admin"
37979
+ }), method(object({
37980
+ deviceId: number().int(),
37981
+ slotId: string().min(1),
37982
+ enabled: boolean()
37983
+ }), object({ success: literal(true) }), {
37984
+ kind: "mutation",
37985
+ auth: "admin"
37866
37986
  }), method(object({
37867
37987
  sourceDeviceId: number().int(),
37868
37988
  targetDeviceId: number().int()
@@ -38294,7 +38414,15 @@ var GpuInfoSchema = object({
38294
38414
  name: string(),
38295
38415
  memoryMB: number().optional()
38296
38416
  });
38297
- var NpuInfoSchema = object({ type: _enum(["apple-ane", "intel-npu"]) });
38417
+ var NpuInfoSchema = object({
38418
+ type: _enum([
38419
+ "apple-ane",
38420
+ "intel-npu",
38421
+ "amd-xdna"
38422
+ ]),
38423
+ name: string().optional(),
38424
+ generation: _enum(["xdna1", "xdna2"]).optional()
38425
+ });
38298
38426
  var CoralInfoSchema = object({
38299
38427
  type: literal("coral-edgetpu"),
38300
38428
  bus: string().optional()
@@ -43453,9 +43581,11 @@ var zoneRulesCapability = {
43453
43581
  * once is what makes a second provider (RunPod, a local NVIDIA node) a new
43454
43582
  * manifest entry and nothing else.
43455
43583
  *
43456
- * Collection, routed by the `addonId` in every single-row input (the `llm` /
43457
- * `notification-output` posture); `describe` concat-fans across providers.
43458
- * Every method is `admin`: these spend money.
43584
+ * Collection of provider **types** (addons). Each addon owns zero or more
43585
+ * **entries** (credentials + defaults). Concat-fans: `describe`,
43586
+ * `describeTypes`, `listEntries`, `listJobs`. Single-row work is keyed by
43587
+ * `entryId`; callers also pass the owning `addonId` as the collection
43588
+ * selector (broker posture). Every method is `admin`: these spend money.
43459
43589
  *
43460
43590
  * Every cloud object a provider creates is tagged with the orchestrator's
43461
43591
  * `jobKey`, so a retried submit finds the job it already started instead of
@@ -43479,8 +43609,8 @@ var TrainingRegionOptionSchema = object({
43479
43609
  priceMultiplier: number().positive()
43480
43610
  });
43481
43611
  /**
43482
- * The provider's per-account settings, as the orchestrator reads them. They
43483
- * live in the PROVIDER addon's settings (operator decision 2026-10-08: they
43612
+ * The provider's per-entry settings, as the orchestrator reads them. They
43613
+ * live on the PROVIDER addon's entry (operator decision 2026-10-08: they
43484
43614
  * depend on the user's account), never hard-coded in the orchestrator.
43485
43615
  */
43486
43616
  var TrainingProviderDefaultsSchema = object({
@@ -43491,9 +43621,44 @@ var TrainingProviderDefaultsSchema = object({
43491
43621
  /** Hours a FAILED job's cloud dataset is kept for debugging; 0 = delete at once. */
43492
43622
  failedDatasetGraceHours: number().nonnegative()
43493
43623
  });
43624
+ /**
43625
+ * Entry form schema for a provider type — same seam as notification
43626
+ * `TargetKind.configSchema` (`z.unknown()` at the wire; callers tighten to
43627
+ * {@link ConfigUISchema}). Drives `ConfigFormBuilder` on Training → Providers.
43628
+ */
43629
+ var ConfigSchemaPassthrough = unknown();
43630
+ /** One creatable provider type, for the Add-entry dialog. */
43631
+ var TrainingProviderTypeSchema = object({
43632
+ typeId: string(),
43633
+ label: string(),
43634
+ /** Path under the addon package (e.g. `assets/training-modal/icon.svg`). */
43635
+ iconAsset: string(),
43636
+ /** Owning `training-provider` addon — collection selector for createEntry. */
43637
+ addonId: string(),
43638
+ /**
43639
+ * Fields for one entry of this type (credentials + defaults). Absent on a
43640
+ * type that only needs a name. Password fields are keychain-backed on the
43641
+ * provider addon (`secretStatePaths`), not D634 plaintext.
43642
+ */
43643
+ configSchema: ConfigSchemaPassthrough.optional()
43644
+ });
43645
+ /** One configured account / workspace under a provider type. */
43646
+ var TrainingProviderEntrySchema = object({
43647
+ entryId: string(),
43648
+ typeId: string(),
43649
+ name: string(),
43650
+ addonId: string(),
43651
+ /** Credentials are present — never the values. */
43652
+ configured: boolean()
43653
+ });
43494
43654
  var TrainingProviderDescriptorSchema = object({
43495
43655
  addonId: string(),
43496
- /** `modal`, `runpod`, `fake`, … */
43656
+ entryId: string(),
43657
+ typeId: string(),
43658
+ /** Operator-chosen entry name. */
43659
+ name: string(),
43660
+ iconAsset: string(),
43661
+ /** `modal`, `runpod`, `fake`, … — same as typeId for current providers. */
43497
43662
  kind: string(),
43498
43663
  label: string(),
43499
43664
  gpuTypes: array(TrainingGpuOptionSchema).readonly(),
@@ -43505,7 +43670,30 @@ var TrainingProviderDescriptorSchema = object({
43505
43670
  dataResidencyNote: string(),
43506
43671
  /** Credentials are present — never the values. */
43507
43672
  configured: boolean(),
43508
- defaults: TrainingProviderDefaultsSchema
43673
+ defaults: TrainingProviderDefaultsSchema,
43674
+ /**
43675
+ * Values for {@link TrainingProviderTypeSchema}'s `configSchema` — password
43676
+ * fields are keychain {@link SecretFieldView} or `null` / `''` (create),
43677
+ * never plaintext. Same hydrate contract as settings forms (D789).
43678
+ */
43679
+ formValues: record(string(), unknown()).optional()
43680
+ });
43681
+ /**
43682
+ * Patch one entry's name, credentials and defaults. Pin with owning `{ addonId }`.
43683
+ * An omitted or empty `tokenSecret` means KEEP the stored secret (D787).
43684
+ * `{ $secretClear: true }` clears it.
43685
+ */
43686
+ var TrainingProviderUpdateEntryInputSchema = object({
43687
+ entryId: string().min(1),
43688
+ name: string().min(1),
43689
+ tokenId: string().optional(),
43690
+ tokenSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
43691
+ environment: string().optional(),
43692
+ gpuType: string().optional(),
43693
+ region: string().optional(),
43694
+ costCapUsd: number().nonnegative().optional(),
43695
+ maxRuntimeSec: number().int().positive().optional(),
43696
+ failedDatasetGraceHours: number().nonnegative().optional()
43509
43697
  });
43510
43698
  var TrainingCredentialCheckSchema = object({
43511
43699
  ok: boolean(),
@@ -43557,20 +43745,33 @@ var TrainerSourceRefSchema = object({
43557
43745
  /** A commit sha (never a branch) — the job must be reproducible. */
43558
43746
  revision: string().regex(/^[0-9a-f]{7,64}$/)
43559
43747
  });
43748
+ /** Cloud job identity — route with the owning addon's `addonId` selector. */
43560
43749
  var JobRef = {
43561
- addonId: string(),
43750
+ entryId: string().min(1),
43562
43751
  jobKey: string().uuid()
43563
43752
  };
43564
43753
  var TrainingLogLineSchema = object({
43565
43754
  ts: number(),
43566
43755
  text: string()
43567
43756
  });
43568
- method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({ addonId: string() }), TrainingCredentialCheckSchema, {
43757
+ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderTypeSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderEntrySchema).readonly(), { auth: "admin" }), method(object({
43758
+ typeId: string().min(1),
43759
+ name: string().min(1)
43760
+ }), object({ entryId: string() }), {
43761
+ kind: "mutation",
43762
+ auth: "admin"
43763
+ }), method(object({ entryId: string().min(1) }), object({ ok: literal(true) }), {
43764
+ kind: "mutation",
43765
+ auth: "admin"
43766
+ }), method(TrainingProviderUpdateEntryInputSchema, object({ ok: literal(true) }), {
43767
+ kind: "mutation",
43768
+ auth: "admin"
43769
+ }), method(object({ entryId: string().min(1) }), TrainingCredentialCheckSchema, {
43569
43770
  kind: "mutation",
43570
43771
  auth: "admin",
43571
43772
  timeoutMs: 3e4
43572
43773
  }), method(object({
43573
- addonId: string(),
43774
+ entryId: string().min(1),
43574
43775
  gpuType: string(),
43575
43776
  region: string(),
43576
43777
  datasetBytes: number().int().nonnegative(),
@@ -43636,7 +43837,7 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
43636
43837
  kind: "mutation",
43637
43838
  auth: "admin",
43638
43839
  timeoutMs: 5 * 6e4
43639
- }), method(object({ addonId: string() }), array(ProviderJobStatusSchema).readonly(), {
43840
+ }), method(object({ entryId: string().min(1).optional() }), array(ProviderJobStatusSchema).readonly(), {
43640
43841
  auth: "admin",
43641
43842
  timeoutMs: 2 * 6e4
43642
43843
  });
@@ -43646,20 +43847,31 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
43646
43847
  *
43647
43848
  * It owns what every provider must agree on, written once:
43648
43849
  *
43649
- * - **Dataset versions.** Taken over from pipeline-analytics (D796): the rows
43650
- * live here (D808); pipeline-analytics still CUTS a version (it owns the corpus and
43651
- * the export plan) and reaches this store through the five row methods
43652
- * below, so the Retrain page and the export did not change.
43653
43850
  * - **Jobs.** A persisted state machine, a reconcile loop against the
43654
43851
  * provider, a cost guard, a daily orphan sweep and the retention rules.
43655
43852
  * - **The return flow.** Verified artefacts → Model Studio
43656
43853
  * (`custom-model-registry.importModelBundle`) → canary on cameras →
43657
43854
  * rollback. Nothing is ever registered automatically.
43658
43855
  *
43856
+ * Plan/start takes a live {@link TrainingCorpusSelection} (collections +
43857
+ * work-state rule); frame ids are resolved via pipeline-analytics at that
43858
+ * moment and snapshotted on the job. No frozen dataset version.
43859
+ *
43659
43860
  * Every method is `admin`.
43660
43861
  */
43661
- /** A version WITH its frame list — what the export and a job read. */
43662
- var TrainingDatasetVersionRowSchema = RetrainDatasetVersionSchema.omit({ frameCount: true }).extend({ frameIds: array(string()).max(2e4).readonly() });
43862
+ /**
43863
+ * Live corpus criteria for plan/start (design §5.2). Default is complete-only.
43864
+ * Frame ids are resolved at plan/start — never a frozen version id.
43865
+ */
43866
+ var TrainingCorpusSelectionSchema = object({
43867
+ collectionIds: array(string()).min(1),
43868
+ /** Default complete-only for v1 */
43869
+ workState: _enum([
43870
+ "complete",
43871
+ "annotated_or_complete",
43872
+ "any_annotated"
43873
+ ]).default("complete")
43874
+ });
43663
43875
  /** A base model a detector job can fine-tune, and the baseline it is judged against. */
43664
43876
  var TrainingBaseModelSchema = object({
43665
43877
  modelId: string(),
@@ -43677,9 +43889,13 @@ var TrainingPresetSchema = _enum([
43677
43889
  "thorough"
43678
43890
  ]);
43679
43891
  var TrainingJobRequestSchema = object({
43680
- datasetVersionId: string().min(1),
43681
- /** The `training-provider` addon that runs it. */
43682
- addonId: string().min(1),
43892
+ /** Live collection + work-state criteria; resolved at plan/start. */
43893
+ selection: TrainingCorpusSelectionSchema,
43894
+ /**
43895
+ * The provider **entry** that runs it (credentials + defaults).
43896
+ * Resolve to an owning addon via `training-provider.describe` / `listEntries`.
43897
+ */
43898
+ entryId: string().min(1),
43683
43899
  gpuType: string().min(1),
43684
43900
  region: string(),
43685
43901
  baseModelId: string().min(1),
@@ -43738,6 +43954,7 @@ var TrainingJobPlanSchema = object({
43738
43954
  * result lives after the operator acted on it.
43739
43955
  */
43740
43956
  var TrainingJobStateSchema = _enum([
43957
+ "queued",
43741
43958
  "uploading",
43742
43959
  "submitted",
43743
43960
  "starting",
@@ -43791,6 +44008,11 @@ var TrainingJobSchema = object({
43791
44008
  createdAt: number(),
43792
44009
  updatedAt: number(),
43793
44010
  state: TrainingJobStateSchema,
44011
+ /**
44012
+ * Shared by every job enqueued together via `startJobBatch`.
44013
+ * `null` for a lone `startJob`. The engine advances queued siblings by this id.
44014
+ */
44015
+ batchId: string().nullable().default(null),
43794
44016
  stage: TrainingStageSchema.nullable(),
43795
44017
  failure: object({
43796
44018
  reason: TrainingFailureReasonSchema,
@@ -43802,6 +44024,12 @@ var TrainingJobSchema = object({
43802
44024
  maxRuntimeSec: number().int().positive(),
43803
44025
  trainer: TrainerSourceRefSchema,
43804
44026
  datasetLayout: RetrainExportLayoutSchema,
44027
+ /** Frame count snapshotted when the job started (audit; equals `frameIds.length`). */
44028
+ frameCount: number().int().nonnegative(),
44029
+ /** Resolved frame ids at start — the archive ships exactly these. */
44030
+ frameIds: array(string()).max(2e4).readonly(),
44031
+ /** Hash of what those frames taught at start (trainer `dataset.annotationHash`). */
44032
+ annotationHash: string(),
43805
44033
  dataset: object({
43806
44034
  bytes: number().int(),
43807
44035
  sha256: string(),
@@ -43843,13 +44071,7 @@ var TrainingJobSchema = object({
43843
44071
  canary: TrainingCanarySchema.nullable()
43844
44072
  });
43845
44073
  var IdInput = object({ id: string().min(1) });
43846
- method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
43847
- kind: "mutation",
43848
- auth: "admin"
43849
- }), 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() }), {
43850
- kind: "mutation",
43851
- auth: "admin"
43852
- }), method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
44074
+ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
43853
44075
  auth: "admin",
43854
44076
  timeoutMs: 6e4
43855
44077
  }), method(TrainingJobRequestSchema.extend({
@@ -43868,6 +44090,24 @@ method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
43868
44090
  kind: "mutation",
43869
44091
  auth: "admin",
43870
44092
  timeoutMs: 12e4
44093
+ }), method(TrainingJobRequestSchema.omit({ baseModelId: true }).extend({
44094
+ baseModelIds: array(string().min(1)).min(1),
44095
+ name: string().min(1).max(120),
44096
+ maxCostUsd: number().positive(),
44097
+ maxRuntimeSec: number().int().positive(),
44098
+ idempotencyKey: string().min(8).max(80)
44099
+ }), discriminatedUnion("kind", [object({
44100
+ kind: literal("started"),
44101
+ batchId: string(),
44102
+ jobs: array(TrainingJobSchema).min(1).readonly()
44103
+ }), object({
44104
+ kind: literal("refused"),
44105
+ reason: TrainingRefusalReasonSchema,
44106
+ detail: string()
44107
+ })]), {
44108
+ kind: "mutation",
44109
+ auth: "admin",
44110
+ timeoutMs: 12e4
43871
44111
  }), method(object({}), array(TrainingJobSchema).readonly(), { auth: "admin" }), method(IdInput, TrainingJobSchema.nullable(), { auth: "admin" }), method(IdInput, TrainingJobSchema, {
43872
44112
  kind: "mutation",
43873
44113
  auth: "admin",
@@ -49426,6 +49666,36 @@ Object.freeze({
49426
49666
  addonId: null,
49427
49667
  access: "view"
49428
49668
  },
49669
+ "oidcConnections.connectionFormSchema": {
49670
+ capName: "oidc-connections",
49671
+ capScope: "system",
49672
+ addonId: null,
49673
+ access: "view"
49674
+ },
49675
+ "oidcConnections.createConnection": {
49676
+ capName: "oidc-connections",
49677
+ capScope: "system",
49678
+ addonId: null,
49679
+ access: "create"
49680
+ },
49681
+ "oidcConnections.deleteConnection": {
49682
+ capName: "oidc-connections",
49683
+ capScope: "system",
49684
+ addonId: null,
49685
+ access: "delete"
49686
+ },
49687
+ "oidcConnections.listConnections": {
49688
+ capName: "oidc-connections",
49689
+ capScope: "system",
49690
+ addonId: null,
49691
+ access: "view"
49692
+ },
49693
+ "oidcConnections.updateConnection": {
49694
+ capName: "oidc-connections",
49695
+ capScope: "system",
49696
+ addonId: null,
49697
+ access: "create"
49698
+ },
49429
49699
  "osd.getStatus": {
49430
49700
  capName: "osd",
49431
49701
  capScope: "device",
@@ -49498,6 +49768,12 @@ Object.freeze({
49498
49768
  addonId: null,
49499
49769
  access: "create"
49500
49770
  },
49771
+ "osdManager.setSlotCameraEnabled": {
49772
+ capName: "osd-manager",
49773
+ capScope: "system",
49774
+ addonId: null,
49775
+ access: "create"
49776
+ },
49501
49777
  "osdManager.upsertTemplate": {
49502
49778
  capName: "osd-manager",
49503
49779
  capScope: "system",
@@ -49636,12 +49912,6 @@ Object.freeze({
49636
49912
  addonId: null,
49637
49913
  access: "create"
49638
49914
  },
49639
- "pipelineAnalytics.createRetrainDatasetVersion": {
49640
- capName: "pipeline-analytics",
49641
- capScope: "device",
49642
- addonId: null,
49643
- access: "create"
49644
- },
49645
49915
  "pipelineAnalytics.deleteDeviceEvents": {
49646
49916
  capName: "pipeline-analytics",
49647
49917
  capScope: "device",
@@ -49654,12 +49924,6 @@ Object.freeze({
49654
49924
  addonId: null,
49655
49925
  access: "delete"
49656
49926
  },
49657
- "pipelineAnalytics.deleteRetrainDatasetVersion": {
49658
- capName: "pipeline-analytics",
49659
- capScope: "device",
49660
- addonId: null,
49661
- access: "delete"
49662
- },
49663
49927
  "pipelineAnalytics.deleteTracks": {
49664
49928
  capName: "pipeline-analytics",
49665
49929
  capScope: "device",
@@ -49762,6 +50026,12 @@ Object.freeze({
49762
50026
  addonId: null,
49763
50027
  access: "view"
49764
50028
  },
50029
+ "pipelineAnalytics.getRetrainCorpusKpi": {
50030
+ capName: "pipeline-analytics",
50031
+ capScope: "device",
50032
+ addonId: null,
50033
+ access: "view"
50034
+ },
49765
50035
  "pipelineAnalytics.getRetrainExportUrl": {
49766
50036
  capName: "pipeline-analytics",
49767
50037
  capScope: "device",
@@ -49882,7 +50152,7 @@ Object.freeze({
49882
50152
  addonId: null,
49883
50153
  access: "view"
49884
50154
  },
49885
- "pipelineAnalytics.listRetrainDatasetVersions": {
50155
+ "pipelineAnalytics.listRetrainCorpusPage": {
49886
50156
  capName: "pipeline-analytics",
49887
50157
  capScope: "device",
49888
50158
  addonId: null,
@@ -49936,12 +50206,6 @@ Object.freeze({
49936
50206
  addonId: null,
49937
50207
  access: "create"
49938
50208
  },
49939
- "pipelineAnalytics.previewRetrainDataset": {
49940
- capName: "pipeline-analytics",
49941
- capScope: "device",
49942
- addonId: null,
49943
- access: "view"
49944
- },
49945
50209
  "pipelineAnalytics.proposeRetrainAnnotations": {
49946
50210
  capName: "pipeline-analytics",
49947
50211
  capScope: "device",
@@ -50020,6 +50284,12 @@ Object.freeze({
50020
50284
  addonId: null,
50021
50285
  access: "create"
50022
50286
  },
50287
+ "pipelineAnalytics.resolveRetrainTrainingCorpus": {
50288
+ capName: "pipeline-analytics",
50289
+ capScope: "device",
50290
+ addonId: null,
50291
+ access: "view"
50292
+ },
50023
50293
  "pipelineAnalytics.restageRetrainTrack": {
50024
50294
  capName: "pipeline-analytics",
50025
50295
  capScope: "device",
@@ -50080,12 +50350,6 @@ Object.freeze({
50080
50350
  addonId: null,
50081
50351
  access: "create"
50082
50352
  },
50083
- "pipelineAnalytics.verifyRetrainDatasetVersion": {
50084
- capName: "pipeline-analytics",
50085
- capScope: "device",
50086
- addonId: null,
50087
- access: "view"
50088
- },
50089
50353
  "pipelineAnalytics.wipeAllAnalytics": {
50090
50354
  capName: "pipeline-analytics",
50091
50355
  capScope: "device",
@@ -52480,18 +52744,6 @@ Object.freeze({
52480
52744
  addonId: null,
52481
52745
  access: "create"
52482
52746
  },
52483
- "training.findDatasetVersionIdByName": {
52484
- capName: "training",
52485
- capScope: "system",
52486
- addonId: null,
52487
- access: "view"
52488
- },
52489
- "training.getDatasetVersion": {
52490
- capName: "training",
52491
- capScope: "system",
52492
- addonId: null,
52493
- access: "view"
52494
- },
52495
52747
  "training.getJob": {
52496
52748
  capName: "training",
52497
52749
  capScope: "system",
@@ -52510,12 +52762,6 @@ Object.freeze({
52510
52762
  addonId: null,
52511
52763
  access: "view"
52512
52764
  },
52513
- "training.listDatasetVersions": {
52514
- capName: "training",
52515
- capScope: "system",
52516
- addonId: null,
52517
- access: "view"
52518
- },
52519
52765
  "training.listJobs": {
52520
52766
  capName: "training",
52521
52767
  capScope: "system",
@@ -52528,54 +52774,66 @@ Object.freeze({
52528
52774
  addonId: null,
52529
52775
  access: "view"
52530
52776
  },
52531
- "training.putDatasetVersion": {
52777
+ "training.registerResult": {
52532
52778
  capName: "training",
52533
52779
  capScope: "system",
52534
52780
  addonId: null,
52535
52781
  access: "create"
52536
52782
  },
52537
- "training.registerResult": {
52783
+ "training.rollbackCanary": {
52538
52784
  capName: "training",
52539
52785
  capScope: "system",
52540
52786
  addonId: null,
52541
52787
  access: "create"
52542
52788
  },
52543
- "training.removeDatasetVersion": {
52789
+ "training.startJob": {
52544
52790
  capName: "training",
52545
52791
  capScope: "system",
52546
52792
  addonId: null,
52547
- access: "delete"
52793
+ access: "create"
52548
52794
  },
52549
- "training.rollbackCanary": {
52795
+ "training.startJobBatch": {
52550
52796
  capName: "training",
52551
52797
  capScope: "system",
52552
52798
  addonId: null,
52553
52799
  access: "create"
52554
52800
  },
52555
- "training.startJob": {
52556
- capName: "training",
52801
+ "trainingProvider.cancelJob": {
52802
+ capName: "training-provider",
52557
52803
  capScope: "system",
52558
52804
  addonId: null,
52559
52805
  access: "create"
52560
52806
  },
52561
- "trainingProvider.cancelJob": {
52807
+ "trainingProvider.cleanupJob": {
52562
52808
  capName: "training-provider",
52563
52809
  capScope: "system",
52564
52810
  addonId: null,
52565
52811
  access: "create"
52566
52812
  },
52567
- "trainingProvider.cleanupJob": {
52813
+ "trainingProvider.createEntry": {
52568
52814
  capName: "training-provider",
52569
52815
  capScope: "system",
52570
52816
  addonId: null,
52571
52817
  access: "create"
52572
52818
  },
52819
+ "trainingProvider.deleteEntry": {
52820
+ capName: "training-provider",
52821
+ capScope: "system",
52822
+ addonId: null,
52823
+ access: "delete"
52824
+ },
52573
52825
  "trainingProvider.describe": {
52574
52826
  capName: "training-provider",
52575
52827
  capScope: "system",
52576
52828
  addonId: null,
52577
52829
  access: "view"
52578
52830
  },
52831
+ "trainingProvider.describeTypes": {
52832
+ capName: "training-provider",
52833
+ capScope: "system",
52834
+ addonId: null,
52835
+ access: "view"
52836
+ },
52579
52837
  "trainingProvider.estimateJob": {
52580
52838
  capName: "training-provider",
52581
52839
  capScope: "system",
@@ -52588,6 +52846,12 @@ Object.freeze({
52588
52846
  addonId: null,
52589
52847
  access: "view"
52590
52848
  },
52849
+ "trainingProvider.listEntries": {
52850
+ capName: "training-provider",
52851
+ capScope: "system",
52852
+ addonId: null,
52853
+ access: "view"
52854
+ },
52591
52855
  "trainingProvider.listJobEvents": {
52592
52856
  capName: "training-provider",
52593
52857
  capScope: "system",
@@ -52618,6 +52882,12 @@ Object.freeze({
52618
52882
  addonId: null,
52619
52883
  access: "create"
52620
52884
  },
52885
+ "trainingProvider.updateEntry": {
52886
+ capName: "training-provider",
52887
+ capScope: "system",
52888
+ addonId: null,
52889
+ access: "create"
52890
+ },
52621
52891
  "trainingProvider.uploadDataset": {
52622
52892
  capName: "training-provider",
52623
52893
  capScope: "system",
@@ -56030,6 +56300,11 @@ Object.freeze({
56030
56300
  form: "single",
56031
56301
  optional: false
56032
56302
  }],
56303
+ "osdManager.setSlotCameraEnabled": [{
56304
+ name: "deviceId",
56305
+ form: "single",
56306
+ optional: false
56307
+ }],
56033
56308
  "petFeeder.callPet": [{
56034
56309
  name: "deviceId",
56035
56310
  form: "single",
@@ -56250,6 +56525,11 @@ Object.freeze({
56250
56525
  form: "array",
56251
56526
  optional: false
56252
56527
  }],
56528
+ "pipelineAnalytics.listRetrainCorpusPage": [{
56529
+ name: "deviceIds",
56530
+ form: "array",
56531
+ optional: true
56532
+ }],
56253
56533
  "pipelineAnalytics.listRetrainStaging": [{
56254
56534
  name: "deviceIds",
56255
56535
  form: "array",
@@ -57359,6 +57639,7 @@ Object.freeze({
57359
57639
  });
57360
57640
  Object.freeze({
57361
57641
  "broker": "broker",
57642
+ "calendar-source": "calendar",
57362
57643
  "device-export": "device-export",
57363
57644
  "llm": "ai",
57364
57645
  "mesh-network": "mesh",
@@ -57844,6 +58125,8 @@ var STATE_SUMMARY_VARS = [
57844
58125
  [...RULE_TEXT],
57845
58126
  [...RULE_TEXT],
57846
58127
  [...RULE_TEXT],
58128
+ [...RULE_TEXT],
58129
+ [...RULE_TEXT],
57847
58130
  ([...RULE_TEXT], [...UPDATES]),
57848
58131
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),
57849
58132
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),