@camstack/system 1.2.116 → 1.2.118
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-utils.d.ts +1 -1
- package/dist/addon-utils.js +1 -1
- package/dist/addon-utils.mjs +1 -1
- 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/backup-orchestrator/backup-orchestrator.addon.js +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.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/ipv6-lan.d.ts +26 -0
- package/dist/builtins/local-network/local-network.addon.d.ts +50 -14
- package/dist/builtins/local-network/local-network.addon.js +254 -38
- package/dist/builtins/local-network/local-network.addon.mjs +248 -39
- 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 +1 -1
- package/dist/builtins/snapshot/index.mjs +1 -1
- 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 +2 -2
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +2 -2
- 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-Cri60Jd0.js → dist-C2_1HCpW.js} +149 -23
- package/dist/{dist-BpzbLPel.mjs → dist-DCTpBXm4.mjs} +149 -23
- package/dist/download/model-downloader.d.ts +18 -1
- package/dist/{file-data-plane-CuE_hBli.mjs → file-data-plane-BhKdxJgf.mjs} +49 -13
- package/dist/{file-data-plane-DUHPHa-Y.js → file-data-plane-DO8KbxCe.js} +49 -13
- package/dist/http/lan-http-bind.d.ts +12 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -3
- package/dist/index.mjs +4 -4
- package/dist/{lan-http-bind-CZ4EBeD_.js → lan-http-bind-DmgpFP6_.js} +53 -11
- package/dist/{lan-http-bind-BDJm4d-K.mjs → lan-http-bind-jKrj6OjQ.mjs} +48 -12
- package/dist/{retired-settings-keys-SrxMH3OT.mjs → retired-settings-keys-Czd76yLZ.mjs} +1 -1
- package/dist/{retired-settings-keys-BVAxT5XL.js → retired-settings-keys-DHRXLMPn.js} +1 -1
- package/package.json +1 -1
|
@@ -4123,6 +4123,15 @@ var LabelDefinitionSchema = zod.z.object({
|
|
|
4123
4123
|
description: zod.z.string().optional(),
|
|
4124
4124
|
icon: zod.z.string().optional()
|
|
4125
4125
|
});
|
|
4126
|
+
var ClassMapDefinitionSchema = zod.z.object({
|
|
4127
|
+
mapping: zod.z.record(zod.z.string(), zod.z.enum([
|
|
4128
|
+
"person",
|
|
4129
|
+
"vehicle",
|
|
4130
|
+
"animal",
|
|
4131
|
+
"package"
|
|
4132
|
+
])),
|
|
4133
|
+
preserveOriginal: zod.z.boolean()
|
|
4134
|
+
});
|
|
4126
4135
|
var MODEL_FORMATS = [
|
|
4127
4136
|
"onnx",
|
|
4128
4137
|
"coreml",
|
|
@@ -4301,7 +4310,13 @@ var ModelCatalogEntrySchema = zod.z.object({
|
|
|
4301
4310
|
* `id` stays the source of truth for resolution/download/persistence; grouping
|
|
4302
4311
|
* is a presentation overlay resolved back to an `id`.
|
|
4303
4312
|
*/
|
|
4304
|
-
group: ModelVariantGroupSchema.optional()
|
|
4313
|
+
group: ModelVariantGroupSchema.optional(),
|
|
4314
|
+
/**
|
|
4315
|
+
* Per-MODEL class map override. Absent ⇒ the step's `StepDefinition.classMap`
|
|
4316
|
+
* applies (Frigate / COCO public catalog). Set on a custom model whose raw
|
|
4317
|
+
* labels already ARE the CamStack macros (Scrypted identity map).
|
|
4318
|
+
*/
|
|
4319
|
+
classMap: ClassMapDefinitionSchema.optional()
|
|
4305
4320
|
});
|
|
4306
4321
|
var ConvertTargetSchema = zod.z.discriminatedUnion("format", [zod.z.object({
|
|
4307
4322
|
format: zod.z.literal("openvino"),
|
|
@@ -4330,7 +4345,8 @@ var ModelConvertMetadataSchema = zod.z.object({
|
|
|
4330
4345
|
"ocr",
|
|
4331
4346
|
"segmentation"
|
|
4332
4347
|
]),
|
|
4333
|
-
faceAlignment: zod.z.boolean().optional()
|
|
4348
|
+
faceAlignment: zod.z.boolean().optional(),
|
|
4349
|
+
classMap: ClassMapDefinitionSchema.optional()
|
|
4334
4350
|
});
|
|
4335
4351
|
var ConvertArtifactSchema = zod.z.object({
|
|
4336
4352
|
format: zod.z.enum(MODEL_FORMATS),
|
|
@@ -15925,6 +15941,33 @@ var NativeCropRefSchema = zod.z.object({
|
|
|
15925
15941
|
h: zod.z.number()
|
|
15926
15942
|
})
|
|
15927
15943
|
});
|
|
15944
|
+
zod.z.object({
|
|
15945
|
+
crop: zod.z.object({
|
|
15946
|
+
left: zod.z.number(),
|
|
15947
|
+
top: zod.z.number(),
|
|
15948
|
+
width: zod.z.number().positive(),
|
|
15949
|
+
height: zod.z.number().positive()
|
|
15950
|
+
}).optional(),
|
|
15951
|
+
content: zod.z.object({
|
|
15952
|
+
width: zod.z.number().int().positive(),
|
|
15953
|
+
height: zod.z.number().int().positive()
|
|
15954
|
+
}),
|
|
15955
|
+
fit: zod.z.enum(["stretch", "contain"]),
|
|
15956
|
+
format: zod.z.enum([
|
|
15957
|
+
"rgb",
|
|
15958
|
+
"gray",
|
|
15959
|
+
"jpeg"
|
|
15960
|
+
])
|
|
15961
|
+
});
|
|
15962
|
+
var FrameRefSchema = zod.z.object({
|
|
15963
|
+
registryId: zod.z.string().min(1),
|
|
15964
|
+
id: zod.z.string().min(1),
|
|
15965
|
+
width: zod.z.number().int().positive(),
|
|
15966
|
+
height: zod.z.number().int().positive(),
|
|
15967
|
+
format: zod.z.enum(["rgb", "gray"]),
|
|
15968
|
+
timestamp: zod.z.number(),
|
|
15969
|
+
capturedAt: zod.z.number().optional()
|
|
15970
|
+
});
|
|
15928
15971
|
var ModelFormatSchema$1 = zod.z.enum([
|
|
15929
15972
|
"onnx",
|
|
15930
15973
|
"coreml",
|
|
@@ -16246,7 +16289,7 @@ var pipelineExecutorCapability = {
|
|
|
16246
16289
|
* legacy call shape used by existing benchmark code; once all
|
|
16247
16290
|
* callers pass it explicitly we make it required.
|
|
16248
16291
|
*
|
|
16249
|
-
* Exactly one of `frame`, `frameHandle`, `imageBase64`,
|
|
16292
|
+
* Exactly one of `frame`, `frameRef`, `frameHandle`, `imageBase64`,
|
|
16250
16293
|
* `referenceImage` must be provided:
|
|
16251
16294
|
* - `frame`: runtime dispatch path (runner → decoded broker frame).
|
|
16252
16295
|
* Carries the raw buffer, dimensions, and format; the executor
|
|
@@ -16268,6 +16311,12 @@ var pipelineExecutorCapability = {
|
|
|
16268
16311
|
steps: zod.z.array(PipelineStepInputSchema).min(1),
|
|
16269
16312
|
frame: FrameInputSchema.optional(),
|
|
16270
16313
|
/**
|
|
16314
|
+
* Process-local lazy frame. Valid only when caller and provider resolve
|
|
16315
|
+
* in the same execution-group process; split/cross-node callers use
|
|
16316
|
+
* `frame`/`image` inline compatibility instead.
|
|
16317
|
+
*/
|
|
16318
|
+
frameRef: FrameRefSchema.optional(),
|
|
16319
|
+
/**
|
|
16271
16320
|
* CB5 shm passthrough — a `FrameHandle` naming the same ring slot
|
|
16272
16321
|
* the decoded pixels live in. One more member of the one-of
|
|
16273
16322
|
* frame/frameHandle/image/imageBase64/referenceImage group.
|
|
@@ -16617,7 +16666,10 @@ var NativeCropResultSchema = zod.z.object({
|
|
|
16617
16666
|
* Which source served this crop, so a quality-sensitive consumer (the native
|
|
16618
16667
|
* `keyFrame`) can reject a degraded fallback:
|
|
16619
16668
|
* - `native` — cut from the decode worker's retained NATIVE surface (the
|
|
16620
|
-
* quality path).
|
|
16669
|
+
* quality path). A subject-tile serve is also native-resolution and stays
|
|
16670
|
+
* `native` here: the public enum cannot name `tile` without a breaking cap
|
|
16671
|
+
* change. Runner telemetry distinguishes lease vs tile via `source` on the
|
|
16672
|
+
* internal crop result (`nativeHits` vs `tileHits`).
|
|
16621
16673
|
* - `ram-fullframe` — the native surface MISSED but the request was full-frame,
|
|
16622
16674
|
* so the ≤640 RAM `RetainedFrameStore` served it (honest lower-res; legit for
|
|
16623
16675
|
* the blank-frame guard / 640-snapshot resolve, NOT for the clean keyFrame).
|
|
@@ -17108,12 +17160,41 @@ var RunnerLocalLoadSchema = zod.z.object({
|
|
|
17108
17160
|
* legacy `OrchestratorMetricsSchema` shape so existing dashboards keep
|
|
17109
17161
|
* working unchanged when they switch to reading from the runner cap.
|
|
17110
17162
|
*/
|
|
17163
|
+
var FrameLazyCountersSchema = zod.z.object({
|
|
17164
|
+
framesDecoded: zod.z.number(),
|
|
17165
|
+
framesAdmitted: zod.z.number(),
|
|
17166
|
+
framesDroppedPixelFree: zod.z.number(),
|
|
17167
|
+
viewsMaterialized: zod.z.number(),
|
|
17168
|
+
viewsSkipped: zod.z.number(),
|
|
17169
|
+
workerToRunnerBytes: zod.z.number(),
|
|
17170
|
+
runnerToPoolRawBytes: zod.z.number(),
|
|
17171
|
+
runnerToPoolJpegBytes: zod.z.number(),
|
|
17172
|
+
onDemandFullFrameRequests: zod.z.number(),
|
|
17173
|
+
onDemandCropRequests: zod.z.number(),
|
|
17174
|
+
nativeHits: zod.z.number(),
|
|
17175
|
+
nativeMisses: zod.z.number(),
|
|
17176
|
+
tileHits: zod.z.number(),
|
|
17177
|
+
tileMisses: zod.z.number(),
|
|
17178
|
+
fallbackHits: zod.z.number(),
|
|
17179
|
+
fallbackMisses: zod.z.number(),
|
|
17180
|
+
retainedWritesAvoided: zod.z.number(),
|
|
17181
|
+
residentRefs: zod.z.number(),
|
|
17182
|
+
residentBytes: zod.z.number(),
|
|
17183
|
+
releases: zod.z.number(),
|
|
17184
|
+
evictions: zod.z.number(),
|
|
17185
|
+
staleMisses: zod.z.number()
|
|
17186
|
+
});
|
|
17187
|
+
var FrameLazyMetricsSchema = zod.z.object({
|
|
17188
|
+
node: FrameLazyCountersSchema,
|
|
17189
|
+
cameras: zod.z.array(FrameLazyCountersSchema.extend({ deviceId: zod.z.number() }))
|
|
17190
|
+
});
|
|
17111
17191
|
var RunnerLocalMetricsSchema = zod.z.object({
|
|
17112
17192
|
nodeId: zod.z.string(),
|
|
17113
17193
|
activeCameras: zod.z.number(),
|
|
17114
17194
|
throttledCameras: zod.z.number(),
|
|
17115
17195
|
avgInferenceTimeMs: zod.z.number(),
|
|
17116
|
-
queueDepth: zod.z.number()
|
|
17196
|
+
queueDepth: zod.z.number(),
|
|
17197
|
+
frameLazy: FrameLazyMetricsSchema.optional()
|
|
17117
17198
|
});
|
|
17118
17199
|
/**
|
|
17119
17200
|
* Pipeline Runner capability — runtime detection workhorse.
|
|
@@ -19197,6 +19278,9 @@ var storageProviderCapability = {
|
|
|
19197
19278
|
endDownload: method(EndDownloadInputSchema, zod.z.void(), { kind: "mutation" })
|
|
19198
19279
|
}
|
|
19199
19280
|
};
|
|
19281
|
+
/** Profile-exported FormBuilder schema. Shape is ConfigUISchema at the UI. */
|
|
19282
|
+
var ProfileSettingsSchemaBridge = zod.z.unknown().nullable();
|
|
19283
|
+
var ProfileSettingsBagSchema = zod.z.record(zod.z.string(), zod.z.unknown());
|
|
19200
19284
|
/**
|
|
19201
19285
|
* A live terminal session hosted by the provider addon. Output and input do
|
|
19202
19286
|
* NOT flow through the capability — they use the addon data plane
|
|
@@ -19231,7 +19315,9 @@ var TerminalProfileInfoSchema = zod.z.object({
|
|
|
19231
19315
|
executable: zod.z.string().optional(),
|
|
19232
19316
|
args: zod.z.array(zod.z.string()).readonly().optional(),
|
|
19233
19317
|
cwd: zod.z.string().optional(),
|
|
19234
|
-
environment: zod.z.array(zod.z.string()).readonly().optional()
|
|
19318
|
+
environment: zod.z.array(zod.z.string()).readonly().optional(),
|
|
19319
|
+
/** ConfigUISchema for instance knobs, or null when the profile has none. */
|
|
19320
|
+
settingsSchema: ProfileSettingsSchemaBridge.optional()
|
|
19235
19321
|
});
|
|
19236
19322
|
/**
|
|
19237
19323
|
* A durable operator-created Terminal instance. Profiles are templates; only
|
|
@@ -19248,7 +19334,8 @@ var TerminalInstanceInfoSchema = zod.z.object({
|
|
|
19248
19334
|
executable: zod.z.string(),
|
|
19249
19335
|
args: zod.z.array(zod.z.string()).readonly(),
|
|
19250
19336
|
cwd: zod.z.string(),
|
|
19251
|
-
environment: zod.z.array(zod.z.string()).readonly()
|
|
19337
|
+
environment: zod.z.array(zod.z.string()).readonly(),
|
|
19338
|
+
profileSettings: ProfileSettingsBagSchema
|
|
19252
19339
|
});
|
|
19253
19340
|
var TerminalLegacyCameraSchema = zod.z.object({
|
|
19254
19341
|
stableId: zod.z.string(),
|
|
@@ -19298,7 +19385,8 @@ var terminalSessionCapability = {
|
|
|
19298
19385
|
executable: zod.z.string().max(1024).optional(),
|
|
19299
19386
|
args: zod.z.array(zod.z.string().max(2048)).max(64).optional(),
|
|
19300
19387
|
cwd: zod.z.string().max(1024).optional(),
|
|
19301
|
-
environment: zod.z.array(zod.z.string().max(4096)).max(64).optional()
|
|
19388
|
+
environment: zod.z.array(zod.z.string().max(4096)).max(64).optional(),
|
|
19389
|
+
profileSettings: ProfileSettingsBagSchema.optional()
|
|
19302
19390
|
}), TerminalInstanceInfoSchema, {
|
|
19303
19391
|
kind: "mutation",
|
|
19304
19392
|
auth: "admin"
|
|
@@ -19309,7 +19397,8 @@ var terminalSessionCapability = {
|
|
|
19309
19397
|
executable: zod.z.string().max(1024).optional(),
|
|
19310
19398
|
args: zod.z.array(zod.z.string().max(2048)).max(64).optional(),
|
|
19311
19399
|
cwd: zod.z.string().max(1024).optional(),
|
|
19312
|
-
environment: zod.z.array(zod.z.string().max(4096)).max(64).optional()
|
|
19400
|
+
environment: zod.z.array(zod.z.string().max(4096)).max(64).optional(),
|
|
19401
|
+
profileSettings: ProfileSettingsBagSchema.optional()
|
|
19313
19402
|
}), TerminalInstanceInfoSchema, {
|
|
19314
19403
|
kind: "mutation",
|
|
19315
19404
|
auth: "admin"
|
|
@@ -23781,10 +23870,10 @@ var lawnMowerControlCapability = {
|
|
|
23781
23870
|
*
|
|
23782
23871
|
* • The SDK (mobile / web client) consumes `getConnectionEndpoints()`
|
|
23783
23872
|
* to receive an ordered list of candidate base URLs it should race
|
|
23784
|
-
* on connect — LAN IPv4 first (lowest latency
|
|
23785
|
-
* then public hostname (if a tunnel is
|
|
23786
|
-
* race them with short timeouts and stick with the
|
|
23787
|
-
* session.
|
|
23873
|
+
* on connect — LAN IPv4 and stable LAN IPv6 first (lowest latency
|
|
23874
|
+
* when on the same network), then public hostname (if a tunnel is
|
|
23875
|
+
* up). The SDK can race them with short timeouts and stick with the
|
|
23876
|
+
* winner for the session.
|
|
23788
23877
|
*
|
|
23789
23878
|
* Why hub-only: agents are not directly addressable by the operator's
|
|
23790
23879
|
* clients — they reverse-connect to the hub. Exposing their interfaces
|
|
@@ -23939,6 +24028,17 @@ var NotificationEndpointSchema = zod.z.object({
|
|
|
23939
24028
|
/** What the ranking currently resolves to (null when nothing is reachable). */
|
|
23940
24029
|
resolved: zod.z.string().nullable()
|
|
23941
24030
|
});
|
|
24031
|
+
/**
|
|
24032
|
+
* The URLs the SDK / viewer should race for API access. `baseUrls` empty =
|
|
24033
|
+
* AUTO (every LAN IPv4 + the public tunnel). `resolved` is what that choice
|
|
24034
|
+
* currently expands to, so the UI can show the effective set either way.
|
|
24035
|
+
*/
|
|
24036
|
+
var ViewerEndpointsSchema = zod.z.object({
|
|
24037
|
+
/** The operator's explicit race set, or empty for AUTO. */
|
|
24038
|
+
baseUrls: zod.z.array(zod.z.string()).readonly(),
|
|
24039
|
+
/** What the ranking currently resolves to (may be empty if nothing is up). */
|
|
24040
|
+
resolved: zod.z.array(zod.z.string()).readonly()
|
|
24041
|
+
});
|
|
23942
24042
|
var AllowedAddressesSchema = zod.z.object({
|
|
23943
24043
|
/**
|
|
23944
24044
|
* Allowlist of interface addresses operators have explicitly opted
|
|
@@ -23980,13 +24080,13 @@ var localNetworkCapability = {
|
|
|
23980
24080
|
*/
|
|
23981
24081
|
getPreferred: method(zod.z.void(), PreferredSchema),
|
|
23982
24082
|
/**
|
|
23983
|
-
* Ordered candidate base URLs the
|
|
23984
|
-
* Includes LAN
|
|
23985
|
-
*
|
|
23986
|
-
*
|
|
23987
|
-
*
|
|
23988
|
-
*
|
|
23989
|
-
*
|
|
24083
|
+
* Ordered candidate base URLs (the palette the Network tab shows).
|
|
24084
|
+
* Includes LAN IPv4, stable LAN IPv6, the public tunnel, and mesh when
|
|
24085
|
+
* joined. Loopback is off by default. The SDK races the subset from
|
|
24086
|
+
* `getViewerEndpoints`, not this full list — IPv6 stays here because
|
|
24087
|
+
* WebRTC ICE gathers dual-stack regardless of the HTTP race. Honours
|
|
24088
|
+
* `getAllowedAddresses()` when set — addresses outside the allowlist
|
|
24089
|
+
* are dropped (the public tunnel is still included as an escape hatch).
|
|
23990
24090
|
*
|
|
23991
24091
|
* **The port is the hub's, not the caller's** (D62 — a function's fact
|
|
23992
24092
|
* belongs to whoever already owns it). This method used to take a `port`
|
|
@@ -24017,10 +24117,11 @@ var localNetworkCapability = {
|
|
|
24017
24117
|
*/
|
|
24018
24118
|
port: zod.z.number().int().min(1).max(65535).optional(),
|
|
24019
24119
|
/** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
|
|
24020
|
-
* candidate. Default `
|
|
24120
|
+
* candidate. Default `false` — loopback is not a client route. */
|
|
24021
24121
|
includeLoopback: zod.z.boolean().optional(),
|
|
24022
|
-
/** Skip IPv6 entries.
|
|
24023
|
-
*
|
|
24122
|
+
/** Skip IPv6 entries. Default `false` — the palette includes stable
|
|
24123
|
+
* LAN IPv6 (ICE/WebRTC uses dual-stack regardless). Pass `true` to
|
|
24124
|
+
* hide them. The viewer HTTP/WS race is `getViewerEndpoints`. */
|
|
24024
24125
|
ipv4Only: zod.z.boolean().optional(),
|
|
24025
24126
|
/** Scheme to emit for LAN/loopback URLs. Default `'http'`.
|
|
24026
24127
|
* Pass `'https'` when the caller is itself loaded over HTTPS
|
|
@@ -24049,6 +24150,19 @@ var localNetworkCapability = {
|
|
|
24049
24150
|
*/
|
|
24050
24151
|
setNotificationEndpoint: method(zod.z.object({ baseUrl: zod.z.string().nullable() }), NotificationEndpointSchema, { kind: "mutation" }),
|
|
24051
24152
|
/**
|
|
24153
|
+
* The endpoints the SDK / viewer races for API access. Empty `baseUrls`
|
|
24154
|
+
* means AUTO: every LAN IPv4 address plus the public tunnel, never IPv6,
|
|
24155
|
+
* never mesh, never loopback. `resolved` is that set (or the operator's
|
|
24156
|
+
* explicit subset) as it stands right now.
|
|
24157
|
+
*/
|
|
24158
|
+
getViewerEndpoints: method(zod.z.void(), ViewerEndpointsSchema),
|
|
24159
|
+
/**
|
|
24160
|
+
* Replace the viewer race set. Empty `baseUrls` restores AUTO. Stored
|
|
24161
|
+
* verbatim (not indices) so a temporarily-down tunnel is not silently
|
|
24162
|
+
* dropped from the operator's choice.
|
|
24163
|
+
*/
|
|
24164
|
+
setViewerEndpoints: method(zod.z.object({ baseUrls: zod.z.array(zod.z.string()).readonly() }), ViewerEndpointsSchema, { kind: "mutation" }),
|
|
24165
|
+
/**
|
|
24052
24166
|
* Read the operator's allowlist. Empty = "auto" (no filter). Used
|
|
24053
24167
|
* by the admin UI's address selector to seed its checkbox state.
|
|
24054
24168
|
*/
|
|
@@ -32583,6 +32697,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
32583
32697
|
addonId: null,
|
|
32584
32698
|
access: "view"
|
|
32585
32699
|
},
|
|
32700
|
+
"localNetwork.getViewerEndpoints": {
|
|
32701
|
+
capName: "local-network",
|
|
32702
|
+
capScope: "system",
|
|
32703
|
+
addonId: null,
|
|
32704
|
+
access: "view"
|
|
32705
|
+
},
|
|
32586
32706
|
"localNetwork.list": {
|
|
32587
32707
|
capName: "local-network",
|
|
32588
32708
|
capScope: "system",
|
|
@@ -32619,6 +32739,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
32619
32739
|
addonId: null,
|
|
32620
32740
|
access: "create"
|
|
32621
32741
|
},
|
|
32742
|
+
"localNetwork.setViewerEndpoints": {
|
|
32743
|
+
capName: "local-network",
|
|
32744
|
+
capScope: "system",
|
|
32745
|
+
addonId: null,
|
|
32746
|
+
access: "create"
|
|
32747
|
+
},
|
|
32622
32748
|
"localNetwork.uploadCertificate": {
|
|
32623
32749
|
capName: "local-network",
|
|
32624
32750
|
capScope: "system",
|
|
@@ -4123,6 +4123,15 @@ var LabelDefinitionSchema = z.object({
|
|
|
4123
4123
|
description: z.string().optional(),
|
|
4124
4124
|
icon: z.string().optional()
|
|
4125
4125
|
});
|
|
4126
|
+
var ClassMapDefinitionSchema = z.object({
|
|
4127
|
+
mapping: z.record(z.string(), z.enum([
|
|
4128
|
+
"person",
|
|
4129
|
+
"vehicle",
|
|
4130
|
+
"animal",
|
|
4131
|
+
"package"
|
|
4132
|
+
])),
|
|
4133
|
+
preserveOriginal: z.boolean()
|
|
4134
|
+
});
|
|
4126
4135
|
var MODEL_FORMATS = [
|
|
4127
4136
|
"onnx",
|
|
4128
4137
|
"coreml",
|
|
@@ -4301,7 +4310,13 @@ var ModelCatalogEntrySchema = z.object({
|
|
|
4301
4310
|
* `id` stays the source of truth for resolution/download/persistence; grouping
|
|
4302
4311
|
* is a presentation overlay resolved back to an `id`.
|
|
4303
4312
|
*/
|
|
4304
|
-
group: ModelVariantGroupSchema.optional()
|
|
4313
|
+
group: ModelVariantGroupSchema.optional(),
|
|
4314
|
+
/**
|
|
4315
|
+
* Per-MODEL class map override. Absent ⇒ the step's `StepDefinition.classMap`
|
|
4316
|
+
* applies (Frigate / COCO public catalog). Set on a custom model whose raw
|
|
4317
|
+
* labels already ARE the CamStack macros (Scrypted identity map).
|
|
4318
|
+
*/
|
|
4319
|
+
classMap: ClassMapDefinitionSchema.optional()
|
|
4305
4320
|
});
|
|
4306
4321
|
var ConvertTargetSchema = z.discriminatedUnion("format", [z.object({
|
|
4307
4322
|
format: z.literal("openvino"),
|
|
@@ -4330,7 +4345,8 @@ var ModelConvertMetadataSchema = z.object({
|
|
|
4330
4345
|
"ocr",
|
|
4331
4346
|
"segmentation"
|
|
4332
4347
|
]),
|
|
4333
|
-
faceAlignment: z.boolean().optional()
|
|
4348
|
+
faceAlignment: z.boolean().optional(),
|
|
4349
|
+
classMap: ClassMapDefinitionSchema.optional()
|
|
4334
4350
|
});
|
|
4335
4351
|
var ConvertArtifactSchema = z.object({
|
|
4336
4352
|
format: z.enum(MODEL_FORMATS),
|
|
@@ -15925,6 +15941,33 @@ var NativeCropRefSchema = z.object({
|
|
|
15925
15941
|
h: z.number()
|
|
15926
15942
|
})
|
|
15927
15943
|
});
|
|
15944
|
+
z.object({
|
|
15945
|
+
crop: z.object({
|
|
15946
|
+
left: z.number(),
|
|
15947
|
+
top: z.number(),
|
|
15948
|
+
width: z.number().positive(),
|
|
15949
|
+
height: z.number().positive()
|
|
15950
|
+
}).optional(),
|
|
15951
|
+
content: z.object({
|
|
15952
|
+
width: z.number().int().positive(),
|
|
15953
|
+
height: z.number().int().positive()
|
|
15954
|
+
}),
|
|
15955
|
+
fit: z.enum(["stretch", "contain"]),
|
|
15956
|
+
format: z.enum([
|
|
15957
|
+
"rgb",
|
|
15958
|
+
"gray",
|
|
15959
|
+
"jpeg"
|
|
15960
|
+
])
|
|
15961
|
+
});
|
|
15962
|
+
var FrameRefSchema = z.object({
|
|
15963
|
+
registryId: z.string().min(1),
|
|
15964
|
+
id: z.string().min(1),
|
|
15965
|
+
width: z.number().int().positive(),
|
|
15966
|
+
height: z.number().int().positive(),
|
|
15967
|
+
format: z.enum(["rgb", "gray"]),
|
|
15968
|
+
timestamp: z.number(),
|
|
15969
|
+
capturedAt: z.number().optional()
|
|
15970
|
+
});
|
|
15928
15971
|
var ModelFormatSchema$1 = z.enum([
|
|
15929
15972
|
"onnx",
|
|
15930
15973
|
"coreml",
|
|
@@ -16246,7 +16289,7 @@ var pipelineExecutorCapability = {
|
|
|
16246
16289
|
* legacy call shape used by existing benchmark code; once all
|
|
16247
16290
|
* callers pass it explicitly we make it required.
|
|
16248
16291
|
*
|
|
16249
|
-
* Exactly one of `frame`, `frameHandle`, `imageBase64`,
|
|
16292
|
+
* Exactly one of `frame`, `frameRef`, `frameHandle`, `imageBase64`,
|
|
16250
16293
|
* `referenceImage` must be provided:
|
|
16251
16294
|
* - `frame`: runtime dispatch path (runner → decoded broker frame).
|
|
16252
16295
|
* Carries the raw buffer, dimensions, and format; the executor
|
|
@@ -16268,6 +16311,12 @@ var pipelineExecutorCapability = {
|
|
|
16268
16311
|
steps: z.array(PipelineStepInputSchema).min(1),
|
|
16269
16312
|
frame: FrameInputSchema.optional(),
|
|
16270
16313
|
/**
|
|
16314
|
+
* Process-local lazy frame. Valid only when caller and provider resolve
|
|
16315
|
+
* in the same execution-group process; split/cross-node callers use
|
|
16316
|
+
* `frame`/`image` inline compatibility instead.
|
|
16317
|
+
*/
|
|
16318
|
+
frameRef: FrameRefSchema.optional(),
|
|
16319
|
+
/**
|
|
16271
16320
|
* CB5 shm passthrough — a `FrameHandle` naming the same ring slot
|
|
16272
16321
|
* the decoded pixels live in. One more member of the one-of
|
|
16273
16322
|
* frame/frameHandle/image/imageBase64/referenceImage group.
|
|
@@ -16617,7 +16666,10 @@ var NativeCropResultSchema = z.object({
|
|
|
16617
16666
|
* Which source served this crop, so a quality-sensitive consumer (the native
|
|
16618
16667
|
* `keyFrame`) can reject a degraded fallback:
|
|
16619
16668
|
* - `native` — cut from the decode worker's retained NATIVE surface (the
|
|
16620
|
-
* quality path).
|
|
16669
|
+
* quality path). A subject-tile serve is also native-resolution and stays
|
|
16670
|
+
* `native` here: the public enum cannot name `tile` without a breaking cap
|
|
16671
|
+
* change. Runner telemetry distinguishes lease vs tile via `source` on the
|
|
16672
|
+
* internal crop result (`nativeHits` vs `tileHits`).
|
|
16621
16673
|
* - `ram-fullframe` — the native surface MISSED but the request was full-frame,
|
|
16622
16674
|
* so the ≤640 RAM `RetainedFrameStore` served it (honest lower-res; legit for
|
|
16623
16675
|
* the blank-frame guard / 640-snapshot resolve, NOT for the clean keyFrame).
|
|
@@ -17108,12 +17160,41 @@ var RunnerLocalLoadSchema = z.object({
|
|
|
17108
17160
|
* legacy `OrchestratorMetricsSchema` shape so existing dashboards keep
|
|
17109
17161
|
* working unchanged when they switch to reading from the runner cap.
|
|
17110
17162
|
*/
|
|
17163
|
+
var FrameLazyCountersSchema = z.object({
|
|
17164
|
+
framesDecoded: z.number(),
|
|
17165
|
+
framesAdmitted: z.number(),
|
|
17166
|
+
framesDroppedPixelFree: z.number(),
|
|
17167
|
+
viewsMaterialized: z.number(),
|
|
17168
|
+
viewsSkipped: z.number(),
|
|
17169
|
+
workerToRunnerBytes: z.number(),
|
|
17170
|
+
runnerToPoolRawBytes: z.number(),
|
|
17171
|
+
runnerToPoolJpegBytes: z.number(),
|
|
17172
|
+
onDemandFullFrameRequests: z.number(),
|
|
17173
|
+
onDemandCropRequests: z.number(),
|
|
17174
|
+
nativeHits: z.number(),
|
|
17175
|
+
nativeMisses: z.number(),
|
|
17176
|
+
tileHits: z.number(),
|
|
17177
|
+
tileMisses: z.number(),
|
|
17178
|
+
fallbackHits: z.number(),
|
|
17179
|
+
fallbackMisses: z.number(),
|
|
17180
|
+
retainedWritesAvoided: z.number(),
|
|
17181
|
+
residentRefs: z.number(),
|
|
17182
|
+
residentBytes: z.number(),
|
|
17183
|
+
releases: z.number(),
|
|
17184
|
+
evictions: z.number(),
|
|
17185
|
+
staleMisses: z.number()
|
|
17186
|
+
});
|
|
17187
|
+
var FrameLazyMetricsSchema = z.object({
|
|
17188
|
+
node: FrameLazyCountersSchema,
|
|
17189
|
+
cameras: z.array(FrameLazyCountersSchema.extend({ deviceId: z.number() }))
|
|
17190
|
+
});
|
|
17111
17191
|
var RunnerLocalMetricsSchema = z.object({
|
|
17112
17192
|
nodeId: z.string(),
|
|
17113
17193
|
activeCameras: z.number(),
|
|
17114
17194
|
throttledCameras: z.number(),
|
|
17115
17195
|
avgInferenceTimeMs: z.number(),
|
|
17116
|
-
queueDepth: z.number()
|
|
17196
|
+
queueDepth: z.number(),
|
|
17197
|
+
frameLazy: FrameLazyMetricsSchema.optional()
|
|
17117
17198
|
});
|
|
17118
17199
|
/**
|
|
17119
17200
|
* Pipeline Runner capability — runtime detection workhorse.
|
|
@@ -19197,6 +19278,9 @@ var storageProviderCapability = {
|
|
|
19197
19278
|
endDownload: method(EndDownloadInputSchema, z.void(), { kind: "mutation" })
|
|
19198
19279
|
}
|
|
19199
19280
|
};
|
|
19281
|
+
/** Profile-exported FormBuilder schema. Shape is ConfigUISchema at the UI. */
|
|
19282
|
+
var ProfileSettingsSchemaBridge = z.unknown().nullable();
|
|
19283
|
+
var ProfileSettingsBagSchema = z.record(z.string(), z.unknown());
|
|
19200
19284
|
/**
|
|
19201
19285
|
* A live terminal session hosted by the provider addon. Output and input do
|
|
19202
19286
|
* NOT flow through the capability — they use the addon data plane
|
|
@@ -19231,7 +19315,9 @@ var TerminalProfileInfoSchema = z.object({
|
|
|
19231
19315
|
executable: z.string().optional(),
|
|
19232
19316
|
args: z.array(z.string()).readonly().optional(),
|
|
19233
19317
|
cwd: z.string().optional(),
|
|
19234
|
-
environment: z.array(z.string()).readonly().optional()
|
|
19318
|
+
environment: z.array(z.string()).readonly().optional(),
|
|
19319
|
+
/** ConfigUISchema for instance knobs, or null when the profile has none. */
|
|
19320
|
+
settingsSchema: ProfileSettingsSchemaBridge.optional()
|
|
19235
19321
|
});
|
|
19236
19322
|
/**
|
|
19237
19323
|
* A durable operator-created Terminal instance. Profiles are templates; only
|
|
@@ -19248,7 +19334,8 @@ var TerminalInstanceInfoSchema = z.object({
|
|
|
19248
19334
|
executable: z.string(),
|
|
19249
19335
|
args: z.array(z.string()).readonly(),
|
|
19250
19336
|
cwd: z.string(),
|
|
19251
|
-
environment: z.array(z.string()).readonly()
|
|
19337
|
+
environment: z.array(z.string()).readonly(),
|
|
19338
|
+
profileSettings: ProfileSettingsBagSchema
|
|
19252
19339
|
});
|
|
19253
19340
|
var TerminalLegacyCameraSchema = z.object({
|
|
19254
19341
|
stableId: z.string(),
|
|
@@ -19298,7 +19385,8 @@ var terminalSessionCapability = {
|
|
|
19298
19385
|
executable: z.string().max(1024).optional(),
|
|
19299
19386
|
args: z.array(z.string().max(2048)).max(64).optional(),
|
|
19300
19387
|
cwd: z.string().max(1024).optional(),
|
|
19301
|
-
environment: z.array(z.string().max(4096)).max(64).optional()
|
|
19388
|
+
environment: z.array(z.string().max(4096)).max(64).optional(),
|
|
19389
|
+
profileSettings: ProfileSettingsBagSchema.optional()
|
|
19302
19390
|
}), TerminalInstanceInfoSchema, {
|
|
19303
19391
|
kind: "mutation",
|
|
19304
19392
|
auth: "admin"
|
|
@@ -19309,7 +19397,8 @@ var terminalSessionCapability = {
|
|
|
19309
19397
|
executable: z.string().max(1024).optional(),
|
|
19310
19398
|
args: z.array(z.string().max(2048)).max(64).optional(),
|
|
19311
19399
|
cwd: z.string().max(1024).optional(),
|
|
19312
|
-
environment: z.array(z.string().max(4096)).max(64).optional()
|
|
19400
|
+
environment: z.array(z.string().max(4096)).max(64).optional(),
|
|
19401
|
+
profileSettings: ProfileSettingsBagSchema.optional()
|
|
19313
19402
|
}), TerminalInstanceInfoSchema, {
|
|
19314
19403
|
kind: "mutation",
|
|
19315
19404
|
auth: "admin"
|
|
@@ -23781,10 +23870,10 @@ var lawnMowerControlCapability = {
|
|
|
23781
23870
|
*
|
|
23782
23871
|
* • The SDK (mobile / web client) consumes `getConnectionEndpoints()`
|
|
23783
23872
|
* to receive an ordered list of candidate base URLs it should race
|
|
23784
|
-
* on connect — LAN IPv4 first (lowest latency
|
|
23785
|
-
* then public hostname (if a tunnel is
|
|
23786
|
-
* race them with short timeouts and stick with the
|
|
23787
|
-
* session.
|
|
23873
|
+
* on connect — LAN IPv4 and stable LAN IPv6 first (lowest latency
|
|
23874
|
+
* when on the same network), then public hostname (if a tunnel is
|
|
23875
|
+
* up). The SDK can race them with short timeouts and stick with the
|
|
23876
|
+
* winner for the session.
|
|
23788
23877
|
*
|
|
23789
23878
|
* Why hub-only: agents are not directly addressable by the operator's
|
|
23790
23879
|
* clients — they reverse-connect to the hub. Exposing their interfaces
|
|
@@ -23939,6 +24028,17 @@ var NotificationEndpointSchema = z.object({
|
|
|
23939
24028
|
/** What the ranking currently resolves to (null when nothing is reachable). */
|
|
23940
24029
|
resolved: z.string().nullable()
|
|
23941
24030
|
});
|
|
24031
|
+
/**
|
|
24032
|
+
* The URLs the SDK / viewer should race for API access. `baseUrls` empty =
|
|
24033
|
+
* AUTO (every LAN IPv4 + the public tunnel). `resolved` is what that choice
|
|
24034
|
+
* currently expands to, so the UI can show the effective set either way.
|
|
24035
|
+
*/
|
|
24036
|
+
var ViewerEndpointsSchema = z.object({
|
|
24037
|
+
/** The operator's explicit race set, or empty for AUTO. */
|
|
24038
|
+
baseUrls: z.array(z.string()).readonly(),
|
|
24039
|
+
/** What the ranking currently resolves to (may be empty if nothing is up). */
|
|
24040
|
+
resolved: z.array(z.string()).readonly()
|
|
24041
|
+
});
|
|
23942
24042
|
var AllowedAddressesSchema = z.object({
|
|
23943
24043
|
/**
|
|
23944
24044
|
* Allowlist of interface addresses operators have explicitly opted
|
|
@@ -23980,13 +24080,13 @@ var localNetworkCapability = {
|
|
|
23980
24080
|
*/
|
|
23981
24081
|
getPreferred: method(z.void(), PreferredSchema),
|
|
23982
24082
|
/**
|
|
23983
|
-
* Ordered candidate base URLs the
|
|
23984
|
-
* Includes LAN
|
|
23985
|
-
*
|
|
23986
|
-
*
|
|
23987
|
-
*
|
|
23988
|
-
*
|
|
23989
|
-
*
|
|
24083
|
+
* Ordered candidate base URLs (the palette the Network tab shows).
|
|
24084
|
+
* Includes LAN IPv4, stable LAN IPv6, the public tunnel, and mesh when
|
|
24085
|
+
* joined. Loopback is off by default. The SDK races the subset from
|
|
24086
|
+
* `getViewerEndpoints`, not this full list — IPv6 stays here because
|
|
24087
|
+
* WebRTC ICE gathers dual-stack regardless of the HTTP race. Honours
|
|
24088
|
+
* `getAllowedAddresses()` when set — addresses outside the allowlist
|
|
24089
|
+
* are dropped (the public tunnel is still included as an escape hatch).
|
|
23990
24090
|
*
|
|
23991
24091
|
* **The port is the hub's, not the caller's** (D62 — a function's fact
|
|
23992
24092
|
* belongs to whoever already owns it). This method used to take a `port`
|
|
@@ -24017,10 +24117,11 @@ var localNetworkCapability = {
|
|
|
24017
24117
|
*/
|
|
24018
24118
|
port: z.number().int().min(1).max(65535).optional(),
|
|
24019
24119
|
/** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
|
|
24020
|
-
* candidate. Default `
|
|
24120
|
+
* candidate. Default `false` — loopback is not a client route. */
|
|
24021
24121
|
includeLoopback: z.boolean().optional(),
|
|
24022
|
-
/** Skip IPv6 entries.
|
|
24023
|
-
*
|
|
24122
|
+
/** Skip IPv6 entries. Default `false` — the palette includes stable
|
|
24123
|
+
* LAN IPv6 (ICE/WebRTC uses dual-stack regardless). Pass `true` to
|
|
24124
|
+
* hide them. The viewer HTTP/WS race is `getViewerEndpoints`. */
|
|
24024
24125
|
ipv4Only: z.boolean().optional(),
|
|
24025
24126
|
/** Scheme to emit for LAN/loopback URLs. Default `'http'`.
|
|
24026
24127
|
* Pass `'https'` when the caller is itself loaded over HTTPS
|
|
@@ -24049,6 +24150,19 @@ var localNetworkCapability = {
|
|
|
24049
24150
|
*/
|
|
24050
24151
|
setNotificationEndpoint: method(z.object({ baseUrl: z.string().nullable() }), NotificationEndpointSchema, { kind: "mutation" }),
|
|
24051
24152
|
/**
|
|
24153
|
+
* The endpoints the SDK / viewer races for API access. Empty `baseUrls`
|
|
24154
|
+
* means AUTO: every LAN IPv4 address plus the public tunnel, never IPv6,
|
|
24155
|
+
* never mesh, never loopback. `resolved` is that set (or the operator's
|
|
24156
|
+
* explicit subset) as it stands right now.
|
|
24157
|
+
*/
|
|
24158
|
+
getViewerEndpoints: method(z.void(), ViewerEndpointsSchema),
|
|
24159
|
+
/**
|
|
24160
|
+
* Replace the viewer race set. Empty `baseUrls` restores AUTO. Stored
|
|
24161
|
+
* verbatim (not indices) so a temporarily-down tunnel is not silently
|
|
24162
|
+
* dropped from the operator's choice.
|
|
24163
|
+
*/
|
|
24164
|
+
setViewerEndpoints: method(z.object({ baseUrls: z.array(z.string()).readonly() }), ViewerEndpointsSchema, { kind: "mutation" }),
|
|
24165
|
+
/**
|
|
24052
24166
|
* Read the operator's allowlist. Empty = "auto" (no filter). Used
|
|
24053
24167
|
* by the admin UI's address selector to seed its checkbox state.
|
|
24054
24168
|
*/
|
|
@@ -32583,6 +32697,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
32583
32697
|
addonId: null,
|
|
32584
32698
|
access: "view"
|
|
32585
32699
|
},
|
|
32700
|
+
"localNetwork.getViewerEndpoints": {
|
|
32701
|
+
capName: "local-network",
|
|
32702
|
+
capScope: "system",
|
|
32703
|
+
addonId: null,
|
|
32704
|
+
access: "view"
|
|
32705
|
+
},
|
|
32586
32706
|
"localNetwork.list": {
|
|
32587
32707
|
capName: "local-network",
|
|
32588
32708
|
capScope: "system",
|
|
@@ -32619,6 +32739,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
32619
32739
|
addonId: null,
|
|
32620
32740
|
access: "create"
|
|
32621
32741
|
},
|
|
32742
|
+
"localNetwork.setViewerEndpoints": {
|
|
32743
|
+
capName: "local-network",
|
|
32744
|
+
capScope: "system",
|
|
32745
|
+
addonId: null,
|
|
32746
|
+
access: "create"
|
|
32747
|
+
},
|
|
32622
32748
|
"localNetwork.uploadCertificate": {
|
|
32623
32749
|
capName: "local-network",
|
|
32624
32750
|
capScope: "system",
|
|
@@ -23,13 +23,30 @@ export declare function siblingUrl(mainUrl: string, sibling: string): string;
|
|
|
23
23
|
* agree on the on-disk layout without re-deriving it.
|
|
24
24
|
*/
|
|
25
25
|
export declare function collectModelFiles(entry: ModelCatalogEntry, format: ModelFormat): string[];
|
|
26
|
+
export type DownloadRedirectPolicy = (url: URL, hop: number) => void;
|
|
27
|
+
export interface DownloadFileOptions {
|
|
28
|
+
readonly onProgress?: (downloaded: number, total: number) => void;
|
|
29
|
+
/**
|
|
30
|
+
* When set, redirects are followed manually and THIS policy is applied to
|
|
31
|
+
* the initial URL and every Location hop before the next fetch. Absent ⇒
|
|
32
|
+
* native `redirect: 'follow'` (backward compatible).
|
|
33
|
+
*/
|
|
34
|
+
readonly redirectPolicy?: DownloadRedirectPolicy;
|
|
35
|
+
readonly maxRedirects?: number;
|
|
36
|
+
readonly timeoutMs?: number;
|
|
37
|
+
readonly maxBytes?: number;
|
|
38
|
+
readonly fetchImpl?: typeof fetch;
|
|
39
|
+
}
|
|
26
40
|
/**
|
|
27
41
|
* Download a single file from a URL to a destination path.
|
|
28
|
-
* Uses native fetch() (Node 22+) which handles redirects natively.
|
|
29
42
|
* Streams to disk with optional progress callback.
|
|
30
43
|
* Returns the destination path. Skips download if file already exists.
|
|
44
|
+
*
|
|
45
|
+
* The third argument remains a progress callback for existing callers. Pass
|
|
46
|
+
* an options object to supply a per-hop redirect policy, timeout, or byte cap.
|
|
31
47
|
*/
|
|
32
48
|
export declare function downloadFile(url: string, destPath: string, onProgress?: (downloaded: number, total: number) => void): Promise<string>;
|
|
49
|
+
export declare function downloadFile(url: string, destPath: string, options: DownloadFileOptions): Promise<string>;
|
|
33
50
|
/**
|
|
34
51
|
* Fetch JSON from a URL using native fetch().
|
|
35
52
|
*/
|