@camstack/addon-auth 1.2.135 → 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.
@@ -5376,7 +5376,7 @@ var ZodIssueCode = {
5376
5376
  var ZodFirstPartyTypeKind;
5377
5377
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5378
5378
  //#endregion
5379
- //#region ../types/dist/sleep-r3RWkGVx.mjs
5379
+ //#region ../types/dist/sleep-DwAQ9sqX.mjs
5380
5380
  /**
5381
5381
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5382
5382
  * window to float samples (D455).
@@ -9315,6 +9315,16 @@ var CompositionSchema = object({
9315
9315
  seen.add(feature.cap);
9316
9316
  });
9317
9317
  });
9318
+ var NodeColorIdSchema = _enum([
9319
+ "node-a",
9320
+ "node-b",
9321
+ "node-c",
9322
+ "node-d",
9323
+ "node-e",
9324
+ "node-f",
9325
+ "node-g",
9326
+ "node-h"
9327
+ ]);
9318
9328
  new Set([
9319
9329
  "track",
9320
9330
  "face",
@@ -18236,14 +18246,14 @@ var LlmProfileSchema = object({
18236
18246
  /** ConfigUISchema tree passed through untyped on the wire (the
18237
18247
  * notification-output `ConfigSchemaPassthrough` precedent at
18238
18248
  * notification-output.cap.ts:151); the exported TS type re-tightens it. */
18239
- var ConfigSchemaPassthrough$1 = unknown();
18249
+ var ConfigSchemaPassthrough$2 = unknown();
18240
18250
  var LlmProfileKindDescriptorSchema = object({
18241
18251
  kind: LlmProfileKindSchema,
18242
18252
  label: string(),
18243
18253
  icon: string(),
18244
18254
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
18245
18255
  addonId: string(),
18246
- configSchema: ConfigSchemaPassthrough$1
18256
+ configSchema: ConfigSchemaPassthrough$2
18247
18257
  });
18248
18258
  var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
18249
18259
  var LlmDefaultSchema = object({
@@ -19372,7 +19382,7 @@ var TargetKindCapsSchema = object({
19372
19382
  * the union is large and not meant for runtime validation here; the exported
19373
19383
  * `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
19374
19384
  */
19375
- var ConfigSchemaPassthrough = unknown();
19385
+ var ConfigSchemaPassthrough$1 = unknown();
19376
19386
  var TargetKindSchema = object({
19377
19387
  kind: string(),
19378
19388
  label: string(),
@@ -19409,7 +19419,7 @@ var TargetKindSchema = object({
19409
19419
  * its raster path, which is the safe default for an unknown image.
19410
19420
  */
19411
19421
  iconMediaType: string().optional(),
19412
- configSchema: ConfigSchemaPassthrough,
19422
+ configSchema: ConfigSchemaPassthrough$1,
19413
19423
  /**
19414
19424
  * The config keys that decide WHERE this kind's secrets are sent (server,
19415
19425
  * base URL, instance, chat, recipient). A save that changes any of them
@@ -24064,24 +24074,69 @@ var RetrainFrameListSchema = object({
24064
24074
  /** What the page pre-selects — the native key frame when one survives. */
24065
24075
  autoPickMediaId: number().int().optional()
24066
24076
  });
24077
+ /** Exclusive partition of a corpus copy's annotation progress (design §4.2). */
24078
+ var RetrainFrameWorkStateSchema = _enum([
24079
+ "unannotated",
24080
+ "annotated",
24081
+ "complete"
24082
+ ]);
24083
+ /**
24084
+ * Filters for paginated corpus list, KPI, and matching export (design §4.4).
24085
+ * Every narrowing field is ANDed; omitted fields impose no constraint.
24086
+ */
24087
+ var RetrainCorpusFilterSchema = object({
24088
+ workState: RetrainFrameWorkStateSchema.optional(),
24089
+ deviceIds: array(number()).max(500).optional(),
24090
+ /** When set, only frames in this named collection. */
24091
+ collectionId: string().optional(),
24092
+ /** Frames that carry at least one saved annotation in one of these classes. */
24093
+ classes: array(RetrainMacroClassSchema).optional(),
24094
+ page: number().int().positive().default(1),
24095
+ pageSize: number().int().positive().max(100).default(50)
24096
+ });
24097
+ var RetrainCorpusPageSchema = object({
24098
+ frames: array(RetrainFrameSchema.extend({ workState: RetrainFrameWorkStateSchema })).readonly(),
24099
+ total: number().int().nonnegative(),
24100
+ page: number().int().positive(),
24101
+ pageSize: number().int().positive()
24102
+ });
24103
+ var RetrainCorpusKpiCameraRowSchema = object({
24104
+ deviceId: number(),
24105
+ unannotated: number().int().nonnegative(),
24106
+ annotated: number().int().nonnegative(),
24107
+ complete: number().int().nonnegative(),
24108
+ /** This camera's `complete` count divided by corpus `total`, in `[0,1]`.
24109
+ * `null` when the corpus is empty (no ratio). */
24110
+ pctOfCorpus: number().min(0).max(1).nullable()
24111
+ });
24112
+ var RetrainCorpusKpiSchema = object({
24113
+ total: number().int().nonnegative(),
24114
+ unannotated: number().int().nonnegative(),
24115
+ annotated: number().int().nonnegative(),
24116
+ complete: number().int().nonnegative(),
24117
+ cameras: array(RetrainCorpusKpiCameraRowSchema).readonly()
24118
+ });
24067
24119
  /**
24068
24120
  * Which frames an annotated export carries. Every field narrows; an empty
24069
- * filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
24070
- * list owned by whoever trains (the training orchestrator), so `frameIds` is
24071
- * the primitive a version export uses; `batchId` re-selects what an earlier
24072
- * export carried (`exportedInBatch`).
24121
+ * filter is every annotated copy. `frameIds` is the primitive a job or
24122
+ * download uses; `batchId` re-selects what an earlier export carried
24123
+ * (`exportedInBatch`). Frozen dataset versions were removed — live selection
24124
+ * resolves to `frameIds` at plan/start.
24073
24125
  */
24074
24126
  var RetrainExportFilterSchema = object({
24075
24127
  deviceIds: array(number()).optional(),
24076
24128
  frameIds: array(string()).max(2e4).optional(),
24077
24129
  /** Only frames in at least one of these named collections. */
24078
24130
  collectionIds: array(string()).max(200).optional(),
24079
- /** Exactly the frames of this dataset version (and its completeOnly). An
24080
- * unknown id selects nothing. */
24081
- datasetVersionId: string().optional(),
24131
+ /** Single collection (Frames filter bar). ANDed with `collectionIds` when both set. */
24132
+ collectionId: string().optional(),
24082
24133
  batchId: string().optional(),
24083
24134
  /** Only frames the operator marked complete (all subjects boxed). */
24084
- completeOnly: boolean().optional()
24135
+ completeOnly: boolean().optional(),
24136
+ /** Exclusive work-state partition (`workStateOf`); same as the corpus list. */
24137
+ workState: RetrainFrameWorkStateSchema.optional(),
24138
+ /** Frames with at least one saved annotation in one of these classes. */
24139
+ classes: array(RetrainMacroClassSchema).optional()
24085
24140
  });
24086
24141
  /**
24087
24142
  * `frames`: the full frame copies, boxes in `annotations.json`.
@@ -24281,8 +24336,7 @@ var RetrainDatasetStatsSchema = object({
24281
24336
  completeFrames: number().int()
24282
24337
  })).readonly()
24283
24338
  });
24284
- /** An immutable dataset version, without its frame list. */
24285
- var RetrainDatasetVersionSchema = object({
24339
+ object({
24286
24340
  id: string(),
24287
24341
  name: string(),
24288
24342
  createdAt: number(),
@@ -24290,22 +24344,33 @@ var RetrainDatasetVersionSchema = object({
24290
24344
  layout: RetrainExportLayoutSchema,
24291
24345
  completeOnly: boolean(),
24292
24346
  frameCount: number().int(),
24293
- /** sha256 of what the frames taught when the version was frozen. */
24294
24347
  annotationHash: string(),
24295
- /** The export manifest schema the version was cut under. */
24296
24348
  manifestSchema: string(),
24297
24349
  stats: RetrainDatasetStatsSchema
24298
24350
  });
24299
- var CreateRetrainDatasetVersionResultSchema = discriminatedUnion("kind", [object({
24300
- kind: literal("created"),
24301
- version: RetrainDatasetVersionSchema
24351
+ /**
24352
+ * Live training corpus criteria — same shape as `TrainingCorpusSelection` on
24353
+ * the training cap. Resolved here so plan/start and the annotated export share
24354
+ * one definition of "the frames" (`buildRetrainExportPlan`).
24355
+ */
24356
+ var RetrainTrainingCorpusSelectionSchema = object({
24357
+ collectionIds: array(string()).min(1),
24358
+ workState: _enum([
24359
+ "complete",
24360
+ "annotated_or_complete",
24361
+ "any_annotated"
24362
+ ]).default("complete")
24363
+ });
24364
+ var RetrainTrainingCorpusResolveResultSchema = discriminatedUnion("kind", [object({
24365
+ kind: literal("resolved"),
24366
+ frameIds: array(string()).max(2e4).readonly(),
24367
+ stats: RetrainDatasetStatsSchema,
24368
+ annotationHash: string(),
24369
+ layout: RetrainExportLayoutSchema
24302
24370
  }), object({
24303
24371
  kind: literal("refused"),
24304
- reason: _enum([
24305
- "empty-name",
24306
- "duplicate-name",
24307
- "no-frames"
24308
- ])
24372
+ reason: _enum(["unknown-collection", "no-frames"]),
24373
+ detail: string()
24309
24374
  })]);
24310
24375
  /** The outcome of a lifecycle move owned by the retrain page. */
24311
24376
  var RetrainTransitionResultSchema = object({
@@ -25012,6 +25077,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25012
25077
  }), array(RetrainTrackSchema).readonly(), {
25013
25078
  kind: "query",
25014
25079
  auth: "admin"
25080
+ }), method(RetrainCorpusFilterSchema, RetrainCorpusPageSchema, {
25081
+ kind: "query",
25082
+ auth: "admin"
25083
+ }), method(object({}), RetrainCorpusKpiSchema, {
25084
+ kind: "query",
25085
+ auth: "admin"
25015
25086
  }), method(object({ trackId: string() }), RetrainFrameListSchema, {
25016
25087
  kind: "query",
25017
25088
  auth: "admin"
@@ -25107,36 +25178,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25107
25178
  kind: "mutation",
25108
25179
  auth: "admin",
25109
25180
  timeoutMs: 12e4
25110
- }), method(object({
25111
- selection: RetrainDatasetSelectionSchema,
25112
- completeOnly: boolean().optional()
25113
- }), RetrainDatasetStatsSchema, {
25114
- kind: "query",
25115
- auth: "admin"
25116
- }), method(object({
25117
- name: string().max(120),
25118
- selection: RetrainDatasetSelectionSchema,
25119
- layout: RetrainExportLayoutSchema,
25120
- completeOnly: boolean()
25121
- }), CreateRetrainDatasetVersionResultSchema, {
25122
- kind: "mutation",
25123
- auth: "admin",
25124
- timeoutMs: 12e4
25125
- }), method(object({}), array(RetrainDatasetVersionSchema).readonly(), {
25126
- kind: "query",
25127
- auth: "admin"
25128
- }), method(object({ id: string() }), object({ deleted: boolean() }), {
25129
- kind: "mutation",
25130
- auth: "admin"
25131
- }), method(object({ id: string() }), object({
25132
- found: boolean(),
25133
- annotationHash: string(),
25134
- matches: boolean(),
25135
- missingFrames: number().int()
25136
- }), {
25137
- kind: "query",
25138
- auth: "admin",
25139
- timeoutMs: 12e4
25140
25181
  }), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
25141
25182
  kind: "query",
25142
25183
  auth: "admin"
@@ -25163,6 +25204,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25163
25204
  }), method(object({}), array(RetrainCollectionSchema).readonly(), {
25164
25205
  kind: "query",
25165
25206
  auth: "admin"
25207
+ }), method(RetrainTrainingCorpusSelectionSchema, RetrainTrainingCorpusResolveResultSchema, {
25208
+ kind: "query",
25209
+ auth: "admin",
25210
+ timeoutMs: 6e4
25166
25211
  }), method(object({
25167
25212
  id: string(),
25168
25213
  name: string().max(120)
@@ -25779,11 +25824,14 @@ var HardwareClassIdSchema = _enum([
25779
25824
  "intel-n-series",
25780
25825
  "apple-m-base",
25781
25826
  "apple-m-pro",
25827
+ "amd-phoenix",
25782
25828
  "unknown"
25783
25829
  ]);
25784
25830
  var AcceleratorKindSchema = _enum([
25785
25831
  "intel-npu",
25786
25832
  "intel-igpu",
25833
+ "amd-igpu",
25834
+ "amd-npu",
25787
25835
  "x86-cpu",
25788
25836
  "arm-cpu",
25789
25837
  "apple-ane",
@@ -27673,6 +27721,8 @@ var AgentPipelineSettingsSchema = object({
27673
27721
  * address is wrong (multi-homed host, NAT, custom interface).
27674
27722
  */
27675
27723
  reachableHost: string().optional(),
27724
+ /** Hub-persisted UI colour (`--color-node-*` theme tokens). */
27725
+ color: NodeColorIdSchema.optional(),
27676
27726
  /**
27677
27727
  * Multi-device inference opt-in (Phase 4). Per-node map deviceKey → {enabled,
27678
27728
  * weight, steps}. Absent / all-disabled ⇒ the node's single default
@@ -28222,8 +28272,9 @@ method(object({
28222
28272
  auth: "admin"
28223
28273
  }), method(object({
28224
28274
  agentNodeId: string(),
28225
- reachableHost: string().nullable()
28226
- }), object({ success: literal(true) }), {
28275
+ reachableHost: string().nullable().optional(),
28276
+ color: NodeColorIdSchema.nullable().optional()
28277
+ }).refine((v) => v.reachableHost !== void 0 || v.color !== void 0, { message: "reachableHost or color required" }), object({ success: literal(true) }), {
28227
28278
  kind: "mutation",
28228
28279
  auth: "admin"
28229
28280
  }), method(object({
@@ -31305,7 +31356,7 @@ var CustomActionInputSchema = object({
31305
31356
  action: string().min(1),
31306
31357
  input: unknown()
31307
31358
  });
31308
- method(_void(), array(AddonListItemSchema).readonly()), method(object({
31359
+ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSchema).readonly()), method(object({
31309
31360
  addonId: string(),
31310
31361
  limit: number().min(1).max(500).default(100),
31311
31362
  level: LogLevelSchema$2.optional()
@@ -34852,7 +34903,13 @@ var TopologyNodeSchema = object({
34852
34903
  })).readonly(),
34853
34904
  processes: array(TopologyProcessSchema).readonly(),
34854
34905
  categories: array(TopologyCategorySchema).readonly(),
34855
- rootPackage: TopologyRootPackageSchema.nullable()
34906
+ rootPackage: TopologyRootPackageSchema.nullable(),
34907
+ /**
34908
+ * How an online AGENT reaches the hub (mesh mTLS Release A): `tls` once it has
34909
+ * completed a mutual-TLS handshake, `clear` otherwise. Absent for the hub,
34910
+ * for offline rows and when the hub cannot tell.
34911
+ */
34912
+ meshTransport: _enum(["tls", "clear"]).optional()
34856
34913
  });
34857
34914
  var CapUsageEdgeSchema = object({
34858
34915
  callerAddonId: string(),
@@ -35192,6 +35249,7 @@ var OsdNamedTemplateSchema = object({
35192
35249
  });
35193
35250
  /** Where a slot's value comes from. */
35194
35251
  var OsdSourceSchema = discriminatedUnion("kind", [
35252
+ object({ kind: literal("none") }),
35195
35253
  object({
35196
35254
  kind: literal("static"),
35197
35255
  text: string().max(64)
@@ -35318,6 +35376,13 @@ method(object({ deviceId: number().int() }), object({
35318
35376
  }), object({ success: literal(true) }), {
35319
35377
  kind: "mutation",
35320
35378
  auth: "admin"
35379
+ }), method(object({
35380
+ deviceId: number().int(),
35381
+ slotId: string().min(1),
35382
+ enabled: boolean()
35383
+ }), object({ success: literal(true) }), {
35384
+ kind: "mutation",
35385
+ auth: "admin"
35321
35386
  }), method(object({
35322
35387
  sourceDeviceId: number().int(),
35323
35388
  targetDeviceId: number().int()
@@ -35698,7 +35763,15 @@ var GpuInfoSchema = object({
35698
35763
  name: string(),
35699
35764
  memoryMB: number().optional()
35700
35765
  });
35701
- var NpuInfoSchema = object({ type: _enum(["apple-ane", "intel-npu"]) });
35766
+ var NpuInfoSchema = object({
35767
+ type: _enum([
35768
+ "apple-ane",
35769
+ "intel-npu",
35770
+ "amd-xdna"
35771
+ ]),
35772
+ name: string().optional(),
35773
+ generation: _enum(["xdna1", "xdna2"]).optional()
35774
+ });
35702
35775
  var CoralInfoSchema = object({
35703
35776
  type: literal("coral-edgetpu"),
35704
35777
  bus: string().optional()
@@ -39460,9 +39533,11 @@ DeviceType.Camera, method(object({
39460
39533
  * once is what makes a second provider (RunPod, a local NVIDIA node) a new
39461
39534
  * manifest entry and nothing else.
39462
39535
  *
39463
- * Collection, routed by the `addonId` in every single-row input (the `llm` /
39464
- * `notification-output` posture); `describe` concat-fans across providers.
39465
- * Every method is `admin`: these spend money.
39536
+ * Collection of provider **types** (addons). Each addon owns zero or more
39537
+ * **entries** (credentials + defaults). Concat-fans: `describe`,
39538
+ * `describeTypes`, `listEntries`, `listJobs`. Single-row work is keyed by
39539
+ * `entryId`; callers also pass the owning `addonId` as the collection
39540
+ * selector (broker posture). Every method is `admin`: these spend money.
39466
39541
  *
39467
39542
  * Every cloud object a provider creates is tagged with the orchestrator's
39468
39543
  * `jobKey`, so a retried submit finds the job it already started instead of
@@ -39486,8 +39561,8 @@ var TrainingRegionOptionSchema = object({
39486
39561
  priceMultiplier: number().positive()
39487
39562
  });
39488
39563
  /**
39489
- * The provider's per-account settings, as the orchestrator reads them. They
39490
- * live in the PROVIDER addon's settings (operator decision 2026-10-08: they
39564
+ * The provider's per-entry settings, as the orchestrator reads them. They
39565
+ * live on the PROVIDER addon's entry (operator decision 2026-10-08: they
39491
39566
  * depend on the user's account), never hard-coded in the orchestrator.
39492
39567
  */
39493
39568
  var TrainingProviderDefaultsSchema = object({
@@ -39498,9 +39573,44 @@ var TrainingProviderDefaultsSchema = object({
39498
39573
  /** Hours a FAILED job's cloud dataset is kept for debugging; 0 = delete at once. */
39499
39574
  failedDatasetGraceHours: number().nonnegative()
39500
39575
  });
39576
+ /**
39577
+ * Entry form schema for a provider type — same seam as notification
39578
+ * `TargetKind.configSchema` (`z.unknown()` at the wire; callers tighten to
39579
+ * {@link ConfigUISchema}). Drives `ConfigFormBuilder` on Training → Providers.
39580
+ */
39581
+ var ConfigSchemaPassthrough = unknown();
39582
+ /** One creatable provider type, for the Add-entry dialog. */
39583
+ var TrainingProviderTypeSchema = object({
39584
+ typeId: string(),
39585
+ label: string(),
39586
+ /** Path under the addon package (e.g. `assets/training-modal/icon.svg`). */
39587
+ iconAsset: string(),
39588
+ /** Owning `training-provider` addon — collection selector for createEntry. */
39589
+ addonId: string(),
39590
+ /**
39591
+ * Fields for one entry of this type (credentials + defaults). Absent on a
39592
+ * type that only needs a name. Password fields are keychain-backed on the
39593
+ * provider addon (`secretStatePaths`), not D634 plaintext.
39594
+ */
39595
+ configSchema: ConfigSchemaPassthrough.optional()
39596
+ });
39597
+ /** One configured account / workspace under a provider type. */
39598
+ var TrainingProviderEntrySchema = object({
39599
+ entryId: string(),
39600
+ typeId: string(),
39601
+ name: string(),
39602
+ addonId: string(),
39603
+ /** Credentials are present — never the values. */
39604
+ configured: boolean()
39605
+ });
39501
39606
  var TrainingProviderDescriptorSchema = object({
39502
39607
  addonId: string(),
39503
- /** `modal`, `runpod`, `fake`, … */
39608
+ entryId: string(),
39609
+ typeId: string(),
39610
+ /** Operator-chosen entry name. */
39611
+ name: string(),
39612
+ iconAsset: string(),
39613
+ /** `modal`, `runpod`, `fake`, … — same as typeId for current providers. */
39504
39614
  kind: string(),
39505
39615
  label: string(),
39506
39616
  gpuTypes: array(TrainingGpuOptionSchema).readonly(),
@@ -39512,7 +39622,30 @@ var TrainingProviderDescriptorSchema = object({
39512
39622
  dataResidencyNote: string(),
39513
39623
  /** Credentials are present — never the values. */
39514
39624
  configured: boolean(),
39515
- defaults: TrainingProviderDefaultsSchema
39625
+ defaults: TrainingProviderDefaultsSchema,
39626
+ /**
39627
+ * Values for {@link TrainingProviderTypeSchema}'s `configSchema` — password
39628
+ * fields are keychain {@link SecretFieldView} or `null` / `''` (create),
39629
+ * never plaintext. Same hydrate contract as settings forms (D789).
39630
+ */
39631
+ formValues: record(string(), unknown()).optional()
39632
+ });
39633
+ /**
39634
+ * Patch one entry's name, credentials and defaults. Pin with owning `{ addonId }`.
39635
+ * An omitted or empty `tokenSecret` means KEEP the stored secret (D787).
39636
+ * `{ $secretClear: true }` clears it.
39637
+ */
39638
+ var TrainingProviderUpdateEntryInputSchema = object({
39639
+ entryId: string().min(1),
39640
+ name: string().min(1),
39641
+ tokenId: string().optional(),
39642
+ tokenSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
39643
+ environment: string().optional(),
39644
+ gpuType: string().optional(),
39645
+ region: string().optional(),
39646
+ costCapUsd: number().nonnegative().optional(),
39647
+ maxRuntimeSec: number().int().positive().optional(),
39648
+ failedDatasetGraceHours: number().nonnegative().optional()
39516
39649
  });
39517
39650
  var TrainingCredentialCheckSchema = object({
39518
39651
  ok: boolean(),
@@ -39564,20 +39697,33 @@ var TrainerSourceRefSchema = object({
39564
39697
  /** A commit sha (never a branch) — the job must be reproducible. */
39565
39698
  revision: string().regex(/^[0-9a-f]{7,64}$/)
39566
39699
  });
39700
+ /** Cloud job identity — route with the owning addon's `addonId` selector. */
39567
39701
  var JobRef = {
39568
- addonId: string(),
39702
+ entryId: string().min(1),
39569
39703
  jobKey: string().uuid()
39570
39704
  };
39571
39705
  var TrainingLogLineSchema = object({
39572
39706
  ts: number(),
39573
39707
  text: string()
39574
39708
  });
39575
- method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({ addonId: string() }), TrainingCredentialCheckSchema, {
39709
+ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderTypeSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderEntrySchema).readonly(), { auth: "admin" }), method(object({
39710
+ typeId: string().min(1),
39711
+ name: string().min(1)
39712
+ }), object({ entryId: string() }), {
39713
+ kind: "mutation",
39714
+ auth: "admin"
39715
+ }), method(object({ entryId: string().min(1) }), object({ ok: literal(true) }), {
39716
+ kind: "mutation",
39717
+ auth: "admin"
39718
+ }), method(TrainingProviderUpdateEntryInputSchema, object({ ok: literal(true) }), {
39719
+ kind: "mutation",
39720
+ auth: "admin"
39721
+ }), method(object({ entryId: string().min(1) }), TrainingCredentialCheckSchema, {
39576
39722
  kind: "mutation",
39577
39723
  auth: "admin",
39578
39724
  timeoutMs: 3e4
39579
39725
  }), method(object({
39580
- addonId: string(),
39726
+ entryId: string().min(1),
39581
39727
  gpuType: string(),
39582
39728
  region: string(),
39583
39729
  datasetBytes: number().int().nonnegative(),
@@ -39643,7 +39789,7 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
39643
39789
  kind: "mutation",
39644
39790
  auth: "admin",
39645
39791
  timeoutMs: 5 * 6e4
39646
- }), method(object({ addonId: string() }), array(ProviderJobStatusSchema).readonly(), {
39792
+ }), method(object({ entryId: string().min(1).optional() }), array(ProviderJobStatusSchema).readonly(), {
39647
39793
  auth: "admin",
39648
39794
  timeoutMs: 2 * 6e4
39649
39795
  });
@@ -39653,20 +39799,31 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
39653
39799
  *
39654
39800
  * It owns what every provider must agree on, written once:
39655
39801
  *
39656
- * - **Dataset versions.** Taken over from pipeline-analytics (D796): the rows
39657
- * live here (D808); pipeline-analytics still CUTS a version (it owns the corpus and
39658
- * the export plan) and reaches this store through the five row methods
39659
- * below, so the Retrain page and the export did not change.
39660
39802
  * - **Jobs.** A persisted state machine, a reconcile loop against the
39661
39803
  * provider, a cost guard, a daily orphan sweep and the retention rules.
39662
39804
  * - **The return flow.** Verified artefacts → Model Studio
39663
39805
  * (`custom-model-registry.importModelBundle`) → canary on cameras →
39664
39806
  * rollback. Nothing is ever registered automatically.
39665
39807
  *
39808
+ * Plan/start takes a live {@link TrainingCorpusSelection} (collections +
39809
+ * work-state rule); frame ids are resolved via pipeline-analytics at that
39810
+ * moment and snapshotted on the job. No frozen dataset version.
39811
+ *
39666
39812
  * Every method is `admin`.
39667
39813
  */
39668
- /** A version WITH its frame list — what the export and a job read. */
39669
- var TrainingDatasetVersionRowSchema = RetrainDatasetVersionSchema.omit({ frameCount: true }).extend({ frameIds: array(string()).max(2e4).readonly() });
39814
+ /**
39815
+ * Live corpus criteria for plan/start (design §5.2). Default is complete-only.
39816
+ * Frame ids are resolved at plan/start — never a frozen version id.
39817
+ */
39818
+ var TrainingCorpusSelectionSchema = object({
39819
+ collectionIds: array(string()).min(1),
39820
+ /** Default complete-only for v1 */
39821
+ workState: _enum([
39822
+ "complete",
39823
+ "annotated_or_complete",
39824
+ "any_annotated"
39825
+ ]).default("complete")
39826
+ });
39670
39827
  /** A base model a detector job can fine-tune, and the baseline it is judged against. */
39671
39828
  var TrainingBaseModelSchema = object({
39672
39829
  modelId: string(),
@@ -39684,9 +39841,13 @@ var TrainingPresetSchema = _enum([
39684
39841
  "thorough"
39685
39842
  ]);
39686
39843
  var TrainingJobRequestSchema = object({
39687
- datasetVersionId: string().min(1),
39688
- /** The `training-provider` addon that runs it. */
39689
- addonId: string().min(1),
39844
+ /** Live collection + work-state criteria; resolved at plan/start. */
39845
+ selection: TrainingCorpusSelectionSchema,
39846
+ /**
39847
+ * The provider **entry** that runs it (credentials + defaults).
39848
+ * Resolve to an owning addon via `training-provider.describe` / `listEntries`.
39849
+ */
39850
+ entryId: string().min(1),
39690
39851
  gpuType: string().min(1),
39691
39852
  region: string(),
39692
39853
  baseModelId: string().min(1),
@@ -39745,6 +39906,7 @@ var TrainingJobPlanSchema = object({
39745
39906
  * result lives after the operator acted on it.
39746
39907
  */
39747
39908
  var TrainingJobStateSchema = _enum([
39909
+ "queued",
39748
39910
  "uploading",
39749
39911
  "submitted",
39750
39912
  "starting",
@@ -39798,6 +39960,11 @@ var TrainingJobSchema = object({
39798
39960
  createdAt: number(),
39799
39961
  updatedAt: number(),
39800
39962
  state: TrainingJobStateSchema,
39963
+ /**
39964
+ * Shared by every job enqueued together via `startJobBatch`.
39965
+ * `null` for a lone `startJob`. The engine advances queued siblings by this id.
39966
+ */
39967
+ batchId: string().nullable().default(null),
39801
39968
  stage: TrainingStageSchema.nullable(),
39802
39969
  failure: object({
39803
39970
  reason: TrainingFailureReasonSchema,
@@ -39809,6 +39976,12 @@ var TrainingJobSchema = object({
39809
39976
  maxRuntimeSec: number().int().positive(),
39810
39977
  trainer: TrainerSourceRefSchema,
39811
39978
  datasetLayout: RetrainExportLayoutSchema,
39979
+ /** Frame count snapshotted when the job started (audit; equals `frameIds.length`). */
39980
+ frameCount: number().int().nonnegative(),
39981
+ /** Resolved frame ids at start — the archive ships exactly these. */
39982
+ frameIds: array(string()).max(2e4).readonly(),
39983
+ /** Hash of what those frames taught at start (trainer `dataset.annotationHash`). */
39984
+ annotationHash: string(),
39812
39985
  dataset: object({
39813
39986
  bytes: number().int(),
39814
39987
  sha256: string(),
@@ -39850,13 +40023,7 @@ var TrainingJobSchema = object({
39850
40023
  canary: TrainingCanarySchema.nullable()
39851
40024
  });
39852
40025
  var IdInput = object({ id: string().min(1) });
39853
- method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
39854
- kind: "mutation",
39855
- auth: "admin"
39856
- }), 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() }), {
39857
- kind: "mutation",
39858
- auth: "admin"
39859
- }), method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
40026
+ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
39860
40027
  auth: "admin",
39861
40028
  timeoutMs: 6e4
39862
40029
  }), method(TrainingJobRequestSchema.extend({
@@ -39875,6 +40042,24 @@ method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
39875
40042
  kind: "mutation",
39876
40043
  auth: "admin",
39877
40044
  timeoutMs: 12e4
40045
+ }), method(TrainingJobRequestSchema.omit({ baseModelId: true }).extend({
40046
+ baseModelIds: array(string().min(1)).min(1),
40047
+ name: string().min(1).max(120),
40048
+ maxCostUsd: number().positive(),
40049
+ maxRuntimeSec: number().int().positive(),
40050
+ idempotencyKey: string().min(8).max(80)
40051
+ }), discriminatedUnion("kind", [object({
40052
+ kind: literal("started"),
40053
+ batchId: string(),
40054
+ jobs: array(TrainingJobSchema).min(1).readonly()
40055
+ }), object({
40056
+ kind: literal("refused"),
40057
+ reason: TrainingRefusalReasonSchema,
40058
+ detail: string()
40059
+ })]), {
40060
+ kind: "mutation",
40061
+ auth: "admin",
40062
+ timeoutMs: 12e4
39878
40063
  }), method(object({}), array(TrainingJobSchema).readonly(), { auth: "admin" }), method(IdInput, TrainingJobSchema.nullable(), { auth: "admin" }), method(IdInput, TrainingJobSchema, {
39879
40064
  kind: "mutation",
39880
40065
  auth: "admin",
@@ -43980,6 +44165,12 @@ Object.freeze({
43980
44165
  addonId: null,
43981
44166
  access: "create"
43982
44167
  },
44168
+ "osdManager.setSlotCameraEnabled": {
44169
+ capName: "osd-manager",
44170
+ capScope: "system",
44171
+ addonId: null,
44172
+ access: "create"
44173
+ },
43983
44174
  "osdManager.upsertTemplate": {
43984
44175
  capName: "osd-manager",
43985
44176
  capScope: "system",
@@ -44118,12 +44309,6 @@ Object.freeze({
44118
44309
  addonId: null,
44119
44310
  access: "create"
44120
44311
  },
44121
- "pipelineAnalytics.createRetrainDatasetVersion": {
44122
- capName: "pipeline-analytics",
44123
- capScope: "device",
44124
- addonId: null,
44125
- access: "create"
44126
- },
44127
44312
  "pipelineAnalytics.deleteDeviceEvents": {
44128
44313
  capName: "pipeline-analytics",
44129
44314
  capScope: "device",
@@ -44136,12 +44321,6 @@ Object.freeze({
44136
44321
  addonId: null,
44137
44322
  access: "delete"
44138
44323
  },
44139
- "pipelineAnalytics.deleteRetrainDatasetVersion": {
44140
- capName: "pipeline-analytics",
44141
- capScope: "device",
44142
- addonId: null,
44143
- access: "delete"
44144
- },
44145
44324
  "pipelineAnalytics.deleteTracks": {
44146
44325
  capName: "pipeline-analytics",
44147
44326
  capScope: "device",
@@ -44244,6 +44423,12 @@ Object.freeze({
44244
44423
  addonId: null,
44245
44424
  access: "view"
44246
44425
  },
44426
+ "pipelineAnalytics.getRetrainCorpusKpi": {
44427
+ capName: "pipeline-analytics",
44428
+ capScope: "device",
44429
+ addonId: null,
44430
+ access: "view"
44431
+ },
44247
44432
  "pipelineAnalytics.getRetrainExportUrl": {
44248
44433
  capName: "pipeline-analytics",
44249
44434
  capScope: "device",
@@ -44364,7 +44549,7 @@ Object.freeze({
44364
44549
  addonId: null,
44365
44550
  access: "view"
44366
44551
  },
44367
- "pipelineAnalytics.listRetrainDatasetVersions": {
44552
+ "pipelineAnalytics.listRetrainCorpusPage": {
44368
44553
  capName: "pipeline-analytics",
44369
44554
  capScope: "device",
44370
44555
  addonId: null,
@@ -44418,12 +44603,6 @@ Object.freeze({
44418
44603
  addonId: null,
44419
44604
  access: "create"
44420
44605
  },
44421
- "pipelineAnalytics.previewRetrainDataset": {
44422
- capName: "pipeline-analytics",
44423
- capScope: "device",
44424
- addonId: null,
44425
- access: "view"
44426
- },
44427
44606
  "pipelineAnalytics.proposeRetrainAnnotations": {
44428
44607
  capName: "pipeline-analytics",
44429
44608
  capScope: "device",
@@ -44502,6 +44681,12 @@ Object.freeze({
44502
44681
  addonId: null,
44503
44682
  access: "create"
44504
44683
  },
44684
+ "pipelineAnalytics.resolveRetrainTrainingCorpus": {
44685
+ capName: "pipeline-analytics",
44686
+ capScope: "device",
44687
+ addonId: null,
44688
+ access: "view"
44689
+ },
44505
44690
  "pipelineAnalytics.restageRetrainTrack": {
44506
44691
  capName: "pipeline-analytics",
44507
44692
  capScope: "device",
@@ -44562,12 +44747,6 @@ Object.freeze({
44562
44747
  addonId: null,
44563
44748
  access: "create"
44564
44749
  },
44565
- "pipelineAnalytics.verifyRetrainDatasetVersion": {
44566
- capName: "pipeline-analytics",
44567
- capScope: "device",
44568
- addonId: null,
44569
- access: "view"
44570
- },
44571
44750
  "pipelineAnalytics.wipeAllAnalytics": {
44572
44751
  capName: "pipeline-analytics",
44573
44752
  capScope: "device",
@@ -46962,18 +47141,6 @@ Object.freeze({
46962
47141
  addonId: null,
46963
47142
  access: "create"
46964
47143
  },
46965
- "training.findDatasetVersionIdByName": {
46966
- capName: "training",
46967
- capScope: "system",
46968
- addonId: null,
46969
- access: "view"
46970
- },
46971
- "training.getDatasetVersion": {
46972
- capName: "training",
46973
- capScope: "system",
46974
- addonId: null,
46975
- access: "view"
46976
- },
46977
47144
  "training.getJob": {
46978
47145
  capName: "training",
46979
47146
  capScope: "system",
@@ -46992,12 +47159,6 @@ Object.freeze({
46992
47159
  addonId: null,
46993
47160
  access: "view"
46994
47161
  },
46995
- "training.listDatasetVersions": {
46996
- capName: "training",
46997
- capScope: "system",
46998
- addonId: null,
46999
- access: "view"
47000
- },
47001
47162
  "training.listJobs": {
47002
47163
  capName: "training",
47003
47164
  capScope: "system",
@@ -47010,54 +47171,66 @@ Object.freeze({
47010
47171
  addonId: null,
47011
47172
  access: "view"
47012
47173
  },
47013
- "training.putDatasetVersion": {
47174
+ "training.registerResult": {
47014
47175
  capName: "training",
47015
47176
  capScope: "system",
47016
47177
  addonId: null,
47017
47178
  access: "create"
47018
47179
  },
47019
- "training.registerResult": {
47180
+ "training.rollbackCanary": {
47020
47181
  capName: "training",
47021
47182
  capScope: "system",
47022
47183
  addonId: null,
47023
47184
  access: "create"
47024
47185
  },
47025
- "training.removeDatasetVersion": {
47186
+ "training.startJob": {
47026
47187
  capName: "training",
47027
47188
  capScope: "system",
47028
47189
  addonId: null,
47029
- access: "delete"
47190
+ access: "create"
47030
47191
  },
47031
- "training.rollbackCanary": {
47192
+ "training.startJobBatch": {
47032
47193
  capName: "training",
47033
47194
  capScope: "system",
47034
47195
  addonId: null,
47035
47196
  access: "create"
47036
47197
  },
47037
- "training.startJob": {
47038
- capName: "training",
47198
+ "trainingProvider.cancelJob": {
47199
+ capName: "training-provider",
47039
47200
  capScope: "system",
47040
47201
  addonId: null,
47041
47202
  access: "create"
47042
47203
  },
47043
- "trainingProvider.cancelJob": {
47204
+ "trainingProvider.cleanupJob": {
47044
47205
  capName: "training-provider",
47045
47206
  capScope: "system",
47046
47207
  addonId: null,
47047
47208
  access: "create"
47048
47209
  },
47049
- "trainingProvider.cleanupJob": {
47210
+ "trainingProvider.createEntry": {
47050
47211
  capName: "training-provider",
47051
47212
  capScope: "system",
47052
47213
  addonId: null,
47053
47214
  access: "create"
47054
47215
  },
47216
+ "trainingProvider.deleteEntry": {
47217
+ capName: "training-provider",
47218
+ capScope: "system",
47219
+ addonId: null,
47220
+ access: "delete"
47221
+ },
47055
47222
  "trainingProvider.describe": {
47056
47223
  capName: "training-provider",
47057
47224
  capScope: "system",
47058
47225
  addonId: null,
47059
47226
  access: "view"
47060
47227
  },
47228
+ "trainingProvider.describeTypes": {
47229
+ capName: "training-provider",
47230
+ capScope: "system",
47231
+ addonId: null,
47232
+ access: "view"
47233
+ },
47061
47234
  "trainingProvider.estimateJob": {
47062
47235
  capName: "training-provider",
47063
47236
  capScope: "system",
@@ -47070,6 +47243,12 @@ Object.freeze({
47070
47243
  addonId: null,
47071
47244
  access: "view"
47072
47245
  },
47246
+ "trainingProvider.listEntries": {
47247
+ capName: "training-provider",
47248
+ capScope: "system",
47249
+ addonId: null,
47250
+ access: "view"
47251
+ },
47073
47252
  "trainingProvider.listJobEvents": {
47074
47253
  capName: "training-provider",
47075
47254
  capScope: "system",
@@ -47100,6 +47279,12 @@ Object.freeze({
47100
47279
  addonId: null,
47101
47280
  access: "create"
47102
47281
  },
47282
+ "trainingProvider.updateEntry": {
47283
+ capName: "training-provider",
47284
+ capScope: "system",
47285
+ addonId: null,
47286
+ access: "create"
47287
+ },
47103
47288
  "trainingProvider.uploadDataset": {
47104
47289
  capName: "training-provider",
47105
47290
  capScope: "system",
@@ -50310,6 +50495,11 @@ Object.freeze({
50310
50495
  form: "single",
50311
50496
  optional: false
50312
50497
  }],
50498
+ "osdManager.setSlotCameraEnabled": [{
50499
+ name: "deviceId",
50500
+ form: "single",
50501
+ optional: false
50502
+ }],
50313
50503
  "petFeeder.callPet": [{
50314
50504
  name: "deviceId",
50315
50505
  form: "single",
@@ -50530,6 +50720,11 @@ Object.freeze({
50530
50720
  form: "array",
50531
50721
  optional: false
50532
50722
  }],
50723
+ "pipelineAnalytics.listRetrainCorpusPage": [{
50724
+ name: "deviceIds",
50725
+ form: "array",
50726
+ optional: true
50727
+ }],
50533
50728
  "pipelineAnalytics.listRetrainStaging": [{
50534
50729
  name: "deviceIds",
50535
50730
  form: "array",
@@ -51639,6 +51834,7 @@ Object.freeze({
51639
51834
  });
51640
51835
  Object.freeze({
51641
51836
  "broker": "broker",
51837
+ "calendar-source": "calendar",
51642
51838
  "device-export": "device-export",
51643
51839
  "llm": "ai",
51644
51840
  "mesh-network": "mesh",
@@ -52124,6 +52320,8 @@ var STATE_SUMMARY_VARS = [
52124
52320
  [...RULE_TEXT],
52125
52321
  [...RULE_TEXT],
52126
52322
  [...RULE_TEXT],
52323
+ [...RULE_TEXT],
52324
+ [...RULE_TEXT],
52127
52325
  ([...RULE_TEXT], [...UPDATES]),
52128
52326
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),
52129
52327
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),