@wenathlan/saddle 1.8.17 → 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 +68 -22
- 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 -122
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1018 -122
- 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.d.ts +129 -0
- package/dist/isolation.d.ts.map +1 -0
- package/dist/isolation.js +96 -0
- 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/artifactavailability.md +6 -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.17.md +6 -0
- package/docs/releasenotes-1.8.18.md +32 -0
- package/docs/releasenotes-1.8.19.md +35 -0
- package/docs/research-1.8.18-isolation.md +43 -0
- package/docs/research-1.8.19-virtual-browser.md +27 -0
- package/docs/saddle.archive.1.8.17.tar.gz.gpg +0 -0
- package/docs/security.md +454 -0
- package/docs/todo-1.8.16.md +56 -1
- package/docs/todo-1.8.18.md +164 -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 -55
- 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/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/docs/logs/.gitkeep +0 -0
- package/docs/plans/00.index.md +0 -50
- package/docs/plans/01.architecture.md +0 -86
- package/docs/plans/02.research.computer.use.md +0 -58
- package/docs/plans/03.research.captcha.bypass.md +0 -68
- package/docs/plans/04.research.sandbox.ai.md +0 -52
- package/docs/plans/05.capture.platform.md +0 -57
- package/docs/plans/06.dependencies.md +0 -97
- package/docs/plans/07.captcha.test.page.md +0 -41
- package/docs/plans/08.production.infra.md +0 -70
- package/docs/plans/09.database.schema.md +0 -121
- package/docs/plans/10.cloudinary.storage.md +0 -57
- package/docs/plans/11.movement.logs.json.md +0 -72
- package/docs/plans/12.research.atlas.agent.browser.md +0 -79
- package/docs/plans/13.research.anti.detection.md +0 -898
- package/docs/plans/14.research.proxy.md +0 -1495
- package/docs/plans/15.research.retry.rate.limit.md +0 -1958
- package/docs/plans/16.research.crawling.md +0 -1417
- package/docs/plans/17.research.caching.md +0 -1610
- package/docs/plans/18.research.content.extraction.md +0 -1952
- package/docs/plans/19.research.errors.events.md +0 -1523
- package/docs/plans/20.research.zod.validation.md +0 -1350
- package/docs/plans/21.research.batch.concurrency.md +0 -1888
- package/docs/plans/22.research.universal.runtime.md +0 -944
- package/docs/plans/23.research.ai.integration.md +0 -1465
- package/docs/plans/24.research.memory.persistence.md +0 -1979
- package/docs/plans/25.research.server.api.md +0 -342
- package/docs/plans/26.research.compilation.md +0 -249
- package/docs/plans/27.research.html.parsing.md +0 -251
- package/docs/plans/28.action.plan.md +0 -50
- package/docs/plans/29.api.reference.md +0 -174
- package/docs/plans/30.architecture.plan.md +0 -94
- package/docs/plans/31.auditoria.dados.md +0 -163
- package/docs/plans/32.bots.automacao.computacional.md +0 -214
- package/docs/plans/33.bots.codigo.revisao.md +0 -220
- package/docs/plans/34.bots.seguranca.cicd.md +0 -366
- package/docs/plans/35.comparativo.concorrencia.md +0 -464
- package/docs/plans/36.computational.memory.md +0 -340
- package/docs/plans/37.deploystrategy.md +0 -394
- package/docs/plans/38.flow.md +0 -155
- package/docs/plans/39.multi.platform.bot.md +0 -252
- package/docs/plans/40.npm.publish.md +0 -250
- package/docs/plans/41.o.que.falta.md +0 -407
- package/docs/plans/42.pesquisa.concorrencia.md +0 -721
- package/docs/plans/43.plan.universal.architecture.md +0 -496
- package/docs/plans/44.reference.md +0 -100
- package/docs/plans/45.robotarchitecture.md +0 -237
- package/docs/plans/46.scdnintegration.md +0 -284
- package/docs/plans/47.multiforge.readme.md +0 -129
- package/docs/plans/48.theory.v4.repo.os.md +0 -152
- package/docs/plans/49.third.party.infra.md +0 -12
- package/docs/plans/50.file.as.compute.md +0 -39
- package/docs/plans/51.architecture.virtual.processor.md +0 -80
- package/docs/plans/52.manifesto.v8.md +0 -11
- package/docs/plans/58.cdn.list.md +0 -23
- package/docs/plans/59.sql.frameworks.md +0 -33
- package/docs/plans/60.sql.thirdparty.md +0 -26
- package/docs/plans/61.objective.multiforge.md +0 -63
- package/docs/plans/62.huggingface.upload.md +0 -26
- package/docs/plans/63.kaggle.upload.md +0 -24
- package/docs/plans/64.npm.storage.md +0 -30
- package/docs/plans/65.rclone.terabox.md +0 -32
- package/docs/plans/66.buckets.and.models.todo.md +0 -14
- package/docs/plans/67.database.todo.md +0 -13
- package/docs/plans/68.deploy.packages.todo.md +0 -12
- package/docs/plans/69.report.human.operator.md +0 -133
- package/docs/plans/70.report.brain2qwerty.ems.md +0 -135
- package/docs/plans/71.report.hd.infinito.vram.md +0 -155
- package/docs/plans/72.plan.hd.infinito.node.md +0 -146
- package/docs/plans/73.plan.scifi.repos.md +0 -125
- package/docs/plans/74.000.manifesto.v8.flat.2..md +0 -11
- package/docs/plans/README.md +0 -489
- package/docs/plans/aggregate_platforms.mjs +0 -146
- package/docs/plans/examplesession.json +0 -36
- package/docs/plans/missing-facts.md +0 -192
- package/docs/plans/models.md +0 -64
- package/docs/plans/organize.cjs +0 -270
- package/docs/plans/platforms.md +0 -2887
- package/docs/plans/sites.md +0 -31322
- package/docs/sources/farm.py +0 -117
- package/docs/sources/html/saddle1.html +0 -132
- package/docs/sources/html/saddle2.html +0 -157
- package/docs/sources/html/saddle3.html +0 -119
- package/docs/sources/html/saddle4.html +0 -144
- package/docs/sources/html/saddle5.html +0 -72
- package/docs/sources/html/saddle6.html +0 -171
- package/docs/sources/html/saddle7.html +0 -236
- package/docs/sources/saddle.ts +0 -74
- package/docs/sources/schema.prisma +0 -88
- package/docs/sources/script.sh +0 -64
- package/docs/sources/workflows.yml +0 -458
- package/docs/talks1/_body.txt +0 -14
- package/docs/talks1/_index.md +0 -15
- package/docs/talks1/_screenshot.png +0 -0
- package/docs/talks1/assistant-01.md +0 -5
- package/docs/talks1/assistant-02.md +0 -5
- package/docs/talks1/assistant-03.md +0 -531
- package/docs/talks1/assistant-04.md +0 -26
- package/docs/talks1/assistant-05.md +0 -774
- package/docs/talks1/assistant-06.md +0 -1718
- package/docs/talks1/scrape-share.cjs +0 -185
- package/docs/talks1/scrape-share.ts +0 -183
- package/docs/talks1/user-01.md +0 -3
- package/docs/talks1/user-02.md +0 -3
- package/docs/talks1/user-03.md +0 -88
- package/docs/talks1/user-04.md +0 -3
- package/docs/talks1/user-05.md +0 -3
- package/docs/talks1/user-06.md +0 -88
- package/docs/talks1/user-07.md +0 -88
- package/docs/talks2/_body.txt +0 -14
- package/docs/talks2/_index.md +0 -16
- package/docs/talks2/_screenshot.png +0 -0
- package/docs/talks2/assistant-01.md +0 -5
- package/docs/talks2/assistant-02.md +0 -5
- package/docs/talks2/assistant-03.md +0 -424
- package/docs/talks2/assistant-04.md +0 -598
- package/docs/talks2/assistant-05.md +0 -1280
- package/docs/talks2/assistant-06.md +0 -1227
- package/docs/talks2/assistant-07.md +0 -1252
- package/docs/talks2/user-01.md +0 -3
- package/docs/talks2/user-02.md +0 -3
- package/docs/talks2/user-03.md +0 -88
- package/docs/talks2/user-04.md +0 -88
- package/docs/talks2/user-05.md +0 -88
- package/docs/talks2/user-06.md +0 -88
- package/docs/talks2/user-07.md +0 -3
- package/docs/talks3/_body.txt +0 -467
- package/docs/talks3/_index.md +0 -10
- package/docs/talks3/_screenshot.png +0 -0
- package/docs/talks3/assistant-01.md +0 -417
- package/docs/talks3/assistant-02.md +0 -417
- package/docs/talks3/assistant-03.md +0 -29
- package/docs/talks3/assistant-04.md +0 -727
- package/docs/talks3/user-01.md +0 -88
- package/docs/talks3/user-02.md +0 -88
- package/docs/talks3/user-03.md +0 -3
- package/docs/talks3/user-04.md +0 -3
- package/docs/talks4/_body.txt +0 -14
- package/docs/talks4/_index.md +0 -12
- package/docs/talks4/_screenshot.png +0 -0
- package/docs/talks4/assistant-01.md +0 -5
- package/docs/talks4/assistant-02.md +0 -5
- package/docs/talks4/assistant-03.md +0 -35
- package/docs/talks4/assistant-04.md +0 -512
- package/docs/talks4/assistant-05.md +0 -599
- package/docs/talks4/user-01.md +0 -3
- package/docs/talks4/user-02.md +0 -3
- package/docs/talks4/user-03.md +0 -88
- package/docs/talks4/user-04.md +0 -88
- package/docs/talks4/user-05.md +0 -7
- package/docs/talks5/_body.txt +0 -14
- package/docs/talks5/_index.md +0 -13
- package/docs/talks5/_screenshot.png +0 -0
- package/docs/talks5/assistant-01.md +0 -5
- package/docs/talks5/assistant-02.md +0 -5
- package/docs/talks5/assistant-03.md +0 -690
- package/docs/talks5/assistant-04.md +0 -758
- package/docs/talks5/assistant-05.md +0 -974
- package/docs/talks5/user-01.md +0 -3
- package/docs/talks5/user-02.md +0 -3
- package/docs/talks5/user-03.md +0 -105
- package/docs/talks5/user-04.md +0 -105
- package/docs/talks5/user-05.md +0 -63
- package/docs/talks5/user-06.md +0 -105
- package/docs/talks6/_body.txt +0 -14
- package/docs/talks6/_index.md +0 -9
- package/docs/talks6/_screenshot.png +0 -0
- package/docs/talks6/assistant-01.md +0 -5
- package/docs/talks6/assistant-02.md +0 -5
- package/docs/talks6/assistant-03.md +0 -1499
- package/docs/talks6/user-01.md +0 -3
- package/docs/talks6/user-02.md +0 -3
- package/docs/talks6/user-03.md +0 -88
- package/docs/talks6/user-04.md +0 -88
- package/docs/talks7/_body.txt +0 -14
- package/docs/talks7/_index.md +0 -10
- package/docs/talks7/_screenshot.png +0 -0
- package/docs/talks7/assistant-01.md +0 -5
- package/docs/talks7/assistant-02.md +0 -5
- package/docs/talks7/assistant-03.md +0 -523
- package/docs/talks7/assistant-04.md +0 -617
- package/docs/talks7/user-01.md +0 -3
- package/docs/talks7/user-02.md +0 -3
- package/docs/talks7/user-03.md +0 -105
- package/docs/talks7/user-04.md +0 -67
- package/docs/talks8/conversa1.txt +0 -1322
- package/docs/talks8/conversa2.txt +0 -237
- package/docs/talks9/Beyond the Obvious_ 50 Plataformas Auto-Hospedadas de Forja de C/303/263digo para Al/303/251m de Gitea e GitLab.md" +0 -174
- package/docs/talks9/De NPM a Multi-Linguagem_ Uma Arquitetura T/303/251cnica para a Execu/303/247/303/243o Integrada de C/303/263digo no Ecossistema Node.js.md" +0 -59
- package/docs/talks9/De NPM a VMs Virtuais_ Uma An/303/241lise Arquitet/303/264nica para a Realiza/303/247/303/243o do Ciclo de Vida do Projeto SADDLE.md" +0 -91
- package/docs/talks9/Mapeamento da Engrenagem Computacional_ Uma Arquitetura para Execu/303/247/303/243o Isolada e Persist/303/252ncia em Ambientes Distribu/303/255dos.md" +0 -116
- package/docs/talks9/O Cen/303/241rio Pr/303/241tico do SADDLE_ Uma An/303/241lise de Viabilidade e Modelo de Ciclo de Vida Integrado.md" +0 -128
- package/docs/talks9/README (2).md +0 -489
- package/docs/talks9/README.md +0 -198
- package/docs/talks9/Viabilidade do Saddle_ Uma An/303/241lise T/303/251cnica da Transforma/303/247/303/243o de Armazenamento Remoto em Mem/303/263ria Computacional.md" +0 -80
- package/docs/talks9/conversa.txt +0 -544
- package/docs/talks9/other (2).md +0 -39
- package/docs/talks9/other.md +0 -57
- package/docs/talks9/outro.txt +0 -24
- /package/{extension/README.md → docs/extension.md} +0 -0
|
@@ -0,0 +1,1339 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* orchestrator.ts — merged sandbox and vm orchestration for saddle v6.
|
|
3
|
+
*
|
|
4
|
+
* this file is the heaviest merge of the v2 effort (map T6): the v5
|
|
5
|
+
* orchestrator (six runtime strategies — docker 29.7.2, firecracker 1.16.1,
|
|
6
|
+
* qemu 11.1.0, cloud hypervisor 53.0, gvisor release-20260817.0, kata
|
|
7
|
+
* 4.1.0 — plus warm pool, criu 4.2.1 checkpointer and compose 5.5.0
|
|
8
|
+
* rendering) absorbs the unique subsystems of the two Meta orchestrators:
|
|
9
|
+
*
|
|
10
|
+
* from src_core_orchestrator (SADDLE v5): branded ids, Result helpers,
|
|
11
|
+
* RBAC with four default roles, resource reservations with TTL, affinity
|
|
12
|
+
* rules and NUMA aware placement, CFS-like vCPU scheduler with NUMA
|
|
13
|
+
* rebalancing, balloon controller with pressure scoring, SR-IOV GPU
|
|
14
|
+
* assignment with VFs, passage routing with latency estimation, the MTTG
|
|
15
|
+
* job queue with dependencies/retry/anti-starvation, the docker bridge
|
|
16
|
+
* with IPAM, the full spawnqemu with monitor/qmp sockets and the
|
|
17
|
+
* sleep-3600 CI fallback, health monitoring, autoscale, live migration
|
|
18
|
+
* with precopy stages, disk snapshots, checkpoints, config hot-reload,
|
|
19
|
+
* the plugin system, graceful shutdown, the audit ring, bully leader
|
|
20
|
+
* election and the OTel/Prometheus recorder.
|
|
21
|
+
*
|
|
22
|
+
* from coreorchestrator (SADDLE v6): the twelve phase guards folded into
|
|
23
|
+
* the single lifecycle machine, vCPU topology validation and pinning,
|
|
24
|
+
* vRAM balloon bounds with hugepages, GPU passthrough requests reading
|
|
25
|
+
* gpus.json, passage protocols vsock/vhost-user/ivshmem/vfio-user with
|
|
26
|
+
* latency budgets, tenant quotas with preemption, label affinity
|
|
27
|
+
* selectors In/NotIn/Exists, node drain, append-only JSONL audit per
|
|
28
|
+
* tenant, the OTLP HTTP exporter, qemu version probing, the hardware view
|
|
29
|
+
* bootstrap and the process error catcher.
|
|
30
|
+
*
|
|
31
|
+
* risk resolution (mandatory, from worklog v2-A1): exactly ONE event bus —
|
|
32
|
+
* sandboxevents extends enginebus from index.ts and every topic of the
|
|
33
|
+
* union lives in enginetopics; exactly ONE lifecycle state machine — the
|
|
34
|
+
* v5 machine extended to fifteen states absorbing VmState and VmPhase;
|
|
35
|
+
* exactly ONE metrics component — sandboxmetrics extends the MetricsStore
|
|
36
|
+
* of index.ts and the Meta OTel recorder folds into it (labels, ring and
|
|
37
|
+
* the Prometheus exporter). no class with an equivalent role is
|
|
38
|
+
* duplicated: TypedEventBus, SaddleEventBus and OtelRecorder disappear,
|
|
39
|
+
* their capabilities live inside sandboxevents and sandboxmetrics.
|
|
40
|
+
*
|
|
41
|
+
* contexts (25): runtimecatalog, performetrics, kvmdetector,
|
|
42
|
+
* lifecyclestate, sandboxspec, runhelper, portallocator+hostresolver,
|
|
43
|
+
* priorityqueue, runtimestrategy, dockerruntime, gvisor+kata,
|
|
44
|
+
* firecrackerruntime+fcapi, qemuruntime+spawnqemu, clhruntime,
|
|
45
|
+
* runtimeregistry, sandboxbuilder, sandboxhandle, sandboxevents,
|
|
46
|
+
* sandboxmetrics, sandboxfactory, sandboxproxy, warmpool, cricheckpointer,
|
|
47
|
+
* rbac+reservations+affinity, numa scheduler+balloon+gpu and the
|
|
48
|
+
* orchestrator facade (passage, docker bridge, health, autoscale,
|
|
49
|
+
* migration, snapshots, checkpoints, hot-reload, plugins, audit, leader
|
|
50
|
+
* election, otel exporter, drain, dumpstate).
|
|
51
|
+
*
|
|
52
|
+
* patterns: strategy (runtimes), factory, builder, registry, observer
|
|
53
|
+
* (single bus), proxy. rules: lowercase identifiers, english jsdoc third
|
|
54
|
+
* person, no emoji, try/catch catcher on every fallible path, node:*
|
|
55
|
+
* built-ins only, no hardcoded localhost (host resolved from interfaces
|
|
56
|
+
* or user choice, ports drawn with crypto.randomInt(30000) + 30000 unless
|
|
57
|
+
* the user pins one), internal state in Map/WeakMap containers.
|
|
58
|
+
*/
|
|
59
|
+
import type { ChildProcess } from 'node:child_process';
|
|
60
|
+
import type { enginetopicname, enginetopics } from './index.js';
|
|
61
|
+
import { enginebus, MetricsStore } from './index.js';
|
|
62
|
+
/** pinned runtime versions used across the engine; the v5 anchors
|
|
63
|
+
* replace every stale Meta version (qemu 9.1.2, docker 27.3, node
|
|
64
|
+
* 22.12.3, typescript 5.6.3) found in the merged sources. */
|
|
65
|
+
declare const runtimecatalog: {
|
|
66
|
+
docker: string;
|
|
67
|
+
compose: string;
|
|
68
|
+
firecracker: string;
|
|
69
|
+
qemu: string;
|
|
70
|
+
cloudhypervisor: string;
|
|
71
|
+
gvisor: string;
|
|
72
|
+
kata: string;
|
|
73
|
+
criu: string;
|
|
74
|
+
};
|
|
75
|
+
/** toolchain stack reported by dumpstate and the version probe. */
|
|
76
|
+
declare const stackcatalog: {
|
|
77
|
+
nodecurrent: string;
|
|
78
|
+
nodelts: string;
|
|
79
|
+
typescript: string;
|
|
80
|
+
qemu: string;
|
|
81
|
+
docker: string;
|
|
82
|
+
buildx: string;
|
|
83
|
+
criu: string;
|
|
84
|
+
otelsdk: string;
|
|
85
|
+
};
|
|
86
|
+
/** runtime selector; every value maps to one strategy implementation. */
|
|
87
|
+
type sandboxruntime = 'docker' | 'firecracker' | 'qemu' | 'cloudhypervisor' | 'gvisor' | 'kata';
|
|
88
|
+
/** verified performance envelope of the microvm runtimes. */
|
|
89
|
+
declare const performetrics: {
|
|
90
|
+
firecrackercoldbootms: number;
|
|
91
|
+
firecrackermemorymib: number;
|
|
92
|
+
firecrackerthroughputvmspersecond: number;
|
|
93
|
+
firecrackerrestorems: number;
|
|
94
|
+
firecrackerbackends: string;
|
|
95
|
+
qemumttcg: string;
|
|
96
|
+
gvisoroverhead: string;
|
|
97
|
+
livedowntimems: string;
|
|
98
|
+
};
|
|
99
|
+
/** returns true when /dev/kvm is readable and writable; github actions
|
|
100
|
+
* hosted runners never expose it, which is why the qemu strategy falls
|
|
101
|
+
* back to tcg and the firecracker strategy refuses to start there. */
|
|
102
|
+
declare function kvmavailable(): boolean;
|
|
103
|
+
/**
|
|
104
|
+
* lifecycle states of a sandbox or vm. the v5 seven state machine is
|
|
105
|
+
* extended with the unique states of the Meta machines: scheduling,
|
|
106
|
+
* binding and provisioning (from VmPhase), paused, degraded, migrating
|
|
107
|
+
* and draining (from VmState/VmPhase); terminating maps to draining and
|
|
108
|
+
* terminated maps to destroyed.
|
|
109
|
+
*/
|
|
110
|
+
type lifecyclestate = 'pending' | 'creating' | 'scheduling' | 'binding' | 'provisioning' | 'running' | 'degraded' | 'paused' | 'snapshotted' | 'migrating' | 'restoring' | 'draining' | 'stopped' | 'destroyed' | 'failed';
|
|
111
|
+
/**
|
|
112
|
+
* allowed transitions; destroyed is terminal and failed may recover into
|
|
113
|
+
* provisioning for a retry or fall to destroyed. the guard map merges the
|
|
114
|
+
* v5 forward edges with the twelve phase guards of coreorchestrator.
|
|
115
|
+
*/
|
|
116
|
+
declare const transitions: Record<lifecyclestate, readonly lifecyclestate[]>;
|
|
117
|
+
/** checks whether a state transition is legal. */
|
|
118
|
+
declare function cantransition(from: lifecyclestate, to: lifecyclestate): boolean;
|
|
119
|
+
/**
|
|
120
|
+
* legacy Meta phase names mapped onto the single machine; kept so old
|
|
121
|
+
* configs and docs keep working without a second state machine.
|
|
122
|
+
*/
|
|
123
|
+
declare function lifecyclefromphase(phase: string): lifecyclestate;
|
|
124
|
+
/** brands a primitive so ids of different domains never mix. */
|
|
125
|
+
type brand<t, b extends string> = t & {
|
|
126
|
+
readonly brand: b;
|
|
127
|
+
};
|
|
128
|
+
/** branded identifiers used by the vm plane. */
|
|
129
|
+
type vmid = brand<string, 'vmid'>;
|
|
130
|
+
type VcpuId = brand<string, 'VcpuId'>;
|
|
131
|
+
type gpuid = brand<string, 'gpuid'>;
|
|
132
|
+
type vfid = brand<string, 'vfid'>;
|
|
133
|
+
type snapshotid = brand<string, 'snapshotid'>;
|
|
134
|
+
type checkpointid = brand<string, 'checkpointid'>;
|
|
135
|
+
type pluginid = brand<string, 'pluginid'>;
|
|
136
|
+
type userid = brand<string, 'userid'>;
|
|
137
|
+
type roleid = brand<string, 'roleid'>;
|
|
138
|
+
/** mints a fresh branded vm id. */
|
|
139
|
+
declare const createvmid: (seed?: string) => vmid;
|
|
140
|
+
/** recursively readonly view of a type. */
|
|
141
|
+
type deepreadonly<t> = {
|
|
142
|
+
readonly [key in keyof t]: deepreadonly<t[key]>;
|
|
143
|
+
};
|
|
144
|
+
/** a value or a promise of it. */
|
|
145
|
+
type awaitable<t> = t | Promise<t>;
|
|
146
|
+
/** discriminated result used by every fallible vm plane operation. */
|
|
147
|
+
type result<t, e = Error> = {
|
|
148
|
+
readonly ok: true;
|
|
149
|
+
readonly value: t;
|
|
150
|
+
} | {
|
|
151
|
+
readonly ok: false;
|
|
152
|
+
readonly error: e;
|
|
153
|
+
};
|
|
154
|
+
/** host port mapping; host is always randomized unless pinned by the user. */
|
|
155
|
+
interface portmapping {
|
|
156
|
+
readonly host: number;
|
|
157
|
+
readonly container: number;
|
|
158
|
+
}
|
|
159
|
+
/** full sandbox specification produced by the builder. */
|
|
160
|
+
interface sandboxspec {
|
|
161
|
+
readonly id: string;
|
|
162
|
+
readonly host: string;
|
|
163
|
+
readonly image: string;
|
|
164
|
+
readonly runtime: sandboxruntime;
|
|
165
|
+
readonly cpus: number;
|
|
166
|
+
readonly memorymib: number;
|
|
167
|
+
readonly shm: string;
|
|
168
|
+
readonly memoryswap: number;
|
|
169
|
+
readonly autoremove: boolean;
|
|
170
|
+
readonly env: Record<string, string>;
|
|
171
|
+
readonly gpuspoof: string | null;
|
|
172
|
+
readonly ports: readonly portmapping[];
|
|
173
|
+
readonly workdir: string | null;
|
|
174
|
+
readonly command: readonly string[];
|
|
175
|
+
}
|
|
176
|
+
/** numa node identifier and cpu set alias. */
|
|
177
|
+
type numanodeid = number;
|
|
178
|
+
type cpuset = number[];
|
|
179
|
+
/** vCPU topology hints (coreorchestrator unique). */
|
|
180
|
+
interface vcputopology {
|
|
181
|
+
readonly sockets: number;
|
|
182
|
+
readonly corespersocket: number;
|
|
183
|
+
readonly threadspercore: number;
|
|
184
|
+
readonly pinnedcpus?: readonly number[];
|
|
185
|
+
readonly isolated?: boolean;
|
|
186
|
+
readonly overcommitratio?: number;
|
|
187
|
+
}
|
|
188
|
+
/** vRAM balloon semantics with hugepages choice (coreorchestrator). */
|
|
189
|
+
interface vramballoon {
|
|
190
|
+
requestedmib: number;
|
|
191
|
+
minmib: number;
|
|
192
|
+
maxmib: number;
|
|
193
|
+
currentmib: number;
|
|
194
|
+
readonly balloondriver: 'virtio-balloon' | 'none';
|
|
195
|
+
readonly hugepages: 'none' | '2mib' | '1gib';
|
|
196
|
+
}
|
|
197
|
+
/** gpu passthrough request shape (coreorchestrator). */
|
|
198
|
+
interface gpupassthroughrequest {
|
|
199
|
+
readonly id: string;
|
|
200
|
+
readonly vendor: 'nvidia' | 'amd' | 'intel' | 'generic';
|
|
201
|
+
readonly model?: string;
|
|
202
|
+
readonly count: number;
|
|
203
|
+
readonly vfio: boolean;
|
|
204
|
+
readonly sriovvfcount?: number;
|
|
205
|
+
readonly memorymib?: number;
|
|
206
|
+
readonly uuid?: string;
|
|
207
|
+
readonly deviceids?: readonly string[];
|
|
208
|
+
}
|
|
209
|
+
/** label selector used by the affinity resolver. */
|
|
210
|
+
interface affinityselector {
|
|
211
|
+
readonly key: string;
|
|
212
|
+
readonly operator: 'in' | 'notin' | 'exists';
|
|
213
|
+
readonly values?: readonly string[];
|
|
214
|
+
}
|
|
215
|
+
/** definition accepted by createvm; missing fields fall to sane defaults. */
|
|
216
|
+
interface vmdefinition {
|
|
217
|
+
readonly id?: vmid;
|
|
218
|
+
readonly name: string;
|
|
219
|
+
readonly tenantid?: string;
|
|
220
|
+
readonly vcpus: number;
|
|
221
|
+
readonly vrammib: number;
|
|
222
|
+
readonly diskgb?: number;
|
|
223
|
+
readonly ostype?: 'linux' | 'windows' | 'bsd';
|
|
224
|
+
readonly arch?: 'x86_64' | 'aarch64';
|
|
225
|
+
readonly image?: string;
|
|
226
|
+
readonly qemubinary?: string;
|
|
227
|
+
readonly machine?: string;
|
|
228
|
+
readonly accel?: 'kvm' | 'tcg';
|
|
229
|
+
readonly extraargs?: readonly string[];
|
|
230
|
+
readonly dockerruntime?: 'runc' | 'crun' | 'kata';
|
|
231
|
+
readonly dockernetwork?: 'bridge' | 'host' | 'none' | 'passage';
|
|
232
|
+
readonly vcputopology?: vcputopology;
|
|
233
|
+
readonly gpu?: readonly gpupassthroughrequest[];
|
|
234
|
+
readonly labels?: Record<string, string>;
|
|
235
|
+
readonly affinity?: readonly affinityselector[];
|
|
236
|
+
readonly antiaffinity?: readonly string[];
|
|
237
|
+
readonly checkpointenabled?: boolean;
|
|
238
|
+
readonly rbacroles?: readonly string[];
|
|
239
|
+
}
|
|
240
|
+
/** the single vm record stored by the orchestrator (merged VmInstance +
|
|
241
|
+
* VmSpec shapes from the two Meta sources). */
|
|
242
|
+
interface vmrecord {
|
|
243
|
+
readonly id: vmid;
|
|
244
|
+
readonly name: string;
|
|
245
|
+
readonly tenantid: string;
|
|
246
|
+
readonly vcpus: number;
|
|
247
|
+
vrammib: number;
|
|
248
|
+
readonly diskgb: number;
|
|
249
|
+
readonly ostype: 'linux' | 'windows' | 'bsd';
|
|
250
|
+
readonly arch: 'x86_64' | 'aarch64';
|
|
251
|
+
readonly image: string;
|
|
252
|
+
readonly qemubinary: string;
|
|
253
|
+
readonly machine: string;
|
|
254
|
+
readonly accel: 'kvm' | 'tcg';
|
|
255
|
+
readonly extraargs: readonly string[];
|
|
256
|
+
readonly dockerruntime: 'runc' | 'crun' | 'kata';
|
|
257
|
+
readonly dockernetwork: 'bridge' | 'host' | 'none' | 'passage';
|
|
258
|
+
readonly vcputopology?: vcputopology;
|
|
259
|
+
vramballoon?: vramballoon;
|
|
260
|
+
gpu: gpupassthroughrequest[];
|
|
261
|
+
readonly labels: Record<string, string>;
|
|
262
|
+
readonly affinity: readonly affinityselector[];
|
|
263
|
+
readonly antiaffinity: readonly string[];
|
|
264
|
+
readonly checkpointenabled: boolean;
|
|
265
|
+
readonly rbacroles: readonly string[];
|
|
266
|
+
state: lifecyclestate;
|
|
267
|
+
readonly createdat: Date;
|
|
268
|
+
startedat?: Date;
|
|
269
|
+
qemupid?: number;
|
|
270
|
+
dockerid?: string;
|
|
271
|
+
numanode: numanodeid;
|
|
272
|
+
readonly vcpupins: Map<number, cpuset>;
|
|
273
|
+
metrics: {
|
|
274
|
+
cputimens: bigint;
|
|
275
|
+
memrssmb: number;
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
/** balloon controller state per vm (src_core unique). */
|
|
279
|
+
interface balloonstate {
|
|
280
|
+
readonly vmid: vmid;
|
|
281
|
+
targetmib: number;
|
|
282
|
+
actualmib: number;
|
|
283
|
+
deflatedmib: number;
|
|
284
|
+
lastadjust: Date;
|
|
285
|
+
pressurescore: number;
|
|
286
|
+
}
|
|
287
|
+
/** gpu assignment bookkeeping (src_core unique). */
|
|
288
|
+
interface gpuassignment {
|
|
289
|
+
readonly vmid: vmid;
|
|
290
|
+
readonly gpuid: gpuid;
|
|
291
|
+
readonly vfid?: vfid;
|
|
292
|
+
readonly pciaddr: string;
|
|
293
|
+
readonly iommugroup: number;
|
|
294
|
+
readonly bounddriver: 'vfio-pci' | 'nvidia' | 'amdgpu';
|
|
295
|
+
}
|
|
296
|
+
/** SR-IOV physical function view (src_core unique). */
|
|
297
|
+
interface sriovpf {
|
|
298
|
+
readonly pfpci: string;
|
|
299
|
+
readonly totalvfs: number;
|
|
300
|
+
activevfs: number;
|
|
301
|
+
readonly vfs: {
|
|
302
|
+
readonly vfid: vfid;
|
|
303
|
+
readonly pci: string;
|
|
304
|
+
assignedto?: vmid;
|
|
305
|
+
readonly vlan?: number;
|
|
306
|
+
}[];
|
|
307
|
+
readonly driver: string;
|
|
308
|
+
}
|
|
309
|
+
/** merged passage route: encap/latency view of src_core plus the
|
|
310
|
+
* protocol/latency budget/numa awareness of coreorchestrator. */
|
|
311
|
+
interface passageroute {
|
|
312
|
+
readonly id: string;
|
|
313
|
+
readonly srcvm: vmid;
|
|
314
|
+
readonly dstvm: vmid;
|
|
315
|
+
readonly passage: string;
|
|
316
|
+
protocol: 'vxlan' | 'vlan' | 'sr-iov' | 'direct' | 'vsock' | 'vhost-user' | 'ivshmem' | 'vfio-user';
|
|
317
|
+
latencyus: number;
|
|
318
|
+
bandwidthgbps: number;
|
|
319
|
+
readonly latencybudgetus?: number;
|
|
320
|
+
readonly numaaware?: boolean;
|
|
321
|
+
}
|
|
322
|
+
/** merged MTTG job: tenant/QoS/deadline of v6 plus dependencies and
|
|
323
|
+
* retries of src_core. */
|
|
324
|
+
interface mttgjob {
|
|
325
|
+
readonly id: string;
|
|
326
|
+
readonly tenant: string;
|
|
327
|
+
readonly qos: 'guaranteed' | 'burstable' | 'besteffort';
|
|
328
|
+
readonly priority: number;
|
|
329
|
+
readonly groupid: string;
|
|
330
|
+
readonly payloadref: string;
|
|
331
|
+
readonly dependencies: readonly string[];
|
|
332
|
+
retries: number;
|
|
333
|
+
readonly createdat: Date;
|
|
334
|
+
readonly deadlinems?: number;
|
|
335
|
+
wrappedvmid?: string;
|
|
336
|
+
}
|
|
337
|
+
/** health probe recorded from outside (coreorchestrator). */
|
|
338
|
+
interface healthprobe {
|
|
339
|
+
readonly vmid: string;
|
|
340
|
+
readonly ok: boolean;
|
|
341
|
+
readonly latencyms: number;
|
|
342
|
+
readonly reason?: string;
|
|
343
|
+
readonly cpustealpct?: number;
|
|
344
|
+
readonly mempressure?: number;
|
|
345
|
+
readonly lastseen: string;
|
|
346
|
+
}
|
|
347
|
+
/** health check definition (src_core). */
|
|
348
|
+
interface healthcheck {
|
|
349
|
+
readonly id: string;
|
|
350
|
+
readonly target: vmid | 'host' | `gpu:${string}`;
|
|
351
|
+
readonly intervalms: number;
|
|
352
|
+
readonly timeoutms: number;
|
|
353
|
+
laststatus: 'healthy' | 'degraded' | 'unhealthy' | 'unknown';
|
|
354
|
+
lastcheck: Date;
|
|
355
|
+
failurecount: number;
|
|
356
|
+
}
|
|
357
|
+
/** autoscale policy (src_core). */
|
|
358
|
+
interface autoscalepolicy {
|
|
359
|
+
readonly id: string;
|
|
360
|
+
readonly vmgroup: string;
|
|
361
|
+
readonly metric: 'cpu' | 'mem' | 'gpu' | 'queue_depth';
|
|
362
|
+
readonly thresholdhigh: number;
|
|
363
|
+
readonly thresholdlow: number;
|
|
364
|
+
readonly minreplicas: number;
|
|
365
|
+
readonly maxreplicas: number;
|
|
366
|
+
readonly cooldowensec: number;
|
|
367
|
+
}
|
|
368
|
+
/** migration type and job (src_core, vfio check of coreorchestrator). */
|
|
369
|
+
type migrationtype = 'cold' | 'warm' | 'live' | 'postcopy';
|
|
370
|
+
interface migrationjob {
|
|
371
|
+
readonly id: string;
|
|
372
|
+
readonly vmid: vmid;
|
|
373
|
+
readonly type: migrationtype;
|
|
374
|
+
readonly sourcehost: string;
|
|
375
|
+
readonly desthost: string;
|
|
376
|
+
state: 'pending' | 'precopy' | 'dirtyiter' | 'stopcopy' | 'completed' | 'failed';
|
|
377
|
+
readonly bandwidthmbps: number;
|
|
378
|
+
downtimems?: number;
|
|
379
|
+
progress: number;
|
|
380
|
+
}
|
|
381
|
+
/** disk snapshot (src_core, meta json sidecar of coreorchestrator). */
|
|
382
|
+
interface vmsnapshot {
|
|
383
|
+
readonly id: snapshotid;
|
|
384
|
+
readonly vmid: vmid;
|
|
385
|
+
readonly name: string;
|
|
386
|
+
readonly createdat: Date;
|
|
387
|
+
readonly sizemb: number;
|
|
388
|
+
readonly qcow2path: string;
|
|
389
|
+
readonly rampath?: string;
|
|
390
|
+
readonly parentid?: snapshotid;
|
|
391
|
+
}
|
|
392
|
+
/** checkpoint record (src_core merged with the passage checksum of v6). */
|
|
393
|
+
interface vmcheckpoint {
|
|
394
|
+
readonly id: checkpointid;
|
|
395
|
+
readonly vmid: vmid;
|
|
396
|
+
readonly method: 'criu' | 'qemu_savevm' | 'docker_checkpoint';
|
|
397
|
+
readonly path: string;
|
|
398
|
+
readonly incremental: boolean;
|
|
399
|
+
readonly createdat: Date;
|
|
400
|
+
passagechecksum?: string;
|
|
401
|
+
}
|
|
402
|
+
/** one OTel style metric point (folded into sandboxmetrics). */
|
|
403
|
+
interface otelpoint {
|
|
404
|
+
readonly name: string;
|
|
405
|
+
readonly type: 'counter' | 'gauge' | 'histogram';
|
|
406
|
+
readonly value: number;
|
|
407
|
+
readonly labels: Record<string, string>;
|
|
408
|
+
readonly timestamp: number;
|
|
409
|
+
}
|
|
410
|
+
/** plugin contract (src_core shape, onEvent hook of coreorchestrator). */
|
|
411
|
+
interface plugincontract {
|
|
412
|
+
readonly id: pluginid;
|
|
413
|
+
readonly name: string;
|
|
414
|
+
readonly version: string;
|
|
415
|
+
readonly hooks: readonly string[];
|
|
416
|
+
activate: (context: plugincontext) => Promise<void>;
|
|
417
|
+
deactivate: () => Promise<void>;
|
|
418
|
+
onevent?: (event: string, payload: unknown) => Promise<void>;
|
|
419
|
+
}
|
|
420
|
+
/** context handed to a plugin on activation. */
|
|
421
|
+
interface plugincontext {
|
|
422
|
+
readonly orchestrator: orchestrator;
|
|
423
|
+
readonly log: (message: string) => void;
|
|
424
|
+
readonly registerhook: (hook: enginetopicname, handler: (payload: unknown) => void) => void;
|
|
425
|
+
}
|
|
426
|
+
/** RBAC role and permission union (src_core). */
|
|
427
|
+
interface rbacrole {
|
|
428
|
+
readonly id: roleid;
|
|
429
|
+
readonly name: 'admin' | 'operator' | 'viewer' | 'scheduler';
|
|
430
|
+
readonly permissions: readonly permission[];
|
|
431
|
+
}
|
|
432
|
+
type permission = 'vm:create' | 'vm:start' | 'vm:stop' | 'vm:delete' | 'vm:migrate' | 'gpu:assign' | 'config:write' | 'snapshot:create' | 'metrics:read' | 'plugin:manage' | '*';
|
|
433
|
+
/** RBAC principal of the v6 grant/check cache. */
|
|
434
|
+
interface rbacprincipal {
|
|
435
|
+
readonly subject: string;
|
|
436
|
+
readonly roles: readonly string[];
|
|
437
|
+
readonly tenant: string;
|
|
438
|
+
readonly issuedat: string;
|
|
439
|
+
}
|
|
440
|
+
/** resource reservation with TTL (src_core). */
|
|
441
|
+
interface reservation {
|
|
442
|
+
readonly id: string;
|
|
443
|
+
readonly resources: {
|
|
444
|
+
readonly cpus: readonly number[];
|
|
445
|
+
readonly memorymb: number;
|
|
446
|
+
readonly gpus?: readonly gpuid[];
|
|
447
|
+
};
|
|
448
|
+
readonly owner: vmid | userid;
|
|
449
|
+
readonly expiresat: Date;
|
|
450
|
+
readonly priority: number;
|
|
451
|
+
}
|
|
452
|
+
/** affinity rule (src_core). */
|
|
453
|
+
interface affinityrule {
|
|
454
|
+
readonly id: string;
|
|
455
|
+
readonly type: 'affinity' | 'anti-affinity';
|
|
456
|
+
readonly scope: 'vm' | 'host' | 'numa';
|
|
457
|
+
readonly subjects: readonly vmid[];
|
|
458
|
+
readonly weight: number;
|
|
459
|
+
}
|
|
460
|
+
/** per-tenant quota row (coreorchestrator). */
|
|
461
|
+
interface quotastate {
|
|
462
|
+
vcpu: number;
|
|
463
|
+
vram: number;
|
|
464
|
+
gpu: number;
|
|
465
|
+
usedvcpu: number;
|
|
466
|
+
usedvram: number;
|
|
467
|
+
usedgpu: number;
|
|
468
|
+
}
|
|
469
|
+
/** docker bridge mapping (src_core). */
|
|
470
|
+
interface dockerbridgemapping {
|
|
471
|
+
readonly vmid: vmid;
|
|
472
|
+
readonly containerid: string;
|
|
473
|
+
readonly bridge: string;
|
|
474
|
+
readonly vethhost: string;
|
|
475
|
+
readonly vethguest: string;
|
|
476
|
+
readonly ipam: {
|
|
477
|
+
readonly ipv4: string;
|
|
478
|
+
readonly mac: string;
|
|
479
|
+
};
|
|
480
|
+
}
|
|
481
|
+
/** leader election state (src_core). */
|
|
482
|
+
interface leaderstate {
|
|
483
|
+
readonly nodeid: string;
|
|
484
|
+
term: number;
|
|
485
|
+
isleader: boolean;
|
|
486
|
+
leaderid?: string;
|
|
487
|
+
leaseexpiry?: Date;
|
|
488
|
+
voters: readonly string[];
|
|
489
|
+
}
|
|
490
|
+
/** audit entry (ring view; the JSONL line mirrors it on disk). */
|
|
491
|
+
interface auditentry {
|
|
492
|
+
readonly id: string;
|
|
493
|
+
readonly timestamp: Date;
|
|
494
|
+
readonly userid: userid;
|
|
495
|
+
readonly action: string;
|
|
496
|
+
readonly target: string;
|
|
497
|
+
readonly result: 'success' | 'failure';
|
|
498
|
+
readonly detail?: Record<string, unknown>;
|
|
499
|
+
}
|
|
500
|
+
/** drain task for one vm (src_core). */
|
|
501
|
+
interface draintask {
|
|
502
|
+
readonly vmid: vmid;
|
|
503
|
+
readonly timeoutsec: number;
|
|
504
|
+
readonly signal: 'SIGTERM' | 'SIGQUIT';
|
|
505
|
+
readonly fallback: 'SIGKILL' | 'snapshot';
|
|
506
|
+
}
|
|
507
|
+
/** NUMA topology view owned by this module (heuristic + cores.json). */
|
|
508
|
+
interface numatopologyview {
|
|
509
|
+
readonly nodes: {
|
|
510
|
+
readonly id: numanodeid;
|
|
511
|
+
readonly cpus: readonly number[];
|
|
512
|
+
readonly memorymb: number;
|
|
513
|
+
readonly distances: Record<numanodeid, number>;
|
|
514
|
+
readonly hugepages: {
|
|
515
|
+
readonly '2m': number;
|
|
516
|
+
readonly '1g': number;
|
|
517
|
+
};
|
|
518
|
+
}[];
|
|
519
|
+
readonly totalmemorymb: number;
|
|
520
|
+
}
|
|
521
|
+
/** run queue of one NUMA node (src_core scheduler). */
|
|
522
|
+
interface runqueue {
|
|
523
|
+
readonly numanode: numanodeid;
|
|
524
|
+
tasks: vcputask[];
|
|
525
|
+
load: number;
|
|
526
|
+
readonly capacity: number;
|
|
527
|
+
}
|
|
528
|
+
/** one schedulable vCPU (src_core). */
|
|
529
|
+
interface vcputask {
|
|
530
|
+
readonly id: VcpuId;
|
|
531
|
+
readonly vmid: vmid;
|
|
532
|
+
priority: number;
|
|
533
|
+
affinity: cpuset;
|
|
534
|
+
numanode: numanodeid;
|
|
535
|
+
readonly shares: number;
|
|
536
|
+
readonly burstms: number;
|
|
537
|
+
}
|
|
538
|
+
/** flat config file names watched by the hot reloader. */
|
|
539
|
+
type configfilename = 'vm.config' | 'gpu.config' | 'passage.config' | 'qemu.config' | 'mttg.config' | 'docker.config' | 'boards.json' | 'cores.json' | 'processors.json' | 'gpus.json' | 'vcpus.json' | 'vram.json' | 'amdryzenxseries.json' | 'nvidiablackwell.json';
|
|
540
|
+
/** QEMU process bookkeeping absorbed from spawnqemu (src_core). */
|
|
541
|
+
interface qemuprocess {
|
|
542
|
+
readonly vmid: vmid;
|
|
543
|
+
readonly pid: number;
|
|
544
|
+
readonly cmdline: readonly string[];
|
|
545
|
+
readonly child: ChildProcess;
|
|
546
|
+
readonly monitorsocket: string;
|
|
547
|
+
readonly qmpsocket: string;
|
|
548
|
+
}
|
|
549
|
+
/**
|
|
550
|
+
* error envelope of the orchestrator (coreorchestrator OrchestratorError
|
|
551
|
+
* renamed lowercase); carries a machine readable code, a retryability
|
|
552
|
+
* flag and free form context.
|
|
553
|
+
*/
|
|
554
|
+
declare class orchestratorerror extends Error {
|
|
555
|
+
readonly code: string;
|
|
556
|
+
readonly retryable: boolean;
|
|
557
|
+
readonly context?: Record<string, unknown>;
|
|
558
|
+
constructor(message: string, code: string, retryable?: boolean, context?: Record<string, unknown>);
|
|
559
|
+
}
|
|
560
|
+
/** result of a completed child process. */
|
|
561
|
+
interface runresult {
|
|
562
|
+
readonly code: number;
|
|
563
|
+
readonly stdout: string;
|
|
564
|
+
readonly stderr: string;
|
|
565
|
+
}
|
|
566
|
+
/** parses a "kernel[:rootfs]" image descriptor for the vm runtimes. */
|
|
567
|
+
declare function vmimage(image: string): {
|
|
568
|
+
readonly kernel: string;
|
|
569
|
+
readonly rootfs: string | null;
|
|
570
|
+
};
|
|
571
|
+
/** allocates a host port: an explicit port always wins (user choice),
|
|
572
|
+
* then VHE_PORT, otherwise a random port in [30000, 59999] drawn with
|
|
573
|
+
* crypto.randomInt(30000) + 30000. */
|
|
574
|
+
declare function allocport(explicit?: number): number;
|
|
575
|
+
/** resolves the bind host: explicit host always wins (user choice), then
|
|
576
|
+
* VHE_HOST, then the first non-internal ipv4 interface, then "0.0.0.0";
|
|
577
|
+
* "localhost" and loopback addresses are never returned implicitly. */
|
|
578
|
+
declare function resolvehost(explicit?: string): string;
|
|
579
|
+
/**
|
|
580
|
+
* priority queue over items carrying a numeric priority and a string id;
|
|
581
|
+
* higher priorities pop first and the list view stays stable enough for
|
|
582
|
+
* the dependency checks of the MTTG pipeline.
|
|
583
|
+
*/
|
|
584
|
+
declare class priorityqueue<t extends {
|
|
585
|
+
readonly priority: number;
|
|
586
|
+
readonly id: string;
|
|
587
|
+
}> {
|
|
588
|
+
#private;
|
|
589
|
+
/** inserts an item keeping the heap sorted by descending priority. */
|
|
590
|
+
push(item: t): void;
|
|
591
|
+
/** removes and returns the highest priority item. */
|
|
592
|
+
pop(): t | undefined;
|
|
593
|
+
/** returns the highest priority item without removing it. */
|
|
594
|
+
peek(): t | undefined;
|
|
595
|
+
/** number of queued items. */
|
|
596
|
+
get size(): number;
|
|
597
|
+
/** removes an item by id; true when it existed. */
|
|
598
|
+
remove(id: string): boolean;
|
|
599
|
+
/** snapshot of the current ordering. */
|
|
600
|
+
list(): readonly t[];
|
|
601
|
+
}
|
|
602
|
+
/** live handle over a sandbox process; disposal stops the process. */
|
|
603
|
+
declare class sandboxhandle {
|
|
604
|
+
#private;
|
|
605
|
+
constructor(id: string, runtime: sandboxruntime, child: ChildProcess);
|
|
606
|
+
get id(): string;
|
|
607
|
+
get runtime(): sandboxruntime;
|
|
608
|
+
get pid(): number | undefined;
|
|
609
|
+
get exited(): boolean;
|
|
610
|
+
/** resolves after a startup grace period or rejects on early exit. */
|
|
611
|
+
started(gracems?: number): Promise<void>;
|
|
612
|
+
/** stops the sandbox; SIGTERM first, SIGKILL after a grace period. */
|
|
613
|
+
stop(): Promise<void>;
|
|
614
|
+
/** `using` disposal hook: stops the sandbox without awaiting. */
|
|
615
|
+
[Symbol.dispose](): void;
|
|
616
|
+
}
|
|
617
|
+
/** strategy contract implemented by every runtime. */
|
|
618
|
+
declare abstract class runtimestrategy {
|
|
619
|
+
abstract readonly name: sandboxruntime;
|
|
620
|
+
abstract readonly needskvm: boolean;
|
|
621
|
+
/** probes the runtime binary; returns false when missing. */
|
|
622
|
+
detect(): Promise<boolean>;
|
|
623
|
+
/** full launch argv including the binary at position zero. */
|
|
624
|
+
abstract buildcommand(spec: sandboxspec): readonly string[];
|
|
625
|
+
/** spawns the sandbox and returns a live handle. */
|
|
626
|
+
launch(spec: sandboxspec): Promise<sandboxhandle>;
|
|
627
|
+
/** optional snapshot support (firecracker api); null when unsupported. */
|
|
628
|
+
createsnapshot(id: string, targetdir: string): Promise<string | null>;
|
|
629
|
+
protected abstract binary(): string;
|
|
630
|
+
protected versionargs(): readonly string[];
|
|
631
|
+
}
|
|
632
|
+
/** docker strategy; memory-swap -1 grants unlimited swap, shm-size 2g
|
|
633
|
+
* fixes the 64MB default that crashes pytorch dataloaders, --cpus maps
|
|
634
|
+
* to the engine NanoCpus field (cpus * 1e9) and --rm enables autoremove. */
|
|
635
|
+
declare class dockerruntime extends runtimestrategy {
|
|
636
|
+
#private;
|
|
637
|
+
readonly name: sandboxruntime;
|
|
638
|
+
readonly needskvm = false;
|
|
639
|
+
constructor(engineruntime?: string | null);
|
|
640
|
+
protected binary(): string;
|
|
641
|
+
protected versionargs(): readonly string[];
|
|
642
|
+
buildcommand(spec: sandboxspec): readonly string[];
|
|
643
|
+
}
|
|
644
|
+
/** gvisor strategy: runsc oci runtime on the systrap platform (seccomp
|
|
645
|
+
* RET_TRAP delivering SIGSYS that the sentry emulates); expect 10-30%
|
|
646
|
+
* overhead and io_uring disabled by default inside the sandbox. */
|
|
647
|
+
declare class gvisorruntime extends dockerruntime {
|
|
648
|
+
readonly name: sandboxruntime;
|
|
649
|
+
constructor();
|
|
650
|
+
}
|
|
651
|
+
/** kata containers strategy: runtime-rs (rust) is the default runtime
|
|
652
|
+
* since kata 4.0; supported hypervisors are qemu, cloud hypervisor,
|
|
653
|
+
* firecracker, dragonball and openvmm (kata 4.1). */
|
|
654
|
+
declare class kataruntime extends dockerruntime {
|
|
655
|
+
readonly name: sandboxruntime;
|
|
656
|
+
constructor();
|
|
657
|
+
}
|
|
658
|
+
/** performs one http request over the firecracker api unix socket; the
|
|
659
|
+
* vmm exposes machine-config, boot-source, drives, actions and
|
|
660
|
+
* snapshot/create on that socket. */
|
|
661
|
+
declare function fcrequest(socket: string, method: string, apipath: string, body?: unknown): Promise<number>;
|
|
662
|
+
/** firecracker strategy; requires /dev/kvm, drives the vmm over its api
|
|
663
|
+
* socket and supports full snapshots with file or uffd backends. */
|
|
664
|
+
declare class firecrackerruntime extends runtimestrategy {
|
|
665
|
+
#private;
|
|
666
|
+
readonly name: sandboxruntime;
|
|
667
|
+
readonly needskvm = true;
|
|
668
|
+
constructor(backend?: 'file' | 'uffd');
|
|
669
|
+
protected binary(): string;
|
|
670
|
+
/** per-sandbox api socket path. */
|
|
671
|
+
socketpath(id: string): string;
|
|
672
|
+
/** machine-config payload (PUT /machine-config). */
|
|
673
|
+
machineconfig(spec: sandboxspec): Record<string, unknown>;
|
|
674
|
+
/** boot-source payload (PUT /boot-source). */
|
|
675
|
+
bootsource(spec: sandboxspec): Record<string, unknown>;
|
|
676
|
+
/** drives payload for the root filesystem (PUT /drives/rootfs). */
|
|
677
|
+
drivepayload(spec: sandboxspec): Record<string, unknown> | null;
|
|
678
|
+
buildcommand(spec: sandboxspec): readonly string[];
|
|
679
|
+
/** restore argv: --restore-file replays a snapshot with the configured
|
|
680
|
+
* backend (file maps privately with copy-on-write; uffd faults pages
|
|
681
|
+
* in from a userspace handler). */
|
|
682
|
+
restorecommand(id: string, snapshotfile: string): readonly string[];
|
|
683
|
+
/** creates a full snapshot through PATCH /snapshot/create. */
|
|
684
|
+
createsnapshot(id: string, targetdir: string): Promise<string | null>;
|
|
685
|
+
/** launches a fresh microVM: spawns the vmm, applies machine-config,
|
|
686
|
+
* boot-source and drives, then issues InstanceStart. */
|
|
687
|
+
launch(spec: sandboxspec): Promise<sandboxhandle>;
|
|
688
|
+
}
|
|
689
|
+
/**
|
|
690
|
+
* qemu strategy: mttcg with one host thread per vCPU and a 1024 MiB
|
|
691
|
+
* translation-block cache; the EPYC-v5 cpu model is confirmed in
|
|
692
|
+
* target/i386/cpu.c; without /dev/kvm (github actions hosted runners)
|
|
693
|
+
* the engine keeps tcg and only swaps the cpu model.
|
|
694
|
+
*
|
|
695
|
+
* the class also absorbs spawnqemu from the Meta source: the vm plane
|
|
696
|
+
* launches qemu with monitor and qmp unix sockets, a numa pin line,
|
|
697
|
+
* vfio devices for every gpu assignment, extra args from qemu.config
|
|
698
|
+
* and, when the binary is absent (CI), a "sleep 3600" stand-in process
|
|
699
|
+
* so scheduling and lifecycle still exercise end to end.
|
|
700
|
+
*/
|
|
701
|
+
declare class qemuruntime extends runtimestrategy {
|
|
702
|
+
#private;
|
|
703
|
+
readonly name: sandboxruntime;
|
|
704
|
+
readonly needskvm = false;
|
|
705
|
+
constructor(machine?: 'q35' | 'microvm');
|
|
706
|
+
protected binary(): string;
|
|
707
|
+
buildcommand(spec: sandboxspec): readonly string[];
|
|
708
|
+
/** monitor and qmp socket paths for one vm (spawnqemu merge). */
|
|
709
|
+
socketsfor(vmidvalue: string): {
|
|
710
|
+
readonly monitor: string;
|
|
711
|
+
readonly qmp: string;
|
|
712
|
+
};
|
|
713
|
+
/**
|
|
714
|
+
* builds the vm plane argv: strategy flags plus the name/uuid, dual
|
|
715
|
+
* unix sockets, virtio balloon, the per-numa bridge netdev, the numa
|
|
716
|
+
* pin line and one vfio-pci device per assigned gpu.
|
|
717
|
+
*/
|
|
718
|
+
buildvmcommand(vm: vmrecord, assignments: readonly gpuassignment[]): readonly string[];
|
|
719
|
+
/**
|
|
720
|
+
* spawns qemu for a vm record; when the binary does not exist the
|
|
721
|
+
* method spawns "sleep 3600" instead so CI environments without qemu
|
|
722
|
+
* still run the scheduling and lifecycle paths (spawnqemu merge).
|
|
723
|
+
*/
|
|
724
|
+
spawn(vm: vmrecord, assignments: readonly gpuassignment[], onexit: (vmidvalue: vmid, code: number | null) => void): Promise<qemuprocess>;
|
|
725
|
+
/** probes the installed qemu version banner (coreorchestrator). */
|
|
726
|
+
probeversion(): Promise<string>;
|
|
727
|
+
}
|
|
728
|
+
/** cloud hypervisor strategy: rust vmm; vfio-user devices are
|
|
729
|
+
* experimental in v53 and attach through --user-device socket=<path>. */
|
|
730
|
+
declare class clhruntime extends runtimestrategy {
|
|
731
|
+
#private;
|
|
732
|
+
readonly name: sandboxruntime;
|
|
733
|
+
readonly needskvm = true;
|
|
734
|
+
constructor(vfiousersocket?: string | null);
|
|
735
|
+
protected binary(): string;
|
|
736
|
+
buildcommand(spec: sandboxspec): readonly string[];
|
|
737
|
+
}
|
|
738
|
+
/** registry of runtime strategies; the factory resolves exclusively
|
|
739
|
+
* through this registry. */
|
|
740
|
+
declare class runtimeregistry {
|
|
741
|
+
#private;
|
|
742
|
+
register(strategy: runtimestrategy): this;
|
|
743
|
+
get(name: sandboxruntime): runtimestrategy;
|
|
744
|
+
names(): readonly sandboxruntime[];
|
|
745
|
+
/** probes every registered runtime and returns availability. */
|
|
746
|
+
detectall(): Promise<Record<string, boolean>>;
|
|
747
|
+
}
|
|
748
|
+
/** fluent builder for sandbox specs; defaults mirror the engine
|
|
749
|
+
* baseline: 2 vCPUs, 2048 MiB, shm 2g, unlimited swap, autoremove on. */
|
|
750
|
+
declare class sandboxbuilder {
|
|
751
|
+
#private;
|
|
752
|
+
withid(id: string): this;
|
|
753
|
+
withhost(host?: string): this;
|
|
754
|
+
withimage(image: string): this;
|
|
755
|
+
withruntime(runtime: sandboxruntime): this;
|
|
756
|
+
/** vCPU count; build() clamps it to the host core count. */
|
|
757
|
+
withcpus(count: number): this;
|
|
758
|
+
withmemory(mib: number): this;
|
|
759
|
+
withshm(shm: string): this;
|
|
760
|
+
/** -1 keeps unlimited swap (docker semantics). */
|
|
761
|
+
withswap(limit: number): this;
|
|
762
|
+
withoutautoremove(): this;
|
|
763
|
+
withenv(key: string, value: string): this;
|
|
764
|
+
withgpuspoof(name: string): this;
|
|
765
|
+
/** maps a container port; the host port is randomized unless pinned. */
|
|
766
|
+
withport(container: number, host?: number): this;
|
|
767
|
+
withworkdir(workdir: string): this;
|
|
768
|
+
withcommand(...command: string[]): this;
|
|
769
|
+
/** freezes the spec after validation. */
|
|
770
|
+
build(): sandboxspec;
|
|
771
|
+
}
|
|
772
|
+
/** legacy short names kept for v5 callers; each maps to a sandbox:*
|
|
773
|
+
* topic on the single bus. */
|
|
774
|
+
type sandboxeventname = 'created' | 'started' | 'stopped' | 'snapshotted' | 'restored' | 'destroyed' | 'pooled' | 'error';
|
|
775
|
+
/** one replay ledger record. */
|
|
776
|
+
interface replayrecord {
|
|
777
|
+
readonly at: string;
|
|
778
|
+
readonly payload: unknown;
|
|
779
|
+
}
|
|
780
|
+
/**
|
|
781
|
+
* the single event bus of the engine. sandboxevents extends enginebus
|
|
782
|
+
* (from index.ts) instead of owning another EventEmitter, keeps the v5
|
|
783
|
+
* short-name emit/on api and adds the replay ledger of the Meta v6 bus:
|
|
784
|
+
* every publish is recorded in a 200 slot ring so newcomer plugins can
|
|
785
|
+
* catch up with recent history. the full topic topology (sandbox:* plus
|
|
786
|
+
* vm:*, gpu:*, passage:*, mttg:*, health:*, autoscale:*, rbac:*,
|
|
787
|
+
* leader:* and friends) is declared once in enginetopics.
|
|
788
|
+
*/
|
|
789
|
+
declare class sandboxevents extends enginebus {
|
|
790
|
+
#private;
|
|
791
|
+
/**
|
|
792
|
+
* publishes on the single bus while recording the replay ledger;
|
|
793
|
+
* listener failures are isolated by the underlying emitter. the
|
|
794
|
+
* override keeps the generic topic typing of enginebus so payloads
|
|
795
|
+
* stay checked at every call site.
|
|
796
|
+
*/
|
|
797
|
+
publish<t extends enginetopicname>(topic: t, payload: enginetopics[t]): boolean;
|
|
798
|
+
/** replays the most recent records of one topic for late joiners. */
|
|
799
|
+
replay(topic: enginetopicname, count?: number): readonly replayrecord[];
|
|
800
|
+
/** legacy v5 emit: publishes onto the sandbox:<name> topic. */
|
|
801
|
+
emit(name: sandboxeventname, payload: unknown): boolean;
|
|
802
|
+
/** legacy v5 on: subscribes to the sandbox:<name> topic. */
|
|
803
|
+
on(name: sandboxeventname, listener: (payload: unknown) => void): this;
|
|
804
|
+
}
|
|
805
|
+
/** immutable metrics snapshot. */
|
|
806
|
+
interface metricsview {
|
|
807
|
+
readonly counters: Record<string, number>;
|
|
808
|
+
readonly gauges: Record<string, number>;
|
|
809
|
+
readonly bootms: readonly number[];
|
|
810
|
+
readonly bootmsavg: number;
|
|
811
|
+
}
|
|
812
|
+
/**
|
|
813
|
+
* the single metrics component of the engine. sandboxmetrics extends the
|
|
814
|
+
* MetricsStore of index.ts (so every sample also lands in the disposable
|
|
815
|
+
* InternalMemory-backed store and can flush to disk), keeps the v5
|
|
816
|
+
* counters/gauges/boot histogram api and absorbs the Meta OTel recorder:
|
|
817
|
+
* labeled counter/gauge/histogram points in a 10000 slot ring plus the
|
|
818
|
+
* Prometheus text exporter with "# TYPE" headers.
|
|
819
|
+
*/
|
|
820
|
+
declare class sandboxmetrics extends MetricsStore {
|
|
821
|
+
#private;
|
|
822
|
+
constructor(engineid?: string, snapshotdir?: string);
|
|
823
|
+
/** increments a counter and records an OTel counter point. */
|
|
824
|
+
inc(key: string, delta?: number, labels?: Record<string, string>): void;
|
|
825
|
+
/** sets a gauge and records an OTel gauge point. */
|
|
826
|
+
gauge(key: string, value: number, labels?: Record<string, string>): void;
|
|
827
|
+
/** records an OTel histogram point (boot latencies and friends). */
|
|
828
|
+
histogram(key: string, value: number, labels?: Record<string, string>): void;
|
|
829
|
+
/** pushes one boot latency sample into the 512 slot histogram. */
|
|
830
|
+
observeboot(ms: number): void;
|
|
831
|
+
/** raw OTel ring access (Meta getMetricsSnapshot). */
|
|
832
|
+
otelsnapshot(): readonly otelpoint[];
|
|
833
|
+
/** aggregates the counters, gauges and boot histogram view. */
|
|
834
|
+
snapshot(): metricsview;
|
|
835
|
+
/**
|
|
836
|
+
* renders the Prometheus text exposition format: one "# TYPE" header
|
|
837
|
+
* per metric name followed by its last twenty labeled samples.
|
|
838
|
+
*/
|
|
839
|
+
exportprometheus(): string;
|
|
840
|
+
}
|
|
841
|
+
/** picks the strategy from the registry, enforces the kvm requirement
|
|
842
|
+
* and wraps the live handle in a proxy. */
|
|
843
|
+
declare class sandboxfactory {
|
|
844
|
+
#private;
|
|
845
|
+
constructor(registry: runtimeregistry, events: sandboxevents, metrics: sandboxmetrics);
|
|
846
|
+
create(spec: sandboxspec): Promise<sandboxproxy>;
|
|
847
|
+
}
|
|
848
|
+
/** guards lifecycle transitions, records metrics and emits events on
|
|
849
|
+
* every call that reaches the underlying handle. */
|
|
850
|
+
declare class sandboxproxy {
|
|
851
|
+
#private;
|
|
852
|
+
constructor(spec: sandboxspec, handle: sandboxhandle, strategy: runtimestrategy, events: sandboxevents, metrics: sandboxmetrics);
|
|
853
|
+
get id(): string;
|
|
854
|
+
get runtime(): sandboxruntime;
|
|
855
|
+
get state(): lifecyclestate;
|
|
856
|
+
get host(): string;
|
|
857
|
+
get ports(): readonly portmapping[];
|
|
858
|
+
/** guards the transition to running and records the boot latency. */
|
|
859
|
+
start(): Promise<void>;
|
|
860
|
+
/** creates a snapshot when the runtime supports it. */
|
|
861
|
+
snapshot(targetdir?: string): Promise<string | null>;
|
|
862
|
+
/** pauses a running sandbox (qemu stop through the qmp socket). */
|
|
863
|
+
pause(): Promise<void>;
|
|
864
|
+
/** resumes a paused sandbox. */
|
|
865
|
+
resume(): Promise<void>;
|
|
866
|
+
/** stops and destroys the sandbox; idempotent. */
|
|
867
|
+
destroy(): Promise<void>;
|
|
868
|
+
/** `using` disposal hook: destroys the sandbox without awaiting. */
|
|
869
|
+
[Symbol.dispose](): void;
|
|
870
|
+
/** pid of the underlying sandbox process, when alive. */
|
|
871
|
+
get pid(): number | undefined;
|
|
872
|
+
/** delegates to the criu checkpointer for process-tree snapshots. */
|
|
873
|
+
criucheckpoint(checkpointer: cricheckpointer, dir: string): Promise<void>;
|
|
874
|
+
}
|
|
875
|
+
/** warm pool options: keep min sandboxes pre-booted, cap at max. */
|
|
876
|
+
interface warmpooloptions {
|
|
877
|
+
readonly min: number;
|
|
878
|
+
readonly max: number;
|
|
879
|
+
readonly template: () => Promise<sandboxproxy>;
|
|
880
|
+
readonly events: sandboxevents;
|
|
881
|
+
readonly metrics: sandboxmetrics;
|
|
882
|
+
}
|
|
883
|
+
/** keeps pre-booted sandboxes ready so acquires skip the cold start;
|
|
884
|
+
* firecracker cold boot is 125ms but a snapshot restore is ~4ms, and the
|
|
885
|
+
* pool turns creation into a pointer pop. */
|
|
886
|
+
declare class warmpool {
|
|
887
|
+
#private;
|
|
888
|
+
constructor(options: warmpooloptions);
|
|
889
|
+
/** fills the pool up to the configured minimum. */
|
|
890
|
+
prewarm(): Promise<void>;
|
|
891
|
+
/** acquires a warm sandbox or falls back to a fresh create. */
|
|
892
|
+
acquire(): Promise<sandboxproxy>;
|
|
893
|
+
/** returns a sandbox to the pool or destroys it above the cap. */
|
|
894
|
+
release(sandbox: sandboxproxy): Promise<void>;
|
|
895
|
+
/** schedules background refills. */
|
|
896
|
+
startrefill(intervalms?: number): void;
|
|
897
|
+
/** stops refills and destroys every warm sandbox. */
|
|
898
|
+
drain(): Promise<void>;
|
|
899
|
+
}
|
|
900
|
+
/** process-tree checkpoint/restore through criu 4.2.1; selinux relabel
|
|
901
|
+
* on restore is provided by security.ts (criurelabel). */
|
|
902
|
+
declare class cricheckpointer {
|
|
903
|
+
checkpoint(handle: sandboxhandle, dir: string): Promise<void>;
|
|
904
|
+
restore(dir: string): Promise<void>;
|
|
905
|
+
}
|
|
906
|
+
/** renders a docker compose 5.5.0 service block equivalent to the
|
|
907
|
+
* engine flags: memswap_limit -1 and shm_size 2g. */
|
|
908
|
+
declare function composeyaml(spec: sandboxspec): string;
|
|
909
|
+
/** orchestrator options; every piece can be injected (user choice). */
|
|
910
|
+
interface orchestratoroptions {
|
|
911
|
+
readonly firecrackerbackend?: 'file' | 'uffd';
|
|
912
|
+
readonly qemumachine?: 'q35' | 'microvm';
|
|
913
|
+
readonly clhvfiousersocket?: string | null;
|
|
914
|
+
readonly nodeid?: string;
|
|
915
|
+
readonly rootdir?: string;
|
|
916
|
+
readonly enablehotreload?: boolean;
|
|
917
|
+
readonly kvmenabled?: boolean;
|
|
918
|
+
}
|
|
919
|
+
/**
|
|
920
|
+
* facade that ties the registry, factory, warm pool, events and metrics
|
|
921
|
+
* into one lifecycle api (create, start, snapshot, restore, destroy) and
|
|
922
|
+
* additionally owns the vm plane absorbed from the Meta orchestrators:
|
|
923
|
+
* lifecycle with the single state machine, the NUMA scheduler, balloon,
|
|
924
|
+
* gpu assignment, passage routing, the MTTG queue, the docker bridge,
|
|
925
|
+
* health, autoscale, migration, snapshots, checkpoints, hot-reload,
|
|
926
|
+
* plugins, RBAC, reservations, quotas, affinity, audit, drain and
|
|
927
|
+
* leader election.
|
|
928
|
+
*/
|
|
929
|
+
declare class orchestrator {
|
|
930
|
+
#private;
|
|
931
|
+
readonly version = "2.0.0-saddle-20260822";
|
|
932
|
+
readonly stack: Readonly<Record<string, string>>;
|
|
933
|
+
constructor(options?: orchestratoroptions);
|
|
934
|
+
get events(): sandboxevents;
|
|
935
|
+
get metrics(): sandboxmetrics;
|
|
936
|
+
/** v6 alias over the single event bus. */
|
|
937
|
+
geteventbus(): sandboxevents;
|
|
938
|
+
/**
|
|
939
|
+
* routes unhandled rejections and uncaught exceptions of the host
|
|
940
|
+
* process onto the single bus; explicit opt-in because it changes
|
|
941
|
+
* process-wide behavior.
|
|
942
|
+
*/
|
|
943
|
+
installerrorcatcher(): void;
|
|
944
|
+
/**
|
|
945
|
+
* returns the NUMA view as {nodes, map}; an explicit numa section in
|
|
946
|
+
* cores.json wins over the heuristic (coreorchestrator getNumaTopology).
|
|
947
|
+
*/
|
|
948
|
+
getnumatopology(): Promise<{
|
|
949
|
+
readonly nodes: number;
|
|
950
|
+
readonly map: Record<number, number[]>;
|
|
951
|
+
}>;
|
|
952
|
+
/**
|
|
953
|
+
* asserts that a user holds a permission through one of its roles; the
|
|
954
|
+
* system actor bypasses everything and roleless users may still read
|
|
955
|
+
* metrics (viewer fallback). denials publish rbac:denied and throw an
|
|
956
|
+
* orchestratorerror with ERR_RBAC_DENIED.
|
|
957
|
+
*/
|
|
958
|
+
assertpermission(user: userid, perm: permission): void;
|
|
959
|
+
/** assigns an extra role to a user. */
|
|
960
|
+
assignrole(user: userid, role: roleid): void;
|
|
961
|
+
/** grants subject actions over a resource key (v6 cache). */
|
|
962
|
+
grantrbac(principal: rbacprincipal, resource: string, actions: readonly string[]): void;
|
|
963
|
+
/** checks a grant through subject, roles and wildcards (v6). */
|
|
964
|
+
checkrbac(principal: rbacprincipal, resource: string, action: string): boolean;
|
|
965
|
+
/**
|
|
966
|
+
* reserves cpus/memory/gpus for an owner with a TTL (default 300s);
|
|
967
|
+
* overlapping cpu sets of equal or higher priority block the request.
|
|
968
|
+
*/
|
|
969
|
+
reserveresources(owner: vmid | userid, resources: reservation['resources'], ttlsec?: number, priority?: number): reservation;
|
|
970
|
+
/** releases a reservation by id; true when it existed. */
|
|
971
|
+
releasereservation(id: string): boolean;
|
|
972
|
+
/** registers an affinity or anti-affinity rule. */
|
|
973
|
+
addaffinityrule(rule: affinityrule): void;
|
|
974
|
+
/** removes an affinity rule by id. */
|
|
975
|
+
removeaffinityrule(ruleid: string): boolean;
|
|
976
|
+
/**
|
|
977
|
+
* evaluates whether a vm definition may land on a node described by
|
|
978
|
+
* labels: In/NotIn/Exists selectors must all pass and antiaffinity
|
|
979
|
+
* targets must not overlap the candidate pin set (coreorchestrator).
|
|
980
|
+
*/
|
|
981
|
+
resolveaffinity(record: vmrecord, nodelabels: Record<string, string>): boolean;
|
|
982
|
+
/**
|
|
983
|
+
* periodic scheduler tick: sorts run queues by priority, recomputes
|
|
984
|
+
* loads and rebalances when the max/min spread exceeds 20 percent.
|
|
985
|
+
*/
|
|
986
|
+
scheduletick(): void;
|
|
987
|
+
/** repins one vCPU of a vm onto an explicit cpu set. */
|
|
988
|
+
setvcpuaffinity(id: vmid, vcpuindex: number, target: cpuset): result<void>;
|
|
989
|
+
/**
|
|
990
|
+
* validates the topology of a vm, warns on overcommit above 1.5x the
|
|
991
|
+
* host cpus, computes the pin set (explicit pins or a random rotation)
|
|
992
|
+
* and walks the machine through scheduling and binding
|
|
993
|
+
* (coreorchestrator scheduleVcpu).
|
|
994
|
+
*/
|
|
995
|
+
schedulevcpu(vm: vmrecord): Promise<void>;
|
|
996
|
+
/** guarded transition on the single machine; publishes vm:phase. */
|
|
997
|
+
transitionvm(id: vmid, to: lifecyclestate): Promise<vmrecord>;
|
|
998
|
+
/**
|
|
999
|
+
* creates a vm record: quota enforcement, NUMA placement, vCPU pins,
|
|
1000
|
+
* balloon initialization and the scheduling/binding walkthrough.
|
|
1001
|
+
*/
|
|
1002
|
+
createvm(definition: vmdefinition, actor?: userid): Promise<result<vmrecord>>;
|
|
1003
|
+
/**
|
|
1004
|
+
* starts a vm: vCPU tasks enter the run queues, qemu spawns with the
|
|
1005
|
+
* monitor/qmp socket layout and the docker bridge attaches for bridge
|
|
1006
|
+
* or passage network modes.
|
|
1007
|
+
*/
|
|
1008
|
+
startvm(id: vmid, actor?: userid): Promise<result<vmrecord>>;
|
|
1009
|
+
/** stops a vm through the drain path, kills qemu and unschedules its
|
|
1010
|
+
* vCPU tasks. */
|
|
1011
|
+
stopvm(id: vmid, actor?: userid, reason?: string): Promise<result<void>>;
|
|
1012
|
+
/** destroys a vm: stops it when running, releases gpus, frees
|
|
1013
|
+
* reservations and quota and forgets every side table. */
|
|
1014
|
+
destroyvm(id: vmid, actor?: userid): Promise<result<void>>;
|
|
1015
|
+
/** pauses a running vm (qmp stop semantics). */
|
|
1016
|
+
pausevm(id: vmid, actor?: userid): Promise<result<void>>;
|
|
1017
|
+
/** lists vm records with optional state and numa filters. */
|
|
1018
|
+
listvms(filter?: {
|
|
1019
|
+
readonly state?: lifecyclestate;
|
|
1020
|
+
readonly numa?: numanodeid;
|
|
1021
|
+
}): readonly vmrecord[];
|
|
1022
|
+
/** sets the vcpu/vram/gpu quota of a tenant and publishes quota:set. */
|
|
1023
|
+
setquota(tenantid: string, quota: {
|
|
1024
|
+
readonly vcpu: number;
|
|
1025
|
+
readonly vram: number;
|
|
1026
|
+
readonly gpu: number;
|
|
1027
|
+
}): void;
|
|
1028
|
+
/**
|
|
1029
|
+
* walks the balloon of a vm towards a target with pressure scoring
|
|
1030
|
+
* and a gradual 100 MB per 500 ms adjustment; bounds come from the
|
|
1031
|
+
* vramballoon descriptor (0.5x .. 1.5x of the requested size).
|
|
1032
|
+
*/
|
|
1033
|
+
balloonvm(id: vmid, targetmb: number, actor?: userid): Promise<result<balloonstate>>;
|
|
1034
|
+
/** strict v6 balloon write with explicit bounds errors. */
|
|
1035
|
+
balloonvram(id: vmid, targetmib: number): Promise<vramballoon>;
|
|
1036
|
+
/** returns the balloon state of a vm, when present. */
|
|
1037
|
+
getballoonstate(id: vmid): balloonstate | undefined;
|
|
1038
|
+
/** registers a gpu; sriov enabled gpus get a PF view with 7 VFs
|
|
1039
|
+
* (Blackwell typical). */
|
|
1040
|
+
registergpu(gpu: {
|
|
1041
|
+
readonly id: gpuid;
|
|
1042
|
+
readonly model: string;
|
|
1043
|
+
readonly pciaddr: string;
|
|
1044
|
+
readonly mode: 'none' | 'passthrough' | 'vgpu' | 'mdev';
|
|
1045
|
+
readonly vrammb: number;
|
|
1046
|
+
readonly sriovenabled: boolean;
|
|
1047
|
+
readonly mdevprofiles?: readonly string[];
|
|
1048
|
+
}): void;
|
|
1049
|
+
/**
|
|
1050
|
+
* assigns a gpu (or one of its VFs) to a vm; the iommu group is read
|
|
1051
|
+
* from the last id bytes or drawn randomly when unavailable.
|
|
1052
|
+
*/
|
|
1053
|
+
assigngpu(id: vmid, gpu: gpuid, actor?: userid, usevf?: boolean): Promise<result<gpuassignment>>;
|
|
1054
|
+
/** releases a gpu assignment and frees its VF, if any. */
|
|
1055
|
+
releasegpu(gpu: gpuid, actor?: userid): result<void>;
|
|
1056
|
+
/** lists the SR-IOV physical functions known to the engine. */
|
|
1057
|
+
listsriov(): readonly sriovpf[];
|
|
1058
|
+
/**
|
|
1059
|
+
* provisions VFs on a PF through the sysfs sriov_numvfs knob; when the
|
|
1060
|
+
* sysfs node is absent (containers) the call reports the simulated
|
|
1061
|
+
* outcome instead of failing (coreorchestrator).
|
|
1062
|
+
*/
|
|
1063
|
+
provisionsriov(pf: string, vfcount: number): Promise<readonly string[]>;
|
|
1064
|
+
/**
|
|
1065
|
+
* attaches gpu passthrough requests to a vm by filtering the flat
|
|
1066
|
+
* gpus.json catalog (coreorchestrator); vfio must be requested.
|
|
1067
|
+
*/
|
|
1068
|
+
attachgpupassthrough(id: vmid, requests: readonly gpupassthroughrequest[]): Promise<readonly string[]>;
|
|
1069
|
+
/**
|
|
1070
|
+
* adds a passage route between two vms; the default latency follows
|
|
1071
|
+
* the numa distance (15us same node, 45us remote) plus 20us of vxlan
|
|
1072
|
+
* encapsulation, and ivshmem routes are capped at 50000 Mbps.
|
|
1073
|
+
*/
|
|
1074
|
+
addpassageroute(route: Omit<passageroute, 'latencyus'> & {
|
|
1075
|
+
readonly latencyus?: number;
|
|
1076
|
+
}): result<passageroute>;
|
|
1077
|
+
/** v6 alias returning the first route between two vms. */
|
|
1078
|
+
resolvepassageroute(src: vmid, dst: vmid): passageroute | undefined;
|
|
1079
|
+
/** every route between two vms (src_core). */
|
|
1080
|
+
resolvepassage(src: vmid, dst: vmid): readonly passageroute[];
|
|
1081
|
+
/** removes a passage route by id. */
|
|
1082
|
+
removepassageroute(routeid: string): boolean;
|
|
1083
|
+
/** enqueues an MTTG job; unresolved dependencies are logged so the
|
|
1084
|
+
* pipeline can trace the wait chain. */
|
|
1085
|
+
enqueuemttg<const t extends Omit<mttgjob, 'createdat' | 'retries'>>(job: t): void;
|
|
1086
|
+
/**
|
|
1087
|
+
* drains the MTTG queue with a bounded concurrency (default 4):
|
|
1088
|
+
* dependencies requeue at a lower priority (anti-starvation) and
|
|
1089
|
+
* failures retry up to three times with priority decay.
|
|
1090
|
+
*/
|
|
1091
|
+
processmttgqueue(handler: (job: mttgjob) => awaitable<void>, concurrency?: number): Promise<void>;
|
|
1092
|
+
/** dequeues the next job by priority and deadline (v6). */
|
|
1093
|
+
dequeuemttg(): Promise<mttgjob | undefined>;
|
|
1094
|
+
/**
|
|
1095
|
+
* preempts up to three besteffort jobs of lower priority when a
|
|
1096
|
+
* guaranteed job arrives (coreorchestrator QoS preemption).
|
|
1097
|
+
*/
|
|
1098
|
+
preemptifneeded(incoming: mttgjob): Promise<readonly mttgjob[]>;
|
|
1099
|
+
/** returns the docker bridge mapping of a vm, when attached. */
|
|
1100
|
+
getdockerbridge(id: vmid): dockerbridgemapping | undefined;
|
|
1101
|
+
/**
|
|
1102
|
+
* builds the docker run sidecar argv of a vm from docker.config
|
|
1103
|
+
* (coreorchestrator); the network name falls back to the numa bridge.
|
|
1104
|
+
*/
|
|
1105
|
+
builddockerbridgeargs(id: vmid): Promise<readonly string[]>;
|
|
1106
|
+
/** starts the periodic health monitor. */
|
|
1107
|
+
starthealthmonitor(intervalms?: number): void;
|
|
1108
|
+
/** stops the periodic health monitor. */
|
|
1109
|
+
stophealthmonitor(): void;
|
|
1110
|
+
/** registers a health check over a vm, the host or a gpu. */
|
|
1111
|
+
registerhealthcheck(check: Omit<healthcheck, 'laststatus' | 'lastcheck' | 'failurecount'>): void;
|
|
1112
|
+
/**
|
|
1113
|
+
* records an external health probe (v6); a failing probe moves a
|
|
1114
|
+
* running vm to degraded.
|
|
1115
|
+
*/
|
|
1116
|
+
recordhealth(probe: healthprobe): Promise<void>;
|
|
1117
|
+
/** returns the currently failing health probes. */
|
|
1118
|
+
failingvms(): readonly healthprobe[];
|
|
1119
|
+
/** registers an autoscale policy. */
|
|
1120
|
+
registerautoscalepolicy(policy: autoscalepolicy): void;
|
|
1121
|
+
/** starts the periodic autoscaler. */
|
|
1122
|
+
startautoscaler(intervalms?: number): void;
|
|
1123
|
+
/** stops the periodic autoscaler. */
|
|
1124
|
+
stopautoscaler(): void;
|
|
1125
|
+
/**
|
|
1126
|
+
* tenant view of autoscaling (v6): averages the cpu steal of the
|
|
1127
|
+
* tenant probes and proposes one step up above 75 percent or one step
|
|
1128
|
+
* down below 20 percent.
|
|
1129
|
+
*/
|
|
1130
|
+
evaluatetenantautoscale(tenantid: string): Promise<{
|
|
1131
|
+
readonly desired: number;
|
|
1132
|
+
readonly current: number;
|
|
1133
|
+
readonly action: 'up' | 'down' | 'none';
|
|
1134
|
+
}>;
|
|
1135
|
+
/**
|
|
1136
|
+
* migrates a running vm to another host; live migrations walk the
|
|
1137
|
+
* precopy, dirty iteration and stop-copy stages with a 50-250ms
|
|
1138
|
+
* downtime window; vfio attached vms require the vfio-migration label.
|
|
1139
|
+
*/
|
|
1140
|
+
startmigration(id: vmid, desthost: string, type?: migrationtype, actor?: userid): Promise<result<migrationjob>>;
|
|
1141
|
+
/** v6 alias for startmigration with the live type. */
|
|
1142
|
+
startlivemigration(id: vmid, targethost: string): Promise<migrationjob>;
|
|
1143
|
+
/**
|
|
1144
|
+
* creates a disk snapshot: a qcow2 artifact (with a metadata payload
|
|
1145
|
+
* in the simulated layout), an optional ram image and a json sidecar;
|
|
1146
|
+
* the vm walks running -> snapshotted -> running on the single
|
|
1147
|
+
* machine.
|
|
1148
|
+
*/
|
|
1149
|
+
createsnapshot(id: vmid, name: string, includeram?: boolean, actor?: userid): Promise<result<vmsnapshot>>;
|
|
1150
|
+
/** lists snapshots, optionally filtered by vm. */
|
|
1151
|
+
listsnapshots(id?: vmid): readonly vmsnapshot[];
|
|
1152
|
+
/** restores a snapshot; the vm walks back to stopped. */
|
|
1153
|
+
restoresnapshot(snapshot: snapshotid, actor?: userid): Promise<result<void>>;
|
|
1154
|
+
/**
|
|
1155
|
+
* checkpoints a vm with criu, qemu savevm or docker checkpoint
|
|
1156
|
+
* semantics; the passage routes touching the vm are checksummed so the
|
|
1157
|
+
* restore can verify the network plan (v6).
|
|
1158
|
+
*/
|
|
1159
|
+
checkpointvm(id: vmid, method?: vmcheckpoint['method'], incremental?: boolean, actor?: userid): Promise<result<vmcheckpoint>>;
|
|
1160
|
+
/** restores a checkpoint; the vm walks provisioning -> running. */
|
|
1161
|
+
restorecheckpoint(checkpoint: checkpointid, actor?: userid): Promise<result<void>>;
|
|
1162
|
+
/** refreshes the runtime gauges and returns the OTel ring tail. */
|
|
1163
|
+
getmetricssnapshot(): readonly otelpoint[];
|
|
1164
|
+
/** renders the Prometheus exposition of the single metrics store. */
|
|
1165
|
+
exportprometheus(): string;
|
|
1166
|
+
/**
|
|
1167
|
+
* starts the OTLP style HTTP exporter serving /metrics and /health;
|
|
1168
|
+
* the bind host is a user choice (explicit argument or resolvehost)
|
|
1169
|
+
* and the port is random in [30000, 59999] unless pinned — the engine
|
|
1170
|
+
* never binds a loopback default.
|
|
1171
|
+
*/
|
|
1172
|
+
startotelexporter(host?: string, port?: number): Promise<{
|
|
1173
|
+
readonly host: string;
|
|
1174
|
+
readonly port: number;
|
|
1175
|
+
readonly close: () => void;
|
|
1176
|
+
}>;
|
|
1177
|
+
/** the six dotted config names every deployment must carry. */
|
|
1178
|
+
static mandatoryconfigs(): readonly configfilename[];
|
|
1179
|
+
/**
|
|
1180
|
+
* watches the six dotted configs plus the eight json catalogs; missing
|
|
1181
|
+
* files are created with the default contents before watching starts.
|
|
1182
|
+
*/
|
|
1183
|
+
enablehotreload(files?: readonly configfilename[]): void;
|
|
1184
|
+
/** closes every config watcher. */
|
|
1185
|
+
disablehotreload(): void;
|
|
1186
|
+
/**
|
|
1187
|
+
* loads one config file with caching; json files parse into objects
|
|
1188
|
+
* and key=value files parse into a raw string record.
|
|
1189
|
+
*/
|
|
1190
|
+
loadconfig(name: configfilename): Promise<unknown>;
|
|
1191
|
+
handleconfigreload(name: configfilename, fullpath: string): Promise<void>;
|
|
1192
|
+
/**
|
|
1193
|
+
* bootstraps the hardware view from the eight flat json catalogs and
|
|
1194
|
+
* reports the missing ones (coreorchestrator).
|
|
1195
|
+
*/
|
|
1196
|
+
bootstraphardwareview(): Promise<Record<string, unknown>>;
|
|
1197
|
+
/**
|
|
1198
|
+
* activates a plugin with a context that exposes the orchestrator, a
|
|
1199
|
+
* prefixed logger and typed hook registration on the single bus.
|
|
1200
|
+
*/
|
|
1201
|
+
loadplugin(plugin: plugincontract, actor?: userid): Promise<result<void>>;
|
|
1202
|
+
/** deactivates a plugin and forgets it. */
|
|
1203
|
+
unloadplugin(id: pluginid, actor?: userid): Promise<result<void>>;
|
|
1204
|
+
/** v6 alias for loadplugin under the system actor. */
|
|
1205
|
+
registerplugin(plugin: plugincontract): Promise<void>;
|
|
1206
|
+
/** v6 alias for unloadplugin under the system actor. */
|
|
1207
|
+
unregisterplugin(id: pluginid): Promise<void>;
|
|
1208
|
+
/** lists loaded plugins. */
|
|
1209
|
+
listplugins(): readonly plugincontract[];
|
|
1210
|
+
/** filters the in-memory audit ring by user, action and since date. */
|
|
1211
|
+
getauditlog(filter?: {
|
|
1212
|
+
readonly userid?: userid;
|
|
1213
|
+
readonly action?: string;
|
|
1214
|
+
readonly since?: Date;
|
|
1215
|
+
}): readonly auditentry[];
|
|
1216
|
+
/**
|
|
1217
|
+
* appends one audit line to the tenant JSONL file under audit/
|
|
1218
|
+
* (coreorchestrator); the ring mirrors the entry for fast queries.
|
|
1219
|
+
*/
|
|
1220
|
+
auditlog(entry: {
|
|
1221
|
+
readonly actor: string;
|
|
1222
|
+
readonly action: string;
|
|
1223
|
+
readonly resource: string;
|
|
1224
|
+
readonly tenant: string;
|
|
1225
|
+
readonly meta?: Record<string, unknown>;
|
|
1226
|
+
}): Promise<void>;
|
|
1227
|
+
/**
|
|
1228
|
+
* drains one vm: signals the guest for a graceful stop and waits up
|
|
1229
|
+
* to the task timeout (capped at two seconds in simulated mode).
|
|
1230
|
+
*/
|
|
1231
|
+
drainvm(id: vmid, task: draintask): Promise<result<void>>;
|
|
1232
|
+
/**
|
|
1233
|
+
* graceful shutdown of the whole orchestrator: monitors stop, hot
|
|
1234
|
+
* reload closes, running vms drain with concurrency four against an
|
|
1235
|
+
* overall timeout and leftover qemu processes get SIGKILL.
|
|
1236
|
+
*/
|
|
1237
|
+
gracefulshutdown(timeoutsec?: number): Promise<void>;
|
|
1238
|
+
/**
|
|
1239
|
+
* drains a node identified by a label pair: running vms that carry the
|
|
1240
|
+
* label migrate away (or terminate when migration fails) unless they
|
|
1241
|
+
* are marked drain-protected (coreorchestrator).
|
|
1242
|
+
*/
|
|
1243
|
+
drainnode(labelkey: string, labelvalue: string): Promise<readonly string[]>;
|
|
1244
|
+
/**
|
|
1245
|
+
* starts the bully leader election over the peers with a lease in
|
|
1246
|
+
* seconds; the highest node id wins whenever the lease expires.
|
|
1247
|
+
*/
|
|
1248
|
+
startleaderelection(peers: readonly string[], leasesec?: number): void;
|
|
1249
|
+
/** returns a readonly view of the leader state. */
|
|
1250
|
+
getleaderstate(): deepreadonly<leaderstate>;
|
|
1251
|
+
/** true when this node currently holds leadership. */
|
|
1252
|
+
isleader(): boolean;
|
|
1253
|
+
/** fresh spec builder (builder pattern entry point). */
|
|
1254
|
+
builder(): sandboxbuilder;
|
|
1255
|
+
/** probes every runtime binary. */
|
|
1256
|
+
detectruntimes(): Promise<Record<string, boolean>>;
|
|
1257
|
+
/** creates a sandbox through the strategy for its runtime. */
|
|
1258
|
+
create(spec: sandboxspec): Promise<sandboxproxy>;
|
|
1259
|
+
/** restores a firecracker sandbox from a snapshot file. */
|
|
1260
|
+
restore(spec: sandboxspec, snapshotfile: string): Promise<sandboxproxy>;
|
|
1261
|
+
/** enables the warm pool with a template spec. */
|
|
1262
|
+
enablewarmpool(min: number, max: number, template: sandboxspec): Promise<void>;
|
|
1263
|
+
/** acquires a warm sandbox. */
|
|
1264
|
+
createpooled(): Promise<sandboxproxy>;
|
|
1265
|
+
/** disables the warm pool and destroys the warm sandboxes. */
|
|
1266
|
+
disablewarmpool(): Promise<void>;
|
|
1267
|
+
/** criu checkpoint of a live sandbox process tree. */
|
|
1268
|
+
checkpoint(sandbox: sandboxproxy, dir?: string): Promise<void>;
|
|
1269
|
+
/** criu restore of a checkpointed image directory. */
|
|
1270
|
+
criurestore(dir: string): Promise<void>;
|
|
1271
|
+
/** destroys every active sandbox. */
|
|
1272
|
+
destroyall(): Promise<void>;
|
|
1273
|
+
/** compose 5.5.0 rendering of a spec. */
|
|
1274
|
+
composeyaml(spec: sandboxspec): string;
|
|
1275
|
+
/**
|
|
1276
|
+
* prepares the runtime directories, materializes the default flat
|
|
1277
|
+
* configs, optionally enables hot-reload and starts the health
|
|
1278
|
+
* monitor, the autoscaler and the scheduler tick.
|
|
1279
|
+
*/
|
|
1280
|
+
start(): Promise<void>;
|
|
1281
|
+
/** graceful shutdown plus scheduler teardown. */
|
|
1282
|
+
stop(): Promise<void>;
|
|
1283
|
+
/** full diagnostics dump of both planes. */
|
|
1284
|
+
dumpstate(): Record<string, unknown>;
|
|
1285
|
+
[Symbol.dispose](): void;
|
|
1286
|
+
}
|
|
1287
|
+
/**
|
|
1288
|
+
* returns the singleton orchestrator, creating it on the first call with
|
|
1289
|
+
* options; later calls ignore their options and always return the same
|
|
1290
|
+
* instance.
|
|
1291
|
+
*/
|
|
1292
|
+
declare function getorchestrator(options?: orchestratoroptions): orchestrator;
|
|
1293
|
+
/**
|
|
1294
|
+
* end-to-end demo: a vm is created and scheduled, an mttg job flows
|
|
1295
|
+
* through the queue, a passage route resolves and the metrics snapshot
|
|
1296
|
+
* is returned; the vm plane is destroyed before returning so the demo
|
|
1297
|
+
* leaves no state behind.
|
|
1298
|
+
*/
|
|
1299
|
+
export declare function orchestratordemo(): Promise<metricsview>;
|
|
1300
|
+
/** one kustomize overlay of the planned GitOps repository. */
|
|
1301
|
+
export interface fluxkustomization {
|
|
1302
|
+
readonly path: string;
|
|
1303
|
+
readonly resources: readonly string[];
|
|
1304
|
+
readonly yaml: string;
|
|
1305
|
+
}
|
|
1306
|
+
/** the planned Flux GitOps repository layout for SADDLE CRDs. */
|
|
1307
|
+
export interface fluxgitopsplan {
|
|
1308
|
+
readonly repo: string;
|
|
1309
|
+
readonly branches: readonly string[];
|
|
1310
|
+
readonly clusters: readonly string[];
|
|
1311
|
+
readonly kustomizations: readonly fluxkustomization[];
|
|
1312
|
+
readonly bootstrapargv: readonly string[];
|
|
1313
|
+
readonly syncpolicy: {
|
|
1314
|
+
readonly interval: string;
|
|
1315
|
+
readonly prune: boolean;
|
|
1316
|
+
readonly selfheal: boolean;
|
|
1317
|
+
};
|
|
1318
|
+
}
|
|
1319
|
+
/**
|
|
1320
|
+
* plans the Flux GitOps repository layout for SADDLE CRDs (ledger
|
|
1321
|
+
* F-064): branch model (main promoted through staging), one
|
|
1322
|
+
* flux-system bootstrap per cluster, an infrastructure layer holding
|
|
1323
|
+
* the VirtualMachine CRD (buildvmcrdmanifest in compute.ts) plus OPA
|
|
1324
|
+
* gatekeeper policies, and an apps layer holding the per-cluster
|
|
1325
|
+
* VirtualMachine custom resources. the planner emits the full
|
|
1326
|
+
* kustomization.yaml content for each overlay and the exact flux
|
|
1327
|
+
* bootstrap argv (with the GHCR image repository and sync intervals),
|
|
1328
|
+
* so `flux bootstrap` plus a git push is everything the operator runs.
|
|
1329
|
+
*/
|
|
1330
|
+
export declare function planfluxgitops(opts?: {
|
|
1331
|
+
repo?: string;
|
|
1332
|
+
clusters?: readonly string[];
|
|
1333
|
+
interval?: string;
|
|
1334
|
+
prune?: boolean;
|
|
1335
|
+
selfheal?: boolean;
|
|
1336
|
+
}): fluxgitopsplan;
|
|
1337
|
+
export type { affinityrule, affinityselector, autoscalepolicy, awaitable, balloonstate, brand, checkpointid, configfilename, cpuset, deepreadonly, dockerbridgemapping, draintask, gpuassignment, gpupassthroughrequest, healthcheck, healthprobe, leaderstate, lifecyclestate, metricsview, migrationjob, migrationtype, mttgjob, numanodeid, numatopologyview, orchestratoroptions, otelpoint, passageroute, permission, plugincontext, plugincontract, portmapping, quotastate, rbacprincipal, rbacrole, replayrecord, reservation, result, roleid, runqueue, runresult, sandboxeventname, sandboxruntime, sandboxspec, snapshotid, sriovpf, userid, VcpuId, vcputask, vcputopology, vmcheckpoint, vmdefinition, vmid, vmrecord, vmsnapshot, vramballoon, };
|
|
1338
|
+
export { allocport, cantransition, clhruntime, composeyaml, createvmid, cricheckpointer, dockerruntime, fcrequest, firecrackerruntime, getorchestrator, gvisorruntime, kataruntime, kvmavailable, lifecyclefromphase, orchestrator, orchestratorerror, performetrics, priorityqueue, qemuruntime, resolvehost, runtimecatalog, runtimeregistry, sandboxbuilder, sandboxevents, sandboxfactory, sandboxhandle, sandboxmetrics, sandboxproxy, stackcatalog, transitions, vmimage, warmpool, };
|
|
1339
|
+
//# sourceMappingURL=orchestrator.d.ts.map
|