@camstack/addon-terminal 0.1.129 → 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 +422 -139
  2. package/dist/addon.mjs +422 -139
  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()
@@ -36774,7 +36880,13 @@ var TopologyNodeSchema = object({
36774
36880
  })).readonly(),
36775
36881
  processes: array(TopologyProcessSchema).readonly(),
36776
36882
  categories: array(TopologyCategorySchema).readonly(),
36777
- rootPackage: TopologyRootPackageSchema.nullable()
36883
+ rootPackage: TopologyRootPackageSchema.nullable(),
36884
+ /**
36885
+ * How an online AGENT reaches the hub (mesh mTLS Release A): `tls` once it has
36886
+ * completed a mutual-TLS handshake, `clear` otherwise. Absent for the hub,
36887
+ * for offline rows and when the hub cannot tell.
36888
+ */
36889
+ meshTransport: _enum(["tls", "clear"]).optional()
36778
36890
  });
36779
36891
  var CapUsageEdgeSchema = object({
36780
36892
  callerAddonId: string(),
@@ -37187,6 +37299,7 @@ var OsdNamedTemplateSchema = object({
37187
37299
  });
37188
37300
  /** Where a slot's value comes from. */
37189
37301
  var OsdSourceSchema = discriminatedUnion("kind", [
37302
+ object({ kind: literal("none") }),
37190
37303
  object({
37191
37304
  kind: literal("static"),
37192
37305
  text: string().max(64)
@@ -37313,6 +37426,13 @@ method(object({ deviceId: number().int() }), object({
37313
37426
  }), object({ success: literal(true) }), {
37314
37427
  kind: "mutation",
37315
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"
37316
37436
  }), method(object({
37317
37437
  sourceDeviceId: number().int(),
37318
37438
  targetDeviceId: number().int()
@@ -37744,7 +37864,15 @@ var GpuInfoSchema = object({
37744
37864
  name: string(),
37745
37865
  memoryMB: number().optional()
37746
37866
  });
37747
- 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
+ });
37748
37876
  var CoralInfoSchema = object({
37749
37877
  type: literal("coral-edgetpu"),
37750
37878
  bus: string().optional()
@@ -42487,9 +42615,11 @@ var zoneRulesCapability = {
42487
42615
  * once is what makes a second provider (RunPod, a local NVIDIA node) a new
42488
42616
  * manifest entry and nothing else.
42489
42617
  *
42490
- * Collection, routed by the `addonId` in every single-row input (the `llm` /
42491
- * `notification-output` posture); `describe` concat-fans across providers.
42492
- * 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.
42493
42623
  *
42494
42624
  * Every cloud object a provider creates is tagged with the orchestrator's
42495
42625
  * `jobKey`, so a retried submit finds the job it already started instead of
@@ -42513,8 +42643,8 @@ var TrainingRegionOptionSchema = object({
42513
42643
  priceMultiplier: number().positive()
42514
42644
  });
42515
42645
  /**
42516
- * The provider's per-account settings, as the orchestrator reads them. They
42517
- * 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
42518
42648
  * depend on the user's account), never hard-coded in the orchestrator.
42519
42649
  */
42520
42650
  var TrainingProviderDefaultsSchema = object({
@@ -42525,9 +42655,44 @@ var TrainingProviderDefaultsSchema = object({
42525
42655
  /** Hours a FAILED job's cloud dataset is kept for debugging; 0 = delete at once. */
42526
42656
  failedDatasetGraceHours: number().nonnegative()
42527
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
+ });
42528
42688
  var TrainingProviderDescriptorSchema = object({
42529
42689
  addonId: string(),
42530
- /** `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. */
42531
42696
  kind: string(),
42532
42697
  label: string(),
42533
42698
  gpuTypes: array(TrainingGpuOptionSchema).readonly(),
@@ -42539,7 +42704,30 @@ var TrainingProviderDescriptorSchema = object({
42539
42704
  dataResidencyNote: string(),
42540
42705
  /** Credentials are present — never the values. */
42541
42706
  configured: boolean(),
42542
- 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()
42543
42731
  });
42544
42732
  var TrainingCredentialCheckSchema = object({
42545
42733
  ok: boolean(),
@@ -42591,20 +42779,33 @@ var TrainerSourceRefSchema = object({
42591
42779
  /** A commit sha (never a branch) — the job must be reproducible. */
42592
42780
  revision: string().regex(/^[0-9a-f]{7,64}$/)
42593
42781
  });
42782
+ /** Cloud job identity — route with the owning addon's `addonId` selector. */
42594
42783
  var JobRef = {
42595
- addonId: string(),
42784
+ entryId: string().min(1),
42596
42785
  jobKey: string().uuid()
42597
42786
  };
42598
42787
  var TrainingLogLineSchema = object({
42599
42788
  ts: number(),
42600
42789
  text: string()
42601
42790
  });
42602
- 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, {
42603
42804
  kind: "mutation",
42604
42805
  auth: "admin",
42605
42806
  timeoutMs: 3e4
42606
42807
  }), method(object({
42607
- addonId: string(),
42808
+ entryId: string().min(1),
42608
42809
  gpuType: string(),
42609
42810
  region: string(),
42610
42811
  datasetBytes: number().int().nonnegative(),
@@ -42670,7 +42871,7 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
42670
42871
  kind: "mutation",
42671
42872
  auth: "admin",
42672
42873
  timeoutMs: 5 * 6e4
42673
- }), method(object({ addonId: string() }), array(ProviderJobStatusSchema).readonly(), {
42874
+ }), method(object({ entryId: string().min(1).optional() }), array(ProviderJobStatusSchema).readonly(), {
42674
42875
  auth: "admin",
42675
42876
  timeoutMs: 2 * 6e4
42676
42877
  });
@@ -42680,20 +42881,31 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
42680
42881
  *
42681
42882
  * It owns what every provider must agree on, written once:
42682
42883
  *
42683
- * - **Dataset versions.** Taken over from pipeline-analytics (D796): the rows
42684
- * live here (D808); pipeline-analytics still CUTS a version (it owns the corpus and
42685
- * the export plan) and reaches this store through the five row methods
42686
- * below, so the Retrain page and the export did not change.
42687
42884
  * - **Jobs.** A persisted state machine, a reconcile loop against the
42688
42885
  * provider, a cost guard, a daily orphan sweep and the retention rules.
42689
42886
  * - **The return flow.** Verified artefacts → Model Studio
42690
42887
  * (`custom-model-registry.importModelBundle`) → canary on cameras →
42691
42888
  * rollback. Nothing is ever registered automatically.
42692
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
+ *
42693
42894
  * Every method is `admin`.
42694
42895
  */
42695
- /** A version WITH its frame list — what the export and a job read. */
42696
- 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
+ });
42697
42909
  /** A base model a detector job can fine-tune, and the baseline it is judged against. */
42698
42910
  var TrainingBaseModelSchema = object({
42699
42911
  modelId: string(),
@@ -42711,9 +42923,13 @@ var TrainingPresetSchema = _enum([
42711
42923
  "thorough"
42712
42924
  ]);
42713
42925
  var TrainingJobRequestSchema = object({
42714
- datasetVersionId: string().min(1),
42715
- /** The `training-provider` addon that runs it. */
42716
- 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),
42717
42933
  gpuType: string().min(1),
42718
42934
  region: string(),
42719
42935
  baseModelId: string().min(1),
@@ -42772,6 +42988,7 @@ var TrainingJobPlanSchema = object({
42772
42988
  * result lives after the operator acted on it.
42773
42989
  */
42774
42990
  var TrainingJobStateSchema = _enum([
42991
+ "queued",
42775
42992
  "uploading",
42776
42993
  "submitted",
42777
42994
  "starting",
@@ -42825,6 +43042,11 @@ var TrainingJobSchema = object({
42825
43042
  createdAt: number(),
42826
43043
  updatedAt: number(),
42827
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),
42828
43050
  stage: TrainingStageSchema.nullable(),
42829
43051
  failure: object({
42830
43052
  reason: TrainingFailureReasonSchema,
@@ -42836,6 +43058,12 @@ var TrainingJobSchema = object({
42836
43058
  maxRuntimeSec: number().int().positive(),
42837
43059
  trainer: TrainerSourceRefSchema,
42838
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(),
42839
43067
  dataset: object({
42840
43068
  bytes: number().int(),
42841
43069
  sha256: string(),
@@ -42877,13 +43105,7 @@ var TrainingJobSchema = object({
42877
43105
  canary: TrainingCanarySchema.nullable()
42878
43106
  });
42879
43107
  var IdInput = object({ id: string().min(1) });
42880
- method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
42881
- kind: "mutation",
42882
- auth: "admin"
42883
- }), 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() }), {
42884
- kind: "mutation",
42885
- auth: "admin"
42886
- }), method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
43108
+ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
42887
43109
  auth: "admin",
42888
43110
  timeoutMs: 6e4
42889
43111
  }), method(TrainingJobRequestSchema.extend({
@@ -42902,6 +43124,24 @@ method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
42902
43124
  kind: "mutation",
42903
43125
  auth: "admin",
42904
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
42905
43145
  }), method(object({}), array(TrainingJobSchema).readonly(), { auth: "admin" }), method(IdInput, TrainingJobSchema.nullable(), { auth: "admin" }), method(IdInput, TrainingJobSchema, {
42906
43146
  kind: "mutation",
42907
43147
  auth: "admin",
@@ -47983,6 +48223,36 @@ Object.freeze({
47983
48223
  addonId: null,
47984
48224
  access: "view"
47985
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
+ },
47986
48256
  "osd.getStatus": {
47987
48257
  capName: "osd",
47988
48258
  capScope: "device",
@@ -48055,6 +48325,12 @@ Object.freeze({
48055
48325
  addonId: null,
48056
48326
  access: "create"
48057
48327
  },
48328
+ "osdManager.setSlotCameraEnabled": {
48329
+ capName: "osd-manager",
48330
+ capScope: "system",
48331
+ addonId: null,
48332
+ access: "create"
48333
+ },
48058
48334
  "osdManager.upsertTemplate": {
48059
48335
  capName: "osd-manager",
48060
48336
  capScope: "system",
@@ -48193,12 +48469,6 @@ Object.freeze({
48193
48469
  addonId: null,
48194
48470
  access: "create"
48195
48471
  },
48196
- "pipelineAnalytics.createRetrainDatasetVersion": {
48197
- capName: "pipeline-analytics",
48198
- capScope: "device",
48199
- addonId: null,
48200
- access: "create"
48201
- },
48202
48472
  "pipelineAnalytics.deleteDeviceEvents": {
48203
48473
  capName: "pipeline-analytics",
48204
48474
  capScope: "device",
@@ -48211,12 +48481,6 @@ Object.freeze({
48211
48481
  addonId: null,
48212
48482
  access: "delete"
48213
48483
  },
48214
- "pipelineAnalytics.deleteRetrainDatasetVersion": {
48215
- capName: "pipeline-analytics",
48216
- capScope: "device",
48217
- addonId: null,
48218
- access: "delete"
48219
- },
48220
48484
  "pipelineAnalytics.deleteTracks": {
48221
48485
  capName: "pipeline-analytics",
48222
48486
  capScope: "device",
@@ -48319,6 +48583,12 @@ Object.freeze({
48319
48583
  addonId: null,
48320
48584
  access: "view"
48321
48585
  },
48586
+ "pipelineAnalytics.getRetrainCorpusKpi": {
48587
+ capName: "pipeline-analytics",
48588
+ capScope: "device",
48589
+ addonId: null,
48590
+ access: "view"
48591
+ },
48322
48592
  "pipelineAnalytics.getRetrainExportUrl": {
48323
48593
  capName: "pipeline-analytics",
48324
48594
  capScope: "device",
@@ -48439,7 +48709,7 @@ Object.freeze({
48439
48709
  addonId: null,
48440
48710
  access: "view"
48441
48711
  },
48442
- "pipelineAnalytics.listRetrainDatasetVersions": {
48712
+ "pipelineAnalytics.listRetrainCorpusPage": {
48443
48713
  capName: "pipeline-analytics",
48444
48714
  capScope: "device",
48445
48715
  addonId: null,
@@ -48493,12 +48763,6 @@ Object.freeze({
48493
48763
  addonId: null,
48494
48764
  access: "create"
48495
48765
  },
48496
- "pipelineAnalytics.previewRetrainDataset": {
48497
- capName: "pipeline-analytics",
48498
- capScope: "device",
48499
- addonId: null,
48500
- access: "view"
48501
- },
48502
48766
  "pipelineAnalytics.proposeRetrainAnnotations": {
48503
48767
  capName: "pipeline-analytics",
48504
48768
  capScope: "device",
@@ -48577,6 +48841,12 @@ Object.freeze({
48577
48841
  addonId: null,
48578
48842
  access: "create"
48579
48843
  },
48844
+ "pipelineAnalytics.resolveRetrainTrainingCorpus": {
48845
+ capName: "pipeline-analytics",
48846
+ capScope: "device",
48847
+ addonId: null,
48848
+ access: "view"
48849
+ },
48580
48850
  "pipelineAnalytics.restageRetrainTrack": {
48581
48851
  capName: "pipeline-analytics",
48582
48852
  capScope: "device",
@@ -48637,12 +48907,6 @@ Object.freeze({
48637
48907
  addonId: null,
48638
48908
  access: "create"
48639
48909
  },
48640
- "pipelineAnalytics.verifyRetrainDatasetVersion": {
48641
- capName: "pipeline-analytics",
48642
- capScope: "device",
48643
- addonId: null,
48644
- access: "view"
48645
- },
48646
48910
  "pipelineAnalytics.wipeAllAnalytics": {
48647
48911
  capName: "pipeline-analytics",
48648
48912
  capScope: "device",
@@ -51037,18 +51301,6 @@ Object.freeze({
51037
51301
  addonId: null,
51038
51302
  access: "create"
51039
51303
  },
51040
- "training.findDatasetVersionIdByName": {
51041
- capName: "training",
51042
- capScope: "system",
51043
- addonId: null,
51044
- access: "view"
51045
- },
51046
- "training.getDatasetVersion": {
51047
- capName: "training",
51048
- capScope: "system",
51049
- addonId: null,
51050
- access: "view"
51051
- },
51052
51304
  "training.getJob": {
51053
51305
  capName: "training",
51054
51306
  capScope: "system",
@@ -51067,12 +51319,6 @@ Object.freeze({
51067
51319
  addonId: null,
51068
51320
  access: "view"
51069
51321
  },
51070
- "training.listDatasetVersions": {
51071
- capName: "training",
51072
- capScope: "system",
51073
- addonId: null,
51074
- access: "view"
51075
- },
51076
51322
  "training.listJobs": {
51077
51323
  capName: "training",
51078
51324
  capScope: "system",
@@ -51085,54 +51331,66 @@ Object.freeze({
51085
51331
  addonId: null,
51086
51332
  access: "view"
51087
51333
  },
51088
- "training.putDatasetVersion": {
51334
+ "training.registerResult": {
51089
51335
  capName: "training",
51090
51336
  capScope: "system",
51091
51337
  addonId: null,
51092
51338
  access: "create"
51093
51339
  },
51094
- "training.registerResult": {
51340
+ "training.rollbackCanary": {
51095
51341
  capName: "training",
51096
51342
  capScope: "system",
51097
51343
  addonId: null,
51098
51344
  access: "create"
51099
51345
  },
51100
- "training.removeDatasetVersion": {
51346
+ "training.startJob": {
51101
51347
  capName: "training",
51102
51348
  capScope: "system",
51103
51349
  addonId: null,
51104
- access: "delete"
51350
+ access: "create"
51105
51351
  },
51106
- "training.rollbackCanary": {
51352
+ "training.startJobBatch": {
51107
51353
  capName: "training",
51108
51354
  capScope: "system",
51109
51355
  addonId: null,
51110
51356
  access: "create"
51111
51357
  },
51112
- "training.startJob": {
51113
- capName: "training",
51358
+ "trainingProvider.cancelJob": {
51359
+ capName: "training-provider",
51114
51360
  capScope: "system",
51115
51361
  addonId: null,
51116
51362
  access: "create"
51117
51363
  },
51118
- "trainingProvider.cancelJob": {
51364
+ "trainingProvider.cleanupJob": {
51119
51365
  capName: "training-provider",
51120
51366
  capScope: "system",
51121
51367
  addonId: null,
51122
51368
  access: "create"
51123
51369
  },
51124
- "trainingProvider.cleanupJob": {
51370
+ "trainingProvider.createEntry": {
51125
51371
  capName: "training-provider",
51126
51372
  capScope: "system",
51127
51373
  addonId: null,
51128
51374
  access: "create"
51129
51375
  },
51376
+ "trainingProvider.deleteEntry": {
51377
+ capName: "training-provider",
51378
+ capScope: "system",
51379
+ addonId: null,
51380
+ access: "delete"
51381
+ },
51130
51382
  "trainingProvider.describe": {
51131
51383
  capName: "training-provider",
51132
51384
  capScope: "system",
51133
51385
  addonId: null,
51134
51386
  access: "view"
51135
51387
  },
51388
+ "trainingProvider.describeTypes": {
51389
+ capName: "training-provider",
51390
+ capScope: "system",
51391
+ addonId: null,
51392
+ access: "view"
51393
+ },
51136
51394
  "trainingProvider.estimateJob": {
51137
51395
  capName: "training-provider",
51138
51396
  capScope: "system",
@@ -51145,6 +51403,12 @@ Object.freeze({
51145
51403
  addonId: null,
51146
51404
  access: "view"
51147
51405
  },
51406
+ "trainingProvider.listEntries": {
51407
+ capName: "training-provider",
51408
+ capScope: "system",
51409
+ addonId: null,
51410
+ access: "view"
51411
+ },
51148
51412
  "trainingProvider.listJobEvents": {
51149
51413
  capName: "training-provider",
51150
51414
  capScope: "system",
@@ -51175,6 +51439,12 @@ Object.freeze({
51175
51439
  addonId: null,
51176
51440
  access: "create"
51177
51441
  },
51442
+ "trainingProvider.updateEntry": {
51443
+ capName: "training-provider",
51444
+ capScope: "system",
51445
+ addonId: null,
51446
+ access: "create"
51447
+ },
51178
51448
  "trainingProvider.uploadDataset": {
51179
51449
  capName: "training-provider",
51180
51450
  capScope: "system",
@@ -54381,6 +54651,11 @@ Object.freeze({
54381
54651
  form: "single",
54382
54652
  optional: false
54383
54653
  }],
54654
+ "osdManager.setSlotCameraEnabled": [{
54655
+ name: "deviceId",
54656
+ form: "single",
54657
+ optional: false
54658
+ }],
54384
54659
  "petFeeder.callPet": [{
54385
54660
  name: "deviceId",
54386
54661
  form: "single",
@@ -54601,6 +54876,11 @@ Object.freeze({
54601
54876
  form: "array",
54602
54877
  optional: false
54603
54878
  }],
54879
+ "pipelineAnalytics.listRetrainCorpusPage": [{
54880
+ name: "deviceIds",
54881
+ form: "array",
54882
+ optional: true
54883
+ }],
54604
54884
  "pipelineAnalytics.listRetrainStaging": [{
54605
54885
  name: "deviceIds",
54606
54886
  form: "array",
@@ -55710,6 +55990,7 @@ Object.freeze({
55710
55990
  });
55711
55991
  Object.freeze({
55712
55992
  "broker": "broker",
55993
+ "calendar-source": "calendar",
55713
55994
  "device-export": "device-export",
55714
55995
  "llm": "ai",
55715
55996
  "mesh-network": "mesh",
@@ -56195,6 +56476,8 @@ var STATE_SUMMARY_VARS = [
56195
56476
  [...RULE_TEXT],
56196
56477
  [...RULE_TEXT],
56197
56478
  [...RULE_TEXT],
56479
+ [...RULE_TEXT],
56480
+ [...RULE_TEXT],
56198
56481
  ([...RULE_TEXT], [...UPDATES]),
56199
56482
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),
56200
56483
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),