@camstack/addon-decoder-nodeav 1.2.122 → 1.2.123

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/index.js +422 -139
  2. package/dist/index.mjs +422 -139
  3. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -5377,7 +5377,7 @@ var ZodIssueCode = {
5377
5377
  var ZodFirstPartyTypeKind;
5378
5378
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5379
5379
  //#endregion
5380
- //#region ../types/dist/sleep-r3RWkGVx.mjs
5380
+ //#region ../types/dist/sleep-DwAQ9sqX.mjs
5381
5381
  /**
5382
5382
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5383
5383
  * window to float samples (D455).
@@ -9316,6 +9316,16 @@ var CompositionSchema = object({
9316
9316
  seen.add(feature.cap);
9317
9317
  });
9318
9318
  });
9319
+ var NodeColorIdSchema = _enum([
9320
+ "node-a",
9321
+ "node-b",
9322
+ "node-c",
9323
+ "node-d",
9324
+ "node-e",
9325
+ "node-f",
9326
+ "node-g",
9327
+ "node-h"
9328
+ ]);
9319
9329
  new Set([
9320
9330
  "track",
9321
9331
  "face",
@@ -18173,14 +18183,14 @@ var LlmProfileSchema = object({
18173
18183
  /** ConfigUISchema tree passed through untyped on the wire (the
18174
18184
  * notification-output `ConfigSchemaPassthrough` precedent at
18175
18185
  * notification-output.cap.ts:151); the exported TS type re-tightens it. */
18176
- var ConfigSchemaPassthrough$1 = unknown();
18186
+ var ConfigSchemaPassthrough$3 = unknown();
18177
18187
  var LlmProfileKindDescriptorSchema = object({
18178
18188
  kind: LlmProfileKindSchema,
18179
18189
  label: string(),
18180
18190
  icon: string(),
18181
18191
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
18182
18192
  addonId: string(),
18183
- configSchema: ConfigSchemaPassthrough$1
18193
+ configSchema: ConfigSchemaPassthrough$3
18184
18194
  });
18185
18195
  var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
18186
18196
  var LlmDefaultSchema = object({
@@ -19301,7 +19311,7 @@ var TargetKindCapsSchema = object({
19301
19311
  * the union is large and not meant for runtime validation here; the exported
19302
19312
  * `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
19303
19313
  */
19304
- var ConfigSchemaPassthrough = unknown();
19314
+ var ConfigSchemaPassthrough$2 = unknown();
19305
19315
  var TargetKindSchema = object({
19306
19316
  kind: string(),
19307
19317
  label: string(),
@@ -19338,7 +19348,7 @@ var TargetKindSchema = object({
19338
19348
  * its raster path, which is the safe default for an unknown image.
19339
19349
  */
19340
19350
  iconMediaType: string().optional(),
19341
- configSchema: ConfigSchemaPassthrough,
19351
+ configSchema: ConfigSchemaPassthrough$2,
19342
19352
  /**
19343
19353
  * The config keys that decide WHERE this kind's secrets are sent (server,
19344
19354
  * base URL, instance, chat, recipient). A save that changes any of them
@@ -22637,6 +22647,61 @@ var OauthIntegrationDescriptorSchema = object({
22637
22647
  });
22638
22648
  method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" });
22639
22649
  /**
22650
+ * `oidc-connections` — CRUD for IdP rows under `auth-oidc` (D828 sibling).
22651
+ *
22652
+ * One hub-only singleton (`auth-oidc`). The Settings UI is a DataTable +
22653
+ * ItemFormDialog; there is no `editable-array` in `globalSettingsSchema`.
22654
+ * Operator-chosen `id` is the URL slug (`/addon/auth-oidc/<id>/…`) and is
22655
+ * immutable after create.
22656
+ */
22657
+ var ConfigSchemaPassthrough$1 = unknown();
22658
+ var OidcConnectionSchema = object({
22659
+ id: string().min(1),
22660
+ displayName: string(),
22661
+ icon: string(),
22662
+ issuerUrl: string(),
22663
+ clientId: string(),
22664
+ /** Client id + secret present — never the secret value. */
22665
+ configured: boolean(),
22666
+ /**
22667
+ * Values for the connection form schema. `clientSecret` is a keychain
22668
+ * {@link SecretFieldView} or `null` / `''`, never plaintext (D789).
22669
+ */
22670
+ formValues: record(string(), unknown()).optional()
22671
+ });
22672
+ /**
22673
+ * Patch one connection. Omitted or empty `clientSecret` keeps the stored
22674
+ * secret (D787). `{ $secretClear: true }` clears it. `id` is never renamed.
22675
+ */
22676
+ var OidcConnectionUpdateInputSchema = object({
22677
+ id: string().min(1),
22678
+ displayName: string().min(1),
22679
+ icon: string().optional(),
22680
+ issuerUrl: string().optional(),
22681
+ clientId: string().optional(),
22682
+ clientSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
22683
+ redirectUri: string().optional(),
22684
+ scopes: string().optional(),
22685
+ usernameClaim: _enum([
22686
+ "preferred_username",
22687
+ "email",
22688
+ "sub"
22689
+ ]).optional()
22690
+ });
22691
+ method(object({}), ConfigSchemaPassthrough$1, { auth: "admin" }), method(object({}), array(OidcConnectionSchema).readonly(), { auth: "admin" }), method(object({
22692
+ id: string().min(1).regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "id must be a lowercase slug"),
22693
+ displayName: string().min(1)
22694
+ }), object({ id: string() }), {
22695
+ kind: "mutation",
22696
+ auth: "admin"
22697
+ }), method(OidcConnectionUpdateInputSchema, object({ ok: literal(true) }), {
22698
+ kind: "mutation",
22699
+ auth: "admin"
22700
+ }), method(object({ id: string().min(1) }), object({ ok: literal(true) }), {
22701
+ kind: "mutation",
22702
+ auth: "admin"
22703
+ });
22704
+ /**
22640
22705
  * What started a camera's onboard motion (D672). `camera` is the camera's own
22641
22706
  * firmware; `sensor` is a device the operator ATTACHED to it. Absent on the
22642
22707
  * wire means the camera: only the camera-sensors bridge ever says `sensor`.
@@ -23993,24 +24058,69 @@ var RetrainFrameListSchema = object({
23993
24058
  /** What the page pre-selects — the native key frame when one survives. */
23994
24059
  autoPickMediaId: number().int().optional()
23995
24060
  });
24061
+ /** Exclusive partition of a corpus copy's annotation progress (design §4.2). */
24062
+ var RetrainFrameWorkStateSchema = _enum([
24063
+ "unannotated",
24064
+ "annotated",
24065
+ "complete"
24066
+ ]);
24067
+ /**
24068
+ * Filters for paginated corpus list, KPI, and matching export (design §4.4).
24069
+ * Every narrowing field is ANDed; omitted fields impose no constraint.
24070
+ */
24071
+ var RetrainCorpusFilterSchema = object({
24072
+ workState: RetrainFrameWorkStateSchema.optional(),
24073
+ deviceIds: array(number()).max(500).optional(),
24074
+ /** When set, only frames in this named collection. */
24075
+ collectionId: string().optional(),
24076
+ /** Frames that carry at least one saved annotation in one of these classes. */
24077
+ classes: array(RetrainMacroClassSchema).optional(),
24078
+ page: number().int().positive().default(1),
24079
+ pageSize: number().int().positive().max(100).default(50)
24080
+ });
24081
+ var RetrainCorpusPageSchema = object({
24082
+ frames: array(RetrainFrameSchema.extend({ workState: RetrainFrameWorkStateSchema })).readonly(),
24083
+ total: number().int().nonnegative(),
24084
+ page: number().int().positive(),
24085
+ pageSize: number().int().positive()
24086
+ });
24087
+ var RetrainCorpusKpiCameraRowSchema = object({
24088
+ deviceId: number(),
24089
+ unannotated: number().int().nonnegative(),
24090
+ annotated: number().int().nonnegative(),
24091
+ complete: number().int().nonnegative(),
24092
+ /** This camera's `complete` count divided by corpus `total`, in `[0,1]`.
24093
+ * `null` when the corpus is empty (no ratio). */
24094
+ pctOfCorpus: number().min(0).max(1).nullable()
24095
+ });
24096
+ var RetrainCorpusKpiSchema = object({
24097
+ total: number().int().nonnegative(),
24098
+ unannotated: number().int().nonnegative(),
24099
+ annotated: number().int().nonnegative(),
24100
+ complete: number().int().nonnegative(),
24101
+ cameras: array(RetrainCorpusKpiCameraRowSchema).readonly()
24102
+ });
23996
24103
  /**
23997
24104
  * Which frames an annotated export carries. Every field narrows; an empty
23998
- * filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
23999
- * list owned by whoever trains (the training orchestrator), so `frameIds` is
24000
- * the primitive a version export uses; `batchId` re-selects what an earlier
24001
- * export carried (`exportedInBatch`).
24105
+ * filter is every annotated copy. `frameIds` is the primitive a job or
24106
+ * download uses; `batchId` re-selects what an earlier export carried
24107
+ * (`exportedInBatch`). Frozen dataset versions were removed — live selection
24108
+ * resolves to `frameIds` at plan/start.
24002
24109
  */
24003
24110
  var RetrainExportFilterSchema = object({
24004
24111
  deviceIds: array(number()).optional(),
24005
24112
  frameIds: array(string()).max(2e4).optional(),
24006
24113
  /** Only frames in at least one of these named collections. */
24007
24114
  collectionIds: array(string()).max(200).optional(),
24008
- /** Exactly the frames of this dataset version (and its completeOnly). An
24009
- * unknown id selects nothing. */
24010
- datasetVersionId: string().optional(),
24115
+ /** Single collection (Frames filter bar). ANDed with `collectionIds` when both set. */
24116
+ collectionId: string().optional(),
24011
24117
  batchId: string().optional(),
24012
24118
  /** Only frames the operator marked complete (all subjects boxed). */
24013
- completeOnly: boolean().optional()
24119
+ completeOnly: boolean().optional(),
24120
+ /** Exclusive work-state partition (`workStateOf`); same as the corpus list. */
24121
+ workState: RetrainFrameWorkStateSchema.optional(),
24122
+ /** Frames with at least one saved annotation in one of these classes. */
24123
+ classes: array(RetrainMacroClassSchema).optional()
24014
24124
  });
24015
24125
  /**
24016
24126
  * `frames`: the full frame copies, boxes in `annotations.json`.
@@ -24210,8 +24320,7 @@ var RetrainDatasetStatsSchema = object({
24210
24320
  completeFrames: number().int()
24211
24321
  })).readonly()
24212
24322
  });
24213
- /** An immutable dataset version, without its frame list. */
24214
- var RetrainDatasetVersionSchema = object({
24323
+ object({
24215
24324
  id: string(),
24216
24325
  name: string(),
24217
24326
  createdAt: number(),
@@ -24219,22 +24328,33 @@ var RetrainDatasetVersionSchema = object({
24219
24328
  layout: RetrainExportLayoutSchema,
24220
24329
  completeOnly: boolean(),
24221
24330
  frameCount: number().int(),
24222
- /** sha256 of what the frames taught when the version was frozen. */
24223
24331
  annotationHash: string(),
24224
- /** The export manifest schema the version was cut under. */
24225
24332
  manifestSchema: string(),
24226
24333
  stats: RetrainDatasetStatsSchema
24227
24334
  });
24228
- var CreateRetrainDatasetVersionResultSchema = discriminatedUnion("kind", [object({
24229
- kind: literal("created"),
24230
- version: RetrainDatasetVersionSchema
24335
+ /**
24336
+ * Live training corpus criteria — same shape as `TrainingCorpusSelection` on
24337
+ * the training cap. Resolved here so plan/start and the annotated export share
24338
+ * one definition of "the frames" (`buildRetrainExportPlan`).
24339
+ */
24340
+ var RetrainTrainingCorpusSelectionSchema = object({
24341
+ collectionIds: array(string()).min(1),
24342
+ workState: _enum([
24343
+ "complete",
24344
+ "annotated_or_complete",
24345
+ "any_annotated"
24346
+ ]).default("complete")
24347
+ });
24348
+ var RetrainTrainingCorpusResolveResultSchema = discriminatedUnion("kind", [object({
24349
+ kind: literal("resolved"),
24350
+ frameIds: array(string()).max(2e4).readonly(),
24351
+ stats: RetrainDatasetStatsSchema,
24352
+ annotationHash: string(),
24353
+ layout: RetrainExportLayoutSchema
24231
24354
  }), object({
24232
24355
  kind: literal("refused"),
24233
- reason: _enum([
24234
- "empty-name",
24235
- "duplicate-name",
24236
- "no-frames"
24237
- ])
24356
+ reason: _enum(["unknown-collection", "no-frames"]),
24357
+ detail: string()
24238
24358
  })]);
24239
24359
  /** The outcome of a lifecycle move owned by the retrain page. */
24240
24360
  var RetrainTransitionResultSchema = object({
@@ -24941,6 +25061,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
24941
25061
  }), array(RetrainTrackSchema).readonly(), {
24942
25062
  kind: "query",
24943
25063
  auth: "admin"
25064
+ }), method(RetrainCorpusFilterSchema, RetrainCorpusPageSchema, {
25065
+ kind: "query",
25066
+ auth: "admin"
25067
+ }), method(object({}), RetrainCorpusKpiSchema, {
25068
+ kind: "query",
25069
+ auth: "admin"
24944
25070
  }), method(object({ trackId: string() }), RetrainFrameListSchema, {
24945
25071
  kind: "query",
24946
25072
  auth: "admin"
@@ -25036,36 +25162,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25036
25162
  kind: "mutation",
25037
25163
  auth: "admin",
25038
25164
  timeoutMs: 12e4
25039
- }), method(object({
25040
- selection: RetrainDatasetSelectionSchema,
25041
- completeOnly: boolean().optional()
25042
- }), RetrainDatasetStatsSchema, {
25043
- kind: "query",
25044
- auth: "admin"
25045
- }), method(object({
25046
- name: string().max(120),
25047
- selection: RetrainDatasetSelectionSchema,
25048
- layout: RetrainExportLayoutSchema,
25049
- completeOnly: boolean()
25050
- }), CreateRetrainDatasetVersionResultSchema, {
25051
- kind: "mutation",
25052
- auth: "admin",
25053
- timeoutMs: 12e4
25054
- }), method(object({}), array(RetrainDatasetVersionSchema).readonly(), {
25055
- kind: "query",
25056
- auth: "admin"
25057
- }), method(object({ id: string() }), object({ deleted: boolean() }), {
25058
- kind: "mutation",
25059
- auth: "admin"
25060
- }), method(object({ id: string() }), object({
25061
- found: boolean(),
25062
- annotationHash: string(),
25063
- matches: boolean(),
25064
- missingFrames: number().int()
25065
- }), {
25066
- kind: "query",
25067
- auth: "admin",
25068
- timeoutMs: 12e4
25069
25165
  }), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
25070
25166
  kind: "query",
25071
25167
  auth: "admin"
@@ -25092,6 +25188,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25092
25188
  }), method(object({}), array(RetrainCollectionSchema).readonly(), {
25093
25189
  kind: "query",
25094
25190
  auth: "admin"
25191
+ }), method(RetrainTrainingCorpusSelectionSchema, RetrainTrainingCorpusResolveResultSchema, {
25192
+ kind: "query",
25193
+ auth: "admin",
25194
+ timeoutMs: 6e4
25095
25195
  }), method(object({
25096
25196
  id: string(),
25097
25197
  name: string().max(120)
@@ -25708,11 +25808,14 @@ var HardwareClassIdSchema = _enum([
25708
25808
  "intel-n-series",
25709
25809
  "apple-m-base",
25710
25810
  "apple-m-pro",
25811
+ "amd-phoenix",
25711
25812
  "unknown"
25712
25813
  ]);
25713
25814
  var AcceleratorKindSchema = _enum([
25714
25815
  "intel-npu",
25715
25816
  "intel-igpu",
25817
+ "amd-igpu",
25818
+ "amd-npu",
25716
25819
  "x86-cpu",
25717
25820
  "arm-cpu",
25718
25821
  "apple-ane",
@@ -27602,6 +27705,8 @@ var AgentPipelineSettingsSchema = object({
27602
27705
  * address is wrong (multi-homed host, NAT, custom interface).
27603
27706
  */
27604
27707
  reachableHost: string().optional(),
27708
+ /** Hub-persisted UI colour (`--color-node-*` theme tokens). */
27709
+ color: NodeColorIdSchema.optional(),
27605
27710
  /**
27606
27711
  * Multi-device inference opt-in (Phase 4). Per-node map deviceKey → {enabled,
27607
27712
  * weight, steps}. Absent / all-disabled ⇒ the node's single default
@@ -28151,8 +28256,9 @@ method(object({
28151
28256
  auth: "admin"
28152
28257
  }), method(object({
28153
28258
  agentNodeId: string(),
28154
- reachableHost: string().nullable()
28155
- }), object({ success: literal(true) }), {
28259
+ reachableHost: string().nullable().optional(),
28260
+ color: NodeColorIdSchema.nullable().optional()
28261
+ }).refine((v) => v.reachableHost !== void 0 || v.color !== void 0, { message: "reachableHost or color required" }), object({ success: literal(true) }), {
28156
28262
  kind: "mutation",
28157
28263
  auth: "admin"
28158
28264
  }), method(object({
@@ -31199,7 +31305,7 @@ var CustomActionInputSchema = object({
31199
31305
  action: string().min(1),
31200
31306
  input: unknown()
31201
31307
  });
31202
- method(_void(), array(AddonListItemSchema).readonly()), method(object({
31308
+ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSchema).readonly()), method(object({
31203
31309
  addonId: string(),
31204
31310
  limit: number().min(1).max(500).default(100),
31205
31311
  level: LogLevelSchema$2.optional()
@@ -34746,7 +34852,13 @@ var TopologyNodeSchema = object({
34746
34852
  })).readonly(),
34747
34853
  processes: array(TopologyProcessSchema).readonly(),
34748
34854
  categories: array(TopologyCategorySchema).readonly(),
34749
- rootPackage: TopologyRootPackageSchema.nullable()
34855
+ rootPackage: TopologyRootPackageSchema.nullable(),
34856
+ /**
34857
+ * How an online AGENT reaches the hub (mesh mTLS Release A): `tls` once it has
34858
+ * completed a mutual-TLS handshake, `clear` otherwise. Absent for the hub,
34859
+ * for offline rows and when the hub cannot tell.
34860
+ */
34861
+ meshTransport: _enum(["tls", "clear"]).optional()
34750
34862
  });
34751
34863
  var CapUsageEdgeSchema = object({
34752
34864
  callerAddonId: string(),
@@ -35086,6 +35198,7 @@ var OsdNamedTemplateSchema = object({
35086
35198
  });
35087
35199
  /** Where a slot's value comes from. */
35088
35200
  var OsdSourceSchema = discriminatedUnion("kind", [
35201
+ object({ kind: literal("none") }),
35089
35202
  object({
35090
35203
  kind: literal("static"),
35091
35204
  text: string().max(64)
@@ -35212,6 +35325,13 @@ method(object({ deviceId: number().int() }), object({
35212
35325
  }), object({ success: literal(true) }), {
35213
35326
  kind: "mutation",
35214
35327
  auth: "admin"
35328
+ }), method(object({
35329
+ deviceId: number().int(),
35330
+ slotId: string().min(1),
35331
+ enabled: boolean()
35332
+ }), object({ success: literal(true) }), {
35333
+ kind: "mutation",
35334
+ auth: "admin"
35215
35335
  }), method(object({
35216
35336
  sourceDeviceId: number().int(),
35217
35337
  targetDeviceId: number().int()
@@ -35592,7 +35712,15 @@ var GpuInfoSchema = object({
35592
35712
  name: string(),
35593
35713
  memoryMB: number().optional()
35594
35714
  });
35595
- var NpuInfoSchema = object({ type: _enum(["apple-ane", "intel-npu"]) });
35715
+ var NpuInfoSchema = object({
35716
+ type: _enum([
35717
+ "apple-ane",
35718
+ "intel-npu",
35719
+ "amd-xdna"
35720
+ ]),
35721
+ name: string().optional(),
35722
+ generation: _enum(["xdna1", "xdna2"]).optional()
35723
+ });
35596
35724
  var CoralInfoSchema = object({
35597
35725
  type: literal("coral-edgetpu"),
35598
35726
  bus: string().optional()
@@ -39354,9 +39482,11 @@ DeviceType.Camera, method(object({
39354
39482
  * once is what makes a second provider (RunPod, a local NVIDIA node) a new
39355
39483
  * manifest entry and nothing else.
39356
39484
  *
39357
- * Collection, routed by the `addonId` in every single-row input (the `llm` /
39358
- * `notification-output` posture); `describe` concat-fans across providers.
39359
- * Every method is `admin`: these spend money.
39485
+ * Collection of provider **types** (addons). Each addon owns zero or more
39486
+ * **entries** (credentials + defaults). Concat-fans: `describe`,
39487
+ * `describeTypes`, `listEntries`, `listJobs`. Single-row work is keyed by
39488
+ * `entryId`; callers also pass the owning `addonId` as the collection
39489
+ * selector (broker posture). Every method is `admin`: these spend money.
39360
39490
  *
39361
39491
  * Every cloud object a provider creates is tagged with the orchestrator's
39362
39492
  * `jobKey`, so a retried submit finds the job it already started instead of
@@ -39380,8 +39510,8 @@ var TrainingRegionOptionSchema = object({
39380
39510
  priceMultiplier: number().positive()
39381
39511
  });
39382
39512
  /**
39383
- * The provider's per-account settings, as the orchestrator reads them. They
39384
- * live in the PROVIDER addon's settings (operator decision 2026-10-08: they
39513
+ * The provider's per-entry settings, as the orchestrator reads them. They
39514
+ * live on the PROVIDER addon's entry (operator decision 2026-10-08: they
39385
39515
  * depend on the user's account), never hard-coded in the orchestrator.
39386
39516
  */
39387
39517
  var TrainingProviderDefaultsSchema = object({
@@ -39392,9 +39522,44 @@ var TrainingProviderDefaultsSchema = object({
39392
39522
  /** Hours a FAILED job's cloud dataset is kept for debugging; 0 = delete at once. */
39393
39523
  failedDatasetGraceHours: number().nonnegative()
39394
39524
  });
39525
+ /**
39526
+ * Entry form schema for a provider type — same seam as notification
39527
+ * `TargetKind.configSchema` (`z.unknown()` at the wire; callers tighten to
39528
+ * {@link ConfigUISchema}). Drives `ConfigFormBuilder` on Training → Providers.
39529
+ */
39530
+ var ConfigSchemaPassthrough = unknown();
39531
+ /** One creatable provider type, for the Add-entry dialog. */
39532
+ var TrainingProviderTypeSchema = object({
39533
+ typeId: string(),
39534
+ label: string(),
39535
+ /** Path under the addon package (e.g. `assets/training-modal/icon.svg`). */
39536
+ iconAsset: string(),
39537
+ /** Owning `training-provider` addon — collection selector for createEntry. */
39538
+ addonId: string(),
39539
+ /**
39540
+ * Fields for one entry of this type (credentials + defaults). Absent on a
39541
+ * type that only needs a name. Password fields are keychain-backed on the
39542
+ * provider addon (`secretStatePaths`), not D634 plaintext.
39543
+ */
39544
+ configSchema: ConfigSchemaPassthrough.optional()
39545
+ });
39546
+ /** One configured account / workspace under a provider type. */
39547
+ var TrainingProviderEntrySchema = object({
39548
+ entryId: string(),
39549
+ typeId: string(),
39550
+ name: string(),
39551
+ addonId: string(),
39552
+ /** Credentials are present — never the values. */
39553
+ configured: boolean()
39554
+ });
39395
39555
  var TrainingProviderDescriptorSchema = object({
39396
39556
  addonId: string(),
39397
- /** `modal`, `runpod`, `fake`, … */
39557
+ entryId: string(),
39558
+ typeId: string(),
39559
+ /** Operator-chosen entry name. */
39560
+ name: string(),
39561
+ iconAsset: string(),
39562
+ /** `modal`, `runpod`, `fake`, … — same as typeId for current providers. */
39398
39563
  kind: string(),
39399
39564
  label: string(),
39400
39565
  gpuTypes: array(TrainingGpuOptionSchema).readonly(),
@@ -39406,7 +39571,30 @@ var TrainingProviderDescriptorSchema = object({
39406
39571
  dataResidencyNote: string(),
39407
39572
  /** Credentials are present — never the values. */
39408
39573
  configured: boolean(),
39409
- defaults: TrainingProviderDefaultsSchema
39574
+ defaults: TrainingProviderDefaultsSchema,
39575
+ /**
39576
+ * Values for {@link TrainingProviderTypeSchema}'s `configSchema` — password
39577
+ * fields are keychain {@link SecretFieldView} or `null` / `''` (create),
39578
+ * never plaintext. Same hydrate contract as settings forms (D789).
39579
+ */
39580
+ formValues: record(string(), unknown()).optional()
39581
+ });
39582
+ /**
39583
+ * Patch one entry's name, credentials and defaults. Pin with owning `{ addonId }`.
39584
+ * An omitted or empty `tokenSecret` means KEEP the stored secret (D787).
39585
+ * `{ $secretClear: true }` clears it.
39586
+ */
39587
+ var TrainingProviderUpdateEntryInputSchema = object({
39588
+ entryId: string().min(1),
39589
+ name: string().min(1),
39590
+ tokenId: string().optional(),
39591
+ tokenSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
39592
+ environment: string().optional(),
39593
+ gpuType: string().optional(),
39594
+ region: string().optional(),
39595
+ costCapUsd: number().nonnegative().optional(),
39596
+ maxRuntimeSec: number().int().positive().optional(),
39597
+ failedDatasetGraceHours: number().nonnegative().optional()
39410
39598
  });
39411
39599
  var TrainingCredentialCheckSchema = object({
39412
39600
  ok: boolean(),
@@ -39458,20 +39646,33 @@ var TrainerSourceRefSchema = object({
39458
39646
  /** A commit sha (never a branch) — the job must be reproducible. */
39459
39647
  revision: string().regex(/^[0-9a-f]{7,64}$/)
39460
39648
  });
39649
+ /** Cloud job identity — route with the owning addon's `addonId` selector. */
39461
39650
  var JobRef = {
39462
- addonId: string(),
39651
+ entryId: string().min(1),
39463
39652
  jobKey: string().uuid()
39464
39653
  };
39465
39654
  var TrainingLogLineSchema = object({
39466
39655
  ts: number(),
39467
39656
  text: string()
39468
39657
  });
39469
- method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({ addonId: string() }), TrainingCredentialCheckSchema, {
39658
+ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderTypeSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderEntrySchema).readonly(), { auth: "admin" }), method(object({
39659
+ typeId: string().min(1),
39660
+ name: string().min(1)
39661
+ }), object({ entryId: string() }), {
39662
+ kind: "mutation",
39663
+ auth: "admin"
39664
+ }), method(object({ entryId: string().min(1) }), object({ ok: literal(true) }), {
39665
+ kind: "mutation",
39666
+ auth: "admin"
39667
+ }), method(TrainingProviderUpdateEntryInputSchema, object({ ok: literal(true) }), {
39668
+ kind: "mutation",
39669
+ auth: "admin"
39670
+ }), method(object({ entryId: string().min(1) }), TrainingCredentialCheckSchema, {
39470
39671
  kind: "mutation",
39471
39672
  auth: "admin",
39472
39673
  timeoutMs: 3e4
39473
39674
  }), method(object({
39474
- addonId: string(),
39675
+ entryId: string().min(1),
39475
39676
  gpuType: string(),
39476
39677
  region: string(),
39477
39678
  datasetBytes: number().int().nonnegative(),
@@ -39537,7 +39738,7 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
39537
39738
  kind: "mutation",
39538
39739
  auth: "admin",
39539
39740
  timeoutMs: 5 * 6e4
39540
- }), method(object({ addonId: string() }), array(ProviderJobStatusSchema).readonly(), {
39741
+ }), method(object({ entryId: string().min(1).optional() }), array(ProviderJobStatusSchema).readonly(), {
39541
39742
  auth: "admin",
39542
39743
  timeoutMs: 2 * 6e4
39543
39744
  });
@@ -39547,20 +39748,31 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
39547
39748
  *
39548
39749
  * It owns what every provider must agree on, written once:
39549
39750
  *
39550
- * - **Dataset versions.** Taken over from pipeline-analytics (D796): the rows
39551
- * live here (D808); pipeline-analytics still CUTS a version (it owns the corpus and
39552
- * the export plan) and reaches this store through the five row methods
39553
- * below, so the Retrain page and the export did not change.
39554
39751
  * - **Jobs.** A persisted state machine, a reconcile loop against the
39555
39752
  * provider, a cost guard, a daily orphan sweep and the retention rules.
39556
39753
  * - **The return flow.** Verified artefacts → Model Studio
39557
39754
  * (`custom-model-registry.importModelBundle`) → canary on cameras →
39558
39755
  * rollback. Nothing is ever registered automatically.
39559
39756
  *
39757
+ * Plan/start takes a live {@link TrainingCorpusSelection} (collections +
39758
+ * work-state rule); frame ids are resolved via pipeline-analytics at that
39759
+ * moment and snapshotted on the job. No frozen dataset version.
39760
+ *
39560
39761
  * Every method is `admin`.
39561
39762
  */
39562
- /** A version WITH its frame list — what the export and a job read. */
39563
- var TrainingDatasetVersionRowSchema = RetrainDatasetVersionSchema.omit({ frameCount: true }).extend({ frameIds: array(string()).max(2e4).readonly() });
39763
+ /**
39764
+ * Live corpus criteria for plan/start (design §5.2). Default is complete-only.
39765
+ * Frame ids are resolved at plan/start — never a frozen version id.
39766
+ */
39767
+ var TrainingCorpusSelectionSchema = object({
39768
+ collectionIds: array(string()).min(1),
39769
+ /** Default complete-only for v1 */
39770
+ workState: _enum([
39771
+ "complete",
39772
+ "annotated_or_complete",
39773
+ "any_annotated"
39774
+ ]).default("complete")
39775
+ });
39564
39776
  /** A base model a detector job can fine-tune, and the baseline it is judged against. */
39565
39777
  var TrainingBaseModelSchema = object({
39566
39778
  modelId: string(),
@@ -39578,9 +39790,13 @@ var TrainingPresetSchema = _enum([
39578
39790
  "thorough"
39579
39791
  ]);
39580
39792
  var TrainingJobRequestSchema = object({
39581
- datasetVersionId: string().min(1),
39582
- /** The `training-provider` addon that runs it. */
39583
- addonId: string().min(1),
39793
+ /** Live collection + work-state criteria; resolved at plan/start. */
39794
+ selection: TrainingCorpusSelectionSchema,
39795
+ /**
39796
+ * The provider **entry** that runs it (credentials + defaults).
39797
+ * Resolve to an owning addon via `training-provider.describe` / `listEntries`.
39798
+ */
39799
+ entryId: string().min(1),
39584
39800
  gpuType: string().min(1),
39585
39801
  region: string(),
39586
39802
  baseModelId: string().min(1),
@@ -39639,6 +39855,7 @@ var TrainingJobPlanSchema = object({
39639
39855
  * result lives after the operator acted on it.
39640
39856
  */
39641
39857
  var TrainingJobStateSchema = _enum([
39858
+ "queued",
39642
39859
  "uploading",
39643
39860
  "submitted",
39644
39861
  "starting",
@@ -39692,6 +39909,11 @@ var TrainingJobSchema = object({
39692
39909
  createdAt: number(),
39693
39910
  updatedAt: number(),
39694
39911
  state: TrainingJobStateSchema,
39912
+ /**
39913
+ * Shared by every job enqueued together via `startJobBatch`.
39914
+ * `null` for a lone `startJob`. The engine advances queued siblings by this id.
39915
+ */
39916
+ batchId: string().nullable().default(null),
39695
39917
  stage: TrainingStageSchema.nullable(),
39696
39918
  failure: object({
39697
39919
  reason: TrainingFailureReasonSchema,
@@ -39703,6 +39925,12 @@ var TrainingJobSchema = object({
39703
39925
  maxRuntimeSec: number().int().positive(),
39704
39926
  trainer: TrainerSourceRefSchema,
39705
39927
  datasetLayout: RetrainExportLayoutSchema,
39928
+ /** Frame count snapshotted when the job started (audit; equals `frameIds.length`). */
39929
+ frameCount: number().int().nonnegative(),
39930
+ /** Resolved frame ids at start — the archive ships exactly these. */
39931
+ frameIds: array(string()).max(2e4).readonly(),
39932
+ /** Hash of what those frames taught at start (trainer `dataset.annotationHash`). */
39933
+ annotationHash: string(),
39706
39934
  dataset: object({
39707
39935
  bytes: number().int(),
39708
39936
  sha256: string(),
@@ -39744,13 +39972,7 @@ var TrainingJobSchema = object({
39744
39972
  canary: TrainingCanarySchema.nullable()
39745
39973
  });
39746
39974
  var IdInput = object({ id: string().min(1) });
39747
- method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
39748
- kind: "mutation",
39749
- auth: "admin"
39750
- }), 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() }), {
39751
- kind: "mutation",
39752
- auth: "admin"
39753
- }), method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
39975
+ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
39754
39976
  auth: "admin",
39755
39977
  timeoutMs: 6e4
39756
39978
  }), method(TrainingJobRequestSchema.extend({
@@ -39769,6 +39991,24 @@ method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
39769
39991
  kind: "mutation",
39770
39992
  auth: "admin",
39771
39993
  timeoutMs: 12e4
39994
+ }), method(TrainingJobRequestSchema.omit({ baseModelId: true }).extend({
39995
+ baseModelIds: array(string().min(1)).min(1),
39996
+ name: string().min(1).max(120),
39997
+ maxCostUsd: number().positive(),
39998
+ maxRuntimeSec: number().int().positive(),
39999
+ idempotencyKey: string().min(8).max(80)
40000
+ }), discriminatedUnion("kind", [object({
40001
+ kind: literal("started"),
40002
+ batchId: string(),
40003
+ jobs: array(TrainingJobSchema).min(1).readonly()
40004
+ }), object({
40005
+ kind: literal("refused"),
40006
+ reason: TrainingRefusalReasonSchema,
40007
+ detail: string()
40008
+ })]), {
40009
+ kind: "mutation",
40010
+ auth: "admin",
40011
+ timeoutMs: 12e4
39772
40012
  }), method(object({}), array(TrainingJobSchema).readonly(), { auth: "admin" }), method(IdInput, TrainingJobSchema.nullable(), { auth: "admin" }), method(IdInput, TrainingJobSchema, {
39773
40013
  kind: "mutation",
39774
40014
  auth: "admin",
@@ -43802,6 +44042,36 @@ Object.freeze({
43802
44042
  addonId: null,
43803
44043
  access: "view"
43804
44044
  },
44045
+ "oidcConnections.connectionFormSchema": {
44046
+ capName: "oidc-connections",
44047
+ capScope: "system",
44048
+ addonId: null,
44049
+ access: "view"
44050
+ },
44051
+ "oidcConnections.createConnection": {
44052
+ capName: "oidc-connections",
44053
+ capScope: "system",
44054
+ addonId: null,
44055
+ access: "create"
44056
+ },
44057
+ "oidcConnections.deleteConnection": {
44058
+ capName: "oidc-connections",
44059
+ capScope: "system",
44060
+ addonId: null,
44061
+ access: "delete"
44062
+ },
44063
+ "oidcConnections.listConnections": {
44064
+ capName: "oidc-connections",
44065
+ capScope: "system",
44066
+ addonId: null,
44067
+ access: "view"
44068
+ },
44069
+ "oidcConnections.updateConnection": {
44070
+ capName: "oidc-connections",
44071
+ capScope: "system",
44072
+ addonId: null,
44073
+ access: "create"
44074
+ },
43805
44075
  "osd.getStatus": {
43806
44076
  capName: "osd",
43807
44077
  capScope: "device",
@@ -43874,6 +44144,12 @@ Object.freeze({
43874
44144
  addonId: null,
43875
44145
  access: "create"
43876
44146
  },
44147
+ "osdManager.setSlotCameraEnabled": {
44148
+ capName: "osd-manager",
44149
+ capScope: "system",
44150
+ addonId: null,
44151
+ access: "create"
44152
+ },
43877
44153
  "osdManager.upsertTemplate": {
43878
44154
  capName: "osd-manager",
43879
44155
  capScope: "system",
@@ -44012,12 +44288,6 @@ Object.freeze({
44012
44288
  addonId: null,
44013
44289
  access: "create"
44014
44290
  },
44015
- "pipelineAnalytics.createRetrainDatasetVersion": {
44016
- capName: "pipeline-analytics",
44017
- capScope: "device",
44018
- addonId: null,
44019
- access: "create"
44020
- },
44021
44291
  "pipelineAnalytics.deleteDeviceEvents": {
44022
44292
  capName: "pipeline-analytics",
44023
44293
  capScope: "device",
@@ -44030,12 +44300,6 @@ Object.freeze({
44030
44300
  addonId: null,
44031
44301
  access: "delete"
44032
44302
  },
44033
- "pipelineAnalytics.deleteRetrainDatasetVersion": {
44034
- capName: "pipeline-analytics",
44035
- capScope: "device",
44036
- addonId: null,
44037
- access: "delete"
44038
- },
44039
44303
  "pipelineAnalytics.deleteTracks": {
44040
44304
  capName: "pipeline-analytics",
44041
44305
  capScope: "device",
@@ -44138,6 +44402,12 @@ Object.freeze({
44138
44402
  addonId: null,
44139
44403
  access: "view"
44140
44404
  },
44405
+ "pipelineAnalytics.getRetrainCorpusKpi": {
44406
+ capName: "pipeline-analytics",
44407
+ capScope: "device",
44408
+ addonId: null,
44409
+ access: "view"
44410
+ },
44141
44411
  "pipelineAnalytics.getRetrainExportUrl": {
44142
44412
  capName: "pipeline-analytics",
44143
44413
  capScope: "device",
@@ -44258,7 +44528,7 @@ Object.freeze({
44258
44528
  addonId: null,
44259
44529
  access: "view"
44260
44530
  },
44261
- "pipelineAnalytics.listRetrainDatasetVersions": {
44531
+ "pipelineAnalytics.listRetrainCorpusPage": {
44262
44532
  capName: "pipeline-analytics",
44263
44533
  capScope: "device",
44264
44534
  addonId: null,
@@ -44312,12 +44582,6 @@ Object.freeze({
44312
44582
  addonId: null,
44313
44583
  access: "create"
44314
44584
  },
44315
- "pipelineAnalytics.previewRetrainDataset": {
44316
- capName: "pipeline-analytics",
44317
- capScope: "device",
44318
- addonId: null,
44319
- access: "view"
44320
- },
44321
44585
  "pipelineAnalytics.proposeRetrainAnnotations": {
44322
44586
  capName: "pipeline-analytics",
44323
44587
  capScope: "device",
@@ -44396,6 +44660,12 @@ Object.freeze({
44396
44660
  addonId: null,
44397
44661
  access: "create"
44398
44662
  },
44663
+ "pipelineAnalytics.resolveRetrainTrainingCorpus": {
44664
+ capName: "pipeline-analytics",
44665
+ capScope: "device",
44666
+ addonId: null,
44667
+ access: "view"
44668
+ },
44399
44669
  "pipelineAnalytics.restageRetrainTrack": {
44400
44670
  capName: "pipeline-analytics",
44401
44671
  capScope: "device",
@@ -44456,12 +44726,6 @@ Object.freeze({
44456
44726
  addonId: null,
44457
44727
  access: "create"
44458
44728
  },
44459
- "pipelineAnalytics.verifyRetrainDatasetVersion": {
44460
- capName: "pipeline-analytics",
44461
- capScope: "device",
44462
- addonId: null,
44463
- access: "view"
44464
- },
44465
44729
  "pipelineAnalytics.wipeAllAnalytics": {
44466
44730
  capName: "pipeline-analytics",
44467
44731
  capScope: "device",
@@ -46856,18 +47120,6 @@ Object.freeze({
46856
47120
  addonId: null,
46857
47121
  access: "create"
46858
47122
  },
46859
- "training.findDatasetVersionIdByName": {
46860
- capName: "training",
46861
- capScope: "system",
46862
- addonId: null,
46863
- access: "view"
46864
- },
46865
- "training.getDatasetVersion": {
46866
- capName: "training",
46867
- capScope: "system",
46868
- addonId: null,
46869
- access: "view"
46870
- },
46871
47123
  "training.getJob": {
46872
47124
  capName: "training",
46873
47125
  capScope: "system",
@@ -46886,12 +47138,6 @@ Object.freeze({
46886
47138
  addonId: null,
46887
47139
  access: "view"
46888
47140
  },
46889
- "training.listDatasetVersions": {
46890
- capName: "training",
46891
- capScope: "system",
46892
- addonId: null,
46893
- access: "view"
46894
- },
46895
47141
  "training.listJobs": {
46896
47142
  capName: "training",
46897
47143
  capScope: "system",
@@ -46904,54 +47150,66 @@ Object.freeze({
46904
47150
  addonId: null,
46905
47151
  access: "view"
46906
47152
  },
46907
- "training.putDatasetVersion": {
47153
+ "training.registerResult": {
46908
47154
  capName: "training",
46909
47155
  capScope: "system",
46910
47156
  addonId: null,
46911
47157
  access: "create"
46912
47158
  },
46913
- "training.registerResult": {
47159
+ "training.rollbackCanary": {
46914
47160
  capName: "training",
46915
47161
  capScope: "system",
46916
47162
  addonId: null,
46917
47163
  access: "create"
46918
47164
  },
46919
- "training.removeDatasetVersion": {
47165
+ "training.startJob": {
46920
47166
  capName: "training",
46921
47167
  capScope: "system",
46922
47168
  addonId: null,
46923
- access: "delete"
47169
+ access: "create"
46924
47170
  },
46925
- "training.rollbackCanary": {
47171
+ "training.startJobBatch": {
46926
47172
  capName: "training",
46927
47173
  capScope: "system",
46928
47174
  addonId: null,
46929
47175
  access: "create"
46930
47176
  },
46931
- "training.startJob": {
46932
- capName: "training",
47177
+ "trainingProvider.cancelJob": {
47178
+ capName: "training-provider",
46933
47179
  capScope: "system",
46934
47180
  addonId: null,
46935
47181
  access: "create"
46936
47182
  },
46937
- "trainingProvider.cancelJob": {
47183
+ "trainingProvider.cleanupJob": {
46938
47184
  capName: "training-provider",
46939
47185
  capScope: "system",
46940
47186
  addonId: null,
46941
47187
  access: "create"
46942
47188
  },
46943
- "trainingProvider.cleanupJob": {
47189
+ "trainingProvider.createEntry": {
46944
47190
  capName: "training-provider",
46945
47191
  capScope: "system",
46946
47192
  addonId: null,
46947
47193
  access: "create"
46948
47194
  },
47195
+ "trainingProvider.deleteEntry": {
47196
+ capName: "training-provider",
47197
+ capScope: "system",
47198
+ addonId: null,
47199
+ access: "delete"
47200
+ },
46949
47201
  "trainingProvider.describe": {
46950
47202
  capName: "training-provider",
46951
47203
  capScope: "system",
46952
47204
  addonId: null,
46953
47205
  access: "view"
46954
47206
  },
47207
+ "trainingProvider.describeTypes": {
47208
+ capName: "training-provider",
47209
+ capScope: "system",
47210
+ addonId: null,
47211
+ access: "view"
47212
+ },
46955
47213
  "trainingProvider.estimateJob": {
46956
47214
  capName: "training-provider",
46957
47215
  capScope: "system",
@@ -46964,6 +47222,12 @@ Object.freeze({
46964
47222
  addonId: null,
46965
47223
  access: "view"
46966
47224
  },
47225
+ "trainingProvider.listEntries": {
47226
+ capName: "training-provider",
47227
+ capScope: "system",
47228
+ addonId: null,
47229
+ access: "view"
47230
+ },
46967
47231
  "trainingProvider.listJobEvents": {
46968
47232
  capName: "training-provider",
46969
47233
  capScope: "system",
@@ -46994,6 +47258,12 @@ Object.freeze({
46994
47258
  addonId: null,
46995
47259
  access: "create"
46996
47260
  },
47261
+ "trainingProvider.updateEntry": {
47262
+ capName: "training-provider",
47263
+ capScope: "system",
47264
+ addonId: null,
47265
+ access: "create"
47266
+ },
46997
47267
  "trainingProvider.uploadDataset": {
46998
47268
  capName: "training-provider",
46999
47269
  capScope: "system",
@@ -50200,6 +50470,11 @@ Object.freeze({
50200
50470
  form: "single",
50201
50471
  optional: false
50202
50472
  }],
50473
+ "osdManager.setSlotCameraEnabled": [{
50474
+ name: "deviceId",
50475
+ form: "single",
50476
+ optional: false
50477
+ }],
50203
50478
  "petFeeder.callPet": [{
50204
50479
  name: "deviceId",
50205
50480
  form: "single",
@@ -50420,6 +50695,11 @@ Object.freeze({
50420
50695
  form: "array",
50421
50696
  optional: false
50422
50697
  }],
50698
+ "pipelineAnalytics.listRetrainCorpusPage": [{
50699
+ name: "deviceIds",
50700
+ form: "array",
50701
+ optional: true
50702
+ }],
50423
50703
  "pipelineAnalytics.listRetrainStaging": [{
50424
50704
  name: "deviceIds",
50425
50705
  form: "array",
@@ -51529,6 +51809,7 @@ Object.freeze({
51529
51809
  });
51530
51810
  Object.freeze({
51531
51811
  "broker": "broker",
51812
+ "calendar-source": "calendar",
51532
51813
  "device-export": "device-export",
51533
51814
  "llm": "ai",
51534
51815
  "mesh-network": "mesh",
@@ -52014,6 +52295,8 @@ var STATE_SUMMARY_VARS = [
52014
52295
  [...RULE_TEXT],
52015
52296
  [...RULE_TEXT],
52016
52297
  [...RULE_TEXT],
52298
+ [...RULE_TEXT],
52299
+ [...RULE_TEXT],
52017
52300
  ([...RULE_TEXT], [...UPDATES]),
52018
52301
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),
52019
52302
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),