@dxos/functions 0.8.4-main.9be5663bfe → 0.8.4-main.abd8ff62ef
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.
- package/dist/lib/neutral/index.mjs +126 -917
- package/dist/lib/neutral/index.mjs.map +4 -4
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/types/src/index.d.ts +0 -6
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/protocol/functions-ai-http-client.d.ts.map +1 -1
- package/dist/types/src/protocol/protocol.d.ts +1 -1
- package/dist/types/src/protocol/protocol.d.ts.map +1 -1
- package/dist/types/src/sdk.d.ts +3 -7
- package/dist/types/src/sdk.d.ts.map +1 -1
- package/dist/types/src/services/credentials.d.ts +15 -38
- package/dist/types/src/services/credentials.d.ts.map +1 -1
- package/dist/types/src/services/function-invocation-service.d.ts +3 -5
- package/dist/types/src/services/function-invocation-service.d.ts.map +1 -1
- package/dist/types/src/services/index.d.ts +1 -4
- package/dist/types/src/services/index.d.ts.map +1 -1
- package/dist/types/src/services/queues.d.ts +1 -49
- package/dist/types/src/services/queues.d.ts.map +1 -1
- package/dist/types/src/services/tracing.d.ts +1 -107
- package/dist/types/src/services/tracing.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +0 -3
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/url.d.ts +1 -1
- package/dist/types/src/types/url.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +15 -20
- package/src/index.ts +0 -6
- package/src/protocol/protocol.test.ts +10 -10
- package/src/protocol/protocol.ts +37 -12
- package/src/sdk.ts +5 -15
- package/src/services/credentials.ts +75 -118
- package/src/services/function-invocation-service.ts +3 -9
- package/src/services/index.ts +1 -4
- package/src/services/queues.ts +1 -87
- package/src/services/tracing.ts +0 -192
- package/src/types/index.ts +0 -3
- package/src/types/url.ts +1 -1
- package/dist/lib/neutral/Trace.mjs +0 -38
- package/dist/lib/neutral/Trace.mjs.map +0 -7
- package/dist/lib/neutral/chunk-5T7GOX2V.mjs +0 -149
- package/dist/lib/neutral/chunk-5T7GOX2V.mjs.map +0 -7
- package/dist/lib/neutral/chunk-IVDUS56O.mjs +0 -49
- package/dist/lib/neutral/chunk-IVDUS56O.mjs.map +0 -7
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +0 -10
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +0 -7
- package/dist/lib/neutral/fib-N45KAC7C.mjs +0 -23
- package/dist/lib/neutral/fib-N45KAC7C.mjs.map +0 -7
- package/dist/lib/neutral/reply-EUEPKNJF.mjs +0 -19
- package/dist/lib/neutral/reply-EUEPKNJF.mjs.map +0 -7
- package/dist/lib/neutral/sleep-PUK3D4FF.mjs +0 -15
- package/dist/lib/neutral/sleep-PUK3D4FF.mjs.map +0 -7
- package/dist/types/src/Trace.d.ts +0 -155
- package/dist/types/src/Trace.d.ts.map +0 -1
- package/dist/types/src/errors.d.ts +0 -121
- package/dist/types/src/errors.d.ts.map +0 -1
- package/dist/types/src/example/definitions.d.ts +0 -11
- package/dist/types/src/example/definitions.d.ts.map +0 -1
- package/dist/types/src/example/fib.d.ts +0 -8
- package/dist/types/src/example/fib.d.ts.map +0 -1
- package/dist/types/src/example/forex-effect.d.ts +0 -3
- package/dist/types/src/example/forex-effect.d.ts.map +0 -1
- package/dist/types/src/example/index.d.ts +0 -4
- package/dist/types/src/example/index.d.ts.map +0 -1
- package/dist/types/src/example/reply.d.ts +0 -4
- package/dist/types/src/example/reply.d.ts.map +0 -1
- package/dist/types/src/example/sleep.d.ts +0 -6
- package/dist/types/src/example/sleep.d.ts.map +0 -1
- package/dist/types/src/process/Process.d.ts +0 -247
- package/dist/types/src/process/Process.d.ts.map +0 -1
- package/dist/types/src/process/ServiceResolver.d.ts +0 -74
- package/dist/types/src/process/ServiceResolver.d.ts.map +0 -1
- package/dist/types/src/process/StorageService.d.ts +0 -58
- package/dist/types/src/process/StorageService.d.ts.map +0 -1
- package/dist/types/src/services/event-logger.d.ts +0 -81
- package/dist/types/src/services/event-logger.d.ts.map +0 -1
- package/dist/types/src/types/Script.d.ts +0 -22
- package/dist/types/src/types/Script.d.ts.map +0 -1
- package/dist/types/src/types/Trigger.d.ts +0 -120
- package/dist/types/src/types/Trigger.d.ts.map +0 -1
- package/dist/types/src/types/TriggerEvent.d.ts +0 -75
- package/dist/types/src/types/TriggerEvent.d.ts.map +0 -1
- package/src/Trace.ts +0 -202
- package/src/errors.ts +0 -21
- package/src/example/definitions.ts +0 -49
- package/src/example/fib.ts +0 -23
- package/src/example/forex-effect.ts +0 -40
- package/src/example/index.ts +0 -12
- package/src/example/reply.ts +0 -19
- package/src/example/sleep.ts +0 -17
- package/src/process/Process.ts +0 -486
- package/src/process/ServiceResolver.ts +0 -174
- package/src/process/StorageService.ts +0 -99
- package/src/services/event-logger.ts +0 -127
- package/src/types/Script.ts +0 -38
- package/src/types/Trigger.ts +0 -154
- package/src/types/TriggerEvent.ts +0 -62
|
@@ -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
|
|
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?:
|
|
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;
|
|
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;AAE1C,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC,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,14 @@
|
|
|
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 { Operation } from '@dxos/
|
|
5
|
-
import type { FunctionNotFoundError } from '../errors';
|
|
6
|
-
import { type InvocationServices } from '../sdk';
|
|
4
|
+
import { type FunctionNotFoundError, Operation } from '@dxos/compute';
|
|
7
5
|
declare const FunctionInvocationService_base: Context.TagClass<FunctionInvocationService, "@dxos/functions/FunctionInvocationService", {
|
|
8
|
-
invokeFunction<I, O>(functionDef: Operation.Definition<I, O, any>, input: I): Effect.Effect<O
|
|
6
|
+
invokeFunction<I, O>(functionDef: Operation.Definition<I, O, any>, input: I): Effect.Effect<O>;
|
|
9
7
|
resolveFunction(key: string): Effect.Effect<Operation.Definition.Any, FunctionNotFoundError>;
|
|
10
8
|
}>;
|
|
11
9
|
export declare class FunctionInvocationService extends FunctionInvocationService_base {
|
|
12
10
|
static layerNotAvailable: Layer.Layer<FunctionInvocationService, never, never>;
|
|
13
|
-
static invokeFunction: <I, O>(functionDef: Operation.Definition<I, O, any>, input: I) => Effect.Effect<O, never, FunctionInvocationService
|
|
11
|
+
static invokeFunction: <I, O>(functionDef: Operation.Definition<I, O, any>, input: I) => Effect.Effect<O, never, FunctionInvocationService>;
|
|
14
12
|
static resolveFunction: (key: string) => Effect.Effect<Operation.Definition.Any, FunctionNotFoundError, FunctionInvocationService>;
|
|
15
13
|
}
|
|
16
14
|
export {};
|
|
@@ -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,EAAE,
|
|
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;;mBAKnD,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;;AALhG,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
|
|
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,
|
|
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,50 +1,2 @@
|
|
|
1
|
-
|
|
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, type QueueAPI, type 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
|
-
* @deprecated Use Feed.FeedService instead.
|
|
21
|
-
*/
|
|
22
|
-
export declare class QueueService extends QueueService_base {
|
|
23
|
-
static notAvailable: Layer.Layer<QueueService, never, never>;
|
|
24
|
-
static make: (queues: QueueFactory, queue?: Queue) => Context.Tag.Service<QueueService>;
|
|
25
|
-
static layer: (queues: QueueFactory, queue?: Queue) => Layer.Layer<QueueService>;
|
|
26
|
-
/**
|
|
27
|
-
* Gets a queue by its DXN.
|
|
28
|
-
*/
|
|
29
|
-
static getQueue: <T extends Entity.Unknown = Entity.Unknown>(dxn: DXN) => Effect.Effect<Queue<T>, never, QueueService>;
|
|
30
|
-
/**
|
|
31
|
-
* Creates a new queue.
|
|
32
|
-
*/
|
|
33
|
-
static createQueue: <T extends Entity.Unknown = Entity.Unknown>(options?: {
|
|
34
|
-
subspaceTag?: QueueSubspaceTag;
|
|
35
|
-
}) => Effect.Effect<Queue<T>, never, QueueService>;
|
|
36
|
-
static append: <T extends Entity.Unknown = Entity.Unknown>(queue: Queue<T>, objects: T[]) => Effect.Effect<void>;
|
|
37
|
-
}
|
|
38
|
-
declare const ContextQueueService_base: Context.TagClass<ContextQueueService, "@dxos/functions/ContextQueueService", {
|
|
39
|
-
readonly queue: Queue;
|
|
40
|
-
}>;
|
|
41
|
-
/**
|
|
42
|
-
* Gives access to a specific queue passed as a context.
|
|
43
|
-
* @deprecated Use Feed.FeedService instead.
|
|
44
|
-
*/
|
|
45
|
-
export declare class ContextQueueService extends ContextQueueService_base {
|
|
46
|
-
static layer: (queue: Queue) => Layer.Layer<ContextQueueService, never, never>;
|
|
47
|
-
}
|
|
48
|
-
export declare const feedServiceFromQueueServiceLayer: Layer.Layer<import("@dxos/echo/Feed").FeedService, never, QueueService>;
|
|
49
|
-
export {};
|
|
1
|
+
export { ContextQueueService, QueueService, feedServiceFromQueueServiceLayer } from '@dxos/echo-db';
|
|
50
2
|
//# sourceMappingURL=queues.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queues.d.ts","sourceRoot":"","sources":["../../../../src/services/queues.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"queues.d.ts","sourceRoot":"","sources":["../../../../src/services/queues.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,gCAAgC,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -1,111 +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, Ref } 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
|
-
/**
|
|
20
|
-
* Write an ephemeral event.
|
|
21
|
-
*/
|
|
22
|
-
ephemeral: (event: Obj.Unknown, traceContext: TracingService.TraceContext) => void;
|
|
23
|
-
traceInvocationStart({ payload, target, }: {
|
|
24
|
-
payload: TracingService.FunctionInvocationPayload;
|
|
25
|
-
target?: DXN;
|
|
26
|
-
}): Effect.Effect<TracingService.InvocationTraceData>;
|
|
27
|
-
traceInvocationEnd({ trace, exception, }: {
|
|
28
|
-
trace: TracingService.InvocationTraceData;
|
|
29
|
-
exception?: any;
|
|
30
|
-
}): Effect.Effect<void>;
|
|
31
|
-
}>;
|
|
32
|
-
/**
|
|
33
|
-
* Provides a way for compute primitives (functions, workflows, tools)
|
|
34
|
-
* to emit an execution trace as a series of structured ECHO objects.
|
|
35
|
-
* @deprecated Use Trace.TraceService instead.
|
|
36
|
-
*/
|
|
37
|
-
export declare class TracingService extends TracingService_base {
|
|
38
|
-
static noop: Context.Tag.Service<TracingService>;
|
|
39
|
-
static layerNoop: Layer.Layer<TracingService>;
|
|
40
|
-
/**
|
|
41
|
-
* Creates a TracingService layer that emits events to the parent tracing service.
|
|
42
|
-
*/
|
|
43
|
-
static layerSubframe: (mapContext: (currentContext: TracingService.TraceContext) => TracingService.TraceContext) => Layer.Layer<TracingService, never, TracingService>;
|
|
44
|
-
/**
|
|
45
|
-
* Create sublayer to trace an invocation.
|
|
46
|
-
* @param data
|
|
47
|
-
* @returns
|
|
48
|
-
*/
|
|
49
|
-
static layerInvocation: (data: TracingService.InvocationTraceData) => Layer.Layer<TracingService, never, TracingService>;
|
|
50
|
-
/**
|
|
51
|
-
* Emit the current human-readable execution status.
|
|
52
|
-
*/
|
|
53
|
-
static emitStatus: (data: Omit<Obj.MakeProps<typeof AgentStatus>, 'created'>) => Effect.Effect<void, never, TracingService>;
|
|
54
|
-
static emitConverationMessage: (data: Obj.MakeProps<typeof Message.Message> | Message.Message) => Effect.Effect<void, never, TracingService>;
|
|
55
|
-
static emitEphemeralMessage: (data: Message.Message) => Effect.Effect<void, never, TracingService>;
|
|
56
|
-
}
|
|
57
|
-
export declare namespace TracingService {
|
|
58
|
-
interface TraceContext {
|
|
59
|
-
currentInvocation?: InvocationTraceData;
|
|
60
|
-
/**
|
|
61
|
-
* If this thread sprung from a tool call, this is the ID of the message containing the tool call.
|
|
62
|
-
*/
|
|
63
|
-
parentMessage?: ObjectId;
|
|
64
|
-
/**
|
|
65
|
-
* If the current thread is a byproduct of a tool call, this is the ID of the tool call.
|
|
66
|
-
*/
|
|
67
|
-
toolCallId?: string;
|
|
68
|
-
debugInfo?: unknown;
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Trace data for a function/trigger invocation.
|
|
72
|
-
*/
|
|
73
|
-
interface InvocationTraceData {
|
|
74
|
-
invocationId: ObjectId;
|
|
75
|
-
invocationTraceQueue?: DXN.String;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Payload for a function/trigger invocation.
|
|
79
|
-
*/
|
|
80
|
-
interface FunctionInvocationPayload {
|
|
81
|
-
data?: any;
|
|
82
|
-
inputNodeId?: string;
|
|
83
|
-
trigger?: {
|
|
84
|
-
id: string;
|
|
85
|
-
kind: Trigger.Kind;
|
|
86
|
-
};
|
|
87
|
-
chat?: Ref.Ref<Obj.Unknown>;
|
|
88
|
-
process?: {
|
|
89
|
-
pid: string;
|
|
90
|
-
parentPid?: string;
|
|
91
|
-
/**
|
|
92
|
-
* Key of the executable.
|
|
93
|
-
*/
|
|
94
|
-
key: string;
|
|
95
|
-
/**
|
|
96
|
-
* Process name.
|
|
97
|
-
*/
|
|
98
|
-
name?: string;
|
|
99
|
-
/**
|
|
100
|
-
* Target object that the process is assigned to.
|
|
101
|
-
*/
|
|
102
|
-
target?: string;
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
1
|
/**
|
|
107
2
|
* Goes into {@link Message['properties']}
|
|
108
3
|
*/
|
|
109
|
-
export declare const MESSAGE_PROPERTY_TOOL_CALL_ID:
|
|
110
|
-
export {};
|
|
4
|
+
export declare const MESSAGE_PROPERTY_TOOL_CALL_ID: 'toolCallId';
|
|
111
5
|
//# sourceMappingURL=tracing.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tracing.d.ts","sourceRoot":"","sources":["../../../../src/services/tracing.ts"],"names":[],"mappings":"AAIA
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAIA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAIA,cAAc,OAAO,CAAC"}
|
|
@@ -7,7 +7,7 @@ export declare const FUNCTIONS_PRESET_META_KEY = "org.dxos.service.function-pres
|
|
|
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.
|
|
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,
|
|
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"}
|