@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.js CHANGED
@@ -5409,7 +5409,7 @@ var ZodIssueCode = {
5409
5409
  var ZodFirstPartyTypeKind;
5410
5410
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5411
5411
  //#endregion
5412
- //#region ../types/dist/sleep-r3RWkGVx.mjs
5412
+ //#region ../types/dist/sleep-DwAQ9sqX.mjs
5413
5413
  /**
5414
5414
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5415
5415
  * window to float samples (D455).
@@ -9474,6 +9474,16 @@ var CompositionSchema = object({
9474
9474
  seen.add(feature.cap);
9475
9475
  });
9476
9476
  });
9477
+ var NodeColorIdSchema = _enum([
9478
+ "node-a",
9479
+ "node-b",
9480
+ "node-c",
9481
+ "node-d",
9482
+ "node-e",
9483
+ "node-f",
9484
+ "node-g",
9485
+ "node-h"
9486
+ ]);
9477
9487
  new Set([
9478
9488
  "track",
9479
9489
  "face",
@@ -18454,14 +18464,14 @@ var LlmProfileSchema = object({
18454
18464
  /** ConfigUISchema tree passed through untyped on the wire (the
18455
18465
  * notification-output `ConfigSchemaPassthrough` precedent at
18456
18466
  * notification-output.cap.ts:151); the exported TS type re-tightens it. */
18457
- var ConfigSchemaPassthrough$1 = unknown();
18467
+ var ConfigSchemaPassthrough$3 = unknown();
18458
18468
  var LlmProfileKindDescriptorSchema = object({
18459
18469
  kind: LlmProfileKindSchema,
18460
18470
  label: string(),
18461
18471
  icon: string(),
18462
18472
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
18463
18473
  addonId: string(),
18464
- configSchema: ConfigSchemaPassthrough$1
18474
+ configSchema: ConfigSchemaPassthrough$3
18465
18475
  });
18466
18476
  var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
18467
18477
  var LlmDefaultSchema = object({
@@ -19582,7 +19592,7 @@ var TargetKindCapsSchema = object({
19582
19592
  * the union is large and not meant for runtime validation here; the exported
19583
19593
  * `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
19584
19594
  */
19585
- var ConfigSchemaPassthrough = unknown();
19595
+ var ConfigSchemaPassthrough$2 = unknown();
19586
19596
  var TargetKindSchema = object({
19587
19597
  kind: string(),
19588
19598
  label: string(),
@@ -19619,7 +19629,7 @@ var TargetKindSchema = object({
19619
19629
  * its raster path, which is the safe default for an unknown image.
19620
19630
  */
19621
19631
  iconMediaType: string().optional(),
19622
- configSchema: ConfigSchemaPassthrough,
19632
+ configSchema: ConfigSchemaPassthrough$2,
19623
19633
  /**
19624
19634
  * The config keys that decide WHERE this kind's secrets are sent (server,
19625
19635
  * base URL, instance, chat, recipient). A save that changes any of them
@@ -22956,6 +22966,61 @@ var OauthIntegrationDescriptorSchema = object({
22956
22966
  });
22957
22967
  method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" });
22958
22968
  /**
22969
+ * `oidc-connections` — CRUD for IdP rows under `auth-oidc` (D828 sibling).
22970
+ *
22971
+ * One hub-only singleton (`auth-oidc`). The Settings UI is a DataTable +
22972
+ * ItemFormDialog; there is no `editable-array` in `globalSettingsSchema`.
22973
+ * Operator-chosen `id` is the URL slug (`/addon/auth-oidc/<id>/…`) and is
22974
+ * immutable after create.
22975
+ */
22976
+ var ConfigSchemaPassthrough$1 = unknown();
22977
+ var OidcConnectionSchema = object({
22978
+ id: string().min(1),
22979
+ displayName: string(),
22980
+ icon: string(),
22981
+ issuerUrl: string(),
22982
+ clientId: string(),
22983
+ /** Client id + secret present — never the secret value. */
22984
+ configured: boolean(),
22985
+ /**
22986
+ * Values for the connection form schema. `clientSecret` is a keychain
22987
+ * {@link SecretFieldView} or `null` / `''`, never plaintext (D789).
22988
+ */
22989
+ formValues: record(string(), unknown()).optional()
22990
+ });
22991
+ /**
22992
+ * Patch one connection. Omitted or empty `clientSecret` keeps the stored
22993
+ * secret (D787). `{ $secretClear: true }` clears it. `id` is never renamed.
22994
+ */
22995
+ var OidcConnectionUpdateInputSchema = object({
22996
+ id: string().min(1),
22997
+ displayName: string().min(1),
22998
+ icon: string().optional(),
22999
+ issuerUrl: string().optional(),
23000
+ clientId: string().optional(),
23001
+ clientSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
23002
+ redirectUri: string().optional(),
23003
+ scopes: string().optional(),
23004
+ usernameClaim: _enum([
23005
+ "preferred_username",
23006
+ "email",
23007
+ "sub"
23008
+ ]).optional()
23009
+ });
23010
+ method(object({}), ConfigSchemaPassthrough$1, { auth: "admin" }), method(object({}), array(OidcConnectionSchema).readonly(), { auth: "admin" }), method(object({
23011
+ id: string().min(1).regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "id must be a lowercase slug"),
23012
+ displayName: string().min(1)
23013
+ }), object({ id: string() }), {
23014
+ kind: "mutation",
23015
+ auth: "admin"
23016
+ }), method(OidcConnectionUpdateInputSchema, object({ ok: literal(true) }), {
23017
+ kind: "mutation",
23018
+ auth: "admin"
23019
+ }), method(object({ id: string().min(1) }), object({ ok: literal(true) }), {
23020
+ kind: "mutation",
23021
+ auth: "admin"
23022
+ });
23023
+ /**
22959
23024
  * What started a camera's onboard motion (D672). `camera` is the camera's own
22960
23025
  * firmware; `sensor` is a device the operator ATTACHED to it. Absent on the
22961
23026
  * wire means the camera: only the camera-sensors bridge ever says `sensor`.
@@ -24312,24 +24377,69 @@ var RetrainFrameListSchema = object({
24312
24377
  /** What the page pre-selects — the native key frame when one survives. */
24313
24378
  autoPickMediaId: number().int().optional()
24314
24379
  });
24380
+ /** Exclusive partition of a corpus copy's annotation progress (design §4.2). */
24381
+ var RetrainFrameWorkStateSchema = _enum([
24382
+ "unannotated",
24383
+ "annotated",
24384
+ "complete"
24385
+ ]);
24386
+ /**
24387
+ * Filters for paginated corpus list, KPI, and matching export (design §4.4).
24388
+ * Every narrowing field is ANDed; omitted fields impose no constraint.
24389
+ */
24390
+ var RetrainCorpusFilterSchema = object({
24391
+ workState: RetrainFrameWorkStateSchema.optional(),
24392
+ deviceIds: array(number()).max(500).optional(),
24393
+ /** When set, only frames in this named collection. */
24394
+ collectionId: string().optional(),
24395
+ /** Frames that carry at least one saved annotation in one of these classes. */
24396
+ classes: array(RetrainMacroClassSchema).optional(),
24397
+ page: number().int().positive().default(1),
24398
+ pageSize: number().int().positive().max(100).default(50)
24399
+ });
24400
+ var RetrainCorpusPageSchema = object({
24401
+ frames: array(RetrainFrameSchema.extend({ workState: RetrainFrameWorkStateSchema })).readonly(),
24402
+ total: number().int().nonnegative(),
24403
+ page: number().int().positive(),
24404
+ pageSize: number().int().positive()
24405
+ });
24406
+ var RetrainCorpusKpiCameraRowSchema = object({
24407
+ deviceId: number(),
24408
+ unannotated: number().int().nonnegative(),
24409
+ annotated: number().int().nonnegative(),
24410
+ complete: number().int().nonnegative(),
24411
+ /** This camera's `complete` count divided by corpus `total`, in `[0,1]`.
24412
+ * `null` when the corpus is empty (no ratio). */
24413
+ pctOfCorpus: number().min(0).max(1).nullable()
24414
+ });
24415
+ var RetrainCorpusKpiSchema = object({
24416
+ total: number().int().nonnegative(),
24417
+ unannotated: number().int().nonnegative(),
24418
+ annotated: number().int().nonnegative(),
24419
+ complete: number().int().nonnegative(),
24420
+ cameras: array(RetrainCorpusKpiCameraRowSchema).readonly()
24421
+ });
24315
24422
  /**
24316
24423
  * Which frames an annotated export carries. Every field narrows; an empty
24317
- * filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
24318
- * list owned by whoever trains (the training orchestrator), so `frameIds` is
24319
- * the primitive a version export uses; `batchId` re-selects what an earlier
24320
- * export carried (`exportedInBatch`).
24424
+ * filter is every annotated copy. `frameIds` is the primitive a job or
24425
+ * download uses; `batchId` re-selects what an earlier export carried
24426
+ * (`exportedInBatch`). Frozen dataset versions were removed — live selection
24427
+ * resolves to `frameIds` at plan/start.
24321
24428
  */
24322
24429
  var RetrainExportFilterSchema = object({
24323
24430
  deviceIds: array(number()).optional(),
24324
24431
  frameIds: array(string()).max(2e4).optional(),
24325
24432
  /** Only frames in at least one of these named collections. */
24326
24433
  collectionIds: array(string()).max(200).optional(),
24327
- /** Exactly the frames of this dataset version (and its completeOnly). An
24328
- * unknown id selects nothing. */
24329
- datasetVersionId: string().optional(),
24434
+ /** Single collection (Frames filter bar). ANDed with `collectionIds` when both set. */
24435
+ collectionId: string().optional(),
24330
24436
  batchId: string().optional(),
24331
24437
  /** Only frames the operator marked complete (all subjects boxed). */
24332
- completeOnly: boolean().optional()
24438
+ completeOnly: boolean().optional(),
24439
+ /** Exclusive work-state partition (`workStateOf`); same as the corpus list. */
24440
+ workState: RetrainFrameWorkStateSchema.optional(),
24441
+ /** Frames with at least one saved annotation in one of these classes. */
24442
+ classes: array(RetrainMacroClassSchema).optional()
24333
24443
  });
24334
24444
  /**
24335
24445
  * `frames`: the full frame copies, boxes in `annotations.json`.
@@ -24529,8 +24639,7 @@ var RetrainDatasetStatsSchema = object({
24529
24639
  completeFrames: number().int()
24530
24640
  })).readonly()
24531
24641
  });
24532
- /** An immutable dataset version, without its frame list. */
24533
- var RetrainDatasetVersionSchema = object({
24642
+ object({
24534
24643
  id: string(),
24535
24644
  name: string(),
24536
24645
  createdAt: number(),
@@ -24538,22 +24647,33 @@ var RetrainDatasetVersionSchema = object({
24538
24647
  layout: RetrainExportLayoutSchema,
24539
24648
  completeOnly: boolean(),
24540
24649
  frameCount: number().int(),
24541
- /** sha256 of what the frames taught when the version was frozen. */
24542
24650
  annotationHash: string(),
24543
- /** The export manifest schema the version was cut under. */
24544
24651
  manifestSchema: string(),
24545
24652
  stats: RetrainDatasetStatsSchema
24546
24653
  });
24547
- var CreateRetrainDatasetVersionResultSchema = discriminatedUnion("kind", [object({
24548
- kind: literal("created"),
24549
- version: RetrainDatasetVersionSchema
24654
+ /**
24655
+ * Live training corpus criteria — same shape as `TrainingCorpusSelection` on
24656
+ * the training cap. Resolved here so plan/start and the annotated export share
24657
+ * one definition of "the frames" (`buildRetrainExportPlan`).
24658
+ */
24659
+ var RetrainTrainingCorpusSelectionSchema = object({
24660
+ collectionIds: array(string()).min(1),
24661
+ workState: _enum([
24662
+ "complete",
24663
+ "annotated_or_complete",
24664
+ "any_annotated"
24665
+ ]).default("complete")
24666
+ });
24667
+ var RetrainTrainingCorpusResolveResultSchema = discriminatedUnion("kind", [object({
24668
+ kind: literal("resolved"),
24669
+ frameIds: array(string()).max(2e4).readonly(),
24670
+ stats: RetrainDatasetStatsSchema,
24671
+ annotationHash: string(),
24672
+ layout: RetrainExportLayoutSchema
24550
24673
  }), object({
24551
24674
  kind: literal("refused"),
24552
- reason: _enum([
24553
- "empty-name",
24554
- "duplicate-name",
24555
- "no-frames"
24556
- ])
24675
+ reason: _enum(["unknown-collection", "no-frames"]),
24676
+ detail: string()
24557
24677
  })]);
24558
24678
  /** The outcome of a lifecycle move owned by the retrain page. */
24559
24679
  var RetrainTransitionResultSchema = object({
@@ -25260,6 +25380,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25260
25380
  }), array(RetrainTrackSchema).readonly(), {
25261
25381
  kind: "query",
25262
25382
  auth: "admin"
25383
+ }), method(RetrainCorpusFilterSchema, RetrainCorpusPageSchema, {
25384
+ kind: "query",
25385
+ auth: "admin"
25386
+ }), method(object({}), RetrainCorpusKpiSchema, {
25387
+ kind: "query",
25388
+ auth: "admin"
25263
25389
  }), method(object({ trackId: string() }), RetrainFrameListSchema, {
25264
25390
  kind: "query",
25265
25391
  auth: "admin"
@@ -25355,36 +25481,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25355
25481
  kind: "mutation",
25356
25482
  auth: "admin",
25357
25483
  timeoutMs: 12e4
25358
- }), method(object({
25359
- selection: RetrainDatasetSelectionSchema,
25360
- completeOnly: boolean().optional()
25361
- }), RetrainDatasetStatsSchema, {
25362
- kind: "query",
25363
- auth: "admin"
25364
- }), method(object({
25365
- name: string().max(120),
25366
- selection: RetrainDatasetSelectionSchema,
25367
- layout: RetrainExportLayoutSchema,
25368
- completeOnly: boolean()
25369
- }), CreateRetrainDatasetVersionResultSchema, {
25370
- kind: "mutation",
25371
- auth: "admin",
25372
- timeoutMs: 12e4
25373
- }), method(object({}), array(RetrainDatasetVersionSchema).readonly(), {
25374
- kind: "query",
25375
- auth: "admin"
25376
- }), method(object({ id: string() }), object({ deleted: boolean() }), {
25377
- kind: "mutation",
25378
- auth: "admin"
25379
- }), method(object({ id: string() }), object({
25380
- found: boolean(),
25381
- annotationHash: string(),
25382
- matches: boolean(),
25383
- missingFrames: number().int()
25384
- }), {
25385
- kind: "query",
25386
- auth: "admin",
25387
- timeoutMs: 12e4
25388
25484
  }), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
25389
25485
  kind: "query",
25390
25486
  auth: "admin"
@@ -25411,6 +25507,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25411
25507
  }), method(object({}), array(RetrainCollectionSchema).readonly(), {
25412
25508
  kind: "query",
25413
25509
  auth: "admin"
25510
+ }), method(RetrainTrainingCorpusSelectionSchema, RetrainTrainingCorpusResolveResultSchema, {
25511
+ kind: "query",
25512
+ auth: "admin",
25513
+ timeoutMs: 6e4
25414
25514
  }), method(object({
25415
25515
  id: string(),
25416
25516
  name: string().max(120)
@@ -26027,11 +26127,14 @@ var HardwareClassIdSchema = _enum([
26027
26127
  "intel-n-series",
26028
26128
  "apple-m-base",
26029
26129
  "apple-m-pro",
26130
+ "amd-phoenix",
26030
26131
  "unknown"
26031
26132
  ]);
26032
26133
  var AcceleratorKindSchema = _enum([
26033
26134
  "intel-npu",
26034
26135
  "intel-igpu",
26136
+ "amd-igpu",
26137
+ "amd-npu",
26035
26138
  "x86-cpu",
26036
26139
  "arm-cpu",
26037
26140
  "apple-ane",
@@ -27961,6 +28064,8 @@ var AgentPipelineSettingsSchema = object({
27961
28064
  * address is wrong (multi-homed host, NAT, custom interface).
27962
28065
  */
27963
28066
  reachableHost: string().optional(),
28067
+ /** Hub-persisted UI colour (`--color-node-*` theme tokens). */
28068
+ color: NodeColorIdSchema.optional(),
27964
28069
  /**
27965
28070
  * Multi-device inference opt-in (Phase 4). Per-node map deviceKey → {enabled,
27966
28071
  * weight, steps}. Absent / all-disabled ⇒ the node's single default
@@ -28510,8 +28615,9 @@ method(object({
28510
28615
  auth: "admin"
28511
28616
  }), method(object({
28512
28617
  agentNodeId: string(),
28513
- reachableHost: string().nullable()
28514
- }), object({ success: literal(true) }), {
28618
+ reachableHost: string().nullable().optional(),
28619
+ color: NodeColorIdSchema.nullable().optional()
28620
+ }).refine((v) => v.reachableHost !== void 0 || v.color !== void 0, { message: "reachableHost or color required" }), object({ success: literal(true) }), {
28515
28621
  kind: "mutation",
28516
28622
  auth: "admin"
28517
28623
  }), method(object({
@@ -31735,7 +31841,7 @@ var CustomActionInputSchema = object({
31735
31841
  action: string().min(1),
31736
31842
  input: unknown()
31737
31843
  });
31738
- method(_void(), array(AddonListItemSchema).readonly()), method(object({
31844
+ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSchema).readonly()), method(object({
31739
31845
  addonId: string(),
31740
31846
  limit: number().min(1).max(500).default(100),
31741
31847
  level: LogLevelSchema$2.optional()
@@ -37216,6 +37322,7 @@ var OsdNamedTemplateSchema = object({
37216
37322
  });
37217
37323
  /** Where a slot's value comes from. */
37218
37324
  var OsdSourceSchema = discriminatedUnion("kind", [
37325
+ object({ kind: literal("none") }),
37219
37326
  object({
37220
37327
  kind: literal("static"),
37221
37328
  text: string().max(64)
@@ -37342,6 +37449,13 @@ method(object({ deviceId: number().int() }), object({
37342
37449
  }), object({ success: literal(true) }), {
37343
37450
  kind: "mutation",
37344
37451
  auth: "admin"
37452
+ }), method(object({
37453
+ deviceId: number().int(),
37454
+ slotId: string().min(1),
37455
+ enabled: boolean()
37456
+ }), object({ success: literal(true) }), {
37457
+ kind: "mutation",
37458
+ auth: "admin"
37345
37459
  }), method(object({
37346
37460
  sourceDeviceId: number().int(),
37347
37461
  targetDeviceId: number().int()
@@ -37773,7 +37887,15 @@ var GpuInfoSchema = object({
37773
37887
  name: string(),
37774
37888
  memoryMB: number().optional()
37775
37889
  });
37776
- var NpuInfoSchema = object({ type: _enum(["apple-ane", "intel-npu"]) });
37890
+ var NpuInfoSchema = object({
37891
+ type: _enum([
37892
+ "apple-ane",
37893
+ "intel-npu",
37894
+ "amd-xdna"
37895
+ ]),
37896
+ name: string().optional(),
37897
+ generation: _enum(["xdna1", "xdna2"]).optional()
37898
+ });
37777
37899
  var CoralInfoSchema = object({
37778
37900
  type: literal("coral-edgetpu"),
37779
37901
  bus: string().optional()
@@ -42516,9 +42638,11 @@ var zoneRulesCapability = {
42516
42638
  * once is what makes a second provider (RunPod, a local NVIDIA node) a new
42517
42639
  * manifest entry and nothing else.
42518
42640
  *
42519
- * Collection, routed by the `addonId` in every single-row input (the `llm` /
42520
- * `notification-output` posture); `describe` concat-fans across providers.
42521
- * Every method is `admin`: these spend money.
42641
+ * Collection of provider **types** (addons). Each addon owns zero or more
42642
+ * **entries** (credentials + defaults). Concat-fans: `describe`,
42643
+ * `describeTypes`, `listEntries`, `listJobs`. Single-row work is keyed by
42644
+ * `entryId`; callers also pass the owning `addonId` as the collection
42645
+ * selector (broker posture). Every method is `admin`: these spend money.
42522
42646
  *
42523
42647
  * Every cloud object a provider creates is tagged with the orchestrator's
42524
42648
  * `jobKey`, so a retried submit finds the job it already started instead of
@@ -42542,8 +42666,8 @@ var TrainingRegionOptionSchema = object({
42542
42666
  priceMultiplier: number().positive()
42543
42667
  });
42544
42668
  /**
42545
- * The provider's per-account settings, as the orchestrator reads them. They
42546
- * live in the PROVIDER addon's settings (operator decision 2026-10-08: they
42669
+ * The provider's per-entry settings, as the orchestrator reads them. They
42670
+ * live on the PROVIDER addon's entry (operator decision 2026-10-08: they
42547
42671
  * depend on the user's account), never hard-coded in the orchestrator.
42548
42672
  */
42549
42673
  var TrainingProviderDefaultsSchema = object({
@@ -42554,9 +42678,44 @@ var TrainingProviderDefaultsSchema = object({
42554
42678
  /** Hours a FAILED job's cloud dataset is kept for debugging; 0 = delete at once. */
42555
42679
  failedDatasetGraceHours: number().nonnegative()
42556
42680
  });
42681
+ /**
42682
+ * Entry form schema for a provider type — same seam as notification
42683
+ * `TargetKind.configSchema` (`z.unknown()` at the wire; callers tighten to
42684
+ * {@link ConfigUISchema}). Drives `ConfigFormBuilder` on Training → Providers.
42685
+ */
42686
+ var ConfigSchemaPassthrough = unknown();
42687
+ /** One creatable provider type, for the Add-entry dialog. */
42688
+ var TrainingProviderTypeSchema = object({
42689
+ typeId: string(),
42690
+ label: string(),
42691
+ /** Path under the addon package (e.g. `assets/training-modal/icon.svg`). */
42692
+ iconAsset: string(),
42693
+ /** Owning `training-provider` addon — collection selector for createEntry. */
42694
+ addonId: string(),
42695
+ /**
42696
+ * Fields for one entry of this type (credentials + defaults). Absent on a
42697
+ * type that only needs a name. Password fields are keychain-backed on the
42698
+ * provider addon (`secretStatePaths`), not D634 plaintext.
42699
+ */
42700
+ configSchema: ConfigSchemaPassthrough.optional()
42701
+ });
42702
+ /** One configured account / workspace under a provider type. */
42703
+ var TrainingProviderEntrySchema = object({
42704
+ entryId: string(),
42705
+ typeId: string(),
42706
+ name: string(),
42707
+ addonId: string(),
42708
+ /** Credentials are present — never the values. */
42709
+ configured: boolean()
42710
+ });
42557
42711
  var TrainingProviderDescriptorSchema = object({
42558
42712
  addonId: string(),
42559
- /** `modal`, `runpod`, `fake`, … */
42713
+ entryId: string(),
42714
+ typeId: string(),
42715
+ /** Operator-chosen entry name. */
42716
+ name: string(),
42717
+ iconAsset: string(),
42718
+ /** `modal`, `runpod`, `fake`, … — same as typeId for current providers. */
42560
42719
  kind: string(),
42561
42720
  label: string(),
42562
42721
  gpuTypes: array(TrainingGpuOptionSchema).readonly(),
@@ -42568,7 +42727,30 @@ var TrainingProviderDescriptorSchema = object({
42568
42727
  dataResidencyNote: string(),
42569
42728
  /** Credentials are present — never the values. */
42570
42729
  configured: boolean(),
42571
- defaults: TrainingProviderDefaultsSchema
42730
+ defaults: TrainingProviderDefaultsSchema,
42731
+ /**
42732
+ * Values for {@link TrainingProviderTypeSchema}'s `configSchema` — password
42733
+ * fields are keychain {@link SecretFieldView} or `null` / `''` (create),
42734
+ * never plaintext. Same hydrate contract as settings forms (D789).
42735
+ */
42736
+ formValues: record(string(), unknown()).optional()
42737
+ });
42738
+ /**
42739
+ * Patch one entry's name, credentials and defaults. Pin with owning `{ addonId }`.
42740
+ * An omitted or empty `tokenSecret` means KEEP the stored secret (D787).
42741
+ * `{ $secretClear: true }` clears it.
42742
+ */
42743
+ var TrainingProviderUpdateEntryInputSchema = object({
42744
+ entryId: string().min(1),
42745
+ name: string().min(1),
42746
+ tokenId: string().optional(),
42747
+ tokenSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
42748
+ environment: string().optional(),
42749
+ gpuType: string().optional(),
42750
+ region: string().optional(),
42751
+ costCapUsd: number().nonnegative().optional(),
42752
+ maxRuntimeSec: number().int().positive().optional(),
42753
+ failedDatasetGraceHours: number().nonnegative().optional()
42572
42754
  });
42573
42755
  var TrainingCredentialCheckSchema = object({
42574
42756
  ok: boolean(),
@@ -42620,20 +42802,33 @@ var TrainerSourceRefSchema = object({
42620
42802
  /** A commit sha (never a branch) — the job must be reproducible. */
42621
42803
  revision: string().regex(/^[0-9a-f]{7,64}$/)
42622
42804
  });
42805
+ /** Cloud job identity — route with the owning addon's `addonId` selector. */
42623
42806
  var JobRef = {
42624
- addonId: string(),
42807
+ entryId: string().min(1),
42625
42808
  jobKey: string().uuid()
42626
42809
  };
42627
42810
  var TrainingLogLineSchema = object({
42628
42811
  ts: number(),
42629
42812
  text: string()
42630
42813
  });
42631
- method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({ addonId: string() }), TrainingCredentialCheckSchema, {
42814
+ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderTypeSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderEntrySchema).readonly(), { auth: "admin" }), method(object({
42815
+ typeId: string().min(1),
42816
+ name: string().min(1)
42817
+ }), object({ entryId: string() }), {
42818
+ kind: "mutation",
42819
+ auth: "admin"
42820
+ }), method(object({ entryId: string().min(1) }), object({ ok: literal(true) }), {
42821
+ kind: "mutation",
42822
+ auth: "admin"
42823
+ }), method(TrainingProviderUpdateEntryInputSchema, object({ ok: literal(true) }), {
42824
+ kind: "mutation",
42825
+ auth: "admin"
42826
+ }), method(object({ entryId: string().min(1) }), TrainingCredentialCheckSchema, {
42632
42827
  kind: "mutation",
42633
42828
  auth: "admin",
42634
42829
  timeoutMs: 3e4
42635
42830
  }), method(object({
42636
- addonId: string(),
42831
+ entryId: string().min(1),
42637
42832
  gpuType: string(),
42638
42833
  region: string(),
42639
42834
  datasetBytes: number().int().nonnegative(),
@@ -42699,7 +42894,7 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
42699
42894
  kind: "mutation",
42700
42895
  auth: "admin",
42701
42896
  timeoutMs: 5 * 6e4
42702
- }), method(object({ addonId: string() }), array(ProviderJobStatusSchema).readonly(), {
42897
+ }), method(object({ entryId: string().min(1).optional() }), array(ProviderJobStatusSchema).readonly(), {
42703
42898
  auth: "admin",
42704
42899
  timeoutMs: 2 * 6e4
42705
42900
  });
@@ -42709,20 +42904,31 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
42709
42904
  *
42710
42905
  * It owns what every provider must agree on, written once:
42711
42906
  *
42712
- * - **Dataset versions.** Taken over from pipeline-analytics (D796): the rows
42713
- * live here (D808); pipeline-analytics still CUTS a version (it owns the corpus and
42714
- * the export plan) and reaches this store through the five row methods
42715
- * below, so the Retrain page and the export did not change.
42716
42907
  * - **Jobs.** A persisted state machine, a reconcile loop against the
42717
42908
  * provider, a cost guard, a daily orphan sweep and the retention rules.
42718
42909
  * - **The return flow.** Verified artefacts → Model Studio
42719
42910
  * (`custom-model-registry.importModelBundle`) → canary on cameras →
42720
42911
  * rollback. Nothing is ever registered automatically.
42721
42912
  *
42913
+ * Plan/start takes a live {@link TrainingCorpusSelection} (collections +
42914
+ * work-state rule); frame ids are resolved via pipeline-analytics at that
42915
+ * moment and snapshotted on the job. No frozen dataset version.
42916
+ *
42722
42917
  * Every method is `admin`.
42723
42918
  */
42724
- /** A version WITH its frame list — what the export and a job read. */
42725
- var TrainingDatasetVersionRowSchema = RetrainDatasetVersionSchema.omit({ frameCount: true }).extend({ frameIds: array(string()).max(2e4).readonly() });
42919
+ /**
42920
+ * Live corpus criteria for plan/start (design §5.2). Default is complete-only.
42921
+ * Frame ids are resolved at plan/start — never a frozen version id.
42922
+ */
42923
+ var TrainingCorpusSelectionSchema = object({
42924
+ collectionIds: array(string()).min(1),
42925
+ /** Default complete-only for v1 */
42926
+ workState: _enum([
42927
+ "complete",
42928
+ "annotated_or_complete",
42929
+ "any_annotated"
42930
+ ]).default("complete")
42931
+ });
42726
42932
  /** A base model a detector job can fine-tune, and the baseline it is judged against. */
42727
42933
  var TrainingBaseModelSchema = object({
42728
42934
  modelId: string(),
@@ -42740,9 +42946,13 @@ var TrainingPresetSchema = _enum([
42740
42946
  "thorough"
42741
42947
  ]);
42742
42948
  var TrainingJobRequestSchema = object({
42743
- datasetVersionId: string().min(1),
42744
- /** The `training-provider` addon that runs it. */
42745
- addonId: string().min(1),
42949
+ /** Live collection + work-state criteria; resolved at plan/start. */
42950
+ selection: TrainingCorpusSelectionSchema,
42951
+ /**
42952
+ * The provider **entry** that runs it (credentials + defaults).
42953
+ * Resolve to an owning addon via `training-provider.describe` / `listEntries`.
42954
+ */
42955
+ entryId: string().min(1),
42746
42956
  gpuType: string().min(1),
42747
42957
  region: string(),
42748
42958
  baseModelId: string().min(1),
@@ -42801,6 +43011,7 @@ var TrainingJobPlanSchema = object({
42801
43011
  * result lives after the operator acted on it.
42802
43012
  */
42803
43013
  var TrainingJobStateSchema = _enum([
43014
+ "queued",
42804
43015
  "uploading",
42805
43016
  "submitted",
42806
43017
  "starting",
@@ -42854,6 +43065,11 @@ var TrainingJobSchema = object({
42854
43065
  createdAt: number(),
42855
43066
  updatedAt: number(),
42856
43067
  state: TrainingJobStateSchema,
43068
+ /**
43069
+ * Shared by every job enqueued together via `startJobBatch`.
43070
+ * `null` for a lone `startJob`. The engine advances queued siblings by this id.
43071
+ */
43072
+ batchId: string().nullable().default(null),
42857
43073
  stage: TrainingStageSchema.nullable(),
42858
43074
  failure: object({
42859
43075
  reason: TrainingFailureReasonSchema,
@@ -42865,6 +43081,12 @@ var TrainingJobSchema = object({
42865
43081
  maxRuntimeSec: number().int().positive(),
42866
43082
  trainer: TrainerSourceRefSchema,
42867
43083
  datasetLayout: RetrainExportLayoutSchema,
43084
+ /** Frame count snapshotted when the job started (audit; equals `frameIds.length`). */
43085
+ frameCount: number().int().nonnegative(),
43086
+ /** Resolved frame ids at start — the archive ships exactly these. */
43087
+ frameIds: array(string()).max(2e4).readonly(),
43088
+ /** Hash of what those frames taught at start (trainer `dataset.annotationHash`). */
43089
+ annotationHash: string(),
42868
43090
  dataset: object({
42869
43091
  bytes: number().int(),
42870
43092
  sha256: string(),
@@ -42906,13 +43128,7 @@ var TrainingJobSchema = object({
42906
43128
  canary: TrainingCanarySchema.nullable()
42907
43129
  });
42908
43130
  var IdInput = object({ id: string().min(1) });
42909
- method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
42910
- kind: "mutation",
42911
- auth: "admin"
42912
- }), 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() }), {
42913
- kind: "mutation",
42914
- auth: "admin"
42915
- }), method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
43131
+ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
42916
43132
  auth: "admin",
42917
43133
  timeoutMs: 6e4
42918
43134
  }), method(TrainingJobRequestSchema.extend({
@@ -42931,6 +43147,24 @@ method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
42931
43147
  kind: "mutation",
42932
43148
  auth: "admin",
42933
43149
  timeoutMs: 12e4
43150
+ }), method(TrainingJobRequestSchema.omit({ baseModelId: true }).extend({
43151
+ baseModelIds: array(string().min(1)).min(1),
43152
+ name: string().min(1).max(120),
43153
+ maxCostUsd: number().positive(),
43154
+ maxRuntimeSec: number().int().positive(),
43155
+ idempotencyKey: string().min(8).max(80)
43156
+ }), discriminatedUnion("kind", [object({
43157
+ kind: literal("started"),
43158
+ batchId: string(),
43159
+ jobs: array(TrainingJobSchema).min(1).readonly()
43160
+ }), object({
43161
+ kind: literal("refused"),
43162
+ reason: TrainingRefusalReasonSchema,
43163
+ detail: string()
43164
+ })]), {
43165
+ kind: "mutation",
43166
+ auth: "admin",
43167
+ timeoutMs: 12e4
42934
43168
  }), method(object({}), array(TrainingJobSchema).readonly(), { auth: "admin" }), method(IdInput, TrainingJobSchema.nullable(), { auth: "admin" }), method(IdInput, TrainingJobSchema, {
42935
43169
  kind: "mutation",
42936
43170
  auth: "admin",
@@ -48012,6 +48246,36 @@ Object.freeze({
48012
48246
  addonId: null,
48013
48247
  access: "view"
48014
48248
  },
48249
+ "oidcConnections.connectionFormSchema": {
48250
+ capName: "oidc-connections",
48251
+ capScope: "system",
48252
+ addonId: null,
48253
+ access: "view"
48254
+ },
48255
+ "oidcConnections.createConnection": {
48256
+ capName: "oidc-connections",
48257
+ capScope: "system",
48258
+ addonId: null,
48259
+ access: "create"
48260
+ },
48261
+ "oidcConnections.deleteConnection": {
48262
+ capName: "oidc-connections",
48263
+ capScope: "system",
48264
+ addonId: null,
48265
+ access: "delete"
48266
+ },
48267
+ "oidcConnections.listConnections": {
48268
+ capName: "oidc-connections",
48269
+ capScope: "system",
48270
+ addonId: null,
48271
+ access: "view"
48272
+ },
48273
+ "oidcConnections.updateConnection": {
48274
+ capName: "oidc-connections",
48275
+ capScope: "system",
48276
+ addonId: null,
48277
+ access: "create"
48278
+ },
48015
48279
  "osd.getStatus": {
48016
48280
  capName: "osd",
48017
48281
  capScope: "device",
@@ -48084,6 +48348,12 @@ Object.freeze({
48084
48348
  addonId: null,
48085
48349
  access: "create"
48086
48350
  },
48351
+ "osdManager.setSlotCameraEnabled": {
48352
+ capName: "osd-manager",
48353
+ capScope: "system",
48354
+ addonId: null,
48355
+ access: "create"
48356
+ },
48087
48357
  "osdManager.upsertTemplate": {
48088
48358
  capName: "osd-manager",
48089
48359
  capScope: "system",
@@ -48222,12 +48492,6 @@ Object.freeze({
48222
48492
  addonId: null,
48223
48493
  access: "create"
48224
48494
  },
48225
- "pipelineAnalytics.createRetrainDatasetVersion": {
48226
- capName: "pipeline-analytics",
48227
- capScope: "device",
48228
- addonId: null,
48229
- access: "create"
48230
- },
48231
48495
  "pipelineAnalytics.deleteDeviceEvents": {
48232
48496
  capName: "pipeline-analytics",
48233
48497
  capScope: "device",
@@ -48240,12 +48504,6 @@ Object.freeze({
48240
48504
  addonId: null,
48241
48505
  access: "delete"
48242
48506
  },
48243
- "pipelineAnalytics.deleteRetrainDatasetVersion": {
48244
- capName: "pipeline-analytics",
48245
- capScope: "device",
48246
- addonId: null,
48247
- access: "delete"
48248
- },
48249
48507
  "pipelineAnalytics.deleteTracks": {
48250
48508
  capName: "pipeline-analytics",
48251
48509
  capScope: "device",
@@ -48348,6 +48606,12 @@ Object.freeze({
48348
48606
  addonId: null,
48349
48607
  access: "view"
48350
48608
  },
48609
+ "pipelineAnalytics.getRetrainCorpusKpi": {
48610
+ capName: "pipeline-analytics",
48611
+ capScope: "device",
48612
+ addonId: null,
48613
+ access: "view"
48614
+ },
48351
48615
  "pipelineAnalytics.getRetrainExportUrl": {
48352
48616
  capName: "pipeline-analytics",
48353
48617
  capScope: "device",
@@ -48468,7 +48732,7 @@ Object.freeze({
48468
48732
  addonId: null,
48469
48733
  access: "view"
48470
48734
  },
48471
- "pipelineAnalytics.listRetrainDatasetVersions": {
48735
+ "pipelineAnalytics.listRetrainCorpusPage": {
48472
48736
  capName: "pipeline-analytics",
48473
48737
  capScope: "device",
48474
48738
  addonId: null,
@@ -48522,12 +48786,6 @@ Object.freeze({
48522
48786
  addonId: null,
48523
48787
  access: "create"
48524
48788
  },
48525
- "pipelineAnalytics.previewRetrainDataset": {
48526
- capName: "pipeline-analytics",
48527
- capScope: "device",
48528
- addonId: null,
48529
- access: "view"
48530
- },
48531
48789
  "pipelineAnalytics.proposeRetrainAnnotations": {
48532
48790
  capName: "pipeline-analytics",
48533
48791
  capScope: "device",
@@ -48606,6 +48864,12 @@ Object.freeze({
48606
48864
  addonId: null,
48607
48865
  access: "create"
48608
48866
  },
48867
+ "pipelineAnalytics.resolveRetrainTrainingCorpus": {
48868
+ capName: "pipeline-analytics",
48869
+ capScope: "device",
48870
+ addonId: null,
48871
+ access: "view"
48872
+ },
48609
48873
  "pipelineAnalytics.restageRetrainTrack": {
48610
48874
  capName: "pipeline-analytics",
48611
48875
  capScope: "device",
@@ -48666,12 +48930,6 @@ Object.freeze({
48666
48930
  addonId: null,
48667
48931
  access: "create"
48668
48932
  },
48669
- "pipelineAnalytics.verifyRetrainDatasetVersion": {
48670
- capName: "pipeline-analytics",
48671
- capScope: "device",
48672
- addonId: null,
48673
- access: "view"
48674
- },
48675
48933
  "pipelineAnalytics.wipeAllAnalytics": {
48676
48934
  capName: "pipeline-analytics",
48677
48935
  capScope: "device",
@@ -51066,18 +51324,6 @@ Object.freeze({
51066
51324
  addonId: null,
51067
51325
  access: "create"
51068
51326
  },
51069
- "training.findDatasetVersionIdByName": {
51070
- capName: "training",
51071
- capScope: "system",
51072
- addonId: null,
51073
- access: "view"
51074
- },
51075
- "training.getDatasetVersion": {
51076
- capName: "training",
51077
- capScope: "system",
51078
- addonId: null,
51079
- access: "view"
51080
- },
51081
51327
  "training.getJob": {
51082
51328
  capName: "training",
51083
51329
  capScope: "system",
@@ -51096,12 +51342,6 @@ Object.freeze({
51096
51342
  addonId: null,
51097
51343
  access: "view"
51098
51344
  },
51099
- "training.listDatasetVersions": {
51100
- capName: "training",
51101
- capScope: "system",
51102
- addonId: null,
51103
- access: "view"
51104
- },
51105
51345
  "training.listJobs": {
51106
51346
  capName: "training",
51107
51347
  capScope: "system",
@@ -51114,54 +51354,66 @@ Object.freeze({
51114
51354
  addonId: null,
51115
51355
  access: "view"
51116
51356
  },
51117
- "training.putDatasetVersion": {
51357
+ "training.registerResult": {
51118
51358
  capName: "training",
51119
51359
  capScope: "system",
51120
51360
  addonId: null,
51121
51361
  access: "create"
51122
51362
  },
51123
- "training.registerResult": {
51363
+ "training.rollbackCanary": {
51124
51364
  capName: "training",
51125
51365
  capScope: "system",
51126
51366
  addonId: null,
51127
51367
  access: "create"
51128
51368
  },
51129
- "training.removeDatasetVersion": {
51369
+ "training.startJob": {
51130
51370
  capName: "training",
51131
51371
  capScope: "system",
51132
51372
  addonId: null,
51133
- access: "delete"
51373
+ access: "create"
51134
51374
  },
51135
- "training.rollbackCanary": {
51375
+ "training.startJobBatch": {
51136
51376
  capName: "training",
51137
51377
  capScope: "system",
51138
51378
  addonId: null,
51139
51379
  access: "create"
51140
51380
  },
51141
- "training.startJob": {
51142
- capName: "training",
51381
+ "trainingProvider.cancelJob": {
51382
+ capName: "training-provider",
51143
51383
  capScope: "system",
51144
51384
  addonId: null,
51145
51385
  access: "create"
51146
51386
  },
51147
- "trainingProvider.cancelJob": {
51387
+ "trainingProvider.cleanupJob": {
51148
51388
  capName: "training-provider",
51149
51389
  capScope: "system",
51150
51390
  addonId: null,
51151
51391
  access: "create"
51152
51392
  },
51153
- "trainingProvider.cleanupJob": {
51393
+ "trainingProvider.createEntry": {
51154
51394
  capName: "training-provider",
51155
51395
  capScope: "system",
51156
51396
  addonId: null,
51157
51397
  access: "create"
51158
51398
  },
51399
+ "trainingProvider.deleteEntry": {
51400
+ capName: "training-provider",
51401
+ capScope: "system",
51402
+ addonId: null,
51403
+ access: "delete"
51404
+ },
51159
51405
  "trainingProvider.describe": {
51160
51406
  capName: "training-provider",
51161
51407
  capScope: "system",
51162
51408
  addonId: null,
51163
51409
  access: "view"
51164
51410
  },
51411
+ "trainingProvider.describeTypes": {
51412
+ capName: "training-provider",
51413
+ capScope: "system",
51414
+ addonId: null,
51415
+ access: "view"
51416
+ },
51165
51417
  "trainingProvider.estimateJob": {
51166
51418
  capName: "training-provider",
51167
51419
  capScope: "system",
@@ -51174,6 +51426,12 @@ Object.freeze({
51174
51426
  addonId: null,
51175
51427
  access: "view"
51176
51428
  },
51429
+ "trainingProvider.listEntries": {
51430
+ capName: "training-provider",
51431
+ capScope: "system",
51432
+ addonId: null,
51433
+ access: "view"
51434
+ },
51177
51435
  "trainingProvider.listJobEvents": {
51178
51436
  capName: "training-provider",
51179
51437
  capScope: "system",
@@ -51204,6 +51462,12 @@ Object.freeze({
51204
51462
  addonId: null,
51205
51463
  access: "create"
51206
51464
  },
51465
+ "trainingProvider.updateEntry": {
51466
+ capName: "training-provider",
51467
+ capScope: "system",
51468
+ addonId: null,
51469
+ access: "create"
51470
+ },
51207
51471
  "trainingProvider.uploadDataset": {
51208
51472
  capName: "training-provider",
51209
51473
  capScope: "system",
@@ -54410,6 +54674,11 @@ Object.freeze({
54410
54674
  form: "single",
54411
54675
  optional: false
54412
54676
  }],
54677
+ "osdManager.setSlotCameraEnabled": [{
54678
+ name: "deviceId",
54679
+ form: "single",
54680
+ optional: false
54681
+ }],
54413
54682
  "petFeeder.callPet": [{
54414
54683
  name: "deviceId",
54415
54684
  form: "single",
@@ -54630,6 +54899,11 @@ Object.freeze({
54630
54899
  form: "array",
54631
54900
  optional: false
54632
54901
  }],
54902
+ "pipelineAnalytics.listRetrainCorpusPage": [{
54903
+ name: "deviceIds",
54904
+ form: "array",
54905
+ optional: true
54906
+ }],
54633
54907
  "pipelineAnalytics.listRetrainStaging": [{
54634
54908
  name: "deviceIds",
54635
54909
  form: "array",
@@ -55739,6 +56013,7 @@ Object.freeze({
55739
56013
  });
55740
56014
  Object.freeze({
55741
56015
  "broker": "broker",
56016
+ "calendar-source": "calendar",
55742
56017
  "device-export": "device-export",
55743
56018
  "llm": "ai",
55744
56019
  "mesh-network": "mesh",