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,771 @@
|
|
|
1
|
+
import { connect as netConnect } from "node:net";
|
|
2
|
+
import { getCorePort, getInternalMcpToken } from "../../config.js";
|
|
3
|
+
import { CanonicalRuntimePortRequiredError, getPrimaryHostPort, getHostForAppPort, isCanonicalRuntimePortRequiredError, } from "../instances/manager.js";
|
|
4
|
+
import * as capabilityRegistry from "../capabilities/registry.js";
|
|
5
|
+
import { resolveProvideEndpoint } from "./provide-resolver.js";
|
|
6
|
+
import { advanceInstanceOperation, clearInstanceOperation, readCanonicalInstance, readCanonicalSpecForInstance, updateInstanceStatus, } from "./instance-store.js";
|
|
7
|
+
const DEFAULT_REFRESH_MIN_INTERVAL_MS = 1_000;
|
|
8
|
+
const WAIT_POLL_INTERVAL_MS = 1_000;
|
|
9
|
+
const START_WAIT_TIMEOUT_MS = 120_000;
|
|
10
|
+
const STOP_WAIT_TIMEOUT_MS = 60_000;
|
|
11
|
+
const PROBE_TIMEOUT_MS = 5_000;
|
|
12
|
+
const WHOLE_REFRESH_TIMEOUT_MS = 30_000;
|
|
13
|
+
const inFlightRefreshes = new Map();
|
|
14
|
+
const cachedRefreshes = new Map();
|
|
15
|
+
function nowIso() {
|
|
16
|
+
return new Date().toISOString();
|
|
17
|
+
}
|
|
18
|
+
function sleep(ms) {
|
|
19
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
20
|
+
}
|
|
21
|
+
function parseDurationMs(value) {
|
|
22
|
+
if (typeof value !== "string")
|
|
23
|
+
return null;
|
|
24
|
+
const trimmed = value.trim();
|
|
25
|
+
if (!trimmed)
|
|
26
|
+
return null;
|
|
27
|
+
const match = /^(\d+(?:\.\d+)?)(ms|s|m|h)?$/.exec(trimmed);
|
|
28
|
+
if (!match)
|
|
29
|
+
return null;
|
|
30
|
+
const amount = Number(match[1]);
|
|
31
|
+
if (!Number.isFinite(amount) || amount < 0)
|
|
32
|
+
return null;
|
|
33
|
+
const unit = match[2] ?? "ms";
|
|
34
|
+
const multiplier = unit === "h"
|
|
35
|
+
? 3_600_000
|
|
36
|
+
: unit === "m"
|
|
37
|
+
? 60_000
|
|
38
|
+
: unit === "s"
|
|
39
|
+
? 1_000
|
|
40
|
+
: 1;
|
|
41
|
+
return Math.floor(amount * multiplier);
|
|
42
|
+
}
|
|
43
|
+
function isWithinStartupHealthGrace(instance, nowMs = Date.now()) {
|
|
44
|
+
if (instance.operation?.type !== "start" && instance.operation?.type !== "restart")
|
|
45
|
+
return false;
|
|
46
|
+
const graceMs = parseDurationMs(instance.runtime?.health?.start_period);
|
|
47
|
+
if (!graceMs || graceMs <= 0)
|
|
48
|
+
return false;
|
|
49
|
+
const startedAtMs = Date.parse(instance.operation.startedAt);
|
|
50
|
+
if (!Number.isFinite(startedAtMs))
|
|
51
|
+
return false;
|
|
52
|
+
return nowMs - startedAtMs < graceMs;
|
|
53
|
+
}
|
|
54
|
+
function isWithinStartupWaitWindow(instance, nowMs = Date.now()) {
|
|
55
|
+
if (instance.operation?.type !== "start" && instance.operation?.type !== "restart")
|
|
56
|
+
return false;
|
|
57
|
+
const startedAtMs = Date.parse(instance.operation.startedAt);
|
|
58
|
+
if (!Number.isFinite(startedAtMs))
|
|
59
|
+
return false;
|
|
60
|
+
return nowMs - startedAtMs < START_WAIT_TIMEOUT_MS;
|
|
61
|
+
}
|
|
62
|
+
function buildObservedServiceSnapshot(instance) {
|
|
63
|
+
return {
|
|
64
|
+
status: mapObservedPhaseToServiceStatus(instance.status.phase),
|
|
65
|
+
pid: null,
|
|
66
|
+
uptime: null,
|
|
67
|
+
memory_mb: null,
|
|
68
|
+
cpu_percent: null,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
function buildUnknownServiceSnapshot() {
|
|
72
|
+
return {
|
|
73
|
+
status: "unknown",
|
|
74
|
+
pid: null,
|
|
75
|
+
uptime: null,
|
|
76
|
+
memory_mb: null,
|
|
77
|
+
cpu_percent: null,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
function buildPersistedSnapshot(instance) {
|
|
81
|
+
return {
|
|
82
|
+
instance,
|
|
83
|
+
rawService: buildUnknownServiceSnapshot(),
|
|
84
|
+
service: buildObservedServiceSnapshot(instance),
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
function pruneCachedRefresh(instanceId) {
|
|
88
|
+
cachedRefreshes.delete(instanceId);
|
|
89
|
+
}
|
|
90
|
+
async function withWholeRefreshTimeout(task, timeoutMs) {
|
|
91
|
+
let timer = null;
|
|
92
|
+
try {
|
|
93
|
+
return await Promise.race([
|
|
94
|
+
task,
|
|
95
|
+
new Promise((resolve) => {
|
|
96
|
+
timer = setTimeout(() => resolve({ timedOut: true }), timeoutMs);
|
|
97
|
+
timer.unref?.();
|
|
98
|
+
}),
|
|
99
|
+
]);
|
|
100
|
+
}
|
|
101
|
+
finally {
|
|
102
|
+
if (timer)
|
|
103
|
+
clearTimeout(timer);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
function mapObservedPhaseToServiceStatus(phase) {
|
|
107
|
+
switch (phase) {
|
|
108
|
+
case "ready":
|
|
109
|
+
return "running";
|
|
110
|
+
case "starting":
|
|
111
|
+
return "pending";
|
|
112
|
+
case "stopped":
|
|
113
|
+
return "stopped";
|
|
114
|
+
case "failed":
|
|
115
|
+
return "failed";
|
|
116
|
+
default:
|
|
117
|
+
return "unknown";
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
function toInstanceStatus(raw) {
|
|
121
|
+
return {
|
|
122
|
+
status: typeof raw?.status === "string" ? raw.status : "unknown",
|
|
123
|
+
pid: typeof raw?.pid === "number" ? raw.pid : null,
|
|
124
|
+
uptime: typeof raw?.uptime === "number" ? raw.uptime : null,
|
|
125
|
+
memory_mb: typeof raw?.memory_mb === "number" ? raw.memory_mb : null,
|
|
126
|
+
cpu_percent: typeof raw?.cpu_percent === "number" ? raw.cpu_percent : null,
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
async function loadRawServiceStatus(instanceId) {
|
|
130
|
+
const appService = await import("./service.js");
|
|
131
|
+
return await appService.getInstanceInstallRecordStatus(instanceId);
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Re-project this instance's capability-registry entries from the
|
|
135
|
+
* current runtime status.
|
|
136
|
+
*
|
|
137
|
+
* Status observation projects runtime state into the derived capability
|
|
138
|
+
* registry. Observation is event-driven: lifecycle waits, explicit status
|
|
139
|
+
* APIs, and one-shot boot convergence invoke this path. Two boundary writers
|
|
140
|
+
* remain outside this function:
|
|
141
|
+
* 1. `delete-service.uninstallInstance` — deletes instance metadata; the
|
|
142
|
+
* observer cannot iterate over a deleted instance to clean up its
|
|
143
|
+
* stale registry entries.
|
|
144
|
+
* 2. `server.ts` boot-time `refreshCapabilityRegistry({force:true})`
|
|
145
|
+
* — one-shot rebuild so reverse-proxy routes are populated immediately
|
|
146
|
+
* after Core restart.
|
|
147
|
+
*
|
|
148
|
+
* Errors are swallowed: a failed sync is retried by the next lifecycle or
|
|
149
|
+
* API-triggered observation. Status reporting must not fail because the
|
|
150
|
+
* registry is briefly stale.
|
|
151
|
+
*/
|
|
152
|
+
async function reconcileCapabilityRegistryForInstance(instanceId, runtimeStatus) {
|
|
153
|
+
try {
|
|
154
|
+
const appService = await import("./service.js");
|
|
155
|
+
await appService.syncCapabilitiesForApp(instanceId, { runtimeStatus });
|
|
156
|
+
}
|
|
157
|
+
catch (error) {
|
|
158
|
+
if (isCanonicalRuntimePortRequiredError(error))
|
|
159
|
+
throw error;
|
|
160
|
+
console.warn(`[lifecycle-status] capability-sync failed for ${instanceId}: ${error?.message ?? error}`);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
function capabilityStatusFromRuntime(status) {
|
|
164
|
+
if (status === "running")
|
|
165
|
+
return "running";
|
|
166
|
+
if (status === "stopped" || status === "dead" || status === "complete")
|
|
167
|
+
return "stopped";
|
|
168
|
+
return "unknown";
|
|
169
|
+
}
|
|
170
|
+
function observedStatusChanged(current, next) {
|
|
171
|
+
return current.phase !== next.phase
|
|
172
|
+
|| current.reason !== next.reason
|
|
173
|
+
|| current.message !== next.message;
|
|
174
|
+
}
|
|
175
|
+
function getTaskHealthSummary(rawStatus) {
|
|
176
|
+
let hasUnhealthy = false;
|
|
177
|
+
let hasUnknown = false;
|
|
178
|
+
let hasChecks = false;
|
|
179
|
+
const tasks = rawStatus?.tasks && typeof rawStatus.tasks === "object" ? Object.values(rawStatus.tasks) : [];
|
|
180
|
+
for (const task of tasks) {
|
|
181
|
+
const healthStatus = typeof task?.health_status === "string"
|
|
182
|
+
? String(task.health_status)
|
|
183
|
+
: "";
|
|
184
|
+
if (!healthStatus)
|
|
185
|
+
continue;
|
|
186
|
+
hasChecks = true;
|
|
187
|
+
if (healthStatus === "unhealthy")
|
|
188
|
+
hasUnhealthy = true;
|
|
189
|
+
else if (healthStatus !== "healthy")
|
|
190
|
+
hasUnknown = true;
|
|
191
|
+
}
|
|
192
|
+
return { hasUnhealthy, hasUnknown, hasChecks };
|
|
193
|
+
}
|
|
194
|
+
function resolveRuntimeProbePort(instanceId, runtime, portRef) {
|
|
195
|
+
const ports = Array.isArray(runtime.ports) ? runtime.ports : [];
|
|
196
|
+
const matched = ports.find((entry) => Number(entry?.hostPort) === portRef || Number(entry?.containerPort) === portRef);
|
|
197
|
+
if (matched && Number.isInteger(matched.hostPort) && matched.hostPort > 0) {
|
|
198
|
+
return matched.hostPort;
|
|
199
|
+
}
|
|
200
|
+
throw new CanonicalRuntimePortRequiredError(instanceId);
|
|
201
|
+
}
|
|
202
|
+
function externalHttpProvides(spec) {
|
|
203
|
+
return (spec.provides ?? []).filter((provide) => {
|
|
204
|
+
if ((provide.visibility ?? "external") === "internal")
|
|
205
|
+
return false;
|
|
206
|
+
if (typeof provide.url === "string" && provide.url.trim())
|
|
207
|
+
return false;
|
|
208
|
+
const protocol = String(provide.protocol ?? "http").toLowerCase();
|
|
209
|
+
return protocol === "http" || protocol === "https";
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
function selectHttpProvide(spec) {
|
|
213
|
+
return externalHttpProvides(spec)[0] ?? null;
|
|
214
|
+
}
|
|
215
|
+
function selectCoreProxyProvide(spec) {
|
|
216
|
+
if (!spec)
|
|
217
|
+
return null;
|
|
218
|
+
const provides = externalHttpProvides(spec);
|
|
219
|
+
return provides.find((provide) => isUiProvide(provide)) ?? provides[0] ?? null;
|
|
220
|
+
}
|
|
221
|
+
function normalizeProbePath(path) {
|
|
222
|
+
const trimmed = path.trim();
|
|
223
|
+
if (!trimmed)
|
|
224
|
+
return "/";
|
|
225
|
+
return trimmed.startsWith("/") ? trimmed : `/${trimmed}`;
|
|
226
|
+
}
|
|
227
|
+
function coreProxyProbeSuffix(provide) {
|
|
228
|
+
const health = provide.health;
|
|
229
|
+
if (health
|
|
230
|
+
&& (health.kind === undefined || health.kind === "http")
|
|
231
|
+
&& typeof health.path === "string"
|
|
232
|
+
&& health.path.trim()) {
|
|
233
|
+
return normalizeProbePath(health.path);
|
|
234
|
+
}
|
|
235
|
+
return "/";
|
|
236
|
+
}
|
|
237
|
+
function coreProxyProbeUrl(instanceId, capability, suffix) {
|
|
238
|
+
const normalizedSuffix = normalizeProbePath(suffix);
|
|
239
|
+
const wildcardSuffix = normalizedSuffix === "/" ? "" : normalizedSuffix.replace(/^\/+/, "");
|
|
240
|
+
return `http://127.0.0.1:${getCorePort()}/api/instances/${encodeURIComponent(instanceId)}/provides/${encodeURIComponent(capability)}/${wildcardSuffix}`;
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Step 4 hard requirement: `status.phase=ready` may only be written when
|
|
244
|
+
* the user can actually reach the app *through Core*, not merely when the
|
|
245
|
+
* upstream `hostPort` happens to accept TCP/HTTP.
|
|
246
|
+
*
|
|
247
|
+
* The Core reverse proxies in `src/server.ts` (`/apps/:slug/*`) and
|
|
248
|
+
* `src/routes/instances.ts` (`/api/instances/:id/proxy/:capability/*`)
|
|
249
|
+
* both resolve against the capability registry and dispatch only to
|
|
250
|
+
* entries with `status === "running"` and non-internal visibility.
|
|
251
|
+
* The registry entry is only the routable precondition:
|
|
252
|
+
* - the instance's spec declares at least one external provide, AND
|
|
253
|
+
* - the registry currently lists at least one entry for this instance
|
|
254
|
+
* with `status === "running"` and `visibility !== "internal"`.
|
|
255
|
+
*
|
|
256
|
+
* UI provides are preferred over API provides. This prevents an API auth
|
|
257
|
+
* boundary from proving ready while the user's actual Panel entry is broken.
|
|
258
|
+
* A spec with no local external HTTP provide is vacuously true.
|
|
259
|
+
*
|
|
260
|
+
* Then Core performs a real self HTTP request through the capability proxy
|
|
261
|
+
* using the internal token. If the selected provide declares
|
|
262
|
+
* `provides[].health.path`, that path is probed through the proxy; otherwise
|
|
263
|
+
* the capability base path is probed.
|
|
264
|
+
* This route exercises the same reverse proxy data path users hit from
|
|
265
|
+
* Panel. It must not be replaced with a direct upstream request: direct
|
|
266
|
+
* hostPort reachability is only one readiness rung, while `ready` means the
|
|
267
|
+
* Core proxy path succeeds too.
|
|
268
|
+
*
|
|
269
|
+
* Forbidden alternative (per architecture decision §10 Step 4):
|
|
270
|
+
* - Treating `hostPort` TCP reachable as Core proxy reachable.
|
|
271
|
+
* - Treating Nomad allocation running as Core proxy reachable.
|
|
272
|
+
*/
|
|
273
|
+
async function probeCoreProxy(instanceId, spec) {
|
|
274
|
+
const provide = selectCoreProxyProvide(spec);
|
|
275
|
+
if (!provide)
|
|
276
|
+
return { ready: true };
|
|
277
|
+
const entries = capabilityRegistry.listProvidersForInstance(instanceId);
|
|
278
|
+
const entry = entries.find((entry) => entry.capability === provide.capability &&
|
|
279
|
+
entry.status === "running" &&
|
|
280
|
+
(entry.visibility ?? "external") !== "internal" &&
|
|
281
|
+
(entry.protocol === "http" || entry.protocol === "https"));
|
|
282
|
+
if (!entry) {
|
|
283
|
+
return {
|
|
284
|
+
ready: false,
|
|
285
|
+
reason: "route-pending",
|
|
286
|
+
capability: provide.capability,
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
const url = coreProxyProbeUrl(instanceId, entry.capability, coreProxyProbeSuffix(provide));
|
|
290
|
+
try {
|
|
291
|
+
const response = await fetch(url, {
|
|
292
|
+
method: "GET",
|
|
293
|
+
headers: {
|
|
294
|
+
"X-Jishushell-Internal-Token": getInternalMcpToken(),
|
|
295
|
+
"X-Jishushell-Instance": instanceId,
|
|
296
|
+
},
|
|
297
|
+
signal: AbortSignal.timeout(PROBE_TIMEOUT_MS),
|
|
298
|
+
});
|
|
299
|
+
if (isCoreProxyProbeSuccess(entry, response.status)) {
|
|
300
|
+
return { ready: true, capability: entry.capability, status: response.status };
|
|
301
|
+
}
|
|
302
|
+
return {
|
|
303
|
+
ready: false,
|
|
304
|
+
reason: "response-not-ready",
|
|
305
|
+
capability: entry.capability,
|
|
306
|
+
status: response.status,
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
catch {
|
|
310
|
+
return {
|
|
311
|
+
ready: false,
|
|
312
|
+
reason: "request-failed",
|
|
313
|
+
capability: entry.capability,
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
function isUiCapability(entry) {
|
|
318
|
+
return entry.kind === "ui"
|
|
319
|
+
|| entry.capability.endsWith("-ui")
|
|
320
|
+
|| entry.capability.startsWith("web-")
|
|
321
|
+
|| entry.capability.endsWith("-web");
|
|
322
|
+
}
|
|
323
|
+
function isCoreProxyProbeSuccess(entry, status) {
|
|
324
|
+
return isHttpProbeStatusReady(status, !isUiCapability(entry));
|
|
325
|
+
}
|
|
326
|
+
function isHttpProbeStatusReady(status, allowAuthBoundary) {
|
|
327
|
+
// User-facing UI readiness requires a page that can actually be opened, so
|
|
328
|
+
// only 2xx/3xx qualify. API capabilities may be alive but protected; for
|
|
329
|
+
// those, 401/403 means Core reached a real upstream auth boundary. 400/404
|
|
330
|
+
// are request/path errors and must never be treated as ready.
|
|
331
|
+
if (status >= 200 && status < 400)
|
|
332
|
+
return true;
|
|
333
|
+
return allowAuthBoundary && (status === 401 || status === 403);
|
|
334
|
+
}
|
|
335
|
+
async function buildReadinessProbe(instance, spec) {
|
|
336
|
+
const runtime = instance.runtime && typeof instance.runtime === "object" ? instance.runtime : {};
|
|
337
|
+
const runtimeHealth = runtime.health && typeof runtime.health === "object" ? runtime.health : null;
|
|
338
|
+
if (runtimeHealth?.type === "http" && Number.isInteger(runtimeHealth.port) && runtimeHealth.port > 0) {
|
|
339
|
+
const hostPort = resolveRuntimeProbePort(instance.id, runtime, Number(runtimeHealth.port));
|
|
340
|
+
const host = await getHostForAppPort(instance.id, hostPort);
|
|
341
|
+
return {
|
|
342
|
+
kind: "http",
|
|
343
|
+
host,
|
|
344
|
+
port: hostPort,
|
|
345
|
+
path: typeof runtimeHealth.path === "string" && runtimeHealth.path.trim() ? runtimeHealth.path.trim() : "/",
|
|
346
|
+
};
|
|
347
|
+
}
|
|
348
|
+
if (runtimeHealth?.type === "tcp" && Number.isInteger(runtimeHealth.port) && runtimeHealth.port > 0) {
|
|
349
|
+
const hostPort = resolveRuntimeProbePort(instance.id, runtime, Number(runtimeHealth.port));
|
|
350
|
+
const host = await getHostForAppPort(instance.id, hostPort);
|
|
351
|
+
return { kind: "tcp", host, port: hostPort };
|
|
352
|
+
}
|
|
353
|
+
if (spec) {
|
|
354
|
+
const provide = selectHttpProvide(spec);
|
|
355
|
+
if (provide) {
|
|
356
|
+
const endpoint = resolveProvideEndpoint(instance.id, spec, provide);
|
|
357
|
+
if (endpoint) {
|
|
358
|
+
const host = await getHostForAppPort(instance.id, endpoint.hostPort);
|
|
359
|
+
return {
|
|
360
|
+
kind: "http",
|
|
361
|
+
host,
|
|
362
|
+
port: endpoint.hostPort,
|
|
363
|
+
path: endpoint.path ?? "/",
|
|
364
|
+
allowAuthBoundary: !isUiProvide(provide),
|
|
365
|
+
};
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
const ports = Array.isArray(runtime.ports) ? runtime.ports : [];
|
|
370
|
+
const primaryPort = ports.find((entry) => (entry?.visibility ?? "external") !== "internal"
|
|
371
|
+
&& Number.isInteger(entry?.hostPort)
|
|
372
|
+
&& entry.hostPort > 0) ?? ports.find((entry) => Number.isInteger(entry?.hostPort) && entry.hostPort > 0);
|
|
373
|
+
if (primaryPort) {
|
|
374
|
+
const hostPort = Number(primaryPort.hostPort);
|
|
375
|
+
const host = await getHostForAppPort(instance.id, hostPort);
|
|
376
|
+
return { kind: "tcp", host, port: hostPort };
|
|
377
|
+
}
|
|
378
|
+
return null;
|
|
379
|
+
}
|
|
380
|
+
async function probeTcp(host, port, timeoutMs = PROBE_TIMEOUT_MS) {
|
|
381
|
+
return await new Promise((resolve) => {
|
|
382
|
+
const socket = netConnect({ host, port });
|
|
383
|
+
let settled = false;
|
|
384
|
+
const finish = (value) => {
|
|
385
|
+
if (settled)
|
|
386
|
+
return;
|
|
387
|
+
settled = true;
|
|
388
|
+
socket.destroy();
|
|
389
|
+
resolve(value);
|
|
390
|
+
};
|
|
391
|
+
socket.setTimeout(timeoutMs);
|
|
392
|
+
socket.once("connect", () => finish(true));
|
|
393
|
+
socket.once("timeout", () => finish(false));
|
|
394
|
+
socket.once("error", () => finish(false));
|
|
395
|
+
socket.once("close", () => finish(false));
|
|
396
|
+
});
|
|
397
|
+
}
|
|
398
|
+
function isUiProvide(provide) {
|
|
399
|
+
return provide.embedded === "auto"
|
|
400
|
+
|| provide.embedded === "proxy"
|
|
401
|
+
|| provide.embedded === "direct"
|
|
402
|
+
|| provide.kind === "ui"
|
|
403
|
+
|| provide.capability.endsWith("-ui")
|
|
404
|
+
|| provide.capability.startsWith("web-")
|
|
405
|
+
|| provide.capability.endsWith("-web");
|
|
406
|
+
}
|
|
407
|
+
async function probeHttp(host, port, path, allowAuthBoundary = false, timeoutMs = PROBE_TIMEOUT_MS) {
|
|
408
|
+
const normalizedPath = path.startsWith("/") ? path : `/${path}`;
|
|
409
|
+
const url = `http://${host.includes(":") ? `[${host}]` : host}:${port}${normalizedPath}`;
|
|
410
|
+
try {
|
|
411
|
+
const response = await fetch(url, {
|
|
412
|
+
method: "GET",
|
|
413
|
+
headers: {
|
|
414
|
+
"X-Forwarded-For": "127.0.0.1",
|
|
415
|
+
"X-Real-IP": "127.0.0.1",
|
|
416
|
+
},
|
|
417
|
+
signal: AbortSignal.timeout(timeoutMs),
|
|
418
|
+
});
|
|
419
|
+
return isHttpProbeStatusReady(response.status, allowAuthBoundary);
|
|
420
|
+
}
|
|
421
|
+
catch {
|
|
422
|
+
return false;
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
async function isProbeReady(probe) {
|
|
426
|
+
if (!probe)
|
|
427
|
+
return true;
|
|
428
|
+
return probe.kind === "http"
|
|
429
|
+
? await probeHttp(probe.host, probe.port, probe.path, probe.allowAuthBoundary === true)
|
|
430
|
+
: await probeTcp(probe.host, probe.port);
|
|
431
|
+
}
|
|
432
|
+
function coreProxyNotReadyStatus(probe) {
|
|
433
|
+
switch (probe.reason) {
|
|
434
|
+
case "route-pending":
|
|
435
|
+
return {
|
|
436
|
+
reason: "core-proxy-route-pending",
|
|
437
|
+
message: "Endpoint is up, but the Core proxy route has not been published yet.",
|
|
438
|
+
};
|
|
439
|
+
case "request-failed":
|
|
440
|
+
return {
|
|
441
|
+
reason: "core-proxy-request-failed",
|
|
442
|
+
message: "Endpoint is up, but the Core proxy probe could not reach the instance yet.",
|
|
443
|
+
};
|
|
444
|
+
case "response-not-ready":
|
|
445
|
+
return {
|
|
446
|
+
reason: "core-proxy-response-not-ready",
|
|
447
|
+
message: `Endpoint is up, but the Core proxy returned ${typeof probe.status === "number" ? `HTTP ${probe.status}` : "a non-ready response"}.`,
|
|
448
|
+
};
|
|
449
|
+
default:
|
|
450
|
+
return {
|
|
451
|
+
reason: "core-proxy-request-failed",
|
|
452
|
+
message: "Endpoint is up, but the Core proxy probe has not succeeded yet.",
|
|
453
|
+
};
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
function observeInstanceStatus(instance, rawService, readinessOk, coreProxyProbe) {
|
|
457
|
+
// The observer is the single source of truth for the user-facing
|
|
458
|
+
// `status.phase`. Each branch below answers exactly one question:
|
|
459
|
+
// - Did the runtime fail outright? → failed.
|
|
460
|
+
// - Is the runtime not yet runnable (pending/installing/stopped while
|
|
461
|
+
// the user is starting)? → starting.
|
|
462
|
+
// - Is the runtime up but not yet usable? Walk the readiness ladder
|
|
463
|
+
// in this exact order:
|
|
464
|
+
// 1. health checks — Nomad-reported, cheapest signal
|
|
465
|
+
// 2. endpoint probe — confirms the published hostPort accepts a
|
|
466
|
+
// connection (NOT equivalent to Core proxy reachable)
|
|
467
|
+
// 3. Core proxy reachable — confirms the user can reach the app
|
|
468
|
+
// *through Core*; this is the Step 4 hard requirement
|
|
469
|
+
// - Only when all three are clean do we write `ready`.
|
|
470
|
+
//
|
|
471
|
+
// Note: a later reconciler tick may legitimately move a `failed` row
|
|
472
|
+
// back into `starting`/`ready` if the runtime recovers. That is the
|
|
473
|
+
// intended "status reflects observation, not history" semantics — do
|
|
474
|
+
// NOT try to make `failed` sticky here.
|
|
475
|
+
const observedAt = nowIso();
|
|
476
|
+
const rawStatus = String(rawService.status ?? "unknown");
|
|
477
|
+
const { hasUnhealthy, hasUnknown, hasChecks } = getTaskHealthSummary(rawService);
|
|
478
|
+
const isWithinHealthGrace = isWithinStartupHealthGrace(instance);
|
|
479
|
+
const isWithinStartWait = isWithinStartupWaitWindow(instance);
|
|
480
|
+
if (rawStatus === "needs-migration") {
|
|
481
|
+
return {
|
|
482
|
+
phase: "failed",
|
|
483
|
+
reason: "needs-migration",
|
|
484
|
+
message: "Instance metadata is not canonical. Run repair or migration before using this instance.",
|
|
485
|
+
lastObservedAt: observedAt,
|
|
486
|
+
};
|
|
487
|
+
}
|
|
488
|
+
if (rawStatus === "failed") {
|
|
489
|
+
return {
|
|
490
|
+
phase: "failed",
|
|
491
|
+
reason: "runtime-failed",
|
|
492
|
+
...(typeof rawService.error === "string" && rawService.error.trim() ? { message: rawService.error.trim() } : {}),
|
|
493
|
+
lastObservedAt: observedAt,
|
|
494
|
+
};
|
|
495
|
+
}
|
|
496
|
+
if (rawStatus === "stopped" || rawStatus === "dead" || rawStatus === "complete") {
|
|
497
|
+
if (instance.operation?.type === "start") {
|
|
498
|
+
return {
|
|
499
|
+
phase: "starting",
|
|
500
|
+
reason: "submit-pending",
|
|
501
|
+
message: "Start has been requested, but the runtime is not runnable yet.",
|
|
502
|
+
lastObservedAt: observedAt,
|
|
503
|
+
};
|
|
504
|
+
}
|
|
505
|
+
if (instance.operation?.type === "restart") {
|
|
506
|
+
if (isRestartStopPhase(instance.operation.phase)) {
|
|
507
|
+
return {
|
|
508
|
+
phase: "stopped",
|
|
509
|
+
reason: "restart-stop-complete",
|
|
510
|
+
lastObservedAt: observedAt,
|
|
511
|
+
};
|
|
512
|
+
}
|
|
513
|
+
return {
|
|
514
|
+
phase: "starting",
|
|
515
|
+
reason: "submit-pending",
|
|
516
|
+
message: "Restart is in progress, but the runtime is not runnable yet.",
|
|
517
|
+
lastObservedAt: observedAt,
|
|
518
|
+
};
|
|
519
|
+
}
|
|
520
|
+
if (instance.desiredState === "running" && (!instance.operation || instance.operation.type !== "stop")) {
|
|
521
|
+
return {
|
|
522
|
+
phase: "failed",
|
|
523
|
+
reason: "desired-running-but-stopped",
|
|
524
|
+
message: "Desired state is running, but no live workload is present.",
|
|
525
|
+
lastObservedAt: observedAt,
|
|
526
|
+
};
|
|
527
|
+
}
|
|
528
|
+
return {
|
|
529
|
+
phase: "stopped",
|
|
530
|
+
reason: instance.desiredState === "stopped" ? "desired-stopped" : "runtime-stopped",
|
|
531
|
+
lastObservedAt: observedAt,
|
|
532
|
+
};
|
|
533
|
+
}
|
|
534
|
+
if (rawStatus === "pending" || rawStatus === "installing") {
|
|
535
|
+
return {
|
|
536
|
+
phase: "starting",
|
|
537
|
+
reason: "allocation-pending",
|
|
538
|
+
message: "Runtime allocation has not become runnable yet.",
|
|
539
|
+
lastObservedAt: observedAt,
|
|
540
|
+
};
|
|
541
|
+
}
|
|
542
|
+
if (rawStatus === "running") {
|
|
543
|
+
if (hasUnhealthy) {
|
|
544
|
+
if (isWithinHealthGrace || isWithinStartWait) {
|
|
545
|
+
return {
|
|
546
|
+
phase: "starting",
|
|
547
|
+
reason: "health-pending",
|
|
548
|
+
message: "Runtime is up, but health checks are still settling.",
|
|
549
|
+
lastObservedAt: observedAt,
|
|
550
|
+
};
|
|
551
|
+
}
|
|
552
|
+
return {
|
|
553
|
+
phase: "failed",
|
|
554
|
+
reason: "health-unhealthy",
|
|
555
|
+
message: "Runtime reported unhealthy health checks.",
|
|
556
|
+
lastObservedAt: observedAt,
|
|
557
|
+
};
|
|
558
|
+
}
|
|
559
|
+
if (hasChecks && hasUnknown) {
|
|
560
|
+
return {
|
|
561
|
+
phase: "starting",
|
|
562
|
+
reason: "health-pending",
|
|
563
|
+
message: "Runtime is up, but health checks are still settling.",
|
|
564
|
+
lastObservedAt: observedAt,
|
|
565
|
+
};
|
|
566
|
+
}
|
|
567
|
+
if (!readinessOk) {
|
|
568
|
+
return {
|
|
569
|
+
phase: "starting",
|
|
570
|
+
reason: "endpoint-not-ready",
|
|
571
|
+
message: "Runtime is up, but the published endpoint is not reachable yet.",
|
|
572
|
+
lastObservedAt: observedAt,
|
|
573
|
+
};
|
|
574
|
+
}
|
|
575
|
+
if (!coreProxyProbe.ready) {
|
|
576
|
+
const coreProxyStatus = coreProxyNotReadyStatus(coreProxyProbe);
|
|
577
|
+
return {
|
|
578
|
+
phase: "starting",
|
|
579
|
+
reason: coreProxyStatus.reason,
|
|
580
|
+
message: coreProxyStatus.message,
|
|
581
|
+
lastObservedAt: observedAt,
|
|
582
|
+
};
|
|
583
|
+
}
|
|
584
|
+
return {
|
|
585
|
+
phase: "ready",
|
|
586
|
+
reason: "endpoint-ready",
|
|
587
|
+
lastObservedAt: observedAt,
|
|
588
|
+
};
|
|
589
|
+
}
|
|
590
|
+
return {
|
|
591
|
+
phase: "unknown",
|
|
592
|
+
reason: "runtime-unknown",
|
|
593
|
+
...(typeof rawService.error === "string" && rawService.error.trim() ? { message: rawService.error.trim() } : {}),
|
|
594
|
+
lastObservedAt: observedAt,
|
|
595
|
+
};
|
|
596
|
+
}
|
|
597
|
+
function isRestartStopPhase(phase) {
|
|
598
|
+
return phase === "restart.waitStop"
|
|
599
|
+
|| phase.startsWith("restart.stop")
|
|
600
|
+
|| phase === "stop.waitStop";
|
|
601
|
+
}
|
|
602
|
+
function buildServiceSnapshot(rawService, observed) {
|
|
603
|
+
return {
|
|
604
|
+
...rawService,
|
|
605
|
+
status: mapObservedPhaseToServiceStatus(observed.phase),
|
|
606
|
+
};
|
|
607
|
+
}
|
|
608
|
+
function maybeAdvanceStartOperation(instance, observed) {
|
|
609
|
+
if (!instance.operation)
|
|
610
|
+
return;
|
|
611
|
+
if (instance.operation.type !== "start" && instance.operation.type !== "restart")
|
|
612
|
+
return;
|
|
613
|
+
if (observed.phase !== "starting")
|
|
614
|
+
return;
|
|
615
|
+
if (instance.operation.type === "restart" && isRestartStopPhase(instance.operation.phase))
|
|
616
|
+
return;
|
|
617
|
+
const nextPhase = observed.reason === "allocation-pending"
|
|
618
|
+
? `${instance.operation.type}.waitAllocation`
|
|
619
|
+
: `${instance.operation.type}.waitReady`;
|
|
620
|
+
if (instance.operation.phase !== nextPhase) {
|
|
621
|
+
advanceInstanceOperation(instance.id, nextPhase);
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
function maybeFinalizeOperation(instance, observed) {
|
|
625
|
+
if (!instance.operation)
|
|
626
|
+
return;
|
|
627
|
+
if (observed.phase === "ready" && (instance.operation.type === "start" || instance.operation.type === "restart")) {
|
|
628
|
+
clearInstanceOperation(instance.id);
|
|
629
|
+
return;
|
|
630
|
+
}
|
|
631
|
+
if (observed.phase === "stopped" && instance.operation.type === "stop") {
|
|
632
|
+
clearInstanceOperation(instance.id);
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
async function performRefresh(instanceId, reason = "manual") {
|
|
636
|
+
const instance = readCanonicalInstance(instanceId);
|
|
637
|
+
if (!instance)
|
|
638
|
+
return null;
|
|
639
|
+
const spec = readCanonicalSpecForInstance(instanceId);
|
|
640
|
+
const rawStatusRecord = await loadRawServiceStatus(instanceId);
|
|
641
|
+
const rawService = toInstanceStatus(rawStatusRecord);
|
|
642
|
+
let observed;
|
|
643
|
+
try {
|
|
644
|
+
if (Array.isArray(instance.integrations) && instance.integrations.length > 0) {
|
|
645
|
+
getPrimaryHostPort(instanceId);
|
|
646
|
+
}
|
|
647
|
+
const probe = await buildReadinessProbe(instance, spec);
|
|
648
|
+
const readinessOk = await isProbeReady(probe);
|
|
649
|
+
let coreProxyProbe = { ready: true };
|
|
650
|
+
if (reason !== "api-list") {
|
|
651
|
+
// Project the derived capability registry from the same runtime snapshot
|
|
652
|
+
// this status observation already loaded. This avoids a second Nomad read
|
|
653
|
+
// and keeps the registry tied to explicit lifecycle/API observations.
|
|
654
|
+
//
|
|
655
|
+
// Why before the Core proxy probe: the registry rewrite below supplies
|
|
656
|
+
// the routable provider entry that the self HTTP probe goes through. If
|
|
657
|
+
// we observed in the other order the gate would lag by exactly one tick
|
|
658
|
+
// on every state transition.
|
|
659
|
+
await reconcileCapabilityRegistryForInstance(instanceId, capabilityStatusFromRuntime(rawStatusRecord.status));
|
|
660
|
+
coreProxyProbe = await probeCoreProxy(instanceId, spec);
|
|
661
|
+
}
|
|
662
|
+
observed = observeInstanceStatus(instance, rawStatusRecord, readinessOk, coreProxyProbe);
|
|
663
|
+
}
|
|
664
|
+
catch (error) {
|
|
665
|
+
if (!isCanonicalRuntimePortRequiredError(error))
|
|
666
|
+
throw error;
|
|
667
|
+
observed = {
|
|
668
|
+
phase: "failed",
|
|
669
|
+
reason: "needs-migration",
|
|
670
|
+
message: error.message,
|
|
671
|
+
lastObservedAt: nowIso(),
|
|
672
|
+
};
|
|
673
|
+
}
|
|
674
|
+
const shouldClearLastError = observed.phase === "ready" && instance.lastError;
|
|
675
|
+
const statusChanged = observedStatusChanged(instance.status, observed);
|
|
676
|
+
const shouldPersistStatus = statusChanged || shouldClearLastError;
|
|
677
|
+
const persisted = shouldPersistStatus
|
|
678
|
+
? updateInstanceStatus(instanceId, observed)
|
|
679
|
+
: { ...instance, status: observed };
|
|
680
|
+
if (!persisted) {
|
|
681
|
+
pruneCachedRefresh(instanceId);
|
|
682
|
+
return null;
|
|
683
|
+
}
|
|
684
|
+
maybeAdvanceStartOperation(persisted, observed);
|
|
685
|
+
maybeFinalizeOperation(persisted, observed);
|
|
686
|
+
const latestPersisted = readCanonicalInstance(instanceId);
|
|
687
|
+
const latest = latestPersisted && !shouldPersistStatus
|
|
688
|
+
? { ...latestPersisted, status: observed }
|
|
689
|
+
: latestPersisted;
|
|
690
|
+
if (!latest) {
|
|
691
|
+
pruneCachedRefresh(instanceId);
|
|
692
|
+
return null;
|
|
693
|
+
}
|
|
694
|
+
const service = buildServiceSnapshot(rawService, observed);
|
|
695
|
+
return {
|
|
696
|
+
instance: latest,
|
|
697
|
+
rawService,
|
|
698
|
+
service,
|
|
699
|
+
};
|
|
700
|
+
}
|
|
701
|
+
export async function refreshInstanceStatus(instanceId, options = {}) {
|
|
702
|
+
const current = readCanonicalInstance(instanceId);
|
|
703
|
+
if (!current) {
|
|
704
|
+
pruneCachedRefresh(instanceId);
|
|
705
|
+
return null;
|
|
706
|
+
}
|
|
707
|
+
const minIntervalMs = options.force ? 0 : (options.minIntervalMs ?? DEFAULT_REFRESH_MIN_INTERVAL_MS);
|
|
708
|
+
const cached = cachedRefreshes.get(instanceId);
|
|
709
|
+
if (cached && Date.now() - cached.observedAt < minIntervalMs) {
|
|
710
|
+
return cached.snapshot;
|
|
711
|
+
}
|
|
712
|
+
const existing = inFlightRefreshes.get(instanceId);
|
|
713
|
+
if (existing)
|
|
714
|
+
return existing;
|
|
715
|
+
const task = (async () => {
|
|
716
|
+
try {
|
|
717
|
+
const result = await withWholeRefreshTimeout(performRefresh(instanceId, options.reason ?? "manual"), WHOLE_REFRESH_TIMEOUT_MS);
|
|
718
|
+
if (result.timedOut === true) {
|
|
719
|
+
console.warn(`[lifecycle-status] whole refresh timed out for ${instanceId} after ${WHOLE_REFRESH_TIMEOUT_MS}ms`);
|
|
720
|
+
const latest = readCanonicalInstance(instanceId);
|
|
721
|
+
if (!latest) {
|
|
722
|
+
pruneCachedRefresh(instanceId);
|
|
723
|
+
return null;
|
|
724
|
+
}
|
|
725
|
+
const snapshot = buildPersistedSnapshot(latest);
|
|
726
|
+
cachedRefreshes.set(instanceId, { snapshot, observedAt: Date.now() });
|
|
727
|
+
return snapshot;
|
|
728
|
+
}
|
|
729
|
+
const snapshot = result;
|
|
730
|
+
if (snapshot) {
|
|
731
|
+
cachedRefreshes.set(instanceId, { snapshot, observedAt: Date.now() });
|
|
732
|
+
}
|
|
733
|
+
else {
|
|
734
|
+
pruneCachedRefresh(instanceId);
|
|
735
|
+
}
|
|
736
|
+
return snapshot;
|
|
737
|
+
}
|
|
738
|
+
finally {
|
|
739
|
+
inFlightRefreshes.delete(instanceId);
|
|
740
|
+
}
|
|
741
|
+
})();
|
|
742
|
+
inFlightRefreshes.set(instanceId, task);
|
|
743
|
+
return await task;
|
|
744
|
+
}
|
|
745
|
+
export async function waitForObservedStatus(instanceId, target, options = { reason: "manual" }) {
|
|
746
|
+
const timeoutMs = options.timeoutMs ?? (target === "ready" ? START_WAIT_TIMEOUT_MS : STOP_WAIT_TIMEOUT_MS);
|
|
747
|
+
const deadline = Date.now() + timeoutMs;
|
|
748
|
+
while (Date.now() < deadline) {
|
|
749
|
+
const snapshot = await refreshInstanceStatus(instanceId, {
|
|
750
|
+
reason: options.reason,
|
|
751
|
+
force: true,
|
|
752
|
+
minIntervalMs: 0,
|
|
753
|
+
});
|
|
754
|
+
if (!snapshot)
|
|
755
|
+
return null;
|
|
756
|
+
if (snapshot.instance.status.phase === target)
|
|
757
|
+
return snapshot;
|
|
758
|
+
if (snapshot.instance.status.phase === "failed")
|
|
759
|
+
return snapshot;
|
|
760
|
+
await sleep(WAIT_POLL_INTERVAL_MS);
|
|
761
|
+
}
|
|
762
|
+
return await refreshInstanceStatus(instanceId, {
|
|
763
|
+
reason: options.reason,
|
|
764
|
+
force: true,
|
|
765
|
+
minIntervalMs: 0,
|
|
766
|
+
});
|
|
767
|
+
}
|
|
768
|
+
export const __observeInstanceStatusForTests = observeInstanceStatus;
|
|
769
|
+
export const __coreProxyProbeSuffixForTests = coreProxyProbeSuffix;
|
|
770
|
+
export const __coreProxyProbeUrlForTests = coreProxyProbeUrl;
|
|
771
|
+
//# sourceMappingURL=status-refresh.js.map
|