@makaio/framework 1.0.0-dev-1787670071418 → 1.0.0-dev-1787670559522
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/README.md +0 -2
- package/dist/.makaio-build.json +2 -2
- package/dist/{account-identity-B3vLwm9O.mjs → account-identity-DGpXd8h_.mjs} +1 -1
- package/dist/adapter-BkdJaOOG.mjs +1 -0
- package/dist/adapter-subsystem/index.d.mts +76 -118
- package/dist/adapter-subsystem/index.mjs +1 -1
- package/dist/adapters/claude/index.d.mts +5 -5
- package/dist/adapters/config/index.d.mts +1 -1
- package/dist/adapters/config/index.mjs +1 -1
- package/dist/adapters/index.d.mts +53 -73
- package/dist/adapters/index.mjs +6 -6
- package/dist/adapters/node.d.mts +1 -1
- package/dist/adapters/node.mjs +1 -1
- package/dist/adapters/stream-session/index.mjs +1 -1
- package/dist/agent-namespace-D51PODFf.mjs +1 -0
- package/dist/{artifact-Btbuib48.mjs → artifact-k3veR4Yx.mjs} +1 -1
- package/dist/attach-error-BSlc7JfL.mjs +1 -0
- package/dist/{auth-C6tVtaOX.mjs → auth-A1K_7q-8.mjs} +1 -1
- package/dist/{authority-state-bootstrap-CLYus369.mjs → authority-state-bootstrap-YwtEImIB.mjs} +1 -1
- package/dist/{automation-trigger-ByjNlClm.mjs → automation-trigger-CuSdQwir.mjs} +1 -1
- package/dist/bus/index.d.mts +4 -22
- package/dist/bus/index.mjs +1 -1
- package/dist/bus-BIj0_aG6.mjs +1 -0
- package/dist/{bus-D6NoBhIV.mjs → bus-CqgrphNE.mjs} +1 -1
- package/dist/{canonical-model-DXOvCaVg.mjs → canonical-model-DJASlL4m.mjs} +1 -1
- package/dist/capabilities-Bqckjh7G.mjs +1 -0
- package/dist/capability-service-CJHNkjvm.mjs +1 -0
- package/dist/{client-BkznbdsO.mjs → client-BL5__WT0.mjs} +1 -1
- package/dist/clients/index.d.mts +1 -1
- package/dist/clients/index.mjs +1 -1
- package/dist/clients/managed-install.d.mts +1 -1
- package/dist/clients/managed-install.mjs +1 -1
- package/dist/{compression-CtgeVLpP.mjs → compression-BbttSqm8.mjs} +1 -1
- package/dist/{config-namespace-CjWvw8ij.mjs → config-namespace-CyzeLWSg.mjs} +1 -1
- package/dist/{context-resolution-841T7jBI.d.mts → context-resolution-ya9TXKg-.d.mts} +1 -1
- package/dist/contracts/adapter/index.d.mts +3 -3
- package/dist/contracts/adapter/index.mjs +1 -1
- package/dist/contracts/adapter/schemas/session-lineage.d.mts +1 -1
- package/dist/contracts/artifact/index.d.mts +2 -2
- package/dist/contracts/artifact/index.mjs +1 -1
- package/dist/contracts/auth/index.d.mts +2 -2
- package/dist/contracts/auth/index.mjs +1 -1
- package/dist/contracts/automation-trigger/index.d.mts +3 -3
- package/dist/contracts/automation-trigger/index.mjs +1 -1
- package/dist/contracts/canonical-model/index.d.mts +1 -1
- package/dist/contracts/canonical-model/index.mjs +1 -1
- package/dist/contracts/capabilities/index.d.mts +1 -1
- package/dist/contracts/capabilities/index.mjs +1 -1
- package/dist/contracts/client/index.d.mts +2 -2
- package/dist/contracts/client/index.mjs +1 -1
- package/dist/contracts/common/index.d.mts +1 -1
- package/dist/contracts/config/index.d.mts +1 -1
- package/dist/contracts/config/index.mjs +1 -1
- package/dist/contracts/extension/index.d.mts +5 -5
- package/dist/contracts/extension/index.mjs +1 -1
- package/dist/contracts/facet/index.d.mts +1 -1
- package/dist/contracts/facet/index.mjs +1 -1
- package/dist/contracts/harness/index.d.mts +1 -1
- package/dist/contracts/harness/index.mjs +1 -1
- package/dist/contracts/host/index.d.mts +1 -1
- package/dist/contracts/host/index.mjs +1 -1
- package/dist/contracts/index.d.mts +47 -57
- package/dist/contracts/index.mjs +1 -1
- package/dist/contracts/materialization/index.d.mts +3 -3
- package/dist/contracts/materialization/index.mjs +1 -1
- package/dist/contracts/model-registry/index.d.mts +1 -1
- package/dist/contracts/model-registry/index.mjs +1 -1
- package/dist/contracts/native-session-supervisor/index.d.mts +1 -1
- package/dist/contracts/native-session-supervisor/index.mjs +1 -1
- package/dist/contracts/platform/index.d.mts +1 -1
- package/dist/contracts/platform/index.mjs +1 -1
- package/dist/contracts/provider/index.d.mts +2 -2
- package/dist/contracts/provider/index.mjs +1 -1
- package/dist/contracts/reaction/index.d.mts +1 -1
- package/dist/contracts/reaction/index.mjs +1 -1
- package/dist/contracts/session/index.d.mts +3 -3
- package/dist/contracts/session/index.mjs +1 -1
- package/dist/contracts/shared/index.d.mts +3 -3
- package/dist/contracts/shared/index.mjs +1 -1
- package/dist/contracts/skill/index.d.mts +1 -1
- package/dist/contracts/skill/index.mjs +1 -1
- package/dist/contracts/telemetry/index.d.mts +1 -1
- package/dist/contracts/telemetry/index.mjs +1 -1
- package/dist/contracts/timeout/index.d.mts +1 -1
- package/dist/contracts/timeout/index.mjs +1 -1
- package/dist/contracts/toast/index.mjs +1 -1
- package/dist/contracts/variant/index.d.mts +1 -1
- package/dist/contracts/variant/index.mjs +1 -1
- package/dist/contracts/worker-node/index.d.mts +1 -1
- package/dist/contracts/worker-node/index.mjs +1 -1
- package/dist/contracts/workflow/index.d.mts +2 -2
- package/dist/contracts/workflow/index.mjs +1 -1
- package/dist/{contribution-CUHLVLsT.d.mts → contribution-BB5bjx3f.d.mts} +2 -2
- package/dist/core/index.d.mts +2 -25
- package/dist/{definition-DyGImhyi.d.mts → definition-BYgHlmMw.d.mts} +1 -1
- package/dist/{definition-BH4QLGLI.mjs → definition-CDg-Jq1T.mjs} +1 -1
- package/dist/{detached-extension-handle-D0aI0pJA.mjs → detached-extension-handle-DKd17UB6.mjs} +1 -1
- package/dist/drizzle/meta/_journal.json +0 -28
- package/dist/event-DR8U9Efx.mjs +1 -0
- package/dist/{execution-attempt-repository-BJ2W6wwx.d.mts → execution-attempt-repository-DFyAnchJ.d.mts} +1 -1
- package/dist/{execution-target-H0RWV7Py.mjs → execution-target-ByNwZh5-.mjs} +1 -1
- package/dist/{extension-Cz39YNXy.mjs → extension-DMdmj9gi.mjs} +1 -1
- package/dist/{extension-Bfkr2DBs.mjs → extension-DUmibvMk.mjs} +1 -1
- package/dist/{extension-discovery-Dhu3WplO.d.mts → extension-discovery-Fhps4icD.d.mts} +1 -9
- package/dist/{filesystem-service-CiUw0YN5.mjs → filesystem-service-FAtd9gWH.mjs} +1 -1
- package/dist/framework-packages-D_2hBZ-p.mjs +1 -0
- package/dist/git/index.mjs +2 -2
- package/dist/{globby-QBDqstzq.mjs → globby-BBLuT_vy.mjs} +1 -1
- package/dist/handlers-2yd00VEq.mjs +57 -0
- package/dist/{harness-YQ2ewID9.mjs → harness-KxbWGL4I.mjs} +1 -1
- package/dist/{hook-responses-9Ywsqzzq.d.mts → hook-responses-uCXAICTU.d.mts} +1 -1
- package/dist/identity-DC3Pk0ps.mjs +1 -0
- package/dist/{index-D-4jv_66.d.mts → index-1UcQWrZy.d.mts} +149 -149
- package/dist/{index-D8D-yibS2.d.mts → index-B0xJgTi-.d.mts} +4 -4
- package/dist/{index-CYjgoYeX.d.mts → index-BMVZs6pm.d.mts} +3 -3
- package/dist/{index-CPi0UpRh.d.mts → index-BSQ30wYP.d.mts} +1 -1
- package/dist/{index-DXtQRehh.d.mts → index-Bl7KWFod.d.mts} +1 -1
- package/dist/{index-D_4K3Tf_.d.mts → index-BtdK8HeH.d.mts} +168 -43
- package/dist/{index-C146Eq_J.d.mts → index-C-JzEkqs.d.mts} +1802 -536
- package/dist/{index-DI2lS7VT.d.mts → index-CER64zYO.d.mts} +15 -15
- package/dist/{index-BkbnC65b.d.mts → index-CM75k-Ff.d.mts} +17 -189
- package/dist/{index-CmwAJ8-5.d.mts → index-CSN_0sCo.d.mts} +1 -1
- package/dist/{index-CIEycZrt.d.mts → index-C__EQfKa.d.mts} +1 -1
- package/dist/{index-B0VO0rAl.d.mts → index-CfiCJPP6.d.mts} +1 -1
- package/dist/{index-BNzUyVwV.d.mts → index-CqQYgsbB.d.mts} +170 -513
- package/dist/{index-B0yMCJW8.d.mts → index-DI7-tIL3.d.mts} +14 -39
- package/dist/{index-CMekqu_D.d.mts → index-DxYDRoDE2.d.mts} +8 -28
- package/dist/index-OsbtyMgx2.d.mts +98 -0
- package/dist/{index-DJ2KgJDJ2.d.mts → index-cPqSpWQC.d.mts} +12 -12
- package/dist/{index-DNI6UF9h.d.mts → index-e4Txan9i.d.mts} +4 -4
- package/dist/{index-CPRQ4dWX.d.mts → index-nydhGvXa.d.mts} +23 -0
- package/dist/json-value-C1RGgS0a.d.mts +72 -0
- package/dist/json-value-D57aJhVn.mjs +1 -0
- package/dist/kernel/cli/index.d.mts +2 -2
- package/dist/kernel/cli/index.mjs +1 -1
- package/dist/kernel/cli/register.d.mts +1 -1
- package/dist/kernel/cli/register.mjs +1 -1
- package/dist/kernel/cli/schemas.mjs +1 -1
- package/dist/kernel/extension/index.d.mts +1 -1
- package/dist/kernel/extension/index.mjs +1 -1
- package/dist/kernel/index.d.mts +5 -5
- package/dist/kernel/index.mjs +1 -1
- package/dist/kernel/namespace/index.d.mts +1 -1
- package/dist/kernel/namespace/index.mjs +1 -1
- package/dist/kernel/observability/index.d.mts +1 -1
- package/dist/kernel/observability/index.mjs +1 -1
- package/dist/kernel/providers/index.d.mts +1 -1
- package/dist/kernel/providers/index.mjs +1 -1
- package/dist/kernel/window/index.d.mts +1 -1
- package/dist/kernel/window/index.mjs +1 -1
- package/dist/{lib-Cm-uEoC1.mjs → lib-B_rJ6r0T.mjs} +1 -1
- package/dist/{lib-BpGvHZye.mjs → lib-CnOAtohU.mjs} +2 -2
- package/dist/{load-extensions-DG5LvPyM.mjs → load-extensions-CW9uzNR5.mjs} +1 -1
- package/dist/{load-extensions-BQoXaHhR.d.mts → load-extensions-DUpaMQ7G.d.mts} +1 -1
- package/dist/{materialization-lVd9_-jr.mjs → materialization-CcpCDhXh.mjs} +1 -1
- package/dist/mcp-http-server/index.mjs +1 -1
- package/dist/model-ZH3L1dPW.mjs +1 -0
- package/dist/{namespace-BL7lHlmg.mjs → namespace-B7bntOB8.mjs} +1 -1
- package/dist/{namespace-BNp7n_gu.d.mts → namespace-BgEiY7r1.d.mts} +3 -3
- package/dist/{namespace-DknCutQZ.d.mts → namespace-C6CVEGH8.d.mts} +0 -50
- package/dist/{namespace-C06lJSuj.d.mts → namespace-ChnRTUG4.d.mts} +6 -6
- package/dist/namespace-CxrOLeeP.mjs +1 -0
- package/dist/{namespace-BRuHzhPo.d.mts → namespace-DSlfFhB1.d.mts} +2 -154
- package/dist/{native-session-supervisor-LKio8XZn.mjs → native-session-supervisor-fZYPUk0-.mjs} +1 -1
- package/dist/node/bus-server/index.d.mts +1 -1
- package/dist/node/bus-server/index.mjs +1 -1
- package/dist/node/bus-server/server-lifecycle.d.mts +1 -1
- package/dist/node/bus-server/server-lifecycle.mjs +1 -1
- package/dist/{orchestrator-shared-CNHSImNY.d.mts → orchestrator-shared-B-KRW1Z0.d.mts} +10 -9
- package/dist/orchestrator-shared-CTCZc6Vl.mjs +1 -0
- package/dist/ownership-memory-handler-Bblp93YC.mjs +1 -0
- package/dist/{package-BNFTUFLB.d.mts → package-Bf3hyuzs.d.mts} +2 -2
- package/dist/{package-JtjbO-Oi.mjs → package-CddkNbZI.mjs} +1 -1
- package/dist/{package-B01gmu75.mjs → package-ypz4rKvn.mjs} +1 -1
- package/dist/package.json +1 -1
- package/dist/{profile-N5qGUpF0.mjs → profile-BtznZlq3.mjs} +1 -1
- package/dist/{provider-context-zTDSH2x9.mjs → provider-context-BrLZYnDW.mjs} +1 -1
- package/dist/{provider-context-CG42JlP9.mjs → provider-context-Dh-VOOYF.mjs} +1 -1
- package/dist/{reaction-D3TNwPK8.mjs → reaction-BS0k4eNN.mjs} +1 -1
- package/dist/{registry-Dk12tAfv.mjs → registry-BO_bOoky.mjs} +1 -1
- package/dist/{resolved-sq8RXNDf.mjs → resolved-DMByz1_2.mjs} +1 -1
- package/dist/rules/index.d.mts +1 -1
- package/dist/rules/index.mjs +1 -1
- package/dist/rules/schemas.d.mts +1 -1
- package/dist/runtime-bun/index.mjs +1 -1
- package/dist/runtime-node/extension-discovery.d.mts +2 -2
- package/dist/runtime-node/extension-discovery.mjs +1 -1
- package/dist/runtime-node/extension-validation.d.mts +1 -1
- package/dist/runtime-node/extension-validation.mjs +1 -1
- package/dist/runtime-node/index.d.mts +4 -6
- package/dist/runtime-node/index.mjs +24 -24
- package/dist/runtime-node/makaio-config.d.mts +1 -1
- package/dist/runtime-node/makaio-config.mjs +1 -1
- package/dist/runtime-node/workflow-worker/index.d.mts +1 -1
- package/dist/runtime-node/workflow-worker/index.mjs +1 -1
- package/dist/runtime-node/workflow-worker/worker-entry.mjs +1 -1
- package/dist/{schema-Dq-7si8u.mjs → schema-DBG7Jq5_.mjs} +1 -1
- package/dist/{schema-B3Pf7JP7.d.mts → schema-DKTzriEY.d.mts} +3 -250
- package/dist/{schemas-C1mxTfd7.d.mts → schemas-B7zo7Zcx.d.mts} +4 -60
- package/dist/schemas-BqD8LlQw.mjs +1 -0
- package/dist/{schemas-QWDnauKX.mjs → schemas-CsjN7cmM.mjs} +1 -1
- package/dist/schemas-CvHFbzdy.mjs +1 -0
- package/dist/{schemas-BfO5jkrL.mjs → schemas-DSkBOdx_.mjs} +1 -1
- package/dist/{schemas-OWvBn7AH.d.mts → schemas-DZH9lpxs.d.mts} +4 -4
- package/dist/schemas-DplrlAyR.mjs +1 -0
- package/dist/{schemas-Dd13TMgU.d.mts → schemas-DvMbcABQ.d.mts} +4 -4
- package/dist/scoped-bus-ClwTWqX8.mjs +1 -0
- package/dist/{selection-DL3ric7K.mjs → selection-7Ku8DBnh.mjs} +1 -1
- package/dist/services/adapter-runtime/index.d.mts +4 -4
- package/dist/services/adapter-runtime/index.mjs +1 -1
- package/dist/services/adapter-runtime/namespace.d.mts +1 -1
- package/dist/services/adapter-runtime/schemas.d.mts +2 -2
- package/dist/services/adapter-runtime/schemas.mjs +1 -1
- package/dist/services/adapter-subsystem/index.d.mts +3 -3
- package/dist/services/adapter-subsystem/index.mjs +1 -1
- package/dist/services/adapter-subsystem/namespace.d.mts +1 -1
- package/dist/services/adapter-subsystem/namespace.mjs +1 -1
- package/dist/services/agent-runtime/index.d.mts +2 -2
- package/dist/services/agent-runtime/namespace.d.mts +1 -1
- package/dist/services/agent-runtime/schemas.d.mts +1 -1
- package/dist/services/automation-trigger/index.mjs +1 -1
- package/dist/services/capability/index.d.mts +2 -3
- package/dist/services/capability/index.mjs +1 -1
- package/dist/services/codebase/index.d.mts +2 -2
- package/dist/services/codebase/namespace.d.mts +1 -1
- package/dist/services/codebase/schemas.d.mts +1 -1
- package/dist/services/compression/index.d.mts +2 -2
- package/dist/services/compression/namespace.d.mts +1 -1
- package/dist/services/compression/schemas.d.mts +1 -1
- package/dist/services/context-rules/index.d.mts +1 -1
- package/dist/services/context-rules/index.mjs +1 -1
- package/dist/services/execution-target/index.d.mts +3 -3
- package/dist/services/execution-target/index.mjs +1 -1
- package/dist/services/execution-target/namespace.d.mts +1 -1
- package/dist/services/execution-target/namespace.mjs +1 -1
- package/dist/services/execution-target/schemas.d.mts +1 -1
- package/dist/services/execution-target/schemas.mjs +1 -1
- package/dist/services/filesystem/index.d.mts +1 -1
- package/dist/services/filesystem/index.mjs +1 -1
- package/dist/services/filesystem/namespace.d.mts +6 -6
- package/dist/services/filesystem/schemas.d.mts +3 -3
- package/dist/services/git/namespace.d.mts +0 -18
- package/dist/services/git/namespace.mjs +1 -1
- package/dist/services/git/schemas.d.mts +1 -10
- package/dist/services/git/schemas.mjs +1 -1
- package/dist/services/harness/index.mjs +1 -1
- package/dist/services/index.d.mts +61 -161
- package/dist/services/index.mjs +1 -1
- package/dist/services/log-import/browser.d.mts +2 -2
- package/dist/services/log-import/index.d.mts +2 -2
- package/dist/services/log-import/log-import.d.mts +1 -1
- package/dist/services/log-import/log-import.mjs +1 -1
- package/dist/services/log-import/namespace.mjs +1 -1
- package/dist/services/log-import/schemas.mjs +1 -1
- package/dist/services/materialization/index.d.mts +1 -1
- package/dist/services/materialization/index.mjs +1 -1
- package/dist/services/model-registry/index.d.mts +1 -1
- package/dist/services/model-registry/index.mjs +1 -1
- package/dist/services/preferences/index.d.mts +2 -2
- package/dist/services/preferences/schemas.d.mts +1 -1
- package/dist/services/preferences/storage-namespace.d.mts +2 -2
- package/dist/services/provider-context/index.d.mts +1 -1
- package/dist/services/provider-context/index.mjs +1 -1
- package/dist/services/provider-runtime/index.mjs +1 -1
- package/dist/services/session/handlers/index.d.mts +1 -1
- package/dist/services/session/handlers/index.mjs +1 -1
- package/dist/services/session/index.d.mts +10 -10
- package/dist/services/session/index.mjs +1 -1
- package/dist/services/session/messages/namespace.d.mts +1 -1
- package/dist/services/session/messages/namespace.mjs +1 -1
- package/dist/services/session/orchestrator-testing/index.d.mts +1 -1
- package/dist/services/session/orchestrator-testing/index.mjs +1 -1
- package/dist/services/session/session-events/namespace.d.mts +1 -1
- package/dist/services/session/session-events/namespace.mjs +1 -1
- package/dist/services/session/storage/namespace.d.mts +1 -1
- package/dist/services/session/storage/schema.d.mts +2 -2
- package/dist/services/session/storage/schema.mjs +1 -1
- package/dist/services/session/testing/index.d.mts +1 -22
- package/dist/services/session/testing/index.mjs +14 -38
- package/dist/services/session/testing/orchestrator-shared.d.mts +1 -1
- package/dist/services/session/testing/orchestrator-shared.mjs +1 -1
- package/dist/services/session/turns/namespace.d.mts +1 -1
- package/dist/services/session/turns/namespace.mjs +1 -1
- package/dist/services/session-editor/index.d.mts +1 -1
- package/dist/services/session-editor/index.mjs +1 -1
- package/dist/services/settings/index.d.mts +3 -3
- package/dist/services/settings/index.mjs +1 -1
- package/dist/services/settings/namespace.d.mts +4 -4
- package/dist/services/settings/namespace.mjs +1 -1
- package/dist/services/settings/storage/clients-namespace.d.mts +1 -1
- package/dist/services/settings/storage/clients-namespace.mjs +1 -1
- package/dist/services/settings/storage/extension-configs/namespace.d.mts +3 -3
- package/dist/services/settings/storage/index.d.mts +3 -3
- package/dist/services/settings/storage/index.mjs +1 -1
- package/dist/services/settings/storage/providers-namespace.d.mts +1 -1
- package/dist/services/settings/storage/providers-namespace.mjs +1 -1
- package/dist/services/subagent/index.d.mts +1 -1
- package/dist/services/subagent/index.mjs +1 -1
- package/dist/services/subagent-template/index.d.mts +2 -2
- package/dist/services/subagent-template/namespace.d.mts +1 -1
- package/dist/services/subagent-template/schemas.d.mts +1 -1
- package/dist/services/tool-approval/index.d.mts +1 -1
- package/dist/services/tool-approval/index.mjs +1 -1
- package/dist/services/tools/index.d.mts +1 -1
- package/dist/services/tools/index.mjs +1 -1
- package/dist/services/tray-menu/index.d.mts +3 -3
- package/dist/services/tray-menu/index.mjs +1 -1
- package/dist/services/tray-menu/namespace.d.mts +1 -1
- package/dist/services/tray-menu/schemas.d.mts +1 -1
- package/dist/services/turn/index.d.mts +1 -1
- package/dist/services/turn/namespace.d.mts +1 -1
- package/dist/services/workflow-transitions/index.d.mts +1 -1
- package/dist/services/workflow-transitions/index.mjs +1 -1
- package/dist/session-BMy2kRpX.mjs +90 -0
- package/dist/session-Cipx34j6.mjs +1 -0
- package/dist/{shared-B9AWRm9A.mjs → shared-BFVuCDPx.mjs} +1 -1
- package/dist/{skill-DGNtc_ww.mjs → skill-C1D51nhh.mjs} +1 -1
- package/dist/{src-BmSQ3rlz.mjs → src-xbmzokNe.mjs} +1 -1
- package/dist/storage/drizzle/client.d.mts +1 -1
- package/dist/storage/drizzle/client.mjs +1 -1
- package/dist/storage/drizzle/index.d.mts +2 -41
- package/dist/storage/drizzle/index.mjs +1 -1
- package/dist/storage/handlers/drizzle/index.d.mts +1 -1
- package/dist/storage/handlers/drizzle/index.mjs +1 -1
- package/dist/storage/handlers/index.d.mts +1 -1
- package/dist/storage/handlers/index.mjs +1 -1
- package/dist/tool-approval-service-BVgN9Q1r.mjs +1 -0
- package/dist/{tools-DWKWX3eV.mjs → tools-DxwHox1a.mjs} +1 -1
- package/dist/{transition-D3zUBTPc.d.mts → transition-C_Ka6b0-.d.mts} +6 -6
- package/dist/{types-CtDGkyLx2.d.mts → types-BNjPhj_a.d.mts} +1 -1
- package/dist/{types-OKJCOjme.d.mts → types-ClpEaoAm.d.mts} +4 -24
- package/dist/{types-DcxBYlPA.d.mts → types-CwvN4uN2.d.mts} +49 -3029
- package/dist/ui-kernel/index.d.mts +1 -1
- package/dist/ui-kernel/pages/schemas.d.mts +1 -1
- package/dist/utils/index.d.mts +1 -22
- package/dist/utils/index.mjs +2 -2
- package/dist/utils/project-manifest.mjs +1 -1
- package/dist/{version-BYeVh1pI.mjs → version-BfNnVAGr.mjs} +1 -1
- package/dist/{view-builder-B0j9p5C0.d.mts → view-builder-KYsPqV-5.d.mts} +4 -4
- package/dist/{visibility-DtDLRBdr.mjs → visibility-Dl1o2I01.mjs} +1 -1
- package/dist/worker-node-BDOYPEpi.mjs +1 -0
- package/dist/{worker-node-Dtf9ilsR.mjs → worker-node-DJ41Tr-F.mjs} +1 -1
- package/dist/workflow-Hzc5jlnV.mjs +1 -0
- package/dist/workflow-engine/execution-attempt-repository.d.mts +1 -1
- package/dist/workflow-engine/index.d.mts +95 -95
- package/dist/workflow-engine/index.mjs +1 -1
- package/dist/workflow-engine/package.d.mts +1 -1
- package/dist/workflow-engine/package.mjs +1 -1
- package/dist/workflow-engine/provider-operation.d.mts +1 -1
- package/dist/workflow-engine/testing/index.d.mts +2 -2
- package/dist/workflow-engine/testing/index.mjs +1 -1
- package/dist/workflow-engine/testing/sqlite.d.mts +1 -1
- package/dist/workflow-engine/testing/sqlite.mjs +1 -1
- package/dist/workflow-engine/workflow-orchestrator.mjs +1 -1
- package/dist/{workflow-transitions-c_VQbyV0.mjs → workflow-transitions-DM0fN_eP.mjs} +1 -1
- package/dist/workflow-worker-DARC7UZl.mjs +1 -0
- package/package.json +1 -18
- package/dist/adapter-Dz1fX5Wa.mjs +0 -1
- package/dist/attach-error-Cb3GbeKe.mjs +0 -1
- package/dist/bus-UgFdHybD.mjs +0 -1
- package/dist/caller-owned-adapter-stub-C1M7FKrv.mjs +0 -1
- package/dist/capabilities-BUwuA7XX.mjs +0 -1
- package/dist/capability-j3NekkIu.mjs +0 -1
- package/dist/code-execution/worker-entry.d.mts +0 -21
- package/dist/code-execution/worker-entry.mjs +0 -1
- package/dist/code-execution-Ckmn8OZu.mjs +0 -1
- package/dist/code-execution-CweDSWco.mjs +0 -1
- package/dist/code-execution-DqkQjKa1.mjs +0 -1
- package/dist/contracts/code-execution/index.d.mts +0 -2
- package/dist/contracts/code-execution/index.mjs +0 -1
- package/dist/drizzle/0034_m_msha1388.sql +0 -41
- package/dist/drizzle/0035_m_mshgj6x7.sql +0 -40
- package/dist/drizzle/0036_m_msivwbgm.sql +0 -1
- package/dist/drizzle/0037_runtime_instance_incarnation_counter.sql +0 -6
- package/dist/event-B8ELuk6k.mjs +0 -1
- package/dist/framework-packages-BHgul8Kl.mjs +0 -1
- package/dist/handlers-BsHAFtye.mjs +0 -57
- package/dist/identity-OjRlG6dZ.mjs +0 -1
- package/dist/index-Bqk0pJBQ2.d.mts +0 -138
- package/dist/index-Cny5RvjO.d.mts +0 -800
- package/dist/index-DHnSLGP4.d.mts +0 -268
- package/dist/index-DQ8o3JGi.d.mts +0 -132
- package/dist/index-DWBkiiXH.d.mts +0 -18
- package/dist/index-Dg11JxKZ.d.mts +0 -496
- package/dist/json-value-BBZ6uGwc.mjs +0 -1
- package/dist/json-value-DPqb-SJ8.d.mts +0 -177
- package/dist/model-DrzPt3ou.mjs +0 -1
- package/dist/namespace-sCPb79-7.mjs +0 -1
- package/dist/npm-package-name-DuTYVICk.mjs +0 -1
- package/dist/orchestrator-shared-BGlN-m-V.mjs +0 -1
- package/dist/ownership-memory-handler-BpGdR_uG.mjs +0 -1
- package/dist/ownership-recovery-guard-DyW5vGBr.mjs +0 -1
- package/dist/package-DttKA9wN.mjs +0 -1
- package/dist/runtime-node/code-execution/index.d.mts +0 -3
- package/dist/runtime-node/code-execution/index.mjs +0 -1
- package/dist/schemas-C3kyQWGf.mjs +0 -1
- package/dist/schemas-TK29KWx-.mjs +0 -1
- package/dist/schemas-_2Syo_01.mjs +0 -1
- package/dist/scoped-bus-DoPmCJeM.mjs +0 -1
- package/dist/services/code-execution/index.d.mts +0 -2
- package/dist/services/code-execution/index.mjs +0 -1
- package/dist/session-BOpTI79g.mjs +0 -1
- package/dist/session-CXOPk3yg.mjs +0 -95
- package/dist/tool-approval-service-BFDOFUGC.mjs +0 -1
- package/dist/types-Cwza95hS.mjs +0 -1
- package/dist/types-DnK6Wa_Y.d.mts +0 -260
- package/dist/worker-node-CjuQb9hl.mjs +0 -1
- package/dist/workflow-C4mck_NW.mjs +0 -1
- package/dist/workflow-worker-aNbdgqml.mjs +0 -1
- /package/dist/{adapter-auth-runtime-DHHppU4f.mjs → adapter-auth-runtime-D9Lnl7cc.mjs} +0 -0
- /package/dist/{adapter-binding-CATvmGuz.d.mts → adapter-binding-B-FBoCys.d.mts} +0 -0
- /package/dist/{ajv-krzJXh1X.mjs → ajv-L5fKxaia.mjs} +0 -0
- /package/dist/{attempt-record-codec-BYfYkj4M.mjs → attempt-record-codec-DaFLKR5C.mjs} +0 -0
- /package/dist/{await-trigger-Bkg2BQfg.mjs → await-trigger-ph1S0zVI.mjs} +0 -0
- /package/dist/{base-orchestrator-B4YW6z_Q.d.mts → base-orchestrator-D9u4NyiM.d.mts} +0 -0
- /package/dist/{client-BG0WX5Vz.d.mts → client-4ihewPUm.d.mts} +0 -0
- /package/dist/{client-binary-version-verifier-0lCKZOTg.mjs → client-binary-version-verifier-DJajc_Ff.mjs} +0 -0
- /package/dist/{client-binary-version-verifier-lcv83Hq3.d.mts → client-binary-version-verifier-jDDZ64Ah.d.mts} +0 -0
- /package/dist/{clients-namespace-DLAjOTTb.d.mts → clients-namespace-DFWuUawf.d.mts} +0 -0
- /package/dist/{config-namespace-CH7sJZ4f.d.mts → config-namespace-D1kyZj0B.d.mts} +0 -0
- /package/dist/{create-static-mount-DxuixuLZ.mjs → create-static-mount-9tnGpIeK.mjs} +0 -0
- /package/dist/{cross-spawn-CZygZJMH.mjs → cross-spawn-BIgueAqr.mjs} +0 -0
- /package/dist/{cursor-storage-bsc9lZKk.mjs → cursor-storage-ROWfiTh1.mjs} +0 -0
- /package/dist/{definition-BrgzUuFk.d.mts → definition-DB-kKc0d.d.mts} +0 -0
- /package/dist/{definitions-CRpdnHYM.mjs → definitions-CF6YmEhL.mjs} +0 -0
- /package/dist/{descriptor-to-package-CcjdoWP4.mjs → descriptor-to-package-BecVCopf.mjs} +0 -0
- /package/dist/{drizzle-Bzc-OGVI.mjs → drizzle-CPv3vdTE.mjs} +0 -0
- /package/dist/{esm-i-S5TW72.mjs → esm-CBFWM8u_.mjs} +0 -0
- /package/dist/{extension-context-QmFuHdq5.d.mts → extension-context-DzB7ydM3.d.mts} +0 -0
- /package/dist/{extension-namespace-QoTTwKPt.mjs → extension-namespace-B554RmCp.mjs} +0 -0
- /package/dist/{extension-package-provenance-aYrZuS4W.mjs → extension-package-provenance-Dh_-Z-tE.mjs} +0 -0
- /package/dist/{facet-BnMh7Jyc.mjs → facet-DVsW12iF.mjs} +0 -0
- /package/dist/{filesystem-service-ZJ43SbBi.d.mts → filesystem-service-Cm2RHKBa.d.mts} +0 -0
- /package/dist/{handler-DF1fVDpf.mjs → handler-Bqlk-6BY.mjs} +0 -0
- /package/dist/{host-B-_ntOMH.mjs → host-k5yoyKHg.mjs} +0 -0
- /package/dist/{index-8NdPPzUh2.d.mts → index--atUpi5l2.d.mts} +0 -0
- /package/dist/{index-Ek4y8M9J2.d.mts → index-42UdYStR.d.mts} +0 -0
- /package/dist/{index-C4V8Pmi4.d.mts → index-BJAB-BW_.d.mts} +0 -0
- /package/dist/{index-l01zsChf.d.mts → index-BJMezANn.d.mts} +0 -0
- /package/dist/{index-D037TVsm.d.mts → index-BQprJNA_.d.mts} +0 -0
- /package/dist/{index-B4svZC6L.d.mts → index-BRCrFirq.d.mts} +0 -0
- /package/dist/{index-jxPncqWZ2.d.mts → index-BSbGB23v.d.mts} +0 -0
- /package/dist/{index-BMRB9yhF.d.mts → index-BVcQcphK.d.mts} +0 -0
- /package/dist/{index-B2Y1Wvbh.d.mts → index-BcvqDfcN.d.mts} +0 -0
- /package/dist/{index-DgspOUa72.d.mts → index-BeENojSx2.d.mts} +0 -0
- /package/dist/{index-VzLAV0Yt.d.mts → index-Beo_Ik8-.d.mts} +0 -0
- /package/dist/{index-CqdMbYmR.d.mts → index-BgGe9WZz.d.mts} +0 -0
- /package/dist/{index-kzIjbrS02.d.mts → index-Bqm0ahTQ.d.mts} +0 -0
- /package/dist/{index-B-3I98nw.d.mts → index-C7HcDpHE.d.mts} +0 -0
- /package/dist/{index-pvX-BIpr2.d.mts → index-CK3f0bAL.d.mts} +0 -0
- /package/dist/{index-B5dP8rj6.d.mts → index-CQuRTeRa.d.mts} +0 -0
- /package/dist/{index-BC-6qNeo.d.mts → index-CRmE88hi.d.mts} +0 -0
- /package/dist/{index-CVpaGijY.d.mts → index-CvW9_SzR.d.mts} +0 -0
- /package/dist/{index-BFWvT0NG.d.mts → index-CxSSdIZz.d.mts} +0 -0
- /package/dist/{index-BmevAPME2.d.mts → index-DBadVauL.d.mts} +0 -0
- /package/dist/{index-BM56936c.d.mts → index-DP3o_13U.d.mts} +0 -0
- /package/dist/{index-BfV8U4XX.d.mts → index-DgOfgjx3.d.mts} +0 -0
- /package/dist/{index-8y4hT9WL.d.mts → index-DwLRZscE.d.mts} +0 -0
- /package/dist/{index-CmbkCxj-.d.mts → index-E4SET1AA.d.mts} +0 -0
- /package/dist/{index-BuMsrli0.d.mts → index-OADt3xlS.d.mts} +0 -0
- /package/dist/{capability-service-BW1-teFU.d.mts → index-Ol9RBB0W2.d.mts} +0 -0
- /package/dist/{index-CL0Jo1b92.d.mts → index-aoxdnhJ42.d.mts} +0 -0
- /package/dist/{index-BTEJfzjE.d.mts → index-bIe_57cL.d.mts} +0 -0
- /package/dist/{jsonl-transport-Cyyh5Wje.mjs → jsonl-transport-Bp_6pB2a.mjs} +0 -0
- /package/dist/{lib-BqV8hYtk.mjs → lib-Bwdd2m81.mjs} +0 -0
- /package/dist/{model-registry-Cixxx2jv.mjs → model-registry-Y854mUml.mjs} +0 -0
- /package/dist/{model-registry-C9rFu3kV.mjs → model-registry-yURX738J.mjs} +0 -0
- /package/dist/{modes-DwsJ3yVl.mjs → modes-DmUsjHdV.mjs} +0 -0
- /package/dist/{namespace-jVTsuZHX.mjs → namespace-B9FEGuEu.mjs} +0 -0
- /package/dist/{namespace-NXm_zvL1.mjs → namespace-BFqkUTJp.mjs} +0 -0
- /package/dist/{namespace-BUYDmd0r.d.mts → namespace-Bi3CmYQy.d.mts} +0 -0
- /package/dist/{namespace-CVFaZv8x.d.mts → namespace-BusZERU8.d.mts} +0 -0
- /package/dist/{namespace-B0ftHlK3.d.mts → namespace-ByP1Iipi.d.mts} +0 -0
- /package/dist/{namespace-BGRHcrmp.d.mts → namespace-C1D77w7U.d.mts} +0 -0
- /package/dist/{namespace-Du0accdE.mjs → namespace-CFjdyNXG.mjs} +0 -0
- /package/dist/{namespace-DiwqpB-c.mjs → namespace-CfIW0hpQ.mjs} +0 -0
- /package/dist/{namespace-BW3Bfu9h.mjs → namespace-CkBbNFSU.mjs} +0 -0
- /package/dist/{namespace-DOezqDti.d.mts → namespace-CrDlawqu.d.mts} +0 -0
- /package/dist/{namespace-BdAK0lD8.d.mts → namespace-DX1Ec15L.d.mts} +0 -0
- /package/dist/{namespace-tjoxekmf.mjs → namespace-DbNWsPFY.mjs} +0 -0
- /package/dist/{namespace-CPG6u60N.d.mts → namespace-Dgg0uoe6.d.mts} +0 -0
- /package/dist/{namespace-l-HG1rLF.d.mts → namespace-DwZwGXgF.d.mts} +0 -0
- /package/dist/{namespace-DqZweTbX.d.mts → namespace-s2y_NFKf.d.mts} +0 -0
- /package/dist/{namespace-DBO1OzYB.d.mts → namespace-yREpGJgG.d.mts} +0 -0
- /package/dist/{out-8bOYN6EF.mjs → out-DrhwCgqM.mjs} +0 -0
- /package/dist/{package-EGTn-Ng1.mjs → package-CBdvjyyZ.mjs} +0 -0
- /package/dist/{packages-Bp124-gx.mjs → packages-FBv3fAOR.mjs} +0 -0
- /package/dist/{packages-CxPMEg8D.d.mts → packages-N3-2Kl-Y.d.mts} +0 -0
- /package/dist/{platform-CxyYPrkf.mjs → platform-BrsMv_S3.mjs} +0 -0
- /package/dist/{provider-operation-DbdyFwNm.d.mts → provider-operation-DJ_TLZFf.d.mts} +0 -0
- /package/dist/{providers-C-eekMxD.mjs → providers-CCcn4Ndp.mjs} +0 -0
- /package/dist/{providers-namespace-CfZKp-C0.d.mts → providers-namespace-DeJBh6MP.d.mts} +0 -0
- /package/dist/{quick-lru-CCEnf7y6.mjs → quick-lru-uwB0hP-y.mjs} +0 -0
- /package/dist/{schema-introspection-6-r_KEJQ.mjs → schema-introspection-C1wvklj9.mjs} +0 -0
- /package/dist/{schema-C0opCPww.mjs → schema-jIapW8Kb.mjs} +0 -0
- /package/dist/{schemas-BXc9qOpl.d.mts → schemas-B3bfVYcL.d.mts} +0 -0
- /package/dist/{schemas-BivbWRkG.mjs → schemas-BNdiVBWh.mjs} +0 -0
- /package/dist/{schemas-B6Q-qdmn.d.mts → schemas-CD0wOQxx.d.mts} +0 -0
- /package/dist/{schemas-B50oWBuj.d.mts → schemas-CeUI2i5j.d.mts} +0 -0
- /package/dist/{schemas-ChmQldVH.d.mts → schemas-Cg-Kwp8c.d.mts} +0 -0
- /package/dist/{schemas-Pe892GgN.d.mts → schemas-Cv3rR9Sz.d.mts} +0 -0
- /package/dist/{schemas-B8hKbBwI.mjs → schemas-DgwEVUt-.mjs} +0 -0
- /package/dist/{schemas-D7ScxLrf.d.mts → schemas-VbB1FTxx.d.mts} +0 -0
- /package/dist/{schemas-scyC2tFF.mjs → schemas-mLpOfMoN.mjs} +0 -0
- /package/dist/{schemas-bfZNpl0B.d.mts → schemas-qA279_j_.d.mts} +0 -0
- /package/dist/{schemas-BGvkTiCx.d.mts → schemas-sMoRnBdZ.d.mts} +0 -0
- /package/dist/{semver-BI7kTNsY.mjs → semver-DTXuyLcK.mjs} +0 -0
- /package/dist/{server-lifecycle-L8zja8t8.d.mts → server-lifecycle-C_8iKgat.d.mts} +0 -0
- /package/dist/{server-lifecycle-B_OZnoe-.mjs → server-lifecycle-DKx_fWlq.mjs} +0 -0
- /package/dist/{session-lineage-bUkd3fqx.d.mts → session-lineage-D5E142LU.d.mts} +0 -0
- /package/dist/{shared-schemas-CQ6blrEW.mjs → shared-schemas-aahW97QW.mjs} +0 -0
- /package/dist/{src-BacfeiI4.mjs → src-DHqsl5Pg.mjs} +0 -0
- /package/dist/{storage-namespace-BZce8kkW.mjs → storage-namespace-Dz2jsssp.mjs} +0 -0
- /package/dist/{storage-namespace-YmE8XCCL.d.mts → storage-namespace-Tf3P5yJ5.d.mts} +0 -0
- /package/dist/{storage-namespace-definition-Cca-zwXU.mjs → storage-namespace-definition-CDef0E20.mjs} +0 -0
- /package/dist/{supports-color-SV_FgSN2.mjs → supports-color-i7OTnKcZ.mjs} +0 -0
- /package/dist/{telemetry-BqoC87F-.mjs → telemetry-BvCBUjFg.mjs} +0 -0
- /package/dist/{timeout-DVlN2Zhy.mjs → timeout-B0nYjLc8.mjs} +0 -0
- /package/dist/{tray-menu-service-eVVxgPLc.mjs → tray-menu-service-Deo6yyP8.mjs} +0 -0
- /package/dist/{types-DdpSEmTO.d.mts → types-CNS55jvt.d.mts} +0 -0
- /package/dist/{types-tyv0B605.d.mts → types-Ce6LL25v.d.mts} +0 -0
- /package/dist/{types-BlB23n4f.d.mts → types-xCdGghb2.d.mts} +0 -0
- /package/dist/{ui-config-B35GloSX.mjs → ui-config-BIyGzMNL.mjs} +0 -0
- /package/dist/{variant-Dwnge3J_.mjs → variant-B4uWdxW7.mjs} +0 -0
- /package/dist/{window-registry-Pcf35cac.d.mts → window-registry-BLtVx3Iw.d.mts} +0 -0
- /package/dist/{window-registry-CKiMJjId.mjs → window-registry-CoBJq3u4.mjs} +0 -0
- /package/dist/{zod-json-schema-Dixc-B1T.mjs → zod-json-schema-BAGAFfCN.mjs} +0 -0
|
@@ -1,496 +0,0 @@
|
|
|
1
|
-
import { d as PiscinaCodeExecutionProviderOptions } from "./types-DnK6Wa_Y.mjs";
|
|
2
|
-
import { CodeExecutionOutcome, CodeExecutionProviderContext, CodeExecutionRequest, CodeExecutionTrustLevel, ICodeExecutionProvider } from "@makaio/framework/contracts";
|
|
3
|
-
|
|
4
|
-
//#region runtimes/node/src/code-execution/piscina-code-execution-provider.d.ts
|
|
5
|
-
/**
|
|
6
|
-
* CodeExecution provider that executes prepared TypeScript/ESM programs on a
|
|
7
|
-
* Piscina worker-thread pool.
|
|
8
|
-
*
|
|
9
|
-
* Register it explicitly through `registerCodeExecutionProvider` — the
|
|
10
|
-
* composing host decides whether a runtime is allowed to execute submitted
|
|
11
|
-
* code at all, and owns unregistering the provider before disposing it.
|
|
12
|
-
*
|
|
13
|
-
* The declared tags are what a program is admitted against, and the module set
|
|
14
|
-
* is held to them: `.ts`, `.mts`, `.js`, and `.mjs` sources are executed, and a
|
|
15
|
-
* program carrying anything else is refused as `invalid_program` rather than run
|
|
16
|
-
* under semantics — CommonJS, JSX — this provider never advertised.
|
|
17
|
-
*
|
|
18
|
-
* Anything the executed program writes to `stdout` or `stderr` is forwarded to
|
|
19
|
-
* the host process's own streams. That is deliberate: local process logs are
|
|
20
|
-
* ordinary diagnostics for a `trusted-code-only` provider, and the contract's
|
|
21
|
-
* leak invariant governs what crosses the bus — the terminal outcome — not what
|
|
22
|
-
* the host prints to its own console.
|
|
23
|
-
*/
|
|
24
|
-
declare class PiscinaCodeExecutionProvider implements ICodeExecutionProvider {
|
|
25
|
-
/** Unique identifier for this provider instance. */
|
|
26
|
-
readonly id: string;
|
|
27
|
-
/** Human-readable name for display in a host UI. */
|
|
28
|
-
readonly displayName: string;
|
|
29
|
-
/** Selection priority among matching providers; higher wins. */
|
|
30
|
-
readonly priority: number;
|
|
31
|
-
/** Runtime tag this provider executes on. */
|
|
32
|
-
readonly runtime = "node";
|
|
33
|
-
/** Source language this provider accepts. */
|
|
34
|
-
readonly language = "typescript";
|
|
35
|
-
/** Module format the materialized program root is treated as. */
|
|
36
|
-
readonly moduleFormat = "esm";
|
|
37
|
-
/** Trust level: this provider runs code with worker-thread privileges. */
|
|
38
|
-
readonly trust: CodeExecutionTrustLevel;
|
|
39
|
-
private readonly workerEntry;
|
|
40
|
-
private readonly workerExecArgv;
|
|
41
|
-
/**
|
|
42
|
-
* Environment the resolved worker entry's own loader requires.
|
|
43
|
-
*
|
|
44
|
-
* Kept apart from the host-configured {@link environment} because the two
|
|
45
|
-
* answer to different owners: this one configures the loader named by
|
|
46
|
-
* {@link workerExecArgv}, so it travels with those arguments and is applied
|
|
47
|
-
* *after* the host's values — a host must not be able to reconfigure the
|
|
48
|
-
* loader that bounds which packages a submitted program can resolve.
|
|
49
|
-
*/
|
|
50
|
-
private readonly workerLoaderEnv;
|
|
51
|
-
private readonly environment;
|
|
52
|
-
private readonly packageRoots;
|
|
53
|
-
private readonly maxConcurrency;
|
|
54
|
-
private readonly maxQueuedInvocations;
|
|
55
|
-
private readonly idleTimeoutMs;
|
|
56
|
-
private readonly maxProgramFiles;
|
|
57
|
-
private readonly maxSourceBytes;
|
|
58
|
-
private readonly maxResultBytes;
|
|
59
|
-
private readonly maxArgumentBytes;
|
|
60
|
-
private readonly maxInvocationsPerWorker;
|
|
61
|
-
private readonly admission;
|
|
62
|
-
private readonly inFlight;
|
|
63
|
-
/**
|
|
64
|
-
* Resource releases that outlive the outcomes they belong to.
|
|
65
|
-
*
|
|
66
|
-
* An invocation reports its outcome as soon as it has one and releases its
|
|
67
|
-
* program root and admission slot afterwards, so the disposal barrier cannot
|
|
68
|
-
* be satisfied by {@link inFlight} alone: the last outcome can be settled
|
|
69
|
-
* while a temporary root still exists. Each release is tracked here until it
|
|
70
|
-
* completes, which is what keeps "after `dispose()` resolves, nothing of this
|
|
71
|
-
* provider's remains" a property of the barrier rather than of timing.
|
|
72
|
-
*/
|
|
73
|
-
private readonly quiescing;
|
|
74
|
-
/**
|
|
75
|
-
* Generations that were retired while still carrying invocations.
|
|
76
|
-
*
|
|
77
|
-
* A retired generation takes no new work but is not gone yet, so it stays
|
|
78
|
-
* reachable here until it has answered what it holds and torn itself down.
|
|
79
|
-
* The disposal barrier needs it for exactly that reason: awaiting only the
|
|
80
|
-
* current generation would let worker threads outlive a `dispose()` that
|
|
81
|
-
* promised the provider was quiesced.
|
|
82
|
-
*/
|
|
83
|
-
private readonly draining;
|
|
84
|
-
/**
|
|
85
|
-
* Program roots whose removal failed and is therefore still owed.
|
|
86
|
-
*
|
|
87
|
-
* Retried opportunistically as later invocations quiesce, and mandatorily at
|
|
88
|
-
* {@link dispose} — after every worker is down, which is precisely when the
|
|
89
|
-
* open file that blocked the earlier attempts no longer exists.
|
|
90
|
-
*/
|
|
91
|
-
private readonly retained;
|
|
92
|
-
private runtimeConfiguration;
|
|
93
|
-
private generation;
|
|
94
|
-
private disposed;
|
|
95
|
-
private disposal;
|
|
96
|
-
/**
|
|
97
|
-
* @param options - Host composition options; every field has a documented
|
|
98
|
-
* default and the package map defaults to no ordinary packages at all.
|
|
99
|
-
* @throws {@link Error} When the configured package map contains a name that
|
|
100
|
-
* is not an ordinary bare specifier or a root that is not absolute, when a
|
|
101
|
-
* numeric option is not a usable number, or when an option that names
|
|
102
|
-
* something is empty. All are composition errors, so they surface where the
|
|
103
|
-
* provider is assembled instead of as an execution outcome.
|
|
104
|
-
*/
|
|
105
|
-
constructor(options?: PiscinaCodeExecutionProviderOptions);
|
|
106
|
-
/**
|
|
107
|
-
* Execute one prepared invocation to a terminal outcome.
|
|
108
|
-
*
|
|
109
|
-
* The invocation is tracked while it runs so {@link dispose} can wait for it,
|
|
110
|
-
* and it is removed again on every terminal path. The outcome is reported as
|
|
111
|
-
* soon as the invocation has one; the resources it held are released
|
|
112
|
-
* afterwards, under the separate tracking {@link dispose} also waits for.
|
|
113
|
-
* @param request - Prepared, JSON-safe invocation to execute.
|
|
114
|
-
* @param context - Effective cancellation signal and deadline for the execution.
|
|
115
|
-
* @returns Exactly one normalized terminal outcome for the invocation.
|
|
116
|
-
*/
|
|
117
|
-
execute(request: CodeExecutionRequest, context: CodeExecutionProviderContext): Promise<CodeExecutionOutcome>;
|
|
118
|
-
/**
|
|
119
|
-
* Destroy the worker pool, reject further executions, and drain what is running.
|
|
120
|
-
*
|
|
121
|
-
* This is a barrier, not a request: once it *resolves* the pool is destroyed,
|
|
122
|
-
* every invocation that was still materializing or dispatching has reached a
|
|
123
|
-
* terminal outcome, and every temporary program root and admission slot those
|
|
124
|
-
* invocations held has been released. Concurrent and repeated calls all await
|
|
125
|
-
* the same disposal, so the barrier holds for every caller. The composing
|
|
126
|
-
* host is responsible for unregistering the provider before disposing it, so
|
|
127
|
-
* no execution is routed here afterwards.
|
|
128
|
-
*
|
|
129
|
-
* A pool that refuses to shut down is therefore a rejection, not a warning:
|
|
130
|
-
* worker threads may still be alive, so resolving would assert exactly the
|
|
131
|
-
* thing that failed. The rest of the barrier still runs first — the
|
|
132
|
-
* invocations are drained, the releases are awaited, and the retained roots
|
|
133
|
-
* get their final round — so one pool's failure never costs the cleanup that
|
|
134
|
-
* had nothing to do with it, and the rejection carries every teardown failure
|
|
135
|
-
* rather than the first. Repeated calls await the same memoized disposal and
|
|
136
|
-
* therefore reject again, with the same reasons: idempotent means the same
|
|
137
|
-
* outcome, not a second attempt that reports success.
|
|
138
|
-
*
|
|
139
|
-
* Removal of the temporary program roots is retried rather than abandoned.
|
|
140
|
-
* Each invocation removes its own root with bounded retries — short, because
|
|
141
|
-
* a cleanup failure must never delay the execution outcome — and a root that
|
|
142
|
-
* outlives them is kept as pending work instead of merely logged. This
|
|
143
|
-
* barrier makes the final attempt on whatever is still pending, and it makes
|
|
144
|
-
* it in the one position where it is most likely to succeed: every worker
|
|
145
|
-
* thread is already down, so the open file that blocked the earlier attempts
|
|
146
|
-
* is gone. Only a root that survives even that is reported to local
|
|
147
|
-
* diagnostics, naming the directory left behind — and only reported, because
|
|
148
|
-
* what is left is inert data on disk rather than something of this provider's
|
|
149
|
-
* still running, which is the distinction that decides warn against reject.
|
|
150
|
-
* @returns Promise that resolves once the provider is fully quiesced.
|
|
151
|
-
* @throws {@link AggregateError} When one or more worker pools could not be
|
|
152
|
-
* torn down, after the rest of the barrier has completed.
|
|
153
|
-
*/
|
|
154
|
-
dispose(): Promise<void>;
|
|
155
|
-
/**
|
|
156
|
-
* Destroy the pool and wait for every tracked invocation to settle.
|
|
157
|
-
*
|
|
158
|
-
* Invocations still queued for admission are already tracked, and disposal
|
|
159
|
-
* releases their predecessors' slots, so they are admitted, observe the
|
|
160
|
-
* disposal, and settle rather than blocking the barrier.
|
|
161
|
-
*
|
|
162
|
-
* Draining generations are torn down here alongside the current one, and
|
|
163
|
-
* without waiting for them to drain first: they are still running the
|
|
164
|
-
* invocations they hold, and an invocation that only ends by termination
|
|
165
|
-
* would otherwise make the barrier depend on the submitted program. Teardown
|
|
166
|
-
* is memoized per generation, so one that had already begun shutting itself
|
|
167
|
-
* down is awaited rather than shut down a second time.
|
|
168
|
-
*
|
|
169
|
-
* The two waits below are ordered, not concurrent, and the order is the
|
|
170
|
-
* contract: an invocation registers its resource release as it settles, so
|
|
171
|
-
* the set of outstanding releases is only complete once every invocation has
|
|
172
|
-
* settled. Snapshotting it earlier would let a root materialized by the last
|
|
173
|
-
* invocation outlive the barrier.
|
|
174
|
-
*
|
|
175
|
-
* The retained-root sweep is last for the same reason and one more: every
|
|
176
|
-
* invocation has settled and every release has run, so the retained set is
|
|
177
|
-
* complete, and every worker thread is down, so a handle that blocked an
|
|
178
|
-
* earlier removal has been released. It is the last attempt anyone makes, and
|
|
179
|
-
* the best-placed one.
|
|
180
|
-
*
|
|
181
|
-
* A teardown failure is retained rather than reported where it happens, and
|
|
182
|
-
* raised only once all of the above has run. Failing early would skip the
|
|
183
|
-
* drain and the sweep, which is the opposite of what a pool that would not
|
|
184
|
-
* shut down calls for; failing not at all would resolve a barrier whose
|
|
185
|
-
* central promise — that nothing of this provider's is still running — is the
|
|
186
|
-
* one that just broke.
|
|
187
|
-
* @returns Promise that resolves once no pool remains, nothing is in flight,
|
|
188
|
-
* and every invocation's resources have been released.
|
|
189
|
-
* @throws {@link AggregateError} Carrying every pool that could not be torn
|
|
190
|
-
* down, raised after the drain, the releases, and the retained-root sweep.
|
|
191
|
-
*/
|
|
192
|
-
private destroyPoolAndDrain;
|
|
193
|
-
/**
|
|
194
|
-
* Run one invocation from admission to its terminal outcome.
|
|
195
|
-
*
|
|
196
|
-
* Admission bounds how many invocations hold a temporary program root at
|
|
197
|
-
* once, and how many wait for one. An invocation that arrives once both are
|
|
198
|
-
* full is refused there and then rather than queued, because a queue position
|
|
199
|
-
* it can only leave by timing out buys it nothing and costs the host its
|
|
200
|
-
* retained request for the whole wait. Disposal and cancellation are both
|
|
201
|
-
* re-checked after admission and after materialization, so neither an
|
|
202
|
-
* execution that started before `dispose()` nor one whose signal settled
|
|
203
|
-
* meanwhile can revive the pool.
|
|
204
|
-
*
|
|
205
|
-
* Every terminal path — success, failure, timeout, and cancellation alike —
|
|
206
|
-
* hands the materialized root and the admission slot to {@link trackRelease},
|
|
207
|
-
* which releases them *after* this returns. The outcome is what the caller
|
|
208
|
-
* waited for and the release is not; see the `finally` below for why the two
|
|
209
|
-
* are separated.
|
|
210
|
-
*
|
|
211
|
-
* The request's own rules are checked *before* admission — the program's in
|
|
212
|
-
* {@link assertProgramWithinBudget}, the rest in {@link requestAdmissionFailure}.
|
|
213
|
-
* All of them are pure and decide the outcome on their own, so making an
|
|
214
|
-
* inadmissible request wait for a slot would only park it, and a burst of them
|
|
215
|
-
* would hold their oversized sources, export names, and untransportable
|
|
216
|
-
* arguments in memory behind a full gate — long enough for the deadline to
|
|
217
|
-
* report `timed_out` for a request that was never admissible in the first
|
|
218
|
-
* place. Rejecting up front keeps `invalid_program` the answer regardless of
|
|
219
|
-
* how loaded the provider is.
|
|
220
|
-
*
|
|
221
|
-
* Host configuration is resolved only after admission, so slow filesystem
|
|
222
|
-
* resolution remains covered by the provider's queue bound. Every exit after
|
|
223
|
-
* that point sanitizes diagnostics against the same pinned configuration.
|
|
224
|
-
* @param request - Prepared, JSON-safe invocation to execute.
|
|
225
|
-
* @param context - Effective cancellation signal and deadline for the execution.
|
|
226
|
-
* @returns Exactly one normalized terminal outcome for the invocation.
|
|
227
|
-
*/
|
|
228
|
-
private runInvocation;
|
|
229
|
-
/**
|
|
230
|
-
* Release one invocation's resources, and never fail doing so.
|
|
231
|
-
*
|
|
232
|
-
* Cleanup precedes the slot release, which is what keeps the admission bound
|
|
233
|
-
* a bound on *resources* rather than on dispatch: the next admitted
|
|
234
|
-
* invocation cannot start before this one's temporary root is gone, so the
|
|
235
|
-
* number of roots in existence stays at or below the configured concurrency.
|
|
236
|
-
* That ordering is the reason the slot is not released as soon as the outcome
|
|
237
|
-
* is reported, even though the caller no longer waits for either.
|
|
238
|
-
*
|
|
239
|
-
* A root the bounded retries could not remove becomes {@link retained} work
|
|
240
|
-
* rather than a warning nobody acts on, and it is the one thing the bound
|
|
241
|
-
* above does not cover: a retained root outlives the slot that produced it, so
|
|
242
|
-
* while any exist the roots on disk are the admitted ones *plus* the retained
|
|
243
|
-
* ones. Making the release wait for it instead would not restore the bound —
|
|
244
|
-
* it would stall admission on a handle the provider does not hold — so the
|
|
245
|
-
* bound is stated honestly here and the excess is discharged by retrying. The
|
|
246
|
-
* slot is therefore freed regardless, and *before* anything retained is
|
|
247
|
-
* retried, or a queued invocation would wait on somebody else's stuck handle.
|
|
248
|
-
*
|
|
249
|
-
* The retry that follows deliberately covers only what was already retained
|
|
250
|
-
* when this invocation began releasing — the roots of *earlier* invocations,
|
|
251
|
-
* whose workers have had a whole invocation's worth of time to exit. This
|
|
252
|
-
* invocation's own root is excluded: its bounded attempts have only just run
|
|
253
|
-
* out, so repeating them in the same tick would spend the same delay on the
|
|
254
|
-
* same answer. {@link dispose} owns the mandatory retry that covers everything.
|
|
255
|
-
* @param programRoot - Program root cleanup lease, when one was created.
|
|
256
|
-
* @param release - Admission slot handle, when the invocation was admitted.
|
|
257
|
-
* @param teardown - Teardown triggered by the generation this invocation used.
|
|
258
|
-
* @returns Promise that resolves once the root is gone or retained, the slot
|
|
259
|
-
* is free, and the previously retained roots have been retried once.
|
|
260
|
-
*/
|
|
261
|
-
private quiesce;
|
|
262
|
-
/**
|
|
263
|
-
* Start one invocation's resource release and keep it reachable until it ends.
|
|
264
|
-
*
|
|
265
|
-
* Synchronous, and it has to be: it runs in the `finally` of the invocation
|
|
266
|
-
* whose outcome is about to be reported, so the release is registered before
|
|
267
|
-
* that outcome can be observed. The disposal barrier depends on exactly that
|
|
268
|
-
* ordering — it collects outstanding releases only after every invocation has
|
|
269
|
-
* settled, and would otherwise miss the last one.
|
|
270
|
-
*
|
|
271
|
-
* The tracking chain absorbs a rejection before untracking. {@link quiesce}
|
|
272
|
-
* does not throw — every step it takes contains its own failures — but the
|
|
273
|
-
* chain adopts whatever the release settles as, so a future step that did
|
|
274
|
-
* throw would surface as an unhandled rejection instead of as the local
|
|
275
|
-
* diagnostic it warrants. The disposal barrier is unaffected either way: it
|
|
276
|
-
* awaits the tracked promise through `allSettled`.
|
|
277
|
-
* @param programRoot - Program root cleanup lease, when one was created.
|
|
278
|
-
* @param release - Admission slot handle, when the invocation was admitted.
|
|
279
|
-
* @param teardown - Teardown triggered by the generation this invocation used.
|
|
280
|
-
*/
|
|
281
|
-
private trackRelease;
|
|
282
|
-
/**
|
|
283
|
-
* Dispatch one task to the worker pool and separate aborts from failures.
|
|
284
|
-
*
|
|
285
|
-
* Only a rejection produced by the abort itself is reported as aborted. A
|
|
286
|
-
* worker failure that merely happens to be observed once the signal has
|
|
287
|
-
* already fired keeps its own classification.
|
|
288
|
-
* @param task - Structured-clone-safe task for this invocation.
|
|
289
|
-
* @param signal - Effective cancellation signal for the execution.
|
|
290
|
-
* @returns The raw worker value, or the fact that the run was aborted.
|
|
291
|
-
*/
|
|
292
|
-
private dispatch;
|
|
293
|
-
/**
|
|
294
|
-
* Hand one task to the current worker generation and account for it.
|
|
295
|
-
*
|
|
296
|
-
* Submission strictly precedes retirement, and that order is the contract: a
|
|
297
|
-
* retired generation takes nothing further, so counting this invocation and
|
|
298
|
-
* retiring in the same breath would strand the very task the count was for.
|
|
299
|
-
* Nothing between the two awaits, so no other invocation can interleave and
|
|
300
|
-
* submit onto a generation that is already leaving.
|
|
301
|
-
* @param task - Structured-clone-safe task for this invocation.
|
|
302
|
-
* @param signal - Effective cancellation signal for the execution.
|
|
303
|
-
* @returns The raw value the worker thread produced.
|
|
304
|
-
*/
|
|
305
|
-
private submit;
|
|
306
|
-
/**
|
|
307
|
-
* Detach a worker generation that has served its share of invocations.
|
|
308
|
-
*
|
|
309
|
-
* Retirement is what bounds a worker's memory. Every invocation imports a
|
|
310
|
-
* freshly materialized program under a URL Node has never seen, so its module
|
|
311
|
-
* graph enters the worker's module map and is never evicted; idle reaping
|
|
312
|
-
* does not reach a pool that is never idle. Replacing the threads is the only
|
|
313
|
-
* way to release those graphs.
|
|
314
|
-
*
|
|
315
|
-
* Detaching is immediate and unconditional, which is what makes the bound
|
|
316
|
-
* hold under sustained load: the generation's outstanding count can only fall
|
|
317
|
-
* from here, so it reaches zero and is torn down no matter how busy the
|
|
318
|
-
* provider stays. Waiting for a quiet moment instead would never find one.
|
|
319
|
-
*
|
|
320
|
-
* Retiring a whole generation rather than one thread at a time keeps this a
|
|
321
|
-
* rule about a resource the provider owns outright, instead of bookkeeping
|
|
322
|
-
* about which pool thread has served how much. It retires sooner than
|
|
323
|
-
* strictly necessary above a concurrency of one, and that direction is the
|
|
324
|
-
* safe one: the configured figure stays an upper bound per thread.
|
|
325
|
-
*
|
|
326
|
-
* A generation retired while it still carries an invocation overlaps with its
|
|
327
|
-
* successor, so the *threads* in existence can briefly exceed
|
|
328
|
-
* `maxConcurrency`. That is accepted here rather than fixed, and the bound is
|
|
329
|
-
* worth stating precisely because the headline number is a promise about
|
|
330
|
-
* something else:
|
|
331
|
-
*
|
|
332
|
-
* - Threads actually **running** submitted code never exceed `maxConcurrency`.
|
|
333
|
-
* The admission gate bounds invocations between admission and release, and
|
|
334
|
-
* an invocation occupies one thread of one generation. The excess is idle
|
|
335
|
-
* threads a retired generation had already spawned.
|
|
336
|
-
* - A completed invocation that triggered teardown keeps its admission slot
|
|
337
|
-
* until that teardown settles. Slow teardown therefore consumes capacity
|
|
338
|
-
* instead of allowing an unbounded chain of successor pools.
|
|
339
|
-
* - `minThreads: 0` with the configured `idleTimeout` reaps idle threads in
|
|
340
|
-
* a draining pool while its already-submitted work finishes.
|
|
341
|
-
*
|
|
342
|
-
* Shrinking a retired pool proactively would be the better answer, and Piscina
|
|
343
|
-
* 5.2 offers no seam for it: `maxThreads`, `minThreads`, and `idleTimeout` are
|
|
344
|
-
* read-only accessors, and `close()` cannot stand in — its flush waits only
|
|
345
|
-
* for tasks a worker has already *started* and then destroys the pool, which
|
|
346
|
-
* would cut short an invocation still queued for a free thread. Reaching into
|
|
347
|
-
* the pool's internal options object instead would make this provider's
|
|
348
|
-
* correctness depend on an undocumented field surviving a dependency upgrade.
|
|
349
|
-
* @param generation - Generation to detach from further work.
|
|
350
|
-
*/
|
|
351
|
-
private retire;
|
|
352
|
-
/**
|
|
353
|
-
* Retire a pool immediately when Piscina reports a bootstrap or worker error.
|
|
354
|
-
*
|
|
355
|
-
* Piscina is an EventEmitter: without this listener an error emitted before a
|
|
356
|
-
* task promise settles is an unhandled host exception. A failed generation is
|
|
357
|
-
* never reused; destroying it also settles any queued runs so they report a
|
|
358
|
-
* terminal provider failure and the next invocation can create a fresh pool.
|
|
359
|
-
* @param generation - Pool generation that emitted the error.
|
|
360
|
-
* @param error - Piscina bootstrap or worker error.
|
|
361
|
-
*/
|
|
362
|
-
private handlePoolError;
|
|
363
|
-
/**
|
|
364
|
-
* Tear a retired generation down once it owes no further answers.
|
|
365
|
-
*
|
|
366
|
-
* The pool is destroyed rather than closed, and only ever with nothing
|
|
367
|
-
* outstanding, so the two are the same thing here: there is no task left to
|
|
368
|
-
* cut short, only idle threads to release. Closing would be the weaker
|
|
369
|
-
* choice — a pool's own flush waits for the tasks its workers have *started*,
|
|
370
|
-
* which says nothing about one still waiting for a worker to become ready.
|
|
371
|
-
*
|
|
372
|
-
* A generation is forgotten only once its teardown succeeded. One that failed
|
|
373
|
-
* stays in {@link draining} on purpose: its threads may still be alive, so it
|
|
374
|
-
* is still this provider's to answer for, and leaving it reachable is what
|
|
375
|
-
* lets a later {@link dispose} collect the failure rather than resolve as
|
|
376
|
-
* though the generation had gone quietly. Nobody awaits this path, so the
|
|
377
|
-
* failure is reported locally as well — that log is the only account of it for
|
|
378
|
-
* a provider that is never disposed.
|
|
379
|
-
* @param generation - Generation whose remaining work may have finished.
|
|
380
|
-
*/
|
|
381
|
-
private tearDownIfDrained;
|
|
382
|
-
/**
|
|
383
|
-
* Destroy one generation's pool, at most once.
|
|
384
|
-
*
|
|
385
|
-
* Memoized on the generation because two paths reach it: the generation
|
|
386
|
-
* draining on its own, and the disposal barrier tearing everything down. The
|
|
387
|
-
* second must await the shutdown the first began rather than start a rival
|
|
388
|
-
* one, or the barrier would resolve on a teardown that is not the one
|
|
389
|
-
* actually releasing the threads.
|
|
390
|
-
*
|
|
391
|
-
* The memoized promise carries a failure as readily as a success, which is
|
|
392
|
-
* what keeps "at most once" honest for a pool that would not shut down: a
|
|
393
|
-
* second attempt would only race the same refusal, so every caller is handed
|
|
394
|
-
* the one answer this generation has. Each therefore attaches its own handler.
|
|
395
|
-
* @param generation - Generation whose pool is to be destroyed.
|
|
396
|
-
* @returns The single teardown of that generation; rejects when the pool
|
|
397
|
-
* refused to shut down, and rejects again for every later caller.
|
|
398
|
-
*/
|
|
399
|
-
private tearDown;
|
|
400
|
-
/**
|
|
401
|
-
* Build the structured-clone-safe worker task for one invocation.
|
|
402
|
-
*
|
|
403
|
-
* Every invocation gets a fresh loader namespace so successive executions
|
|
404
|
-
* never share a transpiled module cache.
|
|
405
|
-
*
|
|
406
|
-
* The task's `redactedPaths` is the single redaction set for this invocation,
|
|
407
|
-
* and both sides of the thread boundary use it: the worker strips it before a
|
|
408
|
-
* diagnostic can be truncated around a value the host would then no longer be
|
|
409
|
-
* able to match, and the host strips it again from whatever reaches it.
|
|
410
|
-
* @param request - Prepared invocation being dispatched.
|
|
411
|
-
* @param materialized - Materialized program root for this invocation.
|
|
412
|
-
* @param configuration - Pinned package targets and matching redactions.
|
|
413
|
-
* @returns Task payload for the worker entry.
|
|
414
|
-
*/
|
|
415
|
-
private createTask;
|
|
416
|
-
/**
|
|
417
|
-
* Resolve the host-configured redactions once, on first use.
|
|
418
|
-
*
|
|
419
|
-
* Deferred out of the constructor because establishing a configured path's
|
|
420
|
-
* real spelling is filesystem work, and composing a provider must not do I/O
|
|
421
|
-
* for an execution that may never happen. Concurrent invocations share one
|
|
422
|
-
* attempt, but only a successful resolution remains pinned.
|
|
423
|
-
*
|
|
424
|
-
* Resolving package targets deliberately happens under admission. A missing
|
|
425
|
-
* target is a provider failure for that invocation; a retargeted symlink after
|
|
426
|
-
* this snapshot cannot alter later materialization.
|
|
427
|
-
*
|
|
428
|
-
* The loader environment is submitted as worker *paths* rather than as
|
|
429
|
-
* environment values, because every value in it names a host file the worker
|
|
430
|
-
* is launched against and a startup failure quotes it as a path. Passing a
|
|
431
|
-
* value that turned out not to be one costs nothing: path expansion absorbs
|
|
432
|
-
* its own failures and falls back to the value itself, which is what the
|
|
433
|
-
* environment branch would have redacted anyway.
|
|
434
|
-
* @returns Pinned package targets and matching bus-diagnostic redactions.
|
|
435
|
-
*/
|
|
436
|
-
private resolveRuntimeConfiguration;
|
|
437
|
-
/**
|
|
438
|
-
* Create the current worker generation on first use.
|
|
439
|
-
*
|
|
440
|
-
* The pool is created lazily so a composed-but-unused provider never spawns
|
|
441
|
-
* a thread, and it is configured with the explicit environment, bounded
|
|
442
|
-
* concurrency, and idle reaping the host asked for. `minThreads` is pinned to
|
|
443
|
-
* zero because the pool's own default keeps at least one thread alive
|
|
444
|
-
* forever, which would make the configured idle timeout unobservable.
|
|
445
|
-
*
|
|
446
|
-
* The worker entry's own loader environment is applied last, so a host cannot
|
|
447
|
-
* reconfigure the loader through {@link PiscinaCodeExecutionProviderOptions.environment} —
|
|
448
|
-
* that loader is what holds the package map to being the whole truth about
|
|
449
|
-
* which ordinary packages a submitted program resolves.
|
|
450
|
-
*
|
|
451
|
-
* Laziness is also what makes retirement cheap: a retired generation simply
|
|
452
|
-
* clears this field, and the next invocation builds its successor on exactly
|
|
453
|
-
* the path it would have taken for the very first execution.
|
|
454
|
-
*
|
|
455
|
-
* INVARIANT: this must only be reached from a call path that checked
|
|
456
|
-
* `this.disposed` with no intervening `await`. Disposal clears the current
|
|
457
|
-
* generation, so a revived provider would spawn threads no barrier is waiting
|
|
458
|
-
* on; {@link runInvocation} carries the matching note, and every frame between
|
|
459
|
-
* it and this one is synchronous.
|
|
460
|
-
* @returns The live worker generation.
|
|
461
|
-
*/
|
|
462
|
-
private acquireGeneration;
|
|
463
|
-
/**
|
|
464
|
-
* Map a worker outcome envelope onto a terminal contract outcome.
|
|
465
|
-
*
|
|
466
|
-
* The envelope is re-validated here, so a worker entry that returns
|
|
467
|
-
* something else is reported as a provider contract violation rather than
|
|
468
|
-
* widening the outcome union. The result budget is re-applied after the
|
|
469
|
-
* thread boundary before mapping it onto the contract. The clone has already
|
|
470
|
-
* happened by this point — this bounds what leaves the provider, not what
|
|
471
|
-
* crosses the thread boundary.
|
|
472
|
-
* @param workerOutcome - Raw value returned by the worker thread.
|
|
473
|
-
* @param redactions - Full redaction set for this invocation.
|
|
474
|
-
* @returns Terminal outcome for the invocation.
|
|
475
|
-
*/
|
|
476
|
-
private toOutcome;
|
|
477
|
-
/**
|
|
478
|
-
* Map a thrown failure onto a terminal contract outcome.
|
|
479
|
-
*
|
|
480
|
-
* Caller aborts never reach here: they are classified on the dispatch path,
|
|
481
|
-
* where an abort rejection can be told apart from an unrelated failure.
|
|
482
|
-
*
|
|
483
|
-
* A pool torn down under a running task rejects it with the pool's own
|
|
484
|
-
* teardown error, and the honest classification for that is the disposal
|
|
485
|
-
* rather than a provider fault. Recognizing it takes *both* conditions: the
|
|
486
|
-
* provider being disposed alone would relabel a genuine failure that merely
|
|
487
|
-
* happened to land during disposal, and a teardown-shaped rejection alone
|
|
488
|
-
* cannot be attributed to a disposal that is not happening.
|
|
489
|
-
* @param error - Value thrown while admitting, materializing, or dispatching.
|
|
490
|
-
* @param redactions - Full redaction set for this invocation.
|
|
491
|
-
* @returns Terminal outcome for the invocation.
|
|
492
|
-
*/
|
|
493
|
-
private toFailureOutcome;
|
|
494
|
-
}
|
|
495
|
-
//#endregion
|
|
496
|
-
export { PiscinaCodeExecutionProvider as t };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{z as e}from"zod";const t=e.lazy(()=>e.union([e.string(),e.number().finite(),e.boolean(),e.null(),e.array(t),e.record(e.string(),t)])),n=2**32-2,r=128;function i(e){let t=Number(e);return Number.isInteger(t)&&t>=0&&t<=n&&String(t)===e}function a(e){return`ok`in e&&!e.ok}var o=class{ancestors=new Set;completed=new Map;snapshot(e){return this.visit(e,[],0)}failure(e,t){return{ok:!1,violation:{kind:e,path:t}}}visit(e,t,n){if(typeof e==`number`&&Object.is(e,-0))return this.failure(`negative-zero`,t);if(typeof e!=`object`||!e)return{ok:!0,value:e};let r=n+1;if(r>128)return this.failure(`nesting-too-deep`,t);if(this.ancestors.has(e))return this.failure(`cyclic-reference`,t);if(this.completed.has(e))return this.copyCompletedTree(this.completed.get(e),t,r);let i=this.describe(e,t);return a(i)?i:this.visitObject(e,i,t,r)}describe(e,t){try{let n=Reflect.ownKeys(e);if(n.some(e=>typeof e==`symbol`))return this.failure(`symbol-key`,t);if(n.includes(`__proto__`))return this.failure(`prototype-key`,[...t,`__proto__`]);let r=Array.isArray(e);return!r&&!s(e)?this.failure(`non-plain-object`,t):this.describeProperties(e,n,r,t)}catch{return this.failure(`unreadable-value`,t)}}describeProperties(e,t,n,r){let a=new Map;for(let o of t){if(typeof o!=`string`)continue;let t=Object.getOwnPropertyDescriptor(e,o);if(t===void 0)return this.failure(`unreadable-value`,[...r,o]);if((!n||o!==`length`)&&!t.enumerable)return this.failure(`non-enumerable-key`,[...r,o]);if(n&&o!==`length`&&!i(o))return this.failure(`extra-array-key`,[...r,o]);a.set(o,t)}return{isArray:n,descriptors:a}}visitObject(e,t,n,r){this.ancestors.add(e);try{let i=t.isArray?this.snapshotArray(e,t.descriptors,n,r):this.snapshotRecord(e,t.descriptors,n,r);return i.ok&&this.completed.set(e,i.value),i}finally{this.ancestors.delete(e)}}snapshotArray(e,t,n,r){let i=t.get(`length`)?.value;if(typeof i!=`number`)return this.failure(`unreadable-value`,[...n,`length`]);let a=[];for(let o=0;o<i;o+=1){let i=t.get(String(o));if(i===void 0)a.push(void 0);else{let t=this.snapshotProperty(e,i,[...n,o],r);if(!t.ok)return t;a.push(t.value)}}return{ok:!0,value:a}}snapshotRecord(e,t,n,r){let i={};for(let[a,o]of t){let t=this.snapshotProperty(e,o,[...n,a],r);if(!t.ok)return t;c(i,a,t.value)}return{ok:!0,value:i}}snapshotProperty(e,t,n,r){let i=this.readDescriptor(e,t,n);return a(i)?i:this.visit(i.value,n,r)}readDescriptor(e,t,n){try{return{ok:!0,value:`value`in t?t.value:Reflect.apply(t.get??(()=>void 0),e,[])}}catch{return this.failure(`unreadable-value`,n)}}copyCompletedTree(e,t,n){if(Array.isArray(e)){let r=[];for(let i=0;i<e.length;i+=1){let a=this.copyCompletedValue(e[i],[...t,i],n);if(!a.ok)return a;r.push(a.value)}return{ok:!0,value:r}}if(typeof e!=`object`||!e)return{ok:!0,value:e};let r={};for(let[i,a]of Object.entries(e)){let e=this.copyCompletedValue(a,[...t,i],n);if(!e.ok)return e;c(r,i,e.value)}return{ok:!0,value:r}}copyCompletedValue(e,t,n){if(typeof e==`number`&&Object.is(e,-0))return this.failure(`negative-zero`,t);if(typeof e!=`object`||!e)return{ok:!0,value:e};let r=n+1;return r>128?this.failure(`nesting-too-deep`,t):this.copyCompletedTree(e,t,r)}};function s(e){let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function c(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0})}function l(e){return new o().snapshot(e)}function u(t,n){let r={"prototype-key":n.prototypeKey,"non-plain-object":n.nonPlainObject,"symbol-key":n.symbolKey,"non-enumerable-key":n.nonEnumerableKey,"extra-array-key":n.extraArrayKey,"cyclic-reference":`the value contains a cyclic reference and cannot be transported as JSON`,"nesting-too-deep":`the value exceeds the maximum JSON container nesting of 128`,"negative-zero":`the value contains -0, which cannot be transported as JSON without becoming 0`,"unreadable-value":`the value could not be read into a stable JSON boundary snapshot`};return e.preprocess((e,t)=>{let n=l(e);if(!n.ok){t.addIssue({code:`custom`,message:r[n.violation.kind],path:[...n.violation.path],input:e});return}return n.value},t)}const d=e.record(e.string(),t),f=d,p=e.record(e.string(),t),m=p;export{m as a,l as c,p as i,f as n,t as o,d as r,u as s,r as t};
|