@camstack/types 1.2.355 → 1.2.356

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.
@@ -812,6 +812,28 @@ var FFMPEG_ARTIFACTS = {
812
812
  sha256: "021cd321ea169722cd2e4aca35884305449666a0d231d3378af7f87d6a5626e5",
813
813
  sizeBytes: 37852180,
814
814
  expectedHwaccels: ["videotoolbox"]
815
+ },
816
+ /**
817
+ * Windows x64 — the same jellyfin-ffmpeg release, GPL, from the project's
818
+ * own `win64-clang-gpl` leg (a flat zip: `ffmpeg.exe` + `ffprobe.exe`,
819
+ * statically linked, so nothing to install beside it). Hashed 2026-10-13.
820
+ *
821
+ * NOT executed: it was verified by reading the build's own configuration
822
+ * string out of the binary (`--enable-gpl --enable-version3 --enable-dxva2
823
+ * --enable-d3d11va --enable-d3d12va --enable-amf --enable-libvpl
824
+ * --enable-nvenc --enable-vulkan --enable-opencl`), which is the same
825
+ * codec/feature set as the linux build plus the Windows hwaccel API family.
826
+ * `expectedHwaccels` claims only what that string guarantees; the first real
827
+ * Windows node confirms it or trips the assertion, which is what it is for.
828
+ * AMF/NVENC/QSV are encoders and vendor runtimes (they need the GPU driver),
829
+ * so they are not claimed here.
830
+ */
831
+ "win32-x64": {
832
+ url: `${BASE}/jellyfin-ffmpeg_${FFMPEG_RELEASE}_portable_win64-clang-gpl.zip`,
833
+ archiveFormat: "zip",
834
+ sha256: "4bb79f3d1e4092404eafe3fb3b0101e196f8eb00355201f60314e5ba21447b82",
835
+ sizeBytes: 67819203,
836
+ expectedHwaccels: ["d3d11va", "dxva2"]
815
837
  }
816
838
  };
817
839
  /** The artifact for this node, or a refusal naming what was asked for. */
@@ -812,6 +812,28 @@ var FFMPEG_ARTIFACTS = {
812
812
  sha256: "021cd321ea169722cd2e4aca35884305449666a0d231d3378af7f87d6a5626e5",
813
813
  sizeBytes: 37852180,
814
814
  expectedHwaccels: ["videotoolbox"]
815
+ },
816
+ /**
817
+ * Windows x64 — the same jellyfin-ffmpeg release, GPL, from the project's
818
+ * own `win64-clang-gpl` leg (a flat zip: `ffmpeg.exe` + `ffprobe.exe`,
819
+ * statically linked, so nothing to install beside it). Hashed 2026-10-13.
820
+ *
821
+ * NOT executed: it was verified by reading the build's own configuration
822
+ * string out of the binary (`--enable-gpl --enable-version3 --enable-dxva2
823
+ * --enable-d3d11va --enable-d3d12va --enable-amf --enable-libvpl
824
+ * --enable-nvenc --enable-vulkan --enable-opencl`), which is the same
825
+ * codec/feature set as the linux build plus the Windows hwaccel API family.
826
+ * `expectedHwaccels` claims only what that string guarantees; the first real
827
+ * Windows node confirms it or trips the assertion, which is what it is for.
828
+ * AMF/NVENC/QSV are encoders and vendor runtimes (they need the GPU driver),
829
+ * so they are not claimed here.
830
+ */
831
+ "win32-x64": {
832
+ url: `${BASE}/jellyfin-ffmpeg_${FFMPEG_RELEASE}_portable_win64-clang-gpl.zip`,
833
+ archiveFormat: "zip",
834
+ sha256: "4bb79f3d1e4092404eafe3fb3b0101e196f8eb00355201f60314e5ba21447b82",
835
+ sizeBytes: 67819203,
836
+ expectedHwaccels: ["d3d11va", "dxva2"]
815
837
  }
816
838
  };
817
839
  /** The artifact for this node, or a refusal naming what was asked for. */
@@ -0,0 +1,11 @@
1
+ export type ArchiveFormat = 'zip' | 'tar.gz' | 'tar.xz';
2
+ export type ExecFile = (file: string, args: readonly string[]) => unknown;
3
+ export interface ExtractDeps {
4
+ readonly platform: NodeJS.Platform;
5
+ readonly systemRoot: string | undefined;
6
+ readonly exec: ExecFile;
7
+ readonly extractZip: (archivePath: string, destDir: string) => void;
8
+ }
9
+ /** The tar to run: Windows' own bsdtar by absolute path, `tar` elsewhere. */
10
+ export declare function tarExecutable(platform: NodeJS.Platform, systemRoot: string | undefined): string;
11
+ export declare function extractArchive(archivePath: string, format: ArchiveFormat, destDir: string, overrides?: Partial<ExtractDeps>): void;
@@ -37,6 +37,15 @@ export interface DownloadOptions {
37
37
  */
38
38
  readonly sha256?: string;
39
39
  }
40
+ /**
41
+ * Refuse an artifact that is not the one we pinned, and leave nothing behind.
42
+ *
43
+ * The failure is deliberately loud and terminal rather than a warning: a
44
+ * mismatch means the bytes are not what was verified, and "not what was
45
+ * verified" is the only state in which running this binary is worse than not
46
+ * having it. The partial file is removed so a retry cannot pick it up.
47
+ */
48
+ export declare function verifySha256(file: string, expected: string | undefined, name: string, url: string): void;
40
49
  /**
41
50
  * Download a binary to the target directory.
42
51
  * Handles archives (zip, tar.gz, tar.xz) and raw binaries.
@@ -1,6 +1,10 @@
1
1
  import type { IScopedLogger } from '../interfaces/logging.js';
2
2
  export declare const PYTHON_VERSION = "3.12.12";
3
3
  export declare function getPythonDownloadUrl(platform: string, arch: string): string;
4
+ /** The SHA-256 the archive for this platform/arch must have. */
5
+ export declare function getPythonSha256(platform: string, arch: string): string;
6
+ /** The interpreter's path relative to the install root. */
7
+ export declare function pythonInterpreterSegments(platform: string): readonly string[];
4
8
  /**
5
9
  * Ensure the embedded portable Python is available.
6
10
  *
@@ -0,0 +1 @@
1
+ export declare function extractZipArchive(archivePath: string, destDir: string): void;
@@ -11847,6 +11847,17 @@ export type AppRouter = TrpcCoreRouter<{
11847
11847
  };
11848
11848
  meta: object;
11849
11849
  }>;
11850
+ extendShareToken: import("@trpc/server/unstable-core-do-not-import").MutationProcedure<{
11851
+ input: {
11852
+ id: string;
11853
+ ttlSec: number;
11854
+ };
11855
+ output: {
11856
+ id: string;
11857
+ expiresAt: number;
11858
+ };
11859
+ meta: object;
11860
+ }>;
11850
11861
  revokeShareToken: import("@trpc/server/unstable-core-do-not-import").MutationProcedure<{
11851
11862
  input: {
11852
11863
  id: string;
@@ -12491,6 +12502,17 @@ export type AppRouter = TrpcCoreRouter<{
12491
12502
  };
12492
12503
  meta: object;
12493
12504
  }>;
12505
+ extendShareToken: import("@trpc/server/unstable-core-do-not-import").MutationProcedure<{
12506
+ input: {
12507
+ id: string;
12508
+ ttlSec: number;
12509
+ };
12510
+ output: {
12511
+ id: string;
12512
+ expiresAt: number;
12513
+ };
12514
+ meta: object;
12515
+ }>;
12494
12516
  revokeShareToken: import("@trpc/server/unstable-core-do-not-import").MutationProcedure<{
12495
12517
  input: {
12496
12518
  id: string;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * AUTO-GENERATED by scripts/generate-addon-cap-facts.ts — DO NOT EDIT.
3
+ *
4
+ * Schema-free capability facts for addon server code, so an addon never imports
5
+ * `ALL_CAPABILITY_DEFINITIONS` (the whole Zod schema graph, ~+100 MB heap per
6
+ * runner). See docs/decisions/adr-0028.md.
7
+ *
8
+ * Coverage: 1 advance-derived caps, 71 caps with 340 state leaves.
9
+ */
10
+ /** A bindable scalar in a capability's runtime state. */
11
+ export interface CapStateLeaf {
12
+ /** Dot path inside the cap's state slice. */
13
+ readonly path: string;
14
+ readonly valueType: 'number' | 'boolean' | 'string' | 'enum';
15
+ readonly enumValues?: readonly string[];
16
+ }
17
+ /** cap name -> the numeric state field whose strict advance IS the cap's one-shot event. */
18
+ export declare const CAP_ADVANCE_FIELDS: Readonly<Record<string, string>>;
19
+ /** cap name -> the bindable leaves of its runtime state (absent: none). */
20
+ export declare const CAP_STATE_LEAVES: Readonly<Record<string, readonly CapStateLeaf[]>>;
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_sleep = require("./sleep-BxOWTkUD.js");
2
+ const require_sleep = require("./sleep-BFVY4_xY.js");
3
3
  const require_event_category = require("./event-category-T43rdQWR.js");
4
- const require_composition = require("./composition-BLWAivB2.js");
4
+ const require_composition = require("./composition-DCYnv4I6.js");
5
5
  const require_node_color = require("./node-color.js");
6
6
  const require_err_msg = require("./err-msg-Dx2Kor0g.js");
7
7
  const require_enums = require("./enums.js");
@@ -5852,14 +5852,6 @@ function describeRootSupplies(supplies) {
5852
5852
  }
5853
5853
  //#endregion
5854
5854
  //#region src/types/models.ts
5855
- var MODEL_FORMATS = [
5856
- "onnx",
5857
- "coreml",
5858
- "openvino",
5859
- "tflite",
5860
- "pt",
5861
- "gguf"
5862
- ];
5863
5855
  /**
5864
5856
  * Multi-file format payload.
5865
5857
  *
@@ -6296,7 +6288,7 @@ var ModelConvertMetadataSchema = zod.z.object({
6296
6288
  classMap: DetectionCatalogClassMapSchema.optional()
6297
6289
  });
6298
6290
  var ConvertArtifactSchema = zod.z.object({
6299
- format: zod.z.enum(MODEL_FORMATS),
6291
+ format: zod.z.enum(require_sleep.MODEL_FORMATS),
6300
6292
  precision: zod.z.enum(["fp16", "int8"]).optional(),
6301
6293
  sizeMB: zod.z.number(),
6302
6294
  validated: zod.z.boolean(),
@@ -12306,7 +12298,7 @@ var ImportModelBundleResultSchema = zod.z.discriminatedUnion("kind", [zod.z.obje
12306
12298
  distributed: zod.z.array(zod.z.object({
12307
12299
  modelId: zod.z.string(),
12308
12300
  nodeId: zod.z.string(),
12309
- format: zod.z.enum(MODEL_FORMATS),
12301
+ format: zod.z.enum(require_sleep.MODEL_FORMATS),
12310
12302
  ok: zod.z.boolean(),
12311
12303
  error: zod.z.string().optional()
12312
12304
  })).readonly()
@@ -18860,7 +18852,7 @@ var modelConvertCapability = {
18860
18852
  var ModelDistributeInputSchema = zod.z.object({
18861
18853
  targetNodeId: zod.z.string(),
18862
18854
  modelId: zod.z.string(),
18863
- format: zod.z.enum(MODEL_FORMATS),
18855
+ format: zod.z.enum(require_sleep.MODEL_FORMATS),
18864
18856
  entry: ModelCatalogEntrySchema
18865
18857
  });
18866
18858
  var ModelDistributeResultSchema = zod.z.object({
@@ -28530,7 +28522,7 @@ var pipelineExecutorCapability = {
28530
28522
  * (`recommend.ts`) are the TS face of the same data; these
28531
28523
  * schemas are what crosses the cap boundary.
28532
28524
  */
28533
- var ModelFormatSchema$1 = zod.z.enum(MODEL_FORMATS);
28525
+ var ModelFormatSchema$1 = zod.z.enum(require_sleep.MODEL_FORMATS);
28534
28526
  /** Default least number of parallel sessions per device Auto tune keeps (D755). */
28535
28527
  var DEFAULT_MIN_SESSIONS_PER_DEVICE = 2;
28536
28528
  /** The operator's range for it. */
@@ -31310,7 +31302,7 @@ var NodeInferenceDeviceSchema = zod.z.object({
31310
31302
  key: zod.z.string(),
31311
31303
  backend: zod.z.string(),
31312
31304
  device: zod.z.string(),
31313
- format: zod.z.enum(MODEL_FORMATS),
31305
+ format: zod.z.enum(require_sleep.MODEL_FORMATS),
31314
31306
  /** Whether the node's live probe reports the device as usable right now. */
31315
31307
  available: zod.z.boolean(),
31316
31308
  /**
@@ -43665,7 +43657,7 @@ includeCrops: zod.z.boolean().optional() }).optional(), zod.z.array(VehicleSchem
43665
43657
  };
43666
43658
  //#endregion
43667
43659
  //#region src/capabilities/platform-probe.cap.ts
43668
- var ModelFormatSchema = zod.z.enum(MODEL_FORMATS);
43660
+ var ModelFormatSchema = zod.z.enum(require_sleep.MODEL_FORMATS);
43669
43661
  var HwAccelBackendInputSchema = zod.z.enum([
43670
43662
  "videotoolbox",
43671
43663
  "cuda",
@@ -51830,65 +51822,6 @@ function stateVocabularyFor(runtimeState, alarmStates = []) {
51830
51822
  return [];
51831
51823
  }
51832
51824
  //#endregion
51833
- //#region src/constants.ts
51834
- var HF_REPO = "camstack/camstack-models";
51835
- var HF_BASE_URL = `https://huggingface.co/${HF_REPO}/resolve/main`;
51836
- /**
51837
- * The ONE default session-JWT lifetime.
51838
- *
51839
- * There used to be three, and they disagreed: the `system-config` schema said
51840
- * `30d`, `RUNTIME_DEFAULTS['auth.tokenExpiry']` said `7d`, and
51841
- * `AuthManager.signToken` hardcoded `30d` as its own fallback. Because the
51842
- * production signer (`AuthService extends AuthManager`, wired to
51843
- * `ConfigManager`) resolves through `RUNTIME_DEFAULTS` BEFORE it can ever
51844
- * reach the hardcoded fallback, the value actually in force was `7d` while
51845
- * every surface an operator could read advertised `30d`.
51846
- *
51847
- * `30d` is the value the product documents and the one an operator decided on
51848
- * (2026-07-17: the viewer's silent refresh rotates tokens long before expiry,
51849
- * so a long lifetime only covers devices left unopened for weeks). It is
51850
- * declared here once and imported by the schema, by the runtime defaults and
51851
- * by the signer's fallback — a second default that disagrees with the first is
51852
- * the same defect in miniature.
51853
- */
51854
- var DEFAULT_TOKEN_EXPIRY = "30d";
51855
- /**
51856
- * Runtime defaults -- used by ConfigManager.get() for backward compatibility
51857
- * until Plan B wires all runtime settings to the system_settings SQL table.
51858
- *
51859
- * Moved from @camstack/system/config-schema to @camstack/types so that
51860
- * @camstack/system can reference it without a cross-package kernel import.
51861
- */
51862
- var RUNTIME_DEFAULTS = {
51863
- "features.streaming": true,
51864
- "features.notifications": true,
51865
- "features.objectDetection": false,
51866
- "features.remoteAccess": true,
51867
- "features.agentCluster": false,
51868
- "features.smartHome": true,
51869
- "features.recordings": true,
51870
- "features.backup": true,
51871
- "features.repl": true,
51872
- "retention.detectionEventsDays": 30,
51873
- "retention.audioLevelsDays": 7,
51874
- "logging.level": "info",
51875
- "logging.retentionDays": 30,
51876
- "eventBus.ringBufferSize": 1e4,
51877
- "storage.provider": "sqlite-storage",
51878
- "storage.locations": {
51879
- data: "camstack-data/data",
51880
- media: "camstack-data/media",
51881
- recordings: "camstack-data/recordings",
51882
- cache: "/tmp/camstack-cache",
51883
- logs: "camstack-data/logs",
51884
- models: "camstack-data/models"
51885
- },
51886
- providers: [],
51887
- "ffmpeg.hwAccel": "auto",
51888
- "ffmpeg.threadCount": 0,
51889
- "auth.tokenExpiry": "30d"
51890
- };
51891
- //#endregion
51892
51825
  //#region src/device/accessory.ts
51893
51826
  /**
51894
51827
  * Accessory device helpers — shared across drivers.
@@ -78347,11 +78280,6 @@ function setNestedValue(obj, path, value) {
78347
78280
  current[parts[parts.length - 1]] = value;
78348
78281
  }
78349
78282
  //#endregion
78350
- //#region src/utils/hf-url.ts
78351
- function hfModelUrl(repo, path) {
78352
- return `https://huggingface.co/${repo}/resolve/main/${path}`;
78353
- }
78354
- //#endregion
78355
78283
  //#region src/utils/pool-memory-watchdog.ts
78356
78284
  var MB = 1024 * 1024;
78357
78285
  var DEFAULT_POOL_MEMORY_POLICY = {
@@ -79061,7 +78989,7 @@ var RUNTIMES = [
79061
78989
  value: "cuda",
79062
78990
  label: "CUDA"
79063
78991
  });
79064
- if (hw.gpu?.type === "amd") out.push({
78992
+ if (hw.gpu?.type === "amd" && hw.platform === "linux") out.push({
79065
78993
  value: "webgpu",
79066
78994
  label: "WebGPU (AMD iGPU)"
79067
78995
  });
@@ -79198,7 +79126,7 @@ function scoreRuntimes(hw) {
79198
79126
  });
79199
79127
  }
79200
79128
  if (hw.gpu?.type === "amd") {
79201
- scores.push({
79129
+ if (hw.platform === "linux") scores.push({
79202
79130
  runtime: "python",
79203
79131
  backend: "onnx",
79204
79132
  format: "onnx",
@@ -79695,7 +79623,7 @@ exports.DEFAULT_RUNTIME_STATE_DURABILITY = require_sleep.DEFAULT_RUNTIME_STATE_D
79695
79623
  exports.DEFAULT_SESSION_PLACEMENT_POLICY = DEFAULT_SESSION_PLACEMENT_POLICY;
79696
79624
  exports.DEFAULT_SHARE_SOURCE = DEFAULT_SHARE_SOURCE;
79697
79625
  exports.DEFAULT_TIMELAPSE_PREVIEW_TEXT = DEFAULT_TIMELAPSE_PREVIEW_TEXT;
79698
- exports.DEFAULT_TOKEN_EXPIRY = DEFAULT_TOKEN_EXPIRY;
79626
+ exports.DEFAULT_TOKEN_EXPIRY = require_sleep.DEFAULT_TOKEN_EXPIRY;
79699
79627
  exports.DERIVED_CAMERA_SILENCED_CAP_NAMES = DERIVED_CAMERA_SILENCED_CAP_NAMES;
79700
79628
  exports.DETAIL_CROP_PADDING_FIELD = DETAIL_CROP_PADDING_FIELD;
79701
79629
  exports.DETAIL_CROP_PADDING_KEY = DETAIL_CROP_PADDING_KEY;
@@ -79902,8 +79830,8 @@ exports.HAP_AUDIO_BASE = HAP_AUDIO_BASE;
79902
79830
  exports.HAP_AUDIO_BITRATE_KBPS = HAP_AUDIO_BITRATE_KBPS;
79903
79831
  exports.HAP_AUDIO_VBV_KBITS = HAP_AUDIO_VBV_KBITS;
79904
79832
  exports.HAP_KEYFRAME_INTERVAL_SEC = HAP_KEYFRAME_INTERVAL_SEC;
79905
- exports.HF_BASE_URL = HF_BASE_URL;
79906
- exports.HF_REPO = HF_REPO;
79833
+ exports.HF_BASE_URL = require_sleep.HF_BASE_URL;
79834
+ exports.HF_REPO = require_sleep.HF_REPO;
79907
79835
  exports.HOURS_PER_DAY = HOURS_PER_DAY;
79908
79836
  exports.HUB_ADDRESS_ROLES = HUB_ADDRESS_ROLES;
79909
79837
  exports.HUB_MDNS_QUERY_NAME = HUB_MDNS_QUERY_NAME;
@@ -80079,7 +80007,7 @@ exports.METHOD_DEVICE_SELECTORS = METHOD_DEVICE_SELECTORS;
80079
80007
  exports.MINUTES_PER_DAY = MINUTES_PER_DAY;
80080
80008
  exports.MIN_SCRUBBED_LENGTH = require_sleep.MIN_SCRUBBED_LENGTH;
80081
80009
  exports.MIN_SESSIONS_PER_DEVICE_RANGE = MIN_SESSIONS_PER_DEVICE_RANGE;
80082
- exports.MODEL_FORMATS = MODEL_FORMATS;
80010
+ exports.MODEL_FORMATS = require_sleep.MODEL_FORMATS;
80083
80011
  exports.MODEL_HOSTING = MODEL_HOSTING;
80084
80012
  exports.MODEL_PROVIDER_IDS = MODEL_PROVIDER_IDS;
80085
80013
  exports.MOTION_CLOSE_AFTER_MS = MOTION_CLOSE_AFTER_MS;
@@ -80548,7 +80476,7 @@ exports.ROOT_CHILD_CONTAINMENT_MIN = ROOT_CHILD_CONTAINMENT_MIN;
80548
80476
  exports.ROOT_FACE_REFINE_INPUT_PX = ROOT_FACE_REFINE_INPUT_PX;
80549
80477
  exports.ROOT_FACE_REFINE_SCALE = ROOT_FACE_REFINE_SCALE;
80550
80478
  exports.ROOT_SUPPLIABLE_STEP_IDS = ROOT_SUPPLIABLE_STEP_IDS;
80551
- exports.RUNTIME_DEFAULTS = RUNTIME_DEFAULTS;
80479
+ exports.RUNTIME_DEFAULTS = require_sleep.RUNTIME_DEFAULTS;
80552
80480
  exports.RUNTIME_STATE_POLICY = RUNTIME_STATE_POLICY;
80553
80481
  exports.RUNTIME_STATE_REFRESH_MISS_COOLDOWN_MS = RUNTIME_STATE_REFRESH_MISS_COOLDOWN_MS;
80554
80482
  exports.RUNTIME_TO_FORMAT = RUNTIME_TO_FORMAT;
@@ -81318,7 +81246,7 @@ exports.globalSecretScope = require_sleep.globalSecretScope;
81318
81246
  exports.hasModelBoundOverrides = hasModelBoundOverrides;
81319
81247
  exports.hasMotionTrigger = hasMotionTrigger;
81320
81248
  exports.hasUrlScheme = hasUrlScheme;
81321
- exports.hfModelUrl = hfModelUrl;
81249
+ exports.hfModelUrl = require_sleep.hfModelUrl;
81322
81250
  exports.htmlToText = htmlToText;
81323
81251
  exports.hubAddressHostname = hubAddressHostname;
81324
81252
  exports.hubMotionNativeProvider = hubMotionNativeProvider;
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { $ as AudioStreamPickSchema, $t as isSecretRef, A as deviceCustomAction, An as isAudioChunkFormat, At as PEER_BYTES_CHUNK_BYTES, B as optionalMethod, Bt as mergeSecretStatePaths, C as RawStateResultSchema, Cn as collectSecretConfigKeys, Ct as MIN_SCRUBBED_LENGTH, D as customAction, Dn as AUDIO_CHUNK_FORMATS, Dt as registerKnownSecret, E as DEVICE_CHILDREN_BATCH_MAX, En as schemaDeclaresAnyField, Et as knownSecretCount, F as PROVIDER_PIN_FIELD, Ft as DATAPLANE_SECRET_HEADER, G as readNodePin, Gt as collectSecretMarkerRefs, H as systemMethod, Ht as secretTreeFromPaths, I as event, It as SHARE_VIEW_KINDS, J as ReadinessTimeoutError, Jt as SECRET_REF_SCHEME, K as toNodeId, Kt as resolveSecretMarkers, L as expandCapMethods, Lt as DisposerChain, M as DEFAULT_RUNTIME_STATE_DURABILITY, Mt as PEER_BYTES_STALL_MS, N as DEVICE_SETTINGS_CONTRIBUTION_METHODS, Nt as PEER_BYTES_TICKET_TTL_MS, O as defineCustomActions, On as audioChunkBytesPerSample, Ot as scrubKnownSecrets, P as DEVICE_STATUS_METHOD, Pt as PeerBytesTicketSchema, Q as AudioChunkFormatSchema, Qt as globalSecretScope, R as isDeviceConfigCap, Rt as BaseAddon, S as isZodSecret, Sn as collectKeychainStoredKeys, St as createSecretsAccess, T as viewerUiCapability, Tn as isSecretConfigField, Tt as forgetKnownSecret, U as CAP_NODE_PIN_CONTEXT_KEY, Ut as secretTreeFromSchema, V as resolveCapMount, Vt as parseSecretStatePath, W as nodePin, Wt as KeychainWriteRefusedError, X as readinessKey, Xt as buildSecretRef, Y as emitDownForOwnedCaps, Yt as arrayItemFieldPath, Z as scopeKey, Zt as formatSecretScope, _ as createLazyTrpcSource, _n as isSecretMarker, _t as makeSourceBrokerId, a as asJsonArray, an as emitReadiness, at as CamStreamResolutionSchema, b as SECRET_META, bn as toSecretFieldView, bt as resolveSecretViewsIn, c as asString, cn as WELL_KNOWN_TAB_MAP, ct as FrameHandleSchema, d as parseJsonUnknown, dn as hydrateSchema, dt as ProfileSlotStatusSchema, en as normalizeSecretOwner, et as BrokerStatsSchema, f as BOOT_RECOVERY_BACKOFF_MS, fn as resolveHydratedFieldValue, ft as StreamSourceEntrySchema, g as createEventBusSliceSource, gn as isSecretFieldView, gt as makeProfileBrokerId, h as createDeviceProxy, hn as isSecretClear, ht as SubscribeAudioChunksResultSchema, i as asBoolean, in as createEvent, it as CamStreamKindSchema, j as adminUiCapability, jt as PEER_BYTES_MAX_OUTSTANDING, k as describeCustomActions, kn as expandAudioChunkToF32le, kt as shortSecretRefHash, l as parseJsonArray, ln as collectHydratedFieldEntries, lt as ProfileRtspEntrySchema, m as isDeviceScopedCap, mn as classifySecretWrite, mt as SubscribeAudioChunksInputSchema, n as sleepCancellable, nn as normalizeNodeId, nt as CAM_PROFILE_ORDER, o as asJsonObject, on as isEvent, ot as CameraStreamSchema, p as DEVICE_SCOPED_CAPS, pn as SECRET_CLEAR, pt as StreamSourceSchema, q as ReadinessRegistry, qt as transformSecretWrite, r as maskUrlCredentials, rn as createDurableState, rt as CamProfileSchema, s as asNumber, sn as WELL_KNOWN_TABS, st as DecodedAudioChunkSchema, t as sleep, tn as parseSecretRef, tt as BrokerStatusSchema, u as parseJsonObject, un as collectHydratedFieldValues, ut as ProfileSlotSchema, v as createMirrorSource, vn as isSecretMarkerLike, vt as parseProfileBrokerId, w as deviceOpsCapability, wn as isKeychainStoredField, wt as clearKnownSecrets, x as collectZodSecretPaths, xn as REDACTED_SECRET, xt as REVALIDATE_AFTER_MS, y as createSliceHandle, yn as makeSecretMarker, yt as selectAssignedProfileSlots, z as method, zt as normalizeAddonInitResult } from "./sleep-BjDbnx6-.mjs";
1
+ import { $ as ReadinessRegistry, $t as transformSecretWrite, A as viewerUiCapability, An as isKeychainStoredField, At as clearKnownSecrets, B as PROVIDER_PIN_FIELD, Bt as PeerBytesTicketSchema, C as isZodSecret, Cn as isSecretMarker, Ct as makeSourceBrokerId, D as RUNTIME_DEFAULTS, Dn as REDACTED_SECRET, Dt as REVALIDATE_AFTER_MS, E as HF_REPO, En as toSecretFieldView, Et as resolveSecretViewsIn, F as deviceCustomAction, Fn as expandAudioChunkToF32le, Ft as shortSecretRefHash, G as optionalMethod, Gt as normalizeAddonInitResult, H as expandCapMethods, Ht as SHARE_VIEW_KINDS, I as adminUiCapability, In as isAudioChunkFormat, It as PEER_BYTES_CHUNK_BYTES, J as CAP_NODE_PIN_CONTEXT_KEY, Jt as secretTreeFromPaths, K as resolveCapMount, Kt as mergeSecretStatePaths, L as DEFAULT_RUNTIME_STATE_DURABILITY, Lt as PEER_BYTES_MAX_OUTSTANDING, M as customAction, Mn as schemaDeclaresAnyField, Mt as knownSecretCount, N as defineCustomActions, Nn as AUDIO_CHUNK_FORMATS, Nt as registerKnownSecret, O as RawStateResultSchema, On as collectKeychainStoredKeys, Ot as createSecretsAccess, P as describeCustomActions, Pn as audioChunkBytesPerSample, Pt as scrubKnownSecrets, Q as MODEL_FORMATS, Qt as resolveSecretMarkers, R as DEVICE_SETTINGS_CONTRIBUTION_METHODS, Rt as PEER_BYTES_STALL_MS, S as collectZodSecretPaths, Sn as isSecretFieldView, St as makeProfileBrokerId, T as HF_BASE_URL, Tn as makeSecretMarker, Tt as selectAssignedProfileSlots, U as isDeviceConfigCap, Ut as DisposerChain, V as event, Vt as DATAPLANE_SECRET_HEADER, W as method, Wt as BaseAddon, X as readNodePin, Xt as KeychainWriteRefusedError, Y as nodePin, Yt as secretTreeFromSchema, Z as toNodeId, Zt as collectSecretMarkerRefs, _ as createEventBusSliceSource, _n as hydrateSchema, _t as ProfileSlotStatusSchema, a as asJsonArray, an as isSecretRef, at as AudioStreamPickSchema, b as createSliceHandle, bn as classifySecretWrite, bt as SubscribeAudioChunksInputSchema, c as asString, cn as normalizeNodeId, ct as CAM_PROFILE_ORDER, d as parseJsonUnknown, dn as emitReadiness, dt as CamStreamResolutionSchema, en as SECRET_REF_SCHEME, et as ReadinessTimeoutError, f as hfModelUrl, fn as isEvent, ft as CameraStreamSchema, g as createDeviceProxy, gn as collectHydratedFieldValues, gt as ProfileSlotSchema, h as isDeviceScopedCap, hn as collectHydratedFieldEntries, ht as ProfileRtspEntrySchema, i as asBoolean, in as globalSecretScope, it as AudioChunkFormatSchema, j as DEVICE_CHILDREN_BATCH_MAX, jn as isSecretConfigField, jt as forgetKnownSecret, k as deviceOpsCapability, kn as collectSecretConfigKeys, kt as MIN_SCRUBBED_LENGTH, l as parseJsonArray, ln as createDurableState, lt as CamProfileSchema, m as DEVICE_SCOPED_CAPS, mn as WELL_KNOWN_TAB_MAP, mt as FrameHandleSchema, n as sleepCancellable, nn as buildSecretRef, nt as readinessKey, o as asJsonObject, on as normalizeSecretOwner, ot as BrokerStatsSchema, p as BOOT_RECOVERY_BACKOFF_MS, pn as WELL_KNOWN_TABS, pt as DecodedAudioChunkSchema, q as systemMethod, qt as parseSecretStatePath, r as maskUrlCredentials, rn as formatSecretScope, rt as scopeKey, s as asNumber, sn as parseSecretRef, st as BrokerStatusSchema, t as sleep, tn as arrayItemFieldPath, tt as emitDownForOwnedCaps, u as parseJsonObject, un as createEvent, ut as CamStreamKindSchema, v as createLazyTrpcSource, vn as resolveHydratedFieldValue, vt as StreamSourceEntrySchema, w as DEFAULT_TOKEN_EXPIRY, wn as isSecretMarkerLike, wt as parseProfileBrokerId, x as SECRET_META, xn as isSecretClear, xt as SubscribeAudioChunksResultSchema, y as createMirrorSource, yn as SECRET_CLEAR, yt as StreamSourceSchema, z as DEVICE_STATUS_METHOD, zt as PEER_BYTES_TICKET_TTL_MS } from "./sleep-vWTnHq9G.mjs";
2
2
  import { i as publicEventCategories, n as OWNER_ONLY_EVENT_CATEGORIES, r as isOwnerOnlyEventCategory, t as EventCategory } from "./event-category-C4hVnRo8.mjs";
3
- import { $ as MAX_EXPRESSION_AST_NODES, A as compositionFeatureEnabled, At as Fmp4BoxSplitter, B as createStatefulExpressionMemory, Bt as pickVideoEncoder, C as CompositionTargetSchema, Ct as FFMPEG_PATH_ENV, D as MAX_COMPOSITION_ITEMS, E as MAX_COMPOSITION_FIELDS_PER_FEATURE, F as featureFieldEntries, Ft as buildInputArgs, G as createExpressionScope, H as evaluateStatefulExpressionCall, I as featureSources, It as buildVideoArgs, J as compileExpressionSafe, K as evaluateAst, L as fieldReads, Lt as invocationFromEncodeProfile, M as compositionReadKey, Mt as audioPlanFromEncodeProfile, N as compositionSliceKey, Nt as buildAudioArgs, O as composedDeviceRef, P as compositionSourceKey, Pt as buildFfmpegArgs, Q as EXPRESSION_IDENTIFIER_RE, R as EXPRESSION_INJECTED_NOW, Rt as isSoftwareDecode, S as CompositionSourceRefSchema, St as sliceChangedAt, T as MAX_COMPOSITION_FEATURES, U as toExpressionValue, V as evaluateExpressionSource, Vt as resolveStreamMaps, W as validateExpressionSource, X as tokenize, Y as parseExpression, Z as EXPRESSION_COMPILE_CACHE_CAPACITY, _ as CompositionItemEntrySchema, _t as SOURCE_DEVICE_TYPES, a as CUSTOMIZATION_BLOCK_NAME_PREFIX, at as EXPRESSION_BUILTINS, b as CompositionPassthroughFeatureSchema, bt as isSourceCap, c as CompositionCommandTargetSchema, ct as evaluateCount, d as CompositionFeatureSchema, dt as ExpressionEvalError, et as MAX_EXPRESSION_BINDINGS, f as CompositionFieldReadSchema, ft as ExpressionParseError, g as CompositionFromSourceSchema, gt as SOURCE_CAP_CHANGED_AT_FIELD, h as CompositionForwardCommandSchema, ht as SOURCE_CAP_ACTIVE_FIELD, i as COMPOSITION_ITEM_KEY_RE, it as RESERVED_BINDING_NAMES, j as compositionItemFieldPath, jt as AUDIO_PRESETS, k as composedDeviceStableId, kt as canonicalHash, l as CompositionExistingTargetSchema, lt as evaluateRose, m as CompositionFieldsFeatureSchema, mt as SOURCE_CAPS, n as COMPOSER_ADDON_ID, nt as MAX_EXPRESSION_EVAL_STEPS, o as CompositionBindingSchema, ot as EXPRESSION_BUILTIN_NAMES, p as CompositionFieldSourceSchema, pt as DEFAULT_FIRST_SIGHTING_FRESHNESS_MS, q as compileExpression, r as COMPOSITION_ITEM_ARRAY_PATH, rt as MAX_EXPRESSION_SOURCE_LENGTH, s as CompositionCodeSourceSchema, st as disarmRoseMemory, t as COMPOSED_DEVICE_STABLE_ID_PREFIX, tt as MAX_EXPRESSION_CALL_ARGS, u as CompositionExpressionSourceSchema, ut as isStatefulBuiltin, v as CompositionLiteralBindingSchema, vt as evaluateSensorEdge, w as MAX_COMPOSITION_CODE_LENGTH, x as CompositionSchema, xt as sliceActiveValue, y as CompositionNewTargetSchema, yt as evaluateSensorLevelEdge, z as cloneStatefulExpressionMemory, zt as logBannerArgs } from "./composition-Bzr7GwgP.mjs";
3
+ import { $ as MAX_EXPRESSION_AST_NODES, A as compositionFeatureEnabled, At as Fmp4BoxSplitter, B as createStatefulExpressionMemory, Bt as pickVideoEncoder, C as CompositionTargetSchema, Ct as FFMPEG_PATH_ENV, D as MAX_COMPOSITION_ITEMS, E as MAX_COMPOSITION_FIELDS_PER_FEATURE, F as featureFieldEntries, Ft as buildInputArgs, G as createExpressionScope, H as evaluateStatefulExpressionCall, I as featureSources, It as buildVideoArgs, J as compileExpressionSafe, K as evaluateAst, L as fieldReads, Lt as invocationFromEncodeProfile, M as compositionReadKey, Mt as audioPlanFromEncodeProfile, N as compositionSliceKey, Nt as buildAudioArgs, O as composedDeviceRef, P as compositionSourceKey, Pt as buildFfmpegArgs, Q as EXPRESSION_IDENTIFIER_RE, R as EXPRESSION_INJECTED_NOW, Rt as isSoftwareDecode, S as CompositionSourceRefSchema, St as sliceChangedAt, T as MAX_COMPOSITION_FEATURES, U as toExpressionValue, V as evaluateExpressionSource, Vt as resolveStreamMaps, W as validateExpressionSource, X as tokenize, Y as parseExpression, Z as EXPRESSION_COMPILE_CACHE_CAPACITY, _ as CompositionItemEntrySchema, _t as SOURCE_DEVICE_TYPES, a as CUSTOMIZATION_BLOCK_NAME_PREFIX, at as EXPRESSION_BUILTINS, b as CompositionPassthroughFeatureSchema, bt as isSourceCap, c as CompositionCommandTargetSchema, ct as evaluateCount, d as CompositionFeatureSchema, dt as ExpressionEvalError, et as MAX_EXPRESSION_BINDINGS, f as CompositionFieldReadSchema, ft as ExpressionParseError, g as CompositionFromSourceSchema, gt as SOURCE_CAP_CHANGED_AT_FIELD, h as CompositionForwardCommandSchema, ht as SOURCE_CAP_ACTIVE_FIELD, i as COMPOSITION_ITEM_KEY_RE, it as RESERVED_BINDING_NAMES, j as compositionItemFieldPath, jt as AUDIO_PRESETS, k as composedDeviceStableId, kt as canonicalHash, l as CompositionExistingTargetSchema, lt as evaluateRose, m as CompositionFieldsFeatureSchema, mt as SOURCE_CAPS, n as COMPOSER_ADDON_ID, nt as MAX_EXPRESSION_EVAL_STEPS, o as CompositionBindingSchema, ot as EXPRESSION_BUILTIN_NAMES, p as CompositionFieldSourceSchema, pt as DEFAULT_FIRST_SIGHTING_FRESHNESS_MS, q as compileExpression, r as COMPOSITION_ITEM_ARRAY_PATH, rt as MAX_EXPRESSION_SOURCE_LENGTH, s as CompositionCodeSourceSchema, st as disarmRoseMemory, t as COMPOSED_DEVICE_STABLE_ID_PREFIX, tt as MAX_EXPRESSION_CALL_ARGS, u as CompositionExpressionSourceSchema, ut as isStatefulBuiltin, v as CompositionLiteralBindingSchema, vt as evaluateSensorEdge, w as MAX_COMPOSITION_CODE_LENGTH, x as CompositionSchema, xt as sliceActiveValue, y as CompositionNewTargetSchema, yt as evaluateSensorLevelEdge, z as cloneStatefulExpressionMemory, zt as logBannerArgs } from "./composition-C-WpVYTX.mjs";
4
4
  import { NODE_COLOR_IDS, NodeColorIdSchema, assignNodeColorId } from "./node-color.mjs";
5
5
  import { a as DeviceType, i as DeviceRole, n as ChargingStatus, r as DeviceFeature, t as errMsg } from "./err-msg-DX6i_MY4.mjs";
6
6
  import { EventSourceType } from "./enums.mjs";
@@ -5851,14 +5851,6 @@ function describeRootSupplies(supplies) {
5851
5851
  }
5852
5852
  //#endregion
5853
5853
  //#region src/types/models.ts
5854
- var MODEL_FORMATS = [
5855
- "onnx",
5856
- "coreml",
5857
- "openvino",
5858
- "tflite",
5859
- "pt",
5860
- "gguf"
5861
- ];
5862
5854
  /**
5863
5855
  * Multi-file format payload.
5864
5856
  *
@@ -51829,65 +51821,6 @@ function stateVocabularyFor(runtimeState, alarmStates = []) {
51829
51821
  return [];
51830
51822
  }
51831
51823
  //#endregion
51832
- //#region src/constants.ts
51833
- var HF_REPO = "camstack/camstack-models";
51834
- var HF_BASE_URL = `https://huggingface.co/${HF_REPO}/resolve/main`;
51835
- /**
51836
- * The ONE default session-JWT lifetime.
51837
- *
51838
- * There used to be three, and they disagreed: the `system-config` schema said
51839
- * `30d`, `RUNTIME_DEFAULTS['auth.tokenExpiry']` said `7d`, and
51840
- * `AuthManager.signToken` hardcoded `30d` as its own fallback. Because the
51841
- * production signer (`AuthService extends AuthManager`, wired to
51842
- * `ConfigManager`) resolves through `RUNTIME_DEFAULTS` BEFORE it can ever
51843
- * reach the hardcoded fallback, the value actually in force was `7d` while
51844
- * every surface an operator could read advertised `30d`.
51845
- *
51846
- * `30d` is the value the product documents and the one an operator decided on
51847
- * (2026-07-17: the viewer's silent refresh rotates tokens long before expiry,
51848
- * so a long lifetime only covers devices left unopened for weeks). It is
51849
- * declared here once and imported by the schema, by the runtime defaults and
51850
- * by the signer's fallback — a second default that disagrees with the first is
51851
- * the same defect in miniature.
51852
- */
51853
- var DEFAULT_TOKEN_EXPIRY = "30d";
51854
- /**
51855
- * Runtime defaults -- used by ConfigManager.get() for backward compatibility
51856
- * until Plan B wires all runtime settings to the system_settings SQL table.
51857
- *
51858
- * Moved from @camstack/system/config-schema to @camstack/types so that
51859
- * @camstack/system can reference it without a cross-package kernel import.
51860
- */
51861
- var RUNTIME_DEFAULTS = {
51862
- "features.streaming": true,
51863
- "features.notifications": true,
51864
- "features.objectDetection": false,
51865
- "features.remoteAccess": true,
51866
- "features.agentCluster": false,
51867
- "features.smartHome": true,
51868
- "features.recordings": true,
51869
- "features.backup": true,
51870
- "features.repl": true,
51871
- "retention.detectionEventsDays": 30,
51872
- "retention.audioLevelsDays": 7,
51873
- "logging.level": "info",
51874
- "logging.retentionDays": 30,
51875
- "eventBus.ringBufferSize": 1e4,
51876
- "storage.provider": "sqlite-storage",
51877
- "storage.locations": {
51878
- data: "camstack-data/data",
51879
- media: "camstack-data/media",
51880
- recordings: "camstack-data/recordings",
51881
- cache: "/tmp/camstack-cache",
51882
- logs: "camstack-data/logs",
51883
- models: "camstack-data/models"
51884
- },
51885
- providers: [],
51886
- "ffmpeg.hwAccel": "auto",
51887
- "ffmpeg.threadCount": 0,
51888
- "auth.tokenExpiry": "30d"
51889
- };
51890
- //#endregion
51891
51824
  //#region src/device/accessory.ts
51892
51825
  /**
51893
51826
  * Accessory device helpers — shared across drivers.
@@ -78346,11 +78279,6 @@ function setNestedValue(obj, path, value) {
78346
78279
  current[parts[parts.length - 1]] = value;
78347
78280
  }
78348
78281
  //#endregion
78349
- //#region src/utils/hf-url.ts
78350
- function hfModelUrl(repo, path) {
78351
- return `https://huggingface.co/${repo}/resolve/main/${path}`;
78352
- }
78353
- //#endregion
78354
78282
  //#region src/utils/pool-memory-watchdog.ts
78355
78283
  var MB = 1024 * 1024;
78356
78284
  var DEFAULT_POOL_MEMORY_POLICY = {
@@ -79060,7 +78988,7 @@ var RUNTIMES = [
79060
78988
  value: "cuda",
79061
78989
  label: "CUDA"
79062
78990
  });
79063
- if (hw.gpu?.type === "amd") out.push({
78991
+ if (hw.gpu?.type === "amd" && hw.platform === "linux") out.push({
79064
78992
  value: "webgpu",
79065
78993
  label: "WebGPU (AMD iGPU)"
79066
78994
  });
@@ -79197,7 +79125,7 @@ function scoreRuntimes(hw) {
79197
79125
  });
79198
79126
  }
79199
79127
  if (hw.gpu?.type === "amd") {
79200
- scores.push({
79128
+ if (hw.platform === "linux") scores.push({
79201
79129
  runtime: "python",
79202
79130
  backend: "onnx",
79203
79131
  format: "onnx",
package/dist/node.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  export type { PlatformInfo } from './deps/binary-downloader.js';
2
2
  export { buildBinaryPath, downloadBinary, ensureBinary, findInPath, getPlatformInfo, } from './deps/binary-downloader.js';
3
3
  export { ensureFfmpeg } from './deps/ffmpeg-downloader.js';
4
+ export type { OwnerOnlyDeps } from './util/owner-only-file.js';
5
+ export { icaclsArgs, mkdirOwnerOnlySync, OwnerOnlyError, restrictDirToOwnerSync, restrictFileToOwnerSync, writeOwnerOnlyFileSync, } from './util/owner-only-file.js';
4
6
  export { FFMPEG_RELEASE, getFfmpegArtifact, getFfmpegDownloadUrl } from './deps/ffmpeg-artifacts.js';
5
7
  export { probeFfmpegBinary, parseFfmpegCapabilities, type FfmpegBinaryCapabilities, } from './ffmpeg/binary-capabilities.js';
6
8
  export { ensurePython, getPythonDownloadUrl, installPythonPackages, installPythonRequirements, PYTHON_VERSION, } from './deps/python-downloader.js';