@dxos/assistant 0.8.4-main.406dc2a → 0.8.4-main.548089c
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/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/extraction/index.mjs +114 -161
- package/dist/lib/browser/extraction/index.mjs.map +4 -4
- package/dist/lib/browser/index.mjs +508 -151
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/extraction/index.mjs +114 -161
- package/dist/lib/node-esm/extraction/index.mjs.map +4 -4
- package/dist/lib/node-esm/index.mjs +508 -151
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/conversation/conversation.d.ts +4 -7
- package/dist/types/src/conversation/conversation.d.ts.map +1 -1
- package/dist/types/src/diff.d.ts.map +1 -1
- package/dist/types/src/errors.d.ts +8 -16
- package/dist/types/src/errors.d.ts.map +1 -1
- package/dist/types/src/execution-graph.d.ts +3 -0
- package/dist/types/src/execution-graph.d.ts.map +1 -1
- package/dist/types/src/extraction/extraction-llm-function/extraction-llm-function.d.ts.map +1 -1
- package/dist/types/src/extraction/extraction-ner-function/extraction-ner-function.d.ts +28 -24
- package/dist/types/src/extraction/extraction-ner-function/extraction-ner-function.d.ts.map +1 -1
- package/dist/types/src/extraction/extraction.d.ts +14 -7
- package/dist/types/src/extraction/extraction.d.ts.map +1 -1
- package/dist/types/src/functions/services.d.ts +2 -1
- package/dist/types/src/functions/services.d.ts.map +1 -1
- package/dist/types/src/session/GenericToolkit.d.ts +84 -0
- package/dist/types/src/session/GenericToolkit.d.ts.map +1 -0
- package/dist/types/src/session/format.d.ts +16 -16
- package/dist/types/src/session/format.d.ts.map +1 -1
- package/dist/types/src/session/index.d.ts +1 -0
- package/dist/types/src/session/index.d.ts.map +1 -1
- package/dist/types/src/session/observer.d.ts +2 -2
- package/dist/types/src/session/observer.d.ts.map +1 -1
- package/dist/types/src/session/session.d.ts +3 -3
- package/dist/types/src/session/session.d.ts.map +1 -1
- package/dist/types/src/session/version-pin.d.ts +1 -1
- package/dist/types/src/session/version-pin.d.ts.map +1 -1
- package/dist/types/src/types/artifact.d.ts +4 -0
- package/dist/types/src/types/artifact.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +22 -20
- package/src/conversation/conversation.ts +8 -12
- package/src/diff.test.ts +3 -3
- package/src/diff.ts +5 -0
- package/src/execution-graph.test.ts +44 -42
- package/src/execution-graph.ts +19 -10
- package/src/extraction/extraction-llm-function/extraction-llm-function.test.ts +2 -2
- package/src/extraction/extraction-llm-function/extraction-llm-function.ts +44 -54
- package/src/extraction/extraction-ner-function/extraction-ner-function.test.ts +10 -9
- package/src/extraction/extraction-ner-function/extraction-ner-function.ts +36 -44
- package/src/extraction/extraction-ner-function/named-entity-recognition.test.ts +10 -5
- package/src/extraction/extraction.ts +5 -4
- package/src/functions/services.ts +11 -7
- package/src/session/GenericToolkit.ts +130 -0
- package/src/session/format.test.ts +4 -3
- package/src/session/format.ts +4 -5
- package/src/session/index.ts +2 -0
- package/src/session/observer.ts +2 -2
- package/src/session/session.test.ts +2 -2
- package/src/session/session.ts +9 -8
- package/src/session/version-pin.ts +2 -3
- package/src/templates/{format.tpl → instructions/format.tpl} +1 -0
- package/src/templates/system.ts +2 -2
- package/src/types/artifact.ts +20 -1
- package/dist/lib/browser/chunk-CWGVG235.mjs +0 -380
- package/dist/lib/browser/chunk-CWGVG235.mjs.map +0 -7
- package/dist/lib/browser/chunk-UB26N5UF.mjs +0 -89
- package/dist/lib/browser/chunk-UB26N5UF.mjs.map +0 -7
- package/dist/lib/browser/named-entity-recognition-QPYHML66.mjs +0 -13
- package/dist/lib/node-esm/chunk-BCFXTNSK.mjs +0 -91
- package/dist/lib/node-esm/chunk-BCFXTNSK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-OV5PMQPB.mjs +0 -382
- package/dist/lib/node-esm/chunk-OV5PMQPB.mjs.map +0 -7
- package/dist/lib/node-esm/named-entity-recognition-2HDF46YX.mjs +0 -14
- package/dist/types/src/summarization/summarization.test.d.ts +0 -2
- package/dist/types/src/summarization/summarization.test.d.ts.map +0 -1
- package/src/summarization/summarization.test.ts +0 -202
- /package/dist/lib/browser/{named-entity-recognition-QPYHML66.mjs.map → chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/node-esm/{named-entity-recognition-2HDF46YX.mjs.map → chunk-HSLMI22Q.mjs.map} +0 -0
- /package/src/extraction/extraction-llm-function/{instructions.tpl → transcription-instructions.tpl} +0 -0
- /package/src/templates/{system.tpl → instructions/system.tpl} +0 -0
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
import * as Schema from 'effect/Schema';
|
|
2
2
|
import { Expando } from '@dxos/echo/internal';
|
|
3
|
-
import { type FunctionDefinition
|
|
3
|
+
import { type FunctionDefinition } from '@dxos/functions';
|
|
4
|
+
import { type FunctionExecutor } from '@dxos/functions-runtime';
|
|
4
5
|
export declare const ExtractionInput: Schema.Struct<{
|
|
5
6
|
message: import("@dxos/echo/Type").obj<Schema.Struct<{
|
|
6
7
|
id: import("@dxos/keys").ObjectIdClass;
|
|
7
8
|
parentMessage: Schema.optional<import("@dxos/keys").ObjectIdClass>;
|
|
8
9
|
created: Schema.SchemaClass<string, string, never>;
|
|
9
10
|
sender: Schema.mutable<Schema.Struct<{
|
|
10
|
-
contact: Schema.optional<import("@dxos/echo/Type").ref<import("@dxos/echo/Type").obj<Schema.Struct<{
|
|
11
|
+
contact: Schema.optional<import("@dxos/echo/Type").ref<import("@dxos/echo/Type").obj<Schema.extend<Schema.Struct<{
|
|
11
12
|
fullName: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
12
13
|
preferredName: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
13
14
|
nickname: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
14
15
|
image: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
15
16
|
organization: Schema.optional<Schema.Schema<import("@dxos/echo/internal").Ref<import("@dxos/echo/Type").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
16
|
-
id: string;
|
|
17
17
|
description?: string | undefined;
|
|
18
|
+
id: string;
|
|
18
19
|
name?: string | undefined;
|
|
19
20
|
status?: "prospect" | "qualified" | "active" | "commit" | "reject" | undefined;
|
|
20
21
|
image?: string | undefined;
|
|
21
22
|
website?: string | undefined;
|
|
23
|
+
location?: readonly [number, number, (number | undefined)?] | undefined;
|
|
22
24
|
}>, import("@dxos/echo-protocol").EncodedReference, never>>;
|
|
23
25
|
jobTitle: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
24
26
|
department: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
@@ -57,7 +59,9 @@ export declare const ExtractionInput: Schema.Struct<{
|
|
|
57
59
|
label: typeof Schema.String;
|
|
58
60
|
value: typeof Schema.String;
|
|
59
61
|
}>>>>;
|
|
60
|
-
}
|
|
62
|
+
}>, Schema.Struct<{
|
|
63
|
+
location: Schema.optional<Schema.Tuple<[Schema.filter<Schema.transform<Schema.SchemaClass<number, number, never>, Schema.filter<Schema.SchemaClass<number, number, never>>>>, Schema.filter<Schema.transform<Schema.SchemaClass<number, number, never>, Schema.filter<Schema.SchemaClass<number, number, never>>>>, Schema.Element<typeof Schema.Number, "?">]>>;
|
|
64
|
+
}>>>>>;
|
|
61
65
|
identityDid: Schema.optional<typeof Schema.String>;
|
|
62
66
|
identityKey: Schema.optional<typeof Schema.String>;
|
|
63
67
|
email: Schema.optional<typeof Schema.String>;
|
|
@@ -165,18 +169,19 @@ export declare const ExtractionOutput: Schema.Struct<{
|
|
|
165
169
|
parentMessage: Schema.optional<import("@dxos/keys").ObjectIdClass>;
|
|
166
170
|
created: Schema.SchemaClass<string, string, never>;
|
|
167
171
|
sender: Schema.mutable<Schema.Struct<{
|
|
168
|
-
contact: Schema.optional<import("@dxos/echo/Type").ref<import("@dxos/echo/Type").obj<Schema.Struct<{
|
|
172
|
+
contact: Schema.optional<import("@dxos/echo/Type").ref<import("@dxos/echo/Type").obj<Schema.extend<Schema.Struct<{
|
|
169
173
|
fullName: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
170
174
|
preferredName: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
171
175
|
nickname: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
172
176
|
image: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
173
177
|
organization: Schema.optional<Schema.Schema<import("@dxos/echo/internal").Ref<import("@dxos/echo/Type").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
174
|
-
id: string;
|
|
175
178
|
description?: string | undefined;
|
|
179
|
+
id: string;
|
|
176
180
|
name?: string | undefined;
|
|
177
181
|
status?: "prospect" | "qualified" | "active" | "commit" | "reject" | undefined;
|
|
178
182
|
image?: string | undefined;
|
|
179
183
|
website?: string | undefined;
|
|
184
|
+
location?: readonly [number, number, (number | undefined)?] | undefined;
|
|
180
185
|
}>, import("@dxos/echo-protocol").EncodedReference, never>>;
|
|
181
186
|
jobTitle: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
182
187
|
department: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
@@ -215,7 +220,9 @@ export declare const ExtractionOutput: Schema.Struct<{
|
|
|
215
220
|
label: typeof Schema.String;
|
|
216
221
|
value: typeof Schema.String;
|
|
217
222
|
}>>>>;
|
|
218
|
-
}
|
|
223
|
+
}>, Schema.Struct<{
|
|
224
|
+
location: Schema.optional<Schema.Tuple<[Schema.filter<Schema.transform<Schema.SchemaClass<number, number, never>, Schema.filter<Schema.SchemaClass<number, number, never>>>>, Schema.filter<Schema.transform<Schema.SchemaClass<number, number, never>, Schema.filter<Schema.SchemaClass<number, number, never>>>>, Schema.Element<typeof Schema.Number, "?">]>>;
|
|
225
|
+
}>>>>>;
|
|
219
226
|
identityDid: Schema.optional<typeof Schema.String>;
|
|
220
227
|
identityKey: Schema.optional<typeof Schema.String>;
|
|
221
228
|
email: Schema.optional<typeof Schema.String>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extraction.d.ts","sourceRoot":"","sources":["../../../../src/extraction/extraction.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"extraction.d.ts","sourceRoot":"","sources":["../../../../src/extraction/extraction.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAIhE,eAAO,MAAM,eAAe;;;;;;;;;;;;+BAoBJ,CAAC;;wBACG,CAAC;0BAIT,CAAC;yBAKc,CAAA;2BACd,CAAA;4BACL,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAvBf,CAAC;AACH,MAAM,WAAW,eAAgB,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,eAAe,CAAC;CAAG;AAEtF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;+BAQL,CAAC;;wBACG,CAAC;0BAIT,CAAC;yBAKc,CAAA;2BACd,CAAA;4BACL,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAjBf,CAAC;AACH,MAAM,WAAW,gBAAiB,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,gBAAgB,CAAC;CAAG;AAExF,MAAM,MAAM,8BAA8B,GAAG;IAC3C,KAAK,EAAE,eAAe,CAAC;IACvB,QAAQ,EAAE,kBAAkB,CAAC,eAAe,EAAE,gBAAgB,CAAC,CAAC;IAChE,QAAQ,EAAE,gBAAgB,CAAC;IAE3B,OAAO,CAAC,EAAE;QACR;;WAEG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;QAEjB;;;;WAIG;QACH,aAAa,CAAC,EAAE,OAAO,CAAC;KACzB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,kBAAkB,CAAC,eAAe,EAAE,gBAAgB,CAAC,CAAC;AAEvF;;GAEG;AAEH,eAAO,MAAM,wBAAwB,GAAU,QAAQ,8BAA8B,KAAG,OAAO,CAAC,gBAAgB,CAkB/G,CAAC"}
|
|
@@ -2,7 +2,8 @@ import * as Tool from '@effect/ai/Tool';
|
|
|
2
2
|
import type * as Toolkit from '@effect/ai/Toolkit';
|
|
3
3
|
import * as Layer from 'effect/Layer';
|
|
4
4
|
import { ToolExecutionService, ToolResolverService } from '@dxos/ai';
|
|
5
|
-
import { DatabaseService
|
|
5
|
+
import { DatabaseService } from '@dxos/echo-db';
|
|
6
|
+
import { FunctionDefinition, FunctionInvocationService } from '@dxos/functions';
|
|
6
7
|
/**
|
|
7
8
|
* Constructs a `ToolResolverService` whose `resolve(id)` looks up tools in the following order:
|
|
8
9
|
* 1. Toolkit: return an existing tool from the provided `toolkit` if one is present under `id`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../../../src/functions/services.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAGnD,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAItC,OAAO,EAAuB,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAG1F,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,yBAAyB,
|
|
1
|
+
{"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../../../src/functions/services.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAGnD,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAItC,OAAO,EAAuB,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAG1F,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAY,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAG1F;;;;;;;;;;GAUG;AACH,eAAO,MAAM,6BAA6B,GACxC,WAAW,kBAAkB,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,EACzC,SAAS,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,KAC5B,KAAK,CAAC,KAAK,CAAC,mBAAmB,EAAE,KAAK,EAAE,eAAe,CA8BzD,CAAC;AAEF,eAAO,MAAM,qCAAqC,GAChD,SAAS,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,EAC7B,eAAe,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAC1D,KAAK,CAAC,KAAK,CAAC,oBAAoB,EAAE,KAAK,EAAE,yBAAyB,CAoCpE,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type * as Tool from '@effect/ai/Tool';
|
|
2
|
+
import * as Toolkit from '@effect/ai/Toolkit';
|
|
3
|
+
import * as Effect from 'effect/Effect';
|
|
4
|
+
import * as Layer from 'effect/Layer';
|
|
5
|
+
import * as Pipeable from 'effect/Pipeable';
|
|
6
|
+
import type * as Schema from 'effect/Schema';
|
|
7
|
+
import type * as SchemaAST from 'effect/SchemaAST';
|
|
8
|
+
/**
|
|
9
|
+
* Unique identifier for generic toolkit instances.
|
|
10
|
+
*/
|
|
11
|
+
export declare const TypeId = "~@dxos/assistant/GenericToolkit";
|
|
12
|
+
/**
|
|
13
|
+
* Type-level representation of the generic toolkit identifier.
|
|
14
|
+
*/
|
|
15
|
+
export type TypeId = typeof TypeId;
|
|
16
|
+
/**
|
|
17
|
+
* Type-safe way to define toolkits where we don't know specific types of tools,
|
|
18
|
+
* and we want to bundle definition and handlers together.
|
|
19
|
+
*
|
|
20
|
+
* Usefull for plugin-based systems, where tools are dynamically added.
|
|
21
|
+
*
|
|
22
|
+
* @param TR requirements type to the tool invocation.
|
|
23
|
+
* @param E failure type to the handlers layer.
|
|
24
|
+
* @param R requirements type to the handlers layer.
|
|
25
|
+
*/
|
|
26
|
+
export interface GenericToolkit<TR = never, E = never, R = never> extends Pipeable.Pipeable {
|
|
27
|
+
readonly [TypeId]: TypeId;
|
|
28
|
+
/**
|
|
29
|
+
* Toolkit definition.
|
|
30
|
+
*/
|
|
31
|
+
readonly toolkit: Toolkit.Toolkit<GenericTools<TR>>;
|
|
32
|
+
/**
|
|
33
|
+
* Handlers layer.
|
|
34
|
+
*/
|
|
35
|
+
readonly layer: Layer.Layer<unknown, E, R>;
|
|
36
|
+
/**
|
|
37
|
+
* Handlers effect.
|
|
38
|
+
*/
|
|
39
|
+
readonly handlers: Effect.Effect<Toolkit.WithHandler<GenericTools<TR>>, E, R>;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Generic constraint.
|
|
43
|
+
*
|
|
44
|
+
* NOTE: Only use in place of `T extends PortableToolkit.Any`. Not suitable for standalone use.
|
|
45
|
+
*/
|
|
46
|
+
export interface Any {
|
|
47
|
+
readonly [TypeId]: TypeId;
|
|
48
|
+
readonly toolkit: Toolkit.Toolkit<any>;
|
|
49
|
+
readonly layer: Layer.Layer<unknown, any, any>;
|
|
50
|
+
}
|
|
51
|
+
export type InvocationRequirements<T extends Any> = T extends GenericToolkit<infer TR, infer _E, infer _R> ? TR : never;
|
|
52
|
+
export type Failure<T extends Any> = T extends GenericToolkit<infer _TR, infer E, infer _R> ? E : never;
|
|
53
|
+
export type Requirements<T extends Any> = T extends GenericToolkit<infer _TR, infer _E, infer R> ? R : never;
|
|
54
|
+
/**
|
|
55
|
+
* Creates a portable toolkit from toolkit definition and handlers layer.
|
|
56
|
+
*/
|
|
57
|
+
export declare const make: <Tools extends Record<string, Tool.Any>, E, R>(toolkit: Toolkit.Toolkit<Tools>, layer: Layer.Layer<Tool.HandlersFor<Tools>, E, R>) => GenericToolkit<E, R>;
|
|
58
|
+
/**
|
|
59
|
+
* Merges multiple portable toolkits into a single portable toolkit.
|
|
60
|
+
*/
|
|
61
|
+
export declare const merge: <const Toolkits extends ReadonlyArray<Any>>(
|
|
62
|
+
/**
|
|
63
|
+
* The toolkits to merge together.
|
|
64
|
+
*/
|
|
65
|
+
...toolkits: Toolkits) => GenericToolkit<InvocationRequirements<Toolkits[number]>, Failure<Toolkits[number]>, Requirements<Toolkits[number]>>;
|
|
66
|
+
/**
|
|
67
|
+
* Generic tools type where we cannot statically enumerate individual tools.
|
|
68
|
+
*/
|
|
69
|
+
export type GenericTools<R = never> = Record<string, Tool.Tool<string, {
|
|
70
|
+
readonly parameters: AnyStructSchemaNoContext;
|
|
71
|
+
readonly success: Schema.Schema.AnyNoContext;
|
|
72
|
+
readonly failure: typeof Schema.Never;
|
|
73
|
+
}, R>>;
|
|
74
|
+
export interface AnyStructSchemaNoContext extends Pipeable.Pipeable {
|
|
75
|
+
readonly [Schema.TypeId]: any;
|
|
76
|
+
readonly make: any;
|
|
77
|
+
readonly Type: any;
|
|
78
|
+
readonly Encoded: any;
|
|
79
|
+
readonly Context: never;
|
|
80
|
+
readonly ast: SchemaAST.AST;
|
|
81
|
+
readonly fields: Schema.Struct.Fields;
|
|
82
|
+
readonly annotations: any;
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=GenericToolkit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GenericToolkit.d.ts","sourceRoot":"","sources":["../../../../src/session/GenericToolkit.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAC7C,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,KAAK,SAAS,MAAM,kBAAkB,CAAC;AAEnD;;GAEG;AACH,eAAO,MAAM,MAAM,oCAAoC,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC;AAEnC;;;;;;;;;GASG;AACH,MAAM,WAAW,cAAc,CAAC,EAAE,GAAG,KAAK,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,GAAG,KAAK,CAAE,SAAQ,QAAQ,CAAC,QAAQ;IACzF,QAAQ,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC;IAEpD;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAE3C;;OAEG;IACH,QAAQ,CAAC,QAAQ,E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
15
|
+
name?: string | undefined;
|
|
15
16
|
contact?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Type").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
17
|
+
image?: string | undefined;
|
|
16
18
|
fullName?: string | undefined;
|
|
17
19
|
preferredName?: string | undefined;
|
|
18
20
|
nickname?: string | undefined;
|
|
19
|
-
image?: string | undefined;
|
|
20
21
|
organization?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Type").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
21
|
-
id: string;
|
|
22
22
|
description?: string | undefined;
|
|
23
|
+
id: string;
|
|
23
24
|
name?: string | undefined;
|
|
24
25
|
status?: "prospect" | "qualified" | "active" | "commit" | "reject" | undefined;
|
|
25
26
|
image?: string | undefined;
|
|
26
27
|
website?: string | undefined;
|
|
28
|
+
location?: readonly [number, number, (number | undefined)?] | undefined;
|
|
27
29
|
}> | undefined;
|
|
28
30
|
jobTitle?: string | undefined;
|
|
29
31
|
department?: string | undefined;
|
|
30
32
|
notes?: string | undefined;
|
|
31
33
|
emails?: {
|
|
32
|
-
readonly label?: string | undefined;
|
|
33
34
|
readonly value: string;
|
|
35
|
+
readonly label?: string | undefined;
|
|
34
36
|
}[] | undefined;
|
|
35
37
|
identities?: {
|
|
36
|
-
readonly label?: string | undefined;
|
|
37
38
|
readonly value: string;
|
|
39
|
+
readonly label?: string | undefined;
|
|
38
40
|
}[] | undefined;
|
|
39
41
|
phoneNumbers?: {
|
|
40
|
-
readonly label?: string | undefined;
|
|
41
42
|
readonly value: string;
|
|
43
|
+
readonly label?: string | undefined;
|
|
42
44
|
}[] | undefined;
|
|
43
45
|
addresses?: {
|
|
44
|
-
readonly label?: string | undefined;
|
|
45
46
|
readonly value: {
|
|
46
47
|
readonly street?: string | undefined;
|
|
47
48
|
readonly extended?: string | undefined;
|
|
@@ -51,22 +52,23 @@ export declare const formatUserPrompt: ({ prompt, history }: Pick<AiSessionRunPa
|
|
|
51
52
|
readonly postOfficeBoxNumber?: string | undefined;
|
|
52
53
|
readonly country?: string | undefined;
|
|
53
54
|
};
|
|
55
|
+
readonly label?: string | undefined;
|
|
54
56
|
}[] | undefined;
|
|
55
57
|
urls?: {
|
|
56
|
-
readonly label?: string | undefined;
|
|
57
58
|
readonly value: string;
|
|
59
|
+
readonly label?: string | undefined;
|
|
58
60
|
}[] | undefined;
|
|
59
61
|
birthday?: string | undefined;
|
|
60
62
|
fields?: {
|
|
61
|
-
readonly label: string;
|
|
62
63
|
readonly value: string;
|
|
64
|
+
readonly label: string;
|
|
63
65
|
readonly category?: string | undefined;
|
|
64
66
|
}[] | undefined;
|
|
67
|
+
location?: readonly [number, number, (number | undefined)?] | undefined;
|
|
65
68
|
}> | undefined;
|
|
66
69
|
identityDid?: string | undefined;
|
|
67
70
|
identityKey?: string | undefined;
|
|
68
71
|
email?: string | undefined;
|
|
69
|
-
name?: string | undefined;
|
|
70
72
|
role?: "user" | "assistant" | "tool" | undefined;
|
|
71
73
|
};
|
|
72
74
|
blocks: ({
|
|
@@ -75,10 +77,10 @@ export declare const formatUserPrompt: ({ prompt, history }: Pick<AiSessionRunPa
|
|
|
75
77
|
pending?: boolean | undefined;
|
|
76
78
|
objectId: string;
|
|
77
79
|
} | {
|
|
78
|
-
name?: string | undefined;
|
|
79
80
|
_tag: "file";
|
|
80
81
|
pending?: boolean | undefined;
|
|
81
82
|
url: string;
|
|
83
|
+
name?: string | undefined;
|
|
82
84
|
mediaType?: string | undefined;
|
|
83
85
|
} | {
|
|
84
86
|
id?: string | undefined;
|
|
@@ -147,16 +149,16 @@ export declare const formatUserPrompt: ({ prompt, history }: Pick<AiSessionRunPa
|
|
|
147
149
|
_tag: "toolkit";
|
|
148
150
|
pending?: boolean | undefined;
|
|
149
151
|
} | {
|
|
150
|
-
name: string;
|
|
151
152
|
_tag: "toolCall";
|
|
152
153
|
pending?: boolean | undefined;
|
|
154
|
+
name: string;
|
|
153
155
|
toolCallId: string;
|
|
154
156
|
input: string;
|
|
155
157
|
providerExecuted: boolean;
|
|
156
158
|
} | {
|
|
157
|
-
name: string;
|
|
158
159
|
_tag: "toolResult";
|
|
159
160
|
pending?: boolean | undefined;
|
|
161
|
+
name: string;
|
|
160
162
|
toolCallId: string;
|
|
161
163
|
providerExecuted: boolean;
|
|
162
164
|
result?: string | undefined;
|
|
@@ -171,13 +173,11 @@ export declare const formatUserPrompt: ({ prompt, history }: Pick<AiSessionRunPa
|
|
|
171
173
|
[x: string]: any;
|
|
172
174
|
} | undefined;
|
|
173
175
|
}>, {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
+
code: "AI_ASSISTANT_ERROR";
|
|
177
|
+
context: Record<string, unknown>;
|
|
176
178
|
readonly name: "AI_ASSISTANT_ERROR";
|
|
177
179
|
readonly message: string;
|
|
178
|
-
readonly code: "AI_ASSISTANT_ERROR";
|
|
179
180
|
readonly _tag: "AI_ASSISTANT_ERROR";
|
|
180
|
-
readonly context: Record<string, unknown>;
|
|
181
181
|
stack?: string;
|
|
182
182
|
cause?: unknown;
|
|
183
183
|
}, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../../src/session/format.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../../src/session/format.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAexC,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAEpD;;GAEG;AAEH,eAAO,MAAM,kBAAkB,GAAI,kCAIhC,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,EAAE,QAAQ,GAAG,YAAY,GAAG,SAAS,CAAC,wCAsCjE,CAAC;AAEL;;GAEG;AAGH,eAAO,MAAM,gBAAgB,GAAI,qBAA0B,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAoC1G,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/session/index.ts"],"names":[],"mappings":"AAIA,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/session/index.ts"],"names":[],"mappings":"AAIA,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAE9B,OAAO,KAAK,cAAc,MAAM,kBAAkB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Effect from 'effect/Effect';
|
|
2
2
|
import { type AiParser, type ConsolePrinter } from '@dxos/ai';
|
|
3
|
-
import { type
|
|
3
|
+
import { type Message } from '@dxos/types';
|
|
4
4
|
/**
|
|
5
5
|
* Live observer of the generation process.
|
|
6
6
|
*/
|
|
@@ -9,7 +9,7 @@ export interface GenerationObserver extends AiParser.ParseResponseCallbacks {
|
|
|
9
9
|
* Complete messages fired during the session, both from the model and from the user.
|
|
10
10
|
* This message will contain all message blocks emitted through the `onBlock` callback.
|
|
11
11
|
*/
|
|
12
|
-
onMessage: (message:
|
|
12
|
+
onMessage: (message: Message.Message) => Effect.Effect<void>;
|
|
13
13
|
}
|
|
14
14
|
export declare const GenerationObserver: Readonly<{
|
|
15
15
|
make: ({ onBegin, onPart, onBlock, onEnd, onMessage, }?: Partial<GenerationObserver>) => GenerationObserver;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observer.d.ts","sourceRoot":"","sources":["../../../../src/session/observer.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC;AAC9D,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"observer.d.ts","sourceRoot":"","sources":["../../../../src/session/observer.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC;AAC9D,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,QAAQ,CAAC,sBAAsB;IACzE;;;OAGG;IACH,SAAS,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,KAAK,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;CAC9D;AAED,eAAO,MAAM,kBAAkB;6DAO1B,OAAO,CAAC,kBAAkB,CAAC,KAAQ,kBAAkB;;IAUxD;;OAEG;2BACoB,cAAc;EAiBrC,CAAC"}
|
|
@@ -8,7 +8,7 @@ import { type AiToolNotFoundError, type PromptPreprocessingError, type ToolExecu
|
|
|
8
8
|
import { type Blueprint } from '@dxos/blueprints';
|
|
9
9
|
import { Obj } from '@dxos/echo';
|
|
10
10
|
import { TracingService } from '@dxos/functions';
|
|
11
|
-
import {
|
|
11
|
+
import { Message } from '@dxos/types';
|
|
12
12
|
import { type AiAssistantError } from '../errors';
|
|
13
13
|
import { GenerationObserver } from './observer';
|
|
14
14
|
export type AiSessionRunError = AiError.AiError | PromptPreprocessingError | AiToolNotFoundError | AiAssistantError;
|
|
@@ -16,7 +16,7 @@ export type AiSessionRunRequirements = LanguageModel.LanguageModel | ToolExecuti
|
|
|
16
16
|
export type AiSessionRunParams<Tools extends Record<string, Tool.Any>> = {
|
|
17
17
|
prompt: string;
|
|
18
18
|
system?: string;
|
|
19
|
-
history?:
|
|
19
|
+
history?: Message.Message[];
|
|
20
20
|
objects?: Obj.Any[];
|
|
21
21
|
blueprints?: Blueprint.Blueprint[];
|
|
22
22
|
toolkit?: Toolkit.WithHandler<Tools>;
|
|
@@ -42,7 +42,7 @@ export declare class AiSession {
|
|
|
42
42
|
/** Pending messages for this session (incl. the current prompt). */
|
|
43
43
|
private _pending;
|
|
44
44
|
constructor(_options?: AiSessionOptions);
|
|
45
|
-
run: <Tools extends Record<string, Tool.Any>>({ prompt, system: systemTemplate, history, objects, blueprints, toolkit, observer, }: AiSessionRunParams<Tools>) => Effect.Effect<
|
|
45
|
+
run: <Tools extends Record<string, Tool.Any>>({ prompt, system: systemTemplate, history, objects, blueprints, toolkit, observer, }: AiSessionRunParams<Tools>) => Effect.Effect<Message.Message[], AiSessionRunError, AiSessionRunRequirements>;
|
|
46
46
|
/**
|
|
47
47
|
* @deprecated
|
|
48
48
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../../src/session/session.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,OAAO,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,aAAa,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAC7C,OAAO,KAAK,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAEnD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAC;AAG7C,OAAO,EAGL,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EAG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
2
2
|
import { type AnyEchoObject } from '@dxos/echo/internal';
|
|
3
3
|
import { type ObjectVersion } from '@dxos/echo-db';
|
|
4
|
-
import { type ContentBlock } from '@dxos/
|
|
4
|
+
import { type ContentBlock } from '@dxos/types';
|
|
5
5
|
declare const VersionPinSchema: Schema.Struct<{
|
|
6
6
|
objectId: import("@dxos/keys").ObjectIdClass;
|
|
7
7
|
version: Schema.Schema<ObjectVersion, ObjectVersion, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-pin.d.ts","sourceRoot":"","sources":["../../../../src/session/version-pin.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,KAAK,aAAa,EAAY,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,KAAK,aAAa,
|
|
1
|
+
{"version":3,"file":"version-pin.d.ts","sourceRoot":"","sources":["../../../../src/session/version-pin.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,KAAK,aAAa,EAAY,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,KAAK,aAAa,EAAc,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAKhD,QAAA,MAAM,gBAAgB;;;EAKpB,CAAC;AAEH;;;GAGG;AACH,MAAM,WAAW,UAAW,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,gBAAgB,CAAC;CAAG;AAElF,eAAO,MAAM,UAAU,EAAE,OAAO,gBAAgB,GAAG;IACjD,WAAW,EAAE,aAAa,CAAC;IAC3B,UAAU,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,UAAU,CAAC;IAClD,WAAW,EAAE,CAAC,GAAG,EAAE,UAAU,KAAK,YAAY,CAAC,GAAG,CAAC;CAiBpD,CAAC"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import type * as Effect from 'effect/Effect';
|
|
1
2
|
import * as Schema from 'effect/Schema';
|
|
3
|
+
import { type ObjectNotFoundError, type Type } from '@dxos/echo';
|
|
2
4
|
import { type ObjectId } from '@dxos/echo/internal';
|
|
5
|
+
import { DatabaseService } from '@dxos/echo-db';
|
|
3
6
|
import { DXN, type SpaceId } from '@dxos/keys';
|
|
4
7
|
/**
|
|
5
8
|
* @deprecated
|
|
@@ -11,6 +14,7 @@ export declare const createArtifactElement: (id: ObjectId) => string;
|
|
|
11
14
|
*/
|
|
12
15
|
export declare const ArtifactId: Schema.Schema<string> & {
|
|
13
16
|
toDXN: (reference: ArtifactId, owningSpaceId?: SpaceId) => DXN;
|
|
17
|
+
resolve: <S extends Type.Obj.Any | Type.Relation.Any>(schema: S, ref: ArtifactId) => Effect.Effect<Schema.Schema.Type<S>, ObjectNotFoundError, DatabaseService>;
|
|
14
18
|
};
|
|
15
19
|
export type ArtifactId = Schema.Schema.Type<typeof ArtifactId>;
|
|
16
20
|
//# sourceMappingURL=artifact.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artifact.d.ts","sourceRoot":"","sources":["../../../../src/types/artifact.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,GAAG,EAAmB,KAAK,OAAO,EAAE,MAAM,YAAY,CAAC;AAGhE;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAAI,IAAI,QAAQ,WAA4B,CAAC;AAE/E;;;GAGG;AAEH,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG;IAC/C,KAAK,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,aAAa,CAAC,EAAE,OAAO,KAAK,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"artifact.d.ts","sourceRoot":"","sources":["../../../../src/types/artifact.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