@dxos/compute 0.8.4-main.5ea62a8 → 0.8.4-main.60689f5b1c

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 (175) hide show
  1. package/LICENSE +102 -5
  2. package/README.md +36 -1
  3. package/dist/lib/neutral/StorageService.mjs +22 -0
  4. package/dist/lib/neutral/chunk-AKVCVI6N.mjs +25 -0
  5. package/dist/lib/neutral/chunk-AKVCVI6N.mjs.map +7 -0
  6. package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
  7. package/dist/lib/neutral/chunk-LF2ANNYW.mjs +171 -0
  8. package/dist/lib/neutral/chunk-LF2ANNYW.mjs.map +7 -0
  9. package/dist/lib/neutral/chunk-LRCABAWU.mjs +17 -0
  10. package/dist/lib/neutral/chunk-LRCABAWU.mjs.map +7 -0
  11. package/dist/lib/neutral/chunk-RCLYF66G.mjs +21 -0
  12. package/dist/lib/neutral/chunk-RCLYF66G.mjs.map +7 -0
  13. package/dist/lib/neutral/chunk-SEBWOTOU.mjs +235 -0
  14. package/dist/lib/neutral/chunk-SEBWOTOU.mjs.map +7 -0
  15. package/dist/lib/neutral/chunk-VSICPGGY.mjs +53 -0
  16. package/dist/lib/neutral/chunk-VSICPGGY.mjs.map +7 -0
  17. package/dist/lib/neutral/chunk-XEVFBI6S.mjs +62 -0
  18. package/dist/lib/neutral/chunk-XEVFBI6S.mjs.map +7 -0
  19. package/dist/lib/neutral/fib-ZSJYREBW.mjs +10 -0
  20. package/dist/lib/neutral/fib-ZSJYREBW.mjs.map +7 -0
  21. package/dist/lib/neutral/index.mjs +1225 -0
  22. package/dist/lib/neutral/index.mjs.map +7 -0
  23. package/dist/lib/neutral/meta.json +1 -0
  24. package/dist/lib/neutral/reply-YH3BVOUT.mjs +10 -0
  25. package/dist/lib/neutral/reply-YH3BVOUT.mjs.map +7 -0
  26. package/dist/lib/neutral/sleep-TSPIQ5EY.mjs +10 -0
  27. package/dist/lib/neutral/sleep-TSPIQ5EY.mjs.map +7 -0
  28. package/dist/lib/neutral/testing/index.mjs +32 -0
  29. package/dist/lib/neutral/testing/index.mjs.map +7 -0
  30. package/dist/types/src/Blueprint.d.ts +192 -0
  31. package/dist/types/src/Blueprint.d.ts.map +1 -0
  32. package/dist/types/src/Credential.d.ts +27 -0
  33. package/dist/types/src/Credential.d.ts.map +1 -0
  34. package/dist/types/src/LayerSpec.d.ts +56 -0
  35. package/dist/types/src/LayerSpec.d.ts.map +1 -0
  36. package/dist/types/src/McpServer.d.ts +27 -0
  37. package/dist/types/src/McpServer.d.ts.map +1 -0
  38. package/dist/types/src/Operation.d.ts +340 -0
  39. package/dist/types/src/Operation.d.ts.map +1 -0
  40. package/dist/types/src/OperationHandlerSet.d.ts +67 -0
  41. package/dist/types/src/OperationHandlerSet.d.ts.map +1 -0
  42. package/dist/types/src/OperationHandlerSet.test.d.ts +2 -0
  43. package/dist/types/src/OperationHandlerSet.test.d.ts.map +1 -0
  44. package/dist/types/src/OperationRegistry.d.ts +23 -0
  45. package/dist/types/src/OperationRegistry.d.ts.map +1 -0
  46. package/dist/types/src/Process.d.ts +247 -0
  47. package/dist/types/src/Process.d.ts.map +1 -0
  48. package/dist/types/src/Routine.d.ts +63 -0
  49. package/dist/types/src/Routine.d.ts.map +1 -0
  50. package/dist/types/src/Script.d.ts +22 -0
  51. package/dist/types/src/Script.d.ts.map +1 -0
  52. package/dist/types/src/ServiceResolver.d.ts +89 -0
  53. package/dist/types/src/ServiceResolver.d.ts.map +1 -0
  54. package/dist/types/src/StorageService.d.ts +58 -0
  55. package/dist/types/src/StorageService.d.ts.map +1 -0
  56. package/dist/types/src/Template.d.ts +62 -0
  57. package/dist/types/src/Template.d.ts.map +1 -0
  58. package/dist/types/src/Template.test.d.ts +2 -0
  59. package/dist/types/src/Template.test.d.ts.map +1 -0
  60. package/dist/types/src/Trace.d.ts +268 -0
  61. package/dist/types/src/Trace.d.ts.map +1 -0
  62. package/dist/types/src/Trigger.d.ts +150 -0
  63. package/dist/types/src/Trigger.d.ts.map +1 -0
  64. package/dist/types/src/TriggerEvent.d.ts +75 -0
  65. package/dist/types/src/TriggerEvent.d.ts.map +1 -0
  66. package/dist/types/src/errors.d.ts +308 -0
  67. package/dist/types/src/errors.d.ts.map +1 -0
  68. package/dist/types/src/index.d.ts +17 -5
  69. package/dist/types/src/index.d.ts.map +1 -1
  70. package/dist/types/src/testing/definitions.d.ts +11 -0
  71. package/dist/types/src/testing/definitions.d.ts.map +1 -0
  72. package/dist/types/src/testing/fib.d.ts +8 -0
  73. package/dist/types/src/testing/fib.d.ts.map +1 -0
  74. package/dist/types/src/testing/index.d.ts +6 -3
  75. package/dist/types/src/testing/index.d.ts.map +1 -1
  76. package/dist/types/src/testing/reply.d.ts +4 -0
  77. package/dist/types/src/testing/reply.d.ts.map +1 -0
  78. package/dist/types/src/testing/sleep.d.ts +6 -0
  79. package/dist/types/src/testing/sleep.d.ts.map +1 -0
  80. package/dist/types/src/umbrella.test.d.ts +2 -0
  81. package/dist/types/src/umbrella.test.d.ts.map +1 -0
  82. package/dist/types/tsconfig.tsbuildinfo +1 -1
  83. package/package.json +29 -47
  84. package/src/Blueprint.ts +303 -0
  85. package/src/Credential.ts +53 -0
  86. package/src/LayerSpec.ts +91 -0
  87. package/src/McpServer.ts +44 -0
  88. package/src/Operation.ts +593 -0
  89. package/src/OperationHandlerSet.test.ts +92 -0
  90. package/src/OperationHandlerSet.ts +174 -0
  91. package/src/OperationRegistry.ts +50 -0
  92. package/src/Process.ts +504 -0
  93. package/src/Routine.ts +75 -0
  94. package/src/Script.ts +40 -0
  95. package/src/ServiceResolver.ts +194 -0
  96. package/src/StorageService.ts +101 -0
  97. package/src/Template.test.ts +151 -0
  98. package/src/Template.ts +122 -0
  99. package/src/Trace.ts +368 -0
  100. package/src/Trigger.ts +209 -0
  101. package/src/TriggerEvent.ts +64 -0
  102. package/src/errors.ts +71 -0
  103. package/src/index.ts +18 -32
  104. package/src/testing/definitions.ts +49 -0
  105. package/src/testing/fib.ts +22 -0
  106. package/src/testing/index.ts +13 -4
  107. package/src/testing/reply.ts +18 -0
  108. package/src/testing/sleep.ts +16 -0
  109. package/src/umbrella.test.ts +51 -0
  110. package/dist/lib/browser/chunk-OFPP3ZEX.mjs +0 -3140
  111. package/dist/lib/browser/chunk-OFPP3ZEX.mjs.map +0 -7
  112. package/dist/lib/browser/index.mjs +0 -55
  113. package/dist/lib/browser/meta.json +0 -1
  114. package/dist/lib/browser/testing/index.mjs +0 -186
  115. package/dist/lib/browser/testing/index.mjs.map +0 -7
  116. package/dist/lib/node-esm/chunk-6GVHPKPB.mjs +0 -3142
  117. package/dist/lib/node-esm/chunk-6GVHPKPB.mjs.map +0 -7
  118. package/dist/lib/node-esm/index.mjs +0 -56
  119. package/dist/lib/node-esm/meta.json +0 -1
  120. package/dist/lib/node-esm/testing/index.mjs +0 -187
  121. package/dist/lib/node-esm/testing/index.mjs.map +0 -7
  122. package/dist/types/src/compute-graph-registry.d.ts +0 -34
  123. package/dist/types/src/compute-graph-registry.d.ts.map +0 -1
  124. package/dist/types/src/compute-graph.d.ts +0 -64
  125. package/dist/types/src/compute-graph.d.ts.map +0 -1
  126. package/dist/types/src/compute-graph.test.d.ts +0 -2
  127. package/dist/types/src/compute-graph.test.d.ts.map +0 -1
  128. package/dist/types/src/compute-node.d.ts +0 -25
  129. package/dist/types/src/compute-node.d.ts.map +0 -1
  130. package/dist/types/src/functions/async-function.d.ts +0 -66
  131. package/dist/types/src/functions/async-function.d.ts.map +0 -1
  132. package/dist/types/src/functions/edge-function.d.ts +0 -20
  133. package/dist/types/src/functions/edge-function.d.ts.map +0 -1
  134. package/dist/types/src/functions/function-defs.d.ts +0 -11
  135. package/dist/types/src/functions/function-defs.d.ts.map +0 -1
  136. package/dist/types/src/functions/index.d.ts +0 -4
  137. package/dist/types/src/functions/index.d.ts.map +0 -1
  138. package/dist/types/src/hyperformula.test.d.ts +0 -2
  139. package/dist/types/src/hyperformula.test.d.ts.map +0 -1
  140. package/dist/types/src/testing/test-builder.d.ts +0 -15
  141. package/dist/types/src/testing/test-builder.d.ts.map +0 -1
  142. package/dist/types/src/testing/test-plugin.d.ts +0 -36
  143. package/dist/types/src/testing/test-plugin.d.ts.map +0 -1
  144. package/dist/types/src/testing/util.d.ts +0 -2
  145. package/dist/types/src/testing/util.d.ts.map +0 -1
  146. package/dist/types/src/types/hyperformula.d.ts +0 -11
  147. package/dist/types/src/types/hyperformula.d.ts.map +0 -1
  148. package/dist/types/src/types/index.d.ts +0 -3
  149. package/dist/types/src/types/index.d.ts.map +0 -1
  150. package/dist/types/src/types/types.d.ts +0 -20
  151. package/dist/types/src/types/types.d.ts.map +0 -1
  152. package/dist/types/src/types/types.test.d.ts +0 -2
  153. package/dist/types/src/types/types.test.d.ts.map +0 -1
  154. package/dist/types/src/util.d.ts +0 -2
  155. package/dist/types/src/util.d.ts.map +0 -1
  156. package/dist/vendor/hyperformula.mjs +0 -36400
  157. package/src/compute-graph-registry.ts +0 -91
  158. package/src/compute-graph.test.ts +0 -89
  159. package/src/compute-graph.ts +0 -260
  160. package/src/compute-node.ts +0 -62
  161. package/src/functions/async-function.ts +0 -179
  162. package/src/functions/edge-function.ts +0 -112
  163. package/src/functions/function-defs.ts +0 -2427
  164. package/src/functions/index.ts +0 -7
  165. package/src/hyperformula.test.ts +0 -14
  166. package/src/testing/test-builder.ts +0 -54
  167. package/src/testing/test-plugin.ts +0 -101
  168. package/src/testing/util.ts +0 -9
  169. package/src/types/hyperformula.ts +0 -19
  170. package/src/types/index.ts +0 -6
  171. package/src/types/types.test.ts +0 -91
  172. package/src/types/types.ts +0 -80
  173. package/src/util.ts +0 -8
  174. /package/dist/lib/{browser/index.mjs.map → neutral/StorageService.mjs.map} +0 -0
  175. /package/dist/lib/{node-esm/index.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
package/LICENSE CHANGED
@@ -1,8 +1,105 @@
1
- MIT License
2
- Copyright (c) 2022 DXOS
1
+ # Functional Source License, Version 1.1, ALv2 Future License
3
2
 
4
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3
+ ## Abbreviation
5
4
 
6
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
5
+ FSL-1.1-Apache-2.0
7
6
 
8
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
7
+ ## Notice
8
+
9
+ Copyright 2026 DXOS
10
+
11
+ ## Terms and Conditions
12
+
13
+ ### Licensor ("We")
14
+
15
+ The party offering the Software under these Terms and Conditions.
16
+
17
+ ### The Software
18
+
19
+ The "Software" is each version of the software that we make available under
20
+ these Terms and Conditions, as indicated by our inclusion of these Terms and
21
+ Conditions with the Software.
22
+
23
+ ### License Grant
24
+
25
+ Subject to your compliance with this License Grant and the Patents,
26
+ Redistribution and Trademark clauses below, we hereby grant you the right to
27
+ use, copy, modify, create derivative works, publicly perform, publicly display
28
+ and redistribute the Software for any Permitted Purpose identified below.
29
+
30
+ ### Permitted Purpose
31
+
32
+ A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
33
+ means making the Software available to others in a commercial product or
34
+ service that:
35
+
36
+ 1. substitutes for the Software;
37
+
38
+ 2. substitutes for any other product or service we offer using the Software
39
+ that exists as of the date we make the Software available; or
40
+
41
+ 3. offers the same or substantially similar functionality as the Software.
42
+
43
+ Permitted Purposes specifically include using the Software:
44
+
45
+ 1. for your internal use and access;
46
+
47
+ 2. for non-commercial education;
48
+
49
+ 3. for non-commercial research; and
50
+
51
+ 4. in connection with professional services that you provide to a licensee
52
+ using the Software in accordance with these Terms and Conditions.
53
+
54
+ ### Patents
55
+
56
+ To the extent your use for a Permitted Purpose would necessarily infringe our
57
+ patents, the license grant above includes a license under our patents. If you
58
+ make a claim against any party that the Software infringes or contributes to
59
+ the infringement of any patent, then your patent license to the Software ends
60
+ immediately.
61
+
62
+ ### Redistribution
63
+
64
+ The Terms and Conditions apply to all copies, modifications and derivatives of
65
+ the Software.
66
+
67
+ If you redistribute any copies, modifications or derivatives of the Software,
68
+ you must include a copy of or a link to these Terms and Conditions and not
69
+ remove any copyright notices provided in or with the Software.
70
+
71
+ ### Disclaimer
72
+
73
+ THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
74
+ IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
75
+ PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
76
+
77
+ IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
78
+ SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
79
+ EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
80
+
81
+ ### Trademarks
82
+
83
+ Except for displaying the License Details and identifying us as the origin of
84
+ the Software, you have no right under these Terms and Conditions to use our
85
+ trademarks, trade names, service marks or product names.
86
+
87
+ ## Grant of Future License
88
+
89
+ We hereby irrevocably grant you an additional license to use the Software under
90
+ the Apache License, Version 2.0 that is effective on the second anniversary of
91
+ the date we make the Software available. On or after that date, you may use the
92
+ Software under the Apache License, Version 2.0, in which case the following
93
+ will apply:
94
+
95
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
96
+ this file except in compliance with the License.
97
+
98
+ You may obtain a copy of the License at
99
+
100
+ http://www.apache.org/licenses/LICENSE-2.0
101
+
102
+ Unless required by applicable law or agreed to in writing, software distributed
103
+ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
104
+ CONDITIONS OF ANY KIND, either express or implied. See the License for the
105
+ specific language governing permissions and limitations under the License.
package/README.md CHANGED
@@ -1,3 +1,38 @@
1
1
  # @dxos/compute
2
2
 
3
- Basic compute API.
3
+ Umbrella package for AI-aware DXOS compute primitives.
4
+
5
+ ## Usage
6
+
7
+ Importing from `@dxos/compute` is equivalent to importing from the underlying
8
+ source packages. Namespaces preserve their nesting — there is no extra wrapping
9
+ or unwrapping:
10
+
11
+ ```ts
12
+ import { Blueprint, Operation, Routine, Process, Script, Trace, Trigger } from '@dxos/compute';
13
+
14
+ Blueprint.make({ /* ... */ });
15
+ Operation.lazy(() => /* ... */);
16
+ Trace.write(Trace.OperationStart, { /* ... */ });
17
+ ```
18
+
19
+ This single surface subsumes:
20
+
21
+ | Re-exported from | Includes |
22
+ | ------------------ | --------------------------------------------------------------- |
23
+ | `@dxos/operation` | `Operation`, `OperationInvoker`, `OperationHandlerSet`, `OperationRegistry`, errors |
24
+ | `@dxos/blueprints` | `Blueprint`, `Routine`, `Template` |
25
+ | `@dxos/functions` | `Process`, `Trigger`, `TriggerEvent`, `Script`, `Trace`, `ServiceResolver`, `StorageService`, `CredentialsService`, `ExampleHandlers`, services, errors, sdk |
26
+
27
+ The HyperFormula-based compute graph that previously lived here moved to
28
+ [`@dxos/compute-hyperformula`](../compute-hyperformula).
29
+
30
+ ## Roadmap
31
+
32
+ - Stage 1 (current): re-exports — consumers depend only on `@dxos/compute`
33
+ while the source packages stay in place.
34
+ - Stage 2: migrate source into `@dxos/compute` and remove
35
+ `@dxos/operation`, `@dxos/blueprints`, and `@dxos/functions`.
36
+ - A companion `@dxos/compute-runtime-local` package will host the local
37
+ implementations of the services defined here (currently in
38
+ `@dxos/functions-runtime`).
@@ -0,0 +1,22 @@
1
+ import {
2
+ StorageService,
3
+ clear,
4
+ deleteKey,
5
+ get,
6
+ key,
7
+ list,
8
+ set,
9
+ withDefault
10
+ } from "./chunk-XEVFBI6S.mjs";
11
+ import "./chunk-J5LGTIGS.mjs";
12
+ export {
13
+ StorageService,
14
+ clear,
15
+ deleteKey,
16
+ get,
17
+ key,
18
+ list,
19
+ set,
20
+ withDefault
21
+ };
22
+ //# sourceMappingURL=StorageService.mjs.map
@@ -0,0 +1,25 @@
1
+ import {
2
+ Fibonacci
3
+ } from "./chunk-VSICPGGY.mjs";
4
+ import {
5
+ withHandler
6
+ } from "./chunk-SEBWOTOU.mjs";
7
+
8
+ // src/testing/fib.ts
9
+ import * as Effect from "effect/Effect";
10
+ var fib_default = Fibonacci.pipe(withHandler(Effect.fn(function* ({ iterations = 1e5 }) {
11
+ let a = 0n;
12
+ let b = 1n;
13
+ for (let i = 0; i < iterations; i++) {
14
+ a += b;
15
+ b = a - b;
16
+ }
17
+ return {
18
+ result: a.toString()
19
+ };
20
+ })));
21
+
22
+ export {
23
+ fib_default
24
+ };
25
+ //# sourceMappingURL=chunk-AKVCVI6N.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/testing/fib.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport * as Operation from '../Operation';\nimport { Fibonacci } from './definitions';\n\nexport default Fibonacci.pipe(\n Operation.withHandler(\n Effect.fn(function* ({ iterations = 100_000 }) {\n let a = 0n;\n let b = 1n;\n for (let i = 0; i < iterations; i++) {\n a += b;\n b = a - b;\n }\n return { result: a.toString() };\n }),\n ),\n);\n"],
5
+ "mappings": ";;;;;;;;AAIA,YAAYA,YAAY;AAKxB,IAAA,cAAeC,UAAUC,KACbC,YACDC,UAAG,WAAW,EAAEC,aAAa,IAAO,GAAE;AAC3C,MAAIC,IAAI;AACR,MAAIC,IAAI;AACR,WAASC,IAAI,GAAGA,IAAIH,YAAYG,KAAK;AACnCF,SAAKC;AACLA,QAAID,IAAIC;EACV;AACA,SAAO;IAAEE,QAAQH,EAAEI,SAAQ;EAAG;AAChC,CAAA,CAAA,CAAA;",
6
+ "names": ["Effect", "Fibonacci", "pipe", "withHandler", "fn", "iterations", "a", "b", "i", "result", "toString"]
7
+ }
@@ -0,0 +1,10 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __export = (target, all) => {
3
+ for (var name in all)
4
+ __defProp(target, name, { get: all[name], enumerable: true });
5
+ };
6
+
7
+ export {
8
+ __export
9
+ };
10
+ //# sourceMappingURL=chunk-J5LGTIGS.mjs.map
@@ -0,0 +1,171 @@
1
+ import {
2
+ __export
3
+ } from "./chunk-J5LGTIGS.mjs";
4
+
5
+ // src/errors.ts
6
+ import { BaseError } from "@dxos/errors";
7
+ var InvokerNotInitializedError = class extends BaseError.extend("InvokerNotInitializedError", "Invoker not initialized") {
8
+ constructor() {
9
+ super();
10
+ }
11
+ };
12
+ var NoHandlerError = class extends BaseError.extend("NoHandlerError", "No handler found for operation. ") {
13
+ constructor(operationKey) {
14
+ super({
15
+ context: {
16
+ operationKey
17
+ }
18
+ });
19
+ }
20
+ };
21
+ var ServiceNotAvailableError = class extends BaseError.extend("ServiceNotAvailable", "Service not available") {
22
+ constructor(service, options) {
23
+ super({
24
+ context: {
25
+ service
26
+ },
27
+ ...options,
28
+ message: `Service not available: ${service}`
29
+ });
30
+ }
31
+ };
32
+ var FunctionNotFoundError = class extends BaseError.extend("FunctionNotFound", "Function not found") {
33
+ constructor(functionKey, options) {
34
+ super({
35
+ context: {
36
+ function: functionKey
37
+ },
38
+ ...options
39
+ });
40
+ }
41
+ };
42
+ var FunctionError = class extends BaseError.extend("FunctionError", "Function invocation error") {
43
+ };
44
+ var InvalidOperationInputError = class extends BaseError.extend("InvalidOperationInput", "Operation input did not match schema") {
45
+ };
46
+ var InvalidOperationOutputError = class extends BaseError.extend("InvalidOperationOutput", "Operation output did not match schema") {
47
+ };
48
+ var TriggerStateNotFoundError = class extends BaseError.extend("TriggerStateNotFound", "Trigger state not found") {
49
+ };
50
+ var FunctionsAiUpstreamError = class extends BaseError.extend("FunctionsAiUpstreamError", "Upstream AI service returned an error") {
51
+ };
52
+ var FunctionsAiMemoizationMissError = class extends BaseError.extend("FunctionsAiMemoizationMissError", "No memoized AI conversation found for the given cache key") {
53
+ };
54
+
55
+ // src/OperationHandlerSet.ts
56
+ var OperationHandlerSet_exports = {};
57
+ __export(OperationHandlerSet_exports, {
58
+ OperationHandlerProvider: () => OperationHandlerProvider,
59
+ TypeId: () => TypeId,
60
+ async: () => async,
61
+ empty: () => empty,
62
+ getHandler: () => getHandler,
63
+ getHandlerByKey: () => getHandlerByKey,
64
+ isOperationHandlerSet: () => isOperationHandlerSet,
65
+ lazy: () => lazy,
66
+ make: () => make,
67
+ merge: () => merge,
68
+ provide: () => provide,
69
+ reactive: () => reactive
70
+ });
71
+ import * as Context from "effect/Context";
72
+ import * as Effect from "effect/Effect";
73
+ import { pipe } from "effect/Function";
74
+ import * as Layer from "effect/Layer";
75
+ import { runAndForwardErrors } from "@dxos/effect";
76
+ import { assertArgument } from "@dxos/invariant";
77
+ var TypeId = "~@dxos/operation/OperationHandlerSet";
78
+ var isOperationHandlerSet = (value) => {
79
+ return typeof value === "object" && value !== null && TypeId in value;
80
+ };
81
+ var empty = {
82
+ [TypeId]: TypeId,
83
+ handlers: Effect.succeed([]),
84
+ getHandlers: () => Promise.resolve([])
85
+ };
86
+ var make = (...handlers) => {
87
+ return async(() => Promise.resolve(handlers));
88
+ };
89
+ var async = (getHandlers) => {
90
+ let promise2 = null;
91
+ const getHandlersCached = () => {
92
+ if (!promise2) {
93
+ promise2 = getHandlers();
94
+ }
95
+ return promise2;
96
+ };
97
+ return {
98
+ [TypeId]: TypeId,
99
+ getHandlers,
100
+ handlers: Effect.promise(getHandlersCached)
101
+ };
102
+ };
103
+ var reactive = (registry, atom) => {
104
+ let cached = null;
105
+ registry.subscribe(atom, () => {
106
+ cached = null;
107
+ });
108
+ const compute = Effect.suspend(() => pipe(
109
+ registry.get(atom),
110
+ Effect.forEach((set) => set.handlers, {
111
+ concurrency: "unbounded"
112
+ }),
113
+ Effect.map((groups) => groups.flat()),
114
+ // Reset cached on failure so a transient error doesn't permanently
115
+ // poison subsequent calls.
116
+ Effect.tapErrorCause(() => Effect.sync(() => {
117
+ cached = null;
118
+ }))
119
+ ));
120
+ const getHandlers = () => cached ??= runAndForwardErrors(compute);
121
+ return {
122
+ [TypeId]: TypeId,
123
+ getHandlers,
124
+ handlers: Effect.promise(getHandlers)
125
+ };
126
+ };
127
+ var merge = (...sets) => {
128
+ assertArgument(sets.every(isOperationHandlerSet), "sets", "sets must be an array of OperationHandlerSet");
129
+ return async(() => Promise.all(sets.map((set) => set.getHandlers())).then((handlers) => handlers.flat()));
130
+ };
131
+ var lazy = (...modules) => {
132
+ return async(() => Promise.all(modules.map((module) => module().then(({ default: handler }) => handler))));
133
+ };
134
+ var getHandler = (set, definition) => Effect.gen(function* () {
135
+ const handlers = yield* set.handlers;
136
+ const handler = handlers.find((handler2) => handler2.meta.key === definition.meta.key);
137
+ if (!handler) {
138
+ return yield* Effect.fail(new NoHandlerError(definition.meta.key));
139
+ }
140
+ return handler;
141
+ });
142
+ var getHandlerByKey = (set, key) => Effect.gen(function* () {
143
+ const handlers = yield* set.handlers;
144
+ const handler = handlers.find((handler2) => handler2.meta.key === key);
145
+ if (!handler) {
146
+ return yield* Effect.fail(new NoHandlerError(key));
147
+ }
148
+ return handler;
149
+ });
150
+ var OperationHandlerProvider = class extends Context.Tag("@dxos/operation/OperationHandlerProvider")() {
151
+ };
152
+ var provide = (handlers) => Layer.succeed(OperationHandlerProvider, handlers);
153
+
154
+ export {
155
+ InvokerNotInitializedError,
156
+ NoHandlerError,
157
+ ServiceNotAvailableError,
158
+ FunctionNotFoundError,
159
+ FunctionError,
160
+ InvalidOperationInputError,
161
+ InvalidOperationOutputError,
162
+ TriggerStateNotFoundError,
163
+ FunctionsAiUpstreamError,
164
+ FunctionsAiMemoizationMissError,
165
+ lazy,
166
+ getHandler,
167
+ getHandlerByKey,
168
+ OperationHandlerProvider,
169
+ OperationHandlerSet_exports
170
+ };
171
+ //# sourceMappingURL=chunk-LF2ANNYW.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/errors.ts", "../../../src/OperationHandlerSet.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { BaseError, type BaseErrorOptions } from '@dxos/errors';\n\n// Errors from @dxos/operation.\n\nexport class InvokerNotInitializedError extends BaseError.extend(\n 'InvokerNotInitializedError',\n 'Invoker not initialized',\n) {\n constructor() {\n super();\n }\n}\n\nexport class NoHandlerError extends BaseError.extend('NoHandlerError', 'No handler found for operation. ') {\n constructor(operationKey: string) {\n super({ context: { operationKey } });\n }\n}\n\n// Errors from @dxos/functions.\n\nexport class ServiceNotAvailableError extends BaseError.extend('ServiceNotAvailable', 'Service not available') {\n constructor(service: string, options?: Omit<BaseErrorOptions, 'context'>) {\n super({ context: { service }, ...options, message: `Service not available: ${service}` });\n }\n}\n\nexport class FunctionNotFoundError extends BaseError.extend('FunctionNotFound', 'Function not found') {\n constructor(functionKey: string, options?: Omit<BaseErrorOptions, 'context'>) {\n super({ context: { function: functionKey }, ...options });\n }\n}\n\nexport class FunctionError extends BaseError.extend('FunctionError', 'Function invocation error') {}\n\nexport class InvalidOperationInputError extends BaseError.extend(\n 'InvalidOperationInput',\n 'Operation input did not match schema',\n) {}\n\nexport class InvalidOperationOutputError extends BaseError.extend(\n 'InvalidOperationOutput',\n 'Operation output did not match schema',\n) {}\n\nexport class TriggerStateNotFoundError extends BaseError.extend('TriggerStateNotFound', 'Trigger state not found') {}\n\n/**\n * Raised when the upstream AI gateway responds with a structured JSON error envelope\n * (`{ \"type\": \"error\", \"error\": { \"type\": ..., \"message\": ... } }`). Surfaces as a typed\n * defect from `FunctionsAiHttpClient`, bypassing `@effect/ai`'s generic `HttpResponseError`\n * wrapping so callers can match on the error class directly.\n */\nexport class FunctionsAiUpstreamError extends BaseError.extend(\n 'FunctionsAiUpstreamError',\n 'Upstream AI service returned an error',\n) {}\n\n/**\n * Specialized `FunctionsAiUpstreamError` for the memoization layer: the recorded fixture for a\n * given cache key was not found and `ALLOW_LLM_GENERATION` is unset. The `cacheKey` is exposed\n * via `context.cacheKey` to make regeneration straightforward.\n */\nexport class FunctionsAiMemoizationMissError extends BaseError.extend(\n 'FunctionsAiMemoizationMissError',\n 'No memoized AI conversation found for the given cache key',\n) {}\n", "//\n// Copyright 2026 DXOS.org\n//\n\n// @import-as-namespace\n\nimport { type Atom, type Registry } from '@effect-atom/atom';\nimport * as Context from 'effect/Context';\nimport * as Effect from 'effect/Effect';\nimport { pipe } from 'effect/Function';\nimport * as Layer from 'effect/Layer';\n\nimport { runAndForwardErrors } from '@dxos/effect';\nimport { assertArgument } from '@dxos/invariant';\n\nimport { NoHandlerError } from './errors';\nimport type * as Operation from './Operation';\n\nexport const TypeId = '~@dxos/operation/OperationHandlerSet' as const;\nexport type TypeId = typeof TypeId;\n\nexport interface OperationHandlerSet {\n [TypeId]: TypeId;\n\n readonly handlers: Effect.Effect<Operation.WithHandler<Operation.Definition.Any>[]>;\n\n getHandlers(): Promise<Operation.WithHandler<Operation.Definition.Any>[]>;\n}\n\nexport const isOperationHandlerSet = (value: unknown): value is OperationHandlerSet => {\n return typeof value === 'object' && value !== null && TypeId in value;\n};\n\nexport const empty: OperationHandlerSet = {\n [TypeId]: TypeId,\n handlers: Effect.succeed([]),\n getHandlers: () => Promise.resolve([]),\n};\n\n/**\n * Creates a new operation handler set from a list of handlers.\n *\n * @example\n * ```ts\n * const set = OperationHandlerSet.make(\n * Operation.withHandler(Operation.make({ input: Schema.Void, output: Schema.Void }), (input) => Effect.succeed({})),\n * Operation.withHandler(Operation.make({ input: Schema.Void, output: Schema.Void }), (input) => Effect.succeed({})),\n * );\n * ```\n */\nexport const make = (...handlers: Operation.WithHandler<Operation.Definition.Any>[]): OperationHandlerSet => {\n return async(() => Promise.resolve(handlers));\n};\n\nexport const async = (\n getHandlers: () => Promise<Operation.WithHandler<Operation.Definition.Any>[]>,\n): OperationHandlerSet => {\n // NOTE: Re-runing async module imports has a big performance penalty in Chrome.\n let promise: Promise<Operation.WithHandler<Operation.Definition.Any>[]> | null = null;\n const getHandlersCached = () => {\n if (!promise) {\n promise = getHandlers();\n }\n return promise;\n };\n return {\n [TypeId]: TypeId,\n getHandlers,\n handlers: Effect.promise(getHandlersCached),\n };\n};\n\n/**\n * Builds a set backed by an atom of contributed sets. The merged result is\n * cached and invalidated whenever the atom changes, so most accesses are\n * cheap but newly registered handlers are picked up.\n */\nexport const reactive = (\n registry: Registry.Registry,\n atom: Atom.Atom<readonly OperationHandlerSet[]>,\n): OperationHandlerSet => {\n let cached: Promise<Operation.WithHandler<Operation.Definition.Any>[]> | null = null;\n registry.subscribe(atom, () => {\n cached = null;\n });\n // `suspend` defers `registry.get(atom)` until each run, so re-evaluations\n // after cache invalidation see the current contributed sets.\n const compute = Effect.suspend(() =>\n pipe(\n registry.get(atom),\n Effect.forEach((set) => set.handlers, { concurrency: 'unbounded' }),\n Effect.map((groups) => groups.flat()),\n // Reset cached on failure so a transient error doesn't permanently\n // poison subsequent calls.\n Effect.tapErrorCause(() =>\n Effect.sync(() => {\n cached = null;\n }),\n ),\n ),\n );\n const getHandlers = () => (cached ??= runAndForwardErrors(compute));\n return {\n [TypeId]: TypeId,\n getHandlers,\n handlers: Effect.promise(getHandlers),\n };\n};\n\n/**\n * Merges multiple operation handler sets into a single set.\n *\n */\nexport const merge = (...sets: OperationHandlerSet[]): OperationHandlerSet => {\n assertArgument(sets.every(isOperationHandlerSet), 'sets', 'sets must be an array of OperationHandlerSet');\n return async(() => Promise.all(sets.map((set) => set.getHandlers())).then((handlers) => handlers.flat()));\n};\n\n/**\n * Creates a new operation handler set from a list of lazy-loaded modules.\n *\n * @example\n * ```ts\n * const set = OperationHandlerSet.lazy(\n * () => import('./my-handler'),\n * () => import('./my-other-handler'),\n * );\n * ```\n */\nexport const lazy = (\n ...modules: (() => Promise<{ default: Operation.WithHandler<Operation.Definition.Any> }>)[]\n): OperationHandlerSet => {\n return async(() => Promise.all(modules.map((module) => module().then(({ default: handler }) => handler))));\n};\n\n/**\n * Gets a handler for an operation by definition.\n */\nexport const getHandler = <const Op extends Operation.Definition.Any>(\n set: OperationHandlerSet,\n definition: Op,\n): Effect.Effect<Operation.WithHandler<Op>, NoHandlerError> =>\n Effect.gen(function* () {\n const handlers = yield* set.handlers;\n const handler = handlers.find((handler) => handler.meta.key === definition.meta.key);\n if (!handler) {\n return yield* Effect.fail(new NoHandlerError(definition.meta.key));\n }\n return handler as any;\n });\n\n/**\n * Gets a handler for an operation by key.\n */\nexport const getHandlerByKey = (\n set: OperationHandlerSet,\n key: string,\n): Effect.Effect<Operation.WithHandler<Operation.Definition.Any>, NoHandlerError> =>\n Effect.gen(function* () {\n const handlers = yield* set.handlers;\n const handler = handlers.find((handler) => handler.meta.key === key);\n if (!handler) {\n return yield* Effect.fail(new NoHandlerError(key));\n }\n return handler as any;\n });\n\nexport class OperationHandlerProvider extends Context.Tag('@dxos/operation/OperationHandlerProvider')<\n OperationHandlerProvider,\n OperationHandlerSet\n>() {}\n\nexport const provide = (handlers: OperationHandlerSet): Layer.Layer<OperationHandlerProvider, never, never> =>\n Layer.succeed(OperationHandlerProvider, handlers);\n"],
5
+ "mappings": "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",
6
+ "names": ["BaseError", "InvokerNotInitializedError", "extend", "NoHandlerError", "operationKey", "context", "ServiceNotAvailableError", "service", "options", "message", "FunctionNotFoundError", "functionKey", "function", "FunctionError", "InvalidOperationInputError", "InvalidOperationOutputError", "TriggerStateNotFoundError", "FunctionsAiUpstreamError", "FunctionsAiMemoizationMissError", "Context", "Effect", "pipe", "Layer", "runAndForwardErrors", "assertArgument", "TypeId", "isOperationHandlerSet", "value", "empty", "handlers", "succeed", "getHandlers", "Promise", "resolve", "make", "async", "promise", "getHandlersCached", "reactive", "registry", "atom", "cached", "subscribe", "compute", "suspend", "pipe", "get", "forEach", "set", "concurrency", "map", "groups", "flat", "tapErrorCause", "sync", "runAndForwardErrors", "merge", "sets", "assertArgument", "every", "all", "then", "lazy", "modules", "module", "default", "handler", "getHandler", "definition", "gen", "find", "meta", "key", "fail", "NoHandlerError", "getHandlerByKey", "OperationHandlerProvider", "Tag", "provide"]
7
+ }
@@ -0,0 +1,17 @@
1
+ import {
2
+ Sleep
3
+ } from "./chunk-VSICPGGY.mjs";
4
+ import {
5
+ withHandler
6
+ } from "./chunk-SEBWOTOU.mjs";
7
+
8
+ // src/testing/sleep.ts
9
+ import * as Effect from "effect/Effect";
10
+ var sleep_default = Sleep.pipe(withHandler(Effect.fn(function* ({ duration = 1e5 }) {
11
+ yield* Effect.sleep(duration);
12
+ })));
13
+
14
+ export {
15
+ sleep_default
16
+ };
17
+ //# sourceMappingURL=chunk-LRCABAWU.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/testing/sleep.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport * as Operation from '../Operation';\nimport { Sleep } from './definitions';\n\nexport default Sleep.pipe(\n Operation.withHandler(\n Effect.fn(function* ({ duration = 100_000 }) {\n yield* Effect.sleep(duration);\n }),\n ),\n);\n"],
5
+ "mappings": ";;;;;;;;AAIA,YAAYA,YAAY;AAKxB,IAAA,gBAAeC,MAAMC,KACTC,YACDC,UAAG,WAAW,EAAEC,WAAW,IAAO,GAAE;AACzC,SAAcC,aAAMD,QAAAA;AACtB,CAAA,CAAA,CAAA;",
6
+ "names": ["Effect", "Sleep", "pipe", "withHandler", "fn", "duration", "sleep"]
7
+ }
@@ -0,0 +1,21 @@
1
+ import {
2
+ Reply
3
+ } from "./chunk-VSICPGGY.mjs";
4
+ import {
5
+ withHandler
6
+ } from "./chunk-SEBWOTOU.mjs";
7
+
8
+ // src/testing/reply.ts
9
+ import * as Console from "effect/Console";
10
+ import * as Effect from "effect/Effect";
11
+ var reply_default = Reply.pipe(withHandler(Effect.fn(function* (input) {
12
+ yield* Console.log("reply", {
13
+ input
14
+ });
15
+ return input;
16
+ })));
17
+
18
+ export {
19
+ reply_default
20
+ };
21
+ //# sourceMappingURL=chunk-RCLYF66G.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/testing/reply.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\n\nimport * as Operation from '../Operation';\nimport { Reply } from './definitions';\n\nexport default Reply.pipe(\n Operation.withHandler(\n Effect.fn(function* (input) {\n yield* Console.log('reply', { input });\n return input;\n }),\n ),\n);\n"],
5
+ "mappings": ";;;;;;;;AAIA,YAAYA,aAAa;AACzB,YAAYC,YAAY;AAKxB,IAAA,gBAAeC,MAAMC,KACTC,YACDC,UAAG,WAAWC,OAAK;AACxB,SAAeC,YAAI,SAAS;IAAED;EAAM,CAAA;AACpC,SAAOA;AACT,CAAA,CAAA,CAAA;",
6
+ "names": ["Console", "Effect", "Reply", "pipe", "withHandler", "fn", "input", "log"]
7
+ }