@forgeax/engine-intelligence 0.1.3 → 0.1.6
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 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/index.mjs +3 -16
- package/dist/index.mjs.map +1 -1
- package/dist/runtime.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/__tests__/runtime.test.ts +0 -348
- package/src/errors.ts +9 -2
- package/src/runtime.ts +3 -17
- package/dist/__tests__/intelligence-error-code-owner.test-d.d.ts +0 -33
- package/dist/__tests__/intelligence-error-code-owner.test-d.d.ts.map +0 -1
- package/src/__tests__/intelligence-error-code-owner.test-d.ts +0 -143
package/dist/.tsbuildinfo
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"fileNames":["../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../types/dist/animation-target.d.ts","../../types/dist/asset-errors.d.ts","../../types/dist/result.d.ts","../../types/dist/asset-evidence.d.ts","../../types/dist/asset.d.ts","../../types/dist/asset-runtime.d.ts","../../types/dist/material/color-space.d.ts","../../types/dist/material/asset.d.ts","../../types/dist/vfx.d.ts","../../types/dist/handle.d.ts","../../types/dist/material/errors.d.ts","../../types/dist/material/resolve.d.ts","../../types/dist/material/index.d.ts","../../types/dist/asset-producer.d.ts","../../types/dist/catalog.d.ts","../../types/dist/runtime-scope.d.ts","../../types/dist/derive-paramschema.d.ts","../../types/dist/import.d.ts","../../types/dist/index.d.ts","../src/types.ts","../src/errors.ts","../../../node_modules/.pnpm/@deepseek-ai+cosmokit@1.8.2/node_modules/@deepseek-ai/cosmokit/lib/types/array.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cosmokit@1.8.2/node_modules/@deepseek-ai/cosmokit/lib/types/types.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cosmokit@1.8.2/node_modules/@deepseek-ai/cosmokit/lib/types/misc.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cosmokit@1.8.2/node_modules/@deepseek-ai/cosmokit/lib/types/string.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cosmokit@1.8.2/node_modules/@deepseek-ai/cosmokit/lib/types/time.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cosmokit@1.8.2/node_modules/@deepseek-ai/cosmokit/lib/types/index.d.ts","../../../node_modules/.pnpm/@standard-schema+spec@1.1.0/node_modules/@standard-schema/spec/dist/index.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cordis@4.0.1_@deepseek-ai+cordis-plugin-loader@1.0.2/node_modules/@deepseek-ai/cordis/lib/types/utils.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cordis@4.0.1_@deepseek-ai+cordis-plugin-loader@1.0.2/node_modules/@deepseek-ai/cordis/lib/types/registry.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cordis@4.0.1_@deepseek-ai+cordis-plugin-loader@1.0.2/node_modules/@deepseek-ai/cordis/lib/types/reflect.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cordis@4.0.1_@deepseek-ai+cordis-plugin-loader@1.0.2/node_modules/@deepseek-ai/cordis/lib/types/fiber.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cordis@4.0.1_@deepseek-ai+cordis-plugin-loader@1.0.2/node_modules/@deepseek-ai/cordis/lib/types/events.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cordis@4.0.1_@deepseek-ai+cordis-plugin-loader@1.0.2/node_modules/@deepseek-ai/cordis/lib/types/logger.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cordis@4.0.1_@deepseek-ai+cordis-plugin-loader@1.0.2/node_modules/@deepseek-ai/cordis/lib/types/context.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cordis@4.0.1_@deepseek-ai+cordis-plugin-loader@1.0.2/node_modules/@deepseek-ai/cordis/lib/types/service.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cordis@4.0.1_@deepseek-ai+cordis-plugin-loader@1.0.2/node_modules/@deepseek-ai/cordis/lib/types/index.d.ts","../../tool-runtime/dist/types.d.ts","../../tool-runtime/dist/errors.d.ts","../../tool-runtime/dist/artifacts.d.ts","../../tool-runtime/dist/capability.d.ts","../../tool-runtime/dist/carrier.d.ts","../../tool-runtime/dist/lease.d.ts","../../tool-runtime/dist/migration.d.ts","../../tool-runtime/dist/runtime.d.ts","../../tool-runtime/dist/snapshot.d.ts","../../tool-runtime/dist/timing.d.ts","../../tool-runtime/dist/transport.d.ts","../../tool-runtime/dist/index.d.ts","../../plugin/dist/capability.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cordis-plugin-loader@1.0.2_patch_hash=6e77a3b82171afbdac249c0e31290cc06386_1a14a168fdebad14b739afc92f305e1c/node_modules/@deepseek-ai/cordis-plugin-loader/lib/types/internal.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cordis-plugin-loader@1.0.2_patch_hash=6e77a3b82171afbdac249c0e31290cc06386_1a14a168fdebad14b739afc92f305e1c/node_modules/@deepseek-ai/cordis-plugin-loader/lib/types/config/tree.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cordis-plugin-loader@1.0.2_patch_hash=6e77a3b82171afbdac249c0e31290cc06386_1a14a168fdebad14b739afc92f305e1c/node_modules/@deepseek-ai/cordis-plugin-loader/lib/types/config/group.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cordis-plugin-loader@1.0.2_patch_hash=6e77a3b82171afbdac249c0e31290cc06386_1a14a168fdebad14b739afc92f305e1c/node_modules/@deepseek-ai/cordis-plugin-loader/lib/types/config/entry.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cordis-plugin-loader@1.0.2_patch_hash=6e77a3b82171afbdac249c0e31290cc06386_1a14a168fdebad14b739afc92f305e1c/node_modules/@deepseek-ai/cordis-plugin-loader/lib/types/config/isolate.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cordis-plugin-loader@1.0.2_patch_hash=6e77a3b82171afbdac249c0e31290cc06386_1a14a168fdebad14b739afc92f305e1c/node_modules/@deepseek-ai/cordis-plugin-loader/lib/types/config/utils.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cordis-plugin-loader@1.0.2_patch_hash=6e77a3b82171afbdac249c0e31290cc06386_1a14a168fdebad14b739afc92f305e1c/node_modules/@deepseek-ai/cordis-plugin-loader/lib/types/index.d.ts","../../plugin/dist/tool-plugin.d.ts","../../plugin/dist/loader.d.ts","../../plugin/dist/index.d.ts","../src/plugin.ts","../src/runtime.ts","../src/transport.ts","../src/index.ts","../src/__tests__/intelligence-error-code-owner.test-d.ts","../../../node_modules/.pnpm/@vitest+pretty-format@4.1.5/node_modules/@vitest/pretty-format/dist/index.d.ts","../../../node_modules/.pnpm/@vitest+utils@4.1.5/node_modules/@vitest/utils/dist/display.d.ts","../../../node_modules/.pnpm/@vitest+utils@4.1.5/node_modules/@vitest/utils/dist/types.d.ts","../../../node_modules/.pnpm/@vitest+utils@4.1.5/node_modules/@vitest/utils/dist/helpers.d.ts","../../../node_modules/.pnpm/@vitest+utils@4.1.5/node_modules/@vitest/utils/dist/timers.d.ts","../../../node_modules/.pnpm/@vitest+utils@4.1.5/node_modules/@vitest/utils/dist/index.d.ts","../../../node_modules/.pnpm/@vitest+utils@4.1.5/node_modules/@vitest/utils/dist/types.d-BCElaP-c.d.ts","../../../node_modules/.pnpm/@vitest+utils@4.1.5/node_modules/@vitest/utils/dist/diff.d.ts","../../../node_modules/.pnpm/@vitest+runner@4.1.5/node_modules/@vitest/runner/dist/tasks.d-Bh0IjN67.d.ts","../../../node_modules/.pnpm/@vitest+runner@4.1.5/node_modules/@vitest/runner/dist/index.d.ts","../../../node_modules/.pnpm/vitest@4.1.5_@types+node@20.19.40_@vitest+browser-playwright@4.1.5_@vitest+coverage-v8@_93fb3f30d132ee2e785bbc9f718b2231/node_modules/vitest/dist/chunks/traces.d.D2T_R8rx.d.ts","../../../node_modules/.pnpm/vite@8.0.10_@types+node@20.19.40_esbuild@0.27.7_jiti@1.21.7/node_modules/vite/types/hmrPayload.d.ts","../../../node_modules/.pnpm/vite@8.0.10_@types+node@20.19.40_esbuild@0.27.7_jiti@1.21.7/node_modules/vite/dist/node/chunks/moduleRunnerTransport.d.ts","../../../node_modules/.pnpm/vite@8.0.10_@types+node@20.19.40_esbuild@0.27.7_jiti@1.21.7/node_modules/vite/types/customEvent.d.ts","../../../node_modules/.pnpm/vite@8.0.10_@types+node@20.19.40_esbuild@0.27.7_jiti@1.21.7/node_modules/vite/types/hot.d.ts","../../../node_modules/.pnpm/vite@8.0.10_@types+node@20.19.40_esbuild@0.27.7_jiti@1.21.7/node_modules/vite/dist/node/module-runner.d.ts","../../../node_modules/.pnpm/@vitest+snapshot@4.1.5/node_modules/@vitest/snapshot/dist/environment.d-DOJxxZV9.d.ts","../../../node_modules/.pnpm/@vitest+snapshot@4.1.5/node_modules/@vitest/snapshot/dist/rawSnapshot.d-D_X3-62x.d.ts","../../../node_modules/.pnpm/@vitest+snapshot@4.1.5/node_modules/@vitest/snapshot/dist/index.d.ts","../../../node_modules/.pnpm/vitest@4.1.5_@types+node@20.19.40_@vitest+browser-playwright@4.1.5_@vitest+coverage-v8@_93fb3f30d132ee2e785bbc9f718b2231/node_modules/vitest/dist/chunks/config.d.A1h_Y6Jt.d.ts","../../../node_modules/.pnpm/vitest@4.1.5_@types+node@20.19.40_@vitest+browser-playwright@4.1.5_@vitest+coverage-v8@_93fb3f30d132ee2e785bbc9f718b2231/node_modules/vitest/dist/chunks/environment.d.CrsxCzP1.d.ts","../../../node_modules/.pnpm/vitest@4.1.5_@types+node@20.19.40_@vitest+browser-playwright@4.1.5_@vitest+coverage-v8@_93fb3f30d132ee2e785bbc9f718b2231/node_modules/vitest/dist/chunks/rpc.d.B_8sPU0w.d.ts","../../../node_modules/.pnpm/vitest@4.1.5_@types+node@20.19.40_@vitest+browser-playwright@4.1.5_@vitest+coverage-v8@_93fb3f30d132ee2e785bbc9f718b2231/node_modules/vitest/dist/chunks/worker.d.ZpHpO4yb.d.ts","../../../node_modules/.pnpm/vitest@4.1.5_@types+node@20.19.40_@vitest+browser-playwright@4.1.5_@vitest+coverage-v8@_93fb3f30d132ee2e785bbc9f718b2231/node_modules/vitest/dist/chunks/browser.d.BcoexmFG.d.ts","../../../node_modules/.pnpm/@vitest+spy@4.1.5/node_modules/@vitest/spy/optional-types.d.ts","../../../node_modules/.pnpm/@vitest+spy@4.1.5/node_modules/@vitest/spy/dist/index.d.ts","../../../node_modules/.pnpm/tinyrainbow@3.1.0/node_modules/tinyrainbow/dist/index.d.ts","../../../node_modules/.pnpm/@types+deep-eql@4.0.2/node_modules/@types/deep-eql/index.d.ts","../../../node_modules/.pnpm/assertion-error@2.0.1/node_modules/assertion-error/index.d.ts","../../../node_modules/.pnpm/@types+chai@5.2.3/node_modules/@types/chai/index.d.ts","../../../node_modules/.pnpm/@vitest+expect@4.1.5/node_modules/@vitest/expect/dist/index.d.ts","../../../node_modules/.pnpm/@vitest+runner@4.1.5/node_modules/@vitest/runner/dist/utils.d.ts","../../../node_modules/.pnpm/tinybench@2.9.0/node_modules/tinybench/dist/index.d.ts","../../../node_modules/.pnpm/vitest@4.1.5_@types+node@20.19.40_@vitest+browser-playwright@4.1.5_@vitest+coverage-v8@_93fb3f30d132ee2e785bbc9f718b2231/node_modules/vitest/dist/chunks/benchmark.d.DAaHLpsq.d.ts","../../../node_modules/.pnpm/vitest@4.1.5_@types+node@20.19.40_@vitest+browser-playwright@4.1.5_@vitest+coverage-v8@_93fb3f30d132ee2e785bbc9f718b2231/node_modules/vitest/dist/chunks/global.d.DVsSRdQ5.d.ts","../../../node_modules/.pnpm/vitest@4.1.5_@types+node@20.19.40_@vitest+browser-playwright@4.1.5_@vitest+coverage-v8@_93fb3f30d132ee2e785bbc9f718b2231/node_modules/vitest/optional-runtime-types.d.ts","../../../node_modules/.pnpm/@vitest+mocker@4.1.5_vite@8.0.10_@types+node@20.19.40_esbuild@0.27.7_jiti@1.21.7_/node_modules/@vitest/mocker/dist/types.d-BjI5eAwu.d.ts","../../../node_modules/.pnpm/@vitest+mocker@4.1.5_vite@8.0.10_@types+node@20.19.40_esbuild@0.27.7_jiti@1.21.7_/node_modules/@vitest/mocker/dist/index.d-B41z0AuW.d.ts","../../../node_modules/.pnpm/@vitest+mocker@4.1.5_vite@8.0.10_@types+node@20.19.40_esbuild@0.27.7_jiti@1.21.7_/node_modules/@vitest/mocker/dist/index.d.ts","../../../node_modules/.pnpm/vitest@4.1.5_@types+node@20.19.40_@vitest+browser-playwright@4.1.5_@vitest+coverage-v8@_93fb3f30d132ee2e785bbc9f718b2231/node_modules/vitest/dist/chunks/suite.d.udJtyAgw.d.ts","../../../node_modules/.pnpm/vitest@4.1.5_@types+node@20.19.40_@vitest+browser-playwright@4.1.5_@vitest+coverage-v8@_93fb3f30d132ee2e785bbc9f718b2231/node_modules/vitest/dist/chunks/evaluatedModules.d.BxJ5omdx.d.ts","../../../node_modules/.pnpm/vitest@4.1.5_@types+node@20.19.40_@vitest+browser-playwright@4.1.5_@vitest+coverage-v8@_93fb3f30d132ee2e785bbc9f718b2231/node_modules/vitest/dist/runners.d.ts","../../../node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/utils.d.ts","../../../node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/overloads.d.ts","../../../node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/branding.d.ts","../../../node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/messages.d.ts","../../../node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/index.d.ts","../../../node_modules/.pnpm/vitest@4.1.5_@types+node@20.19.40_@vitest+browser-playwright@4.1.5_@vitest+coverage-v8@_93fb3f30d132ee2e785bbc9f718b2231/node_modules/vitest/dist/index.d.ts","../src/__tests__/runtime.test.ts","../src/__tests__/transport.test.ts"],"fileIdsList":[[96,111,112,116,119],[96,111,113,114,116,119],[86,96,113,114,116,119],[86,96,112,113,114,116,119],[86,96,110,111,112,113,114,115,116,119],[86],[86,88,89,90,91,92,93],[86,89,90,91,92,93,94],[86,87,88,89,90,91,92,93,94],[88,89,90,91,92,93,94,95],[88,89,90,91,92,93,94],[96,116,119],[81,82,83,84,85],[152,153],[87,126,132,150,151,154],[161],[161,162],[130,132,133],[130,132],[130],[125,130,141,142],[125,130,141],[149],[125,131],[125],[127],[125,126,127,128,129],[167,168],[167,168,169,170],[167,169],[167],[136],[136,137,138,139],[138],[134,156,157,159],[134,135,147,159],[125,132,134,135,143,159],[140],[125,134,135,143,155,158,159],[134,135,140,143,159],[134,156,157,158,159],[134,140,144,145,146,159],[125,130,132,134,135,140,143,144,145,146,147,148,150,155,156,157,158,159,160,163,164,165,166,171],[125,132,134,135,143,144,156,157,158,159,164],[80,123],[78,79,80,121,172],[78,79,121,122,172],[79],[79,80,120,121,122],[79,119,120],[78,79,80],[78,79,80,121],[78,80],[96,108,116,119],[96,109,116,117,118,119],[96,108,109,116,117,119],[97,98],[97],[97,98,99,100,101,102,103,104,105,106,107],[97,101],[61,62,64],[61,62,64,78],[63],[64,73],[78],[61,73,74,75,78],[60,61,62,64,65,67,68,69,72,73,74,75,76,77],[65,66,78],[67],[66,67,70,71],[62,67,70],[73,74]],"fileInfos":[{"version":"bcd24271a113971ba9eb71ff8cb01bc6b0f872a85c23fdbe5d93065b375933cd","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f88bedbeb09c6f5a6645cb24c7c55f1aa22d19ae96c8e6959cbd8b85a707bc6","impliedFormat":1},{"version":"7fe93b39b810eadd916be8db880dd7f0f7012a5cc6ffb62de8f62a2117fa6f1f","impliedFormat":1},{"version":"bb0074cc08b84a2374af33d8bf044b80851ccc9e719a5e202eacf40db2c31600","impliedFormat":1},{"version":"1a7daebe4f45fb03d9ec53d60008fbf9ac45a697fdc89e4ce218bc94b94f94d6","impliedFormat":1},{"version":"f94b133a3cb14a288803be545ac2683e0d0ff6661bcd37e31aaaec54fc382aed","impliedFormat":1},{"version":"f59d0650799f8782fd74cf73c19223730c6d1b9198671b1c5b3a38e1188b5953","impliedFormat":1},{"version":"8a15b4607d9a499e2dbeed9ec0d3c0d7372c850b2d5f1fb259e8f6d41d468a84","impliedFormat":1},{"version":"26e0fe14baee4e127f4365d1ae0b276f400562e45e19e35fd2d4c296684715e6","impliedFormat":1},{"version":"d6b1eba8496bdd0eed6fc8a685768fe01b2da4a0388b5fe7df558290bffcf32f","affectsGlobalScope":true,"impliedFormat":1},{"version":"7f57fc4404ff020bc45b9c620aff2b40f700b95fe31164024c453a5e3c163c54","impliedFormat":1},{"version":"eadcffda2aa84802c73938e589b9e58248d74c59cb7fcbca6474e3435ac15504","affectsGlobalScope":true,"impliedFormat":1},{"version":"105ba8ff7ba746404fe1a2e189d1d3d2e0eb29a08c18dded791af02f29fb4711","affectsGlobalScope":true,"impliedFormat":1},{"version":"00343ca5b2e3d48fa5df1db6e32ea2a59afab09590274a6cccb1dbae82e60c7c","affectsGlobalScope":true,"impliedFormat":1},{"version":"ebd9f816d4002697cb2864bea1f0b70a103124e18a8cd9645eeccc09bdf80ab4","affectsGlobalScope":true,"impliedFormat":1},{"version":"2c1afac30a01772cd2a9a298a7ce7706b5892e447bb46bdbeef720f7b5da77ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"7b0225f483e4fa685625ebe43dd584bb7973bbd84e66a6ba7bbe175ee1048b4f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c0a4b8ac6ce74679c1da2b3795296f5896e31c38e888469a8e0f99dc3305de60","affectsGlobalScope":true,"impliedFormat":1},{"version":"3084a7b5f569088e0146533a00830e206565de65cae2239509168b11434cd84f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c5079c53f0f141a0698faa903e76cb41cd664e3efb01cc17a5c46ec2eb0bef42","affectsGlobalScope":true,"impliedFormat":1},{"version":"32cafbc484dea6b0ab62cf8473182bbcb23020d70845b406f80b7526f38ae862","affectsGlobalScope":true,"impliedFormat":1},{"version":"fca4cdcb6d6c5ef18a869003d02c9f0fd95df8cfaf6eb431cd3376bc034cad36","affectsGlobalScope":true,"impliedFormat":1},{"version":"b93ec88115de9a9dc1b602291b85baf825c85666bf25985cc5f698073892b467","affectsGlobalScope":true,"impliedFormat":1},{"version":"f5c06dcc3fe849fcb297c247865a161f995cc29de7aa823afdd75aaaddc1419b","affectsGlobalScope":true,"impliedFormat":1},{"version":"b77e16112127a4b169ef0b8c3a4d730edf459c5f25fe52d5e436a6919206c4d7","affectsGlobalScope":true,"impliedFormat":1},{"version":"fbffd9337146eff822c7c00acbb78b01ea7ea23987f6c961eba689349e744f8c","affectsGlobalScope":true,"impliedFormat":1},{"version":"a995c0e49b721312f74fdfb89e4ba29bd9824c770bbb4021d74d2bf560e4c6bd","affectsGlobalScope":true,"impliedFormat":1},{"version":"c7b3542146734342e440a84b213384bfa188835537ddbda50d30766f0593aff9","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce6180fa19b1cccd07ee7f7dbb9a367ac19c0ed160573e4686425060b6df7f57","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f02e2476bccb9dbe21280d6090f0df17d2f66b74711489415a8aa4df73c9675","affectsGlobalScope":true,"impliedFormat":1},{"version":"45e3ab34c1c013c8ab2dc1ba4c80c780744b13b5676800ae2e3be27ae862c40c","affectsGlobalScope":true,"impliedFormat":1},{"version":"805c86f6cca8d7702a62a844856dbaa2a3fd2abef0536e65d48732441dde5b5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"e42e397f1a5a77994f0185fd1466520691456c772d06bf843e5084ceb879a0ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"f4c2b41f90c95b1c532ecc874bd3c111865793b23aebcc1c3cbbabcd5d76ffb0","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab26191cfad5b66afa11b8bf935ef1cd88fabfcb28d30b2dfa6fad877d050332","affectsGlobalScope":true,"impliedFormat":1},{"version":"2088bc26531e38fb05eedac2951480db5309f6be3fa4a08d2221abb0f5b4200d","affectsGlobalScope":true,"impliedFormat":1},{"version":"cb9d366c425fea79716a8fb3af0d78e6b22ebbab3bd64d25063b42dc9f531c1e","affectsGlobalScope":true,"impliedFormat":1},{"version":"500934a8089c26d57ebdb688fc9757389bb6207a3c8f0674d68efa900d2abb34","affectsGlobalScope":true,"impliedFormat":1},{"version":"689da16f46e647cef0d64b0def88910e818a5877ca5379ede156ca3afb780ac3","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc21cc8b6fee4f4c2440d08035b7ea3c06b3511314c8bab6bef7a92de58a2593","affectsGlobalScope":true,"impliedFormat":1},{"version":"7ca53d13d2957003abb47922a71866ba7cb2068f8d154877c596d63c359fed25","affectsGlobalScope":true,"impliedFormat":1},{"version":"54725f8c4df3d900cb4dac84b64689ce29548da0b4e9b7c2de61d41c79293611","affectsGlobalScope":true,"impliedFormat":1},{"version":"e5594bc3076ac29e6c1ebda77939bc4c8833de72f654b6e376862c0473199323","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f3eb332c2d73e729f3364fcc0c2b375e72a121e8157d25a82d67a138c83a95c","affectsGlobalScope":true,"impliedFormat":1},{"version":"6f4427f9642ce8d500970e4e69d1397f64072ab73b97e476b4002a646ac743b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"48915f327cd1dea4d7bd358d9dc7732f58f9e1626a29cc0c05c8c692419d9bb7","affectsGlobalScope":true,"impliedFormat":1},{"version":"b7bf9377723203b5a6a4b920164df22d56a43f593269ba6ae1fdc97774b68855","affectsGlobalScope":true,"impliedFormat":1},{"version":"db9709688f82c9e5f65a119c64d835f906efe5f559d08b11642d56eb85b79357","affectsGlobalScope":true,"impliedFormat":1},{"version":"4b25b8c874acd1a4cf8444c3617e037d444d19080ac9f634b405583fd10ce1f7","affectsGlobalScope":true,"impliedFormat":1},{"version":"37be57d7c90cf1f8112ee2636a068d8fd181289f82b744160ec56a7dc158a9f5","affectsGlobalScope":true,"impliedFormat":1},{"version":"a917a49ac94cd26b754ab84e113369a75d1a47a710661d7cd25e961cc797065f","affectsGlobalScope":true,"impliedFormat":1},{"version":"6d3261badeb7843d157ef3e6f5d1427d0eeb0af0cf9df84a62cfd29fd47ac86e","affectsGlobalScope":true,"impliedFormat":1},{"version":"195daca651dde22f2167ac0d0a05e215308119a3100f5e6268e8317d05a92526","affectsGlobalScope":true,"impliedFormat":1},{"version":"8b11e4285cd2bb164a4dc09248bdec69e9842517db4ca47c1ba913011e44ff2f","affectsGlobalScope":true,"impliedFormat":1},{"version":"0508571a52475e245b02bc50fa1394065a0a3d05277fbf5120c3784b85651799","affectsGlobalScope":true,"impliedFormat":1},{"version":"8f9af488f510c3015af3cc8c267a9e9d96c4dd38a1fdff0e11dc5a544711415b","affectsGlobalScope":true,"impliedFormat":1},{"version":"fc611fea8d30ea72c6bbfb599c9b4d393ce22e2f5bfef2172534781e7d138104","affectsGlobalScope":true,"impliedFormat":1},{"version":"1ce14b81c5cc821994aa8ec1d42b220dd41b27fcc06373bce3958af7421b77d4","affectsGlobalScope":true,"impliedFormat":1},{"version":"b3a048b3e9302ef9a34ef4ebb9aecfb28b66abb3bce577206a79fee559c230da","affectsGlobalScope":true,"impliedFormat":1},"89fe170d9a59f81cd9a9d95de3278f108ff91491810b2529cc0ffb502a57b6c0","0b4928041c807c01b33b1fa028236df635c52f7acff5a40f2c2d0d677b53428b","5ad2e5b8b17893d0eb1f11a1b6e8c03b17344be03a6a72a624cd38ab05fe4d5c","6a1e553079e654a1771463e9eeb98ea4f7bb4b6417a5237d4fdf9b546d49647f","7f11be86b9ac5c2cd5127cd9d40ccc7694c58868a3157692a153d452fc171525","8b52dd8be86f44f871db89a6c1f77f7585688d53141ff55b6c5fac3eb67b1241","6e3488ee1183ea915eb43f08aebc5f75e30be25aef1f678d1965324bdd7506e1","59ca967d9cb92088499ce15a1c389e55a39bb2cb905844439565d9f7d8b1ed5d","a318d8734523d9e750681e7b8e685ef817d4049c5612451f4e849da8b2b572a9","99440a4820b8621d65822e29b01afd8a5938ea94ebea634fdd31d32d3e735629","080e7748d9754ccaea8debbc933552c7976c1ef588f9642a6f07e5a4d139d43b","51342c51a9090c0bc8bae60c5ec1a0f46d6d44db84392f12a8cd46e6d8a9f617","ae777307a0baeb9b5d7ba18e6a029a54eb0b612b1491591dcedb020cc8d36f97","464bedfb5186f124eacfc18488346e51dcf1318f5135e1cbb429f917065e5360","ba3e7709ee018a58cbde4f26ba611f89938725472766bcb325c1ed2ce41e9d6f","459b3765e622008ed590474ae6b61ab55107a7b9529a28d05087a6fef51d7248","ce15f7fa66eb0ff73351db6a626a397eb441aa3572707c2a156897c646b2911d","cc943379ee4a2e1023e8ad62c136d1367906e58e29559195e92cbcc1b296e803","bcf485b4f161e232c90d00f14ec27128227cf1cbdf60b93949b47a9365461a1d",{"version":"1a9ce047747098914ae21808e4c079551d5e591ec5074c30803c62503414ddee","signature":"3cc2bb86121ca1642f81b9714e48f64b8ceec71efff693b2da79bf888d117159"},{"version":"27e86e543e0c1d94ed0d8f2dddc8da49acd3c792b7edd2e1a22a003708b25017","signature":"0336e73486875a55a205e55a9483aab0cc001710dcd646004bb48b17a4b02dab"},{"version":"fb6f2007d60e8b519a2ef0c5a27026ddfe06418ae6261c4eb0cb670cca5e1bc2","impliedFormat":99},{"version":"a48f1b69ec0b94b16c7ece2cf6d6003cc8d0c329538117c1c364d8525a100850","impliedFormat":99},{"version":"cd5713ac354e4869fdf837e12d24d3ae14fd9d94a5bb2d340df63b899b74e6ca","impliedFormat":99},{"version":"56210599298d6eca6285eab99c7e9333d7e275c3a73a7f401b3055e8d55c67e8","impliedFormat":99},{"version":"2845576622e416da9871e1f3c788ba41dc4f24eb764362b10eceeb0dbaa67208","impliedFormat":99},{"version":"f0421e04e2a5238754cf444bf2a56fe7e7a94a08c14c1f9d063ff51c85825823","impliedFormat":99},{"version":"bdd14f07b4eca0b4b5203b85b8dbc4d084c749fa590bee5ea613e1641dcd3b29","impliedFormat":99},{"version":"967b227fad024ba8a7c32127534089bce5adc800840b0288f44d41c4c849278e","impliedFormat":99},{"version":"ffd229492af3cb444c01e8e51a78dfdbed670940bac40dde083675d57d6984fc","impliedFormat":99},{"version":"57cdef8252cb041b4b646cc9e80dcb27d2180bb78fcf95761136d99be4079cb3","impliedFormat":99},{"version":"eb5fd8d19b0330da4dccb6cab3eae0304f056ac8fbd5bd9589ce48f0920bff78","impliedFormat":99},{"version":"db565a086622cbe616a950186dc90e82a74060864b9cd1d0f25285860daea9b4","impliedFormat":99},{"version":"71087395cc862f52662ab2629a0f3838f8f2aaf84eb40c97f4f4004f2fcbbed6","impliedFormat":99},{"version":"1e2e6cfcab26ae01d7f2dd1f78a1d25ddb7f3b2e27f50c9eb3b54ee206a87884","impliedFormat":99},{"version":"489ec23ef8dc0e869cf3d8d77a39ba83ab24e5e71362320f5662491b3dc5bd04","impliedFormat":99},{"version":"c93dd79fae382105510c69cc8eef95a96c8c43e50b47e16efa98a3f9e76f304b","impliedFormat":99},"4a5b020726455dd70acdf34ccc435273e6333cbb1a3ff08b6c451148c61b21fd","eb4d76417ff2ac49726b2efaf83e5b9924f7040151293d092e1ba38905479a02","3bae912eb95706a507e668cdfe378bb612c81b46323aae337689fabc00c3ae29","129aaa58f8b8ed74d8ef3ab03d3219f1b5a7b2902c4e111e080abdaf043686ef","c0a9cb9a3fe662b66cf598c1e2e6bc799b423699b81249bb62586acbc817b1e7","7d3bbcb2ef65e80202188d77d2e06f30c5d5d2603ca49cde35a6b298565247e9","f90ae41777b29281dcd4aa3fafb9d84c6b328860d639114a8c3fcf36beb23817","eadfe727983087acea4f17095671faba65ba5233acaed7213f140269d4528c9a","6bbe3b367d76debfa83ec26a13d0013f8dad891cddd8909a1fbdcdb719b064d9","9fec96292881b3ee00f9b34d757887223221db25d0fb534b521743e9be298d9f","fbd59a37ab9b1a3a21f2e968b539f91453e560507d9e92748f0623f7118306be","92523b7353d096bd2464e1611035b284803894aa952541021922567dfe9f15aa","49ca23a8e2de57d49da1b5b5aa2f0e0d341b4230a899efe1a6078d3779e2ea53",{"version":"be53d0833468d1d4de05770f4af2d3ec465b7ef5d5181b748997a02bf362ebd0","impliedFormat":99},{"version":"4920f950330f6a8a00a084beb7998de838a15cd54f5c774962b75614c15f8bed","impliedFormat":99},{"version":"e892ea4cf5fc5e5ab078f265c617efa3ab44a1cbd477f91fd29a27698c45eb77","impliedFormat":99},{"version":"6a33bd0416049803becacbdccd852c02f342eedce7dea12956d1176966269eeb","impliedFormat":99},{"version":"f74c6749e3944913d8002c1dd30523c520de426e9113d47b6730565318349154","impliedFormat":99},{"version":"ac5d5fd3358d3f7491400869278ea288df297b4fbc1ba035c7fd09c8df822358","impliedFormat":99},{"version":"0ce13f49afeb385ad05698a5420580c7381d758779b730c1992be7386578e1e7","impliedFormat":99},"8fa74a106f75c2eed4b65fa571e4e9b78e9a3a68f65b6c70261e87f7f47b931d","d82719b8e8a552f66dea370df85e00f9473537bb9c35dcb711d7f48cb5e707cd","a3c435d1e1eb110bb7382103c522bf44e9abb8b6883a493360fc5859db0aee10",{"version":"1e9d1ca15bcdc6379d5335cb50ee3cf2f4b9037892ad1ffa2e501e40877695f6","signature":"fa0c7ba0455e88fa5a339c733dcfb3443e786e6c53faa6baf2eeefe459663796"},{"version":"94e8976064830ee3e12f732a218bf260beb589b77eca201195cb66bf4cf1af3a","signature":"e71cc6e253914585ff1be575db817fdd6d4b92ed619785c32b1ab6d258ddd6f1"},{"version":"cf1c7a87043efac9429511e4334427f809b50bb91a65dfdeb5243a35f197616f","signature":"c833336ea174334b44b03eaaaf9136b6e87d3c165b942751efcc06eee120ea43"},{"version":"366cbf3dd03480c8ef63c9d0f893aeda489e9f3c6f5fc88c5b77fb4f1f95e05d","signature":"f157cd9253cd574d79373f51ffd4e04c804dc0870b0f4448d86b4acbf01a8239"},{"version":"43d9e3d7c116878f50e11f592e6063ea18ed046c45e3c1cfb29a5ece3380cd97","signature":"1421eeaf15f7d3f67e127df433cd739e5fb81807ab9de7b15e0b907d764fb1fe"},{"version":"3a582c6e8906f5b094ccf0de6cc6f4f8a54b05a34f52517aba5c9c7f704f6b28","impliedFormat":99},{"version":"0528f6d21f7a02d4092895090d2dd86104bd5a3e79eced96d5a1a7dd90943d17","impliedFormat":99},{"version":"b5ce343886d23392be9c8280e9f24a87f1d7d3667f6672c2fe4aa61fa4ece7d4","impliedFormat":99},{"version":"72ce5b734c05da85c85a6f6dc05823b051d6aa41acaedeeb1d17c72f3b4efa72","impliedFormat":99},{"version":"b0857bb28fd5236ace84280f79a25093f919fd0eff13e47cc26ea03de60a7294","impliedFormat":99},{"version":"5e43e0824f10cd8c48e7a8c5c673638488925a12c31f0f9e0957965c290eb14c","impliedFormat":99},{"version":"ef13c73d6157a32933c612d476c1524dd674cf5b9a88571d7d6a0d147544d529","impliedFormat":99},{"version":"3b0a56d056d81a011e484b9c05d5e430711aaecd561a788bad1d0498aad782c7","impliedFormat":99},{"version":"9443967db823b66d1682be7fc66392be7c7924e10c3e54900f456341e94591a6","impliedFormat":99},{"version":"424f71d1fae96ac2e878af92345bb87bea1d29f757228fbc190133b305643f2c","impliedFormat":99},{"version":"61bb64660ee150f3ab618340e15cca0a81664801bede7c966ca0eca3a952fe63","impliedFormat":99},{"version":"3b89216a7e38a454985ad17bb2ff85792837dc812f2a89fa5f60ad0a2e216fa7","impliedFormat":99},{"version":"16fe60bb544cfedfd2b5bb2f7d0b3957be7978706d57d9f06edc9c0c8dbdba23","impliedFormat":99},{"version":"82179358c2d9d7347f1602dc9300039a2250e483137b38ebf31d4d2e5519c181","impliedFormat":99},{"version":"4e003c868b0d8f8ad200b96cbc653e18e513fa23e1c19c4fe3cc25d4394efc47","impliedFormat":99},{"version":"605450898939e8abce51e8085a41b60640278337a969c33cd6b169e7c4f9c3f2","impliedFormat":99},{"version":"42a12f2faa483c9b48195ed794d22698162274e755f6e07219c2351c4f08d732","impliedFormat":99},{"version":"ec0c42bb0f465e4993f2bc68a6ce9df9a2dcbc7b83e21748f82f1b69561938e3","impliedFormat":99},{"version":"f50ff37a9cbbe74475f426474d9827083c7c2c138a954d28f1690df338f69291","impliedFormat":99},{"version":"61fd6c17235d530c40f543dd7c40afab091d91c1ef890baeed30db6d82b04b28","impliedFormat":99},{"version":"bcbd3becd08b4515225880abea0dbfbbf0d1181ce3af8f18f72f61edbe4febfb","impliedFormat":99},{"version":"091767bc841f937654ed597d49e023ed59850355e746ae1a6f20ab31076ee1fb","impliedFormat":99},{"version":"19c6d6135af59693698d384050b45a8a049493500add442f58e4bd7c8a255ab6","impliedFormat":99},{"version":"6a0dba12d55314638a8c51108b20fe2f68f1364a619d098918bda91c22dec154","impliedFormat":99},{"version":"c76c02846ba7d40b9b3488f0e8d75d02cbdee2f0bc5fcd55dd3bd2e1457646ea","impliedFormat":99},{"version":"4ead13a482c539b77394b2a97e3b877b809eac596390371cea490286f53b996a","impliedFormat":99},{"version":"06db2f8ba1d1dfacf04529cb731081ab23f133f29c7608ebdfbcab356996827c","impliedFormat":99},{"version":"427fe2004642504828c1476d0af4270e6ad4db6de78c0b5da3e4c5ca95052a99","impliedFormat":1},{"version":"2eeffcee5c1661ddca53353929558037b8cf305ffb86a803512982f99bcab50d","impliedFormat":99},{"version":"9afb4cb864d297e4092a79ee2871b5d3143ea14153f62ef0bb04ede25f432030","affectsGlobalScope":true,"impliedFormat":99},{"version":"5c935b7fc4ddc1410ea1cd7cd4e35ed106a6e4920dd27a9480a40fd224359dc3","affectsGlobalScope":true,"impliedFormat":99},{"version":"ed9bb55ddcbebd5cb3eee991f57ff21438546ee40ee1c310281bd12a6c7cf65b","impliedFormat":99},{"version":"69bf2422313487956e4dacf049f30cb91b34968912058d244cb19e4baa24da97","impliedFormat":99},{"version":"6987dfb4b0c4e02112cc4e548e7a77b3d9ddfeffa8c8a2db13ceac361a4567d9","impliedFormat":99},{"version":"4ffba3c5848b4fe62ee59b754fd5f256ad9656a0db6d37b9a2a8cb40dfc7ac21","impliedFormat":99},{"version":"c76c02846ba7d40b9b3488f0e8d75d02cbdee2f0bc5fcd55dd3bd2e1457646ea","impliedFormat":99},{"version":"5e2ba3d18d78aebbde1f34bde356e41e9c76eeaeaeee56a37036596a9eff4211","impliedFormat":99},{"version":"8280ae8ccc0493b32d1742d585357ab9f0a508ea050af25a5a20d64010d0a5cf","impliedFormat":99},{"version":"7adfd9f9056ecd4ae6c65fde2a98654960c662714c73f048478959d04c09e144","impliedFormat":99},{"version":"32b35cf0dc3a1b1a7118b61c34ce2ad1a29695851679f9ec34e0776f2ece2a69","impliedFormat":99},{"version":"b413fbc6658fe2774f8bf9a15cf4c53e586fc38a2d5256b3b9647da242c14389","impliedFormat":99},{"version":"59e5e964b84fdb2378e9455e4e59405030e4ed2b4c6f891ce395f17796af3cbb","impliedFormat":99},{"version":"c30a41267fc04c6518b17e55dcb2b810f267af4314b0b6d7df1c33a76ce1b330","impliedFormat":1},{"version":"72422d0bac4076912385d0c10911b82e4694fc106e2d70added091f88f0824ba","impliedFormat":1},{"version":"da251b82c25bee1d93f9fd80c5a61d945da4f708ca21285541d7aff83ecb8200","impliedFormat":1},{"version":"64db14db2bf37ac089766fdb3c7e1160fabc10e9929bc2deeede7237e4419fc8","impliedFormat":1},{"version":"98b94085c9f78eba36d3d2314affe973e8994f99864b8708122750788825c771","impliedFormat":1},{"version":"90ba95a763101bb61b8a799731a2ed60b5016b8135c1a2d5186862d4b534d4a1","impliedFormat":99},{"version":"1a4b87aeadca1ce5375b479b56de3331e03874ca9c9f33dc3345b5de12185799","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},{"version":"4fcdf89e05eb3a7de69efd7be75416e0192ee917211362882b8c58456be5ffee","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"}],"root":[79,80,[120,124],173,174],"options":{"composite":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":true,"exactOptionalPropertyTypes":true,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitOverride":true,"noImplicitReturns":true,"noUncheckedIndexedAccess":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../src","skipLibCheck":true,"strict":true,"target":9,"tsBuildInfoFile":"./.tsbuildinfo","useDefineForClassFields":true,"verbatimModuleSyntax":true},"referencedMap":[[113,1],[112,2],[114,3],[111,4],[116,5],[110,6],[94,7],[92,8],[91,9],[96,10],[93,11],[90,8],[89,9],[95,11],[88,12],[86,13],[154,14],[155,15],[162,16],[163,17],[134,18],[133,19],[156,18],[141,20],[143,21],[142,22],[150,23],[132,24],[126,25],[128,26],[130,27],[131,25],[169,28],[171,29],[170,30],[168,31],[137,32],[140,33],[138,32],[139,34],[158,35],[148,36],[144,37],[145,20],[165,38],[159,39],[146,40],[164,41],[147,42],[172,43],[166,44],[124,45],[173,46],[174,47],[80,48],[123,49],[120,50],[121,51],[122,52],[79,53],[109,54],[119,55],[118,56],[117,54],[99,57],[100,58],[98,58],[108,59],[103,58],[104,58],[105,58],[106,58],[107,60],[63,61],[65,62],[64,63],[74,64],[76,65],[69,65],[77,66],[78,67],[67,68],[66,69],[72,70],[71,71],[75,72]],"latestChangedDtsFile":"./__tests__/transport.test.d.ts","version":"6.0.3"}
|
|
1
|
+
{"fileNames":["../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../types/dist/animation-target.d.ts","../../types/dist/asset-errors.d.ts","../../types/dist/result.d.ts","../../types/dist/asset-evidence.d.ts","../../types/dist/asset.d.ts","../../types/dist/material/color-space.d.ts","../../types/dist/material/asset.d.ts","../../types/dist/vfx.d.ts","../../types/dist/asset-runtime.d.ts","../../types/dist/handle.d.ts","../../types/dist/material/errors.d.ts","../../types/dist/material/resolve.d.ts","../../types/dist/material/index.d.ts","../../types/dist/asset-producer.d.ts","../../types/dist/catalog.d.ts","../../types/dist/runtime-scope.d.ts","../../types/dist/derive-paramschema.d.ts","../../types/dist/import.d.ts","../../types/dist/index.d.ts","../src/types.ts","../src/errors.ts","../../../node_modules/.pnpm/@deepseek-ai+cosmokit@1.8.2/node_modules/@deepseek-ai/cosmokit/lib/types/array.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cosmokit@1.8.2/node_modules/@deepseek-ai/cosmokit/lib/types/types.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cosmokit@1.8.2/node_modules/@deepseek-ai/cosmokit/lib/types/misc.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cosmokit@1.8.2/node_modules/@deepseek-ai/cosmokit/lib/types/string.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cosmokit@1.8.2/node_modules/@deepseek-ai/cosmokit/lib/types/time.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cosmokit@1.8.2/node_modules/@deepseek-ai/cosmokit/lib/types/index.d.ts","../../../node_modules/.pnpm/@standard-schema+spec@1.1.0/node_modules/@standard-schema/spec/dist/index.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cordis@4.0.1_@deepseek-ai+cordis-plugin-loader@1.0.2/node_modules/@deepseek-ai/cordis/lib/types/utils.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cordis@4.0.1_@deepseek-ai+cordis-plugin-loader@1.0.2/node_modules/@deepseek-ai/cordis/lib/types/registry.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cordis@4.0.1_@deepseek-ai+cordis-plugin-loader@1.0.2/node_modules/@deepseek-ai/cordis/lib/types/reflect.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cordis@4.0.1_@deepseek-ai+cordis-plugin-loader@1.0.2/node_modules/@deepseek-ai/cordis/lib/types/fiber.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cordis@4.0.1_@deepseek-ai+cordis-plugin-loader@1.0.2/node_modules/@deepseek-ai/cordis/lib/types/events.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cordis@4.0.1_@deepseek-ai+cordis-plugin-loader@1.0.2/node_modules/@deepseek-ai/cordis/lib/types/logger.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cordis@4.0.1_@deepseek-ai+cordis-plugin-loader@1.0.2/node_modules/@deepseek-ai/cordis/lib/types/context.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cordis@4.0.1_@deepseek-ai+cordis-plugin-loader@1.0.2/node_modules/@deepseek-ai/cordis/lib/types/service.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cordis@4.0.1_@deepseek-ai+cordis-plugin-loader@1.0.2/node_modules/@deepseek-ai/cordis/lib/types/index.d.ts","../../tool-runtime/dist/types.d.ts","../../tool-runtime/dist/errors.d.ts","../../tool-runtime/dist/artifacts.d.ts","../../tool-runtime/dist/capability.d.ts","../../tool-runtime/dist/carrier.d.ts","../../tool-runtime/dist/lease.d.ts","../../tool-runtime/dist/migration.d.ts","../../tool-runtime/dist/runtime.d.ts","../../tool-runtime/dist/snapshot.d.ts","../../tool-runtime/dist/timing.d.ts","../../tool-runtime/dist/transport.d.ts","../../tool-runtime/dist/index.d.ts","../../plugin/dist/capability.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cordis-plugin-loader@1.0.2_patch_hash=6e77a3b82171afbdac249c0e31290cc06386_1a14a168fdebad14b739afc92f305e1c/node_modules/@deepseek-ai/cordis-plugin-loader/lib/types/internal.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cordis-plugin-loader@1.0.2_patch_hash=6e77a3b82171afbdac249c0e31290cc06386_1a14a168fdebad14b739afc92f305e1c/node_modules/@deepseek-ai/cordis-plugin-loader/lib/types/config/tree.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cordis-plugin-loader@1.0.2_patch_hash=6e77a3b82171afbdac249c0e31290cc06386_1a14a168fdebad14b739afc92f305e1c/node_modules/@deepseek-ai/cordis-plugin-loader/lib/types/config/group.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cordis-plugin-loader@1.0.2_patch_hash=6e77a3b82171afbdac249c0e31290cc06386_1a14a168fdebad14b739afc92f305e1c/node_modules/@deepseek-ai/cordis-plugin-loader/lib/types/config/entry.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cordis-plugin-loader@1.0.2_patch_hash=6e77a3b82171afbdac249c0e31290cc06386_1a14a168fdebad14b739afc92f305e1c/node_modules/@deepseek-ai/cordis-plugin-loader/lib/types/config/isolate.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cordis-plugin-loader@1.0.2_patch_hash=6e77a3b82171afbdac249c0e31290cc06386_1a14a168fdebad14b739afc92f305e1c/node_modules/@deepseek-ai/cordis-plugin-loader/lib/types/config/utils.d.ts","../../../node_modules/.pnpm/@deepseek-ai+cordis-plugin-loader@1.0.2_patch_hash=6e77a3b82171afbdac249c0e31290cc06386_1a14a168fdebad14b739afc92f305e1c/node_modules/@deepseek-ai/cordis-plugin-loader/lib/types/index.d.ts","../../plugin/dist/tool-plugin.d.ts","../../plugin/dist/loader.d.ts","../../plugin/dist/index.d.ts","../src/plugin.ts","../src/runtime.ts","../src/transport.ts","../src/index.ts","../../../node_modules/.pnpm/@vitest+pretty-format@4.1.5/node_modules/@vitest/pretty-format/dist/index.d.ts","../../../node_modules/.pnpm/@vitest+utils@4.1.5/node_modules/@vitest/utils/dist/display.d.ts","../../../node_modules/.pnpm/@vitest+utils@4.1.5/node_modules/@vitest/utils/dist/types.d.ts","../../../node_modules/.pnpm/@vitest+utils@4.1.5/node_modules/@vitest/utils/dist/helpers.d.ts","../../../node_modules/.pnpm/@vitest+utils@4.1.5/node_modules/@vitest/utils/dist/timers.d.ts","../../../node_modules/.pnpm/@vitest+utils@4.1.5/node_modules/@vitest/utils/dist/index.d.ts","../../../node_modules/.pnpm/@vitest+utils@4.1.5/node_modules/@vitest/utils/dist/types.d-BCElaP-c.d.ts","../../../node_modules/.pnpm/@vitest+utils@4.1.5/node_modules/@vitest/utils/dist/diff.d.ts","../../../node_modules/.pnpm/@vitest+runner@4.1.5/node_modules/@vitest/runner/dist/tasks.d-Bh0IjN67.d.ts","../../../node_modules/.pnpm/@vitest+runner@4.1.5/node_modules/@vitest/runner/dist/index.d.ts","../../../node_modules/.pnpm/vitest@4.1.5_@types+node@20.19.40_@vitest+browser-playwright@4.1.5_@vitest+coverage-v8@_93fb3f30d132ee2e785bbc9f718b2231/node_modules/vitest/dist/chunks/traces.d.D2T_R8rx.d.ts","../../../node_modules/.pnpm/vite@8.0.10_@types+node@20.19.40_esbuild@0.27.7_jiti@1.21.7/node_modules/vite/types/hmrPayload.d.ts","../../../node_modules/.pnpm/vite@8.0.10_@types+node@20.19.40_esbuild@0.27.7_jiti@1.21.7/node_modules/vite/dist/node/chunks/moduleRunnerTransport.d.ts","../../../node_modules/.pnpm/vite@8.0.10_@types+node@20.19.40_esbuild@0.27.7_jiti@1.21.7/node_modules/vite/types/customEvent.d.ts","../../../node_modules/.pnpm/vite@8.0.10_@types+node@20.19.40_esbuild@0.27.7_jiti@1.21.7/node_modules/vite/types/hot.d.ts","../../../node_modules/.pnpm/vite@8.0.10_@types+node@20.19.40_esbuild@0.27.7_jiti@1.21.7/node_modules/vite/dist/node/module-runner.d.ts","../../../node_modules/.pnpm/@vitest+snapshot@4.1.5/node_modules/@vitest/snapshot/dist/environment.d-DOJxxZV9.d.ts","../../../node_modules/.pnpm/@vitest+snapshot@4.1.5/node_modules/@vitest/snapshot/dist/rawSnapshot.d-D_X3-62x.d.ts","../../../node_modules/.pnpm/@vitest+snapshot@4.1.5/node_modules/@vitest/snapshot/dist/index.d.ts","../../../node_modules/.pnpm/vitest@4.1.5_@types+node@20.19.40_@vitest+browser-playwright@4.1.5_@vitest+coverage-v8@_93fb3f30d132ee2e785bbc9f718b2231/node_modules/vitest/dist/chunks/config.d.A1h_Y6Jt.d.ts","../../../node_modules/.pnpm/vitest@4.1.5_@types+node@20.19.40_@vitest+browser-playwright@4.1.5_@vitest+coverage-v8@_93fb3f30d132ee2e785bbc9f718b2231/node_modules/vitest/dist/chunks/environment.d.CrsxCzP1.d.ts","../../../node_modules/.pnpm/vitest@4.1.5_@types+node@20.19.40_@vitest+browser-playwright@4.1.5_@vitest+coverage-v8@_93fb3f30d132ee2e785bbc9f718b2231/node_modules/vitest/dist/chunks/rpc.d.B_8sPU0w.d.ts","../../../node_modules/.pnpm/vitest@4.1.5_@types+node@20.19.40_@vitest+browser-playwright@4.1.5_@vitest+coverage-v8@_93fb3f30d132ee2e785bbc9f718b2231/node_modules/vitest/dist/chunks/worker.d.ZpHpO4yb.d.ts","../../../node_modules/.pnpm/vitest@4.1.5_@types+node@20.19.40_@vitest+browser-playwright@4.1.5_@vitest+coverage-v8@_93fb3f30d132ee2e785bbc9f718b2231/node_modules/vitest/dist/chunks/browser.d.BcoexmFG.d.ts","../../../node_modules/.pnpm/@vitest+spy@4.1.5/node_modules/@vitest/spy/optional-types.d.ts","../../../node_modules/.pnpm/@vitest+spy@4.1.5/node_modules/@vitest/spy/dist/index.d.ts","../../../node_modules/.pnpm/tinyrainbow@3.1.0/node_modules/tinyrainbow/dist/index.d.ts","../../../node_modules/.pnpm/@types+deep-eql@4.0.2/node_modules/@types/deep-eql/index.d.ts","../../../node_modules/.pnpm/assertion-error@2.0.1/node_modules/assertion-error/index.d.ts","../../../node_modules/.pnpm/@types+chai@5.2.3/node_modules/@types/chai/index.d.ts","../../../node_modules/.pnpm/@vitest+expect@4.1.5/node_modules/@vitest/expect/dist/index.d.ts","../../../node_modules/.pnpm/@vitest+runner@4.1.5/node_modules/@vitest/runner/dist/utils.d.ts","../../../node_modules/.pnpm/tinybench@2.9.0/node_modules/tinybench/dist/index.d.ts","../../../node_modules/.pnpm/vitest@4.1.5_@types+node@20.19.40_@vitest+browser-playwright@4.1.5_@vitest+coverage-v8@_93fb3f30d132ee2e785bbc9f718b2231/node_modules/vitest/dist/chunks/benchmark.d.DAaHLpsq.d.ts","../../../node_modules/.pnpm/vitest@4.1.5_@types+node@20.19.40_@vitest+browser-playwright@4.1.5_@vitest+coverage-v8@_93fb3f30d132ee2e785bbc9f718b2231/node_modules/vitest/dist/chunks/global.d.DVsSRdQ5.d.ts","../../../node_modules/.pnpm/vitest@4.1.5_@types+node@20.19.40_@vitest+browser-playwright@4.1.5_@vitest+coverage-v8@_93fb3f30d132ee2e785bbc9f718b2231/node_modules/vitest/optional-runtime-types.d.ts","../../../node_modules/.pnpm/@vitest+mocker@4.1.5_vite@8.0.10_@types+node@20.19.40_esbuild@0.27.7_jiti@1.21.7_/node_modules/@vitest/mocker/dist/types.d-BjI5eAwu.d.ts","../../../node_modules/.pnpm/@vitest+mocker@4.1.5_vite@8.0.10_@types+node@20.19.40_esbuild@0.27.7_jiti@1.21.7_/node_modules/@vitest/mocker/dist/index.d-B41z0AuW.d.ts","../../../node_modules/.pnpm/@vitest+mocker@4.1.5_vite@8.0.10_@types+node@20.19.40_esbuild@0.27.7_jiti@1.21.7_/node_modules/@vitest/mocker/dist/index.d.ts","../../../node_modules/.pnpm/vitest@4.1.5_@types+node@20.19.40_@vitest+browser-playwright@4.1.5_@vitest+coverage-v8@_93fb3f30d132ee2e785bbc9f718b2231/node_modules/vitest/dist/chunks/suite.d.udJtyAgw.d.ts","../../../node_modules/.pnpm/vitest@4.1.5_@types+node@20.19.40_@vitest+browser-playwright@4.1.5_@vitest+coverage-v8@_93fb3f30d132ee2e785bbc9f718b2231/node_modules/vitest/dist/chunks/evaluatedModules.d.BxJ5omdx.d.ts","../../../node_modules/.pnpm/vitest@4.1.5_@types+node@20.19.40_@vitest+browser-playwright@4.1.5_@vitest+coverage-v8@_93fb3f30d132ee2e785bbc9f718b2231/node_modules/vitest/dist/runners.d.ts","../../../node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/utils.d.ts","../../../node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/overloads.d.ts","../../../node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/branding.d.ts","../../../node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/messages.d.ts","../../../node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/index.d.ts","../../../node_modules/.pnpm/vitest@4.1.5_@types+node@20.19.40_@vitest+browser-playwright@4.1.5_@vitest+coverage-v8@_93fb3f30d132ee2e785bbc9f718b2231/node_modules/vitest/dist/index.d.ts","../src/__tests__/runtime.test.ts","../src/__tests__/transport.test.ts"],"fileIdsList":[[96,111,112,116,119],[96,111,113,114,116,119],[86,96,113,114,116,119],[86,96,112,113,114,116,119],[86,96,110,111,112,113,114,115,116,119],[86],[86,88,89,90,91,92,93],[86,89,90,91,92,93,94],[86,87,88,89,90,91,92,93,94],[88,89,90,91,92,93,94,95],[88,89,90,91,92,93,94],[96,116,119],[81,82,83,84,85],[151,152],[87,125,131,149,150,153],[160],[160,161],[129,131,132],[129,131],[129],[124,129,140,141],[124,129,140],[148],[124,130],[124],[126],[124,125,126,127,128],[166,167],[166,167,168,169],[166,168],[166],[135],[135,136,137,138],[137],[133,155,156,158],[133,134,146,158],[124,131,133,134,142,158],[139],[124,133,134,142,154,157,158],[133,134,139,142,158],[133,155,156,157,158],[133,139,143,144,145,158],[124,129,131,133,134,139,142,143,144,145,146,147,149,154,155,156,157,158,159,162,163,164,165,170],[124,131,133,134,142,143,155,156,157,158,163],[78,79,80,121,171],[78,79,121,122,171],[79],[79,80,120,121,122],[79,119,120],[78,79,80],[78,79,80,121],[78,80],[96,108,116,119],[96,109,116,117,118,119],[96,108,109,116,117,119],[97,98],[97],[97,98,99,100,101,102,103,104,105,106,107],[97,101],[61,62,64],[61,62,64,78],[63],[62,64,73],[78],[61,73,74,75,78],[60,61,62,64,66,67,68,69,72,73,74,75,76,77],[65,78],[66],[65,66,70,71],[62,66,70],[73,74]],"fileInfos":[{"version":"bcd24271a113971ba9eb71ff8cb01bc6b0f872a85c23fdbe5d93065b375933cd","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f88bedbeb09c6f5a6645cb24c7c55f1aa22d19ae96c8e6959cbd8b85a707bc6","impliedFormat":1},{"version":"7fe93b39b810eadd916be8db880dd7f0f7012a5cc6ffb62de8f62a2117fa6f1f","impliedFormat":1},{"version":"bb0074cc08b84a2374af33d8bf044b80851ccc9e719a5e202eacf40db2c31600","impliedFormat":1},{"version":"1a7daebe4f45fb03d9ec53d60008fbf9ac45a697fdc89e4ce218bc94b94f94d6","impliedFormat":1},{"version":"f94b133a3cb14a288803be545ac2683e0d0ff6661bcd37e31aaaec54fc382aed","impliedFormat":1},{"version":"f59d0650799f8782fd74cf73c19223730c6d1b9198671b1c5b3a38e1188b5953","impliedFormat":1},{"version":"8a15b4607d9a499e2dbeed9ec0d3c0d7372c850b2d5f1fb259e8f6d41d468a84","impliedFormat":1},{"version":"26e0fe14baee4e127f4365d1ae0b276f400562e45e19e35fd2d4c296684715e6","impliedFormat":1},{"version":"d6b1eba8496bdd0eed6fc8a685768fe01b2da4a0388b5fe7df558290bffcf32f","affectsGlobalScope":true,"impliedFormat":1},{"version":"7f57fc4404ff020bc45b9c620aff2b40f700b95fe31164024c453a5e3c163c54","impliedFormat":1},{"version":"eadcffda2aa84802c73938e589b9e58248d74c59cb7fcbca6474e3435ac15504","affectsGlobalScope":true,"impliedFormat":1},{"version":"105ba8ff7ba746404fe1a2e189d1d3d2e0eb29a08c18dded791af02f29fb4711","affectsGlobalScope":true,"impliedFormat":1},{"version":"00343ca5b2e3d48fa5df1db6e32ea2a59afab09590274a6cccb1dbae82e60c7c","affectsGlobalScope":true,"impliedFormat":1},{"version":"ebd9f816d4002697cb2864bea1f0b70a103124e18a8cd9645eeccc09bdf80ab4","affectsGlobalScope":true,"impliedFormat":1},{"version":"2c1afac30a01772cd2a9a298a7ce7706b5892e447bb46bdbeef720f7b5da77ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"7b0225f483e4fa685625ebe43dd584bb7973bbd84e66a6ba7bbe175ee1048b4f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c0a4b8ac6ce74679c1da2b3795296f5896e31c38e888469a8e0f99dc3305de60","affectsGlobalScope":true,"impliedFormat":1},{"version":"3084a7b5f569088e0146533a00830e206565de65cae2239509168b11434cd84f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c5079c53f0f141a0698faa903e76cb41cd664e3efb01cc17a5c46ec2eb0bef42","affectsGlobalScope":true,"impliedFormat":1},{"version":"32cafbc484dea6b0ab62cf8473182bbcb23020d70845b406f80b7526f38ae862","affectsGlobalScope":true,"impliedFormat":1},{"version":"fca4cdcb6d6c5ef18a869003d02c9f0fd95df8cfaf6eb431cd3376bc034cad36","affectsGlobalScope":true,"impliedFormat":1},{"version":"b93ec88115de9a9dc1b602291b85baf825c85666bf25985cc5f698073892b467","affectsGlobalScope":true,"impliedFormat":1},{"version":"f5c06dcc3fe849fcb297c247865a161f995cc29de7aa823afdd75aaaddc1419b","affectsGlobalScope":true,"impliedFormat":1},{"version":"b77e16112127a4b169ef0b8c3a4d730edf459c5f25fe52d5e436a6919206c4d7","affectsGlobalScope":true,"impliedFormat":1},{"version":"fbffd9337146eff822c7c00acbb78b01ea7ea23987f6c961eba689349e744f8c","affectsGlobalScope":true,"impliedFormat":1},{"version":"a995c0e49b721312f74fdfb89e4ba29bd9824c770bbb4021d74d2bf560e4c6bd","affectsGlobalScope":true,"impliedFormat":1},{"version":"c7b3542146734342e440a84b213384bfa188835537ddbda50d30766f0593aff9","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce6180fa19b1cccd07ee7f7dbb9a367ac19c0ed160573e4686425060b6df7f57","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f02e2476bccb9dbe21280d6090f0df17d2f66b74711489415a8aa4df73c9675","affectsGlobalScope":true,"impliedFormat":1},{"version":"45e3ab34c1c013c8ab2dc1ba4c80c780744b13b5676800ae2e3be27ae862c40c","affectsGlobalScope":true,"impliedFormat":1},{"version":"805c86f6cca8d7702a62a844856dbaa2a3fd2abef0536e65d48732441dde5b5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"e42e397f1a5a77994f0185fd1466520691456c772d06bf843e5084ceb879a0ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"f4c2b41f90c95b1c532ecc874bd3c111865793b23aebcc1c3cbbabcd5d76ffb0","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab26191cfad5b66afa11b8bf935ef1cd88fabfcb28d30b2dfa6fad877d050332","affectsGlobalScope":true,"impliedFormat":1},{"version":"2088bc26531e38fb05eedac2951480db5309f6be3fa4a08d2221abb0f5b4200d","affectsGlobalScope":true,"impliedFormat":1},{"version":"cb9d366c425fea79716a8fb3af0d78e6b22ebbab3bd64d25063b42dc9f531c1e","affectsGlobalScope":true,"impliedFormat":1},{"version":"500934a8089c26d57ebdb688fc9757389bb6207a3c8f0674d68efa900d2abb34","affectsGlobalScope":true,"impliedFormat":1},{"version":"689da16f46e647cef0d64b0def88910e818a5877ca5379ede156ca3afb780ac3","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc21cc8b6fee4f4c2440d08035b7ea3c06b3511314c8bab6bef7a92de58a2593","affectsGlobalScope":true,"impliedFormat":1},{"version":"7ca53d13d2957003abb47922a71866ba7cb2068f8d154877c596d63c359fed25","affectsGlobalScope":true,"impliedFormat":1},{"version":"54725f8c4df3d900cb4dac84b64689ce29548da0b4e9b7c2de61d41c79293611","affectsGlobalScope":true,"impliedFormat":1},{"version":"e5594bc3076ac29e6c1ebda77939bc4c8833de72f654b6e376862c0473199323","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f3eb332c2d73e729f3364fcc0c2b375e72a121e8157d25a82d67a138c83a95c","affectsGlobalScope":true,"impliedFormat":1},{"version":"6f4427f9642ce8d500970e4e69d1397f64072ab73b97e476b4002a646ac743b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"48915f327cd1dea4d7bd358d9dc7732f58f9e1626a29cc0c05c8c692419d9bb7","affectsGlobalScope":true,"impliedFormat":1},{"version":"b7bf9377723203b5a6a4b920164df22d56a43f593269ba6ae1fdc97774b68855","affectsGlobalScope":true,"impliedFormat":1},{"version":"db9709688f82c9e5f65a119c64d835f906efe5f559d08b11642d56eb85b79357","affectsGlobalScope":true,"impliedFormat":1},{"version":"4b25b8c874acd1a4cf8444c3617e037d444d19080ac9f634b405583fd10ce1f7","affectsGlobalScope":true,"impliedFormat":1},{"version":"37be57d7c90cf1f8112ee2636a068d8fd181289f82b744160ec56a7dc158a9f5","affectsGlobalScope":true,"impliedFormat":1},{"version":"a917a49ac94cd26b754ab84e113369a75d1a47a710661d7cd25e961cc797065f","affectsGlobalScope":true,"impliedFormat":1},{"version":"6d3261badeb7843d157ef3e6f5d1427d0eeb0af0cf9df84a62cfd29fd47ac86e","affectsGlobalScope":true,"impliedFormat":1},{"version":"195daca651dde22f2167ac0d0a05e215308119a3100f5e6268e8317d05a92526","affectsGlobalScope":true,"impliedFormat":1},{"version":"8b11e4285cd2bb164a4dc09248bdec69e9842517db4ca47c1ba913011e44ff2f","affectsGlobalScope":true,"impliedFormat":1},{"version":"0508571a52475e245b02bc50fa1394065a0a3d05277fbf5120c3784b85651799","affectsGlobalScope":true,"impliedFormat":1},{"version":"8f9af488f510c3015af3cc8c267a9e9d96c4dd38a1fdff0e11dc5a544711415b","affectsGlobalScope":true,"impliedFormat":1},{"version":"fc611fea8d30ea72c6bbfb599c9b4d393ce22e2f5bfef2172534781e7d138104","affectsGlobalScope":true,"impliedFormat":1},{"version":"1ce14b81c5cc821994aa8ec1d42b220dd41b27fcc06373bce3958af7421b77d4","affectsGlobalScope":true,"impliedFormat":1},{"version":"b3a048b3e9302ef9a34ef4ebb9aecfb28b66abb3bce577206a79fee559c230da","affectsGlobalScope":true,"impliedFormat":1},"89fe170d9a59f81cd9a9d95de3278f108ff91491810b2529cc0ffb502a57b6c0","0b4928041c807c01b33b1fa028236df635c52f7acff5a40f2c2d0d677b53428b","5ad2e5b8b17893d0eb1f11a1b6e8c03b17344be03a6a72a624cd38ab05fe4d5c","6a1e553079e654a1771463e9eeb98ea4f7bb4b6417a5237d4fdf9b546d49647f","7f11be86b9ac5c2cd5127cd9d40ccc7694c58868a3157692a153d452fc171525","6e3488ee1183ea915eb43f08aebc5f75e30be25aef1f678d1965324bdd7506e1","c71859d3170823cd9ff0e35c6ebaa44435bfac2737e31cb55d18477abc30013e","a318d8734523d9e750681e7b8e685ef817d4049c5612451f4e849da8b2b572a9","8b52dd8be86f44f871db89a6c1f77f7585688d53141ff55b6c5fac3eb67b1241","beae2d03867dde9fdf8da461c7e7e84da71612842422d4b482ab1c2a15fe6b12","080e7748d9754ccaea8debbc933552c7976c1ef588f9642a6f07e5a4d139d43b","51342c51a9090c0bc8bae60c5ec1a0f46d6d44db84392f12a8cd46e6d8a9f617","ae777307a0baeb9b5d7ba18e6a029a54eb0b612b1491591dcedb020cc8d36f97","d7ba738e316b7baed10ca49cc156b57b8c973b747bec6612e62a925e9f7f33a4","1d5292578fcf0329a43ef19fe2481d7d1cde75e75610019a7897c70dcfff0b31","459b3765e622008ed590474ae6b61ab55107a7b9529a28d05087a6fef51d7248","ce15f7fa66eb0ff73351db6a626a397eb441aa3572707c2a156897c646b2911d","d9c64d02dfe3a9c74da35fdbcc645cf4e8d4ca0f4162ec312de51474103ac3a7","826bb4db9c934b7ae0cb5edb9fde0a73a2d54df89fd8cb8abb0184e6f66727a0",{"version":"1a9ce047747098914ae21808e4c079551d5e591ec5074c30803c62503414ddee","signature":"3cc2bb86121ca1642f81b9714e48f64b8ceec71efff693b2da79bf888d117159"},{"version":"63ae03b463ab38ad47cdd2fdc093bbc0979ac9dc047ac50a4cf34a809104365c","signature":"b5cbeec799640df5ea3a29ae05551d7769ef8a516b32888601df766bb20d258c"},{"version":"fb6f2007d60e8b519a2ef0c5a27026ddfe06418ae6261c4eb0cb670cca5e1bc2","impliedFormat":99},{"version":"a48f1b69ec0b94b16c7ece2cf6d6003cc8d0c329538117c1c364d8525a100850","impliedFormat":99},{"version":"cd5713ac354e4869fdf837e12d24d3ae14fd9d94a5bb2d340df63b899b74e6ca","impliedFormat":99},{"version":"56210599298d6eca6285eab99c7e9333d7e275c3a73a7f401b3055e8d55c67e8","impliedFormat":99},{"version":"2845576622e416da9871e1f3c788ba41dc4f24eb764362b10eceeb0dbaa67208","impliedFormat":99},{"version":"f0421e04e2a5238754cf444bf2a56fe7e7a94a08c14c1f9d063ff51c85825823","impliedFormat":99},{"version":"bdd14f07b4eca0b4b5203b85b8dbc4d084c749fa590bee5ea613e1641dcd3b29","impliedFormat":99},{"version":"967b227fad024ba8a7c32127534089bce5adc800840b0288f44d41c4c849278e","impliedFormat":99},{"version":"ffd229492af3cb444c01e8e51a78dfdbed670940bac40dde083675d57d6984fc","impliedFormat":99},{"version":"57cdef8252cb041b4b646cc9e80dcb27d2180bb78fcf95761136d99be4079cb3","impliedFormat":99},{"version":"eb5fd8d19b0330da4dccb6cab3eae0304f056ac8fbd5bd9589ce48f0920bff78","impliedFormat":99},{"version":"db565a086622cbe616a950186dc90e82a74060864b9cd1d0f25285860daea9b4","impliedFormat":99},{"version":"71087395cc862f52662ab2629a0f3838f8f2aaf84eb40c97f4f4004f2fcbbed6","impliedFormat":99},{"version":"1e2e6cfcab26ae01d7f2dd1f78a1d25ddb7f3b2e27f50c9eb3b54ee206a87884","impliedFormat":99},{"version":"489ec23ef8dc0e869cf3d8d77a39ba83ab24e5e71362320f5662491b3dc5bd04","impliedFormat":99},{"version":"c93dd79fae382105510c69cc8eef95a96c8c43e50b47e16efa98a3f9e76f304b","impliedFormat":99},"4a5b020726455dd70acdf34ccc435273e6333cbb1a3ff08b6c451148c61b21fd","eb4d76417ff2ac49726b2efaf83e5b9924f7040151293d092e1ba38905479a02","3bae912eb95706a507e668cdfe378bb612c81b46323aae337689fabc00c3ae29","129aaa58f8b8ed74d8ef3ab03d3219f1b5a7b2902c4e111e080abdaf043686ef","c0a9cb9a3fe662b66cf598c1e2e6bc799b423699b81249bb62586acbc817b1e7","7d3bbcb2ef65e80202188d77d2e06f30c5d5d2603ca49cde35a6b298565247e9","f90ae41777b29281dcd4aa3fafb9d84c6b328860d639114a8c3fcf36beb23817","eadfe727983087acea4f17095671faba65ba5233acaed7213f140269d4528c9a","6bbe3b367d76debfa83ec26a13d0013f8dad891cddd8909a1fbdcdb719b064d9","9fec96292881b3ee00f9b34d757887223221db25d0fb534b521743e9be298d9f","fbd59a37ab9b1a3a21f2e968b539f91453e560507d9e92748f0623f7118306be","92523b7353d096bd2464e1611035b284803894aa952541021922567dfe9f15aa","49ca23a8e2de57d49da1b5b5aa2f0e0d341b4230a899efe1a6078d3779e2ea53",{"version":"be53d0833468d1d4de05770f4af2d3ec465b7ef5d5181b748997a02bf362ebd0","impliedFormat":99},{"version":"4920f950330f6a8a00a084beb7998de838a15cd54f5c774962b75614c15f8bed","impliedFormat":99},{"version":"e892ea4cf5fc5e5ab078f265c617efa3ab44a1cbd477f91fd29a27698c45eb77","impliedFormat":99},{"version":"6a33bd0416049803becacbdccd852c02f342eedce7dea12956d1176966269eeb","impliedFormat":99},{"version":"f74c6749e3944913d8002c1dd30523c520de426e9113d47b6730565318349154","impliedFormat":99},{"version":"ac5d5fd3358d3f7491400869278ea288df297b4fbc1ba035c7fd09c8df822358","impliedFormat":99},{"version":"0ce13f49afeb385ad05698a5420580c7381d758779b730c1992be7386578e1e7","impliedFormat":99},"8fa74a106f75c2eed4b65fa571e4e9b78e9a3a68f65b6c70261e87f7f47b931d","d82719b8e8a552f66dea370df85e00f9473537bb9c35dcb711d7f48cb5e707cd","a3c435d1e1eb110bb7382103c522bf44e9abb8b6883a493360fc5859db0aee10",{"version":"1e9d1ca15bcdc6379d5335cb50ee3cf2f4b9037892ad1ffa2e501e40877695f6","signature":"fa0c7ba0455e88fa5a339c733dcfb3443e786e6c53faa6baf2eeefe459663796"},{"version":"5a9581d0f0fe0b16a06cc469b7e5f908a1f98f06d48bdebf6ff26598041efe92","signature":"e71cc6e253914585ff1be575db817fdd6d4b92ed619785c32b1ab6d258ddd6f1"},{"version":"cf1c7a87043efac9429511e4334427f809b50bb91a65dfdeb5243a35f197616f","signature":"c833336ea174334b44b03eaaaf9136b6e87d3c165b942751efcc06eee120ea43"},{"version":"366cbf3dd03480c8ef63c9d0f893aeda489e9f3c6f5fc88c5b77fb4f1f95e05d","signature":"f157cd9253cd574d79373f51ffd4e04c804dc0870b0f4448d86b4acbf01a8239"},{"version":"3a582c6e8906f5b094ccf0de6cc6f4f8a54b05a34f52517aba5c9c7f704f6b28","impliedFormat":99},{"version":"0528f6d21f7a02d4092895090d2dd86104bd5a3e79eced96d5a1a7dd90943d17","impliedFormat":99},{"version":"b5ce343886d23392be9c8280e9f24a87f1d7d3667f6672c2fe4aa61fa4ece7d4","impliedFormat":99},{"version":"72ce5b734c05da85c85a6f6dc05823b051d6aa41acaedeeb1d17c72f3b4efa72","impliedFormat":99},{"version":"b0857bb28fd5236ace84280f79a25093f919fd0eff13e47cc26ea03de60a7294","impliedFormat":99},{"version":"5e43e0824f10cd8c48e7a8c5c673638488925a12c31f0f9e0957965c290eb14c","impliedFormat":99},{"version":"ef13c73d6157a32933c612d476c1524dd674cf5b9a88571d7d6a0d147544d529","impliedFormat":99},{"version":"3b0a56d056d81a011e484b9c05d5e430711aaecd561a788bad1d0498aad782c7","impliedFormat":99},{"version":"9443967db823b66d1682be7fc66392be7c7924e10c3e54900f456341e94591a6","impliedFormat":99},{"version":"424f71d1fae96ac2e878af92345bb87bea1d29f757228fbc190133b305643f2c","impliedFormat":99},{"version":"61bb64660ee150f3ab618340e15cca0a81664801bede7c966ca0eca3a952fe63","impliedFormat":99},{"version":"3b89216a7e38a454985ad17bb2ff85792837dc812f2a89fa5f60ad0a2e216fa7","impliedFormat":99},{"version":"16fe60bb544cfedfd2b5bb2f7d0b3957be7978706d57d9f06edc9c0c8dbdba23","impliedFormat":99},{"version":"82179358c2d9d7347f1602dc9300039a2250e483137b38ebf31d4d2e5519c181","impliedFormat":99},{"version":"4e003c868b0d8f8ad200b96cbc653e18e513fa23e1c19c4fe3cc25d4394efc47","impliedFormat":99},{"version":"605450898939e8abce51e8085a41b60640278337a969c33cd6b169e7c4f9c3f2","impliedFormat":99},{"version":"42a12f2faa483c9b48195ed794d22698162274e755f6e07219c2351c4f08d732","impliedFormat":99},{"version":"ec0c42bb0f465e4993f2bc68a6ce9df9a2dcbc7b83e21748f82f1b69561938e3","impliedFormat":99},{"version":"f50ff37a9cbbe74475f426474d9827083c7c2c138a954d28f1690df338f69291","impliedFormat":99},{"version":"61fd6c17235d530c40f543dd7c40afab091d91c1ef890baeed30db6d82b04b28","impliedFormat":99},{"version":"bcbd3becd08b4515225880abea0dbfbbf0d1181ce3af8f18f72f61edbe4febfb","impliedFormat":99},{"version":"091767bc841f937654ed597d49e023ed59850355e746ae1a6f20ab31076ee1fb","impliedFormat":99},{"version":"19c6d6135af59693698d384050b45a8a049493500add442f58e4bd7c8a255ab6","impliedFormat":99},{"version":"6a0dba12d55314638a8c51108b20fe2f68f1364a619d098918bda91c22dec154","impliedFormat":99},{"version":"c76c02846ba7d40b9b3488f0e8d75d02cbdee2f0bc5fcd55dd3bd2e1457646ea","impliedFormat":99},{"version":"4ead13a482c539b77394b2a97e3b877b809eac596390371cea490286f53b996a","impliedFormat":99},{"version":"06db2f8ba1d1dfacf04529cb731081ab23f133f29c7608ebdfbcab356996827c","impliedFormat":99},{"version":"427fe2004642504828c1476d0af4270e6ad4db6de78c0b5da3e4c5ca95052a99","impliedFormat":1},{"version":"2eeffcee5c1661ddca53353929558037b8cf305ffb86a803512982f99bcab50d","impliedFormat":99},{"version":"9afb4cb864d297e4092a79ee2871b5d3143ea14153f62ef0bb04ede25f432030","affectsGlobalScope":true,"impliedFormat":99},{"version":"5c935b7fc4ddc1410ea1cd7cd4e35ed106a6e4920dd27a9480a40fd224359dc3","affectsGlobalScope":true,"impliedFormat":99},{"version":"ed9bb55ddcbebd5cb3eee991f57ff21438546ee40ee1c310281bd12a6c7cf65b","impliedFormat":99},{"version":"69bf2422313487956e4dacf049f30cb91b34968912058d244cb19e4baa24da97","impliedFormat":99},{"version":"6987dfb4b0c4e02112cc4e548e7a77b3d9ddfeffa8c8a2db13ceac361a4567d9","impliedFormat":99},{"version":"4ffba3c5848b4fe62ee59b754fd5f256ad9656a0db6d37b9a2a8cb40dfc7ac21","impliedFormat":99},{"version":"c76c02846ba7d40b9b3488f0e8d75d02cbdee2f0bc5fcd55dd3bd2e1457646ea","impliedFormat":99},{"version":"5e2ba3d18d78aebbde1f34bde356e41e9c76eeaeaeee56a37036596a9eff4211","impliedFormat":99},{"version":"8280ae8ccc0493b32d1742d585357ab9f0a508ea050af25a5a20d64010d0a5cf","impliedFormat":99},{"version":"7adfd9f9056ecd4ae6c65fde2a98654960c662714c73f048478959d04c09e144","impliedFormat":99},{"version":"32b35cf0dc3a1b1a7118b61c34ce2ad1a29695851679f9ec34e0776f2ece2a69","impliedFormat":99},{"version":"b413fbc6658fe2774f8bf9a15cf4c53e586fc38a2d5256b3b9647da242c14389","impliedFormat":99},{"version":"59e5e964b84fdb2378e9455e4e59405030e4ed2b4c6f891ce395f17796af3cbb","impliedFormat":99},{"version":"c30a41267fc04c6518b17e55dcb2b810f267af4314b0b6d7df1c33a76ce1b330","impliedFormat":1},{"version":"72422d0bac4076912385d0c10911b82e4694fc106e2d70added091f88f0824ba","impliedFormat":1},{"version":"da251b82c25bee1d93f9fd80c5a61d945da4f708ca21285541d7aff83ecb8200","impliedFormat":1},{"version":"64db14db2bf37ac089766fdb3c7e1160fabc10e9929bc2deeede7237e4419fc8","impliedFormat":1},{"version":"98b94085c9f78eba36d3d2314affe973e8994f99864b8708122750788825c771","impliedFormat":1},{"version":"90ba95a763101bb61b8a799731a2ed60b5016b8135c1a2d5186862d4b534d4a1","impliedFormat":99},{"version":"d5ba81ec74eb553e30d28d96b58f35097acf0260fa5c5bfec1642a36eb61880e","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},{"version":"4fcdf89e05eb3a7de69efd7be75416e0192ee917211362882b8c58456be5ffee","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"}],"root":[79,80,[120,123],172,173],"options":{"composite":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":true,"exactOptionalPropertyTypes":true,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitOverride":true,"noImplicitReturns":true,"noUncheckedIndexedAccess":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../src","skipLibCheck":true,"strict":true,"target":9,"tsBuildInfoFile":"./.tsbuildinfo","useDefineForClassFields":true,"verbatimModuleSyntax":true},"referencedMap":[[113,1],[112,2],[114,3],[111,4],[116,5],[110,6],[94,7],[92,8],[91,9],[96,10],[93,11],[90,8],[89,9],[95,11],[88,12],[86,13],[153,14],[154,15],[161,16],[162,17],[133,18],[132,19],[155,18],[140,20],[142,21],[141,22],[149,23],[131,24],[125,25],[127,26],[129,27],[130,25],[168,28],[170,29],[169,30],[167,31],[136,32],[139,33],[137,32],[138,34],[157,35],[147,36],[143,37],[144,20],[164,38],[158,39],[145,40],[163,41],[146,42],[171,43],[165,44],[172,45],[173,46],[80,47],[123,48],[120,49],[121,50],[122,51],[79,52],[109,53],[119,54],[118,55],[117,53],[99,56],[100,57],[98,57],[108,58],[103,57],[104,57],[105,57],[106,57],[107,59],[63,60],[68,61],[64,62],[74,63],[76,64],[69,64],[77,65],[78,66],[66,67],[65,68],[72,69],[71,70],[75,71]],"latestChangedDtsFile":"./__tests__/transport.test.d.ts","version":"6.0.3"}
|
package/dist/errors.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ActivityId } from './types';
|
|
2
|
+
export type IntelligenceErrorCode = 'intelligence-invalid-request' | 'intelligence-session-provider-mismatch' | 'intelligence-capacity-exceeded' | 'intelligence-activity-not-found' | 'intelligence-provider-failed' | 'intelligence-output-overflow' | 'intelligence-closed';
|
|
2
3
|
export interface IntelligenceErrorDetailMap {
|
|
3
4
|
readonly 'intelligence-invalid-request': {
|
|
4
5
|
readonly field: 'input';
|
|
@@ -25,7 +26,6 @@ export interface IntelligenceErrorDetailMap {
|
|
|
25
26
|
};
|
|
26
27
|
readonly 'intelligence-closed': Readonly<Record<string, never>>;
|
|
27
28
|
}
|
|
28
|
-
export type IntelligenceErrorCode = keyof IntelligenceErrorDetailMap;
|
|
29
29
|
export type IntelligenceErrorDetailFor<C extends IntelligenceErrorCode> = IntelligenceErrorDetailMap[C];
|
|
30
30
|
export declare const INTELLIGENCE_EXPECTED: Readonly<Record<IntelligenceErrorCode, string>>;
|
|
31
31
|
export declare const INTELLIGENCE_ERROR_HINTS: Readonly<Record<IntelligenceErrorCode, string>>;
|
package/dist/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EA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,QAAQ,EAAE,MAAM,CAAC;QAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;KAClC;CACF,CAAC,qBAAqB,CAAC,CAAC;AAEzB,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,iBAAiB,GAAG,mBAAmB,CAqBjF;AAED,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,iBAAiB,CAKnF"}
|
package/dist/index.mjs
CHANGED
|
@@ -181,13 +181,7 @@ var IntelligenceRuntime = class {
|
|
|
181
181
|
terminal: false
|
|
182
182
|
};
|
|
183
183
|
this.records.set(submission.id, record);
|
|
184
|
-
|
|
185
|
-
try {
|
|
186
|
-
started = this.provider.start(submission, this.createSink(record));
|
|
187
|
-
} catch (cause) {
|
|
188
|
-
this.records.delete(submission.id);
|
|
189
|
-
return err(providerError(this.providerId, cause));
|
|
190
|
-
}
|
|
184
|
+
const started = this.provider.start(submission, this.createSink(record));
|
|
191
185
|
if (!started.ok) {
|
|
192
186
|
this.records.delete(submission.id);
|
|
193
187
|
return started;
|
|
@@ -219,11 +213,7 @@ var IntelligenceRuntime = class {
|
|
|
219
213
|
})
|
|
220
214
|
);
|
|
221
215
|
}
|
|
222
|
-
|
|
223
|
-
return this.provider.cancel(activity);
|
|
224
|
-
} catch (cause) {
|
|
225
|
-
return err(providerError(this.providerId, cause));
|
|
226
|
-
}
|
|
216
|
+
return this.provider.cancel(activity);
|
|
227
217
|
}
|
|
228
218
|
close() {
|
|
229
219
|
this.closeTask ??= this.performClose();
|
|
@@ -311,10 +301,7 @@ var IntelligenceRuntime = class {
|
|
|
311
301
|
});
|
|
312
302
|
if (record.events.length >= this.limits.maxPendingEventsPerActivity) record.events.pop();
|
|
313
303
|
this.push(record, { type: "failed", error: intelligenceFailure(error) });
|
|
314
|
-
|
|
315
|
-
this.provider.cancel(record.ref.id);
|
|
316
|
-
} catch {
|
|
317
|
-
}
|
|
304
|
+
this.provider.cancel(record.ref.id);
|
|
318
305
|
}
|
|
319
306
|
push(record, event) {
|
|
320
307
|
record.sequence += 1;
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/errors.ts","../src/plugin.ts","../src/types.ts","../src/runtime.ts","../src/transport.ts"],"names":["err","ok"],"mappings":";;;AAwBA,IAAM,MAAA,GAAS;AAAA,EACb,8BAAA,EAAgC;AAAA,IAC9B,QAAA,EAAU,uEAAA;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,wCAAA,EAA0C;AAAA,IACxC,QAAA,EAAU,qEAAA;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,gCAAA,EAAkC;AAAA,IAChC,QAAA,EAAU,8EAAA;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,iCAAA,EAAmC;AAAA,IACjC,QAAA,EAAU,mEAAA;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,8BAAA,EAAgC;AAAA,IAC9B,QAAA,EAAU,oEAAA;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,8BAAA,EAAgC;AAAA,IAC9B,QAAA,EAAU,kFAAA;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,qBAAA,EAAuB;AAAA,IACrB,QAAA,EAAU,wEAAA;AAAA,IACV,IAAA,EAAM;AAAA;AAEV,CAAA;AAEO,IAAM,wBAAwB,MAAA,CAAO,WAAA;AAAA,EAC1C,MAAA,CAAO,OAAA,CAAQ,MAAM,CAAA,CAAE,IAAI,CAAC,CAAC,IAAA,EAAM,KAAK,CAAA,KAAM,CAAC,IAAA,EAAM,KAAA,CAAM,QAAQ,CAAC;AACtE;AAEO,IAAM,2BAA2B,MAAA,CAAO,WAAA;AAAA,EAC7C,MAAA,CAAO,OAAA,CAAQ,MAAM,CAAA,CAAE,IAAI,CAA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B,IAAA,IAAI,IAAA,CAAK,SAAA,KAAc,MAAA,EAAW,OAAO,IAAA,CAAK,SAAA;AAC9C,IAAA,IAAA,CAAK,MAAA,GAAS,IAAA;AACd,IAAA,IAAA,CAAK,SAAA,GAAY,IAAI,OAAA,CAAQ,CAAC,OAAA,KAAY;AACxC,MAAA,IAAA,CAAK,YAAA,GAAe,OAAA;AACpB,MAAA,IAAA,CAAK,IAAA,CAAK,WAAA,CAAY,EAAE,IAAA,EAAM,sBAAsB,CAAA;AAAA,IACtD,CAAC,CAAA;AACD,IAAA,OAAO,IAAA,CAAK,SAAA;AAAA,EACd;AACF;AAEO,SAAS,4BAAA,CACd,UAAA,EACA,IAAA,EACA,OAAA,GAAsC,EAAC,EACf;AACxB,EAAA,OAAO,IAAI,sBAAA,CAAuB,UAAA,EAAY,IAAA,EAAM,OAAO,CAAA;AAC7D","file":"index.mjs","sourcesContent":["import type { ActivityId } from './types';\n\nexport interface IntelligenceErrorDetailMap {\n readonly 'intelligence-invalid-request': { readonly field: 'input'; readonly reason: string };\n readonly 'intelligence-session-provider-mismatch': {\n readonly expectedProviderId: string;\n readonly receivedProviderId: string;\n };\n readonly 'intelligence-capacity-exceeded': { readonly limit: number };\n readonly 'intelligence-activity-not-found': { readonly activityId: ActivityId };\n readonly 'intelligence-provider-failed': { readonly providerId: string; readonly cause: unknown };\n readonly 'intelligence-output-overflow': {\n readonly activityId: ActivityId;\n readonly bound: 'output-chars' | 'pending-events';\n readonly limit: number;\n };\n readonly 'intelligence-closed': Readonly<Record<string, never>>;\n}\n\nexport type IntelligenceErrorCode = keyof IntelligenceErrorDetailMap;\n\nexport type IntelligenceErrorDetailFor<C extends IntelligenceErrorCode> =\n IntelligenceErrorDetailMap[C];\n\nconst policy = {\n 'intelligence-invalid-request': {\n expected: 'activity input must be a non-empty string within the configured bound',\n hint: 'validate and bound player input before submitting the activity',\n },\n 'intelligence-session-provider-mismatch': {\n expected: 'a session reference must be resumed by the provider that created it',\n hint: 'discard the incompatible session or select its original provider',\n },\n 'intelligence-capacity-exceeded': {\n expected: 'active intelligence work must remain within the configured concurrency bound',\n hint: 'wait for an activity to finish or raise the explicit provider capacity',\n },\n 'intelligence-activity-not-found': {\n expected: 'the activity must still be running when cancellation is requested',\n hint: 'ignore an already observed terminal activity or retain the correct ActivityId',\n },\n 'intelligence-provider-failed': {\n expected: 'the selected provider must complete or report a structured failure',\n hint: 'inspect detail.cause and provider configuration, then retry or select another provider',\n },\n 'intelligence-output-overflow': {\n expected: 'incremental and final output must remain within configured queue and text bounds',\n hint: 'consume events every frame or raise the explicit bound for this application',\n },\n 'intelligence-closed': {\n expected: 'the intelligence service must be open for submit and cancel operations',\n hint: 'create a new service after its Cordis realm or owner has been disposed',\n },\n} satisfies Record<IntelligenceErrorCode, { readonly expected: string; readonly hint: string }>;\n\nexport const INTELLIGENCE_EXPECTED = Object.fromEntries(\n Object.entries(policy).map(([code, value]) => [code, value.expected]),\n) as Readonly<Record<IntelligenceErrorCode, string>>;\n\nexport const INTELLIGENCE_ERROR_HINTS = Object.fromEntries(\n Object.entries(policy).map(([code, value]) => [code, value.hint]),\n) as Readonly<Record<IntelligenceErrorCode, string>>;\n\nclass IntelligenceErrorClass extends Error {\n readonly code: IntelligenceErrorCode;\n readonly expected: string;\n readonly hint: string;\n readonly detail: IntelligenceErrorDetailFor<IntelligenceErrorCode>;\n\n constructor(args: {\n code: IntelligenceErrorCode;\n detail: IntelligenceErrorDetailFor<IntelligenceErrorCode>;\n }) {\n const selected = policy[args.code];\n super(\n `[IntelligenceError ${args.code}] expected: ${selected.expected}; hint: ${selected.hint}`,\n );\n this.name = 'IntelligenceError';\n this.code = args.code;\n this.expected = selected.expected;\n this.hint = selected.hint;\n this.detail = args.detail;\n }\n}\n\ntype IntelligenceErrorVariant<C extends IntelligenceErrorCode> = IntelligenceErrorClass & {\n readonly code: C;\n readonly detail: IntelligenceErrorDetailFor<C>;\n};\n\nexport type IntelligenceError = {\n [C in IntelligenceErrorCode]: IntelligenceErrorVariant<C>;\n}[IntelligenceErrorCode];\n\ninterface IntelligenceErrorConstructor {\n new <C extends IntelligenceErrorCode>(args: {\n code: C;\n detail: IntelligenceErrorDetailFor<C>;\n }): IntelligenceErrorVariant<C>;\n readonly prototype: IntelligenceErrorClass;\n}\n\nexport const IntelligenceError: IntelligenceErrorConstructor =\n IntelligenceErrorClass as unknown as IntelligenceErrorConstructor;\n\ntype PodDetailMap = Omit<IntelligenceErrorDetailMap, 'intelligence-provider-failed'> & {\n readonly 'intelligence-provider-failed': { readonly providerId: string; readonly cause: string };\n};\n\nexport type IntelligenceFailure = {\n [C in IntelligenceErrorCode]: {\n readonly code: C;\n readonly expected: string;\n readonly hint: string;\n readonly detail: PodDetailMap[C];\n };\n}[IntelligenceErrorCode];\n\nexport function intelligenceFailure(error: IntelligenceError): IntelligenceFailure {\n if (error.code === 'intelligence-provider-failed') {\n return {\n code: error.code,\n expected: error.expected,\n hint: error.hint,\n detail: {\n providerId: error.detail.providerId,\n cause:\n error.detail.cause instanceof Error\n ? error.detail.cause.message\n : String(error.detail.cause),\n },\n };\n }\n return {\n code: error.code,\n expected: error.expected,\n hint: error.hint,\n detail: error.detail,\n } as IntelligenceFailure;\n}\n\nexport function providerError(providerId: string, cause: unknown): IntelligenceError {\n return new IntelligenceError({\n code: 'intelligence-provider-failed',\n detail: { providerId, cause },\n });\n}\n","import type { Plugin } from '@forgeax/engine-plugin';\nimport type { IntelligenceService } from './types';\n\ndeclare module '@forgeax/engine-plugin' {\n interface EngineContextServices {\n intelligence?: IntelligenceService;\n }\n}\n\n/** Install one optional intelligence service and bind its lifetime to this Cordis Fiber. */\nexport function intelligencePlugin(service: IntelligenceService): Plugin {\n return {\n name: 'intelligence',\n provide: 'intelligence',\n apply(ctx) {\n ctx.provide('intelligence', service);\n ctx.effect(() => () => service.close(), 'intelligence/service');\n },\n };\n}\n","import type { Result } from '@forgeax/engine-types';\nimport type { IntelligenceError, IntelligenceFailure } from './errors';\n\ndeclare const activityIdBrand: unique symbol;\n\n/** Opaque identity of one bounded asynchronous operation. */\nexport type ActivityId = string & { readonly [activityIdBrand]: true };\n\n/** Provider-scoped durable conversation identity. */\nexport interface SessionRef {\n readonly providerId: string;\n readonly id: string;\n}\n\nexport interface ActivityRef {\n readonly id: ActivityId;\n readonly session: SessionRef;\n}\n\nexport interface ActivityRequest {\n readonly input: string;\n readonly session?: SessionRef;\n}\n\n/** Fully identified request used by realm transports and provider dispatch. */\nexport interface ActivitySubmission extends ActivityRef {\n readonly input: string;\n}\n\nexport type ActivityEvent =\n | {\n readonly type: 'text-delta';\n readonly activityId: ActivityId;\n readonly sequence: number;\n readonly text: string;\n }\n | {\n readonly type: 'completed';\n readonly activityId: ActivityId;\n readonly sequence: number;\n readonly session: SessionRef;\n readonly output: string;\n }\n | {\n readonly type: 'failed';\n readonly activityId: ActivityId;\n readonly sequence: number;\n readonly error: IntelligenceFailure;\n }\n | {\n readonly type: 'cancelled';\n readonly activityId: ActivityId;\n readonly sequence: number;\n };\n\nexport interface ActivitySink {\n text(text: string): void;\n complete(output: string): void;\n fail(cause: unknown): void;\n cancelled(): void;\n}\n\n/** Provider implementation boundary. It never receives World or Renderer authority. */\nexport interface IntelligenceProvider {\n readonly id: string;\n start(submission: ActivitySubmission, sink: ActivitySink): Result<void, IntelligenceError>;\n cancel(activityId: ActivityId): Result<void, IntelligenceError>;\n close(): Promise<void>;\n}\n\n/** Frame-safe consumer surface. No method waits for provider work. */\nexport interface IntelligenceService {\n readonly providerId: string;\n submit(request: ActivityRequest): Result<ActivityRef, IntelligenceError>;\n poll(maxEvents?: number): readonly ActivityEvent[];\n cancel(activityId: ActivityId): Result<void, IntelligenceError>;\n close(): Promise<void>;\n}\n\nexport interface IntelligenceLimits {\n readonly maxInputChars: number;\n readonly maxOutputChars: number;\n readonly maxConcurrentActivities: number;\n readonly maxPendingEventsPerActivity: number;\n readonly maxPollEvents: number;\n}\n\nexport const DEFAULT_INTELLIGENCE_LIMITS: IntelligenceLimits = {\n maxInputChars: 16_384,\n maxOutputChars: 65_536,\n maxConcurrentActivities: 8,\n maxPendingEventsPerActivity: 256,\n maxPollEvents: 64,\n};\n\nexport interface IntelligenceRuntimeOptions {\n readonly limits?: Partial<IntelligenceLimits>;\n readonly createActivityId?: () => ActivityId;\n readonly createSessionId?: () => string;\n}\n\nexport function activityId(value: string): ActivityId {\n return value as ActivityId;\n}\n","import { err, ok, type Result } from '@forgeax/engine-types';\nimport { IntelligenceError, intelligenceFailure, providerError } from './errors';\nimport {\n type ActivityEvent,\n type ActivityId,\n type ActivityRef,\n type ActivityRequest,\n type ActivitySink,\n type ActivitySubmission,\n activityId,\n DEFAULT_INTELLIGENCE_LIMITS,\n type IntelligenceLimits,\n type IntelligenceProvider,\n type IntelligenceRuntimeOptions,\n type IntelligenceService,\n} from './types';\n\ninterface ActivityRecord {\n readonly ref: ActivityRef;\n readonly events: ActivityEvent[];\n sequence: number;\n outputChars: number;\n terminal: boolean;\n}\n\nlet fallbackIdentity = 0;\n\nfunction nextIdentity(prefix: string): string {\n const uuid = globalThis.crypto?.randomUUID?.();\n if (uuid !== undefined) return `${prefix}-${uuid}`;\n fallbackIdentity += 1;\n return `${prefix}-${Date.now().toString(36)}-${fallbackIdentity.toString(36)}`;\n}\n\nexport function resolveIntelligenceLimits(\n overrides: Partial<IntelligenceLimits> | undefined,\n): IntelligenceLimits {\n const limits = { ...DEFAULT_INTELLIGENCE_LIMITS, ...overrides };\n for (const [name, value] of Object.entries(limits)) {\n if (!Number.isInteger(value) || value <= 0) {\n throw new RangeError(`${name} must be a positive integer`);\n }\n }\n if (limits.maxPendingEventsPerActivity < 2) {\n throw new RangeError(\n 'maxPendingEventsPerActivity must reserve at least one data and terminal event',\n );\n }\n return limits;\n}\n\nexport class IntelligenceRuntime implements IntelligenceService {\n readonly providerId: string;\n readonly limits: IntelligenceLimits;\n private readonly records = new Map<ActivityId, ActivityRecord>();\n private readonly createActivityId: () => ActivityId;\n private readonly createSessionId: () => string;\n private closed = false;\n private closeTask: Promise<void> | undefined;\n\n constructor(\n private readonly provider: IntelligenceProvider,\n options: IntelligenceRuntimeOptions = {},\n ) {\n this.providerId = provider.id;\n this.limits = resolveIntelligenceLimits(options.limits);\n this.createActivityId =\n options.createActivityId ?? (() => activityId(nextIdentity('activity')));\n this.createSessionId = options.createSessionId ?? (() => nextIdentity('session'));\n }\n\n submit(request: ActivityRequest): Result<ActivityRef, IntelligenceError> {\n const validated = this.validateRequest(request);\n if (!validated.ok) return validated;\n const ref: ActivityRef = {\n id: this.createActivityId(),\n session: request.session ?? { providerId: this.providerId, id: this.createSessionId() },\n };\n const accepted = this.accept({ ...ref, input: request.input });\n return accepted.ok ? ok(ref) : accepted;\n }\n\n /** Accept an already identified request from a realm transport. */\n accept(submission: ActivitySubmission): Result<void, IntelligenceError> {\n const validated = this.validateRequest({\n input: submission.input,\n session: submission.session,\n });\n if (!validated.ok) return validated;\n if (this.records.has(submission.id)) {\n return err(\n providerError(this.providerId, `duplicate activity identity: ${String(submission.id)}`),\n );\n }\n if (this.runningCount >= this.limits.maxConcurrentActivities) {\n return err(\n new IntelligenceError({\n code: 'intelligence-capacity-exceeded',\n detail: { limit: this.limits.maxConcurrentActivities },\n }),\n );\n }\n const record: ActivityRecord = {\n ref: { id: submission.id, session: submission.session },\n events: [],\n sequence: 0,\n outputChars: 0,\n terminal: false,\n };\n this.records.set(submission.id, record);\n let started: Result<void, IntelligenceError>;\n try {\n started = this.provider.start(submission, this.createSink(record));\n } catch (cause) {\n this.records.delete(submission.id);\n return err(providerError(this.providerId, cause));\n }\n if (!started.ok) {\n this.records.delete(submission.id);\n return started;\n }\n return ok(undefined);\n }\n\n poll(maxEvents = this.limits.maxPollEvents): readonly ActivityEvent[] {\n if (!Number.isInteger(maxEvents) || maxEvents <= 0) return [];\n const bounded = Math.min(maxEvents, this.limits.maxPollEvents);\n const events: ActivityEvent[] = [];\n for (const [id, record] of this.records) {\n while (record.events.length > 0 && events.length < bounded) {\n const event = record.events.shift();\n if (event !== undefined) events.push(event);\n }\n if (record.terminal && record.events.length === 0) this.records.delete(id);\n if (events.length === bounded) break;\n }\n return events;\n }\n\n cancel(activity: ActivityId): Result<void, IntelligenceError> {\n if (this.closed) return err(this.closedError());\n const record = this.records.get(activity);\n if (record === undefined || record.terminal) {\n return err(\n new IntelligenceError({\n code: 'intelligence-activity-not-found',\n detail: { activityId: activity },\n }),\n );\n }\n try {\n return this.provider.cancel(activity);\n } catch (cause) {\n return err(providerError(this.providerId, cause));\n }\n }\n\n close(): Promise<void> {\n this.closeTask ??= this.performClose();\n return this.closeTask;\n }\n\n private async performClose(): Promise<void> {\n this.closed = true;\n await this.provider.close();\n this.records.clear();\n }\n\n private get runningCount(): number {\n let count = 0;\n for (const record of this.records.values()) if (!record.terminal) count += 1;\n return count;\n }\n\n private validateRequest(request: ActivityRequest): Result<void, IntelligenceError> {\n if (this.closed) return err(this.closedError());\n if (request.input.length === 0 || request.input.length > this.limits.maxInputChars) {\n return err(\n new IntelligenceError({\n code: 'intelligence-invalid-request',\n detail: {\n field: 'input',\n reason:\n request.input.length === 0\n ? 'input is empty'\n : `input exceeds ${this.limits.maxInputChars} characters`,\n },\n }),\n );\n }\n if (request.session !== undefined && request.session.providerId !== this.providerId) {\n return err(\n new IntelligenceError({\n code: 'intelligence-session-provider-mismatch',\n detail: {\n expectedProviderId: this.providerId,\n receivedProviderId: request.session.providerId,\n },\n }),\n );\n }\n return ok(undefined);\n }\n\n private createSink(record: ActivityRecord): ActivitySink {\n return {\n text: (text) => {\n if (record.terminal || text.length === 0) return;\n if (record.outputChars + text.length > this.limits.maxOutputChars) {\n this.overflow(record, 'output-chars', this.limits.maxOutputChars);\n return;\n }\n if (record.events.length >= this.limits.maxPendingEventsPerActivity - 1) {\n this.overflow(record, 'pending-events', this.limits.maxPendingEventsPerActivity);\n return;\n }\n record.outputChars += text.length;\n this.push(record, { type: 'text-delta', text });\n },\n complete: (output) => {\n if (record.terminal) return;\n if (output.length > this.limits.maxOutputChars) {\n this.overflow(record, 'output-chars', this.limits.maxOutputChars);\n return;\n }\n record.terminal = true;\n this.push(record, { type: 'completed', session: record.ref.session, output });\n },\n fail: (cause) => {\n if (record.terminal) return;\n record.terminal = true;\n const error = providerError(this.providerId, cause);\n this.push(record, { type: 'failed', error: intelligenceFailure(error) });\n },\n cancelled: () => {\n if (record.terminal) return;\n record.terminal = true;\n this.push(record, { type: 'cancelled' });\n },\n };\n }\n\n private overflow(\n record: ActivityRecord,\n bound: 'output-chars' | 'pending-events',\n limit: number,\n ): void {\n if (record.terminal) return;\n record.terminal = true;\n const error = new IntelligenceError({\n code: 'intelligence-output-overflow',\n detail: { activityId: record.ref.id, bound, limit },\n });\n if (record.events.length >= this.limits.maxPendingEventsPerActivity) record.events.pop();\n this.push(record, { type: 'failed', error: intelligenceFailure(error) });\n try {\n this.provider.cancel(record.ref.id);\n } catch {\n // The overflow terminal already owns the activity outcome.\n }\n }\n\n private push(\n record: ActivityRecord,\n event:\n | { readonly type: 'text-delta'; readonly text: string }\n | {\n readonly type: 'completed';\n readonly session: ActivityRef['session'];\n readonly output: string;\n }\n | { readonly type: 'failed'; readonly error: ReturnType<typeof intelligenceFailure> }\n | { readonly type: 'cancelled' },\n ): void {\n record.sequence += 1;\n record.events.push({\n ...event,\n activityId: record.ref.id,\n sequence: record.sequence,\n } as ActivityEvent);\n }\n\n private closedError(): IntelligenceError {\n return new IntelligenceError({ code: 'intelligence-closed', detail: {} });\n }\n}\n\nexport function createIntelligenceRuntime(\n provider: IntelligenceProvider,\n options: IntelligenceRuntimeOptions = {},\n): IntelligenceRuntime {\n return new IntelligenceRuntime(provider, options);\n}\n","import { err, ok, type Result } from '@forgeax/engine-types';\nimport { IntelligenceError } from './errors';\nimport { type IntelligenceRuntime, resolveIntelligenceLimits } from './runtime';\nimport {\n type ActivityEvent,\n type ActivityId,\n type ActivityRef,\n type ActivityRequest,\n type ActivitySubmission,\n activityId,\n type IntelligenceLimits,\n type IntelligenceRuntimeOptions,\n type IntelligenceService,\n} from './types';\n\nexport type IntelligenceHostCommand =\n | { readonly kind: 'intelligence-submit'; readonly submission: ActivitySubmission }\n | { readonly kind: 'intelligence-poll'; readonly maxEvents: number }\n | { readonly kind: 'intelligence-cancel'; readonly activityId: ActivityId }\n | { readonly kind: 'intelligence-close' };\n\nexport type IntelligenceRealmMessage =\n | { readonly kind: 'intelligence-events'; readonly events: readonly ActivityEvent[] }\n | { readonly kind: 'intelligence-closed' }\n | {\n readonly kind: 'intelligence-rejected';\n readonly activityId: ActivityId;\n readonly error: import('./errors').IntelligenceFailure;\n };\n\nexport interface IntelligenceMessagePort {\n postMessage(message: IntelligenceHostCommand | IntelligenceRealmMessage): void;\n addEventListener(\n type: 'message',\n listener: (event: MessageEvent<IntelligenceHostCommand | IntelligenceRealmMessage>) => void,\n ): void;\n removeEventListener(\n type: 'message',\n listener: (event: MessageEvent<IntelligenceHostCommand | IntelligenceRealmMessage>) => void,\n ): void;\n start?(): void;\n close(): void;\n}\n\nexport interface IntelligencePortBinding {\n close(): Promise<void>;\n}\n\n/** Bind a Host-owned runtime to the realm side of a MessageChannel. */\nexport function bindIntelligencePort(\n port: IntelligenceMessagePort,\n runtime: IntelligenceRuntime,\n): IntelligencePortBinding {\n let closed = false;\n const listener = (\n event: MessageEvent<IntelligenceHostCommand | IntelligenceRealmMessage>,\n ): void => {\n const message = event.data;\n if (message.kind === 'intelligence-submit') {\n const accepted = runtime.accept(message.submission);\n if (!accepted.ok) {\n const failure = importFailure(accepted.error);\n port.postMessage({\n kind: 'intelligence-rejected',\n activityId: message.submission.id,\n error: failure,\n });\n }\n return;\n }\n if (message.kind === 'intelligence-poll') {\n port.postMessage({ kind: 'intelligence-events', events: runtime.poll(message.maxEvents) });\n return;\n }\n if (message.kind === 'intelligence-cancel') {\n runtime.cancel(message.activityId);\n return;\n }\n if (message.kind === 'intelligence-close') void close(true);\n };\n const close = async (notifyRealm = false): Promise<void> => {\n if (closed) return;\n closed = true;\n port.removeEventListener('message', listener);\n await runtime.close();\n if (notifyRealm) {\n port.postMessage({ kind: 'intelligence-closed' });\n setTimeout(() => port.close(), 0);\n } else {\n port.close();\n }\n };\n port.addEventListener('message', listener);\n port.start?.();\n return { close };\n}\n\nfunction importFailure(error: import('./errors').IntelligenceError) {\n if (error.code === 'intelligence-provider-failed') {\n return {\n code: error.code,\n expected: error.expected,\n hint: error.hint,\n detail: {\n providerId: error.detail.providerId,\n cause:\n error.detail.cause instanceof Error\n ? error.detail.cause.message\n : String(error.detail.cause),\n },\n } as const;\n }\n return {\n code: error.code,\n expected: error.expected,\n hint: error.hint,\n detail: error.detail,\n } as import('./errors').IntelligenceFailure;\n}\n\nlet portIdentity = 0;\n\nfunction nextPortIdentity(prefix: string): string {\n const uuid = globalThis.crypto?.randomUUID?.();\n if (uuid !== undefined) return `${prefix}-${uuid}`;\n portIdentity += 1;\n return `${prefix}-${portIdentity}`;\n}\n\n/** Worker/main-realm client. Polling is request/response and never awaits a Host provider. */\nexport class IntelligencePortClient implements IntelligenceService {\n readonly limits: IntelligenceLimits;\n private readonly received: ActivityEvent[] = [];\n private readonly active = new Set<ActivityId>();\n private readonly rejected = new Map<\n ActivityId,\n IntelligenceRealmMessage & { kind: 'intelligence-rejected' }\n >();\n private readonly createActivityId: () => ActivityId;\n private readonly createSessionId: () => string;\n private readonly listener: (\n event: MessageEvent<IntelligenceHostCommand | IntelligenceRealmMessage>,\n ) => void;\n private closed = false;\n private pollPending = false;\n private closeTask: Promise<void> | undefined;\n private closeResolve: (() => void) | undefined;\n\n constructor(\n readonly providerId: string,\n private readonly port: IntelligenceMessagePort,\n options: IntelligenceRuntimeOptions = {},\n ) {\n this.limits = resolveIntelligenceLimits(options.limits);\n this.createActivityId =\n options.createActivityId ?? (() => activityId(nextPortIdentity('activity')));\n this.createSessionId = options.createSessionId ?? (() => nextPortIdentity('session'));\n this.listener = (event) => {\n const message = event.data;\n if (message.kind === 'intelligence-events') {\n this.pollPending = false;\n for (const item of message.events) {\n this.received.push(item);\n if (item.type !== 'text-delta') this.active.delete(item.activityId);\n }\n } else if (message.kind === 'intelligence-rejected') {\n this.active.delete(message.activityId);\n this.rejected.set(message.activityId, message);\n } else if (message.kind === 'intelligence-closed') {\n this.port.removeEventListener('message', this.listener);\n this.received.length = 0;\n this.active.clear();\n this.rejected.clear();\n this.port.close();\n this.closeResolve?.();\n this.closeResolve = undefined;\n }\n };\n port.addEventListener('message', this.listener);\n port.start?.();\n }\n\n submit(request: ActivityRequest): Result<ActivityRef, IntelligenceError> {\n if (this.closed) return err(new IntelligenceError({ code: 'intelligence-closed', detail: {} }));\n if (request.input.length === 0 || request.input.length > this.limits.maxInputChars) {\n return err(\n new IntelligenceError({\n code: 'intelligence-invalid-request',\n detail: {\n field: 'input',\n reason:\n request.input.length === 0\n ? 'input is empty'\n : `input exceeds ${this.limits.maxInputChars} characters`,\n },\n }),\n );\n }\n if (request.session !== undefined && request.session.providerId !== this.providerId) {\n return err(\n new IntelligenceError({\n code: 'intelligence-session-provider-mismatch',\n detail: {\n expectedProviderId: this.providerId,\n receivedProviderId: request.session.providerId,\n },\n }),\n );\n }\n if (this.active.size >= this.limits.maxConcurrentActivities) {\n return err(\n new IntelligenceError({\n code: 'intelligence-capacity-exceeded',\n detail: { limit: this.limits.maxConcurrentActivities },\n }),\n );\n }\n const ref: ActivityRef = {\n id: this.createActivityId(),\n session: request.session ?? { providerId: this.providerId, id: this.createSessionId() },\n };\n this.active.add(ref.id);\n this.port.postMessage({\n kind: 'intelligence-submit',\n submission: { ...ref, input: request.input },\n });\n return ok(ref);\n }\n\n poll(maxEvents = this.limits.maxPollEvents): readonly ActivityEvent[] {\n if (this.closed || !Number.isInteger(maxEvents) || maxEvents <= 0) return [];\n const count = Math.min(maxEvents, this.limits.maxPollEvents);\n const events = this.received.splice(0, count);\n for (const [id, rejection] of this.rejected) {\n if (events.length >= count) break;\n this.rejected.delete(id);\n events.push({\n type: 'failed',\n activityId: id,\n sequence: 1,\n error: rejection.error,\n });\n }\n if (!this.pollPending) {\n this.pollPending = true;\n this.port.postMessage({ kind: 'intelligence-poll', maxEvents: count });\n }\n return events;\n }\n\n cancel(id: ActivityId): Result<void, IntelligenceError> {\n if (this.closed) return err(new IntelligenceError({ code: 'intelligence-closed', detail: {} }));\n if (!this.active.has(id)) {\n return err(\n new IntelligenceError({\n code: 'intelligence-activity-not-found',\n detail: { activityId: id },\n }),\n );\n }\n this.port.postMessage({ kind: 'intelligence-cancel', activityId: id });\n return ok(undefined);\n }\n\n close(): Promise<void> {\n if (this.closeTask !== undefined) return this.closeTask;\n this.closed = true;\n this.closeTask = new Promise((resolve) => {\n this.closeResolve = resolve;\n this.port.postMessage({ kind: 'intelligence-close' });\n });\n return this.closeTask;\n }\n}\n\nexport function createIntelligencePortClient(\n providerId: string,\n port: IntelligenceMessagePort,\n options: IntelligenceRuntimeOptions = {},\n): IntelligencePortClient {\n return new IntelligencePortClient(providerId, port, options);\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/errors.ts","../src/plugin.ts","../src/types.ts","../src/runtime.ts","../src/transport.ts"],"names":["err","ok"],"mappings":";;;AA+BA,IAAM,MAAA,GAAS;AAAA,EACb,8BAAA,EAAgC;AAAA,IAC9B,QAAA,EAAU,uEAAA;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,wCAAA,EAA0C;AAAA,IACxC,QAAA,EAAU,qEAAA;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,gCAAA,EAAkC;AAAA,IAChC,QAAA,EAAU,8EAAA;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,iCAAA,EAAmC;AAAA,IACjC,QAAA,EAAU,mEAAA;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,8BAAA,EAAgC;AAAA,IAC9B,QAAA,EAAU,oEAAA;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,8BAAA,EAAgC;AAAA,IAC9B,QAAA,EAAU,kFAAA;AAAA,IACV,IAAA,EAAM;A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SAAA,KAAc,MAAA,EAAW,OAAO,IAAA,CAAK,SAAA;AAC9C,IAAA,IAAA,CAAK,MAAA,GAAS,IAAA;AACd,IAAA,IAAA,CAAK,SAAA,GAAY,IAAI,OAAA,CAAQ,CAAC,OAAA,KAAY;AACxC,MAAA,IAAA,CAAK,YAAA,GAAe,OAAA;AACpB,MAAA,IAAA,CAAK,IAAA,CAAK,WAAA,CAAY,EAAE,IAAA,EAAM,sBAAsB,CAAA;AAAA,IACtD,CAAC,CAAA;AACD,IAAA,OAAO,IAAA,CAAK,SAAA;AAAA,EACd;AACF;AAEO,SAAS,4BAAA,CACd,UAAA,EACA,IAAA,EACA,OAAA,GAAsC,EAAC,EACf;AACxB,EAAA,OAAO,IAAI,sBAAA,CAAuB,UAAA,EAAY,IAAA,EAAM,OAAO,CAAA;AAC7D","file":"index.mjs","sourcesContent":["import type { ActivityId } from './types';\n\nexport type IntelligenceErrorCode =\n | 'intelligence-invalid-request'\n | 'intelligence-session-provider-mismatch'\n | 'intelligence-capacity-exceeded'\n | 'intelligence-activity-not-found'\n | 'intelligence-provider-failed'\n | 'intelligence-output-overflow'\n | 'intelligence-closed';\n\nexport interface IntelligenceErrorDetailMap {\n readonly 'intelligence-invalid-request': { readonly field: 'input'; readonly reason: string };\n readonly 'intelligence-session-provider-mismatch': {\n readonly expectedProviderId: string;\n readonly receivedProviderId: string;\n };\n readonly 'intelligence-capacity-exceeded': { readonly limit: number };\n readonly 'intelligence-activity-not-found': { readonly activityId: ActivityId };\n readonly 'intelligence-provider-failed': { readonly providerId: string; readonly cause: unknown };\n readonly 'intelligence-output-overflow': {\n readonly activityId: ActivityId;\n readonly bound: 'output-chars' | 'pending-events';\n readonly limit: number;\n };\n readonly 'intelligence-closed': Readonly<Record<string, never>>;\n}\n\nexport type IntelligenceErrorDetailFor<C extends IntelligenceErrorCode> =\n IntelligenceErrorDetailMap[C];\n\nconst policy = {\n 'intelligence-invalid-request': {\n expected: 'activity input must be a non-empty string within the configured bound',\n hint: 'validate and bound player input before submitting the activity',\n },\n 'intelligence-session-provider-mismatch': {\n expected: 'a session reference must be resumed by the provider that created it',\n hint: 'discard the incompatible session or select its original provider',\n },\n 'intelligence-capacity-exceeded': {\n expected: 'active intelligence work must remain within the configured concurrency bound',\n hint: 'wait for an activity to finish or raise the explicit provider capacity',\n },\n 'intelligence-activity-not-found': {\n expected: 'the activity must still be running when cancellation is requested',\n hint: 'ignore an already observed terminal activity or retain the correct ActivityId',\n },\n 'intelligence-provider-failed': {\n expected: 'the selected provider must complete or report a structured failure',\n hint: 'inspect detail.cause and provider configuration, then retry or select another provider',\n },\n 'intelligence-output-overflow': {\n expected: 'incremental and final output must remain within configured queue and text bounds',\n hint: 'consume events every frame or raise the explicit bound for this application',\n },\n 'intelligence-closed': {\n expected: 'the intelligence service must be open for submit and cancel operations',\n hint: 'create a new service after its Cordis realm or owner has been disposed',\n },\n} satisfies Record<IntelligenceErrorCode, { readonly expected: string; readonly hint: string }>;\n\nexport const INTELLIGENCE_EXPECTED = Object.fromEntries(\n Object.entries(policy).map(([code, value]) => [code, value.expected]),\n) as Readonly<Record<IntelligenceErrorCode, string>>;\n\nexport const INTELLIGENCE_ERROR_HINTS = Object.fromEntries(\n Object.entries(policy).map(([code, value]) => [code, value.hint]),\n) as Readonly<Record<IntelligenceErrorCode, string>>;\n\nclass IntelligenceErrorClass extends Error {\n readonly code: IntelligenceErrorCode;\n readonly expected: string;\n readonly hint: string;\n readonly detail: IntelligenceErrorDetailFor<IntelligenceErrorCode>;\n\n constructor(args: {\n code: IntelligenceErrorCode;\n detail: IntelligenceErrorDetailFor<IntelligenceErrorCode>;\n }) {\n const selected = policy[args.code];\n super(\n `[IntelligenceError ${args.code}] expected: ${selected.expected}; hint: ${selected.hint}`,\n );\n this.name = 'IntelligenceError';\n this.code = args.code;\n this.expected = selected.expected;\n this.hint = selected.hint;\n this.detail = args.detail;\n }\n}\n\ntype IntelligenceErrorVariant<C extends IntelligenceErrorCode> = IntelligenceErrorClass & {\n readonly code: C;\n readonly detail: IntelligenceErrorDetailFor<C>;\n};\n\nexport type IntelligenceError = {\n [C in IntelligenceErrorCode]: IntelligenceErrorVariant<C>;\n}[IntelligenceErrorCode];\n\ninterface IntelligenceErrorConstructor {\n new <C extends IntelligenceErrorCode>(args: {\n code: C;\n detail: IntelligenceErrorDetailFor<C>;\n }): IntelligenceErrorVariant<C>;\n readonly prototype: IntelligenceErrorClass;\n}\n\nexport const IntelligenceError: IntelligenceErrorConstructor =\n IntelligenceErrorClass as unknown as IntelligenceErrorConstructor;\n\ntype PodDetailMap = Omit<IntelligenceErrorDetailMap, 'intelligence-provider-failed'> & {\n readonly 'intelligence-provider-failed': { readonly providerId: string; readonly cause: string };\n};\n\nexport type IntelligenceFailure = {\n [C in IntelligenceErrorCode]: {\n readonly code: C;\n readonly expected: string;\n readonly hint: string;\n readonly detail: PodDetailMap[C];\n };\n}[IntelligenceErrorCode];\n\nexport function intelligenceFailure(error: IntelligenceError): IntelligenceFailure {\n if (error.code === 'intelligence-provider-failed') {\n return {\n code: error.code,\n expected: error.expected,\n hint: error.hint,\n detail: {\n providerId: error.detail.providerId,\n cause:\n error.detail.cause instanceof Error\n ? error.detail.cause.message\n : String(error.detail.cause),\n },\n };\n }\n return {\n code: error.code,\n expected: error.expected,\n hint: error.hint,\n detail: error.detail,\n } as IntelligenceFailure;\n}\n\nexport function providerError(providerId: string, cause: unknown): IntelligenceError {\n return new IntelligenceError({\n code: 'intelligence-provider-failed',\n detail: { providerId, cause },\n });\n}\n","import type { Plugin } from '@forgeax/engine-plugin';\nimport type { IntelligenceService } from './types';\n\ndeclare module '@forgeax/engine-plugin' {\n interface EngineContextServices {\n intelligence?: IntelligenceService;\n }\n}\n\n/** Install one optional intelligence service and bind its lifetime to this Cordis Fiber. */\nexport function intelligencePlugin(service: IntelligenceService): Plugin {\n return {\n name: 'intelligence',\n provide: 'intelligence',\n apply(ctx) {\n ctx.provide('intelligence', service);\n ctx.effect(() => () => service.close(), 'intelligence/service');\n },\n };\n}\n","import type { Result } from '@forgeax/engine-types';\nimport type { IntelligenceError, IntelligenceFailure } from './errors';\n\ndeclare const activityIdBrand: unique symbol;\n\n/** Opaque identity of one bounded asynchronous operation. */\nexport type ActivityId = string & { readonly [activityIdBrand]: true };\n\n/** Provider-scoped durable conversation identity. */\nexport interface SessionRef {\n readonly providerId: string;\n readonly id: string;\n}\n\nexport interface ActivityRef {\n readonly id: ActivityId;\n readonly session: SessionRef;\n}\n\nexport interface ActivityRequest {\n readonly input: string;\n readonly session?: SessionRef;\n}\n\n/** Fully identified request used by realm transports and provider dispatch. */\nexport interface ActivitySubmission extends ActivityRef {\n readonly input: string;\n}\n\nexport type ActivityEvent =\n | {\n readonly type: 'text-delta';\n readonly activityId: ActivityId;\n readonly sequence: number;\n readonly text: string;\n }\n | {\n readonly type: 'completed';\n readonly activityId: ActivityId;\n readonly sequence: number;\n readonly session: SessionRef;\n readonly output: string;\n }\n | {\n readonly type: 'failed';\n readonly activityId: ActivityId;\n readonly sequence: number;\n readonly error: IntelligenceFailure;\n }\n | {\n readonly type: 'cancelled';\n readonly activityId: ActivityId;\n readonly sequence: number;\n };\n\nexport interface ActivitySink {\n text(text: string): void;\n complete(output: string): void;\n fail(cause: unknown): void;\n cancelled(): void;\n}\n\n/** Provider implementation boundary. It never receives World or Renderer authority. */\nexport interface IntelligenceProvider {\n readonly id: string;\n start(submission: ActivitySubmission, sink: ActivitySink): Result<void, IntelligenceError>;\n cancel(activityId: ActivityId): Result<void, IntelligenceError>;\n close(): Promise<void>;\n}\n\n/** Frame-safe consumer surface. No method waits for provider work. */\nexport interface IntelligenceService {\n readonly providerId: string;\n submit(request: ActivityRequest): Result<ActivityRef, IntelligenceError>;\n poll(maxEvents?: number): readonly ActivityEvent[];\n cancel(activityId: ActivityId): Result<void, IntelligenceError>;\n close(): Promise<void>;\n}\n\nexport interface IntelligenceLimits {\n readonly maxInputChars: number;\n readonly maxOutputChars: number;\n readonly maxConcurrentActivities: number;\n readonly maxPendingEventsPerActivity: number;\n readonly maxPollEvents: number;\n}\n\nexport const DEFAULT_INTELLIGENCE_LIMITS: IntelligenceLimits = {\n maxInputChars: 16_384,\n maxOutputChars: 65_536,\n maxConcurrentActivities: 8,\n maxPendingEventsPerActivity: 256,\n maxPollEvents: 64,\n};\n\nexport interface IntelligenceRuntimeOptions {\n readonly limits?: Partial<IntelligenceLimits>;\n readonly createActivityId?: () => ActivityId;\n readonly createSessionId?: () => string;\n}\n\nexport function activityId(value: string): ActivityId {\n return value as ActivityId;\n}\n","import { err, ok, type Result } from '@forgeax/engine-types';\nimport { IntelligenceError, intelligenceFailure, providerError } from './errors';\nimport {\n type ActivityEvent,\n type ActivityId,\n type ActivityRef,\n type ActivityRequest,\n type ActivitySink,\n type ActivitySubmission,\n activityId,\n DEFAULT_INTELLIGENCE_LIMITS,\n type IntelligenceLimits,\n type IntelligenceProvider,\n type IntelligenceRuntimeOptions,\n type IntelligenceService,\n} from './types';\n\ninterface ActivityRecord {\n readonly ref: ActivityRef;\n readonly events: ActivityEvent[];\n sequence: number;\n outputChars: number;\n terminal: boolean;\n}\n\nlet fallbackIdentity = 0;\n\nfunction nextIdentity(prefix: string): string {\n const uuid = globalThis.crypto?.randomUUID?.();\n if (uuid !== undefined) return `${prefix}-${uuid}`;\n fallbackIdentity += 1;\n return `${prefix}-${Date.now().toString(36)}-${fallbackIdentity.toString(36)}`;\n}\n\nexport function resolveIntelligenceLimits(\n overrides: Partial<IntelligenceLimits> | undefined,\n): IntelligenceLimits {\n const limits = { ...DEFAULT_INTELLIGENCE_LIMITS, ...overrides };\n for (const [name, value] of Object.entries(limits)) {\n if (!Number.isInteger(value) || value <= 0) {\n throw new RangeError(`${name} must be a positive integer`);\n }\n }\n if (limits.maxPendingEventsPerActivity < 2) {\n throw new RangeError(\n 'maxPendingEventsPerActivity must reserve at least one data and terminal event',\n );\n }\n return limits;\n}\n\nexport class IntelligenceRuntime implements IntelligenceService {\n readonly providerId: string;\n readonly limits: IntelligenceLimits;\n private readonly records = new Map<ActivityId, ActivityRecord>();\n private readonly createActivityId: () => ActivityId;\n private readonly createSessionId: () => string;\n private closed = false;\n private closeTask: Promise<void> | undefined;\n\n constructor(\n private readonly provider: IntelligenceProvider,\n options: IntelligenceRuntimeOptions = {},\n ) {\n this.providerId = provider.id;\n this.limits = resolveIntelligenceLimits(options.limits);\n this.createActivityId =\n options.createActivityId ?? (() => activityId(nextIdentity('activity')));\n this.createSessionId = options.createSessionId ?? (() => nextIdentity('session'));\n }\n\n submit(request: ActivityRequest): Result<ActivityRef, IntelligenceError> {\n const validated = this.validateRequest(request);\n if (!validated.ok) return validated;\n const ref: ActivityRef = {\n id: this.createActivityId(),\n session: request.session ?? { providerId: this.providerId, id: this.createSessionId() },\n };\n const accepted = this.accept({ ...ref, input: request.input });\n return accepted.ok ? ok(ref) : accepted;\n }\n\n /** Accept an already identified request from a realm transport. */\n accept(submission: ActivitySubmission): Result<void, IntelligenceError> {\n const validated = this.validateRequest({\n input: submission.input,\n session: submission.session,\n });\n if (!validated.ok) return validated;\n if (this.records.has(submission.id)) {\n return err(\n providerError(this.providerId, `duplicate activity identity: ${String(submission.id)}`),\n );\n }\n if (this.runningCount >= this.limits.maxConcurrentActivities) {\n return err(\n new IntelligenceError({\n code: 'intelligence-capacity-exceeded',\n detail: { limit: this.limits.maxConcurrentActivities },\n }),\n );\n }\n const record: ActivityRecord = {\n ref: { id: submission.id, session: submission.session },\n events: [],\n sequence: 0,\n outputChars: 0,\n terminal: false,\n };\n this.records.set(submission.id, record);\n const started = this.provider.start(submission, this.createSink(record));\n if (!started.ok) {\n this.records.delete(submission.id);\n return started;\n }\n return ok(undefined);\n }\n\n poll(maxEvents = this.limits.maxPollEvents): readonly ActivityEvent[] {\n if (!Number.isInteger(maxEvents) || maxEvents <= 0) return [];\n const bounded = Math.min(maxEvents, this.limits.maxPollEvents);\n const events: ActivityEvent[] = [];\n for (const [id, record] of this.records) {\n while (record.events.length > 0 && events.length < bounded) {\n const event = record.events.shift();\n if (event !== undefined) events.push(event);\n }\n if (record.terminal && record.events.length === 0) this.records.delete(id);\n if (events.length === bounded) break;\n }\n return events;\n }\n\n cancel(activity: ActivityId): Result<void, IntelligenceError> {\n if (this.closed) return err(this.closedError());\n const record = this.records.get(activity);\n if (record === undefined || record.terminal) {\n return err(\n new IntelligenceError({\n code: 'intelligence-activity-not-found',\n detail: { activityId: activity },\n }),\n );\n }\n return this.provider.cancel(activity);\n }\n\n close(): Promise<void> {\n this.closeTask ??= this.performClose();\n return this.closeTask;\n }\n\n private async performClose(): Promise<void> {\n this.closed = true;\n await this.provider.close();\n this.records.clear();\n }\n\n private get runningCount(): number {\n let count = 0;\n for (const record of this.records.values()) if (!record.terminal) count += 1;\n return count;\n }\n\n private validateRequest(request: ActivityRequest): Result<void, IntelligenceError> {\n if (this.closed) return err(this.closedError());\n if (request.input.length === 0 || request.input.length > this.limits.maxInputChars) {\n return err(\n new IntelligenceError({\n code: 'intelligence-invalid-request',\n detail: {\n field: 'input',\n reason:\n request.input.length === 0\n ? 'input is empty'\n : `input exceeds ${this.limits.maxInputChars} characters`,\n },\n }),\n );\n }\n if (request.session !== undefined && request.session.providerId !== this.providerId) {\n return err(\n new IntelligenceError({\n code: 'intelligence-session-provider-mismatch',\n detail: {\n expectedProviderId: this.providerId,\n receivedProviderId: request.session.providerId,\n },\n }),\n );\n }\n return ok(undefined);\n }\n\n private createSink(record: ActivityRecord): ActivitySink {\n return {\n text: (text) => {\n if (record.terminal || text.length === 0) return;\n if (record.outputChars + text.length > this.limits.maxOutputChars) {\n this.overflow(record, 'output-chars', this.limits.maxOutputChars);\n return;\n }\n if (record.events.length >= this.limits.maxPendingEventsPerActivity - 1) {\n this.overflow(record, 'pending-events', this.limits.maxPendingEventsPerActivity);\n return;\n }\n record.outputChars += text.length;\n this.push(record, { type: 'text-delta', text });\n },\n complete: (output) => {\n if (record.terminal) return;\n if (output.length > this.limits.maxOutputChars) {\n this.overflow(record, 'output-chars', this.limits.maxOutputChars);\n return;\n }\n record.terminal = true;\n this.push(record, { type: 'completed', session: record.ref.session, output });\n },\n fail: (cause) => {\n if (record.terminal) return;\n record.terminal = true;\n const error = providerError(this.providerId, cause);\n this.push(record, { type: 'failed', error: intelligenceFailure(error) });\n },\n cancelled: () => {\n if (record.terminal) return;\n record.terminal = true;\n this.push(record, { type: 'cancelled' });\n },\n };\n }\n\n private overflow(\n record: ActivityRecord,\n bound: 'output-chars' | 'pending-events',\n limit: number,\n ): void {\n if (record.terminal) return;\n record.terminal = true;\n const error = new IntelligenceError({\n code: 'intelligence-output-overflow',\n detail: { activityId: record.ref.id, bound, limit },\n });\n if (record.events.length >= this.limits.maxPendingEventsPerActivity) record.events.pop();\n this.push(record, { type: 'failed', error: intelligenceFailure(error) });\n this.provider.cancel(record.ref.id);\n }\n\n private push(\n record: ActivityRecord,\n event:\n | { readonly type: 'text-delta'; readonly text: string }\n | {\n readonly type: 'completed';\n readonly session: ActivityRef['session'];\n readonly output: string;\n }\n | { readonly type: 'failed'; readonly error: ReturnType<typeof intelligenceFailure> }\n | { readonly type: 'cancelled' },\n ): void {\n record.sequence += 1;\n record.events.push({\n ...event,\n activityId: record.ref.id,\n sequence: record.sequence,\n } as ActivityEvent);\n }\n\n private closedError(): IntelligenceError {\n return new IntelligenceError({ code: 'intelligence-closed', detail: {} });\n }\n}\n\nexport function createIntelligenceRuntime(\n provider: IntelligenceProvider,\n options: IntelligenceRuntimeOptions = {},\n): IntelligenceRuntime {\n return new IntelligenceRuntime(provider, options);\n}\n","import { err, ok, type Result } from '@forgeax/engine-types';\nimport { IntelligenceError } from './errors';\nimport { type IntelligenceRuntime, resolveIntelligenceLimits } from './runtime';\nimport {\n type ActivityEvent,\n type ActivityId,\n type ActivityRef,\n type ActivityRequest,\n type ActivitySubmission,\n activityId,\n type IntelligenceLimits,\n type IntelligenceRuntimeOptions,\n type IntelligenceService,\n} from './types';\n\nexport type IntelligenceHostCommand =\n | { readonly kind: 'intelligence-submit'; readonly submission: ActivitySubmission }\n | { readonly kind: 'intelligence-poll'; readonly maxEvents: number }\n | { readonly kind: 'intelligence-cancel'; readonly activityId: ActivityId }\n | { readonly kind: 'intelligence-close' };\n\nexport type IntelligenceRealmMessage =\n | { readonly kind: 'intelligence-events'; readonly events: readonly ActivityEvent[] }\n | { readonly kind: 'intelligence-closed' }\n | {\n readonly kind: 'intelligence-rejected';\n readonly activityId: ActivityId;\n readonly error: import('./errors').IntelligenceFailure;\n };\n\nexport interface IntelligenceMessagePort {\n postMessage(message: IntelligenceHostCommand | IntelligenceRealmMessage): void;\n addEventListener(\n type: 'message',\n listener: (event: MessageEvent<IntelligenceHostCommand | IntelligenceRealmMessage>) => void,\n ): void;\n removeEventListener(\n type: 'message',\n listener: (event: MessageEvent<IntelligenceHostCommand | IntelligenceRealmMessage>) => void,\n ): void;\n start?(): void;\n close(): void;\n}\n\nexport interface IntelligencePortBinding {\n close(): Promise<void>;\n}\n\n/** Bind a Host-owned runtime to the realm side of a MessageChannel. */\nexport function bindIntelligencePort(\n port: IntelligenceMessagePort,\n runtime: IntelligenceRuntime,\n): IntelligencePortBinding {\n let closed = false;\n const listener = (\n event: MessageEvent<IntelligenceHostCommand | IntelligenceRealmMessage>,\n ): void => {\n const message = event.data;\n if (message.kind === 'intelligence-submit') {\n const accepted = runtime.accept(message.submission);\n if (!accepted.ok) {\n const failure = importFailure(accepted.error);\n port.postMessage({\n kind: 'intelligence-rejected',\n activityId: message.submission.id,\n error: failure,\n });\n }\n return;\n }\n if (message.kind === 'intelligence-poll') {\n port.postMessage({ kind: 'intelligence-events', events: runtime.poll(message.maxEvents) });\n return;\n }\n if (message.kind === 'intelligence-cancel') {\n runtime.cancel(message.activityId);\n return;\n }\n if (message.kind === 'intelligence-close') void close(true);\n };\n const close = async (notifyRealm = false): Promise<void> => {\n if (closed) return;\n closed = true;\n port.removeEventListener('message', listener);\n await runtime.close();\n if (notifyRealm) {\n port.postMessage({ kind: 'intelligence-closed' });\n setTimeout(() => port.close(), 0);\n } else {\n port.close();\n }\n };\n port.addEventListener('message', listener);\n port.start?.();\n return { close };\n}\n\nfunction importFailure(error: import('./errors').IntelligenceError) {\n if (error.code === 'intelligence-provider-failed') {\n return {\n code: error.code,\n expected: error.expected,\n hint: error.hint,\n detail: {\n providerId: error.detail.providerId,\n cause:\n error.detail.cause instanceof Error\n ? error.detail.cause.message\n : String(error.detail.cause),\n },\n } as const;\n }\n return {\n code: error.code,\n expected: error.expected,\n hint: error.hint,\n detail: error.detail,\n } as import('./errors').IntelligenceFailure;\n}\n\nlet portIdentity = 0;\n\nfunction nextPortIdentity(prefix: string): string {\n const uuid = globalThis.crypto?.randomUUID?.();\n if (uuid !== undefined) return `${prefix}-${uuid}`;\n portIdentity += 1;\n return `${prefix}-${portIdentity}`;\n}\n\n/** Worker/main-realm client. Polling is request/response and never awaits a Host provider. */\nexport class IntelligencePortClient implements IntelligenceService {\n readonly limits: IntelligenceLimits;\n private readonly received: ActivityEvent[] = [];\n private readonly active = new Set<ActivityId>();\n private readonly rejected = new Map<\n ActivityId,\n IntelligenceRealmMessage & { kind: 'intelligence-rejected' }\n >();\n private readonly createActivityId: () => ActivityId;\n private readonly createSessionId: () => string;\n private readonly listener: (\n event: MessageEvent<IntelligenceHostCommand | IntelligenceRealmMessage>,\n ) => void;\n private closed = false;\n private pollPending = false;\n private closeTask: Promise<void> | undefined;\n private closeResolve: (() => void) | undefined;\n\n constructor(\n readonly providerId: string,\n private readonly port: IntelligenceMessagePort,\n options: IntelligenceRuntimeOptions = {},\n ) {\n this.limits = resolveIntelligenceLimits(options.limits);\n this.createActivityId =\n options.createActivityId ?? (() => activityId(nextPortIdentity('activity')));\n this.createSessionId = options.createSessionId ?? (() => nextPortIdentity('session'));\n this.listener = (event) => {\n const message = event.data;\n if (message.kind === 'intelligence-events') {\n this.pollPending = false;\n for (const item of message.events) {\n this.received.push(item);\n if (item.type !== 'text-delta') this.active.delete(item.activityId);\n }\n } else if (message.kind === 'intelligence-rejected') {\n this.active.delete(message.activityId);\n this.rejected.set(message.activityId, message);\n } else if (message.kind === 'intelligence-closed') {\n this.port.removeEventListener('message', this.listener);\n this.received.length = 0;\n this.active.clear();\n this.rejected.clear();\n this.port.close();\n this.closeResolve?.();\n this.closeResolve = undefined;\n }\n };\n port.addEventListener('message', this.listener);\n port.start?.();\n }\n\n submit(request: ActivityRequest): Result<ActivityRef, IntelligenceError> {\n if (this.closed) return err(new IntelligenceError({ code: 'intelligence-closed', detail: {} }));\n if (request.input.length === 0 || request.input.length > this.limits.maxInputChars) {\n return err(\n new IntelligenceError({\n code: 'intelligence-invalid-request',\n detail: {\n field: 'input',\n reason:\n request.input.length === 0\n ? 'input is empty'\n : `input exceeds ${this.limits.maxInputChars} characters`,\n },\n }),\n );\n }\n if (request.session !== undefined && request.session.providerId !== this.providerId) {\n return err(\n new IntelligenceError({\n code: 'intelligence-session-provider-mismatch',\n detail: {\n expectedProviderId: this.providerId,\n receivedProviderId: request.session.providerId,\n },\n }),\n );\n }\n if (this.active.size >= this.limits.maxConcurrentActivities) {\n return err(\n new IntelligenceError({\n code: 'intelligence-capacity-exceeded',\n detail: { limit: this.limits.maxConcurrentActivities },\n }),\n );\n }\n const ref: ActivityRef = {\n id: this.createActivityId(),\n session: request.session ?? { providerId: this.providerId, id: this.createSessionId() },\n };\n this.active.add(ref.id);\n this.port.postMessage({\n kind: 'intelligence-submit',\n submission: { ...ref, input: request.input },\n });\n return ok(ref);\n }\n\n poll(maxEvents = this.limits.maxPollEvents): readonly ActivityEvent[] {\n if (this.closed || !Number.isInteger(maxEvents) || maxEvents <= 0) return [];\n const count = Math.min(maxEvents, this.limits.maxPollEvents);\n const events = this.received.splice(0, count);\n for (const [id, rejection] of this.rejected) {\n if (events.length >= count) break;\n this.rejected.delete(id);\n events.push({\n type: 'failed',\n activityId: id,\n sequence: 1,\n error: rejection.error,\n });\n }\n if (!this.pollPending) {\n this.pollPending = true;\n this.port.postMessage({ kind: 'intelligence-poll', maxEvents: count });\n }\n return events;\n }\n\n cancel(id: ActivityId): Result<void, IntelligenceError> {\n if (this.closed) return err(new IntelligenceError({ code: 'intelligence-closed', detail: {} }));\n if (!this.active.has(id)) {\n return err(\n new IntelligenceError({\n code: 'intelligence-activity-not-found',\n detail: { activityId: id },\n }),\n );\n }\n this.port.postMessage({ kind: 'intelligence-cancel', activityId: id });\n return ok(undefined);\n }\n\n close(): Promise<void> {\n if (this.closeTask !== undefined) return this.closeTask;\n this.closed = true;\n this.closeTask = new Promise((resolve) => {\n this.closeResolve = resolve;\n this.port.postMessage({ kind: 'intelligence-close' });\n });\n return this.closeTask;\n }\n}\n\nexport function createIntelligencePortClient(\n providerId: string,\n port: IntelligenceMessagePort,\n options: IntelligenceRuntimeOptions = {},\n): IntelligencePortClient {\n return new IntelligencePortClient(providerId, port, options);\n}\n"]}
|
package/dist/runtime.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAsC,MAAM,UAAU,CAAC;AACjF,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,eAAe,EAEpB,KAAK,kBAAkB,EAGvB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,0BAA0B,EAC/B,KAAK,mBAAmB,EACzB,MAAM,SAAS,CAAC;AAmBjB,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,OAAO,CAAC,kBAAkB,CAAC,GAAG,SAAS,GACjD,kBAAkB,CAapB;AAED,qBAAa,mBAAoB,YAAW,mBAAmB;IAU3D,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAT3B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;IACpC,OAAO,CAAC,Q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CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,SAAS,CAA4B;gBAG1B,QAAQ,EAAE,oBAAoB,EAC/C,OAAO,GAAE,0BAA+B;IAS1C,MAAM,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAAC,WAAW,EAAE,iBAAiB,CAAC;IAWxE,mEAAmE;IACnE,MAAM,CAAC,UAAU,EAAE,kBAAkB,GAAG,MAAM,CAAC,IAAI,EAAE,iBAAiB,CAAC;IAmCvE,IAAI,CAAC,SAAS,SAA4B,GAAG,SAAS,aAAa,EAAE;IAerE,MAAM,CAAC,QAAQ,EAAE,UAAU,GAAG,MAAM,CAAC,IAAI,EAAE,iBAAiB,CAAC;IAc7D,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;YAKR,YAAY;IAM1B,OAAO,KAAK,YAAY,GAIvB;IAED,OAAO,CAAC,eAAe;IA8BvB,OAAO,CAAC,UAAU;IAsClB,OAAO,CAAC,QAAQ;IAgBhB,OAAO,CAAC,IAAI;IAoBZ,OAAO,CAAC,WAAW;CAGpB;AAED,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,oBAAoB,EAC9B,OAAO,GAAE,0BAA+B,GACvC,mBAAmB,CAErB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forgeax/engine-intelligence",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"README.md"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@forgeax/engine-plugin": "0.1.
|
|
25
|
-
"@forgeax/engine-types": "0.1.
|
|
24
|
+
"@forgeax/engine-plugin": "0.1.6",
|
|
25
|
+
"@forgeax/engine-types": "0.1.6"
|
|
26
26
|
},
|
|
27
27
|
"forgeax": {
|
|
28
28
|
"metrics": {
|
|
@@ -153,352 +153,4 @@ describe('IntelligenceRuntime', () => {
|
|
|
153
153
|
expect(result.ok).toBe(true);
|
|
154
154
|
expect(controlled.sinks.has(submission.id)).toBe(true);
|
|
155
155
|
});
|
|
156
|
-
|
|
157
|
-
it('contains synchronous provider start throws and permits same-runtime retry', () => {
|
|
158
|
-
const siblingId = activityId('sibling');
|
|
159
|
-
const failedId = activityId('failed');
|
|
160
|
-
const spareId = activityId('spare');
|
|
161
|
-
const failedSession = { providerId: 'test.provider', id: 'failed-session' };
|
|
162
|
-
const ids = [siblingId, failedId, spareId, failedId];
|
|
163
|
-
const sinks = new Map<ActivityId, ActivitySink>();
|
|
164
|
-
const starts = new Map<ActivityId, number>();
|
|
165
|
-
let throwOnFailedStart = true;
|
|
166
|
-
let cancelCalls = 0;
|
|
167
|
-
let closeCalls = 0;
|
|
168
|
-
const provider: IntelligenceProvider = {
|
|
169
|
-
id: 'test.provider',
|
|
170
|
-
start(submission, sink) {
|
|
171
|
-
starts.set(submission.id, (starts.get(submission.id) ?? 0) + 1);
|
|
172
|
-
if (submission.id === failedId && throwOnFailedStart) {
|
|
173
|
-
throw new Error('sentinel provider start failure');
|
|
174
|
-
}
|
|
175
|
-
sinks.set(submission.id, sink);
|
|
176
|
-
return ok(undefined);
|
|
177
|
-
},
|
|
178
|
-
cancel() {
|
|
179
|
-
cancelCalls += 1;
|
|
180
|
-
return ok(undefined);
|
|
181
|
-
},
|
|
182
|
-
async close() {
|
|
183
|
-
closeCalls += 1;
|
|
184
|
-
},
|
|
185
|
-
};
|
|
186
|
-
const runtime = createIntelligenceRuntime(provider, {
|
|
187
|
-
limits: { maxConcurrentActivities: 2 },
|
|
188
|
-
createActivityId: () => {
|
|
189
|
-
const id = ids.shift();
|
|
190
|
-
if (id === undefined) throw new Error('test activity identity exhausted');
|
|
191
|
-
return id;
|
|
192
|
-
},
|
|
193
|
-
});
|
|
194
|
-
|
|
195
|
-
const sibling = runtime.submit({ input: 'sibling' });
|
|
196
|
-
expect(sibling.ok).toBe(true);
|
|
197
|
-
if (!sibling.ok) return;
|
|
198
|
-
const siblingSink = sinks.get(sibling.value.id);
|
|
199
|
-
expect(siblingSink).toBeDefined();
|
|
200
|
-
siblingSink?.text('sibling');
|
|
201
|
-
expect(runtime.poll()).toEqual([
|
|
202
|
-
{ type: 'text-delta', activityId: siblingId, sequence: 1, text: 'sibling' },
|
|
203
|
-
]);
|
|
204
|
-
|
|
205
|
-
let refused: ReturnType<typeof runtime.submit> | undefined;
|
|
206
|
-
let rawThrow: unknown;
|
|
207
|
-
try {
|
|
208
|
-
refused = runtime.submit({ input: 'throw', session: failedSession });
|
|
209
|
-
} catch (error) {
|
|
210
|
-
rawThrow = error;
|
|
211
|
-
}
|
|
212
|
-
expect(rawThrow).toBeUndefined();
|
|
213
|
-
expect(refused?.ok).toBe(false);
|
|
214
|
-
if (refused === undefined || refused.ok) return;
|
|
215
|
-
expect(refused.error.code).toBe('intelligence-provider-failed');
|
|
216
|
-
if (refused.error.code === 'intelligence-provider-failed') {
|
|
217
|
-
expect(refused.error.detail.providerId).toBe(provider.id);
|
|
218
|
-
expect(refused.error.detail.cause).toBeInstanceOf(Error);
|
|
219
|
-
expect(refused.error.message).not.toContain('sentinel provider start failure');
|
|
220
|
-
expect(refused.error.hint).not.toContain('sentinel provider start failure');
|
|
221
|
-
}
|
|
222
|
-
expect(runtime.poll()).toEqual([]);
|
|
223
|
-
expect(sinks.has(failedId)).toBe(false);
|
|
224
|
-
expect(cancelCalls).toBe(0);
|
|
225
|
-
expect(closeCalls).toBe(0);
|
|
226
|
-
|
|
227
|
-
const spare = runtime.submit({ input: 'spare' });
|
|
228
|
-
expect(spare.ok).toBe(true);
|
|
229
|
-
if (!spare.ok) return;
|
|
230
|
-
sinks.get(spare.value.id)?.complete('spare');
|
|
231
|
-
expect(runtime.poll()).toEqual([
|
|
232
|
-
{
|
|
233
|
-
type: 'completed',
|
|
234
|
-
activityId: spareId,
|
|
235
|
-
sequence: 1,
|
|
236
|
-
session: spare.value.session,
|
|
237
|
-
output: 'spare',
|
|
238
|
-
},
|
|
239
|
-
]);
|
|
240
|
-
|
|
241
|
-
throwOnFailedStart = false;
|
|
242
|
-
const retry = runtime.submit({ input: 'retry', session: failedSession });
|
|
243
|
-
expect(retry.ok).toBe(true);
|
|
244
|
-
if (!retry.ok) return;
|
|
245
|
-
expect(retry.value.id).toBe(failedId);
|
|
246
|
-
expect(retry.value.session).toBe(failedSession);
|
|
247
|
-
siblingSink?.complete('sibling-done');
|
|
248
|
-
sinks.get(retry.value.id)?.complete('retry-done');
|
|
249
|
-
expect(runtime.poll()).toEqual([
|
|
250
|
-
{
|
|
251
|
-
type: 'completed',
|
|
252
|
-
activityId: siblingId,
|
|
253
|
-
sequence: 2,
|
|
254
|
-
session: sibling.value.session,
|
|
255
|
-
output: 'sibling-done',
|
|
256
|
-
},
|
|
257
|
-
{
|
|
258
|
-
type: 'completed',
|
|
259
|
-
activityId: failedId,
|
|
260
|
-
sequence: 1,
|
|
261
|
-
session: failedSession,
|
|
262
|
-
output: 'retry-done',
|
|
263
|
-
},
|
|
264
|
-
]);
|
|
265
|
-
expect(runtime.poll()).toEqual([]);
|
|
266
|
-
expect(starts.get(siblingId)).toBe(1);
|
|
267
|
-
expect(starts.get(failedId)).toBe(2);
|
|
268
|
-
expect(starts.get(spareId)).toBe(1);
|
|
269
|
-
expect(cancelCalls).toBe(0);
|
|
270
|
-
|
|
271
|
-
const close = runtime.close();
|
|
272
|
-
expect(close).toBe(runtime.close());
|
|
273
|
-
return close.then(() => {
|
|
274
|
-
expect(closeCalls).toBe(1);
|
|
275
|
-
expect(runtime.poll()).toEqual([]);
|
|
276
|
-
});
|
|
277
|
-
});
|
|
278
|
-
|
|
279
|
-
it('contains synchronous provider cancel throws and preserves the same Activity for retry', () => {
|
|
280
|
-
const siblingId = activityId('cancel-sibling');
|
|
281
|
-
const failedId = activityId('cancel-failed');
|
|
282
|
-
const spareId = activityId('cancel-spare');
|
|
283
|
-
const failedSession = { providerId: 'cancel.throw.provider', id: 'failed-session' };
|
|
284
|
-
const ids = [siblingId, failedId, spareId];
|
|
285
|
-
const sinks = new Map<ActivityId, ActivitySink>();
|
|
286
|
-
const starts = new Map<ActivityId, number>();
|
|
287
|
-
const cancelCalls: ActivityId[] = [];
|
|
288
|
-
const sentinel = new Error('sentinel provider cancel failure');
|
|
289
|
-
let throwOnFailedCancel = true;
|
|
290
|
-
const provider: IntelligenceProvider = {
|
|
291
|
-
id: 'cancel.throw.provider',
|
|
292
|
-
start(submission, sink) {
|
|
293
|
-
starts.set(submission.id, (starts.get(submission.id) ?? 0) + 1);
|
|
294
|
-
sinks.set(submission.id, sink);
|
|
295
|
-
return ok(undefined);
|
|
296
|
-
},
|
|
297
|
-
cancel(activity) {
|
|
298
|
-
cancelCalls.push(activity);
|
|
299
|
-
if (activity === failedId && throwOnFailedCancel) throw sentinel;
|
|
300
|
-
const sink = sinks.get(activity);
|
|
301
|
-
if (sink === undefined) {
|
|
302
|
-
return err(
|
|
303
|
-
new IntelligenceError({
|
|
304
|
-
code: 'intelligence-activity-not-found',
|
|
305
|
-
detail: { activityId: activity },
|
|
306
|
-
}),
|
|
307
|
-
);
|
|
308
|
-
}
|
|
309
|
-
sinks.delete(activity);
|
|
310
|
-
sink.cancelled();
|
|
311
|
-
return ok(undefined);
|
|
312
|
-
},
|
|
313
|
-
async close() {},
|
|
314
|
-
};
|
|
315
|
-
const runtime = createIntelligenceRuntime(provider, {
|
|
316
|
-
limits: { maxConcurrentActivities: 2 },
|
|
317
|
-
createActivityId: () => {
|
|
318
|
-
const id = ids.shift();
|
|
319
|
-
if (id === undefined) throw new Error('test activity identity exhausted');
|
|
320
|
-
return id;
|
|
321
|
-
},
|
|
322
|
-
});
|
|
323
|
-
|
|
324
|
-
const sibling = runtime.submit({ input: 'sibling' });
|
|
325
|
-
const failed = runtime.submit({ input: 'cancel', session: failedSession });
|
|
326
|
-
expect(sibling.ok).toBe(true);
|
|
327
|
-
expect(failed.ok).toBe(true);
|
|
328
|
-
if (!sibling.ok || !failed.ok) return;
|
|
329
|
-
expect(runtime.poll()).toEqual([]);
|
|
330
|
-
|
|
331
|
-
let rawThrow: unknown;
|
|
332
|
-
let refused: ReturnType<typeof runtime.cancel> | undefined;
|
|
333
|
-
try {
|
|
334
|
-
refused = runtime.cancel(failed.value.id);
|
|
335
|
-
} catch (error) {
|
|
336
|
-
rawThrow = error;
|
|
337
|
-
}
|
|
338
|
-
expect(rawThrow).toBeUndefined();
|
|
339
|
-
expect(refused?.ok).toBe(false);
|
|
340
|
-
if (refused === undefined || refused.ok) return;
|
|
341
|
-
expect(refused.error.code).toBe('intelligence-provider-failed');
|
|
342
|
-
if (refused.error.code === 'intelligence-provider-failed') {
|
|
343
|
-
expect(refused.error.detail.providerId).toBe(provider.id);
|
|
344
|
-
expect(refused.error.detail.cause).toBe(sentinel);
|
|
345
|
-
expect(refused.error.message).not.toContain(sentinel.message);
|
|
346
|
-
expect(refused.error.hint).not.toContain(sentinel.message);
|
|
347
|
-
}
|
|
348
|
-
expect(cancelCalls).toEqual([failedId]);
|
|
349
|
-
expect(runtime.poll()).toEqual([]);
|
|
350
|
-
|
|
351
|
-
const spare = runtime.submit({ input: 'spare' });
|
|
352
|
-
expect(spare.ok).toBe(false);
|
|
353
|
-
if (!spare.ok) expect(spare.error.code).toBe('intelligence-capacity-exceeded');
|
|
354
|
-
expect(starts.has(spareId)).toBe(false);
|
|
355
|
-
|
|
356
|
-
const siblingSink = sinks.get(sibling.value.id);
|
|
357
|
-
expect(siblingSink).toBeDefined();
|
|
358
|
-
siblingSink?.text('healthy');
|
|
359
|
-
expect(runtime.poll()).toEqual([
|
|
360
|
-
{ type: 'text-delta', activityId: siblingId, sequence: 1, text: 'healthy' },
|
|
361
|
-
]);
|
|
362
|
-
|
|
363
|
-
throwOnFailedCancel = false;
|
|
364
|
-
const retried = runtime.cancel(failed.value.id);
|
|
365
|
-
expect(retried.ok).toBe(true);
|
|
366
|
-
expect(cancelCalls).toEqual([failedId, failedId]);
|
|
367
|
-
expect(runtime.poll()).toEqual([{ type: 'cancelled', activityId: failedId, sequence: 1 }]);
|
|
368
|
-
const afterCancel = runtime.cancel(failed.value.id);
|
|
369
|
-
expect(afterCancel.ok).toBe(false);
|
|
370
|
-
if (!afterCancel.ok) expect(afterCancel.error.code).toBe('intelligence-activity-not-found');
|
|
371
|
-
|
|
372
|
-
siblingSink?.complete('healthy-done');
|
|
373
|
-
expect(runtime.poll()).toEqual([
|
|
374
|
-
{
|
|
375
|
-
type: 'completed',
|
|
376
|
-
activityId: siblingId,
|
|
377
|
-
sequence: 2,
|
|
378
|
-
session: sibling.value.session,
|
|
379
|
-
output: 'healthy-done',
|
|
380
|
-
},
|
|
381
|
-
]);
|
|
382
|
-
expect(starts.get(siblingId)).toBe(1);
|
|
383
|
-
expect(starts.get(failedId)).toBe(1);
|
|
384
|
-
});
|
|
385
|
-
|
|
386
|
-
it('contains a throwing overflow cancellation and preserves provider Result errors', () => {
|
|
387
|
-
const siblingId = activityId('overflow-sibling');
|
|
388
|
-
const returnedId = activityId('returned-cancel-error');
|
|
389
|
-
const overflowId = activityId('overflow-throw');
|
|
390
|
-
const ids = [siblingId, returnedId, overflowId];
|
|
391
|
-
const sinks = new Map<ActivityId, ActivitySink>();
|
|
392
|
-
const cancelCalls: ActivityId[] = [];
|
|
393
|
-
const overflowSentinel = new Error('sentinel overflow cancel failure');
|
|
394
|
-
const returnedError = new IntelligenceError({
|
|
395
|
-
code: 'intelligence-provider-failed',
|
|
396
|
-
detail: { providerId: 'inner.provider', cause: 'provider returned error' },
|
|
397
|
-
});
|
|
398
|
-
const returnedResult = err(returnedError);
|
|
399
|
-
const provider: IntelligenceProvider = {
|
|
400
|
-
id: 'overflow.throw.provider',
|
|
401
|
-
start(submission, sink) {
|
|
402
|
-
sinks.set(submission.id, sink);
|
|
403
|
-
return ok(undefined);
|
|
404
|
-
},
|
|
405
|
-
cancel(activity) {
|
|
406
|
-
cancelCalls.push(activity);
|
|
407
|
-
if (activity === returnedId) return returnedResult;
|
|
408
|
-
if (activity === overflowId) throw overflowSentinel;
|
|
409
|
-
const sink = sinks.get(activity);
|
|
410
|
-
if (sink === undefined) {
|
|
411
|
-
return err(
|
|
412
|
-
new IntelligenceError({
|
|
413
|
-
code: 'intelligence-activity-not-found',
|
|
414
|
-
detail: { activityId: activity },
|
|
415
|
-
}),
|
|
416
|
-
);
|
|
417
|
-
}
|
|
418
|
-
sinks.delete(activity);
|
|
419
|
-
sink.cancelled();
|
|
420
|
-
return ok(undefined);
|
|
421
|
-
},
|
|
422
|
-
async close() {},
|
|
423
|
-
};
|
|
424
|
-
const runtime = createIntelligenceRuntime(provider, {
|
|
425
|
-
limits: { maxPendingEventsPerActivity: 2, maxConcurrentActivities: 3 },
|
|
426
|
-
createActivityId: () => {
|
|
427
|
-
const id = ids.shift();
|
|
428
|
-
if (id === undefined) throw new Error('test activity identity exhausted');
|
|
429
|
-
return id;
|
|
430
|
-
},
|
|
431
|
-
});
|
|
432
|
-
|
|
433
|
-
const sibling = runtime.submit({ input: 'sibling' });
|
|
434
|
-
const returned = runtime.submit({ input: 'returned' });
|
|
435
|
-
const overflow = runtime.submit({ input: 'overflow' });
|
|
436
|
-
expect(sibling.ok).toBe(true);
|
|
437
|
-
expect(returned.ok).toBe(true);
|
|
438
|
-
expect(overflow.ok).toBe(true);
|
|
439
|
-
if (!sibling.ok || !returned.ok || !overflow.ok) return;
|
|
440
|
-
|
|
441
|
-
const returnedCancel = runtime.cancel(returned.value.id);
|
|
442
|
-
expect(returnedCancel).toBe(returnedResult);
|
|
443
|
-
expect(runtime.poll()).toEqual([]);
|
|
444
|
-
sinks.get(returned.value.id)?.complete('returned-retry');
|
|
445
|
-
expect(runtime.poll()).toEqual([
|
|
446
|
-
{
|
|
447
|
-
type: 'completed',
|
|
448
|
-
activityId: returnedId,
|
|
449
|
-
sequence: 1,
|
|
450
|
-
session: returned.value.session,
|
|
451
|
-
output: 'returned-retry',
|
|
452
|
-
},
|
|
453
|
-
]);
|
|
454
|
-
|
|
455
|
-
const overflowSink = sinks.get(overflow.value.id);
|
|
456
|
-
expect(overflowSink).toBeDefined();
|
|
457
|
-
overflowSink?.text('first');
|
|
458
|
-
let rawThrow: unknown;
|
|
459
|
-
try {
|
|
460
|
-
overflowSink?.text('second');
|
|
461
|
-
} catch (error) {
|
|
462
|
-
rawThrow = error;
|
|
463
|
-
}
|
|
464
|
-
expect(rawThrow).toBeUndefined();
|
|
465
|
-
const events = runtime.poll();
|
|
466
|
-
expect(events).toHaveLength(2);
|
|
467
|
-
expect(events.filter((event) => event.type === 'failed')).toHaveLength(1);
|
|
468
|
-
expect(events[0]).toEqual({
|
|
469
|
-
type: 'text-delta',
|
|
470
|
-
activityId: overflowId,
|
|
471
|
-
sequence: 1,
|
|
472
|
-
text: 'first',
|
|
473
|
-
});
|
|
474
|
-
const overflowEvent = events[1];
|
|
475
|
-
expect(overflowEvent?.type).toBe('failed');
|
|
476
|
-
if (overflowEvent?.type === 'failed') {
|
|
477
|
-
expect(overflowEvent.error.code).toBe('intelligence-output-overflow');
|
|
478
|
-
if (overflowEvent.error.code === 'intelligence-output-overflow') {
|
|
479
|
-
expect(overflowEvent.error.detail).toEqual({
|
|
480
|
-
activityId: overflowId,
|
|
481
|
-
bound: 'pending-events',
|
|
482
|
-
limit: 2,
|
|
483
|
-
});
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
expect(cancelCalls).toEqual([returnedId, overflowId]);
|
|
487
|
-
|
|
488
|
-
const siblingSink = sinks.get(sibling.value.id);
|
|
489
|
-
siblingSink?.text('sibling-alive');
|
|
490
|
-
expect(runtime.poll()).toEqual([
|
|
491
|
-
{ type: 'text-delta', activityId: siblingId, sequence: 1, text: 'sibling-alive' },
|
|
492
|
-
]);
|
|
493
|
-
siblingSink?.complete('sibling-done');
|
|
494
|
-
expect(runtime.poll()).toEqual([
|
|
495
|
-
{
|
|
496
|
-
type: 'completed',
|
|
497
|
-
activityId: siblingId,
|
|
498
|
-
sequence: 2,
|
|
499
|
-
session: sibling.value.session,
|
|
500
|
-
output: 'sibling-done',
|
|
501
|
-
},
|
|
502
|
-
]);
|
|
503
|
-
});
|
|
504
156
|
});
|
package/src/errors.ts
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import type { ActivityId } from './types';
|
|
2
2
|
|
|
3
|
+
export type IntelligenceErrorCode =
|
|
4
|
+
| 'intelligence-invalid-request'
|
|
5
|
+
| 'intelligence-session-provider-mismatch'
|
|
6
|
+
| 'intelligence-capacity-exceeded'
|
|
7
|
+
| 'intelligence-activity-not-found'
|
|
8
|
+
| 'intelligence-provider-failed'
|
|
9
|
+
| 'intelligence-output-overflow'
|
|
10
|
+
| 'intelligence-closed';
|
|
11
|
+
|
|
3
12
|
export interface IntelligenceErrorDetailMap {
|
|
4
13
|
readonly 'intelligence-invalid-request': { readonly field: 'input'; readonly reason: string };
|
|
5
14
|
readonly 'intelligence-session-provider-mismatch': {
|
|
@@ -17,8 +26,6 @@ export interface IntelligenceErrorDetailMap {
|
|
|
17
26
|
readonly 'intelligence-closed': Readonly<Record<string, never>>;
|
|
18
27
|
}
|
|
19
28
|
|
|
20
|
-
export type IntelligenceErrorCode = keyof IntelligenceErrorDetailMap;
|
|
21
|
-
|
|
22
29
|
export type IntelligenceErrorDetailFor<C extends IntelligenceErrorCode> =
|
|
23
30
|
IntelligenceErrorDetailMap[C];
|
|
24
31
|
|
package/src/runtime.ts
CHANGED
|
@@ -108,13 +108,7 @@ export class IntelligenceRuntime implements IntelligenceService {
|
|
|
108
108
|
terminal: false,
|
|
109
109
|
};
|
|
110
110
|
this.records.set(submission.id, record);
|
|
111
|
-
|
|
112
|
-
try {
|
|
113
|
-
started = this.provider.start(submission, this.createSink(record));
|
|
114
|
-
} catch (cause) {
|
|
115
|
-
this.records.delete(submission.id);
|
|
116
|
-
return err(providerError(this.providerId, cause));
|
|
117
|
-
}
|
|
111
|
+
const started = this.provider.start(submission, this.createSink(record));
|
|
118
112
|
if (!started.ok) {
|
|
119
113
|
this.records.delete(submission.id);
|
|
120
114
|
return started;
|
|
@@ -148,11 +142,7 @@ export class IntelligenceRuntime implements IntelligenceService {
|
|
|
148
142
|
}),
|
|
149
143
|
);
|
|
150
144
|
}
|
|
151
|
-
|
|
152
|
-
return this.provider.cancel(activity);
|
|
153
|
-
} catch (cause) {
|
|
154
|
-
return err(providerError(this.providerId, cause));
|
|
155
|
-
}
|
|
145
|
+
return this.provider.cancel(activity);
|
|
156
146
|
}
|
|
157
147
|
|
|
158
148
|
close(): Promise<void> {
|
|
@@ -253,11 +243,7 @@ export class IntelligenceRuntime implements IntelligenceService {
|
|
|
253
243
|
});
|
|
254
244
|
if (record.events.length >= this.limits.maxPendingEventsPerActivity) record.events.pop();
|
|
255
245
|
this.push(record, { type: 'failed', error: intelligenceFailure(error) });
|
|
256
|
-
|
|
257
|
-
this.provider.cancel(record.ref.id);
|
|
258
|
-
} catch {
|
|
259
|
-
// The overflow terminal already owns the activity outcome.
|
|
260
|
-
}
|
|
246
|
+
this.provider.cancel(record.ref.id);
|
|
261
247
|
}
|
|
262
248
|
|
|
263
249
|
private push(
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { IntelligenceErrorCode, IntelligenceErrorDetailMap } from '../errors';
|
|
2
|
-
import type { INTELLIGENCE_ERROR_HINTS, INTELLIGENCE_EXPECTED, IntelligenceErrorDetailFor, IntelligenceFailure, IntelligenceError as PublicIntelligenceError, IntelligenceErrorCode as PublicIntelligenceErrorCode } from '../index';
|
|
3
|
-
type Equal<Left, Right> = (<Type>() => Type extends Left ? 1 : 2) extends <Type>() => Type extends Right ? 1 : 2 ? true : false;
|
|
4
|
-
type Assert<Value extends true> = Value;
|
|
5
|
-
type ExpectedCodes = 'intelligence-invalid-request' | 'intelligence-session-provider-mismatch' | 'intelligence-capacity-exceeded' | 'intelligence-activity-not-found' | 'intelligence-provider-failed' | 'intelligence-output-overflow' | 'intelligence-closed';
|
|
6
|
-
type _CodeIsDetailMapKeys = Assert<Equal<IntelligenceErrorCode, keyof IntelligenceErrorDetailMap>>;
|
|
7
|
-
type _CodeHasExactMembership = Assert<Equal<IntelligenceErrorCode, ExpectedCodes>>;
|
|
8
|
-
type _PublicCodeIsOwnerCode = Assert<Equal<PublicIntelligenceErrorCode, IntelligenceErrorCode>>;
|
|
9
|
-
type _ExpectedKeysAreCodes = Assert<Equal<keyof typeof INTELLIGENCE_EXPECTED, IntelligenceErrorCode>>;
|
|
10
|
-
type _HintKeysAreCodes = Assert<Equal<keyof typeof INTELLIGENCE_ERROR_HINTS, IntelligenceErrorCode>>;
|
|
11
|
-
type _DetailProjectionUsesTheMap = Assert<Equal<IntelligenceErrorDetailFor<'intelligence-output-overflow'>, IntelligenceErrorDetailMap['intelligence-output-overflow']>>;
|
|
12
|
-
declare function readErrorDetail(error: PublicIntelligenceError): string;
|
|
13
|
-
declare function readFailure(error: IntelligenceFailure): string;
|
|
14
|
-
export type _IntelligenceErrorCodeOwnerChecks = {
|
|
15
|
-
/** @internal */
|
|
16
|
-
_mapKeys: _CodeIsDetailMapKeys;
|
|
17
|
-
/** @internal */
|
|
18
|
-
_membership: _CodeHasExactMembership;
|
|
19
|
-
/** @internal */
|
|
20
|
-
_publicCode: _PublicCodeIsOwnerCode;
|
|
21
|
-
/** @internal */
|
|
22
|
-
_expectedKeys: _ExpectedKeysAreCodes;
|
|
23
|
-
/** @internal */
|
|
24
|
-
_hintKeys: _HintKeysAreCodes;
|
|
25
|
-
/** @internal */
|
|
26
|
-
_detailProjection: _DetailProjectionUsesTheMap;
|
|
27
|
-
/** @internal */
|
|
28
|
-
_readErrorDetail: typeof readErrorDetail;
|
|
29
|
-
/** @internal */
|
|
30
|
-
_readFailure: typeof readFailure;
|
|
31
|
-
};
|
|
32
|
-
export {};
|
|
33
|
-
//# sourceMappingURL=intelligence-error-code-owner.test-d.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"intelligence-error-code-ow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ACvC,KAAK,CACH,0BAA0B,CAAC,8BAA8B,CAAC,EAC1D,0BAA0B,CAAC,8BAA8B,CAAC,CAC3D,CACF,CAAC;AAgCF,iBAAS,eAAe,CAAC,KAAK,EAAE,uBAAuB,GAAG,MAAM,CAqB/D;AAED,iBAAS,WAAW,CAAC,KAAK,EAAE,mBAAmB,GAAG,MAAM,CAmBvD;AAUD,MAAM,MAAM,iCAAiC,GAAG;IAC9C,gBAAgB;IAChB,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,gBAAgB;IAChB,WAAW,EAAE,uBAAuB,CAAC;IACrC,gBAAgB;IAChB,WAAW,EAAE,sBAAsB,CAAC;IACpC,gBAAgB;IAChB,aAAa,EAAE,qBAAqB,CAAC;IACrC,gBAAgB;IAChB,SAAS,EAAE,iBAAiB,CAAC;IAC7B,gBAAgB;IAChB,iBAAiB,EAAE,2BAA2B,CAAC;IAC/C,gBAAgB;IAChB,gBAAgB,EAAE,OAAO,eAAe,CAAC;IACzC,gBAAgB;IAChB,YAAY,EAAE,OAAO,WAAW,CAAC;CAClC,CAAC"}
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
import type { IntelligenceErrorCode, IntelligenceErrorDetailMap } from '../errors';
|
|
2
|
-
import type {
|
|
3
|
-
INTELLIGENCE_ERROR_HINTS,
|
|
4
|
-
INTELLIGENCE_EXPECTED,
|
|
5
|
-
IntelligenceErrorDetailFor,
|
|
6
|
-
IntelligenceFailure,
|
|
7
|
-
IntelligenceError as PublicIntelligenceError,
|
|
8
|
-
IntelligenceErrorCode as PublicIntelligenceErrorCode,
|
|
9
|
-
} from '../index';
|
|
10
|
-
import { activityId, IntelligenceError, intelligenceFailure, providerError } from '../index';
|
|
11
|
-
|
|
12
|
-
type Equal<Left, Right> =
|
|
13
|
-
(<Type>() => Type extends Left ? 1 : 2) extends <Type>() => Type extends Right ? 1 : 2
|
|
14
|
-
? true
|
|
15
|
-
: false;
|
|
16
|
-
|
|
17
|
-
type Assert<Value extends true> = Value;
|
|
18
|
-
|
|
19
|
-
type ExpectedCodes =
|
|
20
|
-
| 'intelligence-invalid-request'
|
|
21
|
-
| 'intelligence-session-provider-mismatch'
|
|
22
|
-
| 'intelligence-capacity-exceeded'
|
|
23
|
-
| 'intelligence-activity-not-found'
|
|
24
|
-
| 'intelligence-provider-failed'
|
|
25
|
-
| 'intelligence-output-overflow'
|
|
26
|
-
| 'intelligence-closed';
|
|
27
|
-
|
|
28
|
-
type _CodeIsDetailMapKeys = Assert<Equal<IntelligenceErrorCode, keyof IntelligenceErrorDetailMap>>;
|
|
29
|
-
type _CodeHasExactMembership = Assert<Equal<IntelligenceErrorCode, ExpectedCodes>>;
|
|
30
|
-
type _PublicCodeIsOwnerCode = Assert<Equal<PublicIntelligenceErrorCode, IntelligenceErrorCode>>;
|
|
31
|
-
type _ExpectedKeysAreCodes = Assert<
|
|
32
|
-
Equal<keyof typeof INTELLIGENCE_EXPECTED, IntelligenceErrorCode>
|
|
33
|
-
>;
|
|
34
|
-
type _HintKeysAreCodes = Assert<
|
|
35
|
-
Equal<keyof typeof INTELLIGENCE_ERROR_HINTS, IntelligenceErrorCode>
|
|
36
|
-
>;
|
|
37
|
-
type _DetailProjectionUsesTheMap = Assert<
|
|
38
|
-
Equal<
|
|
39
|
-
IntelligenceErrorDetailFor<'intelligence-output-overflow'>,
|
|
40
|
-
IntelligenceErrorDetailMap['intelligence-output-overflow']
|
|
41
|
-
>
|
|
42
|
-
>;
|
|
43
|
-
|
|
44
|
-
const acceptsCode = (code: PublicIntelligenceErrorCode): PublicIntelligenceErrorCode => code;
|
|
45
|
-
acceptsCode('intelligence-closed');
|
|
46
|
-
// @ts-expect-error unknown literals remain outside the closed public code union.
|
|
47
|
-
acceptsCode('intelligence-not-real');
|
|
48
|
-
|
|
49
|
-
const overflow = new IntelligenceError({
|
|
50
|
-
code: 'intelligence-output-overflow',
|
|
51
|
-
detail: {
|
|
52
|
-
activityId: activityId('overflow'),
|
|
53
|
-
bound: 'output-chars',
|
|
54
|
-
limit: 256,
|
|
55
|
-
},
|
|
56
|
-
});
|
|
57
|
-
type OverflowError = Extract<
|
|
58
|
-
PublicIntelligenceError,
|
|
59
|
-
{ readonly code: 'intelligence-output-overflow' }
|
|
60
|
-
>;
|
|
61
|
-
const typedOverflow: OverflowError = overflow;
|
|
62
|
-
const expected: string = overflow.expected;
|
|
63
|
-
const hint: string = overflow.hint;
|
|
64
|
-
void typedOverflow;
|
|
65
|
-
void expected;
|
|
66
|
-
void hint;
|
|
67
|
-
|
|
68
|
-
new IntelligenceError({
|
|
69
|
-
code: 'intelligence-capacity-exceeded',
|
|
70
|
-
// @ts-expect-error the detail must match the selected code.
|
|
71
|
-
detail: { activityId: activityId('wrong-detail') },
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
function readErrorDetail(error: PublicIntelligenceError): string {
|
|
75
|
-
switch (error.code) {
|
|
76
|
-
case 'intelligence-invalid-request':
|
|
77
|
-
// @ts-expect-error code-driven narrowing excludes unrelated detail fields.
|
|
78
|
-
void error.detail.limit;
|
|
79
|
-
return `${error.detail.field}:${error.detail.reason}`;
|
|
80
|
-
case 'intelligence-session-provider-mismatch':
|
|
81
|
-
return `${error.detail.expectedProviderId}:${error.detail.receivedProviderId}`;
|
|
82
|
-
case 'intelligence-capacity-exceeded':
|
|
83
|
-
return String(error.detail.limit);
|
|
84
|
-
case 'intelligence-activity-not-found':
|
|
85
|
-
return error.detail.activityId;
|
|
86
|
-
case 'intelligence-provider-failed':
|
|
87
|
-
return `${error.detail.providerId}:${String(error.detail.cause)}`;
|
|
88
|
-
case 'intelligence-output-overflow':
|
|
89
|
-
return `${error.detail.activityId}:${error.detail.bound}:${error.detail.limit}`;
|
|
90
|
-
case 'intelligence-closed':
|
|
91
|
-
return Object.keys(error.detail).join(',');
|
|
92
|
-
}
|
|
93
|
-
const exhaustive: never = error;
|
|
94
|
-
return exhaustive;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
function readFailure(error: IntelligenceFailure): string {
|
|
98
|
-
switch (error.code) {
|
|
99
|
-
case 'intelligence-invalid-request':
|
|
100
|
-
return `${error.detail.field}:${error.detail.reason}`;
|
|
101
|
-
case 'intelligence-session-provider-mismatch':
|
|
102
|
-
return `${error.detail.expectedProviderId}:${error.detail.receivedProviderId}`;
|
|
103
|
-
case 'intelligence-capacity-exceeded':
|
|
104
|
-
return String(error.detail.limit);
|
|
105
|
-
case 'intelligence-activity-not-found':
|
|
106
|
-
return error.detail.activityId;
|
|
107
|
-
case 'intelligence-provider-failed':
|
|
108
|
-
return `${error.detail.providerId}:${error.detail.cause}`;
|
|
109
|
-
case 'intelligence-output-overflow':
|
|
110
|
-
return `${error.detail.activityId}:${error.detail.bound}:${error.detail.limit}`;
|
|
111
|
-
case 'intelligence-closed':
|
|
112
|
-
return Object.keys(error.detail).join(',');
|
|
113
|
-
}
|
|
114
|
-
const exhaustive: never = error;
|
|
115
|
-
return exhaustive;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
const projectedFailure: IntelligenceFailure = intelligenceFailure(
|
|
119
|
-
providerError('test.provider', new Error('failed')),
|
|
120
|
-
);
|
|
121
|
-
void acceptsCode;
|
|
122
|
-
void readErrorDetail;
|
|
123
|
-
void readFailure;
|
|
124
|
-
void projectedFailure;
|
|
125
|
-
|
|
126
|
-
export type _IntelligenceErrorCodeOwnerChecks = {
|
|
127
|
-
/** @internal */
|
|
128
|
-
_mapKeys: _CodeIsDetailMapKeys;
|
|
129
|
-
/** @internal */
|
|
130
|
-
_membership: _CodeHasExactMembership;
|
|
131
|
-
/** @internal */
|
|
132
|
-
_publicCode: _PublicCodeIsOwnerCode;
|
|
133
|
-
/** @internal */
|
|
134
|
-
_expectedKeys: _ExpectedKeysAreCodes;
|
|
135
|
-
/** @internal */
|
|
136
|
-
_hintKeys: _HintKeysAreCodes;
|
|
137
|
-
/** @internal */
|
|
138
|
-
_detailProjection: _DetailProjectionUsesTheMap;
|
|
139
|
-
/** @internal */
|
|
140
|
-
_readErrorDetail: typeof readErrorDetail;
|
|
141
|
-
/** @internal */
|
|
142
|
-
_readFailure: typeof readFailure;
|
|
143
|
-
};
|