@bo-agent/subprocess-local 0.0.2
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/lib/.tsbuildinfo +1 -0
- package/lib/index.d.ts +41 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +142 -0
- package/lib/index.js.map +1 -0
- package/lib/process-inspector.d.ts +41 -0
- package/lib/process-inspector.d.ts.map +1 -0
- package/lib/process-inspector.js +77 -0
- package/lib/process-inspector.js.map +1 -0
- package/lib/spawn.d.ts +131 -0
- package/lib/spawn.d.ts.map +1 -0
- package/lib/spawn.js +513 -0
- package/lib/spawn.js.map +1 -0
- package/package.json +32 -0
package/lib/.tsbuildinfo
ADDED
|
@@ -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.es2024.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.dom.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.scripthost.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.es2024.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.collection.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.string.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","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2024.full.d.ts","../../../node_modules/.pnpm/cosmokit@1.8.1/node_modules/cosmokit/lib/index.d.ts","../../../node_modules/.pnpm/@standard-schema+spec@1.1.0/node_modules/@standard-schema/spec/dist/index.d.ts","../../../node_modules/.pnpm/cordis@4.0.0-rc.10/node_modules/cordis/lib/utils.d.ts","../../../node_modules/.pnpm/cordis@4.0.0-rc.10/node_modules/cordis/lib/registry.d.ts","../../../node_modules/.pnpm/cordis@4.0.0-rc.10/node_modules/cordis/lib/reflect.d.ts","../../../node_modules/.pnpm/cordis@4.0.0-rc.10/node_modules/cordis/lib/fiber.d.ts","../../../node_modules/.pnpm/cordis@4.0.0-rc.10/node_modules/cordis/lib/events.d.ts","../../../node_modules/.pnpm/cordis@4.0.0-rc.10/node_modules/cordis/lib/logger.d.ts","../../../node_modules/.pnpm/cordis@4.0.0-rc.10/node_modules/cordis/lib/context.d.ts","../../../node_modules/.pnpm/cordis@4.0.0-rc.10/node_modules/cordis/lib/service.d.ts","../../../node_modules/.pnpm/cordis@4.0.0-rc.10/node_modules/cordis/lib/index.d.ts","../../subprocess/lib/types.d.ts","../../subprocess/lib/index.d.ts","../src/process-inspector.ts","../src/spawn.ts","../src/index.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/compatibility/disposable.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/compatibility/indexable.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/compatibility/index.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/globals.typedarray.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/buffer.buffer.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/globals.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/web-globals/abortcontroller.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/web-globals/domexception.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/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.2/node_modules/@types/node/web-globals/fetch.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/web-globals/navigator.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/web-globals/storage.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/web-globals/streams.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/assert.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/assert/strict.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/async_hooks.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/buffer.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/child_process.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/cluster.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/console.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/constants.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/crypto.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/dgram.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/dns.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/dns/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/domain.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/events.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/fs.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/fs/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/http.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/http2.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/https.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/inspector.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/inspector.generated.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/module.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/net.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/os.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/path.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/process.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/punycode.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/querystring.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/readline.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/readline/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/repl.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/sea.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/sqlite.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/stream.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/stream/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/stream/web.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/string_decoder.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/test.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/timers.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/timers/promises.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/tls.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/trace_events.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/tty.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/url.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/util.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/v8.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/vm.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/wasi.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/worker_threads.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/zlib.d.ts","../../../node_modules/.pnpm/@types+node@22.20.2/node_modules/@types/node/index.d.ts"],"fileIdsList":[[97,146,163,164],[97,143,144,146,163,164],[97,145,146,163,164],[146,163,164],[97,146,151,163,164,181],[97,146,147,152,157,163,164,166,178,189],[97,146,147,148,157,163,164,166],[92,93,94,97,146,163,164],[97,146,149,163,164,190],[97,146,150,151,158,163,164,167],[97,146,151,163,164,178,186],[97,146,152,154,157,163,164,166],[97,145,146,153,163,164],[97,146,154,155,163,164],[97,146,156,157,163,164],[97,145,146,157,163,164],[97,146,157,158,159,163,164,178,189],[97,146,157,158,159,163,164,173,178,181],[97,138,146,154,157,160,163,164,166,178,189],[97,146,157,158,160,161,163,164,166,178,186,189],[97,146,160,162,163,164,178,186,189],[95,96,97,98,99,100,101,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,187,188,189,190,191,192,193,194,195],[97,146,157,163,164],[97,146,163,164,165,189],[97,146,154,157,163,164,166,178],[97,146,163,164,167],[97,146,163,164,168],[97,145,146,163,164,169],[97,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,187,188,189,190,191,192,193,194,195],[97,146,163,164,171],[97,146,163,164,172],[97,146,157,163,164,173,174],[97,146,163,164,173,175,190,192],[97,146,158,163,164],[97,146,157,163,164,178,179,181],[97,146,163,164,180,181],[97,146,163,164,178,179],[97,146,163,164,181],[97,146,163,164,182],[97,143,146,163,164,178,183,189],[97,146,157,163,164,184,185],[97,146,163,164,184,185],[97,146,151,163,164,166,178,186],[97,146,163,164,187],[97,146,163,164,166,188],[97,146,160,163,164,172,189],[97,146,151,163,164,190],[97,146,163,164,178,191],[97,146,163,164,165,192],[97,146,163,164,193],[97,138,146,163,164],[97,138,146,157,159,163,164,169,178,181,189,191,192,194],[97,146,163,164,178,195],[76,78,79,80,81,82,83,97,146,163,164],[76,79,80,81,82,83,84,97,146,163,164],[76,77,78,79,80,81,82,83,84,97,146,163,164],[78,79,80,81,82,83,84,85,97,146,163,164],[78,79,80,81,82,83,84,97,146,163,164],[86,88,97,146,163,164],[97,110,114,146,163,164,189],[97,110,146,163,164,178,189],[97,105,146,163,164],[97,107,110,146,163,164,186,189],[97,146,163,164,166,186],[97,146,163,164,196],[97,105,146,163,164,196],[97,107,110,146,163,164,166,189],[97,102,103,106,109,146,157,163,164,178,189],[97,110,117,146,163,164],[97,102,108,146,163,164],[97,110,131,132,146,163,164],[97,106,110,146,163,164,181,189,196],[97,131,146,163,164,196],[97,104,105,146,163,164,196],[97,110,146,163,164],[97,104,105,106,107,108,109,110,111,112,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,132,133,134,135,136,137,146,163,164],[97,110,125,146,163,164],[97,110,117,118,146,163,164],[97,108,110,118,119,146,163,164],[97,109,146,163,164],[97,102,105,110,146,163,164],[97,110,114,118,119,146,163,164],[97,114,146,163,164],[97,108,110,113,146,163,164,189],[97,102,107,110,117,146,163,164],[97,146,163,164,178],[97,105,110,131,146,163,164,194,196],[86,88,90,97,146,158,159,163,164,168],[88,89,97,146,147,151,158,163,164,167,168,178,185],[86,87,88,97,146,163,164]],"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":"8fd575e12870e9944c7e1d62e1f5a73fcf23dd8d3a321f2a2c74c20d022283fe","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2e80ee7a49e8ac312cc11b77f1475804bee36b3b2bc896bead8b6e1266befb43","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7a3c8b952931daebdfc7a2897c53c0a1c73624593fa070e46bd537e64dcd20a","affectsGlobalScope":true,"impliedFormat":1},{"version":"80e18897e5884b6723488d4f5652167e7bb5024f946743134ecc4aa4ee731f89","affectsGlobalScope":true,"impliedFormat":1},{"version":"cd034f499c6cdca722b60c04b5b1b78e058487a7085a8e0d6fb50809947ee573","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":"87dc0f382502f5bbce5129bdc0aea21e19a3abbc19259e0b43ae038a9fc4e326","affectsGlobalScope":true,"impliedFormat":1},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ece9f17b3866cc077099c73f4983bddbcb1dc7ddb943227f1ec070f529dedd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"b3e9cef4eed59f8a2249ed834ba4aabe9d0d4e9037d4679487fa17dad99004a3","impliedFormat":1},{"version":"0e7086243656ce24ba7dfe15a8d8e3cd4310afa6cbddb97dd06d5dc399794676","impliedFormat":99},{"version":"bdd14f07b4eca0b4b5203b85b8dbc4d084c749fa590bee5ea613e1641dcd3b29","impliedFormat":99},{"version":"1f9b9bc4eb18864e8c1628ecd0630442eb857e7b77322559a9a00004f1e39d80","impliedFormat":99},{"version":"598ee676b4645a043e7c4198d53221dd8c44bc628b12776efd8bc6fabd804ced","impliedFormat":99},{"version":"3de8c258acd8647678a8c96db4cee1151a16bc18626028a9c7b33b6bdd037db9","impliedFormat":99},{"version":"b7f6288c956d50a63f4d14610f39df7f7b1e9d481413a0e95c82c37179448ddc","impliedFormat":99},{"version":"18930b7045a527847a039cf29af8927c8079414527707396672ed3cd706fc399","impliedFormat":99},{"version":"7395b909d9b5c754cf8af3937a7ac783bd82eeea31c42a35a02bbcfb5db945a4","impliedFormat":99},{"version":"3a0bf69f6275288de8b20cc353c1e0e6c6d61644789ddec51b526d0d5166acc1","impliedFormat":99},{"version":"6adf2288c91294fe0c68828187e96820b0620fe5d78f79ccbff06d230d9b0c8e","impliedFormat":99},{"version":"8cc48b522565f226e5bdb0f6a4d4b1bcdc8f82ac72c32fd869831a96f583b3cc","impliedFormat":99},"f45efbcb0323d0749d12447c82e6ed374b237d73d0f701872c937546200173ce","fd0992b57c68dbe57ea0a54c49402c5071ccf7f8612c0cf191882f09fa7b71d8",{"version":"70ac3609ae78ed2b00d761fa4d48000275c318137eb93181cdb7940457230a98","signature":"ced2fdf8fedb02d9e8ccab53e3532d1f35a82dde49a65ab5c15c32844d23c5e0"},{"version":"c065821c47079c49ac1136a3a66ce1ee59cf1d51593eea2fb03684171e10ed65","signature":"853bf109348305546a8ba790b6f6176af70f1a96bbad957663075f3434467262"},{"version":"51275eda5b98652505e376d8bce8e68ede63718c9b708b8248e23a1282e9dd01","signature":"8715a47515472b065deb36d484e2372fbc1956f4a900331e144a1bc69e9df0a8"},{"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":"13f5c844119c43e51ce777c509267f14d6aaf31eafb2c2b002ca35584cd13b29","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":"358765d5ea8afd285d4fd1532e78b88273f18cb3f87403a9b16fef61ac9fdcfe","impliedFormat":1},{"version":"71d3ae6a5e73ca4130762560425e00984ebaff64d5353a3333d1bb7eb86ef336","impliedFormat":1}],"root":[[89,91]],"options":{"allowImportingTsExtensions":true,"composite":true,"declaration":true,"declarationMap":true,"esModuleInterop":true,"exactOptionalPropertyTypes":true,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitOverride":true,"noUncheckedIndexedAccess":true,"noUnusedLocals":false,"noUnusedParameters":false,"outDir":"./","rewriteRelativeImportExtensions":true,"rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":11,"tsBuildInfoFile":"./.tsbuildinfo","verbatimModuleSyntax":false},"referencedMap":[[77,1],[143,2],[144,2],[145,3],[97,4],[146,5],[147,6],[148,7],[92,1],[95,8],[93,1],[94,1],[149,9],[150,10],[151,11],[152,12],[153,13],[154,14],[155,14],[156,15],[157,16],[158,17],[159,18],[98,1],[96,1],[160,19],[161,20],[162,21],[196,22],[163,23],[164,1],[165,24],[166,25],[167,26],[168,27],[169,28],[170,29],[171,30],[172,31],[173,32],[174,32],[175,33],[176,1],[177,34],[178,35],[180,36],[179,37],[181,38],[182,39],[183,40],[184,41],[185,42],[186,43],[187,44],[188,45],[189,46],[190,47],[191,48],[192,49],[193,50],[99,1],[100,1],[101,1],[139,51],[140,1],[141,1],[142,38],[194,52],[195,53],[84,54],[82,55],[81,56],[86,57],[83,58],[80,55],[79,56],[85,58],[78,59],[76,1],[73,1],[74,1],[14,1],[12,1],[13,1],[18,1],[17,1],[2,1],[19,1],[20,1],[21,1],[22,1],[23,1],[24,1],[25,1],[26,1],[3,1],[27,1],[28,1],[4,1],[29,1],[33,1],[30,1],[31,1],[32,1],[34,1],[35,1],[36,1],[5,1],[37,1],[38,1],[39,1],[40,1],[6,1],[44,1],[41,1],[42,1],[43,1],[45,1],[7,1],[46,1],[51,1],[52,1],[47,1],[48,1],[49,1],[50,1],[8,1],[56,1],[53,1],[54,1],[55,1],[57,1],[9,1],[58,1],[59,1],[60,1],[62,1],[61,1],[63,1],[64,1],[10,1],[65,1],[66,1],[67,1],[11,1],[75,1],[68,1],[69,1],[70,1],[71,1],[72,1],[1,1],[16,1],[15,1],[117,60],[127,61],[116,60],[137,62],[108,63],[107,64],[136,65],[130,66],[135,67],[110,68],[124,69],[109,70],[133,71],[105,72],[104,65],[134,73],[106,74],[111,75],[112,1],[115,75],[102,1],[138,76],[128,77],[119,78],[120,79],[122,80],[118,81],[121,82],[131,65],[113,83],[114,84],[123,85],[103,86],[126,77],[125,75],[129,1],[132,87],[91,88],[89,34],[90,89],[88,90],[87,86]],"latestChangedDtsFile":"./index.d.ts","version":"5.9.3"}
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Local Service Provider for the subprocess capability seam. Each spawn is a detached
|
|
3
|
+
* process tree with the spec's per-stream stdio dispositions. Normal disposal
|
|
4
|
+
* terminates and joins live trees; Node's synchronous exit phase force-stops
|
|
5
|
+
* any trees the service still owns. It has no config: every disposition and
|
|
6
|
+
* limit arrives on the spec, so the deployment-varying choices stay with the
|
|
7
|
+
* caller's config (the bash executor's, the LSP host's, …).
|
|
8
|
+
*
|
|
9
|
+
* The terminal primitive (`spawnTerminal`) is NOT implemented in this
|
|
10
|
+
* minimal port — the bash executor seam does not consume it, and node-pty
|
|
11
|
+
* is not part of the dependency closure. The seam's abstract method is
|
|
12
|
+
* satisfied with a clear error so callers see exactly what is missing.
|
|
13
|
+
*
|
|
14
|
+
* @module @bo-agent/subprocess-local
|
|
15
|
+
*/
|
|
16
|
+
import { Context } from 'cordis';
|
|
17
|
+
import { SubprocessRuntime } from '@bo-agent/subprocess';
|
|
18
|
+
import type { SubprocessHandle, SubprocessSpawnSpec, SubprocessTerminalHandle, SubprocessTerminalSpawnSpec } from '@bo-agent/subprocess';
|
|
19
|
+
import type { SpawnInternals } from './spawn.ts';
|
|
20
|
+
/**
|
|
21
|
+
* Local subprocess service: detached process trees, Node-shaped stdio
|
|
22
|
+
* dispositions (raw pipes, inherit, bounded tail-keep collection with spill
|
|
23
|
+
* files), credential-scrubbed environment, and tree-scoped signalling with
|
|
24
|
+
* SIGTERM→grace→SIGKILL escalation, plus synchronous final termination during
|
|
25
|
+
* JavaScript-observable host exit.
|
|
26
|
+
*/
|
|
27
|
+
export declare class LocalSubprocessRuntime extends SubprocessRuntime {
|
|
28
|
+
/** Live handles retained for normal disposal and synchronous host-exit finalization. */
|
|
29
|
+
private live;
|
|
30
|
+
/** Test hook: spill and platform knobs forwarded to spawnSubprocess. */
|
|
31
|
+
internals: SpawnInternals;
|
|
32
|
+
constructor(ctx: Context);
|
|
33
|
+
private terminateForHostExit;
|
|
34
|
+
private disposeManagedProcesses;
|
|
35
|
+
resolveExecutable(command: string, env?: Readonly<Record<string, string>>, signal?: AbortSignal): Promise<string>;
|
|
36
|
+
private executableCandidates;
|
|
37
|
+
spawn(spec: SubprocessSpawnSpec): SubprocessHandle;
|
|
38
|
+
spawnTerminal(_spec: SubprocessTerminalSpawnSpec): Promise<SubprocessTerminalHandle>;
|
|
39
|
+
}
|
|
40
|
+
export default LocalSubprocessRuntime;
|
|
41
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAChC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,KAAK,EACV,gBAAgB,EAChB,mBAAmB,EACnB,wBAAwB,EACxB,2BAA2B,EAC5B,MAAM,sBAAsB,CAAA;AAE7B,OAAO,KAAK,EAAyB,cAAc,EAAE,MAAM,YAAY,CAAA;AAEvE;;;;;;GAMG;AACH,qBAAa,sBAAuB,SAAQ,iBAAiB;IAC3D,wFAAwF;IACxF,OAAO,CAAC,IAAI,CAAmC;IAC/C,wEAAwE;IACxE,SAAS,EAAE,cAAc,CAAK;gBAElB,GAAG,EAAE,OAAO;IAexB,OAAO,CAAC,oBAAoB;YAUd,uBAAuB;IAqB/B,iBAAiB,CACrB,OAAO,EAAE,MAAM,EACf,GAAG,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EACtC,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,MAAM,CAAC;IA6BlB,OAAO,CAAC,oBAAoB;IAS5B,KAAK,CAAC,IAAI,EAAE,mBAAmB,GAAG,gBAAgB;IAc5C,aAAa,CAAC,KAAK,EAAE,2BAA2B,GAAG,OAAO,CAAC,wBAAwB,CAAC;CAG3F;AAUD,eAAe,sBAAsB,CAAA"}
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Local Service Provider for the subprocess capability seam. Each spawn is a detached
|
|
3
|
+
* process tree with the spec's per-stream stdio dispositions. Normal disposal
|
|
4
|
+
* terminates and joins live trees; Node's synchronous exit phase force-stops
|
|
5
|
+
* any trees the service still owns. It has no config: every disposition and
|
|
6
|
+
* limit arrives on the spec, so the deployment-varying choices stay with the
|
|
7
|
+
* caller's config (the bash executor's, the LSP host's, …).
|
|
8
|
+
*
|
|
9
|
+
* The terminal primitive (`spawnTerminal`) is NOT implemented in this
|
|
10
|
+
* minimal port — the bash executor seam does not consume it, and node-pty
|
|
11
|
+
* is not part of the dependency closure. The seam's abstract method is
|
|
12
|
+
* satisfied with a clear error so callers see exactly what is missing.
|
|
13
|
+
*
|
|
14
|
+
* @module @bo-agent/subprocess-local
|
|
15
|
+
*/
|
|
16
|
+
import { constants } from 'node:fs';
|
|
17
|
+
import { access, stat } from 'node:fs/promises';
|
|
18
|
+
import { delimiter, extname, isAbsolute, resolve } from 'node:path';
|
|
19
|
+
import { SubprocessRuntime } from '@bo-agent/subprocess';
|
|
20
|
+
import { childEnv, spawnSubprocess } from "./spawn.js";
|
|
21
|
+
/**
|
|
22
|
+
* Local subprocess service: detached process trees, Node-shaped stdio
|
|
23
|
+
* dispositions (raw pipes, inherit, bounded tail-keep collection with spill
|
|
24
|
+
* files), credential-scrubbed environment, and tree-scoped signalling with
|
|
25
|
+
* SIGTERM→grace→SIGKILL escalation, plus synchronous final termination during
|
|
26
|
+
* JavaScript-observable host exit.
|
|
27
|
+
*/
|
|
28
|
+
export class LocalSubprocessRuntime extends SubprocessRuntime {
|
|
29
|
+
/** Live handles retained for normal disposal and synchronous host-exit finalization. */
|
|
30
|
+
live = new Set();
|
|
31
|
+
/** Test hook: spill and platform knobs forwarded to spawnSubprocess. */
|
|
32
|
+
internals = {};
|
|
33
|
+
constructor(ctx) {
|
|
34
|
+
super(ctx);
|
|
35
|
+
ctx.effect(() => {
|
|
36
|
+
const onHostExit = () => { this.terminateForHostExit(); };
|
|
37
|
+
process.prependListener('exit', onHostExit);
|
|
38
|
+
return async () => {
|
|
39
|
+
try {
|
|
40
|
+
await this.disposeManagedProcesses();
|
|
41
|
+
}
|
|
42
|
+
finally {
|
|
43
|
+
process.off('exit', onHostExit);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
}, 'local subprocess teardown');
|
|
47
|
+
}
|
|
48
|
+
terminateForHostExit() {
|
|
49
|
+
for (const handle of this.live) {
|
|
50
|
+
try {
|
|
51
|
+
handle.terminateForHostExit();
|
|
52
|
+
}
|
|
53
|
+
catch (_ordinaryTreeTerminationFailed) {
|
|
54
|
+
// Host exit cannot await or report one target; continue with the rest.
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
async disposeManagedProcesses() {
|
|
59
|
+
// Terminate (escalating), then await WHOLE-TREE exit — not just the
|
|
60
|
+
// direct child's settlement — so even a TERM-trapping descendant cannot
|
|
61
|
+
// outlive the fiber. Keep the set authoritative while these waits are
|
|
62
|
+
// pending so a shorter process-level exit bound can still force-kill them.
|
|
63
|
+
const pending = [];
|
|
64
|
+
for (const handle of this.live) {
|
|
65
|
+
handle.terminate();
|
|
66
|
+
// Spawn-failure rejections already settled and left the live set.
|
|
67
|
+
pending.push(handle.done.catch(() => { }).then(() => handle.waitForExit()));
|
|
68
|
+
}
|
|
69
|
+
const outcomes = await Promise.allSettled(pending);
|
|
70
|
+
const failures = outcomes.flatMap(outcome => outcome.status === 'rejected'
|
|
71
|
+
? [outcome.reason]
|
|
72
|
+
: []);
|
|
73
|
+
if (failures.length > 0)
|
|
74
|
+
this.terminateForHostExit();
|
|
75
|
+
this.live.clear();
|
|
76
|
+
if (failures.length === 1)
|
|
77
|
+
throw failures[0];
|
|
78
|
+
if (failures.length > 1)
|
|
79
|
+
throw new AggregateError(failures, 'local subprocess teardown failed');
|
|
80
|
+
}
|
|
81
|
+
async resolveExecutable(command, env, signal) {
|
|
82
|
+
if (command.length === 0)
|
|
83
|
+
throw new Error('subprocess-local: executable must be non-empty');
|
|
84
|
+
signal?.throwIfAborted();
|
|
85
|
+
const environment = childEnv(env);
|
|
86
|
+
const absolute = isAbsolute(command);
|
|
87
|
+
if (!absolute && (command.includes('/') || (process.platform === 'win32' && command.includes('\\')))) {
|
|
88
|
+
throw new Error(`subprocess-local: command ${JSON.stringify(command)} is a relative path; use an absolute path or a bare PATH name`);
|
|
89
|
+
}
|
|
90
|
+
const candidates = absolute ? [command] : this.executableCandidates(command, environment);
|
|
91
|
+
for (const candidate of candidates) {
|
|
92
|
+
signal?.throwIfAborted();
|
|
93
|
+
try {
|
|
94
|
+
const info = await stat(candidate);
|
|
95
|
+
if (!info.isFile())
|
|
96
|
+
continue;
|
|
97
|
+
await access(candidate, constants.X_OK);
|
|
98
|
+
signal?.throwIfAborted();
|
|
99
|
+
return candidate;
|
|
100
|
+
}
|
|
101
|
+
catch {
|
|
102
|
+
// Try the next PATH candidate; the final miss receives one stable error.
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
signal?.throwIfAborted();
|
|
106
|
+
throw new Error(absolute
|
|
107
|
+
? `subprocess-local: command ${JSON.stringify(command)} is not an executable file`
|
|
108
|
+
: `subprocess-local: command ${JSON.stringify(command)} was not found on PATH`);
|
|
109
|
+
}
|
|
110
|
+
executableCandidates(command, env) {
|
|
111
|
+
const path = environmentValue(env, 'PATH') ?? '';
|
|
112
|
+
const extensions = process.platform === 'win32' && extname(command) === ''
|
|
113
|
+
? (environmentValue(env, 'PATHEXT') ?? '.COM;.EXE;.BAT;.CMD').split(';')
|
|
114
|
+
: [''];
|
|
115
|
+
return path.split(delimiter).flatMap(directory => extensions.map(extension => resolve(process.cwd(), directory, command + extension)));
|
|
116
|
+
}
|
|
117
|
+
spawn(spec) {
|
|
118
|
+
const handle = spawnSubprocess(spec, this.internals);
|
|
119
|
+
this.live.add(handle);
|
|
120
|
+
// Release ownership only once the whole TREE is gone, not at direct-child
|
|
121
|
+
// settlement — a TERM-trapping helper that outlives the leader must stay
|
|
122
|
+
// owned so teardown can still escalate it. For the common no-survivor
|
|
123
|
+
// case waitForExit resolves immediately after settlement.
|
|
124
|
+
const release = () => handle.waitForExit().then(() => { this.live.delete(handle); });
|
|
125
|
+
handle.done.then(release, release);
|
|
126
|
+
return handle;
|
|
127
|
+
}
|
|
128
|
+
// oxlint-disable-next-line typescript/require-await -- Preserve promise rejection semantics at the async provider contract.
|
|
129
|
+
async spawnTerminal(_spec) {
|
|
130
|
+
throw new Error('@bo-agent/subprocess-local: terminal sessions are not supported in this minimal port (no node-pty dependency)');
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
/** Read a Windows environment key using the platform's case-insensitive semantics. */
|
|
134
|
+
function environmentValue(env, name) {
|
|
135
|
+
const exact = env[name];
|
|
136
|
+
if (exact !== undefined || process.platform !== 'win32')
|
|
137
|
+
return exact;
|
|
138
|
+
const normalized = name.toUpperCase();
|
|
139
|
+
return Object.entries(env).find(([key]) => key.toUpperCase() === normalized)?.[1];
|
|
140
|
+
}
|
|
141
|
+
export default LocalSubprocessRuntime;
|
|
142
|
+
//# sourceMappingURL=index.js.map
|
package/l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AC,aAAa,CAAC,KAAkC;QACpD,MAAM,IAAI,KAAK,CAAC,+GAA+G,CAAC,CAAA;IAClI,CAAC;CACF;AAED,sFAAsF;AACtF,SAAS,gBAAgB,CAAC,GAAsB,EAAE,IAAwB;IACxE,MAAM,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC,CAAA;IACvB,IAAI,KAAK,KAAK,SAAS,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO;QAAE,OAAO,KAAK,CAAA;IACrE,MAAM,UAAU,GAAG,IAAI,CAAC,WAAW,EAAE,CAAA;IACrC,OAAO,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,WAAW,EAAE,KAAK,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;AACnF,CAAC;AAED,eAAe,sBAAsB,CAAA"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Linux process-table helpers required by the spawn lifecycle machine.
|
|
3
|
+
* The full upstream inspector also drives terminal readiness (foreground
|
|
4
|
+
* groups, stdin-wait detection, and tree/session enumeration); that surface
|
|
5
|
+
* exists to support `@bo-agent/subprocess-local`'s terminal primitive, which
|
|
6
|
+
* this minimal port deliberately omits. Only the `/proc` group-liveness
|
|
7
|
+
* probe remains.
|
|
8
|
+
*
|
|
9
|
+
* @module @bo-agent/subprocess-local/process-inspector
|
|
10
|
+
*/
|
|
11
|
+
/** Testable boundary around the filesystem operations this probe needs. */
|
|
12
|
+
export interface ProcessInspectorInternals {
|
|
13
|
+
readFile(path: string): string;
|
|
14
|
+
readDir(path: string): string[];
|
|
15
|
+
}
|
|
16
|
+
interface ProcStat {
|
|
17
|
+
pid: number;
|
|
18
|
+
parentPid: number;
|
|
19
|
+
pgrp: number;
|
|
20
|
+
session: number;
|
|
21
|
+
state: string;
|
|
22
|
+
tpgid: number;
|
|
23
|
+
started: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Parse fields used from Linux `/proc/<pid>/stat`, including parenthesized comm text.
|
|
27
|
+
* @param text - complete stat line.
|
|
28
|
+
* @returns Parsed identity/group fields, or undefined for malformed input.
|
|
29
|
+
*/
|
|
30
|
+
export declare function parseProcStat(text: string): ProcStat | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Report whether a Linux process group has an executing member. `false`
|
|
33
|
+
* means the group contains only zombie/dead entries; `undefined` means the
|
|
34
|
+
* process table could not prove either outcome.
|
|
35
|
+
* @param processGroupId - POSIX process-group id to inspect.
|
|
36
|
+
* @param internals - injectable process-table operations.
|
|
37
|
+
* @returns Live-member presence, or `undefined` when unavailable/absent.
|
|
38
|
+
*/
|
|
39
|
+
export declare function linuxProcessGroupHasLiveMembers(processGroupId: number, internals?: ProcessInspectorInternals): boolean | undefined;
|
|
40
|
+
export {};
|
|
41
|
+
//# sourceMappingURL=process-inspector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process-inspector.d.ts","sourceRoot":"","sources":["../src/process-inspector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,2EAA2E;AAC3E,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;IAC9B,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;CAChC;AASD,UAAU,QAAQ;IAChB,GAAG,EAAE,MAAM,CAAA;IACX,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAehE;AAUD;;;;;;;GAOG;AACH,wBAAgB,+BAA+B,CAC7C,cAAc,EAAE,MAAM,EACtB,SAAS,GAAE,yBAA6C,GACvD,OAAO,GAAG,SAAS,CAgBrB"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Linux process-table helpers required by the spawn lifecycle machine.
|
|
3
|
+
* The full upstream inspector also drives terminal readiness (foreground
|
|
4
|
+
* groups, stdin-wait detection, and tree/session enumeration); that surface
|
|
5
|
+
* exists to support `@bo-agent/subprocess-local`'s terminal primitive, which
|
|
6
|
+
* this minimal port deliberately omits. Only the `/proc` group-liveness
|
|
7
|
+
* probe remains.
|
|
8
|
+
*
|
|
9
|
+
* @module @bo-agent/subprocess-local/process-inspector
|
|
10
|
+
*/
|
|
11
|
+
import { readFileSync, readdirSync } from 'node:fs';
|
|
12
|
+
/* v8 ignore start -- thin OS bindings; injected logic is unit-tested and real platform composition exercises them. */
|
|
13
|
+
const DEFAULT_INTERNALS = {
|
|
14
|
+
readFile: path => readFileSync(path, 'utf8'),
|
|
15
|
+
readDir: path => readdirSync(path),
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Parse fields used from Linux `/proc/<pid>/stat`, including parenthesized comm text.
|
|
19
|
+
* @param text - complete stat line.
|
|
20
|
+
* @returns Parsed identity/group fields, or undefined for malformed input.
|
|
21
|
+
*/
|
|
22
|
+
export function parseProcStat(text) {
|
|
23
|
+
const open = text.indexOf('(');
|
|
24
|
+
const close = text.lastIndexOf(')');
|
|
25
|
+
if (open <= 0 || close <= open)
|
|
26
|
+
return undefined;
|
|
27
|
+
const pid = Number(text.slice(0, open).trim());
|
|
28
|
+
const rest = text.slice(close + 2).trim().split(/\s+/);
|
|
29
|
+
const state = rest[0] || '';
|
|
30
|
+
const parentPid = Number(rest[1]);
|
|
31
|
+
const pgrp = Number(rest[2]);
|
|
32
|
+
const session = Number(rest[3]);
|
|
33
|
+
const tpgid = Number(rest[5]);
|
|
34
|
+
const started = rest[19];
|
|
35
|
+
if (![pid, parentPid, pgrp, session, tpgid].every(Number.isSafeInteger)
|
|
36
|
+
|| state.length !== 1 || started === undefined)
|
|
37
|
+
return undefined;
|
|
38
|
+
return { pid, parentPid, pgrp, session, state, tpgid, started };
|
|
39
|
+
}
|
|
40
|
+
function readLinuxStat(internals, pid) {
|
|
41
|
+
try {
|
|
42
|
+
return parseProcStat(internals.readFile(`/proc/${pid}/stat`));
|
|
43
|
+
}
|
|
44
|
+
catch (_unreadableProcEntry) {
|
|
45
|
+
return undefined;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Report whether a Linux process group has an executing member. `false`
|
|
50
|
+
* means the group contains only zombie/dead entries; `undefined` means the
|
|
51
|
+
* process table could not prove either outcome.
|
|
52
|
+
* @param processGroupId - POSIX process-group id to inspect.
|
|
53
|
+
* @param internals - injectable process-table operations.
|
|
54
|
+
* @returns Live-member presence, or `undefined` when unavailable/absent.
|
|
55
|
+
*/
|
|
56
|
+
export function linuxProcessGroupHasLiveMembers(processGroupId, internals = DEFAULT_INTERNALS) {
|
|
57
|
+
let entries;
|
|
58
|
+
try {
|
|
59
|
+
entries = internals.readDir('/proc');
|
|
60
|
+
}
|
|
61
|
+
catch (_unreadableProcDirectory) {
|
|
62
|
+
return undefined;
|
|
63
|
+
}
|
|
64
|
+
let matched = false;
|
|
65
|
+
for (const entry of entries) {
|
|
66
|
+
if (!/^\d+$/.test(entry))
|
|
67
|
+
continue;
|
|
68
|
+
const stat = readLinuxStat(internals, Number(entry));
|
|
69
|
+
if (stat?.pgrp !== processGroupId)
|
|
70
|
+
continue;
|
|
71
|
+
matched = true;
|
|
72
|
+
if (!/^[ZXx]$/.test(stat.state))
|
|
73
|
+
return true;
|
|
74
|
+
}
|
|
75
|
+
return matched ? false : undefined;
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=process-inspector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process-inspector.js","sourceRoot":"","sources":["../src/process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AA;IAC9C,CAAC;IACD,OAAO,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAA;AACpC,CAAC"}
|
package/lib/spawn.d.ts
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Process plumbing for the local subprocess service: detached process-tree
|
|
3
|
+
* spawn with per-stream stdio dispositions, tail-keep collection with spill
|
|
4
|
+
* files, tree-scoped signalling (POSIX groups; Windows taskkill), and the
|
|
5
|
+
* SIGTERM→SIGKILL escalation. This layer reacts to an abort signal; callers
|
|
6
|
+
* own deadlines, teardown ladders, and cause classification.
|
|
7
|
+
*
|
|
8
|
+
* @module @bo-agent/subprocess-local/spawn
|
|
9
|
+
*/
|
|
10
|
+
import type { CollectedOutput, SubprocessHandle, SubprocessSpawnSpec } from '@bo-agent/subprocess';
|
|
11
|
+
/**
|
|
12
|
+
* Build a child environment: explicit caller entries override the scrubbed
|
|
13
|
+
* parent base using the target platform's environment-key semantics. A string
|
|
14
|
+
* deliberately restores or overrides an entry; an explicit `undefined`
|
|
15
|
+
* tombstone removes an ordinary ambient entry.
|
|
16
|
+
* @param extra - explicit caller entries and tombstones, merged after the scrub.
|
|
17
|
+
* @returns the environment to hand to `spawn` for the child process.
|
|
18
|
+
*/
|
|
19
|
+
export declare function childEnv(extra?: Readonly<NodeJS.ProcessEnv>): NodeJS.ProcessEnv;
|
|
20
|
+
/** Injectable knobs so tests can exercise spill and platform behavior deterministically. */
|
|
21
|
+
export interface SpawnInternals {
|
|
22
|
+
/** Directory for spill files (defaults to the OS temp dir). */
|
|
23
|
+
spillDir?: string;
|
|
24
|
+
/** Windows tree-termination runner (defaults to `taskkill /PID <pid> /T /F`). */
|
|
25
|
+
taskkill?: (pid: number) => void;
|
|
26
|
+
/** Host platform override for signalling decisions. */
|
|
27
|
+
platform?: NodeJS.Platform;
|
|
28
|
+
/** Linux process-group member probe (defaults to `/proc` inspection). */
|
|
29
|
+
linuxProcessGroupHasLiveMembers?: (processGroupId: number) => boolean | undefined;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Local-only synchronous final termination used by the owning service during
|
|
33
|
+
* host exit and as the last fallback after failed normal disposal. It is
|
|
34
|
+
* intentionally absent from the public subprocess seam.
|
|
35
|
+
*/
|
|
36
|
+
export interface LocalSubprocessHandle extends SubprocessHandle {
|
|
37
|
+
/** Force-terminate the current tree synchronously without starting timers or waits. */
|
|
38
|
+
terminateForHostExit(): void;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Collects one stream with a bounded in-memory tail. With a spill cap, on
|
|
42
|
+
* first overflow a spill file is created and every chunk (including those
|
|
43
|
+
* already collected) is appended there while the full stream remains within
|
|
44
|
+
* the cap; without one, only the in-memory tail is ever retained (the
|
|
45
|
+
* diagnostic-tail shape — a language server's stderr).
|
|
46
|
+
*
|
|
47
|
+
* Tail-keep rationale (pi/OpenCode): errors and final results cluster at the
|
|
48
|
+
* end of command output; the spill file covers the head.
|
|
49
|
+
*/
|
|
50
|
+
export declare class OutputCollector {
|
|
51
|
+
private readonly maxBytes;
|
|
52
|
+
private readonly maxSpillBytes;
|
|
53
|
+
private readonly label;
|
|
54
|
+
private readonly spillDir;
|
|
55
|
+
private chunks;
|
|
56
|
+
private bytes;
|
|
57
|
+
private dropped;
|
|
58
|
+
private spillFd;
|
|
59
|
+
private spillFile;
|
|
60
|
+
private spillDisabled;
|
|
61
|
+
/** Total bytes ever pushed (not just retained). */
|
|
62
|
+
private total;
|
|
63
|
+
constructor(maxBytes: number, maxSpillBytes: number | undefined, label: string, spillDir: string);
|
|
64
|
+
/**
|
|
65
|
+
* Ingest one stream chunk, counting it toward the whole-stream total. On
|
|
66
|
+
* first overflow of the in-memory cap a spill file is opened (when spilling
|
|
67
|
+
* is enabled) and every chunk (already-collected ones included) is appended
|
|
68
|
+
* there from then on; the in-memory tail then drops whole chunks from its
|
|
69
|
+
* head (or the head of a single over-cap chunk) until it fits the cap again.
|
|
70
|
+
* @param chunk - the raw bytes from one stream 'data' event.
|
|
71
|
+
*/
|
|
72
|
+
push(chunk: Buffer): void;
|
|
73
|
+
/** Open the spill file lazily and append `chunk` (and any prior chunks once). */
|
|
74
|
+
private spillAll;
|
|
75
|
+
/** Stop spilling and remove the file once it can no longer hold the complete stream. */
|
|
76
|
+
private discardSpill;
|
|
77
|
+
/**
|
|
78
|
+
* Incremental read in whole-stream byte coordinates: returns everything
|
|
79
|
+
* pushed since `fromByte`. When `fromByte` has already slid out of the
|
|
80
|
+
* in-memory tail window, the read is `lossy` — it returns the whole
|
|
81
|
+
* retained tail and the gap is only recoverable from the spill file.
|
|
82
|
+
* @param fromByte - whole-stream offset to resume from (a prior read's `nextOffset`; 0 for the first read).
|
|
83
|
+
* @returns the delta text, the offset for the next read, the `lossy` flag, and the spill path when one was created.
|
|
84
|
+
*/
|
|
85
|
+
readFrom(fromByte: number): {
|
|
86
|
+
text: string;
|
|
87
|
+
nextOffset: number;
|
|
88
|
+
lossy: boolean;
|
|
89
|
+
spillPath?: string;
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* Close the spill file once the stream has ended. A failed close (delayed
|
|
93
|
+
* writeback fault) stops advertising the spill path — the file may be
|
|
94
|
+
* missing its tail — while every in-memory read keeps working. Idempotent;
|
|
95
|
+
* the spawn path seals both collectors at settlement so reads after exit
|
|
96
|
+
* never point at a still-open file.
|
|
97
|
+
*/
|
|
98
|
+
seal(): void;
|
|
99
|
+
/**
|
|
100
|
+
* Seal the spill file and return the final output.
|
|
101
|
+
* @returns the final collected output: tail text, truncation flag, and the spill path when intact.
|
|
102
|
+
*/
|
|
103
|
+
finalize(): CollectedOutput;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Send `sig` to a detached POSIX process group. Never throws: delivery races
|
|
107
|
+
* process exit and may run in a timer callback, so failures are contained and
|
|
108
|
+
* a non-positive pid is a no-op.
|
|
109
|
+
* @param pid - the group leader's pid; non-positive means the spawn failed and the call is a no-op.
|
|
110
|
+
* @param sig - the signal to deliver to the whole group.
|
|
111
|
+
*/
|
|
112
|
+
export declare function killGroup(pid: number, sig: NodeJS.Signals): void;
|
|
113
|
+
/**
|
|
114
|
+
* Terminate one Windows process tree with `taskkill /T /F`. Contained like
|
|
115
|
+
* POSIX group signalling — delivery races tree exit, so an absent tree, a
|
|
116
|
+
* nonzero status, or a missing taskkill binary must not break idempotent
|
|
117
|
+
* teardown.
|
|
118
|
+
* @param pid - root process id; non-positive is a no-op.
|
|
119
|
+
*/
|
|
120
|
+
export declare function taskkillProcessTree(pid: number): void;
|
|
121
|
+
/**
|
|
122
|
+
* Spawn one isolated detached process tree with the spec's per-stream stdio
|
|
123
|
+
* dispositions. Runtime exits resolve `done` as {@link SubprocessOutcome};
|
|
124
|
+
* only spawn failures reject.
|
|
125
|
+
* @param spec - fully resolved argv, cwd, stdio, grace, cancellation, environment.
|
|
126
|
+
* @param internals - test-only spill-directory, platform, and taskkill overrides.
|
|
127
|
+
* @returns live subprocess handle.
|
|
128
|
+
* @throws when `graceMs` cannot be represented by one Node timer.
|
|
129
|
+
*/
|
|
130
|
+
export declare function spawnSubprocess(spec: SubprocessSpawnSpec, internals?: SpawnInternals): LocalSubprocessHandle;
|
|
131
|
+
//# sourceMappingURL=spawn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spawn.d.ts","sourceRoot":"","sources":["../src/spawn.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAUH,OAAO,KAAK,EACV,eAAe,EAEf,gBAAgB,EAGhB,mBAAmB,EACpB,MAAM,sBAAsB,CAAA;AAU7B;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,UAAU,CAU/E;AAED,4FAA4F;AAC5F,MAAM,WAAW,cAAc;IAC7B,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,MAAM,CAA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M,CAAA;KAAE;IAapG;;;;;;OAMG;IACH,IAAI,IAAI,IAAI;IAYZ;;;OAGG;IACH,QAAQ,IAAI,eAAe;CAQ5B;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI,CAOhE;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAMrD;AAmCD;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,mBAAmB,EAAE,SAAS,GAAE,cAAmB,GAAG,qBAAqB,CAyNhH"}
|
package/lib/spawn.js
ADDED
|
@@ -0,0 +1,513 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Process plumbing for the local subprocess service: detached process-tree
|
|
3
|
+
* spawn with per-stream stdio dispositions, tail-keep collection with spill
|
|
4
|
+
* files, tree-scoped signalling (POSIX groups; Windows taskkill), and the
|
|
5
|
+
* SIGTERM→SIGKILL escalation. This layer reacts to an abort signal; callers
|
|
6
|
+
* own deadlines, teardown ladders, and cause classification.
|
|
7
|
+
*
|
|
8
|
+
* @module @bo-agent/subprocess-local/spawn
|
|
9
|
+
*/
|
|
10
|
+
import { spawn, spawnSync } from 'node:child_process';
|
|
11
|
+
import { randomBytes } from 'node:crypto';
|
|
12
|
+
import { closeSync, mkdtempSync, openSync, unlinkSync, writeSync } from 'node:fs';
|
|
13
|
+
import { tmpdir } from 'node:os';
|
|
14
|
+
import { join } from 'node:path';
|
|
15
|
+
import { setTimeout as sleepMs } from 'node:timers/promises';
|
|
16
|
+
import { scrubbedParentEnv } from '@bo-agent/subprocess';
|
|
17
|
+
import { linuxProcessGroupHasLiveMembers } from "./process-inspector.js";
|
|
18
|
+
/**
|
|
19
|
+
* Maximum value Node's `setTimeout` accepts without clamping (2^31 − 1 ms).
|
|
20
|
+
* Mirrors the upstream `dsh-timeout` constant so the subprocess service's
|
|
21
|
+
* grace-bounds can stay aligned without pulling in a sibling package.
|
|
22
|
+
*/
|
|
23
|
+
const MAX_TIMER_DELAY_MS = 2_147_483_647;
|
|
24
|
+
/**
|
|
25
|
+
* Build a child environment: explicit caller entries override the scrubbed
|
|
26
|
+
* parent base using the target platform's environment-key semantics. A string
|
|
27
|
+
* deliberately restores or overrides an entry; an explicit `undefined`
|
|
28
|
+
* tombstone removes an ordinary ambient entry.
|
|
29
|
+
* @param extra - explicit caller entries and tombstones, merged after the scrub.
|
|
30
|
+
* @returns the environment to hand to `spawn` for the child process.
|
|
31
|
+
*/
|
|
32
|
+
export function childEnv(extra) {
|
|
33
|
+
const env = scrubbedParentEnv();
|
|
34
|
+
if (process.platform !== 'win32')
|
|
35
|
+
return { ...env, ...extra };
|
|
36
|
+
let entries = Object.entries(env);
|
|
37
|
+
for (const [key, value] of Object.entries(extra ?? {})) {
|
|
38
|
+
const normalized = key.toUpperCase();
|
|
39
|
+
entries = entries.filter(([inherited]) => inherited.toUpperCase() !== normalized);
|
|
40
|
+
entries.push([key, value]);
|
|
41
|
+
}
|
|
42
|
+
return Object.fromEntries(entries);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Liveness-poll cadence for tree-exit waits. The timer stays ref'd: an
|
|
46
|
+
* awaited teardown must keep the event loop alive until the tree really
|
|
47
|
+
* exits, or the parent can exit while claiming quiescence and orphan the
|
|
48
|
+
* survivors it promised to reap.
|
|
49
|
+
*/
|
|
50
|
+
function sleepTick() {
|
|
51
|
+
return sleepMs(15);
|
|
52
|
+
}
|
|
53
|
+
let spillCounter = 0;
|
|
54
|
+
let defaultSpillDir;
|
|
55
|
+
/**
|
|
56
|
+
* The default spill location: a private (0700) per-process directory under
|
|
57
|
+
* the OS tmpdir, created lazily. Predictable world-readable paths would let
|
|
58
|
+
* other local users read command output or pre-create symlinks.
|
|
59
|
+
*/
|
|
60
|
+
function privateSpillDir() {
|
|
61
|
+
defaultSpillDir ??= mkdtempSync(join(tmpdir(), 'dsh-subprocess-'));
|
|
62
|
+
return defaultSpillDir;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Collects one stream with a bounded in-memory tail. With a spill cap, on
|
|
66
|
+
* first overflow a spill file is created and every chunk (including those
|
|
67
|
+
* already collected) is appended there while the full stream remains within
|
|
68
|
+
* the cap; without one, only the in-memory tail is ever retained (the
|
|
69
|
+
* diagnostic-tail shape — a language server's stderr).
|
|
70
|
+
*
|
|
71
|
+
* Tail-keep rationale (pi/OpenCode): errors and final results cluster at the
|
|
72
|
+
* end of command output; the spill file covers the head.
|
|
73
|
+
*/
|
|
74
|
+
export class OutputCollector {
|
|
75
|
+
maxBytes;
|
|
76
|
+
maxSpillBytes;
|
|
77
|
+
label;
|
|
78
|
+
spillDir;
|
|
79
|
+
chunks = [];
|
|
80
|
+
bytes = 0;
|
|
81
|
+
dropped = false;
|
|
82
|
+
spillFd;
|
|
83
|
+
spillFile;
|
|
84
|
+
spillDisabled;
|
|
85
|
+
/** Total bytes ever pushed (not just retained). */
|
|
86
|
+
total = 0;
|
|
87
|
+
constructor(maxBytes, maxSpillBytes, label, spillDir) {
|
|
88
|
+
this.maxBytes = maxBytes;
|
|
89
|
+
this.maxSpillBytes = maxSpillBytes;
|
|
90
|
+
this.label = label;
|
|
91
|
+
this.spillDir = spillDir;
|
|
92
|
+
this.spillDisabled = maxSpillBytes === undefined;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Ingest one stream chunk, counting it toward the whole-stream total. On
|
|
96
|
+
* first overflow of the in-memory cap a spill file is opened (when spilling
|
|
97
|
+
* is enabled) and every chunk (already-collected ones included) is appended
|
|
98
|
+
* there from then on; the in-memory tail then drops whole chunks from its
|
|
99
|
+
* head (or the head of a single over-cap chunk) until it fits the cap again.
|
|
100
|
+
* @param chunk - the raw bytes from one stream 'data' event.
|
|
101
|
+
*/
|
|
102
|
+
push(chunk) {
|
|
103
|
+
this.total += chunk.length;
|
|
104
|
+
const overflows = this.bytes + chunk.length > this.maxBytes;
|
|
105
|
+
if (!this.spillDisabled && (overflows || this.spillFd !== undefined))
|
|
106
|
+
this.spillAll(chunk);
|
|
107
|
+
this.chunks.push(chunk);
|
|
108
|
+
this.bytes += chunk.length;
|
|
109
|
+
while (this.bytes > this.maxBytes) {
|
|
110
|
+
const head = this.chunks[0];
|
|
111
|
+
const excess = this.bytes - this.maxBytes;
|
|
112
|
+
if (head.length <= excess) {
|
|
113
|
+
// Drop the whole head chunk (length ≥ 1 is guaranteed while over cap).
|
|
114
|
+
this.chunks.shift();
|
|
115
|
+
this.bytes -= head.length;
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
// Trim the head so the retained window is byte-exact at the cap — a
|
|
119
|
+
// diagnostic tail (an LSP server's stderr) must hold the LAST
|
|
120
|
+
// maxBytes regardless of how the stream was chunked.
|
|
121
|
+
this.chunks[0] = head.subarray(excess);
|
|
122
|
+
this.bytes -= excess;
|
|
123
|
+
}
|
|
124
|
+
this.dropped = true;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
/** Open the spill file lazily and append `chunk` (and any prior chunks once). */
|
|
128
|
+
spillAll(chunk) {
|
|
129
|
+
if (this.maxSpillBytes !== undefined && this.total > this.maxSpillBytes) {
|
|
130
|
+
this.discardSpill();
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
if (this.spillFd === undefined) {
|
|
134
|
+
// Random suffix + O_EXCL + no-follow-equivalent ('wx' fails on any
|
|
135
|
+
// existing path, symlink or not) + owner-only mode: defeats spill-path
|
|
136
|
+
// prediction and symlink planting in shared tmp dirs.
|
|
137
|
+
this.spillFile = join(this.spillDir, `dsh-subprocess-${process.pid}-${++spillCounter}-${randomBytes(6).toString('hex')}-${this.label}.log`);
|
|
138
|
+
this.spillFd = openSync(this.spillFile, 'wx', 0o600);
|
|
139
|
+
for (const prior of this.chunks)
|
|
140
|
+
writeSync(this.spillFd, prior);
|
|
141
|
+
}
|
|
142
|
+
writeSync(this.spillFd, chunk);
|
|
143
|
+
}
|
|
144
|
+
/** Stop spilling and remove the file once it can no longer hold the complete stream. */
|
|
145
|
+
discardSpill() {
|
|
146
|
+
const fd = this.spillFd;
|
|
147
|
+
const file = this.spillFile;
|
|
148
|
+
this.spillFd = undefined;
|
|
149
|
+
this.spillFile = undefined;
|
|
150
|
+
this.spillDisabled = true;
|
|
151
|
+
if (fd !== undefined) {
|
|
152
|
+
try {
|
|
153
|
+
closeSync(fd);
|
|
154
|
+
}
|
|
155
|
+
catch {
|
|
156
|
+
// Retain the descriptor so finalize can retry the failed close.
|
|
157
|
+
this.spillFd = fd;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
if (file !== undefined) {
|
|
161
|
+
try {
|
|
162
|
+
unlinkSync(file);
|
|
163
|
+
}
|
|
164
|
+
catch {
|
|
165
|
+
// A failed unlink leaves at most maxSpillBytes behind, never an unbounded file.
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Incremental read in whole-stream byte coordinates: returns everything
|
|
171
|
+
* pushed since `fromByte`. When `fromByte` has already slid out of the
|
|
172
|
+
* in-memory tail window, the read is `lossy` — it returns the whole
|
|
173
|
+
* retained tail and the gap is only recoverable from the spill file.
|
|
174
|
+
* @param fromByte - whole-stream offset to resume from (a prior read's `nextOffset`; 0 for the first read).
|
|
175
|
+
* @returns the delta text, the offset for the next read, the `lossy` flag, and the spill path when one was created.
|
|
176
|
+
*/
|
|
177
|
+
readFrom(fromByte) {
|
|
178
|
+
const windowStart = this.total - this.bytes;
|
|
179
|
+
const buffer = Buffer.concat(this.chunks);
|
|
180
|
+
const lossy = fromByte < windowStart;
|
|
181
|
+
const slice = lossy ? buffer : buffer.subarray(fromByte - windowStart);
|
|
182
|
+
return {
|
|
183
|
+
text: slice.toString('utf8'),
|
|
184
|
+
nextOffset: this.total,
|
|
185
|
+
lossy,
|
|
186
|
+
...this.spillFile !== undefined ? { spillPath: this.spillFile } : {},
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Close the spill file once the stream has ended. A failed close (delayed
|
|
191
|
+
* writeback fault) stops advertising the spill path — the file may be
|
|
192
|
+
* missing its tail — while every in-memory read keeps working. Idempotent;
|
|
193
|
+
* the spawn path seals both collectors at settlement so reads after exit
|
|
194
|
+
* never point at a still-open file.
|
|
195
|
+
*/
|
|
196
|
+
seal() {
|
|
197
|
+
if (this.spillFd === undefined)
|
|
198
|
+
return;
|
|
199
|
+
try {
|
|
200
|
+
closeSync(this.spillFd);
|
|
201
|
+
}
|
|
202
|
+
catch {
|
|
203
|
+
// A delayed writeback failure makes the spill unreliable; keep the
|
|
204
|
+
// in-memory result but stop advertising that file.
|
|
205
|
+
this.spillFile = undefined;
|
|
206
|
+
}
|
|
207
|
+
this.spillFd = undefined;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Seal the spill file and return the final output.
|
|
211
|
+
* @returns the final collected output: tail text, truncation flag, and the spill path when intact.
|
|
212
|
+
*/
|
|
213
|
+
finalize() {
|
|
214
|
+
this.seal();
|
|
215
|
+
return {
|
|
216
|
+
text: Buffer.concat(this.chunks).toString('utf8'),
|
|
217
|
+
truncated: this.dropped,
|
|
218
|
+
...this.spillFile !== undefined ? { spillPath: this.spillFile } : {},
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Send `sig` to a detached POSIX process group. Never throws: delivery races
|
|
224
|
+
* process exit and may run in a timer callback, so failures are contained and
|
|
225
|
+
* a non-positive pid is a no-op.
|
|
226
|
+
* @param pid - the group leader's pid; non-positive means the spawn failed and the call is a no-op.
|
|
227
|
+
* @param sig - the signal to deliver to the whole group.
|
|
228
|
+
*/
|
|
229
|
+
export function killGroup(pid, sig) {
|
|
230
|
+
if (pid <= 0)
|
|
231
|
+
return;
|
|
232
|
+
try {
|
|
233
|
+
process.kill(-pid, sig);
|
|
234
|
+
}
|
|
235
|
+
catch {
|
|
236
|
+
// Swallow: see contract above.
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Terminate one Windows process tree with `taskkill /T /F`. Contained like
|
|
241
|
+
* POSIX group signalling — delivery races tree exit, so an absent tree, a
|
|
242
|
+
* nonzero status, or a missing taskkill binary must not break idempotent
|
|
243
|
+
* teardown.
|
|
244
|
+
* @param pid - root process id; non-positive is a no-op.
|
|
245
|
+
*/
|
|
246
|
+
export function taskkillProcessTree(pid) {
|
|
247
|
+
if (pid <= 0)
|
|
248
|
+
return;
|
|
249
|
+
// Outcome deliberately unchecked: an already-absent tree (status 128), exit
|
|
250
|
+
// races, and a missing taskkill binary (spawnSync reports, never throws) are
|
|
251
|
+
// as tolerable here as ESRCH is for a POSIX group signal.
|
|
252
|
+
spawnSync('taskkill', ['/PID', String(pid), '/T', '/F'], { stdio: 'ignore' });
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Signal a detached process tree with platform-correct semantics: POSIX
|
|
256
|
+
* signals the negative process-group id and falls back to the direct child
|
|
257
|
+
* when the group is gone; Windows terminates the tree via taskkill (any
|
|
258
|
+
* signal value force-terminates — Node maps signals to TerminateProcess).
|
|
259
|
+
*/
|
|
260
|
+
function signalTree(platform, pid, sig, child, taskkill) {
|
|
261
|
+
if (platform === 'win32') {
|
|
262
|
+
taskkill(pid);
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
/* v8 ignore next -- kill/terminate gate on treeAlive(), which is false for pid -1; this guard protects direct callers only. */
|
|
266
|
+
if (pid <= 0)
|
|
267
|
+
return;
|
|
268
|
+
try {
|
|
269
|
+
process.kill(-pid, sig);
|
|
270
|
+
}
|
|
271
|
+
catch {
|
|
272
|
+
/* v8 ignore start -- the fallback needs a live child whose group signal fails
|
|
273
|
+
(EPERM-style), which POSIX CI cannot stage; the swallow keeps teardown idempotent. */
|
|
274
|
+
try {
|
|
275
|
+
child.kill(sig);
|
|
276
|
+
}
|
|
277
|
+
catch {
|
|
278
|
+
// The direct child already exited; teardown remains idempotent.
|
|
279
|
+
}
|
|
280
|
+
/* v8 ignore stop */
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Spawn one isolated detached process tree with the spec's per-stream stdio
|
|
285
|
+
* dispositions. Runtime exits resolve `done` as {@link SubprocessOutcome};
|
|
286
|
+
* only spawn failures reject.
|
|
287
|
+
* @param spec - fully resolved argv, cwd, stdio, grace, cancellation, environment.
|
|
288
|
+
* @param internals - test-only spill-directory, platform, and taskkill overrides.
|
|
289
|
+
* @returns live subprocess handle.
|
|
290
|
+
* @throws when `graceMs` cannot be represented by one Node timer.
|
|
291
|
+
*/
|
|
292
|
+
export function spawnSubprocess(spec, internals = {}) {
|
|
293
|
+
if (!Number.isFinite(spec.graceMs) || spec.graceMs <= 0 || spec.graceMs > MAX_TIMER_DELAY_MS) {
|
|
294
|
+
throw new Error(`subprocess graceMs must be a positive finite number no greater than ${MAX_TIMER_DELAY_MS}`);
|
|
295
|
+
}
|
|
296
|
+
const spillDir = internals.spillDir ?? privateSpillDir();
|
|
297
|
+
const platform = internals.platform ?? process.platform;
|
|
298
|
+
const taskkill = internals.taskkill ?? taskkillProcessTree;
|
|
299
|
+
const linuxGroupHasLiveMembers = internals.linuxProcessGroupHasLiveMembers ?? linuxProcessGroupHasLiveMembers;
|
|
300
|
+
if (spec.signal?.aborted) {
|
|
301
|
+
throw new Error(`aborted before spawn: ${String(spec.signal.reason ?? 'aborted')}`);
|
|
302
|
+
}
|
|
303
|
+
const [program, ...args] = spec.argv;
|
|
304
|
+
if (program === undefined || program.length === 0) {
|
|
305
|
+
throw new Error('invalid argv: expected a non-empty program name at argv[0]');
|
|
306
|
+
}
|
|
307
|
+
const isCollect = (mode) => mode !== 'pipe' && mode !== 'inherit';
|
|
308
|
+
const outMode = spec.stdio.stdout;
|
|
309
|
+
const errMode = spec.stdio.stderr;
|
|
310
|
+
const stdinMode = spec.stdio.stdin;
|
|
311
|
+
const env = childEnv(spec.env);
|
|
312
|
+
const child = spawn(program, args, {
|
|
313
|
+
cwd: spec.cwd,
|
|
314
|
+
env,
|
|
315
|
+
stdio: [
|
|
316
|
+
stdinMode === 'ignore' ? 'ignore' : 'pipe',
|
|
317
|
+
outMode === 'inherit' ? 'inherit' : 'pipe',
|
|
318
|
+
errMode === 'inherit' ? 'inherit' : 'pipe',
|
|
319
|
+
],
|
|
320
|
+
// `detached` gives teardown a tree root on POSIX (its own process group);
|
|
321
|
+
// Windows terminates by root pid through taskkill /T instead.
|
|
322
|
+
detached: platform !== 'win32',
|
|
323
|
+
});
|
|
324
|
+
const collectStream = (mode, stream, label) => {
|
|
325
|
+
if (!isCollect(mode) || stream === null)
|
|
326
|
+
return undefined;
|
|
327
|
+
const collector = new OutputCollector(mode.maxBytes, mode.spill?.maxBytes, label, spillDir);
|
|
328
|
+
stream.on('data', (chunk) => { collector.push(chunk); });
|
|
329
|
+
return collector;
|
|
330
|
+
};
|
|
331
|
+
const stdoutCollector = collectStream(outMode, child.stdout, 'stdout');
|
|
332
|
+
const stderrCollector = collectStream(errMode, child.stderr, 'stderr');
|
|
333
|
+
let graceTimer;
|
|
334
|
+
let treeExitObserved = false;
|
|
335
|
+
let treeExitObservation;
|
|
336
|
+
let settled = false;
|
|
337
|
+
// Failed spawns use pid -1 so signalling remains a no-op.
|
|
338
|
+
const pid = child.pid ?? -1;
|
|
339
|
+
/** Whether the detached tree's root (or POSIX group) is still alive. */
|
|
340
|
+
const treeAlive = () => {
|
|
341
|
+
/* v8 ignore next -- only a timer callback already queued when the observer settles can enter here;
|
|
342
|
+
the guard is the final defense against probing an id after its tree was confirmed absent. */
|
|
343
|
+
if (treeExitObserved)
|
|
344
|
+
return false;
|
|
345
|
+
if (pid <= 0)
|
|
346
|
+
return false;
|
|
347
|
+
if (platform === 'win32') {
|
|
348
|
+
// Windows has no group-liveness probe; the direct child's exit is the
|
|
349
|
+
// observable boundary (taskkill /T already took the tree with it).
|
|
350
|
+
return child.exitCode === null && child.signalCode === null;
|
|
351
|
+
}
|
|
352
|
+
try {
|
|
353
|
+
process.kill(-pid, 0);
|
|
354
|
+
// A group containing only unreaped zombies still answers kill(0), but
|
|
355
|
+
// it can execute no work and cannot be signalled into quiescence. Only
|
|
356
|
+
// inspect after direct-child settlement so live-process polls remain a
|
|
357
|
+
// syscall rather than repeated process-table scans.
|
|
358
|
+
if (settled && platform === 'linux' && linuxGroupHasLiveMembers(pid) === false)
|
|
359
|
+
return false;
|
|
360
|
+
return true;
|
|
361
|
+
}
|
|
362
|
+
catch (error) {
|
|
363
|
+
const code = error.code;
|
|
364
|
+
/* v8 ignore next 2 -- POSIX reports an absent group as ESRCH; child-reaping timing
|
|
365
|
+
makes observing the other arm platform-dependent. */
|
|
366
|
+
if (code === 'ESRCH')
|
|
367
|
+
return false;
|
|
368
|
+
/* v8 ignore start -- EPERM and non-POSIX negative-pid failures are platform defenses; CI runs
|
|
369
|
+
tree-lifecycle tests on POSIX hosts where absence reports ESRCH. */
|
|
370
|
+
if (code === 'EPERM')
|
|
371
|
+
return true;
|
|
372
|
+
return child.exitCode === null && child.signalCode === null;
|
|
373
|
+
/* v8 ignore stop */
|
|
374
|
+
}
|
|
375
|
+
};
|
|
376
|
+
/**
|
|
377
|
+
* Start or reuse the handle's single whole-tree exit observer. The first
|
|
378
|
+
* confirmed absence is a permanent no-more-signals boundary: it cancels a
|
|
379
|
+
* pending escalation before this process-group id can be reused.
|
|
380
|
+
*/
|
|
381
|
+
const observeTreeExit = () => {
|
|
382
|
+
treeExitObservation ??= (async () => {
|
|
383
|
+
while (treeAlive())
|
|
384
|
+
await sleepTick();
|
|
385
|
+
treeExitObserved = true;
|
|
386
|
+
if (graceTimer !== undefined)
|
|
387
|
+
clearTimeout(graceTimer);
|
|
388
|
+
graceTimer = undefined;
|
|
389
|
+
})();
|
|
390
|
+
return treeExitObservation;
|
|
391
|
+
};
|
|
392
|
+
// The escalation's tier primitive (not on the handle — terminate() is the
|
|
393
|
+
// only consumer-facing termination verb). Guards on TREE liveness, not
|
|
394
|
+
// outcome settlement: a TERM-trapping helper can outlive the settled direct
|
|
395
|
+
// child and must stay signalable, while a fully-dead tree (possible pid
|
|
396
|
+
// reuse) must not be re-signalled by a later tier.
|
|
397
|
+
const kill = (sig) => {
|
|
398
|
+
/* v8 ignore next -- the shared exit observer cancels the ordinary dead-tree timer;
|
|
399
|
+
this remains the timer/death race guard and cannot be staged deterministically. */
|
|
400
|
+
if (!treeAlive())
|
|
401
|
+
return;
|
|
402
|
+
signalTree(platform, pid, sig, child, taskkill);
|
|
403
|
+
};
|
|
404
|
+
const terminate = () => {
|
|
405
|
+
if (treeExitObserved || graceTimer !== undefined)
|
|
406
|
+
return;
|
|
407
|
+
// Observe from the first termination tier onward, even when inherited
|
|
408
|
+
// pipes delay `done` and no consumer has begun its own teardown wait.
|
|
409
|
+
void observeTreeExit();
|
|
410
|
+
// oxlint-disable-next-line typescript/no-unnecessary-condition -- observer can record absence before its first await.
|
|
411
|
+
if (treeExitObserved)
|
|
412
|
+
return;
|
|
413
|
+
kill('SIGTERM');
|
|
414
|
+
// The escalation must survive direct-child settlement — the leader dying
|
|
415
|
+
// does not mean the tree died — so settle does not clear this timer, and
|
|
416
|
+
// kill() re-probes tree liveness before force-killing. It stays ref'd:
|
|
417
|
+
// the pending SIGKILL is a commitment, and a parent exiting before it
|
|
418
|
+
// fires would orphan a trapped survivor. Self-bounds at graceMs.
|
|
419
|
+
graceTimer = setTimeout(() => { kill('SIGKILL'); }, spec.graceMs);
|
|
420
|
+
};
|
|
421
|
+
const terminateForHostExit = () => {
|
|
422
|
+
kill('SIGKILL');
|
|
423
|
+
};
|
|
424
|
+
// The caller owns timeout classification; this layer only reacts to abort.
|
|
425
|
+
const onAbort = () => { terminate(); };
|
|
426
|
+
spec.signal?.addEventListener('abort', onAbort, { once: true });
|
|
427
|
+
// Batch stdin is written and closed up front; process exit and captured
|
|
428
|
+
// output remain authoritative, so write errors (EPIPE) are best-effort.
|
|
429
|
+
if (typeof stdinMode === 'object' && child.stdin !== null) {
|
|
430
|
+
child.stdin.on('error', () => { });
|
|
431
|
+
child.stdin.end(stdinMode.data);
|
|
432
|
+
}
|
|
433
|
+
const done = new Promise((resolve, reject) => {
|
|
434
|
+
let pipeDrainTimer;
|
|
435
|
+
const settle = (exitCode, signal) => {
|
|
436
|
+
if (settled)
|
|
437
|
+
return;
|
|
438
|
+
settled = true;
|
|
439
|
+
// Only harness-collected pipes are force-closed at the drain boundary;
|
|
440
|
+
// a 'pipe'-mode stream belongs to the caller and closes with the child.
|
|
441
|
+
if (stdoutCollector !== undefined)
|
|
442
|
+
child.stdout?.destroy();
|
|
443
|
+
if (stderrCollector !== undefined)
|
|
444
|
+
child.stderr?.destroy();
|
|
445
|
+
stdoutCollector?.seal();
|
|
446
|
+
stderrCollector?.seal();
|
|
447
|
+
cleanup();
|
|
448
|
+
resolve({ exitCode, signal });
|
|
449
|
+
};
|
|
450
|
+
child.on('error', (error) => {
|
|
451
|
+
// No meaningful close outcome follows a spawn failure.
|
|
452
|
+
settled = true;
|
|
453
|
+
cleanup();
|
|
454
|
+
reject(error);
|
|
455
|
+
});
|
|
456
|
+
child.on('exit', (exitCode, signal) => {
|
|
457
|
+
// A surviving descendant that inherited a pipe must not hold the
|
|
458
|
+
// outcome open indefinitely: after exit, the same bounded grace that
|
|
459
|
+
// governs kills also bounds the close wait.
|
|
460
|
+
pipeDrainTimer = setTimeout(() => {
|
|
461
|
+
settle(exitCode, signal);
|
|
462
|
+
}, spec.graceMs);
|
|
463
|
+
});
|
|
464
|
+
child.on('close', settle);
|
|
465
|
+
function cleanup() {
|
|
466
|
+
// graceTimer deliberately NOT cleared: the SIGKILL escalation must be
|
|
467
|
+
// able to reach tree survivors after the direct child settles.
|
|
468
|
+
if (pipeDrainTimer !== undefined)
|
|
469
|
+
clearTimeout(pipeDrainTimer);
|
|
470
|
+
spec.signal?.removeEventListener('abort', onAbort);
|
|
471
|
+
}
|
|
472
|
+
});
|
|
473
|
+
const waitForExit = async (signal) => {
|
|
474
|
+
const observed = observeTreeExit();
|
|
475
|
+
if (treeExitObserved)
|
|
476
|
+
return true;
|
|
477
|
+
if (signal?.aborted)
|
|
478
|
+
return false;
|
|
479
|
+
if (signal === undefined) {
|
|
480
|
+
await observed;
|
|
481
|
+
return true;
|
|
482
|
+
}
|
|
483
|
+
const aborted = Promise.withResolvers();
|
|
484
|
+
const onAbort = () => { aborted.resolve(false); };
|
|
485
|
+
signal.addEventListener('abort', onAbort, { once: true });
|
|
486
|
+
/* v8 ignore next -- closes the event-loop race between the preceding aborted check and listener registration. */
|
|
487
|
+
if (signal.aborted)
|
|
488
|
+
onAbort();
|
|
489
|
+
try {
|
|
490
|
+
return await Promise.race([observed.then(() => true), aborted.promise]);
|
|
491
|
+
}
|
|
492
|
+
finally {
|
|
493
|
+
signal.removeEventListener('abort', onAbort);
|
|
494
|
+
}
|
|
495
|
+
};
|
|
496
|
+
return {
|
|
497
|
+
pid,
|
|
498
|
+
/* v8 ignore start -- pipe-mode fds exist on every spawn Node returns; the null-coalesces guard a nonconforming ChildProcess only. */
|
|
499
|
+
stdin: stdinMode === 'pipe' ? child.stdin ?? undefined : undefined,
|
|
500
|
+
stdout: outMode === 'pipe' ? child.stdout ?? undefined : undefined,
|
|
501
|
+
stderr: errMode === 'pipe' ? child.stderr ?? undefined : undefined,
|
|
502
|
+
/* v8 ignore stop */
|
|
503
|
+
collected: {
|
|
504
|
+
...stdoutCollector !== undefined ? { stdout: stdoutCollector } : {},
|
|
505
|
+
...stderrCollector !== undefined ? { stderr: stderrCollector } : {},
|
|
506
|
+
},
|
|
507
|
+
done,
|
|
508
|
+
terminate,
|
|
509
|
+
terminateForHostExit,
|
|
510
|
+
waitForExit,
|
|
511
|
+
};
|
|
512
|
+
}
|
|
513
|
+
//# sourceMappingURL=spawn.js.map
|
package/lib/spawn.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spawn.js","sour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AAI,SAAS,CAAC,CAAC,CAAC,SAAS;QAClE,MAAM,EAAE,OAAO,KAAK,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,IAAI,SAAS,CAAC,CAAC,CAAC,SAAS;QAClE,MAAM,EAAE,OAAO,KAAK,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,IAAI,SAAS,CAAC,CAAC,CAAC,SAAS;QAClE,oBAAoB;QACpB,SAAS,EAAE;YACT,GAAG,eAAe,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,eAAe,EAAE,CAAC,CAAC,CAAC,EAAE;YACnE,GAAG,eAAe,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,eAAe,EAAE,CAAC,CAAC,CAAC,EAAE;SACpE;QACD,IAAI;QACJ,SAAS;QACT,oBAAoB;QACpB,WAAW;KACZ,CAAA;AACH,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@bo-agent/subprocess-local",
|
|
3
|
+
"description": "Local subprocess provider: detached process-tree spawn, per-stream stdio, tail-keep collection with spill, POSIX process-group and Windows taskkill tree signalling, and SIGTERM→SIGKILL escalation (standalone product, forked from the DeepSeek Harness)",
|
|
4
|
+
"version": "0.0.2",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "lib/index.js",
|
|
7
|
+
"types": "lib/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./lib/index.d.ts",
|
|
11
|
+
"default": "./lib/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./package.json": "./package.json"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"lib/"
|
|
17
|
+
],
|
|
18
|
+
"publishConfig": {
|
|
19
|
+
"access": "public"
|
|
20
|
+
},
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"cordis": "^4.0.0-rc.10",
|
|
24
|
+
"@bo-agent/inline": "0.0.2",
|
|
25
|
+
"@bo-agent/subprocess": "0.0.2"
|
|
26
|
+
},
|
|
27
|
+
"peerDependencies": {
|
|
28
|
+
"cordis": "^4.0.0-rc.10",
|
|
29
|
+
"@bo-agent/subprocess": "0.0.2",
|
|
30
|
+
"@bo-agent/inline": "0.0.2"
|
|
31
|
+
}
|
|
32
|
+
}
|