@camstack/addon-provider-dreame 0.2.137 → 0.2.139
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 +534 -142
- package/dist/addon.mjs +534 -142
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -5459,7 +5459,7 @@ var ZodIssueCode$1 = {
|
|
|
5459
5459
|
var ZodFirstPartyTypeKind$1;
|
|
5460
5460
|
ZodFirstPartyTypeKind$1 || (ZodFirstPartyTypeKind$1 = {});
|
|
5461
5461
|
//#endregion
|
|
5462
|
-
//#region ../types/dist/sleep-
|
|
5462
|
+
//#region ../types/dist/sleep-BSuCCFjf.mjs
|
|
5463
5463
|
/**
|
|
5464
5464
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5465
5465
|
* window to float samples (D455).
|
|
@@ -7842,9 +7842,9 @@ function normalizeAddonInitResult(result) {
|
|
|
7842
7842
|
return result;
|
|
7843
7843
|
}
|
|
7844
7844
|
/**
|
|
7845
|
-
* The share-view scope kinds a
|
|
7846
|
-
* and validates them (`
|
|
7847
|
-
* list); a data plane names the kinds it ACCEPTS in `share`.
|
|
7845
|
+
* The share-view scope kinds a share-link token can carry. The hub mints
|
|
7846
|
+
* and validates them (`ShareViewGrantSchema` builds its
|
|
7847
|
+
* enum from this list); a data plane names the kinds it ACCEPTS in `share`.
|
|
7848
7848
|
*/
|
|
7849
7849
|
var SHARE_VIEW_KINDS = ["grid-view", "events-view"];
|
|
7850
7850
|
/** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
|
|
@@ -12548,7 +12548,7 @@ var ConvertResultSchema = object({
|
|
|
12548
12548
|
* `super_admin` — collapsed onto the single boolean because every
|
|
12549
12549
|
* non-admin caller is governed by the same scope-check rules; the
|
|
12550
12550
|
* distinction was only ever used to route role-specific procedures
|
|
12551
|
-
* which we no longer have. CLI / webhook integrations are `
|
|
12551
|
+
* which we no longer have. CLI / webhook integrations are tokens (`auth.mintToken`)
|
|
12552
12552
|
* with `isAdmin: false` + an explicit scope list.
|
|
12553
12553
|
*/
|
|
12554
12554
|
/** Per-method access flavour. Materialised on every cap method via codegen. */
|
|
@@ -12737,10 +12737,12 @@ var AddonRoutesScopeSchema = object({
|
|
|
12737
12737
|
type: literal("addon-routes"),
|
|
12738
12738
|
access: array(MethodAccessSchema).min(1)
|
|
12739
12739
|
});
|
|
12740
|
+
var PreferencesSelfScopeSchema = object({ type: literal("preferences-self") });
|
|
12740
12741
|
var CredentialScopeSchema = union([
|
|
12741
12742
|
literal("*"),
|
|
12742
12743
|
ShareViewScopeSchema,
|
|
12743
12744
|
AddonRoutesScopeSchema,
|
|
12745
|
+
PreferencesSelfScopeSchema,
|
|
12744
12746
|
TokenScopeSchema
|
|
12745
12747
|
]);
|
|
12746
12748
|
object({
|
|
@@ -12749,6 +12751,55 @@ object({
|
|
|
12749
12751
|
jti: string().min(16),
|
|
12750
12752
|
scopes: array(CredentialScopeSchema).min(1)
|
|
12751
12753
|
});
|
|
12754
|
+
var PreferenceNamespaceSchema = string().regex(/^[a-z][a-z0-9.-]{0,63}$/);
|
|
12755
|
+
/** A namespace's value: a JSON object, opaque to the hub. */
|
|
12756
|
+
var PreferenceValueSchema = record(string(), unknown());
|
|
12757
|
+
var PreferenceDeviceIdSchema = string().min(1).max(64);
|
|
12758
|
+
/** A stored row, as the owner reads it. */
|
|
12759
|
+
var PreferenceRowSchema = object({
|
|
12760
|
+
namespace: PreferenceNamespaceSchema,
|
|
12761
|
+
value: PreferenceValueSchema,
|
|
12762
|
+
/** Starts at 1, +1 on every write of this namespace. A delete ends the row and its count. */
|
|
12763
|
+
revision: number().int().positive(),
|
|
12764
|
+
updatedAt: number().int(),
|
|
12765
|
+
/** The client id the last writer sent; `null` when it sent none. */
|
|
12766
|
+
updatedByDevice: PreferenceDeviceIdSchema.nullable()
|
|
12767
|
+
});
|
|
12768
|
+
object({
|
|
12769
|
+
/** Absent: every namespace the caller holds. */
|
|
12770
|
+
namespaces: array(PreferenceNamespaceSchema).max(32).optional() });
|
|
12771
|
+
object({ rows: array(PreferenceRowSchema) });
|
|
12772
|
+
object({
|
|
12773
|
+
namespace: PreferenceNamespaceSchema,
|
|
12774
|
+
value: PreferenceValueSchema,
|
|
12775
|
+
/**
|
|
12776
|
+
* The revision the edit was based on. Absent: last write wins. `0`: the
|
|
12777
|
+
* namespace must not exist yet. Any other value that is not the current
|
|
12778
|
+
* revision answers `conflict` and writes nothing.
|
|
12779
|
+
*/
|
|
12780
|
+
baseRevision: number().int().nonnegative().optional(),
|
|
12781
|
+
deviceId: PreferenceDeviceIdSchema.optional()
|
|
12782
|
+
});
|
|
12783
|
+
discriminatedUnion("status", [object({
|
|
12784
|
+
status: literal("saved"),
|
|
12785
|
+
row: PreferenceRowSchema
|
|
12786
|
+
}), object({
|
|
12787
|
+
status: literal("conflict"),
|
|
12788
|
+
current: PreferenceRowSchema.nullable()
|
|
12789
|
+
})]);
|
|
12790
|
+
object({ namespace: PreferenceNamespaceSchema });
|
|
12791
|
+
object({
|
|
12792
|
+
/** `false` when the namespace did not exist. */
|
|
12793
|
+
deleted: boolean() });
|
|
12794
|
+
object({
|
|
12795
|
+
/** The revision the client holds per namespace; a namespace it does not list is new to it. */
|
|
12796
|
+
revisionByNamespace: record(PreferenceNamespaceSchema, number().int().nonnegative()).refine((map) => Object.keys(map).length <= 32, { message: `at most 32 namespaces` }) });
|
|
12797
|
+
object({
|
|
12798
|
+
/** Every row whose revision differs from the client's, and every row it did not list. */
|
|
12799
|
+
rows: array(PreferenceRowSchema),
|
|
12800
|
+
/** Namespaces the client listed that no longer exist. */
|
|
12801
|
+
deleted: array(PreferenceNamespaceSchema)
|
|
12802
|
+
});
|
|
12752
12803
|
_enum(["new-session", "step-up"]);
|
|
12753
12804
|
/** The languages the hub's app landing pages are written in (D858). */
|
|
12754
12805
|
var AppPageLangSchema = _enum(["en", "it"]);
|
|
@@ -17002,7 +17053,19 @@ var DeviceHistorySubjectSchema = discriminatedUnion("kind", [object({
|
|
|
17002
17053
|
kind: literal("node"),
|
|
17003
17054
|
nodeId: string().min(1)
|
|
17004
17055
|
})]);
|
|
17056
|
+
/**
|
|
17057
|
+
* `enum` stores a STATE as the ordinal of its value in the series' value list
|
|
17058
|
+
* (`DeviceHistorySeriesInfo.values`, append-only, so an ordinal never changes
|
|
17059
|
+
* meaning); a rollup keeps the time spent in each state (`states`).
|
|
17060
|
+
*/
|
|
17005
17061
|
var DeviceHistoryKindSchema = _enum([
|
|
17062
|
+
"gauge",
|
|
17063
|
+
"counter",
|
|
17064
|
+
"boolean",
|
|
17065
|
+
"enum"
|
|
17066
|
+
]);
|
|
17067
|
+
/** What a PRODUCER may declare. `enum` is cap-only: its value list is the cap field's. */
|
|
17068
|
+
var DeviceHistoryProducerKindSchema = _enum([
|
|
17006
17069
|
"gauge",
|
|
17007
17070
|
"counter",
|
|
17008
17071
|
"boolean"
|
|
@@ -17039,7 +17102,13 @@ var SeriesInfoSchema = object({
|
|
|
17039
17102
|
/** `null` is unknown (a `unitFrom` series whose device does not state a unit right now), never a guess. */
|
|
17040
17103
|
unit: string().nullable(),
|
|
17041
17104
|
displayName: string(),
|
|
17042
|
-
source: _enum([
|
|
17105
|
+
source: _enum([
|
|
17106
|
+
"cap",
|
|
17107
|
+
"addon",
|
|
17108
|
+
"derived"
|
|
17109
|
+
]),
|
|
17110
|
+
/** `enum`: the value of each ordinal (index = ordinal); `null` for every other kind. */
|
|
17111
|
+
values: array(string()).readonly().nullable(),
|
|
17043
17112
|
firstTs: number(),
|
|
17044
17113
|
lastTs: number()
|
|
17045
17114
|
});
|
|
@@ -17053,17 +17122,31 @@ var QueryPointSchema = object({
|
|
|
17053
17122
|
twMean: number().nullable(),
|
|
17054
17123
|
min: number(),
|
|
17055
17124
|
max: number(),
|
|
17056
|
-
/** `null` is unknown, never zero (D393). */
|
|
17057
|
-
last: number().nullable()
|
|
17125
|
+
/** `null` is unknown, never zero (D393). For an `enum` series: the ordinal of {@link state}. */
|
|
17126
|
+
last: number().nullable(),
|
|
17127
|
+
/**
|
|
17128
|
+
* The increase over the point: a `counter`'s growth since the previous point
|
|
17129
|
+
* or bucket (a drop is a reset, counted from zero), and for
|
|
17130
|
+
* {@link DEVICE_HISTORY_ENERGY_KEY} the kWh used in the bucket. `null` for
|
|
17131
|
+
* every other kind, and when it cannot be known.
|
|
17132
|
+
*/
|
|
17133
|
+
delta: number().nullable(),
|
|
17134
|
+
/** `enum`: the state in force at the end of the point (the name of `last`); `null` otherwise. */
|
|
17135
|
+
state: string().nullable(),
|
|
17136
|
+
/** `enum` rollup: milliseconds spent in each state inside the bucket; `null` for raw points and other kinds. */
|
|
17137
|
+
states: record(string(), number()).nullable()
|
|
17058
17138
|
});
|
|
17059
17139
|
var QuerySeriesSchema = object({
|
|
17060
17140
|
scope: string(),
|
|
17061
17141
|
/** The last point STRICTLY BEFORE `from` in the chosen tier, so a step chart can start at the held value. */
|
|
17062
17142
|
before: object({
|
|
17063
17143
|
t: number(),
|
|
17064
|
-
value: number().nullable()
|
|
17144
|
+
value: number().nullable(),
|
|
17145
|
+
state: string().nullable()
|
|
17065
17146
|
}).nullable(),
|
|
17066
|
-
points: array(QueryPointSchema).readonly()
|
|
17147
|
+
points: array(QueryPointSchema).readonly(),
|
|
17148
|
+
/** A derived key: the stored key its points were computed from; `null` for a stored series. */
|
|
17149
|
+
derivedFrom: string().nullable()
|
|
17067
17150
|
});
|
|
17068
17151
|
/** The window part of a query, shared by the device and node forms. */
|
|
17069
17152
|
var QueryWindowShape = {
|
|
@@ -17079,6 +17162,23 @@ var QueryResultSchema = object({
|
|
|
17079
17162
|
series: array(QuerySeriesSchema).readonly(),
|
|
17080
17163
|
truncated: boolean()
|
|
17081
17164
|
});
|
|
17165
|
+
/** One read of a batch: a device's key or a node's key (exactly one subject). */
|
|
17166
|
+
var QueryManyItemSchema = union([object({
|
|
17167
|
+
deviceId: number().int(),
|
|
17168
|
+
key: string(),
|
|
17169
|
+
scope: string().optional()
|
|
17170
|
+
}), object({
|
|
17171
|
+
forNodeId: string().min(1),
|
|
17172
|
+
key: string(),
|
|
17173
|
+
scope: string().optional()
|
|
17174
|
+
})]);
|
|
17175
|
+
var QueryManyEntrySchema = discriminatedUnion("ok", [object({
|
|
17176
|
+
ok: literal(true),
|
|
17177
|
+
result: QueryResultSchema
|
|
17178
|
+
}), object({
|
|
17179
|
+
ok: literal(false),
|
|
17180
|
+
error: string()
|
|
17181
|
+
})]);
|
|
17082
17182
|
var TierStatusSchema = object({
|
|
17083
17183
|
tier: DeviceHistoryResolutionSchema,
|
|
17084
17184
|
/** `null` until the first background count answered. */
|
|
@@ -17134,16 +17234,22 @@ var DeviceHistoryStatusSchema = object({
|
|
|
17134
17234
|
lastRefreshAt: number().nullable()
|
|
17135
17235
|
})
|
|
17136
17236
|
});
|
|
17137
|
-
method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({
|
|
17237
|
+
method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ forNodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
17138
17238
|
deviceId: number().int(),
|
|
17139
17239
|
...QueryWindowShape
|
|
17140
17240
|
}), QueryResultSchema), method(object({
|
|
17141
|
-
|
|
17241
|
+
forNodeId: string().min(1),
|
|
17142
17242
|
...QueryWindowShape
|
|
17143
17243
|
}), QueryResultSchema, { auth: "admin" }), method(object({
|
|
17244
|
+
items: array(QueryManyItemSchema).min(1).max(24),
|
|
17245
|
+
from: QueryWindowShape.from,
|
|
17246
|
+
to: QueryWindowShape.to,
|
|
17247
|
+
resolution: QueryWindowShape.resolution,
|
|
17248
|
+
maxPoints: QueryWindowShape.maxPoints
|
|
17249
|
+
}), object({ results: array(QueryManyEntrySchema).readonly() }), { auth: "admin" }), method(object({
|
|
17144
17250
|
name: string().regex(/^[a-z0-9-]+$/),
|
|
17145
17251
|
subjectKind: _enum(["device", "node"]),
|
|
17146
|
-
kind:
|
|
17252
|
+
kind: DeviceHistoryProducerKindSchema,
|
|
17147
17253
|
unit: string().optional(),
|
|
17148
17254
|
displayName: string().min(1),
|
|
17149
17255
|
ingest: _enum(["points", "buckets"])
|
|
@@ -39954,38 +40060,37 @@ method(LlmRuntimeCompleteInputSchema, LlmGenerateResultSchema, {
|
|
|
39954
40060
|
auth: "admin",
|
|
39955
40061
|
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
39956
40062
|
});
|
|
40063
|
+
var LlmProfileKindSchema = string().regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "a kind id is lower-case letters, digits and dashes");
|
|
40064
|
+
/** What a model (or, by default, every model of a kind) can do. */
|
|
40065
|
+
var LlmModelFeaturesSchema = object({
|
|
40066
|
+
vision: boolean(),
|
|
40067
|
+
tools: boolean(),
|
|
40068
|
+
streaming: boolean()
|
|
40069
|
+
});
|
|
40070
|
+
/** One model a provider offers. `features` overrides the kind's defaults, per field. */
|
|
40071
|
+
var LlmModelInfoSchema = object({
|
|
40072
|
+
id: string(),
|
|
40073
|
+
label: string().optional(),
|
|
40074
|
+
contextLength: number().int().positive().optional(),
|
|
40075
|
+
features: LlmModelFeaturesSchema.partial().optional()
|
|
40076
|
+
});
|
|
39957
40077
|
/**
|
|
39958
|
-
*
|
|
39959
|
-
*
|
|
39960
|
-
*
|
|
39961
|
-
*
|
|
39962
|
-
* (hub-placed); the cap stays open for future providers.
|
|
39963
|
-
*
|
|
39964
|
-
* Profiles are ROWS (data), not addons: one row = one usable model endpoint.
|
|
39965
|
-
* `apiKey` is a password field — providers REDACT it on read and merge on
|
|
39966
|
-
* write; a stored key NEVER round-trips to a client.
|
|
40078
|
+
* The provider-specific part of a profile, validated by the provider that owns
|
|
40079
|
+
* the kind (`upsertProfile` refuses what it does not accept). A field its
|
|
40080
|
+
* `connectionSchema` declares `type: 'password'` is a secret: it is held in the
|
|
40081
|
+
* keychain, never in the row, and reads back as the redaction marker.
|
|
39967
40082
|
*/
|
|
39968
|
-
var
|
|
39969
|
-
"openai-compatible",
|
|
39970
|
-
"openai",
|
|
39971
|
-
"anthropic",
|
|
39972
|
-
"google",
|
|
39973
|
-
"managed-local",
|
|
39974
|
-
"apple-foundation"
|
|
39975
|
-
]);
|
|
40083
|
+
var LlmProviderConfigSchema = record(string(), unknown());
|
|
39976
40084
|
var LlmProfileSchema = object({
|
|
39977
40085
|
id: string(),
|
|
39978
40086
|
name: string(),
|
|
40087
|
+
/** The provider-declared kind (`LlmProfileKindDescriptor.kind`). */
|
|
39979
40088
|
kind: LlmProfileKindSchema,
|
|
39980
40089
|
/** Stamped by the provider — keeps the fanned catalog routable. */
|
|
39981
40090
|
addonId: string(),
|
|
39982
40091
|
enabled: boolean(),
|
|
39983
40092
|
/** Vendor model id, or the managed runtime's loaded model. */
|
|
39984
40093
|
model: string(),
|
|
39985
|
-
/** Required for openai-compatible; override for cloud kinds. */
|
|
39986
|
-
baseUrl: string().optional(),
|
|
39987
|
-
/** ConfigUISchema type:'password' — never round-trips (spec §5). */
|
|
39988
|
-
apiKey: string().optional(),
|
|
39989
40094
|
/** Vision on/off. A vision call against a `false` profile is REFUSED, never
|
|
39990
40095
|
* degraded to text — that shipped once and produced a confident answer to a
|
|
39991
40096
|
* question about a picture nobody sent. */
|
|
@@ -39993,15 +40098,11 @@ var LlmProfileSchema = object({
|
|
|
39993
40098
|
temperature: number().min(0).max(2).optional(),
|
|
39994
40099
|
/** Nucleus sampling. Every wire we speak has it. */
|
|
39995
40100
|
topP: number().min(0).max(1).optional(),
|
|
39996
|
-
/** Top-k sampling. Carried only by the wires that have it —
|
|
39997
|
-
*
|
|
39998
|
-
* `top_p` and no `top_k`). The profile editor hides the field wherever it
|
|
39999
|
-
* would change nothing; `KINDS_WITH_TOP_K` is the single owner of that list. */
|
|
40101
|
+
/** Top-k sampling. Carried only by the wires that have it — a kind offers the
|
|
40102
|
+
* field in its editor only when its descriptor lists it in `profileFields`. */
|
|
40000
40103
|
topK: number().int().positive().optional(),
|
|
40001
40104
|
maxTokens: number().int().positive().optional(),
|
|
40002
|
-
/** Prompt context window. Advisory for cloud kinds (they enforce their own)
|
|
40003
|
-
* for `managed-local` it is the llama.cpp `--ctx-size` the runtime starts
|
|
40004
|
-
* the model with, so it is the one field that changes a PROCESS. */
|
|
40105
|
+
/** Prompt context window. Advisory for cloud kinds (they enforce their own). */
|
|
40005
40106
|
contextLength: number().int().positive().optional(),
|
|
40006
40107
|
/** Default system prompt. A caller's `system` REPLACES it (never appends —
|
|
40007
40108
|
* two system prompts fighting is worse than either alone). */
|
|
@@ -40027,16 +40128,37 @@ var LlmProfileSchema = object({
|
|
|
40027
40128
|
* library; the REGISTRY of callable tools is ours and is empty in v1, so a
|
|
40028
40129
|
* `true` here buys the wiring, not behaviour, until tools are registered. */
|
|
40029
40130
|
toolsEnabled: boolean().default(false),
|
|
40030
|
-
|
|
40031
|
-
|
|
40032
|
-
|
|
40033
|
-
|
|
40034
|
-
|
|
40035
|
-
|
|
40036
|
-
|
|
40037
|
-
|
|
40038
|
-
|
|
40039
|
-
|
|
40131
|
+
/** Everything the kind's provider owns (endpoint, key, node, runtime…). */
|
|
40132
|
+
providerConfig: LlmProviderConfigSchema.default({})
|
|
40133
|
+
});
|
|
40134
|
+
/**
|
|
40135
|
+
* The common profile fields a kind's editor offers. The editor owns how each
|
|
40136
|
+
* one is drawn; the provider says which of them mean something on its wire.
|
|
40137
|
+
*/
|
|
40138
|
+
var LlmProfileFieldSchema = _enum([
|
|
40139
|
+
"temperature",
|
|
40140
|
+
"topP",
|
|
40141
|
+
"topK",
|
|
40142
|
+
"maxTokens",
|
|
40143
|
+
"contextLength",
|
|
40144
|
+
"systemPrompt",
|
|
40145
|
+
"timeoutMs",
|
|
40146
|
+
"connectTimeoutMs",
|
|
40147
|
+
"firstTokenTimeoutMs",
|
|
40148
|
+
"idleTimeoutMs",
|
|
40149
|
+
"retry",
|
|
40150
|
+
"toolsEnabled"
|
|
40151
|
+
]);
|
|
40152
|
+
/**
|
|
40153
|
+
* A provider-drawn part of the editor, by a generic widget id the admin UI
|
|
40154
|
+
* registers (`ai/apple-node`). `placement: 'model'` replaces the generic model
|
|
40155
|
+
* picker: that widget owns the model choice.
|
|
40156
|
+
*/
|
|
40157
|
+
var LlmProviderWidgetSchema = object({
|
|
40158
|
+
id: string(),
|
|
40159
|
+
placement: _enum(["connection", "model"]),
|
|
40160
|
+
/** `providerConfig` keys this widget must fill before the profile can be saved. */
|
|
40161
|
+
requires: array(string()).optional()
|
|
40040
40162
|
});
|
|
40041
40163
|
/** ConfigUISchema tree passed through untyped on the wire (the
|
|
40042
40164
|
* notification-output `ConfigSchemaPassthrough` precedent at
|
|
@@ -40045,11 +40167,56 @@ var ConfigSchemaPassthrough$3 = unknown();
|
|
|
40045
40167
|
var LlmProfileKindDescriptorSchema = object({
|
|
40046
40168
|
kind: LlmProfileKindSchema,
|
|
40047
40169
|
label: string(),
|
|
40170
|
+
/** A generic icon name (`cloud`, `plug`, `cpu`) — never a glyph or a logo. */
|
|
40048
40171
|
icon: string(),
|
|
40049
40172
|
/** Stamped by each provider so the concat-fanned catalog stays routable. */
|
|
40050
40173
|
addonId: string(),
|
|
40051
|
-
|
|
40174
|
+
/** The provider's own fields (`providerConfig`); `password` fields are keychain-held. */
|
|
40175
|
+
connectionSchema: ConfigSchemaPassthrough$3,
|
|
40176
|
+
/** Provider fields that belong under "Advanced" (extra headers, runtime tuning). */
|
|
40177
|
+
advancedSchema: ConfigSchemaPassthrough$3.optional(),
|
|
40178
|
+
/** The kind's defaults; a model from `listModels` may override any of them. */
|
|
40179
|
+
features: LlmModelFeaturesSchema,
|
|
40180
|
+
/** `false` = the provider stamps `supportsVision` itself (from what a node reports). */
|
|
40181
|
+
visionEditable: boolean(),
|
|
40182
|
+
/** Where the model list comes from: `listModels`, `staticModels`, or nowhere. */
|
|
40183
|
+
modelCatalog: _enum([
|
|
40184
|
+
"fetch",
|
|
40185
|
+
"static",
|
|
40186
|
+
"none"
|
|
40187
|
+
]),
|
|
40188
|
+
staticModels: array(LlmModelInfoSchema).optional(),
|
|
40189
|
+
/** The common fields that mean something on this kind's wire. */
|
|
40190
|
+
profileFields: array(LlmProfileFieldSchema),
|
|
40191
|
+
providerWidgets: array(LlmProviderWidgetSchema).optional()
|
|
40192
|
+
});
|
|
40193
|
+
/**
|
|
40194
|
+
* `listModels` input. `connection` is an UNSAVED draft of `providerConfig`
|
|
40195
|
+
* (the editor's form); with `profileId` too, a secret the draft leaves
|
|
40196
|
+
* untouched (absent or the redaction marker) is resolved server-side from the
|
|
40197
|
+
* stored profile — the browser never receives it.
|
|
40198
|
+
*/
|
|
40199
|
+
var LlmListModelsInputSchema = object({
|
|
40200
|
+
addonId: string(),
|
|
40201
|
+
kind: LlmProfileKindSchema,
|
|
40202
|
+
profileId: string().optional(),
|
|
40203
|
+
connection: LlmProviderConfigSchema.optional()
|
|
40052
40204
|
});
|
|
40205
|
+
var LlmListModelsErrorCodeSchema = _enum([
|
|
40206
|
+
"auth",
|
|
40207
|
+
"network",
|
|
40208
|
+
"unsupported",
|
|
40209
|
+
"invalid"
|
|
40210
|
+
]);
|
|
40211
|
+
/** A RESULT, never a throw: "wrong key" is an answer the editor renders inline. */
|
|
40212
|
+
var LlmListModelsResultSchema = discriminatedUnion("ok", [object({
|
|
40213
|
+
ok: literal(true),
|
|
40214
|
+
models: array(LlmModelInfoSchema)
|
|
40215
|
+
}), object({
|
|
40216
|
+
ok: literal(false),
|
|
40217
|
+
code: LlmListModelsErrorCodeSchema,
|
|
40218
|
+
message: string()
|
|
40219
|
+
})]);
|
|
40053
40220
|
var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
|
|
40054
40221
|
var LlmDefaultSchema = object({
|
|
40055
40222
|
selector: LlmDefaultSelectorSchema,
|
|
@@ -40149,7 +40316,10 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
|
40149
40316
|
kind: "mutation",
|
|
40150
40317
|
auth: "admin",
|
|
40151
40318
|
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
40152
|
-
}), method(
|
|
40319
|
+
}), method(LlmListModelsInputSchema, LlmListModelsResultSchema, {
|
|
40320
|
+
kind: "mutation",
|
|
40321
|
+
auth: "admin"
|
|
40322
|
+
}), method(object({}), array(LlmDefaultSchema)), method(object({
|
|
40153
40323
|
selector: LlmDefaultSelectorSchema,
|
|
40154
40324
|
profileId: string().nullable()
|
|
40155
40325
|
}), _void(), {
|
|
@@ -40317,14 +40487,106 @@ var LogEntrySchema = object({
|
|
|
40317
40487
|
meta: record(string(), unknown()).optional(),
|
|
40318
40488
|
tags: record(string(), string()).optional()
|
|
40319
40489
|
});
|
|
40320
|
-
|
|
40321
|
-
|
|
40490
|
+
/**
|
|
40491
|
+
* A history READ against one destination (D898).
|
|
40492
|
+
*
|
|
40493
|
+
* Every filter is applied by the PROVIDER, before the limit — a filter the
|
|
40494
|
+
* browser applied after the limit is what made a rare device's lines
|
|
40495
|
+
* unreachable behind a busy one's. `before` / `after` are cursors the provider
|
|
40496
|
+
* minted (opaque to everyone else): a file position for the rotated files, a
|
|
40497
|
+
* nanosecond timestamp for Loki.
|
|
40498
|
+
*
|
|
40499
|
+
* A read is BOUNDED by `budgetMs`: a filter that matches nothing on a 30-day
|
|
40500
|
+
* store answers `done: false` with the cursor it reached and the bytes it
|
|
40501
|
+
* scanned, and the caller decides whether to go on. That is what makes a long
|
|
40502
|
+
* scan show progress and stop when asked — `cancelRead` ends the slice in
|
|
40503
|
+
* flight, and not asking for the next slice ends the scan.
|
|
40504
|
+
*/
|
|
40505
|
+
var LogReadQuerySchema = object({
|
|
40506
|
+
/** Correlates `cancelRead`. Caller-chosen, unique per in-flight read. */
|
|
40507
|
+
requestId: string().min(1).max(64).optional(),
|
|
40508
|
+
/** The device the line is about (`tags.deviceId`, numeric). */
|
|
40509
|
+
deviceId: number().int().optional(),
|
|
40510
|
+
/**
|
|
40511
|
+
* The emitting addon — bare manifest id; `@<version>` / `::<sub>` suffixes
|
|
40512
|
+
* match. Not `addonId`: a cap router reads that name as "which provider".
|
|
40513
|
+
*/
|
|
40514
|
+
fromAddonId: string().min(1).max(200).optional(),
|
|
40515
|
+
/**
|
|
40516
|
+
* The emitting node: matches the agent that emitted the line, the node
|
|
40517
|
+
* itself, or a worker under it (`<agent>/<runner>`) — the `agentId`
|
|
40518
|
+
* semantics of `matchesLogTags`. Not `nodeId`: a cap router reads that
|
|
40519
|
+
* name as "which node's provider".
|
|
40520
|
+
*/
|
|
40521
|
+
fromNodeId: string().min(1).max(200).optional(),
|
|
40522
|
+
/** Any other tag, exact match (AND). */
|
|
40523
|
+
tags: record(string(), union([string(), number()])).optional(),
|
|
40524
|
+
/** Severity FLOOR: this level and above. */
|
|
40322
40525
|
level: LogLevelSchema.optional(),
|
|
40323
|
-
|
|
40324
|
-
|
|
40325
|
-
|
|
40326
|
-
|
|
40327
|
-
|
|
40526
|
+
/** Case-insensitive substring over message, scope, tag values and meta values. */
|
|
40527
|
+
text: string().min(1).max(200).optional(),
|
|
40528
|
+
/** Epoch ms, inclusive. */
|
|
40529
|
+
since: number().optional(),
|
|
40530
|
+
/** Epoch ms, inclusive. */
|
|
40531
|
+
until: number().optional(),
|
|
40532
|
+
/** Older than this cursor (exclusive). Absent with `after` absent ⇒ from the newest. */
|
|
40533
|
+
before: string().min(1).max(1024).optional(),
|
|
40534
|
+
/** Newer than this cursor (exclusive). */
|
|
40535
|
+
after: string().min(1).max(1024).optional(),
|
|
40536
|
+
limit: number().int().min(1).max(1e3).optional(),
|
|
40537
|
+
/** Wall-clock bound of this slice. The provider caps it. */
|
|
40538
|
+
budgetMs: number().int().min(50).max(1e4).optional()
|
|
40539
|
+
});
|
|
40540
|
+
var LogReadResultSchema = object({
|
|
40541
|
+
/** Newest first. */
|
|
40542
|
+
entries: array(object({
|
|
40543
|
+
/** `<bootId>.<seq>` minted by the emitting LogManager — the dedupe key. */
|
|
40544
|
+
id: string().optional(),
|
|
40545
|
+
/** Epoch ms. */
|
|
40546
|
+
timestamp: number(),
|
|
40547
|
+
level: LogLevelSchema,
|
|
40548
|
+
scope: string().optional(),
|
|
40549
|
+
message: string(),
|
|
40550
|
+
tags: record(string(), union([string(), number()])).optional(),
|
|
40551
|
+
meta: record(string(), unknown()).optional()
|
|
40552
|
+
})),
|
|
40553
|
+
/** Pass as `before` for the next older page; null when nothing older exists. */
|
|
40554
|
+
nextBefore: string().nullable(),
|
|
40555
|
+
/** Pass as `after` to read what arrived since; null when unknown. */
|
|
40556
|
+
nextAfter: string().nullable(),
|
|
40557
|
+
/** Bytes this slice read (files) or received (remote). Progress, not a promise. */
|
|
40558
|
+
scannedBytes: number().int().nonnegative(),
|
|
40559
|
+
/**
|
|
40560
|
+
* True when the scan in this direction reached the end of the store.
|
|
40561
|
+
* False with fewer than `limit` entries means the budget ran out first —
|
|
40562
|
+
* call again with `nextBefore` to go on.
|
|
40563
|
+
*/
|
|
40564
|
+
done: boolean(),
|
|
40565
|
+
/** True when `cancelRead` ended this slice early. */
|
|
40566
|
+
cancelled: boolean().optional()
|
|
40567
|
+
});
|
|
40568
|
+
var LogReadCapabilitiesSchema = object({
|
|
40569
|
+
/** False ⇒ this destination only ships lines (console, forwarder, an unconfigured Loki). */
|
|
40570
|
+
readable: boolean(),
|
|
40571
|
+
/** Why not, when `readable` is false — rendered next to the source. */
|
|
40572
|
+
reason: string().nullable(),
|
|
40573
|
+
/** Filters the provider applies itself. A false one is applied by nobody. */
|
|
40574
|
+
filters: object({
|
|
40575
|
+
deviceId: boolean(),
|
|
40576
|
+
addonId: boolean(),
|
|
40577
|
+
nodeId: boolean(),
|
|
40578
|
+
tags: boolean(),
|
|
40579
|
+
level: boolean(),
|
|
40580
|
+
text: boolean(),
|
|
40581
|
+
timeRange: boolean()
|
|
40582
|
+
}),
|
|
40583
|
+
/** How far back the store reaches, when the provider knows (days). */
|
|
40584
|
+
retentionDays: number().nullable()
|
|
40585
|
+
});
|
|
40586
|
+
method(LogEntrySchema, _void(), { kind: "mutation" }), optionalMethod(_void(), LogReadCapabilitiesSchema, { auth: "admin" }), optionalMethod(LogReadQuerySchema, LogReadResultSchema, { auth: "admin" }), optionalMethod(object({ requestId: string().min(1).max(64) }), object({ cancelled: boolean() }), {
|
|
40587
|
+
kind: "mutation",
|
|
40588
|
+
auth: "admin"
|
|
40589
|
+
});
|
|
40328
40590
|
/**
|
|
40329
40591
|
* `login-method` — collection cap through which auth addons contribute
|
|
40330
40592
|
* their pre-auth login surfaces to the login page. This is the SINGLE,
|
|
@@ -42042,9 +42304,11 @@ var alarmPanelCapability = {
|
|
|
42042
42304
|
*/
|
|
42043
42305
|
durability: "restored",
|
|
42044
42306
|
/**
|
|
42045
|
-
* History (D850):
|
|
42307
|
+
* History (D850): the panel's lifecycle state as an `enum` series —
|
|
42308
|
+
* change-only, no floor, so an `arming -> pending -> triggered` sequence of a
|
|
42309
|
+
* few seconds keeps every step. Who armed it stays in the events ledger.
|
|
42046
42310
|
*/
|
|
42047
|
-
history: "
|
|
42311
|
+
history: { fields: { state: { kind: "enum" } } },
|
|
42048
42312
|
/** Clock fields: written, but excluded from the compare that decides
|
|
42049
42313
|
* whether persisting is worth a SQLite commit. */
|
|
42050
42314
|
volatileStateFields: ["lastChangedAt"]
|
|
@@ -42922,6 +43186,33 @@ var NcRuleTargetSchema = object({
|
|
|
42922
43186
|
params: record(string(), unknown()).optional()
|
|
42923
43187
|
});
|
|
42924
43188
|
/**
|
|
43189
|
+
* WHAT THE NOTIFICATION'S PICTURE IS (D897) — the ONE media choice of a rule.
|
|
43190
|
+
*
|
|
43191
|
+
* Every mode starts from the same CLEAN source frame of the trigger moment
|
|
43192
|
+
* (keyFrame → sceneFrame → lastSceneFrame, narrowed to the trigger instant and
|
|
43193
|
+
* to the zone that fired the rule) and renders it once at send time:
|
|
43194
|
+
* - `scene-boxes` — the whole scene, the subject outlined thick in the accent
|
|
43195
|
+
* colour and every OTHER track visible at that instant outlined thin, each
|
|
43196
|
+
* labelled with class and confidence ("dog 87%").
|
|
43197
|
+
* - `crop` — the subject cut out of that frame around its box at that instant.
|
|
43198
|
+
* - `clean` — the whole scene with nothing drawn on it.
|
|
43199
|
+
* - `none` — no picture.
|
|
43200
|
+
*
|
|
43201
|
+
* A mode that cannot be honoured (no box at that instant, a photograph with no
|
|
43202
|
+
* tracked subject) ships `clean` and names the reason in the log, per camera.
|
|
43203
|
+
* It replaces the `attach` × `frame` × `zoneCrop` triple, which let one rule
|
|
43204
|
+
* ship a crop on one event and a boxed scene on the next depending on which
|
|
43205
|
+
* stored kind had landed.
|
|
43206
|
+
*/
|
|
43207
|
+
var NcMediaImageSchema = _enum([
|
|
43208
|
+
"scene-boxes",
|
|
43209
|
+
"crop",
|
|
43210
|
+
"clean",
|
|
43211
|
+
"none"
|
|
43212
|
+
]);
|
|
43213
|
+
/**
|
|
43214
|
+
* @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
|
|
43215
|
+
*
|
|
42925
43216
|
* Media attachment policy (P1 still-image subset).
|
|
42926
43217
|
* - `best` — the best AVAILABLE subject image at dispatch time (D-3).
|
|
42927
43218
|
* - `best-matching` — the media that explains WHY the rule fired: a rule
|
|
@@ -42935,6 +43226,8 @@ var NcRuleTargetSchema = object({
|
|
|
42935
43226
|
* - `none` — no attachment.
|
|
42936
43227
|
*/
|
|
42937
43228
|
/**
|
|
43229
|
+
* @deprecated Read only by `normalizeNcMediaPolicy` (D897) — see {@link NcMediaImageSchema}.
|
|
43230
|
+
*
|
|
42938
43231
|
* WHAT THE PICTURE SHOWS — chosen explicitly, because the implicit ladders
|
|
42939
43232
|
* conflate it with the selection strategy and betray the request: asking for
|
|
42940
43233
|
* the clean scene frame on an object-event owner used to start at
|
|
@@ -42963,16 +43256,29 @@ var NcMediaFrameSchema = _enum([
|
|
|
42963
43256
|
*/
|
|
42964
43257
|
var NcLinkedCameraModeSchema = _enum(["mosaic", "each"]);
|
|
42965
43258
|
var NcMediaPolicySchema = object({
|
|
43259
|
+
/**
|
|
43260
|
+
* The picture — see {@link NcMediaImageSchema}. Absent on a rule nobody has
|
|
43261
|
+
* saved since D897: `normalizeNcMediaPolicy` derives it from the legacy
|
|
43262
|
+
* triple below, at load and at every write, and the store keeps only this.
|
|
43263
|
+
*/
|
|
43264
|
+
image: NcMediaImageSchema.optional(),
|
|
43265
|
+
/**
|
|
43266
|
+
* Draw the zone that FIRED the rule on the picture (`scene-boxes` / `clean`;
|
|
43267
|
+
* a `crop` never shows it). Valid only on a rule whose trigger is a zone —
|
|
43268
|
+
* `conditions.zones` or an occupancy zone — and refused on save otherwise.
|
|
43269
|
+
* Replaces `zoneCrop`.
|
|
43270
|
+
*/
|
|
43271
|
+
showTriggerZone: boolean().optional(),
|
|
43272
|
+
/** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
|
|
42966
43273
|
attach: _enum([
|
|
42967
43274
|
"best",
|
|
42968
43275
|
"best-matching",
|
|
42969
43276
|
"keyFrame",
|
|
42970
43277
|
"none"
|
|
42971
|
-
]).
|
|
42972
|
-
/**
|
|
43278
|
+
]).optional(),
|
|
43279
|
+
/** @deprecated D897 — accepted from an editor that predates `image`, folded into it on save. */
|
|
42973
43280
|
frame: NcMediaFrameSchema.optional(),
|
|
42974
|
-
/**
|
|
42975
|
-
* "show me the ZONE", not the whole scene or the subject crop. */
|
|
43281
|
+
/** @deprecated D897 — folded into `image: 'clean'` + `showTriggerZone` on save. */
|
|
42976
43282
|
zoneCrop: boolean().optional(),
|
|
42977
43283
|
/**
|
|
42978
43284
|
* Also attach a short GIF cut from the stream broker's clip ring around the
|
|
@@ -43144,7 +43450,9 @@ var NcRuleInputSchema = object({
|
|
|
43144
43450
|
* targets.
|
|
43145
43451
|
*/
|
|
43146
43452
|
targetUsers: array(string()).optional(),
|
|
43147
|
-
|
|
43453
|
+
/** Absent = the kind's default picture (`resolveNcMediaImage`): the subject crop for a
|
|
43454
|
+
* detection, the clean scene for a sensor or a sound. Set explicitly on save (D897). */
|
|
43455
|
+
media: NcMediaPolicySchema.default({}),
|
|
43148
43456
|
throttle: NcThrottleSchema.default({
|
|
43149
43457
|
cooldownSec: 60,
|
|
43150
43458
|
scope: "rule-device"
|
|
@@ -44081,13 +44389,37 @@ var NcAlarmModeOpeningsSchema = object({
|
|
|
44081
44389
|
/** Covered devices whose state could not be read (D49): neither open nor closed. */
|
|
44082
44390
|
unknown: array(number().int())
|
|
44083
44391
|
});
|
|
44392
|
+
/**
|
|
44393
|
+
* One alarm INPUT — a (rule, device) pair — the operator bypassed until the
|
|
44394
|
+
* next disarm ("Bypass this input until disarm" on a trigger notification, or
|
|
44395
|
+
* `nc.bypassAlarmInput`). Reported so an armed alarm with a silenced input
|
|
44396
|
+
* never looks fully armed (D62: off must never look like broken).
|
|
44397
|
+
*/
|
|
44398
|
+
var NcAlarmInputBypassViewSchema = object({
|
|
44399
|
+
ruleId: string(),
|
|
44400
|
+
/** The rule's current name (its frozen name when the rule is gone). */
|
|
44401
|
+
ruleName: string(),
|
|
44402
|
+
/** The input: the sensor of the match, else its camera. */
|
|
44403
|
+
deviceId: number().int(),
|
|
44404
|
+
/** The input's current name. */
|
|
44405
|
+
name: string(),
|
|
44406
|
+
/** When it was bypassed (ms epoch). */
|
|
44407
|
+
since: number(),
|
|
44408
|
+
/** Triggers from this input dropped since. */
|
|
44409
|
+
dropped: number().int().min(0)
|
|
44410
|
+
});
|
|
44084
44411
|
var NcAlarmLiveSchema = object({
|
|
44085
44412
|
state: AlarmStateSchema,
|
|
44086
44413
|
/** The mode being armed into (exit delay) or held; null when disarmed. */
|
|
44087
44414
|
targetMode: AlarmArmModeSchema.nullable(),
|
|
44088
44415
|
availableModes: array(AlarmArmModeSchema),
|
|
44089
44416
|
openings: array(NcAlarmModeOpeningsSchema),
|
|
44090
|
-
exclusions: array(NcAlarmExclusionViewSchema)
|
|
44417
|
+
exclusions: array(NcAlarmExclusionViewSchema),
|
|
44418
|
+
/**
|
|
44419
|
+
* Inputs bypassed for the rest of this arm session; cleared on disarm.
|
|
44420
|
+
* Defaulted so an older hub answer still parses (as "none known").
|
|
44421
|
+
*/
|
|
44422
|
+
bypassedInputs: array(NcAlarmInputBypassViewSchema).default([])
|
|
44091
44423
|
});
|
|
44092
44424
|
var NcAlarmConfigSchema = object({
|
|
44093
44425
|
/**
|
|
@@ -54831,9 +55163,11 @@ var connectivityCapability = {
|
|
|
54831
55163
|
*/
|
|
54832
55164
|
durability: "restored",
|
|
54833
55165
|
/**
|
|
54834
|
-
* History (D850):
|
|
55166
|
+
* History (D850): `connected` as a boolean series — change-only, no floor. It
|
|
55167
|
+
* is the upstream entity's own link (a HA connectivity sensor), not the
|
|
55168
|
+
* device's reachability, which stays `device-status.online`.
|
|
54835
55169
|
*/
|
|
54836
|
-
history: "
|
|
55170
|
+
history: { fields: { connected: { kind: "boolean" } } },
|
|
54837
55171
|
/** Clock fields: written, but excluded from the compare that decides
|
|
54838
55172
|
* whether persisting is worth a SQLite commit. */
|
|
54839
55173
|
volatileStateFields: ["lastChangedAt"]
|
|
@@ -55657,11 +55991,22 @@ var dishwasherCapability = {
|
|
|
55657
55991
|
},
|
|
55658
55992
|
runtimeState: DishwasherStatusSchema,
|
|
55659
55993
|
durability: "session",
|
|
55660
|
-
history: { fields: {
|
|
55661
|
-
|
|
55662
|
-
|
|
55663
|
-
|
|
55664
|
-
|
|
55994
|
+
history: { fields: {
|
|
55995
|
+
progressPercent: {
|
|
55996
|
+
kind: "gauge",
|
|
55997
|
+
unit: "%",
|
|
55998
|
+
deadband: 2
|
|
55999
|
+
},
|
|
56000
|
+
state: { kind: "enum" },
|
|
56001
|
+
operationState: { kind: "enum" },
|
|
56002
|
+
remainingSeconds: {
|
|
56003
|
+
kind: "gauge",
|
|
56004
|
+
unit: "s",
|
|
56005
|
+
minIntervalMs: 6e4
|
|
56006
|
+
},
|
|
56007
|
+
doorOpen: { kind: "boolean" },
|
|
56008
|
+
powerOn: { kind: "boolean" }
|
|
56009
|
+
} }
|
|
55665
56010
|
};
|
|
55666
56011
|
var DoorbellStatusSchema = object({
|
|
55667
56012
|
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
@@ -55778,9 +56123,15 @@ var enumSensorCapability = {
|
|
|
55778
56123
|
*/
|
|
55779
56124
|
durability: "restored",
|
|
55780
56125
|
/**
|
|
55781
|
-
* History (D850):
|
|
56126
|
+
* History (D850): the value as an `enum` series (an appliance's program or
|
|
56127
|
+
* operation state, an HVAC action). The option set is per device, so the
|
|
56128
|
+
* value list is LEARNED as values are first seen (bounded). A sensor with a
|
|
56129
|
+
* `format` carries a timestamp, not a state, and is not recorded.
|
|
55782
56130
|
*/
|
|
55783
|
-
history:
|
|
56131
|
+
history: { fields: { value: {
|
|
56132
|
+
kind: "enum",
|
|
56133
|
+
skipWhenSet: "format"
|
|
56134
|
+
} } },
|
|
55784
56135
|
/** Clock fields: written, but excluded from the compare that decides
|
|
55785
56136
|
* whether persisting is worth a SQLite commit. */
|
|
55786
56137
|
volatileStateFields: ["lastFetchedAt"]
|
|
@@ -57754,9 +58105,10 @@ var lockControlCapability = {
|
|
|
57754
58105
|
*/
|
|
57755
58106
|
durability: "restored",
|
|
57756
58107
|
/**
|
|
57757
|
-
* History (D850):
|
|
58108
|
+
* History (D850): the lock's state as an `enum` series — change-only, no
|
|
58109
|
+
* floor: a jam or an unlock lasting seconds is the edge an operator looks for.
|
|
57758
58110
|
*/
|
|
57759
|
-
history: "
|
|
58111
|
+
history: { fields: { state: { kind: "enum" } } },
|
|
57760
58112
|
/** Clock fields: written, but excluded from the compare that decides
|
|
57761
58113
|
* whether persisting is worth a SQLite commit. */
|
|
57762
58114
|
volatileStateFields: ["lastChangedAt"]
|
|
@@ -57930,9 +58282,18 @@ var mediaPlayerCapability = {
|
|
|
57930
58282
|
*/
|
|
57931
58283
|
durability: "session",
|
|
57932
58284
|
/**
|
|
57933
|
-
* History (D850):
|
|
58285
|
+
* History (D850): volume (a level an operator or an automation sets; the
|
|
58286
|
+
* default 10 s floor folds a slider drag into its end value) and mute.
|
|
58287
|
+
* `positionMs` is not recorded: it moves continuously while playing.
|
|
57934
58288
|
*/
|
|
57935
|
-
history:
|
|
58289
|
+
history: { fields: {
|
|
58290
|
+
volumeLevel: {
|
|
58291
|
+
kind: "gauge",
|
|
58292
|
+
unit: "%",
|
|
58293
|
+
deadband: 1
|
|
58294
|
+
},
|
|
58295
|
+
isMuted: { kind: "boolean" }
|
|
58296
|
+
} }
|
|
57936
58297
|
};
|
|
57937
58298
|
/**
|
|
57938
58299
|
* mesh-network — collection cap for mesh-VPN providers.
|
|
@@ -63373,9 +63734,29 @@ var streamParamsCapability = {
|
|
|
63373
63734
|
*/
|
|
63374
63735
|
durability: "restored",
|
|
63375
63736
|
/**
|
|
63376
|
-
* History (D850):
|
|
63737
|
+
* History (D850): the configured bitrate and frame rate of the main and sub
|
|
63738
|
+
* profiles. Configuration, so change-only on the default floor: a point is an
|
|
63739
|
+
* operator's (or a tuner's) edit, which is exactly what a chart of a stream's
|
|
63740
|
+
* quality over time must show.
|
|
63377
63741
|
*/
|
|
63378
|
-
history:
|
|
63742
|
+
history: { fields: {
|
|
63743
|
+
"main.bitrate": {
|
|
63744
|
+
kind: "gauge",
|
|
63745
|
+
unit: "kbps"
|
|
63746
|
+
},
|
|
63747
|
+
"main.framerate": {
|
|
63748
|
+
kind: "gauge",
|
|
63749
|
+
unit: "fps"
|
|
63750
|
+
},
|
|
63751
|
+
"sub.bitrate": {
|
|
63752
|
+
kind: "gauge",
|
|
63753
|
+
unit: "kbps"
|
|
63754
|
+
},
|
|
63755
|
+
"sub.framerate": {
|
|
63756
|
+
kind: "gauge",
|
|
63757
|
+
unit: "fps"
|
|
63758
|
+
}
|
|
63759
|
+
} },
|
|
63379
63760
|
/** Clock fields: written, but excluded from the compare that decides
|
|
63380
63761
|
* whether persisting is worth a SQLite commit. */
|
|
63381
63762
|
volatileStateFields: ["lastFetchedAt"]
|
|
@@ -64210,26 +64591,6 @@ var ApiKeySummarySchema = object({
|
|
|
64210
64591
|
createdAt: number(),
|
|
64211
64592
|
lastUsedAt: number().optional()
|
|
64212
64593
|
});
|
|
64213
|
-
var ScopedTokenSummarySchema = object({
|
|
64214
|
-
id: string(),
|
|
64215
|
-
userId: string(),
|
|
64216
|
-
name: string(),
|
|
64217
|
-
tokenPrefix: string(),
|
|
64218
|
-
scopes: array(TokenScopeSchema),
|
|
64219
|
-
expiresAt: number().nullish(),
|
|
64220
|
-
lastUsedAt: number().nullish(),
|
|
64221
|
-
createdAt: number()
|
|
64222
|
-
});
|
|
64223
|
-
var CreateScopedTokenInputSchema = object({
|
|
64224
|
-
userId: string(),
|
|
64225
|
-
name: string(),
|
|
64226
|
-
scopes: array(TokenScopeSchema),
|
|
64227
|
-
expiresAt: number().optional()
|
|
64228
|
-
});
|
|
64229
|
-
var CreateScopedTokenResultSchema = object({
|
|
64230
|
-
token: string(),
|
|
64231
|
-
record: ScopedTokenSummarySchema
|
|
64232
|
-
});
|
|
64233
64594
|
var OauthSessionSummarySchema = object({
|
|
64234
64595
|
id: string(),
|
|
64235
64596
|
userId: string(),
|
|
@@ -64251,11 +64612,11 @@ var TotpStatusSchema = object({
|
|
|
64251
64612
|
confirmedAt: number().nullable()
|
|
64252
64613
|
});
|
|
64253
64614
|
/**
|
|
64254
|
-
* user-management — singleton capability for user accounts
|
|
64255
|
-
*
|
|
64615
|
+
* user-management — singleton capability for user accounts and the
|
|
64616
|
+
* legacy API-key rows.
|
|
64256
64617
|
*
|
|
64257
64618
|
* v2 model: every method gated by `auth: 'admin'`. Admin-only delegation
|
|
64258
|
-
* — the subset check on `setUserScopes`
|
|
64619
|
+
* — the subset check on `setUserScopes` is moot
|
|
64259
64620
|
* because non-admins never reach these. If/when we open non-admin
|
|
64260
64621
|
* delegation, structural caller-scope subset check goes inside the
|
|
64261
64622
|
* provider.
|
|
@@ -64312,15 +64673,7 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
|
|
|
64312
64673
|
kind: "mutation",
|
|
64313
64674
|
auth: "admin",
|
|
64314
64675
|
access: "delete"
|
|
64315
|
-
}), method(
|
|
64316
|
-
kind: "mutation",
|
|
64317
|
-
auth: "admin",
|
|
64318
|
-
access: "create"
|
|
64319
|
-
}), method(object({ id: string() }), object({ success: literal(true) }), {
|
|
64320
|
-
kind: "mutation",
|
|
64321
|
-
auth: "admin",
|
|
64322
|
-
access: "delete"
|
|
64323
|
-
}), method(object({ token: string() }), ScopedTokenSummarySchema.nullable(), { access: "view" }), method(object({ userId: string() }), array(ScopedTokenSummarySchema), { auth: "admin" }), method(object({ userId: string() }), TotpSetupResultSchema, {
|
|
64676
|
+
}), method(object({ userId: string() }), TotpSetupResultSchema, {
|
|
64324
64677
|
kind: "mutation",
|
|
64325
64678
|
auth: "admin",
|
|
64326
64679
|
access: "create"
|
|
@@ -66581,6 +66934,15 @@ var BaseDevice$1 = class {
|
|
|
66581
66934
|
* Drivers can use the `getProbeFlags()` helper to read the flag bag
|
|
66582
66935
|
* with a typed cast.
|
|
66583
66936
|
*
|
|
66937
|
+
* Answer what you KNOW. A plain array is read as the complete list only
|
|
66938
|
+
* while this device is `online` and probed; return
|
|
66939
|
+
* `accessoryChildrenUnknown(reason)` whenever you cannot know the list right
|
|
66940
|
+
* now (no credentials, parent not connected, a failed or partial read) —
|
|
66941
|
+
* the kernel then deletes nothing. Return `accessoryChildrenComplete(list)`
|
|
66942
|
+
* to say "connected, and this is the complete list" explicitly. A shrink is
|
|
66943
|
+
* deleted only after a second agreeing complete read on a later probe (D49;
|
|
66944
|
+
* `packages/system/src/kernel/moleculer/accessory-prune-gate.ts`).
|
|
66945
|
+
*
|
|
66584
66946
|
* Default: no children.
|
|
66585
66947
|
*/
|
|
66586
66948
|
getAccessoryChildren() {
|
|
@@ -66604,6 +66966,22 @@ var BaseDevice$1 = class {
|
|
|
66604
66966
|
return (this.runtimeState.getCapState("feature-probe")?.lastProbedAt ?? 0) > 0;
|
|
66605
66967
|
}
|
|
66606
66968
|
};
|
|
66969
|
+
function accessoryChildrenUnknown(reason, known) {
|
|
66970
|
+
return known === void 0 ? {
|
|
66971
|
+
kind: "unknown",
|
|
66972
|
+
reason
|
|
66973
|
+
} : {
|
|
66974
|
+
kind: "unknown",
|
|
66975
|
+
reason,
|
|
66976
|
+
known
|
|
66977
|
+
};
|
|
66978
|
+
}
|
|
66979
|
+
function accessoryChildrenComplete(children) {
|
|
66980
|
+
return {
|
|
66981
|
+
kind: "complete",
|
|
66982
|
+
children
|
|
66983
|
+
};
|
|
66984
|
+
}
|
|
66607
66985
|
/**
|
|
66608
66986
|
* Delays before retry rounds 1..N — the round count IS the bound.
|
|
66609
66987
|
* 10 s catches "the hub was busy for a moment"; the full schedule
|
|
@@ -70410,7 +70788,7 @@ Object.freeze({
|
|
|
70410
70788
|
capName: "llm",
|
|
70411
70789
|
capScope: "system",
|
|
70412
70790
|
addonId: null,
|
|
70413
|
-
access: "
|
|
70791
|
+
access: "create"
|
|
70414
70792
|
},
|
|
70415
70793
|
"llm.listNodeModels": {
|
|
70416
70794
|
capName: "llm",
|
|
@@ -70712,7 +71090,19 @@ Object.freeze({
|
|
|
70712
71090
|
addonId: null,
|
|
70713
71091
|
access: "view"
|
|
70714
71092
|
},
|
|
70715
|
-
"logDestination.
|
|
71093
|
+
"logDestination.cancelRead": {
|
|
71094
|
+
capName: "log-destination",
|
|
71095
|
+
capScope: "system",
|
|
71096
|
+
addonId: null,
|
|
71097
|
+
access: "create"
|
|
71098
|
+
},
|
|
71099
|
+
"logDestination.describeRead": {
|
|
71100
|
+
capName: "log-destination",
|
|
71101
|
+
capScope: "system",
|
|
71102
|
+
addonId: null,
|
|
71103
|
+
access: "view"
|
|
71104
|
+
},
|
|
71105
|
+
"logDestination.read": {
|
|
70716
71106
|
capName: "log-destination",
|
|
70717
71107
|
capScope: "system",
|
|
70718
71108
|
addonId: null,
|
|
@@ -75074,12 +75464,6 @@ Object.freeze({
|
|
|
75074
75464
|
addonId: null,
|
|
75075
75465
|
access: "create"
|
|
75076
75466
|
},
|
|
75077
|
-
"userManagement.createScopedToken": {
|
|
75078
|
-
capName: "user-management",
|
|
75079
|
-
capScope: "system",
|
|
75080
|
-
addonId: null,
|
|
75081
|
-
access: "create"
|
|
75082
|
-
},
|
|
75083
75467
|
"userManagement.createUser": {
|
|
75084
75468
|
capName: "user-management",
|
|
75085
75469
|
capScope: "system",
|
|
@@ -75128,12 +75512,6 @@ Object.freeze({
|
|
|
75128
75512
|
addonId: null,
|
|
75129
75513
|
access: "view"
|
|
75130
75514
|
},
|
|
75131
|
-
"userManagement.listScopedTokens": {
|
|
75132
|
-
capName: "user-management",
|
|
75133
|
-
capScope: "system",
|
|
75134
|
-
addonId: null,
|
|
75135
|
-
access: "view"
|
|
75136
|
-
},
|
|
75137
75515
|
"userManagement.listUsers": {
|
|
75138
75516
|
capName: "user-management",
|
|
75139
75517
|
capScope: "system",
|
|
@@ -75188,12 +75566,6 @@ Object.freeze({
|
|
|
75188
75566
|
addonId: null,
|
|
75189
75567
|
access: "delete"
|
|
75190
75568
|
},
|
|
75191
|
-
"userManagement.revokeScopedToken": {
|
|
75192
|
-
capName: "user-management",
|
|
75193
|
-
capScope: "system",
|
|
75194
|
-
addonId: null,
|
|
75195
|
-
access: "delete"
|
|
75196
|
-
},
|
|
75197
75569
|
"userManagement.setupTotp": {
|
|
75198
75570
|
capName: "user-management",
|
|
75199
75571
|
capScope: "system",
|
|
@@ -75224,12 +75596,6 @@ Object.freeze({
|
|
|
75224
75596
|
addonId: null,
|
|
75225
75597
|
access: "view"
|
|
75226
75598
|
},
|
|
75227
|
-
"userManagement.validateScopedToken": {
|
|
75228
|
-
capName: "user-management",
|
|
75229
|
-
capScope: "system",
|
|
75230
|
-
addonId: null,
|
|
75231
|
-
access: "view"
|
|
75232
|
-
},
|
|
75233
75599
|
"userManagement.verifyTotp": {
|
|
75234
75600
|
capName: "user-management",
|
|
75235
75601
|
capScope: "system",
|
|
@@ -76743,6 +77109,11 @@ Object.freeze({
|
|
|
76743
77109
|
form: "single",
|
|
76744
77110
|
optional: false
|
|
76745
77111
|
}],
|
|
77112
|
+
"logDestination.read": [{
|
|
77113
|
+
name: "deviceId",
|
|
77114
|
+
form: "single",
|
|
77115
|
+
optional: true
|
|
77116
|
+
}],
|
|
76746
77117
|
"mediaPlayer.getStatus": [{
|
|
76747
77118
|
name: "deviceId",
|
|
76748
77119
|
form: "single",
|
|
@@ -134149,7 +134520,7 @@ var DreameChildDevice = class extends BaseDevice$1 {
|
|
|
134149
134520
|
this.dreameDeviceId = persisted.dreameDeviceId;
|
|
134150
134521
|
this.brokerId = persisted.brokerId;
|
|
134151
134522
|
this.model = persisted.model;
|
|
134152
|
-
this.online =
|
|
134523
|
+
this.online = dreameFacades.getDevice(this.brokerId, this.dreameDeviceId) !== null;
|
|
134153
134524
|
this.updateSourceInfo({
|
|
134154
134525
|
id: this.dreameDeviceId,
|
|
134155
134526
|
system: "dreame"
|
|
@@ -183796,7 +184167,28 @@ var DreameContainerDevice = class extends BaseDevice$1 {
|
|
|
183796
184167
|
system: "dreame"
|
|
183797
184168
|
});
|
|
183798
184169
|
}
|
|
184170
|
+
/**
|
|
184171
|
+
* The child list is known only while the cloud device is REACHABLE: every
|
|
184172
|
+
* presence-filtered child is derived from the live handle. Without it (no
|
|
184173
|
+
* credentials, cloud down, before the first connect) the answer is UNKNOWN —
|
|
184174
|
+
* the kernel then deletes nothing (D49; it deleted 97 accessories when this
|
|
184175
|
+
* answered only the core child) — and only the core child is named to spawn.
|
|
184176
|
+
*/
|
|
183799
184177
|
getAccessoryChildren() {
|
|
184178
|
+
const specs = this.buildChildSpecs();
|
|
184179
|
+
if (dreameFacades.getDevice(this.brokerId, this.dreameDeviceId) === null) {
|
|
184180
|
+
this.ctx.logger.info("DreameContainerDevice: cloud device not reachable; child list unknown", {
|
|
184181
|
+
tags: { deviceId: this.id },
|
|
184182
|
+
meta: {
|
|
184183
|
+
dreameDeviceId: this.dreameDeviceId,
|
|
184184
|
+
integrationId: this.brokerId
|
|
184185
|
+
}
|
|
184186
|
+
});
|
|
184187
|
+
return accessoryChildrenUnknown("dreame cloud device not reachable", specs.slice(0, 1));
|
|
184188
|
+
}
|
|
184189
|
+
return accessoryChildrenComplete(specs);
|
|
184190
|
+
}
|
|
184191
|
+
buildChildSpecs() {
|
|
183800
184192
|
const kind = classifyDreameModel(this.model);
|
|
183801
184193
|
if (kind === "unsupported") {
|
|
183802
184194
|
this.ctx.logger.warn("DreameContainerDevice: unsupported model; no children", {
|