@dxos/functions 0.8.4-main.f5c0578 → 0.8.4-main.fcc0d83b33

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 (194) hide show
  1. package/README.md +4 -6
  2. package/dist/lib/neutral/Trace.mjs +42 -0
  3. package/dist/lib/neutral/Trace.mjs.map +7 -0
  4. package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
  5. package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +7 -0
  6. package/dist/lib/neutral/chunk-LI2RBI7V.mjs +49 -0
  7. package/dist/lib/neutral/chunk-LI2RBI7V.mjs.map +7 -0
  8. package/dist/lib/neutral/chunk-VOFFKJP4.mjs +178 -0
  9. package/dist/lib/neutral/chunk-VOFFKJP4.mjs.map +7 -0
  10. package/dist/lib/neutral/fib-WEAWVJIJ.mjs +23 -0
  11. package/dist/lib/neutral/fib-WEAWVJIJ.mjs.map +7 -0
  12. package/dist/lib/neutral/index.mjs +1082 -0
  13. package/dist/lib/neutral/index.mjs.map +7 -0
  14. package/dist/lib/neutral/meta.json +1 -0
  15. package/dist/lib/neutral/reply-AIAJ3PTW.mjs +19 -0
  16. package/dist/lib/neutral/reply-AIAJ3PTW.mjs.map +7 -0
  17. package/dist/lib/neutral/sleep-M4YMO6FP.mjs +15 -0
  18. package/dist/lib/neutral/sleep-M4YMO6FP.mjs.map +7 -0
  19. package/dist/types/src/Trace.d.ts +174 -0
  20. package/dist/types/src/Trace.d.ts.map +1 -0
  21. package/dist/types/src/errors.d.ts +150 -41
  22. package/dist/types/src/errors.d.ts.map +1 -1
  23. package/dist/types/src/example/definitions.d.ts +11 -0
  24. package/dist/types/src/example/definitions.d.ts.map +1 -0
  25. package/dist/types/src/example/fib.d.ts +8 -0
  26. package/dist/types/src/example/fib.d.ts.map +1 -0
  27. package/dist/types/src/example/forex-effect.d.ts +3 -0
  28. package/dist/types/src/example/forex-effect.d.ts.map +1 -0
  29. package/dist/types/src/example/index.d.ts +4 -0
  30. package/dist/types/src/example/index.d.ts.map +1 -0
  31. package/dist/types/src/example/reply.d.ts +4 -0
  32. package/dist/types/src/example/reply.d.ts.map +1 -0
  33. package/dist/types/src/example/sleep.d.ts +6 -0
  34. package/dist/types/src/example/sleep.d.ts.map +1 -0
  35. package/dist/types/src/index.d.ts +9 -7
  36. package/dist/types/src/index.d.ts.map +1 -1
  37. package/dist/types/src/process/Process.d.ts +246 -0
  38. package/dist/types/src/process/Process.d.ts.map +1 -0
  39. package/dist/types/src/process/ServiceResolver.d.ts +74 -0
  40. package/dist/types/src/process/ServiceResolver.d.ts.map +1 -0
  41. package/dist/types/src/process/StorageService.d.ts +58 -0
  42. package/dist/types/src/process/StorageService.d.ts.map +1 -0
  43. package/dist/types/src/protocol/functions-ai-http-client.d.ts +12 -0
  44. package/dist/types/src/protocol/functions-ai-http-client.d.ts.map +1 -0
  45. package/dist/types/src/protocol/index.d.ts +2 -0
  46. package/dist/types/src/protocol/index.d.ts.map +1 -0
  47. package/dist/types/src/protocol/protocol.d.ts +7 -0
  48. package/dist/types/src/protocol/protocol.d.ts.map +1 -0
  49. package/dist/types/src/protocol/protocol.test.d.ts +2 -0
  50. package/dist/types/src/protocol/protocol.test.d.ts.map +1 -0
  51. package/dist/types/src/sdk.d.ts +11 -0
  52. package/dist/types/src/sdk.d.ts.map +1 -0
  53. package/dist/types/src/services/credentials.d.ts +20 -4
  54. package/dist/types/src/services/credentials.d.ts.map +1 -1
  55. package/dist/types/src/services/function-invocation-service.d.ts +16 -0
  56. package/dist/types/src/services/function-invocation-service.d.ts.map +1 -0
  57. package/dist/types/src/services/index.d.ts +4 -7
  58. package/dist/types/src/services/index.d.ts.map +1 -1
  59. package/dist/types/src/services/queues.d.ts +1 -43
  60. package/dist/types/src/services/queues.d.ts.map +1 -1
  61. package/dist/types/src/services/tracing.d.ts +2 -52
  62. package/dist/types/src/services/tracing.d.ts.map +1 -1
  63. package/dist/types/src/types/Script.d.ts +22 -0
  64. package/dist/types/src/types/Script.d.ts.map +1 -0
  65. package/dist/types/src/types/Trigger.d.ts +150 -0
  66. package/dist/types/src/types/Trigger.d.ts.map +1 -0
  67. package/dist/types/src/types/TriggerEvent.d.ts +75 -0
  68. package/dist/types/src/types/TriggerEvent.d.ts.map +1 -0
  69. package/dist/types/src/types/index.d.ts +5 -0
  70. package/dist/types/src/types/index.d.ts.map +1 -0
  71. package/dist/types/src/types/url.d.ts +13 -0
  72. package/dist/types/src/types/url.d.ts.map +1 -0
  73. package/dist/types/tsconfig.tsbuildinfo +1 -1
  74. package/package.json +31 -73
  75. package/src/Trace.ts +231 -0
  76. package/src/errors.ts +23 -5
  77. package/src/example/definitions.ts +49 -0
  78. package/src/example/fib.ts +23 -0
  79. package/src/example/forex-effect.ts +40 -0
  80. package/src/example/index.ts +12 -0
  81. package/src/example/reply.ts +19 -0
  82. package/src/example/sleep.ts +17 -0
  83. package/src/index.ts +9 -9
  84. package/src/process/Process.ts +489 -0
  85. package/src/process/ServiceResolver.ts +174 -0
  86. package/src/process/StorageService.ts +99 -0
  87. package/src/protocol/functions-ai-http-client.ts +67 -0
  88. package/src/{executor → protocol}/index.ts +1 -1
  89. package/src/protocol/protocol.test.ts +58 -0
  90. package/src/protocol/protocol.ts +283 -0
  91. package/src/sdk.ts +30 -0
  92. package/src/services/credentials.ts +70 -9
  93. package/src/services/function-invocation-service.ts +35 -0
  94. package/src/services/index.ts +4 -7
  95. package/src/services/queues.ts +1 -73
  96. package/src/services/tracing.ts +1 -116
  97. package/src/types/Script.ts +38 -0
  98. package/src/types/Trigger.ts +207 -0
  99. package/src/types/TriggerEvent.ts +62 -0
  100. package/src/types/index.ts +8 -0
  101. package/src/types/url.ts +32 -0
  102. package/dist/lib/browser/bundler/index.mjs +0 -248
  103. package/dist/lib/browser/bundler/index.mjs.map +0 -7
  104. package/dist/lib/browser/chunk-IGZ7KK4A.mjs +0 -526
  105. package/dist/lib/browser/chunk-IGZ7KK4A.mjs.map +0 -7
  106. package/dist/lib/browser/edge/index.mjs +0 -69
  107. package/dist/lib/browser/edge/index.mjs.map +0 -7
  108. package/dist/lib/browser/index.mjs +0 -502
  109. package/dist/lib/browser/index.mjs.map +0 -7
  110. package/dist/lib/browser/meta.json +0 -1
  111. package/dist/lib/browser/testing/index.mjs +0 -59
  112. package/dist/lib/browser/testing/index.mjs.map +0 -7
  113. package/dist/lib/node-esm/bundler/index.mjs +0 -250
  114. package/dist/lib/node-esm/bundler/index.mjs.map +0 -7
  115. package/dist/lib/node-esm/chunk-NE5CWLJE.mjs +0 -528
  116. package/dist/lib/node-esm/chunk-NE5CWLJE.mjs.map +0 -7
  117. package/dist/lib/node-esm/edge/index.mjs +0 -71
  118. package/dist/lib/node-esm/edge/index.mjs.map +0 -7
  119. package/dist/lib/node-esm/index.mjs +0 -503
  120. package/dist/lib/node-esm/index.mjs.map +0 -7
  121. package/dist/lib/node-esm/meta.json +0 -1
  122. package/dist/lib/node-esm/testing/index.mjs +0 -60
  123. package/dist/lib/node-esm/testing/index.mjs.map +0 -7
  124. package/dist/types/src/bundler/bundler.d.ts +0 -50
  125. package/dist/types/src/bundler/bundler.d.ts.map +0 -1
  126. package/dist/types/src/bundler/bundler.test.d.ts +0 -2
  127. package/dist/types/src/bundler/bundler.test.d.ts.map +0 -1
  128. package/dist/types/src/bundler/index.d.ts +0 -2
  129. package/dist/types/src/bundler/index.d.ts.map +0 -1
  130. package/dist/types/src/edge/functions.d.ts +0 -16
  131. package/dist/types/src/edge/functions.d.ts.map +0 -1
  132. package/dist/types/src/edge/index.d.ts +0 -2
  133. package/dist/types/src/edge/index.d.ts.map +0 -1
  134. package/dist/types/src/executor/executor.d.ts +0 -11
  135. package/dist/types/src/executor/executor.d.ts.map +0 -1
  136. package/dist/types/src/executor/index.d.ts +0 -2
  137. package/dist/types/src/executor/index.d.ts.map +0 -1
  138. package/dist/types/src/handler.d.ts +0 -65
  139. package/dist/types/src/handler.d.ts.map +0 -1
  140. package/dist/types/src/schema.d.ts +0 -38
  141. package/dist/types/src/schema.d.ts.map +0 -1
  142. package/dist/types/src/services/database.d.ts +0 -79
  143. package/dist/types/src/services/database.d.ts.map +0 -1
  144. package/dist/types/src/services/event-logger.d.ts +0 -72
  145. package/dist/types/src/services/event-logger.d.ts.map +0 -1
  146. package/dist/types/src/services/local-function-execution.d.ts +0 -12
  147. package/dist/types/src/services/local-function-execution.d.ts.map +0 -1
  148. package/dist/types/src/services/remote-function-execution-service.d.ts +0 -15
  149. package/dist/types/src/services/remote-function-execution-service.d.ts.map +0 -1
  150. package/dist/types/src/services/service-container.d.ts +0 -56
  151. package/dist/types/src/services/service-container.d.ts.map +0 -1
  152. package/dist/types/src/services/service-registry.d.ts +0 -29
  153. package/dist/types/src/services/service-registry.d.ts.map +0 -1
  154. package/dist/types/src/services/service-registry.test.d.ts +0 -2
  155. package/dist/types/src/services/service-registry.test.d.ts.map +0 -1
  156. package/dist/types/src/testing/index.d.ts +0 -3
  157. package/dist/types/src/testing/index.d.ts.map +0 -1
  158. package/dist/types/src/testing/layer.d.ts +0 -10
  159. package/dist/types/src/testing/layer.d.ts.map +0 -1
  160. package/dist/types/src/testing/logger.d.ts +0 -5
  161. package/dist/types/src/testing/logger.d.ts.map +0 -1
  162. package/dist/types/src/testing/services.d.ts +0 -59
  163. package/dist/types/src/testing/services.d.ts.map +0 -1
  164. package/dist/types/src/trace.d.ts +0 -122
  165. package/dist/types/src/trace.d.ts.map +0 -1
  166. package/dist/types/src/translations.d.ts +0 -12
  167. package/dist/types/src/translations.d.ts.map +0 -1
  168. package/dist/types/src/types.d.ts +0 -411
  169. package/dist/types/src/types.d.ts.map +0 -1
  170. package/dist/types/src/url.d.ts +0 -17
  171. package/dist/types/src/url.d.ts.map +0 -1
  172. package/src/bundler/bundler.test.ts +0 -59
  173. package/src/bundler/bundler.ts +0 -292
  174. package/src/bundler/index.ts +0 -5
  175. package/src/edge/functions.ts +0 -64
  176. package/src/edge/index.ts +0 -9
  177. package/src/executor/executor.ts +0 -54
  178. package/src/handler.ts +0 -122
  179. package/src/schema.ts +0 -57
  180. package/src/services/database.ts +0 -116
  181. package/src/services/event-logger.ts +0 -118
  182. package/src/services/local-function-execution.ts +0 -74
  183. package/src/services/remote-function-execution-service.ts +0 -66
  184. package/src/services/service-container.ts +0 -114
  185. package/src/services/service-registry.test.ts +0 -42
  186. package/src/services/service-registry.ts +0 -59
  187. package/src/testing/index.ts +0 -6
  188. package/src/testing/layer.ts +0 -31
  189. package/src/testing/logger.ts +0 -16
  190. package/src/testing/services.ts +0 -115
  191. package/src/trace.ts +0 -178
  192. package/src/translations.ts +0 -20
  193. package/src/types.ts +0 -211
  194. package/src/url.ts +0 -52
@@ -1 +0,0 @@
1
- {"inputs":{"src/bundler/bundler.ts":{"bytes":32934,"imports":[{"path":"@effect/platform","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"esbuild-wasm","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"src/bundler/index.ts":{"bytes":457,"imports":[{"path":"src/bundler/bundler.ts","kind":"import-statement","original":"./bundler"}],"format":"esm"},"src/edge/functions.ts":{"bytes":6596,"imports":[{"path":"@dxos/client/edge","kind":"import-statement","external":true},{"path":"@dxos/edge-client","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"src/edge/index.ts":{"bytes":864,"imports":[{"path":"src/edge/functions.ts","kind":"import-statement","original":"./functions"}],"format":"esm"},"src/handler.ts":{"bytes":6450,"imports":[{"path":"effect","kind":"import-statement","external":true}],"format":"esm"},"src/schema.ts":{"bytes":5364,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true}],"format":"esm"},"src/types.ts":{"bytes":21469,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"src/schema.ts","kind":"import-statement","original":"./schema"}],"format":"esm"},"src/trace.ts":{"bytes":16885,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"src/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/url.ts":{"bytes":5989,"imports":[],"format":"esm"},"src/services/database.ts":{"bytes":11029,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/errors","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/services/queues.ts":{"bytes":5805,"imports":[{"path":"effect","kind":"import-statement","external":true}],"format":"esm"},"src/services/credentials.ts":{"bytes":9771,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"src/services/database.ts","kind":"import-statement","original":"./database"}],"format":"esm"},"src/services/tracing.ts":{"bytes":10414,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true}],"format":"esm"},"src/services/event-logger.ts":{"bytes":11614,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"src/services/tracing.ts","kind":"import-statement","original":"./tracing"}],"format":"esm"},"src/services/remote-function-execution-service.ts":{"bytes":7717,"imports":[{"path":"effect","kind":"import-statement","external":true}],"format":"esm"},"src/services/service-container.ts":{"bytes":12167,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/services/credentials.ts","kind":"import-statement","original":"./credentials"},{"path":"src/services/database.ts","kind":"import-statement","original":"./database"},{"path":"src/services/event-logger.ts","kind":"import-statement","original":"./event-logger"},{"path":"src/services/queues.ts","kind":"import-statement","original":"./queues"},{"path":"src/services/remote-function-execution-service.ts","kind":"import-statement","original":"./remote-function-execution-service"},{"path":"src/services/tracing.ts","kind":"import-statement","original":"./tracing"}],"format":"esm"},"src/errors.ts":{"bytes":1431,"imports":[{"path":"@dxos/errors","kind":"import-statement","external":true}],"format":"esm"},"src/services/local-function-execution.ts":{"bytes":8546,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"src/errors.ts","kind":"import-statement","original":"../errors"}],"format":"esm"},"src/services/index.ts":{"bytes":1217,"imports":[{"path":"src/services/database.ts","kind":"import-statement","original":"./database"},{"path":"src/services/queues.ts","kind":"import-statement","original":"./queues"},{"path":"src/services/service-container.ts","kind":"import-statement","original":"./service-container"},{"path":"src/services/credentials.ts","kind":"import-statement","original":"./credentials"},{"path":"src/services/tracing.ts","kind":"import-statement","original":"./tracing"},{"path":"src/services/event-logger.ts","kind":"import-statement","original":"./event-logger"},{"path":"src/services/remote-function-execution-service.ts","kind":"import-statement","original":"./remote-function-execution-service"},{"path":"src/services/local-function-execution.ts","kind":"import-statement","original":"./local-function-execution"}],"format":"esm"},"src/executor/executor.ts":{"bytes":5219,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true}],"format":"esm"},"src/executor/index.ts":{"bytes":459,"imports":[{"path":"src/executor/executor.ts","kind":"import-statement","original":"./executor"}],"format":"esm"},"src/index.ts":{"bytes":1091,"imports":[{"path":"src/handler.ts","kind":"import-statement","original":"./handler"},{"path":"src/schema.ts","kind":"import-statement","original":"./schema"},{"path":"src/trace.ts","kind":"import-statement","original":"./trace"},{"path":"src/types.ts","kind":"import-statement","original":"./types"},{"path":"src/url.ts","kind":"import-statement","original":"./url"},{"path":"src/services/index.ts","kind":"import-statement","original":"./services"},{"path":"src/executor/index.ts","kind":"import-statement","original":"./executor"},{"path":"src/errors.ts","kind":"import-statement","original":"./errors"}],"format":"esm"},"src/testing/logger.ts":{"bytes":1635,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"src/services/index.ts","kind":"import-statement","original":"../services"}],"format":"esm"},"src/testing/services.ts":{"bytes":6616,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"src/services/index.ts","kind":"import-statement","original":"../services"},{"path":"src/testing/logger.ts","kind":"import-statement","original":"./logger"}],"format":"esm"},"src/testing/layer.ts":{"bytes":3597,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo-db/testing","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"src/services/index.ts","kind":"import-statement","original":"../services"}],"format":"esm"},"src/testing/index.ts":{"bytes":539,"imports":[{"path":"src/testing/services.ts","kind":"import-statement","original":"./services"},{"path":"src/testing/layer.ts","kind":"import-statement","original":"./layer"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/bundler/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":16046},"dist/lib/node-esm/bundler/index.mjs":{"imports":[{"path":"@effect/platform","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"esbuild-wasm","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["Bundler","initializeBundler"],"entryPoint":"src/bundler/index.ts","inputs":{"src/bundler/bundler.ts":{"bytesInOutput":7767},"src/bundler/index.ts":{"bytesInOutput":0}},"bytes":7964},"dist/lib/node-esm/edge/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3363},"dist/lib/node-esm/edge/index.mjs":{"imports":[{"path":"@dxos/client/edge","kind":"import-statement","external":true},{"path":"@dxos/edge-client","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["incrementSemverPatch","publicKeyToDid","uploadWorkerFunction"],"entryPoint":"src/edge/index.ts","inputs":{"src/edge/functions.ts":{"bytesInOutput":1679},"src/edge/index.ts":{"bytesInOutput":0}},"bytes":1909},"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":32430},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-NE5CWLJE.mjs","kind":"import-statement"},{"path":"effect","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true}],"exports":["ComputeEvent","ComputeEventLogger","ComputeEventPayload","ConfiguredCredentialsService","ContextQueueService","CredentialsService","DatabaseService","EmailTriggerOutput","FUNCTIONS_PRESET_META_KEY","FUNCTION_TYPES","FunctionError","FunctionExecutor","FunctionManifestSchema","FunctionTrigger","FunctionTriggerSchema","FunctionType","InvocationOutcome","InvocationTraceEndEvent","InvocationTraceEventType","InvocationTraceStartEvent","LocalFunctionExecutionService","MESSAGE_PROPERTY_TOOL_CALL_ID","QueueService","QueueTriggerOutput","RemoteFunctionExecutionService","SERVICE_TAGS","ScriptType","ServiceContainer","ServiceNotAvailableError","SubscriptionTriggerOutput","TimerTriggerOutput","TraceEvent","TraceEventException","TraceEventLog","TracingService","TriggerKind","TriggerSchema","WebhookTriggerOutput","createDefectLogger","createEventLogger","createInvocationSpans","defineFunction","getInvocationUrl","getUserFunctionUrlInMetadata","logCustomEvent","makeFunctionUrl","setUserFunctionUrlInMetadata"],"entryPoint":"src/index.ts","inputs":{"src/handler.ts":{"bytesInOutput":422},"src/index.ts":{"bytesInOutput":0},"src/schema.ts":{"bytesInOutput":1255},"src/trace.ts":{"bytesInOutput":4258},"src/types.ts":{"bytesInOutput":4732},"src/url.ts":{"bytesInOutput":1189},"src/executor/executor.ts":{"bytesInOutput":1035},"src/executor/index.ts":{"bytesInOutput":0}},"bytes":14689},"dist/lib/node-esm/testing/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6589},"dist/lib/node-esm/testing/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-NE5CWLJE.mjs","kind":"import-statement"},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo-db/testing","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true}],"exports":["TestDatabaseLayer","createTestServices"],"entryPoint":"src/testing/index.ts","inputs":{"src/testing/services.ts":{"bytesInOutput":895},"src/testing/logger.ts":{"bytesInOutput":201},"src/testing/index.ts":{"bytesInOutput":0},"src/testing/layer.ts":{"bytesInOutput":644}},"bytes":2176},"dist/lib/node-esm/chunk-NE5CWLJE.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":41828},"dist/lib/node-esm/chunk-NE5CWLJE.mjs":{"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/errors","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/errors","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"exports":["ComputeEvent","ComputeEventLogger","ComputeEventPayload","ConfiguredCredentialsService","ContextQueueService","CredentialsService","DatabaseService","FunctionError","LocalFunctionExecutionService","MESSAGE_PROPERTY_TOOL_CALL_ID","QueueService","RemoteFunctionExecutionService","SERVICE_TAGS","ServiceContainer","ServiceNotAvailableError","TracingService","createDefectLogger","createEventLogger","logCustomEvent"],"inputs":{"src/services/database.ts":{"bytesInOutput":2376},"src/services/queues.ts":{"bytesInOutput":1105},"src/services/credentials.ts":{"bytesInOutput":2111},"src/services/tracing.ts":{"bytesInOutput":2099},"src/services/event-logger.ts":{"bytesInOutput":2800},"src/services/remote-function-execution-service.ts":{"bytesInOutput":1692},"src/services/service-container.ts":{"bytesInOutput":2476},"src/errors.ts":{"bytesInOutput":309},"src/services/local-function-execution.ts":{"bytesInOutput":1687},"src/services/index.ts":{"bytesInOutput":0}},"bytes":17540}}}
@@ -1,60 +0,0 @@
1
- import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
- import {
3
- ConfiguredCredentialsService,
4
- DatabaseService,
5
- QueueService,
6
- ServiceContainer,
7
- createEventLogger
8
- } from "../chunk-NE5CWLJE.mjs";
9
-
10
- // src/testing/services.ts
11
- import { assertArgument } from "@dxos/invariant";
12
-
13
- // src/testing/logger.ts
14
- import { Effect } from "effect";
15
- import { LogLevel } from "@dxos/log";
16
- var noopLogger = {
17
- log: () => Effect.succeed(void 0),
18
- nodeId: void 0
19
- };
20
- var consoleLogger = createEventLogger(LogLevel.INFO);
21
-
22
- // src/testing/services.ts
23
- var createTestServices = ({ ai, credentials, db, logging, queues, space, tracing } = {}) => {
24
- assertArgument(!(!!space && (!!db || !!queues)), "space can be provided only if db and queues are not");
25
- return new ServiceContainer().setServices({
26
- // ai: createAiService(ai),
27
- credentials: createCredentialsService(credentials),
28
- database: space || db ? DatabaseService.make(space?.db || db) : void 0,
29
- eventLogger: logging?.logger ?? logging?.enabled ? consoleLogger : noopLogger,
30
- queues: space || queues ? QueueService.make(space?.queues || queues, void 0) : void 0,
31
- tracing: tracing?.service
32
- });
33
- };
34
- var createCredentialsService = (credentials) => {
35
- if (credentials?.services) {
36
- return new ConfiguredCredentialsService(credentials.services);
37
- }
38
- if (credentials?.service) {
39
- return credentials.service;
40
- }
41
- };
42
-
43
- // src/testing/layer.ts
44
- import { Context, Effect as Effect2, Layer } from "effect";
45
- import { EchoTestBuilder } from "@dxos/echo-db/testing";
46
- import { accuireReleaseResource } from "@dxos/effect";
47
- var testBuilder = accuireReleaseResource(() => new EchoTestBuilder());
48
- var TestDatabaseLayer = ({ indexing, types } = {}) => Layer.scopedContext(Effect2.gen(function* () {
49
- const builder = yield* testBuilder;
50
- const { db, queues } = yield* Effect2.promise(() => builder.createDatabase({
51
- indexing,
52
- types
53
- }));
54
- return Context.mergeAll(Context.make(DatabaseService, DatabaseService.make(db)), Context.make(QueueService, QueueService.make(queues, void 0)));
55
- }));
56
- export {
57
- TestDatabaseLayer,
58
- createTestServices
59
- };
60
- //# sourceMappingURL=index.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/testing/services.ts", "../../../../src/testing/logger.ts", "../../../../src/testing/layer.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Context } from 'effect';\n\nimport type { Space } from '@dxos/client/echo';\nimport type { EchoDatabase, QueueFactory } from '@dxos/echo-db';\nimport { assertArgument } from '@dxos/invariant';\n\nimport {\n type ComputeEventLogger,\n ConfiguredCredentialsService,\n type CredentialsService,\n DatabaseService,\n QueueService,\n ServiceContainer,\n type ServiceCredential,\n type TracingService,\n} from '../services';\n\nimport { consoleLogger, noopLogger } from './logger';\n\n// TODO(burdon): Factor out.\nexport type OneOf<T> = {\n [K in keyof T]: { [P in K]: T[P] } & { [P in Exclude<keyof T, K>]?: never };\n}[keyof T];\n\nexport type AiServiceProvider = 'dev' | 'edge' | 'ollama' | 'lmstudio';\n\nexport type TestServiceOptions = {\n /**\n * AI service configuration.\n */\n ai?: any;\n\n /**\n * Credentials service configuration.\n */\n credentials?: OneOf<{\n /**\n * Predefined credentials list.\n */\n services?: ServiceCredential[];\n\n /**\n * Custom credentials service.\n */\n service?: Context.Tag.Service<CredentialsService>;\n }>;\n\n /**\n * Database configuration.\n */\n db?: EchoDatabase;\n\n /**\n * Gets database and queue services from the space.\n * Exclusive with: `db`, `queues`\n */\n space?: Space;\n\n /**\n * Logging configuration.\n */\n logging?: {\n enabled?: boolean;\n logger?: Context.Tag.Service<ComputeEventLogger>;\n };\n\n /**\n * Queue service configuration.\n */\n queues?: QueueFactory;\n\n tracing?: {\n service?: Context.Tag.Service<TracingService>;\n };\n};\n\n/**\n * @deprecated\n */\nexport const createTestServices = ({\n ai,\n credentials,\n db,\n logging,\n queues,\n space,\n tracing,\n}: TestServiceOptions = {}): ServiceContainer => {\n assertArgument(!(!!space && (!!db || !!queues)), 'space can be provided only if db and queues are not');\n\n return new ServiceContainer().setServices({\n // ai: createAiService(ai),\n credentials: createCredentialsService(credentials),\n database: space || db ? DatabaseService.make(space?.db || db!) : undefined,\n eventLogger: (logging?.logger ?? logging?.enabled) ? consoleLogger : noopLogger,\n queues: space || queues ? QueueService.make(space?.queues || queues!, undefined) : undefined,\n tracing: tracing?.service,\n });\n};\n\nconst createCredentialsService = (\n credentials: TestServiceOptions['credentials'] | undefined,\n): Context.Tag.Service<CredentialsService> | undefined => {\n if (credentials?.services) {\n return new ConfiguredCredentialsService(credentials.services);\n }\n\n if (credentials?.service) {\n return credentials.service;\n }\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Context, Effect } from 'effect';\n\nimport { LogLevel } from '@dxos/log';\n\nimport { type ComputeEventLogger, createEventLogger } from '../services';\n\nexport const noopLogger: Context.Tag.Service<ComputeEventLogger> = {\n log: () => Effect.succeed(undefined),\n nodeId: undefined,\n};\n\nexport const consoleLogger: Context.Tag.Service<ComputeEventLogger> = createEventLogger(LogLevel.INFO);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Context, Effect, Layer } from 'effect';\nimport type { Schema } from 'effect';\n\nimport { EchoTestBuilder } from '@dxos/echo-db/testing';\nimport type { EchoHostIndexingConfig } from '@dxos/echo-pipeline';\nimport { accuireReleaseResource } from '@dxos/effect';\n\nimport { DatabaseService, QueueService } from '../services';\n\nconst testBuilder = accuireReleaseResource(() => new EchoTestBuilder());\n\nexport type TestDatabaseOptions = {\n indexing?: Partial<EchoHostIndexingConfig>;\n types?: Schema.Schema.AnyNoContext[];\n};\n\nexport const TestDatabaseLayer = ({ indexing, types }: TestDatabaseOptions = {}) =>\n Layer.scopedContext(\n Effect.gen(function* () {\n const builder = yield* testBuilder;\n const { db, queues } = yield* Effect.promise(() => builder.createDatabase({ indexing, types }));\n return Context.mergeAll(\n Context.make(DatabaseService, DatabaseService.make(db)),\n Context.make(QueueService, QueueService.make(que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AOJ,QAAOK,QAAQ,MAAMH,QAAQI,eAAe;IAAEV;IAAUC;EAAM,CAAA,CAAA;AAC5F,SAAOU,QAAQC,SACbD,QAAQE,KAAKC,iBAAiBA,gBAAgBD,KAAKN,EAAAA,CAAAA,GACnDI,QAAQE,KAAKE,cAAcA,aAAaF,KAAKL,QAAQQ,MAAAA,CAAAA,CAAAA;AAEzD,CAAA,CAAA;",
6
- "names": ["assertArgument", "Effect", "LogLevel", "noopLogger", "log", "Effect", "succeed", "undefined", "nodeId", "consoleLogger", "createEventLogger", "LogLevel", "INFO", "createTestServices", "ai", "credentials", "db", "logging", "queues", "space", "tracing", "assertArgument", "ServiceContainer", "setServices", "createCredentialsService", "database", "DatabaseService", "make", "undefined", "eventLogger", "logger", "enabled", "consoleLogger", "noopLogger", "QueueService", "service", "services", "ConfiguredCredentialsService", "Context", "Effect", "Layer", "EchoTestBuilder", "accuireReleaseResource", "testBuilder", "accuireReleaseResource", "EchoTestBuilder", "TestDatabaseLayer", "indexing", "types", "Layer", "scopedContext", "Effect", "gen", "builder", "db", "queues", "promise", "createDatabase", "Context", "mergeAll", "make", "DatabaseService", "QueueService", "undefined"]
7
- }
@@ -1,50 +0,0 @@
1
- import { type BuildOptions, type BuildResult } from 'esbuild-wasm';
2
- export type Import = {
3
- moduleUrl: string;
4
- defaultImport: boolean;
5
- namedImports: string[];
6
- };
7
- export type BundleOptions = {
8
- /**
9
- * Path to the source file on the local file system.
10
- * If provided, the path will be used instead of the `source` code.
11
- */
12
- path?: string;
13
- /**
14
- * Source code to bundle.
15
- * Required if `path` is not provided.
16
- */
17
- source?: string;
18
- };
19
- export type BundleResult = {
20
- timestamp: number;
21
- sourceHash?: Buffer;
22
- imports?: Import[];
23
- bundle?: string;
24
- error?: any;
25
- };
26
- export type BundlerOptions = {
27
- platform: BuildOptions['platform'];
28
- sandboxedModules: string[];
29
- remoteModules: Record<string, string>;
30
- };
31
- export declare const initializeBundler: (options: {
32
- wasmUrl: string;
33
- }) => Promise<void>;
34
- /**
35
- * ESBuild bundler.
36
- */
37
- export declare class Bundler {
38
- private readonly _options;
39
- constructor(_options: BundlerOptions);
40
- bundle({ path, source }: BundleOptions): Promise<BundleResult>;
41
- analyzeImports(result: BuildResult): Import[];
42
- analyzeSourceFileImports(code: string): {
43
- defaultImportName: string;
44
- namedImports: string[];
45
- wildcardImportName: string;
46
- moduleIdentifier: string;
47
- quotes: string;
48
- }[];
49
- }
50
- //# sourceMappingURL=bundler.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bundler.d.ts","sourceRoot":"","sources":["../../../../src/bundler/bundler.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,WAAW,EAA+C,MAAM,cAAc,CAAC;AAOhH,MAAM,MAAM,MAAM,GAAG;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,OAAO,CAAC;IACvB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,GAAG,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC;IACnC,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACvC,CAAC;AAGF,eAAO,MAAM,iBAAiB,GAAU,SAAS;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,kBAInE,CAAC;AAEF;;GAEG;AACH,qBAAa,OAAO;IACN,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,cAAc;IAE/C,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC;IAwFpE,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,EAAE;IA2B7C,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG;QACtC,iBAAiB,EAAE,MAAM,CAAC;QAC1B,YAAY,EAAE,MAAM,EAAE,CAAC;QACvB,kBAAkB,EAAE,MAAM,CAAC;QAC3B,gBAAgB,EAAE,MAAM,CAAC;QACzB,MAAM,EAAE,MAAM,CAAC;KAChB,EAAE;CAaJ"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=bundler.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bundler.test.d.ts","sourceRoot":"","sources":["../../../../src/bundler/bundler.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export * from './bundler';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/bundler/index.ts"],"names":[],"mappings":"AAIA,cAAc,WAAW,CAAC"}
@@ -1,16 +0,0 @@
1
- import { type DID } from 'iso-did/types';
2
- import { type Client } from '@dxos/client';
3
- import { type PublicKey } from '@dxos/keys';
4
- import { type UploadFunctionResponseBody } from '@dxos/protocols';
5
- export type UploadWorkerArgs = {
6
- client: Client;
7
- source: string;
8
- version: string;
9
- name?: string;
10
- functionId?: string;
11
- ownerPublicKey: PublicKey;
12
- };
13
- export declare const uploadWorkerFunction: ({ client, version, source, name, functionId, ownerPublicKey, }: UploadWorkerArgs) => Promise<UploadFunctionResponseBody>;
14
- export declare const incrementSemverPatch: (version: string) => string;
15
- export declare const publicKeyToDid: (key: PublicKey) => DID;
16
- //# sourceMappingURL=functions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../../../src/edge/functions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AAI3C,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAElE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,SAAS,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAU,gEAOxC,gBAAgB,KAAG,OAAO,CAAC,0BAA0B,CAqBvD,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,SAAS,MAAM,KAAG,MAKtD,CAAC;AAGF,eAAO,MAAM,cAAc,GAAI,KAAK,SAAS,KAAG,GAE/C,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './functions';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/edge/index.ts"],"names":[],"mappings":"AAQA,cAAc,aAAa,CAAC"}
@@ -1,11 +0,0 @@
1
- import type { FunctionDefinition } from '../handler';
2
- import type { ServiceContainer } from '../services';
3
- export declare class FunctionExecutor {
4
- private readonly _services;
5
- constructor(_services: ServiceContainer);
6
- /**
7
- *
8
- */
9
- invoke<F extends FunctionDefinition<any, any>>(fnDef: F, input: F extends FunctionDefinition<infer I, infer _O> ? I : never): Promise<F extends FunctionDefinition<infer _I, infer O> ? O : never>;
10
- }
11
- //# sourceMappingURL=executor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../../../src/executor/executor.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAmB,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACtE,OAAO,KAAK,EAAE,gBAAgB,EAAY,MAAM,aAAa,CAAC;AAE9D,qBAAa,gBAAgB;IACf,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAAT,SAAS,EAAE,gBAAgB;IAExD;;OAEG;IAEG,MAAM,CAAC,CAAC,SAAS,kBAAkB,CAAC,GAAG,EAAE,GAAG,CAAC,EACjD,KAAK,EAAE,CAAC,EACR,KAAK,EAAE,CAAC,SAAS,kBAAkB,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,KAAK,GACjE,OAAO,CAAC,CAAC,SAAS,kBAAkB,CAAC,MAAM,EAAE,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;CA+BxE"}
@@ -1,2 +0,0 @@
1
- export * from './executor';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/executor/index.ts"],"names":[],"mappings":"AAIA,cAAc,YAAY,CAAC"}
@@ -1,65 +0,0 @@
1
- import { type Context, type Effect, Schema } from 'effect';
2
- import { type EchoDatabase } from '@dxos/echo-db';
3
- import { type HasId } from '@dxos/echo-schema';
4
- import { type DXN, type SpaceId } from '@dxos/keys';
5
- import { type QueryResult } from '@dxos/protocols';
6
- import type { Services } from './services';
7
- /**
8
- * Function handler.
9
- */
10
- export type FunctionHandler<TData = {}, TOutput = any> = (params: {
11
- /**
12
- * Services and context available to the function.
13
- */
14
- context: FunctionContext;
15
- /**
16
- * Data passed as the input to the function.
17
- * Must match the function's input schema.
18
- * This will be the payload from the trigger or other data passed into the function in a workflow.
19
- */
20
- data: TData;
21
- }) => TOutput | Promise<TOutput> | Effect.Effect<TOutput, any, Services>;
22
- /**
23
- * Function context.
24
- */
25
- export interface FunctionContext {
26
- /**
27
- * Space from which the function was invoked.
28
- */
29
- space: SpaceAPI | undefined;
30
- /**
31
- * Resolves a service available to the function.
32
- * @throws if the service is not available.
33
- */
34
- getService: <T extends Context.Tag<any, any>>(tag: T) => Context.Tag.Service<T>;
35
- getSpace: (spaceId: SpaceId) => Promise<SpaceAPI>;
36
- }
37
- export interface FunctionContextAi {
38
- run(model: string, inputs: any, options?: any): Promise<any>;
39
- }
40
- export interface QueuesAPI {
41
- queryQueue(queue: DXN, options?: {}): Promise<QueryResult>;
42
- insertIntoQueue(queue: DXN, objects: HasId[]): Promise<void>;
43
- }
44
- /**
45
- * Space interface available to functions.
46
- */
47
- export interface SpaceAPI {
48
- get id(): SpaceId;
49
- get db(): EchoDatabase;
50
- get queues(): QueuesAPI;
51
- }
52
- export type FunctionDefinition<T = {}, O = any> = {
53
- name: string;
54
- description?: string;
55
- inputSchema: Schema.Schema<T, any>;
56
- outputSchema?: Schema.Schema<O, any>;
57
- handler: FunctionHandler<T, O>;
58
- };
59
- export declare const defineFunction: <T, O>({ name, description, inputSchema, outputSchema, handler, }: FunctionDefinition<T, O>) => FunctionDefinition<T, O>;
60
- export declare namespace FunctionDefinition {
61
- type Any = FunctionDefinition<any, any>;
62
- type Input<T extends FunctionDefinition> = T extends FunctionDefinition<infer I, any> ? I : never;
63
- type Output<T extends FunctionDefinition> = T extends FunctionDefinition<any, infer O> ? O : never;
64
- }
65
- //# sourceMappingURL=handler.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../src/handler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE3D,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,KAAK,KAA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- export declare const ScriptType: Type.obj<Schema.Struct<{
8
- name: Schema.optional<typeof Schema.String>;
9
- description: Schema.optional<typeof Schema.String>;
10
- changed: Schema.optional<typeof Schema.Boolean>;
11
- source: import("@dxos/echo-schema").Ref$<Type.OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
12
- content: string;
13
- }>;
14
- }>>;
15
- export interface ScriptType extends Schema.Schema.Type<typeof ScriptType> {
16
- }
17
- /**
18
- * Function deployment.
19
- */
20
- export declare const FunctionType: Type.obj<Schema.Struct<{
21
- name: typeof Schema.NonEmptyString;
22
- version: typeof Schema.String;
23
- description: Schema.optional<typeof Schema.String>;
24
- source: Schema.optional<import("@dxos/echo-schema").Ref$<Type.OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
25
- description?: string | undefined;
26
- source: Ref<Type.OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
27
- content: string;
28
- }>;
29
- name?: string | undefined;
30
- changed?: boolean | undefined;
31
- }>>;
32
- inputSchema: Schema.optional<Schema.Schema<Type.JsonSchema, Type.JsonSchema, never>>;
33
- outputSchema: Schema.optional<Schema.Schema<Type.JsonSchema, Type.JsonSchema, never>>;
34
- binding: Schema.optional<typeof Schema.String>;
35
- }>>;
36
- export interface FunctionType extends Schema.Schema.Type<typeof FunctionType> {
37
- }
38
- //# sourceMappingURL=schema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/schema.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAmC,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGzE;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;;GAatB,CAAC;AAEF,MAAM,WAAW,UAAW,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,UAAU,CAAC;CAAG;AAE5E;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;GAsBxB,CAAC;AACF,MAAM,WAAW,YAAa,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,YAAY,CAAC;CAAG"}
@@ -1,79 +0,0 @@
1
- import { Context, Effect, Layer, type Schema } from 'effect';
2
- import { type Filter, type Live, Obj, type Query, type Ref, type Relation, type Type } from '@dxos/echo';
3
- import type { EchoDatabase, FlushOptions, OneShotQueryResult, QueryResult } from '@dxos/echo-db';
4
- import { BaseError } from '@dxos/errors';
5
- import type { DXN } from '@dxos/keys';
6
- declare const DatabaseService_base: Context.TagClass<DatabaseService, "@dxos/functions/DatabaseService", {
7
- readonly db: EchoDatabase;
8
- }>;
9
- export declare class DatabaseService extends DatabaseService_base {
10
- static notAvailable: Layer.Layer<DatabaseService, never, never>;
11
- static make: (db: EchoDatabase) => Context.Tag.Service<DatabaseService>;
12
- static layer: (db: EchoDatabase) => Layer.Layer<DatabaseService>;
13
- /**
14
- * Resolves an object by its DXN.
15
- */
16
- static resolve: {
17
- (dxn: DXN): Effect.Effect<Obj.Any | Relation.Any, never, DatabaseService>;
18
- <S extends Type.Obj.Any | Type.Relation.Any>(dxn: DXN, schema: S): Effect.Effect<Schema.Schema.Type<S>, ObjectNotFoundError, DatabaseService>;
19
- };
20
- /**
21
- * Loads an object reference.
22
- */
23
- static load: <T>(ref: Ref.Ref<T>) => Effect.Effect<T, never, never>;
24
- /**
25
- * Creates a `QueryResult` object that can be subscribed to.
26
- */
27
- static query: {
28
- <Q extends Query.Any>(query: Q): Effect.Effect<QueryResult<Live<Query.Type<Q>>>, never, DatabaseService>;
29
- <F extends Filter.Any>(filter: F): Effect.Effect<QueryResult<Live<Filter.Type<F>>>, never, DatabaseService>;
30
- };
31
- /**
32
- * Executes the query once and returns the results.
33
- */
34
- static runQuery: {
35
- <Q extends Query.Any>(query: Q): Effect.Effect<OneShotQueryResult<Live<Query.Type<Q>>>, never, DatabaseService>;
36
- <F extends Filter.Any>(filter: F): Effect.Effect<OneShotQueryResult<Live<Filter.Type<F>>>, never, DatabaseService>;
37
- };
38
- /**
39
- * Adds an object to the database.
40
- */
41
- static add: <T extends Obj.Any | Relation.Any>(obj: T) => Effect.Effect<T, never, DatabaseService>;
42
- static flush: (opts?: FlushOptions) => Effect.Effect<void, never, DatabaseService>;
43
- }
44
- declare const ObjectNotFoundError_base: {
45
- new (message: string, options?: import("@dxos/errors").BaseErrorOptions): {
46
- #code: "OBJECT_NOT_FOUND";
47
- #context: Record<string, unknown>;
48
- readonly name: "OBJECT_NOT_FOUND";
49
- readonly code: "OBJECT_NOT_FOUND";
50
- readonly _tag: "OBJECT_NOT_FOUND";
51
- readonly context: Record<string, unknown>;
52
- message: string;
53
- stack?: string;
54
- cause?: unknown;
55
- };
56
- code: "OBJECT_NOT_FOUND";
57
- is(error: unknown): error is BaseError;
58
- wrap(message: string, options?: Omit<import("@dxos/errors").BaseErrorOptions, "cause">): (error: unknown) => {
59
- #code: "OBJECT_NOT_FOUND";
60
- #context: Record<string, unknown>;
61
- readonly name: "OBJECT_NOT_FOUND";
62
- readonly code: "OBJECT_NOT_FOUND";
63
- readonly _tag: "OBJECT_NOT_FOUND";
64
- readonly context: Record<string, unknown>;
65
- message: string;
66
- stack?: string;
67
- cause?: unknown;
68
- };
69
- extend<Code extends string>(code: Code): any;
70
- isError(error: unknown): error is Error;
71
- captureStackTrace(targetObject: object, constructorOpt?: Function): void;
72
- prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
73
- stackTraceLimit: number;
74
- };
75
- declare class ObjectNotFoundError extends ObjectNotFoundError_base {
76
- constructor(context?: Record<string, unknown>);
77
- }
78
- export {};
79
- //# sourceMappingURL=database.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../../../../src/services/database.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,M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iDACsD;CAC1F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGD,cAAM,mBAAoB,SAAQ,wBAAoC;gBACxD,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAG9C"}
@@ -1,72 +0,0 @@
1
- import { Context, Effect, Layer, Schema } from 'effect';
2
- import { Type } from '@dxos/echo';
3
- import { LogLevel } from '@dxos/log';
4
- import { TracingService } from './tracing';
5
- export declare const ComputeEventPayload: Schema.Union<[Schema.Struct<{
6
- type: Schema.Literal<["begin-compute"]>;
7
- nodeId: typeof Schema.String;
8
- inputs: Schema.Record$<typeof Schema.String, typeof Schema.Any>;
9
- }>, Schema.Struct<{
10
- type: Schema.Literal<["end-compute"]>;
11
- nodeId: typeof Schema.String;
12
- outputs: Schema.Record$<typeof Schema.String, typeof Schema.Any>;
13
- }>, Schema.Struct<{
14
- type: Schema.Literal<["compute-input"]>;
15
- nodeId: typeof Schema.String;
16
- property: typeof Schema.String;
17
- value: typeof Schema.Any;
18
- }>, Schema.Struct<{
19
- type: Schema.Literal<["compute-output"]>;
20
- nodeId: typeof Schema.String;
21
- property: typeof Schema.String;
22
- value: typeof Schema.Any;
23
- }>, Schema.Struct<{
24
- type: Schema.Literal<["custom"]>;
25
- nodeId: typeof Schema.String;
26
- event: typeof Schema.Any;
27
- }>]>;
28
- export type ComputeEventPayload = Schema.Schema.Type<typeof ComputeEventPayload>;
29
- export declare const ComputeEvent: Type.obj<Schema.Struct<{
30
- payload: Schema.Union<[Schema.Struct<{
31
- type: Schema.Literal<["begin-compute"]>;
32
- nodeId: typeof Schema.String;
33
- inputs: Schema.Record$<typeof Schema.String, typeof Schema.Any>;
34
- }>, Schema.Struct<{
35
- type: Schema.Literal<["end-compute"]>;
36
- nodeId: typeof Schema.String;
37
- outputs: Schema.Record$<typeof Schema.String, typeof Schema.Any>;
38
- }>, Schema.Struct<{
39
- type: Schema.Literal<["compute-input"]>;
40
- nodeId: typeof Schema.String;
41
- property: typeof Schema.String;
42
- value: typeof Schema.Any;
43
- }>, Schema.Struct<{
44
- type: Schema.Literal<["compute-output"]>;
45
- nodeId: typeof Schema.String;
46
- property: typeof Schema.String;
47
- value: typeof Schema.Any;
48
- }>, Schema.Struct<{
49
- type: Schema.Literal<["custom"]>;
50
- nodeId: typeof Schema.String;
51
- event: typeof Schema.Any;
52
- }>]>;
53
- }>>;
54
- declare const ComputeEventLogger_base: Context.TagClass<ComputeEventLogger, "@dxos/functions/ComputeEventLogger", {
55
- readonly log: (event: ComputeEventPayload) => void;
56
- readonly nodeId: string | undefined;
57
- }>;
58
- /**
59
- * Logs event for the compute workflows.
60
- */
61
- export declare class ComputeEventLogger extends ComputeEventLogger_base {
62
- static noop: Context.Tag.Service<ComputeEventLogger>;
63
- /**
64
- * Implements ComputeEventLogger using TracingService.
65
- */
66
- static layerFromTracing: Layer.Layer<ComputeEventLogger, never, TracingService>;
67
- }
68
- export declare const logCustomEvent: (data: any) => Effect.Effect<void, never, ComputeEventLogger>;
69
- export declare const createDefectLogger: <A, E, R>() => ((self: Effect.Effect<A, E, R>) => Effect.Effect<A, E, R>);
70
- export declare const createEventLogger: (level: LogLevel, message?: string) => Context.Tag.Service<ComputeEventLogger>;
71
- export {};
72
- //# sourceMappingURL=event-logger.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"event-logger.d.ts","sourceRoot":"","sources":["../../../../src/services/event-logger.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAExD,OAAO,EAAO,IAAI,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,EAAE,QAAQ,EAAO,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAE3C,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;IA4B/B,CAAC;AACF,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEjF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;GAEsD,CAAC;;kBAO9D,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI;qBAAmB,MAAM,GAAG,SAAS;;AAL3F;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,uBAGrC;IACD,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAGlD;IAEF;;OAEG;IACH,MAAM,CAAC,gBAAgB,yDAWrB;CACH;AAED,eAAO,MAAM,cAAc,GAAI,MAAM,GAAG,mDAWpC,CAAC;AAEL,eAAO,MAAM,kBAAkB,GAAI,CAAC,EAAE,CAAC,EAAE,CAAC,OAAK,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAMrG,CAAC;AAEJ,eAAO,MAAM,iBAAiB,GAC5B,OAAO,QAAQ,EACf,UAAS,MAAgB,KACxB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,kBAAkB,CAiBxC,CAAC"}
@@ -1,12 +0,0 @@
1
- import { Context, Effect, Layer } from 'effect';
2
- import type { FunctionDefinition } from '../handler';
3
- import type { Services } from './service-container';
4
- declare const LocalFunctionExecutionService_base: Context.TagClass<LocalFunctionExecutionService, "@dxos/functions/LocalFunctionExecutionService", {
5
- invokeFunction(fnDef: FunctionDefinition<any, any>, input: unknown): Effect.Effect<unknown, never, Services>;
6
- }>;
7
- export declare class LocalFunctionExecutionService extends LocalFunctionExecutionService_base {
8
- static layer: Layer.Layer<LocalFunctionExecutionService, never, never>;
9
- static invokeFunction: <F extends FunctionDefinition.Any>(fnDef: F, input: FunctionDefinition.Input<F>) => Effect.Effect<FunctionDefinition.Output<F>, never, Services | LocalFunctionExecutionService>;
10
- }
11
- export {};
12
- //# sourceMappingURL=local-function-execution.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"local-function-execution.d.ts","sourceRoot":"","sources":["../../../../src/services/local-function-execution.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAU,MAAM,QAAQ,CAAC;AAKxD,OAAO,KAAK,EAAmB,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEtE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;;0BAO1B,kBAAkB,CAAC,GAAG,EAAE,GAAG,CAAC,SAAS,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC;;AALhH,qBAAa,6BAA8B,SAAQ,kCAOhD;IACD,MAAM,CAAC,KAAK,2DAET;IAEH,MAAM,CAAC,cAAc,EAAE,CAAC,CAAC,SAAS,kBAAkB,CAAC,GAAG,EACtD,KAAK,EAAE,CAAC,EACR,KAAK,EAAE,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC,KAC/B,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,GAAG,6BAA6B,CAAC,CACH;CAC/F"}
@@ -1,15 +0,0 @@
1
- import { Context, Layer } from 'effect';
2
- import type { SpaceId } from '@dxos/keys';
3
- declare const RemoteFunctionExecutionService_base: Context.TagClass<RemoteFunctionExecutionService, "@dxos/functions/RemoteFunctionExecutionService", {
4
- callFunction(deployedFunctionId: string, input: any, spaceId?: SpaceId): Promise<any>;
5
- }>;
6
- /**
7
- * Allows calling into other functions.
8
- */
9
- export declare class RemoteFunctionExecutionService extends RemoteFunctionExecutionService_base {
10
- static fromClient(baseUrl: string, spaceId: SpaceId): Context.Tag.Service<RemoteFunctionExecutionService>;
11
- static mock: () => Context.Tag.Service<RemoteFunctionExecutionService>;
12
- static mockLayer: Layer.Layer<RemoteFunctionExecutionService, never, never>;
13
- }
14
- export {};
15
- //# sourceMappingURL=remote-function-execution-service.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"remote-function-execution-service.d.ts","sourceRoot":"","sources":["../../../../src/services/remote-function-execution-service.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAExC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;;qCAQL,MAAM,SAAS,GAAG,YAAY,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC;;AANzF;;GAEG;AACH,qBAAa,8BAA+B,SAAQ,mCAKjD;IACD,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,8BAA8B,CAAC;IAiBzG,MAAM,CAAC,IAAI,QAAO,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,8BAA8B,CAAC,CAMnE;IAEF,MAAM,CAAC,SAAS,4DAAwF;CACzG"}