@dxos/functions 0.8.4-main.ef1bc66f44 → 0.8.4-main.f466a3d56e

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 (79) hide show
  1. package/LICENSE +102 -5
  2. package/README.md +5 -7
  3. package/dist/lib/neutral/index.mjs +295 -922
  4. package/dist/lib/neutral/index.mjs.map +4 -4
  5. package/dist/lib/neutral/meta.json +1 -1
  6. package/dist/types/src/index.d.ts +0 -2
  7. package/dist/types/src/index.d.ts.map +1 -1
  8. package/dist/types/src/protocol/functions-ai-http-client.d.ts.map +1 -1
  9. package/dist/types/src/protocol/functions-ai-http-client.test.d.ts +2 -0
  10. package/dist/types/src/protocol/functions-ai-http-client.test.d.ts.map +1 -0
  11. package/dist/types/src/protocol/protocol.d.ts +19 -2
  12. package/dist/types/src/protocol/protocol.d.ts.map +1 -1
  13. package/dist/types/src/sdk.d.ts +5 -109
  14. package/dist/types/src/sdk.d.ts.map +1 -1
  15. package/dist/types/src/services/credentials.d.ts +15 -38
  16. package/dist/types/src/services/credentials.d.ts.map +1 -1
  17. package/dist/types/src/services/function-invocation-service.d.ts +8 -6
  18. package/dist/types/src/services/function-invocation-service.d.ts.map +1 -1
  19. package/dist/types/src/services/index.d.ts +1 -4
  20. package/dist/types/src/services/index.d.ts.map +1 -1
  21. package/dist/types/src/services/queues.d.ts +1 -46
  22. package/dist/types/src/services/queues.d.ts.map +1 -1
  23. package/dist/types/src/services/tracing.d.ts +1 -84
  24. package/dist/types/src/services/tracing.d.ts.map +1 -1
  25. package/dist/types/src/types/index.d.ts +0 -4
  26. package/dist/types/src/types/index.d.ts.map +1 -1
  27. package/dist/types/src/types/url.d.ts +3 -3
  28. package/dist/types/src/types/url.d.ts.map +1 -1
  29. package/dist/types/tsconfig.tsbuildinfo +1 -1
  30. package/package.json +18 -17
  31. package/src/index.ts +0 -2
  32. package/src/protocol/functions-ai-http-client.test.ts +105 -0
  33. package/src/protocol/functions-ai-http-client.ts +75 -1
  34. package/src/protocol/protocol.test.ts +9 -10
  35. package/src/protocol/protocol.ts +252 -59
  36. package/src/sdk.ts +12 -270
  37. package/src/services/credentials.ts +76 -120
  38. package/src/services/function-invocation-service.ts +9 -10
  39. package/src/services/index.ts +1 -4
  40. package/src/services/queues.ts +1 -78
  41. package/src/services/tracing.ts +0 -159
  42. package/src/types/index.ts +0 -4
  43. package/src/types/url.ts +3 -3
  44. package/dist/types/src/errors.d.ts +0 -121
  45. package/dist/types/src/errors.d.ts.map +0 -1
  46. package/dist/types/src/example/fib.d.ts +0 -7
  47. package/dist/types/src/example/fib.d.ts.map +0 -1
  48. package/dist/types/src/example/forex-effect.d.ts +0 -3
  49. package/dist/types/src/example/forex-effect.d.ts.map +0 -1
  50. package/dist/types/src/example/index.d.ts +0 -12
  51. package/dist/types/src/example/index.d.ts.map +0 -1
  52. package/dist/types/src/example/reply.d.ts +0 -3
  53. package/dist/types/src/example/reply.d.ts.map +0 -1
  54. package/dist/types/src/example/sleep.d.ts +0 -5
  55. package/dist/types/src/example/sleep.d.ts.map +0 -1
  56. package/dist/types/src/operation-compatibility.test.d.ts +0 -2
  57. package/dist/types/src/operation-compatibility.test.d.ts.map +0 -1
  58. package/dist/types/src/services/event-logger.d.ts +0 -81
  59. package/dist/types/src/services/event-logger.d.ts.map +0 -1
  60. package/dist/types/src/types/Function.d.ts +0 -52
  61. package/dist/types/src/types/Function.d.ts.map +0 -1
  62. package/dist/types/src/types/Script.d.ts +0 -21
  63. package/dist/types/src/types/Script.d.ts.map +0 -1
  64. package/dist/types/src/types/Trigger.d.ts +0 -121
  65. package/dist/types/src/types/Trigger.d.ts.map +0 -1
  66. package/dist/types/src/types/TriggerEvent.d.ts +0 -74
  67. package/dist/types/src/types/TriggerEvent.d.ts.map +0 -1
  68. package/src/errors.ts +0 -21
  69. package/src/example/fib.ts +0 -32
  70. package/src/example/forex-effect.ts +0 -40
  71. package/src/example/index.ts +0 -13
  72. package/src/example/reply.ts +0 -21
  73. package/src/example/sleep.ts +0 -24
  74. package/src/operation-compatibility.test.ts +0 -185
  75. package/src/services/event-logger.ts +0 -127
  76. package/src/types/Function.ts +0 -82
  77. package/src/types/Script.ts +0 -34
  78. package/src/types/Trigger.ts +0 -143
  79. package/src/types/TriggerEvent.ts +0 -62
@@ -1,114 +1,10 @@
1
- import type * as Context from 'effect/Context';
2
- import * as Effect from 'effect/Effect';
3
- import * as Schema from 'effect/Schema';
4
1
  import { type AiService } from '@dxos/ai';
5
- import { Type } from '@dxos/echo';
6
- import { type Database } from '@dxos/echo';
7
- import { Operation } from '@dxos/operation';
8
- import { type CredentialsService, type FunctionInvocationService, type QueueService, type TracingService } from './services';
9
- import { Function } from './types';
10
- /**
11
- * Services that are provided at the function call site by the caller.
12
- */
13
- export type InvocationServices = TracingService;
2
+ import { type Credential, type Operation, type Trace } from '@dxos/compute';
3
+ import { type Database, type Feed } from '@dxos/echo';
4
+ import { type FunctionInvocationService, type QueueService } from './services';
14
5
  /**
15
6
  * Services that are available to invoked functions.
7
+ * @deprecated
16
8
  */
17
- export type FunctionServices = InvocationServices | AiService.AiService | CredentialsService | Database.Service | QueueService | FunctionInvocationService;
18
- /**
19
- * Function handler.
20
- */
21
- export type FunctionHandler<TData = {}, TOutput = any, S extends FunctionServices = FunctionServices> = (params: {
22
- /**
23
- * Context available to the function.
24
- */
25
- context: FunctionContext;
26
- /**
27
- * Data passed as the input to the function.
28
- * Must match the function's input schema.
29
- * This will be the payload from the trigger or other data passed into the function in a workflow.
30
- */
31
- data: TData;
32
- }) => TOutput | Promise<TOutput> | Effect.Effect<TOutput, any, S>;
33
- /**
34
- * Function context.
35
- */
36
- export interface FunctionContext {
37
- }
38
- declare const typeId: unique symbol;
39
- export type FunctionDefinition<T = any, O = any, S extends FunctionServices = FunctionServices> = {
40
- [typeId]: true;
41
- key: string;
42
- name: string;
43
- description?: string;
44
- inputSchema: Schema.Schema<T, any>;
45
- outputSchema?: Schema.Schema<O, any>;
46
- /**
47
- * List of types the function uses.
48
- * This is used to ensure that the types are available when the function is executed.
49
- */
50
- types: readonly Type.Entity.Any[];
51
- /**
52
- * Keys of the required services.
53
- */
54
- services: readonly string[];
55
- handler: FunctionHandler<T, O, S>;
56
- meta?: {
57
- /**
58
- * Tools that are projected from functions have this annotation.
59
- *
60
- * deployedFunctionId:
61
- * - Backend deployment ID assigned by the EDGE function service (typically a UUID).
62
- * - Used for remote invocation via `FunctionInvocationService` → `RemoteFunctionExecutionService`.
63
- * - Persisted on the corresponding ECHO `Function.Function` object's metadata under the
64
- * `FUNCTIONS_META_KEY` and retrieved with `getUserFunctionIdInMetadata`.
65
- */
66
- deployedFunctionId?: string;
67
- };
68
- };
69
- export declare namespace FunctionDefinition {
70
- type Any = FunctionDefinition<any, any, any>;
71
- type Input<T extends Any> = T extends FunctionDefinition<infer I, infer _O, infer _S> ? I : never;
72
- type Output<T extends Any> = T extends FunctionDefinition<infer _I, infer O, infer _S> ? O : never;
73
- type Services<T extends Any> = T extends FunctionDefinition<infer _I, infer _O, infer S> ? S : never;
74
- }
75
- export type FunctionProps<T, O> = {
76
- key: string;
77
- name: string;
78
- description?: string;
79
- inputSchema: Schema.Schema<T, any>;
80
- outputSchema?: Schema.Schema<O, any>;
81
- /**
82
- * List of types the function uses.
83
- * This is used to ensure that the types are available when the function is executed.
84
- */
85
- types?: readonly Type.Entity.Any[];
86
- services?: readonly Context.Tag<any, any>[];
87
- handler: FunctionHandler<T, O, FunctionServices>;
88
- };
89
- export declare const defineFunction: {
90
- <I, O>(params: FunctionProps<I, O>): FunctionDefinition<I, O, FunctionServices>;
91
- };
92
- /**
93
- * Converts a FunctionDefinition to an OperationDefinition with handler.
94
- * The function handler is adapted to the OperationHandler format.
95
- *
96
- * Note: FunctionDefinition stores service keys as strings, not Tag types,
97
- * so we can't use Operation.withHandler's type inference here.
98
- */
99
- export declare const toOperation: <T, O, S extends FunctionServices = FunctionServices>(functionDef: FunctionDefinition<T, O, S>) => Operation.Definition<T, O> & {
100
- handler: Operation.Handler<T, O, any, S>;
101
- };
102
- export declare const FunctionDefinition: {
103
- make: <I, O>(params: FunctionProps<I, O>) => FunctionDefinition<I, O, FunctionServices>;
104
- isFunction: (value: unknown) => value is FunctionDefinition.Any;
105
- serialize: (functionDef: FunctionDefinition.Any) => Function.Function;
106
- deserialize: (functionObj: Function.Function) => FunctionDefinition.Any;
107
- toOperation: <T, O, S extends FunctionServices = FunctionServices>(functionDef: FunctionDefinition<T, O, S>) => Operation.Definition<T, O> & {
108
- handler: Operation.Handler<T, O, any, S>;
109
- };
110
- };
111
- export declare const serializeFunction: (functionDef: FunctionDefinition.Any) => Function.Function;
112
- export declare const deserializeFunction: (functionObj: Function.Function) => FunctionDefinition<unknown, unknown>;
113
- export {};
9
+ export type FunctionServices = AiService.AiService | Credential.CredentialsService | Database.Service | QueueService | Feed.FeedService | Trace.TraceService | FunctionInvocationService | Operation.Service;
114
10
  //# sourceMappingURL=sdk.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../../src/sdk.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAO,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,KAAK,YAAY,EACjB,KAAK,cAAc,EACpB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAQnC;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,c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AAG,KAAG,QAAQ,CAAC,QAchF,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,aAAa,QAAQ,CAAC,QAAQ,KAAG,kBAAkB,CAAC,OAAO,EAAE,OAAO,CAiBvG,CAAC"}
1
+ {"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../../src/sdk.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,KAAK,KAAK,EAAE,MAAM,eAAe,CAAC;AAC5E,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAEtD,OAAO,EAAE,KAAK,yBAAyB,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAO/E;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GACxB,SAAS,CAAC,SAAS,GACnB,UAAU,CAAC,kBAAkB,GAC7B,QAAQ,CAAC,OAAO,GAEhB,YAAY,GACZ,IAAI,CAAC,WAAW,GAChB,KAAK,CAAC,YAAY,GAGlB,yBAAyB,GACzB,SAAS,CAAC,OAAO,CAAC"}
@@ -1,50 +1,27 @@
1
1
  import * as HttpClient from '@effect/platform/HttpClient';
2
2
  import type * as Config from 'effect/Config';
3
3
  import * as Context from 'effect/Context';
4
- import * as Effect from 'effect/Effect';
5
4
  import * as Layer from 'effect/Layer';
6
5
  import * as Redacted from 'effect/Redacted';
6
+ import { Credential } from '@dxos/compute';
7
7
  import { Database } from '@dxos/echo';
8
- export type CredentialQuery = {
9
- service?: string;
10
- };
11
- export type ServiceCredential = {
12
- service: string;
13
- apiKey?: string;
14
- };
15
- declare const CredentialsService_base: Context.TagClass<CredentialsService, "@dxos/functions/CredentialsService", {
16
- /**
17
- * Query all.
18
- */
19
- queryCredentials: (query: CredentialQuery) => Promise<ServiceCredential[]>;
20
- /**
21
- * Get a single credential.
22
- * @throws {Error} If no credential is found.
23
- */
24
- getCredential: (query: CredentialQuery) => Promise<ServiceCredential>;
25
- }>;
26
- export declare class CredentialsService extends CredentialsService_base {
27
- static getCredential: (query: CredentialQuery) => Effect.Effect<ServiceCredential, never, CredentialsService>;
28
- static getApiKey: (query: CredentialQuery) => Effect.Effect<Redacted.Redacted<string>, never, CredentialsService>;
29
- static configuredLayer: (credentials: ServiceCredential[]) => Layer.Layer<CredentialsService, never, never>;
30
- static layerConfig: (credentials: {
31
- service: string;
32
- apiKey: Config.Config<Redacted.Redacted<string>>;
33
- }[]) => Layer.Layer<CredentialsService, import("effect/ConfigError").ConfigError, never>;
34
- static layerFromDatabase: ({ caching }?: {
35
- caching?: boolean;
36
- }) => Layer.Layer<CredentialsService, never, Database.Service>;
37
- }
38
- export declare class ConfiguredCredentialsService implements Context.Tag.Service<CredentialsService> {
8
+ export declare class ConfiguredCredentialsService implements Context.Tag.Service<Credential.CredentialsService> {
39
9
  private readonly credentials;
40
- constructor(credentials?: ServiceCredential[]);
41
- addCredentials(credentials: ServiceCredential[]): ConfiguredCredentialsService;
42
- queryCredentials(query: CredentialQuery): Promise<ServiceCredential[]>;
43
- getCredential(query: CredentialQuery): Promise<ServiceCredential>;
10
+ constructor(credentials?: Credential.ServiceCredential[]);
11
+ addCredentials(credentials: Credential.ServiceCredential[]): ConfiguredCredentialsService;
12
+ queryCredentials(query: Credential.CredentialQuery): Promise<Credential.ServiceCredential[]>;
13
+ getCredential(query: Credential.CredentialQuery): Promise<Credential.ServiceCredential>;
44
14
  }
45
15
  /**
46
16
  * Maps the request to include the given token in the Authorization header.
47
17
  */
48
- export declare const withAuthorization: (token: string, kind?: "Bearer" | "Basic") => <E, R>(self: HttpClient.HttpClient.With<E, R>) => HttpClient.HttpClient.With<E, R>;
49
- export {};
18
+ export declare const withAuthorization: (token: string, kind?: 'Bearer' | 'Basic') => <E, R>(self: HttpClient.HttpClient.With<E, R>) => HttpClient.HttpClient.With<E, R>;
19
+ export declare const configuredCredentialsLayer: (credentials: Credential.ServiceCredential[]) => Layer.Layer<Credential.CredentialsService, never, never>;
20
+ export declare const credentialsLayerConfig: (credentials: {
21
+ service: string;
22
+ apiKey: Config.Config<Redacted.Redacted<string>>;
23
+ }[]) => Layer.Layer<Credential.CredentialsService, import("effect/ConfigError").ConfigError, never>;
24
+ export declare const credentialsLayerFromDatabase: ({ caching }?: {
25
+ caching?: boolean;
26
+ }) => Layer.Layer<Credential.CredentialsService, never, Database.Service>;
50
27
  //# sourceMappingURL=credentials.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../../../../src/services/credentials.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,UAAU,MAAM,6BAA6B,CAAC;AAE1D,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAIF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,EAAE,MAAM,CAAC;IAGhB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;;IAKE;;OAEG;sBACe,CAAC,KAAK,EAAE,eAAe,KAAK,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAE1E;;;OAGG;mBACY,CAAC,KAAK,EAAE,eAAe,KAAK,OAAO,CAAC,iBAAiB,CAAC;;AAZzE,qBAAa,kBAAmB,SAAQ,uBAcrC;IACD,MAAM,CAAC,aAAa,GAAI,OAAO,eAAe,KAAG,MAAM,CAAC,MAAM,CAAC,iBAAiB,EAAE,KAAK,EAAE,kBAAkB,CAAC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K,QAAQ,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAS,MAAM,YAAY,CAAC;AAG7C,qBAAa,4BAA6B,YAAW,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,kBAAkB,CAAC;IACzF,OAAO,CAAC,QAAQ,CAAC,WAAW;IAAxC,YAA6B,WAAW,GAAE,UAAU,CAAC,iBAAiB,EAAO,EAAI;IAEjF,cAAc,CAAC,WAAW,EAAE,UAAU,CAAC,iBAAiB,EAAE,GAAG,4BAA4B,CAGxF;IAEK,gBAAgB,CAAC,KAAK,EAAE,UAAU,CAAC,eAAe,GAAG,OAAO,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAC,CAEjG;IAEK,aAAa,CAAC,KAAK,EAAE,UAAU,CAAC,eAAe,GAAG,OAAO,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAO5F;CACF;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB,UAAW,MAAM,SAAS,QAAQ,GAAG,OAAO,uFAItE,CAAC;AAEL,eAAO,MAAM,0BAA0B,gBAAiB,UAAU,CAAC,iBAAiB,EAAE,6DACO,CAAC;AAE9F,eAAO,MAAM,sBAAsB,gBACpB;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;CAClD,EAAE,gGAgBF,CAAC;AAEJ,eAAO,MAAM,4BAA4B,iBAAyB;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,wEA0CpF,CAAC"}
@@ -1,16 +1,18 @@
1
1
  import * as Context from 'effect/Context';
2
2
  import * as Effect from 'effect/Effect';
3
3
  import * as Layer from 'effect/Layer';
4
- import type { FunctionNotFoundError } from '../errors';
5
- import { type FunctionDefinition, type InvocationServices } from '../sdk';
4
+ import { type FunctionNotFoundError, Operation } from '@dxos/compute';
6
5
  declare const FunctionInvocationService_base: Context.TagClass<FunctionInvocationService, "@dxos/functions/FunctionInvocationService", {
7
- invokeFunction<I, O>(functionDef: FunctionDefinition<I, O, any>, input: I): Effect.Effect<O, never, InvocationServices>;
8
- resolveFunction(key: string): Effect.Effect<FunctionDefinition.Any, FunctionNotFoundError>;
6
+ invokeFunction<I, O>(functionDef: Operation.Definition<I, O, any>, input: I): Effect.Effect<O>;
7
+ resolveFunction(key: string): Effect.Effect<Operation.Definition.Any, FunctionNotFoundError>;
9
8
  }>;
9
+ /**
10
+ * @deprecated
11
+ */
10
12
  export declare class FunctionInvocationService extends FunctionInvocationService_base {
11
13
  static layerNotAvailable: Layer.Layer<FunctionInvocationService, never, never>;
12
- static invokeFunction: <I, O>(functionDef: FunctionDefinition<I, O, any>, input: I) => Effect.Effect<O, never, FunctionInvocationService | InvocationServices>;
13
- static resolveFunction: (key: string) => Effect.Effect<FunctionDefinition.Any, FunctionNotFoundError, FunctionInvocationService>;
14
+ static invokeFunction: <I, O>(functionDef: Operation.Definition<I, O, any>, input: I) => Effect.Effect<O, never, FunctionInvocationService>;
15
+ static resolveFunction: (key: string) => Effect.Effect<Operation.Definition.Any, FunctionNotFoundError, FunctionInvocationService>;
14
16
  }
15
17
  export {};
16
18
  //# sourceMappingURL=function-invocation-service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"function-invocation-service.d.ts","sourceRoot":"","sources":["../../../../src/services/function-invocation-service.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,kBAAkB,EAAE,MAAM,QAAQ,CAAC;;mBAKvD,CAAC,EAAE,CAAC,eACJ,kBAAkB,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,SACnC,CAAC,GACP,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC;yBAEzB,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC,GAAG,EAAE,qBAAqB,CAAC;;AAR9F,qBAAa,yBAA0B,SAAQ,8BAU5C;IACD,MAAM,CAAC,iBAAiB,uDAGrB;IAEH,MAAM,CAAC,cAAc,GAAI,CAAC,EAAE,CAAC,EAC3B,aAAa,kBAAkB,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,EAC1C,OAAO,CAAC,KACP,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,yBAAyB,GAAG,kBAAkB,CAAC,CACyC;IAEnH,MAAM,CAAC,eAAe,GACpB,KAAK,MAAM,KACV,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC,GAAG,EAAE,qBAAqB,EAAE,yBAAyB,CAAC,CACW;CACtG"}
1
+ {"version":3,"file":"function-invocation-service.d.ts","sourceRoot":"","sources":["../../../../src/services/function-invocation-service.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,KAAK,qBAAqB,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;;mBAQnD,CAAC,EAAE,CAAC,eAAe,SAAS,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;yBAEzE,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,GAAG,EAAE,qBAAqB,CAAC;;AARhG;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,8BAO5C;IACD,MAAM,CAAC,iBAAiB,uDAGrB;IAEH,MAAM,CAAC,cAAc,GAAI,CAAC,EAAE,CAAC,eACd,SAAS,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,SACrC,CAAC,KACP,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,yBAAyB,CAAC,CAC8D;IAEnH,MAAM,CAAC,eAAe,QACf,MAAM,KACV,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,GAAG,EAAE,qBAAqB,EAAE,yBAAyB,CAAC,CACS;CACtG"}
@@ -1,8 +1,5 @@
1
1
  export * from './credentials';
2
- export { ConfiguredCredentialsService, type ServiceCredential } from './credentials';
3
- export * from './event-logger';
4
- export { createEventLogger, createDefectLogger } from './event-logger';
5
2
  export * from './function-invocation-service';
6
3
  export * from './queues';
7
- export * from './tracing';
4
+ export { MESSAGE_PROPERTY_TOOL_CALL_ID } from './tracing';
8
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/index.ts"],"names":[],"mappings":"AAIA,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,4BAA4B,EAAE,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACrF,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACvE,cAAc,+BAA+B,CAAC;AAC9C,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/index.ts"],"names":[],"mappings":"AAIA,cAAc,eAAe,CAAC;AAC9B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,6BAA6B,EAAE,MAAM,WAAW,CAAC"}
@@ -1,47 +1,2 @@
1
- import * as Context from 'effect/Context';
2
- import * as Effect from 'effect/Effect';
3
- import * as Layer from 'effect/Layer';
4
- import type { Entity } from '@dxos/echo';
5
- import type { Queue, QueueAPI, QueueFactory } from '@dxos/echo-db';
6
- import type { DXN, QueueSubspaceTag } from '@dxos/keys';
7
- declare const QueueService_base: Context.TagClass<QueueService, "@dxos/functions/QueueService", {
8
- /**
9
- * API to access the queues.
10
- */
11
- readonly queues: QueueAPI;
12
- /**
13
- * The queue that is used to store the context of the current research.
14
- * @deprecated Use `ContextQueueService` instead.
15
- */
16
- readonly queue: Queue | undefined;
17
- }>;
18
- /**
19
- * Gives access to all queues.
20
- */
21
- export declare class QueueService extends QueueService_base {
22
- static notAvailable: Layer.Layer<QueueService, never, never>;
23
- static make: (queues: QueueFactory, queue?: Queue) => Context.Tag.Service<QueueService>;
24
- static layer: (queues: QueueFactory, queue?: Queue) => Layer.Layer<QueueService>;
25
- /**
26
- * Gets a queue by its DXN.
27
- */
28
- static getQueue: <T extends Entity.Unknown = Entity.Unknown>(dxn: DXN) => Effect.Effect<Queue<T>, never, QueueService>;
29
- /**
30
- * Creates a new queue.
31
- */
32
- static createQueue: <T extends Entity.Unknown = Entity.Unknown>(options?: {
33
- subspaceTag?: QueueSubspaceTag;
34
- }) => Effect.Effect<Queue<T>, never, QueueService>;
35
- static append: <T extends Entity.Unknown = Entity.Unknown>(queue: Queue<T>, objects: T[]) => Effect.Effect<void>;
36
- }
37
- declare const ContextQueueService_base: Context.TagClass<ContextQueueService, "@dxos/functions/ContextQueueService", {
38
- readonly queue: Queue;
39
- }>;
40
- /**
41
- * Gives access to a specific queue passed as a context.
42
- */
43
- export declare class ContextQueueService extends ContextQueueService_base {
44
- static layer: (queue: Queue) => Layer.Layer<ContextQueueService, never, never>;
45
- }
46
- export {};
1
+ export { QueueService, feedServiceFromQueueServiceLayer } from '@dxos/echo-db';
47
2
  //# sourceMappingURL=queues.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"queues.d.ts","sourceRoot":"","sources":["../../../../src/services/queues.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M,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,EAAE,OAAO,KAAK,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,KAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CACjE;CAC/C;;oBAQmB,KAAK;;AANzB;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,wBAKtC;IACD,MAAM,CAAC,KAAK,GAAI,OAAO,KAAK,oDAAmD;CAChF"}
1
+ {"version":3,"file":"queues.d.ts","sourceRoot":"","sources":["../../../../src/services/queues.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,gCAAgC,EAAE,MAAM,eAAe,CAAC"}
@@ -1,88 +1,5 @@
1
- import * as Context from 'effect/Context';
2
- import * as Effect from 'effect/Effect';
3
- import * as Layer from 'effect/Layer';
4
- import { AgentStatus } from '@dxos/ai';
5
- import { type DXN, Obj } from '@dxos/echo';
6
- import { ObjectId } from '@dxos/keys';
7
- import { Message } from '@dxos/types';
8
- import type { Trigger } from '../types';
9
- declare const TracingService_base: Context.TagClass<TracingService, "@dxos/functions/TracingService", {
10
- /**
11
- * Gets the parent message ID.
12
- */
13
- getTraceContext: () => TracingService.TraceContext;
14
- /**
15
- * Write an event to the tracing queue.
16
- * @param event - The event to write. Must be an a typed object.
17
- */
18
- write: (event: Obj.Unknown, traceContext: TracingService.TraceContext) => void;
19
- traceInvocationStart({ payload, target, }: {
20
- payload: TracingService.FunctionInvocationPayload;
21
- target?: DXN;
22
- }): Effect.Effect<TracingService.InvocationTraceData>;
23
- traceInvocationEnd({ trace, exception, }: {
24
- trace: TracingService.InvocationTraceData;
25
- exception?: any;
26
- }): Effect.Effect<void>;
27
- }>;
28
- /**
29
- * Provides a way for compute primitives (functions, workflows, tools)
30
- * to emit an execution trace as a series of structured ECHO objects.
31
- */
32
- export declare class TracingService extends TracingService_base {
33
- static noop: Context.Tag.Service<TracingService>;
34
- static layerNoop: Layer.Layer<TracingService>;
35
- /**
36
- * Creates a TracingService layer that emits events to the parent tracing service.
37
- */
38
- static layerSubframe: (mapContext: (currentContext: TracingService.TraceContext) => TracingService.TraceContext) => Layer.Layer<TracingService, never, TracingService>;
39
- /**
40
- * Create sublayer to trace an invocation.
41
- * @param data
42
- * @returns
43
- */
44
- static layerInvocation: (data: TracingService.InvocationTraceData) => Layer.Layer<TracingService, never, TracingService>;
45
- /**
46
- * Emit the current human-readable execution status.
47
- */
48
- static emitStatus: (data: Omit<Obj.MakeProps<typeof AgentStatus>, 'created'>) => Effect.Effect<void, never, TracingService>;
49
- static emitConverationMessage: (data: Obj.MakeProps<typeof Message.Message>) => Effect.Effect<void, never, TracingService>;
50
- }
51
- export declare namespace TracingService {
52
- interface TraceContext {
53
- currentInvocation?: InvocationTraceData;
54
- /**
55
- * If this thread sprung from a tool call, this is the ID of the message containing the tool call.
56
- */
57
- parentMessage?: ObjectId;
58
- /**
59
- * If the current thread is a byproduct of a tool call, this is the ID of the tool call.
60
- */
61
- toolCallId?: string;
62
- debugInfo?: unknown;
63
- }
64
- /**
65
- * Trace data for a function/trigger invocation.
66
- */
67
- interface InvocationTraceData {
68
- invocationId: ObjectId;
69
- invocationTraceQueue?: DXN.String;
70
- }
71
- /**
72
- * Payload for a function/trigger invocation.
73
- */
74
- interface FunctionInvocationPayload {
75
- data?: any;
76
- inputNodeId?: string;
77
- trigger?: {
78
- id: string;
79
- kind: Trigger.Kind;
80
- };
81
- }
82
- }
83
1
  /**
84
2
  * Goes into {@link Message['properties']}
85
3
  */
86
- export declare const MESSAGE_PROPERTY_TOOL_CALL_ID: "toolCallId";
87
- export {};
4
+ export declare const MESSAGE_PROPERTY_TOOL_CALL_ID: 'toolCallId';
88
5
  //# sourceMappingURL=tracing.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tracing.d.ts","sourceRoot":"","sources":["../../../../src/services/tracing.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,e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CAAC,GAAG,CAAC,SAAS,CAAC,OAAO,WAAW,CAAC,EAAE,SAAS,CAAC,KACrD,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,cAAc,CAAC,CAW5C;IAEH,MAAM,CAAC,sBAAsB,EAAE,CAC7B,IAAI,EAAE,GAAG,CAAC,SAAS,CAAC,OAAO,OAAO,CAAC,OAAO,CAAC,KACxC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,cAAc,CAAC,CAa5C;CACJ;AAED,yBAAiB,cAAc,CAAC;IAC9B,UAAiB,YAAY;QAC3B,iBAAiB,CAAC,EAAE,mBAAmB,CAAC;QAExC;;WAEG;QACH,aAAa,CAAC,EAAE,QAAQ,CAAC;QAEzB;;WAEG;QACH,UAAU,CAAC,EAAE,MAAM,CAAC;QAEpB,SAAS,CAAC,EAAE,OAAO,CAAC;KACrB;IAED;;OAEG;IACH,UAAiB,mBAAmB;QAClC,YAAY,EAAE,QAAQ,CAAC;QACvB,oBAAoB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC;KACnC;IAED;;OAEG;IACH,UAAiB,yBAAyB;QACxC,IAAI,CAAC,EAAE,GAAG,CAAC;QACX,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,OAAO,CAAC,EAAE;YACR,EAAE,EAAE,MAAM,CAAC;YACX,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC;SACpB,CAAC;KACH;CACF;AAED;;GAEG;AACH,eAAO,MAAM,6BAA6B,EAAG,YAAqB,CAAC"}
1
+ {"version":3,"file":"tracing.d.ts","sourceRoot":"","sources":["../../../../src/services/tracing.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,eAAO,MAAM,6BAA6B,EAAG,YAAqB,CAAC"}
@@ -1,6 +1,2 @@
1
- export * as Function from './Function';
2
- export * as Script from './Script';
3
- export * as Trigger from './Trigger';
4
- export * as TriggerEvent from './TriggerEvent';
5
1
  export * from './url';
6
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAC/C,cAAc,OAAO,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAIA,cAAc,OAAO,CAAC"}
@@ -1,13 +1,13 @@
1
1
  import { type Obj } from '@dxos/echo';
2
- export declare const FUNCTIONS_META_KEY = "dxos.org/service/function";
3
- export declare const FUNCTIONS_PRESET_META_KEY = "dxos.org/service/function-preset";
2
+ export declare const FUNCTIONS_META_KEY = "org.dxos.service.function";
3
+ export declare const FUNCTIONS_PRESET_META_KEY = "org.dxos.service.function-preset";
4
4
  /**
5
5
  * NOTE: functionId is backend ID, not ECHO object id.
6
6
  */
7
7
  export declare const getUserFunctionIdInMetadata: (meta: Obj.ReadonlyMeta) => string | undefined;
8
8
  /**
9
9
  * NOTE: functionId is backend ID, not ECHO object id.
10
- * Must be called inside Obj.changeMeta() since it mutates the meta.
10
+ * Must be called inside Obj.update() since it mutates the meta.
11
11
  */
12
12
  export declare const setUserFunctionIdInMetadata: (meta: Obj.Meta, functionId: string) => void;
13
13
  //# sourceMappingURL=url.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../../../src/types/url.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,YAAY,CAAC;AAGtC,eAAO,MAAM,kBAAkB,8BAA8B,CAAC;AAE9D,eAAO,MAAM,yBAAyB,qCAAqC,CAAC;AAE5E;;GAEG;AACH,eAAO,MAAM,2BAA2B,GAAI,MAAM,GAAG,CAAC,YAAY,uBAEjE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,2BAA2B,GAAI,MAAM,GAAG,CAAC,IAAI,EAAE,YAAY,MAAM,SAS7E,CAAC"}
1
+ {"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../../../src/types/url.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,YAAY,CAAC;AAGtC,eAAO,MAAM,kBAAkB,8BAA8B,CAAC;AAE9D,eAAO,MAAM,yBAAyB,qCAAqC,CAAC;AAE5E;;GAEG;AACH,eAAO,MAAM,2BAA2B,SAAU,GAAG,CAAC,YAAY,uBAEjE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,2BAA2B,SAAU,GAAG,CAAC,IAAI,cAAc,MAAM,SAS7E,CAAC"}