@xrkseek/harness-cli 0.1.3 → 0.1.4
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/README.md +41 -22
- package/dist/commands/plugin.js +16 -16
- package/dist/commands/plugin.js.map +1 -1
- package/dist/commands/serve.d.ts.map +1 -1
- package/dist/commands/serve.js +34 -3
- package/dist/commands/serve.js.map +1 -1
- package/dist/log.d.ts +6 -1
- package/dist/log.d.ts.map +1 -1
- package/dist/log.js +20 -6
- package/dist/log.js.map +1 -1
- package/dist/parse-args.js +8 -8
- package/dist/plugin/index.js +5 -5
- package/dist/plugin/index.js.map +1 -1
- package/dist/plugin/remap-inject.d.ts.map +1 -1
- package/dist/plugin/remap-inject.js +1 -0
- package/dist/plugin/remap-inject.js.map +1 -1
- package/node_modules/@xrkseek/preset-server/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/cost-meter.d.ts +15 -22
- package/node_modules/@xrkseek/server-face/dist/handlers/cost-meter.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/cost-meter.js +19 -16
- package/node_modules/@xrkseek/server-face/dist/handlers/cost-meter.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/index.d.ts +2 -1
- package/node_modules/@xrkseek/server-face/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/index.js +2 -1
- package/node_modules/@xrkseek/server-face/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/index.js +12 -4
- package/node_modules/@xrkseek/server-host/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/sidebar-face-bridge.d.ts +10 -0
- package/node_modules/@xrkseek/server-host/dist/sidebar-face-bridge.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-host/dist/sidebar-face-bridge.js +131 -0
- package/node_modules/@xrkseek/server-host/dist/sidebar-face-bridge.js.map +1 -0
- package/node_modules/@xrkseek/server-host/dist/wallet-bridge.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/wallet-bridge.js +29 -1
- package/node_modules/@xrkseek/server-host/dist/wallet-bridge.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-providers.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-providers.js +3 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-providers.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-types.d.ts +4 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-types.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/auto-review-http.js +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/auto-review-http.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/chat-import-discovery.d.ts +41 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/chat-import-discovery.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/chat-import-discovery.js +422 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/chat-import-discovery.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/chat-import-registry.d.ts +21 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/chat-import-registry.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/chat-import-registry.js +34 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/chat-import-registry.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/chat-import.d.ts +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/chat-import.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/chat-import.js +277 -23
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/chat-import.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/community-root-http.d.ts +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/community-root-http.js +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/community-root-http.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/cordis-registry.d.ts +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/cordis-registry.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/cordis-registry.js +2 -2
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/cordis-registry.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-community-infer.js +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-community-infer.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-compat-matrix.d.ts +4 -4
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-compat-matrix.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-compat-matrix.js +26 -26
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-compat-matrix.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-envelope.js +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-envelope.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/generic-dsh-http.d.ts +2 -2
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/generic-dsh-http.js +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/generic-dsh-http.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/generic-plugin-http.js +3 -3
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/generic-plugin-http.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/genui.js +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/genui.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/honest-http-catchall.js +3 -3
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/honest-http-catchall.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-messaging-bridge.d.ts +2 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-messaging-bridge.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-messaging-bridge.js +53 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-messaging-bridge.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/index.d.ts +21 -18
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/index.js +28 -15
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/index.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/market.js +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/market.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/memento.d.ts +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/memento.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/memento.js +77 -24
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/memento.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mnemon.d.ts +24 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mnemon.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mnemon.js +39 -10
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mnemon.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-auth.d.ts +71 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-auth.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-auth.js +349 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-auth.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-cpolar-component.d.ts +53 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-cpolar-component.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-cpolar-component.js +233 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-cpolar-component.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-funnel-sidecar.d.ts +4 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-funnel-sidecar.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-funnel-sidecar.js +86 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-funnel-sidecar.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-gate.d.ts +15 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-gate.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-gate.js +41 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-gate.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-local-gateway.d.ts +22 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-local-gateway.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-local-gateway.js +183 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-local-gateway.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-remote-controllers.d.ts +68 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-remote-controllers.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-remote-controllers.js +511 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-remote-controllers.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-remote-runtime.d.ts +34 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-remote-runtime.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-remote-runtime.js +179 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-remote-runtime.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-remote.d.ts +19 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-remote.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-remote.js +102 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-remote.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access.d.ts +31 -4
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access.js +698 -33
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/modlens.js +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/modlens.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/modsearch.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/modsearch.js +4 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/modsearch.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/noema.js +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/noema.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/pocket-qrcode.d.ts +3 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/pocket-qrcode.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/pocket-qrcode.js +18 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/pocket-qrcode.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/pocket.d.ts +6 -3
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/pocket.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/pocket.js +204 -54
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/pocket.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/releases.js +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/releases.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/sidebar-adapter.d.ts +3 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/sidebar-adapter.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/sidebar-adapter.js +185 -21
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/sidebar-adapter.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/sidebar-browser.d.ts +3 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/sidebar-browser.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/sidebar-browser.js +82 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/sidebar-browser.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/sidebar-face-bridge.d.ts +43 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/sidebar-face-bridge.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/sidebar-face-bridge.js +2 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/sidebar-face-bridge.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/sidebar-git.d.ts +47 -13
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/sidebar-git.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/sidebar-git.js +146 -27
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/sidebar-git.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-market.js +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-market.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/tokenledger.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/tokenledger.js +22 -4
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/tokenledger.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/tongflow.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/tongflow.js +21 -2
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/tongflow.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/turn-rewind-workspace.js +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/turn-rewind-workspace.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/turn-rewind.d.ts +2 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/turn-rewind.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/turn-rewind.js +42 -3
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/turn-rewind.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/contracts/wallet-port.d.ts +25 -7
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/contracts/wallet-port.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/contracts/wallet-port.js +2 -2
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/doc-store.d.ts +2 -2
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/doc-store.js +2 -2
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/http-json.d.ts +12 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/http-json.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/http-json.js +40 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/http-json.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/http-kit.d.ts +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/http-kit.js +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/http-kit.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/index.d.ts +7 -12
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/index.js +5 -8
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/index.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/json-store.d.ts +5 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/json-store.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/json-store.js +31 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/json-store.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/mobile-gate-kit.d.ts +37 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/mobile-gate-kit.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/mobile-gate-kit.js +96 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/mobile-gate-kit.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/public-handler.d.ts +6 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/public-handler.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/public-handler.js +2 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/public-handler.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/wallet-service.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/wallet-service.js +66 -4
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/wallet-service.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/undo.js +2 -2
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/undo.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/usage-stats.js +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/usage-stats.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/vision.js +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/vision.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/wallet.d.ts +2 -2
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/wallet.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/wallet.js +2 -2
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/wallet.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/wallpaper.js +2 -2
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/wallpaper.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/wire/settings-provider.d.ts +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/wire/stub-handlers.js +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/wire/stub-handlers.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/xrk-json-store.js +3 -3
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/xrk-json-store.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/index.d.ts +1 -1
- package/node_modules/@xrkseek/server-http/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/index.js +1 -1
- package/node_modules/@xrkseek/server-http/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/server-http/package.json +7 -1
- package/node_modules/qrcode-generator/README.md +101 -0
- package/node_modules/qrcode-generator/package.json +30 -0
- package/node_modules/qrcode-generator/qrcode.d.ts +57 -0
- package/node_modules/qrcode-generator/qrcode.js +2297 -0
- package/node_modules/qrcode-generator/qrcode_SJIS.js +30 -0
- package/node_modules/qrcode-generator/qrcode_UTF8.js +26 -0
- package/node_modules/qrcode-generator/sample.html +49 -0
- package/node_modules/qrcode-generator/sample.js +49 -0
- package/node_modules/qrcode-generator/test/qrcode.js +118 -0
- package/package.json +4 -2
- package/product-web/assets/index-BNGm-t1O.js +112 -0
- package/product-web/assets/index-BNGm-t1O.js.map +1 -0
- package/product-web/boot.json +1 -1
- package/product-web/index.html +1 -1
- package/product-web/plugins/@xrkseek/client-locale/client.js +3 -3
- package/product-web/plugins/@xrkseek/client-modules/client.js +7 -6
- package/product-web/plugins/@xrkseek/client-runtime/client.js +7 -0
- package/product-web/plugins/@xrkseek/client-ui-agent-preset/client.js +37 -37
- package/product-web/plugins/@xrkseek/client-ui-attachment/client.js +14 -14
- package/product-web/plugins/@xrkseek/client-ui-commands/client.js +8 -8
- package/product-web/plugins/@xrkseek/client-ui-conversation/client.js +186 -193
- package/product-web/plugins/@xrkseek/client-ui-deliverables/client.js +5 -5
- package/product-web/plugins/@xrkseek/client-ui-directory-picker-browse/client.js +30 -30
- package/product-web/plugins/@xrkseek/client-ui-goal/client.js +8 -8
- package/product-web/plugins/@xrkseek/client-ui-input-trigger/client.js +5 -5
- package/product-web/plugins/@xrkseek/client-ui-jobs/client.js +9 -9
- package/product-web/plugins/@xrkseek/client-ui-layout/client.js +3 -3
- package/product-web/plugins/@xrkseek/client-ui-message-feedback/client.js +5 -5
- package/product-web/plugins/@xrkseek/client-ui-model-selection/client.js +18 -18
- package/product-web/plugins/@xrkseek/client-ui-permission-presets/client.js +3 -3
- package/product-web/plugins/@xrkseek/client-ui-plan/client.js +2 -2
- package/product-web/plugins/@xrkseek/client-ui-settings-general/client.js +27 -19
- package/product-web/plugins/@xrkseek/client-ui-settings-models/client.js +54 -54
- package/product-web/plugins/@xrkseek/client-ui-settings-plugin-inventory/client.js +13 -13
- package/product-web/plugins/@xrkseek/client-ui-settings-plugins/client.js +42 -42
- package/product-web/plugins/@xrkseek/client-ui-sidebar/client.js +16 -16
- package/product-web/plugins/@xrkseek/client-ui-skill/client.js +11 -11
- package/product-web/plugins/@xrkseek/client-ui-subagent/client.js +22 -22
- package/product-web/plugins/@xrkseek/client-ui-theme/client.js +4 -4
- package/product-web/plugins/@xrkseek/client-ui-tool/client.js +38 -38
- package/product-web/plugins/@xrkseek/client-ui-trajectory/client.js +144 -144
- package/product-web/plugins/@xrkseek/client-ui-user-questions/client.js +31 -31
- package/product-web/plugins/@xrkseek/client-ui-workflow-run/client.js +17 -17
- package/product-web/plugins/@xrkseek/client-ui-workspace/client.js +53 -53
- package/product-web/assets/index-C_NG-17x.js +0 -112
- package/product-web/assets/index-C_NG-17x.js.map +0 -1
|
@@ -1,35 +1,48 @@
|
|
|
1
|
-
import { ensureDshCompatRegistry
|
|
1
|
+
import { ensureDshCompatRegistry } from "./shared-registry.js";
|
|
2
|
+
import { createMobileAccessGateChecker, createMobileAccessGateHandler, tryHandleMobileAccessGate, } from "./mobile-access-gate.js";
|
|
3
|
+
// —— underlying (extractable primitives) ——
|
|
4
|
+
export { createXrkDocStore, dataPath, drainMutatingBody, ensureDir, httpMethod, isMutatingMethod, parseJsonBody, readBody, readJsonFile, rpcErr, rpcOk, sendJson, writeJsonFile, applyMobileGateDecision, classifyRequestHost, effectiveRequestHost, evaluateMobileGate, hostOnly, isMobileGateExemptPath, } from "./underlying/index.js";
|
|
5
|
+
export { readRevisionedDoc, writeRevisionedDoc, patchRevisionedDoc, } from "./xrk-json-store.js";
|
|
6
|
+
// —— meta / envelope ——
|
|
2
7
|
export { DSH_COMPAT_ADAPTER, tag, hostIncomplete } from "./meta.js";
|
|
8
|
+
export { honestReady, honestHostActionUnavailable, imHostActionUnavailable, modsearchHostUnavailable, genuiHostIncomplete, visionHostUnavailable, noemaRunnerUnavailable, pocketHostIncomplete, tongflowStudioUnavailable, autoReviewClassifierUnavailable, } from "./honest-envelope.js";
|
|
9
|
+
// —— registry / compose ——
|
|
3
10
|
export { createCordisCompatRegistry } from "./cordis-registry.js";
|
|
4
|
-
export { createSettingsDocStore, handleSettingsEndpoint, remoteSettingsDescribe, settingsScopeSnapshot, } from "./settings-store.js";
|
|
5
|
-
export { buildMnemonStatus, buildMnemonVersions } from "./mnemon.js";
|
|
6
|
-
export { createTokenLedgerBridgeFromFace, } from "./tokenledger.js";
|
|
7
|
-
export { createXrkWalletPort, mapSessionCostToDsh, } from "./wallet.js";
|
|
8
|
-
export { createDshCompatHostPlugin, ensureDshCompatHostPlugin, DSH_COMPAT_HOST_PLUGIN_ID, } from "./create-host-plugin.js";
|
|
9
11
|
export { XRK_HOST_PROVIDERS } from "./adapter-providers.js";
|
|
10
|
-
export {
|
|
12
|
+
export { ensureDshCompatRegistry, appendDshCompatContribution, invokeDshCompatRpc, resetDshCompatRegistryCache, } from "./shared-registry.js";
|
|
11
13
|
export { baselineHttpRoutes, baselineRpcRoutes, listDshHttpCapabilityPrefixes, DSH_HTTP_CAPABILITIES, } from "./dsh-path-capabilities.js";
|
|
14
|
+
export { DSH_COMPAT_GENERIC_CAPABILITIES, DSH_COMPAT_KNOWN_GAPS, listDshCompatGenericIds, listDshCompatGapIds, } from "./dsh-compat-matrix.js";
|
|
15
|
+
export { registerHonestHttpCatchall, handleHonestHttpCatchall, shouldHonestHttpCatchall, } from "./honest-http-catchall.js";
|
|
16
|
+
export { inferDshCommunityHostManifest, isDshCommunityClientPackage, } from "./dsh-community-infer.js";
|
|
12
17
|
export { scanClientHostSurface } from "./dsh-client-scan.js";
|
|
18
|
+
// —— settings ——
|
|
19
|
+
export { createSettingsDocStore, handleSettingsEndpoint, remoteSettingsDescribe, settingsScopeSnapshot, } from "./settings-store.js";
|
|
20
|
+
export { buildMnemonStatus, buildMnemonVersions } from "./mnemon.js";
|
|
21
|
+
// —— host plugin entry ——
|
|
22
|
+
export { createDshCompatHostPlugin, ensureDshCompatHostPlugin, DSH_COMPAT_HOST_PLUGIN_ID, } from "./create-host-plugin.js";
|
|
23
|
+
// —— apply / fiber ——
|
|
13
24
|
export { createXrkHostApplyContext, tryApplyHostModule, hasHostApplyEntry, } from "./xrk-host-apply.js";
|
|
14
|
-
export { composeApplyBridgeContributions, applyHostPackageByName, stopHostPackageFiber } from "./host-apply-bridge.js";
|
|
25
|
+
export { composeApplyBridgeContributions, applyHostPackageByName, stopHostPackageFiber, } from "./host-apply-bridge.js";
|
|
15
26
|
export { startCordisFiber, stopCordisFiber, isCordisFiberRunning, listCordisFiberPackages, } from "./cordis-fiber-runner.js";
|
|
16
27
|
export { listHostAppliedPackages, isHostApplied, getHostApplyRecord, resetHostApplyRegistry, } from "./host-apply-registry.js";
|
|
17
|
-
export { ensureDshCompatRegistry, appendDshCompatContribution, invokeDshCompatRpc, resetDshCompatRegistryCache, } from "./shared-registry.js";
|
|
18
|
-
export { DSH_COMPAT_GENERIC_CAPABILITIES, DSH_COMPAT_KNOWN_GAPS, listDshCompatGenericIds, listDshCompatGapIds, } from "./dsh-compat-matrix.js";
|
|
19
|
-
export { registerHonestHttpCatchall, handleHonestHttpCatchall, shouldHonestHttpCatchall, } from "./honest-http-catchall.js";
|
|
20
|
-
export { honestReady, honestHostActionUnavailable, imHostActionUnavailable, modsearchHostUnavailable, genuiHostIncomplete, visionHostUnavailable, noemaRunnerUnavailable, pocketHostIncomplete, tongflowStudioUnavailable, autoReviewClassifierUnavailable, } from "./honest-envelope.js";
|
|
21
|
-
export { readRevisionedDoc, writeRevisionedDoc, patchRevisionedDoc, } from "./xrk-json-store.js";
|
|
22
|
-
export { createXrkDocStore, parseJsonBody, httpMethod, isMutatingMethod, drainMutatingBody, } from "./underlying/index.js";
|
|
23
28
|
export { resetDshCompatUpgrades, registerDshCompatUpgrade, listDshCompatUpgradePaths, attachDshCompatUpgrades, } from "./dsh-compat-upgrades.js";
|
|
29
|
+
export { createTokenLedgerBridgeFromFace, } from "./tokenledger.js";
|
|
30
|
+
export { createXrkWalletPort, mapSessionCostToDsh, } from "./wallet.js";
|
|
24
31
|
export { syncAutoReviewSlashCommand, recordAutoReviewDeny, } from "./auto-review-http.js";
|
|
32
|
+
// —— mobile-access Host contract ——
|
|
33
|
+
export { createMobileAccessGateChecker, createMobileAccessGateHandler, tryHandleMobileAccessGate, };
|
|
34
|
+
export { injectMobileAccessShellIntoHtml, XRK_MOBILE_SHELL_CSS, } from "./mobile-access.js";
|
|
25
35
|
/** Host startup: compose adapters once so upgrade routes exist before first HTTP. */
|
|
26
36
|
export async function prewarmDshCompatAdapters(options = {}) {
|
|
27
37
|
await ensureDshCompatRegistry(options);
|
|
28
38
|
}
|
|
29
39
|
export function createDshCompatPublicHandler(options = {}) {
|
|
30
40
|
return async (req, res) => {
|
|
31
|
-
const registry = await ensureDshCompatRegistry(options);
|
|
32
41
|
const url = new URL(req.url ?? "/", "http://127.0.0.1");
|
|
42
|
+
if (await tryHandleMobileAccessGate(req, res, url.pathname, options)) {
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
const registry = await ensureDshCompatRegistry(options);
|
|
33
46
|
return registry.handle(req, res, url.pathname);
|
|
34
47
|
};
|
|
35
48
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/dsh-compat/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/dsh-compat/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EACL,6BAA6B,EAC7B,6BAA6B,EAC7B,yBAAyB,GAC1B,MAAM,yBAAyB,CAAC;AAIjC,4CAA4C;AAC5C,OAAO,EACL,iBAAiB,EACjB,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,aAAa,EACb,QAAQ,EACR,YAAY,EACZ,MAAM,EACN,KAAK,EACL,QAAQ,EACR,aAAa,EACb,uBAAu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CAAC,CAAC;QACxD,IAAI,MAAM,yBAAyB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE,CAAC;YACrE,OAAO,IAAI,CAAC;QACd,CAAC;QACD,MAAM,QAAQ,GAAG,MAAM,uBAAuB,CAAC,OAAO,CAAC,CAAC;QACxD,OAAO,QAAQ,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;IACjD,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
-
import { sendJson } from "
|
|
2
|
+
import { sendJson } from "./underlying/http-json.js";
|
|
3
3
|
import { fetchXrkPluginCatalog, readXrkPluginInventory, } from "../xrk/plugin-services.js";
|
|
4
4
|
import { runPluginMutate } from "../xrk/plugin-mutate.js";
|
|
5
5
|
import { DSH_COMPAT_ADAPTER, tag } from "./meta.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"market.js","sourceRoot":"","sources":["../../src/dsh-compat/market.ts"],"names":[],"mappings":"AAIA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"market.js","sourceRoot":"","sources":["../../src/dsh-compat/market.ts"],"names":[],"mappings":"AAIA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GAEvB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,SAAS,iBAAiB,CAAC,IAAY;IACrC,MAAM,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Q,CAAC,GAAG,EAAE,GAAG,EAAE;YACjB,EAAE,EAAE,KAAK;YACT,QAAQ,EAAE,KAAK;YACf,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,kBAAkB;YAC3B,KAAK,EAAE,uBAAuB;SAC/B,CAAC,CAAC;QACH,OAAO;IACT,CAAC;IAED,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE;QACjB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,kBAAkB;QAC3B,IAAI,EAAE,oDAAoD;KAC3D,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memento.d.ts","sourceRoot":"","sources":["../../src/dsh-compat/memento.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"memento.d.ts","sourceRoot":"","sources":["../../src/dsh-compat/memento.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAMjE,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAgGD,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,cAAc,EACnB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC,OAAO,CAAC,CAkFlB;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEvD"}
|
|
@@ -1,46 +1,101 @@
|
|
|
1
1
|
import { randomUUID } from "node:crypto";
|
|
2
|
-
import { sendJson } from "
|
|
2
|
+
import { sendJson } from "./underlying/http-json.js";
|
|
3
3
|
import { createXrkDocStore } from "./underlying/doc-store.js";
|
|
4
4
|
import { parseJsonBody } from "./underlying/http-kit.js";
|
|
5
5
|
const EMPTY_STORE = {
|
|
6
6
|
language: "zh",
|
|
7
7
|
entries: [],
|
|
8
|
-
budgets:
|
|
8
|
+
budgets: [],
|
|
9
9
|
};
|
|
10
10
|
const MEMENTO_STORE = createXrkDocStore(["memento", "entries.json"], EMPTY_STORE);
|
|
11
|
+
function normalizeBudgets(budgets) {
|
|
12
|
+
if (Array.isArray(budgets)) {
|
|
13
|
+
return budgets.filter((row) => !!row &&
|
|
14
|
+
typeof row === "object" &&
|
|
15
|
+
typeof (row).track === "string" &&
|
|
16
|
+
typeof (row).scope === "string");
|
|
17
|
+
}
|
|
18
|
+
if (budgets && typeof budgets === "object") {
|
|
19
|
+
return Object.entries(budgets).map(([key, limit]) => {
|
|
20
|
+
const [track = "default", scope = "global"] = key.split("/");
|
|
21
|
+
return {
|
|
22
|
+
track,
|
|
23
|
+
scope,
|
|
24
|
+
used: 0,
|
|
25
|
+
limit: typeof limit === "number" ? limit : 0,
|
|
26
|
+
};
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
return [];
|
|
30
|
+
}
|
|
31
|
+
function wireEntry(entry) {
|
|
32
|
+
const text = entry.body.trim() || entry.title.trim();
|
|
33
|
+
return {
|
|
34
|
+
id: entry.id,
|
|
35
|
+
text,
|
|
36
|
+
track: entry.track ?? "default",
|
|
37
|
+
scope: entry.scope ?? "global",
|
|
38
|
+
source: entry.source ?? "manual",
|
|
39
|
+
createdAt: entry.createdAt,
|
|
40
|
+
updatedAt: entry.updatedAt,
|
|
41
|
+
...(entry.agentKey ? { agentKey: entry.agentKey } : {}),
|
|
42
|
+
...(entry.tags.length > 0 ? { tags: entry.tags } : {}),
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function listPayload(store, limit) {
|
|
46
|
+
const entries = store.entries
|
|
47
|
+
.slice()
|
|
48
|
+
.sort((a, b) => b.updatedAt.localeCompare(a.updatedAt))
|
|
49
|
+
.slice(0, limit)
|
|
50
|
+
.map(wireEntry);
|
|
51
|
+
return {
|
|
52
|
+
language: store.language,
|
|
53
|
+
entries,
|
|
54
|
+
total: store.entries.length,
|
|
55
|
+
truncated: entries.length < store.entries.length,
|
|
56
|
+
budgets: normalizeBudgets(store.budgets),
|
|
57
|
+
};
|
|
58
|
+
}
|
|
11
59
|
export async function handleMementoHttp(req, res, pathname, options) {
|
|
12
60
|
if (!pathname.startsWith("/api/memento"))
|
|
13
61
|
return false;
|
|
14
62
|
const method = (req.method ?? "GET").toUpperCase();
|
|
15
63
|
const store = MEMENTO_STORE.read(options.xrkHome).data;
|
|
16
|
-
const url = new URL(
|
|
64
|
+
const url = new URL(req.url ?? "/", "http://127.0.0.1");
|
|
65
|
+
if (pathname === "/api/memento/audit") {
|
|
66
|
+
sendJson(res, 200, { rows: [] });
|
|
67
|
+
return true;
|
|
68
|
+
}
|
|
69
|
+
if (pathname === "/api/memento/proposals") {
|
|
70
|
+
sendJson(res, 200, { proposals: [] });
|
|
71
|
+
return true;
|
|
72
|
+
}
|
|
17
73
|
if (pathname === "/api/memento/entries" || pathname.startsWith("/api/memento/entries")) {
|
|
18
74
|
if (method === "GET") {
|
|
19
75
|
const limit = Number(url.searchParams.get("limit") ?? "100");
|
|
20
|
-
|
|
21
|
-
.slice()
|
|
22
|
-
.sort((a, b) => b.updatedAt.localeCompare(a.updatedAt))
|
|
23
|
-
.slice(0, Number.isFinite(limit) ? limit : 100);
|
|
24
|
-
sendJson(res, 200, {
|
|
25
|
-
language: store.language,
|
|
26
|
-
entries,
|
|
27
|
-
total: store.entries.length,
|
|
28
|
-
truncated: entries.length < store.entries.length,
|
|
29
|
-
budgets: store.budgets,
|
|
30
|
-
});
|
|
76
|
+
sendJson(res, 200, listPayload(store, Number.isFinite(limit) ? limit : 100));
|
|
31
77
|
return true;
|
|
32
78
|
}
|
|
33
79
|
if (method === "POST") {
|
|
34
80
|
const body = await parseJsonBody(req);
|
|
35
81
|
const now = new Date().toISOString();
|
|
82
|
+
const text = typeof body.text === "string"
|
|
83
|
+
? body.text
|
|
84
|
+
: typeof body.body === "string"
|
|
85
|
+
? body.body
|
|
86
|
+
: "";
|
|
36
87
|
const entry = {
|
|
37
88
|
id: randomUUID(),
|
|
38
|
-
title: typeof body.title === "string" ? body.title :
|
|
39
|
-
body:
|
|
89
|
+
title: typeof body.title === "string" ? body.title : text.slice(0, 80),
|
|
90
|
+
body: text,
|
|
40
91
|
language: typeof body.language === "string" ? body.language : store.language,
|
|
41
92
|
tags: Array.isArray(body.tags)
|
|
42
93
|
? body.tags.filter((t) => typeof t === "string")
|
|
43
94
|
: [],
|
|
95
|
+
track: typeof body.track === "string" ? body.track : "default",
|
|
96
|
+
scope: typeof body.scope === "string" ? body.scope : "global",
|
|
97
|
+
source: typeof body.source === "string" ? body.source : "manual",
|
|
98
|
+
...(typeof body.agentKey === "string" ? { agentKey: body.agentKey } : {}),
|
|
44
99
|
createdAt: now,
|
|
45
100
|
updatedAt: now,
|
|
46
101
|
};
|
|
@@ -48,7 +103,11 @@ export async function handleMementoHttp(req, res, pathname, options) {
|
|
|
48
103
|
...current,
|
|
49
104
|
entries: [...current.entries, entry],
|
|
50
105
|
}));
|
|
51
|
-
sendJson(res, 201, {
|
|
106
|
+
sendJson(res, 201, {
|
|
107
|
+
ok: true,
|
|
108
|
+
entry: wireEntry(entry),
|
|
109
|
+
revision: saved.revision,
|
|
110
|
+
});
|
|
52
111
|
return true;
|
|
53
112
|
}
|
|
54
113
|
}
|
|
@@ -63,13 +122,7 @@ export async function handleMementoHttp(req, res, pathname, options) {
|
|
|
63
122
|
return true;
|
|
64
123
|
}
|
|
65
124
|
if (method === "GET") {
|
|
66
|
-
sendJson(res, 200,
|
|
67
|
-
language: store.language,
|
|
68
|
-
entries: store.entries,
|
|
69
|
-
total: store.entries.length,
|
|
70
|
-
truncated: false,
|
|
71
|
-
budgets: store.budgets,
|
|
72
|
-
});
|
|
125
|
+
sendJson(res, 200, listPayload(store, store.entries.length));
|
|
73
126
|
return true;
|
|
74
127
|
}
|
|
75
128
|
sendJson(res, 405, { ok: false, error: "method not allowed" });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memento.js","sourceRoot":"","sources":["../../src/dsh-compat/memento.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"memento.js","sourceRoot":"","sources":["../../src/dsh-compat/memento.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAiCzD,MAAM,WAAW,GAAiB;IAChC,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,EAAE;CACZ,CAAC;AAEF,MAAM,aAAa,GAAG,iBAAiB,CACrC,CAAC,SAAS,EAAE,cAAc,CAAC,EAC3B,WAAW,CACZ,CAAC;AAEF,SAAS,gBAAgB,CACvB,OAAgC;IAEhC,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QAC3B,OAAO,OAAO,CAAC,MAAM,CACnB,CAAC,GAAG,EAA2B,EAAE,CAC/B,CAAC,CAAC,GAAG;YACL,OAAO,GAAG,KAAK,QAAQ;YACvB,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,KAAK,QAAQ;YAC/B,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,KAAK,QAAQ,CAClC,CAAC;IACJ,CAAC;IACD,IAAI,OAAO,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;QAC3C,OAAO,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;YAClD,MAAM,CAAC,KAAK,GAAG,SAAS,EAAE,KAAK,GAAG,QAAQ,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC7D,OAAO;gBACL,KAAK;gBACL,KA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K,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;YAC/D,GAAG,OAAO;YACV,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC;SACpD,CAAC,CAAC,CAAC;QACJ,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC3D,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,MAAM,KAAK,KAAK,EAAE,CAAC;QACrB,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;QAC7D,OAAO,IAAI,CAAC;IACd,CAAC;IAED,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,oBAAoB,EAAE,CAAC,CAAC;IAC/D,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,QAAgB;IAC5C,OAAO,QAAQ,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;AAC7C,CAAC"}
|
|
@@ -6,6 +6,30 @@ export declare function buildMnemonStatus(options?: MnemonStatusOptions): unknow
|
|
|
6
6
|
export declare function buildMnemonVersions(): unknown;
|
|
7
7
|
export declare const MNEMON_SETTINGS_DEFAULTS: Record<string, unknown>;
|
|
8
8
|
export declare const MNEMON_UI_SETTINGS_DEFAULTS: Record<string, unknown>;
|
|
9
|
+
/** Provider catalog shape expected by dsh-mnemon settings (`catalog.providers.map`). */
|
|
10
|
+
export declare function buildMnemonProviderCatalog(): {
|
|
11
|
+
readonly providers: ReadonlyArray<{
|
|
12
|
+
readonly id: string;
|
|
13
|
+
readonly label: string;
|
|
14
|
+
}>;
|
|
15
|
+
readonly items: ReadonlyArray<{
|
|
16
|
+
readonly providerId: string;
|
|
17
|
+
readonly enabled: boolean;
|
|
18
|
+
readonly configured: boolean;
|
|
19
|
+
readonly settings: Record<string, unknown>;
|
|
20
|
+
readonly configuredSecrets: readonly string[];
|
|
21
|
+
}>;
|
|
22
|
+
readonly generatedAt: string;
|
|
23
|
+
};
|
|
24
|
+
/** Task-agent model catalog: always include `groups` so UI `.find` / `[0]` never NPE.
|
|
25
|
+
* Do NOT send `defaultSelection`/`effective` as JSON `null` — dsh-mnemon treats only
|
|
26
|
+
* `undefined` as missing (`effective === void 0`); `null.provider` crashes the section.
|
|
27
|
+
*/
|
|
28
|
+
export declare function buildMnemonTaskAgentModels(): {
|
|
29
|
+
readonly groups: readonly unknown[];
|
|
30
|
+
readonly models: readonly unknown[];
|
|
31
|
+
readonly failures: readonly unknown[];
|
|
32
|
+
};
|
|
9
33
|
export declare function handleMnemonRead(endpoint: string, options: MnemonStatusOptions, payload?: Record<string, unknown>): unknown;
|
|
10
34
|
export declare function handleMnemonWrite(endpoint: string, payload: Record<string, unknown>, options?: MnemonStatusOptions): unknown;
|
|
11
35
|
//# sourceMappingURL=mnemon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mnemon.d.ts","sourceRoot":"","sources":["../../src/dsh-compat/mnemon.ts"],"names":[],"mappings":"AAeA,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AAwCD,wBAAgB,iBAAiB,CAAC,OAAO,GAAE,mBAAwB,GAAG,OAAO,CAsE5E;AAED,wBAAgB,mBAAmB,IAAI,OAAO,CA0B7C;AAED,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAM5D,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,MAAM,CAAC,MA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AcA;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,IAAI;IAC5C,QAAQ,CAAC,MAAM,EAAE,SAAS,OAAO,EAAE,CAAC;IACpC,QAAQ,CAAC,MAAM,EAAE,SAAS,OAAO,EAAE,CAAC;IACpC,QAAQ,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,CAAC;CACvC,CAMA;AAED,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,mBAAmB,EAC5B,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GACpC,OAAO,CAyBT;AAED,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,OAAO,GAAE,mBAAwB,GAChC,OAAO,CAyCT"}
|
|
@@ -153,6 +153,33 @@ const MNEMON_LIST_ENDPOINTS = new Set([
|
|
|
153
153
|
"bodies",
|
|
154
154
|
"body-directory",
|
|
155
155
|
]);
|
|
156
|
+
/** Provider catalog shape expected by dsh-mnemon settings (`catalog.providers.map`). */
|
|
157
|
+
export function buildMnemonProviderCatalog() {
|
|
158
|
+
return {
|
|
159
|
+
providers: [{ id: "mnemon-native", label: "mnemon" }],
|
|
160
|
+
items: [
|
|
161
|
+
{
|
|
162
|
+
providerId: "mnemon-native",
|
|
163
|
+
enabled: true,
|
|
164
|
+
configured: true,
|
|
165
|
+
settings: {},
|
|
166
|
+
configuredSecrets: [],
|
|
167
|
+
},
|
|
168
|
+
],
|
|
169
|
+
generatedAt: new Date().toISOString(),
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
/** Task-agent model catalog: always include `groups` so UI `.find` / `[0]` never NPE.
|
|
173
|
+
* Do NOT send `defaultSelection`/`effective` as JSON `null` — dsh-mnemon treats only
|
|
174
|
+
* `undefined` as missing (`effective === void 0`); `null.provider` crashes the section.
|
|
175
|
+
*/
|
|
176
|
+
export function buildMnemonTaskAgentModels() {
|
|
177
|
+
return {
|
|
178
|
+
groups: [],
|
|
179
|
+
models: [],
|
|
180
|
+
failures: [],
|
|
181
|
+
};
|
|
182
|
+
}
|
|
156
183
|
export function handleMnemonRead(endpoint, options, payload = {}) {
|
|
157
184
|
const home = options.xrkHome?.trim();
|
|
158
185
|
if (endpoint === "status" || endpoint === "status-summary") {
|
|
@@ -160,19 +187,16 @@ export function handleMnemonRead(endpoint, options, payload = {}) {
|
|
|
160
187
|
}
|
|
161
188
|
if (endpoint === "versions")
|
|
162
189
|
return buildMnemonVersions();
|
|
163
|
-
if (endpoint === "turn-activities")
|
|
164
|
-
return [];
|
|
190
|
+
if (endpoint === "turn-activities") {
|
|
191
|
+
return { cursor: -1, activities: [] };
|
|
192
|
+
}
|
|
165
193
|
if (endpoint === "documents" || endpoint === "list") {
|
|
166
194
|
return listMnemonDocuments(home);
|
|
167
195
|
}
|
|
168
196
|
if (MNEMON_LIST_ENDPOINTS.has(endpoint))
|
|
169
197
|
return [];
|
|
170
198
|
if (endpoint === "provider-services") {
|
|
171
|
-
return
|
|
172
|
-
items: [],
|
|
173
|
-
providers: [{ id: "mnemon-native", label: "mnemon" }],
|
|
174
|
-
generatedAt: new Date().toISOString(),
|
|
175
|
-
};
|
|
199
|
+
return buildMnemonProviderCatalog();
|
|
176
200
|
}
|
|
177
201
|
if (endpoint === "document") {
|
|
178
202
|
const id = typeof payload.id === "string" ? payload.id : "";
|
|
@@ -181,22 +205,27 @@ export function handleMnemonRead(endpoint, options, payload = {}) {
|
|
|
181
205
|
if (endpoint === "runtime-memory")
|
|
182
206
|
return null;
|
|
183
207
|
if (endpoint === "task-agent-models") {
|
|
184
|
-
return
|
|
208
|
+
return buildMnemonTaskAgentModels();
|
|
185
209
|
}
|
|
186
210
|
return { ok: true, endpoint, items: [] };
|
|
187
211
|
}
|
|
188
212
|
export function handleMnemonWrite(endpoint, payload, options = {}) {
|
|
189
213
|
const home = options.xrkHome?.trim();
|
|
190
|
-
|
|
191
|
-
|
|
214
|
+
// Client prefers write channel for list; must return catalog, not a single row.
|
|
215
|
+
if (endpoint === "provider-services") {
|
|
216
|
+
return buildMnemonProviderCatalog();
|
|
217
|
+
}
|
|
218
|
+
if (endpoint === "provider-service-update") {
|
|
192
219
|
return {
|
|
193
220
|
providerId: typeof payload.providerId === "string"
|
|
194
221
|
? payload.providerId
|
|
195
222
|
: "mnemon-native",
|
|
196
223
|
enabled: payload.enabled !== false,
|
|
224
|
+
configured: true,
|
|
197
225
|
settings: payload.settings && typeof payload.settings === "object"
|
|
198
226
|
? payload.settings
|
|
199
227
|
: {},
|
|
228
|
+
configuredSecrets: [],
|
|
200
229
|
status: "idle",
|
|
201
230
|
activeMemoryBodyCount: 0,
|
|
202
231
|
memoryBodyCount: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mnemon.js","sourceRoot":"","sources":["../../src/dsh-compat/mnemon.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,mBAAmB,CAAC;AAO3B,SAAS,IAAI,CACX,IAAyD,EACzD,IAAY,EACZ,OAAgC;IAEhC,MAAM,GAAG,GACP,IAAI,KAAK,SAAS;QAChB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC;QAC5B,CAAC,CAAC,IAAI,KAAK,eAAe;YACxB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;YAC3B,CAAC,CAAC,IAAI,KAAK,WAAW;gBACpB,CAAC,CAAC,IAAI,CAAC,IAAI,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EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;SACrC,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AACjC,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { ServerResponse } from "node:http";
|
|
2
|
+
export declare const DEVICE_COOKIE = "dsh_ma_device";
|
|
3
|
+
export declare const SESSION_COOKIE = "dsh_ma_session";
|
|
4
|
+
export declare const CSRF_COOKIE = "dsh_ma_csrf";
|
|
5
|
+
export declare const CSRF_HEADER = "x-dsh-mobile-csrf";
|
|
6
|
+
export declare const LAN_PIN_COOKIE = "dsh_ma_lan";
|
|
7
|
+
export declare const WAN_PIN_COOKIE = "dsh_ma_wan";
|
|
8
|
+
export interface MobileStoredDevice {
|
|
9
|
+
id: string;
|
|
10
|
+
label: string;
|
|
11
|
+
tokenDigest: string;
|
|
12
|
+
createdAt: number;
|
|
13
|
+
expiresAt: number;
|
|
14
|
+
lastSeenAt: number;
|
|
15
|
+
revokedAt?: number;
|
|
16
|
+
}
|
|
17
|
+
export interface MobileStoredSession {
|
|
18
|
+
key: string;
|
|
19
|
+
deviceId: string;
|
|
20
|
+
csrfDigest: string;
|
|
21
|
+
createdAt: number;
|
|
22
|
+
expiresAt: number;
|
|
23
|
+
}
|
|
24
|
+
export interface MobileAuthState {
|
|
25
|
+
pairingToken: string;
|
|
26
|
+
pairingExpiresAt: number;
|
|
27
|
+
devices: MobileStoredDevice[];
|
|
28
|
+
sessions: MobileStoredSession[];
|
|
29
|
+
}
|
|
30
|
+
export declare function mintPairingWindow(ttlMs?: number): {
|
|
31
|
+
token: string;
|
|
32
|
+
expiresAt: number;
|
|
33
|
+
};
|
|
34
|
+
export declare function pruneMobileAuth(state: MobileAuthState, now?: number): MobileAuthState;
|
|
35
|
+
export declare function pairDevice(state: MobileAuthState, token: string, label: string | undefined, now?: number): {
|
|
36
|
+
state: MobileAuthState;
|
|
37
|
+
deviceToken: string;
|
|
38
|
+
sessionToken: string;
|
|
39
|
+
csrfToken: string;
|
|
40
|
+
deviceId: string;
|
|
41
|
+
deviceExpiresAt: number;
|
|
42
|
+
sessionExpiresAt: number;
|
|
43
|
+
};
|
|
44
|
+
export declare function renewSession(state: MobileAuthState, deviceToken: string, now?: number): {
|
|
45
|
+
state: MobileAuthState;
|
|
46
|
+
sessionToken: string;
|
|
47
|
+
csrfToken: string;
|
|
48
|
+
sessionExpiresAt: number;
|
|
49
|
+
};
|
|
50
|
+
export declare function setMobileSessionCookies(res: ServerResponse, tokens: {
|
|
51
|
+
deviceToken: string;
|
|
52
|
+
sessionToken: string;
|
|
53
|
+
csrfToken: string;
|
|
54
|
+
deviceExpiresAt: number;
|
|
55
|
+
sessionExpiresAt: number;
|
|
56
|
+
}, tls?: boolean): void;
|
|
57
|
+
export declare function parseCookieHeader(header: string | undefined, name: string): string | undefined;
|
|
58
|
+
export declare function accessPinCookieDigest(pin: string, instanceId: string): string;
|
|
59
|
+
export declare function verifyAccessPinCookie(cookieValue: string | undefined, pin: string, instanceId: string): boolean;
|
|
60
|
+
export declare function verifyMobileSession(state: MobileAuthState, sessionToken: string | undefined, now?: number): boolean;
|
|
61
|
+
export declare function setAccessPinCookie(res: ServerResponse, cookieName: string, pin: string, instanceId: string, tls?: boolean): void;
|
|
62
|
+
export declare function publicDevice(device: MobileStoredDevice): Record<string, unknown>;
|
|
63
|
+
export declare const PAIR_PAGE_HTML = "<!doctype html>\n<html lang=\"zh-CN\">\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width,initial-scale=1,viewport-fit=cover\">\n<title>\u914D\u5BF9 XRK \u79FB\u52A8\u8BBF\u95EE</title>\n<main style=\"font-family:system-ui,sans-serif;max-width:28rem;margin:2rem auto;padding:0 1rem\">\n <h1>\u914D\u5BF9\u6B64\u8BBE\u5907</h1>\n <p>\u8F93\u5165\u684C\u9762\u7AEF\u663E\u793A\u7684\u914D\u5BF9\u7801\uFF0C\u6216\u4ECE\u4E8C\u7EF4\u7801\u94FE\u63A5\u81EA\u52A8\u586B\u5145\u3002</p>\n <form id=\"pair-form\">\n <label style=\"display:block;margin:.75rem 0\">\u914D\u5BF9\u7801\n <input id=\"pair-token\" autocomplete=\"one-time-code\" required style=\"width:100%;padding:.5rem\">\n </label>\n <label style=\"display:block;margin:.75rem 0\">\u8BBE\u5907\u540D\u79F0\n <input id=\"device-label\" maxlength=\"64\" autocomplete=\"off\" style=\"width:100%;padding:.5rem\">\n </label>\n <button type=\"submit\" style=\"padding:.5rem 1rem\">\u914D\u5BF9</button>\n <output id=\"pair-status\" style=\"display:block;margin-top:.75rem\"></output>\n </form>\n</main>\n<script src=\"/mobile-access/pair.js\" defer></script>\n</html>";
|
|
64
|
+
export declare const PAIR_PAGE_JS = "(() => {\n const params = new URLSearchParams(location.hash.replace(/^#/, ''))\n const tokenInput = document.getElementById('pair-token')\n const labelInput = document.getElementById('device-label')\n const status = document.getElementById('pair-status')\n const form = document.getElementById('pair-form')\n const hashToken = params.get('token')\n if (hashToken && tokenInput) tokenInput.value = hashToken\n form?.addEventListener('submit', async (event) => {\n event.preventDefault()\n status.textContent = '\u914D\u5BF9\u4E2D\u2026'\n const response = await fetch('/mobile-access/auth/pair', {\n method: 'POST',\n credentials: 'same-origin',\n headers: { 'content-type': 'application/json' },\n body: JSON.stringify({\n token: tokenInput?.value ?? '',\n label: labelInput?.value || undefined,\n }),\n })\n if (!response.ok) {\n status.textContent = '\u914D\u5BF9\u5931\u8D25\uFF08\u94FE\u63A5\u53EF\u80FD\u5DF2\u8FC7\u671F\uFF09'\n return\n }\n location.replace('/')\n })\n})()\n";
|
|
65
|
+
export declare const LOGIN_PAGE_HTML = "<!doctype html>\n<html lang=\"zh-CN\">\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width,initial-scale=1,viewport-fit=cover\">\n<title>XRK \u79FB\u52A8\u8BBF\u95EE</title>\n<main style=\"font-family:system-ui,sans-serif;max-width:28rem;margin:2rem auto;padding:0 1rem\">\n <h1>\u6B63\u5728\u6062\u590D\u4F1A\u8BDD\u2026</h1>\n <p id=\"login-progress\">\u6B63\u5728\u9A8C\u8BC1\u8BBE\u5907\u51ED\u636E\u3002</p>\n <p id=\"login-failed\" hidden>\u65E0\u6CD5\u6062\u590D\u4F1A\u8BDD\uFF0C\u8BF7\u91CD\u65B0\u914D\u5BF9\u3002</p>\n <a href=\"/mobile-access/pair\">\u6253\u5F00\u914D\u5BF9\u9875</a>\n</main>\n<script src=\"/mobile-access/login.js\" defer></script>\n</html>";
|
|
66
|
+
export declare const LOGIN_PAGE_JS = "(() => {\n fetch('/mobile-access/auth/renew', {\n method: 'POST',\n credentials: 'same-origin',\n headers: { 'content-type': 'application/json' },\n body: '{}',\n }).then((response) => {\n if (response.ok) {\n const next = new URLSearchParams(location.search).get('return') || '/'\n location.replace(next)\n return\n }\n document.getElementById('login-progress').hidden = true\n document.getElementById('login-failed').hidden = false\n }).catch(() => {\n const el = document.getElementById('login-progress')\n if (el) el.textContent = '\u65E0\u6CD5\u8FDE\u63A5\u5230\u4E3B\u673A\u3002'\n })\n})()\n";
|
|
67
|
+
export declare const LAN_PIN_PAGE_HTML: string;
|
|
68
|
+
export declare const WAN_PIN_PAGE_HTML: string;
|
|
69
|
+
export declare const LAN_PIN_PAGE_JS: string;
|
|
70
|
+
export declare const WAN_PIN_PAGE_JS: string;
|
|
71
|
+
//# sourceMappingURL=mobile-access-auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mobile-access-auth.d.ts","sourceRoot":"","sources":["../../src/dsh-compat/mobile-access-auth.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhD,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAC7C,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAC/C,eAAO,MAAM,WAAW,gBAAgB,CAAC;AACzC,eAAO,MAAM,WAAW,sBA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