@dxos/functions 0.8.4-main.3a94e84 → 0.8.4-main.5acf9ea

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 (56) hide show
  1. package/dist/lib/browser/{chunk-3NGCSUEW.mjs → chunk-6PTFLPCO.mjs} +194 -60
  2. package/dist/lib/browser/chunk-6PTFLPCO.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +13 -15
  4. package/dist/lib/browser/index.mjs.map +4 -4
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/browser/testing/index.mjs +2 -34
  7. package/dist/lib/browser/testing/index.mjs.map +3 -3
  8. package/dist/lib/node-esm/{chunk-FJ2MU7TL.mjs → chunk-NYJ2TSXO.mjs} +194 -60
  9. package/dist/lib/node-esm/chunk-NYJ2TSXO.mjs.map +7 -0
  10. package/dist/lib/node-esm/index.mjs +13 -15
  11. package/dist/lib/node-esm/index.mjs.map +4 -4
  12. package/dist/lib/node-esm/meta.json +1 -1
  13. package/dist/lib/node-esm/testing/index.mjs +2 -34
  14. package/dist/lib/node-esm/testing/index.mjs.map +3 -3
  15. package/dist/types/src/services/credentials.d.ts +3 -2
  16. package/dist/types/src/services/credentials.d.ts.map +1 -1
  17. package/dist/types/src/services/database.d.ts +2 -1
  18. package/dist/types/src/services/database.d.ts.map +1 -1
  19. package/dist/types/src/services/event-logger.d.ts +65 -30
  20. package/dist/types/src/services/event-logger.d.ts.map +1 -1
  21. package/dist/types/src/services/index.d.ts +2 -1
  22. package/dist/types/src/services/index.d.ts.map +1 -1
  23. package/dist/types/src/services/local-function-execution.d.ts +11 -0
  24. package/dist/types/src/services/local-function-execution.d.ts.map +1 -0
  25. package/dist/types/src/services/queues.d.ts +3 -2
  26. package/dist/types/src/services/queues.d.ts.map +1 -1
  27. package/dist/types/src/services/remote-function-execution-service.d.ts +15 -0
  28. package/dist/types/src/services/remote-function-execution-service.d.ts.map +1 -0
  29. package/dist/types/src/services/service-container.d.ts +4 -4
  30. package/dist/types/src/services/service-container.d.ts.map +1 -1
  31. package/dist/types/src/services/service-registry.d.ts +1 -1
  32. package/dist/types/src/services/service-registry.d.ts.map +1 -1
  33. package/dist/types/src/services/tracing.d.ts +3 -2
  34. package/dist/types/src/services/tracing.d.ts.map +1 -1
  35. package/dist/types/src/testing/logger.d.ts +3 -3
  36. package/dist/types/src/testing/logger.d.ts.map +1 -1
  37. package/dist/types/src/testing/services.d.ts +6 -17
  38. package/dist/types/src/testing/services.d.ts.map +1 -1
  39. package/dist/types/tsconfig.tsbuildinfo +1 -1
  40. package/package.json +32 -27
  41. package/src/services/credentials.ts +5 -2
  42. package/src/services/database.ts +5 -1
  43. package/src/services/event-logger.ts +67 -36
  44. package/src/services/index.ts +2 -1
  45. package/src/services/local-function-execution.ts +70 -0
  46. package/src/services/queues.ts +5 -2
  47. package/src/services/{function-call-service.ts → remote-function-execution-service.ts} +7 -5
  48. package/src/services/service-container.ts +7 -7
  49. package/src/services/service-registry.ts +4 -1
  50. package/src/services/tracing.ts +4 -2
  51. package/src/testing/logger.ts +3 -3
  52. package/src/testing/services.ts +8 -62
  53. package/dist/lib/browser/chunk-3NGCSUEW.mjs.map +0 -7
  54. package/dist/lib/node-esm/chunk-FJ2MU7TL.mjs.map +0 -7
  55. package/dist/types/src/services/function-call-service.d.ts +0 -16
  56. package/dist/types/src/services/function-call-service.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/index.ts"],"names":[],"mappings":"AAIA,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/index.ts"],"names":[],"mappings":"AAIA,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qCAAqC,CAAC;AACpD,cAAc,4BAA4B,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { Context, Effect, Layer } from 'effect';
2
+ import type { FunctionDefinition } from '../handler';
3
+ import type { Services } from './service-container';
4
+ declare const LocalFunctionExecutionService_base: Context.TagClass<LocalFunctionExecutionService, "@dxos/functions/LocalFunctionExecutionService", {
5
+ invokeFunction(fnDef: FunctionDefinition<any, any>, input: unknown): Effect.Effect<unknown, never, Services>;
6
+ }>;
7
+ export declare class LocalFunctionExecutionService extends LocalFunctionExecutionService_base {
8
+ static layer: Layer.Layer<LocalFunctionExecutionService, never, never>;
9
+ }
10
+ export {};
11
+ //# sourceMappingURL=local-function-execution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-function-execution.d.ts","sourceRoot":"","sources":["../../../../src/services/local-function-execution.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAU,MAAM,QAAQ,CAAC;AAIxD,OAAO,KAAK,EAAmB,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACtE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;;0BAQ1B,kBAAkB,CAAC,GAAG,EAAE,GAAG,CAAC,SAAS,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC;;AALhH,qBAAa,6BAA8B,SAAQ,kCAOhD;IACD,MAAM,CAAC,KAAK,2DAET;CACJ"}
@@ -1,6 +1,6 @@
1
1
  import { Context, Layer } from 'effect';
2
2
  import type { Queue, QueueAPI, QueueFactory } from '@dxos/echo-db';
3
- declare const QueueService_base: Context.TagClass<QueueService, "QueueService", {
3
+ declare const QueueService_base: Context.TagClass<QueueService, "@dxos/functions/QueueService", {
4
4
  /**
5
5
  * API to access the queues.
6
6
  */
@@ -17,8 +17,9 @@ declare const QueueService_base: Context.TagClass<QueueService, "QueueService",
17
17
  export declare class QueueService extends QueueService_base {
18
18
  static notAvailable: Layer.Layer<QueueService, never, never>;
19
19
  static make: (queues: QueueFactory, contextQueue?: Queue) => Context.Tag.Service<QueueService>;
20
+ static makeLayer: (queues: QueueFactory, contextQueue?: Queue) => Layer.Layer<QueueService>;
20
21
  }
21
- declare const ContextQueueService_base: Context.TagClass<ContextQueueService, "ContextQueueService", {
22
+ declare const ContextQueueService_base: Context.TagClass<ContextQueueService, "@dxos/functions/ContextQueueService", {
22
23
  readonly contextQueue: Queue;
23
24
  }>;
24
25
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"queues.d.ts","sourceRoot":"","sources":["../../../../src/services/queues.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAExC,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;;IAQ/D;;OAEG;qBACc,QAAQ;IAEzB;;;OAGG;2BACoB,KAAK,GAAG,SAAS;;AAf5C;;GAEG;AACH,qBAAa,YAAa,SAAQ,iBAc/B;IACD,MAAM,CAAC,YAAY,0CAUhB;IAEH,MAAM,CAAC,IAAI,GAAI,QAAQ,YAAY,EAAE,eAAe,KAAK,KAAG,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,YAAY,CAAC,CAK3F;CACH;;2BAQ0B,KAAK;;AANhC;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,wBAKtC;CAAG"}
1
+ {"version":3,"file":"queues.d.ts","sourceRoot":"","sources":["../../../../src/services/queues.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAExC,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;;IAQ/D;;OAEG;qBACc,QAAQ;IAEzB;;;OAGG;2BACoB,KAAK,GAAG,SAAS;;AAf5C;;GAEG;AACH,qBAAa,YAAa,SAAQ,iBAc/B;IACD,MAAM,CAAC,YAAY,0CAUhB;IAEH,MAAM,CAAC,IAAI,GAAI,QAAQ,YAAY,EAAE,eAAe,KAAK,KAAG,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,YAAY,CAAC,CAK3F;IAEF,MAAM,CAAC,SAAS,GAAI,QAAQ,YAAY,EAAE,eAAe,KAAK,KAAG,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,CACnB;CACxE;;2BAQ0B,KAAK;;AANhC;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,wBAKtC;CAAG"}
@@ -0,0 +1,15 @@
1
+ import { Context, Layer } from 'effect';
2
+ import type { SpaceId } from '@dxos/keys';
3
+ declare const RemoteFunctionExecutionService_base: Context.TagClass<RemoteFunctionExecutionService, "@dxos/functions/RemoteFunctionExecutionService", {
4
+ callFunction(deployedFunctionId: string, input: any, spaceId?: SpaceId): Promise<any>;
5
+ }>;
6
+ /**
7
+ * Allows calling into other functions.
8
+ */
9
+ export declare class RemoteFunctionExecutionService extends RemoteFunctionExecutionService_base {
10
+ static fromClient(baseUrl: string, spaceId: SpaceId): Context.Tag.Service<RemoteFunctionExecutionService>;
11
+ static mock: () => Context.Tag.Service<RemoteFunctionExecutionService>;
12
+ static mockLayer: Layer.Layer<RemoteFunctionExecutionService, never, never>;
13
+ }
14
+ export {};
15
+ //# sourceMappingURL=remote-function-execution-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote-function-execution-service.d.ts","sourceRoot":"","sources":["../../../../src/services/remote-function-execution-service.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAExC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;;qCAQL,MAAM,SAAS,GAAG,YAAY,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC;;AANzF;;GAEG;AACH,qBAAa,8BAA+B,SAAQ,mCAKjD;IACD,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,8BAA8B,CAAC;IAiBzG,MAAM,CAAC,IAAI,QAAO,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,8BAA8B,CAAC,CAMnE;IAEF,MAAM,CAAC,SAAS,4DAAwF;CACzG"}
@@ -2,9 +2,9 @@ import { type Context, Layer } from 'effect';
2
2
  import { AiService } from '@dxos/ai';
3
3
  import { CredentialsService } from './credentials';
4
4
  import { DatabaseService } from './database';
5
- import { EventLogger } from './event-logger';
6
- import { FunctionCallService } from './function-call-service';
5
+ import { ComputeEventLogger } from './event-logger';
7
6
  import { QueueService } from './queues';
7
+ import { RemoteFunctionExecutionService } from './remote-function-execution-service';
8
8
  import { TracingService } from './tracing';
9
9
  /**
10
10
  * List of all services.
@@ -13,8 +13,8 @@ declare const SERVICES: {
13
13
  readonly ai: typeof AiService;
14
14
  readonly credentials: typeof CredentialsService;
15
15
  readonly database: typeof DatabaseService;
16
- readonly eventLogger: typeof EventLogger;
17
- readonly functionCallService: typeof FunctionCallService;
16
+ readonly eventLogger: typeof ComputeEventLogger;
17
+ readonly functionCallService: typeof RemoteFunctionExecutionService;
18
18
  readonly queues: typeof QueueService;
19
19
  readonly tracing: typeof TracingService;
20
20
  };
@@ -1 +1 @@
1
- {"version":3,"file":"service-container.d.ts","sourceRoot":"","sources":["../../../../src/services/service-container.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAGrC,OAAO,EAAgC,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACjF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,CAAC,QAAQ,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,IAAI;IAKnD,UAAU,CAAC,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC;IAU7C,KAAK,IAAI,gBAAgB;IAKzB,WAAW,IAAI,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC;CAqBrC"}
@@ -5,7 +5,7 @@ export declare namespace ServiceRegistry {
5
5
  resolve: <T extends Context.Tag<any, any>>(tag: T) => Option.Option<Context.Tag.Service<T>>;
6
6
  }
7
7
  }
8
- declare const ServiceRegistry_base: Context.TagClass<ServiceRegistry, "ServiceRegistry", ServiceRegistry.Service>;
8
+ declare const ServiceRegistry_base: Context.TagClass<ServiceRegistry, "@dxos/functions/ServiceRegistry", ServiceRegistry.Service>;
9
9
  export declare class ServiceRegistry extends ServiceRegistry_base {
10
10
  /**
11
11
  * Resolves the service from the registry.
@@ -1 +1 @@
1
- {"version":3,"file":"service-registry.d.ts","sourceRoot":"","sources":["../../../../src/services/service-registry.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAQ,KAAK,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAErD,yBAAiB,eAAe,CAAC;IAC/B,UAAiB,OAAO;QACtB,OAAO,EAAE,CAAC,CAAC,SAAS,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;KAC7F;CACF;;AAED,qBAAa,eAAgB,SAAQ,oBAA0E;IAC7G;;;;;OAKG;IACH,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,SAAS,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CA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AAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SAAE,CAAC,MAAM,CAAC,CAAC,GAAG,eAAe,CAC7F,CAAC;KACH,CAAoH;IAErH,MAAM,CAAC,YAAY,EAAE;QACnB,CAAC,IAAI,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,EAC/D,GAAG,IAAI,EAAE,IAAI,GACZ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EACT,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAC3B,MAAM,CAAC,MAAM,CAChB,CAAC,EACD,CAAC,EACD,OAAO,CAAC,CAAC,EAAE;aAAG,CAAC,IAAI,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SAAE,CAAC,MAAM,CAAC,CAAC,GAAG,eAAe,CAC7F,CAAC;KACH,CAGG;CACL"}
@@ -1,8 +1,8 @@
1
- import { Context, Effect } from 'effect';
1
+ import { Context, Effect, Layer } from 'effect';
2
2
  import { AgentStatus } from '@dxos/ai';
3
3
  import { Obj } from '@dxos/echo';
4
4
  import type { AnyEchoObject } from '@dxos/echo-schema';
5
- declare const TracingService_base: Context.TagClass<TracingService, "TracingService", {
5
+ declare const TracingService_base: Context.TagClass<TracingService, "@dxos/functions/TracingService", {
6
6
  /**
7
7
  * Write an event to the tracing queue.
8
8
  * @param event - The event to write. Must be an a typed object.
@@ -15,6 +15,7 @@ declare const TracingService_base: Context.TagClass<TracingService, "TracingServ
15
15
  */
16
16
  export declare class TracingService extends TracingService_base {
17
17
  static noop: Context.Tag.Service<TracingService>;
18
+ static layerNoop: Layer.Layer<TracingService, never, never>;
18
19
  static console: Context.Tag.Service<TracingService>;
19
20
  /**
20
21
  * Emit the current human-readable execution status.
@@ -1 +1 @@
1
- {"version":3,"file":"tracing.d.ts","sourceRoot":"","sources":["../../../../src/services/tracing.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEzC,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;;IASnD;;;OAGG;iBACU,aAAa,GAAG,IAAI;;AAXrC;;;GAGG;AACH,qBAAa,cAAe,SAAQ,mBASjC;IACD,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,cAAc,CAAC,CAAuB;IAEvE,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,cAAc,CAAC,CAKjD;IAEF;;OAEG;IACH,MAAM,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC,SAAS,CAAC,OAAO,WAAW,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,CAI9F;CACN"}
1
+ {"version":3,"file":"tracing.d.ts","sourceRoot":"","sources":["../../../../src/services/tracing.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAEhD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;;IASnD;;;OAGG;iBACU,aAAa,GAAG,IAAI;;AAXrC;;;GAGG;AACH,qBAAa,cAAe,SAAQ,mBASjC;IACD,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,cAAc,CAAC,CAAuB;IAEvE,MAAM,CAAC,SAAS,4CAAsD;IAEtE,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,cAAc,CAAC,CAKjD;IAEF;;OAEG;IACH,MAAM,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC,SAAS,CAAC,OAAO,WAAW,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,CAI9F;CACN"}
@@ -1,5 +1,5 @@
1
1
  import { type Context } from 'effect';
2
- import { type EventLogger } from '../services';
3
- export declare const noopLogger: Context.Tag.Service<EventLogger>;
4
- export declare const consoleLogger: Context.Tag.Service<EventLogger>;
2
+ import { type ComputeEventLogger } from '../services';
3
+ export declare const noopLogger: Context.Tag.Service<ComputeEventLogger>;
4
+ export declare const consoleLogger: Context.Tag.Service<ComputeEventLogger>;
5
5
  //# sourceMappingURL=logger.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../../src/testing/logger.ts"],"names":[],"mappings":"AAIA,OAAO,EAAU,KAAK,OAAO,EAAE,MAAM,QAAQ,CAAC;AAI9C,OAAO,EAAE,KAAK,WAAW,EAAqB,MAAM,aAAa,CAAC;AAElE,eAAO,MAAM,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,CAGvD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,CAAoC,CAAC"}
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../../src/testing/logger.ts"],"names":[],"mappings":"AAIA,OAAO,EAAU,KAAK,OAAO,EAAE,MAAM,QAAQ,CAAC;AAI9C,OAAO,EAAE,KAAK,kBAAkB,EAAqB,MAAM,aAAa,CAAC;AAEzE,eAAO,MAAM,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,kBAAkB,CAG9D,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,kBAAkB,CAAoC,CAAC"}
@@ -1,8 +1,7 @@
1
1
  import { type Context } from 'effect';
2
- import { type AiServiceClient, type AiServiceEdgeClientOptions } from '@dxos/ai';
3
2
  import type { Space } from '@dxos/client/echo';
4
3
  import type { EchoDatabase, QueueFactory } from '@dxos/echo-db';
5
- import { type CredentialsService, type EventLogger, ServiceContainer, type ServiceCredential, type TracingService } from '../services';
4
+ import { type CredentialsService, type ComputeEventLogger, ServiceContainer, type ServiceCredential, type TracingService } from '../services';
6
5
  export type OneOf<T> = {
7
6
  [K in keyof T]: {
8
7
  [P in K]: T[P];
@@ -15,20 +14,7 @@ export type TestServiceOptions = {
15
14
  /**
16
15
  * AI service configuration.
17
16
  */
18
- ai?: OneOf<{
19
- /**
20
- * Custom AI service client.
21
- */
22
- client?: AiServiceClient;
23
- /**
24
- * Edge AI service at specified endpoint.
25
- */
26
- endpoint?: AiServiceEdgeClientOptions['endpoint'];
27
- /**
28
- * Predefined AI service configuration.
29
- */
30
- provider?: AiServiceProvider;
31
- }>;
17
+ ai?: any;
32
18
  /**
33
19
  * Credentials service configuration.
34
20
  */
@@ -56,7 +42,7 @@ export type TestServiceOptions = {
56
42
  */
57
43
  logging?: {
58
44
  enabled?: boolean;
59
- logger?: Context.Tag.Service<EventLogger>;
45
+ logger?: Context.Tag.Service<ComputeEventLogger>;
60
46
  };
61
47
  /**
62
48
  * Queue service configuration.
@@ -66,5 +52,8 @@ export type TestServiceOptions = {
66
52
  service?: Context.Tag.Service<TracingService>;
67
53
  };
68
54
  };
55
+ /**
56
+ * @deprecated
57
+ */
69
58
  export declare const createTestServices: ({ ai, credentials, db, logging, queues, space, tracing, }?: TestServiceOptions) => ServiceContainer;
70
59
  //# sourceMappingURL=services.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../../../src/testing/services.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