@camstack/addon-terminal 0.1.130 → 0.1.131

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 +413 -138
  2. package/dist/addon.mjs +413 -138
  3. package/package.json +1 -1
package/dist/addon.mjs CHANGED
@@ -5386,7 +5386,7 @@ var ZodIssueCode = {
5386
5386
  var ZodFirstPartyTypeKind;
5387
5387
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5388
5388
  //#endregion
5389
- //#region ../types/dist/sleep-r3RWkGVx.mjs
5389
+ //#region ../types/dist/sleep-DwAQ9sqX.mjs
5390
5390
  /**
5391
5391
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5392
5392
  * window to float samples (D455).
@@ -9451,6 +9451,16 @@ var CompositionSchema = object({
9451
9451
  seen.add(feature.cap);
9452
9452
  });
9453
9453
  });
9454
+ var NodeColorIdSchema = _enum([
9455
+ "node-a",
9456
+ "node-b",
9457
+ "node-c",
9458
+ "node-d",
9459
+ "node-e",
9460
+ "node-f",
9461
+ "node-g",
9462
+ "node-h"
9463
+ ]);
9454
9464
  new Set([
9455
9465
  "track",
9456
9466
  "face",
@@ -18431,14 +18441,14 @@ var LlmProfileSchema = object({
18431
18441
  /** ConfigUISchema tree passed through untyped on the wire (the
18432
18442
  * notification-output `ConfigSchemaPassthrough` precedent at
18433
18443
  * notification-output.cap.ts:151); the exported TS type re-tightens it. */
18434
- var ConfigSchemaPassthrough$1 = unknown();
18444
+ var ConfigSchemaPassthrough$3 = unknown();
18435
18445
  var LlmProfileKindDescriptorSchema = object({
18436
18446
  kind: LlmProfileKindSchema,
18437
18447
  label: string(),
18438
18448
  icon: string(),
18439
18449
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
18440
18450
  addonId: string(),
18441
- configSchema: ConfigSchemaPassthrough$1
18451
+ configSchema: ConfigSchemaPassthrough$3
18442
18452
  });
18443
18453
  var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
18444
18454
  var LlmDefaultSchema = object({
@@ -19559,7 +19569,7 @@ var TargetKindCapsSchema = object({
19559
19569
  * the union is large and not meant for runtime validation here; the exported
19560
19570
  * `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
19561
19571
  */
19562
- var ConfigSchemaPassthrough = unknown();
19572
+ var ConfigSchemaPassthrough$2 = unknown();
19563
19573
  var TargetKindSchema = object({
19564
19574
  kind: string(),
19565
19575
  label: string(),
@@ -19596,7 +19606,7 @@ var TargetKindSchema = object({
19596
19606
  * its raster path, which is the safe default for an unknown image.
19597
19607
  */
19598
19608
  iconMediaType: string().optional(),
19599
- configSchema: ConfigSchemaPassthrough,
19609
+ configSchema: ConfigSchemaPassthrough$2,
19600
19610
  /**
19601
19611
  * The config keys that decide WHERE this kind's secrets are sent (server,
19602
19612
  * base URL, instance, chat, recipient). A save that changes any of them
@@ -22933,6 +22943,61 @@ var OauthIntegrationDescriptorSchema = object({
22933
22943
  });
22934
22944
  method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" });
22935
22945
  /**
22946
+ * `oidc-connections` — CRUD for IdP rows under `auth-oidc` (D828 sibling).
22947
+ *
22948
+ * One hub-only singleton (`auth-oidc`). The Settings UI is a DataTable +
22949
+ * ItemFormDialog; there is no `editable-array` in `globalSettingsSchema`.
22950
+ * Operator-chosen `id` is the URL slug (`/addon/auth-oidc/<id>/…`) and is
22951
+ * immutable after create.
22952
+ */
22953
+ var ConfigSchemaPassthrough$1 = unknown();
22954
+ var OidcConnectionSchema = object({
22955
+ id: string().min(1),
22956
+ displayName: string(),
22957
+ icon: string(),
22958
+ issuerUrl: string(),
22959
+ clientId: string(),
22960
+ /** Client id + secret present — never the secret value. */
22961
+ configured: boolean(),
22962
+ /**
22963
+ * Values for the connection form schema. `clientSecret` is a keychain
22964
+ * {@link SecretFieldView} or `null` / `''`, never plaintext (D789).
22965
+ */
22966
+ formValues: record(string(), unknown()).optional()
22967
+ });
22968
+ /**
22969
+ * Patch one connection. Omitted or empty `clientSecret` keeps the stored
22970
+ * secret (D787). `{ $secretClear: true }` clears it. `id` is never renamed.
22971
+ */
22972
+ var OidcConnectionUpdateInputSchema = object({
22973
+ id: string().min(1),
22974
+ displayName: string().min(1),
22975
+ icon: string().optional(),
22976
+ issuerUrl: string().optional(),
22977
+ clientId: string().optional(),
22978
+ clientSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
22979
+ redirectUri: string().optional(),
22980
+ scopes: string().optional(),
22981
+ usernameClaim: _enum([
22982
+ "preferred_username",
22983
+ "email",
22984
+ "sub"
22985
+ ]).optional()
22986
+ });
22987
+ method(object({}), ConfigSchemaPassthrough$1, { auth: "admin" }), method(object({}), array(OidcConnectionSchema).readonly(), { auth: "admin" }), method(object({
22988
+ id: string().min(1).regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "id must be a lowercase slug"),
22989
+ displayName: string().min(1)
22990
+ }), object({ id: string() }), {
22991
+ kind: "mutation",
22992
+ auth: "admin"
22993
+ }), method(OidcConnectionUpdateInputSchema, object({ ok: literal(true) }), {
22994
+ kind: "mutation",
22995
+ auth: "admin"
22996
+ }), method(object({ id: string().min(1) }), object({ ok: literal(true) }), {
22997
+ kind: "mutation",
22998
+ auth: "admin"
22999
+ });
23000
+ /**
22936
23001
  * What started a camera's onboard motion (D672). `camera` is the camera's own
22937
23002
  * firmware; `sensor` is a device the operator ATTACHED to it. Absent on the
22938
23003
  * wire means the camera: only the camera-sensors bridge ever says `sensor`.
@@ -24289,24 +24354,69 @@ var RetrainFrameListSchema = object({
24289
24354
  /** What the page pre-selects — the native key frame when one survives. */
24290
24355
  autoPickMediaId: number().int().optional()
24291
24356
  });
24357
+ /** Exclusive partition of a corpus copy's annotation progress (design §4.2). */
24358
+ var RetrainFrameWorkStateSchema = _enum([
24359
+ "unannotated",
24360
+ "annotated",
24361
+ "complete"
24362
+ ]);
24363
+ /**
24364
+ * Filters for paginated corpus list, KPI, and matching export (design §4.4).
24365
+ * Every narrowing field is ANDed; omitted fields impose no constraint.
24366
+ */
24367
+ var RetrainCorpusFilterSchema = object({
24368
+ workState: RetrainFrameWorkStateSchema.optional(),
24369
+ deviceIds: array(number()).max(500).optional(),
24370
+ /** When set, only frames in this named collection. */
24371
+ collectionId: string().optional(),
24372
+ /** Frames that carry at least one saved annotation in one of these classes. */
24373
+ classes: array(RetrainMacroClassSchema).optional(),
24374
+ page: number().int().positive().default(1),
24375
+ pageSize: number().int().positive().max(100).default(50)
24376
+ });
24377
+ var RetrainCorpusPageSchema = object({
24378
+ frames: array(RetrainFrameSchema.extend({ workState: RetrainFrameWorkStateSchema })).readonly(),
24379
+ total: number().int().nonnegative(),
24380
+ page: number().int().positive(),
24381
+ pageSize: number().int().positive()
24382
+ });
24383
+ var RetrainCorpusKpiCameraRowSchema = object({
24384
+ deviceId: number(),
24385
+ unannotated: number().int().nonnegative(),
24386
+ annotated: number().int().nonnegative(),
24387
+ complete: number().int().nonnegative(),
24388
+ /** This camera's `complete` count divided by corpus `total`, in `[0,1]`.
24389
+ * `null` when the corpus is empty (no ratio). */
24390
+ pctOfCorpus: number().min(0).max(1).nullable()
24391
+ });
24392
+ var RetrainCorpusKpiSchema = object({
24393
+ total: number().int().nonnegative(),
24394
+ unannotated: number().int().nonnegative(),
24395
+ annotated: number().int().nonnegative(),
24396
+ complete: number().int().nonnegative(),
24397
+ cameras: array(RetrainCorpusKpiCameraRowSchema).readonly()
24398
+ });
24292
24399
  /**
24293
24400
  * Which frames an annotated export carries. Every field narrows; an empty
24294
- * filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
24295
- * list owned by whoever trains (the training orchestrator), so `frameIds` is
24296
- * the primitive a version export uses; `batchId` re-selects what an earlier
24297
- * export carried (`exportedInBatch`).
24401
+ * filter is every annotated copy. `frameIds` is the primitive a job or
24402
+ * download uses; `batchId` re-selects what an earlier export carried
24403
+ * (`exportedInBatch`). Frozen dataset versions were removed — live selection
24404
+ * resolves to `frameIds` at plan/start.
24298
24405
  */
24299
24406
  var RetrainExportFilterSchema = object({
24300
24407
  deviceIds: array(number()).optional(),
24301
24408
  frameIds: array(string()).max(2e4).optional(),
24302
24409
  /** Only frames in at least one of these named collections. */
24303
24410
  collectionIds: array(string()).max(200).optional(),
24304
- /** Exactly the frames of this dataset version (and its completeOnly). An
24305
- * unknown id selects nothing. */
24306
- datasetVersionId: string().optional(),
24411
+ /** Single collection (Frames filter bar). ANDed with `collectionIds` when both set. */
24412
+ collectionId: string().optional(),
24307
24413
  batchId: string().optional(),
24308
24414
  /** Only frames the operator marked complete (all subjects boxed). */
24309
- completeOnly: boolean().optional()
24415
+ completeOnly: boolean().optional(),
24416
+ /** Exclusive work-state partition (`workStateOf`); same as the corpus list. */
24417
+ workState: RetrainFrameWorkStateSchema.optional(),
24418
+ /** Frames with at least one saved annotation in one of these classes. */
24419
+ classes: array(RetrainMacroClassSchema).optional()
24310
24420
  });
24311
24421
  /**
24312
24422
  * `frames`: the full frame copies, boxes in `annotations.json`.
@@ -24506,8 +24616,7 @@ var RetrainDatasetStatsSchema = object({
24506
24616
  completeFrames: number().int()
24507
24617
  })).readonly()
24508
24618
  });
24509
- /** An immutable dataset version, without its frame list. */
24510
- var RetrainDatasetVersionSchema = object({
24619
+ object({
24511
24620
  id: string(),
24512
24621
  name: string(),
24513
24622
  createdAt: number(),
@@ -24515,22 +24624,33 @@ var RetrainDatasetVersionSchema = object({
24515
24624
  layout: RetrainExportLayoutSchema,
24516
24625
  completeOnly: boolean(),
24517
24626
  frameCount: number().int(),
24518
- /** sha256 of what the frames taught when the version was frozen. */
24519
24627
  annotationHash: string(),
24520
- /** The export manifest schema the version was cut under. */
24521
24628
  manifestSchema: string(),
24522
24629
  stats: RetrainDatasetStatsSchema
24523
24630
  });
24524
- var CreateRetrainDatasetVersionResultSchema = discriminatedUnion("kind", [object({
24525
- kind: literal("created"),
24526
- version: RetrainDatasetVersionSchema
24631
+ /**
24632
+ * Live training corpus criteria — same shape as `TrainingCorpusSelection` on
24633
+ * the training cap. Resolved here so plan/start and the annotated export share
24634
+ * one definition of "the frames" (`buildRetrainExportPlan`).
24635
+ */
24636
+ var RetrainTrainingCorpusSelectionSchema = object({
24637
+ collectionIds: array(string()).min(1),
24638
+ workState: _enum([
24639
+ "complete",
24640
+ "annotated_or_complete",
24641
+ "any_annotated"
24642
+ ]).default("complete")
24643
+ });
24644
+ var RetrainTrainingCorpusResolveResultSchema = discriminatedUnion("kind", [object({
24645
+ kind: literal("resolved"),
24646
+ frameIds: array(string()).max(2e4).readonly(),
24647
+ stats: RetrainDatasetStatsSchema,
24648
+ annotationHash: string(),
24649
+ layout: RetrainExportLayoutSchema
24527
24650
  }), object({
24528
24651
  kind: literal("refused"),
24529
- reason: _enum([
24530
- "empty-name",
24531
- "duplicate-name",
24532
- "no-frames"
24533
- ])
24652
+ reason: _enum(["unknown-collection", "no-frames"]),
24653
+ detail: string()
24534
24654
  })]);
24535
24655
  /** The outcome of a lifecycle move owned by the retrain page. */
24536
24656
  var RetrainTransitionResultSchema = object({
@@ -25237,6 +25357,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25237
25357
  }), array(RetrainTrackSchema).readonly(), {
25238
25358
  kind: "query",
25239
25359
  auth: "admin"
25360
+ }), method(RetrainCorpusFilterSchema, RetrainCorpusPageSchema, {
25361
+ kind: "query",
25362
+ auth: "admin"
25363
+ }), method(object({}), RetrainCorpusKpiSchema, {
25364
+ kind: "query",
25365
+ auth: "admin"
25240
25366
  }), method(object({ trackId: string() }), RetrainFrameListSchema, {
25241
25367
  kind: "query",
25242
25368
  auth: "admin"
@@ -25332,36 +25458,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25332
25458
  kind: "mutation",
25333
25459
  auth: "admin",
25334
25460
  timeoutMs: 12e4
25335
- }), method(object({
25336
- selection: RetrainDatasetSelectionSchema,
25337
- completeOnly: boolean().optional()
25338
- }), RetrainDatasetStatsSchema, {
25339
- kind: "query",
25340
- auth: "admin"
25341
- }), method(object({
25342
- name: string().max(120),
25343
- selection: RetrainDatasetSelectionSchema,
25344
- layout: RetrainExportLayoutSchema,
25345
- completeOnly: boolean()
25346
- }), CreateRetrainDatasetVersionResultSchema, {
25347
- kind: "mutation",
25348
- auth: "admin",
25349
- timeoutMs: 12e4
25350
- }), method(object({}), array(RetrainDatasetVersionSchema).readonly(), {
25351
- kind: "query",
25352
- auth: "admin"
25353
- }), method(object({ id: string() }), object({ deleted: boolean() }), {
25354
- kind: "mutation",
25355
- auth: "admin"
25356
- }), method(object({ id: string() }), object({
25357
- found: boolean(),
25358
- annotationHash: string(),
25359
- matches: boolean(),
25360
- missingFrames: number().int()
25361
- }), {
25362
- kind: "query",
25363
- auth: "admin",
25364
- timeoutMs: 12e4
25365
25461
  }), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
25366
25462
  kind: "query",
25367
25463
  auth: "admin"
@@ -25388,6 +25484,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25388
25484
  }), method(object({}), array(RetrainCollectionSchema).readonly(), {
25389
25485
  kind: "query",
25390
25486
  auth: "admin"
25487
+ }), method(RetrainTrainingCorpusSelectionSchema, RetrainTrainingCorpusResolveResultSchema, {
25488
+ kind: "query",
25489
+ auth: "admin",
25490
+ timeoutMs: 6e4
25391
25491
  }), method(object({
25392
25492
  id: string(),
25393
25493
  name: string().max(120)
@@ -26004,11 +26104,14 @@ var HardwareClassIdSchema = _enum([
26004
26104
  "intel-n-series",
26005
26105
  "apple-m-base",
26006
26106
  "apple-m-pro",
26107
+ "amd-phoenix",
26007
26108
  "unknown"
26008
26109
  ]);
26009
26110
  var AcceleratorKindSchema = _enum([
26010
26111
  "intel-npu",
26011
26112
  "intel-igpu",
26113
+ "amd-igpu",
26114
+ "amd-npu",
26012
26115
  "x86-cpu",
26013
26116
  "arm-cpu",
26014
26117
  "apple-ane",
@@ -27938,6 +28041,8 @@ var AgentPipelineSettingsSchema = object({
27938
28041
  * address is wrong (multi-homed host, NAT, custom interface).
27939
28042
  */
27940
28043
  reachableHost: string().optional(),
28044
+ /** Hub-persisted UI colour (`--color-node-*` theme tokens). */
28045
+ color: NodeColorIdSchema.optional(),
27941
28046
  /**
27942
28047
  * Multi-device inference opt-in (Phase 4). Per-node map deviceKey → {enabled,
27943
28048
  * weight, steps}. Absent / all-disabled ⇒ the node's single default
@@ -28487,8 +28592,9 @@ method(object({
28487
28592
  auth: "admin"
28488
28593
  }), method(object({
28489
28594
  agentNodeId: string(),
28490
- reachableHost: string().nullable()
28491
- }), object({ success: literal(true) }), {
28595
+ reachableHost: string().nullable().optional(),
28596
+ color: NodeColorIdSchema.nullable().optional()
28597
+ }).refine((v) => v.reachableHost !== void 0 || v.color !== void 0, { message: "reachableHost or color required" }), object({ success: literal(true) }), {
28492
28598
  kind: "mutation",
28493
28599
  auth: "admin"
28494
28600
  }), method(object({
@@ -31712,7 +31818,7 @@ var CustomActionInputSchema = object({
31712
31818
  action: string().min(1),
31713
31819
  input: unknown()
31714
31820
  });
31715
- method(_void(), array(AddonListItemSchema).readonly()), method(object({
31821
+ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSchema).readonly()), method(object({
31716
31822
  addonId: string(),
31717
31823
  limit: number().min(1).max(500).default(100),
31718
31824
  level: LogLevelSchema$2.optional()
@@ -37193,6 +37299,7 @@ var OsdNamedTemplateSchema = object({
37193
37299
  });
37194
37300
  /** Where a slot's value comes from. */
37195
37301
  var OsdSourceSchema = discriminatedUnion("kind", [
37302
+ object({ kind: literal("none") }),
37196
37303
  object({
37197
37304
  kind: literal("static"),
37198
37305
  text: string().max(64)
@@ -37319,6 +37426,13 @@ method(object({ deviceId: number().int() }), object({
37319
37426
  }), object({ success: literal(true) }), {
37320
37427
  kind: "mutation",
37321
37428
  auth: "admin"
37429
+ }), method(object({
37430
+ deviceId: number().int(),
37431
+ slotId: string().min(1),
37432
+ enabled: boolean()
37433
+ }), object({ success: literal(true) }), {
37434
+ kind: "mutation",
37435
+ auth: "admin"
37322
37436
  }), method(object({
37323
37437
  sourceDeviceId: number().int(),
37324
37438
  targetDeviceId: number().int()
@@ -37750,7 +37864,15 @@ var GpuInfoSchema = object({
37750
37864
  name: string(),
37751
37865
  memoryMB: number().optional()
37752
37866
  });
37753
- var NpuInfoSchema = object({ type: _enum(["apple-ane", "intel-npu"]) });
37867
+ var NpuInfoSchema = object({
37868
+ type: _enum([
37869
+ "apple-ane",
37870
+ "intel-npu",
37871
+ "amd-xdna"
37872
+ ]),
37873
+ name: string().optional(),
37874
+ generation: _enum(["xdna1", "xdna2"]).optional()
37875
+ });
37754
37876
  var CoralInfoSchema = object({
37755
37877
  type: literal("coral-edgetpu"),
37756
37878
  bus: string().optional()
@@ -42493,9 +42615,11 @@ var zoneRulesCapability = {
42493
42615
  * once is what makes a second provider (RunPod, a local NVIDIA node) a new
42494
42616
  * manifest entry and nothing else.
42495
42617
  *
42496
- * Collection, routed by the `addonId` in every single-row input (the `llm` /
42497
- * `notification-output` posture); `describe` concat-fans across providers.
42498
- * Every method is `admin`: these spend money.
42618
+ * Collection of provider **types** (addons). Each addon owns zero or more
42619
+ * **entries** (credentials + defaults). Concat-fans: `describe`,
42620
+ * `describeTypes`, `listEntries`, `listJobs`. Single-row work is keyed by
42621
+ * `entryId`; callers also pass the owning `addonId` as the collection
42622
+ * selector (broker posture). Every method is `admin`: these spend money.
42499
42623
  *
42500
42624
  * Every cloud object a provider creates is tagged with the orchestrator's
42501
42625
  * `jobKey`, so a retried submit finds the job it already started instead of
@@ -42519,8 +42643,8 @@ var TrainingRegionOptionSchema = object({
42519
42643
  priceMultiplier: number().positive()
42520
42644
  });
42521
42645
  /**
42522
- * The provider's per-account settings, as the orchestrator reads them. They
42523
- * live in the PROVIDER addon's settings (operator decision 2026-10-08: they
42646
+ * The provider's per-entry settings, as the orchestrator reads them. They
42647
+ * live on the PROVIDER addon's entry (operator decision 2026-10-08: they
42524
42648
  * depend on the user's account), never hard-coded in the orchestrator.
42525
42649
  */
42526
42650
  var TrainingProviderDefaultsSchema = object({
@@ -42531,9 +42655,44 @@ var TrainingProviderDefaultsSchema = object({
42531
42655
  /** Hours a FAILED job's cloud dataset is kept for debugging; 0 = delete at once. */
42532
42656
  failedDatasetGraceHours: number().nonnegative()
42533
42657
  });
42658
+ /**
42659
+ * Entry form schema for a provider type — same seam as notification
42660
+ * `TargetKind.configSchema` (`z.unknown()` at the wire; callers tighten to
42661
+ * {@link ConfigUISchema}). Drives `ConfigFormBuilder` on Training → Providers.
42662
+ */
42663
+ var ConfigSchemaPassthrough = unknown();
42664
+ /** One creatable provider type, for the Add-entry dialog. */
42665
+ var TrainingProviderTypeSchema = object({
42666
+ typeId: string(),
42667
+ label: string(),
42668
+ /** Path under the addon package (e.g. `assets/training-modal/icon.svg`). */
42669
+ iconAsset: string(),
42670
+ /** Owning `training-provider` addon — collection selector for createEntry. */
42671
+ addonId: string(),
42672
+ /**
42673
+ * Fields for one entry of this type (credentials + defaults). Absent on a
42674
+ * type that only needs a name. Password fields are keychain-backed on the
42675
+ * provider addon (`secretStatePaths`), not D634 plaintext.
42676
+ */
42677
+ configSchema: ConfigSchemaPassthrough.optional()
42678
+ });
42679
+ /** One configured account / workspace under a provider type. */
42680
+ var TrainingProviderEntrySchema = object({
42681
+ entryId: string(),
42682
+ typeId: string(),
42683
+ name: string(),
42684
+ addonId: string(),
42685
+ /** Credentials are present — never the values. */
42686
+ configured: boolean()
42687
+ });
42534
42688
  var TrainingProviderDescriptorSchema = object({
42535
42689
  addonId: string(),
42536
- /** `modal`, `runpod`, `fake`, … */
42690
+ entryId: string(),
42691
+ typeId: string(),
42692
+ /** Operator-chosen entry name. */
42693
+ name: string(),
42694
+ iconAsset: string(),
42695
+ /** `modal`, `runpod`, `fake`, … — same as typeId for current providers. */
42537
42696
  kind: string(),
42538
42697
  label: string(),
42539
42698
  gpuTypes: array(TrainingGpuOptionSchema).readonly(),
@@ -42545,7 +42704,30 @@ var TrainingProviderDescriptorSchema = object({
42545
42704
  dataResidencyNote: string(),
42546
42705
  /** Credentials are present — never the values. */
42547
42706
  configured: boolean(),
42548
- defaults: TrainingProviderDefaultsSchema
42707
+ defaults: TrainingProviderDefaultsSchema,
42708
+ /**
42709
+ * Values for {@link TrainingProviderTypeSchema}'s `configSchema` — password
42710
+ * fields are keychain {@link SecretFieldView} or `null` / `''` (create),
42711
+ * never plaintext. Same hydrate contract as settings forms (D789).
42712
+ */
42713
+ formValues: record(string(), unknown()).optional()
42714
+ });
42715
+ /**
42716
+ * Patch one entry's name, credentials and defaults. Pin with owning `{ addonId }`.
42717
+ * An omitted or empty `tokenSecret` means KEEP the stored secret (D787).
42718
+ * `{ $secretClear: true }` clears it.
42719
+ */
42720
+ var TrainingProviderUpdateEntryInputSchema = object({
42721
+ entryId: string().min(1),
42722
+ name: string().min(1),
42723
+ tokenId: string().optional(),
42724
+ tokenSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
42725
+ environment: string().optional(),
42726
+ gpuType: string().optional(),
42727
+ region: string().optional(),
42728
+ costCapUsd: number().nonnegative().optional(),
42729
+ maxRuntimeSec: number().int().positive().optional(),
42730
+ failedDatasetGraceHours: number().nonnegative().optional()
42549
42731
  });
42550
42732
  var TrainingCredentialCheckSchema = object({
42551
42733
  ok: boolean(),
@@ -42597,20 +42779,33 @@ var TrainerSourceRefSchema = object({
42597
42779
  /** A commit sha (never a branch) — the job must be reproducible. */
42598
42780
  revision: string().regex(/^[0-9a-f]{7,64}$/)
42599
42781
  });
42782
+ /** Cloud job identity — route with the owning addon's `addonId` selector. */
42600
42783
  var JobRef = {
42601
- addonId: string(),
42784
+ entryId: string().min(1),
42602
42785
  jobKey: string().uuid()
42603
42786
  };
42604
42787
  var TrainingLogLineSchema = object({
42605
42788
  ts: number(),
42606
42789
  text: string()
42607
42790
  });
42608
- method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({ addonId: string() }), TrainingCredentialCheckSchema, {
42791
+ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderTypeSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderEntrySchema).readonly(), { auth: "admin" }), method(object({
42792
+ typeId: string().min(1),
42793
+ name: string().min(1)
42794
+ }), object({ entryId: string() }), {
42795
+ kind: "mutation",
42796
+ auth: "admin"
42797
+ }), method(object({ entryId: string().min(1) }), object({ ok: literal(true) }), {
42798
+ kind: "mutation",
42799
+ auth: "admin"
42800
+ }), method(TrainingProviderUpdateEntryInputSchema, object({ ok: literal(true) }), {
42801
+ kind: "mutation",
42802
+ auth: "admin"
42803
+ }), method(object({ entryId: string().min(1) }), TrainingCredentialCheckSchema, {
42609
42804
  kind: "mutation",
42610
42805
  auth: "admin",
42611
42806
  timeoutMs: 3e4
42612
42807
  }), method(object({
42613
- addonId: string(),
42808
+ entryId: string().min(1),
42614
42809
  gpuType: string(),
42615
42810
  region: string(),
42616
42811
  datasetBytes: number().int().nonnegative(),
@@ -42676,7 +42871,7 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
42676
42871
  kind: "mutation",
42677
42872
  auth: "admin",
42678
42873
  timeoutMs: 5 * 6e4
42679
- }), method(object({ addonId: string() }), array(ProviderJobStatusSchema).readonly(), {
42874
+ }), method(object({ entryId: string().min(1).optional() }), array(ProviderJobStatusSchema).readonly(), {
42680
42875
  auth: "admin",
42681
42876
  timeoutMs: 2 * 6e4
42682
42877
  });
@@ -42686,20 +42881,31 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
42686
42881
  *
42687
42882
  * It owns what every provider must agree on, written once:
42688
42883
  *
42689
- * - **Dataset versions.** Taken over from pipeline-analytics (D796): the rows
42690
- * live here (D808); pipeline-analytics still CUTS a version (it owns the corpus and
42691
- * the export plan) and reaches this store through the five row methods
42692
- * below, so the Retrain page and the export did not change.
42693
42884
  * - **Jobs.** A persisted state machine, a reconcile loop against the
42694
42885
  * provider, a cost guard, a daily orphan sweep and the retention rules.
42695
42886
  * - **The return flow.** Verified artefacts → Model Studio
42696
42887
  * (`custom-model-registry.importModelBundle`) → canary on cameras →
42697
42888
  * rollback. Nothing is ever registered automatically.
42698
42889
  *
42890
+ * Plan/start takes a live {@link TrainingCorpusSelection} (collections +
42891
+ * work-state rule); frame ids are resolved via pipeline-analytics at that
42892
+ * moment and snapshotted on the job. No frozen dataset version.
42893
+ *
42699
42894
  * Every method is `admin`.
42700
42895
  */
42701
- /** A version WITH its frame list — what the export and a job read. */
42702
- var TrainingDatasetVersionRowSchema = RetrainDatasetVersionSchema.omit({ frameCount: true }).extend({ frameIds: array(string()).max(2e4).readonly() });
42896
+ /**
42897
+ * Live corpus criteria for plan/start (design §5.2). Default is complete-only.
42898
+ * Frame ids are resolved at plan/start — never a frozen version id.
42899
+ */
42900
+ var TrainingCorpusSelectionSchema = object({
42901
+ collectionIds: array(string()).min(1),
42902
+ /** Default complete-only for v1 */
42903
+ workState: _enum([
42904
+ "complete",
42905
+ "annotated_or_complete",
42906
+ "any_annotated"
42907
+ ]).default("complete")
42908
+ });
42703
42909
  /** A base model a detector job can fine-tune, and the baseline it is judged against. */
42704
42910
  var TrainingBaseModelSchema = object({
42705
42911
  modelId: string(),
@@ -42717,9 +42923,13 @@ var TrainingPresetSchema = _enum([
42717
42923
  "thorough"
42718
42924
  ]);
42719
42925
  var TrainingJobRequestSchema = object({
42720
- datasetVersionId: string().min(1),
42721
- /** The `training-provider` addon that runs it. */
42722
- addonId: string().min(1),
42926
+ /** Live collection + work-state criteria; resolved at plan/start. */
42927
+ selection: TrainingCorpusSelectionSchema,
42928
+ /**
42929
+ * The provider **entry** that runs it (credentials + defaults).
42930
+ * Resolve to an owning addon via `training-provider.describe` / `listEntries`.
42931
+ */
42932
+ entryId: string().min(1),
42723
42933
  gpuType: string().min(1),
42724
42934
  region: string(),
42725
42935
  baseModelId: string().min(1),
@@ -42778,6 +42988,7 @@ var TrainingJobPlanSchema = object({
42778
42988
  * result lives after the operator acted on it.
42779
42989
  */
42780
42990
  var TrainingJobStateSchema = _enum([
42991
+ "queued",
42781
42992
  "uploading",
42782
42993
  "submitted",
42783
42994
  "starting",
@@ -42831,6 +43042,11 @@ var TrainingJobSchema = object({
42831
43042
  createdAt: number(),
42832
43043
  updatedAt: number(),
42833
43044
  state: TrainingJobStateSchema,
43045
+ /**
43046
+ * Shared by every job enqueued together via `startJobBatch`.
43047
+ * `null` for a lone `startJob`. The engine advances queued siblings by this id.
43048
+ */
43049
+ batchId: string().nullable().default(null),
42834
43050
  stage: TrainingStageSchema.nullable(),
42835
43051
  failure: object({
42836
43052
  reason: TrainingFailureReasonSchema,
@@ -42842,6 +43058,12 @@ var TrainingJobSchema = object({
42842
43058
  maxRuntimeSec: number().int().positive(),
42843
43059
  trainer: TrainerSourceRefSchema,
42844
43060
  datasetLayout: RetrainExportLayoutSchema,
43061
+ /** Frame count snapshotted when the job started (audit; equals `frameIds.length`). */
43062
+ frameCount: number().int().nonnegative(),
43063
+ /** Resolved frame ids at start — the archive ships exactly these. */
43064
+ frameIds: array(string()).max(2e4).readonly(),
43065
+ /** Hash of what those frames taught at start (trainer `dataset.annotationHash`). */
43066
+ annotationHash: string(),
42845
43067
  dataset: object({
42846
43068
  bytes: number().int(),
42847
43069
  sha256: string(),
@@ -42883,13 +43105,7 @@ var TrainingJobSchema = object({
42883
43105
  canary: TrainingCanarySchema.nullable()
42884
43106
  });
42885
43107
  var IdInput = object({ id: string().min(1) });
42886
- method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
42887
- kind: "mutation",
42888
- auth: "admin"
42889
- }), 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() }), {
42890
- kind: "mutation",
42891
- auth: "admin"
42892
- }), method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
43108
+ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
42893
43109
  auth: "admin",
42894
43110
  timeoutMs: 6e4
42895
43111
  }), method(TrainingJobRequestSchema.extend({
@@ -42908,6 +43124,24 @@ method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
42908
43124
  kind: "mutation",
42909
43125
  auth: "admin",
42910
43126
  timeoutMs: 12e4
43127
+ }), method(TrainingJobRequestSchema.omit({ baseModelId: true }).extend({
43128
+ baseModelIds: array(string().min(1)).min(1),
43129
+ name: string().min(1).max(120),
43130
+ maxCostUsd: number().positive(),
43131
+ maxRuntimeSec: number().int().positive(),
43132
+ idempotencyKey: string().min(8).max(80)
43133
+ }), discriminatedUnion("kind", [object({
43134
+ kind: literal("started"),
43135
+ batchId: string(),
43136
+ jobs: array(TrainingJobSchema).min(1).readonly()
43137
+ }), object({
43138
+ kind: literal("refused"),
43139
+ reason: TrainingRefusalReasonSchema,
43140
+ detail: string()
43141
+ })]), {
43142
+ kind: "mutation",
43143
+ auth: "admin",
43144
+ timeoutMs: 12e4
42911
43145
  }), method(object({}), array(TrainingJobSchema).readonly(), { auth: "admin" }), method(IdInput, TrainingJobSchema.nullable(), { auth: "admin" }), method(IdInput, TrainingJobSchema, {
42912
43146
  kind: "mutation",
42913
43147
  auth: "admin",
@@ -47989,6 +48223,36 @@ Object.freeze({
47989
48223
  addonId: null,
47990
48224
  access: "view"
47991
48225
  },
48226
+ "oidcConnections.connectionFormSchema": {
48227
+ capName: "oidc-connections",
48228
+ capScope: "system",
48229
+ addonId: null,
48230
+ access: "view"
48231
+ },
48232
+ "oidcConnections.createConnection": {
48233
+ capName: "oidc-connections",
48234
+ capScope: "system",
48235
+ addonId: null,
48236
+ access: "create"
48237
+ },
48238
+ "oidcConnections.deleteConnection": {
48239
+ capName: "oidc-connections",
48240
+ capScope: "system",
48241
+ addonId: null,
48242
+ access: "delete"
48243
+ },
48244
+ "oidcConnections.listConnections": {
48245
+ capName: "oidc-connections",
48246
+ capScope: "system",
48247
+ addonId: null,
48248
+ access: "view"
48249
+ },
48250
+ "oidcConnections.updateConnection": {
48251
+ capName: "oidc-connections",
48252
+ capScope: "system",
48253
+ addonId: null,
48254
+ access: "create"
48255
+ },
47992
48256
  "osd.getStatus": {
47993
48257
  capName: "osd",
47994
48258
  capScope: "device",
@@ -48061,6 +48325,12 @@ Object.freeze({
48061
48325
  addonId: null,
48062
48326
  access: "create"
48063
48327
  },
48328
+ "osdManager.setSlotCameraEnabled": {
48329
+ capName: "osd-manager",
48330
+ capScope: "system",
48331
+ addonId: null,
48332
+ access: "create"
48333
+ },
48064
48334
  "osdManager.upsertTemplate": {
48065
48335
  capName: "osd-manager",
48066
48336
  capScope: "system",
@@ -48199,12 +48469,6 @@ Object.freeze({
48199
48469
  addonId: null,
48200
48470
  access: "create"
48201
48471
  },
48202
- "pipelineAnalytics.createRetrainDatasetVersion": {
48203
- capName: "pipeline-analytics",
48204
- capScope: "device",
48205
- addonId: null,
48206
- access: "create"
48207
- },
48208
48472
  "pipelineAnalytics.deleteDeviceEvents": {
48209
48473
  capName: "pipeline-analytics",
48210
48474
  capScope: "device",
@@ -48217,12 +48481,6 @@ Object.freeze({
48217
48481
  addonId: null,
48218
48482
  access: "delete"
48219
48483
  },
48220
- "pipelineAnalytics.deleteRetrainDatasetVersion": {
48221
- capName: "pipeline-analytics",
48222
- capScope: "device",
48223
- addonId: null,
48224
- access: "delete"
48225
- },
48226
48484
  "pipelineAnalytics.deleteTracks": {
48227
48485
  capName: "pipeline-analytics",
48228
48486
  capScope: "device",
@@ -48325,6 +48583,12 @@ Object.freeze({
48325
48583
  addonId: null,
48326
48584
  access: "view"
48327
48585
  },
48586
+ "pipelineAnalytics.getRetrainCorpusKpi": {
48587
+ capName: "pipeline-analytics",
48588
+ capScope: "device",
48589
+ addonId: null,
48590
+ access: "view"
48591
+ },
48328
48592
  "pipelineAnalytics.getRetrainExportUrl": {
48329
48593
  capName: "pipeline-analytics",
48330
48594
  capScope: "device",
@@ -48445,7 +48709,7 @@ Object.freeze({
48445
48709
  addonId: null,
48446
48710
  access: "view"
48447
48711
  },
48448
- "pipelineAnalytics.listRetrainDatasetVersions": {
48712
+ "pipelineAnalytics.listRetrainCorpusPage": {
48449
48713
  capName: "pipeline-analytics",
48450
48714
  capScope: "device",
48451
48715
  addonId: null,
@@ -48499,12 +48763,6 @@ Object.freeze({
48499
48763
  addonId: null,
48500
48764
  access: "create"
48501
48765
  },
48502
- "pipelineAnalytics.previewRetrainDataset": {
48503
- capName: "pipeline-analytics",
48504
- capScope: "device",
48505
- addonId: null,
48506
- access: "view"
48507
- },
48508
48766
  "pipelineAnalytics.proposeRetrainAnnotations": {
48509
48767
  capName: "pipeline-analytics",
48510
48768
  capScope: "device",
@@ -48583,6 +48841,12 @@ Object.freeze({
48583
48841
  addonId: null,
48584
48842
  access: "create"
48585
48843
  },
48844
+ "pipelineAnalytics.resolveRetrainTrainingCorpus": {
48845
+ capName: "pipeline-analytics",
48846
+ capScope: "device",
48847
+ addonId: null,
48848
+ access: "view"
48849
+ },
48586
48850
  "pipelineAnalytics.restageRetrainTrack": {
48587
48851
  capName: "pipeline-analytics",
48588
48852
  capScope: "device",
@@ -48643,12 +48907,6 @@ Object.freeze({
48643
48907
  addonId: null,
48644
48908
  access: "create"
48645
48909
  },
48646
- "pipelineAnalytics.verifyRetrainDatasetVersion": {
48647
- capName: "pipeline-analytics",
48648
- capScope: "device",
48649
- addonId: null,
48650
- access: "view"
48651
- },
48652
48910
  "pipelineAnalytics.wipeAllAnalytics": {
48653
48911
  capName: "pipeline-analytics",
48654
48912
  capScope: "device",
@@ -51043,18 +51301,6 @@ Object.freeze({
51043
51301
  addonId: null,
51044
51302
  access: "create"
51045
51303
  },
51046
- "training.findDatasetVersionIdByName": {
51047
- capName: "training",
51048
- capScope: "system",
51049
- addonId: null,
51050
- access: "view"
51051
- },
51052
- "training.getDatasetVersion": {
51053
- capName: "training",
51054
- capScope: "system",
51055
- addonId: null,
51056
- access: "view"
51057
- },
51058
51304
  "training.getJob": {
51059
51305
  capName: "training",
51060
51306
  capScope: "system",
@@ -51073,12 +51319,6 @@ Object.freeze({
51073
51319
  addonId: null,
51074
51320
  access: "view"
51075
51321
  },
51076
- "training.listDatasetVersions": {
51077
- capName: "training",
51078
- capScope: "system",
51079
- addonId: null,
51080
- access: "view"
51081
- },
51082
51322
  "training.listJobs": {
51083
51323
  capName: "training",
51084
51324
  capScope: "system",
@@ -51091,54 +51331,66 @@ Object.freeze({
51091
51331
  addonId: null,
51092
51332
  access: "view"
51093
51333
  },
51094
- "training.putDatasetVersion": {
51334
+ "training.registerResult": {
51095
51335
  capName: "training",
51096
51336
  capScope: "system",
51097
51337
  addonId: null,
51098
51338
  access: "create"
51099
51339
  },
51100
- "training.registerResult": {
51340
+ "training.rollbackCanary": {
51101
51341
  capName: "training",
51102
51342
  capScope: "system",
51103
51343
  addonId: null,
51104
51344
  access: "create"
51105
51345
  },
51106
- "training.removeDatasetVersion": {
51346
+ "training.startJob": {
51107
51347
  capName: "training",
51108
51348
  capScope: "system",
51109
51349
  addonId: null,
51110
- access: "delete"
51350
+ access: "create"
51111
51351
  },
51112
- "training.rollbackCanary": {
51352
+ "training.startJobBatch": {
51113
51353
  capName: "training",
51114
51354
  capScope: "system",
51115
51355
  addonId: null,
51116
51356
  access: "create"
51117
51357
  },
51118
- "training.startJob": {
51119
- capName: "training",
51358
+ "trainingProvider.cancelJob": {
51359
+ capName: "training-provider",
51120
51360
  capScope: "system",
51121
51361
  addonId: null,
51122
51362
  access: "create"
51123
51363
  },
51124
- "trainingProvider.cancelJob": {
51364
+ "trainingProvider.cleanupJob": {
51125
51365
  capName: "training-provider",
51126
51366
  capScope: "system",
51127
51367
  addonId: null,
51128
51368
  access: "create"
51129
51369
  },
51130
- "trainingProvider.cleanupJob": {
51370
+ "trainingProvider.createEntry": {
51131
51371
  capName: "training-provider",
51132
51372
  capScope: "system",
51133
51373
  addonId: null,
51134
51374
  access: "create"
51135
51375
  },
51376
+ "trainingProvider.deleteEntry": {
51377
+ capName: "training-provider",
51378
+ capScope: "system",
51379
+ addonId: null,
51380
+ access: "delete"
51381
+ },
51136
51382
  "trainingProvider.describe": {
51137
51383
  capName: "training-provider",
51138
51384
  capScope: "system",
51139
51385
  addonId: null,
51140
51386
  access: "view"
51141
51387
  },
51388
+ "trainingProvider.describeTypes": {
51389
+ capName: "training-provider",
51390
+ capScope: "system",
51391
+ addonId: null,
51392
+ access: "view"
51393
+ },
51142
51394
  "trainingProvider.estimateJob": {
51143
51395
  capName: "training-provider",
51144
51396
  capScope: "system",
@@ -51151,6 +51403,12 @@ Object.freeze({
51151
51403
  addonId: null,
51152
51404
  access: "view"
51153
51405
  },
51406
+ "trainingProvider.listEntries": {
51407
+ capName: "training-provider",
51408
+ capScope: "system",
51409
+ addonId: null,
51410
+ access: "view"
51411
+ },
51154
51412
  "trainingProvider.listJobEvents": {
51155
51413
  capName: "training-provider",
51156
51414
  capScope: "system",
@@ -51181,6 +51439,12 @@ Object.freeze({
51181
51439
  addonId: null,
51182
51440
  access: "create"
51183
51441
  },
51442
+ "trainingProvider.updateEntry": {
51443
+ capName: "training-provider",
51444
+ capScope: "system",
51445
+ addonId: null,
51446
+ access: "create"
51447
+ },
51184
51448
  "trainingProvider.uploadDataset": {
51185
51449
  capName: "training-provider",
51186
51450
  capScope: "system",
@@ -54387,6 +54651,11 @@ Object.freeze({
54387
54651
  form: "single",
54388
54652
  optional: false
54389
54653
  }],
54654
+ "osdManager.setSlotCameraEnabled": [{
54655
+ name: "deviceId",
54656
+ form: "single",
54657
+ optional: false
54658
+ }],
54390
54659
  "petFeeder.callPet": [{
54391
54660
  name: "deviceId",
54392
54661
  form: "single",
@@ -54607,6 +54876,11 @@ Object.freeze({
54607
54876
  form: "array",
54608
54877
  optional: false
54609
54878
  }],
54879
+ "pipelineAnalytics.listRetrainCorpusPage": [{
54880
+ name: "deviceIds",
54881
+ form: "array",
54882
+ optional: true
54883
+ }],
54610
54884
  "pipelineAnalytics.listRetrainStaging": [{
54611
54885
  name: "deviceIds",
54612
54886
  form: "array",
@@ -55716,6 +55990,7 @@ Object.freeze({
55716
55990
  });
55717
55991
  Object.freeze({
55718
55992
  "broker": "broker",
55993
+ "calendar-source": "calendar",
55719
55994
  "device-export": "device-export",
55720
55995
  "llm": "ai",
55721
55996
  "mesh-network": "mesh",