@dominevo/server 0.1.0 → 0.1.1
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/.env.example +4 -4
- package/CHANGELOG.md +7 -0
- package/THIRD_PARTY_MODELS.md +13 -13
- package/dist/addon-root-inventory.js +5 -5
- package/dist/agent/agent-config.js +8 -8
- package/dist/agent/agent-group-runner.js +2 -2
- package/dist/agent/agent-http.js +4 -4
- package/dist/agent/agent-infra-capabilities.js +2 -2
- package/dist/agent/agent-self-update.js +3 -3
- package/dist/agent/agent-service.js +3 -3
- package/dist/agent/agent-update-service.js +10 -10
- package/dist/agent/derive-hub-url.js +3 -3
- package/dist/agent/main.js +20 -20
- package/dist/agent/stale-addon-gate.js +7 -7
- package/dist/api/addon-upload.js +12 -12
- package/dist/api/core/auth.router.js +7 -7
- package/dist/api/core/cap-providers.js +1 -1
- package/dist/api/core/logging-settings.js +1 -1
- package/dist/api/core/request-census-settings.js +1 -1
- package/dist/api/cors/cors-policy.js +5 -5
- package/dist/api/dev-uploads-bundle.js +1 -1
- package/dist/api/logs-export-route.js +1 -1
- package/dist/api/model-distributor.js +1 -1
- package/dist/api/server-upload-propagate.js +1 -1
- package/dist/api/server-upload.js +2 -2
- package/dist/api/static/spa-mount.js +3 -3
- package/dist/api/static/spa-static.js +1 -1
- package/dist/api/tarball-manifest.js +4 -4
- package/dist/api/trpc/http-request-census.js +1 -1
- package/dist/api/trpc/trpc.router.js +7 -7
- package/dist/auth/addon-route-share-gate.js +2 -2
- package/dist/auth/app-confirm-page.js +1 -1
- package/dist/auth/app-confirmations.js +2 -2
- package/dist/auth/app-passkey-page.js +1 -1
- package/dist/auth/native-return.js +1 -1
- package/dist/auth/session-cookie.js +2 -2
- package/dist/auth/sso-routes.js +1 -1
- package/dist/boot/boot-config.js +3 -3
- package/dist/boot/post-boot.service.js +2 -2
- package/dist/boot/retired-public-url-env.js +3 -3
- package/dist/bootstrap-packages.js +3 -3
- package/dist/closure-patches/patch-reach.json +7 -7
- package/dist/closure-patches/werift+0.22.9.patch +34 -34
- package/dist/core/addon/addon-package.service.js +32 -32
- package/dist/core/addon/addon-registry.service.js +34 -34
- package/dist/core/addon/addon-requirements.js +8 -8
- package/dist/core/addon/addon-search.service.js +2 -2
- package/dist/core/addon/hub-addon-support.js +2 -2
- package/dist/core/addon/read-packed-file.js +1 -1
- package/dist/core/addon-bridge/addon-bridge.service.js +6 -6
- package/dist/core/addon-pages/addon-pages.service.js +1 -1
- package/dist/core/agent/agent-registry.service.js +1 -1
- package/dist/core/agent/delivery-requirements.js +1 -1
- package/dist/core/app-links/well-known-app-links.js +7 -9
- package/dist/core/auth/handoff-code.service.js +1 -1
- package/dist/core/moleculer/moleculer.service.js +6 -6
- package/dist/core/release-identity.js +2 -2
- package/dist/core/server-update/server-update.service.js +9 -9
- package/dist/core/updates/node-update-announcement.js +1 -1
- package/dist/core/updates/wrapper-update-checker.js +1 -1
- package/dist/framework-nodepath.js +1 -1
- package/dist/i18n/request-lang.js +1 -1
- package/dist/launch-args.js +4 -4
- package/dist/launcher.js +14 -14
- package/dist/main.js +9 -9
- package/dist/manual-boot.js +5 -5
- package/dist/node-role.js +2 -2
- package/dist/package-inventory.js +1 -1
- package/dist/pending-restore.js +1 -1
- package/dist/server-root/index.js +11 -11
- package/dist/single-copy-cleanup-runner.js +2 -2
- package/dist/single-copy-cleanup.js +2 -2
- package/dist/starter.js +9 -9
- package/package.json +71 -71
- package/system/dist/addon-runner.js +59 -59
- package/system/dist/addon-runner.mjs +59 -59
- package/system/dist/{addon-settings.cap-Cxgig-la.mjs → addon-settings.cap-CyWCCPvU.mjs} +1 -1
- package/system/dist/{addon-settings.cap-B3KYrDyh.js → addon-settings.cap-DT34AC0I.js} +1 -1
- package/system/dist/addon-utils.d.ts +1 -1
- package/system/dist/addon-utils.js +1 -1
- package/system/dist/addon-utils.mjs +1 -1
- package/system/dist/auth/device-ca.d.ts +3 -3
- package/system/dist/auth/origin.d.ts +1 -1
- package/system/dist/{base-addon--EzLZ64f.js → base-addon-CwtR9jMm.js} +8 -28
- package/system/dist/{base-addon-D6i6fCDD.mjs → base-addon-DCfRA4Sq.mjs} +8 -28
- package/system/dist/{base-device-Aptq2PHd.js → base-device-B3OJaaod.js} +3 -3
- package/system/dist/{base-device-CuQ3xFwc.mjs → base-device-QXPOGWz3.mjs} +3 -3
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.d.ts +1 -1
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +5 -5
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +8 -8
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +4 -4
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +8 -8
- package/system/dist/builtins/alerts/alerts.addon.js +7 -7
- package/system/dist/builtins/alerts/alerts.addon.mjs +9 -9
- package/system/dist/builtins/apps-aggregator/apps-aggregator.addon.js +1 -1
- package/system/dist/builtins/apps-aggregator/apps-aggregator.addon.mjs +1 -1
- package/system/dist/builtins/autotrack/index.js +2 -2
- package/system/dist/builtins/autotrack/index.mjs +2 -2
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.d.ts +1 -1
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +5 -5
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +8 -8
- package/system/dist/builtins/backup-orchestrator/manifest-store.d.ts +1 -1
- package/system/dist/builtins/calendars/calendars.addon.js +2 -2
- package/system/dist/builtins/calendars/calendars.addon.mjs +2 -2
- package/system/dist/builtins/camera-grid/index.js +5 -5
- package/system/dist/builtins/camera-grid/index.mjs +5 -5
- package/system/dist/builtins/composer/composer.addon.js +10 -10
- package/system/dist/builtins/composer/composer.addon.mjs +10 -10
- package/system/dist/builtins/console-logging/index.js +1 -1
- package/system/dist/builtins/console-logging/index.mjs +1 -1
- package/system/dist/builtins/core-blocks/core-blocks.addon.js +22 -22
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +20 -20
- package/system/dist/builtins/core-notifier/core-notifier.addon.js +3 -3
- package/system/dist/builtins/core-notifier/core-notifier.addon.mjs +3 -3
- package/system/dist/builtins/device-history/device-history.addon.js +6 -6
- package/system/dist/builtins/device-history/device-history.addon.mjs +6 -6
- package/system/dist/builtins/device-history/store/history-schema.d.ts +1 -1
- package/system/dist/builtins/device-manager/device-manager.addon.js +29 -29
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +16 -16
- package/system/dist/builtins/device-manager/device-row-store.d.ts +1 -1
- package/system/dist/builtins/device-manager/fleet-read-census.d.ts +1 -1
- package/system/dist/builtins/device-manager/runtime-state-persist-gate.d.ts +1 -1
- package/system/dist/builtins/hub-forwarder/index.js +1 -1
- package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/system/dist/builtins/keychain/index.js +15 -15
- package/system/dist/builtins/keychain/index.mjs +15 -15
- package/system/dist/builtins/keychain/key-sources.d.ts +2 -2
- package/system/dist/builtins/keychain/keychain-store.d.ts +1 -1
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +5 -5
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +5 -5
- package/system/dist/builtins/local-auth/auth-schema.d.ts +1 -1
- package/system/dist/builtins/local-auth/local-auth.addon.js +24 -24
- package/system/dist/builtins/local-auth/local-auth.addon.mjs +17 -17
- package/system/dist/builtins/local-network/agent-mdns.d.ts +1 -1
- package/system/dist/builtins/local-network/hub-mdns.d.ts +1 -1
- package/system/dist/builtins/local-network/local-network.addon.d.ts +3 -3
- package/system/dist/builtins/local-network/local-network.addon.js +15 -15
- package/system/dist/builtins/local-network/local-network.addon.mjs +15 -15
- package/system/dist/builtins/loki-logging/index.js +7 -7
- package/system/dist/builtins/loki-logging/index.mjs +7 -7
- package/system/dist/builtins/loki-logging/loki-payload.d.ts +1 -1
- package/system/dist/builtins/native-metrics/cgroup-memory.d.ts +3 -3
- package/system/dist/builtins/native-metrics/native-metrics.addon.d.ts +2 -2
- package/system/dist/builtins/native-metrics/native-metrics.addon.js +14 -14
- package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +23 -23
- package/system/dist/builtins/native-metrics/process-classification.d.ts +8 -8
- package/system/dist/builtins/platform-probe/accelerator-facts-probe.d.ts +1 -1
- package/system/dist/builtins/platform-probe/coral-accelerators.d.ts +2 -2
- package/system/dist/builtins/platform-probe/index.js +3 -3
- package/system/dist/builtins/platform-probe/index.mjs +12 -12
- package/system/dist/builtins/record-entries/index.js +3 -3
- package/system/dist/builtins/record-entries/index.mjs +3 -3
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/snapshot/index.js +4 -4
- package/system/dist/builtins/snapshot/index.mjs +4 -4
- package/system/dist/builtins/sqlite-storage/file-host-handlers.d.ts +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.d.ts +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +3 -3
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +22 -22
- package/system/dist/builtins/sqlite-storage/index.js +1 -1
- package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/migrations/migration-pass.d.ts +1 -1
- package/system/dist/builtins/sqlite-storage/owned-sqlite-file.d.ts +1 -1
- package/system/dist/builtins/sqlite-storage/query-profiler.d.ts +1 -1
- package/system/dist/builtins/sqlite-storage/sqlite-pragmas.d.ts +2 -2
- package/system/dist/builtins/sqlite-storage/sqlite-settings-backend.d.ts +1 -1
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +19 -19
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +19 -19
- package/system/dist/builtins/storage-orchestrator/access-guards.d.ts +1 -1
- package/system/dist/builtins/storage-orchestrator/location-secrets.d.ts +1 -1
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts +3 -3
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +18 -18
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +18 -18
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.service.d.ts +3 -3
- package/system/dist/builtins/system-backup/backup-encryption.d.ts +1 -1
- package/system/dist/builtins/system-backup/system-backup.service.d.ts +1 -1
- package/system/dist/builtins/system-config/system-config.addon.js +31 -31
- package/system/dist/builtins/system-config/system-config.addon.mjs +143 -143
- package/system/dist/builtins/winston-logging/index.js +5 -5
- package/system/dist/builtins/winston-logging/index.mjs +5 -5
- package/system/dist/builtins/winston-logging/log-file-cursor.d.ts +1 -1
- package/system/dist/{cap-call-context-DnLdYSyR.js → cap-call-context-3-L-JQ3d.js} +2 -2
- package/system/dist/{cap-call-context-D-su61hv.mjs → cap-call-context-C_59UKvE.mjs} +2 -2
- package/system/dist/{command-catalog-Cgz3MwLW.mjs → command-catalog-88WjnitG.mjs} +1 -1
- package/system/dist/{command-catalog-0Q83jcdv.js → command-catalog-Bt0rkK6T.js} +1 -1
- package/system/dist/{composition-sources-GNsOlYlG.js → composition-sources-BD_14SLn.js} +2 -2
- package/system/dist/{composition-sources-Dzx55O4S.mjs → composition-sources-BxNM5HHY.mjs} +2 -2
- package/system/dist/{constants-DVHYGlyi.js → constants-B8umFEGY.js} +2 -2
- package/system/dist/{constants-bg2DX4I6.mjs → constants-C86EPRS1.mjs} +2 -2
- package/system/dist/{coral-accelerators-DXDOGcym.mjs → coral-accelerators-CSu5Ahx5.mjs} +6 -6
- package/system/dist/{custom-action-registry-Bd52pRgO.mjs → custom-action-registry-BklzKCJe.mjs} +162 -162
- package/system/dist/{custom-action-registry-DHOCDRef.js → custom-action-registry-C_yB2qlc.js} +125 -125
- package/system/dist/{database-snapshot.cap-BymU4Xk9.js → database-snapshot.cap--dYj7W3i.js} +1 -1
- package/system/dist/{database-snapshot.cap-DAVS29qN.mjs → database-snapshot.cap-DfMxWoak.mjs} +1 -1
- package/system/dist/{declared-device-BSxSa0O8.js → declared-device-BFexdYcl.js} +1 -1
- package/system/dist/{declared-device-C4zPkK6G.mjs → declared-device-D-fwNbiU.mjs} +1 -1
- package/system/dist/{device-ca-BgYUqBEB.js → device-ca-CXDTXX4c.js} +8 -8
- package/system/dist/{device-ca-AvfcD1AT.mjs → device-ca-Du6rfexI.mjs} +8 -8
- package/system/dist/{device-certificate-IVBnrTHH.js → device-certificate-6irX-VEC.js} +4 -4
- package/system/dist/{device-certificate-Kh05tlrX.mjs → device-certificate-B5LojTd8.mjs} +4 -4
- package/system/dist/{device-manager.cap-zbFHbXlg.mjs → device-manager.cap-3gMy5WyI.mjs} +1 -1
- package/system/dist/{device-manager.cap-B-zweScL.js → device-manager.cap-CVm8e--n.js} +1 -1
- package/system/dist/{device-removal-reconcile-DSYwdCX-.mjs → device-removal-reconcile-Bca9Xmxa.mjs} +2 -2
- package/system/dist/{device-removal-reconcile-hF3PFXaD.js → device-removal-reconcile-BtBOAfIX.js} +2 -2
- package/system/dist/{camstack-error-DJ-TUAi1.js → dominevo-error-CTBRQM6p.js} +4 -4
- package/system/dist/{camstack-error-viZYfcj9.mjs → dominevo-error-EgrighSX.mjs} +4 -4
- package/system/dist/download/hosted-model-revisions.d.ts +1 -1
- package/system/dist/{entry-kind-BOBbd1lw.mjs → entry-kind-DJSOxSX2.mjs} +2 -2
- package/system/dist/{entry-kind-BVqSwPqz.js → entry-kind-DzaK6R6L.js} +2 -2
- package/system/dist/file-host-worker.js +3 -3
- package/system/dist/file-host-worker.mjs +3 -3
- package/system/dist/framework-resolver-hook.mjs +1 -1
- package/system/dist/{hub-identity-Ctf-OLhe.mjs → hub-identity-C1lUxisZ.mjs} +19 -19
- package/system/dist/{hub-identity-C5oay5SY.js → hub-identity-DihZeMUF.js} +10 -10
- package/system/dist/{hub-mdns-ciao-BjVwHmsr.js → hub-mdns-ciao-D2Rcz1Kb.js} +42 -42
- package/system/dist/{hub-mdns-ciao-C9adAMGN.mjs → hub-mdns-ciao-D5Udd2A_.mjs} +39 -39
- package/system/dist/index.js +152 -152
- package/system/dist/index.mjs +355 -355
- package/system/dist/{jobs.cap-DHu0iJ1C.js → jobs.cap-Blrf2noc.js} +4 -4
- package/system/dist/{jobs.cap-BPFm9yU4.mjs → jobs.cap-DdrDabtW.mjs} +4 -4
- package/system/dist/kernel/addon-class-resolver.d.ts +2 -2
- package/system/dist/kernel/addon-engine-manager.d.ts +2 -2
- package/system/dist/kernel/addon-installer.d.ts +12 -12
- package/system/dist/kernel/addon-loader.d.ts +6 -6
- package/system/dist/kernel/addon-version-policy.d.ts +1 -1
- package/system/dist/kernel/config-schema.d.ts +2 -2
- package/system/dist/kernel/deps/addon-deps-manager.d.ts +1 -1
- package/system/dist/kernel/deps/closure-dedupe.d.ts +3 -3
- package/system/dist/kernel/deps/ensure-addon-natives.d.ts +1 -1
- package/system/dist/kernel/deps/manifest-native-deps.d.ts +2 -2
- package/system/dist/kernel/deps/manifest-python-deps.d.ts +1 -1
- package/system/dist/kernel/deps/system-package-broker.d.ts +1 -1
- package/system/dist/kernel/deps/system-package-client.d.ts +1 -1
- package/system/dist/kernel/event-plane-report.d.ts +2 -2
- package/system/dist/kernel/fs-utils.d.ts +4 -4
- package/system/dist/kernel/heap-watch.d.ts +8 -8
- package/system/dist/kernel/index.d.ts +1 -1
- package/system/dist/kernel/moleculer/addon-context-factory.d.ts +3 -3
- package/system/dist/kernel/moleculer/addon-service-factory.d.ts +3 -3
- package/system/dist/kernel/moleculer/agent-event-scope.d.ts +2 -2
- package/system/dist/kernel/moleculer/agent-ui-unlock.d.ts +1 -1
- package/system/dist/kernel/moleculer/child-addon-call-dispatch.d.ts +2 -2
- package/system/dist/kernel/moleculer/event-bus-core.d.ts +1 -1
- package/system/dist/kernel/moleculer/event-bus.d.ts +5 -5
- package/system/dist/kernel/moleculer/mesh-mtls/constants.d.ts +1 -1
- package/system/dist/kernel/moleculer/mesh-mtls/mesh-membership.d.ts +1 -1
- package/system/dist/kernel/moleculer/mesh-mtls/pairing/pairing-protocol.d.ts +3 -3
- package/system/dist/kernel/moleculer/runner-heap-flags.d.ts +1 -1
- package/system/dist/kernel/moleculer/runner-native-allocator.d.ts +2 -2
- package/system/dist/kernel/moleculer/stream-probe-service.d.ts +1 -1
- package/system/dist/kernel/moleculer/worker-device-restore.d.ts +2 -2
- package/system/dist/kernel/requires-registry.d.ts +2 -2
- package/system/dist/kernel/transport/create-local-transport.d.ts +1 -1
- package/system/dist/kernel/transport/local-child-registry.d.ts +1 -1
- package/system/dist/kernel/transport/uds-event-bridge.d.ts +1 -1
- package/system/dist/kernel/unsupported-addon-tracker.d.ts +1 -1
- package/system/dist/{keychain-admin.cap-DOvL8TMG.mjs → keychain-admin.cap-C3eanzBT.mjs} +2 -2
- package/system/dist/{keychain-admin.cap-DcRCRWtu.js → keychain-admin.cap-yMG0j8XP.js} +2 -2
- package/system/dist/{legacy-integration-rows-door-CUpCwPm5.js → legacy-integration-rows-door-1c-XBxRt.js} +1 -1
- package/system/dist/{legacy-integration-rows-door-bidgp6kI.mjs → legacy-integration-rows-door-CYFvlkdt.mjs} +1 -1
- package/system/dist/{log-file-read-protocol-hTaAsYlX.mjs → log-file-read-protocol-B3Tq2F50.mjs} +2 -2
- package/system/dist/{log-file-read-protocol-DSV_vQRb.js → log-file-read-protocol-BRHlsNCj.js} +2 -2
- package/system/dist/log-file-read-worker.js +1 -1
- package/system/dist/log-file-read-worker.mjs +1 -1
- package/system/dist/logging/formatter.d.ts +1 -1
- package/system/dist/{metrics-provider.cap-01SwpLu5.mjs → metrics-provider.cap-BKzH22yb.mjs} +2 -2
- package/system/dist/{metrics-provider.cap-BMKD5FH3.js → metrics-provider.cap-H0RjdYQj.js} +2 -2
- package/system/dist/{migration-CHPdAdNh.js → migration-CvC7YRxn.js} +1 -1
- package/system/dist/{migration-BvbfW9g-.mjs → migration-DDDUJnTU.mjs} +1 -1
- package/system/dist/migrations/hub/index.d.ts +1 -1
- package/system/dist/{named-entity-store-EQovvtag.js → named-entity-store-B7MMnZq_.js} +1 -1
- package/system/dist/{named-entity-store-C2JkesQG.mjs → named-entity-store-CLIUOHkl.mjs} +1 -1
- package/system/dist/{network-access.cap-CxqbyUYK.js → network-access.cap-C97_DUK9.js} +10 -10
- package/system/dist/{network-access.cap-B918UjWD.mjs → network-access.cap-DcLn1v6p.mjs} +9 -9
- package/system/dist/{notification-targets-Cj6I9DzV.js → notification-targets-BH-Kq5zA.js} +2 -2
- package/system/dist/{notification-targets-cJTv1p6y.mjs → notification-targets-gTLSExN5.mjs} +2 -2
- package/system/dist/{platform-key-source-Di7HrlGR.js → platform-key-source-DERonx7U.js} +1 -1
- package/system/dist/{platform-key-source-BWlq0jjn.mjs → platform-key-source-vw43KkgD.mjs} +1 -1
- package/system/dist/{record-entries.cap-jKkDRzZG.mjs → record-entries.cap-DqaspI30.mjs} +2 -2
- package/system/dist/{record-entries.cap-RXnOab_5.js → record-entries.cap-u4EjNUWg.js} +2 -2
- package/system/dist/{record-kind-Cm1DO1qJ.js → record-kind-BYbL_LNZ.js} +1 -1
- package/system/dist/{record-kind-DXFsj6uF.mjs → record-kind-DpcGjBK1.mjs} +1 -1
- package/system/dist/{record-kinds-CLYE4x8E.js → record-kinds-CF3IIGeU.js} +6 -6
- package/system/dist/{record-kinds-Xm95PUr5.mjs → record-kinds-HynLKMsB.mjs} +6 -6
- package/system/dist/{recording-archive.cap-BFiEztoo.js → recording-archive.cap-DPyT1msn.js} +5 -5
- package/system/dist/{recording-archive.cap-DljrTthl.mjs → recording-archive.cap-DoeNelun.mjs} +4 -4
- package/system/dist/{records.cap-BDUsx56H.mjs → records.cap-A6ZnC18-.mjs} +2 -2
- package/system/dist/{records.cap-DKDON4zv.js → records.cap-CrdoSJ1h.js} +2 -2
- package/system/dist/{rename-composition-block-BdhK2udh.mjs → rename-composition-block-CMfftDfW.mjs} +43 -43
- package/system/dist/{rename-composition-block-CJ-XbDsk.js → rename-composition-block-CeKeUquQ.js} +43 -43
- package/system/dist/{restore-archive-BQhYL8c4.mjs → restore-archive-DngNk5Yg.mjs} +104 -104
- package/system/dist/{restore-archive-DWIM3J3f.js → restore-archive-LKIQ4CNL.js} +11 -11
- package/system/dist/{retention-source.cap-BvNRqbz3.js → retention-source.cap-CuI320Je.js} +1 -1
- package/system/dist/{retention-source.cap-DUPeqB5h.mjs → retention-source.cap-DLKW-DAE.mjs} +1 -1
- package/system/dist/{retired-settings-keys-BFLkouoC.mjs → retired-settings-keys-Dakm_ir-.mjs} +1 -1
- package/system/dist/{retired-settings-keys-DNi9qA3K.js → retired-settings-keys-DdoaQDUr.js} +1 -1
- package/system/dist/{scoped-settings-DbyAaIot.js → scoped-settings-8uzhJVsE.js} +3 -3
- package/system/dist/{scoped-settings-d2_FTMty.mjs → scoped-settings-DnkTDuvk.mjs} +3 -3
- package/system/dist/{settings-store.cap-BhOIBtO4.js → settings-store.cap-DqFgT2Xo.js} +1 -1
- package/system/dist/{settings-store.cap-CaDSOqgK.mjs → settings-store.cap-DxsDTQxb.mjs} +1 -1
- package/system/dist/{state-refresh-scheduler-GlExK5Pt.js → state-refresh-scheduler-8_rBg2-4.js} +1 -1
- package/system/dist/{state-refresh-scheduler-CJuGzqZh.mjs → state-refresh-scheduler-B3pfIHRS.mjs} +1 -1
- package/system/dist/{storage-admin.cap-DPH4dWEl.js → storage-admin.cap-BndyGERv.js} +5 -5
- package/system/dist/{storage-admin.cap-CP_CtM0h.mjs → storage-admin.cap-DOZ5tsKA.mjs} +5 -5
- package/system/dist/{storage-migration.cap-DT_sdxio.js → storage-migration.cap-C52LxDX2.js} +4 -4
- package/system/dist/{storage-migration.cap-BonKGHaA.mjs → storage-migration.cap-DRl4rt-0.mjs} +4 -4
- package/system/dist/{storage-occupancy.cap-avoVkjfF.js → storage-occupancy.cap-CiGDOgpG.js} +3 -3
- package/system/dist/{storage-occupancy.cap-B_YU_aX3.mjs → storage-occupancy.cap-_VVBswn4.mjs} +3 -3
- package/system/dist/{stream-catalog.cap-Blw9nJ-a.js → stream-catalog.cap-Bl0BSYye.js} +4 -4
- package/system/dist/{stream-catalog.cap-D08FM3ow.mjs → stream-catalog.cap-C7vlYIih.mjs} +4 -4
- package/system/dist/tls/cert-evaluation.d.ts +3 -3
- package/system/dist/tls/cert-issue.d.ts +2 -2
- package/system/dist/tls/cert-manager.d.ts +7 -7
- package/system/dist/tls/tls-actions.d.ts +1 -1
- package/system/dist/tls/tls-status.d.ts +1 -1
- package/system/dist/{user-management.cap-BIOAtxeX.js → user-management.cap-D9EcsR2c.js} +2 -2
- package/system/dist/{user-management.cap-D8lVSHRA.mjs → user-management.cap-mDnBlJay.mjs} +2 -2
- package/system/dist/{wal-maintenance-8cxZxWU2.js → wal-maintenance-BPDo9Jao.js} +9 -9
- package/system/dist/{wal-maintenance-BGa2lDZp.mjs → wal-maintenance-SArcuHLu.mjs} +9 -9
- package/system/package.json +3 -3
package/system/dist/index.mjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { i as __require } from "./chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { b as EventCategory$1, i as collectSecretMarkerRefs, p as createEvent$1 } from "./base-addon-
|
|
3
|
-
import { Z as errMsg$1 } from "./scoped-settings-
|
|
4
|
-
import { Jn as lifecycleJobSchema, _r as describeUnmet, a as isCollectionArrayMethod, c as kebabToCamel$1, d as objectInputDeclaresRequiredDeviceId, f as procedureAuthKey, gr as compareVersions, hr as PackageRequiresSchema, i as isArrayOutputSchema, l as looseSchema, m as ALL_CAPABILITY_DEFINITIONS, o as isObjectInput, p as resolveMethodAuth, r as extractNestedAddonId, s as isVoidInput, u as objectInputDeclaresAddonId, vr as unmetRequirements } from "./rename-composition-block-
|
|
5
|
-
import { t as userError } from "./
|
|
2
|
+
import { b as EventCategory$1, i as collectSecretMarkerRefs, p as createEvent$1 } from "./base-addon-DCfRA4Sq.mjs";
|
|
3
|
+
import { Z as errMsg$1 } from "./scoped-settings-DnkTDuvk.mjs";
|
|
4
|
+
import { Jn as lifecycleJobSchema, _r as describeUnmet, a as isCollectionArrayMethod, c as kebabToCamel$1, d as objectInputDeclaresRequiredDeviceId, f as procedureAuthKey, gr as compareVersions, hr as PackageRequiresSchema, i as isArrayOutputSchema, l as looseSchema, m as ALL_CAPABILITY_DEFINITIONS, o as isObjectInput, p as resolveMethodAuth, r as extractNestedAddonId, s as isVoidInput, u as objectInputDeclaresAddonId, vr as unmetRequirements } from "./rename-composition-block-CMfftDfW.mjs";
|
|
5
|
+
import { t as userError } from "./dominevo-error-EgrighSX.mjs";
|
|
6
6
|
import { a as expandCapMethods, n as DEVICE_STATUS_METHOD, t as DEVICE_SETTINGS_CONTRIBUTION_METHODS, u as resolveCapMount } from "./capability-definition-C1TLUVJR.mjs";
|
|
7
|
-
import { s as defineRecordKinds } from "./record-kind-
|
|
8
|
-
import { D as RecordsEngine, J as asNumber, X as parseJsonObject, Y as asString$1, Z as parseJsonUnknown, l as SqliteSettingsBackend, q as asJsonObject$1 } from "./wal-maintenance-
|
|
9
|
-
import { f as AppPageLangSchema } from "./device-certificate-
|
|
10
|
-
import { i as addonSettingsCapability } from "./addon-settings.cap-
|
|
11
|
-
import { s as loadPrefixed } from "./named-entity-store-
|
|
12
|
-
import { a as AGENT_MDNS_TXT_KEYS, i as AGENT_MDNS_SERVICE_TYPE } from "./network-access.cap-
|
|
7
|
+
import { s as defineRecordKinds } from "./record-kind-DpcGjBK1.mjs";
|
|
8
|
+
import { D as RecordsEngine, J as asNumber, X as parseJsonObject, Y as asString$1, Z as parseJsonUnknown, l as SqliteSettingsBackend, q as asJsonObject$1 } from "./wal-maintenance-SArcuHLu.mjs";
|
|
9
|
+
import { f as AppPageLangSchema } from "./device-certificate-B5LojTd8.mjs";
|
|
10
|
+
import { i as addonSettingsCapability } from "./addon-settings.cap-CyWCCPvU.mjs";
|
|
11
|
+
import { s as loadPrefixed } from "./named-entity-store-CLIUOHkl.mjs";
|
|
12
|
+
import { a as AGENT_MDNS_TXT_KEYS, i as AGENT_MDNS_SERVICE_TYPE } from "./network-access.cap-DcLn1v6p.mjs";
|
|
13
13
|
import { t as RUNTIME_DEFAULTS } from "./constants-DCLpoF4L.mjs";
|
|
14
14
|
import { t as bareAddonId } from "./addon-id-CVg1_r5E.mjs";
|
|
15
|
-
import { r as nodeCoralFs, s as supportedRuntimes, t as classifyCoralAccelerator } from "./coral-accelerators-
|
|
16
|
-
import { d as JWT_SIGNING_KEY_REF, f as JwtSigningKeyUnavailableError, g as processJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, p as SYSTEM_SECRET_OWNER, s as loadDeviceCa, u as verifyDeviceSignature, v as staticJwtSigningKey } from "./device-ca-
|
|
15
|
+
import { r as nodeCoralFs, s as supportedRuntimes, t as classifyCoralAccelerator } from "./coral-accelerators-CSu5Ahx5.mjs";
|
|
16
|
+
import { d as JWT_SIGNING_KEY_REF, f as JwtSigningKeyUnavailableError, g as processJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, p as SYSTEM_SECRET_OWNER, s as loadDeviceCa, u as verifyDeviceSignature, v as staticJwtSigningKey } from "./device-ca-Du6rfexI.mjs";
|
|
17
17
|
import { t as require_read_all_rows } from "./read-all-rows-TaPqdWNF.mjs";
|
|
18
18
|
import { a as redactLogText, i as redactLogMeta, r as redactLogEntry, t as isCredentialKeyName } from "./log-redactor-B6FjCuXc.mjs";
|
|
19
19
|
import { AlertCenterAddon, n as lastCauseAfterChunk, r as readRunnerDisplayName, t as CRASH_BREAKER_ERROR_PREFIX } from "./builtins/alerts/alerts.addon.mjs";
|
|
@@ -41,27 +41,27 @@ import { LokiDestination, LokiLoggingAddon } from "./builtins/loki-logging/index
|
|
|
41
41
|
import NativeMetricsAddon, { a as NativeMetricsProvider, i as parseProcStatusRss, n as nodeProcReader, r as parseProcStat } from "./builtins/native-metrics/native-metrics.addon.mjs";
|
|
42
42
|
import { DeviceHistoryAddon } from "./builtins/device-history/device-history.addon.mjs";
|
|
43
43
|
import { FilesystemStorageAddon, t as FilesystemStorageProvider } from "./builtins/sqlite-storage/filesystem-storage.addon.mjs";
|
|
44
|
-
import { n as clearLegacyIntegrationRows, o as readLegacyIntegrationRows } from "./legacy-integration-rows-door-
|
|
44
|
+
import { n as clearLegacyIntegrationRows, o as readLegacyIntegrationRows } from "./legacy-integration-rows-door-CYFvlkdt.mjs";
|
|
45
45
|
import { SqliteSettingsAddon } from "./builtins/sqlite-storage/sqlite-settings.addon.mjs";
|
|
46
46
|
import { ConfigStore, DeviceStore } from "./builtins/sqlite-storage/index.mjs";
|
|
47
47
|
import { StorageOrchestratorAddon, a as createHubCapForwardService, i as HUB_CAP_FWD_SERVICE, o as stripForwardedCaller, r as HUB_CAP_FWD_ACTION, s as buildStorageLocationRegistry, t as StorageOrchestratorService, u as storageOrchestratorRecordKinds } from "./builtins/storage-orchestrator/storage-orchestrator.addon.mjs";
|
|
48
48
|
import "./builtins/storage-orchestrator/index.mjs";
|
|
49
|
-
import { A as evaluateExistingCert, B as AGENT_HTTPS_NAMES_COLLECTION, C as localCaCommonName, D as LEAF_RENEWAL_WINDOW_DAYS, E as CA_VALIDITY_DAYS, F as isConstrainedCa, H as AgentHttpsNames, I as isLocalOnlyHostname, L as permitsIdentity, M as PERMITTED_DNS_SUFFIXES, N as PERMITTED_IP_RANGES, O as MAX_LEAF_VALIDITY_DAYS, P as buildNameConstraintSet, R as permitsName, T as systemHostFacts, U as getProcessAgentHttpsNames, V as AGENT_HTTPS_NAMES_COLUMNS, W as setProcessAgentHttpsNames, _ as pemDigest, a as AgentHttpsInstallError, c as certificateNames, d as describeHttpsLeaf, f as installAgentHttps, g as loadAgentHttps, h as issueAgentHttpsLeaf, i as loadOrCreateHubId, k as SERVER_AUTH_OID, l as collectAgentNames, m as isPrivateAddress, n as HUB_IDENTITY_RELATIVE, o as acceptAgentSans, p as isContainerBridgeAddress, r as isAnnouncedHubId, s as agentHttpsPaths, t as HUB_IDENTITY_FILE, u as createAgentHttpsRequest, v as pinnedHttpsCaFingerprint, w as collectCertIdentity, y as CA_COMMON_NAME, z as readNameConstraints } from "./hub-identity-
|
|
50
|
-
import { a as MESH_CA_KEY_REF, i as MESH_CA_FIELD, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY } from "./constants-
|
|
49
|
+
import { A as evaluateExistingCert, B as AGENT_HTTPS_NAMES_COLLECTION, C as localCaCommonName, D as LEAF_RENEWAL_WINDOW_DAYS, E as CA_VALIDITY_DAYS, F as isConstrainedCa, H as AgentHttpsNames, I as isLocalOnlyHostname, L as permitsIdentity, M as PERMITTED_DNS_SUFFIXES, N as PERMITTED_IP_RANGES, O as MAX_LEAF_VALIDITY_DAYS, P as buildNameConstraintSet, R as permitsName, T as systemHostFacts, U as getProcessAgentHttpsNames, V as AGENT_HTTPS_NAMES_COLUMNS, W as setProcessAgentHttpsNames, _ as pemDigest, a as AgentHttpsInstallError, c as certificateNames, d as describeHttpsLeaf, f as installAgentHttps, g as loadAgentHttps, h as issueAgentHttpsLeaf, i as loadOrCreateHubId, k as SERVER_AUTH_OID, l as collectAgentNames, m as isPrivateAddress, n as HUB_IDENTITY_RELATIVE, o as acceptAgentSans, p as isContainerBridgeAddress, r as isAnnouncedHubId, s as agentHttpsPaths, t as HUB_IDENTITY_FILE, u as createAgentHttpsRequest, v as pinnedHttpsCaFingerprint, w as collectCertIdentity, y as CA_COMMON_NAME, z as readNameConstraints } from "./hub-identity-C1lUxisZ.mjs";
|
|
50
|
+
import { a as MESH_CA_KEY_REF, i as MESH_CA_FIELD, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY } from "./constants-C86EPRS1.mjs";
|
|
51
51
|
import { $ as getProcessMeshCaState, A as emitProcessNodeRegistered, At as readCidrSetting, B as getProcessMeshTlsListenerState, C as verifyMembershipAnswer, Ct as isInsecureOrigin, D as ServiceBroker, Dt as createCidrMatcher, E as Errors, Et as readOriginSetting, F as onProcessNodeRegistered, G as MeshCertificateRegistry, H as setProcessMeshTlsListenerState, I as setProcessMeshHandshakeReporter, J as getProcessMeshCertificateRegistry, K as RENEWAL_ABANDONED, L as setProcessMeshPeerTransportLookup, M as getProcessNodeMeshTransport, N as getProcessPeerLeaf, O as setProcessMeshTlsEnabler, Ot as normalizeIp, P as isProcessVerifiedMeshPeer, Q as MeshCaKeeper, R as renewMeshCertificate, S as signMembershipProof, St as OPAQUE_ORIGIN, SystemConfigAddon, T as TlsTcpTransporter, Tt as parseOriginList, U as MESH_NODE_CERTIFICATES_COLLECTION, V as openMeshTlsWhenRevocationsLoaded, W as MESH_NODE_CERTIFICATES_COLUMNS, X as MeshCrl, Y as setProcessMeshCertificateRegistry, Z as processMeshCrl, _ as keyFingerprintShort, _t as isAllowedAgentDashboardReturnTo, a as dialableHubHost, at as generateMeshCa, b as MEMBERSHIP_PATHS, bt as verifyAgentUiUnlockTicket, c as PAIRING_MAX_CODE_ATTEMPTS, ct as issueMeshLeafForNode, d as PAIRING_PIN_DIGITS, dt as AGENT_DASHBOARD_ORIGINS_FIELD, et as requireProcessMeshCa, f as PAIRING_PROTOCOL, ft as AGENT_UI_UNLOCK_TTL_MS, g as describeCsr, gt as UnlockTicketJtiStore, h as computePairingSas, ht as AGENT_UI_UNLOCK_VERSION, i as AgentPairing, it as exportMeshPrivateKeyPem, j as getProcessMeshHandshakeReporter, k as dropProcessPeer, kt as parseCidrList, l as PAIRING_MAX_SESSIONS, lt as issueMeshLeafFromCsr, m as computePairingCommitment, mt as AGENT_UI_UNLOCK_USE, n as HubPairing, nt as caFingerprintCompact, o as hubHostFromMeshAddress, ot as generateMeshKeyPair, p as PAIRING_TTL_MS, pt as AGENT_UI_UNLOCK_TYP, q as describeMeshLeaf, r as PairingHttpError, rt as createMeshCsrPem, s as PAIRING_CODE_DIGITS, st as isValidAgentNodeId, tt as caFingerprint, u as PAIRING_PATHS, ut as loadMeshCa, v as signPairingProof, vt as mintAgentUiUnlockTicket, w as MESH_TLS_PORT_HELLO_FIELD, wt as normalizeOrigin, x as MembershipResponder, xt as InvalidCorsOriginError, y as verifyPairingProof, yt as parseAgentDashboardOrigins, z as revokeMeshCertificate } from "./builtins/system-config/system-config.addon.mjs";
|
|
52
52
|
import "./builtins/system-config/index.mjs";
|
|
53
53
|
import { WinstonDestination, WinstonLoggingAddon } from "./builtins/winston-logging/index.mjs";
|
|
54
|
-
import { C as isModelDownloaded, E as setHuggingFaceReachabilityObserver, T as revisionWeightUrl, _ as downloadFile, a as startEventLoopStallMonitor, b as fetchJson, c as createAuthenticatedFileServer, d as resolveFilePath, f as ModelDownloadService, g as deleteModelFromDisk, h as collectModelFiles, i as attributeStall, l as parseRangeHeader, m as adoptModelRevisions, n as STALL_REPORT_MS, o as createFileDataPlaneHandler, r as STALL_TICK_MS, s as contentTypeFor, t as CustomActionRegistry, u as parseTokenizedUrl, v as downloadModel, w as resolveFormatRevision, x as getModelFilePath, y as ensureModel } from "./custom-action-registry-
|
|
55
|
-
import { A as retirePreviousLocalCa, C as checkUploadedCa, D as loadTlsCert, E as ensureTlsCert, F as closeLanHttp, I as readLanHttpState, L as registerLanHttpHandler, M as allFamiliesListenHost, N as applyLanHttp, O as reissueTlsLeaf, P as bindPendingLanHttp, S as chainsToPublicRoot, T as caReplacementMarkerFile, _ as readTlsMode, a as storeUploadedCertificate, b as writeTlsEnabled, c as leafFingerprintOf, d as servedHttpsLeafFingerprint, f as prepareBootTls, g as readTlsEnabled, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as DEFAULT_LAN_HTTP_PORT, k as replaceUnconstrainedLocalCa, l as registerHttpsListener, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, p as UPLOADED_CA_FILE, r as regenerateCertificate, s as clearHttpsListener, t as createCiaoPublisher, u as reloadHttpsListener, v as splitPemCertificates, w as validateUploadedTls, x as writeTlsMode, y as writeExtraSans } from "./hub-mdns-ciao-
|
|
56
|
-
import { n as getPlatformKeychainKey, r as setPlatformKeychainKey, t as clearPlatformKeychainKey } from "./platform-key-source-
|
|
54
|
+
import { C as isModelDownloaded, E as setHuggingFaceReachabilityObserver, T as revisionWeightUrl, _ as downloadFile, a as startEventLoopStallMonitor, b as fetchJson, c as createAuthenticatedFileServer, d as resolveFilePath, f as ModelDownloadService, g as deleteModelFromDisk, h as collectModelFiles, i as attributeStall, l as parseRangeHeader, m as adoptModelRevisions, n as STALL_REPORT_MS, o as createFileDataPlaneHandler, r as STALL_TICK_MS, s as contentTypeFor, t as CustomActionRegistry, u as parseTokenizedUrl, v as downloadModel, w as resolveFormatRevision, x as getModelFilePath, y as ensureModel } from "./custom-action-registry-BklzKCJe.mjs";
|
|
55
|
+
import { A as retirePreviousLocalCa, C as checkUploadedCa, D as loadTlsCert, E as ensureTlsCert, F as closeLanHttp, I as readLanHttpState, L as registerLanHttpHandler, M as allFamiliesListenHost, N as applyLanHttp, O as reissueTlsLeaf, P as bindPendingLanHttp, S as chainsToPublicRoot, T as caReplacementMarkerFile, _ as readTlsMode, a as storeUploadedCertificate, b as writeTlsEnabled, c as leafFingerprintOf, d as servedHttpsLeafFingerprint, f as prepareBootTls, g as readTlsEnabled, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as DEFAULT_LAN_HTTP_PORT, k as replaceUnconstrainedLocalCa, l as registerHttpsListener, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, p as UPLOADED_CA_FILE, r as regenerateCertificate, s as clearHttpsListener, t as createCiaoPublisher, u as reloadHttpsListener, v as splitPemCertificates, w as validateUploadedTls, x as writeTlsMode, y as writeExtraSans } from "./hub-mdns-ciao-D5Udd2A_.mjs";
|
|
56
|
+
import { n as getPlatformKeychainKey, r as setPlatformKeychainKey, t as clearPlatformKeychainKey } from "./platform-key-source-vw43KkgD.mjs";
|
|
57
57
|
import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-Di9daRwI.mjs";
|
|
58
|
-
import { _ as backupRecordStoresOf, c as BackupDecryptError, f as generateBackupKeyPair, g as backupOrchestratorRecordKinds, h as readBackupEncryptionHeader, l as BackupKeyFormatError, r as prepareRestoreArchive, s as SystemBackupService, t as BackupKeyRequiredError, u as BackupKeyMismatchError } from "./restore-archive-
|
|
58
|
+
import { _ as backupRecordStoresOf, c as BackupDecryptError, f as generateBackupKeyPair, g as backupOrchestratorRecordKinds, h as readBackupEncryptionHeader, l as BackupKeyFormatError, r as prepareRestoreArchive, s as SystemBackupService, t as BackupKeyRequiredError, u as BackupKeyMismatchError } from "./restore-archive-DngNk5Yg.mjs";
|
|
59
59
|
import { z } from "zod";
|
|
60
|
+
import { PYTHON_VERSION, buildBinaryPath, declaresEdgetpuDelegate, downloadBinary, ensureBinary, ensureBinary as ensureBinary$1, ensureEdgetpuDelegate, ensureFfmpeg, ensureFfmpeg as ensureFfmpeg$1, ensurePython, ensurePython as ensurePython$1, findInPath, getFfmpegDownloadUrl, getPlatformInfo, getPythonDownloadUrl, implementedMethodsOf, installPythonPackages, installPythonPackages as installPythonPackages$1, installPythonRequirements, installPythonRequirements as installPythonRequirements$1 } from "@dominevo/types/node";
|
|
60
61
|
import * as crypto$1 from "node:crypto";
|
|
61
62
|
import { createHash, randomBytes, randomUUID } from "node:crypto";
|
|
62
|
-
import { PYTHON_VERSION, buildBinaryPath, declaresEdgetpuDelegate, downloadBinary, ensureBinary, ensureBinary as ensureBinary$1, ensureEdgetpuDelegate, ensureFfmpeg, ensureFfmpeg as ensureFfmpeg$1, ensurePython, ensurePython as ensurePython$1, findInPath, getFfmpegDownloadUrl, getPlatformInfo, getPythonDownloadUrl, implementedMethodsOf, installPythonPackages, installPythonPackages as installPythonPackages$1, installPythonRequirements, installPythonRequirements as installPythonRequirements$1 } from "@dominevo/types/node";
|
|
63
63
|
import { connect, createConnection, createServer } from "node:net";
|
|
64
|
-
import * as fs
|
|
64
|
+
import * as fs from "node:fs";
|
|
65
65
|
import { accessSync, constants, createReadStream, createWriteStream, existsSync, readFileSync, readdirSync } from "node:fs";
|
|
66
66
|
import * as path$1 from "node:path";
|
|
67
67
|
import { basename, dirname, isAbsolute, join, resolve } from "node:path";
|
|
@@ -3163,7 +3163,7 @@ function createLoopDelayMeter(resolutionMs = 20) {
|
|
|
3163
3163
|
* hub-main is the only process in the cluster whose ceiling nobody chose. Every
|
|
3164
3164
|
* forked runner is given V8 heap flags by `process-service.ts`; hub-main gets
|
|
3165
3165
|
* `--max-old-space-size` from `docker-entrypoint.sh` ONLY when the operator sets
|
|
3166
|
-
* `
|
|
3166
|
+
* `DOMINEVO_HUB_HEAP_MB`, and on the live container it is unset — verified
|
|
3167
3167
|
* 2026-08-25 by reading pid 7's argv, a bare `node .../starter.js`. So the
|
|
3168
3168
|
* ceiling in force is whatever V8 derives from the host (4288MB there), and the
|
|
3169
3169
|
* only record of that was a comment inside an image nobody rebuilds to read.
|
|
@@ -3175,7 +3175,7 @@ function heapCeilingOrigin(execArgv = process.execArgv) {
|
|
|
3175
3175
|
return execArgv.some((arg) => /^--max[-_]old[-_]space[-_]size(=|$)/.test(arg)) ? "explicit" : "v8-default";
|
|
3176
3176
|
}
|
|
3177
3177
|
/** Env var the launch-args module hands the node: who chose its heap ceiling. */
|
|
3178
|
-
var HEAP_CEILING_SOURCE_ENV = "
|
|
3178
|
+
var HEAP_CEILING_SOURCE_ENV = "DOMINEVO_HEAP_CEILING_SOURCE";
|
|
3179
3179
|
var LAUNCHER_SOURCES = new Set([
|
|
3180
3180
|
"override",
|
|
3181
3181
|
"legacy-env",
|
|
@@ -3630,16 +3630,16 @@ function parseRssBudgetMb(raw) {
|
|
|
3630
3630
|
return Math.floor(parsed);
|
|
3631
3631
|
}
|
|
3632
3632
|
/** Env var carrying a runner's declared RSS budget from parent to child. */
|
|
3633
|
-
var RUNNER_RSS_BUDGET_ENV = "
|
|
3633
|
+
var RUNNER_RSS_BUDGET_ENV = "DOMINEVO_RUNNER_RSS_BUDGET_MB";
|
|
3634
3634
|
/** Operator override for hub-main's budget, applied without a release. */
|
|
3635
|
-
var HUB_RSS_BUDGET_ENV = "
|
|
3635
|
+
var HUB_RSS_BUDGET_ENV = "DOMINEVO_HUB_RSS_BUDGET_MB";
|
|
3636
3636
|
/**
|
|
3637
3637
|
* hub-main's declared RSS budget, in MB.
|
|
3638
3638
|
*
|
|
3639
3639
|
* ## Why the number lives HERE and not in the image
|
|
3640
3640
|
*
|
|
3641
3641
|
* hub-main has no manifest to declare it in, and the obvious alternative — the
|
|
3642
|
-
* entrypoint that already knew about `
|
|
3642
|
+
* entrypoint that already knew about `DOMINEVO_HUB_HEAP_MB` — is the least
|
|
3643
3643
|
* deployable surface in this system. The Dockerfile says so itself: the image
|
|
3644
3644
|
* never contains this repo's backend, so a value written there reaches a running
|
|
3645
3645
|
* hub only on an image rebuild. `main.ts` is what `applyServerUpdate` replaces,
|
|
@@ -3980,13 +3980,13 @@ function createAddonPeerBytesFacility(args) {
|
|
|
3980
3980
|
const offer = offers.get(token);
|
|
3981
3981
|
if (offer === void 0) {
|
|
3982
3982
|
const status = taken.has(token) ? 410 : 404;
|
|
3983
|
-
res.writeHead(status, { "x-
|
|
3983
|
+
res.writeHead(status, { "x-dominevo-peer-bytes": status === 410 ? "offer-used" : "no-offer" });
|
|
3984
3984
|
res.end();
|
|
3985
3985
|
return;
|
|
3986
3986
|
}
|
|
3987
3987
|
if (offer.expiresAtMs <= now()) {
|
|
3988
3988
|
offers.delete(token);
|
|
3989
|
-
res.writeHead(410, { "x-
|
|
3989
|
+
res.writeHead(410, { "x-dominevo-peer-bytes": "offer-expired" }).end();
|
|
3990
3990
|
return;
|
|
3991
3991
|
}
|
|
3992
3992
|
if (req.method === "GET") {
|
|
@@ -4194,7 +4194,7 @@ function createAddonPeerBytesFacility(args) {
|
|
|
4194
4194
|
error: detail
|
|
4195
4195
|
}
|
|
4196
4196
|
});
|
|
4197
|
-
if (!res.headersSent) res.writeHead(503, { "x-
|
|
4197
|
+
if (!res.headersSent) res.writeHead(503, { "x-dominevo-peer-bytes": "file-unreadable" });
|
|
4198
4198
|
res.end();
|
|
4199
4199
|
return;
|
|
4200
4200
|
}
|
|
@@ -4319,7 +4319,7 @@ function createAddonPeerBytesFacility(args) {
|
|
|
4319
4319
|
response.pause();
|
|
4320
4320
|
const status = response.statusCode ?? 0;
|
|
4321
4321
|
if (status < 200 || status >= 300) {
|
|
4322
|
-
const reason = response.headers["x-
|
|
4322
|
+
const reason = response.headers["x-dominevo-peer-bytes"];
|
|
4323
4323
|
response.resume();
|
|
4324
4324
|
req.destroy();
|
|
4325
4325
|
return {
|
|
@@ -5700,7 +5700,7 @@ var PythonEnvManager = class {
|
|
|
5700
5700
|
async ensure(options) {
|
|
5701
5701
|
const probe = await this.probe();
|
|
5702
5702
|
if (!probe.available || !probe.path) throw userError("system.python-required", void 0, "Python 3.10+ is required but not found on this system");
|
|
5703
|
-
if (!fs
|
|
5703
|
+
if (!fs.existsSync(path$1.join(this.venvPath, "bin", "python"))) await execFileAsync$7(probe.path, [
|
|
5704
5704
|
"-m",
|
|
5705
5705
|
"venv",
|
|
5706
5706
|
this.venvPath
|
|
@@ -5723,7 +5723,7 @@ var PythonEnvManager = class {
|
|
|
5723
5723
|
}
|
|
5724
5724
|
spawn(script, args) {
|
|
5725
5725
|
const venvPython = path$1.join(this.venvPath, "bin", "python");
|
|
5726
|
-
if (!fs
|
|
5726
|
+
if (!fs.existsSync(venvPython)) throw new Error("Python venv not initialized. Call ensure() first.");
|
|
5727
5727
|
return spawn(venvPython, [script, ...args]);
|
|
5728
5728
|
}
|
|
5729
5729
|
};
|
|
@@ -5896,7 +5896,7 @@ var StorageLocationManager = class {
|
|
|
5896
5896
|
media: join(this.dataPath, "media"),
|
|
5897
5897
|
recordings: join(this.dataPath, "recordings"),
|
|
5898
5898
|
models: join(this.dataPath, "models"),
|
|
5899
|
-
cache: "/tmp/
|
|
5899
|
+
cache: "/tmp/dominevo-cache",
|
|
5900
5900
|
logs: join(this.dataPath, "logs")
|
|
5901
5901
|
};
|
|
5902
5902
|
for (const [name, path] of Object.entries(defaults)) {
|
|
@@ -6075,20 +6075,20 @@ var StorageManager = class {
|
|
|
6075
6075
|
const basePath = this.locationManager.getBackend(mappedName).basePath;
|
|
6076
6076
|
location.files = {
|
|
6077
6077
|
async readFile(p) {
|
|
6078
|
-
return fs
|
|
6078
|
+
return fs.promises.readFile(path$1.join(basePath, p));
|
|
6079
6079
|
},
|
|
6080
6080
|
async writeFile(p, data) {
|
|
6081
6081
|
const full = path$1.join(basePath, p);
|
|
6082
|
-
await fs
|
|
6083
|
-
await fs
|
|
6082
|
+
await fs.promises.mkdir(path$1.dirname(full), { recursive: true });
|
|
6083
|
+
await fs.promises.writeFile(full, data);
|
|
6084
6084
|
},
|
|
6085
6085
|
async deleteFile(p) {
|
|
6086
|
-
await fs
|
|
6086
|
+
await fs.promises.rm(path$1.join(basePath, p), { force: true });
|
|
6087
6087
|
},
|
|
6088
6088
|
async listFiles(prefix) {
|
|
6089
6089
|
const dir = prefix ? path$1.join(basePath, prefix) : basePath;
|
|
6090
6090
|
try {
|
|
6091
|
-
return (await fs
|
|
6091
|
+
return (await fs.promises.readdir(dir)).map((f) => prefix ? `${prefix}/${f}` : f);
|
|
6092
6092
|
} catch {
|
|
6093
6093
|
return [];
|
|
6094
6094
|
}
|
|
@@ -6098,7 +6098,7 @@ var StorageManager = class {
|
|
|
6098
6098
|
},
|
|
6099
6099
|
async exists(p) {
|
|
6100
6100
|
try {
|
|
6101
|
-
await fs
|
|
6101
|
+
await fs.promises.access(path$1.join(basePath, p));
|
|
6102
6102
|
return true;
|
|
6103
6103
|
} catch {
|
|
6104
6104
|
return false;
|
|
@@ -6181,7 +6181,7 @@ function buildAgentAnnouncement(inputs) {
|
|
|
6181
6181
|
if (inputs.name !== void 0 && inputs.name !== null && inputs.name.length > 0) txt[AGENT_MDNS_TXT_KEYS.name] = inputs.name;
|
|
6182
6182
|
if (inputs.leafFingerprint !== null) txt[AGENT_MDNS_TXT_KEYS.keyFingerprint] = inputs.leafFingerprint;
|
|
6183
6183
|
return {
|
|
6184
|
-
name: `
|
|
6184
|
+
name: `dominevo-agent-${inputs.nodeId}`,
|
|
6185
6185
|
type: AGENT_MDNS_SERVICE_TYPE,
|
|
6186
6186
|
port: inputs.port,
|
|
6187
6187
|
address: null,
|
|
@@ -6234,7 +6234,7 @@ var AgentMdnsAdvertiser = class {
|
|
|
6234
6234
|
key,
|
|
6235
6235
|
handle
|
|
6236
6236
|
};
|
|
6237
|
-
this.options.logger.info("agent mDNS: advertising
|
|
6237
|
+
this.options.logger.info("agent mDNS: advertising _dominevo-agent._tcp", { meta: {
|
|
6238
6238
|
state: inputs.state,
|
|
6239
6239
|
port: inputs.port
|
|
6240
6240
|
} });
|
|
@@ -6548,7 +6548,7 @@ var TRADITIONAL_NATIVE_PACKAGES = ["better-sqlite3"];
|
|
|
6548
6548
|
function hasDotNode(dir, maxDepth) {
|
|
6549
6549
|
let entries;
|
|
6550
6550
|
try {
|
|
6551
|
-
entries = fs
|
|
6551
|
+
entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
6552
6552
|
} catch {
|
|
6553
6553
|
return false;
|
|
6554
6554
|
}
|
|
@@ -6559,7 +6559,7 @@ function hasDotNode(dir, maxDepth) {
|
|
|
6559
6559
|
}
|
|
6560
6560
|
/** Locate the bundled `prebuild-install` bin.js inside the staged closure. */
|
|
6561
6561
|
function resolvePrebuildInstallBin(closureDir, moduleDir) {
|
|
6562
|
-
return [path$1.join(moduleDir, "node_modules", "prebuild-install", "bin.js"), path$1.join(closureDir, "node_modules", "prebuild-install", "bin.js")].find((c) => fs
|
|
6562
|
+
return [path$1.join(moduleDir, "node_modules", "prebuild-install", "bin.js"), path$1.join(closureDir, "node_modules", "prebuild-install", "bin.js")].find((c) => fs.existsSync(c)) ?? null;
|
|
6563
6563
|
}
|
|
6564
6564
|
/**
|
|
6565
6565
|
* Default fetcher: run the closure's own `prebuild-install` under the CURRENT
|
|
@@ -6612,7 +6612,7 @@ async function ensureNativePrebuilds(closureDir, options) {
|
|
|
6612
6612
|
const fetched = [];
|
|
6613
6613
|
for (const pkg of packages) {
|
|
6614
6614
|
const moduleDir = path$1.join(nm, pkg);
|
|
6615
|
-
if (!fs
|
|
6615
|
+
if (!fs.existsSync(moduleDir)) continue;
|
|
6616
6616
|
if (hasDotNode(moduleDir, 4)) continue;
|
|
6617
6617
|
options.logger.warn("staged closure native prebuild missing — fetching for running ABI", { meta: {
|
|
6618
6618
|
pkg,
|
|
@@ -6675,12 +6675,12 @@ async function ensureNativePrebuilds(closureDir, options) {
|
|
|
6675
6675
|
function replantFromBundled(srcModuleDir, dstModuleDir, hasNative) {
|
|
6676
6676
|
if (!hasNative(srcModuleDir)) return false;
|
|
6677
6677
|
try {
|
|
6678
|
-
fs
|
|
6678
|
+
fs.rmSync(dstModuleDir, {
|
|
6679
6679
|
recursive: true,
|
|
6680
6680
|
force: true
|
|
6681
6681
|
});
|
|
6682
|
-
fs
|
|
6683
|
-
fs
|
|
6682
|
+
fs.mkdirSync(path$1.dirname(dstModuleDir), { recursive: true });
|
|
6683
|
+
fs.cpSync(srcModuleDir, dstModuleDir, {
|
|
6684
6684
|
recursive: true,
|
|
6685
6685
|
dereference: true
|
|
6686
6686
|
});
|
|
@@ -6709,7 +6709,7 @@ async function ensureAddonNativePrebuilds(addonDir, options) {
|
|
|
6709
6709
|
const missing = [];
|
|
6710
6710
|
for (const pkg of packages) {
|
|
6711
6711
|
const moduleDir = path$1.join(nm, pkg);
|
|
6712
|
-
if (!fs
|
|
6712
|
+
if (!fs.existsSync(moduleDir)) continue;
|
|
6713
6713
|
if (hasNative(moduleDir)) {
|
|
6714
6714
|
results.push({
|
|
6715
6715
|
pkg,
|
|
@@ -6808,7 +6808,7 @@ async function defaultDownloadTarball(url, destTgz) {
|
|
|
6808
6808
|
const res = await fetch(url);
|
|
6809
6809
|
if (!res.ok || !res.body) throw new Error(`HTTP ${res.status} downloading ${url}`);
|
|
6810
6810
|
const bytes = Buffer.from(await res.arrayBuffer());
|
|
6811
|
-
await fs
|
|
6811
|
+
await fs.promises.writeFile(destTgz, bytes);
|
|
6812
6812
|
}
|
|
6813
6813
|
async function defaultExtractTarball(tgzPath, destDir) {
|
|
6814
6814
|
await execFileAsync$5("tar", [
|
|
@@ -6894,7 +6894,7 @@ async function resolveUncached(options) {
|
|
|
6894
6894
|
argsPrefix: []
|
|
6895
6895
|
};
|
|
6896
6896
|
const cliPath = bootstrappedCliPath(options.cacheDir);
|
|
6897
|
-
if (fs
|
|
6897
|
+
if (fs.existsSync(cliPath)) {
|
|
6898
6898
|
options.logger.info("system npm unavailable — using bootstrapped npm", { meta: { cliPath } });
|
|
6899
6899
|
return {
|
|
6900
6900
|
command: process.execPath,
|
|
@@ -6906,12 +6906,12 @@ async function resolveUncached(options) {
|
|
|
6906
6906
|
const registry = (options.registry ?? DEFAULT_REGISTRY$1).replace(/\/+$/, "");
|
|
6907
6907
|
const tarballUrl = tarballUrlOf(await (options.fetchJson ?? defaultFetchJson)(`${registry}/npm/latest`));
|
|
6908
6908
|
if (!tarballUrl) throw new Error(`registry metadata for 'npm' carries no dist.tarball (${registry})`);
|
|
6909
|
-
await fs
|
|
6909
|
+
await fs.promises.mkdir(options.cacheDir, { recursive: true });
|
|
6910
6910
|
const tgzPath = path$1.join(options.cacheDir, "npm-bootstrap.tgz");
|
|
6911
6911
|
await (options.downloadTarball ?? defaultDownloadTarball)(tarballUrl, tgzPath);
|
|
6912
6912
|
await (options.extractTarball ?? defaultExtractTarball)(tgzPath, options.cacheDir);
|
|
6913
|
-
await fs
|
|
6914
|
-
if (!fs
|
|
6913
|
+
await fs.promises.rm(tgzPath, { force: true });
|
|
6914
|
+
if (!fs.existsSync(cliPath)) throw new Error(`extracted npm tarball is missing ${cliPath}`);
|
|
6915
6915
|
options.logger.info("npm bootstrapped", { meta: { cliPath } });
|
|
6916
6916
|
return {
|
|
6917
6917
|
command: process.execPath,
|
|
@@ -6977,7 +6977,7 @@ function readOwningPackageVersion(entryPath) {
|
|
|
6977
6977
|
let dir = path$1.dirname(entryPath);
|
|
6978
6978
|
for (let hop = 0; hop < PACKAGE_JSON_LOOKUP_DEPTH; hop++) {
|
|
6979
6979
|
try {
|
|
6980
|
-
const version = asJsonObject$1(parseJsonUnknown(fs
|
|
6980
|
+
const version = asJsonObject$1(parseJsonUnknown(fs.readFileSync(path$1.join(dir, "package.json"), "utf-8")))?.["version"];
|
|
6981
6981
|
if (typeof version === "string" && version.length > 0) return version;
|
|
6982
6982
|
} catch {}
|
|
6983
6983
|
const parent = path$1.dirname(dir);
|
|
@@ -7021,14 +7021,14 @@ function readOwningPackageVersion(entryPath) {
|
|
|
7021
7021
|
function addonModuleCacheKey(entryPath) {
|
|
7022
7022
|
let stat;
|
|
7023
7023
|
try {
|
|
7024
|
-
stat = fs
|
|
7024
|
+
stat = fs.statSync(entryPath);
|
|
7025
7025
|
} catch {
|
|
7026
7026
|
return null;
|
|
7027
7027
|
}
|
|
7028
7028
|
const version = readOwningPackageVersion(entryPath) ?? `m${stat.mtimeMs}`;
|
|
7029
7029
|
let content;
|
|
7030
7030
|
try {
|
|
7031
|
-
content = createHash("sha1").update(fs
|
|
7031
|
+
content = createHash("sha1").update(fs.readFileSync(entryPath)).digest("hex").slice(0, 16);
|
|
7032
7032
|
} catch {
|
|
7033
7033
|
content = `m${stat.mtimeMs}s${stat.size}`;
|
|
7034
7034
|
}
|
|
@@ -7054,7 +7054,7 @@ async function importAddonModuleFresh(entryPath) {
|
|
|
7054
7054
|
return import(`${pathToFileURL(entryPath).href}?v=${encodeURIComponent(bust)}`);
|
|
7055
7055
|
}
|
|
7056
7056
|
/**
|
|
7057
|
-
* Package.json manifest boundary: the `
|
|
7057
|
+
* Package.json manifest boundary: the `dominevo` field is authored by third-party
|
|
7058
7058
|
* addon packages. We minimally validate that it looks like an AddonPackageManifest
|
|
7059
7059
|
* (has an `addons` array whose entries carry string `id`s) and pass it through as
|
|
7060
7060
|
* typed. This is one documented type-level bridge — the shape contract lives in
|
|
@@ -7087,7 +7087,7 @@ var noopLogger$1 = {
|
|
|
7087
7087
|
* Pure extraction of per-addon storage-location declarations from a set of
|
|
7088
7088
|
* registered addons. Each registered addon carries its manifest declaration
|
|
7089
7089
|
* (`RegisteredAddon.declaration`), whose optional `storageLocations` array is
|
|
7090
|
-
* the `
|
|
7090
|
+
* the `dominevo.addons[].storageLocations` entry authored in package.json.
|
|
7091
7091
|
*
|
|
7092
7092
|
* Returns ONE inner array per addon that declared at least one location;
|
|
7093
7093
|
* addons declaring nothing are omitted entirely (no empty arrays). The result
|
|
@@ -7132,14 +7132,14 @@ var AddonLoader = class {
|
|
|
7132
7132
|
* BUILTINS from the active closure, not the (now-inert) addons-dir copy, so
|
|
7133
7133
|
* the addons-dir `@dominevo/server/system` must NOT be double-loaded here. */
|
|
7134
7134
|
async loadFromDirectory(addonsDir, skipPackages = []) {
|
|
7135
|
-
if (!fs
|
|
7135
|
+
if (!fs.existsSync(addonsDir)) return;
|
|
7136
7136
|
const skip = new Set(skipPackages);
|
|
7137
|
-
const entries = fs
|
|
7137
|
+
const entries = fs.readdirSync(addonsDir, { withFileTypes: true });
|
|
7138
7138
|
for (const entry of entries) {
|
|
7139
7139
|
if (!isDirectoryEntry(entry, addonsDir)) continue;
|
|
7140
7140
|
if (entry.name.startsWith("@")) {
|
|
7141
7141
|
const scopeDir = path$1.join(addonsDir, entry.name);
|
|
7142
|
-
const scopeEntries = fs
|
|
7142
|
+
const scopeEntries = fs.readdirSync(scopeDir, { withFileTypes: true });
|
|
7143
7143
|
for (const scopeEntry of scopeEntries) {
|
|
7144
7144
|
if (!isDirectoryEntry(scopeEntry, scopeDir)) continue;
|
|
7145
7145
|
if (skip.has(`${entry.name}/${scopeEntry.name}`)) continue;
|
|
@@ -7153,7 +7153,7 @@ var AddonLoader = class {
|
|
|
7153
7153
|
}
|
|
7154
7154
|
async tryLoadAddon(addonDir) {
|
|
7155
7155
|
const pkgJsonPath = path$1.join(addonDir, "package.json");
|
|
7156
|
-
if (!fs
|
|
7156
|
+
if (!fs.existsSync(pkgJsonPath)) return;
|
|
7157
7157
|
try {
|
|
7158
7158
|
await this.loadFromAddonDir(addonDir);
|
|
7159
7159
|
} catch (err) {
|
|
@@ -7171,12 +7171,12 @@ var AddonLoader = class {
|
|
|
7171
7171
|
/** Load addon from a specific directory (package.json + dist/) */
|
|
7172
7172
|
async loadFromAddonDir(addonDir) {
|
|
7173
7173
|
const pkgJsonPath = path$1.join(addonDir, "package.json");
|
|
7174
|
-
const pkgJson = asJsonObject$1(parseJsonUnknown(fs
|
|
7174
|
+
const pkgJson = asJsonObject$1(parseJsonUnknown(fs.readFileSync(pkgJsonPath, "utf-8"))) ?? {};
|
|
7175
7175
|
const packageNameRaw = pkgJson["name"];
|
|
7176
7176
|
const packageName = typeof packageNameRaw === "string" ? packageNameRaw : "";
|
|
7177
7177
|
const packageVersionRaw = pkgJson["version"];
|
|
7178
7178
|
const packageVersion = typeof packageVersionRaw === "string" ? packageVersionRaw : "0.0.0";
|
|
7179
|
-
const manifest = toAddonPackageManifest(pkgJson["
|
|
7179
|
+
const manifest = toAddonPackageManifest(pkgJson["dominevo"]);
|
|
7180
7180
|
if (!manifest?.addons?.length) return;
|
|
7181
7181
|
this.clearLoadFailures(packageName);
|
|
7182
7182
|
for (const declaration of manifest.addons) try {
|
|
@@ -7219,7 +7219,7 @@ var AddonLoader = class {
|
|
|
7219
7219
|
}
|
|
7220
7220
|
const entryFile = declaration.entry.replace(/^\.\//, "").replace(/^src\//, "dist/").replace(/\.ts$/, ".js");
|
|
7221
7221
|
let entryPath = path$1.resolve(addonDir, entryFile);
|
|
7222
|
-
if (!fs
|
|
7222
|
+
if (!fs.existsSync(entryPath)) {
|
|
7223
7223
|
const base = entryPath.replace(/\.(js|cjs|mjs)$/, "");
|
|
7224
7224
|
entryPath = [
|
|
7225
7225
|
`${base}.cjs`,
|
|
@@ -7228,9 +7228,9 @@ var AddonLoader = class {
|
|
|
7228
7228
|
path$1.resolve(addonDir, "dist", "index.cjs"),
|
|
7229
7229
|
path$1.resolve(addonDir, "dist", "index.mjs"),
|
|
7230
7230
|
path$1.resolve(addonDir, declaration.entry)
|
|
7231
|
-
].find((p) => fs
|
|
7231
|
+
].find((p) => fs.existsSync(p)) ?? entryPath;
|
|
7232
7232
|
}
|
|
7233
|
-
if (!fs
|
|
7233
|
+
if (!fs.existsSync(entryPath)) throw new Error(`Entry not found: ${entryPath}`);
|
|
7234
7234
|
const modUnknown = await importAddonModuleFresh(entryPath);
|
|
7235
7235
|
const mod = isRecord$4(modUnknown) ? modUnknown : {};
|
|
7236
7236
|
const AddonClass = resolveAddonClass(mod);
|
|
@@ -7276,7 +7276,7 @@ var AddonLoader = class {
|
|
|
7276
7276
|
* Per-addon storage-location declarations across every registered addon.
|
|
7277
7277
|
*
|
|
7278
7278
|
* Each registered addon's `declaration.storageLocations` (the
|
|
7279
|
-
* `
|
|
7279
|
+
* `dominevo.addons[].storageLocations` array from package.json) is surfaced
|
|
7280
7280
|
* as one inner array; addons declaring nothing are omitted. The result is
|
|
7281
7281
|
* fed directly to `buildStorageLocationRegistry(perAddon)` so the
|
|
7282
7282
|
* storage-orchestrator can aggregate declarations and seed `<id>:default`
|
|
@@ -7342,7 +7342,7 @@ function isDirectoryEntry(entry, parentDir) {
|
|
|
7342
7342
|
if (entry.name.startsWith(".")) return false;
|
|
7343
7343
|
if (entry.isDirectory()) return true;
|
|
7344
7344
|
if (entry.isSymbolicLink()) try {
|
|
7345
|
-
return fs
|
|
7345
|
+
return fs.statSync(path$1.join(parentDir, entry.name)).isDirectory();
|
|
7346
7346
|
} catch {
|
|
7347
7347
|
return false;
|
|
7348
7348
|
}
|
|
@@ -7353,7 +7353,7 @@ function isDirectoryEntry(entry, parentDir) {
|
|
|
7353
7353
|
/**
|
|
7354
7354
|
* Narrow a dynamic addon method to a callable with the given signature.
|
|
7355
7355
|
*
|
|
7356
|
-
* Type-level bridge:
|
|
7356
|
+
* Type-level bridge: IDominevoAddon does not yet declare process/classifyAudio;
|
|
7357
7357
|
* dynamic dispatch is guarded by a `typeof === 'function'` check. Remove once
|
|
7358
7358
|
* the addon interface is extended with an engine trait.
|
|
7359
7359
|
*/
|
|
@@ -7362,7 +7362,7 @@ function resolveAddonMethod(target, name) {
|
|
|
7362
7362
|
if (typeof fn !== "function") return null;
|
|
7363
7363
|
return fn.bind(target);
|
|
7364
7364
|
}
|
|
7365
|
-
/** Wrap an
|
|
7365
|
+
/** Wrap an IDominevoAddon as IEngineInstance — typed process/classifyAudio access */
|
|
7366
7366
|
function toEngineInstance(addon, addonId) {
|
|
7367
7367
|
const processFn = resolveAddonMethod(addon, "process");
|
|
7368
7368
|
const classifyAudioFn = resolveAddonMethod(addon, "classifyAudio");
|
|
@@ -7436,7 +7436,7 @@ var execFileAsync$4 = promisify(execFile);
|
|
|
7436
7436
|
* Single source of truth — replaces scattered mkdirSync calls.
|
|
7437
7437
|
*/
|
|
7438
7438
|
function ensureDir(dirPath) {
|
|
7439
|
-
fs
|
|
7439
|
+
fs.mkdirSync(dirPath, { recursive: true });
|
|
7440
7440
|
}
|
|
7441
7441
|
/**
|
|
7442
7442
|
* Copy a directory recursively — ASYNC so it never blocks the event loop.
|
|
@@ -7449,7 +7449,7 @@ function ensureDir(dirPath) {
|
|
|
7449
7449
|
* `fs.promises.cp` keeps the I/O off the event loop. (Node ≥18 stable.)
|
|
7450
7450
|
*/
|
|
7451
7451
|
async function copyDirRecursive(src, dest) {
|
|
7452
|
-
await fs
|
|
7452
|
+
await fs.promises.cp(src, dest, {
|
|
7453
7453
|
recursive: true,
|
|
7454
7454
|
force: true
|
|
7455
7455
|
});
|
|
@@ -7466,7 +7466,7 @@ async function copyDirRecursive(src, dest) {
|
|
|
7466
7466
|
* `addons/` stays node_modules-free, which is what lets the backup tar the whole
|
|
7467
7467
|
* folder with no exclusion list (see ADR-0027). An addon that genuinely needs an
|
|
7468
7468
|
* un-bundleable runtime dep declares it explicitly in
|
|
7469
|
-
* `
|
|
7469
|
+
* `dominevo.runtimeDependencies`.
|
|
7470
7470
|
*
|
|
7471
7471
|
* (Historically this mirrored the build preset's COMMON_NATIVE_DEPS and
|
|
7472
7472
|
* per-addon-installed node-av/sharp/onnxruntime-node/ssh2/werift/systeminformation
|
|
@@ -7474,12 +7474,12 @@ async function copyDirRecursive(src, dest) {
|
|
|
7474
7474
|
* is removed: the natives come from the framework, the pure-JS from the bundle.)
|
|
7475
7475
|
*/
|
|
7476
7476
|
var RUNTIME_NATIVE_KEEP = [];
|
|
7477
|
-
/** Read `
|
|
7477
|
+
/** Read `dominevo.runtimeDependencies` (extra non-native deps the dist
|
|
7478
7478
|
* requires at runtime — versions come from the manifest's own dep maps). */
|
|
7479
7479
|
function readRuntimeDependencies(pkg) {
|
|
7480
|
-
const
|
|
7481
|
-
if (
|
|
7482
|
-
const raw =
|
|
7480
|
+
const dominevo = pkg.dominevo;
|
|
7481
|
+
if (dominevo === null || typeof dominevo !== "object" || Array.isArray(dominevo)) return [];
|
|
7482
|
+
const raw = dominevo.runtimeDependencies;
|
|
7483
7483
|
if (!Array.isArray(raw)) return [];
|
|
7484
7484
|
return raw.filter((entry) => typeof entry === "string");
|
|
7485
7485
|
}
|
|
@@ -7487,7 +7487,7 @@ function readRuntimeDependencies(pkg) {
|
|
|
7487
7487
|
* Strip every dependency an addon's self-contained dist has already bundled,
|
|
7488
7488
|
* keeping ONLY what must resolve from node_modules at runtime:
|
|
7489
7489
|
*
|
|
7490
|
-
* keep = RUNTIME_NATIVE_KEEP ∪
|
|
7490
|
+
* keep = RUNTIME_NATIVE_KEEP ∪ dominevo.runtimeDependencies (minus @dominevo/*)
|
|
7491
7491
|
*
|
|
7492
7492
|
* Addon dists are fully bundled (vite `externals: 'self-contained'`), yet the
|
|
7493
7493
|
* blanket `npm install` of the manifest's dependencies re-installed the whole
|
|
@@ -7500,8 +7500,8 @@ function readRuntimeDependencies(pkg) {
|
|
|
7500
7500
|
* Returns a new object (immutable).
|
|
7501
7501
|
*/
|
|
7502
7502
|
function stripBundledDeps(pkg) {
|
|
7503
|
-
const
|
|
7504
|
-
if (
|
|
7503
|
+
const dominevo = pkg.dominevo;
|
|
7504
|
+
if (dominevo !== null && typeof dominevo === "object" && !Array.isArray(dominevo) && dominevo.system === true) return stripDominevoDeps(pkg);
|
|
7505
7505
|
const keep = new Set([...RUNTIME_NATIVE_KEEP, ...readRuntimeDependencies(pkg)]);
|
|
7506
7506
|
const kept = {};
|
|
7507
7507
|
for (const depType of ["dependencies", "peerDependencies"]) {
|
|
@@ -7526,7 +7526,7 @@ function stripBundledDeps(pkg) {
|
|
|
7526
7526
|
*
|
|
7527
7527
|
* Returns a new object (immutable).
|
|
7528
7528
|
*/
|
|
7529
|
-
function
|
|
7529
|
+
function stripDominevoDeps(pkg) {
|
|
7530
7530
|
const result = { ...pkg };
|
|
7531
7531
|
for (const depType of [
|
|
7532
7532
|
"dependencies",
|
|
@@ -7554,13 +7554,13 @@ async function copyExtraFileDirs(pkgJson, sourceDir, destDir) {
|
|
|
7554
7554
|
if (typeof fileEntry !== "string") continue;
|
|
7555
7555
|
if (fileEntry === "dist" || fileEntry.includes("*")) continue;
|
|
7556
7556
|
const srcPath = path$1.join(sourceDir, fileEntry);
|
|
7557
|
-
if (!fs
|
|
7557
|
+
if (!fs.existsSync(srcPath)) continue;
|
|
7558
7558
|
const destPath = path$1.join(destDir, fileEntry);
|
|
7559
|
-
const stat = await fs
|
|
7559
|
+
const stat = await fs.promises.stat(srcPath);
|
|
7560
7560
|
if (stat.isDirectory()) await copyDirRecursive(srcPath, destPath);
|
|
7561
7561
|
else if (stat.isFile()) {
|
|
7562
7562
|
ensureDir(path$1.dirname(destPath));
|
|
7563
|
-
await fs
|
|
7563
|
+
await fs.promises.copyFile(srcPath, destPath);
|
|
7564
7564
|
}
|
|
7565
7565
|
}
|
|
7566
7566
|
}
|
|
@@ -7571,10 +7571,10 @@ async function copyExtraFileDirs(pkgJson, sourceDir, destDir) {
|
|
|
7571
7571
|
function isSourceNewer(packageDir) {
|
|
7572
7572
|
const srcDir = path$1.join(packageDir, "src");
|
|
7573
7573
|
const distDir = path$1.join(packageDir, "dist");
|
|
7574
|
-
if (!fs
|
|
7574
|
+
if (!fs.existsSync(srcDir) || !fs.existsSync(distDir)) return true;
|
|
7575
7575
|
try {
|
|
7576
|
-
const distMtime = fs
|
|
7577
|
-
const entries = fs
|
|
7576
|
+
const distMtime = fs.statSync(distDir).mtimeMs;
|
|
7577
|
+
const entries = fs.readdirSync(srcDir, {
|
|
7578
7578
|
withFileTypes: true,
|
|
7579
7579
|
recursive: true
|
|
7580
7580
|
});
|
|
@@ -7582,7 +7582,7 @@ function isSourceNewer(packageDir) {
|
|
|
7582
7582
|
if (!entry.isFile()) continue;
|
|
7583
7583
|
const parentDir = entry.parentPath ?? String(Reflect.get(entry, "path") ?? "");
|
|
7584
7584
|
const filePath = path$1.join(parentDir, entry.name);
|
|
7585
|
-
if (fs
|
|
7585
|
+
if (fs.statSync(filePath).mtimeMs > distMtime) return true;
|
|
7586
7586
|
}
|
|
7587
7587
|
return false;
|
|
7588
7588
|
} catch {
|
|
@@ -7591,7 +7591,7 @@ function isSourceNewer(packageDir) {
|
|
|
7591
7591
|
}
|
|
7592
7592
|
/**
|
|
7593
7593
|
* Install a single npm package into a target directory (package.json + dist/).
|
|
7594
|
-
* No validation on
|
|
7594
|
+
* No validation on dominevo.addons -- works for any @dominevo/* package.
|
|
7595
7595
|
*
|
|
7596
7596
|
* ASYNC: uses `execFile`/`fs.promises` throughout so a package install on a
|
|
7597
7597
|
* live node never blocks the event loop (the `npm pack` + tar extract + copy to
|
|
@@ -7599,7 +7599,7 @@ function isSourceNewer(packageDir) {
|
|
|
7599
7599
|
* `copyDirRecursive` for the wedge this prevents.
|
|
7600
7600
|
*/
|
|
7601
7601
|
async function installPackageFromNpm(packageName, targetDir) {
|
|
7602
|
-
const tmpDir = await fs
|
|
7602
|
+
const tmpDir = await fs.promises.mkdtemp(path$1.join(os$1.tmpdir(), "dominevo-install-"));
|
|
7603
7603
|
try {
|
|
7604
7604
|
const { stdout } = await execFileAsync$4("npm", [
|
|
7605
7605
|
"pack",
|
|
@@ -7622,21 +7622,21 @@ async function installPackageFromNpm(packageName, targetDir) {
|
|
|
7622
7622
|
extractDir
|
|
7623
7623
|
], { timeout: 3e4 });
|
|
7624
7624
|
const packageSubDir = path$1.join(extractDir, "package");
|
|
7625
|
-
const srcPkgJsonDir = fs
|
|
7626
|
-
await fs
|
|
7625
|
+
const srcPkgJsonDir = fs.existsSync(path$1.join(packageSubDir, "package.json")) ? packageSubDir : extractDir;
|
|
7626
|
+
await fs.promises.rm(targetDir, {
|
|
7627
7627
|
recursive: true,
|
|
7628
7628
|
force: true
|
|
7629
7629
|
});
|
|
7630
7630
|
ensureDir(targetDir);
|
|
7631
|
-
await fs
|
|
7631
|
+
await fs.promises.copyFile(path$1.join(srcPkgJsonDir, "package.json"), path$1.join(targetDir, "package.json"));
|
|
7632
7632
|
const distSrc = path$1.join(srcPkgJsonDir, "dist");
|
|
7633
|
-
if (fs
|
|
7633
|
+
if (fs.existsSync(distSrc)) await copyDirRecursive(distSrc, path$1.join(targetDir, "dist"));
|
|
7634
7634
|
try {
|
|
7635
|
-
const npmPkg = asJsonObject$1(parseJsonUnknown(await fs
|
|
7635
|
+
const npmPkg = asJsonObject$1(parseJsonUnknown(await fs.promises.readFile(path$1.join(srcPkgJsonDir, "package.json"), "utf-8")));
|
|
7636
7636
|
if (npmPkg) await copyExtraFileDirs(npmPkg, srcPkgJsonDir, targetDir);
|
|
7637
7637
|
} catch {}
|
|
7638
7638
|
} finally {
|
|
7639
|
-
await fs
|
|
7639
|
+
await fs.promises.rm(tmpDir, {
|
|
7640
7640
|
recursive: true,
|
|
7641
7641
|
force: true
|
|
7642
7642
|
});
|
|
@@ -7661,7 +7661,7 @@ function packageDirName$1(declaredName) {
|
|
|
7661
7661
|
}
|
|
7662
7662
|
function isDirLike$1(p) {
|
|
7663
7663
|
try {
|
|
7664
|
-
return fs
|
|
7664
|
+
return fs.statSync(p).isDirectory();
|
|
7665
7665
|
} catch {
|
|
7666
7666
|
return false;
|
|
7667
7667
|
}
|
|
@@ -7679,12 +7679,12 @@ var AddonManifest = class {
|
|
|
7679
7679
|
*/
|
|
7680
7680
|
read() {
|
|
7681
7681
|
if (this.cache != null) return this.cache;
|
|
7682
|
-
if (!fs
|
|
7682
|
+
if (!fs.existsSync(this.manifestPath)) {
|
|
7683
7683
|
this.cache = this.empty();
|
|
7684
7684
|
return this.cache;
|
|
7685
7685
|
}
|
|
7686
7686
|
try {
|
|
7687
|
-
const raw = fs
|
|
7687
|
+
const raw = fs.readFileSync(this.manifestPath, "utf-8");
|
|
7688
7688
|
const parsed = JSON.parse(raw);
|
|
7689
7689
|
if (parsed.version !== MANIFEST_VERSION) {
|
|
7690
7690
|
process.stderr.write(`[AddonManifest] schema mismatch (file=${parsed.version} vs runtime=${MANIFEST_VERSION}); starting empty\n`);
|
|
@@ -7705,13 +7705,13 @@ var AddonManifest = class {
|
|
|
7705
7705
|
* a half-written file.
|
|
7706
7706
|
*/
|
|
7707
7707
|
write(manifest) {
|
|
7708
|
-
fs
|
|
7708
|
+
fs.mkdirSync(path$1.dirname(this.manifestPath), { recursive: true });
|
|
7709
7709
|
const tmp = `${this.manifestPath}.tmp.${process.pid}.${Date.now()}`;
|
|
7710
|
-
fs
|
|
7710
|
+
fs.writeFileSync(tmp, JSON.stringify(manifest, null, 2), {
|
|
7711
7711
|
encoding: "utf-8",
|
|
7712
7712
|
mode: 384
|
|
7713
7713
|
});
|
|
7714
|
-
fs
|
|
7714
|
+
fs.renameSync(tmp, this.manifestPath);
|
|
7715
7715
|
this.cache = manifest;
|
|
7716
7716
|
}
|
|
7717
7717
|
/** Lookup a single addon's manifest entry, or `null` if not tracked. */
|
|
@@ -7786,29 +7786,29 @@ var AddonManifest = class {
|
|
|
7786
7786
|
* exactly what moved. Returns the total number of changes.
|
|
7787
7787
|
*/
|
|
7788
7788
|
reconcileFromDisk(addonsDir, onChange) {
|
|
7789
|
-
if (!fs
|
|
7789
|
+
if (!fs.existsSync(addonsDir)) return 0;
|
|
7790
7790
|
const m = this.read();
|
|
7791
7791
|
let changes = 0;
|
|
7792
7792
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
7793
7793
|
/** Package name → version, for every ADDON package actually installed. */
|
|
7794
7794
|
const onDisk = /* @__PURE__ */ new Map();
|
|
7795
|
-
for (const scope of fs
|
|
7795
|
+
for (const scope of fs.readdirSync(addonsDir, { withFileTypes: true })) {
|
|
7796
7796
|
if (!scope.name.startsWith("@") || !isDirLike$1(path$1.join(addonsDir, scope.name))) continue;
|
|
7797
7797
|
const scopeDir = path$1.join(addonsDir, scope.name);
|
|
7798
|
-
for (const pkg of fs
|
|
7798
|
+
for (const pkg of fs.readdirSync(scopeDir, { withFileTypes: true })) {
|
|
7799
7799
|
if (!isDirLike$1(path$1.join(scopeDir, pkg.name))) continue;
|
|
7800
7800
|
const pkgJsonPath = path$1.join(scopeDir, pkg.name, "package.json");
|
|
7801
|
-
if (!fs
|
|
7801
|
+
if (!fs.existsSync(pkgJsonPath)) continue;
|
|
7802
7802
|
let pkgJson;
|
|
7803
7803
|
try {
|
|
7804
|
-
const parsed = JSON.parse(fs
|
|
7804
|
+
const parsed = JSON.parse(fs.readFileSync(pkgJsonPath, "utf-8"));
|
|
7805
7805
|
if (typeof parsed !== "object" || parsed == null) continue;
|
|
7806
7806
|
pkgJson = parsed;
|
|
7807
7807
|
} catch {
|
|
7808
7808
|
continue;
|
|
7809
7809
|
}
|
|
7810
7810
|
if (!pkgJson.name || !pkgJson.version) continue;
|
|
7811
|
-
const addons = pkgJson.
|
|
7811
|
+
const addons = pkgJson.dominevo?.addons;
|
|
7812
7812
|
if (!Array.isArray(addons) || addons.length === 0) continue;
|
|
7813
7813
|
if (packageDirName$1(pkgJson.name) !== pkg.name) continue;
|
|
7814
7814
|
onDisk.set(pkgJson.name, pkgJson.version);
|
|
@@ -7872,28 +7872,28 @@ var AddonManifest = class {
|
|
|
7872
7872
|
migrateFromInstallSourceMarkers(addonsDir) {
|
|
7873
7873
|
const m = this.read();
|
|
7874
7874
|
if (Object.keys(m.addons).length > 0) return 0;
|
|
7875
|
-
if (!fs
|
|
7875
|
+
if (!fs.existsSync(addonsDir)) return 0;
|
|
7876
7876
|
let migrated = 0;
|
|
7877
7877
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
7878
|
-
for (const scope of fs
|
|
7878
|
+
for (const scope of fs.readdirSync(addonsDir, { withFileTypes: true })) {
|
|
7879
7879
|
if (!scope.isDirectory() || !scope.name.startsWith("@")) continue;
|
|
7880
7880
|
const scopeDir = path$1.join(addonsDir, scope.name);
|
|
7881
|
-
for (const pkg of fs
|
|
7881
|
+
for (const pkg of fs.readdirSync(scopeDir, { withFileTypes: true })) {
|
|
7882
7882
|
if (!pkg.isDirectory()) continue;
|
|
7883
7883
|
const pkgDir = path$1.join(scopeDir, pkg.name);
|
|
7884
7884
|
const markerPath = path$1.join(pkgDir, ".install-source");
|
|
7885
7885
|
const pkgJsonPath = path$1.join(pkgDir, "package.json");
|
|
7886
|
-
if (!fs
|
|
7886
|
+
if (!fs.existsSync(pkgJsonPath)) continue;
|
|
7887
7887
|
let pkgJson;
|
|
7888
7888
|
try {
|
|
7889
|
-
const parsed = JSON.parse(fs
|
|
7889
|
+
const parsed = JSON.parse(fs.readFileSync(pkgJsonPath, "utf-8"));
|
|
7890
7890
|
if (typeof parsed !== "object" || parsed == null) continue;
|
|
7891
7891
|
pkgJson = parsed;
|
|
7892
7892
|
} catch {
|
|
7893
7893
|
continue;
|
|
7894
7894
|
}
|
|
7895
7895
|
if (!pkgJson.name || !pkgJson.version) continue;
|
|
7896
|
-
const source = fs
|
|
7896
|
+
const source = fs.existsSync(markerPath) ? fs.readFileSync(markerPath, "utf-8").trim() : "bundled";
|
|
7897
7897
|
m.addons[pkgJson.name] = {
|
|
7898
7898
|
name: pkgJson.name,
|
|
7899
7899
|
version: pkgJson.version,
|
|
@@ -7945,7 +7945,7 @@ function isPrereleaseAhead(installed, target) {
|
|
|
7945
7945
|
* `installed === null` with a known target is a first install of that target.
|
|
7946
7946
|
*
|
|
7947
7947
|
* `unmet` is what the TARGET declares and this node does not meet (computed by
|
|
7948
|
-
* the caller from the target's `
|
|
7948
|
+
* the caller from the target's `dominevo.requires`). A move that would happen
|
|
7949
7949
|
* is held and says why; a node that is already on the target has nothing to hold.
|
|
7950
7950
|
* A prerelease installed ahead of a registry target is never moved down.
|
|
7951
7951
|
*/
|
|
@@ -7974,7 +7974,7 @@ function decideAddonVersionMove(installed, target, reason, unmet = []) {
|
|
|
7974
7974
|
* closure already provides.
|
|
7975
7975
|
*
|
|
7976
7976
|
* `installRuntimeDependencies` materialises each addon's declared
|
|
7977
|
-
* `
|
|
7977
|
+
* `dominevo.runtimeDependencies` (and their whole transitive tree) under
|
|
7978
7978
|
* `<addonsDir>/<pkg>/node_modules`. Measured on the live hub (2026-09-04):
|
|
7979
7979
|
* 196 MB across 23 addons, largely re-copies of libraries sitting one
|
|
7980
7980
|
* directory away in `/data/server-root/current/node_modules` — `mediabunny`
|
|
@@ -8075,7 +8075,7 @@ function planClosureDedupe(input) {
|
|
|
8075
8075
|
if (candidate.name.startsWith("@dominevo/")) {
|
|
8076
8076
|
keeps.push({
|
|
8077
8077
|
name: candidate.name,
|
|
8078
|
-
reason: "
|
|
8078
|
+
reason: "dominevo-package"
|
|
8079
8079
|
});
|
|
8080
8080
|
continue;
|
|
8081
8081
|
}
|
|
@@ -8119,7 +8119,7 @@ function planClosureDedupe(input) {
|
|
|
8119
8119
|
function readTreeManifest(pkgJsonPath) {
|
|
8120
8120
|
let raw;
|
|
8121
8121
|
try {
|
|
8122
|
-
raw = asJsonObject$1(parseJsonUnknown(fs
|
|
8122
|
+
raw = asJsonObject$1(parseJsonUnknown(fs.readFileSync(pkgJsonPath, "utf-8")));
|
|
8123
8123
|
} catch {
|
|
8124
8124
|
return null;
|
|
8125
8125
|
}
|
|
@@ -8144,7 +8144,7 @@ function readTreeManifest(pkgJsonPath) {
|
|
|
8144
8144
|
function listTopLevelEntries(nodeModulesDir) {
|
|
8145
8145
|
let entries;
|
|
8146
8146
|
try {
|
|
8147
|
-
entries = fs
|
|
8147
|
+
entries = fs.readdirSync(nodeModulesDir, { withFileTypes: true });
|
|
8148
8148
|
} catch {
|
|
8149
8149
|
return [];
|
|
8150
8150
|
}
|
|
@@ -8154,7 +8154,7 @@ function listTopLevelEntries(nodeModulesDir) {
|
|
|
8154
8154
|
if (entry.name.startsWith("@")) {
|
|
8155
8155
|
let inner;
|
|
8156
8156
|
try {
|
|
8157
|
-
inner = fs
|
|
8157
|
+
inner = fs.readdirSync(path$1.join(nodeModulesDir, entry.name), { withFileTypes: true });
|
|
8158
8158
|
} catch {
|
|
8159
8159
|
continue;
|
|
8160
8160
|
}
|
|
@@ -8187,14 +8187,14 @@ function collectAddonTreeState(addonDir) {
|
|
|
8187
8187
|
const entryDir = path$1.join(nodeModulesDir, name);
|
|
8188
8188
|
let isLink = false;
|
|
8189
8189
|
try {
|
|
8190
|
-
isLink = fs
|
|
8190
|
+
isLink = fs.lstatSync(entryDir).isSymbolicLink();
|
|
8191
8191
|
} catch {
|
|
8192
8192
|
continue;
|
|
8193
8193
|
}
|
|
8194
8194
|
if (isLink) {
|
|
8195
8195
|
let target = "";
|
|
8196
8196
|
try {
|
|
8197
|
-
target = fs
|
|
8197
|
+
target = fs.readlinkSync(entryDir);
|
|
8198
8198
|
} catch {}
|
|
8199
8199
|
existingLinks.push({
|
|
8200
8200
|
name,
|
|
@@ -8208,7 +8208,7 @@ function collectAddonTreeState(addonDir) {
|
|
|
8208
8208
|
version: manifest.version
|
|
8209
8209
|
});
|
|
8210
8210
|
for (const [depName, range] of manifest.ranges) {
|
|
8211
|
-
if (fs
|
|
8211
|
+
if (fs.existsSync(path$1.join(entryDir, "node_modules", depName))) continue;
|
|
8212
8212
|
addRange(depName, range);
|
|
8213
8213
|
}
|
|
8214
8214
|
}
|
|
@@ -8230,15 +8230,15 @@ function readClosureVersions(closureNodeModulesDir, names) {
|
|
|
8230
8230
|
/**
|
|
8231
8231
|
* Where the running node's server closure keeps its node_modules, or null
|
|
8232
8232
|
* when there is none to dedupe against (dev workspace, tests without a
|
|
8233
|
-
* closure). `
|
|
8233
|
+
* closure). `DOMINEVO_FRAMEWORK_DIR` is set by the starter/launcher on every
|
|
8234
8234
|
* deployed node — the same directory the framework resolver hook and
|
|
8235
8235
|
* NODE_PATH extension already point at.
|
|
8236
8236
|
*/
|
|
8237
8237
|
function resolveClosureNodeModulesDir(explicitDir) {
|
|
8238
|
-
const frameworkDir = explicitDir ?? process.env["
|
|
8238
|
+
const frameworkDir = explicitDir ?? process.env["DOMINEVO_FRAMEWORK_DIR"];
|
|
8239
8239
|
if (frameworkDir === void 0 || frameworkDir.length === 0) return null;
|
|
8240
8240
|
const nodeModulesDir = explicitDir ?? path$1.join(frameworkDir, "node_modules");
|
|
8241
|
-
return fs
|
|
8241
|
+
return fs.existsSync(nodeModulesDir) ? nodeModulesDir : null;
|
|
8242
8242
|
}
|
|
8243
8243
|
function symlinkType() {
|
|
8244
8244
|
return process.platform === "win32" ? "junction" : "dir";
|
|
@@ -8257,10 +8257,10 @@ function executeClosureDedupe(addonDir, closureNodeModulesDir, plan, logger) {
|
|
|
8257
8257
|
const nodeModulesDir = path$1.join(addonDir, "node_modules");
|
|
8258
8258
|
const probePath = path$1.join(nodeModulesDir, ".closure-link-probe");
|
|
8259
8259
|
try {
|
|
8260
|
-
fs
|
|
8261
|
-
fs
|
|
8262
|
-
fs
|
|
8263
|
-
fs
|
|
8260
|
+
fs.mkdirSync(nodeModulesDir, { recursive: true });
|
|
8261
|
+
fs.rmSync(probePath, { force: true });
|
|
8262
|
+
fs.symlinkSync(closureNodeModulesDir, probePath, symlinkType());
|
|
8263
|
+
fs.rmSync(probePath, { force: true });
|
|
8264
8264
|
} catch (err) {
|
|
8265
8265
|
logger.warn("closure dedupe skipped — symlinks unavailable on this volume", { meta: {
|
|
8266
8266
|
addonDir,
|
|
@@ -8282,12 +8282,12 @@ function executeClosureDedupe(addonDir, closureNodeModulesDir, plan, logger) {
|
|
|
8282
8282
|
}
|
|
8283
8283
|
const entryDir = path$1.join(nodeModulesDir, link.name);
|
|
8284
8284
|
try {
|
|
8285
|
-
fs
|
|
8285
|
+
fs.rmSync(entryDir, {
|
|
8286
8286
|
recursive: true,
|
|
8287
8287
|
force: true
|
|
8288
8288
|
});
|
|
8289
|
-
fs
|
|
8290
|
-
fs
|
|
8289
|
+
fs.mkdirSync(path$1.dirname(entryDir), { recursive: true });
|
|
8290
|
+
fs.symlinkSync(target, entryDir, symlinkType());
|
|
8291
8291
|
linked.push(link.name);
|
|
8292
8292
|
} catch (err) {
|
|
8293
8293
|
logger.warn("closure dedupe — link failed; entry removed copy may need reinstall", { meta: {
|
|
@@ -8319,13 +8319,13 @@ var execFileAsync$3 = promisify(execFile);
|
|
|
8319
8319
|
* installer) pass their own.
|
|
8320
8320
|
*/
|
|
8321
8321
|
function defaultNpmCacheDir() {
|
|
8322
|
-
return path$1.join(os$1.tmpdir(), "
|
|
8322
|
+
return path$1.join(os$1.tmpdir(), "dominevo-npm-bootstrap");
|
|
8323
8323
|
}
|
|
8324
8324
|
/**
|
|
8325
8325
|
* Native node modules an addon needs at runtime but cannot be bundled
|
|
8326
8326
|
* (`.node` binary files require ABI-matched compilation). Mirror of the
|
|
8327
8327
|
* Python `requirements.txt` pattern in `manifest-python-deps.ts` —
|
|
8328
|
-
* declared in the addon's `package.json` under `
|
|
8328
|
+
* declared in the addon's `package.json` under `dominevo.nativeDependencies`,
|
|
8329
8329
|
* installed per-addon at install time so the host's regular `npm install`
|
|
8330
8330
|
* doesn't pull in the union of every camera driver's native deps.
|
|
8331
8331
|
*
|
|
@@ -8333,7 +8333,7 @@ function defaultNpmCacheDir() {
|
|
|
8333
8333
|
* (`docs/superpowers/specs/2026-05-09-bundles-and-builder-modernization-design.md`).
|
|
8334
8334
|
*
|
|
8335
8335
|
* Idempotent: hashes the `nativeDependencies` map and writes a marker
|
|
8336
|
-
* to `<addonDir>/.
|
|
8336
|
+
* to `<addonDir>/.dominevo-native-deps-installed`. Re-installing only
|
|
8337
8337
|
* happens when the declared set changes.
|
|
8338
8338
|
*
|
|
8339
8339
|
* Failure modes:
|
|
@@ -8347,7 +8347,7 @@ function defaultNpmCacheDir() {
|
|
|
8347
8347
|
async function installManifestNativeDeps(addonDir, pkgRaw, logger, registry, npmCacheDir) {
|
|
8348
8348
|
const native = readNativeDeps(pkgRaw);
|
|
8349
8349
|
if (native == null || Object.keys(native).length === 0) return;
|
|
8350
|
-
const markerFile = path$1.join(addonDir, ".
|
|
8350
|
+
const markerFile = path$1.join(addonDir, ".dominevo-native-deps-installed");
|
|
8351
8351
|
const markerHash = hashDeclaration(native);
|
|
8352
8352
|
if (markerMatches(markerFile, markerHash)) {
|
|
8353
8353
|
logger.debug("Native deps already installed (marker matches)", { meta: {
|
|
@@ -8363,7 +8363,7 @@ async function installManifestNativeDeps(addonDir, pkgRaw, logger, registry, npm
|
|
|
8363
8363
|
count: Object.keys(native).length
|
|
8364
8364
|
} });
|
|
8365
8365
|
try {
|
|
8366
|
-
fs
|
|
8366
|
+
fs.writeFileSync(markerFile, markerHash);
|
|
8367
8367
|
} catch (err) {
|
|
8368
8368
|
logger.warn("Failed to write native deps marker", { meta: {
|
|
8369
8369
|
markerFile,
|
|
@@ -8401,7 +8401,7 @@ async function installManifestNativeDeps(addonDir, pkgRaw, logger, registry, npm
|
|
|
8401
8401
|
}
|
|
8402
8402
|
await rebuildNativeDeps(addonDir, pending.map(([name]) => name), logger, npmCacheDir ?? defaultNpmCacheDir(), registry);
|
|
8403
8403
|
try {
|
|
8404
|
-
fs
|
|
8404
|
+
fs.writeFileSync(markerFile, markerHash);
|
|
8405
8405
|
} catch (err) {
|
|
8406
8406
|
logger.warn("Failed to write native deps marker", { meta: {
|
|
8407
8407
|
markerFile,
|
|
@@ -8423,12 +8423,12 @@ function copyPrebuiltNativeDep(name, addonDir, logger) {
|
|
|
8423
8423
|
if (source === target) continue;
|
|
8424
8424
|
if (!hasBuiltBinary(source)) continue;
|
|
8425
8425
|
try {
|
|
8426
|
-
fs
|
|
8426
|
+
fs.rmSync(target, {
|
|
8427
8427
|
recursive: true,
|
|
8428
8428
|
force: true
|
|
8429
8429
|
});
|
|
8430
|
-
fs
|
|
8431
|
-
fs
|
|
8430
|
+
fs.mkdirSync(path$1.dirname(target), { recursive: true });
|
|
8431
|
+
fs.cpSync(source, target, {
|
|
8432
8432
|
recursive: true,
|
|
8433
8433
|
dereference: true
|
|
8434
8434
|
});
|
|
@@ -8464,7 +8464,7 @@ var BUNDLED_NATIVE_SIBLING_SCOPES = {
|
|
|
8464
8464
|
function hasAnyDotNode(dir, maxDepth) {
|
|
8465
8465
|
let entries;
|
|
8466
8466
|
try {
|
|
8467
|
-
entries = fs
|
|
8467
|
+
entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
8468
8468
|
} catch {
|
|
8469
8469
|
return false;
|
|
8470
8470
|
}
|
|
@@ -8478,12 +8478,12 @@ function copyPrebuiltModuleDir(src, dst, label, logger) {
|
|
|
8478
8478
|
if (!hasAnyDotNode(src, 5)) return;
|
|
8479
8479
|
if (hasAnyDotNode(dst, 5)) return;
|
|
8480
8480
|
try {
|
|
8481
|
-
fs
|
|
8481
|
+
fs.rmSync(dst, {
|
|
8482
8482
|
recursive: true,
|
|
8483
8483
|
force: true
|
|
8484
8484
|
});
|
|
8485
|
-
fs
|
|
8486
|
-
fs
|
|
8485
|
+
fs.mkdirSync(path$1.dirname(dst), { recursive: true });
|
|
8486
|
+
fs.cpSync(src, dst, {
|
|
8487
8487
|
recursive: true,
|
|
8488
8488
|
dereference: true
|
|
8489
8489
|
});
|
|
@@ -8518,7 +8518,7 @@ function copyPrebuiltModuleDir(src, dst, label, logger) {
|
|
|
8518
8518
|
*/
|
|
8519
8519
|
function copyBundledNativeModules(sourceDir, targetDir, logger) {
|
|
8520
8520
|
const srcNm = path$1.join(sourceDir, "node_modules");
|
|
8521
|
-
if (!fs
|
|
8521
|
+
if (!fs.existsSync(srcNm)) return;
|
|
8522
8522
|
const dstNm = path$1.join(targetDir, "node_modules");
|
|
8523
8523
|
for (const [name, scopes] of Object.entries(BUNDLED_NATIVE_SIBLING_SCOPES)) {
|
|
8524
8524
|
copyPrebuiltModuleDir(path$1.join(srcNm, name), path$1.join(dstNm, name), name, logger);
|
|
@@ -8526,7 +8526,7 @@ function copyBundledNativeModules(sourceDir, targetDir, logger) {
|
|
|
8526
8526
|
const scopeSrc = path$1.join(srcNm, scope);
|
|
8527
8527
|
let siblings;
|
|
8528
8528
|
try {
|
|
8529
|
-
siblings = fs
|
|
8529
|
+
siblings = fs.readdirSync(scopeSrc);
|
|
8530
8530
|
} catch {
|
|
8531
8531
|
continue;
|
|
8532
8532
|
}
|
|
@@ -8536,12 +8536,12 @@ function copyBundledNativeModules(sourceDir, targetDir, logger) {
|
|
|
8536
8536
|
}
|
|
8537
8537
|
/** A package dir is "built" when it carries a compiled `.node` or a prebuilds tree. */
|
|
8538
8538
|
function hasBuiltBinary(pkgDir) {
|
|
8539
|
-
if (!fs
|
|
8539
|
+
if (!fs.existsSync(path$1.join(pkgDir, "package.json"))) return false;
|
|
8540
8540
|
const releaseDir = path$1.join(pkgDir, "build", "Release");
|
|
8541
8541
|
try {
|
|
8542
|
-
if (fs
|
|
8542
|
+
if (fs.existsSync(releaseDir) && fs.readdirSync(releaseDir).some((f) => f.endsWith(".node"))) return true;
|
|
8543
8543
|
} catch {}
|
|
8544
|
-
return fs
|
|
8544
|
+
return fs.existsSync(path$1.join(pkgDir, "prebuilds"));
|
|
8545
8545
|
}
|
|
8546
8546
|
/** Candidate hoisted locations for `<name>`: NODE_PATH entries + ancestors of `addonDir`. */
|
|
8547
8547
|
function candidateHoistedDirs(name, addonDir) {
|
|
@@ -8559,11 +8559,11 @@ function candidateHoistedDirs(name, addonDir) {
|
|
|
8559
8559
|
}
|
|
8560
8560
|
return dirs;
|
|
8561
8561
|
}
|
|
8562
|
-
/** Read & validate `
|
|
8562
|
+
/** Read & validate `dominevo.nativeDependencies`. Returns null when absent. */
|
|
8563
8563
|
function readNativeDeps(pkgRaw) {
|
|
8564
|
-
const
|
|
8565
|
-
if (!
|
|
8566
|
-
const native = asJsonObject(
|
|
8564
|
+
const dominevo = asJsonObject(pkgRaw["dominevo"]);
|
|
8565
|
+
if (!dominevo) return null;
|
|
8566
|
+
const native = asJsonObject(dominevo["nativeDependencies"]);
|
|
8567
8567
|
if (!native) return null;
|
|
8568
8568
|
const out = {};
|
|
8569
8569
|
for (const [k, v] of Object.entries(native)) {
|
|
@@ -8579,7 +8579,7 @@ function hashDeclaration(deps) {
|
|
|
8579
8579
|
}
|
|
8580
8580
|
function markerMatches(markerFile, expected) {
|
|
8581
8581
|
try {
|
|
8582
|
-
return fs
|
|
8582
|
+
return fs.readFileSync(markerFile, "utf-8").trim() === expected;
|
|
8583
8583
|
} catch {
|
|
8584
8584
|
return false;
|
|
8585
8585
|
}
|
|
@@ -8674,7 +8674,7 @@ function listHeldInstalls() {
|
|
|
8674
8674
|
//#endregion
|
|
8675
8675
|
//#region src/kernel/requires-registry.ts
|
|
8676
8676
|
/**
|
|
8677
|
-
* Reading `
|
|
8677
|
+
* Reading `dominevo.requires` and the version list of a package from the npm
|
|
8678
8678
|
* registry, through the SAME doors the install uses (planning#447, D989).
|
|
8679
8679
|
*
|
|
8680
8680
|
* The install fetches the registry document over plain HTTP and falls back to
|
|
@@ -8726,8 +8726,8 @@ function createRequiresRegistry(deps) {
|
|
|
8726
8726
|
if (res.ok) {
|
|
8727
8727
|
const doc = await res.json();
|
|
8728
8728
|
if (typeof doc === "object" && doc !== null) {
|
|
8729
|
-
const
|
|
8730
|
-
return parseRequires(typeof
|
|
8729
|
+
const dominevo = Reflect.get(doc, "dominevo");
|
|
8730
|
+
return parseRequires(typeof dominevo === "object" && dominevo !== null ? Reflect.get(dominevo, "requires") : void 0);
|
|
8731
8731
|
}
|
|
8732
8732
|
}
|
|
8733
8733
|
} catch (err) {
|
|
@@ -8736,7 +8736,7 @@ function createRequiresRegistry(deps) {
|
|
|
8736
8736
|
return parseRequires(await viaNpm([
|
|
8737
8737
|
"view",
|
|
8738
8738
|
`${packageName}@${spec}`,
|
|
8739
|
-
"
|
|
8739
|
+
"dominevo.requires",
|
|
8740
8740
|
"--json"
|
|
8741
8741
|
]));
|
|
8742
8742
|
},
|
|
@@ -8767,15 +8767,15 @@ function createRequiresRegistry(deps) {
|
|
|
8767
8767
|
//#region src/kernel/addon-installer.ts
|
|
8768
8768
|
var execFileAsync$2 = promisify(execFile);
|
|
8769
8769
|
/**
|
|
8770
|
-
* Names declared in `
|
|
8770
|
+
* Names declared in `dominevo.nativeDependencies` — per-addon natives that
|
|
8771
8771
|
* the closure dedupe must never replace with a link (their install path owns
|
|
8772
8772
|
* ABI/prebuild handling; see `deps/manifest-native-deps.ts`).
|
|
8773
8773
|
*/
|
|
8774
8774
|
function readNativeDependencyNames(pkg) {
|
|
8775
8775
|
if (pkg === void 0) return /* @__PURE__ */ new Set();
|
|
8776
|
-
const
|
|
8777
|
-
if (
|
|
8778
|
-
const native = asJsonObject$1(
|
|
8776
|
+
const dominevo = asJsonObject$1(pkg["dominevo"]);
|
|
8777
|
+
if (dominevo === null) return /* @__PURE__ */ new Set();
|
|
8778
|
+
const native = asJsonObject$1(dominevo["nativeDependencies"]);
|
|
8779
8779
|
return native === null ? /* @__PURE__ */ new Set() : new Set(Object.keys(native));
|
|
8780
8780
|
}
|
|
8781
8781
|
function parseInstallSource(value) {
|
|
@@ -8790,7 +8790,7 @@ function parseInstallSource(value) {
|
|
|
8790
8790
|
function readPackageJson(pkgJsonPath) {
|
|
8791
8791
|
let raw;
|
|
8792
8792
|
try {
|
|
8793
|
-
raw = asJsonObject$1(parseJsonUnknown(fs
|
|
8793
|
+
raw = asJsonObject$1(parseJsonUnknown(fs.readFileSync(pkgJsonPath, "utf-8")));
|
|
8794
8794
|
} catch {
|
|
8795
8795
|
return null;
|
|
8796
8796
|
}
|
|
@@ -8798,13 +8798,13 @@ function readPackageJson(pkgJsonPath) {
|
|
|
8798
8798
|
const name = asString$1(raw["name"]);
|
|
8799
8799
|
const version = asString$1(raw["version"]);
|
|
8800
8800
|
if (!name || !version) return null;
|
|
8801
|
-
const
|
|
8802
|
-
const addonsField =
|
|
8801
|
+
const dominevo = asJsonObject$1(raw["dominevo"]);
|
|
8802
|
+
const addonsField = dominevo ? dominevo["addons"] : void 0;
|
|
8803
8803
|
return {
|
|
8804
8804
|
name,
|
|
8805
8805
|
version,
|
|
8806
8806
|
raw,
|
|
8807
|
-
|
|
8807
|
+
dominevoAddons: Array.isArray(addonsField) ? addonsField : null
|
|
8808
8808
|
};
|
|
8809
8809
|
}
|
|
8810
8810
|
/** The one bootstrap package the server closure carries itself. */
|
|
@@ -8834,7 +8834,7 @@ var REGISTRY_LATEST_TIMEOUT_MS = 15e3;
|
|
|
8834
8834
|
var FALLBACK_VERSION_PROBES = 25;
|
|
8835
8835
|
function readInstalledPackageVersion(addonDir) {
|
|
8836
8836
|
try {
|
|
8837
|
-
const raw = JSON.parse(fs
|
|
8837
|
+
const raw = JSON.parse(fs.readFileSync(path$1.join(addonDir, "package.json"), "utf-8"));
|
|
8838
8838
|
if (raw === null || typeof raw !== "object") return null;
|
|
8839
8839
|
const version = Reflect.get(raw, "version");
|
|
8840
8840
|
return typeof version === "string" && version.length > 0 ? version : null;
|
|
@@ -8896,7 +8896,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
8896
8896
|
bundledAddonsDir;
|
|
8897
8897
|
logger;
|
|
8898
8898
|
isPackageResolvable;
|
|
8899
|
-
/** Test seam — production resolves via `
|
|
8899
|
+
/** Test seam — production resolves via `DOMINEVO_FRAMEWORK_DIR`. */
|
|
8900
8900
|
closureNodeModulesDir;
|
|
8901
8901
|
resolveLatestVersionOverride;
|
|
8902
8902
|
serverVersion;
|
|
@@ -8982,10 +8982,10 @@ var AddonInstaller = class AddonInstaller {
|
|
|
8982
8982
|
} catch {
|
|
8983
8983
|
return Object.freeze([]);
|
|
8984
8984
|
}
|
|
8985
|
-
const raw = fs
|
|
8985
|
+
const raw = fs.readFileSync(pkgPath, "utf-8");
|
|
8986
8986
|
const parsed = JSON.parse(raw);
|
|
8987
8987
|
const deps = Object.keys(parsed.dependencies ?? {});
|
|
8988
|
-
const agentOnly = new Set(parsed.
|
|
8988
|
+
const agentOnly = new Set(parsed.dominevo?.agentOnlyBootstrapAddons ?? []);
|
|
8989
8989
|
return Object.freeze([...deps.filter((name) => !agentOnly.has(name) && name.startsWith("@dominevo/addon-")), CLOSURE_PROVIDED_PACKAGE]);
|
|
8990
8990
|
}
|
|
8991
8991
|
/**
|
|
@@ -9002,17 +9002,17 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9002
9002
|
static REQUIRED_PACKAGES = AddonInstaller.deriveBootstrapList("@dominevo/server");
|
|
9003
9003
|
/**
|
|
9004
9004
|
* Agent-only bootstrap packages — derived from the `@dominevo/server`
|
|
9005
|
-
* meta-package's `
|
|
9005
|
+
* meta-package's `dominevo.agentBootstrapAddons` manifest field (single
|
|
9006
9006
|
* source of truth; the separate agent meta-package is gone).
|
|
9007
9007
|
* The agent runtime boots from the SAME `@dominevo/server` closure, so its
|
|
9008
9008
|
* bootstrap addon set is declared alongside the hub's. Adding an agent
|
|
9009
9009
|
* bootstrap addon = adding it to `server/backend/package.json`'s
|
|
9010
|
-
* `
|
|
9010
|
+
* `dominevo.agentBootstrapAddons`.
|
|
9011
9011
|
*/
|
|
9012
9012
|
static AGENT_PACKAGES = AddonInstaller.deriveAgentBootstrapList("@dominevo/server");
|
|
9013
9013
|
/**
|
|
9014
9014
|
* Derive the agent bootstrap addon list from a meta-package's
|
|
9015
|
-
* `
|
|
9015
|
+
* `dominevo.agentBootstrapAddons` manifest field, prepending
|
|
9016
9016
|
* `@dominevo/server/system` (the required infrastructure builtins carrier — same
|
|
9017
9017
|
* rationale as `deriveBootstrapList`). Mirrors `deriveBootstrapList`'s
|
|
9018
9018
|
* `require.resolve` nuance: the meta-package may be absent in a deployment
|
|
@@ -9027,8 +9027,8 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9027
9027
|
} catch {
|
|
9028
9028
|
return Object.freeze([]);
|
|
9029
9029
|
}
|
|
9030
|
-
const raw = fs
|
|
9031
|
-
const addons = JSON.parse(raw).
|
|
9030
|
+
const raw = fs.readFileSync(pkgPath, "utf-8");
|
|
9031
|
+
const addons = JSON.parse(raw).dominevo?.agentBootstrapAddons ?? [];
|
|
9032
9032
|
return Object.freeze(["@dominevo/server", ...addons]);
|
|
9033
9033
|
}
|
|
9034
9034
|
/**
|
|
@@ -9057,7 +9057,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9057
9057
|
this.logger.info(`Install source: ${isLocal ? `bundle (${this.bundledAddonsDir})` : "npm"}, ${pkgList.length} package(s)`);
|
|
9058
9058
|
for (const packageName of pkgList) {
|
|
9059
9059
|
const addonDir = path$1.join(this.addonsDir, packageName);
|
|
9060
|
-
if (fs
|
|
9060
|
+
if (fs.existsSync(path$1.join(addonDir, "package.json"))) {
|
|
9061
9061
|
if (isLocal || shouldSkipClosureProvidedSeed(packageName, this.isResolvableFromClosure(packageName))) {
|
|
9062
9062
|
this.logger.debug(`${packageName} — already installed, skipping`);
|
|
9063
9063
|
continue;
|
|
@@ -9308,7 +9308,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9308
9308
|
const installedPackages = this.listInstalled();
|
|
9309
9309
|
for (const pkg of installedPackages) {
|
|
9310
9310
|
try {
|
|
9311
|
-
if (fs
|
|
9311
|
+
if (fs.lstatSync(pkg.dir).isSymbolicLink()) continue;
|
|
9312
9312
|
} catch {
|
|
9313
9313
|
continue;
|
|
9314
9314
|
}
|
|
@@ -9348,7 +9348,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9348
9348
|
if (closureNodeModules !== null) for (const link of state.existingLinks) {
|
|
9349
9349
|
if (!isClosureLinkTarget(link.target, closureNodeModules)) continue;
|
|
9350
9350
|
const linkDir = path$1.join(nodeModulesDir, link.name);
|
|
9351
|
-
const targetManifest = fs
|
|
9351
|
+
const targetManifest = fs.existsSync(path$1.join(linkDir, "package.json"));
|
|
9352
9352
|
const ranges = state.requirements.get(link.name) ?? [];
|
|
9353
9353
|
let holds = targetManifest;
|
|
9354
9354
|
if (holds && ranges.length > 0) {
|
|
@@ -9357,14 +9357,14 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9357
9357
|
}
|
|
9358
9358
|
if (!holds) {
|
|
9359
9359
|
this.logger.warn(`${packageName} — closure link for ${link.name} no longer holds; reinstalling this addon's deps`, { meta: { target: link.target } });
|
|
9360
|
-
fs
|
|
9360
|
+
fs.rmSync(linkDir, { force: true });
|
|
9361
9361
|
needsInstall = true;
|
|
9362
9362
|
}
|
|
9363
9363
|
}
|
|
9364
9364
|
const linked = [];
|
|
9365
9365
|
for (const [depName, range] of declaredEntries) {
|
|
9366
9366
|
if (typeof range !== "string") continue;
|
|
9367
|
-
if (fs
|
|
9367
|
+
if (fs.existsSync(path$1.join(nodeModulesDir, depName, "package.json"))) continue;
|
|
9368
9368
|
const closureVersion = closureNodeModules === null ? void 0 : readClosureVersions(closureNodeModules, [depName]).get(depName);
|
|
9369
9369
|
if (closureNodeModules !== null && closureVersion !== void 0 && closureSatisfiesRange(range, closureVersion)) {
|
|
9370
9370
|
if (executeClosureDedupe(addonDir, closureNodeModules, {
|
|
@@ -9397,7 +9397,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9397
9397
|
const closureNodeModules = resolveClosureNodeModulesDir(this.closureNodeModulesDir);
|
|
9398
9398
|
if (closureNodeModules !== null) {
|
|
9399
9399
|
const state = collectAddonTreeState(addonDir);
|
|
9400
|
-
for (const link of state.existingLinks) if (isClosureLinkTarget(link.target, closureNodeModules)) fs
|
|
9400
|
+
for (const link of state.existingLinks) if (isClosureLinkTarget(link.target, closureNodeModules)) fs.rmSync(path$1.join(addonDir, "node_modules", link.name), { force: true });
|
|
9401
9401
|
}
|
|
9402
9402
|
this.logger.info(`${packageName} — reinstalling runtime dependencies`, { meta: { addonDir } });
|
|
9403
9403
|
await runNpm([
|
|
@@ -9442,7 +9442,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9442
9442
|
async realignFromClosure(packageName, closureDir) {
|
|
9443
9443
|
const targetDir = path$1.join(this.addonsDir, packageName);
|
|
9444
9444
|
const result = await this.installLocal(packageName, closureDir);
|
|
9445
|
-
await fs
|
|
9445
|
+
await fs.promises.writeFile(path$1.join(targetDir, ".install-source"), "closure");
|
|
9446
9446
|
this.manifest.upsert(result.name, {
|
|
9447
9447
|
version: result.version,
|
|
9448
9448
|
source: "closure"
|
|
@@ -9458,17 +9458,17 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9458
9458
|
async installCopy(packageName, sourceDir, pkgData, targetDir) {
|
|
9459
9459
|
await this.ensureBuilt(packageName, sourceDir, pkgData);
|
|
9460
9460
|
const distDir = path$1.join(sourceDir, "dist");
|
|
9461
|
-
if (!fs
|
|
9462
|
-
await fs
|
|
9461
|
+
if (!fs.existsSync(distDir)) throw new Error(`${packageName} has no dist/ after build`);
|
|
9462
|
+
await fs.promises.rm(targetDir, {
|
|
9463
9463
|
recursive: true,
|
|
9464
9464
|
force: true
|
|
9465
9465
|
});
|
|
9466
9466
|
ensureDir(targetDir);
|
|
9467
|
-
await fs
|
|
9467
|
+
await fs.promises.writeFile(path$1.join(targetDir, "package.json"), JSON.stringify(stripBundledDeps(pkgData), null, 2));
|
|
9468
9468
|
await copyDirRecursive(distDir, path$1.join(targetDir, "dist"));
|
|
9469
9469
|
await copyExtraFileDirs(pkgData, sourceDir, targetDir);
|
|
9470
9470
|
copyBundledNativeModules(sourceDir, targetDir, this.logger);
|
|
9471
|
-
await fs
|
|
9471
|
+
await fs.promises.writeFile(path$1.join(targetDir, ".install-source"), "local");
|
|
9472
9472
|
const localPkgVersion = asString$1(pkgData.version, "0.0.0");
|
|
9473
9473
|
this.manifest.upsert(packageName, {
|
|
9474
9474
|
version: localPkgVersion,
|
|
@@ -9509,7 +9509,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9509
9509
|
* unusual auth, offline mode, etc).
|
|
9510
9510
|
*/
|
|
9511
9511
|
async installFromNpm(packageName, version) {
|
|
9512
|
-
const tmpDir = fs
|
|
9512
|
+
const tmpDir = fs.mkdtempSync(path$1.join(os$1.tmpdir(), "dominevo-addon-npm-"));
|
|
9513
9513
|
const packageSpec = version ? `${packageName}@${version}` : packageName;
|
|
9514
9514
|
this.logger.info(`${packageName} — installing from npm`);
|
|
9515
9515
|
try {
|
|
@@ -9523,19 +9523,19 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9523
9523
|
];
|
|
9524
9524
|
if (this.registry) args.push("--registry", this.registry);
|
|
9525
9525
|
const { stdout } = await runNpm(args, this.npmRunOptions(tmpDir, 12e4));
|
|
9526
|
-
const tgzFiles = fs
|
|
9526
|
+
const tgzFiles = fs.readdirSync(tmpDir).filter((f) => f.endsWith(".tgz"));
|
|
9527
9527
|
if (tgzFiles.length === 0) throw new Error(`npm pack produced no tgz. stdout: ${stdout.trim()}`);
|
|
9528
9528
|
return path$1.join(tmpDir, tgzFiles[0]);
|
|
9529
9529
|
});
|
|
9530
9530
|
const result = await this.installFromTgz(tgzPath);
|
|
9531
|
-
fs
|
|
9531
|
+
fs.writeFileSync(path$1.join(this.addonsDir, result.name, ".install-source"), "npm");
|
|
9532
9532
|
this.manifest.upsert(result.name, {
|
|
9533
9533
|
version: result.version,
|
|
9534
9534
|
source: "npm"
|
|
9535
9535
|
});
|
|
9536
9536
|
return result;
|
|
9537
9537
|
} finally {
|
|
9538
|
-
fs
|
|
9538
|
+
fs.rmSync(tmpDir, {
|
|
9539
9539
|
recursive: true,
|
|
9540
9540
|
force: true
|
|
9541
9541
|
});
|
|
@@ -9573,7 +9573,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9573
9573
|
if (!tarRes.ok) throw new Error(`tarball GET ${tarballUrl} → ${tarRes.status}`);
|
|
9574
9574
|
const tgzPath = path$1.join(tmpDir, `${packageName.replace(/[/@]/g, "-").replace(/^-+/, "")}-${resolvedVersion}.tgz`);
|
|
9575
9575
|
const buf = Buffer.from(await tarRes.arrayBuffer());
|
|
9576
|
-
fs
|
|
9576
|
+
fs.writeFileSync(tgzPath, buf);
|
|
9577
9577
|
return tgzPath;
|
|
9578
9578
|
}
|
|
9579
9579
|
/**
|
|
@@ -9594,7 +9594,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9594
9594
|
* on the next deploy.
|
|
9595
9595
|
*/
|
|
9596
9596
|
async evictInstallDir(targetDir) {
|
|
9597
|
-
if (!fs
|
|
9597
|
+
if (!fs.existsSync(targetDir)) return;
|
|
9598
9598
|
const graveyard = path$1.join(this.addonsDir, ".evicting");
|
|
9599
9599
|
ensureDir(graveyard);
|
|
9600
9600
|
await this.sweepGraveyard(graveyard);
|
|
@@ -9602,10 +9602,10 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9602
9602
|
const flatName = path$1.relative(this.addonsDir, targetDir).replace(/[/\\]/g, "-");
|
|
9603
9603
|
const asideDir = path$1.join(graveyard, `${flatName}-${ts}`);
|
|
9604
9604
|
try {
|
|
9605
|
-
fs
|
|
9605
|
+
fs.renameSync(targetDir, asideDir);
|
|
9606
9606
|
} catch (renameErr) {
|
|
9607
9607
|
if (renameErr.code === "EXDEV") {
|
|
9608
|
-
await fs
|
|
9608
|
+
await fs.promises.rm(targetDir, {
|
|
9609
9609
|
recursive: true,
|
|
9610
9610
|
force: true
|
|
9611
9611
|
});
|
|
@@ -9613,7 +9613,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9613
9613
|
}
|
|
9614
9614
|
throw renameErr;
|
|
9615
9615
|
}
|
|
9616
|
-
await fs
|
|
9616
|
+
await fs.promises.rm(asideDir, {
|
|
9617
9617
|
recursive: true,
|
|
9618
9618
|
force: true
|
|
9619
9619
|
}).catch((cleanupErr) => {
|
|
@@ -9634,14 +9634,14 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9634
9634
|
async sweepStagingResidue(stagingRoot) {
|
|
9635
9635
|
let names;
|
|
9636
9636
|
try {
|
|
9637
|
-
names = fs
|
|
9637
|
+
names = fs.readdirSync(stagingRoot);
|
|
9638
9638
|
} catch {
|
|
9639
9639
|
return;
|
|
9640
9640
|
}
|
|
9641
9641
|
const now = Date.now();
|
|
9642
9642
|
const ages = [];
|
|
9643
9643
|
for (const name of names) try {
|
|
9644
|
-
const stat = fs
|
|
9644
|
+
const stat = fs.statSync(path$1.join(stagingRoot, name));
|
|
9645
9645
|
ages.push({
|
|
9646
9646
|
name,
|
|
9647
9647
|
ageMs: now - stat.mtimeMs
|
|
@@ -9652,7 +9652,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9652
9652
|
stagingRoot,
|
|
9653
9653
|
entries: sweepable
|
|
9654
9654
|
} });
|
|
9655
|
-
await Promise.all(sweepable.map((name) => fs
|
|
9655
|
+
await Promise.all(sweepable.map((name) => fs.promises.rm(path$1.join(stagingRoot, name), {
|
|
9656
9656
|
recursive: true,
|
|
9657
9657
|
force: true
|
|
9658
9658
|
}).catch(() => void 0)));
|
|
@@ -9661,11 +9661,11 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9661
9661
|
async sweepGraveyard(graveyard) {
|
|
9662
9662
|
let entries;
|
|
9663
9663
|
try {
|
|
9664
|
-
entries = fs
|
|
9664
|
+
entries = fs.readdirSync(graveyard);
|
|
9665
9665
|
} catch {
|
|
9666
9666
|
return;
|
|
9667
9667
|
}
|
|
9668
|
-
await Promise.all(entries.map((name) => fs
|
|
9668
|
+
await Promise.all(entries.map((name) => fs.promises.rm(path$1.join(graveyard, name), {
|
|
9669
9669
|
recursive: true,
|
|
9670
9670
|
force: true
|
|
9671
9671
|
}).catch(() => void 0)));
|
|
@@ -9678,7 +9678,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9678
9678
|
* ONE implementation for every path that materialises an addon tree —
|
|
9679
9679
|
* `installFromTgz` (deploy/upload) and `applyUpdateFromStaged` (OTA). The OTA
|
|
9680
9680
|
* path did not have it, and that is a whole outage class: an addon declaring
|
|
9681
|
-
* `
|
|
9681
|
+
* `dominevo.runtimeDependencies` was broken by its FIRST OTA update, its dist
|
|
9682
9682
|
* landing without `node_modules`. Every load then threw `Cannot find module`
|
|
9683
9683
|
* and the retry loop replayed it — `@dominevo/addon-export-hap`, 126 failed
|
|
9684
9684
|
* load retries over 10.5h on 2026-08-12; `@dominevo/addon-remote-storage`
|
|
@@ -9691,7 +9691,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9691
9691
|
* local additions to a system package silently never reach the deployed
|
|
9692
9692
|
* addon. Addon dists are self-contained besides, so `stripBundledDeps` keeps
|
|
9693
9693
|
* only what the manifest explicitly declares in
|
|
9694
|
-
* `
|
|
9694
|
+
* `dominevo.runtimeDependencies` (see fs-utils / ADR-0027). Nothing left to
|
|
9695
9695
|
* install is the COMMON case: skip npm rather than pay an empty round-trip.
|
|
9696
9696
|
*
|
|
9697
9697
|
* **Failure is FATAL.** This used to warn-and-continue on the tgz path ("the
|
|
@@ -9716,7 +9716,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9716
9716
|
return;
|
|
9717
9717
|
}
|
|
9718
9718
|
const strippedManifest = stripBundledDeps(pkgView.raw);
|
|
9719
|
-
await fs
|
|
9719
|
+
await fs.promises.writeFile(pkgJsonPath, JSON.stringify(strippedManifest, null, 2));
|
|
9720
9720
|
const deps = asJsonObject$1(strippedManifest["dependencies"]);
|
|
9721
9721
|
const depNames = deps ? Object.keys(deps) : [];
|
|
9722
9722
|
if (depNames.length === 0) return;
|
|
@@ -9745,7 +9745,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9745
9745
|
}
|
|
9746
9746
|
/**
|
|
9747
9747
|
* Make `pkgDir`'s NATIVE modules loadable on THIS host, before it is swapped
|
|
9748
|
-
* in: install whatever `
|
|
9748
|
+
* in: install whatever `dominevo.nativeDependencies` declares, then ensure
|
|
9749
9749
|
* every traditional native present in the tree actually carries a compiled
|
|
9750
9750
|
* `.node` for the running ABI.
|
|
9751
9751
|
*
|
|
@@ -9848,19 +9848,19 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9848
9848
|
"-C",
|
|
9849
9849
|
stagingDir
|
|
9850
9850
|
], { timeout: 12e4 });
|
|
9851
|
-
const pkgDir = fs
|
|
9851
|
+
const pkgDir = fs.existsSync(path$1.join(stagingDir, "package", "package.json")) ? path$1.join(stagingDir, "package") : stagingDir;
|
|
9852
9852
|
const pkgJsonPath = path$1.join(pkgDir, "package.json");
|
|
9853
|
-
if (!fs
|
|
9853
|
+
if (!fs.existsSync(pkgJsonPath)) throw new Error("No package.json found in tgz archive");
|
|
9854
9854
|
const pkgView = readPackageJson(pkgJsonPath);
|
|
9855
9855
|
if (!pkgView) throw new Error(`Invalid package.json at ${pkgJsonPath}`);
|
|
9856
|
-
if (!pkgView.
|
|
9856
|
+
if (!pkgView.dominevoAddons) throw new Error(`Package ${pkgView.name} has no dominevo.addons manifest`);
|
|
9857
9857
|
const targetDir = path$1.join(this.addonsDir, pkgView.name);
|
|
9858
9858
|
await this.installRuntimeDependencies(pkgDir, pkgView.name);
|
|
9859
9859
|
await this.installNativeDependencies(pkgDir, pkgView.name);
|
|
9860
9860
|
this.dedupeTreeAgainstClosure(pkgDir, pkgView.name);
|
|
9861
9861
|
await this.evictInstallDir(targetDir);
|
|
9862
9862
|
ensureDir(path$1.dirname(targetDir));
|
|
9863
|
-
await fs
|
|
9863
|
+
await fs.promises.rename(pkgDir, targetDir);
|
|
9864
9864
|
this.manifest.upsert(pkgView.name, {
|
|
9865
9865
|
version: pkgView.version,
|
|
9866
9866
|
source: "bundled"
|
|
@@ -9871,7 +9871,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9871
9871
|
};
|
|
9872
9872
|
} finally {
|
|
9873
9873
|
this.inFlightStaging.delete(stagingName);
|
|
9874
|
-
await fs
|
|
9874
|
+
await fs.promises.rm(stagingDir, {
|
|
9875
9875
|
recursive: true,
|
|
9876
9876
|
force: true
|
|
9877
9877
|
}).catch(() => void 0);
|
|
@@ -9901,24 +9901,24 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9901
9901
|
const current = this.manifest.get(packageName);
|
|
9902
9902
|
if (current == null) throw new Error(`Cannot update ${packageName}: not currently tracked in manifest`);
|
|
9903
9903
|
const addonDir = path$1.join(this.addonsDir, packageName);
|
|
9904
|
-
if (!fs
|
|
9904
|
+
if (!fs.existsSync(addonDir)) throw new Error(`Cannot update ${packageName}: install dir ${addonDir} missing`);
|
|
9905
9905
|
const ts = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
|
|
9906
9906
|
const backupRoot = path$1.join(this.addonsDir, ".backups", packageName);
|
|
9907
9907
|
ensureDir(backupRoot);
|
|
9908
9908
|
const backupDir = path$1.join(backupRoot, ts);
|
|
9909
9909
|
this.logger.info(`${packageName} — backing up v${current.version} → ${backupDir}`);
|
|
9910
|
-
fs
|
|
9910
|
+
fs.renameSync(addonDir, backupDir);
|
|
9911
9911
|
let result;
|
|
9912
9912
|
try {
|
|
9913
9913
|
result = await this.installFromNpm(packageName, version);
|
|
9914
9914
|
} catch (installErr) {
|
|
9915
9915
|
this.logger.error(`${packageName} — install failed, restoring backup`, { meta: { error: errMsg$1(installErr) } });
|
|
9916
9916
|
try {
|
|
9917
|
-
if (fs
|
|
9917
|
+
if (fs.existsSync(addonDir)) fs.rmSync(addonDir, {
|
|
9918
9918
|
recursive: true,
|
|
9919
9919
|
force: true
|
|
9920
9920
|
});
|
|
9921
|
-
fs
|
|
9921
|
+
fs.renameSync(backupDir, addonDir);
|
|
9922
9922
|
this.manifest.upsert(packageName, {
|
|
9923
9923
|
version: current.version,
|
|
9924
9924
|
source: current.source,
|
|
@@ -9954,7 +9954,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9954
9954
|
*
|
|
9955
9955
|
* "Skips npm entirely" is true only of the REGISTRY round-trip: the staged
|
|
9956
9956
|
* tree is the raw unpacked tarball, so the addon's own
|
|
9957
|
-
* `
|
|
9957
|
+
* `dominevo.runtimeDependencies` AND `dominevo.nativeDependencies` still have
|
|
9958
9958
|
* to be installed into it, exactly as `installFromTgz` does. Skipping the
|
|
9959
9959
|
* first broke every runtime-dep addon on its first OTA update; skipping the
|
|
9960
9960
|
* second broke every addon with a native module the same way, one layer down
|
|
@@ -9979,7 +9979,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9979
9979
|
const current = this.manifest.get(packageName);
|
|
9980
9980
|
if (current == null) throw new Error(`Cannot update ${packageName}: not currently tracked in manifest`);
|
|
9981
9981
|
const addonDir = path$1.join(this.addonsDir, packageName);
|
|
9982
|
-
if (!fs
|
|
9982
|
+
if (!fs.existsSync(addonDir)) throw new Error(`Cannot update ${packageName}: install dir ${addonDir} missing`);
|
|
9983
9983
|
await this.installRuntimeDependencies(stagedPath, packageName);
|
|
9984
9984
|
await this.installNativeDependencies(stagedPath, packageName);
|
|
9985
9985
|
this.dedupeTreeAgainstClosure(stagedPath, packageName);
|
|
@@ -9988,14 +9988,14 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9988
9988
|
ensureDir(backupRoot);
|
|
9989
9989
|
const backupDir = path$1.join(backupRoot, ts);
|
|
9990
9990
|
this.logger.info(`${packageName} — backing up v${current.version} → ${backupDir}`);
|
|
9991
|
-
fs
|
|
9991
|
+
fs.renameSync(addonDir, backupDir);
|
|
9992
9992
|
try {
|
|
9993
9993
|
try {
|
|
9994
|
-
fs
|
|
9994
|
+
fs.renameSync(stagedPath, addonDir);
|
|
9995
9995
|
} catch (renameErr) {
|
|
9996
9996
|
if (renameErr.code === "EXDEV") {
|
|
9997
|
-
fs
|
|
9998
|
-
fs
|
|
9997
|
+
fs.cpSync(stagedPath, addonDir, { recursive: true });
|
|
9998
|
+
fs.rmSync(stagedPath, {
|
|
9999
9999
|
recursive: true,
|
|
10000
10000
|
force: true
|
|
10001
10001
|
});
|
|
@@ -10004,11 +10004,11 @@ var AddonInstaller = class AddonInstaller {
|
|
|
10004
10004
|
} catch (swapErr) {
|
|
10005
10005
|
this.logger.error(`${packageName} — staged swap failed, restoring backup`, { meta: { error: errMsg$1(swapErr) } });
|
|
10006
10006
|
try {
|
|
10007
|
-
if (fs
|
|
10007
|
+
if (fs.existsSync(addonDir)) fs.rmSync(addonDir, {
|
|
10008
10008
|
recursive: true,
|
|
10009
10009
|
force: true
|
|
10010
10010
|
});
|
|
10011
|
-
fs
|
|
10011
|
+
fs.renameSync(backupDir, addonDir);
|
|
10012
10012
|
this.manifest.upsert(packageName, {
|
|
10013
10013
|
version: current.version,
|
|
10014
10014
|
source: current.source,
|
|
@@ -10047,20 +10047,20 @@ var AddonInstaller = class AddonInstaller {
|
|
|
10047
10047
|
this.logger.warn(`${packageName} — no backup to rollback to`);
|
|
10048
10048
|
return null;
|
|
10049
10049
|
}
|
|
10050
|
-
if (!fs
|
|
10050
|
+
if (!fs.existsSync(entry.lastBackupDir)) {
|
|
10051
10051
|
this.logger.warn(`${packageName} — backup dir vanished: ${entry.lastBackupDir}`);
|
|
10052
10052
|
return null;
|
|
10053
10053
|
}
|
|
10054
10054
|
const addonDir = path$1.join(this.addonsDir, packageName);
|
|
10055
|
-
if (fs
|
|
10055
|
+
if (fs.existsSync(addonDir)) fs.rmSync(addonDir, {
|
|
10056
10056
|
recursive: true,
|
|
10057
10057
|
force: true
|
|
10058
10058
|
});
|
|
10059
|
-
fs
|
|
10059
|
+
fs.renameSync(entry.lastBackupDir, addonDir);
|
|
10060
10060
|
const pkgJsonPath = path$1.join(addonDir, "package.json");
|
|
10061
10061
|
let restoredVersion = entry.version;
|
|
10062
|
-
if (fs
|
|
10063
|
-
const parsed = JSON.parse(fs
|
|
10062
|
+
if (fs.existsSync(pkgJsonPath)) try {
|
|
10063
|
+
const parsed = JSON.parse(fs.readFileSync(pkgJsonPath, "utf-8"));
|
|
10064
10064
|
if (typeof parsed === "object" && parsed != null) {
|
|
10065
10065
|
const v = parsed.version;
|
|
10066
10066
|
if (typeof v === "string" && v.length > 0) restoredVersion = v;
|
|
@@ -10108,7 +10108,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
10108
10108
|
return false;
|
|
10109
10109
|
}
|
|
10110
10110
|
try {
|
|
10111
|
-
await fs
|
|
10111
|
+
await fs.promises.rm(target, {
|
|
10112
10112
|
recursive: true,
|
|
10113
10113
|
force: true
|
|
10114
10114
|
});
|
|
@@ -10126,7 +10126,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
10126
10126
|
listBackupsFor(packageName) {
|
|
10127
10127
|
const dir = path$1.join(this.backupsRoot, packageName);
|
|
10128
10128
|
try {
|
|
10129
|
-
return fs
|
|
10129
|
+
return fs.readdirSync(dir, { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => path$1.join(dir, e.name)).sort();
|
|
10130
10130
|
} catch {
|
|
10131
10131
|
return [];
|
|
10132
10132
|
}
|
|
@@ -10158,7 +10158,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
10158
10158
|
for (const dir of [pkgDir, path$1.dirname(pkgDir)]) {
|
|
10159
10159
|
if (!this.isInsideBackups(dir)) continue;
|
|
10160
10160
|
try {
|
|
10161
|
-
await fs
|
|
10161
|
+
await fs.promises.rmdir(dir);
|
|
10162
10162
|
} catch {
|
|
10163
10163
|
return;
|
|
10164
10164
|
}
|
|
@@ -10240,7 +10240,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
10240
10240
|
*/
|
|
10241
10241
|
resolveBackupToKeep(packageName, backups) {
|
|
10242
10242
|
const liveDir = path$1.join(this.addonsDir, packageName);
|
|
10243
|
-
if (!fs
|
|
10243
|
+
if (!fs.existsSync(liveDir)) {
|
|
10244
10244
|
const newest = backups[backups.length - 1] ?? null;
|
|
10245
10245
|
if (newest != null) this.logger.warn(`${packageName} — live install dir missing; retaining its newest backup as the only surviving copy`, { meta: {
|
|
10246
10246
|
liveDir,
|
|
@@ -10257,7 +10257,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
10257
10257
|
listBackedUpPackages() {
|
|
10258
10258
|
let entries;
|
|
10259
10259
|
try {
|
|
10260
|
-
entries = fs
|
|
10260
|
+
entries = fs.readdirSync(this.backupsRoot, { withFileTypes: true });
|
|
10261
10261
|
} catch {
|
|
10262
10262
|
return [];
|
|
10263
10263
|
}
|
|
@@ -10269,14 +10269,14 @@ var AddonInstaller = class AddonInstaller {
|
|
|
10269
10269
|
continue;
|
|
10270
10270
|
}
|
|
10271
10271
|
const scopeDir = path$1.join(this.backupsRoot, entry.name);
|
|
10272
|
-
for (const inner of fs
|
|
10272
|
+
for (const inner of fs.readdirSync(scopeDir, { withFileTypes: true })) if (inner.isDirectory()) names.push(`${entry.name}/${inner.name}`);
|
|
10273
10273
|
}
|
|
10274
10274
|
return names;
|
|
10275
10275
|
}
|
|
10276
10276
|
async uninstall(packageName) {
|
|
10277
10277
|
const addonDir = path$1.join(this.addonsDir, packageName);
|
|
10278
|
-
if (fs
|
|
10279
|
-
fs
|
|
10278
|
+
if (fs.existsSync(addonDir)) {
|
|
10279
|
+
fs.rmSync(addonDir, {
|
|
10280
10280
|
recursive: true,
|
|
10281
10281
|
force: true
|
|
10282
10282
|
});
|
|
@@ -10284,8 +10284,8 @@ var AddonInstaller = class AddonInstaller {
|
|
|
10284
10284
|
return;
|
|
10285
10285
|
}
|
|
10286
10286
|
const legacyDir = path$1.join(this.addonsDir, packageName.replace(/^@[^/]+\//, ""));
|
|
10287
|
-
if (fs
|
|
10288
|
-
fs
|
|
10287
|
+
if (fs.existsSync(legacyDir)) {
|
|
10288
|
+
fs.rmSync(legacyDir, {
|
|
10289
10289
|
recursive: true,
|
|
10290
10290
|
force: true
|
|
10291
10291
|
});
|
|
@@ -10293,22 +10293,22 @@ var AddonInstaller = class AddonInstaller {
|
|
|
10293
10293
|
}
|
|
10294
10294
|
}
|
|
10295
10295
|
listInstalled() {
|
|
10296
|
-
if (!fs
|
|
10296
|
+
if (!fs.existsSync(this.addonsDir)) return [];
|
|
10297
10297
|
const packageDirs = [];
|
|
10298
|
-
for (const entry of fs
|
|
10298
|
+
for (const entry of fs.readdirSync(this.addonsDir, { withFileTypes: true })) {
|
|
10299
10299
|
if (!isDirEntry(entry, this.addonsDir)) continue;
|
|
10300
10300
|
if (entry.name.startsWith("@")) {
|
|
10301
10301
|
const scopeDir = path$1.join(this.addonsDir, entry.name);
|
|
10302
|
-
for (const inner of fs
|
|
10302
|
+
for (const inner of fs.readdirSync(scopeDir, { withFileTypes: true })) if (isDirEntry(inner, scopeDir)) packageDirs.push(path$1.join(scopeDir, inner.name));
|
|
10303
10303
|
} else packageDirs.push(path$1.join(this.addonsDir, entry.name));
|
|
10304
10304
|
}
|
|
10305
10305
|
return packageDirs.map((dir) => {
|
|
10306
10306
|
const pkgPath = path$1.join(dir, "package.json");
|
|
10307
|
-
if (!fs
|
|
10307
|
+
if (!fs.existsSync(pkgPath)) return null;
|
|
10308
10308
|
const pkg = readPackageJson(pkgPath);
|
|
10309
|
-
if (!pkg || !pkg.
|
|
10309
|
+
if (!pkg || !pkg.dominevoAddons) return null;
|
|
10310
10310
|
const sourceFile = path$1.join(dir, ".install-source");
|
|
10311
|
-
const installSource = fs
|
|
10311
|
+
const installSource = fs.existsSync(sourceFile) ? parseInstallSource(fs.readFileSync(sourceFile, "utf-8").trim()) : void 0;
|
|
10312
10312
|
return {
|
|
10313
10313
|
name: pkg.name,
|
|
10314
10314
|
version: pkg.version,
|
|
@@ -10318,13 +10318,13 @@ var AddonInstaller = class AddonInstaller {
|
|
|
10318
10318
|
}).filter((item) => item !== null);
|
|
10319
10319
|
}
|
|
10320
10320
|
isInstalled(packageName) {
|
|
10321
|
-
if (fs
|
|
10322
|
-
return fs
|
|
10321
|
+
if (fs.existsSync(path$1.join(this.addonsDir, packageName, "package.json"))) return true;
|
|
10322
|
+
return fs.existsSync(path$1.join(this.addonsDir, packageName.replace(/^@[^/]+\//, ""), "package.json"));
|
|
10323
10323
|
}
|
|
10324
10324
|
getInstalledPackage(packageName) {
|
|
10325
10325
|
let pkgPath = path$1.join(this.addonsDir, packageName, "package.json");
|
|
10326
|
-
if (!fs
|
|
10327
|
-
if (!fs
|
|
10326
|
+
if (!fs.existsSync(pkgPath)) pkgPath = path$1.join(this.addonsDir, packageName.replace(/^@[^/]+\//, ""), "package.json");
|
|
10327
|
+
if (!fs.existsSync(pkgPath)) return null;
|
|
10328
10328
|
const pkg = readPackageJson(pkgPath);
|
|
10329
10329
|
if (!pkg) return null;
|
|
10330
10330
|
return {
|
|
@@ -10343,7 +10343,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
10343
10343
|
]) {
|
|
10344
10344
|
const candidate = path$1.join(this.bundledAddonsDir, dirName);
|
|
10345
10345
|
try {
|
|
10346
|
-
const pkg = asJsonObject$1(parseJsonUnknown(fs
|
|
10346
|
+
const pkg = asJsonObject$1(parseJsonUnknown(fs.readFileSync(path$1.join(candidate, "package.json"), "utf-8")));
|
|
10347
10347
|
if (pkg && asString$1(pkg["name"]) === packageName) return candidate;
|
|
10348
10348
|
} catch {}
|
|
10349
10349
|
}
|
|
@@ -10352,7 +10352,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
10352
10352
|
/** Ensure a package is built (dist/ exists and page bundles present) */
|
|
10353
10353
|
async ensureBuilt(packageName, sourceDir, pkgData) {
|
|
10354
10354
|
const distDir = path$1.join(sourceDir, "dist");
|
|
10355
|
-
if (!(!fs
|
|
10355
|
+
if (!(!fs.existsSync(distDir) || this.isDistIncomplete(pkgData, sourceDir))) return;
|
|
10356
10356
|
this.logger.info(`${packageName} — building (dist/ missing or incomplete)`);
|
|
10357
10357
|
try {
|
|
10358
10358
|
await runNpm(["run", "build"], this.npmRunOptions(sourceDir, 18e4));
|
|
@@ -10363,11 +10363,11 @@ var AddonInstaller = class AddonInstaller {
|
|
|
10363
10363
|
}
|
|
10364
10364
|
/** Check if page bundles declared in package.json are missing from dist/ */
|
|
10365
10365
|
isDistIncomplete(pkgData, sourceDir) {
|
|
10366
|
-
const
|
|
10367
|
-
if (!
|
|
10368
|
-
for (const addon of
|
|
10366
|
+
const dominevo = pkgData["dominevo"];
|
|
10367
|
+
if (!dominevo?.addons) return false;
|
|
10368
|
+
for (const addon of dominevo.addons) {
|
|
10369
10369
|
if (!addon.pages) continue;
|
|
10370
|
-
for (const page of addon.pages) if (page.bundle && !fs
|
|
10370
|
+
for (const page of addon.pages) if (page.bundle && !fs.existsSync(path$1.join(sourceDir, "dist", page.bundle))) return true;
|
|
10371
10371
|
}
|
|
10372
10372
|
return false;
|
|
10373
10373
|
}
|
|
@@ -10376,7 +10376,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
10376
10376
|
function isDirEntry(entry, parentDir) {
|
|
10377
10377
|
if (entry.isDirectory()) return true;
|
|
10378
10378
|
if (entry.isSymbolicLink()) try {
|
|
10379
|
-
return fs
|
|
10379
|
+
return fs.statSync(path$1.join(parentDir, entry.name)).isDirectory();
|
|
10380
10380
|
} catch {
|
|
10381
10381
|
return false;
|
|
10382
10382
|
}
|
|
@@ -10475,7 +10475,7 @@ function selectAddonResidue(candidates) {
|
|
|
10475
10475
|
}
|
|
10476
10476
|
function readDeclaredName(dir) {
|
|
10477
10477
|
try {
|
|
10478
|
-
const parsed = JSON.parse(fs
|
|
10478
|
+
const parsed = JSON.parse(fs.readFileSync(path$1.join(dir, "package.json"), "utf-8"));
|
|
10479
10479
|
if (typeof parsed !== "object" || parsed === null) return null;
|
|
10480
10480
|
const name = parsed.name;
|
|
10481
10481
|
return typeof name === "string" ? name : null;
|
|
@@ -10485,7 +10485,7 @@ function readDeclaredName(dir) {
|
|
|
10485
10485
|
}
|
|
10486
10486
|
function readDeclaredVersion(dir) {
|
|
10487
10487
|
try {
|
|
10488
|
-
const parsed = JSON.parse(fs
|
|
10488
|
+
const parsed = JSON.parse(fs.readFileSync(path$1.join(dir, "package.json"), "utf-8"));
|
|
10489
10489
|
if (typeof parsed !== "object" || parsed === null) return null;
|
|
10490
10490
|
const version = parsed.version;
|
|
10491
10491
|
return typeof version === "string" ? version : null;
|
|
@@ -10495,7 +10495,7 @@ function readDeclaredVersion(dir) {
|
|
|
10495
10495
|
}
|
|
10496
10496
|
function isDirLike(p) {
|
|
10497
10497
|
try {
|
|
10498
|
-
return fs
|
|
10498
|
+
return fs.statSync(p).isDirectory();
|
|
10499
10499
|
} catch {
|
|
10500
10500
|
return false;
|
|
10501
10501
|
}
|
|
@@ -10505,7 +10505,7 @@ function freeQuarantineTarget(store, scope, dirName) {
|
|
|
10505
10505
|
const base = scope === null ? dirName : `${scope.replace("@", "")}__${dirName}`;
|
|
10506
10506
|
let candidate = path$1.join(store, base);
|
|
10507
10507
|
let n = 1;
|
|
10508
|
-
while (fs
|
|
10508
|
+
while (fs.existsSync(candidate)) {
|
|
10509
10509
|
candidate = path$1.join(store, `${base}-${n}`);
|
|
10510
10510
|
n += 1;
|
|
10511
10511
|
}
|
|
@@ -10522,7 +10522,7 @@ function freeQuarantineTarget(store, scope, dirName) {
|
|
|
10522
10522
|
function quarantineAddonResidue(addonsDir, log) {
|
|
10523
10523
|
const quarantined = [];
|
|
10524
10524
|
const failed = [];
|
|
10525
|
-
if (!fs
|
|
10525
|
+
if (!fs.existsSync(addonsDir)) return {
|
|
10526
10526
|
quarantined,
|
|
10527
10527
|
failed
|
|
10528
10528
|
};
|
|
@@ -10530,7 +10530,7 @@ function quarantineAddonResidue(addonsDir, log) {
|
|
|
10530
10530
|
const scan = (parent, scope) => {
|
|
10531
10531
|
let names;
|
|
10532
10532
|
try {
|
|
10533
|
-
names = fs
|
|
10533
|
+
names = fs.readdirSync(parent);
|
|
10534
10534
|
} catch {
|
|
10535
10535
|
return;
|
|
10536
10536
|
}
|
|
@@ -10549,8 +10549,8 @@ function quarantineAddonResidue(addonsDir, log) {
|
|
|
10549
10549
|
const version = readDeclaredVersion(full);
|
|
10550
10550
|
const to = freeQuarantineTarget(store, scope, dirName);
|
|
10551
10551
|
try {
|
|
10552
|
-
fs
|
|
10553
|
-
fs
|
|
10552
|
+
fs.mkdirSync(store, { recursive: true });
|
|
10553
|
+
fs.renameSync(full, to);
|
|
10554
10554
|
} catch (err) {
|
|
10555
10555
|
const error = err instanceof Error ? err.message : String(err);
|
|
10556
10556
|
failed.push({
|
|
@@ -10608,11 +10608,11 @@ function getRestartMarkerPath(dataDir) {
|
|
|
10608
10608
|
* intact or no marker at all (never a half-written file).
|
|
10609
10609
|
*/
|
|
10610
10610
|
function writePendingRestart(dataDir, marker) {
|
|
10611
|
-
fs
|
|
10611
|
+
fs.mkdirSync(dataDir, { recursive: true });
|
|
10612
10612
|
const markerPath = getRestartMarkerPath(dataDir);
|
|
10613
10613
|
const tmpPath = `${markerPath}.tmp`;
|
|
10614
|
-
fs
|
|
10615
|
-
fs
|
|
10614
|
+
fs.writeFileSync(tmpPath, JSON.stringify(marker, null, 2), "utf-8");
|
|
10615
|
+
fs.renameSync(tmpPath, markerPath);
|
|
10616
10616
|
}
|
|
10617
10617
|
/**
|
|
10618
10618
|
* Read + consume the marker. Returns the parsed payload on success and
|
|
@@ -10637,10 +10637,10 @@ function writePendingRestart(dataDir, marker) {
|
|
|
10637
10637
|
*/
|
|
10638
10638
|
function readPendingRestart(dataDir) {
|
|
10639
10639
|
const markerPath = getRestartMarkerPath(dataDir);
|
|
10640
|
-
if (!fs
|
|
10640
|
+
if (!fs.existsSync(markerPath)) return null;
|
|
10641
10641
|
let raw;
|
|
10642
10642
|
try {
|
|
10643
|
-
raw = fs
|
|
10643
|
+
raw = fs.readFileSync(markerPath, "utf-8");
|
|
10644
10644
|
} catch (err) {
|
|
10645
10645
|
console.error("[restart-coordinator] Marker unreadable — leaving in place:", err);
|
|
10646
10646
|
return null;
|
|
@@ -10679,7 +10679,7 @@ function readPendingRestart(dataDir) {
|
|
|
10679
10679
|
/** Remove the marker if present. No-op if missing. */
|
|
10680
10680
|
function clearPendingRestart(dataDir) {
|
|
10681
10681
|
const markerPath = getRestartMarkerPath(dataDir);
|
|
10682
|
-
fs
|
|
10682
|
+
fs.rmSync(markerPath, { force: true });
|
|
10683
10683
|
}
|
|
10684
10684
|
function isRestartKind(value) {
|
|
10685
10685
|
return value === "framework-update" || value === "manual" || value === "system";
|
|
@@ -10688,10 +10688,10 @@ function scheduleSelfRestart(options = {}) {
|
|
|
10688
10688
|
const delayMs = options.delayMs ?? 500;
|
|
10689
10689
|
const exitCode = options.exitCode ?? 0;
|
|
10690
10690
|
setTimeout(() => {
|
|
10691
|
-
const touchTarget = process.env["
|
|
10691
|
+
const touchTarget = process.env["DOMINEVO_RESTART_TOUCH_FILE"];
|
|
10692
10692
|
if (touchTarget !== void 0 && touchTarget.length > 0) try {
|
|
10693
10693
|
const now = /* @__PURE__ */ new Date();
|
|
10694
|
-
fs
|
|
10694
|
+
fs.utimesSync(touchTarget, now, now);
|
|
10695
10695
|
return;
|
|
10696
10696
|
} catch (err) {
|
|
10697
10697
|
console.error("[restart-coordinator] dev touch-reload failed; falling through to process exit:", err);
|
|
@@ -12691,8 +12691,8 @@ function createDoorSettingsView(addonId, door, sections) {
|
|
|
12691
12691
|
}
|
|
12692
12692
|
//#endregion
|
|
12693
12693
|
//#region src/kernel/config-schema.ts
|
|
12694
|
-
/** Default data directory — used when
|
|
12695
|
-
var DEFAULT_DATA_PATH = "
|
|
12694
|
+
/** Default data directory — used when DOMINEVO_DATA env var is not set */
|
|
12695
|
+
var DEFAULT_DATA_PATH = "dominevo-data";
|
|
12696
12696
|
var serverSchema = z.object({
|
|
12697
12697
|
port: z.number().default(4443),
|
|
12698
12698
|
host: z.string().default("0.0.0.0"),
|
|
@@ -12701,7 +12701,7 @@ var serverSchema = z.object({
|
|
|
12701
12701
|
/**
|
|
12702
12702
|
* Bootstrap-time addon configuration. Nothing is read from it: the first-boot
|
|
12703
12703
|
* addon set always comes from the package (the server's own addon-* deps on a
|
|
12704
|
-
* hub, `
|
|
12704
|
+
* hub, `dominevo.agentBootstrapAddons` on an agent). A retired key is stripped.
|
|
12705
12705
|
*/
|
|
12706
12706
|
var bootstrapAddonsSchema = z.object({});
|
|
12707
12707
|
var bootstrapSchema = z.object({
|
|
@@ -12726,9 +12726,9 @@ function isRecord$2(value) {
|
|
|
12726
12726
|
* `settings-store` capability provider.
|
|
12727
12727
|
*/
|
|
12728
12728
|
var ENV_VAR_MAP = {
|
|
12729
|
-
|
|
12730
|
-
|
|
12731
|
-
|
|
12729
|
+
DOMINEVO_PORT: "server.port",
|
|
12730
|
+
DOMINEVO_HOST: "server.host",
|
|
12731
|
+
DOMINEVO_DATA: "server.dataPath"
|
|
12732
12732
|
};
|
|
12733
12733
|
/**
|
|
12734
12734
|
* Built-in defaults with the environment applied — THE bootstrap loader: the
|
|
@@ -13511,11 +13511,11 @@ function deriveAgentListenPort(nodeID) {
|
|
|
13511
13511
|
* falling back to `<name>.localdomain` when `HostName` is unset and DHCP
|
|
13512
13512
|
* advertises `domain=localdomain`) — pin the hostname to loopback (e.g. an
|
|
13513
13513
|
* `/etc/hosts` entry) to neutralise it. Set
|
|
13514
|
-
* `
|
|
13514
|
+
* `DOMINEVO_MOLECULER_USE_HOSTNAME=false` to force IP addressing for
|
|
13515
13515
|
* cross-machine deployments that route by IP rather than DNS name.
|
|
13516
13516
|
*/
|
|
13517
13517
|
function resolveUseHostname() {
|
|
13518
|
-
return process.env["
|
|
13518
|
+
return process.env["DOMINEVO_MOLECULER_USE_HOSTNAME"] !== "false";
|
|
13519
13519
|
}
|
|
13520
13520
|
function createBroker(config) {
|
|
13521
13521
|
const { nodeID, mode, logLevel = "warn", tcpPort = DEFAULT_HUB_TCP_PORT } = config;
|
|
@@ -14004,7 +14004,7 @@ function normalizeCapability(cap) {
|
|
|
14004
14004
|
};
|
|
14005
14005
|
}
|
|
14006
14006
|
/**
|
|
14007
|
-
* Wrap an
|
|
14007
|
+
* Wrap an IDominevoAddon as a Moleculer ServiceSchema.
|
|
14008
14008
|
*
|
|
14009
14009
|
* Methods for each capability are resolved in this order:
|
|
14010
14010
|
* 1. `declaration.capabilities[].methods` from package.json
|
|
@@ -18038,8 +18038,8 @@ var FrameDecoder = class {
|
|
|
18038
18038
|
*/
|
|
18039
18039
|
function localEndpointPath(nodeId) {
|
|
18040
18040
|
const safe = nodeId.replace(/[^a-zA-Z0-9_-]/g, "_");
|
|
18041
|
-
if (process.platform === "win32") return `\\\\.\\pipe\\
|
|
18042
|
-
return join(tmpdir(), `
|
|
18041
|
+
if (process.platform === "win32") return `\\\\.\\pipe\\dominevo-${safe}`;
|
|
18042
|
+
return join(tmpdir(), `dominevo-${safe}.sock`);
|
|
18043
18043
|
}
|
|
18044
18044
|
//#endregion
|
|
18045
18045
|
//#region src/kernel/transport/local-transport.ts
|
|
@@ -18392,7 +18392,7 @@ var UdsLocalTransportClient = class {
|
|
|
18392
18392
|
/**
|
|
18393
18393
|
* The extension seam. UDS is the only shipped implementation; a future
|
|
18394
18394
|
* transport implements `LocalTransportFactory` and is selected here (e.g. via
|
|
18395
|
-
* a `
|
|
18395
|
+
* a `DOMINEVO_LOCAL_TRANSPORT` env) without touching any consumer.
|
|
18396
18396
|
*/
|
|
18397
18397
|
function createLocalTransport() {
|
|
18398
18398
|
return {
|
|
@@ -19328,7 +19328,7 @@ var LocalChildRegistry = class {
|
|
|
19328
19328
|
* (`null`) → always (fail-open, counted by {@link undeclaredChildCount});
|
|
19329
19329
|
* else the child's declared set must match via `matchesPattern` — the SAME
|
|
19330
19330
|
* function the child's own `deliverShared` map-key gate uses, giving provable
|
|
19331
|
-
* delivery parity. The parent always filters: the `
|
|
19331
|
+
* delivery parity. The parent always filters: the `DOMINEVO_UDS_EVENT_FANOUT`
|
|
19332
19332
|
* shadow/broadcast modes were removed on 2026-10-06.
|
|
19333
19333
|
*
|
|
19334
19334
|
* NOTE: this gate must NOT consult `RING_BUFFER_DENY_PATTERNS` /
|
|
@@ -21461,7 +21461,7 @@ async function probeVaapiInit(renderNode) {
|
|
|
21461
21461
|
*/
|
|
21462
21462
|
function safeExistsSync(path) {
|
|
21463
21463
|
try {
|
|
21464
|
-
return fs
|
|
21464
|
+
return fs.existsSync(path);
|
|
21465
21465
|
} catch {
|
|
21466
21466
|
return false;
|
|
21467
21467
|
}
|
|
@@ -21480,11 +21480,11 @@ function probeLinuxGpus() {
|
|
|
21480
21480
|
if (safeExistsSync("/dev/nvidia0") || safeExistsSync("/proc/driver/nvidia/version")) signals.hasNvidiaGpu = true;
|
|
21481
21481
|
try {
|
|
21482
21482
|
const drmDir = "/sys/class/drm";
|
|
21483
|
-
if (fs
|
|
21483
|
+
if (fs.existsSync(drmDir)) for (const entry of fs.readdirSync(drmDir)) {
|
|
21484
21484
|
if (!entry.startsWith("card")) continue;
|
|
21485
21485
|
const vendorPath = `${drmDir}/${entry}/device/vendor`;
|
|
21486
21486
|
if (!safeExistsSync(vendorPath)) continue;
|
|
21487
|
-
const vendor = fs
|
|
21487
|
+
const vendor = fs.readFileSync(vendorPath, "utf8").trim().toLowerCase();
|
|
21488
21488
|
if (vendor === "0x10de") signals.hasNvidiaGpu = true;
|
|
21489
21489
|
else if (vendor === "0x1002") signals.hasAmdGpu = true;
|
|
21490
21490
|
else if (vendor === "0x8086") signals.hasIntelGpu = true;
|
|
@@ -21682,7 +21682,7 @@ function createKernelInferenceEngine() {
|
|
|
21682
21682
|
* in 2026-05 specifically to break that cycle.
|
|
21683
21683
|
*
|
|
21684
21684
|
* Shared per-node store (2026-06): base binaries (Python, ffmpeg, downloaded
|
|
21685
|
-
* tools) are resolved into the NODE data dir (`
|
|
21685
|
+
* tools) are resolved into the NODE data dir (`DOMINEVO_DATA`), not the
|
|
21686
21686
|
* per-addon dir. Every addon on a node reuses one copy instead of downloading
|
|
21687
21687
|
* its own. Because addons run as separate processes that now share one deps
|
|
21688
21688
|
* dir, resolution is guarded by a single-flight (in-process promise cache +
|
|
@@ -21691,7 +21691,7 @@ function createKernelInferenceEngine() {
|
|
|
21691
21691
|
*/
|
|
21692
21692
|
/** Resolve the node-wide data root (shared by all addon processes on a node). */
|
|
21693
21693
|
function resolveNodeRoot() {
|
|
21694
|
-
return process.env["
|
|
21694
|
+
return process.env["DOMINEVO_DATA"] ?? process.env["DOMINEVO_DATA_DIR"] ?? "dominevo-data";
|
|
21695
21695
|
}
|
|
21696
21696
|
var inFlight = /* @__PURE__ */ new Map();
|
|
21697
21697
|
var LOCK_STALE_MS = 10 * 6e4;
|
|
@@ -21707,21 +21707,21 @@ function sleep$1(ms) {
|
|
|
21707
21707
|
* crashed holder) is stolen.
|
|
21708
21708
|
*/
|
|
21709
21709
|
async function withFileLock(lockPath, fn) {
|
|
21710
|
-
fs
|
|
21710
|
+
fs.mkdirSync(join(lockPath, ".."), { recursive: true });
|
|
21711
21711
|
for (;;) try {
|
|
21712
|
-
const fd = fs
|
|
21713
|
-
fs
|
|
21712
|
+
const fd = fs.openSync(lockPath, "wx");
|
|
21713
|
+
fs.closeSync(fd);
|
|
21714
21714
|
break;
|
|
21715
21715
|
} catch {
|
|
21716
21716
|
try {
|
|
21717
|
-
if (Date.now() - fs
|
|
21717
|
+
if (Date.now() - fs.statSync(lockPath).mtimeMs > LOCK_STALE_MS) fs.rmSync(lockPath, { force: true });
|
|
21718
21718
|
else await sleep$1(LOCK_POLL_MS);
|
|
21719
21719
|
} catch {}
|
|
21720
21720
|
}
|
|
21721
21721
|
try {
|
|
21722
21722
|
return await fn();
|
|
21723
21723
|
} finally {
|
|
21724
|
-
fs
|
|
21724
|
+
fs.rmSync(lockPath, { force: true });
|
|
21725
21725
|
}
|
|
21726
21726
|
}
|
|
21727
21727
|
/** Coalesce in-process + serialize cross-process for one binary id. */
|
|
@@ -21772,14 +21772,14 @@ var AddonDepsManager = class {
|
|
|
21772
21772
|
}
|
|
21773
21773
|
/**
|
|
21774
21774
|
* The native library a requirements file says its packages need
|
|
21775
|
-
* (`#
|
|
21775
|
+
* (`# dominevo-native-dep: edgetpu-delegate`), staged under this node's
|
|
21776
21776
|
* deps dir. Runs on every call — not only the first pip install — so a
|
|
21777
21777
|
* node whose pip marker predates the line still gets the library. A
|
|
21778
21778
|
* platform without a build answers `unavailable` (logged, not thrown); a
|
|
21779
21779
|
* failed or tampered download throws, and provisioning reports it.
|
|
21780
21780
|
*/
|
|
21781
21781
|
async stageNativeDepsDeclaredBy(requirementsFile) {
|
|
21782
|
-
if (!declaresEdgetpuDelegate(fs
|
|
21782
|
+
if (!declaresEdgetpuDelegate(fs.readFileSync(requirementsFile, "utf8"))) return;
|
|
21783
21783
|
await singleFlight(this.depsDir, "edgetpu-delegate", () => ensureEdgetpuDelegate(this.nodeRoot, this.logger));
|
|
21784
21784
|
}
|
|
21785
21785
|
getDepsDir() {
|
|
@@ -21793,12 +21793,12 @@ function asBrokerLike(broker) {
|
|
|
21793
21793
|
return broker;
|
|
21794
21794
|
}
|
|
21795
21795
|
/**
|
|
21796
|
-
* Topic prefix for clustered EventBus broadcasts. The `
|
|
21796
|
+
* Topic prefix for clustered EventBus broadcasts. The `dominevo.evt.`
|
|
21797
21797
|
* namespace keeps our events disjoint from Moleculer internal events
|
|
21798
21798
|
* (`$node.*`, `$services.*`) — the `$event-bus` service's
|
|
21799
|
-
* `
|
|
21799
|
+
* `dominevo.evt.**` wildcard handler therefore never sees them.
|
|
21800
21800
|
*/
|
|
21801
|
-
var EVENT_TOPIC_PREFIX = "
|
|
21801
|
+
var EVENT_TOPIC_PREFIX = "dominevo.evt.";
|
|
21802
21802
|
/** Moleculer event-name wildcard the `$event-bus` service subscribes to. */
|
|
21803
21803
|
var EVENT_TOPIC_WILDCARD = `${EVENT_TOPIC_PREFIX}**`;
|
|
21804
21804
|
/** Build the Moleculer broadcast topic for an event category. */
|
|
@@ -22014,8 +22014,8 @@ function acceptInboundCrossNode(broker, category) {
|
|
|
22014
22014
|
* a post-start `createService` propagates via the ~10s heartbeat and
|
|
22015
22015
|
* makes cross-node delivery unreliable in the meantime.
|
|
22016
22016
|
*
|
|
22017
|
-
* The service's single wildcard handler (`
|
|
22018
|
-
* inbound bridge: every `broker.broadcast('
|
|
22017
|
+
* The service's single wildcard handler (`dominevo.evt.**`) is the
|
|
22018
|
+
* inbound bridge: every `broker.broadcast('dominevo.evt.<cat>', event)`
|
|
22019
22019
|
* from any node lands here. Self-origin echoes are dropped (the
|
|
22020
22020
|
* emitting node already delivered synchronously in `emit`).
|
|
22021
22021
|
*
|
|
@@ -22679,10 +22679,10 @@ function runtimeNodeId(runtime) {
|
|
|
22679
22679
|
return runtime.mode === "broker" ? asBrokerLike(runtime.broker).nodeID : runtime.nodeId;
|
|
22680
22680
|
}
|
|
22681
22681
|
/**
|
|
22682
|
-
* Adapt a Moleculer ServiceBroker to the
|
|
22682
|
+
* Adapt a Moleculer ServiceBroker to the dominevo-types `IClusterBroker`
|
|
22683
22683
|
* structural interface so addons can consume cluster-level RPC without
|
|
22684
22684
|
* pulling a moleculer dependency. Method signatures differ slightly
|
|
22685
|
-
* (Moleculer's overloads are wider than the
|
|
22685
|
+
* (Moleculer's overloads are wider than the dominevo contract), so we
|
|
22686
22686
|
* forward through a thin object instead of casting at the boundary.
|
|
22687
22687
|
*/
|
|
22688
22688
|
function adaptBrokerToCluster(broker) {
|
|
@@ -22808,9 +22808,9 @@ async function createUdsAddonContext(client, nodeId, declaration, dataDir, optio
|
|
|
22808
22808
|
async function buildAddonContext(runtime, declaration, dataDir, options) {
|
|
22809
22809
|
const nodeId = runtimeNodeId(runtime);
|
|
22810
22810
|
const addonId = declaration.id;
|
|
22811
|
-
const nodeDataDir = process.env["
|
|
22811
|
+
const nodeDataDir = process.env["DOMINEVO_DATA"] ?? dataDir;
|
|
22812
22812
|
const addonDataDir = path$1.resolve(nodeDataDir, "addons-data", addonId);
|
|
22813
|
-
fs
|
|
22813
|
+
fs.mkdirSync(addonDataDir, { recursive: true });
|
|
22814
22814
|
if (runtime.mode === "broker") ensureBindingSubscription(runtime.broker);
|
|
22815
22815
|
const regs = getRegistries(nodeId);
|
|
22816
22816
|
const workerResolver = {
|
|
@@ -23717,7 +23717,7 @@ function createMeshAccessMiddleware(options) {
|
|
|
23717
23717
|
});
|
|
23718
23718
|
};
|
|
23719
23719
|
return {
|
|
23720
|
-
name: "
|
|
23720
|
+
name: "DominevoMeshAccess",
|
|
23721
23721
|
localAction(next, action) {
|
|
23722
23722
|
const name = action.name ?? "";
|
|
23723
23723
|
return function meshGatedAction(ctx) {
|
|
@@ -23783,7 +23783,7 @@ function createAgentEventScope(opts) {
|
|
|
23783
23783
|
};
|
|
23784
23784
|
return {
|
|
23785
23785
|
middleware: {
|
|
23786
|
-
name: "
|
|
23786
|
+
name: "DominevoAgentEventScope",
|
|
23787
23787
|
transitPublish: gate
|
|
23788
23788
|
},
|
|
23789
23789
|
stats: () => ({
|
|
@@ -23888,7 +23888,7 @@ function localSupportedPythonRuntimes() {
|
|
|
23888
23888
|
//#region src/kernel/deps/manifest-python-deps.ts
|
|
23889
23889
|
/**
|
|
23890
23890
|
* Auto-install the pip requirements file declared in an addon's manifest
|
|
23891
|
-
* (`
|
|
23891
|
+
* (`dominevo.addons[].python.requirements`) into the embedded portable
|
|
23892
23892
|
* Python before `onInitialize()` runs.
|
|
23893
23893
|
*
|
|
23894
23894
|
* Idempotent: `installPythonRequirements` skips when the file's content
|
|
@@ -23936,7 +23936,7 @@ function packageIsAllowlisted(manager, packageName) {
|
|
|
23936
23936
|
* Who is allowed to run the package manager for this request.
|
|
23937
23937
|
*
|
|
23938
23938
|
* Apt/apk/dnf need root. In the Dominevo container that is the
|
|
23939
|
-
* `
|
|
23939
|
+
* `dominevo-pkgd` helper, not the runner and not hub-main (both uid
|
|
23940
23940
|
* 1001). Brew is owned by the logged-in user, so it stays in-process.
|
|
23941
23941
|
*/
|
|
23942
23942
|
function decidePackageInstall(input) {
|
|
@@ -23952,7 +23952,7 @@ function decidePackageInstall(input) {
|
|
|
23952
23952
|
return { kind: "helper" };
|
|
23953
23953
|
}
|
|
23954
23954
|
function pkgdSocketPath() {
|
|
23955
|
-
return process.env["
|
|
23955
|
+
return process.env["DOMINEVO_PKGD_SOCKET"] ?? "/run/dominevo/pkgd.sock";
|
|
23956
23956
|
}
|
|
23957
23957
|
function privilegedHelperAvailable(socketPath = pkgdSocketPath()) {
|
|
23958
23958
|
return existsSync(socketPath);
|
|
@@ -24021,10 +24021,10 @@ function requestPrivilegedInstall(req, socketPath = pkgdSocketPath(), timeoutMs
|
|
|
24021
24021
|
//#region src/kernel/deps/manifest-system-deps.ts
|
|
24022
24022
|
/**
|
|
24023
24023
|
* Auto-install the host binaries declared in an addon's manifest
|
|
24024
|
-
* (`
|
|
24024
|
+
* (`dominevo.addons[].systemDependencies`) before `onInitialize()` runs.
|
|
24025
24025
|
*
|
|
24026
24026
|
* ── Why this is framework and not addon-local ──────────────────────────────
|
|
24027
|
-
* The Python precedent (`
|
|
24027
|
+
* The Python precedent (`dominevo.addons[].python.requirements` →
|
|
24028
24028
|
* `installManifestPythonDeps`, called from the same place in
|
|
24029
24029
|
* `addon-runner.ts`) already answers "this addon needs something installed,
|
|
24030
24030
|
* satisfy it before its caps register". A binary is the same question with a
|
|
@@ -24050,7 +24050,7 @@ function requestPrivilegedInstall(req, socketPath = pkgdSocketPath(), timeoutMs
|
|
|
24050
24050
|
* "installed".
|
|
24051
24051
|
* 5. **Apt is not the runner's.** Distro package managers need root. The
|
|
24052
24052
|
* runner and hub-main are uid 1001 (`gosu` in the entrypoint). Apt/apk/dnf
|
|
24053
|
-
* go through `
|
|
24053
|
+
* go through `dominevo-pkgd` (allowlisted). Brew stays in-process.
|
|
24054
24054
|
*
|
|
24055
24055
|
* Every branch that declines to install SAYS SO. A dependency step that
|
|
24056
24056
|
* produced no line at all is indistinguishable from one that never ran, and
|
|
@@ -24528,7 +24528,7 @@ var AddonHealthMonitor = class {
|
|
|
24528
24528
|
* The operator alert for an addon that RUNS below the version the server needs.
|
|
24529
24529
|
*
|
|
24530
24530
|
* An addon whose installed package is under the running server's minimum
|
|
24531
|
-
* (`
|
|
24531
|
+
* (`dominevo.requires.addons`, or its own `requires.server`) is always started:
|
|
24532
24532
|
* a held-back addon is invisible and silently loses its function, and the
|
|
24533
24533
|
* `CrashSupervisor` (D6) already bounds a crash loop. What the operator needs is
|
|
24534
24534
|
* to SEE it, so this tracker turns the gate's verdict into one alert pair on the
|
|
@@ -24787,7 +24787,7 @@ var FailedRunnerRetryLedger = class {
|
|
|
24787
24787
|
function readRunnerPackageVersions(addonDirs) {
|
|
24788
24788
|
const out = {};
|
|
24789
24789
|
for (const dir of addonDirs) try {
|
|
24790
|
-
const raw = JSON.parse(fs
|
|
24790
|
+
const raw = JSON.parse(fs.readFileSync(path$1.join(dir, "package.json"), "utf-8"));
|
|
24791
24791
|
const version = typeof raw === "object" && raw !== null ? Reflect.get(raw, "version") : null;
|
|
24792
24792
|
out[dir] = typeof version === "string" && version.length > 0 ? version : null;
|
|
24793
24793
|
} catch {
|
|
@@ -24835,7 +24835,7 @@ function mbInRange(value, range) {
|
|
|
24835
24835
|
}
|
|
24836
24836
|
/**
|
|
24837
24837
|
* Resolve the declared heap profile + old-space ceiling for one addon by reading its package.json
|
|
24838
|
-
* manifest (`
|
|
24838
|
+
* manifest (`dominevo.addons[].execution.{heapProfile,maxOldSpaceMb}`). `addonDir` points at the
|
|
24839
24839
|
* addon's built `dist`, so the manifest is one level up; we also try `addonDir` itself for layouts
|
|
24840
24840
|
* where it IS the package root.
|
|
24841
24841
|
* Result is cached per (dir,id) — spawns are infrequent but a runner may re-spawn on crash/restart.
|
|
@@ -24848,7 +24848,7 @@ function readAddonHeapDeclaration(spec) {
|
|
|
24848
24848
|
if (cached !== void 0) return cached;
|
|
24849
24849
|
let declaration = EMPTY_HEAP_DECLARATION;
|
|
24850
24850
|
for (const manifestPath of [path$1.join(spec.addonDir, "package.json"), path$1.join(path$1.dirname(spec.addonDir), "package.json")]) try {
|
|
24851
|
-
const raw = fs
|
|
24851
|
+
const raw = fs.readFileSync(manifestPath, "utf8");
|
|
24852
24852
|
const parsed = JSON.parse(raw);
|
|
24853
24853
|
const profile = extractHeapProfile(parsed, spec.addonId);
|
|
24854
24854
|
const maxOldSpaceMb = extractMaxOldSpaceMb(parsed, spec.addonId);
|
|
@@ -24910,9 +24910,9 @@ function extractInitialOldSpaceMb(parsed, addonId) {
|
|
|
24910
24910
|
}
|
|
24911
24911
|
function readManifestAddons(parsed) {
|
|
24912
24912
|
if (typeof parsed !== "object" || parsed === null) return [];
|
|
24913
|
-
const
|
|
24914
|
-
if (typeof
|
|
24915
|
-
const addons =
|
|
24913
|
+
const dominevo = parsed.dominevo;
|
|
24914
|
+
if (typeof dominevo !== "object" || dominevo === null) return [];
|
|
24915
|
+
const addons = dominevo.addons;
|
|
24916
24916
|
return Array.isArray(addons) ? addons : [];
|
|
24917
24917
|
}
|
|
24918
24918
|
/**
|
|
@@ -25021,7 +25021,7 @@ function runnerRssBudgetMb(addons) {
|
|
|
25021
25021
|
* `initialOldSpaceMb` (`--initial-old-space-size`, clamped to the ceiling) — each the MAXIMUM
|
|
25022
25022
|
* across a runner's co-located addons. Shipped for `stream-broker` alone (8 / 512): with the
|
|
25023
25023
|
* heavy class default the hub's broker ran ~166 major GCs a minute and not one scavenge, at
|
|
25024
|
-
* 45–60 % of a core. The environment overrides and the `
|
|
25024
|
+
* 45–60 % of a core. The environment overrides and the `DOMINEVO_RUNNER_HEAP_TUNING=off` kill
|
|
25025
25025
|
* switch were removed on 2026-10-06 — nothing had set them since the rollout. The flags must
|
|
25026
25026
|
* be on the spawn command line: `v8.setFlagsFromString` at runtime changes neither space.
|
|
25027
25027
|
*/
|
|
@@ -25066,7 +25066,7 @@ function runnerInitialOldSpaceMb(addons) {
|
|
|
25066
25066
|
* Resolve the native-allocator env for a child runner from the parent's env.
|
|
25067
25067
|
*
|
|
25068
25068
|
* Precedence, highest first:
|
|
25069
|
-
* 1. `
|
|
25069
|
+
* 1. `DOMINEVO_RUNNER_NATIVE_ALLOCATOR=off` — kill switch, returns nothing and
|
|
25070
25070
|
* restores the glibc/sharp defaults. Recoverable without a rebuild.
|
|
25071
25071
|
* 2. A value the operator already put in the environment (`MALLOC_ARENA_MAX`,
|
|
25072
25072
|
* `VIPS_CONCURRENCY`) — inherited verbatim, never overwritten.
|
|
@@ -25074,7 +25074,7 @@ function runnerInitialOldSpaceMb(addons) {
|
|
|
25074
25074
|
*/
|
|
25075
25075
|
function runnerNativeAllocatorEnv(parentEnv, platform = process.platform) {
|
|
25076
25076
|
if (platform !== "linux") return {};
|
|
25077
|
-
if (parentEnv["
|
|
25077
|
+
if (parentEnv["DOMINEVO_RUNNER_NATIVE_ALLOCATOR"] === "off") return {};
|
|
25078
25078
|
return {
|
|
25079
25079
|
MALLOC_ARENA_MAX: parentEnv["MALLOC_ARENA_MAX"] ?? String(2),
|
|
25080
25080
|
VIPS_CONCURRENCY: parentEnv["VIPS_CONCURRENCY"] ?? String(1)
|
|
@@ -25090,7 +25090,7 @@ function runnerNativeAllocatorEnv(parentEnv, platform = process.platform) {
|
|
|
25090
25090
|
* INHERITS them, and a kill switch that only omits is a kill switch that does
|
|
25091
25091
|
* nothing.
|
|
25092
25092
|
*
|
|
25093
|
-
* So `
|
|
25093
|
+
* So `DOMINEVO_RUNNER_NATIVE_ALLOCATOR=off` DELETES. And only that: the
|
|
25094
25094
|
* non-linux path returns nothing to add for its own reasons (the pin is a pure
|
|
25095
25095
|
* throughput cut there — measured `sharp.concurrency()` 6 on the darwin agent
|
|
25096
25096
|
* against 1 on the linux hub) and must not be read as "remove what the operator
|
|
@@ -25098,7 +25098,7 @@ function runnerNativeAllocatorEnv(parentEnv, platform = process.platform) {
|
|
|
25098
25098
|
*/
|
|
25099
25099
|
function applyRunnerNativeAllocator(parentEnv, platform = process.platform) {
|
|
25100
25100
|
const next = { ...parentEnv };
|
|
25101
|
-
if (parentEnv["
|
|
25101
|
+
if (parentEnv["DOMINEVO_RUNNER_NATIVE_ALLOCATOR"] === "off") {
|
|
25102
25102
|
delete next["MALLOC_ARENA_MAX"];
|
|
25103
25103
|
delete next["VIPS_CONCURRENCY"];
|
|
25104
25104
|
return next;
|
|
@@ -25556,8 +25556,8 @@ function createProcessService(parentNodeId, dataDir, deps, parentTcpPort, parent
|
|
|
25556
25556
|
* Replaces the former `spawnProcess` (single-addon → `process-runner.js`)
|
|
25557
25557
|
* and `spawnGroupProcess` (group → `group-runner.js`) — both paths
|
|
25558
25558
|
* differed only in the runner bundle and the env shape. `addon-runner`
|
|
25559
|
-
* takes ONE env contract (`
|
|
25560
|
-
* `
|
|
25559
|
+
* takes ONE env contract (`DOMINEVO_RUNNER_ID` + a JSON
|
|
25560
|
+
* `DOMINEVO_RUNNER_ADDONS` array), so this single spawner serves both.
|
|
25561
25561
|
*
|
|
25562
25562
|
* The D6 crash circuit-breaker governs respawns: an unexpected exit
|
|
25563
25563
|
* is respawned with exponential backoff (capped at `MAX_BACKOFF_MS`,
|
|
@@ -25576,14 +25576,14 @@ function createProcessService(parentNodeId, dataDir, deps, parentTcpPort, parent
|
|
|
25576
25576
|
const rssBudgetMb = runnerRssBudgetMb(addons);
|
|
25577
25577
|
const childEnv = {
|
|
25578
25578
|
...process.env,
|
|
25579
|
-
|
|
25580
|
-
|
|
25581
|
-
|
|
25582
|
-
|
|
25583
|
-
|
|
25584
|
-
|
|
25585
|
-
...parentTcpPort !== void 0 ? {
|
|
25586
|
-
...parentUdsPath !== void 0 ? {
|
|
25579
|
+
DOMINEVO_RUNNER_ID: runnerId,
|
|
25580
|
+
DOMINEVO_RUNNER_ADDONS: JSON.stringify(addons),
|
|
25581
|
+
DOMINEVO_PARENT_NODE_ID: parentNodeId,
|
|
25582
|
+
DOMINEVO_DATA_DIR: dataDir,
|
|
25583
|
+
DOMINEVO_RUNNER_HEAP_PROFILE: heavy ? "heavy" : "light",
|
|
25584
|
+
DOMINEVO_LOG_LEVEL: process.env["DOMINEVO_LOG_LEVEL"] ?? "info",
|
|
25585
|
+
...parentTcpPort !== void 0 ? { DOMINEVO_PARENT_TCP_PORT: String(parentTcpPort) } : {},
|
|
25586
|
+
...parentUdsPath !== void 0 ? { DOMINEVO_PARENT_UDS_PATH: parentUdsPath } : {},
|
|
25587
25587
|
...applyRunnerNativeAllocator(process.env),
|
|
25588
25588
|
...env
|
|
25589
25589
|
};
|
|
@@ -26128,17 +26128,17 @@ var JobJournal = class {
|
|
|
26128
26128
|
return path$1.join(this.jobsDir, `${id}.json`);
|
|
26129
26129
|
}
|
|
26130
26130
|
writeAtomic(filePath, data) {
|
|
26131
|
-
fs
|
|
26131
|
+
fs.mkdirSync(path$1.dirname(filePath), { recursive: true });
|
|
26132
26132
|
const tmp = `${filePath}.tmp.${process.pid}.${Date.now()}`;
|
|
26133
|
-
fs
|
|
26133
|
+
fs.writeFileSync(tmp, JSON.stringify(data, null, 2), {
|
|
26134
26134
|
encoding: "utf-8",
|
|
26135
26135
|
mode: 384
|
|
26136
26136
|
});
|
|
26137
|
-
fs
|
|
26137
|
+
fs.renameSync(tmp, filePath);
|
|
26138
26138
|
}
|
|
26139
26139
|
readIndex() {
|
|
26140
26140
|
try {
|
|
26141
|
-
const raw = JSON.parse(fs
|
|
26141
|
+
const raw = JSON.parse(fs.readFileSync(this.indexPath, "utf-8"));
|
|
26142
26142
|
if (raw && Array.isArray(raw.jobIds)) return {
|
|
26143
26143
|
version: 1,
|
|
26144
26144
|
jobIds: raw.jobIds
|
|
@@ -26163,7 +26163,7 @@ var JobJournal = class {
|
|
|
26163
26163
|
}
|
|
26164
26164
|
getJob(id) {
|
|
26165
26165
|
try {
|
|
26166
|
-
const parsed = lifecycleJobSchema.safeParse(JSON.parse(fs
|
|
26166
|
+
const parsed = lifecycleJobSchema.safeParse(JSON.parse(fs.readFileSync(this.jobPath(id), "utf-8")));
|
|
26167
26167
|
return parsed.success ? parsed.data : null;
|
|
26168
26168
|
} catch {
|
|
26169
26169
|
return null;
|
|
@@ -26228,14 +26228,14 @@ var StagingArea = class {
|
|
|
26228
26228
|
}
|
|
26229
26229
|
async fetchAndStage(input) {
|
|
26230
26230
|
const destDir = path$1.join(this.stagingDir, input.jobId, safeSegment(input.name));
|
|
26231
|
-
fs
|
|
26231
|
+
fs.rmSync(destDir, {
|
|
26232
26232
|
recursive: true,
|
|
26233
26233
|
force: true
|
|
26234
26234
|
});
|
|
26235
26235
|
const tgz = await this.deps.fetchTarball(input.name, input.version, input.signal);
|
|
26236
26236
|
if (input.signal.aborted) throw new Error("staging aborted after fetch");
|
|
26237
26237
|
await this.deps.extract(tgz, destDir);
|
|
26238
|
-
const raw = JSON.parse(fs
|
|
26238
|
+
const raw = JSON.parse(fs.readFileSync(path$1.join(destDir, "package.json"), "utf-8"));
|
|
26239
26239
|
if (typeof raw.version !== "string" || raw.version.length === 0) throw new Error(`staging validation failed: ${input.name} staged a package.json with no version`);
|
|
26240
26240
|
if (EXACT_SEMVER.test(input.version) && raw.version !== input.version) throw new Error(`staging validation failed: ${input.name} expected version ${input.version}, got ${raw.version}`);
|
|
26241
26241
|
return {
|
|
@@ -26244,7 +26244,7 @@ var StagingArea = class {
|
|
|
26244
26244
|
};
|
|
26245
26245
|
}
|
|
26246
26246
|
cleanup(jobId) {
|
|
26247
|
-
fs
|
|
26247
|
+
fs.rmSync(path$1.join(this.stagingDir, jobId), {
|
|
26248
26248
|
recursive: true,
|
|
26249
26249
|
force: true
|
|
26250
26250
|
});
|
|
@@ -26259,13 +26259,13 @@ var StagingArea = class {
|
|
|
26259
26259
|
sweepOrphans() {
|
|
26260
26260
|
let entries;
|
|
26261
26261
|
try {
|
|
26262
|
-
entries = fs
|
|
26262
|
+
entries = fs.readdirSync(this.stagingDir);
|
|
26263
26263
|
} catch {
|
|
26264
26264
|
return 0;
|
|
26265
26265
|
}
|
|
26266
26266
|
let removed = 0;
|
|
26267
26267
|
for (const name of entries) try {
|
|
26268
|
-
fs
|
|
26268
|
+
fs.rmSync(path$1.join(this.stagingDir, name), {
|
|
26269
26269
|
recursive: true,
|
|
26270
26270
|
force: true
|
|
26271
26271
|
});
|
|
@@ -26443,7 +26443,7 @@ var LifecycleJobEngine = class {
|
|
|
26443
26443
|
* on failure → `failed`.
|
|
26444
26444
|
*/
|
|
26445
26445
|
async reconcileJob(job) {
|
|
26446
|
-
const exists = this.deps.stagedPathExists ?? ((p) => fs
|
|
26446
|
+
const exists = this.deps.stagedPathExists ?? ((p) => fs.existsSync(p));
|
|
26447
26447
|
for (const task of job.tasks) {
|
|
26448
26448
|
if (task.target === "framework") {
|
|
26449
26449
|
if (!this.isTerminal(task.phase)) this.skipFrameworkTask(job, task);
|
|
@@ -26703,11 +26703,11 @@ var en_default = {
|
|
|
26703
26703
|
"global.s_system-config-server.description": "The name of this server, and its connection settings (read-only, set by the environment).",
|
|
26704
26704
|
"global.s_system-config-server.server-restart-note.label": "Restart required",
|
|
26705
26705
|
"global.s_system-config-server.port.label": "Port",
|
|
26706
|
-
"global.s_system-config-server.port.description": "Listening port (
|
|
26706
|
+
"global.s_system-config-server.port.description": "Listening port (DOMINEVO_PORT)",
|
|
26707
26707
|
"global.s_system-config-server.host.label": "Host",
|
|
26708
|
-
"global.s_system-config-server.host.description": "Bind address (
|
|
26708
|
+
"global.s_system-config-server.host.description": "Bind address (DOMINEVO_HOST)",
|
|
26709
26709
|
"global.s_system-config-server.dataPath.label": "Data Path",
|
|
26710
|
-
"global.s_system-config-server.dataPath.description": "Root data directory (
|
|
26710
|
+
"global.s_system-config-server.dataPath.description": "Root data directory (DOMINEVO_DATA)",
|
|
26711
26711
|
"global.s_system-config-auth.description": "Token and session settings.",
|
|
26712
26712
|
"global.s_system-config-auth.tokenExpiry.label": "Session lifetime",
|
|
26713
26713
|
"global.s_system-config-auth.tokenExpiry.description": "How long a sign-in lasts without being used, as a duration string (e.g. 7d, 30d). Every refresh starts it again, so a device in use stays signed in; one left unopened this long must sign in again. A bare number is rejected — it would be read as milliseconds. Applies from the next sign-in or refresh.",
|
|
@@ -26979,11 +26979,11 @@ var it_default = {
|
|
|
26979
26979
|
"global.s_system-config-server.description": "Il nome di questo server e le sue impostazioni di connessione (sola lettura, impostate dall'ambiente).",
|
|
26980
26980
|
"global.s_system-config-server.server-restart-note.label": "Riavvio necessario",
|
|
26981
26981
|
"global.s_system-config-server.port.label": "Porta",
|
|
26982
|
-
"global.s_system-config-server.port.description": "Porta di ascolto (
|
|
26982
|
+
"global.s_system-config-server.port.description": "Porta di ascolto (DOMINEVO_PORT)",
|
|
26983
26983
|
"global.s_system-config-server.host.label": "Host",
|
|
26984
|
-
"global.s_system-config-server.host.description": "Indirizzo di bind (
|
|
26984
|
+
"global.s_system-config-server.host.description": "Indirizzo di bind (DOMINEVO_HOST)",
|
|
26985
26985
|
"global.s_system-config-server.dataPath.label": "Percorso dei dati",
|
|
26986
|
-
"global.s_system-config-server.dataPath.description": "Cartella radice dei dati (
|
|
26986
|
+
"global.s_system-config-server.dataPath.description": "Cartella radice dei dati (DOMINEVO_DATA)",
|
|
26987
26987
|
"global.s_system-config-auth.description": "Impostazioni di token e sessione.",
|
|
26988
26988
|
"global.s_system-config-auth.tokenExpiry.label": "Durata della sessione",
|
|
26989
26989
|
"global.s_system-config-auth.tokenExpiry.description": "Per quanto tempo resta valido un accesso senza essere usato, come stringa di durata (ad es. 7d, 30d). Ogni rinnovo lo fa ripartire, quindi un dispositivo in uso resta connesso; uno lasciato inutilizzato per questo tempo deve accedere di nuovo. Un numero senza unità viene rifiutato: sarebbe letto come millisecondi. Si applica dal prossimo accesso o rinnovo.",
|
|
@@ -27098,7 +27098,7 @@ var CatalogRegistry = class {
|
|
|
27098
27098
|
const file = path$1.join(packageDir, "i18n", `${lang}.json`);
|
|
27099
27099
|
let text;
|
|
27100
27100
|
try {
|
|
27101
|
-
text = fs
|
|
27101
|
+
text = fs.readFileSync(file, "utf8");
|
|
27102
27102
|
} catch {
|
|
27103
27103
|
continue;
|
|
27104
27104
|
}
|
|
@@ -27154,4 +27154,4 @@ function resetCatalogRegistryForTests() {
|
|
|
27154
27154
|
}
|
|
27155
27155
|
//#endregion
|
|
27156
27156
|
var readAllRows = import_read_all_rows.readAllRows;
|
|
27157
|
-
export { ADDON_INSTANCE_SEGMENT, ADDON_VERSION_REASON_HUB, ADDON_VERSION_REASON_REGISTRY_LATEST, AGENT_CAP_FWD_ACTION, AGENT_CAP_FWD_SERVICE, AGENT_DASHBOARD_ORIGINS_FIELD, AGENT_HTTPS_NAMES_COLLECTION, AGENT_HTTPS_NAMES_COLUMNS, AGENT_MAIN_HEAP_WATCH_LABEL, AGENT_READINESS_SERVICE_NAME, AGENT_UI_UNLOCK_TTL_MS, AGENT_UI_UNLOCK_TYP, AGENT_UI_UNLOCK_USE, AGENT_UI_UNLOCK_VERSION, ALL_CAPABILITY_DEFINITIONS, ARRAY_BUFFER_CENSUS_COOLDOWN_MS, ARRAY_BUFFER_CENSUS_SUSTAIN_MS, ARRAY_BUFFER_CENSUS_THRESHOLD_MB, ARRAY_BUFFER_RELEASE_MIN_DROP_RATIO, AddonApiFactory, AddonDepsManager, AddonEngineManager, AddonHealthMonitor, AddonInstaller, AddonLoader, AddonManifest, AddonRefusedError, AddonRouteRegistry, AgentHttpsInstallError, AgentHttpsNames, AgentMdnsAdvertiser, AgentMeshIdentityGate, AgentPairing, AlertCenterAddon, AuthAuditLog, AuthManager, BackupDecryptError, BackupKeyFormatError, BackupKeyMismatchError, BackupKeyRequiredError, CAP_ACTION_OVERFLOW_LABEL, CAP_ACTION_UNLABELLED, CAP_METHOD_NOT_IMPLEMENTED, CA_COMMON_NAME, CA_VALIDITY_DAYS, CORE_CAP_SERVICE_NAME, CalendarsAddon, CapRouteError, CapRouteResolver, CapUsageRegistry, CapabilityHandle, CapabilityRegistry, CapabilityUnavailableError, CatalogRegistry, ClusterNodeHistoryBodySchema, ClusterNodeTombstoneBodySchema, CommandFollowUpRegistry, CommandObserverRegistry, ComposerAddon, ConfigManager, ConfigStore, ConsoleDestination, ConsoleLoggingAddon, CoreBlocksAddon, CoreNotifierAddon, CustomActionRegistry, DECISIVE_HEAP_SPACES, DEFAULT_DATA_PATH, DEFAULT_HUB_TLS_TCP_PORT, DEFAULT_LAN_HTTP_PORT, DEFAULT_LOG_LEVEL, DEVICE_CA_KEY_REF, DEVICE_SETTINGS_CONTRIBUTION_METHODS, DEVICE_STATUS_METHOD, DataPlaneRegistry, DeviceCaStore, DeviceCredentialManager, DeviceHistoryAddon, DeviceManagerAddon, DeviceRegistry, DeviceStore, EMPTY_CAP_ACTION_READING, EMPTY_SOCKET_DIRECTION, EMPTY_SOCKET_PLANE_BASELINE, EVENT_PLANE_TOP_N, EVENT_TOPIC_PREFIX, EngineManagerResolver, EventBus, FIRST_BOOT_ADMIN_PASSWORD, FIRST_BOOT_ADMIN_USERNAME, FeatureManager, FilesystemStorageAddon, FilesystemStorageProvider, FrameDecoder, FsStorageBackend, GET_STATUS_METHOD, HEALTH_MONITOR_GRACE_PERIOD_MS, HEALTH_MONITOR_RETRY_INTERVALS_MS, HEALTH_MONITOR_TICK_MS, HEAP_RECLAIM_MIN_INTERVAL_MS, HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS, HEAP_RECLAIM_TRIGGER_MB, HEAP_SPACE_REPORT_MIN_MB, HEAP_WATCH_INTERVAL_MS, HEAP_WATCH_WARN_RATIO, HUB_CAP_FWD_ACTION, HUB_CAP_FWD_SERVICE, HUB_IDENTITY_FILE, HUB_IDENTITY_RELATIVE, HUB_MAIN_HEAP_WATCH_LABEL, HUB_MAIN_RSS_BUDGET_MB, HUB_RSS_BUDGET_ENV, HUB_RSS_BUDGET_OVERRIDE_SOURCE, HubForwarderAddon, HubForwarderDestination, HubLogForwarder, HubNodeRegistry, HubPairing, INFRA_CAPABILITIES, IntegrationRegistry, InvalidCorsOriginError, JWT_SIGNING_KEY_REF, JobJournal, JwtSigningKeyUnavailableError, LEAF_RENEWAL_WINDOW_DAYS, LifecycleJobEngine, LifecycleStateMachine, LivenessMonitorAddon, LocalAuthAddon, LocalChildClient, LocalChildRegistry, LogManager, LogRingBuffer, LoggingGate, LoginSessionManager, LokiDestination, LokiLoggingAddon, MAX_CAP_ACTIONS_PER_PEER, MAX_LEAF_VALIDITY_DAYS, MEMBERSHIP_PATHS, MESH_ACTION_FORBIDDEN_TYPE, MESH_CA_FIELD, MESH_CA_KEY_REF, MESH_CA_SETTINGS_KEY, MESH_NODE_CERTIFICATES_COLLECTION, MESH_NODE_CERTIFICATES_COLUMNS, MESH_NODE_UNAUTHENTICATED_TYPE, MESH_QUEUE_TOP_N, MESH_TLS_PORT_HELLO_FIELD, METHOD_ACCESS_MAP, MembershipResponder, MeshCaKeeper, MeshCertificateRegistry, MeshCrl, MeshIdentityGate, ModelDownloadService, NATIVE_PROVIDER_SERVICE_INFIX, NATIVE_SCAN_DEPTH, NativeMetricsAddon, NativeMetricsProvider, NetworkQualityTracker, NotificationService, OPAQUE_ORIGIN, OUTBOUND_QUEUE_COOLDOWN_MS, OUTBOUND_QUEUE_SUSTAIN_MS, OUTBOUND_QUEUE_THRESHOLD_BYTES, PAIRING_CODE_DIGITS, PAIRING_MAX_CODE_ATTEMPTS, PAIRING_MAX_SESSIONS, PAIRING_PATHS, PAIRING_PIN_DIGITS, PAIRING_PROTOCOL, PAIRING_TTL_MS, PARENT_ROUTED_PROVIDER_ADDON_ID, PERMITTED_DNS_SUFFIXES, PERMITTED_IP_RANGES, PREVIOUS_LEAF_GRACE_MS, PYTHON_VERSION, PairingHttpError, PeerAnsweredError, PipelineRunner, PipelineValidator, PythonEnvManager, QUARANTINE_DIRNAME, REFRESH_TOKEN_PREFIX, RENEWAL_ABANDONED, RESTART_MARKER_FILE, RSS_BUDGET_REANNOUNCE_MIN_MS, RSS_BUDGET_RELEASE_RATIO, RUNNER_HEAP_WATCH_INTERVAL_MS, RUNNER_RSS_BUDGET_ENV, RUNTIME_DEFAULTS, ReadinessRegistry, ReadinessTimeoutError, RecordsEngine, RegistryReadError, ReplEngine, RingBuffer, RunnerOfAddon, SERVER_AUTH_OID, SERVER_NAMESPACE, SOCKET_PLANE_TOP_N, SOCKET_QUEUE_TOP_N, STALL_REPORT_MS, STALL_TICK_MS, STORE_READABLE_BOOTSTRAP_KEYS, SYSTEM_SECRET_OWNER, ScopedLogger, SettingsReadUnavailableError, SocketChannel, SqliteSettingsAddon, SqliteSettingsBackend, StagingArea, StateRefreshPolicyRegistry, StorageLocationManager, StorageManager, StorageOrchestratorAddon, StorageOrchestratorService, SystemBackupService, SystemConfigAddon, SystemEventBus, TRADITIONAL_NATIVE_PACKAGES, TlsTcpTransporter, ToastService, UDS_NO_ROUTE_PREFIX, UNCLAIMED, UNSUPPORTED_ADDON_SETTLE_MS, UPLOADED_CA_FILE, USER_MANAGEMENT_INTERNAL, UdsLocalTransportClient, UdsLocalTransportServer, UnlockTicketJtiStore, UnsupportedAddonTracker, UserManager, WinstonDestination, WinstonLoggingAddon, ZERO_LOOP_DELAY, __resetCapUsageRegistryForTests, __resetCommandFollowUpRegistryForTests, __resetCommandObserverRegistryForTests, __resetLoggingGateForTests, __resetStateRefreshPolicyRegistryForTests, acceptAgentSans, adaptBrokerToCluster, addonCommandActor, addonSettingsCapability, adoptModelRevisions, afterWorkerOnlineAnnounce, agentHttpsPaths, allFamiliesListenHost, answerClaimedGetStatus, answerDeviceCallRedirect, applyCertificateToListener, applyLanHttp, asBrokerLike, attachUserManagementInternal, attributeStall, backupOrchestratorRecordKinds, backupRecordStoresOf, bareAddonOf, bindPendingLanHttp, bootstrapSchema, brokerCallForCap, brokerTransportLink, buildAgentAnnouncement, buildBinaryPath, buildCapRouters, buildHeapSample, buildLinkChain, buildNameConstraintSet, buildNativeCapProxy, buildNodeManifest, buildNpmChildEnv, buildStorageLocationRegistry, buildTransporter, builderMountedCapNames, caFingerprint, caFingerprintCompact, caReplacementMarkerFile, callRegisterNodeWithRetry, callWithServiceDiscovery, canServeDataPlane, capActionLabel, capActionName, capActionSuffix, capBareAction, capServiceName, catalogNamespaceOf, certificateNames, chainsToPublicRoot, checkUploadedCa, classifyAddonDir, classifyCapRoute, clearHeldInstall, clearHttpsListener, clearIntegrationRows, clearNodeSettings, clearPendingRestart, clearPlatformKeychainKey, closeLanHttp, clusterAgentRecordKinds, clusterEventTopic, clusterNodeHistoryRecordKind, clusterNodeTombstoneRecordKind, collectAgentNames, collectCertIdentity, collectModelFiles, commandActorFromContext, commandObserverLink, compileLogFilter, computePairingCommitment, computePairingSas, connectBrokerTransport, contentTypeFor, copyDirRecursive, copyExtraFileDirs, createAddonContext, createAddonDataPlaneFacility, createAddonPeerBytesFacility, createAddonService, createAgentEventScope, createAgentHttpsRequest, createAgentTransport, createArrayBufferCensusGate, createAuthenticatedFileServer, createBroker, createBrokerDeviceManagerApi, createCapActionCensus, createCiaoPublisher, createCidrMatcher, createCoreCapService, createCoreCatalogRegistry, createDeferredHeapWatchSink, createDoorSettingsView, createEventPlaneMeter, createEventPlaneReader, createFileDataPlaneHandler, createHubCapForwardService, createHubService, createInspectorArrayBufferCensus, createKernelHwAccel, createKernelInferenceEngine, createLocalTransport, createLoopDelayMeter, createMeshAccessMiddleware, createMeshCsrPem, createMeshQueueReader, createMigrationApi, createMigrationApiOverContext, createOutboundQueueGate, createParentUnownedCallHandler, createProcessService, createReadinessService, createReadinessServiceForRegistry, createRequiresRegistry, createScopedProcessManager, createSocketDirectionCounters, createSocketPlaneMeter, createSocketPlaneReader, createStreamProbeBrokerService, createUdsAddonContext, createUdsEventBridge, createUdsEventBus, createUdsLogger, createUdsLoggerWithControl, createV8Reclaimer, currentBrokerTransporter, currentCapCallContext, decideAddonVersionMove, deleteModelFromDisk, deriveAgentListenPort, describeCsr, describeHttpsLeaf, describeMeshLeaf, describeProviderKindDrift, describeRss, deviceCapResolverLink, deviceOfGetStatus, dialableHubHost, diffCapActionCensus, diffEventPlane, diffSocketPlane, disconnectBrokerTransport, downloadBinary, downloadFile, downloadModel, dropProcessPeer, emitDownForOwnedCaps, emitHeapDiagnosticReport, emitProcessNodeRegistered, encodeFrame, ensureAddonNativePrebuilds, ensureBinary, ensureDir, ensureFfmpeg, ensureModel, ensureNativePrebuilds, ensurePython, ensureTlsCert, evaluateExistingCert, expandCapMethods, exportMeshPrivateKeyPem, fetchJson, filterIsEmpty, findAddonRefusal, findInPath, formatArrayBufferCensus, formatEventPlane, formatHeapSpaces, formatLogLine, formatMeshQueue, formatOutboundQueueVerdict, formatSocketPlane, generateBackupKeyPair, generateDeviceCa, generateMeshCa, generateMeshKeyPair, getBrokerEventBus, getBrokerTlsTransporter, getCapUsageRegistry, getCatalogRegistry, getCommandFollowUpRegistry, getCommandObserverRegistry, getFfmpegDownloadUrl, getLocalEventInterest, getLoggingGate, getModelFilePath, getMoleculerEventStats, getOrInitReadinessRegistry, getOrInitReadinessRegistryForClient, getPidStats, getPlatformInfo, getPlatformKeychainKey, getProcessAgentHttpsNames, getProcessJwtSigningKeyState, getProcessMeshCaState, getProcessMeshCertificateRegistry, getProcessMeshHandshakeReporter, getProcessMeshTlsListenerState, getProcessNodeMeshTransport, getProcessPeerLeaf, getPythonDownloadUrl, getRestartMarkerPath, getSinglePidStats, getStateRefreshPolicyRegistry, getUserManagementInternal, getWorkerDeviceRegistry, hasDotNode, heapSpaceField, hostNodeIdOf, hubHostFromMeshAddress, hubMainRssBudget, hubServerVersionOf, installAgentHttps, installBrokerTransporter, installManifestNativeDeps, installManifestPythonDeps, installManifestSystemDeps, installPackageFromNpm, installPythonPackages, installPythonRequirements, integrationRegistryRecordKinds, ipcParentLink, isAddonDeploySource, isAllowedAgentDashboardReturnTo, isAnnouncedHubId, isArrayBufferCensusReport, isArrayOutputSchema, isCollectionArrayMethod, isConstrainedCa, isContainerBridgeAddress, isCredentialKeyName, isInfraCapability, isInsecureOrigin, isInstalledTransporter, isLocalOnlyHostname, isModelDownloaded, isPeerEventPacket, isPrivateAddress, isProcessVerifiedMeshPeer, isRemoteForbiddenAction, isRemoteForbiddenOnAgent, isSettingsReadUnavailable, isSourceNewer, isValidAgentNodeId, isolatedBuiltinPhase, issueAgentHttpsLeaf, issueDeviceLeaf, issueMeshLeafForNode, issueMeshLeafFromCsr, keyFingerprintShort, leafFingerprintOf, levelRank, lineContainsText, lineMatches, listHeldInstalls, loadAgentHttps, loadBootstrapConfig, loadDeviceCa, loadMeshCa, loadOrCreateHubId, loadTlsCert, localCaCommonName, localEndpointPath, localProviderLink, localSupportedPythonRuntimes, mapSignalsToInferenceHardware, meshErrorType, mintAgentUiUnlockTicket, mountNativeCapService, nextRssBudgetState, normalizeIp, normalizeOrigin, onLocalEventInterestChange, onProcessNodeRegistered, onSessionsRevoked, openMeshTlsWhenRevocationsLoaded, originNodeOf, overlayGetStatus, parseAgentDashboardOrigins, parseCapAction, parseCidrList, parseOriginList, parseRangeHeader, parseRssBudgetMb, parseTokenExpiry, parseTokenizedUrl, partitionIsolatedBuiltinIds, pemDigest, permitsIdentity, permitsName, pinnedHttpsCaFingerprint, preferencesLimitReasonOf, prepareBootTls, prepareRestoreArchive, probePlatform, processJwtSigningKey, processMeshCrl, proxyToUpstream, quarantineAddonResidue, readAllRows, readBackupEncryptionHeader, readCidrSetting, readCurrentCommandOrigin, readExtraSans, readHeapSpaces, readLanHttpState, readNameConstraints, readOriginSetting, readPendingRestart, readSocketQueues, readTlsAccessStatus, readTlsEnabled, readTlsMode, readinessKey, reclaimIntervalMs, recordHeldInstall, recordSocketFrame, redactLogEntry, redactLogMeta, redactLogText, regenerateCertificate, registerEventBusService, registerHttpsListener, registerLanHttpHandler, rehydrateSwitchesOnHubConnect, reissueTlsLeaf, reloadHttpsListener, renewMeshCertificate, replaceUnconstrainedLocalCa, requireProcessMeshCa, resetCatalogRegistryForTests, resolveAddonInstancePath, resolveFilePath, resolveFormatRevision, resolveHwAccel, resolveNpmInvocation, retirePreviousLocalCa, revertToGeneratedCertificate, revisionWeightUrl, revokeMeshCertificate, runHubAddonBoot, runNpm, runObservedCommand, runWithCapCallContext, sampleSocketDirection, scheduleSelfRestart, scopeKey, scopesAllowAddon, scopesAllowDeviceCap, selectAddonResidue, selectReportedSpaces, serializeTypedArrays, servedHttpsLeafFingerprint, setHubConnected, setHuggingFaceReachabilityObserver, setNodeEventInterest, setPlatformKeychainKey, setProcessAgentHttpsNames, setProcessMeshCertificateRegistry, setProcessMeshHandshakeReporter, setProcessMeshPeerTransportLookup, setProcessMeshTlsEnabler, setProcessMeshTlsListenerState, setWrapperActive, shouldReclaim, signMembershipProof, signPairingProof, signalAllRunnerGroups, socketDirectionBytes, socketDirectionMessages, splitPemCertificates, stampCallerAddonId, startEventLoopStallMonitor, startHeapWatch, startRunnerHeapWatch, staticJwtSigningKey, storageOrchestratorRecordKinds, storeMayAnswer, storeUploadedCertificate, strandedMb, stripCamstackDeps, stripForgedIdentity, stripForwardedCaller, subscribePassthrough, systemHostFacts, udsChildLogToWorkerEntry, useStoredUploadedCertificate, validateProviderRegistrations, validateUploadedTls, verifyAgentUiUnlockTicket, verifyDeviceLeaf, verifyDeviceSignature, verifyMembershipAnswer, verifyPairingProof, waitUntilReady, writeExtraSans, writePendingRestart, writeTlsEnabled, writeTlsMode };
|
|
27157
|
+
export { ADDON_INSTANCE_SEGMENT, ADDON_VERSION_REASON_HUB, ADDON_VERSION_REASON_REGISTRY_LATEST, AGENT_CAP_FWD_ACTION, AGENT_CAP_FWD_SERVICE, AGENT_DASHBOARD_ORIGINS_FIELD, AGENT_HTTPS_NAMES_COLLECTION, AGENT_HTTPS_NAMES_COLUMNS, AGENT_MAIN_HEAP_WATCH_LABEL, AGENT_READINESS_SERVICE_NAME, AGENT_UI_UNLOCK_TTL_MS, AGENT_UI_UNLOCK_TYP, AGENT_UI_UNLOCK_USE, AGENT_UI_UNLOCK_VERSION, ALL_CAPABILITY_DEFINITIONS, ARRAY_BUFFER_CENSUS_COOLDOWN_MS, ARRAY_BUFFER_CENSUS_SUSTAIN_MS, ARRAY_BUFFER_CENSUS_THRESHOLD_MB, ARRAY_BUFFER_RELEASE_MIN_DROP_RATIO, AddonApiFactory, AddonDepsManager, AddonEngineManager, AddonHealthMonitor, AddonInstaller, AddonLoader, AddonManifest, AddonRefusedError, AddonRouteRegistry, AgentHttpsInstallError, AgentHttpsNames, AgentMdnsAdvertiser, AgentMeshIdentityGate, AgentPairing, AlertCenterAddon, AuthAuditLog, AuthManager, BackupDecryptError, BackupKeyFormatError, BackupKeyMismatchError, BackupKeyRequiredError, CAP_ACTION_OVERFLOW_LABEL, CAP_ACTION_UNLABELLED, CAP_METHOD_NOT_IMPLEMENTED, CA_COMMON_NAME, CA_VALIDITY_DAYS, CORE_CAP_SERVICE_NAME, CalendarsAddon, CapRouteError, CapRouteResolver, CapUsageRegistry, CapabilityHandle, CapabilityRegistry, CapabilityUnavailableError, CatalogRegistry, ClusterNodeHistoryBodySchema, ClusterNodeTombstoneBodySchema, CommandFollowUpRegistry, CommandObserverRegistry, ComposerAddon, ConfigManager, ConfigStore, ConsoleDestination, ConsoleLoggingAddon, CoreBlocksAddon, CoreNotifierAddon, CustomActionRegistry, DECISIVE_HEAP_SPACES, DEFAULT_DATA_PATH, DEFAULT_HUB_TLS_TCP_PORT, DEFAULT_LAN_HTTP_PORT, DEFAULT_LOG_LEVEL, DEVICE_CA_KEY_REF, DEVICE_SETTINGS_CONTRIBUTION_METHODS, DEVICE_STATUS_METHOD, DataPlaneRegistry, DeviceCaStore, DeviceCredentialManager, DeviceHistoryAddon, DeviceManagerAddon, DeviceRegistry, DeviceStore, EMPTY_CAP_ACTION_READING, EMPTY_SOCKET_DIRECTION, EMPTY_SOCKET_PLANE_BASELINE, EVENT_PLANE_TOP_N, EVENT_TOPIC_PREFIX, EngineManagerResolver, EventBus, FIRST_BOOT_ADMIN_PASSWORD, FIRST_BOOT_ADMIN_USERNAME, FeatureManager, FilesystemStorageAddon, FilesystemStorageProvider, FrameDecoder, FsStorageBackend, GET_STATUS_METHOD, HEALTH_MONITOR_GRACE_PERIOD_MS, HEALTH_MONITOR_RETRY_INTERVALS_MS, HEALTH_MONITOR_TICK_MS, HEAP_RECLAIM_MIN_INTERVAL_MS, HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS, HEAP_RECLAIM_TRIGGER_MB, HEAP_SPACE_REPORT_MIN_MB, HEAP_WATCH_INTERVAL_MS, HEAP_WATCH_WARN_RATIO, HUB_CAP_FWD_ACTION, HUB_CAP_FWD_SERVICE, HUB_IDENTITY_FILE, HUB_IDENTITY_RELATIVE, HUB_MAIN_HEAP_WATCH_LABEL, HUB_MAIN_RSS_BUDGET_MB, HUB_RSS_BUDGET_ENV, HUB_RSS_BUDGET_OVERRIDE_SOURCE, HubForwarderAddon, HubForwarderDestination, HubLogForwarder, HubNodeRegistry, HubPairing, INFRA_CAPABILITIES, IntegrationRegistry, InvalidCorsOriginError, JWT_SIGNING_KEY_REF, JobJournal, JwtSigningKeyUnavailableError, LEAF_RENEWAL_WINDOW_DAYS, LifecycleJobEngine, LifecycleStateMachine, LivenessMonitorAddon, LocalAuthAddon, LocalChildClient, LocalChildRegistry, LogManager, LogRingBuffer, LoggingGate, LoginSessionManager, LokiDestination, LokiLoggingAddon, MAX_CAP_ACTIONS_PER_PEER, MAX_LEAF_VALIDITY_DAYS, MEMBERSHIP_PATHS, MESH_ACTION_FORBIDDEN_TYPE, MESH_CA_FIELD, MESH_CA_KEY_REF, MESH_CA_SETTINGS_KEY, MESH_NODE_CERTIFICATES_COLLECTION, MESH_NODE_CERTIFICATES_COLUMNS, MESH_NODE_UNAUTHENTICATED_TYPE, MESH_QUEUE_TOP_N, MESH_TLS_PORT_HELLO_FIELD, METHOD_ACCESS_MAP, MembershipResponder, MeshCaKeeper, MeshCertificateRegistry, MeshCrl, MeshIdentityGate, ModelDownloadService, NATIVE_PROVIDER_SERVICE_INFIX, NATIVE_SCAN_DEPTH, NativeMetricsAddon, NativeMetricsProvider, NetworkQualityTracker, NotificationService, OPAQUE_ORIGIN, OUTBOUND_QUEUE_COOLDOWN_MS, OUTBOUND_QUEUE_SUSTAIN_MS, OUTBOUND_QUEUE_THRESHOLD_BYTES, PAIRING_CODE_DIGITS, PAIRING_MAX_CODE_ATTEMPTS, PAIRING_MAX_SESSIONS, PAIRING_PATHS, PAIRING_PIN_DIGITS, PAIRING_PROTOCOL, PAIRING_TTL_MS, PARENT_ROUTED_PROVIDER_ADDON_ID, PERMITTED_DNS_SUFFIXES, PERMITTED_IP_RANGES, PREVIOUS_LEAF_GRACE_MS, PYTHON_VERSION, PairingHttpError, PeerAnsweredError, PipelineRunner, PipelineValidator, PythonEnvManager, QUARANTINE_DIRNAME, REFRESH_TOKEN_PREFIX, RENEWAL_ABANDONED, RESTART_MARKER_FILE, RSS_BUDGET_REANNOUNCE_MIN_MS, RSS_BUDGET_RELEASE_RATIO, RUNNER_HEAP_WATCH_INTERVAL_MS, RUNNER_RSS_BUDGET_ENV, RUNTIME_DEFAULTS, ReadinessRegistry, ReadinessTimeoutError, RecordsEngine, RegistryReadError, ReplEngine, RingBuffer, RunnerOfAddon, SERVER_AUTH_OID, SERVER_NAMESPACE, SOCKET_PLANE_TOP_N, SOCKET_QUEUE_TOP_N, STALL_REPORT_MS, STALL_TICK_MS, STORE_READABLE_BOOTSTRAP_KEYS, SYSTEM_SECRET_OWNER, ScopedLogger, SettingsReadUnavailableError, SocketChannel, SqliteSettingsAddon, SqliteSettingsBackend, StagingArea, StateRefreshPolicyRegistry, StorageLocationManager, StorageManager, StorageOrchestratorAddon, StorageOrchestratorService, SystemBackupService, SystemConfigAddon, SystemEventBus, TRADITIONAL_NATIVE_PACKAGES, TlsTcpTransporter, ToastService, UDS_NO_ROUTE_PREFIX, UNCLAIMED, UNSUPPORTED_ADDON_SETTLE_MS, UPLOADED_CA_FILE, USER_MANAGEMENT_INTERNAL, UdsLocalTransportClient, UdsLocalTransportServer, UnlockTicketJtiStore, UnsupportedAddonTracker, UserManager, WinstonDestination, WinstonLoggingAddon, ZERO_LOOP_DELAY, __resetCapUsageRegistryForTests, __resetCommandFollowUpRegistryForTests, __resetCommandObserverRegistryForTests, __resetLoggingGateForTests, __resetStateRefreshPolicyRegistryForTests, acceptAgentSans, adaptBrokerToCluster, addonCommandActor, addonSettingsCapability, adoptModelRevisions, afterWorkerOnlineAnnounce, agentHttpsPaths, allFamiliesListenHost, answerClaimedGetStatus, answerDeviceCallRedirect, applyCertificateToListener, applyLanHttp, asBrokerLike, attachUserManagementInternal, attributeStall, backupOrchestratorRecordKinds, backupRecordStoresOf, bareAddonOf, bindPendingLanHttp, bootstrapSchema, brokerCallForCap, brokerTransportLink, buildAgentAnnouncement, buildBinaryPath, buildCapRouters, buildHeapSample, buildLinkChain, buildNameConstraintSet, buildNativeCapProxy, buildNodeManifest, buildNpmChildEnv, buildStorageLocationRegistry, buildTransporter, builderMountedCapNames, caFingerprint, caFingerprintCompact, caReplacementMarkerFile, callRegisterNodeWithRetry, callWithServiceDiscovery, canServeDataPlane, capActionLabel, capActionName, capActionSuffix, capBareAction, capServiceName, catalogNamespaceOf, certificateNames, chainsToPublicRoot, checkUploadedCa, classifyAddonDir, classifyCapRoute, clearHeldInstall, clearHttpsListener, clearIntegrationRows, clearNodeSettings, clearPendingRestart, clearPlatformKeychainKey, closeLanHttp, clusterAgentRecordKinds, clusterEventTopic, clusterNodeHistoryRecordKind, clusterNodeTombstoneRecordKind, collectAgentNames, collectCertIdentity, collectModelFiles, commandActorFromContext, commandObserverLink, compileLogFilter, computePairingCommitment, computePairingSas, connectBrokerTransport, contentTypeFor, copyDirRecursive, copyExtraFileDirs, createAddonContext, createAddonDataPlaneFacility, createAddonPeerBytesFacility, createAddonService, createAgentEventScope, createAgentHttpsRequest, createAgentTransport, createArrayBufferCensusGate, createAuthenticatedFileServer, createBroker, createBrokerDeviceManagerApi, createCapActionCensus, createCiaoPublisher, createCidrMatcher, createCoreCapService, createCoreCatalogRegistry, createDeferredHeapWatchSink, createDoorSettingsView, createEventPlaneMeter, createEventPlaneReader, createFileDataPlaneHandler, createHubCapForwardService, createHubService, createInspectorArrayBufferCensus, createKernelHwAccel, createKernelInferenceEngine, createLocalTransport, createLoopDelayMeter, createMeshAccessMiddleware, createMeshCsrPem, createMeshQueueReader, createMigrationApi, createMigrationApiOverContext, createOutboundQueueGate, createParentUnownedCallHandler, createProcessService, createReadinessService, createReadinessServiceForRegistry, createRequiresRegistry, createScopedProcessManager, createSocketDirectionCounters, createSocketPlaneMeter, createSocketPlaneReader, createStreamProbeBrokerService, createUdsAddonContext, createUdsEventBridge, createUdsEventBus, createUdsLogger, createUdsLoggerWithControl, createV8Reclaimer, currentBrokerTransporter, currentCapCallContext, decideAddonVersionMove, deleteModelFromDisk, deriveAgentListenPort, describeCsr, describeHttpsLeaf, describeMeshLeaf, describeProviderKindDrift, describeRss, deviceCapResolverLink, deviceOfGetStatus, dialableHubHost, diffCapActionCensus, diffEventPlane, diffSocketPlane, disconnectBrokerTransport, downloadBinary, downloadFile, downloadModel, dropProcessPeer, emitDownForOwnedCaps, emitHeapDiagnosticReport, emitProcessNodeRegistered, encodeFrame, ensureAddonNativePrebuilds, ensureBinary, ensureDir, ensureFfmpeg, ensureModel, ensureNativePrebuilds, ensurePython, ensureTlsCert, evaluateExistingCert, expandCapMethods, exportMeshPrivateKeyPem, fetchJson, filterIsEmpty, findAddonRefusal, findInPath, formatArrayBufferCensus, formatEventPlane, formatHeapSpaces, formatLogLine, formatMeshQueue, formatOutboundQueueVerdict, formatSocketPlane, generateBackupKeyPair, generateDeviceCa, generateMeshCa, generateMeshKeyPair, getBrokerEventBus, getBrokerTlsTransporter, getCapUsageRegistry, getCatalogRegistry, getCommandFollowUpRegistry, getCommandObserverRegistry, getFfmpegDownloadUrl, getLocalEventInterest, getLoggingGate, getModelFilePath, getMoleculerEventStats, getOrInitReadinessRegistry, getOrInitReadinessRegistryForClient, getPidStats, getPlatformInfo, getPlatformKeychainKey, getProcessAgentHttpsNames, getProcessJwtSigningKeyState, getProcessMeshCaState, getProcessMeshCertificateRegistry, getProcessMeshHandshakeReporter, getProcessMeshTlsListenerState, getProcessNodeMeshTransport, getProcessPeerLeaf, getPythonDownloadUrl, getRestartMarkerPath, getSinglePidStats, getStateRefreshPolicyRegistry, getUserManagementInternal, getWorkerDeviceRegistry, hasDotNode, heapSpaceField, hostNodeIdOf, hubHostFromMeshAddress, hubMainRssBudget, hubServerVersionOf, installAgentHttps, installBrokerTransporter, installManifestNativeDeps, installManifestPythonDeps, installManifestSystemDeps, installPackageFromNpm, installPythonPackages, installPythonRequirements, integrationRegistryRecordKinds, ipcParentLink, isAddonDeploySource, isAllowedAgentDashboardReturnTo, isAnnouncedHubId, isArrayBufferCensusReport, isArrayOutputSchema, isCollectionArrayMethod, isConstrainedCa, isContainerBridgeAddress, isCredentialKeyName, isInfraCapability, isInsecureOrigin, isInstalledTransporter, isLocalOnlyHostname, isModelDownloaded, isPeerEventPacket, isPrivateAddress, isProcessVerifiedMeshPeer, isRemoteForbiddenAction, isRemoteForbiddenOnAgent, isSettingsReadUnavailable, isSourceNewer, isValidAgentNodeId, isolatedBuiltinPhase, issueAgentHttpsLeaf, issueDeviceLeaf, issueMeshLeafForNode, issueMeshLeafFromCsr, keyFingerprintShort, leafFingerprintOf, levelRank, lineContainsText, lineMatches, listHeldInstalls, loadAgentHttps, loadBootstrapConfig, loadDeviceCa, loadMeshCa, loadOrCreateHubId, loadTlsCert, localCaCommonName, localEndpointPath, localProviderLink, localSupportedPythonRuntimes, mapSignalsToInferenceHardware, meshErrorType, mintAgentUiUnlockTicket, mountNativeCapService, nextRssBudgetState, normalizeIp, normalizeOrigin, onLocalEventInterestChange, onProcessNodeRegistered, onSessionsRevoked, openMeshTlsWhenRevocationsLoaded, originNodeOf, overlayGetStatus, parseAgentDashboardOrigins, parseCapAction, parseCidrList, parseOriginList, parseRangeHeader, parseRssBudgetMb, parseTokenExpiry, parseTokenizedUrl, partitionIsolatedBuiltinIds, pemDigest, permitsIdentity, permitsName, pinnedHttpsCaFingerprint, preferencesLimitReasonOf, prepareBootTls, prepareRestoreArchive, probePlatform, processJwtSigningKey, processMeshCrl, proxyToUpstream, quarantineAddonResidue, readAllRows, readBackupEncryptionHeader, readCidrSetting, readCurrentCommandOrigin, readExtraSans, readHeapSpaces, readLanHttpState, readNameConstraints, readOriginSetting, readPendingRestart, readSocketQueues, readTlsAccessStatus, readTlsEnabled, readTlsMode, readinessKey, reclaimIntervalMs, recordHeldInstall, recordSocketFrame, redactLogEntry, redactLogMeta, redactLogText, regenerateCertificate, registerEventBusService, registerHttpsListener, registerLanHttpHandler, rehydrateSwitchesOnHubConnect, reissueTlsLeaf, reloadHttpsListener, renewMeshCertificate, replaceUnconstrainedLocalCa, requireProcessMeshCa, resetCatalogRegistryForTests, resolveAddonInstancePath, resolveFilePath, resolveFormatRevision, resolveHwAccel, resolveNpmInvocation, retirePreviousLocalCa, revertToGeneratedCertificate, revisionWeightUrl, revokeMeshCertificate, runHubAddonBoot, runNpm, runObservedCommand, runWithCapCallContext, sampleSocketDirection, scheduleSelfRestart, scopeKey, scopesAllowAddon, scopesAllowDeviceCap, selectAddonResidue, selectReportedSpaces, serializeTypedArrays, servedHttpsLeafFingerprint, setHubConnected, setHuggingFaceReachabilityObserver, setNodeEventInterest, setPlatformKeychainKey, setProcessAgentHttpsNames, setProcessMeshCertificateRegistry, setProcessMeshHandshakeReporter, setProcessMeshPeerTransportLookup, setProcessMeshTlsEnabler, setProcessMeshTlsListenerState, setWrapperActive, shouldReclaim, signMembershipProof, signPairingProof, signalAllRunnerGroups, socketDirectionBytes, socketDirectionMessages, splitPemCertificates, stampCallerAddonId, startEventLoopStallMonitor, startHeapWatch, startRunnerHeapWatch, staticJwtSigningKey, storageOrchestratorRecordKinds, storeMayAnswer, storeUploadedCertificate, strandedMb, stripDominevoDeps, stripForgedIdentity, stripForwardedCaller, subscribePassthrough, systemHostFacts, udsChildLogToWorkerEntry, useStoredUploadedCertificate, validateProviderRegistrations, validateUploadedTls, verifyAgentUiUnlockTicket, verifyDeviceLeaf, verifyDeviceSignature, verifyMembershipAnswer, verifyPairingProof, waitUntilReady, writeExtraSans, writePendingRestart, writeTlsEnabled, writeTlsMode };
|