@camstack/addon-export-hap 1.2.157 → 1.2.158

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.
@@ -5426,7 +5426,7 @@ var ZodIssueCode = {
5426
5426
  var ZodFirstPartyTypeKind;
5427
5427
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5428
5428
  //#endregion
5429
- //#region ../types/dist/sleep-r3RWkGVx.mjs
5429
+ //#region ../types/dist/sleep-DwAQ9sqX.mjs
5430
5430
  /**
5431
5431
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5432
5432
  * window to float samples (D455).
@@ -10019,6 +10019,16 @@ var CompositionSchema = object({
10019
10019
  seen.add(feature.cap);
10020
10020
  });
10021
10021
  });
10022
+ var NodeColorIdSchema = _enum([
10023
+ "node-a",
10024
+ "node-b",
10025
+ "node-c",
10026
+ "node-d",
10027
+ "node-e",
10028
+ "node-f",
10029
+ "node-g",
10030
+ "node-h"
10031
+ ]);
10022
10032
  new Set([
10023
10033
  "track",
10024
10034
  "face",
@@ -19063,14 +19073,14 @@ var LlmProfileSchema = object({
19063
19073
  /** ConfigUISchema tree passed through untyped on the wire (the
19064
19074
  * notification-output `ConfigSchemaPassthrough` precedent at
19065
19075
  * notification-output.cap.ts:151); the exported TS type re-tightens it. */
19066
- var ConfigSchemaPassthrough$1 = unknown();
19076
+ var ConfigSchemaPassthrough$3 = unknown();
19067
19077
  var LlmProfileKindDescriptorSchema = object({
19068
19078
  kind: LlmProfileKindSchema,
19069
19079
  label: string(),
19070
19080
  icon: string(),
19071
19081
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
19072
19082
  addonId: string(),
19073
- configSchema: ConfigSchemaPassthrough$1
19083
+ configSchema: ConfigSchemaPassthrough$3
19074
19084
  });
19075
19085
  var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
19076
19086
  var LlmDefaultSchema = object({
@@ -20191,7 +20201,7 @@ var TargetKindCapsSchema = object({
20191
20201
  * the union is large and not meant for runtime validation here; the exported
20192
20202
  * `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
20193
20203
  */
20194
- var ConfigSchemaPassthrough = unknown();
20204
+ var ConfigSchemaPassthrough$2 = unknown();
20195
20205
  var TargetKindSchema = object({
20196
20206
  kind: string(),
20197
20207
  label: string(),
@@ -20228,7 +20238,7 @@ var TargetKindSchema = object({
20228
20238
  * its raster path, which is the safe default for an unknown image.
20229
20239
  */
20230
20240
  iconMediaType: string().optional(),
20231
- configSchema: ConfigSchemaPassthrough,
20241
+ configSchema: ConfigSchemaPassthrough$2,
20232
20242
  /**
20233
20243
  * The config keys that decide WHERE this kind's secrets are sent (server,
20234
20244
  * base URL, instance, chat, recipient). A save that changes any of them
@@ -23527,6 +23537,61 @@ var OauthIntegrationDescriptorSchema = object({
23527
23537
  });
23528
23538
  method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" });
23529
23539
  /**
23540
+ * `oidc-connections` — CRUD for IdP rows under `auth-oidc` (D828 sibling).
23541
+ *
23542
+ * One hub-only singleton (`auth-oidc`). The Settings UI is a DataTable +
23543
+ * ItemFormDialog; there is no `editable-array` in `globalSettingsSchema`.
23544
+ * Operator-chosen `id` is the URL slug (`/addon/auth-oidc/<id>/…`) and is
23545
+ * immutable after create.
23546
+ */
23547
+ var ConfigSchemaPassthrough$1 = unknown();
23548
+ var OidcConnectionSchema = object({
23549
+ id: string().min(1),
23550
+ displayName: string(),
23551
+ icon: string(),
23552
+ issuerUrl: string(),
23553
+ clientId: string(),
23554
+ /** Client id + secret present — never the secret value. */
23555
+ configured: boolean(),
23556
+ /**
23557
+ * Values for the connection form schema. `clientSecret` is a keychain
23558
+ * {@link SecretFieldView} or `null` / `''`, never plaintext (D789).
23559
+ */
23560
+ formValues: record(string(), unknown()).optional()
23561
+ });
23562
+ /**
23563
+ * Patch one connection. Omitted or empty `clientSecret` keeps the stored
23564
+ * secret (D787). `{ $secretClear: true }` clears it. `id` is never renamed.
23565
+ */
23566
+ var OidcConnectionUpdateInputSchema = object({
23567
+ id: string().min(1),
23568
+ displayName: string().min(1),
23569
+ icon: string().optional(),
23570
+ issuerUrl: string().optional(),
23571
+ clientId: string().optional(),
23572
+ clientSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
23573
+ redirectUri: string().optional(),
23574
+ scopes: string().optional(),
23575
+ usernameClaim: _enum([
23576
+ "preferred_username",
23577
+ "email",
23578
+ "sub"
23579
+ ]).optional()
23580
+ });
23581
+ method(object({}), ConfigSchemaPassthrough$1, { auth: "admin" }), method(object({}), array(OidcConnectionSchema).readonly(), { auth: "admin" }), method(object({
23582
+ id: string().min(1).regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "id must be a lowercase slug"),
23583
+ displayName: string().min(1)
23584
+ }), object({ id: string() }), {
23585
+ kind: "mutation",
23586
+ auth: "admin"
23587
+ }), method(OidcConnectionUpdateInputSchema, object({ ok: literal(true) }), {
23588
+ kind: "mutation",
23589
+ auth: "admin"
23590
+ }), method(object({ id: string().min(1) }), object({ ok: literal(true) }), {
23591
+ kind: "mutation",
23592
+ auth: "admin"
23593
+ });
23594
+ /**
23530
23595
  * What started a camera's onboard motion (D672). `camera` is the camera's own
23531
23596
  * firmware; `sensor` is a device the operator ATTACHED to it. Absent on the
23532
23597
  * wire means the camera: only the camera-sensors bridge ever says `sensor`.
@@ -24883,24 +24948,69 @@ var RetrainFrameListSchema = object({
24883
24948
  /** What the page pre-selects — the native key frame when one survives. */
24884
24949
  autoPickMediaId: number().int().optional()
24885
24950
  });
24951
+ /** Exclusive partition of a corpus copy's annotation progress (design §4.2). */
24952
+ var RetrainFrameWorkStateSchema = _enum([
24953
+ "unannotated",
24954
+ "annotated",
24955
+ "complete"
24956
+ ]);
24957
+ /**
24958
+ * Filters for paginated corpus list, KPI, and matching export (design §4.4).
24959
+ * Every narrowing field is ANDed; omitted fields impose no constraint.
24960
+ */
24961
+ var RetrainCorpusFilterSchema = object({
24962
+ workState: RetrainFrameWorkStateSchema.optional(),
24963
+ deviceIds: array(number()).max(500).optional(),
24964
+ /** When set, only frames in this named collection. */
24965
+ collectionId: string().optional(),
24966
+ /** Frames that carry at least one saved annotation in one of these classes. */
24967
+ classes: array(RetrainMacroClassSchema).optional(),
24968
+ page: number().int().positive().default(1),
24969
+ pageSize: number().int().positive().max(100).default(50)
24970
+ });
24971
+ var RetrainCorpusPageSchema = object({
24972
+ frames: array(RetrainFrameSchema.extend({ workState: RetrainFrameWorkStateSchema })).readonly(),
24973
+ total: number().int().nonnegative(),
24974
+ page: number().int().positive(),
24975
+ pageSize: number().int().positive()
24976
+ });
24977
+ var RetrainCorpusKpiCameraRowSchema = object({
24978
+ deviceId: number(),
24979
+ unannotated: number().int().nonnegative(),
24980
+ annotated: number().int().nonnegative(),
24981
+ complete: number().int().nonnegative(),
24982
+ /** This camera's `complete` count divided by corpus `total`, in `[0,1]`.
24983
+ * `null` when the corpus is empty (no ratio). */
24984
+ pctOfCorpus: number().min(0).max(1).nullable()
24985
+ });
24986
+ var RetrainCorpusKpiSchema = object({
24987
+ total: number().int().nonnegative(),
24988
+ unannotated: number().int().nonnegative(),
24989
+ annotated: number().int().nonnegative(),
24990
+ complete: number().int().nonnegative(),
24991
+ cameras: array(RetrainCorpusKpiCameraRowSchema).readonly()
24992
+ });
24886
24993
  /**
24887
24994
  * Which frames an annotated export carries. Every field narrows; an empty
24888
- * filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
24889
- * list owned by whoever trains (the training orchestrator), so `frameIds` is
24890
- * the primitive a version export uses; `batchId` re-selects what an earlier
24891
- * export carried (`exportedInBatch`).
24995
+ * filter is every annotated copy. `frameIds` is the primitive a job or
24996
+ * download uses; `batchId` re-selects what an earlier export carried
24997
+ * (`exportedInBatch`). Frozen dataset versions were removed — live selection
24998
+ * resolves to `frameIds` at plan/start.
24892
24999
  */
24893
25000
  var RetrainExportFilterSchema = object({
24894
25001
  deviceIds: array(number()).optional(),
24895
25002
  frameIds: array(string()).max(2e4).optional(),
24896
25003
  /** Only frames in at least one of these named collections. */
24897
25004
  collectionIds: array(string()).max(200).optional(),
24898
- /** Exactly the frames of this dataset version (and its completeOnly). An
24899
- * unknown id selects nothing. */
24900
- datasetVersionId: string().optional(),
25005
+ /** Single collection (Frames filter bar). ANDed with `collectionIds` when both set. */
25006
+ collectionId: string().optional(),
24901
25007
  batchId: string().optional(),
24902
25008
  /** Only frames the operator marked complete (all subjects boxed). */
24903
- completeOnly: boolean().optional()
25009
+ completeOnly: boolean().optional(),
25010
+ /** Exclusive work-state partition (`workStateOf`); same as the corpus list. */
25011
+ workState: RetrainFrameWorkStateSchema.optional(),
25012
+ /** Frames with at least one saved annotation in one of these classes. */
25013
+ classes: array(RetrainMacroClassSchema).optional()
24904
25014
  });
24905
25015
  /**
24906
25016
  * `frames`: the full frame copies, boxes in `annotations.json`.
@@ -25100,8 +25210,7 @@ var RetrainDatasetStatsSchema = object({
25100
25210
  completeFrames: number().int()
25101
25211
  })).readonly()
25102
25212
  });
25103
- /** An immutable dataset version, without its frame list. */
25104
- var RetrainDatasetVersionSchema = object({
25213
+ object({
25105
25214
  id: string(),
25106
25215
  name: string(),
25107
25216
  createdAt: number(),
@@ -25109,22 +25218,33 @@ var RetrainDatasetVersionSchema = object({
25109
25218
  layout: RetrainExportLayoutSchema,
25110
25219
  completeOnly: boolean(),
25111
25220
  frameCount: number().int(),
25112
- /** sha256 of what the frames taught when the version was frozen. */
25113
25221
  annotationHash: string(),
25114
- /** The export manifest schema the version was cut under. */
25115
25222
  manifestSchema: string(),
25116
25223
  stats: RetrainDatasetStatsSchema
25117
25224
  });
25118
- var CreateRetrainDatasetVersionResultSchema = discriminatedUnion("kind", [object({
25119
- kind: literal("created"),
25120
- version: RetrainDatasetVersionSchema
25225
+ /**
25226
+ * Live training corpus criteria — same shape as `TrainingCorpusSelection` on
25227
+ * the training cap. Resolved here so plan/start and the annotated export share
25228
+ * one definition of "the frames" (`buildRetrainExportPlan`).
25229
+ */
25230
+ var RetrainTrainingCorpusSelectionSchema = object({
25231
+ collectionIds: array(string()).min(1),
25232
+ workState: _enum([
25233
+ "complete",
25234
+ "annotated_or_complete",
25235
+ "any_annotated"
25236
+ ]).default("complete")
25237
+ });
25238
+ var RetrainTrainingCorpusResolveResultSchema = discriminatedUnion("kind", [object({
25239
+ kind: literal("resolved"),
25240
+ frameIds: array(string()).max(2e4).readonly(),
25241
+ stats: RetrainDatasetStatsSchema,
25242
+ annotationHash: string(),
25243
+ layout: RetrainExportLayoutSchema
25121
25244
  }), object({
25122
25245
  kind: literal("refused"),
25123
- reason: _enum([
25124
- "empty-name",
25125
- "duplicate-name",
25126
- "no-frames"
25127
- ])
25246
+ reason: _enum(["unknown-collection", "no-frames"]),
25247
+ detail: string()
25128
25248
  })]);
25129
25249
  /** The outcome of a lifecycle move owned by the retrain page. */
25130
25250
  var RetrainTransitionResultSchema = object({
@@ -25831,6 +25951,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25831
25951
  }), array(RetrainTrackSchema).readonly(), {
25832
25952
  kind: "query",
25833
25953
  auth: "admin"
25954
+ }), method(RetrainCorpusFilterSchema, RetrainCorpusPageSchema, {
25955
+ kind: "query",
25956
+ auth: "admin"
25957
+ }), method(object({}), RetrainCorpusKpiSchema, {
25958
+ kind: "query",
25959
+ auth: "admin"
25834
25960
  }), method(object({ trackId: string() }), RetrainFrameListSchema, {
25835
25961
  kind: "query",
25836
25962
  auth: "admin"
@@ -25926,36 +26052,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25926
26052
  kind: "mutation",
25927
26053
  auth: "admin",
25928
26054
  timeoutMs: 12e4
25929
- }), method(object({
25930
- selection: RetrainDatasetSelectionSchema,
25931
- completeOnly: boolean().optional()
25932
- }), RetrainDatasetStatsSchema, {
25933
- kind: "query",
25934
- auth: "admin"
25935
- }), method(object({
25936
- name: string().max(120),
25937
- selection: RetrainDatasetSelectionSchema,
25938
- layout: RetrainExportLayoutSchema,
25939
- completeOnly: boolean()
25940
- }), CreateRetrainDatasetVersionResultSchema, {
25941
- kind: "mutation",
25942
- auth: "admin",
25943
- timeoutMs: 12e4
25944
- }), method(object({}), array(RetrainDatasetVersionSchema).readonly(), {
25945
- kind: "query",
25946
- auth: "admin"
25947
- }), method(object({ id: string() }), object({ deleted: boolean() }), {
25948
- kind: "mutation",
25949
- auth: "admin"
25950
- }), method(object({ id: string() }), object({
25951
- found: boolean(),
25952
- annotationHash: string(),
25953
- matches: boolean(),
25954
- missingFrames: number().int()
25955
- }), {
25956
- kind: "query",
25957
- auth: "admin",
25958
- timeoutMs: 12e4
25959
26055
  }), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
25960
26056
  kind: "query",
25961
26057
  auth: "admin"
@@ -25982,6 +26078,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25982
26078
  }), method(object({}), array(RetrainCollectionSchema).readonly(), {
25983
26079
  kind: "query",
25984
26080
  auth: "admin"
26081
+ }), method(RetrainTrainingCorpusSelectionSchema, RetrainTrainingCorpusResolveResultSchema, {
26082
+ kind: "query",
26083
+ auth: "admin",
26084
+ timeoutMs: 6e4
25985
26085
  }), method(object({
25986
26086
  id: string(),
25987
26087
  name: string().max(120)
@@ -26598,11 +26698,14 @@ var HardwareClassIdSchema = _enum([
26598
26698
  "intel-n-series",
26599
26699
  "apple-m-base",
26600
26700
  "apple-m-pro",
26701
+ "amd-phoenix",
26601
26702
  "unknown"
26602
26703
  ]);
26603
26704
  var AcceleratorKindSchema = _enum([
26604
26705
  "intel-npu",
26605
26706
  "intel-igpu",
26707
+ "amd-igpu",
26708
+ "amd-npu",
26606
26709
  "x86-cpu",
26607
26710
  "arm-cpu",
26608
26711
  "apple-ane",
@@ -28492,6 +28595,8 @@ var AgentPipelineSettingsSchema = object({
28492
28595
  * address is wrong (multi-homed host, NAT, custom interface).
28493
28596
  */
28494
28597
  reachableHost: string().optional(),
28598
+ /** Hub-persisted UI colour (`--color-node-*` theme tokens). */
28599
+ color: NodeColorIdSchema.optional(),
28495
28600
  /**
28496
28601
  * Multi-device inference opt-in (Phase 4). Per-node map deviceKey → {enabled,
28497
28602
  * weight, steps}. Absent / all-disabled ⇒ the node's single default
@@ -29041,8 +29146,9 @@ method(object({
29041
29146
  auth: "admin"
29042
29147
  }), method(object({
29043
29148
  agentNodeId: string(),
29044
- reachableHost: string().nullable()
29045
- }), object({ success: literal(true) }), {
29149
+ reachableHost: string().nullable().optional(),
29150
+ color: NodeColorIdSchema.nullable().optional()
29151
+ }).refine((v) => v.reachableHost !== void 0 || v.color !== void 0, { message: "reachableHost or color required" }), object({ success: literal(true) }), {
29046
29152
  kind: "mutation",
29047
29153
  auth: "admin"
29048
29154
  }), method(object({
@@ -32282,7 +32388,7 @@ var CustomActionInputSchema = object({
32282
32388
  action: string().min(1),
32283
32389
  input: unknown()
32284
32390
  });
32285
- method(_void(), array(AddonListItemSchema).readonly()), method(object({
32391
+ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSchema).readonly()), method(object({
32286
32392
  addonId: string(),
32287
32393
  limit: number().min(1).max(500).default(100),
32288
32394
  level: LogLevelSchema$2.optional()
@@ -36211,6 +36317,7 @@ var OsdNamedTemplateSchema = object({
36211
36317
  });
36212
36318
  /** Where a slot's value comes from. */
36213
36319
  var OsdSourceSchema = discriminatedUnion("kind", [
36320
+ object({ kind: literal("none") }),
36214
36321
  object({
36215
36322
  kind: literal("static"),
36216
36323
  text: string().max(64)
@@ -36337,6 +36444,13 @@ method(object({ deviceId: number().int() }), object({
36337
36444
  }), object({ success: literal(true) }), {
36338
36445
  kind: "mutation",
36339
36446
  auth: "admin"
36447
+ }), method(object({
36448
+ deviceId: number().int(),
36449
+ slotId: string().min(1),
36450
+ enabled: boolean()
36451
+ }), object({ success: literal(true) }), {
36452
+ kind: "mutation",
36453
+ auth: "admin"
36340
36454
  }), method(object({
36341
36455
  sourceDeviceId: number().int(),
36342
36456
  targetDeviceId: number().int()
@@ -36717,7 +36831,15 @@ var GpuInfoSchema = object({
36717
36831
  name: string(),
36718
36832
  memoryMB: number().optional()
36719
36833
  });
36720
- var NpuInfoSchema = object({ type: _enum(["apple-ane", "intel-npu"]) });
36834
+ var NpuInfoSchema = object({
36835
+ type: _enum([
36836
+ "apple-ane",
36837
+ "intel-npu",
36838
+ "amd-xdna"
36839
+ ]),
36840
+ name: string().optional(),
36841
+ generation: _enum(["xdna1", "xdna2"]).optional()
36842
+ });
36721
36843
  var CoralInfoSchema = object({
36722
36844
  type: literal("coral-edgetpu"),
36723
36845
  bus: string().optional()
@@ -40504,9 +40626,11 @@ DeviceType.Camera, method(object({
40504
40626
  * once is what makes a second provider (RunPod, a local NVIDIA node) a new
40505
40627
  * manifest entry and nothing else.
40506
40628
  *
40507
- * Collection, routed by the `addonId` in every single-row input (the `llm` /
40508
- * `notification-output` posture); `describe` concat-fans across providers.
40509
- * Every method is `admin`: these spend money.
40629
+ * Collection of provider **types** (addons). Each addon owns zero or more
40630
+ * **entries** (credentials + defaults). Concat-fans: `describe`,
40631
+ * `describeTypes`, `listEntries`, `listJobs`. Single-row work is keyed by
40632
+ * `entryId`; callers also pass the owning `addonId` as the collection
40633
+ * selector (broker posture). Every method is `admin`: these spend money.
40510
40634
  *
40511
40635
  * Every cloud object a provider creates is tagged with the orchestrator's
40512
40636
  * `jobKey`, so a retried submit finds the job it already started instead of
@@ -40530,8 +40654,8 @@ var TrainingRegionOptionSchema = object({
40530
40654
  priceMultiplier: number().positive()
40531
40655
  });
40532
40656
  /**
40533
- * The provider's per-account settings, as the orchestrator reads them. They
40534
- * live in the PROVIDER addon's settings (operator decision 2026-10-08: they
40657
+ * The provider's per-entry settings, as the orchestrator reads them. They
40658
+ * live on the PROVIDER addon's entry (operator decision 2026-10-08: they
40535
40659
  * depend on the user's account), never hard-coded in the orchestrator.
40536
40660
  */
40537
40661
  var TrainingProviderDefaultsSchema = object({
@@ -40542,9 +40666,44 @@ var TrainingProviderDefaultsSchema = object({
40542
40666
  /** Hours a FAILED job's cloud dataset is kept for debugging; 0 = delete at once. */
40543
40667
  failedDatasetGraceHours: number().nonnegative()
40544
40668
  });
40669
+ /**
40670
+ * Entry form schema for a provider type — same seam as notification
40671
+ * `TargetKind.configSchema` (`z.unknown()` at the wire; callers tighten to
40672
+ * {@link ConfigUISchema}). Drives `ConfigFormBuilder` on Training → Providers.
40673
+ */
40674
+ var ConfigSchemaPassthrough = unknown();
40675
+ /** One creatable provider type, for the Add-entry dialog. */
40676
+ var TrainingProviderTypeSchema = object({
40677
+ typeId: string(),
40678
+ label: string(),
40679
+ /** Path under the addon package (e.g. `assets/training-modal/icon.svg`). */
40680
+ iconAsset: string(),
40681
+ /** Owning `training-provider` addon — collection selector for createEntry. */
40682
+ addonId: string(),
40683
+ /**
40684
+ * Fields for one entry of this type (credentials + defaults). Absent on a
40685
+ * type that only needs a name. Password fields are keychain-backed on the
40686
+ * provider addon (`secretStatePaths`), not D634 plaintext.
40687
+ */
40688
+ configSchema: ConfigSchemaPassthrough.optional()
40689
+ });
40690
+ /** One configured account / workspace under a provider type. */
40691
+ var TrainingProviderEntrySchema = object({
40692
+ entryId: string(),
40693
+ typeId: string(),
40694
+ name: string(),
40695
+ addonId: string(),
40696
+ /** Credentials are present — never the values. */
40697
+ configured: boolean()
40698
+ });
40545
40699
  var TrainingProviderDescriptorSchema = object({
40546
40700
  addonId: string(),
40547
- /** `modal`, `runpod`, `fake`, … */
40701
+ entryId: string(),
40702
+ typeId: string(),
40703
+ /** Operator-chosen entry name. */
40704
+ name: string(),
40705
+ iconAsset: string(),
40706
+ /** `modal`, `runpod`, `fake`, … — same as typeId for current providers. */
40548
40707
  kind: string(),
40549
40708
  label: string(),
40550
40709
  gpuTypes: array(TrainingGpuOptionSchema).readonly(),
@@ -40556,7 +40715,30 @@ var TrainingProviderDescriptorSchema = object({
40556
40715
  dataResidencyNote: string(),
40557
40716
  /** Credentials are present — never the values. */
40558
40717
  configured: boolean(),
40559
- defaults: TrainingProviderDefaultsSchema
40718
+ defaults: TrainingProviderDefaultsSchema,
40719
+ /**
40720
+ * Values for {@link TrainingProviderTypeSchema}'s `configSchema` — password
40721
+ * fields are keychain {@link SecretFieldView} or `null` / `''` (create),
40722
+ * never plaintext. Same hydrate contract as settings forms (D789).
40723
+ */
40724
+ formValues: record(string(), unknown()).optional()
40725
+ });
40726
+ /**
40727
+ * Patch one entry's name, credentials and defaults. Pin with owning `{ addonId }`.
40728
+ * An omitted or empty `tokenSecret` means KEEP the stored secret (D787).
40729
+ * `{ $secretClear: true }` clears it.
40730
+ */
40731
+ var TrainingProviderUpdateEntryInputSchema = object({
40732
+ entryId: string().min(1),
40733
+ name: string().min(1),
40734
+ tokenId: string().optional(),
40735
+ tokenSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
40736
+ environment: string().optional(),
40737
+ gpuType: string().optional(),
40738
+ region: string().optional(),
40739
+ costCapUsd: number().nonnegative().optional(),
40740
+ maxRuntimeSec: number().int().positive().optional(),
40741
+ failedDatasetGraceHours: number().nonnegative().optional()
40560
40742
  });
40561
40743
  var TrainingCredentialCheckSchema = object({
40562
40744
  ok: boolean(),
@@ -40608,20 +40790,33 @@ var TrainerSourceRefSchema = object({
40608
40790
  /** A commit sha (never a branch) — the job must be reproducible. */
40609
40791
  revision: string().regex(/^[0-9a-f]{7,64}$/)
40610
40792
  });
40793
+ /** Cloud job identity — route with the owning addon's `addonId` selector. */
40611
40794
  var JobRef = {
40612
- addonId: string(),
40795
+ entryId: string().min(1),
40613
40796
  jobKey: string().uuid()
40614
40797
  };
40615
40798
  var TrainingLogLineSchema = object({
40616
40799
  ts: number(),
40617
40800
  text: string()
40618
40801
  });
40619
- method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({ addonId: string() }), TrainingCredentialCheckSchema, {
40802
+ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderTypeSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderEntrySchema).readonly(), { auth: "admin" }), method(object({
40803
+ typeId: string().min(1),
40804
+ name: string().min(1)
40805
+ }), object({ entryId: string() }), {
40806
+ kind: "mutation",
40807
+ auth: "admin"
40808
+ }), method(object({ entryId: string().min(1) }), object({ ok: literal(true) }), {
40809
+ kind: "mutation",
40810
+ auth: "admin"
40811
+ }), method(TrainingProviderUpdateEntryInputSchema, object({ ok: literal(true) }), {
40812
+ kind: "mutation",
40813
+ auth: "admin"
40814
+ }), method(object({ entryId: string().min(1) }), TrainingCredentialCheckSchema, {
40620
40815
  kind: "mutation",
40621
40816
  auth: "admin",
40622
40817
  timeoutMs: 3e4
40623
40818
  }), method(object({
40624
- addonId: string(),
40819
+ entryId: string().min(1),
40625
40820
  gpuType: string(),
40626
40821
  region: string(),
40627
40822
  datasetBytes: number().int().nonnegative(),
@@ -40687,7 +40882,7 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
40687
40882
  kind: "mutation",
40688
40883
  auth: "admin",
40689
40884
  timeoutMs: 5 * 6e4
40690
- }), method(object({ addonId: string() }), array(ProviderJobStatusSchema).readonly(), {
40885
+ }), method(object({ entryId: string().min(1).optional() }), array(ProviderJobStatusSchema).readonly(), {
40691
40886
  auth: "admin",
40692
40887
  timeoutMs: 2 * 6e4
40693
40888
  });
@@ -40697,20 +40892,31 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
40697
40892
  *
40698
40893
  * It owns what every provider must agree on, written once:
40699
40894
  *
40700
- * - **Dataset versions.** Taken over from pipeline-analytics (D796): the rows
40701
- * live here (D808); pipeline-analytics still CUTS a version (it owns the corpus and
40702
- * the export plan) and reaches this store through the five row methods
40703
- * below, so the Retrain page and the export did not change.
40704
40895
  * - **Jobs.** A persisted state machine, a reconcile loop against the
40705
40896
  * provider, a cost guard, a daily orphan sweep and the retention rules.
40706
40897
  * - **The return flow.** Verified artefacts → Model Studio
40707
40898
  * (`custom-model-registry.importModelBundle`) → canary on cameras →
40708
40899
  * rollback. Nothing is ever registered automatically.
40709
40900
  *
40901
+ * Plan/start takes a live {@link TrainingCorpusSelection} (collections +
40902
+ * work-state rule); frame ids are resolved via pipeline-analytics at that
40903
+ * moment and snapshotted on the job. No frozen dataset version.
40904
+ *
40710
40905
  * Every method is `admin`.
40711
40906
  */
40712
- /** A version WITH its frame list — what the export and a job read. */
40713
- var TrainingDatasetVersionRowSchema = RetrainDatasetVersionSchema.omit({ frameCount: true }).extend({ frameIds: array(string()).max(2e4).readonly() });
40907
+ /**
40908
+ * Live corpus criteria for plan/start (design §5.2). Default is complete-only.
40909
+ * Frame ids are resolved at plan/start — never a frozen version id.
40910
+ */
40911
+ var TrainingCorpusSelectionSchema = object({
40912
+ collectionIds: array(string()).min(1),
40913
+ /** Default complete-only for v1 */
40914
+ workState: _enum([
40915
+ "complete",
40916
+ "annotated_or_complete",
40917
+ "any_annotated"
40918
+ ]).default("complete")
40919
+ });
40714
40920
  /** A base model a detector job can fine-tune, and the baseline it is judged against. */
40715
40921
  var TrainingBaseModelSchema = object({
40716
40922
  modelId: string(),
@@ -40728,9 +40934,13 @@ var TrainingPresetSchema = _enum([
40728
40934
  "thorough"
40729
40935
  ]);
40730
40936
  var TrainingJobRequestSchema = object({
40731
- datasetVersionId: string().min(1),
40732
- /** The `training-provider` addon that runs it. */
40733
- addonId: string().min(1),
40937
+ /** Live collection + work-state criteria; resolved at plan/start. */
40938
+ selection: TrainingCorpusSelectionSchema,
40939
+ /**
40940
+ * The provider **entry** that runs it (credentials + defaults).
40941
+ * Resolve to an owning addon via `training-provider.describe` / `listEntries`.
40942
+ */
40943
+ entryId: string().min(1),
40734
40944
  gpuType: string().min(1),
40735
40945
  region: string(),
40736
40946
  baseModelId: string().min(1),
@@ -40789,6 +40999,7 @@ var TrainingJobPlanSchema = object({
40789
40999
  * result lives after the operator acted on it.
40790
41000
  */
40791
41001
  var TrainingJobStateSchema = _enum([
41002
+ "queued",
40792
41003
  "uploading",
40793
41004
  "submitted",
40794
41005
  "starting",
@@ -40842,6 +41053,11 @@ var TrainingJobSchema = object({
40842
41053
  createdAt: number(),
40843
41054
  updatedAt: number(),
40844
41055
  state: TrainingJobStateSchema,
41056
+ /**
41057
+ * Shared by every job enqueued together via `startJobBatch`.
41058
+ * `null` for a lone `startJob`. The engine advances queued siblings by this id.
41059
+ */
41060
+ batchId: string().nullable().default(null),
40845
41061
  stage: TrainingStageSchema.nullable(),
40846
41062
  failure: object({
40847
41063
  reason: TrainingFailureReasonSchema,
@@ -40853,6 +41069,12 @@ var TrainingJobSchema = object({
40853
41069
  maxRuntimeSec: number().int().positive(),
40854
41070
  trainer: TrainerSourceRefSchema,
40855
41071
  datasetLayout: RetrainExportLayoutSchema,
41072
+ /** Frame count snapshotted when the job started (audit; equals `frameIds.length`). */
41073
+ frameCount: number().int().nonnegative(),
41074
+ /** Resolved frame ids at start — the archive ships exactly these. */
41075
+ frameIds: array(string()).max(2e4).readonly(),
41076
+ /** Hash of what those frames taught at start (trainer `dataset.annotationHash`). */
41077
+ annotationHash: string(),
40856
41078
  dataset: object({
40857
41079
  bytes: number().int(),
40858
41080
  sha256: string(),
@@ -40894,13 +41116,7 @@ var TrainingJobSchema = object({
40894
41116
  canary: TrainingCanarySchema.nullable()
40895
41117
  });
40896
41118
  var IdInput = object({ id: string().min(1) });
40897
- method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
40898
- kind: "mutation",
40899
- auth: "admin"
40900
- }), 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() }), {
40901
- kind: "mutation",
40902
- auth: "admin"
40903
- }), method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
41119
+ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
40904
41120
  auth: "admin",
40905
41121
  timeoutMs: 6e4
40906
41122
  }), method(TrainingJobRequestSchema.extend({
@@ -40919,6 +41135,24 @@ method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
40919
41135
  kind: "mutation",
40920
41136
  auth: "admin",
40921
41137
  timeoutMs: 12e4
41138
+ }), method(TrainingJobRequestSchema.omit({ baseModelId: true }).extend({
41139
+ baseModelIds: array(string().min(1)).min(1),
41140
+ name: string().min(1).max(120),
41141
+ maxCostUsd: number().positive(),
41142
+ maxRuntimeSec: number().int().positive(),
41143
+ idempotencyKey: string().min(8).max(80)
41144
+ }), discriminatedUnion("kind", [object({
41145
+ kind: literal("started"),
41146
+ batchId: string(),
41147
+ jobs: array(TrainingJobSchema).min(1).readonly()
41148
+ }), object({
41149
+ kind: literal("refused"),
41150
+ reason: TrainingRefusalReasonSchema,
41151
+ detail: string()
41152
+ })]), {
41153
+ kind: "mutation",
41154
+ auth: "admin",
41155
+ timeoutMs: 12e4
40922
41156
  }), method(object({}), array(TrainingJobSchema).readonly(), { auth: "admin" }), method(IdInput, TrainingJobSchema.nullable(), { auth: "admin" }), method(IdInput, TrainingJobSchema, {
40923
41157
  kind: "mutation",
40924
41158
  auth: "admin",
@@ -44952,6 +45186,36 @@ Object.freeze({
44952
45186
  addonId: null,
44953
45187
  access: "view"
44954
45188
  },
45189
+ "oidcConnections.connectionFormSchema": {
45190
+ capName: "oidc-connections",
45191
+ capScope: "system",
45192
+ addonId: null,
45193
+ access: "view"
45194
+ },
45195
+ "oidcConnections.createConnection": {
45196
+ capName: "oidc-connections",
45197
+ capScope: "system",
45198
+ addonId: null,
45199
+ access: "create"
45200
+ },
45201
+ "oidcConnections.deleteConnection": {
45202
+ capName: "oidc-connections",
45203
+ capScope: "system",
45204
+ addonId: null,
45205
+ access: "delete"
45206
+ },
45207
+ "oidcConnections.listConnections": {
45208
+ capName: "oidc-connections",
45209
+ capScope: "system",
45210
+ addonId: null,
45211
+ access: "view"
45212
+ },
45213
+ "oidcConnections.updateConnection": {
45214
+ capName: "oidc-connections",
45215
+ capScope: "system",
45216
+ addonId: null,
45217
+ access: "create"
45218
+ },
44955
45219
  "osd.getStatus": {
44956
45220
  capName: "osd",
44957
45221
  capScope: "device",
@@ -45024,6 +45288,12 @@ Object.freeze({
45024
45288
  addonId: null,
45025
45289
  access: "create"
45026
45290
  },
45291
+ "osdManager.setSlotCameraEnabled": {
45292
+ capName: "osd-manager",
45293
+ capScope: "system",
45294
+ addonId: null,
45295
+ access: "create"
45296
+ },
45027
45297
  "osdManager.upsertTemplate": {
45028
45298
  capName: "osd-manager",
45029
45299
  capScope: "system",
@@ -45162,12 +45432,6 @@ Object.freeze({
45162
45432
  addonId: null,
45163
45433
  access: "create"
45164
45434
  },
45165
- "pipelineAnalytics.createRetrainDatasetVersion": {
45166
- capName: "pipeline-analytics",
45167
- capScope: "device",
45168
- addonId: null,
45169
- access: "create"
45170
- },
45171
45435
  "pipelineAnalytics.deleteDeviceEvents": {
45172
45436
  capName: "pipeline-analytics",
45173
45437
  capScope: "device",
@@ -45180,12 +45444,6 @@ Object.freeze({
45180
45444
  addonId: null,
45181
45445
  access: "delete"
45182
45446
  },
45183
- "pipelineAnalytics.deleteRetrainDatasetVersion": {
45184
- capName: "pipeline-analytics",
45185
- capScope: "device",
45186
- addonId: null,
45187
- access: "delete"
45188
- },
45189
45447
  "pipelineAnalytics.deleteTracks": {
45190
45448
  capName: "pipeline-analytics",
45191
45449
  capScope: "device",
@@ -45288,6 +45546,12 @@ Object.freeze({
45288
45546
  addonId: null,
45289
45547
  access: "view"
45290
45548
  },
45549
+ "pipelineAnalytics.getRetrainCorpusKpi": {
45550
+ capName: "pipeline-analytics",
45551
+ capScope: "device",
45552
+ addonId: null,
45553
+ access: "view"
45554
+ },
45291
45555
  "pipelineAnalytics.getRetrainExportUrl": {
45292
45556
  capName: "pipeline-analytics",
45293
45557
  capScope: "device",
@@ -45408,7 +45672,7 @@ Object.freeze({
45408
45672
  addonId: null,
45409
45673
  access: "view"
45410
45674
  },
45411
- "pipelineAnalytics.listRetrainDatasetVersions": {
45675
+ "pipelineAnalytics.listRetrainCorpusPage": {
45412
45676
  capName: "pipeline-analytics",
45413
45677
  capScope: "device",
45414
45678
  addonId: null,
@@ -45462,12 +45726,6 @@ Object.freeze({
45462
45726
  addonId: null,
45463
45727
  access: "create"
45464
45728
  },
45465
- "pipelineAnalytics.previewRetrainDataset": {
45466
- capName: "pipeline-analytics",
45467
- capScope: "device",
45468
- addonId: null,
45469
- access: "view"
45470
- },
45471
45729
  "pipelineAnalytics.proposeRetrainAnnotations": {
45472
45730
  capName: "pipeline-analytics",
45473
45731
  capScope: "device",
@@ -45546,6 +45804,12 @@ Object.freeze({
45546
45804
  addonId: null,
45547
45805
  access: "create"
45548
45806
  },
45807
+ "pipelineAnalytics.resolveRetrainTrainingCorpus": {
45808
+ capName: "pipeline-analytics",
45809
+ capScope: "device",
45810
+ addonId: null,
45811
+ access: "view"
45812
+ },
45549
45813
  "pipelineAnalytics.restageRetrainTrack": {
45550
45814
  capName: "pipeline-analytics",
45551
45815
  capScope: "device",
@@ -45606,12 +45870,6 @@ Object.freeze({
45606
45870
  addonId: null,
45607
45871
  access: "create"
45608
45872
  },
45609
- "pipelineAnalytics.verifyRetrainDatasetVersion": {
45610
- capName: "pipeline-analytics",
45611
- capScope: "device",
45612
- addonId: null,
45613
- access: "view"
45614
- },
45615
45873
  "pipelineAnalytics.wipeAllAnalytics": {
45616
45874
  capName: "pipeline-analytics",
45617
45875
  capScope: "device",
@@ -48006,18 +48264,6 @@ Object.freeze({
48006
48264
  addonId: null,
48007
48265
  access: "create"
48008
48266
  },
48009
- "training.findDatasetVersionIdByName": {
48010
- capName: "training",
48011
- capScope: "system",
48012
- addonId: null,
48013
- access: "view"
48014
- },
48015
- "training.getDatasetVersion": {
48016
- capName: "training",
48017
- capScope: "system",
48018
- addonId: null,
48019
- access: "view"
48020
- },
48021
48267
  "training.getJob": {
48022
48268
  capName: "training",
48023
48269
  capScope: "system",
@@ -48036,12 +48282,6 @@ Object.freeze({
48036
48282
  addonId: null,
48037
48283
  access: "view"
48038
48284
  },
48039
- "training.listDatasetVersions": {
48040
- capName: "training",
48041
- capScope: "system",
48042
- addonId: null,
48043
- access: "view"
48044
- },
48045
48285
  "training.listJobs": {
48046
48286
  capName: "training",
48047
48287
  capScope: "system",
@@ -48054,54 +48294,66 @@ Object.freeze({
48054
48294
  addonId: null,
48055
48295
  access: "view"
48056
48296
  },
48057
- "training.putDatasetVersion": {
48297
+ "training.registerResult": {
48058
48298
  capName: "training",
48059
48299
  capScope: "system",
48060
48300
  addonId: null,
48061
48301
  access: "create"
48062
48302
  },
48063
- "training.registerResult": {
48303
+ "training.rollbackCanary": {
48064
48304
  capName: "training",
48065
48305
  capScope: "system",
48066
48306
  addonId: null,
48067
48307
  access: "create"
48068
48308
  },
48069
- "training.removeDatasetVersion": {
48309
+ "training.startJob": {
48070
48310
  capName: "training",
48071
48311
  capScope: "system",
48072
48312
  addonId: null,
48073
- access: "delete"
48313
+ access: "create"
48074
48314
  },
48075
- "training.rollbackCanary": {
48315
+ "training.startJobBatch": {
48076
48316
  capName: "training",
48077
48317
  capScope: "system",
48078
48318
  addonId: null,
48079
48319
  access: "create"
48080
48320
  },
48081
- "training.startJob": {
48082
- capName: "training",
48321
+ "trainingProvider.cancelJob": {
48322
+ capName: "training-provider",
48083
48323
  capScope: "system",
48084
48324
  addonId: null,
48085
48325
  access: "create"
48086
48326
  },
48087
- "trainingProvider.cancelJob": {
48327
+ "trainingProvider.cleanupJob": {
48088
48328
  capName: "training-provider",
48089
48329
  capScope: "system",
48090
48330
  addonId: null,
48091
48331
  access: "create"
48092
48332
  },
48093
- "trainingProvider.cleanupJob": {
48333
+ "trainingProvider.createEntry": {
48094
48334
  capName: "training-provider",
48095
48335
  capScope: "system",
48096
48336
  addonId: null,
48097
48337
  access: "create"
48098
48338
  },
48339
+ "trainingProvider.deleteEntry": {
48340
+ capName: "training-provider",
48341
+ capScope: "system",
48342
+ addonId: null,
48343
+ access: "delete"
48344
+ },
48099
48345
  "trainingProvider.describe": {
48100
48346
  capName: "training-provider",
48101
48347
  capScope: "system",
48102
48348
  addonId: null,
48103
48349
  access: "view"
48104
48350
  },
48351
+ "trainingProvider.describeTypes": {
48352
+ capName: "training-provider",
48353
+ capScope: "system",
48354
+ addonId: null,
48355
+ access: "view"
48356
+ },
48105
48357
  "trainingProvider.estimateJob": {
48106
48358
  capName: "training-provider",
48107
48359
  capScope: "system",
@@ -48114,6 +48366,12 @@ Object.freeze({
48114
48366
  addonId: null,
48115
48367
  access: "view"
48116
48368
  },
48369
+ "trainingProvider.listEntries": {
48370
+ capName: "training-provider",
48371
+ capScope: "system",
48372
+ addonId: null,
48373
+ access: "view"
48374
+ },
48117
48375
  "trainingProvider.listJobEvents": {
48118
48376
  capName: "training-provider",
48119
48377
  capScope: "system",
@@ -48144,6 +48402,12 @@ Object.freeze({
48144
48402
  addonId: null,
48145
48403
  access: "create"
48146
48404
  },
48405
+ "trainingProvider.updateEntry": {
48406
+ capName: "training-provider",
48407
+ capScope: "system",
48408
+ addonId: null,
48409
+ access: "create"
48410
+ },
48147
48411
  "trainingProvider.uploadDataset": {
48148
48412
  capName: "training-provider",
48149
48413
  capScope: "system",
@@ -51350,6 +51614,11 @@ Object.freeze({
51350
51614
  form: "single",
51351
51615
  optional: false
51352
51616
  }],
51617
+ "osdManager.setSlotCameraEnabled": [{
51618
+ name: "deviceId",
51619
+ form: "single",
51620
+ optional: false
51621
+ }],
51353
51622
  "petFeeder.callPet": [{
51354
51623
  name: "deviceId",
51355
51624
  form: "single",
@@ -51570,6 +51839,11 @@ Object.freeze({
51570
51839
  form: "array",
51571
51840
  optional: false
51572
51841
  }],
51842
+ "pipelineAnalytics.listRetrainCorpusPage": [{
51843
+ name: "deviceIds",
51844
+ form: "array",
51845
+ optional: true
51846
+ }],
51573
51847
  "pipelineAnalytics.listRetrainStaging": [{
51574
51848
  name: "deviceIds",
51575
51849
  form: "array",
@@ -52679,6 +52953,7 @@ Object.freeze({
52679
52953
  });
52680
52954
  Object.freeze({
52681
52955
  "broker": "broker",
52956
+ "calendar-source": "calendar",
52682
52957
  "device-export": "device-export",
52683
52958
  "llm": "ai",
52684
52959
  "mesh-network": "mesh",