jishushell 0.6.5 → 0.7.3
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/apps/anythingllm-container.yaml +16 -170
- package/apps/browserless-chromium-container.yaml +16 -10
- package/apps/filebrowser-container.yaml +15 -9
- package/apps/hermes-container.yaml +20 -5
- package/apps/immich-container-lite.yaml +337 -0
- package/apps/immich-container.yaml +371 -0
- package/apps/jishu-kb-container.yaml +50 -177
- package/apps/ollama-binary.yaml +33 -28
- package/apps/ollama-cpu-container.yaml +6 -0
- package/apps/ollama-with-hollama-binary.yaml +35 -28
- package/apps/openclaw-binary.yaml +35 -15
- package/apps/openclaw-container.yaml +29 -11
- package/apps/openclaw-with-ollama-container.yaml +9 -2
- package/apps/openclaw-with-searxng-container.yaml +38 -6
- package/apps/searxng-container.yaml +31 -6
- package/apps/weknora-container.yaml +26 -21
- package/dependencies/jishushell-panel-0.7.3.tgz +0 -0
- package/dist/cli/app.js +244 -213
- package/dist/cli/app.js.map +1 -1
- package/dist/cli/backup.js +15 -12
- package/dist/cli/backup.js.map +1 -1
- package/dist/cli/core.d.ts +4 -3
- package/dist/cli/core.js +392 -227
- package/dist/cli/core.js.map +1 -1
- package/dist/cli/doctor.d.ts +1 -1
- package/dist/cli/doctor.js +113 -10
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/job.js +62 -14
- package/dist/cli/job.js.map +1 -1
- package/dist/cli/llm.js +80 -11
- package/dist/cli/llm.js.map +1 -1
- package/dist/cli/managed-list.d.ts +1 -3
- package/dist/cli/managed-list.js +18 -16
- package/dist/cli/managed-list.js.map +1 -1
- package/dist/cli/migrate.d.ts +2 -0
- package/dist/cli/migrate.js +160 -0
- package/dist/cli/migrate.js.map +1 -0
- package/dist/cli.js +1 -0
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +32 -20
- package/dist/config.js +132 -51
- package/dist/config.js.map +1 -1
- package/dist/control.d.ts +6 -6
- package/dist/control.js +31 -23
- package/dist/control.js.map +1 -1
- package/dist/core.d.ts +5 -5
- package/dist/core.js +5 -5
- package/dist/core.js.map +1 -1
- package/dist/install.d.ts +2 -2
- package/dist/install.js +78 -37
- package/dist/install.js.map +1 -1
- package/dist/routes/admin.d.ts +2 -0
- package/dist/routes/admin.js +72 -0
- package/dist/routes/admin.js.map +1 -0
- package/dist/routes/apps.d.ts +1 -1
- package/dist/routes/apps.js +101 -193
- package/dist/routes/apps.js.map +1 -1
- package/dist/routes/auth.js +1 -1
- package/dist/routes/auth.js.map +1 -1
- package/dist/routes/backup.js +1 -1
- package/dist/routes/backup.js.map +1 -1
- package/dist/routes/docker.d.ts +2 -0
- package/dist/routes/docker.js +58 -0
- package/dist/routes/docker.js.map +1 -0
- package/dist/routes/external-mounts.d.ts +1 -1
- package/dist/routes/external-mounts.js +1 -1
- package/dist/routes/external-mounts.js.map +1 -1
- package/dist/routes/file-mounts.d.ts +4 -3
- package/dist/routes/file-mounts.js +49 -31
- package/dist/routes/file-mounts.js.map +1 -1
- package/dist/routes/files-organize.d.ts +2 -2
- package/dist/routes/files-organize.js +5 -5
- package/dist/routes/files-organize.js.map +1 -1
- package/dist/routes/files.d.ts +1 -1
- package/dist/routes/files.js +1 -1
- package/dist/routes/files.js.map +1 -1
- package/dist/routes/instances.d.ts +0 -8
- package/dist/routes/instances.js +202 -1560
- package/dist/routes/instances.js.map +1 -1
- package/dist/routes/integration-apps.d.ts +14 -0
- package/dist/routes/integration-apps.js +81 -0
- package/dist/routes/integration-apps.js.map +1 -0
- package/dist/routes/integrations.d.ts +9 -0
- package/dist/routes/integrations.js +12 -0
- package/dist/routes/integrations.js.map +1 -0
- package/dist/routes/llm-proxy.js +26 -3
- package/dist/routes/llm-proxy.js.map +1 -1
- package/dist/routes/setup.js +53 -38
- package/dist/routes/setup.js.map +1 -1
- package/dist/routes/system.js +108 -68
- package/dist/routes/system.js.map +1 -1
- package/dist/routes/webdav.d.ts +1 -1
- package/dist/routes/webdav.js +2 -2
- package/dist/routes/webdav.js.map +1 -1
- package/dist/server.d.ts +6 -0
- package/dist/server.js +368 -233
- package/dist/server.js.map +1 -1
- package/dist/services/app-common/app-compiler.js +186 -0
- package/dist/services/app-common/app-compiler.js.map +1 -0
- package/dist/services/app-common/app-shared.d.ts +15 -0
- package/dist/services/app-common/app-shared.js +64 -0
- package/dist/services/app-common/app-shared.js.map +1 -0
- package/dist/services/app-common/capability-service.d.ts +45 -0
- package/dist/services/app-common/capability-service.js +331 -0
- package/dist/services/app-common/capability-service.js.map +1 -0
- package/dist/services/app-common/catalog-service.d.ts +59 -0
- package/dist/services/app-common/catalog-service.js +318 -0
- package/dist/services/app-common/catalog-service.js.map +1 -0
- package/dist/services/app-common/create-pipeline.d.ts +26 -0
- package/dist/services/app-common/create-pipeline.js +298 -0
- package/dist/services/app-common/create-pipeline.js.map +1 -0
- package/dist/services/app-common/delete-service.d.ts +5 -0
- package/dist/services/app-common/delete-service.js +109 -0
- package/dist/services/app-common/delete-service.js.map +1 -0
- package/dist/services/app-common/execution-owner.d.ts +23 -0
- package/dist/services/app-common/execution-owner.js +124 -0
- package/dist/services/app-common/execution-owner.js.map +1 -0
- package/dist/services/app-common/execution-service.d.ts +23 -0
- package/dist/services/app-common/execution-service.js +105 -0
- package/dist/services/app-common/execution-service.js.map +1 -0
- package/dist/services/app-common/id-normalizer.d.ts +31 -0
- package/dist/services/app-common/id-normalizer.js +83 -0
- package/dist/services/app-common/id-normalizer.js.map +1 -0
- package/dist/services/app-common/install-store.d.ts +34 -0
- package/dist/services/app-common/install-store.js +261 -0
- package/dist/services/app-common/install-store.js.map +1 -0
- package/dist/services/app-common/instance-store.d.ts +78 -0
- package/dist/services/app-common/instance-store.js +498 -0
- package/dist/services/app-common/instance-store.js.map +1 -0
- package/dist/services/app-common/integration-refs.d.ts +17 -0
- package/dist/services/app-common/integration-refs.js +47 -0
- package/dist/services/app-common/integration-refs.js.map +1 -0
- package/dist/services/app-common/lifecycle-pipeline.d.ts +62 -0
- package/dist/services/app-common/lifecycle-pipeline.js +317 -0
- package/dist/services/app-common/lifecycle-pipeline.js.map +1 -0
- package/dist/services/app-common/lifecycle-scripts.d.ts +38 -0
- package/dist/services/app-common/lifecycle-scripts.js +935 -0
- package/dist/services/app-common/lifecycle-scripts.js.map +1 -0
- package/dist/services/app-common/lifecycle-service.d.ts +68 -0
- package/dist/services/app-common/lifecycle-service.js +475 -0
- package/dist/services/app-common/lifecycle-service.js.map +1 -0
- package/dist/services/app-common/ownership.d.ts +3 -0
- package/dist/services/app-common/ownership.js +11 -0
- package/dist/services/app-common/ownership.js.map +1 -0
- package/dist/services/app-common/paths.d.ts +29 -0
- package/dist/services/app-common/paths.js +34 -0
- package/dist/services/app-common/paths.js.map +1 -0
- package/dist/services/app-common/platform-transform.d.ts +32 -0
- package/dist/services/app-common/platform-transform.js +65 -0
- package/dist/services/app-common/platform-transform.js.map +1 -0
- package/dist/services/app-common/provide-resolver.d.ts +29 -0
- package/dist/services/app-common/provide-resolver.js +129 -0
- package/dist/services/app-common/provide-resolver.js.map +1 -0
- package/dist/services/app-common/remote-spec.d.ts +14 -0
- package/dist/services/app-common/remote-spec.js +58 -0
- package/dist/services/app-common/remote-spec.js.map +1 -0
- package/dist/services/app-common/runtime-builder.d.ts +1 -0
- package/dist/services/app-common/runtime-builder.js +2 -0
- package/dist/services/app-common/runtime-builder.js.map +1 -0
- package/dist/services/app-common/runtime-facts.d.ts +19 -0
- package/dist/services/app-common/runtime-facts.js +128 -0
- package/dist/services/app-common/runtime-facts.js.map +1 -0
- package/dist/services/app-common/service.d.ts +9 -0
- package/dist/services/app-common/service.js +10 -0
- package/dist/services/app-common/service.js.map +1 -0
- package/dist/services/app-common/spec-materializer.d.ts +8 -0
- package/dist/services/app-common/spec-materializer.js +295 -0
- package/dist/services/app-common/spec-materializer.js.map +1 -0
- package/dist/services/app-common/status-refresh.d.ts +33 -0
- package/dist/services/app-common/status-refresh.js +771 -0
- package/dist/services/app-common/status-refresh.js.map +1 -0
- package/dist/services/app-common/task-service.d.ts +29 -0
- package/dist/services/app-common/task-service.js +93 -0
- package/dist/services/app-common/task-service.js.map +1 -0
- package/dist/services/app-common/terminal-session-manager.js +157 -0
- package/dist/services/app-common/terminal-session-manager.js.map +1 -0
- package/dist/services/app-modules/browserless/routes.d.ts +9 -0
- package/dist/services/app-modules/browserless/routes.js +519 -0
- package/dist/services/app-modules/browserless/routes.js.map +1 -0
- package/dist/services/app-modules/routes.d.ts +2 -0
- package/dist/services/app-modules/routes.js +5 -0
- package/dist/services/app-modules/routes.js.map +1 -0
- package/dist/services/backup/backup-admin.d.ts +95 -0
- package/dist/services/backup/backup-admin.js +246 -0
- package/dist/services/backup/backup-admin.js.map +1 -0
- package/dist/services/backup/backup-manager.d.ts +264 -0
- package/dist/services/backup/backup-manager.js +2318 -0
- package/dist/services/backup/backup-manager.js.map +1 -0
- package/dist/services/backup/backup-verify.js +240 -0
- package/dist/services/backup/backup-verify.js.map +1 -0
- package/dist/services/capabilities/browser-policy.d.ts +14 -0
- package/dist/services/capabilities/browser-policy.js +141 -0
- package/dist/services/capabilities/browser-policy.js.map +1 -0
- package/dist/services/capabilities/contract.d.ts +49 -0
- package/dist/services/capabilities/contract.js +119 -0
- package/dist/services/capabilities/contract.js.map +1 -0
- package/dist/services/capabilities/endpoint-validator.d.ts +42 -0
- package/dist/services/capabilities/endpoint-validator.js +113 -0
- package/dist/services/capabilities/endpoint-validator.js.map +1 -0
- package/dist/services/capabilities/health.d.ts +16 -0
- package/dist/services/capabilities/health.js +121 -0
- package/dist/services/capabilities/health.js.map +1 -0
- package/dist/services/capabilities/registry.d.ts +56 -0
- package/dist/services/capabilities/registry.js +222 -0
- package/dist/services/capabilities/registry.js.map +1 -0
- package/dist/services/capabilities/sync.d.ts +7 -0
- package/dist/services/capabilities/sync.js +223 -0
- package/dist/services/capabilities/sync.js.map +1 -0
- package/dist/services/capability-proxy/html-rewriters/browserless.d.ts +1 -0
- package/dist/services/capability-proxy/html-rewriters/browserless.js +83 -0
- package/dist/services/capability-proxy/html-rewriters/browserless.js.map +1 -0
- package/dist/services/capability-proxy/html-rewriters/index.d.ts +12 -0
- package/dist/services/capability-proxy/html-rewriters/index.js +25 -0
- package/dist/services/capability-proxy/html-rewriters/index.js.map +1 -0
- package/dist/services/capability-proxy/html-rewriters/jishukb.d.ts +1 -0
- package/dist/services/capability-proxy/html-rewriters/jishukb.js +161 -0
- package/dist/services/capability-proxy/html-rewriters/jishukb.js.map +1 -0
- package/dist/services/capability-proxy/http.d.ts +7 -0
- package/dist/services/capability-proxy/http.js +555 -0
- package/dist/services/capability-proxy/http.js.map +1 -0
- package/dist/services/capability-proxy/terminal.d.ts +4 -0
- package/dist/services/capability-proxy/terminal.js +179 -0
- package/dist/services/capability-proxy/terminal.js.map +1 -0
- package/dist/services/connections/admin.d.ts +80 -0
- package/dist/services/connections/admin.js +337 -0
- package/dist/services/connections/admin.js.map +1 -0
- package/dist/services/connections/apply.d.ts +104 -0
- package/dist/services/connections/apply.js +415 -0
- package/dist/services/connections/apply.js.map +1 -0
- package/dist/services/connections/resolver.d.ts +82 -0
- package/dist/services/connections/resolver.js +289 -0
- package/dist/services/connections/resolver.js.map +1 -0
- package/dist/services/connections/transactor.d.ts +39 -0
- package/dist/services/connections/transactor.js +307 -0
- package/dist/services/connections/transactor.js.map +1 -0
- package/dist/services/files/bootstrap.d.ts +7 -0
- package/dist/services/files/bootstrap.js +16 -0
- package/dist/services/files/bootstrap.js.map +1 -0
- package/dist/services/files/external-mounts.js +187 -0
- package/dist/services/files/external-mounts.js.map +1 -0
- package/dist/services/files/files-manager.d.ts +265 -0
- package/dist/services/files/files-manager.js +1189 -0
- package/dist/services/files/files-manager.js.map +1 -0
- package/dist/services/files/files-mounts.d.ts +42 -0
- package/dist/services/files/files-mounts.js +207 -0
- package/dist/services/files/files-mounts.js.map +1 -0
- package/dist/services/files/organize/applier.js +218 -0
- package/dist/services/files/organize/applier.js.map +1 -0
- package/dist/services/files/organize/rules.js +286 -0
- package/dist/services/files/organize/rules.js.map +1 -0
- package/dist/services/files/organize/scanner.js +366 -0
- package/dist/services/files/organize/scanner.js.map +1 -0
- package/dist/services/files/organize/store.js +82 -0
- package/dist/services/files/organize/store.js.map +1 -0
- package/dist/services/files/photos/upload-page.d.ts +2 -0
- package/dist/services/files/photos/upload-page.js +248 -0
- package/dist/services/files/photos/upload-page.js.map +1 -0
- package/dist/services/files/photos/upload-store.d.ts +74 -0
- package/dist/services/files/photos/upload-store.js +432 -0
- package/dist/services/files/photos/upload-store.js.map +1 -0
- package/dist/services/files/webdav/server.d.ts +47 -0
- package/dist/services/files/webdav/server.js +329 -0
- package/dist/services/files/webdav/server.js.map +1 -0
- package/dist/services/files/webdav/xml-builder.js.map +1 -0
- package/dist/services/http/proxy-utils.d.ts +7 -0
- package/dist/services/http/proxy-utils.js +29 -0
- package/dist/services/http/proxy-utils.js.map +1 -0
- package/dist/services/http/request-utils.d.ts +3 -0
- package/dist/services/http/request-utils.js +23 -0
- package/dist/services/http/request-utils.js.map +1 -0
- package/dist/services/instances/admin.d.ts +23 -0
- package/dist/services/instances/admin.js +218 -0
- package/dist/services/instances/admin.js.map +1 -0
- package/dist/services/instances/clone.d.ts +26 -0
- package/dist/services/instances/clone.js +78 -0
- package/dist/services/instances/clone.js.map +1 -0
- package/dist/services/instances/config-admin.d.ts +17 -0
- package/dist/services/instances/config-admin.js +181 -0
- package/dist/services/instances/config-admin.js.map +1 -0
- package/dist/services/instances/manager.d.ts +232 -0
- package/dist/services/instances/manager.js +1342 -0
- package/dist/services/instances/manager.js.map +1 -0
- package/dist/services/instances/pairing.d.ts +17 -0
- package/dist/services/instances/pairing.js +53 -0
- package/dist/services/instances/pairing.js.map +1 -0
- package/dist/services/instances/passwords.js +173 -0
- package/dist/services/instances/passwords.js.map +1 -0
- package/dist/services/instances/status.d.ts +2 -0
- package/dist/services/instances/status.js +11 -0
- package/dist/services/instances/status.js.map +1 -0
- package/dist/services/instances/types.d.ts +21 -0
- package/dist/services/instances/types.js +2 -0
- package/dist/services/instances/types.js.map +1 -0
- package/dist/services/integrations/anythingllm/integration.d.ts +25 -0
- package/dist/services/integrations/anythingllm/integration.js +251 -0
- package/dist/services/integrations/anythingllm/integration.js.map +1 -0
- package/dist/services/integrations/catalog.d.ts +3 -0
- package/dist/services/integrations/catalog.js +73 -0
- package/dist/services/integrations/catalog.js.map +1 -0
- package/dist/services/integrations/custom/integration.d.ts +28 -0
- package/dist/services/integrations/custom/integration.js +179 -0
- package/dist/services/integrations/custom/integration.js.map +1 -0
- package/dist/services/integrations/hermes/integration.d.ts +194 -0
- package/dist/services/integrations/hermes/integration.js +1668 -0
- package/dist/services/integrations/hermes/integration.js.map +1 -0
- package/dist/services/integrations/immich/client.d.ts +93 -0
- package/dist/services/integrations/immich/client.js +458 -0
- package/dist/services/integrations/immich/client.js.map +1 -0
- package/dist/services/integrations/immich/config.d.ts +15 -0
- package/dist/services/integrations/immich/config.js +178 -0
- package/dist/services/integrations/immich/config.js.map +1 -0
- package/dist/services/integrations/immich/discovery.d.ts +9 -0
- package/dist/services/integrations/immich/discovery.js +101 -0
- package/dist/services/integrations/immich/discovery.js.map +1 -0
- package/dist/services/integrations/immich/gallery-renderer.d.ts +5 -0
- package/dist/services/integrations/immich/gallery-renderer.js +150 -0
- package/dist/services/integrations/immich/gallery-renderer.js.map +1 -0
- package/dist/services/integrations/immich/immich-shim.d.ts +11 -0
- package/dist/services/integrations/immich/immich-shim.js +439 -0
- package/dist/services/integrations/immich/immich-shim.js.map +1 -0
- package/dist/services/integrations/immich/integration.d.ts +18 -0
- package/dist/services/integrations/immich/integration.js +64 -0
- package/dist/services/integrations/immich/integration.js.map +1 -0
- package/dist/services/integrations/immich/photo-library.d.ts +4 -0
- package/dist/services/integrations/immich/photo-library.js +63 -0
- package/dist/services/integrations/immich/photo-library.js.map +1 -0
- package/dist/services/integrations/immich/review-executor.d.ts +3 -0
- package/dist/services/integrations/immich/review-executor.js +41 -0
- package/dist/services/integrations/immich/review-executor.js.map +1 -0
- package/dist/services/integrations/immich/review-session-service.d.ts +27 -0
- package/dist/services/integrations/immich/review-session-service.js +206 -0
- package/dist/services/integrations/immich/review-session-service.js.map +1 -0
- package/dist/services/integrations/immich/review-store.d.ts +47 -0
- package/dist/services/integrations/immich/review-store.js +347 -0
- package/dist/services/integrations/immich/review-store.js.map +1 -0
- package/dist/services/integrations/immich/routes.d.ts +7 -0
- package/dist/services/integrations/immich/routes.js +363 -0
- package/dist/services/integrations/immich/routes.js.map +1 -0
- package/dist/services/integrations/immich/types.d.ts +186 -0
- package/dist/services/integrations/immich/types.js +2 -0
- package/dist/services/integrations/immich/types.js.map +1 -0
- package/dist/services/integrations/index.d.ts +41 -0
- package/dist/services/integrations/index.js +60 -0
- package/dist/services/integrations/index.js.map +1 -0
- package/dist/services/integrations/installable/catalog.d.ts +33 -0
- package/dist/services/integrations/installable/catalog.js +88 -0
- package/dist/services/integrations/installable/catalog.js.map +1 -0
- package/dist/services/integrations/installable/index.d.ts +35 -0
- package/dist/services/integrations/installable/index.js +170 -0
- package/dist/services/integrations/installable/index.js.map +1 -0
- package/dist/services/integrations/installable/installers/integration-probes.d.ts +50 -0
- package/dist/services/integrations/installable/installers/integration-probes.js +231 -0
- package/dist/services/integrations/installable/installers/integration-probes.js.map +1 -0
- package/dist/services/integrations/installable/installers/integration.d.ts +30 -0
- package/dist/services/integrations/installable/installers/integration.js +283 -0
- package/dist/services/integrations/installable/installers/integration.js.map +1 -0
- package/dist/services/integrations/installable/installers/registry-probe.js.map +1 -0
- package/dist/services/integrations/installable/installers/shell-script.d.ts +46 -0
- package/dist/services/integrations/installable/installers/shell-script.js +487 -0
- package/dist/services/integrations/installable/installers/shell-script.js.map +1 -0
- package/dist/services/integrations/installable/types.d.ts +130 -0
- package/dist/services/integrations/installable/types.js +19 -0
- package/dist/services/integrations/installable/types.js.map +1 -0
- package/dist/services/integrations/jishukb/integration.d.ts +24 -0
- package/dist/services/integrations/jishukb/integration.js +300 -0
- package/dist/services/integrations/jishukb/integration.js.map +1 -0
- package/dist/services/integrations/openclaw/anythingllm-shim.d.ts +46 -0
- package/dist/services/integrations/openclaw/anythingllm-shim.js +281 -0
- package/dist/services/integrations/openclaw/anythingllm-shim.js.map +1 -0
- package/dist/services/integrations/openclaw/drive-shim.js +490 -0
- package/dist/services/integrations/openclaw/drive-shim.js.map +1 -0
- package/dist/services/integrations/openclaw/integration.d.ts +438 -0
- package/dist/services/integrations/openclaw/integration.js +4629 -0
- package/dist/services/integrations/openclaw/integration.js.map +1 -0
- package/dist/services/integrations/openclaw/jishukb-native-mcp.d.ts +58 -0
- package/dist/services/integrations/openclaw/jishukb-native-mcp.js +373 -0
- package/dist/services/integrations/openclaw/jishukb-native-mcp.js.map +1 -0
- package/dist/services/integrations/openclaw/jishukb-shim.d.ts +52 -0
- package/dist/services/integrations/openclaw/jishukb-shim.js +1357 -0
- package/dist/services/integrations/openclaw/jishukb-shim.js.map +1 -0
- package/dist/services/integrations/openclaw/mcporter-lite.js +276 -0
- package/dist/services/integrations/openclaw/mcporter-lite.js.map +1 -0
- package/dist/services/integrations/openclaw/mcporter.d.ts +59 -0
- package/dist/services/integrations/openclaw/mcporter.js +143 -0
- package/dist/services/integrations/openclaw/mcporter.js.map +1 -0
- package/dist/services/integrations/openclaw/native-mcp.d.ts +48 -0
- package/dist/services/integrations/openclaw/native-mcp.js +125 -0
- package/dist/services/integrations/openclaw/native-mcp.js.map +1 -0
- package/dist/services/integrations/openclaw/routes.d.ts +21 -0
- package/dist/services/integrations/openclaw/routes.js +1194 -0
- package/dist/services/integrations/openclaw/routes.js.map +1 -0
- package/dist/services/integrations/registry.d.ts +17 -0
- package/dist/services/integrations/registry.js +36 -0
- package/dist/services/integrations/registry.js.map +1 -0
- package/dist/services/integrations/routes.d.ts +2 -0
- package/dist/services/integrations/routes.js +9 -0
- package/dist/services/integrations/routes.js.map +1 -0
- package/dist/services/integrations/types.d.ts +457 -0
- package/dist/services/integrations/types.js +2 -0
- package/dist/services/integrations/types.js.map +1 -0
- package/dist/services/legacy-migrator/classifier.d.ts +44 -0
- package/dist/services/legacy-migrator/classifier.js +309 -0
- package/dist/services/legacy-migrator/classifier.js.map +1 -0
- package/dist/services/legacy-migrator/executor.d.ts +42 -0
- package/dist/services/legacy-migrator/executor.js +637 -0
- package/dist/services/legacy-migrator/executor.js.map +1 -0
- package/dist/services/legacy-migrator/index.d.ts +31 -0
- package/dist/services/legacy-migrator/index.js +34 -0
- package/dist/services/legacy-migrator/index.js.map +1 -0
- package/dist/services/legacy-migrator/planner.d.ts +8 -0
- package/dist/services/legacy-migrator/planner.js +154 -0
- package/dist/services/legacy-migrator/planner.js.map +1 -0
- package/dist/services/legacy-migrator/provider-settings.d.ts +6 -0
- package/dist/services/legacy-migrator/provider-settings.js +72 -0
- package/dist/services/legacy-migrator/provider-settings.js.map +1 -0
- package/dist/services/legacy-migrator/report.d.ts +9 -0
- package/dist/services/legacy-migrator/report.js +99 -0
- package/dist/services/legacy-migrator/report.js.map +1 -0
- package/dist/services/legacy-migrator/scanner.d.ts +13 -0
- package/dist/services/legacy-migrator/scanner.js +157 -0
- package/dist/services/legacy-migrator/scanner.js.map +1 -0
- package/dist/services/legacy-migrator/types.d.ts +97 -0
- package/dist/services/legacy-migrator/types.js +23 -0
- package/dist/services/legacy-migrator/types.js.map +1 -0
- package/dist/services/llm-proxy/instance-proxy.d.ts +17 -1
- package/dist/services/llm-proxy/instance-proxy.js +171 -44
- package/dist/services/llm-proxy/instance-proxy.js.map +1 -1
- package/dist/services/llm-proxy/probe.js +5 -14
- package/dist/services/llm-proxy/probe.js.map +1 -1
- package/dist/services/llm-proxy/providers.js +23 -31
- package/dist/services/llm-proxy/providers.js.map +1 -1
- package/dist/services/llm-proxy/ssrf.d.ts +11 -4
- package/dist/services/llm-proxy/ssrf.js +45 -7
- package/dist/services/llm-proxy/ssrf.js.map +1 -1
- package/dist/services/llm-proxy/validate-key.js +16 -37
- package/dist/services/llm-proxy/validate-key.js.map +1 -1
- package/dist/services/repair/runtime-repair.d.ts +22 -0
- package/dist/services/repair/runtime-repair.js +374 -0
- package/dist/services/repair/runtime-repair.js.map +1 -0
- package/dist/services/runtime/docker-network.d.ts +8 -0
- package/dist/services/runtime/docker-network.js +123 -0
- package/dist/services/runtime/docker-network.js.map +1 -0
- package/dist/services/runtime/driver-registry.d.ts +25 -0
- package/dist/services/runtime/driver-registry.js +22 -0
- package/dist/services/runtime/driver-registry.js.map +1 -0
- package/dist/services/runtime/drivers/nomad.d.ts +261 -0
- package/dist/services/runtime/drivers/nomad.js +3122 -0
- package/dist/services/runtime/drivers/nomad.js.map +1 -0
- package/dist/services/runtime/errors.d.ts +3 -3
- package/dist/services/runtime/errors.js +3 -3
- package/dist/services/runtime/instance.d.ts +14 -16
- package/dist/services/runtime/instance.js +93 -123
- package/dist/services/runtime/instance.js.map +1 -1
- package/dist/services/runtime/job-id.d.ts +1 -1
- package/dist/services/runtime/job-id.js +1 -1
- package/dist/services/runtime/mcp-shims/firewall.d.ts +2 -2
- package/dist/services/runtime/mcp-shims/firewall.js +2 -2
- package/dist/services/runtime/mcp-shims/searxng-shim.d.ts +3 -5
- package/dist/services/runtime/mcp-shims/searxng-shim.js +3 -5
- package/dist/services/runtime/mcp-shims/searxng-shim.js.map +1 -1
- package/dist/services/runtime/mcp-shims/write-mcp-entry.d.ts +20 -20
- package/dist/services/runtime/mcp-shims/write-mcp-entry.js +16 -16
- package/dist/services/runtime/mcp-shims/write-mcp-entry.js.map +1 -1
- package/dist/services/runtime/ownership-marker.d.ts +83 -0
- package/dist/services/runtime/ownership-marker.js +109 -0
- package/dist/services/runtime/ownership-marker.js.map +1 -0
- package/dist/services/runtime/service-manager.d.ts +2 -0
- package/dist/services/runtime/service-manager.js +18 -0
- package/dist/services/runtime/service-manager.js.map +1 -0
- package/dist/services/runtime/types.d.ts +23 -501
- package/dist/services/runtime/types.js +0 -12
- package/dist/services/runtime/types.js.map +1 -1
- package/dist/services/runtime/workload-compiler.d.ts +17 -0
- package/dist/services/runtime/workload-compiler.js +550 -0
- package/dist/services/runtime/workload-compiler.js.map +1 -0
- package/dist/services/runtime/workload-types.d.ts +11 -0
- package/dist/services/runtime/workload-types.js +2 -0
- package/dist/services/runtime/workload-types.js.map +1 -0
- package/dist/services/setup/core-manager.d.ts +50 -0
- package/dist/services/setup/core-manager.js +456 -0
- package/dist/services/setup/core-manager.js.map +1 -0
- package/dist/services/setup/plugin-installer.js +136 -0
- package/dist/services/setup/plugin-installer.js.map +1 -0
- package/dist/services/setup/setup-manager.d.ts +158 -0
- package/dist/services/setup/setup-manager.js +2724 -0
- package/dist/services/setup/setup-manager.js.map +1 -0
- package/dist/services/system/cli-command.d.ts +5 -0
- package/dist/services/system/cli-command.js +18 -0
- package/dist/services/system/cli-command.js.map +1 -0
- package/dist/services/system/macos-launchd.js +312 -0
- package/dist/services/system/macos-launchd.js.map +1 -0
- package/dist/services/system/repair-orchestrator.d.ts +71 -0
- package/dist/services/system/repair-orchestrator.js +412 -0
- package/dist/services/system/repair-orchestrator.js.map +1 -0
- package/dist/services/system/runtime-ownership.d.ts +36 -0
- package/dist/services/system/runtime-ownership.js +250 -0
- package/dist/services/system/runtime-ownership.js.map +1 -0
- package/dist/services/system/system-monitor.js +96 -0
- package/dist/services/system/system-monitor.js.map +1 -0
- package/dist/services/system/system-ollama-provider.d.ts +14 -0
- package/dist/services/system/system-ollama-provider.js +129 -0
- package/dist/services/system/system-ollama-provider.js.map +1 -0
- package/dist/services/system/system-reconciler.d.ts +59 -0
- package/dist/services/system/system-reconciler.js +763 -0
- package/dist/services/system/system-reconciler.js.map +1 -0
- package/dist/services/system/update-manager.d.ts +43 -0
- package/dist/services/system/update-manager.js +315 -0
- package/dist/services/system/update-manager.js.map +1 -0
- package/dist/services/system/upgrade-finalize.d.ts +80 -0
- package/dist/services/system/upgrade-finalize.js +507 -0
- package/dist/services/system/upgrade-finalize.js.map +1 -0
- package/dist/services/tasks/registry.d.ts +44 -0
- package/dist/services/tasks/registry.js +90 -0
- package/dist/services/tasks/registry.js.map +1 -0
- package/dist/services/telemetry/activation.d.ts +6 -2
- package/dist/services/telemetry/activation.js +6 -2
- package/dist/services/telemetry/activation.js.map +1 -1
- package/dist/services/telemetry/heartbeat.d.ts +6 -2
- package/dist/services/telemetry/heartbeat.js +6 -2
- package/dist/services/telemetry/heartbeat.js.map +1 -1
- package/dist/services/workspaces/builder.d.ts +29 -0
- package/dist/services/workspaces/builder.js +186 -0
- package/dist/services/workspaces/builder.js.map +1 -0
- package/dist/types.d.ts +350 -48
- package/dist/utils/instance-lock.d.ts +2 -2
- package/dist/utils/instance-lock.js +2 -2
- package/dist/utils/path-safety.js +1 -1
- package/dist/utils/service-user.d.ts +13 -0
- package/dist/utils/service-user.js +129 -0
- package/dist/utils/service-user.js.map +1 -0
- package/install/jishu-install.sh +107 -27
- package/install/jishu-uninstall.sh +8 -0
- package/install/post-install.sh +162 -185
- package/install/post-uninstall.sh +6 -0
- package/node_modules/@fastify/static/.github/workflows/ci.yml +1 -1
- package/node_modules/@fastify/static/.github/workflows/lock-threads.yml +19 -0
- package/node_modules/@fastify/static/LICENSE +1 -3
- package/node_modules/@fastify/static/example/server-benchmark.js +39 -0
- package/node_modules/@fastify/static/index.js +169 -23
- package/node_modules/@fastify/static/lib/dirList.js +20 -6
- package/node_modules/@fastify/static/package.json +10 -8
- package/node_modules/@fastify/static/test/dir-list.test.js +82 -0
- package/node_modules/@fastify/static/test/static.test.js +326 -4
- package/node_modules/@fastify/static/types/index.d.ts +0 -4
- package/node_modules/@fastify/static/types/index.test-d.ts +1 -1
- package/node_modules/brace-expansion/dist/commonjs/index.js +24 -14
- package/node_modules/brace-expansion/dist/commonjs/index.js.map +1 -1
- package/node_modules/brace-expansion/dist/esm/index.js +24 -14
- package/node_modules/brace-expansion/dist/esm/index.js.map +1 -1
- package/node_modules/brace-expansion/package.json +2 -2
- package/node_modules/content-disposition/README.md +21 -22
- package/node_modules/content-disposition/index.js +122 -44
- package/node_modules/content-disposition/package.json +16 -20
- package/node_modules/fast-uri/index.js +1 -1
- package/node_modules/fast-uri/package.json +1 -1
- package/node_modules/fast-uri/test/security.test.js +28 -0
- package/node_modules/fastify/SECURITY.md +1 -1
- package/node_modules/fastify/SPONSORS.md +6 -4
- package/node_modules/fastify/docs/Guides/Database.md +0 -28
- package/node_modules/fastify/docs/Guides/Ecosystem.md +13 -2
- package/node_modules/fastify/docs/Guides/Serverless.md +2 -2
- package/node_modules/fastify/docs/Guides/Write-Plugin.md +1 -1
- package/node_modules/fastify/docs/Reference/Encapsulation.md +27 -26
- package/node_modules/fastify/docs/Reference/Errors.md +10 -4
- package/node_modules/fastify/docs/Reference/HTTP2.md +10 -10
- package/node_modules/fastify/docs/Reference/Hooks.md +4 -4
- package/node_modules/fastify/docs/Reference/Index.md +14 -16
- package/node_modules/fastify/docs/Reference/LTS.md +12 -13
- package/node_modules/fastify/docs/Reference/Lifecycle.md +9 -8
- package/node_modules/fastify/docs/Reference/Logging.md +44 -39
- package/node_modules/fastify/docs/Reference/Middleware.md +21 -25
- package/node_modules/fastify/docs/Reference/Principles.md +2 -2
- package/node_modules/fastify/docs/Reference/Reply.md +6 -1
- package/node_modules/fastify/docs/Reference/Request.md +27 -16
- package/node_modules/fastify/docs/Reference/Routes.md +5 -2
- package/node_modules/fastify/docs/Reference/Server.md +31 -3
- package/node_modules/fastify/docs/Reference/Type-Providers.md +29 -5
- package/node_modules/fastify/docs/Reference/Validation-and-Serialization.md +15 -2
- package/node_modules/fastify/docs/Reference/Warnings.md +7 -6
- package/node_modules/fastify/eslint.config.js +7 -2
- package/node_modules/fastify/fastify.d.ts +8 -3
- package/node_modules/fastify/fastify.js +43 -14
- package/node_modules/fastify/lib/content-type-parser.js +13 -1
- package/node_modules/fastify/lib/decorate.js +11 -3
- package/node_modules/fastify/lib/error-handler.js +4 -3
- package/node_modules/fastify/lib/error-serializer.js +59 -59
- package/node_modules/fastify/lib/errors.js +16 -1
- package/node_modules/fastify/lib/four-oh-four.js +14 -9
- package/node_modules/fastify/lib/handle-request.js +11 -5
- package/node_modules/fastify/lib/plugin-override.js +2 -1
- package/node_modules/fastify/lib/plugin-utils.js +5 -5
- package/node_modules/fastify/lib/reply.js +63 -8
- package/node_modules/fastify/lib/request.js +14 -4
- package/node_modules/fastify/lib/route.js +20 -6
- package/node_modules/fastify/lib/schema-controller.js +1 -1
- package/node_modules/fastify/lib/schemas.js +37 -30
- package/node_modules/fastify/lib/symbols.js +3 -1
- package/node_modules/fastify/lib/validation.js +1 -13
- package/node_modules/fastify/lib/warnings.js +3 -3
- package/node_modules/fastify/package.json +13 -15
- package/node_modules/fastify/scripts/validate-ecosystem-links.js +1 -0
- package/node_modules/fastify/test/bundler/esbuild/package.json +1 -1
- package/node_modules/fastify/test/close-pipelining.test.js +1 -2
- package/node_modules/fastify/test/custom-http-server.test.js +38 -0
- package/node_modules/fastify/test/decorator-instance-properties.test.js +63 -0
- package/node_modules/fastify/test/diagnostics-channel/async-error-handler.test.js +74 -0
- package/node_modules/fastify/test/hooks.test.js +23 -0
- package/node_modules/fastify/test/http-methods/get.test.js +1 -1
- package/node_modules/fastify/test/http2/plain.test.js +135 -0
- package/node_modules/fastify/test/http2/secure-with-fallback.test.js +1 -1
- package/node_modules/fastify/test/https/https.test.js +1 -2
- package/node_modules/fastify/test/internals/errors.test.js +31 -1
- package/node_modules/fastify/test/internals/plugin.test.js +3 -1
- package/node_modules/fastify/test/internals/request.test.js +27 -3
- package/node_modules/fastify/test/internals/schema-controller-perf.test.js +33 -0
- package/node_modules/fastify/test/logger/logging.test.js +18 -1
- package/node_modules/fastify/test/logger/options.test.js +38 -1
- package/node_modules/fastify/test/reply-error.test.js +1 -1
- package/node_modules/fastify/test/reply-trailers.test.js +70 -0
- package/node_modules/fastify/test/request-media-type.test.js +105 -0
- package/node_modules/fastify/test/route-prefix.test.js +34 -0
- package/node_modules/fastify/test/router-options.test.js +222 -11
- package/node_modules/fastify/test/schema-serialization.test.js +108 -0
- package/node_modules/fastify/test/schema-validation.test.js +24 -0
- package/node_modules/fastify/test/scripts/validate-ecosystem-links.test.js +40 -57
- package/node_modules/fastify/test/throw.test.js +14 -0
- package/node_modules/fastify/test/trust-proxy.test.js +21 -0
- package/node_modules/fastify/test/types/content-type-parser.tst.ts +70 -0
- package/node_modules/fastify/test/types/decorate-request-reply.tst.ts +18 -0
- package/node_modules/fastify/test/types/dummy-plugin.mts +9 -0
- package/node_modules/fastify/test/types/errors.tst.ts +91 -0
- package/node_modules/fastify/test/types/fastify.tst.ts +351 -0
- package/node_modules/fastify/test/types/hooks.tst.ts +578 -0
- package/node_modules/fastify/test/types/instance.tst.ts +597 -0
- package/node_modules/fastify/test/types/logger.tst.ts +276 -0
- package/node_modules/fastify/test/types/plugin.tst.ts +96 -0
- package/node_modules/fastify/test/types/register.tst.ts +245 -0
- package/node_modules/fastify/test/types/reply.tst.ts +297 -0
- package/node_modules/fastify/test/types/request.tst.ts +199 -0
- package/node_modules/fastify/test/types/route.tst.ts +576 -0
- package/node_modules/fastify/test/types/schema.tst.ts +135 -0
- package/node_modules/fastify/test/types/serverFactory.tst.ts +37 -0
- package/node_modules/fastify/test/types/tsconfig.json +9 -0
- package/node_modules/fastify/test/types/type-provider.tst.ts +1219 -0
- package/node_modules/fastify/test/types/using.tst.ts +14 -0
- package/node_modules/fastify/types/errors.d.ts +3 -0
- package/node_modules/fastify/types/request.d.ts +23 -2
- package/node_modules/glob/README.md +39 -130
- package/node_modules/glob/dist/commonjs/glob.d.ts +8 -0
- package/node_modules/glob/dist/commonjs/glob.d.ts.map +1 -1
- package/node_modules/glob/dist/commonjs/glob.js +2 -1
- package/node_modules/glob/dist/commonjs/glob.js.map +1 -1
- package/node_modules/glob/dist/commonjs/index.min.js +4 -0
- package/node_modules/glob/dist/commonjs/index.min.js.map +7 -0
- package/node_modules/glob/dist/commonjs/pattern.d.ts +3 -0
- package/node_modules/glob/dist/commonjs/pattern.d.ts.map +1 -1
- package/node_modules/glob/dist/commonjs/pattern.js +4 -0
- package/node_modules/glob/dist/commonjs/pattern.js.map +1 -1
- package/node_modules/glob/dist/esm/glob.d.ts +8 -0
- package/node_modules/glob/dist/esm/glob.d.ts.map +1 -1
- package/node_modules/glob/dist/esm/glob.js +2 -1
- package/node_modules/glob/dist/esm/glob.js.map +1 -1
- package/node_modules/glob/dist/esm/index.min.js +4 -0
- package/node_modules/glob/dist/esm/index.min.js.map +7 -0
- package/node_modules/glob/dist/esm/pattern.d.ts +3 -0
- package/node_modules/glob/dist/esm/pattern.d.ts.map +1 -1
- package/node_modules/glob/dist/esm/pattern.js +4 -0
- package/node_modules/glob/dist/esm/pattern.js.map +1 -1
- package/node_modules/glob/package.json +38 -37
- package/node_modules/jishushell-panel/README.md +4 -4
- package/node_modules/jishushell-panel/output/dist/server.js +17 -6
- package/node_modules/jishushell-panel/output/dist/server.js.map +1 -1
- package/node_modules/jishushell-panel/output/public/assets/ApiKeyField-Ce5d1xna.js +1 -0
- package/node_modules/jishushell-panel/output/public/assets/Dashboard-BXame3yg.js +1 -0
- package/node_modules/jishushell-panel/output/public/assets/HermesChatPanel-BHZtPCJd.js +1 -0
- package/node_modules/jishushell-panel/output/public/assets/HermesConfigForm-CB3GbNX9.js +4 -0
- package/node_modules/jishushell-panel/output/public/assets/InitPassword-Boab9F6g.js +1 -0
- package/node_modules/jishushell-panel/output/public/assets/InstanceDetail-DrIWCqo-.js +14 -0
- package/node_modules/jishushell-panel/output/public/assets/Login-CzpOkNau.js +1 -0
- package/node_modules/jishushell-panel/output/public/assets/NewInstance-CANXyCcL.js +1 -0
- package/node_modules/jishushell-panel/output/public/assets/ProviderRecommendations-BABo9VOC.js +1 -0
- package/node_modules/jishushell-panel/output/public/assets/Settings-CKp5XxFh.js +1 -0
- package/node_modules/jishushell-panel/output/public/assets/Setup-C7xVDPow.js +1 -0
- package/node_modules/jishushell-panel/output/public/assets/WeixinLoginPanel-B765Xz4C.js +1 -0
- package/node_modules/jishushell-panel/output/public/assets/api-C70Gt678.js +4 -0
- package/node_modules/jishushell-panel/output/public/assets/index-Bs6DSbiR.js +23 -0
- package/node_modules/jishushell-panel/output/public/assets/index-DnnqTf7s.css +1 -0
- package/node_modules/jishushell-panel/output/public/assets/registry-sWIZsIEF.js +2 -0
- package/node_modules/jishushell-panel/output/public/assets/rolldown-runtime-QTnfLwEv.js +1 -0
- package/node_modules/jishushell-panel/output/public/assets/setup-task-q21GnI0E.js +1 -0
- package/node_modules/jishushell-panel/output/public/assets/usePolling-D4IDOQd_.js +1 -0
- package/node_modules/jishushell-panel/output/public/assets/vendor-i18n-Df8aUdv8.js +1 -0
- package/node_modules/jishushell-panel/output/public/assets/vendor-react-0L0rjmYG.js +8 -0
- package/node_modules/jishushell-panel/output/public/index.html +6 -4
- package/node_modules/jishushell-panel/package.json +2 -2
- package/node_modules/semver/classes/range.js +17 -4
- package/node_modules/semver/package.json +2 -2
- package/package.json +12 -64
- package/scripts/check-app-path-boundaries.mjs +121 -0
- package/scripts/check-app-spec.mjs +123 -29
- package/scripts/check-architecture-boundaries.mjs +178 -0
- package/scripts/check-colima-launchd.mjs +10 -8
- package/scripts/check-integration-isolation.ts +541 -0
- package/scripts/check-new-file-tests.mjs +11 -3
- package/scripts/check-open-core-boundaries.mjs +60 -10
- package/scripts/check-test-layering.sh +1 -1
- package/scripts/fixtures/instances/hermes-sample/instance.json +3 -2
- package/scripts/fixtures/instances/legacy-openclaw-sample/instance.json +1 -1
- package/scripts/local-web-upgrade-test.README +4 -3
- package/scripts/local-web-upgrade-test.example.env +2 -2
- package/scripts/local-web-upgrade-test.sh +14 -1
- package/scripts/pack-gui-and-send-pi.sh +43 -0
- package/scripts/perf/instances.js +1 -1
- package/scripts/prune-open-core-dist.mjs +89 -2
- package/scripts/smoke/hermes-bootstrap.sh +5 -5
- package/templates/hermes-entrypoint.sh +19 -29
- package/apps/openwebui-container.yaml +0 -97
- package/apps/playwright-container.yaml +0 -126
- package/dependencies/jishushell-panel-0.6.5.tgz +0 -0
- package/dist/crypto-shim.d.ts +0 -1
- package/dist/crypto-shim.js +0 -2
- package/dist/crypto-shim.js.map +0 -1
- package/dist/routes/agent-apps.d.ts +0 -14
- package/dist/routes/agent-apps.js +0 -77
- package/dist/routes/agent-apps.js.map +0 -1
- package/dist/routes/internal.d.ts +0 -2
- package/dist/routes/internal.js +0 -55
- package/dist/routes/internal.js.map +0 -1
- package/dist/routes/openclaw-routes.d.ts +0 -22
- package/dist/routes/openclaw-routes.js +0 -1020
- package/dist/routes/openclaw-routes.js.map +0 -1
- package/dist/routes/runtime.d.ts +0 -15
- package/dist/routes/runtime.js +0 -76
- package/dist/routes/runtime.js.map +0 -1
- package/dist/services/agent-apps/catalog.d.ts +0 -33
- package/dist/services/agent-apps/catalog.js +0 -88
- package/dist/services/agent-apps/catalog.js.map +0 -1
- package/dist/services/agent-apps/index.d.ts +0 -36
- package/dist/services/agent-apps/index.js +0 -171
- package/dist/services/agent-apps/index.js.map +0 -1
- package/dist/services/agent-apps/installers/adapter-probes.d.ts +0 -49
- package/dist/services/agent-apps/installers/adapter-probes.js +0 -230
- package/dist/services/agent-apps/installers/adapter-probes.js.map +0 -1
- package/dist/services/agent-apps/installers/adapter.d.ts +0 -30
- package/dist/services/agent-apps/installers/adapter.js +0 -171
- package/dist/services/agent-apps/installers/adapter.js.map +0 -1
- package/dist/services/agent-apps/installers/registry-probe.js.map +0 -1
- package/dist/services/agent-apps/installers/shell-script.d.ts +0 -47
- package/dist/services/agent-apps/installers/shell-script.js +0 -488
- package/dist/services/agent-apps/installers/shell-script.js.map +0 -1
- package/dist/services/agent-apps/types.d.ts +0 -128
- package/dist/services/agent-apps/types.js +0 -17
- package/dist/services/agent-apps/types.js.map +0 -1
- package/dist/services/app/app-compiler.js +0 -185
- package/dist/services/app/app-compiler.js.map +0 -1
- package/dist/services/app/app-manager.d.ts +0 -184
- package/dist/services/app/app-manager.js +0 -2933
- package/dist/services/app/app-manager.js.map +0 -1
- package/dist/services/app/custom-manager.d.ts +0 -27
- package/dist/services/app/custom-manager.js +0 -382
- package/dist/services/app/custom-manager.js.map +0 -1
- package/dist/services/app/hermes-agent-manager.d.ts +0 -20
- package/dist/services/app/hermes-agent-manager.js +0 -299
- package/dist/services/app/hermes-agent-manager.js.map +0 -1
- package/dist/services/app/id-normalizer.d.ts +0 -27
- package/dist/services/app/id-normalizer.js +0 -77
- package/dist/services/app/id-normalizer.js.map +0 -1
- package/dist/services/app/ollama-manager.d.ts +0 -18
- package/dist/services/app/ollama-manager.js +0 -224
- package/dist/services/app/ollama-manager.js.map +0 -1
- package/dist/services/app/openclaw-manager.d.ts +0 -63
- package/dist/services/app/openclaw-manager.js +0 -1215
- package/dist/services/app/openclaw-manager.js.map +0 -1
- package/dist/services/app/paths.d.ts +0 -27
- package/dist/services/app/paths.js +0 -40
- package/dist/services/app/paths.js.map +0 -1
- package/dist/services/app/platform-transform.d.ts +0 -32
- package/dist/services/app/platform-transform.js +0 -65
- package/dist/services/app/platform-transform.js.map +0 -1
- package/dist/services/app/provide-resolver.d.ts +0 -29
- package/dist/services/app/provide-resolver.js +0 -135
- package/dist/services/app/provide-resolver.js.map +0 -1
- package/dist/services/app/registry.d.ts +0 -17
- package/dist/services/app/registry.js +0 -31
- package/dist/services/app/registry.js.map +0 -1
- package/dist/services/app/remote-spec.d.ts +0 -14
- package/dist/services/app/remote-spec.js +0 -58
- package/dist/services/app/remote-spec.js.map +0 -1
- package/dist/services/app/terminal-session-manager.js +0 -157
- package/dist/services/app/terminal-session-manager.js.map +0 -1
- package/dist/services/app/types.d.ts +0 -74
- package/dist/services/app/types.js +0 -16
- package/dist/services/app/types.js.map +0 -1
- package/dist/services/app-config-admin.d.ts +0 -17
- package/dist/services/app-config-admin.js +0 -177
- package/dist/services/app-config-admin.js.map +0 -1
- package/dist/services/app-create-from-installed.d.ts +0 -23
- package/dist/services/app-create-from-installed.js +0 -75
- package/dist/services/app-create-from-installed.js.map +0 -1
- package/dist/services/app-passwords.js +0 -173
- package/dist/services/app-passwords.js.map +0 -1
- package/dist/services/backup-admin.d.ts +0 -101
- package/dist/services/backup-admin.js +0 -259
- package/dist/services/backup-admin.js.map +0 -1
- package/dist/services/backup-manager.d.ts +0 -264
- package/dist/services/backup-manager.js +0 -2263
- package/dist/services/backup-manager.js.map +0 -1
- package/dist/services/backup-verify.js +0 -240
- package/dist/services/backup-verify.js.map +0 -1
- package/dist/services/capability-endpoint-validator.d.ts +0 -41
- package/dist/services/capability-endpoint-validator.js +0 -114
- package/dist/services/capability-endpoint-validator.js.map +0 -1
- package/dist/services/capability-health.d.ts +0 -16
- package/dist/services/capability-health.js +0 -121
- package/dist/services/capability-health.js.map +0 -1
- package/dist/services/capability-registry.d.ts +0 -29
- package/dist/services/capability-registry.js +0 -176
- package/dist/services/capability-registry.js.map +0 -1
- package/dist/services/capability-sync.d.ts +0 -4
- package/dist/services/capability-sync.js +0 -220
- package/dist/services/capability-sync.js.map +0 -1
- package/dist/services/connection-admin.d.ts +0 -74
- package/dist/services/connection-admin.js +0 -287
- package/dist/services/connection-admin.js.map +0 -1
- package/dist/services/connection-apply.d.ts +0 -91
- package/dist/services/connection-apply.js +0 -471
- package/dist/services/connection-apply.js.map +0 -1
- package/dist/services/connection-resolver.d.ts +0 -65
- package/dist/services/connection-resolver.js +0 -281
- package/dist/services/connection-resolver.js.map +0 -1
- package/dist/services/connection-transactor.d.ts +0 -39
- package/dist/services/connection-transactor.js +0 -354
- package/dist/services/connection-transactor.js.map +0 -1
- package/dist/services/core-manager.d.ts +0 -50
- package/dist/services/core-manager.js +0 -411
- package/dist/services/core-manager.js.map +0 -1
- package/dist/services/external-mounts.js +0 -187
- package/dist/services/external-mounts.js.map +0 -1
- package/dist/services/files-manager.d.ts +0 -252
- package/dist/services/files-manager.js +0 -1156
- package/dist/services/files-manager.js.map +0 -1
- package/dist/services/files-mounts.d.ts +0 -42
- package/dist/services/files-mounts.js +0 -207
- package/dist/services/files-mounts.js.map +0 -1
- package/dist/services/instance-admin.d.ts +0 -26
- package/dist/services/instance-admin.js +0 -218
- package/dist/services/instance-admin.js.map +0 -1
- package/dist/services/instance-manager.d.ts +0 -192
- package/dist/services/instance-manager.js +0 -1289
- package/dist/services/instance-manager.js.map +0 -1
- package/dist/services/macos-launchd.js +0 -312
- package/dist/services/macos-launchd.js.map +0 -1
- package/dist/services/nomad-manager.d.ts +0 -307
- package/dist/services/nomad-manager.js +0 -3958
- package/dist/services/nomad-manager.js.map +0 -1
- package/dist/services/organize/applier.js +0 -218
- package/dist/services/organize/applier.js.map +0 -1
- package/dist/services/organize/rules.js +0 -286
- package/dist/services/organize/rules.js.map +0 -1
- package/dist/services/organize/scanner.js +0 -366
- package/dist/services/organize/scanner.js.map +0 -1
- package/dist/services/organize/store.js +0 -82
- package/dist/services/organize/store.js.map +0 -1
- package/dist/services/plugin-installer.js +0 -128
- package/dist/services/plugin-installer.js.map +0 -1
- package/dist/services/process-manager.d.ts +0 -25
- package/dist/services/process-manager.js +0 -568
- package/dist/services/process-manager.js.map +0 -1
- package/dist/services/runtime/adapters/custom.d.ts +0 -20
- package/dist/services/runtime/adapters/custom.js +0 -188
- package/dist/services/runtime/adapters/custom.js.map +0 -1
- package/dist/services/runtime/adapters/hermes.d.ts +0 -204
- package/dist/services/runtime/adapters/hermes.js +0 -1684
- package/dist/services/runtime/adapters/hermes.js.map +0 -1
- package/dist/services/runtime/adapters/openclaw-mcporter.d.ts +0 -45
- package/dist/services/runtime/adapters/openclaw-mcporter.js +0 -108
- package/dist/services/runtime/adapters/openclaw-mcporter.js.map +0 -1
- package/dist/services/runtime/adapters/openclaw.d.ts +0 -426
- package/dist/services/runtime/adapters/openclaw.js +0 -3975
- package/dist/services/runtime/adapters/openclaw.js.map +0 -1
- package/dist/services/runtime/index.d.ts +0 -34
- package/dist/services/runtime/index.js +0 -51
- package/dist/services/runtime/index.js.map +0 -1
- package/dist/services/runtime/mcp-shims/anythingllm-shim.d.ts +0 -46
- package/dist/services/runtime/mcp-shims/anythingllm-shim.js +0 -281
- package/dist/services/runtime/mcp-shims/anythingllm-shim.js.map +0 -1
- package/dist/services/runtime/mcp-shims/drive-shim.js +0 -490
- package/dist/services/runtime/mcp-shims/drive-shim.js.map +0 -1
- package/dist/services/runtime/mcp-shims/jishukb-shim.d.ts +0 -48
- package/dist/services/runtime/mcp-shims/jishukb-shim.js +0 -723
- package/dist/services/runtime/mcp-shims/jishukb-shim.js.map +0 -1
- package/dist/services/runtime/mcp-shims/mcporter-lite.js +0 -276
- package/dist/services/runtime/mcp-shims/mcporter-lite.js.map +0 -1
- package/dist/services/runtime/migrations.d.ts +0 -23
- package/dist/services/runtime/migrations.js +0 -125
- package/dist/services/runtime/migrations.js.map +0 -1
- package/dist/services/runtime/registry.d.ts +0 -13
- package/dist/services/runtime/registry.js +0 -32
- package/dist/services/runtime/registry.js.map +0 -1
- package/dist/services/runtime-identity.d.ts +0 -13
- package/dist/services/runtime-identity.js +0 -166
- package/dist/services/runtime-identity.js.map +0 -1
- package/dist/services/runtime-repair.d.ts +0 -52
- package/dist/services/runtime-repair.js +0 -352
- package/dist/services/runtime-repair.js.map +0 -1
- package/dist/services/setup-manager.d.ts +0 -158
- package/dist/services/setup-manager.js +0 -2740
- package/dist/services/setup-manager.js.map +0 -1
- package/dist/services/suggestions.d.ts +0 -27
- package/dist/services/suggestions.js +0 -133
- package/dist/services/suggestions.js.map +0 -1
- package/dist/services/system-monitor.js +0 -79
- package/dist/services/system-monitor.js.map +0 -1
- package/dist/services/system-ollama-provider.d.ts +0 -14
- package/dist/services/system-ollama-provider.js +0 -125
- package/dist/services/system-ollama-provider.js.map +0 -1
- package/dist/services/system-reconciler.d.ts +0 -72
- package/dist/services/system-reconciler.js +0 -600
- package/dist/services/system-reconciler.js.map +0 -1
- package/dist/services/task-registry.d.ts +0 -44
- package/dist/services/task-registry.js +0 -76
- package/dist/services/task-registry.js.map +0 -1
- package/dist/services/types-shim.d.ts +0 -16
- package/dist/services/types-shim.js +0 -2
- package/dist/services/types-shim.js.map +0 -1
- package/dist/services/update-manager.d.ts +0 -47
- package/dist/services/update-manager.js +0 -351
- package/dist/services/update-manager.js.map +0 -1
- package/dist/services/webdav/server.d.ts +0 -24
- package/dist/services/webdav/server.js +0 -420
- package/dist/services/webdav/server.js.map +0 -1
- package/dist/services/webdav/xml-builder.js.map +0 -1
- package/dist/services/workspace-builder.d.ts +0 -29
- package/dist/services/workspace-builder.js +0 -188
- package/dist/services/workspace-builder.js.map +0 -1
- package/node_modules/@fastify/static/.github/stale.yml +0 -21
- package/node_modules/@isaacs/cliui/LICENSE.md +0 -63
- package/node_modules/@isaacs/cliui/README.md +0 -151
- package/node_modules/@isaacs/cliui/dist/commonjs/ansi-regex/index.d.ts +0 -4
- package/node_modules/@isaacs/cliui/dist/commonjs/ansi-regex/index.d.ts.map +0 -1
- package/node_modules/@isaacs/cliui/dist/commonjs/ansi-regex/index.js +0 -16
- package/node_modules/@isaacs/cliui/dist/commonjs/ansi-regex/index.js.map +0 -1
- package/node_modules/@isaacs/cliui/dist/commonjs/ansi-styles/index.d.ts +0 -34
- package/node_modules/@isaacs/cliui/dist/commonjs/ansi-styles/index.d.ts.map +0 -1
- package/node_modules/@isaacs/cliui/dist/commonjs/ansi-styles/index.js +0 -170
- package/node_modules/@isaacs/cliui/dist/commonjs/ansi-styles/index.js.map +0 -1
- package/node_modules/@isaacs/cliui/dist/commonjs/eastasianwidth/index.d.ts +0 -6
- package/node_modules/@isaacs/cliui/dist/commonjs/eastasianwidth/index.d.ts.map +0 -1
- package/node_modules/@isaacs/cliui/dist/commonjs/eastasianwidth/index.js +0 -307
- package/node_modules/@isaacs/cliui/dist/commonjs/eastasianwidth/index.js.map +0 -1
- package/node_modules/@isaacs/cliui/dist/commonjs/emoji-regex/index.d.ts +0 -2
- package/node_modules/@isaacs/cliui/dist/commonjs/emoji-regex/index.d.ts.map +0 -1
- package/node_modules/@isaacs/cliui/dist/commonjs/emoji-regex/index.js +0 -7
- package/node_modules/@isaacs/cliui/dist/commonjs/emoji-regex/index.js.map +0 -1
- package/node_modules/@isaacs/cliui/dist/commonjs/index.d.ts +0 -41
- package/node_modules/@isaacs/cliui/dist/commonjs/index.d.ts.map +0 -1
- package/node_modules/@isaacs/cliui/dist/commonjs/index.js +0 -322
- package/node_modules/@isaacs/cliui/dist/commonjs/index.js.map +0 -1
- package/node_modules/@isaacs/cliui/dist/commonjs/index.min.js +0 -12
- package/node_modules/@isaacs/cliui/dist/commonjs/index.min.js.map +0 -7
- package/node_modules/@isaacs/cliui/dist/commonjs/package.json +0 -3
- package/node_modules/@isaacs/cliui/dist/commonjs/string-width/index.d.ts +0 -5
- package/node_modules/@isaacs/cliui/dist/commonjs/string-width/index.d.ts.map +0 -1
- package/node_modules/@isaacs/cliui/dist/commonjs/string-width/index.js +0 -49
- package/node_modules/@isaacs/cliui/dist/commonjs/string-width/index.js.map +0 -1
- package/node_modules/@isaacs/cliui/dist/commonjs/strip-ansi/index.d.ts +0 -2
- package/node_modules/@isaacs/cliui/dist/commonjs/strip-ansi/index.d.ts.map +0 -1
- package/node_modules/@isaacs/cliui/dist/commonjs/strip-ansi/index.js +0 -8
- package/node_modules/@isaacs/cliui/dist/commonjs/strip-ansi/index.js.map +0 -1
- package/node_modules/@isaacs/cliui/dist/commonjs/wrap-ansi/index.d.ts +0 -7
- package/node_modules/@isaacs/cliui/dist/commonjs/wrap-ansi/index.d.ts.map +0 -1
- package/node_modules/@isaacs/cliui/dist/commonjs/wrap-ansi/index.js +0 -176
- package/node_modules/@isaacs/cliui/dist/commonjs/wrap-ansi/index.js.map +0 -1
- package/node_modules/@isaacs/cliui/dist/esm/ansi-regex/index.d.ts +0 -4
- package/node_modules/@isaacs/cliui/dist/esm/ansi-regex/index.d.ts.map +0 -1
- package/node_modules/@isaacs/cliui/dist/esm/ansi-regex/index.js +0 -12
- package/node_modules/@isaacs/cliui/dist/esm/ansi-regex/index.js.map +0 -1
- package/node_modules/@isaacs/cliui/dist/esm/ansi-styles/index.d.ts +0 -34
- package/node_modules/@isaacs/cliui/dist/esm/ansi-styles/index.d.ts.map +0 -1
- package/node_modules/@isaacs/cliui/dist/esm/ansi-styles/index.js +0 -167
- package/node_modules/@isaacs/cliui/dist/esm/ansi-styles/index.js.map +0 -1
- package/node_modules/@isaacs/cliui/dist/esm/eastasianwidth/index.d.ts +0 -6
- package/node_modules/@isaacs/cliui/dist/esm/eastasianwidth/index.d.ts.map +0 -1
- package/node_modules/@isaacs/cliui/dist/esm/eastasianwidth/index.js +0 -299
- package/node_modules/@isaacs/cliui/dist/esm/eastasianwidth/index.js.map +0 -1
- package/node_modules/@isaacs/cliui/dist/esm/emoji-regex/index.d.ts +0 -2
- package/node_modules/@isaacs/cliui/dist/esm/emoji-regex/index.d.ts.map +0 -1
- package/node_modules/@isaacs/cliui/dist/esm/emoji-regex/index.js +0 -3
- package/node_modules/@isaacs/cliui/dist/esm/emoji-regex/index.js.map +0 -1
- package/node_modules/@isaacs/cliui/dist/esm/index.d.ts +0 -41
- package/node_modules/@isaacs/cliui/dist/esm/index.d.ts.map +0 -1
- package/node_modules/@isaacs/cliui/dist/esm/index.js +0 -317
- package/node_modules/@isaacs/cliui/dist/esm/index.js.map +0 -1
- package/node_modules/@isaacs/cliui/dist/esm/index.min.js +0 -12
- package/node_modules/@isaacs/cliui/dist/esm/index.min.js.map +0 -7
- package/node_modules/@isaacs/cliui/dist/esm/package.json +0 -3
- package/node_modules/@isaacs/cliui/dist/esm/string-width/index.d.ts +0 -5
- package/node_modules/@isaacs/cliui/dist/esm/string-width/index.d.ts.map +0 -1
- package/node_modules/@isaacs/cliui/dist/esm/string-width/index.js +0 -46
- package/node_modules/@isaacs/cliui/dist/esm/string-width/index.js.map +0 -1
- package/node_modules/@isaacs/cliui/dist/esm/strip-ansi/index.d.ts +0 -2
- package/node_modules/@isaacs/cliui/dist/esm/strip-ansi/index.d.ts.map +0 -1
- package/node_modules/@isaacs/cliui/dist/esm/strip-ansi/index.js +0 -4
- package/node_modules/@isaacs/cliui/dist/esm/strip-ansi/index.js.map +0 -1
- package/node_modules/@isaacs/cliui/dist/esm/wrap-ansi/index.d.ts +0 -7
- package/node_modules/@isaacs/cliui/dist/esm/wrap-ansi/index.d.ts.map +0 -1
- package/node_modules/@isaacs/cliui/dist/esm/wrap-ansi/index.js +0 -172
- package/node_modules/@isaacs/cliui/dist/esm/wrap-ansi/index.js.map +0 -1
- package/node_modules/@isaacs/cliui/package.json +0 -163
- package/node_modules/content-disposition/HISTORY.md +0 -60
- package/node_modules/cross-spawn/LICENSE +0 -21
- package/node_modules/cross-spawn/README.md +0 -89
- package/node_modules/cross-spawn/index.js +0 -39
- package/node_modules/cross-spawn/lib/enoent.js +0 -59
- package/node_modules/cross-spawn/lib/parse.js +0 -91
- package/node_modules/cross-spawn/lib/util/escape.js +0 -47
- package/node_modules/cross-spawn/lib/util/readShebang.js +0 -23
- package/node_modules/cross-spawn/lib/util/resolveCommand.js +0 -52
- package/node_modules/cross-spawn/package.json +0 -73
- package/node_modules/fastify/test/types/content-type-parser.test-d.ts +0 -72
- package/node_modules/fastify/test/types/decorate-request-reply.test-d.ts +0 -18
- package/node_modules/fastify/test/types/dummy-plugin.ts +0 -9
- package/node_modules/fastify/test/types/errors.test-d.ts +0 -90
- package/node_modules/fastify/test/types/fastify.test-d.ts +0 -352
- package/node_modules/fastify/test/types/hooks.test-d.ts +0 -550
- package/node_modules/fastify/test/types/import.ts +0 -2
- package/node_modules/fastify/test/types/instance.test-d.ts +0 -588
- package/node_modules/fastify/test/types/logger.test-d.ts +0 -277
- package/node_modules/fastify/test/types/plugin.test-d.ts +0 -97
- package/node_modules/fastify/test/types/register.test-d.ts +0 -237
- package/node_modules/fastify/test/types/reply.test-d.ts +0 -254
- package/node_modules/fastify/test/types/request.test-d.ts +0 -188
- package/node_modules/fastify/test/types/route.test-d.ts +0 -553
- package/node_modules/fastify/test/types/schema.test-d.ts +0 -135
- package/node_modules/fastify/test/types/serverFactory.test-d.ts +0 -37
- package/node_modules/fastify/test/types/type-provider.test-d.ts +0 -1213
- package/node_modules/fastify/test/types/using.test-d.ts +0 -17
- package/node_modules/foreground-child/LICENSE +0 -15
- package/node_modules/foreground-child/README.md +0 -128
- package/node_modules/foreground-child/dist/commonjs/all-signals.d.ts +0 -2
- package/node_modules/foreground-child/dist/commonjs/all-signals.d.ts.map +0 -1
- package/node_modules/foreground-child/dist/commonjs/all-signals.js +0 -58
- package/node_modules/foreground-child/dist/commonjs/all-signals.js.map +0 -1
- package/node_modules/foreground-child/dist/commonjs/index.d.ts +0 -58
- package/node_modules/foreground-child/dist/commonjs/index.d.ts.map +0 -1
- package/node_modules/foreground-child/dist/commonjs/index.js +0 -123
- package/node_modules/foreground-child/dist/commonjs/index.js.map +0 -1
- package/node_modules/foreground-child/dist/commonjs/package.json +0 -3
- package/node_modules/foreground-child/dist/commonjs/proxy-signals.d.ts +0 -6
- package/node_modules/foreground-child/dist/commonjs/proxy-signals.d.ts.map +0 -1
- package/node_modules/foreground-child/dist/commonjs/proxy-signals.js +0 -38
- package/node_modules/foreground-child/dist/commonjs/proxy-signals.js.map +0 -1
- package/node_modules/foreground-child/dist/commonjs/watchdog.d.ts +0 -10
- package/node_modules/foreground-child/dist/commonjs/watchdog.d.ts.map +0 -1
- package/node_modules/foreground-child/dist/commonjs/watchdog.js +0 -50
- package/node_modules/foreground-child/dist/commonjs/watchdog.js.map +0 -1
- package/node_modules/foreground-child/dist/esm/all-signals.d.ts +0 -2
- package/node_modules/foreground-child/dist/esm/all-signals.d.ts.map +0 -1
- package/node_modules/foreground-child/dist/esm/all-signals.js +0 -52
- package/node_modules/foreground-child/dist/esm/all-signals.js.map +0 -1
- package/node_modules/foreground-child/dist/esm/index.d.ts +0 -58
- package/node_modules/foreground-child/dist/esm/index.d.ts.map +0 -1
- package/node_modules/foreground-child/dist/esm/index.js +0 -115
- package/node_modules/foreground-child/dist/esm/index.js.map +0 -1
- package/node_modules/foreground-child/dist/esm/package.json +0 -3
- package/node_modules/foreground-child/dist/esm/proxy-signals.d.ts +0 -6
- package/node_modules/foreground-child/dist/esm/proxy-signals.d.ts.map +0 -1
- package/node_modules/foreground-child/dist/esm/proxy-signals.js +0 -34
- package/node_modules/foreground-child/dist/esm/proxy-signals.js.map +0 -1
- package/node_modules/foreground-child/dist/esm/watchdog.d.ts +0 -10
- package/node_modules/foreground-child/dist/esm/watchdog.d.ts.map +0 -1
- package/node_modules/foreground-child/dist/esm/watchdog.js +0 -46
- package/node_modules/foreground-child/dist/esm/watchdog.js.map +0 -1
- package/node_modules/foreground-child/package.json +0 -106
- package/node_modules/glob/dist/esm/bin.d.mts +0 -3
- package/node_modules/glob/dist/esm/bin.d.mts.map +0 -1
- package/node_modules/glob/dist/esm/bin.mjs +0 -346
- package/node_modules/glob/dist/esm/bin.mjs.map +0 -1
- package/node_modules/isexe/.npmignore +0 -2
- package/node_modules/isexe/LICENSE +0 -15
- package/node_modules/isexe/README.md +0 -51
- package/node_modules/isexe/index.js +0 -57
- package/node_modules/isexe/mode.js +0 -41
- package/node_modules/isexe/package.json +0 -31
- package/node_modules/isexe/test/basic.js +0 -221
- package/node_modules/isexe/windows.js +0 -42
- package/node_modules/jackspeak/LICENSE.md +0 -55
- package/node_modules/jackspeak/README.md +0 -394
- package/node_modules/jackspeak/dist/commonjs/index.d.ts +0 -323
- package/node_modules/jackspeak/dist/commonjs/index.d.ts.map +0 -1
- package/node_modules/jackspeak/dist/commonjs/index.js +0 -944
- package/node_modules/jackspeak/dist/commonjs/index.js.map +0 -1
- package/node_modules/jackspeak/dist/commonjs/index.min.js +0 -33
- package/node_modules/jackspeak/dist/commonjs/index.min.js.map +0 -7
- package/node_modules/jackspeak/dist/commonjs/package.json +0 -3
- package/node_modules/jackspeak/dist/esm/index.d.ts +0 -323
- package/node_modules/jackspeak/dist/esm/index.d.ts.map +0 -1
- package/node_modules/jackspeak/dist/esm/index.js +0 -936
- package/node_modules/jackspeak/dist/esm/index.js.map +0 -1
- package/node_modules/jackspeak/dist/esm/index.min.js +0 -33
- package/node_modules/jackspeak/dist/esm/index.min.js.map +0 -7
- package/node_modules/jackspeak/dist/esm/package.json +0 -3
- package/node_modules/jackspeak/package.json +0 -115
- package/node_modules/jishushell-panel/output/public/assets/ApiKeyField-D1i7zWXR.js +0 -1
- package/node_modules/jishushell-panel/output/public/assets/Dashboard-sWIvL43F.js +0 -1
- package/node_modules/jishushell-panel/output/public/assets/HermesChatPanel-DQ8RyvQY.js +0 -1
- package/node_modules/jishushell-panel/output/public/assets/HermesConfigForm-tIbPP1sB.js +0 -4
- package/node_modules/jishushell-panel/output/public/assets/InitPassword-C3Slq3Dd.js +0 -1
- package/node_modules/jishushell-panel/output/public/assets/InstanceDetail-7JqY9tq4.js +0 -92
- package/node_modules/jishushell-panel/output/public/assets/Login-BXLDJlQN.js +0 -1
- package/node_modules/jishushell-panel/output/public/assets/NewInstance-dLc5Xrpx.js +0 -1
- package/node_modules/jishushell-panel/output/public/assets/ProviderRecommendations-DIAXxesl.js +0 -1
- package/node_modules/jishushell-panel/output/public/assets/Settings-Bd5utbBh.js +0 -1
- package/node_modules/jishushell-panel/output/public/assets/Setup-Yn9_20FL.js +0 -1
- package/node_modules/jishushell-panel/output/public/assets/WeixinLoginPanel-C21doQTJ.js +0 -9
- package/node_modules/jishushell-panel/output/public/assets/index-CCkaIEjn.js +0 -20
- package/node_modules/jishushell-panel/output/public/assets/index-D7qxy-Vh.css +0 -1
- package/node_modules/jishushell-panel/output/public/assets/registry-B2ZQZXWL.js +0 -2
- package/node_modules/jishushell-panel/output/public/assets/usePolling-BFZm4do_.js +0 -1
- package/node_modules/jishushell-panel/output/public/assets/vendor-i18n-DqPtOicc.js +0 -9
- package/node_modules/jishushell-panel/output/public/assets/vendor-react-DW5juQin.js +0 -59
- package/node_modules/package-json-from-dist/LICENSE.md +0 -63
- package/node_modules/package-json-from-dist/README.md +0 -110
- package/node_modules/package-json-from-dist/dist/commonjs/index.d.ts +0 -89
- package/node_modules/package-json-from-dist/dist/commonjs/index.d.ts.map +0 -1
- package/node_modules/package-json-from-dist/dist/commonjs/index.js +0 -134
- package/node_modules/package-json-from-dist/dist/commonjs/index.js.map +0 -1
- package/node_modules/package-json-from-dist/dist/commonjs/package.json +0 -3
- package/node_modules/package-json-from-dist/dist/esm/index.d.ts +0 -89
- package/node_modules/package-json-from-dist/dist/esm/index.d.ts.map +0 -1
- package/node_modules/package-json-from-dist/dist/esm/index.js +0 -129
- package/node_modules/package-json-from-dist/dist/esm/index.js.map +0 -1
- package/node_modules/package-json-from-dist/dist/esm/package.json +0 -3
- package/node_modules/package-json-from-dist/package.json +0 -68
- package/node_modules/path-key/index.d.ts +0 -40
- package/node_modules/path-key/index.js +0 -16
- package/node_modules/path-key/license +0 -9
- package/node_modules/path-key/package.json +0 -39
- package/node_modules/path-key/readme.md +0 -61
- package/node_modules/safe-buffer/LICENSE +0 -21
- package/node_modules/safe-buffer/README.md +0 -584
- package/node_modules/safe-buffer/index.d.ts +0 -187
- package/node_modules/safe-buffer/index.js +0 -65
- package/node_modules/safe-buffer/package.json +0 -51
- package/node_modules/shebang-command/index.js +0 -19
- package/node_modules/shebang-command/license +0 -9
- package/node_modules/shebang-command/package.json +0 -34
- package/node_modules/shebang-command/readme.md +0 -34
- package/node_modules/shebang-regex/index.d.ts +0 -22
- package/node_modules/shebang-regex/index.js +0 -2
- package/node_modules/shebang-regex/license +0 -9
- package/node_modules/shebang-regex/package.json +0 -35
- package/node_modules/shebang-regex/readme.md +0 -33
- package/node_modules/signal-exit/LICENSE.txt +0 -16
- package/node_modules/signal-exit/README.md +0 -74
- package/node_modules/signal-exit/dist/cjs/browser.d.ts +0 -12
- package/node_modules/signal-exit/dist/cjs/browser.d.ts.map +0 -1
- package/node_modules/signal-exit/dist/cjs/browser.js +0 -10
- package/node_modules/signal-exit/dist/cjs/browser.js.map +0 -1
- package/node_modules/signal-exit/dist/cjs/index.d.ts +0 -48
- package/node_modules/signal-exit/dist/cjs/index.d.ts.map +0 -1
- package/node_modules/signal-exit/dist/cjs/index.js +0 -279
- package/node_modules/signal-exit/dist/cjs/index.js.map +0 -1
- package/node_modules/signal-exit/dist/cjs/package.json +0 -3
- package/node_modules/signal-exit/dist/cjs/signals.d.ts +0 -29
- package/node_modules/signal-exit/dist/cjs/signals.d.ts.map +0 -1
- package/node_modules/signal-exit/dist/cjs/signals.js +0 -42
- package/node_modules/signal-exit/dist/cjs/signals.js.map +0 -1
- package/node_modules/signal-exit/dist/mjs/browser.d.ts +0 -12
- package/node_modules/signal-exit/dist/mjs/browser.d.ts.map +0 -1
- package/node_modules/signal-exit/dist/mjs/browser.js +0 -4
- package/node_modules/signal-exit/dist/mjs/browser.js.map +0 -1
- package/node_modules/signal-exit/dist/mjs/index.d.ts +0 -48
- package/node_modules/signal-exit/dist/mjs/index.d.ts.map +0 -1
- package/node_modules/signal-exit/dist/mjs/index.js +0 -275
- package/node_modules/signal-exit/dist/mjs/index.js.map +0 -1
- package/node_modules/signal-exit/dist/mjs/package.json +0 -3
- package/node_modules/signal-exit/dist/mjs/signals.d.ts +0 -29
- package/node_modules/signal-exit/dist/mjs/signals.d.ts.map +0 -1
- package/node_modules/signal-exit/dist/mjs/signals.js +0 -39
- package/node_modules/signal-exit/dist/mjs/signals.js.map +0 -1
- package/node_modules/signal-exit/package.json +0 -106
- package/node_modules/which/CHANGELOG.md +0 -166
- package/node_modules/which/LICENSE +0 -15
- package/node_modules/which/README.md +0 -54
- package/node_modules/which/bin/node-which +0 -52
- package/node_modules/which/package.json +0 -43
- package/node_modules/which/which.js +0 -125
- package/scripts/check-adapter-isolation.ts +0 -293
- /package/dist/services/{app → app-common}/app-compiler.d.ts +0 -0
- /package/dist/services/{app → app-common}/terminal-session-manager.d.ts +0 -0
- /package/dist/services/{backup-verify.d.ts → backup/backup-verify.d.ts} +0 -0
- /package/dist/services/{external-mounts.d.ts → files/external-mounts.d.ts} +0 -0
- /package/dist/services/{organize → files/organize}/applier.d.ts +0 -0
- /package/dist/services/{organize → files/organize}/rules.d.ts +0 -0
- /package/dist/services/{organize → files/organize}/scanner.d.ts +0 -0
- /package/dist/services/{organize → files/organize}/store.d.ts +0 -0
- /package/dist/services/{webdav → files/webdav}/xml-builder.d.ts +0 -0
- /package/dist/services/{webdav → files/webdav}/xml-builder.js +0 -0
- /package/dist/services/{app-passwords.d.ts → instances/passwords.d.ts} +0 -0
- /package/dist/services/{agent-apps → integrations/installable}/installers/registry-probe.d.ts +0 -0
- /package/dist/services/{agent-apps → integrations/installable}/installers/registry-probe.js +0 -0
- /package/dist/services/{runtime/mcp-shims → integrations/openclaw}/drive-shim.d.ts +0 -0
- /package/dist/services/{runtime/mcp-shims → integrations/openclaw}/mcporter-lite.d.ts +0 -0
- /package/dist/services/{plugin-installer.d.ts → setup/plugin-installer.d.ts} +0 -0
- /package/dist/services/{macos-launchd.d.ts → system/macos-launchd.d.ts} +0 -0
- /package/dist/services/{system-monitor.d.ts → system/system-monitor.d.ts} +0 -0
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Layer 2 — resolveConnections (§6.3 of the app interconnection design).
|
|
3
|
+
*
|
|
4
|
+
* Drop-in replacement for the legacy `capability-service.resolveRequires(spec)`.
|
|
5
|
+
* The new function takes both the consumer spec and the consumer instance
|
|
6
|
+
* (so it can read `instance.connections` UI bindings), and runs in one of
|
|
7
|
+
* two modes:
|
|
8
|
+
*
|
|
9
|
+
* - "preCreate": install / clone / summary path. It resolves
|
|
10
|
+
* only canonical `instance.connections` bindings and collects unbound
|
|
11
|
+
* slots into `pending`; it never guesses a provider from the registry.
|
|
12
|
+
* - "runtime": startInstance path. Persisted bindings are honored; required
|
|
13
|
+
* slots without a persisted binding throw a connection error instead of
|
|
14
|
+
* picking a provider from the registry; mismatched bindings throw
|
|
15
|
+
* `INVALID_BINDING (400)`.
|
|
16
|
+
*
|
|
17
|
+
* The return shape `{ resolved, pending }` lets each caller decide what to
|
|
18
|
+
* do (write env, throw, write to task event for UI display).
|
|
19
|
+
*
|
|
20
|
+
* Step 4 boundary: runtime/status/proxy/capability hot paths must not use the
|
|
21
|
+
* capability registry as a fallback fact source. The only remaining automatic
|
|
22
|
+
* binding behavior lives in `materializeInstallTimeConnections()`, which writes
|
|
23
|
+
* an explicit `instance.connections` snapshot during create/install.
|
|
24
|
+
*
|
|
25
|
+
* `instance.connections` is a Core-managed binding fact ("which consumer slot
|
|
26
|
+
* is bound to which provider capability"). It is not runtime attestation that
|
|
27
|
+
* the app is currently using the delivered env/proxy token/key; app-local
|
|
28
|
+
* provider settings remain unmanaged unless an integration reconciles them.
|
|
29
|
+
*/
|
|
30
|
+
import * as capabilityRegistry from "../capabilities/registry.js";
|
|
31
|
+
import { capabilityMatchesRequire, categoryFromCapabilityName, isCategoryToken as isCapabilityKindToken, isContractRequire, providerKindFromCapabilityName, resolveCapabilityContract, } from "../capabilities/contract.js";
|
|
32
|
+
// ── Category whitelist (§4.1) ────────────────────────────────────────────
|
|
33
|
+
export function isCategoryToken(s) {
|
|
34
|
+
return isCapabilityKindToken(s);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Extract the category of a provide-side capability name. Returns the
|
|
38
|
+
* category token when the name is `<token>-something`; null for legacy exact
|
|
39
|
+
* names like `ollama-api`.
|
|
40
|
+
*/
|
|
41
|
+
export function categoryFromProviderCapability(cap) {
|
|
42
|
+
return categoryFromCapabilityName(cap);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* For LLM `proxy-upstream` mode: convert a provide capability like
|
|
46
|
+
* `llm-ollama` to the providerKind token (`ollama` / `vllm` / `sglang` /
|
|
47
|
+
* `custom`) the embedded llm-proxy expects on `x-jishushell.proxy.upstream.providerId`.
|
|
48
|
+
*/
|
|
49
|
+
export function providerKindFromCapability(cap) {
|
|
50
|
+
return providerKindFromCapabilityName(cap);
|
|
51
|
+
}
|
|
52
|
+
// ── Errors with stable code field ────────────────────────────────────────
|
|
53
|
+
export class ConnectionError extends Error {
|
|
54
|
+
code;
|
|
55
|
+
statusCode;
|
|
56
|
+
details;
|
|
57
|
+
constructor(code, statusCode, message, details) {
|
|
58
|
+
super(message);
|
|
59
|
+
this.code = code;
|
|
60
|
+
this.statusCode = statusCode;
|
|
61
|
+
if (details)
|
|
62
|
+
this.details = details;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
// ── validateBoundEntries (§6.3) ──────────────────────────────────────────
|
|
66
|
+
export function entryMatchesRequire(req, entry) {
|
|
67
|
+
return capabilityMatchesRequire(req, entry);
|
|
68
|
+
}
|
|
69
|
+
function validateBoundEntries(req, entries) {
|
|
70
|
+
const cardinality = req.cardinality ?? "one";
|
|
71
|
+
for (const entry of entries) {
|
|
72
|
+
if (!entryMatchesRequire(req, entry)) {
|
|
73
|
+
throw new ConnectionError("INVALID_BINDING", 400, `Slot '${req.inject_as}' bound to provider '${entry.instanceId}' with capability '${entry.capability}', which does not match require '${req.capability}'`, { slot: req.inject_as, expected: req.capability, got: entry.capability });
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
if (cardinality === "one" && entries.length !== 1) {
|
|
77
|
+
throw new ConnectionError("INVALID_BINDING", 400, `Slot '${req.inject_as}' has cardinality:one but ${entries.length} providers bound`, { slot: req.inject_as, count: entries.length });
|
|
78
|
+
}
|
|
79
|
+
if (cardinality === "many" && entries.length === 0) {
|
|
80
|
+
throw new ConnectionError("INVALID_BINDING", 400, `Slot '${req.inject_as}' has cardinality:many but no providers bound`, { slot: req.inject_as });
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
// ── Helpers for category derivation ─────────────────────────────────────
|
|
84
|
+
function categoryFor(req, entries) {
|
|
85
|
+
const reqContract = resolveCapabilityContract(req);
|
|
86
|
+
if (reqContract)
|
|
87
|
+
return reqContract.kind;
|
|
88
|
+
for (const e of entries) {
|
|
89
|
+
if (e.kind)
|
|
90
|
+
return e.kind;
|
|
91
|
+
const cat = categoryFromProviderCapability(e.capability);
|
|
92
|
+
if (cat)
|
|
93
|
+
return cat;
|
|
94
|
+
}
|
|
95
|
+
return "default";
|
|
96
|
+
}
|
|
97
|
+
function allRegistryEntries() {
|
|
98
|
+
return Object.values(capabilityRegistry.snapshot().providersByCapability ?? {}).flatMap((list) => list);
|
|
99
|
+
}
|
|
100
|
+
function enumerateCandidatesForRequire(req) {
|
|
101
|
+
const seen = new Set();
|
|
102
|
+
const out = [];
|
|
103
|
+
for (const entry of allRegistryEntries()) {
|
|
104
|
+
if (!entryMatchesRequire(req, entry))
|
|
105
|
+
continue;
|
|
106
|
+
const key = `${entry.instanceId}\0${entry.capability}`;
|
|
107
|
+
if (seen.has(key))
|
|
108
|
+
continue;
|
|
109
|
+
seen.add(key);
|
|
110
|
+
out.push(entry);
|
|
111
|
+
}
|
|
112
|
+
return out;
|
|
113
|
+
}
|
|
114
|
+
// ── Main API ─────────────────────────────────────────────────────────────
|
|
115
|
+
/**
|
|
116
|
+
* Resolve all `requires` on `spec` against the registry + the instance's
|
|
117
|
+
* persisted bindings.
|
|
118
|
+
*
|
|
119
|
+
* @param spec Consumer app spec (`requires[]` is the input)
|
|
120
|
+
* @param instance Consumer app instance shape — may be a stub
|
|
121
|
+
* `{ connections: {} }` during clone / install
|
|
122
|
+
* (preCreate mode) or the live instance.json (runtime).
|
|
123
|
+
* @param mode Affects error semantics: preCreate never throws on
|
|
124
|
+
* missing/ambiguous; runtime throws.
|
|
125
|
+
*/
|
|
126
|
+
export function resolveConnections(spec, instance, mode) {
|
|
127
|
+
const resolved = [];
|
|
128
|
+
const pending = [];
|
|
129
|
+
if (!spec.requires || spec.requires.length === 0) {
|
|
130
|
+
return { resolved, pending };
|
|
131
|
+
}
|
|
132
|
+
const connectionsMap = instance.connections ?? {};
|
|
133
|
+
for (const req of spec.requires) {
|
|
134
|
+
const isRequired = req.required !== false;
|
|
135
|
+
const cardinality = req.cardinality ?? "one";
|
|
136
|
+
const persisted = connectionsMap[req.inject_as];
|
|
137
|
+
// ── User explicit disconnect ───────────────────────────────────────
|
|
138
|
+
if (persisted === null) {
|
|
139
|
+
if (isRequired && mode === "runtime") {
|
|
140
|
+
throw new ConnectionError("MISSING_REQUIRED_CONNECTION", 412, `Required connection '${req.inject_as}' (${req.capability}) is explicitly disconnected`, { slot: req.inject_as, capability: req.capability });
|
|
141
|
+
}
|
|
142
|
+
pending.push({
|
|
143
|
+
slot: req.inject_as,
|
|
144
|
+
capability: req.capability,
|
|
145
|
+
required: isRequired,
|
|
146
|
+
reason: "user-disconnected",
|
|
147
|
+
});
|
|
148
|
+
continue;
|
|
149
|
+
}
|
|
150
|
+
// ── User-driven binding (UI) ───────────────────────────────────────
|
|
151
|
+
if (persisted) {
|
|
152
|
+
const entries = collectEntriesFromBinding(persisted);
|
|
153
|
+
validateBoundEntries(req, entries);
|
|
154
|
+
// Status check (running) — preCreate skips since instance not yet
|
|
155
|
+
// alive, runtime requires running provider.
|
|
156
|
+
if (mode === "runtime") {
|
|
157
|
+
for (const entry of entries) {
|
|
158
|
+
if (entry.status !== "running") {
|
|
159
|
+
throw new ConnectionError("PROVIDER_NOT_RUNNING", 409, `Provider '${entry.instanceId}' for slot '${req.inject_as}' is not running (status=${entry.status})`, { slot: req.inject_as, providerId: entry.instanceId, status: entry.status });
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
resolved.push({
|
|
164
|
+
slot: req.inject_as,
|
|
165
|
+
capability: req.capability,
|
|
166
|
+
category: categoryFor(req, entries),
|
|
167
|
+
required: isRequired,
|
|
168
|
+
apply: req.apply,
|
|
169
|
+
cardinality,
|
|
170
|
+
entries,
|
|
171
|
+
source: "persisted-binding",
|
|
172
|
+
});
|
|
173
|
+
continue;
|
|
174
|
+
}
|
|
175
|
+
const candidates = enumerateCandidatesForRequire(req);
|
|
176
|
+
const running = candidates.filter((entry) => entry.status === "running");
|
|
177
|
+
if (running.length > 1) {
|
|
178
|
+
if (isRequired && mode === "runtime") {
|
|
179
|
+
throw new ConnectionError("AMBIGUOUS_CONNECTION", 409, `Slot '${req.inject_as}' (${req.capability}) has ${running.length} candidates; user must pick one in Connections tab`, { slot: req.inject_as, capability: req.capability, count: running.length });
|
|
180
|
+
}
|
|
181
|
+
pending.push({
|
|
182
|
+
slot: req.inject_as,
|
|
183
|
+
capability: req.capability,
|
|
184
|
+
required: isRequired,
|
|
185
|
+
reason: "ambiguous",
|
|
186
|
+
});
|
|
187
|
+
continue;
|
|
188
|
+
}
|
|
189
|
+
if (running.length === 1 || candidates.length > 0) {
|
|
190
|
+
// A provider exists but there is no canonical binding. This is not a
|
|
191
|
+
// runtime fact: start/proxy/status must not silently pick it. The user
|
|
192
|
+
// (or install/create materialization) must write `instance.connections`.
|
|
193
|
+
if (isRequired && mode === "runtime") {
|
|
194
|
+
throw new ConnectionError("USER_SELECTION_REQUIRED", 409, `Required slot '${req.inject_as}' (${req.capability}) has candidate provider(s); user must bind in Connections tab`, { slot: req.inject_as, capability: req.capability, count: candidates.length });
|
|
195
|
+
}
|
|
196
|
+
pending.push({
|
|
197
|
+
slot: req.inject_as,
|
|
198
|
+
capability: req.capability,
|
|
199
|
+
required: isRequired,
|
|
200
|
+
reason: "needs-ui-binding",
|
|
201
|
+
});
|
|
202
|
+
continue;
|
|
203
|
+
}
|
|
204
|
+
// No candidates at all.
|
|
205
|
+
if (isRequired && mode === "runtime") {
|
|
206
|
+
throw new ConnectionError("MISSING_REQUIRED_CONNECTION", 412, `Required connection '${req.inject_as}' (${req.capability}) has no candidates`, { slot: req.inject_as, capability: req.capability });
|
|
207
|
+
}
|
|
208
|
+
pending.push({
|
|
209
|
+
slot: req.inject_as,
|
|
210
|
+
capability: req.capability,
|
|
211
|
+
required: isRequired,
|
|
212
|
+
reason: "no-candidate",
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
return { resolved, pending };
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Create/install boundary only.
|
|
219
|
+
*
|
|
220
|
+
* This preserves the old "single running exact provider works out of the box"
|
|
221
|
+
* UX by materializing it into `instance.connections` before the instance is
|
|
222
|
+
* first persisted. The materialized connection becomes the canonical fact that
|
|
223
|
+
* later runtime/status/proxy/capability paths read. Do not call this from hot
|
|
224
|
+
* paths: registry enumeration here is a one-shot install-time convenience, not
|
|
225
|
+
* a new fallback source of truth.
|
|
226
|
+
*/
|
|
227
|
+
export function materializeInstallTimeConnections(spec, existingConnections = {}) {
|
|
228
|
+
const connections = { ...existingConnections };
|
|
229
|
+
for (const req of spec.requires ?? []) {
|
|
230
|
+
if (Object.prototype.hasOwnProperty.call(connections, req.inject_as))
|
|
231
|
+
continue;
|
|
232
|
+
if (isContractRequire(req))
|
|
233
|
+
continue;
|
|
234
|
+
const running = enumerateCandidatesForRequire(req)
|
|
235
|
+
.filter((entry) => entry.status === "running");
|
|
236
|
+
if (running.length !== 1)
|
|
237
|
+
continue;
|
|
238
|
+
const selected = running[0];
|
|
239
|
+
connections[req.inject_as] =
|
|
240
|
+
(req.cardinality ?? "one") === "many"
|
|
241
|
+
? { kind: "many", providers: [{ providerId: selected.instanceId, capability: selected.capability }] }
|
|
242
|
+
: { kind: "single", providerId: selected.instanceId, capability: selected.capability };
|
|
243
|
+
}
|
|
244
|
+
const result = resolveConnections(spec, { connections }, "preCreate");
|
|
245
|
+
return { connections, ...result };
|
|
246
|
+
}
|
|
247
|
+
function collectEntriesFromBinding(binding) {
|
|
248
|
+
if (!binding)
|
|
249
|
+
return [];
|
|
250
|
+
if (binding.kind === "single") {
|
|
251
|
+
const entry = capabilityRegistry.getProviderEntry(binding.providerId, binding.capability);
|
|
252
|
+
if (entry)
|
|
253
|
+
return [entry];
|
|
254
|
+
throw new ConnectionError("INVALID_PROVIDER_ID", 400, `Bound providerId '${binding.providerId}' (capability '${binding.capability}') not found in registry`, { providerId: binding.providerId, capability: binding.capability });
|
|
255
|
+
}
|
|
256
|
+
// many
|
|
257
|
+
const entries = [];
|
|
258
|
+
const missing = [];
|
|
259
|
+
for (const ref of binding.providers ?? []) {
|
|
260
|
+
const entry = capabilityRegistry.getProviderEntry(ref.providerId, ref.capability);
|
|
261
|
+
if (entry)
|
|
262
|
+
entries.push(entry);
|
|
263
|
+
else
|
|
264
|
+
missing.push(ref);
|
|
265
|
+
}
|
|
266
|
+
if (missing.length > 0) {
|
|
267
|
+
throw new ConnectionError("INVALID_PROVIDER_ID", 400, `${missing.length} bound providers not found in registry`, { missing });
|
|
268
|
+
}
|
|
269
|
+
return entries;
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Convenience helper: resolved → flat env map (for default-ENV legacy
|
|
273
|
+
* fallback path used in install Phase 1, see §6.4 lazy materialization).
|
|
274
|
+
* Only entries with category=="default" are projected; LLM/MCP/Search/Browser
|
|
275
|
+
* categories use their own apply hooks (PR 4) and are skipped here.
|
|
276
|
+
*/
|
|
277
|
+
export function resolvedToLegacyEnv(resolved) {
|
|
278
|
+
const out = {};
|
|
279
|
+
for (const r of resolved) {
|
|
280
|
+
if (r.category !== "default")
|
|
281
|
+
continue;
|
|
282
|
+
if (r.entries.length === 0)
|
|
283
|
+
continue;
|
|
284
|
+
// For multi-entry default ENV: join addresses with comma (rare path).
|
|
285
|
+
out[r.slot] = r.entries.map((e) => e.address).join(",");
|
|
286
|
+
}
|
|
287
|
+
return out;
|
|
288
|
+
}
|
|
289
|
+
//# sourceMappingURL=resolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolver.js","sourceRoot":"","sources":["../../../src/services/connections/resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,KAAK,kBAAkB,MAAM,6BAA6B,CAAC;AAQlE,OAAO,EACL,wBAAwB,EACxB,0BAA0B,EAC1B,eAAe,IAAI,qBAAqB,EACxC,iBAAiB,EACjB,8BAA8B,EAC9B,yBAAyB,GAC1B,MAAM,6BAA6B,CAAC;AAErC,4EAA4E;AAE5E,MAAM,UAAU,eAAe,CAAC,CAAS;IACvC,OAAO,qBAAqB,CAAC,CAAC,CAAC,CAAC;AAClC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,8BAA8B,CAAC,GAAW;IACx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,0 +1,39 @@
|
|
|
1
|
+
import type { ResolvedConnection } from "./resolver.js";
|
|
2
|
+
import type { ApplyContext } from "./apply.js";
|
|
3
|
+
import type { AppSpec, InstanceConnections } from "../../types.js";
|
|
4
|
+
import type { AppInstance } from "../instances/types.js";
|
|
5
|
+
export interface TransactorInput {
|
|
6
|
+
instance: AppInstance;
|
|
7
|
+
spec: AppSpec;
|
|
8
|
+
newConnections: InstanceConnections;
|
|
9
|
+
/** Persist instance.json — supplied by caller (route handler). */
|
|
10
|
+
saveInstanceJson: (id: string, mutator: (cur: AppInstance) => AppInstance) => Promise<void>;
|
|
11
|
+
readInstanceJson: (id: string) => Promise<AppInstance>;
|
|
12
|
+
/** AppIntegration for integration-managed consumers; null for generic apps. */
|
|
13
|
+
integration: ApplyContext["integration"];
|
|
14
|
+
}
|
|
15
|
+
export interface TransactorResult {
|
|
16
|
+
resolved: ResolvedConnection[];
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Raw-bytes snapshot of a side-effect file. `bytes === null` means the file
|
|
20
|
+
* did not exist at snapshot time — rollback should `unlink` it.
|
|
21
|
+
*/
|
|
22
|
+
interface FileSnapshot {
|
|
23
|
+
path: string;
|
|
24
|
+
bytes: Buffer | null;
|
|
25
|
+
/** Set when the file existed but could not be read (e.g. EACCES). Rollback skips these entries to avoid destroying data. */
|
|
26
|
+
readError?: boolean;
|
|
27
|
+
}
|
|
28
|
+
export declare function applyConnections(input: TransactorInput): Promise<TransactorResult>;
|
|
29
|
+
/**
|
|
30
|
+
* Test-only export so unit tests can exercise the snapshot/restore path
|
|
31
|
+
* without spinning up the full transactor. Production code should not
|
|
32
|
+
* import these names directly.
|
|
33
|
+
*/
|
|
34
|
+
export declare const __testing__: {
|
|
35
|
+
snapshotSideEffectFiles: (paths: string[]) => FileSnapshot[];
|
|
36
|
+
applyFileSnapshots: (snapshots: FileSnapshot[]) => void;
|
|
37
|
+
validateResolvedEndpoints: (resolved: ResolvedConnection[]) => Promise<void>;
|
|
38
|
+
};
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* connection-transactor — PUT /connections atomic 5-step flow (§10.3).
|
|
3
|
+
*
|
|
4
|
+
* 1. Validate — resolveConnections runtime mode + per-binding checks
|
|
5
|
+
* 2. Snapshot — capture instance.json plus the integration-declared
|
|
6
|
+
* private files that connection hooks may modify.
|
|
7
|
+
* 3. Apply hooks — invoke PERSIST_HOOKS for each resolved binding in
|
|
8
|
+
* deterministic order (default-env → search → browser
|
|
9
|
+
* → llm). On any failure, jump to step 5.
|
|
10
|
+
* 4. Persist — read-modify-write instance.json: replace `connections`
|
|
11
|
+
* map only, keep other fields (notably the
|
|
12
|
+
* `connections-env` written by step 3 hooks for generic
|
|
13
|
+
* apps without an integration).
|
|
14
|
+
* 5. Rollback — reverse-order recovery from snapshots: restore each
|
|
15
|
+
* side-effect file (or unlink if it didn't exist
|
|
16
|
+
* pre-apply) before restoring instance.json.
|
|
17
|
+
*
|
|
18
|
+
* Returns either { ok: true, resolved, pending } or a structured error.
|
|
19
|
+
*/
|
|
20
|
+
import { existsSync, readFileSync, writeFileSync, unlinkSync, mkdirSync } from "node:fs";
|
|
21
|
+
import { dirname } from "node:path";
|
|
22
|
+
import { resolveConnections, ConnectionError } from "./resolver.js";
|
|
23
|
+
import { PERSIST_HOOKS, UNPERSIST_HOOKS, toIntegrationConnectionBinding } from "./apply.js";
|
|
24
|
+
import { categoryFromProviderCapability } from "./resolver.js";
|
|
25
|
+
import { resolveCapabilityContract } from "../capabilities/contract.js";
|
|
26
|
+
import * as capabilityRegistry from "../capabilities/registry.js";
|
|
27
|
+
import { withInstanceLock } from "../../utils/instance-lock.js";
|
|
28
|
+
const APPLY_ORDER = ["default", "search", "browser", "llm"];
|
|
29
|
+
export async function applyConnections(input) {
|
|
30
|
+
// Serialize against startInstance/stopInstance/restartInstance on the same consumer
|
|
31
|
+
// instance. Without this, a concurrent stop can flip a bound provider
|
|
32
|
+
// to status:stopped between Validate (step 1) and Apply (step 3),
|
|
33
|
+
// leaving instance.json + side-effect files inconsistent.
|
|
34
|
+
return withInstanceLock(input.instance.id, () => applyConnectionsImpl(input));
|
|
35
|
+
}
|
|
36
|
+
async function applyConnectionsImpl(input) {
|
|
37
|
+
const { instance, spec, newConnections, saveInstanceJson, readInstanceJson, integration } = input;
|
|
38
|
+
// ── Step 1: Validate ──────────────────────────────────────────────────
|
|
39
|
+
// Resolve the *new* connections in runtime mode so missing-required /
|
|
40
|
+
// ambiguous / invalid-binding all surface as ConnectionError before we
|
|
41
|
+
// touch any state.
|
|
42
|
+
const candidate = {
|
|
43
|
+
...instance,
|
|
44
|
+
connections: newConnections,
|
|
45
|
+
};
|
|
46
|
+
const { resolved } = resolveConnections(spec, candidate, "runtime");
|
|
47
|
+
// ── Step 1d: validateCapabilityEndpoint per binding (§12) ─────────────
|
|
48
|
+
// Catches registry tampering / drift before any persist hook fires:
|
|
49
|
+
// - Fresh re-resolve must match the registry entry (host/port/path)
|
|
50
|
+
// - Provider host must be on loopback or LAN
|
|
51
|
+
// - Protocol must be in the category whitelist
|
|
52
|
+
// Only applies to entries whose provider spec we can resolve; legacy
|
|
53
|
+
// instances without a synthesized spec degrade gracefully (skip).
|
|
54
|
+
await validateResolvedEndpoints(resolved);
|
|
55
|
+
// ── Step 2: Snapshot ──────────────────────────────────────────────────
|
|
56
|
+
// The transaction controls when snapshots happen; each integration owns
|
|
57
|
+
// the list of private files its connection hooks may mutate.
|
|
58
|
+
const snapshot = {
|
|
59
|
+
instanceJson: await readInstanceJson(instance.id),
|
|
60
|
+
files: snapshotSideEffectFiles(integration?.listConnectionSideEffectFiles?.({
|
|
61
|
+
instanceId: instance.id,
|
|
62
|
+
bindings: resolved.map(toIntegrationConnectionBinding),
|
|
63
|
+
}) ?? []),
|
|
64
|
+
};
|
|
65
|
+
// ── Step 2b: Compute shrunk slots ─────────────────────────────────────
|
|
66
|
+
// PERSIST_HOOKS only sees slots that *currently* have a binding. When
|
|
67
|
+
// the user removes a binding (sets the slot to null or drops it from the
|
|
68
|
+
// map) we need to undo the durable state the prior persist hook wrote —
|
|
69
|
+
// otherwise unbinding LLM_ENDPOINT leaves x-jishushell.proxy.upstream
|
|
70
|
+
// pointing at the gone provider, etc. `shrunkSlots` enumerates exactly
|
|
71
|
+
// those: present-and-non-null in the on-disk connections, missing or
|
|
72
|
+
// null in `newConnections`.
|
|
73
|
+
const previousConnections = (snapshot.instanceJson?.connections ?? {});
|
|
74
|
+
const shrunkSlots = [];
|
|
75
|
+
for (const [slot, prior] of Object.entries(previousConnections)) {
|
|
76
|
+
if (prior == null)
|
|
77
|
+
continue; // already empty — nothing to undo
|
|
78
|
+
const next = newConnections?.[slot];
|
|
79
|
+
if (next != null)
|
|
80
|
+
continue; // still bound (or rebound) — persist hook handles it
|
|
81
|
+
const req = spec.requires?.find((r) => r.inject_as === slot);
|
|
82
|
+
const cap = req?.capability ?? "";
|
|
83
|
+
const contractKind = req ? resolveCapabilityContract(req)?.kind : null;
|
|
84
|
+
const fromToken = contractKind && UNPERSIST_HOOKS[contractKind]
|
|
85
|
+
? contractKind
|
|
86
|
+
: cap && (UNPERSIST_HOOKS[cap] ? cap : null);
|
|
87
|
+
const fromProvide = !fromToken ? categoryFromProviderCapability(cap) : null;
|
|
88
|
+
shrunkSlots.push({ slot, category: fromToken ?? fromProvide ?? "default" });
|
|
89
|
+
}
|
|
90
|
+
// ── Step 3: Apply hooks ───────────────────────────────────────────────
|
|
91
|
+
const ctx = makeApplyContext({ integration, saveInstanceJson });
|
|
92
|
+
const appliedHooks = [];
|
|
93
|
+
try {
|
|
94
|
+
// 3a: unpersist removed slots BEFORE persisting new ones — if the user
|
|
95
|
+
// swapped one LLM provider for another, persist's overwrite already
|
|
96
|
+
// handles it; this loop only fires for slots that genuinely went
|
|
97
|
+
// away, so it's safe to run first. Failures here are logged and
|
|
98
|
+
// swallowed so a stale env var or stale upstream config doesn't
|
|
99
|
+
// block legitimate new bindings; the rollback step still recovers
|
|
100
|
+
// the full snapshot if a later persist throws.
|
|
101
|
+
for (const { slot, category } of shrunkSlots) {
|
|
102
|
+
const hook = UNPERSIST_HOOKS[category];
|
|
103
|
+
if (!hook)
|
|
104
|
+
continue;
|
|
105
|
+
try {
|
|
106
|
+
await hook(candidate, slot, ctx);
|
|
107
|
+
}
|
|
108
|
+
catch (e) {
|
|
109
|
+
console.warn(`[connection-transactor] unpersist ${category}/${slot} for ${instance.id} failed: ${e?.message ?? e}`);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
for (const category of APPLY_ORDER) {
|
|
113
|
+
const hook = PERSIST_HOOKS[category];
|
|
114
|
+
if (!hook)
|
|
115
|
+
continue;
|
|
116
|
+
for (const binding of resolved) {
|
|
117
|
+
if (binding.category !== category)
|
|
118
|
+
continue;
|
|
119
|
+
await hook(candidate, binding, ctx);
|
|
120
|
+
appliedHooks.push(binding);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
catch (e) {
|
|
125
|
+
await rollback(input, snapshot);
|
|
126
|
+
if (e instanceof ConnectionError)
|
|
127
|
+
throw e;
|
|
128
|
+
throw new ConnectionError("CONNECTION_APPLY_FAILED", 500, `Connection apply failed: ${e?.message ?? e}`, { applied: appliedHooks.map((b) => b.slot) });
|
|
129
|
+
}
|
|
130
|
+
// ── Step 4: Persist connections ───────────────────────────────────────
|
|
131
|
+
// Read-modify-write so we don't clobber `connections-env` that step 3
|
|
132
|
+
// hooks may have written for generic apps without an integration.
|
|
133
|
+
try {
|
|
134
|
+
await saveInstanceJson(instance.id, (cur) => ({
|
|
135
|
+
...cur,
|
|
136
|
+
connections: newConnections,
|
|
137
|
+
}));
|
|
138
|
+
}
|
|
139
|
+
catch (e) {
|
|
140
|
+
await rollback(input, snapshot);
|
|
141
|
+
throw new ConnectionError("CONNECTION_PERSIST_FAILED", 500, `Failed to persist connections: ${e?.message ?? e}`);
|
|
142
|
+
}
|
|
143
|
+
return { resolved };
|
|
144
|
+
}
|
|
145
|
+
function makeApplyContext(opts) {
|
|
146
|
+
return {
|
|
147
|
+
registry: capabilityRegistry,
|
|
148
|
+
integration: opts.integration,
|
|
149
|
+
async writeConnectionEnv(instance, env) {
|
|
150
|
+
if (Object.keys(env).length === 0)
|
|
151
|
+
return;
|
|
152
|
+
if (opts.integration && typeof opts.integration.applyConnectionEnv === "function") {
|
|
153
|
+
await opts.integration.applyConnectionEnv(instance.id, env);
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
// Generic container app — persist into instance.json["connections-env"].
|
|
157
|
+
await opts.saveInstanceJson(instance.id, (cur) => ({
|
|
158
|
+
...cur,
|
|
159
|
+
"connections-env": {
|
|
160
|
+
...(cur["connections-env"] ?? {}),
|
|
161
|
+
...env,
|
|
162
|
+
},
|
|
163
|
+
}));
|
|
164
|
+
},
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Test-only export so unit tests can exercise the snapshot/restore path
|
|
169
|
+
* without spinning up the full transactor. Production code should not
|
|
170
|
+
* import these names directly.
|
|
171
|
+
*/
|
|
172
|
+
export const __testing__ = {
|
|
173
|
+
snapshotSideEffectFiles: (paths) => snapshotSideEffectFiles(paths),
|
|
174
|
+
applyFileSnapshots: (snapshots) => applyFileSnapshots(snapshots),
|
|
175
|
+
validateResolvedEndpoints: (resolved) => validateResolvedEndpoints(resolved),
|
|
176
|
+
};
|
|
177
|
+
/**
|
|
178
|
+
* Walk every resolved binding and validate each provider entry's endpoint
|
|
179
|
+
* via `validateCapabilityEndpoint` (§12). Looks the provider spec up
|
|
180
|
+
* either through the app service (app-installed providers) or through the
|
|
181
|
+
* legacy synthesizer (instance-backed providers). When neither lookup
|
|
182
|
+
* yields a spec, the entry is left un-validated rather than rejected —
|
|
183
|
+
* the design's protection target is registry tampering after legitimate
|
|
184
|
+
* registration, and there's no spec to compare against in the missing case.
|
|
185
|
+
*/
|
|
186
|
+
async function validateResolvedEndpoints(resolved) {
|
|
187
|
+
if (resolved.length === 0)
|
|
188
|
+
return;
|
|
189
|
+
const { validateCapabilityEndpoint, findProviderProvide } = await import("../capabilities/endpoint-validator.js");
|
|
190
|
+
const { getInstanceInstallRecord } = await import("../app-common/service.js");
|
|
191
|
+
const { readCanonicalSpecForInstance } = await import("../app-common/instance-store.js");
|
|
192
|
+
for (const binding of resolved) {
|
|
193
|
+
const category = binding.category;
|
|
194
|
+
for (const entry of binding.entries) {
|
|
195
|
+
// Look up the provider spec. Two canonical sources only (post-Step-13):
|
|
196
|
+
// 1. App-installed provider — `getInstanceInstallRecord(entry.instanceId).spec`
|
|
197
|
+
// 2. Migrated instance — read `apps/<id>/resolved-spec.yaml`
|
|
198
|
+
// Un-migrated legacy instances are rejected the same way orphans are.
|
|
199
|
+
let providerSpec = null;
|
|
200
|
+
const appRecord = getInstanceInstallRecord(entry.instanceId);
|
|
201
|
+
if (appRecord) {
|
|
202
|
+
providerSpec = appRecord.spec;
|
|
203
|
+
}
|
|
204
|
+
else {
|
|
205
|
+
providerSpec = readCanonicalSpecForInstance(entry.instanceId);
|
|
206
|
+
}
|
|
207
|
+
if (!providerSpec) {
|
|
208
|
+
// No spec we can validate against. The registry entry is either
|
|
209
|
+
// orphaned (live instance has been deleted) or the provider is an
|
|
210
|
+
// un-migrated legacy instance. Either way runtime hot path must
|
|
211
|
+
// reject so a tampered registry cannot sneak past the validator.
|
|
212
|
+
const { ConnectionError } = await import("./resolver.js");
|
|
213
|
+
throw new ConnectionError("INVALID_CAPABILITY_ENDPOINT", 400, `Provider '${entry.instanceId}' has no canonical instance spec — registry entry is orphaned or instance needs migration`, {
|
|
214
|
+
providerInstanceId: entry.instanceId,
|
|
215
|
+
capability: entry.capability,
|
|
216
|
+
reason: "provider-spec-missing",
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
const provide = findProviderProvide(providerSpec, entry.capability);
|
|
220
|
+
if (!provide) {
|
|
221
|
+
// Provider's canonical spec does not declare this capability.
|
|
222
|
+
// Either the registry was tampered to forge a capability the spec
|
|
223
|
+
// doesn't expose, or the spec drifted out of sync. Either way the
|
|
224
|
+
// safe move is to reject — apply hooks would otherwise consume a
|
|
225
|
+
// registry-supplied host/port/protocol with no spec confirmation.
|
|
226
|
+
const { ConnectionError } = await import("./resolver.js");
|
|
227
|
+
throw new ConnectionError("INVALID_CAPABILITY_ENDPOINT", 400, `Provider '${entry.instanceId}' app spec does not declare capability '${entry.capability}'`, {
|
|
228
|
+
providerInstanceId: entry.instanceId,
|
|
229
|
+
capability: entry.capability,
|
|
230
|
+
reason: "capability-not-in-spec",
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
validateCapabilityEndpoint(providerSpec, entry.instanceId, provide, entry, category);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Capture raw bytes for the integration-declared connection side effects.
|
|
239
|
+
* The transaction owns snapshot timing and restoration mechanics; the
|
|
240
|
+
* integration owns knowledge of its private filesystem layout. Files that do
|
|
241
|
+
* not exist yet are recorded with `bytes: null` and removed on rollback.
|
|
242
|
+
*/
|
|
243
|
+
function snapshotSideEffectFiles(paths) {
|
|
244
|
+
const candidates = Array.from(new Set(paths.filter((path) => path.trim())));
|
|
245
|
+
const out = [];
|
|
246
|
+
for (const path of candidates) {
|
|
247
|
+
try {
|
|
248
|
+
out.push({ path, bytes: existsSync(path) ? readFileSync(path) : null });
|
|
249
|
+
}
|
|
250
|
+
catch (e) {
|
|
251
|
+
if (e.code === "ENOENT") {
|
|
252
|
+
// File disappeared between existsSync and readFileSync (TOCTOU) — treat as absent.
|
|
253
|
+
out.push({ path, bytes: null });
|
|
254
|
+
}
|
|
255
|
+
else {
|
|
256
|
+
console.warn(`[connection-transactor] snapshot read failed for ${path}: ${e?.message ?? e}`);
|
|
257
|
+
out.push({ path, bytes: null, readError: true });
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
return out;
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Restore each file to its snapshotted bytes. Files whose snapshot recorded
|
|
265
|
+
* `bytes: null` (didn't exist pre-apply) are unlinked. Errors are logged
|
|
266
|
+
* per-file so a single failed restore doesn't block the rest.
|
|
267
|
+
*/
|
|
268
|
+
function applyFileSnapshots(snapshots) {
|
|
269
|
+
for (const file of snapshots) {
|
|
270
|
+
if (file.readError) {
|
|
271
|
+
console.warn(`[connection-transactor] skipping rollback for ${file.path} (snapshot read had failed)`);
|
|
272
|
+
continue;
|
|
273
|
+
}
|
|
274
|
+
try {
|
|
275
|
+
if (file.bytes === null) {
|
|
276
|
+
if (existsSync(file.path))
|
|
277
|
+
unlinkSync(file.path);
|
|
278
|
+
}
|
|
279
|
+
else {
|
|
280
|
+
try {
|
|
281
|
+
mkdirSync(dirname(file.path), { recursive: true });
|
|
282
|
+
}
|
|
283
|
+
catch { /* dir likely exists */ }
|
|
284
|
+
writeFileSync(file.path, file.bytes);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
catch (e) {
|
|
288
|
+
console.error(`[connection-transactor] rollback file restore failed for ${file.path}: ${e?.message ?? e}`);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
async function rollback(input, snapshot) {
|
|
293
|
+
// Restore side-effect files first so their state is consistent before the
|
|
294
|
+
// instance.json `connections` map is rewound. Failures are logged but not
|
|
295
|
+
// propagated — at this point the caller has already seen a CONNECTION_*
|
|
296
|
+
// error and we want to give every later restore step a chance to run.
|
|
297
|
+
applyFileSnapshots(snapshot.files);
|
|
298
|
+
try {
|
|
299
|
+
// Single read-modify-write that overlays the snapshot on the current
|
|
300
|
+
// instance.json — atomic rollback for the single-file state.
|
|
301
|
+
await input.saveInstanceJson(input.instance.id, () => snapshot.instanceJson);
|
|
302
|
+
}
|
|
303
|
+
catch (e) {
|
|
304
|
+
console.error(`[connection-transactor] rollback failed: ${e?.message ?? e}`);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
//# sourceMappingURL=transactor.js.map
|