@camstack/addon-mqtt-broker 1.2.123 → 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.
@@ -5424,7 +5424,7 @@ var ZodIssueCode = {
5424
5424
  var ZodFirstPartyTypeKind;
5425
5425
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5426
5426
  //#endregion
5427
- //#region ../types/dist/sleep-r3RWkGVx.mjs
5427
+ //#region ../types/dist/sleep-DwAQ9sqX.mjs
5428
5428
  /**
5429
5429
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5430
5430
  * window to float samples (D455).
@@ -9353,6 +9353,16 @@ var CompositionSchema = object({
9353
9353
  seen.add(feature.cap);
9354
9354
  });
9355
9355
  });
9356
+ var NodeColorIdSchema = _enum([
9357
+ "node-a",
9358
+ "node-b",
9359
+ "node-c",
9360
+ "node-d",
9361
+ "node-e",
9362
+ "node-f",
9363
+ "node-g",
9364
+ "node-h"
9365
+ ]);
9356
9366
  new Set([
9357
9367
  "track",
9358
9368
  "face",
@@ -18141,14 +18151,14 @@ var LlmProfileSchema = object({
18141
18151
  /** ConfigUISchema tree passed through untyped on the wire (the
18142
18152
  * notification-output `ConfigSchemaPassthrough` precedent at
18143
18153
  * notification-output.cap.ts:151); the exported TS type re-tightens it. */
18144
- var ConfigSchemaPassthrough$1 = unknown();
18154
+ var ConfigSchemaPassthrough$3 = unknown();
18145
18155
  var LlmProfileKindDescriptorSchema = object({
18146
18156
  kind: LlmProfileKindSchema,
18147
18157
  label: string(),
18148
18158
  icon: string(),
18149
18159
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
18150
18160
  addonId: string(),
18151
- configSchema: ConfigSchemaPassthrough$1
18161
+ configSchema: ConfigSchemaPassthrough$3
18152
18162
  });
18153
18163
  var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
18154
18164
  var LlmDefaultSchema = object({
@@ -19288,7 +19298,7 @@ var TargetKindCapsSchema = object({
19288
19298
  * the union is large and not meant for runtime validation here; the exported
19289
19299
  * `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
19290
19300
  */
19291
- var ConfigSchemaPassthrough = unknown();
19301
+ var ConfigSchemaPassthrough$2 = unknown();
19292
19302
  var TargetKindSchema = object({
19293
19303
  kind: string(),
19294
19304
  label: string(),
@@ -19325,7 +19335,7 @@ var TargetKindSchema = object({
19325
19335
  * its raster path, which is the safe default for an unknown image.
19326
19336
  */
19327
19337
  iconMediaType: string().optional(),
19328
- configSchema: ConfigSchemaPassthrough,
19338
+ configSchema: ConfigSchemaPassthrough$2,
19329
19339
  /**
19330
19340
  * The config keys that decide WHERE this kind's secrets are sent (server,
19331
19341
  * base URL, instance, chat, recipient). A save that changes any of them
@@ -22624,6 +22634,61 @@ var OauthIntegrationDescriptorSchema = object({
22624
22634
  });
22625
22635
  method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" });
22626
22636
  /**
22637
+ * `oidc-connections` — CRUD for IdP rows under `auth-oidc` (D828 sibling).
22638
+ *
22639
+ * One hub-only singleton (`auth-oidc`). The Settings UI is a DataTable +
22640
+ * ItemFormDialog; there is no `editable-array` in `globalSettingsSchema`.
22641
+ * Operator-chosen `id` is the URL slug (`/addon/auth-oidc/<id>/…`) and is
22642
+ * immutable after create.
22643
+ */
22644
+ var ConfigSchemaPassthrough$1 = unknown();
22645
+ var OidcConnectionSchema = object({
22646
+ id: string().min(1),
22647
+ displayName: string(),
22648
+ icon: string(),
22649
+ issuerUrl: string(),
22650
+ clientId: string(),
22651
+ /** Client id + secret present — never the secret value. */
22652
+ configured: boolean(),
22653
+ /**
22654
+ * Values for the connection form schema. `clientSecret` is a keychain
22655
+ * {@link SecretFieldView} or `null` / `''`, never plaintext (D789).
22656
+ */
22657
+ formValues: record(string(), unknown()).optional()
22658
+ });
22659
+ /**
22660
+ * Patch one connection. Omitted or empty `clientSecret` keeps the stored
22661
+ * secret (D787). `{ $secretClear: true }` clears it. `id` is never renamed.
22662
+ */
22663
+ var OidcConnectionUpdateInputSchema = object({
22664
+ id: string().min(1),
22665
+ displayName: string().min(1),
22666
+ icon: string().optional(),
22667
+ issuerUrl: string().optional(),
22668
+ clientId: string().optional(),
22669
+ clientSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
22670
+ redirectUri: string().optional(),
22671
+ scopes: string().optional(),
22672
+ usernameClaim: _enum([
22673
+ "preferred_username",
22674
+ "email",
22675
+ "sub"
22676
+ ]).optional()
22677
+ });
22678
+ method(object({}), ConfigSchemaPassthrough$1, { auth: "admin" }), method(object({}), array(OidcConnectionSchema).readonly(), { auth: "admin" }), method(object({
22679
+ id: string().min(1).regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "id must be a lowercase slug"),
22680
+ displayName: string().min(1)
22681
+ }), object({ id: string() }), {
22682
+ kind: "mutation",
22683
+ auth: "admin"
22684
+ }), method(OidcConnectionUpdateInputSchema, object({ ok: literal(true) }), {
22685
+ kind: "mutation",
22686
+ auth: "admin"
22687
+ }), method(object({ id: string().min(1) }), object({ ok: literal(true) }), {
22688
+ kind: "mutation",
22689
+ auth: "admin"
22690
+ });
22691
+ /**
22627
22692
  * What started a camera's onboard motion (D672). `camera` is the camera's own
22628
22693
  * firmware; `sensor` is a device the operator ATTACHED to it. Absent on the
22629
22694
  * wire means the camera: only the camera-sensors bridge ever says `sensor`.
@@ -23980,24 +24045,69 @@ var RetrainFrameListSchema = object({
23980
24045
  /** What the page pre-selects — the native key frame when one survives. */
23981
24046
  autoPickMediaId: number().int().optional()
23982
24047
  });
24048
+ /** Exclusive partition of a corpus copy's annotation progress (design §4.2). */
24049
+ var RetrainFrameWorkStateSchema = _enum([
24050
+ "unannotated",
24051
+ "annotated",
24052
+ "complete"
24053
+ ]);
24054
+ /**
24055
+ * Filters for paginated corpus list, KPI, and matching export (design §4.4).
24056
+ * Every narrowing field is ANDed; omitted fields impose no constraint.
24057
+ */
24058
+ var RetrainCorpusFilterSchema = object({
24059
+ workState: RetrainFrameWorkStateSchema.optional(),
24060
+ deviceIds: array(number()).max(500).optional(),
24061
+ /** When set, only frames in this named collection. */
24062
+ collectionId: string().optional(),
24063
+ /** Frames that carry at least one saved annotation in one of these classes. */
24064
+ classes: array(RetrainMacroClassSchema).optional(),
24065
+ page: number().int().positive().default(1),
24066
+ pageSize: number().int().positive().max(100).default(50)
24067
+ });
24068
+ var RetrainCorpusPageSchema = object({
24069
+ frames: array(RetrainFrameSchema.extend({ workState: RetrainFrameWorkStateSchema })).readonly(),
24070
+ total: number().int().nonnegative(),
24071
+ page: number().int().positive(),
24072
+ pageSize: number().int().positive()
24073
+ });
24074
+ var RetrainCorpusKpiCameraRowSchema = object({
24075
+ deviceId: number(),
24076
+ unannotated: number().int().nonnegative(),
24077
+ annotated: number().int().nonnegative(),
24078
+ complete: number().int().nonnegative(),
24079
+ /** This camera's `complete` count divided by corpus `total`, in `[0,1]`.
24080
+ * `null` when the corpus is empty (no ratio). */
24081
+ pctOfCorpus: number().min(0).max(1).nullable()
24082
+ });
24083
+ var RetrainCorpusKpiSchema = object({
24084
+ total: number().int().nonnegative(),
24085
+ unannotated: number().int().nonnegative(),
24086
+ annotated: number().int().nonnegative(),
24087
+ complete: number().int().nonnegative(),
24088
+ cameras: array(RetrainCorpusKpiCameraRowSchema).readonly()
24089
+ });
23983
24090
  /**
23984
24091
  * Which frames an annotated export carries. Every field narrows; an empty
23985
- * filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
23986
- * list owned by whoever trains (the training orchestrator), so `frameIds` is
23987
- * the primitive a version export uses; `batchId` re-selects what an earlier
23988
- * export carried (`exportedInBatch`).
24092
+ * filter is every annotated copy. `frameIds` is the primitive a job or
24093
+ * download uses; `batchId` re-selects what an earlier export carried
24094
+ * (`exportedInBatch`). Frozen dataset versions were removed — live selection
24095
+ * resolves to `frameIds` at plan/start.
23989
24096
  */
23990
24097
  var RetrainExportFilterSchema = object({
23991
24098
  deviceIds: array(number()).optional(),
23992
24099
  frameIds: array(string()).max(2e4).optional(),
23993
24100
  /** Only frames in at least one of these named collections. */
23994
24101
  collectionIds: array(string()).max(200).optional(),
23995
- /** Exactly the frames of this dataset version (and its completeOnly). An
23996
- * unknown id selects nothing. */
23997
- datasetVersionId: string().optional(),
24102
+ /** Single collection (Frames filter bar). ANDed with `collectionIds` when both set. */
24103
+ collectionId: string().optional(),
23998
24104
  batchId: string().optional(),
23999
24105
  /** Only frames the operator marked complete (all subjects boxed). */
24000
- completeOnly: boolean().optional()
24106
+ completeOnly: boolean().optional(),
24107
+ /** Exclusive work-state partition (`workStateOf`); same as the corpus list. */
24108
+ workState: RetrainFrameWorkStateSchema.optional(),
24109
+ /** Frames with at least one saved annotation in one of these classes. */
24110
+ classes: array(RetrainMacroClassSchema).optional()
24001
24111
  });
24002
24112
  /**
24003
24113
  * `frames`: the full frame copies, boxes in `annotations.json`.
@@ -24197,8 +24307,7 @@ var RetrainDatasetStatsSchema = object({
24197
24307
  completeFrames: number().int()
24198
24308
  })).readonly()
24199
24309
  });
24200
- /** An immutable dataset version, without its frame list. */
24201
- var RetrainDatasetVersionSchema = object({
24310
+ object({
24202
24311
  id: string(),
24203
24312
  name: string(),
24204
24313
  createdAt: number(),
@@ -24206,22 +24315,33 @@ var RetrainDatasetVersionSchema = object({
24206
24315
  layout: RetrainExportLayoutSchema,
24207
24316
  completeOnly: boolean(),
24208
24317
  frameCount: number().int(),
24209
- /** sha256 of what the frames taught when the version was frozen. */
24210
24318
  annotationHash: string(),
24211
- /** The export manifest schema the version was cut under. */
24212
24319
  manifestSchema: string(),
24213
24320
  stats: RetrainDatasetStatsSchema
24214
24321
  });
24215
- var CreateRetrainDatasetVersionResultSchema = discriminatedUnion("kind", [object({
24216
- kind: literal("created"),
24217
- version: RetrainDatasetVersionSchema
24322
+ /**
24323
+ * Live training corpus criteria — same shape as `TrainingCorpusSelection` on
24324
+ * the training cap. Resolved here so plan/start and the annotated export share
24325
+ * one definition of "the frames" (`buildRetrainExportPlan`).
24326
+ */
24327
+ var RetrainTrainingCorpusSelectionSchema = object({
24328
+ collectionIds: array(string()).min(1),
24329
+ workState: _enum([
24330
+ "complete",
24331
+ "annotated_or_complete",
24332
+ "any_annotated"
24333
+ ]).default("complete")
24334
+ });
24335
+ var RetrainTrainingCorpusResolveResultSchema = discriminatedUnion("kind", [object({
24336
+ kind: literal("resolved"),
24337
+ frameIds: array(string()).max(2e4).readonly(),
24338
+ stats: RetrainDatasetStatsSchema,
24339
+ annotationHash: string(),
24340
+ layout: RetrainExportLayoutSchema
24218
24341
  }), object({
24219
24342
  kind: literal("refused"),
24220
- reason: _enum([
24221
- "empty-name",
24222
- "duplicate-name",
24223
- "no-frames"
24224
- ])
24343
+ reason: _enum(["unknown-collection", "no-frames"]),
24344
+ detail: string()
24225
24345
  })]);
24226
24346
  /** The outcome of a lifecycle move owned by the retrain page. */
24227
24347
  var RetrainTransitionResultSchema = object({
@@ -24928,6 +25048,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
24928
25048
  }), array(RetrainTrackSchema).readonly(), {
24929
25049
  kind: "query",
24930
25050
  auth: "admin"
25051
+ }), method(RetrainCorpusFilterSchema, RetrainCorpusPageSchema, {
25052
+ kind: "query",
25053
+ auth: "admin"
25054
+ }), method(object({}), RetrainCorpusKpiSchema, {
25055
+ kind: "query",
25056
+ auth: "admin"
24931
25057
  }), method(object({ trackId: string() }), RetrainFrameListSchema, {
24932
25058
  kind: "query",
24933
25059
  auth: "admin"
@@ -25023,36 +25149,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25023
25149
  kind: "mutation",
25024
25150
  auth: "admin",
25025
25151
  timeoutMs: 12e4
25026
- }), method(object({
25027
- selection: RetrainDatasetSelectionSchema,
25028
- completeOnly: boolean().optional()
25029
- }), RetrainDatasetStatsSchema, {
25030
- kind: "query",
25031
- auth: "admin"
25032
- }), method(object({
25033
- name: string().max(120),
25034
- selection: RetrainDatasetSelectionSchema,
25035
- layout: RetrainExportLayoutSchema,
25036
- completeOnly: boolean()
25037
- }), CreateRetrainDatasetVersionResultSchema, {
25038
- kind: "mutation",
25039
- auth: "admin",
25040
- timeoutMs: 12e4
25041
- }), method(object({}), array(RetrainDatasetVersionSchema).readonly(), {
25042
- kind: "query",
25043
- auth: "admin"
25044
- }), method(object({ id: string() }), object({ deleted: boolean() }), {
25045
- kind: "mutation",
25046
- auth: "admin"
25047
- }), method(object({ id: string() }), object({
25048
- found: boolean(),
25049
- annotationHash: string(),
25050
- matches: boolean(),
25051
- missingFrames: number().int()
25052
- }), {
25053
- kind: "query",
25054
- auth: "admin",
25055
- timeoutMs: 12e4
25056
25152
  }), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
25057
25153
  kind: "query",
25058
25154
  auth: "admin"
@@ -25079,6 +25175,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25079
25175
  }), method(object({}), array(RetrainCollectionSchema).readonly(), {
25080
25176
  kind: "query",
25081
25177
  auth: "admin"
25178
+ }), method(RetrainTrainingCorpusSelectionSchema, RetrainTrainingCorpusResolveResultSchema, {
25179
+ kind: "query",
25180
+ auth: "admin",
25181
+ timeoutMs: 6e4
25082
25182
  }), method(object({
25083
25183
  id: string(),
25084
25184
  name: string().max(120)
@@ -25695,11 +25795,14 @@ var HardwareClassIdSchema = _enum([
25695
25795
  "intel-n-series",
25696
25796
  "apple-m-base",
25697
25797
  "apple-m-pro",
25798
+ "amd-phoenix",
25698
25799
  "unknown"
25699
25800
  ]);
25700
25801
  var AcceleratorKindSchema = _enum([
25701
25802
  "intel-npu",
25702
25803
  "intel-igpu",
25804
+ "amd-igpu",
25805
+ "amd-npu",
25703
25806
  "x86-cpu",
25704
25807
  "arm-cpu",
25705
25808
  "apple-ane",
@@ -27589,6 +27692,8 @@ var AgentPipelineSettingsSchema = object({
27589
27692
  * address is wrong (multi-homed host, NAT, custom interface).
27590
27693
  */
27591
27694
  reachableHost: string().optional(),
27695
+ /** Hub-persisted UI colour (`--color-node-*` theme tokens). */
27696
+ color: NodeColorIdSchema.optional(),
27592
27697
  /**
27593
27698
  * Multi-device inference opt-in (Phase 4). Per-node map deviceKey → {enabled,
27594
27699
  * weight, steps}. Absent / all-disabled ⇒ the node's single default
@@ -28138,8 +28243,9 @@ method(object({
28138
28243
  auth: "admin"
28139
28244
  }), method(object({
28140
28245
  agentNodeId: string(),
28141
- reachableHost: string().nullable()
28142
- }), object({ success: literal(true) }), {
28246
+ reachableHost: string().nullable().optional(),
28247
+ color: NodeColorIdSchema.nullable().optional()
28248
+ }).refine((v) => v.reachableHost !== void 0 || v.color !== void 0, { message: "reachableHost or color required" }), object({ success: literal(true) }), {
28143
28249
  kind: "mutation",
28144
28250
  auth: "admin"
28145
28251
  }), method(object({
@@ -31186,7 +31292,7 @@ var CustomActionInputSchema = object({
31186
31292
  action: string().min(1),
31187
31293
  input: unknown()
31188
31294
  });
31189
- method(_void(), array(AddonListItemSchema).readonly()), method(object({
31295
+ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSchema).readonly()), method(object({
31190
31296
  addonId: string(),
31191
31297
  limit: number().min(1).max(500).default(100),
31192
31298
  level: LogLevelSchema$2.optional()
@@ -35079,6 +35185,7 @@ var OsdNamedTemplateSchema = object({
35079
35185
  });
35080
35186
  /** Where a slot's value comes from. */
35081
35187
  var OsdSourceSchema = discriminatedUnion("kind", [
35188
+ object({ kind: literal("none") }),
35082
35189
  object({
35083
35190
  kind: literal("static"),
35084
35191
  text: string().max(64)
@@ -35205,6 +35312,13 @@ method(object({ deviceId: number().int() }), object({
35205
35312
  }), object({ success: literal(true) }), {
35206
35313
  kind: "mutation",
35207
35314
  auth: "admin"
35315
+ }), method(object({
35316
+ deviceId: number().int(),
35317
+ slotId: string().min(1),
35318
+ enabled: boolean()
35319
+ }), object({ success: literal(true) }), {
35320
+ kind: "mutation",
35321
+ auth: "admin"
35208
35322
  }), method(object({
35209
35323
  sourceDeviceId: number().int(),
35210
35324
  targetDeviceId: number().int()
@@ -35585,7 +35699,15 @@ var GpuInfoSchema = object({
35585
35699
  name: string(),
35586
35700
  memoryMB: number().optional()
35587
35701
  });
35588
- var NpuInfoSchema = object({ type: _enum(["apple-ane", "intel-npu"]) });
35702
+ var NpuInfoSchema = object({
35703
+ type: _enum([
35704
+ "apple-ane",
35705
+ "intel-npu",
35706
+ "amd-xdna"
35707
+ ]),
35708
+ name: string().optional(),
35709
+ generation: _enum(["xdna1", "xdna2"]).optional()
35710
+ });
35589
35711
  var CoralInfoSchema = object({
35590
35712
  type: literal("coral-edgetpu"),
35591
35713
  bus: string().optional()
@@ -39347,9 +39469,11 @@ DeviceType.Camera, method(object({
39347
39469
  * once is what makes a second provider (RunPod, a local NVIDIA node) a new
39348
39470
  * manifest entry and nothing else.
39349
39471
  *
39350
- * Collection, routed by the `addonId` in every single-row input (the `llm` /
39351
- * `notification-output` posture); `describe` concat-fans across providers.
39352
- * Every method is `admin`: these spend money.
39472
+ * Collection of provider **types** (addons). Each addon owns zero or more
39473
+ * **entries** (credentials + defaults). Concat-fans: `describe`,
39474
+ * `describeTypes`, `listEntries`, `listJobs`. Single-row work is keyed by
39475
+ * `entryId`; callers also pass the owning `addonId` as the collection
39476
+ * selector (broker posture). Every method is `admin`: these spend money.
39353
39477
  *
39354
39478
  * Every cloud object a provider creates is tagged with the orchestrator's
39355
39479
  * `jobKey`, so a retried submit finds the job it already started instead of
@@ -39373,8 +39497,8 @@ var TrainingRegionOptionSchema = object({
39373
39497
  priceMultiplier: number().positive()
39374
39498
  });
39375
39499
  /**
39376
- * The provider's per-account settings, as the orchestrator reads them. They
39377
- * live in the PROVIDER addon's settings (operator decision 2026-10-08: they
39500
+ * The provider's per-entry settings, as the orchestrator reads them. They
39501
+ * live on the PROVIDER addon's entry (operator decision 2026-10-08: they
39378
39502
  * depend on the user's account), never hard-coded in the orchestrator.
39379
39503
  */
39380
39504
  var TrainingProviderDefaultsSchema = object({
@@ -39385,9 +39509,44 @@ var TrainingProviderDefaultsSchema = object({
39385
39509
  /** Hours a FAILED job's cloud dataset is kept for debugging; 0 = delete at once. */
39386
39510
  failedDatasetGraceHours: number().nonnegative()
39387
39511
  });
39512
+ /**
39513
+ * Entry form schema for a provider type — same seam as notification
39514
+ * `TargetKind.configSchema` (`z.unknown()` at the wire; callers tighten to
39515
+ * {@link ConfigUISchema}). Drives `ConfigFormBuilder` on Training → Providers.
39516
+ */
39517
+ var ConfigSchemaPassthrough = unknown();
39518
+ /** One creatable provider type, for the Add-entry dialog. */
39519
+ var TrainingProviderTypeSchema = object({
39520
+ typeId: string(),
39521
+ label: string(),
39522
+ /** Path under the addon package (e.g. `assets/training-modal/icon.svg`). */
39523
+ iconAsset: string(),
39524
+ /** Owning `training-provider` addon — collection selector for createEntry. */
39525
+ addonId: string(),
39526
+ /**
39527
+ * Fields for one entry of this type (credentials + defaults). Absent on a
39528
+ * type that only needs a name. Password fields are keychain-backed on the
39529
+ * provider addon (`secretStatePaths`), not D634 plaintext.
39530
+ */
39531
+ configSchema: ConfigSchemaPassthrough.optional()
39532
+ });
39533
+ /** One configured account / workspace under a provider type. */
39534
+ var TrainingProviderEntrySchema = object({
39535
+ entryId: string(),
39536
+ typeId: string(),
39537
+ name: string(),
39538
+ addonId: string(),
39539
+ /** Credentials are present — never the values. */
39540
+ configured: boolean()
39541
+ });
39388
39542
  var TrainingProviderDescriptorSchema = object({
39389
39543
  addonId: string(),
39390
- /** `modal`, `runpod`, `fake`, … */
39544
+ entryId: string(),
39545
+ typeId: string(),
39546
+ /** Operator-chosen entry name. */
39547
+ name: string(),
39548
+ iconAsset: string(),
39549
+ /** `modal`, `runpod`, `fake`, … — same as typeId for current providers. */
39391
39550
  kind: string(),
39392
39551
  label: string(),
39393
39552
  gpuTypes: array(TrainingGpuOptionSchema).readonly(),
@@ -39399,7 +39558,30 @@ var TrainingProviderDescriptorSchema = object({
39399
39558
  dataResidencyNote: string(),
39400
39559
  /** Credentials are present — never the values. */
39401
39560
  configured: boolean(),
39402
- defaults: TrainingProviderDefaultsSchema
39561
+ defaults: TrainingProviderDefaultsSchema,
39562
+ /**
39563
+ * Values for {@link TrainingProviderTypeSchema}'s `configSchema` — password
39564
+ * fields are keychain {@link SecretFieldView} or `null` / `''` (create),
39565
+ * never plaintext. Same hydrate contract as settings forms (D789).
39566
+ */
39567
+ formValues: record(string(), unknown()).optional()
39568
+ });
39569
+ /**
39570
+ * Patch one entry's name, credentials and defaults. Pin with owning `{ addonId }`.
39571
+ * An omitted or empty `tokenSecret` means KEEP the stored secret (D787).
39572
+ * `{ $secretClear: true }` clears it.
39573
+ */
39574
+ var TrainingProviderUpdateEntryInputSchema = object({
39575
+ entryId: string().min(1),
39576
+ name: string().min(1),
39577
+ tokenId: string().optional(),
39578
+ tokenSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
39579
+ environment: string().optional(),
39580
+ gpuType: string().optional(),
39581
+ region: string().optional(),
39582
+ costCapUsd: number().nonnegative().optional(),
39583
+ maxRuntimeSec: number().int().positive().optional(),
39584
+ failedDatasetGraceHours: number().nonnegative().optional()
39403
39585
  });
39404
39586
  var TrainingCredentialCheckSchema = object({
39405
39587
  ok: boolean(),
@@ -39451,20 +39633,33 @@ var TrainerSourceRefSchema = object({
39451
39633
  /** A commit sha (never a branch) — the job must be reproducible. */
39452
39634
  revision: string().regex(/^[0-9a-f]{7,64}$/)
39453
39635
  });
39636
+ /** Cloud job identity — route with the owning addon's `addonId` selector. */
39454
39637
  var JobRef = {
39455
- addonId: string(),
39638
+ entryId: string().min(1),
39456
39639
  jobKey: string().uuid()
39457
39640
  };
39458
39641
  var TrainingLogLineSchema = object({
39459
39642
  ts: number(),
39460
39643
  text: string()
39461
39644
  });
39462
- method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({ addonId: string() }), TrainingCredentialCheckSchema, {
39645
+ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderTypeSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderEntrySchema).readonly(), { auth: "admin" }), method(object({
39646
+ typeId: string().min(1),
39647
+ name: string().min(1)
39648
+ }), object({ entryId: string() }), {
39649
+ kind: "mutation",
39650
+ auth: "admin"
39651
+ }), method(object({ entryId: string().min(1) }), object({ ok: literal(true) }), {
39652
+ kind: "mutation",
39653
+ auth: "admin"
39654
+ }), method(TrainingProviderUpdateEntryInputSchema, object({ ok: literal(true) }), {
39655
+ kind: "mutation",
39656
+ auth: "admin"
39657
+ }), method(object({ entryId: string().min(1) }), TrainingCredentialCheckSchema, {
39463
39658
  kind: "mutation",
39464
39659
  auth: "admin",
39465
39660
  timeoutMs: 3e4
39466
39661
  }), method(object({
39467
- addonId: string(),
39662
+ entryId: string().min(1),
39468
39663
  gpuType: string(),
39469
39664
  region: string(),
39470
39665
  datasetBytes: number().int().nonnegative(),
@@ -39530,7 +39725,7 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
39530
39725
  kind: "mutation",
39531
39726
  auth: "admin",
39532
39727
  timeoutMs: 5 * 6e4
39533
- }), method(object({ addonId: string() }), array(ProviderJobStatusSchema).readonly(), {
39728
+ }), method(object({ entryId: string().min(1).optional() }), array(ProviderJobStatusSchema).readonly(), {
39534
39729
  auth: "admin",
39535
39730
  timeoutMs: 2 * 6e4
39536
39731
  });
@@ -39540,20 +39735,31 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
39540
39735
  *
39541
39736
  * It owns what every provider must agree on, written once:
39542
39737
  *
39543
- * - **Dataset versions.** Taken over from pipeline-analytics (D796): the rows
39544
- * live here (D808); pipeline-analytics still CUTS a version (it owns the corpus and
39545
- * the export plan) and reaches this store through the five row methods
39546
- * below, so the Retrain page and the export did not change.
39547
39738
  * - **Jobs.** A persisted state machine, a reconcile loop against the
39548
39739
  * provider, a cost guard, a daily orphan sweep and the retention rules.
39549
39740
  * - **The return flow.** Verified artefacts → Model Studio
39550
39741
  * (`custom-model-registry.importModelBundle`) → canary on cameras →
39551
39742
  * rollback. Nothing is ever registered automatically.
39552
39743
  *
39744
+ * Plan/start takes a live {@link TrainingCorpusSelection} (collections +
39745
+ * work-state rule); frame ids are resolved via pipeline-analytics at that
39746
+ * moment and snapshotted on the job. No frozen dataset version.
39747
+ *
39553
39748
  * Every method is `admin`.
39554
39749
  */
39555
- /** A version WITH its frame list — what the export and a job read. */
39556
- var TrainingDatasetVersionRowSchema = RetrainDatasetVersionSchema.omit({ frameCount: true }).extend({ frameIds: array(string()).max(2e4).readonly() });
39750
+ /**
39751
+ * Live corpus criteria for plan/start (design §5.2). Default is complete-only.
39752
+ * Frame ids are resolved at plan/start — never a frozen version id.
39753
+ */
39754
+ var TrainingCorpusSelectionSchema = object({
39755
+ collectionIds: array(string()).min(1),
39756
+ /** Default complete-only for v1 */
39757
+ workState: _enum([
39758
+ "complete",
39759
+ "annotated_or_complete",
39760
+ "any_annotated"
39761
+ ]).default("complete")
39762
+ });
39557
39763
  /** A base model a detector job can fine-tune, and the baseline it is judged against. */
39558
39764
  var TrainingBaseModelSchema = object({
39559
39765
  modelId: string(),
@@ -39571,9 +39777,13 @@ var TrainingPresetSchema = _enum([
39571
39777
  "thorough"
39572
39778
  ]);
39573
39779
  var TrainingJobRequestSchema = object({
39574
- datasetVersionId: string().min(1),
39575
- /** The `training-provider` addon that runs it. */
39576
- addonId: string().min(1),
39780
+ /** Live collection + work-state criteria; resolved at plan/start. */
39781
+ selection: TrainingCorpusSelectionSchema,
39782
+ /**
39783
+ * The provider **entry** that runs it (credentials + defaults).
39784
+ * Resolve to an owning addon via `training-provider.describe` / `listEntries`.
39785
+ */
39786
+ entryId: string().min(1),
39577
39787
  gpuType: string().min(1),
39578
39788
  region: string(),
39579
39789
  baseModelId: string().min(1),
@@ -39632,6 +39842,7 @@ var TrainingJobPlanSchema = object({
39632
39842
  * result lives after the operator acted on it.
39633
39843
  */
39634
39844
  var TrainingJobStateSchema = _enum([
39845
+ "queued",
39635
39846
  "uploading",
39636
39847
  "submitted",
39637
39848
  "starting",
@@ -39685,6 +39896,11 @@ var TrainingJobSchema = object({
39685
39896
  createdAt: number(),
39686
39897
  updatedAt: number(),
39687
39898
  state: TrainingJobStateSchema,
39899
+ /**
39900
+ * Shared by every job enqueued together via `startJobBatch`.
39901
+ * `null` for a lone `startJob`. The engine advances queued siblings by this id.
39902
+ */
39903
+ batchId: string().nullable().default(null),
39688
39904
  stage: TrainingStageSchema.nullable(),
39689
39905
  failure: object({
39690
39906
  reason: TrainingFailureReasonSchema,
@@ -39696,6 +39912,12 @@ var TrainingJobSchema = object({
39696
39912
  maxRuntimeSec: number().int().positive(),
39697
39913
  trainer: TrainerSourceRefSchema,
39698
39914
  datasetLayout: RetrainExportLayoutSchema,
39915
+ /** Frame count snapshotted when the job started (audit; equals `frameIds.length`). */
39916
+ frameCount: number().int().nonnegative(),
39917
+ /** Resolved frame ids at start — the archive ships exactly these. */
39918
+ frameIds: array(string()).max(2e4).readonly(),
39919
+ /** Hash of what those frames taught at start (trainer `dataset.annotationHash`). */
39920
+ annotationHash: string(),
39699
39921
  dataset: object({
39700
39922
  bytes: number().int(),
39701
39923
  sha256: string(),
@@ -39737,13 +39959,7 @@ var TrainingJobSchema = object({
39737
39959
  canary: TrainingCanarySchema.nullable()
39738
39960
  });
39739
39961
  var IdInput = object({ id: string().min(1) });
39740
- method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
39741
- kind: "mutation",
39742
- auth: "admin"
39743
- }), 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() }), {
39744
- kind: "mutation",
39745
- auth: "admin"
39746
- }), method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
39962
+ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
39747
39963
  auth: "admin",
39748
39964
  timeoutMs: 6e4
39749
39965
  }), method(TrainingJobRequestSchema.extend({
@@ -39762,6 +39978,24 @@ method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
39762
39978
  kind: "mutation",
39763
39979
  auth: "admin",
39764
39980
  timeoutMs: 12e4
39981
+ }), method(TrainingJobRequestSchema.omit({ baseModelId: true }).extend({
39982
+ baseModelIds: array(string().min(1)).min(1),
39983
+ name: string().min(1).max(120),
39984
+ maxCostUsd: number().positive(),
39985
+ maxRuntimeSec: number().int().positive(),
39986
+ idempotencyKey: string().min(8).max(80)
39987
+ }), discriminatedUnion("kind", [object({
39988
+ kind: literal("started"),
39989
+ batchId: string(),
39990
+ jobs: array(TrainingJobSchema).min(1).readonly()
39991
+ }), object({
39992
+ kind: literal("refused"),
39993
+ reason: TrainingRefusalReasonSchema,
39994
+ detail: string()
39995
+ })]), {
39996
+ kind: "mutation",
39997
+ auth: "admin",
39998
+ timeoutMs: 12e4
39765
39999
  }), method(object({}), array(TrainingJobSchema).readonly(), { auth: "admin" }), method(IdInput, TrainingJobSchema.nullable(), { auth: "admin" }), method(IdInput, TrainingJobSchema, {
39766
40000
  kind: "mutation",
39767
40001
  auth: "admin",
@@ -43795,6 +44029,36 @@ Object.freeze({
43795
44029
  addonId: null,
43796
44030
  access: "view"
43797
44031
  },
44032
+ "oidcConnections.connectionFormSchema": {
44033
+ capName: "oidc-connections",
44034
+ capScope: "system",
44035
+ addonId: null,
44036
+ access: "view"
44037
+ },
44038
+ "oidcConnections.createConnection": {
44039
+ capName: "oidc-connections",
44040
+ capScope: "system",
44041
+ addonId: null,
44042
+ access: "create"
44043
+ },
44044
+ "oidcConnections.deleteConnection": {
44045
+ capName: "oidc-connections",
44046
+ capScope: "system",
44047
+ addonId: null,
44048
+ access: "delete"
44049
+ },
44050
+ "oidcConnections.listConnections": {
44051
+ capName: "oidc-connections",
44052
+ capScope: "system",
44053
+ addonId: null,
44054
+ access: "view"
44055
+ },
44056
+ "oidcConnections.updateConnection": {
44057
+ capName: "oidc-connections",
44058
+ capScope: "system",
44059
+ addonId: null,
44060
+ access: "create"
44061
+ },
43798
44062
  "osd.getStatus": {
43799
44063
  capName: "osd",
43800
44064
  capScope: "device",
@@ -43867,6 +44131,12 @@ Object.freeze({
43867
44131
  addonId: null,
43868
44132
  access: "create"
43869
44133
  },
44134
+ "osdManager.setSlotCameraEnabled": {
44135
+ capName: "osd-manager",
44136
+ capScope: "system",
44137
+ addonId: null,
44138
+ access: "create"
44139
+ },
43870
44140
  "osdManager.upsertTemplate": {
43871
44141
  capName: "osd-manager",
43872
44142
  capScope: "system",
@@ -44005,12 +44275,6 @@ Object.freeze({
44005
44275
  addonId: null,
44006
44276
  access: "create"
44007
44277
  },
44008
- "pipelineAnalytics.createRetrainDatasetVersion": {
44009
- capName: "pipeline-analytics",
44010
- capScope: "device",
44011
- addonId: null,
44012
- access: "create"
44013
- },
44014
44278
  "pipelineAnalytics.deleteDeviceEvents": {
44015
44279
  capName: "pipeline-analytics",
44016
44280
  capScope: "device",
@@ -44023,12 +44287,6 @@ Object.freeze({
44023
44287
  addonId: null,
44024
44288
  access: "delete"
44025
44289
  },
44026
- "pipelineAnalytics.deleteRetrainDatasetVersion": {
44027
- capName: "pipeline-analytics",
44028
- capScope: "device",
44029
- addonId: null,
44030
- access: "delete"
44031
- },
44032
44290
  "pipelineAnalytics.deleteTracks": {
44033
44291
  capName: "pipeline-analytics",
44034
44292
  capScope: "device",
@@ -44131,6 +44389,12 @@ Object.freeze({
44131
44389
  addonId: null,
44132
44390
  access: "view"
44133
44391
  },
44392
+ "pipelineAnalytics.getRetrainCorpusKpi": {
44393
+ capName: "pipeline-analytics",
44394
+ capScope: "device",
44395
+ addonId: null,
44396
+ access: "view"
44397
+ },
44134
44398
  "pipelineAnalytics.getRetrainExportUrl": {
44135
44399
  capName: "pipeline-analytics",
44136
44400
  capScope: "device",
@@ -44251,7 +44515,7 @@ Object.freeze({
44251
44515
  addonId: null,
44252
44516
  access: "view"
44253
44517
  },
44254
- "pipelineAnalytics.listRetrainDatasetVersions": {
44518
+ "pipelineAnalytics.listRetrainCorpusPage": {
44255
44519
  capName: "pipeline-analytics",
44256
44520
  capScope: "device",
44257
44521
  addonId: null,
@@ -44305,12 +44569,6 @@ Object.freeze({
44305
44569
  addonId: null,
44306
44570
  access: "create"
44307
44571
  },
44308
- "pipelineAnalytics.previewRetrainDataset": {
44309
- capName: "pipeline-analytics",
44310
- capScope: "device",
44311
- addonId: null,
44312
- access: "view"
44313
- },
44314
44572
  "pipelineAnalytics.proposeRetrainAnnotations": {
44315
44573
  capName: "pipeline-analytics",
44316
44574
  capScope: "device",
@@ -44389,6 +44647,12 @@ Object.freeze({
44389
44647
  addonId: null,
44390
44648
  access: "create"
44391
44649
  },
44650
+ "pipelineAnalytics.resolveRetrainTrainingCorpus": {
44651
+ capName: "pipeline-analytics",
44652
+ capScope: "device",
44653
+ addonId: null,
44654
+ access: "view"
44655
+ },
44392
44656
  "pipelineAnalytics.restageRetrainTrack": {
44393
44657
  capName: "pipeline-analytics",
44394
44658
  capScope: "device",
@@ -44449,12 +44713,6 @@ Object.freeze({
44449
44713
  addonId: null,
44450
44714
  access: "create"
44451
44715
  },
44452
- "pipelineAnalytics.verifyRetrainDatasetVersion": {
44453
- capName: "pipeline-analytics",
44454
- capScope: "device",
44455
- addonId: null,
44456
- access: "view"
44457
- },
44458
44716
  "pipelineAnalytics.wipeAllAnalytics": {
44459
44717
  capName: "pipeline-analytics",
44460
44718
  capScope: "device",
@@ -46849,18 +47107,6 @@ Object.freeze({
46849
47107
  addonId: null,
46850
47108
  access: "create"
46851
47109
  },
46852
- "training.findDatasetVersionIdByName": {
46853
- capName: "training",
46854
- capScope: "system",
46855
- addonId: null,
46856
- access: "view"
46857
- },
46858
- "training.getDatasetVersion": {
46859
- capName: "training",
46860
- capScope: "system",
46861
- addonId: null,
46862
- access: "view"
46863
- },
46864
47110
  "training.getJob": {
46865
47111
  capName: "training",
46866
47112
  capScope: "system",
@@ -46879,12 +47125,6 @@ Object.freeze({
46879
47125
  addonId: null,
46880
47126
  access: "view"
46881
47127
  },
46882
- "training.listDatasetVersions": {
46883
- capName: "training",
46884
- capScope: "system",
46885
- addonId: null,
46886
- access: "view"
46887
- },
46888
47128
  "training.listJobs": {
46889
47129
  capName: "training",
46890
47130
  capScope: "system",
@@ -46897,54 +47137,66 @@ Object.freeze({
46897
47137
  addonId: null,
46898
47138
  access: "view"
46899
47139
  },
46900
- "training.putDatasetVersion": {
47140
+ "training.registerResult": {
46901
47141
  capName: "training",
46902
47142
  capScope: "system",
46903
47143
  addonId: null,
46904
47144
  access: "create"
46905
47145
  },
46906
- "training.registerResult": {
47146
+ "training.rollbackCanary": {
46907
47147
  capName: "training",
46908
47148
  capScope: "system",
46909
47149
  addonId: null,
46910
47150
  access: "create"
46911
47151
  },
46912
- "training.removeDatasetVersion": {
47152
+ "training.startJob": {
46913
47153
  capName: "training",
46914
47154
  capScope: "system",
46915
47155
  addonId: null,
46916
- access: "delete"
47156
+ access: "create"
46917
47157
  },
46918
- "training.rollbackCanary": {
47158
+ "training.startJobBatch": {
46919
47159
  capName: "training",
46920
47160
  capScope: "system",
46921
47161
  addonId: null,
46922
47162
  access: "create"
46923
47163
  },
46924
- "training.startJob": {
46925
- capName: "training",
47164
+ "trainingProvider.cancelJob": {
47165
+ capName: "training-provider",
46926
47166
  capScope: "system",
46927
47167
  addonId: null,
46928
47168
  access: "create"
46929
47169
  },
46930
- "trainingProvider.cancelJob": {
47170
+ "trainingProvider.cleanupJob": {
46931
47171
  capName: "training-provider",
46932
47172
  capScope: "system",
46933
47173
  addonId: null,
46934
47174
  access: "create"
46935
47175
  },
46936
- "trainingProvider.cleanupJob": {
47176
+ "trainingProvider.createEntry": {
46937
47177
  capName: "training-provider",
46938
47178
  capScope: "system",
46939
47179
  addonId: null,
46940
47180
  access: "create"
46941
47181
  },
47182
+ "trainingProvider.deleteEntry": {
47183
+ capName: "training-provider",
47184
+ capScope: "system",
47185
+ addonId: null,
47186
+ access: "delete"
47187
+ },
46942
47188
  "trainingProvider.describe": {
46943
47189
  capName: "training-provider",
46944
47190
  capScope: "system",
46945
47191
  addonId: null,
46946
47192
  access: "view"
46947
47193
  },
47194
+ "trainingProvider.describeTypes": {
47195
+ capName: "training-provider",
47196
+ capScope: "system",
47197
+ addonId: null,
47198
+ access: "view"
47199
+ },
46948
47200
  "trainingProvider.estimateJob": {
46949
47201
  capName: "training-provider",
46950
47202
  capScope: "system",
@@ -46957,6 +47209,12 @@ Object.freeze({
46957
47209
  addonId: null,
46958
47210
  access: "view"
46959
47211
  },
47212
+ "trainingProvider.listEntries": {
47213
+ capName: "training-provider",
47214
+ capScope: "system",
47215
+ addonId: null,
47216
+ access: "view"
47217
+ },
46960
47218
  "trainingProvider.listJobEvents": {
46961
47219
  capName: "training-provider",
46962
47220
  capScope: "system",
@@ -46987,6 +47245,12 @@ Object.freeze({
46987
47245
  addonId: null,
46988
47246
  access: "create"
46989
47247
  },
47248
+ "trainingProvider.updateEntry": {
47249
+ capName: "training-provider",
47250
+ capScope: "system",
47251
+ addonId: null,
47252
+ access: "create"
47253
+ },
46990
47254
  "trainingProvider.uploadDataset": {
46991
47255
  capName: "training-provider",
46992
47256
  capScope: "system",
@@ -50193,6 +50457,11 @@ Object.freeze({
50193
50457
  form: "single",
50194
50458
  optional: false
50195
50459
  }],
50460
+ "osdManager.setSlotCameraEnabled": [{
50461
+ name: "deviceId",
50462
+ form: "single",
50463
+ optional: false
50464
+ }],
50196
50465
  "petFeeder.callPet": [{
50197
50466
  name: "deviceId",
50198
50467
  form: "single",
@@ -50413,6 +50682,11 @@ Object.freeze({
50413
50682
  form: "array",
50414
50683
  optional: false
50415
50684
  }],
50685
+ "pipelineAnalytics.listRetrainCorpusPage": [{
50686
+ name: "deviceIds",
50687
+ form: "array",
50688
+ optional: true
50689
+ }],
50416
50690
  "pipelineAnalytics.listRetrainStaging": [{
50417
50691
  name: "deviceIds",
50418
50692
  form: "array",
@@ -51522,6 +51796,7 @@ Object.freeze({
51522
51796
  });
51523
51797
  Object.freeze({
51524
51798
  "broker": "broker",
51799
+ "calendar-source": "calendar",
51525
51800
  "device-export": "device-export",
51526
51801
  "llm": "ai",
51527
51802
  "mesh-network": "mesh",