@camstack/addon-matter-broker 0.2.51 → 0.2.54
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 +82 -7
- package/dist/addon.mjs +82 -7
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -7732,7 +7732,8 @@ var OpsLogReasonSchema = _enum([
|
|
|
7732
7732
|
"quota",
|
|
7733
7733
|
"manual",
|
|
7734
7734
|
"operator",
|
|
7735
|
-
"maintenance"
|
|
7735
|
+
"maintenance",
|
|
7736
|
+
"orphaned-device"
|
|
7736
7737
|
]);
|
|
7737
7738
|
/** One audit row, shared verbatim by both domains. */
|
|
7738
7739
|
var OpsLogEntrySchema = object({
|
|
@@ -13093,10 +13094,39 @@ var DevicePersistConfigPayloadSchema = object({
|
|
|
13093
13094
|
deviceId: number(),
|
|
13094
13095
|
data: record(string$2(), unknown())
|
|
13095
13096
|
});
|
|
13097
|
+
/** What a migration actually did, per switch. `unreachable` is a first-class
|
|
13098
|
+
* answer: a camera that could not be asked is not a camera that was silenced. */
|
|
13099
|
+
var MigrateSwitchOutcomeSchema = _enum([
|
|
13100
|
+
"off",
|
|
13101
|
+
"on",
|
|
13102
|
+
"not-offered",
|
|
13103
|
+
"unreachable"
|
|
13104
|
+
]);
|
|
13105
|
+
var MigrateSwitchReportSchema = object({
|
|
13106
|
+
deviceId: number(),
|
|
13107
|
+
switchId: CameraSwitchIdSchema,
|
|
13108
|
+
outcome: MigrateSwitchOutcomeSchema,
|
|
13109
|
+
detail: string$2().optional()
|
|
13110
|
+
});
|
|
13111
|
+
var MigrateDeviceResultSchema = object({
|
|
13112
|
+
sourceId: number(),
|
|
13113
|
+
targetId: number(),
|
|
13114
|
+
switches: array(MigrateSwitchReportSchema).readonly(),
|
|
13115
|
+
/** Switches that could NOT be turned off on the source. Empty is the only
|
|
13116
|
+
* value meaning the replaced hardware is quiet. */
|
|
13117
|
+
sourceStillLive: array(CameraSwitchIdSchema).readonly(),
|
|
13118
|
+
swapped: boolean()
|
|
13119
|
+
});
|
|
13096
13120
|
method(object({
|
|
13097
13121
|
addonId: string$2(),
|
|
13098
13122
|
stableId: string$2()
|
|
13099
|
-
}), object({ id: number() }), { kind: "mutation" }), method(
|
|
13123
|
+
}), object({ id: number() }), { kind: "mutation" }), method(object({
|
|
13124
|
+
sourceId: number(),
|
|
13125
|
+
targetId: number()
|
|
13126
|
+
}), MigrateDeviceResultSchema, {
|
|
13127
|
+
kind: "mutation",
|
|
13128
|
+
auth: "admin"
|
|
13129
|
+
}), method(DeviceRegisterPayloadSchema, _void(), { kind: "mutation" }), method(DeviceRemovePayloadSchema, _void(), { kind: "mutation" }), method(DevicePersistConfigPayloadSchema, _void(), { kind: "mutation" }), method(object({ deviceId: number() }), record(string$2(), unknown())), method(object({ deviceId: number() }), record(string$2(), unknown())), method(object({ deviceId: number() }), DeviceMetaSchema.nullable()), method(object({
|
|
13100
13130
|
deviceId: number(),
|
|
13101
13131
|
name: string$2()
|
|
13102
13132
|
}), _void(), {
|
|
@@ -13571,6 +13601,35 @@ method(_void(), array(string$2()).readonly(), { auth: "admin" }), method(object(
|
|
|
13571
13601
|
auth: "admin"
|
|
13572
13602
|
});
|
|
13573
13603
|
/**
|
|
13604
|
+
* Transport bounds for AI capability methods.
|
|
13605
|
+
*
|
|
13606
|
+
* Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
|
|
13607
|
+
* each other: declaring the constant in either one hands the other `undefined`
|
|
13608
|
+
* at module-init time, and an undefined `timeoutMs` silently falls back to the
|
|
13609
|
+
* kernel's 60 s default — the exact failure this constant exists to prevent,
|
|
13610
|
+
* reintroduced invisibly. Found by the guard, not by review.
|
|
13611
|
+
*/
|
|
13612
|
+
/**
|
|
13613
|
+
* Ceiling for a cap method that runs inference or loads a model.
|
|
13614
|
+
*
|
|
13615
|
+
* Deliberately far above anything the AI layer itself may wait for (a summary
|
|
13616
|
+
* asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
|
|
13617
|
+
* never be the layer that gives up first: when it does, the failure is
|
|
13618
|
+
* reported as a transport error for a model that was still thinking, naming
|
|
13619
|
+
* the wrong layer and hiding the real one.
|
|
13620
|
+
*
|
|
13621
|
+
* Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
|
|
13622
|
+
* more on a cold model load. With no declaration every digest failed at
|
|
13623
|
+
* exactly 60 s and shipped without its text.
|
|
13624
|
+
*
|
|
13625
|
+
* A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
|
|
13626
|
+
* the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
|
|
13627
|
+
* decide when to stop, because only they can say WHY.
|
|
13628
|
+
*/
|
|
13629
|
+
var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
|
|
13630
|
+
/** A multi-gigabyte download. An hour is not generous, it is honest. */
|
|
13631
|
+
var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
|
|
13632
|
+
/**
|
|
13574
13633
|
* Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
|
|
13575
13634
|
* surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
|
|
13576
13635
|
* caps stay wire-compatible without a circular cap→cap import.
|
|
@@ -13842,16 +13901,19 @@ method(LlmGenerateBaseInputSchema.extend({
|
|
|
13842
13901
|
timeoutMs: number().int().positive().optional()
|
|
13843
13902
|
}), LlmGenerateResultSchema, {
|
|
13844
13903
|
kind: "mutation",
|
|
13845
|
-
auth: "admin"
|
|
13904
|
+
auth: "admin",
|
|
13905
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
13846
13906
|
}), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
|
|
13847
13907
|
kind: "mutation",
|
|
13848
|
-
auth: "admin"
|
|
13908
|
+
auth: "admin",
|
|
13909
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
13849
13910
|
}), method(object({}), _void(), {
|
|
13850
13911
|
kind: "mutation",
|
|
13851
13912
|
auth: "admin"
|
|
13852
13913
|
}), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
|
|
13853
13914
|
kind: "mutation",
|
|
13854
|
-
auth: "admin"
|
|
13915
|
+
auth: "admin",
|
|
13916
|
+
timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
|
|
13855
13917
|
}), method(object({ file: string$2() }), _void(), {
|
|
13856
13918
|
kind: "mutation",
|
|
13857
13919
|
auth: "admin"
|
|
@@ -14019,7 +14081,13 @@ var ProfileRefInputSchema = object({
|
|
|
14019
14081
|
addonId: string$2(),
|
|
14020
14082
|
profileId: string$2()
|
|
14021
14083
|
});
|
|
14022
|
-
method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
14084
|
+
method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
14085
|
+
kind: "mutation",
|
|
14086
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14087
|
+
}), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
|
|
14088
|
+
kind: "mutation",
|
|
14089
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14090
|
+
}), method(object({
|
|
14023
14091
|
addonId: string$2().optional(),
|
|
14024
14092
|
requestId: string$2()
|
|
14025
14093
|
}), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
|
|
@@ -14030,7 +14098,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
14030
14098
|
auth: "admin"
|
|
14031
14099
|
}), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
|
|
14032
14100
|
kind: "mutation",
|
|
14033
|
-
auth: "admin"
|
|
14101
|
+
auth: "admin",
|
|
14102
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14034
14103
|
}), method(ProfileRefInputSchema, array(string$2())), method(object({}), array(LlmDefaultSchema)), method(object({
|
|
14035
14104
|
selector: LlmDefaultSelectorSchema,
|
|
14036
14105
|
profileId: string$2().nullable()
|
|
@@ -34108,6 +34177,12 @@ Object.freeze({
|
|
|
34108
34177
|
addonId: null,
|
|
34109
34178
|
access: "view"
|
|
34110
34179
|
},
|
|
34180
|
+
"deviceManager.migrateDevice": {
|
|
34181
|
+
capName: "device-manager",
|
|
34182
|
+
capScope: "system",
|
|
34183
|
+
addonId: null,
|
|
34184
|
+
access: "create"
|
|
34185
|
+
},
|
|
34111
34186
|
"deviceManager.persistConfig": {
|
|
34112
34187
|
capName: "device-manager",
|
|
34113
34188
|
capScope: "system",
|
package/dist/addon.mjs
CHANGED
|
@@ -7730,7 +7730,8 @@ var OpsLogReasonSchema = _enum([
|
|
|
7730
7730
|
"quota",
|
|
7731
7731
|
"manual",
|
|
7732
7732
|
"operator",
|
|
7733
|
-
"maintenance"
|
|
7733
|
+
"maintenance",
|
|
7734
|
+
"orphaned-device"
|
|
7734
7735
|
]);
|
|
7735
7736
|
/** One audit row, shared verbatim by both domains. */
|
|
7736
7737
|
var OpsLogEntrySchema = object({
|
|
@@ -13091,10 +13092,39 @@ var DevicePersistConfigPayloadSchema = object({
|
|
|
13091
13092
|
deviceId: number(),
|
|
13092
13093
|
data: record(string$2(), unknown())
|
|
13093
13094
|
});
|
|
13095
|
+
/** What a migration actually did, per switch. `unreachable` is a first-class
|
|
13096
|
+
* answer: a camera that could not be asked is not a camera that was silenced. */
|
|
13097
|
+
var MigrateSwitchOutcomeSchema = _enum([
|
|
13098
|
+
"off",
|
|
13099
|
+
"on",
|
|
13100
|
+
"not-offered",
|
|
13101
|
+
"unreachable"
|
|
13102
|
+
]);
|
|
13103
|
+
var MigrateSwitchReportSchema = object({
|
|
13104
|
+
deviceId: number(),
|
|
13105
|
+
switchId: CameraSwitchIdSchema,
|
|
13106
|
+
outcome: MigrateSwitchOutcomeSchema,
|
|
13107
|
+
detail: string$2().optional()
|
|
13108
|
+
});
|
|
13109
|
+
var MigrateDeviceResultSchema = object({
|
|
13110
|
+
sourceId: number(),
|
|
13111
|
+
targetId: number(),
|
|
13112
|
+
switches: array(MigrateSwitchReportSchema).readonly(),
|
|
13113
|
+
/** Switches that could NOT be turned off on the source. Empty is the only
|
|
13114
|
+
* value meaning the replaced hardware is quiet. */
|
|
13115
|
+
sourceStillLive: array(CameraSwitchIdSchema).readonly(),
|
|
13116
|
+
swapped: boolean()
|
|
13117
|
+
});
|
|
13094
13118
|
method(object({
|
|
13095
13119
|
addonId: string$2(),
|
|
13096
13120
|
stableId: string$2()
|
|
13097
|
-
}), object({ id: number() }), { kind: "mutation" }), method(
|
|
13121
|
+
}), object({ id: number() }), { kind: "mutation" }), method(object({
|
|
13122
|
+
sourceId: number(),
|
|
13123
|
+
targetId: number()
|
|
13124
|
+
}), MigrateDeviceResultSchema, {
|
|
13125
|
+
kind: "mutation",
|
|
13126
|
+
auth: "admin"
|
|
13127
|
+
}), method(DeviceRegisterPayloadSchema, _void(), { kind: "mutation" }), method(DeviceRemovePayloadSchema, _void(), { kind: "mutation" }), method(DevicePersistConfigPayloadSchema, _void(), { kind: "mutation" }), method(object({ deviceId: number() }), record(string$2(), unknown())), method(object({ deviceId: number() }), record(string$2(), unknown())), method(object({ deviceId: number() }), DeviceMetaSchema.nullable()), method(object({
|
|
13098
13128
|
deviceId: number(),
|
|
13099
13129
|
name: string$2()
|
|
13100
13130
|
}), _void(), {
|
|
@@ -13569,6 +13599,35 @@ method(_void(), array(string$2()).readonly(), { auth: "admin" }), method(object(
|
|
|
13569
13599
|
auth: "admin"
|
|
13570
13600
|
});
|
|
13571
13601
|
/**
|
|
13602
|
+
* Transport bounds for AI capability methods.
|
|
13603
|
+
*
|
|
13604
|
+
* Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
|
|
13605
|
+
* each other: declaring the constant in either one hands the other `undefined`
|
|
13606
|
+
* at module-init time, and an undefined `timeoutMs` silently falls back to the
|
|
13607
|
+
* kernel's 60 s default — the exact failure this constant exists to prevent,
|
|
13608
|
+
* reintroduced invisibly. Found by the guard, not by review.
|
|
13609
|
+
*/
|
|
13610
|
+
/**
|
|
13611
|
+
* Ceiling for a cap method that runs inference or loads a model.
|
|
13612
|
+
*
|
|
13613
|
+
* Deliberately far above anything the AI layer itself may wait for (a summary
|
|
13614
|
+
* asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
|
|
13615
|
+
* never be the layer that gives up first: when it does, the failure is
|
|
13616
|
+
* reported as a transport error for a model that was still thinking, naming
|
|
13617
|
+
* the wrong layer and hiding the real one.
|
|
13618
|
+
*
|
|
13619
|
+
* Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
|
|
13620
|
+
* more on a cold model load. With no declaration every digest failed at
|
|
13621
|
+
* exactly 60 s and shipped without its text.
|
|
13622
|
+
*
|
|
13623
|
+
* A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
|
|
13624
|
+
* the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
|
|
13625
|
+
* decide when to stop, because only they can say WHY.
|
|
13626
|
+
*/
|
|
13627
|
+
var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
|
|
13628
|
+
/** A multi-gigabyte download. An hour is not generous, it is honest. */
|
|
13629
|
+
var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
|
|
13630
|
+
/**
|
|
13572
13631
|
* Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
|
|
13573
13632
|
* surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
|
|
13574
13633
|
* caps stay wire-compatible without a circular cap→cap import.
|
|
@@ -13840,16 +13899,19 @@ method(LlmGenerateBaseInputSchema.extend({
|
|
|
13840
13899
|
timeoutMs: number().int().positive().optional()
|
|
13841
13900
|
}), LlmGenerateResultSchema, {
|
|
13842
13901
|
kind: "mutation",
|
|
13843
|
-
auth: "admin"
|
|
13902
|
+
auth: "admin",
|
|
13903
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
13844
13904
|
}), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
|
|
13845
13905
|
kind: "mutation",
|
|
13846
|
-
auth: "admin"
|
|
13906
|
+
auth: "admin",
|
|
13907
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
13847
13908
|
}), method(object({}), _void(), {
|
|
13848
13909
|
kind: "mutation",
|
|
13849
13910
|
auth: "admin"
|
|
13850
13911
|
}), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
|
|
13851
13912
|
kind: "mutation",
|
|
13852
|
-
auth: "admin"
|
|
13913
|
+
auth: "admin",
|
|
13914
|
+
timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
|
|
13853
13915
|
}), method(object({ file: string$2() }), _void(), {
|
|
13854
13916
|
kind: "mutation",
|
|
13855
13917
|
auth: "admin"
|
|
@@ -14017,7 +14079,13 @@ var ProfileRefInputSchema = object({
|
|
|
14017
14079
|
addonId: string$2(),
|
|
14018
14080
|
profileId: string$2()
|
|
14019
14081
|
});
|
|
14020
|
-
method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
14082
|
+
method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
14083
|
+
kind: "mutation",
|
|
14084
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14085
|
+
}), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
|
|
14086
|
+
kind: "mutation",
|
|
14087
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14088
|
+
}), method(object({
|
|
14021
14089
|
addonId: string$2().optional(),
|
|
14022
14090
|
requestId: string$2()
|
|
14023
14091
|
}), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
|
|
@@ -14028,7 +14096,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
14028
14096
|
auth: "admin"
|
|
14029
14097
|
}), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
|
|
14030
14098
|
kind: "mutation",
|
|
14031
|
-
auth: "admin"
|
|
14099
|
+
auth: "admin",
|
|
14100
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14032
14101
|
}), method(ProfileRefInputSchema, array(string$2())), method(object({}), array(LlmDefaultSchema)), method(object({
|
|
14033
14102
|
selector: LlmDefaultSelectorSchema,
|
|
14034
14103
|
profileId: string$2().nullable()
|
|
@@ -34106,6 +34175,12 @@ Object.freeze({
|
|
|
34106
34175
|
addonId: null,
|
|
34107
34176
|
access: "view"
|
|
34108
34177
|
},
|
|
34178
|
+
"deviceManager.migrateDevice": {
|
|
34179
|
+
capName: "device-manager",
|
|
34180
|
+
capScope: "system",
|
|
34181
|
+
addonId: null,
|
|
34182
|
+
access: "create"
|
|
34183
|
+
},
|
|
34109
34184
|
"deviceManager.persistConfig": {
|
|
34110
34185
|
capName: "device-manager",
|
|
34111
34186
|
capScope: "system",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-matter-broker",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.54",
|
|
4
4
|
"description": "Matter broker addon for CamStack — owns a Matter fabric (commissioning + the long-lived controller) via the matter.js controller and brokers commissioned Matter nodes into CamStack",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|