skeleton-crew-runtime 0.1.3 → 0.1.5

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.
Files changed (42) hide show
  1. package/dist/.tsbuildinfo +1 -0
  2. package/dist/action-engine.d.ts +0 -75
  3. package/dist/action-engine.d.ts.map +1 -1
  4. package/dist/action-engine.js +13 -96
  5. package/dist/action-engine.js.map +1 -1
  6. package/dist/event-bus.d.ts +0 -44
  7. package/dist/event-bus.d.ts.map +1 -1
  8. package/dist/event-bus.js +13 -59
  9. package/dist/event-bus.js.map +1 -1
  10. package/dist/index.d.ts +2 -0
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +1 -2
  13. package/dist/index.js.map +1 -1
  14. package/dist/performance.d.ts +18 -0
  15. package/dist/performance.d.ts.map +1 -0
  16. package/dist/performance.js +31 -0
  17. package/dist/performance.js.map +1 -0
  18. package/dist/plugin-registry.d.ts +0 -8
  19. package/dist/plugin-registry.d.ts.map +1 -1
  20. package/dist/plugin-registry.js +2 -23
  21. package/dist/plugin-registry.js.map +1 -1
  22. package/dist/runtime-context.d.ts +17 -68
  23. package/dist/runtime-context.d.ts.map +1 -1
  24. package/dist/runtime-context.js +26 -99
  25. package/dist/runtime-context.js.map +1 -1
  26. package/dist/runtime.d.ts +3 -100
  27. package/dist/runtime.d.ts.map +1 -1
  28. package/dist/runtime.js +7 -136
  29. package/dist/runtime.js.map +1 -1
  30. package/dist/screen-registry.d.ts +0 -40
  31. package/dist/screen-registry.d.ts.map +1 -1
  32. package/dist/screen-registry.js +0 -44
  33. package/dist/screen-registry.js.map +1 -1
  34. package/dist/types.d.ts +2 -70
  35. package/dist/types.d.ts.map +1 -1
  36. package/dist/types.js +0 -27
  37. package/dist/types.js.map +1 -1
  38. package/dist/ui-bridge.d.ts +0 -27
  39. package/dist/ui-bridge.d.ts.map +1 -1
  40. package/dist/ui-bridge.js +0 -29
  41. package/dist/ui-bridge.js.map +1 -1
  42. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/typescript/lib/lib.es2021.d.ts","../node_modules/typescript/lib/lib.es2022.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2016.intl.d.ts","../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../node_modules/typescript/lib/lib.es2017.date.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/typescript/lib/lib.es2019.intl.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.es2020.date.d.ts","../node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/typescript/lib/lib.es2020.number.d.ts","../node_modules/typescript/lib/lib.es2021.promise.d.ts","../node_modules/typescript/lib/lib.es2021.string.d.ts","../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../node_modules/typescript/lib/lib.es2021.intl.d.ts","../node_modules/typescript/lib/lib.es2022.array.d.ts","../node_modules/typescript/lib/lib.es2022.error.d.ts","../node_modules/typescript/lib/lib.es2022.intl.d.ts","../node_modules/typescript/lib/lib.es2022.object.d.ts","../node_modules/typescript/lib/lib.es2022.string.d.ts","../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../node_modules/typescript/lib/lib.decorators.d.ts","../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../src/types.ts","../src/action-engine.ts","../src/event-bus.ts","../src/plugin-registry.ts","../src/screen-registry.ts","../src/ui-bridge.ts","../src/runtime-context.ts","../src/performance.ts","../src/runtime.ts","../src/index.ts","../node_modules/@babel/types/lib/index.d.ts","../node_modules/@types/babel__generator/index.d.ts","../node_modules/@babel/parser/typings/babel-parser.d.ts","../node_modules/@types/babel__template/index.d.ts","../node_modules/@types/babel__traverse/index.d.ts","../node_modules/@types/babel__core/index.d.ts","../node_modules/@types/estree/index.d.ts","../node_modules/@types/node/compatibility/disposable.d.ts","../node_modules/@types/node/compatibility/indexable.d.ts","../node_modules/@types/node/compatibility/iterators.d.ts","../node_modules/@types/node/compatibility/index.d.ts","../node_modules/@types/node/globals.typedarray.d.ts","../node_modules/@types/node/buffer.buffer.d.ts","../node_modules/@types/node/globals.d.ts","../node_modules/@types/node/web-globals/abortcontroller.d.ts","../node_modules/@types/node/web-globals/domexception.d.ts","../node_modules/@types/node/web-globals/events.d.ts","../node_modules/undici-types/header.d.ts","../node_modules/undici-types/readable.d.ts","../node_modules/undici-types/file.d.ts","../node_modules/undici-types/fetch.d.ts","../node_modules/undici-types/formdata.d.ts","../node_modules/undici-types/connector.d.ts","../node_modules/undici-types/client.d.ts","../node_modules/undici-types/errors.d.ts","../node_modules/undici-types/dispatcher.d.ts","../node_modules/undici-types/global-dispatcher.d.ts","../node_modules/undici-types/global-origin.d.ts","../node_modules/undici-types/pool-stats.d.ts","../node_modules/undici-types/pool.d.ts","../node_modules/undici-types/handlers.d.ts","../node_modules/undici-types/balanced-pool.d.ts","../node_modules/undici-types/agent.d.ts","../node_modules/undici-types/mock-interceptor.d.ts","../node_modules/undici-types/mock-agent.d.ts","../node_modules/undici-types/mock-client.d.ts","../node_modules/undici-types/mock-pool.d.ts","../node_modules/undici-types/mock-errors.d.ts","../node_modules/undici-types/proxy-agent.d.ts","../node_modules/undici-types/env-http-proxy-agent.d.ts","../node_modules/undici-types/retry-handler.d.ts","../node_modules/undici-types/retry-agent.d.ts","../node_modules/undici-types/api.d.ts","../node_modules/undici-types/interceptors.d.ts","../node_modules/undici-types/util.d.ts","../node_modules/undici-types/cookies.d.ts","../node_modules/undici-types/patch.d.ts","../node_modules/undici-types/websocket.d.ts","../node_modules/undici-types/eventsource.d.ts","../node_modules/undici-types/filereader.d.ts","../node_modules/undici-types/diagnostics-channel.d.ts","../node_modules/undici-types/content-type.d.ts","../node_modules/undici-types/cache.d.ts","../node_modules/undici-types/index.d.ts","../node_modules/@types/node/web-globals/fetch.d.ts","../node_modules/@types/node/assert.d.ts","../node_modules/@types/node/assert/strict.d.ts","../node_modules/@types/node/async_hooks.d.ts","../node_modules/@types/node/buffer.d.ts","../node_modules/@types/node/child_process.d.ts","../node_modules/@types/node/cluster.d.ts","../node_modules/@types/node/console.d.ts","../node_modules/@types/node/constants.d.ts","../node_modules/@types/node/crypto.d.ts","../node_modules/@types/node/dgram.d.ts","../node_modules/@types/node/diagnostics_channel.d.ts","../node_modules/@types/node/dns.d.ts","../node_modules/@types/node/dns/promises.d.ts","../node_modules/@types/node/domain.d.ts","../node_modules/@types/node/events.d.ts","../node_modules/@types/node/fs.d.ts","../node_modules/@types/node/fs/promises.d.ts","../node_modules/@types/node/http.d.ts","../node_modules/@types/node/http2.d.ts","../node_modules/@types/node/https.d.ts","../node_modules/@types/node/inspector.generated.d.ts","../node_modules/@types/node/module.d.ts","../node_modules/@types/node/net.d.ts","../node_modules/@types/node/os.d.ts","../node_modules/@types/node/path.d.ts","../node_modules/@types/node/perf_hooks.d.ts","../node_modules/@types/node/process.d.ts","../node_modules/@types/node/punycode.d.ts","../node_modules/@types/node/querystring.d.ts","../node_modules/@types/node/readline.d.ts","../node_modules/@types/node/readline/promises.d.ts","../node_modules/@types/node/repl.d.ts","../node_modules/@types/node/sea.d.ts","../node_modules/@types/node/stream.d.ts","../node_modules/@types/node/stream/promises.d.ts","../node_modules/@types/node/stream/consumers.d.ts","../node_modules/@types/node/stream/web.d.ts","../node_modules/@types/node/string_decoder.d.ts","../node_modules/@types/node/test.d.ts","../node_modules/@types/node/timers.d.ts","../node_modules/@types/node/timers/promises.d.ts","../node_modules/@types/node/tls.d.ts","../node_modules/@types/node/trace_events.d.ts","../node_modules/@types/node/tty.d.ts","../node_modules/@types/node/url.d.ts","../node_modules/@types/node/util.d.ts","../node_modules/@types/node/v8.d.ts","../node_modules/@types/node/vm.d.ts","../node_modules/@types/node/wasi.d.ts","../node_modules/@types/node/worker_threads.d.ts","../node_modules/@types/node/zlib.d.ts","../node_modules/@types/node/index.d.ts","../node_modules/@types/prop-types/index.d.ts","../node_modules/@types/react/global.d.ts","../node_modules/csstype/index.d.ts","../node_modules/@types/react/index.d.ts","../node_modules/@types/react-dom/index.d.ts"],"fileIdsList":[[68,80,126],[80,126],[68,69,70,71,72,80,126],[68,70,80,126],[80,123,126],[80,125,126],[126],[80,126,131,159],[80,126,127,132,137,145,156,167],[80,126,127,128,137,145],[75,76,77,80,126],[80,126,129,168],[80,126,130,131,138,146],[80,126,131,156,164],[80,126,132,134,137,145],[80,125,126,133],[80,126,134,135],[80,126,136,137],[80,125,126,137],[80,126,137,138,139,156,167],[80,126,137,138,139,152,156,159],[80,126,134,137,140,145,156,167],[80,126,137,138,140,141,145,156,164,167],[80,126,140,142,156,164,167],[78,79,80,81,82,83,84,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173],[80,126,137,143],[80,126,144,167,172],[80,126,134,137,145,156],[80,126,146],[80,126,147],[80,125,126,148],[80,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173],[80,126,150],[80,126,151],[80,126,137,152,153],[80,126,152,154,168,170],[80,126,137,156,157,159],[80,126,158,159],[80,126,156,157],[80,126,159],[80,126,160],[80,123,126,156,161],[80,126,137,162,163],[80,126,162,163],[80,126,131,145,156,164],[80,126,165],[80,126,145,166],[80,126,140,151,167],[80,126,131,168],[80,126,156,169],[80,126,144,170],[80,126,171],[80,121,126],[80,121,126,137,139,148,156,159,167,170,172],[80,126,156,173],[80,126,178],[80,126,175,176,177],[80,93,97,126,167],[80,93,126,156,167],[80,88,126],[80,90,93,126,164,167],[80,126,145,164],[80,126,174],[80,88,126,174],[80,90,93,126,145,167],[80,85,86,89,92,126,137,156,167],[80,93,100,126],[80,85,91,126],[80,93,114,115,126],[80,89,93,126,159,167,174],[80,114,126,174],[80,87,88,126,174],[80,93,126],[80,87,88,89,90,91,92,93,94,95,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,115,116,117,118,119,120,126],[80,93,108,126],[80,93,100,101,126],[80,91,93,101,102,126],[80,92,126],[80,85,88,93,126],[80,93,97,101,102,126],[80,97,126],[80,91,93,96,126,167],[80,85,90,93,100,126],[80,126,156],[80,88,93,114,126,172,174],[58,80,126],[58,59,60,61,62,63,64,65,66,80,126],[58,59,60,61,62,66,80,126],[58,59,60,61,62,63,64,65,80,126]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cdf8847677ac7d20486e54dd3fcf09eda95812ac8ace44b4418da1bbbab6eb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"b84fb85a72ed92c91ba34faf845d537c9491dcf5ac07a452a01173625514502f","signature":"f2692d10e365029db8f239da6ef49ee319da62996c99f63e251d95c08f125971"},{"version":"337da3340252013653a6ff85a039337e8e77910f022c4e1822e8c8289ac3d1d8","signature":"baa0dc6c183d3d7065e4cedc9c8d4aee898919bb6c5dcadd8d2b24900750f527"},{"version":"38df4a5ec591399bcf068660937286e7fe050f7bd67f889a205095c58d8eff8f","signature":"d4aeb1bde07c1dac6192ea79d8bb51c40b87b9927995420345c46896daf716b6"},{"version":"2bb5bd3a0f9adcf2ef10107af0db82b9e4dd3daa125a41af9491015cbdd62f93","signature":"fc51eba0b331b29451b2791442a4b38438d16413d26430363e45f70cce76e0c8"},{"version":"ce1df8f4295a5d9239ac7cfe6a413bfcce4c4b4710e48600e2cd0f46414dfaca","signature":"cb3862d6bdfa85fd5b67ace2191c2f0cb0924af0f972f1e9c078d31ae375966c"},{"version":"05f80e3a5691e18cb744af788ec9947683a12106c1e8a0e6398538f3740f22aa","signature":"fc55fdaadcfd85c145283e60761f8ddb4307c3bd0452bf9d66a44ea0bdcc5cd3"},{"version":"6d964bc72b8ac7f3611cb7aaaa60a29606d63761482da26e9e3eb856148aeb2a","signature":"d1c783718371766988c40d621c659b6c95d42d111de15a9efc46924e1c9d5a6d"},{"version":"3cf6a87a71aebd9cf4e8e3e348cc80cfd50b8c522905547dbbfcc691d4006cbd","signature":"e18ac9f027f2be4edce9e2fe3ea20ea28a159615e7cb1c91755958f15dae39ee"},{"version":"db337fafdfac2bc67646579e70dc9847259712b8fd85f1b0c271a64a2cb7e6ca","signature":"cb40080eaaa687dc4c8201d2f255ba18af49abeb1bf44a9b20cc7166fd34ae99"},{"version":"28da17b6e7d949599fd3e66b91f7f7ca06d2a0a4862fd3432e8a7e834dffa39e","signature":"71a07d2fdaaa6cda9c4d95d38538fd5b6d6a2ab0bccaee777c08de1e539985d2"},{"version":"c2c2a861a338244d7dd700d0c52a78916b4bb75b98fc8ca5e7c501899fc03796","impliedFormat":1},{"version":"b6d03c9cfe2cf0ba4c673c209fcd7c46c815b2619fd2aad59fc4229aaef2ed43","impliedFormat":1},{"version":"adb467429462e3891de5bb4a82a4189b92005d61c7f9367c089baf03997c104e","impliedFormat":1},{"version":"670a76db379b27c8ff42f1ba927828a22862e2ab0b0908e38b671f0e912cc5ed","impliedFormat":1},{"version":"13b77ab19ef7aadd86a1e54f2f08ea23a6d74e102909e3c00d31f231ed040f62","impliedFormat":1},{"version":"069bebfee29864e3955378107e243508b163e77ab10de6a5ee03ae06939f0bb9","impliedFormat":1},{"version":"151ff381ef9ff8da2da9b9663ebf657eac35c4c9a19183420c05728f31a6761d","impliedFormat":1},{"version":"70521b6ab0dcba37539e5303104f29b721bfb2940b2776da4cc818c07e1fefc1","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab41ef1f2cdafb8df48be20cd969d875602483859dc194e9c97c8a576892c052","affectsGlobalScope":true,"impliedFormat":1},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"98cffbf06d6bab333473c70a893770dbe990783904002c4f1a960447b4b53dca","affectsGlobalScope":true,"impliedFormat":1},{"version":"ba481bca06f37d3f2c137ce343c7d5937029b2468f8e26111f3c9d9963d6568d","affectsGlobalScope":true,"impliedFormat":1},{"version":"6d9ef24f9a22a88e3e9b3b3d8c40ab1ddb0853f1bfbd5c843c37800138437b61","affectsGlobalScope":true,"impliedFormat":1},{"version":"1db0b7dca579049ca4193d034d835f6bfe73096c73663e5ef9a0b5779939f3d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"9798340ffb0d067d69b1ae5b32faa17ab31b82466a3fc00d8f2f2df0c8554aaa","affectsGlobalScope":true,"impliedFormat":1},{"version":"f26b11d8d8e4b8028f1c7d618b22274c892e4b0ef5b3678a8ccbad85419aef43","affectsGlobalScope":true,"impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"763fe0f42b3d79b440a9b6e51e9ba3f3f91352469c1e4b3b67bfa4ff6352f3f4","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"7f182617db458e98fc18dfb272d40aa2fff3a353c44a89b2c0ccb3937709bfb5","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"e61be3f894b41b7baa1fbd6a66893f2579bfad01d208b4ff61daef21493ef0a8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"615ba88d0128ed16bf83ef8ccbb6aff05c3ee2db1cc0f89ab50a4939bfc1943f","impliedFormat":1},{"version":"a4d551dbf8746780194d550c88f26cf937caf8d56f102969a110cfaed4b06656","impliedFormat":1},{"version":"8bd86b8e8f6a6aa6c49b71e14c4ffe1211a0e97c80f08d2c8cc98838006e4b88","impliedFormat":1},{"version":"317e63deeb21ac07f3992f5b50cdca8338f10acd4fbb7257ebf56735bf52ab00","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"2cbe0621042e2a68c7cbce5dfed3906a1862a16a7d496010636cdbdb91341c0f","affectsGlobalScope":true,"impliedFormat":1},{"version":"e2677634fe27e87348825bb041651e22d50a613e2fdf6a4a3ade971d71bac37e","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"8c0bcd6c6b67b4b503c11e91a1fb91522ed585900eab2ab1f61bba7d7caa9d6f","impliedFormat":1},{"version":"8cd19276b6590b3ebbeeb030ac271871b9ed0afc3074ac88a94ed2449174b776","affectsGlobalScope":true,"impliedFormat":1},{"version":"696eb8d28f5949b87d894b26dc97318ef944c794a9a4e4f62360cd1d1958014b","impliedFormat":1},{"version":"3f8fa3061bd7402970b399300880d55257953ee6d3cd408722cb9ac20126460c","impliedFormat":1},{"version":"35ec8b6760fd7138bbf5809b84551e31028fb2ba7b6dc91d95d098bf212ca8b4","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"68bd56c92c2bd7d2339457eb84d63e7de3bd56a69b25f3576e1568d21a162398","affectsGlobalScope":true,"impliedFormat":1},{"version":"3e93b123f7c2944969d291b35fed2af79a6e9e27fdd5faa99748a51c07c02d28","impliedFormat":1},{"version":"9d19808c8c291a9010a6c788e8532a2da70f811adb431c97520803e0ec649991","impliedFormat":1},{"version":"87aad3dd9752067dc875cfaa466fc44246451c0c560b820796bdd528e29bef40","impliedFormat":1},{"version":"4aacb0dd020eeaef65426153686cc639a78ec2885dc72ad220be1d25f1a439df","impliedFormat":1},{"version":"f0bd7e6d931657b59605c44112eaf8b980ba7f957a5051ed21cb93d978cf2f45","impliedFormat":1},{"version":"8db0ae9cb14d9955b14c214f34dae1b9ef2baee2fe4ce794a4cd3ac2531e3255","affectsGlobalScope":true,"impliedFormat":1},{"version":"15fc6f7512c86810273af28f224251a5a879e4261b4d4c7e532abfbfc3983134","impliedFormat":1},{"version":"58adba1a8ab2d10b54dc1dced4e41f4e7c9772cbbac40939c0dc8ce2cdb1d442","impliedFormat":1},{"version":"2fd4c143eff88dabb57701e6a40e02a4dbc36d5eb1362e7964d32028056a782b","impliedFormat":1},{"version":"714435130b9015fae551788df2a88038471a5a11eb471f27c4ede86552842bc9","impliedFormat":1},{"version":"855cd5f7eb396f5f1ab1bc0f8580339bff77b68a770f84c6b254e319bbfd1ac7","impliedFormat":1},{"version":"5650cf3dace09e7c25d384e3e6b818b938f68f4e8de96f52d9c5a1b3db068e86","impliedFormat":1},{"version":"1354ca5c38bd3fd3836a68e0f7c9f91f172582ba30ab15bb8c075891b91502b7","affectsGlobalScope":true,"impliedFormat":1},{"version":"27fdb0da0daf3b337c5530c5f266efe046a6ceb606e395b346974e4360c36419","impliedFormat":1},{"version":"2d2fcaab481b31a5882065c7951255703ddbe1c0e507af56ea42d79ac3911201","impliedFormat":1},{"version":"afbe24ab0d74694372baa632ecb28bb375be53f3be53f9b07ecd7fc994907de5","impliedFormat":1},{"version":"ca867399f7db82df981d6915bcbb2d81131d7d1ef683bc782b59f71dda59bc85","affectsGlobalScope":true,"impliedFormat":1},{"version":"00877fef624f3171c2e44944fb63a55e2a9f9120d7c8b5eb4181c263c9a077cf","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e043a1bc8fbf2a255bccf9bf27e0f1caf916c3b0518ea34aa72357c0afd42ec","impliedFormat":1},{"version":"b4f70ec656a11d570e1a9edce07d118cd58d9760239e2ece99306ee9dfe61d02","impliedFormat":1},{"version":"3bc2f1e2c95c04048212c569ed38e338873f6a8593930cf5a7ef24ffb38fc3b6","impliedFormat":1},{"version":"6e70e9570e98aae2b825b533aa6292b6abd542e8d9f6e9475e88e1d7ba17c866","impliedFormat":1},{"version":"f9d9d753d430ed050dc1bf2667a1bab711ccbb1c1507183d794cc195a5b085cc","impliedFormat":1},{"version":"9eece5e586312581ccd106d4853e861aaaa1a39f8e3ea672b8c3847eedd12f6e","impliedFormat":1},{"version":"47ab634529c5955b6ad793474ae188fce3e6163e3a3fb5edd7e0e48f14435333","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"45650f47bfb376c8a8ed39d4bcda5902ab899a3150029684ee4c10676d9fbaee","impliedFormat":1},{"version":"0225ecb9ed86bdb7a2c7fd01f1556906902929377b44483dc4b83e03b3ef227d","affectsGlobalScope":true,"impliedFormat":1},{"version":"74cf591a0f63db318651e0e04cb55f8791385f86e987a67fd4d2eaab8191f730","impliedFormat":1},{"version":"5eab9b3dc9b34f185417342436ec3f106898da5f4801992d8ff38ab3aff346b5","impliedFormat":1},{"version":"12ed4559eba17cd977aa0db658d25c4047067444b51acfdcbf38470630642b23","affectsGlobalScope":true,"impliedFormat":1},{"version":"f3ffabc95802521e1e4bcba4c88d8615176dc6e09111d920c7a213bdda6e1d65","impliedFormat":1},{"version":"f9ab232778f2842ffd6955f88b1049982fa2ecb764d129ee4893cbc290f41977","impliedFormat":1},{"version":"ae56f65caf3be91108707bd8dfbccc2a57a91feb5daabf7165a06a945545ed26","impliedFormat":1},{"version":"a136d5de521da20f31631a0a96bf712370779d1c05b7015d7019a9b2a0446ca9","impliedFormat":1},{"version":"c3b41e74b9a84b88b1dca61ec39eee25c0dbc8e7d519ba11bb070918cfacf656","affectsGlobalScope":true,"impliedFormat":1},{"version":"4737a9dc24d0e68b734e6cfbcea0c15a2cfafeb493485e27905f7856988c6b29","affectsGlobalScope":true,"impliedFormat":1},{"version":"36d8d3e7506b631c9582c251a2c0b8a28855af3f76719b12b534c6edf952748d","impliedFormat":1},{"version":"1ca69210cc42729e7ca97d3a9ad48f2e9cb0042bada4075b588ae5387debd318","impliedFormat":1},{"version":"f5ebe66baaf7c552cfa59d75f2bfba679f329204847db3cec385acda245e574e","impliedFormat":1},{"version":"ed59add13139f84da271cafd32e2171876b0a0af2f798d0c663e8eeb867732cf","affectsGlobalScope":true,"impliedFormat":1},{"version":"05db535df8bdc30d9116fe754a3473d1b6479afbc14ae8eb18b605c62677d518","impliedFormat":1},{"version":"b1810689b76fd473bd12cc9ee219f8e62f54a7d08019a235d07424afbf074d25","impliedFormat":1},{"version":"87d9d29dbc745f182683f63187bf3d53fd8673e5fca38ad5eaab69798ed29fbc","impliedFormat":1},{"version":"eb5b19b86227ace1d29ea4cf81387279d04bb34051e944bc53df69f58914b788","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac51dd7d31333793807a6abaa5ae168512b6131bd41d9c5b98477fc3b7800f9f","impliedFormat":1},{"version":"7a3aa194cfd5919c4da251ef04ea051077e22702638d4edcb9579e9101653519","affectsGlobalScope":true,"impliedFormat":1},{"version":"17ed71200119e86ccef2d96b73b02ce8854b76ad6bd21b5021d4269bec527b5f","impliedFormat":1}],"root":[[58,67]],"options":{"declaration":true,"declarationMap":true,"downlevelIteration":false,"esModuleInterop":true,"importHelpers":false,"module":7,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","removeComments":true,"rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":9,"tsBuildInfoFile":"./.tsbuildinfo"},"referencedMap":[[70,1],[68,2],[73,3],[69,1],[71,4],[72,1],[74,2],[123,5],[124,5],[125,6],[80,7],[126,8],[127,9],[128,10],[75,2],[78,11],[76,2],[77,2],[129,12],[130,13],[131,14],[132,15],[133,16],[134,17],[135,17],[136,18],[137,19],[138,20],[139,21],[81,2],[79,2],[140,22],[141,23],[142,24],[174,25],[143,26],[144,27],[145,28],[146,29],[147,30],[148,31],[149,32],[150,33],[151,34],[152,35],[153,35],[154,36],[155,2],[156,37],[158,38],[157,39],[159,40],[160,41],[161,42],[162,43],[163,44],[164,45],[165,46],[166,47],[167,48],[168,49],[169,50],[170,51],[171,52],[82,2],[83,2],[84,2],[122,53],[172,54],[173,55],[175,2],[179,56],[176,2],[178,57],[177,2],[56,2],[57,2],[11,2],[10,2],[2,2],[12,2],[13,2],[14,2],[15,2],[16,2],[17,2],[18,2],[19,2],[3,2],[20,2],[21,2],[4,2],[22,2],[26,2],[23,2],[24,2],[25,2],[27,2],[28,2],[29,2],[5,2],[30,2],[31,2],[32,2],[33,2],[6,2],[37,2],[34,2],[35,2],[36,2],[38,2],[7,2],[39,2],[44,2],[45,2],[40,2],[41,2],[42,2],[43,2],[8,2],[49,2],[46,2],[47,2],[48,2],[50,2],[9,2],[51,2],[52,2],[53,2],[55,2],[54,2],[1,2],[100,58],[110,59],[99,58],[120,60],[91,61],[90,62],[119,63],[113,64],[118,65],[93,66],[107,67],[92,68],[116,69],[88,70],[87,63],[117,71],[89,72],[94,73],[95,2],[98,73],[85,2],[121,74],[111,75],[102,76],[103,77],[105,78],[101,79],[104,80],[114,63],[96,81],[97,82],[106,83],[86,84],[109,75],[108,73],[112,2],[115,85],[59,86],[60,86],[67,87],[65,2],[61,86],[64,88],[66,89],[62,86],[58,2],[63,86]],"version":"5.9.3"}
@@ -1,90 +1,15 @@
1
1
  import type { ActionDefinition, RuntimeContext, Logger } from './types.js';
2
- /**
3
- * ActionEngine subsystem for storing and executing actions.
4
- * Provides O(1) lookup performance using Map-based storage.
5
- *
6
- * Requirements: 3.1, 3.2, 3.3, 3.4, 3.5, 4.1, 4.2, 4.3, 4.4, 4.5, 6.1, 6.2, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 10.1, 10.2, 10.3, 10.4, 10.5, 11.1, 11.2, 11.3, 11.4, 11.5, 13.2, 13.5, 14.1, 14.2, 14.3, 14.4, 14.5, 14.6, 15.1, 15.2, 15.3, 15.4, 15.5, 16.2, 16.4, 19.1, 19.2, 19.3, 19.4, 19.5
7
- */
8
2
  export declare class ActionEngine {
9
3
  private actions;
10
4
  private context;
11
5
  private logger;
12
6
  constructor(logger: Logger);
13
- /**
14
- * Sets the RuntimeContext for this ActionEngine.
15
- * This must be called after the RuntimeContext is created during initialization.
16
- *
17
- * @param context - The RuntimeContext to pass to action handlers
18
- *
19
- * Requirement: 6.6
20
- */
21
7
  setContext(context: RuntimeContext): void;
22
- /**
23
- * Registers an action definition.
24
- * Rejects duplicate action IDs.
25
- * Returns an unregister function that removes the action when called.
26
- *
27
- * @param action - The action definition to register
28
- * @returns A function that unregisters the action when called
29
- * @throws ValidationError if required fields are missing or invalid
30
- * @throws DuplicateRegistrationError if an action with the same ID is already registered
31
- *
32
- * Requirements: 4.1, 4.2, 4.3, 4.4, 4.5, 6.2, 6.4, 14.1, 14.2, 14.3, 14.4, 14.5, 14.6, 15.1, 15.2, 15.3, 15.4, 15.5, 16.2, 19.1, 19.2, 19.3, 19.4, 19.5
33
- */
34
8
  registerAction<P = unknown, R = unknown>(action: ActionDefinition<P, R>): () => void;
35
- /**
36
- * Executes an action by ID with optional parameters.
37
- * Passes the RuntimeContext to the action handler.
38
- * Handles both synchronous and asynchronous handlers.
39
- * Wraps handler errors in ActionExecutionError with context.
40
- * Enforces timeout if specified in action definition.
41
- *
42
- * @param id - The action identifier
43
- * @param params - Optional parameters to pass to the action handler
44
- * @returns The result from the action handler
45
- * @throws Error if the action ID does not exist
46
- * @throws ActionExecutionError if the handler throws an error
47
- * @throws ActionTimeoutError if the action exceeds its timeout
48
- *
49
- * Requirements: 3.1, 3.2, 3.3, 3.4, 3.5, 6.3, 6.5, 6.6, 6.7, 6.8, 11.1, 11.2, 11.3, 11.4, 11.5, 16.4
50
- */
51
9
  runAction<P = unknown, R = unknown>(id: string, params?: P): Promise<R>;
52
- /**
53
- * Runs an action handler with a timeout.
54
- *
55
- * @param action - The action definition with timeout
56
- * @param params - Parameters to pass to the handler
57
- * @returns The result from the action handler
58
- * @throws ActionTimeoutError if execution exceeds the timeout
59
- *
60
- * Requirements: 11.1, 11.2, 11.3, 11.4, 11.5
61
- */
62
10
  private runWithTimeout;
63
- /**
64
- * Retrieves an action definition by ID.
65
- * For internal use.
66
- *
67
- * @param id - The action identifier
68
- * @returns The action definition or null if not found
69
- *
70
- * Requirement: 13.2
71
- */
72
11
  getAction(id: string): ActionDefinition | null;
73
- /**
74
- * Retrieves all registered action definitions.
75
- * Returns a copy to prevent external mutation of internal state.
76
- *
77
- * @returns Array of all registered action definitions
78
- *
79
- * Requirements: 10.1, 10.2, 10.3, 10.4, 10.5, 13.2
80
- */
81
12
  getAllActions(): ActionDefinition[];
82
- /**
83
- * Clears all registered actions.
84
- * Used during shutdown to release resources.
85
- *
86
- * Requirement: 13.5
87
- */
88
13
  clear(): void;
89
14
  }
90
15
  //# sourceMappingURL=action-engine.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"action-engine.d.ts","sourceRoot":"","sources":["../src/action-engine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAG3E;;;;;GAKG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,OAAO,CAA0C;IACzD,OAAO,CAAC,OAAO,CAAwB;IACvC,OAAO,CAAC,MAAM,CAAS;gBAEX,MAAM,EAAE,MAAM;IAM1B;;;;;;;OAOG;IACH,UAAU,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAIzC;;;;;;;;;;;OAWG;IACH,cAAc,CAAC,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,OAAO,EAAE,MAAM,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,MAAM,IAAI;IAwBpF;;;;;;;;;;;;;;;OAeG;IACG,SAAS,CAAC,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAkC7E;;;;;;;;;OASG;YACW,cAAc;IAqB5B;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI;IAI9C;;;;;;;OAOG;IACH,aAAa,IAAI,gBAAgB,EAAE;IAInC;;;;;OAKG;IACH,KAAK,IAAI,IAAI;CAGd"}
1
+ {"version":3,"file":"action-engine.d.ts","sourceRoot":"","sources":["../src/action-engine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAS3E,qBAAa,YAAY;IACvB,OAAO,CAAC,OAAO,CAA0C;IACzD,OAAO,CAAC,OAAO,CAAwB;IACvC,OAAO,CAAC,MAAM,CAAS;gBAEX,MAAM,EAAE,MAAM;IAc1B,UAAU,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAgBzC,cAAc,CAAC,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,OAAO,EAAE,MAAM,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,MAAM,IAAI;IAwC9E,SAAS,CAAC,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;YA6C/D,cAAc;IAsC5B,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI;IAY9C,aAAa,IAAI,gBAAgB,EAAE;IAUnC,KAAK,IAAI,IAAI;CAGd"}
@@ -1,10 +1,4 @@
1
1
  import { ValidationError, DuplicateRegistrationError, ActionTimeoutError, ActionExecutionError } from './types.js';
2
- /**
3
- * ActionEngine subsystem for storing and executing actions.
4
- * Provides O(1) lookup performance using Map-based storage.
5
- *
6
- * Requirements: 3.1, 3.2, 3.3, 3.4, 3.5, 4.1, 4.2, 4.3, 4.4, 4.5, 6.1, 6.2, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 10.1, 10.2, 10.3, 10.4, 10.5, 11.1, 11.2, 11.3, 11.4, 11.5, 13.2, 13.5, 14.1, 14.2, 14.3, 14.4, 14.5, 14.6, 15.1, 15.2, 15.3, 15.4, 15.5, 16.2, 16.4, 19.1, 19.2, 19.3, 19.4, 19.5
7
- */
8
2
  export class ActionEngine {
9
3
  actions;
10
4
  context;
@@ -14,151 +8,74 @@ export class ActionEngine {
14
8
  this.context = null;
15
9
  this.logger = logger;
16
10
  }
17
- /**
18
- * Sets the RuntimeContext for this ActionEngine.
19
- * This must be called after the RuntimeContext is created during initialization.
20
- *
21
- * @param context - The RuntimeContext to pass to action handlers
22
- *
23
- * Requirement: 6.6
24
- */
25
11
  setContext(context) {
26
12
  this.context = context;
27
13
  }
28
- /**
29
- * Registers an action definition.
30
- * Rejects duplicate action IDs.
31
- * Returns an unregister function that removes the action when called.
32
- *
33
- * @param action - The action definition to register
34
- * @returns A function that unregisters the action when called
35
- * @throws ValidationError if required fields are missing or invalid
36
- * @throws DuplicateRegistrationError if an action with the same ID is already registered
37
- *
38
- * Requirements: 4.1, 4.2, 4.3, 4.4, 4.5, 6.2, 6.4, 14.1, 14.2, 14.3, 14.4, 14.5, 14.6, 15.1, 15.2, 15.3, 15.4, 15.5, 16.2, 19.1, 19.2, 19.3, 19.4, 19.5
39
- */
40
14
  registerAction(action) {
41
- // Validate required fields (Requirements 19.1, 19.2, 19.3, 19.5)
42
15
  if (!action.id || typeof action.id !== 'string') {
43
16
  throw new ValidationError('Action', 'id');
44
17
  }
45
18
  if (!action.handler || typeof action.handler !== 'function') {
46
19
  throw new ValidationError('Action', 'handler', action.id);
47
20
  }
48
- // Check for duplicate ID (Requirements 6.4, 15.1, 15.2, 15.4, 15.5, 16.2)
49
21
  if (this.actions.has(action.id)) {
50
22
  throw new DuplicateRegistrationError('Action', action.id);
51
23
  }
52
- // Register the action
53
24
  this.actions.set(action.id, action);
54
25
  this.logger.debug(`Action "${action.id}" registered successfully`);
55
- // Return unregister function (Requirements 4.1, 4.2, 4.4, 4.5)
56
26
  return () => {
57
27
  this.actions.delete(action.id);
58
28
  };
59
29
  }
60
- /**
61
- * Executes an action by ID with optional parameters.
62
- * Passes the RuntimeContext to the action handler.
63
- * Handles both synchronous and asynchronous handlers.
64
- * Wraps handler errors in ActionExecutionError with context.
65
- * Enforces timeout if specified in action definition.
66
- *
67
- * @param id - The action identifier
68
- * @param params - Optional parameters to pass to the action handler
69
- * @returns The result from the action handler
70
- * @throws Error if the action ID does not exist
71
- * @throws ActionExecutionError if the handler throws an error
72
- * @throws ActionTimeoutError if the action exceeds its timeout
73
- *
74
- * Requirements: 3.1, 3.2, 3.3, 3.4, 3.5, 6.3, 6.5, 6.6, 6.7, 6.8, 11.1, 11.2, 11.3, 11.4, 11.5, 16.4
75
- */
76
30
  async runAction(id, params) {
77
- // Check if action exists (Requirements 6.5, 16.4)
78
31
  const action = this.actions.get(id);
79
32
  if (!action) {
80
33
  throw new Error(`Action with id "${id}" not found`);
81
34
  }
82
- // Ensure context is available (Requirement 6.6)
83
35
  if (!this.context) {
84
36
  throw new Error('RuntimeContext not set in ActionEngine');
85
37
  }
86
38
  try {
87
- // Handle timeout if specified (Requirements 11.1, 11.2, 11.3, 11.4, 11.5)
88
39
  if (action.timeout) {
89
40
  const result = await this.runWithTimeout(action, params);
90
41
  return result;
91
42
  }
92
- // Execute without timeout (Requirements 6.6, 6.7, 6.8)
93
43
  const result = await Promise.resolve(action.handler(params, this.context));
94
44
  return result;
95
45
  }
96
46
  catch (error) {
97
- // Don't wrap timeout errors (Requirements 11.3, 11.5)
98
47
  if (error instanceof ActionTimeoutError) {
99
48
  this.logger.error(`Action "${id}" timed out`, error);
100
49
  throw error;
101
50
  }
102
- // Wrap other errors with contextual information (Requirements 3.1, 3.2, 3.3, 3.4, 3.5)
103
51
  this.logger.error(`Action "${id}" execution failed`, error);
104
52
  throw new ActionExecutionError(id, error);
105
53
  }
106
54
  }
107
- /**
108
- * Runs an action handler with a timeout.
109
- *
110
- * @param action - The action definition with timeout
111
- * @param params - Parameters to pass to the handler
112
- * @returns The result from the action handler
113
- * @throws ActionTimeoutError if execution exceeds the timeout
114
- *
115
- * Requirements: 11.1, 11.2, 11.3, 11.4, 11.5
116
- */
117
55
  async runWithTimeout(action, params) {
118
- return new Promise((resolve, reject) => {
119
- const timeoutId = setTimeout(() => {
56
+ let timeoutId;
57
+ const timeoutPromise = new Promise((_, reject) => {
58
+ timeoutId = setTimeout(() => {
120
59
  reject(new ActionTimeoutError(action.id, action.timeout));
121
60
  }, action.timeout);
122
- Promise.resolve(action.handler(params, this.context))
123
- .then(result => {
124
- clearTimeout(timeoutId);
125
- resolve(result);
126
- })
127
- .catch(error => {
128
- clearTimeout(timeoutId);
129
- reject(error);
130
- });
131
61
  });
62
+ const handlerPromise = Promise.resolve(action.handler(params, this.context));
63
+ try {
64
+ const result = await Promise.race([handlerPromise, timeoutPromise]);
65
+ clearTimeout(timeoutId);
66
+ return result;
67
+ }
68
+ catch (error) {
69
+ clearTimeout(timeoutId);
70
+ throw error;
71
+ }
132
72
  }
133
- /**
134
- * Retrieves an action definition by ID.
135
- * For internal use.
136
- *
137
- * @param id - The action identifier
138
- * @returns The action definition or null if not found
139
- *
140
- * Requirement: 13.2
141
- */
142
73
  getAction(id) {
143
74
  return this.actions.get(id) ?? null;
144
75
  }
145
- /**
146
- * Retrieves all registered action definitions.
147
- * Returns a copy to prevent external mutation of internal state.
148
- *
149
- * @returns Array of all registered action definitions
150
- *
151
- * Requirements: 10.1, 10.2, 10.3, 10.4, 10.5, 13.2
152
- */
153
76
  getAllActions() {
154
77
  return Array.from(this.actions.values());
155
78
  }
156
- /**
157
- * Clears all registered actions.
158
- * Used during shutdown to release resources.
159
- *
160
- * Requirement: 13.5
161
- */
162
79
  clear() {
163
80
  this.actions.clear();
164
81
  }
@@ -1 +1 @@
1
- {"version":3,"file":"action-engine.js","sourceRoot":"","sources":["../src/action-engine.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,0BAA0B,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEnH;;;;;GAKG;AACH,MAAM,OAAO,YAAY;IACf,OAAO,CAA0C;IACjD,OAAO,CAAwB;IAC/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CAAC,CAAC;YAC7D,CAAC,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QACrB,CAAC,CAAC,CAAC;QAGH,MAAM,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,OAAQ,CAAC,CAAC,CAAC;QAE9E,IAAI,CAAC;YAEH,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC,CAAC;YAEpE,YAAY,CAAC,SAAU,CAAC,CAAC;YACzB,OAAO,MAAM,CAAC;QAChB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAEf,YAAY,CAAC,SAAU,CAAC,CAAC;YACzB,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;IAWD,SAAS,CAAC,EAAU;QAClB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC;IACtC,CAAC;IAUD,aAAa;QACX,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAC3C,CAAC;IAQD,KAAK;QACH,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;IACvB,CAAC;CACF"}
@@ -1,55 +1,11 @@
1
1
  import type { Logger } from './types.js';
2
- /**
3
- * EventBus subsystem for publish-subscribe event communication.
4
- * Provides O(1) lookup performance using Map-based storage.
5
- * Events are scoped to a Runtime Instance and handlers are invoked synchronously.
6
- *
7
- * Requirements: 8.1, 8.2, 8.3, 8.4, 8.5, 8.6, 8.7, 13.4, 13.5, 2.1, 2.2, 2.3, 2.4, 2.5
8
- */
9
2
  export declare class EventBus {
10
3
  private handlers;
11
4
  private logger;
12
5
  constructor(logger: Logger);
13
- /**
14
- * Emits an event to all registered handlers synchronously.
15
- * Handlers are invoked in registration order.
16
- * Handler errors are caught, logged, and do not prevent other handlers from executing.
17
- *
18
- * @param event - The event name
19
- * @param data - Optional data to pass to handlers
20
- *
21
- * Requirements: 8.2, 8.6, 8.7, 2.1, 2.2, 2.3, 2.4, 2.5
22
- */
23
6
  emit(event: string, data?: unknown): void;
24
- /**
25
- * Emits an event to all registered handlers asynchronously.
26
- * Returns a Promise that resolves when all handlers complete or fail.
27
- * Uses Promise.allSettled to ensure all handlers are invoked even if some fail.
28
- *
29
- * @param event - The event name
30
- * @param data - Optional data to pass to handlers
31
- * @returns Promise that resolves when all handlers complete
32
- *
33
- * Requirements: 12.1, 12.2, 12.3, 12.4, 12.5
34
- */
35
7
  emitAsync(event: string, data?: unknown): Promise<void>;
36
- /**
37
- * Registers an event handler for a specific event.
38
- * Returns an unsubscribe function that removes the handler when called.
39
- *
40
- * @param event - The event name
41
- * @param handler - The handler function to invoke when the event is emitted
42
- * @returns A function that unsubscribes the handler when called
43
- *
44
- * Requirements: 8.3, 8.4, 8.5, 13.4
45
- */
46
8
  on(event: string, handler: (data: unknown) => void): () => void;
47
- /**
48
- * Clears all registered event handlers.
49
- * Used during shutdown to release resources.
50
- *
51
- * Requirement: 13.5
52
- */
53
9
  clear(): void;
54
10
  }
55
11
  //# sourceMappingURL=event-bus.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"event-bus.d.ts","sourceRoot":"","sources":["../src/event-bus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEzC;;;;;;GAMG;AACH,qBAAa,QAAQ;IACnB,OAAO,CAAC,QAAQ,CAA4C;IAC5D,OAAO,CAAC,MAAM,CAAS;gBAEX,MAAM,EAAE,MAAM;IAK1B;;;;;;;;;OASG;IACH,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI;IAsBzC;;;;;;;;;;OAUG;IACG,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAsB7D;;;;;;;;;OASG;IACH,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,GAAG,MAAM,IAAI;IAsB/D;;;;;OAKG;IACH,KAAK,IAAI,IAAI;CAGd"}
1
+ {"version":3,"file":"event-bus.d.ts","sourceRoot":"","sources":["../src/event-bus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AASzC,qBAAa,QAAQ;IACnB,OAAO,CAAC,QAAQ,CAA4C;IAC5D,OAAO,CAAC,MAAM,CAAS;gBAEX,MAAM,EAAE,MAAM;IAe1B,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI;IA8CnC,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAgC7D,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,GAAG,MAAM,IAAI;IA4B/D,KAAK,IAAI,IAAI;CAGd"}
package/dist/event-bus.js CHANGED
@@ -1,10 +1,3 @@
1
- /**
2
- * EventBus subsystem for publish-subscribe event communication.
3
- * Provides O(1) lookup performance using Map-based storage.
4
- * Events are scoped to a Runtime Instance and handlers are invoked synchronously.
5
- *
6
- * Requirements: 8.1, 8.2, 8.3, 8.4, 8.5, 8.6, 8.7, 13.4, 13.5, 2.1, 2.2, 2.3, 2.4, 2.5
7
- */
8
1
  export class EventBus {
9
2
  handlers;
10
3
  logger;
@@ -12,97 +5,58 @@ export class EventBus {
12
5
  this.handlers = new Map();
13
6
  this.logger = logger;
14
7
  }
15
- /**
16
- * Emits an event to all registered handlers synchronously.
17
- * Handlers are invoked in registration order.
18
- * Handler errors are caught, logged, and do not prevent other handlers from executing.
19
- *
20
- * @param event - The event name
21
- * @param data - Optional data to pass to handlers
22
- *
23
- * Requirements: 8.2, 8.6, 8.7, 2.1, 2.2, 2.3, 2.4, 2.5
24
- */
25
8
  emit(event, data) {
26
9
  const eventHandlers = this.handlers.get(event);
27
- // If no handlers registered for this event, do nothing
28
- if (!eventHandlers) {
10
+ if (!eventHandlers || eventHandlers.size === 0) {
11
+ return;
12
+ }
13
+ if (eventHandlers.size === 1) {
14
+ const handler = eventHandlers.values().next().value;
15
+ if (handler) {
16
+ try {
17
+ handler(data);
18
+ }
19
+ catch (error) {
20
+ this.logger.error(`Event handler for "${event}" threw error`, error);
21
+ }
22
+ }
29
23
  return;
30
24
  }
31
- // Invoke all handlers synchronously in registration order (Requirements 8.6, 8.7)
32
- // Set maintains insertion order, so iteration is in registration order
33
- // Wrap each handler in try-catch to ensure all handlers are invoked (Requirements 2.1, 2.2, 2.4, 2.5)
34
25
  for (const handler of eventHandlers) {
35
26
  try {
36
27
  handler(data);
37
28
  }
38
29
  catch (error) {
39
- // Log error with event name and error details (Requirements 2.1, 2.3)
40
30
  this.logger.error(`Event handler for "${event}" threw error`, error);
41
- // Continue invoking remaining handlers (Requirement 2.2)
42
31
  }
43
32
  }
44
33
  }
45
- /**
46
- * Emits an event to all registered handlers asynchronously.
47
- * Returns a Promise that resolves when all handlers complete or fail.
48
- * Uses Promise.allSettled to ensure all handlers are invoked even if some fail.
49
- *
50
- * @param event - The event name
51
- * @param data - Optional data to pass to handlers
52
- * @returns Promise that resolves when all handlers complete
53
- *
54
- * Requirements: 12.1, 12.2, 12.3, 12.4, 12.5
55
- */
56
34
  async emitAsync(event, data) {
57
35
  const eventHandlers = this.handlers.get(event);
58
- // If no handlers registered for this event, do nothing
59
36
  if (!eventHandlers) {
60
37
  return;
61
38
  }
62
- // Invoke all handlers asynchronously using Promise.allSettled (Requirements 12.3, 12.4)
63
39
  const promises = Array.from(eventHandlers).map(handler => Promise.resolve()
64
40
  .then(() => handler(data))
65
41
  .catch(error => {
66
- // Log errors from failed handlers (Requirement 12.5)
67
42
  this.logger.error(`Async event handler for "${event}" threw error`, error);
68
43
  }));
69
- // Wait for all handlers to complete or fail (Requirement 12.4)
70
44
  await Promise.allSettled(promises);
71
45
  }
72
- /**
73
- * Registers an event handler for a specific event.
74
- * Returns an unsubscribe function that removes the handler when called.
75
- *
76
- * @param event - The event name
77
- * @param handler - The handler function to invoke when the event is emitted
78
- * @returns A function that unsubscribes the handler when called
79
- *
80
- * Requirements: 8.3, 8.4, 8.5, 13.4
81
- */
82
46
  on(event, handler) {
83
- // Get or create the Set of handlers for this event (Requirement 13.4)
84
47
  let eventHandlers = this.handlers.get(event);
85
48
  if (!eventHandlers) {
86
49
  eventHandlers = new Set();
87
50
  this.handlers.set(event, eventHandlers);
88
51
  }
89
- // Add the handler to the Set (maintains insertion order)
90
52
  eventHandlers.add(handler);
91
- // Return unsubscribe function (Requirement 8.4)
92
53
  return () => {
93
54
  eventHandlers?.delete(handler);
94
- // Clean up empty Sets to avoid memory leaks
95
55
  if (eventHandlers?.size === 0) {
96
56
  this.handlers.delete(event);
97
57
  }
98
58
  };
99
59
  }
100
- /**
101
- * Clears all registered event handlers.
102
- * Used during shutdown to release resources.
103
- *
104
- * Requirement: 13.5
105
- */
106
60
  clear() {
107
61
  this.handlers.clear();
108
62
  }
@@ -1 +1 @@
1
- {"version":3,"file":"event-bus.js","sourceRoot":"","sources":["../src/event-bus.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,OAAO,QAAQ;IACX,QAAQ,CAA4C;IACpD,MAAM,CAAS;IAEvB,YAAY,MAAc;QACxB,IAAI,CAAC,QAAQ,GAAG,IAAI,GAAG,EAAE,CAAC;QAC1B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;OASG;IACH,IAAI,CAAC,KAAa,EAAE,IAAc;QAChC,MAAM,aAAa,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAE/C,uDAAuD;QACvD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AE,CAAC;YACnB,aAAa,GAAG,IAAI,GAAG,EAAE,CAAC;YAC1B,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;QAC1C,CAAC;QAGD,aAAa,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAG3B,OAAO,GAAG,EAAE;YACV,aAAa,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;YAG/B,IAAI,aAAa,EAAE,IAAI,KAAK,CAAC,EAAE,CAAC;gBAC9B,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YAC9B,CAAC;QACH,CAAC,CAAC;IACJ,CAAC;IAQD,KAAK;QACH,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;IACxB,CAAC;CACF"}
package/dist/index.d.ts CHANGED
@@ -7,4 +7,6 @@ export { UIBridge } from './ui-bridge.js';
7
7
  export { RuntimeContextImpl } from './runtime-context.js';
8
8
  export type { PluginDefinition, ScreenDefinition, ActionDefinition, UIProvider, RuntimeContext, Logger, RuntimeOptions, ActionMetadata, PluginMetadata, IntrospectionMetadata, IntrospectionAPI } from './types.js';
9
9
  export { ConsoleLogger, ValidationError, DuplicateRegistrationError, ActionTimeoutError, ActionExecutionError, RuntimeState } from './types.js';
10
+ export { createPerformanceMonitor, NoOpPerformanceMonitor, SimplePerformanceMonitor } from './performance.js';
11
+ export type { PerformanceMonitor } from './performance.js';
10
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,cAAc,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BAAkB,EACnB,MAAM,kBAAkB,CAAC"}
package/dist/index.js CHANGED
@@ -1,5 +1,3 @@
1
- // Core Runtime entry point
2
- // This file will export the main Runtime class and public types
3
1
  export { Runtime } from './runtime.js';
4
2
  export { ScreenRegistry } from './screen-registry.js';
5
3
  export { ActionEngine } from './action-engine.js';
@@ -8,4 +6,5 @@ export { PluginRegistry } from './plugin-registry.js';
8
6
  export { UIBridge } from './ui-bridge.js';
9
7
  export { RuntimeContextImpl } from './runtime-context.js';
10
8
  export { ConsoleLogger, ValidationError, DuplicateRegistrationError, ActionTimeoutError, ActionExecutionError, RuntimeState } from './types.js';
9
+ export { createPerformanceMonitor, NoOpPerformanceMonitor, SimplePerformanceMonitor } from './performance.js';
11
10
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,gEAAgE;AAEhE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAe1D,OAAO,EACL,aAAa,EACb,eAAe,EACf,0BAA0B,EAC1B,kBAAkB,EAClB,oBAAoB,EACpB,YAAY,EACb,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAe1D,OAAO,EACL,aAAa,EACb,eAAe,EACf,0BAA0B,EAC1B,kBAAkB,EAClB,oBAAoB,EACpB,YAAY,EACb,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,wBAAwB,EACxB,sBAAsB,EACtB,wBAAwB,EACzB,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,18 @@
1
+ export interface PerformanceMonitor {
2
+ startTimer(label: string): () => number;
3
+ recordMetric(name: string, value: number): void;
4
+ getMetrics(): Record<string, number>;
5
+ }
6
+ export declare class NoOpPerformanceMonitor implements PerformanceMonitor {
7
+ startTimer(): () => number;
8
+ recordMetric(): void;
9
+ getMetrics(): Record<string, number>;
10
+ }
11
+ export declare class SimplePerformanceMonitor implements PerformanceMonitor {
12
+ private metrics;
13
+ startTimer(label: string): () => number;
14
+ recordMetric(name: string, value: number): void;
15
+ getMetrics(): Record<string, number>;
16
+ }
17
+ export declare function createPerformanceMonitor(enabled?: boolean): PerformanceMonitor;
18
+ //# sourceMappingURL=performance.d.ts.map