maka-agent 0.2.0-dev.3.20260830 → 0.2.0-dev.31.20260913
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/LICENSE +242 -5
- package/README.md +38 -19
- package/README.zh-CN.md +34 -19
- package/RUNTIME_HOST_PEER_DEPENDENCIES.rust.tsv +70 -0
- package/RUNTIME_HOST_PEER_THIRD_PARTY_NOTICES.txt +1839 -140
- package/THIRD_PARTY_NOTICES.txt +477 -258
- package/dist/acp/maka-acp-agent.js +13 -3
- package/dist/acp/prompt-content.js +225 -0
- package/dist/acp/session-configuration.js +143 -0
- package/dist/acp/session-event-mapper.js +103 -0
- package/dist/acp/session-registry.js +1030 -0
- package/dist/acp/stdio-server.js +29 -1
- package/dist/activation-command.js +1 -2
- package/dist/cli-core.js +99 -102
- package/dist/cli-ui-locale.js +7 -2
- package/dist/eval-bundle-path.js +1 -1
- package/dist/mcp-capability-provider.js +8 -11
- package/dist/onboarding-catalog.js +4 -5
- package/dist/pi-transcript-tools.js +9 -2
- package/dist/pi-transcript.js +86 -31
- package/dist/pi-tui-form-interaction.js +497 -0
- package/dist/pi-tui-layout.js +60 -12
- package/dist/pi-tui-mcp-status.js +122 -124
- package/dist/pi-tui-pickers.js +562 -102
- package/dist/pi-tui-runner.js +722 -170
- package/dist/pi-tui-todo.js +221 -0
- package/dist/pi-tui-transcript-viewer.js +134 -7
- package/dist/run-command-core.js +6 -14
- package/dist/runtime-host-access-command.js +37 -4
- package/dist/runtime-host-capability-provider-command.js +16 -2
- package/dist/runtime-host-cli-context.js +300 -80
- package/dist/runtime-host-cli-installation.js +8 -2
- package/dist/runtime-host-cli.js +397 -67
- package/dist/runtime-host-handoff-surface.js +108 -0
- package/dist/runtime-host-help.js +244 -0
- package/dist/runtime-host-installed-update-activator.js +70 -33
- package/dist/runtime-host-installed-update-bootstrap.js +13 -0
- package/dist/runtime-host-installed-update-coordinator.js +44 -96
- package/dist/runtime-host-lifecycle-transaction.js +101 -28
- package/dist/runtime-host-local-handoff.js +215 -41
- package/dist/runtime-host-local-managed-activation.js +84 -0
- package/dist/runtime-host-local-source-retirement.js +119 -0
- package/dist/runtime-host-local-target-activation.js +141 -0
- package/dist/runtime-host-managed-deployment.js +158 -51
- package/dist/runtime-host-managed-lifecycle-manager.js +5 -6
- package/dist/runtime-host-onboarding.js +368 -21
- package/dist/runtime-host-openrc-service.js +469 -0
- package/dist/runtime-host-operator-retirement.js +50 -0
- package/dist/runtime-host-package-deployment.js +36 -2
- package/dist/runtime-host-peer-artifact.js +3 -3
- package/dist/runtime-host-peer-management-command.js +30 -12
- package/dist/runtime-host-peer-mesh-management-command.js +18 -1
- package/dist/runtime-host-plugin-command.js +101 -0
- package/dist/runtime-host-profile-command.js +1 -1
- package/dist/runtime-host-run-command.js +32 -57
- package/dist/runtime-host-service-command.js +3 -3
- package/dist/runtime-host-service-management-command.js +67 -17
- package/dist/runtime-host-service-manager.js +3 -3
- package/dist/runtime-host-session-channel.js +79 -9
- package/dist/runtime-host-session-driver.js +85 -32
- package/dist/runtime-host-session-update.js +62 -0
- package/dist/runtime-host-setup-command.js +103 -65
- package/dist/runtime-host-systemd-service.js +9 -3
- package/dist/runtime-host-task-readiness.js +2 -3
- package/dist/runtime-host-tui-command.js +58 -77
- package/dist/runtime-host-tui-context.js +56 -17
- package/dist/runtime-host-tui-owner.js +226 -0
- package/dist/runtime-host-update-command.js +131 -48
- package/dist/runtime-host-update-discovery.js +1 -0
- package/dist/runtime-host-update-reconciliation.js +7 -7
- package/dist/runtime-host-windows-service.js +166 -0
- package/dist/runtime-host-windows-task-launcher-artifact.js +75 -0
- package/dist/session-export-command.js +72 -0
- package/dist/session-import-command.js +69 -0
- package/dist/tui-autocomplete-layout.js +3 -1
- package/dist/tui-clipboard.js +86 -0
- package/dist/tui-context-refresh.js +103 -0
- package/dist/tui-copy-catalog.js +976 -14
- package/dist/tui-copy-command.js +103 -0
- package/dist/tui-editor-render.js +36 -0
- package/dist/tui-host-owner-copy.js +24 -0
- package/dist/tui-mcp-control.js +87 -10
- package/dist/tui-mcp-remote-publication.js +395 -0
- package/native/runtime-host-peer/prebuilds/darwin-arm64/maka_runtime_host_peer.node +0 -0
- package/native/runtime-host-peer/prebuilds/linux-arm64/maka_runtime_host_peer.node +0 -0
- package/native/runtime-host-peer/prebuilds/linux-x64/maka_runtime_host_peer.node +0 -0
- package/native/runtime-host-peer/prebuilds/win32-x64/maka_runtime_host_peer.node +0 -0
- package/native/runtime-host-windows-task-launcher/prebuilds/win32-x64/maka-runtime-host-task-launcher.exe +0 -0
- package/node_modules/@ai-sdk/anthropic/CHANGELOG.md +117 -0
- package/node_modules/@ai-sdk/anthropic/dist/index.js +937 -411
- package/node_modules/@ai-sdk/anthropic/dist/internal/index.js +335 -160
- package/node_modules/@ai-sdk/anthropic/docs/05-anthropic.mdx +132 -43
- package/node_modules/@ai-sdk/anthropic/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
- package/node_modules/@ai-sdk/anthropic/node_modules/@ai-sdk/provider/package.json +63 -0
- package/node_modules/@ai-sdk/anthropic/package.json +6 -6
- package/node_modules/@ai-sdk/cohere/CHANGELOG.md +105 -0
- package/node_modules/@ai-sdk/cohere/dist/index.js +20 -22
- package/node_modules/@ai-sdk/cohere/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
- package/node_modules/@ai-sdk/cohere/node_modules/@ai-sdk/provider/README.md +1 -0
- package/node_modules/@ai-sdk/cohere/node_modules/@ai-sdk/provider/dist/index.js +426 -0
- package/node_modules/@ai-sdk/cohere/node_modules/@ai-sdk/provider/package.json +63 -0
- package/node_modules/@ai-sdk/cohere/package.json +6 -6
- package/node_modules/@ai-sdk/google/CHANGELOG.md +176 -0
- package/node_modules/@ai-sdk/google/dist/index.js +4441 -2801
- package/node_modules/@ai-sdk/google/dist/internal/index.js +640 -177
- package/node_modules/@ai-sdk/google/docs/15-google.mdx +225 -97
- package/node_modules/@ai-sdk/google/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
- package/node_modules/@ai-sdk/google/node_modules/@ai-sdk/provider/README.md +1 -0
- package/node_modules/@ai-sdk/google/node_modules/@ai-sdk/provider/dist/index.js +426 -0
- package/node_modules/@ai-sdk/google/node_modules/@ai-sdk/provider/package.json +63 -0
- package/node_modules/@ai-sdk/google/package.json +6 -6
- package/node_modules/@ai-sdk/open-responses/CHANGELOG.md +81 -0
- package/node_modules/@ai-sdk/open-responses/dist/index.js +570 -22
- package/node_modules/@ai-sdk/open-responses/docs/06-open-responses.mdx +123 -2
- package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider/CHANGELOG.md +38 -0
- package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider/package.json +1 -1
- package/node_modules/@ai-sdk/open-responses/package.json +3 -3
- package/node_modules/@ai-sdk/openai/CHANGELOG.md +184 -0
- package/node_modules/@ai-sdk/openai/dist/index.js +2013 -736
- package/node_modules/@ai-sdk/openai/dist/internal/index.js +1377 -478
- package/node_modules/@ai-sdk/openai/docs/03-openai.mdx +208 -52
- package/node_modules/@ai-sdk/openai/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
- package/node_modules/@ai-sdk/openai/node_modules/@ai-sdk/provider/LICENSE +13 -0
- package/node_modules/@ai-sdk/openai/node_modules/@ai-sdk/provider/README.md +1 -0
- package/node_modules/@ai-sdk/openai/node_modules/@ai-sdk/provider/dist/index.js +426 -0
- package/node_modules/@ai-sdk/openai/node_modules/@ai-sdk/provider/package.json +63 -0
- package/node_modules/@ai-sdk/openai/package.json +6 -6
- package/node_modules/@ai-sdk/openai-compatible/CHANGELOG.md +126 -0
- package/node_modules/@ai-sdk/openai-compatible/dist/index.js +105 -20
- package/node_modules/@ai-sdk/openai-compatible/dist/internal/index.js +9 -0
- package/node_modules/@ai-sdk/openai-compatible/docs/index.mdx +78 -0
- package/node_modules/@ai-sdk/openai-compatible/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
- package/node_modules/@ai-sdk/openai-compatible/node_modules/@ai-sdk/provider/README.md +1 -0
- package/node_modules/@ai-sdk/openai-compatible/node_modules/@ai-sdk/provider/dist/index.js +426 -0
- package/node_modules/@ai-sdk/openai-compatible/node_modules/@ai-sdk/provider/package.json +63 -0
- package/node_modules/@ai-sdk/openai-compatible/package.json +6 -6
- package/node_modules/@ai-sdk/provider-utils/CHANGELOG.md +92 -0
- package/node_modules/@ai-sdk/provider-utils/dist/index.js +664 -168
- package/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
- package/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/LICENSE +13 -0
- package/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/README.md +1 -0
- package/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/dist/index.js +426 -0
- package/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/package.json +63 -0
- package/node_modules/@ai-sdk/provider-utils/package.json +5 -5
- package/node_modules/@earendil-works/pi-tui/README.md +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js +36 -3
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +9 -4
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js +9 -4
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js +24 -4
- package/node_modules/@earendil-works/pi-tui/dist/components/text.js +5 -4
- package/node_modules/@earendil-works/pi-tui/dist/index.js +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.js +2 -2
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js +2 -8
- package/node_modules/@earendil-works/pi-tui/dist/native-module-path.js +19 -0
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js +37 -2
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js +4 -10
- package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js +63 -16
- package/node_modules/@earendil-works/pi-tui/dist/tui-main-screen.js +105 -45
- package/node_modules/@earendil-works/pi-tui/package.json +1 -1
- package/node_modules/@maka/core/dist/agent-run.js +25 -336
- package/node_modules/@maka/core/dist/artifacts.js +32 -23
- package/node_modules/@maka/core/dist/attachments.js +100 -1
- package/node_modules/@maka/core/dist/bot-events.js +18 -63
- package/node_modules/@maka/core/dist/bounded-response.js +71 -0
- package/node_modules/@maka/core/dist/canonical-json.js +27 -0
- package/node_modules/@maka/core/dist/canonical-runtime-event.js +3 -1
- package/node_modules/@maka/core/dist/capabilities.js +35 -0
- package/node_modules/@maka/core/dist/chat-model-choice.js +11 -31
- package/node_modules/@maka/core/dist/client-capability-grant.js +149 -0
- package/node_modules/@maka/core/dist/collaboration.js +12 -0
- package/node_modules/@maka/core/dist/computer-use.js +27 -93
- package/node_modules/@maka/core/dist/connection-error-copy.js +17 -34
- package/node_modules/@maka/core/dist/connection-readiness.js +3 -31
- package/node_modules/@maka/core/dist/deep-research.js +1 -20
- package/node_modules/@maka/core/dist/diagnostic-log.js +18 -7
- package/node_modules/@maka/core/dist/display-redaction.js +18 -0
- package/node_modules/@maka/core/dist/durable-tool-result-projection.js +126 -0
- package/node_modules/@maka/core/dist/events.js +43 -14
- package/node_modules/@maka/core/dist/execution-inspect.js +12 -21
- package/node_modules/@maka/core/dist/foreign-session.js +3 -3
- package/node_modules/@maka/core/dist/goal.js +44 -2
- package/node_modules/@maka/core/dist/health.js +50 -45
- package/node_modules/@maka/core/dist/interaction.js +623 -2
- package/node_modules/@maka/core/dist/llm-connections.js +115 -87
- package/node_modules/@maka/core/dist/local-memory.js +2 -2
- package/node_modules/@maka/core/dist/maka-wordmark.js +23 -0
- package/node_modules/@maka/core/dist/model-call-attempt.js +134 -82
- package/node_modules/@maka/core/dist/model-call-usage-projection.js +0 -183
- package/node_modules/@maka/core/dist/model-catalog.js +191 -322
- package/node_modules/@maka/core/dist/model-facts.js +206 -0
- package/node_modules/@maka/core/dist/model-failure.js +40 -0
- package/node_modules/@maka/core/dist/model-metadata.generated.js +1910 -1875
- package/node_modules/@maka/core/dist/model-metadata.js +217 -209
- package/node_modules/@maka/core/dist/model-projection-transition.js +145 -0
- package/node_modules/@maka/core/dist/model-thinking.js +73 -24
- package/node_modules/@maka/core/dist/model-web-search.js +5 -4
- package/node_modules/@maka/core/dist/models-dev-projection.js +302 -0
- package/node_modules/@maka/core/dist/models-dev-refresh.js +55 -0
- package/node_modules/@maka/core/dist/onboarding.js +2 -1
- package/node_modules/@maka/core/dist/permission-profile.js +17 -0
- package/node_modules/@maka/core/dist/permission.js +0 -1
- package/node_modules/@maka/core/dist/provider-auth.js +47 -291
- package/node_modules/@maka/core/dist/provider-registry.js +115 -373
- package/node_modules/@maka/core/dist/record-schema.js +22 -2
- package/node_modules/@maka/core/dist/redaction.js +78 -40
- package/node_modules/@maka/core/dist/relative-time.js +6 -5
- package/node_modules/@maka/core/dist/run-composition.js +77 -2
- package/node_modules/@maka/core/dist/runtime-boundary.js +182 -66
- package/node_modules/@maka/core/dist/runtime-event-store.js +6 -0
- package/node_modules/@maka/core/dist/runtime-event.js +254 -12
- package/node_modules/@maka/core/dist/runtime-handoff.js +106 -0
- package/node_modules/@maka/core/dist/runtime-invocation.js +223 -0
- package/node_modules/@maka/core/dist/runtime-logical-execution.js +137 -0
- package/node_modules/@maka/core/dist/runtime-policy/connection-catalog-codec.js +198 -44
- package/node_modules/@maka/core/dist/runtime-policy/credential-vault-codec.js +9 -1
- package/node_modules/@maka/core/dist/runtime-policy/model-catalog-entry-codec.js +93 -0
- package/node_modules/@maka/core/dist/runtime-policy/policy-codec.js +118 -4
- package/node_modules/@maka/core/dist/runtime-policy.js +6 -2
- package/node_modules/@maka/core/dist/scheduled-task.js +12 -2
- package/node_modules/@maka/core/dist/session-name.js +0 -1
- package/node_modules/@maka/core/dist/session-send-projection.js +2 -1
- package/node_modules/@maka/core/dist/session-start-mode.js +42 -0
- package/node_modules/@maka/core/dist/session-todo.js +101 -0
- package/node_modules/@maka/core/dist/session-trace.js +5 -1
- package/node_modules/@maka/core/dist/session.js +313 -52
- package/node_modules/@maka/core/dist/settings.js +27 -8
- package/node_modules/@maka/core/dist/slash-command-catalog.js +4 -0
- package/node_modules/@maka/core/dist/task-submission-readiness.js +2 -1
- package/node_modules/@maka/core/dist/text-sanitize.js +27 -2
- package/node_modules/@maka/core/dist/tool-activity-args.js +4 -0
- package/node_modules/@maka/core/dist/tool-quiet-preview.js +20 -10
- package/node_modules/@maka/core/dist/tool-result-archive-evidence.js +22 -0
- package/node_modules/@maka/core/dist/tool-result-record-schema.js +5 -2
- package/node_modules/@maka/core/dist/ui-locale.js +23 -10
- package/node_modules/@maka/core/dist/unified-diff.js +33 -26
- package/node_modules/@maka/core/dist/usage-ledger-merge.js +10 -9
- package/node_modules/@maka/core/dist/usage-record-schema.js +38 -30
- package/node_modules/@maka/core/dist/usage-stats/types.js +2 -0
- package/node_modules/@maka/core/dist/workhub-action-result.js +68 -0
- package/node_modules/@maka/core/dist/workhub-routing.js +126 -0
- package/node_modules/@maka/core/node_modules/@formatjs/icu-messageformat-parser/index.js +2175 -0
- package/node_modules/@maka/core/node_modules/@formatjs/icu-messageformat-parser/manipulator.js +209 -0
- package/node_modules/@maka/core/node_modules/@formatjs/icu-messageformat-parser/no-parser.js +162 -0
- package/node_modules/@maka/core/node_modules/@formatjs/icu-messageformat-parser/package.json +21 -0
- package/node_modules/@maka/core/node_modules/@formatjs/icu-messageformat-parser/printer.js +224 -0
- package/node_modules/@maka/core/node_modules/intl-messageformat/intl-messageformat.iife.js +2807 -0
- package/node_modules/@maka/core/node_modules/intl-messageformat/package.json +40 -0
- package/node_modules/@maka/core/package.json +22 -3
- package/node_modules/@maka/eval/dist/experiment-directory.js +4 -13
- package/node_modules/@maka/eval/dist/external-subject.js +1 -1
- package/node_modules/@maka/eval/dist/harbor-external-subject.js +4 -3
- package/node_modules/@maka/eval/dist/harness-executor.js +3 -2
- package/node_modules/@maka/eval/dist/install-preflight.js +39 -10
- package/node_modules/@maka/eval/dist/process-termination.js +83 -0
- package/node_modules/@maka/eval/dist/toolchain-verification.js +1 -1
- package/node_modules/@maka/eval/harbor/egress-proxy/entrypoint.sh +2 -1
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/Client.md +4 -0
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +3 -2
- package/node_modules/@maka/eval/node_modules/undici/docs/docs/api/EventSource.md +4 -0
- package/node_modules/@maka/eval/node_modules/undici/lib/cache/memory-cache-store.js +1 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/agent.js +7 -2
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/balanced-pool.js +1 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/client-h1.js +12 -4
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/client-h2.js +43 -3
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/client.js +3 -2
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/dispatcher-base.js +13 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/dispatcher.js +10 -0
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +10 -3
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/proxy-agent.js +1 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/round-robin-pool.js +1 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +3 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/handler/cache-handler.js +8 -0
- package/node_modules/@maka/eval/node_modules/undici/lib/handler/decorator-handler.js +7 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/handler/deduplication-handler.js +12 -6
- package/node_modules/@maka/eval/node_modules/undici/lib/handler/redirect-handler.js +8 -0
- package/node_modules/@maka/eval/node_modules/undici/lib/handler/retry-handler.js +83 -11
- package/node_modules/@maka/eval/node_modules/undici/lib/interceptor/dump.js +1 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/mock/mock-agent.js +13 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/mock/mock-utils.js +11 -10
- package/node_modules/@maka/eval/node_modules/undici/lib/web/cookies/parse.js +4 -2
- package/node_modules/@maka/eval/node_modules/undici/lib/web/eventsource/eventsource-stream.js +28 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/web/eventsource/eventsource.js +4 -1
- package/node_modules/@maka/eval/node_modules/undici/lib/web/fetch/request.js +2 -3
- package/node_modules/@maka/eval/node_modules/undici/package.json +3 -3
- package/node_modules/@maka/eval/package.json +1 -1
- package/node_modules/@maka/mcp/dist/form-elicitation.js +213 -0
- package/node_modules/@maka/mcp/dist/index.js +465 -68
- package/node_modules/@maka/mcp/dist/sep-2243.js +3 -3
- package/node_modules/@maka/runtime/dist/agent-graph-timeline.js +12 -11
- package/node_modules/@maka/runtime/dist/agent-run-inspect.js +37 -85
- package/node_modules/@maka/runtime/dist/agent-run-recovery.js +36 -46
- package/node_modules/@maka/runtime/dist/agent-run.js +616 -468
- package/node_modules/@maka/runtime/dist/agent-swarm-status-tool.js +0 -1
- package/node_modules/@maka/runtime/dist/ai-sdk-backend.js +125 -3751
- package/node_modules/@maka/runtime/dist/ai-sdk-compaction-contract.js +6 -1
- package/node_modules/@maka/runtime/dist/ai-sdk-compaction.js +494 -521
- package/node_modules/@maka/runtime/dist/ai-sdk-message-projection.js +637 -0
- package/node_modules/@maka/runtime/dist/ai-sdk-tool-repair.js +115 -0
- package/node_modules/@maka/runtime/dist/ai-sdk-turn.js +2678 -0
- package/node_modules/@maka/runtime/dist/ask-user-question-tool.js +0 -1
- package/node_modules/@maka/runtime/dist/bash-model-output.js +7 -1
- package/node_modules/@maka/runtime/dist/bash-tail-buffer.js +13 -52
- package/node_modules/@maka/runtime/dist/bots/base-adapter.js +17 -0
- package/node_modules/@maka/runtime/dist/bots/bot-test.js +40 -23
- package/node_modules/@maka/runtime/dist/bots/dingtalk-bridge.js +93 -24
- package/node_modules/@maka/runtime/dist/bots/discord-bridge.js +4 -4
- package/node_modules/@maka/runtime/dist/bots/feishu-bridge.js +28 -25
- package/node_modules/@maka/runtime/dist/bots/qq-bridge.js +6 -4
- package/node_modules/@maka/runtime/dist/bots/slack-bridge.js +8 -7
- package/node_modules/@maka/runtime/dist/bots/telegram-bridge.js +7 -31
- package/node_modules/@maka/runtime/dist/bots/wechat-bridge.js +104 -48
- package/node_modules/@maka/runtime/dist/bots/wecom-bridge.js +45 -42
- package/node_modules/@maka/runtime/dist/bots/ws-bridge-base.js +2 -3
- package/node_modules/@maka/runtime/dist/builtin-tools.js +107 -115
- package/node_modules/@maka/runtime/dist/bundled-skill-catalog.generated.js +1 -1
- package/node_modules/@maka/runtime/dist/child-fd-input.js +3 -2
- package/node_modules/@maka/runtime/dist/code-mode.js +7 -4
- package/node_modules/@maka/runtime/dist/computer-use-codec.js +1 -141
- package/node_modules/@maka/runtime/dist/computer-use-tools.js +27 -106
- package/node_modules/@maka/runtime/dist/context-budget-helpers.js +4 -57
- package/node_modules/@maka/runtime/dist/context-budget-policy.js +26 -65
- package/node_modules/@maka/runtime/dist/context-budget.js +44 -103
- package/node_modules/@maka/runtime/dist/context-diagnostics.js +72 -33
- package/node_modules/@maka/runtime/dist/continuation-replay.js +22 -11
- package/node_modules/@maka/runtime/dist/conversation-copy.js +656 -188
- package/node_modules/@maka/runtime/dist/cua-frame-state.js +1 -69
- package/node_modules/@maka/runtime/dist/deep-research-tools.js +15 -24
- package/node_modules/@maka/runtime/dist/durable-tool-result-projection.js +436 -0
- package/node_modules/@maka/runtime/dist/edit-replace.js +2 -2
- package/node_modules/@maka/runtime/dist/execution-inspect.js +56 -41
- package/node_modules/@maka/runtime/dist/filesystem-executor.js +10 -6
- package/node_modules/@maka/runtime/dist/filesystem-worker/client.js +77 -19
- package/node_modules/@maka/runtime/dist/filesystem-worker/launch-spec.js +66 -55
- package/node_modules/@maka/runtime/dist/filesystem-worker/operations.js +34 -98
- package/node_modules/@maka/runtime/dist/filesystem-worker/protocol.js +25 -10
- package/node_modules/@maka/runtime/dist/filesystem-worker/worker-entry.js +2 -0
- package/node_modules/@maka/runtime/dist/github-copilot-oauth-enrollment.js +267 -0
- package/node_modules/@maka/runtime/dist/glob-search.js +74 -0
- package/node_modules/@maka/runtime/dist/goal-continuation.js +119 -13
- package/node_modules/@maka/runtime/dist/goal-evaluator.js +10 -4
- package/node_modules/@maka/runtime/dist/goal-state.js +7 -0
- package/node_modules/@maka/runtime/dist/grep-search.js +155 -0
- package/node_modules/@maka/runtime/dist/history-compact-checkpoint-coordinator.js +16 -6
- package/node_modules/@maka/runtime/dist/history-compact-checkpoint.js +79 -29
- package/node_modules/@maka/runtime/dist/history-compact-error.js +10 -2
- package/node_modules/@maka/runtime/dist/history-compact-input-fit.js +7 -1
- package/node_modules/@maka/runtime/dist/history-compact-ledger.js +18 -18
- package/node_modules/@maka/runtime/dist/history-compact-summarizer.js +132 -110
- package/node_modules/@maka/runtime/dist/history-compact-summary-validation.js +14 -30
- package/node_modules/@maka/runtime/dist/history-compaction.js +101 -89
- package/node_modules/@maka/runtime/dist/image-file.js +5 -20
- package/node_modules/@maka/runtime/dist/interaction-authority.js +85 -0
- package/node_modules/@maka/runtime/dist/latest-context-snapshot.js +112 -23
- package/node_modules/@maka/runtime/dist/ledger-tool-result-archive-reader.js +164 -0
- package/node_modules/@maka/runtime/dist/local-web-fetch.js +2 -43
- package/node_modules/@maka/runtime/dist/mcp-tools.js +93 -35
- package/node_modules/@maka/runtime/dist/memory-extraction-evidence.js +7 -1
- package/node_modules/@maka/runtime/dist/memory-extraction.js +23 -18
- package/node_modules/@maka/runtime/dist/message-authority.js +9 -0
- package/node_modules/@maka/runtime/dist/model-adapter.js +103 -122
- package/node_modules/@maka/runtime/dist/model-factory.js +34 -81
- package/node_modules/@maka/runtime/dist/model-fetcher.js +64 -10
- package/node_modules/@maka/runtime/dist/model-history.js +291 -159
- package/node_modules/@maka/runtime/dist/model-projection-transition-ledger.js +207 -0
- package/node_modules/@maka/runtime/dist/model-runtime.js +87 -110
- package/node_modules/@maka/runtime/dist/native-web-search-tool.js +2 -1
- package/node_modules/@maka/runtime/dist/oauth-provider-contracts.js +28 -1
- package/node_modules/@maka/runtime/dist/openai-codex-history-compactor.js +28 -73
- package/node_modules/@maka/runtime/dist/openai-responses-websocket.js +2 -5
- package/node_modules/@maka/runtime/dist/opencode-session-header.js +31 -0
- package/node_modules/@maka/runtime/dist/pipe-tail-collector.js +6 -9
- package/node_modules/@maka/runtime/dist/plan-mode.js +0 -65
- package/node_modules/@maka/runtime/dist/plan-tools.js +0 -3
- package/node_modules/@maka/runtime/dist/plugin-agent-service.js +131 -0
- package/node_modules/@maka/runtime/dist/plugin-approval-service.js +33 -0
- package/node_modules/@maka/runtime/dist/plugin-attachment-service.js +53 -0
- package/node_modules/@maka/runtime/dist/plugin-command-service.js +100 -0
- package/node_modules/@maka/runtime/dist/plugin-composition-loader.js +184 -22
- package/node_modules/@maka/runtime/dist/plugin-data-services.js +332 -0
- package/node_modules/@maka/runtime/dist/plugin-fs-service.js +62 -0
- package/node_modules/@maka/runtime/dist/plugin-goal-service.js +61 -0
- package/node_modules/@maka/runtime/dist/plugin-invocation-signal.js +24 -0
- package/node_modules/@maka/runtime/dist/plugin-llm-service.js +85 -0
- package/node_modules/@maka/runtime/dist/plugin-lsp-service.js +94 -0
- package/node_modules/@maka/runtime/dist/plugin-runtime.js +239 -10
- package/node_modules/@maka/runtime/dist/plugin-scope-registry.js +91 -0
- package/node_modules/@maka/runtime/dist/plugin-session-query-service.js +71 -0
- package/node_modules/@maka/runtime/dist/plugin-shell-env-service.js +87 -0
- package/node_modules/@maka/runtime/dist/plugin-shell-service.js +74 -0
- package/node_modules/@maka/runtime/dist/plugin-skill-service.js +93 -0
- package/node_modules/@maka/runtime/dist/plugin-system-prompt-service.js +346 -0
- package/node_modules/@maka/runtime/dist/plugin-tool-service.js +171 -0
- package/node_modules/@maka/runtime/dist/plugin-user-question-service.js +43 -0
- package/node_modules/@maka/runtime/dist/plugin-web-service.js +69 -0
- package/node_modules/@maka/runtime/dist/prior-run-context.js +24 -94
- package/node_modules/@maka/runtime/dist/process-tree-terminator.js +2 -2
- package/node_modules/@maka/runtime/dist/prompt-composition.js +36 -31
- package/node_modules/@maka/runtime/dist/provider-error-classification.js +84 -123
- package/node_modules/@maka/runtime/dist/provider-image-overflow-recovery.js +12 -31
- package/node_modules/@maka/runtime/dist/provider-request-telemetry.js +172 -196
- package/node_modules/@maka/runtime/dist/quiescent-session-snapshot.js +78 -0
- package/node_modules/@maka/runtime/dist/read-page.js +231 -0
- package/node_modules/@maka/runtime/dist/recovery-resolver.js +18 -14
- package/node_modules/@maka/runtime/dist/request-customization-fetch.js +14 -7
- package/node_modules/@maka/runtime/dist/request-projection.js +2 -15
- package/node_modules/@maka/runtime/dist/request-shape.js +187 -365
- package/node_modules/@maka/runtime/dist/ripgrep-executable.js +62 -0
- package/node_modules/@maka/runtime/dist/ripgrep-guidance.js +81 -0
- package/node_modules/@maka/runtime/dist/run-handoff-gate.js +97 -0
- package/node_modules/@maka/runtime/dist/run-trace.js +2 -34
- package/node_modules/@maka/runtime/dist/runtime-continuation-admission.js +1 -1
- package/node_modules/@maka/runtime/dist/runtime-event-backfill.js +107 -65
- package/node_modules/@maka/runtime/dist/runtime-event-read-model.js +415 -234
- package/node_modules/@maka/runtime/dist/runtime-kernel.js +518 -225
- package/node_modules/@maka/runtime/dist/runtime-ledger-repair.js +221 -448
- package/node_modules/@maka/runtime/dist/runtime-read-model.js +95 -198
- package/node_modules/@maka/runtime/dist/runtime-resume.js +162 -126
- package/node_modules/@maka/runtime/dist/sandbox/index.js +0 -1
- package/node_modules/@maka/runtime/dist/sandbox/linux-profile-path.js +7 -1
- package/node_modules/@maka/runtime/dist/sandbox/linux-sandbox.js +20 -17
- package/node_modules/@maka/runtime/dist/sandbox/macos-seatbelt.js +68 -21
- package/node_modules/@maka/runtime/dist/sandbox/sandbox-manager.js +0 -35
- package/node_modules/@maka/runtime/dist/sandbox/windows-sandbox.js +0 -12
- package/node_modules/@maka/runtime/dist/scheduled-task-tools.js +3 -0
- package/node_modules/@maka/runtime/dist/session-event-runtime-mapper.js +62 -21
- package/node_modules/@maka/runtime/dist/session-export.js +178 -0
- package/node_modules/@maka/runtime/dist/session-import.js +100 -0
- package/node_modules/@maka/runtime/dist/session-manager.js +672 -861
- package/node_modules/@maka/runtime/dist/session-projection-helpers.js +16 -28
- package/node_modules/@maka/runtime/dist/session-recap.js +87 -15
- package/node_modules/@maka/runtime/dist/session-todo-tools.js +67 -0
- package/node_modules/@maka/runtime/dist/session-trace-projection.js +25 -30
- package/node_modules/@maka/runtime/dist/shell-detect.js +3 -7
- package/node_modules/@maka/runtime/dist/shell-exec.js +7 -25
- package/node_modules/@maka/runtime/dist/shell-run-contract.js +0 -1
- package/node_modules/@maka/runtime/dist/shell-run-manager.js +11 -46
- package/node_modules/@maka/runtime/dist/shell-run-tool-result.js +14 -7
- package/node_modules/@maka/runtime/dist/shell-tools.js +84 -14
- package/node_modules/@maka/runtime/dist/stream-graph-coordinator.js +64 -13
- package/node_modules/@maka/runtime/dist/stream-graph-handoff.js +6 -1
- package/node_modules/@maka/runtime/dist/stream-graph-projection.js +18 -15
- package/node_modules/@maka/runtime/dist/stream-graph-read-model.js +5 -0
- package/node_modules/@maka/runtime/dist/stream-graph-supervisor-tools.js +0 -8
- package/node_modules/@maka/runtime/dist/stream-usage-fallback-fetch.js +74 -0
- package/node_modules/@maka/runtime/dist/subagent-tools.js +2 -80
- package/node_modules/@maka/runtime/dist/subscription-credentials.js +51 -4
- package/node_modules/@maka/runtime/dist/subscription-model-fetch.js +51 -11
- package/node_modules/@maka/runtime/dist/system-prompt/main-session-prompt.js +21 -2
- package/node_modules/@maka/runtime/dist/system-prompt/workspace-instructions.js +11 -6
- package/node_modules/@maka/runtime/dist/tavily-search.js +8 -2
- package/node_modules/@maka/runtime/dist/telemetry/model-pricing.generated.js +93 -83
- package/node_modules/@maka/runtime/dist/terminal-run-commit.js +37 -172
- package/node_modules/@maka/runtime/dist/test-connection.js +36 -30
- package/node_modules/@maka/runtime/dist/text-line-window.js +49 -0
- package/node_modules/@maka/runtime/dist/tool-activation-identity.js +41 -0
- package/node_modules/@maka/runtime/dist/tool-availability.js +85 -8
- package/node_modules/@maka/runtime/dist/tool-output.js +36 -13
- package/node_modules/@maka/runtime/dist/tool-result-archive-capability.js +24 -36
- package/node_modules/@maka/runtime/dist/tool-result-archive-encoding.js +38 -0
- package/node_modules/@maka/runtime/dist/tool-result-archive-resource.js +93 -245
- package/node_modules/@maka/runtime/dist/tool-result-archive-transition.js +186 -0
- package/node_modules/@maka/runtime/dist/tool-result-archive.js +50 -173
- package/node_modules/@maka/runtime/dist/tool-runtime.js +380 -126
- package/node_modules/@maka/runtime/dist/unified-diff.js +40 -10
- package/node_modules/@maka/runtime/dist/web-fetch-tool.js +4 -2
- package/node_modules/@maka/runtime/dist/workers/filesystem-worker.js +12332 -4656
- package/node_modules/@maka/runtime/dist/workspace-executor.js +22 -30
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/code-mode/LICENSE +13 -0
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/code-mode/dist/run-code-mode.js +551 -0
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/code-mode/package.json +78 -0
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/gateway/CHANGELOG.md +3269 -0
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/gateway/LICENSE +13 -0
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/gateway/dist/index.js +3835 -0
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/gateway/docs/00-ai-gateway.mdx +1610 -0
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/gateway/package.json +80 -0
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/provider/CHANGELOG.md +1262 -0
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/provider/LICENSE +13 -0
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/provider/README.md +1 -0
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/provider/dist/index.js +426 -0
- package/node_modules/@maka/runtime/node_modules/@ai-sdk/provider/package.json +63 -0
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/README.md +44 -8
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/dist/package.json +4 -4
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/dist/src/SlackWebSocket.js +39 -3
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/dist/src/SocketModeClient.js +4 -0
- package/node_modules/@maka/runtime/node_modules/@slack/socket-mode/package.json +4 -4
- package/node_modules/@maka/runtime/node_modules/ai/CHANGELOG.md +10271 -0
- package/node_modules/@maka/runtime/node_modules/ai/LICENSE +13 -0
- package/node_modules/@maka/runtime/node_modules/ai/dist/index.js +20146 -0
- package/node_modules/@maka/runtime/node_modules/ai/dist/internal/index.js +3690 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/02-foundations/02-providers-and-models.mdx +185 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/03-agents/04-loop-control.mdx +517 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/03-agents/06-policy-tool-approvals.mdx +413 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/03-agents/06-tool-approvals.mdx +338 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/03-agents/07-workflow-agent.mdx +815 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-core/10-generating-structured-data.mdx +525 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-core/15-tools-and-tool-calling.mdx +1512 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-core/16-mcp-tools.mdx +680 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-core/35-image-generation.mdx +371 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-core/36-transcription.mdx +333 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-core/37-speech.mdx +163 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-core/39-file-uploads.mdx +180 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-core/42-batch.mdx +372 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-core/50-error-handling.mdx +241 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-core/60-telemetry.mdx +855 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-core/index.mdx +137 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-harnesses/02-harness-agent.mdx +683 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-harnesses/04-skills.mdx +69 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/03-ai-sdk-harnesses/05-harness-adapters.mdx +47 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/04-ai-sdk-ui/03-chatbot-tool-usage.mdx +826 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/04-ai-sdk-ui/20-streaming-data.mdx +406 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/04-ai-sdk-ui/21-transport.mdx +216 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/04-ai-sdk-ui/50-stream-protocol.mdx +582 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/06-advanced/04-caching.mdx +182 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/06-advanced/11-secure-url-fetching.mdx +117 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/01-generate-text.mdx +3267 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/02-stream-text.mdx +4303 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/05-embed.mdx +330 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/06-embed-many.mdx +332 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/06-rerank.mdx +331 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/10-generate-image.mdx +253 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/14-upload-file.mdx +125 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/16-tool-loop-agent.mdx +1102 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/20-start-batch.mdx +154 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/21-get-batch-status.mdx +133 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/22-get-batch-results.mdx +109 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/23-cancel-batch.mdx +96 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/24-list-batches.mdx +121 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/28-output.mdx +368 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/31-ui-message.mdx +331 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/80-smooth-stream.mdx +147 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/01-ai-sdk-core/index.mdx +250 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/02-ai-sdk-ui/01-use-chat.mdx +493 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/02-ai-sdk-ui/31-convert-to-model-messages.mdx +256 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/02-ai-sdk-ui/40-create-ui-message-stream.mdx +199 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/02-ai-sdk-ui/41-create-ui-message-stream-response.mdx +125 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/04-ai-sdk-workflow/01-workflow-agent.mdx +1035 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/04-ai-sdk-workflow/02-workflow-chat-transport.mdx +361 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/04-ai-sdk-workflow/03-generate-video.mdx +157 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/04-ai-sdk-workflow/index.mdx +32 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/05-ai-sdk-errors/ai-invalid-argument-error.mdx +31 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/05-ai-sdk-errors/ai-no-image-generated-error.mdx +43 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/05-ai-sdk-errors/ai-stream-provider-error.mdx +52 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/05-ai-sdk-errors/ai-tool-choice-violation-error.mdx +38 -0
- package/node_modules/@maka/runtime/node_modules/ai/docs/07-reference/05-ai-sdk-errors/index.mdx +43 -0
- package/node_modules/@maka/runtime/node_modules/ai/package.json +127 -0
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/Client.md +4 -0
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +3 -2
- package/node_modules/@maka/runtime/node_modules/undici/docs/docs/api/EventSource.md +4 -0
- package/node_modules/@maka/runtime/node_modules/undici/lib/cache/memory-cache-store.js +1 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/agent.js +7 -2
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/balanced-pool.js +1 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/client-h1.js +12 -4
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/client-h2.js +43 -3
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/client.js +3 -2
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/dispatcher-base.js +13 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/dispatcher.js +10 -0
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +10 -3
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/proxy-agent.js +1 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/round-robin-pool.js +1 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +3 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/handler/cache-handler.js +8 -0
- package/node_modules/@maka/runtime/node_modules/undici/lib/handler/decorator-handler.js +7 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/handler/deduplication-handler.js +12 -6
- package/node_modules/@maka/runtime/node_modules/undici/lib/handler/redirect-handler.js +8 -0
- package/node_modules/@maka/runtime/node_modules/undici/lib/handler/retry-handler.js +83 -11
- package/node_modules/@maka/runtime/node_modules/undici/lib/interceptor/dump.js +1 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/mock/mock-agent.js +13 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/mock/mock-utils.js +11 -10
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/cookies/parse.js +4 -2
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/eventsource/eventsource-stream.js +28 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/eventsource/eventsource.js +4 -1
- package/node_modules/@maka/runtime/node_modules/undici/lib/web/fetch/request.js +2 -3
- package/node_modules/@maka/runtime/node_modules/undici/package.json +3 -3
- package/node_modules/@maka/runtime/package.json +41 -15
- package/node_modules/@maka/runtime-host/dist/adapter/session-projector.js +75 -38
- package/node_modules/@maka/runtime-host/dist/candidate-entry.js +10 -2
- package/node_modules/@maka/runtime-host/dist/candidate-launch-owner-guard.js +13 -0
- package/node_modules/@maka/runtime-host/dist/client/catalog-reader.js +64 -25
- package/node_modules/@maka/runtime-host/dist/client/client-capability-channel.js +87 -3
- package/node_modules/@maka/runtime-host/dist/client/connect-or-spawn.js +13 -2
- package/node_modules/@maka/runtime-host/dist/client/connection.js +144 -51
- package/node_modules/@maka/runtime-host/dist/client/host-handoff-copy.js +238 -0
- package/node_modules/@maka/runtime-host/dist/client/host-handoff.js +309 -0
- package/node_modules/@maka/runtime-host/dist/client/host-profile.js +483 -94
- package/node_modules/@maka/runtime-host/dist/client/host-retirement.js +28 -5
- package/node_modules/@maka/runtime-host/dist/client/index.js +12 -8
- package/node_modules/@maka/runtime-host/dist/client/launcher.js +12 -3
- package/node_modules/@maka/runtime-host/dist/client/oauth-presentation.js +1 -1
- package/node_modules/@maka/runtime-host/dist/client/owner-connection-code.js +38 -4
- package/node_modules/@maka/runtime-host/dist/client/peer-client.js +408 -25
- package/node_modules/@maka/runtime-host/dist/client/process-identity.js +73 -0
- package/node_modules/@maka/runtime-host/dist/client/reconnect-lifecycle.js +72 -7
- package/node_modules/@maka/runtime-host/dist/client/reconnecting-connection.js +11 -0
- package/node_modules/@maka/runtime-host/dist/client/registered-host-termination.js +107 -0
- package/node_modules/@maka/runtime-host/dist/client/remote-compatibility-error.js +2 -0
- package/node_modules/@maka/runtime-host/dist/client/session-subscription.js +46 -5
- package/node_modules/@maka/runtime-host/dist/client/ssh-operator-activation.js +48 -11
- package/node_modules/@maka/runtime-host/dist/client/wsl-control.js +0 -8
- package/node_modules/@maka/runtime-host/dist/client/wsl-environment.js +12 -8
- package/node_modules/@maka/runtime-host/dist/client-capability-entity-id.js +27 -0
- package/node_modules/@maka/runtime-host/dist/control/endpoint.js +1 -3
- package/node_modules/@maka/runtime-host/dist/node-error.js +22 -0
- package/node_modules/@maka/runtime-host/dist/operator/access-management-frame.js +10 -1
- package/node_modules/@maka/runtime-host/dist/operator/index.js +5 -2
- package/node_modules/@maka/runtime-host/dist/operator/managed-deployment.js +17 -8
- package/node_modules/@maka/runtime-host/dist/operator/operator-command.js +110 -0
- package/node_modules/@maka/runtime-host/dist/operator/peer-management-frame.js +2 -0
- package/node_modules/@maka/runtime-host/dist/operator/peer-mesh-management-frame.js +14 -0
- package/node_modules/@maka/runtime-host/dist/operator/retirement-cancellation.js +20 -0
- package/node_modules/@maka/runtime-host/dist/operator/service-management-frame.js +5 -6
- package/node_modules/@maka/runtime-host/dist/operator/setup-frame.js +32 -6
- package/node_modules/@maka/runtime-host/dist/peer-mesh/display-name.js +30 -0
- package/node_modules/@maka/runtime-host/dist/peer-mesh/index.js +3 -3
- package/node_modules/@maka/runtime-host/dist/peer-mesh/limits.js +1 -2
- package/node_modules/@maka/runtime-host/dist/peer-mesh/model.js +72 -73
- package/node_modules/@maka/runtime-host/dist/peer-mesh/node.js +1334 -418
- package/node_modules/@maka/runtime-host/dist/peer-mesh/owner.js +33 -68
- package/node_modules/@maka/runtime-host/dist/peer-mesh/store.js +147 -52
- package/node_modules/@maka/runtime-host/dist/peer-reachability/index.js +21 -0
- package/node_modules/@maka/runtime-host/dist/peer-reachability/model.js +202 -0
- package/node_modules/@maka/runtime-host/dist/peer-reachability/owner.js +118 -0
- package/node_modules/@maka/runtime-host/dist/peer-reachability/publisher.js +243 -0
- package/node_modules/@maka/runtime-host/dist/protocol/agent-graph.js +4 -1
- package/node_modules/@maka/runtime-host/dist/protocol/artifact.js +11 -20
- package/node_modules/@maka/runtime-host/dist/protocol/client-capability.js +233 -41
- package/node_modules/@maka/runtime-host/dist/protocol/configuration.js +55 -9
- package/node_modules/@maka/runtime-host/dist/protocol/connection-catalog-change.js +26 -0
- package/node_modules/@maka/runtime-host/dist/protocol/connection-effects.js +15 -8
- package/node_modules/@maka/runtime-host/dist/protocol/external-agent-setup.js +149 -0
- package/node_modules/@maka/runtime-host/dist/protocol/external-session.js +4 -0
- package/node_modules/@maka/runtime-host/dist/protocol/host-resources.js +253 -0
- package/node_modules/@maka/runtime-host/dist/protocol/host-status.js +49 -11
- package/node_modules/@maka/runtime-host/dist/protocol/index.js +206 -2
- package/node_modules/@maka/runtime-host/dist/protocol/message.js +14 -9
- package/node_modules/@maka/runtime-host/dist/protocol/network-proxy.js +1 -7
- package/node_modules/@maka/runtime-host/dist/protocol/oauth.js +104 -8
- package/node_modules/@maka/runtime-host/dist/protocol/operations.js +22 -5
- package/node_modules/@maka/runtime-host/dist/protocol/peer-mesh.js +72 -32
- package/node_modules/@maka/runtime-host/dist/protocol/plan.js +1 -0
- package/node_modules/@maka/runtime-host/dist/protocol/plugin-platform.js +559 -0
- package/node_modules/@maka/runtime-host/dist/protocol/project-catalog.js +2 -2
- package/node_modules/@maka/runtime-host/dist/protocol/runtime-policy.js +81 -26
- package/node_modules/@maka/runtime-host/dist/protocol/scheduled-task.js +19 -6
- package/node_modules/@maka/runtime-host/dist/protocol/session-bundle.js +100 -0
- package/node_modules/@maka/runtime-host/dist/protocol/session-catalog.js +1 -1
- package/node_modules/@maka/runtime-host/dist/protocol/session-collaboration.js +68 -4
- package/node_modules/@maka/runtime-host/dist/protocol/session-continuity.js +44 -23
- package/node_modules/@maka/runtime-host/dist/protocol/session-retirement.js +30 -3
- package/node_modules/@maka/runtime-host/dist/protocol/session-revision.js +11 -2
- package/node_modules/@maka/runtime-host/dist/protocol/session-todo.js +53 -0
- package/node_modules/@maka/runtime-host/dist/protocol/session-transcript.js +3 -7
- package/node_modules/@maka/runtime-host/dist/protocol/session-turns.js +29 -58
- package/node_modules/@maka/runtime-host/dist/protocol/skill-catalog.js +2 -1
- package/node_modules/@maka/runtime-host/dist/protocol/turn.js +25 -14
- package/node_modules/@maka/runtime-host/dist/protocol/usage-pricing.js +20 -2
- package/node_modules/@maka/runtime-host/dist/protocol/workhub-coordination.js +212 -75
- package/node_modules/@maka/runtime-host/dist/server/access-authority.js +87 -22
- package/node_modules/@maka/runtime-host/dist/server/access-credential-metadata.js +4 -2
- package/node_modules/@maka/runtime-host/dist/server/access-credential-store.js +135 -48
- package/node_modules/@maka/runtime-host/dist/server/acp/antigravity-install.js +242 -0
- package/node_modules/@maka/runtime-host/dist/server/acp/antigravity.js +154 -0
- package/node_modules/@maka/runtime-host/dist/server/acp/connection.js +116 -0
- package/node_modules/@maka/runtime-host/dist/server/agent-graph-coordinator.js +0 -3
- package/node_modules/@maka/runtime-host/dist/server/agent-graph-execution-coordinator.js +1 -2
- package/node_modules/@maka/runtime-host/dist/server/artifact-coordinator.js +19 -22
- package/node_modules/@maka/runtime-host/dist/server/bootstrap-runtime-policy.js +10 -4
- package/node_modules/@maka/runtime-host/dist/server/candidate.js +3 -0
- package/node_modules/@maka/runtime-host/dist/server/canonical-session-projection.js +2 -1
- package/node_modules/@maka/runtime-host/dist/server/canonical-turn-snapshot.js +34 -24
- package/node_modules/@maka/runtime-host/dist/server/canonical-usage-reader.js +24 -11
- package/node_modules/@maka/runtime-host/dist/server/child-agent-composition.js +1 -1
- package/node_modules/@maka/runtime-host/dist/server/client-capability-coordinator.js +282 -30
- package/node_modules/@maka/runtime-host/dist/server/client-capability-invocation-broker.js +258 -51
- package/node_modules/@maka/runtime-host/dist/server/client-capability-provider-id.js +31 -0
- package/node_modules/@maka/runtime-host/dist/server/client-capability-recovery.js +10 -7
- package/node_modules/@maka/runtime-host/dist/server/configuration-coordinator.js +20 -1
- package/node_modules/@maka/runtime-host/dist/server/connection-effect-coordinator.js +43 -18
- package/node_modules/@maka/runtime-host/dist/server/connection-session.js +45 -14
- package/node_modules/@maka/runtime-host/dist/server/daily-review-coordinator.js +164 -82
- package/node_modules/@maka/runtime-host/dist/server/deep-research-coordinator.js +1 -1
- package/node_modules/@maka/runtime-host/dist/server/execution-artifacts.js +59 -36
- package/node_modules/@maka/runtime-host/dist/server/execution-composition.js +1076 -176
- package/node_modules/@maka/runtime-host/dist/server/execution-inspect-coordinator.js +35 -29
- package/node_modules/@maka/runtime-host/dist/server/execution-model-authority.js +112 -18
- package/node_modules/@maka/runtime-host/dist/server/execution-model-composition.js +85 -73
- package/node_modules/@maka/runtime-host/dist/server/execution-service.js +49 -24
- package/node_modules/@maka/runtime-host/dist/server/extension-bundle.js +249 -0
- package/node_modules/@maka/runtime-host/dist/server/extension-package-manifest.js +262 -0
- package/node_modules/@maka/runtime-host/dist/server/external-agent-setup-coordinator.js +190 -0
- package/node_modules/@maka/runtime-host/dist/server/external-session-coordinator.js +13 -10
- package/node_modules/@maka/runtime-host/dist/server/failure-diagnostic.js +24 -0
- package/node_modules/@maka/runtime-host/dist/server/goal-coordinator.js +134 -35
- package/node_modules/@maka/runtime-host/dist/server/host-change-feed.js +11 -0
- package/node_modules/@maka/runtime-host/dist/server/host-kernel.js +163 -27
- package/node_modules/@maka/runtime-host/dist/server/host-residency-registry.js +41 -20
- package/node_modules/@maka/runtime-host/dist/server/host-resource-collector.js +223 -0
- package/node_modules/@maka/runtime-host/dist/server/host-resource-probe-main.js +44 -0
- package/node_modules/@maka/runtime-host/dist/server/host-resource-probe.js +83 -0
- package/node_modules/@maka/runtime-host/dist/server/host-session-availability.js +5 -2
- package/node_modules/@maka/runtime-host/dist/server/hosted-execution-admission-registry.js +3 -1
- package/node_modules/@maka/runtime-host/dist/server/hosted-execution-projection.js +12 -7
- package/node_modules/@maka/runtime-host/dist/server/hosted-execution-recovery.js +131 -69
- package/node_modules/@maka/runtime-host/dist/server/hosted-execution-tool-profile.js +64 -4
- package/node_modules/@maka/runtime-host/dist/server/index.js +5 -0
- package/node_modules/@maka/runtime-host/dist/server/interaction-coordinator.js +370 -34
- package/node_modules/@maka/runtime-host/dist/server/interaction-projection.js +36 -1
- package/node_modules/@maka/runtime-host/dist/server/interactive-run-composer.js +173 -109
- package/node_modules/@maka/runtime-host/dist/server/json-array-page-budget.js +48 -0
- package/node_modules/@maka/runtime-host/dist/server/listener-set.js +6 -4
- package/node_modules/@maka/runtime-host/dist/server/memory-projection.js +14 -15
- package/node_modules/@maka/runtime-host/dist/server/message-coordinator.js +339 -66
- package/node_modules/@maka/runtime-host/dist/server/model-metadata-refresh.js +96 -0
- package/node_modules/@maka/runtime-host/dist/server/network-proxy-coordinator.js +0 -1
- package/node_modules/@maka/runtime-host/dist/server/oauth-coordinator.js +169 -45
- package/node_modules/@maka/runtime-host/dist/server/oauth-execution-authority.js +20 -3
- package/node_modules/@maka/runtime-host/dist/server/operation-dispatcher.js +47 -125
- package/node_modules/@maka/runtime-host/dist/server/peer-listener.js +131 -48
- package/node_modules/@maka/runtime-host/dist/server/peer-mesh-authority.js +20 -1
- package/node_modules/@maka/runtime-host/dist/server/plan-coordinator.js +11 -5
- package/node_modules/@maka/runtime-host/dist/server/plugin-composition-patch.js +58 -0
- package/node_modules/@maka/runtime-host/dist/server/plugin-composition-store.js +141 -0
- package/node_modules/@maka/runtime-host/dist/server/plugin-data-runtime.js +234 -0
- package/node_modules/@maka/runtime-host/dist/server/plugin-package-loader.js +130 -0
- package/node_modules/@maka/runtime-host/dist/server/plugin-package-store.js +528 -0
- package/node_modules/@maka/runtime-host/dist/server/plugin-platform-coordinator.js +263 -0
- package/node_modules/@maka/runtime-host/dist/server/plugin-platform.js +1148 -0
- package/node_modules/@maka/runtime-host/dist/server/project-catalog-coordinator.js +10 -12
- package/node_modules/@maka/runtime-host/dist/server/project-directory-authority.js +4 -3
- package/node_modules/@maka/runtime-host/dist/server/root-admission-owner.js +32 -7
- package/node_modules/@maka/runtime-host/dist/server/root-turn-coordinator.js +690 -188
- package/node_modules/@maka/runtime-host/dist/server/runtime-policy-coordinator.js +72 -18
- package/node_modules/@maka/runtime-host/dist/server/runtime-resource-coordinator.js +11 -8
- package/node_modules/@maka/runtime-host/dist/server/runtime-resource-projection.js +12 -18
- package/node_modules/@maka/runtime-host/dist/server/scheduled-task-coordinator.js +150 -41
- package/node_modules/@maka/runtime-host/dist/server/serial-outbound-writer.js +46 -4
- package/node_modules/@maka/runtime-host/dist/server/session-admission-gate.js +21 -1
- package/node_modules/@maka/runtime-host/dist/server/session-bundle-coordinator.js +163 -0
- package/node_modules/@maka/runtime-host/dist/server/session-catalog-coordinator.js +247 -33
- package/node_modules/@maka/runtime-host/dist/server/session-continuity-coordinator.js +112 -48
- package/node_modules/@maka/runtime-host/dist/server/session-effect-coordinator.js +1 -1
- package/node_modules/@maka/runtime-host/dist/server/session-retirement-coordinator.js +66 -14
- package/node_modules/@maka/runtime-host/dist/server/session-revision-coordinator.js +113 -67
- package/node_modules/@maka/runtime-host/dist/server/session-revision-graph-references.js +18 -10
- package/node_modules/@maka/runtime-host/dist/server/session-sidecar-purge.js +2 -1
- package/node_modules/@maka/runtime-host/dist/server/session-todo-coordinator.js +77 -0
- package/node_modules/@maka/runtime-host/dist/server/session-transcript-pager.js +34 -5
- package/node_modules/@maka/runtime-host/dist/server/session-transcript-reader.js +404 -87
- package/node_modules/@maka/runtime-host/dist/server/session-turn-access-request-coordinator.js +43 -26
- package/node_modules/@maka/runtime-host/dist/server/shared-session-transcript.js +4 -1
- package/node_modules/@maka/runtime-host/dist/server/skill-catalog-coordinator.js +18 -2
- package/node_modules/@maka/runtime-host/dist/server/skill-catalog-repository.js +16 -17
- package/node_modules/@maka/runtime-host/dist/server/storage-maintenance.js +109 -0
- package/node_modules/@maka/runtime-host/dist/server/usage-pricing-coordinator.js +79 -35
- package/node_modules/@maka/runtime-host/dist/server/web-fetch-tool.js +1 -1
- package/node_modules/@maka/runtime-host/dist/server/workhub-coordination-action-gate.js +566 -37
- package/node_modules/@maka/runtime-host/dist/server/workhub-coordination-coordinator.js +590 -131
- package/node_modules/@maka/runtime-host/dist/server/workhub-message-attachments.js +46 -0
- package/node_modules/@maka/runtime-host/dist/transport/framed-byte-stream-transport.js +4 -1
- package/node_modules/@maka/runtime-host/dist/transport/local-ipc-framing.js +4 -2
- package/node_modules/@maka/runtime-host/dist/transport/peer-native.js +112 -24
- package/node_modules/@maka/runtime-host/dist/transport/resumable-peer-stream.js +469 -0
- package/node_modules/@maka/runtime-host/dist/webrtc-stun-policy.js +114 -0
- package/node_modules/@maka/runtime-host/package.json +7 -1
- package/node_modules/@maka/storage/dist/agent-run-store.js +355 -238
- package/node_modules/@maka/storage/dist/artifact-attachments.js +66 -18
- package/node_modules/@maka/storage/dist/artifact-metadata-codec.js +24 -28
- package/node_modules/@maka/storage/dist/artifact-store.js +203 -767
- package/node_modules/@maka/storage/dist/artifact-stores.js +6 -10
- package/node_modules/@maka/storage/dist/artifact-writer-lock.js +1 -1
- package/node_modules/@maka/storage/dist/atomic-file-write.js +74 -0
- package/node_modules/@maka/storage/dist/claude-code-session-adapter.js +0 -5
- package/node_modules/@maka/storage/dist/codex-session-adapter.js +298 -198
- package/node_modules/@maka/storage/dist/context-offload-snapshot.js +397 -0
- package/node_modules/@maka/storage/dist/context-value-mutation-gate.js +59 -0
- package/node_modules/@maka/storage/dist/conversation-operational-state.js +7 -0
- package/node_modules/@maka/storage/dist/credential-store.js +15 -63
- package/node_modules/@maka/storage/dist/execution-record-codec.js +1 -22
- package/node_modules/@maka/storage/dist/execution-stores.js +38 -21
- package/node_modules/@maka/storage/dist/file-lifetime-owner.js +30 -2
- package/node_modules/@maka/storage/dist/file-session-repository.js +1012 -0
- package/node_modules/@maka/storage/dist/git-exec.js +61 -0
- package/node_modules/@maka/storage/dist/git-worktree-child-executor.js +8 -35
- package/node_modules/@maka/storage/dist/goal-authority.js +2 -2
- package/node_modules/@maka/storage/dist/interaction-store-public.js +1 -1
- package/node_modules/@maka/storage/dist/interaction-store.js +188 -3
- package/node_modules/@maka/storage/dist/legacy-run-header.js +327 -0
- package/node_modules/@maka/storage/dist/mcp-config-store.js +10 -25
- package/node_modules/@maka/storage/dist/message-admission-store.js +3 -0
- package/node_modules/@maka/storage/dist/model-call-ledger.js +199 -32
- package/node_modules/@maka/storage/dist/model-call-usage-sql.js +136 -0
- package/node_modules/@maka/storage/dist/model-facts-store.js +56 -0
- package/node_modules/@maka/storage/dist/opencode-session-adapter.js +0 -4
- package/node_modules/@maka/storage/dist/operational-state-backup.js +15 -11
- package/node_modules/@maka/storage/dist/operational-state-store-public.js +1 -1
- package/node_modules/@maka/storage/dist/operational-state-store.js +27 -2
- package/node_modules/@maka/storage/dist/production-session-snapshot.js +761 -0
- package/node_modules/@maka/storage/dist/project-catalog.js +8 -23
- package/node_modules/@maka/storage/dist/quiescent-session-snapshot.js +1154 -0
- package/node_modules/@maka/storage/dist/runtime-event-invariants.js +2 -2
- package/node_modules/@maka/storage/dist/runtime-event-persistence.js +6 -0
- package/node_modules/@maka/storage/dist/runtime-policy/connection-catalog-document.js +182 -62
- package/node_modules/@maka/storage/dist/runtime-policy/coordinator.js +540 -117
- package/node_modules/@maka/storage/dist/runtime-policy/document-io.js +22 -16
- package/node_modules/@maka/storage/dist/runtime-policy/oauth-login-receipt-document.js +207 -0
- package/node_modules/@maka/storage/dist/runtime-policy/onboarding-transaction.js +148 -5
- package/node_modules/@maka/storage/dist/runtime-policy/policy-document.js +10 -4
- package/node_modules/@maka/storage/dist/runtime-policy-stores.js +7 -3
- package/node_modules/@maka/storage/dist/runtime-transcript-query.js +321 -0
- package/node_modules/@maka/storage/dist/scheduled-task-store.js +256 -283
- package/node_modules/@maka/storage/dist/session-bundle-manifest.js +5 -17
- package/node_modules/@maka/storage/dist/session-bundle-policy.js +1031 -34
- package/node_modules/@maka/storage/dist/session-bundle-ustar.js +12 -0
- package/node_modules/@maka/storage/dist/session-copy-cleanup.js +12 -7
- package/node_modules/@maka/storage/dist/session-message-projection.js +24 -5
- package/node_modules/@maka/storage/dist/session-repository.js +767 -0
- package/node_modules/@maka/storage/dist/session-store.js +110 -115
- package/node_modules/@maka/storage/dist/session-todo-authority.js +106 -0
- package/node_modules/@maka/storage/dist/session-todo-store.js +169 -0
- package/node_modules/@maka/storage/dist/settings-store.js +24 -29
- package/node_modules/@maka/storage/dist/sqlite-artifact-metadata.js +51 -17
- package/node_modules/@maka/storage/dist/sqlite-artifact-schema.js +55 -5
- package/node_modules/@maka/storage/dist/sqlite-context-offload-store.js +42 -12
- package/node_modules/@maka/storage/dist/sqlite-core-execution-schema.js +45 -2
- package/node_modules/@maka/storage/dist/sqlite-runtime-schema.js +367 -1
- package/node_modules/@maka/storage/dist/sqlite-runtime-store.js +439 -82
- package/node_modules/@maka/storage/dist/sqlite-session-metadata-schema.js +63 -5
- package/node_modules/@maka/storage/dist/sqlite-session-metadata-store.js +493 -914
- package/node_modules/@maka/storage/dist/sqlite-usage-schema.js +200 -20
- package/node_modules/@maka/storage/dist/sqlite-usage-store.js +29 -6
- package/node_modules/@maka/storage/dist/sqlite-workflow-schema.js +5 -8
- package/node_modules/@maka/storage/dist/stable-storage.js +16 -2
- package/node_modules/@maka/storage/dist/storage-id.js +28 -0
- package/node_modules/@maka/storage/dist/storage-writer-composition.js +3 -3
- package/node_modules/@maka/storage/dist/tool-result-archive-evidence.js +138 -0
- package/node_modules/@maka/storage/dist/usage-stores.js +9 -3
- package/node_modules/@maka/storage/dist/work-board-store.js +4 -4
- package/node_modules/@maka/storage/dist/workspace-identity.js +2 -15
- package/node_modules/@maka/storage/dist/workspace-version-authority-internal.js +1 -8
- package/node_modules/@maka/storage/package.json +8 -2
- package/node_modules/@modelcontextprotocol/client/dist/src-D_zzAWoS.mjs +22 -5
- package/node_modules/@modelcontextprotocol/client/dist/src-NAgB4Mp8.cjs +22 -5
- package/node_modules/@slack/types/dist/events/agent.js +3 -0
- package/node_modules/@slack/types/dist/events/index.js +44 -0
- package/node_modules/@slack/types/package.json +47 -0
- package/node_modules/@slack/web-api/README.md +382 -0
- package/node_modules/@slack/web-api/dist/methods.js +1636 -0
- package/node_modules/@slack/web-api/dist/types/request/agents.js +3 -0
- package/node_modules/@slack/web-api/dist/types/request/blocks.js +3 -0
- package/node_modules/@slack/web-api/dist/types/response/AdminUsersGetExpirationResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/AgentsSessionsRenameResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/AgentsSessionsSetStatusResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/BlocksValidateResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/ChatAppendStreamResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/ChatStartStreamResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/ChatStopStreamResponse.js +48 -0
- package/node_modules/@slack/web-api/dist/types/response/PinsListResponse.js +67 -0
- package/node_modules/@slack/web-api/dist/types/response/SearchAllResponse.js +72 -0
- package/node_modules/@slack/web-api/dist/types/response/SearchFilesResponse.js +48 -0
- package/node_modules/@slack/web-api/dist/types/response/SlackListsAccessDeleteResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/SlackListsAccessSetResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/SlackListsCreateResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/SlackListsDownloadGetResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/SlackListsDownloadStartResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/SlackListsItemsCreateResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/SlackListsItemsDeleteMultipleResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/SlackListsItemsDeleteResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/SlackListsItemsInfoResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/SlackListsItemsListResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/SlackListsItemsUpdateResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/SlackListsUpdateResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/WorkflowsFeaturedAddResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/WorkflowsFeaturedListResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/WorkflowsFeaturedRemoveResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/WorkflowsFeaturedSetResponse.js +11 -0
- package/node_modules/@slack/web-api/node_modules/@types/retry/LICENSE +21 -0
- package/node_modules/@slack/web-api/node_modules/@types/retry/README.md +15 -0
- package/node_modules/@slack/web-api/node_modules/@types/retry/package.json +30 -0
- package/node_modules/@slack/web-api/package.json +71 -0
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/package.json +2 -2
- package/node_modules/balanced-match/LICENSE.md +23 -0
- package/node_modules/balanced-match/README.md +57 -0
- package/node_modules/balanced-match/dist/commonjs/index.js +59 -0
- package/node_modules/balanced-match/dist/commonjs/package.json +3 -0
- package/node_modules/balanced-match/dist/esm/index.js +54 -0
- package/node_modules/balanced-match/dist/esm/package.json +3 -0
- package/node_modules/balanced-match/package.json +68 -0
- package/node_modules/brace-expansion/LICENSE +23 -0
- package/node_modules/brace-expansion/README.md +105 -0
- package/node_modules/brace-expansion/dist/commonjs/index.js +289 -0
- package/node_modules/brace-expansion/dist/commonjs/package.json +3 -0
- package/node_modules/brace-expansion/dist/esm/index.js +285 -0
- package/node_modules/brace-expansion/dist/esm/package.json +3 -0
- package/node_modules/brace-expansion/package.json +64 -0
- package/node_modules/fast-uri/index.js +215 -47
- package/node_modules/fast-uri/lib/schemes.js +9 -4
- package/node_modules/fast-uri/lib/utils.js +396 -92
- package/node_modules/fast-uri/package.json +1 -1
- package/node_modules/fs-native-extensions/package.json +1 -1
- package/node_modules/fs-native-extensions/prebuilds/android-arm/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/android-arm64/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/android-ia32/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/android-x64/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/darwin-arm64/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/darwin-arm64/fs-native-extensions.node +0 -0
- package/node_modules/fs-native-extensions/prebuilds/darwin-x64/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/darwin-x64/fs-native-extensions.node +0 -0
- package/node_modules/fs-native-extensions/prebuilds/ios-arm64/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/ios-arm64-simulator/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/ios-x64-simulator/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/linux-arm64/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/linux-x64/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/win32-arm64/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/win32-arm64/fs-native-extensions.node +0 -0
- package/node_modules/fs-native-extensions/prebuilds/win32-x64/fs-native-extensions.bare +0 -0
- package/node_modules/fs-native-extensions/prebuilds/win32-x64/fs-native-extensions.node +0 -0
- package/node_modules/fs-native-extensions/src/win32.c +50 -11
- package/node_modules/glob/LICENSE.md +63 -0
- package/node_modules/glob/README.md +1203 -0
- package/node_modules/glob/dist/commonjs/glob.js +248 -0
- package/node_modules/glob/dist/commonjs/has-magic.js +27 -0
- package/node_modules/glob/dist/commonjs/ignore.js +119 -0
- package/node_modules/glob/dist/commonjs/index.js +68 -0
- package/node_modules/glob/dist/commonjs/index.min.js +4 -0
- package/node_modules/glob/dist/commonjs/package.json +3 -0
- package/node_modules/glob/dist/commonjs/pattern.js +223 -0
- package/node_modules/glob/dist/commonjs/processor.js +301 -0
- package/node_modules/glob/dist/commonjs/walker.js +387 -0
- package/node_modules/glob/dist/esm/glob.js +244 -0
- package/node_modules/glob/dist/esm/has-magic.js +23 -0
- package/node_modules/glob/dist/esm/ignore.js +115 -0
- package/node_modules/glob/dist/esm/index.js +55 -0
- package/node_modules/glob/dist/esm/index.min.js +4 -0
- package/node_modules/glob/dist/esm/package.json +3 -0
- package/node_modules/glob/dist/esm/pattern.js +219 -0
- package/node_modules/glob/dist/esm/processor.js +294 -0
- package/node_modules/glob/dist/esm/walker.js +381 -0
- package/node_modules/glob/package.json +98 -0
- package/node_modules/minimatch/LICENSE.md +55 -0
- package/node_modules/minimatch/README.md +528 -0
- package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js +14 -0
- package/node_modules/minimatch/dist/commonjs/ast.js +845 -0
- package/node_modules/minimatch/dist/commonjs/brace-expressions.js +150 -0
- package/node_modules/minimatch/dist/commonjs/escape.js +30 -0
- package/node_modules/minimatch/dist/commonjs/index.js +1127 -0
- package/node_modules/minimatch/dist/commonjs/package.json +3 -0
- package/node_modules/minimatch/dist/commonjs/unescape.js +38 -0
- package/node_modules/minimatch/dist/esm/assert-valid-pattern.js +10 -0
- package/node_modules/minimatch/dist/esm/ast.js +841 -0
- package/node_modules/minimatch/dist/esm/brace-expressions.js +146 -0
- package/node_modules/minimatch/dist/esm/escape.js +26 -0
- package/node_modules/minimatch/dist/esm/index.js +1114 -0
- package/node_modules/minimatch/dist/esm/package.json +3 -0
- package/node_modules/minimatch/dist/esm/unescape.js +34 -0
- package/node_modules/minimatch/package.json +73 -0
- package/node_modules/minipass/LICENSE.md +55 -0
- package/node_modules/minipass/README.md +825 -0
- package/node_modules/minipass/dist/commonjs/index.js +1038 -0
- package/node_modules/minipass/dist/commonjs/package.json +3 -0
- package/node_modules/minipass/dist/esm/index.js +1020 -0
- package/node_modules/minipass/dist/esm/package.json +3 -0
- package/node_modules/minipass/package.json +77 -0
- package/node_modules/path-scurry/LICENSE.md +55 -0
- package/node_modules/path-scurry/README.md +636 -0
- package/node_modules/path-scurry/dist/commonjs/index.js +2018 -0
- package/node_modules/path-scurry/dist/commonjs/package.json +3 -0
- package/node_modules/path-scurry/dist/esm/index.js +1983 -0
- package/node_modules/path-scurry/dist/esm/package.json +3 -0
- package/node_modules/path-scurry/node_modules/lru-cache/LICENSE.md +55 -0
- package/node_modules/path-scurry/node_modules/lru-cache/README.md +469 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel.js +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/index.js +1726 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/index.min.js +2 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/perf.js +10 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/diagnostics-channel-cjs.d.cts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/diagnostics-channel.js +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.js +1726 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.min.js +2 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel.js +9 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/index.js +1726 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/index.min.js +2 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/perf.js +10 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/package.json +3 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/perf.js +10 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/diagnostics-channel.js +4 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/index.js +1722 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/index.min.js +2 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/perf.js +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/diagnostics-channel-esm.d.mts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/diagnostics-channel.js +19 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.js +1722 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.min.js +2 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/diagnostics-channel.js +6 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/index.js +1722 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/index.min.js +2 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/perf.js +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/package.json +3 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/perf.js +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/package.json +154 -0
- package/node_modules/path-scurry/package.json +72 -0
- package/node_modules/qs/.github/THREAT_MODEL.md +3 -3
- package/node_modules/qs/CHANGELOG.md +15 -0
- package/node_modules/qs/README.md +19 -1
- package/node_modules/qs/dist/qs.js +21 -21
- package/node_modules/qs/eslint.config.mjs +1 -1
- package/node_modules/qs/lib/parse.js +3 -4
- package/node_modules/qs/lib/stringify.js +23 -8
- package/node_modules/qs/lib/utils.js +10 -3
- package/node_modules/qs/package.json +4 -4
- package/node_modules/run/README.md +109 -18
- package/node_modules/run/THIRD_PARTY_NOTICES.md +11 -11
- package/node_modules/run/dist/continuation-validation.js +116 -1
- package/node_modules/run/dist/errors.js +12 -2
- package/node_modules/run/dist/host-function-invocation.js +2 -1
- package/node_modules/run/dist/run.js +30 -4
- package/node_modules/run/dist/runtime/guest-serde-source.js +1 -1
- package/node_modules/run/dist/runtime/guest-sources.js +214 -56
- package/node_modules/run/dist/runtime/manager.js +575 -116
- package/node_modules/run/dist/runtime/max-workers.js +8 -4
- package/node_modules/run/dist/runtime/protocol-validation.js +20 -7
- package/node_modules/run/dist/runtime/sync-bridge-protocol.js +135 -0
- package/node_modules/run/dist/runtime/worker-source.js +1 -1
- package/node_modules/run/dist/utils/options.js +7 -0
- package/node_modules/run/dist/utils/promise-with-resolvers.js +13 -1
- package/node_modules/run/dist/utils/serde.js +1 -7
- package/node_modules/run/dist/utils/source-cache.js +83 -13
- package/node_modules/run/package.json +6 -4
- package/node_modules/systeminformation/LICENSE +20 -0
- package/node_modules/systeminformation/README.md +1251 -0
- package/node_modules/systeminformation/lib/audio.js +335 -0
- package/node_modules/systeminformation/lib/battery.js +334 -0
- package/node_modules/systeminformation/lib/bluetooth.js +315 -0
- package/node_modules/systeminformation/lib/bluetoothVendors.js +1138 -0
- package/node_modules/systeminformation/lib/cli.js +100 -0
- package/node_modules/systeminformation/lib/cpu.js +2285 -0
- package/node_modules/systeminformation/lib/docker.js +791 -0
- package/node_modules/systeminformation/lib/dockerSocket.js +117 -0
- package/node_modules/systeminformation/lib/filesystem.js +1853 -0
- package/node_modules/systeminformation/lib/graphics.js +1317 -0
- package/node_modules/systeminformation/lib/index.js +520 -0
- package/node_modules/systeminformation/lib/internet.js +265 -0
- package/node_modules/systeminformation/lib/memory.js +622 -0
- package/node_modules/systeminformation/lib/network.js +2008 -0
- package/node_modules/systeminformation/lib/osinfo.js +1290 -0
- package/node_modules/systeminformation/lib/printer.js +209 -0
- package/node_modules/systeminformation/lib/processes.js +1459 -0
- package/node_modules/systeminformation/lib/system.js +855 -0
- package/node_modules/systeminformation/lib/usb.js +309 -0
- package/node_modules/systeminformation/lib/users.js +412 -0
- package/node_modules/systeminformation/lib/util.js +2833 -0
- package/node_modules/systeminformation/lib/virtualbox.js +116 -0
- package/node_modules/systeminformation/lib/wifi.js +839 -0
- package/node_modules/systeminformation/package.json +102 -0
- package/node_modules/undici/docs/docs/api/Client.md +4 -0
- package/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +3 -2
- package/node_modules/undici/docs/docs/api/EventSource.md +4 -0
- package/node_modules/undici/lib/cache/memory-cache-store.js +1 -1
- package/node_modules/undici/lib/dispatcher/agent.js +7 -2
- package/node_modules/undici/lib/dispatcher/balanced-pool.js +1 -1
- package/node_modules/undici/lib/dispatcher/client-h1.js +12 -4
- package/node_modules/undici/lib/dispatcher/client-h2.js +43 -3
- package/node_modules/undici/lib/dispatcher/client.js +3 -2
- package/node_modules/undici/lib/dispatcher/dispatcher-base.js +13 -1
- package/node_modules/undici/lib/dispatcher/dispatcher.js +10 -0
- package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +10 -3
- package/node_modules/undici/lib/dispatcher/proxy-agent.js +1 -1
- package/node_modules/undici/lib/dispatcher/round-robin-pool.js +1 -1
- package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +3 -1
- package/node_modules/undici/lib/handler/cache-handler.js +8 -0
- package/node_modules/undici/lib/handler/decorator-handler.js +7 -1
- package/node_modules/undici/lib/handler/deduplication-handler.js +12 -6
- package/node_modules/undici/lib/handler/redirect-handler.js +8 -0
- package/node_modules/undici/lib/handler/retry-handler.js +83 -11
- package/node_modules/undici/lib/interceptor/dump.js +1 -1
- package/node_modules/undici/lib/mock/mock-agent.js +13 -1
- package/node_modules/undici/lib/mock/mock-utils.js +11 -10
- package/node_modules/undici/lib/web/cookies/parse.js +4 -2
- package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +28 -1
- package/node_modules/undici/lib/web/eventsource/eventsource.js +4 -1
- package/node_modules/undici/lib/web/fetch/request.js +2 -3
- package/node_modules/undici/package.json +3 -3
- package/node_modules/zod/README.md +27 -0
- package/node_modules/zod/compile.cjs +77 -0
- package/node_modules/zod/compile.js +52 -0
- package/node_modules/zod/index.cjs +2 -2
- package/node_modules/zod/index.js +5 -2
- package/node_modules/zod/package.json +13 -2
- package/node_modules/zod/v3/ZodError.cjs +22 -12
- package/node_modules/zod/v3/ZodError.js +22 -12
- package/node_modules/zod/v3/types.cjs +7 -5
- package/node_modules/zod/v3/types.js +7 -5
- package/node_modules/zod/v4/classic/checks.cjs +2 -1
- package/node_modules/zod/v4/classic/checks.js +1 -1
- package/node_modules/zod/v4/classic/deep-partial.cjs +39 -0
- package/node_modules/zod/v4/classic/deep-partial.js +13 -0
- package/node_modules/zod/v4/classic/errors.cjs +43 -34
- package/node_modules/zod/v4/classic/errors.js +43 -34
- package/node_modules/zod/v4/classic/external.cjs +30 -27
- package/node_modules/zod/v4/classic/external.js +5 -8
- package/node_modules/zod/v4/classic/from-json-schema.cjs +136 -75
- package/node_modules/zod/v4/classic/from-json-schema.js +136 -75
- package/node_modules/zod/v4/classic/in-out.cjs +63 -0
- package/node_modules/zod/v4/classic/in-out.js +36 -0
- package/node_modules/zod/v4/classic/index.cjs +2 -2
- package/node_modules/zod/v4/classic/index.js +2 -2
- package/node_modules/zod/v4/classic/iso.cjs +11 -22
- package/node_modules/zod/v4/classic/iso.js +2 -17
- package/node_modules/zod/v4/classic/parse.cjs +4 -1
- package/node_modules/zod/v4/classic/parse.js +1 -0
- package/node_modules/zod/v4/classic/schemas.cjs +498 -398
- package/node_modules/zod/v4/classic/schemas.js +492 -396
- package/node_modules/zod/v4/core/api.cjs +23 -4
- package/node_modules/zod/v4/core/api.js +21 -4
- package/node_modules/zod/v4/core/checks.cjs +37 -31
- package/node_modules/zod/v4/core/checks.js +37 -31
- package/node_modules/zod/v4/core/compile.cjs +1813 -0
- package/node_modules/zod/v4/core/compile.js +1783 -0
- package/node_modules/zod/v4/core/core.cjs +81 -18
- package/node_modules/zod/v4/core/core.js +82 -19
- package/node_modules/zod/v4/core/doc.cjs +5 -7
- package/node_modules/zod/v4/core/doc.js +5 -7
- package/node_modules/zod/v4/core/errors.cjs +110 -25
- package/node_modules/zod/v4/core/errors.js +110 -25
- package/node_modules/zod/v4/core/index.cjs +5 -1
- package/node_modules/zod/v4/core/index.js +3 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +4 -0
- package/node_modules/zod/v4/core/json-schema-generator.js +4 -0
- package/node_modules/zod/v4/core/json-schema-processors.cjs +264 -95
- package/node_modules/zod/v4/core/json-schema-processors.js +243 -97
- package/node_modules/zod/v4/core/memoizer.cjs +268 -0
- package/node_modules/zod/v4/core/memoizer.js +261 -0
- package/node_modules/zod/v4/core/parse.cjs +96 -34
- package/node_modules/zod/v4/core/parse.js +94 -33
- package/node_modules/zod/v4/core/regexes.cjs +27 -15
- package/node_modules/zod/v4/core/regexes.js +24 -13
- package/node_modules/zod/v4/core/registries.js +2 -2
- package/node_modules/zod/v4/core/schemas.cjs +537 -326
- package/node_modules/zod/v4/core/schemas.js +526 -325
- package/node_modules/zod/v4/core/to-json-schema.cjs +242 -39
- package/node_modules/zod/v4/core/to-json-schema.js +241 -39
- package/node_modules/zod/v4/core/util.cjs +212 -31
- package/node_modules/zod/v4/core/util.js +202 -30
- package/node_modules/zod/v4/core/versions.cjs +2 -2
- package/node_modules/zod/v4/core/versions.js +2 -2
- package/node_modules/zod/v4/core/visit.cjs +195 -0
- package/node_modules/zod/v4/core/visit.js +169 -0
- package/node_modules/zod/v4/index.cjs +15 -5
- package/node_modules/zod/v4/index.js +3 -2
- package/node_modules/zod/v4/locales/ar.cjs +3 -0
- package/node_modules/zod/v4/locales/ar.js +3 -0
- package/node_modules/zod/v4/locales/az.cjs +3 -0
- package/node_modules/zod/v4/locales/az.js +3 -0
- package/node_modules/zod/v4/locales/be.cjs +10 -0
- package/node_modules/zod/v4/locales/be.js +10 -0
- package/node_modules/zod/v4/locales/bg.cjs +3 -0
- package/node_modules/zod/v4/locales/bg.js +3 -0
- package/node_modules/zod/v4/locales/bn.cjs +138 -0
- package/node_modules/zod/v4/locales/bn.js +111 -0
- package/node_modules/zod/v4/locales/ca.cjs +3 -0
- package/node_modules/zod/v4/locales/ca.js +3 -0
- package/node_modules/zod/v4/locales/ckb.cjs +158 -0
- package/node_modules/zod/v4/locales/ckb.js +131 -0
- package/node_modules/zod/v4/locales/cs.cjs +3 -0
- package/node_modules/zod/v4/locales/cs.js +3 -0
- package/node_modules/zod/v4/locales/da.cjs +5 -2
- package/node_modules/zod/v4/locales/da.js +5 -2
- package/node_modules/zod/v4/locales/de.cjs +3 -0
- package/node_modules/zod/v4/locales/de.js +3 -0
- package/node_modules/zod/v4/locales/el.cjs +1 -0
- package/node_modules/zod/v4/locales/el.js +1 -0
- package/node_modules/zod/v4/locales/en.cjs +14 -4
- package/node_modules/zod/v4/locales/en.js +14 -4
- package/node_modules/zod/v4/locales/eo.cjs +3 -0
- package/node_modules/zod/v4/locales/eo.js +3 -0
- package/node_modules/zod/v4/locales/es.cjs +2 -0
- package/node_modules/zod/v4/locales/es.js +2 -0
- package/node_modules/zod/v4/locales/fa.cjs +3 -0
- package/node_modules/zod/v4/locales/fa.js +3 -0
- package/node_modules/zod/v4/locales/fi.cjs +3 -0
- package/node_modules/zod/v4/locales/fi.js +3 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +3 -0
- package/node_modules/zod/v4/locales/fr-CA.js +3 -0
- package/node_modules/zod/v4/locales/fr.cjs +16 -14
- package/node_modules/zod/v4/locales/fr.js +16 -14
- package/node_modules/zod/v4/locales/gu.cjs +138 -0
- package/node_modules/zod/v4/locales/gu.js +111 -0
- package/node_modules/zod/v4/locales/he.cjs +5 -0
- package/node_modules/zod/v4/locales/he.js +5 -0
- package/node_modules/zod/v4/locales/hi.cjs +136 -0
- package/node_modules/zod/v4/locales/hi.js +109 -0
- package/node_modules/zod/v4/locales/hr.cjs +2 -0
- package/node_modules/zod/v4/locales/hr.js +2 -0
- package/node_modules/zod/v4/locales/hu.cjs +3 -0
- package/node_modules/zod/v4/locales/hu.js +3 -0
- package/node_modules/zod/v4/locales/hy.cjs +9 -0
- package/node_modules/zod/v4/locales/hy.js +9 -0
- package/node_modules/zod/v4/locales/id.cjs +3 -0
- package/node_modules/zod/v4/locales/id.js +3 -0
- package/node_modules/zod/v4/locales/index.cjs +22 -2
- package/node_modules/zod/v4/locales/index.js +10 -0
- package/node_modules/zod/v4/locales/is.cjs +3 -0
- package/node_modules/zod/v4/locales/is.js +3 -0
- package/node_modules/zod/v4/locales/it.cjs +3 -0
- package/node_modules/zod/v4/locales/it.js +3 -0
- package/node_modules/zod/v4/locales/ja.cjs +3 -0
- package/node_modules/zod/v4/locales/ja.js +3 -0
- package/node_modules/zod/v4/locales/ka.cjs +3 -0
- package/node_modules/zod/v4/locales/ka.js +3 -0
- package/node_modules/zod/v4/locales/km.cjs +3 -0
- package/node_modules/zod/v4/locales/km.js +3 -0
- package/node_modules/zod/v4/locales/kn.cjs +141 -0
- package/node_modules/zod/v4/locales/kn.js +114 -0
- package/node_modules/zod/v4/locales/ko.cjs +3 -0
- package/node_modules/zod/v4/locales/ko.js +3 -0
- package/node_modules/zod/v4/locales/lt.cjs +2 -0
- package/node_modules/zod/v4/locales/lt.js +2 -0
- package/node_modules/zod/v4/locales/mk.cjs +3 -0
- package/node_modules/zod/v4/locales/mk.js +3 -0
- package/node_modules/zod/v4/locales/ms.cjs +3 -0
- package/node_modules/zod/v4/locales/ms.js +3 -0
- package/node_modules/zod/v4/locales/ne.cjs +136 -0
- package/node_modules/zod/v4/locales/ne.js +109 -0
- package/node_modules/zod/v4/locales/nl.cjs +3 -0
- package/node_modules/zod/v4/locales/nl.js +3 -0
- package/node_modules/zod/v4/locales/nn.cjs +138 -0
- package/node_modules/zod/v4/locales/nn.js +111 -0
- package/node_modules/zod/v4/locales/no.cjs +5 -2
- package/node_modules/zod/v4/locales/no.js +5 -2
- package/node_modules/zod/v4/locales/ota.cjs +3 -0
- package/node_modules/zod/v4/locales/ota.js +3 -0
- package/node_modules/zod/v4/locales/pl.cjs +3 -0
- package/node_modules/zod/v4/locales/pl.js +3 -0
- package/node_modules/zod/v4/locales/ps.cjs +3 -0
- package/node_modules/zod/v4/locales/ps.js +3 -0
- package/node_modules/zod/v4/locales/pt-BR.cjs +168 -0
- package/node_modules/zod/v4/locales/pt-BR.js +141 -0
- package/node_modules/zod/v4/locales/pt.cjs +87 -55
- package/node_modules/zod/v4/locales/pt.js +87 -55
- package/node_modules/zod/v4/locales/ro.cjs +1 -0
- package/node_modules/zod/v4/locales/ro.js +1 -0
- package/node_modules/zod/v4/locales/ru.cjs +10 -0
- package/node_modules/zod/v4/locales/ru.js +10 -0
- package/node_modules/zod/v4/locales/sk.cjs +141 -0
- package/node_modules/zod/v4/locales/sk.js +114 -0
- package/node_modules/zod/v4/locales/sl.cjs +3 -0
- package/node_modules/zod/v4/locales/sl.js +3 -0
- package/node_modules/zod/v4/locales/sv.cjs +5 -2
- package/node_modules/zod/v4/locales/sv.js +5 -2
- package/node_modules/zod/v4/locales/ta.cjs +3 -0
- package/node_modules/zod/v4/locales/ta.js +3 -0
- package/node_modules/zod/v4/locales/th.cjs +3 -0
- package/node_modules/zod/v4/locales/th.js +3 -0
- package/node_modules/zod/v4/locales/tk.cjs +132 -0
- package/node_modules/zod/v4/locales/tk.js +105 -0
- package/node_modules/zod/v4/locales/tr.cjs +3 -0
- package/node_modules/zod/v4/locales/tr.js +3 -0
- package/node_modules/zod/v4/locales/uk.cjs +3 -0
- package/node_modules/zod/v4/locales/uk.js +3 -0
- package/node_modules/zod/v4/locales/ur.cjs +3 -0
- package/node_modules/zod/v4/locales/ur.js +3 -0
- package/node_modules/zod/v4/locales/uz.cjs +1 -0
- package/node_modules/zod/v4/locales/uz.js +1 -0
- package/node_modules/zod/v4/locales/vi.cjs +3 -0
- package/node_modules/zod/v4/locales/vi.js +3 -0
- package/node_modules/zod/v4/locales/yo.cjs +3 -0
- package/node_modules/zod/v4/locales/yo.js +3 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +3 -0
- package/node_modules/zod/v4/locales/zh-CN.js +3 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +3 -0
- package/node_modules/zod/v4/locales/zh-TW.js +3 -0
- package/node_modules/zod/v4/mini/checks.cjs +2 -1
- package/node_modules/zod/v4/mini/checks.js +1 -1
- package/node_modules/zod/v4/mini/deep-partial.cjs +39 -0
- package/node_modules/zod/v4/mini/deep-partial.js +13 -0
- package/node_modules/zod/v4/mini/external.cjs +12 -1
- package/node_modules/zod/v4/mini/external.js +3 -1
- package/node_modules/zod/v4/mini/in-out.cjs +63 -0
- package/node_modules/zod/v4/mini/in-out.js +36 -0
- package/node_modules/zod/v4/mini/parse.cjs +3 -1
- package/node_modules/zod/v4/mini/parse.js +1 -1
- package/node_modules/zod/v4/mini/schemas.cjs +75 -47
- package/node_modules/zod/v4/mini/schemas.js +71 -45
- package/package.json +3 -4
- package/node_modules/@ai-sdk/code-mode/dist/run-code-mode.js +0 -549
- package/node_modules/@ai-sdk/code-mode/package.json +0 -78
- package/node_modules/@ai-sdk/gateway/CHANGELOG.md +0 -3067
- package/node_modules/@ai-sdk/gateway/dist/index.js +0 -3208
- package/node_modules/@ai-sdk/gateway/docs/00-ai-gateway.mdx +0 -1297
- package/node_modules/@ai-sdk/gateway/package.json +0 -80
- package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider-utils/CHANGELOG.md +0 -2444
- package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider-utils/README.md +0 -1
- package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider-utils/dist/index.js +0 -4295
- package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider-utils/package.json +0 -82
- package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider-utils/src/to-json-schema/zod3-to-json-schema/LICENSE +0 -16
- package/node_modules/@ai-sdk/open-responses/node_modules/@ai-sdk/provider-utils/src/to-json-schema/zod3-to-json-schema/README.md +0 -24
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/LICENSE +0 -21
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/README.md +0 -741
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Agent.md +0 -84
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/BalancedPool.md +0 -99
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/CacheStorage.md +0 -30
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/CacheStore.md +0 -164
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Client.md +0 -288
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/ClientStats.md +0 -27
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Connector.md +0 -115
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/ContentType.md +0 -57
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Cookies.md +0 -128
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Debug.md +0 -62
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +0 -315
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Dispatcher.md +0 -1392
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +0 -159
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Errors.md +0 -49
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/EventSource.md +0 -45
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Fetch.md +0 -60
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/GlobalInstallation.md +0 -139
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/H2CClient.md +0 -263
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/MockAgent.md +0 -603
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/MockCallHistory.md +0 -197
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/MockCallHistoryLog.md +0 -43
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/MockClient.md +0 -81
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/MockErrors.md +0 -12
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/MockPool.md +0 -555
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Pool.md +0 -84
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/PoolStats.md +0 -35
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/ProxyAgent.md +0 -229
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/RedirectHandler.md +0 -93
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/RetryAgent.md +0 -50
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/RetryHandler.md +0 -118
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/RoundRobinPool.md +0 -145
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/SnapshotAgent.md +0 -616
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +0 -275
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/Util.md +0 -25
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/WebSocket.md +0 -141
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/api/api-lifecycle.md +0 -91
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/best-practices/client-certificate.md +0 -64
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/best-practices/crawling.md +0 -58
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/best-practices/mocking-request.md +0 -190
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/best-practices/proxy.md +0 -127
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/best-practices/undici-vs-builtin-fetch.md +0 -224
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/docs/docs/best-practices/writing-tests.md +0 -63
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/index-fetch.js +0 -65
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/index.js +0 -234
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/api/abort-signal.js +0 -59
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/api/api-connect.js +0 -110
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/api/api-pipeline.js +0 -252
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/api/api-request.js +0 -214
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/api/api-stream.js +0 -209
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/api/api-upgrade.js +0 -111
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/api/index.js +0 -7
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/api/readable.js +0 -580
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/cache/memory-cache-store.js +0 -279
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/cache/sqlite-cache-store.js +0 -467
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/core/connect.js +0 -153
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/core/constants.js +0 -143
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/core/diagnostics.js +0 -227
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/core/errors.js +0 -477
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/core/request.js +0 -464
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/core/socks5-client.js +0 -422
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/core/socks5-utils.js +0 -212
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/core/symbols.js +0 -75
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/core/tree.js +0 -160
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/core/util.js +0 -992
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/agent.js +0 -158
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/balanced-pool.js +0 -219
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/client-h1.js +0 -1731
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/client-h2.js +0 -995
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/client.js +0 -664
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/dispatcher-base.js +0 -184
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/dispatcher.js +0 -48
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +0 -146
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/fixed-queue.js +0 -135
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/h2c-client.js +0 -51
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/pool-base.js +0 -214
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/pool.js +0 -118
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/proxy-agent.js +0 -319
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/retry-agent.js +0 -35
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/round-robin-pool.js +0 -137
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +0 -260
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/encoding/index.js +0 -33
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/global.js +0 -59
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/handler/cache-handler.js +0 -760
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/handler/cache-revalidation-handler.js +0 -124
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/handler/decorator-handler.js +0 -67
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/handler/deduplication-handler.js +0 -460
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/handler/redirect-handler.js +0 -238
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/handler/retry-handler.js +0 -418
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/handler/unwrap-handler.js +0 -106
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/handler/wrap-handler.js +0 -105
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/interceptor/cache.js +0 -602
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/interceptor/decompress.js +0 -259
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/interceptor/deduplicate.js +0 -117
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/interceptor/dns.js +0 -571
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/interceptor/dump.js +0 -112
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/interceptor/redirect.js +0 -21
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/interceptor/response-error.js +0 -95
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/interceptor/retry.js +0 -19
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/llhttp/.gitkeep +0 -0
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/llhttp/constants.js +0 -531
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/llhttp/llhttp-wasm.js +0 -15
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +0 -15
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/llhttp/utils.js +0 -12
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/mock-agent.js +0 -232
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/mock-call-history.js +0 -248
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/mock-client.js +0 -68
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/mock-errors.js +0 -29
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/mock-interceptor.js +0 -209
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/mock-pool.js +0 -68
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/mock-symbols.js +0 -32
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/mock-utils.js +0 -486
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/pending-interceptors-formatter.js +0 -43
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/snapshot-agent.js +0 -353
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/snapshot-recorder.js +0 -588
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/mock/snapshot-utils.js +0 -158
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/util/cache.js +0 -676
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/util/date.js +0 -670
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/util/promise.js +0 -28
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/util/runtime-features.js +0 -124
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/util/stats.js +0 -32
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/util/timers.js +0 -425
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/cache/cache.js +0 -864
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/cache/cachestorage.js +0 -152
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/cache/util.js +0 -45
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/cookies/constants.js +0 -12
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/cookies/index.js +0 -199
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/cookies/parse.js +0 -314
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/cookies/util.js +0 -352
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/eventsource/eventsource-stream.js +0 -399
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/eventsource/eventsource.js +0 -501
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/eventsource/util.js +0 -29
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/LICENSE +0 -21
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/body.js +0 -509
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/constants.js +0 -131
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/data-url.js +0 -596
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/formdata-parser.js +0 -586
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/formdata.js +0 -259
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/global.js +0 -40
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/headers.js +0 -719
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/index.js +0 -2413
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/request.js +0 -1115
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/response.js +0 -641
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/fetch/util.js +0 -1522
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/infra/index.js +0 -229
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/subresource-integrity/Readme.md +0 -9
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +0 -307
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/webidl/index.js +0 -1006
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/connection.js +0 -329
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/constants.js +0 -126
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/events.js +0 -331
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/frame.js +0 -133
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/permessage-deflate.js +0 -100
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/receiver.js +0 -507
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/sender.js +0 -109
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/stream/websocketerror.js +0 -104
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/stream/websocketstream.js +0 -498
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/util.js +0 -347
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/lib/web/websocket/websocket.js +0 -758
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/package.json +0 -152
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/scripts/strip-comments.js +0 -10
- package/node_modules/@ai-sdk/open-responses/node_modules/undici/types/README.md +0 -6
- package/node_modules/@ai-sdk/provider/CHANGELOG.md +0 -1218
- package/node_modules/@ai-sdk/provider/package.json +0 -63
- package/node_modules/@formatjs/icu-messageformat-parser/index.js +0 -2173
- package/node_modules/@formatjs/icu-messageformat-parser/manipulator.js +0 -207
- package/node_modules/@formatjs/icu-messageformat-parser/no-parser.js +0 -160
- package/node_modules/@formatjs/icu-messageformat-parser/package.json +0 -21
- package/node_modules/@formatjs/icu-messageformat-parser/printer.js +0 -224
- package/node_modules/@maka/core/dist/task-ledger.js +0 -797
- package/node_modules/@maka/runtime/dist/active-tool-result-prune.js +0 -334
- package/node_modules/@maka/runtime/dist/active-tool-result-working-set.js +0 -218
- package/node_modules/@maka/runtime/dist/archive-read-tool.js +0 -92
- package/node_modules/@maka/runtime/dist/sandbox/diagnostics.js +0 -285
- package/node_modules/@maka/runtime/dist/system-prompt/sandbox-context-prompt.js +0 -77
- package/node_modules/@maka/runtime/dist/system-prompt/session-environment-prompt.js +0 -47
- package/node_modules/@maka/runtime/dist/task-ledger-tools.js +0 -244
- package/node_modules/@maka/runtime/dist/test-helpers.js +0 -61
- package/node_modules/@maka/runtime/node_modules/@slack/types/dist/events/index.js +0 -43
- package/node_modules/@maka/runtime/node_modules/@slack/types/package.json +0 -47
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/README.md +0 -390
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/methods.js +0 -1610
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/ChatAppendStreamResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/ChatStartStreamResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/ChatStopStreamResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/PinsListResponse.js +0 -37
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SearchAllResponse.js +0 -82
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SearchFilesResponse.js +0 -63
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsAccessDeleteResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsAccessSetResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsCreateResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsDownloadGetResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsDownloadStartResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsItemsCreateResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsItemsDeleteMultipleResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsItemsDeleteResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsItemsInfoResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsItemsListResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsItemsUpdateResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/SlackListsUpdateResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/WorkflowsFeaturedAddResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/WorkflowsFeaturedListResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/WorkflowsFeaturedRemoveResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/dist/types/response/WorkflowsFeaturedSetResponse.js +0 -3
- package/node_modules/@maka/runtime/node_modules/@slack/web-api/package.json +0 -71
- package/node_modules/@maka/runtime-host/dist/protocol/task-ledger.js +0 -321
- package/node_modules/@maka/runtime-host/dist/server/task-ledger-coordinator.js +0 -154
- package/node_modules/@maka/storage/dist/artifact-metadata-repository.js +0 -19
- package/node_modules/@maka/storage/dist/artifact-storage-layout.js +0 -26
- package/node_modules/@maka/storage/dist/provider-request-capture-artifact.js +0 -31
- package/node_modules/@maka/storage/dist/task-ledger-authority.js +0 -121
- package/node_modules/@maka/storage/dist/task-ledger-store-internal.js +0 -32
- package/node_modules/@maka/storage/dist/task-ledger-store.js +0 -663
- package/node_modules/ai/CHANGELOG.md +0 -9971
- package/node_modules/ai/dist/index.js +0 -18513
- package/node_modules/ai/dist/internal/index.js +0 -3680
- package/node_modules/ai/docs/02-foundations/02-providers-and-models.mdx +0 -179
- package/node_modules/ai/docs/03-agents/04-loop-control.mdx +0 -515
- package/node_modules/ai/docs/03-agents/06-policy-tool-approvals.mdx +0 -412
- package/node_modules/ai/docs/03-agents/06-tool-approvals.mdx +0 -326
- package/node_modules/ai/docs/03-agents/07-workflow-agent.mdx +0 -718
- package/node_modules/ai/docs/03-ai-sdk-core/10-generating-structured-data.mdx +0 -513
- package/node_modules/ai/docs/03-ai-sdk-core/15-tools-and-tool-calling.mdx +0 -1509
- package/node_modules/ai/docs/03-ai-sdk-core/16-mcp-tools.mdx +0 -617
- package/node_modules/ai/docs/03-ai-sdk-core/35-image-generation.mdx +0 -344
- package/node_modules/ai/docs/03-ai-sdk-core/36-transcription.mdx +0 -332
- package/node_modules/ai/docs/03-ai-sdk-core/37-speech.mdx +0 -180
- package/node_modules/ai/docs/03-ai-sdk-core/39-file-uploads.mdx +0 -155
- package/node_modules/ai/docs/03-ai-sdk-core/50-error-handling.mdx +0 -149
- package/node_modules/ai/docs/03-ai-sdk-core/60-telemetry.mdx +0 -830
- package/node_modules/ai/docs/03-ai-sdk-core/index.mdx +0 -132
- package/node_modules/ai/docs/03-ai-sdk-harnesses/02-harness-agent.mdx +0 -495
- package/node_modules/ai/docs/03-ai-sdk-harnesses/04-skills.mdx +0 -65
- package/node_modules/ai/docs/03-ai-sdk-harnesses/05-harness-adapters.mdx +0 -45
- package/node_modules/ai/docs/04-ai-sdk-ui/03-chatbot-tool-usage.mdx +0 -798
- package/node_modules/ai/docs/04-ai-sdk-ui/20-streaming-data.mdx +0 -401
- package/node_modules/ai/docs/04-ai-sdk-ui/21-transport.mdx +0 -212
- package/node_modules/ai/docs/04-ai-sdk-ui/50-stream-protocol.mdx +0 -578
- package/node_modules/ai/docs/06-advanced/04-caching.mdx +0 -175
- package/node_modules/ai/docs/06-advanced/11-secure-url-fetching.mdx +0 -111
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/01-generate-text.mdx +0 -3253
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/02-stream-text.mdx +0 -4261
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/05-embed.mdx +0 -304
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/06-embed-many.mdx +0 -302
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/06-rerank.mdx +0 -317
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/10-generate-image.mdx +0 -252
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/14-upload-file.mdx +0 -92
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/16-tool-loop-agent.mdx +0 -1102
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/28-output.mdx +0 -342
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/31-ui-message.mdx +0 -268
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/80-smooth-stream.mdx +0 -145
- package/node_modules/ai/docs/07-reference/01-ai-sdk-core/index.mdx +0 -225
- package/node_modules/ai/docs/07-reference/02-ai-sdk-ui/01-use-chat.mdx +0 -493
- package/node_modules/ai/docs/07-reference/02-ai-sdk-ui/31-convert-to-model-messages.mdx +0 -256
- package/node_modules/ai/docs/07-reference/02-ai-sdk-ui/40-create-ui-message-stream.mdx +0 -166
- package/node_modules/ai/docs/07-reference/02-ai-sdk-ui/41-create-ui-message-stream-response.mdx +0 -120
- package/node_modules/ai/docs/07-reference/04-ai-sdk-workflow/01-workflow-agent.mdx +0 -954
- package/node_modules/ai/docs/07-reference/04-ai-sdk-workflow/02-workflow-chat-transport.mdx +0 -347
- package/node_modules/ai/docs/07-reference/04-ai-sdk-workflow/index.mdx +0 -26
- package/node_modules/ai/docs/07-reference/05-ai-sdk-errors/ai-invalid-argument-error.mdx +0 -26
- package/node_modules/ai/docs/07-reference/05-ai-sdk-errors/ai-no-image-generated-error.mdx +0 -36
- package/node_modules/ai/docs/07-reference/05-ai-sdk-errors/index.mdx +0 -41
- package/node_modules/ai/package.json +0 -117
- package/node_modules/intl-messageformat/intl-messageformat.iife.js +0 -2807
- package/node_modules/intl-messageformat/package.json +0 -40
- package/packages/eval/dist/attempt-store.js +0 -138
- package/packages/eval/dist/cli.js +0 -119
- package/packages/eval/dist/experiment-directory.js +0 -59
- package/packages/eval/dist/experiment.js +0 -49
- package/packages/eval/dist/external-subject.js +0 -488
- package/packages/eval/dist/harbor-external-subject.js +0 -929
- package/packages/eval/dist/harbor-maka-subject.js +0 -83
- package/packages/eval/dist/harness-environment.js +0 -80
- package/packages/eval/dist/harness-executor.js +0 -1013
- package/packages/eval/dist/index.js +0 -28
- package/packages/eval/dist/install-preflight.js +0 -201
- package/packages/eval/dist/maka-artifacts.js +0 -126
- package/packages/eval/dist/maka-runtime-policy.js +0 -42
- package/packages/eval/dist/maka-subject.js +0 -268
- package/packages/eval/dist/metering-checkpoint.js +0 -80
- package/packages/eval/dist/provider-admission.js +0 -39
- package/packages/eval/dist/provider-metering.js +0 -67
- package/packages/eval/dist/provider-web-tool-surface.js +0 -74
- package/packages/eval/dist/relay-result-frame.js +0 -38
- package/packages/eval/dist/result.js +0 -94
- package/packages/eval/dist/runner.js +0 -290
- package/packages/eval/dist/spec.js +0 -135
- package/packages/eval/dist/toolchain-verification.js +0 -130
- package/packages/eval/harbor/deepseek-codex-models.json +0 -69
- package/packages/eval/harbor/deepseek-harness-profile/cordis.patch.yml +0 -140
- package/packages/eval/harbor/deepseek-harness-profile/cordis.yml +0 -18
- package/packages/eval/harbor/deepseek-harness-profile/package.json +0 -10
- package/packages/eval/harbor/docker-compose-egress-proxy.yaml +0 -57
- package/packages/eval/harbor/egress-proxy/Dockerfile +0 -25
- package/packages/eval/harbor/egress-proxy/entrypoint.sh +0 -62
- package/packages/eval/harbor/egress-proxy/network-policy +0 -148
- package/packages/eval/harbor/egress_filter.py +0 -435
- package/packages/eval/harbor/eval_framework.py +0 -40
- package/packages/eval/harbor/relay_agent.py +0 -686
- package/packages/eval/harbor/run_trial.py +0 -223
- package/packages/eval/package.json +0 -20
- /package/node_modules/@ai-sdk/{code-mode → anthropic/node_modules/@ai-sdk/provider}/LICENSE +0 -0
- /package/node_modules/@ai-sdk/{provider → anthropic/node_modules/@ai-sdk/provider}/README.md +0 -0
- /package/node_modules/@ai-sdk/{provider → anthropic/node_modules/@ai-sdk/provider}/dist/index.js +0 -0
- /package/node_modules/@ai-sdk/{gateway → cohere/node_modules/@ai-sdk/provider}/LICENSE +0 -0
- /package/node_modules/@ai-sdk/{provider → google/node_modules/@ai-sdk/provider}/LICENSE +0 -0
- /package/node_modules/{ai → @ai-sdk/openai-compatible/node_modules/@ai-sdk/provider}/LICENSE +0 -0
- /package/node_modules/{@formatjs → @maka/core/node_modules/@formatjs}/icu-messageformat-parser/LICENSE.md +0 -0
- /package/node_modules/{@formatjs → @maka/core/node_modules/@formatjs}/icu-messageformat-parser/README.md +0 -0
- /package/node_modules/{intl-messageformat → @maka/core/node_modules/intl-messageformat}/LICENSE.md +0 -0
- /package/node_modules/{intl-messageformat → @maka/core/node_modules/intl-messageformat}/README.md +0 -0
- /package/node_modules/{intl-messageformat → @maka/core/node_modules/intl-messageformat}/index.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/README.md +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/approval-continuation.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/approval.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/code-mode-tool.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/continuation-capability.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/direct-tool-call.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/errors.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/host-interrupt.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/index.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/interrupt-continuation.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/tool-invocation.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/tool-prompt.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/types.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/dist/utils/serialization.js +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/code-mode/src/tsconfig.json +0 -0
- /package/node_modules/{@ai-sdk → @maka/runtime/node_modules/@ai-sdk}/gateway/README.md +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/README.md +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/00-introduction/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-foundations/01-overview.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-foundations/03-prompts.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-foundations/04-tools.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-foundations/05-streaming.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-foundations/06-provider-options.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-foundations/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/00-choosing-a-provider.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/01-navigating-the-library.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/02-nextjs-app-router.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/03-nextjs-pages-router.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/04-svelte.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/05-nuxt.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/06-nodejs.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/07-expo.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/08-tanstack-start.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/09-coding-agents.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/02-getting-started/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/01-overview.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/02-building-agents.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/03-workflows.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/05-configuring-call-options.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/06-memory.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/06-subagents.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/08-terminal-ui.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-agents/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/01-overview.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/05-generating-text.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/17-mcp-apps.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/17-runtime-and-tool-context.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/18-code-mode.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/20-prompt-engineering.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/25-settings.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/26-reasoning.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/30-embeddings.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/31-reranking.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/36-realtime.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/36-translation.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/38-video-generation.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/40-middleware.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/41-skill-uploads.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/45-provider-management.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/55-testing.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/65-devtools.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-core/65-lifecycle-callbacks.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/01-overview.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/03-tools.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/06-workflow-utilities.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/07-ui.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/08-terminal-ui.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/03-ai-sdk-harnesses/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/01-overview.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/02-chatbot.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/03-chatbot-message-persistence.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/03-chatbot-resume-streams.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/04-generative-user-interfaces.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/05-completion.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/08-object-generation.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/21-error-handling.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/24-reading-ui-message-streams.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/25-message-metadata.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/04-ai-sdk-ui/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/01-overview.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/02-streaming-react-components.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/03-generative-ui-state.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/03-saving-and-restoring-states.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/04-multistep-interfaces.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/05-streaming-values.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/06-loading-state.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/08-error-handling.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/09-authentication.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/10-migrating-to-ui.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/05-ai-sdk-rsc/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/01-prompt-engineering.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/02-stopping-streams.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/03-backpressure.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/05-multiple-streamables.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/06-rate-limiting.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/07-rendering-ui-with-language-models.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/08-model-as-router.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/09-multistep-interfaces.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/09-sequential-generations.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/10-vercel-deployment-guide.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/06-advanced/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/11-stream-transcribe.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/11-stream-translate.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/11-transcribe.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/12-generate-speech.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/13-generate-video.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/14-upload-skill.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/15-agent.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/17-create-agent-ui-stream.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/18-create-agent-ui-stream-response.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/18-pipe-agent-ui-stream-to-response.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/20-tool.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/22-dynamic-tool.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/23-create-mcp-client.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/23-get-realtime-tool-definitions.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/24-mcp-apps.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/24-mcp-stdio-transport.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/25-json-schema.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/26-zod-schema.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/27-valibot-schema.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/29-filter-active-tools.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/30-model-message.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/32-validate-ui-messages.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/33-safe-validate-ui-messages.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/34-sandbox.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/40-provider-registry.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/42-custom-provider.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/50-cosine-similarity.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/60-wrap-language-model.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/61-wrap-image-model.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/65-language-model-v2-middleware.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/66-extract-reasoning-middleware.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/67-simulate-streaming-middleware.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/68-default-instructions-middleware.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/68-default-settings-middleware.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/69-add-tool-input-examples-middleware.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/70-extract-json-middleware.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/70-is-step-count.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/71-has-tool-call.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/72-loop-finished.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/75-simulate-readable-stream.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/90-generate-id.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/91-create-id-generator.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/01-ai-sdk-core/92-default-generated-file.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/02-use-completion.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/03-use-object.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/05-use-realtime.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/32-prune-messages.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/42-pipe-ui-message-stream-to-response.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/43-read-ui-message-stream.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/46-infer-ui-tools.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/47-infer-ui-tool.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/48-mcp-app-renderer.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/50-direct-chat-transport.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/02-ai-sdk-ui/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/01-stream-ui.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/02-create-ai.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/03-create-streamable-ui.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/04-create-streamable-value.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/05-read-streamable-value.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/06-get-ai-state.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/07-get-mutable-ai-state.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/08-use-ai-state.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/09-use-actions.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/10-use-ui-state.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/11-use-streamable-value.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/20-render.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/03-ai-sdk-rsc/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-api-call-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-download-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-empty-response-body-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-data-content-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-message-role-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-prompt-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-response-data-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-tool-approval-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-tool-approval-signature-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-invalid-tool-input-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-json-parse-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-load-api-key-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-load-setting-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-message-conversion-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-content-generated-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-object-generated-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-output-generated-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-speech-generated-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-such-model-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-such-provider-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-such-provider-reference-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-such-tool-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-transcript-generated-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-translation-generated-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-no-video-generated-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-retry-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-too-many-embedding-values-for-call-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-tool-call-not-found-for-approval-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-tool-call-repair-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-type-validation-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-ui-message-stream-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/05-ai-sdk-errors/ai-unsupported-functionality-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/06-ai-sdk-tui/01-run-agent-tui.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/06-ai-sdk-tui/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/07-reference/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/00-versioning.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/23-migration-guide-7-0.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/24-migration-guide-6-0.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/25-migration-guide-5-0-data.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/26-migration-guide-5-0.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/27-migration-guide-4-2.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/28-migration-guide-4-1.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/29-migration-guide-4-0.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/36-migration-guide-3-4.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/37-migration-guide-3-3.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/38-migration-guide-3-2.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/39-migration-guide-3-1.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/08-migration-guides/index.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/01-azure-stream-slow.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/03-server-actions-in-client-components.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/04-strange-stream-output.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/05-streamable-ui-errors.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/05-tool-invocation-missing-result.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/06-streaming-not-working-when-deployed.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/06-streaming-not-working-when-proxied.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/06-timeout-on-vercel.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/07-unclosed-streams.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/08-use-chat-failed-to-parse-stream.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/09-client-stream-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/10-use-chat-tools-no-response.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/11-use-chat-custom-request-options.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/12-typescript-performance-zod.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/12-use-chat-an-error-occurred.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/13-repeated-assistant-messages.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/14-stream-abort-handling.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/14-tool-calling-with-structured-outputs.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/15-abort-breaks-resumable-streams.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/15-stream-text-not-working.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/16-streaming-status-delay.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/17-use-chat-stale-body-data.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/18-ontoolcall-type-narrowing.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/19-unsupported-model-version.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/20-no-object-generated-content-filter.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/21-missing-tool-results-error.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/30-model-is-not-assignable-to-type.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/40-typescript-cannot-find-namespace-jsx.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/50-react-maximum-update-depth-exceeded.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/60-jest-cannot-find-module-ai-rsc.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/70-high-memory-usage-with-images.mdx +0 -0
- /package/node_modules/{ai → @maka/runtime/node_modules/ai}/docs/09-troubleshooting/index.mdx +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/logger/LICENSE +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/logger/README.md +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/logger/dist/index.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/logger/package.json +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/LICENSE +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/README.md +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/block-kit/block-elements.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/block-kit/blocks.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/block-kit/composition-objects.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/block-kit/extensions.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/calls.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/chunk.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/common/bot-profile.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/common/status-emoji-display-info.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/dialog.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/app.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/assistant.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/call.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/channel.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/dnd.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/email.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/emoji.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/entity-details-requested.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/file.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/function.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/grid-migration.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/group.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/im.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/invite.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/link-shared.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/member.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/message-metadata.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/message.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/pin.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/reaction.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/shared-channel.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/star.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/steps-from-apps.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/subteam.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/team.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/token.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/events/user.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/index.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/message-attachments.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/message-metadata.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/types/dist/views.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/LICENSE +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/WebClient.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/chat-stream.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/errors.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/file-upload.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/helpers.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/index.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/instrument.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/logger.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/retry-policies.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/helpers.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/analytics.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/apps.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/auth.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/barriers.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/conversations.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/emoji.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/functions.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/inviteRequests.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/roles.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/teams.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/usergroups.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/users.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/admin/workflows.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/api.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/apps.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/assistant.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/auth.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/bookmarks.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/bots.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/calls.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/canvas.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/chat.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/common.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/conversations.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/dialog.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/dnd.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/emoji.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/entity.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/files.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/functions.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/index.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/manifest.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/migration.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/oauth.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/openid.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/pins.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/reactions.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/reminders.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/rtm.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/search.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/slackLists.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/stars.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/team.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/tooling.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/usergroups.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/users.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/views.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/request/workflows.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAnalyticsGetFileResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsActivitiesListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsApproveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsApprovedListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsClearResolutionResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsConfigLookupResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsConfigSetResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsRequestsCancelResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsRequestsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsRestrictResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsRestrictedListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAppsUninstallResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAuthPolicyAssignEntitiesResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAuthPolicyGetEntitiesResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminAuthPolicyRemoveEntitiesResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminBarriersCreateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminBarriersDeleteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminBarriersListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminBarriersUpdateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsArchiveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsBulkArchiveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsBulkDeleteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsBulkMoveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsConvertToPrivateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsConvertToPublicResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsCreateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsDeleteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsDisconnectSharedResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsEkmListOriginalConnectedChannelInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsGetConversationPrefsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsGetCustomRetentionResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsGetTeamsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsInviteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsLookupResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsRemoveCustomRetentionResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsRenameResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsRestrictAccessAddGroupResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsRestrictAccessListGroupsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsRestrictAccessRemoveGroupResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsSearchResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsSetConversationPrefsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsSetCustomRetentionResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsSetTeamsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsUnarchiveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsWhitelistAddResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsWhitelistListGroupsLinkedToChannelResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminConversationsWhitelistRemoveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminEmojiAddAliasResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminEmojiAddResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminEmojiListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminEmojiRemoveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminEmojiRenameResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminFunctionsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminFunctionsPermissionsLookupResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminFunctionsPermissionsSetResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminInviteRequestsApproveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminInviteRequestsApprovedListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminInviteRequestsDeniedListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminInviteRequestsDenyResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminInviteRequestsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminRolesAddAssignmentsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminRolesListAssignmentsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminRolesRemoveAssignmentsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminTeamsAdminsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminTeamsCreateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminTeamsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminTeamsOwnersListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminTeamsSettingsInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminTeamsSettingsSetDefaultChannelsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminTeamsSettingsSetDescriptionResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminTeamsSettingsSetDiscoverabilityResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminTeamsSettingsSetIconResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminTeamsSettingsSetNameResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsergroupsAddChannelsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsergroupsAddTeamsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsergroupsListChannelsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsergroupsRemoveChannelsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersAssignResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersInviteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersRemoveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSessionClearSettingsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSessionGetSettingsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSessionInvalidateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSessionListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSessionResetBulkResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSessionResetResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSessionSetSettingsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSetAdminResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSetExpirationResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSetOwnerResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersSetRegularResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminUsersUnsupportedVersionsExportResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminWorkflowsCollaboratorsAddResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminWorkflowsCollaboratorsRemoveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminWorkflowsPermissionsLookupResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminWorkflowsSearchResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AdminWorkflowsUnpublishResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ApiTestResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsConnectionsOpenResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsEventAuthorizationsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsManifestCreateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsManifestDeleteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsManifestExportResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsManifestUpdateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsManifestValidateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsPermissionsInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsPermissionsRequestResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsPermissionsResourcesListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsPermissionsScopesListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsPermissionsUsersListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsPermissionsUsersRequestResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsUninstallResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AppsUserConnectionUpdateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AssistantThreadsSetStatusResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AssistantThreadsSetSuggestedPromptsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AssistantThreadsSetTitleResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AuthRevokeResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AuthTeamsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/AuthTestResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/BookmarksAddResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/BookmarksEditResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/BookmarksListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/BookmarksRemoveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/BotsInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CallsAddResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CallsEndResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CallsInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CallsParticipantsAddResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CallsParticipantsRemoveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CallsUpdateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CanvasesAccessDeleteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CanvasesAccessSetResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CanvasesCreateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CanvasesDeleteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CanvasesEditResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/CanvasesSectionsLookupResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsArchiveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsCreateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsHistoryResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsInviteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsJoinResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsKickResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsLeaveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsMarkResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsRenameResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsRepliesResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsSetPurposeResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsSetTopicResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChannelsUnarchiveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChatDeleteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChatDeleteScheduledMessageResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChatGetPermalinkResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChatMeMessageResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChatPostEphemeralResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChatPostMessageResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChatScheduleMessageResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChatScheduledMessagesListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChatUnfurlResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ChatUpdateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsAcceptSharedInviteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsApproveSharedInviteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsArchiveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsCanvasesCreateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsCloseResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsCreateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsDeclineSharedInviteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsExternalInvitePermissionsSetResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsHistoryResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsInviteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsInviteSharedResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsJoinResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsKickResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsLeaveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsListConnectInvitesResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsMarkResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsMembersResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsOpenResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsRenameResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsRepliesResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsRequestSharedInviteApproveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsRequestSharedInviteDenyResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsRequestSharedInviteListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsSetPurposeResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsSetTopicResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ConversationsUnarchiveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/DialogOpenResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/DndEndDndResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/DndEndSnoozeResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/DndInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/DndSetSnoozeResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/DndTeamInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/EmojiListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/EntityPresentDetailsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesCommentsAddResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesCommentsDeleteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesCommentsEditResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesCompleteUploadExternalResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesDeleteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesGetUploadURLExternalResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesRemoteAddResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesRemoteInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesRemoteListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesRemoteRemoveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesRemoteShareResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesRemoteUpdateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesRevokePublicURLResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesSharedPublicURLResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FilesUploadResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FunctionsCompleteErrorResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/FunctionsCompleteSuccessResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsArchiveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsCloseResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsCreateChildResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsCreateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsHistoryResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsInviteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsKickResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsLeaveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsMarkResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsOpenResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsRenameResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsRepliesResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsSetPurposeResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsSetTopicResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/GroupsUnarchiveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ImCloseResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ImHistoryResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ImListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ImMarkResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ImOpenResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ImRepliesResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/MigrationExchangeResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/MpimCloseResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/MpimHistoryResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/MpimListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/MpimMarkResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/MpimOpenResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/MpimRepliesResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/OauthAccessResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/OauthTokenResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/OauthV2AccessResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/OauthV2ExchangeResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/OpenIDConnectTokenResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/OpenIDConnectUserInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/PinsAddResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/PinsRemoveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ReactionsAddResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ReactionsGetResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ReactionsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ReactionsRemoveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/RemindersAddResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/RemindersCompleteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/RemindersDeleteResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/RemindersInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/RemindersListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/RtmConnectResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/RtmStartResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/SearchMessagesResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/StarsAddResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/StarsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/StarsRemoveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/TeamAccessLogsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/TeamBillableInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/TeamBillingInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/TeamExternalTeamsDisconnectResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/TeamExternalTeamsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/TeamInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/TeamIntegrationLogsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/TeamPreferencesListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/TeamProfileGetResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ToolingTokensRotateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsergroupsCreateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsergroupsDisableResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsergroupsEnableResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsergroupsListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsergroupsUpdateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsergroupsUsersListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsergroupsUsersUpdateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersConversationsResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersDeletePhotoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersDiscoverableContactsLookupResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersGetPresenceResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersIdentityResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersInfoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersListResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersLookupByEmailResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersProfileGetResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersProfileSetResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersSetActiveResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersSetPhotoResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/UsersSetPresenceResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ViewsOpenResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ViewsPublishResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ViewsPushResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/ViewsUpdateResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/WorkflowsStepCompletedResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/WorkflowsStepFailedResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/WorkflowsUpdateStepResponse.js +0 -0
- /package/node_modules/{@maka/runtime/node_modules/@slack → @slack}/web-api/dist/types/response/index.js +0 -0
- /package/node_modules/{@maka/runtime → @slack/web-api}/node_modules/retry/License +0 -0
- /package/node_modules/{@maka/runtime → @slack/web-api}/node_modules/retry/README.md +0 -0
- /package/node_modules/{@maka/runtime → @slack/web-api}/node_modules/retry/example/dns.js +0 -0
- /package/node_modules/{@maka/runtime → @slack/web-api}/node_modules/retry/example/stop.js +0 -0
- /package/node_modules/{@maka/runtime → @slack/web-api}/node_modules/retry/index.js +0 -0
- /package/node_modules/{@maka/runtime → @slack/web-api}/node_modules/retry/lib/retry.js +0 -0
- /package/node_modules/{@maka/runtime → @slack/web-api}/node_modules/retry/lib/retry_operation.js +0 -0
- /package/node_modules/{@maka/runtime → @slack/web-api}/node_modules/retry/package.json +0 -0
|
@@ -16,22 +16,22 @@
|
|
|
16
16
|
* specific language governing permissions and limitations
|
|
17
17
|
* under the License.
|
|
18
18
|
*/
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
|
|
19
|
+
import { createHash } from 'node:crypto';
|
|
20
|
+
import { performance } from 'node:perf_hooks';
|
|
21
|
+
import { canonicalPeerMeshMemberAdvertisement, canonicalPeerMeshRoster, createPeerMeshInvitationSecret, validatePeerMeshInvitation, decodeSignedPeerMeshMemberAdvertisement, decodeSignedPeerMeshRoster, generatePeerMeshAuthorityKeyPair, matchesPeerMeshInvitationSecret, PEER_MESH_MAX_MEMBERS, PEER_MESH_MAX_MESHES, PEER_MESH_MAX_INVITATION_RECORDS, PEER_MESH_MAX_PENDING_INVITATIONS, PEER_MESH_MAX_TRANSIT_ADDRESSES_PER_RELAY, PEER_MESH_MAX_TRANSIT_RELAY_ADDRESSES, peerMeshMemberAdvertisementSigningBytes, peerMeshId, peerMeshInvitationSecretDigest, signPeerMeshRoster, } from './model.js';
|
|
22
|
+
import { canonicalPeerMeshDisplayName } from './display-name.js';
|
|
23
|
+
import { authenticateSignedPeerReachabilityLease, decodeSignedPeerReachabilityLease, isPeerReachabilityLeaseCurrent, PEER_REACHABILITY_MAX_CLOCK_SKEW_MS, peerReachabilityLeaseSigningBytes, peerReachabilityLeaseReceipt, PEER_REACHABILITY_RECOVERY_HORIZON_MS, verifySignedPeerReachabilityLease, } from '../peer-reachability/index.js';
|
|
24
|
+
import { authorityKeys, isActivePeerMeshMembership as isActiveMembership, isRetiredPeerMeshState as isRetired, openPeerMeshStateStore, } from './store.js';
|
|
25
|
+
const CONTROL_FRAME_MAX_BYTES = 128 * 1024;
|
|
23
26
|
const DEFAULT_INVITATION_TTL_MS = 15 * 60 * 1_000;
|
|
24
27
|
const CONNECT_DEADLINE_MS = 30_000;
|
|
25
28
|
const CONTROL_REQUEST_DEADLINE_MS = 10_000;
|
|
26
29
|
const MAX_ACTIVE_CONTROL_STREAMS = 32;
|
|
27
30
|
const MAX_ACTIVE_CONTROL_STREAMS_PER_PEER = 2;
|
|
28
|
-
const
|
|
29
|
-
const ROUTE_REFRESH_LEAD_MS = 60 * 1_000;
|
|
30
|
-
const ROUTE_MAX_FUTURE_MS = 10 * 60 * 1_000;
|
|
31
|
-
const ROUTE_PAGE_SIZE = 8;
|
|
31
|
+
const EVIDENCE_PAGE_SIZE = 2;
|
|
32
32
|
const RECONCILE_CONCURRENCY = 4;
|
|
33
33
|
const RECONCILE_DEADLINE_MS = 60 * 1_000;
|
|
34
|
-
const RECONCILE_INTERVAL_MS =
|
|
34
|
+
const RECONCILE_INTERVAL_MS = 5 * 60 * 1_000;
|
|
35
35
|
export async function openPeerMeshNode(input) {
|
|
36
36
|
const store = await openPeerMeshStateStore(input.dataRoot, input.peer.identity().peerId);
|
|
37
37
|
const node = new PeerMeshNodeImpl({ ...input, store });
|
|
@@ -47,37 +47,134 @@ export async function openPeerMeshNode(input) {
|
|
|
47
47
|
class PeerMeshNodeImpl {
|
|
48
48
|
#store;
|
|
49
49
|
#peer;
|
|
50
|
+
#reachability;
|
|
51
|
+
#endpointKind;
|
|
50
52
|
#now;
|
|
53
|
+
#monotonicNow;
|
|
54
|
+
#onBackgroundReconcileError;
|
|
51
55
|
#activeControlStreams = new Set();
|
|
52
56
|
#lifetime = new AbortController();
|
|
53
57
|
#admissionTail = Promise.resolve();
|
|
54
58
|
#reconcileTail = Promise.resolve();
|
|
59
|
+
#transitTail = Promise.resolve();
|
|
55
60
|
#reconcileCursor = 0;
|
|
56
61
|
#gossipCursor = 0;
|
|
57
|
-
#
|
|
62
|
+
#evidenceRefreshTask;
|
|
63
|
+
#unsubscribeReachability;
|
|
64
|
+
#reconcileGeneration = 0;
|
|
65
|
+
#reconcileWaiters = new Set();
|
|
66
|
+
#reachabilityReceipts = new Map();
|
|
67
|
+
#completedRecoverySweeps = new Set();
|
|
68
|
+
#routeResolutionListeners = new Map();
|
|
58
69
|
#serveTask;
|
|
59
70
|
#closeTask;
|
|
60
71
|
constructor(input) {
|
|
61
72
|
this.#store = input.store;
|
|
62
73
|
this.#peer = input.peer;
|
|
74
|
+
this.#reachability = input.reachability;
|
|
75
|
+
this.#endpointKind = input.endpointKind;
|
|
63
76
|
this.#now = input.now ?? Date.now;
|
|
77
|
+
this.#monotonicNow = input.monotonicNow ?? (input.now ? input.now : () => performance.now());
|
|
78
|
+
this.#onBackgroundReconcileError = input.onBackgroundReconcileError;
|
|
64
79
|
}
|
|
65
80
|
async initialize() {
|
|
66
|
-
|
|
67
|
-
|
|
81
|
+
const stored = this.#store.read();
|
|
82
|
+
const now = this.#now();
|
|
83
|
+
for (const lease of stored.reachability) {
|
|
84
|
+
const signed = authenticateSignedPeerReachabilityLease({
|
|
85
|
+
value: lease,
|
|
86
|
+
expectedPeerId: lease.lease.peerId,
|
|
87
|
+
verifyIdentity: this.#peer.verifyIdentity.bind(this.#peer),
|
|
88
|
+
});
|
|
89
|
+
if (usableHistoricalReachability(signed, now) &&
|
|
90
|
+
signed.lease.issuedAt <= now + PEER_REACHABILITY_MAX_CLOCK_SKEW_MS) {
|
|
91
|
+
this.#recordReachabilityReceipt(signed);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
for (const advertisement of stored.advertisements) {
|
|
95
|
+
this.#assertAdvertisementSignature(advertisement);
|
|
96
|
+
}
|
|
97
|
+
if (stored.reachability.some((signed) => !usableHistoricalReachability(signed, now))) {
|
|
98
|
+
await this.#store.mutate((current) => ({
|
|
99
|
+
state: {
|
|
100
|
+
...current,
|
|
101
|
+
reachability: current.reachability.filter((signed) => usableHistoricalReachability(signed, now)),
|
|
102
|
+
},
|
|
103
|
+
result: undefined,
|
|
104
|
+
}));
|
|
105
|
+
}
|
|
106
|
+
await this.#refreshLocalEvidence();
|
|
107
|
+
this.#unsubscribeReachability = this.#reachability.subscribe(() => {
|
|
108
|
+
this.#triggerReconciliation();
|
|
109
|
+
});
|
|
68
110
|
await this.#reconcileTransit();
|
|
69
111
|
}
|
|
70
112
|
localPeerId() {
|
|
71
113
|
this.#assertOpen();
|
|
72
114
|
return this.#peer.identity().peerId;
|
|
73
115
|
}
|
|
116
|
+
displayName() {
|
|
117
|
+
this.#assertOpen();
|
|
118
|
+
return this.#store.read().displayName ?? undefined;
|
|
119
|
+
}
|
|
120
|
+
setDisplayName(displayName) {
|
|
121
|
+
return this.#admitMesh(async () => {
|
|
122
|
+
const canonical = displayName === null ? null : canonicalPeerMeshDisplayName(displayName);
|
|
123
|
+
await this.#store.mutate(async (current) => {
|
|
124
|
+
if (current.displayName === canonical)
|
|
125
|
+
return { state: current, result: undefined };
|
|
126
|
+
const next = { ...current, displayName: canonical };
|
|
127
|
+
const advertisements = await this.#localAdvertisementsFor(next);
|
|
128
|
+
return {
|
|
129
|
+
state: {
|
|
130
|
+
...next,
|
|
131
|
+
advertisements: mergeAdvertisements(current.advertisements, advertisements),
|
|
132
|
+
},
|
|
133
|
+
result: undefined,
|
|
134
|
+
};
|
|
135
|
+
});
|
|
136
|
+
this.#triggerReconciliation();
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
setMeshDisplayName(meshId, displayName) {
|
|
140
|
+
return this.#admitMesh(async () => {
|
|
141
|
+
const canonical = displayName === null ? undefined : canonicalPeerMeshDisplayName(displayName);
|
|
142
|
+
const announcement = await this.#store.mutate((current) => {
|
|
143
|
+
const state = requireAuthority(current.meshes, meshId);
|
|
144
|
+
if (state.roster.roster.closed)
|
|
145
|
+
throw new Error('Peer Mesh is closed');
|
|
146
|
+
if (state.roster.roster.displayName === canonical)
|
|
147
|
+
return { state: current, result: undefined };
|
|
148
|
+
const { displayName: _currentDisplayName, ...currentRoster } = state.roster.roster;
|
|
149
|
+
const roster = signPeerMeshRoster(canonicalPeerMeshRoster({
|
|
150
|
+
...currentRoster,
|
|
151
|
+
revision: state.roster.roster.revision + 1,
|
|
152
|
+
...(canonical ? { displayName: canonical } : {}),
|
|
153
|
+
}), authorityKeys(state));
|
|
154
|
+
return {
|
|
155
|
+
state: {
|
|
156
|
+
...current,
|
|
157
|
+
meshes: replaceMesh(current.meshes, { ...state, roster }),
|
|
158
|
+
},
|
|
159
|
+
result: {
|
|
160
|
+
roster,
|
|
161
|
+
targets: rosterAnnouncementTargets(state.roster.roster.members, current.reachability, this.#peer.identity().peerId, this.#now()),
|
|
162
|
+
},
|
|
163
|
+
};
|
|
164
|
+
});
|
|
165
|
+
if (announcement)
|
|
166
|
+
this.#scheduleRosterAnnouncement(announcement.roster, announcement.targets);
|
|
167
|
+
const stored = this.#store.read();
|
|
168
|
+
return peerMeshStatus(requireAuthority(stored.meshes, meshId), this.#peer.identity(), this.#endpointKind, stored.reachability, stored.advertisements, this.#now(), (peerId) => this.#peer.isConnected(peerId), (peerId) => this.resolveRoutes(peerId), (signed) => this.#isReachabilityCurrent(signed));
|
|
169
|
+
});
|
|
170
|
+
}
|
|
74
171
|
status() {
|
|
75
172
|
this.#assertOpen();
|
|
76
173
|
const identity = this.#peer.identity();
|
|
77
174
|
const stored = this.#store.read();
|
|
78
175
|
return Object.freeze(stored.meshes
|
|
79
|
-
.filter((state) => isActiveMembership(state, identity.peerId))
|
|
80
|
-
.map((state) => peerMeshStatus(state, identity, stored.
|
|
176
|
+
.filter((state) => state.roster.roster.closed || isActiveMembership(state, identity.peerId))
|
|
177
|
+
.map((state) => peerMeshStatus(state, identity, this.#endpointKind, stored.reachability, stored.advertisements, this.#now(), (peerId) => this.#peer.isConnected(peerId), (peerId) => this.resolveRoutes(peerId), (signed) => this.#isReachabilityCurrent(signed))));
|
|
81
178
|
}
|
|
82
179
|
create() {
|
|
83
180
|
return this.#admitMesh(async () => {
|
|
@@ -86,6 +183,7 @@ class PeerMeshNodeImpl {
|
|
|
86
183
|
const roster = signPeerMeshRoster(canonicalPeerMeshRoster({
|
|
87
184
|
version: 1,
|
|
88
185
|
meshId: peerMeshId(keys.publicKey),
|
|
186
|
+
authorityPeerId: identity.peerId,
|
|
89
187
|
revision: 1,
|
|
90
188
|
members: [identity.peerId],
|
|
91
189
|
closed: false,
|
|
@@ -96,38 +194,34 @@ class PeerMeshNodeImpl {
|
|
|
96
194
|
authorityPrivateKey: keys.privateKey,
|
|
97
195
|
invitations: [],
|
|
98
196
|
};
|
|
99
|
-
const
|
|
197
|
+
const reachability = await this.#reachability.refresh();
|
|
100
198
|
const now = this.#now();
|
|
101
199
|
await this.#store.mutate((current) => {
|
|
102
|
-
assertMeshCapacity(current.meshes, identity.peerId);
|
|
103
|
-
const currentLocalRoute = current.routes
|
|
104
|
-
.filter(({ route }) => route.peerId === identity.peerId)
|
|
105
|
-
.sort((left, right) => right.route.sequence - left.route.sequence)[0];
|
|
106
|
-
const localRoute = currentLocalRoute && currentLocalRoute.route.sequence >= signedRoute.route.sequence
|
|
107
|
-
? currentLocalRoute
|
|
108
|
-
: signedRoute;
|
|
200
|
+
assertMeshCapacity(current.meshes, identity.peerId, current.pendingJoins.length);
|
|
109
201
|
return {
|
|
110
202
|
state: {
|
|
111
203
|
...current,
|
|
112
204
|
meshes: appendMesh(current.meshes, state, identity.peerId),
|
|
113
|
-
|
|
205
|
+
reachability: mergeReachability(current.reachability, [reachability], now),
|
|
114
206
|
},
|
|
115
207
|
result: undefined,
|
|
116
208
|
};
|
|
117
209
|
});
|
|
210
|
+
await this.#refreshLocalEvidence();
|
|
118
211
|
const stored = this.#store.read();
|
|
119
|
-
return peerMeshStatus(findMesh(stored.meshes, state.roster.roster.meshId), identity, stored.
|
|
212
|
+
return peerMeshStatus(findMesh(stored.meshes, state.roster.roster.meshId), identity, this.#endpointKind, stored.reachability, stored.advertisements, now, (peerId) => this.#peer.isConnected(peerId), (peerId) => this.resolveRoutes(peerId), (signed) => this.#isReachabilityCurrent(signed));
|
|
120
213
|
});
|
|
121
214
|
}
|
|
122
|
-
invite(meshId, input = {}) {
|
|
215
|
+
async invite(meshId, input = {}) {
|
|
123
216
|
if (this.#lifetime.signal.aborted)
|
|
124
|
-
|
|
217
|
+
throw new Error('Peer Mesh node is closed');
|
|
125
218
|
const now = this.#now();
|
|
126
219
|
const identity = this.#peer.identity();
|
|
127
220
|
const ttlMs = input.ttlMs ?? DEFAULT_INVITATION_TTL_MS;
|
|
128
221
|
if (!Number.isSafeInteger(ttlMs) || ttlMs < 1_000 || ttlMs > 24 * 60 * 60 * 1_000) {
|
|
129
|
-
|
|
222
|
+
throw new Error('Peer Mesh invitation TTL must be between 1 second and 1 day');
|
|
130
223
|
}
|
|
224
|
+
const reachability = await this.#reachability.refresh();
|
|
131
225
|
return this.#store.mutate((current) => {
|
|
132
226
|
const state = requireAuthority(current.meshes, meshId);
|
|
133
227
|
if (state.roster.roster.closed)
|
|
@@ -140,14 +234,13 @@ class PeerMeshNodeImpl {
|
|
|
140
234
|
throw new Error('Peer Mesh has too many recent invitations');
|
|
141
235
|
const secret = createPeerMeshInvitationSecret();
|
|
142
236
|
const expiresAt = now + ttlMs;
|
|
143
|
-
const target = authorityTarget(identity);
|
|
144
237
|
const invitation = {
|
|
145
238
|
version: 1,
|
|
146
239
|
meshId: state.roster.roster.meshId,
|
|
147
240
|
authorityPublicKey: state.roster.authorityPublicKey,
|
|
148
241
|
secret,
|
|
149
242
|
expiresAt,
|
|
150
|
-
|
|
243
|
+
reachability,
|
|
151
244
|
};
|
|
152
245
|
return {
|
|
153
246
|
state: {
|
|
@@ -171,88 +264,237 @@ class PeerMeshNodeImpl {
|
|
|
171
264
|
join(invitationValue, signal) {
|
|
172
265
|
return this.#admitMesh(async () => {
|
|
173
266
|
const invitation = validatePeerMeshInvitation(invitationValue);
|
|
174
|
-
|
|
175
|
-
throw new Error('Peer Mesh invitation has expired');
|
|
176
|
-
}
|
|
267
|
+
const authorityReachability = this.#authenticateReachability(invitation.reachability, invitation.reachability.lease.peerId, true);
|
|
177
268
|
const current = this.#store.read();
|
|
178
269
|
const existing = findMesh(current.meshes, invitation.meshId);
|
|
270
|
+
const pending = current.pendingJoins.find(({ invitation: candidate }) => candidate.meshId === invitation.meshId);
|
|
271
|
+
if (!pending && invitation.expiresAt <= this.#now()) {
|
|
272
|
+
throw new Error('Peer Mesh invitation has expired');
|
|
273
|
+
}
|
|
179
274
|
const localPeerId = this.#peer.identity().peerId;
|
|
275
|
+
if (existing?.roster.roster.closed) {
|
|
276
|
+
throw new Error('Peer Mesh is closed');
|
|
277
|
+
}
|
|
180
278
|
if (existing?.role === 'authority') {
|
|
181
279
|
throw new Error('This peer already belongs to that Peer Mesh');
|
|
182
280
|
}
|
|
183
|
-
if (
|
|
184
|
-
|
|
281
|
+
if (existing?.role === 'replica' &&
|
|
282
|
+
authorityReachability.lease.peerId !== existing.roster.roster.authorityPeerId) {
|
|
283
|
+
throw new Error('Peer Mesh repair invitation has the wrong authority identity');
|
|
284
|
+
}
|
|
285
|
+
assertRejoinSettled(existing, localPeerId);
|
|
286
|
+
if (pending && pending.invitation.secret !== invitation.secret) {
|
|
287
|
+
throw new Error('This Peer Mesh already has an unresolved join attempt');
|
|
288
|
+
}
|
|
289
|
+
if (pending?.phase === 'leave_pending') {
|
|
290
|
+
throw new Error('This Peer Mesh join is still being cancelled');
|
|
291
|
+
}
|
|
292
|
+
if (!existing && !pending) {
|
|
293
|
+
assertMeshCapacity(current.meshes, localPeerId, current.pendingJoins.length);
|
|
294
|
+
}
|
|
185
295
|
const operationSignal = signal
|
|
186
296
|
? AbortSignal.any([signal, this.#lifetime.signal])
|
|
187
297
|
: this.#lifetime.signal;
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
routeHints: invitation.routeHints,
|
|
191
|
-
coordinationRelays: invitation.coordinationRelays,
|
|
192
|
-
directDeadlineMs: CONNECT_DEADLINE_MS,
|
|
193
|
-
}, operationSignal);
|
|
298
|
+
let stream;
|
|
299
|
+
let joinIntentAdmitted = pending !== undefined;
|
|
194
300
|
try {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
};
|
|
202
|
-
const response = await exchangeControl(stream, request, decodeRedeemResponse, operationSignal);
|
|
203
|
-
if (response.kind === 'invitation-rejected') {
|
|
204
|
-
throw new Error(`Peer Mesh invitation was rejected: ${response.reason}`);
|
|
301
|
+
stream = await this.#peer.connectMeshControl({
|
|
302
|
+
...dialTarget(authorityReachability),
|
|
303
|
+
directDeadlineMs: CONNECT_DEADLINE_MS,
|
|
304
|
+
}, operationSignal);
|
|
305
|
+
if (stream.peerId !== authorityReachability.lease.peerId) {
|
|
306
|
+
throw new Error('Peer Mesh control stream has the wrong peer identity');
|
|
205
307
|
}
|
|
206
|
-
const
|
|
207
|
-
const
|
|
208
|
-
if (roster.roster.meshId !== invitation.meshId ||
|
|
209
|
-
roster.authorityPublicKey !== invitation.authorityPublicKey ||
|
|
210
|
-
!roster.roster.members.includes(identity.peerId)) {
|
|
211
|
-
throw new Error('Peer Mesh authority returned an unrelated roster');
|
|
212
|
-
}
|
|
213
|
-
const routes = await this.#validateRoutes(response.routes, roster, this.#now());
|
|
308
|
+
const localReachability = await this.#reachability.refresh();
|
|
309
|
+
const localAdvertisement = await this.#signLocalAdvertisement(invitation.meshId);
|
|
214
310
|
await this.#store.mutate((current) => {
|
|
215
311
|
const existing = findMesh(current.meshes, invitation.meshId);
|
|
216
312
|
if (existing?.role === 'authority') {
|
|
217
313
|
throw new Error('This peer already belongs to that Peer Mesh');
|
|
218
314
|
}
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
315
|
+
assertRejoinSettled(existing, localPeerId);
|
|
316
|
+
const pending = current.pendingJoins.find(({ invitation: candidate }) => candidate.meshId === invitation.meshId);
|
|
317
|
+
if (pending && pending.invitation.secret !== invitation.secret) {
|
|
318
|
+
throw new Error('This Peer Mesh already has an unresolved join attempt');
|
|
222
319
|
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
if (!existing)
|
|
233
|
-
assertMeshCapacity(current.meshes, identity.peerId);
|
|
234
|
-
const meshes = existing
|
|
235
|
-
? replaceMesh(current.meshes, state)
|
|
236
|
-
: appendMesh(current.meshes, state, identity.peerId);
|
|
320
|
+
if (pending?.phase === 'leave_pending') {
|
|
321
|
+
throw new Error('This Peer Mesh join is still being cancelled');
|
|
322
|
+
}
|
|
323
|
+
if (!existing && !pending) {
|
|
324
|
+
assertMeshCapacity(current.meshes, localPeerId, current.pendingJoins.length);
|
|
325
|
+
}
|
|
326
|
+
const next = pending
|
|
327
|
+
? { ...pending, invitation }
|
|
328
|
+
: { invitation, phase: 'prepared' };
|
|
237
329
|
return {
|
|
238
330
|
state: {
|
|
239
331
|
...current,
|
|
240
|
-
|
|
241
|
-
|
|
332
|
+
pendingJoins: pending
|
|
333
|
+
? current.pendingJoins.map((candidate) => candidate === pending ? next : candidate)
|
|
334
|
+
: [...current.pendingJoins, next],
|
|
242
335
|
},
|
|
243
336
|
result: undefined,
|
|
244
337
|
};
|
|
245
338
|
});
|
|
246
|
-
|
|
247
|
-
await this.#
|
|
248
|
-
|
|
249
|
-
|
|
339
|
+
joinIntentAdmitted = true;
|
|
340
|
+
return await this.#redeemPendingJoin(invitation, localReachability, localAdvertisement, stream, operationSignal);
|
|
341
|
+
}
|
|
342
|
+
catch (error) {
|
|
343
|
+
if (signal?.aborted && joinIntentAdmitted) {
|
|
344
|
+
await this.#cancelPendingJoin(invitation.meshId);
|
|
345
|
+
await this.#reconcileTransit();
|
|
346
|
+
}
|
|
347
|
+
void this.reconcile().catch(() => undefined);
|
|
348
|
+
throw error;
|
|
250
349
|
}
|
|
251
350
|
finally {
|
|
252
|
-
await stream
|
|
351
|
+
await stream?.close().catch(() => undefined);
|
|
352
|
+
}
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
async #redeemPendingJoin(invitation, localReachability, localAdvertisement, stream, signal) {
|
|
356
|
+
signal.throwIfAborted();
|
|
357
|
+
const authorityReachability = this.#authenticateReachability(invitation.reachability, invitation.reachability.lease.peerId, true);
|
|
358
|
+
const dispatch = await this.#store.mutate((current) => {
|
|
359
|
+
const pending = current.pendingJoins.find(({ invitation: candidate }) => candidate.meshId === invitation.meshId && candidate.secret === invitation.secret);
|
|
360
|
+
if (!pending) {
|
|
361
|
+
return { state: current, result: false };
|
|
253
362
|
}
|
|
363
|
+
if (pending.phase !== 'prepared') {
|
|
364
|
+
return { state: current, result: true };
|
|
365
|
+
}
|
|
366
|
+
return {
|
|
367
|
+
state: {
|
|
368
|
+
...current,
|
|
369
|
+
pendingJoins: current.pendingJoins.map((candidate) => candidate === pending ? { ...candidate, phase: 'outcome_unknown' } : candidate),
|
|
370
|
+
},
|
|
371
|
+
result: true,
|
|
372
|
+
};
|
|
373
|
+
});
|
|
374
|
+
if (!dispatch)
|
|
375
|
+
throw new Error('Peer Mesh join is no longer pending');
|
|
376
|
+
signal.throwIfAborted();
|
|
377
|
+
const response = await exchangeControl(stream, {
|
|
378
|
+
kind: 'redeem-invitation',
|
|
379
|
+
meshId: invitation.meshId,
|
|
380
|
+
secret: invitation.secret,
|
|
381
|
+
reachability: localReachability,
|
|
382
|
+
advertisement: localAdvertisement,
|
|
383
|
+
}, decodeRedeemResponse, signal);
|
|
384
|
+
if (response.kind === 'invitation-rejected') {
|
|
385
|
+
await this.#discardPendingJoin(invitation);
|
|
386
|
+
throw new Error(`Peer Mesh invitation was rejected: ${response.reason}`);
|
|
387
|
+
}
|
|
388
|
+
const roster = decodeSignedPeerMeshRoster(response.roster);
|
|
389
|
+
const identity = this.#peer.identity();
|
|
390
|
+
if (roster.roster.meshId !== invitation.meshId ||
|
|
391
|
+
roster.authorityPublicKey !== invitation.authorityPublicKey ||
|
|
392
|
+
roster.roster.authorityPeerId !== stream.peerId ||
|
|
393
|
+
invitation.reachability.lease.peerId !== stream.peerId ||
|
|
394
|
+
!roster.roster.members.includes(identity.peerId)) {
|
|
395
|
+
await this.#discardPendingJoin(invitation);
|
|
396
|
+
throw new Error('Peer Mesh authority returned an unrelated roster');
|
|
397
|
+
}
|
|
398
|
+
const reachability = this.#validateReachabilityPage(response.reachability, roster, true);
|
|
399
|
+
const advertisements = this.#validateAdvertisementPage(response.advertisements, roster);
|
|
400
|
+
signal.throwIfAborted();
|
|
401
|
+
await this.#store.mutate((current) => {
|
|
402
|
+
const pending = current.pendingJoins.find(({ invitation: candidate }) => candidate.meshId === invitation.meshId && candidate.secret === invitation.secret);
|
|
403
|
+
const existing = findMesh(current.meshes, invitation.meshId);
|
|
404
|
+
if (!pending) {
|
|
405
|
+
if (!existing || existing.role === 'authority') {
|
|
406
|
+
throw new Error('Peer Mesh join is no longer pending');
|
|
407
|
+
}
|
|
408
|
+
return { state: current, result: undefined };
|
|
409
|
+
}
|
|
410
|
+
const selectedRoster = existing ? selectRoster(existing.roster, roster) : roster;
|
|
411
|
+
if (!selectedRoster.roster.members.includes(identity.peerId)) {
|
|
412
|
+
throw new Error('Peer Mesh invitation did not establish an active membership');
|
|
413
|
+
}
|
|
414
|
+
const state = {
|
|
415
|
+
role: 'replica',
|
|
416
|
+
roster: selectedRoster,
|
|
417
|
+
desiredMembership: pending.phase === 'leave_pending' ? 'left' : 'active',
|
|
418
|
+
};
|
|
419
|
+
return {
|
|
420
|
+
state: {
|
|
421
|
+
...current,
|
|
422
|
+
meshes: existing
|
|
423
|
+
? replaceMesh(current.meshes, state)
|
|
424
|
+
: appendMesh(current.meshes, state, identity.peerId),
|
|
425
|
+
pendingJoins: current.pendingJoins.filter((candidate) => candidate !== pending),
|
|
426
|
+
reachability: mergeReachability(current.reachability, [...reachability, authorityReachability, localReachability], this.#now()),
|
|
427
|
+
advertisements: mergeAdvertisements(current.advertisements, [
|
|
428
|
+
...advertisements,
|
|
429
|
+
localAdvertisement,
|
|
430
|
+
]),
|
|
431
|
+
},
|
|
432
|
+
result: undefined,
|
|
433
|
+
};
|
|
434
|
+
});
|
|
435
|
+
this.#recordReachabilityReceipts([...reachability, authorityReachability, localReachability]);
|
|
436
|
+
signal.throwIfAborted();
|
|
437
|
+
await this.#refreshLocalEvidence();
|
|
438
|
+
signal.throwIfAborted();
|
|
439
|
+
await this.#reconcileTransit();
|
|
440
|
+
signal.throwIfAborted();
|
|
441
|
+
const stored = this.#store.read();
|
|
442
|
+
const state = findMesh(stored.meshes, invitation.meshId);
|
|
443
|
+
if (!state)
|
|
444
|
+
throw new Error('Peer Mesh join was not retained');
|
|
445
|
+
return peerMeshStatus(state, identity, this.#endpointKind, stored.reachability, stored.advertisements, this.#now(), (peerId) => this.#peer.isConnected(peerId), (peerId) => this.resolveRoutes(peerId), (signed) => this.#isReachabilityCurrent(signed));
|
|
446
|
+
}
|
|
447
|
+
#discardPendingJoin(invitation) {
|
|
448
|
+
return this.#store.mutate((current) => ({
|
|
449
|
+
state: {
|
|
450
|
+
...current,
|
|
451
|
+
pendingJoins: current.pendingJoins.filter(({ invitation: candidate }) => candidate.meshId !== invitation.meshId || candidate.secret !== invitation.secret),
|
|
452
|
+
},
|
|
453
|
+
result: undefined,
|
|
454
|
+
}));
|
|
455
|
+
}
|
|
456
|
+
#cancelPendingJoin(meshId) {
|
|
457
|
+
return this.#store.mutate((current) => {
|
|
458
|
+
const existing = findMesh(current.meshes, meshId);
|
|
459
|
+
return {
|
|
460
|
+
state: {
|
|
461
|
+
...current,
|
|
462
|
+
meshes: existing?.role === 'replica'
|
|
463
|
+
? replaceMesh(current.meshes, {
|
|
464
|
+
...existing,
|
|
465
|
+
desiredMembership: 'left',
|
|
466
|
+
})
|
|
467
|
+
: current.meshes,
|
|
468
|
+
pendingJoins: current.pendingJoins.flatMap((pending) => {
|
|
469
|
+
if (pending.invitation.meshId !== meshId)
|
|
470
|
+
return [pending];
|
|
471
|
+
return pending.phase === 'prepared' ? [] : [{ ...pending, phase: 'leave_pending' }];
|
|
472
|
+
}),
|
|
473
|
+
},
|
|
474
|
+
result: undefined,
|
|
475
|
+
};
|
|
254
476
|
});
|
|
255
477
|
}
|
|
478
|
+
async #resumePendingJoin(pending, signal) {
|
|
479
|
+
const authorityReachability = this.#authenticateReachability(pending.invitation.reachability, pending.invitation.reachability.lease.peerId, true);
|
|
480
|
+
const existing = findMesh(this.#store.read().meshes, pending.invitation.meshId);
|
|
481
|
+
if (existing?.role === 'replica' &&
|
|
482
|
+
authorityReachability.lease.peerId !== existing.roster.roster.authorityPeerId) {
|
|
483
|
+
throw new Error('Peer Mesh repair invitation has the wrong authority identity');
|
|
484
|
+
}
|
|
485
|
+
const stream = await this.#peer.connectMeshControl({
|
|
486
|
+
...dialTarget(authorityReachability),
|
|
487
|
+
directDeadlineMs: CONNECT_DEADLINE_MS,
|
|
488
|
+
}, signal);
|
|
489
|
+
try {
|
|
490
|
+
const localReachability = await this.#reachability.refresh();
|
|
491
|
+
const localAdvertisement = await this.#signLocalAdvertisement(pending.invitation.meshId);
|
|
492
|
+
await this.#redeemPendingJoin(pending.invitation, localReachability, localAdvertisement, stream, signal);
|
|
493
|
+
}
|
|
494
|
+
finally {
|
|
495
|
+
await stream.close().catch(() => undefined);
|
|
496
|
+
}
|
|
497
|
+
}
|
|
256
498
|
remove(meshId, peerId) {
|
|
257
499
|
if (this.#lifetime.signal.aborted)
|
|
258
500
|
return Promise.reject(new Error('Peer Mesh node is closed'));
|
|
@@ -269,31 +511,32 @@ class PeerMeshNodeImpl {
|
|
|
269
511
|
}
|
|
270
512
|
leave(meshId, signal) {
|
|
271
513
|
return this.#admitMesh(async () => {
|
|
272
|
-
|
|
273
|
-
const state = findMesh(stored.meshes, meshId);
|
|
514
|
+
signal?.throwIfAborted();
|
|
274
515
|
const localPeerId = this.#peer.identity().peerId;
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
throw new Error('Close a Peer Mesh instead of leaving its authority');
|
|
280
|
-
}
|
|
281
|
-
const operationSignal = signal
|
|
282
|
-
? AbortSignal.any([signal, this.#lifetime.signal])
|
|
283
|
-
: this.#lifetime.signal;
|
|
284
|
-
const stream = await this.#peer.connectMeshControl({
|
|
285
|
-
...currentAuthorityTarget(state, stored.routes),
|
|
286
|
-
directDeadlineMs: CONNECT_DEADLINE_MS,
|
|
287
|
-
}, operationSignal);
|
|
288
|
-
try {
|
|
289
|
-
const response = await exchangeControl(stream, { kind: 'leave', meshId }, decodeLeaveResponse, operationSignal);
|
|
290
|
-
if (response.kind === 'leave-rejected') {
|
|
291
|
-
throw new Error('Peer Mesh authority rejected the leave request');
|
|
516
|
+
await this.#store.mutate((current) => {
|
|
517
|
+
const state = findMesh(current.meshes, meshId);
|
|
518
|
+
if (!state || !isActiveMembership(state, localPeerId)) {
|
|
519
|
+
throw new Error('This peer does not belong to that Peer Mesh');
|
|
292
520
|
}
|
|
293
|
-
|
|
521
|
+
if (state.role === 'authority') {
|
|
522
|
+
throw new Error('Close a Peer Mesh instead of leaving its authority');
|
|
523
|
+
}
|
|
524
|
+
return {
|
|
525
|
+
state: {
|
|
526
|
+
...current,
|
|
527
|
+
meshes: replaceMesh(current.meshes, {
|
|
528
|
+
...state,
|
|
529
|
+
desiredMembership: 'left',
|
|
530
|
+
}),
|
|
531
|
+
},
|
|
532
|
+
result: undefined,
|
|
533
|
+
};
|
|
534
|
+
});
|
|
535
|
+
try {
|
|
536
|
+
await this.#reconcileTransit();
|
|
294
537
|
}
|
|
295
538
|
finally {
|
|
296
|
-
|
|
539
|
+
void this.reconcile().catch(() => undefined);
|
|
297
540
|
}
|
|
298
541
|
});
|
|
299
542
|
}
|
|
@@ -308,22 +551,28 @@ class PeerMeshNodeImpl {
|
|
|
308
551
|
setTransitMesh(meshId) {
|
|
309
552
|
return this.#admitMesh(async () => {
|
|
310
553
|
const localPeerId = this.#peer.identity().peerId;
|
|
311
|
-
await this.#store.mutate((current) => {
|
|
554
|
+
await this.#store.mutate(async (current) => {
|
|
312
555
|
if (meshId !== null &&
|
|
313
556
|
!current.meshes.some((mesh) => mesh.roster.roster.meshId === meshId && isActiveMembership(mesh, localPeerId))) {
|
|
314
557
|
throw new Error('Transit requires an active Peer Mesh membership');
|
|
315
558
|
}
|
|
559
|
+
if (current.transitMeshId === meshId)
|
|
560
|
+
return { state: current, result: undefined };
|
|
561
|
+
const next = { ...current, transitMeshId: meshId };
|
|
562
|
+
const advertisements = await this.#localAdvertisementsFor(next);
|
|
316
563
|
return {
|
|
317
|
-
state: {
|
|
564
|
+
state: {
|
|
565
|
+
...next,
|
|
566
|
+
advertisements: mergeAdvertisements(current.advertisements, advertisements),
|
|
567
|
+
},
|
|
318
568
|
result: undefined,
|
|
319
569
|
};
|
|
320
570
|
});
|
|
321
571
|
try {
|
|
322
572
|
await this.#reconcileTransit();
|
|
323
|
-
await this.#refreshLocalRoute();
|
|
324
573
|
}
|
|
325
|
-
|
|
326
|
-
|
|
574
|
+
finally {
|
|
575
|
+
this.#triggerReconciliation();
|
|
327
576
|
}
|
|
328
577
|
});
|
|
329
578
|
}
|
|
@@ -339,39 +588,137 @@ class PeerMeshNodeImpl {
|
|
|
339
588
|
this.#assertOpen();
|
|
340
589
|
const now = this.#now();
|
|
341
590
|
const stored = this.#store.read();
|
|
591
|
+
const localPeerId = this.#peer.identity().peerId;
|
|
592
|
+
this.#pruneCompletedRecoverySweeps(stored, localPeerId);
|
|
342
593
|
const sharedMeshIds = stored.meshes
|
|
343
|
-
.filter((state) => isActiveMembership(state,
|
|
344
|
-
state.roster.roster.members.includes(peerId))
|
|
594
|
+
.filter((state) => isActiveMembership(state, localPeerId) && state.roster.roster.members.includes(peerId))
|
|
345
595
|
.map(({ roster }) => roster.roster.meshId);
|
|
346
596
|
const visible = sharedMeshIds.length > 0;
|
|
347
597
|
if (!visible)
|
|
348
|
-
return
|
|
349
|
-
const
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
const
|
|
353
|
-
const
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
if (!route && transitRelayPeerIds.length === 0)
|
|
362
|
-
return undefined;
|
|
598
|
+
return emptyRouteResolution('exhausted');
|
|
599
|
+
const reachability = latestReachability(stored.reachability, peerId, now, true)?.lease;
|
|
600
|
+
const transitRelayPeerIds = transitRelayCandidates(eligibleTransitEvidence(stored, localPeerId, now, (signed) => this.#isReachabilityCurrent(signed)).filter(({ meshId, lease }) => lease.lease.peerId !== peerId && sharedMeshIds.includes(meshId))).map(({ peerId: relayPeerId }) => relayPeerId);
|
|
601
|
+
const routeHints = reachability?.directRoutes ?? [];
|
|
602
|
+
const coordinationRelays = reachability?.coordinationRoutes ?? [];
|
|
603
|
+
const hasCandidates = routeHints.length + coordinationRelays.length + transitRelayPeerIds.length > 0;
|
|
604
|
+
const state = hasCandidates
|
|
605
|
+
? 'available'
|
|
606
|
+
: hasPeerRecoverySource(stored, sharedMeshIds, peerId, localPeerId, now)
|
|
607
|
+
? 'recovering'
|
|
608
|
+
: this.#completedRecoverySweeps.has(peerId)
|
|
609
|
+
? 'exhausted'
|
|
610
|
+
: 'recovering';
|
|
363
611
|
return Object.freeze({
|
|
364
|
-
|
|
365
|
-
|
|
612
|
+
state,
|
|
613
|
+
routeHints,
|
|
614
|
+
coordinationRelays,
|
|
366
615
|
transitRelayPeerIds: Object.freeze(transitRelayPeerIds),
|
|
367
616
|
});
|
|
368
617
|
}
|
|
618
|
+
peerConnected(peerId) {
|
|
619
|
+
if (this.#lifetime.signal.aborted)
|
|
620
|
+
return;
|
|
621
|
+
const localPeerId = this.#peer.identity().peerId;
|
|
622
|
+
if (peerId !== localPeerId &&
|
|
623
|
+
this.#store
|
|
624
|
+
.read()
|
|
625
|
+
.meshes.some((state) => isActiveMembership(state, localPeerId) && state.roster.roster.members.includes(peerId)))
|
|
626
|
+
this.#triggerReconciliation();
|
|
627
|
+
}
|
|
628
|
+
async prepareRoutes(peerId, signal) {
|
|
629
|
+
this.#assertOpen();
|
|
630
|
+
signal.throwIfAborted();
|
|
631
|
+
this.#setRecoverySweepCompleted(peerId, false);
|
|
632
|
+
const localPeerId = this.#peer.identity().peerId;
|
|
633
|
+
const stored = this.#store.read();
|
|
634
|
+
const visible = this.#pruneCompletedRecoverySweeps(stored, localPeerId).has(peerId);
|
|
635
|
+
if (!visible)
|
|
636
|
+
return;
|
|
637
|
+
// A signed route can remain within its TTL after a peer restarted or
|
|
638
|
+
// rotated Relay reservations. Every connection establishment therefore
|
|
639
|
+
// asks the Mesh control plane for its newest record. Callers with a
|
|
640
|
+
// self-contained invitation run this reconciliation in parallel with the
|
|
641
|
+
// first dial; callers without usable routes wait for it.
|
|
642
|
+
try {
|
|
643
|
+
await this.#queueReconcile(signal, peerId);
|
|
644
|
+
}
|
|
645
|
+
finally {
|
|
646
|
+
if (!signal.aborted && !this.#lifetime.signal.aborted) {
|
|
647
|
+
this.#setRecoverySweepCompleted(peerId, true);
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
#pruneCompletedRecoverySweeps(stored = this.#store.read(), localPeerId = this.#peer.identity().peerId) {
|
|
652
|
+
const visiblePeerIds = new Set();
|
|
653
|
+
for (const state of stored.meshes) {
|
|
654
|
+
if (!isActiveMembership(state, localPeerId))
|
|
655
|
+
continue;
|
|
656
|
+
for (const memberPeerId of state.roster.roster.members) {
|
|
657
|
+
if (memberPeerId !== localPeerId)
|
|
658
|
+
visiblePeerIds.add(memberPeerId);
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
for (const peerId of this.#completedRecoverySweeps) {
|
|
662
|
+
if (!visiblePeerIds.has(peerId))
|
|
663
|
+
this.#completedRecoverySweeps.delete(peerId);
|
|
664
|
+
}
|
|
665
|
+
return visiblePeerIds;
|
|
666
|
+
}
|
|
667
|
+
subscribeRoutes(peerId, listener) {
|
|
668
|
+
this.#assertOpen();
|
|
669
|
+
let current = this.resolveRoutes(peerId);
|
|
670
|
+
const observe = () => {
|
|
671
|
+
const next = this.resolveRoutes(peerId);
|
|
672
|
+
if (sameResolvedRoutes(current, next))
|
|
673
|
+
return;
|
|
674
|
+
current = next;
|
|
675
|
+
try {
|
|
676
|
+
listener();
|
|
677
|
+
}
|
|
678
|
+
catch {
|
|
679
|
+
// Route observers cannot control Mesh reconciliation.
|
|
680
|
+
}
|
|
681
|
+
};
|
|
682
|
+
const listeners = this.#routeResolutionListeners.get(peerId) ?? new Set();
|
|
683
|
+
listeners.add(observe);
|
|
684
|
+
this.#routeResolutionListeners.set(peerId, listeners);
|
|
685
|
+
const unsubscribeStore = this.#store.subscribe(observe);
|
|
686
|
+
return () => {
|
|
687
|
+
unsubscribeStore();
|
|
688
|
+
listeners.delete(observe);
|
|
689
|
+
if (listeners.size === 0)
|
|
690
|
+
this.#routeResolutionListeners.delete(peerId);
|
|
691
|
+
};
|
|
692
|
+
}
|
|
693
|
+
#setRecoverySweepCompleted(peerId, completed) {
|
|
694
|
+
const retain = completed && this.#pruneCompletedRecoverySweeps().has(peerId);
|
|
695
|
+
const changed = retain
|
|
696
|
+
? !this.#completedRecoverySweeps.has(peerId)
|
|
697
|
+
: this.#completedRecoverySweeps.has(peerId);
|
|
698
|
+
if (!changed)
|
|
699
|
+
return;
|
|
700
|
+
if (retain)
|
|
701
|
+
this.#completedRecoverySweeps.add(peerId);
|
|
702
|
+
else
|
|
703
|
+
this.#completedRecoverySweeps.delete(peerId);
|
|
704
|
+
for (const listener of this.#routeResolutionListeners.get(peerId) ?? [])
|
|
705
|
+
listener();
|
|
706
|
+
}
|
|
369
707
|
reconcile(signal) {
|
|
708
|
+
return this.#queueReconcile(signal);
|
|
709
|
+
}
|
|
710
|
+
#queueReconcile(signal, excludedPeerId) {
|
|
370
711
|
if (this.#lifetime.signal.aborted)
|
|
371
712
|
return Promise.reject(new Error('Peer Mesh node is closed'));
|
|
372
|
-
const
|
|
373
|
-
|
|
374
|
-
|
|
713
|
+
const previous = this.#reconcileTail;
|
|
714
|
+
let release;
|
|
715
|
+
const turn = new Promise((resolve) => {
|
|
716
|
+
release = resolve;
|
|
717
|
+
});
|
|
718
|
+
this.#reconcileTail = previous.then(() => turn);
|
|
719
|
+
return waitForTurn(previous, signal)
|
|
720
|
+
.then(() => this.#reconcile(signal, excludedPeerId))
|
|
721
|
+
.finally(release);
|
|
375
722
|
}
|
|
376
723
|
async serve() {
|
|
377
724
|
if (this.#lifetime.signal.aborted)
|
|
@@ -409,50 +756,134 @@ class PeerMeshNodeImpl {
|
|
|
409
756
|
}
|
|
410
757
|
async #close() {
|
|
411
758
|
this.#lifetime.abort();
|
|
759
|
+
this.#unsubscribeReachability?.();
|
|
760
|
+
this.#unsubscribeReachability = undefined;
|
|
761
|
+
for (const wake of this.#reconcileWaiters)
|
|
762
|
+
wake();
|
|
763
|
+
this.#reconcileWaiters.clear();
|
|
412
764
|
await this.#serveTask?.catch(() => undefined);
|
|
413
765
|
for (const stream of this.#activeControlStreams)
|
|
414
766
|
stream.abort();
|
|
415
767
|
this.#activeControlStreams.clear();
|
|
416
|
-
|
|
768
|
+
this.#routeResolutionListeners.clear();
|
|
769
|
+
await Promise.all([this.#admissionTail, this.#reconcileTail, this.#transitTail]);
|
|
417
770
|
return this.#store.close();
|
|
418
771
|
}
|
|
419
772
|
async #runReconciliation(signal) {
|
|
773
|
+
let failureReported = false;
|
|
420
774
|
while (!signal.aborted) {
|
|
421
|
-
|
|
422
|
-
|
|
775
|
+
const observedGeneration = this.#reconcileGeneration;
|
|
776
|
+
try {
|
|
777
|
+
await this.reconcile(signal);
|
|
778
|
+
failureReported = false;
|
|
779
|
+
}
|
|
780
|
+
catch (error) {
|
|
781
|
+
if (!signal.aborted && !failureReported) {
|
|
782
|
+
failureReported = true;
|
|
783
|
+
try {
|
|
784
|
+
this.#onBackgroundReconcileError?.(error);
|
|
785
|
+
}
|
|
786
|
+
catch {
|
|
787
|
+
// Diagnostics cannot control Peer Mesh reconciliation.
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
await this.#waitForReconciliationTrigger(observedGeneration, signal).catch(() => undefined);
|
|
423
792
|
}
|
|
424
793
|
}
|
|
425
|
-
async #
|
|
794
|
+
async #waitForReconciliationTrigger(observedGeneration, signal) {
|
|
795
|
+
if (this.#reconcileGeneration !== observedGeneration || signal.aborted)
|
|
796
|
+
return;
|
|
797
|
+
let wake;
|
|
798
|
+
const triggered = new Promise((resolve) => {
|
|
799
|
+
wake = resolve;
|
|
800
|
+
this.#reconcileWaiters.add(wake);
|
|
801
|
+
});
|
|
802
|
+
const timeout = setTimeout(wake, RECONCILE_INTERVAL_MS);
|
|
803
|
+
signal.addEventListener('abort', wake, { once: true });
|
|
804
|
+
if (this.#reconcileGeneration !== observedGeneration || signal.aborted)
|
|
805
|
+
wake();
|
|
806
|
+
try {
|
|
807
|
+
await triggered;
|
|
808
|
+
}
|
|
809
|
+
finally {
|
|
810
|
+
clearTimeout(timeout);
|
|
811
|
+
signal.removeEventListener('abort', wake);
|
|
812
|
+
this.#reconcileWaiters.delete(wake);
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
#triggerReconciliation() {
|
|
816
|
+
this.#reconcileGeneration += 1;
|
|
817
|
+
for (const wake of this.#reconcileWaiters)
|
|
818
|
+
wake();
|
|
819
|
+
this.#reconcileWaiters.clear();
|
|
820
|
+
}
|
|
821
|
+
async #reconcile(signal, excludedPeerId) {
|
|
426
822
|
const lifetimeSignal = signal
|
|
427
823
|
? AbortSignal.any([signal, this.#lifetime.signal])
|
|
428
824
|
: this.#lifetime.signal;
|
|
429
825
|
lifetimeSignal.throwIfAborted();
|
|
430
826
|
await this.#reconcileTransit();
|
|
431
|
-
await this.#
|
|
827
|
+
await this.#refreshLocalEvidence();
|
|
432
828
|
const identity = this.#peer.identity();
|
|
433
829
|
const stored = this.#store.read();
|
|
434
|
-
const memberships = stored.meshes.filter((state) => state.
|
|
435
|
-
const pending =
|
|
830
|
+
const memberships = stored.meshes.filter((state) => !state.roster.roster.closed && state.roster.roster.members.includes(identity.peerId));
|
|
831
|
+
const pending = stored.pendingJoins
|
|
832
|
+
.filter(({ invitation }) => invitation.reachability.lease.peerId !== excludedPeerId)
|
|
833
|
+
.map((join) => ({ kind: 'join', join }));
|
|
436
834
|
const gossipCursor = this.#gossipCursor;
|
|
437
835
|
this.#gossipCursor = (this.#gossipCursor + 1) % PEER_MESH_MAX_MEMBERS;
|
|
836
|
+
const now = this.#now();
|
|
837
|
+
const targetFor = (peerId) => {
|
|
838
|
+
const signed = latestReachability(stored.reachability, peerId, now, true);
|
|
839
|
+
if (signed)
|
|
840
|
+
return dialTarget(signed);
|
|
841
|
+
// A fresh Session Share can reconnect an existing member after all of
|
|
842
|
+
// its stored routes expired. Reuse that authenticated connection to
|
|
843
|
+
// exchange signed evidence; the connection itself grants no membership.
|
|
844
|
+
return this.#peer.isConnected(peerId)
|
|
845
|
+
? { peerId, routeHints: [], coordinationRelays: [] }
|
|
846
|
+
: undefined;
|
|
847
|
+
};
|
|
438
848
|
for (const [index, state] of memberships.entries()) {
|
|
439
|
-
const
|
|
440
|
-
const
|
|
441
|
-
|
|
849
|
+
const meshId = state.roster.roster.meshId;
|
|
850
|
+
const desiredMembership = state.role === 'replica' ? state.desiredMembership : 'active';
|
|
851
|
+
const authority = state.role === 'replica' ? targetFor(state.roster.roster.authorityPeerId) : undefined;
|
|
852
|
+
if (authority && authority.peerId !== excludedPeerId) {
|
|
853
|
+
pending.push({
|
|
854
|
+
kind: 'membership',
|
|
855
|
+
meshId,
|
|
856
|
+
target: authority,
|
|
857
|
+
desiredMembership,
|
|
858
|
+
roster: state.roster,
|
|
859
|
+
});
|
|
860
|
+
}
|
|
861
|
+
if (desiredMembership === 'left')
|
|
862
|
+
continue;
|
|
863
|
+
const rotatingTargets = state.roster.roster.members
|
|
864
|
+
.filter((peerId) => peerId !== identity.peerId &&
|
|
865
|
+
peerId !== excludedPeerId &&
|
|
866
|
+
(state.role === 'authority' || peerId !== state.roster.roster.authorityPeerId))
|
|
442
867
|
.flatMap((peerId) => {
|
|
443
|
-
const
|
|
444
|
-
return
|
|
868
|
+
const target = targetFor(peerId);
|
|
869
|
+
return target ? [target] : [];
|
|
870
|
+
});
|
|
871
|
+
if (rotatingTargets.length === 0)
|
|
872
|
+
continue;
|
|
873
|
+
pending.push({
|
|
874
|
+
kind: 'membership',
|
|
875
|
+
meshId,
|
|
876
|
+
target: rotatingTargets[(gossipCursor + index) % rotatingTargets.length],
|
|
877
|
+
desiredMembership,
|
|
878
|
+
roster: state.roster,
|
|
445
879
|
});
|
|
446
|
-
if (gossipRoutes.length > 0) {
|
|
447
|
-
targets.push(gossipRoutes[(gossipCursor + index) % gossipRoutes.length]);
|
|
448
|
-
}
|
|
449
|
-
pending.push({ meshId: state.roster.roster.meshId, targets });
|
|
450
880
|
}
|
|
451
881
|
if (pending.length === 0)
|
|
452
882
|
return;
|
|
453
883
|
const start = this.#reconcileCursor % pending.length;
|
|
454
884
|
const deadline = AbortSignal.timeout(RECONCILE_DEADLINE_MS);
|
|
455
885
|
const operationSignal = AbortSignal.any([lifetimeSignal, deadline]);
|
|
886
|
+
const failures = [];
|
|
456
887
|
let next = 0;
|
|
457
888
|
const worker = async () => {
|
|
458
889
|
while (!operationSignal.aborted) {
|
|
@@ -460,17 +891,24 @@ class PeerMeshNodeImpl {
|
|
|
460
891
|
next += 1;
|
|
461
892
|
if (offset >= pending.length)
|
|
462
893
|
return;
|
|
463
|
-
const
|
|
894
|
+
const operation = pending[(start + offset) % pending.length];
|
|
464
895
|
try {
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
896
|
+
if (operation.kind === 'join') {
|
|
897
|
+
await this.#resumePendingJoin(operation.join, operationSignal);
|
|
898
|
+
}
|
|
899
|
+
else if (operation.desiredMembership === 'left') {
|
|
900
|
+
await this.#notifyLeave(operation.meshId, operation.target, operation.roster, operationSignal);
|
|
901
|
+
}
|
|
902
|
+
else {
|
|
903
|
+
await this.#syncPeer(operation.meshId, operation.target, operationSignal);
|
|
469
904
|
}
|
|
470
905
|
}
|
|
471
|
-
catch {
|
|
906
|
+
catch (error) {
|
|
472
907
|
if (lifetimeSignal.aborted)
|
|
473
908
|
lifetimeSignal.throwIfAborted();
|
|
909
|
+
if (operation.kind === 'join' || operation.desiredMembership === 'left') {
|
|
910
|
+
failures.push(error);
|
|
911
|
+
}
|
|
474
912
|
if (deadline.aborted)
|
|
475
913
|
return;
|
|
476
914
|
}
|
|
@@ -480,36 +918,64 @@ class PeerMeshNodeImpl {
|
|
|
480
918
|
this.#reconcileCursor = (start + Math.min(next, pending.length)) % pending.length;
|
|
481
919
|
await this.#reconcileTransit();
|
|
482
920
|
lifetimeSignal.throwIfAborted();
|
|
921
|
+
if (failures.length > 0) {
|
|
922
|
+
throw new AggregateError(failures, 'Peer Mesh reconciliation did not reach every pending intent');
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
async #notifyLeave(meshId, target, roster, signal) {
|
|
926
|
+
const stream = await this.#peer.connectMeshControl({
|
|
927
|
+
...target,
|
|
928
|
+
directDeadlineMs: CONNECT_DEADLINE_MS,
|
|
929
|
+
}, signal);
|
|
930
|
+
try {
|
|
931
|
+
const response = await exchangeControl(stream, { kind: 'leave', meshId, roster }, decodeLeaveResponse, signal);
|
|
932
|
+
if (response.kind === 'leave-rejected') {
|
|
933
|
+
throw new Error('Peer Mesh authority rejected the leave request');
|
|
934
|
+
}
|
|
935
|
+
await this.#applySync(meshId, response.roster, [], []);
|
|
936
|
+
}
|
|
937
|
+
finally {
|
|
938
|
+
await stream.close().catch(() => undefined);
|
|
939
|
+
}
|
|
483
940
|
}
|
|
484
941
|
async #syncPeer(meshId, target, signal) {
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
const localPeerId = this.#peer.identity().peerId;
|
|
490
|
-
if (!state || !isActiveMembership(state, localPeerId))
|
|
942
|
+
const localPeerId = this.#peer.identity().peerId;
|
|
943
|
+
const targetPeerId = target.peerId;
|
|
944
|
+
for (let page = 0; page <= PEER_MESH_MAX_MEMBERS; page += 1) {
|
|
945
|
+
if (!isActiveMeshMember(this.#store.read().meshes, meshId, localPeerId, targetPeerId))
|
|
491
946
|
return;
|
|
492
|
-
const
|
|
493
|
-
if (!route)
|
|
494
|
-
throw new Error('Peer Mesh local route is unavailable');
|
|
947
|
+
const discovered = this.resolveRoutes(targetPeerId);
|
|
495
948
|
const stream = await this.#peer.connectMeshControl({
|
|
496
|
-
peerId:
|
|
497
|
-
routeHints: target.routeHints,
|
|
498
|
-
coordinationRelays: target.coordinationRelays,
|
|
949
|
+
peerId: targetPeerId,
|
|
950
|
+
routeHints: mergeAddresses(discovered?.routeHints ?? [], target.routeHints),
|
|
951
|
+
coordinationRelays: mergeAddresses(discovered?.coordinationRelays ?? [], target.coordinationRelays),
|
|
952
|
+
transitRelayPeerIds: discovered?.transitRelayPeerIds,
|
|
499
953
|
directDeadlineMs: CONNECT_DEADLINE_MS,
|
|
500
954
|
}, signal);
|
|
501
955
|
try {
|
|
956
|
+
await this.#refreshLocalEvidence();
|
|
957
|
+
const stored = this.#store.read();
|
|
958
|
+
if (!isActiveMeshMember(stored.meshes, meshId, localPeerId, targetPeerId))
|
|
959
|
+
return;
|
|
960
|
+
const state = findMesh(stored.meshes, meshId);
|
|
961
|
+
const reachability = latestReachability(stored.reachability, localPeerId, this.#now(), true);
|
|
962
|
+
const advertisement = findAdvertisement(stored.advertisements, meshId, localPeerId);
|
|
963
|
+
if (!reachability || !advertisement) {
|
|
964
|
+
throw new Error('Peer Mesh local evidence is unavailable');
|
|
965
|
+
}
|
|
502
966
|
const response = await exchangeControl(stream, {
|
|
503
967
|
kind: 'sync',
|
|
504
968
|
meshId,
|
|
505
969
|
roster: state.roster,
|
|
506
|
-
|
|
507
|
-
|
|
970
|
+
reachability,
|
|
971
|
+
advertisement,
|
|
972
|
+
knownReachability: reachabilitySummaries(stored.reachability, state.roster, this.#now()),
|
|
973
|
+
knownAdvertisements: advertisementSummaries(stored.advertisements, state.roster),
|
|
508
974
|
}, decodeSyncResponse, signal);
|
|
509
975
|
if (response.kind === 'sync-rejected') {
|
|
510
976
|
throw new Error(`Peer Mesh synchronization was rejected: ${response.reason}`);
|
|
511
977
|
}
|
|
512
|
-
await this.#applySync(meshId, response.roster, response.
|
|
978
|
+
await this.#applySync(meshId, response.roster, response.reachability, response.advertisements);
|
|
513
979
|
if (!response.more)
|
|
514
980
|
return;
|
|
515
981
|
}
|
|
@@ -519,101 +985,191 @@ class PeerMeshNodeImpl {
|
|
|
519
985
|
}
|
|
520
986
|
throw new Error('Peer Mesh synchronization exceeded its page bound');
|
|
521
987
|
}
|
|
522
|
-
#
|
|
523
|
-
this.#
|
|
524
|
-
this.#
|
|
988
|
+
#refreshLocalEvidence() {
|
|
989
|
+
this.#evidenceRefreshTask ??= this.#refreshLocalEvidenceOnce().finally(() => {
|
|
990
|
+
this.#evidenceRefreshTask = undefined;
|
|
525
991
|
});
|
|
526
|
-
return this.#
|
|
992
|
+
return this.#evidenceRefreshTask;
|
|
527
993
|
}
|
|
528
|
-
async #
|
|
994
|
+
async #refreshLocalEvidenceOnce() {
|
|
995
|
+
const reachability = await this.#reachability.refresh();
|
|
529
996
|
const identity = this.#peer.identity();
|
|
530
|
-
const current = this.#store.read();
|
|
531
|
-
const active = current.meshes.filter((state) => isActiveMembership(state, identity.peerId));
|
|
532
|
-
if (active.length === 0)
|
|
533
|
-
return undefined;
|
|
534
|
-
const existing = current.routes
|
|
535
|
-
.filter(({ route }) => route.peerId === identity.peerId)
|
|
536
|
-
.sort((left, right) => right.route.sequence - left.route.sequence)[0];
|
|
537
997
|
const now = this.#now();
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
998
|
+
return this.#store.mutate(async (current) => {
|
|
999
|
+
const active = current.meshes.filter((state) => isActiveMembership(state, identity.peerId));
|
|
1000
|
+
if (active.length === 0) {
|
|
1001
|
+
return { state: current, result: undefined };
|
|
1002
|
+
}
|
|
1003
|
+
const advertisements = await this.#localAdvertisementsFor(current);
|
|
1004
|
+
return {
|
|
1005
|
+
state: {
|
|
1006
|
+
...current,
|
|
1007
|
+
reachability: mergeReachability(current.reachability, [reachability], now),
|
|
1008
|
+
advertisements: mergeAdvertisements(current.advertisements, advertisements),
|
|
1009
|
+
},
|
|
1010
|
+
result: Object.freeze({
|
|
1011
|
+
reachability,
|
|
1012
|
+
advertisements: Object.freeze(advertisements),
|
|
1013
|
+
}),
|
|
1014
|
+
};
|
|
1015
|
+
});
|
|
1016
|
+
}
|
|
1017
|
+
async #localAdvertisementsFor(stored) {
|
|
1018
|
+
const identity = this.#peer.identity();
|
|
1019
|
+
const advertisements = [];
|
|
1020
|
+
for (const state of stored.meshes) {
|
|
1021
|
+
if (!isActiveMembership(state, identity.peerId))
|
|
1022
|
+
continue;
|
|
1023
|
+
const meshId = state.roster.roster.meshId;
|
|
1024
|
+
const existing = findAdvertisement(stored.advertisements, meshId, identity.peerId);
|
|
1025
|
+
advertisements.push(isCurrentLocalAdvertisement(existing, meshId, identity.peerId, stored, this.#endpointKind)
|
|
1026
|
+
? existing
|
|
1027
|
+
: await this.#signLocalAdvertisement(meshId, stored));
|
|
544
1028
|
}
|
|
545
|
-
|
|
546
|
-
await this.#store.mutate((states) => ({
|
|
547
|
-
state: { ...states, routes: mergeRoutes(states.routes, [route], now) },
|
|
548
|
-
result: undefined,
|
|
549
|
-
}));
|
|
550
|
-
return route;
|
|
1029
|
+
return Object.freeze(advertisements);
|
|
551
1030
|
}
|
|
552
|
-
async #
|
|
1031
|
+
async #signLocalAdvertisement(meshId, stored = this.#store.read()) {
|
|
553
1032
|
const identity = this.#peer.identity();
|
|
554
|
-
const
|
|
555
|
-
|
|
556
|
-
.
|
|
557
|
-
|
|
558
|
-
const route = canonicalPeerMeshRouteRecord({
|
|
1033
|
+
const maxRevision = stored.advertisements
|
|
1034
|
+
.filter(({ advertisement }) => advertisement.meshId === meshId && advertisement.peerId === identity.peerId)
|
|
1035
|
+
.reduce((maximum, { advertisement }) => Math.max(maximum, advertisement.revision), 0);
|
|
1036
|
+
const advertisement = canonicalPeerMeshMemberAdvertisement({
|
|
559
1037
|
version: 1,
|
|
1038
|
+
meshId,
|
|
560
1039
|
peerId: identity.peerId,
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
...(stored.transitMeshId ? { transitMeshId: stored.transitMeshId } : {}),
|
|
1040
|
+
revision: maxRevision + 1,
|
|
1041
|
+
...(this.#endpointKind ? { endpointKind: this.#endpointKind } : {}),
|
|
1042
|
+
...(stored.displayName ? { displayName: stored.displayName } : {}),
|
|
1043
|
+
offersTransit: stored.transitMeshId === meshId,
|
|
566
1044
|
});
|
|
567
|
-
const proof = await this.#peer.signIdentity(
|
|
568
|
-
const signed =
|
|
569
|
-
|
|
1045
|
+
const proof = await this.#peer.signIdentity(peerMeshMemberAdvertisementSigningBytes(advertisement));
|
|
1046
|
+
const signed = decodeSignedPeerMeshMemberAdvertisement({
|
|
1047
|
+
advertisement,
|
|
570
1048
|
publicKey: proof.publicKey.toString('base64url'),
|
|
571
1049
|
signature: proof.signature.toString('base64url'),
|
|
572
1050
|
});
|
|
573
|
-
this.#
|
|
1051
|
+
this.#assertAdvertisementSignature(signed);
|
|
574
1052
|
return signed;
|
|
575
1053
|
}
|
|
576
|
-
#
|
|
577
|
-
if (values.length >
|
|
578
|
-
throw new Error('Too many Peer Mesh
|
|
579
|
-
const routes = values.map(decodeSignedPeerMeshRouteRecord);
|
|
580
|
-
if (new Set(routes.map(({ route }) => route.peerId)).size !== routes.length) {
|
|
581
|
-
throw new Error('Duplicate Peer Mesh routes');
|
|
1054
|
+
#validateReachabilityPage(values, roster, allowExpired) {
|
|
1055
|
+
if (values.length > EVIDENCE_PAGE_SIZE) {
|
|
1056
|
+
throw new Error('Too many Peer Mesh reachability leases');
|
|
582
1057
|
}
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
1058
|
+
const reachability = values.map((value) => {
|
|
1059
|
+
const signed = decodeSignedPeerReachabilityLease(value);
|
|
1060
|
+
if (!roster.roster.members.includes(signed.lease.peerId)) {
|
|
1061
|
+
throw new Error('Peer Mesh reachability is outside the active roster');
|
|
586
1062
|
}
|
|
587
|
-
this.#
|
|
1063
|
+
return this.#authenticateReachability(signed, signed.lease.peerId, allowExpired);
|
|
1064
|
+
});
|
|
1065
|
+
if (new Set(reachability.map(({ lease }) => lease.peerId)).size !== reachability.length) {
|
|
1066
|
+
throw new Error('Duplicate Peer Mesh reachability leases');
|
|
588
1067
|
}
|
|
589
|
-
return Object.freeze(
|
|
590
|
-
}
|
|
591
|
-
#
|
|
592
|
-
const signed =
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
1068
|
+
return Object.freeze(reachability);
|
|
1069
|
+
}
|
|
1070
|
+
#authenticateReachability(value, expectedPeerId, allowExpired = false) {
|
|
1071
|
+
const signed = verifySignedPeerReachabilityLease({
|
|
1072
|
+
value,
|
|
1073
|
+
expectedPeerId,
|
|
1074
|
+
now: this.#now(),
|
|
1075
|
+
verifyIdentity: this.#peer.verifyIdentity.bind(this.#peer),
|
|
1076
|
+
...(allowExpired ? { allowExpired: true } : {}),
|
|
1077
|
+
});
|
|
1078
|
+
if (allowExpired &&
|
|
1079
|
+
signed.lease.expiresAt <= this.#now() - PEER_REACHABILITY_RECOVERY_HORIZON_MS) {
|
|
1080
|
+
throw new Error('Peer Mesh reachability is outside the recovery horizon');
|
|
597
1081
|
}
|
|
598
|
-
this.#assertRouteSignature(signed);
|
|
599
1082
|
return signed;
|
|
600
1083
|
}
|
|
601
|
-
#
|
|
602
|
-
|
|
603
|
-
|
|
1084
|
+
#validateAdvertisementPage(values, roster) {
|
|
1085
|
+
if (values.length > EVIDENCE_PAGE_SIZE) {
|
|
1086
|
+
throw new Error('Too many Peer Mesh member advertisements');
|
|
1087
|
+
}
|
|
1088
|
+
const advertisements = values.map((value) => {
|
|
1089
|
+
const signed = decodeSignedPeerMeshMemberAdvertisement(value);
|
|
1090
|
+
if (signed.advertisement.meshId !== roster.roster.meshId ||
|
|
1091
|
+
!roster.roster.members.includes(signed.advertisement.peerId)) {
|
|
1092
|
+
throw new Error('Peer Mesh member advertisement is outside the active roster');
|
|
1093
|
+
}
|
|
1094
|
+
this.#assertAdvertisementSignature(signed);
|
|
1095
|
+
return signed;
|
|
1096
|
+
});
|
|
1097
|
+
const keys = advertisements.map(({ advertisement }) => advertisement.peerId);
|
|
1098
|
+
if (new Set(keys).size !== keys.length) {
|
|
1099
|
+
throw new Error('Duplicate Peer Mesh member advertisements');
|
|
1100
|
+
}
|
|
1101
|
+
return Object.freeze(advertisements);
|
|
1102
|
+
}
|
|
1103
|
+
#validateAdvertisementForPeer(value, meshId, peerId) {
|
|
1104
|
+
const signed = decodeSignedPeerMeshMemberAdvertisement(value);
|
|
1105
|
+
if (signed.advertisement.meshId !== meshId || signed.advertisement.peerId !== peerId) {
|
|
1106
|
+
throw new Error('Peer Mesh member advertisement belongs to a different member');
|
|
1107
|
+
}
|
|
1108
|
+
this.#assertAdvertisementSignature(signed);
|
|
1109
|
+
return signed;
|
|
1110
|
+
}
|
|
1111
|
+
#assertAdvertisementSignature(signedValue) {
|
|
1112
|
+
const signed = decodeSignedPeerMeshMemberAdvertisement(signedValue);
|
|
1113
|
+
const valid = this.#peer.verifyIdentity(signed.advertisement.peerId, peerMeshMemberAdvertisementSigningBytes(signed.advertisement), {
|
|
604
1114
|
publicKey: Buffer.from(signed.publicKey, 'base64url'),
|
|
605
1115
|
signature: Buffer.from(signed.signature, 'base64url'),
|
|
606
1116
|
});
|
|
607
1117
|
if (!valid)
|
|
608
|
-
throw new Error('Peer Mesh
|
|
1118
|
+
throw new Error('Peer Mesh member advertisement signature is invalid');
|
|
1119
|
+
}
|
|
1120
|
+
#recordReachabilityReceipt(signed) {
|
|
1121
|
+
this.#recordReachabilityReceipts([signed]);
|
|
609
1122
|
}
|
|
610
|
-
|
|
1123
|
+
#recordReachabilityReceipts(values) {
|
|
1124
|
+
const retained = this.#retainedReachabilityReceiptPeerIds();
|
|
1125
|
+
for (const peerId of this.#reachabilityReceipts.keys()) {
|
|
1126
|
+
if (!retained.has(peerId))
|
|
1127
|
+
this.#reachabilityReceipts.delete(peerId);
|
|
1128
|
+
}
|
|
1129
|
+
for (const signed of values) {
|
|
1130
|
+
if (!retained.has(signed.lease.peerId))
|
|
1131
|
+
continue;
|
|
1132
|
+
const previous = this.#reachabilityReceipts.get(signed.lease.peerId);
|
|
1133
|
+
if (previous && previous.revision > signed.lease.revision)
|
|
1134
|
+
continue;
|
|
1135
|
+
if (previous &&
|
|
1136
|
+
previous.revision === signed.lease.revision &&
|
|
1137
|
+
previous.signature !== signed.signature) {
|
|
1138
|
+
continue;
|
|
1139
|
+
}
|
|
1140
|
+
this.#reachabilityReceipts.set(signed.lease.peerId, peerReachabilityLeaseReceipt({
|
|
1141
|
+
signed,
|
|
1142
|
+
wallNow: this.#now(),
|
|
1143
|
+
monotonicNow: this.#monotonicNow(),
|
|
1144
|
+
...(previous ? { previous } : {}),
|
|
1145
|
+
}));
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
#retainedReachabilityReceiptPeerIds() {
|
|
1149
|
+
const stored = this.#store.read();
|
|
1150
|
+
const localPeerId = this.#peer.identity().peerId;
|
|
1151
|
+
const retained = new Set();
|
|
1152
|
+
for (const state of stored.meshes) {
|
|
1153
|
+
if (!isActiveMembership(state, localPeerId))
|
|
1154
|
+
continue;
|
|
1155
|
+
for (const peerId of state.roster.roster.members) {
|
|
1156
|
+
if (peerId !== localPeerId)
|
|
1157
|
+
retained.add(peerId);
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
return retained;
|
|
1161
|
+
}
|
|
1162
|
+
#isReachabilityCurrent(signed) {
|
|
1163
|
+
return isPeerReachabilityLeaseCurrent(signed, this.#reachabilityReceipts.get(signed.lease.peerId), this.#monotonicNow());
|
|
1164
|
+
}
|
|
1165
|
+
async #applySync(meshId, rosterValue, reachabilityValues, advertisementValues) {
|
|
611
1166
|
const roster = decodeSignedPeerMeshRoster(rosterValue);
|
|
612
1167
|
if (roster.roster.meshId !== meshId)
|
|
613
1168
|
throw new Error('Peer Mesh synchronization changed Mesh');
|
|
614
|
-
const
|
|
1169
|
+
const reachability = this.#validateReachabilityPage(reachabilityValues, roster, true);
|
|
1170
|
+
const advertisements = this.#validateAdvertisementPage(advertisementValues, roster);
|
|
615
1171
|
const localPeerId = this.#peer.identity().peerId;
|
|
616
|
-
await this.#store.mutate((current) => {
|
|
1172
|
+
const accepted = await this.#store.mutate((current) => {
|
|
617
1173
|
const state = findMesh(current.meshes, meshId);
|
|
618
1174
|
if (!state || state.roster.authorityPublicKey !== roster.authorityPublicKey) {
|
|
619
1175
|
throw new Error('Peer Mesh synchronization has the wrong authority');
|
|
@@ -627,14 +1183,19 @@ class PeerMeshNodeImpl {
|
|
|
627
1183
|
state: {
|
|
628
1184
|
...current,
|
|
629
1185
|
meshes: replaceMesh(current.meshes, next),
|
|
630
|
-
|
|
631
|
-
? current.
|
|
632
|
-
:
|
|
1186
|
+
reachability: !isActiveMembership(next, localPeerId)
|
|
1187
|
+
? current.reachability
|
|
1188
|
+
: mergeReachability(current.reachability, reachability, this.#now()),
|
|
1189
|
+
advertisements: !isActiveMembership(next, localPeerId)
|
|
1190
|
+
? current.advertisements
|
|
1191
|
+
: mergeAdvertisements(current.advertisements, advertisements),
|
|
633
1192
|
},
|
|
634
|
-
result:
|
|
1193
|
+
result: isActiveMembership(next, localPeerId),
|
|
635
1194
|
};
|
|
636
1195
|
});
|
|
637
|
-
|
|
1196
|
+
if (accepted)
|
|
1197
|
+
this.#recordReachabilityReceipts(reachability);
|
|
1198
|
+
await this.#refreshLocalEvidence();
|
|
638
1199
|
await this.#reconcileTransit();
|
|
639
1200
|
}
|
|
640
1201
|
#assertOpen() {
|
|
@@ -642,7 +1203,7 @@ class PeerMeshNodeImpl {
|
|
|
642
1203
|
throw new Error('Peer Mesh node is closed');
|
|
643
1204
|
}
|
|
644
1205
|
async #updateAuthorityRoster(meshId, closedIsSuccess, update) {
|
|
645
|
-
await this.#store.mutate((current) => {
|
|
1206
|
+
const announcement = await this.#store.mutate((current) => {
|
|
646
1207
|
const state = requireAuthority(current.meshes, meshId);
|
|
647
1208
|
if (state.roster.roster.closed) {
|
|
648
1209
|
if (closedIsSuccess) {
|
|
@@ -657,9 +1218,13 @@ class PeerMeshNodeImpl {
|
|
|
657
1218
|
const roster = signPeerMeshRoster({
|
|
658
1219
|
version: 1,
|
|
659
1220
|
meshId: state.roster.roster.meshId,
|
|
1221
|
+
authorityPeerId: state.roster.roster.authorityPeerId,
|
|
660
1222
|
revision: state.roster.roster.revision + 1,
|
|
661
1223
|
members: next.members,
|
|
662
1224
|
closed: next.closed,
|
|
1225
|
+
...(state.roster.roster.displayName
|
|
1226
|
+
? { displayName: state.roster.roster.displayName }
|
|
1227
|
+
: {}),
|
|
663
1228
|
}, authorityKeys(state));
|
|
664
1229
|
const updated = {
|
|
665
1230
|
...state,
|
|
@@ -670,13 +1235,52 @@ class PeerMeshNodeImpl {
|
|
|
670
1235
|
};
|
|
671
1236
|
return {
|
|
672
1237
|
state: { ...current, meshes: replaceMesh(current.meshes, updated) },
|
|
673
|
-
result:
|
|
1238
|
+
result: {
|
|
1239
|
+
roster,
|
|
1240
|
+
targets: rosterAnnouncementTargets(state.roster.roster.members, current.reachability, this.#peer.identity().peerId, this.#now()),
|
|
1241
|
+
},
|
|
674
1242
|
};
|
|
675
1243
|
});
|
|
676
|
-
|
|
677
|
-
|
|
1244
|
+
try {
|
|
1245
|
+
await this.#reconcileTransit();
|
|
1246
|
+
}
|
|
1247
|
+
finally {
|
|
1248
|
+
if (announcement) {
|
|
1249
|
+
this.#scheduleRosterAnnouncement(announcement.roster, announcement.targets);
|
|
1250
|
+
}
|
|
1251
|
+
this.#scheduleMaintenance();
|
|
1252
|
+
}
|
|
678
1253
|
const stored = this.#store.read();
|
|
679
|
-
return peerMeshStatus(findMesh(stored.meshes, meshId), this.#peer.identity(), stored.
|
|
1254
|
+
return peerMeshStatus(findMesh(stored.meshes, meshId), this.#peer.identity(), this.#endpointKind, stored.reachability, stored.advertisements, this.#now(), (peerId) => this.#peer.isConnected(peerId), (peerId) => this.resolveRoutes(peerId), (signed) => this.#isReachabilityCurrent(signed));
|
|
1255
|
+
}
|
|
1256
|
+
#scheduleRosterAnnouncement(roster, targets) {
|
|
1257
|
+
if (targets.length === 0 || this.#lifetime.signal.aborted)
|
|
1258
|
+
return;
|
|
1259
|
+
const signal = this.#lifetime.signal;
|
|
1260
|
+
void Promise.allSettled(targets.map(async (target) => {
|
|
1261
|
+
const stream = await this.#peer.connectMeshControl({
|
|
1262
|
+
...dialTarget(target),
|
|
1263
|
+
directDeadlineMs: CONNECT_DEADLINE_MS,
|
|
1264
|
+
}, signal);
|
|
1265
|
+
try {
|
|
1266
|
+
const response = await exchangeControl(stream, {
|
|
1267
|
+
kind: 'announce-roster',
|
|
1268
|
+
meshId: roster.roster.meshId,
|
|
1269
|
+
roster,
|
|
1270
|
+
}, decodeAnnounceRosterResponse, signal);
|
|
1271
|
+
if (response.kind === 'roster-rejected') {
|
|
1272
|
+
throw new Error('Peer Mesh roster announcement was rejected');
|
|
1273
|
+
}
|
|
1274
|
+
}
|
|
1275
|
+
finally {
|
|
1276
|
+
await stream.close().catch(() => undefined);
|
|
1277
|
+
}
|
|
1278
|
+
}));
|
|
1279
|
+
}
|
|
1280
|
+
#scheduleMaintenance() {
|
|
1281
|
+
this.#triggerReconciliation();
|
|
1282
|
+
void this.#refreshLocalEvidence().catch(() => undefined);
|
|
1283
|
+
void this.#reconcileTransit().catch(() => undefined);
|
|
680
1284
|
}
|
|
681
1285
|
#acceptIncoming(stream) {
|
|
682
1286
|
let peerStreams = 0;
|
|
@@ -712,19 +1316,21 @@ class PeerMeshNodeImpl {
|
|
|
712
1316
|
const request = decodeControlRequest(await readFrame(stream));
|
|
713
1317
|
let response;
|
|
714
1318
|
if (request.kind === 'redeem-invitation') {
|
|
715
|
-
await this.#
|
|
716
|
-
response = await this.#redeem(request, stream.peerId, this.#
|
|
1319
|
+
await this.#refreshLocalEvidence();
|
|
1320
|
+
response = await this.#redeem(request, stream.peerId, this.#authenticateReachability(request.reachability, stream.peerId), this.#validateAdvertisementForPeer(request.advertisement, request.meshId, stream.peerId));
|
|
717
1321
|
}
|
|
718
1322
|
else if (request.kind === 'sync') {
|
|
719
1323
|
response = await this.#sync(request, stream.peerId);
|
|
720
1324
|
}
|
|
1325
|
+
else if (request.kind === 'leave') {
|
|
1326
|
+
response = await this.#leave(request, stream.peerId);
|
|
1327
|
+
}
|
|
721
1328
|
else {
|
|
722
|
-
response = await this.#
|
|
1329
|
+
response = await this.#observeRoster(request);
|
|
723
1330
|
}
|
|
724
|
-
await this.#refreshLocalRoute();
|
|
725
|
-
await this.#reconcileTransit();
|
|
726
1331
|
await writeFrame(stream, response);
|
|
727
1332
|
await stream.close();
|
|
1333
|
+
this.#scheduleMaintenance();
|
|
728
1334
|
}
|
|
729
1335
|
catch {
|
|
730
1336
|
stream.abort();
|
|
@@ -733,9 +1339,31 @@ class PeerMeshNodeImpl {
|
|
|
733
1339
|
clearTimeout(deadline);
|
|
734
1340
|
}
|
|
735
1341
|
}
|
|
736
|
-
#
|
|
1342
|
+
async #observeRoster(request) {
|
|
1343
|
+
const response = await this.#store.mutate((current) => {
|
|
1344
|
+
const state = findMesh(current.meshes, request.meshId);
|
|
1345
|
+
if (!state || state.roster.authorityPublicKey !== request.roster.authorityPublicKey) {
|
|
1346
|
+
return {
|
|
1347
|
+
state: current,
|
|
1348
|
+
result: { kind: 'roster-rejected', reason: 'unknown' },
|
|
1349
|
+
};
|
|
1350
|
+
}
|
|
1351
|
+
const roster = selectRoster(state.roster, request.roster);
|
|
1352
|
+
return {
|
|
1353
|
+
state: {
|
|
1354
|
+
...current,
|
|
1355
|
+
meshes: replaceMesh(current.meshes, { ...state, roster }),
|
|
1356
|
+
},
|
|
1357
|
+
result: { kind: 'roster-observed' },
|
|
1358
|
+
};
|
|
1359
|
+
});
|
|
1360
|
+
if (response.kind === 'roster-observed')
|
|
1361
|
+
await this.#reconcileTransit();
|
|
1362
|
+
return response;
|
|
1363
|
+
}
|
|
1364
|
+
async #redeem(request, remotePeerId, remoteReachability, remoteAdvertisement) {
|
|
737
1365
|
const now = this.#now();
|
|
738
|
-
|
|
1366
|
+
const response = await this.#store.mutate((current) => {
|
|
739
1367
|
const state = findMesh(current.meshes, request.meshId);
|
|
740
1368
|
if (!state || state.role !== 'authority')
|
|
741
1369
|
return { state: current, result: rejected('invalid') };
|
|
@@ -748,16 +1376,15 @@ class PeerMeshNodeImpl {
|
|
|
748
1376
|
!state.roster.roster.members.includes(remotePeerId)) {
|
|
749
1377
|
return { state: current, result: rejected('invalid') };
|
|
750
1378
|
}
|
|
751
|
-
const
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
const routes = mergeAuthenticatedRoute(current.routes, remoteRoute, now);
|
|
1379
|
+
const reachability = mergeReachability(current.reachability, [remoteReachability], now);
|
|
1380
|
+
const advertisements = mergeAdvertisements(current.advertisements, [remoteAdvertisement]);
|
|
1381
|
+
const evidence = initialEvidence(state, reachability, advertisements, this.#peer.identity().peerId, now);
|
|
755
1382
|
return {
|
|
756
|
-
state: { ...current,
|
|
1383
|
+
state: { ...current, reachability, advertisements },
|
|
757
1384
|
result: {
|
|
758
1385
|
kind: 'invitation-redeemed',
|
|
759
|
-
roster:
|
|
760
|
-
|
|
1386
|
+
roster: state.roster,
|
|
1387
|
+
...evidence,
|
|
761
1388
|
},
|
|
762
1389
|
};
|
|
763
1390
|
}
|
|
@@ -799,30 +1426,14 @@ class PeerMeshNodeImpl {
|
|
|
799
1426
|
result: rejected('full'),
|
|
800
1427
|
};
|
|
801
1428
|
}
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
],
|
|
809
|
-
};
|
|
810
|
-
const routes = mergeAuthenticatedRoute(current.routes, remoteRoute, now);
|
|
811
|
-
return {
|
|
812
|
-
state: { ...current, meshes: replaceMesh(current.meshes, updated), routes },
|
|
813
|
-
result: {
|
|
814
|
-
kind: 'invitation-redeemed',
|
|
815
|
-
roster: state.roster,
|
|
816
|
-
routes: responseRoutes(updated, routes, [{ peerId: remotePeerId, sequence: Number.MAX_SAFE_INTEGER }], now).routes,
|
|
817
|
-
},
|
|
818
|
-
};
|
|
819
|
-
}
|
|
820
|
-
const members = [...state.roster.roster.members, remotePeerId].sort();
|
|
821
|
-
const roster = signPeerMeshRoster({
|
|
822
|
-
...state.roster.roster,
|
|
823
|
-
revision: state.roster.roster.revision + 1,
|
|
824
|
-
members,
|
|
825
|
-
}, authorityKeys(state));
|
|
1429
|
+
const existingMember = state.roster.roster.members.includes(remotePeerId);
|
|
1430
|
+
const roster = existingMember
|
|
1431
|
+
? state.roster
|
|
1432
|
+
: signPeerMeshRoster({
|
|
1433
|
+
...state.roster.roster,
|
|
1434
|
+
revision: state.roster.roster.revision + 1,
|
|
1435
|
+
members: [...state.roster.roster.members, remotePeerId].sort(),
|
|
1436
|
+
}, authorityKeys(state));
|
|
826
1437
|
const updated = {
|
|
827
1438
|
...state,
|
|
828
1439
|
roster,
|
|
@@ -831,31 +1442,48 @@ class PeerMeshNodeImpl {
|
|
|
831
1442
|
redeemedInvitation(invitation, remotePeerId),
|
|
832
1443
|
],
|
|
833
1444
|
};
|
|
834
|
-
const
|
|
1445
|
+
const reachability = mergeReachability(current.reachability, [remoteReachability], now);
|
|
1446
|
+
const advertisements = mergeAdvertisements(current.advertisements, [remoteAdvertisement]);
|
|
1447
|
+
const evidence = initialEvidence(updated, reachability, advertisements, this.#peer.identity().peerId, now);
|
|
835
1448
|
return {
|
|
836
|
-
state: {
|
|
1449
|
+
state: {
|
|
1450
|
+
...current,
|
|
1451
|
+
meshes: replaceMesh(current.meshes, updated),
|
|
1452
|
+
reachability,
|
|
1453
|
+
advertisements,
|
|
1454
|
+
},
|
|
837
1455
|
result: {
|
|
838
1456
|
kind: 'invitation-redeemed',
|
|
839
1457
|
roster,
|
|
840
|
-
|
|
1458
|
+
...evidence,
|
|
841
1459
|
},
|
|
842
1460
|
};
|
|
843
1461
|
});
|
|
1462
|
+
if (response.kind === 'invitation-redeemed') {
|
|
1463
|
+
this.#recordReachabilityReceipt(remoteReachability);
|
|
1464
|
+
const stored = this.#store.read();
|
|
1465
|
+
const state = findMesh(stored.meshes, request.meshId);
|
|
1466
|
+
if (state) {
|
|
1467
|
+
this.#scheduleRosterAnnouncement(state.roster, rosterAnnouncementTargets(state.roster.roster.members, stored.reachability, this.#peer.identity().peerId, this.#now()).filter(({ lease }) => lease.peerId !== remotePeerId));
|
|
1468
|
+
}
|
|
1469
|
+
}
|
|
1470
|
+
return response;
|
|
844
1471
|
}
|
|
845
|
-
#leave(
|
|
846
|
-
|
|
847
|
-
const state = findMesh(current.meshes, meshId);
|
|
1472
|
+
async #leave(request, remotePeerId) {
|
|
1473
|
+
const response = await this.#store.mutate((current) => {
|
|
1474
|
+
const state = findMesh(current.meshes, request.meshId);
|
|
848
1475
|
if (!state ||
|
|
849
1476
|
state.role !== 'authority' ||
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
1477
|
+
request.roster.roster.meshId !== request.meshId ||
|
|
1478
|
+
request.roster.authorityPublicKey !== state.roster.authorityPublicKey ||
|
|
1479
|
+
request.roster.roster.revision > state.roster.roster.revision ||
|
|
1480
|
+
!request.roster.roster.members.includes(remotePeerId)) {
|
|
853
1481
|
return {
|
|
854
1482
|
state: current,
|
|
855
1483
|
result: { kind: 'leave-rejected', reason: 'unknown' },
|
|
856
1484
|
};
|
|
857
1485
|
}
|
|
858
|
-
if (!state.roster.roster.members.includes(remotePeerId)) {
|
|
1486
|
+
if (state.roster.roster.closed || !state.roster.roster.members.includes(remotePeerId)) {
|
|
859
1487
|
return {
|
|
860
1488
|
state: current,
|
|
861
1489
|
result: { kind: 'left', roster: state.roster },
|
|
@@ -875,12 +1503,22 @@ class PeerMeshNodeImpl {
|
|
|
875
1503
|
result: { kind: 'left', roster },
|
|
876
1504
|
};
|
|
877
1505
|
});
|
|
1506
|
+
if (response.kind === 'left') {
|
|
1507
|
+
await this.#reconcileTransit();
|
|
1508
|
+
const stored = this.#store.read();
|
|
1509
|
+
const state = findMesh(stored.meshes, request.meshId);
|
|
1510
|
+
if (state) {
|
|
1511
|
+
this.#scheduleRosterAnnouncement(state.roster, rosterAnnouncementTargets(state.roster.roster.members, stored.reachability, this.#peer.identity().peerId, this.#now()));
|
|
1512
|
+
}
|
|
1513
|
+
}
|
|
1514
|
+
return response;
|
|
878
1515
|
}
|
|
879
1516
|
async #sync(request, remotePeerId) {
|
|
880
|
-
const
|
|
881
|
-
|
|
1517
|
+
const remoteReachability = this.#authenticateReachability(request.reachability, remotePeerId);
|
|
1518
|
+
const remoteAdvertisement = this.#validateAdvertisementForPeer(request.advertisement, request.meshId, remotePeerId);
|
|
1519
|
+
await this.#refreshLocalEvidence();
|
|
882
1520
|
const incomingRoster = decodeSignedPeerMeshRoster(request.roster);
|
|
883
|
-
|
|
1521
|
+
const response = await this.#store.mutate((current) => {
|
|
884
1522
|
const state = findMesh(current.meshes, request.meshId);
|
|
885
1523
|
if (!state || state.roster.authorityPublicKey !== incomingRoster.authorityPublicKey) {
|
|
886
1524
|
return {
|
|
@@ -890,76 +1528,136 @@ class PeerMeshNodeImpl {
|
|
|
890
1528
|
}
|
|
891
1529
|
const roster = selectRoster(state.roster, incomingRoster);
|
|
892
1530
|
const localPeerId = this.#peer.identity().peerId;
|
|
893
|
-
const localMember = !roster.roster.closed && roster.roster.members.includes(localPeerId);
|
|
894
|
-
const remoteMember = !roster.roster.closed && roster.roster.members.includes(remotePeerId);
|
|
895
1531
|
const updated = {
|
|
896
1532
|
...state,
|
|
897
1533
|
roster,
|
|
898
1534
|
};
|
|
899
|
-
const
|
|
900
|
-
|
|
901
|
-
|
|
1535
|
+
const localMember = isActiveMembership(updated, localPeerId);
|
|
1536
|
+
const remoteMember = !roster.roster.closed && roster.roster.members.includes(remotePeerId);
|
|
1537
|
+
const reachability = localMember && remoteMember
|
|
1538
|
+
? mergeReachability(current.reachability, [remoteReachability], this.#now())
|
|
1539
|
+
: current.reachability;
|
|
1540
|
+
const advertisements = localMember && remoteMember
|
|
1541
|
+
? mergeAdvertisements(current.advertisements, [remoteAdvertisement])
|
|
1542
|
+
: current.advertisements;
|
|
902
1543
|
if (!localMember || !remoteMember) {
|
|
903
1544
|
return {
|
|
904
|
-
state: {
|
|
1545
|
+
state: {
|
|
1546
|
+
...current,
|
|
1547
|
+
meshes: replaceMesh(current.meshes, updated),
|
|
1548
|
+
reachability,
|
|
1549
|
+
advertisements,
|
|
1550
|
+
},
|
|
905
1551
|
result: {
|
|
906
1552
|
kind: 'sync-result',
|
|
907
1553
|
roster,
|
|
908
|
-
|
|
1554
|
+
reachability: [],
|
|
1555
|
+
advertisements: [],
|
|
909
1556
|
more: false,
|
|
910
1557
|
},
|
|
911
1558
|
};
|
|
912
1559
|
}
|
|
913
|
-
const page =
|
|
1560
|
+
const page = responseEvidence(updated, reachability, advertisements, request.knownReachability, request.knownAdvertisements, this.#now());
|
|
914
1561
|
return {
|
|
915
|
-
state: {
|
|
1562
|
+
state: {
|
|
1563
|
+
...current,
|
|
1564
|
+
meshes: replaceMesh(current.meshes, updated),
|
|
1565
|
+
reachability,
|
|
1566
|
+
advertisements,
|
|
1567
|
+
},
|
|
916
1568
|
result: {
|
|
917
1569
|
kind: 'sync-result',
|
|
918
1570
|
roster,
|
|
919
|
-
|
|
920
|
-
more: page.more,
|
|
1571
|
+
...page,
|
|
921
1572
|
},
|
|
922
1573
|
};
|
|
923
1574
|
});
|
|
1575
|
+
if (response.kind === 'sync-result') {
|
|
1576
|
+
const localPeerId = this.#peer.identity().peerId;
|
|
1577
|
+
if (!response.roster.roster.closed &&
|
|
1578
|
+
response.roster.roster.members.includes(localPeerId) &&
|
|
1579
|
+
response.roster.roster.members.includes(remotePeerId)) {
|
|
1580
|
+
this.#recordReachabilityReceipt(remoteReachability);
|
|
1581
|
+
}
|
|
1582
|
+
await this.#reconcileTransit();
|
|
1583
|
+
}
|
|
1584
|
+
return response;
|
|
924
1585
|
}
|
|
925
|
-
|
|
1586
|
+
#reconcileTransit() {
|
|
1587
|
+
const task = this.#transitTail.then(() => this.#applyTransitSnapshot());
|
|
1588
|
+
this.#transitTail = task.then(() => undefined, () => undefined);
|
|
1589
|
+
return task;
|
|
1590
|
+
}
|
|
1591
|
+
async #applyTransitSnapshot() {
|
|
926
1592
|
const stored = this.#store.read();
|
|
927
1593
|
const localPeerId = this.#peer.identity().peerId;
|
|
928
1594
|
const now = this.#now();
|
|
929
1595
|
const selected = stored.meshes.find((mesh) => mesh.roster.roster.meshId === stored.transitMeshId && isActiveMembership(mesh, localPeerId));
|
|
930
|
-
const eligibleRelays = stored
|
|
931
|
-
.filter(({ route }) => {
|
|
932
|
-
if (route.peerId === localPeerId ||
|
|
933
|
-
route.expiresAt <= now ||
|
|
934
|
-
route.transitMeshId === undefined ||
|
|
935
|
-
route.routeHints.length === 0) {
|
|
936
|
-
return false;
|
|
937
|
-
}
|
|
938
|
-
return isActiveMeshMember(stored.meshes, route.transitMeshId, localPeerId, route.peerId);
|
|
939
|
-
})
|
|
940
|
-
.sort((left, right) => left.route.peerId.localeCompare(right.route.peerId));
|
|
1596
|
+
const eligibleRelays = eligibleTransitEvidence(stored, localPeerId, now, (signed) => this.#isReachabilityCurrent(signed));
|
|
941
1597
|
const relayCandidates = transitRelayCandidates(eligibleRelays);
|
|
1598
|
+
const approvedRelayPeerIds = [
|
|
1599
|
+
...new Set(stored.meshes
|
|
1600
|
+
.filter((mesh) => isActiveMembership(mesh, localPeerId))
|
|
1601
|
+
.flatMap((mesh) => mesh.roster.roster.members)
|
|
1602
|
+
.filter((peerId) => peerId !== localPeerId)),
|
|
1603
|
+
].sort();
|
|
942
1604
|
await this.#peer.configureTransit({
|
|
943
1605
|
allowedPeerIds: selected
|
|
944
1606
|
? selected.roster.roster.members.filter((peerId) => peerId !== localPeerId)
|
|
945
1607
|
: [],
|
|
1608
|
+
approvedRelayPeerIds,
|
|
946
1609
|
relayCandidates,
|
|
947
1610
|
});
|
|
948
1611
|
}
|
|
949
1612
|
}
|
|
950
|
-
function
|
|
1613
|
+
function sameResolvedRoutes(left, right) {
|
|
1614
|
+
return (left.state === right.state &&
|
|
1615
|
+
sameStringValues(left.routeHints, right.routeHints) &&
|
|
1616
|
+
sameStringValues(left.coordinationRelays, right.coordinationRelays) &&
|
|
1617
|
+
sameStringValues(left.transitRelayPeerIds, right.transitRelayPeerIds));
|
|
1618
|
+
}
|
|
1619
|
+
function sameStringValues(left, right) {
|
|
1620
|
+
return left.length === right.length && left.every((value, index) => value === right[index]);
|
|
1621
|
+
}
|
|
1622
|
+
function eligibleTransitEvidence(stored, localPeerId, now, isCurrent) {
|
|
1623
|
+
const evidence = new Map();
|
|
1624
|
+
for (const { advertisement } of stored.advertisements) {
|
|
1625
|
+
if (advertisement.peerId === localPeerId ||
|
|
1626
|
+
!advertisement.offersTransit ||
|
|
1627
|
+
!isActiveMeshMember(stored.meshes, advertisement.meshId, localPeerId, advertisement.peerId)) {
|
|
1628
|
+
continue;
|
|
1629
|
+
}
|
|
1630
|
+
const lease = latestReachability(stored.reachability, advertisement.peerId, now, true);
|
|
1631
|
+
if (!lease ||
|
|
1632
|
+
!isCurrent(lease) ||
|
|
1633
|
+
lease.lease.directRoutes.length + lease.lease.coordinationRoutes.length === 0) {
|
|
1634
|
+
continue;
|
|
1635
|
+
}
|
|
1636
|
+
evidence.set(advertisement.peerId, {
|
|
1637
|
+
meshId: advertisement.meshId,
|
|
1638
|
+
lease,
|
|
1639
|
+
});
|
|
1640
|
+
}
|
|
1641
|
+
return Object.freeze([...evidence.values()].sort((left, right) => left.lease.lease.peerId.localeCompare(right.lease.lease.peerId)));
|
|
1642
|
+
}
|
|
1643
|
+
function transitRelayCandidates(evidence) {
|
|
951
1644
|
let remaining = PEER_MESH_MAX_TRANSIT_RELAY_ADDRESSES;
|
|
952
1645
|
const candidates = [];
|
|
953
|
-
for (const {
|
|
1646
|
+
for (const { lease: { lease }, } of evidence) {
|
|
954
1647
|
if (remaining === 0)
|
|
955
1648
|
break;
|
|
956
|
-
const
|
|
957
|
-
...new Set(
|
|
1649
|
+
const routeHints = [
|
|
1650
|
+
...new Set(lease.directRoutes.filter((address) => isBaseRelayFor(address, lease.peerId))),
|
|
958
1651
|
].slice(0, Math.min(PEER_MESH_MAX_TRANSIT_ADDRESSES_PER_RELAY, remaining));
|
|
959
|
-
|
|
1652
|
+
const coordinationRelays = [...new Set(lease.coordinationRoutes)].slice(0, Math.min(PEER_MESH_MAX_TRANSIT_ADDRESSES_PER_RELAY - routeHints.length, remaining - routeHints.length));
|
|
1653
|
+
if (routeHints.length + coordinationRelays.length === 0)
|
|
960
1654
|
continue;
|
|
961
|
-
candidates.push(Object.freeze({
|
|
962
|
-
|
|
1655
|
+
candidates.push(Object.freeze({
|
|
1656
|
+
peerId: lease.peerId,
|
|
1657
|
+
addresses: Object.freeze(routeHints),
|
|
1658
|
+
coordinationRelays: Object.freeze(coordinationRelays),
|
|
1659
|
+
}));
|
|
1660
|
+
remaining -= routeHints.length + coordinationRelays.length;
|
|
963
1661
|
}
|
|
964
1662
|
return Object.freeze(candidates);
|
|
965
1663
|
}
|
|
@@ -976,40 +1674,58 @@ function isActiveMeshMember(meshes, meshId, localPeerId, peerId) {
|
|
|
976
1674
|
isActiveMembership(mesh, localPeerId) &&
|
|
977
1675
|
mesh.roster.roster.members.includes(peerId));
|
|
978
1676
|
}
|
|
979
|
-
function peerMeshStatus(state, identity,
|
|
1677
|
+
function peerMeshStatus(state, identity, endpointKind, reachability, advertisements, now, isConnected, resolveRoutes, isCurrent) {
|
|
1678
|
+
const meshId = state.roster.roster.meshId;
|
|
1679
|
+
const localAdvertisement = findAdvertisement(advertisements, meshId, identity.peerId);
|
|
980
1680
|
return Object.freeze({
|
|
981
1681
|
role: state.role === 'authority' ? 'authority' : 'member',
|
|
982
|
-
|
|
1682
|
+
authorityPeerId: state.roster.roster.authorityPeerId,
|
|
983
1683
|
roster: state.roster,
|
|
984
1684
|
pendingInvitationCount: state.role === 'authority'
|
|
985
1685
|
? state.invitations.filter((invitation) => invitation.status === 'pending' && invitation.expiresAt > now).length
|
|
986
1686
|
: 0,
|
|
987
1687
|
memberRoutes: Object.freeze(state.roster.roster.members.map((peerId) => {
|
|
988
|
-
if (peerId === identity.peerId)
|
|
989
|
-
return Object.freeze({ peerId, state: 'local' });
|
|
990
|
-
const route = routes.find((candidate) => candidate.route.peerId === peerId)?.route;
|
|
991
|
-
if (!route)
|
|
992
|
-
return Object.freeze({ peerId, state: 'unknown' });
|
|
993
|
-
if (route.expiresAt <= now) {
|
|
1688
|
+
if (peerId === identity.peerId) {
|
|
994
1689
|
return Object.freeze({
|
|
995
1690
|
peerId,
|
|
996
|
-
|
|
997
|
-
|
|
1691
|
+
...(endpointKind ? { endpointKind } : {}),
|
|
1692
|
+
...(localAdvertisement?.advertisement.displayName
|
|
1693
|
+
? { displayName: localAdvertisement.advertisement.displayName }
|
|
1694
|
+
: {}),
|
|
1695
|
+
state: 'local',
|
|
998
1696
|
});
|
|
999
1697
|
}
|
|
1698
|
+
const advertisement = findAdvertisement(advertisements, meshId, peerId)?.advertisement;
|
|
1699
|
+
const signed = latestReachability(reachability, peerId, now, true);
|
|
1700
|
+
const lease = signed?.lease;
|
|
1701
|
+
const resolution = resolveRoutes(peerId);
|
|
1702
|
+
const current = Boolean(signed && isCurrent(signed));
|
|
1703
|
+
const memberState = isConnected(peerId)
|
|
1704
|
+
? 'reachable'
|
|
1705
|
+
: resolution.state === 'exhausted'
|
|
1706
|
+
? 'needs_repair'
|
|
1707
|
+
: resolution.state === 'recovering'
|
|
1708
|
+
? signed
|
|
1709
|
+
? 'reconnecting'
|
|
1710
|
+
: 'connecting'
|
|
1711
|
+
: current
|
|
1712
|
+
? 'connecting'
|
|
1713
|
+
: 'reconnecting';
|
|
1000
1714
|
return Object.freeze({
|
|
1001
1715
|
peerId,
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
expiresAt:
|
|
1716
|
+
...(advertisement?.endpointKind ? { endpointKind: advertisement.endpointKind } : {}),
|
|
1717
|
+
...(advertisement?.displayName ? { displayName: advertisement.displayName } : {}),
|
|
1718
|
+
state: memberState,
|
|
1719
|
+
...(lease ? { expiresAt: lease.expiresAt } : {}),
|
|
1006
1720
|
});
|
|
1007
1721
|
})),
|
|
1008
1722
|
});
|
|
1009
1723
|
}
|
|
1010
|
-
function
|
|
1011
|
-
const
|
|
1012
|
-
return
|
|
1724
|
+
function rosterAnnouncementTargets(memberPeerIds, reachability, localPeerId, now) {
|
|
1725
|
+
const members = new Set(memberPeerIds);
|
|
1726
|
+
return Object.freeze(reachability.filter((signed) => signed.lease.peerId !== localPeerId &&
|
|
1727
|
+
members.has(signed.lease.peerId) &&
|
|
1728
|
+
usableHistoricalReachability(signed, now)));
|
|
1013
1729
|
}
|
|
1014
1730
|
function requireAuthority(states, meshId) {
|
|
1015
1731
|
const state = findMesh(states, meshId);
|
|
@@ -1033,32 +1749,31 @@ function redeemedInvitation(invitation, peerId) {
|
|
|
1033
1749
|
peerId,
|
|
1034
1750
|
};
|
|
1035
1751
|
}
|
|
1036
|
-
function
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
routeHints: identity.listenAddresses,
|
|
1040
|
-
coordinationRelays: identity.coordinationRelays,
|
|
1041
|
-
});
|
|
1042
|
-
}
|
|
1043
|
-
function assertMeshCapacity(states, localPeerId) {
|
|
1044
|
-
if (states.filter((state) => isActiveMembership(state, localPeerId)).length >= PEER_MESH_MAX_MESHES) {
|
|
1752
|
+
function assertMeshCapacity(states, localPeerId, pendingJoinCount = 0) {
|
|
1753
|
+
if (states.filter((state) => !isRetired(state, localPeerId)).length + pendingJoinCount >=
|
|
1754
|
+
PEER_MESH_MAX_MESHES) {
|
|
1045
1755
|
throw new Error('This peer belongs to too many Peer Meshes');
|
|
1046
1756
|
}
|
|
1047
1757
|
}
|
|
1048
1758
|
function appendMesh(states, state, localPeerId) {
|
|
1049
1759
|
if (states.length < PEER_MESH_MAX_MESHES)
|
|
1050
1760
|
return [...states, state];
|
|
1051
|
-
const retired = states.findIndex((candidate) =>
|
|
1761
|
+
const retired = states.findIndex((candidate) => isRetired(candidate, localPeerId));
|
|
1052
1762
|
if (retired < 0)
|
|
1053
1763
|
throw new Error('This peer belongs to too many Peer Meshes');
|
|
1054
1764
|
return [...states.slice(0, retired), ...states.slice(retired + 1), state];
|
|
1055
1765
|
}
|
|
1056
|
-
function
|
|
1057
|
-
|
|
1766
|
+
function assertRejoinSettled(state, localPeerId) {
|
|
1767
|
+
if (state?.role === 'replica' &&
|
|
1768
|
+
state.desiredMembership === 'left' &&
|
|
1769
|
+
state.roster.roster.members.includes(localPeerId)) {
|
|
1770
|
+
throw new Error('This Peer Mesh leave is still being reconciled');
|
|
1771
|
+
}
|
|
1058
1772
|
}
|
|
1059
1773
|
function selectRoster(current, candidate) {
|
|
1060
1774
|
if (current.roster.meshId !== candidate.roster.meshId ||
|
|
1061
|
-
current.authorityPublicKey !== candidate.authorityPublicKey
|
|
1775
|
+
current.authorityPublicKey !== candidate.authorityPublicKey ||
|
|
1776
|
+
current.roster.authorityPeerId !== candidate.roster.authorityPeerId) {
|
|
1062
1777
|
throw new Error('Peer Mesh roster has the wrong authority');
|
|
1063
1778
|
}
|
|
1064
1779
|
if (candidate.roster.revision < current.roster.revision)
|
|
@@ -1071,60 +1786,203 @@ function selectRoster(current, candidate) {
|
|
|
1071
1786
|
}
|
|
1072
1787
|
return candidate;
|
|
1073
1788
|
}
|
|
1074
|
-
function
|
|
1075
|
-
const
|
|
1789
|
+
function mergeReachability(current, candidates, now) {
|
|
1790
|
+
const leases = new Map(current
|
|
1791
|
+
.filter((signed) => usableHistoricalReachability(signed, now))
|
|
1792
|
+
.map((signed) => [signed.lease.peerId, signed]));
|
|
1076
1793
|
for (const candidate of candidates) {
|
|
1077
|
-
if (candidate
|
|
1794
|
+
if (!usableHistoricalReachability(candidate, now))
|
|
1078
1795
|
continue;
|
|
1079
|
-
const existing =
|
|
1080
|
-
if (!existing ||
|
|
1081
|
-
|
|
1082
|
-
candidate.route.sequence > existing.route.sequence) {
|
|
1083
|
-
routes.set(candidate.route.peerId, candidate);
|
|
1796
|
+
const existing = leases.get(candidate.lease.peerId);
|
|
1797
|
+
if (!existing || candidate.lease.revision > existing.lease.revision) {
|
|
1798
|
+
leases.set(candidate.lease.peerId, candidate);
|
|
1084
1799
|
continue;
|
|
1085
1800
|
}
|
|
1086
|
-
if (candidate.
|
|
1087
|
-
|
|
1088
|
-
throw new Error('Peer
|
|
1801
|
+
if (candidate.lease.revision === existing.lease.revision &&
|
|
1802
|
+
reachabilityFactDigest(candidate) !== reachabilityFactDigest(existing)) {
|
|
1803
|
+
throw new Error('Peer reachability revision identifies conflicting facts');
|
|
1089
1804
|
}
|
|
1090
1805
|
}
|
|
1091
|
-
return Object.freeze([...
|
|
1806
|
+
return Object.freeze([...leases.values()].sort((left, right) => left.lease.peerId.localeCompare(right.lease.peerId)));
|
|
1092
1807
|
}
|
|
1093
|
-
function
|
|
1094
|
-
const
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
existing
|
|
1098
|
-
|
|
1808
|
+
function mergeAdvertisements(current, candidates) {
|
|
1809
|
+
const advertisements = new Map(current.map((signed) => [advertisementKey(signed.advertisement), signed]));
|
|
1810
|
+
for (const candidate of candidates) {
|
|
1811
|
+
const key = advertisementKey(candidate.advertisement);
|
|
1812
|
+
const existing = advertisements.get(key);
|
|
1813
|
+
if (!existing || candidate.advertisement.revision > existing.advertisement.revision) {
|
|
1814
|
+
advertisements.set(key, candidate);
|
|
1815
|
+
continue;
|
|
1816
|
+
}
|
|
1817
|
+
if (candidate.advertisement.revision === existing.advertisement.revision &&
|
|
1818
|
+
advertisementFactDigest(candidate) !== advertisementFactDigest(existing)) {
|
|
1819
|
+
throw new Error('Peer Mesh advertisement revision identifies conflicting facts');
|
|
1820
|
+
}
|
|
1099
1821
|
}
|
|
1100
|
-
return
|
|
1822
|
+
return Object.freeze([...advertisements.values()].sort((left, right) => advertisementKey(left.advertisement).localeCompare(advertisementKey(right.advertisement))));
|
|
1101
1823
|
}
|
|
1102
|
-
function
|
|
1103
|
-
return Object.freeze(
|
|
1104
|
-
.filter((
|
|
1105
|
-
.
|
|
1824
|
+
function reachabilitySummaries(reachability, roster, now) {
|
|
1825
|
+
return Object.freeze(reachability
|
|
1826
|
+
.filter((signed) => usableHistoricalReachability(signed, now) &&
|
|
1827
|
+
roster.roster.members.includes(signed.lease.peerId))
|
|
1828
|
+
.map((signed) => Object.freeze({
|
|
1829
|
+
peerId: signed.lease.peerId,
|
|
1830
|
+
revision: signed.lease.revision,
|
|
1831
|
+
digest: reachabilityFactDigest(signed),
|
|
1832
|
+
}))
|
|
1106
1833
|
.sort((left, right) => left.peerId.localeCompare(right.peerId)));
|
|
1107
1834
|
}
|
|
1108
|
-
function
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1835
|
+
function advertisementSummaries(advertisements, roster) {
|
|
1836
|
+
return Object.freeze(advertisements
|
|
1837
|
+
.filter(({ advertisement }) => advertisement.meshId === roster.roster.meshId &&
|
|
1838
|
+
roster.roster.members.includes(advertisement.peerId))
|
|
1839
|
+
.map((signed) => Object.freeze({
|
|
1840
|
+
peerId: signed.advertisement.peerId,
|
|
1841
|
+
revision: signed.advertisement.revision,
|
|
1842
|
+
digest: advertisementFactDigest(signed),
|
|
1843
|
+
}))
|
|
1844
|
+
.sort((left, right) => left.peerId.localeCompare(right.peerId)));
|
|
1845
|
+
}
|
|
1846
|
+
function responseEvidence(state, reachability, advertisements, knownReachability, knownAdvertisements, now) {
|
|
1847
|
+
const knownLeases = new Map(knownReachability.map((summary) => [summary.peerId, summary]));
|
|
1848
|
+
const knownAds = new Map(knownAdvertisements.map((summary) => [summary.peerId, summary]));
|
|
1849
|
+
const missing = [
|
|
1850
|
+
...reachability
|
|
1851
|
+
.filter((signed) => usableHistoricalReachability(signed, now) &&
|
|
1852
|
+
state.roster.roster.members.includes(signed.lease.peerId) &&
|
|
1853
|
+
evidenceRequiresTransfer({
|
|
1854
|
+
peerId: signed.lease.peerId,
|
|
1855
|
+
revision: signed.lease.revision,
|
|
1856
|
+
digest: reachabilityFactDigest(signed),
|
|
1857
|
+
}, knownLeases.get(signed.lease.peerId), 'Peer reachability'))
|
|
1858
|
+
.map((value) => ({
|
|
1859
|
+
kind: 'reachability',
|
|
1860
|
+
peerId: value.lease.peerId,
|
|
1861
|
+
value,
|
|
1862
|
+
})),
|
|
1863
|
+
...advertisements
|
|
1864
|
+
.filter((signed) => signed.advertisement.meshId === state.roster.roster.meshId &&
|
|
1865
|
+
state.roster.roster.members.includes(signed.advertisement.peerId) &&
|
|
1866
|
+
evidenceRequiresTransfer({
|
|
1867
|
+
peerId: signed.advertisement.peerId,
|
|
1868
|
+
revision: signed.advertisement.revision,
|
|
1869
|
+
digest: advertisementFactDigest(signed),
|
|
1870
|
+
}, knownAds.get(signed.advertisement.peerId), 'Peer Mesh advertisement'))
|
|
1871
|
+
.map((value) => ({
|
|
1872
|
+
kind: 'advertisement',
|
|
1873
|
+
peerId: value.advertisement.peerId,
|
|
1874
|
+
value,
|
|
1875
|
+
})),
|
|
1876
|
+
].sort((left, right) => left.peerId === right.peerId
|
|
1877
|
+
? left.kind.localeCompare(right.kind)
|
|
1878
|
+
: left.peerId.localeCompare(right.peerId));
|
|
1879
|
+
const page = missing.slice(0, EVIDENCE_PAGE_SIZE);
|
|
1880
|
+
return Object.freeze({
|
|
1881
|
+
reachability: Object.freeze(page.flatMap((entry) => (entry.kind === 'reachability' ? [entry.value] : []))),
|
|
1882
|
+
advertisements: Object.freeze(page.flatMap((entry) => (entry.kind === 'advertisement' ? [entry.value] : []))),
|
|
1883
|
+
more: missing.length > EVIDENCE_PAGE_SIZE,
|
|
1884
|
+
});
|
|
1885
|
+
}
|
|
1886
|
+
function evidenceRequiresTransfer(local, remote, label) {
|
|
1887
|
+
if (!remote || local.revision > remote.revision)
|
|
1888
|
+
return true;
|
|
1889
|
+
if (local.revision < remote.revision)
|
|
1890
|
+
return false;
|
|
1891
|
+
if (local.digest !== remote.digest) {
|
|
1892
|
+
throw new Error(`${label} revision identifies conflicting facts`);
|
|
1893
|
+
}
|
|
1894
|
+
return false;
|
|
1895
|
+
}
|
|
1896
|
+
function reachabilityFactDigest(signed) {
|
|
1897
|
+
return evidenceDigest(peerReachabilityLeaseSigningBytes(signed.lease));
|
|
1898
|
+
}
|
|
1899
|
+
function advertisementFactDigest(signed) {
|
|
1900
|
+
return evidenceDigest(peerMeshMemberAdvertisementSigningBytes(signed.advertisement));
|
|
1901
|
+
}
|
|
1902
|
+
function evidenceDigest(bytes) {
|
|
1903
|
+
return createHash('sha256').update(bytes).digest('hex');
|
|
1904
|
+
}
|
|
1905
|
+
function initialEvidence(state, reachability, advertisements, localPeerId, now) {
|
|
1906
|
+
const lease = latestReachability(reachability, localPeerId, now, true);
|
|
1907
|
+
const advertisement = findAdvertisement(advertisements, state.roster.roster.meshId, localPeerId);
|
|
1908
|
+
if (!lease || !advertisement)
|
|
1909
|
+
throw new Error('Peer Mesh authority evidence is unavailable');
|
|
1113
1910
|
return Object.freeze({
|
|
1114
|
-
|
|
1115
|
-
|
|
1911
|
+
reachability: Object.freeze([lease]),
|
|
1912
|
+
advertisements: Object.freeze([advertisement]),
|
|
1116
1913
|
});
|
|
1117
1914
|
}
|
|
1118
|
-
function
|
|
1119
|
-
return
|
|
1915
|
+
function isCurrentLocalAdvertisement(existing, meshId, peerId, current, endpointKind) {
|
|
1916
|
+
return Boolean(existing &&
|
|
1917
|
+
existing.advertisement.meshId === meshId &&
|
|
1918
|
+
existing.advertisement.peerId === peerId &&
|
|
1919
|
+
existing.advertisement.endpointKind === endpointKind &&
|
|
1920
|
+
existing.advertisement.displayName === (current.displayName ?? undefined) &&
|
|
1921
|
+
existing.advertisement.offersTransit === (current.transitMeshId === meshId));
|
|
1120
1922
|
}
|
|
1121
|
-
function
|
|
1923
|
+
function latestReachability(reachability, peerId, now, includeHistorical) {
|
|
1924
|
+
const signed = reachability.find(({ lease }) => lease.peerId === peerId);
|
|
1925
|
+
if (!signed)
|
|
1926
|
+
return undefined;
|
|
1927
|
+
if (signed.lease.expiresAt > now)
|
|
1928
|
+
return signed;
|
|
1929
|
+
return includeHistorical && usableHistoricalReachability(signed, now) ? signed : undefined;
|
|
1930
|
+
}
|
|
1931
|
+
function emptyRouteResolution(state) {
|
|
1122
1932
|
return Object.freeze({
|
|
1123
|
-
|
|
1124
|
-
routeHints: Object.freeze([
|
|
1125
|
-
coordinationRelays: Object.freeze([
|
|
1126
|
-
|
|
1127
|
-
|
|
1933
|
+
state,
|
|
1934
|
+
routeHints: Object.freeze([]),
|
|
1935
|
+
coordinationRelays: Object.freeze([]),
|
|
1936
|
+
transitRelayPeerIds: Object.freeze([]),
|
|
1937
|
+
});
|
|
1938
|
+
}
|
|
1939
|
+
function hasPeerRecoverySource(stored, sharedMeshIds, targetPeerId, localPeerId, now) {
|
|
1940
|
+
const shared = new Set(sharedMeshIds);
|
|
1941
|
+
const sourcePeerIds = new Set(stored.meshes
|
|
1942
|
+
.filter(({ roster }) => shared.has(roster.roster.meshId))
|
|
1943
|
+
.flatMap(({ roster }) => roster.roster.members)
|
|
1944
|
+
.filter((peerId) => peerId !== localPeerId && peerId !== targetPeerId));
|
|
1945
|
+
for (const sourcePeerId of sourcePeerIds) {
|
|
1946
|
+
const signed = latestReachability(stored.reachability, sourcePeerId, now, true);
|
|
1947
|
+
if (signed && hasReachabilityRoutes(signed))
|
|
1948
|
+
return true;
|
|
1949
|
+
}
|
|
1950
|
+
return false;
|
|
1951
|
+
}
|
|
1952
|
+
function hasReachabilityRoutes(signed) {
|
|
1953
|
+
return signed.lease.directRoutes.length + signed.lease.coordinationRoutes.length > 0;
|
|
1954
|
+
}
|
|
1955
|
+
function usableHistoricalReachability(signed, now) {
|
|
1956
|
+
return signed.lease.expiresAt > now - PEER_REACHABILITY_RECOVERY_HORIZON_MS;
|
|
1957
|
+
}
|
|
1958
|
+
function dialTarget(reachability) {
|
|
1959
|
+
return Object.freeze({
|
|
1960
|
+
peerId: reachability.lease.peerId,
|
|
1961
|
+
routeHints: reachability.lease.directRoutes,
|
|
1962
|
+
coordinationRelays: reachability.lease.coordinationRoutes,
|
|
1963
|
+
});
|
|
1964
|
+
}
|
|
1965
|
+
function findAdvertisement(advertisements, meshId, peerId) {
|
|
1966
|
+
return advertisements.find(({ advertisement }) => advertisement.meshId === meshId && advertisement.peerId === peerId);
|
|
1967
|
+
}
|
|
1968
|
+
function advertisementKey(advertisement) {
|
|
1969
|
+
return `${advertisement.meshId}\n${advertisement.peerId}`;
|
|
1970
|
+
}
|
|
1971
|
+
function mergeAddresses(primary, fallback) {
|
|
1972
|
+
return Object.freeze([...new Set([...primary, ...fallback])].slice(0, 32));
|
|
1973
|
+
}
|
|
1974
|
+
function waitForTurn(previous, signal) {
|
|
1975
|
+
if (!signal)
|
|
1976
|
+
return previous;
|
|
1977
|
+
if (signal.aborted)
|
|
1978
|
+
return Promise.reject(signal.reason);
|
|
1979
|
+
return new Promise((resolve, reject) => {
|
|
1980
|
+
const onAbort = () => reject(signal.reason);
|
|
1981
|
+
signal.addEventListener('abort', onAbort, { once: true });
|
|
1982
|
+
void previous.then(() => {
|
|
1983
|
+
signal.removeEventListener('abort', onAbort);
|
|
1984
|
+
resolve();
|
|
1985
|
+
});
|
|
1128
1986
|
});
|
|
1129
1987
|
}
|
|
1130
1988
|
async function exchangeControl(stream, request, decode, signal) {
|
|
@@ -1152,36 +2010,63 @@ async function exchangeControl(stream, request, decode, signal) {
|
|
|
1152
2010
|
function decodeControlRequest(value) {
|
|
1153
2011
|
const record = recordValue(value);
|
|
1154
2012
|
if (record.kind === 'redeem-invitation' &&
|
|
1155
|
-
hasExactKeys(record, ['kind', 'meshId', 'secret', '
|
|
2013
|
+
hasExactKeys(record, ['kind', 'meshId', 'secret', 'reachability', 'advertisement'])) {
|
|
1156
2014
|
return {
|
|
1157
2015
|
kind: 'redeem-invitation',
|
|
1158
2016
|
meshId: requiredString(record.meshId, 128),
|
|
1159
2017
|
secret: requiredString(record.secret, 64),
|
|
1160
|
-
|
|
2018
|
+
reachability: decodeSignedPeerReachabilityLease(record.reachability),
|
|
2019
|
+
advertisement: decodeSignedPeerMeshMemberAdvertisement(record.advertisement),
|
|
1161
2020
|
};
|
|
1162
2021
|
}
|
|
1163
2022
|
if (record.kind === 'sync' &&
|
|
1164
|
-
hasExactKeys(record, [
|
|
2023
|
+
hasExactKeys(record, [
|
|
2024
|
+
'kind',
|
|
2025
|
+
'meshId',
|
|
2026
|
+
'roster',
|
|
2027
|
+
'reachability',
|
|
2028
|
+
'advertisement',
|
|
2029
|
+
'knownReachability',
|
|
2030
|
+
'knownAdvertisements',
|
|
2031
|
+
])) {
|
|
1165
2032
|
return {
|
|
1166
2033
|
kind: 'sync',
|
|
1167
2034
|
meshId: requiredString(record.meshId, 128),
|
|
1168
2035
|
roster: decodeSignedPeerMeshRoster(record.roster),
|
|
1169
|
-
|
|
1170
|
-
|
|
2036
|
+
reachability: decodeSignedPeerReachabilityLease(record.reachability),
|
|
2037
|
+
advertisement: decodeSignedPeerMeshMemberAdvertisement(record.advertisement),
|
|
2038
|
+
knownReachability: decodeEvidenceSummaries(record.knownReachability),
|
|
2039
|
+
knownAdvertisements: decodeEvidenceSummaries(record.knownAdvertisements),
|
|
1171
2040
|
};
|
|
1172
2041
|
}
|
|
1173
|
-
if (record.kind === 'leave' && hasExactKeys(record, ['kind', 'meshId'])) {
|
|
1174
|
-
return {
|
|
2042
|
+
if (record.kind === 'leave' && hasExactKeys(record, ['kind', 'meshId', 'roster'])) {
|
|
2043
|
+
return {
|
|
2044
|
+
kind: 'leave',
|
|
2045
|
+
meshId: requiredString(record.meshId, 128),
|
|
2046
|
+
roster: decodeSignedPeerMeshRoster(record.roster),
|
|
2047
|
+
};
|
|
2048
|
+
}
|
|
2049
|
+
if (record.kind === 'announce-roster' && hasExactKeys(record, ['kind', 'meshId', 'roster'])) {
|
|
2050
|
+
return {
|
|
2051
|
+
kind: 'announce-roster',
|
|
2052
|
+
meshId: requiredString(record.meshId, 128),
|
|
2053
|
+
roster: decodeSignedPeerMeshRoster(record.roster),
|
|
2054
|
+
};
|
|
1175
2055
|
}
|
|
1176
2056
|
throw new Error('Unsupported Peer Mesh control request');
|
|
1177
2057
|
}
|
|
1178
2058
|
function decodeRedeemResponse(value) {
|
|
1179
2059
|
const record = recordValue(value);
|
|
1180
|
-
if (record.kind === 'invitation-redeemed' &&
|
|
2060
|
+
if (record.kind === 'invitation-redeemed' &&
|
|
2061
|
+
hasExactKeys(record, ['kind', 'roster', 'reachability', 'advertisements'])) {
|
|
2062
|
+
const reachability = decodeReachabilityPage(record.reachability);
|
|
2063
|
+
const advertisements = decodeAdvertisementPage(record.advertisements);
|
|
2064
|
+
assertEvidencePageSize(reachability, advertisements);
|
|
1181
2065
|
return {
|
|
1182
2066
|
kind: 'invitation-redeemed',
|
|
1183
2067
|
roster: decodeSignedPeerMeshRoster(record.roster),
|
|
1184
|
-
|
|
2068
|
+
reachability,
|
|
2069
|
+
advertisements,
|
|
1185
2070
|
};
|
|
1186
2071
|
}
|
|
1187
2072
|
if (record.kind === 'invitation-rejected' &&
|
|
@@ -1197,12 +2082,16 @@ function decodeRedeemResponse(value) {
|
|
|
1197
2082
|
function decodeSyncResponse(value) {
|
|
1198
2083
|
const record = recordValue(value);
|
|
1199
2084
|
if (record.kind === 'sync-result' &&
|
|
1200
|
-
hasExactKeys(record, ['kind', 'roster', '
|
|
2085
|
+
hasExactKeys(record, ['kind', 'roster', 'reachability', 'advertisements', 'more']) &&
|
|
1201
2086
|
typeof record.more === 'boolean') {
|
|
2087
|
+
const reachability = decodeReachabilityPage(record.reachability);
|
|
2088
|
+
const advertisements = decodeAdvertisementPage(record.advertisements);
|
|
2089
|
+
assertEvidencePageSize(reachability, advertisements);
|
|
1202
2090
|
return {
|
|
1203
2091
|
kind: 'sync-result',
|
|
1204
2092
|
roster: decodeSignedPeerMeshRoster(record.roster),
|
|
1205
|
-
|
|
2093
|
+
reachability,
|
|
2094
|
+
advertisements,
|
|
1206
2095
|
more: record.more,
|
|
1207
2096
|
};
|
|
1208
2097
|
}
|
|
@@ -1225,34 +2114,61 @@ function decodeLeaveResponse(value) {
|
|
|
1225
2114
|
}
|
|
1226
2115
|
throw new Error('Invalid Peer Mesh leave response');
|
|
1227
2116
|
}
|
|
1228
|
-
function
|
|
1229
|
-
|
|
1230
|
-
|
|
2117
|
+
function decodeAnnounceRosterResponse(value) {
|
|
2118
|
+
const record = recordValue(value);
|
|
2119
|
+
if (record.kind === 'roster-observed' && hasExactKeys(record, ['kind'])) {
|
|
2120
|
+
return { kind: 'roster-observed' };
|
|
2121
|
+
}
|
|
2122
|
+
if (record.kind === 'roster-rejected' &&
|
|
2123
|
+
hasExactKeys(record, ['kind', 'reason']) &&
|
|
2124
|
+
record.reason === 'unknown') {
|
|
2125
|
+
return { kind: 'roster-rejected', reason: 'unknown' };
|
|
2126
|
+
}
|
|
2127
|
+
throw new Error('Invalid Peer Mesh roster announcement response');
|
|
2128
|
+
}
|
|
2129
|
+
function decodeReachabilityPage(value) {
|
|
2130
|
+
if (!Array.isArray(value) || value.length > EVIDENCE_PAGE_SIZE) {
|
|
2131
|
+
throw new Error('Invalid Peer Mesh reachability page');
|
|
2132
|
+
}
|
|
2133
|
+
return Object.freeze(value.map(decodeSignedPeerReachabilityLease));
|
|
2134
|
+
}
|
|
2135
|
+
function decodeAdvertisementPage(value) {
|
|
2136
|
+
if (!Array.isArray(value) || value.length > EVIDENCE_PAGE_SIZE) {
|
|
2137
|
+
throw new Error('Invalid Peer Mesh advertisement page');
|
|
1231
2138
|
}
|
|
1232
|
-
return Object.freeze(value.map(
|
|
2139
|
+
return Object.freeze(value.map(decodeSignedPeerMeshMemberAdvertisement));
|
|
1233
2140
|
}
|
|
1234
|
-
function
|
|
2141
|
+
function assertEvidencePageSize(reachability, advertisements) {
|
|
2142
|
+
if (reachability.length + advertisements.length > EVIDENCE_PAGE_SIZE) {
|
|
2143
|
+
throw new Error('Peer Mesh evidence page exceeds its bound');
|
|
2144
|
+
}
|
|
2145
|
+
}
|
|
2146
|
+
function decodeEvidenceSummaries(value) {
|
|
1235
2147
|
if (!Array.isArray(value) || value.length > PEER_MESH_MAX_MEMBERS) {
|
|
1236
|
-
throw new Error('Invalid Peer Mesh
|
|
2148
|
+
throw new Error('Invalid Peer Mesh evidence revisions');
|
|
1237
2149
|
}
|
|
1238
|
-
const
|
|
2150
|
+
const revisions = value.map((entry) => {
|
|
1239
2151
|
const record = recordValue(entry);
|
|
1240
|
-
if (!hasExactKeys(record, ['peerId', '
|
|
1241
|
-
throw new Error('Invalid Peer Mesh
|
|
2152
|
+
if (!hasExactKeys(record, ['peerId', 'revision', 'digest'])) {
|
|
2153
|
+
throw new Error('Invalid Peer Mesh evidence revision');
|
|
2154
|
+
}
|
|
2155
|
+
const revision = record.revision;
|
|
2156
|
+
if (!Number.isSafeInteger(revision) || revision < 1) {
|
|
2157
|
+
throw new Error('Invalid Peer Mesh evidence revision');
|
|
1242
2158
|
}
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
throw new Error('Invalid Peer Mesh route sequence');
|
|
2159
|
+
if (typeof record.digest !== 'string' || !/^[0-9a-f]{64}$/u.test(record.digest)) {
|
|
2160
|
+
throw new Error('Invalid Peer Mesh evidence digest');
|
|
1246
2161
|
}
|
|
1247
2162
|
return Object.freeze({
|
|
1248
2163
|
peerId: requiredString(record.peerId, 256),
|
|
1249
|
-
|
|
2164
|
+
revision: revision,
|
|
2165
|
+
digest: record.digest,
|
|
1250
2166
|
});
|
|
1251
2167
|
});
|
|
1252
|
-
if (new Set(
|
|
1253
|
-
throw new Error('Duplicate Peer Mesh
|
|
2168
|
+
if (new Set(revisions.map(({ peerId }) => peerId)).size !== revisions.length) {
|
|
2169
|
+
throw new Error('Duplicate Peer Mesh evidence revision');
|
|
1254
2170
|
}
|
|
1255
|
-
return Object.freeze(
|
|
2171
|
+
return Object.freeze(revisions);
|
|
1256
2172
|
}
|
|
1257
2173
|
async function writeFrame(stream, value) {
|
|
1258
2174
|
const bytes = Buffer.from(`${JSON.stringify(value)}\n`);
|