@camstack/types 1.2.354 → 1.2.356
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/addon.d.ts +7 -1
- package/dist/addon.js +1685 -1
- package/dist/addon.mjs +1679 -2
- package/dist/{composition-Bzr7GwgP.mjs → composition-C-WpVYTX.mjs} +22 -0
- package/dist/{composition-BLWAivB2.js → composition-DCYnv4I6.js} +22 -0
- package/dist/deps/archive-extract.d.ts +11 -0
- package/dist/deps/binary-downloader.d.ts +9 -0
- package/dist/deps/python-downloader.d.ts +4 -0
- package/dist/deps/zip-extract.d.ts +1 -0
- package/dist/generated/addon-api.d.ts +22 -0
- package/dist/generated/addon-cap-facts.d.ts +20 -0
- package/dist/index.js +17 -164
- package/dist/index.mjs +4 -151
- package/dist/node.d.ts +2 -0
- package/dist/node.js +334 -56
- package/dist/node.mjs +330 -58
- package/dist/{sleep-SgkKj2bk.js → sleep-BFVY4_xY.js} +198 -0
- package/dist/{sleep-Tkp9dHXv.mjs → sleep-vWTnHq9G.mjs} +157 -1
- package/dist/types/model-formats.d.ts +9 -0
- package/dist/types/models.d.ts +4 -2
- package/dist/util/owner-only-file.d.ts +28 -0
- package/package.json +1 -1
|
@@ -812,6 +812,28 @@ var FFMPEG_ARTIFACTS = {
|
|
|
812
812
|
sha256: "021cd321ea169722cd2e4aca35884305449666a0d231d3378af7f87d6a5626e5",
|
|
813
813
|
sizeBytes: 37852180,
|
|
814
814
|
expectedHwaccels: ["videotoolbox"]
|
|
815
|
+
},
|
|
816
|
+
/**
|
|
817
|
+
* Windows x64 — the same jellyfin-ffmpeg release, GPL, from the project's
|
|
818
|
+
* own `win64-clang-gpl` leg (a flat zip: `ffmpeg.exe` + `ffprobe.exe`,
|
|
819
|
+
* statically linked, so nothing to install beside it). Hashed 2026-10-13.
|
|
820
|
+
*
|
|
821
|
+
* NOT executed: it was verified by reading the build's own configuration
|
|
822
|
+
* string out of the binary (`--enable-gpl --enable-version3 --enable-dxva2
|
|
823
|
+
* --enable-d3d11va --enable-d3d12va --enable-amf --enable-libvpl
|
|
824
|
+
* --enable-nvenc --enable-vulkan --enable-opencl`), which is the same
|
|
825
|
+
* codec/feature set as the linux build plus the Windows hwaccel API family.
|
|
826
|
+
* `expectedHwaccels` claims only what that string guarantees; the first real
|
|
827
|
+
* Windows node confirms it or trips the assertion, which is what it is for.
|
|
828
|
+
* AMF/NVENC/QSV are encoders and vendor runtimes (they need the GPU driver),
|
|
829
|
+
* so they are not claimed here.
|
|
830
|
+
*/
|
|
831
|
+
"win32-x64": {
|
|
832
|
+
url: `${BASE}/jellyfin-ffmpeg_${FFMPEG_RELEASE}_portable_win64-clang-gpl.zip`,
|
|
833
|
+
archiveFormat: "zip",
|
|
834
|
+
sha256: "4bb79f3d1e4092404eafe3fb3b0101e196f8eb00355201f60314e5ba21447b82",
|
|
835
|
+
sizeBytes: 67819203,
|
|
836
|
+
expectedHwaccels: ["d3d11va", "dxva2"]
|
|
815
837
|
}
|
|
816
838
|
};
|
|
817
839
|
/** The artifact for this node, or a refusal naming what was asked for. */
|
|
@@ -812,6 +812,28 @@ var FFMPEG_ARTIFACTS = {
|
|
|
812
812
|
sha256: "021cd321ea169722cd2e4aca35884305449666a0d231d3378af7f87d6a5626e5",
|
|
813
813
|
sizeBytes: 37852180,
|
|
814
814
|
expectedHwaccels: ["videotoolbox"]
|
|
815
|
+
},
|
|
816
|
+
/**
|
|
817
|
+
* Windows x64 — the same jellyfin-ffmpeg release, GPL, from the project's
|
|
818
|
+
* own `win64-clang-gpl` leg (a flat zip: `ffmpeg.exe` + `ffprobe.exe`,
|
|
819
|
+
* statically linked, so nothing to install beside it). Hashed 2026-10-13.
|
|
820
|
+
*
|
|
821
|
+
* NOT executed: it was verified by reading the build's own configuration
|
|
822
|
+
* string out of the binary (`--enable-gpl --enable-version3 --enable-dxva2
|
|
823
|
+
* --enable-d3d11va --enable-d3d12va --enable-amf --enable-libvpl
|
|
824
|
+
* --enable-nvenc --enable-vulkan --enable-opencl`), which is the same
|
|
825
|
+
* codec/feature set as the linux build plus the Windows hwaccel API family.
|
|
826
|
+
* `expectedHwaccels` claims only what that string guarantees; the first real
|
|
827
|
+
* Windows node confirms it or trips the assertion, which is what it is for.
|
|
828
|
+
* AMF/NVENC/QSV are encoders and vendor runtimes (they need the GPU driver),
|
|
829
|
+
* so they are not claimed here.
|
|
830
|
+
*/
|
|
831
|
+
"win32-x64": {
|
|
832
|
+
url: `${BASE}/jellyfin-ffmpeg_${FFMPEG_RELEASE}_portable_win64-clang-gpl.zip`,
|
|
833
|
+
archiveFormat: "zip",
|
|
834
|
+
sha256: "4bb79f3d1e4092404eafe3fb3b0101e196f8eb00355201f60314e5ba21447b82",
|
|
835
|
+
sizeBytes: 67819203,
|
|
836
|
+
expectedHwaccels: ["d3d11va", "dxva2"]
|
|
815
837
|
}
|
|
816
838
|
};
|
|
817
839
|
/** The artifact for this node, or a refusal naming what was asked for. */
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type ArchiveFormat = 'zip' | 'tar.gz' | 'tar.xz';
|
|
2
|
+
export type ExecFile = (file: string, args: readonly string[]) => unknown;
|
|
3
|
+
export interface ExtractDeps {
|
|
4
|
+
readonly platform: NodeJS.Platform;
|
|
5
|
+
readonly systemRoot: string | undefined;
|
|
6
|
+
readonly exec: ExecFile;
|
|
7
|
+
readonly extractZip: (archivePath: string, destDir: string) => void;
|
|
8
|
+
}
|
|
9
|
+
/** The tar to run: Windows' own bsdtar by absolute path, `tar` elsewhere. */
|
|
10
|
+
export declare function tarExecutable(platform: NodeJS.Platform, systemRoot: string | undefined): string;
|
|
11
|
+
export declare function extractArchive(archivePath: string, format: ArchiveFormat, destDir: string, overrides?: Partial<ExtractDeps>): void;
|
|
@@ -37,6 +37,15 @@ export interface DownloadOptions {
|
|
|
37
37
|
*/
|
|
38
38
|
readonly sha256?: string;
|
|
39
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* Refuse an artifact that is not the one we pinned, and leave nothing behind.
|
|
42
|
+
*
|
|
43
|
+
* The failure is deliberately loud and terminal rather than a warning: a
|
|
44
|
+
* mismatch means the bytes are not what was verified, and "not what was
|
|
45
|
+
* verified" is the only state in which running this binary is worse than not
|
|
46
|
+
* having it. The partial file is removed so a retry cannot pick it up.
|
|
47
|
+
*/
|
|
48
|
+
export declare function verifySha256(file: string, expected: string | undefined, name: string, url: string): void;
|
|
40
49
|
/**
|
|
41
50
|
* Download a binary to the target directory.
|
|
42
51
|
* Handles archives (zip, tar.gz, tar.xz) and raw binaries.
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { IScopedLogger } from '../interfaces/logging.js';
|
|
2
2
|
export declare const PYTHON_VERSION = "3.12.12";
|
|
3
3
|
export declare function getPythonDownloadUrl(platform: string, arch: string): string;
|
|
4
|
+
/** The SHA-256 the archive for this platform/arch must have. */
|
|
5
|
+
export declare function getPythonSha256(platform: string, arch: string): string;
|
|
6
|
+
/** The interpreter's path relative to the install root. */
|
|
7
|
+
export declare function pythonInterpreterSegments(platform: string): readonly string[];
|
|
4
8
|
/**
|
|
5
9
|
* Ensure the embedded portable Python is available.
|
|
6
10
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function extractZipArchive(archivePath: string, destDir: string): void;
|
|
@@ -11847,6 +11847,17 @@ export type AppRouter = TrpcCoreRouter<{
|
|
|
11847
11847
|
};
|
|
11848
11848
|
meta: object;
|
|
11849
11849
|
}>;
|
|
11850
|
+
extendShareToken: import("@trpc/server/unstable-core-do-not-import").MutationProcedure<{
|
|
11851
|
+
input: {
|
|
11852
|
+
id: string;
|
|
11853
|
+
ttlSec: number;
|
|
11854
|
+
};
|
|
11855
|
+
output: {
|
|
11856
|
+
id: string;
|
|
11857
|
+
expiresAt: number;
|
|
11858
|
+
};
|
|
11859
|
+
meta: object;
|
|
11860
|
+
}>;
|
|
11850
11861
|
revokeShareToken: import("@trpc/server/unstable-core-do-not-import").MutationProcedure<{
|
|
11851
11862
|
input: {
|
|
11852
11863
|
id: string;
|
|
@@ -12491,6 +12502,17 @@ export type AppRouter = TrpcCoreRouter<{
|
|
|
12491
12502
|
};
|
|
12492
12503
|
meta: object;
|
|
12493
12504
|
}>;
|
|
12505
|
+
extendShareToken: import("@trpc/server/unstable-core-do-not-import").MutationProcedure<{
|
|
12506
|
+
input: {
|
|
12507
|
+
id: string;
|
|
12508
|
+
ttlSec: number;
|
|
12509
|
+
};
|
|
12510
|
+
output: {
|
|
12511
|
+
id: string;
|
|
12512
|
+
expiresAt: number;
|
|
12513
|
+
};
|
|
12514
|
+
meta: object;
|
|
12515
|
+
}>;
|
|
12494
12516
|
revokeShareToken: import("@trpc/server/unstable-core-do-not-import").MutationProcedure<{
|
|
12495
12517
|
input: {
|
|
12496
12518
|
id: string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AUTO-GENERATED by scripts/generate-addon-cap-facts.ts — DO NOT EDIT.
|
|
3
|
+
*
|
|
4
|
+
* Schema-free capability facts for addon server code, so an addon never imports
|
|
5
|
+
* `ALL_CAPABILITY_DEFINITIONS` (the whole Zod schema graph, ~+100 MB heap per
|
|
6
|
+
* runner). See docs/decisions/adr-0028.md.
|
|
7
|
+
*
|
|
8
|
+
* Coverage: 1 advance-derived caps, 71 caps with 340 state leaves.
|
|
9
|
+
*/
|
|
10
|
+
/** A bindable scalar in a capability's runtime state. */
|
|
11
|
+
export interface CapStateLeaf {
|
|
12
|
+
/** Dot path inside the cap's state slice. */
|
|
13
|
+
readonly path: string;
|
|
14
|
+
readonly valueType: 'number' | 'boolean' | 'string' | 'enum';
|
|
15
|
+
readonly enumValues?: readonly string[];
|
|
16
|
+
}
|
|
17
|
+
/** cap name -> the numeric state field whose strict advance IS the cap's one-shot event. */
|
|
18
|
+
export declare const CAP_ADVANCE_FIELDS: Readonly<Record<string, string>>;
|
|
19
|
+
/** cap name -> the bindable leaves of its runtime state (absent: none). */
|
|
20
|
+
export declare const CAP_STATE_LEAVES: Readonly<Record<string, readonly CapStateLeaf[]>>;
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_sleep = require("./sleep-
|
|
2
|
+
const require_sleep = require("./sleep-BFVY4_xY.js");
|
|
3
3
|
const require_event_category = require("./event-category-T43rdQWR.js");
|
|
4
|
-
const require_composition = require("./composition-
|
|
4
|
+
const require_composition = require("./composition-DCYnv4I6.js");
|
|
5
5
|
const require_node_color = require("./node-color.js");
|
|
6
6
|
const require_err_msg = require("./err-msg-Dx2Kor0g.js");
|
|
7
7
|
const require_enums = require("./enums.js");
|
|
@@ -5852,14 +5852,6 @@ function describeRootSupplies(supplies) {
|
|
|
5852
5852
|
}
|
|
5853
5853
|
//#endregion
|
|
5854
5854
|
//#region src/types/models.ts
|
|
5855
|
-
var MODEL_FORMATS = [
|
|
5856
|
-
"onnx",
|
|
5857
|
-
"coreml",
|
|
5858
|
-
"openvino",
|
|
5859
|
-
"tflite",
|
|
5860
|
-
"pt",
|
|
5861
|
-
"gguf"
|
|
5862
|
-
];
|
|
5863
5855
|
/**
|
|
5864
5856
|
* Multi-file format payload.
|
|
5865
5857
|
*
|
|
@@ -6296,7 +6288,7 @@ var ModelConvertMetadataSchema = zod.z.object({
|
|
|
6296
6288
|
classMap: DetectionCatalogClassMapSchema.optional()
|
|
6297
6289
|
});
|
|
6298
6290
|
var ConvertArtifactSchema = zod.z.object({
|
|
6299
|
-
format: zod.z.enum(MODEL_FORMATS),
|
|
6291
|
+
format: zod.z.enum(require_sleep.MODEL_FORMATS),
|
|
6300
6292
|
precision: zod.z.enum(["fp16", "int8"]).optional(),
|
|
6301
6293
|
sizeMB: zod.z.number(),
|
|
6302
6294
|
validated: zod.z.boolean(),
|
|
@@ -12306,7 +12298,7 @@ var ImportModelBundleResultSchema = zod.z.discriminatedUnion("kind", [zod.z.obje
|
|
|
12306
12298
|
distributed: zod.z.array(zod.z.object({
|
|
12307
12299
|
modelId: zod.z.string(),
|
|
12308
12300
|
nodeId: zod.z.string(),
|
|
12309
|
-
format: zod.z.enum(MODEL_FORMATS),
|
|
12301
|
+
format: zod.z.enum(require_sleep.MODEL_FORMATS),
|
|
12310
12302
|
ok: zod.z.boolean(),
|
|
12311
12303
|
error: zod.z.string().optional()
|
|
12312
12304
|
})).readonly()
|
|
@@ -18860,7 +18852,7 @@ var modelConvertCapability = {
|
|
|
18860
18852
|
var ModelDistributeInputSchema = zod.z.object({
|
|
18861
18853
|
targetNodeId: zod.z.string(),
|
|
18862
18854
|
modelId: zod.z.string(),
|
|
18863
|
-
format: zod.z.enum(MODEL_FORMATS),
|
|
18855
|
+
format: zod.z.enum(require_sleep.MODEL_FORMATS),
|
|
18864
18856
|
entry: ModelCatalogEntrySchema
|
|
18865
18857
|
});
|
|
18866
18858
|
var ModelDistributeResultSchema = zod.z.object({
|
|
@@ -28530,7 +28522,7 @@ var pipelineExecutorCapability = {
|
|
|
28530
28522
|
* (`recommend.ts`) are the TS face of the same data; these
|
|
28531
28523
|
* schemas are what crosses the cap boundary.
|
|
28532
28524
|
*/
|
|
28533
|
-
var ModelFormatSchema$1 = zod.z.enum(MODEL_FORMATS);
|
|
28525
|
+
var ModelFormatSchema$1 = zod.z.enum(require_sleep.MODEL_FORMATS);
|
|
28534
28526
|
/** Default least number of parallel sessions per device Auto tune keeps (D755). */
|
|
28535
28527
|
var DEFAULT_MIN_SESSIONS_PER_DEVICE = 2;
|
|
28536
28528
|
/** The operator's range for it. */
|
|
@@ -31310,7 +31302,7 @@ var NodeInferenceDeviceSchema = zod.z.object({
|
|
|
31310
31302
|
key: zod.z.string(),
|
|
31311
31303
|
backend: zod.z.string(),
|
|
31312
31304
|
device: zod.z.string(),
|
|
31313
|
-
format: zod.z.enum(MODEL_FORMATS),
|
|
31305
|
+
format: zod.z.enum(require_sleep.MODEL_FORMATS),
|
|
31314
31306
|
/** Whether the node's live probe reports the device as usable right now. */
|
|
31315
31307
|
available: zod.z.boolean(),
|
|
31316
31308
|
/**
|
|
@@ -43665,7 +43657,7 @@ includeCrops: zod.z.boolean().optional() }).optional(), zod.z.array(VehicleSchem
|
|
|
43665
43657
|
};
|
|
43666
43658
|
//#endregion
|
|
43667
43659
|
//#region src/capabilities/platform-probe.cap.ts
|
|
43668
|
-
var ModelFormatSchema = zod.z.enum(MODEL_FORMATS);
|
|
43660
|
+
var ModelFormatSchema = zod.z.enum(require_sleep.MODEL_FORMATS);
|
|
43669
43661
|
var HwAccelBackendInputSchema = zod.z.enum([
|
|
43670
43662
|
"videotoolbox",
|
|
43671
43663
|
"cuda",
|
|
@@ -51830,65 +51822,6 @@ function stateVocabularyFor(runtimeState, alarmStates = []) {
|
|
|
51830
51822
|
return [];
|
|
51831
51823
|
}
|
|
51832
51824
|
//#endregion
|
|
51833
|
-
//#region src/constants.ts
|
|
51834
|
-
var HF_REPO = "camstack/camstack-models";
|
|
51835
|
-
var HF_BASE_URL = `https://huggingface.co/${HF_REPO}/resolve/main`;
|
|
51836
|
-
/**
|
|
51837
|
-
* The ONE default session-JWT lifetime.
|
|
51838
|
-
*
|
|
51839
|
-
* There used to be three, and they disagreed: the `system-config` schema said
|
|
51840
|
-
* `30d`, `RUNTIME_DEFAULTS['auth.tokenExpiry']` said `7d`, and
|
|
51841
|
-
* `AuthManager.signToken` hardcoded `30d` as its own fallback. Because the
|
|
51842
|
-
* production signer (`AuthService extends AuthManager`, wired to
|
|
51843
|
-
* `ConfigManager`) resolves through `RUNTIME_DEFAULTS` BEFORE it can ever
|
|
51844
|
-
* reach the hardcoded fallback, the value actually in force was `7d` while
|
|
51845
|
-
* every surface an operator could read advertised `30d`.
|
|
51846
|
-
*
|
|
51847
|
-
* `30d` is the value the product documents and the one an operator decided on
|
|
51848
|
-
* (2026-07-17: the viewer's silent refresh rotates tokens long before expiry,
|
|
51849
|
-
* so a long lifetime only covers devices left unopened for weeks). It is
|
|
51850
|
-
* declared here once and imported by the schema, by the runtime defaults and
|
|
51851
|
-
* by the signer's fallback — a second default that disagrees with the first is
|
|
51852
|
-
* the same defect in miniature.
|
|
51853
|
-
*/
|
|
51854
|
-
var DEFAULT_TOKEN_EXPIRY = "30d";
|
|
51855
|
-
/**
|
|
51856
|
-
* Runtime defaults -- used by ConfigManager.get() for backward compatibility
|
|
51857
|
-
* until Plan B wires all runtime settings to the system_settings SQL table.
|
|
51858
|
-
*
|
|
51859
|
-
* Moved from @camstack/system/config-schema to @camstack/types so that
|
|
51860
|
-
* @camstack/system can reference it without a cross-package kernel import.
|
|
51861
|
-
*/
|
|
51862
|
-
var RUNTIME_DEFAULTS = {
|
|
51863
|
-
"features.streaming": true,
|
|
51864
|
-
"features.notifications": true,
|
|
51865
|
-
"features.objectDetection": false,
|
|
51866
|
-
"features.remoteAccess": true,
|
|
51867
|
-
"features.agentCluster": false,
|
|
51868
|
-
"features.smartHome": true,
|
|
51869
|
-
"features.recordings": true,
|
|
51870
|
-
"features.backup": true,
|
|
51871
|
-
"features.repl": true,
|
|
51872
|
-
"retention.detectionEventsDays": 30,
|
|
51873
|
-
"retention.audioLevelsDays": 7,
|
|
51874
|
-
"logging.level": "info",
|
|
51875
|
-
"logging.retentionDays": 30,
|
|
51876
|
-
"eventBus.ringBufferSize": 1e4,
|
|
51877
|
-
"storage.provider": "sqlite-storage",
|
|
51878
|
-
"storage.locations": {
|
|
51879
|
-
data: "camstack-data/data",
|
|
51880
|
-
media: "camstack-data/media",
|
|
51881
|
-
recordings: "camstack-data/recordings",
|
|
51882
|
-
cache: "/tmp/camstack-cache",
|
|
51883
|
-
logs: "camstack-data/logs",
|
|
51884
|
-
models: "camstack-data/models"
|
|
51885
|
-
},
|
|
51886
|
-
providers: [],
|
|
51887
|
-
"ffmpeg.hwAccel": "auto",
|
|
51888
|
-
"ffmpeg.threadCount": 0,
|
|
51889
|
-
"auth.tokenExpiry": "30d"
|
|
51890
|
-
};
|
|
51891
|
-
//#endregion
|
|
51892
51825
|
//#region src/device/accessory.ts
|
|
51893
51826
|
/**
|
|
51894
51827
|
* Accessory device helpers — shared across drivers.
|
|
@@ -78347,86 +78280,6 @@ function setNestedValue(obj, path, value) {
|
|
|
78347
78280
|
current[parts[parts.length - 1]] = value;
|
|
78348
78281
|
}
|
|
78349
78282
|
//#endregion
|
|
78350
|
-
//#region src/utils/hf-url.ts
|
|
78351
|
-
function hfModelUrl(repo, path) {
|
|
78352
|
-
return `https://huggingface.co/${repo}/resolve/main/${path}`;
|
|
78353
|
-
}
|
|
78354
|
-
//#endregion
|
|
78355
|
-
//#region src/utils/mask-url.ts
|
|
78356
|
-
/**
|
|
78357
|
-
* Names that, when used as URL query parameters, almost certainly carry
|
|
78358
|
-
* a secret. Matching is case-insensitive and anchored to the full param
|
|
78359
|
-
* name to avoid false positives like `user_id` (an entity reference, not
|
|
78360
|
-
* a credential) or `topic=password-reset` (a value happens to contain
|
|
78361
|
-
* the substring "password" but the param name is unrelated).
|
|
78362
|
-
*
|
|
78363
|
-
* Add new patterns here as we encounter cameras/APIs that leak through
|
|
78364
|
-
* the existing list.
|
|
78365
|
-
*/
|
|
78366
|
-
var CREDENTIAL_PARAM_PATTERNS = [
|
|
78367
|
-
/^user$/i,
|
|
78368
|
-
/^usr$/i,
|
|
78369
|
-
/^username$/i,
|
|
78370
|
-
/^password$/i,
|
|
78371
|
-
/^pwd$/i,
|
|
78372
|
-
/^pass$/i,
|
|
78373
|
-
/^passwd$/i,
|
|
78374
|
-
/^secret$/i,
|
|
78375
|
-
/^token$/i,
|
|
78376
|
-
/^auth$/i,
|
|
78377
|
-
/^auth[_-]?token$/i,
|
|
78378
|
-
/^bearer$/i,
|
|
78379
|
-
/^api[_-]?key$/i,
|
|
78380
|
-
/^access[_-]?token$/i,
|
|
78381
|
-
/^refresh[_-]?token$/i,
|
|
78382
|
-
/^bridge$/i,
|
|
78383
|
-
/^code$/i,
|
|
78384
|
-
/^state$/i,
|
|
78385
|
-
/^challenge$/i,
|
|
78386
|
-
/^link$/i
|
|
78387
|
-
];
|
|
78388
|
-
function isCredentialParam(name) {
|
|
78389
|
-
return CREDENTIAL_PARAM_PATTERNS.some((re) => re.test(name));
|
|
78390
|
-
}
|
|
78391
|
-
/**
|
|
78392
|
-
* Redact secrets we may surface in logs or telemetry:
|
|
78393
|
-
* 1. `userinfo` (`user:password@host`) — the classic RTSP shape.
|
|
78394
|
-
* 2. Query-string credential params (`?user=...&password=...`) — the
|
|
78395
|
-
* Reolink RTMP shape and several HTTP-pushed-stream APIs.
|
|
78396
|
-
*
|
|
78397
|
-
* Returns the original string verbatim when the input is not a parseable
|
|
78398
|
-
* URL — a log helper must never throw. Param values are replaced with
|
|
78399
|
-
* `***` so an operator reading logs still sees WHICH credential was
|
|
78400
|
-
* present (useful for debugging "wrong password" issues) without
|
|
78401
|
-
* exposing the value.
|
|
78402
|
-
*
|
|
78403
|
-
* The credential-name match is case-insensitive but anchored to the
|
|
78404
|
-
* whole param name; values like `user_id=42` or `topic=password-reset`
|
|
78405
|
-
* are NOT masked (those are entity references, not credentials).
|
|
78406
|
-
*/
|
|
78407
|
-
function maskUrlCredentials(rawUrl) {
|
|
78408
|
-
if (rawUrl.startsWith("/") && !rawUrl.startsWith("//")) {
|
|
78409
|
-
const masked = maskUrlCredentials(`http://relative.invalid${rawUrl}`);
|
|
78410
|
-
return masked.startsWith("http://relative.invalid") ? masked.slice(23) : rawUrl;
|
|
78411
|
-
}
|
|
78412
|
-
try {
|
|
78413
|
-
const u = new URL(rawUrl);
|
|
78414
|
-
let touched = false;
|
|
78415
|
-
if (u.username || u.password) {
|
|
78416
|
-
u.username = "";
|
|
78417
|
-
u.password = "";
|
|
78418
|
-
touched = true;
|
|
78419
|
-
}
|
|
78420
|
-
for (const key of Array.from(u.searchParams.keys())) if (isCredentialParam(key)) {
|
|
78421
|
-
u.searchParams.set(key, "***");
|
|
78422
|
-
touched = true;
|
|
78423
|
-
}
|
|
78424
|
-
return touched ? u.toString() : rawUrl;
|
|
78425
|
-
} catch {
|
|
78426
|
-
return rawUrl;
|
|
78427
|
-
}
|
|
78428
|
-
}
|
|
78429
|
-
//#endregion
|
|
78430
78283
|
//#region src/utils/pool-memory-watchdog.ts
|
|
78431
78284
|
var MB = 1024 * 1024;
|
|
78432
78285
|
var DEFAULT_POOL_MEMORY_POLICY = {
|
|
@@ -79136,7 +78989,7 @@ var RUNTIMES = [
|
|
|
79136
78989
|
value: "cuda",
|
|
79137
78990
|
label: "CUDA"
|
|
79138
78991
|
});
|
|
79139
|
-
if (hw.gpu?.type === "amd") out.push({
|
|
78992
|
+
if (hw.gpu?.type === "amd" && hw.platform === "linux") out.push({
|
|
79140
78993
|
value: "webgpu",
|
|
79141
78994
|
label: "WebGPU (AMD iGPU)"
|
|
79142
78995
|
});
|
|
@@ -79273,7 +79126,7 @@ function scoreRuntimes(hw) {
|
|
|
79273
79126
|
});
|
|
79274
79127
|
}
|
|
79275
79128
|
if (hw.gpu?.type === "amd") {
|
|
79276
|
-
scores.push({
|
|
79129
|
+
if (hw.platform === "linux") scores.push({
|
|
79277
79130
|
runtime: "python",
|
|
79278
79131
|
backend: "onnx",
|
|
79279
79132
|
format: "onnx",
|
|
@@ -79770,7 +79623,7 @@ exports.DEFAULT_RUNTIME_STATE_DURABILITY = require_sleep.DEFAULT_RUNTIME_STATE_D
|
|
|
79770
79623
|
exports.DEFAULT_SESSION_PLACEMENT_POLICY = DEFAULT_SESSION_PLACEMENT_POLICY;
|
|
79771
79624
|
exports.DEFAULT_SHARE_SOURCE = DEFAULT_SHARE_SOURCE;
|
|
79772
79625
|
exports.DEFAULT_TIMELAPSE_PREVIEW_TEXT = DEFAULT_TIMELAPSE_PREVIEW_TEXT;
|
|
79773
|
-
exports.DEFAULT_TOKEN_EXPIRY = DEFAULT_TOKEN_EXPIRY;
|
|
79626
|
+
exports.DEFAULT_TOKEN_EXPIRY = require_sleep.DEFAULT_TOKEN_EXPIRY;
|
|
79774
79627
|
exports.DERIVED_CAMERA_SILENCED_CAP_NAMES = DERIVED_CAMERA_SILENCED_CAP_NAMES;
|
|
79775
79628
|
exports.DETAIL_CROP_PADDING_FIELD = DETAIL_CROP_PADDING_FIELD;
|
|
79776
79629
|
exports.DETAIL_CROP_PADDING_KEY = DETAIL_CROP_PADDING_KEY;
|
|
@@ -79977,8 +79830,8 @@ exports.HAP_AUDIO_BASE = HAP_AUDIO_BASE;
|
|
|
79977
79830
|
exports.HAP_AUDIO_BITRATE_KBPS = HAP_AUDIO_BITRATE_KBPS;
|
|
79978
79831
|
exports.HAP_AUDIO_VBV_KBITS = HAP_AUDIO_VBV_KBITS;
|
|
79979
79832
|
exports.HAP_KEYFRAME_INTERVAL_SEC = HAP_KEYFRAME_INTERVAL_SEC;
|
|
79980
|
-
exports.HF_BASE_URL = HF_BASE_URL;
|
|
79981
|
-
exports.HF_REPO = HF_REPO;
|
|
79833
|
+
exports.HF_BASE_URL = require_sleep.HF_BASE_URL;
|
|
79834
|
+
exports.HF_REPO = require_sleep.HF_REPO;
|
|
79982
79835
|
exports.HOURS_PER_DAY = HOURS_PER_DAY;
|
|
79983
79836
|
exports.HUB_ADDRESS_ROLES = HUB_ADDRESS_ROLES;
|
|
79984
79837
|
exports.HUB_MDNS_QUERY_NAME = HUB_MDNS_QUERY_NAME;
|
|
@@ -80154,7 +80007,7 @@ exports.METHOD_DEVICE_SELECTORS = METHOD_DEVICE_SELECTORS;
|
|
|
80154
80007
|
exports.MINUTES_PER_DAY = MINUTES_PER_DAY;
|
|
80155
80008
|
exports.MIN_SCRUBBED_LENGTH = require_sleep.MIN_SCRUBBED_LENGTH;
|
|
80156
80009
|
exports.MIN_SESSIONS_PER_DEVICE_RANGE = MIN_SESSIONS_PER_DEVICE_RANGE;
|
|
80157
|
-
exports.MODEL_FORMATS = MODEL_FORMATS;
|
|
80010
|
+
exports.MODEL_FORMATS = require_sleep.MODEL_FORMATS;
|
|
80158
80011
|
exports.MODEL_HOSTING = MODEL_HOSTING;
|
|
80159
80012
|
exports.MODEL_PROVIDER_IDS = MODEL_PROVIDER_IDS;
|
|
80160
80013
|
exports.MOTION_CLOSE_AFTER_MS = MOTION_CLOSE_AFTER_MS;
|
|
@@ -80623,7 +80476,7 @@ exports.ROOT_CHILD_CONTAINMENT_MIN = ROOT_CHILD_CONTAINMENT_MIN;
|
|
|
80623
80476
|
exports.ROOT_FACE_REFINE_INPUT_PX = ROOT_FACE_REFINE_INPUT_PX;
|
|
80624
80477
|
exports.ROOT_FACE_REFINE_SCALE = ROOT_FACE_REFINE_SCALE;
|
|
80625
80478
|
exports.ROOT_SUPPLIABLE_STEP_IDS = ROOT_SUPPLIABLE_STEP_IDS;
|
|
80626
|
-
exports.RUNTIME_DEFAULTS = RUNTIME_DEFAULTS;
|
|
80479
|
+
exports.RUNTIME_DEFAULTS = require_sleep.RUNTIME_DEFAULTS;
|
|
80627
80480
|
exports.RUNTIME_STATE_POLICY = RUNTIME_STATE_POLICY;
|
|
80628
80481
|
exports.RUNTIME_STATE_REFRESH_MISS_COOLDOWN_MS = RUNTIME_STATE_REFRESH_MISS_COOLDOWN_MS;
|
|
80629
80482
|
exports.RUNTIME_TO_FORMAT = RUNTIME_TO_FORMAT;
|
|
@@ -81393,7 +81246,7 @@ exports.globalSecretScope = require_sleep.globalSecretScope;
|
|
|
81393
81246
|
exports.hasModelBoundOverrides = hasModelBoundOverrides;
|
|
81394
81247
|
exports.hasMotionTrigger = hasMotionTrigger;
|
|
81395
81248
|
exports.hasUrlScheme = hasUrlScheme;
|
|
81396
|
-
exports.hfModelUrl = hfModelUrl;
|
|
81249
|
+
exports.hfModelUrl = require_sleep.hfModelUrl;
|
|
81397
81250
|
exports.htmlToText = htmlToText;
|
|
81398
81251
|
exports.hubAddressHostname = hubAddressHostname;
|
|
81399
81252
|
exports.hubMotionNativeProvider = hubMotionNativeProvider;
|
|
@@ -81512,7 +81365,7 @@ exports.makeSourceBrokerId = require_sleep.makeSourceBrokerId;
|
|
|
81512
81365
|
exports.mapAudioLabelToMacro = mapAudioLabelToMacro;
|
|
81513
81366
|
exports.markdownToHtmlLite = markdownToHtmlLite;
|
|
81514
81367
|
exports.markdownToText = markdownToText;
|
|
81515
|
-
exports.maskUrlCredentials = maskUrlCredentials;
|
|
81368
|
+
exports.maskUrlCredentials = require_sleep.maskUrlCredentials;
|
|
81516
81369
|
exports.matchDoAction = matchDoAction;
|
|
81517
81370
|
exports.mayReadLocation = mayReadLocation;
|
|
81518
81371
|
exports.mayWriteToLocation = mayWriteToLocation;
|