@geminixiang/mikan 1.0.0-beta.2 → 1.0.0-beta.21
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/CHANGELOG.md +388 -0
- package/README.md +49 -16
- package/dist/adapter.d.ts +1 -1
- package/dist/adapter.d.ts.map +1 -1
- package/dist/adapter.js.map +1 -1
- package/dist/adapters/buffered-responder.d.ts +60 -0
- package/dist/adapters/buffered-responder.d.ts.map +1 -0
- package/dist/adapters/buffered-responder.js +201 -0
- package/dist/adapters/buffered-responder.js.map +1 -0
- package/dist/adapters/discord/bot.d.ts +1 -0
- package/dist/adapters/discord/bot.d.ts.map +1 -1
- package/dist/adapters/discord/bot.js +36 -67
- package/dist/adapters/discord/bot.js.map +1 -1
- package/dist/adapters/discord/context.d.ts.map +1 -1
- package/dist/adapters/discord/context.js +44 -204
- package/dist/adapters/discord/context.js.map +1 -1
- package/dist/adapters/github/bot.d.ts +86 -0
- package/dist/adapters/github/bot.d.ts.map +1 -0
- package/dist/adapters/github/bot.js +640 -0
- package/dist/adapters/github/bot.js.map +1 -0
- package/dist/adapters/github/client.d.ts +122 -0
- package/dist/adapters/github/client.d.ts.map +1 -0
- package/dist/adapters/github/client.js +314 -0
- package/dist/adapters/github/client.js.map +1 -0
- package/dist/adapters/github/cloudbuild.d.ts +24 -0
- package/dist/adapters/github/cloudbuild.d.ts.map +1 -0
- package/dist/adapters/github/cloudbuild.js +71 -0
- package/dist/adapters/github/cloudbuild.js.map +1 -0
- package/dist/adapters/github/context.d.ts +9 -0
- package/dist/adapters/github/context.d.ts.map +1 -0
- package/dist/adapters/github/context.js +103 -0
- package/dist/adapters/github/context.js.map +1 -0
- package/dist/adapters/github/gcp-auth.d.ts +31 -0
- package/dist/adapters/github/gcp-auth.d.ts.map +1 -0
- package/dist/adapters/github/gcp-auth.js +196 -0
- package/dist/adapters/github/gcp-auth.js.map +1 -0
- package/dist/adapters/github/github-ops.d.ts +90 -0
- package/dist/adapters/github/github-ops.d.ts.map +1 -0
- package/dist/adapters/github/github-ops.js +405 -0
- package/dist/adapters/github/github-ops.js.map +1 -0
- package/dist/adapters/github/ids.d.ts +34 -0
- package/dist/adapters/github/ids.d.ts.map +1 -0
- package/dist/adapters/github/ids.js +53 -0
- package/dist/adapters/github/ids.js.map +1 -0
- package/dist/adapters/github/repo.d.ts +32 -0
- package/dist/adapters/github/repo.d.ts.map +1 -0
- package/dist/adapters/github/repo.js +141 -0
- package/dist/adapters/github/repo.js.map +1 -0
- package/dist/adapters/github/tool-pack.d.ts +14 -0
- package/dist/adapters/github/tool-pack.d.ts.map +1 -0
- package/dist/adapters/github/tool-pack.js +56 -0
- package/dist/adapters/github/tool-pack.js.map +1 -0
- package/dist/adapters/github/tools/checks.d.ts +24 -0
- package/dist/adapters/github/tools/checks.d.ts.map +1 -0
- package/dist/adapters/github/tools/checks.js +105 -0
- package/dist/adapters/github/tools/checks.js.map +1 -0
- package/dist/adapters/github/tools/issue.d.ts +22 -0
- package/dist/adapters/github/tools/issue.d.ts.map +1 -0
- package/dist/adapters/github/tools/issue.js +48 -0
- package/dist/adapters/github/tools/issue.js.map +1 -0
- package/dist/adapters/github/tools/pr.d.ts +22 -0
- package/dist/adapters/github/tools/pr.d.ts.map +1 -0
- package/dist/adapters/github/tools/pr.js +48 -0
- package/dist/adapters/github/tools/pr.js.map +1 -0
- package/dist/adapters/github/tools/read.d.ts +22 -0
- package/dist/adapters/github/tools/read.d.ts.map +1 -0
- package/dist/adapters/github/tools/read.js +141 -0
- package/dist/adapters/github/tools/read.js.map +1 -0
- package/dist/adapters/github/tools/review-reply.d.ts +19 -0
- package/dist/adapters/github/tools/review-reply.d.ts.map +1 -0
- package/dist/adapters/github/tools/review-reply.js +38 -0
- package/dist/adapters/github/tools/review-reply.js.map +1 -0
- package/dist/adapters/github/tools/sync.d.ts +17 -0
- package/dist/adapters/github/tools/sync.d.ts.map +1 -0
- package/dist/adapters/github/tools/sync.js +34 -0
- package/dist/adapters/github/tools/sync.js.map +1 -0
- package/dist/adapters/github/types.d.ts +350 -0
- package/dist/adapters/github/types.d.ts.map +1 -0
- package/dist/adapters/github/types.js +2 -0
- package/dist/adapters/github/types.js.map +1 -0
- package/dist/adapters/intake.d.ts +16 -5
- package/dist/adapters/intake.d.ts.map +1 -1
- package/dist/adapters/intake.js +79 -22
- package/dist/adapters/intake.js.map +1 -1
- package/dist/adapters/slack/bot.d.ts +8 -6
- package/dist/adapters/slack/bot.d.ts.map +1 -1
- package/dist/adapters/slack/bot.js +82 -134
- package/dist/adapters/slack/bot.js.map +1 -1
- package/dist/adapters/slack/context.d.ts.map +1 -1
- package/dist/adapters/slack/context.js +3 -14
- package/dist/adapters/slack/context.js.map +1 -1
- package/dist/adapters/slack/response-lifecycle.d.ts.map +1 -1
- package/dist/adapters/slack/response-lifecycle.js +14 -17
- package/dist/adapters/slack/response-lifecycle.js.map +1 -1
- package/dist/adapters/slack/session.d.ts.map +1 -1
- package/dist/adapters/slack/session.js +5 -8
- package/dist/adapters/slack/session.js.map +1 -1
- package/dist/adapters/streaming.d.ts +4 -0
- package/dist/adapters/streaming.d.ts.map +1 -1
- package/dist/adapters/streaming.js +11 -0
- package/dist/adapters/streaming.js.map +1 -1
- package/dist/adapters/telegram/bot.d.ts +1 -2
- package/dist/adapters/telegram/bot.d.ts.map +1 -1
- package/dist/adapters/telegram/bot.js +27 -62
- package/dist/adapters/telegram/bot.js.map +1 -1
- package/dist/adapters/telegram/context.d.ts.map +1 -1
- package/dist/adapters/telegram/context.js +37 -174
- package/dist/adapters/telegram/context.js.map +1 -1
- package/dist/adapters/types.d.ts +28 -2
- package/dist/adapters/types.d.ts.map +1 -1
- package/dist/adapters/types.js.map +1 -1
- package/dist/agent.d.ts +37 -14
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +359 -229
- package/dist/agent.js.map +1 -1
- package/dist/cli/arg-grammar.d.ts +25 -0
- package/dist/cli/arg-grammar.d.ts.map +1 -0
- package/dist/cli/arg-grammar.js +59 -0
- package/dist/cli/arg-grammar.js.map +1 -0
- package/dist/cli/boot.d.ts +16 -0
- package/dist/cli/boot.d.ts.map +1 -0
- package/dist/cli/boot.js +119 -0
- package/dist/cli/boot.js.map +1 -0
- package/dist/cli/download.d.ts.map +1 -0
- package/dist/cli/download.js.map +1 -0
- package/dist/cli/ext-git.d.ts +22 -0
- package/dist/cli/ext-git.d.ts.map +1 -0
- package/dist/cli/ext-git.js +76 -0
- package/dist/cli/ext-git.js.map +1 -0
- package/dist/cli/ext.d.ts +2 -0
- package/dist/cli/ext.d.ts.map +1 -0
- package/dist/cli/ext.js +215 -0
- package/dist/cli/ext.js.map +1 -0
- package/dist/commands/admin.d.ts.map +1 -1
- package/dist/commands/admin.js +2 -1
- package/dist/commands/admin.js.map +1 -1
- package/dist/commands/auto-reply.d.ts.map +1 -1
- package/dist/commands/auto-reply.js +2 -6
- package/dist/commands/auto-reply.js.map +1 -1
- package/dist/commands/extensions.d.ts.map +1 -1
- package/dist/commands/extensions.js +18 -8
- package/dist/commands/extensions.js.map +1 -1
- package/dist/commands/login.d.ts +2 -1
- package/dist/commands/login.d.ts.map +1 -1
- package/dist/commands/login.js +35 -3
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/manifest.d.ts +72 -0
- package/dist/commands/manifest.d.ts.map +1 -0
- package/dist/commands/manifest.js +121 -0
- package/dist/commands/manifest.js.map +1 -0
- package/dist/commands/model.d.ts.map +1 -1
- package/dist/commands/model.js +11 -9
- package/dist/commands/model.js.map +1 -1
- package/dist/commands/new.d.ts.map +1 -1
- package/dist/commands/new.js +2 -1
- package/dist/commands/new.js.map +1 -1
- package/dist/commands/sandbox.d.ts.map +1 -1
- package/dist/commands/sandbox.js +23 -17
- package/dist/commands/sandbox.js.map +1 -1
- package/dist/commands/text.d.ts +2 -0
- package/dist/commands/text.d.ts.map +1 -0
- package/dist/commands/text.js +16 -0
- package/dist/commands/text.js.map +1 -0
- package/dist/commands/types.d.ts +14 -1
- package/dist/commands/types.d.ts.map +1 -1
- package/dist/commands/types.js.map +1 -1
- package/dist/config.d.ts +1 -3
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +98 -95
- package/dist/config.js.map +1 -1
- package/dist/env-manifest.d.ts +35 -0
- package/dist/env-manifest.d.ts.map +1 -0
- package/dist/env-manifest.js +225 -0
- package/dist/env-manifest.js.map +1 -0
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +9 -73
- package/dist/events.js.map +1 -1
- package/dist/execution-resolver.d.ts +4 -2
- package/dist/execution-resolver.d.ts.map +1 -1
- package/dist/execution-resolver.js +54 -41
- package/dist/execution-resolver.js.map +1 -1
- package/dist/harness/event-format.d.ts +66 -0
- package/dist/harness/event-format.d.ts.map +1 -0
- package/dist/harness/event-format.js +112 -0
- package/dist/harness/event-format.js.map +1 -0
- package/dist/harness/extensions/loader.d.ts +44 -11
- package/dist/harness/extensions/loader.d.ts.map +1 -1
- package/dist/harness/extensions/loader.js +273 -84
- package/dist/harness/extensions/loader.js.map +1 -1
- package/dist/harness/extensions/registry.d.ts +48 -1
- package/dist/harness/extensions/registry.d.ts.map +1 -1
- package/dist/harness/extensions/registry.js +146 -0
- package/dist/harness/extensions/registry.js.map +1 -1
- package/dist/harness/extensions/types.d.ts +165 -22
- package/dist/harness/extensions/types.d.ts.map +1 -1
- package/dist/harness/extensions/types.js.map +1 -1
- package/dist/harness/index.d.ts +6 -5
- package/dist/harness/index.d.ts.map +1 -1
- package/dist/harness/index.js +3 -2
- package/dist/harness/index.js.map +1 -1
- package/dist/harness/models.d.ts +5 -0
- package/dist/harness/models.d.ts.map +1 -1
- package/dist/harness/models.js +10 -0
- package/dist/harness/models.js.map +1 -1
- package/dist/harness/runner.d.ts +37 -2
- package/dist/harness/runner.d.ts.map +1 -1
- package/dist/harness/runner.js +107 -23
- package/dist/harness/runner.js.map +1 -1
- package/dist/harness/session-store.d.ts +4 -1
- package/dist/harness/session-store.d.ts.map +1 -1
- package/dist/harness/session-store.js +11 -2
- package/dist/harness/session-store.js.map +1 -1
- package/dist/harness/subagent-runner.d.ts +34 -0
- package/dist/harness/subagent-runner.d.ts.map +1 -0
- package/dist/harness/subagent-runner.js +339 -0
- package/dist/harness/subagent-runner.js.map +1 -0
- package/dist/harness/types.d.ts +53 -0
- package/dist/harness/types.d.ts.map +1 -1
- package/dist/harness/types.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/main.js +260 -109
- package/dist/main.js.map +1 -1
- package/dist/observability/instrument.js +6 -4
- package/dist/observability/instrument.js.map +1 -1
- package/dist/observability/sentry.d.ts.map +1 -1
- package/dist/observability/sentry.js +3 -2
- package/dist/observability/sentry.js.map +1 -1
- package/dist/provisioner.d.ts.map +1 -1
- package/dist/provisioner.js +2 -5
- package/dist/provisioner.js.map +1 -1
- package/dist/runtime/conversation-runtime.d.ts +1 -1
- package/dist/runtime/conversation-runtime.d.ts.map +1 -1
- package/dist/runtime/conversation-runtime.js +276 -43
- package/dist/runtime/conversation-runtime.js.map +1 -1
- package/dist/runtime/types.d.ts +36 -5
- package/dist/runtime/types.d.ts.map +1 -1
- package/dist/runtime/types.js.map +1 -1
- package/dist/sandbox/cloudflare.d.ts +3 -0
- package/dist/sandbox/cloudflare.d.ts.map +1 -1
- package/dist/sandbox/cloudflare.js +10 -0
- package/dist/sandbox/cloudflare.js.map +1 -1
- package/dist/sandbox/container.d.ts +4 -0
- package/dist/sandbox/container.d.ts.map +1 -1
- package/dist/sandbox/container.js +11 -2
- package/dist/sandbox/container.js.map +1 -1
- package/dist/sandbox/firecracker.d.ts +3 -0
- package/dist/sandbox/firecracker.d.ts.map +1 -1
- package/dist/sandbox/firecracker.js +10 -1
- package/dist/sandbox/firecracker.js.map +1 -1
- package/dist/sandbox/gondolin-bootstrap.d.ts +26 -0
- package/dist/sandbox/gondolin-bootstrap.d.ts.map +1 -0
- package/dist/sandbox/gondolin-bootstrap.js +27 -0
- package/dist/sandbox/gondolin-bootstrap.js.map +1 -0
- package/dist/sandbox/gondolin-contract.d.ts +125 -0
- package/dist/sandbox/gondolin-contract.d.ts.map +1 -0
- package/dist/sandbox/gondolin-contract.js +155 -0
- package/dist/sandbox/gondolin-contract.js.map +1 -0
- package/dist/sandbox/gondolin-fleet.d.ts +104 -0
- package/dist/sandbox/gondolin-fleet.d.ts.map +1 -0
- package/dist/sandbox/gondolin-fleet.js +330 -0
- package/dist/sandbox/gondolin-fleet.js.map +1 -0
- package/dist/sandbox/gondolin-gateway.d.ts +86 -0
- package/dist/sandbox/gondolin-gateway.d.ts.map +1 -0
- package/dist/sandbox/gondolin-gateway.js +407 -0
- package/dist/sandbox/gondolin-gateway.js.map +1 -0
- package/dist/sandbox/gondolin-inventory.d.ts +75 -0
- package/dist/sandbox/gondolin-inventory.d.ts.map +1 -0
- package/dist/sandbox/gondolin-inventory.js +257 -0
- package/dist/sandbox/gondolin-inventory.js.map +1 -0
- package/dist/sandbox/gondolin-join.d.ts +62 -0
- package/dist/sandbox/gondolin-join.d.ts.map +1 -0
- package/dist/sandbox/gondolin-join.js +261 -0
- package/dist/sandbox/gondolin-join.js.map +1 -0
- package/dist/sandbox/gondolin-nfs-advisory.d.ts +15 -0
- package/dist/sandbox/gondolin-nfs-advisory.d.ts.map +1 -0
- package/dist/sandbox/gondolin-nfs-advisory.js +60 -0
- package/dist/sandbox/gondolin-nfs-advisory.js.map +1 -0
- package/dist/sandbox/gondolin-placement.d.ts +30 -0
- package/dist/sandbox/gondolin-placement.d.ts.map +1 -0
- package/dist/sandbox/gondolin-placement.js +77 -0
- package/dist/sandbox/gondolin-placement.js.map +1 -0
- package/dist/sandbox/gondolin-recovery.d.ts +33 -0
- package/dist/sandbox/gondolin-recovery.d.ts.map +1 -0
- package/dist/sandbox/gondolin-recovery.js +39 -0
- package/dist/sandbox/gondolin-recovery.js.map +1 -0
- package/dist/sandbox/gondolin-remote.d.ts +70 -0
- package/dist/sandbox/gondolin-remote.d.ts.map +1 -0
- package/dist/sandbox/gondolin-remote.js +325 -0
- package/dist/sandbox/gondolin-remote.js.map +1 -0
- package/dist/sandbox/gondolin-worker-client.d.ts +135 -0
- package/dist/sandbox/gondolin-worker-client.d.ts.map +1 -0
- package/dist/sandbox/gondolin-worker-client.js +323 -0
- package/dist/sandbox/gondolin-worker-client.js.map +1 -0
- package/dist/sandbox/gondolin-worker-main.d.ts +2 -0
- package/dist/sandbox/gondolin-worker-main.d.ts.map +1 -0
- package/dist/sandbox/gondolin-worker-main.js +22 -0
- package/dist/sandbox/gondolin-worker-main.js.map +1 -0
- package/dist/sandbox/gondolin-worker.d.ts +17 -0
- package/dist/sandbox/gondolin-worker.d.ts.map +1 -0
- package/dist/sandbox/gondolin-worker.js +201 -0
- package/dist/sandbox/gondolin-worker.js.map +1 -0
- package/dist/sandbox/gondolin.d.ts +53 -0
- package/dist/sandbox/gondolin.d.ts.map +1 -0
- package/dist/sandbox/gondolin.js +429 -0
- package/dist/sandbox/gondolin.js.map +1 -0
- package/dist/sandbox/host.d.ts +3 -0
- package/dist/sandbox/host.d.ts.map +1 -1
- package/dist/sandbox/host.js +14 -0
- package/dist/sandbox/host.js.map +1 -1
- package/dist/sandbox/identity.d.ts +21 -0
- package/dist/sandbox/identity.d.ts.map +1 -0
- package/dist/sandbox/identity.js +36 -0
- package/dist/sandbox/identity.js.map +1 -0
- package/dist/sandbox/index.d.ts +13 -4
- package/dist/sandbox/index.d.ts.map +1 -1
- package/dist/sandbox/index.js +19 -3
- package/dist/sandbox/index.js.map +1 -1
- package/dist/sandbox/types.d.ts +31 -1
- package/dist/sandbox/types.d.ts.map +1 -1
- package/dist/sandbox/types.js.map +1 -1
- package/dist/sandbox/utils.d.ts +12 -0
- package/dist/sandbox/utils.d.ts.map +1 -1
- package/dist/sandbox/utils.js +38 -0
- package/dist/sandbox/utils.js.map +1 -1
- package/dist/sessions/chat-history-sync.d.ts +32 -0
- package/dist/sessions/chat-history-sync.d.ts.map +1 -0
- package/dist/sessions/{agent-memory-file-manager.js → chat-history-sync.js} +40 -113
- package/dist/sessions/chat-history-sync.js.map +1 -0
- package/dist/sessions/conversation-log.d.ts +13 -0
- package/dist/sessions/conversation-log.d.ts.map +1 -0
- package/dist/sessions/conversation-log.js +47 -0
- package/dist/sessions/conversation-log.js.map +1 -0
- package/dist/sessions/history-line.d.ts +20 -0
- package/dist/sessions/history-line.d.ts.map +1 -0
- package/dist/sessions/history-line.js +24 -0
- package/dist/sessions/history-line.js.map +1 -0
- package/dist/sessions/policy.d.ts.map +1 -1
- package/dist/sessions/policy.js +5 -3
- package/dist/sessions/policy.js.map +1 -1
- package/dist/sessions/rotation.d.ts +2 -0
- package/dist/sessions/rotation.d.ts.map +1 -0
- package/dist/sessions/rotation.js +39 -0
- package/dist/sessions/rotation.js.map +1 -0
- package/dist/sessions/session-key.d.ts +31 -0
- package/dist/sessions/session-key.d.ts.map +1 -0
- package/dist/sessions/session-key.js +44 -0
- package/dist/sessions/session-key.js.map +1 -0
- package/dist/sessions/store.d.ts.map +1 -1
- package/dist/sessions/store.js +6 -12
- package/dist/sessions/store.js.map +1 -1
- package/dist/sessions/types.d.ts +2 -2
- package/dist/sessions/types.d.ts.map +1 -1
- package/dist/sessions/types.js.map +1 -1
- package/dist/settings-mutation.d.ts +23 -0
- package/dist/settings-mutation.d.ts.map +1 -0
- package/dist/settings-mutation.js +42 -0
- package/dist/settings-mutation.js.map +1 -0
- package/dist/tools/bash.d.ts +3 -1
- package/dist/tools/bash.d.ts.map +1 -1
- package/dist/tools/bash.js +24 -17
- package/dist/tools/bash.js.map +1 -1
- package/dist/tools/edit.d.ts.map +1 -1
- package/dist/tools/edit.js +9 -12
- package/dist/tools/edit.js.map +1 -1
- package/dist/tools/event.d.ts +1 -1
- package/dist/tools/event.d.ts.map +1 -1
- package/dist/tools/event.js +53 -43
- package/dist/tools/event.js.map +1 -1
- package/dist/tools/generate-image.d.ts +17 -0
- package/dist/tools/generate-image.d.ts.map +1 -0
- package/dist/tools/generate-image.js +63 -0
- package/dist/tools/generate-image.js.map +1 -0
- package/dist/tools/host-fn-tool.d.ts +21 -0
- package/dist/tools/host-fn-tool.d.ts.map +1 -0
- package/dist/tools/host-fn-tool.js +32 -0
- package/dist/tools/host-fn-tool.js.map +1 -0
- package/dist/tools/index.d.ts +17 -2
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +28 -3
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/react.d.ts +15 -0
- package/dist/tools/react.d.ts.map +1 -0
- package/dist/tools/react.js +29 -0
- package/dist/tools/react.js.map +1 -0
- package/dist/tools/read.d.ts.map +1 -1
- package/dist/tools/read.js +7 -26
- package/dist/tools/read.js.map +1 -1
- package/dist/tools/sandbox.d.ts +2 -2
- package/dist/tools/sandbox.d.ts.map +1 -1
- package/dist/tools/sandbox.js +13 -9
- package/dist/tools/sandbox.js.map +1 -1
- package/dist/tools/subagent-slots.d.ts +28 -0
- package/dist/tools/subagent-slots.d.ts.map +1 -0
- package/dist/tools/subagent-slots.js +57 -0
- package/dist/tools/subagent-slots.js.map +1 -0
- package/dist/tools/subagent.d.ts +74 -0
- package/dist/tools/subagent.d.ts.map +1 -0
- package/dist/tools/subagent.js +335 -0
- package/dist/tools/subagent.js.map +1 -0
- package/dist/tools/types.d.ts +40 -6
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/tools/types.js.map +1 -1
- package/dist/tools/write.d.ts.map +1 -1
- package/dist/tools/write.js +1 -8
- package/dist/tools/write.js.map +1 -1
- package/dist/trigger.d.ts.map +1 -1
- package/dist/trigger.js +1 -2
- package/dist/trigger.js.map +1 -1
- package/dist/types.d.ts +144 -31
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/date.d.ts +1 -1
- package/dist/utils/date.js +1 -1
- package/dist/utils/date.js.map +1 -1
- package/dist/vault/disabled.d.ts +9 -0
- package/dist/vault/disabled.d.ts.map +1 -0
- package/dist/vault/disabled.js +22 -0
- package/dist/vault/disabled.js.map +1 -0
- package/dist/vault/index.d.ts +0 -2
- package/dist/vault/index.d.ts.map +1 -1
- package/dist/vault/index.js +1 -32
- package/dist/vault/index.js.map +1 -1
- package/dist/vault/injection.d.ts +20 -0
- package/dist/vault/injection.d.ts.map +1 -0
- package/dist/vault/injection.js +27 -0
- package/dist/vault/injection.js.map +1 -0
- package/dist/vault/policy.d.ts +20 -0
- package/dist/vault/policy.d.ts.map +1 -0
- package/dist/vault/policy.js +20 -0
- package/dist/vault/policy.js.map +1 -0
- package/dist/vault/types.d.ts +0 -2
- package/dist/vault/types.d.ts.map +1 -1
- package/dist/vault/types.js.map +1 -1
- package/dist/web/admin/portal.d.ts +27 -0
- package/dist/web/admin/portal.d.ts.map +1 -1
- package/dist/web/admin/portal.js +117 -154
- package/dist/web/admin/portal.js.map +1 -1
- package/dist/web/admin/types.d.ts +6 -0
- package/dist/web/admin/types.d.ts.map +1 -1
- package/dist/web/admin/types.js.map +1 -1
- package/dist/web/agent-events/portal.d.ts.map +1 -1
- package/dist/web/agent-events/portal.js +2 -1
- package/dist/web/agent-events/portal.js.map +1 -1
- package/dist/web/login/oauth.d.ts +2 -3
- package/dist/web/login/oauth.d.ts.map +1 -1
- package/dist/web/login/oauth.js +0 -31
- package/dist/web/login/oauth.js.map +1 -1
- package/dist/web/login/portal.js +1 -1
- package/dist/web/login/portal.js.map +1 -1
- package/dist/web/login/types.d.ts +0 -11
- package/dist/web/login/types.d.ts.map +1 -1
- package/dist/web/login/types.js.map +1 -1
- package/dist/web/portal-shell.d.ts +4 -0
- package/dist/web/portal-shell.d.ts.map +1 -0
- package/dist/{portal-shell.js → web/portal-shell.js} +2 -2
- package/dist/web/portal-shell.js.map +1 -0
- package/dist/web/server.d.ts.map +1 -1
- package/dist/web/server.js +7 -0
- package/dist/web/server.js.map +1 -1
- package/dist/web/session-view/command.d.ts.map +1 -1
- package/dist/web/session-view/command.js +4 -1
- package/dist/web/session-view/command.js.map +1 -1
- package/dist/web/session-view/portal.d.ts.map +1 -1
- package/dist/web/session-view/portal.js +4 -3
- package/dist/web/session-view/portal.js.map +1 -1
- package/dist/web/session-view/service.d.ts.map +1 -1
- package/dist/web/session-view/service.js +2 -1
- package/dist/web/session-view/service.js.map +1 -1
- package/dist/web/session-view/types.d.ts +2 -1
- package/dist/web/session-view/types.d.ts.map +1 -1
- package/dist/web/session-view/types.js.map +1 -1
- package/package.json +7 -4
- package/dist/download.d.ts.map +0 -1
- package/dist/download.js.map +0 -1
- package/dist/model-registry.d.ts +0 -4
- package/dist/model-registry.d.ts.map +0 -1
- package/dist/model-registry.js +0 -7
- package/dist/model-registry.js.map +0 -1
- package/dist/portal-shell.d.ts +0 -4
- package/dist/portal-shell.d.ts.map +0 -1
- package/dist/portal-shell.js.map +0 -1
- package/dist/runtime/agent-run-controller.d.ts +0 -31
- package/dist/runtime/agent-run-controller.d.ts.map +0 -1
- package/dist/runtime/agent-run-controller.js +0 -195
- package/dist/runtime/agent-run-controller.js.map +0 -1
- package/dist/sessions/agent-memory-file-manager.d.ts +0 -19
- package/dist/sessions/agent-memory-file-manager.d.ts.map +0 -1
- package/dist/sessions/agent-memory-file-manager.js.map +0 -1
- package/dist/vault/routing.d.ts +0 -3
- package/dist/vault/routing.d.ts.map +0 -1
- package/dist/vault/routing.js +0 -13
- package/dist/vault/routing.js.map +0 -1
- /package/dist/{download.d.ts → cli/download.d.ts} +0 -0
- /package/dist/{download.js → cli/download.js} +0 -0
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
import { readFileSync, statSync } from "node:fs";
|
|
2
|
+
import { request as httpsRequest } from "node:https";
|
|
3
|
+
import { relative, isAbsolute, join } from "node:path";
|
|
4
|
+
import * as log from "../log.js";
|
|
5
|
+
import { SandboxError } from "./errors.js";
|
|
6
|
+
import { createSessionFrameParser, encodeSessionMessage, } from "./gondolin-contract.js";
|
|
7
|
+
import { GondolinRuntimeGoneError, isLeaseFencedStatus } from "./gondolin-recovery.js";
|
|
8
|
+
import { execOverSessionConnect, } from "./gondolin-worker-client.js";
|
|
9
|
+
const LEASE_TTL_SECONDS = 300;
|
|
10
|
+
const REQUEST_TIMEOUT_MS = 15_000;
|
|
11
|
+
/** VM boot happens inside this request; the daemon's own handshake cap is 2 min. */
|
|
12
|
+
const ENSURE_TIMEOUT_MS = 150_000;
|
|
13
|
+
/** A request that never reached the daemon (network/TLS/timeout failure). */
|
|
14
|
+
export class GondolinWorkerUnreachableError extends Error {
|
|
15
|
+
}
|
|
16
|
+
// The framing lives with the rest of the wire contract; re-exported here for
|
|
17
|
+
// existing importers.
|
|
18
|
+
export { createSessionFrameParser, encodeSessionMessage };
|
|
19
|
+
/**
|
|
20
|
+
* One mikan-worker daemon as seen from mikan: mTLS requests, per-instance
|
|
21
|
+
* fenced leases with heartbeat renewal, and per-command upgraded tunnels.
|
|
22
|
+
* Commands travel through one tunnel each, so abort semantics match the local
|
|
23
|
+
* transport exactly.
|
|
24
|
+
*/
|
|
25
|
+
export class GondolinRemoteConnection {
|
|
26
|
+
constructor(settings, overrides = {}) {
|
|
27
|
+
this.settings = settings;
|
|
28
|
+
this.overrides = overrides;
|
|
29
|
+
this.leases = new Map();
|
|
30
|
+
this.leaseTtlSeconds = overrides.leaseTtlSeconds ?? LEASE_TTL_SECONDS;
|
|
31
|
+
this.requestTimeoutMs = overrides.requestTimeoutMs ?? REQUEST_TIMEOUT_MS;
|
|
32
|
+
}
|
|
33
|
+
/** Drop lease timers and caches (does not touch the daemon). */
|
|
34
|
+
dispose() {
|
|
35
|
+
for (const lease of this.leases.values())
|
|
36
|
+
clearInterval(lease.renewTimer);
|
|
37
|
+
this.leases.clear();
|
|
38
|
+
}
|
|
39
|
+
async health() {
|
|
40
|
+
const response = await this.request("GET", "/v1/health");
|
|
41
|
+
if (response.status !== 200) {
|
|
42
|
+
throw new SandboxError(`Error: gondolin remote worker health check failed (${response.status})`);
|
|
43
|
+
}
|
|
44
|
+
return response.json;
|
|
45
|
+
}
|
|
46
|
+
async ensure(instanceId, spec) {
|
|
47
|
+
const { mounts, credentialFiles } = this.translateMounts(spec);
|
|
48
|
+
const body = {
|
|
49
|
+
instanceId,
|
|
50
|
+
imageSelector: spec.image,
|
|
51
|
+
mounts,
|
|
52
|
+
credentialFiles,
|
|
53
|
+
cpus: spec.cpus ?? "",
|
|
54
|
+
memory: spec.memory ?? "",
|
|
55
|
+
fingerprint: spec.fingerprint,
|
|
56
|
+
};
|
|
57
|
+
const idempotencyKey = `${instanceId}:${spec.fingerprint}:${Date.now()}`;
|
|
58
|
+
for (let attempt = 0;; attempt += 1) {
|
|
59
|
+
const lease = await this.leaseFor(instanceId);
|
|
60
|
+
const response = await this.request("POST", "/v1/runtimes", body, { ...this.leaseHeaders(lease), "Idempotency-Key": idempotencyKey }, ENSURE_TIMEOUT_MS);
|
|
61
|
+
if (response.status === 200) {
|
|
62
|
+
const runtime = response.json;
|
|
63
|
+
return {
|
|
64
|
+
sessionId: runtime.sessionId ?? "",
|
|
65
|
+
instanceId,
|
|
66
|
+
workerPid: runtime.workerPid ?? 0,
|
|
67
|
+
fingerprint: spec.fingerprint,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
if (isLeaseFencedStatus(response.status) && attempt === 0) {
|
|
71
|
+
this.dropLease(instanceId);
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
throw new SandboxError(`Error: remote worker refused runtime (${response.status}): ${String(response.json.message ?? "")}`);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
async stop(handle) {
|
|
78
|
+
const lease = await this.leaseFor(handle.instanceId);
|
|
79
|
+
const response = await this.request("DELETE", `/v1/runtimes/${handle.sessionId}`, undefined, this.leaseHeaders(lease));
|
|
80
|
+
if (isLeaseFencedStatus(response.status)) {
|
|
81
|
+
this.dropLease(handle.instanceId);
|
|
82
|
+
}
|
|
83
|
+
this.releaseLease(handle.instanceId);
|
|
84
|
+
}
|
|
85
|
+
async isRuntimeAlive(handle) {
|
|
86
|
+
try {
|
|
87
|
+
const response = await this.request("GET", `/v1/runtimes/${handle.sessionId}`);
|
|
88
|
+
return response.status === 200;
|
|
89
|
+
}
|
|
90
|
+
catch {
|
|
91
|
+
return false;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
/** Live runtimes hosted by this worker (fleet reconciliation). */
|
|
95
|
+
async listRuntimes() {
|
|
96
|
+
const response = await this.request("GET", "/v1/runtimes");
|
|
97
|
+
if (response.status !== 200)
|
|
98
|
+
return [];
|
|
99
|
+
const runtimes = response.json.runtimes;
|
|
100
|
+
return Array.isArray(runtimes)
|
|
101
|
+
? runtimes
|
|
102
|
+
: [];
|
|
103
|
+
}
|
|
104
|
+
async exec(handle, command, options = {}) {
|
|
105
|
+
const lease = this.leases.get(handle.instanceId);
|
|
106
|
+
if (!lease) {
|
|
107
|
+
// the lease lapsed (e.g. mikan slept); recreate the session cleanly
|
|
108
|
+
throw new GondolinRuntimeGoneError("no live lease for this runtime");
|
|
109
|
+
}
|
|
110
|
+
return execOverSessionConnect((callbacks) => this.openTunnel(handle.instanceId, `/v1/runtimes/${handle.sessionId}/session`, this.leaseHeaders(lease), callbacks), command, options);
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Split mounts for the remote worker:
|
|
114
|
+
* - sources under the mikan-host workspace are translated to the worker's
|
|
115
|
+
* shared `workspaceRoot` (shared POSIX storage), and
|
|
116
|
+
* - sources outside it that are files (vault credentials, which live in the
|
|
117
|
+
* host state dir, not the shared workspace) are read and shipped as
|
|
118
|
+
* content payloads for the worker to project into the guest.
|
|
119
|
+
* A non-file source outside the workspace has nowhere to go and is dropped.
|
|
120
|
+
*/
|
|
121
|
+
translateMounts(spec) {
|
|
122
|
+
const root = this.settings.workspaceRoot;
|
|
123
|
+
if (!root || !spec.workspacePath) {
|
|
124
|
+
return { mounts: spec.mounts, credentialFiles: [] };
|
|
125
|
+
}
|
|
126
|
+
const mounts = [];
|
|
127
|
+
const credentialFiles = [];
|
|
128
|
+
for (const mount of spec.mounts) {
|
|
129
|
+
const suffix = relative(spec.workspacePath, mount.source);
|
|
130
|
+
if (!suffix.startsWith("..") && !isAbsolute(suffix)) {
|
|
131
|
+
mounts.push({ source: join(root, suffix), target: mount.target });
|
|
132
|
+
continue;
|
|
133
|
+
}
|
|
134
|
+
try {
|
|
135
|
+
if (!statSync(mount.source).isFile()) {
|
|
136
|
+
log.logWarning(`Skipping directory mount outside the shared workspace for remote runtime: ${mount.source}`);
|
|
137
|
+
continue;
|
|
138
|
+
}
|
|
139
|
+
credentialFiles.push({
|
|
140
|
+
target: mount.target,
|
|
141
|
+
contentBase64: readFileSync(mount.source).toString("base64"),
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
catch {
|
|
145
|
+
// missing source: skip, matching the local worker's behavior
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
return { mounts, credentialFiles };
|
|
149
|
+
}
|
|
150
|
+
async leaseFor(instanceId) {
|
|
151
|
+
const cached = this.leases.get(instanceId);
|
|
152
|
+
if (cached)
|
|
153
|
+
return cached;
|
|
154
|
+
const response = await this.request("POST", "/v1/leases", {
|
|
155
|
+
instanceId,
|
|
156
|
+
ttlSeconds: this.leaseTtlSeconds,
|
|
157
|
+
});
|
|
158
|
+
if (response.status !== 200) {
|
|
159
|
+
throw new SandboxError(`Error: remote worker refused lease (${response.status}): ${String(response.json.message ?? "")}`);
|
|
160
|
+
}
|
|
161
|
+
const lease = {
|
|
162
|
+
leaseId: response.json.id,
|
|
163
|
+
epoch: response.json.epoch,
|
|
164
|
+
renewTimer: setInterval(() => void this.renew(instanceId), (this.leaseTtlSeconds * 1000) / 3),
|
|
165
|
+
};
|
|
166
|
+
lease.renewTimer.unref?.();
|
|
167
|
+
this.leases.set(instanceId, lease);
|
|
168
|
+
this.reportLeaseActivity(instanceId);
|
|
169
|
+
return lease;
|
|
170
|
+
}
|
|
171
|
+
async renew(instanceId) {
|
|
172
|
+
const lease = this.leases.get(instanceId);
|
|
173
|
+
if (!lease)
|
|
174
|
+
return;
|
|
175
|
+
try {
|
|
176
|
+
const response = await this.request("POST", `/v1/leases/${lease.leaseId}/renew`, {
|
|
177
|
+
ttlSeconds: this.leaseTtlSeconds,
|
|
178
|
+
});
|
|
179
|
+
if (response.status === 200)
|
|
180
|
+
this.reportLeaseActivity(instanceId);
|
|
181
|
+
else
|
|
182
|
+
this.dropLease(instanceId);
|
|
183
|
+
}
|
|
184
|
+
catch (err) {
|
|
185
|
+
log.logWarning(`Failed to renew remote worker lease for '${instanceId}'`, err instanceof Error ? err.message : String(err));
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
reportLeaseActivity(instanceId) {
|
|
189
|
+
// fencing watermark by mikan's own clock: the worker-side lease cannot
|
|
190
|
+
// outlive this moment plus its ttl, no matter whose clock is skewed
|
|
191
|
+
this.overrides.onLeaseActivity?.(instanceId, Date.now() + this.leaseTtlSeconds * 1000);
|
|
192
|
+
}
|
|
193
|
+
releaseLease(instanceId) {
|
|
194
|
+
const lease = this.leases.get(instanceId);
|
|
195
|
+
if (!lease)
|
|
196
|
+
return;
|
|
197
|
+
this.dropLease(instanceId);
|
|
198
|
+
void this.request("DELETE", `/v1/leases/${lease.leaseId}`).catch(() => { });
|
|
199
|
+
}
|
|
200
|
+
dropLease(instanceId) {
|
|
201
|
+
const lease = this.leases.get(instanceId);
|
|
202
|
+
if (!lease)
|
|
203
|
+
return;
|
|
204
|
+
clearInterval(lease.renewTimer);
|
|
205
|
+
this.leases.delete(instanceId);
|
|
206
|
+
}
|
|
207
|
+
leaseHeaders(lease) {
|
|
208
|
+
return { "X-Mikan-Lease": lease.leaseId, "X-Mikan-Epoch": String(lease.epoch) };
|
|
209
|
+
}
|
|
210
|
+
request(method, path, body, headers, timeoutMs = this.requestTimeoutMs) {
|
|
211
|
+
if (this.overrides.request)
|
|
212
|
+
return this.overrides.request(method, path, body, headers);
|
|
213
|
+
const url = new URL(path, this.settings.url);
|
|
214
|
+
const payload = body === undefined ? undefined : Buffer.from(JSON.stringify(body));
|
|
215
|
+
return new Promise((resolve, reject) => {
|
|
216
|
+
const request = httpsRequest({
|
|
217
|
+
method,
|
|
218
|
+
host: url.hostname,
|
|
219
|
+
port: url.port,
|
|
220
|
+
path: url.pathname + url.search,
|
|
221
|
+
signal: AbortSignal.timeout(timeoutMs),
|
|
222
|
+
headers: {
|
|
223
|
+
...(payload
|
|
224
|
+
? { "Content-Type": "application/json", "Content-Length": payload.length }
|
|
225
|
+
: {}),
|
|
226
|
+
...headers,
|
|
227
|
+
},
|
|
228
|
+
...this.tlsOptions(),
|
|
229
|
+
}, (response) => {
|
|
230
|
+
let raw = "";
|
|
231
|
+
response.setEncoding("utf8");
|
|
232
|
+
response.on("data", (chunk) => {
|
|
233
|
+
raw += chunk;
|
|
234
|
+
});
|
|
235
|
+
response.on("end", () => {
|
|
236
|
+
let json = {};
|
|
237
|
+
try {
|
|
238
|
+
json = raw ? JSON.parse(raw) : {};
|
|
239
|
+
}
|
|
240
|
+
catch {
|
|
241
|
+
// non-JSON body; status carries the outcome
|
|
242
|
+
}
|
|
243
|
+
resolve({ status: response.statusCode ?? 0, json });
|
|
244
|
+
});
|
|
245
|
+
});
|
|
246
|
+
request.on("error", (error) => reject(new GondolinWorkerUnreachableError(error.message)));
|
|
247
|
+
if (payload)
|
|
248
|
+
request.write(payload);
|
|
249
|
+
request.end();
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
openTunnel(instanceId, path, headers, callbacks) {
|
|
253
|
+
if (this.overrides.tunnel)
|
|
254
|
+
return this.overrides.tunnel(path, headers, callbacks);
|
|
255
|
+
const url = new URL(path, this.settings.url);
|
|
256
|
+
return new Promise((resolve, reject) => {
|
|
257
|
+
const request = httpsRequest({
|
|
258
|
+
method: "GET",
|
|
259
|
+
host: url.hostname,
|
|
260
|
+
port: url.port,
|
|
261
|
+
path: url.pathname,
|
|
262
|
+
signal: AbortSignal.timeout(this.requestTimeoutMs),
|
|
263
|
+
headers: { ...headers, Connection: "Upgrade", Upgrade: "gondolin-session" },
|
|
264
|
+
...this.tlsOptions(),
|
|
265
|
+
});
|
|
266
|
+
request.on("upgrade", (_response, socket) => {
|
|
267
|
+
socket.setNoDelay(true);
|
|
268
|
+
let closed = false;
|
|
269
|
+
const parse = createSessionFrameParser(callbacks);
|
|
270
|
+
socket.on("data", parse);
|
|
271
|
+
socket.on("error", (error) => {
|
|
272
|
+
if (closed)
|
|
273
|
+
return;
|
|
274
|
+
closed = true;
|
|
275
|
+
callbacks.onClose(error);
|
|
276
|
+
});
|
|
277
|
+
socket.on("close", () => {
|
|
278
|
+
if (closed)
|
|
279
|
+
return;
|
|
280
|
+
closed = true;
|
|
281
|
+
callbacks.onClose();
|
|
282
|
+
});
|
|
283
|
+
resolve({
|
|
284
|
+
send: (message) => {
|
|
285
|
+
if (!closed)
|
|
286
|
+
socket.write(encodeSessionMessage(message));
|
|
287
|
+
},
|
|
288
|
+
close: () => {
|
|
289
|
+
if (closed)
|
|
290
|
+
return;
|
|
291
|
+
closed = true;
|
|
292
|
+
socket.destroy();
|
|
293
|
+
},
|
|
294
|
+
});
|
|
295
|
+
});
|
|
296
|
+
request.on("response", (response) => {
|
|
297
|
+
if (isLeaseFencedStatus(response.statusCode)) {
|
|
298
|
+
this.dropLease(instanceId);
|
|
299
|
+
}
|
|
300
|
+
const error = new Error(`tunnel refused: HTTP ${response.statusCode}`);
|
|
301
|
+
error.code = "ECONNREFUSED"; // nothing executed — safe to recreate and retry
|
|
302
|
+
reject(error);
|
|
303
|
+
});
|
|
304
|
+
request.on("error", (error) => {
|
|
305
|
+
error.code ??= "ECONNREFUSED";
|
|
306
|
+
reject(error);
|
|
307
|
+
});
|
|
308
|
+
request.end();
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
tlsOptions() {
|
|
312
|
+
if (this.tls)
|
|
313
|
+
return this.tls;
|
|
314
|
+
if (!this.settings.certFile || !this.settings.keyFile) {
|
|
315
|
+
throw new SandboxError(`Error: gondolin remote worker '${this.settings.name ?? this.settings.url}' needs certFile and keyFile`);
|
|
316
|
+
}
|
|
317
|
+
this.tls = {
|
|
318
|
+
...(this.settings.caFile ? { ca: readFileSync(this.settings.caFile) } : {}),
|
|
319
|
+
cert: readFileSync(this.settings.certFile),
|
|
320
|
+
key: readFileSync(this.settings.keyFile),
|
|
321
|
+
};
|
|
322
|
+
return this.tls;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
//# sourceMappingURL=gondolin-remote.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gondolin-remote.js","sourceRoot":"","sources":["../../src/sandbox/gondolin-remote.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,KAAK,GAAG,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EACL,wBAAwB,EACxB,oBAAoB,GAIrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AACvF,OAAO,EACL,sBAAsB,GAKvB,MAAM,6BAA6B,CAAC;AAGrC,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAC9B,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAClC,oFAAoF;AACpF,MAAM,iBAAiB,GAAG,OAAO,CAAC;AAalC,6EAA6E;AAC7E,MAAM,OAAO,8BAA+B,SAAQ,KAAK;CAAG;AAoB5D,6EAA6E;AAC7E,sBAAsB;AACtB,OAAO,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,CAAC;AAE1D;;;;;GAKG;AACH,MAAM,OAAO,wBAAwB;IAMnC,YACmB,QAAsC,EACtC,SAAS,GA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AC,GAAG,CAAC;QAC9B,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;YACtD,MAAM,IAAI,YAAY,CACpB,kCAAkC,IAAI,CAAC,QAAQ,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,8BAA8B,CACxG,CAAC;QACJ,CAAC;QACD,IAAI,CAAC,GAAG,GAAG;YACT,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC3E,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;YAC1C,GAAG,EAAE,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;SACzC,CAAC;QACF,OAAO,IAAI,CAAC,GAAG,CAAC;IAClB,CAAC;CACF","sourcesContent":["import { readFileSync, statSync } from \"node:fs\";\nimport { request as httpsRequest } from \"node:https\";\nimport { relative, isAbsolute, join } from \"node:path\";\nimport * as log from \"../log.js\";\nimport type { GondolinRemoteWorkerSettings } from \"../types.js\";\nimport { SandboxError } from \"./errors.js\";\nimport {\n createSessionFrameParser,\n encodeSessionMessage,\n type GondolinCredentialFile,\n type GondolinEnsureRuntimeRequest,\n type GondolinRemoteRuntime,\n} from \"./gondolin-contract.js\";\nimport { GondolinRuntimeGoneError, isLeaseFencedStatus } from \"./gondolin-recovery.js\";\nimport {\n execOverSessionConnect,\n type GondolinRuntimeHandle,\n type GondolinRuntimeSpec,\n type SessionClient,\n type SessionClientCallbacks,\n} from \"./gondolin-worker-client.js\";\nimport type { ExecResult } from \"./types.js\";\n\nconst LEASE_TTL_SECONDS = 300;\nconst REQUEST_TIMEOUT_MS = 15_000;\n/** VM boot happens inside this request; the daemon's own handshake cap is 2 min. */\nconst ENSURE_TIMEOUT_MS = 150_000;\n\ninterface RemoteLease {\n leaseId: string;\n epoch: number;\n renewTimer: NodeJS.Timeout;\n}\n\ninterface RemoteResponse {\n status: number;\n json: Record<string, unknown>;\n}\n\n/** A request that never reached the daemon (network/TLS/timeout failure). */\nexport class GondolinWorkerUnreachableError extends Error {}\n\nexport interface GondolinRemoteOverrides {\n request?: (\n method: string,\n path: string,\n body?: object,\n headers?: Record<string, string>,\n ) => Promise<RemoteResponse>;\n tunnel?: (\n path: string,\n headers: Record<string, string>,\n callbacks: SessionClientCallbacks,\n ) => SessionClient | Promise<SessionClient>;\n leaseTtlSeconds?: number;\n requestTimeoutMs?: number;\n /** Reports lease grants/renewals so the fleet can persist fencing watermarks. */\n onLeaseActivity?: (instanceId: string, expiresAtMs: number) => void;\n}\n\n// The framing lives with the rest of the wire contract; re-exported here for\n// existing importers.\nexport { createSessionFrameParser, encodeSessionMessage };\n\n/**\n * One mikan-worker daemon as seen from mikan: mTLS requests, per-instance\n * fenced leases with heartbeat renewal, and per-command upgraded tunnels.\n * Commands travel through one tunnel each, so abort semantics match the local\n * transport exactly.\n */\nexport class GondolinRemoteConnection {\n private readonly leases = new Map<string, RemoteLease>();\n private readonly leaseTtlSeconds: number;\n private readonly requestTimeoutMs: number;\n private tls?: { ca?: Buffer; cert: Buffer; key: Buffer };\n\n constructor(\n private readonly settings: GondolinRemoteWorkerSettings,\n private readonly overrides: GondolinRemoteOverrides = {},\n ) {\n this.leaseTtlSeconds = overrides.leaseTtlSeconds ?? LEASE_TTL_SECONDS;\n this.requestTimeoutMs = overrides.requestTimeoutMs ?? REQUEST_TIMEOUT_MS;\n }\n\n /** Drop lease timers and caches (does not touch the daemon). */\n dispose(): void {\n for (const lease of this.leases.values()) clearInterval(lease.renewTimer);\n this.leases.clear();\n }\n\n async health(): Promise<Record<string, unknown>> {\n const response = await this.request(\"GET\", \"/v1/health\");\n if (response.status !== 200) {\n throw new SandboxError(\n `Error: gondolin remote worker health check failed (${response.status})`,\n );\n }\n return response.json;\n }\n\n async ensure(instanceId: string, spec: GondolinRuntimeSpec): Promise<GondolinRuntimeHandle> {\n const { mounts, credentialFiles } = this.translateMounts(spec);\n const body: GondolinEnsureRuntimeRequest = {\n instanceId,\n imageSelector: spec.image,\n mounts,\n credentialFiles,\n cpus: spec.cpus ?? \"\",\n memory: spec.memory ?? \"\",\n fingerprint: spec.fingerprint,\n };\n const idempotencyKey = `${instanceId}:${spec.fingerprint}:${Date.now()}`;\n for (let attempt = 0; ; attempt += 1) {\n const lease = await this.leaseFor(instanceId);\n const response = await this.request(\n \"POST\",\n \"/v1/runtimes\",\n body,\n { ...this.leaseHeaders(lease), \"Idempotency-Key\": idempotencyKey },\n ENSURE_TIMEOUT_MS,\n );\n if (response.status === 200) {\n const runtime = response.json as Partial<GondolinRemoteRuntime>;\n return {\n sessionId: runtime.sessionId ?? \"\",\n instanceId,\n workerPid: runtime.workerPid ?? 0,\n fingerprint: spec.fingerprint,\n };\n }\n if (isLeaseFencedStatus(response.status) && attempt === 0) {\n this.dropLease(instanceId);\n continue;\n }\n throw new SandboxError(\n `Error: remote worker refused runtime (${response.status}): ${String(response.json.message ?? \"\")}`,\n );\n }\n }\n\n async stop(\n handle: Pick<GondolinRuntimeHandle, \"workerPid\" | \"sessionId\" | \"instanceId\">,\n ): Promise<void> {\n const lease = await this.leaseFor(handle.instanceId);\n const response = await this.request(\n \"DELETE\",\n `/v1/runtimes/${handle.sessionId}`,\n undefined,\n this.leaseHeaders(lease),\n );\n if (isLeaseFencedStatus(response.status)) {\n this.dropLease(handle.instanceId);\n }\n this.releaseLease(handle.instanceId);\n }\n\n async isRuntimeAlive(handle: GondolinRuntimeHandle): Promise<boolean> {\n try {\n const response = await this.request(\"GET\", `/v1/runtimes/${handle.sessionId}`);\n return response.status === 200;\n } catch {\n return false;\n }\n }\n\n /** Live runtimes hosted by this worker (fleet reconciliation). */\n async listRuntimes(): Promise<Array<{ sessionId: string; instanceId: string }>> {\n const response = await this.request(\"GET\", \"/v1/runtimes\");\n if (response.status !== 200) return [];\n const runtimes = response.json.runtimes;\n return Array.isArray(runtimes)\n ? (runtimes as Array<{ sessionId: string; instanceId: string }>)\n : [];\n }\n\n async exec(\n handle: GondolinRuntimeHandle,\n command: string,\n options: { env?: Record<string, string>; signal?: AbortSignal } = {},\n ): Promise<ExecResult> {\n const lease = this.leases.get(handle.instanceId);\n if (!lease) {\n // the lease lapsed (e.g. mikan slept); recreate the session cleanly\n throw new GondolinRuntimeGoneError(\"no live lease for this runtime\");\n }\n return execOverSessionConnect(\n (callbacks) =>\n this.openTunnel(\n handle.instanceId,\n `/v1/runtimes/${handle.sessionId}/session`,\n this.leaseHeaders(lease),\n callbacks,\n ),\n command,\n options,\n );\n }\n\n /**\n * Split mounts for the remote worker:\n * - sources under the mikan-host workspace are translated to the worker's\n * shared `workspaceRoot` (shared POSIX storage), and\n * - sources outside it that are files (vault credentials, which live in the\n * host state dir, not the shared workspace) are read and shipped as\n * content payloads for the worker to project into the guest.\n * A non-file source outside the workspace has nowhere to go and is dropped.\n */\n private translateMounts(spec: GondolinRuntimeSpec): {\n mounts: Array<{ source: string; target: string }>;\n credentialFiles: GondolinCredentialFile[];\n } {\n const root = this.settings.workspaceRoot;\n if (!root || !spec.workspacePath) {\n return { mounts: spec.mounts, credentialFiles: [] };\n }\n const mounts: Array<{ source: string; target: string }> = [];\n const credentialFiles: GondolinCredentialFile[] = [];\n for (const mount of spec.mounts) {\n const suffix = relative(spec.workspacePath, mount.source);\n if (!suffix.startsWith(\"..\") && !isAbsolute(suffix)) {\n mounts.push({ source: join(root, suffix), target: mount.target });\n continue;\n }\n try {\n if (!statSync(mount.source).isFile()) {\n log.logWarning(\n `Skipping directory mount outside the shared workspace for remote runtime: ${mount.source}`,\n );\n continue;\n }\n credentialFiles.push({\n target: mount.target,\n contentBase64: readFileSync(mount.source).toString(\"base64\"),\n });\n } catch {\n // missing source: skip, matching the local worker's behavior\n }\n }\n return { mounts, credentialFiles };\n }\n\n private async leaseFor(instanceId: string): Promise<RemoteLease> {\n const cached = this.leases.get(instanceId);\n if (cached) return cached;\n const response = await this.request(\"POST\", \"/v1/leases\", {\n instanceId,\n ttlSeconds: this.leaseTtlSeconds,\n });\n if (response.status !== 200) {\n throw new SandboxError(\n `Error: remote worker refused lease (${response.status}): ${String(response.json.message ?? \"\")}`,\n );\n }\n const lease: RemoteLease = {\n leaseId: response.json.id as string,\n epoch: response.json.epoch as number,\n renewTimer: setInterval(() => void this.renew(instanceId), (this.leaseTtlSeconds * 1000) / 3),\n };\n lease.renewTimer.unref?.();\n this.leases.set(instanceId, lease);\n this.reportLeaseActivity(instanceId);\n return lease;\n }\n\n private async renew(instanceId: string): Promise<void> {\n const lease = this.leases.get(instanceId);\n if (!lease) return;\n try {\n const response = await this.request(\"POST\", `/v1/leases/${lease.leaseId}/renew`, {\n ttlSeconds: this.leaseTtlSeconds,\n });\n if (response.status === 200) this.reportLeaseActivity(instanceId);\n else this.dropLease(instanceId);\n } catch (err) {\n log.logWarning(\n `Failed to renew remote worker lease for '${instanceId}'`,\n err instanceof Error ? err.message : String(err),\n );\n }\n }\n\n private reportLeaseActivity(instanceId: string): void {\n // fencing watermark by mikan's own clock: the worker-side lease cannot\n // outlive this moment plus its ttl, no matter whose clock is skewed\n this.overrides.onLeaseActivity?.(instanceId, Date.now() + this.leaseTtlSeconds * 1000);\n }\n\n private releaseLease(instanceId: string): void {\n const lease = this.leases.get(instanceId);\n if (!lease) return;\n this.dropLease(instanceId);\n void this.request(\"DELETE\", `/v1/leases/${lease.leaseId}`).catch(() => {});\n }\n\n private dropLease(instanceId: string): void {\n const lease = this.leases.get(instanceId);\n if (!lease) return;\n clearInterval(lease.renewTimer);\n this.leases.delete(instanceId);\n }\n\n private leaseHeaders(lease: RemoteLease): Record<string, string> {\n return { \"X-Mikan-Lease\": lease.leaseId, \"X-Mikan-Epoch\": String(lease.epoch) };\n }\n\n private request(\n method: string,\n path: string,\n body?: object,\n headers?: Record<string, string>,\n timeoutMs = this.requestTimeoutMs,\n ): Promise<RemoteResponse> {\n if (this.overrides.request) return this.overrides.request(method, path, body, headers);\n const url = new URL(path, this.settings.url);\n const payload = body === undefined ? undefined : Buffer.from(JSON.stringify(body));\n return new Promise((resolve, reject) => {\n const request = httpsRequest(\n {\n method,\n host: url.hostname,\n port: url.port,\n path: url.pathname + url.search,\n signal: AbortSignal.timeout(timeoutMs),\n headers: {\n ...(payload\n ? { \"Content-Type\": \"application/json\", \"Content-Length\": payload.length }\n : {}),\n ...headers,\n },\n ...this.tlsOptions(),\n },\n (response) => {\n let raw = \"\";\n response.setEncoding(\"utf8\");\n response.on(\"data\", (chunk: string) => {\n raw += chunk;\n });\n response.on(\"end\", () => {\n let json: Record<string, unknown> = {};\n try {\n json = raw ? (JSON.parse(raw) as Record<string, unknown>) : {};\n } catch {\n // non-JSON body; status carries the outcome\n }\n resolve({ status: response.statusCode ?? 0, json });\n });\n },\n );\n request.on(\"error\", (error: Error) =>\n reject(new GondolinWorkerUnreachableError(error.message)),\n );\n if (payload) request.write(payload);\n request.end();\n });\n }\n\n private openTunnel(\n instanceId: string,\n path: string,\n headers: Record<string, string>,\n callbacks: SessionClientCallbacks,\n ): SessionClient | Promise<SessionClient> {\n if (this.overrides.tunnel) return this.overrides.tunnel(path, headers, callbacks);\n const url = new URL(path, this.settings.url);\n return new Promise((resolve, reject) => {\n const request = httpsRequest({\n method: \"GET\",\n host: url.hostname,\n port: url.port,\n path: url.pathname,\n signal: AbortSignal.timeout(this.requestTimeoutMs),\n headers: { ...headers, Connection: \"Upgrade\", Upgrade: \"gondolin-session\" },\n ...this.tlsOptions(),\n });\n request.on(\"upgrade\", (_response, socket) => {\n socket.setNoDelay(true);\n let closed = false;\n const parse = createSessionFrameParser(callbacks);\n socket.on(\"data\", parse);\n socket.on(\"error\", (error: Error) => {\n if (closed) return;\n closed = true;\n callbacks.onClose(error);\n });\n socket.on(\"close\", () => {\n if (closed) return;\n closed = true;\n callbacks.onClose();\n });\n resolve({\n send: (message) => {\n if (!closed) socket.write(encodeSessionMessage(message));\n },\n close: () => {\n if (closed) return;\n closed = true;\n socket.destroy();\n },\n });\n });\n request.on(\"response\", (response) => {\n if (isLeaseFencedStatus(response.statusCode)) {\n this.dropLease(instanceId);\n }\n const error = new Error(\n `tunnel refused: HTTP ${response.statusCode}`,\n ) as NodeJS.ErrnoException;\n error.code = \"ECONNREFUSED\"; // nothing executed — safe to recreate and retry\n reject(error);\n });\n request.on(\"error\", (error: NodeJS.ErrnoException) => {\n error.code ??= \"ECONNREFUSED\";\n reject(error);\n });\n request.end();\n });\n }\n\n private tlsOptions(): { ca?: Buffer; cert: Buffer; key: Buffer } {\n if (this.tls) return this.tls;\n if (!this.settings.certFile || !this.settings.keyFile) {\n throw new SandboxError(\n `Error: gondolin remote worker '${this.settings.name ?? this.settings.url}' needs certFile and keyFile`,\n );\n }\n this.tls = {\n ...(this.settings.caFile ? { ca: readFileSync(this.settings.caFile) } : {}),\n cert: readFileSync(this.settings.certFile),\n key: readFileSync(this.settings.keyFile),\n };\n return this.tls;\n }\n}\n"]}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import type { Readable } from "node:stream";
|
|
2
|
+
import type { GondolinWorkerConfig } from "./gondolin-worker.js";
|
|
3
|
+
import type { ExecResult } from "./types.js";
|
|
4
|
+
/**
|
|
5
|
+
* A live worker-hosted runtime as seen from mikan: identity plus fleet
|
|
6
|
+
* routing only. Transport-private connection details (the local worker's
|
|
7
|
+
* session socket, the remote worker's lease/tunnel) stay inside the owning
|
|
8
|
+
* transport — a handle never carries another transport's address fields.
|
|
9
|
+
*/
|
|
10
|
+
export interface GondolinRuntimeHandle {
|
|
11
|
+
sessionId: string;
|
|
12
|
+
instanceId: string;
|
|
13
|
+
workerPid: number;
|
|
14
|
+
fingerprint: string;
|
|
15
|
+
/** Fleet identity of the worker hosting the runtime (remote transport). */
|
|
16
|
+
workerName?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* What a runtime should look like, resolved by the executor layer. `image` is
|
|
20
|
+
* a local asset directory for the local transport and an image selector for
|
|
21
|
+
* the remote one (resolved on the worker host).
|
|
22
|
+
*/
|
|
23
|
+
export interface GondolinRuntimeSpec {
|
|
24
|
+
image: string;
|
|
25
|
+
mounts: Array<{
|
|
26
|
+
source: string;
|
|
27
|
+
target: string;
|
|
28
|
+
}>;
|
|
29
|
+
/** Raw fractional CPU limit (cgroup enforcement on remote Linux workers). */
|
|
30
|
+
cpus?: string;
|
|
31
|
+
/** Whole vCPUs given to the VM. */
|
|
32
|
+
vmCpus?: number;
|
|
33
|
+
memory?: string;
|
|
34
|
+
fingerprint: string;
|
|
35
|
+
/** mikan-host workspace root, for remote mount prefix translation. */
|
|
36
|
+
workspacePath?: string;
|
|
37
|
+
}
|
|
38
|
+
/** One way of running Gondolin runtimes: in local workers or on a remote fleet. */
|
|
39
|
+
export interface GondolinRuntimeTransport {
|
|
40
|
+
ensure(instanceId: string, spec: GondolinRuntimeSpec): Promise<GondolinRuntimeHandle>;
|
|
41
|
+
stop(handle: Pick<GondolinRuntimeHandle, "workerPid" | "sessionId" | "instanceId" | "workerName">): Promise<void>;
|
|
42
|
+
exec(handle: GondolinRuntimeHandle, command: string, options?: {
|
|
43
|
+
env?: Record<string, string>;
|
|
44
|
+
signal?: AbortSignal;
|
|
45
|
+
}): Promise<ExecResult>;
|
|
46
|
+
isRuntimeAlive(handle: GondolinRuntimeHandle): Promise<boolean>;
|
|
47
|
+
}
|
|
48
|
+
interface WorkerProcessLike {
|
|
49
|
+
pid?: number;
|
|
50
|
+
stdout: Readable | null;
|
|
51
|
+
stderr: Readable | null;
|
|
52
|
+
once(event: "close", listener: (code: number | null) => void): unknown;
|
|
53
|
+
once(event: "error", listener: (error: Error) => void): unknown;
|
|
54
|
+
kill(signal?: NodeJS.Signals): boolean;
|
|
55
|
+
unref(): void;
|
|
56
|
+
}
|
|
57
|
+
export interface SessionClientCallbacks {
|
|
58
|
+
onJson: (message: {
|
|
59
|
+
type: string;
|
|
60
|
+
id?: number;
|
|
61
|
+
exit_code?: number | null;
|
|
62
|
+
code?: string;
|
|
63
|
+
message?: string;
|
|
64
|
+
}) => void;
|
|
65
|
+
onBinary: (frame: Buffer) => void;
|
|
66
|
+
onClose: (error?: Error) => void;
|
|
67
|
+
}
|
|
68
|
+
export interface SessionClient {
|
|
69
|
+
send(message: object): void;
|
|
70
|
+
close(): void;
|
|
71
|
+
}
|
|
72
|
+
interface GondolinWorkerClientOverrides {
|
|
73
|
+
spawnProcess?: (command: string, args: string[]) => WorkerProcessLike;
|
|
74
|
+
connect?: (socketPath: string, callbacks: SessionClientCallbacks) => SessionClient;
|
|
75
|
+
kill?: (pid: number, signal: NodeJS.Signals | 0) => void;
|
|
76
|
+
handshakeTimeoutMs?: number;
|
|
77
|
+
stopWaitMs?: number;
|
|
78
|
+
stopPollIntervalMs?: number;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Run one command through a fresh session connection — the shared state
|
|
82
|
+
* machine for both transports. Closing the connection (abort, timeout, or the
|
|
83
|
+
* far side dying) kills the in-flight guest process.
|
|
84
|
+
*/
|
|
85
|
+
export declare function execOverSessionConnect(connect: (callbacks: SessionClientCallbacks) => SessionClient | Promise<SessionClient>, command: string, options?: {
|
|
86
|
+
env?: Record<string, string>;
|
|
87
|
+
signal?: AbortSignal;
|
|
88
|
+
idleTimeoutMs?: number;
|
|
89
|
+
}): Promise<ExecResult>;
|
|
90
|
+
declare class GondolinWorkerClient implements GondolinRuntimeTransport {
|
|
91
|
+
/** Session IPC socket per runtime — transport-private, never on the handle. */
|
|
92
|
+
private readonly socketPaths;
|
|
93
|
+
private spawnProcess;
|
|
94
|
+
private connectImpl;
|
|
95
|
+
private killImpl;
|
|
96
|
+
private handshakeTimeoutMs;
|
|
97
|
+
private stopWaitMs;
|
|
98
|
+
private stopPollIntervalMs;
|
|
99
|
+
configure(overrides?: GondolinWorkerClientOverrides): void;
|
|
100
|
+
/** Adopt a surviving local worker or spawn a fresh one for the spec. */
|
|
101
|
+
ensure(instanceId: string, spec: GondolinRuntimeSpec): Promise<GondolinRuntimeHandle>;
|
|
102
|
+
/** Whether the runtime's worker process is still alive. */
|
|
103
|
+
isRuntimeAlive(handle: GondolinRuntimeHandle): Promise<boolean>;
|
|
104
|
+
/** Spawn a detached worker for the config and wait for its ready handshake. */
|
|
105
|
+
spawn(config: GondolinWorkerConfig): Promise<GondolinRuntimeHandle>;
|
|
106
|
+
/**
|
|
107
|
+
* Adopt a runtime a previous mikan left running: newest live record for the
|
|
108
|
+
* key whose fingerprint still matches and whose session answers a probe.
|
|
109
|
+
* Anything stale — drifted fingerprint, unresponsive session — is stopped so
|
|
110
|
+
* the caller can spawn fresh.
|
|
111
|
+
*/
|
|
112
|
+
adopt(instanceId: string, fingerprint: string): Promise<GondolinRuntimeHandle | undefined>;
|
|
113
|
+
/**
|
|
114
|
+
* Stop a worker and wait for it to clean up after itself; escalate to
|
|
115
|
+
* SIGKILL and reap its leftovers if it will not die.
|
|
116
|
+
*/
|
|
117
|
+
stop(handle: Pick<GondolinRuntimeHandle, "workerPid" | "sessionId">): Promise<void>;
|
|
118
|
+
/** Whether the worker process behind a handle is still alive. */
|
|
119
|
+
/**
|
|
120
|
+
* Run one command over a dedicated session IPC connection. Aborting (or the
|
|
121
|
+
* caller's timeout signal firing) destroys the connection, which kills the
|
|
122
|
+
* in-flight guest process.
|
|
123
|
+
*/
|
|
124
|
+
exec(handle: GondolinRuntimeHandle, command: string, options?: {
|
|
125
|
+
env?: Record<string, string>;
|
|
126
|
+
signal?: AbortSignal;
|
|
127
|
+
}): Promise<ExecResult>;
|
|
128
|
+
private signal;
|
|
129
|
+
private isPidAlive;
|
|
130
|
+
private waitForExit;
|
|
131
|
+
private readHandshake;
|
|
132
|
+
}
|
|
133
|
+
export declare const gondolinWorkers: GondolinWorkerClient;
|
|
134
|
+
export {};
|
|
135
|
+
//# sourceMappingURL=gondolin-worker-client.d.ts.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