@av-pi-studio/protocol 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.tsbuildinfo +1 -0
- package/dist/binary-frames/file-transfer-protocol.d.ts +63 -0
- package/dist/binary-frames/file-transfer-protocol.d.ts.map +1 -0
- package/dist/binary-frames/file-transfer-protocol.js +108 -0
- package/dist/binary-frames/file-transfer-protocol.js.map +1 -0
- package/dist/binary-frames/index.d.ts +3 -0
- package/dist/binary-frames/index.d.ts.map +1 -0
- package/dist/binary-frames/index.js +4 -0
- package/dist/binary-frames/index.js.map +1 -0
- package/dist/binary-frames/terminal-stream-protocol.d.ts +67 -0
- package/dist/binary-frames/terminal-stream-protocol.d.ts.map +1 -0
- package/dist/binary-frames/terminal-stream-protocol.js +104 -0
- package/dist/binary-frames/terminal-stream-protocol.js.map +1 -0
- package/dist/client-capabilities.d.ts +46 -0
- package/dist/client-capabilities.d.ts.map +1 -0
- package/dist/client-capabilities.js +75 -0
- package/dist/client-capabilities.js.map +1 -0
- package/dist/endpoint.d.ts +27 -0
- package/dist/endpoint.d.ts.map +1 -0
- package/dist/endpoint.js +75 -0
- package/dist/endpoint.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -0
- package/dist/messages.d.ts +6119 -0
- package/dist/messages.d.ts.map +1 -0
- package/dist/messages.js +372 -0
- package/dist/messages.js.map +1 -0
- package/dist/provider-manifest.d.ts +176 -0
- package/dist/provider-manifest.d.ts.map +1 -0
- package/dist/provider-manifest.js +43 -0
- package/dist/provider-manifest.js.map +1 -0
- package/dist/validation.d.ts +77 -0
- package/dist/validation.d.ts.map +1 -0
- package/dist/validation.js +54 -0
- package/dist/validation.js.map +1 -0
- package/package.json +23 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/typescript/lib/lib.es2023.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../../node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../node_modules/typescript/lib/lib.es2023.intl.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/zod/v3/helpers/typeAliases.d.cts","../../../node_modules/zod/v3/helpers/util.d.cts","../../../node_modules/zod/v3/index.d.cts","../../../node_modules/zod/v3/ZodError.d.cts","../../../node_modules/zod/v3/locales/en.d.cts","../../../node_modules/zod/v3/errors.d.cts","../../../node_modules/zod/v3/helpers/parseUtil.d.cts","../../../node_modules/zod/v3/helpers/enumUtil.d.cts","../../../node_modules/zod/v3/helpers/errorUtil.d.cts","../../../node_modules/zod/v3/helpers/partialUtil.d.cts","../../../node_modules/zod/v3/standard-schema.d.cts","../../../node_modules/zod/v3/types.d.cts","../../../node_modules/zod/v3/external.d.cts","../../../node_modules/zod/index.d.cts","../src/validation.ts","../src/client-capabilities.ts","../src/endpoint.ts","../src/messages.ts","../src/binary-frames/terminal-stream-protocol.ts","../src/binary-frames/file-transfer-protocol.ts","../src/binary-frames/index.ts","../src/provider-manifest.ts","../src/index.ts","../../../node_modules/@types/node/compatibility/disposable.d.ts","../../../node_modules/@types/node/compatibility/indexable.d.ts","../../../node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/@types/node/compatibility/index.d.ts","../../../node_modules/@types/node/globals.typedarray.d.ts","../../../node_modules/@types/node/buffer.buffer.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/web-globals/abortcontroller.d.ts","../../../node_modules/@types/node/web-globals/domexception.d.ts","../../../node_modules/@types/node/web-globals/events.d.ts","../../../node_modules/undici-types/header.d.ts","../../../node_modules/undici-types/readable.d.ts","../../../node_modules/undici-types/file.d.ts","../../../node_modules/undici-types/fetch.d.ts","../../../node_modules/undici-types/formdata.d.ts","../../../node_modules/undici-types/connector.d.ts","../../../node_modules/undici-types/client.d.ts","../../../node_modules/undici-types/errors.d.ts","../../../node_modules/undici-types/dispatcher.d.ts","../../../node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/undici-types/global-origin.d.ts","../../../node_modules/undici-types/pool-stats.d.ts","../../../node_modules/undici-types/pool.d.ts","../../../node_modules/undici-types/handlers.d.ts","../../../node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/undici-types/agent.d.ts","../../../node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/undici-types/mock-agent.d.ts","../../../node_modules/undici-types/mock-client.d.ts","../../../node_modules/undici-types/mock-pool.d.ts","../../../node_modules/undici-types/mock-errors.d.ts","../../../node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/undici-types/retry-handler.d.ts","../../../node_modules/undici-types/retry-agent.d.ts","../../../node_modules/undici-types/api.d.ts","../../../node_modules/undici-types/interceptors.d.ts","../../../node_modules/undici-types/util.d.ts","../../../node_modules/undici-types/cookies.d.ts","../../../node_modules/undici-types/patch.d.ts","../../../node_modules/undici-types/websocket.d.ts","../../../node_modules/undici-types/eventsource.d.ts","../../../node_modules/undici-types/filereader.d.ts","../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/undici-types/content-type.d.ts","../../../node_modules/undici-types/cache.d.ts","../../../node_modules/undici-types/index.d.ts","../../../node_modules/@types/node/web-globals/fetch.d.ts","../../../node_modules/@types/node/web-globals/navigator.d.ts","../../../node_modules/@types/node/web-globals/storage.d.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/inspector.generated.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/readline/promises.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/sea.d.ts","../../../node_modules/@types/node/sqlite.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/test.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/index.d.ts"],"fileIdsList":[[90,135,136,138,155,156],[90,137,138,155,156],[138,155,156],[90,138,143,155,156,173],[90,138,139,144,149,155,156,158,170,181],[90,138,139,140,149,155,156,158],[90,138,155,156],[85,86,87,90,138,155,156],[90,138,141,155,156,182],[90,138,142,143,150,155,156,159],[90,138,143,155,156,170,178],[90,138,144,146,149,155,156,158],[90,137,138,145,155,156],[90,138,146,147,155,156],[90,138,148,149,155,156],[90,137,138,149,155,156],[90,138,149,150,151,155,156,170,181],[90,138,149,150,151,155,156,165,170,173],[90,131,138,146,149,152,155,156,158,170,181],[90,138,149,150,152,153,155,156,158,170,178,181],[90,138,152,154,155,156,170,178,181],[88,89,90,91,92,93,94,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187],[90,138,149,155,156],[90,138,155,156,157,181],[90,138,146,149,155,156,158,170],[90,138,155,156,159],[90,138,155,156,160],[90,137,138,155,156,161],[90,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187],[90,138,155,156,163],[90,138,155,156,164],[90,138,149,155,156,165,166],[90,138,155,156,165,167,182,184],[90,138,150,155,156],[90,138,149,155,156,170,171,173],[90,138,155,156,172,173],[90,138,155,156,170,171],[90,138,155,156,173],[90,138,155,156,174],[90,135,138,155,156,170,175,181],[90,138,149,155,156,176,177],[90,138,155,156,176,177],[90,138,143,155,156,158,170,178],[90,138,155,156,179],[90,138,155,156,158,180],[90,138,152,155,156,164,181],[90,138,143,155,156,182],[90,138,155,156,170,183],[90,138,155,156,157,184],[90,138,155,156,185],[90,131,138,155,156],[90,131,138,149,151,155,156,161,170,173,181,183,184,186],[90,138,155,156,170,187],[90,103,107,138,155,156,181],[90,103,138,155,156,170,181],[90,98,138,155,156],[90,100,103,138,155,156,178,181],[90,138,155,156,158,178],[90,138,155,156,188],[90,98,138,155,156,188],[90,100,103,138,155,156,158,181],[90,95,96,99,102,138,149,155,156,170,181],[90,103,110,138,155,156],[90,95,101,138,155,156],[90,103,124,125,138,155,156],[90,99,103,138,155,156,173,181,188],[90,124,138,155,156,188],[90,97,98,138,155,156,188],[90,103,138,155,156],[90,97,98,99,100,101,102,103,104,105,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,125,126,127,128,129,130,138,155,156],[90,103,118,138,155,156],[90,103,110,111,138,155,156],[90,101,103,111,112,138,155,156],[90,102,138,155,156],[90,95,98,103,138,155,156],[90,103,107,111,112,138,155,156],[90,107,138,155,156],[90,101,103,106,138,155,156,181],[90,95,100,103,110,138,155,156],[90,138,155,156,170],[90,98,103,124,138,155,156,186,188],[74,90,138,155,156],[62,63,64,90,138,155,156],[65,66,90,138,155,156],[62,63,65,67,68,73,90,138,155,156],[63,65,90,138,155,156],[73,90,138,155,156],[65,90,138,155,156],[62,63,65,68,69,70,71,72,90,138,155,156],[75,90,138,155,156],[80,81,90,138,155,156],[76,90,138,155,156],[76,77,78,79,82,83,90,138,155,156],[75,76,90,138,155,156]],"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":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cdf8847677ac7d20486e54dd3fcf09eda95812ac8ace44b4418da1bbbab6eb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"df83c2a6c73228b625b0beb6669c7ee2a09c914637e2d35170723ad49c0f5cd4","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"d3cfde44f8089768ebb08098c96d01ca260b88bccf238d55eee93f1c620ff5a5","impliedFormat":1},{"version":"293eadad9dead44c6fd1db6de552663c33f215c55a1bfa2802a1bceed88ff0ec","impliedFormat":1},{"version":"833e92c058d033cde3f29a6c7603f517001d1ddd8020bc94d2067a3bc69b2a8e","impliedFormat":1},{"version":"08b2fae7b0f553ad9f79faec864b179fc58bc172e295a70943e8585dd85f600c","impliedFormat":1},{"version":"f12edf1672a94c578eca32216839604f1e1c16b40a1896198deabf99c882b340","impliedFormat":1},{"version":"e3498cf5e428e6c6b9e97bd88736f26d6cf147dedbfa5a8ad3ed8e05e059af8a","impliedFormat":1},{"version":"dba3f34531fd9b1b6e072928b6f885aa4d28dd6789cbd0e93563d43f4b62da53","impliedFormat":1},{"version":"f672c876c1a04a223cf2023b3d91e8a52bb1544c576b81bf64a8fec82be9969c","impliedFormat":1},{"version":"e4b03ddcf8563b1c0aee782a185286ed85a255ce8a30df8453aade2188bbc904","impliedFormat":1},{"version":"2329d90062487e1eaca87b5e06abcbbeeecf80a82f65f949fd332cfcf824b87b","impliedFormat":1},{"version":"25b3f581e12ede11e5739f57a86e8668fbc0124f6649506def306cad2c59d262","impliedFormat":1},{"version":"4fdb529707247a1a917a4626bfb6a293d52cd8ee57ccf03830ec91d39d606d6d","impliedFormat":1},{"version":"a9ebb67d6bbead6044b43714b50dcb77b8f7541ffe803046fdec1714c1eba206","impliedFormat":1},{"version":"5780b706cece027f0d4444fbb4e1af62dc51e19da7c3d3719f67b22b033859b9","impliedFormat":1},{"version":"8c664656412f70e8f50cd3e8e6c0f8ade052676e16a44f8cc3353a150e95d799","signature":"d7eef9fb2ef0d20ca3a7a24f22096aa4edbd5608e01550a012a40c18d065db35"},{"version":"4cf43d13755b9dbeb9aa7e063d2a1d6a2f8860726e2947a3d78feab0d913d585","signature":"50291032fb9decabe0244a3397706ec81866ef211fce7ddef8c7f01658b17d00"},{"version":"fce6b5b62208183bc4a1ee1a30068c5cfa2f1edc1f07363156c9e6def0b96665","signature":"c4c8603245ab64e11ff220baf198193089713a3a4fbfe37d154e5b5521610947"},{"version":"6898fd3086a8d49ff699f847b3bfba2019a4ae9326472bbcc70f38f1b6a1bd2a","signature":"129f92bc56ca138ae08114cdaf45f0b80aeac898d4a94220cde3fccbc9786566"},{"version":"0fbd66546ac311be41fee044623bfe080c7b89de1086b2151a159d2f3eaa57bb","signature":"54f4e07ffe47dbd162491e2e48af4db9b01c785e3d52be912922a70cb40d9691"},{"version":"c98f25eebf8db17c3921a4ff2af41e80a795c3adfdae475280d149e8aca78439","signature":"fa70f99b09be6b9683ca899622ec8c872a2818e5ad065d00675e4ac67bc0b5fd"},{"version":"2fc31e1d2f701c8dbc04158ed39bf494744200f1c30e1f885d641fa8ed4eb6e9","signature":"35e0b43165d74cc44c4e0a47490a11310e53caf8cf7d4f66e07f88a726f897f6"},{"version":"b782cfa624380be0bf2116d10f9faadfa4038eb7ecb24c2ac110316951467f7c","signature":"2b36239e9be6979f4d8910a5e3e028fc56ca6487856dfc5f1a3ea973495d215a"},{"version":"aa58593052a50ac5bbb19f849aee1ed50e9685d34ea3d0d483b679105cbae76d","signature":"751634c91e3855c68bb90ba6f493b679f6ac1ba19b887d179551da35fe87c4c5"},{"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":"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":"9855e02d837744303391e5623a531734443a5f8e6e8755e018c41d63ad797db2","impliedFormat":1},{"version":"4d631b81fa2f07a0e63a9a143d6a82c25c5f051298651a9b69176ba28930756d","impliedFormat":1},{"version":"836a356aae992ff3c28a0212e3eabcb76dd4b0cc06bcb9607aeef560661b860d","impliedFormat":1},{"version":"1e0d1f8b0adfa0b0330e028c7941b5a98c08b600efe7f14d2d2a00854fb2f393","impliedFormat":1},{"version":"41670ee38943d9cbb4924e436f56fc19ee94232bc96108562de1a734af20dc2c","affectsGlobalScope":true,"impliedFormat":1},{"version":"c906fb15bd2aabc9ed1e3f44eb6a8661199d6c320b3aa196b826121552cb3695","impliedFormat":1},{"version":"22295e8103f1d6d8ea4b5d6211e43421fe4564e34d0dd8e09e520e452d89e659","impliedFormat":1},{"version":"58647d85d0f722a1ce9de50955df60a7489f0593bf1a7015521efe901c06d770","impliedFormat":1},{"version":"9018e9493596e2d041fc531f5101a0d05f9d2e1311f4ae3c74345b1766158c08","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":"814118df420c4e38fe5ae1b9a3bafb6e9c2aa40838e528cde908381867be6466","impliedFormat":1},{"version":"a3fc63c0d7b031693f665f5494412ba4b551fe644ededccc0ab5922401079c95","impliedFormat":1},{"version":"80523c00b8544a2000ae0143e4a90a00b47f99823eb7926c1e03c494216fc363","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"45650f47bfb376c8a8ed39d4bcda5902ab899a3150029684ee4c10676d9fbaee","impliedFormat":1},{"version":"746911b62b329587939560deb5c036aca48aece03147b021fa680223255d5183","affectsGlobalScope":true,"impliedFormat":1},{"version":"18fd40412d102c5564136f29735e5d1c3b455b8a37f920da79561f1fde068208","impliedFormat":1},{"version":"c8d3e5a18ba35629954e48c4cc8f11dc88224650067a172685c736b27a34a4dc","impliedFormat":1},{"version":"f0be1b8078cd549d91f37c30c222c2a187ac1cf981d994fb476a1adc61387b14","affectsGlobalScope":true,"impliedFormat":1},{"version":"0aaed1d72199b01234152f7a60046bc947f1f37d78d182e9ae09c4289e06a592","impliedFormat":1},{"version":"2b55d426ff2b9087485e52ac4bc7cfafe1dc420fc76dad926cd46526567c501a","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":"47613031a5a31510831304405af561b0ffaedb734437c595256bb61a90f9311b","impliedFormat":1},{"version":"ae062ce7d9510060c5d7e7952ae379224fb3f8f2dd74e88959878af2057c143b","impliedFormat":1},{"version":"8a1a0d0a4a06a8d278947fcb66bf684f117bf147f89b06e50662d79a53be3e9f","affectsGlobalScope":true,"impliedFormat":1},{"version":"358765d5ea8afd285d4fd1532e78b88273f18cb3f87403a9b16fef61ac9fdcfe","impliedFormat":1},{"version":"9f55299850d4f0921e79b6bf344b47c420ce0f507b9dcf593e532b09ea7eeea1","impliedFormat":1}],"root":[[76,84]],"options":{"composite":true,"declaration":true,"declarationMap":true,"esModuleInterop":true,"exactOptionalPropertyTypes":false,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitOverride":true,"noUncheckedIndexedAccess":true,"outDir":"./","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":9,"tsBuildInfoFile":"./.tsbuildinfo","verbatimModuleSyntax":true},"referencedMap":[[135,1],[136,1],[137,2],[90,3],[138,4],[139,5],[140,6],[85,7],[88,8],[86,7],[87,7],[141,9],[142,10],[143,11],[144,12],[145,13],[146,14],[147,14],[148,15],[149,16],[150,17],[151,18],[91,7],[89,7],[152,19],[153,20],[154,21],[188,22],[155,23],[156,7],[157,24],[158,25],[159,26],[160,27],[161,28],[162,29],[163,30],[164,31],[165,32],[166,32],[167,33],[168,7],[169,34],[170,35],[172,36],[171,37],[173,38],[174,39],[175,40],[176,41],[177,42],[178,43],[179,44],[180,45],[181,46],[182,47],[183,48],[184,49],[185,50],[92,7],[93,7],[94,7],[132,51],[133,7],[134,7],[186,52],[187,53],[60,7],[61,7],[12,7],[11,7],[2,7],[13,7],[14,7],[15,7],[16,7],[17,7],[18,7],[19,7],[20,7],[3,7],[21,7],[22,7],[4,7],[23,7],[27,7],[24,7],[25,7],[26,7],[28,7],[29,7],[30,7],[5,7],[31,7],[32,7],[33,7],[34,7],[6,7],[38,7],[35,7],[36,7],[37,7],[39,7],[7,7],[40,7],[45,7],[46,7],[41,7],[42,7],[43,7],[44,7],[8,7],[50,7],[47,7],[48,7],[49,7],[51,7],[9,7],[52,7],[53,7],[54,7],[56,7],[55,7],[57,7],[58,7],[10,7],[59,7],[1,7],[110,54],[120,55],[109,54],[130,56],[101,57],[100,58],[129,59],[123,60],[128,61],[103,62],[117,63],[102,64],[126,65],[98,66],[97,59],[127,67],[99,68],[104,69],[105,7],[108,69],[95,7],[131,70],[121,71],[112,72],[113,73],[115,74],[111,75],[114,76],[124,59],[106,77],[107,78],[116,79],[96,80],[119,71],[118,69],[122,7],[125,81],[75,82],[65,83],[67,84],[74,85],[69,7],[70,7],[68,86],[71,87],[62,7],[63,7],[64,82],[66,88],[72,7],[73,89],[81,90],[82,91],[80,90],[77,92],[78,7],[84,93],[79,94],[83,90],[76,90]],"latestChangedDtsFile":"./index.d.ts","version":"5.9.3"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* File-transfer binary frame codec (architecture/websocket-protocol.md § Binary frames,
|
|
4
|
+
* features/file-explorer-transfer.md § Binary transfer frames). Separate from the terminal codec
|
|
5
|
+
* but lives in the same module family.
|
|
6
|
+
*
|
|
7
|
+
* Frame layout: `[1-byte opcode][1-byte stream][payload]`.
|
|
8
|
+
* - `stream` multiplexes concurrent transfers on one socket (0–255).
|
|
9
|
+
* - A transfer is `Begin` (metadata header) → N × `Chunk` (raw bytes) → `End` (completion marker),
|
|
10
|
+
* or `Error` to abort.
|
|
11
|
+
*
|
|
12
|
+
* NOTE: exact opcode values / chunk sizing / completion marker are TODO(verify) against the live
|
|
13
|
+
* codec; this is a faithful chunked-with-completion-marker reconstruction from the scope.
|
|
14
|
+
*/
|
|
15
|
+
export declare const FileTransferOpcode: {
|
|
16
|
+
readonly Begin: 16;
|
|
17
|
+
readonly Chunk: 17;
|
|
18
|
+
readonly End: 18;
|
|
19
|
+
readonly Error: 19;
|
|
20
|
+
};
|
|
21
|
+
export type FileTransferOpcodeName = keyof typeof FileTransferOpcode;
|
|
22
|
+
/** Metadata header for a transfer (carried by the `Begin` frame as UTF-8 JSON). */
|
|
23
|
+
export declare const fileTransferBeginSchema: z.ZodObject<{
|
|
24
|
+
transferId: z.ZodString;
|
|
25
|
+
fileName: z.ZodOptional<z.ZodString>;
|
|
26
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
27
|
+
totalBytes: z.ZodOptional<z.ZodNumber>;
|
|
28
|
+
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
transferId: string;
|
|
30
|
+
mimeType?: string | undefined;
|
|
31
|
+
fileName?: string | undefined;
|
|
32
|
+
totalBytes?: number | undefined;
|
|
33
|
+
}, {
|
|
34
|
+
transferId: string;
|
|
35
|
+
mimeType?: string | undefined;
|
|
36
|
+
fileName?: string | undefined;
|
|
37
|
+
totalBytes?: number | undefined;
|
|
38
|
+
}>;
|
|
39
|
+
export type FileTransferBegin = z.infer<typeof fileTransferBeginSchema>;
|
|
40
|
+
export type FileTransferFrame = {
|
|
41
|
+
opcode: "Begin";
|
|
42
|
+
stream: number;
|
|
43
|
+
meta: FileTransferBegin;
|
|
44
|
+
} | {
|
|
45
|
+
opcode: "Chunk";
|
|
46
|
+
stream: number;
|
|
47
|
+
data: Uint8Array;
|
|
48
|
+
} | {
|
|
49
|
+
opcode: "End";
|
|
50
|
+
stream: number;
|
|
51
|
+
ok: boolean;
|
|
52
|
+
} | {
|
|
53
|
+
opcode: "Error";
|
|
54
|
+
stream: number;
|
|
55
|
+
message: string;
|
|
56
|
+
};
|
|
57
|
+
export declare class FileTransferFrameError extends Error {
|
|
58
|
+
constructor(message: string);
|
|
59
|
+
}
|
|
60
|
+
export declare function encodeFileTransferFrame(f: FileTransferFrame): Uint8Array;
|
|
61
|
+
export declare function decodeFileTransferFrame(bytes: Uint8Array): FileTransferFrame;
|
|
62
|
+
export declare function tryDecodeFileTransferFrame(bytes: Uint8Array): FileTransferFrame | null;
|
|
63
|
+
//# sourceMappingURL=file-transfer-protocol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-transfer-protocol.d.ts","sourceRoot":"","sources":["../../src/binary-frames/file-transfer-protocol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;GAYG;AAEH,eAAO,MAAM,kBAAkB;;;;;CAKrB,CAAC;AAEX,MAAM,MAAM,sBAAsB,GAAG,MAAM,OAAO,kBAAkB,CAAC;AASrE,mFAAmF;AACnF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;EAKlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,MAAM,MAAM,iBAAiB,GACzB;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,iBAAiB,CAAA;CAAE,GAC5D;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,UAAU,CAAA;CAAE,GACrD;IAAE,MAAM,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,OAAO,CAAA;CAAE,GAC9C;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzD,qBAAa,sBAAuB,SAAQ,KAAK;gBACnC,OAAO,EAAE,MAAM;CAI5B;AAmBD,wBAAgB,uBAAuB,CAAC,CAAC,EAAE,iBAAiB,GAAG,UAAU,CAiBxE;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,UAAU,GAAG,iBAAiB,CAiC5E;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,UAAU,GAAG,iBAAiB,GAAG,IAAI,CAMtF"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* File-transfer binary frame codec (architecture/websocket-protocol.md § Binary frames,
|
|
4
|
+
* features/file-explorer-transfer.md § Binary transfer frames). Separate from the terminal codec
|
|
5
|
+
* but lives in the same module family.
|
|
6
|
+
*
|
|
7
|
+
* Frame layout: `[1-byte opcode][1-byte stream][payload]`.
|
|
8
|
+
* - `stream` multiplexes concurrent transfers on one socket (0–255).
|
|
9
|
+
* - A transfer is `Begin` (metadata header) → N × `Chunk` (raw bytes) → `End` (completion marker),
|
|
10
|
+
* or `Error` to abort.
|
|
11
|
+
*
|
|
12
|
+
* NOTE: exact opcode values / chunk sizing / completion marker are TODO(verify) against the live
|
|
13
|
+
* codec; this is a faithful chunked-with-completion-marker reconstruction from the scope.
|
|
14
|
+
*/
|
|
15
|
+
export const FileTransferOpcode = {
|
|
16
|
+
Begin: 0x10,
|
|
17
|
+
Chunk: 0x11,
|
|
18
|
+
End: 0x12,
|
|
19
|
+
Error: 0x13,
|
|
20
|
+
};
|
|
21
|
+
const OPCODE_BY_VALUE = Object.fromEntries(Object.entries(FileTransferOpcode).map(([name, value]) => [
|
|
22
|
+
value,
|
|
23
|
+
name,
|
|
24
|
+
]));
|
|
25
|
+
/** Metadata header for a transfer (carried by the `Begin` frame as UTF-8 JSON). */
|
|
26
|
+
export const fileTransferBeginSchema = z.object({
|
|
27
|
+
transferId: z.string(),
|
|
28
|
+
fileName: z.string().optional(),
|
|
29
|
+
mimeType: z.string().optional(),
|
|
30
|
+
totalBytes: z.number().int().nonnegative().optional(),
|
|
31
|
+
});
|
|
32
|
+
export class FileTransferFrameError extends Error {
|
|
33
|
+
constructor(message) {
|
|
34
|
+
super(message);
|
|
35
|
+
this.name = "FileTransferFrameError";
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
const textEncoder = new TextEncoder();
|
|
39
|
+
const textDecoder = new TextDecoder();
|
|
40
|
+
function assertStream(stream) {
|
|
41
|
+
if (!Number.isInteger(stream) || stream < 0 || stream > 0xff) {
|
|
42
|
+
throw new FileTransferFrameError(`stream must be an integer 0–255, got ${stream}`);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
function frame(opcodeValue, stream, payload) {
|
|
46
|
+
const out = new Uint8Array(2 + payload.length);
|
|
47
|
+
out[0] = opcodeValue;
|
|
48
|
+
out[1] = stream;
|
|
49
|
+
out.set(payload, 2);
|
|
50
|
+
return out;
|
|
51
|
+
}
|
|
52
|
+
export function encodeFileTransferFrame(f) {
|
|
53
|
+
assertStream(f.stream);
|
|
54
|
+
switch (f.opcode) {
|
|
55
|
+
case "Begin":
|
|
56
|
+
return frame(FileTransferOpcode.Begin, f.stream, textEncoder.encode(JSON.stringify(fileTransferBeginSchema.parse(f.meta))));
|
|
57
|
+
case "Chunk":
|
|
58
|
+
return frame(FileTransferOpcode.Chunk, f.stream, f.data);
|
|
59
|
+
case "End":
|
|
60
|
+
// Completion marker; payload encodes the ok/abort flag as a single byte.
|
|
61
|
+
return frame(FileTransferOpcode.End, f.stream, new Uint8Array([f.ok ? 1 : 0]));
|
|
62
|
+
case "Error":
|
|
63
|
+
return frame(FileTransferOpcode.Error, f.stream, textEncoder.encode(f.message));
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
export function decodeFileTransferFrame(bytes) {
|
|
67
|
+
if (bytes.length < 2) {
|
|
68
|
+
throw new FileTransferFrameError(`frame too short: ${bytes.length} bytes (need ≥ 2)`);
|
|
69
|
+
}
|
|
70
|
+
const opcodeValue = bytes[0];
|
|
71
|
+
const stream = bytes[1];
|
|
72
|
+
const opcode = OPCODE_BY_VALUE[opcodeValue];
|
|
73
|
+
if (!opcode) {
|
|
74
|
+
throw new FileTransferFrameError(`unknown file-transfer opcode 0x${opcodeValue.toString(16)}`);
|
|
75
|
+
}
|
|
76
|
+
const payload = bytes.subarray(2);
|
|
77
|
+
switch (opcode) {
|
|
78
|
+
case "Begin": {
|
|
79
|
+
let parsed;
|
|
80
|
+
try {
|
|
81
|
+
parsed = JSON.parse(textDecoder.decode(payload));
|
|
82
|
+
}
|
|
83
|
+
catch {
|
|
84
|
+
throw new FileTransferFrameError("begin payload is not valid JSON");
|
|
85
|
+
}
|
|
86
|
+
const result = fileTransferBeginSchema.safeParse(parsed);
|
|
87
|
+
if (!result.success) {
|
|
88
|
+
throw new FileTransferFrameError("begin payload is not a valid transfer header");
|
|
89
|
+
}
|
|
90
|
+
return { opcode: "Begin", stream, meta: result.data };
|
|
91
|
+
}
|
|
92
|
+
case "Chunk":
|
|
93
|
+
return { opcode: "Chunk", stream, data: payload.slice() };
|
|
94
|
+
case "End":
|
|
95
|
+
return { opcode: "End", stream, ok: (payload[0] ?? 1) !== 0 };
|
|
96
|
+
case "Error":
|
|
97
|
+
return { opcode: "Error", stream, message: textDecoder.decode(payload) };
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
export function tryDecodeFileTransferFrame(bytes) {
|
|
101
|
+
try {
|
|
102
|
+
return decodeFileTransferFrame(bytes);
|
|
103
|
+
}
|
|
104
|
+
catch {
|
|
105
|
+
return null;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=file-transfer-protocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-transfer-protocol.js","sourceRoot":"","sources":["../../src/binary-frames/file-transfer-protocol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;GAYG;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,IAAI;IACX,GAAG,EAAE,IAAI;IACT,KAAK,EAAE,IAAI;CACH,CAAC;AAIX,MAAM,eAAe,GAA2C,MAAM,CAAC,WAAW,CAChF,MAAM,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC;IACxD,KAAK;IACL,IAA8B;CAC/B,CAAC,CACH,CAAC;AAEF,mFAAmF;AACnF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE;CACtD,CAAC,CAAC;AASH,MAAM,OAAO,sBAAuB,SAAQ,KAAK;IAC/C,YAAY,OAAe;QACzB,KAAK,CAAC,OA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,GAAG,uBAAuB,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;YACzD,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;gBACpB,MAAM,IAAI,sBAAsB,CAAC,8CAA8C,CAAC,CAAC;YACnF,CAAC;YACD,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;QACxD,CAAC;QACD,KAAK,OAAO;YACV,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;QAC5D,KAAK,KAAK;YACR,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC;QAChE,KAAK,OAAO;YACV,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7E,CAAC;AACH,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,KAAiB;IAC1D,IAAI,CAAC;QACH,OAAO,uBAAuB,CAAC,KAAK,CAAC,CAAC;IACxC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/binary-frames/index.ts"],"names":[],"mappings":"AACA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/binary-frames/index.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Terminal stream binary frame codec (architecture/websocket-protocol.md § Binary frames,
|
|
4
|
+
* features/terminals.md § Binary stream protocol).
|
|
5
|
+
*
|
|
6
|
+
* Frame layout: `[1-byte opcode][1-byte slot][payload]`.
|
|
7
|
+
* - `slot` demuxes multiple terminals on one socket (0–255).
|
|
8
|
+
* - Output/Input/Snapshot/Restore payloads are raw bytes (pass-through).
|
|
9
|
+
* - Resize payload is UTF-8 JSON `{ rows, cols }`.
|
|
10
|
+
*
|
|
11
|
+
* Uses `Uint8Array` (not Node `Buffer`) so the codec runs in browser/RN as well as Node.
|
|
12
|
+
*/
|
|
13
|
+
/** Terminal frame opcodes. `Restore` value is TODO(verify) against the live codec. */
|
|
14
|
+
export declare const TerminalOpcode: {
|
|
15
|
+
readonly Output: 1;
|
|
16
|
+
readonly Input: 2;
|
|
17
|
+
readonly Resize: 3;
|
|
18
|
+
readonly Snapshot: 4;
|
|
19
|
+
readonly Restore: 5;
|
|
20
|
+
};
|
|
21
|
+
export type TerminalOpcodeName = keyof typeof TerminalOpcode;
|
|
22
|
+
export type TerminalOpcodeValue = (typeof TerminalOpcode)[TerminalOpcodeName];
|
|
23
|
+
/** Resize payload schema (`{ rows, cols }`, non-negative integers). */
|
|
24
|
+
export declare const terminalResizeSchema: z.ZodObject<{
|
|
25
|
+
rows: z.ZodNumber;
|
|
26
|
+
cols: z.ZodNumber;
|
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
rows: number;
|
|
29
|
+
cols: number;
|
|
30
|
+
}, {
|
|
31
|
+
rows: number;
|
|
32
|
+
cols: number;
|
|
33
|
+
}>;
|
|
34
|
+
export type TerminalResize = z.infer<typeof terminalResizeSchema>;
|
|
35
|
+
export type TerminalFrame = {
|
|
36
|
+
opcode: "Output";
|
|
37
|
+
slot: number;
|
|
38
|
+
data: Uint8Array;
|
|
39
|
+
} | {
|
|
40
|
+
opcode: "Input";
|
|
41
|
+
slot: number;
|
|
42
|
+
data: Uint8Array;
|
|
43
|
+
} | {
|
|
44
|
+
opcode: "Resize";
|
|
45
|
+
slot: number;
|
|
46
|
+
rows: number;
|
|
47
|
+
cols: number;
|
|
48
|
+
} | {
|
|
49
|
+
opcode: "Snapshot";
|
|
50
|
+
slot: number;
|
|
51
|
+
data: Uint8Array;
|
|
52
|
+
} | {
|
|
53
|
+
opcode: "Restore";
|
|
54
|
+
slot: number;
|
|
55
|
+
data: Uint8Array;
|
|
56
|
+
};
|
|
57
|
+
/** Thrown when a frame cannot be decoded (too short, unknown opcode, bad payload). */
|
|
58
|
+
export declare class TerminalFrameError extends Error {
|
|
59
|
+
constructor(message: string);
|
|
60
|
+
}
|
|
61
|
+
/** Encode a typed terminal frame to bytes. */
|
|
62
|
+
export declare function encodeTerminalFrame(frame: TerminalFrame): Uint8Array;
|
|
63
|
+
/** Decode bytes into a typed terminal frame. Throws `TerminalFrameError` on invalid input. */
|
|
64
|
+
export declare function decodeTerminalFrame(bytes: Uint8Array): TerminalFrame;
|
|
65
|
+
/** Returns the decoded frame, or `null` instead of throwing (safe handling of unknown opcodes). */
|
|
66
|
+
export declare function tryDecodeTerminalFrame(bytes: Uint8Array): TerminalFrame | null;
|
|
67
|
+
//# sourceMappingURL=terminal-stream-protocol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminal-stream-protocol.d.ts","sourceRoot":"","sources":["../../src/binary-frames/terminal-stream-protocol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;GAUG;AAEH,sFAAsF;AACtF,eAAO,MAAM,cAAc;;;;;;CAMjB,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG,MAAM,OAAO,cAAc,CAAC;AAC7D,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,kBAAkB,CAAC,CAAC;AAM9E,uEAAuE;AACvE,eAAO,MAAM,oBAAoB;;;;;;;;;EAG/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,MAAM,MAAM,aAAa,GACrB;IAAE,MAAM,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,UAAU,CAAA;CAAE,GACpD;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,UAAU,CAAA;CAAE,GACnD;IAAE,MAAM,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC9D;IAAE,MAAM,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,UAAU,CAAA;CAAE,GACtD;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,UAAU,CAAA;CAAE,CAAC;AAE1D,sFAAsF;AACtF,qBAAa,kBAAmB,SAAQ,KAAK;gBAC/B,OAAO,EAAE,MAAM;CAI5B;AAmBD,8CAA8C;AAC9C,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,aAAa,GAAG,UAAU,CAkBpE;AAED,8FAA8F;AAC9F,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,UAAU,GAAG,aAAa,CA4BpE;AAED,mGAAmG;AACnG,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,UAAU,GAAG,aAAa,GAAG,IAAI,CAM9E"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Terminal stream binary frame codec (architecture/websocket-protocol.md § Binary frames,
|
|
4
|
+
* features/terminals.md § Binary stream protocol).
|
|
5
|
+
*
|
|
6
|
+
* Frame layout: `[1-byte opcode][1-byte slot][payload]`.
|
|
7
|
+
* - `slot` demuxes multiple terminals on one socket (0–255).
|
|
8
|
+
* - Output/Input/Snapshot/Restore payloads are raw bytes (pass-through).
|
|
9
|
+
* - Resize payload is UTF-8 JSON `{ rows, cols }`.
|
|
10
|
+
*
|
|
11
|
+
* Uses `Uint8Array` (not Node `Buffer`) so the codec runs in browser/RN as well as Node.
|
|
12
|
+
*/
|
|
13
|
+
/** Terminal frame opcodes. `Restore` value is TODO(verify) against the live codec. */
|
|
14
|
+
export const TerminalOpcode = {
|
|
15
|
+
Output: 0x01,
|
|
16
|
+
Input: 0x02,
|
|
17
|
+
Resize: 0x03,
|
|
18
|
+
Snapshot: 0x04,
|
|
19
|
+
Restore: 0x05,
|
|
20
|
+
};
|
|
21
|
+
const OPCODE_BY_VALUE = Object.fromEntries(Object.entries(TerminalOpcode).map(([name, value]) => [value, name]));
|
|
22
|
+
/** Resize payload schema (`{ rows, cols }`, non-negative integers). */
|
|
23
|
+
export const terminalResizeSchema = z.object({
|
|
24
|
+
rows: z.number().int().nonnegative(),
|
|
25
|
+
cols: z.number().int().nonnegative(),
|
|
26
|
+
});
|
|
27
|
+
/** Thrown when a frame cannot be decoded (too short, unknown opcode, bad payload). */
|
|
28
|
+
export class TerminalFrameError extends Error {
|
|
29
|
+
constructor(message) {
|
|
30
|
+
super(message);
|
|
31
|
+
this.name = "TerminalFrameError";
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
const textEncoder = new TextEncoder();
|
|
35
|
+
const textDecoder = new TextDecoder();
|
|
36
|
+
function assertSlot(slot) {
|
|
37
|
+
if (!Number.isInteger(slot) || slot < 0 || slot > 0xff) {
|
|
38
|
+
throw new TerminalFrameError(`slot must be an integer 0–255, got ${slot}`);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function frameWithPayload(opcodeValue, slot, payload) {
|
|
42
|
+
const out = new Uint8Array(2 + payload.length);
|
|
43
|
+
out[0] = opcodeValue;
|
|
44
|
+
out[1] = slot;
|
|
45
|
+
out.set(payload, 2);
|
|
46
|
+
return out;
|
|
47
|
+
}
|
|
48
|
+
/** Encode a typed terminal frame to bytes. */
|
|
49
|
+
export function encodeTerminalFrame(frame) {
|
|
50
|
+
assertSlot(frame.slot);
|
|
51
|
+
switch (frame.opcode) {
|
|
52
|
+
case "Output":
|
|
53
|
+
return frameWithPayload(TerminalOpcode.Output, frame.slot, frame.data);
|
|
54
|
+
case "Input":
|
|
55
|
+
return frameWithPayload(TerminalOpcode.Input, frame.slot, frame.data);
|
|
56
|
+
case "Snapshot":
|
|
57
|
+
return frameWithPayload(TerminalOpcode.Snapshot, frame.slot, frame.data);
|
|
58
|
+
case "Restore":
|
|
59
|
+
return frameWithPayload(TerminalOpcode.Restore, frame.slot, frame.data);
|
|
60
|
+
case "Resize": {
|
|
61
|
+
const json = JSON.stringify(terminalResizeSchema.parse({ rows: frame.rows, cols: frame.cols }));
|
|
62
|
+
return frameWithPayload(TerminalOpcode.Resize, frame.slot, textEncoder.encode(json));
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
/** Decode bytes into a typed terminal frame. Throws `TerminalFrameError` on invalid input. */
|
|
67
|
+
export function decodeTerminalFrame(bytes) {
|
|
68
|
+
if (bytes.length < 2) {
|
|
69
|
+
throw new TerminalFrameError(`frame too short: ${bytes.length} bytes (need ≥ 2)`);
|
|
70
|
+
}
|
|
71
|
+
const opcodeValue = bytes[0];
|
|
72
|
+
const slot = bytes[1];
|
|
73
|
+
const opcode = OPCODE_BY_VALUE[opcodeValue];
|
|
74
|
+
if (!opcode) {
|
|
75
|
+
throw new TerminalFrameError(`unknown terminal opcode 0x${opcodeValue.toString(16)}`);
|
|
76
|
+
}
|
|
77
|
+
const payload = bytes.subarray(2);
|
|
78
|
+
if (opcode === "Resize") {
|
|
79
|
+
let parsed;
|
|
80
|
+
try {
|
|
81
|
+
parsed = JSON.parse(textDecoder.decode(payload));
|
|
82
|
+
}
|
|
83
|
+
catch {
|
|
84
|
+
throw new TerminalFrameError("resize payload is not valid JSON");
|
|
85
|
+
}
|
|
86
|
+
const result = terminalResizeSchema.safeParse(parsed);
|
|
87
|
+
if (!result.success) {
|
|
88
|
+
throw new TerminalFrameError("resize payload is not { rows, cols }");
|
|
89
|
+
}
|
|
90
|
+
return { opcode: "Resize", slot, rows: result.data.rows, cols: result.data.cols };
|
|
91
|
+
}
|
|
92
|
+
// Output/Input/Snapshot/Restore: raw bytes pass through (copied so callers own the buffer).
|
|
93
|
+
return { opcode, slot, data: payload.slice() };
|
|
94
|
+
}
|
|
95
|
+
/** Returns the decoded frame, or `null` instead of throwing (safe handling of unknown opcodes). */
|
|
96
|
+
export function tryDecodeTerminalFrame(bytes) {
|
|
97
|
+
try {
|
|
98
|
+
return decodeTerminalFrame(bytes);
|
|
99
|
+
}
|
|
100
|
+
catch {
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=terminal-stream-protocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminal-stream-protocol.js","sourceRoot":"","sources":["../../src/binary-frames/terminal-stream-protocol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;GAUG;AAEH,sFAAsF;AACtF,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,MAAM,EAAE,IAAI;IACZ,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;IACZ,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,IAAI;CACL,CAAC;AAKX,MAAM,eAAe,GAAuC,MAAM,CAAC,WAAW,CAC5E,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,EAAE,IAA0B,CAAC,CAAC,CAC3F,CAAC;AAEF,uE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OPE §9,
|
|
4
|
+
* architecture/websocket-protocol.md § Capability flags / Compatibility rules).
|
|
5
|
+
*
|
|
6
|
+
* Two directions:
|
|
7
|
+
* - `CLIENT_CAPS` (client → daemon, advertised in `hello.capabilities`): the daemon stores these
|
|
8
|
+
* per connection so the wire boundary can ask one question, `supports(caps, flag)`. New wire
|
|
9
|
+
* enum values are gated through this so an old client never receives a value it didn't advertise.
|
|
10
|
+
* - `SERVER_FEATURES` (daemon → client, in `server_info.features.*`): new *features* advertise a
|
|
11
|
+
* flag; clients either run the feature or show "update the host." No degraded fallback path.
|
|
12
|
+
*/
|
|
13
|
+
export declare const CLIENT_CAPS: {
|
|
14
|
+
/** Client renders custom per-mode icons. */
|
|
15
|
+
readonly custom_mode_icons: "custom_mode_icons";
|
|
16
|
+
/** Client understands the merged reasoning stream enum value. */
|
|
17
|
+
readonly reasoning_merge_enum: "reasoning_merge_enum";
|
|
18
|
+
/** Client can consume a reflowable terminal snapshot payload. */
|
|
19
|
+
readonly terminal_reflowable_snapshot: "terminal_reflowable_snapshot";
|
|
20
|
+
};
|
|
21
|
+
export type ClientCapabilityKey = keyof typeof CLIENT_CAPS;
|
|
22
|
+
export type ClientCapability = (typeof CLIENT_CAPS)[ClientCapabilityKey];
|
|
23
|
+
export declare const SERVER_FEATURES: {
|
|
24
|
+
readonly providersSnapshot: "providersSnapshot";
|
|
25
|
+
readonly checkoutGithubSetAutoMerge: "checkoutGithubSetAutoMerge";
|
|
26
|
+
readonly daemonStatusRpc: "daemonStatusRpc";
|
|
27
|
+
readonly "terminal-restore-modes": "terminal-restore-modes";
|
|
28
|
+
readonly rewind: "rewind";
|
|
29
|
+
readonly checkoutRefresh: "checkoutRefresh";
|
|
30
|
+
};
|
|
31
|
+
export type ServerFeatureKey = keyof typeof SERVER_FEATURES;
|
|
32
|
+
export type ServerFeature = (typeof SERVER_FEATURES)[ServerFeatureKey];
|
|
33
|
+
/**
|
|
34
|
+
* COMPAT annotations for each server feature flag (version added + removal date). The removal dates
|
|
35
|
+
* are placeholders to be confirmed against the live `ServerInfoStatusPayloadSchema`. Grep `COMPAT(`
|
|
36
|
+
* to enumerate cleanup work.
|
|
37
|
+
*/
|
|
38
|
+
export declare const SERVER_FEATURE_COMPAT: Record<ServerFeatureKey, CompatTag>;
|
|
39
|
+
/** The forms a stored capability set can take on the daemon session. */
|
|
40
|
+
export type CapabilitySet = Record<string, boolean> | readonly string[] | Set<string> | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Returns true only if `flag` is advertised by `caps`. Used at serialization time to gate new wire
|
|
43
|
+
* enum values: `if (session.supports(CLIENT_CAPS.reasoning_merge_enum)) emit(newValue) else emit(old)`.
|
|
44
|
+
*/
|
|
45
|
+
export declare function supports(caps: CapabilitySet, flag: string): boolean;
|
|
46
|
+
//# sourceMappingURL=client-capabilities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-capabilities.d.ts","sourceRoot":"","sources":["../src/client-capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;;;;;;GAUG;AAMH,eAAO,MAAM,WAAW;IACtB,4CAA4C;;IAE5C,iEAAiE;;IAEjE,iEAAiE;;CAEzD,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,WAAW,CAAC;AAC3D,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,mBAAmB,CAAC,CAAC;AAMzE,eAAO,MAAM,eAAe;;;;;;;CAOlB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,MAAM,OAAO,eAAe,CAAC;AAC5D,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,gBAAgB,CAAC,CAAC;AAEvE;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,gBAAgB,EAAE,SAAS,CAqBrE,CAAC;AAMF,wEAAwE;AACxE,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,MAAM,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;AAElG;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAKnE"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { COMPAT } from "./validation.js";
|
|
2
|
+
/**
|
|
3
|
+
* Capability flags — the per-feature compatibility layer (MAIN-SCOPE §9,
|
|
4
|
+
* architecture/websocket-protocol.md § Capability flags / Compatibility rules).
|
|
5
|
+
*
|
|
6
|
+
* Two directions:
|
|
7
|
+
* - `CLIENT_CAPS` (client → daemon, advertised in `hello.capabilities`): the daemon stores these
|
|
8
|
+
* per connection so the wire boundary can ask one question, `supports(caps, flag)`. New wire
|
|
9
|
+
* enum values are gated through this so an old client never receives a value it didn't advertise.
|
|
10
|
+
* - `SERVER_FEATURES` (daemon → client, in `server_info.features.*`): new *features* advertise a
|
|
11
|
+
* flag; clients either run the feature or show "update the host." No degraded fallback path.
|
|
12
|
+
*/
|
|
13
|
+
// ---------------------------------------------------------------------------
|
|
14
|
+
// CLIENT_CAPS (client → daemon, hello.capabilities)
|
|
15
|
+
// ---------------------------------------------------------------------------
|
|
16
|
+
export const CLIENT_CAPS = {
|
|
17
|
+
/** Client renders custom per-mode icons. */
|
|
18
|
+
custom_mode_icons: "custom_mode_icons",
|
|
19
|
+
/** Client understands the merged reasoning stream enum value. */
|
|
20
|
+
reasoning_merge_enum: "reasoning_merge_enum",
|
|
21
|
+
/** Client can consume a reflowable terminal snapshot payload. */
|
|
22
|
+
terminal_reflowable_snapshot: "terminal_reflowable_snapshot",
|
|
23
|
+
};
|
|
24
|
+
// ---------------------------------------------------------------------------
|
|
25
|
+
// SERVER_FEATURES (daemon → client, server_info.features.*)
|
|
26
|
+
// ---------------------------------------------------------------------------
|
|
27
|
+
export const SERVER_FEATURES = {
|
|
28
|
+
providersSnapshot: "providersSnapshot",
|
|
29
|
+
checkoutGithubSetAutoMerge: "checkoutGithubSetAutoMerge",
|
|
30
|
+
daemonStatusRpc: "daemonStatusRpc",
|
|
31
|
+
"terminal-restore-modes": "terminal-restore-modes",
|
|
32
|
+
rewind: "rewind",
|
|
33
|
+
checkoutRefresh: "checkoutRefresh",
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* COMPAT annotations for each server feature flag (version added + removal date). The removal dates
|
|
37
|
+
* are placeholders to be confirmed against the live `ServerInfoStatusPayloadSchema`. Grep `COMPAT(`
|
|
38
|
+
* to enumerate cleanup work.
|
|
39
|
+
*/
|
|
40
|
+
export const SERVER_FEATURE_COMPAT = {
|
|
41
|
+
// COMPAT(providersSnapshot): added 0.0.0, remove by TBD
|
|
42
|
+
providersSnapshot: COMPAT({ name: "providersSnapshot", addedIn: "0.0.0", removeBy: "TBD" }),
|
|
43
|
+
// COMPAT(checkoutGithubSetAutoMerge): added 0.0.0, remove by TBD
|
|
44
|
+
checkoutGithubSetAutoMerge: COMPAT({
|
|
45
|
+
name: "checkoutGithubSetAutoMerge",
|
|
46
|
+
addedIn: "0.0.0",
|
|
47
|
+
removeBy: "TBD",
|
|
48
|
+
}),
|
|
49
|
+
// COMPAT(daemonStatusRpc): added 0.0.0, remove by TBD
|
|
50
|
+
daemonStatusRpc: COMPAT({ name: "daemonStatusRpc", addedIn: "0.0.0", removeBy: "TBD" }),
|
|
51
|
+
// COMPAT(terminal-restore-modes): added 0.0.0, remove by TBD
|
|
52
|
+
"terminal-restore-modes": COMPAT({
|
|
53
|
+
name: "terminal-restore-modes",
|
|
54
|
+
addedIn: "0.0.0",
|
|
55
|
+
removeBy: "TBD",
|
|
56
|
+
}),
|
|
57
|
+
// COMPAT(rewind): added 0.0.0, remove by TBD
|
|
58
|
+
rewind: COMPAT({ name: "rewind", addedIn: "0.0.0", removeBy: "TBD" }),
|
|
59
|
+
// COMPAT(checkoutRefresh): added 0.0.0, remove by TBD
|
|
60
|
+
checkoutRefresh: COMPAT({ name: "checkoutRefresh", addedIn: "0.0.0", removeBy: "TBD" }),
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Returns true only if `flag` is advertised by `caps`. Used at serialization time to gate new wire
|
|
64
|
+
* enum values: `if (session.supports(CLIENT_CAPS.reasoning_merge_enum)) emit(newValue) else emit(old)`.
|
|
65
|
+
*/
|
|
66
|
+
export function supports(caps, flag) {
|
|
67
|
+
if (!caps)
|
|
68
|
+
return false;
|
|
69
|
+
if (caps instanceof Set)
|
|
70
|
+
return caps.has(flag);
|
|
71
|
+
if (Array.isArray(caps))
|
|
72
|
+
return caps.includes(flag);
|
|
73
|
+
return caps[flag] === true;
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=client-capabilities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-capabilities.js","sourceRoot":"","sources":["../src/client-capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAkB,MAAM,iBAAiB,CAAC;AAEzD;;;;;;;;;;GAUG;AAEH,8EAA8E;AAC9E,oDAAoD;AACpD,8EAA8E;AAE9E,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,4CAA4C;IAC5C,iBAAiB,EAAE,mBAAmB;IACtC,iEAAiE;IACjE,oBAAoB,EAAE,sBAAsB;IAC5C,iEAAiE;IACjE,4BAA4B,EAAE,8BAA8B;CACpD,CAAC;AAKX,8EAA8E;AAC9E,4DAA4D;AAC5D,8EAA8E;AAE9E,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,iBAAiB,EAAE,mBAAmB;IACtC,0BAA0B,EAAE,4BAA4B;IACxD,eAAe,EAAE,iBAAiB;IAClC,wBAAwB,EAAE,wBAAwB;IAClD,MAAM,EAAE,QAAQ;IAChB,eAAe,EAAE,iBAAiB;CAC1B,CAAC;AAKX;;;;GAIG;AACH,MAAM,CAAC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