@camstack/system 1.2.436 → 1.2.438

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.
Files changed (96) hide show
  1. package/dist/addon-runner.js +64 -12
  2. package/dist/addon-runner.mjs +65 -13
  3. package/dist/{agent-https-B8lKYVtU.mjs → agent-https-BPfHrI4c.mjs} +3 -3
  4. package/dist/auth/login-session-manager.d.ts +2 -0
  5. package/dist/auth/session-revocation-bus.d.ts +32 -0
  6. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  7. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  8. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  9. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  10. package/dist/builtins/alerts/alerts.addon.js +7 -1
  11. package/dist/builtins/alerts/alerts.addon.mjs +7 -1
  12. package/dist/builtins/autotrack/index.js +1 -1
  13. package/dist/builtins/autotrack/index.mjs +1 -1
  14. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  15. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
  16. package/dist/builtins/calendars/calendars.addon.js +1 -1
  17. package/dist/builtins/calendars/calendars.addon.mjs +1 -1
  18. package/dist/builtins/camera-grid/index.js +9 -1
  19. package/dist/builtins/camera-grid/index.mjs +9 -1
  20. package/dist/builtins/composer/composer.addon.js +2 -2
  21. package/dist/builtins/composer/composer.addon.mjs +2 -2
  22. package/dist/builtins/console-logging/index.js +12 -5
  23. package/dist/builtins/console-logging/index.mjs +12 -5
  24. package/dist/builtins/core-blocks/core-blocks.addon.js +2 -2
  25. package/dist/builtins/core-blocks/core-blocks.addon.mjs +5 -5
  26. package/dist/builtins/device-manager/device-manager.addon.d.ts +5 -0
  27. package/dist/builtins/device-manager/device-manager.addon.js +702 -28
  28. package/dist/builtins/device-manager/device-manager.addon.mjs +702 -28
  29. package/dist/builtins/device-manager/device-meta-types.d.ts +4 -0
  30. package/dist/builtins/device-manager/device-provider-context.d.ts +9 -0
  31. package/dist/builtins/device-manager/device-removal-hooks.d.ts +103 -0
  32. package/dist/builtins/device-manager/device-row-store.d.ts +1 -0
  33. package/dist/builtins/device-manager/device-tombstone-store.d.ts +58 -0
  34. package/dist/builtins/device-manager/removal-cleanup.d.ts +50 -0
  35. package/dist/builtins/hub-forwarder/index.js +1 -1
  36. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  37. package/dist/builtins/keychain/index.js +37 -4
  38. package/dist/builtins/keychain/index.mjs +37 -4
  39. package/dist/builtins/keychain/keychain-service.d.ts +14 -0
  40. package/dist/builtins/keychain/keychain-store.d.ts +1 -1
  41. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  42. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  43. package/dist/builtins/local-auth/local-auth.addon.js +53 -12
  44. package/dist/builtins/local-auth/local-auth.addon.mjs +53 -13
  45. package/dist/builtins/local-network/local-network.addon.js +10 -1
  46. package/dist/builtins/local-network/local-network.addon.mjs +13 -4
  47. package/dist/builtins/loki-logging/index.js +28 -5
  48. package/dist/builtins/loki-logging/index.mjs +28 -5
  49. package/dist/builtins/native-metrics/native-metrics.addon.js +11 -1
  50. package/dist/builtins/native-metrics/native-metrics.addon.mjs +20 -10
  51. package/dist/builtins/platform-probe/index.js +1 -1
  52. package/dist/builtins/platform-probe/index.mjs +8 -8
  53. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  54. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  55. package/dist/builtins/snapshot/index.js +11 -1
  56. package/dist/builtins/snapshot/index.mjs +11 -1
  57. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +4 -1
  58. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +4 -1
  59. package/dist/builtins/sqlite-storage/index.js +1 -1
  60. package/dist/builtins/sqlite-storage/index.mjs +1 -1
  61. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +3 -3
  62. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
  63. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  64. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  65. package/dist/builtins/system-config/system-config.addon.d.ts +9 -0
  66. package/dist/builtins/system-config/system-config.addon.js +135 -72
  67. package/dist/builtins/system-config/system-config.addon.mjs +135 -73
  68. package/dist/builtins/winston-logging/index.js +14 -5
  69. package/dist/builtins/winston-logging/index.mjs +14 -5
  70. package/dist/{composition-sources-BAOlCu4j.js → composition-sources-DI3Z83vG.js} +1 -1
  71. package/dist/{composition-sources-gN_BWUKp.mjs → composition-sources-DpHGCjdL.mjs} +1 -1
  72. package/dist/{constants-BFpowodq.mjs → constants-DQK705Sb.mjs} +1 -1
  73. package/dist/{constants-GENKqk9k.js → constants-wkcn5Ij3.js} +1 -1
  74. package/dist/{device-ca-CuWuRW9N.js → device-ca-BSvkXqyI.js} +1 -1
  75. package/dist/{device-ca-BNM5ai4t.mjs → device-ca-DvIZjXIl.mjs} +1 -1
  76. package/dist/{dist-DjD2M79P.mjs → dist-Dc8GKC5H.mjs} +301 -6
  77. package/dist/{dist-DVe0Nsp8.js → dist-GgG-7amw.js} +348 -5
  78. package/dist/file-host-worker.js +1 -1
  79. package/dist/file-host-worker.mjs +1 -1
  80. package/dist/{hub-mdns-ciao-DJRwtlA8.mjs → hub-mdns-ciao-DMlQTdPU.mjs} +1 -1
  81. package/dist/i18n/catalog-registry.d.ts +35 -0
  82. package/dist/i18n/index.d.ts +2 -0
  83. package/dist/index.d.ts +3 -0
  84. package/dist/index.js +666 -21
  85. package/dist/index.mjs +676 -38
  86. package/dist/kernel/gc-census.d.ts +18 -1
  87. package/dist/kernel/settings-view-types.d.ts +2 -0
  88. package/dist/kernel/transport/local-transport.d.ts +3 -0
  89. package/dist/kernel/transport/peer-answered-error.d.ts +5 -1
  90. package/dist/{restore-archive-D4h904rb.js → restore-archive-CTRz8v9o.js} +1 -1
  91. package/dist/{restore-archive-BxmP1ChO.mjs → restore-archive-DPg9duVY.mjs} +1 -1
  92. package/dist/{retired-settings-keys-CYP5IZJ5.js → retired-settings-keys-Dr_4lfKu.js} +1 -1
  93. package/dist/{retired-settings-keys-CQaknvx1.mjs → retired-settings-keys-Is0zO8gX.mjs} +1 -1
  94. package/dist/{wal-maintenance-CaDsrJM_.mjs → wal-maintenance-Bx3lcVA7.mjs} +0 -0
  95. package/dist/{wal-maintenance-Br60onAQ.js → wal-maintenance-mjB2i-VR.js} +0 -0
  96. package/package.json +1 -1
@@ -59,6 +59,14 @@ export interface GcCensusWindow {
59
59
  readonly pauseMs: number;
60
60
  /** How long the window was, so a rate can be computed from the line. */
61
61
  readonly windowMs: number;
62
+ /**
63
+ * Cycles in the window by V8 trigger flag NAME (`ALL_EXTERNAL_MEMORY`,
64
+ * `FORCED`, ...). A cycle can carry several flags and counts under each. This
65
+ * is what separates "driven by external-memory pressure" from "the heap is
66
+ * filling" ON THE LINE, instead of by inference from the rate (D867).
67
+ * Absent = the runtime reported no flag names.
68
+ */
69
+ readonly flags?: Readonly<Record<string, number>>;
62
70
  }
63
71
  /**
64
72
  * A census that accumulates until it is read, then starts a new window.
@@ -76,6 +84,13 @@ export interface GcCensus {
76
84
  export interface GcObservation {
77
85
  readonly kind: number;
78
86
  readonly durationMs: number;
87
+ /** `detail.flags` bitmask; absent when the entry carried none. */
88
+ readonly flags?: number;
89
+ }
90
+ /** One V8 GC flag: its Node constant name (without the prefix) and its bit. */
91
+ export interface GcFlagBit {
92
+ readonly name: string;
93
+ readonly bit: number;
79
94
  }
80
95
  /**
81
96
  * How the census is fed. Injectable so a spec can pose a sequence of
@@ -115,11 +130,13 @@ export declare const GC_CENSUS_MIN_WINDOW_MS = 1e3;
115
130
  * observed and a process that is not collecting look identical on the line, and
116
131
  * they are the two answers furthest apart.
117
132
  */
118
- export declare function createGcCensus(install: GcObserverInstall, kinds: GcKinds, startedAt: number): GcCensus | undefined;
133
+ export declare function createGcCensus(install: GcObserverInstall, kinds: GcKinds, startedAt: number, flagBits?: readonly GcFlagBit[]): GcCensus | undefined;
119
134
  /** The real Node observer and the real kind constants, wrapped so they can be replaced in a spec. */
120
135
  export interface NodeGcObserver {
121
136
  readonly install: GcObserverInstall;
122
137
  readonly kinds: GcKinds;
138
+ /** Names of the flag bits `detail.flags` can carry. Empty = unreadable. */
139
+ readonly flagBits?: readonly GcFlagBit[];
123
140
  }
124
141
  /**
125
142
  * The observer this process actually gets.
@@ -16,6 +16,8 @@ export interface AddonSettingsView {
16
16
  * here for the same reason: only the door-backed view can answer it in one
17
17
  * range scan, and a caller must fall back rather than refuse. */
18
18
  readDeviceStoreBatch?(deviceIds: readonly number[]): Promise<ReadonlyMap<number, Record<string, unknown>>>;
19
+ /** See `IAddonContext['settings'].listDeviceStoreIds` — door-backed views only. */
20
+ listDeviceStoreIds?(): Promise<readonly number[]>;
19
21
  writeDeviceStore(deviceId: number, patch: Record<string, unknown>): Promise<void>;
20
22
  clearDeviceStore(deviceId: number): Promise<void>;
21
23
  getSection(section: string): Promise<Record<string, unknown>>;
@@ -1,3 +1,4 @@
1
+ import type { ErrorI18nPayload } from "@camstack/types";
1
2
  import type { CapActionChannelObserver } from "./cap-action-census.js";
2
3
  import type { SocketTrafficSample } from "./socket-traffic.js";
3
4
  /**
@@ -25,6 +26,8 @@ export type Frame = {
25
26
  readonly id: number;
26
27
  readonly ok: false;
27
28
  readonly err: string;
29
+ /** Stable error code + params (D863), when the thrown error carried one. */
30
+ readonly i18n?: ErrorI18nPayload;
28
31
  } | {
29
32
  readonly k: "evt";
30
33
  readonly body: unknown;
@@ -1,3 +1,4 @@
1
+ import type { ErrorI18nPayload, TranslationParams } from "@camstack/types";
1
2
  /**
2
3
  * An error the FAR END of a channel answered with.
3
4
  *
@@ -13,5 +14,8 @@
13
14
  * node had answered (2026-09-25, device 3836).
14
15
  */
15
16
  export declare class PeerAnsweredError extends Error {
16
- constructor(message: string);
17
+ /** The far end's stable error code (D863), carried so the hub can translate it. */
18
+ readonly i18nCode: string | undefined;
19
+ readonly i18nParams: TranslationParams | undefined;
20
+ constructor(message: string, i18n?: ErrorI18nPayload);
17
21
  }
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require("./chunk-Cek0wNdY.js");
2
- const require_dist = require("./dist-DVe0Nsp8.js");
2
+ const require_dist = require("./dist-GgG-7amw.js");
3
3
  let node_crypto = require("node:crypto");
4
4
  let buffer = require("buffer");
5
5
  let node_fs_promises = require("node:fs/promises");
@@ -1,4 +1,4 @@
1
- import { v as DATABASE_SNAPSHOT_SUFFIX } from "./dist-DjD2M79P.mjs";
1
+ import { b as DATABASE_SNAPSHOT_SUFFIX } from "./dist-Dc8GKC5H.mjs";
2
2
  import { createCipheriv, createDecipheriv, createHash, createPrivateKey, createPublicKey, diffieHellman, generateKeyPairSync, hkdfSync, randomBytes } from "node:crypto";
3
3
  import { Buffer as Buffer$1 } from "buffer";
4
4
  import * as fsp from "node:fs/promises";
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-DVe0Nsp8.js");
1
+ const require_dist = require("./dist-GgG-7amw.js");
2
2
  //#region src/builtins/sqlite-storage/retired-settings-keys.ts
3
3
  /**
4
4
  * Is THIS node the one whose settings store is the cluster's authority?
@@ -1,4 +1,4 @@
1
- import { jr as asJsonObject } from "./dist-DjD2M79P.mjs";
1
+ import { Rr as asJsonObject } from "./dist-Dc8GKC5H.mjs";
2
2
  //#region src/builtins/sqlite-storage/retired-settings-keys.ts
3
3
  /**
4
4
  * Is THIS node the one whose settings store is the cluster's authority?
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/system",
3
- "version": "1.2.436",
3
+ "version": "1.2.438",
4
4
  "description": "Core addon for CamStack — builtins, pipeline, process management, auth, logging, events",
5
5
  "keywords": [
6
6
  "camstack",