@dxos/assistant 0.8.3 → 0.8.4-main.28f8d3d
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-6WRGDEMH.mjs +89 -0
- package/dist/lib/browser/chunk-6WRGDEMH.mjs.map +7 -0
- package/dist/lib/browser/chunk-NZGGCEF3.mjs +341 -0
- package/dist/lib/browser/chunk-NZGGCEF3.mjs.map +7 -0
- package/dist/lib/browser/extraction/index.mjs +269 -0
- package/dist/lib/browser/extraction/index.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +306 -2110
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/named-entity-recognition-O46UTCLR.mjs +13 -0
- package/dist/lib/browser/named-entity-recognition-O46UTCLR.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-3UU5V4FS.mjs +91 -0
- package/dist/lib/node-esm/chunk-3UU5V4FS.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-XOOPGSGW.mjs +343 -0
- package/dist/lib/node-esm/chunk-XOOPGSGW.mjs.map +7 -0
- package/dist/lib/node-esm/extraction/index.mjs +270 -0
- package/dist/lib/node-esm/extraction/index.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +305 -2110
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/named-entity-recognition-W4VMRCH6.mjs +14 -0
- package/dist/lib/node-esm/named-entity-recognition-W4VMRCH6.mjs.map +7 -0
- package/dist/types/src/conversation/context.d.ts +90 -0
- package/dist/types/src/conversation/context.d.ts.map +1 -0
- package/dist/types/src/conversation/conversation.d.ts +50 -0
- package/dist/types/src/conversation/conversation.d.ts.map +1 -0
- package/dist/types/src/conversation/index.d.ts +3 -0
- package/dist/types/src/conversation/index.d.ts.map +1 -0
- package/dist/types/src/errors.d.ts +39 -0
- package/dist/types/src/errors.d.ts.map +1 -0
- 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 +151 -53
- package/dist/types/src/extraction/extraction-ner-function/extraction-ner-function.d.ts.map +1 -1
- package/dist/types/src/extraction/extraction-ner-function/named-entity-recognition.d.ts +1 -1
- package/dist/types/src/extraction/extraction-ner-function/named-entity-recognition.d.ts.map +1 -1
- package/dist/types/src/extraction/extraction.d.ts +106 -44
- package/dist/types/src/extraction/extraction.d.ts.map +1 -1
- package/dist/types/src/functions/index.d.ts +2 -0
- package/dist/types/src/functions/index.d.ts.map +1 -0
- package/dist/types/src/functions/services.d.ts +7 -0
- package/dist/types/src/functions/services.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +4 -3
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/session/artifact-diff.d.ts +27 -0
- package/dist/types/src/session/artifact-diff.d.ts.map +1 -0
- package/dist/types/src/session/format.d.ts +168 -0
- package/dist/types/src/session/format.d.ts.map +1 -0
- package/dist/types/src/session/format.test.d.ts +2 -0
- package/dist/types/src/session/format.test.d.ts.map +1 -0
- 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/session.d.ts +125 -219
- package/dist/types/src/session/session.d.ts.map +1 -1
- package/dist/types/src/session/version-pin.d.ts +4 -4
- package/dist/types/src/session/version-pin.d.ts.map +1 -1
- package/dist/types/src/templates/index.d.ts +2 -0
- package/dist/types/src/templates/index.d.ts.map +1 -0
- package/dist/types/src/templates/system.d.ts +22 -0
- package/dist/types/src/templates/system.d.ts.map +1 -0
- package/dist/types/src/types.d.ts +13 -0
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +46 -31
- package/src/conversation/context.ts +133 -0
- package/src/conversation/conversation.ts +125 -0
- package/src/conversation/index.ts +6 -0
- package/src/errors.ts +10 -0
- package/src/extraction/extraction-llm-function/extraction-llm-function.test.ts +7 -18
- package/src/extraction/extraction-llm-function/extraction-llm-function.ts +23 -17
- package/src/extraction/extraction-ner-function/extraction-ner-function.test.ts +4 -3
- package/src/extraction/extraction-ner-function/extraction-ner-function.ts +7 -4
- package/src/extraction/extraction-ner-function/named-entity-recognition.test.ts +2 -2
- package/src/extraction/extraction-ner-function/named-entity-recognition.ts +1 -1
- package/src/extraction/quotes.test.ts +1 -1
- package/src/extraction/quotes.ts +1 -1
- package/src/functions/index.ts +5 -0
- package/src/functions/services.ts +114 -0
- package/src/index.ts +4 -3
- package/src/session/__snapshots__/session.test.ts.snap +32 -0
- package/src/session/artifact-diff.ts +37 -0
- package/src/session/format.test.ts +60 -0
- package/src/session/format.ts +139 -0
- package/src/session/index.ts +1 -0
- package/src/session/session.test.ts +95 -19
- package/src/session/session.ts +224 -494
- package/src/session/version-pin.test.ts +2 -21
- package/src/session/version-pin.ts +9 -9
- package/src/summarization/summarization.test.ts +82 -106
- package/src/templates/format.tpl +55 -0
- package/src/templates/index.ts +5 -0
- package/src/templates/system.tpl +47 -0
- package/src/templates/system.ts +32 -0
- package/src/types.ts +45 -1
- package/src/typings.d.ts +5 -0
- package/dist/lib/node/index.cjs +0 -2178
- package/dist/lib/node/index.cjs.map +0 -7
- package/dist/lib/node/meta.json +0 -1
- package/dist/types/bin/chat.d.ts +0 -2
- package/dist/types/bin/chat.d.ts.map +0 -1
- package/dist/types/src/blueprint/ai.test.d.ts +0 -2
- package/dist/types/src/blueprint/ai.test.d.ts.map +0 -1
- package/dist/types/src/blueprint/blueprint.d.ts +0 -55
- package/dist/types/src/blueprint/blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprint/blueprint.test.d.ts +0 -2
- package/dist/types/src/blueprint/blueprint.test.d.ts.map +0 -1
- package/dist/types/src/blueprint/index.d.ts +0 -4
- package/dist/types/src/blueprint/index.d.ts.map +0 -1
- package/dist/types/src/blueprint/logger.d.ts +0 -25
- package/dist/types/src/blueprint/logger.d.ts.map +0 -1
- package/dist/types/src/blueprint/machine.d.ts +0 -143
- package/dist/types/src/blueprint/machine.d.ts.map +0 -1
- package/dist/types/src/blueprint/test-data.d.ts +0 -3
- package/dist/types/src/blueprint/test-data.d.ts.map +0 -1
- package/dist/types/src/research/exa.d.ts +0 -7
- package/dist/types/src/research/exa.d.ts.map +0 -1
- package/dist/types/src/research/graph.d.ts +0 -41
- package/dist/types/src/research/graph.d.ts.map +0 -1
- package/dist/types/src/research/graph.test.d.ts +0 -2
- package/dist/types/src/research/graph.test.d.ts.map +0 -1
- package/dist/types/src/research/index.d.ts +0 -4
- package/dist/types/src/research/index.d.ts.map +0 -1
- package/dist/types/src/research/research.d.ts +0 -10
- package/dist/types/src/research/research.d.ts.map +0 -1
- package/dist/types/src/research/research.test.d.ts +0 -2
- package/dist/types/src/research/research.test.d.ts.map +0 -1
- package/dist/types/src/testing/exa-search-1748337321991.d.ts +0 -38
- package/dist/types/src/testing/exa-search-1748337321991.d.ts.map +0 -1
- package/dist/types/src/testing/exa-search-1748337331526.d.ts +0 -37
- package/dist/types/src/testing/exa-search-1748337331526.d.ts.map +0 -1
- package/dist/types/src/testing/exa-search-1748337344119.d.ts +0 -58
- package/dist/types/src/testing/exa-search-1748337344119.d.ts.map +0 -1
- package/dist/types/src/testing/index.d.ts +0 -3
- package/dist/types/src/testing/index.d.ts.map +0 -1
- package/src/blueprint/ai.test.ts +0 -156
- package/src/blueprint/blueprint.test.ts +0 -151
- package/src/blueprint/blueprint.ts +0 -75
- package/src/blueprint/index.ts +0 -7
- package/src/blueprint/logger.ts +0 -155
- package/src/blueprint/machine.ts +0 -251
- package/src/blueprint/test-data.ts +0 -55
- package/src/research/exa.ts +0 -100
- package/src/research/graph.test.ts +0 -15
- package/src/research/graph.ts +0 -337
- package/src/research/index.ts +0 -7
- package/src/research/instructions-research.tpl +0 -97
- package/src/research/research.test.ts +0 -190
- package/src/research/research.ts +0 -89
- package/src/testing/exa-search-1748337321991.ts +0 -131
- package/src/testing/exa-search-1748337331526.ts +0 -144
- package/src/testing/exa-search-1748337344119.ts +0 -133
- package/src/testing/index.ts +0 -11
- package/src/typedefs.d.ts +0 -8
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Context } from 'effect';
|
|
2
|
+
import { type ObjectVersion } from '@dxos/echo-db';
|
|
3
|
+
import { type ObjectId } from '@dxos/echo-schema';
|
|
4
|
+
declare const ArtifactDiffResolver_base: Context.TagClass<ArtifactDiffResolver, "@dxos/assistant/ArtifactDiffResolver", ArtifactDiffResolver.Service>;
|
|
5
|
+
/**
|
|
6
|
+
* Resolves artifact ids to their versions.
|
|
7
|
+
* Used to give the model a sense of the changes to the artifacts made by users during the conversation.
|
|
8
|
+
* The artifacts versions are pinned in the history, and whenever the artifact changes in-between assistant's steps,
|
|
9
|
+
* a diff is inserted into the conversation.
|
|
10
|
+
*
|
|
11
|
+
* Can be optionally provided to the session run call.
|
|
12
|
+
*/
|
|
13
|
+
export declare class ArtifactDiffResolver extends ArtifactDiffResolver_base {
|
|
14
|
+
}
|
|
15
|
+
export declare namespace ArtifactDiffResolver {
|
|
16
|
+
type Service = {
|
|
17
|
+
resolve: (artifacts: {
|
|
18
|
+
id: ObjectId;
|
|
19
|
+
lastVersion: ObjectVersion;
|
|
20
|
+
}[]) => Promise<Map<ObjectId, {
|
|
21
|
+
version: ObjectVersion;
|
|
22
|
+
diff?: string;
|
|
23
|
+
}>>;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=artifact-diff.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"artifact-diff.d.ts","sourceRoot":"","sources":["../../../../src/session/artifact-diff.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEjC,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;;AAElD;;;;;;;GAOG;AAGH,qBAAa,oBAAqB,SAAQ,yBAGvC;CAAG;AAEN,yBAAiB,oBAAoB,CAAC;IACpC,KAAY,OAAO,GAAG;QACpB,OAAO,EAAE,CAAC,SAAS,EAAE;YAAE,EAAE,EAAE,QAAQ,CAAC;YAAC,WAAW,EAAE,aAAa,CAAA;SAAE,EAAE,KAAK,OAAO,CAC7E,GAAG,CACD,QAAQ,EACR;YACE,OAAO,EAAE,aAAa,CAAC;YACvB,IAAI,CAAC,EAAE,MAAM,CAAC;SACf,CACF,CACF,CAAC;KACH,CAAC;CACH"}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { Effect } from 'effect';
|
|
2
|
+
import { type SessionRunParams } from './session';
|
|
3
|
+
/**
|
|
4
|
+
* Formats the system prompt.
|
|
5
|
+
*/
|
|
6
|
+
export declare const formatSystemPrompt: ({ system, blueprints, objects, }: Pick<SessionRunParams<any>, "system" | "blueprints" | "objects">) => Effect.Effect<string, never, never>;
|
|
7
|
+
/**
|
|
8
|
+
* Formats the user prompt.
|
|
9
|
+
*/
|
|
10
|
+
export declare const formatUserPrompt: ({ prompt, history }: Pick<SessionRunParams<any>, "prompt" | "history">) => Effect.Effect<import("@dxos/live-object").Live<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
|
|
11
|
+
id: string;
|
|
12
|
+
parentMessage?: string | undefined;
|
|
13
|
+
created: string;
|
|
14
|
+
sender: {
|
|
15
|
+
name?: string | undefined;
|
|
16
|
+
contact?: import("@dxos/echo-schema").Ref<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
|
|
17
|
+
fields?: {
|
|
18
|
+
readonly value: string;
|
|
19
|
+
readonly category?: string | undefined;
|
|
20
|
+
readonly label: string;
|
|
21
|
+
}[] | undefined;
|
|
22
|
+
image?: string | undefined;
|
|
23
|
+
fullName?: string | undefined;
|
|
24
|
+
preferredName?: string | undefined;
|
|
25
|
+
nickname?: string | undefined;
|
|
26
|
+
organization?: import("@dxos/echo-schema").Ref<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
|
|
27
|
+
id: string;
|
|
28
|
+
name?: string | undefined;
|
|
29
|
+
description?: string | undefined;
|
|
30
|
+
status?: "prospect" | "qualified" | "active" | "commit" | "reject" | undefined;
|
|
31
|
+
image?: string | undefined;
|
|
32
|
+
website?: string | undefined;
|
|
33
|
+
}> | undefined;
|
|
34
|
+
jobTitle?: string | undefined;
|
|
35
|
+
department?: string | undefined;
|
|
36
|
+
notes?: string | undefined;
|
|
37
|
+
emails?: {
|
|
38
|
+
readonly value: string;
|
|
39
|
+
readonly label?: string | undefined;
|
|
40
|
+
}[] | undefined;
|
|
41
|
+
identities?: {
|
|
42
|
+
readonly value: string;
|
|
43
|
+
readonly label?: string | undefined;
|
|
44
|
+
}[] | undefined;
|
|
45
|
+
phoneNumbers?: {
|
|
46
|
+
readonly value: string;
|
|
47
|
+
readonly label?: string | undefined;
|
|
48
|
+
}[] | undefined;
|
|
49
|
+
addresses?: {
|
|
50
|
+
readonly value: {
|
|
51
|
+
readonly street?: string | undefined;
|
|
52
|
+
readonly extended?: string | undefined;
|
|
53
|
+
readonly locality?: string | undefined;
|
|
54
|
+
readonly region?: string | undefined;
|
|
55
|
+
readonly postalCode?: string | undefined;
|
|
56
|
+
readonly postOfficeBoxNumber?: string | undefined;
|
|
57
|
+
readonly country?: string | undefined;
|
|
58
|
+
};
|
|
59
|
+
readonly label?: string | undefined;
|
|
60
|
+
}[] | undefined;
|
|
61
|
+
urls?: {
|
|
62
|
+
readonly value: string;
|
|
63
|
+
readonly label?: string | undefined;
|
|
64
|
+
}[] | undefined;
|
|
65
|
+
birthday?: string | undefined;
|
|
66
|
+
}> | undefined;
|
|
67
|
+
identityDid?: string | undefined;
|
|
68
|
+
identityKey?: string | undefined;
|
|
69
|
+
email?: string | undefined;
|
|
70
|
+
role?: "user" | "assistant" | undefined;
|
|
71
|
+
};
|
|
72
|
+
blocks: ({
|
|
73
|
+
version: unknown;
|
|
74
|
+
_tag: "anchor";
|
|
75
|
+
pending?: boolean | undefined;
|
|
76
|
+
objectId: string;
|
|
77
|
+
} | {
|
|
78
|
+
name?: string | undefined;
|
|
79
|
+
_tag: "file";
|
|
80
|
+
pending?: boolean | undefined;
|
|
81
|
+
url: string;
|
|
82
|
+
mediaType?: string | undefined;
|
|
83
|
+
} | {
|
|
84
|
+
source?: {
|
|
85
|
+
mediaType: string;
|
|
86
|
+
type: "base64";
|
|
87
|
+
data: string;
|
|
88
|
+
} | {
|
|
89
|
+
url: string;
|
|
90
|
+
type: "http";
|
|
91
|
+
} | undefined;
|
|
92
|
+
id?: string | undefined;
|
|
93
|
+
_tag: "image";
|
|
94
|
+
pending?: boolean | undefined;
|
|
95
|
+
} | {
|
|
96
|
+
_tag: "json";
|
|
97
|
+
pending?: boolean | undefined;
|
|
98
|
+
data: string;
|
|
99
|
+
disposition?: string | undefined;
|
|
100
|
+
} | {
|
|
101
|
+
text: string;
|
|
102
|
+
_tag: "proposal";
|
|
103
|
+
pending?: boolean | undefined;
|
|
104
|
+
} | {
|
|
105
|
+
_tag: "reasoning";
|
|
106
|
+
pending?: boolean | undefined;
|
|
107
|
+
reasoningText?: string | undefined;
|
|
108
|
+
redactedText?: string | undefined;
|
|
109
|
+
signature?: string | undefined;
|
|
110
|
+
} | {
|
|
111
|
+
reference: import("@dxos/echo-schema").Ref<import("@dxos/echo/Type").Expando>;
|
|
112
|
+
_tag: "reference";
|
|
113
|
+
pending?: boolean | undefined;
|
|
114
|
+
} | {
|
|
115
|
+
_tag: "select";
|
|
116
|
+
pending?: boolean | undefined;
|
|
117
|
+
options: readonly string[];
|
|
118
|
+
} | {
|
|
119
|
+
_tag: "status";
|
|
120
|
+
pending?: boolean | undefined;
|
|
121
|
+
statusText: string;
|
|
122
|
+
} | {
|
|
123
|
+
text: string;
|
|
124
|
+
_tag: "suggest";
|
|
125
|
+
pending?: boolean | undefined;
|
|
126
|
+
} | {
|
|
127
|
+
text: string;
|
|
128
|
+
_tag: "text";
|
|
129
|
+
pending?: boolean | undefined;
|
|
130
|
+
disposition?: string | undefined;
|
|
131
|
+
mimeType?: string | undefined;
|
|
132
|
+
} | {
|
|
133
|
+
_tag: "toolkit";
|
|
134
|
+
pending?: boolean | undefined;
|
|
135
|
+
} | {
|
|
136
|
+
name: string;
|
|
137
|
+
_tag: "toolCall";
|
|
138
|
+
pending?: boolean | undefined;
|
|
139
|
+
toolCallId: string;
|
|
140
|
+
input: unknown;
|
|
141
|
+
} | {
|
|
142
|
+
name: string;
|
|
143
|
+
_tag: "toolResult";
|
|
144
|
+
pending?: boolean | undefined;
|
|
145
|
+
toolCallId: string;
|
|
146
|
+
result: unknown;
|
|
147
|
+
error?: string | undefined;
|
|
148
|
+
} | {
|
|
149
|
+
text: string;
|
|
150
|
+
_tag: "transcript";
|
|
151
|
+
pending?: boolean | undefined;
|
|
152
|
+
started: string;
|
|
153
|
+
})[];
|
|
154
|
+
properties?: {
|
|
155
|
+
[x: string]: any;
|
|
156
|
+
} | undefined;
|
|
157
|
+
}>, {
|
|
158
|
+
#code: "AI_ASSISTANT_ERROR";
|
|
159
|
+
#context: Record<string, unknown>;
|
|
160
|
+
readonly name: "AI_ASSISTANT_ERROR";
|
|
161
|
+
readonly code: "AI_ASSISTANT_ERROR";
|
|
162
|
+
readonly _tag: "AI_ASSISTANT_ERROR";
|
|
163
|
+
readonly context: Record<string, unknown>;
|
|
164
|
+
message: string;
|
|
165
|
+
stack?: string;
|
|
166
|
+
cause?: unknown;
|
|
167
|
+
}, never>;
|
|
168
|
+
//# sourceMappingURL=format.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../../src/session/format.ts"],"names":[],"mappings":"AAIA,OAAO,EAAS,MAAM,EAAgB,MAAM,QAAQ,CAAC;AAcrD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAElD;;GAEG;AAEH,eAAO,MAAM,kBAAkB,GAAI,kCAIhC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,EAAE,QAAQ,GAAG,YAAY,GAAG,SAAS,CAAC,wCAsC/D,CAAC;AAEL;;GAEG;AAGH,eAAO,MAAM,gBAAgB,GAAI,qBAA0B,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAoCxG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.test.d.ts","sourceRoot":"","sources":["../../../../src/session/format.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/session/index.ts"],"names":[],"mappings":"AAIA,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,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC"}
|
|
@@ -1,261 +1,167 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { type
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { type
|
|
1
|
+
import { type AiError, AiLanguageModel, type AiResponse, type AiTool, AiToolkit } from '@effect/ai';
|
|
2
|
+
import { Effect, Option, Queue, type Schema } from 'effect';
|
|
3
|
+
import { type AiInputPreprocessingError, type AiToolNotFoundError, type ConsolePrinter, ToolExecutionService, ToolResolverService } from '@dxos/ai';
|
|
4
|
+
import { type Blueprint } from '@dxos/blueprints';
|
|
5
|
+
import { Obj } from '@dxos/echo';
|
|
6
|
+
import { type ContentBlock, DataType } from '@dxos/schema';
|
|
7
|
+
import { type AiAssistantError } from '../errors';
|
|
8
|
+
export type AiSessionOptions = {};
|
|
7
9
|
/**
|
|
8
|
-
*
|
|
9
|
-
* Current context means the state of the app, time of day, and other contextual information.
|
|
10
|
-
* It makes requests to the model, its a state machine.
|
|
11
|
-
* It keeps track of the current goal.
|
|
12
|
-
* It manages the context window.
|
|
13
|
-
* Tracks the success criteria of reaching the goal, exposing metrics (stretch)
|
|
14
|
-
* Could be run locally in the app or remotely.
|
|
15
|
-
* Could be personal or shared.
|
|
16
|
-
*/
|
|
17
|
-
/**
|
|
18
|
-
* Resolves artifact ids to their versions.
|
|
19
|
-
* Used to give the model a sense of the changes to the artifacts made by users during the conversation.
|
|
20
|
-
* The artifacts versions are pinned in the history, and whenever the artifact changes in-between assistant's steps,
|
|
21
|
-
* a diff is inserted into the conversation.
|
|
10
|
+
* Live observer of the generation process.
|
|
22
11
|
*/
|
|
23
|
-
export
|
|
24
|
-
id: ObjectId;
|
|
25
|
-
lastVersion: ObjectVersion;
|
|
26
|
-
}[]) => Promise<Map<ObjectId, {
|
|
27
|
-
version: ObjectVersion;
|
|
28
|
-
diff?: string;
|
|
29
|
-
}>>;
|
|
30
|
-
export type SessionRunOptions = {
|
|
31
|
-
client: AiServiceClient;
|
|
32
|
-
artifacts: ArtifactDefinition[];
|
|
12
|
+
export interface GenerationObserver {
|
|
33
13
|
/**
|
|
34
|
-
*
|
|
14
|
+
* Unparsed content block parts from the model.
|
|
35
15
|
*/
|
|
36
|
-
|
|
37
|
-
history: Message[];
|
|
38
|
-
prompt: string;
|
|
39
|
-
generationOptions?: Pick<GenerateRequest, 'model'>;
|
|
40
|
-
extensions?: ToolContextExtensions;
|
|
41
|
-
systemPrompt?: string;
|
|
16
|
+
onPart: (part: AiResponse.Part) => Effect.Effect<void>;
|
|
42
17
|
/**
|
|
43
|
-
*
|
|
18
|
+
* Parsed content blocks from the model.
|
|
19
|
+
* NOTE: Use block.pending to determine if the block was completed.
|
|
20
|
+
* For each block this will be called 0..n times with a pending block and then once with the final state of the block.
|
|
21
|
+
*
|
|
22
|
+
* Example:
|
|
23
|
+
* 1. { pending: true, text: "Hello"}
|
|
24
|
+
* 2. { pending: true, text: "Hello, I am a"}
|
|
25
|
+
* 3. { pending: false, text: "Hello, I am a helpful assistant!"}
|
|
44
26
|
*/
|
|
45
|
-
|
|
27
|
+
onBlock: (block: ContentBlock.Any) => Effect.Effect<void>;
|
|
46
28
|
/**
|
|
47
|
-
*
|
|
29
|
+
* Complete messages fired during the session, both from the model and from the user.
|
|
30
|
+
* This message will contain all message blocks emitted through the `onBlock` callback.
|
|
48
31
|
*/
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
32
|
+
onMessage: (message: DataType.Message) => Effect.Effect<void>;
|
|
33
|
+
}
|
|
34
|
+
export declare const GenerationObserver: Readonly<{
|
|
35
|
+
make: ({ onPart, onBlock, onMessage, }?: Partial<GenerationObserver>) => GenerationObserver;
|
|
36
|
+
noop: () => GenerationObserver;
|
|
53
37
|
/**
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
* - `planning`: The model will create a plan with required artifacts for each step.
|
|
57
|
-
* - `importing`: The model can query registry and only pull in the artifacts that are required to complete the task.
|
|
58
|
-
* - `configured`: The available artifacts are pre-selected and the model cannot select additional artifacts.
|
|
38
|
+
* Debug printer to be used in unit-tests and browser devtools.
|
|
59
39
|
*/
|
|
60
|
-
|
|
40
|
+
fromPrinter: (printer: ConsolePrinter) => GenerationObserver;
|
|
41
|
+
}>;
|
|
42
|
+
export type SessionRunParams<Tools extends AiTool.Any> = {
|
|
43
|
+
prompt: string;
|
|
44
|
+
system?: string;
|
|
45
|
+
history?: DataType.Message[];
|
|
46
|
+
objects?: Obj.Any[];
|
|
47
|
+
blueprints?: Blueprint.Blueprint[];
|
|
48
|
+
toolkit?: AiToolkit.AiToolkit<Tools>;
|
|
49
|
+
observer?: GenerationObserver;
|
|
61
50
|
};
|
|
62
|
-
|
|
51
|
+
/**
|
|
52
|
+
* Contains message history, tools, current context.
|
|
53
|
+
* Current context means the state of the app, time of day, and other contextual information.
|
|
54
|
+
* It makes requests to the model, its a state machine.
|
|
55
|
+
* It keeps track of the current goal.
|
|
56
|
+
* It manages the context window.
|
|
57
|
+
* Tracks the success criteria of reaching the goal, exposing metrics (stretch).
|
|
58
|
+
* Could be run locally in the app or remotely.
|
|
59
|
+
* Could be personal or shared.
|
|
60
|
+
*/
|
|
61
|
+
export declare class AiSession {
|
|
63
62
|
private readonly _options;
|
|
64
|
-
/**
|
|
65
|
-
|
|
66
|
-
/** Pending messages (incl. the current user request). */
|
|
67
|
-
private _pending;
|
|
68
|
-
/** Current streaming response. */
|
|
69
|
-
private _stream;
|
|
70
|
-
/** Prior history from queue. */
|
|
71
|
-
private _history;
|
|
72
|
-
/**
|
|
73
|
-
* New message.
|
|
74
|
-
*/
|
|
75
|
-
readonly message: Event<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
|
|
76
|
-
id: string;
|
|
77
|
-
content: ({
|
|
78
|
-
pending?: boolean | undefined;
|
|
79
|
-
type: "text";
|
|
80
|
-
text: string;
|
|
81
|
-
disposition?: string | undefined;
|
|
82
|
-
} | {
|
|
83
|
-
pending?: boolean | undefined;
|
|
84
|
-
type: "json";
|
|
85
|
-
disposition?: string | undefined;
|
|
86
|
-
json: string;
|
|
87
|
-
} | {
|
|
88
|
-
pending?: boolean | undefined;
|
|
89
|
-
id?: string | undefined;
|
|
90
|
-
type: "image";
|
|
91
|
-
source?: {
|
|
92
|
-
type: "base64";
|
|
93
|
-
mediaType: string;
|
|
94
|
-
data: string;
|
|
95
|
-
} | undefined;
|
|
96
|
-
} | {
|
|
97
|
-
pending?: boolean | undefined;
|
|
98
|
-
id: string;
|
|
99
|
-
type: "tool_use";
|
|
100
|
-
name: string;
|
|
101
|
-
input: unknown;
|
|
102
|
-
currentStatus?: {
|
|
103
|
-
readonly id: string;
|
|
104
|
-
message: string;
|
|
105
|
-
} | undefined;
|
|
106
|
-
} | {
|
|
107
|
-
pending?: boolean | undefined;
|
|
108
|
-
type: "tool_result";
|
|
109
|
-
toolUseId: string;
|
|
110
|
-
content: string;
|
|
111
|
-
isError?: boolean | undefined;
|
|
112
|
-
})[];
|
|
113
|
-
role: "user" | "assistant";
|
|
114
|
-
}>;
|
|
63
|
+
/** Complete messages fired during the session, both from the model and from the user. */
|
|
64
|
+
readonly messageQueue: Queue.Queue<import("@dxos/schema").Message>;
|
|
115
65
|
/**
|
|
116
|
-
*
|
|
66
|
+
* Blocks streaming from the model during the session.
|
|
67
|
+
* @deprecated Use `observer.onBlock` instead.
|
|
117
68
|
*/
|
|
118
|
-
readonly
|
|
69
|
+
readonly blockQueue: Queue.Queue<Option.Option<{
|
|
70
|
+
version: unknown;
|
|
71
|
+
_tag: "anchor";
|
|
119
72
|
pending?: boolean | undefined;
|
|
120
|
-
|
|
121
|
-
text: string;
|
|
122
|
-
disposition?: string | undefined;
|
|
73
|
+
objectId: string;
|
|
123
74
|
} | {
|
|
75
|
+
name?: string | undefined;
|
|
76
|
+
_tag: "file";
|
|
124
77
|
pending?: boolean | undefined;
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
json: string;
|
|
78
|
+
url: string;
|
|
79
|
+
mediaType?: string | undefined;
|
|
128
80
|
} | {
|
|
129
|
-
pending?: boolean | undefined;
|
|
130
|
-
id?: string | undefined;
|
|
131
|
-
type: "image";
|
|
132
81
|
source?: {
|
|
133
|
-
type: "base64";
|
|
134
82
|
mediaType: string;
|
|
83
|
+
type: "base64";
|
|
135
84
|
data: string;
|
|
85
|
+
} | {
|
|
86
|
+
url: string;
|
|
87
|
+
type: "http";
|
|
136
88
|
} | undefined;
|
|
89
|
+
id?: string | undefined;
|
|
90
|
+
_tag: "image";
|
|
91
|
+
pending?: boolean | undefined;
|
|
137
92
|
} | {
|
|
93
|
+
_tag: "json";
|
|
138
94
|
pending?: boolean | undefined;
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
name: string;
|
|
142
|
-
input: unknown;
|
|
143
|
-
currentStatus?: {
|
|
144
|
-
readonly id: string;
|
|
145
|
-
message: string;
|
|
146
|
-
} | undefined;
|
|
95
|
+
data: string;
|
|
96
|
+
disposition?: string | undefined;
|
|
147
97
|
} | {
|
|
98
|
+
text: string;
|
|
99
|
+
_tag: "proposal";
|
|
148
100
|
pending?: boolean | undefined;
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
101
|
+
} | {
|
|
102
|
+
_tag: "reasoning";
|
|
103
|
+
pending?: boolean | undefined;
|
|
104
|
+
reasoningText?: string | undefined;
|
|
105
|
+
redactedText?: string | undefined;
|
|
106
|
+
signature?: string | undefined;
|
|
107
|
+
} | {
|
|
108
|
+
reference: import("@dxos/echo-schema").Ref<import("@dxos/echo/Type").Expando>;
|
|
109
|
+
_tag: "reference";
|
|
158
110
|
pending?: boolean | undefined;
|
|
159
|
-
|
|
111
|
+
} | {
|
|
112
|
+
_tag: "select";
|
|
113
|
+
pending?: boolean | undefined;
|
|
114
|
+
options: readonly string[];
|
|
115
|
+
} | {
|
|
116
|
+
_tag: "status";
|
|
117
|
+
pending?: boolean | undefined;
|
|
118
|
+
statusText: string;
|
|
119
|
+
} | {
|
|
160
120
|
text: string;
|
|
161
|
-
|
|
121
|
+
_tag: "suggest";
|
|
122
|
+
pending?: boolean | undefined;
|
|
162
123
|
} | {
|
|
124
|
+
text: string;
|
|
125
|
+
_tag: "text";
|
|
163
126
|
pending?: boolean | undefined;
|
|
164
|
-
type: "json";
|
|
165
127
|
disposition?: string | undefined;
|
|
166
|
-
|
|
128
|
+
mimeType?: string | undefined;
|
|
167
129
|
} | {
|
|
130
|
+
_tag: "toolkit";
|
|
168
131
|
pending?: boolean | undefined;
|
|
169
|
-
id?: string | undefined;
|
|
170
|
-
type: "image";
|
|
171
|
-
source?: {
|
|
172
|
-
type: "base64";
|
|
173
|
-
mediaType: string;
|
|
174
|
-
data: string;
|
|
175
|
-
} | undefined;
|
|
176
132
|
} | {
|
|
177
|
-
pending?: boolean | undefined;
|
|
178
|
-
id: string;
|
|
179
|
-
type: "tool_use";
|
|
180
133
|
name: string;
|
|
134
|
+
_tag: "toolCall";
|
|
135
|
+
pending?: boolean | undefined;
|
|
136
|
+
toolCallId: string;
|
|
181
137
|
input: unknown;
|
|
182
|
-
currentStatus?: {
|
|
183
|
-
readonly id: string;
|
|
184
|
-
message: string;
|
|
185
|
-
} | undefined;
|
|
186
138
|
} | {
|
|
139
|
+
name: string;
|
|
140
|
+
_tag: "toolResult";
|
|
187
141
|
pending?: boolean | undefined;
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
pending?: boolean | undefined;
|
|
207
|
-
type: "json";
|
|
208
|
-
disposition?: string | undefined;
|
|
209
|
-
json: string;
|
|
210
|
-
} | {
|
|
211
|
-
pending?: boolean | undefined;
|
|
212
|
-
id?: string | undefined;
|
|
213
|
-
type: "image";
|
|
214
|
-
source?: {
|
|
215
|
-
type: "base64";
|
|
216
|
-
mediaType: string;
|
|
217
|
-
data: string;
|
|
218
|
-
} | undefined;
|
|
219
|
-
} | {
|
|
220
|
-
pending?: boolean | undefined;
|
|
221
|
-
id: string;
|
|
222
|
-
name: string;
|
|
223
|
-
type: "tool_use";
|
|
224
|
-
input: unknown;
|
|
225
|
-
currentStatus?: {
|
|
226
|
-
readonly id: string;
|
|
227
|
-
message: string;
|
|
228
|
-
} | undefined;
|
|
229
|
-
} | {
|
|
230
|
-
pending?: boolean | undefined;
|
|
231
|
-
type: "tool_result";
|
|
232
|
-
content: string;
|
|
233
|
-
toolUseId: string;
|
|
234
|
-
isError?: boolean | undefined;
|
|
235
|
-
})[];
|
|
236
|
-
}>;
|
|
142
|
+
toolCallId: string;
|
|
143
|
+
result: unknown;
|
|
144
|
+
error?: string | undefined;
|
|
145
|
+
} | {
|
|
146
|
+
text: string;
|
|
147
|
+
_tag: "transcript";
|
|
148
|
+
pending?: boolean | undefined;
|
|
149
|
+
started: string;
|
|
150
|
+
}>>;
|
|
151
|
+
/** Unparsed events from the underlying generation stream. */
|
|
152
|
+
readonly eventQueue: Queue.Queue<AiResponse.TextPart | AiResponse.ReasoningPart | AiResponse.RedactedReasoningPart | AiResponse.ToolCallPart | AiResponse.MetadataPart | AiResponse.FinishPart>;
|
|
153
|
+
/** Prevents concurrent execution of session. */
|
|
154
|
+
private readonly _semaphore;
|
|
155
|
+
/** Pending messages (incl. the current user request). */
|
|
156
|
+
private _pending;
|
|
157
|
+
/** Prior history from queue. */
|
|
158
|
+
private _history;
|
|
159
|
+
constructor(_options?: AiSessionOptions);
|
|
237
160
|
/**
|
|
238
|
-
*
|
|
161
|
+
* Runs the AI model loop interacting with tools and artifacts.
|
|
162
|
+
* @returns The messages generated by the session, including the user's prompt.
|
|
239
163
|
*/
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
message: Message;
|
|
243
|
-
status: AgentStatus;
|
|
244
|
-
}>;
|
|
245
|
-
constructor(_options: AiSessionOptions);
|
|
246
|
-
run(options: SessionRunOptions): Promise<Message[]>;
|
|
247
|
-
runStructured<S extends Schema.Schema.AnyNoContext>(schema: S, options: SessionRunOptions): Promise<Schema.Schema.Type<S>>;
|
|
248
|
-
private _formatUserPrompt;
|
|
249
|
-
private _createQueryArtifactsTool;
|
|
250
|
-
private _createRequireTool;
|
|
251
|
-
private _createPlanningTool;
|
|
252
|
-
private _onToolStatusReport;
|
|
253
|
-
abort(): void;
|
|
254
|
-
}
|
|
255
|
-
declare const AIServiecOverloadedError_base: Schema.TaggedErrorClass<AIServiecOverloadedError, "AIServiecOverloadedError", {
|
|
256
|
-
readonly _tag: Schema.tag<"AIServiecOverloadedError">;
|
|
257
|
-
}>;
|
|
258
|
-
export declare class AIServiecOverloadedError extends AIServiecOverloadedError_base {
|
|
164
|
+
run: <Tools extends AiTool.Any>(params: SessionRunParams<Tools>) => Effect.Effect<DataType.Message[], AiAssistantError | AiInputPreprocessingError | AiToolNotFoundError | AiError.AiError, AiLanguageModel.AiLanguageModel | ToolResolverService | ToolExecutionService | AiTool.ToHandler<Tools>>;
|
|
165
|
+
runStructured<S extends Schema.Schema.AnyNoContext>(_schema: S, _options: SessionRunParams<AiTool.Any>): Promise<Schema.Schema.Type<S>>;
|
|
259
166
|
}
|
|
260
|
-
export {};
|
|
261
167
|
//# sourceMappingURL=session.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../../src/session/session.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../../src/session/session.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Schema } from 'effect';
|
|
2
|
-
import { type MessageContentBlock } from '@dxos/ai';
|
|
3
2
|
import { type ObjectVersion } from '@dxos/echo-db';
|
|
4
|
-
import { type
|
|
3
|
+
import { type AnyEchoObject } from '@dxos/echo-schema';
|
|
4
|
+
import { type ContentBlock } from '@dxos/schema';
|
|
5
5
|
declare const VersionPinSchema: Schema.Struct<{
|
|
6
6
|
objectId: import("@dxos/keys").ObjectIdClass;
|
|
7
7
|
version: Schema.Schema<ObjectVersion, ObjectVersion, never>;
|
|
@@ -14,8 +14,8 @@ export interface VersionPin extends Schema.Schema.Type<typeof VersionPinSchema>
|
|
|
14
14
|
}
|
|
15
15
|
export declare const VersionPin: typeof VersionPinSchema & {
|
|
16
16
|
DISPOSITION: 'version-pin';
|
|
17
|
-
fromObject: (object:
|
|
18
|
-
createBlock: (pin: VersionPin) =>
|
|
17
|
+
fromObject: (object: AnyEchoObject) => VersionPin;
|
|
18
|
+
createBlock: (pin: VersionPin) => ContentBlock.Any;
|
|
19
19
|
};
|
|
20
20
|
export {};
|
|
21
21
|
//# sourceMappingURL=version-pin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-pin.d.ts","sourceRoot":"","sources":["../../../../src/session/version-pin.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"version-pin.d.ts","sourceRoot":"","sources":["../../../../src/session/version-pin.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,EAAE,KAAK,aAAa,EAAY,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAKjD,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"}
|