@camstack/addon-provider-homeassistant 1.2.605 → 1.2.606
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.
- package/dist/addon.js +1 -1
- package/dist/addon.mjs +1 -1
- package/dist/{dist-DV_2NKnd.mjs → dist-CyQP92x0.mjs} +165 -102
- package/dist/{dist-DWBNf9hd.js → dist-DrmU50mp.js} +165 -102
- package/dist/ha-export/ha-export.addon.js +1 -1
- package/dist/ha-export/ha-export.addon.mjs +1 -1
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-DrmU50mp.js");
|
|
3
3
|
let node_crypto = require("node:crypto");
|
|
4
4
|
let node_zlib = require("node:zlib");
|
|
5
5
|
//#region src/ha-admin-link.ts
|
package/dist/addon.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as connectivityCapability, At as boolean, B as floodCapability, Bt as EventCategory, C as buildAddonRouteProvider, Ct as defineEntryKind, D as carbonMonoxideCapability, Dt as settingsBrokersAdoptsFrom, E as calendarSourceCapability, F as deviceAdoptionCapability, Ft as record, G as lawnMowerControlCapability, H as humidifierCapability, It as string, J as motionCapability, K as lockControlCapability, L as enumSensorCapability, Lt as union, M as controlCapability, Mt as literal, N as coverCapability, Nt as number, O as climateControlCapability, Ot as _enum, P as deviceAdminLinkCapability, Pt as object, Q as numericSensorCapability, R as eventEmitterCapability, Rt as unknown, S as brokerCapability, St as createEvent, T as buttonCapability, Tt as entryBody, U as humiditySensorCapability, V as gasCapability, W as imageCapability, X as notificationOutputCapability, Y as normalizeUnit, Z as notifierCapability, _ as automationControlCapability, _t as DeviceRole, at as scriptRunnerCapability, b as binaryCapability, ct as tamperCapability, d as TargetSchema, dt as vacuumControlCapability, et as parseAdminBase, f as accessoriesCapability, ft as valveCapability, g as ambientLightSensorCapability, gt as DeviceFeature, h as alarmPanelCapability, ht as weatherCapability, it as pressureSensorCapability, j as contactCapability, jt as discriminatedUnion, k as colorCapability, kt as array, lt as temperatureSensorCapability, m as airQualitySensorCapability, mt as waterHeaterCapability, n as BaseDevice, nt as prepareNotification, ot as smokeCapability, p as addonRoutesCapability, pt as vibrationCapability, q as mediaPlayerCapability, r as BaseDeviceProvider, rt as presenceCapability, s as EnumSensorDateTimeFormatSchema, st as switchCapability, tt as powerMeterCapability, ut as updateCapability, v as batteryCapability, vt as DeviceType, w as buildDeviceAdminUrl, wt as defineRecordKinds, x as brightnessCapability, xt as RecordSecretUnavailableError, y as bestLocationMatch, yt as errMsg, z as fanControlCapability, zt as url } from "./dist-
|
|
1
|
+
import { A as connectivityCapability, At as boolean, B as floodCapability, Bt as EventCategory, C as buildAddonRouteProvider, Ct as defineEntryKind, D as carbonMonoxideCapability, Dt as settingsBrokersAdoptsFrom, E as calendarSourceCapability, F as deviceAdoptionCapability, Ft as record, G as lawnMowerControlCapability, H as humidifierCapability, It as string, J as motionCapability, K as lockControlCapability, L as enumSensorCapability, Lt as union, M as controlCapability, Mt as literal, N as coverCapability, Nt as number, O as climateControlCapability, Ot as _enum, P as deviceAdminLinkCapability, Pt as object, Q as numericSensorCapability, R as eventEmitterCapability, Rt as unknown, S as brokerCapability, St as createEvent, T as buttonCapability, Tt as entryBody, U as humiditySensorCapability, V as gasCapability, W as imageCapability, X as notificationOutputCapability, Y as normalizeUnit, Z as notifierCapability, _ as automationControlCapability, _t as DeviceRole, at as scriptRunnerCapability, b as binaryCapability, ct as tamperCapability, d as TargetSchema, dt as vacuumControlCapability, et as parseAdminBase, f as accessoriesCapability, ft as valveCapability, g as ambientLightSensorCapability, gt as DeviceFeature, h as alarmPanelCapability, ht as weatherCapability, it as pressureSensorCapability, j as contactCapability, jt as discriminatedUnion, k as colorCapability, kt as array, lt as temperatureSensorCapability, m as airQualitySensorCapability, mt as waterHeaterCapability, n as BaseDevice, nt as prepareNotification, ot as smokeCapability, p as addonRoutesCapability, pt as vibrationCapability, q as mediaPlayerCapability, r as BaseDeviceProvider, rt as presenceCapability, s as EnumSensorDateTimeFormatSchema, st as switchCapability, tt as powerMeterCapability, ut as updateCapability, v as batteryCapability, vt as DeviceType, w as buildDeviceAdminUrl, wt as defineRecordKinds, x as brightnessCapability, xt as RecordSecretUnavailableError, y as bestLocationMatch, yt as errMsg, z as fanControlCapability, zt as url } from "./dist-CyQP92x0.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import { brotliCompressSync, deflateSync, gzipSync } from "node:zlib";
|
|
4
4
|
//#region src/ha-admin-link.ts
|
|
@@ -5546,7 +5546,7 @@ var ZodIssueCode = {
|
|
|
5546
5546
|
var ZodFirstPartyTypeKind;
|
|
5547
5547
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5548
5548
|
//#endregion
|
|
5549
|
-
//#region ../types/dist/sleep-
|
|
5549
|
+
//#region ../types/dist/sleep-yKL5gfrH.mjs
|
|
5550
5550
|
/**
|
|
5551
5551
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5552
5552
|
* window to float samples (D455).
|
|
@@ -7929,9 +7929,9 @@ function normalizeAddonInitResult(result) {
|
|
|
7929
7929
|
return result;
|
|
7930
7930
|
}
|
|
7931
7931
|
/**
|
|
7932
|
-
* The share-view scope kinds a
|
|
7933
|
-
* and validates them (`
|
|
7934
|
-
* list); a data plane names the kinds it ACCEPTS in `share`.
|
|
7932
|
+
* The share-view scope kinds a share-link token can carry. The hub mints
|
|
7933
|
+
* and validates them (`ShareViewGrantSchema` builds its
|
|
7934
|
+
* enum from this list); a data plane names the kinds it ACCEPTS in `share`.
|
|
7935
7935
|
*/
|
|
7936
7936
|
var SHARE_VIEW_KINDS = ["grid-view", "events-view"];
|
|
7937
7937
|
/** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
|
|
@@ -13024,7 +13024,7 @@ var ConvertResultSchema = object({
|
|
|
13024
13024
|
* `super_admin` — collapsed onto the single boolean because every
|
|
13025
13025
|
* non-admin caller is governed by the same scope-check rules; the
|
|
13026
13026
|
* distinction was only ever used to route role-specific procedures
|
|
13027
|
-
* which we no longer have. CLI / webhook integrations are `
|
|
13027
|
+
* which we no longer have. CLI / webhook integrations are tokens (`auth.mintToken`)
|
|
13028
13028
|
* with `isAdmin: false` + an explicit scope list.
|
|
13029
13029
|
*/
|
|
13030
13030
|
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
@@ -13213,10 +13213,12 @@ var AddonRoutesScopeSchema = object({
|
|
|
13213
13213
|
type: literal("addon-routes"),
|
|
13214
13214
|
access: array(MethodAccessSchema).min(1)
|
|
13215
13215
|
});
|
|
13216
|
+
var PreferencesSelfScopeSchema = object({ type: literal("preferences-self") });
|
|
13216
13217
|
var CredentialScopeSchema = union([
|
|
13217
13218
|
literal("*"),
|
|
13218
13219
|
ShareViewScopeSchema,
|
|
13219
13220
|
AddonRoutesScopeSchema,
|
|
13221
|
+
PreferencesSelfScopeSchema,
|
|
13220
13222
|
TokenScopeSchema
|
|
13221
13223
|
]);
|
|
13222
13224
|
object({
|
|
@@ -13225,6 +13227,55 @@ object({
|
|
|
13225
13227
|
jti: string().min(16),
|
|
13226
13228
|
scopes: array(CredentialScopeSchema).min(1)
|
|
13227
13229
|
});
|
|
13230
|
+
var PreferenceNamespaceSchema = string().regex(/^[a-z][a-z0-9.-]{0,63}$/);
|
|
13231
|
+
/** A namespace's value: a JSON object, opaque to the hub. */
|
|
13232
|
+
var PreferenceValueSchema = record(string(), unknown());
|
|
13233
|
+
var PreferenceDeviceIdSchema = string().min(1).max(64);
|
|
13234
|
+
/** A stored row, as the owner reads it. */
|
|
13235
|
+
var PreferenceRowSchema = object({
|
|
13236
|
+
namespace: PreferenceNamespaceSchema,
|
|
13237
|
+
value: PreferenceValueSchema,
|
|
13238
|
+
/** Starts at 1, +1 on every write of this namespace. A delete ends the row and its count. */
|
|
13239
|
+
revision: number().int().positive(),
|
|
13240
|
+
updatedAt: number().int(),
|
|
13241
|
+
/** The client id the last writer sent; `null` when it sent none. */
|
|
13242
|
+
updatedByDevice: PreferenceDeviceIdSchema.nullable()
|
|
13243
|
+
});
|
|
13244
|
+
object({
|
|
13245
|
+
/** Absent: every namespace the caller holds. */
|
|
13246
|
+
namespaces: array(PreferenceNamespaceSchema).max(32).optional() });
|
|
13247
|
+
object({ rows: array(PreferenceRowSchema) });
|
|
13248
|
+
object({
|
|
13249
|
+
namespace: PreferenceNamespaceSchema,
|
|
13250
|
+
value: PreferenceValueSchema,
|
|
13251
|
+
/**
|
|
13252
|
+
* The revision the edit was based on. Absent: last write wins. `0`: the
|
|
13253
|
+
* namespace must not exist yet. Any other value that is not the current
|
|
13254
|
+
* revision answers `conflict` and writes nothing.
|
|
13255
|
+
*/
|
|
13256
|
+
baseRevision: number().int().nonnegative().optional(),
|
|
13257
|
+
deviceId: PreferenceDeviceIdSchema.optional()
|
|
13258
|
+
});
|
|
13259
|
+
discriminatedUnion("status", [object({
|
|
13260
|
+
status: literal("saved"),
|
|
13261
|
+
row: PreferenceRowSchema
|
|
13262
|
+
}), object({
|
|
13263
|
+
status: literal("conflict"),
|
|
13264
|
+
current: PreferenceRowSchema.nullable()
|
|
13265
|
+
})]);
|
|
13266
|
+
object({ namespace: PreferenceNamespaceSchema });
|
|
13267
|
+
object({
|
|
13268
|
+
/** `false` when the namespace did not exist. */
|
|
13269
|
+
deleted: boolean() });
|
|
13270
|
+
object({
|
|
13271
|
+
/** The revision the client holds per namespace; a namespace it does not list is new to it. */
|
|
13272
|
+
revisionByNamespace: record(PreferenceNamespaceSchema, number().int().nonnegative()).refine((map) => Object.keys(map).length <= 32, { message: `at most 32 namespaces` }) });
|
|
13273
|
+
object({
|
|
13274
|
+
/** Every row whose revision differs from the client's, and every row it did not list. */
|
|
13275
|
+
rows: array(PreferenceRowSchema),
|
|
13276
|
+
/** Namespaces the client listed that no longer exist. */
|
|
13277
|
+
deleted: array(PreferenceNamespaceSchema)
|
|
13278
|
+
});
|
|
13228
13279
|
_enum(["new-session", "step-up"]);
|
|
13229
13280
|
/** The languages the hub's app landing pages are written in (D858). */
|
|
13230
13281
|
var AppPageLangSchema = _enum(["en", "it"]);
|
|
@@ -40703,38 +40754,37 @@ method(LlmRuntimeCompleteInputSchema, LlmGenerateResultSchema, {
|
|
|
40703
40754
|
auth: "admin",
|
|
40704
40755
|
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
40705
40756
|
});
|
|
40757
|
+
var LlmProfileKindSchema = string().regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "a kind id is lower-case letters, digits and dashes");
|
|
40758
|
+
/** What a model (or, by default, every model of a kind) can do. */
|
|
40759
|
+
var LlmModelFeaturesSchema = object({
|
|
40760
|
+
vision: boolean(),
|
|
40761
|
+
tools: boolean(),
|
|
40762
|
+
streaming: boolean()
|
|
40763
|
+
});
|
|
40764
|
+
/** One model a provider offers. `features` overrides the kind's defaults, per field. */
|
|
40765
|
+
var LlmModelInfoSchema = object({
|
|
40766
|
+
id: string(),
|
|
40767
|
+
label: string().optional(),
|
|
40768
|
+
contextLength: number().int().positive().optional(),
|
|
40769
|
+
features: LlmModelFeaturesSchema.partial().optional()
|
|
40770
|
+
});
|
|
40706
40771
|
/**
|
|
40707
|
-
*
|
|
40708
|
-
*
|
|
40709
|
-
*
|
|
40710
|
-
*
|
|
40711
|
-
* (hub-placed); the cap stays open for future providers.
|
|
40712
|
-
*
|
|
40713
|
-
* Profiles are ROWS (data), not addons: one row = one usable model endpoint.
|
|
40714
|
-
* `apiKey` is a password field — providers REDACT it on read and merge on
|
|
40715
|
-
* write; a stored key NEVER round-trips to a client.
|
|
40772
|
+
* The provider-specific part of a profile, validated by the provider that owns
|
|
40773
|
+
* the kind (`upsertProfile` refuses what it does not accept). A field its
|
|
40774
|
+
* `connectionSchema` declares `type: 'password'` is a secret: it is held in the
|
|
40775
|
+
* keychain, never in the row, and reads back as the redaction marker.
|
|
40716
40776
|
*/
|
|
40717
|
-
var
|
|
40718
|
-
"openai-compatible",
|
|
40719
|
-
"openai",
|
|
40720
|
-
"anthropic",
|
|
40721
|
-
"google",
|
|
40722
|
-
"managed-local",
|
|
40723
|
-
"apple-foundation"
|
|
40724
|
-
]);
|
|
40777
|
+
var LlmProviderConfigSchema = record(string(), unknown());
|
|
40725
40778
|
var LlmProfileSchema = object({
|
|
40726
40779
|
id: string(),
|
|
40727
40780
|
name: string(),
|
|
40781
|
+
/** The provider-declared kind (`LlmProfileKindDescriptor.kind`). */
|
|
40728
40782
|
kind: LlmProfileKindSchema,
|
|
40729
40783
|
/** Stamped by the provider — keeps the fanned catalog routable. */
|
|
40730
40784
|
addonId: string(),
|
|
40731
40785
|
enabled: boolean(),
|
|
40732
40786
|
/** Vendor model id, or the managed runtime's loaded model. */
|
|
40733
40787
|
model: string(),
|
|
40734
|
-
/** Required for openai-compatible; override for cloud kinds. */
|
|
40735
|
-
baseUrl: string().optional(),
|
|
40736
|
-
/** ConfigUISchema type:'password' — never round-trips (spec §5). */
|
|
40737
|
-
apiKey: string().optional(),
|
|
40738
40788
|
/** Vision on/off. A vision call against a `false` profile is REFUSED, never
|
|
40739
40789
|
* degraded to text — that shipped once and produced a confident answer to a
|
|
40740
40790
|
* question about a picture nobody sent. */
|
|
@@ -40742,15 +40792,11 @@ var LlmProfileSchema = object({
|
|
|
40742
40792
|
temperature: number().min(0).max(2).optional(),
|
|
40743
40793
|
/** Nucleus sampling. Every wire we speak has it. */
|
|
40744
40794
|
topP: number().min(0).max(1).optional(),
|
|
40745
|
-
/** Top-k sampling. Carried only by the wires that have it —
|
|
40746
|
-
*
|
|
40747
|
-
* `top_p` and no `top_k`). The profile editor hides the field wherever it
|
|
40748
|
-
* would change nothing; `KINDS_WITH_TOP_K` is the single owner of that list. */
|
|
40795
|
+
/** Top-k sampling. Carried only by the wires that have it — a kind offers the
|
|
40796
|
+
* field in its editor only when its descriptor lists it in `profileFields`. */
|
|
40749
40797
|
topK: number().int().positive().optional(),
|
|
40750
40798
|
maxTokens: number().int().positive().optional(),
|
|
40751
|
-
/** Prompt context window. Advisory for cloud kinds (they enforce their own)
|
|
40752
|
-
* for `managed-local` it is the llama.cpp `--ctx-size` the runtime starts
|
|
40753
|
-
* the model with, so it is the one field that changes a PROCESS. */
|
|
40799
|
+
/** Prompt context window. Advisory for cloud kinds (they enforce their own). */
|
|
40754
40800
|
contextLength: number().int().positive().optional(),
|
|
40755
40801
|
/** Default system prompt. A caller's `system` REPLACES it (never appends —
|
|
40756
40802
|
* two system prompts fighting is worse than either alone). */
|
|
@@ -40776,16 +40822,37 @@ var LlmProfileSchema = object({
|
|
|
40776
40822
|
* library; the REGISTRY of callable tools is ours and is empty in v1, so a
|
|
40777
40823
|
* `true` here buys the wiring, not behaviour, until tools are registered. */
|
|
40778
40824
|
toolsEnabled: boolean().default(false),
|
|
40779
|
-
|
|
40780
|
-
|
|
40781
|
-
|
|
40782
|
-
|
|
40783
|
-
|
|
40784
|
-
|
|
40785
|
-
|
|
40786
|
-
|
|
40787
|
-
|
|
40788
|
-
|
|
40825
|
+
/** Everything the kind's provider owns (endpoint, key, node, runtime…). */
|
|
40826
|
+
providerConfig: LlmProviderConfigSchema.default({})
|
|
40827
|
+
});
|
|
40828
|
+
/**
|
|
40829
|
+
* The common profile fields a kind's editor offers. The editor owns how each
|
|
40830
|
+
* one is drawn; the provider says which of them mean something on its wire.
|
|
40831
|
+
*/
|
|
40832
|
+
var LlmProfileFieldSchema = _enum([
|
|
40833
|
+
"temperature",
|
|
40834
|
+
"topP",
|
|
40835
|
+
"topK",
|
|
40836
|
+
"maxTokens",
|
|
40837
|
+
"contextLength",
|
|
40838
|
+
"systemPrompt",
|
|
40839
|
+
"timeoutMs",
|
|
40840
|
+
"connectTimeoutMs",
|
|
40841
|
+
"firstTokenTimeoutMs",
|
|
40842
|
+
"idleTimeoutMs",
|
|
40843
|
+
"retry",
|
|
40844
|
+
"toolsEnabled"
|
|
40845
|
+
]);
|
|
40846
|
+
/**
|
|
40847
|
+
* A provider-drawn part of the editor, by a generic widget id the admin UI
|
|
40848
|
+
* registers (`ai/apple-node`). `placement: 'model'` replaces the generic model
|
|
40849
|
+
* picker: that widget owns the model choice.
|
|
40850
|
+
*/
|
|
40851
|
+
var LlmProviderWidgetSchema = object({
|
|
40852
|
+
id: string(),
|
|
40853
|
+
placement: _enum(["connection", "model"]),
|
|
40854
|
+
/** `providerConfig` keys this widget must fill before the profile can be saved. */
|
|
40855
|
+
requires: array(string()).optional()
|
|
40789
40856
|
});
|
|
40790
40857
|
/** ConfigUISchema tree passed through untyped on the wire (the
|
|
40791
40858
|
* notification-output `ConfigSchemaPassthrough` precedent at
|
|
@@ -40794,11 +40861,56 @@ var ConfigSchemaPassthrough$3 = unknown();
|
|
|
40794
40861
|
var LlmProfileKindDescriptorSchema = object({
|
|
40795
40862
|
kind: LlmProfileKindSchema,
|
|
40796
40863
|
label: string(),
|
|
40864
|
+
/** A generic icon name (`cloud`, `plug`, `cpu`) — never a glyph or a logo. */
|
|
40797
40865
|
icon: string(),
|
|
40798
40866
|
/** Stamped by each provider so the concat-fanned catalog stays routable. */
|
|
40799
40867
|
addonId: string(),
|
|
40800
|
-
|
|
40868
|
+
/** The provider's own fields (`providerConfig`); `password` fields are keychain-held. */
|
|
40869
|
+
connectionSchema: ConfigSchemaPassthrough$3,
|
|
40870
|
+
/** Provider fields that belong under "Advanced" (extra headers, runtime tuning). */
|
|
40871
|
+
advancedSchema: ConfigSchemaPassthrough$3.optional(),
|
|
40872
|
+
/** The kind's defaults; a model from `listModels` may override any of them. */
|
|
40873
|
+
features: LlmModelFeaturesSchema,
|
|
40874
|
+
/** `false` = the provider stamps `supportsVision` itself (from what a node reports). */
|
|
40875
|
+
visionEditable: boolean(),
|
|
40876
|
+
/** Where the model list comes from: `listModels`, `staticModels`, or nowhere. */
|
|
40877
|
+
modelCatalog: _enum([
|
|
40878
|
+
"fetch",
|
|
40879
|
+
"static",
|
|
40880
|
+
"none"
|
|
40881
|
+
]),
|
|
40882
|
+
staticModels: array(LlmModelInfoSchema).optional(),
|
|
40883
|
+
/** The common fields that mean something on this kind's wire. */
|
|
40884
|
+
profileFields: array(LlmProfileFieldSchema),
|
|
40885
|
+
providerWidgets: array(LlmProviderWidgetSchema).optional()
|
|
40801
40886
|
});
|
|
40887
|
+
/**
|
|
40888
|
+
* `listModels` input. `connection` is an UNSAVED draft of `providerConfig`
|
|
40889
|
+
* (the editor's form); with `profileId` too, a secret the draft leaves
|
|
40890
|
+
* untouched (absent or the redaction marker) is resolved server-side from the
|
|
40891
|
+
* stored profile — the browser never receives it.
|
|
40892
|
+
*/
|
|
40893
|
+
var LlmListModelsInputSchema = object({
|
|
40894
|
+
addonId: string(),
|
|
40895
|
+
kind: LlmProfileKindSchema,
|
|
40896
|
+
profileId: string().optional(),
|
|
40897
|
+
connection: LlmProviderConfigSchema.optional()
|
|
40898
|
+
});
|
|
40899
|
+
var LlmListModelsErrorCodeSchema = _enum([
|
|
40900
|
+
"auth",
|
|
40901
|
+
"network",
|
|
40902
|
+
"unsupported",
|
|
40903
|
+
"invalid"
|
|
40904
|
+
]);
|
|
40905
|
+
/** A RESULT, never a throw: "wrong key" is an answer the editor renders inline. */
|
|
40906
|
+
var LlmListModelsResultSchema = discriminatedUnion("ok", [object({
|
|
40907
|
+
ok: literal(true),
|
|
40908
|
+
models: array(LlmModelInfoSchema)
|
|
40909
|
+
}), object({
|
|
40910
|
+
ok: literal(false),
|
|
40911
|
+
code: LlmListModelsErrorCodeSchema,
|
|
40912
|
+
message: string()
|
|
40913
|
+
})]);
|
|
40802
40914
|
var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
|
|
40803
40915
|
var LlmDefaultSchema = object({
|
|
40804
40916
|
selector: LlmDefaultSelectorSchema,
|
|
@@ -40898,7 +41010,10 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
|
40898
41010
|
kind: "mutation",
|
|
40899
41011
|
auth: "admin",
|
|
40900
41012
|
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
40901
|
-
}), method(
|
|
41013
|
+
}), method(LlmListModelsInputSchema, LlmListModelsResultSchema, {
|
|
41014
|
+
kind: "mutation",
|
|
41015
|
+
auth: "admin"
|
|
41016
|
+
}), method(object({}), array(LlmDefaultSchema)), method(object({
|
|
40902
41017
|
selector: LlmDefaultSelectorSchema,
|
|
40903
41018
|
profileId: string().nullable()
|
|
40904
41019
|
}), _void(), {
|
|
@@ -64923,26 +65038,6 @@ var ApiKeySummarySchema = object({
|
|
|
64923
65038
|
createdAt: number(),
|
|
64924
65039
|
lastUsedAt: number().optional()
|
|
64925
65040
|
});
|
|
64926
|
-
var ScopedTokenSummarySchema = object({
|
|
64927
|
-
id: string(),
|
|
64928
|
-
userId: string(),
|
|
64929
|
-
name: string(),
|
|
64930
|
-
tokenPrefix: string(),
|
|
64931
|
-
scopes: array(TokenScopeSchema),
|
|
64932
|
-
expiresAt: number().nullish(),
|
|
64933
|
-
lastUsedAt: number().nullish(),
|
|
64934
|
-
createdAt: number()
|
|
64935
|
-
});
|
|
64936
|
-
var CreateScopedTokenInputSchema = object({
|
|
64937
|
-
userId: string(),
|
|
64938
|
-
name: string(),
|
|
64939
|
-
scopes: array(TokenScopeSchema),
|
|
64940
|
-
expiresAt: number().optional()
|
|
64941
|
-
});
|
|
64942
|
-
var CreateScopedTokenResultSchema = object({
|
|
64943
|
-
token: string(),
|
|
64944
|
-
record: ScopedTokenSummarySchema
|
|
64945
|
-
});
|
|
64946
65041
|
var OauthSessionSummarySchema = object({
|
|
64947
65042
|
id: string(),
|
|
64948
65043
|
userId: string(),
|
|
@@ -64964,11 +65059,11 @@ var TotpStatusSchema = object({
|
|
|
64964
65059
|
confirmedAt: number().nullable()
|
|
64965
65060
|
});
|
|
64966
65061
|
/**
|
|
64967
|
-
* user-management — singleton capability for user accounts
|
|
64968
|
-
*
|
|
65062
|
+
* user-management — singleton capability for user accounts and the
|
|
65063
|
+
* legacy API-key rows.
|
|
64969
65064
|
*
|
|
64970
65065
|
* v2 model: every method gated by `auth: 'admin'`. Admin-only delegation
|
|
64971
|
-
* — the subset check on `setUserScopes`
|
|
65066
|
+
* — the subset check on `setUserScopes` is moot
|
|
64972
65067
|
* because non-admins never reach these. If/when we open non-admin
|
|
64973
65068
|
* delegation, structural caller-scope subset check goes inside the
|
|
64974
65069
|
* provider.
|
|
@@ -65025,15 +65120,7 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
|
|
|
65025
65120
|
kind: "mutation",
|
|
65026
65121
|
auth: "admin",
|
|
65027
65122
|
access: "delete"
|
|
65028
|
-
}), method(
|
|
65029
|
-
kind: "mutation",
|
|
65030
|
-
auth: "admin",
|
|
65031
|
-
access: "create"
|
|
65032
|
-
}), method(object({ id: string() }), object({ success: literal(true) }), {
|
|
65033
|
-
kind: "mutation",
|
|
65034
|
-
auth: "admin",
|
|
65035
|
-
access: "delete"
|
|
65036
|
-
}), method(object({ token: string() }), ScopedTokenSummarySchema.nullable(), { access: "view" }), method(object({ userId: string() }), array(ScopedTokenSummarySchema), { auth: "admin" }), method(object({ userId: string() }), TotpSetupResultSchema, {
|
|
65123
|
+
}), method(object({ userId: string() }), TotpSetupResultSchema, {
|
|
65037
65124
|
kind: "mutation",
|
|
65038
65125
|
auth: "admin",
|
|
65039
65126
|
access: "create"
|
|
@@ -71123,7 +71210,7 @@ Object.freeze({
|
|
|
71123
71210
|
capName: "llm",
|
|
71124
71211
|
capScope: "system",
|
|
71125
71212
|
addonId: null,
|
|
71126
|
-
access: "
|
|
71213
|
+
access: "create"
|
|
71127
71214
|
},
|
|
71128
71215
|
"llm.listNodeModels": {
|
|
71129
71216
|
capName: "llm",
|
|
@@ -75787,12 +75874,6 @@ Object.freeze({
|
|
|
75787
75874
|
addonId: null,
|
|
75788
75875
|
access: "create"
|
|
75789
75876
|
},
|
|
75790
|
-
"userManagement.createScopedToken": {
|
|
75791
|
-
capName: "user-management",
|
|
75792
|
-
capScope: "system",
|
|
75793
|
-
addonId: null,
|
|
75794
|
-
access: "create"
|
|
75795
|
-
},
|
|
75796
75877
|
"userManagement.createUser": {
|
|
75797
75878
|
capName: "user-management",
|
|
75798
75879
|
capScope: "system",
|
|
@@ -75841,12 +75922,6 @@ Object.freeze({
|
|
|
75841
75922
|
addonId: null,
|
|
75842
75923
|
access: "view"
|
|
75843
75924
|
},
|
|
75844
|
-
"userManagement.listScopedTokens": {
|
|
75845
|
-
capName: "user-management",
|
|
75846
|
-
capScope: "system",
|
|
75847
|
-
addonId: null,
|
|
75848
|
-
access: "view"
|
|
75849
|
-
},
|
|
75850
75925
|
"userManagement.listUsers": {
|
|
75851
75926
|
capName: "user-management",
|
|
75852
75927
|
capScope: "system",
|
|
@@ -75901,12 +75976,6 @@ Object.freeze({
|
|
|
75901
75976
|
addonId: null,
|
|
75902
75977
|
access: "delete"
|
|
75903
75978
|
},
|
|
75904
|
-
"userManagement.revokeScopedToken": {
|
|
75905
|
-
capName: "user-management",
|
|
75906
|
-
capScope: "system",
|
|
75907
|
-
addonId: null,
|
|
75908
|
-
access: "delete"
|
|
75909
|
-
},
|
|
75910
75979
|
"userManagement.setupTotp": {
|
|
75911
75980
|
capName: "user-management",
|
|
75912
75981
|
capScope: "system",
|
|
@@ -75937,12 +76006,6 @@ Object.freeze({
|
|
|
75937
76006
|
addonId: null,
|
|
75938
76007
|
access: "view"
|
|
75939
76008
|
},
|
|
75940
|
-
"userManagement.validateScopedToken": {
|
|
75941
|
-
capName: "user-management",
|
|
75942
|
-
capScope: "system",
|
|
75943
|
-
addonId: null,
|
|
75944
|
-
access: "view"
|
|
75945
|
-
},
|
|
75946
76009
|
"userManagement.verifyTotp": {
|
|
75947
76010
|
capName: "user-management",
|
|
75948
76011
|
capScope: "system",
|
|
@@ -5547,7 +5547,7 @@ var ZodIssueCode = {
|
|
|
5547
5547
|
var ZodFirstPartyTypeKind;
|
|
5548
5548
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5549
5549
|
//#endregion
|
|
5550
|
-
//#region ../types/dist/sleep-
|
|
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
|
|
7934
|
-
* and validates them (`
|
|
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. */
|
|
@@ -13025,7 +13025,7 @@ var ConvertResultSchema = object({
|
|
|
13025
13025
|
* `super_admin` — collapsed onto the single boolean because every
|
|
13026
13026
|
* non-admin caller is governed by the same scope-check rules; the
|
|
13027
13027
|
* distinction was only ever used to route role-specific procedures
|
|
13028
|
-
* which we no longer have. CLI / webhook integrations are `
|
|
13028
|
+
* which we no longer have. CLI / webhook integrations are tokens (`auth.mintToken`)
|
|
13029
13029
|
* with `isAdmin: false` + an explicit scope list.
|
|
13030
13030
|
*/
|
|
13031
13031
|
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
@@ -13214,10 +13214,12 @@ var AddonRoutesScopeSchema = object({
|
|
|
13214
13214
|
type: literal("addon-routes"),
|
|
13215
13215
|
access: array(MethodAccessSchema).min(1)
|
|
13216
13216
|
});
|
|
13217
|
+
var PreferencesSelfScopeSchema = object({ type: literal("preferences-self") });
|
|
13217
13218
|
var CredentialScopeSchema = union([
|
|
13218
13219
|
literal("*"),
|
|
13219
13220
|
ShareViewScopeSchema,
|
|
13220
13221
|
AddonRoutesScopeSchema,
|
|
13222
|
+
PreferencesSelfScopeSchema,
|
|
13221
13223
|
TokenScopeSchema
|
|
13222
13224
|
]);
|
|
13223
13225
|
object({
|
|
@@ -13226,6 +13228,55 @@ object({
|
|
|
13226
13228
|
jti: string().min(16),
|
|
13227
13229
|
scopes: array(CredentialScopeSchema).min(1)
|
|
13228
13230
|
});
|
|
13231
|
+
var PreferenceNamespaceSchema = string().regex(/^[a-z][a-z0-9.-]{0,63}$/);
|
|
13232
|
+
/** A namespace's value: a JSON object, opaque to the hub. */
|
|
13233
|
+
var PreferenceValueSchema = record(string(), unknown());
|
|
13234
|
+
var PreferenceDeviceIdSchema = string().min(1).max(64);
|
|
13235
|
+
/** A stored row, as the owner reads it. */
|
|
13236
|
+
var PreferenceRowSchema = object({
|
|
13237
|
+
namespace: PreferenceNamespaceSchema,
|
|
13238
|
+
value: PreferenceValueSchema,
|
|
13239
|
+
/** Starts at 1, +1 on every write of this namespace. A delete ends the row and its count. */
|
|
13240
|
+
revision: number().int().positive(),
|
|
13241
|
+
updatedAt: number().int(),
|
|
13242
|
+
/** The client id the last writer sent; `null` when it sent none. */
|
|
13243
|
+
updatedByDevice: PreferenceDeviceIdSchema.nullable()
|
|
13244
|
+
});
|
|
13245
|
+
object({
|
|
13246
|
+
/** Absent: every namespace the caller holds. */
|
|
13247
|
+
namespaces: array(PreferenceNamespaceSchema).max(32).optional() });
|
|
13248
|
+
object({ rows: array(PreferenceRowSchema) });
|
|
13249
|
+
object({
|
|
13250
|
+
namespace: PreferenceNamespaceSchema,
|
|
13251
|
+
value: PreferenceValueSchema,
|
|
13252
|
+
/**
|
|
13253
|
+
* The revision the edit was based on. Absent: last write wins. `0`: the
|
|
13254
|
+
* namespace must not exist yet. Any other value that is not the current
|
|
13255
|
+
* revision answers `conflict` and writes nothing.
|
|
13256
|
+
*/
|
|
13257
|
+
baseRevision: number().int().nonnegative().optional(),
|
|
13258
|
+
deviceId: PreferenceDeviceIdSchema.optional()
|
|
13259
|
+
});
|
|
13260
|
+
discriminatedUnion("status", [object({
|
|
13261
|
+
status: literal("saved"),
|
|
13262
|
+
row: PreferenceRowSchema
|
|
13263
|
+
}), object({
|
|
13264
|
+
status: literal("conflict"),
|
|
13265
|
+
current: PreferenceRowSchema.nullable()
|
|
13266
|
+
})]);
|
|
13267
|
+
object({ namespace: PreferenceNamespaceSchema });
|
|
13268
|
+
object({
|
|
13269
|
+
/** `false` when the namespace did not exist. */
|
|
13270
|
+
deleted: boolean() });
|
|
13271
|
+
object({
|
|
13272
|
+
/** The revision the client holds per namespace; a namespace it does not list is new to it. */
|
|
13273
|
+
revisionByNamespace: record(PreferenceNamespaceSchema, number().int().nonnegative()).refine((map) => Object.keys(map).length <= 32, { message: `at most 32 namespaces` }) });
|
|
13274
|
+
object({
|
|
13275
|
+
/** Every row whose revision differs from the client's, and every row it did not list. */
|
|
13276
|
+
rows: array(PreferenceRowSchema),
|
|
13277
|
+
/** Namespaces the client listed that no longer exist. */
|
|
13278
|
+
deleted: array(PreferenceNamespaceSchema)
|
|
13279
|
+
});
|
|
13229
13280
|
_enum(["new-session", "step-up"]);
|
|
13230
13281
|
/** The languages the hub's app landing pages are written in (D858). */
|
|
13231
13282
|
var AppPageLangSchema = _enum(["en", "it"]);
|
|
@@ -40704,38 +40755,37 @@ method(LlmRuntimeCompleteInputSchema, LlmGenerateResultSchema, {
|
|
|
40704
40755
|
auth: "admin",
|
|
40705
40756
|
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
40706
40757
|
});
|
|
40758
|
+
var LlmProfileKindSchema = string().regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "a kind id is lower-case letters, digits and dashes");
|
|
40759
|
+
/** What a model (or, by default, every model of a kind) can do. */
|
|
40760
|
+
var LlmModelFeaturesSchema = object({
|
|
40761
|
+
vision: boolean(),
|
|
40762
|
+
tools: boolean(),
|
|
40763
|
+
streaming: boolean()
|
|
40764
|
+
});
|
|
40765
|
+
/** One model a provider offers. `features` overrides the kind's defaults, per field. */
|
|
40766
|
+
var LlmModelInfoSchema = object({
|
|
40767
|
+
id: string(),
|
|
40768
|
+
label: string().optional(),
|
|
40769
|
+
contextLength: number().int().positive().optional(),
|
|
40770
|
+
features: LlmModelFeaturesSchema.partial().optional()
|
|
40771
|
+
});
|
|
40707
40772
|
/**
|
|
40708
|
-
*
|
|
40709
|
-
*
|
|
40710
|
-
*
|
|
40711
|
-
*
|
|
40712
|
-
* (hub-placed); the cap stays open for future providers.
|
|
40713
|
-
*
|
|
40714
|
-
* Profiles are ROWS (data), not addons: one row = one usable model endpoint.
|
|
40715
|
-
* `apiKey` is a password field — providers REDACT it on read and merge on
|
|
40716
|
-
* write; a stored key NEVER round-trips to a client.
|
|
40773
|
+
* The provider-specific part of a profile, validated by the provider that owns
|
|
40774
|
+
* the kind (`upsertProfile` refuses what it does not accept). A field its
|
|
40775
|
+
* `connectionSchema` declares `type: 'password'` is a secret: it is held in the
|
|
40776
|
+
* keychain, never in the row, and reads back as the redaction marker.
|
|
40717
40777
|
*/
|
|
40718
|
-
var
|
|
40719
|
-
"openai-compatible",
|
|
40720
|
-
"openai",
|
|
40721
|
-
"anthropic",
|
|
40722
|
-
"google",
|
|
40723
|
-
"managed-local",
|
|
40724
|
-
"apple-foundation"
|
|
40725
|
-
]);
|
|
40778
|
+
var LlmProviderConfigSchema = record(string(), unknown());
|
|
40726
40779
|
var LlmProfileSchema = object({
|
|
40727
40780
|
id: string(),
|
|
40728
40781
|
name: string(),
|
|
40782
|
+
/** The provider-declared kind (`LlmProfileKindDescriptor.kind`). */
|
|
40729
40783
|
kind: LlmProfileKindSchema,
|
|
40730
40784
|
/** Stamped by the provider — keeps the fanned catalog routable. */
|
|
40731
40785
|
addonId: string(),
|
|
40732
40786
|
enabled: boolean(),
|
|
40733
40787
|
/** Vendor model id, or the managed runtime's loaded model. */
|
|
40734
40788
|
model: string(),
|
|
40735
|
-
/** Required for openai-compatible; override for cloud kinds. */
|
|
40736
|
-
baseUrl: string().optional(),
|
|
40737
|
-
/** ConfigUISchema type:'password' — never round-trips (spec §5). */
|
|
40738
|
-
apiKey: string().optional(),
|
|
40739
40789
|
/** Vision on/off. A vision call against a `false` profile is REFUSED, never
|
|
40740
40790
|
* degraded to text — that shipped once and produced a confident answer to a
|
|
40741
40791
|
* question about a picture nobody sent. */
|
|
@@ -40743,15 +40793,11 @@ var LlmProfileSchema = object({
|
|
|
40743
40793
|
temperature: number().min(0).max(2).optional(),
|
|
40744
40794
|
/** Nucleus sampling. Every wire we speak has it. */
|
|
40745
40795
|
topP: number().min(0).max(1).optional(),
|
|
40746
|
-
/** Top-k sampling. Carried only by the wires that have it —
|
|
40747
|
-
*
|
|
40748
|
-
* `top_p` and no `top_k`). The profile editor hides the field wherever it
|
|
40749
|
-
* would change nothing; `KINDS_WITH_TOP_K` is the single owner of that list. */
|
|
40796
|
+
/** Top-k sampling. Carried only by the wires that have it — a kind offers the
|
|
40797
|
+
* field in its editor only when its descriptor lists it in `profileFields`. */
|
|
40750
40798
|
topK: number().int().positive().optional(),
|
|
40751
40799
|
maxTokens: number().int().positive().optional(),
|
|
40752
|
-
/** Prompt context window. Advisory for cloud kinds (they enforce their own)
|
|
40753
|
-
* for `managed-local` it is the llama.cpp `--ctx-size` the runtime starts
|
|
40754
|
-
* the model with, so it is the one field that changes a PROCESS. */
|
|
40800
|
+
/** Prompt context window. Advisory for cloud kinds (they enforce their own). */
|
|
40755
40801
|
contextLength: number().int().positive().optional(),
|
|
40756
40802
|
/** Default system prompt. A caller's `system` REPLACES it (never appends —
|
|
40757
40803
|
* two system prompts fighting is worse than either alone). */
|
|
@@ -40777,16 +40823,37 @@ var LlmProfileSchema = object({
|
|
|
40777
40823
|
* library; the REGISTRY of callable tools is ours and is empty in v1, so a
|
|
40778
40824
|
* `true` here buys the wiring, not behaviour, until tools are registered. */
|
|
40779
40825
|
toolsEnabled: boolean().default(false),
|
|
40780
|
-
|
|
40781
|
-
|
|
40782
|
-
|
|
40783
|
-
|
|
40784
|
-
|
|
40785
|
-
|
|
40786
|
-
|
|
40787
|
-
|
|
40788
|
-
|
|
40789
|
-
|
|
40826
|
+
/** Everything the kind's provider owns (endpoint, key, node, runtime…). */
|
|
40827
|
+
providerConfig: LlmProviderConfigSchema.default({})
|
|
40828
|
+
});
|
|
40829
|
+
/**
|
|
40830
|
+
* The common profile fields a kind's editor offers. The editor owns how each
|
|
40831
|
+
* one is drawn; the provider says which of them mean something on its wire.
|
|
40832
|
+
*/
|
|
40833
|
+
var LlmProfileFieldSchema = _enum([
|
|
40834
|
+
"temperature",
|
|
40835
|
+
"topP",
|
|
40836
|
+
"topK",
|
|
40837
|
+
"maxTokens",
|
|
40838
|
+
"contextLength",
|
|
40839
|
+
"systemPrompt",
|
|
40840
|
+
"timeoutMs",
|
|
40841
|
+
"connectTimeoutMs",
|
|
40842
|
+
"firstTokenTimeoutMs",
|
|
40843
|
+
"idleTimeoutMs",
|
|
40844
|
+
"retry",
|
|
40845
|
+
"toolsEnabled"
|
|
40846
|
+
]);
|
|
40847
|
+
/**
|
|
40848
|
+
* A provider-drawn part of the editor, by a generic widget id the admin UI
|
|
40849
|
+
* registers (`ai/apple-node`). `placement: 'model'` replaces the generic model
|
|
40850
|
+
* picker: that widget owns the model choice.
|
|
40851
|
+
*/
|
|
40852
|
+
var LlmProviderWidgetSchema = object({
|
|
40853
|
+
id: string(),
|
|
40854
|
+
placement: _enum(["connection", "model"]),
|
|
40855
|
+
/** `providerConfig` keys this widget must fill before the profile can be saved. */
|
|
40856
|
+
requires: array(string()).optional()
|
|
40790
40857
|
});
|
|
40791
40858
|
/** ConfigUISchema tree passed through untyped on the wire (the
|
|
40792
40859
|
* notification-output `ConfigSchemaPassthrough` precedent at
|
|
@@ -40795,11 +40862,56 @@ var ConfigSchemaPassthrough$3 = unknown();
|
|
|
40795
40862
|
var LlmProfileKindDescriptorSchema = object({
|
|
40796
40863
|
kind: LlmProfileKindSchema,
|
|
40797
40864
|
label: string(),
|
|
40865
|
+
/** A generic icon name (`cloud`, `plug`, `cpu`) — never a glyph or a logo. */
|
|
40798
40866
|
icon: string(),
|
|
40799
40867
|
/** Stamped by each provider so the concat-fanned catalog stays routable. */
|
|
40800
40868
|
addonId: string(),
|
|
40801
|
-
|
|
40869
|
+
/** The provider's own fields (`providerConfig`); `password` fields are keychain-held. */
|
|
40870
|
+
connectionSchema: ConfigSchemaPassthrough$3,
|
|
40871
|
+
/** Provider fields that belong under "Advanced" (extra headers, runtime tuning). */
|
|
40872
|
+
advancedSchema: ConfigSchemaPassthrough$3.optional(),
|
|
40873
|
+
/** The kind's defaults; a model from `listModels` may override any of them. */
|
|
40874
|
+
features: LlmModelFeaturesSchema,
|
|
40875
|
+
/** `false` = the provider stamps `supportsVision` itself (from what a node reports). */
|
|
40876
|
+
visionEditable: boolean(),
|
|
40877
|
+
/** Where the model list comes from: `listModels`, `staticModels`, or nowhere. */
|
|
40878
|
+
modelCatalog: _enum([
|
|
40879
|
+
"fetch",
|
|
40880
|
+
"static",
|
|
40881
|
+
"none"
|
|
40882
|
+
]),
|
|
40883
|
+
staticModels: array(LlmModelInfoSchema).optional(),
|
|
40884
|
+
/** The common fields that mean something on this kind's wire. */
|
|
40885
|
+
profileFields: array(LlmProfileFieldSchema),
|
|
40886
|
+
providerWidgets: array(LlmProviderWidgetSchema).optional()
|
|
40802
40887
|
});
|
|
40888
|
+
/**
|
|
40889
|
+
* `listModels` input. `connection` is an UNSAVED draft of `providerConfig`
|
|
40890
|
+
* (the editor's form); with `profileId` too, a secret the draft leaves
|
|
40891
|
+
* untouched (absent or the redaction marker) is resolved server-side from the
|
|
40892
|
+
* stored profile — the browser never receives it.
|
|
40893
|
+
*/
|
|
40894
|
+
var LlmListModelsInputSchema = object({
|
|
40895
|
+
addonId: string(),
|
|
40896
|
+
kind: LlmProfileKindSchema,
|
|
40897
|
+
profileId: string().optional(),
|
|
40898
|
+
connection: LlmProviderConfigSchema.optional()
|
|
40899
|
+
});
|
|
40900
|
+
var LlmListModelsErrorCodeSchema = _enum([
|
|
40901
|
+
"auth",
|
|
40902
|
+
"network",
|
|
40903
|
+
"unsupported",
|
|
40904
|
+
"invalid"
|
|
40905
|
+
]);
|
|
40906
|
+
/** A RESULT, never a throw: "wrong key" is an answer the editor renders inline. */
|
|
40907
|
+
var LlmListModelsResultSchema = discriminatedUnion("ok", [object({
|
|
40908
|
+
ok: literal(true),
|
|
40909
|
+
models: array(LlmModelInfoSchema)
|
|
40910
|
+
}), object({
|
|
40911
|
+
ok: literal(false),
|
|
40912
|
+
code: LlmListModelsErrorCodeSchema,
|
|
40913
|
+
message: string()
|
|
40914
|
+
})]);
|
|
40803
40915
|
var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
|
|
40804
40916
|
var LlmDefaultSchema = object({
|
|
40805
40917
|
selector: LlmDefaultSelectorSchema,
|
|
@@ -40899,7 +41011,10 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
|
40899
41011
|
kind: "mutation",
|
|
40900
41012
|
auth: "admin",
|
|
40901
41013
|
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
40902
|
-
}), method(
|
|
41014
|
+
}), method(LlmListModelsInputSchema, LlmListModelsResultSchema, {
|
|
41015
|
+
kind: "mutation",
|
|
41016
|
+
auth: "admin"
|
|
41017
|
+
}), method(object({}), array(LlmDefaultSchema)), method(object({
|
|
40903
41018
|
selector: LlmDefaultSelectorSchema,
|
|
40904
41019
|
profileId: string().nullable()
|
|
40905
41020
|
}), _void(), {
|
|
@@ -64924,26 +65039,6 @@ var ApiKeySummarySchema = object({
|
|
|
64924
65039
|
createdAt: number(),
|
|
64925
65040
|
lastUsedAt: number().optional()
|
|
64926
65041
|
});
|
|
64927
|
-
var ScopedTokenSummarySchema = object({
|
|
64928
|
-
id: string(),
|
|
64929
|
-
userId: string(),
|
|
64930
|
-
name: string(),
|
|
64931
|
-
tokenPrefix: string(),
|
|
64932
|
-
scopes: array(TokenScopeSchema),
|
|
64933
|
-
expiresAt: number().nullish(),
|
|
64934
|
-
lastUsedAt: number().nullish(),
|
|
64935
|
-
createdAt: number()
|
|
64936
|
-
});
|
|
64937
|
-
var CreateScopedTokenInputSchema = object({
|
|
64938
|
-
userId: string(),
|
|
64939
|
-
name: string(),
|
|
64940
|
-
scopes: array(TokenScopeSchema),
|
|
64941
|
-
expiresAt: number().optional()
|
|
64942
|
-
});
|
|
64943
|
-
var CreateScopedTokenResultSchema = object({
|
|
64944
|
-
token: string(),
|
|
64945
|
-
record: ScopedTokenSummarySchema
|
|
64946
|
-
});
|
|
64947
65042
|
var OauthSessionSummarySchema = object({
|
|
64948
65043
|
id: string(),
|
|
64949
65044
|
userId: string(),
|
|
@@ -64965,11 +65060,11 @@ var TotpStatusSchema = object({
|
|
|
64965
65060
|
confirmedAt: number().nullable()
|
|
64966
65061
|
});
|
|
64967
65062
|
/**
|
|
64968
|
-
* user-management — singleton capability for user accounts
|
|
64969
|
-
*
|
|
65063
|
+
* user-management — singleton capability for user accounts and the
|
|
65064
|
+
* legacy API-key rows.
|
|
64970
65065
|
*
|
|
64971
65066
|
* v2 model: every method gated by `auth: 'admin'`. Admin-only delegation
|
|
64972
|
-
* — the subset check on `setUserScopes`
|
|
65067
|
+
* — the subset check on `setUserScopes` is moot
|
|
64973
65068
|
* because non-admins never reach these. If/when we open non-admin
|
|
64974
65069
|
* delegation, structural caller-scope subset check goes inside the
|
|
64975
65070
|
* provider.
|
|
@@ -65026,15 +65121,7 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
|
|
|
65026
65121
|
kind: "mutation",
|
|
65027
65122
|
auth: "admin",
|
|
65028
65123
|
access: "delete"
|
|
65029
|
-
}), method(
|
|
65030
|
-
kind: "mutation",
|
|
65031
|
-
auth: "admin",
|
|
65032
|
-
access: "create"
|
|
65033
|
-
}), method(object({ id: string() }), object({ success: literal(true) }), {
|
|
65034
|
-
kind: "mutation",
|
|
65035
|
-
auth: "admin",
|
|
65036
|
-
access: "delete"
|
|
65037
|
-
}), method(object({ token: string() }), ScopedTokenSummarySchema.nullable(), { access: "view" }), method(object({ userId: string() }), array(ScopedTokenSummarySchema), { auth: "admin" }), method(object({ userId: string() }), TotpSetupResultSchema, {
|
|
65124
|
+
}), method(object({ userId: string() }), TotpSetupResultSchema, {
|
|
65038
65125
|
kind: "mutation",
|
|
65039
65126
|
auth: "admin",
|
|
65040
65127
|
access: "create"
|
|
@@ -71124,7 +71211,7 @@ Object.freeze({
|
|
|
71124
71211
|
capName: "llm",
|
|
71125
71212
|
capScope: "system",
|
|
71126
71213
|
addonId: null,
|
|
71127
|
-
access: "
|
|
71214
|
+
access: "create"
|
|
71128
71215
|
},
|
|
71129
71216
|
"llm.listNodeModels": {
|
|
71130
71217
|
capName: "llm",
|
|
@@ -75788,12 +75875,6 @@ Object.freeze({
|
|
|
75788
75875
|
addonId: null,
|
|
75789
75876
|
access: "create"
|
|
75790
75877
|
},
|
|
75791
|
-
"userManagement.createScopedToken": {
|
|
75792
|
-
capName: "user-management",
|
|
75793
|
-
capScope: "system",
|
|
75794
|
-
addonId: null,
|
|
75795
|
-
access: "create"
|
|
75796
|
-
},
|
|
75797
75878
|
"userManagement.createUser": {
|
|
75798
75879
|
capName: "user-management",
|
|
75799
75880
|
capScope: "system",
|
|
@@ -75842,12 +75923,6 @@ Object.freeze({
|
|
|
75842
75923
|
addonId: null,
|
|
75843
75924
|
access: "view"
|
|
75844
75925
|
},
|
|
75845
|
-
"userManagement.listScopedTokens": {
|
|
75846
|
-
capName: "user-management",
|
|
75847
|
-
capScope: "system",
|
|
75848
|
-
addonId: null,
|
|
75849
|
-
access: "view"
|
|
75850
|
-
},
|
|
75851
75926
|
"userManagement.listUsers": {
|
|
75852
75927
|
capName: "user-management",
|
|
75853
75928
|
capScope: "system",
|
|
@@ -75902,12 +75977,6 @@ Object.freeze({
|
|
|
75902
75977
|
addonId: null,
|
|
75903
75978
|
access: "delete"
|
|
75904
75979
|
},
|
|
75905
|
-
"userManagement.revokeScopedToken": {
|
|
75906
|
-
capName: "user-management",
|
|
75907
|
-
capScope: "system",
|
|
75908
|
-
addonId: null,
|
|
75909
|
-
access: "delete"
|
|
75910
|
-
},
|
|
75911
75980
|
"userManagement.setupTotp": {
|
|
75912
75981
|
capName: "user-management",
|
|
75913
75982
|
capScope: "system",
|
|
@@ -75938,12 +76007,6 @@ Object.freeze({
|
|
|
75938
76007
|
addonId: null,
|
|
75939
76008
|
access: "view"
|
|
75940
76009
|
},
|
|
75941
|
-
"userManagement.validateScopedToken": {
|
|
75942
|
-
capName: "user-management",
|
|
75943
|
-
capScope: "system",
|
|
75944
|
-
addonId: null,
|
|
75945
|
-
access: "view"
|
|
75946
|
-
},
|
|
75947
76010
|
"userManagement.verifyTotp": {
|
|
75948
76011
|
capName: "user-management",
|
|
75949
76012
|
capScope: "system",
|
|
@@ -24,7 +24,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
24
|
enumerable: true
|
|
25
25
|
}) : target, mod));
|
|
26
26
|
//#endregion
|
|
27
|
-
const require_dist = require("../dist-
|
|
27
|
+
const require_dist = require("../dist-DrmU50mp.js");
|
|
28
28
|
let node_crypto = require("node:crypto");
|
|
29
29
|
require("node:zlib");
|
|
30
30
|
let node_fs = require("node:fs");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as oauthIntegrationCapability, Bt as EventCategory, C as buildAddonRouteProvider, Et as nodePin, I as deviceExportCapability, It as string, a as COCO_TO_MACRO, bt as BaseAddon, c as FanDirectionSchema, i as CAMERA_SWITCH_ORDER, l as HvacModeSchema, o as CameraSwitchIdSchema, p as addonRoutesCapability, t as AlarmArmModeSchema, u as MediaPlayerRepeatSchema } from "../dist-
|
|
1
|
+
import { $ as oauthIntegrationCapability, Bt as EventCategory, C as buildAddonRouteProvider, Et as nodePin, I as deviceExportCapability, It as string, a as COCO_TO_MACRO, bt as BaseAddon, c as FanDirectionSchema, i as CAMERA_SWITCH_ORDER, l as HvacModeSchema, o as CameraSwitchIdSchema, p as addonRoutesCapability, t as AlarmArmModeSchema, u as MediaPlayerRepeatSchema } from "../dist-CyQP92x0.mjs";
|
|
2
2
|
import { createHmac, timingSafeEqual } from "node:crypto";
|
|
3
3
|
import "node:zlib";
|
|
4
4
|
import "node:fs";
|