@camstack/system 1.2.274 → 1.2.275
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/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/dist/builtins/alerts/alerts.addon.js +1 -1
- package/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/dist/builtins/autotrack/index.js +1 -1
- package/dist/builtins/autotrack/index.mjs +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
- package/dist/builtins/camera-grid/index.js +1 -1
- package/dist/builtins/camera-grid/index.mjs +1 -1
- package/dist/builtins/console-logging/index.js +1 -1
- package/dist/builtins/console-logging/index.mjs +1 -1
- package/dist/builtins/core-blocks/core-blocks.addon.js +1 -1
- package/dist/builtins/core-blocks/core-blocks.addon.mjs +1 -1
- package/dist/builtins/device-manager/device-manager.addon.js +2 -2
- package/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
- package/dist/builtins/doorbell/virtual-doorbell.addon.js +1 -1
- package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +1 -1
- package/dist/builtins/hub-forwarder/index.js +1 -1
- package/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/dist/builtins/local-auth/local-auth.addon.js +1 -1
- package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
- package/dist/builtins/local-network/local-network.addon.js +2 -2
- package/dist/builtins/local-network/local-network.addon.mjs +2 -2
- package/dist/builtins/loki-logging/index.js +1 -1
- package/dist/builtins/loki-logging/index.mjs +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/dist/builtins/platform-probe/index.js +1 -1
- package/dist/builtins/platform-probe/index.mjs +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/dist/builtins/snapshot/index.js +26 -6
- package/dist/builtins/snapshot/index.mjs +26 -6
- package/dist/builtins/snapshot/snapshot-durable-store.d.ts +4 -0
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +0 -0
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/dist/builtins/system-config/system-config.addon.js +1 -1
- package/dist/builtins/system-config/system-config.addon.mjs +1 -1
- package/dist/builtins/winston-logging/index.js +1 -1
- package/dist/builtins/winston-logging/index.mjs +1 -1
- package/dist/{dist-C_4Xt0Ya.js → dist-CYXhwfDf.js} +81 -7
- package/dist/{dist-DchKwh_m.mjs → dist-DWSJVcZe.mjs} +81 -7
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{retired-settings-keys-DPSHUHMu.mjs → retired-settings-keys-BHGnCLW0.mjs} +1 -1
- package/dist/{retired-settings-keys-6wZNp7lr.js → retired-settings-keys-DEFtUH8o.js} +1 -1
- package/dist/tls/cert-identity.d.ts +22 -0
- package/dist/tls/cert-issue.d.ts +31 -0
- package/dist/tls/cert-manager.d.ts +8 -2
- package/dist/tls/index.d.ts +2 -2
- package/dist/tls-D_wUeOTD.js +12122 -0
- package/dist/tls-IM-v7JV4.mjs +11984 -0
- package/package.json +2 -1
- package/dist/tls/cert-openssl.d.ts +0 -23
- package/dist/tls-2xbgg78V.mjs +0 -752
- package/dist/tls-BFs4PzoW.js +0 -890
|
@@ -23998,10 +23998,9 @@ var ServerBootModeSchema = zod.z.enum([
|
|
|
23998
23998
|
* - `idle` / `checking` / `staging` — steady / in-flight registry work.
|
|
23999
23999
|
* - `pending-restart` — a version is staged and the node has NOT yet
|
|
24000
24000
|
* restarted onto it (still running the OLD version).
|
|
24001
|
-
* - `awaiting-confirmation` —
|
|
24002
|
-
*
|
|
24003
|
-
*
|
|
24004
|
-
* manually restarted, or the probation boot auto-rolls-back.
|
|
24001
|
+
* - `awaiting-confirmation` — RETIRED with the probation boot (single-copy
|
|
24002
|
+
* collapse, 2026-07-18). Kept in the enum so an older client still parses;
|
|
24003
|
+
* no provider emits it.
|
|
24005
24004
|
*/
|
|
24006
24005
|
var ServerUpdateStateSchema = zod.z.enum([
|
|
24007
24006
|
"idle",
|
|
@@ -24158,12 +24157,35 @@ var ServerRollbackInfoSchema = zod.z.object({
|
|
|
24158
24157
|
var ServerPackageStatusSchema = zod.z.object({
|
|
24159
24158
|
/** Root package name (`@camstack/server` on the hub). */
|
|
24160
24159
|
packageName: zod.z.string(),
|
|
24161
|
-
/**
|
|
24160
|
+
/**
|
|
24161
|
+
* Version of the code THIS PROCESS loaded — captured once, at boot, from the
|
|
24162
|
+
* package.json of the copy the code was loaded from, and never re-read. A
|
|
24163
|
+
* copy replaced on disk under a live process must not move this number;
|
|
24164
|
+
* that divergence is what `installedVersion` is for. Before 2026-09-20 this
|
|
24165
|
+
* was a lazy disk read that would have followed such a swap silently.
|
|
24166
|
+
*/
|
|
24162
24167
|
runningVersion: zod.z.string().nullable(),
|
|
24163
24168
|
/** Node.js runtime version the node's process runs on (`process.versions.node`). */
|
|
24164
24169
|
nodeRuntimeVersion: zod.z.string().nullable(),
|
|
24165
24170
|
/** Active data-dir root version; null when booted from seed/workspace. */
|
|
24166
24171
|
activeVersion: zod.z.string().nullable(),
|
|
24172
|
+
/**
|
|
24173
|
+
* Version of the root package in the data-root `current/` copy RIGHT NOW —
|
|
24174
|
+
* what the next boot would load if nothing is staged. Normally equal to
|
|
24175
|
+
* `runningVersion`; differs only when the copy on disk changed under the
|
|
24176
|
+
* live process. `null` when there is no data-root copy (baked seed or
|
|
24177
|
+
* workspace boot). Optional for version skew: an older provider omits it.
|
|
24178
|
+
*/
|
|
24179
|
+
installedVersion: zod.z.string().nullable().optional(),
|
|
24180
|
+
/**
|
|
24181
|
+
* True when the code that would run after a restart is NOT the code running
|
|
24182
|
+
* now: a version is staged (`pendingVersion`), or `installedVersion` differs
|
|
24183
|
+
* from `runningVersion`. Derived on every read, never stored. This is the
|
|
24184
|
+
* one field that lets an operator or a script say "1.2.353 is installed and
|
|
24185
|
+
* will run after a restart" instead of reading it off a number that means
|
|
24186
|
+
* "installed". Optional for version skew.
|
|
24187
|
+
*/
|
|
24188
|
+
restartRequired: zod.z.boolean().optional(),
|
|
24167
24189
|
/** N-1 version kept for rollback; null when no previous version exists. */
|
|
24168
24190
|
previousVersion: zod.z.string().nullable(),
|
|
24169
24191
|
/** Version of the immutable baked seed closure (image fallback). */
|
|
@@ -24198,19 +24220,71 @@ var ServerPackageStatusSchema = zod.z.object({
|
|
|
24198
24220
|
});
|
|
24199
24221
|
var ServerUpdateCheckResultSchema = zod.z.object({
|
|
24200
24222
|
packageName: zod.z.string(),
|
|
24223
|
+
/** Same meaning as on the status payload: what THIS process loaded. */
|
|
24201
24224
|
runningVersion: zod.z.string().nullable(),
|
|
24202
24225
|
latestVersion: zod.z.string().nullable(),
|
|
24226
|
+
/**
|
|
24227
|
+
* `latestVersion` is newer than `runningVersion` AND is not the version
|
|
24228
|
+
* already staged on this node. A staged-and-waiting version is not "an
|
|
24229
|
+
* update available" — applying it again is refused (`already-staged`), and
|
|
24230
|
+
* a button that announced "updating…" on this boolean then got refused
|
|
24231
|
+
* would be lying. It is reported through `pendingVersion` instead.
|
|
24232
|
+
*/
|
|
24203
24233
|
updateAvailable: zod.z.boolean(),
|
|
24204
24234
|
checkedAtMs: zod.z.number(),
|
|
24205
24235
|
/** Non-null when the registry lookup failed (offline, bad registry, …). */
|
|
24206
|
-
error: zod.z.string().nullable()
|
|
24236
|
+
error: zod.z.string().nullable(),
|
|
24237
|
+
/**
|
|
24238
|
+
* Version staged on this node and awaiting its restart, when one is. Before
|
|
24239
|
+
* 2026-09-20 a check answered `{runningVersion, updateAvailable:false}` for a
|
|
24240
|
+
* node whose staged closure had never booted, and the caller had no way to
|
|
24241
|
+
* see the difference. Optional for version skew.
|
|
24242
|
+
*/
|
|
24243
|
+
pendingVersion: zod.z.string().nullable().optional(),
|
|
24244
|
+
/** See the status payload: staged, or installed-on-disk ≠ running. Optional for skew. */
|
|
24245
|
+
restartRequired: zod.z.boolean().optional()
|
|
24207
24246
|
});
|
|
24247
|
+
/**
|
|
24248
|
+
* What an action DID — the discriminant `accepted` cannot carry. Before
|
|
24249
|
+
* 2026-09-20 `applyServerUpdate` answered `accepted:false` both for a refusal
|
|
24250
|
+
* where nothing was wrong (already current, already staged) and for a staging
|
|
24251
|
+
* install that died on `npm error code ECONNRESET`; the only difference was
|
|
24252
|
+
* prose in `message`, and an operator restarted a container on the strength of
|
|
24253
|
+
* it, booting the previous version.
|
|
24254
|
+
*
|
|
24255
|
+
* - `staged` — the closure is installed and validated; the node
|
|
24256
|
+
* restarts to apply it (`restarting:true`). NOTHING
|
|
24257
|
+
* runs the new code until that restart completes.
|
|
24258
|
+
* - `restart-scheduled` — a plain, version-preserving restart was accepted.
|
|
24259
|
+
* - `already-current` — the target IS the running version; nothing done.
|
|
24260
|
+
* - `refused` — dropped by a gate; `reason` names which.
|
|
24261
|
+
* - `failed` — attempted and did not land; `error` says why.
|
|
24262
|
+
*/
|
|
24263
|
+
var ServerUpdateOutcomeSchema = zod.z.enum([
|
|
24264
|
+
"staged",
|
|
24265
|
+
"restart-scheduled",
|
|
24266
|
+
"already-current",
|
|
24267
|
+
"refused",
|
|
24268
|
+
"failed"
|
|
24269
|
+
]);
|
|
24208
24270
|
var ServerUpdateActionResultSchema = zod.z.object({
|
|
24209
24271
|
accepted: zod.z.boolean(),
|
|
24210
24272
|
targetVersion: zod.z.string().nullable(),
|
|
24211
24273
|
/** True when a graceful restart was scheduled to apply the change. */
|
|
24212
24274
|
restarting: zod.z.boolean(),
|
|
24213
|
-
message: zod.z.string()
|
|
24275
|
+
message: zod.z.string(),
|
|
24276
|
+
/** See {@link ServerUpdateOutcomeSchema}. Optional for version skew. */
|
|
24277
|
+
outcome: ServerUpdateOutcomeSchema.optional(),
|
|
24278
|
+
/**
|
|
24279
|
+
* Stable, greppable cause for `refused` / `failed` (the engine's
|
|
24280
|
+
* `UpdateRefusalReason`, `staging-failed`, …). `null` on success.
|
|
24281
|
+
*/
|
|
24282
|
+
reason: zod.z.string().nullable().optional(),
|
|
24283
|
+
/**
|
|
24284
|
+
* The failure itself, verbatim enough to act on (the npm output for a
|
|
24285
|
+
* staging install). Non-null only for `failed`.
|
|
24286
|
+
*/
|
|
24287
|
+
error: zod.z.string().nullable().optional()
|
|
24214
24288
|
});
|
|
24215
24289
|
var serverManagementCapability = {
|
|
24216
24290
|
name: "server-management",
|
|
@@ -23998,10 +23998,9 @@ var ServerBootModeSchema = z.enum([
|
|
|
23998
23998
|
* - `idle` / `checking` / `staging` — steady / in-flight registry work.
|
|
23999
23999
|
* - `pending-restart` — a version is staged and the node has NOT yet
|
|
24000
24000
|
* restarted onto it (still running the OLD version).
|
|
24001
|
-
* - `awaiting-confirmation` —
|
|
24002
|
-
*
|
|
24003
|
-
*
|
|
24004
|
-
* manually restarted, or the probation boot auto-rolls-back.
|
|
24001
|
+
* - `awaiting-confirmation` — RETIRED with the probation boot (single-copy
|
|
24002
|
+
* collapse, 2026-07-18). Kept in the enum so an older client still parses;
|
|
24003
|
+
* no provider emits it.
|
|
24005
24004
|
*/
|
|
24006
24005
|
var ServerUpdateStateSchema = z.enum([
|
|
24007
24006
|
"idle",
|
|
@@ -24158,12 +24157,35 @@ var ServerRollbackInfoSchema = z.object({
|
|
|
24158
24157
|
var ServerPackageStatusSchema = z.object({
|
|
24159
24158
|
/** Root package name (`@camstack/server` on the hub). */
|
|
24160
24159
|
packageName: z.string(),
|
|
24161
|
-
/**
|
|
24160
|
+
/**
|
|
24161
|
+
* Version of the code THIS PROCESS loaded — captured once, at boot, from the
|
|
24162
|
+
* package.json of the copy the code was loaded from, and never re-read. A
|
|
24163
|
+
* copy replaced on disk under a live process must not move this number;
|
|
24164
|
+
* that divergence is what `installedVersion` is for. Before 2026-09-20 this
|
|
24165
|
+
* was a lazy disk read that would have followed such a swap silently.
|
|
24166
|
+
*/
|
|
24162
24167
|
runningVersion: z.string().nullable(),
|
|
24163
24168
|
/** Node.js runtime version the node's process runs on (`process.versions.node`). */
|
|
24164
24169
|
nodeRuntimeVersion: z.string().nullable(),
|
|
24165
24170
|
/** Active data-dir root version; null when booted from seed/workspace. */
|
|
24166
24171
|
activeVersion: z.string().nullable(),
|
|
24172
|
+
/**
|
|
24173
|
+
* Version of the root package in the data-root `current/` copy RIGHT NOW —
|
|
24174
|
+
* what the next boot would load if nothing is staged. Normally equal to
|
|
24175
|
+
* `runningVersion`; differs only when the copy on disk changed under the
|
|
24176
|
+
* live process. `null` when there is no data-root copy (baked seed or
|
|
24177
|
+
* workspace boot). Optional for version skew: an older provider omits it.
|
|
24178
|
+
*/
|
|
24179
|
+
installedVersion: z.string().nullable().optional(),
|
|
24180
|
+
/**
|
|
24181
|
+
* True when the code that would run after a restart is NOT the code running
|
|
24182
|
+
* now: a version is staged (`pendingVersion`), or `installedVersion` differs
|
|
24183
|
+
* from `runningVersion`. Derived on every read, never stored. This is the
|
|
24184
|
+
* one field that lets an operator or a script say "1.2.353 is installed and
|
|
24185
|
+
* will run after a restart" instead of reading it off a number that means
|
|
24186
|
+
* "installed". Optional for version skew.
|
|
24187
|
+
*/
|
|
24188
|
+
restartRequired: z.boolean().optional(),
|
|
24167
24189
|
/** N-1 version kept for rollback; null when no previous version exists. */
|
|
24168
24190
|
previousVersion: z.string().nullable(),
|
|
24169
24191
|
/** Version of the immutable baked seed closure (image fallback). */
|
|
@@ -24198,19 +24220,71 @@ var ServerPackageStatusSchema = z.object({
|
|
|
24198
24220
|
});
|
|
24199
24221
|
var ServerUpdateCheckResultSchema = z.object({
|
|
24200
24222
|
packageName: z.string(),
|
|
24223
|
+
/** Same meaning as on the status payload: what THIS process loaded. */
|
|
24201
24224
|
runningVersion: z.string().nullable(),
|
|
24202
24225
|
latestVersion: z.string().nullable(),
|
|
24226
|
+
/**
|
|
24227
|
+
* `latestVersion` is newer than `runningVersion` AND is not the version
|
|
24228
|
+
* already staged on this node. A staged-and-waiting version is not "an
|
|
24229
|
+
* update available" — applying it again is refused (`already-staged`), and
|
|
24230
|
+
* a button that announced "updating…" on this boolean then got refused
|
|
24231
|
+
* would be lying. It is reported through `pendingVersion` instead.
|
|
24232
|
+
*/
|
|
24203
24233
|
updateAvailable: z.boolean(),
|
|
24204
24234
|
checkedAtMs: z.number(),
|
|
24205
24235
|
/** Non-null when the registry lookup failed (offline, bad registry, …). */
|
|
24206
|
-
error: z.string().nullable()
|
|
24236
|
+
error: z.string().nullable(),
|
|
24237
|
+
/**
|
|
24238
|
+
* Version staged on this node and awaiting its restart, when one is. Before
|
|
24239
|
+
* 2026-09-20 a check answered `{runningVersion, updateAvailable:false}` for a
|
|
24240
|
+
* node whose staged closure had never booted, and the caller had no way to
|
|
24241
|
+
* see the difference. Optional for version skew.
|
|
24242
|
+
*/
|
|
24243
|
+
pendingVersion: z.string().nullable().optional(),
|
|
24244
|
+
/** See the status payload: staged, or installed-on-disk ≠ running. Optional for skew. */
|
|
24245
|
+
restartRequired: z.boolean().optional()
|
|
24207
24246
|
});
|
|
24247
|
+
/**
|
|
24248
|
+
* What an action DID — the discriminant `accepted` cannot carry. Before
|
|
24249
|
+
* 2026-09-20 `applyServerUpdate` answered `accepted:false` both for a refusal
|
|
24250
|
+
* where nothing was wrong (already current, already staged) and for a staging
|
|
24251
|
+
* install that died on `npm error code ECONNRESET`; the only difference was
|
|
24252
|
+
* prose in `message`, and an operator restarted a container on the strength of
|
|
24253
|
+
* it, booting the previous version.
|
|
24254
|
+
*
|
|
24255
|
+
* - `staged` — the closure is installed and validated; the node
|
|
24256
|
+
* restarts to apply it (`restarting:true`). NOTHING
|
|
24257
|
+
* runs the new code until that restart completes.
|
|
24258
|
+
* - `restart-scheduled` — a plain, version-preserving restart was accepted.
|
|
24259
|
+
* - `already-current` — the target IS the running version; nothing done.
|
|
24260
|
+
* - `refused` — dropped by a gate; `reason` names which.
|
|
24261
|
+
* - `failed` — attempted and did not land; `error` says why.
|
|
24262
|
+
*/
|
|
24263
|
+
var ServerUpdateOutcomeSchema = z.enum([
|
|
24264
|
+
"staged",
|
|
24265
|
+
"restart-scheduled",
|
|
24266
|
+
"already-current",
|
|
24267
|
+
"refused",
|
|
24268
|
+
"failed"
|
|
24269
|
+
]);
|
|
24208
24270
|
var ServerUpdateActionResultSchema = z.object({
|
|
24209
24271
|
accepted: z.boolean(),
|
|
24210
24272
|
targetVersion: z.string().nullable(),
|
|
24211
24273
|
/** True when a graceful restart was scheduled to apply the change. */
|
|
24212
24274
|
restarting: z.boolean(),
|
|
24213
|
-
message: z.string()
|
|
24275
|
+
message: z.string(),
|
|
24276
|
+
/** See {@link ServerUpdateOutcomeSchema}. Optional for version skew. */
|
|
24277
|
+
outcome: ServerUpdateOutcomeSchema.optional(),
|
|
24278
|
+
/**
|
|
24279
|
+
* Stable, greppable cause for `refused` / `failed` (the engine's
|
|
24280
|
+
* `UpdateRefusalReason`, `staging-failed`, …). `null` on success.
|
|
24281
|
+
*/
|
|
24282
|
+
reason: z.string().nullable().optional(),
|
|
24283
|
+
/**
|
|
24284
|
+
* The failure itself, verbatim enough to act on (the npm output for a
|
|
24285
|
+
* staging install). Non-null only for `failed`.
|
|
24286
|
+
*/
|
|
24287
|
+
error: z.string().nullable().optional()
|
|
24214
24288
|
});
|
|
24215
24289
|
var serverManagementCapability = {
|
|
24216
24290
|
name: "server-management",
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
3
|
-
const require_dist = require("./dist-
|
|
3
|
+
const require_dist = require("./dist-CYXhwfDf.js");
|
|
4
4
|
const require_builtins_alerts_alerts_addon = require("./builtins/alerts/alerts.addon.js");
|
|
5
5
|
require("./builtins/alerts/index.js");
|
|
6
6
|
const require_formatter = require("./formatter-DqAKDlvN.js");
|
|
@@ -26,7 +26,7 @@ const require_builtins_system_config_system_config_addon = require("./builtins/s
|
|
|
26
26
|
require("./builtins/system-config/index.js");
|
|
27
27
|
const require_builtins_winston_logging_index = require("./builtins/winston-logging/index.js");
|
|
28
28
|
const require_event_loop_stall_monitor = require("./event-loop-stall-monitor-CAsHdMwP.js");
|
|
29
|
-
const require_tls$1 = require("./tls-
|
|
29
|
+
const require_tls$1 = require("./tls-D_wUeOTD.js");
|
|
30
30
|
const require_manifest_system_deps = require("./manifest-system-deps-CfVyUKLU.js");
|
|
31
31
|
const require_resource_monitor = require("./resource-monitor-LVE1BoLs.js");
|
|
32
32
|
const require_custom_action_registry = require("./custom-action-registry-acBY3mHA.js");
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM$1, r as __exportAll, t as __commonJSMin$1 } from "./chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { An as readinessKey, Cn as expandCapMethods, F as addonSettingsCapability, Ft as procedureAuthKey, Mn as scopeKey, Mt as objectInputDeclaresAddonId, On as parseJsonObject, Pn as EventCategory$1, S as RUNTIME_DEFAULTS, Tt as looseSchema, Ut as scopesAllowAddon, Vt as resolveMethodAuth, Wt as scopesAllowDeviceCap, _n as asJsonObject$1, _t as isVoidInput, an as errMsg$1, bn as createEvent, bt as lifecycleJobSchema, cn as DATAPLANE_SECRET_HEADER$1, dt as isArrayOutputSchema, ft as isCollectionArrayMethod, g as LOG_LEVEL_RANK, hn as ReadinessTimeoutError, jn as resolveCapMount, kn as parseJsonUnknown, ln as DEVICE_SETTINGS_CONTRIBUTION_METHODS, mn as ReadinessRegistry, mt as isObjectInput, st as extractNestedAddonId, t as ALL_CAPABILITY_DEFINITIONS, un as DEVICE_STATUS_METHOD, vn as asNumber, vt as kebabToCamel, wt as logLevelAtMost, xn as emitDownForOwnedCaps, y as METHOD_ACCESS_MAP, yn as asString$1 } from "./dist-
|
|
2
|
+
import { An as readinessKey, Cn as expandCapMethods, F as addonSettingsCapability, Ft as procedureAuthKey, Mn as scopeKey, Mt as objectInputDeclaresAddonId, On as parseJsonObject, Pn as EventCategory$1, S as RUNTIME_DEFAULTS, Tt as looseSchema, Ut as scopesAllowAddon, Vt as resolveMethodAuth, Wt as scopesAllowDeviceCap, _n as asJsonObject$1, _t as isVoidInput, an as errMsg$1, bn as createEvent, bt as lifecycleJobSchema, cn as DATAPLANE_SECRET_HEADER$1, dt as isArrayOutputSchema, ft as isCollectionArrayMethod, g as LOG_LEVEL_RANK, hn as ReadinessTimeoutError, jn as resolveCapMount, kn as parseJsonUnknown, ln as DEVICE_SETTINGS_CONTRIBUTION_METHODS, mn as ReadinessRegistry, mt as isObjectInput, st as extractNestedAddonId, t as ALL_CAPABILITY_DEFINITIONS, un as DEVICE_STATUS_METHOD, vn as asNumber, vt as kebabToCamel, wt as logLevelAtMost, xn as emitDownForOwnedCaps, y as METHOD_ACCESS_MAP, yn as asString$1 } from "./dist-DWSJVcZe.mjs";
|
|
3
3
|
import { AlertCenterAddon } from "./builtins/alerts/alerts.addon.mjs";
|
|
4
4
|
import "./builtins/alerts/index.mjs";
|
|
5
5
|
import { t as formatLogLine } from "./formatter-B7qW8bPJ.mjs";
|
|
@@ -25,7 +25,7 @@ import { SystemConfigAddon } from "./builtins/system-config/system-config.addon.
|
|
|
25
25
|
import "./builtins/system-config/index.mjs";
|
|
26
26
|
import { WinstonDestination, WinstonLoggingAddon } from "./builtins/winston-logging/index.mjs";
|
|
27
27
|
import { _ as fetchJson, a as createFileDataPlaneHandler, c as parseRangeHeader, d as ModelDownloadService, f as collectModelFiles, g as ensureModel, h as downloadModel, i as startEventLoopStallMonitor, l as parseTokenizedUrl, m as downloadFile, n as STALL_TICK_MS, o as contentTypeFor, p as deleteModelFromDisk, r as attributeStall, s as createAuthenticatedFileServer, t as STALL_REPORT_MS, u as resolveFilePath, v as getModelFilePath, y as isModelDownloaded } from "./event-loop-stall-monitor-GPrVvx14.mjs";
|
|
28
|
-
import { C as registerLanHttpHandler, S as readLanHttpState, _ as DEFAULT_LAN_HTTP_PORT, a as writeTlsMode, b as bindPendingLanHttp, c as loadTlsCert, d as collectCertIdentity, f as CA_VALIDITY_DAYS, g as evaluateExistingCert, h as SERVER_AUTH_OID, i as writeExtraSans, l as reissueTlsLeaf, m as MAX_LEAF_VALIDITY_DAYS, n as readTlsAccessStatus, o as validateUploadedTls, p as LEAF_RENEWAL_WINDOW_DAYS, r as readTlsMode, s as ensureTlsCert, t as readExtraSans, u as CA_COMMON_NAME, v as allFamiliesListenHost, x as closeLanHttp, y as applyLanHttp } from "./tls-
|
|
28
|
+
import { C as registerLanHttpHandler, S as readLanHttpState, _ as DEFAULT_LAN_HTTP_PORT, a as writeTlsMode, b as bindPendingLanHttp, c as loadTlsCert, d as collectCertIdentity, f as CA_VALIDITY_DAYS, g as evaluateExistingCert, h as SERVER_AUTH_OID, i as writeExtraSans, l as reissueTlsLeaf, m as MAX_LEAF_VALIDITY_DAYS, n as readTlsAccessStatus, o as validateUploadedTls, p as LEAF_RENEWAL_WINDOW_DAYS, r as readTlsMode, s as ensureTlsCert, t as readExtraSans, u as CA_COMMON_NAME, v as allFamiliesListenHost, x as closeLanHttp, y as applyLanHttp } from "./tls-IM-v7JV4.mjs";
|
|
29
29
|
import { $ as buildNativeCapProxy, $t as ARRAY_BUFFER_CENSUS_SUSTAIN_MS, A as createUdsLogger, An as createSocketDirectionCounters, At as HEAP_WATCH_WARN_RATIO, B as UDS_NO_ROUTE_PREFIX, Bn as createCapActionCensus, Bt as createDeferredHeapWatchSink, C as deviceCapResolverLink, Cn as SOCKET_QUEUE_TOP_N, Ct as resolveNpmInvocation, D as createUdsEventBridge, Dn as formatSocketPlane, Dt as HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS, E as createParentUnownedCallHandler, En as diffSocketPlane, Et as HEAP_RECLAIM_MIN_INTERVAL_MS, F as callWithServiceDiscovery, Fn as CAP_ACTION_OVERFLOW_LABEL, Ft as RSS_BUDGET_RELEASE_RATIO, G as getCapUsageRegistry, Gn as diffEventPlane, Gt as nextRssBudgetState, H as CapUsageRegistry, Hn as EVENT_PLANE_TOP_N, Ht as createV8Reclaimer, I as CapRouteError, In as CAP_ACTION_UNLABELLED, It as RUNNER_HEAP_WATCH_INTERVAL_MS, J as UdsLocalTransportServer, Jt as shouldReclaim, K as createLocalTransport, Kn as formatEventPlane, Kt as parseRssBudgetMb, L as classifyCapRoute, Ln as EMPTY_CAP_ACTION_READING, Lt as RUNNER_RSS_BUDGET_ENV, M as AGENT_CAP_FWD_ACTION, Mn as sampleSocketDirection, Mt as HUB_MAIN_RSS_BUDGET_MB, N as AGENT_CAP_FWD_SERVICE, Nn as socketDirectionBytes, Nt as HUB_RSS_BUDGET_ENV, O as createUdsEventBus, On as readSocketQueues, Ot as HEAP_RECLAIM_TRIGGER_MB, P as CapRouteResolver, Pn as socketDirectionMessages, Pt as RSS_BUDGET_REANNOUNCE_MIN_MS, Q as encodeFrame, Qt as ARRAY_BUFFER_CENSUS_COOLDOWN_MS, R as LocalChildClient, Rn as MAX_CAP_ACTIONS_PER_PEER, Rt as ZERO_LOOP_DELAY, S as buildLinkChain, Sn as SOCKET_PLANE_TOP_N, St as buildNpmChildEnv, T as localProviderLink, Tn as createSocketPlaneReader, Tt as createAddonDataPlaneFacility, U as PARENT_ROUTED_PROVIDER_ADDON_ID, Un as createEventPlaneMeter, Ut as describeRss, V as readMoleculerFanoutMode, Vn as diffCapActionCensus, Vt as createLoopDelayMeter, W as __resetCapUsageRegistryForTests, Wn as createEventPlaneReader, Wt as hubMainRssBudget, X as localEndpointPath, Xt as startRunnerHeapWatch, Y as SocketChannel, Yt as startHeapWatch, Z as FrameDecoder, Zt as strandedMb, _ as AddonDepsManager, _n as formatOutboundQueueVerdict, _t as CapabilityHandle, a as createUdsAddonContext, an as isArrayBufferCensusReport, b as brokerCallForCap, bn as formatMeshQueue, bt as installManifestNativeDeps, c as getOrInitReadinessRegistryForClient, cn as emitHeapDiagnosticReport, ct as NATIVE_PROVIDER_SERVICE_INFIX, d as clusterEventTopic, dn as readHeapSpaces, dt as capBareAction, en as ARRAY_BUFFER_CENSUS_THRESHOLD_MB, et as buildUdsNativeCapProxy, f as getBrokerEventBus, fn as selectReportedSpaces, ft as capServiceName, g as subscribePassthrough, gn as createOutboundQueueGate, gt as DeviceRegistry, h as setNodeEventInterest, hn as OUTBOUND_QUEUE_THRESHOLD_BYTES, ht as serializeTypedArrays, i as createAddonContext, in as formatArrayBufferCensus, it as mountNativeCapService, j as createUdsLoggerWithControl, jn as recordSocketFrame, jt as HUB_MAIN_HEAP_WATCH_LABEL, k as udsChildLogToWorkerEntry, kn as EMPTY_SOCKET_DIRECTION, kt as HEAP_WATCH_INTERVAL_MS, l as setHubConnected, ln as formatHeapSpaces, lt as capActionName, m as registerEventBusService, mn as OUTBOUND_QUEUE_SUSTAIN_MS, mt as deserializeTypedArrays, n as installManifestPythonDeps, nn as createArrayBufferCensusGate, o as getWorkerDeviceRegistry, on as DECISIVE_HEAP_SPACES, ot as createAddonService, p as getMoleculerEventStats, pn as OUTBOUND_QUEUE_COOLDOWN_MS, pt as parseCapAction, q as UdsLocalTransportClient, qt as reclaimIntervalMs, r as adaptBrokerToCluster, rn as createInspectorArrayBufferCensus, s as getOrInitReadinessRegistry, sn as HEAP_SPACE_REPORT_MIN_MB, st as validateProviderRegistrations, t as installManifestSystemDeps, tn as ARRAY_BUFFER_RELEASE_MIN_DROP_RATIO, tt as createBrokerDeviceManagerApi, u as EVENT_TOPIC_PREFIX, un as heapSpaceField, ut as capActionSuffix, v as createKernelHwAccel, vn as MESH_QUEUE_TOP_N, vt as CapabilityUnavailableError, w as ipcParentLink, wn as createSocketPlaneMeter, wt as runNpm, x as brokerTransportLink, xn as EMPTY_SOCKET_PLANE_BASELINE, xt as resolveAddonClass, y as resolveHwAccel, yn as createMeshQueueReader, yt as copyBundledNativeModules, z as LocalChildRegistry, zn as capActionLabel, zt as buildHeapSample } from "./manifest-system-deps-BXf-Ouqx.mjs";
|
|
30
30
|
import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-Vp0bPV3U.mjs";
|
|
31
31
|
import { t as CustomActionRegistry } from "./custom-action-registry-B4Cf4O_X.mjs";
|
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
/** One address on one interface — the slice of `os.NetworkInterfaceInfo` this uses. */
|
|
2
|
+
export interface HostInterfaceAddress {
|
|
3
|
+
readonly address: string;
|
|
4
|
+
readonly internal: boolean;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* What the certificate needs to know about the machine it identifies.
|
|
8
|
+
*
|
|
9
|
+
* Injected rather than read, for the same reason `evaluateExistingCert`
|
|
10
|
+
* takes `now` instead of calling `Date.now()`: a rule whose inputs are
|
|
11
|
+
* ambient cannot be stated in a test, and a spec that reads the real
|
|
12
|
+
* `os.hostname()` is a statement about the machine running it. The CI
|
|
13
|
+
* runner and this laptop disagreed about both halves (D551).
|
|
14
|
+
*/
|
|
15
|
+
export interface HostFacts {
|
|
16
|
+
readonly hostname: string;
|
|
17
|
+
readonly networkInterfaces: Readonly<Record<string, readonly HostInterfaceAddress[] | undefined>>;
|
|
18
|
+
}
|
|
19
|
+
/** The real machine. The only place in `tls/` that touches `os`. */
|
|
20
|
+
export declare function systemHostFacts(): HostFacts;
|
|
1
21
|
/**
|
|
2
22
|
* Names/addresses that go INTO the certificate, and the subset whose
|
|
3
23
|
* absence forces a reissue.
|
|
@@ -17,6 +37,8 @@ export interface CertIdentity {
|
|
|
17
37
|
export interface CertIdentityOptions {
|
|
18
38
|
readonly commonName: string;
|
|
19
39
|
readonly extraSans: readonly string[];
|
|
40
|
+
/** The machine being certified. Defaults to {@link systemHostFacts}. */
|
|
41
|
+
readonly hostFacts?: HostFacts;
|
|
20
42
|
}
|
|
21
43
|
export declare function isIpv4(value: string): boolean;
|
|
22
44
|
export declare function isIpv6(value: string): boolean;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { webcrypto as WebCrypto } from 'node:crypto';
|
|
2
|
+
import { X509Certificate as PeculiarCertificate } from '@peculiar/x509';
|
|
3
|
+
import { CertIdentity } from './cert-identity.js';
|
|
4
|
+
/** Subject of the local root. Distinct from the leaf's CN by construction. */
|
|
5
|
+
export declare const CA_COMMON_NAME = "CamStack Local CA";
|
|
6
|
+
/** A PEM-encoded certificate and the PKCS#8 PEM of its private key. */
|
|
7
|
+
export interface CertMaterial {
|
|
8
|
+
readonly certPem: string;
|
|
9
|
+
readonly keyPem: string;
|
|
10
|
+
}
|
|
11
|
+
/** An issuing root: its PEM, and the live key handle needed to sign with it. */
|
|
12
|
+
export interface CaSigner {
|
|
13
|
+
readonly certPem: string;
|
|
14
|
+
readonly keyPem: string;
|
|
15
|
+
readonly cert: PeculiarCertificate;
|
|
16
|
+
readonly privateKey: WebCrypto.CryptoKey;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* A local root: 10 years, `pathlen:0` so it can sign leaves and nothing
|
|
20
|
+
* else, and **no EKU** — Apple rejects an anchor asserting
|
|
21
|
+
* `anyExtendedKeyUsage`, and a root with no EKU constrains nothing.
|
|
22
|
+
*/
|
|
23
|
+
export declare function generateCa(now: Date): Promise<CaSigner>;
|
|
24
|
+
/** Re-open a root already on disk so a leaf can be issued under it. */
|
|
25
|
+
export declare function loadCa(certPem: string, keyPem: string): Promise<CaSigner>;
|
|
26
|
+
/**
|
|
27
|
+
* A server leaf signed by the local root: `CA:FALSE`, and
|
|
28
|
+
* `extendedKeyUsage=serverAuth` — not `anyExtendedKeyUsage`, which
|
|
29
|
+
* Apple's `testAppTrustRoot_AnyEKU_AfterJul2019` asserts must fail.
|
|
30
|
+
*/
|
|
31
|
+
export declare function issueLeaf(ca: CaSigner, identity: CertIdentity, commonName: string, validDays: number, now: Date): Promise<CertMaterial>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CertRegenerationReason, evaluateExistingCert, MAX_LEAF_VALIDITY_DAYS } from './cert-evaluation.js';
|
|
2
|
-
import { CertIdentity, collectCertIdentity } from './cert-identity.js';
|
|
2
|
+
import { CertIdentity, HostFacts, collectCertIdentity } from './cert-identity.js';
|
|
3
3
|
export interface TlsCertPair {
|
|
4
4
|
readonly cert: Buffer;
|
|
5
5
|
readonly key: Buffer;
|
|
@@ -38,6 +38,12 @@ export interface CertOptions {
|
|
|
38
38
|
readonly validDays?: number;
|
|
39
39
|
/** Additional SANs (DNS names or IPs). Required coverage by definition. */
|
|
40
40
|
readonly extraSans?: readonly string[];
|
|
41
|
+
/**
|
|
42
|
+
* The machine being certified. Defaults to the real one; injected by the
|
|
43
|
+
* spec so the regeneration rule can be stated without reference to
|
|
44
|
+
* whichever box happens to run it (D551).
|
|
45
|
+
*/
|
|
46
|
+
readonly hostFacts?: HostFacts;
|
|
41
47
|
}
|
|
42
48
|
/**
|
|
43
49
|
* Ensure the hub has a usable TLS identity under `<dataDir>/tls`, made of
|
|
@@ -87,5 +93,5 @@ export declare function reissueTlsLeaf(dataDir: string, options?: CertOptions):
|
|
|
87
93
|
* root alongside the leaf.
|
|
88
94
|
*/
|
|
89
95
|
export declare function loadTlsCert(certPath: string, keyPath: string): TlsCertPair;
|
|
90
|
-
export type { CertIdentity, CertRegenerationReason };
|
|
96
|
+
export type { CertIdentity, CertRegenerationReason, HostFacts };
|
|
91
97
|
export { collectCertIdentity, evaluateExistingCert, MAX_LEAF_VALIDITY_DAYS };
|
package/dist/tls/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { CA_VALIDITY_DAYS, type CertEvaluationInput, LEAF_RENEWAL_WINDOW_DAYS, SERVER_AUTH_OID, } from './cert-evaluation.js';
|
|
2
|
-
export { type CertIdentity, type CertOptions, type CertRegenerationReason, collectCertIdentity, type EnsureTlsResult, ensureTlsCert, reissueTlsLeaf, evaluateExistingCert, loadTlsCert, MAX_LEAF_VALIDITY_DAYS, type TlsCertPair, } from './cert-manager.js';
|
|
3
|
-
export { CA_COMMON_NAME } from './cert-
|
|
2
|
+
export { type CertIdentity, type CertOptions, type HostFacts, type CertRegenerationReason, collectCertIdentity, type EnsureTlsResult, ensureTlsCert, reissueTlsLeaf, evaluateExistingCert, loadTlsCert, MAX_LEAF_VALIDITY_DAYS, type TlsCertPair, } from './cert-manager.js';
|
|
3
|
+
export { CA_COMMON_NAME } from './cert-issue.js';
|
|
4
4
|
export { validateUploadedTls, type UploadedTlsValidation } from './uploaded-cert.js';
|
|
5
5
|
export { type TlsAccessStatus, readTlsAccessStatus, writeTlsMode, readTlsMode, readExtraSans, writeExtraSans, } from './tls-status.js';
|