@dream_engine/security 0.0.0-stage → 0.1.1
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/LICENSE +21 -0
- package/dist/.tsbuildinfo +1 -0
- package/dist/approval.d.ts +55 -0
- package/dist/approval.d.ts.map +1 -0
- package/dist/approval.js +119 -0
- package/dist/approval.js.map +1 -0
- package/dist/egress-proxy.d.ts +52 -0
- package/dist/egress-proxy.d.ts.map +1 -0
- package/dist/egress-proxy.js +168 -0
- package/dist/egress-proxy.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -0
- package/dist/ip.d.ts +18 -0
- package/dist/ip.d.ts.map +1 -0
- package/dist/ip.js +204 -0
- package/dist/ip.js.map +1 -0
- package/dist/network-policy.d.ts +61 -0
- package/dist/network-policy.d.ts.map +1 -0
- package/dist/network-policy.js +182 -0
- package/dist/network-policy.js.map +1 -0
- package/dist/paths.d.ts +32 -0
- package/dist/paths.d.ts.map +1 -0
- package/dist/paths.js +111 -0
- package/dist/paths.js.map +1 -0
- package/dist/policy.d.ts +79 -0
- package/dist/policy.d.ts.map +1 -0
- package/dist/policy.js +276 -0
- package/dist/policy.js.map +1 -0
- package/dist/untrusted.d.ts +22 -0
- package/dist/untrusted.d.ts.map +1 -0
- package/dist/untrusted.js +43 -0
- package/dist/untrusted.js.map +1 -0
- package/package.json +32 -3
- package/README.md +0 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 CodingWithBashir
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -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.es2023.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.iterable.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.es2023.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2023.intl.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","../../core/dist/errors.d.ts","../../core/dist/events.d.ts","../../core/dist/logger.d.ts","../../core/dist/redact.d.ts","../../core/dist/url.d.ts","../../core/dist/async.d.ts","../../core/dist/text.d.ts","../../core/dist/ids.d.ts","../../core/dist/schema.d.ts","../../core/dist/config.d.ts","../../core/dist/index.d.ts","../src/approval.ts","../src/ip.ts","../src/network-policy.ts","../src/egress-proxy.ts","../src/paths.ts","../src/policy.ts","../src/untrusted.ts","../src/index.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/compatibility/disposable.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/compatibility/indexable.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/compatibility/index.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/globals.typedarray.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/buffer.buffer.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/globals.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/web-globals/abortcontroller.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/web-globals/domexception.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/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.7/node_modules/@types/node/web-globals/fetch.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/web-globals/navigator.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/web-globals/storage.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/web-globals/streams.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/assert.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/assert/strict.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/async_hooks.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/buffer.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/child_process.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/cluster.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/console.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/constants.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/crypto.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/dgram.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/dns.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/dns/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/domain.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/events.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/fs.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/fs/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/http.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/http2.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/https.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/inspector.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/inspector.generated.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/module.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/net.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/os.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/path.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/process.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/punycode.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/querystring.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/readline.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/readline/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/repl.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/sea.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/sqlite.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/stream.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/stream/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/stream/web.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/string_decoder.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/test.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/timers.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/timers/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/tls.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/trace_events.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/tty.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/url.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/util.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/v8.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/vm.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/wasi.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/worker_threads.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/zlib.d.ts","../../../node_modules/.pnpm/@types+node@22.20.7/node_modules/@types/node/index.d.ts"],"fileIdsList":[[88,134,135,137,154,155],[88,136,137,154,155],[137,154,155],[88,137,142,154,155,172],[88,137,138,143,148,154,155,157,169,180],[88,137,138,139,148,154,155,157],[88,137,154,155],[83,84,85,88,137,154,155],[88,137,140,154,155,181],[88,137,141,142,149,154,155,158],[88,137,142,154,155,169,177],[88,137,143,145,148,154,155,157],[88,136,137,144,154,155],[88,137,145,146,154,155],[88,137,147,148,154,155],[88,136,137,148,154,155],[88,137,148,149,150,154,155,169,180],[88,137,148,149,150,154,155,164,169,172],[88,129,137,145,148,151,154,155,157,169,180],[88,137,148,149,151,152,154,155,157,169,177,180],[88,137,151,153,154,155,169,177,180],[86,87,88,89,90,91,92,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,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186],[88,137,148,154,155],[88,137,154,155,156,180],[88,137,145,148,154,155,157,169],[88,137,154,155,158],[88,137,154,155,159],[88,136,137,154,155,160],[88,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,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186],[88,137,154,155,162],[88,137,154,155,163],[88,137,148,154,155,164,165],[88,137,154,155,164,166,181,183],[88,137,149,154,155],[88,137,148,154,155,169,170,172],[88,137,154,155,171,172],[88,137,154,155,169,170],[88,137,154,155,172],[88,137,154,155,173],[88,134,137,154,155,169,174,180],[88,137,148,154,155,175,176],[88,137,154,155,175,176],[88,137,142,154,155,157,169,177],[88,137,154,155,178],[88,137,154,155,157,179],[88,137,151,154,155,163,180],[88,137,142,154,155,181],[88,137,154,155,169,182],[88,137,154,155,156,183],[88,137,154,155,184],[88,129,137,154,155],[88,129,137,148,150,154,155,160,169,172,180,182,183,185],[88,137,154,155,169,186],[88,101,105,137,154,155,180],[88,101,137,154,155,169,180],[88,96,137,154,155],[88,98,101,137,154,155,177,180],[88,137,154,155,157,177],[88,137,154,155,187],[88,96,137,154,155,187],[88,98,101,137,154,155,157,180],[88,93,94,97,100,137,148,154,155,169,180],[88,101,108,137,154,155],[88,93,99,137,154,155],[88,101,122,123,137,154,155],[88,97,101,137,154,155,172,180,187],[88,122,137,154,155,187],[88,95,96,137,154,155,187],[88,101,137,154,155],[88,95,96,97,98,99,100,101,102,103,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,123,124,125,126,127,128,137,154,155],[88,101,116,137,154,155],[88,101,108,109,137,154,155],[88,99,101,109,110,137,154,155],[88,100,137,154,155],[88,93,96,101,137,154,155],[88,101,105,109,110,137,154,155],[88,105,137,154,155],[88,99,101,104,137,154,155,180],[88,93,98,101,108,137,154,155],[88,137,154,155,169],[88,96,101,122,137,154,155,185,187],[64,88,137,154,155],[72,88,137,154,155],[64,65,66,67,68,69,70,71,72,73,88,137,154,155],[74,88,137,154,155],[74,77,88,137,142,151,154,155,157],[74,75,76,77,78,79,80,81,88,137,154,155],[88,137,154,155,157],[74,76,88,137,145,154,155,157],[74,88,137,149,154,155,159],[74,75,88,137,154,155]],"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":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2e80ee7a49e8ac312cc11b77f1475804bee36b3b2bc896bead8b6e1266befb43","affectsGlobalScope":true,"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":"df83c2a6c73228b625b0beb6669c7ee2a09c914637e2d35170723ad49c0f5cd4","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"2cd394618cdb4d16e0edc972f2ea83ecdd4f3a3f87807eb787d4659bc0b3ce50","impliedFormat":99},{"version":"7c36b560a10efd5a07449c959ef482b06c82a1b940f86bd9017303a02959a84f","impliedFormat":99},{"version":"ab85dd6c839ffaf796c6d1eb9d005c7b6e19a1c9dd6194ac9e28899f09400f59","impliedFormat":99},{"version":"1709904caba5a0995e696d79b0a397ac008a5b94839fa220657dedcfef725219","impliedFormat":99},{"version":"dca02cdbfea21cc04242e29c1ffe6585346b995a36f85f36284110ca3a8692dd","impliedFormat":99},{"version":"99fa96241066465ffcb013cf5d4f7cf2506d901cad368f75169254d384885498","impliedFormat":99},{"version":"2982305a090c8721d65e3a6ac76e18d8ecc508d570c2f404d734e72171b4fe6e","impliedFormat":99},{"version":"4ce051f4e765562370d3eea0511d8f169f66648a2032fb1f006ea5367401646b","impliedFormat":99},{"version":"62f4e7012819e61f5bf8f0da46576876cc04a2ab3adb5c39de55f0e217123b81","impliedFormat":99},{"version":"0fe8f6548895a15bc3e43972c1b4f6b3bbc6e42c88ff737bae4c5ccf529dde77","impliedFormat":99},{"version":"1d14b2d995a2eb2cbbba52bd719b67a59599967dcee4157b7ef374133ae03569","impliedFormat":99},{"version":"6eaba027842cb43e7e7fbd0ba8420d157ea090b16e54d383583c623b1c143a2d","signature":"83313d241f6a96a1e286afc5862534a0fd34e3cde613d53c1daeb27576953a8b","impliedFormat":99},{"version":"1eb10d32aefbcc1c303c2ee2a2acdc43375a0a3597583147933e9bc19b69b9d8","signature":"0711a809cf50d59de22c63154d14ae54ae8053676f4ace9a151a6814b4e0ad92","impliedFormat":99},{"version":"936fe90910677a523f63eb688731b42fda64d2220dbe0fe553166c77719bf9c1","signature":"44dbbe345fe95aa57c304ec4c1c3cd36d93b848cafa2bc15736a629ff9684168","impliedFormat":99},{"version":"85708e4880d3ab43a955a8b064df3d1783f9db9707a5b6f57963c5af83c6e672","signature":"8ba46e8cdfb1388ce177c779a8f83f7aedcaf7888591ac73b8e687d4b71d38f7","impliedFormat":99},{"version":"2e383268288953e107d3ce718436779f3bac00d24b55cf225568e826b6e87bb5","signature":"32fba5574f1bf3f37c79a9b97b90dc783fa37fe46cbde05c75901805f1ea51bf","impliedFormat":99},{"version":"c90b9c11c137ce6e6bd88d16c74cdae48c557cb9ac39c4ad9d00230160d3d7be","signature":"1a654b2907a2e15861a024b422473c93cc5a10b8992311d8cdaade1da2257bab","impliedFormat":99},{"version":"960ab8fb3c673ac9a1bdf8a6b008c8a99142d38b183ec8ff0b9245d3d3eccc09","signature":"f90285e43543001cbfee97611c0db3c99522ea61d67e80859b74eef2ec877fd1","impliedFormat":99},{"version":"c9f29b98fad4cf84f21f4e4d376136f5aebd37759b2fc2a75bf1c850ce0e957d","signature":"f58a7638682f1d86e1adbbb10e8b11863c7a0d792e3c5456bef109deb21a7efb","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":"e7fcccb7463007c1a6e877709650c26cd297ef1b2679d0173157ee874bf16517","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":"33f03c0429f2c638069fc1186e2eccd96370c91fb9d8d7a69c5241bb31fc3d46","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}],"root":[[75,82]],"options":{"composite":true,"declaration":true,"declarationMap":true,"esModuleInterop":true,"exactOptionalPropertyTypes":false,"module":199,"noFallthroughCasesInSwitch":true,"noImplicitOverride":true,"noUncheckedIndexedAccess":true,"outDir":"./","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":9,"tsBuildInfoFile":"./.tsbuildinfo","verbatimModuleSyntax":true},"referencedMap":[[134,1],[135,1],[136,2],[88,3],[137,4],[138,5],[139,6],[83,7],[86,8],[84,7],[85,7],[140,9],[141,10],[142,11],[143,12],[144,13],[145,14],[146,14],[147,15],[148,16],[149,17],[150,18],[89,7],[87,7],[151,19],[152,20],[153,21],[187,22],[154,23],[155,7],[156,24],[157,25],[158,26],[159,27],[160,28],[161,29],[162,30],[163,31],[164,32],[165,32],[166,33],[167,7],[168,34],[169,35],[171,36],[170,37],[172,38],[173,39],[174,40],[175,41],[176,42],[177,43],[178,44],[179,45],[180,46],[181,47],[182,48],[183,49],[184,50],[90,7],[91,7],[92,7],[130,51],[131,7],[132,7],[133,38],[185,52],[186,53],[62,7],[63,7],[11,7],[12,7],[14,7],[13,7],[2,7],[15,7],[16,7],[17,7],[18,7],[19,7],[20,7],[21,7],[22,7],[3,7],[23,7],[24,7],[4,7],[25,7],[29,7],[26,7],[27,7],[28,7],[30,7],[31,7],[32,7],[5,7],[33,7],[34,7],[35,7],[36,7],[6,7],[40,7],[37,7],[38,7],[39,7],[41,7],[7,7],[42,7],[47,7],[48,7],[43,7],[44,7],[45,7],[46,7],[8,7],[52,7],[49,7],[50,7],[51,7],[53,7],[9,7],[54,7],[55,7],[56,7],[58,7],[57,7],[59,7],[60,7],[10,7],[61,7],[1,7],[108,54],[118,55],[107,54],[128,56],[99,57],[98,58],[127,59],[121,60],[126,61],[101,62],[115,63],[100,64],[124,65],[96,66],[95,59],[125,67],[97,68],[102,69],[103,7],[106,69],[93,7],[129,70],[119,71],[110,72],[111,73],[113,74],[109,75],[112,76],[122,59],[104,77],[105,78],[114,79],[94,80],[117,71],[116,69],[120,7],[123,81],[69,82],[73,83],[64,7],[65,7],[71,7],[74,84],[66,7],[67,7],[72,7],[70,7],[68,7],[75,85],[78,86],[82,87],[76,88],[77,89],[79,90],[80,91],[81,7]],"latestChangedDtsFile":"./index.d.ts","version":"5.9.3"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export type ConsequentialCategory = 'purchase' | 'financial' | 'account-deletion' | 'destructive' | 'messaging' | 'publishing' | 'form-submission' | 'authentication-change';
|
|
2
|
+
export interface ActionClassification {
|
|
3
|
+
consequential: boolean;
|
|
4
|
+
categories: ConsequentialCategory[];
|
|
5
|
+
reasons: string[];
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Deterministically classifies whether an action is consequential based on visible text
|
|
9
|
+
* (button label, link text, form context). Errs on the side of caution.
|
|
10
|
+
*/
|
|
11
|
+
export declare function classifyAction(...texts: Array<string | undefined | null>): ActionClassification;
|
|
12
|
+
export interface ApprovalRequest {
|
|
13
|
+
id: string;
|
|
14
|
+
action: string;
|
|
15
|
+
target: string;
|
|
16
|
+
url?: string;
|
|
17
|
+
categories: ConsequentialCategory[];
|
|
18
|
+
reasons: string[];
|
|
19
|
+
details?: Record<string, unknown>;
|
|
20
|
+
}
|
|
21
|
+
export type ApprovalHandler = (request: ApprovalRequest) => boolean | Promise<boolean>;
|
|
22
|
+
export type ApprovalMode = 'deny' | 'prompt' | 'allow';
|
|
23
|
+
export interface ApprovalRecord extends ApprovalRequest {
|
|
24
|
+
time: string;
|
|
25
|
+
approved: boolean;
|
|
26
|
+
decidedBy: 'policy' | 'handler' | 'grant';
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Human-approval gate for consequential actions.
|
|
30
|
+
*
|
|
31
|
+
* - `deny` (default): consequential actions are refused unless a one-off grant exists.
|
|
32
|
+
* - `prompt`: the configured handler decides (e.g. CLI prompt, dashboard, chat confirmation).
|
|
33
|
+
* - `allow`: everything is permitted (only for fully trusted automation).
|
|
34
|
+
*/
|
|
35
|
+
export declare class ApprovalManager {
|
|
36
|
+
private mode;
|
|
37
|
+
private handler?;
|
|
38
|
+
private readonly grants;
|
|
39
|
+
readonly history: ApprovalRecord[];
|
|
40
|
+
constructor(mode?: ApprovalMode, handler?: ApprovalHandler | undefined);
|
|
41
|
+
setMode(mode: ApprovalMode): void;
|
|
42
|
+
getMode(): ApprovalMode;
|
|
43
|
+
setHandler(handler: ApprovalHandler | undefined): void;
|
|
44
|
+
/**
|
|
45
|
+
* Pre-authorises consequential actions of a category (e.g. "form-submission") for a number of uses.
|
|
46
|
+
* Useful for workflows where the developer has explicitly authorised a specific step.
|
|
47
|
+
*/
|
|
48
|
+
grant(category: ConsequentialCategory | '*', uses?: number): void;
|
|
49
|
+
private consumeGrant;
|
|
50
|
+
/** Resolves to true if approved; never throws. */
|
|
51
|
+
request(input: Omit<ApprovalRequest, 'id'>): Promise<boolean>;
|
|
52
|
+
/** Throws ApprovalRequiredError unless the action is approved. */
|
|
53
|
+
require(input: Omit<ApprovalRequest, 'id'>): Promise<void>;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=approval.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"approval.d.ts","sourceRoot":"","sources":["../src/approval.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,qBAAqB,GAC/B,UAAU,GAAG,WAAW,GAAG,kBAAkB,GAAG,aAAa,GAAG,WAAW,GAAG,YAAY,GAAG,iBAAiB,GAAG,uBAAuB,CAAC;AAE3I,MAAM,WAAW,oBAAoB;IACnC,aAAa,EAAE,OAAO,CAAC;IACvB,UAAU,EAAE,qBAAqB,EAAE,CAAC;IACpC,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAkBD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,GAAG,KAAK,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC,GAAG,oBAAoB,CAe/F;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,qBAAqB,EAAE,CAAC;IACpC,OAAO,EAAE,MAAM,EAAE,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} from '@dream_engine/core';
|
|
2
|
+
const RULES = [
|
|
3
|
+
{
|
|
4
|
+
category: 'purchase',
|
|
5
|
+
patterns: [
|
|
6
|
+
/\b(buy|purchase|checkout|check out|place (your )?order|order now|add to cart and pay|subscribe now|complete (purchase|order)|pay now|book now|confirm (order|booking|purchase))\b/,
|
|
7
|
+
],
|
|
8
|
+
},
|
|
9
|
+
{ category: 'financial', patterns: [/\b(transfer|send money|withdraw|pay|payment|wire|donate|confirm payment|authorize payment)\b/] },
|
|
10
|
+
{ category: 'account-deletion', patterns: [/\b(delete|close|deactivate|terminate|remove) (my |your |the )?account\b/] },
|
|
11
|
+
{ category: 'destructive', patterns: [/\b(delete|remove|erase|destroy|wipe|drop|discard|revoke|cancel subscription|unsubscribe)\b/] },
|
|
12
|
+
{ category: 'messaging', patterns: [/\b(send|reply|post comment|send message|send email|forward|tweet|share)\b/] },
|
|
13
|
+
{ category: 'publishing', patterns: [/\b(publish|post|go live|deploy|release|make public|submit for review)\b/] },
|
|
14
|
+
{ category: 'authentication-change', patterns: [/\b(change|reset|update) (my |your )?(password|email|2fa|two factor)\b/, /\bdisable (2fa|two factor)\b/] },
|
|
15
|
+
{ category: 'form-submission', patterns: [/\b(submit|confirm|apply now|apply for|submit application|sign up|register|agree and continue|i agree)\b/] },
|
|
16
|
+
];
|
|
17
|
+
/**
|
|
18
|
+
* Deterministically classifies whether an action is consequential based on visible text
|
|
19
|
+
* (button label, link text, form context). Errs on the side of caution.
|
|
20
|
+
*/
|
|
21
|
+
export function classifyAction(...texts) {
|
|
22
|
+
const text = normalizeText(texts.filter(Boolean).join(' '));
|
|
23
|
+
const categories = new Set();
|
|
24
|
+
const reasons = [];
|
|
25
|
+
for (const rule of RULES) {
|
|
26
|
+
for (const pattern of rule.patterns) {
|
|
27
|
+
const m = pattern.exec(text);
|
|
28
|
+
if (m) {
|
|
29
|
+
categories.add(rule.category);
|
|
30
|
+
reasons.push(`"${m[0]}" suggests ${rule.category}`);
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return { consequential: categories.size > 0, categories: [...categories], reasons };
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Human-approval gate for consequential actions.
|
|
39
|
+
*
|
|
40
|
+
* - `deny` (default): consequential actions are refused unless a one-off grant exists.
|
|
41
|
+
* - `prompt`: the configured handler decides (e.g. CLI prompt, dashboard, chat confirmation).
|
|
42
|
+
* - `allow`: everything is permitted (only for fully trusted automation).
|
|
43
|
+
*/
|
|
44
|
+
export class ApprovalManager {
|
|
45
|
+
mode;
|
|
46
|
+
handler;
|
|
47
|
+
grants = new Map();
|
|
48
|
+
history = [];
|
|
49
|
+
constructor(mode = 'deny', handler) {
|
|
50
|
+
this.mode = mode;
|
|
51
|
+
this.handler = handler;
|
|
52
|
+
}
|
|
53
|
+
setMode(mode) {
|
|
54
|
+
this.mode = mode;
|
|
55
|
+
}
|
|
56
|
+
getMode() {
|
|
57
|
+
return this.mode;
|
|
58
|
+
}
|
|
59
|
+
setHandler(handler) {
|
|
60
|
+
this.handler = handler;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Pre-authorises consequential actions of a category (e.g. "form-submission") for a number of uses.
|
|
64
|
+
* Useful for workflows where the developer has explicitly authorised a specific step.
|
|
65
|
+
*/
|
|
66
|
+
grant(category, uses = 1) {
|
|
67
|
+
this.grants.set(category, (this.grants.get(category) ?? 0) + uses);
|
|
68
|
+
}
|
|
69
|
+
consumeGrant(categories) {
|
|
70
|
+
for (const c of [...categories, '*']) {
|
|
71
|
+
const n = this.grants.get(c) ?? 0;
|
|
72
|
+
if (n > 0) {
|
|
73
|
+
if (n === 1)
|
|
74
|
+
this.grants.delete(c);
|
|
75
|
+
else
|
|
76
|
+
this.grants.set(c, n - 1);
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
/** Resolves to true if approved; never throws. */
|
|
83
|
+
async request(input) {
|
|
84
|
+
const request = { id: createId('approval'), ...input };
|
|
85
|
+
let approved;
|
|
86
|
+
let decidedBy = 'policy';
|
|
87
|
+
if (this.consumeGrant(request.categories)) {
|
|
88
|
+
approved = true;
|
|
89
|
+
decidedBy = 'grant';
|
|
90
|
+
}
|
|
91
|
+
else if (this.mode === 'allow')
|
|
92
|
+
approved = true;
|
|
93
|
+
else if (this.mode === 'prompt' && this.handler) {
|
|
94
|
+
decidedBy = 'handler';
|
|
95
|
+
try {
|
|
96
|
+
approved = (await this.handler(request)) === true;
|
|
97
|
+
}
|
|
98
|
+
catch {
|
|
99
|
+
approved = false;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
else
|
|
103
|
+
approved = false;
|
|
104
|
+
this.history.push({ ...request, time: new Date().toISOString(), approved, decidedBy });
|
|
105
|
+
if (this.history.length > 1000)
|
|
106
|
+
this.history.shift();
|
|
107
|
+
return approved;
|
|
108
|
+
}
|
|
109
|
+
/** Throws ApprovalRequiredError unless the action is approved. */
|
|
110
|
+
async require(input) {
|
|
111
|
+
if (!(await this.request(input))) {
|
|
112
|
+
throw new ApprovalRequiredError(`Action "${input.action}" on "${input.target}" requires human approval (${input.categories.join(', ') || 'consequential'})`, {
|
|
113
|
+
details: { action: input.action, target: input.target, categories: input.categories, reasons: input.reasons },
|
|
114
|
+
hint: 'Set security.approval.mode to "prompt" with an onApprovalRequired handler, or grant the category explicitly via approvals.grant().',
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=approval.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"approval.js","sourceRoot":"","sources":["../src/approval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAWpF,MAAM,KAAK,GAAmE;IAC5E;QACE,QAAQ,EAAE,UAAU;Q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kE;IAClE,KAAK,CAAC,OAAO,CAAC,KAAkC;QAC9C,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;YACjC,MAAM,IAAI,qBAAqB,CAC7B,WAAW,KAAK,CAAC,MAAM,SAAS,KAAK,CAAC,MAAM,8BAA8B,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,eAAe,GAAG,EAC3H;gBACE,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE;gBAC7G,IAAI,EAAE,oIAAoI;aAC3I,CACF,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { type Logger } from '@dream_engine/core';
|
|
2
|
+
import type { NetworkPolicy } from './network-policy.js';
|
|
3
|
+
export interface EgressProxyOptions {
|
|
4
|
+
policy: NetworkPolicy;
|
|
5
|
+
/** Host to bind (default 127.0.0.1). */
|
|
6
|
+
host?: string;
|
|
7
|
+
/** Port to bind (default 0 = random). */
|
|
8
|
+
port?: number;
|
|
9
|
+
/** Require proxy credentials (random by default) so other local processes cannot use the proxy. */
|
|
10
|
+
requireAuth?: boolean;
|
|
11
|
+
/** Called when a connection is blocked. */
|
|
12
|
+
onBlocked?: (event: BlockedConnection) => void;
|
|
13
|
+
logger?: Logger;
|
|
14
|
+
}
|
|
15
|
+
export interface BlockedConnection {
|
|
16
|
+
time: string;
|
|
17
|
+
method: string;
|
|
18
|
+
target: string;
|
|
19
|
+
reason: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* A local HTTP/HTTPS forward proxy that enforces a NetworkPolicy at connection time.
|
|
23
|
+
*
|
|
24
|
+
* Browsers are launched with this proxy so that every request — including redirects, subresources,
|
|
25
|
+
* WebSockets and requests made by page scripts — is validated against the policy using the exact
|
|
26
|
+
* IP address the proxy connects to. This defeats DNS rebinding and redirect-based SSRF.
|
|
27
|
+
*/
|
|
28
|
+
export declare class EgressProxy {
|
|
29
|
+
private readonly options;
|
|
30
|
+
private server;
|
|
31
|
+
private readonly sockets;
|
|
32
|
+
private readonly logger;
|
|
33
|
+
readonly username = "bw";
|
|
34
|
+
readonly password: string;
|
|
35
|
+
readonly blocked: BlockedConnection[];
|
|
36
|
+
constructor(options: EgressProxyOptions);
|
|
37
|
+
get url(): string;
|
|
38
|
+
/** Playwright-compatible proxy settings. `bypass: "<-loopback>"` forces loopback traffic through the proxy too. */
|
|
39
|
+
get playwrightProxy(): {
|
|
40
|
+
server: string;
|
|
41
|
+
bypass: string;
|
|
42
|
+
username?: string;
|
|
43
|
+
password?: string;
|
|
44
|
+
};
|
|
45
|
+
start(): Promise<void>;
|
|
46
|
+
stop(): Promise<void>;
|
|
47
|
+
private authorized;
|
|
48
|
+
private recordBlocked;
|
|
49
|
+
private handleConnect;
|
|
50
|
+
private handleRequest;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=egress-proxy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"egress-proxy.d.ts","sourceRoot":"","sources":["../src/egress-proxy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,MAAM,EAA+B,MAAM,oBAAoB,CAAC;AAC9E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,aAAa,CAAC;IACtB,wCAAwC;IACxC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,yCAAyC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mGAAmG;IACnG,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,2CAA2C;IAC3C,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC/C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;GAMG;AACH,qBAAa,WAAW;IAQV,OAAO,CAAC,QAAQ,CAAC,OAAO;IAPpC,OAAO,CAAC,MAAM,CAA0B;IACxC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAqB;IAC7C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,QAAQ,CAAC,QAAQ,QAAQ;IACzB,QAAQ,CAAC,QAAQ,SAAyC;IAC1D,QAAQ,CAAC,OAAO,EAAE,iBAAiB,EAAE,CAAM;gBAEd,OAAO,EAAE,kBAAkB;IAIxD,IAAI,GAAG,IAAI,MAAM,CAIhB;IAED,mHAAmH;IACnH,IAAI,eAAe,IAAI;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAO9F;IAEK,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAmBtB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAQ3B,OAAO,CAAC,UAAU;IASlB,OAAO,CAAC,aAAa;IAQrB,OAAO,CAAC,aAAa;YAgCP,aAAa;CAgD5B"}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { randomBytes, timingSafeEqual } from 'node:crypto';
|
|
2
|
+
import http, {} from 'node:http';
|
|
3
|
+
import net, {} from 'node:net';
|
|
4
|
+
import { SecurityError, silentLogger } from '@dream_engine/core';
|
|
5
|
+
/**
|
|
6
|
+
* A local HTTP/HTTPS forward proxy that enforces a NetworkPolicy at connection time.
|
|
7
|
+
*
|
|
8
|
+
* Browsers are launched with this proxy so that every request — including redirects, subresources,
|
|
9
|
+
* WebSockets and requests made by page scripts — is validated against the policy using the exact
|
|
10
|
+
* IP address the proxy connects to. This defeats DNS rebinding and redirect-based SSRF.
|
|
11
|
+
*/
|
|
12
|
+
export class EgressProxy {
|
|
13
|
+
options;
|
|
14
|
+
server;
|
|
15
|
+
sockets = new Set();
|
|
16
|
+
logger;
|
|
17
|
+
username = 'bw';
|
|
18
|
+
password = randomBytes(18).toString('base64url');
|
|
19
|
+
blocked = [];
|
|
20
|
+
constructor(options) {
|
|
21
|
+
this.options = options;
|
|
22
|
+
this.logger = options.logger ?? silentLogger;
|
|
23
|
+
}
|
|
24
|
+
get url() {
|
|
25
|
+
const addr = this.server?.address();
|
|
26
|
+
if (!addr)
|
|
27
|
+
throw new Error('Egress proxy is not running');
|
|
28
|
+
return `http://${addr.address.includes(':') ? `[${addr.address}]` : addr.address}:${addr.port}`;
|
|
29
|
+
}
|
|
30
|
+
/** Playwright-compatible proxy settings. `bypass: "<-loopback>"` forces loopback traffic through the proxy too. */
|
|
31
|
+
get playwrightProxy() {
|
|
32
|
+
const p = { server: this.url, bypass: '<-loopback>' };
|
|
33
|
+
if (this.options.requireAuth) {
|
|
34
|
+
p.username = this.username;
|
|
35
|
+
p.password = this.password;
|
|
36
|
+
}
|
|
37
|
+
return p;
|
|
38
|
+
}
|
|
39
|
+
async start() {
|
|
40
|
+
if (this.server)
|
|
41
|
+
return;
|
|
42
|
+
const server = http.createServer((req, res) => void this.handleRequest(req, res));
|
|
43
|
+
server.on('connect', (req, socket, head) => this.handleConnect(req, socket, head));
|
|
44
|
+
server.on('connection', (socket) => {
|
|
45
|
+
this.sockets.add(socket);
|
|
46
|
+
socket.on('close', () => this.sockets.delete(socket));
|
|
47
|
+
});
|
|
48
|
+
server.on('clientError', (_err, socket) => socket.destroy());
|
|
49
|
+
await new Promise((resolve, reject) => {
|
|
50
|
+
server.once('error', reject);
|
|
51
|
+
server.listen(this.options.port ?? 0, this.options.host ?? '127.0.0.1', () => {
|
|
52
|
+
server.off('error', reject);
|
|
53
|
+
resolve();
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
this.server = server;
|
|
57
|
+
}
|
|
58
|
+
async stop() {
|
|
59
|
+
const server = this.server;
|
|
60
|
+
if (!server)
|
|
61
|
+
return;
|
|
62
|
+
this.server = undefined;
|
|
63
|
+
for (const socket of this.sockets)
|
|
64
|
+
socket.destroy();
|
|
65
|
+
await new Promise((resolve) => server.close(() => resolve()));
|
|
66
|
+
}
|
|
67
|
+
authorized(req) {
|
|
68
|
+
if (!this.options.requireAuth)
|
|
69
|
+
return true;
|
|
70
|
+
const header = req.headers['proxy-authorization'];
|
|
71
|
+
if (typeof header !== 'string' || !header.startsWith('Basic '))
|
|
72
|
+
return false;
|
|
73
|
+
const expected = Buffer.from(`${this.username}:${this.password}`);
|
|
74
|
+
const actual = Buffer.from(Buffer.from(header.slice(6), 'base64').toString());
|
|
75
|
+
return expected.length === actual.length && timingSafeEqual(expected, actual);
|
|
76
|
+
}
|
|
77
|
+
recordBlocked(method, target, reason) {
|
|
78
|
+
const event = { time: new Date().toISOString(), method, target, reason };
|
|
79
|
+
this.blocked.push(event);
|
|
80
|
+
if (this.blocked.length > 500)
|
|
81
|
+
this.blocked.shift();
|
|
82
|
+
this.logger.warn('egress blocked', event);
|
|
83
|
+
this.options.onBlocked?.(event);
|
|
84
|
+
}
|
|
85
|
+
handleConnect(req, client, head) {
|
|
86
|
+
const target = req.url ?? '';
|
|
87
|
+
if (!this.authorized(req)) {
|
|
88
|
+
client.end('HTTP/1.1 407 Proxy Authentication Required\r\nProxy-Authenticate: Basic realm="bashirweb"\r\n\r\n');
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
const match = /^\[?([^\]]+?)\]?:(\d+)$/.exec(target);
|
|
92
|
+
if (!match) {
|
|
93
|
+
client.end('HTTP/1.1 400 Bad Request\r\n\r\n');
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
const host = match[1] ?? '';
|
|
97
|
+
const port = Number(match[2]);
|
|
98
|
+
const upstream = net.connect({ host, port, lookup: this.options.policy.createLookup() });
|
|
99
|
+
upstream.once('connect', () => {
|
|
100
|
+
client.write('HTTP/1.1 200 Connection Established\r\n\r\n');
|
|
101
|
+
if (head.length)
|
|
102
|
+
upstream.write(head);
|
|
103
|
+
upstream.pipe(client);
|
|
104
|
+
client.pipe(upstream);
|
|
105
|
+
});
|
|
106
|
+
upstream.once('error', (error) => {
|
|
107
|
+
if (error instanceof SecurityError) {
|
|
108
|
+
this.recordBlocked('CONNECT', target, error.message);
|
|
109
|
+
client.end(`HTTP/1.1 403 Forbidden\r\nX-BashirWeb-Blocked: 1\r\nContent-Type: text/plain\r\n\r\n${error.message}`);
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
client.end('HTTP/1.1 502 Bad Gateway\r\n\r\n');
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
client.on('error', () => upstream.destroy());
|
|
116
|
+
client.on('close', () => upstream.destroy());
|
|
117
|
+
}
|
|
118
|
+
async handleRequest(req, res) {
|
|
119
|
+
if (!this.authorized(req)) {
|
|
120
|
+
res.writeHead(407, { 'Proxy-Authenticate': 'Basic realm="bashirweb"' }).end();
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
let target;
|
|
124
|
+
try {
|
|
125
|
+
target = new URL(req.url ?? '');
|
|
126
|
+
}
|
|
127
|
+
catch {
|
|
128
|
+
res.writeHead(400).end('Bad Request');
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
const staticDecision = this.options.policy.checkUrl(target.toString());
|
|
132
|
+
if (!staticDecision.allowed) {
|
|
133
|
+
this.recordBlocked(req.method ?? 'GET', target.toString(), staticDecision.reason ?? 'blocked');
|
|
134
|
+
res.writeHead(403, { 'Content-Type': 'text/plain', 'X-BashirWeb-Blocked': '1' }).end(`Blocked by network policy: ${staticDecision.reason ?? ''}`);
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
const headers = { ...req.headers };
|
|
138
|
+
delete headers['proxy-authorization'];
|
|
139
|
+
delete headers['proxy-connection'];
|
|
140
|
+
const upstream = http.request({
|
|
141
|
+
protocol: 'http:',
|
|
142
|
+
hostname: target.hostname.replace(/^\[|\]$/g, ''),
|
|
143
|
+
port: target.port || 80,
|
|
144
|
+
method: req.method,
|
|
145
|
+
path: `${target.pathname}${target.search}`,
|
|
146
|
+
headers,
|
|
147
|
+
lookup: this.options.policy.createLookup(),
|
|
148
|
+
}, (upRes) => {
|
|
149
|
+
res.writeHead(upRes.statusCode ?? 502, upRes.headers);
|
|
150
|
+
upRes.pipe(res);
|
|
151
|
+
});
|
|
152
|
+
upstream.on('error', (error) => {
|
|
153
|
+
if (error instanceof SecurityError) {
|
|
154
|
+
this.recordBlocked(req.method ?? 'GET', target.toString(), error.message);
|
|
155
|
+
if (!res.headersSent)
|
|
156
|
+
res.writeHead(403, { 'Content-Type': 'text/plain', 'X-BashirWeb-Blocked': '1' });
|
|
157
|
+
res.end(error.message);
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
if (!res.headersSent)
|
|
161
|
+
res.writeHead(502, { 'Content-Type': 'text/plain' });
|
|
162
|
+
res.end('Bad Gateway');
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
req.pipe(upstream);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
//# sourceMappingURL=egress-proxy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"egress-proxy.js","sourceRoot":"","sources":["../src/egress-proxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,IAAI,EAAE,EAA6C,MAAM,WAAW,CAAC;AAC5E,OAAO,GAAG,EAAE,EAAiC,MAAM,UAAU,CAAC;AAC9D,OAAO,EAAe,aAAa,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;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,aAAa,CAAC,GAAG,CAAC,MAAM,IAAI,KAAK,EAAE,MAAM,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;gBAC1E,IAAI,CAAC,GAAG,CAAC,WAAW;oBAAE,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,cAAc,EAAE,YAAY,EAAE,qBAAqB,EAAE,GAAG,EAAE,CAAC,CAAC;gBACvG,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YACzB,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,GAAG,CAAC,WAAW;oBAAE,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,cAAc,EAAE,YAAY,EAAE,CAAC,CAAC;gBAC3E,GAAG,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;YACzB,CAAC;QACH,CAAC,CAAC,CAAC;QACH,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACrB,CAAC;CACF"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from './ip.js';
|
|
2
|
+
export * from './network-policy.js';
|
|
3
|
+
export * from './egress-proxy.js';
|
|
4
|
+
export * from './paths.js';
|
|
5
|
+
export * from './approval.js';
|
|
6
|
+
export * from './policy.js';
|
|
7
|
+
export * from './untrusted.js';
|
|
8
|
+
import type { BashirWebConfig } from '@dream_engine/core';
|
|
9
|
+
import { NetworkPolicy } from './network-policy.js';
|
|
10
|
+
/** Builds a NetworkPolicy from resolved configuration. */
|
|
11
|
+
export declare function networkPolicyFromConfig(config: BashirWebConfig, overrides?: {
|
|
12
|
+
hosted?: boolean;
|
|
13
|
+
}): NetworkPolicy;
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAE/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,0DAA0D;AAC1D,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,eAAe,EAAE,SAAS,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,aAAa,CASpH"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export * from './ip.js';
|
|
2
|
+
export * from './network-policy.js';
|
|
3
|
+
export * from './egress-proxy.js';
|
|
4
|
+
export * from './paths.js';
|
|
5
|
+
export * from './approval.js';
|
|
6
|
+
export * from './policy.js';
|
|
7
|
+
export * from './untrusted.js';
|
|
8
|
+
import { NetworkPolicy } from './network-policy.js';
|
|
9
|
+
/** Builds a NetworkPolicy from resolved configuration. */
|
|
10
|
+
export function networkPolicyFromConfig(config, overrides = {}) {
|
|
11
|
+
const hosted = overrides.hosted ?? false;
|
|
12
|
+
return new NetworkPolicy({
|
|
13
|
+
allowPrivateNetwork: hosted ? config.server.allowPrivateNetwork : config.network.allowPrivateNetwork,
|
|
14
|
+
allowLocalhost: hosted ? config.server.allowPrivateNetwork : config.network.allowLocalhost,
|
|
15
|
+
blockMetadataEndpoints: config.network.blockMetadataEndpoints,
|
|
16
|
+
allowedHosts: config.network.allowedHosts,
|
|
17
|
+
blockedHosts: config.network.blockedHosts,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAG/B,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,0DAA0D;AAC1D,MAAM,UAAU,uBAAuB,CAAC,MAAuB,EAAE,YAAkC,EAAE;IACnG,MAAM,MAAM,GAAG,SAAS,CAAC,MAAM,IAAI,KAAK,CAAC;IACzC,OAAO,IAAI,aAAa,CAAC;QACvB,mBAAmB,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,mBAAmB;QACpG,cAAc,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,cAAc;QAC1F,sBAAsB,EAAE,MAAM,CAAC,OAAO,CAAC,sBAAsB;QAC7D,YAAY,EAAE,MAAM,CAAC,OAAO,CAAC,YAAY;QACzC,YAAY,EAAE,MAAM,CAAC,OAAO,CAAC,YAAY;KAC1C,CAAC,CAAC;AACL,CAAC"}
|