@camstack/addon-auth 1.2.136 → 1.2.137

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.
@@ -5410,7 +5410,7 @@ var ZodIssueCode = {
5410
5410
  var ZodFirstPartyTypeKind;
5411
5411
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5412
5412
  //#endregion
5413
- //#region ../types/dist/sleep-r3RWkGVx.mjs
5413
+ //#region ../types/dist/sleep-DwAQ9sqX.mjs
5414
5414
  /**
5415
5415
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5416
5416
  * window to float samples (D455).
@@ -9349,6 +9349,16 @@ var CompositionSchema = object({
9349
9349
  seen.add(feature.cap);
9350
9350
  });
9351
9351
  });
9352
+ var NodeColorIdSchema = _enum([
9353
+ "node-a",
9354
+ "node-b",
9355
+ "node-c",
9356
+ "node-d",
9357
+ "node-e",
9358
+ "node-f",
9359
+ "node-g",
9360
+ "node-h"
9361
+ ]);
9352
9362
  new Set([
9353
9363
  "track",
9354
9364
  "face",
@@ -18270,14 +18280,14 @@ var LlmProfileSchema = object({
18270
18280
  /** ConfigUISchema tree passed through untyped on the wire (the
18271
18281
  * notification-output `ConfigSchemaPassthrough` precedent at
18272
18282
  * notification-output.cap.ts:151); the exported TS type re-tightens it. */
18273
- var ConfigSchemaPassthrough$1 = unknown();
18283
+ var ConfigSchemaPassthrough$2 = unknown();
18274
18284
  var LlmProfileKindDescriptorSchema = object({
18275
18285
  kind: LlmProfileKindSchema,
18276
18286
  label: string(),
18277
18287
  icon: string(),
18278
18288
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
18279
18289
  addonId: string(),
18280
- configSchema: ConfigSchemaPassthrough$1
18290
+ configSchema: ConfigSchemaPassthrough$2
18281
18291
  });
18282
18292
  var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
18283
18293
  var LlmDefaultSchema = object({
@@ -19406,7 +19416,7 @@ var TargetKindCapsSchema = object({
19406
19416
  * the union is large and not meant for runtime validation here; the exported
19407
19417
  * `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
19408
19418
  */
19409
- var ConfigSchemaPassthrough = unknown();
19419
+ var ConfigSchemaPassthrough$1 = unknown();
19410
19420
  var TargetKindSchema = object({
19411
19421
  kind: string(),
19412
19422
  label: string(),
@@ -19443,7 +19453,7 @@ var TargetKindSchema = object({
19443
19453
  * its raster path, which is the safe default for an unknown image.
19444
19454
  */
19445
19455
  iconMediaType: string().optional(),
19446
- configSchema: ConfigSchemaPassthrough,
19456
+ configSchema: ConfigSchemaPassthrough$1,
19447
19457
  /**
19448
19458
  * The config keys that decide WHERE this kind's secrets are sent (server,
19449
19459
  * base URL, instance, chat, recipient). A save that changes any of them
@@ -24098,24 +24108,69 @@ var RetrainFrameListSchema = object({
24098
24108
  /** What the page pre-selects — the native key frame when one survives. */
24099
24109
  autoPickMediaId: number().int().optional()
24100
24110
  });
24111
+ /** Exclusive partition of a corpus copy's annotation progress (design §4.2). */
24112
+ var RetrainFrameWorkStateSchema = _enum([
24113
+ "unannotated",
24114
+ "annotated",
24115
+ "complete"
24116
+ ]);
24117
+ /**
24118
+ * Filters for paginated corpus list, KPI, and matching export (design §4.4).
24119
+ * Every narrowing field is ANDed; omitted fields impose no constraint.
24120
+ */
24121
+ var RetrainCorpusFilterSchema = object({
24122
+ workState: RetrainFrameWorkStateSchema.optional(),
24123
+ deviceIds: array(number()).max(500).optional(),
24124
+ /** When set, only frames in this named collection. */
24125
+ collectionId: string().optional(),
24126
+ /** Frames that carry at least one saved annotation in one of these classes. */
24127
+ classes: array(RetrainMacroClassSchema).optional(),
24128
+ page: number().int().positive().default(1),
24129
+ pageSize: number().int().positive().max(100).default(50)
24130
+ });
24131
+ var RetrainCorpusPageSchema = object({
24132
+ frames: array(RetrainFrameSchema.extend({ workState: RetrainFrameWorkStateSchema })).readonly(),
24133
+ total: number().int().nonnegative(),
24134
+ page: number().int().positive(),
24135
+ pageSize: number().int().positive()
24136
+ });
24137
+ var RetrainCorpusKpiCameraRowSchema = object({
24138
+ deviceId: number(),
24139
+ unannotated: number().int().nonnegative(),
24140
+ annotated: number().int().nonnegative(),
24141
+ complete: number().int().nonnegative(),
24142
+ /** This camera's `complete` count divided by corpus `total`, in `[0,1]`.
24143
+ * `null` when the corpus is empty (no ratio). */
24144
+ pctOfCorpus: number().min(0).max(1).nullable()
24145
+ });
24146
+ var RetrainCorpusKpiSchema = object({
24147
+ total: number().int().nonnegative(),
24148
+ unannotated: number().int().nonnegative(),
24149
+ annotated: number().int().nonnegative(),
24150
+ complete: number().int().nonnegative(),
24151
+ cameras: array(RetrainCorpusKpiCameraRowSchema).readonly()
24152
+ });
24101
24153
  /**
24102
24154
  * Which frames an annotated export carries. Every field narrows; an empty
24103
- * filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
24104
- * list owned by whoever trains (the training orchestrator), so `frameIds` is
24105
- * the primitive a version export uses; `batchId` re-selects what an earlier
24106
- * export carried (`exportedInBatch`).
24155
+ * filter is every annotated copy. `frameIds` is the primitive a job or
24156
+ * download uses; `batchId` re-selects what an earlier export carried
24157
+ * (`exportedInBatch`). Frozen dataset versions were removed — live selection
24158
+ * resolves to `frameIds` at plan/start.
24107
24159
  */
24108
24160
  var RetrainExportFilterSchema = object({
24109
24161
  deviceIds: array(number()).optional(),
24110
24162
  frameIds: array(string()).max(2e4).optional(),
24111
24163
  /** Only frames in at least one of these named collections. */
24112
24164
  collectionIds: array(string()).max(200).optional(),
24113
- /** Exactly the frames of this dataset version (and its completeOnly). An
24114
- * unknown id selects nothing. */
24115
- datasetVersionId: string().optional(),
24165
+ /** Single collection (Frames filter bar). ANDed with `collectionIds` when both set. */
24166
+ collectionId: string().optional(),
24116
24167
  batchId: string().optional(),
24117
24168
  /** Only frames the operator marked complete (all subjects boxed). */
24118
- completeOnly: boolean().optional()
24169
+ completeOnly: boolean().optional(),
24170
+ /** Exclusive work-state partition (`workStateOf`); same as the corpus list. */
24171
+ workState: RetrainFrameWorkStateSchema.optional(),
24172
+ /** Frames with at least one saved annotation in one of these classes. */
24173
+ classes: array(RetrainMacroClassSchema).optional()
24119
24174
  });
24120
24175
  /**
24121
24176
  * `frames`: the full frame copies, boxes in `annotations.json`.
@@ -24315,8 +24370,7 @@ var RetrainDatasetStatsSchema = object({
24315
24370
  completeFrames: number().int()
24316
24371
  })).readonly()
24317
24372
  });
24318
- /** An immutable dataset version, without its frame list. */
24319
- var RetrainDatasetVersionSchema = object({
24373
+ object({
24320
24374
  id: string(),
24321
24375
  name: string(),
24322
24376
  createdAt: number(),
@@ -24324,22 +24378,33 @@ var RetrainDatasetVersionSchema = object({
24324
24378
  layout: RetrainExportLayoutSchema,
24325
24379
  completeOnly: boolean(),
24326
24380
  frameCount: number().int(),
24327
- /** sha256 of what the frames taught when the version was frozen. */
24328
24381
  annotationHash: string(),
24329
- /** The export manifest schema the version was cut under. */
24330
24382
  manifestSchema: string(),
24331
24383
  stats: RetrainDatasetStatsSchema
24332
24384
  });
24333
- var CreateRetrainDatasetVersionResultSchema = discriminatedUnion("kind", [object({
24334
- kind: literal("created"),
24335
- version: RetrainDatasetVersionSchema
24385
+ /**
24386
+ * Live training corpus criteria — same shape as `TrainingCorpusSelection` on
24387
+ * the training cap. Resolved here so plan/start and the annotated export share
24388
+ * one definition of "the frames" (`buildRetrainExportPlan`).
24389
+ */
24390
+ var RetrainTrainingCorpusSelectionSchema = object({
24391
+ collectionIds: array(string()).min(1),
24392
+ workState: _enum([
24393
+ "complete",
24394
+ "annotated_or_complete",
24395
+ "any_annotated"
24396
+ ]).default("complete")
24397
+ });
24398
+ var RetrainTrainingCorpusResolveResultSchema = discriminatedUnion("kind", [object({
24399
+ kind: literal("resolved"),
24400
+ frameIds: array(string()).max(2e4).readonly(),
24401
+ stats: RetrainDatasetStatsSchema,
24402
+ annotationHash: string(),
24403
+ layout: RetrainExportLayoutSchema
24336
24404
  }), object({
24337
24405
  kind: literal("refused"),
24338
- reason: _enum([
24339
- "empty-name",
24340
- "duplicate-name",
24341
- "no-frames"
24342
- ])
24406
+ reason: _enum(["unknown-collection", "no-frames"]),
24407
+ detail: string()
24343
24408
  })]);
24344
24409
  /** The outcome of a lifecycle move owned by the retrain page. */
24345
24410
  var RetrainTransitionResultSchema = object({
@@ -25046,6 +25111,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25046
25111
  }), array(RetrainTrackSchema).readonly(), {
25047
25112
  kind: "query",
25048
25113
  auth: "admin"
25114
+ }), method(RetrainCorpusFilterSchema, RetrainCorpusPageSchema, {
25115
+ kind: "query",
25116
+ auth: "admin"
25117
+ }), method(object({}), RetrainCorpusKpiSchema, {
25118
+ kind: "query",
25119
+ auth: "admin"
25049
25120
  }), method(object({ trackId: string() }), RetrainFrameListSchema, {
25050
25121
  kind: "query",
25051
25122
  auth: "admin"
@@ -25141,36 +25212,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25141
25212
  kind: "mutation",
25142
25213
  auth: "admin",
25143
25214
  timeoutMs: 12e4
25144
- }), method(object({
25145
- selection: RetrainDatasetSelectionSchema,
25146
- completeOnly: boolean().optional()
25147
- }), RetrainDatasetStatsSchema, {
25148
- kind: "query",
25149
- auth: "admin"
25150
- }), method(object({
25151
- name: string().max(120),
25152
- selection: RetrainDatasetSelectionSchema,
25153
- layout: RetrainExportLayoutSchema,
25154
- completeOnly: boolean()
25155
- }), CreateRetrainDatasetVersionResultSchema, {
25156
- kind: "mutation",
25157
- auth: "admin",
25158
- timeoutMs: 12e4
25159
- }), method(object({}), array(RetrainDatasetVersionSchema).readonly(), {
25160
- kind: "query",
25161
- auth: "admin"
25162
- }), method(object({ id: string() }), object({ deleted: boolean() }), {
25163
- kind: "mutation",
25164
- auth: "admin"
25165
- }), method(object({ id: string() }), object({
25166
- found: boolean(),
25167
- annotationHash: string(),
25168
- matches: boolean(),
25169
- missingFrames: number().int()
25170
- }), {
25171
- kind: "query",
25172
- auth: "admin",
25173
- timeoutMs: 12e4
25174
25215
  }), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
25175
25216
  kind: "query",
25176
25217
  auth: "admin"
@@ -25197,6 +25238,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25197
25238
  }), method(object({}), array(RetrainCollectionSchema).readonly(), {
25198
25239
  kind: "query",
25199
25240
  auth: "admin"
25241
+ }), method(RetrainTrainingCorpusSelectionSchema, RetrainTrainingCorpusResolveResultSchema, {
25242
+ kind: "query",
25243
+ auth: "admin",
25244
+ timeoutMs: 6e4
25200
25245
  }), method(object({
25201
25246
  id: string(),
25202
25247
  name: string().max(120)
@@ -25813,11 +25858,14 @@ var HardwareClassIdSchema = _enum([
25813
25858
  "intel-n-series",
25814
25859
  "apple-m-base",
25815
25860
  "apple-m-pro",
25861
+ "amd-phoenix",
25816
25862
  "unknown"
25817
25863
  ]);
25818
25864
  var AcceleratorKindSchema = _enum([
25819
25865
  "intel-npu",
25820
25866
  "intel-igpu",
25867
+ "amd-igpu",
25868
+ "amd-npu",
25821
25869
  "x86-cpu",
25822
25870
  "arm-cpu",
25823
25871
  "apple-ane",
@@ -27707,6 +27755,8 @@ var AgentPipelineSettingsSchema = object({
27707
27755
  * address is wrong (multi-homed host, NAT, custom interface).
27708
27756
  */
27709
27757
  reachableHost: string().optional(),
27758
+ /** Hub-persisted UI colour (`--color-node-*` theme tokens). */
27759
+ color: NodeColorIdSchema.optional(),
27710
27760
  /**
27711
27761
  * Multi-device inference opt-in (Phase 4). Per-node map deviceKey → {enabled,
27712
27762
  * weight, steps}. Absent / all-disabled ⇒ the node's single default
@@ -28256,8 +28306,9 @@ method(object({
28256
28306
  auth: "admin"
28257
28307
  }), method(object({
28258
28308
  agentNodeId: string(),
28259
- reachableHost: string().nullable()
28260
- }), object({ success: literal(true) }), {
28309
+ reachableHost: string().nullable().optional(),
28310
+ color: NodeColorIdSchema.nullable().optional()
28311
+ }).refine((v) => v.reachableHost !== void 0 || v.color !== void 0, { message: "reachableHost or color required" }), object({ success: literal(true) }), {
28261
28312
  kind: "mutation",
28262
28313
  auth: "admin"
28263
28314
  }), method(object({
@@ -31339,7 +31390,7 @@ var CustomActionInputSchema = object({
31339
31390
  action: string().min(1),
31340
31391
  input: unknown()
31341
31392
  });
31342
- method(_void(), array(AddonListItemSchema).readonly()), method(object({
31393
+ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSchema).readonly()), method(object({
31343
31394
  addonId: string(),
31344
31395
  limit: number().min(1).max(500).default(100),
31345
31396
  level: LogLevelSchema$2.optional()
@@ -35232,6 +35283,7 @@ var OsdNamedTemplateSchema = object({
35232
35283
  });
35233
35284
  /** Where a slot's value comes from. */
35234
35285
  var OsdSourceSchema = discriminatedUnion("kind", [
35286
+ object({ kind: literal("none") }),
35235
35287
  object({
35236
35288
  kind: literal("static"),
35237
35289
  text: string().max(64)
@@ -35358,6 +35410,13 @@ method(object({ deviceId: number().int() }), object({
35358
35410
  }), object({ success: literal(true) }), {
35359
35411
  kind: "mutation",
35360
35412
  auth: "admin"
35413
+ }), method(object({
35414
+ deviceId: number().int(),
35415
+ slotId: string().min(1),
35416
+ enabled: boolean()
35417
+ }), object({ success: literal(true) }), {
35418
+ kind: "mutation",
35419
+ auth: "admin"
35361
35420
  }), method(object({
35362
35421
  sourceDeviceId: number().int(),
35363
35422
  targetDeviceId: number().int()
@@ -35738,7 +35797,15 @@ var GpuInfoSchema = object({
35738
35797
  name: string(),
35739
35798
  memoryMB: number().optional()
35740
35799
  });
35741
- var NpuInfoSchema = object({ type: _enum(["apple-ane", "intel-npu"]) });
35800
+ var NpuInfoSchema = object({
35801
+ type: _enum([
35802
+ "apple-ane",
35803
+ "intel-npu",
35804
+ "amd-xdna"
35805
+ ]),
35806
+ name: string().optional(),
35807
+ generation: _enum(["xdna1", "xdna2"]).optional()
35808
+ });
35742
35809
  var CoralInfoSchema = object({
35743
35810
  type: literal("coral-edgetpu"),
35744
35811
  bus: string().optional()
@@ -39500,9 +39567,11 @@ DeviceType.Camera, method(object({
39500
39567
  * once is what makes a second provider (RunPod, a local NVIDIA node) a new
39501
39568
  * manifest entry and nothing else.
39502
39569
  *
39503
- * Collection, routed by the `addonId` in every single-row input (the `llm` /
39504
- * `notification-output` posture); `describe` concat-fans across providers.
39505
- * Every method is `admin`: these spend money.
39570
+ * Collection of provider **types** (addons). Each addon owns zero or more
39571
+ * **entries** (credentials + defaults). Concat-fans: `describe`,
39572
+ * `describeTypes`, `listEntries`, `listJobs`. Single-row work is keyed by
39573
+ * `entryId`; callers also pass the owning `addonId` as the collection
39574
+ * selector (broker posture). Every method is `admin`: these spend money.
39506
39575
  *
39507
39576
  * Every cloud object a provider creates is tagged with the orchestrator's
39508
39577
  * `jobKey`, so a retried submit finds the job it already started instead of
@@ -39526,8 +39595,8 @@ var TrainingRegionOptionSchema = object({
39526
39595
  priceMultiplier: number().positive()
39527
39596
  });
39528
39597
  /**
39529
- * The provider's per-account settings, as the orchestrator reads them. They
39530
- * live in the PROVIDER addon's settings (operator decision 2026-10-08: they
39598
+ * The provider's per-entry settings, as the orchestrator reads them. They
39599
+ * live on the PROVIDER addon's entry (operator decision 2026-10-08: they
39531
39600
  * depend on the user's account), never hard-coded in the orchestrator.
39532
39601
  */
39533
39602
  var TrainingProviderDefaultsSchema = object({
@@ -39538,9 +39607,44 @@ var TrainingProviderDefaultsSchema = object({
39538
39607
  /** Hours a FAILED job's cloud dataset is kept for debugging; 0 = delete at once. */
39539
39608
  failedDatasetGraceHours: number().nonnegative()
39540
39609
  });
39610
+ /**
39611
+ * Entry form schema for a provider type — same seam as notification
39612
+ * `TargetKind.configSchema` (`z.unknown()` at the wire; callers tighten to
39613
+ * {@link ConfigUISchema}). Drives `ConfigFormBuilder` on Training → Providers.
39614
+ */
39615
+ var ConfigSchemaPassthrough = unknown();
39616
+ /** One creatable provider type, for the Add-entry dialog. */
39617
+ var TrainingProviderTypeSchema = object({
39618
+ typeId: string(),
39619
+ label: string(),
39620
+ /** Path under the addon package (e.g. `assets/training-modal/icon.svg`). */
39621
+ iconAsset: string(),
39622
+ /** Owning `training-provider` addon — collection selector for createEntry. */
39623
+ addonId: string(),
39624
+ /**
39625
+ * Fields for one entry of this type (credentials + defaults). Absent on a
39626
+ * type that only needs a name. Password fields are keychain-backed on the
39627
+ * provider addon (`secretStatePaths`), not D634 plaintext.
39628
+ */
39629
+ configSchema: ConfigSchemaPassthrough.optional()
39630
+ });
39631
+ /** One configured account / workspace under a provider type. */
39632
+ var TrainingProviderEntrySchema = object({
39633
+ entryId: string(),
39634
+ typeId: string(),
39635
+ name: string(),
39636
+ addonId: string(),
39637
+ /** Credentials are present — never the values. */
39638
+ configured: boolean()
39639
+ });
39541
39640
  var TrainingProviderDescriptorSchema = object({
39542
39641
  addonId: string(),
39543
- /** `modal`, `runpod`, `fake`, … */
39642
+ entryId: string(),
39643
+ typeId: string(),
39644
+ /** Operator-chosen entry name. */
39645
+ name: string(),
39646
+ iconAsset: string(),
39647
+ /** `modal`, `runpod`, `fake`, … — same as typeId for current providers. */
39544
39648
  kind: string(),
39545
39649
  label: string(),
39546
39650
  gpuTypes: array(TrainingGpuOptionSchema).readonly(),
@@ -39552,7 +39656,30 @@ var TrainingProviderDescriptorSchema = object({
39552
39656
  dataResidencyNote: string(),
39553
39657
  /** Credentials are present — never the values. */
39554
39658
  configured: boolean(),
39555
- defaults: TrainingProviderDefaultsSchema
39659
+ defaults: TrainingProviderDefaultsSchema,
39660
+ /**
39661
+ * Values for {@link TrainingProviderTypeSchema}'s `configSchema` — password
39662
+ * fields are keychain {@link SecretFieldView} or `null` / `''` (create),
39663
+ * never plaintext. Same hydrate contract as settings forms (D789).
39664
+ */
39665
+ formValues: record(string(), unknown()).optional()
39666
+ });
39667
+ /**
39668
+ * Patch one entry's name, credentials and defaults. Pin with owning `{ addonId }`.
39669
+ * An omitted or empty `tokenSecret` means KEEP the stored secret (D787).
39670
+ * `{ $secretClear: true }` clears it.
39671
+ */
39672
+ var TrainingProviderUpdateEntryInputSchema = object({
39673
+ entryId: string().min(1),
39674
+ name: string().min(1),
39675
+ tokenId: string().optional(),
39676
+ tokenSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
39677
+ environment: string().optional(),
39678
+ gpuType: string().optional(),
39679
+ region: string().optional(),
39680
+ costCapUsd: number().nonnegative().optional(),
39681
+ maxRuntimeSec: number().int().positive().optional(),
39682
+ failedDatasetGraceHours: number().nonnegative().optional()
39556
39683
  });
39557
39684
  var TrainingCredentialCheckSchema = object({
39558
39685
  ok: boolean(),
@@ -39604,20 +39731,33 @@ var TrainerSourceRefSchema = object({
39604
39731
  /** A commit sha (never a branch) — the job must be reproducible. */
39605
39732
  revision: string().regex(/^[0-9a-f]{7,64}$/)
39606
39733
  });
39734
+ /** Cloud job identity — route with the owning addon's `addonId` selector. */
39607
39735
  var JobRef = {
39608
- addonId: string(),
39736
+ entryId: string().min(1),
39609
39737
  jobKey: string().uuid()
39610
39738
  };
39611
39739
  var TrainingLogLineSchema = object({
39612
39740
  ts: number(),
39613
39741
  text: string()
39614
39742
  });
39615
- method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({ addonId: string() }), TrainingCredentialCheckSchema, {
39743
+ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderTypeSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderEntrySchema).readonly(), { auth: "admin" }), method(object({
39744
+ typeId: string().min(1),
39745
+ name: string().min(1)
39746
+ }), object({ entryId: string() }), {
39747
+ kind: "mutation",
39748
+ auth: "admin"
39749
+ }), method(object({ entryId: string().min(1) }), object({ ok: literal(true) }), {
39750
+ kind: "mutation",
39751
+ auth: "admin"
39752
+ }), method(TrainingProviderUpdateEntryInputSchema, object({ ok: literal(true) }), {
39753
+ kind: "mutation",
39754
+ auth: "admin"
39755
+ }), method(object({ entryId: string().min(1) }), TrainingCredentialCheckSchema, {
39616
39756
  kind: "mutation",
39617
39757
  auth: "admin",
39618
39758
  timeoutMs: 3e4
39619
39759
  }), method(object({
39620
- addonId: string(),
39760
+ entryId: string().min(1),
39621
39761
  gpuType: string(),
39622
39762
  region: string(),
39623
39763
  datasetBytes: number().int().nonnegative(),
@@ -39683,7 +39823,7 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
39683
39823
  kind: "mutation",
39684
39824
  auth: "admin",
39685
39825
  timeoutMs: 5 * 6e4
39686
- }), method(object({ addonId: string() }), array(ProviderJobStatusSchema).readonly(), {
39826
+ }), method(object({ entryId: string().min(1).optional() }), array(ProviderJobStatusSchema).readonly(), {
39687
39827
  auth: "admin",
39688
39828
  timeoutMs: 2 * 6e4
39689
39829
  });
@@ -39693,20 +39833,31 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
39693
39833
  *
39694
39834
  * It owns what every provider must agree on, written once:
39695
39835
  *
39696
- * - **Dataset versions.** Taken over from pipeline-analytics (D796): the rows
39697
- * live here (D808); pipeline-analytics still CUTS a version (it owns the corpus and
39698
- * the export plan) and reaches this store through the five row methods
39699
- * below, so the Retrain page and the export did not change.
39700
39836
  * - **Jobs.** A persisted state machine, a reconcile loop against the
39701
39837
  * provider, a cost guard, a daily orphan sweep and the retention rules.
39702
39838
  * - **The return flow.** Verified artefacts → Model Studio
39703
39839
  * (`custom-model-registry.importModelBundle`) → canary on cameras →
39704
39840
  * rollback. Nothing is ever registered automatically.
39705
39841
  *
39842
+ * Plan/start takes a live {@link TrainingCorpusSelection} (collections +
39843
+ * work-state rule); frame ids are resolved via pipeline-analytics at that
39844
+ * moment and snapshotted on the job. No frozen dataset version.
39845
+ *
39706
39846
  * Every method is `admin`.
39707
39847
  */
39708
- /** A version WITH its frame list — what the export and a job read. */
39709
- var TrainingDatasetVersionRowSchema = RetrainDatasetVersionSchema.omit({ frameCount: true }).extend({ frameIds: array(string()).max(2e4).readonly() });
39848
+ /**
39849
+ * Live corpus criteria for plan/start (design §5.2). Default is complete-only.
39850
+ * Frame ids are resolved at plan/start — never a frozen version id.
39851
+ */
39852
+ var TrainingCorpusSelectionSchema = object({
39853
+ collectionIds: array(string()).min(1),
39854
+ /** Default complete-only for v1 */
39855
+ workState: _enum([
39856
+ "complete",
39857
+ "annotated_or_complete",
39858
+ "any_annotated"
39859
+ ]).default("complete")
39860
+ });
39710
39861
  /** A base model a detector job can fine-tune, and the baseline it is judged against. */
39711
39862
  var TrainingBaseModelSchema = object({
39712
39863
  modelId: string(),
@@ -39724,9 +39875,13 @@ var TrainingPresetSchema = _enum([
39724
39875
  "thorough"
39725
39876
  ]);
39726
39877
  var TrainingJobRequestSchema = object({
39727
- datasetVersionId: string().min(1),
39728
- /** The `training-provider` addon that runs it. */
39729
- addonId: string().min(1),
39878
+ /** Live collection + work-state criteria; resolved at plan/start. */
39879
+ selection: TrainingCorpusSelectionSchema,
39880
+ /**
39881
+ * The provider **entry** that runs it (credentials + defaults).
39882
+ * Resolve to an owning addon via `training-provider.describe` / `listEntries`.
39883
+ */
39884
+ entryId: string().min(1),
39730
39885
  gpuType: string().min(1),
39731
39886
  region: string(),
39732
39887
  baseModelId: string().min(1),
@@ -39785,6 +39940,7 @@ var TrainingJobPlanSchema = object({
39785
39940
  * result lives after the operator acted on it.
39786
39941
  */
39787
39942
  var TrainingJobStateSchema = _enum([
39943
+ "queued",
39788
39944
  "uploading",
39789
39945
  "submitted",
39790
39946
  "starting",
@@ -39838,6 +39994,11 @@ var TrainingJobSchema = object({
39838
39994
  createdAt: number(),
39839
39995
  updatedAt: number(),
39840
39996
  state: TrainingJobStateSchema,
39997
+ /**
39998
+ * Shared by every job enqueued together via `startJobBatch`.
39999
+ * `null` for a lone `startJob`. The engine advances queued siblings by this id.
40000
+ */
40001
+ batchId: string().nullable().default(null),
39841
40002
  stage: TrainingStageSchema.nullable(),
39842
40003
  failure: object({
39843
40004
  reason: TrainingFailureReasonSchema,
@@ -39849,6 +40010,12 @@ var TrainingJobSchema = object({
39849
40010
  maxRuntimeSec: number().int().positive(),
39850
40011
  trainer: TrainerSourceRefSchema,
39851
40012
  datasetLayout: RetrainExportLayoutSchema,
40013
+ /** Frame count snapshotted when the job started (audit; equals `frameIds.length`). */
40014
+ frameCount: number().int().nonnegative(),
40015
+ /** Resolved frame ids at start — the archive ships exactly these. */
40016
+ frameIds: array(string()).max(2e4).readonly(),
40017
+ /** Hash of what those frames taught at start (trainer `dataset.annotationHash`). */
40018
+ annotationHash: string(),
39852
40019
  dataset: object({
39853
40020
  bytes: number().int(),
39854
40021
  sha256: string(),
@@ -39890,13 +40057,7 @@ var TrainingJobSchema = object({
39890
40057
  canary: TrainingCanarySchema.nullable()
39891
40058
  });
39892
40059
  var IdInput = object({ id: string().min(1) });
39893
- method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
39894
- kind: "mutation",
39895
- auth: "admin"
39896
- }), 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() }), {
39897
- kind: "mutation",
39898
- auth: "admin"
39899
- }), method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
40060
+ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
39900
40061
  auth: "admin",
39901
40062
  timeoutMs: 6e4
39902
40063
  }), method(TrainingJobRequestSchema.extend({
@@ -39915,6 +40076,24 @@ method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
39915
40076
  kind: "mutation",
39916
40077
  auth: "admin",
39917
40078
  timeoutMs: 12e4
40079
+ }), method(TrainingJobRequestSchema.omit({ baseModelId: true }).extend({
40080
+ baseModelIds: array(string().min(1)).min(1),
40081
+ name: string().min(1).max(120),
40082
+ maxCostUsd: number().positive(),
40083
+ maxRuntimeSec: number().int().positive(),
40084
+ idempotencyKey: string().min(8).max(80)
40085
+ }), discriminatedUnion("kind", [object({
40086
+ kind: literal("started"),
40087
+ batchId: string(),
40088
+ jobs: array(TrainingJobSchema).min(1).readonly()
40089
+ }), object({
40090
+ kind: literal("refused"),
40091
+ reason: TrainingRefusalReasonSchema,
40092
+ detail: string()
40093
+ })]), {
40094
+ kind: "mutation",
40095
+ auth: "admin",
40096
+ timeoutMs: 12e4
39918
40097
  }), method(object({}), array(TrainingJobSchema).readonly(), { auth: "admin" }), method(IdInput, TrainingJobSchema.nullable(), { auth: "admin" }), method(IdInput, TrainingJobSchema, {
39919
40098
  kind: "mutation",
39920
40099
  auth: "admin",
@@ -44020,6 +44199,12 @@ Object.freeze({
44020
44199
  addonId: null,
44021
44200
  access: "create"
44022
44201
  },
44202
+ "osdManager.setSlotCameraEnabled": {
44203
+ capName: "osd-manager",
44204
+ capScope: "system",
44205
+ addonId: null,
44206
+ access: "create"
44207
+ },
44023
44208
  "osdManager.upsertTemplate": {
44024
44209
  capName: "osd-manager",
44025
44210
  capScope: "system",
@@ -44158,12 +44343,6 @@ Object.freeze({
44158
44343
  addonId: null,
44159
44344
  access: "create"
44160
44345
  },
44161
- "pipelineAnalytics.createRetrainDatasetVersion": {
44162
- capName: "pipeline-analytics",
44163
- capScope: "device",
44164
- addonId: null,
44165
- access: "create"
44166
- },
44167
44346
  "pipelineAnalytics.deleteDeviceEvents": {
44168
44347
  capName: "pipeline-analytics",
44169
44348
  capScope: "device",
@@ -44176,12 +44355,6 @@ Object.freeze({
44176
44355
  addonId: null,
44177
44356
  access: "delete"
44178
44357
  },
44179
- "pipelineAnalytics.deleteRetrainDatasetVersion": {
44180
- capName: "pipeline-analytics",
44181
- capScope: "device",
44182
- addonId: null,
44183
- access: "delete"
44184
- },
44185
44358
  "pipelineAnalytics.deleteTracks": {
44186
44359
  capName: "pipeline-analytics",
44187
44360
  capScope: "device",
@@ -44284,6 +44457,12 @@ Object.freeze({
44284
44457
  addonId: null,
44285
44458
  access: "view"
44286
44459
  },
44460
+ "pipelineAnalytics.getRetrainCorpusKpi": {
44461
+ capName: "pipeline-analytics",
44462
+ capScope: "device",
44463
+ addonId: null,
44464
+ access: "view"
44465
+ },
44287
44466
  "pipelineAnalytics.getRetrainExportUrl": {
44288
44467
  capName: "pipeline-analytics",
44289
44468
  capScope: "device",
@@ -44404,7 +44583,7 @@ Object.freeze({
44404
44583
  addonId: null,
44405
44584
  access: "view"
44406
44585
  },
44407
- "pipelineAnalytics.listRetrainDatasetVersions": {
44586
+ "pipelineAnalytics.listRetrainCorpusPage": {
44408
44587
  capName: "pipeline-analytics",
44409
44588
  capScope: "device",
44410
44589
  addonId: null,
@@ -44458,12 +44637,6 @@ Object.freeze({
44458
44637
  addonId: null,
44459
44638
  access: "create"
44460
44639
  },
44461
- "pipelineAnalytics.previewRetrainDataset": {
44462
- capName: "pipeline-analytics",
44463
- capScope: "device",
44464
- addonId: null,
44465
- access: "view"
44466
- },
44467
44640
  "pipelineAnalytics.proposeRetrainAnnotations": {
44468
44641
  capName: "pipeline-analytics",
44469
44642
  capScope: "device",
@@ -44542,6 +44715,12 @@ Object.freeze({
44542
44715
  addonId: null,
44543
44716
  access: "create"
44544
44717
  },
44718
+ "pipelineAnalytics.resolveRetrainTrainingCorpus": {
44719
+ capName: "pipeline-analytics",
44720
+ capScope: "device",
44721
+ addonId: null,
44722
+ access: "view"
44723
+ },
44545
44724
  "pipelineAnalytics.restageRetrainTrack": {
44546
44725
  capName: "pipeline-analytics",
44547
44726
  capScope: "device",
@@ -44602,12 +44781,6 @@ Object.freeze({
44602
44781
  addonId: null,
44603
44782
  access: "create"
44604
44783
  },
44605
- "pipelineAnalytics.verifyRetrainDatasetVersion": {
44606
- capName: "pipeline-analytics",
44607
- capScope: "device",
44608
- addonId: null,
44609
- access: "view"
44610
- },
44611
44784
  "pipelineAnalytics.wipeAllAnalytics": {
44612
44785
  capName: "pipeline-analytics",
44613
44786
  capScope: "device",
@@ -47002,18 +47175,6 @@ Object.freeze({
47002
47175
  addonId: null,
47003
47176
  access: "create"
47004
47177
  },
47005
- "training.findDatasetVersionIdByName": {
47006
- capName: "training",
47007
- capScope: "system",
47008
- addonId: null,
47009
- access: "view"
47010
- },
47011
- "training.getDatasetVersion": {
47012
- capName: "training",
47013
- capScope: "system",
47014
- addonId: null,
47015
- access: "view"
47016
- },
47017
47178
  "training.getJob": {
47018
47179
  capName: "training",
47019
47180
  capScope: "system",
@@ -47032,12 +47193,6 @@ Object.freeze({
47032
47193
  addonId: null,
47033
47194
  access: "view"
47034
47195
  },
47035
- "training.listDatasetVersions": {
47036
- capName: "training",
47037
- capScope: "system",
47038
- addonId: null,
47039
- access: "view"
47040
- },
47041
47196
  "training.listJobs": {
47042
47197
  capName: "training",
47043
47198
  capScope: "system",
@@ -47050,54 +47205,66 @@ Object.freeze({
47050
47205
  addonId: null,
47051
47206
  access: "view"
47052
47207
  },
47053
- "training.putDatasetVersion": {
47208
+ "training.registerResult": {
47054
47209
  capName: "training",
47055
47210
  capScope: "system",
47056
47211
  addonId: null,
47057
47212
  access: "create"
47058
47213
  },
47059
- "training.registerResult": {
47214
+ "training.rollbackCanary": {
47060
47215
  capName: "training",
47061
47216
  capScope: "system",
47062
47217
  addonId: null,
47063
47218
  access: "create"
47064
47219
  },
47065
- "training.removeDatasetVersion": {
47220
+ "training.startJob": {
47066
47221
  capName: "training",
47067
47222
  capScope: "system",
47068
47223
  addonId: null,
47069
- access: "delete"
47224
+ access: "create"
47070
47225
  },
47071
- "training.rollbackCanary": {
47226
+ "training.startJobBatch": {
47072
47227
  capName: "training",
47073
47228
  capScope: "system",
47074
47229
  addonId: null,
47075
47230
  access: "create"
47076
47231
  },
47077
- "training.startJob": {
47078
- capName: "training",
47232
+ "trainingProvider.cancelJob": {
47233
+ capName: "training-provider",
47079
47234
  capScope: "system",
47080
47235
  addonId: null,
47081
47236
  access: "create"
47082
47237
  },
47083
- "trainingProvider.cancelJob": {
47238
+ "trainingProvider.cleanupJob": {
47084
47239
  capName: "training-provider",
47085
47240
  capScope: "system",
47086
47241
  addonId: null,
47087
47242
  access: "create"
47088
47243
  },
47089
- "trainingProvider.cleanupJob": {
47244
+ "trainingProvider.createEntry": {
47090
47245
  capName: "training-provider",
47091
47246
  capScope: "system",
47092
47247
  addonId: null,
47093
47248
  access: "create"
47094
47249
  },
47250
+ "trainingProvider.deleteEntry": {
47251
+ capName: "training-provider",
47252
+ capScope: "system",
47253
+ addonId: null,
47254
+ access: "delete"
47255
+ },
47095
47256
  "trainingProvider.describe": {
47096
47257
  capName: "training-provider",
47097
47258
  capScope: "system",
47098
47259
  addonId: null,
47099
47260
  access: "view"
47100
47261
  },
47262
+ "trainingProvider.describeTypes": {
47263
+ capName: "training-provider",
47264
+ capScope: "system",
47265
+ addonId: null,
47266
+ access: "view"
47267
+ },
47101
47268
  "trainingProvider.estimateJob": {
47102
47269
  capName: "training-provider",
47103
47270
  capScope: "system",
@@ -47110,6 +47277,12 @@ Object.freeze({
47110
47277
  addonId: null,
47111
47278
  access: "view"
47112
47279
  },
47280
+ "trainingProvider.listEntries": {
47281
+ capName: "training-provider",
47282
+ capScope: "system",
47283
+ addonId: null,
47284
+ access: "view"
47285
+ },
47113
47286
  "trainingProvider.listJobEvents": {
47114
47287
  capName: "training-provider",
47115
47288
  capScope: "system",
@@ -47140,6 +47313,12 @@ Object.freeze({
47140
47313
  addonId: null,
47141
47314
  access: "create"
47142
47315
  },
47316
+ "trainingProvider.updateEntry": {
47317
+ capName: "training-provider",
47318
+ capScope: "system",
47319
+ addonId: null,
47320
+ access: "create"
47321
+ },
47143
47322
  "trainingProvider.uploadDataset": {
47144
47323
  capName: "training-provider",
47145
47324
  capScope: "system",
@@ -50350,6 +50529,11 @@ Object.freeze({
50350
50529
  form: "single",
50351
50530
  optional: false
50352
50531
  }],
50532
+ "osdManager.setSlotCameraEnabled": [{
50533
+ name: "deviceId",
50534
+ form: "single",
50535
+ optional: false
50536
+ }],
50353
50537
  "petFeeder.callPet": [{
50354
50538
  name: "deviceId",
50355
50539
  form: "single",
@@ -50570,6 +50754,11 @@ Object.freeze({
50570
50754
  form: "array",
50571
50755
  optional: false
50572
50756
  }],
50757
+ "pipelineAnalytics.listRetrainCorpusPage": [{
50758
+ name: "deviceIds",
50759
+ form: "array",
50760
+ optional: true
50761
+ }],
50573
50762
  "pipelineAnalytics.listRetrainStaging": [{
50574
50763
  name: "deviceIds",
50575
50764
  form: "array",
@@ -51679,6 +51868,7 @@ Object.freeze({
51679
51868
  });
51680
51869
  Object.freeze({
51681
51870
  "broker": "broker",
51871
+ "calendar-source": "calendar",
51682
51872
  "device-export": "device-export",
51683
51873
  "llm": "ai",
51684
51874
  "mesh-network": "mesh",