@camstack/types 1.1.3 → 1.1.4
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 +11 -3
- package/dist/addon.js +1 -1
- package/dist/addon.mjs +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/interfaces/addon.d.ts +9 -2
- package/dist/{sleep-DQ586nj1.js → sleep-C9nrFlOu.js} +16 -7
- package/dist/{sleep-BV7rLc6Y.mjs → sleep-_J5S7OEP.mjs} +16 -7
- package/package.json +1 -1
|
@@ -229,9 +229,17 @@ export declare abstract class BaseAddon<TConfig extends object = Record<string,
|
|
|
229
229
|
*/
|
|
230
230
|
private emitReadinessForProviders;
|
|
231
231
|
/**
|
|
232
|
-
* Resolve the shared models directory
|
|
233
|
-
*
|
|
234
|
-
*
|
|
232
|
+
* Resolve the shared, node-local models directory: `<nodeDataDir>/models`.
|
|
233
|
+
*
|
|
234
|
+
* This is the SINGLE centralized models-dir resolver for every inference addon
|
|
235
|
+
* (detection-pipeline, audio-analyzer, embedding-encoder, model-studio). It is
|
|
236
|
+
* anchored at the node's own writable data root (`ctx.nodeDataDir`, i.e.
|
|
237
|
+
* `CAMSTACK_DATA` ?? the kernel boot dir) — never the hub-singleton `storage`
|
|
238
|
+
* cap, which returns the hub's `/data/models` to every node and breaks any node
|
|
239
|
+
* whose real data dir differs (e.g. the macOS electron agent).
|
|
240
|
+
*
|
|
241
|
+
* `node:path`/`node:fs` are imported dynamically so the `@camstack/types` root
|
|
242
|
+
* barrel (re-exported into browser bundles) stays free of node builtins.
|
|
235
243
|
*/
|
|
236
244
|
protected resolveModelsDir(): Promise<string>;
|
|
237
245
|
/**
|
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-C9nrFlOu.js");
|
|
3
3
|
const require_err_msg = require("./err-msg-COpsHMw2.js");
|
|
4
4
|
exports.BaseAddon = require_sleep.BaseAddon;
|
|
5
5
|
exports.DATAPLANE_SECRET_HEADER = require_sleep.DATAPLANE_SECRET_HEADER;
|
package/dist/addon.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as ReadinessTimeoutError, D as parseJsonUnknown, N as scopeKey, O as DATAPLANE_SECRET_HEADER, S as asJsonObject, a as adminUiCapability, at as BaseAddon, ht as DisposerChain, i as deviceOpsCapability, k as ReadinessRegistry, lt as emitReadiness, mt as EventCategory, o as createDeviceProxy, ot as normalizeAddonInitResult, p as expandCapMethods, t as sleep, w as asString, y as DeviceType } from "./sleep-
|
|
1
|
+
import { A as ReadinessTimeoutError, D as parseJsonUnknown, N as scopeKey, O as DATAPLANE_SECRET_HEADER, S as asJsonObject, a as adminUiCapability, at as BaseAddon, ht as DisposerChain, i as deviceOpsCapability, k as ReadinessRegistry, lt as emitReadiness, mt as EventCategory, o as createDeviceProxy, ot as normalizeAddonInitResult, p as expandCapMethods, t as sleep, w as asString, y as DeviceType } from "./sleep-_J5S7OEP.mjs";
|
|
2
2
|
import { t as errMsg } from "./err-msg-IQTHeDzc.mjs";
|
|
3
3
|
export { BaseAddon, DATAPLANE_SECRET_HEADER, DeviceType, DisposerChain, EventCategory, ReadinessRegistry, ReadinessTimeoutError, adminUiCapability, asJsonObject, asString, createDeviceProxy, deviceOpsCapability, emitReadiness, errMsg, expandCapMethods, normalizeAddonInitResult, parseJsonUnknown, scopeKey, sleep };
|
package/dist/index.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-C9nrFlOu.js");
|
|
3
3
|
const require_err_msg = require("./err-msg-COpsHMw2.js");
|
|
4
4
|
let zod = require("zod");
|
|
5
5
|
//#region src/health/wiring-health.ts
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as SubscribeFramesInputSchema, A as ReadinessTimeoutError, B as CameraStreamSchema, C as asNumber, D as parseJsonUnknown, E as parseJsonObject, F as BrokerStatusSchema, G as FrameHandleSchema, H as DecodedFrameSchema, I as CAM_PROFILE_ORDER, J as ProfileSlotStatusSchema, K as ProfileRtspEntrySchema, L as CamProfileSchema, M as readinessKey, N as scopeKey, O as DATAPLANE_SECRET_HEADER, P as BrokerStatsSchema, Q as SubscribeAudioChunksResultSchema, R as CamStreamKindSchema, S as asJsonObject, T as parseJsonArray, U as EncodedPacketSchema, V as DecodedAudioChunkSchema, W as FrameHandleFormatSchema, X as StreamSourceSchema, Y as StreamSourceEntrySchema, Z as SubscribeAudioChunksInputSchema, _ as DeviceFeature, a as adminUiCapability, at as BaseAddon, b as asBoolean, c as createMirrorSource, ct as createEvent, d as DEVICE_STATUS_METHOD, dt as WELL_KNOWN_TABS, et as SubscribeFramesResultSchema, f as event, ft as WELL_KNOWN_TAB_MAP, g as ChargingStatus, h as method, ht as DisposerChain, i as deviceOpsCapability, it as selectAssignedProfileSlots, j as emitDownForOwnedCaps, k as ReadinessRegistry, l as createSliceHandle, lt as emitReadiness, m as isDeviceConfigCap, mt as EventCategory, n as sleepCancellable, nt as makeSourceBrokerId, o as createDeviceProxy, ot as normalizeAddonInitResult, p as expandCapMethods, pt as hydrateSchema, q as ProfileSlotSchema, r as RawStateResultSchema, rt as parseProfileBrokerId, s as createLazyTrpcSource, st as createDurableState, t as sleep, tt as makeProfileBrokerId, u as DEVICE_SETTINGS_CONTRIBUTION_METHODS, ut as isEvent, v as DeviceRole, w as asString, x as asJsonArray, y as DeviceType, z as CamStreamResolutionSchema } from "./sleep-
|
|
1
|
+
import { $ as SubscribeFramesInputSchema, A as ReadinessTimeoutError, B as CameraStreamSchema, C as asNumber, D as parseJsonUnknown, E as parseJsonObject, F as BrokerStatusSchema, G as FrameHandleSchema, H as DecodedFrameSchema, I as CAM_PROFILE_ORDER, J as ProfileSlotStatusSchema, K as ProfileRtspEntrySchema, L as CamProfileSchema, M as readinessKey, N as scopeKey, O as DATAPLANE_SECRET_HEADER, P as BrokerStatsSchema, Q as SubscribeAudioChunksResultSchema, R as CamStreamKindSchema, S as asJsonObject, T as parseJsonArray, U as EncodedPacketSchema, V as DecodedAudioChunkSchema, W as FrameHandleFormatSchema, X as StreamSourceSchema, Y as StreamSourceEntrySchema, Z as SubscribeAudioChunksInputSchema, _ as DeviceFeature, a as adminUiCapability, at as BaseAddon, b as asBoolean, c as createMirrorSource, ct as createEvent, d as DEVICE_STATUS_METHOD, dt as WELL_KNOWN_TABS, et as SubscribeFramesResultSchema, f as event, ft as WELL_KNOWN_TAB_MAP, g as ChargingStatus, h as method, ht as DisposerChain, i as deviceOpsCapability, it as selectAssignedProfileSlots, j as emitDownForOwnedCaps, k as ReadinessRegistry, l as createSliceHandle, lt as emitReadiness, m as isDeviceConfigCap, mt as EventCategory, n as sleepCancellable, nt as makeSourceBrokerId, o as createDeviceProxy, ot as normalizeAddonInitResult, p as expandCapMethods, pt as hydrateSchema, q as ProfileSlotSchema, r as RawStateResultSchema, rt as parseProfileBrokerId, s as createLazyTrpcSource, st as createDurableState, t as sleep, tt as makeProfileBrokerId, u as DEVICE_SETTINGS_CONTRIBUTION_METHODS, ut as isEvent, v as DeviceRole, w as asString, x as asJsonArray, y as DeviceType, z as CamStreamResolutionSchema } from "./sleep-_J5S7OEP.mjs";
|
|
2
2
|
import { t as errMsg } from "./err-msg-IQTHeDzc.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/health/wiring-health.ts
|
|
@@ -395,10 +395,17 @@ export interface AddonContext<TConfig = Record<string, unknown>> {
|
|
|
395
395
|
readonly addonConfig: Readonly<TConfig>;
|
|
396
396
|
/**
|
|
397
397
|
* Private data directory for this addon.
|
|
398
|
-
*
|
|
399
|
-
* The addon owns this directory exclusively.
|
|
398
|
+
* `<nodeDataDir>/addons-data/{addonId}` — the addon owns it exclusively.
|
|
400
399
|
*/
|
|
401
400
|
readonly dataDir: string;
|
|
401
|
+
/**
|
|
402
|
+
* Node-local data ROOT for this node (`CAMSTACK_DATA` ?? the kernel boot dir).
|
|
403
|
+
* The single, centralized anchor for internal per-node working directories
|
|
404
|
+
* (models, logs, addons-data). Always writable on the local node — unlike the
|
|
405
|
+
* hub-singleton `storage` cap, which returns the hub's path to every node.
|
|
406
|
+
* Use this (never `api.storage.resolve`) for internal node-local dirs.
|
|
407
|
+
*/
|
|
408
|
+
readonly nodeDataDir: string;
|
|
402
409
|
/** Infrastructure services provided by the kernel. */
|
|
403
410
|
readonly kernel: IKernelServices;
|
|
404
411
|
/**
|
|
@@ -1211,15 +1211,24 @@ var BaseAddon = class {
|
|
|
1211
1211
|
} catch {}
|
|
1212
1212
|
}
|
|
1213
1213
|
/**
|
|
1214
|
-
* Resolve the shared models directory
|
|
1215
|
-
*
|
|
1216
|
-
*
|
|
1214
|
+
* Resolve the shared, node-local models directory: `<nodeDataDir>/models`.
|
|
1215
|
+
*
|
|
1216
|
+
* This is the SINGLE centralized models-dir resolver for every inference addon
|
|
1217
|
+
* (detection-pipeline, audio-analyzer, embedding-encoder, model-studio). It is
|
|
1218
|
+
* anchored at the node's own writable data root (`ctx.nodeDataDir`, i.e.
|
|
1219
|
+
* `CAMSTACK_DATA` ?? the kernel boot dir) — never the hub-singleton `storage`
|
|
1220
|
+
* cap, which returns the hub's `/data/models` to every node and breaks any node
|
|
1221
|
+
* whose real data dir differs (e.g. the macOS electron agent).
|
|
1222
|
+
*
|
|
1223
|
+
* `node:path`/`node:fs` are imported dynamically so the `@camstack/types` root
|
|
1224
|
+
* barrel (re-exported into browser bundles) stays free of node builtins.
|
|
1217
1225
|
*/
|
|
1218
1226
|
async resolveModelsDir() {
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1227
|
+
const { join } = await import("node:path");
|
|
1228
|
+
const { promises: fsp } = await import("node:fs");
|
|
1229
|
+
const dir = join(this.ctx.nodeDataDir, "models");
|
|
1230
|
+
await fsp.mkdir(dir, { recursive: true });
|
|
1231
|
+
return dir;
|
|
1223
1232
|
}
|
|
1224
1233
|
/**
|
|
1225
1234
|
* Access the runtime capability registry for in-process provider lookups.
|
|
@@ -1211,15 +1211,24 @@ var BaseAddon = class {
|
|
|
1211
1211
|
} catch {}
|
|
1212
1212
|
}
|
|
1213
1213
|
/**
|
|
1214
|
-
* Resolve the shared models directory
|
|
1215
|
-
*
|
|
1216
|
-
*
|
|
1214
|
+
* Resolve the shared, node-local models directory: `<nodeDataDir>/models`.
|
|
1215
|
+
*
|
|
1216
|
+
* This is the SINGLE centralized models-dir resolver for every inference addon
|
|
1217
|
+
* (detection-pipeline, audio-analyzer, embedding-encoder, model-studio). It is
|
|
1218
|
+
* anchored at the node's own writable data root (`ctx.nodeDataDir`, i.e.
|
|
1219
|
+
* `CAMSTACK_DATA` ?? the kernel boot dir) — never the hub-singleton `storage`
|
|
1220
|
+
* cap, which returns the hub's `/data/models` to every node and breaks any node
|
|
1221
|
+
* whose real data dir differs (e.g. the macOS electron agent).
|
|
1222
|
+
*
|
|
1223
|
+
* `node:path`/`node:fs` are imported dynamically so the `@camstack/types` root
|
|
1224
|
+
* barrel (re-exported into browser bundles) stays free of node builtins.
|
|
1217
1225
|
*/
|
|
1218
1226
|
async resolveModelsDir() {
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1227
|
+
const { join } = await import("node:path");
|
|
1228
|
+
const { promises: fsp } = await import("node:fs");
|
|
1229
|
+
const dir = join(this.ctx.nodeDataDir, "models");
|
|
1230
|
+
await fsp.mkdir(dir, { recursive: true });
|
|
1231
|
+
return dir;
|
|
1223
1232
|
}
|
|
1224
1233
|
/**
|
|
1225
1234
|
* Access the runtime capability registry for in-process provider lookups.
|