@dominevo/types 0.1.0 → 0.1.2
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/CHANGELOG.md +15 -0
- package/dist/addon/base-addon.d.ts +2 -16
- package/dist/addon.d.ts +4 -4
- package/dist/addon.js +2 -2
- package/dist/addon.mjs +2 -2
- package/dist/app-bridge.d.ts +16 -16
- package/dist/auth/app-callback.d.ts +2 -3
- package/dist/auth/credential-scope.d.ts +1 -1
- package/dist/auth/device-certificate.d.ts +5 -5
- package/dist/auth/sso-state.d.ts +1 -1
- package/dist/brokers/smtp-inbound.d.ts +1 -1
- package/dist/cap-call-context.d.ts +2 -2
- package/dist/capabilities/backup.cap.d.ts +1 -1
- package/dist/capabilities/capability-definition.d.ts +1 -1
- package/dist/capabilities/custom-model-registry.cap.d.ts +8 -8
- package/dist/capabilities/display-palette.cap.d.ts +2 -2
- package/dist/capabilities/hub-address.d.ts +5 -5
- package/dist/capabilities/index.d.ts +2 -2
- package/dist/capabilities/keychain-admin.cap.d.ts +2 -2
- package/dist/capabilities/load-contribution.cap.d.ts +1 -1
- package/dist/capabilities/local-network.cap.d.ts +2 -2
- package/dist/capabilities/metrics-provider.cap.d.ts +1 -1
- package/dist/capabilities/migrations.cap.d.ts +1 -1
- package/dist/capabilities/model-convert.cap.d.ts +2 -2
- package/dist/capabilities/model-distributor.cap.d.ts +4 -4
- package/dist/capabilities/notification-rules.cap.d.ts +1 -1
- package/dist/capabilities/oauth-integration.cap.d.ts +1 -1
- package/dist/capabilities/pipeline-executor.cap.d.ts +5 -5
- package/dist/capabilities/pipeline-orchestrator.cap.d.ts +1 -1
- package/dist/capabilities/pipeline-runner.cap.d.ts +1 -1
- package/dist/capabilities/recording.cap.d.ts +5 -5
- package/dist/capabilities/reserved-collection-sources.d.ts +1 -1
- package/dist/capabilities/server-management.cap.d.ts +4 -4
- package/dist/capabilities/settings-store.cap.d.ts +1 -1
- package/dist/capabilities/training.cap.d.ts +1 -1
- package/dist/capabilities/user-management.cap.d.ts +8 -2
- package/dist/capabilities/videoclips.cap.d.ts +5 -5
- package/dist/capabilities/viewer-link-url.d.ts +6 -6
- package/dist/catalogs/display-palette-tables.d.ts +2 -2
- package/dist/catalogs/display-palette.d.ts +3 -3
- package/dist/catalogs/palette-entries.d.ts +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/client.js +19 -27
- package/dist/client.mjs +19 -27
- package/dist/constants.d.ts +2 -2
- package/dist/deps/edgetpu-delegate.d.ts +4 -4
- package/dist/deps/ffmpeg-binary-source.d.ts +2 -2
- package/dist/deps/ffmpeg-downloader.d.ts +1 -1
- package/dist/device/icon-catalog.generated.d.ts +2 -5
- package/dist/enums/event-category.d.ts +2 -2
- package/dist/enums.js +1 -1
- package/dist/enums.mjs +1 -1
- package/dist/esm/addon/base-addon.mjs +2 -22
- package/dist/esm/addon/notification-targets.mjs +1 -1
- package/dist/esm/addon/record-integration-instances.mjs +2 -2
- package/dist/esm/addon.mjs +1 -1
- package/dist/esm/app-bridge.mjs +2 -2
- package/dist/esm/auth/app-callback.mjs +3 -9
- package/dist/esm/auth/credential-scope.mjs +2 -2
- package/dist/esm/auth/device-certificate.mjs +6 -11
- package/dist/esm/auth/sso-state.mjs +1 -1
- package/dist/esm/brokers/smtp-inbound.mjs +1 -1
- package/dist/esm/cap-call-context.mjs +2 -2
- package/dist/esm/capabilities/backup.cap.mjs +1 -1
- package/dist/esm/capabilities/custom-model-registry.cap.mjs +1 -1
- package/dist/esm/capabilities/device-export.cap.mjs +1 -1
- package/dist/esm/capabilities/face-gallery.cap.mjs +1 -1
- package/dist/esm/capabilities/hub-address.mjs +8 -8
- package/dist/esm/capabilities/ir-transmitter.cap.mjs +1 -1
- package/dist/esm/capabilities/keychain-admin.cap.mjs +2 -2
- package/dist/esm/capabilities/load-contribution.cap.mjs +1 -1
- package/dist/esm/capabilities/local-network.cap.mjs +3 -3
- package/dist/esm/capabilities/mesh-network.cap.mjs +2 -2
- package/dist/esm/capabilities/metrics-provider.cap.mjs +2 -2
- package/dist/esm/capabilities/migrations.cap.mjs +1 -1
- package/dist/esm/capabilities/notification-rules.cap.mjs +1 -1
- package/dist/esm/capabilities/oauth-integration.cap.mjs +1 -1
- package/dist/esm/capabilities/pipeline-orchestrator.cap.mjs +2 -2
- package/dist/esm/capabilities/pipeline-runner.cap.mjs +2 -2
- package/dist/esm/capabilities/recording.cap.mjs +7 -7
- package/dist/esm/capabilities/reserved-collection-sources.mjs +1 -1
- package/dist/esm/capabilities/server-management.cap.mjs +4 -4
- package/dist/esm/capabilities/settings-store.cap.mjs +1 -1
- package/dist/esm/capabilities/sso-bridge.cap.mjs +1 -1
- package/dist/esm/capabilities/training-provider.cap.mjs +1 -1
- package/dist/esm/capabilities/user-management.cap.mjs +5 -1
- package/dist/esm/capabilities/videoclips.cap.mjs +6 -6
- package/dist/esm/capabilities/viewer-link-url.mjs +5 -5
- package/dist/esm/catalogs/display-palette-tables.mjs +3 -3
- package/dist/esm/catalogs/display-palette.mjs +6 -6
- package/dist/esm/catalogs/event-taxonomy.mjs +2 -2
- package/dist/esm/catalogs/palette-entries.mjs +1 -1
- package/dist/esm/constants.mjs +1 -1
- package/dist/esm/deps/binary-downloader.mjs +1 -1
- package/dist/esm/deps/edgetpu-delegate.mjs +6 -6
- package/dist/esm/deps/ffmpeg-artifacts.mjs +1 -1
- package/dist/esm/deps/ffmpeg-binary-source.mjs +2 -2
- package/dist/esm/deps/ffmpeg-downloader.mjs +1 -1
- package/dist/esm/deps/python-downloader.mjs +1 -1
- package/dist/esm/device/icon-catalog.generated.mjs +2 -5
- package/dist/esm/enums/event-category.mjs +2 -2
- package/dist/esm/ffmpeg/egress-sharing-key.mjs +19 -0
- package/dist/esm/ffmpeg/sharing-key.mjs +1 -35
- package/dist/esm/generated/method-descriptions.mjs +4 -4
- package/dist/esm/generated/scope-presets.mjs +1 -1
- package/dist/esm/i18n/{camstack-error.mjs → dominevo-error.mjs} +5 -5
- package/dist/esm/index.mjs +7 -8
- package/dist/esm/interfaces/addon-data-plane.mjs +2 -2
- package/dist/esm/interfaces/config-ui-secrets.mjs +1 -1
- package/dist/esm/interfaces/storage-location-declaration.mjs +4 -4
- package/dist/esm/keychain/known-secrets.mjs +1 -1
- package/dist/esm/keychain/secret-marker.mjs +1 -1
- package/dist/esm/node.mjs +5 -2
- package/dist/esm/notification/email-mime.mjs +2 -2
- package/dist/esm/notification/scope-picker-items.mjs +3 -3
- package/dist/esm/pipeline/native-lease.mjs +1 -1
- package/dist/esm/pipeline/node-benchmark/schemas.mjs +1 -1
- package/dist/esm/records/errors.mjs +1 -1
- package/dist/esm/records/in-memory-records-rows.mjs +1 -1
- package/dist/esm/records/secret-views.mjs +1 -1
- package/dist/esm/storage/atomic-write.mjs +1 -1
- package/dist/esm/storage/filesystem-storage-provider.mjs +3 -3
- package/dist/esm/template/automation-template.mjs +1 -1
- package/dist/esm/training/trainer-contract.mjs +10 -10
- package/dist/esm/treeshake-canary.mjs +1 -1
- package/dist/esm/types/models.mjs +7 -7
- package/dist/esm/util/models-dir.mjs +19 -0
- package/dist/esm/utils/pool-memory-watchdog.mjs +8 -8
- package/dist/esm/vendor-login-proxy/login-proxy.mjs +1 -1
- package/dist/esm/vendor-login-proxy/url-rewrite.mjs +1 -1
- package/dist/{event-category-7IiGF_Ui.mjs → event-category-CwprdwEL.mjs} +2 -2
- package/dist/{event-category-BJe9O5KZ.js → event-category-DhlUHlM5.js} +2 -2
- package/dist/ffmpeg/egress-sharing-key.d.ts +19 -0
- package/dist/ffmpeg/sharing-key.d.ts +19 -12
- package/dist/generated/addon-api.d.ts +40 -6
- package/dist/i18n/{camstack-error.d.ts → dominevo-error.d.ts} +2 -2
- package/dist/index.d.ts +3 -4
- package/dist/index.js +141 -330
- package/dist/index.mjs +134 -320
- package/dist/interfaces/addon-data-plane.d.ts +4 -4
- package/dist/interfaces/addon.d.ts +11 -11
- package/dist/interfaces/analysis.d.ts +2 -2
- package/dist/interfaces/capability.d.ts +1 -1
- package/dist/interfaces/config-ui-secrets.d.ts +1 -1
- package/dist/interfaces/context.d.ts +2 -2
- package/dist/interfaces/detection-addon.d.ts +2 -2
- package/dist/interfaces/device-provider.d.ts +2 -2
- package/dist/interfaces/event-bus.d.ts +1 -1
- package/dist/interfaces/kernel-abstractions.d.ts +1 -1
- package/dist/interfaces/storage-location-declaration.d.ts +1 -1
- package/dist/node.d.ts +3 -0
- package/dist/node.js +168 -13
- package/dist/node.mjs +164 -13
- package/dist/notification/scope-picker-items.d.ts +2 -2
- package/dist/{runtime-capabilities-B9CE8DzI.js → runtime-capabilities-Db29ELdy.js} +26 -46
- package/dist/{runtime-capabilities-CAGwQ-Ec.mjs → runtime-capabilities-Dg5DXZkO.mjs} +21 -41
- package/dist/storage/filesystem-storage-provider.d.ts +1 -1
- package/dist/template/automation-template.d.ts +2 -2
- package/dist/training/trainer-contract.d.ts +9 -9
- package/dist/treeshake-canary.d.ts +3 -3
- package/dist/types/agent-pipeline-settings.d.ts +1 -1
- package/dist/types/models.d.ts +11 -11
- package/dist/util/models-dir.d.ts +10 -0
- package/dist/utils/pool-memory-watchdog.d.ts +1 -1
- package/dist/{wake-on-lan-BocEJPCO.js → wake-on-lan-CAbNKvo9.js} +62 -34
- package/dist/{wake-on-lan-Dm-fxZ7N.mjs → wake-on-lan-DqbzeHhm.mjs} +57 -35
- package/package.json +4 -4
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* hub can reach the addon's `127.0.0.1` listener. Defined here (shared by the
|
|
6
6
|
* core proxy and the kernel listener) to keep both off a kernel↔core import.
|
|
7
7
|
*/
|
|
8
|
-
var DATAPLANE_SECRET_HEADER = "x-
|
|
8
|
+
var DATAPLANE_SECRET_HEADER = "x-dominevo-dataplane-secret";
|
|
9
9
|
/**
|
|
10
10
|
* The authenticated caller's username, written by the HUB gate on every
|
|
11
11
|
* non-public data-plane request AFTER it verified the credential. Whatever the
|
|
@@ -13,7 +13,7 @@ var DATAPLANE_SECRET_HEADER = "x-camstack-dataplane-secret";
|
|
|
13
13
|
* identity of the request, percent-encoded (a viewer's log batch is attributed with it, never
|
|
14
14
|
* with a field of its own body).
|
|
15
15
|
*/
|
|
16
|
-
var CALLER_USERNAME_HEADER = "x-
|
|
16
|
+
var CALLER_USERNAME_HEADER = "x-dominevo-user";
|
|
17
17
|
/**
|
|
18
18
|
* The share-view scope kinds a share-link token can carry. The hub mints
|
|
19
19
|
* and validates them (`ShareViewGrantSchema` builds its
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* plausibly choose as a real password would turn that convenience into a way
|
|
9
9
|
* to lock yourself out, hence the sentinel shape.
|
|
10
10
|
*/
|
|
11
|
-
var REDACTED_SECRET = "
|
|
11
|
+
var REDACTED_SECRET = "__dominevo_redacted__";
|
|
12
12
|
/** Is this field's stored value a credential? */
|
|
13
13
|
function isSecretConfigField(field) {
|
|
14
14
|
if (field.type === "password") return true;
|
|
@@ -2,7 +2,7 @@ import { z } from "zod";
|
|
|
2
2
|
//#region src/interfaces/storage-location-declaration.ts
|
|
3
3
|
/**
|
|
4
4
|
* `StorageLocationDeclaration` — a single storage-location entry declared by
|
|
5
|
-
* an addon in its `package.json` under `
|
|
5
|
+
* an addon in its `package.json` under `dominevo.storageLocations`.
|
|
6
6
|
*
|
|
7
7
|
* Design intent:
|
|
8
8
|
* - **Addon declares its needs** — each addon describes the logical storage
|
|
@@ -93,12 +93,12 @@ var StorageLocationDeclarationSchema = /* @__PURE__ */ z.object({
|
|
|
93
93
|
/**
|
|
94
94
|
* Which node root the seeded `<id>:default` instance is placed under on a
|
|
95
95
|
* FRESH install:
|
|
96
|
-
* - `'data'` (default) — the node's data dir (`
|
|
96
|
+
* - `'data'` (default) — the node's data dir (`DOMINEVO_DATA` / boot dir),
|
|
97
97
|
* the appData volume. Right for small/durable data (logs, models).
|
|
98
|
-
* - `'media'` — the dedicated media volume (`
|
|
98
|
+
* - `'media'` — the dedicated media volume (`DOMINEVO_MEDIA_ROOT`) when that
|
|
99
99
|
* env is set, else falls back to the data root. Right for bulky, hot media
|
|
100
100
|
* (recordings, event media) that should stay off the appData disk.
|
|
101
|
-
* - `'backup'` — the dedicated backup volume (`
|
|
101
|
+
* - `'backup'` — the dedicated backup volume (`DOMINEVO_BACKUP_ROOT`, default
|
|
102
102
|
* `/backups` in the image) so archives live on their own mount rather than
|
|
103
103
|
* filling the appData disk. Falls back to the data root when unset.
|
|
104
104
|
*
|
|
@@ -22,7 +22,7 @@ var MIN_SCRUBBED_LENGTH = 8;
|
|
|
22
22
|
* One store per PROCESS, even when two copies of this module are loaded (an
|
|
23
23
|
* addon bundle next to the framework's): keyed on a registered symbol.
|
|
24
24
|
*/
|
|
25
|
-
var STORE_KEY = /* @__PURE__ */ Symbol.for("
|
|
25
|
+
var STORE_KEY = /* @__PURE__ */ Symbol.for("dominevo.keychain.known-secrets");
|
|
26
26
|
function store() {
|
|
27
27
|
const existing = Reflect.get(globalThis, STORE_KEY);
|
|
28
28
|
if (existing !== void 0 && existing !== null) return existing;
|
|
@@ -78,7 +78,7 @@ function classifySecretWrite(incoming) {
|
|
|
78
78
|
if (isSecretClear(incoming)) return { kind: "clear" };
|
|
79
79
|
if (typeof incoming !== "string") return { kind: "keep" };
|
|
80
80
|
if (incoming.length === 0) return { kind: "keep" };
|
|
81
|
-
if (incoming === "
|
|
81
|
+
if (incoming === "__dominevo_redacted__" || incoming === LEGACY_DEVICE_REDACTION) return { kind: "keep" };
|
|
82
82
|
return {
|
|
83
83
|
kind: "set",
|
|
84
84
|
value: incoming
|
package/dist/esm/node.mjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { canonicalHash } from "./utils/canonical-hash.mjs";
|
|
2
1
|
import { FFMPEG_RELEASE, getFfmpegArtifact, getFfmpegDownloadUrl } from "./deps/ffmpeg-artifacts.mjs";
|
|
3
2
|
import { implementedMethodsOf } from "./device/implemented-methods.mjs";
|
|
4
3
|
import { buildBinaryPath, downloadBinary, ensureBinary, findInPath, getPlatformInfo } from "./deps/binary-downloader.mjs";
|
|
@@ -16,8 +15,12 @@ import { ChildCostRegistry, NO_COST_CLAIM, nodeProcStatReader, parseProcCpuSecon
|
|
|
16
15
|
import { writeFileAtomic } from "./storage/atomic-write.mjs";
|
|
17
16
|
import FilesystemStorageProvider from "./storage/filesystem-storage-provider.mjs";
|
|
18
17
|
import { containsOrEquals, physicalRootOf } from "./storage/physical-root.mjs";
|
|
18
|
+
import { canonicalHash } from "./utils/canonical-hash.mjs";
|
|
19
19
|
import { customizationBlockName } from "./composition/customization-name.mjs";
|
|
20
20
|
import { signExpiringUrl, verifyExpiringUrl } from "./utils/expiring-url-signature.mjs";
|
|
21
21
|
import { canonicalDeviceFingerprint, diffExportTargets, resolveExportFingerprint } from "./utils/export-reconciler.mjs";
|
|
22
22
|
import { WOL_REFUSAL_REASONS, sendWakeOnLan } from "./network/wake-on-lan-node.mjs";
|
|
23
|
-
|
|
23
|
+
import { egressTranscodeSharingKey } from "./ffmpeg/egress-sharing-key.mjs";
|
|
24
|
+
import { calendarRecordId, moveCalendarIdsToRecords } from "./migrations/calendar-ids-to-records.mjs";
|
|
25
|
+
import { resolveModelsDir } from "./util/models-dir.mjs";
|
|
26
|
+
export { ChildCostRegistry, EDGETPU_DELEGATE_DIRECTIVE, EDGETPU_DELEGATE_RELEASE, EDGETPU_LIB_ENV, FFMPEG_RELEASE, FfmpegProcess, FilesystemStorageProvider, Fmp4FragmentChild, Fmp4FragmentPlane, LEGACY_EDGETPU_LIB, NO_COST_CLAIM, NO_PINNED_FFMPEG_DETAIL, OwnerOnlyError, PYTHON_VERSION, WOL_REFUSAL_REASONS, buildBinaryPath, calendarRecordId, canonicalDeviceFingerprint, canonicalHash, chooseEdgetpuDelegate, containsOrEquals, customizationBlockName, debDataMember, declaresEdgetpuDelegate, defaultFfmpegSpawn, diffExportTargets, downloadBinary, edgetpuDelegateFileName, edgetpuLibDir, egressTranscodeSharingKey, ensureBinary, ensureEdgetpuDelegate, ensureFfmpeg, ensurePython, extractDebPayload, findInPath, getEdgetpuDelegateArtifact, getFfmpegArtifact, getFfmpegDownloadUrl, getPlatformInfo, getPythonDownloadUrl, icaclsArgs, implementedMethodsOf, installLibraryFromDeb, installPythonPackages, installPythonRequirements, mkdirOwnerOnlySync, moveCalendarIdsToRecords, nodeDataRootFromEnv, nodeProcStatReader, parseFfmpegCapabilities, parseProcCpuSeconds, parseProcRssBytes, physicalRootOf, pinnedFfmpegSpawner, probeFfmpegBinary, readArMembers, readProcessCost, resolveExportFingerprint, resolveModelsDir, resolvePinnedFfmpegSpawner, restrictDirToOwnerSync, restrictFileToOwnerSync, sendWakeOnLan, signExpiringUrl, verifyExpiringUrl, writeFileAtomic, writeOwnerOnlyFileSync };
|
|
@@ -18,7 +18,7 @@ var EMAIL_IMAGE_MAX_TOTAL_BYTES = 5 * 1024 * 1024;
|
|
|
18
18
|
* Where an HTML body leaves room for the inline images: under the text, above
|
|
19
19
|
* the click link. The builder replaces it; a message with no image loses it.
|
|
20
20
|
*/
|
|
21
|
-
var EMAIL_IMAGE_SLOT = "<!--
|
|
21
|
+
var EMAIL_IMAGE_SLOT = "<!--dominevo-images-->";
|
|
22
22
|
var EmailImagePartSchema = /* @__PURE__ */ z.object({
|
|
23
23
|
ticket: PeerBytesTicketSchema,
|
|
24
24
|
mime: /* @__PURE__ */ z.string().min(1),
|
|
@@ -30,7 +30,7 @@ var EmailImagePartSchema = /* @__PURE__ */ z.object({
|
|
|
30
30
|
var mimeSeq = 0;
|
|
31
31
|
function nextBoundary(kind) {
|
|
32
32
|
mimeSeq += 1;
|
|
33
|
-
return `
|
|
33
|
+
return `dominevo_${kind}_${mimeSeq.toString(36)}_${Date.now().toString(36)}`;
|
|
34
34
|
}
|
|
35
35
|
function encodeHeaderWord(value) {
|
|
36
36
|
if (/^[\x20-\x7E]*$/.test(value)) return value;
|
|
@@ -24,17 +24,17 @@ var NC_SERVER_PACKAGE_NAME = "@dominevo/server";
|
|
|
24
24
|
* The kernel and builtins ship inside it, so there is no separate framework
|
|
25
25
|
* package to announce. `@dominevo/types` / `@dominevo/sdk` are framework
|
|
26
26
|
* packages for upload routing but are never announced, so they are NOT here.
|
|
27
|
-
* - `
|
|
27
|
+
* - `dominevo-wrapper` — `wrapper-update-available` (`WRAPPER_PACKAGE_NAME`,
|
|
28
28
|
* `wrapper-update-checker.ts`).
|
|
29
29
|
*
|
|
30
30
|
* Types cannot import those producers; the backend spec
|
|
31
31
|
* `core/updates/__tests__/update-event-package-names.spec.ts` pins each literal
|
|
32
32
|
* to its producer constant. This is a picker list, never a routing list.
|
|
33
33
|
*/
|
|
34
|
-
var NC_UPDATE_EVENT_PACKAGE_NAMES = [NC_SERVER_PACKAGE_NAME, "
|
|
34
|
+
var NC_UPDATE_EVENT_PACKAGE_NAMES = [NC_SERVER_PACKAGE_NAME, "dominevo-wrapper"];
|
|
35
35
|
var UPDATE_EVENT_PACKAGE_TYPE = {
|
|
36
36
|
"@dominevo/server": "server",
|
|
37
|
-
"
|
|
37
|
+
"dominevo-wrapper": "wrapper"
|
|
38
38
|
};
|
|
39
39
|
function isUpdateEventPackageName(name) {
|
|
40
40
|
return NC_UPDATE_EVENT_PACKAGE_NAMES.some((pinned) => pinned === name);
|
|
@@ -246,7 +246,7 @@ var NATIVE_LEASE_ADMISSION_FIELD = {
|
|
|
246
246
|
* the schema's own `default` (verified live on the hub: a cluster that has never
|
|
247
247
|
* opened the form still reports `nativeLeaseHoldFrames = 8`). A reader that took
|
|
248
248
|
* that at face value would report all three knobs as "set" on every cluster on
|
|
249
|
-
* the day this shipped, permanently retiring the `
|
|
249
|
+
* the day this shipped, permanently retiring the `DOMINEVO_SESSION_NATIVE_LEASE_*`
|
|
250
250
|
* emergency override that the precedence promises. There is no raw-store read on
|
|
251
251
|
* this cap to distinguish the two, so the default value itself is treated as
|
|
252
252
|
* "the operator has expressed no preference" — which is also what leaving a
|
|
@@ -302,7 +302,7 @@ var NodeBenchFingerprintSchema = /* @__PURE__ */ z.object({
|
|
|
302
302
|
});
|
|
303
303
|
/** The frames the run used. */
|
|
304
304
|
var NodeBenchClipSchema = /* @__PURE__ */ z.object({
|
|
305
|
-
/** `
|
|
305
|
+
/** `dominevo-bench-v1` or `reference-images` (the fallback when the clip is not reachable). */
|
|
306
306
|
id: /* @__PURE__ */ z.string(),
|
|
307
307
|
revision: /* @__PURE__ */ z.string().nullable(),
|
|
308
308
|
frames: /* @__PURE__ */ z.number(),
|
|
@@ -33,7 +33,7 @@ var PREFIX = "records/";
|
|
|
33
33
|
* instance of the host's classes, not of the addon's. The brand plus the code
|
|
34
34
|
* make `instanceof` answer by identity of the failure, not of the copy.
|
|
35
35
|
*/
|
|
36
|
-
var RECORDS_ERROR_BRAND = /* @__PURE__ */ Symbol.for("
|
|
36
|
+
var RECORDS_ERROR_BRAND = /* @__PURE__ */ Symbol.for("dominevo.records-error");
|
|
37
37
|
function carriesBrand(value) {
|
|
38
38
|
return typeof value === "object" && value !== null && Reflect.get(value, RECORDS_ERROR_BRAND) === true;
|
|
39
39
|
}
|
|
@@ -68,7 +68,7 @@ function enforceSecrets(owner, kind, decl, id, body, stored, mode) {
|
|
|
68
68
|
if (leaf.value.$secret !== expected) throw new ForeignSecretMarkerError(`${kind}/${id.slice(0, 64)} field "${leaf.concrete}": the marker is not this row's own ref`);
|
|
69
69
|
return leaf.value;
|
|
70
70
|
}
|
|
71
|
-
if (leaf.value === "
|
|
71
|
+
if (leaf.value === "__dominevo_redacted__") {
|
|
72
72
|
const keep = storedMarkers.get(leaf.concrete);
|
|
73
73
|
if (keep === void 0) return REMOVE_LEAF;
|
|
74
74
|
if (mode === "patch" && !leaf.concrete.includes("[")) return REMOVE_LEAF;
|
|
@@ -17,7 +17,7 @@ function isRecord(value) {
|
|
|
17
17
|
function secretViewsOf(owner, kind, id, decl, data) {
|
|
18
18
|
if (decl.secretPaths.length === 0) return data;
|
|
19
19
|
const shown = mapSecretLeaves(data, decl.secretPaths, decl.secretArrayKeys, (leaf) => {
|
|
20
|
-
if (leaf.value !== "
|
|
20
|
+
if (leaf.value !== "__dominevo_redacted__") return leaf.value;
|
|
21
21
|
return {
|
|
22
22
|
$secret: recordSecretRef(owner, kind, id, leaf.concrete),
|
|
23
23
|
v: 1,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { randomUUID } from "node:crypto";
|
|
2
1
|
import * as fs from "node:fs";
|
|
3
2
|
import * as path$1 from "node:path";
|
|
3
|
+
import { randomUUID } from "node:crypto";
|
|
4
4
|
//#region src/storage/atomic-write.ts
|
|
5
5
|
/** Errors a Windows rename over a file another process has open can raise. */
|
|
6
6
|
var WINDOWS_RENAME_BUSY = /* @__PURE__ */ new Set([
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { writeFileAtomic } from "./atomic-write.mjs";
|
|
2
|
-
import { randomUUID } from "node:crypto";
|
|
3
2
|
import * as fs from "node:fs";
|
|
4
3
|
import * as path$1 from "node:path";
|
|
5
4
|
import { pipeline } from "node:stream/promises";
|
|
5
|
+
import { randomUUID } from "node:crypto";
|
|
6
6
|
//#region src/storage/filesystem-storage-provider.ts
|
|
7
7
|
var STORAGE_LOCATION_TYPES = [
|
|
8
8
|
"data",
|
|
@@ -28,7 +28,7 @@ var DEFAULT_LOCATION_SUBDIRS = {
|
|
|
28
28
|
"event-images": "event-images",
|
|
29
29
|
models: "models",
|
|
30
30
|
"addons-data": "addons-data",
|
|
31
|
-
cache: "/tmp/
|
|
31
|
+
cache: "/tmp/dominevo-cache",
|
|
32
32
|
logs: "logs",
|
|
33
33
|
backups: "backups"
|
|
34
34
|
};
|
|
@@ -43,7 +43,7 @@ var DEFAULT_LOCATION_SUBDIRS = {
|
|
|
43
43
|
* {rootPath}/models/
|
|
44
44
|
* {rootPath}/addons-data/
|
|
45
45
|
* {rootPath}/logs/
|
|
46
|
-
* /tmp/
|
|
46
|
+
* /tmp/dominevo-cache/ (cache is always local)
|
|
47
47
|
*
|
|
48
48
|
* Individual location paths can be overridden.
|
|
49
49
|
*/
|
|
@@ -801,7 +801,7 @@ function detachAutomationInstance(recipe) {
|
|
|
801
801
|
const { template: _link, ...free } = recipe;
|
|
802
802
|
return free;
|
|
803
803
|
}
|
|
804
|
-
var AUTOMATION_TEMPLATE_EXPORT_FORMAT = "
|
|
804
|
+
var AUTOMATION_TEMPLATE_EXPORT_FORMAT = "dominevo.automation-template";
|
|
805
805
|
var AutomationTemplateExportSchema = /* @__PURE__ */ z.object({
|
|
806
806
|
format: /* @__PURE__ */ z.literal(AUTOMATION_TEMPLATE_EXPORT_FORMAT),
|
|
807
807
|
version: /* @__PURE__ */ z.literal(1),
|
|
@@ -4,21 +4,21 @@ import { z } from "zod";
|
|
|
4
4
|
* The trainer contract — what the hub hands the cloud trainer and what it
|
|
5
5
|
* gets back (cloud training, D805+).
|
|
6
6
|
*
|
|
7
|
-
* The trainer (`hf/
|
|
8
|
-
* `
|
|
9
|
-
* imports: `job.json` goes in, files come out, and progress is `
|
|
7
|
+
* The trainer (`hf/dominevo-trainer`, published as the Hugging Face repo
|
|
8
|
+
* `Dominevo/dominevo-trainer`) is a separate AGPL program the hub never
|
|
9
|
+
* imports: `job.json` goes in, files come out, and progress is `DOMINEVO_EVENT`
|
|
10
10
|
* lines on stdout. These schemas are the hub's half of that boundary; the
|
|
11
11
|
* trainer's pydantic models (and the JSON Schemas generated from them under
|
|
12
|
-
* `hf/
|
|
12
|
+
* `hf/dominevo-trainer/schemas/`) are the other half. A change here is a
|
|
13
13
|
* change there, in the same piece of work.
|
|
14
14
|
*
|
|
15
15
|
* No `.default()` anywhere: defaults do not run on the addon cap path, so the
|
|
16
16
|
* orchestrator fills every field of a job spec explicitly.
|
|
17
17
|
*/
|
|
18
|
-
var TRAINING_JOB_SCHEMA = "
|
|
19
|
-
var TRAINING_RESULT_SCHEMA = "
|
|
18
|
+
var TRAINING_JOB_SCHEMA = "dominevo.training/v1";
|
|
19
|
+
var TRAINING_RESULT_SCHEMA = "dominevo.training-result/v1";
|
|
20
20
|
/** The stdout prefix of a progress line. Anything else on stdout is log text. */
|
|
21
|
-
var
|
|
21
|
+
var DOMINEVO_EVENT_PREFIX = "DOMINEVO_EVENT ";
|
|
22
22
|
/** What the trainer can export. Edge TPU is a later, separate image. */
|
|
23
23
|
var TrainingExportSchema = /* @__PURE__ */ z.enum([
|
|
24
24
|
"onnx",
|
|
@@ -99,7 +99,7 @@ var TrainingResultFileSchema = /* @__PURE__ */ z.object({
|
|
|
99
99
|
variant: /* @__PURE__ */ z.enum(["base", "int8"])
|
|
100
100
|
});
|
|
101
101
|
var DraftFormatSchema = /* @__PURE__ */ z.object({
|
|
102
|
-
/** RELATIVE path inside the bundle; the hub rewrites it to `
|
|
102
|
+
/** RELATIVE path inside the bundle; the hub rewrites it to `dominevo-local://`. */
|
|
103
103
|
url: /* @__PURE__ */ z.string().min(1),
|
|
104
104
|
sizeMB: /* @__PURE__ */ z.number().nonnegative(),
|
|
105
105
|
isDirectory: /* @__PURE__ */ z.boolean().optional(),
|
|
@@ -279,7 +279,7 @@ var TrainingEventSchema = /* @__PURE__ */ z.discriminatedUnion("type", [
|
|
|
279
279
|
* line this hub does not understand — a newer trainer may add types).
|
|
280
280
|
*/
|
|
281
281
|
function parseTrainingEventLine(line) {
|
|
282
|
-
const start = line.indexOf(
|
|
282
|
+
const start = line.indexOf(DOMINEVO_EVENT_PREFIX);
|
|
283
283
|
if (start < 0) return null;
|
|
284
284
|
let raw;
|
|
285
285
|
try {
|
|
@@ -291,4 +291,4 @@ function parseTrainingEventLine(line) {
|
|
|
291
291
|
return parsed.success ? parsed.data : null;
|
|
292
292
|
}
|
|
293
293
|
//#endregion
|
|
294
|
-
export {
|
|
294
|
+
export { DOMINEVO_EVENT_PREFIX, TRAINING_JOB_SCHEMA, TRAINING_RESULT_SCHEMA, TrainingCatalogDraftSchema, TrainingEvalClassSchema, TrainingEvalReportSchema, TrainingEventSchema, TrainingExportSchema, TrainingJobSpecSchema, TrainingResultFileSchema, TrainingResultSchema, TrainingStageSchema, parseTrainingEventLine };
|
|
@@ -9,7 +9,7 @@ import { z } from "zod";
|
|
|
9
9
|
* one pre-bundled, side-effectful file; the finer regression (an initializer kept inside a
|
|
10
10
|
* module that IS reached) is `check-addon-types-reachability.ts`.
|
|
11
11
|
*/
|
|
12
|
-
var TREESHAKE_CANARY_LITERAL = "
|
|
12
|
+
var TREESHAKE_CANARY_LITERAL = "dominevo-types-treeshake-canary-7c1e";
|
|
13
13
|
var TreeshakeCanarySchema = /* @__PURE__ */ Object.freeze({
|
|
14
14
|
literal: TREESHAKE_CANARY_LITERAL,
|
|
15
15
|
schema: /* @__PURE__ */ z.object({ [TREESHAKE_CANARY_LITERAL]: /* @__PURE__ */ z.string() })
|
|
@@ -13,8 +13,8 @@ import { z } from "zod";
|
|
|
13
13
|
* HuggingFace API (slower).
|
|
14
14
|
* - Single-file formats (no `isDirectory`, e.g. OpenVINO IR): sibling
|
|
15
15
|
* files fetched from the SAME remote directory as `url` and stored flat
|
|
16
|
-
* alongside the main file — e.g. `['
|
|
17
|
-
* weights next to `
|
|
16
|
+
* alongside the main file — e.g. `['dominevo-yolov9t.bin']` for the IR
|
|
17
|
+
* weights next to `dominevo-yolov9t.xml`.
|
|
18
18
|
*/
|
|
19
19
|
var ModelFormatEntrySchema = /* @__PURE__ */ z.object({
|
|
20
20
|
url: /* @__PURE__ */ z.string(),
|
|
@@ -129,10 +129,10 @@ var ModelVariantGroupSchema = /* @__PURE__ */ z.object({
|
|
|
129
129
|
* Where a catalog entry came from. The pipeline stepper partitions the picker
|
|
130
130
|
* by this id (Dominevo / plus catalog / plugin catalog / Custom). Absent on older durable
|
|
131
131
|
* registry rows — {@link inferModelProvider} fills it at read time. Built-in
|
|
132
|
-
* catalog entries omit it and `getSchema` treats them as `
|
|
132
|
+
* catalog entries omit it and `getSchema` treats them as `dominevo`.
|
|
133
133
|
*/
|
|
134
134
|
var MODEL_PROVIDER_IDS = [
|
|
135
|
-
"
|
|
135
|
+
"dominevo",
|
|
136
136
|
"frigate",
|
|
137
137
|
"scrypted",
|
|
138
138
|
"custom"
|
|
@@ -152,7 +152,7 @@ function inferModelProvider(entry) {
|
|
|
152
152
|
return "custom";
|
|
153
153
|
}
|
|
154
154
|
var MODEL_HOSTING = [
|
|
155
|
-
"
|
|
155
|
+
"dominevo-hf",
|
|
156
156
|
"third-party",
|
|
157
157
|
"built-in"
|
|
158
158
|
];
|
|
@@ -176,7 +176,7 @@ var ModelLicenseRecordSchema = /* @__PURE__ */ z.object({
|
|
|
176
176
|
url: /* @__PURE__ */ z.string().url().optional(),
|
|
177
177
|
/** Attribution the licence REQUIRES, verbatim. */
|
|
178
178
|
attribution: /* @__PURE__ */ z.string().min(1).optional(),
|
|
179
|
-
/** What Dominevo changed. Required when `hosting` is `
|
|
179
|
+
/** What Dominevo changed. Required when `hosting` is `dominevo-hf` (guard). */
|
|
180
180
|
modifications: /* @__PURE__ */ z.string().min(1).optional(),
|
|
181
181
|
/** Who serves the file a node downloads. */
|
|
182
182
|
hosting: /* @__PURE__ */ z.enum(MODEL_HOSTING).optional(),
|
|
@@ -380,7 +380,7 @@ var ModelCatalogEntrySchema = /* @__PURE__ */ z.object({
|
|
|
380
380
|
group: /* @__PURE__ */ ModelVariantGroupSchema.optional(),
|
|
381
381
|
/**
|
|
382
382
|
* Catalog source for the pipeline stepper's provider-first picker. Absent on
|
|
383
|
-
* built-in Dominevo entries (treated as `
|
|
383
|
+
* built-in Dominevo entries (treated as `dominevo`) and on registry rows
|
|
384
384
|
* persisted before this field existed (`inferModelProvider` fills those).
|
|
385
385
|
*/
|
|
386
386
|
provider: /* @__PURE__ */ ModelProviderIdSchema.optional(),
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { promises } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
//#region src/util/models-dir.ts
|
|
4
|
+
/**
|
|
5
|
+
* The shared, node-local models directory: `<nodeDataDir>/models`, created when missing.
|
|
6
|
+
*
|
|
7
|
+
* The SINGLE resolver for every inference addon (detection-pipeline, audio-analyzer,
|
|
8
|
+
* embedding-encoder, model-studio, ai). It is anchored at the node's own writable data root
|
|
9
|
+
* (`ctx.nodeDataDir`) — never the hub-singleton `storage` cap, which returns the hub's
|
|
10
|
+
* `/data/models` to every node and breaks a node whose real data dir differs (the macOS agent).
|
|
11
|
+
* Node-only, hence `@dominevo/types/node`, off the browser-facing root entry.
|
|
12
|
+
*/
|
|
13
|
+
async function resolveModelsDir(nodeDataDir) {
|
|
14
|
+
const dir = join(nodeDataDir, "models");
|
|
15
|
+
await promises.mkdir(dir, { recursive: true });
|
|
16
|
+
return dir;
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { resolveModelsDir };
|
|
@@ -12,7 +12,7 @@ var DEFAULT_POOL_MEMORY_POLICY = {
|
|
|
12
12
|
restartWindowMs: 1440 * 6e4
|
|
13
13
|
};
|
|
14
14
|
/**
|
|
15
|
-
* Resolve the policy from env overrides (`
|
|
15
|
+
* Resolve the policy from env overrides (`DOMINEVO_POOL_MEM_*`). Garbage or
|
|
16
16
|
* absent values keep the default — an operator typo must never disable the
|
|
17
17
|
* bound or set it to zero.
|
|
18
18
|
*/
|
|
@@ -25,15 +25,15 @@ function resolvePoolMemoryPolicy(env) {
|
|
|
25
25
|
};
|
|
26
26
|
const d = DEFAULT_POOL_MEMORY_POLICY;
|
|
27
27
|
return {
|
|
28
|
-
sampleIntervalMs: num("
|
|
28
|
+
sampleIntervalMs: num("DOMINEVO_POOL_MEM_INTERVAL_MS", d.sampleIntervalMs, 5e3),
|
|
29
29
|
baselineSettleSamples: d.baselineSettleSamples,
|
|
30
30
|
baselineSampleCount: d.baselineSampleCount,
|
|
31
|
-
restartMultiple: num("
|
|
32
|
-
floorBytes: num("
|
|
33
|
-
ceilingBytes: num("
|
|
34
|
-
cooldownMs: num("
|
|
35
|
-
maxRestartsPerWindow: num("
|
|
36
|
-
restartWindowMs: num("
|
|
31
|
+
restartMultiple: num("DOMINEVO_POOL_MEM_MULTIPLE", d.restartMultiple, 1.5),
|
|
32
|
+
floorBytes: num("DOMINEVO_POOL_MEM_FLOOR_MB", d.floorBytes / MB, 128) * MB,
|
|
33
|
+
ceilingBytes: num("DOMINEVO_POOL_MEM_CEILING_MB", d.ceilingBytes / MB, 256) * MB,
|
|
34
|
+
cooldownMs: num("DOMINEVO_POOL_MEM_COOLDOWN_MS", d.cooldownMs, 6e4),
|
|
35
|
+
maxRestartsPerWindow: num("DOMINEVO_POOL_MEM_MAX_RESTARTS", d.maxRestartsPerWindow, 1),
|
|
36
|
+
restartWindowMs: num("DOMINEVO_POOL_MEM_RESTART_WINDOW_MS", d.restartWindowMs, 6e4)
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
39
|
/** Parse the fields this watchdog needs out of `/proc/<pid>/status` text.
|
|
@@ -197,7 +197,7 @@ function rewriteFormBody(body, route) {
|
|
|
197
197
|
}
|
|
198
198
|
/** Cookies the browser holds for the hub itself must never reach a vendor. */
|
|
199
199
|
function filterForwardedCookies(cookieHeader) {
|
|
200
|
-
return cookieHeader.split(";").map((part) => part.trim()).filter((part) => part.length > 0 && !part.toLowerCase().startsWith("
|
|
200
|
+
return cookieHeader.split(";").map((part) => part.trim()).filter((part) => part.length > 0 && !part.toLowerCase().startsWith("dominevo_")).join("; ");
|
|
201
201
|
}
|
|
202
202
|
//#endregion
|
|
203
203
|
export { filterForwardedCookies, findUpstream, hostWithoutPort, isLoopbackHost, isValidUpstream, parseProxyPath, rewriteBody, rewriteFormBody, rewriteLocation, rewriteReferer, rewriteSetCookie, rewriteSetCookies, upstreamUrlFor };
|
|
@@ -120,7 +120,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
120
120
|
EventCategory["AddonLoadRecovered"] = "addon.load-recovered";
|
|
121
121
|
/**
|
|
122
122
|
* An addon is RUNNING although its installed package is below what the
|
|
123
|
-
* running server requires (`
|
|
123
|
+
* running server requires (`dominevo.requires.addons` of the server, or the
|
|
124
124
|
* addon's own `requires.server`). Raised once per streak by the unsupported-
|
|
125
125
|
* addon tracker, on the hub and on agents; AlertCenter turns it into one
|
|
126
126
|
* operator alert per node and package. The addon is never held back for it.
|
|
@@ -608,7 +608,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
608
608
|
*/
|
|
609
609
|
EventCategory["MetricsNodeResourcesSnapshot"] = "metrics.node-resources-snapshot";
|
|
610
610
|
/**
|
|
611
|
-
* Periodic per-node process-tree snapshot (
|
|
611
|
+
* Periodic per-node process-tree snapshot (dominevo-related pids
|
|
612
612
|
* with root / managed / system classification). Emitted ~0.2 Hz by
|
|
613
613
|
* the metrics-provider addon. Drives the Cluster → Processes tab
|
|
614
614
|
* without polling `metricsProvider.listNodeProcesses`.
|
|
@@ -120,7 +120,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
120
120
|
EventCategory["AddonLoadRecovered"] = "addon.load-recovered";
|
|
121
121
|
/**
|
|
122
122
|
* An addon is RUNNING although its installed package is below what the
|
|
123
|
-
* running server requires (`
|
|
123
|
+
* running server requires (`dominevo.requires.addons` of the server, or the
|
|
124
124
|
* addon's own `requires.server`). Raised once per streak by the unsupported-
|
|
125
125
|
* addon tracker, on the hub and on agents; AlertCenter turns it into one
|
|
126
126
|
* operator alert per node and package. The addon is never held back for it.
|
|
@@ -608,7 +608,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
608
608
|
*/
|
|
609
609
|
EventCategory["MetricsNodeResourcesSnapshot"] = "metrics.node-resources-snapshot";
|
|
610
610
|
/**
|
|
611
|
-
* Periodic per-node process-tree snapshot (
|
|
611
|
+
* Periodic per-node process-tree snapshot (dominevo-related pids
|
|
612
612
|
* with root / managed / system classification). Emitted ~0.2 Hz by
|
|
613
613
|
* the metrics-provider addon. Drives the Cluster → Processes tab
|
|
614
614
|
* without polling `metricsProvider.listNodeProcesses`.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The egress sharing key, hashed. Node-only (`node:crypto` through
|
|
3
|
+
* `canonicalHash`), so it lives off the root entry; the plan it hashes
|
|
4
|
+
* (`canonicalEgressPlan`) stays pure in `sharing-key.ts`.
|
|
5
|
+
*/
|
|
6
|
+
import type { EgressTranscodeRequest } from '../capabilities/stream-broker.cap.js';
|
|
7
|
+
import { type EgressTransportPlan } from './sharing-key.js';
|
|
8
|
+
/**
|
|
9
|
+
* The refcount / dedup key. `canonicalHash` sorts object keys at every depth,
|
|
10
|
+
* so a request built with a different field order produces the same digest.
|
|
11
|
+
*
|
|
12
|
+
* The handle this keys is IMMUTABLE: there is no `reconfigure`. A consumer
|
|
13
|
+
* whose requirements change RELEASES and re-acquires; the refcount does the
|
|
14
|
+
* rest. That is what stops co-tenants disturbing each other — the co-tenant
|
|
15
|
+
* hazard that made Alexa's shared `derived:alexa-<id>` stream a hazard was
|
|
16
|
+
* exactly a mutable shared object, where one consumer's downgrade dragged
|
|
17
|
+
* every other consumer to 360p.
|
|
18
|
+
*/
|
|
19
|
+
export declare function egressTranscodeSharingKey(request: EgressTranscodeRequest, delivery?: EgressTransportPlan): string;
|
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sharing key for `streamBroker.acquireEgressTranscode`.
|
|
3
|
+
*
|
|
4
|
+
* **Two requesters asking for exactly the same argument set reach the same
|
|
5
|
+
* process.** Exact match, never fuzzy: a quantised ladder that merged
|
|
6
|
+
* NEARLY-identical requests would make the stream a consumer receives depend
|
|
7
|
+
* on who else is watching and in what order they arrived — unpredictable in
|
|
8
|
+
* precisely the way a debugging session cannot tolerate. Same arguments ⇒ same
|
|
9
|
+
* process. Different arguments ⇒ different process, and that is fine; the
|
|
10
|
+
* operator accepted the cost ("it's fine to have several processes").
|
|
11
|
+
*
|
|
12
|
+
* Derived from the STRUCTURED plan, not from a flag array. `pipelineKeyFor`
|
|
13
|
+
* (`transcode-pipeline.ts`) folds `getStreamWithCodec`'s raw `outputArgs` into
|
|
14
|
+
* its key, so that method's extensibility hatch and its sharing key are the
|
|
15
|
+
* same field — a consumer needing one extra flag silently forks the child, and
|
|
16
|
+
* two consumers that want the same thing but spell it differently never share.
|
|
17
|
+
* Here every knob is a named field, and defaults are APPLIED before hashing so
|
|
18
|
+
* an omitted field and its explicit default land on the same key.
|
|
19
|
+
*/
|
|
1
20
|
import type { EgressTranscodeRequest } from '../capabilities/stream-broker.cap.js';
|
|
2
21
|
/**
|
|
3
22
|
* The fields that describe WHAT IS ENCODED. Everything outside this shape is
|
|
@@ -76,16 +95,4 @@ interface CanonicalEgressPlan {
|
|
|
76
95
|
* two requests without reversing a hash.
|
|
77
96
|
*/
|
|
78
97
|
export declare function canonicalEgressPlan(request: EgressTranscodeRequest, delivery?: EgressTransportPlan): CanonicalEgressPlan;
|
|
79
|
-
/**
|
|
80
|
-
* The refcount / dedup key. `canonicalHash` sorts object keys at every depth,
|
|
81
|
-
* so a request built with a different field order produces the same digest.
|
|
82
|
-
*
|
|
83
|
-
* The handle this keys is IMMUTABLE: there is no `reconfigure`. A consumer
|
|
84
|
-
* whose requirements change RELEASES and re-acquires; the refcount does the
|
|
85
|
-
* rest. That is what stops co-tenants disturbing each other — the co-tenant
|
|
86
|
-
* hazard that made Alexa's shared `derived:alexa-<id>` stream a hazard was
|
|
87
|
-
* exactly a mutable shared object, where one consumer's downgrade dragged
|
|
88
|
-
* every other consumer to 360p.
|
|
89
|
-
*/
|
|
90
|
-
export declare function egressTranscodeSharingKey(request: EgressTranscodeRequest, delivery?: EgressTransportPlan): string;
|
|
91
98
|
export {};
|