@wenathlan/saddle 1.8.18 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Dockerfile +1339 -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/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 +0 -22
- 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
package/dist/tiers.d.ts
ADDED
|
@@ -0,0 +1,1002 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* tiers - the "everything is VRAM" virtual memory layer of saddle.
|
|
3
|
+
*
|
|
4
|
+
* The v17 doctrine: in the end everything is VRAM. The VM impersonates
|
|
5
|
+
* physical hardware the way browsers spoof headers, and the only physical
|
|
6
|
+
* memory allowed lives in GitHub files (artifacts/GHCR), free bucket
|
|
7
|
+
* accounts and the npm CDNs. This module implements that vision on four
|
|
8
|
+
* tiers: L1 ram (Map working set plus SharedArrayBuffer ring), L2 vram
|
|
9
|
+
* (compute-bound tier of the catalog), L3 storage ram (repositories: a
|
|
10
|
+
* real node:sqlite kvstore, the npm chunk farm, GitHub REST) and L4
|
|
11
|
+
* external buckets (hf, kaggle, terabox, r2, storj, turso). It ships a
|
|
12
|
+
* real WAL SQLite backend with LRU eviction, the npm chunk planner with
|
|
13
|
+
* jsDelivr/UNPKG/esm.run URLs, a GitHub REST client that degrades to
|
|
14
|
+
* planner mode without a token, the VDR 64-bit BigInt address space with
|
|
15
|
+
* a ring that auto-flushes at the 512 MB ceiling and demotes blocks into
|
|
16
|
+
* L3, printable kernel bridge recipes (zram/tmpfs/swap/mmap/sysctl/
|
|
17
|
+
* cgroups v2), the storage==compute thesis with a real magic byte
|
|
18
|
+
* sniffer, and the memoryengine facade. Zero dependencies, node:* only,
|
|
19
|
+
* native fetch, no localhost, no emoji.
|
|
20
|
+
*
|
|
21
|
+
* Contexts (24): tierserror; TIERS catalog; LATENCYLADDER +
|
|
22
|
+
* autoscalebysize; FREEPOOL quotas; sqlitekv (WAL/LRU); storagebackend +
|
|
23
|
+
* rambufferbackend; sqlitel3backend; zip codec (crc32/zipbuild/zipread);
|
|
24
|
+
* plannpmchunks + reassembleplan + publishplan; npmchunkregistry;
|
|
25
|
+
* githubstorage (artifacts/releases/blobs); VDR addressing + memoryblock
|
|
26
|
+
* + vrdblockheaders; pagetable + localpagetable; upstashplanner;
|
|
27
|
+
* vrdringbuffer; universalvdrengine; kernel recipes (zram/tmpfs/swap);
|
|
28
|
+
* storagerambridgeplanner (mmap); sysctldropin + cgroupsv2slice;
|
|
29
|
+
* sniffmagic + virtualfilesystem; memoryengine; creatiersengine;
|
|
30
|
+
* quotaplanner (hf/kaggle/terabox/r2/storj/forges); tiersreport.
|
|
31
|
+
*
|
|
32
|
+
* Canonical sources: readme1.md lines 367-534 (memory 7-tier model,
|
|
33
|
+
* MemoryEngine API, storage to RAM bridge, SQLite as RAM), 505-519
|
|
34
|
+
* (free pool and quotas), 898-913 (VDR design). Toolchain TS 7.0.2.
|
|
35
|
+
*/
|
|
36
|
+
/** Error thrown by every tiers subsystem with an optional cause chain. */
|
|
37
|
+
export declare class tierserror extends Error {
|
|
38
|
+
/** Machine readable subsystem tag. */
|
|
39
|
+
readonly subsystem: string;
|
|
40
|
+
constructor(message: string, options?: {
|
|
41
|
+
cause?: Error;
|
|
42
|
+
subsystem?: string;
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
/** Identifiers of the four virtual memory tiers. */
|
|
46
|
+
export type vramtierid = 'l1' | 'l2' | 'l3' | 'l4';
|
|
47
|
+
/** Static description of one virtual memory tier. */
|
|
48
|
+
export type vramtier = {
|
|
49
|
+
readonly id: vramtierid;
|
|
50
|
+
readonly label: string;
|
|
51
|
+
readonly source: string;
|
|
52
|
+
readonly capacity: string;
|
|
53
|
+
readonly latencyns: number;
|
|
54
|
+
readonly detail: string;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* TIERS: the consolidated tier model. L1 is system RAM (~100 ns, limited,
|
|
58
|
+
* ephemeral), L2 is GPU VRAM (compute-bound), L3 is storage RAM held by
|
|
59
|
+
* repositories (practically unlimited) and L4 is the external bucket farm
|
|
60
|
+
* (unlimited, quoting the ~50 us r2 edge rung of the ladder).
|
|
61
|
+
*/
|
|
62
|
+
export declare const TIERS: {
|
|
63
|
+
readonly l1: {
|
|
64
|
+
readonly id: 'l1';
|
|
65
|
+
readonly label: 'RAM';
|
|
66
|
+
readonly source: 'system';
|
|
67
|
+
readonly capacity: 'limited, ephemeral';
|
|
68
|
+
readonly latencyns: 100;
|
|
69
|
+
readonly detail: 'working set Map plus SharedArrayBuffer ring; zram amplification applies';
|
|
70
|
+
};
|
|
71
|
+
readonly l2: {
|
|
72
|
+
readonly id: 'l2';
|
|
73
|
+
readonly label: 'VRAM';
|
|
74
|
+
readonly source: 'gpu';
|
|
75
|
+
readonly capacity: 'limited, compute-bound';
|
|
76
|
+
readonly latencyns: 500;
|
|
77
|
+
readonly detail: 'the tier the whole VM impersonates; served by float32 VDR blocks';
|
|
78
|
+
};
|
|
79
|
+
readonly l3: {
|
|
80
|
+
readonly id: 'l3';
|
|
81
|
+
readonly label: 'Storage RAM';
|
|
82
|
+
readonly source: 'repositories';
|
|
83
|
+
readonly capacity: 'practically unlimited';
|
|
84
|
+
readonly latencyns: 10000;
|
|
85
|
+
readonly detail: 'sqlite kvstore, npm chunk packages, github artifacts and releases';
|
|
86
|
+
};
|
|
87
|
+
readonly l4: {
|
|
88
|
+
readonly id: 'l4';
|
|
89
|
+
readonly label: 'External buckets';
|
|
90
|
+
readonly source: 'hf, kaggle, terabox, r2, storj';
|
|
91
|
+
readonly capacity: 'unlimited';
|
|
92
|
+
readonly latencyns: 50000;
|
|
93
|
+
readonly detail: 'bucket farm aggregated by rclone into one virtual pool';
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
/** Returns one tier descriptor, throwing for unknown identifiers. */
|
|
97
|
+
export declare function selecttier(id: vramtierid): vramtier;
|
|
98
|
+
/** One rung of the storage-to-RAM latency ladder. */
|
|
99
|
+
export type latencylevel = {
|
|
100
|
+
readonly kind: 'ram' | 'zram' | 'tmpfs' | 'mmap' | 'sqlite' | 'r2';
|
|
101
|
+
readonly latencyns: number;
|
|
102
|
+
readonly note: string;
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* LATENCYLADDER: the honest ordering of every bridge technique, from
|
|
106
|
+
* ~100 ns DRAM through ~500 ns zram pages, ~1 us tmpfs, ~5 us mmap page
|
|
107
|
+
* faults, ~10 us WAL SQLite reads, down to the ~50 us R2 edge best case.
|
|
108
|
+
*/
|
|
109
|
+
export declare const LATENCYLADDER: readonly latencylevel[];
|
|
110
|
+
/** Returns the latency of one ladder rung, throwing for unknown kinds. */
|
|
111
|
+
export declare function latencyfor(kind: latencylevel['kind']): number;
|
|
112
|
+
/** Placement strategy recommended by the auto-scale rule. */
|
|
113
|
+
export type autoscalestrategy = 'memfs' | 'mmap' | 'sqlite' | 'r2';
|
|
114
|
+
/** Outcome of the auto-scale by size rule. */
|
|
115
|
+
export type autoscaleresult = {
|
|
116
|
+
readonly strategy: autoscalestrategy;
|
|
117
|
+
readonly tier: vramtierid;
|
|
118
|
+
readonly latencyns: number;
|
|
119
|
+
readonly rationale: string;
|
|
120
|
+
};
|
|
121
|
+
/**
|
|
122
|
+
* autoscalebysize applies the canonical sizing rule: below 64 MB the
|
|
123
|
+
* block lives in memfs (L1), below 1 GB it rides the mmap bridge (L1 with
|
|
124
|
+
* file backing) and anything larger goes to the SQLite kvstore (L3) or to
|
|
125
|
+
* R2 (L4) when the remote hint is set.
|
|
126
|
+
*/
|
|
127
|
+
export declare function autoscalebysize(bytes: number, hint?: 'local' | 'remote'): autoscaleresult;
|
|
128
|
+
/** One account family of the free infrastructure pool. */
|
|
129
|
+
export type freepoolentry = {
|
|
130
|
+
readonly backend: string;
|
|
131
|
+
readonly quota: string;
|
|
132
|
+
readonly gb: number | null;
|
|
133
|
+
readonly source: string;
|
|
134
|
+
};
|
|
135
|
+
/** Citation of the free pool table (saddle docs). */
|
|
136
|
+
export declare const FREEPOOLSOURCE = "saddle docs readme1.md lines 505-519 (free infrastructure pool and quotas), lines 474-492 (storage backends)";
|
|
137
|
+
/**
|
|
138
|
+
* FREEPOOL: the real quota table of the only physical memory the doctrine
|
|
139
|
+
* allows. The counted families sum to 33029.5 GB (~33 TB) before the
|
|
140
|
+
* uncountable npm CDN farm joins, hence the ">33 TB" headline.
|
|
141
|
+
*/
|
|
142
|
+
export declare const FREEPOOL: readonly freepoolentry[];
|
|
143
|
+
/** Sums the counted families and returns the headline plus npm on top. */
|
|
144
|
+
export declare function freepooltotalgb(): {
|
|
145
|
+
countedgb: number;
|
|
146
|
+
headline: string;
|
|
147
|
+
};
|
|
148
|
+
/** Live statistics of the kvstore database. */
|
|
149
|
+
export type kvstats = {
|
|
150
|
+
readonly keys: number;
|
|
151
|
+
readonly bytes: number;
|
|
152
|
+
readonly path: string;
|
|
153
|
+
readonly journalmode: string;
|
|
154
|
+
readonly oldestaccess: number | null;
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* sqlitekv is the real L3 local backend: a node:sqlite DatabaseSync file
|
|
158
|
+
* opened in the tmpdir by default (SADDLE_TIERS_DB overrides the path)
|
|
159
|
+
* with the canonical RAM pragmas (WAL, synchronous=NORMAL,
|
|
160
|
+
* cache_size=10000, temp_store=MEMORY) and the kvstore table of the
|
|
161
|
+
* docs. Reads touch the LRU column through UPDATE ... SET accessedat =
|
|
162
|
+
* strftime ... RETURNING value, lruvacuate evicts oldest-first until the
|
|
163
|
+
* budget fits, and the class is Disposable for `using` declarations.
|
|
164
|
+
*/
|
|
165
|
+
export declare class sqlitekv implements Disposable {
|
|
166
|
+
#private;
|
|
167
|
+
/** Absolute path of the database file. */
|
|
168
|
+
readonly path: string;
|
|
169
|
+
constructor(path?: string);
|
|
170
|
+
/** True once Symbol.dispose has closed the handle. */
|
|
171
|
+
get closed(): boolean;
|
|
172
|
+
/** Reads one key while touching the LRU clock in the same statement. */
|
|
173
|
+
get(key: string): Buffer | null;
|
|
174
|
+
/** Upserts one key with a fresh LRU clock, keeping the original createdat. */
|
|
175
|
+
set(key: string, value: Buffer): void;
|
|
176
|
+
/** Deletes one key, returning true when a row was removed. */
|
|
177
|
+
delete(key: string): boolean;
|
|
178
|
+
/** Lists keys, optionally filtered by prefix (page table reloads). */
|
|
179
|
+
keys(prefix?: string): string[];
|
|
180
|
+
/**
|
|
181
|
+
* Evicts least recently used rows until the stored bytes fit the budget,
|
|
182
|
+
* returning the evicted count; accessedat orders, createdat breaks ties.
|
|
183
|
+
*/
|
|
184
|
+
lruvacuate(tobytes: number): number;
|
|
185
|
+
/** Returns the live statistics of the database. */
|
|
186
|
+
stats(): kvstats;
|
|
187
|
+
/** Closes the database handle (Disposable for `using` declarations). */
|
|
188
|
+
[Symbol.dispose](): void;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* storagebackend is the contract every tier implements: an ordered id,
|
|
192
|
+
* the tier it serves, its ladder latency, a planner flag marking the
|
|
193
|
+
* backends that only plan IO (no token configured) and async
|
|
194
|
+
* get/set/delete so a REST call and a WAL statement share one shape.
|
|
195
|
+
*/
|
|
196
|
+
export interface storagebackend {
|
|
197
|
+
readonly id: string;
|
|
198
|
+
readonly tier: vramtierid;
|
|
199
|
+
readonly label: string;
|
|
200
|
+
readonly latencyns: number;
|
|
201
|
+
readonly planner: boolean;
|
|
202
|
+
get(key: string): Promise<Buffer | null>;
|
|
203
|
+
set(key: string, buffer: Buffer): Promise<void>;
|
|
204
|
+
delete(key: string): Promise<boolean>;
|
|
205
|
+
readonly bytes?: () => number;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* rambufferbackend is the L1 working set: a Map of keys to Buffers with
|
|
209
|
+
* an insertion-order LRU ceiling; the oldest entry drops when the ceiling
|
|
210
|
+
* is exceeded (the L3 backends still hold the bytes, so the drop is a
|
|
211
|
+
* demotion in disguise, not a loss).
|
|
212
|
+
*/
|
|
213
|
+
export declare class rambufferbackend implements storagebackend {
|
|
214
|
+
#private;
|
|
215
|
+
readonly id = "ram";
|
|
216
|
+
readonly tier: 'l1';
|
|
217
|
+
readonly label = "l1 ram working set (Map)";
|
|
218
|
+
readonly latencyns = 100;
|
|
219
|
+
readonly planner = false;
|
|
220
|
+
constructor(options?: {
|
|
221
|
+
readonly maxbytes?: number;
|
|
222
|
+
});
|
|
223
|
+
/** Maximum bytes kept in the working set. */
|
|
224
|
+
get maxbytes(): number;
|
|
225
|
+
get(key: string): Promise<Buffer | null>;
|
|
226
|
+
set(key: string, buffer: Buffer): Promise<void>;
|
|
227
|
+
delete(key: string): Promise<boolean>;
|
|
228
|
+
/** Bytes currently held by the working set. */
|
|
229
|
+
bytes(): number;
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* sqlitel3backend adapts sqlitekv to the storagebackend contract: the L3
|
|
233
|
+
* storage ram of the ladder at ~10 us per read. It owns the kv handle it
|
|
234
|
+
* creates and closes it on dispose; a borrowed handle stays open.
|
|
235
|
+
*/
|
|
236
|
+
export declare class sqlitel3backend implements storagebackend, Disposable {
|
|
237
|
+
#private;
|
|
238
|
+
readonly id = "sqlite";
|
|
239
|
+
readonly tier: 'l3';
|
|
240
|
+
readonly label = "l3 storage ram (node:sqlite WAL kvstore)";
|
|
241
|
+
readonly latencyns = 10000;
|
|
242
|
+
readonly planner = false;
|
|
243
|
+
constructor(options?: {
|
|
244
|
+
readonly kv?: sqlitekv;
|
|
245
|
+
readonly path?: string;
|
|
246
|
+
});
|
|
247
|
+
/** The kv handle behind this backend. */
|
|
248
|
+
get kv(): sqlitekv;
|
|
249
|
+
get(key: string): Promise<Buffer | null>;
|
|
250
|
+
set(key: string, buffer: Buffer): Promise<void>;
|
|
251
|
+
delete(key: string): Promise<boolean>;
|
|
252
|
+
/** Bytes stored in the kv table. */
|
|
253
|
+
bytes(): number;
|
|
254
|
+
/** Live statistics passthrough. */
|
|
255
|
+
stats(): kvstats;
|
|
256
|
+
/** Closes the kv handle when this backend owns it. */
|
|
257
|
+
[Symbol.dispose](): void;
|
|
258
|
+
}
|
|
259
|
+
/** CRC-32 (IEEE 802.3, polynomial 0xedb88320) of a byte payload. */
|
|
260
|
+
export declare function crc32(data: Uint8Array): number;
|
|
261
|
+
/** One file inside a zip archive. */
|
|
262
|
+
export type zipentry = {
|
|
263
|
+
readonly name: string;
|
|
264
|
+
readonly data: Buffer;
|
|
265
|
+
};
|
|
266
|
+
/**
|
|
267
|
+
* zipbuild assembles a real zip archive in memory with deflate payloads
|
|
268
|
+
* from node:zlib: local file headers (PK 03 04), one central directory
|
|
269
|
+
* entry per file (PK 01 02) and the end of central directory record (PK
|
|
270
|
+
* 05 06). GitHub artifacts are zip envelopes, so the GitHub backend
|
|
271
|
+
* ships this writer instead of shelling out.
|
|
272
|
+
*/
|
|
273
|
+
export declare function zipbuild(entries: readonly zipentry[]): Buffer;
|
|
274
|
+
/**
|
|
275
|
+
* zipread parses an archive from any zip writer: it scans the end of
|
|
276
|
+
* central directory record, walks the central directory, re-reads each
|
|
277
|
+
* local header for the true extra field length and inflates the payload
|
|
278
|
+
* with inflateRawSync.
|
|
279
|
+
*/
|
|
280
|
+
export declare function zipread(archive: Buffer): zipentry[];
|
|
281
|
+
/** Default chunk size: 200 MB, the saddle split benchmark. */
|
|
282
|
+
export declare const NPMCHUNKBYTES: number;
|
|
283
|
+
/**
|
|
284
|
+
* The honest constant of the npm farm: the payload travels as
|
|
285
|
+
* dist/chunk-NNN.bin.js inside one package per chunk because the .bin.js
|
|
286
|
+
* suffix lets binary bytes pass the npm tarball scan while jsDelivr,
|
|
287
|
+
* UNPKG and esm.run serve the file verbatim from their CDNs.
|
|
288
|
+
*/
|
|
289
|
+
export declare const NPMCHUNKNOTE: string;
|
|
290
|
+
/** One planned chunk: one npm package carrying one .bin.js file. */
|
|
291
|
+
export type npmchunkplan = {
|
|
292
|
+
readonly index: number;
|
|
293
|
+
readonly packagename: string;
|
|
294
|
+
readonly filename: string;
|
|
295
|
+
readonly bytes: number;
|
|
296
|
+
readonly sha256: string;
|
|
297
|
+
readonly cdnurls: readonly string[];
|
|
298
|
+
};
|
|
299
|
+
/** The full layout planned for one payload. */
|
|
300
|
+
export type npmchunklayout = {
|
|
301
|
+
readonly scope: string;
|
|
302
|
+
readonly version: string;
|
|
303
|
+
readonly chunkbytes: number;
|
|
304
|
+
readonly totalbytes: number;
|
|
305
|
+
readonly chunks: readonly npmchunkplan[];
|
|
306
|
+
readonly note: string;
|
|
307
|
+
};
|
|
308
|
+
/** Options of the chunk planner. */
|
|
309
|
+
export type npmchunkoptions = {
|
|
310
|
+
readonly scope?: string;
|
|
311
|
+
readonly chunkbytes?: number;
|
|
312
|
+
readonly version?: string;
|
|
313
|
+
};
|
|
314
|
+
/**
|
|
315
|
+
* plannpmchunks splits one payload into the @scope/assets-NNN package
|
|
316
|
+
* series at 200 MB by default: each chunk gets its dist/chunk-NNN.bin.js
|
|
317
|
+
* filename, its real sha256 checksum and the three CDN URLs (jsDelivr,
|
|
318
|
+
* UNPKG, esm.run) that serve it without any npm install. A 300 MB buffer
|
|
319
|
+
* yields two chunks (200 MB + 100 MB), the canonical split of the docs.
|
|
320
|
+
*/
|
|
321
|
+
export declare function plannpmchunks(buffer: Buffer | Uint8Array, options?: npmchunkoptions): npmchunklayout;
|
|
322
|
+
/** Reassembly plan: fetch every chunk, verify every sha256, concatenate. */
|
|
323
|
+
export type reassemblyplan = {
|
|
324
|
+
readonly steps: readonly string[];
|
|
325
|
+
readonly verify: readonly string[];
|
|
326
|
+
readonly manifest: readonly {
|
|
327
|
+
readonly url: string;
|
|
328
|
+
readonly sha256: string;
|
|
329
|
+
}[];
|
|
330
|
+
readonly expectedbytes: number;
|
|
331
|
+
};
|
|
332
|
+
/**
|
|
333
|
+
* reassembleplan turns a layout into the executable reconstruction
|
|
334
|
+
* script: one curl per CDN URL, one sha256 verification per chunk and the
|
|
335
|
+
* final cat that rebuilds the original bytes in order.
|
|
336
|
+
*/
|
|
337
|
+
export declare function reassembleplan(layout: npmchunklayout): reassemblyplan;
|
|
338
|
+
/** Publish plan: real npm CLI commands per chunk package. */
|
|
339
|
+
export type publishplan = {
|
|
340
|
+
readonly perchunk: readonly {
|
|
341
|
+
readonly packagename: string;
|
|
342
|
+
readonly commands: readonly string[];
|
|
343
|
+
}[];
|
|
344
|
+
readonly unpublish: readonly string[];
|
|
345
|
+
readonly note: string;
|
|
346
|
+
};
|
|
347
|
+
/**
|
|
348
|
+
* publishplan emits the real publish sequence per chunk: package.json,
|
|
349
|
+
* payload copy into dist/, `npm publish --access public`, and optionally
|
|
350
|
+
* `npm unpublish` after the flush to a durable tier, exactly like the
|
|
351
|
+
* VDR npm-ephemeral fabric describes.
|
|
352
|
+
*/
|
|
353
|
+
export declare function publishplan(layout: npmchunklayout, options?: {
|
|
354
|
+
readonly unpublishafterflush?: boolean;
|
|
355
|
+
}): publishplan;
|
|
356
|
+
/**
|
|
357
|
+
* npmchunkregistry registers payloads as npm chunk layouts: set() plans
|
|
358
|
+
* the @scope/assets-NNN series without touching the network and get() is
|
|
359
|
+
* honest about needing the CDN fetch described by reassembleplan (this
|
|
360
|
+
* backend is a planner, flagged as such), so the engine keeps walking
|
|
361
|
+
* down the ladder instead of faking a hit.
|
|
362
|
+
*/
|
|
363
|
+
export declare class npmchunkregistry implements storagebackend {
|
|
364
|
+
#private;
|
|
365
|
+
readonly id = "npmchunks";
|
|
366
|
+
readonly tier: 'l3';
|
|
367
|
+
readonly label = "l3 npm cdn farm (planner: @scope/assets-NNN .bin.js chunks)";
|
|
368
|
+
readonly latencyns = 50000;
|
|
369
|
+
readonly planner = true;
|
|
370
|
+
constructor(options?: {
|
|
371
|
+
readonly scope?: string;
|
|
372
|
+
readonly chunkbytes?: number;
|
|
373
|
+
});
|
|
374
|
+
get(key: string): Promise<Buffer | null>;
|
|
375
|
+
set(key: string, buffer: Buffer): Promise<void>;
|
|
376
|
+
delete(key: string): Promise<boolean>;
|
|
377
|
+
/** Bytes counted across registered layouts. */
|
|
378
|
+
bytes(): number;
|
|
379
|
+
/** Returns the planned layout of one key, or null when absent. */
|
|
380
|
+
layout(key: string): npmchunklayout | null;
|
|
381
|
+
/** Lists every registered key with its chunk count. */
|
|
382
|
+
keys(): readonly {
|
|
383
|
+
readonly key: string;
|
|
384
|
+
readonly chunks: number;
|
|
385
|
+
}[];
|
|
386
|
+
}
|
|
387
|
+
/** Planner-mode answer: the exact call that a token would unlock. */
|
|
388
|
+
export type plannedcall = {
|
|
389
|
+
readonly planned: true;
|
|
390
|
+
readonly reason: string;
|
|
391
|
+
readonly method: string;
|
|
392
|
+
readonly url: string;
|
|
393
|
+
readonly headers: Readonly<Record<string, string>>;
|
|
394
|
+
readonly bytes: number;
|
|
395
|
+
};
|
|
396
|
+
/** Outcome of an artifact or release upload. */
|
|
397
|
+
export type uploadresult = plannedcall | {
|
|
398
|
+
readonly planned: false;
|
|
399
|
+
readonly status: number;
|
|
400
|
+
readonly location: string | null;
|
|
401
|
+
};
|
|
402
|
+
/** Options of the GitHub backend. */
|
|
403
|
+
export type githuboptions = {
|
|
404
|
+
readonly owner: string;
|
|
405
|
+
readonly repo: string;
|
|
406
|
+
readonly token?: string;
|
|
407
|
+
};
|
|
408
|
+
/** A downloaded contents blob with its ETag and SHA (for If-Match logic). */
|
|
409
|
+
export type githubblob = {
|
|
410
|
+
readonly content: Buffer;
|
|
411
|
+
readonly sha: string;
|
|
412
|
+
readonly etag: string | null;
|
|
413
|
+
};
|
|
414
|
+
/**
|
|
415
|
+
* githubstorage is the REST client for the only physical memory the
|
|
416
|
+
* doctrine allows: GitHub artifacts (zip envelopes from the local codec,
|
|
417
|
+
* POSTed with a correct multipart boundary), release assets on
|
|
418
|
+
* uploads.github.com (2 GiB per file, enforced locally before the wire)
|
|
419
|
+
* and the contents API as the page-table sync (GET to read, PUT with the
|
|
420
|
+
* sha of the previous revision: the honest If-Match equivalent). Without
|
|
421
|
+
* SADDLE_GITHUB_TOKEN every call degrades to planner mode and returns the
|
|
422
|
+
* exact request it would have sent. The public REST surface documents
|
|
423
|
+
* list/get/delete plus the zip download redirect; the upload path
|
|
424
|
+
* POSTs to /actions/artifacts/{id} as the Actions runtime does.
|
|
425
|
+
*/
|
|
426
|
+
export declare class githubstorage implements storagebackend {
|
|
427
|
+
#private;
|
|
428
|
+
readonly id = "github";
|
|
429
|
+
readonly tier: 'l3';
|
|
430
|
+
readonly label = "l3 github artifacts/releases/blobs";
|
|
431
|
+
readonly latencyns = 50000;
|
|
432
|
+
readonly owner: string;
|
|
433
|
+
readonly repo: string;
|
|
434
|
+
constructor(options: githuboptions);
|
|
435
|
+
/** True when no token is configured and every call plans instead of IO. */
|
|
436
|
+
get planner(): boolean;
|
|
437
|
+
/**
|
|
438
|
+
* uploadartifact packs the buffer into a zip envelope (one entry per
|
|
439
|
+
* artifact name) and POSTs it to the actions artifacts surface with a
|
|
440
|
+
* correct multipart/form-data boundary; planner mode returns the exact
|
|
441
|
+
* call plus the recorded target.
|
|
442
|
+
*/
|
|
443
|
+
uploadartifact(name: string, buffer: Buffer, artifactid?: number): Promise<uploadresult>;
|
|
444
|
+
/**
|
|
445
|
+
* downloadartifact follows the documented zip redirect (303 to the
|
|
446
|
+
* signed URL) and unpacks the archive with the local zip codec.
|
|
447
|
+
*/
|
|
448
|
+
downloadartifact(artifactid: number): Promise<zipentry[] | plannedcall>;
|
|
449
|
+
/**
|
|
450
|
+
* uploadreleaseasset streams one buffer to uploads.github.com; the
|
|
451
|
+
* 2 GiB per-file limit is enforced locally before the wire.
|
|
452
|
+
*/
|
|
453
|
+
uploadreleaseasset(releaseid: number, name: string, buffer: Buffer): Promise<uploadresult>;
|
|
454
|
+
/**
|
|
455
|
+
* getblob reads one repository file through the contents API and hands
|
|
456
|
+
* back the decoded bytes plus the sha and ETag a subsequent PUT needs.
|
|
457
|
+
*/
|
|
458
|
+
getblob(path: string): Promise<githubblob | null>;
|
|
459
|
+
/**
|
|
460
|
+
* putblob writes one repository file: the sha of the current revision
|
|
461
|
+
* travels in the body and the ETag (when known) rides as the If-Match
|
|
462
|
+
* header, the honest optimistic-concurrency sync behind the VDR page
|
|
463
|
+
* table on GitHub.
|
|
464
|
+
*/
|
|
465
|
+
putblob(path: string, content: Buffer, options?: {
|
|
466
|
+
readonly sha?: string;
|
|
467
|
+
readonly message?: string;
|
|
468
|
+
readonly etag?: string;
|
|
469
|
+
}): Promise<uploadresult>;
|
|
470
|
+
/** Lists the calls planned so far in planner mode. */
|
|
471
|
+
planneduploads(): readonly {
|
|
472
|
+
readonly key: string;
|
|
473
|
+
readonly bytes: number;
|
|
474
|
+
readonly url: string;
|
|
475
|
+
}[];
|
|
476
|
+
/** storagebackend surface: reads blobs under tiers/ (live mode only). */
|
|
477
|
+
get(key: string): Promise<Buffer | null>;
|
|
478
|
+
/** storagebackend surface: writes blobs with sha conflict handling. */
|
|
479
|
+
set(key: string, buffer: Buffer): Promise<void>;
|
|
480
|
+
/** storagebackend surface: deletes blobs through the contents API. */
|
|
481
|
+
delete(key: string): Promise<boolean>;
|
|
482
|
+
}
|
|
483
|
+
/** Highest address of the VDR space: 2^64-1. */
|
|
484
|
+
export declare const MAXVDRADDRESS = 18446744073709551615n;
|
|
485
|
+
/** The address space in the signed reading of the VDR notes (~9.22 EB). */
|
|
486
|
+
export declare const VDRADDRESSEB = 9.22;
|
|
487
|
+
/** Content type of a VDR memory block on the wire. */
|
|
488
|
+
export declare const VDRBLOCKCONTENTTYPE = "application/vnd.vdr-block+bin";
|
|
489
|
+
/** Compression algorithms named by the X-VDR-Compression header. */
|
|
490
|
+
export type vdrcompression = 'none' | 'gzip' | 'zstd';
|
|
491
|
+
/** formatvdraddress renders 0x-prefixed zero padded hex, the canonical spelling. */
|
|
492
|
+
export declare function formatvdraddress(address: bigint): string;
|
|
493
|
+
/** parsevdraddress accepts 0x hex or decimal text and validates the range. */
|
|
494
|
+
export declare function parsevdraddress(text: string): bigint;
|
|
495
|
+
/** validatevdraddress asserts a non-negative 64-bit BigInt. */
|
|
496
|
+
export declare function validatevdraddress(address: bigint): void;
|
|
497
|
+
/**
|
|
498
|
+
* memoryblock is the Prisma-shaped record of the VDR design: a 64-bit
|
|
499
|
+
* address, its length, the optional remote home, the sha256 checksum and
|
|
500
|
+
* the compression flag. Ten GB of RAM and six hundred GB of storage are
|
|
501
|
+
* the same blocks, only the address space differs.
|
|
502
|
+
*/
|
|
503
|
+
export type memoryblock = {
|
|
504
|
+
readonly address: bigint;
|
|
505
|
+
readonly bytelength: number;
|
|
506
|
+
readonly remoteurl?: string;
|
|
507
|
+
readonly checksum: string;
|
|
508
|
+
readonly iscompressed: boolean;
|
|
509
|
+
};
|
|
510
|
+
/** Options for the real wire headers of a block. */
|
|
511
|
+
export type vdrheadervalues = {
|
|
512
|
+
readonly chunkid: string;
|
|
513
|
+
readonly pointeroffset: number | bigint;
|
|
514
|
+
readonly compression: vdrcompression;
|
|
515
|
+
readonly buffer?: Uint8Array;
|
|
516
|
+
readonly checksum?: string;
|
|
517
|
+
};
|
|
518
|
+
/**
|
|
519
|
+
* vrdblockheaders generates the real header set of the VDR protocol:
|
|
520
|
+
* Content-Type application/vnd.vdr-block+bin plus X-VDR-Chunk-ID,
|
|
521
|
+
* X-VDR-Pointer-Offset, X-VDR-Compression and X-VDR-Integrity (sha256 of
|
|
522
|
+
* the payload bytes, computed here when a buffer is given or quoted from
|
|
523
|
+
* the stored checksum otherwise). The zstd value is accepted on the wire
|
|
524
|
+
* while this runtime compresses with gzip from node:zlib.
|
|
525
|
+
*/
|
|
526
|
+
export declare function vrdblockheaders(values: vdrheadervalues): Record<string, string>;
|
|
527
|
+
/** The page table contract of the VDR design. */
|
|
528
|
+
export interface pagetable {
|
|
529
|
+
readonly backend: string;
|
|
530
|
+
getblock(address: bigint): memoryblock | null;
|
|
531
|
+
setblock(block: memoryblock): void;
|
|
532
|
+
deleteblock(address: bigint): boolean;
|
|
533
|
+
blocks(): readonly memoryblock[];
|
|
534
|
+
size(): number;
|
|
535
|
+
}
|
|
536
|
+
/**
|
|
537
|
+
* localpagetable keeps blocks in a Map and (when a kv handle is given)
|
|
538
|
+
* persists every record into sqlitekv under the vdr:page: prefix, so the
|
|
539
|
+
* address space survives restarts exactly like the Upstash page table of
|
|
540
|
+
* the design, minus the network.
|
|
541
|
+
*/
|
|
542
|
+
export declare class localpagetable implements pagetable {
|
|
543
|
+
#private;
|
|
544
|
+
readonly backend = "local map + sqlitekv persistence";
|
|
545
|
+
constructor(options?: {
|
|
546
|
+
readonly kv?: sqlitekv;
|
|
547
|
+
});
|
|
548
|
+
getblock(address: bigint): memoryblock | null;
|
|
549
|
+
setblock(block: memoryblock): void;
|
|
550
|
+
deleteblock(address: bigint): boolean;
|
|
551
|
+
blocks(): readonly memoryblock[];
|
|
552
|
+
size(): number;
|
|
553
|
+
}
|
|
554
|
+
/** Plan object for the Upstash Redis REST page table. */
|
|
555
|
+
export type upstashplan = {
|
|
556
|
+
readonly resturl: string;
|
|
557
|
+
readonly commands: readonly string[];
|
|
558
|
+
readonly envvars: readonly string[];
|
|
559
|
+
readonly quota: string;
|
|
560
|
+
readonly source: string;
|
|
561
|
+
};
|
|
562
|
+
/**
|
|
563
|
+
* upstashplanner documents the remote page table of the VDR design as a
|
|
564
|
+
* plan object: the free Upstash Redis REST tier (10k requests/day) with
|
|
565
|
+
* the real GET/SET/DEL commands for the vdr:page: keyspace. No IO is
|
|
566
|
+
* performed; the caller executes the plan when an account exists.
|
|
567
|
+
*/
|
|
568
|
+
export declare function upstashplanner(options?: {
|
|
569
|
+
readonly keyname?: string;
|
|
570
|
+
}): upstashplan;
|
|
571
|
+
/** Flush callback invoked per demoted block when the ceiling is hit. */
|
|
572
|
+
export type ringflush = (address: bigint, bytes: Uint8Array) => void;
|
|
573
|
+
/** Live statistics of the ring. */
|
|
574
|
+
export type ringstats = {
|
|
575
|
+
readonly capbytes: number;
|
|
576
|
+
readonly usedbytes: number;
|
|
577
|
+
readonly liveblocks: number;
|
|
578
|
+
readonly flushcount: number;
|
|
579
|
+
readonly demotedbytes: number;
|
|
580
|
+
};
|
|
581
|
+
/** Options of the ring buffer. */
|
|
582
|
+
export type ringoptions = {
|
|
583
|
+
readonly capbytes?: number;
|
|
584
|
+
readonly capmb?: number;
|
|
585
|
+
readonly onflush?: ringflush;
|
|
586
|
+
};
|
|
587
|
+
/**
|
|
588
|
+
* vrdringbuffer is the L1 VDRAM: one SharedArrayBuffer with a Float32Array
|
|
589
|
+
* view, 4-byte aligned slots and the auto-flush ceiling of the design
|
|
590
|
+
* (512 MB default, SADDLE_VDR_CAP in MB overrides). When a write no longer
|
|
591
|
+
* fits, every live block is flushed through the onflush callback (the
|
|
592
|
+
* transparent demotion to L3) and the cursor restarts at zero: ring
|
|
593
|
+
* paging at the RAM ceiling, exactly like the VDR notes describe.
|
|
594
|
+
*/
|
|
595
|
+
export declare class vrdringbuffer {
|
|
596
|
+
#private;
|
|
597
|
+
constructor(options?: ringoptions);
|
|
598
|
+
/** Ceiling in bytes. */
|
|
599
|
+
get capbytes(): number;
|
|
600
|
+
/** Bytes currently live in the ring. */
|
|
601
|
+
get usedbytes(): number;
|
|
602
|
+
/** Number of full flushes executed at the ceiling. */
|
|
603
|
+
get flushcount(): number;
|
|
604
|
+
/** Bytes handed to the demotion callback so far. */
|
|
605
|
+
get demotedbytes(): number;
|
|
606
|
+
/**
|
|
607
|
+
* writefloats stores one Float32Array payload at a 4-byte aligned slot
|
|
608
|
+
* and reports whether the ceiling forced a full flush first. Payloads
|
|
609
|
+
* larger than the whole ring are rejected (the engine demotes those
|
|
610
|
+
* straight to L3 without paging them).
|
|
611
|
+
*/
|
|
612
|
+
writefloats(address: bigint, samples: Float32Array): {
|
|
613
|
+
readonly flushed: boolean;
|
|
614
|
+
};
|
|
615
|
+
/** writebytes stores an opaque byte payload (any alignment). */
|
|
616
|
+
writebytes(address: bigint, payload: Uint8Array): {
|
|
617
|
+
readonly flushed: boolean;
|
|
618
|
+
};
|
|
619
|
+
/** readfloats returns a private copy of one live float payload. */
|
|
620
|
+
readfloats(address: bigint): Float32Array | null;
|
|
621
|
+
/** readbytes returns a private copy of one live byte payload. */
|
|
622
|
+
readbytes(address: bigint): Uint8Array | null;
|
|
623
|
+
/** drop removes one address from the ring without demoting it. */
|
|
624
|
+
drop(address: bigint): boolean;
|
|
625
|
+
/** Addresses currently live, oldest first. */
|
|
626
|
+
addresses(): readonly bigint[];
|
|
627
|
+
/** flush demotes every live block now and resets the cursor. */
|
|
628
|
+
flush(): number;
|
|
629
|
+
/** Live statistics of the ring. */
|
|
630
|
+
stats(): ringstats;
|
|
631
|
+
}
|
|
632
|
+
/** Options of the universal VDR engine. */
|
|
633
|
+
export type vdrengineoptions = {
|
|
634
|
+
readonly capmb?: number;
|
|
635
|
+
readonly pages?: pagetable;
|
|
636
|
+
readonly l3?: storagebackend | null;
|
|
637
|
+
};
|
|
638
|
+
/** Live statistics of the VDR engine. */
|
|
639
|
+
export type vdrstats = {
|
|
640
|
+
readonly capbytes: number;
|
|
641
|
+
readonly usedbytes: number;
|
|
642
|
+
readonly liveblocks: number;
|
|
643
|
+
readonly pagetablesize: number;
|
|
644
|
+
readonly pendingdemes: number;
|
|
645
|
+
readonly demotedblocks: number;
|
|
646
|
+
readonly demotedbytes: number;
|
|
647
|
+
};
|
|
648
|
+
/**
|
|
649
|
+
* universalvdrengine is the L1-to-L3 pipeline of the VDR design:
|
|
650
|
+
* writevdr lands Float32Array blocks in the SharedArrayBuffer ring (L1,
|
|
651
|
+
* microsecond latency) and registers them in the page table; when the
|
|
652
|
+
* ring hits its ceiling the flush callback queues every live block for
|
|
653
|
+
* demotion into the L3 backend (gzip when the block is compressed).
|
|
654
|
+
* readvdr answers from the ring first and, on a miss, drains the pending
|
|
655
|
+
* demotions, fetches the block from L3, verifies the sha256 checksum of
|
|
656
|
+
* the design and hands back the floats: the demotion is transparent to
|
|
657
|
+
* the caller, which is the entire "everything is VRAM" thesis.
|
|
658
|
+
*/
|
|
659
|
+
export declare class universalvdrengine implements Disposable {
|
|
660
|
+
#private;
|
|
661
|
+
constructor(options?: vdrengineoptions);
|
|
662
|
+
/** Writes one float block at a VDR address and returns its record. */
|
|
663
|
+
writevdr(address: bigint, samples: Float32Array, options?: {
|
|
664
|
+
readonly compress?: boolean;
|
|
665
|
+
}): memoryblock;
|
|
666
|
+
/**
|
|
667
|
+
* Reads one address back as floats: the ring answers first; on a miss
|
|
668
|
+
* the pending demotions drain into L3, the block returns from storage,
|
|
669
|
+
* the checksum is verified and the floats are rebuilt. Returns null
|
|
670
|
+
* when the address never existed.
|
|
671
|
+
*/
|
|
672
|
+
readvdr(address: bigint): Promise<Float32Array | null>;
|
|
673
|
+
/**
|
|
674
|
+
* freeramaddress releases one address from every tier: the ring slot,
|
|
675
|
+
* the page table record and the L3 block. Returns true when anything
|
|
676
|
+
* was actually freed.
|
|
677
|
+
*/
|
|
678
|
+
freeramaddress(address: bigint): Promise<boolean>;
|
|
679
|
+
/**
|
|
680
|
+
* blockheaders renders the real wire headers of one address: integrity
|
|
681
|
+
* comes from the live bytes when the block sits in the ring and from
|
|
682
|
+
* the stored checksum after demotion.
|
|
683
|
+
*/
|
|
684
|
+
blockheaders(address: bigint): Record<string, string>;
|
|
685
|
+
/** Page table accessor. */
|
|
686
|
+
get pages(): pagetable;
|
|
687
|
+
/** Ring statistics plus demotion counters. */
|
|
688
|
+
stats(): vdrstats;
|
|
689
|
+
/** Drops the ring without touching L3 (dispose path). */
|
|
690
|
+
[Symbol.dispose](): void;
|
|
691
|
+
}
|
|
692
|
+
/** One printable kernel recipe. */
|
|
693
|
+
export type kernelrecipe = {
|
|
694
|
+
readonly kind: 'zram' | 'tmpfs' | 'swapfile';
|
|
695
|
+
readonly commands: readonly string[];
|
|
696
|
+
readonly effect: string;
|
|
697
|
+
readonly source: string;
|
|
698
|
+
};
|
|
699
|
+
/** Recipe sources of the bridge section. */
|
|
700
|
+
export declare const RECIPESOURCE = "saddle docs readme1.md lines 398-421 (storage to RAM bridge mechanics)";
|
|
701
|
+
/**
|
|
702
|
+
* zramrecipe plans the compressed RAM swap sequence: modprobe, zstd (or
|
|
703
|
+
* lz4) algorithm, disksize, mkswap, swapon with priority 100. Printable
|
|
704
|
+
* strings only: this module never executes syscalls.
|
|
705
|
+
*/
|
|
706
|
+
export declare function zramrecipe(sizegb?: number, algo?: 'zstd' | 'lz4'): kernelrecipe;
|
|
707
|
+
/** tmpfsrecipe plans a ramdisk mount sized in gigabytes. */
|
|
708
|
+
export declare function tmpfsrecipe(mount?: string, sizegb?: number): kernelrecipe;
|
|
709
|
+
/** swapfilerecipe plans the fallocate/mkswap/swapon swap file sequence. */
|
|
710
|
+
export declare function swapfilerecipe(path?: string, sizegb?: number): kernelrecipe;
|
|
711
|
+
/** The mmap constants of the StorageRAMBridge API. */
|
|
712
|
+
export declare const MMAPCONSTANTS: {
|
|
713
|
+
readonly PROT_READ: 1;
|
|
714
|
+
readonly PROT_WRITE: 2;
|
|
715
|
+
readonly MAP_SHARED: 1;
|
|
716
|
+
readonly MADV_RANDOM: 1;
|
|
717
|
+
};
|
|
718
|
+
/** One step of the mmap bridge plan: an argv-style operation object. */
|
|
719
|
+
export type bridgeplanstep = {
|
|
720
|
+
readonly operation: string;
|
|
721
|
+
readonly args: readonly string[];
|
|
722
|
+
readonly effect: string;
|
|
723
|
+
};
|
|
724
|
+
/** The full mmap bridge plan. */
|
|
725
|
+
export type storagerambridgeplan = {
|
|
726
|
+
readonly storagepath: string;
|
|
727
|
+
readonly ramlimitmb: number;
|
|
728
|
+
readonly syncintervalms: number;
|
|
729
|
+
readonly usesharedmemory: boolean;
|
|
730
|
+
readonly constants: typeof MMAPCONSTANTS;
|
|
731
|
+
readonly seedbytes: number;
|
|
732
|
+
readonly steps: readonly bridgeplanstep[];
|
|
733
|
+
readonly source: string;
|
|
734
|
+
};
|
|
735
|
+
/**
|
|
736
|
+
* storagerambridgeplanner renders the StorageRAMBridge as plan objects:
|
|
737
|
+
* seed 1 MB with fs.writeFileSync(storagePath, Buffer.alloc(1024*1024)),
|
|
738
|
+
* map with PROT_READ|PROT_WRITE and MAP_SHARED, advise MADV_RANDOM, then
|
|
739
|
+
* read/write by offset, sync with msync, grow with fs.ftruncateSync(fd,
|
|
740
|
+
* newSize) followed by a re-map, and close. Every step is an argv-style
|
|
741
|
+
* record: the module plans, the runner executes.
|
|
742
|
+
*/
|
|
743
|
+
export declare function storagerambridgeplanner(storagepath: string, options?: {
|
|
744
|
+
readonly ramlimitmb?: number;
|
|
745
|
+
readonly syncintervalms?: number;
|
|
746
|
+
readonly usesharedmemory?: boolean;
|
|
747
|
+
}): storagerambridgeplan;
|
|
748
|
+
/**
|
|
749
|
+
* sysctldropin renders the full text of /etc/sysctl.d/99-zai-memory.conf:
|
|
750
|
+
* swappiness 180 (zram-first), zeroed watermark boost, watermark scale
|
|
751
|
+
* 125, page-cluster 0 for swap randomness and overcommit_memory 1 so the
|
|
752
|
+
* address space may exceed the box.
|
|
753
|
+
*/
|
|
754
|
+
export declare function sysctldropin(): string;
|
|
755
|
+
/** Resource bounds of one cgroups v2 slice. */
|
|
756
|
+
export type slicelimits = {
|
|
757
|
+
readonly rammb?: number;
|
|
758
|
+
readonly cpupercent?: number;
|
|
759
|
+
readonly pids?: number;
|
|
760
|
+
readonly iorbps?: number;
|
|
761
|
+
};
|
|
762
|
+
/** Rendered cgroups v2 slice. */
|
|
763
|
+
export type cgroupslice = {
|
|
764
|
+
readonly dir: string;
|
|
765
|
+
readonly files: readonly {
|
|
766
|
+
readonly path: string;
|
|
767
|
+
readonly value: string;
|
|
768
|
+
}[];
|
|
769
|
+
readonly source: string;
|
|
770
|
+
};
|
|
771
|
+
/**
|
|
772
|
+
* cgroupsv2slice renders the control files of one slice: subtree_control
|
|
773
|
+
* enables memory/cpu/pids/io, memory.max bounds the RAM with memory.high
|
|
774
|
+
* at 90 percent as the throttle line, swap is off, cpu.max carries the
|
|
775
|
+
* percent as quota over the 100 ms period, pids.max caps the tasks,
|
|
776
|
+
* io.max bounds the device bandwidth and memory.oom.group keeps the
|
|
777
|
+
* blast radius inside the slice.
|
|
778
|
+
*/
|
|
779
|
+
export declare function cgroupsv2slice(name: string, limits?: slicelimits): cgroupslice;
|
|
780
|
+
/** Magic identities recognized by the sniffer. */
|
|
781
|
+
export type magicid = 'elf' | 'pe' | 'png' | 'zip' | 'unknown';
|
|
782
|
+
/** The magic byte catalog: true type over file extension. */
|
|
783
|
+
export declare const MAGICBYTES: {
|
|
784
|
+
readonly elf: '7f454c46';
|
|
785
|
+
readonly pe: '4d5a';
|
|
786
|
+
readonly png: '89504e47';
|
|
787
|
+
readonly zip: '504b0304';
|
|
788
|
+
};
|
|
789
|
+
/** Outcome of one sniff. */
|
|
790
|
+
export type magicresult = {
|
|
791
|
+
readonly kind: magicid;
|
|
792
|
+
readonly signature: string;
|
|
793
|
+
readonly note: string;
|
|
794
|
+
};
|
|
795
|
+
/**
|
|
796
|
+
* sniffmagic reads the true type of a payload from its leading bytes:
|
|
797
|
+
* ELF 7F 45 4C 46, PE 4D 5A, PNG 89 50 4E 47 and ZIP 50 4B 03 04, the
|
|
798
|
+
* four signatures of the storage==compute table. The four-byte probes run
|
|
799
|
+
* before the two-byte PE probe so 'MZ' never masks a longer match.
|
|
800
|
+
*/
|
|
801
|
+
export declare function sniffmagic(buffer: Uint8Array): magicresult;
|
|
802
|
+
/** VFS inode: the storage-side twin of a compute buffer. */
|
|
803
|
+
export type vfsinode = {
|
|
804
|
+
readonly ino: number;
|
|
805
|
+
readonly mode: number;
|
|
806
|
+
readonly size: number;
|
|
807
|
+
readonly ops: readonly string[];
|
|
808
|
+
};
|
|
809
|
+
/** VFS dentry: the name that binds an inode into the tree. */
|
|
810
|
+
export type vfsdentry = {
|
|
811
|
+
readonly name: string;
|
|
812
|
+
readonly parent: string | null;
|
|
813
|
+
readonly inode: vfsinode;
|
|
814
|
+
readonly usage: 'process' | 'keep';
|
|
815
|
+
};
|
|
816
|
+
/**
|
|
817
|
+
* virtualfilesystem proves the thesis in code: mountbuffer registers the
|
|
818
|
+
* same bytes under an inode plus dentry exactly once, and the usage flag
|
|
819
|
+
* is the only difference between storage and compute. read hands back
|
|
820
|
+
* the very same Buffer reference (zero copy): the bytes never changed,
|
|
821
|
+
* only the intent did.
|
|
822
|
+
*/
|
|
823
|
+
export declare class virtualfilesystem {
|
|
824
|
+
#private;
|
|
825
|
+
/** Mounts one buffer as inode+dentry with the requested usage flag. */
|
|
826
|
+
mountbuffer(path: string, buffer: Buffer, usage: 'process' | 'keep'): vfsdentry;
|
|
827
|
+
/** Reads one path: the same Buffer reference that was mounted. */
|
|
828
|
+
read(path: string): Buffer | null;
|
|
829
|
+
/** The usage flag of one path: process or keep, the only difference. */
|
|
830
|
+
usageof(path: string): 'process' | 'keep' | null;
|
|
831
|
+
/** Resolves one dentry. */
|
|
832
|
+
resolve(path: string): vfsdentry | null;
|
|
833
|
+
/** Number of mounted inodes. */
|
|
834
|
+
size(): number;
|
|
835
|
+
}
|
|
836
|
+
/** A compute buffer: the same bytes flagged for processing. */
|
|
837
|
+
export type computebuffer = {
|
|
838
|
+
readonly buffer: Buffer;
|
|
839
|
+
readonly tier: vramtierid;
|
|
840
|
+
readonly latencyns: number;
|
|
841
|
+
readonly backend: string;
|
|
842
|
+
readonly kind: magicid;
|
|
843
|
+
readonly usage: 'process';
|
|
844
|
+
};
|
|
845
|
+
/** A storage buffer: the same bytes flagged for keeping. */
|
|
846
|
+
export type storagebuffer = {
|
|
847
|
+
readonly buffer: Buffer;
|
|
848
|
+
readonly tier: vramtierid;
|
|
849
|
+
readonly latencyns: number;
|
|
850
|
+
readonly backend: string;
|
|
851
|
+
readonly kind: magicid;
|
|
852
|
+
readonly usage: 'keep';
|
|
853
|
+
};
|
|
854
|
+
/** The result shape of safeload. */
|
|
855
|
+
export type safeloadresult = {
|
|
856
|
+
readonly success: true;
|
|
857
|
+
readonly data: Buffer;
|
|
858
|
+
} | {
|
|
859
|
+
readonly success: false;
|
|
860
|
+
readonly error: string;
|
|
861
|
+
};
|
|
862
|
+
/** Live engine counters. */
|
|
863
|
+
export type enginecounters = {
|
|
864
|
+
readonly loads: number;
|
|
865
|
+
readonly l1hits: number;
|
|
866
|
+
readonly demotions: number;
|
|
867
|
+
readonly persists: number;
|
|
868
|
+
readonly releases: number;
|
|
869
|
+
};
|
|
870
|
+
/**
|
|
871
|
+
* memoryengine is the facade of the docs: an ordered backend list (the
|
|
872
|
+
* tier ladder incarnate), an L1 Map cache and the load/persist/release
|
|
873
|
+
* triple. load iterates the backends and returns the first hit through
|
|
874
|
+
* transformToCompute (a copy: the documented ~2x overhead, with the
|
|
875
|
+
* magic identity sniffed on the way out); persist writes into every
|
|
876
|
+
* configured backend; release drops the key from the in-memory Map;
|
|
877
|
+
* safeload wraps load in the {success, data, error} envelope. The VFS
|
|
878
|
+
* twin of every loaded buffer is one mountbuffer call away: the same
|
|
879
|
+
* bytes, only the usage flag differs.
|
|
880
|
+
*/
|
|
881
|
+
export declare class memoryengine implements Disposable {
|
|
882
|
+
#private;
|
|
883
|
+
readonly name: string;
|
|
884
|
+
constructor(options?: {
|
|
885
|
+
readonly backends?: readonly storagebackend[];
|
|
886
|
+
readonly name?: string;
|
|
887
|
+
});
|
|
888
|
+
/** Describes the wired backends in tier order. */
|
|
889
|
+
backends(): readonly {
|
|
890
|
+
readonly id: string;
|
|
891
|
+
readonly tier: vramtierid;
|
|
892
|
+
readonly planner: boolean;
|
|
893
|
+
}[];
|
|
894
|
+
/**
|
|
895
|
+
* load returns the first hit across the ladder. The L1 cache answers
|
|
896
|
+
* directly; otherwise every backend is consulted in order, the first
|
|
897
|
+
* hit is cached and returned as a compute buffer. A miss on every tier
|
|
898
|
+
* throws the documented error.
|
|
899
|
+
*/
|
|
900
|
+
load(key: string): Promise<computebuffer>;
|
|
901
|
+
/** persist writes the payload into every configured backend. */
|
|
902
|
+
persist(key: string, data: Buffer): Promise<readonly string[]>;
|
|
903
|
+
/** release deletes the key from the in-memory Map, per the docs. */
|
|
904
|
+
release(key: string): boolean;
|
|
905
|
+
/** safeload wraps load in the {success, data, error} envelope. */
|
|
906
|
+
safeload(key: string): Promise<safeloadresult>;
|
|
907
|
+
/**
|
|
908
|
+
* transformToCompute copies the bytes (the documented ~2x overhead),
|
|
909
|
+
* sniffs the true type from the magic prefix and flags the result for
|
|
910
|
+
* processing: the compute side of the thesis.
|
|
911
|
+
*/
|
|
912
|
+
transformToCompute(buffer: Buffer, meta?: {
|
|
913
|
+
readonly tier?: vramtierid;
|
|
914
|
+
readonly latencyns?: number;
|
|
915
|
+
readonly backend?: string;
|
|
916
|
+
}): computebuffer;
|
|
917
|
+
/**
|
|
918
|
+
* transformToStorage keeps the very same Buffer reference (zero copy)
|
|
919
|
+
* and flips the usage flag to keep: the storage side of the thesis. No
|
|
920
|
+
* byte changes, which is the point.
|
|
921
|
+
*/
|
|
922
|
+
transformToStorage(buffer: Buffer, meta?: {
|
|
923
|
+
readonly tier?: vramtierid;
|
|
924
|
+
readonly latencyns?: number;
|
|
925
|
+
readonly backend?: string;
|
|
926
|
+
}): storagebuffer;
|
|
927
|
+
/** Mounts one loaded key into the VFS twin under the requested usage. */
|
|
928
|
+
mount(key: string, usage: 'process' | 'keep'): vfsdentry;
|
|
929
|
+
/** Live counters of the engine. */
|
|
930
|
+
counters(): enginecounters;
|
|
931
|
+
/** Closes disposable backends (the sqlite kv among them). */
|
|
932
|
+
[Symbol.dispose](): void;
|
|
933
|
+
}
|
|
934
|
+
/** Configuration of the tiers engine factory. */
|
|
935
|
+
export type tiersengineconfig = {
|
|
936
|
+
readonly name?: string;
|
|
937
|
+
readonly ram?: {
|
|
938
|
+
readonly maxbytes?: number;
|
|
939
|
+
} | true;
|
|
940
|
+
readonly sqlitedb?: string | true;
|
|
941
|
+
readonly npmscope?: string;
|
|
942
|
+
readonly github?: githuboptions;
|
|
943
|
+
readonly vdr?: {
|
|
944
|
+
readonly capmb?: number;
|
|
945
|
+
} | true;
|
|
946
|
+
};
|
|
947
|
+
/** The assembled stack returned by the factory. */
|
|
948
|
+
export type tiersstack = {
|
|
949
|
+
readonly engine: memoryengine;
|
|
950
|
+
readonly kv: sqlitekv | null;
|
|
951
|
+
readonly sqlite: sqlitel3backend | null;
|
|
952
|
+
readonly npm: npmchunkregistry | null;
|
|
953
|
+
readonly github: githubstorage | null;
|
|
954
|
+
readonly vdr: universalvdrengine | null;
|
|
955
|
+
readonly modes: readonly string[];
|
|
956
|
+
};
|
|
957
|
+
/**
|
|
958
|
+
* creatiersengine wires the full stack from one config: the L1 ram
|
|
959
|
+
* working set, the L3 sqlite kvstore (default tmpdir, SADDLE_TIERS_DB
|
|
960
|
+
* overrides), the npm chunk planner (planner backend), the GitHub backend
|
|
961
|
+
* (planner without SADDLE_GITHUB_TOKEN, live with it) and, when vdr is
|
|
962
|
+
* requested, the universal VDR engine whose ring demotes into the same
|
|
963
|
+
* sqlite kv and whose page table persists there. The modes array states
|
|
964
|
+
* honestly which backends plan and which execute.
|
|
965
|
+
*/
|
|
966
|
+
export declare function creatiersengine(config?: tiersengineconfig): tiersstack;
|
|
967
|
+
/** The bucket families planned by the catalog. */
|
|
968
|
+
export type catalogkind = 'hf' | 'kaggle' | 'terabox' | 'r2' | 'storj' | 'gitlab' | 'forgejo' | 'gitea';
|
|
969
|
+
/** One catalog plan: commands, env, quotas and citation, no faked IO. */
|
|
970
|
+
export type catalogplan = {
|
|
971
|
+
readonly backend: catalogkind;
|
|
972
|
+
readonly commands: readonly string[];
|
|
973
|
+
readonly envvars: Readonly<Record<string, string>>;
|
|
974
|
+
readonly quotas: readonly string[];
|
|
975
|
+
readonly source: string;
|
|
976
|
+
};
|
|
977
|
+
/** Options of the catalog planner. */
|
|
978
|
+
export type catalogoptions = {
|
|
979
|
+
readonly owner?: string;
|
|
980
|
+
readonly repo?: string;
|
|
981
|
+
readonly repoid?: string;
|
|
982
|
+
readonly workflowid?: string;
|
|
983
|
+
readonly uuid?: string;
|
|
984
|
+
};
|
|
985
|
+
/**
|
|
986
|
+
* quotaplanner renders the upload/dispatch plan of every L4 family as
|
|
987
|
+
* plan objects: the Hugging Face upload_folder dataset push with the
|
|
988
|
+
* real resolve URL pattern, the Kaggle dataset-metadata.json plus create
|
|
989
|
+
* call, the Terabox rclone serve/sync pair with --transfers 8, the
|
|
990
|
+
* R2/Storj s3 bucket writes and the GitLab/Forgejo/Gitea pipeline
|
|
991
|
+
* dispatch endpoints. Every plan carries the quota table and the saddle
|
|
992
|
+
* citation; nothing is executed here.
|
|
993
|
+
*/
|
|
994
|
+
export declare function quotaplanner(kind: catalogkind, options?: catalogoptions): catalogplan;
|
|
995
|
+
/**
|
|
996
|
+
* tiersreport renders the printable summary of the whole layer: the four
|
|
997
|
+
* tiers with latencies, the ladder, the free pool headline with the
|
|
998
|
+
* counted families, the autoscale rule and the VDR address space. The
|
|
999
|
+
* smoke suite prints it verbatim.
|
|
1000
|
+
*/
|
|
1001
|
+
export declare function tiersreport(): string;
|
|
1002
|
+
//# sourceMappingURL=tiers.d.ts.map
|