mn-ws-server 0.0.0-stage → 0.2.0

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.
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env node
2
+ // mn-ws-server 唯一入口。
3
+ //
4
+ // 运行的是构建产物 dist/(node 由 tsc 输出)。发布前必须先 pnpm build。
5
+ import { runServerCli } from '../dist/cli.js';
6
+
7
+ runServerCli(process.argv.slice(2)).catch((err) => {
8
+ console.error(err && err.stack ? err.stack : String(err));
9
+ process.exitCode = 1;
10
+ });
@@ -0,0 +1 @@
1
+ {"fileNames":["../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../src/apps.ts","../src/auth.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/compatibility/disposable.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/compatibility/indexable.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/compatibility/iterators.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/compatibility/index.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/globals.typedarray.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/buffer.buffer.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/globals.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/web-globals/abortcontroller.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/web-globals/domexception.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/web-globals/events.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/header.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/readable.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/file.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/fetch.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/formdata.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/connector.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/client.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/errors.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/dispatcher.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/global-dispatcher.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/global-origin.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/pool-stats.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/pool.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/handlers.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/balanced-pool.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/agent.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-interceptor.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-agent.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-client.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-pool.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/mock-errors.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/proxy-agent.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/env-http-proxy-agent.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/retry-handler.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/retry-agent.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/api.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/interceptors.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/util.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/cookies.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/patch.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/websocket.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/eventsource.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/filereader.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/diagnostics-channel.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/content-type.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/cache.d.ts","../../node_modules/.pnpm/undici-types@6.21.0/node_modules/undici-types/index.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/web-globals/fetch.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/web-globals/navigator.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/web-globals/storage.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/web-globals/streams.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/assert.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/assert/strict.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/async_hooks.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/buffer.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/child_process.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/cluster.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/console.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/constants.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/crypto.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/dgram.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/diagnostics_channel.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/dns.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/dns/promises.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/domain.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/events.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/fs.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/fs/promises.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/http.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/http2.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/https.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/inspector.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/inspector.generated.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/module.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/net.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/os.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/path.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/perf_hooks.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/process.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/punycode.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/querystring.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/readline.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/readline/promises.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/repl.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/sea.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/sqlite.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/stream.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/stream/promises.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/stream/consumers.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/stream/web.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/string_decoder.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/test.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/timers.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/timers/promises.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/tls.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/trace_events.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/tty.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/url.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/util.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/v8.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/vm.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/wasi.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/worker_threads.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/zlib.d.ts","../../node_modules/.pnpm/@types+node@22.20.5/node_modules/@types/node/index.d.ts","../../node_modules/.pnpm/@types+ws@8.18.2/node_modules/@types/ws/index.d.mts","../src/protocol.ts","../src/logger.ts","../src/store.ts","../src/server.ts","../src/config.ts","../src/cli.ts","../src/index.ts"],"fileIdsList":[[65,111,112,114,131,132],[65,113,114,131,132],[114,131,132],[65,114,119,131,132,149],[65,114,115,120,125,131,132,134,146,157],[65,114,115,116,125,131,132,134],[65,114,131,132],[60,61,62,65,114,131,132],[65,114,117,131,132,158],[65,114,118,119,126,131,132,135],[65,114,119,131,132,146,154],[65,114,120,122,125,131,132,134],[65,113,114,121,131,132],[65,114,122,123,131,132],[65,114,124,125,131,132],[65,113,114,125,131,132],[65,114,125,126,127,131,132,146,157],[65,114,125,126,127,131,132,141,146,149],[65,106,114,122,125,128,131,132,134,146,157],[65,114,125,126,128,129,131,132,134,146,154,157],[65,114,128,130,131,132,146,154,157],[63,64,65,66,67,68,69,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163],[65,114,125,131,132],[65,114,131,132,133,157],[65,114,122,125,131,132,134,146],[65,114,131,132,135],[65,114,131,132,136],[65,113,114,131,132,137],[65,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163],[65,114,131,132,139],[65,114,131,132,140],[65,114,125,131,132,141,142],[65,114,131,132,141,143,158,160],[65,114,126,131,132],[65,114,125,131,132,146,147,149],[65,114,131,132,148,149],[65,114,131,132,146,147],[65,114,131,132,149],[65,114,131,132,150],[65,111,114,131,132,146,151,157],[65,114,125,131,132,152,153],[65,114,131,132,152,153],[65,114,119,131,132,134,146,154],[65,114,131,132,155],[65,114,131,132,134,156],[65,114,128,131,132,140,157],[65,114,119,131,132,158],[65,114,131,132,146,159],[65,114,131,132,133,160],[65,114,131,132,161],[65,106,114,131,132],[65,106,114,125,127,131,132,137,146,149,157,159,160,162],[65,114,131,132,146,163],[65,114,125,128,130,131,132,134,146,154,157,163,164],[65,78,82,114,131,132,157],[65,78,114,131,132,146,157],[65,73,114,131,132],[65,75,78,114,131,132,154,157],[65,114,131,132,134,154],[65,114,131,132,164],[65,73,114,131,132,164],[65,75,78,114,131,132,134,157],[65,70,71,74,77,114,125,131,132,146,157],[65,78,85,114,131,132],[65,70,76,114,131,132],[65,78,99,100,114,131,132],[65,74,78,114,131,132,149,157,164],[65,99,114,131,132,164],[65,72,73,114,131,132,164],[65,78,114,131,132],[65,72,73,74,75,76,77,78,79,80,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,100,101,102,103,104,105,114,131,132],[65,78,93,114,131,132],[65,78,85,86,114,131,132],[65,76,78,86,87,114,131,132],[65,77,114,131,132],[65,70,73,78,114,131,132],[65,78,82,86,87,114,131,132],[65,82,114,131,132],[65,76,78,81,114,131,132,157],[65,70,75,78,85,114,131,132],[65,114,131,132,146],[65,73,78,99,114,131,132,162,164],[65,114,131,132,134],[65,114,119,126,128,131,132,136],[58,65,114,126,131,132,136,169,170],[65,114,126,131,132,135,136],[58,59,65,114,131,132,166,167,168,169,170],[65,114,126,131,132,136],[58,59,65,114,128,131,132,165,166,167,168]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cdf8847677ac7d20486e54dd3fcf09eda95812ac8ace44b4418da1bbbab6eb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"c07043db2b2e00839c742cfc649138beb200380096b878a0885030e9b2eb79c6","signature":"f465136cba239b4519ab22549174402a64c0907a93d88601ba41aa9bc5594d38","impliedFormat":99},{"version":"69e2590ecb8ed1bcf9f4ac1b748a218d47333e0879ddbb66e722fe556fa7ce9d","signature":"7499c359bd3402bece7cc222dc8f4ed6d4f25b5e3432ec7facdfa55a28bc88d1","impliedFormat":99},{"version":"6c7176368037af28cb72f2392010fa1cef295d6d6744bca8cfb54985f3a18c3e","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab41ef1f2cdafb8df48be20cd969d875602483859dc194e9c97c8a576892c052","affectsGlobalScope":true,"impliedFormat":1},{"version":"437e20f2ba32abaeb7985e0afe0002de1917bc74e949ba585e49feba65da6ca1","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"98cffbf06d6bab333473c70a893770dbe990783904002c4f1a960447b4b53dca","affectsGlobalScope":true,"impliedFormat":1},{"version":"3af97acf03cc97de58a3a4bc91f8f616408099bc4233f6d0852e72a8ffb91ac9","affectsGlobalScope":true,"impliedFormat":1},{"version":"808069bba06b6768b62fd22429b53362e7af342da4a236ed2d2e1c89fcca3b4a","affectsGlobalScope":true,"impliedFormat":1},{"version":"1db0b7dca579049ca4193d034d835f6bfe73096c73663e5ef9a0b5779939f3d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"9798340ffb0d067d69b1ae5b32faa17ab31b82466a3fc00d8f2f2df0c8554aaa","affectsGlobalScope":true,"impliedFormat":1},{"version":"f26b11d8d8e4b8028f1c7d618b22274c892e4b0ef5b3678a8ccbad85419aef43","affectsGlobalScope":true,"impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"763fe0f42b3d79b440a9b6e51e9ba3f3f91352469c1e4b3b67bfa4ff6352f3f4","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"7f182617db458e98fc18dfb272d40aa2fff3a353c44a89b2c0ccb3937709bfb5","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"e61be3f894b41b7baa1fbd6a66893f2579bfad01d208b4ff61daef21493ef0a8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"615ba88d0128ed16bf83ef8ccbb6aff05c3ee2db1cc0f89ab50a4939bfc1943f","impliedFormat":1},{"version":"a4d551dbf8746780194d550c88f26cf937caf8d56f102969a110cfaed4b06656","impliedFormat":1},{"version":"8bd86b8e8f6a6aa6c49b71e14c4ffe1211a0e97c80f08d2c8cc98838006e4b88","impliedFormat":1},{"version":"317e63deeb21ac07f3992f5b50cdca8338f10acd4fbb7257ebf56735bf52ab00","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"b52476feb4a0cbcb25e5931b930fc73cb6643fb1a5060bf8a3dda0eeae5b4b68","affectsGlobalScope":true,"impliedFormat":1},{"version":"f9501cc13ce624c72b61f12b3963e84fad210fbdf0ffbc4590e08460a3f04eba","affectsGlobalScope":true,"impliedFormat":1},{"version":"e7721c4f69f93c91360c26a0a84ee885997d748237ef78ef665b153e622b36c1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d97fb21da858fb18b8ae72c314e9743fd52f73ebe2764e12af1db32fc03f853f","affectsGlobalScope":true,"impliedFormat":1},{"version":"0fa06ada475b910e2106c98c68b10483dc8811d0c14a8a8dd36efb2672485b29","impliedFormat":1},{"version":"33e5e9aba62c3193d10d1d33ae1fa75c46a1171cf76fef750777377d53b0303f","impliedFormat":1},{"version":"2b06b93fd01bcd49d1a6bd1f9b65ddcae6480b9a86e9061634d6f8e354c1468f","impliedFormat":1},{"version":"6a0cd27e5dc2cfbe039e731cf879d12b0e2dded06d1b1dedad07f7712de0d7f4","affectsGlobalScope":true,"impliedFormat":1},{"version":"913be43dad2a40e500104700aa26cfb5c51a976114bedf19624de43fdae7474f","impliedFormat":1},{"version":"e60477649d6ad21542bd2dc7e3d9ff6853d0797ba9f689ba2f6653818999c264","impliedFormat":1},{"version":"c2510f124c0293ab80b1777c44d80f812b75612f297b9857406468c0f4dafe29","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"4c829ab315f57c5442c6667b53769975acbf92003a66aef19bce151987675bd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"b2ade7657e2db96d18315694789eff2ddd3d8aea7215b181f8a0b303277cc579","impliedFormat":1},{"version":"78dbea00e90d2df8ea3dbef0cc379d95b8be9b71cd6bde4c28728f306811803b","impliedFormat":1},{"version":"4d631b81fa2f07a0e63a9a143d6a82c25c5f051298651a9b69176ba28930756d","impliedFormat":1},{"version":"836a356aae992ff3c28a0212e3eabcb76dd4b0cc06bcb9607aeef560661b860d","impliedFormat":1},{"version":"1e0d1f8b0adfa0b0330e028c7941b5a98c08b600efe7f14d2d2a00854fb2f393","impliedFormat":1},{"version":"41670ee38943d9cbb4924e436f56fc19ee94232bc96108562de1a734af20dc2c","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e1e46d0a9837ee058c100501080c920fa98081ea3956af0374308ba6f22a33e","impliedFormat":1},{"version":"272ca407e0c9068bdc5152552d876e68037ceae3de62e529306403e973dec8e1","impliedFormat":1},{"version":"fa7834c715d5357e4540cee40ce96c3250ddb67a7b879a6b7fa0e86d6696f121","impliedFormat":1},{"version":"22dfb07a7ab15b66ac043829056fe70124844636ae719551812ac631ba04985b","impliedFormat":1},{"version":"a10f0e1854f3316d7ee437b79649e5a6ae3ae14ffe6322b02d4987071a95362e","impliedFormat":1},{"version":"e208f73ef6a980104304b0d2ca5f6bf1b85de6009d2c7e404028b875020fa8f2","impliedFormat":1},{"version":"d163b6bc2372b4f07260747cbc6c0a6405ab3fbcea3852305e98ac43ca59f5bc","impliedFormat":1},{"version":"e6fa9ad47c5f71ff733744a029d1dc472c618de53804eae08ffc243b936f87ff","affectsGlobalScope":true,"impliedFormat":1},{"version":"a6f137d651076822d4fe884287e68fd61785a0d3d1fdb250a5059b691fa897db","impliedFormat":1},{"version":"24826ed94a78d5c64bd857570fdbd96229ad41b5cb654c08d75a9845e3ab7dde","impliedFormat":1},{"version":"8b479a130ccb62e98f11f136d3ac80f2984fdc07616516d29881f3061f2dd472","impliedFormat":1},{"version":"928af3d90454bf656a52a48679f199f64c1435247d6189d1caf4c68f2eaf921f","affectsGlobalScope":true,"impliedFormat":1},{"version":"bceb58df66ab8fb00170df20cd813978c5ab84be1d285710c4eb005d8e9d8efb","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f16a7e4deafa527ed9995a772bb380eb7d3c2c0fd4ae178c5263ed18394db2c","impliedFormat":1},{"version":"933921f0bb0ec12ef45d1062a1fc0f27635318f4d294e4d99de9a5493e618ca2","impliedFormat":1},{"version":"71a0f3ad612c123b57239a7749770017ecfe6b66411488000aba83e4546fde25","impliedFormat":1},{"version":"77fbe5eecb6fac4b6242bbf6eebfc43e98ce5ccba8fa44e0ef6a95c945ff4d98","impliedFormat":1},{"version":"4f9d8ca0c417b67b69eeb54c7ca1bedd7b56034bb9bfd27c5d4f3bc4692daca7","impliedFormat":1},{"version":"0cb167c371eaa8c869f8a7656a7296f2e4fae43b4d8b803a680236b24794e5f9","impliedFormat":1},{"version":"0a839dba0287cc0481ad4beedd48a1c64acf1e212ae865d1315f7007ca215161","impliedFormat":1},{"version":"38dc4655376cd1a4bd6bb3763d92949233e33d38d3dd3cbea7bbf218175a38ef","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"45650f47bfb376c8a8ed39d4bcda5902ab899a3150029684ee4c10676d9fbaee","impliedFormat":1},{"version":"208a6a0bfb227bdf8fb964799d0a206c75cf03ccd72e63bf5495c9331354c6d6","affectsGlobalScope":true,"impliedFormat":1},{"version":"18fd40412d102c5564136f29735e5d1c3b455b8a37f920da79561f1fde068208","impliedFormat":1},{"version":"48a679952eefe4cb776d5a0e1ccba2d3eb53b57448bbb7abc1fcebcbd5440188","impliedFormat":1},{"version":"f0be1b8078cd549d91f37c30c222c2a187ac1cf981d994fb476a1adc61387b14","affectsGlobalScope":true,"impliedFormat":1},{"version":"0aaed1d72199b01234152f7a60046bc947f1f37d78d182e9ae09c4289e06a592","impliedFormat":1},{"version":"2d14da6ecb49bf828d83948765ec2d3a579d476bbb9645e749610baa6ec880ca","impliedFormat":1},{"version":"66ba1b2c3e3a3644a1011cd530fb444a96b1b2dfe2f5e837a002d41a1a799e60","impliedFormat":1},{"version":"7e514f5b852fdbc166b539fdd1f4e9114f29911592a5eb10a94bb3a13ccac3c4","impliedFormat":1},{"version":"5b7aa3c4c1a5d81b411e8cb302b45507fea9358d3569196b27eb1a27ae3a90ef","affectsGlobalScope":true,"impliedFormat":1},{"version":"5987a903da92c7462e0b35704ce7da94d7fdc4b89a984871c0e2b87a8aae9e69","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea08a0345023ade2b47fbff5a76d0d0ed8bff10bc9d22b83f40858a8e941501c","impliedFormat":1},{"version":"0aef708fb4c7a6b915e8305cbfac40cd207b032dbaabe9a01889a5fff3254681","impliedFormat":1},{"version":"ae062ce7d9510060c5d7e7952ae379224fb3f8f2dd74e88959878af2057c143b","impliedFormat":1},{"version":"ad9bdafb4e7abf14cc53ce7970486a84c87831e62891e5dfe798ddcd55e84701","affectsGlobalScope":true,"impliedFormat":1},{"version":"45479f65af737a3e5c26d8772bd8ab1aa8bebbd09c1a808c2b3faddb9b84afbb","impliedFormat":1},{"version":"71d3ae6a5e73ca4130762560425e00984ebaff64d5353a3333d1bb7eb86ef336","impliedFormat":1},{"version":"41b2a25018200d1deef82999c2f44a23bd4b8618aa788fff90292ce25366fa68","impliedFormat":99},{"version":"95af805d93fd77566b7fcd0129c08327340db16a268045da224fdb554a262efb","signature":"e82fec4dd16b729ae688dc2bcda9cec5ed7f81248dc400249307afe75eb9ca5c","impliedFormat":99},{"version":"11fcdf623d360593d4bc9c98995ddcac3355e589d00dd745267ed11aaa5b70d0","signature":"e5938fd4a5fb9a4838467a3d89c0a7a37abeb53890412e138937d82c18f618d0","impliedFormat":99},{"version":"190d6ee9fc16fbe81b96025ae296f86f2539442e9a1c40493839a32740bcb838","signature":"000c986839389e577358075ef199ca6f6b1ef23d7b353cd6851c61231726f608","impliedFormat":99},{"version":"f3cb72e847ba21b84e04983dd076d349fb00a5d354ee79b1fb4b2774d2f7c54d","signature":"284c49303527805c38015236248d94cec3dce77d6fa253febb2132d9d1441be3","impliedFormat":99},{"version":"017c55632c79654dff636b732bba45eba2d48852c27d771012996afa3eac606d","signature":"59cb3eb9af40380d3873902838309e77852e2abab26cf45e95ca21326b699b2a","impliedFormat":99},{"version":"349e910e1e61508bc5ab5d609737928e7c82d780322c1e080afc76addbd0c79c","signature":"45f37ecfcce808c3e661f0a045d4ac00b6f0c85a21c76e4896a9eb9e3b6a15b6","impliedFormat":99},{"version":"bd46f52dad60aa598b1765a1391ef64aac9f561524115f7ae8c811cb418d9892","signature":"7c544ba409fe83fb8e9108e69a6c21ee68e9e603f52010822466c59644a6cc97","impliedFormat":99}],"root":[58,59,[166,172]],"options":{"composite":true,"declaration":true,"declarationMap":true,"esModuleInterop":true,"exactOptionalPropertyTypes":false,"module":199,"noImplicitOverride":true,"noUncheckedIndexedAccess":true,"outDir":"./","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":9,"tsBuildInfoFile":"./.tsbuildinfo"},"referencedMap":[[111,1],[112,1],[113,2],[65,3],[114,4],[115,5],[116,6],[60,7],[63,8],[61,7],[62,7],[117,9],[118,10],[119,11],[120,12],[121,13],[122,14],[123,14],[124,15],[125,16],[126,17],[127,18],[66,7],[64,7],[128,19],[129,20],[130,21],[164,22],[131,23],[132,7],[133,24],[134,25],[135,26],[136,27],[137,28],[138,29],[139,30],[140,31],[141,32],[142,32],[143,33],[144,7],[145,34],[146,35],[148,36],[147,37],[149,38],[150,39],[151,40],[152,41],[153,42],[154,43],[155,44],[156,45],[157,46],[158,47],[159,48],[160,49],[161,50],[67,7],[68,7],[69,7],[107,51],[108,7],[109,7],[110,38],[162,52],[163,53],[165,54],[56,7],[57,7],[11,7],[10,7],[2,7],[12,7],[13,7],[14,7],[15,7],[16,7],[17,7],[18,7],[19,7],[3,7],[20,7],[21,7],[4,7],[22,7],[26,7],[23,7],[24,7],[25,7],[27,7],[28,7],[29,7],[5,7],[30,7],[31,7],[32,7],[33,7],[6,7],[37,7],[34,7],[35,7],[36,7],[38,7],[7,7],[39,7],[44,7],[45,7],[40,7],[41,7],[42,7],[43,7],[8,7],[49,7],[46,7],[47,7],[48,7],[50,7],[9,7],[51,7],[52,7],[53,7],[55,7],[54,7],[1,7],[85,55],[95,56],[84,55],[105,57],[76,58],[75,59],[104,60],[98,61],[103,62],[78,63],[92,64],[77,65],[101,66],[73,67],[72,60],[102,68],[74,69],[79,70],[80,7],[83,70],[70,7],[106,71],[96,72],[87,73],[88,74],[90,75],[86,76],[89,77],[99,60],[81,78],[82,79],[91,80],[71,81],[94,72],[93,70],[97,7],[100,82],[58,83],[59,84],[171,85],[170,86],[172,87],[167,88],[166,7],[169,89],[168,88]],"latestChangedDtsFile":"./index.d.ts","version":"5.9.3"}
package/dist/apps.d.ts ADDED
@@ -0,0 +1,131 @@
1
+ /**
2
+ * 可桥接应用(app)表与探测。
3
+ *
4
+ * ## 为什么要有「应用标识」
5
+ *
6
+ * 一台机器上跑着十几个 nx 服务(nx-kv / nx-rh / nx-sk …),每个占一个端口。
7
+ * 桥接要替它们**共用同一条对外的 HTTP 入口**,就必须能区分「这个请求该去
8
+ * 哪个本地端口」——那就是**应用标识(app)**。
9
+ *
10
+ * ## 标识怎么带
11
+ *
12
+ * 两种都支持,**路径前缀优先**:
13
+ * ① `POST /nx-kv/api/todo/add` → app=nx-kv, path=/api/todo/add
14
+ * ② `POST /api/todo/add` + 头 `X-Nx-App: nx-kv` → app=nx-kv, path=/api/todo/add
15
+ *
16
+ * 路径优先的理由:客户端零改造(curl 直接打)、自定义头不会被中间反代剥掉、
17
+ * 且一个请求只可能对应一个 app(没有「路径说 A、头说 B」的歧义)。
18
+ *
19
+ * 两者都缺 → app_required;两者冲突 → app_conflict。
20
+ * **冲突时报错而不是猜**:猜错等于把请求打到别人的服务上。
21
+ *
22
+ * ⚠️ 本模块被 **client 半以 workspace 依赖引入**(`mn-ws-server` 的公共面)。
23
+ */
24
+ /** 请求头:应用标识的备用载体。 */
25
+ export declare const APP_HEADER = "x-nx-app";
26
+ /** 已知 app 的元信息。 */
27
+ export interface KnownApp {
28
+ title: string;
29
+ port: number;
30
+ }
31
+ /**
32
+ * 已知 nx 服务(2026-11-12 实测各仓 core/paths.js 的 DEFAULT_PORT)。
33
+ *
34
+ * **这不是白名单** —— 它只是「本机可能有什么」的提示与兜底默认值。
35
+ * 真正能不能桥,由 client half 的配置(--apps / 配置文件)决定:
36
+ * 端口探测只用来显示状态,**绝不因为「扫到端口在监听」就自动开桥**。
37
+ */
38
+ export declare const KNOWN_APPS: Record<string, KnownApp>;
39
+ /** app 名的合法形态:小写字母开头,只含小写字母/数字/连字符。 */
40
+ export declare const APP_NAME_RE: RegExp;
41
+ /**
42
+ * 保留路径段:这些第一段**不可能**是应用标识。
43
+ *
44
+ * 没有这张表时,'/api/todo/list' 的第一段 'api' 会被当成 app 名 ——
45
+ * 合法字符、全小写、还长得像个应用 —— 于是请求被路由到不存在的 app。
46
+ * 这张表把服务自身的路径前缀排除掉。
47
+ */
48
+ export declare const RESERVED_PATH_SEGMENTS: ReadonlySet<string>;
49
+ /** app 的本地基址覆盖(--app-map 解析结果)。 */
50
+ export interface AppOverrides {
51
+ [app: string]: {
52
+ base: string;
53
+ };
54
+ }
55
+ /** 扫描结果里的一条。 */
56
+ export interface ScannedApp {
57
+ app: string;
58
+ title: string;
59
+ base: string | null;
60
+ port: number | null;
61
+ alive: boolean;
62
+ }
63
+ /** 解析结果:要么给出 app 与剩余路径,要么给出错误码。 */
64
+ export type ResolvedApp = {
65
+ app: string;
66
+ path: string;
67
+ } | {
68
+ error: 'invalid_app_name' | 'app_conflict' | 'app_required';
69
+ };
70
+ export declare function isValidAppName(name: unknown): boolean;
71
+ /**
72
+ * 解析一个 app 的本地基址。
73
+ *
74
+ * 优先用配置里给的 base;没给就用已知端口兜底。
75
+ * 返回 null 表示这个 app 没有可用的本地端口。
76
+ */
77
+ export declare function baseOf(app: string, overrides?: AppOverrides | null): string | null;
78
+ /**
79
+ * 探测本机某个端口是否在监听。
80
+ *
81
+ * 用 TCP connect 而不是 HTTP 请求:桥接关心的是「这个服务在不在」,
82
+ * 不是「它返回什么」。连不上就是不在,不多问。
83
+ */
84
+ export declare function probePort(host: string, port: number, timeoutMs?: number): Promise<boolean>;
85
+ /**
86
+ * 扫描本机各已知 app 的端口,返回可桥接清单(含存活状态)。
87
+ *
88
+ * 注意返回的是「候选清单」——**能不能桥由配置决定**,这里只提供事实。
89
+ */
90
+ export declare function scanApps({ host, apps, overrides, }?: {
91
+ host?: string;
92
+ apps?: string[] | null;
93
+ overrides?: AppOverrides | null;
94
+ }): Promise<ScannedApp[]>;
95
+ /** 端口预检的结果。 */
96
+ export interface PortFreeResult {
97
+ free: boolean;
98
+ error: NodeJS.ErrnoException | null;
99
+ }
100
+ /**
101
+ * 检查某个端口能不能绑(= 现在没人占)。
102
+ *
103
+ * 为什么要预检:**静默顺延端口是这里最坏的处理**。server 顺延到 7778,
104
+ * 客户端还按 7777 去连 —— 连不上还是连不上,而用户看到的现象是
105
+ * 「服务端说起来了、客户端说连不上」,两边对不上账。宁可**明确报错退出**。
106
+ */
107
+ export declare function isPortFree(port: number, host?: string): Promise<PortFreeResult>;
108
+ /** app 的元信息(注册时上报给 server,汇总成 catalog)。 */
109
+ export interface AppDescriptor {
110
+ app: string;
111
+ base: string | null;
112
+ port: number | null;
113
+ title: string;
114
+ known: boolean;
115
+ }
116
+ /**
117
+ * 描述一个可桥接应用的元信息。
118
+ *
119
+ * client half 注册时把这份元信息一并报给 server half,server 把它汇总成
120
+ * **元信息目录**(catalog)—— 远端客户端登录后先拉目录,看到「哪些能路由、
121
+ * 各自是什么」,再决定调哪个。
122
+ */
123
+ export declare function describeApp(app: string, base: string | null): AppDescriptor;
124
+ /**
125
+ * 从请求里解析出应用标识与剩余路径。
126
+ *
127
+ * @param pathname 请求路径(不含 query)
128
+ * @param headers 规范化后的小写头对象
129
+ */
130
+ export declare function resolveApp(pathname: string, headers?: Record<string, string[] | string> | null): ResolvedApp;
131
+ //# sourceMappingURL=apps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../src/apps.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,qBAAqB;AACrB,eAAO,MAAM,UAAU,aAAa,CAAC;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C7B,IAAkB,EAClB,IAAW,EACX,SAAgB,GACjB,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAAC,SAAS,CAAC,EAAE,YAAY,GAAG,IAAI,CAAA;CAAO,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAoBzG;AAED,eAAe;AACf,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,MAAM,CAAC,cAAc,GAAG,IAAI,CAAC;CACrC;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,SAAc,GAAG,OAAO,CAAC,cAAc,CAAC,CAkBpF;AAED,2CAA2C;AAC3C,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;CAChB;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,aAAa,CAe3E;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CACxB,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,GAAG,IAAI,GACjD,WAAW,CAoCb"}
package/dist/apps.js ADDED
@@ -0,0 +1,233 @@
1
+ import net from 'node:net';
2
+ /**
3
+ * 可桥接应用(app)表与探测。
4
+ *
5
+ * ## 为什么要有「应用标识」
6
+ *
7
+ * 一台机器上跑着十几个 nx 服务(nx-kv / nx-rh / nx-sk …),每个占一个端口。
8
+ * 桥接要替它们**共用同一条对外的 HTTP 入口**,就必须能区分「这个请求该去
9
+ * 哪个本地端口」——那就是**应用标识(app)**。
10
+ *
11
+ * ## 标识怎么带
12
+ *
13
+ * 两种都支持,**路径前缀优先**:
14
+ * ① `POST /nx-kv/api/todo/add` → app=nx-kv, path=/api/todo/add
15
+ * ② `POST /api/todo/add` + 头 `X-Nx-App: nx-kv` → app=nx-kv, path=/api/todo/add
16
+ *
17
+ * 路径优先的理由:客户端零改造(curl 直接打)、自定义头不会被中间反代剥掉、
18
+ * 且一个请求只可能对应一个 app(没有「路径说 A、头说 B」的歧义)。
19
+ *
20
+ * 两者都缺 → app_required;两者冲突 → app_conflict。
21
+ * **冲突时报错而不是猜**:猜错等于把请求打到别人的服务上。
22
+ *
23
+ * ⚠️ 本模块被 **client 半以 workspace 依赖引入**(`mn-ws-server` 的公共面)。
24
+ */
25
+ /** 请求头:应用标识的备用载体。 */
26
+ export const APP_HEADER = 'x-nx-app';
27
+ /**
28
+ * 已知 nx 服务(2026-11-12 实测各仓 core/paths.js 的 DEFAULT_PORT)。
29
+ *
30
+ * **这不是白名单** —— 它只是「本机可能有什么」的提示与兜底默认值。
31
+ * 真正能不能桥,由 client half 的配置(--apps / 配置文件)决定:
32
+ * 端口探测只用来显示状态,**绝不因为「扫到端口在监听」就自动开桥**。
33
+ */
34
+ export const KNOWN_APPS = {
35
+ 'nx-rh': { title: '仓库与 Skill 中枢', port: 7800 },
36
+ 'nx-rp': { title: '外部上下文', port: 7820 },
37
+ 'nx-sk': { title: '个人资源与密钥', port: 7866 },
38
+ 'nx-ft': { title: '前端资源管理', port: 7869 },
39
+ 'nx-kv': { title: 'KV 清单中枢', port: 7877 },
40
+ 'nx-nx': { title: '项目生成器', port: 7880 },
41
+ 'nx-kn': { title: 'Obsidian 知识库', port: 7881 },
42
+ 'nx-ditto': { title: 'ditto', port: 7883 },
43
+ 'nx-pg': { title: '画布工作台', port: 7888 },
44
+ 'nx-pn': { title: 'pn', port: 4561 },
45
+ };
46
+ /** app 名的合法形态:小写字母开头,只含小写字母/数字/连字符。 */
47
+ export const APP_NAME_RE = /^[a-z][a-z0-9-]{0,31}$/;
48
+ /**
49
+ * 保留路径段:这些第一段**不可能**是应用标识。
50
+ *
51
+ * 没有这张表时,'/api/todo/list' 的第一段 'api' 会被当成 app 名 ——
52
+ * 合法字符、全小写、还长得像个应用 —— 于是请求被路由到不存在的 app。
53
+ * 这张表把服务自身的路径前缀排除掉。
54
+ */
55
+ export const RESERVED_PATH_SEGMENTS = new Set([
56
+ 'api', 'auth', 'health', 'stats', 'clients', 'push', 'ws',
57
+ 'files', 'assets', 'static', 'docs', 'favicon.ico',
58
+ ]);
59
+ export function isValidAppName(name) {
60
+ return typeof name === 'string' && APP_NAME_RE.test(name);
61
+ }
62
+ /**
63
+ * 解析一个 app 的本地基址。
64
+ *
65
+ * 优先用配置里给的 base;没给就用已知端口兜底。
66
+ * 返回 null 表示这个 app 没有可用的本地端口。
67
+ */
68
+ export function baseOf(app, overrides) {
69
+ const over = overrides && overrides[app];
70
+ if (over && over.base)
71
+ return over.base;
72
+ const known = KNOWN_APPS[app];
73
+ if (!known)
74
+ return null;
75
+ return `http://127.0.0.1:${known.port}`;
76
+ }
77
+ /**
78
+ * 探测本机某个端口是否在监听。
79
+ *
80
+ * 用 TCP connect 而不是 HTTP 请求:桥接关心的是「这个服务在不在」,
81
+ * 不是「它返回什么」。连不上就是不在,不多问。
82
+ */
83
+ export function probePort(host, port, timeoutMs = 400) {
84
+ return new Promise((resolve) => {
85
+ const socket = new net.Socket();
86
+ let settled = false;
87
+ const done = (ok) => {
88
+ if (settled)
89
+ return;
90
+ settled = true;
91
+ try {
92
+ socket.destroy();
93
+ }
94
+ catch { /* ignore */ }
95
+ resolve(ok);
96
+ };
97
+ socket.setTimeout(timeoutMs);
98
+ socket.once('connect', () => done(true));
99
+ socket.once('timeout', () => done(false));
100
+ socket.once('error', () => done(false));
101
+ socket.connect(port, host);
102
+ });
103
+ }
104
+ /**
105
+ * 扫描本机各已知 app 的端口,返回可桥接清单(含存活状态)。
106
+ *
107
+ * 注意返回的是「候选清单」——**能不能桥由配置决定**,这里只提供事实。
108
+ */
109
+ export async function scanApps({ host = '127.0.0.1', apps = null, overrides = null, } = {}) {
110
+ const names = apps && apps.length ? apps : Object.keys(KNOWN_APPS);
111
+ const out = [];
112
+ for (const app of names) {
113
+ const base = baseOf(app, overrides);
114
+ const known = KNOWN_APPS[app];
115
+ let port = known ? known.port : null;
116
+ if (!port && base) {
117
+ try {
118
+ port = Number(new URL(base).port || '') || null;
119
+ }
120
+ catch {
121
+ port = null;
122
+ }
123
+ }
124
+ const alive = port ? await probePort(host, Number(port)) : false;
125
+ out.push({
126
+ app,
127
+ title: known ? known.title : app,
128
+ base,
129
+ port,
130
+ alive,
131
+ });
132
+ }
133
+ return out;
134
+ }
135
+ /**
136
+ * 检查某个端口能不能绑(= 现在没人占)。
137
+ *
138
+ * 为什么要预检:**静默顺延端口是这里最坏的处理**。server 顺延到 7778,
139
+ * 客户端还按 7777 去连 —— 连不上还是连不上,而用户看到的现象是
140
+ * 「服务端说起来了、客户端说连不上」,两边对不上账。宁可**明确报错退出**。
141
+ */
142
+ export function isPortFree(port, host = '127.0.0.1') {
143
+ return new Promise((resolve) => {
144
+ const server = net.createServer();
145
+ let settled = false;
146
+ const done = (free, err) => {
147
+ if (settled)
148
+ return;
149
+ settled = true;
150
+ try {
151
+ server.close();
152
+ }
153
+ catch { /* ignore */ }
154
+ resolve({ free, error: err });
155
+ };
156
+ server.once('error', (e) => done(false, e));
157
+ server.once('listening', () => done(true, null));
158
+ try {
159
+ server.listen(port, host);
160
+ }
161
+ catch (e) {
162
+ done(false, e);
163
+ }
164
+ });
165
+ }
166
+ /**
167
+ * 描述一个可桥接应用的元信息。
168
+ *
169
+ * client half 注册时把这份元信息一并报给 server half,server 把它汇总成
170
+ * **元信息目录**(catalog)—— 远端客户端登录后先拉目录,看到「哪些能路由、
171
+ * 各自是什么」,再决定调哪个。
172
+ */
173
+ export function describeApp(app, base) {
174
+ const known = KNOWN_APPS[app] || null;
175
+ let port = null;
176
+ try {
177
+ port = base ? Number(new URL(base).port || '') || null : null;
178
+ }
179
+ catch {
180
+ port = null;
181
+ }
182
+ return {
183
+ app,
184
+ base,
185
+ port: port || (known ? known.port : null),
186
+ title: known ? known.title : app,
187
+ known: !!known,
188
+ };
189
+ }
190
+ /**
191
+ * 从请求里解析出应用标识与剩余路径。
192
+ *
193
+ * @param pathname 请求路径(不含 query)
194
+ * @param headers 规范化后的小写头对象
195
+ */
196
+ export function resolveApp(pathname, headers) {
197
+ const segs = String(pathname || '/').split('/').filter(Boolean);
198
+ const first = segs[0];
199
+ // ① 路径前缀:第一段就是已知/声明过的 app 名(且不是服务自身的保留段)
200
+ let pathApp = null;
201
+ if (first !== undefined && isValidAppName(first) && !RESERVED_PATH_SEGMENTS.has(first)) {
202
+ pathApp = first;
203
+ }
204
+ // ② 请求头
205
+ let headerApp = null;
206
+ const hv = headers && headers[APP_HEADER];
207
+ if (hv && Array.isArray(hv) && hv.length) {
208
+ const v = String(hv[0]).trim();
209
+ if (v) {
210
+ if (!isValidAppName(v))
211
+ return { error: 'invalid_app_name' };
212
+ headerApp = v;
213
+ }
214
+ }
215
+ else if (hv && typeof hv === 'string') {
216
+ const v = hv.trim();
217
+ if (v) {
218
+ if (!isValidAppName(v))
219
+ return { error: 'invalid_app_name' };
220
+ headerApp = v;
221
+ }
222
+ }
223
+ if (pathApp && headerApp && pathApp !== headerApp) {
224
+ return { error: 'app_conflict' };
225
+ }
226
+ const app = pathApp || headerApp;
227
+ if (!app)
228
+ return { error: 'app_required' };
229
+ const rest = pathApp ? segs.slice(1) : segs;
230
+ const path = '/' + rest.join('/');
231
+ return { app, path: path === '/' ? '/' : path.replace(/\/+$/, '') };
232
+ }
233
+ //# sourceMappingURL=apps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apps.js","sourceRoot":"","sources":["../src/apps.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,UAAU,CAAC;AAE3B;;;;;;;;;;;;;;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th.d.ts ADDED
@@ -0,0 +1,136 @@
1
+ /**
2
+ * mn-ws server 侧的认证:统一登录的公开参数 + 设备令牌的签发与校验。
3
+ *
4
+ * 与 mn-rt 的 server/src/auth.js 同构,但**没有 sessionKey**:
5
+ * mn-ws 桥接的是 HTTP 请求,不是加密信封流,桥接层不需要「会话密钥」概念。
6
+ *
7
+ * 两类凭据:
8
+ * · 认证中心 access_token —— 短命,登录当场换设备令牌用完即弃,不落盘。
9
+ * · mn-ws 设备令牌(HS256 JWT)—— 长命,落盘,由本服务签发与吊销。
10
+ */
11
+ /** 设备令牌有效期(秒)。默认 90 天 —— 桥接是公网暴露面,令牌不宜过长。 */
12
+ export declare const DEVICE_TOKEN_TTL_SEC: number;
13
+ export declare function b64url(buf: Buffer | string): string;
14
+ export declare function b64urlJson(obj: unknown): string;
15
+ export declare function fromB64url(s: string): Buffer;
16
+ /** 设备令牌的 payload。 */
17
+ export interface DeviceTokenPayload {
18
+ sub: string;
19
+ cid: string;
20
+ dn: string;
21
+ iat: number;
22
+ exp: number;
23
+ jti: string;
24
+ }
25
+ /** 一台已登记的桥(client half):clientId → 属主。 */
26
+ export interface DeviceRecord {
27
+ userId: string;
28
+ clientId: string;
29
+ deviceName: string;
30
+ registeredAt: string;
31
+ lastSeenAt: string;
32
+ }
33
+ /** AuthHub 的构造参数。 */
34
+ export interface AuthHubOptions {
35
+ enabled?: boolean;
36
+ issuer?: string;
37
+ clientId?: string;
38
+ /** client 半的身份:真正发起授权码流程的是它 */
39
+ loginClientId?: string;
40
+ redirectUri?: string;
41
+ scopes?: string[];
42
+ jwtSecret?: string;
43
+ httpTimeoutMs?: number;
44
+ dataDir?: string | null;
45
+ }
46
+ /** 公开参数(绝不含 secret)。 */
47
+ export interface PublicAuthConfig {
48
+ enabled: boolean;
49
+ issuer: string;
50
+ clientId: string;
51
+ loginClientId: string;
52
+ redirectUri: string;
53
+ scopes: string[];
54
+ authorizationEndpoint: string;
55
+ tokenEndpoint: string;
56
+ idpAvailable: boolean;
57
+ idpError?: string;
58
+ }
59
+ /** 认证中心的发现文档(只用到其中几个端点,其余字段原样带过)。 */
60
+ export interface IdpEndpoints {
61
+ authorization_endpoint?: string;
62
+ token_endpoint?: string;
63
+ userinfo_endpoint?: string;
64
+ end_session_endpoint?: string;
65
+ issuer?: string;
66
+ [k: string]: string | undefined;
67
+ }
68
+ export declare class AuthHub {
69
+ enabled: boolean;
70
+ issuer: string;
71
+ clientId: string;
72
+ loginClientId: string;
73
+ redirectUri: string;
74
+ scopes: string[];
75
+ jwtSecret: string;
76
+ httpTimeoutMs: number;
77
+ dataDir: string | null;
78
+ /** 发现文档缓存。只有成功才固化——失败若被记住,容器编排下
79
+ * "本服务先于认证中心启动" 会让统一登录永久不可用直到重启。 */
80
+ private _endpoints;
81
+ private _discoverError;
82
+ /** clientId -> {userId, deviceName, registeredAt, lastSeenAt} */
83
+ devices: Map<string, DeviceRecord>;
84
+ /** jti -> 过期时间戳(吊销名单) */
85
+ revoked: Map<string, number>;
86
+ constructor(opts?: AuthHubOptions);
87
+ /** 下发给客户端的公开参数。**绝不含任何 secret**。 */
88
+ publicConfig(): PublicAuthConfig;
89
+ discover(): Promise<IdpEndpoints>;
90
+ _fetchJson(urlStr: string, { method, headers, body }?: {
91
+ method?: string;
92
+ headers?: Record<string, string>;
93
+ body?: unknown;
94
+ }): Promise<unknown>;
95
+ /**
96
+ * 校验一枚**认证中心**的 access_token,返回身份。
97
+ *
98
+ * 与 mn-rt 的分工一致:exchange 是"我有 code,服务器你帮我换",
99
+ * verifyBearer 是"我有 token,服务器你帮我确认是谁"。两条路最终都收敛到
100
+ * 同一个结论——认证中心自己断言的 sub,所以属主判定只有一份实现。
101
+ */
102
+ verifyBearer(accessToken: string): Promise<{
103
+ userId: string;
104
+ sub: string;
105
+ email: string;
106
+ name: string;
107
+ preferredUsername: string;
108
+ }>;
109
+ /** 签发设备令牌。HS256 JWT,payload 带 userId 与 clientId。 */
110
+ issueDeviceToken({ userId, clientId, deviceName }: {
111
+ userId: string;
112
+ clientId: string;
113
+ deviceName?: string;
114
+ }): {
115
+ token: string;
116
+ expiresAt: number;
117
+ jti: string;
118
+ };
119
+ /** 校验设备令牌。返回 payload 或 null。 */
120
+ verifyDeviceToken(token: string): DeviceTokenPayload | null;
121
+ /** 吊销某枚令牌。名单落盘 —— 否则重启即"全部恢复",而吊销往往正是因为设备丢了。 */
122
+ revoke(jti: string): void;
123
+ private _isRevoked;
124
+ /** 登记一台桥(client half):clientId → 属主。永久一对一。 */
125
+ registerDevice({ clientId, userId, deviceName }: {
126
+ clientId: string;
127
+ userId: string;
128
+ deviceName?: string;
129
+ }): DeviceRecord;
130
+ getDevice(clientId: string): DeviceRecord | null;
131
+ devicesOf(userId: string): DeviceRecord[];
132
+ private _devicesFile;
133
+ private _loadDevices;
134
+ private _saveDevices;
135
+ }
136
+ //# sourceMappingURL=auth.d.ts.map