@camstack/types 1.2.260 → 1.2.262
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/base-addon.d.ts +9 -1
- package/dist/addon.js +4 -6
- package/dist/addon.mjs +4 -6
- package/dist/capabilities/capability-definition.d.ts +9 -0
- package/dist/capabilities/custom-model-registry.cap.d.ts +18 -0
- package/dist/capabilities/device-extension.cap.d.ts +408 -0
- package/dist/capabilities/device-manager.cap.d.ts +59 -6
- package/dist/capabilities/doorbell.cap.d.ts +41 -1
- package/dist/capabilities/embedding-encoder.cap.d.ts +175 -0
- package/dist/capabilities/index.d.ts +15 -12
- package/dist/capabilities/llm-runtime.cap.d.ts +4 -4
- package/dist/capabilities/llm-shared.d.ts +6 -6
- package/dist/capabilities/llm.cap.d.ts +6 -6
- package/dist/capabilities/model-convert.cap.d.ts +9 -0
- package/dist/capabilities/model-distributor.cap.d.ts +18 -0
- package/dist/capabilities/notification-rules.cap.d.ts +32 -14
- package/dist/capabilities/osd-manager.cap.d.ts +6 -6
- package/dist/capabilities/pipeline-analytics.cap.d.ts +80 -2
- package/dist/capabilities/pipeline-executor.cap.d.ts +1 -0
- package/dist/capabilities/pipeline-orchestrator.cap.d.ts +62 -1
- package/dist/capabilities/pipeline-runner.cap.d.ts +24 -0
- package/dist/capabilities/vector-store.cap.d.ts +14 -0
- package/dist/device-extension/index.d.ts +3 -0
- package/dist/device-extension/slot-descriptor.d.ts +62 -0
- package/dist/device-extension/slot-provider.d.ts +70 -0
- package/dist/generated/addon-api.d.ts +39 -31
- package/dist/generated/capability-router-map.d.ts +5 -2
- package/dist/generated/collection-array-methods.d.ts +1 -1
- package/dist/generated/device-proxy.d.ts +8 -8
- package/dist/generated/device-scoped-caps.d.ts +1 -1
- package/dist/generated/extension-slots.d.ts +40 -0
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-device-selectors.d.ts +1 -1
- package/dist/generated/system-proxy.d.ts +4 -2
- package/dist/index.d.ts +5 -1
- package/dist/index.js +1483 -507
- package/dist/index.mjs +1422 -508
- package/dist/interfaces/addon.d.ts +41 -0
- package/dist/interfaces/event-bus.d.ts +10 -0
- package/dist/node.d.ts +1 -0
- package/dist/node.js +73 -7
- package/dist/node.mjs +73 -8
- package/dist/pipeline/cluster-model-scope.d.ts +59 -3
- package/dist/pipeline/step-format-runnable.d.ts +31 -0
- package/dist/{sleep-BDYxE1ax.js → sleep-8K9gue-H.js} +56 -42
- package/dist/{sleep-BaRu0bS5.mjs → sleep-DC-wdyeS.mjs} +51 -43
- package/dist/storage/atomic-write.d.ts +25 -0
- package/dist/types/clip-model.d.ts +64 -0
- package/dist/types/models.d.ts +18 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ZodType } from 'zod';
|
|
2
|
-
import type { AddonContext, AddonInitResult, CapabilitiesAccess, ProviderRegistration } from '../interfaces/addon.js';
|
|
2
|
+
import type { AddonContext, AddonInitResult, CapabilitiesAccess, ProviderRegistration, StoredKeyRead } from '../interfaces/addon.js';
|
|
3
3
|
import type { ConfigField, ConfigSection, ConfigUISchema, ConfigUISchemaWithValues } from '../interfaces/config-ui.js';
|
|
4
4
|
import { type DurableState } from './durable-state.js';
|
|
5
5
|
export type { CapabilitiesAccess };
|
|
@@ -261,6 +261,14 @@ export declare abstract class BaseAddon<TConfig extends object = Record<string,
|
|
|
261
261
|
* `nodeId` omitted ⇒ the local node (node-blind injection from ctx).
|
|
262
262
|
*/
|
|
263
263
|
protected resolveGlobalStore(nodeId?: string, cap?: string): Promise<Record<string, unknown>>;
|
|
264
|
+
/**
|
|
265
|
+
* Whether ONE global key of this addon's store was written, read three-way
|
|
266
|
+
* (D651). For a question a hydrated view cannot answer: `getGlobalSettings`
|
|
267
|
+
* reports `value ?? default`, so "the operator chose the default" and "nobody
|
|
268
|
+
* chose" look the same, and a failed read looks like both. A `perNode` key is
|
|
269
|
+
* not supported here: its stored name is scoped.
|
|
270
|
+
*/
|
|
271
|
+
protected readStoredGlobalKey(key: string): Promise<StoredKeyRead>;
|
|
264
272
|
updateGlobalSettings(patch: Partial<TConfig>, nodeId?: string): Promise<void>;
|
|
265
273
|
/**
|
|
266
274
|
* The set of field keys the global settings schema declares `perNode: true`
|
package/dist/addon.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_sleep = require("./sleep-
|
|
2
|
+
const require_sleep = require("./sleep-8K9gue-H.js");
|
|
3
3
|
const require_event_category = require("./event-category-BVfsrBYA.js");
|
|
4
4
|
const require_err_msg = require("./err-msg-COpsHMw2.js");
|
|
5
5
|
//#region src/generated/cap-input-defaults.ts
|
|
@@ -150,10 +150,7 @@ var CAP_INPUT_DEFAULTS = Object.freeze({
|
|
|
150
150
|
"listRecentTracks": { "limit": 200 },
|
|
151
151
|
"listSummaries": { "limit": 50 },
|
|
152
152
|
"reclaimDebugMedia": { "mode": "report" },
|
|
153
|
-
"searchObjectEvents": {
|
|
154
|
-
"limit": 50,
|
|
155
|
-
"minScore": .2
|
|
156
|
-
}
|
|
153
|
+
"searchObjectEvents": { "limit": 50 }
|
|
157
154
|
},
|
|
158
155
|
"pipeline-runner": {
|
|
159
156
|
"attachCamera": {
|
|
@@ -307,7 +304,7 @@ function materialise(defaults) {
|
|
|
307
304
|
* barrel (`ALL_CAPABILITY_DEFINITIONS`), which would cost ~144MB RSS per
|
|
308
305
|
* forked runner. See docs/decisions/adr-0028.md.
|
|
309
306
|
*
|
|
310
|
-
* Coverage:
|
|
307
|
+
* Coverage: 24 collection caps, 39 array methods.
|
|
311
308
|
*/
|
|
312
309
|
var COLLECTION_ARRAY_METHODS = Object.freeze({
|
|
313
310
|
"addon-pages-source": ["listPages"],
|
|
@@ -317,6 +314,7 @@ var COLLECTION_ARRAY_METHODS = Object.freeze({
|
|
|
317
314
|
"custom-model-registry": ["listModels"],
|
|
318
315
|
"data-store-provider": ["histogram", "query"],
|
|
319
316
|
"device-export": ["listExposedDevices", "listSupportedDeviceKinds"],
|
|
317
|
+
"device-extension": ["listSlots", "listSources"],
|
|
320
318
|
"device-provider": ["discoverDevices", "getDevices"],
|
|
321
319
|
"failure-contribution": ["list"],
|
|
322
320
|
"llm": [
|
package/dist/addon.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as DeviceType, At as DATAPLANE_SECRET_HEADER, Dt as PEER_BYTES_STALL_MS, Et as PEER_BYTES_MAX_OUTSTANDING, G as readNodePin, J as ReadinessTimeoutError, L as expandCapMethods,
|
|
1
|
+
import { A as DeviceType, At as DATAPLANE_SECRET_HEADER, Dt as PEER_BYTES_STALL_MS, Et as PEER_BYTES_MAX_OUTSTANDING, G as readNodePin, J as ReadinessTimeoutError, L as expandCapMethods, Mt as DisposerChain, Nt as BaseAddon, Ot as PEER_BYTES_TICKET_TTL_MS, Pt as normalizeAddonInitResult, Rt as emitReadiness, S as DEVICE_CHILDREN_BATCH_MAX, T as describeCustomActions, Tt as PEER_BYTES_CHUNK_BYTES, W as nodePin, Z as scopeKey, a as asJsonObject, b as deviceOpsCapability, d as BOOT_RECOVERY_BACKOFF_MS, f as DEVICE_SCOPED_CAPS, h as createEventBusSliceSource, j as adminUiCapability, m as createDeviceProxy, p as isDeviceScopedCap, q as ReadinessRegistry, s as asString, t as sleep, u as parseJsonUnknown, x as viewerUiCapability } from "./sleep-DC-wdyeS.mjs";
|
|
2
2
|
import { t as EventCategory } from "./event-category-BVDXG4tB.mjs";
|
|
3
3
|
import { t as errMsg } from "./err-msg-IQTHeDzc.mjs";
|
|
4
4
|
//#region src/generated/cap-input-defaults.ts
|
|
@@ -149,10 +149,7 @@ var CAP_INPUT_DEFAULTS = Object.freeze({
|
|
|
149
149
|
"listRecentTracks": { "limit": 200 },
|
|
150
150
|
"listSummaries": { "limit": 50 },
|
|
151
151
|
"reclaimDebugMedia": { "mode": "report" },
|
|
152
|
-
"searchObjectEvents": {
|
|
153
|
-
"limit": 50,
|
|
154
|
-
"minScore": .2
|
|
155
|
-
}
|
|
152
|
+
"searchObjectEvents": { "limit": 50 }
|
|
156
153
|
},
|
|
157
154
|
"pipeline-runner": {
|
|
158
155
|
"attachCamera": {
|
|
@@ -306,7 +303,7 @@ function materialise(defaults) {
|
|
|
306
303
|
* barrel (`ALL_CAPABILITY_DEFINITIONS`), which would cost ~144MB RSS per
|
|
307
304
|
* forked runner. See docs/decisions/adr-0028.md.
|
|
308
305
|
*
|
|
309
|
-
* Coverage:
|
|
306
|
+
* Coverage: 24 collection caps, 39 array methods.
|
|
310
307
|
*/
|
|
311
308
|
var COLLECTION_ARRAY_METHODS = Object.freeze({
|
|
312
309
|
"addon-pages-source": ["listPages"],
|
|
@@ -316,6 +313,7 @@ var COLLECTION_ARRAY_METHODS = Object.freeze({
|
|
|
316
313
|
"custom-model-registry": ["listModels"],
|
|
317
314
|
"data-store-provider": ["histogram", "query"],
|
|
318
315
|
"device-export": ["listExposedDevices", "listSupportedDeviceKinds"],
|
|
316
|
+
"device-extension": ["listSlots", "listSources"],
|
|
319
317
|
"device-provider": ["discoverDevices", "getDevices"],
|
|
320
318
|
"failure-contribution": ["list"],
|
|
321
319
|
"llm": [
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
import { z } from 'zod';
|
|
15
15
|
import { DeviceType } from '../device/device-type.js';
|
|
16
16
|
import type { ConfigUISchemaWithValues } from '../interfaces/config-ui.js';
|
|
17
|
+
import type { ExtensionSlotDescriptor } from '../device-extension/slot-descriptor.js';
|
|
17
18
|
/**
|
|
18
19
|
* tRPC procedure kind.
|
|
19
20
|
* - 'query': read-only, no side effects
|
|
@@ -503,6 +504,14 @@ export interface CapabilityDefinition<TName extends string = string, TMethods ex
|
|
|
503
504
|
readonly deviceConfig?: DeviceConfigSpec;
|
|
504
505
|
/** For `scope: 'device'` caps — allowed device types. Omit → applies to every type. */
|
|
505
506
|
readonly deviceTypes?: readonly DeviceType[];
|
|
507
|
+
/**
|
|
508
|
+
* Extension slots this capability OWNS (D648): the ways a device of this
|
|
509
|
+
* kind can be extended by other devices, served by this cap's owner over
|
|
510
|
+
* the store it already has. Folded by `npm run codegen` into
|
|
511
|
+
* `generated/extension-slots.ts` and listed by `device-extension`.
|
|
512
|
+
* Behavioural metadata, so it lives here and only here (D4).
|
|
513
|
+
*/
|
|
514
|
+
readonly extensionSlots?: readonly ExtensionSlotDescriptor[];
|
|
506
515
|
/**
|
|
507
516
|
* When `true`, every provider of this capability MUST implement the
|
|
508
517
|
* device-settings contribution surface — three extra methods appearing
|
|
@@ -147,6 +147,15 @@ export declare const CustomModelDescriptorSchema: z.ZodObject<{
|
|
|
147
147
|
}>>;
|
|
148
148
|
preserveOriginal: z.ZodBoolean;
|
|
149
149
|
}, z.core.$strip>>;
|
|
150
|
+
clip: z.ZodOptional<z.ZodObject<{
|
|
151
|
+
textModelId: z.ZodString;
|
|
152
|
+
embeddingDim: z.ZodNumber;
|
|
153
|
+
vectorIndex: z.ZodString;
|
|
154
|
+
tokenizerFile: z.ZodString;
|
|
155
|
+
contextLength: z.ZodNumber;
|
|
156
|
+
padId: z.ZodNumber;
|
|
157
|
+
searchMinScore: z.ZodNumber;
|
|
158
|
+
}, z.core.$strip>>;
|
|
150
159
|
}, z.core.$strip>;
|
|
151
160
|
}, z.core.$strip>;
|
|
152
161
|
export type CustomModelDescriptor = z.infer<typeof CustomModelDescriptorSchema>;
|
|
@@ -295,6 +304,15 @@ export declare const customModelRegistryCapability: {
|
|
|
295
304
|
}>>;
|
|
296
305
|
preserveOriginal: z.ZodBoolean;
|
|
297
306
|
}, z.core.$strip>>;
|
|
307
|
+
clip: z.ZodOptional<z.ZodObject<{
|
|
308
|
+
textModelId: z.ZodString;
|
|
309
|
+
embeddingDim: z.ZodNumber;
|
|
310
|
+
vectorIndex: z.ZodString;
|
|
311
|
+
tokenizerFile: z.ZodString;
|
|
312
|
+
contextLength: z.ZodNumber;
|
|
313
|
+
padId: z.ZodNumber;
|
|
314
|
+
searchMinScore: z.ZodNumber;
|
|
315
|
+
}, z.core.$strip>>;
|
|
298
316
|
}, z.core.$strip>;
|
|
299
317
|
}, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
300
318
|
};
|
|
@@ -0,0 +1,408 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `device-extension` — ONE place to see and author what a device is extended
|
|
3
|
+
* with by OTHER devices (D648).
|
|
4
|
+
*
|
|
5
|
+
* **A contract, not a store.** Every slot (`linked-devices`,
|
|
6
|
+
* `doorbell-source`, later `consumables-graft`) is declared by the cap that
|
|
7
|
+
* owns the function (`extensionSlots` in its `*.cap.ts`, D4) and SERVED by the
|
|
8
|
+
* addon that already owns its store, over that store and its existing write
|
|
9
|
+
* path. This cap persists nothing and has no config method (guarded by
|
|
10
|
+
* `scripts/check-extension-slots.ts`): D62 applied to the whole feature, and
|
|
11
|
+
* D3 — no shadow registry.
|
|
12
|
+
*
|
|
13
|
+
* **Shape.** A device-scoped wrapper COLLECTION, the D554 shape `videoclips`
|
|
14
|
+
* uses: `resolveCapMount` gives it the `device-scoped` mount and
|
|
15
|
+
* `requireDeviceCollection` dispatches it. Its providers are the slot owners
|
|
16
|
+
* (device-manager, virtual-doorbell, …), and a device's sources are its
|
|
17
|
+
* bindings (step 0 of `getBindings`, derived, persisted nowhere).
|
|
18
|
+
*
|
|
19
|
+
* - `listSources` — one row per provider, the D554 source-listing convention
|
|
20
|
+
* that lets a scalar call be routed by the prefix of its `slotRef`.
|
|
21
|
+
* - `listSlots` — fan-out, concatenated. A provider that throws becomes ONE
|
|
22
|
+
* `unreachable` row naming it, never an absence (D554.4, D315): "no
|
|
23
|
+
* extensions" is claimed only from an answer.
|
|
24
|
+
* - `listCandidates` / `setSlot` — scalar, routed by `slotRef`
|
|
25
|
+
* (`<source>:<slotId>`). An unclaimed ref is refused by name (D554.5).
|
|
26
|
+
*
|
|
27
|
+
* The slot's value travels as the generated discriminated union
|
|
28
|
+
* (`ExtensionSlotValue`, keyed on `slot`), so a value under the wrong slot is
|
|
29
|
+
* a schema error before it reaches any owner.
|
|
30
|
+
*/
|
|
31
|
+
import { z } from 'zod';
|
|
32
|
+
import { type InferProvider } from './capability-definition.js';
|
|
33
|
+
/** Separator between the source and the slot id in a `slotRef`. It is the
|
|
34
|
+
* D554 routing separator: the dispatcher matches `<source>:` prefixes. */
|
|
35
|
+
export declare const EXTENSION_SLOT_REF_SEPARATOR = ":";
|
|
36
|
+
/** The contract method whose failure BECOMES a row, like `listSources`'s. */
|
|
37
|
+
export declare const EXTENSION_SLOT_LISTING_METHOD = "listSlots";
|
|
38
|
+
export declare const ExtensionSourceAvailabilitySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
39
|
+
state: z.ZodLiteral<"ok">;
|
|
40
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
41
|
+
state: z.ZodLiteral<"unreachable">;
|
|
42
|
+
reason: z.ZodString;
|
|
43
|
+
}, z.core.$strip>], "state">;
|
|
44
|
+
export type ExtensionSourceAvailability = z.infer<typeof ExtensionSourceAvailabilitySchema>;
|
|
45
|
+
/** One provider of slots — the D554 source-listing row. */
|
|
46
|
+
export declare const ExtensionSourceSchema: z.ZodObject<{
|
|
47
|
+
source: z.ZodString;
|
|
48
|
+
label: z.ZodString;
|
|
49
|
+
addonId: z.ZodOptional<z.ZodString>;
|
|
50
|
+
availability: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
51
|
+
state: z.ZodLiteral<"ok">;
|
|
52
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
53
|
+
state: z.ZodLiteral<"unreachable">;
|
|
54
|
+
reason: z.ZodString;
|
|
55
|
+
}, z.core.$strip>], "state">;
|
|
56
|
+
}, z.core.$strip>;
|
|
57
|
+
export type ExtensionSource = z.infer<typeof ExtensionSourceSchema>;
|
|
58
|
+
/**
|
|
59
|
+
* How one picked source stands. `missing` — no such device (deleted, or an id
|
|
60
|
+
* that never existed); `foreign` — a device the slot's owner cannot read from
|
|
61
|
+
* (slice 2's cross-owner graft source); `unavailable` — it exists but is not a
|
|
62
|
+
* valid source now (a container, which is never a pick). A source in any of
|
|
63
|
+
* these states is SHOWN, never silently dropped or re-pointed.
|
|
64
|
+
*/
|
|
65
|
+
export declare const ExtensionSourceHealthSchema: z.ZodEnum<{
|
|
66
|
+
ok: "ok";
|
|
67
|
+
missing: "missing";
|
|
68
|
+
foreign: "foreign";
|
|
69
|
+
unavailable: "unavailable";
|
|
70
|
+
}>;
|
|
71
|
+
export type ExtensionSourceHealth = z.infer<typeof ExtensionSourceHealthSchema>;
|
|
72
|
+
export declare const ExtensionSlotSourceSchema: z.ZodObject<{
|
|
73
|
+
deviceId: z.ZodNumber;
|
|
74
|
+
name: z.ZodNullable<z.ZodString>;
|
|
75
|
+
health: z.ZodEnum<{
|
|
76
|
+
ok: "ok";
|
|
77
|
+
missing: "missing";
|
|
78
|
+
foreign: "foreign";
|
|
79
|
+
unavailable: "unavailable";
|
|
80
|
+
}>;
|
|
81
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
82
|
+
}, z.core.$strip>;
|
|
83
|
+
export type ExtensionSlotSource = z.infer<typeof ExtensionSlotSourceSchema>;
|
|
84
|
+
/**
|
|
85
|
+
* A DIFFERENT authority that gates whether the slot's sources do anything —
|
|
86
|
+
* reported read-only, named, never written through this contract (D62). The
|
|
87
|
+
* virtual doorbell's sources ring only while the wrapper is bound to the
|
|
88
|
+
* camera, and that binding belongs to `deviceManager.setWrapperActive`.
|
|
89
|
+
* `unknown` means the gate could not be read; it is not "inactive" (D315).
|
|
90
|
+
*/
|
|
91
|
+
export declare const ExtensionSlotActivationSchema: z.ZodObject<{
|
|
92
|
+
state: z.ZodEnum<{
|
|
93
|
+
unknown: "unknown";
|
|
94
|
+
active: "active";
|
|
95
|
+
inactive: "inactive";
|
|
96
|
+
}>;
|
|
97
|
+
authority: z.ZodString;
|
|
98
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
99
|
+
}, z.core.$strip>;
|
|
100
|
+
export type ExtensionSlotActivation = z.infer<typeof ExtensionSlotActivationSchema>;
|
|
101
|
+
/** One slot of one device, as its owner reads it from its own store. */
|
|
102
|
+
export declare const ExtensionSlotStateSchema: z.ZodObject<{
|
|
103
|
+
state: z.ZodLiteral<"ok">;
|
|
104
|
+
slotRef: z.ZodString;
|
|
105
|
+
slot: z.ZodEnum<{
|
|
106
|
+
"linked-devices": "linked-devices";
|
|
107
|
+
"doorbell-source": "doorbell-source";
|
|
108
|
+
}>;
|
|
109
|
+
authority: z.ZodString;
|
|
110
|
+
enabled: z.ZodNullable<z.ZodBoolean>;
|
|
111
|
+
projects: z.ZodNullable<z.ZodString>;
|
|
112
|
+
activation: z.ZodNullable<z.ZodObject<{
|
|
113
|
+
state: z.ZodEnum<{
|
|
114
|
+
unknown: "unknown";
|
|
115
|
+
active: "active";
|
|
116
|
+
inactive: "inactive";
|
|
117
|
+
}>;
|
|
118
|
+
authority: z.ZodString;
|
|
119
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
120
|
+
}, z.core.$strip>>;
|
|
121
|
+
value: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
122
|
+
deviceIds: z.ZodArray<z.ZodNumber>;
|
|
123
|
+
slot: z.ZodLiteral<"doorbell-source">;
|
|
124
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
125
|
+
deviceIds: z.ZodArray<z.ZodNumber>;
|
|
126
|
+
trackedDeviceIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
127
|
+
slot: z.ZodLiteral<"linked-devices">;
|
|
128
|
+
}, z.core.$strip>], "slot">;
|
|
129
|
+
sources: z.ZodArray<z.ZodObject<{
|
|
130
|
+
deviceId: z.ZodNumber;
|
|
131
|
+
name: z.ZodNullable<z.ZodString>;
|
|
132
|
+
health: z.ZodEnum<{
|
|
133
|
+
ok: "ok";
|
|
134
|
+
missing: "missing";
|
|
135
|
+
foreign: "foreign";
|
|
136
|
+
unavailable: "unavailable";
|
|
137
|
+
}>;
|
|
138
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
139
|
+
}, z.core.$strip>>;
|
|
140
|
+
impliedSources: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
141
|
+
deviceId: z.ZodNumber;
|
|
142
|
+
name: z.ZodNullable<z.ZodString>;
|
|
143
|
+
health: z.ZodEnum<{
|
|
144
|
+
ok: "ok";
|
|
145
|
+
missing: "missing";
|
|
146
|
+
foreign: "foreign";
|
|
147
|
+
unavailable: "unavailable";
|
|
148
|
+
}>;
|
|
149
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
150
|
+
}, z.core.$strip>>>;
|
|
151
|
+
}, z.core.$strip>;
|
|
152
|
+
export type ExtensionSlotState = z.infer<typeof ExtensionSlotStateSchema>;
|
|
153
|
+
/**
|
|
154
|
+
* A provider that could not answer `listSlots` at all. It could not name its
|
|
155
|
+
* own slots, so the row names the ADDON and carries the refusal verbatim.
|
|
156
|
+
* Written by the dispatcher, never by a provider.
|
|
157
|
+
*/
|
|
158
|
+
export declare const ExtensionSlotUnreachableSchema: z.ZodObject<{
|
|
159
|
+
state: z.ZodLiteral<"unreachable">;
|
|
160
|
+
addonId: z.ZodString;
|
|
161
|
+
reason: z.ZodString;
|
|
162
|
+
}, z.core.$strip>;
|
|
163
|
+
export type ExtensionSlotUnreachable = z.infer<typeof ExtensionSlotUnreachableSchema>;
|
|
164
|
+
export declare const ExtensionSlotRowSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
165
|
+
state: z.ZodLiteral<"ok">;
|
|
166
|
+
slotRef: z.ZodString;
|
|
167
|
+
slot: z.ZodEnum<{
|
|
168
|
+
"linked-devices": "linked-devices";
|
|
169
|
+
"doorbell-source": "doorbell-source";
|
|
170
|
+
}>;
|
|
171
|
+
authority: z.ZodString;
|
|
172
|
+
enabled: z.ZodNullable<z.ZodBoolean>;
|
|
173
|
+
projects: z.ZodNullable<z.ZodString>;
|
|
174
|
+
activation: z.ZodNullable<z.ZodObject<{
|
|
175
|
+
state: z.ZodEnum<{
|
|
176
|
+
unknown: "unknown";
|
|
177
|
+
active: "active";
|
|
178
|
+
inactive: "inactive";
|
|
179
|
+
}>;
|
|
180
|
+
authority: z.ZodString;
|
|
181
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
182
|
+
}, z.core.$strip>>;
|
|
183
|
+
value: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
184
|
+
deviceIds: z.ZodArray<z.ZodNumber>;
|
|
185
|
+
slot: z.ZodLiteral<"doorbell-source">;
|
|
186
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
187
|
+
deviceIds: z.ZodArray<z.ZodNumber>;
|
|
188
|
+
trackedDeviceIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
189
|
+
slot: z.ZodLiteral<"linked-devices">;
|
|
190
|
+
}, z.core.$strip>], "slot">;
|
|
191
|
+
sources: z.ZodArray<z.ZodObject<{
|
|
192
|
+
deviceId: z.ZodNumber;
|
|
193
|
+
name: z.ZodNullable<z.ZodString>;
|
|
194
|
+
health: z.ZodEnum<{
|
|
195
|
+
ok: "ok";
|
|
196
|
+
missing: "missing";
|
|
197
|
+
foreign: "foreign";
|
|
198
|
+
unavailable: "unavailable";
|
|
199
|
+
}>;
|
|
200
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
201
|
+
}, z.core.$strip>>;
|
|
202
|
+
impliedSources: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
203
|
+
deviceId: z.ZodNumber;
|
|
204
|
+
name: z.ZodNullable<z.ZodString>;
|
|
205
|
+
health: z.ZodEnum<{
|
|
206
|
+
ok: "ok";
|
|
207
|
+
missing: "missing";
|
|
208
|
+
foreign: "foreign";
|
|
209
|
+
unavailable: "unavailable";
|
|
210
|
+
}>;
|
|
211
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
212
|
+
}, z.core.$strip>>>;
|
|
213
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
214
|
+
state: z.ZodLiteral<"unreachable">;
|
|
215
|
+
addonId: z.ZodString;
|
|
216
|
+
reason: z.ZodString;
|
|
217
|
+
}, z.core.$strip>], "state">;
|
|
218
|
+
export type ExtensionSlotRow = z.infer<typeof ExtensionSlotRowSchema>;
|
|
219
|
+
/** The row the dispatcher writes for a provider whose `listSlots` threw. */
|
|
220
|
+
export declare function unreachableExtensionSlotRow(addonId: string, reason: string): ExtensionSlotUnreachable;
|
|
221
|
+
/** One device the slot's editor may offer as a source. */
|
|
222
|
+
export declare const ExtensionCandidateSchema: z.ZodObject<{
|
|
223
|
+
deviceId: z.ZodNumber;
|
|
224
|
+
name: z.ZodString;
|
|
225
|
+
type: z.ZodString;
|
|
226
|
+
location: z.ZodNullable<z.ZodString>;
|
|
227
|
+
parentName: z.ZodNullable<z.ZodString>;
|
|
228
|
+
suggested: z.ZodBoolean;
|
|
229
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
230
|
+
}, z.core.$strip>;
|
|
231
|
+
export type ExtensionCandidate = z.infer<typeof ExtensionCandidateSchema>;
|
|
232
|
+
export declare const ExtensionCandidatesSchema: z.ZodObject<{
|
|
233
|
+
candidates: z.ZodArray<z.ZodObject<{
|
|
234
|
+
deviceId: z.ZodNumber;
|
|
235
|
+
name: z.ZodString;
|
|
236
|
+
type: z.ZodString;
|
|
237
|
+
location: z.ZodNullable<z.ZodString>;
|
|
238
|
+
parentName: z.ZodNullable<z.ZodString>;
|
|
239
|
+
suggested: z.ZodBoolean;
|
|
240
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
241
|
+
}, z.core.$strip>>;
|
|
242
|
+
}, z.core.$strip>;
|
|
243
|
+
export type ExtensionCandidates = z.infer<typeof ExtensionCandidatesSchema>;
|
|
244
|
+
/**
|
|
245
|
+
* What a write did. `none` — applied in place. `host` / `parent` — the owner
|
|
246
|
+
* reloaded the host (or, for an accessory child, its parent) because the
|
|
247
|
+
* write changed what the host REGISTERS (a graft switched on or off, slice 2).
|
|
248
|
+
*/
|
|
249
|
+
export declare const ExtensionSetResultSchema: z.ZodObject<{
|
|
250
|
+
applied: z.ZodLiteral<true>;
|
|
251
|
+
reload: z.ZodEnum<{
|
|
252
|
+
none: "none";
|
|
253
|
+
host: "host";
|
|
254
|
+
parent: "parent";
|
|
255
|
+
}>;
|
|
256
|
+
}, z.core.$strip>;
|
|
257
|
+
export type ExtensionSetResult = z.infer<typeof ExtensionSetResultSchema>;
|
|
258
|
+
export declare const ExtensionSlotRefInputSchema: z.ZodObject<{
|
|
259
|
+
deviceId: z.ZodNumber;
|
|
260
|
+
slotRef: z.ZodString;
|
|
261
|
+
}, z.core.$strip>;
|
|
262
|
+
export type ExtensionSlotRefInput = z.infer<typeof ExtensionSlotRefInputSchema>;
|
|
263
|
+
export declare const ExtensionSetSlotInputSchema: z.ZodObject<{
|
|
264
|
+
deviceId: z.ZodNumber;
|
|
265
|
+
slotRef: z.ZodString;
|
|
266
|
+
value: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
267
|
+
deviceIds: z.ZodArray<z.ZodNumber>;
|
|
268
|
+
slot: z.ZodLiteral<"doorbell-source">;
|
|
269
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
270
|
+
deviceIds: z.ZodArray<z.ZodNumber>;
|
|
271
|
+
trackedDeviceIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
272
|
+
slot: z.ZodLiteral<"linked-devices">;
|
|
273
|
+
}, z.core.$strip>], "slot">;
|
|
274
|
+
}, z.core.$strip>;
|
|
275
|
+
export type ExtensionSetSlotInput = z.infer<typeof ExtensionSetSlotInputSchema>;
|
|
276
|
+
export declare const deviceExtensionCapability: {
|
|
277
|
+
readonly name: "device-extension";
|
|
278
|
+
readonly scope: "device";
|
|
279
|
+
readonly mode: "collection";
|
|
280
|
+
readonly kind: "wrapper";
|
|
281
|
+
readonly defaultActive: true;
|
|
282
|
+
readonly deviceTypes: readonly import("../index.js").DeviceType[];
|
|
283
|
+
readonly deviceConfig: {
|
|
284
|
+
readonly ui: {
|
|
285
|
+
readonly kind: "widget";
|
|
286
|
+
readonly widgetId: "host/extensions-panel";
|
|
287
|
+
readonly tab: "general";
|
|
288
|
+
readonly label: "Extensions";
|
|
289
|
+
readonly order: 72;
|
|
290
|
+
};
|
|
291
|
+
};
|
|
292
|
+
readonly methods: {
|
|
293
|
+
/** One row per slot owner — the D554 source listing `slotRef` routes by. */
|
|
294
|
+
readonly listSources: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
295
|
+
deviceId: z.ZodNumber;
|
|
296
|
+
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
297
|
+
source: z.ZodString;
|
|
298
|
+
label: z.ZodString;
|
|
299
|
+
addonId: z.ZodOptional<z.ZodString>;
|
|
300
|
+
availability: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
301
|
+
state: z.ZodLiteral<"ok">;
|
|
302
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
303
|
+
state: z.ZodLiteral<"unreachable">;
|
|
304
|
+
reason: z.ZodString;
|
|
305
|
+
}, z.core.$strip>], "state">;
|
|
306
|
+
}, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
307
|
+
/**
|
|
308
|
+
* Every slot this device is offered, read by each owner from its own
|
|
309
|
+
* store. A provider that throws is ONE `unreachable` row (D554.4).
|
|
310
|
+
*/
|
|
311
|
+
readonly listSlots: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
312
|
+
deviceId: z.ZodNumber;
|
|
313
|
+
}, z.core.$strip>, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
314
|
+
state: z.ZodLiteral<"ok">;
|
|
315
|
+
slotRef: z.ZodString;
|
|
316
|
+
slot: z.ZodEnum<{
|
|
317
|
+
"linked-devices": "linked-devices";
|
|
318
|
+
"doorbell-source": "doorbell-source";
|
|
319
|
+
}>;
|
|
320
|
+
authority: z.ZodString;
|
|
321
|
+
enabled: z.ZodNullable<z.ZodBoolean>;
|
|
322
|
+
projects: z.ZodNullable<z.ZodString>;
|
|
323
|
+
activation: z.ZodNullable<z.ZodObject<{
|
|
324
|
+
state: z.ZodEnum<{
|
|
325
|
+
unknown: "unknown";
|
|
326
|
+
active: "active";
|
|
327
|
+
inactive: "inactive";
|
|
328
|
+
}>;
|
|
329
|
+
authority: z.ZodString;
|
|
330
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
331
|
+
}, z.core.$strip>>;
|
|
332
|
+
value: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
333
|
+
deviceIds: z.ZodArray<z.ZodNumber>;
|
|
334
|
+
slot: z.ZodLiteral<"doorbell-source">;
|
|
335
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
336
|
+
deviceIds: z.ZodArray<z.ZodNumber>;
|
|
337
|
+
trackedDeviceIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
338
|
+
slot: z.ZodLiteral<"linked-devices">;
|
|
339
|
+
}, z.core.$strip>], "slot">;
|
|
340
|
+
sources: z.ZodArray<z.ZodObject<{
|
|
341
|
+
deviceId: z.ZodNumber;
|
|
342
|
+
name: z.ZodNullable<z.ZodString>;
|
|
343
|
+
health: z.ZodEnum<{
|
|
344
|
+
ok: "ok";
|
|
345
|
+
missing: "missing";
|
|
346
|
+
foreign: "foreign";
|
|
347
|
+
unavailable: "unavailable";
|
|
348
|
+
}>;
|
|
349
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
350
|
+
}, z.core.$strip>>;
|
|
351
|
+
impliedSources: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
352
|
+
deviceId: z.ZodNumber;
|
|
353
|
+
name: z.ZodNullable<z.ZodString>;
|
|
354
|
+
health: z.ZodEnum<{
|
|
355
|
+
ok: "ok";
|
|
356
|
+
missing: "missing";
|
|
357
|
+
foreign: "foreign";
|
|
358
|
+
unavailable: "unavailable";
|
|
359
|
+
}>;
|
|
360
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
361
|
+
}, z.core.$strip>>>;
|
|
362
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
363
|
+
state: z.ZodLiteral<"unreachable">;
|
|
364
|
+
addonId: z.ZodString;
|
|
365
|
+
reason: z.ZodString;
|
|
366
|
+
}, z.core.$strip>], "state">>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
367
|
+
/** The devices the slot's editor may offer, suggestions pre-marked (D356). */
|
|
368
|
+
readonly listCandidates: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
369
|
+
deviceId: z.ZodNumber;
|
|
370
|
+
slotRef: z.ZodString;
|
|
371
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
372
|
+
candidates: z.ZodArray<z.ZodObject<{
|
|
373
|
+
deviceId: z.ZodNumber;
|
|
374
|
+
name: z.ZodString;
|
|
375
|
+
type: z.ZodString;
|
|
376
|
+
location: z.ZodNullable<z.ZodString>;
|
|
377
|
+
parentName: z.ZodNullable<z.ZodString>;
|
|
378
|
+
suggested: z.ZodBoolean;
|
|
379
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
380
|
+
}, z.core.$strip>>;
|
|
381
|
+
}, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
382
|
+
/**
|
|
383
|
+
* Write one slot through its owner's EXISTING write path. The owner
|
|
384
|
+
* validates (a container is never a linked device, a camera is never its
|
|
385
|
+
* own source) and refuses by name before persisting.
|
|
386
|
+
*/
|
|
387
|
+
readonly setSlot: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
388
|
+
deviceId: z.ZodNumber;
|
|
389
|
+
slotRef: z.ZodString;
|
|
390
|
+
value: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
391
|
+
deviceIds: z.ZodArray<z.ZodNumber>;
|
|
392
|
+
slot: z.ZodLiteral<"doorbell-source">;
|
|
393
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
394
|
+
deviceIds: z.ZodArray<z.ZodNumber>;
|
|
395
|
+
trackedDeviceIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
396
|
+
slot: z.ZodLiteral<"linked-devices">;
|
|
397
|
+
}, z.core.$strip>], "slot">;
|
|
398
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
399
|
+
applied: z.ZodLiteral<true>;
|
|
400
|
+
reload: z.ZodEnum<{
|
|
401
|
+
none: "none";
|
|
402
|
+
host: "host";
|
|
403
|
+
parent: "parent";
|
|
404
|
+
}>;
|
|
405
|
+
}, z.core.$strip>, "mutation">;
|
|
406
|
+
};
|
|
407
|
+
};
|
|
408
|
+
export type IDeviceExtensionProvider = InferProvider<typeof deviceExtensionCapability>;
|
|
@@ -125,6 +125,46 @@ export declare const LinkedDeviceSchema: z.ZodObject<{
|
|
|
125
125
|
producesTrackedEvents: z.ZodOptional<z.ZodBoolean>;
|
|
126
126
|
}, z.core.$strip>;
|
|
127
127
|
export type LinkedDevice = z.infer<typeof LinkedDeviceSchema>;
|
|
128
|
+
/**
|
|
129
|
+
* The `linked-devices` extension slot's editable value (D648): the operator's
|
|
130
|
+
* pick list, exactly what `_linkedDeviceIds` persists. Tree children are NOT
|
|
131
|
+
* in it — they are always linked and are not a pick.
|
|
132
|
+
*
|
|
133
|
+
* `trackedDeviceIds` (D655) is the tracked-event opt-in, exactly what
|
|
134
|
+
* `_linkedDeviceTrackedIds` persists: which linked devices materialize a
|
|
135
|
+
* synthetic tracked event on the camera. A read always carries it AS STORED
|
|
136
|
+
* (an absent key reads as `[]`, which is what the resolver makes of it —
|
|
137
|
+
* NONE). On a write it is optional: absent leaves the opt-in untouched, so a
|
|
138
|
+
* card built before D655 cannot erase it by saving the pick list. A present
|
|
139
|
+
* list REPLACES the opt-in; each id must be a pick, a device the camera links
|
|
140
|
+
* by structure (the row's `impliedSources`: tree children, a picked
|
|
141
|
+
* container's child) or already stored — so what was read can always be
|
|
142
|
+
* written back unchanged, and a NEW opt-in outside the linked set is refused.
|
|
143
|
+
*/
|
|
144
|
+
export declare const LinkedDevicesSlotValueSchema: z.ZodObject<{
|
|
145
|
+
deviceIds: z.ZodArray<z.ZodNumber>;
|
|
146
|
+
trackedDeviceIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
147
|
+
}, z.core.$strip>;
|
|
148
|
+
export type LinkedDevicesSlotValue = z.infer<typeof LinkedDevicesSlotValueSchema>;
|
|
149
|
+
/**
|
|
150
|
+
* The `linked-devices` slot — a camera's companion devices, owned by the
|
|
151
|
+
* device manager over `_linkedDeviceIds` (D648, D356). Any device may be a
|
|
152
|
+
* source except a container (its children are picked in its place) and the
|
|
153
|
+
* camera itself.
|
|
154
|
+
*/
|
|
155
|
+
export declare const LINKED_DEVICES_SLOT: {
|
|
156
|
+
readonly id: "linked-devices";
|
|
157
|
+
readonly label: "Linked devices";
|
|
158
|
+
readonly description: string;
|
|
159
|
+
readonly shape: "association";
|
|
160
|
+
readonly hostDeviceTypes: readonly [DeviceType.Camera];
|
|
161
|
+
readonly sourceCaps: "any";
|
|
162
|
+
readonly cardinality: "many";
|
|
163
|
+
readonly value: z.ZodObject<{
|
|
164
|
+
deviceIds: z.ZodArray<z.ZodNumber>;
|
|
165
|
+
trackedDeviceIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
166
|
+
}, z.core.$strip>;
|
|
167
|
+
};
|
|
128
168
|
/** One camera's resolved linked set, tagged with the camera it belongs to.
|
|
129
169
|
* The batch answer needs the tag; the single-device answer already has it
|
|
130
170
|
* from the input, which is why `getLinkedDevices` keeps the untagged shape. */
|
|
@@ -309,7 +349,19 @@ export declare const deviceManagerCapability: {
|
|
|
309
349
|
readonly name: "device-manager";
|
|
310
350
|
readonly scope: "system";
|
|
311
351
|
readonly mode: "singleton";
|
|
312
|
-
readonly
|
|
352
|
+
readonly extensionSlots: readonly [{
|
|
353
|
+
readonly id: "linked-devices";
|
|
354
|
+
readonly label: "Linked devices";
|
|
355
|
+
readonly description: string;
|
|
356
|
+
readonly shape: "association";
|
|
357
|
+
readonly hostDeviceTypes: readonly [DeviceType.Camera];
|
|
358
|
+
readonly sourceCaps: "any";
|
|
359
|
+
readonly cardinality: "many";
|
|
360
|
+
readonly value: z.ZodObject<{
|
|
361
|
+
deviceIds: z.ZodArray<z.ZodNumber>;
|
|
362
|
+
trackedDeviceIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
363
|
+
}, z.core.$strip>;
|
|
364
|
+
}];
|
|
313
365
|
readonly methods: {
|
|
314
366
|
/** Reserve (or re-resolve) a progressive numeric id for `(addonId, stableId)`.
|
|
315
367
|
* Idempotent: returns the existing id if one is already persisted for the
|
|
@@ -1134,11 +1186,12 @@ export declare const deviceManagerCapability: {
|
|
|
1134
1186
|
/**
|
|
1135
1187
|
* Resolve the devices LINKED to a camera — the single policy authority
|
|
1136
1188
|
* both consumers call (viewer devices panel + pipeline-analytics event
|
|
1137
|
-
* kinds/ingest). Device-tree children are ALWAYS included
|
|
1138
|
-
*
|
|
1139
|
-
*
|
|
1140
|
-
* camera itself; deduped.
|
|
1141
|
-
*
|
|
1189
|
+
* kinds/ingest). Device-tree children are ALWAYS included, plus the
|
|
1190
|
+
* operator's persisted pick list (`mode` is always `manual` since D356:
|
|
1191
|
+
* same-location devices are suggested by the picker, never linked on
|
|
1192
|
+
* their own). Excludes the camera itself; deduped. The list is written by
|
|
1193
|
+
* the `linked-devices` extension slot over `_linkedDeviceIds` (see the
|
|
1194
|
+
* module docblock).
|
|
1142
1195
|
*/
|
|
1143
1196
|
readonly getLinkedDevices: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
1144
1197
|
deviceId: z.ZodNumber;
|