@camstack/addon-training 0.1.60 → 0.1.61

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.
Files changed (20) hide show
  1. package/dist/{MotionZonesSettings-BVAWM6Mp.mjs → MotionZonesSettings-DSFRn3u7.mjs} +2 -2
  2. package/dist/{PrivacyMaskSettings-C6n5XvTF.mjs → PrivacyMaskSettings-CJUs69K5.mjs} +2 -2
  3. package/dist/{SceneMonitorEditor-YqjreNwk.mjs → SceneMonitorEditor-BjEBJhp2.mjs} +1 -1
  4. package/dist/_stub.js +9 -9
  5. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_training_page-D2t3iWfl.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_training_page-B9bxvWW7.mjs} +4 -4
  6. package/dist/_virtual_mf___mfe_internal__addon_training_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BRYzagHC.mjs +26 -0
  7. package/dist/{dist-CLSVfoxe.mjs → dist-BrdzZGWE.mjs} +165 -102
  8. package/dist/{dist-Co-Ch58W.js → dist-Bw72X0Lw.js} +165 -102
  9. package/dist/{hostInit-BzYWXDTu.mjs → hostInit-Bi_brUZe.mjs} +3 -3
  10. package/dist/index.js +1 -1
  11. package/dist/orchestrator/training.addon.js +1 -1
  12. package/dist/orchestrator/training.addon.mjs +1 -1
  13. package/dist/{player-overlays-CsC1EU9M.mjs → player-overlays-DfEn3UiJ.mjs} +1 -1
  14. package/dist/providers/modal/training-modal.addon.js +1 -1
  15. package/dist/providers/modal/training-modal.addon.mjs +1 -1
  16. package/dist/remoteEntry.js +1 -1
  17. package/dist/{responsive-CqqXFNE0.mjs → responsive-KcnxmMOF.mjs} +1 -1
  18. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-mXPV__C7.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-764ClezD.mjs} +1 -1
  19. package/package.json +1 -1
  20. package/dist/_virtual_mf___mfe_internal__addon_training_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DNz5PuiW.mjs +0 -26
@@ -5547,7 +5547,7 @@ var ZodIssueCode = {
5547
5547
  var ZodFirstPartyTypeKind;
5548
5548
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5549
5549
  //#endregion
5550
- //#region ../types/dist/sleep-BxjU_fJM.mjs
5550
+ //#region ../types/dist/sleep-yKL5gfrH.mjs
5551
5551
  /**
5552
5552
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5553
5553
  * window to float samples (D455).
@@ -7930,9 +7930,9 @@ function normalizeAddonInitResult(result) {
7930
7930
  return result;
7931
7931
  }
7932
7932
  /**
7933
- * The share-view scope kinds a `csv_*` share token can carry. The hub mints
7934
- * and validates them (`share-token.service.ts` builds its enum from this
7935
- * list); a data plane names the kinds it ACCEPTS in `share`.
7933
+ * The share-view scope kinds a share-link token can carry. The hub mints
7934
+ * and validates them (`ShareViewGrantSchema` builds its
7935
+ * enum from this list); a data plane names the kinds it ACCEPTS in `share`.
7936
7936
  */
7937
7937
  var SHARE_VIEW_KINDS = ["grid-view", "events-view"];
7938
7938
  /** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
@@ -12818,7 +12818,7 @@ var ConvertResultSchema = object({
12818
12818
  * `super_admin` — collapsed onto the single boolean because every
12819
12819
  * non-admin caller is governed by the same scope-check rules; the
12820
12820
  * distinction was only ever used to route role-specific procedures
12821
- * which we no longer have. CLI / webhook integrations are `cst_*` tokens
12821
+ * which we no longer have. CLI / webhook integrations are tokens (`auth.mintToken`)
12822
12822
  * with `isAdmin: false` + an explicit scope list.
12823
12823
  */
12824
12824
  /** Per-method access flavour. Materialised on every cap method via codegen. */
@@ -13007,10 +13007,12 @@ var AddonRoutesScopeSchema = object({
13007
13007
  type: literal("addon-routes"),
13008
13008
  access: array(MethodAccessSchema).min(1)
13009
13009
  });
13010
+ var PreferencesSelfScopeSchema = object({ type: literal("preferences-self") });
13010
13011
  var CredentialScopeSchema = union([
13011
13012
  literal("*"),
13012
13013
  ShareViewScopeSchema,
13013
13014
  AddonRoutesScopeSchema,
13015
+ PreferencesSelfScopeSchema,
13014
13016
  TokenScopeSchema
13015
13017
  ]);
13016
13018
  object({
@@ -13019,6 +13021,55 @@ object({
13019
13021
  jti: string().min(16),
13020
13022
  scopes: array(CredentialScopeSchema).min(1)
13021
13023
  });
13024
+ var PreferenceNamespaceSchema = string().regex(/^[a-z][a-z0-9.-]{0,63}$/);
13025
+ /** A namespace's value: a JSON object, opaque to the hub. */
13026
+ var PreferenceValueSchema = record(string(), unknown());
13027
+ var PreferenceDeviceIdSchema = string().min(1).max(64);
13028
+ /** A stored row, as the owner reads it. */
13029
+ var PreferenceRowSchema = object({
13030
+ namespace: PreferenceNamespaceSchema,
13031
+ value: PreferenceValueSchema,
13032
+ /** Starts at 1, +1 on every write of this namespace. A delete ends the row and its count. */
13033
+ revision: number().int().positive(),
13034
+ updatedAt: number().int(),
13035
+ /** The client id the last writer sent; `null` when it sent none. */
13036
+ updatedByDevice: PreferenceDeviceIdSchema.nullable()
13037
+ });
13038
+ object({
13039
+ /** Absent: every namespace the caller holds. */
13040
+ namespaces: array(PreferenceNamespaceSchema).max(32).optional() });
13041
+ object({ rows: array(PreferenceRowSchema) });
13042
+ object({
13043
+ namespace: PreferenceNamespaceSchema,
13044
+ value: PreferenceValueSchema,
13045
+ /**
13046
+ * The revision the edit was based on. Absent: last write wins. `0`: the
13047
+ * namespace must not exist yet. Any other value that is not the current
13048
+ * revision answers `conflict` and writes nothing.
13049
+ */
13050
+ baseRevision: number().int().nonnegative().optional(),
13051
+ deviceId: PreferenceDeviceIdSchema.optional()
13052
+ });
13053
+ discriminatedUnion("status", [object({
13054
+ status: literal("saved"),
13055
+ row: PreferenceRowSchema
13056
+ }), object({
13057
+ status: literal("conflict"),
13058
+ current: PreferenceRowSchema.nullable()
13059
+ })]);
13060
+ object({ namespace: PreferenceNamespaceSchema });
13061
+ object({
13062
+ /** `false` when the namespace did not exist. */
13063
+ deleted: boolean() });
13064
+ object({
13065
+ /** The revision the client holds per namespace; a namespace it does not list is new to it. */
13066
+ revisionByNamespace: record(PreferenceNamespaceSchema, number().int().nonnegative()).refine((map) => Object.keys(map).length <= 32, { message: `at most 32 namespaces` }) });
13067
+ object({
13068
+ /** Every row whose revision differs from the client's, and every row it did not list. */
13069
+ rows: array(PreferenceRowSchema),
13070
+ /** Namespaces the client listed that no longer exist. */
13071
+ deleted: array(PreferenceNamespaceSchema)
13072
+ });
13022
13073
  _enum(["new-session", "step-up"]);
13023
13074
  /** The languages the hub's app landing pages are written in (D858). */
13024
13075
  var AppPageLangSchema = _enum(["en", "it"]);
@@ -39914,38 +39965,37 @@ method(LlmRuntimeCompleteInputSchema, LlmGenerateResultSchema, {
39914
39965
  auth: "admin",
39915
39966
  timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
39916
39967
  });
39968
+ var LlmProfileKindSchema = string().regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "a kind id is lower-case letters, digits and dashes");
39969
+ /** What a model (or, by default, every model of a kind) can do. */
39970
+ var LlmModelFeaturesSchema = object({
39971
+ vision: boolean(),
39972
+ tools: boolean(),
39973
+ streaming: boolean()
39974
+ });
39975
+ /** One model a provider offers. `features` overrides the kind's defaults, per field. */
39976
+ var LlmModelInfoSchema = object({
39977
+ id: string(),
39978
+ label: string().optional(),
39979
+ contextLength: number().int().positive().optional(),
39980
+ features: LlmModelFeaturesSchema.partial().optional()
39981
+ });
39917
39982
  /**
39918
- * `llm` — consumer-facing LLM surface (spec §1-§3). Collection-mode: array
39919
- * methods concat-fan across providers; single-row methods route to ONE
39920
- * provider by the `addonId` in the call input (the notification-output
39921
- * posture, notification-output.cap.ts:215-250). Provided by `addon-ai`
39922
- * (hub-placed); the cap stays open for future providers.
39923
- *
39924
- * Profiles are ROWS (data), not addons: one row = one usable model endpoint.
39925
- * `apiKey` is a password field — providers REDACT it on read and merge on
39926
- * write; a stored key NEVER round-trips to a client.
39983
+ * The provider-specific part of a profile, validated by the provider that owns
39984
+ * the kind (`upsertProfile` refuses what it does not accept). A field its
39985
+ * `connectionSchema` declares `type: 'password'` is a secret: it is held in the
39986
+ * keychain, never in the row, and reads back as the redaction marker.
39927
39987
  */
39928
- var LlmProfileKindSchema = _enum([
39929
- "openai-compatible",
39930
- "openai",
39931
- "anthropic",
39932
- "google",
39933
- "managed-local",
39934
- "apple-foundation"
39935
- ]);
39988
+ var LlmProviderConfigSchema = record(string(), unknown());
39936
39989
  var LlmProfileSchema = object({
39937
39990
  id: string(),
39938
39991
  name: string(),
39992
+ /** The provider-declared kind (`LlmProfileKindDescriptor.kind`). */
39939
39993
  kind: LlmProfileKindSchema,
39940
39994
  /** Stamped by the provider — keeps the fanned catalog routable. */
39941
39995
  addonId: string(),
39942
39996
  enabled: boolean(),
39943
39997
  /** Vendor model id, or the managed runtime's loaded model. */
39944
39998
  model: string(),
39945
- /** Required for openai-compatible; override for cloud kinds. */
39946
- baseUrl: string().optional(),
39947
- /** ConfigUISchema type:'password' — never round-trips (spec §5). */
39948
- apiKey: string().optional(),
39949
39999
  /** Vision on/off. A vision call against a `false` profile is REFUSED, never
39950
40000
  * degraded to text — that shipped once and produced a confident answer to a
39951
40001
  * question about a picture nobody sent. */
@@ -39953,15 +40003,11 @@ var LlmProfileSchema = object({
39953
40003
  temperature: number().min(0).max(2).optional(),
39954
40004
  /** Nucleus sampling. Every wire we speak has it. */
39955
40005
  topP: number().min(0).max(1).optional(),
39956
- /** Top-k sampling. Carried only by the wires that have it — NEITHER OpenAI
39957
- * wire does, and the client drops it there (measured: the request body gets
39958
- * `top_p` and no `top_k`). The profile editor hides the field wherever it
39959
- * would change nothing; `KINDS_WITH_TOP_K` is the single owner of that list. */
40006
+ /** Top-k sampling. Carried only by the wires that have it — a kind offers the
40007
+ * field in its editor only when its descriptor lists it in `profileFields`. */
39960
40008
  topK: number().int().positive().optional(),
39961
40009
  maxTokens: number().int().positive().optional(),
39962
- /** Prompt context window. Advisory for cloud kinds (they enforce their own);
39963
- * for `managed-local` it is the llama.cpp `--ctx-size` the runtime starts
39964
- * the model with, so it is the one field that changes a PROCESS. */
40010
+ /** Prompt context window. Advisory for cloud kinds (they enforce their own). */
39965
40011
  contextLength: number().int().positive().optional(),
39966
40012
  /** Default system prompt. A caller's `system` REPLACES it (never appends —
39967
40013
  * two system prompts fighting is worse than either alone). */
@@ -39987,16 +40033,37 @@ var LlmProfileSchema = object({
39987
40033
  * library; the REGISTRY of callable tools is ours and is empty in v1, so a
39988
40034
  * `true` here buys the wiring, not behaviour, until tools are registered. */
39989
40035
  toolsEnabled: boolean().default(false),
39990
- extraHeaders: record(string(), string()).optional(),
39991
- /** kind === 'managed-local' only (spec §4). */
39992
- runtime: ManagedRuntimeConfigSchema.optional(),
39993
- /**
39994
- * kind === 'apple-foundation' only: WHERE it runs — the only thing there is
39995
- * to configure (no key, no URL, no download; `model` is `apple-system`).
39996
- * `supportsVision` on such a row is stamped by the provider from the node's
39997
- * reported `imageInput`, never taken from the operator (D62).
39998
- */
39999
- appleFoundation: object({ nodeId: string() }).optional()
40036
+ /** Everything the kind's provider owns (endpoint, key, node, runtime…). */
40037
+ providerConfig: LlmProviderConfigSchema.default({})
40038
+ });
40039
+ /**
40040
+ * The common profile fields a kind's editor offers. The editor owns how each
40041
+ * one is drawn; the provider says which of them mean something on its wire.
40042
+ */
40043
+ var LlmProfileFieldSchema = _enum([
40044
+ "temperature",
40045
+ "topP",
40046
+ "topK",
40047
+ "maxTokens",
40048
+ "contextLength",
40049
+ "systemPrompt",
40050
+ "timeoutMs",
40051
+ "connectTimeoutMs",
40052
+ "firstTokenTimeoutMs",
40053
+ "idleTimeoutMs",
40054
+ "retry",
40055
+ "toolsEnabled"
40056
+ ]);
40057
+ /**
40058
+ * A provider-drawn part of the editor, by a generic widget id the admin UI
40059
+ * registers (`ai/apple-node`). `placement: 'model'` replaces the generic model
40060
+ * picker: that widget owns the model choice.
40061
+ */
40062
+ var LlmProviderWidgetSchema = object({
40063
+ id: string(),
40064
+ placement: _enum(["connection", "model"]),
40065
+ /** `providerConfig` keys this widget must fill before the profile can be saved. */
40066
+ requires: array(string()).optional()
40000
40067
  });
40001
40068
  /** ConfigUISchema tree passed through untyped on the wire (the
40002
40069
  * notification-output `ConfigSchemaPassthrough` precedent at
@@ -40005,11 +40072,56 @@ var ConfigSchemaPassthrough$3 = unknown();
40005
40072
  var LlmProfileKindDescriptorSchema = object({
40006
40073
  kind: LlmProfileKindSchema,
40007
40074
  label: string(),
40075
+ /** A generic icon name (`cloud`, `plug`, `cpu`) — never a glyph or a logo. */
40008
40076
  icon: string(),
40009
40077
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
40010
40078
  addonId: string(),
40011
- configSchema: ConfigSchemaPassthrough$3
40079
+ /** The provider's own fields (`providerConfig`); `password` fields are keychain-held. */
40080
+ connectionSchema: ConfigSchemaPassthrough$3,
40081
+ /** Provider fields that belong under "Advanced" (extra headers, runtime tuning). */
40082
+ advancedSchema: ConfigSchemaPassthrough$3.optional(),
40083
+ /** The kind's defaults; a model from `listModels` may override any of them. */
40084
+ features: LlmModelFeaturesSchema,
40085
+ /** `false` = the provider stamps `supportsVision` itself (from what a node reports). */
40086
+ visionEditable: boolean(),
40087
+ /** Where the model list comes from: `listModels`, `staticModels`, or nowhere. */
40088
+ modelCatalog: _enum([
40089
+ "fetch",
40090
+ "static",
40091
+ "none"
40092
+ ]),
40093
+ staticModels: array(LlmModelInfoSchema).optional(),
40094
+ /** The common fields that mean something on this kind's wire. */
40095
+ profileFields: array(LlmProfileFieldSchema),
40096
+ providerWidgets: array(LlmProviderWidgetSchema).optional()
40012
40097
  });
40098
+ /**
40099
+ * `listModels` input. `connection` is an UNSAVED draft of `providerConfig`
40100
+ * (the editor's form); with `profileId` too, a secret the draft leaves
40101
+ * untouched (absent or the redaction marker) is resolved server-side from the
40102
+ * stored profile — the browser never receives it.
40103
+ */
40104
+ var LlmListModelsInputSchema = object({
40105
+ addonId: string(),
40106
+ kind: LlmProfileKindSchema,
40107
+ profileId: string().optional(),
40108
+ connection: LlmProviderConfigSchema.optional()
40109
+ });
40110
+ var LlmListModelsErrorCodeSchema = _enum([
40111
+ "auth",
40112
+ "network",
40113
+ "unsupported",
40114
+ "invalid"
40115
+ ]);
40116
+ /** A RESULT, never a throw: "wrong key" is an answer the editor renders inline. */
40117
+ var LlmListModelsResultSchema = discriminatedUnion("ok", [object({
40118
+ ok: literal(true),
40119
+ models: array(LlmModelInfoSchema)
40120
+ }), object({
40121
+ ok: literal(false),
40122
+ code: LlmListModelsErrorCodeSchema,
40123
+ message: string()
40124
+ })]);
40013
40125
  var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
40014
40126
  var LlmDefaultSchema = object({
40015
40127
  selector: LlmDefaultSelectorSchema,
@@ -40109,7 +40221,10 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
40109
40221
  kind: "mutation",
40110
40222
  auth: "admin",
40111
40223
  timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
40112
- }), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
40224
+ }), method(LlmListModelsInputSchema, LlmListModelsResultSchema, {
40225
+ kind: "mutation",
40226
+ auth: "admin"
40227
+ }), method(object({}), array(LlmDefaultSchema)), method(object({
40113
40228
  selector: LlmDefaultSelectorSchema,
40114
40229
  profileId: string().nullable()
40115
40230
  }), _void(), {
@@ -61104,26 +61219,6 @@ var ApiKeySummarySchema = object({
61104
61219
  createdAt: number(),
61105
61220
  lastUsedAt: number().optional()
61106
61221
  });
61107
- var ScopedTokenSummarySchema = object({
61108
- id: string(),
61109
- userId: string(),
61110
- name: string(),
61111
- tokenPrefix: string(),
61112
- scopes: array(TokenScopeSchema),
61113
- expiresAt: number().nullish(),
61114
- lastUsedAt: number().nullish(),
61115
- createdAt: number()
61116
- });
61117
- var CreateScopedTokenInputSchema = object({
61118
- userId: string(),
61119
- name: string(),
61120
- scopes: array(TokenScopeSchema),
61121
- expiresAt: number().optional()
61122
- });
61123
- var CreateScopedTokenResultSchema = object({
61124
- token: string(),
61125
- record: ScopedTokenSummarySchema
61126
- });
61127
61222
  var OauthSessionSummarySchema = object({
61128
61223
  id: string(),
61129
61224
  userId: string(),
@@ -61145,11 +61240,11 @@ var TotpStatusSchema = object({
61145
61240
  confirmedAt: number().nullable()
61146
61241
  });
61147
61242
  /**
61148
- * user-management — singleton capability for user accounts, API keys,
61149
- * and scoped tokens.
61243
+ * user-management — singleton capability for user accounts and the
61244
+ * legacy API-key rows.
61150
61245
  *
61151
61246
  * v2 model: every method gated by `auth: 'admin'`. Admin-only delegation
61152
- * — the subset check on `setUserScopes` / `createScopedToken` is moot
61247
+ * — the subset check on `setUserScopes` is moot
61153
61248
  * because non-admins never reach these. If/when we open non-admin
61154
61249
  * delegation, structural caller-scope subset check goes inside the
61155
61250
  * provider.
@@ -61206,15 +61301,7 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
61206
61301
  kind: "mutation",
61207
61302
  auth: "admin",
61208
61303
  access: "delete"
61209
- }), method(CreateScopedTokenInputSchema, CreateScopedTokenResultSchema, {
61210
- kind: "mutation",
61211
- auth: "admin",
61212
- access: "create"
61213
- }), method(object({ id: string() }), object({ success: literal(true) }), {
61214
- kind: "mutation",
61215
- auth: "admin",
61216
- access: "delete"
61217
- }), method(object({ token: string() }), ScopedTokenSummarySchema.nullable(), { access: "view" }), method(object({ userId: string() }), array(ScopedTokenSummarySchema), { auth: "admin" }), method(object({ userId: string() }), TotpSetupResultSchema, {
61304
+ }), method(object({ userId: string() }), TotpSetupResultSchema, {
61218
61305
  kind: "mutation",
61219
61306
  auth: "admin",
61220
61307
  access: "create"
@@ -65470,7 +65557,7 @@ Object.freeze({
65470
65557
  capName: "llm",
65471
65558
  capScope: "system",
65472
65559
  addonId: null,
65473
- access: "view"
65560
+ access: "create"
65474
65561
  },
65475
65562
  "llm.listNodeModels": {
65476
65563
  capName: "llm",
@@ -70134,12 +70221,6 @@ Object.freeze({
70134
70221
  addonId: null,
70135
70222
  access: "create"
70136
70223
  },
70137
- "userManagement.createScopedToken": {
70138
- capName: "user-management",
70139
- capScope: "system",
70140
- addonId: null,
70141
- access: "create"
70142
- },
70143
70224
  "userManagement.createUser": {
70144
70225
  capName: "user-management",
70145
70226
  capScope: "system",
@@ -70188,12 +70269,6 @@ Object.freeze({
70188
70269
  addonId: null,
70189
70270
  access: "view"
70190
70271
  },
70191
- "userManagement.listScopedTokens": {
70192
- capName: "user-management",
70193
- capScope: "system",
70194
- addonId: null,
70195
- access: "view"
70196
- },
70197
70272
  "userManagement.listUsers": {
70198
70273
  capName: "user-management",
70199
70274
  capScope: "system",
@@ -70248,12 +70323,6 @@ Object.freeze({
70248
70323
  addonId: null,
70249
70324
  access: "delete"
70250
70325
  },
70251
- "userManagement.revokeScopedToken": {
70252
- capName: "user-management",
70253
- capScope: "system",
70254
- addonId: null,
70255
- access: "delete"
70256
- },
70257
70326
  "userManagement.setupTotp": {
70258
70327
  capName: "user-management",
70259
70328
  capScope: "system",
@@ -70284,12 +70353,6 @@ Object.freeze({
70284
70353
  addonId: null,
70285
70354
  access: "view"
70286
70355
  },
70287
- "userManagement.validateScopedToken": {
70288
- capName: "user-management",
70289
- capScope: "system",
70290
- addonId: null,
70291
- access: "view"
70292
- },
70293
70356
  "userManagement.verifyTotp": {
70294
70357
  capName: "user-management",
70295
70358
  capScope: "system",