@camstack/addon-export-hap 1.2.156 → 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.
@@ -5416,7 +5416,7 @@ var ZodIssueCode = {
5416
5416
  var ZodFirstPartyTypeKind;
5417
5417
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5418
5418
  //#endregion
5419
- //#region ../types/dist/sleep-r3RWkGVx.mjs
5419
+ //#region ../types/dist/sleep-DwAQ9sqX.mjs
5420
5420
  /**
5421
5421
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5422
5422
  * window to float samples (D455).
@@ -10009,6 +10009,16 @@ var CompositionSchema = object({
10009
10009
  seen.add(feature.cap);
10010
10010
  });
10011
10011
  });
10012
+ var NodeColorIdSchema = _enum([
10013
+ "node-a",
10014
+ "node-b",
10015
+ "node-c",
10016
+ "node-d",
10017
+ "node-e",
10018
+ "node-f",
10019
+ "node-g",
10020
+ "node-h"
10021
+ ]);
10012
10022
  new Set([
10013
10023
  "track",
10014
10024
  "face",
@@ -19053,14 +19063,14 @@ var LlmProfileSchema = object({
19053
19063
  /** ConfigUISchema tree passed through untyped on the wire (the
19054
19064
  * notification-output `ConfigSchemaPassthrough` precedent at
19055
19065
  * notification-output.cap.ts:151); the exported TS type re-tightens it. */
19056
- var ConfigSchemaPassthrough$1 = unknown();
19066
+ var ConfigSchemaPassthrough$3 = unknown();
19057
19067
  var LlmProfileKindDescriptorSchema = object({
19058
19068
  kind: LlmProfileKindSchema,
19059
19069
  label: string(),
19060
19070
  icon: string(),
19061
19071
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
19062
19072
  addonId: string(),
19063
- configSchema: ConfigSchemaPassthrough$1
19073
+ configSchema: ConfigSchemaPassthrough$3
19064
19074
  });
19065
19075
  var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
19066
19076
  var LlmDefaultSchema = object({
@@ -20181,7 +20191,7 @@ var TargetKindCapsSchema = object({
20181
20191
  * the union is large and not meant for runtime validation here; the exported
20182
20192
  * `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
20183
20193
  */
20184
- var ConfigSchemaPassthrough = unknown();
20194
+ var ConfigSchemaPassthrough$2 = unknown();
20185
20195
  var TargetKindSchema = object({
20186
20196
  kind: string(),
20187
20197
  label: string(),
@@ -20218,7 +20228,7 @@ var TargetKindSchema = object({
20218
20228
  * its raster path, which is the safe default for an unknown image.
20219
20229
  */
20220
20230
  iconMediaType: string().optional(),
20221
- configSchema: ConfigSchemaPassthrough,
20231
+ configSchema: ConfigSchemaPassthrough$2,
20222
20232
  /**
20223
20233
  * The config keys that decide WHERE this kind's secrets are sent (server,
20224
20234
  * base URL, instance, chat, recipient). A save that changes any of them
@@ -23517,6 +23527,61 @@ var OauthIntegrationDescriptorSchema = object({
23517
23527
  });
23518
23528
  method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" });
23519
23529
  /**
23530
+ * `oidc-connections` — CRUD for IdP rows under `auth-oidc` (D828 sibling).
23531
+ *
23532
+ * One hub-only singleton (`auth-oidc`). The Settings UI is a DataTable +
23533
+ * ItemFormDialog; there is no `editable-array` in `globalSettingsSchema`.
23534
+ * Operator-chosen `id` is the URL slug (`/addon/auth-oidc/<id>/…`) and is
23535
+ * immutable after create.
23536
+ */
23537
+ var ConfigSchemaPassthrough$1 = unknown();
23538
+ var OidcConnectionSchema = object({
23539
+ id: string().min(1),
23540
+ displayName: string(),
23541
+ icon: string(),
23542
+ issuerUrl: string(),
23543
+ clientId: string(),
23544
+ /** Client id + secret present — never the secret value. */
23545
+ configured: boolean(),
23546
+ /**
23547
+ * Values for the connection form schema. `clientSecret` is a keychain
23548
+ * {@link SecretFieldView} or `null` / `''`, never plaintext (D789).
23549
+ */
23550
+ formValues: record(string(), unknown()).optional()
23551
+ });
23552
+ /**
23553
+ * Patch one connection. Omitted or empty `clientSecret` keeps the stored
23554
+ * secret (D787). `{ $secretClear: true }` clears it. `id` is never renamed.
23555
+ */
23556
+ var OidcConnectionUpdateInputSchema = object({
23557
+ id: string().min(1),
23558
+ displayName: string().min(1),
23559
+ icon: string().optional(),
23560
+ issuerUrl: string().optional(),
23561
+ clientId: string().optional(),
23562
+ clientSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
23563
+ redirectUri: string().optional(),
23564
+ scopes: string().optional(),
23565
+ usernameClaim: _enum([
23566
+ "preferred_username",
23567
+ "email",
23568
+ "sub"
23569
+ ]).optional()
23570
+ });
23571
+ method(object({}), ConfigSchemaPassthrough$1, { auth: "admin" }), method(object({}), array(OidcConnectionSchema).readonly(), { auth: "admin" }), method(object({
23572
+ id: string().min(1).regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "id must be a lowercase slug"),
23573
+ displayName: string().min(1)
23574
+ }), object({ id: string() }), {
23575
+ kind: "mutation",
23576
+ auth: "admin"
23577
+ }), method(OidcConnectionUpdateInputSchema, object({ ok: literal(true) }), {
23578
+ kind: "mutation",
23579
+ auth: "admin"
23580
+ }), method(object({ id: string().min(1) }), object({ ok: literal(true) }), {
23581
+ kind: "mutation",
23582
+ auth: "admin"
23583
+ });
23584
+ /**
23520
23585
  * What started a camera's onboard motion (D672). `camera` is the camera's own
23521
23586
  * firmware; `sensor` is a device the operator ATTACHED to it. Absent on the
23522
23587
  * wire means the camera: only the camera-sensors bridge ever says `sensor`.
@@ -24873,24 +24938,69 @@ var RetrainFrameListSchema = object({
24873
24938
  /** What the page pre-selects — the native key frame when one survives. */
24874
24939
  autoPickMediaId: number().int().optional()
24875
24940
  });
24941
+ /** Exclusive partition of a corpus copy's annotation progress (design §4.2). */
24942
+ var RetrainFrameWorkStateSchema = _enum([
24943
+ "unannotated",
24944
+ "annotated",
24945
+ "complete"
24946
+ ]);
24947
+ /**
24948
+ * Filters for paginated corpus list, KPI, and matching export (design §4.4).
24949
+ * Every narrowing field is ANDed; omitted fields impose no constraint.
24950
+ */
24951
+ var RetrainCorpusFilterSchema = object({
24952
+ workState: RetrainFrameWorkStateSchema.optional(),
24953
+ deviceIds: array(number()).max(500).optional(),
24954
+ /** When set, only frames in this named collection. */
24955
+ collectionId: string().optional(),
24956
+ /** Frames that carry at least one saved annotation in one of these classes. */
24957
+ classes: array(RetrainMacroClassSchema).optional(),
24958
+ page: number().int().positive().default(1),
24959
+ pageSize: number().int().positive().max(100).default(50)
24960
+ });
24961
+ var RetrainCorpusPageSchema = object({
24962
+ frames: array(RetrainFrameSchema.extend({ workState: RetrainFrameWorkStateSchema })).readonly(),
24963
+ total: number().int().nonnegative(),
24964
+ page: number().int().positive(),
24965
+ pageSize: number().int().positive()
24966
+ });
24967
+ var RetrainCorpusKpiCameraRowSchema = object({
24968
+ deviceId: number(),
24969
+ unannotated: number().int().nonnegative(),
24970
+ annotated: number().int().nonnegative(),
24971
+ complete: number().int().nonnegative(),
24972
+ /** This camera's `complete` count divided by corpus `total`, in `[0,1]`.
24973
+ * `null` when the corpus is empty (no ratio). */
24974
+ pctOfCorpus: number().min(0).max(1).nullable()
24975
+ });
24976
+ var RetrainCorpusKpiSchema = object({
24977
+ total: number().int().nonnegative(),
24978
+ unannotated: number().int().nonnegative(),
24979
+ annotated: number().int().nonnegative(),
24980
+ complete: number().int().nonnegative(),
24981
+ cameras: array(RetrainCorpusKpiCameraRowSchema).readonly()
24982
+ });
24876
24983
  /**
24877
24984
  * Which frames an annotated export carries. Every field narrows; an empty
24878
- * filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
24879
- * list owned by whoever trains (the training orchestrator), so `frameIds` is
24880
- * the primitive a version export uses; `batchId` re-selects what an earlier
24881
- * export carried (`exportedInBatch`).
24985
+ * filter is every annotated copy. `frameIds` is the primitive a job or
24986
+ * download uses; `batchId` re-selects what an earlier export carried
24987
+ * (`exportedInBatch`). Frozen dataset versions were removed — live selection
24988
+ * resolves to `frameIds` at plan/start.
24882
24989
  */
24883
24990
  var RetrainExportFilterSchema = object({
24884
24991
  deviceIds: array(number()).optional(),
24885
24992
  frameIds: array(string()).max(2e4).optional(),
24886
24993
  /** Only frames in at least one of these named collections. */
24887
24994
  collectionIds: array(string()).max(200).optional(),
24888
- /** Exactly the frames of this dataset version (and its completeOnly). An
24889
- * unknown id selects nothing. */
24890
- datasetVersionId: string().optional(),
24995
+ /** Single collection (Frames filter bar). ANDed with `collectionIds` when both set. */
24996
+ collectionId: string().optional(),
24891
24997
  batchId: string().optional(),
24892
24998
  /** Only frames the operator marked complete (all subjects boxed). */
24893
- completeOnly: boolean().optional()
24999
+ completeOnly: boolean().optional(),
25000
+ /** Exclusive work-state partition (`workStateOf`); same as the corpus list. */
25001
+ workState: RetrainFrameWorkStateSchema.optional(),
25002
+ /** Frames with at least one saved annotation in one of these classes. */
25003
+ classes: array(RetrainMacroClassSchema).optional()
24894
25004
  });
24895
25005
  /**
24896
25006
  * `frames`: the full frame copies, boxes in `annotations.json`.
@@ -25090,8 +25200,7 @@ var RetrainDatasetStatsSchema = object({
25090
25200
  completeFrames: number().int()
25091
25201
  })).readonly()
25092
25202
  });
25093
- /** An immutable dataset version, without its frame list. */
25094
- var RetrainDatasetVersionSchema = object({
25203
+ object({
25095
25204
  id: string(),
25096
25205
  name: string(),
25097
25206
  createdAt: number(),
@@ -25099,22 +25208,33 @@ var RetrainDatasetVersionSchema = object({
25099
25208
  layout: RetrainExportLayoutSchema,
25100
25209
  completeOnly: boolean(),
25101
25210
  frameCount: number().int(),
25102
- /** sha256 of what the frames taught when the version was frozen. */
25103
25211
  annotationHash: string(),
25104
- /** The export manifest schema the version was cut under. */
25105
25212
  manifestSchema: string(),
25106
25213
  stats: RetrainDatasetStatsSchema
25107
25214
  });
25108
- var CreateRetrainDatasetVersionResultSchema = discriminatedUnion("kind", [object({
25109
- kind: literal("created"),
25110
- version: RetrainDatasetVersionSchema
25215
+ /**
25216
+ * Live training corpus criteria — same shape as `TrainingCorpusSelection` on
25217
+ * the training cap. Resolved here so plan/start and the annotated export share
25218
+ * one definition of "the frames" (`buildRetrainExportPlan`).
25219
+ */
25220
+ var RetrainTrainingCorpusSelectionSchema = object({
25221
+ collectionIds: array(string()).min(1),
25222
+ workState: _enum([
25223
+ "complete",
25224
+ "annotated_or_complete",
25225
+ "any_annotated"
25226
+ ]).default("complete")
25227
+ });
25228
+ var RetrainTrainingCorpusResolveResultSchema = discriminatedUnion("kind", [object({
25229
+ kind: literal("resolved"),
25230
+ frameIds: array(string()).max(2e4).readonly(),
25231
+ stats: RetrainDatasetStatsSchema,
25232
+ annotationHash: string(),
25233
+ layout: RetrainExportLayoutSchema
25111
25234
  }), object({
25112
25235
  kind: literal("refused"),
25113
- reason: _enum([
25114
- "empty-name",
25115
- "duplicate-name",
25116
- "no-frames"
25117
- ])
25236
+ reason: _enum(["unknown-collection", "no-frames"]),
25237
+ detail: string()
25118
25238
  })]);
25119
25239
  /** The outcome of a lifecycle move owned by the retrain page. */
25120
25240
  var RetrainTransitionResultSchema = object({
@@ -25821,6 +25941,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25821
25941
  }), array(RetrainTrackSchema).readonly(), {
25822
25942
  kind: "query",
25823
25943
  auth: "admin"
25944
+ }), method(RetrainCorpusFilterSchema, RetrainCorpusPageSchema, {
25945
+ kind: "query",
25946
+ auth: "admin"
25947
+ }), method(object({}), RetrainCorpusKpiSchema, {
25948
+ kind: "query",
25949
+ auth: "admin"
25824
25950
  }), method(object({ trackId: string() }), RetrainFrameListSchema, {
25825
25951
  kind: "query",
25826
25952
  auth: "admin"
@@ -25916,36 +26042,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25916
26042
  kind: "mutation",
25917
26043
  auth: "admin",
25918
26044
  timeoutMs: 12e4
25919
- }), method(object({
25920
- selection: RetrainDatasetSelectionSchema,
25921
- completeOnly: boolean().optional()
25922
- }), RetrainDatasetStatsSchema, {
25923
- kind: "query",
25924
- auth: "admin"
25925
- }), method(object({
25926
- name: string().max(120),
25927
- selection: RetrainDatasetSelectionSchema,
25928
- layout: RetrainExportLayoutSchema,
25929
- completeOnly: boolean()
25930
- }), CreateRetrainDatasetVersionResultSchema, {
25931
- kind: "mutation",
25932
- auth: "admin",
25933
- timeoutMs: 12e4
25934
- }), method(object({}), array(RetrainDatasetVersionSchema).readonly(), {
25935
- kind: "query",
25936
- auth: "admin"
25937
- }), method(object({ id: string() }), object({ deleted: boolean() }), {
25938
- kind: "mutation",
25939
- auth: "admin"
25940
- }), method(object({ id: string() }), object({
25941
- found: boolean(),
25942
- annotationHash: string(),
25943
- matches: boolean(),
25944
- missingFrames: number().int()
25945
- }), {
25946
- kind: "query",
25947
- auth: "admin",
25948
- timeoutMs: 12e4
25949
26045
  }), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
25950
26046
  kind: "query",
25951
26047
  auth: "admin"
@@ -25972,6 +26068,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25972
26068
  }), method(object({}), array(RetrainCollectionSchema).readonly(), {
25973
26069
  kind: "query",
25974
26070
  auth: "admin"
26071
+ }), method(RetrainTrainingCorpusSelectionSchema, RetrainTrainingCorpusResolveResultSchema, {
26072
+ kind: "query",
26073
+ auth: "admin",
26074
+ timeoutMs: 6e4
25975
26075
  }), method(object({
25976
26076
  id: string(),
25977
26077
  name: string().max(120)
@@ -26588,11 +26688,14 @@ var HardwareClassIdSchema = _enum([
26588
26688
  "intel-n-series",
26589
26689
  "apple-m-base",
26590
26690
  "apple-m-pro",
26691
+ "amd-phoenix",
26591
26692
  "unknown"
26592
26693
  ]);
26593
26694
  var AcceleratorKindSchema = _enum([
26594
26695
  "intel-npu",
26595
26696
  "intel-igpu",
26697
+ "amd-igpu",
26698
+ "amd-npu",
26596
26699
  "x86-cpu",
26597
26700
  "arm-cpu",
26598
26701
  "apple-ane",
@@ -28482,6 +28585,8 @@ var AgentPipelineSettingsSchema = object({
28482
28585
  * address is wrong (multi-homed host, NAT, custom interface).
28483
28586
  */
28484
28587
  reachableHost: string().optional(),
28588
+ /** Hub-persisted UI colour (`--color-node-*` theme tokens). */
28589
+ color: NodeColorIdSchema.optional(),
28485
28590
  /**
28486
28591
  * Multi-device inference opt-in (Phase 4). Per-node map deviceKey → {enabled,
28487
28592
  * weight, steps}. Absent / all-disabled ⇒ the node's single default
@@ -29031,8 +29136,9 @@ method(object({
29031
29136
  auth: "admin"
29032
29137
  }), method(object({
29033
29138
  agentNodeId: string(),
29034
- reachableHost: string().nullable()
29035
- }), object({ success: literal(true) }), {
29139
+ reachableHost: string().nullable().optional(),
29140
+ color: NodeColorIdSchema.nullable().optional()
29141
+ }).refine((v) => v.reachableHost !== void 0 || v.color !== void 0, { message: "reachableHost or color required" }), object({ success: literal(true) }), {
29036
29142
  kind: "mutation",
29037
29143
  auth: "admin"
29038
29144
  }), method(object({
@@ -32272,7 +32378,7 @@ var CustomActionInputSchema = object({
32272
32378
  action: string().min(1),
32273
32379
  input: unknown()
32274
32380
  });
32275
- method(_void(), array(AddonListItemSchema).readonly()), method(object({
32381
+ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSchema).readonly()), method(object({
32276
32382
  addonId: string(),
32277
32383
  limit: number().min(1).max(500).default(100),
32278
32384
  level: LogLevelSchema$2.optional()
@@ -35855,7 +35961,13 @@ var TopologyNodeSchema = object({
35855
35961
  })).readonly(),
35856
35962
  processes: array(TopologyProcessSchema).readonly(),
35857
35963
  categories: array(TopologyCategorySchema).readonly(),
35858
- rootPackage: TopologyRootPackageSchema.nullable()
35964
+ rootPackage: TopologyRootPackageSchema.nullable(),
35965
+ /**
35966
+ * How an online AGENT reaches the hub (mesh mTLS Release A): `tls` once it has
35967
+ * completed a mutual-TLS handshake, `clear` otherwise. Absent for the hub,
35968
+ * for offline rows and when the hub cannot tell.
35969
+ */
35970
+ meshTransport: _enum(["tls", "clear"]).optional()
35859
35971
  });
35860
35972
  var CapUsageEdgeSchema = object({
35861
35973
  callerAddonId: string(),
@@ -36195,6 +36307,7 @@ var OsdNamedTemplateSchema = object({
36195
36307
  });
36196
36308
  /** Where a slot's value comes from. */
36197
36309
  var OsdSourceSchema = discriminatedUnion("kind", [
36310
+ object({ kind: literal("none") }),
36198
36311
  object({
36199
36312
  kind: literal("static"),
36200
36313
  text: string().max(64)
@@ -36321,6 +36434,13 @@ method(object({ deviceId: number().int() }), object({
36321
36434
  }), object({ success: literal(true) }), {
36322
36435
  kind: "mutation",
36323
36436
  auth: "admin"
36437
+ }), method(object({
36438
+ deviceId: number().int(),
36439
+ slotId: string().min(1),
36440
+ enabled: boolean()
36441
+ }), object({ success: literal(true) }), {
36442
+ kind: "mutation",
36443
+ auth: "admin"
36324
36444
  }), method(object({
36325
36445
  sourceDeviceId: number().int(),
36326
36446
  targetDeviceId: number().int()
@@ -36701,7 +36821,15 @@ var GpuInfoSchema = object({
36701
36821
  name: string(),
36702
36822
  memoryMB: number().optional()
36703
36823
  });
36704
- var NpuInfoSchema = object({ type: _enum(["apple-ane", "intel-npu"]) });
36824
+ var NpuInfoSchema = object({
36825
+ type: _enum([
36826
+ "apple-ane",
36827
+ "intel-npu",
36828
+ "amd-xdna"
36829
+ ]),
36830
+ name: string().optional(),
36831
+ generation: _enum(["xdna1", "xdna2"]).optional()
36832
+ });
36705
36833
  var CoralInfoSchema = object({
36706
36834
  type: literal("coral-edgetpu"),
36707
36835
  bus: string().optional()
@@ -40488,9 +40616,11 @@ DeviceType.Camera, method(object({
40488
40616
  * once is what makes a second provider (RunPod, a local NVIDIA node) a new
40489
40617
  * manifest entry and nothing else.
40490
40618
  *
40491
- * Collection, routed by the `addonId` in every single-row input (the `llm` /
40492
- * `notification-output` posture); `describe` concat-fans across providers.
40493
- * Every method is `admin`: these spend money.
40619
+ * Collection of provider **types** (addons). Each addon owns zero or more
40620
+ * **entries** (credentials + defaults). Concat-fans: `describe`,
40621
+ * `describeTypes`, `listEntries`, `listJobs`. Single-row work is keyed by
40622
+ * `entryId`; callers also pass the owning `addonId` as the collection
40623
+ * selector (broker posture). Every method is `admin`: these spend money.
40494
40624
  *
40495
40625
  * Every cloud object a provider creates is tagged with the orchestrator's
40496
40626
  * `jobKey`, so a retried submit finds the job it already started instead of
@@ -40514,8 +40644,8 @@ var TrainingRegionOptionSchema = object({
40514
40644
  priceMultiplier: number().positive()
40515
40645
  });
40516
40646
  /**
40517
- * The provider's per-account settings, as the orchestrator reads them. They
40518
- * live in the PROVIDER addon's settings (operator decision 2026-10-08: they
40647
+ * The provider's per-entry settings, as the orchestrator reads them. They
40648
+ * live on the PROVIDER addon's entry (operator decision 2026-10-08: they
40519
40649
  * depend on the user's account), never hard-coded in the orchestrator.
40520
40650
  */
40521
40651
  var TrainingProviderDefaultsSchema = object({
@@ -40526,9 +40656,44 @@ var TrainingProviderDefaultsSchema = object({
40526
40656
  /** Hours a FAILED job's cloud dataset is kept for debugging; 0 = delete at once. */
40527
40657
  failedDatasetGraceHours: number().nonnegative()
40528
40658
  });
40659
+ /**
40660
+ * Entry form schema for a provider type — same seam as notification
40661
+ * `TargetKind.configSchema` (`z.unknown()` at the wire; callers tighten to
40662
+ * {@link ConfigUISchema}). Drives `ConfigFormBuilder` on Training → Providers.
40663
+ */
40664
+ var ConfigSchemaPassthrough = unknown();
40665
+ /** One creatable provider type, for the Add-entry dialog. */
40666
+ var TrainingProviderTypeSchema = object({
40667
+ typeId: string(),
40668
+ label: string(),
40669
+ /** Path under the addon package (e.g. `assets/training-modal/icon.svg`). */
40670
+ iconAsset: string(),
40671
+ /** Owning `training-provider` addon — collection selector for createEntry. */
40672
+ addonId: string(),
40673
+ /**
40674
+ * Fields for one entry of this type (credentials + defaults). Absent on a
40675
+ * type that only needs a name. Password fields are keychain-backed on the
40676
+ * provider addon (`secretStatePaths`), not D634 plaintext.
40677
+ */
40678
+ configSchema: ConfigSchemaPassthrough.optional()
40679
+ });
40680
+ /** One configured account / workspace under a provider type. */
40681
+ var TrainingProviderEntrySchema = object({
40682
+ entryId: string(),
40683
+ typeId: string(),
40684
+ name: string(),
40685
+ addonId: string(),
40686
+ /** Credentials are present — never the values. */
40687
+ configured: boolean()
40688
+ });
40529
40689
  var TrainingProviderDescriptorSchema = object({
40530
40690
  addonId: string(),
40531
- /** `modal`, `runpod`, `fake`, … */
40691
+ entryId: string(),
40692
+ typeId: string(),
40693
+ /** Operator-chosen entry name. */
40694
+ name: string(),
40695
+ iconAsset: string(),
40696
+ /** `modal`, `runpod`, `fake`, … — same as typeId for current providers. */
40532
40697
  kind: string(),
40533
40698
  label: string(),
40534
40699
  gpuTypes: array(TrainingGpuOptionSchema).readonly(),
@@ -40540,7 +40705,30 @@ var TrainingProviderDescriptorSchema = object({
40540
40705
  dataResidencyNote: string(),
40541
40706
  /** Credentials are present — never the values. */
40542
40707
  configured: boolean(),
40543
- defaults: TrainingProviderDefaultsSchema
40708
+ defaults: TrainingProviderDefaultsSchema,
40709
+ /**
40710
+ * Values for {@link TrainingProviderTypeSchema}'s `configSchema` — password
40711
+ * fields are keychain {@link SecretFieldView} or `null` / `''` (create),
40712
+ * never plaintext. Same hydrate contract as settings forms (D789).
40713
+ */
40714
+ formValues: record(string(), unknown()).optional()
40715
+ });
40716
+ /**
40717
+ * Patch one entry's name, credentials and defaults. Pin with owning `{ addonId }`.
40718
+ * An omitted or empty `tokenSecret` means KEEP the stored secret (D787).
40719
+ * `{ $secretClear: true }` clears it.
40720
+ */
40721
+ var TrainingProviderUpdateEntryInputSchema = object({
40722
+ entryId: string().min(1),
40723
+ name: string().min(1),
40724
+ tokenId: string().optional(),
40725
+ tokenSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
40726
+ environment: string().optional(),
40727
+ gpuType: string().optional(),
40728
+ region: string().optional(),
40729
+ costCapUsd: number().nonnegative().optional(),
40730
+ maxRuntimeSec: number().int().positive().optional(),
40731
+ failedDatasetGraceHours: number().nonnegative().optional()
40544
40732
  });
40545
40733
  var TrainingCredentialCheckSchema = object({
40546
40734
  ok: boolean(),
@@ -40592,20 +40780,33 @@ var TrainerSourceRefSchema = object({
40592
40780
  /** A commit sha (never a branch) — the job must be reproducible. */
40593
40781
  revision: string().regex(/^[0-9a-f]{7,64}$/)
40594
40782
  });
40783
+ /** Cloud job identity — route with the owning addon's `addonId` selector. */
40595
40784
  var JobRef = {
40596
- addonId: string(),
40785
+ entryId: string().min(1),
40597
40786
  jobKey: string().uuid()
40598
40787
  };
40599
40788
  var TrainingLogLineSchema = object({
40600
40789
  ts: number(),
40601
40790
  text: string()
40602
40791
  });
40603
- method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({ addonId: string() }), TrainingCredentialCheckSchema, {
40792
+ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderTypeSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderEntrySchema).readonly(), { auth: "admin" }), method(object({
40793
+ typeId: string().min(1),
40794
+ name: string().min(1)
40795
+ }), object({ entryId: string() }), {
40796
+ kind: "mutation",
40797
+ auth: "admin"
40798
+ }), method(object({ entryId: string().min(1) }), object({ ok: literal(true) }), {
40799
+ kind: "mutation",
40800
+ auth: "admin"
40801
+ }), method(TrainingProviderUpdateEntryInputSchema, object({ ok: literal(true) }), {
40802
+ kind: "mutation",
40803
+ auth: "admin"
40804
+ }), method(object({ entryId: string().min(1) }), TrainingCredentialCheckSchema, {
40604
40805
  kind: "mutation",
40605
40806
  auth: "admin",
40606
40807
  timeoutMs: 3e4
40607
40808
  }), method(object({
40608
- addonId: string(),
40809
+ entryId: string().min(1),
40609
40810
  gpuType: string(),
40610
40811
  region: string(),
40611
40812
  datasetBytes: number().int().nonnegative(),
@@ -40671,7 +40872,7 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
40671
40872
  kind: "mutation",
40672
40873
  auth: "admin",
40673
40874
  timeoutMs: 5 * 6e4
40674
- }), method(object({ addonId: string() }), array(ProviderJobStatusSchema).readonly(), {
40875
+ }), method(object({ entryId: string().min(1).optional() }), array(ProviderJobStatusSchema).readonly(), {
40675
40876
  auth: "admin",
40676
40877
  timeoutMs: 2 * 6e4
40677
40878
  });
@@ -40681,20 +40882,31 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
40681
40882
  *
40682
40883
  * It owns what every provider must agree on, written once:
40683
40884
  *
40684
- * - **Dataset versions.** Taken over from pipeline-analytics (D796): the rows
40685
- * live here (D808); pipeline-analytics still CUTS a version (it owns the corpus and
40686
- * the export plan) and reaches this store through the five row methods
40687
- * below, so the Retrain page and the export did not change.
40688
40885
  * - **Jobs.** A persisted state machine, a reconcile loop against the
40689
40886
  * provider, a cost guard, a daily orphan sweep and the retention rules.
40690
40887
  * - **The return flow.** Verified artefacts → Model Studio
40691
40888
  * (`custom-model-registry.importModelBundle`) → canary on cameras →
40692
40889
  * rollback. Nothing is ever registered automatically.
40693
40890
  *
40891
+ * Plan/start takes a live {@link TrainingCorpusSelection} (collections +
40892
+ * work-state rule); frame ids are resolved via pipeline-analytics at that
40893
+ * moment and snapshotted on the job. No frozen dataset version.
40894
+ *
40694
40895
  * Every method is `admin`.
40695
40896
  */
40696
- /** A version WITH its frame list — what the export and a job read. */
40697
- var TrainingDatasetVersionRowSchema = RetrainDatasetVersionSchema.omit({ frameCount: true }).extend({ frameIds: array(string()).max(2e4).readonly() });
40897
+ /**
40898
+ * Live corpus criteria for plan/start (design §5.2). Default is complete-only.
40899
+ * Frame ids are resolved at plan/start — never a frozen version id.
40900
+ */
40901
+ var TrainingCorpusSelectionSchema = object({
40902
+ collectionIds: array(string()).min(1),
40903
+ /** Default complete-only for v1 */
40904
+ workState: _enum([
40905
+ "complete",
40906
+ "annotated_or_complete",
40907
+ "any_annotated"
40908
+ ]).default("complete")
40909
+ });
40698
40910
  /** A base model a detector job can fine-tune, and the baseline it is judged against. */
40699
40911
  var TrainingBaseModelSchema = object({
40700
40912
  modelId: string(),
@@ -40712,9 +40924,13 @@ var TrainingPresetSchema = _enum([
40712
40924
  "thorough"
40713
40925
  ]);
40714
40926
  var TrainingJobRequestSchema = object({
40715
- datasetVersionId: string().min(1),
40716
- /** The `training-provider` addon that runs it. */
40717
- addonId: string().min(1),
40927
+ /** Live collection + work-state criteria; resolved at plan/start. */
40928
+ selection: TrainingCorpusSelectionSchema,
40929
+ /**
40930
+ * The provider **entry** that runs it (credentials + defaults).
40931
+ * Resolve to an owning addon via `training-provider.describe` / `listEntries`.
40932
+ */
40933
+ entryId: string().min(1),
40718
40934
  gpuType: string().min(1),
40719
40935
  region: string(),
40720
40936
  baseModelId: string().min(1),
@@ -40773,6 +40989,7 @@ var TrainingJobPlanSchema = object({
40773
40989
  * result lives after the operator acted on it.
40774
40990
  */
40775
40991
  var TrainingJobStateSchema = _enum([
40992
+ "queued",
40776
40993
  "uploading",
40777
40994
  "submitted",
40778
40995
  "starting",
@@ -40826,6 +41043,11 @@ var TrainingJobSchema = object({
40826
41043
  createdAt: number(),
40827
41044
  updatedAt: number(),
40828
41045
  state: TrainingJobStateSchema,
41046
+ /**
41047
+ * Shared by every job enqueued together via `startJobBatch`.
41048
+ * `null` for a lone `startJob`. The engine advances queued siblings by this id.
41049
+ */
41050
+ batchId: string().nullable().default(null),
40829
41051
  stage: TrainingStageSchema.nullable(),
40830
41052
  failure: object({
40831
41053
  reason: TrainingFailureReasonSchema,
@@ -40837,6 +41059,12 @@ var TrainingJobSchema = object({
40837
41059
  maxRuntimeSec: number().int().positive(),
40838
41060
  trainer: TrainerSourceRefSchema,
40839
41061
  datasetLayout: RetrainExportLayoutSchema,
41062
+ /** Frame count snapshotted when the job started (audit; equals `frameIds.length`). */
41063
+ frameCount: number().int().nonnegative(),
41064
+ /** Resolved frame ids at start — the archive ships exactly these. */
41065
+ frameIds: array(string()).max(2e4).readonly(),
41066
+ /** Hash of what those frames taught at start (trainer `dataset.annotationHash`). */
41067
+ annotationHash: string(),
40840
41068
  dataset: object({
40841
41069
  bytes: number().int(),
40842
41070
  sha256: string(),
@@ -40878,13 +41106,7 @@ var TrainingJobSchema = object({
40878
41106
  canary: TrainingCanarySchema.nullable()
40879
41107
  });
40880
41108
  var IdInput = object({ id: string().min(1) });
40881
- method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
40882
- kind: "mutation",
40883
- auth: "admin"
40884
- }), 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() }), {
40885
- kind: "mutation",
40886
- auth: "admin"
40887
- }), method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
41109
+ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
40888
41110
  auth: "admin",
40889
41111
  timeoutMs: 6e4
40890
41112
  }), method(TrainingJobRequestSchema.extend({
@@ -40903,6 +41125,24 @@ method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
40903
41125
  kind: "mutation",
40904
41126
  auth: "admin",
40905
41127
  timeoutMs: 12e4
41128
+ }), method(TrainingJobRequestSchema.omit({ baseModelId: true }).extend({
41129
+ baseModelIds: array(string().min(1)).min(1),
41130
+ name: string().min(1).max(120),
41131
+ maxCostUsd: number().positive(),
41132
+ maxRuntimeSec: number().int().positive(),
41133
+ idempotencyKey: string().min(8).max(80)
41134
+ }), discriminatedUnion("kind", [object({
41135
+ kind: literal("started"),
41136
+ batchId: string(),
41137
+ jobs: array(TrainingJobSchema).min(1).readonly()
41138
+ }), object({
41139
+ kind: literal("refused"),
41140
+ reason: TrainingRefusalReasonSchema,
41141
+ detail: string()
41142
+ })]), {
41143
+ kind: "mutation",
41144
+ auth: "admin",
41145
+ timeoutMs: 12e4
40906
41146
  }), method(object({}), array(TrainingJobSchema).readonly(), { auth: "admin" }), method(IdInput, TrainingJobSchema.nullable(), { auth: "admin" }), method(IdInput, TrainingJobSchema, {
40907
41147
  kind: "mutation",
40908
41148
  auth: "admin",
@@ -44936,6 +45176,36 @@ Object.freeze({
44936
45176
  addonId: null,
44937
45177
  access: "view"
44938
45178
  },
45179
+ "oidcConnections.connectionFormSchema": {
45180
+ capName: "oidc-connections",
45181
+ capScope: "system",
45182
+ addonId: null,
45183
+ access: "view"
45184
+ },
45185
+ "oidcConnections.createConnection": {
45186
+ capName: "oidc-connections",
45187
+ capScope: "system",
45188
+ addonId: null,
45189
+ access: "create"
45190
+ },
45191
+ "oidcConnections.deleteConnection": {
45192
+ capName: "oidc-connections",
45193
+ capScope: "system",
45194
+ addonId: null,
45195
+ access: "delete"
45196
+ },
45197
+ "oidcConnections.listConnections": {
45198
+ capName: "oidc-connections",
45199
+ capScope: "system",
45200
+ addonId: null,
45201
+ access: "view"
45202
+ },
45203
+ "oidcConnections.updateConnection": {
45204
+ capName: "oidc-connections",
45205
+ capScope: "system",
45206
+ addonId: null,
45207
+ access: "create"
45208
+ },
44939
45209
  "osd.getStatus": {
44940
45210
  capName: "osd",
44941
45211
  capScope: "device",
@@ -45008,6 +45278,12 @@ Object.freeze({
45008
45278
  addonId: null,
45009
45279
  access: "create"
45010
45280
  },
45281
+ "osdManager.setSlotCameraEnabled": {
45282
+ capName: "osd-manager",
45283
+ capScope: "system",
45284
+ addonId: null,
45285
+ access: "create"
45286
+ },
45011
45287
  "osdManager.upsertTemplate": {
45012
45288
  capName: "osd-manager",
45013
45289
  capScope: "system",
@@ -45146,12 +45422,6 @@ Object.freeze({
45146
45422
  addonId: null,
45147
45423
  access: "create"
45148
45424
  },
45149
- "pipelineAnalytics.createRetrainDatasetVersion": {
45150
- capName: "pipeline-analytics",
45151
- capScope: "device",
45152
- addonId: null,
45153
- access: "create"
45154
- },
45155
45425
  "pipelineAnalytics.deleteDeviceEvents": {
45156
45426
  capName: "pipeline-analytics",
45157
45427
  capScope: "device",
@@ -45164,12 +45434,6 @@ Object.freeze({
45164
45434
  addonId: null,
45165
45435
  access: "delete"
45166
45436
  },
45167
- "pipelineAnalytics.deleteRetrainDatasetVersion": {
45168
- capName: "pipeline-analytics",
45169
- capScope: "device",
45170
- addonId: null,
45171
- access: "delete"
45172
- },
45173
45437
  "pipelineAnalytics.deleteTracks": {
45174
45438
  capName: "pipeline-analytics",
45175
45439
  capScope: "device",
@@ -45272,6 +45536,12 @@ Object.freeze({
45272
45536
  addonId: null,
45273
45537
  access: "view"
45274
45538
  },
45539
+ "pipelineAnalytics.getRetrainCorpusKpi": {
45540
+ capName: "pipeline-analytics",
45541
+ capScope: "device",
45542
+ addonId: null,
45543
+ access: "view"
45544
+ },
45275
45545
  "pipelineAnalytics.getRetrainExportUrl": {
45276
45546
  capName: "pipeline-analytics",
45277
45547
  capScope: "device",
@@ -45392,7 +45662,7 @@ Object.freeze({
45392
45662
  addonId: null,
45393
45663
  access: "view"
45394
45664
  },
45395
- "pipelineAnalytics.listRetrainDatasetVersions": {
45665
+ "pipelineAnalytics.listRetrainCorpusPage": {
45396
45666
  capName: "pipeline-analytics",
45397
45667
  capScope: "device",
45398
45668
  addonId: null,
@@ -45446,12 +45716,6 @@ Object.freeze({
45446
45716
  addonId: null,
45447
45717
  access: "create"
45448
45718
  },
45449
- "pipelineAnalytics.previewRetrainDataset": {
45450
- capName: "pipeline-analytics",
45451
- capScope: "device",
45452
- addonId: null,
45453
- access: "view"
45454
- },
45455
45719
  "pipelineAnalytics.proposeRetrainAnnotations": {
45456
45720
  capName: "pipeline-analytics",
45457
45721
  capScope: "device",
@@ -45530,6 +45794,12 @@ Object.freeze({
45530
45794
  addonId: null,
45531
45795
  access: "create"
45532
45796
  },
45797
+ "pipelineAnalytics.resolveRetrainTrainingCorpus": {
45798
+ capName: "pipeline-analytics",
45799
+ capScope: "device",
45800
+ addonId: null,
45801
+ access: "view"
45802
+ },
45533
45803
  "pipelineAnalytics.restageRetrainTrack": {
45534
45804
  capName: "pipeline-analytics",
45535
45805
  capScope: "device",
@@ -45590,12 +45860,6 @@ Object.freeze({
45590
45860
  addonId: null,
45591
45861
  access: "create"
45592
45862
  },
45593
- "pipelineAnalytics.verifyRetrainDatasetVersion": {
45594
- capName: "pipeline-analytics",
45595
- capScope: "device",
45596
- addonId: null,
45597
- access: "view"
45598
- },
45599
45863
  "pipelineAnalytics.wipeAllAnalytics": {
45600
45864
  capName: "pipeline-analytics",
45601
45865
  capScope: "device",
@@ -47990,18 +48254,6 @@ Object.freeze({
47990
48254
  addonId: null,
47991
48255
  access: "create"
47992
48256
  },
47993
- "training.findDatasetVersionIdByName": {
47994
- capName: "training",
47995
- capScope: "system",
47996
- addonId: null,
47997
- access: "view"
47998
- },
47999
- "training.getDatasetVersion": {
48000
- capName: "training",
48001
- capScope: "system",
48002
- addonId: null,
48003
- access: "view"
48004
- },
48005
48257
  "training.getJob": {
48006
48258
  capName: "training",
48007
48259
  capScope: "system",
@@ -48020,12 +48272,6 @@ Object.freeze({
48020
48272
  addonId: null,
48021
48273
  access: "view"
48022
48274
  },
48023
- "training.listDatasetVersions": {
48024
- capName: "training",
48025
- capScope: "system",
48026
- addonId: null,
48027
- access: "view"
48028
- },
48029
48275
  "training.listJobs": {
48030
48276
  capName: "training",
48031
48277
  capScope: "system",
@@ -48038,54 +48284,66 @@ Object.freeze({
48038
48284
  addonId: null,
48039
48285
  access: "view"
48040
48286
  },
48041
- "training.putDatasetVersion": {
48287
+ "training.registerResult": {
48042
48288
  capName: "training",
48043
48289
  capScope: "system",
48044
48290
  addonId: null,
48045
48291
  access: "create"
48046
48292
  },
48047
- "training.registerResult": {
48293
+ "training.rollbackCanary": {
48048
48294
  capName: "training",
48049
48295
  capScope: "system",
48050
48296
  addonId: null,
48051
48297
  access: "create"
48052
48298
  },
48053
- "training.removeDatasetVersion": {
48299
+ "training.startJob": {
48054
48300
  capName: "training",
48055
48301
  capScope: "system",
48056
48302
  addonId: null,
48057
- access: "delete"
48303
+ access: "create"
48058
48304
  },
48059
- "training.rollbackCanary": {
48305
+ "training.startJobBatch": {
48060
48306
  capName: "training",
48061
48307
  capScope: "system",
48062
48308
  addonId: null,
48063
48309
  access: "create"
48064
48310
  },
48065
- "training.startJob": {
48066
- capName: "training",
48311
+ "trainingProvider.cancelJob": {
48312
+ capName: "training-provider",
48067
48313
  capScope: "system",
48068
48314
  addonId: null,
48069
48315
  access: "create"
48070
48316
  },
48071
- "trainingProvider.cancelJob": {
48317
+ "trainingProvider.cleanupJob": {
48072
48318
  capName: "training-provider",
48073
48319
  capScope: "system",
48074
48320
  addonId: null,
48075
48321
  access: "create"
48076
48322
  },
48077
- "trainingProvider.cleanupJob": {
48323
+ "trainingProvider.createEntry": {
48078
48324
  capName: "training-provider",
48079
48325
  capScope: "system",
48080
48326
  addonId: null,
48081
48327
  access: "create"
48082
48328
  },
48329
+ "trainingProvider.deleteEntry": {
48330
+ capName: "training-provider",
48331
+ capScope: "system",
48332
+ addonId: null,
48333
+ access: "delete"
48334
+ },
48083
48335
  "trainingProvider.describe": {
48084
48336
  capName: "training-provider",
48085
48337
  capScope: "system",
48086
48338
  addonId: null,
48087
48339
  access: "view"
48088
48340
  },
48341
+ "trainingProvider.describeTypes": {
48342
+ capName: "training-provider",
48343
+ capScope: "system",
48344
+ addonId: null,
48345
+ access: "view"
48346
+ },
48089
48347
  "trainingProvider.estimateJob": {
48090
48348
  capName: "training-provider",
48091
48349
  capScope: "system",
@@ -48098,6 +48356,12 @@ Object.freeze({
48098
48356
  addonId: null,
48099
48357
  access: "view"
48100
48358
  },
48359
+ "trainingProvider.listEntries": {
48360
+ capName: "training-provider",
48361
+ capScope: "system",
48362
+ addonId: null,
48363
+ access: "view"
48364
+ },
48101
48365
  "trainingProvider.listJobEvents": {
48102
48366
  capName: "training-provider",
48103
48367
  capScope: "system",
@@ -48128,6 +48392,12 @@ Object.freeze({
48128
48392
  addonId: null,
48129
48393
  access: "create"
48130
48394
  },
48395
+ "trainingProvider.updateEntry": {
48396
+ capName: "training-provider",
48397
+ capScope: "system",
48398
+ addonId: null,
48399
+ access: "create"
48400
+ },
48131
48401
  "trainingProvider.uploadDataset": {
48132
48402
  capName: "training-provider",
48133
48403
  capScope: "system",
@@ -51334,6 +51604,11 @@ Object.freeze({
51334
51604
  form: "single",
51335
51605
  optional: false
51336
51606
  }],
51607
+ "osdManager.setSlotCameraEnabled": [{
51608
+ name: "deviceId",
51609
+ form: "single",
51610
+ optional: false
51611
+ }],
51337
51612
  "petFeeder.callPet": [{
51338
51613
  name: "deviceId",
51339
51614
  form: "single",
@@ -51554,6 +51829,11 @@ Object.freeze({
51554
51829
  form: "array",
51555
51830
  optional: false
51556
51831
  }],
51832
+ "pipelineAnalytics.listRetrainCorpusPage": [{
51833
+ name: "deviceIds",
51834
+ form: "array",
51835
+ optional: true
51836
+ }],
51557
51837
  "pipelineAnalytics.listRetrainStaging": [{
51558
51838
  name: "deviceIds",
51559
51839
  form: "array",
@@ -52663,6 +52943,7 @@ Object.freeze({
52663
52943
  });
52664
52944
  Object.freeze({
52665
52945
  "broker": "broker",
52946
+ "calendar-source": "calendar",
52666
52947
  "device-export": "device-export",
52667
52948
  "llm": "ai",
52668
52949
  "mesh-network": "mesh",
@@ -53148,6 +53429,8 @@ var STATE_SUMMARY_VARS = [
53148
53429
  [...RULE_TEXT],
53149
53430
  [...RULE_TEXT],
53150
53431
  [...RULE_TEXT],
53432
+ [...RULE_TEXT],
53433
+ [...RULE_TEXT],
53151
53434
  ([...RULE_TEXT], [...UPDATES]),
53152
53435
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),
53153
53436
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),