@camstack/addon-provider-petkit 0.2.52 → 0.2.55
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
|
@@ -8820,7 +8820,8 @@ var OpsLogReasonSchema = _enum([
|
|
|
8820
8820
|
"quota",
|
|
8821
8821
|
"manual",
|
|
8822
8822
|
"operator",
|
|
8823
|
-
"maintenance"
|
|
8823
|
+
"maintenance",
|
|
8824
|
+
"orphaned-device"
|
|
8824
8825
|
]);
|
|
8825
8826
|
/** One audit row, shared verbatim by both domains. */
|
|
8826
8827
|
var OpsLogEntrySchema = object({
|
|
@@ -14132,10 +14133,39 @@ var DevicePersistConfigPayloadSchema = object({
|
|
|
14132
14133
|
deviceId: number(),
|
|
14133
14134
|
data: record(string(), unknown())
|
|
14134
14135
|
});
|
|
14136
|
+
/** What a migration actually did, per switch. `unreachable` is a first-class
|
|
14137
|
+
* answer: a camera that could not be asked is not a camera that was silenced. */
|
|
14138
|
+
var MigrateSwitchOutcomeSchema = _enum([
|
|
14139
|
+
"off",
|
|
14140
|
+
"on",
|
|
14141
|
+
"not-offered",
|
|
14142
|
+
"unreachable"
|
|
14143
|
+
]);
|
|
14144
|
+
var MigrateSwitchReportSchema = object({
|
|
14145
|
+
deviceId: number(),
|
|
14146
|
+
switchId: CameraSwitchIdSchema,
|
|
14147
|
+
outcome: MigrateSwitchOutcomeSchema,
|
|
14148
|
+
detail: string().optional()
|
|
14149
|
+
});
|
|
14150
|
+
var MigrateDeviceResultSchema = object({
|
|
14151
|
+
sourceId: number(),
|
|
14152
|
+
targetId: number(),
|
|
14153
|
+
switches: array(MigrateSwitchReportSchema).readonly(),
|
|
14154
|
+
/** Switches that could NOT be turned off on the source. Empty is the only
|
|
14155
|
+
* value meaning the replaced hardware is quiet. */
|
|
14156
|
+
sourceStillLive: array(CameraSwitchIdSchema).readonly(),
|
|
14157
|
+
swapped: boolean()
|
|
14158
|
+
});
|
|
14135
14159
|
method(object({
|
|
14136
14160
|
addonId: string(),
|
|
14137
14161
|
stableId: string()
|
|
14138
|
-
}), object({ id: number() }), { kind: "mutation" }), method(
|
|
14162
|
+
}), object({ id: number() }), { kind: "mutation" }), method(object({
|
|
14163
|
+
sourceId: number(),
|
|
14164
|
+
targetId: number()
|
|
14165
|
+
}), MigrateDeviceResultSchema, {
|
|
14166
|
+
kind: "mutation",
|
|
14167
|
+
auth: "admin"
|
|
14168
|
+
}), method(DeviceRegisterPayloadSchema, _void(), { kind: "mutation" }), method(DeviceRemovePayloadSchema, _void(), { kind: "mutation" }), method(DevicePersistConfigPayloadSchema, _void(), { kind: "mutation" }), method(object({ deviceId: number() }), record(string(), unknown())), method(object({ deviceId: number() }), record(string(), unknown())), method(object({ deviceId: number() }), DeviceMetaSchema.nullable()), method(object({
|
|
14139
14169
|
deviceId: number(),
|
|
14140
14170
|
name: string()
|
|
14141
14171
|
}), _void(), {
|
|
@@ -14610,6 +14640,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
|
|
|
14610
14640
|
auth: "admin"
|
|
14611
14641
|
});
|
|
14612
14642
|
/**
|
|
14643
|
+
* Transport bounds for AI capability methods.
|
|
14644
|
+
*
|
|
14645
|
+
* Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
|
|
14646
|
+
* each other: declaring the constant in either one hands the other `undefined`
|
|
14647
|
+
* at module-init time, and an undefined `timeoutMs` silently falls back to the
|
|
14648
|
+
* kernel's 60 s default — the exact failure this constant exists to prevent,
|
|
14649
|
+
* reintroduced invisibly. Found by the guard, not by review.
|
|
14650
|
+
*/
|
|
14651
|
+
/**
|
|
14652
|
+
* Ceiling for a cap method that runs inference or loads a model.
|
|
14653
|
+
*
|
|
14654
|
+
* Deliberately far above anything the AI layer itself may wait for (a summary
|
|
14655
|
+
* asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
|
|
14656
|
+
* never be the layer that gives up first: when it does, the failure is
|
|
14657
|
+
* reported as a transport error for a model that was still thinking, naming
|
|
14658
|
+
* the wrong layer and hiding the real one.
|
|
14659
|
+
*
|
|
14660
|
+
* Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
|
|
14661
|
+
* more on a cold model load. With no declaration every digest failed at
|
|
14662
|
+
* exactly 60 s and shipped without its text.
|
|
14663
|
+
*
|
|
14664
|
+
* A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
|
|
14665
|
+
* the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
|
|
14666
|
+
* decide when to stop, because only they can say WHY.
|
|
14667
|
+
*/
|
|
14668
|
+
var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
|
|
14669
|
+
/** A multi-gigabyte download. An hour is not generous, it is honest. */
|
|
14670
|
+
var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
|
|
14671
|
+
/**
|
|
14613
14672
|
* Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
|
|
14614
14673
|
* surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
|
|
14615
14674
|
* caps stay wire-compatible without a circular cap→cap import.
|
|
@@ -14881,16 +14940,19 @@ method(LlmGenerateBaseInputSchema.extend({
|
|
|
14881
14940
|
timeoutMs: number().int().positive().optional()
|
|
14882
14941
|
}), LlmGenerateResultSchema, {
|
|
14883
14942
|
kind: "mutation",
|
|
14884
|
-
auth: "admin"
|
|
14943
|
+
auth: "admin",
|
|
14944
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14885
14945
|
}), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
|
|
14886
14946
|
kind: "mutation",
|
|
14887
|
-
auth: "admin"
|
|
14947
|
+
auth: "admin",
|
|
14948
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14888
14949
|
}), method(object({}), _void(), {
|
|
14889
14950
|
kind: "mutation",
|
|
14890
14951
|
auth: "admin"
|
|
14891
14952
|
}), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
|
|
14892
14953
|
kind: "mutation",
|
|
14893
|
-
auth: "admin"
|
|
14954
|
+
auth: "admin",
|
|
14955
|
+
timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
|
|
14894
14956
|
}), method(object({ file: string() }), _void(), {
|
|
14895
14957
|
kind: "mutation",
|
|
14896
14958
|
auth: "admin"
|
|
@@ -15058,7 +15120,13 @@ var ProfileRefInputSchema = object({
|
|
|
15058
15120
|
addonId: string(),
|
|
15059
15121
|
profileId: string()
|
|
15060
15122
|
});
|
|
15061
|
-
method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
15123
|
+
method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
15124
|
+
kind: "mutation",
|
|
15125
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
15126
|
+
}), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
|
|
15127
|
+
kind: "mutation",
|
|
15128
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
15129
|
+
}), method(object({
|
|
15062
15130
|
addonId: string().optional(),
|
|
15063
15131
|
requestId: string()
|
|
15064
15132
|
}), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
|
|
@@ -15069,7 +15137,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
15069
15137
|
auth: "admin"
|
|
15070
15138
|
}), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
|
|
15071
15139
|
kind: "mutation",
|
|
15072
|
-
auth: "admin"
|
|
15140
|
+
auth: "admin",
|
|
15141
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
15073
15142
|
}), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
|
|
15074
15143
|
selector: LlmDefaultSelectorSchema,
|
|
15075
15144
|
profileId: string().nullable()
|
|
@@ -35138,6 +35207,12 @@ Object.freeze({
|
|
|
35138
35207
|
addonId: null,
|
|
35139
35208
|
access: "view"
|
|
35140
35209
|
},
|
|
35210
|
+
"deviceManager.migrateDevice": {
|
|
35211
|
+
capName: "device-manager",
|
|
35212
|
+
capScope: "system",
|
|
35213
|
+
addonId: null,
|
|
35214
|
+
access: "create"
|
|
35215
|
+
},
|
|
35141
35216
|
"deviceManager.persistConfig": {
|
|
35142
35217
|
capName: "device-manager",
|
|
35143
35218
|
capScope: "system",
|
package/dist/addon.mjs
CHANGED
|
@@ -8819,7 +8819,8 @@ var OpsLogReasonSchema = _enum([
|
|
|
8819
8819
|
"quota",
|
|
8820
8820
|
"manual",
|
|
8821
8821
|
"operator",
|
|
8822
|
-
"maintenance"
|
|
8822
|
+
"maintenance",
|
|
8823
|
+
"orphaned-device"
|
|
8823
8824
|
]);
|
|
8824
8825
|
/** One audit row, shared verbatim by both domains. */
|
|
8825
8826
|
var OpsLogEntrySchema = object({
|
|
@@ -14131,10 +14132,39 @@ var DevicePersistConfigPayloadSchema = object({
|
|
|
14131
14132
|
deviceId: number(),
|
|
14132
14133
|
data: record(string(), unknown())
|
|
14133
14134
|
});
|
|
14135
|
+
/** What a migration actually did, per switch. `unreachable` is a first-class
|
|
14136
|
+
* answer: a camera that could not be asked is not a camera that was silenced. */
|
|
14137
|
+
var MigrateSwitchOutcomeSchema = _enum([
|
|
14138
|
+
"off",
|
|
14139
|
+
"on",
|
|
14140
|
+
"not-offered",
|
|
14141
|
+
"unreachable"
|
|
14142
|
+
]);
|
|
14143
|
+
var MigrateSwitchReportSchema = object({
|
|
14144
|
+
deviceId: number(),
|
|
14145
|
+
switchId: CameraSwitchIdSchema,
|
|
14146
|
+
outcome: MigrateSwitchOutcomeSchema,
|
|
14147
|
+
detail: string().optional()
|
|
14148
|
+
});
|
|
14149
|
+
var MigrateDeviceResultSchema = object({
|
|
14150
|
+
sourceId: number(),
|
|
14151
|
+
targetId: number(),
|
|
14152
|
+
switches: array(MigrateSwitchReportSchema).readonly(),
|
|
14153
|
+
/** Switches that could NOT be turned off on the source. Empty is the only
|
|
14154
|
+
* value meaning the replaced hardware is quiet. */
|
|
14155
|
+
sourceStillLive: array(CameraSwitchIdSchema).readonly(),
|
|
14156
|
+
swapped: boolean()
|
|
14157
|
+
});
|
|
14134
14158
|
method(object({
|
|
14135
14159
|
addonId: string(),
|
|
14136
14160
|
stableId: string()
|
|
14137
|
-
}), object({ id: number() }), { kind: "mutation" }), method(
|
|
14161
|
+
}), object({ id: number() }), { kind: "mutation" }), method(object({
|
|
14162
|
+
sourceId: number(),
|
|
14163
|
+
targetId: number()
|
|
14164
|
+
}), MigrateDeviceResultSchema, {
|
|
14165
|
+
kind: "mutation",
|
|
14166
|
+
auth: "admin"
|
|
14167
|
+
}), method(DeviceRegisterPayloadSchema, _void(), { kind: "mutation" }), method(DeviceRemovePayloadSchema, _void(), { kind: "mutation" }), method(DevicePersistConfigPayloadSchema, _void(), { kind: "mutation" }), method(object({ deviceId: number() }), record(string(), unknown())), method(object({ deviceId: number() }), record(string(), unknown())), method(object({ deviceId: number() }), DeviceMetaSchema.nullable()), method(object({
|
|
14138
14168
|
deviceId: number(),
|
|
14139
14169
|
name: string()
|
|
14140
14170
|
}), _void(), {
|
|
@@ -14609,6 +14639,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
|
|
|
14609
14639
|
auth: "admin"
|
|
14610
14640
|
});
|
|
14611
14641
|
/**
|
|
14642
|
+
* Transport bounds for AI capability methods.
|
|
14643
|
+
*
|
|
14644
|
+
* Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
|
|
14645
|
+
* each other: declaring the constant in either one hands the other `undefined`
|
|
14646
|
+
* at module-init time, and an undefined `timeoutMs` silently falls back to the
|
|
14647
|
+
* kernel's 60 s default — the exact failure this constant exists to prevent,
|
|
14648
|
+
* reintroduced invisibly. Found by the guard, not by review.
|
|
14649
|
+
*/
|
|
14650
|
+
/**
|
|
14651
|
+
* Ceiling for a cap method that runs inference or loads a model.
|
|
14652
|
+
*
|
|
14653
|
+
* Deliberately far above anything the AI layer itself may wait for (a summary
|
|
14654
|
+
* asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
|
|
14655
|
+
* never be the layer that gives up first: when it does, the failure is
|
|
14656
|
+
* reported as a transport error for a model that was still thinking, naming
|
|
14657
|
+
* the wrong layer and hiding the real one.
|
|
14658
|
+
*
|
|
14659
|
+
* Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
|
|
14660
|
+
* more on a cold model load. With no declaration every digest failed at
|
|
14661
|
+
* exactly 60 s and shipped without its text.
|
|
14662
|
+
*
|
|
14663
|
+
* A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
|
|
14664
|
+
* the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
|
|
14665
|
+
* decide when to stop, because only they can say WHY.
|
|
14666
|
+
*/
|
|
14667
|
+
var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
|
|
14668
|
+
/** A multi-gigabyte download. An hour is not generous, it is honest. */
|
|
14669
|
+
var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
|
|
14670
|
+
/**
|
|
14612
14671
|
* Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
|
|
14613
14672
|
* surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
|
|
14614
14673
|
* caps stay wire-compatible without a circular cap→cap import.
|
|
@@ -14880,16 +14939,19 @@ method(LlmGenerateBaseInputSchema.extend({
|
|
|
14880
14939
|
timeoutMs: number().int().positive().optional()
|
|
14881
14940
|
}), LlmGenerateResultSchema, {
|
|
14882
14941
|
kind: "mutation",
|
|
14883
|
-
auth: "admin"
|
|
14942
|
+
auth: "admin",
|
|
14943
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14884
14944
|
}), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
|
|
14885
14945
|
kind: "mutation",
|
|
14886
|
-
auth: "admin"
|
|
14946
|
+
auth: "admin",
|
|
14947
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14887
14948
|
}), method(object({}), _void(), {
|
|
14888
14949
|
kind: "mutation",
|
|
14889
14950
|
auth: "admin"
|
|
14890
14951
|
}), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
|
|
14891
14952
|
kind: "mutation",
|
|
14892
|
-
auth: "admin"
|
|
14953
|
+
auth: "admin",
|
|
14954
|
+
timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
|
|
14893
14955
|
}), method(object({ file: string() }), _void(), {
|
|
14894
14956
|
kind: "mutation",
|
|
14895
14957
|
auth: "admin"
|
|
@@ -15057,7 +15119,13 @@ var ProfileRefInputSchema = object({
|
|
|
15057
15119
|
addonId: string(),
|
|
15058
15120
|
profileId: string()
|
|
15059
15121
|
});
|
|
15060
|
-
method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
15122
|
+
method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
15123
|
+
kind: "mutation",
|
|
15124
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
15125
|
+
}), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
|
|
15126
|
+
kind: "mutation",
|
|
15127
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
15128
|
+
}), method(object({
|
|
15061
15129
|
addonId: string().optional(),
|
|
15062
15130
|
requestId: string()
|
|
15063
15131
|
}), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
|
|
@@ -15068,7 +15136,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
15068
15136
|
auth: "admin"
|
|
15069
15137
|
}), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
|
|
15070
15138
|
kind: "mutation",
|
|
15071
|
-
auth: "admin"
|
|
15139
|
+
auth: "admin",
|
|
15140
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
15072
15141
|
}), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
|
|
15073
15142
|
selector: LlmDefaultSelectorSchema,
|
|
15074
15143
|
profileId: string().nullable()
|
|
@@ -35137,6 +35206,12 @@ Object.freeze({
|
|
|
35137
35206
|
addonId: null,
|
|
35138
35207
|
access: "view"
|
|
35139
35208
|
},
|
|
35209
|
+
"deviceManager.migrateDevice": {
|
|
35210
|
+
capName: "device-manager",
|
|
35211
|
+
capScope: "system",
|
|
35212
|
+
addonId: null,
|
|
35213
|
+
access: "create"
|
|
35214
|
+
},
|
|
35140
35215
|
"deviceManager.persistConfig": {
|
|
35141
35216
|
capName: "device-manager",
|
|
35142
35217
|
capScope: "system",
|
package/package.json
CHANGED