@camstack/addon-mqtt-broker 1.2.122 → 1.2.124

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.
@@ -5417,7 +5417,7 @@ var ZodIssueCode = {
5417
5417
  var ZodFirstPartyTypeKind;
5418
5418
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5419
5419
  //#endregion
5420
- //#region ../types/dist/sleep-r3RWkGVx.mjs
5420
+ //#region ../types/dist/sleep-DwAQ9sqX.mjs
5421
5421
  /**
5422
5422
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5423
5423
  * window to float samples (D455).
@@ -9346,6 +9346,16 @@ var CompositionSchema = object({
9346
9346
  seen.add(feature.cap);
9347
9347
  });
9348
9348
  });
9349
+ var NodeColorIdSchema = _enum([
9350
+ "node-a",
9351
+ "node-b",
9352
+ "node-c",
9353
+ "node-d",
9354
+ "node-e",
9355
+ "node-f",
9356
+ "node-g",
9357
+ "node-h"
9358
+ ]);
9349
9359
  new Set([
9350
9360
  "track",
9351
9361
  "face",
@@ -18134,14 +18144,14 @@ var LlmProfileSchema = object({
18134
18144
  /** ConfigUISchema tree passed through untyped on the wire (the
18135
18145
  * notification-output `ConfigSchemaPassthrough` precedent at
18136
18146
  * notification-output.cap.ts:151); the exported TS type re-tightens it. */
18137
- var ConfigSchemaPassthrough$1 = unknown();
18147
+ var ConfigSchemaPassthrough$3 = unknown();
18138
18148
  var LlmProfileKindDescriptorSchema = object({
18139
18149
  kind: LlmProfileKindSchema,
18140
18150
  label: string(),
18141
18151
  icon: string(),
18142
18152
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
18143
18153
  addonId: string(),
18144
- configSchema: ConfigSchemaPassthrough$1
18154
+ configSchema: ConfigSchemaPassthrough$3
18145
18155
  });
18146
18156
  var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
18147
18157
  var LlmDefaultSchema = object({
@@ -19281,7 +19291,7 @@ var TargetKindCapsSchema = object({
19281
19291
  * the union is large and not meant for runtime validation here; the exported
19282
19292
  * `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
19283
19293
  */
19284
- var ConfigSchemaPassthrough = unknown();
19294
+ var ConfigSchemaPassthrough$2 = unknown();
19285
19295
  var TargetKindSchema = object({
19286
19296
  kind: string(),
19287
19297
  label: string(),
@@ -19318,7 +19328,7 @@ var TargetKindSchema = object({
19318
19328
  * its raster path, which is the safe default for an unknown image.
19319
19329
  */
19320
19330
  iconMediaType: string().optional(),
19321
- configSchema: ConfigSchemaPassthrough,
19331
+ configSchema: ConfigSchemaPassthrough$2,
19322
19332
  /**
19323
19333
  * The config keys that decide WHERE this kind's secrets are sent (server,
19324
19334
  * base URL, instance, chat, recipient). A save that changes any of them
@@ -22617,6 +22627,61 @@ var OauthIntegrationDescriptorSchema = object({
22617
22627
  });
22618
22628
  method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" });
22619
22629
  /**
22630
+ * `oidc-connections` — CRUD for IdP rows under `auth-oidc` (D828 sibling).
22631
+ *
22632
+ * One hub-only singleton (`auth-oidc`). The Settings UI is a DataTable +
22633
+ * ItemFormDialog; there is no `editable-array` in `globalSettingsSchema`.
22634
+ * Operator-chosen `id` is the URL slug (`/addon/auth-oidc/<id>/…`) and is
22635
+ * immutable after create.
22636
+ */
22637
+ var ConfigSchemaPassthrough$1 = unknown();
22638
+ var OidcConnectionSchema = object({
22639
+ id: string().min(1),
22640
+ displayName: string(),
22641
+ icon: string(),
22642
+ issuerUrl: string(),
22643
+ clientId: string(),
22644
+ /** Client id + secret present — never the secret value. */
22645
+ configured: boolean(),
22646
+ /**
22647
+ * Values for the connection form schema. `clientSecret` is a keychain
22648
+ * {@link SecretFieldView} or `null` / `''`, never plaintext (D789).
22649
+ */
22650
+ formValues: record(string(), unknown()).optional()
22651
+ });
22652
+ /**
22653
+ * Patch one connection. Omitted or empty `clientSecret` keeps the stored
22654
+ * secret (D787). `{ $secretClear: true }` clears it. `id` is never renamed.
22655
+ */
22656
+ var OidcConnectionUpdateInputSchema = object({
22657
+ id: string().min(1),
22658
+ displayName: string().min(1),
22659
+ icon: string().optional(),
22660
+ issuerUrl: string().optional(),
22661
+ clientId: string().optional(),
22662
+ clientSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
22663
+ redirectUri: string().optional(),
22664
+ scopes: string().optional(),
22665
+ usernameClaim: _enum([
22666
+ "preferred_username",
22667
+ "email",
22668
+ "sub"
22669
+ ]).optional()
22670
+ });
22671
+ method(object({}), ConfigSchemaPassthrough$1, { auth: "admin" }), method(object({}), array(OidcConnectionSchema).readonly(), { auth: "admin" }), method(object({
22672
+ id: string().min(1).regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "id must be a lowercase slug"),
22673
+ displayName: string().min(1)
22674
+ }), object({ id: string() }), {
22675
+ kind: "mutation",
22676
+ auth: "admin"
22677
+ }), method(OidcConnectionUpdateInputSchema, object({ ok: literal(true) }), {
22678
+ kind: "mutation",
22679
+ auth: "admin"
22680
+ }), method(object({ id: string().min(1) }), object({ ok: literal(true) }), {
22681
+ kind: "mutation",
22682
+ auth: "admin"
22683
+ });
22684
+ /**
22620
22685
  * What started a camera's onboard motion (D672). `camera` is the camera's own
22621
22686
  * firmware; `sensor` is a device the operator ATTACHED to it. Absent on the
22622
22687
  * wire means the camera: only the camera-sensors bridge ever says `sensor`.
@@ -23973,24 +24038,69 @@ var RetrainFrameListSchema = object({
23973
24038
  /** What the page pre-selects — the native key frame when one survives. */
23974
24039
  autoPickMediaId: number().int().optional()
23975
24040
  });
24041
+ /** Exclusive partition of a corpus copy's annotation progress (design §4.2). */
24042
+ var RetrainFrameWorkStateSchema = _enum([
24043
+ "unannotated",
24044
+ "annotated",
24045
+ "complete"
24046
+ ]);
24047
+ /**
24048
+ * Filters for paginated corpus list, KPI, and matching export (design §4.4).
24049
+ * Every narrowing field is ANDed; omitted fields impose no constraint.
24050
+ */
24051
+ var RetrainCorpusFilterSchema = object({
24052
+ workState: RetrainFrameWorkStateSchema.optional(),
24053
+ deviceIds: array(number()).max(500).optional(),
24054
+ /** When set, only frames in this named collection. */
24055
+ collectionId: string().optional(),
24056
+ /** Frames that carry at least one saved annotation in one of these classes. */
24057
+ classes: array(RetrainMacroClassSchema).optional(),
24058
+ page: number().int().positive().default(1),
24059
+ pageSize: number().int().positive().max(100).default(50)
24060
+ });
24061
+ var RetrainCorpusPageSchema = object({
24062
+ frames: array(RetrainFrameSchema.extend({ workState: RetrainFrameWorkStateSchema })).readonly(),
24063
+ total: number().int().nonnegative(),
24064
+ page: number().int().positive(),
24065
+ pageSize: number().int().positive()
24066
+ });
24067
+ var RetrainCorpusKpiCameraRowSchema = object({
24068
+ deviceId: number(),
24069
+ unannotated: number().int().nonnegative(),
24070
+ annotated: number().int().nonnegative(),
24071
+ complete: number().int().nonnegative(),
24072
+ /** This camera's `complete` count divided by corpus `total`, in `[0,1]`.
24073
+ * `null` when the corpus is empty (no ratio). */
24074
+ pctOfCorpus: number().min(0).max(1).nullable()
24075
+ });
24076
+ var RetrainCorpusKpiSchema = object({
24077
+ total: number().int().nonnegative(),
24078
+ unannotated: number().int().nonnegative(),
24079
+ annotated: number().int().nonnegative(),
24080
+ complete: number().int().nonnegative(),
24081
+ cameras: array(RetrainCorpusKpiCameraRowSchema).readonly()
24082
+ });
23976
24083
  /**
23977
24084
  * Which frames an annotated export carries. Every field narrows; an empty
23978
- * filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
23979
- * list owned by whoever trains (the training orchestrator), so `frameIds` is
23980
- * the primitive a version export uses; `batchId` re-selects what an earlier
23981
- * export carried (`exportedInBatch`).
24085
+ * filter is every annotated copy. `frameIds` is the primitive a job or
24086
+ * download uses; `batchId` re-selects what an earlier export carried
24087
+ * (`exportedInBatch`). Frozen dataset versions were removed — live selection
24088
+ * resolves to `frameIds` at plan/start.
23982
24089
  */
23983
24090
  var RetrainExportFilterSchema = object({
23984
24091
  deviceIds: array(number()).optional(),
23985
24092
  frameIds: array(string()).max(2e4).optional(),
23986
24093
  /** Only frames in at least one of these named collections. */
23987
24094
  collectionIds: array(string()).max(200).optional(),
23988
- /** Exactly the frames of this dataset version (and its completeOnly). An
23989
- * unknown id selects nothing. */
23990
- datasetVersionId: string().optional(),
24095
+ /** Single collection (Frames filter bar). ANDed with `collectionIds` when both set. */
24096
+ collectionId: string().optional(),
23991
24097
  batchId: string().optional(),
23992
24098
  /** Only frames the operator marked complete (all subjects boxed). */
23993
- completeOnly: boolean().optional()
24099
+ completeOnly: boolean().optional(),
24100
+ /** Exclusive work-state partition (`workStateOf`); same as the corpus list. */
24101
+ workState: RetrainFrameWorkStateSchema.optional(),
24102
+ /** Frames with at least one saved annotation in one of these classes. */
24103
+ classes: array(RetrainMacroClassSchema).optional()
23994
24104
  });
23995
24105
  /**
23996
24106
  * `frames`: the full frame copies, boxes in `annotations.json`.
@@ -24190,8 +24300,7 @@ var RetrainDatasetStatsSchema = object({
24190
24300
  completeFrames: number().int()
24191
24301
  })).readonly()
24192
24302
  });
24193
- /** An immutable dataset version, without its frame list. */
24194
- var RetrainDatasetVersionSchema = object({
24303
+ object({
24195
24304
  id: string(),
24196
24305
  name: string(),
24197
24306
  createdAt: number(),
@@ -24199,22 +24308,33 @@ var RetrainDatasetVersionSchema = object({
24199
24308
  layout: RetrainExportLayoutSchema,
24200
24309
  completeOnly: boolean(),
24201
24310
  frameCount: number().int(),
24202
- /** sha256 of what the frames taught when the version was frozen. */
24203
24311
  annotationHash: string(),
24204
- /** The export manifest schema the version was cut under. */
24205
24312
  manifestSchema: string(),
24206
24313
  stats: RetrainDatasetStatsSchema
24207
24314
  });
24208
- var CreateRetrainDatasetVersionResultSchema = discriminatedUnion("kind", [object({
24209
- kind: literal("created"),
24210
- version: RetrainDatasetVersionSchema
24315
+ /**
24316
+ * Live training corpus criteria — same shape as `TrainingCorpusSelection` on
24317
+ * the training cap. Resolved here so plan/start and the annotated export share
24318
+ * one definition of "the frames" (`buildRetrainExportPlan`).
24319
+ */
24320
+ var RetrainTrainingCorpusSelectionSchema = object({
24321
+ collectionIds: array(string()).min(1),
24322
+ workState: _enum([
24323
+ "complete",
24324
+ "annotated_or_complete",
24325
+ "any_annotated"
24326
+ ]).default("complete")
24327
+ });
24328
+ var RetrainTrainingCorpusResolveResultSchema = discriminatedUnion("kind", [object({
24329
+ kind: literal("resolved"),
24330
+ frameIds: array(string()).max(2e4).readonly(),
24331
+ stats: RetrainDatasetStatsSchema,
24332
+ annotationHash: string(),
24333
+ layout: RetrainExportLayoutSchema
24211
24334
  }), object({
24212
24335
  kind: literal("refused"),
24213
- reason: _enum([
24214
- "empty-name",
24215
- "duplicate-name",
24216
- "no-frames"
24217
- ])
24336
+ reason: _enum(["unknown-collection", "no-frames"]),
24337
+ detail: string()
24218
24338
  })]);
24219
24339
  /** The outcome of a lifecycle move owned by the retrain page. */
24220
24340
  var RetrainTransitionResultSchema = object({
@@ -24921,6 +25041,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
24921
25041
  }), array(RetrainTrackSchema).readonly(), {
24922
25042
  kind: "query",
24923
25043
  auth: "admin"
25044
+ }), method(RetrainCorpusFilterSchema, RetrainCorpusPageSchema, {
25045
+ kind: "query",
25046
+ auth: "admin"
25047
+ }), method(object({}), RetrainCorpusKpiSchema, {
25048
+ kind: "query",
25049
+ auth: "admin"
24924
25050
  }), method(object({ trackId: string() }), RetrainFrameListSchema, {
24925
25051
  kind: "query",
24926
25052
  auth: "admin"
@@ -25016,36 +25142,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25016
25142
  kind: "mutation",
25017
25143
  auth: "admin",
25018
25144
  timeoutMs: 12e4
25019
- }), method(object({
25020
- selection: RetrainDatasetSelectionSchema,
25021
- completeOnly: boolean().optional()
25022
- }), RetrainDatasetStatsSchema, {
25023
- kind: "query",
25024
- auth: "admin"
25025
- }), method(object({
25026
- name: string().max(120),
25027
- selection: RetrainDatasetSelectionSchema,
25028
- layout: RetrainExportLayoutSchema,
25029
- completeOnly: boolean()
25030
- }), CreateRetrainDatasetVersionResultSchema, {
25031
- kind: "mutation",
25032
- auth: "admin",
25033
- timeoutMs: 12e4
25034
- }), method(object({}), array(RetrainDatasetVersionSchema).readonly(), {
25035
- kind: "query",
25036
- auth: "admin"
25037
- }), method(object({ id: string() }), object({ deleted: boolean() }), {
25038
- kind: "mutation",
25039
- auth: "admin"
25040
- }), method(object({ id: string() }), object({
25041
- found: boolean(),
25042
- annotationHash: string(),
25043
- matches: boolean(),
25044
- missingFrames: number().int()
25045
- }), {
25046
- kind: "query",
25047
- auth: "admin",
25048
- timeoutMs: 12e4
25049
25145
  }), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
25050
25146
  kind: "query",
25051
25147
  auth: "admin"
@@ -25072,6 +25168,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25072
25168
  }), method(object({}), array(RetrainCollectionSchema).readonly(), {
25073
25169
  kind: "query",
25074
25170
  auth: "admin"
25171
+ }), method(RetrainTrainingCorpusSelectionSchema, RetrainTrainingCorpusResolveResultSchema, {
25172
+ kind: "query",
25173
+ auth: "admin",
25174
+ timeoutMs: 6e4
25075
25175
  }), method(object({
25076
25176
  id: string(),
25077
25177
  name: string().max(120)
@@ -25688,11 +25788,14 @@ var HardwareClassIdSchema = _enum([
25688
25788
  "intel-n-series",
25689
25789
  "apple-m-base",
25690
25790
  "apple-m-pro",
25791
+ "amd-phoenix",
25691
25792
  "unknown"
25692
25793
  ]);
25693
25794
  var AcceleratorKindSchema = _enum([
25694
25795
  "intel-npu",
25695
25796
  "intel-igpu",
25797
+ "amd-igpu",
25798
+ "amd-npu",
25696
25799
  "x86-cpu",
25697
25800
  "arm-cpu",
25698
25801
  "apple-ane",
@@ -27582,6 +27685,8 @@ var AgentPipelineSettingsSchema = object({
27582
27685
  * address is wrong (multi-homed host, NAT, custom interface).
27583
27686
  */
27584
27687
  reachableHost: string().optional(),
27688
+ /** Hub-persisted UI colour (`--color-node-*` theme tokens). */
27689
+ color: NodeColorIdSchema.optional(),
27585
27690
  /**
27586
27691
  * Multi-device inference opt-in (Phase 4). Per-node map deviceKey → {enabled,
27587
27692
  * weight, steps}. Absent / all-disabled ⇒ the node's single default
@@ -28131,8 +28236,9 @@ method(object({
28131
28236
  auth: "admin"
28132
28237
  }), method(object({
28133
28238
  agentNodeId: string(),
28134
- reachableHost: string().nullable()
28135
- }), object({ success: literal(true) }), {
28239
+ reachableHost: string().nullable().optional(),
28240
+ color: NodeColorIdSchema.nullable().optional()
28241
+ }).refine((v) => v.reachableHost !== void 0 || v.color !== void 0, { message: "reachableHost or color required" }), object({ success: literal(true) }), {
28136
28242
  kind: "mutation",
28137
28243
  auth: "admin"
28138
28244
  }), method(object({
@@ -31179,7 +31285,7 @@ var CustomActionInputSchema = object({
31179
31285
  action: string().min(1),
31180
31286
  input: unknown()
31181
31287
  });
31182
- method(_void(), array(AddonListItemSchema).readonly()), method(object({
31288
+ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSchema).readonly()), method(object({
31183
31289
  addonId: string(),
31184
31290
  limit: number().min(1).max(500).default(100),
31185
31291
  level: LogLevelSchema$2.optional()
@@ -34726,7 +34832,13 @@ var TopologyNodeSchema = object({
34726
34832
  })).readonly(),
34727
34833
  processes: array(TopologyProcessSchema).readonly(),
34728
34834
  categories: array(TopologyCategorySchema).readonly(),
34729
- rootPackage: TopologyRootPackageSchema.nullable()
34835
+ rootPackage: TopologyRootPackageSchema.nullable(),
34836
+ /**
34837
+ * How an online AGENT reaches the hub (mesh mTLS Release A): `tls` once it has
34838
+ * completed a mutual-TLS handshake, `clear` otherwise. Absent for the hub,
34839
+ * for offline rows and when the hub cannot tell.
34840
+ */
34841
+ meshTransport: _enum(["tls", "clear"]).optional()
34730
34842
  });
34731
34843
  var CapUsageEdgeSchema = object({
34732
34844
  callerAddonId: string(),
@@ -35066,6 +35178,7 @@ var OsdNamedTemplateSchema = object({
35066
35178
  });
35067
35179
  /** Where a slot's value comes from. */
35068
35180
  var OsdSourceSchema = discriminatedUnion("kind", [
35181
+ object({ kind: literal("none") }),
35069
35182
  object({
35070
35183
  kind: literal("static"),
35071
35184
  text: string().max(64)
@@ -35192,6 +35305,13 @@ method(object({ deviceId: number().int() }), object({
35192
35305
  }), object({ success: literal(true) }), {
35193
35306
  kind: "mutation",
35194
35307
  auth: "admin"
35308
+ }), method(object({
35309
+ deviceId: number().int(),
35310
+ slotId: string().min(1),
35311
+ enabled: boolean()
35312
+ }), object({ success: literal(true) }), {
35313
+ kind: "mutation",
35314
+ auth: "admin"
35195
35315
  }), method(object({
35196
35316
  sourceDeviceId: number().int(),
35197
35317
  targetDeviceId: number().int()
@@ -35572,7 +35692,15 @@ var GpuInfoSchema = object({
35572
35692
  name: string(),
35573
35693
  memoryMB: number().optional()
35574
35694
  });
35575
- var NpuInfoSchema = object({ type: _enum(["apple-ane", "intel-npu"]) });
35695
+ var NpuInfoSchema = object({
35696
+ type: _enum([
35697
+ "apple-ane",
35698
+ "intel-npu",
35699
+ "amd-xdna"
35700
+ ]),
35701
+ name: string().optional(),
35702
+ generation: _enum(["xdna1", "xdna2"]).optional()
35703
+ });
35576
35704
  var CoralInfoSchema = object({
35577
35705
  type: literal("coral-edgetpu"),
35578
35706
  bus: string().optional()
@@ -39334,9 +39462,11 @@ DeviceType.Camera, method(object({
39334
39462
  * once is what makes a second provider (RunPod, a local NVIDIA node) a new
39335
39463
  * manifest entry and nothing else.
39336
39464
  *
39337
- * Collection, routed by the `addonId` in every single-row input (the `llm` /
39338
- * `notification-output` posture); `describe` concat-fans across providers.
39339
- * Every method is `admin`: these spend money.
39465
+ * Collection of provider **types** (addons). Each addon owns zero or more
39466
+ * **entries** (credentials + defaults). Concat-fans: `describe`,
39467
+ * `describeTypes`, `listEntries`, `listJobs`. Single-row work is keyed by
39468
+ * `entryId`; callers also pass the owning `addonId` as the collection
39469
+ * selector (broker posture). Every method is `admin`: these spend money.
39340
39470
  *
39341
39471
  * Every cloud object a provider creates is tagged with the orchestrator's
39342
39472
  * `jobKey`, so a retried submit finds the job it already started instead of
@@ -39360,8 +39490,8 @@ var TrainingRegionOptionSchema = object({
39360
39490
  priceMultiplier: number().positive()
39361
39491
  });
39362
39492
  /**
39363
- * The provider's per-account settings, as the orchestrator reads them. They
39364
- * live in the PROVIDER addon's settings (operator decision 2026-10-08: they
39493
+ * The provider's per-entry settings, as the orchestrator reads them. They
39494
+ * live on the PROVIDER addon's entry (operator decision 2026-10-08: they
39365
39495
  * depend on the user's account), never hard-coded in the orchestrator.
39366
39496
  */
39367
39497
  var TrainingProviderDefaultsSchema = object({
@@ -39372,9 +39502,44 @@ var TrainingProviderDefaultsSchema = object({
39372
39502
  /** Hours a FAILED job's cloud dataset is kept for debugging; 0 = delete at once. */
39373
39503
  failedDatasetGraceHours: number().nonnegative()
39374
39504
  });
39505
+ /**
39506
+ * Entry form schema for a provider type — same seam as notification
39507
+ * `TargetKind.configSchema` (`z.unknown()` at the wire; callers tighten to
39508
+ * {@link ConfigUISchema}). Drives `ConfigFormBuilder` on Training → Providers.
39509
+ */
39510
+ var ConfigSchemaPassthrough = unknown();
39511
+ /** One creatable provider type, for the Add-entry dialog. */
39512
+ var TrainingProviderTypeSchema = object({
39513
+ typeId: string(),
39514
+ label: string(),
39515
+ /** Path under the addon package (e.g. `assets/training-modal/icon.svg`). */
39516
+ iconAsset: string(),
39517
+ /** Owning `training-provider` addon — collection selector for createEntry. */
39518
+ addonId: string(),
39519
+ /**
39520
+ * Fields for one entry of this type (credentials + defaults). Absent on a
39521
+ * type that only needs a name. Password fields are keychain-backed on the
39522
+ * provider addon (`secretStatePaths`), not D634 plaintext.
39523
+ */
39524
+ configSchema: ConfigSchemaPassthrough.optional()
39525
+ });
39526
+ /** One configured account / workspace under a provider type. */
39527
+ var TrainingProviderEntrySchema = object({
39528
+ entryId: string(),
39529
+ typeId: string(),
39530
+ name: string(),
39531
+ addonId: string(),
39532
+ /** Credentials are present — never the values. */
39533
+ configured: boolean()
39534
+ });
39375
39535
  var TrainingProviderDescriptorSchema = object({
39376
39536
  addonId: string(),
39377
- /** `modal`, `runpod`, `fake`, … */
39537
+ entryId: string(),
39538
+ typeId: string(),
39539
+ /** Operator-chosen entry name. */
39540
+ name: string(),
39541
+ iconAsset: string(),
39542
+ /** `modal`, `runpod`, `fake`, … — same as typeId for current providers. */
39378
39543
  kind: string(),
39379
39544
  label: string(),
39380
39545
  gpuTypes: array(TrainingGpuOptionSchema).readonly(),
@@ -39386,7 +39551,30 @@ var TrainingProviderDescriptorSchema = object({
39386
39551
  dataResidencyNote: string(),
39387
39552
  /** Credentials are present — never the values. */
39388
39553
  configured: boolean(),
39389
- defaults: TrainingProviderDefaultsSchema
39554
+ defaults: TrainingProviderDefaultsSchema,
39555
+ /**
39556
+ * Values for {@link TrainingProviderTypeSchema}'s `configSchema` — password
39557
+ * fields are keychain {@link SecretFieldView} or `null` / `''` (create),
39558
+ * never plaintext. Same hydrate contract as settings forms (D789).
39559
+ */
39560
+ formValues: record(string(), unknown()).optional()
39561
+ });
39562
+ /**
39563
+ * Patch one entry's name, credentials and defaults. Pin with owning `{ addonId }`.
39564
+ * An omitted or empty `tokenSecret` means KEEP the stored secret (D787).
39565
+ * `{ $secretClear: true }` clears it.
39566
+ */
39567
+ var TrainingProviderUpdateEntryInputSchema = object({
39568
+ entryId: string().min(1),
39569
+ name: string().min(1),
39570
+ tokenId: string().optional(),
39571
+ tokenSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
39572
+ environment: string().optional(),
39573
+ gpuType: string().optional(),
39574
+ region: string().optional(),
39575
+ costCapUsd: number().nonnegative().optional(),
39576
+ maxRuntimeSec: number().int().positive().optional(),
39577
+ failedDatasetGraceHours: number().nonnegative().optional()
39390
39578
  });
39391
39579
  var TrainingCredentialCheckSchema = object({
39392
39580
  ok: boolean(),
@@ -39438,20 +39626,33 @@ var TrainerSourceRefSchema = object({
39438
39626
  /** A commit sha (never a branch) — the job must be reproducible. */
39439
39627
  revision: string().regex(/^[0-9a-f]{7,64}$/)
39440
39628
  });
39629
+ /** Cloud job identity — route with the owning addon's `addonId` selector. */
39441
39630
  var JobRef = {
39442
- addonId: string(),
39631
+ entryId: string().min(1),
39443
39632
  jobKey: string().uuid()
39444
39633
  };
39445
39634
  var TrainingLogLineSchema = object({
39446
39635
  ts: number(),
39447
39636
  text: string()
39448
39637
  });
39449
- method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({ addonId: string() }), TrainingCredentialCheckSchema, {
39638
+ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderTypeSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderEntrySchema).readonly(), { auth: "admin" }), method(object({
39639
+ typeId: string().min(1),
39640
+ name: string().min(1)
39641
+ }), object({ entryId: string() }), {
39642
+ kind: "mutation",
39643
+ auth: "admin"
39644
+ }), method(object({ entryId: string().min(1) }), object({ ok: literal(true) }), {
39645
+ kind: "mutation",
39646
+ auth: "admin"
39647
+ }), method(TrainingProviderUpdateEntryInputSchema, object({ ok: literal(true) }), {
39648
+ kind: "mutation",
39649
+ auth: "admin"
39650
+ }), method(object({ entryId: string().min(1) }), TrainingCredentialCheckSchema, {
39450
39651
  kind: "mutation",
39451
39652
  auth: "admin",
39452
39653
  timeoutMs: 3e4
39453
39654
  }), method(object({
39454
- addonId: string(),
39655
+ entryId: string().min(1),
39455
39656
  gpuType: string(),
39456
39657
  region: string(),
39457
39658
  datasetBytes: number().int().nonnegative(),
@@ -39517,7 +39718,7 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
39517
39718
  kind: "mutation",
39518
39719
  auth: "admin",
39519
39720
  timeoutMs: 5 * 6e4
39520
- }), method(object({ addonId: string() }), array(ProviderJobStatusSchema).readonly(), {
39721
+ }), method(object({ entryId: string().min(1).optional() }), array(ProviderJobStatusSchema).readonly(), {
39521
39722
  auth: "admin",
39522
39723
  timeoutMs: 2 * 6e4
39523
39724
  });
@@ -39527,20 +39728,31 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
39527
39728
  *
39528
39729
  * It owns what every provider must agree on, written once:
39529
39730
  *
39530
- * - **Dataset versions.** Taken over from pipeline-analytics (D796): the rows
39531
- * live here (D808); pipeline-analytics still CUTS a version (it owns the corpus and
39532
- * the export plan) and reaches this store through the five row methods
39533
- * below, so the Retrain page and the export did not change.
39534
39731
  * - **Jobs.** A persisted state machine, a reconcile loop against the
39535
39732
  * provider, a cost guard, a daily orphan sweep and the retention rules.
39536
39733
  * - **The return flow.** Verified artefacts → Model Studio
39537
39734
  * (`custom-model-registry.importModelBundle`) → canary on cameras →
39538
39735
  * rollback. Nothing is ever registered automatically.
39539
39736
  *
39737
+ * Plan/start takes a live {@link TrainingCorpusSelection} (collections +
39738
+ * work-state rule); frame ids are resolved via pipeline-analytics at that
39739
+ * moment and snapshotted on the job. No frozen dataset version.
39740
+ *
39540
39741
  * Every method is `admin`.
39541
39742
  */
39542
- /** A version WITH its frame list — what the export and a job read. */
39543
- var TrainingDatasetVersionRowSchema = RetrainDatasetVersionSchema.omit({ frameCount: true }).extend({ frameIds: array(string()).max(2e4).readonly() });
39743
+ /**
39744
+ * Live corpus criteria for plan/start (design §5.2). Default is complete-only.
39745
+ * Frame ids are resolved at plan/start — never a frozen version id.
39746
+ */
39747
+ var TrainingCorpusSelectionSchema = object({
39748
+ collectionIds: array(string()).min(1),
39749
+ /** Default complete-only for v1 */
39750
+ workState: _enum([
39751
+ "complete",
39752
+ "annotated_or_complete",
39753
+ "any_annotated"
39754
+ ]).default("complete")
39755
+ });
39544
39756
  /** A base model a detector job can fine-tune, and the baseline it is judged against. */
39545
39757
  var TrainingBaseModelSchema = object({
39546
39758
  modelId: string(),
@@ -39558,9 +39770,13 @@ var TrainingPresetSchema = _enum([
39558
39770
  "thorough"
39559
39771
  ]);
39560
39772
  var TrainingJobRequestSchema = object({
39561
- datasetVersionId: string().min(1),
39562
- /** The `training-provider` addon that runs it. */
39563
- addonId: string().min(1),
39773
+ /** Live collection + work-state criteria; resolved at plan/start. */
39774
+ selection: TrainingCorpusSelectionSchema,
39775
+ /**
39776
+ * The provider **entry** that runs it (credentials + defaults).
39777
+ * Resolve to an owning addon via `training-provider.describe` / `listEntries`.
39778
+ */
39779
+ entryId: string().min(1),
39564
39780
  gpuType: string().min(1),
39565
39781
  region: string(),
39566
39782
  baseModelId: string().min(1),
@@ -39619,6 +39835,7 @@ var TrainingJobPlanSchema = object({
39619
39835
  * result lives after the operator acted on it.
39620
39836
  */
39621
39837
  var TrainingJobStateSchema = _enum([
39838
+ "queued",
39622
39839
  "uploading",
39623
39840
  "submitted",
39624
39841
  "starting",
@@ -39672,6 +39889,11 @@ var TrainingJobSchema = object({
39672
39889
  createdAt: number(),
39673
39890
  updatedAt: number(),
39674
39891
  state: TrainingJobStateSchema,
39892
+ /**
39893
+ * Shared by every job enqueued together via `startJobBatch`.
39894
+ * `null` for a lone `startJob`. The engine advances queued siblings by this id.
39895
+ */
39896
+ batchId: string().nullable().default(null),
39675
39897
  stage: TrainingStageSchema.nullable(),
39676
39898
  failure: object({
39677
39899
  reason: TrainingFailureReasonSchema,
@@ -39683,6 +39905,12 @@ var TrainingJobSchema = object({
39683
39905
  maxRuntimeSec: number().int().positive(),
39684
39906
  trainer: TrainerSourceRefSchema,
39685
39907
  datasetLayout: RetrainExportLayoutSchema,
39908
+ /** Frame count snapshotted when the job started (audit; equals `frameIds.length`). */
39909
+ frameCount: number().int().nonnegative(),
39910
+ /** Resolved frame ids at start — the archive ships exactly these. */
39911
+ frameIds: array(string()).max(2e4).readonly(),
39912
+ /** Hash of what those frames taught at start (trainer `dataset.annotationHash`). */
39913
+ annotationHash: string(),
39686
39914
  dataset: object({
39687
39915
  bytes: number().int(),
39688
39916
  sha256: string(),
@@ -39724,13 +39952,7 @@ var TrainingJobSchema = object({
39724
39952
  canary: TrainingCanarySchema.nullable()
39725
39953
  });
39726
39954
  var IdInput = object({ id: string().min(1) });
39727
- method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
39728
- kind: "mutation",
39729
- auth: "admin"
39730
- }), 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() }), {
39731
- kind: "mutation",
39732
- auth: "admin"
39733
- }), method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
39955
+ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
39734
39956
  auth: "admin",
39735
39957
  timeoutMs: 6e4
39736
39958
  }), method(TrainingJobRequestSchema.extend({
@@ -39749,6 +39971,24 @@ method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
39749
39971
  kind: "mutation",
39750
39972
  auth: "admin",
39751
39973
  timeoutMs: 12e4
39974
+ }), method(TrainingJobRequestSchema.omit({ baseModelId: true }).extend({
39975
+ baseModelIds: array(string().min(1)).min(1),
39976
+ name: string().min(1).max(120),
39977
+ maxCostUsd: number().positive(),
39978
+ maxRuntimeSec: number().int().positive(),
39979
+ idempotencyKey: string().min(8).max(80)
39980
+ }), discriminatedUnion("kind", [object({
39981
+ kind: literal("started"),
39982
+ batchId: string(),
39983
+ jobs: array(TrainingJobSchema).min(1).readonly()
39984
+ }), object({
39985
+ kind: literal("refused"),
39986
+ reason: TrainingRefusalReasonSchema,
39987
+ detail: string()
39988
+ })]), {
39989
+ kind: "mutation",
39990
+ auth: "admin",
39991
+ timeoutMs: 12e4
39752
39992
  }), method(object({}), array(TrainingJobSchema).readonly(), { auth: "admin" }), method(IdInput, TrainingJobSchema.nullable(), { auth: "admin" }), method(IdInput, TrainingJobSchema, {
39753
39993
  kind: "mutation",
39754
39994
  auth: "admin",
@@ -43782,6 +44022,36 @@ Object.freeze({
43782
44022
  addonId: null,
43783
44023
  access: "view"
43784
44024
  },
44025
+ "oidcConnections.connectionFormSchema": {
44026
+ capName: "oidc-connections",
44027
+ capScope: "system",
44028
+ addonId: null,
44029
+ access: "view"
44030
+ },
44031
+ "oidcConnections.createConnection": {
44032
+ capName: "oidc-connections",
44033
+ capScope: "system",
44034
+ addonId: null,
44035
+ access: "create"
44036
+ },
44037
+ "oidcConnections.deleteConnection": {
44038
+ capName: "oidc-connections",
44039
+ capScope: "system",
44040
+ addonId: null,
44041
+ access: "delete"
44042
+ },
44043
+ "oidcConnections.listConnections": {
44044
+ capName: "oidc-connections",
44045
+ capScope: "system",
44046
+ addonId: null,
44047
+ access: "view"
44048
+ },
44049
+ "oidcConnections.updateConnection": {
44050
+ capName: "oidc-connections",
44051
+ capScope: "system",
44052
+ addonId: null,
44053
+ access: "create"
44054
+ },
43785
44055
  "osd.getStatus": {
43786
44056
  capName: "osd",
43787
44057
  capScope: "device",
@@ -43854,6 +44124,12 @@ Object.freeze({
43854
44124
  addonId: null,
43855
44125
  access: "create"
43856
44126
  },
44127
+ "osdManager.setSlotCameraEnabled": {
44128
+ capName: "osd-manager",
44129
+ capScope: "system",
44130
+ addonId: null,
44131
+ access: "create"
44132
+ },
43857
44133
  "osdManager.upsertTemplate": {
43858
44134
  capName: "osd-manager",
43859
44135
  capScope: "system",
@@ -43992,12 +44268,6 @@ Object.freeze({
43992
44268
  addonId: null,
43993
44269
  access: "create"
43994
44270
  },
43995
- "pipelineAnalytics.createRetrainDatasetVersion": {
43996
- capName: "pipeline-analytics",
43997
- capScope: "device",
43998
- addonId: null,
43999
- access: "create"
44000
- },
44001
44271
  "pipelineAnalytics.deleteDeviceEvents": {
44002
44272
  capName: "pipeline-analytics",
44003
44273
  capScope: "device",
@@ -44010,12 +44280,6 @@ Object.freeze({
44010
44280
  addonId: null,
44011
44281
  access: "delete"
44012
44282
  },
44013
- "pipelineAnalytics.deleteRetrainDatasetVersion": {
44014
- capName: "pipeline-analytics",
44015
- capScope: "device",
44016
- addonId: null,
44017
- access: "delete"
44018
- },
44019
44283
  "pipelineAnalytics.deleteTracks": {
44020
44284
  capName: "pipeline-analytics",
44021
44285
  capScope: "device",
@@ -44118,6 +44382,12 @@ Object.freeze({
44118
44382
  addonId: null,
44119
44383
  access: "view"
44120
44384
  },
44385
+ "pipelineAnalytics.getRetrainCorpusKpi": {
44386
+ capName: "pipeline-analytics",
44387
+ capScope: "device",
44388
+ addonId: null,
44389
+ access: "view"
44390
+ },
44121
44391
  "pipelineAnalytics.getRetrainExportUrl": {
44122
44392
  capName: "pipeline-analytics",
44123
44393
  capScope: "device",
@@ -44238,7 +44508,7 @@ Object.freeze({
44238
44508
  addonId: null,
44239
44509
  access: "view"
44240
44510
  },
44241
- "pipelineAnalytics.listRetrainDatasetVersions": {
44511
+ "pipelineAnalytics.listRetrainCorpusPage": {
44242
44512
  capName: "pipeline-analytics",
44243
44513
  capScope: "device",
44244
44514
  addonId: null,
@@ -44292,12 +44562,6 @@ Object.freeze({
44292
44562
  addonId: null,
44293
44563
  access: "create"
44294
44564
  },
44295
- "pipelineAnalytics.previewRetrainDataset": {
44296
- capName: "pipeline-analytics",
44297
- capScope: "device",
44298
- addonId: null,
44299
- access: "view"
44300
- },
44301
44565
  "pipelineAnalytics.proposeRetrainAnnotations": {
44302
44566
  capName: "pipeline-analytics",
44303
44567
  capScope: "device",
@@ -44376,6 +44640,12 @@ Object.freeze({
44376
44640
  addonId: null,
44377
44641
  access: "create"
44378
44642
  },
44643
+ "pipelineAnalytics.resolveRetrainTrainingCorpus": {
44644
+ capName: "pipeline-analytics",
44645
+ capScope: "device",
44646
+ addonId: null,
44647
+ access: "view"
44648
+ },
44379
44649
  "pipelineAnalytics.restageRetrainTrack": {
44380
44650
  capName: "pipeline-analytics",
44381
44651
  capScope: "device",
@@ -44436,12 +44706,6 @@ Object.freeze({
44436
44706
  addonId: null,
44437
44707
  access: "create"
44438
44708
  },
44439
- "pipelineAnalytics.verifyRetrainDatasetVersion": {
44440
- capName: "pipeline-analytics",
44441
- capScope: "device",
44442
- addonId: null,
44443
- access: "view"
44444
- },
44445
44709
  "pipelineAnalytics.wipeAllAnalytics": {
44446
44710
  capName: "pipeline-analytics",
44447
44711
  capScope: "device",
@@ -46836,18 +47100,6 @@ Object.freeze({
46836
47100
  addonId: null,
46837
47101
  access: "create"
46838
47102
  },
46839
- "training.findDatasetVersionIdByName": {
46840
- capName: "training",
46841
- capScope: "system",
46842
- addonId: null,
46843
- access: "view"
46844
- },
46845
- "training.getDatasetVersion": {
46846
- capName: "training",
46847
- capScope: "system",
46848
- addonId: null,
46849
- access: "view"
46850
- },
46851
47103
  "training.getJob": {
46852
47104
  capName: "training",
46853
47105
  capScope: "system",
@@ -46866,12 +47118,6 @@ Object.freeze({
46866
47118
  addonId: null,
46867
47119
  access: "view"
46868
47120
  },
46869
- "training.listDatasetVersions": {
46870
- capName: "training",
46871
- capScope: "system",
46872
- addonId: null,
46873
- access: "view"
46874
- },
46875
47121
  "training.listJobs": {
46876
47122
  capName: "training",
46877
47123
  capScope: "system",
@@ -46884,54 +47130,66 @@ Object.freeze({
46884
47130
  addonId: null,
46885
47131
  access: "view"
46886
47132
  },
46887
- "training.putDatasetVersion": {
47133
+ "training.registerResult": {
46888
47134
  capName: "training",
46889
47135
  capScope: "system",
46890
47136
  addonId: null,
46891
47137
  access: "create"
46892
47138
  },
46893
- "training.registerResult": {
47139
+ "training.rollbackCanary": {
46894
47140
  capName: "training",
46895
47141
  capScope: "system",
46896
47142
  addonId: null,
46897
47143
  access: "create"
46898
47144
  },
46899
- "training.removeDatasetVersion": {
47145
+ "training.startJob": {
46900
47146
  capName: "training",
46901
47147
  capScope: "system",
46902
47148
  addonId: null,
46903
- access: "delete"
47149
+ access: "create"
46904
47150
  },
46905
- "training.rollbackCanary": {
47151
+ "training.startJobBatch": {
46906
47152
  capName: "training",
46907
47153
  capScope: "system",
46908
47154
  addonId: null,
46909
47155
  access: "create"
46910
47156
  },
46911
- "training.startJob": {
46912
- capName: "training",
47157
+ "trainingProvider.cancelJob": {
47158
+ capName: "training-provider",
46913
47159
  capScope: "system",
46914
47160
  addonId: null,
46915
47161
  access: "create"
46916
47162
  },
46917
- "trainingProvider.cancelJob": {
47163
+ "trainingProvider.cleanupJob": {
46918
47164
  capName: "training-provider",
46919
47165
  capScope: "system",
46920
47166
  addonId: null,
46921
47167
  access: "create"
46922
47168
  },
46923
- "trainingProvider.cleanupJob": {
47169
+ "trainingProvider.createEntry": {
46924
47170
  capName: "training-provider",
46925
47171
  capScope: "system",
46926
47172
  addonId: null,
46927
47173
  access: "create"
46928
47174
  },
47175
+ "trainingProvider.deleteEntry": {
47176
+ capName: "training-provider",
47177
+ capScope: "system",
47178
+ addonId: null,
47179
+ access: "delete"
47180
+ },
46929
47181
  "trainingProvider.describe": {
46930
47182
  capName: "training-provider",
46931
47183
  capScope: "system",
46932
47184
  addonId: null,
46933
47185
  access: "view"
46934
47186
  },
47187
+ "trainingProvider.describeTypes": {
47188
+ capName: "training-provider",
47189
+ capScope: "system",
47190
+ addonId: null,
47191
+ access: "view"
47192
+ },
46935
47193
  "trainingProvider.estimateJob": {
46936
47194
  capName: "training-provider",
46937
47195
  capScope: "system",
@@ -46944,6 +47202,12 @@ Object.freeze({
46944
47202
  addonId: null,
46945
47203
  access: "view"
46946
47204
  },
47205
+ "trainingProvider.listEntries": {
47206
+ capName: "training-provider",
47207
+ capScope: "system",
47208
+ addonId: null,
47209
+ access: "view"
47210
+ },
46947
47211
  "trainingProvider.listJobEvents": {
46948
47212
  capName: "training-provider",
46949
47213
  capScope: "system",
@@ -46974,6 +47238,12 @@ Object.freeze({
46974
47238
  addonId: null,
46975
47239
  access: "create"
46976
47240
  },
47241
+ "trainingProvider.updateEntry": {
47242
+ capName: "training-provider",
47243
+ capScope: "system",
47244
+ addonId: null,
47245
+ access: "create"
47246
+ },
46977
47247
  "trainingProvider.uploadDataset": {
46978
47248
  capName: "training-provider",
46979
47249
  capScope: "system",
@@ -50180,6 +50450,11 @@ Object.freeze({
50180
50450
  form: "single",
50181
50451
  optional: false
50182
50452
  }],
50453
+ "osdManager.setSlotCameraEnabled": [{
50454
+ name: "deviceId",
50455
+ form: "single",
50456
+ optional: false
50457
+ }],
50183
50458
  "petFeeder.callPet": [{
50184
50459
  name: "deviceId",
50185
50460
  form: "single",
@@ -50400,6 +50675,11 @@ Object.freeze({
50400
50675
  form: "array",
50401
50676
  optional: false
50402
50677
  }],
50678
+ "pipelineAnalytics.listRetrainCorpusPage": [{
50679
+ name: "deviceIds",
50680
+ form: "array",
50681
+ optional: true
50682
+ }],
50403
50683
  "pipelineAnalytics.listRetrainStaging": [{
50404
50684
  name: "deviceIds",
50405
50685
  form: "array",
@@ -51509,6 +51789,7 @@ Object.freeze({
51509
51789
  });
51510
51790
  Object.freeze({
51511
51791
  "broker": "broker",
51792
+ "calendar-source": "calendar",
51512
51793
  "device-export": "device-export",
51513
51794
  "llm": "ai",
51514
51795
  "mesh-network": "mesh",
@@ -51994,6 +52275,8 @@ var STATE_SUMMARY_VARS = [
51994
52275
  [...RULE_TEXT],
51995
52276
  [...RULE_TEXT],
51996
52277
  [...RULE_TEXT],
52278
+ [...RULE_TEXT],
52279
+ [...RULE_TEXT],
51997
52280
  ([...RULE_TEXT], [...UPDATES]),
51998
52281
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),
51999
52282
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),