@wenathlan/saddle 1.8.18 → 2.0.3
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/Dockerfile +1346 -0
- package/README.md +33 -12
- package/alternatives.ts +1218 -0
- package/biome.json +153 -0
- package/boards.json +1517 -0
- package/compute.ts +3144 -0
- package/cores.json +1801 -0
- package/dist/acquisition.d.ts +359 -0
- package/dist/acquisition.d.ts.map +1 -0
- package/dist/acquisition.js +629 -0
- package/dist/acquisition.js.map +1 -0
- package/dist/alternatives.d.ts +509 -0
- package/dist/alternatives.d.ts.map +1 -0
- package/dist/alternatives.js +951 -0
- package/dist/alternatives.js.map +1 -0
- package/dist/automation.d.ts +426 -0
- package/dist/automation.d.ts.map +1 -0
- package/dist/automation.js +561 -0
- package/dist/automation.js.map +1 -0
- package/dist/browser.d.ts +562 -0
- package/dist/browser.d.ts.map +1 -0
- package/dist/browser.js +1057 -0
- package/dist/browser.js.map +1 -0
- package/dist/capacitor.config.d.ts +13 -0
- package/dist/capacitor.config.d.ts.map +1 -0
- package/dist/capacitor.config.js +26 -0
- package/dist/capacitor.config.js.map +1 -0
- package/dist/cli.d.ts +17 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +111 -0
- package/dist/cli.js.map +1 -0
- package/dist/communication.d.ts +192 -0
- package/dist/communication.d.ts.map +1 -0
- package/dist/communication.js +418 -0
- package/dist/communication.js.map +1 -0
- package/dist/compute.d.ts +1161 -0
- package/dist/compute.d.ts.map +1 -0
- package/dist/compute.js +2273 -0
- package/dist/compute.js.map +1 -0
- package/dist/distribution.d.ts +529 -0
- package/dist/distribution.d.ts.map +1 -0
- package/dist/distribution.js +811 -0
- package/dist/distribution.js.map +1 -0
- package/dist/execution.d.ts +530 -0
- package/dist/execution.d.ts.map +1 -0
- package/dist/execution.js +761 -0
- package/dist/execution.js.map +1 -0
- package/dist/format.d.ts +19 -0
- package/dist/format.d.ts.map +1 -0
- package/dist/format.js +60 -0
- package/dist/format.js.map +1 -0
- package/dist/foundation.d.ts +176 -0
- package/dist/foundation.d.ts.map +1 -0
- package/dist/foundation.js +309 -0
- package/dist/foundation.js.map +1 -0
- package/dist/index.d.ts +733 -123
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1018 -123
- package/dist/index.js.map +1 -1
- package/dist/integration.d.ts +236 -0
- package/dist/integration.d.ts.map +1 -0
- package/dist/integration.js +236 -0
- package/dist/integration.js.map +1 -0
- package/dist/intelligence.d.ts +94 -0
- package/dist/intelligence.d.ts.map +1 -0
- package/dist/intelligence.js +145 -0
- package/dist/intelligence.js.map +1 -0
- package/dist/{isolation/contracts.d.ts → isolation.d.ts} +12 -1
- package/dist/isolation.d.ts.map +1 -0
- package/dist/{isolation/contracts.js → isolation.js} +13 -1
- package/dist/isolation.js.map +1 -0
- package/dist/media.d.ts +344 -0
- package/dist/media.d.ts.map +1 -0
- package/dist/media.js +986 -0
- package/dist/media.js.map +1 -0
- package/dist/modes.d.ts +359 -0
- package/dist/modes.d.ts.map +1 -0
- package/dist/modes.js +134 -0
- package/dist/modes.js.map +1 -0
- package/dist/{library/public.d.ts → operations.d.ts} +15 -1
- package/dist/operations.d.ts.map +1 -0
- package/dist/{library/public.js → operations.js} +18 -7
- package/dist/operations.js.map +1 -0
- package/dist/orchestrator.d.ts +1339 -0
- package/dist/orchestrator.d.ts.map +1 -0
- package/dist/orchestrator.js +4308 -0
- package/dist/orchestrator.js.map +1 -0
- package/dist/packager/targetcli.js +4 -22
- package/dist/performance.d.ts +416 -0
- package/dist/performance.d.ts.map +1 -0
- package/dist/performance.js +827 -0
- package/dist/performance.js.map +1 -0
- package/dist/quantum.d.ts +810 -0
- package/dist/quantum.d.ts.map +1 -0
- package/dist/quantum.js +2073 -0
- package/dist/quantum.js.map +1 -0
- package/dist/render.d.ts +381 -0
- package/dist/render.d.ts.map +1 -0
- package/dist/render.js +1073 -0
- package/dist/render.js.map +1 -0
- package/dist/scheduler.d.ts +596 -0
- package/dist/scheduler.d.ts.map +1 -0
- package/dist/scheduler.js +1259 -0
- package/dist/scheduler.js.map +1 -0
- package/dist/security.d.ts +501 -0
- package/dist/security.d.ts.map +1 -0
- package/dist/security.js +1170 -0
- package/dist/security.js.map +1 -0
- package/dist/server.d.ts +21 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/{server/node.js → server.js} +16 -2
- package/dist/server.js.map +1 -0
- package/dist/tiers.d.ts +1002 -0
- package/dist/tiers.d.ts.map +1 -0
- package/dist/tiers.js +2165 -0
- package/dist/tiers.js.map +1 -0
- package/dist/virtual.d.ts +641 -0
- package/dist/virtual.d.ts.map +1 -0
- package/dist/virtual.js +1285 -0
- package/dist/virtual.js.map +1 -0
- package/dist/virtualcpu.d.ts +316 -0
- package/dist/virtualcpu.d.ts.map +1 -0
- package/dist/virtualcpu.js +1180 -0
- package/dist/virtualcpu.js.map +1 -0
- package/dist/virtualgpu.d.ts +345 -0
- package/dist/virtualgpu.d.ts.map +1 -0
- package/dist/virtualgpu.js +1000 -0
- package/dist/virtualgpu.js.map +1 -0
- package/dist/virtualization.d.ts +607 -0
- package/dist/virtualization.d.ts.map +1 -0
- package/dist/virtualization.js +1187 -0
- package/dist/virtualization.js.map +1 -0
- package/dist/virtualmemory.d.ts +818 -0
- package/dist/virtualmemory.d.ts.map +1 -0
- package/dist/virtualmemory.js +1796 -0
- package/dist/virtualmemory.js.map +1 -0
- package/dist/webscrape.d.ts +720 -0
- package/dist/webscrape.d.ts.map +1 -0
- package/dist/webscrape.js +2697 -0
- package/dist/webscrape.js.map +1 -0
- package/docker.config +769 -0
- package/docs/CONVERSA.txt +1523 -0
- package/docs/alternatives.md +499 -0
- package/docs/architecture-1.8.19.md +76 -0
- package/docs/architecture-1.8.19.mmd +33 -0
- package/docs/architecture-1.8.19.png +0 -0
- package/docs/architecture.md +355 -0
- package/docs/brancharchive-2026-08-18.md +18 -0
- package/docs/browser.md +7 -0
- package/docs/consolidation.md +70 -0
- package/docs/e2ugh-engine.md +528 -0
- package/{dist/examples/localjob.js → docs/example-localjob.ts} +3 -3
- package/{dist/examples/publicapi.js → docs/example-publicapi.ts} +2 -2
- package/docs/hardware.md +342 -0
- package/docs/optimization.md +126 -0
- package/docs/performance.md +499 -0
- package/docs/planning.1.8.18.md +94 -0
- package/docs/planning.1.8.19.md +49 -0
- package/docs/releasenotes-1.8.19.md +35 -0
- package/docs/research-1.8.19-virtual-browser.md +27 -0
- package/docs/security.md +454 -0
- package/docs/todo-1.8.18.md +12 -0
- package/docs/todo-1.8.19.md +241 -0
- package/docs/viability.md +777 -0
- package/docs/virtualization.md +335 -0
- package/docs/web-duplicatecleanup.md +9 -0
- package/docs/web-ideas.md +106 -0
- package/docs/workflowimprovements-2026-08-19.md +70 -0
- package/gpumonitor.cpp +1543 -0
- package/gpus.json +2408 -0
- package/index.ts +1478 -0
- package/media.ts +1337 -0
- package/mttg.config +1549 -0
- package/orchestrator.ts +5462 -0
- package/package.json +304 -56
- package/passage.config +1331 -0
- package/performance.ts +1049 -0
- package/processors.json +2217 -0
- package/qemu.config +1062 -0
- package/qemubridge.py +1340 -0
- package/quantum.ts +2393 -0
- package/render.ts +1325 -0
- package/scheduler.ts +1600 -0
- package/security.ts +1449 -0
- package/tiers.ts +2871 -0
- package/tsconfig.json +29 -0
- package/virtualcpu.ts +1273 -0
- package/virtualgpu.ts +1181 -0
- package/virtualhardware.c +1011 -0
- package/virtualhardware.json +739 -0
- package/virtualization.ts +1628 -0
- package/virtualizationcore.cpp +4635 -0
- package/virtualmemory.ts +2303 -0
- package/vm.config.json +1910 -0
- package/{extension → web/extension}/manifest.json +1 -1
- package/web/readme.md +382 -0
- package/web/tsconfig.json +25 -0
- package/dist/adapters/forge.d.ts +0 -17
- package/dist/adapters/forge.d.ts.map +0 -1
- package/dist/adapters/forge.js +0 -19
- package/dist/adapters/forge.js.map +0 -1
- package/dist/adapters/forgejo.d.ts +0 -49
- package/dist/adapters/forgejo.d.ts.map +0 -1
- package/dist/adapters/forgejo.js +0 -8
- package/dist/adapters/forgejo.js.map +0 -1
- package/dist/adapters/github.d.ts +0 -12
- package/dist/adapters/github.d.ts.map +0 -1
- package/dist/adapters/github.js +0 -20
- package/dist/adapters/github.js.map +0 -1
- package/dist/adapters/gitlab.d.ts +0 -17
- package/dist/adapters/gitlab.d.ts.map +0 -1
- package/dist/adapters/gitlab.js +0 -10
- package/dist/adapters/gitlab.js.map +0 -1
- package/dist/adapters/huggingface.d.ts +0 -17
- package/dist/adapters/huggingface.d.ts.map +0 -1
- package/dist/adapters/huggingface.js +0 -6
- package/dist/adapters/huggingface.js.map +0 -1
- package/dist/adapters/socket.d.ts +0 -11
- package/dist/adapters/socket.d.ts.map +0 -1
- package/dist/adapters/socket.js +0 -17
- package/dist/adapters/socket.js.map +0 -1
- package/dist/adapters/transport.d.ts +0 -7
- package/dist/adapters/transport.d.ts.map +0 -1
- package/dist/adapters/transport.js +0 -36
- package/dist/adapters/transport.js.map +0 -1
- package/dist/ai/chunk.d.ts +0 -2
- package/dist/ai/chunk.d.ts.map +0 -1
- package/dist/ai/chunk.js +0 -36
- package/dist/ai/chunk.js.map +0 -1
- package/dist/ai/llmstxt.d.ts +0 -6
- package/dist/ai/llmstxt.d.ts.map +0 -1
- package/dist/ai/llmstxt.js +0 -12
- package/dist/ai/llmstxt.js.map +0 -1
- package/dist/ai/provenance.d.ts +0 -22
- package/dist/ai/provenance.d.ts.map +0 -1
- package/dist/ai/provenance.js +0 -25
- package/dist/ai/provenance.js.map +0 -1
- package/dist/ai/rag.d.ts +0 -26
- package/dist/ai/rag.d.ts.map +0 -1
- package/dist/ai/rag.js +0 -22
- package/dist/ai/rag.js.map +0 -1
- package/dist/ai/tokens.d.ts +0 -15
- package/dist/ai/tokens.d.ts.map +0 -1
- package/dist/ai/tokens.js +0 -9
- package/dist/ai/tokens.js.map +0 -1
- package/dist/api/auth.d.ts +0 -16
- package/dist/api/auth.d.ts.map +0 -1
- package/dist/api/auth.js +0 -19
- package/dist/api/auth.js.map +0 -1
- package/dist/api/contracts.d.ts +0 -28
- package/dist/api/contracts.d.ts.map +0 -1
- package/dist/api/contracts.js +0 -14
- package/dist/api/contracts.js.map +0 -1
- package/dist/api/control.d.ts +0 -10
- package/dist/api/control.d.ts.map +0 -1
- package/dist/api/control.js +0 -35
- package/dist/api/control.js.map +0 -1
- package/dist/api/http.d.ts +0 -7
- package/dist/api/http.d.ts.map +0 -1
- package/dist/api/http.js +0 -12
- package/dist/api/http.js.map +0 -1
- package/dist/api/rate.d.ts +0 -28
- package/dist/api/rate.d.ts.map +0 -1
- package/dist/api/rate.js +0 -36
- package/dist/api/rate.js.map +0 -1
- package/dist/api/security.d.ts +0 -12
- package/dist/api/security.d.ts.map +0 -1
- package/dist/api/security.js +0 -56
- package/dist/api/security.js.map +0 -1
- package/dist/api/service.d.ts +0 -5
- package/dist/api/service.d.ts.map +0 -1
- package/dist/api/service.js +0 -70
- package/dist/api/service.js.map +0 -1
- package/dist/apps/registry.d.ts +0 -33
- package/dist/apps/registry.d.ts.map +0 -1
- package/dist/apps/registry.js +0 -24
- package/dist/apps/registry.js.map +0 -1
- package/dist/binary/archive.d.ts +0 -27
- package/dist/binary/archive.d.ts.map +0 -1
- package/dist/binary/archive.js +0 -46
- package/dist/binary/archive.js.map +0 -1
- package/dist/binary/build.d.ts +0 -29
- package/dist/binary/build.d.ts.map +0 -1
- package/dist/binary/build.js +0 -17
- package/dist/binary/build.js.map +0 -1
- package/dist/binary/transform.d.ts +0 -70
- package/dist/binary/transform.d.ts.map +0 -1
- package/dist/binary/transform.js +0 -105
- package/dist/binary/transform.js.map +0 -1
- package/dist/bot/adapter.d.ts +0 -5
- package/dist/bot/adapter.d.ts.map +0 -1
- package/dist/bot/adapter.js +0 -11
- package/dist/bot/adapter.js.map +0 -1
- package/dist/bot/bot.d.ts +0 -28
- package/dist/bot/bot.d.ts.map +0 -1
- package/dist/bot/bot.js +0 -52
- package/dist/bot/bot.js.map +0 -1
- package/dist/bot/commands.d.ts +0 -8
- package/dist/bot/commands.d.ts.map +0 -1
- package/dist/bot/commands.js +0 -19
- package/dist/bot/commands.js.map +0 -1
- package/dist/bot/permissions.d.ts +0 -13
- package/dist/bot/permissions.d.ts.map +0 -1
- package/dist/bot/permissions.js +0 -16
- package/dist/bot/permissions.js.map +0 -1
- package/dist/browser/actions.d.ts +0 -33
- package/dist/browser/actions.d.ts.map +0 -1
- package/dist/browser/actions.js +0 -44
- package/dist/browser/actions.js.map +0 -1
- package/dist/browser/agent.d.ts +0 -21
- package/dist/browser/agent.d.ts.map +0 -1
- package/dist/browser/agent.js +0 -13
- package/dist/browser/agent.js.map +0 -1
- package/dist/browser/context.d.ts +0 -43
- package/dist/browser/context.d.ts.map +0 -1
- package/dist/browser/context.js +0 -54
- package/dist/browser/context.js.map +0 -1
- package/dist/browser/fingerprint.d.ts +0 -4
- package/dist/browser/fingerprint.d.ts.map +0 -1
- package/dist/browser/fingerprint.js +0 -12
- package/dist/browser/fingerprint.js.map +0 -1
- package/dist/browser/index.d.ts +0 -11
- package/dist/browser/index.d.ts.map +0 -1
- package/dist/browser/index.js +0 -11
- package/dist/browser/index.js.map +0 -1
- package/dist/browser/playwright.d.ts +0 -11
- package/dist/browser/playwright.d.ts.map +0 -1
- package/dist/browser/playwright.js +0 -24
- package/dist/browser/playwright.js.map +0 -1
- package/dist/browser/recorder.d.ts +0 -21
- package/dist/browser/recorder.d.ts.map +0 -1
- package/dist/browser/recorder.js +0 -58
- package/dist/browser/recorder.js.map +0 -1
- package/dist/browser/session.d.ts +0 -14
- package/dist/browser/session.d.ts.map +0 -1
- package/dist/browser/session.js +0 -21
- package/dist/browser/session.js.map +0 -1
- package/dist/browser/snapshot.d.ts +0 -69
- package/dist/browser/snapshot.d.ts.map +0 -1
- package/dist/browser/snapshot.js +0 -133
- package/dist/browser/snapshot.js.map +0 -1
- package/dist/captcha/contract.d.ts +0 -35
- package/dist/captcha/contract.d.ts.map +0 -1
- package/dist/captcha/contract.js +0 -17
- package/dist/captcha/contract.js.map +0 -1
- package/dist/captcha/evidence.d.ts +0 -10
- package/dist/captcha/evidence.d.ts.map +0 -1
- package/dist/captcha/evidence.js +0 -9
- package/dist/captcha/evidence.js.map +0 -1
- package/dist/captcha/guard.d.ts +0 -23
- package/dist/captcha/guard.d.ts.map +0 -1
- package/dist/captcha/guard.js +0 -12
- package/dist/captcha/guard.js.map +0 -1
- package/dist/cli/main.d.ts +0 -4
- package/dist/cli/main.d.ts.map +0 -1
- package/dist/cli/main.js +0 -46
- package/dist/cli/main.js.map +0 -1
- package/dist/core/errors.d.ts +0 -84
- package/dist/core/errors.d.ts.map +0 -1
- package/dist/core/errors.js +0 -54
- package/dist/core/errors.js.map +0 -1
- package/dist/core/events.d.ts +0 -9
- package/dist/core/events.d.ts.map +0 -1
- package/dist/core/events.js +0 -21
- package/dist/core/events.js.map +0 -1
- package/dist/core/hash.d.ts +0 -10
- package/dist/core/hash.d.ts.map +0 -1
- package/dist/core/hash.js +0 -82
- package/dist/core/hash.js.map +0 -1
- package/dist/core/ids.d.ts +0 -10
- package/dist/core/ids.d.ts.map +0 -1
- package/dist/core/ids.js +0 -15
- package/dist/core/ids.js.map +0 -1
- package/dist/delivery/manifest.d.ts +0 -35
- package/dist/delivery/manifest.d.ts.map +0 -1
- package/dist/delivery/manifest.js +0 -68
- package/dist/delivery/manifest.js.map +0 -1
- package/dist/deploy/index.d.ts +0 -6
- package/dist/deploy/index.d.ts.map +0 -1
- package/dist/deploy/index.js +0 -6
- package/dist/deploy/index.js.map +0 -1
- package/dist/dispatch/resumable.d.ts +0 -102
- package/dist/dispatch/resumable.d.ts.map +0 -1
- package/dist/dispatch/resumable.js +0 -64
- package/dist/dispatch/resumable.js.map +0 -1
- package/dist/dispatch/workflow.d.ts +0 -6
- package/dist/dispatch/workflow.d.ts.map +0 -1
- package/dist/dispatch/workflow.js +0 -37
- package/dist/dispatch/workflow.js.map +0 -1
- package/dist/domain/artifacts.d.ts +0 -12
- package/dist/domain/artifacts.d.ts.map +0 -1
- package/dist/domain/artifacts.js +0 -14
- package/dist/domain/artifacts.js.map +0 -1
- package/dist/domain/jobs.d.ts +0 -12
- package/dist/domain/jobs.d.ts.map +0 -1
- package/dist/domain/jobs.js +0 -20
- package/dist/domain/jobs.js.map +0 -1
- package/dist/domain/providers.d.ts +0 -10
- package/dist/domain/providers.d.ts.map +0 -1
- package/dist/domain/providers.js +0 -8
- package/dist/domain/providers.js.map +0 -1
- package/dist/domain/runtime.d.ts +0 -14
- package/dist/domain/runtime.d.ts.map +0 -1
- package/dist/domain/runtime.js +0 -10
- package/dist/domain/runtime.js.map +0 -1
- package/dist/domain/sessions.d.ts +0 -12
- package/dist/domain/sessions.d.ts.map +0 -1
- package/dist/domain/sessions.js +0 -57
- package/dist/domain/sessions.js.map +0 -1
- package/dist/examples/localjob.d.ts +0 -2
- package/dist/examples/localjob.d.ts.map +0 -1
- package/dist/examples/localjob.js.map +0 -1
- package/dist/examples/publicapi.d.ts +0 -2
- package/dist/examples/publicapi.d.ts.map +0 -1
- package/dist/examples/publicapi.js.map +0 -1
- package/dist/extension/build.d.ts +0 -9
- package/dist/extension/build.d.ts.map +0 -1
- package/dist/extension/build.js +0 -85
- package/dist/extension/build.js.map +0 -1
- package/dist/extension/content.d.ts +0 -6
- package/dist/extension/content.d.ts.map +0 -1
- package/dist/extension/content.js +0 -135
- package/dist/extension/content.js.map +0 -1
- package/dist/extension/index.d.ts +0 -7
- package/dist/extension/index.d.ts.map +0 -1
- package/dist/extension/index.js +0 -7
- package/dist/extension/index.js.map +0 -1
- package/dist/extension/pagebridge.d.ts +0 -6
- package/dist/extension/pagebridge.d.ts.map +0 -1
- package/dist/extension/pagebridge.js +0 -42
- package/dist/extension/pagebridge.js.map +0 -1
- package/dist/extension/permissions.d.ts +0 -26
- package/dist/extension/permissions.d.ts.map +0 -1
- package/dist/extension/permissions.js +0 -28
- package/dist/extension/permissions.js.map +0 -1
- package/dist/extension/popup.d.ts +0 -5
- package/dist/extension/popup.d.ts.map +0 -1
- package/dist/extension/popup.js +0 -26
- package/dist/extension/popup.js.map +0 -1
- package/dist/extension/protocol.d.ts +0 -58
- package/dist/extension/protocol.d.ts.map +0 -1
- package/dist/extension/protocol.js +0 -101
- package/dist/extension/protocol.js.map +0 -1
- package/dist/extension/serviceworker.d.ts +0 -25
- package/dist/extension/serviceworker.d.ts.map +0 -1
- package/dist/extension/serviceworker.js +0 -102
- package/dist/extension/serviceworker.js.map +0 -1
- package/dist/extension/worker.d.ts +0 -28
- package/dist/extension/worker.d.ts.map +0 -1
- package/dist/extension/worker.js +0 -22
- package/dist/extension/worker.js.map +0 -1
- package/dist/format/check.d.ts +0 -8
- package/dist/format/check.d.ts.map +0 -1
- package/dist/format/check.js +0 -38
- package/dist/format/check.js.map +0 -1
- package/dist/isolation/contracts.d.ts.map +0 -1
- package/dist/isolation/contracts.js.map +0 -1
- package/dist/library/public.d.ts.map +0 -1
- package/dist/library/public.js.map +0 -1
- package/dist/mcp/browser.d.ts +0 -9
- package/dist/mcp/browser.d.ts.map +0 -1
- package/dist/mcp/browser.js +0 -13
- package/dist/mcp/browser.js.map +0 -1
- package/dist/mcp/server.d.ts +0 -35
- package/dist/mcp/server.d.ts.map +0 -1
- package/dist/mcp/server.js +0 -40
- package/dist/mcp/server.js.map +0 -1
- package/dist/mcp/transport.d.ts +0 -7
- package/dist/mcp/transport.d.ts.map +0 -1
- package/dist/mcp/transport.js +0 -17
- package/dist/mcp/transport.js.map +0 -1
- package/dist/memory/bridge.d.ts +0 -14
- package/dist/memory/bridge.d.ts.map +0 -1
- package/dist/memory/bridge.js +0 -16
- package/dist/memory/bridge.js.map +0 -1
- package/dist/memory/engine.d.ts +0 -38
- package/dist/memory/engine.d.ts.map +0 -1
- package/dist/memory/engine.js +0 -109
- package/dist/memory/engine.js.map +0 -1
- package/dist/memory/modes.d.ts +0 -43
- package/dist/memory/modes.d.ts.map +0 -1
- package/dist/memory/modes.js +0 -66
- package/dist/memory/modes.js.map +0 -1
- package/dist/memory/objects.d.ts +0 -21
- package/dist/memory/objects.d.ts.map +0 -1
- package/dist/memory/objects.js +0 -20
- package/dist/memory/objects.js.map +0 -1
- package/dist/memory/planner.d.ts +0 -66
- package/dist/memory/planner.d.ts.map +0 -1
- package/dist/memory/planner.js +0 -108
- package/dist/memory/planner.js.map +0 -1
- package/dist/memory/targets.d.ts +0 -78
- package/dist/memory/targets.d.ts.map +0 -1
- package/dist/memory/targets.js +0 -29
- package/dist/memory/targets.js.map +0 -1
- package/dist/memory/transforms.d.ts +0 -19
- package/dist/memory/transforms.d.ts.map +0 -1
- package/dist/memory/transforms.js +0 -14
- package/dist/memory/transforms.js.map +0 -1
- package/dist/modes/matrix.d.ts +0 -23
- package/dist/modes/matrix.d.ts.map +0 -1
- package/dist/modes/matrix.js +0 -18
- package/dist/modes/matrix.js.map +0 -1
- package/dist/modes/modes.d.ts +0 -33
- package/dist/modes/modes.d.ts.map +0 -1
- package/dist/modes/modes.js +0 -15
- package/dist/modes/modes.js.map +0 -1
- package/dist/modes/resolve.d.ts +0 -96
- package/dist/modes/resolve.d.ts.map +0 -1
- package/dist/modes/resolve.js +0 -48
- package/dist/modes/resolve.js.map +0 -1
- package/dist/observability/metrics.d.ts +0 -14
- package/dist/observability/metrics.d.ts.map +0 -1
- package/dist/observability/metrics.js +0 -18
- package/dist/observability/metrics.js.map +0 -1
- package/dist/packager/manifest.d.ts +0 -66
- package/dist/packager/manifest.d.ts.map +0 -1
- package/dist/packager/manifest.js +0 -94
- package/dist/packager/manifest.js.map +0 -1
- package/dist/packager/publish.d.ts +0 -51
- package/dist/packager/publish.d.ts.map +0 -1
- package/dist/packager/publish.js +0 -18
- package/dist/packager/publish.js.map +0 -1
- package/dist/packager/targetcli.d.ts +0 -7
- package/dist/packager/targetcli.d.ts.map +0 -1
- package/dist/packager/targetcli.js.map +0 -1
- package/dist/persistence/adapter.d.ts +0 -5
- package/dist/persistence/adapter.d.ts.map +0 -1
- package/dist/persistence/adapter.js +0 -11
- package/dist/persistence/adapter.js.map +0 -1
- package/dist/persistence/drizzle.d.ts +0 -2
- package/dist/persistence/drizzle.d.ts.map +0 -1
- package/dist/persistence/drizzle.js +0 -12
- package/dist/persistence/drizzle.js.map +0 -1
- package/dist/persistence/memory.d.ts +0 -2
- package/dist/persistence/memory.d.ts.map +0 -1
- package/dist/persistence/memory.js +0 -27
- package/dist/persistence/memory.js.map +0 -1
- package/dist/persistence/migrations.d.ts +0 -19
- package/dist/persistence/migrations.d.ts.map +0 -1
- package/dist/persistence/migrations.js +0 -13
- package/dist/persistence/migrations.js.map +0 -1
- package/dist/persistence/prisma.d.ts +0 -2
- package/dist/persistence/prisma.d.ts.map +0 -1
- package/dist/persistence/prisma.js +0 -25
- package/dist/persistence/prisma.js.map +0 -1
- package/dist/persistence/schema.d.ts +0 -63
- package/dist/persistence/schema.d.ts.map +0 -1
- package/dist/persistence/schema.js +0 -28
- package/dist/persistence/schema.js.map +0 -1
- package/dist/persistence/sql.d.ts +0 -3
- package/dist/persistence/sql.d.ts.map +0 -1
- package/dist/persistence/sql.js +0 -37
- package/dist/persistence/sql.js.map +0 -1
- package/dist/protocol/blocks.d.ts +0 -10
- package/dist/protocol/blocks.d.ts.map +0 -1
- package/dist/protocol/blocks.js +0 -26
- package/dist/protocol/blocks.js.map +0 -1
- package/dist/protocol/json.d.ts +0 -6
- package/dist/protocol/json.d.ts.map +0 -1
- package/dist/protocol/json.js +0 -6
- package/dist/protocol/json.js.map +0 -1
- package/dist/protocol/ndjson.d.ts +0 -3
- package/dist/protocol/ndjson.d.ts.map +0 -1
- package/dist/protocol/ndjson.js +0 -20
- package/dist/protocol/ndjson.js.map +0 -1
- package/dist/protocol/sse.d.ts +0 -7
- package/dist/protocol/sse.d.ts.map +0 -1
- package/dist/protocol/sse.js +0 -25
- package/dist/protocol/sse.js.map +0 -1
- package/dist/proxy/pool.d.ts +0 -9
- package/dist/proxy/pool.d.ts.map +0 -1
- package/dist/proxy/pool.js +0 -27
- package/dist/proxy/pool.js.map +0 -1
- package/dist/queue/idempotency.d.ts +0 -10
- package/dist/queue/idempotency.d.ts.map +0 -1
- package/dist/queue/idempotency.js +0 -13
- package/dist/queue/idempotency.js.map +0 -1
- package/dist/queue/persistent.d.ts +0 -14
- package/dist/queue/persistent.d.ts.map +0 -1
- package/dist/queue/persistent.js +0 -66
- package/dist/queue/persistent.js.map +0 -1
- package/dist/queue/queue.d.ts +0 -7
- package/dist/queue/queue.d.ts.map +0 -1
- package/dist/queue/queue.js +0 -55
- package/dist/queue/queue.js.map +0 -1
- package/dist/queue/saga.d.ts +0 -5
- package/dist/queue/saga.d.ts.map +0 -1
- package/dist/queue/saga.js +0 -20
- package/dist/queue/saga.js.map +0 -1
- package/dist/release/assets.d.ts +0 -144
- package/dist/release/assets.d.ts.map +0 -1
- package/dist/release/assets.js +0 -157
- package/dist/release/assets.js.map +0 -1
- package/dist/release/evidence.d.ts +0 -92
- package/dist/release/evidence.d.ts.map +0 -1
- package/dist/release/evidence.js +0 -148
- package/dist/release/evidence.js.map +0 -1
- package/dist/release/verify.d.ts +0 -12
- package/dist/release/verify.d.ts.map +0 -1
- package/dist/release/verify.js +0 -112
- package/dist/release/verify.js.map +0 -1
- package/dist/runners/chain.d.ts +0 -125
- package/dist/runners/chain.d.ts.map +0 -1
- package/dist/runners/chain.js +0 -95
- package/dist/runners/chain.js.map +0 -1
- package/dist/runners/health.d.ts +0 -36
- package/dist/runners/health.d.ts.map +0 -1
- package/dist/runners/health.js +0 -26
- package/dist/runners/health.js.map +0 -1
- package/dist/runners/heartbeat.d.ts +0 -23
- package/dist/runners/heartbeat.d.ts.map +0 -1
- package/dist/runners/heartbeat.js +0 -29
- package/dist/runners/heartbeat.js.map +0 -1
- package/dist/runners/inprocess.d.ts +0 -17
- package/dist/runners/inprocess.d.ts.map +0 -1
- package/dist/runners/inprocess.js +0 -20
- package/dist/runners/inprocess.js.map +0 -1
- package/dist/runners/scheduler.d.ts +0 -5
- package/dist/runners/scheduler.d.ts.map +0 -1
- package/dist/runners/scheduler.js +0 -19
- package/dist/runners/scheduler.js.map +0 -1
- package/dist/runtime/abort.d.ts +0 -8
- package/dist/runtime/abort.d.ts.map +0 -1
- package/dist/runtime/abort.js +0 -13
- package/dist/runtime/abort.js.map +0 -1
- package/dist/runtime/compatibility.d.ts +0 -37
- package/dist/runtime/compatibility.d.ts.map +0 -1
- package/dist/runtime/compatibility.js +0 -10
- package/dist/runtime/compatibility.js.map +0 -1
- package/dist/runtime/detect.d.ts +0 -13
- package/dist/runtime/detect.d.ts.map +0 -1
- package/dist/runtime/detect.js +0 -18
- package/dist/runtime/detect.js.map +0 -1
- package/dist/runtime/engine.d.ts +0 -20
- package/dist/runtime/engine.d.ts.map +0 -1
- package/dist/runtime/engine.js +0 -61
- package/dist/runtime/engine.js.map +0 -1
- package/dist/runtime/retry.d.ts +0 -19
- package/dist/runtime/retry.d.ts.map +0 -1
- package/dist/runtime/retry.js +0 -54
- package/dist/runtime/retry.js.map +0 -1
- package/dist/runtime/worker.d.ts +0 -10
- package/dist/runtime/worker.d.ts.map +0 -1
- package/dist/runtime/worker.js +0 -25
- package/dist/runtime/worker.js.map +0 -1
- package/dist/scrape/cache.d.ts +0 -45
- package/dist/scrape/cache.d.ts.map +0 -1
- package/dist/scrape/cache.js +0 -45
- package/dist/scrape/cache.js.map +0 -1
- package/dist/scrape/crawl.d.ts +0 -47
- package/dist/scrape/crawl.d.ts.map +0 -1
- package/dist/scrape/crawl.js +0 -114
- package/dist/scrape/crawl.js.map +0 -1
- package/dist/scrape/extract.d.ts +0 -63
- package/dist/scrape/extract.d.ts.map +0 -1
- package/dist/scrape/extract.js +0 -47
- package/dist/scrape/extract.js.map +0 -1
- package/dist/scrape/normalize.d.ts +0 -52
- package/dist/scrape/normalize.d.ts.map +0 -1
- package/dist/scrape/normalize.js +0 -102
- package/dist/scrape/normalize.js.map +0 -1
- package/dist/scrape/robots.d.ts +0 -37
- package/dist/scrape/robots.d.ts.map +0 -1
- package/dist/scrape/robots.js +0 -71
- package/dist/scrape/robots.js.map +0 -1
- package/dist/scrape/schema.d.ts +0 -23
- package/dist/scrape/schema.d.ts.map +0 -1
- package/dist/scrape/schema.js +0 -92
- package/dist/scrape/schema.js.map +0 -1
- package/dist/scrape/scraper.d.ts +0 -6
- package/dist/scrape/scraper.d.ts.map +0 -1
- package/dist/scrape/scraper.js +0 -46
- package/dist/scrape/scraper.js.map +0 -1
- package/dist/scrape/semantic.d.ts +0 -25
- package/dist/scrape/semantic.d.ts.map +0 -1
- package/dist/scrape/semantic.js +0 -27
- package/dist/scrape/semantic.js.map +0 -1
- package/dist/server/node.d.ts +0 -7
- package/dist/server/node.d.ts.map +0 -1
- package/dist/server/node.js.map +0 -1
- package/dist/sessions/file.d.ts +0 -25
- package/dist/sessions/file.d.ts.map +0 -1
- package/dist/sessions/file.js +0 -13
- package/dist/sessions/file.js.map +0 -1
- package/dist/sessions/replay.d.ts +0 -9
- package/dist/sessions/replay.d.ts.map +0 -1
- package/dist/sessions/replay.js +0 -70
- package/dist/sessions/replay.js.map +0 -1
- package/dist/sessions/store.d.ts +0 -25
- package/dist/sessions/store.d.ts.map +0 -1
- package/dist/sessions/store.js +0 -13
- package/dist/sessions/store.js.map +0 -1
- package/dist/storage/adapter.d.ts +0 -5
- package/dist/storage/adapter.d.ts.map +0 -1
- package/dist/storage/adapter.js +0 -11
- package/dist/storage/adapter.js.map +0 -1
- package/dist/storage/cache.d.ts +0 -23
- package/dist/storage/cache.d.ts.map +0 -1
- package/dist/storage/cache.js +0 -79
- package/dist/storage/cache.js.map +0 -1
- package/dist/storage/checksum.d.ts +0 -3
- package/dist/storage/checksum.d.ts.map +0 -1
- package/dist/storage/checksum.js +0 -19
- package/dist/storage/checksum.js.map +0 -1
- package/dist/storage/chunked.d.ts +0 -21
- package/dist/storage/chunked.d.ts.map +0 -1
- package/dist/storage/chunked.js +0 -67
- package/dist/storage/chunked.js.map +0 -1
- package/dist/storage/content.d.ts +0 -24
- package/dist/storage/content.d.ts.map +0 -1
- package/dist/storage/content.js +0 -44
- package/dist/storage/content.js.map +0 -1
- package/dist/storage/filehosting.d.ts +0 -2
- package/dist/storage/filehosting.d.ts.map +0 -1
- package/dist/storage/filehosting.js +0 -24
- package/dist/storage/filehosting.js.map +0 -1
- package/dist/storage/githubcontents.d.ts +0 -2
- package/dist/storage/githubcontents.d.ts.map +0 -1
- package/dist/storage/githubcontents.js +0 -29
- package/dist/storage/githubcontents.js.map +0 -1
- package/dist/storage/index.d.ts +0 -12
- package/dist/storage/index.d.ts.map +0 -1
- package/dist/storage/index.js +0 -12
- package/dist/storage/index.js.map +0 -1
- package/dist/storage/local.d.ts +0 -2
- package/dist/storage/local.d.ts.map +0 -1
- package/dist/storage/local.js +0 -72
- package/dist/storage/local.js.map +0 -1
- package/dist/storage/memory.d.ts +0 -6
- package/dist/storage/memory.d.ts.map +0 -1
- package/dist/storage/memory.js +0 -36
- package/dist/storage/memory.js.map +0 -1
- package/dist/storage/pool.d.ts +0 -95
- package/dist/storage/pool.d.ts.map +0 -1
- package/dist/storage/pool.js +0 -202
- package/dist/storage/pool.js.map +0 -1
- package/dist/storage/s3compatible.d.ts +0 -3
- package/dist/storage/s3compatible.d.ts.map +0 -1
- package/dist/storage/s3compatible.js +0 -70
- package/dist/storage/s3compatible.js.map +0 -1
- package/dist/storage/sync.d.ts +0 -47
- package/dist/storage/sync.d.ts.map +0 -1
- package/dist/storage/sync.js +0 -75
- package/dist/storage/sync.js.map +0 -1
- package/dist/surfaces/adapters.d.ts +0 -97
- package/dist/surfaces/adapters.d.ts.map +0 -1
- package/dist/surfaces/adapters.js +0 -50
- package/dist/surfaces/adapters.js.map +0 -1
- package/dist/surfaces/controls.d.ts +0 -18
- package/dist/surfaces/controls.d.ts.map +0 -1
- package/dist/surfaces/controls.js +0 -45
- package/dist/surfaces/controls.js.map +0 -1
- package/dist/surfaces/manifest.d.ts +0 -68
- package/dist/surfaces/manifest.d.ts.map +0 -1
- package/dist/surfaces/manifest.js +0 -42
- package/dist/surfaces/manifest.js.map +0 -1
- package/dist/surfaces/n8n.d.ts +0 -25
- package/dist/surfaces/n8n.d.ts.map +0 -1
- package/dist/surfaces/n8n.js +0 -31
- package/dist/surfaces/n8n.js.map +0 -1
- package/dist/surfaces/operations.d.ts +0 -32
- package/dist/surfaces/operations.d.ts.map +0 -1
- package/dist/surfaces/operations.js +0 -53
- package/dist/surfaces/operations.js.map +0 -1
- package/dist/surfaces/requirements.d.ts +0 -29
- package/dist/surfaces/requirements.d.ts.map +0 -1
- package/dist/surfaces/requirements.js +0 -50
- package/dist/surfaces/requirements.js.map +0 -1
- package/dist/surfaces/targets.d.ts +0 -196
- package/dist/surfaces/targets.d.ts.map +0 -1
- package/dist/surfaces/targets.js +0 -27
- package/dist/surfaces/targets.js.map +0 -1
- package/dist/webhook/delivery.d.ts +0 -18
- package/dist/webhook/delivery.d.ts.map +0 -1
- package/dist/webhook/delivery.js +0 -36
- package/dist/webhook/delivery.js.map +0 -1
- package/dist/webhook/receiver.d.ts +0 -26
- package/dist/webhook/receiver.d.ts.map +0 -1
- package/dist/webhook/receiver.js +0 -24
- package/dist/webhook/receiver.js.map +0 -1
- package/dist/webhook/signature.d.ts +0 -3
- package/dist/webhook/signature.d.ts.map +0 -1
- package/dist/webhook/signature.js +0 -7
- package/dist/webhook/signature.js.map +0 -1
- package/dist/workflow/manifest.d.ts +0 -22
- package/dist/workflow/manifest.d.ts.map +0 -1
- package/dist/workflow/manifest.js +0 -21
- package/dist/workflow/manifest.js.map +0 -1
- package/dist/workflow/registry.d.ts +0 -7
- package/dist/workflow/registry.d.ts.map +0 -1
- package/dist/workflow/registry.js +0 -18
- package/dist/workflow/registry.js.map +0 -1
- package/dist/workflow/templates.d.ts +0 -6
- package/dist/workflow/templates.d.ts.map +0 -1
- package/dist/workflow/templates.js +0 -18
- package/dist/workflow/templates.js.map +0 -1
- package/dist/workflow/triggers.d.ts +0 -64
- package/dist/workflow/triggers.d.ts.map +0 -1
- package/dist/workflow/triggers.js +0 -99
- package/dist/workflow/triggers.js.map +0 -1
- /package/{extension/README.md → docs/extension.md} +0 -0
|
@@ -0,0 +1,818 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* virtualmemory - virtual memory tiers, controllers and the host-aware
|
|
3
|
+
* extreme memory planner.
|
|
4
|
+
*
|
|
5
|
+
* This module owns everything memory related: the MEMORY_TIERS catalog with
|
|
6
|
+
* real bandwidth figures (DDR5-6400 system memory, HBM3e stacked memory at
|
|
7
|
+
* 8 TB/s, GDDR7 graphics memory at 1792 GB/s), MIG slicing profiles
|
|
8
|
+
* (1g.24gb, 2g.48gb, 4g.96gb), NUMA topology generation, huge page planning
|
|
9
|
+
* (1 GB and 2 MB), the kernel samepage merging controller, virtio ballooning,
|
|
10
|
+
* swap overcommit with vm.overcommit_memory=2 semantics, the tmpfs shader
|
|
11
|
+
* cache (20 GB), Docker memory flags (MemorySwap -1 and ShmSize 2g, the fix
|
|
12
|
+
* for the classic PyTorch DataLoader bus error), tiered memory controllers
|
|
13
|
+
* modeled on real silicon, a fluent region builder, a guarding region Proxy
|
|
14
|
+
* and the virtualmemorymanager facade that ties every technique together.
|
|
15
|
+
*
|
|
16
|
+
* The v2 merge adds two host-aware layers absorbed from the Meta sources:
|
|
17
|
+
* the placement tier taxonomy (DRAM_FAST, DRAM_SLOW, CXL_FM, CXL_PMEM,
|
|
18
|
+
* HBM_BLACKWELL, ZRAM, PMEM_DAX) with CXL 2.0/3.0 Type-3 device profiles,
|
|
19
|
+
* zram compression profiles, transparent huge page profiles and CCD-aware
|
|
20
|
+
* vCPU pinning for the Ryzen 9 9950X3D; and the memorymodularizer class
|
|
21
|
+
* that detects real host tiers (lspci CXL scan, /dev/pmem0, shared
|
|
22
|
+
* Blackwell memory), plans zram with workload-dependent compression
|
|
23
|
+
* factors, synthesizes tiered QEMU arguments, exports cgroup v2 slices and
|
|
24
|
+
* QMP runtime commands, and persists plans as JSON. /proc/meminfo
|
|
25
|
+
* generation (generateVirtualMeminfo, meminfoptions, pagealign) moved here
|
|
26
|
+
* from the processor module so every memory concern lives in one file.
|
|
27
|
+
*
|
|
28
|
+
* Modularity extremes are first class: 1 to 192 vCPUs, 1 to 1024 GB of RAM
|
|
29
|
+
* and 8 to 96 GB of VRAM, all user chosen and validated against hard limits.
|
|
30
|
+
*
|
|
31
|
+
* Bandwidth sources verified on 2026-08-22: JEDEC DDR5-6400 (51.2 GB/s per
|
|
32
|
+
* channel), NVIDIA B200 and AMD Instinct MI350X HBM3e (8 TB/s aggregate),
|
|
33
|
+
* GeForce RTX 5090 and RTX PRO 6000 Blackwell GDDR7 (1792 GB/s over a
|
|
34
|
+
* 512-bit bus). CXL figures follow the CXL 2.0/3.0 Type-3 fabric numbers
|
|
35
|
+
* (178-195 ns latency, 32-64 GB/s per x16 PCIe 5.0 link) documented in the
|
|
36
|
+
* project research; zram compression ratios (lzo-rle 3.1:1, zstd 4.2:1)
|
|
37
|
+
* follow the kernel zram documentation.
|
|
38
|
+
*
|
|
39
|
+
* Contexts (25): memoryerror, memorytierid, MEMORY_TIERS, memorylimits,
|
|
40
|
+
* MIGPROFILES, validatememoryrequest, buildnumatopology, planhugepages,
|
|
41
|
+
* ksmcontroller, ballooningcontroller, overcommitcontroller,
|
|
42
|
+
* planswapdevices, shadercachecontroller, dockerMemoryFlags,
|
|
43
|
+
* memorycontroller, memoryregion, regionledger, memorystats, memoryplan,
|
|
44
|
+
* virtualmemorymanager, placementtier, cxxldevice, zramprofile,
|
|
45
|
+
* memorymodularizer, generateVirtualMeminfo.
|
|
46
|
+
*
|
|
47
|
+
* Patterns: strategy (memorycontroller), builder (regionbuilder), registry
|
|
48
|
+
* (regionledger), proxy (guardregion), observer (memorystats), facade
|
|
49
|
+
* (virtualmemorymanager), planner (memorymodularizer).
|
|
50
|
+
* Rules: lowercase identifiers, english jsdoc, third person, no emoji,
|
|
51
|
+
* try/catch catcher on every fallible path, node:* built-ins only, and no
|
|
52
|
+
* hardcoded localhost address anywhere.
|
|
53
|
+
*/
|
|
54
|
+
/** Error thrown by every memory subsystem with an optional cause chain. */
|
|
55
|
+
export declare class memoryerror extends Error {
|
|
56
|
+
/** Machine readable subsystem tag. */
|
|
57
|
+
readonly subsystem: string;
|
|
58
|
+
constructor(message: string, options?: {
|
|
59
|
+
cause?: Error;
|
|
60
|
+
subsystem?: string;
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
/** Identifiers of the supported memory tiers. */
|
|
64
|
+
export type memorytierid = 'ddr5' | 'hbm3e' | 'gddr7';
|
|
65
|
+
/** Static description of one memory tier. */
|
|
66
|
+
export type memorytier = {
|
|
67
|
+
readonly id: memorytierid;
|
|
68
|
+
readonly label: string;
|
|
69
|
+
readonly technology: string;
|
|
70
|
+
readonly perchannelgbs: number;
|
|
71
|
+
readonly channels: number;
|
|
72
|
+
readonly modulegb: number;
|
|
73
|
+
readonly latencyns: number;
|
|
74
|
+
readonly usedfor: string;
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* MEMORY_TIERS: the catalog of virtual memory technologies with real
|
|
78
|
+
* bandwidth arithmetic. DDR5-6400 moves 51.2 GB/s per channel (2 channels
|
|
79
|
+
* on desktop parts such as Ryzen and Core Ultra, 12 channels on EPYC SP5),
|
|
80
|
+
* HBM3e delivers 8 TB/s aggregate on B200 and MI350X class accelerators and
|
|
81
|
+
* GDDR7 reaches 1792 GB/s across the 512-bit bus of RTX 5090 and RTX PRO
|
|
82
|
+
* 6000 Blackwell boards.
|
|
83
|
+
*/
|
|
84
|
+
export declare const MEMORY_TIERS: {
|
|
85
|
+
readonly ddr5: {
|
|
86
|
+
readonly id: 'ddr5';
|
|
87
|
+
readonly label: 'DDR5-6400 system memory';
|
|
88
|
+
readonly technology: 'DDR5 SDRAM at 6400 MT/s';
|
|
89
|
+
readonly perchannelgbs: 51.2;
|
|
90
|
+
readonly channels: 12;
|
|
91
|
+
readonly modulegb: 96;
|
|
92
|
+
readonly latencyns: 76;
|
|
93
|
+
readonly usedfor: 'guest RAM, page cache, tmpfs shader cache';
|
|
94
|
+
};
|
|
95
|
+
readonly hbm3e: {
|
|
96
|
+
readonly id: 'hbm3e';
|
|
97
|
+
readonly label: 'HBM3e stacked memory';
|
|
98
|
+
readonly technology: 'high bandwidth memory 3e, 8 stacks';
|
|
99
|
+
readonly perchannelgbs: 1000;
|
|
100
|
+
readonly channels: 8;
|
|
101
|
+
readonly modulegb: 36;
|
|
102
|
+
readonly latencyns: 29;
|
|
103
|
+
readonly usedfor: 'datacenter accelerator memory (B200 192 GB, MI350X 288 GB)';
|
|
104
|
+
};
|
|
105
|
+
readonly gddr7: {
|
|
106
|
+
readonly id: 'gddr7';
|
|
107
|
+
readonly label: 'GDDR7 graphics memory';
|
|
108
|
+
readonly technology: 'GDDR7 at 28 Gbps over a 512-bit bus';
|
|
109
|
+
readonly perchannelgbs: 224;
|
|
110
|
+
readonly channels: 8;
|
|
111
|
+
readonly modulegb: 16;
|
|
112
|
+
readonly latencyns: 42;
|
|
113
|
+
readonly usedfor: 'workstation and consumer GPUs (RTX 5090, RTX PRO 6000)';
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
/** Returns one tier descriptor, throwing for unknown identifiers. */
|
|
117
|
+
export declare function selecttier<const T extends memorytierid>(id: T): memorytier;
|
|
118
|
+
/** Aggregated bandwidth of one tier in GB/s (per channel times channels). */
|
|
119
|
+
export declare function tierbandwidthgbs(id: memorytierid): number;
|
|
120
|
+
/** Numeric bounds enforced for every memory request. */
|
|
121
|
+
export type memorylimits = {
|
|
122
|
+
readonly minvcpu: number;
|
|
123
|
+
readonly maxvcpu: number;
|
|
124
|
+
readonly minramgb: number;
|
|
125
|
+
readonly maxramgb: number;
|
|
126
|
+
readonly minvramgb: number;
|
|
127
|
+
readonly maxvramgb: number;
|
|
128
|
+
};
|
|
129
|
+
/** Extremes of modularity supported by the virtual memory planner. */
|
|
130
|
+
export declare const memorylimits: {
|
|
131
|
+
readonly minvcpu: 1;
|
|
132
|
+
readonly maxvcpu: 192;
|
|
133
|
+
readonly minramgb: 1;
|
|
134
|
+
readonly maxramgb: 1024;
|
|
135
|
+
readonly minvramgb: 8;
|
|
136
|
+
readonly maxvramgb: 96;
|
|
137
|
+
};
|
|
138
|
+
/** A memory request submitted by the user for planning and validation. */
|
|
139
|
+
export type memoryrequest = {
|
|
140
|
+
readonly vcpus?: number;
|
|
141
|
+
readonly ramgb?: number;
|
|
142
|
+
readonly vramgb?: number;
|
|
143
|
+
readonly mig?: migprofileid;
|
|
144
|
+
readonly tier?: memorytierid;
|
|
145
|
+
};
|
|
146
|
+
/** Outcome of validating a memory request. */
|
|
147
|
+
export type memoryrequestresult = {
|
|
148
|
+
readonly valid: boolean;
|
|
149
|
+
readonly errors: readonly string[];
|
|
150
|
+
readonly warnings: readonly string[];
|
|
151
|
+
readonly plan: memoryplan | null;
|
|
152
|
+
};
|
|
153
|
+
/** MIG slicing profile identifier, or off for a monolithic device. */
|
|
154
|
+
export type migprofileid = '1g.24gb' | '2g.48gb' | '4g.96gb' | 'off';
|
|
155
|
+
/** Static description of one MIG slicing profile. */
|
|
156
|
+
export type migprofile = {
|
|
157
|
+
readonly id: migprofileid;
|
|
158
|
+
readonly slicegb: number;
|
|
159
|
+
readonly maxinstances: number;
|
|
160
|
+
};
|
|
161
|
+
/**
|
|
162
|
+
* MIG profiles available on the 96 GB virtual device. The identifiers keep
|
|
163
|
+
* the NVIDIA convention of compute-slice names: 1g.24gb exposes 24 GB
|
|
164
|
+
* slices (up to 4 instances), 2g.48gb exposes 48 GB slices (up to 2
|
|
165
|
+
* instances) and 4g.96gb dedicates the full 96 GB to one instance.
|
|
166
|
+
*/
|
|
167
|
+
export declare const MIGPROFILES: readonly migprofile[];
|
|
168
|
+
/** Resolves a MIG profile by identifier, throwing for unknown names. */
|
|
169
|
+
export declare function getmigprofile(id: migprofileid): migprofile | null;
|
|
170
|
+
/**
|
|
171
|
+
* Validates a memory request against the hard limits and the MIG catalog.
|
|
172
|
+
* The function reuses the rule style of the core validator: it accumulates
|
|
173
|
+
* errors for limit violations, warnings for suspicious-but-legal layouts
|
|
174
|
+
* (for example RAM below 16 GB with 96 GB of VRAM, or ballooning suggested
|
|
175
|
+
* when RAM exceeds 512 GB) and builds a plan when the request is valid.
|
|
176
|
+
*/
|
|
177
|
+
export declare function validatememoryrequest(request: memoryrequest): memoryrequestresult;
|
|
178
|
+
/** NUMA topology of a virtual machine. */
|
|
179
|
+
export type numatopology = {
|
|
180
|
+
readonly nodes: number;
|
|
181
|
+
readonly cpuranges: readonly string[];
|
|
182
|
+
readonly distances: readonly (readonly number[])[];
|
|
183
|
+
readonly description: string;
|
|
184
|
+
};
|
|
185
|
+
/**
|
|
186
|
+
* Builds a NUMA topology for a vCPU count split across a node count. Local
|
|
187
|
+
* distance is 10 and remote nodes sit at 32, mirroring the NPS modes of
|
|
188
|
+
* AMD EPYC parts; cpu ranges are rendered as the compact lists used by
|
|
189
|
+
* lscpu and numactl.
|
|
190
|
+
*/
|
|
191
|
+
export declare function buildnumatopology(vcpus: number, nodes: number): numatopology;
|
|
192
|
+
/** Curated NUMA presets for common EPYC thread counts. */
|
|
193
|
+
export declare const NUMATOPOLOGIES: readonly numatopology[];
|
|
194
|
+
/** One huge page reservation request. */
|
|
195
|
+
export type hugepageconfig = {
|
|
196
|
+
readonly size: '1G' | '2M';
|
|
197
|
+
readonly count: number;
|
|
198
|
+
readonly coversgb: number;
|
|
199
|
+
};
|
|
200
|
+
/**
|
|
201
|
+
* Plans huge page reservations for a RAM size. Machines with at least 256 GB
|
|
202
|
+
* reserve half of their RAM as 1 GB pages for large model weights, plus a
|
|
203
|
+
* pool of 2048 2 MB pages for medium allocations; smaller machines keep a
|
|
204
|
+
* 2 MB-only layout.
|
|
205
|
+
*/
|
|
206
|
+
export declare function planhugepages(ramgb: number): hugepageconfig[];
|
|
207
|
+
/**
|
|
208
|
+
* Kernel samepage merging controller. KSM scans anonymous pages and merges
|
|
209
|
+
* identical ones, which matters for dense virtual machines running the same
|
|
210
|
+
* runtime image; the controller models the sysfs knobs documented by the
|
|
211
|
+
* kernel (run, pages_to_scan, sleep_millisecs, merge_across_nodes) and
|
|
212
|
+
* estimates the deduplication ratio from the shared/sharing counters.
|
|
213
|
+
*/
|
|
214
|
+
export declare class ksmcontroller {
|
|
215
|
+
#private;
|
|
216
|
+
constructor(pagestoscan?: number, sleepmillisecs?: number);
|
|
217
|
+
/** Enables KSM and returns the sysfs writes required. */
|
|
218
|
+
enable(): string[];
|
|
219
|
+
/** Disables KSM, leaving the scan counters untouched. */
|
|
220
|
+
disable(): string[];
|
|
221
|
+
/** Tunes the scanner aggressiveness. */
|
|
222
|
+
tune(pagestoscan: number, sleepmillisecs: number): this;
|
|
223
|
+
/** Reports whether the controller is currently enabled. */
|
|
224
|
+
get running(): boolean;
|
|
225
|
+
/**
|
|
226
|
+
* Estimates the deduplication ratio from the classic kernel counters:
|
|
227
|
+
* pages_shared counts merged unique pages and pages_sharing counts the
|
|
228
|
+
* extra references pointing at them.
|
|
229
|
+
*/
|
|
230
|
+
estimatesavings(pagesshared: number, pagessharing: number): {
|
|
231
|
+
ratio: number;
|
|
232
|
+
freedmb: number;
|
|
233
|
+
};
|
|
234
|
+
/** Renders the sysfs plan for logs and provisioners. */
|
|
235
|
+
describe(): Record<string, unknown>;
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Virtio ballooning controller. The balloon lets the host reclaim guest
|
|
239
|
+
* memory on demand and gives it back under pressure; the controller tracks
|
|
240
|
+
* the current target and honors a deflate-on-OOM policy so guests never
|
|
241
|
+
* deadlock while the balloon is inflated.
|
|
242
|
+
*/
|
|
243
|
+
export declare class ballooningcontroller {
|
|
244
|
+
#private;
|
|
245
|
+
constructor(maxmb: number);
|
|
246
|
+
/** Inflates the balloon to a target in MB, clamped to the maximum. */
|
|
247
|
+
inflate(targetmb: number): number;
|
|
248
|
+
/** Deflates the balloon by the requested amount, floored at zero. */
|
|
249
|
+
deflate(amountmb: number): number;
|
|
250
|
+
/** Current balloon target in MB. */
|
|
251
|
+
get targetmb(): number;
|
|
252
|
+
/** Renders the QEMU device plan for the balloon. */
|
|
253
|
+
describe(): Record<string, unknown>;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Swap overcommit controller implementing the vm.overcommit_memory=2
|
|
257
|
+
* semantics documented in Documentation/mm/overcommit-accounting.rst: the
|
|
258
|
+
* total committed address space may never exceed swap plus a configurable
|
|
259
|
+
* percentage of RAM (overcommit_ratio, default 50). The controller computes
|
|
260
|
+
* the commit limit and recommends swap sizing for a target commit budget.
|
|
261
|
+
*/
|
|
262
|
+
export declare class overcommitcontroller {
|
|
263
|
+
#private;
|
|
264
|
+
constructor(ratio?: number);
|
|
265
|
+
/** Sets the overcommit ratio percentage applied in mode 2. */
|
|
266
|
+
setratio(ratio: number): this;
|
|
267
|
+
/** Computes the commit limit in GB for a RAM and swap configuration. */
|
|
268
|
+
commitlimitgb(ramgb: number, swapgb: number): number;
|
|
269
|
+
/** Recommends the swap size in GB for a desired commit budget. */
|
|
270
|
+
recommendswapgb(ramgb: number, targetcommitgb: number): number;
|
|
271
|
+
/** Renders the sysctl dictionary for this controller. */
|
|
272
|
+
sysctl(): Record<string, string>;
|
|
273
|
+
/** Renders the controller plan for logs and provisioners. */
|
|
274
|
+
describe(): Record<string, unknown>;
|
|
275
|
+
}
|
|
276
|
+
/** One swap backing store attached to the virtual machine. */
|
|
277
|
+
export type swapdevice = {
|
|
278
|
+
readonly kind: 'zram' | 'swapfile' | 'partition';
|
|
279
|
+
readonly sizegb: number;
|
|
280
|
+
readonly priority: number;
|
|
281
|
+
readonly compressed: boolean;
|
|
282
|
+
};
|
|
283
|
+
/**
|
|
284
|
+
* Plans swap devices for a RAM size. ZRAM (compressed in-memory swap,
|
|
285
|
+
* priority 100) covers latency-sensitive reclaim while a swapfile or
|
|
286
|
+
* partition (priority -2) extends the commit budget required by mode 2
|
|
287
|
+
* overcommit for RAM-heavy builds.
|
|
288
|
+
*/
|
|
289
|
+
export declare function planswapdevices(ramgb: number): swapdevice[];
|
|
290
|
+
/**
|
|
291
|
+
* Tmpfs shader cache controller. Mesa keeps its on-disk shader cache in
|
|
292
|
+
* MESA_SHADER_CACHE_DIR; hosting it on a size-capped tmpfs (20 GB by
|
|
293
|
+
* default) removes disk latency from shader compilation storms typical of
|
|
294
|
+
* LLVMpipe and Lavapipe sessions.
|
|
295
|
+
*/
|
|
296
|
+
export declare class shadercachecontroller {
|
|
297
|
+
#private;
|
|
298
|
+
constructor(sizegb?: number, mountpoint?: string);
|
|
299
|
+
/** Renders the fstab line for the tmpfs mount. */
|
|
300
|
+
fstabline(): string;
|
|
301
|
+
/** Renders the environment block pointing Mesa at the cache. */
|
|
302
|
+
environment(): Record<string, string>;
|
|
303
|
+
/** Mount size in GB. */
|
|
304
|
+
get sizegb(): number;
|
|
305
|
+
/** Renders the controller plan for logs and provisioners. */
|
|
306
|
+
describe(): Record<string, unknown>;
|
|
307
|
+
}
|
|
308
|
+
/** Options for the Docker memory flag generator. */
|
|
309
|
+
export type dockermemoryoptions = {
|
|
310
|
+
readonly ramgb?: number;
|
|
311
|
+
readonly shmsizegb?: number;
|
|
312
|
+
readonly unlimitedswap?: boolean;
|
|
313
|
+
};
|
|
314
|
+
/** Result of the Docker memory flag generator. */
|
|
315
|
+
export type dockermemoryflags = {
|
|
316
|
+
readonly run: readonly string[];
|
|
317
|
+
readonly compose: Readonly<Record<string, unknown>>;
|
|
318
|
+
readonly sysctl: Readonly<Record<string, string>>;
|
|
319
|
+
readonly rationale: readonly string[];
|
|
320
|
+
};
|
|
321
|
+
/**
|
|
322
|
+
* Generates Docker memory flags for a container. MemorySwap -1 keeps swap
|
|
323
|
+
* unlimited as documented by Docker ("unlimited swap, up to the amount
|
|
324
|
+
* available on the host system"), ShmSize 2g raises /dev/shm from the 64 MB
|
|
325
|
+
* default which is the canonical fix for the PyTorch DataLoader bus error,
|
|
326
|
+
* and the tmpfs entry mounts the 20 GB shader cache. Every value remains a
|
|
327
|
+
* suggestion: callers override before use.
|
|
328
|
+
*/
|
|
329
|
+
export declare function dockerMemoryFlags(options?: dockermemoryoptions): dockermemoryflags;
|
|
330
|
+
/** Result of one simulated memory transfer. */
|
|
331
|
+
export type transferview = {
|
|
332
|
+
readonly tier: memorytierid;
|
|
333
|
+
readonly bytes: number;
|
|
334
|
+
readonly direction: 'read' | 'write';
|
|
335
|
+
readonly effectivengbs: number;
|
|
336
|
+
readonly timemicros: number;
|
|
337
|
+
};
|
|
338
|
+
/** Common contract implemented by every tier controller (Strategy). */
|
|
339
|
+
export interface memorycontroller {
|
|
340
|
+
readonly tier: memorytierid;
|
|
341
|
+
readonly totalgb: number;
|
|
342
|
+
readonly bandwidthgbs: number;
|
|
343
|
+
transfer(bytes: number, direction: 'read' | 'write'): transferview;
|
|
344
|
+
latencyns(): number;
|
|
345
|
+
describe(): Record<string, unknown>;
|
|
346
|
+
}
|
|
347
|
+
/** DDR5 controller: channels aggregated, bandwidth scales linearly. */
|
|
348
|
+
export declare class ddr5controller implements memorycontroller {
|
|
349
|
+
#private;
|
|
350
|
+
readonly tier: memorytierid;
|
|
351
|
+
constructor(channels?: number, totalgb?: number);
|
|
352
|
+
/** Aggregate bandwidth in GB/s for the configured channel count. */
|
|
353
|
+
get bandwidthgbs(): number;
|
|
354
|
+
/** Total capacity in GB. */
|
|
355
|
+
get totalgb(): number;
|
|
356
|
+
/** Simulates one transfer over the DDR5 interconnect. */
|
|
357
|
+
transfer(bytes: number, direction: 'read' | 'write'): transferview;
|
|
358
|
+
/** Average column access latency in nanoseconds. */
|
|
359
|
+
latencyns(): number;
|
|
360
|
+
/** Renders the controller plan for logs and provisioners. */
|
|
361
|
+
describe(): Record<string, unknown>;
|
|
362
|
+
}
|
|
363
|
+
/** HBM3e controller: eight stacks, 8 TB/s aggregate, near-SRAM latency. */
|
|
364
|
+
export declare class hbm3econtroller implements memorycontroller {
|
|
365
|
+
#private;
|
|
366
|
+
readonly tier: memorytierid;
|
|
367
|
+
constructor(stacks?: number, totalgb?: number);
|
|
368
|
+
/** Aggregate bandwidth in GB/s for the configured stack count. */
|
|
369
|
+
get bandwidthgbs(): number;
|
|
370
|
+
/** Total capacity in GB. */
|
|
371
|
+
get totalgb(): number;
|
|
372
|
+
/** Simulates one transfer over the HBM3e fabric. */
|
|
373
|
+
transfer(bytes: number, direction: 'read' | 'write'): transferview;
|
|
374
|
+
/** Stack access latency in nanoseconds. */
|
|
375
|
+
latencyns(): number;
|
|
376
|
+
/** Renders the controller plan for logs and provisioners. */
|
|
377
|
+
describe(): Record<string, unknown>;
|
|
378
|
+
}
|
|
379
|
+
/** GDDR7 controller: 512-bit bus, 1792 GB/s at full width. */
|
|
380
|
+
export declare class gddr7controller implements memorycontroller {
|
|
381
|
+
#private;
|
|
382
|
+
readonly tier: memorytierid;
|
|
383
|
+
constructor(channels?: number, totalgb?: number);
|
|
384
|
+
/** Aggregate bandwidth in GB/s for the configured bus width. */
|
|
385
|
+
get bandwidthgbs(): number;
|
|
386
|
+
/** Total capacity in GB. */
|
|
387
|
+
get totalgb(): number;
|
|
388
|
+
/** Simulates one transfer over the GDDR7 bus. */
|
|
389
|
+
transfer(bytes: number, direction: 'read' | 'write'): transferview;
|
|
390
|
+
/** Memory access latency in nanoseconds. */
|
|
391
|
+
latencyns(): number;
|
|
392
|
+
/** Renders the controller plan for logs and provisioners. */
|
|
393
|
+
describe(): Record<string, unknown>;
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* Controller factory (Factory plus Registry patterns): maps a tier
|
|
397
|
+
* identifier to a controller instance sized by the caller. The const type
|
|
398
|
+
* parameter preserves literal tier identifiers through the call.
|
|
399
|
+
*/
|
|
400
|
+
export declare function creatememorycontroller<const T extends memorytierid>(tier: T, totalgb: number, channels?: number): memorycontroller;
|
|
401
|
+
/** Purpose categories of a virtual memory region. */
|
|
402
|
+
export type regionpurpose = 'guest' | 'modelweights' | 'shadercache' | 'scratch' | 'pinned';
|
|
403
|
+
/** A virtual memory region bound to a tier and a purpose. */
|
|
404
|
+
export declare class memoryregion {
|
|
405
|
+
#private;
|
|
406
|
+
readonly id: string;
|
|
407
|
+
readonly tier: memorytierid;
|
|
408
|
+
readonly purpose: regionpurpose;
|
|
409
|
+
readonly sizegb: number;
|
|
410
|
+
constructor(tier: memorytierid, purpose: regionpurpose, sizegb: number);
|
|
411
|
+
/** Number of tracked accesses through proxies or direct reads. */
|
|
412
|
+
get accesses(): number;
|
|
413
|
+
/** True while the region holds virtual backing. */
|
|
414
|
+
get allocated(): boolean;
|
|
415
|
+
/** Counts one access; used by the guarding Proxy. */
|
|
416
|
+
touch(): void;
|
|
417
|
+
/** Releases the region; idempotent and safe to call twice. */
|
|
418
|
+
release(): void;
|
|
419
|
+
/** Synchronous disposer so regions compose with `using` declarations. */
|
|
420
|
+
[Symbol.dispose](): void;
|
|
421
|
+
/** Renders the region plan for logs and provisioners. */
|
|
422
|
+
describe(): Record<string, unknown>;
|
|
423
|
+
}
|
|
424
|
+
/**
|
|
425
|
+
* Fluent builder for memory regions. The builder accumulates tier, purpose
|
|
426
|
+
* and size, validates the result against the tier capacity and produces a
|
|
427
|
+
* memoryregion registered in the regionledger.
|
|
428
|
+
*/
|
|
429
|
+
export declare class regionbuilder {
|
|
430
|
+
#private;
|
|
431
|
+
constructor();
|
|
432
|
+
/** Selects the memory tier backing the region. */
|
|
433
|
+
withtier(tier: memorytierid): this;
|
|
434
|
+
/** Selects the purpose tag of the region. */
|
|
435
|
+
withpurpose(purpose: regionpurpose): this;
|
|
436
|
+
/** Sets the region size in GB. */
|
|
437
|
+
withsize(sizegb: number): this;
|
|
438
|
+
/** Validates and materializes the region, registering it in the ledger. */
|
|
439
|
+
build(): memoryregion;
|
|
440
|
+
}
|
|
441
|
+
/**
|
|
442
|
+
* Wraps a region in a guarding Proxy (Proxy pattern). Every property access
|
|
443
|
+
* is counted and recorded in the access ledger; accesses to released
|
|
444
|
+
* regions raise a memoryerror so consumers notice stale handles
|
|
445
|
+
* immediately instead of silently reading freed virtual memory.
|
|
446
|
+
*/
|
|
447
|
+
export declare function guardregion(region: memoryregion): memoryregion;
|
|
448
|
+
/** Ledger of every live region, keyed by region id (Map first policy). */
|
|
449
|
+
export declare const regionledger: ReadonlyMap<string, memoryregion>;
|
|
450
|
+
/** Records an access probe for a region without keeping it alive. */
|
|
451
|
+
export declare function proberegion(region: memoryregion, accesses: number): void;
|
|
452
|
+
/** Reads the last access probe recorded for a region, if any. */
|
|
453
|
+
export declare function readprobe(region: memoryregion): number | null;
|
|
454
|
+
/** Sums the size of every allocated region in the ledger. */
|
|
455
|
+
export declare function totalallocatedgb(): number;
|
|
456
|
+
/** Payload published when a watermark is crossed. */
|
|
457
|
+
export type pressureevent = {
|
|
458
|
+
readonly level: 'low' | 'high' | 'critical';
|
|
459
|
+
readonly usedfraction: number;
|
|
460
|
+
readonly at: number;
|
|
461
|
+
};
|
|
462
|
+
/** Listener signature of the pressure observer. */
|
|
463
|
+
export type pressurelistener = (event: pressureevent) => void;
|
|
464
|
+
/**
|
|
465
|
+
* Memory pressure observer. The observer keeps listeners in a Map keyed by
|
|
466
|
+
* name (never bound to a runtime event loop) and evaluates samples against
|
|
467
|
+
* the classic watermarks: low at 85 percent, high at 95 percent and
|
|
468
|
+
* critical at 99 percent of the tracked capacity.
|
|
469
|
+
*/
|
|
470
|
+
export declare class memorystats {
|
|
471
|
+
#private;
|
|
472
|
+
constructor(capacitygb: number);
|
|
473
|
+
/** Subscribes a named listener to pressure transitions. */
|
|
474
|
+
subscribe(name: string, listener: pressurelistener): this;
|
|
475
|
+
/** Removes a named listener; returns true when it existed. */
|
|
476
|
+
unsubscribe(name: string): boolean;
|
|
477
|
+
/** Evaluates one used-memory sample and publishes level transitions. */
|
|
478
|
+
evaluate(usedgb: number): pressureevent | null;
|
|
479
|
+
/** Peak observed usage fraction since construction. */
|
|
480
|
+
get peak(): number;
|
|
481
|
+
/** Mean observed usage fraction since construction. */
|
|
482
|
+
get mean(): number;
|
|
483
|
+
}
|
|
484
|
+
/** Complete memory plan of one virtual machine. */
|
|
485
|
+
export type memoryplan = {
|
|
486
|
+
readonly vcpus: number;
|
|
487
|
+
readonly ramgb: number;
|
|
488
|
+
readonly vramgb: number;
|
|
489
|
+
readonly tier: memorytierid;
|
|
490
|
+
readonly mig: migprofileid;
|
|
491
|
+
readonly miginstances: number;
|
|
492
|
+
readonly rambandwidthgbs: number;
|
|
493
|
+
readonly vrambandwidthgbs: number;
|
|
494
|
+
readonly hugepages: readonly hugepageconfig[];
|
|
495
|
+
readonly swapdevices: readonly swapdevice[];
|
|
496
|
+
readonly numa: numatopology;
|
|
497
|
+
readonly shmsizegb: number;
|
|
498
|
+
readonly shadercachesizegb: number;
|
|
499
|
+
};
|
|
500
|
+
/**
|
|
501
|
+
* Computes the full memory plan for a machine: bandwidth per tier, MIG
|
|
502
|
+
* instance count, huge page layout, swap devices, NUMA topology, /dev/shm
|
|
503
|
+
* size and the shader cache ceiling.
|
|
504
|
+
*/
|
|
505
|
+
export declare function planmemory(vcpus: number, ramgb: number, vramgb: number, mig: migprofileid, tier: memorytierid): memoryplan;
|
|
506
|
+
/**
|
|
507
|
+
* Renders kernel boot arguments for the memory techniques enabled by a
|
|
508
|
+
* plan: default 1 GB huge pages plus a 2 MB pool, and the MIG-aware NUMA
|
|
509
|
+
* hints consumed by the virtual machine launcher.
|
|
510
|
+
*/
|
|
511
|
+
export declare function buildKernelArgs(plan: memoryplan): string;
|
|
512
|
+
/**
|
|
513
|
+
* Facade that composes every memory technique for one machine. The manager
|
|
514
|
+
* exposes the plan, the sysctl dictionary, the kernel arguments, the Docker
|
|
515
|
+
* flags, the tier controllers and the pressure observer, and keeps all
|
|
516
|
+
* mutable state in Maps so the instance stays runtime agnostic.
|
|
517
|
+
*/
|
|
518
|
+
export declare class virtualmemorymanager {
|
|
519
|
+
#private;
|
|
520
|
+
constructor(plan: memoryplan);
|
|
521
|
+
/** The frozen plan this manager was constructed from. */
|
|
522
|
+
get plan(): memoryplan;
|
|
523
|
+
/** The pressure observer of this machine. */
|
|
524
|
+
get stats(): memorystats;
|
|
525
|
+
/** The KSM controller of this machine. */
|
|
526
|
+
get ksm(): ksmcontroller;
|
|
527
|
+
/** The ballooning controller of this machine. */
|
|
528
|
+
get balloon(): ballooningcontroller;
|
|
529
|
+
/** Returns the controller bound to a tier, when configured. */
|
|
530
|
+
controller(tier: memorytierid): memorycontroller | null;
|
|
531
|
+
/** Simulates a synthetic workload sample and evaluates pressure. */
|
|
532
|
+
sample(): pressureevent | null;
|
|
533
|
+
/** Renders the sysctl dictionary of every controller. */
|
|
534
|
+
sysctl(): Record<string, string>;
|
|
535
|
+
/** Renders the kernel boot arguments for this machine. */
|
|
536
|
+
kernelargs(): string;
|
|
537
|
+
/** Renders the Docker memory flags for this machine. */
|
|
538
|
+
dockerflags(): dockermemoryflags;
|
|
539
|
+
/** Renders the fstab line of the shader cache tmpfs. */
|
|
540
|
+
cachefstab(): string;
|
|
541
|
+
/** Renders a complete JSON-safe description of the machine memory. */
|
|
542
|
+
describe(): Record<string, unknown>;
|
|
543
|
+
}
|
|
544
|
+
/**
|
|
545
|
+
* Factory that builds a virtualmemorymanager from a raw request. The
|
|
546
|
+
* request is validated against the hard limits; failures raise memoryerror
|
|
547
|
+
* with the accumulated validation errors for quick diagnosis.
|
|
548
|
+
*/
|
|
549
|
+
export declare function createVirtualMemory(request: memoryrequest): virtualmemorymanager;
|
|
550
|
+
/**
|
|
551
|
+
* Placement tier taxonomy for the host-aware planner. The technology and
|
|
552
|
+
* bandwidth catalog stays in memorytierid (ddr5, hbm3e, gddr7); placement
|
|
553
|
+
* labels describe WHERE bytes live relative to the NUMA and fabric
|
|
554
|
+
* topology, mirroring the Meta MemoryTierLabel without merging the two
|
|
555
|
+
* enums.
|
|
556
|
+
*/
|
|
557
|
+
export type placementtier = 'DRAM_FAST' | 'DRAM_SLOW' | 'CXL_FM' | 'CXL_PMEM' | 'HBM_BLACKWELL' | 'ZRAM' | 'PMEM_DAX';
|
|
558
|
+
/** One placement tier instance with its QEMU memory backend. */
|
|
559
|
+
export type placementspec = {
|
|
560
|
+
readonly tier: placementtier;
|
|
561
|
+
readonly sizemb: number;
|
|
562
|
+
readonly latencyns: number;
|
|
563
|
+
readonly bandwidthgbps: number;
|
|
564
|
+
readonly compressionratio?: number;
|
|
565
|
+
readonly persistent?: boolean;
|
|
566
|
+
readonly qemubackend: 'memory-backend-ram' | 'memory-backend-memfd' | 'memory-backend-file';
|
|
567
|
+
readonly extraopts?: Readonly<Record<string, string | number | boolean>>;
|
|
568
|
+
};
|
|
569
|
+
/**
|
|
570
|
+
* CXL 2.0/3.0 Type-3 memory expansion device. Latency spans 178-195 ns and
|
|
571
|
+
* bandwidth 32-64 GB/s per x16 PCIe 5.0 link depending on the spec
|
|
572
|
+
* revision; interleave ways of 2, 4 or 8 spread accesses across decoders.
|
|
573
|
+
*/
|
|
574
|
+
export type cxxldevice = {
|
|
575
|
+
readonly id: string;
|
|
576
|
+
readonly spec: '2.0' | '3.0';
|
|
577
|
+
readonly type: 'type3' | 'switch';
|
|
578
|
+
readonly sizemb: number;
|
|
579
|
+
readonly latencyns: number;
|
|
580
|
+
readonly bwgbps: number;
|
|
581
|
+
readonly qosclass: number;
|
|
582
|
+
readonly decoders: number;
|
|
583
|
+
readonly interleaveways: 2 | 4 | 8;
|
|
584
|
+
};
|
|
585
|
+
/** zram compression profile: lzo-rle favors fast decompression, zstd ratio. */
|
|
586
|
+
export type zramprofile = {
|
|
587
|
+
readonly device: string;
|
|
588
|
+
readonly algorithm: 'lzo-rle' | 'zstd' | 'lzo' | 'lz4';
|
|
589
|
+
readonly level?: number;
|
|
590
|
+
readonly disksizemb: number;
|
|
591
|
+
readonly compratioachieved: number;
|
|
592
|
+
readonly memusedmb: number;
|
|
593
|
+
readonly mountpoint: string;
|
|
594
|
+
};
|
|
595
|
+
/** Huge page allocation profile including the transparent policy and memfd. */
|
|
596
|
+
export type hugepageprofile = {
|
|
597
|
+
readonly size: '2M' | '1G';
|
|
598
|
+
readonly count: number;
|
|
599
|
+
readonly mount: '/dev/hugepages' | '/dev/hugepages-1G';
|
|
600
|
+
readonly transparent: 'always' | 'madvise' | 'never';
|
|
601
|
+
readonly shared: boolean;
|
|
602
|
+
readonly memfd: boolean;
|
|
603
|
+
};
|
|
604
|
+
/**
|
|
605
|
+
* CCD-aware vCPU pinning map for the Ryzen 9 9950X3D. CCD0 carries the 3D
|
|
606
|
+
* V-Cache stacks (96 MB L3) and is preferred for latency-sensitive work;
|
|
607
|
+
* CCD1 (32 MB L3) serves throughput work such as audio and IO threads.
|
|
608
|
+
*/
|
|
609
|
+
export type vcpupinningmap = {
|
|
610
|
+
readonly vmid: string;
|
|
611
|
+
readonly totalvcpus: number;
|
|
612
|
+
readonly topology: {
|
|
613
|
+
readonly sockets: number;
|
|
614
|
+
readonly dies: number;
|
|
615
|
+
readonly ccds: number;
|
|
616
|
+
readonly cores: number;
|
|
617
|
+
readonly threads: number;
|
|
618
|
+
};
|
|
619
|
+
readonly ccd0: {
|
|
620
|
+
readonly cpus: readonly number[];
|
|
621
|
+
readonly vcache: true;
|
|
622
|
+
readonly l3mb: 96;
|
|
623
|
+
readonly preferredfor: readonly string[];
|
|
624
|
+
};
|
|
625
|
+
readonly ccd1: {
|
|
626
|
+
readonly cpus: readonly number[];
|
|
627
|
+
readonly vcache: false;
|
|
628
|
+
readonly l3mb: 32;
|
|
629
|
+
readonly preferredfor: readonly string[];
|
|
630
|
+
};
|
|
631
|
+
readonly pinning: Map<number, readonly number[]>;
|
|
632
|
+
readonly isolated: readonly number[];
|
|
633
|
+
readonly numapolicy: 'strict' | 'preferred' | 'interleave';
|
|
634
|
+
readonly emulatorpin: readonly number[];
|
|
635
|
+
};
|
|
636
|
+
/** Host-aware plan produced by the memorymodularizer (camelCase shape). */
|
|
637
|
+
export type hostmemoryplan = {
|
|
638
|
+
readonly vmid: string;
|
|
639
|
+
readonly totalrequestedmb: number;
|
|
640
|
+
readonly effectiveusablemb: number;
|
|
641
|
+
readonly tiers: readonly placementspec[];
|
|
642
|
+
readonly hugepages: hugepageprofile;
|
|
643
|
+
readonly zram: zramprofile;
|
|
644
|
+
readonly cxl: readonly cxxldevice[];
|
|
645
|
+
readonly vcpu: vcpupinningmap;
|
|
646
|
+
readonly qemuargs: readonly string[];
|
|
647
|
+
readonly backendsdigest: string;
|
|
648
|
+
};
|
|
649
|
+
/** Policy selector for the host-aware tier distribution. */
|
|
650
|
+
export type tierpolicy = 'performance' | 'capacity' | 'balanced';
|
|
651
|
+
/** zram algorithm selector shared by the planner and the profile type. */
|
|
652
|
+
export type zramalgorithm = zramprofile['algorithm'];
|
|
653
|
+
/**
|
|
654
|
+
* Host-aware extreme memory planner, the fusion of the Meta
|
|
655
|
+
* MemoryModularizer and ExtremeMemoryPlanner. The planner detects the real
|
|
656
|
+
* host memory tiers (CXL fabric devices via lspci, PMEM DAX devdax nodes,
|
|
657
|
+
* shared Blackwell HBM), tunes zram with workload-dependent compression
|
|
658
|
+
* factors, plans host-aware huge pages, pins vCPUs across the 9950X3D CCD
|
|
659
|
+
* layout, synthesizes the tiered QEMU arguments, exports cgroup v2 slices
|
|
660
|
+
* and QMP runtime commands, and persists the plan as JSON. All host
|
|
661
|
+
* interaction is best effort: every probe is wrapped in a catcher and
|
|
662
|
+
* degrades to the documented defaults.
|
|
663
|
+
*/
|
|
664
|
+
export declare class memorymodularizer {
|
|
665
|
+
#private;
|
|
666
|
+
constructor(options?: {
|
|
667
|
+
configdir?: string;
|
|
668
|
+
});
|
|
669
|
+
/** Host logical thread count observed at construction. */
|
|
670
|
+
get hostthreads(): number;
|
|
671
|
+
/**
|
|
672
|
+
* Detects the real host tiers. DRAM splits 70/30 into fast and slow
|
|
673
|
+
* bands; an lspci scan for CXL vendor 1e98 or an explicit qemu.config
|
|
674
|
+
* cxl_enabled flag adds a CXL_FM tier; /dev/pmem0 adds a persistent
|
|
675
|
+
* PMEM_DAX tier (128 GB, 300 ns, 15 GB/s); a shared_host_mem blackwell
|
|
676
|
+
* flag exposes half of the GPU VRAM as HBM_BLACKWELL through memfd.
|
|
677
|
+
*/
|
|
678
|
+
detecthosttiers(): placementspec[];
|
|
679
|
+
/**
|
|
680
|
+
* Plans zram sizing and command sequence for a requested capacity. The
|
|
681
|
+
* compression factor adapts to the workload type from passage.config
|
|
682
|
+
* (media_transcode 1.8, build 3.2, default 2.5) and to the algorithm
|
|
683
|
+
* (zstd x1.15, lzo-rle x0.92); the disksize takes 30 percent of the
|
|
684
|
+
* request and the returned commands cover modprobe, comp_algorithm,
|
|
685
|
+
* disksize, mkswap and swapon at priority 100.
|
|
686
|
+
*/
|
|
687
|
+
configurezram(requestedmb: number, algorithm?: zramalgorithm, workload?: string): {
|
|
688
|
+
enabled: boolean;
|
|
689
|
+
factor: number;
|
|
690
|
+
disksizemb: number;
|
|
691
|
+
commands: readonly string[];
|
|
692
|
+
};
|
|
693
|
+
/**
|
|
694
|
+
* Host-aware huge page planning. Unlike the static planhugepages this
|
|
695
|
+
* variant reads HugePages_Total from /proc/meminfo, honors the thp_enabled
|
|
696
|
+
* knob from qemu.config for the transparent policy and mounts under
|
|
697
|
+
* /dev/hugepages or /dev/hugepages-1G depending on the preferred size.
|
|
698
|
+
*/
|
|
699
|
+
planhugepageshost(totalmb: number, prefer?: '2M' | '1G'): {
|
|
700
|
+
sizekb: number;
|
|
701
|
+
count: number;
|
|
702
|
+
mount: string;
|
|
703
|
+
transparent: boolean;
|
|
704
|
+
};
|
|
705
|
+
/**
|
|
706
|
+
* Builds the CCD-aware pinning map for a virtual machine. Even vCPUs map
|
|
707
|
+
* onto CCD0 (the 3D V-Cache complex) and odd vCPUs onto CCD1; two host
|
|
708
|
+
* threads stay isolated for the emulator and the host. X3D parts report
|
|
709
|
+
* two dies, matching the 9950X3D topology.
|
|
710
|
+
*/
|
|
711
|
+
buildpinningmap(vmid: string, vcpucount: number): {
|
|
712
|
+
vmid: string;
|
|
713
|
+
map: Map<number, readonly number[]>;
|
|
714
|
+
isolated: readonly number[];
|
|
715
|
+
topology: {
|
|
716
|
+
sockets: number;
|
|
717
|
+
dies: number;
|
|
718
|
+
cores: number;
|
|
719
|
+
threads: number;
|
|
720
|
+
};
|
|
721
|
+
};
|
|
722
|
+
/**
|
|
723
|
+
* Builds the complete host-aware plan for a virtual machine. The memory
|
|
724
|
+
* tier policy (performance, capacity or balanced) selects the tier mix:
|
|
725
|
+
* performance dedicates DRAM_FAST, capacity spreads 60/30/10 across
|
|
726
|
+
* DRAM/CXL/zram and balanced keeps 70/20 DRAM/zram plus 10 percent
|
|
727
|
+
* Blackwell HBM when the shared flag is set. The plan carries the tiered
|
|
728
|
+
* QEMU argument synthesis (cxl-type3 on bus cxl.0, virtio-mem-pci with 2M
|
|
729
|
+
* blocks for HBM, memory-backend-ram/memfd/file objects, two NUMA nodes,
|
|
730
|
+
* the avx-512 host cpu line, the balloon with free-page reporting and the
|
|
731
|
+
* vsock chardev) and the compression-adjusted effective usable capacity.
|
|
732
|
+
*/
|
|
733
|
+
buildhostplan(vmid: string, options?: {
|
|
734
|
+
requestedmb?: number;
|
|
735
|
+
vcpus?: number;
|
|
736
|
+
policy?: tierpolicy;
|
|
737
|
+
}): hostmemoryplan;
|
|
738
|
+
/**
|
|
739
|
+
* Calculates the balloon target under host pressure. Pressure below 0.3
|
|
740
|
+
* leaves the guest untouched; above it the balloon reclaims half of the
|
|
741
|
+
* excess, never dropping below 50 percent of the current allocation. A
|
|
742
|
+
* host free memory below 4 GB escalates the effective pressure to at
|
|
743
|
+
* least 0.5 so the balloon engages before the host starts swapping.
|
|
744
|
+
*/
|
|
745
|
+
calculateballoontarget(currentmb: number, hostfreemb: number, pressure: number): number;
|
|
746
|
+
/**
|
|
747
|
+
* Renders the cgroup v2 slice configuration for a plan: MemoryMax at the
|
|
748
|
+
* requested size, MemorySwapMax at 1.5x, AllowedCPUs from the isolated
|
|
749
|
+
* pinning set and MemoryZSwapMax at the zram disksize.
|
|
750
|
+
*/
|
|
751
|
+
generatecgroupv2config(plan: hostmemoryplan): string;
|
|
752
|
+
/**
|
|
753
|
+
* Exports the QMP runtime commands that apply a plan without a restart:
|
|
754
|
+
* one balloon command sized to the requested memory plus object-add
|
|
755
|
+
* commands for every CXL fabric tier.
|
|
756
|
+
*/
|
|
757
|
+
exportqmpmemorycommands(plan: hostmemoryplan): ReadonlyArray<Record<string, unknown>>;
|
|
758
|
+
/**
|
|
759
|
+
* Persists a plan as JSON next to the caller's chosen path. The pinning
|
|
760
|
+
* Map is materialized as a plain object so the file round-trips without
|
|
761
|
+
* loss; write failures raise a memoryerror with the cause chain.
|
|
762
|
+
*/
|
|
763
|
+
saveplan(plan: hostmemoryplan, outpath?: string): string;
|
|
764
|
+
}
|
|
765
|
+
/** Optional overrides accepted by generateVirtualMeminfo. */
|
|
766
|
+
export type meminfoptions = {
|
|
767
|
+
readonly swapgb?: number;
|
|
768
|
+
readonly vcpus?: number;
|
|
769
|
+
readonly freefraction?: number;
|
|
770
|
+
readonly availablefraction?: number;
|
|
771
|
+
readonly hugepages1g?: number;
|
|
772
|
+
readonly overcommitratio?: number;
|
|
773
|
+
};
|
|
774
|
+
/** Rounds a kB value down to the nearest 4 kB page boundary. */
|
|
775
|
+
export declare function pagealign(kb: number): number;
|
|
776
|
+
/**
|
|
777
|
+
* Generates a complete /proc/meminfo text for a machine with the requested
|
|
778
|
+
* total RAM. Every value is expressed in kB exactly like the kernel report:
|
|
779
|
+
* MemTotal, MemFree, MemAvailable, Buffers, Cached, the anon/file split,
|
|
780
|
+
* SwapTotal and SwapFree, slab accounting, commit accounting under
|
|
781
|
+
* vm.overcommit_memory=2 semantics, virtual memory areas, huge page state
|
|
782
|
+
* and the direct map breakdown.
|
|
783
|
+
*
|
|
784
|
+
* @param totalgb Total guest RAM in GB (positive number).
|
|
785
|
+
* @param options Optional swap size, vCPU count, fractions and huge pages.
|
|
786
|
+
*/
|
|
787
|
+
export declare function generateVirtualMeminfo(totalgb: number, options?: meminfoptions): string;
|
|
788
|
+
/**
|
|
789
|
+
* Renders the minimal one-line meminfo shape absorbed from the v2 stub:
|
|
790
|
+
* a page-aligned MemTotal in kB for the requested capacity in MiB. The
|
|
791
|
+
* full 47-field payload comes from generateVirtualMeminfo.
|
|
792
|
+
*/
|
|
793
|
+
export declare function meminfoForMiB(mib: number): string;
|
|
794
|
+
/**
|
|
795
|
+
* Docker memory-swap sentinel absorbed from the v2 stub: "-1" keeps swap
|
|
796
|
+
* unlimited, the value emitted by dockerMemoryFlags for every default plan.
|
|
797
|
+
*/
|
|
798
|
+
export declare const memorySwap = "-1";
|
|
799
|
+
/**
|
|
800
|
+
* Docker /dev/shm size absorbed from the v2 stub: "2g" is the canonical
|
|
801
|
+
* fix for the PyTorch DataLoader bus error caused by the 64 MB default.
|
|
802
|
+
*/
|
|
803
|
+
export declare const shmSize = "2g";
|
|
804
|
+
/**
|
|
805
|
+
* MemTotal anchor of the meminfo128g reference artifact: exactly
|
|
806
|
+
* 134217728 kB, the page-aligned total of 128 GiB. generatememinfo128g
|
|
807
|
+
* keeps the v5 parametric behavior of subtracting the 131072 kB firmware
|
|
808
|
+
* carveout, so its MemTotal reads 134086656 kB while this constant
|
|
809
|
+
* preserves the physical anchor captured on 2026-08-22.
|
|
810
|
+
*/
|
|
811
|
+
export declare const meminfo128gtotalkb = 134217728;
|
|
812
|
+
/**
|
|
813
|
+
* Regenerates the full 47-field /proc/meminfo payload anchored at the
|
|
814
|
+
* meminfo128g artifact total (128 GiB, 134217728 kB) with the natural
|
|
815
|
+
* jitter of a live machine.
|
|
816
|
+
*/
|
|
817
|
+
export declare function generatememinfo128g(options?: meminfoptions): string;
|
|
818
|
+
//# sourceMappingURL=virtualmemory.d.ts.map
|