@camstack/addon-tailscale 1.2.78 → 1.2.79
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/client/tailscale.addon.js +1 -1
- package/dist/client/tailscale.addon.mjs +1 -1
- package/dist/{dist-D7_6qQjh.mjs → dist-D1SuHo0o.mjs} +125 -127
- package/dist/{dist-DH2eDLke.js → dist-D7Lg96JF.js} +125 -127
- package/dist/ingress/tailscale-ingress.addon.js +1 -1
- package/dist/ingress/tailscale-ingress.addon.mjs +1 -1
- package/package.json +1 -1
|
@@ -24,7 +24,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
24
|
enumerable: true
|
|
25
25
|
}) : target, mod));
|
|
26
26
|
//#endregion
|
|
27
|
-
const require_dist = require("../dist-
|
|
27
|
+
const require_dist = require("../dist-D7Lg96JF.js");
|
|
28
28
|
let node_child_process = require("node:child_process");
|
|
29
29
|
let node_util = require("node:util");
|
|
30
30
|
let node_fs = require("node:fs");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as EventCategory, i as BaseAddon, n as networkAccessCapability, r as BOOT_RECOVERY_BACKOFF_MS, t as meshNetworkCapability } from "../dist-
|
|
1
|
+
import { a as EventCategory, i as BaseAddon, n as networkAccessCapability, r as BOOT_RECOVERY_BACKOFF_MS, t as meshNetworkCapability } from "../dist-D1SuHo0o.mjs";
|
|
2
2
|
import { execFile, spawn } from "node:child_process";
|
|
3
3
|
import { promisify } from "node:util";
|
|
4
4
|
import * as fs from "node:fs";
|
|
@@ -7632,111 +7632,6 @@ var CameraSwitchGroupSchema = object({
|
|
|
7632
7632
|
fetchedAt: number()
|
|
7633
7633
|
});
|
|
7634
7634
|
/**
|
|
7635
|
-
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
7636
|
-
* an addon declares its channels in.
|
|
7637
|
-
*
|
|
7638
|
-
* ## Two axes, deliberately separated
|
|
7639
|
-
*
|
|
7640
|
-
* - **DECLARATION** — which channels exist. Only the addon knows:
|
|
7641
|
-
* `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
|
|
7642
|
-
* baichuan/handshake. A hand-wired central list rots at the first addition,
|
|
7643
|
-
* and rots silently. So a channel is declared where it is consulted, and the
|
|
7644
|
-
* `log-channels` capability enumerates the declarations.
|
|
7645
|
-
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
7646
|
-
* thing: the logging settings document on the `system` cap. Two authorities
|
|
7647
|
-
* over the values is the exact defect
|
|
7648
|
-
* `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
|
|
7649
|
-
* remove; re-introducing it from the cure side would be grotesque.
|
|
7650
|
-
*
|
|
7651
|
-
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
7652
|
-
* a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
|
|
7653
|
-
* the hot path with a value somebody actually read, and by
|
|
7654
|
-
* {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
|
|
7655
|
-
* never reaches here, so it can neither disarm an armed channel nor arm a
|
|
7656
|
-
* disarmed one (D49).
|
|
7657
|
-
*
|
|
7658
|
-
* ## The canonical call shape
|
|
7659
|
-
*
|
|
7660
|
-
* ```ts
|
|
7661
|
-
* if (CH_RTP.on && CH_RTP.wants(deviceId)) {
|
|
7662
|
-
* CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
|
|
7663
|
-
* }
|
|
7664
|
-
* ```
|
|
7665
|
-
*
|
|
7666
|
-
* `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
|
|
7667
|
-
* read. Disarmed, a call site costs one load and one branch, and the `extras`
|
|
7668
|
-
* object literal is never constructed because it lives inside the branch. It
|
|
7669
|
-
* is the same shape already proven in production at `stream-broker.ts:1650`,
|
|
7670
|
-
* and the same discipline `LoggingGate.allowsDestination` uses for the
|
|
7671
|
-
* destination floor (measured at 1.93 ns/call when off).
|
|
7672
|
-
*
|
|
7673
|
-
* ## Why a channel emits at `info`
|
|
7674
|
-
*
|
|
7675
|
-
* `loki-logging.addon.ts` pins the destination default at `info` and
|
|
7676
|
-
* `loki-destination.ts` drops everything below it, so a line emitted at
|
|
7677
|
-
* `debug` never reaches Loki and the hub's in-memory ring only holds ~35
|
|
7678
|
-
* minutes. A diagnostic that cannot be read an hour later is worse than no
|
|
7679
|
-
* diagnostic, because it looks done. {@link LogChannelGate.log} therefore
|
|
7680
|
-
* emits at the channel's declared level, whose schema floor is `info`.
|
|
7681
|
-
*/
|
|
7682
|
-
/**
|
|
7683
|
-
* The level a channel writes at once armed.
|
|
7684
|
-
*
|
|
7685
|
-
* `debug` is absent ON PURPOSE and not by omission: below `info` the line does
|
|
7686
|
-
* not leave the process for Loki, and the whole point of arming a channel is
|
|
7687
|
-
* to read it later.
|
|
7688
|
-
*/
|
|
7689
|
-
var LogChannelLevelSchema = _enum([
|
|
7690
|
-
"info",
|
|
7691
|
-
"warn",
|
|
7692
|
-
"error"
|
|
7693
|
-
]);
|
|
7694
|
-
/**
|
|
7695
|
-
* What an addon declares about one channel. No value, no state — a
|
|
7696
|
-
* declaration is inert.
|
|
7697
|
-
*/
|
|
7698
|
-
var LogChannelDescriptorSchema = object({
|
|
7699
|
-
/**
|
|
7700
|
-
* Dotted `area.thing`, unique across the workspace. `area` is conventionally
|
|
7701
|
-
* the addon's short name so an operator reading a channel list can tell who
|
|
7702
|
-
* owns it without a second lookup.
|
|
7703
|
-
*/
|
|
7704
|
-
name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
|
|
7705
|
-
/** One sentence: what the operator will SEE after arming it. */
|
|
7706
|
-
description: string().min(1),
|
|
7707
|
-
/** The level its lines are emitted at. Never below `info`. */
|
|
7708
|
-
defaultLevel: LogChannelLevelSchema,
|
|
7709
|
-
/**
|
|
7710
|
-
* Whether this channel can be narrowed to a camera.
|
|
7711
|
-
*
|
|
7712
|
-
* `true` is a PROMISE with two halves, and both must hold: the gate is
|
|
7713
|
-
* consulted with the numeric device id, AND every line the channel admits
|
|
7714
|
-
* carries `tags: { deviceId }` with that same numeric id. The second half is
|
|
7715
|
-
* what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
|
|
7716
|
-
* keeps `deviceId` out of the stream labels for cardinality, so the tag in
|
|
7717
|
-
* the body is the only way to filter.
|
|
7718
|
-
*
|
|
7719
|
-
* A channel whose lines carry the device only in `meta` (or not at all) is
|
|
7720
|
-
* declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
|
|
7721
|
-
* the operator narrows to one camera, sees nothing, and concludes the code
|
|
7722
|
-
* path was never taken.
|
|
7723
|
-
*/
|
|
7724
|
-
perDevice: boolean()
|
|
7725
|
-
});
|
|
7726
|
-
/**
|
|
7727
|
-
* An armed window over one channel, as the document hands it to a mirror.
|
|
7728
|
-
*
|
|
7729
|
-
* A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
|
|
7730
|
-
* expires by itself, which is the one failure a boolean cannot avoid.
|
|
7731
|
-
*/
|
|
7732
|
-
var LogChannelWindowSchema = object({
|
|
7733
|
-
channel: string().min(1),
|
|
7734
|
-
/** Epoch ms the window closes at. */
|
|
7735
|
-
armedUntilMs: number(),
|
|
7736
|
-
/** `null` = every camera. A non-empty list narrows to those numeric ids. */
|
|
7737
|
-
deviceIds: array(number().int()).readonly().nullable()
|
|
7738
|
-
});
|
|
7739
|
-
/**
|
|
7740
7635
|
* Ops-log — the durable, append-only operations audit shared by the
|
|
7741
7636
|
* recordings and events management surfaces.
|
|
7742
7637
|
*
|
|
@@ -8682,8 +8577,11 @@ var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
|
|
|
8682
8577
|
* `STORAGE_LOCATION_CARDINALITY` map has been removed.
|
|
8683
8578
|
*
|
|
8684
8579
|
* `id` is a stable namespaced string of the form `<type>:<slug>`.
|
|
8685
|
-
* The
|
|
8686
|
-
*
|
|
8580
|
+
* The seed names its first instance `<type>:default` — a NAME, not a flag.
|
|
8581
|
+
* There is no default location any more (D383): `enabled` is the whole write
|
|
8582
|
+
* model, and a bare type ref resolves to the sole location of the type, or —
|
|
8583
|
+
* transitionally, only while legacy NULL-stamped rows exist — to the row whose
|
|
8584
|
+
* slug is `default`.
|
|
8687
8585
|
*
|
|
8688
8586
|
* `isSystem` is a legacy persisted flag. Seed still creates the initial
|
|
8689
8587
|
* `<type>:default` locations; the flag is no longer a lock, a badge, or a
|
|
@@ -8704,21 +8602,20 @@ var StorageLocationSchema = object({
|
|
|
8704
8602
|
* flag at upsert time, not here (the schema is provider-agnostic).
|
|
8705
8603
|
*/
|
|
8706
8604
|
nodeId: string().optional(),
|
|
8707
|
-
isDefault: boolean().default(false),
|
|
8708
8605
|
isSystem: boolean().default(false),
|
|
8709
8606
|
/**
|
|
8710
|
-
*
|
|
8711
|
-
*
|
|
8712
|
-
*
|
|
8713
|
-
*
|
|
8714
|
-
*
|
|
8607
|
+
* THE write switch, and the only one (D383). `enabled: true` means every
|
|
8608
|
+
* consumer that chooses a write target for this type may write here, and all
|
|
8609
|
+
* enabled locations of a type are used TOGETHER; `false` means read-only —
|
|
8610
|
+
* still read, still played back, still age-swept, still drained, never
|
|
8611
|
+
* written.
|
|
8715
8612
|
*
|
|
8716
|
-
* OPTIONAL
|
|
8717
|
-
*
|
|
8718
|
-
*
|
|
8719
|
-
*
|
|
8720
|
-
*
|
|
8721
|
-
*
|
|
8613
|
+
* OPTIONAL only for the wire: an upsert that omits it means "leave what is
|
|
8614
|
+
* stored" on an update and "born inert unless it is the first location of its
|
|
8615
|
+
* type" on a create. On a PERSISTED row absence is legacy and it means
|
|
8616
|
+
* enabled — {@link isLocationEnabled} is the one place that says so, and the
|
|
8617
|
+
* orchestrator stamps every flagless row `true` once at hydrate so absence
|
|
8618
|
+
* stops existing rather than being re-derived on every read.
|
|
8722
8619
|
*/
|
|
8723
8620
|
enabled: boolean().optional(),
|
|
8724
8621
|
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
@@ -8731,10 +8628,12 @@ var StorageLocationSchema = object({
|
|
|
8731
8628
|
createdAt: number(),
|
|
8732
8629
|
updatedAt: number()
|
|
8733
8630
|
});
|
|
8631
|
+
object({ isDefault: boolean().optional() });
|
|
8734
8632
|
/**
|
|
8735
8633
|
* Reference accepted by consumer-facing `api.storage.*` calls.
|
|
8736
8634
|
* Either:
|
|
8737
|
-
* - a `StorageLocationType` (e.g. `'backups'`) →
|
|
8635
|
+
* - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
|
|
8636
|
+
* (transitionally, the `<type>:default`-slugged row when several exist)
|
|
8738
8637
|
* - a fully-qualified id (e.g. `'backups:nas-01'`) → addresses a specific instance
|
|
8739
8638
|
*
|
|
8740
8639
|
* The orchestrator's `resolveRef(ref)` handles both cases.
|
|
@@ -8910,6 +8809,111 @@ var DecoderSessionConfigSchema = object({
|
|
|
8910
8809
|
*/
|
|
8911
8810
|
debug: boolean().optional()
|
|
8912
8811
|
});
|
|
8812
|
+
/**
|
|
8813
|
+
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
8814
|
+
* an addon declares its channels in.
|
|
8815
|
+
*
|
|
8816
|
+
* ## Two axes, deliberately separated
|
|
8817
|
+
*
|
|
8818
|
+
* - **DECLARATION** — which channels exist. Only the addon knows:
|
|
8819
|
+
* `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
|
|
8820
|
+
* baichuan/handshake. A hand-wired central list rots at the first addition,
|
|
8821
|
+
* and rots silently. So a channel is declared where it is consulted, and the
|
|
8822
|
+
* `log-channels` capability enumerates the declarations.
|
|
8823
|
+
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
8824
|
+
* thing: the logging settings document on the `system` cap. Two authorities
|
|
8825
|
+
* over the values is the exact defect
|
|
8826
|
+
* `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
|
|
8827
|
+
* remove; re-introducing it from the cure side would be grotesque.
|
|
8828
|
+
*
|
|
8829
|
+
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
8830
|
+
* a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
|
|
8831
|
+
* the hot path with a value somebody actually read, and by
|
|
8832
|
+
* {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
|
|
8833
|
+
* never reaches here, so it can neither disarm an armed channel nor arm a
|
|
8834
|
+
* disarmed one (D49).
|
|
8835
|
+
*
|
|
8836
|
+
* ## The canonical call shape
|
|
8837
|
+
*
|
|
8838
|
+
* ```ts
|
|
8839
|
+
* if (CH_RTP.on && CH_RTP.wants(deviceId)) {
|
|
8840
|
+
* CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
|
|
8841
|
+
* }
|
|
8842
|
+
* ```
|
|
8843
|
+
*
|
|
8844
|
+
* `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
|
|
8845
|
+
* read. Disarmed, a call site costs one load and one branch, and the `extras`
|
|
8846
|
+
* object literal is never constructed because it lives inside the branch. It
|
|
8847
|
+
* is the same shape already proven in production at `stream-broker.ts:1650`,
|
|
8848
|
+
* and the same discipline `LoggingGate.allowsDestination` uses for the
|
|
8849
|
+
* destination floor (measured at 1.93 ns/call when off).
|
|
8850
|
+
*
|
|
8851
|
+
* ## Why a channel emits at `info`
|
|
8852
|
+
*
|
|
8853
|
+
* `loki-logging.addon.ts` pins the destination default at `info` and
|
|
8854
|
+
* `loki-destination.ts` drops everything below it, so a line emitted at
|
|
8855
|
+
* `debug` never reaches Loki and the hub's in-memory ring only holds ~35
|
|
8856
|
+
* minutes. A diagnostic that cannot be read an hour later is worse than no
|
|
8857
|
+
* diagnostic, because it looks done. {@link LogChannelGate.log} therefore
|
|
8858
|
+
* emits at the channel's declared level, whose schema floor is `info`.
|
|
8859
|
+
*/
|
|
8860
|
+
/**
|
|
8861
|
+
* The level a channel writes at once armed.
|
|
8862
|
+
*
|
|
8863
|
+
* `debug` is absent ON PURPOSE and not by omission: below `info` the line does
|
|
8864
|
+
* not leave the process for Loki, and the whole point of arming a channel is
|
|
8865
|
+
* to read it later.
|
|
8866
|
+
*/
|
|
8867
|
+
var LogChannelLevelSchema = _enum([
|
|
8868
|
+
"info",
|
|
8869
|
+
"warn",
|
|
8870
|
+
"error"
|
|
8871
|
+
]);
|
|
8872
|
+
/**
|
|
8873
|
+
* What an addon declares about one channel. No value, no state — a
|
|
8874
|
+
* declaration is inert.
|
|
8875
|
+
*/
|
|
8876
|
+
var LogChannelDescriptorSchema = object({
|
|
8877
|
+
/**
|
|
8878
|
+
* Dotted `area.thing`, unique across the workspace. `area` is conventionally
|
|
8879
|
+
* the addon's short name so an operator reading a channel list can tell who
|
|
8880
|
+
* owns it without a second lookup.
|
|
8881
|
+
*/
|
|
8882
|
+
name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
|
|
8883
|
+
/** One sentence: what the operator will SEE after arming it. */
|
|
8884
|
+
description: string().min(1),
|
|
8885
|
+
/** The level its lines are emitted at. Never below `info`. */
|
|
8886
|
+
defaultLevel: LogChannelLevelSchema,
|
|
8887
|
+
/**
|
|
8888
|
+
* Whether this channel can be narrowed to a camera.
|
|
8889
|
+
*
|
|
8890
|
+
* `true` is a PROMISE with two halves, and both must hold: the gate is
|
|
8891
|
+
* consulted with the numeric device id, AND every line the channel admits
|
|
8892
|
+
* carries `tags: { deviceId }` with that same numeric id. The second half is
|
|
8893
|
+
* what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
|
|
8894
|
+
* keeps `deviceId` out of the stream labels for cardinality, so the tag in
|
|
8895
|
+
* the body is the only way to filter.
|
|
8896
|
+
*
|
|
8897
|
+
* A channel whose lines carry the device only in `meta` (or not at all) is
|
|
8898
|
+
* declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
|
|
8899
|
+
* the operator narrows to one camera, sees nothing, and concludes the code
|
|
8900
|
+
* path was never taken.
|
|
8901
|
+
*/
|
|
8902
|
+
perDevice: boolean()
|
|
8903
|
+
});
|
|
8904
|
+
/**
|
|
8905
|
+
* An armed window over one channel, as the document hands it to a mirror.
|
|
8906
|
+
*
|
|
8907
|
+
* A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
|
|
8908
|
+
* expires by itself, which is the one failure a boolean cannot avoid.
|
|
8909
|
+
*/
|
|
8910
|
+
var LogChannelWindowSchema = object({
|
|
8911
|
+
channel: string().min(1),
|
|
8912
|
+
/** Epoch ms the window closes at. */
|
|
8913
|
+
armedUntilMs: number(),
|
|
8914
|
+
/** `null` = every camera. A non-empty list narrows to those numeric ids. */
|
|
8915
|
+
deviceIds: array(number().int()).readonly().nullable()
|
|
8916
|
+
});
|
|
8913
8917
|
var MODEL_FORMATS = [
|
|
8914
8918
|
"onnx",
|
|
8915
8919
|
"coreml",
|
|
@@ -21591,7 +21595,7 @@ method(object({
|
|
|
21591
21595
|
downloadId: string(),
|
|
21592
21596
|
offset: number(),
|
|
21593
21597
|
length: number()
|
|
21594
|
-
}), _instanceof(Uint8Array)), method(object({ downloadId: string() }), _void(), { kind: "mutation" }), method(object({ type: StorageLocationTypeSchema.optional() }), array(StorageLocationSchema).readonly()), method(
|
|
21598
|
+
}), _instanceof(Uint8Array)), method(object({ downloadId: string() }), _void(), { kind: "mutation" }), method(object({ type: StorageLocationTypeSchema.optional() }), array(StorageLocationSchema).readonly()), method(_void(), array(StorageLocationDeclarationSchema).readonly()), method(StorageLocationSchema.omit({
|
|
21595
21599
|
createdAt: true,
|
|
21596
21600
|
updatedAt: true
|
|
21597
21601
|
}), StorageLocationSchema, {
|
|
@@ -34501,12 +34505,6 @@ Object.freeze({
|
|
|
34501
34505
|
addonId: null,
|
|
34502
34506
|
access: "view"
|
|
34503
34507
|
},
|
|
34504
|
-
"storage.getDefaultLocation": {
|
|
34505
|
-
capName: "storage",
|
|
34506
|
-
capScope: "system",
|
|
34507
|
-
addonId: null,
|
|
34508
|
-
access: "view"
|
|
34509
|
-
},
|
|
34510
34508
|
"storage.list": {
|
|
34511
34509
|
capName: "storage",
|
|
34512
34510
|
capScope: "system",
|
|
@@ -7632,111 +7632,6 @@ var CameraSwitchGroupSchema = object({
|
|
|
7632
7632
|
fetchedAt: number()
|
|
7633
7633
|
});
|
|
7634
7634
|
/**
|
|
7635
|
-
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
7636
|
-
* an addon declares its channels in.
|
|
7637
|
-
*
|
|
7638
|
-
* ## Two axes, deliberately separated
|
|
7639
|
-
*
|
|
7640
|
-
* - **DECLARATION** — which channels exist. Only the addon knows:
|
|
7641
|
-
* `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
|
|
7642
|
-
* baichuan/handshake. A hand-wired central list rots at the first addition,
|
|
7643
|
-
* and rots silently. So a channel is declared where it is consulted, and the
|
|
7644
|
-
* `log-channels` capability enumerates the declarations.
|
|
7645
|
-
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
7646
|
-
* thing: the logging settings document on the `system` cap. Two authorities
|
|
7647
|
-
* over the values is the exact defect
|
|
7648
|
-
* `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
|
|
7649
|
-
* remove; re-introducing it from the cure side would be grotesque.
|
|
7650
|
-
*
|
|
7651
|
-
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
7652
|
-
* a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
|
|
7653
|
-
* the hot path with a value somebody actually read, and by
|
|
7654
|
-
* {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
|
|
7655
|
-
* never reaches here, so it can neither disarm an armed channel nor arm a
|
|
7656
|
-
* disarmed one (D49).
|
|
7657
|
-
*
|
|
7658
|
-
* ## The canonical call shape
|
|
7659
|
-
*
|
|
7660
|
-
* ```ts
|
|
7661
|
-
* if (CH_RTP.on && CH_RTP.wants(deviceId)) {
|
|
7662
|
-
* CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
|
|
7663
|
-
* }
|
|
7664
|
-
* ```
|
|
7665
|
-
*
|
|
7666
|
-
* `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
|
|
7667
|
-
* read. Disarmed, a call site costs one load and one branch, and the `extras`
|
|
7668
|
-
* object literal is never constructed because it lives inside the branch. It
|
|
7669
|
-
* is the same shape already proven in production at `stream-broker.ts:1650`,
|
|
7670
|
-
* and the same discipline `LoggingGate.allowsDestination` uses for the
|
|
7671
|
-
* destination floor (measured at 1.93 ns/call when off).
|
|
7672
|
-
*
|
|
7673
|
-
* ## Why a channel emits at `info`
|
|
7674
|
-
*
|
|
7675
|
-
* `loki-logging.addon.ts` pins the destination default at `info` and
|
|
7676
|
-
* `loki-destination.ts` drops everything below it, so a line emitted at
|
|
7677
|
-
* `debug` never reaches Loki and the hub's in-memory ring only holds ~35
|
|
7678
|
-
* minutes. A diagnostic that cannot be read an hour later is worse than no
|
|
7679
|
-
* diagnostic, because it looks done. {@link LogChannelGate.log} therefore
|
|
7680
|
-
* emits at the channel's declared level, whose schema floor is `info`.
|
|
7681
|
-
*/
|
|
7682
|
-
/**
|
|
7683
|
-
* The level a channel writes at once armed.
|
|
7684
|
-
*
|
|
7685
|
-
* `debug` is absent ON PURPOSE and not by omission: below `info` the line does
|
|
7686
|
-
* not leave the process for Loki, and the whole point of arming a channel is
|
|
7687
|
-
* to read it later.
|
|
7688
|
-
*/
|
|
7689
|
-
var LogChannelLevelSchema = _enum([
|
|
7690
|
-
"info",
|
|
7691
|
-
"warn",
|
|
7692
|
-
"error"
|
|
7693
|
-
]);
|
|
7694
|
-
/**
|
|
7695
|
-
* What an addon declares about one channel. No value, no state — a
|
|
7696
|
-
* declaration is inert.
|
|
7697
|
-
*/
|
|
7698
|
-
var LogChannelDescriptorSchema = object({
|
|
7699
|
-
/**
|
|
7700
|
-
* Dotted `area.thing`, unique across the workspace. `area` is conventionally
|
|
7701
|
-
* the addon's short name so an operator reading a channel list can tell who
|
|
7702
|
-
* owns it without a second lookup.
|
|
7703
|
-
*/
|
|
7704
|
-
name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
|
|
7705
|
-
/** One sentence: what the operator will SEE after arming it. */
|
|
7706
|
-
description: string().min(1),
|
|
7707
|
-
/** The level its lines are emitted at. Never below `info`. */
|
|
7708
|
-
defaultLevel: LogChannelLevelSchema,
|
|
7709
|
-
/**
|
|
7710
|
-
* Whether this channel can be narrowed to a camera.
|
|
7711
|
-
*
|
|
7712
|
-
* `true` is a PROMISE with two halves, and both must hold: the gate is
|
|
7713
|
-
* consulted with the numeric device id, AND every line the channel admits
|
|
7714
|
-
* carries `tags: { deviceId }` with that same numeric id. The second half is
|
|
7715
|
-
* what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
|
|
7716
|
-
* keeps `deviceId` out of the stream labels for cardinality, so the tag in
|
|
7717
|
-
* the body is the only way to filter.
|
|
7718
|
-
*
|
|
7719
|
-
* A channel whose lines carry the device only in `meta` (or not at all) is
|
|
7720
|
-
* declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
|
|
7721
|
-
* the operator narrows to one camera, sees nothing, and concludes the code
|
|
7722
|
-
* path was never taken.
|
|
7723
|
-
*/
|
|
7724
|
-
perDevice: boolean()
|
|
7725
|
-
});
|
|
7726
|
-
/**
|
|
7727
|
-
* An armed window over one channel, as the document hands it to a mirror.
|
|
7728
|
-
*
|
|
7729
|
-
* A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
|
|
7730
|
-
* expires by itself, which is the one failure a boolean cannot avoid.
|
|
7731
|
-
*/
|
|
7732
|
-
var LogChannelWindowSchema = object({
|
|
7733
|
-
channel: string().min(1),
|
|
7734
|
-
/** Epoch ms the window closes at. */
|
|
7735
|
-
armedUntilMs: number(),
|
|
7736
|
-
/** `null` = every camera. A non-empty list narrows to those numeric ids. */
|
|
7737
|
-
deviceIds: array(number().int()).readonly().nullable()
|
|
7738
|
-
});
|
|
7739
|
-
/**
|
|
7740
7635
|
* Ops-log — the durable, append-only operations audit shared by the
|
|
7741
7636
|
* recordings and events management surfaces.
|
|
7742
7637
|
*
|
|
@@ -8682,8 +8577,11 @@ var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
|
|
|
8682
8577
|
* `STORAGE_LOCATION_CARDINALITY` map has been removed.
|
|
8683
8578
|
*
|
|
8684
8579
|
* `id` is a stable namespaced string of the form `<type>:<slug>`.
|
|
8685
|
-
* The
|
|
8686
|
-
*
|
|
8580
|
+
* The seed names its first instance `<type>:default` — a NAME, not a flag.
|
|
8581
|
+
* There is no default location any more (D383): `enabled` is the whole write
|
|
8582
|
+
* model, and a bare type ref resolves to the sole location of the type, or —
|
|
8583
|
+
* transitionally, only while legacy NULL-stamped rows exist — to the row whose
|
|
8584
|
+
* slug is `default`.
|
|
8687
8585
|
*
|
|
8688
8586
|
* `isSystem` is a legacy persisted flag. Seed still creates the initial
|
|
8689
8587
|
* `<type>:default` locations; the flag is no longer a lock, a badge, or a
|
|
@@ -8704,21 +8602,20 @@ var StorageLocationSchema = object({
|
|
|
8704
8602
|
* flag at upsert time, not here (the schema is provider-agnostic).
|
|
8705
8603
|
*/
|
|
8706
8604
|
nodeId: string().optional(),
|
|
8707
|
-
isDefault: boolean().default(false),
|
|
8708
8605
|
isSystem: boolean().default(false),
|
|
8709
8606
|
/**
|
|
8710
|
-
*
|
|
8711
|
-
*
|
|
8712
|
-
*
|
|
8713
|
-
*
|
|
8714
|
-
*
|
|
8607
|
+
* THE write switch, and the only one (D383). `enabled: true` means every
|
|
8608
|
+
* consumer that chooses a write target for this type may write here, and all
|
|
8609
|
+
* enabled locations of a type are used TOGETHER; `false` means read-only —
|
|
8610
|
+
* still read, still played back, still age-swept, still drained, never
|
|
8611
|
+
* written.
|
|
8715
8612
|
*
|
|
8716
|
-
* OPTIONAL
|
|
8717
|
-
*
|
|
8718
|
-
*
|
|
8719
|
-
*
|
|
8720
|
-
*
|
|
8721
|
-
*
|
|
8613
|
+
* OPTIONAL only for the wire: an upsert that omits it means "leave what is
|
|
8614
|
+
* stored" on an update and "born inert unless it is the first location of its
|
|
8615
|
+
* type" on a create. On a PERSISTED row absence is legacy and it means
|
|
8616
|
+
* enabled — {@link isLocationEnabled} is the one place that says so, and the
|
|
8617
|
+
* orchestrator stamps every flagless row `true` once at hydrate so absence
|
|
8618
|
+
* stops existing rather than being re-derived on every read.
|
|
8722
8619
|
*/
|
|
8723
8620
|
enabled: boolean().optional(),
|
|
8724
8621
|
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
@@ -8731,10 +8628,12 @@ var StorageLocationSchema = object({
|
|
|
8731
8628
|
createdAt: number(),
|
|
8732
8629
|
updatedAt: number()
|
|
8733
8630
|
});
|
|
8631
|
+
object({ isDefault: boolean().optional() });
|
|
8734
8632
|
/**
|
|
8735
8633
|
* Reference accepted by consumer-facing `api.storage.*` calls.
|
|
8736
8634
|
* Either:
|
|
8737
|
-
* - a `StorageLocationType` (e.g. `'backups'`) →
|
|
8635
|
+
* - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
|
|
8636
|
+
* (transitionally, the `<type>:default`-slugged row when several exist)
|
|
8738
8637
|
* - a fully-qualified id (e.g. `'backups:nas-01'`) → addresses a specific instance
|
|
8739
8638
|
*
|
|
8740
8639
|
* The orchestrator's `resolveRef(ref)` handles both cases.
|
|
@@ -8910,6 +8809,111 @@ var DecoderSessionConfigSchema = object({
|
|
|
8910
8809
|
*/
|
|
8911
8810
|
debug: boolean().optional()
|
|
8912
8811
|
});
|
|
8812
|
+
/**
|
|
8813
|
+
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
8814
|
+
* an addon declares its channels in.
|
|
8815
|
+
*
|
|
8816
|
+
* ## Two axes, deliberately separated
|
|
8817
|
+
*
|
|
8818
|
+
* - **DECLARATION** — which channels exist. Only the addon knows:
|
|
8819
|
+
* `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
|
|
8820
|
+
* baichuan/handshake. A hand-wired central list rots at the first addition,
|
|
8821
|
+
* and rots silently. So a channel is declared where it is consulted, and the
|
|
8822
|
+
* `log-channels` capability enumerates the declarations.
|
|
8823
|
+
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
8824
|
+
* thing: the logging settings document on the `system` cap. Two authorities
|
|
8825
|
+
* over the values is the exact defect
|
|
8826
|
+
* `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
|
|
8827
|
+
* remove; re-introducing it from the cure side would be grotesque.
|
|
8828
|
+
*
|
|
8829
|
+
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
8830
|
+
* a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
|
|
8831
|
+
* the hot path with a value somebody actually read, and by
|
|
8832
|
+
* {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
|
|
8833
|
+
* never reaches here, so it can neither disarm an armed channel nor arm a
|
|
8834
|
+
* disarmed one (D49).
|
|
8835
|
+
*
|
|
8836
|
+
* ## The canonical call shape
|
|
8837
|
+
*
|
|
8838
|
+
* ```ts
|
|
8839
|
+
* if (CH_RTP.on && CH_RTP.wants(deviceId)) {
|
|
8840
|
+
* CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
|
|
8841
|
+
* }
|
|
8842
|
+
* ```
|
|
8843
|
+
*
|
|
8844
|
+
* `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
|
|
8845
|
+
* read. Disarmed, a call site costs one load and one branch, and the `extras`
|
|
8846
|
+
* object literal is never constructed because it lives inside the branch. It
|
|
8847
|
+
* is the same shape already proven in production at `stream-broker.ts:1650`,
|
|
8848
|
+
* and the same discipline `LoggingGate.allowsDestination` uses for the
|
|
8849
|
+
* destination floor (measured at 1.93 ns/call when off).
|
|
8850
|
+
*
|
|
8851
|
+
* ## Why a channel emits at `info`
|
|
8852
|
+
*
|
|
8853
|
+
* `loki-logging.addon.ts` pins the destination default at `info` and
|
|
8854
|
+
* `loki-destination.ts` drops everything below it, so a line emitted at
|
|
8855
|
+
* `debug` never reaches Loki and the hub's in-memory ring only holds ~35
|
|
8856
|
+
* minutes. A diagnostic that cannot be read an hour later is worse than no
|
|
8857
|
+
* diagnostic, because it looks done. {@link LogChannelGate.log} therefore
|
|
8858
|
+
* emits at the channel's declared level, whose schema floor is `info`.
|
|
8859
|
+
*/
|
|
8860
|
+
/**
|
|
8861
|
+
* The level a channel writes at once armed.
|
|
8862
|
+
*
|
|
8863
|
+
* `debug` is absent ON PURPOSE and not by omission: below `info` the line does
|
|
8864
|
+
* not leave the process for Loki, and the whole point of arming a channel is
|
|
8865
|
+
* to read it later.
|
|
8866
|
+
*/
|
|
8867
|
+
var LogChannelLevelSchema = _enum([
|
|
8868
|
+
"info",
|
|
8869
|
+
"warn",
|
|
8870
|
+
"error"
|
|
8871
|
+
]);
|
|
8872
|
+
/**
|
|
8873
|
+
* What an addon declares about one channel. No value, no state — a
|
|
8874
|
+
* declaration is inert.
|
|
8875
|
+
*/
|
|
8876
|
+
var LogChannelDescriptorSchema = object({
|
|
8877
|
+
/**
|
|
8878
|
+
* Dotted `area.thing`, unique across the workspace. `area` is conventionally
|
|
8879
|
+
* the addon's short name so an operator reading a channel list can tell who
|
|
8880
|
+
* owns it without a second lookup.
|
|
8881
|
+
*/
|
|
8882
|
+
name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
|
|
8883
|
+
/** One sentence: what the operator will SEE after arming it. */
|
|
8884
|
+
description: string().min(1),
|
|
8885
|
+
/** The level its lines are emitted at. Never below `info`. */
|
|
8886
|
+
defaultLevel: LogChannelLevelSchema,
|
|
8887
|
+
/**
|
|
8888
|
+
* Whether this channel can be narrowed to a camera.
|
|
8889
|
+
*
|
|
8890
|
+
* `true` is a PROMISE with two halves, and both must hold: the gate is
|
|
8891
|
+
* consulted with the numeric device id, AND every line the channel admits
|
|
8892
|
+
* carries `tags: { deviceId }` with that same numeric id. The second half is
|
|
8893
|
+
* what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
|
|
8894
|
+
* keeps `deviceId` out of the stream labels for cardinality, so the tag in
|
|
8895
|
+
* the body is the only way to filter.
|
|
8896
|
+
*
|
|
8897
|
+
* A channel whose lines carry the device only in `meta` (or not at all) is
|
|
8898
|
+
* declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
|
|
8899
|
+
* the operator narrows to one camera, sees nothing, and concludes the code
|
|
8900
|
+
* path was never taken.
|
|
8901
|
+
*/
|
|
8902
|
+
perDevice: boolean()
|
|
8903
|
+
});
|
|
8904
|
+
/**
|
|
8905
|
+
* An armed window over one channel, as the document hands it to a mirror.
|
|
8906
|
+
*
|
|
8907
|
+
* A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
|
|
8908
|
+
* expires by itself, which is the one failure a boolean cannot avoid.
|
|
8909
|
+
*/
|
|
8910
|
+
var LogChannelWindowSchema = object({
|
|
8911
|
+
channel: string().min(1),
|
|
8912
|
+
/** Epoch ms the window closes at. */
|
|
8913
|
+
armedUntilMs: number(),
|
|
8914
|
+
/** `null` = every camera. A non-empty list narrows to those numeric ids. */
|
|
8915
|
+
deviceIds: array(number().int()).readonly().nullable()
|
|
8916
|
+
});
|
|
8913
8917
|
var MODEL_FORMATS = [
|
|
8914
8918
|
"onnx",
|
|
8915
8919
|
"coreml",
|
|
@@ -21591,7 +21595,7 @@ method(object({
|
|
|
21591
21595
|
downloadId: string(),
|
|
21592
21596
|
offset: number(),
|
|
21593
21597
|
length: number()
|
|
21594
|
-
}), _instanceof(Uint8Array)), method(object({ downloadId: string() }), _void(), { kind: "mutation" }), method(object({ type: StorageLocationTypeSchema.optional() }), array(StorageLocationSchema).readonly()), method(
|
|
21598
|
+
}), _instanceof(Uint8Array)), method(object({ downloadId: string() }), _void(), { kind: "mutation" }), method(object({ type: StorageLocationTypeSchema.optional() }), array(StorageLocationSchema).readonly()), method(_void(), array(StorageLocationDeclarationSchema).readonly()), method(StorageLocationSchema.omit({
|
|
21595
21599
|
createdAt: true,
|
|
21596
21600
|
updatedAt: true
|
|
21597
21601
|
}), StorageLocationSchema, {
|
|
@@ -34501,12 +34505,6 @@ Object.freeze({
|
|
|
34501
34505
|
addonId: null,
|
|
34502
34506
|
access: "view"
|
|
34503
34507
|
},
|
|
34504
|
-
"storage.getDefaultLocation": {
|
|
34505
|
-
capName: "storage",
|
|
34506
|
-
capScope: "system",
|
|
34507
|
-
addonId: null,
|
|
34508
|
-
access: "view"
|
|
34509
|
-
},
|
|
34510
34508
|
"storage.list": {
|
|
34511
34509
|
capName: "storage",
|
|
34512
34510
|
capScope: "system",
|
|
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_dist = require("../dist-
|
|
5
|
+
const require_dist = require("../dist-D7Lg96JF.js");
|
|
6
6
|
let node_crypto = require("node:crypto");
|
|
7
7
|
let node_child_process = require("node:child_process");
|
|
8
8
|
//#region src/ingress/tailscale-cli.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as EventCategory, i as BaseAddon, n as networkAccessCapability } from "../dist-
|
|
1
|
+
import { a as EventCategory, i as BaseAddon, n as networkAccessCapability } from "../dist-D1SuHo0o.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import { execFile } from "node:child_process";
|
|
4
4
|
import { promisify } from "node:util";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-tailscale",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.79",
|
|
4
4
|
"description": "Tailscale bundle for CamStack — joins the host to a tailnet (client) and exposes the hub via Serve/Funnel (ingress). Multi-entry npm package shipping 2 addons under a single bundle.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|