@dxos/functions 0.8.3 → 0.8.4-main.3f58842

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 (96) hide show
  1. package/dist/lib/browser/bundler/index.mjs +21 -10
  2. package/dist/lib/browser/bundler/index.mjs.map +3 -3
  3. package/dist/lib/browser/{chunk-WEFZUEL2.mjs → chunk-3NGCSUEW.mjs} +106 -78
  4. package/dist/lib/browser/chunk-3NGCSUEW.mjs.map +7 -0
  5. package/dist/lib/browser/edge/index.mjs +2 -2
  6. package/dist/lib/browser/edge/index.mjs.map +1 -1
  7. package/dist/lib/browser/index.mjs +40 -23
  8. package/dist/lib/browser/index.mjs.map +4 -4
  9. package/dist/lib/browser/meta.json +1 -1
  10. package/dist/lib/browser/testing/index.mjs +71 -8
  11. package/dist/lib/browser/testing/index.mjs.map +4 -4
  12. package/dist/lib/node-esm/bundler/index.mjs +21 -10
  13. package/dist/lib/node-esm/bundler/index.mjs.map +3 -3
  14. package/dist/lib/node-esm/{chunk-LIYPMWNQ.mjs → chunk-FJ2MU7TL.mjs} +106 -78
  15. package/dist/lib/node-esm/chunk-FJ2MU7TL.mjs.map +7 -0
  16. package/dist/lib/node-esm/edge/index.mjs +2 -2
  17. package/dist/lib/node-esm/edge/index.mjs.map +1 -1
  18. package/dist/lib/node-esm/index.mjs +40 -23
  19. package/dist/lib/node-esm/index.mjs.map +4 -4
  20. package/dist/lib/node-esm/meta.json +1 -1
  21. package/dist/lib/node-esm/testing/index.mjs +71 -8
  22. package/dist/lib/node-esm/testing/index.mjs.map +4 -4
  23. package/dist/types/src/bundler/bundler.d.ts +1 -2
  24. package/dist/types/src/bundler/bundler.d.ts.map +1 -1
  25. package/dist/types/src/edge/functions.d.ts +1 -1
  26. package/dist/types/src/edge/functions.d.ts.map +1 -1
  27. package/dist/types/src/errors.d.ts +68 -0
  28. package/dist/types/src/errors.d.ts.map +1 -0
  29. package/dist/types/src/executor/executor.d.ts.map +1 -1
  30. package/dist/types/src/handler.d.ts +10 -12
  31. package/dist/types/src/handler.d.ts.map +1 -1
  32. package/dist/types/src/index.d.ts +1 -0
  33. package/dist/types/src/index.d.ts.map +1 -1
  34. package/dist/types/src/schema.d.ts +4 -4
  35. package/dist/types/src/services/credentials.d.ts +3 -2
  36. package/dist/types/src/services/credentials.d.ts.map +1 -1
  37. package/dist/types/src/services/database.d.ts +20 -2
  38. package/dist/types/src/services/database.d.ts.map +1 -1
  39. package/dist/types/src/services/index.d.ts +0 -1
  40. package/dist/types/src/services/index.d.ts.map +1 -1
  41. package/dist/types/src/services/queues.d.ts +15 -3
  42. package/dist/types/src/services/queues.d.ts.map +1 -1
  43. package/dist/types/src/services/service-container.d.ts +27 -15
  44. package/dist/types/src/services/service-container.d.ts.map +1 -1
  45. package/dist/types/src/services/service-registry.d.ts +29 -0
  46. package/dist/types/src/services/service-registry.d.ts.map +1 -0
  47. package/dist/types/src/services/service-registry.test.d.ts +2 -0
  48. package/dist/types/src/services/service-registry.test.d.ts.map +1 -0
  49. package/dist/types/src/services/tracing.d.ts +11 -1
  50. package/dist/types/src/services/tracing.d.ts.map +1 -1
  51. package/dist/types/src/testing/index.d.ts +1 -0
  52. package/dist/types/src/testing/index.d.ts.map +1 -1
  53. package/dist/types/src/testing/layer.d.ts +10 -0
  54. package/dist/types/src/testing/layer.d.ts.map +1 -0
  55. package/dist/types/src/testing/services.d.ts +66 -9
  56. package/dist/types/src/testing/services.d.ts.map +1 -1
  57. package/dist/types/src/translations.d.ts +9 -9
  58. package/dist/types/src/translations.d.ts.map +1 -1
  59. package/dist/types/src/types.d.ts +8 -8
  60. package/dist/types/tsconfig.tsbuildinfo +1 -1
  61. package/package.json +31 -26
  62. package/src/bundler/bundler.test.ts +1 -1
  63. package/src/bundler/bundler.ts +26 -4
  64. package/src/edge/functions.ts +1 -1
  65. package/src/errors.ts +13 -0
  66. package/src/executor/executor.ts +15 -8
  67. package/src/handler.ts +28 -21
  68. package/src/index.ts +1 -0
  69. package/src/services/credentials.ts +9 -3
  70. package/src/services/database.ts +44 -2
  71. package/src/services/index.ts +0 -1
  72. package/src/services/queues.ts +24 -6
  73. package/src/services/service-container.ts +39 -35
  74. package/src/services/service-registry.test.ts +42 -0
  75. package/src/services/service-registry.ts +56 -0
  76. package/src/services/tracing.ts +16 -1
  77. package/src/testing/index.ts +1 -0
  78. package/src/testing/layer.ts +31 -0
  79. package/src/testing/services.ts +150 -14
  80. package/src/translations.ts +4 -4
  81. package/dist/lib/browser/chunk-WEFZUEL2.mjs.map +0 -7
  82. package/dist/lib/node/bundler/index.cjs +0 -260
  83. package/dist/lib/node/bundler/index.cjs.map +0 -7
  84. package/dist/lib/node/chunk-IJAE7FZK.cjs +0 -320
  85. package/dist/lib/node/chunk-IJAE7FZK.cjs.map +0 -7
  86. package/dist/lib/node/edge/index.cjs +0 -94
  87. package/dist/lib/node/edge/index.cjs.map +0 -7
  88. package/dist/lib/node/index.cjs +0 -522
  89. package/dist/lib/node/index.cjs.map +0 -7
  90. package/dist/lib/node/meta.json +0 -1
  91. package/dist/lib/node/testing/index.cjs +0 -43
  92. package/dist/lib/node/testing/index.cjs.map +0 -7
  93. package/dist/lib/node-esm/chunk-LIYPMWNQ.mjs.map +0 -7
  94. package/dist/types/src/services/ai.d.ts +0 -12
  95. package/dist/types/src/services/ai.d.ts.map +0 -1
  96. package/src/services/ai.ts +0 -32
@@ -1,6 +1,6 @@
1
1
  import { type DID } from 'iso-did/types';
2
2
  import { type Client } from '@dxos/client';
3
- import type { PublicKey } from '@dxos/keys';
3
+ import { type PublicKey } from '@dxos/keys';
4
4
  import { type UploadFunctionResponseBody } from '@dxos/protocols';
5
5
  export type UploadWorkerArgs = {
6
6
  client: Client;
@@ -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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eAAO,MAAM,oBAAoB,GAAI,SAAS,MAAM,KAAG,MAKtD,CAAC;AAGF,eAAO,MAAM,cAAc,GAAI,KAAK,SAAS,KAAG,GAE/C,CAAC"}
@@ -0,0 +1,68 @@
1
+ import { BaseError } from '@dxos/errors';
2
+ declare const ServiceNotAvailableError_base: {
3
+ new (message: string, options?: import("@dxos/errors").BaseErrorOptions): {
4
+ "__#1@#code": "SERVICE_NOT_AVAILABLE";
5
+ "__#1@#context": Record<string, unknown>;
6
+ readonly name: "SERVICE_NOT_AVAILABLE";
7
+ readonly code: "SERVICE_NOT_AVAILABLE";
8
+ readonly _tag: "SERVICE_NOT_AVAILABLE";
9
+ readonly context: Record<string, unknown>;
10
+ message: string;
11
+ stack?: string;
12
+ cause?: unknown;
13
+ };
14
+ code: "SERVICE_NOT_AVAILABLE";
15
+ is(error: unknown): error is BaseError;
16
+ wrap(message: string, options?: Omit<import("@dxos/errors").BaseErrorOptions, "cause">): (error: unknown) => {
17
+ "__#1@#code": "SERVICE_NOT_AVAILABLE";
18
+ "__#1@#context": Record<string, unknown>;
19
+ readonly name: "SERVICE_NOT_AVAILABLE";
20
+ readonly code: "SERVICE_NOT_AVAILABLE";
21
+ readonly _tag: "SERVICE_NOT_AVAILABLE";
22
+ readonly context: Record<string, unknown>;
23
+ message: string;
24
+ stack?: string;
25
+ cause?: unknown;
26
+ };
27
+ extend<Code extends string>(code: Code): any;
28
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
29
+ prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
30
+ stackTraceLimit: number;
31
+ };
32
+ export declare class ServiceNotAvailableError extends ServiceNotAvailableError_base {
33
+ constructor(serviceName: string);
34
+ }
35
+ declare const FunctionError_base: {
36
+ new (message: string, options?: import("@dxos/errors").BaseErrorOptions): {
37
+ "__#1@#code": "FUNCTION_ERROR";
38
+ "__#1@#context": Record<string, unknown>;
39
+ readonly name: "FUNCTION_ERROR";
40
+ readonly code: "FUNCTION_ERROR";
41
+ readonly _tag: "FUNCTION_ERROR";
42
+ readonly context: Record<string, unknown>;
43
+ message: string;
44
+ stack?: string;
45
+ cause?: unknown;
46
+ };
47
+ code: "FUNCTION_ERROR";
48
+ is(error: unknown): error is BaseError;
49
+ wrap(message: string, options?: Omit<import("@dxos/errors").BaseErrorOptions, "cause">): (error: unknown) => {
50
+ "__#1@#code": "FUNCTION_ERROR";
51
+ "__#1@#context": Record<string, unknown>;
52
+ readonly name: "FUNCTION_ERROR";
53
+ readonly code: "FUNCTION_ERROR";
54
+ readonly _tag: "FUNCTION_ERROR";
55
+ readonly context: Record<string, unknown>;
56
+ message: string;
57
+ stack?: string;
58
+ cause?: unknown;
59
+ };
60
+ extend<Code extends string>(code: Code): any;
61
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
62
+ prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
63
+ stackTraceLimit: number;
64
+ };
65
+ export declare class FunctionError extends FunctionError_base {
66
+ }
67
+ export {};
68
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/errors.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEzC,qBAAa,wBAAyB,SAAQ,6BAAyC;gBACzE,WAAW,EAAE,MAAM;CAGhC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAED,qBAAa,aAAc,SAAQ,kBAAkC;CAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../../../src/executor/executor.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAmB,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,qBAAa,gBAAgB;IACf,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAAT,SAAS,EAAE,gBAAgB;IAGlD,MAAM,CAAC,CAAC,SAAS,kBAAkB,CAAC,GAAG,EAAE,GAAG,CAAC,EACjD,KAAK,EAAE,CAAC,EACR,KAAK,EAAE,CAAC,SAAS,kBAAkB,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,KAAK,GACjE,OAAO,CAAC,CAAC,SAAS,kBAAkB,CAAC,MAAM,EAAE,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;CA4BxE"}
1
+ {"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../../../src/executor/executor.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAmB,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACtE,OAAO,KAAK,EAAE,gBAAgB,EAAY,MAAM,aAAa,CAAC;AAE9D,qBAAa,gBAAgB;IACf,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAAT,SAAS,EAAE,gBAAgB;IAGlD,MAAM,CAAC,CAAC,SAAS,kBAAkB,CAAC,GAAG,EAAE,GAAG,CAAC,EACjD,KAAK,EAAE,CAAC,EACR,KAAK,EAAE,CAAC,SAAS,kBAAkB,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,KAAK,GACjE,OAAO,CAAC,CAAC,SAAS,kBAAkB,CAAC,MAAM,EAAE,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;CAkCxE"}
@@ -1,9 +1,10 @@
1
1
  import { Schema, type Context, type Effect } from 'effect';
2
2
  import { type AiServiceClient } from '@dxos/ai';
3
- import type { CoreDatabase, EchoDatabase } from '@dxos/echo-db';
3
+ import type { EchoDatabase } from '@dxos/echo-db';
4
4
  import { type HasId } from '@dxos/echo-schema';
5
5
  import { type SpaceId, type DXN } from '@dxos/keys';
6
6
  import { type QueryResult } from '@dxos/protocols';
7
+ import type { Services } from './services';
7
8
  /**
8
9
  * Function handler.
9
10
  */
@@ -18,22 +19,22 @@ export type FunctionHandler<TData = {}, TOutput = any> = (params: {
18
19
  * This will be the payload from the trigger or other data passed into the function in a workflow.
19
20
  */
20
21
  data: TData;
21
- }) => TOutput | Promise<TOutput> | Effect.Effect<TOutput, any>;
22
+ }) => TOutput | Promise<TOutput> | Effect.Effect<TOutput, any, Services>;
22
23
  /**
23
24
  * Function context.
24
25
  */
25
26
  export interface FunctionContext {
27
+ /**
28
+ * Space from which the function was invoked.
29
+ */
30
+ space: SpaceAPI | undefined;
31
+ ai: AiServiceClient;
26
32
  /**
27
33
  * Resolves a service available to the function.
28
34
  * @throws if the service is not available.
29
35
  */
30
36
  getService: <T extends Context.Tag<any, any>>(tag: T) => Context.Tag.Service<T>;
31
37
  getSpace: (spaceId: SpaceId) => Promise<SpaceAPI>;
32
- /**
33
- * Space from which the function was invoked.
34
- */
35
- space: SpaceAPI | undefined;
36
- ai: AiServiceClient;
37
38
  }
38
39
  export interface FunctionContextAi {
39
40
  run(model: string, inputs: any, options?: any): Promise<any>;
@@ -47,18 +48,15 @@ export interface QueuesAPI {
47
48
  */
48
49
  export interface SpaceAPI {
49
50
  get id(): SpaceId;
50
- /**
51
- * @deprecated
52
- */
53
- get crud(): CoreDatabase;
54
51
  get db(): EchoDatabase;
55
52
  get queues(): QueuesAPI;
56
53
  }
57
54
  export type FunctionDefinition<T = {}, O = any> = {
55
+ name: string;
58
56
  description?: string;
59
57
  inputSchema: Schema.Schema<T, any>;
60
58
  outputSchema?: Schema.Schema<O, any>;
61
59
  handler: FunctionHandler<T, O>;
62
60
  };
63
- export declare const defineFunction: <T, O>(params: FunctionDefinition<T, O>) => FunctionDefinition<T, O>;
61
+ export declare const defineFunction: <T, O>({ name, description, inputSchema, outputSchema, handler, }: FunctionDefinition<T, O>) => FunctionDefinition<T, O>;
64
62
  //# sourceMappingURL=handler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"handler.d.ts","sourceRoot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G,OAAO,CAAC,WAAW,CAAC,CAAC;IAC3D,eAAe,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9D;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,IAAI,OAAO,CAAC;IAClB,IAAI,EAAE,IAAI,YAAY,CAAC;IAGvB,IAAI,MAAM,IAAI,SAAS,CAAC;CACzB;AAOD,MAAM,MAAM,kBAAkB,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,GAAG,IAAI;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACnC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACrC,OAAO,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CAChC,CAAC;AAGF,eAAO,MAAM,cAAc,GAAI,CAAC,EAAE,CAAC,EAAE,4DAMlC,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,KAAG,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAepD,CAAC"}
@@ -5,4 +5,5 @@ export * from './types';
5
5
  export * from './url';
6
6
  export * from './services';
7
7
  export * from './executor';
8
+ export * from './errors';
8
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC"}
@@ -8,7 +8,7 @@ export declare const ScriptType: Type.obj<Schema.Struct<{
8
8
  name: Schema.optional<typeof Schema.String>;
9
9
  description: Schema.optional<typeof Schema.String>;
10
10
  changed: Schema.optional<typeof Schema.Boolean>;
11
- source: import("@dxos/echo-schema").Ref$<Type.OfKind<Type.Kind.Object> & {
11
+ source: import("@dxos/echo-schema").Ref$<Type.OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
12
12
  content: string;
13
13
  }>;
14
14
  }>>;
@@ -21,11 +21,11 @@ export declare const FunctionType: Type.obj<Schema.Struct<{
21
21
  name: typeof Schema.NonEmptyString;
22
22
  version: typeof Schema.String;
23
23
  description: Schema.optional<typeof Schema.String>;
24
- source: Schema.optional<import("@dxos/echo-schema").Ref$<Type.OfKind<Type.Kind.Object> & {
25
- name?: string | undefined;
24
+ source: Schema.optional<import("@dxos/echo-schema").Ref$<Type.OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
26
25
  description?: string | undefined;
26
+ name?: string | undefined;
27
27
  changed?: boolean | undefined;
28
- source: Ref<Type.OfKind<Type.Kind.Object> & {
28
+ source: Ref<Type.OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
29
29
  content: string;
30
30
  }>;
31
31
  }>>;
@@ -1,8 +1,8 @@
1
- import { Context } from 'effect';
1
+ import { Context, Effect } from 'effect';
2
2
  type CredentialQuery = {
3
3
  service?: string;
4
4
  };
5
- type ServiceCredential = {
5
+ export type ServiceCredential = {
6
6
  service: string;
7
7
  apiKey?: string;
8
8
  };
@@ -18,6 +18,7 @@ declare const CredentialsService_base: Context.TagClass<CredentialsService, "Cre
18
18
  getCredential: (query: CredentialQuery) => Promise<ServiceCredential>;
19
19
  }>;
20
20
  export declare class CredentialsService extends CredentialsService_base {
21
+ static getCredential: (query: CredentialQuery) => Effect.Effect<ServiceCredential, never, CredentialsService>;
21
22
  }
22
23
  export declare class ConfiguredCredentialsService implements Context.Tag.Service<CredentialsService> {
23
24
  private readonly credentials;
@@ -1 +1 @@
1
- {"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../../../../src/services/credentials.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEjC,KAAK,eAAe,GAAG;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAIF,KAAK,iBAAiB,GAAG;IACvB,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;CAAG;AAEN,qBAAa,4BAA6B,YAAW,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,kBAAkB,CAAC;IAC9E,OAAO,CAAC,QAAQ,CAAC,WAAW;gBAAX,WAAW,GAAE,iBAAiB,EAAO;IAElE,cAAc,CAAC,WAAW,EAAE,iBAAiB,EAAE,GAAG,4BAA4B;IAKxE,gBAAgB,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAItE,aAAa,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC;CAOxE"}
1
+ {"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../../../../src/services/credentials.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEzC,KAAK,eAAe,GAAG;IACrB,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,CAIvG;CACN;AAED,qBAAa,4BAA6B,YAAW,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,kBAAkB,CAAC;IAC9E,OAAO,CAAC,QAAQ,CAAC,WAAW;gBAAX,WAAW,GAAE,iBAAiB,EAAO;IAElE,cAAc,CAAC,WAAW,EAAE,iBAAiB,EAAE,GAAG,4BAA4B;IAKxE,gBAAgB,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAItE,aAAa,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC;CAOxE"}
@@ -1,11 +1,29 @@
1
- import { Context, Layer } from 'effect';
2
- import type { EchoDatabase } from '@dxos/echo-db';
1
+ import { Context, Effect, Layer } from 'effect';
2
+ import type { Filter, Live, Obj, Query, Ref, Relation } from '@dxos/echo';
3
+ import type { EchoDatabase, OneShotQueryResult, QueryResult } from '@dxos/echo-db';
4
+ import type { DXN } from '@dxos/keys';
3
5
  declare const DatabaseService_base: Context.TagClass<DatabaseService, "DatabaseService", {
4
6
  readonly db: EchoDatabase;
5
7
  }>;
6
8
  export declare class DatabaseService extends DatabaseService_base {
7
9
  static notAvailable: Layer.Layer<DatabaseService, never, never>;
8
10
  static make: (db: EchoDatabase) => Context.Tag.Service<DatabaseService>;
11
+ static resolve: (dxn: DXN) => Effect.Effect<Obj.Any | Relation.Any, Error, DatabaseService>;
12
+ static loadRef: <T>(ref: Ref.Ref<T>) => Effect.Effect<T, never, never>;
13
+ /**
14
+ * Creates a `QueryResult` object that can be subscribed to.
15
+ */
16
+ static query: {
17
+ <Q extends Query.Any>(query: Q): Effect.Effect<QueryResult<Live<Query.Type<Q>>>, never, DatabaseService>;
18
+ <F extends Filter.Any>(filter: F): Effect.Effect<QueryResult<Live<Filter.Type<F>>>, never, DatabaseService>;
19
+ };
20
+ /**
21
+ * Executes the query once and returns the results.
22
+ */
23
+ static runQuery: {
24
+ <Q extends Query.Any>(query: Q): Effect.Effect<OneShotQueryResult<Live<Query.Type<Q>>>, never, DatabaseService>;
25
+ <F extends Filter.Any>(filter: F): Effect.Effect<OneShotQueryResult<Live<Filter.Type<F>>>, never, DatabaseService>;
26
+ };
9
27
  }
10
28
  export {};
11
29
  //# sourceMappingURL=database.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../../../../src/services/database.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAExC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;;iBAKjC,YAAY;;AAH7B,qBAAa,eAAgB,SAAQ,oBAKlC;IACD,MAAM,CAAC,YAAY,6CAIhB;IAEH,MAAM,CAAC,IAAI,GAAI,IAAI,YAAY,KAAG,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,eAAe,CAAC,CAMpE;CACH"}
1
+ {"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../../../../src/services/database.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAEhD,OAAO,K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;;OAEG;IACH,MAAM,CAAC,QAAQ,EAAE;QACf,CAAC,CAAC,SAAS,KAAK,CAAC,GAAG,EAAE,KAAK,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,eAAe,CAAC,CAAC;QAChH,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,eAAe,CAAC,CAAC;KACpH,CAGG;CACL"}
@@ -1,4 +1,3 @@
1
- export * from './ai';
2
1
  export * from './database';
3
2
  export * from './queues';
4
3
  export * from './service-container';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/index.ts"],"names":[],"mappings":"AAIA,cAAc,MAAM,CAAC;AACrB,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,yBAAyB,CAAC"}
@@ -1,18 +1,30 @@
1
1
  import { Context, Layer } from 'effect';
2
- import type { Queue, QueueFactory } from '@dxos/echo-db';
2
+ import type { Queue, QueueAPI, QueueFactory } from '@dxos/echo-db';
3
3
  declare const QueueService_base: Context.TagClass<QueueService, "QueueService", {
4
4
  /**
5
5
  * API to access the queues.
6
6
  */
7
- readonly queues: QueueFactory;
7
+ readonly queues: QueueAPI;
8
8
  /**
9
9
  * The queue that is used to store the context of the current research.
10
+ * @deprecated Use `ContextQueueService` instead.
10
11
  */
11
12
  readonly contextQueue: Queue | undefined;
12
13
  }>;
14
+ /**
15
+ * Gives access to all queues.
16
+ */
13
17
  export declare class QueueService extends QueueService_base {
14
18
  static notAvailable: Layer.Layer<QueueService, never, never>;
15
- static make: (queues: QueueFactory, contextQueue: Queue | undefined) => Context.Tag.Service<QueueService>;
19
+ static make: (queues: QueueFactory, contextQueue?: Queue) => Context.Tag.Service<QueueService>;
20
+ }
21
+ declare const ContextQueueService_base: Context.TagClass<ContextQueueService, "ContextQueueService", {
22
+ readonly contextQueue: Queue;
23
+ }>;
24
+ /**
25
+ * Gives access to a specific queue passed as a context.
26
+ */
27
+ export declare class ContextQueueService extends ContextQueueService_base {
16
28
  }
17
29
  export {};
18
30
  //# sourceMappingURL=queues.d.ts.map
@@ -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,YAAY,EAAE,MAAM,eAAe,CAAC;;IAKrD;;OAEG;qBACc,YAAY;IAE7B;;OAEG;2BAEoB,KAAK,GAAG,SAAS;;AAZ5C,qBAAa,YAAa,SAAQ,iBAc/B;IACD,MAAM,CAAC,YAAY,0CAKhB;IAEH,MAAM,CAAC,IAAI,GAAI,QAAQ,YAAY,EAAE,cAAc,KAAK,GAAG,SAAS,KAAG,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,YAAY,CAAC,CAKtG;CACH"}
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,5 +1,5 @@
1
- import { Layer, type Context } from 'effect';
2
- import { AiService } from './ai';
1
+ import { type Context, Layer } from 'effect';
2
+ import { AiService } from '@dxos/ai';
3
3
  import { CredentialsService } from './credentials';
4
4
  import { DatabaseService } from './database';
5
5
  import { EventLogger } from './event-logger';
@@ -7,28 +7,39 @@ import { FunctionCallService } from './function-call-service';
7
7
  import { QueueService } from './queues';
8
8
  import { TracingService } from './tracing';
9
9
  /**
10
- * List of all service tags and their names.
10
+ * List of all services.
11
11
  */
12
- export interface ServiceTagRecord {
13
- ai: AiService;
14
- credentials: CredentialsService;
15
- database: DatabaseService;
16
- eventLogger: EventLogger;
17
- functionCallService: FunctionCallService;
18
- tracing: TracingService;
19
- queues: QueueService;
20
- }
12
+ declare const SERVICES: {
13
+ readonly ai: typeof AiService;
14
+ readonly credentials: typeof CredentialsService;
15
+ readonly database: typeof DatabaseService;
16
+ readonly eventLogger: typeof EventLogger;
17
+ readonly functionCallService: typeof FunctionCallService;
18
+ readonly queues: typeof QueueService;
19
+ readonly tracing: typeof TracingService;
20
+ };
21
21
  /**
22
- * List of all services and their runtime types.
22
+ * Mapping of service names to their tags.
23
+ */
24
+ export type ServiceTagRecord = {
25
+ [K in keyof typeof SERVICES]: (typeof SERVICES)[K] extends {
26
+ new (_: never): infer T;
27
+ } ? T : never;
28
+ };
29
+ /**
30
+ * Mapping of service names to their runtime types.
23
31
  */
24
32
  export type ServiceRecord = {
25
33
  [K in keyof ServiceTagRecord]: Context.Tag.Service<ServiceTagRecord[K]>;
26
34
  };
27
35
  /**
28
- * Union of all services.
36
+ * Union of all services tags.
29
37
  */
30
38
  export type Services = ServiceTagRecord[keyof ServiceTagRecord];
31
39
  export declare const SERVICE_TAGS: Context.Tag<any, any>[];
40
+ /**
41
+ * @deprecated
42
+ */
32
43
  export declare class ServiceContainer {
33
44
  private _services;
34
45
  /**
@@ -37,8 +48,9 @@ export declare class ServiceContainer {
37
48
  * @returns The container instance.
38
49
  */
39
50
  setServices(services: Partial<ServiceRecord>): this;
40
- getService<T extends Context.Tag<any, any>>(tag: T): Context.Tag.Service<T>;
51
+ getService<Id, T>(tag: Context.Tag<Id, T>): T;
41
52
  clone(): ServiceContainer;
42
53
  createLayer(): Layer.Layer<Services>;
43
54
  }
55
+ export {};
44
56
  //# sourceMappingURL=service-container.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"service-container.d.ts","sourceRoot":"","sources":["../../../../src/services/service-container.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAE,KAAK,OAAO,EAAE,MAAM,QAAQ,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACjC,OAAO,EAAgC,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAE3C;;GAEG;AACH,MAAM,W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,0 +1,29 @@
1
+ import { Context, Effect, type Option } from 'effect';
2
+ import { ServiceNotAvailableError } from '../errors';
3
+ export declare namespace ServiceRegistry {
4
+ interface Service {
5
+ resolve: <T extends Context.Tag<any, any>>(tag: T) => Option.Option<Context.Tag.Service<T>>;
6
+ }
7
+ }
8
+ declare const ServiceRegistry_base: Context.TagClass<ServiceRegistry, "ServiceRegistry", ServiceRegistry.Service>;
9
+ export declare class ServiceRegistry extends ServiceRegistry_base {
10
+ /**
11
+ * Resolves the service from the registry.
12
+ * @param tag Service tag to resolve.
13
+ * @throws {@link ServiceNotAvailableError} if the service is not found.
14
+ * @returns Effect that resolve to the service.
15
+ */
16
+ static resolve: <T extends Context.Tag<any, any>>(tag: T) => Effect.Effect<T, ServiceNotAvailableError, ServiceRegistry>;
17
+ static provide: {
18
+ <Tags extends [Context.Tag<any, any>, ...Context.Tag<any, any>[]]>(...tags: Tags): <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E | ServiceNotAvailableError, Exclude<R, {
19
+ [K in keyof Tags]: Context.Tag.Identifier<Tags[K]>;
20
+ }[number]> | ServiceRegistry>;
21
+ };
22
+ static provideOrDie: {
23
+ <Tags extends [Context.Tag<any, any>, ...Context.Tag<any, any>[]]>(...tags: Tags): <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, Exclude<R, {
24
+ [K in keyof Tags]: Context.Tag.Identifier<Tags[K]>;
25
+ }[number]> | ServiceRegistry>;
26
+ };
27
+ }
28
+ export {};
29
+ //# sourceMappingURL=service-registry.d.ts.map
@@ -0,0 +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,UA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,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"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=service-registry.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service-registry.test.d.ts","sourceRoot":"","sources":["../../../../src/services/service-registry.test.ts"],"names":[],"mappings":""}
@@ -1,4 +1,6 @@
1
- import { Context } from 'effect';
1
+ import { Context, Effect } from 'effect';
2
+ import { AgentStatus } from '@dxos/ai';
3
+ import { Obj } from '@dxos/echo';
2
4
  import type { AnyEchoObject } from '@dxos/echo-schema';
3
5
  declare const TracingService_base: Context.TagClass<TracingService, "TracingService", {
4
6
  /**
@@ -7,9 +9,17 @@ declare const TracingService_base: Context.TagClass<TracingService, "TracingServ
7
9
  */
8
10
  write(event: AnyEchoObject): void;
9
11
  }>;
12
+ /**
13
+ * Provides a way for compute primitives (functions, workflows, tools)
14
+ * to emit an execution trace as a series of structured ECHO objects.
15
+ */
10
16
  export declare class TracingService extends TracingService_base {
11
17
  static noop: Context.Tag.Service<TracingService>;
12
18
  static console: Context.Tag.Service<TracingService>;
19
+ /**
20
+ * Emit the current human-readable execution status.
21
+ */
22
+ static emitStatus: (data: Obj.MakeProps<typeof AgentStatus>) => Effect.Effect<unknown, never, void>;
13
23
  }
14
24
  export {};
15
25
  //# sourceMappingURL=tracing.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tracing.d.ts","sourceRoot":"","sources":["../../../../src/services/tracing.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;;IAKnD;;;OAGG;iBACU,aAAa,GAAG,IAAI;;AAPrC,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;CACH"}
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,2 +1,3 @@
1
1
  export * from './services';
2
+ export * from './layer';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/testing/index.ts"],"names":[],"mappings":"AAIA,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/testing/index.ts"],"names":[],"mappings":"AAIA,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { Layer } from 'effect';
2
+ import type { Schema } from 'effect';
3
+ import type { EchoHostIndexingConfig } from '@dxos/echo-pipeline';
4
+ import { DatabaseService, QueueService } from '../services';
5
+ export type TestDatabaseOptions = {
6
+ indexing?: Partial<EchoHostIndexingConfig>;
7
+ types?: Schema.Schema.AnyNoContext[];
8
+ };
9
+ export declare const TestDatabaseLayer: ({ indexing, types }?: TestDatabaseOptions) => Layer.Layer<DatabaseService | QueueService, never, never>;
10
+ //# sourceMappingURL=layer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layer.d.ts","sourceRoot":"","sources":["../../../../src/testing/layer.ts"],"names":[],"mappings":"AAIA,OAAO,EAAmB,KAAK,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGrC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAGlE,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAI5D,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC;CACtC,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,sBAAqB,mBAAwB,8DAU5E,CAAC"}
@@ -1,13 +1,70 @@
1
1
  import { type Context } from 'effect';
2
- import type { AiServiceClient } from '@dxos/ai';
3
- import type { QueueFactory } from '@dxos/echo-db';
4
- import { ServiceContainer } from '../services';
5
- import type { EventLogger } from '../services/event-logger';
2
+ import { type AiServiceClient, type AiServiceEdgeClientOptions } from '@dxos/ai';
3
+ import type { Space } from '@dxos/client/echo';
4
+ import type { EchoDatabase, QueueFactory } from '@dxos/echo-db';
5
+ import { type CredentialsService, type EventLogger, ServiceContainer, type ServiceCredential, type TracingService } from '../services';
6
+ export type OneOf<T> = {
7
+ [K in keyof T]: {
8
+ [P in K]: T[P];
9
+ } & {
10
+ [P in Exclude<keyof T, K>]?: never;
11
+ };
12
+ }[keyof T];
13
+ export type AiServiceProvider = 'dev' | 'edge' | 'ollama' | 'lmstudio';
6
14
  export type TestServiceOptions = {
7
- ai?: AiServiceClient;
8
- queueFactory?: QueueFactory;
9
- enableLogging?: boolean;
10
- logger?: Context.Tag.Service<EventLogger>;
15
+ /**
16
+ * AI service configuration.
17
+ */
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
+ }>;
32
+ /**
33
+ * Credentials service configuration.
34
+ */
35
+ credentials?: OneOf<{
36
+ /**
37
+ * Predefined credentials list.
38
+ */
39
+ services?: ServiceCredential[];
40
+ /**
41
+ * Custom credentials service.
42
+ */
43
+ service?: Context.Tag.Service<CredentialsService>;
44
+ }>;
45
+ /**
46
+ * Database configuration.
47
+ */
48
+ db?: EchoDatabase;
49
+ /**
50
+ * Gets database and queue services from the space.
51
+ * Exclusive with: `db`, `queues`
52
+ */
53
+ space?: Space;
54
+ /**
55
+ * Logging configuration.
56
+ */
57
+ logging?: {
58
+ enabled?: boolean;
59
+ logger?: Context.Tag.Service<EventLogger>;
60
+ };
61
+ /**
62
+ * Queue service configuration.
63
+ */
64
+ queues?: QueueFactory;
65
+ tracing?: {
66
+ service?: Context.Tag.Service<TracingService>;
67
+ };
11
68
  };
12
- export declare const createTestServices: ({ ai, queueFactory, enableLogging, logger, }?: TestServiceOptions) => ServiceContainer;
69
+ export declare const createTestServices: ({ ai, credentials, db, logging, queues, space, tracing, }?: TestServiceOptions) => ServiceContainer;
13
70
  //# sourceMappingURL=services.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../../../src/testing/services.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAGlD,OAAO,EAA2B,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAE5D,MAAM,MAAM,kBAAkB,GAAG;IAC/B,EAAE,CAAC,EAAE,eAAe,CAAC;IACrB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;CAC3C,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,+CAKhC,kBAAuB,KAAG,gBAM5B,CAAC"}
1
+ {"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../../../src/testing/services.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC,OAAO,EAAa,KAAK,eAAe,EAAE,KAAK,0BAA0B,EAAuB,MAAM,UAAU,CAAC;AAEjH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAIhE,OAAO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OAEG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;IAEtB,OAAO,CAAC,EAAE;QACR,OAAO,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;KAC/C,CAAC;CACH,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,4DAQhC,kBAAuB,KAAG,gBAW5B,CAAC"}
@@ -1,12 +1,12 @@
1
- declare const _default: {
2
- 'en-US': {
3
- [x: string]: {
4
- 'typename label': string;
5
- 'typename label_zero': string;
6
- 'typename label_one': string;
7
- 'typename label_other': string;
1
+ import { ScriptType } from './schema';
2
+ export declare const translations: [{
3
+ readonly 'en-US': {
4
+ readonly [ScriptType.typename]: {
5
+ readonly 'typename label': "Script";
6
+ readonly 'typename label_zero': "Scripts";
7
+ readonly 'typename label_one': "Script";
8
+ readonly 'typename label_other': "Scripts";
8
9
  };
9
10
  };
10
- }[];
11
- export default _default;
11
+ }];
12
12
  //# sourceMappingURL=translations.d.ts.map