@camstack/addon-agent-ui 1.2.336 → 1.2.338
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/CHANGELOG.md +12 -0
- package/dist/.bundle-modules.json +6 -6
- package/dist/addon.js +340 -351
- package/dist/assets/{MotionZonesSettings-CWCXCBzB.js → MotionZonesSettings-CIkuKgez.js} +1 -1
- package/dist/assets/{PrivacyMaskSettings-Dyhdp0pj.js → PrivacyMaskSettings-CR63HQ9G.js} +1 -1
- package/dist/assets/{SceneMonitorEditor-BID-NcQd.js → SceneMonitorEditor-C_m6bcWd.js} +1 -1
- package/dist/assets/index-mE6ihqDj.js +145 -0
- package/dist/index.html +1 -1
- package/package.json +2 -2
- package/dist/assets/index-C9Oits7V.js +0 -145
package/dist/addon.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
|
-
//#region ../types/dist/event-category-
|
|
3
|
+
//#region ../types/dist/event-category-78tcBemo.mjs
|
|
4
4
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
5
5
|
EventCategory["SystemBoot"] = "system.boot";
|
|
6
6
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -121,6 +121,23 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
121
121
|
*/
|
|
122
122
|
EventCategory["AddonLoadRecovered"] = "addon.load-recovered";
|
|
123
123
|
/**
|
|
124
|
+
* An addon is RUNNING although its installed package is below what the
|
|
125
|
+
* running server requires (`camstack.requires.addons` of the server, or the
|
|
126
|
+
* addon's own `requires.server`). Raised once per streak by the unsupported-
|
|
127
|
+
* addon tracker, on the hub and on agents; AlertCenter turns it into one
|
|
128
|
+
* operator alert per node and package. The addon is never held back for it.
|
|
129
|
+
*
|
|
130
|
+
* Payload: `{ packageName, addonId, nodeId, installedVersion, requiredMinimum, serverVersion, unmet }`.
|
|
131
|
+
*/
|
|
132
|
+
EventCategory["AddonUnsupportedVersion"] = "addon.unsupported-version";
|
|
133
|
+
/**
|
|
134
|
+
* The package of an {@link AddonUnsupportedVersion} alert reached a supported
|
|
135
|
+
* version, or is no longer installed on the node. AlertCenter dismisses the matching alert.
|
|
136
|
+
*
|
|
137
|
+
* Payload: `{ packageName, addonId, nodeId }`.
|
|
138
|
+
*/
|
|
139
|
+
EventCategory["AddonUnsupportedResolved"] = "addon.unsupported-resolved";
|
|
140
|
+
/**
|
|
124
141
|
* Monitor scheduled the next retry for a failed addon. Transient —
|
|
125
142
|
* surfaced to the UI for live-updating the "next retry in Ns"
|
|
126
143
|
* countdown on the Addons page row, NOT persisted as an alert.
|
|
@@ -231,7 +248,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
231
248
|
EventCategory["ProcessRestarted"] = "process.restarted";
|
|
232
249
|
/**
|
|
233
250
|
* The SET of storage locations changed — one was created, edited, enabled,
|
|
234
|
-
* disabled or deleted through
|
|
251
|
+
* disabled or deleted through the location instances or the forced-delete action.
|
|
235
252
|
*
|
|
236
253
|
* Telemetry, not a transaction (D8/D11): every consumer that re-resolves on
|
|
237
254
|
* it must also converge on its own periodic path, because a dropped event
|
|
@@ -5849,7 +5866,7 @@ var ZodIssueCode = {
|
|
|
5849
5866
|
var ZodFirstPartyTypeKind;
|
|
5850
5867
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5851
5868
|
//#endregion
|
|
5852
|
-
//#region ../types/dist/sleep-
|
|
5869
|
+
//#region ../types/dist/sleep-CQP-REJp.mjs
|
|
5853
5870
|
/**
|
|
5854
5871
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5855
5872
|
* window to float samples (D455).
|
|
@@ -6206,6 +6223,59 @@ Object.fromEntries([
|
|
|
6206
6223
|
function isValuelessField(field) {
|
|
6207
6224
|
return field.type === "separator" || field.type === "info" || field.type === "qr-code" || field.type === "button" || field.type === "object-array" || field.type === "widget" || field.type === "addon-action-button" || field.type === "device-action-button" || field.type === "account-sign-in" || field.type === "secret-presence";
|
|
6208
6225
|
}
|
|
6226
|
+
/**
|
|
6227
|
+
* Base collector: flatten a hydrated `ConfigUISchemaWithValues` into
|
|
6228
|
+
* `key → { value, default }`, recursing through `group` and `sub-tabs`
|
|
6229
|
+
* layout fields. Keeping `value` and `default` SEPARATE (rather than
|
|
6230
|
+
* pre-resolving) lets callers both read the effective value AND detect
|
|
6231
|
+
* overrides (`value` differs from `default`). Structural over `unknown`;
|
|
6232
|
+
* malformed input yields an empty map, never throws.
|
|
6233
|
+
*/
|
|
6234
|
+
function collectHydratedFieldEntries(schema) {
|
|
6235
|
+
const out = /* @__PURE__ */ new Map();
|
|
6236
|
+
if (typeof schema !== "object" || schema === null) return out;
|
|
6237
|
+
const sections = schema.sections;
|
|
6238
|
+
if (!Array.isArray(sections)) return out;
|
|
6239
|
+
for (const section of sections) if (typeof section === "object" && section !== null) collectFieldEntriesInto(section.fields, out);
|
|
6240
|
+
return out;
|
|
6241
|
+
}
|
|
6242
|
+
/** Recursive field walker for {@link collectHydratedFieldEntries}. */
|
|
6243
|
+
function collectFieldEntriesInto(fields, into) {
|
|
6244
|
+
if (!Array.isArray(fields)) return;
|
|
6245
|
+
for (const field of fields) {
|
|
6246
|
+
if (typeof field !== "object" || field === null) continue;
|
|
6247
|
+
const type = field.type;
|
|
6248
|
+
if (type === "group") {
|
|
6249
|
+
collectFieldEntriesInto(field.fields, into);
|
|
6250
|
+
continue;
|
|
6251
|
+
}
|
|
6252
|
+
if (type === "sub-tabs") {
|
|
6253
|
+
const tabs = field.tabs;
|
|
6254
|
+
if (Array.isArray(tabs)) {
|
|
6255
|
+
for (const tab of tabs) if (typeof tab === "object" && tab !== null) collectFieldEntriesInto(tab.fields, into);
|
|
6256
|
+
}
|
|
6257
|
+
continue;
|
|
6258
|
+
}
|
|
6259
|
+
const key = field.key;
|
|
6260
|
+
if (typeof key !== "string" || key.length === 0) continue;
|
|
6261
|
+
if (!("value" in field)) continue;
|
|
6262
|
+
into.set(key, {
|
|
6263
|
+
value: field.value,
|
|
6264
|
+
default: field.default
|
|
6265
|
+
});
|
|
6266
|
+
}
|
|
6267
|
+
}
|
|
6268
|
+
/**
|
|
6269
|
+
* Flatten a hydrated settings payload into `key → EFFECTIVE value`
|
|
6270
|
+
* (`value ?? default`). The read-side inverse of `hydrateSchema` for the
|
|
6271
|
+
* common "just give me the resolved values" case. Built on
|
|
6272
|
+
* {@link collectHydratedFieldEntries}.
|
|
6273
|
+
*/
|
|
6274
|
+
function collectHydratedFieldValues(schema) {
|
|
6275
|
+
const out = /* @__PURE__ */ new Map();
|
|
6276
|
+
for (const [key, entry] of collectHydratedFieldEntries(schema)) out.set(key, entry.value ?? entry.default);
|
|
6277
|
+
return out;
|
|
6278
|
+
}
|
|
6209
6279
|
function hydrateSchema(schema, values, options = {}) {
|
|
6210
6280
|
return {
|
|
6211
6281
|
...schema.tabs ? { tabs: [...schema.tabs] } : {},
|
|
@@ -6901,6 +6971,21 @@ var SCOPED_SETTINGS_SCOPES = [
|
|
|
6901
6971
|
"device-defaults",
|
|
6902
6972
|
"node"
|
|
6903
6973
|
];
|
|
6974
|
+
/** The one refusal of a key a scope did not declare. */
|
|
6975
|
+
function assertDeclaredKeys(keys, declared) {
|
|
6976
|
+
const undeclared = keys.filter((key) => !declared.has(key));
|
|
6977
|
+
if (undeclared.length > 0) throw new Error(`scoped settings: [${undeclared.join(", ")}] not declared for this scope (declared: [${[...declared].join(", ")}])`);
|
|
6978
|
+
}
|
|
6979
|
+
/** Build the handle over an addon's scoped read, write and unset. */
|
|
6980
|
+
function createScopedSettings(deps) {
|
|
6981
|
+
return {
|
|
6982
|
+
async get() {
|
|
6983
|
+
return deps.schema.parse(await deps.read());
|
|
6984
|
+
},
|
|
6985
|
+
patch: (patch) => deps.write(Object.fromEntries(Object.entries(patch))),
|
|
6986
|
+
unset: (keys) => deps.unset(keys)
|
|
6987
|
+
};
|
|
6988
|
+
}
|
|
6904
6989
|
/** A write to a secret path could not be stored in the keychain, so it was refused. */
|
|
6905
6990
|
var KeychainWriteRefusedError = class extends Error {
|
|
6906
6991
|
fieldPath;
|
|
@@ -7476,7 +7561,16 @@ function createHandle(raw, opts) {
|
|
|
7476
7561
|
return blob;
|
|
7477
7562
|
}
|
|
7478
7563
|
},
|
|
7479
|
-
writeAddonStore: writeAddon
|
|
7564
|
+
writeAddonStore: writeAddon,
|
|
7565
|
+
removeClearedKeys: (keys) => serialize("addon", async () => {
|
|
7566
|
+
const stored = await readStoredAddonBlob(raw);
|
|
7567
|
+
index.seen("addon", stored);
|
|
7568
|
+
const removable = keys.filter((key) => collectSecretMarkerRefs(stored[key]).length === 0);
|
|
7569
|
+
if (removable.length === 0) return;
|
|
7570
|
+
const patch = Object.fromEntries(removable.map((key) => [key, void 0]));
|
|
7571
|
+
await raw.writeAddonStore(patch);
|
|
7572
|
+
index.wrote("addon", patch);
|
|
7573
|
+
})
|
|
7480
7574
|
};
|
|
7481
7575
|
}
|
|
7482
7576
|
/** The context the addon sees, plus the private raw view and write outcome. */
|
|
@@ -8021,6 +8115,151 @@ var BaseAddon = class {
|
|
|
8021
8115
|
}
|
|
8022
8116
|
}
|
|
8023
8117
|
/**
|
|
8118
|
+
* Hook: values layered over the stored ones when the FORM of one scope is served
|
|
8119
|
+
* ({@link getScopedSettings}) — a preview that derives dependent options without writing.
|
|
8120
|
+
* Never applied to {@link ScopedSettings.get} or to a write. `null` ⇒ no overlay.
|
|
8121
|
+
*/
|
|
8122
|
+
async scopedSettingsOverlay(_scope, _cap, _nodeId) {
|
|
8123
|
+
return null;
|
|
8124
|
+
}
|
|
8125
|
+
/**
|
|
8126
|
+
* Hook: a write of one scope changed stored values (not called when the store reports no change,
|
|
8127
|
+
* e.g. the write-back of a stored secret). `keys` are the bare field keys of the write, node keys included.
|
|
8128
|
+
*/
|
|
8129
|
+
async onScopedSettingsChanged(_scope, _cap, _keys) {}
|
|
8130
|
+
/** Typed handle over the CLUSTER settings `cap` declares (`clusterSettingsSchema`). */
|
|
8131
|
+
clusterSettings(cap, schema) {
|
|
8132
|
+
return this.scopedHandle("cluster", cap, schema);
|
|
8133
|
+
}
|
|
8134
|
+
/** Typed handle over the fleet defaults of the per-device settings `cap` declares. */
|
|
8135
|
+
deviceDefaults(cap, schema) {
|
|
8136
|
+
return this.scopedHandle("device-defaults", cap, schema);
|
|
8137
|
+
}
|
|
8138
|
+
/**
|
|
8139
|
+
* Typed handle over the settings `cap` owns PER NODE. `nodeId` omitted ⇒ the local node. A node
|
|
8140
|
+
* with no row yields the schema defaults — never a bare-key fallback.
|
|
8141
|
+
*/
|
|
8142
|
+
nodeSettings(cap, schema, nodeId) {
|
|
8143
|
+
return this.scopedHandle("node", cap, schema, nodeId);
|
|
8144
|
+
}
|
|
8145
|
+
/**
|
|
8146
|
+
* {@link state} for a value that is kept per node: stored under `<key>@<nodeId>`, and the
|
|
8147
|
+
* settings store carries `nodeId` in the row data (D986 §1), so a forgotten node's rows go in one
|
|
8148
|
+
* central delete. `nodeId` omitted ⇒ the local node.
|
|
8149
|
+
*/
|
|
8150
|
+
nodeState(key, schema, fallback, nodeId) {
|
|
8151
|
+
this._declaredStateKeys.add(key);
|
|
8152
|
+
return createDurableState({
|
|
8153
|
+
key: nodeScopedKey(key, nodeId ?? this._ctx?.kernel?.localNodeId ?? ""),
|
|
8154
|
+
schema,
|
|
8155
|
+
fallback,
|
|
8156
|
+
read: async () => this.resolveStoredSecrets(await this.readAddonStoreWithRetry()),
|
|
8157
|
+
write: async (patch) => {
|
|
8158
|
+
await this._ctx?.settings?.writeAddonStore(patch);
|
|
8159
|
+
},
|
|
8160
|
+
onParseError: (k, e) => this._ctx?.logger?.warn?.(`durable-state: stored "${k}" failed validation — using fallback`, { meta: {
|
|
8161
|
+
addonId: this._ctx?.id,
|
|
8162
|
+
key: k,
|
|
8163
|
+
error: String(e)
|
|
8164
|
+
} })
|
|
8165
|
+
});
|
|
8166
|
+
}
|
|
8167
|
+
/** The loaded schema `cap` declares for `scope`, or `null`. */
|
|
8168
|
+
async declaredScopedSchema(scope, cap) {
|
|
8169
|
+
await this.loadScopedSchemas(cap);
|
|
8170
|
+
return this.loadedScopedSchemas(cap).find((entry) => entry.scope === scope)?.schema ?? null;
|
|
8171
|
+
}
|
|
8172
|
+
async requireScopedSchema(scope, cap) {
|
|
8173
|
+
const schema = await this.declaredScopedSchema(scope, cap);
|
|
8174
|
+
if (schema === null) throw new Error(`${this.constructor.name}: cap "${cap}" declares no ${scope} settings`);
|
|
8175
|
+
return schema;
|
|
8176
|
+
}
|
|
8177
|
+
scopedKeys(schema) {
|
|
8178
|
+
return new Set(schema.sections.flatMap((section) => collectValueFieldKeys(section.fields)));
|
|
8179
|
+
}
|
|
8180
|
+
/** `store` narrowed to the keys `schema` declares. */
|
|
8181
|
+
narrowToScope(store, schema) {
|
|
8182
|
+
const keys = this.scopedKeys(schema);
|
|
8183
|
+
return Object.fromEntries(Object.entries(store).filter(([key]) => keys.has(key)));
|
|
8184
|
+
}
|
|
8185
|
+
scopedHandle(scope, cap, schema, nodeId) {
|
|
8186
|
+
return createScopedSettings({
|
|
8187
|
+
schema,
|
|
8188
|
+
read: async () => {
|
|
8189
|
+
const declared = await this.requireScopedSchema(scope, cap);
|
|
8190
|
+
const stored = this.narrowToScope(await this.resolveGlobalStore(nodeId, cap), declared);
|
|
8191
|
+
const effective = collectHydratedFieldValues(hydrateSchema(declared, stored));
|
|
8192
|
+
return {
|
|
8193
|
+
...Object.fromEntries([...effective].filter(([, value]) => value !== void 0)),
|
|
8194
|
+
...stored
|
|
8195
|
+
};
|
|
8196
|
+
},
|
|
8197
|
+
write: (patch) => this.writeScoped(scope, cap, patch, nodeId),
|
|
8198
|
+
unset: (keys) => this.unsetScoped(scope, cap, keys, nodeId)
|
|
8199
|
+
});
|
|
8200
|
+
}
|
|
8201
|
+
/** The one write path of the scoped API: declared keys only, then the global patch. */
|
|
8202
|
+
async writeScoped(scope, cap, patch, nodeId) {
|
|
8203
|
+
assertDeclaredKeys(Object.keys(patch), this.scopedKeys(await this.requireScopedSchema(scope, cap)));
|
|
8204
|
+
if (await this.applyGlobalPatch(patch, scope === "node" ? nodeId : void 0, cap)) await this.onScopedSettingsChanged(scope, cap, Object.keys(patch));
|
|
8205
|
+
}
|
|
8206
|
+
/**
|
|
8207
|
+
* Remove declared keys of one scope. A secret goes through {@link clearSecrets} — its keychain
|
|
8208
|
+
* value is released exactly as there — and the emptied row is then removed; every other key is
|
|
8209
|
+
* removed by an `undefined` patch (which a secret transform would read as "keep").
|
|
8210
|
+
*/
|
|
8211
|
+
async unsetScoped(scope, cap, keys, nodeId) {
|
|
8212
|
+
assertDeclaredKeys(keys, this.scopedKeys(await this.requireScopedSchema(scope, cap)));
|
|
8213
|
+
const target = scope === "node" ? nodeId : void 0;
|
|
8214
|
+
const tree = this.addonSecretTree();
|
|
8215
|
+
const secretKeys = keys.filter((key) => tree.has(key));
|
|
8216
|
+
const plainKeys = keys.filter((key) => !tree.has(key));
|
|
8217
|
+
let changed = false;
|
|
8218
|
+
if (plainKeys.length > 0) {
|
|
8219
|
+
const patch = Object.fromEntries(plainKeys.map((key) => [key, void 0]));
|
|
8220
|
+
changed = await this.applyGlobalPatch(patch, target, cap) || changed;
|
|
8221
|
+
}
|
|
8222
|
+
if (secretKeys.length > 0) {
|
|
8223
|
+
await this.clearSecretKeys(secretKeys, target, cap);
|
|
8224
|
+
const node = normalizeNodeId(target ?? this._ctx?.kernel?.localNodeId);
|
|
8225
|
+
const rows = secretKeys.map((key) => scope === "node" ? nodeScopedKey(key, node) : key);
|
|
8226
|
+
if (this._secretSettings !== null) await this._secretSettings.removeClearedKeys(rows);
|
|
8227
|
+
else await this._ctx?.settings?.writeAddonStore(Object.fromEntries(rows.map((row) => [row, void 0])));
|
|
8228
|
+
changed = true;
|
|
8229
|
+
}
|
|
8230
|
+
if (changed) await this.onScopedSettingsChanged(scope, cap, [...keys]);
|
|
8231
|
+
}
|
|
8232
|
+
/**
|
|
8233
|
+
* The hydrated form of one scope of one capability's settings (any
|
|
8234
|
+
* {@link scopedSettingsOverlay} applied), or `null` when the capability declares nothing there.
|
|
8235
|
+
*/
|
|
8236
|
+
async getScopedSettings(scope, cap, nodeId) {
|
|
8237
|
+
const schema = await this.declaredScopedSchema(scope, cap);
|
|
8238
|
+
if (schema === null) return null;
|
|
8239
|
+
const stored = this.narrowToScope(await this.readRawProjectedStore(nodeId, cap), schema);
|
|
8240
|
+
const overlay = await this.scopedSettingsOverlay(scope, cap, nodeId);
|
|
8241
|
+
return hydrateSchema(schema, overlay ? await this.overlayKeepingMarkers(stored, overlay) : stored, { inlineSecretsAsViews: true });
|
|
8242
|
+
}
|
|
8243
|
+
/** The OPERATOR's write of declared keys of one scope (D787 secret semantics). */
|
|
8244
|
+
async updateScopedSettings(scope, cap, patch, nodeId) {
|
|
8245
|
+
this._operatorWriteDepth++;
|
|
8246
|
+
try {
|
|
8247
|
+
await this.writeScoped(scope, cap, patch, nodeId);
|
|
8248
|
+
} finally {
|
|
8249
|
+
this._operatorWriteDepth--;
|
|
8250
|
+
}
|
|
8251
|
+
}
|
|
8252
|
+
/**
|
|
8253
|
+
* The effective values (`stored ?? default`) of one scope, a secret as its `set` view — never
|
|
8254
|
+
* its value. `null` when the capability declares nothing for the scope.
|
|
8255
|
+
*/
|
|
8256
|
+
async readScopedValues(scope, cap, nodeId) {
|
|
8257
|
+
const schema = await this.declaredScopedSchema(scope, cap);
|
|
8258
|
+
if (schema === null) return null;
|
|
8259
|
+
const form = hydrateSchema(schema, this.narrowToScope(await this.readRawProjectedStore(nodeId, cap), schema), { inlineSecretsAsViews: true });
|
|
8260
|
+
return Object.fromEntries([...collectHydratedFieldValues(form)].filter(([, value]) => value !== void 0));
|
|
8261
|
+
}
|
|
8262
|
+
/**
|
|
8024
8263
|
* What the create wizard and the integration edit page render for one instance: the addon's
|
|
8025
8264
|
* per-instance schema when it declares one, else its global schema (what they always showed).
|
|
8026
8265
|
*/
|
|
@@ -8172,6 +8411,9 @@ var BaseAddon = class {
|
|
|
8172
8411
|
* a keychain (an older kernel) it writes `''`, as such code always did.
|
|
8173
8412
|
*/
|
|
8174
8413
|
async clearSecrets(keys, nodeId) {
|
|
8414
|
+
await this.clearSecretKeys(keys, nodeId);
|
|
8415
|
+
}
|
|
8416
|
+
async clearSecretKeys(keys, nodeId, cap) {
|
|
8175
8417
|
const tree = this.addonSecretTree();
|
|
8176
8418
|
const keychain = this._ctx?.secrets !== void 0;
|
|
8177
8419
|
const stored = keychain ? await this.readAddonStoreWithRetry() : {};
|
|
@@ -8184,25 +8426,27 @@ var BaseAddon = class {
|
|
|
8184
8426
|
const keychainStored = tree.has(key) || collectSecretMarkerRefs(stored[key]).length > 0;
|
|
8185
8427
|
patch[key] = keychain && keychainStored ? SECRET_CLEAR : "";
|
|
8186
8428
|
}
|
|
8187
|
-
await this.applyGlobalPatch(patch, nodeId);
|
|
8429
|
+
await this.applyGlobalPatch(patch, nodeId, cap);
|
|
8188
8430
|
}
|
|
8189
|
-
|
|
8190
|
-
|
|
8191
|
-
|
|
8431
|
+
/** Resolves `true` when the write changed stored values. */
|
|
8432
|
+
async applyGlobalPatch(barePatch, nodeId, cap) {
|
|
8433
|
+
await this.loadScopedSchemas(cap);
|
|
8434
|
+
const keys = this.perNodeKeys(cap);
|
|
8192
8435
|
const localNode = normalizeNodeId(this._ctx?.kernel?.localNodeId);
|
|
8193
8436
|
const target = normalizeNodeId(nodeId ?? this._ctx?.kernel?.localNodeId);
|
|
8194
8437
|
const scoped = keys.size > 0 ? scopePatch(barePatch, keys, target) : barePatch;
|
|
8195
8438
|
const handle = this._secretSettings;
|
|
8196
8439
|
if (handle !== null) {
|
|
8197
8440
|
const { changed } = await handle.writeAddonStore(scoped);
|
|
8198
|
-
if (!changed) return;
|
|
8441
|
+
if (!changed) return false;
|
|
8199
8442
|
} else await this._ctx?.settings?.writeAddonStore(scoped);
|
|
8200
|
-
if (target !== localNode) return;
|
|
8443
|
+
if (target !== localNode) return true;
|
|
8201
8444
|
await this.resolveConfig();
|
|
8202
8445
|
await this.onConfigChanged();
|
|
8203
8446
|
this.emitLifecycle(EventCategory.AddonUpdated, { level: "global" });
|
|
8204
8447
|
const legacy = this.globalSettingsSchema();
|
|
8205
8448
|
this.maybeAutoRestart(Object.keys(barePatch), [...legacy === null ? [] : [legacy], ...this.loadedScopedSchemas().map((entry) => entry.schema)]);
|
|
8449
|
+
return true;
|
|
8206
8450
|
}
|
|
8207
8451
|
/**
|
|
8208
8452
|
* The set of field keys the global settings schema declares `perNode: true`
|
|
@@ -9760,7 +10004,6 @@ var CAP_NAMES = Object.freeze([
|
|
|
9760
10004
|
"notifier",
|
|
9761
10005
|
"numeric-sensor",
|
|
9762
10006
|
"oauth-integration",
|
|
9763
|
-
"oidc-connections",
|
|
9764
10007
|
"osd",
|
|
9765
10008
|
"osd-manager",
|
|
9766
10009
|
"pet-feeder",
|
|
@@ -11652,8 +11895,7 @@ Object.freeze({
|
|
|
11652
11895
|
"device-provider": { "reloadDevice": 18e4 },
|
|
11653
11896
|
"llm": {
|
|
11654
11897
|
"generate": 6e5,
|
|
11655
|
-
"generateVision": 6e5
|
|
11656
|
-
"testProfile": 6e5
|
|
11898
|
+
"generateVision": 6e5
|
|
11657
11899
|
},
|
|
11658
11900
|
"llm-runtime": {
|
|
11659
11901
|
"complete": 6e5,
|
|
@@ -13056,17 +13298,18 @@ var IntegrationInstanceRefSchema = object({
|
|
|
13056
13298
|
* message to what the kind supports — callers never special-case a service.
|
|
13057
13299
|
*
|
|
13058
13300
|
* DESIGN DECISIONS (locked):
|
|
13059
|
-
* -
|
|
13060
|
-
*
|
|
13061
|
-
*
|
|
13062
|
-
*
|
|
13063
|
-
*
|
|
13064
|
-
*
|
|
13065
|
-
*
|
|
13066
|
-
*
|
|
13067
|
-
*
|
|
13068
|
-
* routable. `send` / `testTarget` /
|
|
13069
|
-
* `
|
|
13301
|
+
* - A target is an INSTANCE of this function cap (epic #440, step 6): the
|
|
13302
|
+
* providers serve their targets as `integration-instances` records, one
|
|
13303
|
+
* record kind per target kind, and the admin lists, adds, edits, switches
|
|
13304
|
+
* and deletes them through that cap. This cap keeps what an instance cannot
|
|
13305
|
+
* say: the kind catalogue (`listTargetKinds`: capabilities, delivery
|
|
13306
|
+
* parameters, brand icon), dispatch (`send`, `testTarget`) and the form
|
|
13307
|
+
* helpers (`discoverTargets`, `probeTargetConfig`).
|
|
13308
|
+
* - `listTargetKinds` / `discoverTargets` return arrays → the generated
|
|
13309
|
+
* cap-mount auto-`concatCollection`-fans them across every registered
|
|
13310
|
+
* provider so one catalog is routable. `send` / `testTarget` /
|
|
13311
|
+
* `probeTargetConfig` route to ONE provider by the `addonId` the generated
|
|
13312
|
+
* collection router extracts from the call input.
|
|
13070
13313
|
* - `Attachment.bytes` is `Uint8Array`. Transport-safe: superjson (the tRPC
|
|
13071
13314
|
* transformer) + UDS MsgPack both round-trip typed arrays — already used by
|
|
13072
13315
|
* `storage` / `storage-provider` / `recording` caps over the same path. No
|
|
@@ -13311,7 +13554,7 @@ var TargetKindCapsSchema = object({
|
|
|
13311
13554
|
* the union is large and not meant for runtime validation here; the exported
|
|
13312
13555
|
* `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
|
|
13313
13556
|
*/
|
|
13314
|
-
var ConfigSchemaPassthrough$
|
|
13557
|
+
var ConfigSchemaPassthrough$3 = unknown();
|
|
13315
13558
|
var TargetKindSchema = object({
|
|
13316
13559
|
kind: string(),
|
|
13317
13560
|
label: string(),
|
|
@@ -13348,7 +13591,7 @@ var TargetKindSchema = object({
|
|
|
13348
13591
|
* its raster path, which is the safe default for an unknown image.
|
|
13349
13592
|
*/
|
|
13350
13593
|
iconMediaType: string().optional(),
|
|
13351
|
-
configSchema: ConfigSchemaPassthrough$
|
|
13594
|
+
configSchema: ConfigSchemaPassthrough$3,
|
|
13352
13595
|
/**
|
|
13353
13596
|
* The config keys that decide WHERE this kind's secrets are sent (server,
|
|
13354
13597
|
* base URL, instance, chat, recipient). A save that changes any of them
|
|
@@ -13370,9 +13613,11 @@ var TargetKindSchema = object({
|
|
|
13370
13613
|
caps: TargetKindCapsSchema
|
|
13371
13614
|
});
|
|
13372
13615
|
/**
|
|
13373
|
-
* A
|
|
13374
|
-
*
|
|
13375
|
-
*
|
|
13616
|
+
* A target as a provider's own code sees it (the notification-center bridge, the
|
|
13617
|
+
* send path): the flat record body split into the name, the switch and the
|
|
13618
|
+
* kind's fields. `config` holds secrets; a reader that serves it to a client
|
|
13619
|
+
* REDACTS secret fields (a presence marker only) — never round-trip a stored
|
|
13620
|
+
* secret to the UI.
|
|
13376
13621
|
*/
|
|
13377
13622
|
var TargetSchema = object({
|
|
13378
13623
|
id: string(),
|
|
@@ -13415,13 +13660,13 @@ var ProbeTargetConfigResultSchema = object({
|
|
|
13415
13660
|
stateInstance: string().optional(),
|
|
13416
13661
|
error: string().optional()
|
|
13417
13662
|
});
|
|
13418
|
-
method(object({}), array(TargetKindSchema)), method(object({
|
|
13663
|
+
method(object({}), array(TargetKindSchema)), method(object({
|
|
13419
13664
|
kind: string(),
|
|
13420
13665
|
config: record(string(), unknown()).optional(),
|
|
13421
13666
|
/**
|
|
13422
13667
|
* When editing / duplicating, the blank password field never round-trips
|
|
13423
13668
|
* the stored token. Pass the source target id so the provider can restore
|
|
13424
|
-
* secrets server-side before dialling
|
|
13669
|
+
* secrets server-side before dialling.
|
|
13425
13670
|
*/
|
|
13426
13671
|
targetId: string().optional()
|
|
13427
13672
|
}), array(DiscoveredTargetSchema), { auth: "admin" }), method(object({
|
|
@@ -13444,27 +13689,6 @@ method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSche
|
|
|
13444
13689
|
}), TestResultSchema, {
|
|
13445
13690
|
kind: "mutation",
|
|
13446
13691
|
auth: "admin"
|
|
13447
|
-
}), method(object({
|
|
13448
|
-
target: TargetSchema,
|
|
13449
|
-
/**
|
|
13450
|
-
* Duplicate flow: create a NEW target id while copying secrets from an
|
|
13451
|
-
* existing row. The UI never holds the stored token; blank / redacted
|
|
13452
|
-
* password fields are restored from this source (D634 still applies if
|
|
13453
|
-
* destinations diverge without a re-typed secret).
|
|
13454
|
-
*/
|
|
13455
|
-
cloneSecretsFrom: string().optional()
|
|
13456
|
-
}), TargetSchema, {
|
|
13457
|
-
kind: "mutation",
|
|
13458
|
-
auth: "admin"
|
|
13459
|
-
}), method(object({ targetId: string() }), _void(), {
|
|
13460
|
-
kind: "mutation",
|
|
13461
|
-
auth: "admin"
|
|
13462
|
-
}), method(object({
|
|
13463
|
-
targetId: string(),
|
|
13464
|
-
enabled: boolean()
|
|
13465
|
-
}), _void(), {
|
|
13466
|
-
kind: "mutation",
|
|
13467
|
-
auth: "admin"
|
|
13468
13692
|
});
|
|
13469
13693
|
looseObject({
|
|
13470
13694
|
name: string().min(1),
|
|
@@ -21722,7 +21946,6 @@ var SYSTEM_CAP_VOCABULARY = {
|
|
|
21722
21946
|
"notification-output": system("notification delivery — reached through notifier devices and rules"),
|
|
21723
21947
|
"notification-rules": system("notification rules — authored on their own page"),
|
|
21724
21948
|
"oauth-integration": system(IDENTITY),
|
|
21725
|
-
"oidc-connections": system(IDENTITY),
|
|
21726
21949
|
"osd-manager": system(PIPELINE),
|
|
21727
21950
|
"pipeline-executor": system(PIPELINE),
|
|
21728
21951
|
"pipeline-orchestrator": system(PIPELINE),
|
|
@@ -43864,6 +44087,8 @@ var SettingsSchemaWithValuesSchema = object({
|
|
|
43864
44087
|
});
|
|
43865
44088
|
/** Patch object — keys are field names, values are the new field values. */
|
|
43866
44089
|
var SettingsPatchSchema = record(string(), unknown());
|
|
44090
|
+
/** The scope of a scoped-settings call (D986): where the capability declared the values. */
|
|
44091
|
+
var ScopedSettingsScopeSchema = _enum(SCOPED_SETTINGS_SCOPES);
|
|
43867
44092
|
/** Standard success response for update operations. */
|
|
43868
44093
|
var SettingsUpdateResultSchema = object({ success: literal(true) });
|
|
43869
44094
|
method(object({
|
|
@@ -43879,6 +44104,25 @@ method(object({
|
|
|
43879
44104
|
kind: "mutation",
|
|
43880
44105
|
auth: "admin"
|
|
43881
44106
|
}), method(object({
|
|
44107
|
+
addonId: string(),
|
|
44108
|
+
cap: string(),
|
|
44109
|
+
scope: ScopedSettingsScopeSchema,
|
|
44110
|
+
nodeId: string().optional()
|
|
44111
|
+
}), SettingsSchemaWithValuesSchema.nullable()), method(object({
|
|
44112
|
+
addonId: string(),
|
|
44113
|
+
cap: string(),
|
|
44114
|
+
scope: ScopedSettingsScopeSchema,
|
|
44115
|
+
nodeId: string().optional(),
|
|
44116
|
+
patch: SettingsPatchSchema
|
|
44117
|
+
}), SettingsUpdateResultSchema, {
|
|
44118
|
+
kind: "mutation",
|
|
44119
|
+
auth: "admin"
|
|
44120
|
+
}), method(object({
|
|
44121
|
+
addonId: string(),
|
|
44122
|
+
cap: string(),
|
|
44123
|
+
scope: ScopedSettingsScopeSchema,
|
|
44124
|
+
nodeId: string().optional()
|
|
44125
|
+
}), record(string(), unknown()).nullable()), method(object({
|
|
43882
44126
|
addonId: string(),
|
|
43883
44127
|
nodeId: string().optional()
|
|
43884
44128
|
}), SettingsSchemaWithValuesSchema.nullable()), method(object({
|
|
@@ -53400,7 +53644,7 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
|
|
|
53400
53644
|
* or the redaction token KEEPS the stored secret; `{ $secretClear: true }`
|
|
53401
53645
|
* clears it.
|
|
53402
53646
|
*/
|
|
53403
|
-
var ConfigSchemaPassthrough$
|
|
53647
|
+
var ConfigSchemaPassthrough$2 = custom();
|
|
53404
53648
|
var IntegrationInstanceIdSchema = string().min(1);
|
|
53405
53649
|
var IntegrationInstanceModeSchema = _enum(["single", "multiple"]);
|
|
53406
53650
|
/**
|
|
@@ -53446,7 +53690,16 @@ var IntegrationInstanceKindSchema = object({
|
|
|
53446
53690
|
/** Relative hub path to start an interactive account link of an instance of this kind. */
|
|
53447
53691
|
connectPath: string().min(1).optional(),
|
|
53448
53692
|
/** Relative hub path to disconnect that account. */
|
|
53449
|
-
disconnectPath: string().min(1).optional()
|
|
53693
|
+
disconnectPath: string().min(1).optional(),
|
|
53694
|
+
/**
|
|
53695
|
+
* Parts of the edit dialog the flat form cannot draw (a node picker, a model source), named by a
|
|
53696
|
+
* GENERIC widget id the client maps to a component; a client that knows none of them shows none.
|
|
53697
|
+
* `connection` widgets write connection values, `model` widgets own the model choice.
|
|
53698
|
+
*/
|
|
53699
|
+
widgets: array(object({
|
|
53700
|
+
id: string().min(1),
|
|
53701
|
+
placement: _enum(["connection", "model"])
|
|
53702
|
+
})).optional()
|
|
53450
53703
|
});
|
|
53451
53704
|
/**
|
|
53452
53705
|
* How devices of an instance are found. `none`: the operator adds them by hand; `lan`: the addon
|
|
@@ -53544,7 +53797,7 @@ method(_void(), IntegrationInstanceDescriptionSchema, { auth: "admin" }), method
|
|
|
53544
53797
|
id: IntegrationInstanceIdSchema.nullable(),
|
|
53545
53798
|
/** The kind of the create form (`id: null`) of a provider with several. */
|
|
53546
53799
|
kind: string().min(1).optional()
|
|
53547
|
-
}), ConfigSchemaPassthrough$
|
|
53800
|
+
}), ConfigSchemaPassthrough$2, { auth: "admin" }), method(_void(), array(IntegrationInstanceSchema).readonly(), { auth: "admin" }), method(object({ id: IntegrationInstanceIdSchema }), IntegrationInstanceSchema.nullable(), { auth: "admin" }), method(object({
|
|
53548
53801
|
id: IntegrationInstanceIdSchema.optional(),
|
|
53549
53802
|
name: string().min(1),
|
|
53550
53803
|
kind: string().min(1).optional(),
|
|
@@ -54476,12 +54729,12 @@ var LlmModelInfoSchema = object({
|
|
|
54476
54729
|
});
|
|
54477
54730
|
/**
|
|
54478
54731
|
* The provider-specific part of a profile, validated by the provider that owns
|
|
54479
|
-
* the kind (
|
|
54732
|
+
* the kind (saving an instance refuses what it does not accept). A field its
|
|
54480
54733
|
* `connectionSchema` declares `type: 'password'` is a secret: it is held in the
|
|
54481
54734
|
* keychain, never in the row, and reads back as the redaction marker.
|
|
54482
54735
|
*/
|
|
54483
54736
|
var LlmProviderConfigSchema = record(string(), unknown());
|
|
54484
|
-
|
|
54737
|
+
object({
|
|
54485
54738
|
id: string(),
|
|
54486
54739
|
name: string(),
|
|
54487
54740
|
/** The provider-declared kind (`LlmProfileKindDescriptor.kind`). */
|
|
@@ -54575,8 +54828,8 @@ var LlmProviderWidgetSchema = object({
|
|
|
54575
54828
|
/** ConfigUISchema tree passed through untyped on the wire (the
|
|
54576
54829
|
* notification-output `ConfigSchemaPassthrough` precedent at
|
|
54577
54830
|
* notification-output.cap.ts:151); the exported TS type re-tightens it. */
|
|
54578
|
-
var ConfigSchemaPassthrough$
|
|
54579
|
-
|
|
54831
|
+
var ConfigSchemaPassthrough$1 = unknown();
|
|
54832
|
+
object({
|
|
54580
54833
|
kind: LlmProfileKindSchema,
|
|
54581
54834
|
label: string(),
|
|
54582
54835
|
/** A generic icon name (`cloud`, `plug`, `cpu`) — never a glyph or a logo. */
|
|
@@ -54584,9 +54837,9 @@ var LlmProfileKindDescriptorSchema = object({
|
|
|
54584
54837
|
/** Stamped by each provider so the concat-fanned catalog stays routable. */
|
|
54585
54838
|
addonId: string(),
|
|
54586
54839
|
/** The provider's own fields (`providerConfig`); `password` fields are keychain-held. */
|
|
54587
|
-
connectionSchema: ConfigSchemaPassthrough$
|
|
54840
|
+
connectionSchema: ConfigSchemaPassthrough$1,
|
|
54588
54841
|
/** Provider fields that belong under "Advanced" (extra headers, runtime tuning). */
|
|
54589
|
-
advancedSchema: ConfigSchemaPassthrough$
|
|
54842
|
+
advancedSchema: ConfigSchemaPassthrough$1.optional(),
|
|
54590
54843
|
/** The kind's defaults; a model from `listModels` may override any of them. */
|
|
54591
54844
|
features: LlmModelFeaturesSchema,
|
|
54592
54845
|
/** `false` = the provider stamps `supportsVision` itself (from what a node reports). */
|
|
@@ -54715,20 +54968,7 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
|
54715
54968
|
}), method(object({
|
|
54716
54969
|
addonId: string().optional(),
|
|
54717
54970
|
requestId: string()
|
|
54718
|
-
}), _void(), { kind: "mutation" }), method(
|
|
54719
|
-
kind: "mutation",
|
|
54720
|
-
auth: "admin"
|
|
54721
|
-
}), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
|
|
54722
|
-
kind: "mutation",
|
|
54723
|
-
auth: "admin"
|
|
54724
|
-
}), method(ProfileRefInputSchema, _void(), {
|
|
54725
|
-
kind: "mutation",
|
|
54726
|
-
auth: "admin"
|
|
54727
|
-
}), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
|
|
54728
|
-
kind: "mutation",
|
|
54729
|
-
auth: "admin",
|
|
54730
|
-
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
54731
|
-
}), method(LlmListModelsInputSchema, LlmListModelsResultSchema, {
|
|
54971
|
+
}), _void(), { kind: "mutation" }), method(LlmListModelsInputSchema, LlmListModelsResultSchema, {
|
|
54732
54972
|
kind: "mutation",
|
|
54733
54973
|
auth: "admin"
|
|
54734
54974
|
}), method(object({}), array(LlmDefaultSchema)), method(object({
|
|
@@ -55723,20 +55963,7 @@ method(_void(), MeshStatusSchema), method(object({
|
|
|
55723
55963
|
/** Optional hostname override the host should advertise once joined. */
|
|
55724
55964
|
hostname: string().optional() }), object({
|
|
55725
55965
|
/** Authentication URL the operator should open in a browser. */
|
|
55726
|
-
loginUrl: string() }), { kind: "mutation" }), method(_void(), object({ left: literal(true) }), { kind: "mutation" }), method(_void(), object({ loggedOut: literal(true) }), { kind: "mutation" }), method(_void(), object({ peers: array(MeshPeerSchema).readonly() }))
|
|
55727
|
-
/** Optional auth key — when provided, probes the key validity
|
|
55728
|
-
* against the provider's API. Omit when already joined to
|
|
55729
|
-
* just ping the daemon. */
|
|
55730
|
-
authKey: string().optional() }), object({
|
|
55731
|
-
ok: boolean(),
|
|
55732
|
-
/** Provider-side identifier resolved by the probe (tailnet
|
|
55733
|
-
* name for Tailscale, network id for ZeroTier, etc.). */
|
|
55734
|
-
tenant: string().optional(),
|
|
55735
|
-
/** Daemon binary version, when reachable. */
|
|
55736
|
-
daemonVersion: string().optional(),
|
|
55737
|
-
/** Human-readable error when `ok: false`. */
|
|
55738
|
-
error: string().optional()
|
|
55739
|
-
}), { kind: "mutation" });
|
|
55966
|
+
loginUrl: string() }), { kind: "mutation" }), method(_void(), object({ left: literal(true) }), { kind: "mutation" }), method(_void(), object({ loggedOut: literal(true) }), { kind: "mutation" }), method(_void(), object({ peers: array(MeshPeerSchema).readonly() }));
|
|
55740
55967
|
object({
|
|
55741
55968
|
value: number().nullable().meta(readingMeta("device", { label: "Total" })),
|
|
55742
55969
|
lastFetchedAt: number()
|
|
@@ -65394,61 +65621,6 @@ var OauthIntegrationDescriptorSchema = object({
|
|
|
65394
65621
|
});
|
|
65395
65622
|
method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" });
|
|
65396
65623
|
/**
|
|
65397
|
-
* `oidc-connections` — CRUD for IdP rows under `auth-oidc` (D828 sibling).
|
|
65398
|
-
*
|
|
65399
|
-
* One hub-only singleton (`auth-oidc`). The Settings UI is a DataTable +
|
|
65400
|
-
* ItemFormDialog; there is no `editable-array` in `globalSettingsSchema`.
|
|
65401
|
-
* Operator-chosen `id` is the URL slug (`/addon/auth-oidc/<id>/…`) and is
|
|
65402
|
-
* immutable after create.
|
|
65403
|
-
*/
|
|
65404
|
-
var ConfigSchemaPassthrough$1 = unknown();
|
|
65405
|
-
var OidcConnectionSchema = object({
|
|
65406
|
-
id: string().min(1),
|
|
65407
|
-
displayName: string(),
|
|
65408
|
-
icon: string(),
|
|
65409
|
-
issuerUrl: string(),
|
|
65410
|
-
clientId: string(),
|
|
65411
|
-
/** Client id + secret present — never the secret value. */
|
|
65412
|
-
configured: boolean(),
|
|
65413
|
-
/**
|
|
65414
|
-
* Values for the connection form schema. `clientSecret` is a keychain
|
|
65415
|
-
* {@link SecretFieldView} or `null` / `''`, never plaintext (D789).
|
|
65416
|
-
*/
|
|
65417
|
-
formValues: record(string(), unknown()).optional()
|
|
65418
|
-
});
|
|
65419
|
-
/**
|
|
65420
|
-
* Patch one connection. Omitted or empty `clientSecret` keeps the stored
|
|
65421
|
-
* secret (D787). `{ $secretClear: true }` clears it. `id` is never renamed.
|
|
65422
|
-
*/
|
|
65423
|
-
var OidcConnectionUpdateInputSchema = object({
|
|
65424
|
-
id: string().min(1),
|
|
65425
|
-
displayName: string().min(1),
|
|
65426
|
-
icon: string().optional(),
|
|
65427
|
-
issuerUrl: string().optional(),
|
|
65428
|
-
clientId: string().optional(),
|
|
65429
|
-
clientSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
|
|
65430
|
-
redirectUri: string().optional(),
|
|
65431
|
-
scopes: string().optional(),
|
|
65432
|
-
usernameClaim: _enum([
|
|
65433
|
-
"preferred_username",
|
|
65434
|
-
"email",
|
|
65435
|
-
"sub"
|
|
65436
|
-
]).optional()
|
|
65437
|
-
});
|
|
65438
|
-
method(object({}), ConfigSchemaPassthrough$1, { auth: "admin" }), method(object({}), array(OidcConnectionSchema).readonly(), { auth: "admin" }), method(object({
|
|
65439
|
-
id: string().min(1).regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "id must be a lowercase slug"),
|
|
65440
|
-
displayName: string().min(1)
|
|
65441
|
-
}), object({ id: string() }), {
|
|
65442
|
-
kind: "mutation",
|
|
65443
|
-
auth: "admin"
|
|
65444
|
-
}), method(OidcConnectionUpdateInputSchema, object({ ok: literal(true) }), {
|
|
65445
|
-
kind: "mutation",
|
|
65446
|
-
auth: "admin"
|
|
65447
|
-
}), method(object({ id: string().min(1) }), object({ ok: literal(true) }), {
|
|
65448
|
-
kind: "mutation",
|
|
65449
|
-
auth: "admin"
|
|
65450
|
-
});
|
|
65451
|
-
/**
|
|
65452
65624
|
* Generic on-screen-display (video overlay) cap. Each camera exposes
|
|
65453
65625
|
* a firmware-defined list of overlays (channel name, timestamp,
|
|
65454
65626
|
* watermark, logo, …); the cap models them as a homogeneous array of
|
|
@@ -71621,21 +71793,6 @@ method(object({
|
|
|
71621
71793
|
*/
|
|
71622
71794
|
ttlSec: union([number().int().positive(), literal("never")]).optional()
|
|
71623
71795
|
}), object({ token: string() }), { auth: "admin" }), method(object({ token: string() }), SsoBridgeClaimsSchema.nullable(), { auth: "admin" });
|
|
71624
|
-
var ProviderListEntrySchema = discriminatedUnion("shouldSaveDiskSpace", [object({
|
|
71625
|
-
providerId: string().min(1),
|
|
71626
|
-
displayName: string().min(1),
|
|
71627
|
-
configSchema: unknown(),
|
|
71628
|
-
nodeLocal: boolean(),
|
|
71629
|
-
shouldSaveDiskSpace: literal(true),
|
|
71630
|
-
minFreePercent: number().min(0).max(100)
|
|
71631
|
-
}), object({
|
|
71632
|
-
providerId: string().min(1),
|
|
71633
|
-
displayName: string().min(1),
|
|
71634
|
-
configSchema: unknown(),
|
|
71635
|
-
nodeLocal: boolean(),
|
|
71636
|
-
shouldSaveDiskSpace: literal(false),
|
|
71637
|
-
minFreePercent: literal(null)
|
|
71638
|
-
})]);
|
|
71639
71796
|
method(object({
|
|
71640
71797
|
location: StorageLocationRefSchema,
|
|
71641
71798
|
relativePath: string()
|
|
@@ -71697,42 +71854,7 @@ method(object({
|
|
|
71697
71854
|
}), _instanceof(Uint8Array), { auth: "admin" }), method(object({ downloadId: string() }), _void(), {
|
|
71698
71855
|
kind: "mutation",
|
|
71699
71856
|
auth: "admin"
|
|
71700
|
-
}), method(object({ type: StorageLocationTypeSchema.optional() }), array(StorageLocationSchema).readonly()), method(_void(), array(StorageLocationDeclarationSchema).readonly()), method(
|
|
71701
|
-
createdAt: true,
|
|
71702
|
-
updatedAt: true
|
|
71703
|
-
}), StorageLocationSchema, {
|
|
71704
|
-
kind: "mutation",
|
|
71705
|
-
auth: "admin"
|
|
71706
|
-
}), method(object({
|
|
71707
|
-
id: string(),
|
|
71708
|
-
force: boolean().optional()
|
|
71709
|
-
}), _void(), {
|
|
71710
|
-
kind: "mutation",
|
|
71711
|
-
auth: "admin"
|
|
71712
|
-
}), method(_void(), array(StorageDrainProgressSchema).readonly()), method(object({ id: string() }), object({
|
|
71713
|
-
ok: boolean(),
|
|
71714
|
-
error: string().optional()
|
|
71715
|
-
}), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
|
|
71716
|
-
providerId: string(),
|
|
71717
|
-
/**
|
|
71718
|
-
* The location this config is an UNSAVED edit of, when there is one.
|
|
71719
|
-
*
|
|
71720
|
-
* `listLocations` replaces every declared secret with the redaction
|
|
71721
|
-
* sentinel, so the edit modal's form state holds the sentinel for any
|
|
71722
|
-
* credential the operator did not retype — and posting that here
|
|
71723
|
-
* without a way to resolve it makes the provider try to authenticate
|
|
71724
|
-
* as `__camstack_redacted__` and report the operator's own working
|
|
71725
|
-
* password as wrong. Given this id, the orchestrator restores each
|
|
71726
|
-
* sentinel from the stored config (same rule as `upsertLocation`)
|
|
71727
|
-
* before dispatching. Omitted by the "Add location" wizard, where
|
|
71728
|
-
* every value was typed just now and nothing is stored yet.
|
|
71729
|
-
*/
|
|
71730
|
-
locationId: string().optional(),
|
|
71731
|
-
config: record(string(), unknown())
|
|
71732
|
-
}), object({
|
|
71733
|
-
ok: boolean(),
|
|
71734
|
-
error: string().optional()
|
|
71735
|
-
}), { auth: "admin" });
|
|
71857
|
+
}), method(object({ type: StorageLocationTypeSchema.optional() }), array(StorageLocationSchema).readonly()), method(_void(), array(StorageLocationDeclarationSchema).readonly()), method(_void(), array(StorageDrainProgressSchema).readonly());
|
|
71736
71858
|
/** One table of the settings database. */
|
|
71737
71859
|
var StorageTableSchema = object({
|
|
71738
71860
|
/** The table's full name, e.g. `recorder:addon-settings` or `addon-device-settings`. */
|
|
@@ -75853,6 +75975,20 @@ Object.freeze({
|
|
|
75853
75975
|
access: "view",
|
|
75854
75976
|
role: "admin"
|
|
75855
75977
|
},
|
|
75978
|
+
"addonSettings.getScopedSettings": {
|
|
75979
|
+
capName: "addon-settings",
|
|
75980
|
+
capScope: "system",
|
|
75981
|
+
addonId: null,
|
|
75982
|
+
access: "view",
|
|
75983
|
+
role: "admin"
|
|
75984
|
+
},
|
|
75985
|
+
"addonSettings.readScopedValues": {
|
|
75986
|
+
capName: "addon-settings",
|
|
75987
|
+
capScope: "system",
|
|
75988
|
+
addonId: null,
|
|
75989
|
+
access: "view",
|
|
75990
|
+
role: "admin"
|
|
75991
|
+
},
|
|
75856
75992
|
"addonSettings.unsetStoredSettingsKeys": {
|
|
75857
75993
|
capName: "addon-settings",
|
|
75858
75994
|
capScope: "system",
|
|
@@ -75874,6 +76010,13 @@ Object.freeze({
|
|
|
75874
76010
|
access: "create",
|
|
75875
76011
|
role: "admin"
|
|
75876
76012
|
},
|
|
76013
|
+
"addonSettings.updateScopedSettings": {
|
|
76014
|
+
capName: "addon-settings",
|
|
76015
|
+
capScope: "system",
|
|
76016
|
+
addonId: null,
|
|
76017
|
+
access: "create",
|
|
76018
|
+
role: "admin"
|
|
76019
|
+
},
|
|
75877
76020
|
"addonWidgets.listWidgets": {
|
|
75878
76021
|
capName: "addon-widgets",
|
|
75879
76022
|
capScope: "system",
|
|
@@ -79325,13 +79468,6 @@ Object.freeze({
|
|
|
79325
79468
|
access: "delete",
|
|
79326
79469
|
role: "admin"
|
|
79327
79470
|
},
|
|
79328
|
-
"llm.deleteProfile": {
|
|
79329
|
-
capName: "llm",
|
|
79330
|
-
capScope: "system",
|
|
79331
|
-
addonId: null,
|
|
79332
|
-
access: "delete",
|
|
79333
|
-
role: "admin"
|
|
79334
|
-
},
|
|
79335
79471
|
"llm.generate": {
|
|
79336
79472
|
capName: "llm",
|
|
79337
79473
|
capScope: "system",
|
|
@@ -79395,20 +79531,6 @@ Object.freeze({
|
|
|
79395
79531
|
access: "view",
|
|
79396
79532
|
role: "admin"
|
|
79397
79533
|
},
|
|
79398
|
-
"llm.listProfileKinds": {
|
|
79399
|
-
capName: "llm",
|
|
79400
|
-
capScope: "system",
|
|
79401
|
-
addonId: null,
|
|
79402
|
-
access: "view",
|
|
79403
|
-
role: "admin"
|
|
79404
|
-
},
|
|
79405
|
-
"llm.listProfiles": {
|
|
79406
|
-
capName: "llm",
|
|
79407
|
-
capScope: "system",
|
|
79408
|
-
addonId: null,
|
|
79409
|
-
access: "view",
|
|
79410
|
-
role: "admin"
|
|
79411
|
-
},
|
|
79412
79534
|
"llm.listRuntimeNodes": {
|
|
79413
79535
|
capName: "llm",
|
|
79414
79536
|
capScope: "system",
|
|
@@ -79416,13 +79538,6 @@ Object.freeze({
|
|
|
79416
79538
|
access: "view",
|
|
79417
79539
|
role: "admin"
|
|
79418
79540
|
},
|
|
79419
|
-
"llm.migrateRawSecrets": {
|
|
79420
|
-
capName: "llm",
|
|
79421
|
-
capScope: "system",
|
|
79422
|
-
addonId: null,
|
|
79423
|
-
access: "create",
|
|
79424
|
-
role: "admin"
|
|
79425
|
-
},
|
|
79426
79541
|
"llm.resolveModelRef": {
|
|
79427
79542
|
capName: "llm",
|
|
79428
79543
|
capScope: "system",
|
|
@@ -79451,20 +79566,6 @@ Object.freeze({
|
|
|
79451
79566
|
access: "create",
|
|
79452
79567
|
role: "admin"
|
|
79453
79568
|
},
|
|
79454
|
-
"llm.testProfile": {
|
|
79455
|
-
capName: "llm",
|
|
79456
|
-
capScope: "system",
|
|
79457
|
-
addonId: null,
|
|
79458
|
-
access: "create",
|
|
79459
|
-
role: "admin"
|
|
79460
|
-
},
|
|
79461
|
-
"llm.upsertProfile": {
|
|
79462
|
-
capName: "llm",
|
|
79463
|
-
capScope: "system",
|
|
79464
|
-
addonId: null,
|
|
79465
|
-
access: "create",
|
|
79466
|
-
role: "admin"
|
|
79467
|
-
},
|
|
79468
79569
|
"llmRuntime.appleAvailability": {
|
|
79469
79570
|
capName: "llm-runtime",
|
|
79470
79571
|
capScope: "system",
|
|
@@ -79969,13 +80070,6 @@ Object.freeze({
|
|
|
79969
80070
|
access: "create",
|
|
79970
80071
|
role: "admin"
|
|
79971
80072
|
},
|
|
79972
|
-
"meshNetwork.testConnection": {
|
|
79973
|
-
capName: "mesh-network",
|
|
79974
|
-
capScope: "system",
|
|
79975
|
-
addonId: null,
|
|
79976
|
-
access: "create",
|
|
79977
|
-
role: "admin"
|
|
79978
|
-
},
|
|
79979
80073
|
"meter.getStatus": {
|
|
79980
80074
|
capName: "meter",
|
|
79981
80075
|
capScope: "device",
|
|
@@ -80634,13 +80728,6 @@ Object.freeze({
|
|
|
80634
80728
|
access: "create",
|
|
80635
80729
|
role: "admin"
|
|
80636
80730
|
},
|
|
80637
|
-
"notificationOutput.deleteTarget": {
|
|
80638
|
-
capName: "notification-output",
|
|
80639
|
-
capScope: "system",
|
|
80640
|
-
addonId: null,
|
|
80641
|
-
access: "delete",
|
|
80642
|
-
role: "admin"
|
|
80643
|
-
},
|
|
80644
80731
|
"notificationOutput.discoverTargets": {
|
|
80645
80732
|
capName: "notification-output",
|
|
80646
80733
|
capScope: "system",
|
|
@@ -80648,13 +80735,6 @@ Object.freeze({
|
|
|
80648
80735
|
access: "view",
|
|
80649
80736
|
role: "admin"
|
|
80650
80737
|
},
|
|
80651
|
-
"notificationOutput.getTarget": {
|
|
80652
|
-
capName: "notification-output",
|
|
80653
|
-
capScope: "system",
|
|
80654
|
-
addonId: null,
|
|
80655
|
-
access: "view",
|
|
80656
|
-
role: "admin"
|
|
80657
|
-
},
|
|
80658
80738
|
"notificationOutput.listTargetKinds": {
|
|
80659
80739
|
capName: "notification-output",
|
|
80660
80740
|
capScope: "system",
|
|
@@ -80662,13 +80742,6 @@ Object.freeze({
|
|
|
80662
80742
|
access: "view",
|
|
80663
80743
|
role: "admin"
|
|
80664
80744
|
},
|
|
80665
|
-
"notificationOutput.listTargets": {
|
|
80666
|
-
capName: "notification-output",
|
|
80667
|
-
capScope: "system",
|
|
80668
|
-
addonId: null,
|
|
80669
|
-
access: "view",
|
|
80670
|
-
role: "admin"
|
|
80671
|
-
},
|
|
80672
80745
|
"notificationOutput.probeTargetConfig": {
|
|
80673
80746
|
capName: "notification-output",
|
|
80674
80747
|
capScope: "system",
|
|
@@ -80683,13 +80756,6 @@ Object.freeze({
|
|
|
80683
80756
|
access: "create",
|
|
80684
80757
|
role: "admin"
|
|
80685
80758
|
},
|
|
80686
|
-
"notificationOutput.setTargetEnabled": {
|
|
80687
|
-
capName: "notification-output",
|
|
80688
|
-
capScope: "system",
|
|
80689
|
-
addonId: null,
|
|
80690
|
-
access: "create",
|
|
80691
|
-
role: "admin"
|
|
80692
|
-
},
|
|
80693
80759
|
"notificationOutput.testTarget": {
|
|
80694
80760
|
capName: "notification-output",
|
|
80695
80761
|
capScope: "system",
|
|
@@ -80697,13 +80763,6 @@ Object.freeze({
|
|
|
80697
80763
|
access: "create",
|
|
80698
80764
|
role: "admin"
|
|
80699
80765
|
},
|
|
80700
|
-
"notificationOutput.upsertTarget": {
|
|
80701
|
-
capName: "notification-output",
|
|
80702
|
-
capScope: "system",
|
|
80703
|
-
addonId: null,
|
|
80704
|
-
access: "create",
|
|
80705
|
-
role: "admin"
|
|
80706
|
-
},
|
|
80707
80766
|
"notificationRules.activateAlarmProfile": {
|
|
80708
80767
|
capName: "notification-rules",
|
|
80709
80768
|
capScope: "system",
|
|
@@ -80963,41 +81022,6 @@ Object.freeze({
|
|
|
80963
81022
|
access: "view",
|
|
80964
81023
|
role: "admin"
|
|
80965
81024
|
},
|
|
80966
|
-
"oidcConnections.connectionFormSchema": {
|
|
80967
|
-
capName: "oidc-connections",
|
|
80968
|
-
capScope: "system",
|
|
80969
|
-
addonId: null,
|
|
80970
|
-
access: "view",
|
|
80971
|
-
role: "admin"
|
|
80972
|
-
},
|
|
80973
|
-
"oidcConnections.createConnection": {
|
|
80974
|
-
capName: "oidc-connections",
|
|
80975
|
-
capScope: "system",
|
|
80976
|
-
addonId: null,
|
|
80977
|
-
access: "create",
|
|
80978
|
-
role: "admin"
|
|
80979
|
-
},
|
|
80980
|
-
"oidcConnections.deleteConnection": {
|
|
80981
|
-
capName: "oidc-connections",
|
|
80982
|
-
capScope: "system",
|
|
80983
|
-
addonId: null,
|
|
80984
|
-
access: "delete",
|
|
80985
|
-
role: "admin"
|
|
80986
|
-
},
|
|
80987
|
-
"oidcConnections.listConnections": {
|
|
80988
|
-
capName: "oidc-connections",
|
|
80989
|
-
capScope: "system",
|
|
80990
|
-
addonId: null,
|
|
80991
|
-
access: "view",
|
|
80992
|
-
role: "admin"
|
|
80993
|
-
},
|
|
80994
|
-
"oidcConnections.updateConnection": {
|
|
80995
|
-
capName: "oidc-connections",
|
|
80996
|
-
capScope: "system",
|
|
80997
|
-
addonId: null,
|
|
80998
|
-
access: "create",
|
|
80999
|
-
role: "admin"
|
|
81000
|
-
},
|
|
81001
81025
|
"osd.getStatus": {
|
|
81002
81026
|
capName: "osd",
|
|
81003
81027
|
capScope: "device",
|
|
@@ -84029,13 +84053,6 @@ Object.freeze({
|
|
|
84029
84053
|
access: "delete",
|
|
84030
84054
|
role: "admin"
|
|
84031
84055
|
},
|
|
84032
|
-
"storage.deleteLocation": {
|
|
84033
|
-
capName: "storage",
|
|
84034
|
-
capScope: "system",
|
|
84035
|
-
addonId: null,
|
|
84036
|
-
access: "delete",
|
|
84037
|
-
role: "admin"
|
|
84038
|
-
},
|
|
84039
84056
|
"storage.endDownload": {
|
|
84040
84057
|
capName: "storage",
|
|
84041
84058
|
capScope: "system",
|
|
@@ -84092,13 +84109,6 @@ Object.freeze({
|
|
|
84092
84109
|
access: "view",
|
|
84093
84110
|
role: "admin"
|
|
84094
84111
|
},
|
|
84095
|
-
"storage.listProviders": {
|
|
84096
|
-
capName: "storage",
|
|
84097
|
-
capScope: "system",
|
|
84098
|
-
addonId: null,
|
|
84099
|
-
access: "view",
|
|
84100
|
-
role: "admin"
|
|
84101
|
-
},
|
|
84102
84112
|
"storage.read": {
|
|
84103
84113
|
capName: "storage",
|
|
84104
84114
|
capScope: "system",
|
|
@@ -84120,27 +84130,6 @@ Object.freeze({
|
|
|
84120
84130
|
access: "view",
|
|
84121
84131
|
role: "admin"
|
|
84122
84132
|
},
|
|
84123
|
-
"storage.testConfig": {
|
|
84124
|
-
capName: "storage",
|
|
84125
|
-
capScope: "system",
|
|
84126
|
-
addonId: null,
|
|
84127
|
-
access: "view",
|
|
84128
|
-
role: "admin"
|
|
84129
|
-
},
|
|
84130
|
-
"storage.testLocation": {
|
|
84131
|
-
capName: "storage",
|
|
84132
|
-
capScope: "system",
|
|
84133
|
-
addonId: null,
|
|
84134
|
-
access: "view",
|
|
84135
|
-
role: "admin"
|
|
84136
|
-
},
|
|
84137
|
-
"storage.upsertLocation": {
|
|
84138
|
-
capName: "storage",
|
|
84139
|
-
capScope: "system",
|
|
84140
|
-
addonId: null,
|
|
84141
|
-
access: "create",
|
|
84142
|
-
role: "admin"
|
|
84143
|
-
},
|
|
84144
84133
|
"storage.write": {
|
|
84145
84134
|
capName: "storage",
|
|
84146
84135
|
capScope: "system",
|
|
@@ -90312,7 +90301,7 @@ var AgentUIAddon = class extends BaseAddon {
|
|
|
90312
90301
|
capability: adminUiCapability,
|
|
90313
90302
|
provider: {
|
|
90314
90303
|
getStaticDir: async () => ({ staticDir: path.resolve(__dirname) }),
|
|
90315
|
-
getVersion: async () => ({ version: "1.2.
|
|
90304
|
+
getVersion: async () => ({ version: "1.2.338" })
|
|
90316
90305
|
}
|
|
90317
90306
|
}];
|
|
90318
90307
|
}
|