jishushell 0.6.18 → 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 +1 -0
- package/apps/browserless-chromium-container.yaml +1 -0
- package/apps/filebrowser-container.yaml +1 -0
- package/apps/hermes-container.yaml +1 -7
- package/apps/immich-container-lite.yaml +337 -0
- package/apps/immich-container.yaml +371 -0
- package/apps/jishu-kb-container.yaml +26 -21
- package/apps/ollama-binary.yaml +1 -0
- package/apps/ollama-cpu-container.yaml +1 -0
- package/apps/ollama-with-hollama-binary.yaml +2 -0
- package/apps/openclaw-binary.yaml +4 -8
- package/apps/openclaw-container.yaml +1 -7
- package/apps/openclaw-with-ollama-container.yaml +1 -0
- package/apps/openclaw-with-searxng-container.yaml +20 -0
- package/apps/searxng-container.yaml +20 -0
- package/apps/weknora-container.yaml +5 -0
- package/dependencies/jishushell-panel-0.7.3.tgz +0 -0
- package/dist/cli/core.js +1 -1
- package/dist/cli/core.js.map +1 -1
- package/dist/cli/doctor.js +96 -0
- package/dist/cli/doctor.js.map +1 -1
- package/dist/config.d.ts +9 -1
- package/dist/config.js +72 -2
- package/dist/config.js.map +1 -1
- package/dist/install.js +60 -19
- 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/docker.d.ts +2 -0
- package/dist/routes/docker.js +58 -0
- package/dist/routes/docker.js.map +1 -0
- package/dist/routes/file-mounts.js +5 -8
- package/dist/routes/file-mounts.js.map +1 -1
- package/dist/routes/instances.d.ts +0 -14
- package/dist/routes/instances.js +44 -1184
- package/dist/routes/instances.js.map +1 -1
- package/dist/server.d.ts +6 -0
- package/dist/server.js +53 -20
- package/dist/server.js.map +1 -1
- package/dist/services/app-common/catalog-service.js +15 -5
- package/dist/services/app-common/catalog-service.js.map +1 -1
- package/dist/services/app-common/delete-service.js +5 -0
- package/dist/services/app-common/delete-service.js.map +1 -1
- package/dist/services/app-common/instance-store.js +3 -0
- package/dist/services/app-common/instance-store.js.map +1 -1
- package/dist/services/app-common/lifecycle-service.js +12 -4
- package/dist/services/app-common/lifecycle-service.js.map +1 -1
- 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/runtime-facts.js +2 -0
- package/dist/services/app-common/runtime-facts.js.map +1 -1
- package/dist/services/app-common/spec-materializer.d.ts +0 -1
- package/dist/services/app-common/spec-materializer.js +21 -87
- package/dist/services/app-common/spec-materializer.js.map +1 -1
- package/dist/services/app-common/status-refresh.js +25 -13
- package/dist/services/app-common/status-refresh.js.map +1 -1
- package/dist/services/app-modules/browserless/routes.js +5 -3
- package/dist/services/app-modules/browserless/routes.js.map +1 -1
- package/dist/services/capabilities/contract.d.ts +1 -2
- package/dist/services/capabilities/contract.js +0 -10
- package/dist/services/capabilities/contract.js.map +1 -1
- package/dist/services/capabilities/endpoint-validator.js +0 -1
- package/dist/services/capabilities/endpoint-validator.js.map +1 -1
- package/dist/services/capabilities/health.js +1 -1
- package/dist/services/capabilities/health.js.map +1 -1
- 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.js +19 -9
- package/dist/services/connections/admin.js.map +1 -1
- package/dist/services/connections/apply.d.ts +3 -9
- package/dist/services/connections/apply.js +0 -29
- package/dist/services/connections/apply.js.map +1 -1
- package/dist/services/connections/transactor.js +2 -2
- package/dist/services/connections/transactor.js.map +1 -1
- 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/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/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/manager.d.ts +6 -5
- package/dist/services/instances/manager.js +45 -51
- package/dist/services/instances/manager.js.map +1 -1
- 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/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/integrations/hermes/integration.d.ts +1 -1
- package/dist/services/integrations/hermes/integration.js +7 -8
- package/dist/services/integrations/hermes/integration.js.map +1 -1
- 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 +1 -0
- package/dist/services/integrations/index.js +1 -0
- package/dist/services/integrations/index.js.map +1 -1
- package/dist/services/integrations/installable/installers/integration.js +113 -7
- package/dist/services/integrations/installable/installers/integration.js.map +1 -1
- package/dist/services/integrations/jishukb/integration.d.ts +3 -1
- package/dist/services/integrations/jishukb/integration.js +121 -10
- package/dist/services/integrations/jishukb/integration.js.map +1 -1
- package/dist/services/integrations/openclaw/integration.d.ts +21 -7
- package/dist/services/integrations/openclaw/integration.js +385 -158
- package/dist/services/integrations/openclaw/integration.js.map +1 -1
- 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 +8 -4
- package/dist/services/integrations/openclaw/jishukb-shim.js +624 -17
- package/dist/services/integrations/openclaw/jishukb-shim.js.map +1 -1
- package/dist/services/integrations/openclaw/mcporter.d.ts +13 -0
- package/dist/services/integrations/openclaw/mcporter.js +31 -0
- package/dist/services/integrations/openclaw/mcporter.js.map +1 -1
- 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.js +4 -1
- package/dist/services/integrations/openclaw/routes.js.map +1 -1
- package/dist/services/integrations/types.d.ts +5 -17
- package/dist/services/repair/runtime-repair.js +68 -1
- package/dist/services/repair/runtime-repair.js.map +1 -1
- 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 +4 -0
- package/dist/services/runtime/driver-registry.js.map +1 -1
- package/dist/services/runtime/drivers/nomad.d.ts +1 -0
- package/dist/services/runtime/drivers/nomad.js +35 -5
- package/dist/services/runtime/drivers/nomad.js.map +1 -1
- 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 +1 -0
- package/dist/services/runtime/workload-compiler.js +29 -4
- package/dist/services/runtime/workload-compiler.js.map +1 -1
- package/dist/services/setup/setup-manager.js +29 -73
- package/dist/services/setup/setup-manager.js.map +1 -1
- 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-reconciler.js +53 -0
- package/dist/services/system/system-reconciler.js.map +1 -1
- package/dist/types.d.ts +19 -3
- 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 +0 -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/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.test-d.ts → decorate-request-reply.tst.ts} +4 -4
- package/node_modules/fastify/test/types/{dummy-plugin.ts → dummy-plugin.mts} +1 -1
- 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.test-d.ts → logger.tst.ts} +61 -62
- 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.test-d.ts → schema.tst.ts} +22 -22
- package/node_modules/fastify/test/types/{serverFactory.test-d.ts → serverFactory.tst.ts} +4 -4
- package/node_modules/fastify/test/types/tsconfig.json +9 -0
- package/node_modules/fastify/test/types/{type-provider.test-d.ts → type-provider.tst.ts} +256 -250
- 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/jishushell-panel/output/public/assets/{ApiKeyField-NKcbHjNz.js → ApiKeyField-Ce5d1xna.js} +1 -1
- package/node_modules/jishushell-panel/output/public/assets/{Dashboard-Da1fL38t.js → Dashboard-BXame3yg.js} +1 -1
- package/node_modules/jishushell-panel/output/public/assets/{HermesChatPanel-DZvmYsoh.js → HermesChatPanel-BHZtPCJd.js} +1 -1
- package/node_modules/jishushell-panel/output/public/assets/{HermesConfigForm-BLUWlKwm.js → HermesConfigForm-CB3GbNX9.js} +1 -1
- package/node_modules/jishushell-panel/output/public/assets/{InitPassword-BAKsshzk.js → InitPassword-Boab9F6g.js} +1 -1
- package/node_modules/jishushell-panel/output/public/assets/InstanceDetail-DrIWCqo-.js +14 -0
- package/node_modules/jishushell-panel/output/public/assets/{Login-DHeOmwI8.js → Login-CzpOkNau.js} +1 -1
- package/node_modules/jishushell-panel/output/public/assets/NewInstance-CANXyCcL.js +1 -0
- package/node_modules/jishushell-panel/output/public/assets/{ProviderRecommendations-H0ByEYF0.js → ProviderRecommendations-BABo9VOC.js} +1 -1
- 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-D-T6BxkQ.js → WeixinLoginPanel-B765Xz4C.js} +1 -1
- package/node_modules/jishushell-panel/output/public/assets/{index-ERt6_ngA.js → index-Bs6DSbiR.js} +6 -6
- package/node_modules/jishushell-panel/output/public/assets/{registry-DF93EzIb.js → registry-sWIZsIEF.js} +2 -2
- package/node_modules/jishushell-panel/output/public/assets/{usePolling-DeoThIQn.js → usePolling-D4IDOQd_.js} +1 -1
- package/node_modules/jishushell-panel/output/public/assets/vendor-i18n-Df8aUdv8.js +1 -0
- package/node_modules/jishushell-panel/output/public/assets/{vendor-react-Cc84NArf.js → vendor-react-0L0rjmYG.js} +3 -3
- package/node_modules/jishushell-panel/output/public/index.html +3 -3
- package/node_modules/jishushell-panel/package.json +1 -1
- package/node_modules/semver/classes/range.js +6 -2
- package/node_modules/semver/package.json +1 -1
- package/package.json +4 -4
- package/scripts/check-app-spec.mjs +4 -12
- package/scripts/check-architecture-boundaries.mjs +178 -0
- package/scripts/pack-gui-and-send-pi.sh +5 -3
- package/dependencies/jishushell-panel-0.6.18.tgz +0 -0
- package/dist/services/connections/suggestions.d.ts +0 -27
- package/dist/services/connections/suggestions.js +0 -124
- package/dist/services/connections/suggestions.js.map +0 -1
- package/node_modules/fastify/test/types/content-type-parser.test-d.ts +0 -72
- 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/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/using.test-d.ts +0 -17
- package/node_modules/jishushell-panel/output/public/assets/InstanceDetail-Dgyc_TX5.js +0 -14
- package/node_modules/jishushell-panel/output/public/assets/NewInstance-CIy0cYtp.js +0 -1
- package/node_modules/jishushell-panel/output/public/assets/Settings-DAT-UMfP.js +0 -1
- package/node_modules/jishushell-panel/output/public/assets/Setup-g3uckFYR.js +0 -1
- package/node_modules/jishushell-panel/output/public/assets/vendor-i18n-CS8DFbkQ.js +0 -1
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
import { closeSync, existsSync, mkdirSync, openSync, readFileSync, readdirSync, rmSync, unlinkSync, writeFileSync, } from "fs";
|
|
2
|
+
import { randomBytes } from "crypto";
|
|
3
|
+
import { join } from "path";
|
|
4
|
+
import { IMMICH_REVIEW_TTL_MS } from "./config.js";
|
|
5
|
+
export const IMMICH_CONFIRM_TOKENS = {
|
|
6
|
+
add_assets_to_album: "ADD_TO_ALBUM",
|
|
7
|
+
remove_assets_from_album: "REMOVE_FROM_ALBUM",
|
|
8
|
+
tag_assets: "TAG_ASSETS",
|
|
9
|
+
untag_assets: "UNTAG_ASSETS",
|
|
10
|
+
delete_assets_to_trash: "MOVE_TO_TRASH",
|
|
11
|
+
resolve_duplicates: "RESOLVE_DUPLICATES",
|
|
12
|
+
};
|
|
13
|
+
export class ImmichReviewStore {
|
|
14
|
+
rootDir;
|
|
15
|
+
constructor(rootDir) {
|
|
16
|
+
this.rootDir = rootDir;
|
|
17
|
+
}
|
|
18
|
+
create(input) {
|
|
19
|
+
const now = input.now ?? new Date();
|
|
20
|
+
const ttlMs = input.ttlMs ?? IMMICH_REVIEW_TTL_MS;
|
|
21
|
+
const candidateAssetIds = uniqueStrings(input.candidateAssetIds);
|
|
22
|
+
const session = {
|
|
23
|
+
id: newReviewId(now),
|
|
24
|
+
action: input.action,
|
|
25
|
+
title: input.title,
|
|
26
|
+
candidateAssetIds,
|
|
27
|
+
preselectedAssetIds: normalizePreselectedAssetIds(input.preselectedAssetIds, candidateAssetIds),
|
|
28
|
+
boundParams: input.boundParams ?? {},
|
|
29
|
+
duplicateGroups: input.duplicateGroups,
|
|
30
|
+
createdAt: now.toISOString(),
|
|
31
|
+
expiresAt: new Date(now.getTime() + ttlMs).toISOString(),
|
|
32
|
+
};
|
|
33
|
+
this.writeSession(session);
|
|
34
|
+
return session;
|
|
35
|
+
}
|
|
36
|
+
get(reviewId) {
|
|
37
|
+
if (!isSafeReviewId(reviewId))
|
|
38
|
+
return null;
|
|
39
|
+
const path = this.sessionPath(reviewId);
|
|
40
|
+
if (!existsSync(path))
|
|
41
|
+
return null;
|
|
42
|
+
try {
|
|
43
|
+
const session = JSON.parse(readFileSync(path, "utf-8"));
|
|
44
|
+
return normalizeSession(session);
|
|
45
|
+
}
|
|
46
|
+
catch {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
getExecution(reviewId) {
|
|
51
|
+
if (!isSafeReviewId(reviewId))
|
|
52
|
+
return null;
|
|
53
|
+
const path = this.executionPath(reviewId);
|
|
54
|
+
if (!existsSync(path))
|
|
55
|
+
return null;
|
|
56
|
+
try {
|
|
57
|
+
return normalizeExecution(JSON.parse(readFileSync(path, "utf-8")));
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
claimExecution(reviewId, action, options = {}) {
|
|
64
|
+
if (!isSafeReviewId(reviewId) || !this.get(reviewId)) {
|
|
65
|
+
throw new Error("review not found");
|
|
66
|
+
}
|
|
67
|
+
const existing = this.getExecution(reviewId);
|
|
68
|
+
if (existing?.status === "completed") {
|
|
69
|
+
return { claimed: false, execution: existing };
|
|
70
|
+
}
|
|
71
|
+
mkdirSync(this.reviewDir(reviewId), { recursive: true });
|
|
72
|
+
let fd;
|
|
73
|
+
try {
|
|
74
|
+
fd = openSync(this.executionLockPath(reviewId), "wx", 0o600);
|
|
75
|
+
}
|
|
76
|
+
catch (error) {
|
|
77
|
+
if (error?.code !== "EEXIST")
|
|
78
|
+
throw error;
|
|
79
|
+
return {
|
|
80
|
+
claimed: false,
|
|
81
|
+
execution: this.getExecution(reviewId) ?? {
|
|
82
|
+
reviewId,
|
|
83
|
+
action,
|
|
84
|
+
status: "executing",
|
|
85
|
+
startedAt: (options.now ?? new Date()).toISOString(),
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
closeSync(fd);
|
|
90
|
+
const execution = {
|
|
91
|
+
reviewId,
|
|
92
|
+
action,
|
|
93
|
+
status: "executing",
|
|
94
|
+
startedAt: (options.now ?? new Date()).toISOString(),
|
|
95
|
+
};
|
|
96
|
+
this.writeExecution(execution);
|
|
97
|
+
return { claimed: true, execution };
|
|
98
|
+
}
|
|
99
|
+
completeExecution(reviewId, result, options = {}) {
|
|
100
|
+
const current = this.getExecution(reviewId);
|
|
101
|
+
if (!current)
|
|
102
|
+
throw new Error("review execution not claimed");
|
|
103
|
+
const execution = {
|
|
104
|
+
...current,
|
|
105
|
+
status: "completed",
|
|
106
|
+
completedAt: (options.now ?? new Date()).toISOString(),
|
|
107
|
+
result,
|
|
108
|
+
};
|
|
109
|
+
this.writeExecution(execution);
|
|
110
|
+
this.releaseExecutionLock(reviewId);
|
|
111
|
+
return execution;
|
|
112
|
+
}
|
|
113
|
+
failExecution(reviewId, error, options = {}) {
|
|
114
|
+
const current = this.getExecution(reviewId);
|
|
115
|
+
if (!current)
|
|
116
|
+
throw new Error("review execution not claimed");
|
|
117
|
+
const execution = {
|
|
118
|
+
...current,
|
|
119
|
+
status: "failed",
|
|
120
|
+
completedAt: (options.now ?? new Date()).toISOString(),
|
|
121
|
+
error,
|
|
122
|
+
};
|
|
123
|
+
this.writeExecution(execution);
|
|
124
|
+
this.releaseExecutionLock(reviewId);
|
|
125
|
+
return execution;
|
|
126
|
+
}
|
|
127
|
+
validate(confirmation, options = {}) {
|
|
128
|
+
const reviewId = requireString(confirmation.review_id, "review_id");
|
|
129
|
+
const session = this.get(reviewId);
|
|
130
|
+
if (!session)
|
|
131
|
+
throw new Error("review not found");
|
|
132
|
+
const now = options.now ?? new Date();
|
|
133
|
+
if (Date.parse(session.expiresAt) <= now.getTime()) {
|
|
134
|
+
throw new Error("review expired");
|
|
135
|
+
}
|
|
136
|
+
if (confirmation.action !== session.action) {
|
|
137
|
+
throw new Error("review action mismatch");
|
|
138
|
+
}
|
|
139
|
+
const expectedToken = IMMICH_CONFIRM_TOKENS[session.action];
|
|
140
|
+
if (confirmation.confirm_text !== expectedToken) {
|
|
141
|
+
throw new Error(`confirm_text must equal ${expectedToken}`);
|
|
142
|
+
}
|
|
143
|
+
validateBoundParams(session, confirmation);
|
|
144
|
+
if (session.action === "resolve_duplicates") {
|
|
145
|
+
const duplicateDecisions = normalizeDuplicateDecisions(confirmation.duplicate_decisions);
|
|
146
|
+
validateDuplicateDecisions(session, duplicateDecisions);
|
|
147
|
+
const trashAssetIds = uniqueStrings(duplicateDecisions.flatMap((decision) => decision.trash_asset_ids));
|
|
148
|
+
return {
|
|
149
|
+
reviewId,
|
|
150
|
+
action: "resolve_duplicates",
|
|
151
|
+
assetIds: trashAssetIds,
|
|
152
|
+
boundParams: session.boundParams,
|
|
153
|
+
duplicateDecisions,
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
const assetIds = uniqueStrings(confirmation.selected_asset_ids ?? []);
|
|
157
|
+
validateAssetSubset(session.candidateAssetIds, assetIds);
|
|
158
|
+
return {
|
|
159
|
+
reviewId,
|
|
160
|
+
action: session.action,
|
|
161
|
+
assetIds,
|
|
162
|
+
boundParams: session.boundParams,
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
deleteExpired(options = {}) {
|
|
166
|
+
const nowMs = (options.now ?? new Date()).getTime();
|
|
167
|
+
if (!existsSync(this.rootDir))
|
|
168
|
+
return 0;
|
|
169
|
+
let deleted = 0;
|
|
170
|
+
for (const name of readdirSync(this.rootDir)) {
|
|
171
|
+
if (!isSafeReviewId(name))
|
|
172
|
+
continue;
|
|
173
|
+
const session = this.get(name);
|
|
174
|
+
if (!session || Date.parse(session.expiresAt) <= nowMs) {
|
|
175
|
+
rmSync(this.reviewDir(name), { recursive: true, force: true });
|
|
176
|
+
deleted += 1;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
return deleted;
|
|
180
|
+
}
|
|
181
|
+
writeSession(session) {
|
|
182
|
+
mkdirSync(this.reviewDir(session.id), { recursive: true });
|
|
183
|
+
writeFileSync(this.sessionPath(session.id), JSON.stringify(session, null, 2) + "\n", {
|
|
184
|
+
mode: 0o600,
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
reviewDir(reviewId) {
|
|
188
|
+
return join(this.rootDir, reviewId);
|
|
189
|
+
}
|
|
190
|
+
sessionPath(reviewId) {
|
|
191
|
+
return join(this.reviewDir(reviewId), "session.json");
|
|
192
|
+
}
|
|
193
|
+
executionPath(reviewId) {
|
|
194
|
+
return join(this.reviewDir(reviewId), "execution.json");
|
|
195
|
+
}
|
|
196
|
+
executionLockPath(reviewId) {
|
|
197
|
+
return join(this.reviewDir(reviewId), "execution.lock");
|
|
198
|
+
}
|
|
199
|
+
writeExecution(execution) {
|
|
200
|
+
writeFileSync(this.executionPath(execution.reviewId), JSON.stringify(execution, null, 2) + "\n", {
|
|
201
|
+
mode: 0o600,
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
releaseExecutionLock(reviewId) {
|
|
205
|
+
try {
|
|
206
|
+
unlinkSync(this.executionLockPath(reviewId));
|
|
207
|
+
}
|
|
208
|
+
catch (error) {
|
|
209
|
+
if (error?.code !== "ENOENT")
|
|
210
|
+
throw error;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
function normalizeExecution(input) {
|
|
215
|
+
if (!input || typeof input !== "object" || Array.isArray(input))
|
|
216
|
+
return null;
|
|
217
|
+
const raw = input;
|
|
218
|
+
const reviewId = typeof raw.reviewId === "string" ? raw.reviewId : "";
|
|
219
|
+
const action = raw.action;
|
|
220
|
+
const status = raw.status;
|
|
221
|
+
if (!isSafeReviewId(reviewId) || !Object.hasOwn(IMMICH_CONFIRM_TOKENS, action))
|
|
222
|
+
return null;
|
|
223
|
+
if (status !== "executing" && status !== "completed" && status !== "failed")
|
|
224
|
+
return null;
|
|
225
|
+
return {
|
|
226
|
+
reviewId,
|
|
227
|
+
action: action,
|
|
228
|
+
status,
|
|
229
|
+
startedAt: typeof raw.startedAt === "string" ? raw.startedAt : new Date(0).toISOString(),
|
|
230
|
+
completedAt: typeof raw.completedAt === "string" ? raw.completedAt : undefined,
|
|
231
|
+
result: normalizeResult(raw.result),
|
|
232
|
+
error: typeof raw.error === "string" ? raw.error : undefined,
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
function normalizeResult(input) {
|
|
236
|
+
if (!input || typeof input !== "object" || Array.isArray(input))
|
|
237
|
+
return undefined;
|
|
238
|
+
return input;
|
|
239
|
+
}
|
|
240
|
+
function normalizeSession(input) {
|
|
241
|
+
if (!input || !isSafeReviewId(input.id))
|
|
242
|
+
return null;
|
|
243
|
+
if (!Object.hasOwn(IMMICH_CONFIRM_TOKENS, input.action))
|
|
244
|
+
return null;
|
|
245
|
+
return {
|
|
246
|
+
id: input.id,
|
|
247
|
+
action: input.action,
|
|
248
|
+
title: typeof input.title === "string" ? input.title : "Immich review",
|
|
249
|
+
candidateAssetIds: uniqueStrings(Array.isArray(input.candidateAssetIds) ? input.candidateAssetIds : []),
|
|
250
|
+
preselectedAssetIds: normalizePreselectedAssetIds(input.preselectedAssetIds, input.candidateAssetIds),
|
|
251
|
+
boundParams: normalizeBoundParams(input.boundParams),
|
|
252
|
+
duplicateGroups: Array.isArray(input.duplicateGroups)
|
|
253
|
+
? input.duplicateGroups.map((group) => ({
|
|
254
|
+
duplicateId: String(group.duplicateId),
|
|
255
|
+
candidateAssetIds: uniqueStrings(group.candidateAssetIds),
|
|
256
|
+
}))
|
|
257
|
+
: undefined,
|
|
258
|
+
createdAt: typeof input.createdAt === "string" ? input.createdAt : new Date(0).toISOString(),
|
|
259
|
+
expiresAt: typeof input.expiresAt === "string" ? input.expiresAt : new Date(0).toISOString(),
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
function validateBoundParams(session, confirmation) {
|
|
263
|
+
for (const [key, expected] of Object.entries(session.boundParams)) {
|
|
264
|
+
const actual = confirmation[key];
|
|
265
|
+
if (actual !== expected) {
|
|
266
|
+
throw new Error(`review parameter mismatch: ${key}`);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
function validateAssetSubset(candidateAssetIds, selectedAssetIds) {
|
|
271
|
+
const allowed = new Set(candidateAssetIds);
|
|
272
|
+
for (const id of selectedAssetIds) {
|
|
273
|
+
if (!allowed.has(id)) {
|
|
274
|
+
throw new Error(`asset id was not part of the review: ${id}`);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
function normalizeDuplicateDecisions(input) {
|
|
279
|
+
if (!Array.isArray(input))
|
|
280
|
+
return [];
|
|
281
|
+
return input.map((raw) => {
|
|
282
|
+
const obj = raw && typeof raw === "object" ? raw : {};
|
|
283
|
+
return {
|
|
284
|
+
duplicate_id: requireString(obj.duplicate_id, "duplicate_id"),
|
|
285
|
+
keep_asset_ids: uniqueStrings(Array.isArray(obj.keep_asset_ids) ? obj.keep_asset_ids : []),
|
|
286
|
+
trash_asset_ids: uniqueStrings(Array.isArray(obj.trash_asset_ids) ? obj.trash_asset_ids : []),
|
|
287
|
+
};
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
function validateDuplicateDecisions(session, decisions) {
|
|
291
|
+
const groups = new Map((session.duplicateGroups ?? []).map((group) => [group.duplicateId, group]));
|
|
292
|
+
if (groups.size === 0) {
|
|
293
|
+
validateAssetSubset(session.candidateAssetIds, decisions.flatMap((decision) => [
|
|
294
|
+
...decision.keep_asset_ids,
|
|
295
|
+
...decision.trash_asset_ids,
|
|
296
|
+
]));
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
for (const decision of decisions) {
|
|
300
|
+
const group = groups.get(decision.duplicate_id);
|
|
301
|
+
if (!group)
|
|
302
|
+
throw new Error(`duplicate group was not part of the review: ${decision.duplicate_id}`);
|
|
303
|
+
validateAssetSubset(group.candidateAssetIds, [...decision.keep_asset_ids, ...decision.trash_asset_ids]);
|
|
304
|
+
for (const id of decision.trash_asset_ids) {
|
|
305
|
+
if (decision.keep_asset_ids.includes(id)) {
|
|
306
|
+
throw new Error(`duplicate decision keeps and trashes the same asset: ${id}`);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
function normalizeBoundParams(input) {
|
|
312
|
+
const out = {};
|
|
313
|
+
if (!input || typeof input !== "object" || Array.isArray(input))
|
|
314
|
+
return out;
|
|
315
|
+
for (const [key, value] of Object.entries(input)) {
|
|
316
|
+
if (typeof value === "string")
|
|
317
|
+
out[key] = value;
|
|
318
|
+
}
|
|
319
|
+
return out;
|
|
320
|
+
}
|
|
321
|
+
function normalizePreselectedAssetIds(input, candidateAssetIds) {
|
|
322
|
+
const candidateSet = new Set(uniqueStrings(Array.isArray(candidateAssetIds) ? candidateAssetIds : []));
|
|
323
|
+
const ids = uniqueStrings(Array.isArray(input) ? input : []);
|
|
324
|
+
for (const id of ids) {
|
|
325
|
+
if (!candidateSet.has(id)) {
|
|
326
|
+
throw new Error(`preselected asset id was not part of the review: ${id}`);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
return ids;
|
|
330
|
+
}
|
|
331
|
+
function uniqueStrings(input) {
|
|
332
|
+
return [...new Set(input.filter((item) => typeof item === "string" && item.trim().length > 0))];
|
|
333
|
+
}
|
|
334
|
+
function requireString(input, field) {
|
|
335
|
+
if (typeof input !== "string" || !input.trim()) {
|
|
336
|
+
throw new Error(`missing ${field}`);
|
|
337
|
+
}
|
|
338
|
+
return input;
|
|
339
|
+
}
|
|
340
|
+
function newReviewId(now) {
|
|
341
|
+
const stamp = now.toISOString().replace(/[-:T.Z]/g, "").slice(0, 14);
|
|
342
|
+
return `rv_${stamp}_${randomBytes(5).toString("hex")}`;
|
|
343
|
+
}
|
|
344
|
+
function isSafeReviewId(reviewId) {
|
|
345
|
+
return /^rv_[0-9]{14}_[a-f0-9]{10}$/.test(reviewId);
|
|
346
|
+
}
|
|
347
|
+
//# sourceMappingURL=review-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review-store.js","sourceRoot":"","sources":["../../../../src/services/integrations/immich/review-store.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,UAAU,EACV,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,MAAM,EACN,UAAU,EACV,aAAa,GACd,MAAM,IAAI,CAAC;AACZ,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAA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OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC;QAC/C,MAAM,IAAI,KAAK,CAAC,WAAW,KAAK,EAAE,CAAC,CAAC;IACtC,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,WAAW,CAAC,GAAS;IAC5B,MAAM,KAAK,GAAG,GAAG,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACrE,OAAO,MAAM,KAAK,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;AACzD,CAAC;AAED,SAAS,cAAc,CAAC,QAAgB;IACtC,OAAO,6BAA6B,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { FastifyInstance } from "fastify";
|
|
2
|
+
import { PhotoUploadStore } from "../../files/photos/upload-store.js";
|
|
3
|
+
export type ImmichRoutesDeps = {
|
|
4
|
+
photoUploadStore?: PhotoUploadStore;
|
|
5
|
+
publicBaseUrl?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function registerImmichRoutes(app: FastifyInstance, deps?: ImmichRoutesDeps): void;
|