@dxos/functions 0.8.1-main.ae460ac → 0.8.1-staging.31c3ee1

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 (75) hide show
  1. package/dist/lib/browser/{chunk-TMUL6AZC.mjs → chunk-HI7YZO2K.mjs} +27 -25
  2. package/dist/lib/browser/chunk-HI7YZO2K.mjs.map +7 -0
  3. package/dist/lib/browser/chunk-LT4LR4VU.mjs +72 -0
  4. package/dist/lib/browser/chunk-LT4LR4VU.mjs.map +7 -0
  5. package/dist/lib/browser/{chunk-XK3NINVF.mjs → chunk-RVSG6WTL.mjs} +156 -19
  6. package/dist/lib/browser/chunk-RVSG6WTL.mjs.map +7 -0
  7. package/dist/lib/browser/edge/index.mjs +1 -9
  8. package/dist/lib/browser/index.mjs +16 -10
  9. package/dist/lib/browser/index.mjs.map +2 -2
  10. package/dist/lib/browser/meta.json +1 -1
  11. package/dist/lib/browser/testing/index.mjs +2 -2
  12. package/dist/lib/browser/types/index.mjs +19 -5
  13. package/dist/lib/node/{chunk-3J6FVYUV.cjs → chunk-DSUGRAAL.cjs} +164 -22
  14. package/dist/lib/node/chunk-DSUGRAAL.cjs.map +7 -0
  15. package/dist/lib/node/chunk-NXZNXVT3.cjs +94 -0
  16. package/dist/lib/node/chunk-NXZNXVT3.cjs.map +7 -0
  17. package/dist/lib/node/{chunk-BGDVH6JU.cjs → chunk-RXMCVAMJ.cjs} +40 -38
  18. package/dist/lib/node/chunk-RXMCVAMJ.cjs.map +7 -0
  19. package/dist/lib/node/edge/index.cjs +4 -12
  20. package/dist/lib/node/edge/index.cjs.map +2 -2
  21. package/dist/lib/node/index.cjs +35 -29
  22. package/dist/lib/node/index.cjs.map +2 -2
  23. package/dist/lib/node/meta.json +1 -1
  24. package/dist/lib/node/testing/index.cjs +7 -7
  25. package/dist/lib/node/types/index.cjs +31 -17
  26. package/dist/lib/node/types/index.cjs.map +2 -2
  27. package/dist/lib/node-esm/{chunk-QRMVAODA.mjs → chunk-HBD2FZXO.mjs} +156 -19
  28. package/dist/lib/node-esm/chunk-HBD2FZXO.mjs.map +7 -0
  29. package/dist/lib/node-esm/chunk-O2SXVYU5.mjs +72 -0
  30. package/dist/lib/node-esm/chunk-O2SXVYU5.mjs.map +7 -0
  31. package/dist/lib/node-esm/{chunk-V3VOPFP3.mjs → chunk-SQSJO5HI.mjs} +27 -25
  32. package/dist/lib/node-esm/chunk-SQSJO5HI.mjs.map +7 -0
  33. package/dist/lib/node-esm/edge/index.mjs +1 -9
  34. package/dist/lib/node-esm/index.mjs +16 -10
  35. package/dist/lib/node-esm/index.mjs.map +2 -2
  36. package/dist/lib/node-esm/meta.json +1 -1
  37. package/dist/lib/node-esm/testing/index.mjs +2 -2
  38. package/dist/lib/node-esm/types/index.mjs +19 -5
  39. package/dist/types/src/edge/functions.d.ts +3 -12
  40. package/dist/types/src/edge/functions.d.ts.map +1 -1
  41. package/dist/types/src/handler.d.ts +1 -1
  42. package/dist/types/src/handler.d.ts.map +1 -1
  43. package/dist/types/src/trigger/type/timer-trigger.d.ts.map +1 -1
  44. package/dist/types/src/types/index.d.ts +1 -0
  45. package/dist/types/src/types/index.d.ts.map +1 -1
  46. package/dist/types/src/types/schema.d.ts +20 -26
  47. package/dist/types/src/types/schema.d.ts.map +1 -1
  48. package/dist/types/src/types/trace.d.ts +103 -97
  49. package/dist/types/src/types/trace.d.ts.map +1 -1
  50. package/dist/types/src/types/types.d.ts +7 -7
  51. package/dist/types/src/types/types.d.ts.map +1 -1
  52. package/dist/types/src/types/url.d.ts +11 -0
  53. package/dist/types/src/types/url.d.ts.map +1 -0
  54. package/package.json +20 -19
  55. package/src/edge/functions.ts +12 -71
  56. package/src/handler.ts +2 -2
  57. package/src/runtime/scheduler.test.ts +2 -1
  58. package/src/trigger/type/timer-trigger.ts +21 -18
  59. package/src/types/index.ts +1 -0
  60. package/src/types/schema.ts +7 -7
  61. package/src/types/trace.ts +120 -8
  62. package/src/types/types.ts +2 -1
  63. package/src/types/url.ts +47 -0
  64. package/dist/lib/browser/chunk-TMUL6AZC.mjs.map +0 -7
  65. package/dist/lib/browser/chunk-XK3NINVF.mjs.map +0 -7
  66. package/dist/lib/browser/chunk-YJEIETRB.mjs +0 -128
  67. package/dist/lib/browser/chunk-YJEIETRB.mjs.map +0 -7
  68. package/dist/lib/node/chunk-3J6FVYUV.cjs.map +0 -7
  69. package/dist/lib/node/chunk-BGDVH6JU.cjs.map +0 -7
  70. package/dist/lib/node/chunk-MZMHE4DC.cjs +0 -154
  71. package/dist/lib/node/chunk-MZMHE4DC.cjs.map +0 -7
  72. package/dist/lib/node-esm/chunk-QRMVAODA.mjs.map +0 -7
  73. package/dist/lib/node-esm/chunk-T2KBXTMR.mjs +0 -128
  74. package/dist/lib/node-esm/chunk-T2KBXTMR.mjs.map +0 -7
  75. package/dist/lib/node-esm/chunk-V3VOPFP3.mjs.map +0 -7
@@ -1,25 +1,16 @@
1
1
  import { type DID } from 'iso-did/types';
2
2
  import { type Client } from '@dxos/client';
3
- import { type ObjectMeta } from '@dxos/echo-schema';
4
3
  import type { PublicKey, SpaceId } from '@dxos/keys';
5
4
  import { type UploadFunctionResponseBody } from '@dxos/protocols';
6
- export declare const FUNCTIONS_PRESET_META_KEY = "dxos.org/service/function-preset";
7
5
  export type UploadWorkerArgs = {
8
6
  client: Client;
9
- name?: string;
7
+ spaceId: SpaceId;
10
8
  source: string;
11
9
  version: string;
10
+ name?: string;
12
11
  functionId?: string;
13
- spaceId: SpaceId;
14
12
  };
15
- export declare const uploadWorkerFunction: ({ client, name, version, source, spaceId, functionId, }: UploadWorkerArgs) => Promise<UploadFunctionResponseBody>;
16
- export declare const getUserFunctionUrlInMetadata: (meta: ObjectMeta) => string | undefined;
17
- export declare const setUserFunctionUrlInMetadata: (meta: ObjectMeta, functionUrl: string) => void;
18
- export declare const getInvocationUrl: (functionUrl: string, edgeUrl: string, options?: InvocationOptions) => string;
13
+ export declare const uploadWorkerFunction: ({ client, spaceId, version, source, name, functionId, }: UploadWorkerArgs) => Promise<UploadFunctionResponseBody>;
19
14
  export declare const incrementSemverPatch: (version: string) => string;
20
15
  export declare const publicKeyToDid: (key: PublicKey) => DID;
21
- export type InvocationOptions = {
22
- spaceId?: SpaceId;
23
- subjectId?: string;
24
- };
25
16
  //# sourceMappingURL=functions.d.ts.map
@@ -1 +1 @@
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;AAC3C,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErD,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAKlE,eAAO,MAAM,yBAAyB,qCAAqC,CAAC;AAE5E,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,oBAAoB,4DAO9B,gBAAgB,KAAG,OAAO,CAAC,0BAA0B,CAiBvD,CAAC;AAEF,eAAO,MAAM,4BAA4B,SAAU,UAAU,uBAE5D,CAAC;AAEF,eAAO,MAAM,4BAA4B,SAAU,UAAU,eAAe,MAAM,SASjF,CAAC;AAEF,eAAO,MAAM,gBAAgB,gBAAiB,MAAM,WAAW,MAAM,YAAW,iBAAiB,WAUhG,CAAC;AA0BF,eAAO,MAAM,oBAAoB,YAAa,MAAM,KAAG,MAKtD,CAAC;AAEF,eAAO,MAAM,cAAc,QAAS,SAAS,KAAG,GAE/C,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC"}
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,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErD,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAElE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,oBAAoB,4DAO9B,gBAAgB,KAAG,OAAO,CAAC,0BAA0B,CAkBvD,CAAC;AAEF,eAAO,MAAM,oBAAoB,YAAa,MAAM,KAAG,MAKtD,CAAC;AAGF,eAAO,MAAM,cAAc,QAAS,SAAS,KAAG,GAE/C,CAAC"}
@@ -104,5 +104,5 @@ export type SubscriptionData = {
104
104
  *
105
105
  * NOTE: Get space key from devtools or `dx space list --json`
106
106
  */
107
- export declare const subscriptionHandler: <TMeta>(handler: FunctionHandler<SubscriptionData, TMeta>, types?: S.Schema<any>[]) => FunctionHandler<RawSubscriptionData, TMeta>;
107
+ export declare const subscriptionHandler: <TMeta>(handler: FunctionHandler<SubscriptionData, TMeta>, types?: S.Schema.AnyNoContext[]) => FunctionHandler<RawSubscriptionData, TMeta>;
108
108
  //# sourceMappingURL=handler.d.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AG,CAAC,CAAC;IAChC,OAAO,EAAE,eAAe,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;CACrC,CAAC;AAGF,eAAO,MAAM,cAAc,GAAI,CAAC,EAAE,CAAC,UAAU,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,KAAG,kBAczE,CAAC;AAMF,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,OAAO,CAAC,EAAE,kBAAkB,CAAC,GAAG,CAAC,EAAE,CAAC;CACrC,CAAC;AAEF;;;;;;;;;GASG;AAEH,eAAO,MAAM,mBAAmB,GAAI,KAAK,WAC9B,eAAe,CAAC,gBAAgB,EAAE,KAAK,CAAC,UACzC,CAAC,CAAC,MAAM,CAAC,YAAY,EAAE,KAC9B,eAAe,CAAC,mBAAmB,EAAE,KAAK,CAwB5C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"timer-trigger.d.ts","sourceRoot":"","sources":["../../../../../src/trigger/type/timer-trigger.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAwB,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAEhF,eAAO,MAAM,kBAAkB,EAAE,cAAc,CAAC,YAAY,CA8B3D,CAAC"}
1
+ {"version":3,"file":"timer-trigger.d.ts","sourceRoot":"","sources":["../../../../../src/trigger/type/timer-trigger.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAwB,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAEhF,eAAO,MAAM,kBAAkB,EAAE,cAAc,CAAC,YAAY,CAiC3D,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export * from './schema';
2
2
  export * from './types';
3
3
  export * from './trace';
4
+ export * from './url';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC"}
@@ -1,12 +1,8 @@
1
- import { JsonSchemaType, S } from '@dxos/echo-schema';
2
- declare const ScriptType_base: import("@dxos/echo-schema").TypedObjectPrototype<import("@dxos/echo-schema").TypedObjectFields<{
3
- name: S.optional<typeof S.String>;
4
- description: S.optional<typeof S.String>;
5
- changed: S.optional<typeof S.Boolean>;
6
- source: import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
7
- content: typeof S.String;
8
- }, import("@dxos/echo-schema").TypedObjectOptions>>;
9
- }, import("@dxos/echo-schema").TypedObjectOptions>, S.Struct.Encoded<{
1
+ import { JsonSchemaType, Ref, S } from '@dxos/echo-schema';
2
+ /**
3
+ * Source script.
4
+ */
5
+ export declare const ScriptType: import("@dxos/echo-schema").EchoObjectSchema<S.Struct<{
10
6
  name: S.optional<typeof S.String>;
11
7
  description: S.optional<typeof S.String>;
12
8
  changed: S.optional<typeof S.Boolean>;
@@ -14,23 +10,20 @@ declare const ScriptType_base: import("@dxos/echo-schema").TypedObjectPrototype<
14
10
  content: typeof S.String;
15
11
  }, import("@dxos/echo-schema").TypedObjectOptions>>;
16
12
  }>>;
17
- /**
18
- * Source script.
19
- */
20
- export declare class ScriptType extends ScriptType_base {
21
- }
13
+ export type ScriptType = S.Schema.Type<typeof ScriptType>;
22
14
  declare const FunctionType_base: import("@dxos/echo-schema").TypedObjectPrototype<import("@dxos/echo-schema").TypedObjectFields<{
23
15
  name: typeof S.NonEmptyString;
24
16
  version: typeof S.String;
25
17
  description: S.optional<typeof S.String>;
26
- source: S.optional<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
27
- name: S.optional<typeof S.String>;
28
- description: S.optional<typeof S.String>;
29
- changed: S.optional<typeof S.Boolean>;
30
- source: import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
18
+ source: S.optional<import("@dxos/echo-schema").Ref$<{
19
+ readonly id: string;
20
+ source: Ref<import("@dxos/echo-schema").TypedObjectFields<{
31
21
  content: typeof S.String;
32
22
  }, import("@dxos/echo-schema").TypedObjectOptions>>;
33
- }, import("@dxos/echo-schema").TypedObjectOptions>>>;
23
+ name?: string | undefined;
24
+ description?: string | undefined;
25
+ changed?: boolean | undefined;
26
+ }>>;
34
27
  inputSchema: S.optional<S.Schema<JsonSchemaType, JsonSchemaType, never>>;
35
28
  outputSchema: S.optional<S.Schema<JsonSchemaType, JsonSchemaType, never>>;
36
29
  binding: S.optional<typeof S.String>;
@@ -38,14 +31,15 @@ declare const FunctionType_base: import("@dxos/echo-schema").TypedObjectPrototyp
38
31
  name: typeof S.NonEmptyString;
39
32
  version: typeof S.String;
40
33
  description: S.optional<typeof S.String>;
41
- source: S.optional<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
42
- name: S.optional<typeof S.String>;
43
- description: S.optional<typeof S.String>;
44
- changed: S.optional<typeof S.Boolean>;
45
- source: import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
34
+ source: S.optional<import("@dxos/echo-schema").Ref$<{
35
+ readonly id: string;
36
+ source: Ref<import("@dxos/echo-schema").TypedObjectFields<{
46
37
  content: typeof S.String;
47
38
  }, import("@dxos/echo-schema").TypedObjectOptions>>;
48
- }, import("@dxos/echo-schema").TypedObjectOptions>>>;
39
+ name?: string | undefined;
40
+ description?: string | undefined;
41
+ changed?: boolean | undefined;
42
+ }>>;
49
43
  inputSchema: S.optional<S.Schema<JsonSchemaType, JsonSchemaType, never>>;
50
44
  outputSchema: S.optional<S.Schema<JsonSchemaType, JsonSchemaType, never>>;
51
45
  binding: S.optional<typeof S.String>;
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/types/schema.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAO,CAAC,EAAe,MAAM,mBAAmB,CAAC;;;;;;wBAM/D,EAAI,MAAK;;;;;;;wBAAT,EAAI,MAAK;;;AAHlB;;GAEG;AACH,qBAAa,UAAW,SAAQ,eAU9B;CAAG;;;;;;;;;;4BAVI,EAAI,MAAK;;;;;;;;;;;;;;;4BAAT,EAAI,MAAK;;;;;;;AAYlB;;GAEG;AAEH,qBAAa,YAAa,SAAQ,iBAmBhC;CAAG"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/types/schema.ts"],"names":[],"mappings":"AAIA,OAAO,EAAc,cAAc,EAAqB,GAAG,EAAE,CAAC,EAAe,MAAM,mBAAmB,CAAC;AAGvG;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;wBAFtB,EAAE,MAAM;;GAWkE,CAAC;AAE5E,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,UAAU,CAAC,CAAC;;;;;;;;4BAbzD,EAAE,MAAM;;;;;;;;;;;;;;;;4BAAR,EAAE,MAAM;;;;;;;;;;AAeT;;GAEG;AACH,qBAAa,YAAa,SAAQ,iBAmBhC;CAAG"}
@@ -1,7 +1,13 @@
1
1
  import { Expando, Ref, S } from '@dxos/echo-schema';
2
+ import { type FunctionTriggerType } from './types';
2
3
  export declare enum InvocationOutcome {
3
4
  SUCCESS = "success",
4
- FAILURE = "failure"
5
+ FAILURE = "failure",
6
+ PENDING = "pending"
7
+ }
8
+ export declare enum InvocationTraceEventType {
9
+ START = "start",
10
+ END = "end"
5
11
  }
6
12
  export declare const TraceEventException: S.Struct<{
7
13
  timestampMs: typeof S.Number;
@@ -9,57 +15,37 @@ export declare const TraceEventException: S.Struct<{
9
15
  name: typeof S.String;
10
16
  stack: S.optional<typeof S.String>;
11
17
  }>;
12
- export declare const InvocationTraceEvent: S.Schema<{
13
- readonly id: string;
14
- timestampMs: number;
15
- outcome: InvocationOutcome;
16
- input: object;
17
- durationMs: number;
18
- invocationTraceQueue: Ref<Expando>;
19
- invocationTarget: Ref<Expando>;
20
- trigger?: Ref<import("@dxos/echo-schema").TypedObjectFields<{
21
- readonly function: S.optional<S.SchemaClass<string, string, never>>;
22
- readonly enabled: S.optional<S.SchemaClass<boolean, boolean, never>>;
23
- readonly spec: S.optional<S.Union<[S.mutable<S.Struct<{
24
- type: S.Literal<[import("./types").TriggerKind.Timer]>;
25
- cron: S.SchemaClass<string, string, never>;
26
- }>>, S.mutable<S.Struct<{
27
- type: S.Literal<[import("./types").TriggerKind.Webhook]>;
28
- method: S.optional<S.SchemaClass<string, string, never>>;
29
- port: S.optional<S.SchemaClass<number, number, never>>;
30
- }>>, S.mutable<S.Struct<{
31
- type: S.Literal<[import("./types").TriggerKind.Subscription]>;
32
- filter: S.Struct<{
33
- type: S.optional<S.SchemaClass<string, string, never>>;
34
- props: S.optional<S.Record$<typeof S.String, typeof S.Any>>;
35
- }>;
36
- options: S.optional<S.Struct<{
37
- deep: S.optional<S.SchemaClass<boolean, boolean, never>>;
38
- delay: S.optional<S.SchemaClass<number, number, never>>;
39
- }>>;
40
- }>>, S.mutable<S.Struct<{
41
- type: S.Literal<[import("./types").TriggerKind.Email]>;
42
- }>>, S.mutable<S.Struct<{
43
- type: S.Literal<[import("./types").TriggerKind.Queue]>;
44
- queue: S.refine<string, S.Schema<string, string, never>>;
45
- }>>]>>;
46
- readonly meta: S.optional<S.mutable<S.Record$<typeof S.String, typeof S.Any>>>;
47
- }, import("@dxos/echo-schema").TypedObjectOptions>> | undefined;
48
- exception?: {
49
- readonly name: string;
50
- readonly timestampMs: number;
51
- readonly message: string;
52
- readonly stack?: string | undefined;
53
- } | undefined;
54
- }, {
55
- readonly id: string;
56
- timestampMs: number;
57
- outcome: InvocationOutcome;
58
- input: object;
59
- durationMs: number;
60
- invocationTraceQueue: Ref<Expando>;
61
- invocationTarget: Ref<Expando>;
62
- trigger?: Ref<import("@dxos/echo-schema").TypedObjectFields<{
18
+ export type TraceEventException = S.Schema.Type<typeof TraceEventException>;
19
+ export declare const InvocationTraceStartEvent: import("@dxos/echo-schema").EchoObjectSchema<S.Struct<{
20
+ /**
21
+ * Queue message id.
22
+ */
23
+ id: import("@dxos/echo-schema").ObjectIdClass;
24
+ type: S.Literal<[InvocationTraceEventType.START]>;
25
+ /**
26
+ * Invocation id, the same for invocation start and end events.
27
+ */
28
+ invocationId: import("@dxos/echo-schema").ObjectIdClass;
29
+ /**
30
+ * Event generation time.
31
+ */
32
+ timestampMs: typeof S.Number;
33
+ /**
34
+ * Data passed to function / workflow as an argument.
35
+ */
36
+ input: typeof S.Object;
37
+ /**
38
+ * Queue DXN for function/workflow invocation events.
39
+ */
40
+ invocationTraceQueue: import("@dxos/echo-schema").Ref$<Expando>;
41
+ /**
42
+ * DXN of the invoked function/workflow.
43
+ */
44
+ invocationTarget: import("@dxos/echo-schema").Ref$<Expando>;
45
+ /**
46
+ * Present for automatic invocations.
47
+ */
48
+ trigger: S.optional<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
63
49
  readonly function: S.optional<S.SchemaClass<string, string, never>>;
64
50
  readonly enabled: S.optional<S.SchemaClass<boolean, boolean, never>>;
65
51
  readonly spec: S.optional<S.Union<[S.mutable<S.Struct<{
@@ -83,58 +69,78 @@ export declare const InvocationTraceEvent: S.Schema<{
83
69
  type: S.Literal<[import("./types").TriggerKind.Email]>;
84
70
  }>>, S.mutable<S.Struct<{
85
71
  type: S.Literal<[import("./types").TriggerKind.Queue]>;
86
- queue: S.refine<string, S.Schema<string, string, never>>;
72
+ queue: S.refine<string, typeof S.NonEmptyString>;
87
73
  }>>]>>;
88
74
  readonly meta: S.optional<S.mutable<S.Record$<typeof S.String, typeof S.Any>>>;
89
- }, import("@dxos/echo-schema").TypedObjectOptions>> | undefined;
90
- exception?: {
91
- readonly name: string;
92
- readonly timestampMs: number;
93
- readonly message: string;
94
- readonly stack?: string | undefined;
95
- } | undefined;
96
- }, never>;
97
- export type InvocationTraceEvent = S.Schema.Type<typeof InvocationTraceEvent>;
75
+ }, import("@dxos/echo-schema").TypedObjectOptions>>>;
76
+ }>>;
77
+ export type InvocationTraceStartEvent = S.Schema.Type<typeof InvocationTraceStartEvent>;
78
+ export declare const InvocationTraceEndEvent: import("@dxos/echo-schema").EchoObjectSchema<S.Struct<{
79
+ /**
80
+ * Trace event id.
81
+ */
82
+ id: import("@dxos/echo-schema").ObjectIdClass;
83
+ type: S.Literal<[InvocationTraceEventType.END]>;
84
+ /**
85
+ * Invocation id, will be the same for invocation start and end.
86
+ */
87
+ invocationId: import("@dxos/echo-schema").ObjectIdClass;
88
+ /**
89
+ * Event generation time.
90
+ */
91
+ timestampMs: typeof S.Number;
92
+ outcome: S.Enums<typeof InvocationOutcome>;
93
+ exception: S.optional<S.Struct<{
94
+ timestampMs: typeof S.Number;
95
+ message: typeof S.String;
96
+ name: typeof S.String;
97
+ stack: S.optional<typeof S.String>;
98
+ }>>;
99
+ }>>;
100
+ export type InvocationTraceEndEvent = S.Schema.Type<typeof InvocationTraceEndEvent>;
101
+ export type InvocationTraceEvent = InvocationTraceStartEvent | InvocationTraceEndEvent;
98
102
  export declare const TraceEventLog: S.Struct<{
99
103
  timestampMs: typeof S.Number;
100
104
  level: typeof S.String;
101
105
  message: typeof S.String;
102
106
  context: S.optional<typeof S.Object>;
103
107
  }>;
104
- export declare const TraceEvent: S.Schema<{
105
- readonly id: string;
106
- outcome: string;
107
- truncated: boolean;
108
- ingestionTimestampMs: number;
109
- logs: {
110
- readonly context?: object | undefined;
111
- readonly timestampMs: number;
112
- readonly message: string;
113
- readonly level: string;
114
- }[];
115
- exceptions: {
116
- readonly name: string;
117
- readonly timestampMs: number;
118
- readonly message: string;
119
- readonly stack?: string | undefined;
120
- }[];
121
- }, {
122
- readonly id: string;
123
- outcome: string;
124
- truncated: boolean;
125
- ingestionTimestampMs: number;
126
- logs: {
127
- readonly context?: object | undefined;
128
- readonly timestampMs: number;
129
- readonly message: string;
130
- readonly level: string;
131
- }[];
132
- exceptions: {
133
- readonly name: string;
134
- readonly timestampMs: number;
135
- readonly message: string;
136
- readonly stack?: string | undefined;
137
- }[];
138
- }, never>;
108
+ export declare const TraceEvent: import("@dxos/echo-schema").EchoObjectSchema<S.Struct<{
109
+ id: import("@dxos/echo-schema").ObjectIdClass;
110
+ outcome: typeof S.String;
111
+ truncated: typeof S.Boolean;
112
+ /**
113
+ * Time when the event was persisted.
114
+ */
115
+ ingestionTimestampMs: typeof S.Number;
116
+ logs: S.Array$<S.Struct<{
117
+ timestampMs: typeof S.Number;
118
+ level: typeof S.String;
119
+ message: typeof S.String;
120
+ context: S.optional<typeof S.Object>;
121
+ }>>;
122
+ exceptions: S.Array$<S.Struct<{
123
+ timestampMs: typeof S.Number;
124
+ message: typeof S.String;
125
+ name: typeof S.String;
126
+ stack: S.optional<typeof S.String>;
127
+ }>>;
128
+ }>>;
139
129
  export type TraceEvent = S.Schema.Type<typeof TraceEvent>;
130
+ /**
131
+ * Deprecated InvocationTrace event format.
132
+ * @deprecated
133
+ */
134
+ export type InvocationSpan = {
135
+ id: string;
136
+ timestampMs: number;
137
+ outcome: InvocationOutcome;
138
+ input: object;
139
+ durationMs: number;
140
+ invocationTraceQueue: Ref<Expando>;
141
+ invocationTarget: Ref<Expando>;
142
+ trigger?: Ref<FunctionTriggerType>;
143
+ exception?: TraceEventException;
144
+ };
145
+ export declare const createInvocationSpans: (items?: InvocationTraceEvent[]) => InvocationSpan[];
140
146
  //# sourceMappingURL=trace.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"trace.d.ts","sourceRoot":"","sources":["../../../../src/types/trace.ts"],"names":[],"mappings":"AAIA,OAAO,EAAc,OAAO,EAAY,GAAG,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAI1E,oBAAY,iBAAiB;IAC3B,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB;AAED,eAAO,MAAM,mBAAmB;;;;;EAK9B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAsB4B,CAAC;AAE9D,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAE9E,eAAO,MAAM,aAAa;;;;;EAKxB,CAAC;AAEH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAUiC,CAAC;AAEzD,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,UAAU,CAAC,CAAC"}
1
+ {"version":3,"file":"trace.d.ts","sourceRoot":"","sources":["../../../../src/types/trace.ts"],"names":[],"mappings":"AAIA,OAAO,EAAc,OAAO,EAAY,GAAG,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAG1E,OAAO,EAAmB,KAAK,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEpE,oBAAY,iBAAiB;IAC3B,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB;AAGD,oBAAY,wBAAwB;IAClC,KAAK,UAAU;IACf,GAAG,QAAQ;CACZ;AAED,eAAO,MAAM,mBAAmB;;;;;EAK9B,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAE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mailTriggerSchema: S.mutable<S.Struct<{
25
25
  export type EmailTrigger = S.Schema.Type<typeof EmailTriggerSchema>;
26
26
  declare const QueueTriggerSchema: S.mutable<S.Struct<{
27
27
  type: S.Literal<[TriggerKind.Queue]>;
28
- queue: S.refine<string, S.Schema<string, string, never>>;
28
+ queue: S.refine<string, typeof S.NonEmptyString>;
29
29
  }>>;
30
30
  export type QueueTrigger = S.Schema.Type<typeof QueueTriggerSchema>;
31
31
  /**
@@ -76,7 +76,7 @@ export declare const TriggerSchema: S.Union<[S.mutable<S.Struct<{
76
76
  type: S.Literal<[TriggerKind.Email]>;
77
77
  }>>, S.mutable<S.Struct<{
78
78
  type: S.Literal<[TriggerKind.Queue]>;
79
- queue: S.refine<string, S.Schema<string, string, never>>;
79
+ queue: S.refine<string, typeof S.NonEmptyString>;
80
80
  }>>]>;
81
81
  export type TriggerType = S.Schema.Type<typeof TriggerSchema>;
82
82
  /**
@@ -106,7 +106,7 @@ export declare const FunctionTriggerSchema: S.Struct<{
106
106
  type: S.Literal<[TriggerKind.Email]>;
107
107
  }>>, S.mutable<S.Struct<{
108
108
  type: S.Literal<[TriggerKind.Queue]>;
109
- queue: S.refine<string, S.Schema<string, string, never>>;
109
+ queue: S.refine<string, typeof S.NonEmptyString>;
110
110
  }>>]>>;
111
111
  meta: S.optional<S.mutable<S.Record$<typeof S.String, typeof S.Any>>>;
112
112
  }>;
@@ -135,7 +135,7 @@ declare const FunctionTrigger_base: import("@dxos/echo-schema").TypedObjectProto
135
135
  type: S.Literal<[TriggerKind.Email]>;
136
136
  }>>, S.mutable<S.Struct<{
137
137
  type: S.Literal<[TriggerKind.Queue]>;
138
- queue: S.refine<string, S.Schema<string, string, never>>;
138
+ queue: S.refine<string, typeof S.NonEmptyString>;
139
139
  }>>]>>;
140
140
  readonly meta: S.optional<S.mutable<S.Record$<typeof S.String, typeof S.Any>>>;
141
141
  }, import("@dxos/echo-schema").TypedObjectOptions>, S.Struct.Encoded<{
@@ -162,7 +162,7 @@ declare const FunctionTrigger_base: import("@dxos/echo-schema").TypedObjectProto
162
162
  type: S.Literal<[TriggerKind.Email]>;
163
163
  }>>, S.mutable<S.Struct<{
164
164
  type: S.Literal<[TriggerKind.Queue]>;
165
- queue: S.refine<string, S.Schema<string, string, never>>;
165
+ queue: S.refine<string, typeof S.NonEmptyString>;
166
166
  }>>]>>;
167
167
  readonly meta: S.optional<S.mutable<S.Record$<typeof S.String, typeof S.Any>>>;
168
168
  }>>;
@@ -227,7 +227,7 @@ export declare const FunctionManifestSchema: S.Struct<{
227
227
  type: S.Literal<[TriggerKind.Email]>;
228
228
  }>>, S.mutable<S.Struct<{
229
229
  type: S.Literal<[TriggerKind.Queue]>;
230
- queue: S.refine<string, S.Schema<string, string, never>>;
230
+ queue: S.refine<string, typeof S.NonEmptyString>;
231
231
  }>>]>>;
232
232
  readonly meta: S.optional<S.mutable<S.Record$<typeof S.String, typeof S.Any>>>;
233
233
  }, import("@dxos/echo-schema").TypedObjectOptions>> & import("@dxos/echo-schema").WithMeta, S.Struct.Encoded<{
@@ -254,7 +254,7 @@ export declare const FunctionManifestSchema: S.Struct<{
254
254
  type: S.Literal<[TriggerKind.Email]>;
255
255
  }>>, S.mutable<S.Struct<{
256
256
  type: S.Literal<[TriggerKind.Queue]>;
257
- queue: S.refine<string, S.Schema<string, string, never>>;
257
+ queue: S.refine<string, typeof S.NonEmptyString>;
258
258
  }>>]>>;
259
259
  readonly meta: S.optional<S.mutable<S.Record$<typeof S.String, typeof S.Any>>>;
260
260
  }>, never>>>>;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAuC,CAAC,EAAoB,MAAM,mBAAmB,CAAC;AAE7F;;;;GAIG;AACH,oBAAY,WAAW;IACrB,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,YAAY,iBAAiB;IAC7B,KAAK,UAAU;IACf,KAAK,UAAU;CAChB;AAKD;;GAEG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,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAElF;;GAEG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;KAQxB,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,aAAa,CAAC,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAchC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,qBAAqB,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE9E;;GAEG;AACH,qBAAa,eAAgB,SAAQ,oBAGL;CAAG;;;;;;;;;;;;AAEnC;;;GAGG;AAEH,qBAAa,WAAY,SAAQ,gBAQ/B;CAAG;AAEL;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE5E,eAAO,MAAM,cAAc,iDAAiC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { type ObjectMeta } from '@dxos/echo-schema';
2
+ import { type SpaceId } from '@dxos/keys';
3
+ export declare const FUNCTIONS_PRESET_META_KEY = "dxos.org/service/function-preset";
4
+ export declare const getUserFunctionUrlInMetadata: (meta: ObjectMeta) => string | undefined;
5
+ export declare const setUserFunctionUrlInMetadata: (meta: ObjectMeta, functionUrl: string) => void;
6
+ export declare const getInvocationUrl: (functionUrl: string, edgeUrl: string, options?: InvocationOptions) => string;
7
+ export type InvocationOptions = {
8
+ spaceId?: SpaceId;
9
+ subjectId?: string;
10
+ };
11
+ //# sourceMappingURL=url.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../../../src/types/url.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,YAAY,CAAC;AAK1C,eAAO,MAAM,yBAAyB,qCAAqC,CAAC;AAM5E,eAAO,MAAM,4BAA4B,SAAU,UAAU,uBAE5D,CAAC;AAEF,eAAO,MAAM,4BAA4B,SAAU,UAAU,eAAe,MAAM,SASjF,CAAC;AAEF,eAAO,MAAM,gBAAgB,gBAAiB,MAAM,WAAW,MAAM,YAAW,iBAAiB,WAUhG,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/functions",
3
- "version": "0.8.1-main.ae460ac",
3
+ "version": "0.8.1-staging.31c3ee1",
4
4
  "description": "Functions API and runtime.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -60,33 +60,34 @@
60
60
  "dependencies": {
61
61
  "@preact/signals-core": "^1.6.0",
62
62
  "cron": "^3.1.6",
63
- "effect": "^3.12.3",
63
+ "cron-schedule": "^5.0.4",
64
+ "effect": "3.13.3",
64
65
  "esbuild-wasm": "^0.16.14",
65
66
  "express": "^4.19.2",
66
67
  "get-port-please": "^3.1.1",
67
68
  "iso-did": "^1.6.0",
68
69
  "ws": "^8.14.2",
69
- "@dxos/async": "0.8.1-main.ae460ac",
70
- "@dxos/client": "0.8.1-main.ae460ac",
71
- "@dxos/context": "0.8.1-main.ae460ac",
72
- "@dxos/crypto": "0.8.1-main.ae460ac",
73
- "@dxos/echo-db": "0.8.1-main.ae460ac",
74
- "@dxos/echo-protocol": "0.8.1-main.ae460ac",
75
- "@dxos/echo-schema": "0.8.1-main.ae460ac",
76
- "@dxos/edge-client": "0.8.1-main.ae460ac",
77
- "@dxos/invariant": "0.8.1-main.ae460ac",
78
- "@dxos/live-object": "0.8.1-main.ae460ac",
79
- "@dxos/keys": "0.8.1-main.ae460ac",
80
- "@dxos/log": "0.8.1-main.ae460ac",
81
- "@dxos/node-std": "0.8.1-main.ae460ac",
82
- "@dxos/protocols": "0.8.1-main.ae460ac",
83
- "@dxos/schema": "0.8.1-main.ae460ac",
84
- "@dxos/util": "0.8.1-main.ae460ac"
70
+ "@dxos/async": "0.8.1-staging.31c3ee1",
71
+ "@dxos/context": "0.8.1-staging.31c3ee1",
72
+ "@dxos/client": "0.8.1-staging.31c3ee1",
73
+ "@dxos/crypto": "0.8.1-staging.31c3ee1",
74
+ "@dxos/echo-db": "0.8.1-staging.31c3ee1",
75
+ "@dxos/echo-protocol": "0.8.1-staging.31c3ee1",
76
+ "@dxos/echo-schema": "0.8.1-staging.31c3ee1",
77
+ "@dxos/edge-client": "0.8.1-staging.31c3ee1",
78
+ "@dxos/keys": "0.8.1-staging.31c3ee1",
79
+ "@dxos/invariant": "0.8.1-staging.31c3ee1",
80
+ "@dxos/live-object": "0.8.1-staging.31c3ee1",
81
+ "@dxos/log": "0.8.1-staging.31c3ee1",
82
+ "@dxos/node-std": "0.8.1-staging.31c3ee1",
83
+ "@dxos/util": "0.8.1-staging.31c3ee1",
84
+ "@dxos/protocols": "0.8.1-staging.31c3ee1",
85
+ "@dxos/schema": "0.8.1-staging.31c3ee1"
85
86
  },
86
87
  "devDependencies": {
87
88
  "@types/express": "^4.17.17",
88
89
  "@types/ws": "^7.4.0",
89
- "@dxos/agent": "0.8.1-main.ae460ac"
90
+ "@dxos/agent": "0.8.1-staging.31c3ee1"
90
91
  },
91
92
  "publishConfig": {
92
93
  "access": "public"