@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.js CHANGED
@@ -5381,7 +5381,7 @@ var ZodIssueCode = {
5381
5381
  var ZodFirstPartyTypeKind;
5382
5382
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5383
5383
  //#endregion
5384
- //#region ../types/dist/sleep-r3RWkGVx.mjs
5384
+ //#region ../types/dist/sleep-DwAQ9sqX.mjs
5385
5385
  /**
5386
5386
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5387
5387
  * window to float samples (D455).
@@ -9320,6 +9320,16 @@ var CompositionSchema = object({
9320
9320
  seen.add(feature.cap);
9321
9321
  });
9322
9322
  });
9323
+ var NodeColorIdSchema = _enum([
9324
+ "node-a",
9325
+ "node-b",
9326
+ "node-c",
9327
+ "node-d",
9328
+ "node-e",
9329
+ "node-f",
9330
+ "node-g",
9331
+ "node-h"
9332
+ ]);
9323
9333
  new Set([
9324
9334
  "track",
9325
9335
  "face",
@@ -18177,14 +18187,14 @@ var LlmProfileSchema = object({
18177
18187
  /** ConfigUISchema tree passed through untyped on the wire (the
18178
18188
  * notification-output `ConfigSchemaPassthrough` precedent at
18179
18189
  * notification-output.cap.ts:151); the exported TS type re-tightens it. */
18180
- var ConfigSchemaPassthrough$1 = unknown();
18190
+ var ConfigSchemaPassthrough$3 = unknown();
18181
18191
  var LlmProfileKindDescriptorSchema = object({
18182
18192
  kind: LlmProfileKindSchema,
18183
18193
  label: string(),
18184
18194
  icon: string(),
18185
18195
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
18186
18196
  addonId: string(),
18187
- configSchema: ConfigSchemaPassthrough$1
18197
+ configSchema: ConfigSchemaPassthrough$3
18188
18198
  });
18189
18199
  var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
18190
18200
  var LlmDefaultSchema = object({
@@ -19305,7 +19315,7 @@ var TargetKindCapsSchema = object({
19305
19315
  * the union is large and not meant for runtime validation here; the exported
19306
19316
  * `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
19307
19317
  */
19308
- var ConfigSchemaPassthrough = unknown();
19318
+ var ConfigSchemaPassthrough$2 = unknown();
19309
19319
  var TargetKindSchema = object({
19310
19320
  kind: string(),
19311
19321
  label: string(),
@@ -19342,7 +19352,7 @@ var TargetKindSchema = object({
19342
19352
  * its raster path, which is the safe default for an unknown image.
19343
19353
  */
19344
19354
  iconMediaType: string().optional(),
19345
- configSchema: ConfigSchemaPassthrough,
19355
+ configSchema: ConfigSchemaPassthrough$2,
19346
19356
  /**
19347
19357
  * The config keys that decide WHERE this kind's secrets are sent (server,
19348
19358
  * base URL, instance, chat, recipient). A save that changes any of them
@@ -22641,6 +22651,61 @@ var OauthIntegrationDescriptorSchema = object({
22641
22651
  });
22642
22652
  method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" });
22643
22653
  /**
22654
+ * `oidc-connections` — CRUD for IdP rows under `auth-oidc` (D828 sibling).
22655
+ *
22656
+ * One hub-only singleton (`auth-oidc`). The Settings UI is a DataTable +
22657
+ * ItemFormDialog; there is no `editable-array` in `globalSettingsSchema`.
22658
+ * Operator-chosen `id` is the URL slug (`/addon/auth-oidc/<id>/…`) and is
22659
+ * immutable after create.
22660
+ */
22661
+ var ConfigSchemaPassthrough$1 = unknown();
22662
+ var OidcConnectionSchema = object({
22663
+ id: string().min(1),
22664
+ displayName: string(),
22665
+ icon: string(),
22666
+ issuerUrl: string(),
22667
+ clientId: string(),
22668
+ /** Client id + secret present — never the secret value. */
22669
+ configured: boolean(),
22670
+ /**
22671
+ * Values for the connection form schema. `clientSecret` is a keychain
22672
+ * {@link SecretFieldView} or `null` / `''`, never plaintext (D789).
22673
+ */
22674
+ formValues: record(string(), unknown()).optional()
22675
+ });
22676
+ /**
22677
+ * Patch one connection. Omitted or empty `clientSecret` keeps the stored
22678
+ * secret (D787). `{ $secretClear: true }` clears it. `id` is never renamed.
22679
+ */
22680
+ var OidcConnectionUpdateInputSchema = object({
22681
+ id: string().min(1),
22682
+ displayName: string().min(1),
22683
+ icon: string().optional(),
22684
+ issuerUrl: string().optional(),
22685
+ clientId: string().optional(),
22686
+ clientSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
22687
+ redirectUri: string().optional(),
22688
+ scopes: string().optional(),
22689
+ usernameClaim: _enum([
22690
+ "preferred_username",
22691
+ "email",
22692
+ "sub"
22693
+ ]).optional()
22694
+ });
22695
+ method(object({}), ConfigSchemaPassthrough$1, { auth: "admin" }), method(object({}), array(OidcConnectionSchema).readonly(), { auth: "admin" }), method(object({
22696
+ id: string().min(1).regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "id must be a lowercase slug"),
22697
+ displayName: string().min(1)
22698
+ }), object({ id: string() }), {
22699
+ kind: "mutation",
22700
+ auth: "admin"
22701
+ }), method(OidcConnectionUpdateInputSchema, object({ ok: literal(true) }), {
22702
+ kind: "mutation",
22703
+ auth: "admin"
22704
+ }), method(object({ id: string().min(1) }), object({ ok: literal(true) }), {
22705
+ kind: "mutation",
22706
+ auth: "admin"
22707
+ });
22708
+ /**
22644
22709
  * What started a camera's onboard motion (D672). `camera` is the camera's own
22645
22710
  * firmware; `sensor` is a device the operator ATTACHED to it. Absent on the
22646
22711
  * wire means the camera: only the camera-sensors bridge ever says `sensor`.
@@ -23997,24 +24062,69 @@ var RetrainFrameListSchema = object({
23997
24062
  /** What the page pre-selects — the native key frame when one survives. */
23998
24063
  autoPickMediaId: number().int().optional()
23999
24064
  });
24065
+ /** Exclusive partition of a corpus copy's annotation progress (design §4.2). */
24066
+ var RetrainFrameWorkStateSchema = _enum([
24067
+ "unannotated",
24068
+ "annotated",
24069
+ "complete"
24070
+ ]);
24071
+ /**
24072
+ * Filters for paginated corpus list, KPI, and matching export (design §4.4).
24073
+ * Every narrowing field is ANDed; omitted fields impose no constraint.
24074
+ */
24075
+ var RetrainCorpusFilterSchema = object({
24076
+ workState: RetrainFrameWorkStateSchema.optional(),
24077
+ deviceIds: array(number()).max(500).optional(),
24078
+ /** When set, only frames in this named collection. */
24079
+ collectionId: string().optional(),
24080
+ /** Frames that carry at least one saved annotation in one of these classes. */
24081
+ classes: array(RetrainMacroClassSchema).optional(),
24082
+ page: number().int().positive().default(1),
24083
+ pageSize: number().int().positive().max(100).default(50)
24084
+ });
24085
+ var RetrainCorpusPageSchema = object({
24086
+ frames: array(RetrainFrameSchema.extend({ workState: RetrainFrameWorkStateSchema })).readonly(),
24087
+ total: number().int().nonnegative(),
24088
+ page: number().int().positive(),
24089
+ pageSize: number().int().positive()
24090
+ });
24091
+ var RetrainCorpusKpiCameraRowSchema = object({
24092
+ deviceId: number(),
24093
+ unannotated: number().int().nonnegative(),
24094
+ annotated: number().int().nonnegative(),
24095
+ complete: number().int().nonnegative(),
24096
+ /** This camera's `complete` count divided by corpus `total`, in `[0,1]`.
24097
+ * `null` when the corpus is empty (no ratio). */
24098
+ pctOfCorpus: number().min(0).max(1).nullable()
24099
+ });
24100
+ var RetrainCorpusKpiSchema = object({
24101
+ total: number().int().nonnegative(),
24102
+ unannotated: number().int().nonnegative(),
24103
+ annotated: number().int().nonnegative(),
24104
+ complete: number().int().nonnegative(),
24105
+ cameras: array(RetrainCorpusKpiCameraRowSchema).readonly()
24106
+ });
24000
24107
  /**
24001
24108
  * Which frames an annotated export carries. Every field narrows; an empty
24002
- * filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
24003
- * list owned by whoever trains (the training orchestrator), so `frameIds` is
24004
- * the primitive a version export uses; `batchId` re-selects what an earlier
24005
- * export carried (`exportedInBatch`).
24109
+ * filter is every annotated copy. `frameIds` is the primitive a job or
24110
+ * download uses; `batchId` re-selects what an earlier export carried
24111
+ * (`exportedInBatch`). Frozen dataset versions were removed — live selection
24112
+ * resolves to `frameIds` at plan/start.
24006
24113
  */
24007
24114
  var RetrainExportFilterSchema = object({
24008
24115
  deviceIds: array(number()).optional(),
24009
24116
  frameIds: array(string()).max(2e4).optional(),
24010
24117
  /** Only frames in at least one of these named collections. */
24011
24118
  collectionIds: array(string()).max(200).optional(),
24012
- /** Exactly the frames of this dataset version (and its completeOnly). An
24013
- * unknown id selects nothing. */
24014
- datasetVersionId: string().optional(),
24119
+ /** Single collection (Frames filter bar). ANDed with `collectionIds` when both set. */
24120
+ collectionId: string().optional(),
24015
24121
  batchId: string().optional(),
24016
24122
  /** Only frames the operator marked complete (all subjects boxed). */
24017
- completeOnly: boolean().optional()
24123
+ completeOnly: boolean().optional(),
24124
+ /** Exclusive work-state partition (`workStateOf`); same as the corpus list. */
24125
+ workState: RetrainFrameWorkStateSchema.optional(),
24126
+ /** Frames with at least one saved annotation in one of these classes. */
24127
+ classes: array(RetrainMacroClassSchema).optional()
24018
24128
  });
24019
24129
  /**
24020
24130
  * `frames`: the full frame copies, boxes in `annotations.json`.
@@ -24214,8 +24324,7 @@ var RetrainDatasetStatsSchema = object({
24214
24324
  completeFrames: number().int()
24215
24325
  })).readonly()
24216
24326
  });
24217
- /** An immutable dataset version, without its frame list. */
24218
- var RetrainDatasetVersionSchema = object({
24327
+ object({
24219
24328
  id: string(),
24220
24329
  name: string(),
24221
24330
  createdAt: number(),
@@ -24223,22 +24332,33 @@ var RetrainDatasetVersionSchema = object({
24223
24332
  layout: RetrainExportLayoutSchema,
24224
24333
  completeOnly: boolean(),
24225
24334
  frameCount: number().int(),
24226
- /** sha256 of what the frames taught when the version was frozen. */
24227
24335
  annotationHash: string(),
24228
- /** The export manifest schema the version was cut under. */
24229
24336
  manifestSchema: string(),
24230
24337
  stats: RetrainDatasetStatsSchema
24231
24338
  });
24232
- var CreateRetrainDatasetVersionResultSchema = discriminatedUnion("kind", [object({
24233
- kind: literal("created"),
24234
- version: RetrainDatasetVersionSchema
24339
+ /**
24340
+ * Live training corpus criteria — same shape as `TrainingCorpusSelection` on
24341
+ * the training cap. Resolved here so plan/start and the annotated export share
24342
+ * one definition of "the frames" (`buildRetrainExportPlan`).
24343
+ */
24344
+ var RetrainTrainingCorpusSelectionSchema = object({
24345
+ collectionIds: array(string()).min(1),
24346
+ workState: _enum([
24347
+ "complete",
24348
+ "annotated_or_complete",
24349
+ "any_annotated"
24350
+ ]).default("complete")
24351
+ });
24352
+ var RetrainTrainingCorpusResolveResultSchema = discriminatedUnion("kind", [object({
24353
+ kind: literal("resolved"),
24354
+ frameIds: array(string()).max(2e4).readonly(),
24355
+ stats: RetrainDatasetStatsSchema,
24356
+ annotationHash: string(),
24357
+ layout: RetrainExportLayoutSchema
24235
24358
  }), object({
24236
24359
  kind: literal("refused"),
24237
- reason: _enum([
24238
- "empty-name",
24239
- "duplicate-name",
24240
- "no-frames"
24241
- ])
24360
+ reason: _enum(["unknown-collection", "no-frames"]),
24361
+ detail: string()
24242
24362
  })]);
24243
24363
  /** The outcome of a lifecycle move owned by the retrain page. */
24244
24364
  var RetrainTransitionResultSchema = object({
@@ -24945,6 +25065,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
24945
25065
  }), array(RetrainTrackSchema).readonly(), {
24946
25066
  kind: "query",
24947
25067
  auth: "admin"
25068
+ }), method(RetrainCorpusFilterSchema, RetrainCorpusPageSchema, {
25069
+ kind: "query",
25070
+ auth: "admin"
25071
+ }), method(object({}), RetrainCorpusKpiSchema, {
25072
+ kind: "query",
25073
+ auth: "admin"
24948
25074
  }), method(object({ trackId: string() }), RetrainFrameListSchema, {
24949
25075
  kind: "query",
24950
25076
  auth: "admin"
@@ -25040,36 +25166,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25040
25166
  kind: "mutation",
25041
25167
  auth: "admin",
25042
25168
  timeoutMs: 12e4
25043
- }), method(object({
25044
- selection: RetrainDatasetSelectionSchema,
25045
- completeOnly: boolean().optional()
25046
- }), RetrainDatasetStatsSchema, {
25047
- kind: "query",
25048
- auth: "admin"
25049
- }), method(object({
25050
- name: string().max(120),
25051
- selection: RetrainDatasetSelectionSchema,
25052
- layout: RetrainExportLayoutSchema,
25053
- completeOnly: boolean()
25054
- }), CreateRetrainDatasetVersionResultSchema, {
25055
- kind: "mutation",
25056
- auth: "admin",
25057
- timeoutMs: 12e4
25058
- }), method(object({}), array(RetrainDatasetVersionSchema).readonly(), {
25059
- kind: "query",
25060
- auth: "admin"
25061
- }), method(object({ id: string() }), object({ deleted: boolean() }), {
25062
- kind: "mutation",
25063
- auth: "admin"
25064
- }), method(object({ id: string() }), object({
25065
- found: boolean(),
25066
- annotationHash: string(),
25067
- matches: boolean(),
25068
- missingFrames: number().int()
25069
- }), {
25070
- kind: "query",
25071
- auth: "admin",
25072
- timeoutMs: 12e4
25073
25169
  }), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
25074
25170
  kind: "query",
25075
25171
  auth: "admin"
@@ -25096,6 +25192,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25096
25192
  }), method(object({}), array(RetrainCollectionSchema).readonly(), {
25097
25193
  kind: "query",
25098
25194
  auth: "admin"
25195
+ }), method(RetrainTrainingCorpusSelectionSchema, RetrainTrainingCorpusResolveResultSchema, {
25196
+ kind: "query",
25197
+ auth: "admin",
25198
+ timeoutMs: 6e4
25099
25199
  }), method(object({
25100
25200
  id: string(),
25101
25201
  name: string().max(120)
@@ -25712,11 +25812,14 @@ var HardwareClassIdSchema = _enum([
25712
25812
  "intel-n-series",
25713
25813
  "apple-m-base",
25714
25814
  "apple-m-pro",
25815
+ "amd-phoenix",
25715
25816
  "unknown"
25716
25817
  ]);
25717
25818
  var AcceleratorKindSchema = _enum([
25718
25819
  "intel-npu",
25719
25820
  "intel-igpu",
25821
+ "amd-igpu",
25822
+ "amd-npu",
25720
25823
  "x86-cpu",
25721
25824
  "arm-cpu",
25722
25825
  "apple-ane",
@@ -27606,6 +27709,8 @@ var AgentPipelineSettingsSchema = object({
27606
27709
  * address is wrong (multi-homed host, NAT, custom interface).
27607
27710
  */
27608
27711
  reachableHost: string().optional(),
27712
+ /** Hub-persisted UI colour (`--color-node-*` theme tokens). */
27713
+ color: NodeColorIdSchema.optional(),
27609
27714
  /**
27610
27715
  * Multi-device inference opt-in (Phase 4). Per-node map deviceKey → {enabled,
27611
27716
  * weight, steps}. Absent / all-disabled ⇒ the node's single default
@@ -28155,8 +28260,9 @@ method(object({
28155
28260
  auth: "admin"
28156
28261
  }), method(object({
28157
28262
  agentNodeId: string(),
28158
- reachableHost: string().nullable()
28159
- }), object({ success: literal(true) }), {
28263
+ reachableHost: string().nullable().optional(),
28264
+ color: NodeColorIdSchema.nullable().optional()
28265
+ }).refine((v) => v.reachableHost !== void 0 || v.color !== void 0, { message: "reachableHost or color required" }), object({ success: literal(true) }), {
28160
28266
  kind: "mutation",
28161
28267
  auth: "admin"
28162
28268
  }), method(object({
@@ -31203,7 +31309,7 @@ var CustomActionInputSchema = object({
31203
31309
  action: string().min(1),
31204
31310
  input: unknown()
31205
31311
  });
31206
- method(_void(), array(AddonListItemSchema).readonly()), method(object({
31312
+ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSchema).readonly()), method(object({
31207
31313
  addonId: string(),
31208
31314
  limit: number().min(1).max(500).default(100),
31209
31315
  level: LogLevelSchema$2.optional()
@@ -34750,7 +34856,13 @@ var TopologyNodeSchema = object({
34750
34856
  })).readonly(),
34751
34857
  processes: array(TopologyProcessSchema).readonly(),
34752
34858
  categories: array(TopologyCategorySchema).readonly(),
34753
- rootPackage: TopologyRootPackageSchema.nullable()
34859
+ rootPackage: TopologyRootPackageSchema.nullable(),
34860
+ /**
34861
+ * How an online AGENT reaches the hub (mesh mTLS Release A): `tls` once it has
34862
+ * completed a mutual-TLS handshake, `clear` otherwise. Absent for the hub,
34863
+ * for offline rows and when the hub cannot tell.
34864
+ */
34865
+ meshTransport: _enum(["tls", "clear"]).optional()
34754
34866
  });
34755
34867
  var CapUsageEdgeSchema = object({
34756
34868
  callerAddonId: string(),
@@ -35090,6 +35202,7 @@ var OsdNamedTemplateSchema = object({
35090
35202
  });
35091
35203
  /** Where a slot's value comes from. */
35092
35204
  var OsdSourceSchema = discriminatedUnion("kind", [
35205
+ object({ kind: literal("none") }),
35093
35206
  object({
35094
35207
  kind: literal("static"),
35095
35208
  text: string().max(64)
@@ -35216,6 +35329,13 @@ method(object({ deviceId: number().int() }), object({
35216
35329
  }), object({ success: literal(true) }), {
35217
35330
  kind: "mutation",
35218
35331
  auth: "admin"
35332
+ }), method(object({
35333
+ deviceId: number().int(),
35334
+ slotId: string().min(1),
35335
+ enabled: boolean()
35336
+ }), object({ success: literal(true) }), {
35337
+ kind: "mutation",
35338
+ auth: "admin"
35219
35339
  }), method(object({
35220
35340
  sourceDeviceId: number().int(),
35221
35341
  targetDeviceId: number().int()
@@ -35596,7 +35716,15 @@ var GpuInfoSchema = object({
35596
35716
  name: string(),
35597
35717
  memoryMB: number().optional()
35598
35718
  });
35599
- var NpuInfoSchema = object({ type: _enum(["apple-ane", "intel-npu"]) });
35719
+ var NpuInfoSchema = object({
35720
+ type: _enum([
35721
+ "apple-ane",
35722
+ "intel-npu",
35723
+ "amd-xdna"
35724
+ ]),
35725
+ name: string().optional(),
35726
+ generation: _enum(["xdna1", "xdna2"]).optional()
35727
+ });
35600
35728
  var CoralInfoSchema = object({
35601
35729
  type: literal("coral-edgetpu"),
35602
35730
  bus: string().optional()
@@ -39358,9 +39486,11 @@ DeviceType.Camera, method(object({
39358
39486
  * once is what makes a second provider (RunPod, a local NVIDIA node) a new
39359
39487
  * manifest entry and nothing else.
39360
39488
  *
39361
- * Collection, routed by the `addonId` in every single-row input (the `llm` /
39362
- * `notification-output` posture); `describe` concat-fans across providers.
39363
- * Every method is `admin`: these spend money.
39489
+ * Collection of provider **types** (addons). Each addon owns zero or more
39490
+ * **entries** (credentials + defaults). Concat-fans: `describe`,
39491
+ * `describeTypes`, `listEntries`, `listJobs`. Single-row work is keyed by
39492
+ * `entryId`; callers also pass the owning `addonId` as the collection
39493
+ * selector (broker posture). Every method is `admin`: these spend money.
39364
39494
  *
39365
39495
  * Every cloud object a provider creates is tagged with the orchestrator's
39366
39496
  * `jobKey`, so a retried submit finds the job it already started instead of
@@ -39384,8 +39514,8 @@ var TrainingRegionOptionSchema = object({
39384
39514
  priceMultiplier: number().positive()
39385
39515
  });
39386
39516
  /**
39387
- * The provider's per-account settings, as the orchestrator reads them. They
39388
- * live in the PROVIDER addon's settings (operator decision 2026-10-08: they
39517
+ * The provider's per-entry settings, as the orchestrator reads them. They
39518
+ * live on the PROVIDER addon's entry (operator decision 2026-10-08: they
39389
39519
  * depend on the user's account), never hard-coded in the orchestrator.
39390
39520
  */
39391
39521
  var TrainingProviderDefaultsSchema = object({
@@ -39396,9 +39526,44 @@ var TrainingProviderDefaultsSchema = object({
39396
39526
  /** Hours a FAILED job's cloud dataset is kept for debugging; 0 = delete at once. */
39397
39527
  failedDatasetGraceHours: number().nonnegative()
39398
39528
  });
39529
+ /**
39530
+ * Entry form schema for a provider type — same seam as notification
39531
+ * `TargetKind.configSchema` (`z.unknown()` at the wire; callers tighten to
39532
+ * {@link ConfigUISchema}). Drives `ConfigFormBuilder` on Training → Providers.
39533
+ */
39534
+ var ConfigSchemaPassthrough = unknown();
39535
+ /** One creatable provider type, for the Add-entry dialog. */
39536
+ var TrainingProviderTypeSchema = object({
39537
+ typeId: string(),
39538
+ label: string(),
39539
+ /** Path under the addon package (e.g. `assets/training-modal/icon.svg`). */
39540
+ iconAsset: string(),
39541
+ /** Owning `training-provider` addon — collection selector for createEntry. */
39542
+ addonId: string(),
39543
+ /**
39544
+ * Fields for one entry of this type (credentials + defaults). Absent on a
39545
+ * type that only needs a name. Password fields are keychain-backed on the
39546
+ * provider addon (`secretStatePaths`), not D634 plaintext.
39547
+ */
39548
+ configSchema: ConfigSchemaPassthrough.optional()
39549
+ });
39550
+ /** One configured account / workspace under a provider type. */
39551
+ var TrainingProviderEntrySchema = object({
39552
+ entryId: string(),
39553
+ typeId: string(),
39554
+ name: string(),
39555
+ addonId: string(),
39556
+ /** Credentials are present — never the values. */
39557
+ configured: boolean()
39558
+ });
39399
39559
  var TrainingProviderDescriptorSchema = object({
39400
39560
  addonId: string(),
39401
- /** `modal`, `runpod`, `fake`, … */
39561
+ entryId: string(),
39562
+ typeId: string(),
39563
+ /** Operator-chosen entry name. */
39564
+ name: string(),
39565
+ iconAsset: string(),
39566
+ /** `modal`, `runpod`, `fake`, … — same as typeId for current providers. */
39402
39567
  kind: string(),
39403
39568
  label: string(),
39404
39569
  gpuTypes: array(TrainingGpuOptionSchema).readonly(),
@@ -39410,7 +39575,30 @@ var TrainingProviderDescriptorSchema = object({
39410
39575
  dataResidencyNote: string(),
39411
39576
  /** Credentials are present — never the values. */
39412
39577
  configured: boolean(),
39413
- defaults: TrainingProviderDefaultsSchema
39578
+ defaults: TrainingProviderDefaultsSchema,
39579
+ /**
39580
+ * Values for {@link TrainingProviderTypeSchema}'s `configSchema` — password
39581
+ * fields are keychain {@link SecretFieldView} or `null` / `''` (create),
39582
+ * never plaintext. Same hydrate contract as settings forms (D789).
39583
+ */
39584
+ formValues: record(string(), unknown()).optional()
39585
+ });
39586
+ /**
39587
+ * Patch one entry's name, credentials and defaults. Pin with owning `{ addonId }`.
39588
+ * An omitted or empty `tokenSecret` means KEEP the stored secret (D787).
39589
+ * `{ $secretClear: true }` clears it.
39590
+ */
39591
+ var TrainingProviderUpdateEntryInputSchema = object({
39592
+ entryId: string().min(1),
39593
+ name: string().min(1),
39594
+ tokenId: string().optional(),
39595
+ tokenSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
39596
+ environment: string().optional(),
39597
+ gpuType: string().optional(),
39598
+ region: string().optional(),
39599
+ costCapUsd: number().nonnegative().optional(),
39600
+ maxRuntimeSec: number().int().positive().optional(),
39601
+ failedDatasetGraceHours: number().nonnegative().optional()
39414
39602
  });
39415
39603
  var TrainingCredentialCheckSchema = object({
39416
39604
  ok: boolean(),
@@ -39462,20 +39650,33 @@ var TrainerSourceRefSchema = object({
39462
39650
  /** A commit sha (never a branch) — the job must be reproducible. */
39463
39651
  revision: string().regex(/^[0-9a-f]{7,64}$/)
39464
39652
  });
39653
+ /** Cloud job identity — route with the owning addon's `addonId` selector. */
39465
39654
  var JobRef = {
39466
- addonId: string(),
39655
+ entryId: string().min(1),
39467
39656
  jobKey: string().uuid()
39468
39657
  };
39469
39658
  var TrainingLogLineSchema = object({
39470
39659
  ts: number(),
39471
39660
  text: string()
39472
39661
  });
39473
- method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({ addonId: string() }), TrainingCredentialCheckSchema, {
39662
+ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderTypeSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderEntrySchema).readonly(), { auth: "admin" }), method(object({
39663
+ typeId: string().min(1),
39664
+ name: string().min(1)
39665
+ }), object({ entryId: string() }), {
39666
+ kind: "mutation",
39667
+ auth: "admin"
39668
+ }), method(object({ entryId: string().min(1) }), object({ ok: literal(true) }), {
39669
+ kind: "mutation",
39670
+ auth: "admin"
39671
+ }), method(TrainingProviderUpdateEntryInputSchema, object({ ok: literal(true) }), {
39672
+ kind: "mutation",
39673
+ auth: "admin"
39674
+ }), method(object({ entryId: string().min(1) }), TrainingCredentialCheckSchema, {
39474
39675
  kind: "mutation",
39475
39676
  auth: "admin",
39476
39677
  timeoutMs: 3e4
39477
39678
  }), method(object({
39478
- addonId: string(),
39679
+ entryId: string().min(1),
39479
39680
  gpuType: string(),
39480
39681
  region: string(),
39481
39682
  datasetBytes: number().int().nonnegative(),
@@ -39541,7 +39742,7 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
39541
39742
  kind: "mutation",
39542
39743
  auth: "admin",
39543
39744
  timeoutMs: 5 * 6e4
39544
- }), method(object({ addonId: string() }), array(ProviderJobStatusSchema).readonly(), {
39745
+ }), method(object({ entryId: string().min(1).optional() }), array(ProviderJobStatusSchema).readonly(), {
39545
39746
  auth: "admin",
39546
39747
  timeoutMs: 2 * 6e4
39547
39748
  });
@@ -39551,20 +39752,31 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
39551
39752
  *
39552
39753
  * It owns what every provider must agree on, written once:
39553
39754
  *
39554
- * - **Dataset versions.** Taken over from pipeline-analytics (D796): the rows
39555
- * live here (D808); pipeline-analytics still CUTS a version (it owns the corpus and
39556
- * the export plan) and reaches this store through the five row methods
39557
- * below, so the Retrain page and the export did not change.
39558
39755
  * - **Jobs.** A persisted state machine, a reconcile loop against the
39559
39756
  * provider, a cost guard, a daily orphan sweep and the retention rules.
39560
39757
  * - **The return flow.** Verified artefacts → Model Studio
39561
39758
  * (`custom-model-registry.importModelBundle`) → canary on cameras →
39562
39759
  * rollback. Nothing is ever registered automatically.
39563
39760
  *
39761
+ * Plan/start takes a live {@link TrainingCorpusSelection} (collections +
39762
+ * work-state rule); frame ids are resolved via pipeline-analytics at that
39763
+ * moment and snapshotted on the job. No frozen dataset version.
39764
+ *
39564
39765
  * Every method is `admin`.
39565
39766
  */
39566
- /** A version WITH its frame list — what the export and a job read. */
39567
- var TrainingDatasetVersionRowSchema = RetrainDatasetVersionSchema.omit({ frameCount: true }).extend({ frameIds: array(string()).max(2e4).readonly() });
39767
+ /**
39768
+ * Live corpus criteria for plan/start (design §5.2). Default is complete-only.
39769
+ * Frame ids are resolved at plan/start — never a frozen version id.
39770
+ */
39771
+ var TrainingCorpusSelectionSchema = object({
39772
+ collectionIds: array(string()).min(1),
39773
+ /** Default complete-only for v1 */
39774
+ workState: _enum([
39775
+ "complete",
39776
+ "annotated_or_complete",
39777
+ "any_annotated"
39778
+ ]).default("complete")
39779
+ });
39568
39780
  /** A base model a detector job can fine-tune, and the baseline it is judged against. */
39569
39781
  var TrainingBaseModelSchema = object({
39570
39782
  modelId: string(),
@@ -39582,9 +39794,13 @@ var TrainingPresetSchema = _enum([
39582
39794
  "thorough"
39583
39795
  ]);
39584
39796
  var TrainingJobRequestSchema = object({
39585
- datasetVersionId: string().min(1),
39586
- /** The `training-provider` addon that runs it. */
39587
- addonId: string().min(1),
39797
+ /** Live collection + work-state criteria; resolved at plan/start. */
39798
+ selection: TrainingCorpusSelectionSchema,
39799
+ /**
39800
+ * The provider **entry** that runs it (credentials + defaults).
39801
+ * Resolve to an owning addon via `training-provider.describe` / `listEntries`.
39802
+ */
39803
+ entryId: string().min(1),
39588
39804
  gpuType: string().min(1),
39589
39805
  region: string(),
39590
39806
  baseModelId: string().min(1),
@@ -39643,6 +39859,7 @@ var TrainingJobPlanSchema = object({
39643
39859
  * result lives after the operator acted on it.
39644
39860
  */
39645
39861
  var TrainingJobStateSchema = _enum([
39862
+ "queued",
39646
39863
  "uploading",
39647
39864
  "submitted",
39648
39865
  "starting",
@@ -39696,6 +39913,11 @@ var TrainingJobSchema = object({
39696
39913
  createdAt: number(),
39697
39914
  updatedAt: number(),
39698
39915
  state: TrainingJobStateSchema,
39916
+ /**
39917
+ * Shared by every job enqueued together via `startJobBatch`.
39918
+ * `null` for a lone `startJob`. The engine advances queued siblings by this id.
39919
+ */
39920
+ batchId: string().nullable().default(null),
39699
39921
  stage: TrainingStageSchema.nullable(),
39700
39922
  failure: object({
39701
39923
  reason: TrainingFailureReasonSchema,
@@ -39707,6 +39929,12 @@ var TrainingJobSchema = object({
39707
39929
  maxRuntimeSec: number().int().positive(),
39708
39930
  trainer: TrainerSourceRefSchema,
39709
39931
  datasetLayout: RetrainExportLayoutSchema,
39932
+ /** Frame count snapshotted when the job started (audit; equals `frameIds.length`). */
39933
+ frameCount: number().int().nonnegative(),
39934
+ /** Resolved frame ids at start — the archive ships exactly these. */
39935
+ frameIds: array(string()).max(2e4).readonly(),
39936
+ /** Hash of what those frames taught at start (trainer `dataset.annotationHash`). */
39937
+ annotationHash: string(),
39710
39938
  dataset: object({
39711
39939
  bytes: number().int(),
39712
39940
  sha256: string(),
@@ -39748,13 +39976,7 @@ var TrainingJobSchema = object({
39748
39976
  canary: TrainingCanarySchema.nullable()
39749
39977
  });
39750
39978
  var IdInput = object({ id: string().min(1) });
39751
- method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
39752
- kind: "mutation",
39753
- auth: "admin"
39754
- }), 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() }), {
39755
- kind: "mutation",
39756
- auth: "admin"
39757
- }), method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
39979
+ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
39758
39980
  auth: "admin",
39759
39981
  timeoutMs: 6e4
39760
39982
  }), method(TrainingJobRequestSchema.extend({
@@ -39773,6 +39995,24 @@ method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
39773
39995
  kind: "mutation",
39774
39996
  auth: "admin",
39775
39997
  timeoutMs: 12e4
39998
+ }), method(TrainingJobRequestSchema.omit({ baseModelId: true }).extend({
39999
+ baseModelIds: array(string().min(1)).min(1),
40000
+ name: string().min(1).max(120),
40001
+ maxCostUsd: number().positive(),
40002
+ maxRuntimeSec: number().int().positive(),
40003
+ idempotencyKey: string().min(8).max(80)
40004
+ }), discriminatedUnion("kind", [object({
40005
+ kind: literal("started"),
40006
+ batchId: string(),
40007
+ jobs: array(TrainingJobSchema).min(1).readonly()
40008
+ }), object({
40009
+ kind: literal("refused"),
40010
+ reason: TrainingRefusalReasonSchema,
40011
+ detail: string()
40012
+ })]), {
40013
+ kind: "mutation",
40014
+ auth: "admin",
40015
+ timeoutMs: 12e4
39776
40016
  }), method(object({}), array(TrainingJobSchema).readonly(), { auth: "admin" }), method(IdInput, TrainingJobSchema.nullable(), { auth: "admin" }), method(IdInput, TrainingJobSchema, {
39777
40017
  kind: "mutation",
39778
40018
  auth: "admin",
@@ -43806,6 +44046,36 @@ Object.freeze({
43806
44046
  addonId: null,
43807
44047
  access: "view"
43808
44048
  },
44049
+ "oidcConnections.connectionFormSchema": {
44050
+ capName: "oidc-connections",
44051
+ capScope: "system",
44052
+ addonId: null,
44053
+ access: "view"
44054
+ },
44055
+ "oidcConnections.createConnection": {
44056
+ capName: "oidc-connections",
44057
+ capScope: "system",
44058
+ addonId: null,
44059
+ access: "create"
44060
+ },
44061
+ "oidcConnections.deleteConnection": {
44062
+ capName: "oidc-connections",
44063
+ capScope: "system",
44064
+ addonId: null,
44065
+ access: "delete"
44066
+ },
44067
+ "oidcConnections.listConnections": {
44068
+ capName: "oidc-connections",
44069
+ capScope: "system",
44070
+ addonId: null,
44071
+ access: "view"
44072
+ },
44073
+ "oidcConnections.updateConnection": {
44074
+ capName: "oidc-connections",
44075
+ capScope: "system",
44076
+ addonId: null,
44077
+ access: "create"
44078
+ },
43809
44079
  "osd.getStatus": {
43810
44080
  capName: "osd",
43811
44081
  capScope: "device",
@@ -43878,6 +44148,12 @@ Object.freeze({
43878
44148
  addonId: null,
43879
44149
  access: "create"
43880
44150
  },
44151
+ "osdManager.setSlotCameraEnabled": {
44152
+ capName: "osd-manager",
44153
+ capScope: "system",
44154
+ addonId: null,
44155
+ access: "create"
44156
+ },
43881
44157
  "osdManager.upsertTemplate": {
43882
44158
  capName: "osd-manager",
43883
44159
  capScope: "system",
@@ -44016,12 +44292,6 @@ Object.freeze({
44016
44292
  addonId: null,
44017
44293
  access: "create"
44018
44294
  },
44019
- "pipelineAnalytics.createRetrainDatasetVersion": {
44020
- capName: "pipeline-analytics",
44021
- capScope: "device",
44022
- addonId: null,
44023
- access: "create"
44024
- },
44025
44295
  "pipelineAnalytics.deleteDeviceEvents": {
44026
44296
  capName: "pipeline-analytics",
44027
44297
  capScope: "device",
@@ -44034,12 +44304,6 @@ Object.freeze({
44034
44304
  addonId: null,
44035
44305
  access: "delete"
44036
44306
  },
44037
- "pipelineAnalytics.deleteRetrainDatasetVersion": {
44038
- capName: "pipeline-analytics",
44039
- capScope: "device",
44040
- addonId: null,
44041
- access: "delete"
44042
- },
44043
44307
  "pipelineAnalytics.deleteTracks": {
44044
44308
  capName: "pipeline-analytics",
44045
44309
  capScope: "device",
@@ -44142,6 +44406,12 @@ Object.freeze({
44142
44406
  addonId: null,
44143
44407
  access: "view"
44144
44408
  },
44409
+ "pipelineAnalytics.getRetrainCorpusKpi": {
44410
+ capName: "pipeline-analytics",
44411
+ capScope: "device",
44412
+ addonId: null,
44413
+ access: "view"
44414
+ },
44145
44415
  "pipelineAnalytics.getRetrainExportUrl": {
44146
44416
  capName: "pipeline-analytics",
44147
44417
  capScope: "device",
@@ -44262,7 +44532,7 @@ Object.freeze({
44262
44532
  addonId: null,
44263
44533
  access: "view"
44264
44534
  },
44265
- "pipelineAnalytics.listRetrainDatasetVersions": {
44535
+ "pipelineAnalytics.listRetrainCorpusPage": {
44266
44536
  capName: "pipeline-analytics",
44267
44537
  capScope: "device",
44268
44538
  addonId: null,
@@ -44316,12 +44586,6 @@ Object.freeze({
44316
44586
  addonId: null,
44317
44587
  access: "create"
44318
44588
  },
44319
- "pipelineAnalytics.previewRetrainDataset": {
44320
- capName: "pipeline-analytics",
44321
- capScope: "device",
44322
- addonId: null,
44323
- access: "view"
44324
- },
44325
44589
  "pipelineAnalytics.proposeRetrainAnnotations": {
44326
44590
  capName: "pipeline-analytics",
44327
44591
  capScope: "device",
@@ -44400,6 +44664,12 @@ Object.freeze({
44400
44664
  addonId: null,
44401
44665
  access: "create"
44402
44666
  },
44667
+ "pipelineAnalytics.resolveRetrainTrainingCorpus": {
44668
+ capName: "pipeline-analytics",
44669
+ capScope: "device",
44670
+ addonId: null,
44671
+ access: "view"
44672
+ },
44403
44673
  "pipelineAnalytics.restageRetrainTrack": {
44404
44674
  capName: "pipeline-analytics",
44405
44675
  capScope: "device",
@@ -44460,12 +44730,6 @@ Object.freeze({
44460
44730
  addonId: null,
44461
44731
  access: "create"
44462
44732
  },
44463
- "pipelineAnalytics.verifyRetrainDatasetVersion": {
44464
- capName: "pipeline-analytics",
44465
- capScope: "device",
44466
- addonId: null,
44467
- access: "view"
44468
- },
44469
44733
  "pipelineAnalytics.wipeAllAnalytics": {
44470
44734
  capName: "pipeline-analytics",
44471
44735
  capScope: "device",
@@ -46860,18 +47124,6 @@ Object.freeze({
46860
47124
  addonId: null,
46861
47125
  access: "create"
46862
47126
  },
46863
- "training.findDatasetVersionIdByName": {
46864
- capName: "training",
46865
- capScope: "system",
46866
- addonId: null,
46867
- access: "view"
46868
- },
46869
- "training.getDatasetVersion": {
46870
- capName: "training",
46871
- capScope: "system",
46872
- addonId: null,
46873
- access: "view"
46874
- },
46875
47127
  "training.getJob": {
46876
47128
  capName: "training",
46877
47129
  capScope: "system",
@@ -46890,12 +47142,6 @@ Object.freeze({
46890
47142
  addonId: null,
46891
47143
  access: "view"
46892
47144
  },
46893
- "training.listDatasetVersions": {
46894
- capName: "training",
46895
- capScope: "system",
46896
- addonId: null,
46897
- access: "view"
46898
- },
46899
47145
  "training.listJobs": {
46900
47146
  capName: "training",
46901
47147
  capScope: "system",
@@ -46908,54 +47154,66 @@ Object.freeze({
46908
47154
  addonId: null,
46909
47155
  access: "view"
46910
47156
  },
46911
- "training.putDatasetVersion": {
47157
+ "training.registerResult": {
46912
47158
  capName: "training",
46913
47159
  capScope: "system",
46914
47160
  addonId: null,
46915
47161
  access: "create"
46916
47162
  },
46917
- "training.registerResult": {
47163
+ "training.rollbackCanary": {
46918
47164
  capName: "training",
46919
47165
  capScope: "system",
46920
47166
  addonId: null,
46921
47167
  access: "create"
46922
47168
  },
46923
- "training.removeDatasetVersion": {
47169
+ "training.startJob": {
46924
47170
  capName: "training",
46925
47171
  capScope: "system",
46926
47172
  addonId: null,
46927
- access: "delete"
47173
+ access: "create"
46928
47174
  },
46929
- "training.rollbackCanary": {
47175
+ "training.startJobBatch": {
46930
47176
  capName: "training",
46931
47177
  capScope: "system",
46932
47178
  addonId: null,
46933
47179
  access: "create"
46934
47180
  },
46935
- "training.startJob": {
46936
- capName: "training",
47181
+ "trainingProvider.cancelJob": {
47182
+ capName: "training-provider",
46937
47183
  capScope: "system",
46938
47184
  addonId: null,
46939
47185
  access: "create"
46940
47186
  },
46941
- "trainingProvider.cancelJob": {
47187
+ "trainingProvider.cleanupJob": {
46942
47188
  capName: "training-provider",
46943
47189
  capScope: "system",
46944
47190
  addonId: null,
46945
47191
  access: "create"
46946
47192
  },
46947
- "trainingProvider.cleanupJob": {
47193
+ "trainingProvider.createEntry": {
46948
47194
  capName: "training-provider",
46949
47195
  capScope: "system",
46950
47196
  addonId: null,
46951
47197
  access: "create"
46952
47198
  },
47199
+ "trainingProvider.deleteEntry": {
47200
+ capName: "training-provider",
47201
+ capScope: "system",
47202
+ addonId: null,
47203
+ access: "delete"
47204
+ },
46953
47205
  "trainingProvider.describe": {
46954
47206
  capName: "training-provider",
46955
47207
  capScope: "system",
46956
47208
  addonId: null,
46957
47209
  access: "view"
46958
47210
  },
47211
+ "trainingProvider.describeTypes": {
47212
+ capName: "training-provider",
47213
+ capScope: "system",
47214
+ addonId: null,
47215
+ access: "view"
47216
+ },
46959
47217
  "trainingProvider.estimateJob": {
46960
47218
  capName: "training-provider",
46961
47219
  capScope: "system",
@@ -46968,6 +47226,12 @@ Object.freeze({
46968
47226
  addonId: null,
46969
47227
  access: "view"
46970
47228
  },
47229
+ "trainingProvider.listEntries": {
47230
+ capName: "training-provider",
47231
+ capScope: "system",
47232
+ addonId: null,
47233
+ access: "view"
47234
+ },
46971
47235
  "trainingProvider.listJobEvents": {
46972
47236
  capName: "training-provider",
46973
47237
  capScope: "system",
@@ -46998,6 +47262,12 @@ Object.freeze({
46998
47262
  addonId: null,
46999
47263
  access: "create"
47000
47264
  },
47265
+ "trainingProvider.updateEntry": {
47266
+ capName: "training-provider",
47267
+ capScope: "system",
47268
+ addonId: null,
47269
+ access: "create"
47270
+ },
47001
47271
  "trainingProvider.uploadDataset": {
47002
47272
  capName: "training-provider",
47003
47273
  capScope: "system",
@@ -50204,6 +50474,11 @@ Object.freeze({
50204
50474
  form: "single",
50205
50475
  optional: false
50206
50476
  }],
50477
+ "osdManager.setSlotCameraEnabled": [{
50478
+ name: "deviceId",
50479
+ form: "single",
50480
+ optional: false
50481
+ }],
50207
50482
  "petFeeder.callPet": [{
50208
50483
  name: "deviceId",
50209
50484
  form: "single",
@@ -50424,6 +50699,11 @@ Object.freeze({
50424
50699
  form: "array",
50425
50700
  optional: false
50426
50701
  }],
50702
+ "pipelineAnalytics.listRetrainCorpusPage": [{
50703
+ name: "deviceIds",
50704
+ form: "array",
50705
+ optional: true
50706
+ }],
50427
50707
  "pipelineAnalytics.listRetrainStaging": [{
50428
50708
  name: "deviceIds",
50429
50709
  form: "array",
@@ -51533,6 +51813,7 @@ Object.freeze({
51533
51813
  });
51534
51814
  Object.freeze({
51535
51815
  "broker": "broker",
51816
+ "calendar-source": "calendar",
51536
51817
  "device-export": "device-export",
51537
51818
  "llm": "ai",
51538
51819
  "mesh-network": "mesh",
@@ -52018,6 +52299,8 @@ var STATE_SUMMARY_VARS = [
52018
52299
  [...RULE_TEXT],
52019
52300
  [...RULE_TEXT],
52020
52301
  [...RULE_TEXT],
52302
+ [...RULE_TEXT],
52303
+ [...RULE_TEXT],
52021
52304
  ([...RULE_TEXT], [...UPDATES]),
52022
52305
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),
52023
52306
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),