@camstack/addon-remote-storage 1.2.51 → 1.2.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/s3.addon.js CHANGED
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_shared = require("./shared-BVnpUN0G.js");
5
+ const require_shared = require("./shared-CYlPexMB.js");
6
6
  let node_stream = require("node:stream");
7
7
  let _aws_sdk_client_s3 = require("@aws-sdk/client-s3");
8
8
  let _aws_sdk_lib_storage = require("@aws-sdk/lib-storage");
package/dist/s3.addon.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { c as BaseAddon, i as rearmIdleAbort, n as getOptionalBasePath, o as scheduleIdleAbort, s as storageProviderCapability, t as createSessionId } from "./shared-CCFH7Q0d.mjs";
1
+ import { c as BaseAddon, i as rearmIdleAbort, n as getOptionalBasePath, o as scheduleIdleAbort, s as storageProviderCapability, t as createSessionId } from "./shared-1TJGwDse.mjs";
2
2
  import { PassThrough } from "node:stream";
3
3
  import { DeleteObjectCommand, GetObjectCommand, HeadBucketCommand, HeadObjectCommand, ListObjectsV2Command, PutObjectCommand, S3Client } from "@aws-sdk/client-s3";
4
4
  import { Upload } from "@aws-sdk/lib-storage";
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_shared = require("./shared-BVnpUN0G.js");
5
+ const require_shared = require("./shared-CYlPexMB.js");
6
6
  let ssh2 = require("ssh2");
7
7
  let node_path = require("node:path");
8
8
  node_path = require_shared.__toESM(node_path);
@@ -1,4 +1,4 @@
1
- import { a as safeJoinRemotePath, c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, r as getRequiredBasePath, s as storageProviderCapability, t as createSessionId } from "./shared-CCFH7Q0d.mjs";
1
+ import { a as safeJoinRemotePath, c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, r as getRequiredBasePath, s as storageProviderCapability, t as createSessionId } from "./shared-1TJGwDse.mjs";
2
2
  import { Client } from "ssh2";
3
3
  import * as path from "node:path";
4
4
  //#region src/providers/sftp/sftp-config-schema.ts
@@ -7703,7 +7703,8 @@ var OpsLogReasonSchema = _enum([
7703
7703
  "quota",
7704
7704
  "manual",
7705
7705
  "operator",
7706
- "maintenance"
7706
+ "maintenance",
7707
+ "orphaned-device"
7707
7708
  ]);
7708
7709
  /** One audit row, shared verbatim by both domains. */
7709
7710
  var OpsLogEntrySchema = object({
@@ -12734,10 +12735,39 @@ var DevicePersistConfigPayloadSchema = object({
12734
12735
  deviceId: number(),
12735
12736
  data: record(string(), unknown())
12736
12737
  });
12738
+ /** What a migration actually did, per switch. `unreachable` is a first-class
12739
+ * answer: a camera that could not be asked is not a camera that was silenced. */
12740
+ var MigrateSwitchOutcomeSchema = _enum([
12741
+ "off",
12742
+ "on",
12743
+ "not-offered",
12744
+ "unreachable"
12745
+ ]);
12746
+ var MigrateSwitchReportSchema = object({
12747
+ deviceId: number(),
12748
+ switchId: CameraSwitchIdSchema,
12749
+ outcome: MigrateSwitchOutcomeSchema,
12750
+ detail: string().optional()
12751
+ });
12752
+ var MigrateDeviceResultSchema = object({
12753
+ sourceId: number(),
12754
+ targetId: number(),
12755
+ switches: array(MigrateSwitchReportSchema).readonly(),
12756
+ /** Switches that could NOT be turned off on the source. Empty is the only
12757
+ * value meaning the replaced hardware is quiet. */
12758
+ sourceStillLive: array(CameraSwitchIdSchema).readonly(),
12759
+ swapped: boolean()
12760
+ });
12737
12761
  method(object({
12738
12762
  addonId: string(),
12739
12763
  stableId: string()
12740
- }), object({ id: number() }), { kind: "mutation" }), 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({
12764
+ }), object({ id: number() }), { kind: "mutation" }), method(object({
12765
+ sourceId: number(),
12766
+ targetId: number()
12767
+ }), MigrateDeviceResultSchema, {
12768
+ kind: "mutation",
12769
+ auth: "admin"
12770
+ }), 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({
12741
12771
  deviceId: number(),
12742
12772
  name: string()
12743
12773
  }), _void(), {
@@ -13212,6 +13242,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
13212
13242
  auth: "admin"
13213
13243
  });
13214
13244
  /**
13245
+ * Transport bounds for AI capability methods.
13246
+ *
13247
+ * Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
13248
+ * each other: declaring the constant in either one hands the other `undefined`
13249
+ * at module-init time, and an undefined `timeoutMs` silently falls back to the
13250
+ * kernel's 60 s default — the exact failure this constant exists to prevent,
13251
+ * reintroduced invisibly. Found by the guard, not by review.
13252
+ */
13253
+ /**
13254
+ * Ceiling for a cap method that runs inference or loads a model.
13255
+ *
13256
+ * Deliberately far above anything the AI layer itself may wait for (a summary
13257
+ * asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
13258
+ * never be the layer that gives up first: when it does, the failure is
13259
+ * reported as a transport error for a model that was still thinking, naming
13260
+ * the wrong layer and hiding the real one.
13261
+ *
13262
+ * Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
13263
+ * more on a cold model load. With no declaration every digest failed at
13264
+ * exactly 60 s and shipped without its text.
13265
+ *
13266
+ * A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
13267
+ * the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
13268
+ * decide when to stop, because only they can say WHY.
13269
+ */
13270
+ var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
13271
+ /** A multi-gigabyte download. An hour is not generous, it is honest. */
13272
+ var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
13273
+ /**
13215
13274
  * Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
13216
13275
  * surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
13217
13276
  * caps stay wire-compatible without a circular cap→cap import.
@@ -13483,16 +13542,19 @@ method(LlmGenerateBaseInputSchema.extend({
13483
13542
  timeoutMs: number().int().positive().optional()
13484
13543
  }), LlmGenerateResultSchema, {
13485
13544
  kind: "mutation",
13486
- auth: "admin"
13545
+ auth: "admin",
13546
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13487
13547
  }), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
13488
13548
  kind: "mutation",
13489
- auth: "admin"
13549
+ auth: "admin",
13550
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13490
13551
  }), method(object({}), _void(), {
13491
13552
  kind: "mutation",
13492
13553
  auth: "admin"
13493
13554
  }), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
13494
13555
  kind: "mutation",
13495
- auth: "admin"
13556
+ auth: "admin",
13557
+ timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
13496
13558
  }), method(object({ file: string() }), _void(), {
13497
13559
  kind: "mutation",
13498
13560
  auth: "admin"
@@ -13660,7 +13722,13 @@ var ProfileRefInputSchema = object({
13660
13722
  addonId: string(),
13661
13723
  profileId: string()
13662
13724
  });
13663
- method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({
13725
+ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
13726
+ kind: "mutation",
13727
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13728
+ }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
13729
+ kind: "mutation",
13730
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13731
+ }), method(object({
13664
13732
  addonId: string().optional(),
13665
13733
  requestId: string()
13666
13734
  }), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
@@ -13671,7 +13739,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
13671
13739
  auth: "admin"
13672
13740
  }), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
13673
13741
  kind: "mutation",
13674
- auth: "admin"
13742
+ auth: "admin",
13743
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13675
13744
  }), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
13676
13745
  selector: LlmDefaultSelectorSchema,
13677
13746
  profileId: string().nullable()
@@ -30300,6 +30369,12 @@ Object.freeze({
30300
30369
  addonId: null,
30301
30370
  access: "view"
30302
30371
  },
30372
+ "deviceManager.migrateDevice": {
30373
+ capName: "device-manager",
30374
+ capScope: "system",
30375
+ addonId: null,
30376
+ access: "create"
30377
+ },
30303
30378
  "deviceManager.persistConfig": {
30304
30379
  capName: "device-manager",
30305
30380
  capScope: "system",
@@ -7726,7 +7726,8 @@ var OpsLogReasonSchema = _enum([
7726
7726
  "quota",
7727
7727
  "manual",
7728
7728
  "operator",
7729
- "maintenance"
7729
+ "maintenance",
7730
+ "orphaned-device"
7730
7731
  ]);
7731
7732
  /** One audit row, shared verbatim by both domains. */
7732
7733
  var OpsLogEntrySchema = object({
@@ -12757,10 +12758,39 @@ var DevicePersistConfigPayloadSchema = object({
12757
12758
  deviceId: number(),
12758
12759
  data: record(string(), unknown())
12759
12760
  });
12761
+ /** What a migration actually did, per switch. `unreachable` is a first-class
12762
+ * answer: a camera that could not be asked is not a camera that was silenced. */
12763
+ var MigrateSwitchOutcomeSchema = _enum([
12764
+ "off",
12765
+ "on",
12766
+ "not-offered",
12767
+ "unreachable"
12768
+ ]);
12769
+ var MigrateSwitchReportSchema = object({
12770
+ deviceId: number(),
12771
+ switchId: CameraSwitchIdSchema,
12772
+ outcome: MigrateSwitchOutcomeSchema,
12773
+ detail: string().optional()
12774
+ });
12775
+ var MigrateDeviceResultSchema = object({
12776
+ sourceId: number(),
12777
+ targetId: number(),
12778
+ switches: array(MigrateSwitchReportSchema).readonly(),
12779
+ /** Switches that could NOT be turned off on the source. Empty is the only
12780
+ * value meaning the replaced hardware is quiet. */
12781
+ sourceStillLive: array(CameraSwitchIdSchema).readonly(),
12782
+ swapped: boolean()
12783
+ });
12760
12784
  method(object({
12761
12785
  addonId: string(),
12762
12786
  stableId: string()
12763
- }), object({ id: number() }), { kind: "mutation" }), 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({
12787
+ }), object({ id: number() }), { kind: "mutation" }), method(object({
12788
+ sourceId: number(),
12789
+ targetId: number()
12790
+ }), MigrateDeviceResultSchema, {
12791
+ kind: "mutation",
12792
+ auth: "admin"
12793
+ }), 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({
12764
12794
  deviceId: number(),
12765
12795
  name: string()
12766
12796
  }), _void(), {
@@ -13235,6 +13265,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
13235
13265
  auth: "admin"
13236
13266
  });
13237
13267
  /**
13268
+ * Transport bounds for AI capability methods.
13269
+ *
13270
+ * Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
13271
+ * each other: declaring the constant in either one hands the other `undefined`
13272
+ * at module-init time, and an undefined `timeoutMs` silently falls back to the
13273
+ * kernel's 60 s default — the exact failure this constant exists to prevent,
13274
+ * reintroduced invisibly. Found by the guard, not by review.
13275
+ */
13276
+ /**
13277
+ * Ceiling for a cap method that runs inference or loads a model.
13278
+ *
13279
+ * Deliberately far above anything the AI layer itself may wait for (a summary
13280
+ * asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
13281
+ * never be the layer that gives up first: when it does, the failure is
13282
+ * reported as a transport error for a model that was still thinking, naming
13283
+ * the wrong layer and hiding the real one.
13284
+ *
13285
+ * Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
13286
+ * more on a cold model load. With no declaration every digest failed at
13287
+ * exactly 60 s and shipped without its text.
13288
+ *
13289
+ * A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
13290
+ * the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
13291
+ * decide when to stop, because only they can say WHY.
13292
+ */
13293
+ var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
13294
+ /** A multi-gigabyte download. An hour is not generous, it is honest. */
13295
+ var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
13296
+ /**
13238
13297
  * Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
13239
13298
  * surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
13240
13299
  * caps stay wire-compatible without a circular cap→cap import.
@@ -13506,16 +13565,19 @@ method(LlmGenerateBaseInputSchema.extend({
13506
13565
  timeoutMs: number().int().positive().optional()
13507
13566
  }), LlmGenerateResultSchema, {
13508
13567
  kind: "mutation",
13509
- auth: "admin"
13568
+ auth: "admin",
13569
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13510
13570
  }), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
13511
13571
  kind: "mutation",
13512
- auth: "admin"
13572
+ auth: "admin",
13573
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13513
13574
  }), method(object({}), _void(), {
13514
13575
  kind: "mutation",
13515
13576
  auth: "admin"
13516
13577
  }), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
13517
13578
  kind: "mutation",
13518
- auth: "admin"
13579
+ auth: "admin",
13580
+ timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
13519
13581
  }), method(object({ file: string() }), _void(), {
13520
13582
  kind: "mutation",
13521
13583
  auth: "admin"
@@ -13683,7 +13745,13 @@ var ProfileRefInputSchema = object({
13683
13745
  addonId: string(),
13684
13746
  profileId: string()
13685
13747
  });
13686
- method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({
13748
+ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
13749
+ kind: "mutation",
13750
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13751
+ }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
13752
+ kind: "mutation",
13753
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13754
+ }), method(object({
13687
13755
  addonId: string().optional(),
13688
13756
  requestId: string()
13689
13757
  }), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
@@ -13694,7 +13762,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
13694
13762
  auth: "admin"
13695
13763
  }), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
13696
13764
  kind: "mutation",
13697
- auth: "admin"
13765
+ auth: "admin",
13766
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13698
13767
  }), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
13699
13768
  selector: LlmDefaultSelectorSchema,
13700
13769
  profileId: string().nullable()
@@ -30323,6 +30392,12 @@ Object.freeze({
30323
30392
  addonId: null,
30324
30393
  access: "view"
30325
30394
  },
30395
+ "deviceManager.migrateDevice": {
30396
+ capName: "device-manager",
30397
+ capScope: "system",
30398
+ addonId: null,
30399
+ access: "create"
30400
+ },
30326
30401
  "deviceManager.persistConfig": {
30327
30402
  capName: "device-manager",
30328
30403
  capScope: "system",
package/dist/smb.addon.js CHANGED
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_shared = require("./shared-BVnpUN0G.js");
5
+ const require_shared = require("./shared-CYlPexMB.js");
6
6
  let node_crypto = require("node:crypto");
7
7
  let node_path = require("node:path");
8
8
  node_path = require_shared.__toESM(node_path);
@@ -1,4 +1,4 @@
1
- import { c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, s as storageProviderCapability } from "./shared-CCFH7Q0d.mjs";
1
+ import { c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, s as storageProviderCapability } from "./shared-1TJGwDse.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import * as path from "node:path";
4
4
  import * as fsp from "node:fs/promises";
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_shared = require("./shared-BVnpUN0G.js");
5
+ const require_shared = require("./shared-CYlPexMB.js");
6
6
  let node_stream = require("node:stream");
7
7
  let webdav = require("webdav");
8
8
  //#region src/providers/webdav/webdav-config-schema.ts
@@ -1,4 +1,4 @@
1
- import { a as safeJoinRemotePath, c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, r as getRequiredBasePath, s as storageProviderCapability, t as createSessionId } from "./shared-CCFH7Q0d.mjs";
1
+ import { a as safeJoinRemotePath, c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, r as getRequiredBasePath, s as storageProviderCapability, t as createSessionId } from "./shared-1TJGwDse.mjs";
2
2
  import { PassThrough } from "node:stream";
3
3
  import { AuthType, createClient } from "webdav";
4
4
  //#region src/providers/webdav/webdav-config-schema.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-remote-storage",
3
- "version": "1.2.51",
3
+ "version": "1.2.54",
4
4
  "description": "Remote storage providers (SFTP, S3, WebDAV, SMB) — unifies remote backends behind the storage-provider cap",
5
5
  "keywords": [
6
6
  "camstack",