@dxos/functions-testing 0.8.4-main.d05673bc65 → 0.8.4-main.d9fc60f731

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 (33) hide show
  1. package/LICENSE +102 -5
  2. package/README.md +1 -1
  3. package/dist/lib/node-esm/meta.json +1 -1
  4. package/dist/lib/node-esm/testing/index.mjs +11 -6
  5. package/dist/lib/node-esm/testing/index.mjs.map +3 -3
  6. package/dist/types/src/edge-routine.test.d.ts +2 -0
  7. package/dist/types/src/edge-routine.test.d.ts.map +1 -0
  8. package/dist/types/src/functions/definitions.d.ts +13 -0
  9. package/dist/types/src/functions/definitions.d.ts.map +1 -0
  10. package/dist/types/src/functions/fib.d.ts +3 -2
  11. package/dist/types/src/functions/fib.d.ts.map +1 -1
  12. package/dist/types/src/functions/forex-effect.d.ts +3 -2
  13. package/dist/types/src/functions/forex-effect.d.ts.map +1 -1
  14. package/dist/types/src/functions/query.d.ts +3 -1
  15. package/dist/types/src/functions/query.d.ts.map +1 -1
  16. package/dist/types/src/functions/reply.d.ts +2 -1
  17. package/dist/types/src/functions/reply.d.ts.map +1 -1
  18. package/dist/types/src/functions/sleep.d.ts +3 -2
  19. package/dist/types/src/functions/sleep.d.ts.map +1 -1
  20. package/dist/types/src/testing/util.d.ts +2 -2
  21. package/dist/types/src/testing/util.d.ts.map +1 -1
  22. package/dist/types/tsconfig.tsbuildinfo +1 -1
  23. package/package.json +20 -20
  24. package/src/bundle.test.ts +0 -1
  25. package/src/cpu-limit.test.ts +20 -18
  26. package/src/edge-routine.test.ts +110 -0
  27. package/src/functions/definitions.ts +62 -0
  28. package/src/functions/fib.ts +15 -24
  29. package/src/functions/forex-effect.ts +30 -25
  30. package/src/functions/query.ts +12 -14
  31. package/src/functions/reply.ts +11 -13
  32. package/src/functions/sleep.ts +9 -16
  33. package/src/testing/util.ts +11 -8
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
@@ -18,4 +18,4 @@ pnpm i @dxos/functions-testing
18
18
 
19
19
  Your ideas, issues, and code are most welcome. Please take a look at our [community code of conduct](https://github.com/dxos/dxos/blob/main/CODE_OF_CONDUCT.md), the [issue guide](https://github.com/dxos/dxos/blob/main/CONTRIBUTING.md#submitting-issues), and the [PR contribution guide](https://github.com/dxos/dxos/blob/main/CONTRIBUTING.md#submitting-prs).
20
20
 
21
- License: [MIT](./LICENSE) Copyright 2022 © DXOS
21
+ License: [FSL-1.1-Apache-2.0](./LICENSE) Copyright 2022 © DXOS
@@ -1 +1 @@
1
- {"inputs":{"src/index.ts":{"bytes":414,"imports":[],"format":"esm"},"src/testing/util.ts":{"bytes":15204,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime/edge","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime/native","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/echo/metadata","kind":"import-statement","external":true}],"format":"esm"},"src/testing/index.ts":{"bytes":458,"imports":[{"path":"src/testing/util.ts","kind":"import-statement","original":"./util"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/node-esm/index.mjs":{"imports":[],"exports":[],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0}},"bytes":127},"dist/lib/node-esm/testing/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":8204},"dist/lib/node-esm/testing/index.mjs":{"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime/edge","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime/native","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/echo/metadata","kind":"import-statement","external":true}],"exports":["deployFunction","observeInvocations","setup","sync","writeBundle"],"entryPoint":"src/testing/index.ts","inputs":{"src/testing/util.ts":{"bytesInOutput":3597},"src/testing/index.ts":{"bytesInOutput":0}},"bytes":3831}}}
1
+ {"inputs":{"src/index.ts":{"bytes":332,"imports":[],"format":"esm"},"src/testing/util.ts":{"bytes":16126,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime/edge","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime/native","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/echo/metadata","kind":"import-statement","external":true}],"format":"esm"},"src/testing/index.ts":{"bytes":368,"imports":[{"path":"src/testing/util.ts","kind":"import-statement","original":"./util"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/node-esm/index.mjs":{"imports":[],"exports":[],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0}},"bytes":127},"dist/lib/node-esm/testing/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7593},"dist/lib/node-esm/testing/index.mjs":{"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime/edge","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime/native","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/echo/metadata","kind":"import-statement","external":true}],"exports":["deployFunction","observeInvocations","setup","sync","writeBundle"],"entryPoint":"src/testing/index.ts","inputs":{"src/testing/util.ts":{"bytesInOutput":3952},"src/testing/index.ts":{"bytesInOutput":0}},"bytes":4186}}}
@@ -4,14 +4,15 @@ import { createRequire } from 'node:module';const require = createRequire(import
4
4
  import fs from "node:fs";
5
5
  import { sleep } from "@dxos/async";
6
6
  import { Client } from "@dxos/client";
7
- import { Filter, Obj, Query } from "@dxos/echo";
8
- import { Function } from "@dxos/functions";
9
- import { Trigger } from "@dxos/functions";
7
+ import { Operation, Trigger } from "@dxos/compute";
8
+ import { Context } from "@dxos/context";
9
+ import { Feed, Obj } from "@dxos/echo";
10
10
  import { InvocationTraceEndEvent, InvocationTraceStartEvent } from "@dxos/functions-runtime";
11
11
  import { FunctionsServiceClient } from "@dxos/functions-runtime/edge";
12
12
  import { bundleFunction } from "@dxos/functions-runtime/native";
13
13
  import { ErrorCodec } from "@dxos/protocols";
14
14
  import { EdgeReplicationSetting } from "@dxos/protocols/proto/dxos/echo/metadata";
15
+ var __dxlog_file = "/__w/dxos/dxos/packages/core/compute/functions-testing/src/testing/util.ts";
15
16
  var writeBundle = (path, bundle) => {
16
17
  fs.mkdirSync(path, {
17
18
  recursive: true
@@ -24,7 +25,7 @@ var setup = async (config) => {
24
25
  const client = await new Client({
25
26
  config,
26
27
  types: [
27
- Function.Function,
28
+ Operation.PersistentOperation,
28
29
  Trigger.Trigger
29
30
  ]
30
31
  }).initialize();
@@ -50,7 +51,7 @@ var deployFunction = async (space, functionsServiceClient, entryPoint, runtime)
50
51
  entryPoint,
51
52
  verbose: true
52
53
  });
53
- const func = await functionsServiceClient.deploy({
54
+ const func = await functionsServiceClient.deploy(Context.default(void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 53 }), {
54
55
  version: "0.0.1",
55
56
  ownerPublicKey: space.key,
56
57
  entryPoint: artifact.entryPoint,
@@ -66,7 +67,11 @@ var observeInvocations = async (space, maxCount) => {
66
67
  let count = 0;
67
68
  while (true) {
68
69
  try {
69
- const invocations = await space.properties.invocationTraceQueue?.target.query(Query.select(Filter.everything())).run() ?? [];
70
+ const traceFeed = space.properties.invocationTraceFeed?.target;
71
+ const traceFeedDXN = traceFeed ? Feed.getQueueUri(traceFeed) : void 0;
72
+ const invocations = traceFeedDXN ? await space.queues.get(traceFeedDXN, {
73
+ subspaceTag: traceFeed.namespace
74
+ }).queryObjects() ?? [] : [];
70
75
  for (const invocation of invocations) {
71
76
  if (Obj.instanceOf(InvocationTraceStartEvent, invocation)) {
72
77
  if (invocationData.has(invocation.invocationId)) {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/testing/util.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport fs from 'node:fs';\n\nimport { sleep } from '@dxos/async';\nimport { Client, type Config } from '@dxos/client';\nimport { type Space } from '@dxos/client/echo';\nimport { Filter, Obj, Query } from '@dxos/echo';\nimport { Function } from '@dxos/functions';\nimport { Trigger } from '@dxos/functions';\nimport { InvocationTraceEndEvent, InvocationTraceStartEvent } from '@dxos/functions-runtime';\nimport { FunctionsServiceClient } from '@dxos/functions-runtime/edge';\nimport { bundleFunction } from '@dxos/functions-runtime/native';\nimport type { BundleResult } from '@dxos/functions-runtime/native';\nimport { ErrorCodec, type FunctionRuntimeKind } from '@dxos/protocols';\nimport { EdgeReplicationSetting } from '@dxos/protocols/proto/dxos/echo/metadata';\n\nexport const writeBundle = (path: string, bundle: BundleResult) => {\n fs.mkdirSync(path, { recursive: true });\n Object.entries(bundle.assets).forEach(([name, content]) => {\n fs.writeFileSync(path + '/' + name, content);\n });\n};\n\nexport const setup = async (config: Config) => {\n const client = await new Client({\n config,\n types: [Function.Function, Trigger.Trigger],\n }).initialize();\n await client.halo.createIdentity();\n\n const space = await client.spaces.create();\n await space.waitUntilReady();\n await space.internal.setEdgeReplicationPreference(EdgeReplicationSetting.ENABLED);\n\n const functionsServiceClient = FunctionsServiceClient.fromClient(client);\n\n return { client, space, functionsServiceClient };\n};\n\nexport const sync = async (space: Space) => {\n await space.db.flush();\n await space.internal.syncToEdge({\n onProgress: (state) =>\n console.log(state ? `${state.unsyncedDocumentCount} documents syncing...` : 'connecting to edge...'),\n });\n};\n\nexport const deployFunction = async (\n space: Space,\n functionsServiceClient: FunctionsServiceClient,\n entryPoint: string,\n runtime: FunctionRuntimeKind,\n) => {\n const artifact = await bundleFunction({\n entryPoint,\n verbose: true,\n });\n const func = await functionsServiceClient.deploy({\n version: '0.0.1',\n ownerPublicKey: space.key,\n entryPoint: artifact.entryPoint,\n assets: artifact.assets,\n runtime,\n });\n space.db.add(func);\n\n return func;\n};\n\nexport const observeInvocations = async (space: Space, maxCount: number | null) => {\n let initialCount = null;\n const invocationData = new Map<\n string,\n {\n count: number;\n begin: InvocationTraceStartEvent;\n end?: InvocationTraceEndEvent;\n }\n >();\n let count = 0;\n while (true) {\n try {\n const invocations =\n (await space.properties.invocationTraceQueue?.target!.query(Query.select(Filter.everything())).run()) ?? [];\n\n for (const invocation of invocations) {\n if (Obj.instanceOf(InvocationTraceStartEvent, invocation)) {\n if (invocationData.has(invocation.invocationId)) {\n continue;\n }\n invocationData.set(invocation.invocationId, {\n count: count++,\n begin: invocation,\n });\n console.log(\n `${count.toString().padStart(3, ' ')}: BEGIN ${invocation.runtime ?? '(unknown runtime)'} ${JSON.stringify(invocation.input)}`,\n );\n } else if (Obj.instanceOf(InvocationTraceEndEvent, invocation)) {\n const data = invocationData.get(invocation.invocationId);\n if (!data || !!data.end) {\n continue;\n }\n data.end = invocation;\n\n const outcome = data.end.outcome;\n console.log(\n `${data.count.toString().padStart(3, ' ')}: END outcome=${outcome} duration=${data.end.timestamp - data.begin.timestamp}`,\n );\n if (outcome === 'failure' && data.end.error) {\n console.error(ErrorCodec.decode(data.end.error));\n }\n }\n }\n if (initialCount === null) {\n initialCount = invocations.length;\n }\n\n if (maxCount !== null && invocationData.size >= maxCount + initialCount) {\n break;\n }\n } catch (err) {\n console.error(err);\n }\n await sleep(1_000);\n }\n};\n"],
5
- "mappings": ";;;AAIA,OAAOA,QAAQ;AAEf,SAASC,aAAa;AACtB,SAASC,cAA2B;AAEpC,SAASC,QAAQC,KAAKC,aAAa;AACnC,SAASC,gBAAgB;AACzB,SAASC,eAAe;AACxB,SAASC,yBAAyBC,iCAAiC;AACnE,SAASC,8BAA8B;AACvC,SAASC,sBAAsB;AAE/B,SAASC,kBAA4C;AACrD,SAASC,8BAA8B;AAEhC,IAAMC,cAAc,CAACC,MAAcC,WAAAA;AACxCC,KAAGC,UAAUH,MAAM;IAAEI,WAAW;EAAK,CAAA;AACrCC,SAAOC,QAAQL,OAAOM,MAAM,EAAEC,QAAQ,CAAC,CAACC,MAAMC,OAAAA,MAAQ;AACpDR,OAAGS,cAAcX,OAAO,MAAMS,MAAMC,OAAAA;EACtC,CAAA;AACF;AAE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AcV,aAAa;AACpC,YAAIW,IAAIC,WAAWC,2BAA2BH,UAAAA,GAAa;AACzD,cAAIb,eAAeiB,IAAIJ,WAAWK,YAAY,GAAG;AAC/C;UACF;AACAlB,yBAAemB,IAAIN,WAAWK,cAAc;YAC1ChB,OAAOA;YACPkB,OAAOP;UACT,CAAA;AACA/B,kBAAQC,IACN,GAAGmB,MAAMmB,SAAQ,EAAGC,SAAS,GAAG,GAAA,CAAA,WAAeT,WAAW1B,WAAW,mBAAA,IAAuBoC,KAAKC,UAAUX,WAAWY,KAAK,CAAA,EAAG;QAElI,WAAWX,IAAIC,WAAWW,yBAAyBb,UAAAA,GAAa;AAC9D,gBAAMc,OAAO3B,eAAe4B,IAAIf,WAAWK,YAAY;AACvD,cAAI,CAACS,QAAQ,CAAC,CAACA,KAAKE,KAAK;AACvB;UACF;AACAF,eAAKE,MAAMhB;AAEX,gBAAMiB,UAAUH,KAAKE,IAAIC;AACzBhD,kBAAQC,IACN,GAAG4C,KAAKzB,MAAMmB,SAAQ,EAAGC,SAAS,GAAG,GAAA,CAAA,iBAAqBQ,OAAAA,aAAoBH,KAAKE,IAAIE,YAAYJ,KAAKP,MAAMW,SAAS,EAAE;AAE3H,cAAID,YAAY,aAAaH,KAAKE,IAAIG,OAAO;AAC3ClD,oBAAQkD,MAAMC,WAAWC,OAAOP,KAAKE,IAAIG,KAAK,CAAA;UAChD;QACF;MACF;AACA,UAAIjC,iBAAiB,MAAM;AACzBA,uBAAeI,YAAYgC;MAC7B;AAEA,UAAIrC,aAAa,QAAQE,eAAeoC,QAAQtC,WAAWC,cAAc;AACvE;MACF;IACF,SAASsC,KAAK;AACZvD,cAAQkD,MAAMK,GAAAA;IAChB;AACA,UAAMC,MAAM,GAAA;EACd;AACF;",
6
- "names": ["fs", "sleep", "Client", "Filter", "Obj", "Query", "Function", "Trigger", "InvocationTraceEndEvent", "InvocationTraceStartEvent", "FunctionsServiceClient", "bundleFunction", "ErrorCodec", "EdgeReplicationSetting", "writeBundle", "path", "bundle", "fs", "mkdirSync", "recursive", "Object", "entries", "assets", "forEach", "name", "content", "writeFileSync", "setup", "config", "client", "Client", "types", "Function", "Trigger", "initialize", "halo", "createIdentity", "space", "spaces", "create", "waitUntilReady", "internal", "setEdgeReplicationPreference", "EdgeReplicationSetting", "ENABLED", "functionsServiceClient", "FunctionsServiceClient", "fromClient", "sync", "db", "flush", "syncToEdge", "onProgress", "state", "console", "log", "unsyncedDocumentCount", "deployFunction", "entryPoint", "runtime", "artifact", "bundleFunction", "verbose", "func", "deploy", "version", "ownerPublicKey", "key", "add", "observeInvocations", "maxCount", "initialCount", "invocationData", "Map", "count", "invocations", "properties", "invocationTraceQueue", "target", "query", "Query", "select", "Filter", "everything", "run", "invocation", "Obj", "instanceOf", "InvocationTraceStartEvent", "has", "invocationId", "set", "begin", "toString", "padStart", "JSON", "stringify", "input", "InvocationTraceEndEvent", "data", "get", "end", "outcome", "timestamp", "error", "ErrorCodec", "decode", "length", "size", "err", "sleep"]
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport fs from 'node:fs';\n\nimport { sleep } from '@dxos/async';\nimport { Client, type Config } from '@dxos/client';\nimport { type Space } from '@dxos/client/echo';\nimport { Operation, Trigger } from '@dxos/compute';\nimport { Context } from '@dxos/context';\nimport { Feed, Obj } from '@dxos/echo';\nimport { InvocationTraceEndEvent, InvocationTraceStartEvent } from '@dxos/functions-runtime';\nimport { FunctionsServiceClient } from '@dxos/functions-runtime/edge';\nimport { bundleFunction } from '@dxos/functions-runtime/native';\nimport type { BundleResult } from '@dxos/functions-runtime/native';\nimport { ErrorCodec, type FunctionRuntimeKind } from '@dxos/protocols';\nimport { EdgeReplicationSetting } from '@dxos/protocols/proto/dxos/echo/metadata';\n\nexport const writeBundle = (path: string, bundle: BundleResult) => {\n fs.mkdirSync(path, { recursive: true });\n Object.entries(bundle.assets).forEach(([name, content]) => {\n fs.writeFileSync(path + '/' + name, content);\n });\n};\n\nexport const setup = async (config: Config) => {\n const client = await new Client({\n config,\n types: [Operation.PersistentOperation, Trigger.Trigger],\n }).initialize();\n await client.halo.createIdentity();\n\n const space = await client.spaces.create();\n await space.waitUntilReady();\n await space.internal.setEdgeReplicationPreference(EdgeReplicationSetting.ENABLED);\n\n const functionsServiceClient = FunctionsServiceClient.fromClient(client);\n\n return { client, space, functionsServiceClient };\n};\n\nexport const sync = async (space: Space) => {\n await space.db.flush();\n await space.internal.syncToEdge({\n onProgress: (state) =>\n console.log(state ? `${state.unsyncedDocumentCount} documents syncing...` : 'connecting to edge...'),\n });\n};\n\nexport const deployFunction = async (\n space: Space,\n functionsServiceClient: FunctionsServiceClient,\n entryPoint: string,\n runtime: FunctionRuntimeKind,\n): Promise<Operation.PersistentOperation> => {\n const artifact = await bundleFunction({\n entryPoint,\n verbose: true,\n });\n const func = await functionsServiceClient.deploy(Context.default(), {\n version: '0.0.1',\n ownerPublicKey: space.key,\n entryPoint: artifact.entryPoint,\n assets: artifact.assets,\n runtime,\n });\n space.db.add(func);\n\n return func;\n};\n\nexport const observeInvocations = async (space: Space, maxCount: number | null) => {\n let initialCount = null;\n const invocationData = new Map<\n string,\n {\n count: number;\n begin: InvocationTraceStartEvent;\n end?: InvocationTraceEndEvent;\n }\n >();\n let count = 0;\n while (true) {\n try {\n const traceFeed = space.properties.invocationTraceFeed?.target;\n const traceFeedDXN = traceFeed ? Feed.getQueueUri(traceFeed) : undefined;\n const invocations = traceFeedDXN\n ? ((await space.queues.get(traceFeedDXN, { subspaceTag: traceFeed!.namespace }).queryObjects()) ?? [])\n : [];\n\n for (const invocation of invocations) {\n if (Obj.instanceOf(InvocationTraceStartEvent, invocation)) {\n if (invocationData.has(invocation.invocationId)) {\n continue;\n }\n invocationData.set(invocation.invocationId, {\n count: count++,\n begin: invocation,\n });\n console.log(\n `${count.toString().padStart(3, ' ')}: BEGIN ${invocation.runtime ?? '(unknown runtime)'} ${JSON.stringify(invocation.input)}`,\n );\n } else if (Obj.instanceOf(InvocationTraceEndEvent, invocation)) {\n const data = invocationData.get(invocation.invocationId);\n if (!data || !!data.end) {\n continue;\n }\n data.end = invocation;\n\n const outcome = data.end.outcome;\n console.log(\n `${data.count.toString().padStart(3, ' ')}: END outcome=${outcome} duration=${data.end.timestamp - data.begin.timestamp}`,\n );\n if (outcome === 'failure' && data.end.error) {\n console.error(ErrorCodec.decode(data.end.error));\n }\n }\n }\n if (initialCount === null) {\n initialCount = invocations.length;\n }\n\n if (maxCount !== null && invocationData.size >= maxCount + initialCount) {\n break;\n }\n } catch (err) {\n console.error(err);\n }\n await sleep(1_000);\n }\n};\n"],
5
+ "mappings": ";;;AAIA,OAAOA,QAAQ;AAEf,SAASC,aAAa;AACtB,SAASC,cAA2B;AAEpC,SAASC,WAAWC,eAAe;AACnC,SAASC,eAAe;AACxB,SAASC,MAAMC,WAAW;AAC1B,SAASC,yBAAyBC,iCAAiC;AACnE,SAASC,8BAA8B;AACvC,SAASC,sBAAsB;AAE/B,SAASC,kBAA4C;AACrD,SAASC,8BAA8B;AAEvC,IAAA,eAAaC;IACUC,cAAW,CAAA,MAAA,WAAA;AAAK,KAAA,UAAA,MAAA;IACrCC,WAAeC;;AAEf,SAAA,QAAA,OAAA,MAAA,EAAA,QAAA,CAAA,CAAA,MAAA,OAAA,MAAA;AACA,OAAA,cAAA,OAAA,MAAA,MAAA,OAAA;EAEF,CAAA;;IAEIC,QAAAA,OAAAA,WAAAA;QACAC,SAAO,MAAA,IAAA,OAAA;;WAAgCf;MAAgB,UAAA;MACtDgB,QAAU;IACb;EAEA,CAAA,EAAA,WAAc;AACd,QAAMC,OAAMC,KAAAA,eAAc;AAC1B,QAAMD,QAAME,MAAQ,OAACC,OAAAA,OAAAA;AAErB,QAAMC,MAAAA,eAAAA;AAEN,QAAA,MAAO,SAAA,6BAAA,uBAAA,OAAA;QAAEC,yBAAAA,uBAAAA,WAAAA,MAAAA;SAAQL;IAAOI;IAAuB;IAC/C;EAEF;;AAEE,IAAMJ,OAAME,OAASI,UAAU;QAC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A,KAAA;AACAF;UAEA;AACAD,eAAAA,MAAW;AAGX,gBAAII,UAAY,KAAA,IAAA;kBACdJ,IAAQK,GAAAA,KAAMzC,MAAAA,SAAiB,EAACqC,SAASI,GAAAA,GAAK,CAAA,iBAAA,OAAA,aAAA,KAAA,IAAA,YAAA,KAAA,MAAA,SAAA,EAAA;AAChD,cAAA,YAAA,aAAA,KAAA,IAAA,OAAA;AACF,oBAAA,MAAA,WAAA,OAAA,KAAA,IAAA,KAAA,CAAA;UACF;QACIC;;AAEJ,UAAA,iBAAA,MAAA;AAEIC,uBAAa,YAAQnB;;AAEzB,UAAA,aAAA,QAAA,eAAA,QAAA,WAAA,cAAA;AACA;MACAY;IACF,SAAA,KAAA;AACA,cAAY,MAAA,GAAA;IACd;AACA,UAAA,MAAA,GAAA;;;",
6
+ "names": ["fs", "sleep", "Client", "Operation", "Trigger", "Context", "Feed", "Obj", "InvocationTraceEndEvent", "InvocationTraceStartEvent", "FunctionsServiceClient", "bundleFunction", "ErrorCodec", "EdgeReplicationSetting", "writeBundle", "recursive", "Object", "bundle", "config", "types", "initialize", "space", "waitUntilReady", "internal", "setEdgeReplicationPreference", "functionsServiceClient", "client", "syncToEdge", "onProgress", "state", "entryPoint", "verbose", "ownerPublicKey", "assets", "artifact", "runtime", "invocationData", "Map", "count", "invocations", "traceFeedDXN", "get", "subspaceTag", "traceFeed", "namespace", "queryObjects", "invocation", "instanceOf", "console", "data", "invocationId", "end", "outcome", "error", "initialCount", "maxCount"]
7
7
  }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=edge-routine.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edge-routine.test.d.ts","sourceRoot":"","sources":["../../../src/edge-routine.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,13 @@
1
+ import { Operation } from '@dxos/compute';
2
+ import { Database } from '@dxos/echo';
3
+ export declare const Fibonacci: Operation.Definition<{
4
+ readonly iterations?: number | undefined;
5
+ }, {
6
+ readonly result: string;
7
+ }, never>;
8
+ export declare const Reply: Operation.Definition<any, any, never>;
9
+ export declare const Sleep: Operation.Definition<{
10
+ readonly duration?: number | undefined;
11
+ }, void, never>;
12
+ export declare const QueryDb: Operation.Definition<any, any, Database.Service>;
13
+ //# sourceMappingURL=definitions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../../../../src/functions/definitions.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC,eAAO,MAAM,SAAS;;;;SAepB,CAAC;AAEH,eAAO,MAAM,KAAK,uCAQhB,CAAC;AAEH,eAAO,MAAM,KAAK;;eAahB,CAAC;AAEH,eAAO,MAAM,OAAO,kDASlB,CAAC"}
@@ -1,7 +1,8 @@
1
- declare const _default: import("@dxos/functions").FunctionDefinition<{
1
+ import { Operation } from '@dxos/compute';
2
+ declare const _default: Operation.WithHandler<Operation.Definition<{
2
3
  readonly iterations?: number | undefined;
3
4
  }, {
4
5
  readonly result: string;
5
- }, import("@dxos/functions").FunctionServices>;
6
+ }, never>>;
6
7
  export default _default;
7
8
  //# sourceMappingURL=fib.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fib.d.ts","sourceRoot":"","sources":["../../../../src/functions/fib.ts"],"names":[],"mappings":";;;;;AASA,wBAsBG"}
1
+ {"version":3,"file":"fib.d.ts","sourceRoot":"","sources":["../../../../src/functions/fib.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC"}
@@ -1,6 +1,7 @@
1
- declare const _default: import("@dxos/functions").FunctionDefinition<{
1
+ import { Operation } from '@dxos/compute';
2
+ declare const _default: Operation.WithHandler<Operation.Definition<{
2
3
  readonly from: string;
3
4
  readonly to: string;
4
- }, string, import("@dxos/functions").FunctionServices>;
5
+ }, string, never>>;
5
6
  export default _default;
6
7
  //# sourceMappingURL=forex-effect.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"forex-effect.d.ts","sourceRoot":"","sources":["../../../../src/functions/forex-effect.ts"],"names":[],"mappings":";;;;AAcA,wBA6BG"}
1
+ {"version":3,"file":"forex-effect.d.ts","sourceRoot":"","sources":["../../../../src/functions/forex-effect.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC"}
@@ -1,3 +1,5 @@
1
- declare const _default: import("@dxos/functions").FunctionDefinition<any, any, import("@dxos/functions").FunctionServices>;
1
+ import { Operation } from '@dxos/compute';
2
+ import { Database } from '@dxos/echo';
3
+ declare const _default: Operation.WithHandler<Operation.Definition<any, any, Database.Service>>;
2
4
  export default _default;
3
5
  //# sourceMappingURL=query.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../../src/functions/query.ts"],"names":[],"mappings":";AAUA,wBAUG"}
1
+ {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../../src/functions/query.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAA8B,MAAM,YAAY,CAAC"}
@@ -1,3 +1,4 @@
1
- declare const _default: import("@dxos/functions").FunctionDefinition<any, any, import("@dxos/functions").FunctionServices>;
1
+ import { Operation } from '@dxos/compute';
2
+ declare const _default: Operation.WithHandler<Operation.Definition<any, any, never>>;
2
3
  export default _default;
3
4
  //# sourceMappingURL=reply.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"reply.d.ts","sourceRoot":"","sources":["../../../../src/functions/reply.ts"],"names":[],"mappings":";AAUA,wBAUG"}
1
+ {"version":3,"file":"reply.d.ts","sourceRoot":"","sources":["../../../../src/functions/reply.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC"}
@@ -1,5 +1,6 @@
1
- declare const _default: import("@dxos/functions").FunctionDefinition<{
1
+ import { Operation } from '@dxos/compute';
2
+ declare const _default: Operation.WithHandler<Operation.Definition<{
2
3
  readonly duration?: number | undefined;
3
- }, void, import("@dxos/functions").FunctionServices>;
4
+ }, void, never>>;
4
5
  export default _default;
5
6
  //# sourceMappingURL=sleep.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sleep.d.ts","sourceRoot":"","sources":["../../../../src/functions/sleep.ts"],"names":[],"mappings":";;;AASA,wBAcG"}
1
+ {"version":3,"file":"sleep.d.ts","sourceRoot":"","sources":["../../../../src/functions/sleep.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { Client, type Config } from '@dxos/client';
2
2
  import { type Space } from '@dxos/client/echo';
3
- import { Function } from '@dxos/functions';
3
+ import { Operation } from '@dxos/compute';
4
4
  import { FunctionsServiceClient } from '@dxos/functions-runtime/edge';
5
5
  import type { BundleResult } from '@dxos/functions-runtime/native';
6
6
  import { type FunctionRuntimeKind } from '@dxos/protocols';
@@ -11,6 +11,6 @@ export declare const setup: (config: Config) => Promise<{
11
11
  functionsServiceClient: FunctionsServiceClient;
12
12
  }>;
13
13
  export declare const sync: (space: Space) => Promise<void>;
14
- export declare const deployFunction: (space: Space, functionsServiceClient: FunctionsServiceClient, entryPoint: string, runtime: FunctionRuntimeKind) => Promise<Function.Function>;
14
+ export declare const deployFunction: (space: Space, functionsServiceClient: FunctionsServiceClient, entryPoint: string, runtime: FunctionRuntimeKind) => Promise<Operation.PersistentOperation>;
15
15
  export declare const observeInvocations: (space: Space, maxCount: number | null) => Promise<void>;
16
16
  //# sourceMappingURL=util.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../../src/testing/util.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,MAAM,EAAE,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AACn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