@dxos/assistant 0.8.4-main.5ea62a8 → 0.8.4-main.66e292d
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 +122 -165
- package/dist/lib/browser/extraction/index.mjs.map +4 -4
- package/dist/lib/browser/index.mjs +980 -160
- 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 +122 -165
- package/dist/lib/node-esm/extraction/index.mjs.map +4 -4
- package/dist/lib/node-esm/index.mjs +980 -160
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/conversation/context.d.ts +47 -46
- package/dist/types/src/conversation/context.d.ts.map +1 -1
- package/dist/types/src/conversation/conversation.d.ts +11 -12
- 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 +38 -42
- package/dist/types/src/errors.d.ts.map +1 -1
- package/dist/types/src/execution-graph.d.ts +85 -0
- package/dist/types/src/execution-graph.d.ts.map +1 -0
- package/dist/types/src/execution-graph.test.d.ts +2 -0
- package/dist/types/src/execution-graph.test.d.ts.map +1 -0
- package/dist/types/src/extraction/extraction-llm-function/extraction-llm-function.d.ts +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 +67 -55
- 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.map +1 -1
- package/dist/types/src/extraction/extraction.d.ts +111 -110
- package/dist/types/src/extraction/extraction.d.ts.map +1 -1
- package/dist/types/src/extraction/quotes.d.ts +1 -1
- package/dist/types/src/extraction/quotes.d.ts.map +1 -1
- package/dist/types/src/functions/services.d.ts +18 -5
- package/dist/types/src/functions/services.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -1
- package/dist/types/src/index.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/artifact-diff.d.ts +2 -2
- package/dist/types/src/session/artifact-diff.d.ts.map +1 -1
- package/dist/types/src/session/error-handling.d.ts +2 -2
- package/dist/types/src/session/error-handling.d.ts.map +1 -1
- package/dist/types/src/session/format.d.ts +4 -174
- 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 +3 -3
- package/dist/types/src/session/observer.d.ts.map +1 -1
- package/dist/types/src/session/session.d.ts +15 -11
- package/dist/types/src/session/session.d.ts.map +1 -1
- package/dist/types/src/session/toolkit.d.ts +7 -6
- package/dist/types/src/session/toolkit.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/types/artifact.d.ts +19 -0
- package/dist/types/src/types/artifact.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +2 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +29 -32
- package/src/conversation/context.ts +54 -23
- package/src/conversation/conversation.ts +30 -25
- package/src/diff.test.ts +3 -3
- package/src/diff.ts +7 -0
- package/src/errors.ts +4 -4
- package/src/execution-graph.test.ts +740 -0
- package/src/execution-graph.ts +509 -0
- package/src/extraction/extraction-llm-function/extraction-llm-function.test.ts +9 -9
- package/src/extraction/extraction-llm-function/extraction-llm-function.ts +47 -55
- package/src/extraction/extraction-ner-function/extraction-ner-function.test.ts +17 -17
- package/src/extraction/extraction-ner-function/extraction-ner-function.ts +42 -43
- package/src/extraction/extraction-ner-function/named-entity-recognition.test.ts +12 -6
- package/src/extraction/extraction-ner-function/named-entity-recognition.ts +2 -0
- package/src/extraction/extraction.ts +8 -7
- package/src/extraction/quotes.test.ts +2 -2
- package/src/extraction/quotes.ts +3 -3
- package/src/functions/services.ts +93 -50
- package/src/index.ts +2 -1
- package/src/session/GenericToolkit.ts +130 -0
- package/src/session/artifact-diff.ts +2 -2
- package/src/session/error-handling.ts +11 -6
- package/src/session/format.test.ts +5 -4
- package/src/session/format.ts +19 -14
- package/src/session/index.ts +2 -0
- package/src/session/observer.ts +4 -3
- package/src/session/session.conversations.json +1 -0
- package/src/session/session.test.ts +51 -210
- package/src/session/session.ts +41 -29
- package/src/session/toolkit.ts +19 -13
- package/src/session/version-pin.ts +7 -7
- package/src/templates/{format.tpl → instructions/format.tpl} +4 -2
- package/src/templates/{system.tpl → instructions/system.tpl} +10 -12
- package/src/templates/system.ts +2 -2
- package/src/{types.ts → types/artifact.ts} +22 -4
- package/src/types/index.ts +5 -0
- package/dist/lib/browser/chunk-6WRGDEMH.mjs +0 -89
- package/dist/lib/browser/chunk-6WRGDEMH.mjs.map +0 -7
- package/dist/lib/browser/chunk-N4O3C3T5.mjs +0 -396
- package/dist/lib/browser/chunk-N4O3C3T5.mjs.map +0 -7
- package/dist/lib/browser/named-entity-recognition-O46UTCLR.mjs +0 -13
- package/dist/lib/node-esm/chunk-3UU5V4FS.mjs +0 -91
- package/dist/lib/node-esm/chunk-3UU5V4FS.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QVJ7EAM2.mjs +0 -398
- package/dist/lib/node-esm/chunk-QVJ7EAM2.mjs.map +0 -7
- package/dist/lib/node-esm/named-entity-recognition-W4VMRCH6.mjs +0 -14
- package/dist/types/src/session/version-pin.test.d.ts +0 -2
- package/dist/types/src/session/version-pin.test.d.ts.map +0 -1
- package/dist/types/src/summarization/summarization.test.d.ts +0 -2
- package/dist/types/src/summarization/summarization.test.d.ts.map +0 -1
- package/dist/types/src/types.d.ts +0 -16
- package/dist/types/src/types.d.ts.map +0 -1
- package/src/session/__snapshots__/session.test.ts.snap +0 -32
- package/src/session/version-pin.test.ts +0 -7
- package/src/summarization/summarization.test.ts +0 -197
- /package/dist/lib/browser/{named-entity-recognition-O46UTCLR.mjs.map → chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/node-esm/{named-entity-recognition-W4VMRCH6.mjs.map → chunk-HSLMI22Q.mjs.map} +0 -0
- /package/src/extraction/extraction-llm-function/{instructions.tpl → transcription-instructions.tpl} +0 -0
|
@@ -1,32 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Named Entity Recognition model
|
|
3
|
+
*/
|
|
4
|
+
export declare const extractionNerFunction: import("@dxos/functions").FunctionDefinition<{
|
|
3
5
|
readonly options?: {
|
|
4
6
|
readonly timeout?: number | undefined;
|
|
5
7
|
readonly fallbackToRaw?: boolean | undefined;
|
|
6
8
|
} | undefined;
|
|
7
|
-
readonly message: import("@dxos/echo/
|
|
9
|
+
readonly message: import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
8
10
|
id: string;
|
|
9
11
|
parentMessage?: string | undefined;
|
|
10
12
|
created: string;
|
|
11
13
|
sender: {
|
|
12
14
|
name?: string | undefined;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
readonly value: string;
|
|
16
|
-
readonly category?: string | undefined;
|
|
17
|
-
readonly label: string;
|
|
18
|
-
}[] | undefined;
|
|
15
|
+
role?: "user" | "assistant" | "tool" | undefined;
|
|
16
|
+
contact?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
19
17
|
image?: string | undefined;
|
|
20
18
|
fullName?: string | undefined;
|
|
21
19
|
preferredName?: string | undefined;
|
|
22
20
|
nickname?: string | undefined;
|
|
23
|
-
organization?: import("@dxos/echo
|
|
24
|
-
id: string;
|
|
25
|
-
name?: string | undefined;
|
|
21
|
+
organization?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
26
22
|
description?: string | undefined;
|
|
23
|
+
name?: string | undefined;
|
|
27
24
|
status?: "prospect" | "qualified" | "active" | "commit" | "reject" | undefined;
|
|
28
25
|
image?: string | undefined;
|
|
29
26
|
website?: string | undefined;
|
|
27
|
+
location?: readonly [number, number, (number | undefined)?] | undefined;
|
|
30
28
|
}> | undefined;
|
|
31
29
|
jobTitle?: string | undefined;
|
|
32
30
|
department?: string | undefined;
|
|
@@ -43,6 +41,11 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
|
|
|
43
41
|
readonly value: string;
|
|
44
42
|
readonly label?: string | undefined;
|
|
45
43
|
}[] | undefined;
|
|
44
|
+
fields?: {
|
|
45
|
+
readonly value: string;
|
|
46
|
+
readonly label: string;
|
|
47
|
+
readonly category?: string | undefined;
|
|
48
|
+
}[] | undefined;
|
|
46
49
|
addresses?: {
|
|
47
50
|
readonly value: {
|
|
48
51
|
readonly street?: string | undefined;
|
|
@@ -60,11 +63,11 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
|
|
|
60
63
|
readonly label?: string | undefined;
|
|
61
64
|
}[] | undefined;
|
|
62
65
|
birthday?: string | undefined;
|
|
66
|
+
location?: readonly [number, number, (number | undefined)?] | undefined;
|
|
63
67
|
}> | undefined;
|
|
64
68
|
identityDid?: string | undefined;
|
|
65
69
|
identityKey?: string | undefined;
|
|
66
70
|
email?: string | undefined;
|
|
67
|
-
role?: "user" | "assistant" | undefined;
|
|
68
71
|
};
|
|
69
72
|
blocks: ({
|
|
70
73
|
version: unknown;
|
|
@@ -72,23 +75,23 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
|
|
|
72
75
|
pending?: boolean | undefined;
|
|
73
76
|
objectId: string;
|
|
74
77
|
} | {
|
|
75
|
-
name?: string | undefined;
|
|
76
78
|
_tag: "file";
|
|
77
|
-
url: string;
|
|
78
79
|
pending?: boolean | undefined;
|
|
80
|
+
url: string;
|
|
81
|
+
name?: string | undefined;
|
|
79
82
|
mediaType?: string | undefined;
|
|
80
83
|
} | {
|
|
81
84
|
id?: string | undefined;
|
|
85
|
+
_tag: "image";
|
|
86
|
+
pending?: boolean | undefined;
|
|
82
87
|
source?: {
|
|
83
|
-
type: "base64";
|
|
84
88
|
mediaType: string;
|
|
89
|
+
type: "base64";
|
|
85
90
|
data: string;
|
|
86
91
|
} | {
|
|
87
|
-
type: "http";
|
|
88
92
|
url: string;
|
|
93
|
+
type: "http";
|
|
89
94
|
} | undefined;
|
|
90
|
-
_tag: "image";
|
|
91
|
-
pending?: boolean | undefined;
|
|
92
95
|
} | {
|
|
93
96
|
_tag: "json";
|
|
94
97
|
pending?: boolean | undefined;
|
|
@@ -100,13 +103,13 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
|
|
|
100
103
|
pending?: boolean | undefined;
|
|
101
104
|
} | {
|
|
102
105
|
_tag: "reasoning";
|
|
106
|
+
pending?: boolean | undefined;
|
|
103
107
|
reasoningText?: string | undefined;
|
|
104
|
-
signature?: string | undefined;
|
|
105
108
|
redactedText?: string | undefined;
|
|
106
|
-
|
|
109
|
+
signature?: string | undefined;
|
|
107
110
|
} | {
|
|
111
|
+
reference: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object>>;
|
|
108
112
|
_tag: "reference";
|
|
109
|
-
reference: import("@dxos/echo-schema").Ref<import("@dxos/echo/Type").Expando>;
|
|
110
113
|
pending?: boolean | undefined;
|
|
111
114
|
} | {
|
|
112
115
|
_tag: "select";
|
|
@@ -122,15 +125,15 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
|
|
|
122
125
|
pending?: boolean | undefined;
|
|
123
126
|
} | {
|
|
124
127
|
_tag: "summary";
|
|
128
|
+
pending?: boolean | undefined;
|
|
129
|
+
mimeType?: string | undefined;
|
|
130
|
+
message?: string | undefined;
|
|
125
131
|
model?: string | undefined;
|
|
126
132
|
usage?: {
|
|
127
133
|
readonly inputTokens?: number | undefined;
|
|
128
134
|
readonly outputTokens?: number | undefined;
|
|
129
135
|
readonly totalTokens?: number | undefined;
|
|
130
136
|
} | undefined;
|
|
131
|
-
pending?: boolean | undefined;
|
|
132
|
-
mimeType?: string | undefined;
|
|
133
|
-
message?: string | undefined;
|
|
134
137
|
toolCalls?: number | undefined;
|
|
135
138
|
errors?: number | undefined;
|
|
136
139
|
duration?: number | undefined;
|
|
@@ -144,18 +147,20 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
|
|
|
144
147
|
_tag: "toolkit";
|
|
145
148
|
pending?: boolean | undefined;
|
|
146
149
|
} | {
|
|
147
|
-
name: string;
|
|
148
150
|
_tag: "toolCall";
|
|
149
151
|
pending?: boolean | undefined;
|
|
152
|
+
name: string;
|
|
150
153
|
toolCallId: string;
|
|
151
154
|
input: string;
|
|
155
|
+
providerExecuted: boolean;
|
|
152
156
|
} | {
|
|
153
|
-
name: string;
|
|
154
157
|
_tag: "toolResult";
|
|
155
|
-
error?: string | undefined;
|
|
156
158
|
pending?: boolean | undefined;
|
|
159
|
+
name: string;
|
|
157
160
|
toolCallId: string;
|
|
161
|
+
providerExecuted: boolean;
|
|
158
162
|
result?: string | undefined;
|
|
163
|
+
error?: string | undefined;
|
|
159
164
|
} | {
|
|
160
165
|
text: string;
|
|
161
166
|
_tag: "transcript";
|
|
@@ -166,30 +171,30 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
|
|
|
166
171
|
[x: string]: any;
|
|
167
172
|
} | undefined;
|
|
168
173
|
};
|
|
174
|
+
readonly objects?: readonly (import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
175
|
+
[x: string]: any;
|
|
176
|
+
id: import("@dxos/keys").ObjectId;
|
|
177
|
+
})[] | undefined;
|
|
169
178
|
}, {
|
|
170
|
-
readonly message: import("@dxos/echo/
|
|
179
|
+
readonly message: import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
171
180
|
id: string;
|
|
172
181
|
parentMessage?: string | undefined;
|
|
173
182
|
created: string;
|
|
174
183
|
sender: {
|
|
175
184
|
name?: string | undefined;
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
readonly value: string;
|
|
179
|
-
readonly category?: string | undefined;
|
|
180
|
-
readonly label: string;
|
|
181
|
-
}[] | undefined;
|
|
185
|
+
role?: "user" | "assistant" | "tool" | undefined;
|
|
186
|
+
contact?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
182
187
|
image?: string | undefined;
|
|
183
188
|
fullName?: string | undefined;
|
|
184
189
|
preferredName?: string | undefined;
|
|
185
190
|
nickname?: string | undefined;
|
|
186
|
-
organization?: import("@dxos/echo
|
|
187
|
-
id: string;
|
|
188
|
-
name?: string | undefined;
|
|
191
|
+
organization?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
189
192
|
description?: string | undefined;
|
|
193
|
+
name?: string | undefined;
|
|
190
194
|
status?: "prospect" | "qualified" | "active" | "commit" | "reject" | undefined;
|
|
191
195
|
image?: string | undefined;
|
|
192
196
|
website?: string | undefined;
|
|
197
|
+
location?: readonly [number, number, (number | undefined)?] | undefined;
|
|
193
198
|
}> | undefined;
|
|
194
199
|
jobTitle?: string | undefined;
|
|
195
200
|
department?: string | undefined;
|
|
@@ -206,6 +211,11 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
|
|
|
206
211
|
readonly value: string;
|
|
207
212
|
readonly label?: string | undefined;
|
|
208
213
|
}[] | undefined;
|
|
214
|
+
fields?: {
|
|
215
|
+
readonly value: string;
|
|
216
|
+
readonly label: string;
|
|
217
|
+
readonly category?: string | undefined;
|
|
218
|
+
}[] | undefined;
|
|
209
219
|
addresses?: {
|
|
210
220
|
readonly value: {
|
|
211
221
|
readonly street?: string | undefined;
|
|
@@ -223,11 +233,11 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
|
|
|
223
233
|
readonly label?: string | undefined;
|
|
224
234
|
}[] | undefined;
|
|
225
235
|
birthday?: string | undefined;
|
|
236
|
+
location?: readonly [number, number, (number | undefined)?] | undefined;
|
|
226
237
|
}> | undefined;
|
|
227
238
|
identityDid?: string | undefined;
|
|
228
239
|
identityKey?: string | undefined;
|
|
229
240
|
email?: string | undefined;
|
|
230
|
-
role?: "user" | "assistant" | undefined;
|
|
231
241
|
};
|
|
232
242
|
blocks: ({
|
|
233
243
|
version: unknown;
|
|
@@ -235,23 +245,23 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
|
|
|
235
245
|
pending?: boolean | undefined;
|
|
236
246
|
objectId: string;
|
|
237
247
|
} | {
|
|
238
|
-
name?: string | undefined;
|
|
239
248
|
_tag: "file";
|
|
240
|
-
url: string;
|
|
241
249
|
pending?: boolean | undefined;
|
|
250
|
+
url: string;
|
|
251
|
+
name?: string | undefined;
|
|
242
252
|
mediaType?: string | undefined;
|
|
243
253
|
} | {
|
|
244
254
|
id?: string | undefined;
|
|
255
|
+
_tag: "image";
|
|
256
|
+
pending?: boolean | undefined;
|
|
245
257
|
source?: {
|
|
246
|
-
type: "base64";
|
|
247
258
|
mediaType: string;
|
|
259
|
+
type: "base64";
|
|
248
260
|
data: string;
|
|
249
261
|
} | {
|
|
250
|
-
type: "http";
|
|
251
262
|
url: string;
|
|
263
|
+
type: "http";
|
|
252
264
|
} | undefined;
|
|
253
|
-
_tag: "image";
|
|
254
|
-
pending?: boolean | undefined;
|
|
255
265
|
} | {
|
|
256
266
|
_tag: "json";
|
|
257
267
|
pending?: boolean | undefined;
|
|
@@ -263,13 +273,13 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
|
|
|
263
273
|
pending?: boolean | undefined;
|
|
264
274
|
} | {
|
|
265
275
|
_tag: "reasoning";
|
|
276
|
+
pending?: boolean | undefined;
|
|
266
277
|
reasoningText?: string | undefined;
|
|
267
|
-
signature?: string | undefined;
|
|
268
278
|
redactedText?: string | undefined;
|
|
269
|
-
|
|
279
|
+
signature?: string | undefined;
|
|
270
280
|
} | {
|
|
281
|
+
reference: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object>>;
|
|
271
282
|
_tag: "reference";
|
|
272
|
-
reference: import("@dxos/echo-schema").Ref<import("@dxos/echo/Type").Expando>;
|
|
273
283
|
pending?: boolean | undefined;
|
|
274
284
|
} | {
|
|
275
285
|
_tag: "select";
|
|
@@ -285,15 +295,15 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
|
|
|
285
295
|
pending?: boolean | undefined;
|
|
286
296
|
} | {
|
|
287
297
|
_tag: "summary";
|
|
298
|
+
pending?: boolean | undefined;
|
|
299
|
+
mimeType?: string | undefined;
|
|
300
|
+
message?: string | undefined;
|
|
288
301
|
model?: string | undefined;
|
|
289
302
|
usage?: {
|
|
290
303
|
readonly inputTokens?: number | undefined;
|
|
291
304
|
readonly outputTokens?: number | undefined;
|
|
292
305
|
readonly totalTokens?: number | undefined;
|
|
293
306
|
} | undefined;
|
|
294
|
-
pending?: boolean | undefined;
|
|
295
|
-
mimeType?: string | undefined;
|
|
296
|
-
message?: string | undefined;
|
|
297
307
|
toolCalls?: number | undefined;
|
|
298
308
|
errors?: number | undefined;
|
|
299
309
|
duration?: number | undefined;
|
|
@@ -307,18 +317,20 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
|
|
|
307
317
|
_tag: "toolkit";
|
|
308
318
|
pending?: boolean | undefined;
|
|
309
319
|
} | {
|
|
310
|
-
name: string;
|
|
311
320
|
_tag: "toolCall";
|
|
312
321
|
pending?: boolean | undefined;
|
|
322
|
+
name: string;
|
|
313
323
|
toolCallId: string;
|
|
314
324
|
input: string;
|
|
325
|
+
providerExecuted: boolean;
|
|
315
326
|
} | {
|
|
316
|
-
name: string;
|
|
317
327
|
_tag: "toolResult";
|
|
318
|
-
error?: string | undefined;
|
|
319
328
|
pending?: boolean | undefined;
|
|
329
|
+
name: string;
|
|
320
330
|
toolCallId: string;
|
|
331
|
+
providerExecuted: boolean;
|
|
321
332
|
result?: string | undefined;
|
|
333
|
+
error?: string | undefined;
|
|
322
334
|
} | {
|
|
323
335
|
text: string;
|
|
324
336
|
_tag: "transcript";
|
|
@@ -330,5 +342,5 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
|
|
|
330
342
|
} | undefined;
|
|
331
343
|
};
|
|
332
344
|
readonly timeElapsed: number;
|
|
333
|
-
}>;
|
|
345
|
+
}, import("@dxos/functions").FunctionServices>;
|
|
334
346
|
//# sourceMappingURL=extraction-ner-function.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extraction-ner-function.d.ts","sourceRoot":"","sources":["../../../../../src/extraction/extraction-ner-function/extraction-ner-function.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"extraction-ner-function.d.ts","sourceRoot":"","sources":["../../../../../src/extraction/extraction-ner-function/extraction-ner-function.ts"],"names":[],"mappings":"AAQA;;GAEG;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;+BA0ChC,CA1BD;wBAA0C,CAAC;0BAEnB,CAAA;yBACgD,CAAC;2BAA6C,CAAC;4BAuBtH,CApBA;;;;;;;kCAOkD,CAAC;;;;kCAK/B,CAAC;;;;kCAMZ,CAAC;;;;;qCAImH,CAAC;;;;uCAAkJ,CAAC;yCAA2D,CAAC;yCAA2D,CAAC;uCAAyD,CAAC;2CAA6D,CAAC;oDAAsE,CAAC;wCAA0D,CAAC;;kCAAuE,CAAC;;;;kCAA8I,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BAF11B,CA1BD;wBAA0C,CAAC;0BAEnB,CAAA;yBACgD,CAAC;2BAA6C,CAAC;4BAuBtH,CApBA;;;;;;;kCAOkD,CAAC;;;;kCAK/B,CAAC;;;;kCAMZ,CAAC;;;;;qCAImH,CAAC;;;;uCAAkJ,CAAC;yCAA2D,CAAC;yCAA2D,CAAC;uCAAyD,CAAC;2CAA6D,CAAC;oDAAsE,CAAC;wCAA0D,CAAC;;kCAAuE,CAAC;;;;kCAA8I,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8CAD11B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"named-entity-recognition.d.ts","sourceRoot":"","sources":["../../../../../src/extraction/extraction-ner-function/named-entity-recognition.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,+BAA+B,EACpC,KAAK,yBAAyB,EAE/B,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"named-entity-recognition.d.ts","sourceRoot":"","sources":["../../../../../src/extraction/extraction-ner-function/named-entity-recognition.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,+BAA+B,EACpC,KAAK,yBAAyB,EAE/B,MAAM,sBAAsB,CAAC;AAM9B;;;;GAIG;AACH,eAAO,MAAM,MAAM,gDASlB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAU,MAAM,MAAM,KAAG,OAAO,CAAC,yBAAyB,EAAE,CAM3F,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,QAAQ,yBAAyB,EAAE,KAAG,yBAAyB,EAAE,EAmClG,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,OAAO,yBAAyB,EAAE,KAAG,yBAmBrE,CAAC"}
|
|
@@ -1,68 +1,70 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { type FunctionDefinition
|
|
1
|
+
import * as Schema from 'effect/Schema';
|
|
2
|
+
import { Type } from '@dxos/echo';
|
|
3
|
+
import { type FunctionDefinition } from '@dxos/functions';
|
|
4
|
+
import { type FunctionExecutor } from '@dxos/functions-runtime';
|
|
4
5
|
export declare const ExtractionInput: Schema.Struct<{
|
|
5
|
-
message:
|
|
6
|
+
message: 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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
name?: string | undefined;
|
|
11
|
+
role: Schema.optional<Schema.Literal<["user", "assistant", "tool"]>>;
|
|
12
|
+
contact: Schema.optional<import("@dxos/echo/internal").RefSchema<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
13
|
+
image?: string | undefined;
|
|
14
|
+
fullName?: string | undefined;
|
|
15
|
+
preferredName?: string | undefined;
|
|
16
|
+
nickname?: string | undefined;
|
|
17
|
+
organization?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
18
18
|
description?: string | undefined;
|
|
19
|
+
name?: string | undefined;
|
|
19
20
|
status?: "prospect" | "qualified" | "active" | "commit" | "reject" | undefined;
|
|
20
21
|
image?: string | undefined;
|
|
21
22
|
website?: string | undefined;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
value:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
value:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
value:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
value:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
|
|
23
|
+
location?: readonly [number, number, (number | undefined)?] | undefined;
|
|
24
|
+
}> | undefined;
|
|
25
|
+
jobTitle?: string | undefined;
|
|
26
|
+
department?: string | undefined;
|
|
27
|
+
notes?: string | undefined;
|
|
28
|
+
emails?: {
|
|
29
|
+
readonly value: string;
|
|
30
|
+
readonly label?: string | undefined;
|
|
31
|
+
}[] | undefined;
|
|
32
|
+
identities?: {
|
|
33
|
+
readonly value: string;
|
|
34
|
+
readonly label?: string | undefined;
|
|
35
|
+
}[] | undefined;
|
|
36
|
+
phoneNumbers?: {
|
|
37
|
+
readonly value: string;
|
|
38
|
+
readonly label?: string | undefined;
|
|
39
|
+
}[] | undefined;
|
|
40
|
+
fields?: {
|
|
41
|
+
readonly value: string;
|
|
42
|
+
readonly label: string;
|
|
43
|
+
readonly category?: string | undefined;
|
|
44
|
+
}[] | undefined;
|
|
45
|
+
addresses?: {
|
|
46
|
+
readonly value: {
|
|
47
|
+
readonly street?: string | undefined;
|
|
48
|
+
readonly extended?: string | undefined;
|
|
49
|
+
readonly locality?: string | undefined;
|
|
50
|
+
readonly region?: string | undefined;
|
|
51
|
+
readonly postalCode?: string | undefined;
|
|
52
|
+
readonly postOfficeBoxNumber?: string | undefined;
|
|
53
|
+
readonly country?: string | undefined;
|
|
54
|
+
};
|
|
55
|
+
readonly label?: string | undefined;
|
|
56
|
+
}[] | undefined;
|
|
57
|
+
urls?: {
|
|
58
|
+
readonly value: string;
|
|
59
|
+
readonly label?: string | undefined;
|
|
60
|
+
}[] | undefined;
|
|
61
|
+
birthday?: string | undefined;
|
|
62
|
+
location?: readonly [number, number, (number | undefined)?] | undefined;
|
|
63
|
+
}>>;
|
|
61
64
|
identityDid: Schema.optional<typeof Schema.String>;
|
|
62
65
|
identityKey: Schema.optional<typeof Schema.String>;
|
|
63
66
|
email: Schema.optional<typeof Schema.String>;
|
|
64
67
|
name: Schema.optional<typeof Schema.String>;
|
|
65
|
-
role: Schema.optional<Schema.Literal<["user", "assistant"]>>;
|
|
66
68
|
}>>;
|
|
67
69
|
blocks: Schema.mutable<Schema.Array$<Schema.Union<[Schema.mutable<Schema.TaggedStruct<"anchor", {
|
|
68
70
|
pending: Schema.optional<typeof Schema.Boolean>;
|
|
@@ -98,10 +100,7 @@ export declare const ExtractionInput: Schema.Struct<{
|
|
|
98
100
|
signature: Schema.optional<typeof Schema.String>;
|
|
99
101
|
}>>, Schema.mutable<Schema.TaggedStruct<"reference", {
|
|
100
102
|
pending: Schema.optional<typeof Schema.Boolean>;
|
|
101
|
-
reference: import("@dxos/echo/
|
|
102
|
-
[x: string]: any;
|
|
103
|
-
id: string;
|
|
104
|
-
}, never>>;
|
|
103
|
+
reference: import("@dxos/echo/internal").RefSchema<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {}>;
|
|
105
104
|
}>>, Schema.mutable<Schema.TaggedStruct<"select", {
|
|
106
105
|
pending: Schema.optional<typeof Schema.Boolean>;
|
|
107
106
|
options: Schema.Array$<typeof Schema.String>;
|
|
@@ -136,12 +135,14 @@ export declare const ExtractionInput: Schema.Struct<{
|
|
|
136
135
|
toolCallId: typeof Schema.String;
|
|
137
136
|
name: typeof Schema.String;
|
|
138
137
|
input: typeof Schema.String;
|
|
138
|
+
providerExecuted: typeof Schema.Boolean;
|
|
139
139
|
}>>, Schema.mutable<Schema.TaggedStruct<"toolResult", {
|
|
140
140
|
pending: Schema.optional<typeof Schema.Boolean>;
|
|
141
141
|
toolCallId: typeof Schema.String;
|
|
142
142
|
name: typeof Schema.String;
|
|
143
143
|
result: Schema.optional<typeof Schema.String>;
|
|
144
144
|
error: Schema.optional<typeof Schema.String>;
|
|
145
|
+
providerExecuted: typeof Schema.Boolean;
|
|
145
146
|
}>>, Schema.mutable<Schema.TaggedStruct<"transcript", {
|
|
146
147
|
pending: Schema.optional<typeof Schema.Boolean>;
|
|
147
148
|
started: typeof Schema.String;
|
|
@@ -149,7 +150,7 @@ export declare const ExtractionInput: Schema.Struct<{
|
|
|
149
150
|
}>>]>>>;
|
|
150
151
|
properties: Schema.optional<Schema.mutable<Schema.Record$<typeof Schema.String, typeof Schema.Any>>>;
|
|
151
152
|
}>>;
|
|
152
|
-
objects: Schema.optional<Schema.Array$<Schema.Schema<Expando,
|
|
153
|
+
objects: Schema.optional<Schema.Array$<Type.obj<Schema.Schema<import("@dxos/echo/internal").Expando, import("@dxos/echo/internal").ExpandoEncoded, never>>>>;
|
|
153
154
|
options: Schema.optional<Schema.Struct<{
|
|
154
155
|
timeout: Schema.optional<typeof Schema.Number>;
|
|
155
156
|
fallbackToRaw: Schema.optional<typeof Schema.Boolean>;
|
|
@@ -158,67 +159,68 @@ export declare const ExtractionInput: Schema.Struct<{
|
|
|
158
159
|
export interface ExtractionInput extends Schema.Schema.Type<typeof ExtractionInput> {
|
|
159
160
|
}
|
|
160
161
|
export declare const ExtractionOutput: Schema.Struct<{
|
|
161
|
-
message:
|
|
162
|
+
message: Type.obj<Schema.Struct<{
|
|
162
163
|
id: import("@dxos/keys").ObjectIdClass;
|
|
163
164
|
parentMessage: Schema.optional<import("@dxos/keys").ObjectIdClass>;
|
|
164
165
|
created: Schema.SchemaClass<string, string, never>;
|
|
165
166
|
sender: Schema.mutable<Schema.Struct<{
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
name?: string | undefined;
|
|
167
|
+
role: Schema.optional<Schema.Literal<["user", "assistant", "tool"]>>;
|
|
168
|
+
contact: Schema.optional<import("@dxos/echo/internal").RefSchema<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
169
|
+
image?: string | undefined;
|
|
170
|
+
fullName?: string | undefined;
|
|
171
|
+
preferredName?: string | undefined;
|
|
172
|
+
nickname?: string | undefined;
|
|
173
|
+
organization?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
174
174
|
description?: string | undefined;
|
|
175
|
+
name?: string | undefined;
|
|
175
176
|
status?: "prospect" | "qualified" | "active" | "commit" | "reject" | undefined;
|
|
176
177
|
image?: string | undefined;
|
|
177
178
|
website?: string | undefined;
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
value:
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
value:
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
value:
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
value:
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
}
|
|
216
|
-
|
|
179
|
+
location?: readonly [number, number, (number | undefined)?] | undefined;
|
|
180
|
+
}> | undefined;
|
|
181
|
+
jobTitle?: string | undefined;
|
|
182
|
+
department?: string | undefined;
|
|
183
|
+
notes?: string | undefined;
|
|
184
|
+
emails?: {
|
|
185
|
+
readonly value: string;
|
|
186
|
+
readonly label?: string | undefined;
|
|
187
|
+
}[] | undefined;
|
|
188
|
+
identities?: {
|
|
189
|
+
readonly value: string;
|
|
190
|
+
readonly label?: string | undefined;
|
|
191
|
+
}[] | undefined;
|
|
192
|
+
phoneNumbers?: {
|
|
193
|
+
readonly value: string;
|
|
194
|
+
readonly label?: string | undefined;
|
|
195
|
+
}[] | undefined;
|
|
196
|
+
fields?: {
|
|
197
|
+
readonly value: string;
|
|
198
|
+
readonly label: string;
|
|
199
|
+
readonly category?: string | undefined;
|
|
200
|
+
}[] | undefined;
|
|
201
|
+
addresses?: {
|
|
202
|
+
readonly value: {
|
|
203
|
+
readonly street?: string | undefined;
|
|
204
|
+
readonly extended?: string | undefined;
|
|
205
|
+
readonly locality?: string | undefined;
|
|
206
|
+
readonly region?: string | undefined;
|
|
207
|
+
readonly postalCode?: string | undefined;
|
|
208
|
+
readonly postOfficeBoxNumber?: string | undefined;
|
|
209
|
+
readonly country?: string | undefined;
|
|
210
|
+
};
|
|
211
|
+
readonly label?: string | undefined;
|
|
212
|
+
}[] | undefined;
|
|
213
|
+
urls?: {
|
|
214
|
+
readonly value: string;
|
|
215
|
+
readonly label?: string | undefined;
|
|
216
|
+
}[] | undefined;
|
|
217
|
+
birthday?: string | undefined;
|
|
218
|
+
location?: readonly [number, number, (number | undefined)?] | undefined;
|
|
219
|
+
}>>;
|
|
217
220
|
identityDid: Schema.optional<typeof Schema.String>;
|
|
218
221
|
identityKey: Schema.optional<typeof Schema.String>;
|
|
219
222
|
email: Schema.optional<typeof Schema.String>;
|
|
220
223
|
name: Schema.optional<typeof Schema.String>;
|
|
221
|
-
role: Schema.optional<Schema.Literal<["user", "assistant"]>>;
|
|
222
224
|
}>>;
|
|
223
225
|
blocks: Schema.mutable<Schema.Array$<Schema.Union<[Schema.mutable<Schema.TaggedStruct<"anchor", {
|
|
224
226
|
pending: Schema.optional<typeof Schema.Boolean>;
|
|
@@ -254,10 +256,7 @@ export declare const ExtractionOutput: Schema.Struct<{
|
|
|
254
256
|
signature: Schema.optional<typeof Schema.String>;
|
|
255
257
|
}>>, Schema.mutable<Schema.TaggedStruct<"reference", {
|
|
256
258
|
pending: Schema.optional<typeof Schema.Boolean>;
|
|
257
|
-
reference: import("@dxos/echo/
|
|
258
|
-
[x: string]: any;
|
|
259
|
-
id: string;
|
|
260
|
-
}, never>>;
|
|
259
|
+
reference: import("@dxos/echo/internal").RefSchema<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {}>;
|
|
261
260
|
}>>, Schema.mutable<Schema.TaggedStruct<"select", {
|
|
262
261
|
pending: Schema.optional<typeof Schema.Boolean>;
|
|
263
262
|
options: Schema.Array$<typeof Schema.String>;
|
|
@@ -292,12 +291,14 @@ export declare const ExtractionOutput: Schema.Struct<{
|
|
|
292
291
|
toolCallId: typeof Schema.String;
|
|
293
292
|
name: typeof Schema.String;
|
|
294
293
|
input: typeof Schema.String;
|
|
294
|
+
providerExecuted: typeof Schema.Boolean;
|
|
295
295
|
}>>, Schema.mutable<Schema.TaggedStruct<"toolResult", {
|
|
296
296
|
pending: Schema.optional<typeof Schema.Boolean>;
|
|
297
297
|
toolCallId: typeof Schema.String;
|
|
298
298
|
name: typeof Schema.String;
|
|
299
299
|
result: Schema.optional<typeof Schema.String>;
|
|
300
300
|
error: Schema.optional<typeof Schema.String>;
|
|
301
|
+
providerExecuted: typeof Schema.Boolean;
|
|
301
302
|
}>>, Schema.mutable<Schema.TaggedStruct<"transcript", {
|
|
302
303
|
pending: Schema.optional<typeof Schema.Boolean>;
|
|
303
304
|
started: typeof Schema.String;
|