@camstack/addon-export-google 0.1.91 → 0.1.93

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.
@@ -5455,7 +5455,7 @@ var ZodIssueCode = {
5455
5455
  var ZodFirstPartyTypeKind;
5456
5456
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5457
5457
  //#endregion
5458
- //#region ../types/dist/sleep-r3RWkGVx.mjs
5458
+ //#region ../types/dist/sleep-DwAQ9sqX.mjs
5459
5459
  /**
5460
5460
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5461
5461
  * window to float samples (D455).
@@ -9416,6 +9416,16 @@ var CompositionSchema = object({
9416
9416
  seen.add(feature.cap);
9417
9417
  });
9418
9418
  });
9419
+ var NodeColorIdSchema = _enum([
9420
+ "node-a",
9421
+ "node-b",
9422
+ "node-c",
9423
+ "node-d",
9424
+ "node-e",
9425
+ "node-f",
9426
+ "node-g",
9427
+ "node-h"
9428
+ ]);
9419
9429
  new Set([
9420
9430
  "track",
9421
9431
  "face",
@@ -18323,14 +18333,14 @@ var LlmProfileSchema = object({
18323
18333
  /** ConfigUISchema tree passed through untyped on the wire (the
18324
18334
  * notification-output `ConfigSchemaPassthrough` precedent at
18325
18335
  * notification-output.cap.ts:151); the exported TS type re-tightens it. */
18326
- var ConfigSchemaPassthrough$1 = unknown();
18336
+ var ConfigSchemaPassthrough$3 = unknown();
18327
18337
  var LlmProfileKindDescriptorSchema = object({
18328
18338
  kind: LlmProfileKindSchema,
18329
18339
  label: string(),
18330
18340
  icon: string(),
18331
18341
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
18332
18342
  addonId: string(),
18333
- configSchema: ConfigSchemaPassthrough$1
18343
+ configSchema: ConfigSchemaPassthrough$3
18334
18344
  });
18335
18345
  var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
18336
18346
  var LlmDefaultSchema = object({
@@ -19451,7 +19461,7 @@ var TargetKindCapsSchema = object({
19451
19461
  * the union is large and not meant for runtime validation here; the exported
19452
19462
  * `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
19453
19463
  */
19454
- var ConfigSchemaPassthrough = unknown();
19464
+ var ConfigSchemaPassthrough$2 = unknown();
19455
19465
  var TargetKindSchema = object({
19456
19466
  kind: string(),
19457
19467
  label: string(),
@@ -19488,7 +19498,7 @@ var TargetKindSchema = object({
19488
19498
  * its raster path, which is the safe default for an unknown image.
19489
19499
  */
19490
19500
  iconMediaType: string().optional(),
19491
- configSchema: ConfigSchemaPassthrough,
19501
+ configSchema: ConfigSchemaPassthrough$2,
19492
19502
  /**
19493
19503
  * The config keys that decide WHERE this kind's secrets are sent (server,
19494
19504
  * base URL, instance, chat, recipient). A save that changes any of them
@@ -22803,6 +22813,61 @@ var oauthIntegrationCapability = {
22803
22813
  getDescriptor: method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" }) }
22804
22814
  };
22805
22815
  /**
22816
+ * `oidc-connections` — CRUD for IdP rows under `auth-oidc` (D828 sibling).
22817
+ *
22818
+ * One hub-only singleton (`auth-oidc`). The Settings UI is a DataTable +
22819
+ * ItemFormDialog; there is no `editable-array` in `globalSettingsSchema`.
22820
+ * Operator-chosen `id` is the URL slug (`/addon/auth-oidc/<id>/…`) and is
22821
+ * immutable after create.
22822
+ */
22823
+ var ConfigSchemaPassthrough$1 = unknown();
22824
+ var OidcConnectionSchema = object({
22825
+ id: string().min(1),
22826
+ displayName: string(),
22827
+ icon: string(),
22828
+ issuerUrl: string(),
22829
+ clientId: string(),
22830
+ /** Client id + secret present — never the secret value. */
22831
+ configured: boolean(),
22832
+ /**
22833
+ * Values for the connection form schema. `clientSecret` is a keychain
22834
+ * {@link SecretFieldView} or `null` / `''`, never plaintext (D789).
22835
+ */
22836
+ formValues: record(string(), unknown()).optional()
22837
+ });
22838
+ /**
22839
+ * Patch one connection. Omitted or empty `clientSecret` keeps the stored
22840
+ * secret (D787). `{ $secretClear: true }` clears it. `id` is never renamed.
22841
+ */
22842
+ var OidcConnectionUpdateInputSchema = object({
22843
+ id: string().min(1),
22844
+ displayName: string().min(1),
22845
+ icon: string().optional(),
22846
+ issuerUrl: string().optional(),
22847
+ clientId: string().optional(),
22848
+ clientSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
22849
+ redirectUri: string().optional(),
22850
+ scopes: string().optional(),
22851
+ usernameClaim: _enum([
22852
+ "preferred_username",
22853
+ "email",
22854
+ "sub"
22855
+ ]).optional()
22856
+ });
22857
+ method(object({}), ConfigSchemaPassthrough$1, { auth: "admin" }), method(object({}), array(OidcConnectionSchema).readonly(), { auth: "admin" }), method(object({
22858
+ id: string().min(1).regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "id must be a lowercase slug"),
22859
+ displayName: string().min(1)
22860
+ }), object({ id: string() }), {
22861
+ kind: "mutation",
22862
+ auth: "admin"
22863
+ }), method(OidcConnectionUpdateInputSchema, object({ ok: literal(true) }), {
22864
+ kind: "mutation",
22865
+ auth: "admin"
22866
+ }), method(object({ id: string().min(1) }), object({ ok: literal(true) }), {
22867
+ kind: "mutation",
22868
+ auth: "admin"
22869
+ });
22870
+ /**
22806
22871
  * What started a camera's onboard motion (D672). `camera` is the camera's own
22807
22872
  * firmware; `sensor` is a device the operator ATTACHED to it. Absent on the
22808
22873
  * wire means the camera: only the camera-sensors bridge ever says `sensor`.
@@ -24159,24 +24224,69 @@ var RetrainFrameListSchema = object({
24159
24224
  /** What the page pre-selects — the native key frame when one survives. */
24160
24225
  autoPickMediaId: number().int().optional()
24161
24226
  });
24227
+ /** Exclusive partition of a corpus copy's annotation progress (design §4.2). */
24228
+ var RetrainFrameWorkStateSchema = _enum([
24229
+ "unannotated",
24230
+ "annotated",
24231
+ "complete"
24232
+ ]);
24233
+ /**
24234
+ * Filters for paginated corpus list, KPI, and matching export (design §4.4).
24235
+ * Every narrowing field is ANDed; omitted fields impose no constraint.
24236
+ */
24237
+ var RetrainCorpusFilterSchema = object({
24238
+ workState: RetrainFrameWorkStateSchema.optional(),
24239
+ deviceIds: array(number()).max(500).optional(),
24240
+ /** When set, only frames in this named collection. */
24241
+ collectionId: string().optional(),
24242
+ /** Frames that carry at least one saved annotation in one of these classes. */
24243
+ classes: array(RetrainMacroClassSchema).optional(),
24244
+ page: number().int().positive().default(1),
24245
+ pageSize: number().int().positive().max(100).default(50)
24246
+ });
24247
+ var RetrainCorpusPageSchema = object({
24248
+ frames: array(RetrainFrameSchema.extend({ workState: RetrainFrameWorkStateSchema })).readonly(),
24249
+ total: number().int().nonnegative(),
24250
+ page: number().int().positive(),
24251
+ pageSize: number().int().positive()
24252
+ });
24253
+ var RetrainCorpusKpiCameraRowSchema = object({
24254
+ deviceId: number(),
24255
+ unannotated: number().int().nonnegative(),
24256
+ annotated: number().int().nonnegative(),
24257
+ complete: number().int().nonnegative(),
24258
+ /** This camera's `complete` count divided by corpus `total`, in `[0,1]`.
24259
+ * `null` when the corpus is empty (no ratio). */
24260
+ pctOfCorpus: number().min(0).max(1).nullable()
24261
+ });
24262
+ var RetrainCorpusKpiSchema = object({
24263
+ total: number().int().nonnegative(),
24264
+ unannotated: number().int().nonnegative(),
24265
+ annotated: number().int().nonnegative(),
24266
+ complete: number().int().nonnegative(),
24267
+ cameras: array(RetrainCorpusKpiCameraRowSchema).readonly()
24268
+ });
24162
24269
  /**
24163
24270
  * Which frames an annotated export carries. Every field narrows; an empty
24164
- * filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
24165
- * list owned by whoever trains (the training orchestrator), so `frameIds` is
24166
- * the primitive a version export uses; `batchId` re-selects what an earlier
24167
- * export carried (`exportedInBatch`).
24271
+ * filter is every annotated copy. `frameIds` is the primitive a job or
24272
+ * download uses; `batchId` re-selects what an earlier export carried
24273
+ * (`exportedInBatch`). Frozen dataset versions were removed — live selection
24274
+ * resolves to `frameIds` at plan/start.
24168
24275
  */
24169
24276
  var RetrainExportFilterSchema = object({
24170
24277
  deviceIds: array(number()).optional(),
24171
24278
  frameIds: array(string()).max(2e4).optional(),
24172
24279
  /** Only frames in at least one of these named collections. */
24173
24280
  collectionIds: array(string()).max(200).optional(),
24174
- /** Exactly the frames of this dataset version (and its completeOnly). An
24175
- * unknown id selects nothing. */
24176
- datasetVersionId: string().optional(),
24281
+ /** Single collection (Frames filter bar). ANDed with `collectionIds` when both set. */
24282
+ collectionId: string().optional(),
24177
24283
  batchId: string().optional(),
24178
24284
  /** Only frames the operator marked complete (all subjects boxed). */
24179
- completeOnly: boolean().optional()
24285
+ completeOnly: boolean().optional(),
24286
+ /** Exclusive work-state partition (`workStateOf`); same as the corpus list. */
24287
+ workState: RetrainFrameWorkStateSchema.optional(),
24288
+ /** Frames with at least one saved annotation in one of these classes. */
24289
+ classes: array(RetrainMacroClassSchema).optional()
24180
24290
  });
24181
24291
  /**
24182
24292
  * `frames`: the full frame copies, boxes in `annotations.json`.
@@ -24376,8 +24486,7 @@ var RetrainDatasetStatsSchema = object({
24376
24486
  completeFrames: number().int()
24377
24487
  })).readonly()
24378
24488
  });
24379
- /** An immutable dataset version, without its frame list. */
24380
- var RetrainDatasetVersionSchema = object({
24489
+ object({
24381
24490
  id: string(),
24382
24491
  name: string(),
24383
24492
  createdAt: number(),
@@ -24385,22 +24494,33 @@ var RetrainDatasetVersionSchema = object({
24385
24494
  layout: RetrainExportLayoutSchema,
24386
24495
  completeOnly: boolean(),
24387
24496
  frameCount: number().int(),
24388
- /** sha256 of what the frames taught when the version was frozen. */
24389
24497
  annotationHash: string(),
24390
- /** The export manifest schema the version was cut under. */
24391
24498
  manifestSchema: string(),
24392
24499
  stats: RetrainDatasetStatsSchema
24393
24500
  });
24394
- var CreateRetrainDatasetVersionResultSchema = discriminatedUnion("kind", [object({
24395
- kind: literal("created"),
24396
- version: RetrainDatasetVersionSchema
24501
+ /**
24502
+ * Live training corpus criteria — same shape as `TrainingCorpusSelection` on
24503
+ * the training cap. Resolved here so plan/start and the annotated export share
24504
+ * one definition of "the frames" (`buildRetrainExportPlan`).
24505
+ */
24506
+ var RetrainTrainingCorpusSelectionSchema = object({
24507
+ collectionIds: array(string()).min(1),
24508
+ workState: _enum([
24509
+ "complete",
24510
+ "annotated_or_complete",
24511
+ "any_annotated"
24512
+ ]).default("complete")
24513
+ });
24514
+ var RetrainTrainingCorpusResolveResultSchema = discriminatedUnion("kind", [object({
24515
+ kind: literal("resolved"),
24516
+ frameIds: array(string()).max(2e4).readonly(),
24517
+ stats: RetrainDatasetStatsSchema,
24518
+ annotationHash: string(),
24519
+ layout: RetrainExportLayoutSchema
24397
24520
  }), object({
24398
24521
  kind: literal("refused"),
24399
- reason: _enum([
24400
- "empty-name",
24401
- "duplicate-name",
24402
- "no-frames"
24403
- ])
24522
+ reason: _enum(["unknown-collection", "no-frames"]),
24523
+ detail: string()
24404
24524
  })]);
24405
24525
  /** The outcome of a lifecycle move owned by the retrain page. */
24406
24526
  var RetrainTransitionResultSchema = object({
@@ -25107,6 +25227,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25107
25227
  }), array(RetrainTrackSchema).readonly(), {
25108
25228
  kind: "query",
25109
25229
  auth: "admin"
25230
+ }), method(RetrainCorpusFilterSchema, RetrainCorpusPageSchema, {
25231
+ kind: "query",
25232
+ auth: "admin"
25233
+ }), method(object({}), RetrainCorpusKpiSchema, {
25234
+ kind: "query",
25235
+ auth: "admin"
25110
25236
  }), method(object({ trackId: string() }), RetrainFrameListSchema, {
25111
25237
  kind: "query",
25112
25238
  auth: "admin"
@@ -25202,36 +25328,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25202
25328
  kind: "mutation",
25203
25329
  auth: "admin",
25204
25330
  timeoutMs: 12e4
25205
- }), method(object({
25206
- selection: RetrainDatasetSelectionSchema,
25207
- completeOnly: boolean().optional()
25208
- }), RetrainDatasetStatsSchema, {
25209
- kind: "query",
25210
- auth: "admin"
25211
- }), method(object({
25212
- name: string().max(120),
25213
- selection: RetrainDatasetSelectionSchema,
25214
- layout: RetrainExportLayoutSchema,
25215
- completeOnly: boolean()
25216
- }), CreateRetrainDatasetVersionResultSchema, {
25217
- kind: "mutation",
25218
- auth: "admin",
25219
- timeoutMs: 12e4
25220
- }), method(object({}), array(RetrainDatasetVersionSchema).readonly(), {
25221
- kind: "query",
25222
- auth: "admin"
25223
- }), method(object({ id: string() }), object({ deleted: boolean() }), {
25224
- kind: "mutation",
25225
- auth: "admin"
25226
- }), method(object({ id: string() }), object({
25227
- found: boolean(),
25228
- annotationHash: string(),
25229
- matches: boolean(),
25230
- missingFrames: number().int()
25231
- }), {
25232
- kind: "query",
25233
- auth: "admin",
25234
- timeoutMs: 12e4
25235
25331
  }), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
25236
25332
  kind: "query",
25237
25333
  auth: "admin"
@@ -25258,6 +25354,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25258
25354
  }), method(object({}), array(RetrainCollectionSchema).readonly(), {
25259
25355
  kind: "query",
25260
25356
  auth: "admin"
25357
+ }), method(RetrainTrainingCorpusSelectionSchema, RetrainTrainingCorpusResolveResultSchema, {
25358
+ kind: "query",
25359
+ auth: "admin",
25360
+ timeoutMs: 6e4
25261
25361
  }), method(object({
25262
25362
  id: string(),
25263
25363
  name: string().max(120)
@@ -25874,11 +25974,14 @@ var HardwareClassIdSchema = _enum([
25874
25974
  "intel-n-series",
25875
25975
  "apple-m-base",
25876
25976
  "apple-m-pro",
25977
+ "amd-phoenix",
25877
25978
  "unknown"
25878
25979
  ]);
25879
25980
  var AcceleratorKindSchema = _enum([
25880
25981
  "intel-npu",
25881
25982
  "intel-igpu",
25983
+ "amd-igpu",
25984
+ "amd-npu",
25882
25985
  "x86-cpu",
25883
25986
  "arm-cpu",
25884
25987
  "apple-ane",
@@ -27768,6 +27871,8 @@ var AgentPipelineSettingsSchema = object({
27768
27871
  * address is wrong (multi-homed host, NAT, custom interface).
27769
27872
  */
27770
27873
  reachableHost: string().optional(),
27874
+ /** Hub-persisted UI colour (`--color-node-*` theme tokens). */
27875
+ color: NodeColorIdSchema.optional(),
27771
27876
  /**
27772
27877
  * Multi-device inference opt-in (Phase 4). Per-node map deviceKey → {enabled,
27773
27878
  * weight, steps}. Absent / all-disabled ⇒ the node's single default
@@ -28317,8 +28422,9 @@ method(object({
28317
28422
  auth: "admin"
28318
28423
  }), method(object({
28319
28424
  agentNodeId: string(),
28320
- reachableHost: string().nullable()
28321
- }), object({ success: literal(true) }), {
28425
+ reachableHost: string().nullable().optional(),
28426
+ color: NodeColorIdSchema.nullable().optional()
28427
+ }).refine((v) => v.reachableHost !== void 0 || v.color !== void 0, { message: "reachableHost or color required" }), object({ success: literal(true) }), {
28322
28428
  kind: "mutation",
28323
28429
  auth: "admin"
28324
28430
  }), method(object({
@@ -31365,7 +31471,7 @@ var CustomActionInputSchema = object({
31365
31471
  action: string().min(1),
31366
31472
  input: unknown()
31367
31473
  });
31368
- method(_void(), array(AddonListItemSchema).readonly()), method(object({
31474
+ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSchema).readonly()), method(object({
31369
31475
  addonId: string(),
31370
31476
  limit: number().min(1).max(500).default(100),
31371
31477
  level: LogLevelSchema$2.optional()
@@ -35270,6 +35376,7 @@ var OsdNamedTemplateSchema = object({
35270
35376
  });
35271
35377
  /** Where a slot's value comes from. */
35272
35378
  var OsdSourceSchema = discriminatedUnion("kind", [
35379
+ object({ kind: literal("none") }),
35273
35380
  object({
35274
35381
  kind: literal("static"),
35275
35382
  text: string().max(64)
@@ -35396,6 +35503,13 @@ method(object({ deviceId: number().int() }), object({
35396
35503
  }), object({ success: literal(true) }), {
35397
35504
  kind: "mutation",
35398
35505
  auth: "admin"
35506
+ }), method(object({
35507
+ deviceId: number().int(),
35508
+ slotId: string().min(1),
35509
+ enabled: boolean()
35510
+ }), object({ success: literal(true) }), {
35511
+ kind: "mutation",
35512
+ auth: "admin"
35399
35513
  }), method(object({
35400
35514
  sourceDeviceId: number().int(),
35401
35515
  targetDeviceId: number().int()
@@ -35776,7 +35890,15 @@ var GpuInfoSchema = object({
35776
35890
  name: string(),
35777
35891
  memoryMB: number().optional()
35778
35892
  });
35779
- var NpuInfoSchema = object({ type: _enum(["apple-ane", "intel-npu"]) });
35893
+ var NpuInfoSchema = object({
35894
+ type: _enum([
35895
+ "apple-ane",
35896
+ "intel-npu",
35897
+ "amd-xdna"
35898
+ ]),
35899
+ name: string().optional(),
35900
+ generation: _enum(["xdna1", "xdna2"]).optional()
35901
+ });
35780
35902
  var CoralInfoSchema = object({
35781
35903
  type: literal("coral-edgetpu"),
35782
35904
  bus: string().optional()
@@ -39545,9 +39667,11 @@ DeviceType.Camera, method(object({
39545
39667
  * once is what makes a second provider (RunPod, a local NVIDIA node) a new
39546
39668
  * manifest entry and nothing else.
39547
39669
  *
39548
- * Collection, routed by the `addonId` in every single-row input (the `llm` /
39549
- * `notification-output` posture); `describe` concat-fans across providers.
39550
- * Every method is `admin`: these spend money.
39670
+ * Collection of provider **types** (addons). Each addon owns zero or more
39671
+ * **entries** (credentials + defaults). Concat-fans: `describe`,
39672
+ * `describeTypes`, `listEntries`, `listJobs`. Single-row work is keyed by
39673
+ * `entryId`; callers also pass the owning `addonId` as the collection
39674
+ * selector (broker posture). Every method is `admin`: these spend money.
39551
39675
  *
39552
39676
  * Every cloud object a provider creates is tagged with the orchestrator's
39553
39677
  * `jobKey`, so a retried submit finds the job it already started instead of
@@ -39571,8 +39695,8 @@ var TrainingRegionOptionSchema = object({
39571
39695
  priceMultiplier: number().positive()
39572
39696
  });
39573
39697
  /**
39574
- * The provider's per-account settings, as the orchestrator reads them. They
39575
- * live in the PROVIDER addon's settings (operator decision 2026-10-08: they
39698
+ * The provider's per-entry settings, as the orchestrator reads them. They
39699
+ * live on the PROVIDER addon's entry (operator decision 2026-10-08: they
39576
39700
  * depend on the user's account), never hard-coded in the orchestrator.
39577
39701
  */
39578
39702
  var TrainingProviderDefaultsSchema = object({
@@ -39583,9 +39707,44 @@ var TrainingProviderDefaultsSchema = object({
39583
39707
  /** Hours a FAILED job's cloud dataset is kept for debugging; 0 = delete at once. */
39584
39708
  failedDatasetGraceHours: number().nonnegative()
39585
39709
  });
39710
+ /**
39711
+ * Entry form schema for a provider type — same seam as notification
39712
+ * `TargetKind.configSchema` (`z.unknown()` at the wire; callers tighten to
39713
+ * {@link ConfigUISchema}). Drives `ConfigFormBuilder` on Training → Providers.
39714
+ */
39715
+ var ConfigSchemaPassthrough = unknown();
39716
+ /** One creatable provider type, for the Add-entry dialog. */
39717
+ var TrainingProviderTypeSchema = object({
39718
+ typeId: string(),
39719
+ label: string(),
39720
+ /** Path under the addon package (e.g. `assets/training-modal/icon.svg`). */
39721
+ iconAsset: string(),
39722
+ /** Owning `training-provider` addon — collection selector for createEntry. */
39723
+ addonId: string(),
39724
+ /**
39725
+ * Fields for one entry of this type (credentials + defaults). Absent on a
39726
+ * type that only needs a name. Password fields are keychain-backed on the
39727
+ * provider addon (`secretStatePaths`), not D634 plaintext.
39728
+ */
39729
+ configSchema: ConfigSchemaPassthrough.optional()
39730
+ });
39731
+ /** One configured account / workspace under a provider type. */
39732
+ var TrainingProviderEntrySchema = object({
39733
+ entryId: string(),
39734
+ typeId: string(),
39735
+ name: string(),
39736
+ addonId: string(),
39737
+ /** Credentials are present — never the values. */
39738
+ configured: boolean()
39739
+ });
39586
39740
  var TrainingProviderDescriptorSchema = object({
39587
39741
  addonId: string(),
39588
- /** `modal`, `runpod`, `fake`, … */
39742
+ entryId: string(),
39743
+ typeId: string(),
39744
+ /** Operator-chosen entry name. */
39745
+ name: string(),
39746
+ iconAsset: string(),
39747
+ /** `modal`, `runpod`, `fake`, … — same as typeId for current providers. */
39589
39748
  kind: string(),
39590
39749
  label: string(),
39591
39750
  gpuTypes: array(TrainingGpuOptionSchema).readonly(),
@@ -39597,7 +39756,30 @@ var TrainingProviderDescriptorSchema = object({
39597
39756
  dataResidencyNote: string(),
39598
39757
  /** Credentials are present — never the values. */
39599
39758
  configured: boolean(),
39600
- defaults: TrainingProviderDefaultsSchema
39759
+ defaults: TrainingProviderDefaultsSchema,
39760
+ /**
39761
+ * Values for {@link TrainingProviderTypeSchema}'s `configSchema` — password
39762
+ * fields are keychain {@link SecretFieldView} or `null` / `''` (create),
39763
+ * never plaintext. Same hydrate contract as settings forms (D789).
39764
+ */
39765
+ formValues: record(string(), unknown()).optional()
39766
+ });
39767
+ /**
39768
+ * Patch one entry's name, credentials and defaults. Pin with owning `{ addonId }`.
39769
+ * An omitted or empty `tokenSecret` means KEEP the stored secret (D787).
39770
+ * `{ $secretClear: true }` clears it.
39771
+ */
39772
+ var TrainingProviderUpdateEntryInputSchema = object({
39773
+ entryId: string().min(1),
39774
+ name: string().min(1),
39775
+ tokenId: string().optional(),
39776
+ tokenSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
39777
+ environment: string().optional(),
39778
+ gpuType: string().optional(),
39779
+ region: string().optional(),
39780
+ costCapUsd: number().nonnegative().optional(),
39781
+ maxRuntimeSec: number().int().positive().optional(),
39782
+ failedDatasetGraceHours: number().nonnegative().optional()
39601
39783
  });
39602
39784
  var TrainingCredentialCheckSchema = object({
39603
39785
  ok: boolean(),
@@ -39649,20 +39831,33 @@ var TrainerSourceRefSchema = object({
39649
39831
  /** A commit sha (never a branch) — the job must be reproducible. */
39650
39832
  revision: string().regex(/^[0-9a-f]{7,64}$/)
39651
39833
  });
39834
+ /** Cloud job identity — route with the owning addon's `addonId` selector. */
39652
39835
  var JobRef = {
39653
- addonId: string(),
39836
+ entryId: string().min(1),
39654
39837
  jobKey: string().uuid()
39655
39838
  };
39656
39839
  var TrainingLogLineSchema = object({
39657
39840
  ts: number(),
39658
39841
  text: string()
39659
39842
  });
39660
- method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({ addonId: string() }), TrainingCredentialCheckSchema, {
39843
+ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderTypeSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderEntrySchema).readonly(), { auth: "admin" }), method(object({
39844
+ typeId: string().min(1),
39845
+ name: string().min(1)
39846
+ }), object({ entryId: string() }), {
39847
+ kind: "mutation",
39848
+ auth: "admin"
39849
+ }), method(object({ entryId: string().min(1) }), object({ ok: literal(true) }), {
39850
+ kind: "mutation",
39851
+ auth: "admin"
39852
+ }), method(TrainingProviderUpdateEntryInputSchema, object({ ok: literal(true) }), {
39853
+ kind: "mutation",
39854
+ auth: "admin"
39855
+ }), method(object({ entryId: string().min(1) }), TrainingCredentialCheckSchema, {
39661
39856
  kind: "mutation",
39662
39857
  auth: "admin",
39663
39858
  timeoutMs: 3e4
39664
39859
  }), method(object({
39665
- addonId: string(),
39860
+ entryId: string().min(1),
39666
39861
  gpuType: string(),
39667
39862
  region: string(),
39668
39863
  datasetBytes: number().int().nonnegative(),
@@ -39728,7 +39923,7 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
39728
39923
  kind: "mutation",
39729
39924
  auth: "admin",
39730
39925
  timeoutMs: 5 * 6e4
39731
- }), method(object({ addonId: string() }), array(ProviderJobStatusSchema).readonly(), {
39926
+ }), method(object({ entryId: string().min(1).optional() }), array(ProviderJobStatusSchema).readonly(), {
39732
39927
  auth: "admin",
39733
39928
  timeoutMs: 2 * 6e4
39734
39929
  });
@@ -39738,20 +39933,31 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
39738
39933
  *
39739
39934
  * It owns what every provider must agree on, written once:
39740
39935
  *
39741
- * - **Dataset versions.** Taken over from pipeline-analytics (D796): the rows
39742
- * live here (D808); pipeline-analytics still CUTS a version (it owns the corpus and
39743
- * the export plan) and reaches this store through the five row methods
39744
- * below, so the Retrain page and the export did not change.
39745
39936
  * - **Jobs.** A persisted state machine, a reconcile loop against the
39746
39937
  * provider, a cost guard, a daily orphan sweep and the retention rules.
39747
39938
  * - **The return flow.** Verified artefacts → Model Studio
39748
39939
  * (`custom-model-registry.importModelBundle`) → canary on cameras →
39749
39940
  * rollback. Nothing is ever registered automatically.
39750
39941
  *
39942
+ * Plan/start takes a live {@link TrainingCorpusSelection} (collections +
39943
+ * work-state rule); frame ids are resolved via pipeline-analytics at that
39944
+ * moment and snapshotted on the job. No frozen dataset version.
39945
+ *
39751
39946
  * Every method is `admin`.
39752
39947
  */
39753
- /** A version WITH its frame list — what the export and a job read. */
39754
- var TrainingDatasetVersionRowSchema = RetrainDatasetVersionSchema.omit({ frameCount: true }).extend({ frameIds: array(string()).max(2e4).readonly() });
39948
+ /**
39949
+ * Live corpus criteria for plan/start (design §5.2). Default is complete-only.
39950
+ * Frame ids are resolved at plan/start — never a frozen version id.
39951
+ */
39952
+ var TrainingCorpusSelectionSchema = object({
39953
+ collectionIds: array(string()).min(1),
39954
+ /** Default complete-only for v1 */
39955
+ workState: _enum([
39956
+ "complete",
39957
+ "annotated_or_complete",
39958
+ "any_annotated"
39959
+ ]).default("complete")
39960
+ });
39755
39961
  /** A base model a detector job can fine-tune, and the baseline it is judged against. */
39756
39962
  var TrainingBaseModelSchema = object({
39757
39963
  modelId: string(),
@@ -39769,9 +39975,13 @@ var TrainingPresetSchema = _enum([
39769
39975
  "thorough"
39770
39976
  ]);
39771
39977
  var TrainingJobRequestSchema = object({
39772
- datasetVersionId: string().min(1),
39773
- /** The `training-provider` addon that runs it. */
39774
- addonId: string().min(1),
39978
+ /** Live collection + work-state criteria; resolved at plan/start. */
39979
+ selection: TrainingCorpusSelectionSchema,
39980
+ /**
39981
+ * The provider **entry** that runs it (credentials + defaults).
39982
+ * Resolve to an owning addon via `training-provider.describe` / `listEntries`.
39983
+ */
39984
+ entryId: string().min(1),
39775
39985
  gpuType: string().min(1),
39776
39986
  region: string(),
39777
39987
  baseModelId: string().min(1),
@@ -39830,6 +40040,7 @@ var TrainingJobPlanSchema = object({
39830
40040
  * result lives after the operator acted on it.
39831
40041
  */
39832
40042
  var TrainingJobStateSchema = _enum([
40043
+ "queued",
39833
40044
  "uploading",
39834
40045
  "submitted",
39835
40046
  "starting",
@@ -39883,6 +40094,11 @@ var TrainingJobSchema = object({
39883
40094
  createdAt: number(),
39884
40095
  updatedAt: number(),
39885
40096
  state: TrainingJobStateSchema,
40097
+ /**
40098
+ * Shared by every job enqueued together via `startJobBatch`.
40099
+ * `null` for a lone `startJob`. The engine advances queued siblings by this id.
40100
+ */
40101
+ batchId: string().nullable().default(null),
39886
40102
  stage: TrainingStageSchema.nullable(),
39887
40103
  failure: object({
39888
40104
  reason: TrainingFailureReasonSchema,
@@ -39894,6 +40110,12 @@ var TrainingJobSchema = object({
39894
40110
  maxRuntimeSec: number().int().positive(),
39895
40111
  trainer: TrainerSourceRefSchema,
39896
40112
  datasetLayout: RetrainExportLayoutSchema,
40113
+ /** Frame count snapshotted when the job started (audit; equals `frameIds.length`). */
40114
+ frameCount: number().int().nonnegative(),
40115
+ /** Resolved frame ids at start — the archive ships exactly these. */
40116
+ frameIds: array(string()).max(2e4).readonly(),
40117
+ /** Hash of what those frames taught at start (trainer `dataset.annotationHash`). */
40118
+ annotationHash: string(),
39897
40119
  dataset: object({
39898
40120
  bytes: number().int(),
39899
40121
  sha256: string(),
@@ -39935,13 +40157,7 @@ var TrainingJobSchema = object({
39935
40157
  canary: TrainingCanarySchema.nullable()
39936
40158
  });
39937
40159
  var IdInput = object({ id: string().min(1) });
39938
- method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
39939
- kind: "mutation",
39940
- auth: "admin"
39941
- }), 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() }), {
39942
- kind: "mutation",
39943
- auth: "admin"
39944
- }), method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
40160
+ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
39945
40161
  auth: "admin",
39946
40162
  timeoutMs: 6e4
39947
40163
  }), method(TrainingJobRequestSchema.extend({
@@ -39960,6 +40176,24 @@ method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
39960
40176
  kind: "mutation",
39961
40177
  auth: "admin",
39962
40178
  timeoutMs: 12e4
40179
+ }), method(TrainingJobRequestSchema.omit({ baseModelId: true }).extend({
40180
+ baseModelIds: array(string().min(1)).min(1),
40181
+ name: string().min(1).max(120),
40182
+ maxCostUsd: number().positive(),
40183
+ maxRuntimeSec: number().int().positive(),
40184
+ idempotencyKey: string().min(8).max(80)
40185
+ }), discriminatedUnion("kind", [object({
40186
+ kind: literal("started"),
40187
+ batchId: string(),
40188
+ jobs: array(TrainingJobSchema).min(1).readonly()
40189
+ }), object({
40190
+ kind: literal("refused"),
40191
+ reason: TrainingRefusalReasonSchema,
40192
+ detail: string()
40193
+ })]), {
40194
+ kind: "mutation",
40195
+ auth: "admin",
40196
+ timeoutMs: 12e4
39963
40197
  }), method(object({}), array(TrainingJobSchema).readonly(), { auth: "admin" }), method(IdInput, TrainingJobSchema.nullable(), { auth: "admin" }), method(IdInput, TrainingJobSchema, {
39964
40198
  kind: "mutation",
39965
40199
  auth: "admin",
@@ -43993,6 +44227,36 @@ Object.freeze({
43993
44227
  addonId: null,
43994
44228
  access: "view"
43995
44229
  },
44230
+ "oidcConnections.connectionFormSchema": {
44231
+ capName: "oidc-connections",
44232
+ capScope: "system",
44233
+ addonId: null,
44234
+ access: "view"
44235
+ },
44236
+ "oidcConnections.createConnection": {
44237
+ capName: "oidc-connections",
44238
+ capScope: "system",
44239
+ addonId: null,
44240
+ access: "create"
44241
+ },
44242
+ "oidcConnections.deleteConnection": {
44243
+ capName: "oidc-connections",
44244
+ capScope: "system",
44245
+ addonId: null,
44246
+ access: "delete"
44247
+ },
44248
+ "oidcConnections.listConnections": {
44249
+ capName: "oidc-connections",
44250
+ capScope: "system",
44251
+ addonId: null,
44252
+ access: "view"
44253
+ },
44254
+ "oidcConnections.updateConnection": {
44255
+ capName: "oidc-connections",
44256
+ capScope: "system",
44257
+ addonId: null,
44258
+ access: "create"
44259
+ },
43996
44260
  "osd.getStatus": {
43997
44261
  capName: "osd",
43998
44262
  capScope: "device",
@@ -44065,6 +44329,12 @@ Object.freeze({
44065
44329
  addonId: null,
44066
44330
  access: "create"
44067
44331
  },
44332
+ "osdManager.setSlotCameraEnabled": {
44333
+ capName: "osd-manager",
44334
+ capScope: "system",
44335
+ addonId: null,
44336
+ access: "create"
44337
+ },
44068
44338
  "osdManager.upsertTemplate": {
44069
44339
  capName: "osd-manager",
44070
44340
  capScope: "system",
@@ -44203,12 +44473,6 @@ Object.freeze({
44203
44473
  addonId: null,
44204
44474
  access: "create"
44205
44475
  },
44206
- "pipelineAnalytics.createRetrainDatasetVersion": {
44207
- capName: "pipeline-analytics",
44208
- capScope: "device",
44209
- addonId: null,
44210
- access: "create"
44211
- },
44212
44476
  "pipelineAnalytics.deleteDeviceEvents": {
44213
44477
  capName: "pipeline-analytics",
44214
44478
  capScope: "device",
@@ -44221,12 +44485,6 @@ Object.freeze({
44221
44485
  addonId: null,
44222
44486
  access: "delete"
44223
44487
  },
44224
- "pipelineAnalytics.deleteRetrainDatasetVersion": {
44225
- capName: "pipeline-analytics",
44226
- capScope: "device",
44227
- addonId: null,
44228
- access: "delete"
44229
- },
44230
44488
  "pipelineAnalytics.deleteTracks": {
44231
44489
  capName: "pipeline-analytics",
44232
44490
  capScope: "device",
@@ -44329,6 +44587,12 @@ Object.freeze({
44329
44587
  addonId: null,
44330
44588
  access: "view"
44331
44589
  },
44590
+ "pipelineAnalytics.getRetrainCorpusKpi": {
44591
+ capName: "pipeline-analytics",
44592
+ capScope: "device",
44593
+ addonId: null,
44594
+ access: "view"
44595
+ },
44332
44596
  "pipelineAnalytics.getRetrainExportUrl": {
44333
44597
  capName: "pipeline-analytics",
44334
44598
  capScope: "device",
@@ -44449,7 +44713,7 @@ Object.freeze({
44449
44713
  addonId: null,
44450
44714
  access: "view"
44451
44715
  },
44452
- "pipelineAnalytics.listRetrainDatasetVersions": {
44716
+ "pipelineAnalytics.listRetrainCorpusPage": {
44453
44717
  capName: "pipeline-analytics",
44454
44718
  capScope: "device",
44455
44719
  addonId: null,
@@ -44503,12 +44767,6 @@ Object.freeze({
44503
44767
  addonId: null,
44504
44768
  access: "create"
44505
44769
  },
44506
- "pipelineAnalytics.previewRetrainDataset": {
44507
- capName: "pipeline-analytics",
44508
- capScope: "device",
44509
- addonId: null,
44510
- access: "view"
44511
- },
44512
44770
  "pipelineAnalytics.proposeRetrainAnnotations": {
44513
44771
  capName: "pipeline-analytics",
44514
44772
  capScope: "device",
@@ -44587,6 +44845,12 @@ Object.freeze({
44587
44845
  addonId: null,
44588
44846
  access: "create"
44589
44847
  },
44848
+ "pipelineAnalytics.resolveRetrainTrainingCorpus": {
44849
+ capName: "pipeline-analytics",
44850
+ capScope: "device",
44851
+ addonId: null,
44852
+ access: "view"
44853
+ },
44590
44854
  "pipelineAnalytics.restageRetrainTrack": {
44591
44855
  capName: "pipeline-analytics",
44592
44856
  capScope: "device",
@@ -44647,12 +44911,6 @@ Object.freeze({
44647
44911
  addonId: null,
44648
44912
  access: "create"
44649
44913
  },
44650
- "pipelineAnalytics.verifyRetrainDatasetVersion": {
44651
- capName: "pipeline-analytics",
44652
- capScope: "device",
44653
- addonId: null,
44654
- access: "view"
44655
- },
44656
44914
  "pipelineAnalytics.wipeAllAnalytics": {
44657
44915
  capName: "pipeline-analytics",
44658
44916
  capScope: "device",
@@ -47047,18 +47305,6 @@ Object.freeze({
47047
47305
  addonId: null,
47048
47306
  access: "create"
47049
47307
  },
47050
- "training.findDatasetVersionIdByName": {
47051
- capName: "training",
47052
- capScope: "system",
47053
- addonId: null,
47054
- access: "view"
47055
- },
47056
- "training.getDatasetVersion": {
47057
- capName: "training",
47058
- capScope: "system",
47059
- addonId: null,
47060
- access: "view"
47061
- },
47062
47308
  "training.getJob": {
47063
47309
  capName: "training",
47064
47310
  capScope: "system",
@@ -47077,12 +47323,6 @@ Object.freeze({
47077
47323
  addonId: null,
47078
47324
  access: "view"
47079
47325
  },
47080
- "training.listDatasetVersions": {
47081
- capName: "training",
47082
- capScope: "system",
47083
- addonId: null,
47084
- access: "view"
47085
- },
47086
47326
  "training.listJobs": {
47087
47327
  capName: "training",
47088
47328
  capScope: "system",
@@ -47095,54 +47335,66 @@ Object.freeze({
47095
47335
  addonId: null,
47096
47336
  access: "view"
47097
47337
  },
47098
- "training.putDatasetVersion": {
47338
+ "training.registerResult": {
47099
47339
  capName: "training",
47100
47340
  capScope: "system",
47101
47341
  addonId: null,
47102
47342
  access: "create"
47103
47343
  },
47104
- "training.registerResult": {
47344
+ "training.rollbackCanary": {
47105
47345
  capName: "training",
47106
47346
  capScope: "system",
47107
47347
  addonId: null,
47108
47348
  access: "create"
47109
47349
  },
47110
- "training.removeDatasetVersion": {
47350
+ "training.startJob": {
47111
47351
  capName: "training",
47112
47352
  capScope: "system",
47113
47353
  addonId: null,
47114
- access: "delete"
47354
+ access: "create"
47115
47355
  },
47116
- "training.rollbackCanary": {
47356
+ "training.startJobBatch": {
47117
47357
  capName: "training",
47118
47358
  capScope: "system",
47119
47359
  addonId: null,
47120
47360
  access: "create"
47121
47361
  },
47122
- "training.startJob": {
47123
- capName: "training",
47362
+ "trainingProvider.cancelJob": {
47363
+ capName: "training-provider",
47124
47364
  capScope: "system",
47125
47365
  addonId: null,
47126
47366
  access: "create"
47127
47367
  },
47128
- "trainingProvider.cancelJob": {
47368
+ "trainingProvider.cleanupJob": {
47129
47369
  capName: "training-provider",
47130
47370
  capScope: "system",
47131
47371
  addonId: null,
47132
47372
  access: "create"
47133
47373
  },
47134
- "trainingProvider.cleanupJob": {
47374
+ "trainingProvider.createEntry": {
47135
47375
  capName: "training-provider",
47136
47376
  capScope: "system",
47137
47377
  addonId: null,
47138
47378
  access: "create"
47139
47379
  },
47380
+ "trainingProvider.deleteEntry": {
47381
+ capName: "training-provider",
47382
+ capScope: "system",
47383
+ addonId: null,
47384
+ access: "delete"
47385
+ },
47140
47386
  "trainingProvider.describe": {
47141
47387
  capName: "training-provider",
47142
47388
  capScope: "system",
47143
47389
  addonId: null,
47144
47390
  access: "view"
47145
47391
  },
47392
+ "trainingProvider.describeTypes": {
47393
+ capName: "training-provider",
47394
+ capScope: "system",
47395
+ addonId: null,
47396
+ access: "view"
47397
+ },
47146
47398
  "trainingProvider.estimateJob": {
47147
47399
  capName: "training-provider",
47148
47400
  capScope: "system",
@@ -47155,6 +47407,12 @@ Object.freeze({
47155
47407
  addonId: null,
47156
47408
  access: "view"
47157
47409
  },
47410
+ "trainingProvider.listEntries": {
47411
+ capName: "training-provider",
47412
+ capScope: "system",
47413
+ addonId: null,
47414
+ access: "view"
47415
+ },
47158
47416
  "trainingProvider.listJobEvents": {
47159
47417
  capName: "training-provider",
47160
47418
  capScope: "system",
@@ -47185,6 +47443,12 @@ Object.freeze({
47185
47443
  addonId: null,
47186
47444
  access: "create"
47187
47445
  },
47446
+ "trainingProvider.updateEntry": {
47447
+ capName: "training-provider",
47448
+ capScope: "system",
47449
+ addonId: null,
47450
+ access: "create"
47451
+ },
47188
47452
  "trainingProvider.uploadDataset": {
47189
47453
  capName: "training-provider",
47190
47454
  capScope: "system",
@@ -50391,6 +50655,11 @@ Object.freeze({
50391
50655
  form: "single",
50392
50656
  optional: false
50393
50657
  }],
50658
+ "osdManager.setSlotCameraEnabled": [{
50659
+ name: "deviceId",
50660
+ form: "single",
50661
+ optional: false
50662
+ }],
50394
50663
  "petFeeder.callPet": [{
50395
50664
  name: "deviceId",
50396
50665
  form: "single",
@@ -50611,6 +50880,11 @@ Object.freeze({
50611
50880
  form: "array",
50612
50881
  optional: false
50613
50882
  }],
50883
+ "pipelineAnalytics.listRetrainCorpusPage": [{
50884
+ name: "deviceIds",
50885
+ form: "array",
50886
+ optional: true
50887
+ }],
50614
50888
  "pipelineAnalytics.listRetrainStaging": [{
50615
50889
  name: "deviceIds",
50616
50890
  form: "array",
@@ -51720,6 +51994,7 @@ Object.freeze({
51720
51994
  });
51721
51995
  Object.freeze({
51722
51996
  "broker": "broker",
51997
+ "calendar-source": "calendar",
51723
51998
  "device-export": "device-export",
51724
51999
  "llm": "ai",
51725
52000
  "mesh-network": "mesh",