@camstack/addon-remote-storage 1.2.23 → 1.2.25

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-COlcUch_.js");
5
+ const require_shared = require("./shared-DmwERMr_.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-C5iPm_0G.mjs";
1
+ import { c as BaseAddon, i as rearmIdleAbort, n as getOptionalBasePath, o as scheduleIdleAbort, s as storageProviderCapability, t as createSessionId } from "./shared-B9MbTJyC.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-COlcUch_.js");
5
+ const require_shared = require("./shared-DmwERMr_.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-C5iPm_0G.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-B9MbTJyC.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
@@ -1,6 +1,6 @@
1
1
  import { randomUUID } from "node:crypto";
2
2
  import * as path from "node:path";
3
- //#region ../types/dist/event-category-XfKNtfCc.mjs
3
+ //#region ../types/dist/event-category-CIa_iT6b.mjs
4
4
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
5
5
  EventCategory["SystemBoot"] = "system.boot";
6
6
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -16,6 +16,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
16
16
  */
17
17
  EventCategory["SystemRestartCompleted"] = "system.restart-completed";
18
18
  /**
19
+ * The hub reissued its own TLS certificate at boot (`ensureTlsCert`).
20
+ * Emitted only when the material on disk actually changed, so an
21
+ * operator who trusted the old certificate by hand is told rather than
22
+ * discovering it as a browser error. Payload `TlsCertChangedPayload`.
23
+ *
24
+ * Rule: docs/decisions/adr-0227-*.md
25
+ */
26
+ EventCategory["SystemTlsCertChanged"] = "system.tls-cert-changed";
27
+ /**
19
28
  * A newer addon or server-root package version was found by the
20
29
  * authoritative registry check. Emitted once when any observed
21
30
  * `latestVersion` changes (or a package/node first appears behind);
@@ -18624,6 +18633,12 @@ var CameraStatusSchema = object({
18624
18633
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
18625
18634
  fetchedAt: number()
18626
18635
  });
18636
+ var InferenceDeviceExclusionReasonSchema = _enum([
18637
+ "disabled",
18638
+ "unavailable",
18639
+ "cannot-host-camera-root",
18640
+ "accelerator-preferred"
18641
+ ]);
18627
18642
  var NodeInferenceDeviceSchema = object({
18628
18643
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
18629
18644
  key: string(),
@@ -18654,7 +18669,17 @@ var NodeInferenceDeviceSchema = object({
18654
18669
  * available per format; this is the stored selection that becomes the
18655
18670
  * default for EVERY camera landing on this accelerator.
18656
18671
  */
18657
- steps: record(string(), DeviceStepConfigSchema).optional()
18672
+ steps: record(string(), DeviceStepConfigSchema).optional(),
18673
+ /**
18674
+ * `null` when the device IS a camera-root candidate on this node; otherwise
18675
+ * the reason the dispatcher drops it. Computed by the SAME
18676
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
18677
+ * never disagree with the election — deriving it in the UI from
18678
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
18679
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
18680
+ * "an accelerator is serving" predicate).
18681
+ */
18682
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
18658
18683
  });
18659
18684
  var NodeInferenceDevicesSchema = object({
18660
18685
  nodeId: string(),
@@ -22457,7 +22482,12 @@ var ListResultSchema = object({
22457
22482
  probedAt: number()
22458
22483
  });
22459
22484
  var PreferredSchema = LocalInterfaceSchema.nullable();
22460
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
22485
+ /**
22486
+ * Candidate base URL for the SDK to race on connect. Order matters —
22487
+ * the SDK should attempt these top-to-bottom with a short per-candidate
22488
+ * timeout (e.g. 1500ms) and cache the winner for the session.
22489
+ */
22490
+ var ConnectionEndpointSchema = object({
22461
22491
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
22462
22492
  label: string(),
22463
22493
  /** Fully-formed base URL with scheme + host + port. */
@@ -22500,7 +22530,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
22500
22530
  * ordering between polls.
22501
22531
  */
22502
22532
  priority: number()
22503
- })).readonly() });
22533
+ });
22534
+ /**
22535
+ * Where the advertised local port came from. Ordered most → least
22536
+ * authoritative, and the whole point of returning it: a client must be able to
22537
+ * tell a FACT about the hub's socket from an echo of its own guess.
22538
+ */
22539
+ var LocalPortSourceEnum = _enum([
22540
+ "server-config",
22541
+ "server-env",
22542
+ "caller-hint",
22543
+ "default"
22544
+ ]);
22545
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
22546
+ var AdvertisedLocalPortSchema = object({
22547
+ port: number().int().min(1).max(65535),
22548
+ source: LocalPortSourceEnum
22549
+ });
22550
+ var GetConnectionEndpointsResultSchema = object({
22551
+ endpoints: array(ConnectionEndpointSchema).readonly(),
22552
+ /**
22553
+ * The port the hub built the LAN/loopback URLs with, and where that number
22554
+ * came from.
22555
+ *
22556
+ * Returned rather than merely applied, because "the URL is right" and "the
22557
+ * client can KNOW the URL is right" are different properties. A client that
22558
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
22559
+ * a hub that echoed the port the client sent, so it cannot decide whether to
22560
+ * race the candidate or discard it. With `source` it can: anything but
22561
+ * `caller-hint` is the hub's own socket.
22562
+ *
22563
+ * Absent on hubs predating this field — a client that finds it missing is
22564
+ * talking to an echoing hub and must degrade exactly as it does for
22565
+ * `caller-hint`.
22566
+ */
22567
+ localPort: AdvertisedLocalPortSchema
22568
+ });
22504
22569
  /**
22505
22570
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
22506
22571
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -22521,8 +22586,13 @@ var AllowedAddressesSchema = object({
22521
22586
  */
22522
22587
  addresses: array(string()).readonly() });
22523
22588
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
22524
- /** Local hub HTTP port to use in base URLs. */
22525
- port: number().int().min(1).max(65535),
22589
+ /**
22590
+ * LEGACY HINT — do not send from new code. Kept optional so clients
22591
+ * written against the echoing contract keep working; the hub uses it
22592
+ * only when it cannot read its own port, and says so via
22593
+ * `localPort.source === 'caller-hint'`.
22594
+ */
22595
+ port: number().int().min(1).max(65535).optional(),
22526
22596
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
22527
22597
  * candidate. Default `true`. */
22528
22598
  includeLoopback: boolean().optional(),
@@ -23,7 +23,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
23
23
  let node_crypto = require("node:crypto");
24
24
  let node_path = require("node:path");
25
25
  node_path = __toESM(node_path);
26
- //#region ../types/dist/event-category-XfKNtfCc.mjs
26
+ //#region ../types/dist/event-category-CIa_iT6b.mjs
27
27
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
28
28
  EventCategory["SystemBoot"] = "system.boot";
29
29
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -39,6 +39,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
39
39
  */
40
40
  EventCategory["SystemRestartCompleted"] = "system.restart-completed";
41
41
  /**
42
+ * The hub reissued its own TLS certificate at boot (`ensureTlsCert`).
43
+ * Emitted only when the material on disk actually changed, so an
44
+ * operator who trusted the old certificate by hand is told rather than
45
+ * discovering it as a browser error. Payload `TlsCertChangedPayload`.
46
+ *
47
+ * Rule: docs/decisions/adr-0227-*.md
48
+ */
49
+ EventCategory["SystemTlsCertChanged"] = "system.tls-cert-changed";
50
+ /**
42
51
  * A newer addon or server-root package version was found by the
43
52
  * authoritative registry check. Emitted once when any observed
44
53
  * `latestVersion` changes (or a package/node first appears behind);
@@ -18647,6 +18656,12 @@ var CameraStatusSchema = object({
18647
18656
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
18648
18657
  fetchedAt: number()
18649
18658
  });
18659
+ var InferenceDeviceExclusionReasonSchema = _enum([
18660
+ "disabled",
18661
+ "unavailable",
18662
+ "cannot-host-camera-root",
18663
+ "accelerator-preferred"
18664
+ ]);
18650
18665
  var NodeInferenceDeviceSchema = object({
18651
18666
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
18652
18667
  key: string(),
@@ -18677,7 +18692,17 @@ var NodeInferenceDeviceSchema = object({
18677
18692
  * available per format; this is the stored selection that becomes the
18678
18693
  * default for EVERY camera landing on this accelerator.
18679
18694
  */
18680
- steps: record(string(), DeviceStepConfigSchema).optional()
18695
+ steps: record(string(), DeviceStepConfigSchema).optional(),
18696
+ /**
18697
+ * `null` when the device IS a camera-root candidate on this node; otherwise
18698
+ * the reason the dispatcher drops it. Computed by the SAME
18699
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
18700
+ * never disagree with the election — deriving it in the UI from
18701
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
18702
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
18703
+ * "an accelerator is serving" predicate).
18704
+ */
18705
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
18681
18706
  });
18682
18707
  var NodeInferenceDevicesSchema = object({
18683
18708
  nodeId: string(),
@@ -22480,7 +22505,12 @@ var ListResultSchema = object({
22480
22505
  probedAt: number()
22481
22506
  });
22482
22507
  var PreferredSchema = LocalInterfaceSchema.nullable();
22483
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
22508
+ /**
22509
+ * Candidate base URL for the SDK to race on connect. Order matters —
22510
+ * the SDK should attempt these top-to-bottom with a short per-candidate
22511
+ * timeout (e.g. 1500ms) and cache the winner for the session.
22512
+ */
22513
+ var ConnectionEndpointSchema = object({
22484
22514
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
22485
22515
  label: string(),
22486
22516
  /** Fully-formed base URL with scheme + host + port. */
@@ -22523,7 +22553,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
22523
22553
  * ordering between polls.
22524
22554
  */
22525
22555
  priority: number()
22526
- })).readonly() });
22556
+ });
22557
+ /**
22558
+ * Where the advertised local port came from. Ordered most → least
22559
+ * authoritative, and the whole point of returning it: a client must be able to
22560
+ * tell a FACT about the hub's socket from an echo of its own guess.
22561
+ */
22562
+ var LocalPortSourceEnum = _enum([
22563
+ "server-config",
22564
+ "server-env",
22565
+ "caller-hint",
22566
+ "default"
22567
+ ]);
22568
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
22569
+ var AdvertisedLocalPortSchema = object({
22570
+ port: number().int().min(1).max(65535),
22571
+ source: LocalPortSourceEnum
22572
+ });
22573
+ var GetConnectionEndpointsResultSchema = object({
22574
+ endpoints: array(ConnectionEndpointSchema).readonly(),
22575
+ /**
22576
+ * The port the hub built the LAN/loopback URLs with, and where that number
22577
+ * came from.
22578
+ *
22579
+ * Returned rather than merely applied, because "the URL is right" and "the
22580
+ * client can KNOW the URL is right" are different properties. A client that
22581
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
22582
+ * a hub that echoed the port the client sent, so it cannot decide whether to
22583
+ * race the candidate or discard it. With `source` it can: anything but
22584
+ * `caller-hint` is the hub's own socket.
22585
+ *
22586
+ * Absent on hubs predating this field — a client that finds it missing is
22587
+ * talking to an echoing hub and must degrade exactly as it does for
22588
+ * `caller-hint`.
22589
+ */
22590
+ localPort: AdvertisedLocalPortSchema
22591
+ });
22527
22592
  /**
22528
22593
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
22529
22594
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -22544,8 +22609,13 @@ var AllowedAddressesSchema = object({
22544
22609
  */
22545
22610
  addresses: array(string()).readonly() });
22546
22611
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
22547
- /** Local hub HTTP port to use in base URLs. */
22548
- port: number().int().min(1).max(65535),
22612
+ /**
22613
+ * LEGACY HINT — do not send from new code. Kept optional so clients
22614
+ * written against the echoing contract keep working; the hub uses it
22615
+ * only when it cannot read its own port, and says so via
22616
+ * `localPort.source === 'caller-hint'`.
22617
+ */
22618
+ port: number().int().min(1).max(65535).optional(),
22549
22619
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
22550
22620
  * candidate. Default `true`. */
22551
22621
  includeLoopback: boolean().optional(),
@@ -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-COlcUch_.js");
5
+ const require_shared = require("./shared-DmwERMr_.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-C5iPm_0G.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-B9MbTJyC.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.23",
3
+ "version": "1.2.25",
4
4
  "description": "Remote storage providers (SFTP, S3, WebDAV) — unifies remote backends behind the storage-provider cap",
5
5
  "keywords": [
6
6
  "camstack",