@xrkseek/harness-cli 0.1.2 → 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.d.ts.map +1 -1
- package/dist/commands/plugin.js +23 -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.d.ts +3 -0
- package/dist/plugin/index.d.ts.map +1 -1
- package/dist/plugin/index.js +15 -5
- package/dist/plugin/index.js.map +1 -1
- package/dist/plugin/install-client.d.ts +2 -0
- package/dist/plugin/install-client.d.ts.map +1 -1
- package/dist/plugin/install-client.js +24 -9
- package/dist/plugin/install-client.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/dist/plugin/staging-reconcile.d.ts +8 -0
- package/dist/plugin/staging-reconcile.d.ts.map +1 -0
- package/dist/plugin/staging-reconcile.js +67 -0
- package/dist/plugin/staging-reconcile.js.map +1 -0
- package/dist/product-paths.d.ts.map +1 -1
- package/dist/product-paths.js +8 -0
- package/dist/product-paths.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 +31 -31
- package/product-web/plugins/@xrkseek/client-ui-attachment/client.js +12 -12
- package/product-web/plugins/@xrkseek/client-ui-commands/client.js +8 -8
- package/product-web/plugins/@xrkseek/client-ui-conversation/client.js +186 -190
- package/product-web/plugins/@xrkseek/client-ui-deliverables/client.js +6 -6
- package/product-web/plugins/@xrkseek/client-ui-directory-picker-browse/client.js +27 -27
- package/product-web/plugins/@xrkseek/client-ui-goal/client.js +8 -8
- package/product-web/plugins/@xrkseek/client-ui-input-trigger/client.js +6 -6
- package/product-web/plugins/@xrkseek/client-ui-jobs/client.js +8 -8
- package/product-web/plugins/@xrkseek/client-ui-layout/client.js +4 -4
- package/product-web/plugins/@xrkseek/client-ui-message-feedback/client.js +3 -3
- package/product-web/plugins/@xrkseek/client-ui-model-selection/client.js +17 -17
- package/product-web/plugins/@xrkseek/client-ui-permission-presets/client.js +4 -4
- package/product-web/plugins/@xrkseek/client-ui-plan/client.js +3 -3
- package/product-web/plugins/@xrkseek/client-ui-settings-general/client.js +28 -20
- package/product-web/plugins/@xrkseek/client-ui-settings-models/client.js +53 -53
- package/product-web/plugins/@xrkseek/client-ui-settings-plugin-inventory/client.js +11 -11
- package/product-web/plugins/@xrkseek/client-ui-settings-plugins/client.js +37 -37
- package/product-web/plugins/@xrkseek/client-ui-sidebar/client.js +13 -13
- package/product-web/plugins/@xrkseek/client-ui-skill/client.js +12 -12
- package/product-web/plugins/@xrkseek/client-ui-subagent/client.js +21 -21
- package/product-web/plugins/@xrkseek/client-ui-theme/client.js +3 -3
- package/product-web/plugins/@xrkseek/client-ui-tool/client.js +40 -40
- package/product-web/plugins/@xrkseek/client-ui-trajectory/client.js +141 -141
- package/product-web/plugins/@xrkseek/client-ui-user-questions/client.js +29 -29
- package/product-web/plugins/@xrkseek/client-ui-workflow-run/client.js +18 -18
- package/product-web/plugins/@xrkseek/client-ui-workspace/client.js +54 -54
- package/product-web/assets/index-CHKZdZNt.js +0 -112
- package/product-web/assets/index-CHKZdZNt.js.map +0 -1
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mobile remote tunnel runtime — tailscale funnel + cpolar controllers.
|
|
3
|
+
*/
|
|
4
|
+
import { readFile, writeFile } from "node:fs/promises";
|
|
5
|
+
import { existsSync } from "node:fs";
|
|
6
|
+
import path from "node:path";
|
|
7
|
+
import { dataPath } from "./underlying/json-store.js";
|
|
8
|
+
import { CpolarComponentManager, } from "./mobile-access-cpolar-component.js";
|
|
9
|
+
import { resolveFunnelSidecarPath } from "./mobile-access-funnel-sidecar.js";
|
|
10
|
+
import { CpolarRemoteController, FunnelRemoteController, createRemoteGatewayFactory, } from "./mobile-access-remote-controllers.js";
|
|
11
|
+
function resolveUpstreamUrl() {
|
|
12
|
+
const direct = process.env.XRK_SERVE_URL?.trim();
|
|
13
|
+
if (direct)
|
|
14
|
+
return direct.replace(/\/$/, "");
|
|
15
|
+
const port = process.env.XRK_SERVE_PORT?.trim() || "8099";
|
|
16
|
+
return `http://127.0.0.1:${port}`;
|
|
17
|
+
}
|
|
18
|
+
async function readJsonFile(file, fallback) {
|
|
19
|
+
if (!existsSync(file))
|
|
20
|
+
return fallback;
|
|
21
|
+
try {
|
|
22
|
+
return JSON.parse(await readFile(file, "utf8"));
|
|
23
|
+
}
|
|
24
|
+
catch {
|
|
25
|
+
return fallback;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
async function writeJsonAtomic(file, data) {
|
|
29
|
+
const dir = path.dirname(file);
|
|
30
|
+
await import("node:fs/promises").then((fs) => fs.mkdir(dir, { recursive: true }));
|
|
31
|
+
await writeFile(file, `${JSON.stringify(data, null, 2)}\n`, "utf8");
|
|
32
|
+
}
|
|
33
|
+
export class MobileRemoteRuntime {
|
|
34
|
+
xrkHome;
|
|
35
|
+
remoteDir;
|
|
36
|
+
tailscaleControlFile;
|
|
37
|
+
cpolarControlFile;
|
|
38
|
+
providerFile;
|
|
39
|
+
tailscaleStateDir;
|
|
40
|
+
cpolarComponent;
|
|
41
|
+
provider = "tailscale";
|
|
42
|
+
createGateway;
|
|
43
|
+
tailscale;
|
|
44
|
+
cpolar;
|
|
45
|
+
initialized = false;
|
|
46
|
+
initPromise;
|
|
47
|
+
constructor(xrkHome) {
|
|
48
|
+
this.xrkHome = xrkHome;
|
|
49
|
+
this.remoteDir = dataPath(xrkHome, "mobile-access", "remote");
|
|
50
|
+
this.tailscaleControlFile = path.join(this.remoteDir, "tailscale", "control.json");
|
|
51
|
+
this.cpolarControlFile = path.join(this.remoteDir, "cpolar", "control.json");
|
|
52
|
+
this.providerFile = path.join(this.remoteDir, "provider.json");
|
|
53
|
+
this.tailscaleStateDir = path.join(this.remoteDir, "tailscale", "state");
|
|
54
|
+
this.cpolarComponent = new CpolarComponentManager(xrkHome);
|
|
55
|
+
}
|
|
56
|
+
async ensureInitialized(instanceId) {
|
|
57
|
+
if (this.initialized)
|
|
58
|
+
return;
|
|
59
|
+
if (this.initPromise) {
|
|
60
|
+
await this.initPromise;
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
this.initPromise = this.doInitialize(instanceId);
|
|
64
|
+
await this.initPromise;
|
|
65
|
+
}
|
|
66
|
+
async doInitialize(instanceId) {
|
|
67
|
+
await this.cpolarComponent.initialize();
|
|
68
|
+
this.createGateway = await createRemoteGatewayFactory(resolveUpstreamUrl());
|
|
69
|
+
const providerDoc = await readJsonFile(this.providerFile, {
|
|
70
|
+
version: 1,
|
|
71
|
+
provider: "tailscale",
|
|
72
|
+
});
|
|
73
|
+
this.provider =
|
|
74
|
+
providerDoc.provider === "cpolar" ? "cpolar" : "tailscale";
|
|
75
|
+
const funnelExe = resolveFunnelSidecarPath(this.xrkHome) ?? "";
|
|
76
|
+
const hostname = `xrk-${instanceId.slice(0, 12)}`;
|
|
77
|
+
this.tailscale = new FunnelRemoteController(this.createGateway, () => this.loadControl(this.tailscaleControlFile), (enabled) => this.saveControl(this.tailscaleControlFile, enabled), funnelExe, this.tailscaleStateDir, hostname);
|
|
78
|
+
this.cpolar = new CpolarRemoteController(this.createGateway, () => this.loadControl(this.cpolarControlFile), (enabled) => this.saveControl(this.cpolarControlFile, enabled), this.cpolarComponent.executable, this.cpolarComponent.configFile, "cn");
|
|
79
|
+
await this.tailscale.initialize();
|
|
80
|
+
await this.cpolar.initialize();
|
|
81
|
+
this.initialized = true;
|
|
82
|
+
}
|
|
83
|
+
async loadControl(file) {
|
|
84
|
+
const doc = await readJsonFile(file, {
|
|
85
|
+
version: 1,
|
|
86
|
+
enabled: false,
|
|
87
|
+
});
|
|
88
|
+
return doc.enabled === true;
|
|
89
|
+
}
|
|
90
|
+
async saveControl(file, enabled) {
|
|
91
|
+
await writeJsonAtomic(file, { version: 1, enabled });
|
|
92
|
+
}
|
|
93
|
+
activeController() {
|
|
94
|
+
return this.provider === "cpolar" ? this.cpolar : this.tailscale;
|
|
95
|
+
}
|
|
96
|
+
async selectProvider(provider) {
|
|
97
|
+
if (provider === this.provider)
|
|
98
|
+
return;
|
|
99
|
+
const previous = this.activeController();
|
|
100
|
+
const wasEnabled = previous.status().enabled;
|
|
101
|
+
if (wasEnabled)
|
|
102
|
+
await previous.setEnabled(false);
|
|
103
|
+
try {
|
|
104
|
+
await writeJsonAtomic(this.providerFile, { version: 1, provider });
|
|
105
|
+
this.provider = provider;
|
|
106
|
+
}
|
|
107
|
+
catch (err) {
|
|
108
|
+
if (wasEnabled)
|
|
109
|
+
await previous.setEnabled(true);
|
|
110
|
+
throw err;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
buildRemotePayload() {
|
|
114
|
+
const active = this.activeController();
|
|
115
|
+
const status = active.status();
|
|
116
|
+
const gateway = active.gateway();
|
|
117
|
+
const tailscaleStatus = this.tailscale.status();
|
|
118
|
+
const cpolarStatus = this.cpolar.status();
|
|
119
|
+
return {
|
|
120
|
+
provider: this.provider,
|
|
121
|
+
running: status.enabled,
|
|
122
|
+
state: status.state,
|
|
123
|
+
...(status.origin ? { origin: status.origin } : {}),
|
|
124
|
+
...(status.loginUrl ? { loginUrl: status.loginUrl } : {}),
|
|
125
|
+
...(status.setupUrl ? { setupUrl: status.setupUrl } : {}),
|
|
126
|
+
...(status.errorCode ? { errorCode: status.errorCode } : {}),
|
|
127
|
+
...(gateway
|
|
128
|
+
? { extensions: gateway.extensionStatus() }
|
|
129
|
+
: {}),
|
|
130
|
+
providers: {
|
|
131
|
+
tailscale: {
|
|
132
|
+
bundled: true,
|
|
133
|
+
running: tailscaleStatus.enabled,
|
|
134
|
+
state: tailscaleStatus.state,
|
|
135
|
+
...(tailscaleStatus.origin ? { origin: tailscaleStatus.origin } : {}),
|
|
136
|
+
...(tailscaleStatus.loginUrl
|
|
137
|
+
? { loginUrl: tailscaleStatus.loginUrl }
|
|
138
|
+
: {}),
|
|
139
|
+
},
|
|
140
|
+
cpolar: {
|
|
141
|
+
bundled: false,
|
|
142
|
+
running: cpolarStatus.enabled,
|
|
143
|
+
state: cpolarStatus.state,
|
|
144
|
+
component: this.cpolarComponent.status(),
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
async setRemoteEnabled(enabled) {
|
|
150
|
+
await this.activeController().setEnabled(enabled);
|
|
151
|
+
return this.buildRemotePayload();
|
|
152
|
+
}
|
|
153
|
+
async reconnect() {
|
|
154
|
+
await this.activeController().reconnect();
|
|
155
|
+
return this.buildRemotePayload();
|
|
156
|
+
}
|
|
157
|
+
async resetRemote() {
|
|
158
|
+
await this.activeController().reset();
|
|
159
|
+
return this.buildRemotePayload();
|
|
160
|
+
}
|
|
161
|
+
getProvider() {
|
|
162
|
+
return this.provider;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
const runtimes = new Map();
|
|
166
|
+
export function getMobileRemoteRuntime(xrkHome) {
|
|
167
|
+
const key = dataPath(xrkHome, "mobile-access");
|
|
168
|
+
let rt = runtimes.get(key);
|
|
169
|
+
if (!rt) {
|
|
170
|
+
rt = new MobileRemoteRuntime(xrkHome);
|
|
171
|
+
runtimes.set(key, rt);
|
|
172
|
+
}
|
|
173
|
+
return rt;
|
|
174
|
+
}
|
|
175
|
+
/** Rebuild controllers after funnel sidecar is downloaded. */
|
|
176
|
+
export function resetMobileRemoteRuntime(xrkHome) {
|
|
177
|
+
runtimes.delete(dataPath(xrkHome, "mobile-access"));
|
|
178
|
+
}
|
|
179
|
+
//# sourceMappingURL=mobile-access-remote-runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mobile-access-remote-runtime.js","sourceRoot":"","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CAAC,kBAAkB,EAAE,CAAC;IACnC,CAAC;IAED,WAAW;QACT,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;CACF;AAED,MAAM,QAAQ,GAAG,IAAI,GAAG,EAA+B,CAAC;AAExD,MAAM,UAAU,sBAAsB,CACpC,OAA2B;IAE3B,MAAM,GAAG,GAAG,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;IAC/C,IAAI,EAAE,GAAG,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC3B,IAAI,CAAC,EAAE,EAAE,CAAC;QACR,EAAE,GAAG,IAAI,mBAAmB,CAAC,OAAO,CAAC,CAAC;QACtC,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IACxB,CAAC;IACD,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,8DAA8D;AAC9D,MAAM,UAAU,wBAAwB,CAAC,OAA2B;IAClE,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type RemoteProviderId = "tailscale" | "cpolar";
|
|
2
|
+
export interface RemoteProviderProbe {
|
|
3
|
+
bundled: boolean;
|
|
4
|
+
running: boolean;
|
|
5
|
+
state: string;
|
|
6
|
+
origin?: string;
|
|
7
|
+
loginUrl?: string;
|
|
8
|
+
setupUrl?: string;
|
|
9
|
+
errorCode?: string;
|
|
10
|
+
component?: Record<string, unknown>;
|
|
11
|
+
}
|
|
12
|
+
export interface RemoteProbeSnapshot {
|
|
13
|
+
tailscale: RemoteProviderProbe;
|
|
14
|
+
cpolar: RemoteProviderProbe;
|
|
15
|
+
}
|
|
16
|
+
export declare function probeRemoteProviders(): Promise<RemoteProbeSnapshot>;
|
|
17
|
+
export declare function buildRemoteControlPayload(provider: RemoteProviderId, enabled: boolean, probes: RemoteProbeSnapshot): Record<string, unknown>;
|
|
18
|
+
export declare function clearRemoteProbeCache(): void;
|
|
19
|
+
//# sourceMappingURL=mobile-access-remote.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mobile-access-remote.d.ts","sourceRoot":"","sources":["../../src/dsh-compat/mobile-access-remote.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG,QAAQ,CAAC;AAEtD,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACrC;AAED,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,mBAAmB,CAAC;IAC/B,MAAM,EAAE,mBAAmB,CAAC;CAC7B;AAqFD,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,mBAAmB,CAAC,CASzE;AAED,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,gBAAgB,EAC1B,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,mBAAmB,GAC1B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAazB;AAED,wBAAgB,qBAAqB,IAAI,IAAI,CAE5C"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* dsh-mobile remote tunnel probe — CLI discovery (no hardcoded vendor hosts).
|
|
3
|
+
*/
|
|
4
|
+
import { execFile } from "node:child_process";
|
|
5
|
+
import { promisify } from "node:util";
|
|
6
|
+
const execFileAsync = promisify(execFile);
|
|
7
|
+
async function probeCommand(command, args, timeoutMs = 4_000) {
|
|
8
|
+
try {
|
|
9
|
+
const { stdout } = await execFileAsync(command, [...args], {
|
|
10
|
+
timeout: timeoutMs,
|
|
11
|
+
windowsHide: true,
|
|
12
|
+
encoding: "utf8",
|
|
13
|
+
});
|
|
14
|
+
return { ok: true, stdout: String(stdout) };
|
|
15
|
+
}
|
|
16
|
+
catch (err) {
|
|
17
|
+
const code = err && typeof err === "object" && "code" in err
|
|
18
|
+
? String(err.code)
|
|
19
|
+
: "probe-failed";
|
|
20
|
+
return { ok: false, code };
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
async function probeTailscale() {
|
|
24
|
+
const which = await probeCommand(process.platform === "win32" ? "where" : "which", ["tailscale"]);
|
|
25
|
+
if (!which.ok) {
|
|
26
|
+
return { bundled: false, running: false, state: "not-installed" };
|
|
27
|
+
}
|
|
28
|
+
const status = await probeCommand("tailscale", ["status", "--json"]);
|
|
29
|
+
if (!status.ok) {
|
|
30
|
+
return {
|
|
31
|
+
bundled: true,
|
|
32
|
+
running: false,
|
|
33
|
+
state: "stopped",
|
|
34
|
+
errorCode: status.code,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
try {
|
|
38
|
+
const json = JSON.parse(status.stdout);
|
|
39
|
+
const backend = json.BackendState ?? "unknown";
|
|
40
|
+
const online = json.Self?.Online === true;
|
|
41
|
+
const dns = json.Self?.DNSName?.trim();
|
|
42
|
+
return {
|
|
43
|
+
bundled: true,
|
|
44
|
+
running: online || backend === "Running",
|
|
45
|
+
state: backend.toLowerCase(),
|
|
46
|
+
...(dns ? { origin: `https://${dns.replace(/\.$/, "")}` } : {}),
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
catch {
|
|
50
|
+
return { bundled: true, running: false, state: "parse-error" };
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
async function probeCpolar() {
|
|
54
|
+
const which = await probeCommand(process.platform === "win32" ? "where" : "which", ["cpolar"]);
|
|
55
|
+
if (!which.ok) {
|
|
56
|
+
return {
|
|
57
|
+
bundled: false,
|
|
58
|
+
running: false,
|
|
59
|
+
state: "not-installed",
|
|
60
|
+
component: { installed: false },
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
const version = await probeCommand("cpolar", ["version"]);
|
|
64
|
+
const running = version.ok;
|
|
65
|
+
return {
|
|
66
|
+
bundled: true,
|
|
67
|
+
running,
|
|
68
|
+
state: running ? "available" : "stopped",
|
|
69
|
+
component: { installed: true, version: running ? version.stdout.trim() : "" },
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
let cached;
|
|
73
|
+
const CACHE_MS = 10_000;
|
|
74
|
+
export async function probeRemoteProviders() {
|
|
75
|
+
if (cached && Date.now() - cached.ts < CACHE_MS)
|
|
76
|
+
return cached.data;
|
|
77
|
+
const [tailscale, cpolar] = await Promise.all([
|
|
78
|
+
probeTailscale(),
|
|
79
|
+
probeCpolar(),
|
|
80
|
+
]);
|
|
81
|
+
const data = { tailscale, cpolar };
|
|
82
|
+
cached = { ts: Date.now(), data };
|
|
83
|
+
return data;
|
|
84
|
+
}
|
|
85
|
+
export function buildRemoteControlPayload(provider, enabled, probes) {
|
|
86
|
+
const active = provider === "cpolar" ? probes.cpolar : probes.tailscale;
|
|
87
|
+
return {
|
|
88
|
+
provider,
|
|
89
|
+
running: enabled && active.running,
|
|
90
|
+
state: enabled ? (active.running ? "connected" : active.state) : "disabled",
|
|
91
|
+
...(enabled && active.origin ? { origin: active.origin } : {}),
|
|
92
|
+
...(active.loginUrl ? { loginUrl: active.loginUrl } : {}),
|
|
93
|
+
providers: {
|
|
94
|
+
tailscale: probes.tailscale,
|
|
95
|
+
cpolar: probes.cpolar,
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
export function clearRemoteProbeCache() {
|
|
100
|
+
cached = undefined;
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=mobile-access-remote.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mobile-access-remote.js","sourceRoot":"","sources":["../../src/dsh-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CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC;IACxE,OAAO;QACL,QAAQ;QACR,OAAO,EAAE,OAAO,IAAI,MAAM,CAAC,OAAO;QAClC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU;QAC3E,GAAG,CAAC,OAAO,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC9D,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACzD,SAAS,EAAE;YACT,SAAS,EAAE,MAAM,CAAC,SAAS;YAC3B,MAAM,EAAE,MAAM,CAAC,MAAM;SACtB;KACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,qBAAqB;IACnC,MAAM,GAAG,SAAS,CAAC;AACrB,CAAC"}
|
|
@@ -1,21 +1,48 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* Opens same-origin access (no Cordis tunnel); Android app pairing uses generated appKey.
|
|
2
|
+
* Mobile access — pairing, LAN/WAN PIN, same-origin control plane (XRK Host).
|
|
4
3
|
*/
|
|
5
4
|
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
5
|
+
import { type MobileAuthState } from "./mobile-access-auth.js";
|
|
6
|
+
import { type RemoteProviderId } from "./mobile-access-remote-runtime.js";
|
|
7
|
+
/**
|
|
8
|
+
* Product-shell mobile seam for `/mobile-access/custom.css`.
|
|
9
|
+
* Clears session header chrome that collides with dsh-mobile / pocket nav.
|
|
10
|
+
*/
|
|
11
|
+
export declare const XRK_MOBILE_SHELL_CSS = "/* XRK shell mobile seam */\n@media (max-width: 900px) {\n [data-slot=\"conversation.session.header.actions\"],\n [data-slot=\"conversation.session.header.utilities\"] {\n display: none !important;\n }\n [role=\"tablist\"] {\n padding-inline: 44px;\n }\n}\n";
|
|
12
|
+
/** Inject shell seam stylesheet into product index (works without dsh-mobile fetch). */
|
|
13
|
+
export declare function injectMobileAccessShellIntoHtml(html: string): string;
|
|
6
14
|
export interface MobileAccessOptions {
|
|
7
15
|
readonly xrkHome?: string;
|
|
8
16
|
}
|
|
9
|
-
interface MobileState {
|
|
17
|
+
interface MobileState extends MobileAuthState {
|
|
10
18
|
running: boolean;
|
|
11
19
|
appKey: string;
|
|
12
20
|
csrf: string;
|
|
13
21
|
customCss: string;
|
|
14
22
|
customJs: string;
|
|
15
23
|
origin: string;
|
|
24
|
+
instanceId: string;
|
|
25
|
+
remoteProvider: RemoteProviderId;
|
|
26
|
+
remoteEnabled: boolean;
|
|
27
|
+
lanIpOverride: string;
|
|
28
|
+
lanAuthEnabled: boolean;
|
|
29
|
+
lanToken: string;
|
|
30
|
+
wanToken: string;
|
|
31
|
+
lanPinCustom: boolean;
|
|
32
|
+
wanPinCustom: boolean;
|
|
33
|
+
restartNotice: boolean;
|
|
16
34
|
}
|
|
17
|
-
/**
|
|
35
|
+
/** Read-only mobile-access runtime snapshot (revision envelope `data`). */
|
|
18
36
|
export declare function readMobileAccessSnapshot(options: MobileAccessOptions): Pick<MobileState, "running" | "origin" | "appKey">;
|
|
37
|
+
export declare function readMobileAccessState(options: MobileAccessOptions): MobileState;
|
|
38
|
+
export declare function patchMobileAccessState(options: MobileAccessOptions, patch: Partial<MobileState>): MobileState;
|
|
39
|
+
export declare function mint8DigitPin(): string;
|
|
40
|
+
export declare function listLanIPv4Candidates(): string[];
|
|
41
|
+
export declare function buildMobileLanUrl(state: MobileState, req?: IncomingMessage): string;
|
|
42
|
+
/** Lazy-start LAN access when dsh-pocket settings opens (matches DSH pocket auto-proxy). */
|
|
43
|
+
export declare function ensureMobileAccessRunning(options: MobileAccessOptions, req?: IncomingMessage): MobileState;
|
|
44
|
+
/** Prefer LAN IPv4 when the Host header is loopback (phone cannot reach 127.0.0.1). */
|
|
45
|
+
export declare function requestLanOrigin(req: IncomingMessage): string;
|
|
19
46
|
export declare function handleMobileAccessHttp(req: IncomingMessage, res: ServerResponse, pathname: string, options: MobileAccessOptions): Promise<boolean>;
|
|
20
47
|
export declare function isMobileAccessPath(pathname: string): boolean;
|
|
21
48
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mobile-access.d.ts","sourceRoot":"","sources":["../../src/dsh-compat/mobile-access.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"mobile-access.d.ts","sourceRoot":"","sources":["../../src/dsh-compat/mobile-access.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAMjE,OAAO,EAqBL,KAAK,eAAe,EAGrB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,mCAAmC,CAAC;AAG3C;;;GAGG;AACH,eAAO,MAAM,oBAAoB,iRAUhC,CAAC;AAEF,wFAAwF;AACxF,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQpE;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,UAAU,WAAY,SAAQ,eAAe;IAC3C,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,gBAAgB,CAAC;IACjC,aAAa,EAAE,OAAO,CAAC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