@dxos/assistant 0.8.4-main.7ace549 → 0.8.4-main.937b3ca
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-7CDDG6LL.mjs +578 -0
- package/dist/lib/browser/chunk-7CDDG6LL.mjs.map +7 -0
- package/dist/lib/browser/extraction/index.mjs +3 -3
- package/dist/lib/browser/extraction/index.mjs.map +3 -3
- package/dist/lib/browser/index.mjs +239 -678
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +32 -0
- package/dist/lib/browser/testing/index.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-CC7ER6Q3.mjs +579 -0
- package/dist/lib/node-esm/chunk-CC7ER6Q3.mjs.map +7 -0
- package/dist/lib/node-esm/extraction/index.mjs +3 -3
- package/dist/lib/node-esm/extraction/index.mjs.map +3 -3
- package/dist/lib/node-esm/index.mjs +239 -678
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/testing/index.mjs +33 -0
- package/dist/lib/node-esm/testing/index.mjs.map +7 -0
- package/dist/types/src/conversation/context.d.ts +74 -42
- package/dist/types/src/conversation/context.d.ts.map +1 -1
- package/dist/types/src/conversation/context.test.d.ts +2 -0
- package/dist/types/src/conversation/context.test.d.ts.map +1 -0
- package/dist/types/src/conversation/conversation.d.ts +14 -14
- package/dist/types/src/conversation/conversation.d.ts.map +1 -1
- package/dist/types/src/conversation/conversation.test.d.ts +2 -0
- package/dist/types/src/conversation/conversation.test.d.ts.map +1 -0
- package/dist/types/src/errors.d.ts +12 -16
- package/dist/types/src/errors.d.ts.map +1 -1
- package/dist/types/src/extraction/extraction-ner-function/extraction-ner-function.d.ts +179 -178
- package/dist/types/src/extraction/extraction-ner-function/extraction-ner-function.d.ts.map +1 -1
- package/dist/types/src/extraction/extraction.d.ts +285 -241
- package/dist/types/src/extraction/extraction.d.ts.map +1 -1
- package/dist/types/src/extraction/quotes.d.ts +2 -2
- package/dist/types/src/extraction/quotes.d.ts.map +1 -1
- package/dist/types/src/functions/services.d.ts +3 -3
- package/dist/types/src/functions/services.d.ts.map +1 -1
- package/dist/types/src/functions.test.d.ts +2 -0
- package/dist/types/src/functions.test.d.ts.map +1 -0
- package/dist/types/src/session/GenericToolkit.d.ts +1 -0
- package/dist/types/src/session/GenericToolkit.d.ts.map +1 -1
- package/dist/types/src/session/format.d.ts +3 -3
- package/dist/types/src/session/format.d.ts.map +1 -1
- package/dist/types/src/session/observer.d.ts +4 -3
- package/dist/types/src/session/observer.d.ts.map +1 -1
- package/dist/types/src/session/session.d.ts +14 -9
- package/dist/types/src/session/session.d.ts.map +1 -1
- package/dist/types/src/session/toolkit.d.ts +5 -6
- package/dist/types/src/session/toolkit.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/testing/index.d.ts +2 -0
- package/dist/types/src/testing/index.d.ts.map +1 -0
- package/dist/types/src/testing/layer.d.ts +21 -0
- package/dist/types/src/testing/layer.d.ts.map +1 -0
- package/dist/types/src/types/artifact.d.ts +12 -3
- package/dist/types/src/types/artifact.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +38 -29
- package/src/conversation/context.test.ts +46 -0
- package/src/conversation/context.ts +183 -65
- package/src/conversation/conversation.test.ts +65 -0
- package/src/conversation/conversation.ts +46 -49
- package/src/diff.test.ts +1 -1
- package/src/errors.ts +2 -2
- package/src/execution-graph.ts +2 -2
- package/src/extraction/extraction-ner-function/extraction-ner-function.test.ts +3 -3
- package/src/extraction/extraction-ner-function/extraction-ner-function.ts +1 -1
- package/src/extraction/extraction.ts +3 -3
- package/src/extraction/quotes.ts +3 -4
- package/src/functions/services.ts +28 -10
- package/src/functions.conversations.json +1 -0
- package/src/functions.test.ts +74 -0
- package/src/session/GenericToolkit.ts +1 -0
- package/src/session/format.test.ts +101 -38
- package/src/session/format.ts +11 -12
- package/src/session/observer.ts +3 -1
- package/src/session/session.conversations.json +1 -1
- package/src/session/session.test.ts +7 -13
- package/src/session/session.ts +33 -12
- package/src/session/toolkit.ts +13 -22
- package/src/session/version-pin.ts +2 -2
- package/src/testing/index.ts +5 -0
- package/src/testing/layer.ts +78 -0
- package/src/types/artifact.ts +18 -6
|
@@ -3,46 +3,48 @@ import { Type } from '@dxos/echo';
|
|
|
3
3
|
import { type FunctionDefinition } from '@dxos/functions';
|
|
4
4
|
import { type FunctionExecutor } from '@dxos/functions-runtime';
|
|
5
5
|
export declare const ExtractionInput: Schema.Struct<{
|
|
6
|
-
message: Type.
|
|
7
|
-
id:
|
|
8
|
-
parentMessage
|
|
9
|
-
created:
|
|
10
|
-
sender:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
6
|
+
message: Type.Obj<{
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly parentMessage?: string | undefined;
|
|
9
|
+
readonly created: string;
|
|
10
|
+
readonly sender: {
|
|
11
|
+
name?: string | undefined;
|
|
12
|
+
role?: "user" | "assistant" | "tool" | undefined;
|
|
13
|
+
contact?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
14
|
+
readonly image?: string | undefined;
|
|
15
|
+
readonly fullName?: string | undefined;
|
|
16
|
+
readonly preferredName?: string | undefined;
|
|
17
|
+
readonly nickname?: string | undefined;
|
|
18
|
+
readonly organization?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
19
|
+
readonly description?: string | undefined;
|
|
20
|
+
readonly name?: string | undefined;
|
|
21
|
+
readonly status?: "prospect" | "qualified" | "active" | "commit" | "reject" | undefined;
|
|
22
|
+
readonly image?: string | undefined;
|
|
23
|
+
readonly website?: string | undefined;
|
|
24
|
+
} & {
|
|
25
|
+
readonly location?: readonly [number, number, (number | undefined)?] | undefined;
|
|
24
26
|
}> | undefined;
|
|
25
|
-
jobTitle?: string | undefined;
|
|
26
|
-
department?: string | undefined;
|
|
27
|
-
notes?: string | undefined;
|
|
28
|
-
emails?: {
|
|
27
|
+
readonly jobTitle?: string | undefined;
|
|
28
|
+
readonly department?: string | undefined;
|
|
29
|
+
readonly notes?: string | undefined;
|
|
30
|
+
readonly emails?: {
|
|
29
31
|
readonly value: string;
|
|
30
32
|
readonly label?: string | undefined;
|
|
31
33
|
}[] | undefined;
|
|
32
|
-
identities?: {
|
|
34
|
+
readonly identities?: {
|
|
33
35
|
readonly value: string;
|
|
34
36
|
readonly label?: string | undefined;
|
|
35
37
|
}[] | undefined;
|
|
36
|
-
phoneNumbers?: {
|
|
38
|
+
readonly phoneNumbers?: {
|
|
37
39
|
readonly value: string;
|
|
38
40
|
readonly label?: string | undefined;
|
|
39
41
|
}[] | undefined;
|
|
40
|
-
fields?: {
|
|
42
|
+
readonly fields?: {
|
|
41
43
|
readonly value: string;
|
|
42
44
|
readonly label: string;
|
|
43
45
|
readonly category?: string | undefined;
|
|
44
46
|
}[] | undefined;
|
|
45
|
-
addresses?: {
|
|
47
|
+
readonly addresses?: {
|
|
46
48
|
readonly value: {
|
|
47
49
|
readonly street?: string | undefined;
|
|
48
50
|
readonly extended?: string | undefined;
|
|
@@ -54,103 +56,125 @@ export declare const ExtractionInput: Schema.Struct<{
|
|
|
54
56
|
};
|
|
55
57
|
readonly label?: string | undefined;
|
|
56
58
|
}[] | undefined;
|
|
57
|
-
urls?: {
|
|
59
|
+
readonly urls?: {
|
|
58
60
|
readonly value: string;
|
|
59
61
|
readonly label?: string | undefined;
|
|
60
62
|
}[] | undefined;
|
|
61
|
-
birthday?: string | undefined;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
blocks:
|
|
70
|
-
pending
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
pending
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
pending
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
63
|
+
readonly birthday?: string | undefined;
|
|
64
|
+
} & {
|
|
65
|
+
readonly location?: readonly [number, number, (number | undefined)?] | undefined;
|
|
66
|
+
}> | undefined;
|
|
67
|
+
identityDid?: string | undefined;
|
|
68
|
+
identityKey?: string | undefined;
|
|
69
|
+
email?: string | undefined;
|
|
70
|
+
};
|
|
71
|
+
readonly blocks: ({
|
|
72
|
+
pending?: boolean | undefined;
|
|
73
|
+
text: string;
|
|
74
|
+
mimeType?: string | undefined;
|
|
75
|
+
disposition?: string | undefined;
|
|
76
|
+
_tag: "text";
|
|
77
|
+
} | {
|
|
78
|
+
pending?: boolean | undefined;
|
|
79
|
+
_tag: "reasoning";
|
|
80
|
+
reasoningText?: string | undefined;
|
|
81
|
+
redactedText?: string | undefined;
|
|
82
|
+
signature?: string | undefined;
|
|
83
|
+
} | {
|
|
84
|
+
name: string;
|
|
85
|
+
pending?: boolean | undefined;
|
|
86
|
+
_tag: "toolCall";
|
|
87
|
+
toolCallId: string;
|
|
88
|
+
input: string;
|
|
89
|
+
providerExecuted: boolean;
|
|
90
|
+
} | {
|
|
91
|
+
name: string;
|
|
92
|
+
pending?: boolean | undefined;
|
|
93
|
+
_tag: "toolResult";
|
|
94
|
+
toolCallId: string;
|
|
95
|
+
providerExecuted: boolean;
|
|
96
|
+
result?: string | undefined;
|
|
97
|
+
error?: string | undefined;
|
|
98
|
+
} | {
|
|
99
|
+
pending?: boolean | undefined;
|
|
100
|
+
mimeType?: string | undefined;
|
|
101
|
+
_tag: "summary";
|
|
102
|
+
message?: string | undefined;
|
|
103
|
+
model?: string | undefined;
|
|
104
|
+
usage?: {
|
|
105
|
+
readonly inputTokens?: number | undefined;
|
|
106
|
+
readonly outputTokens?: number | undefined;
|
|
107
|
+
readonly totalTokens?: number | undefined;
|
|
108
|
+
} | undefined;
|
|
109
|
+
toolCalls?: number | undefined;
|
|
110
|
+
errors?: number | undefined;
|
|
111
|
+
duration?: number | undefined;
|
|
112
|
+
} | {
|
|
113
|
+
source?: {
|
|
114
|
+
type: "base64";
|
|
115
|
+
mediaType: string;
|
|
116
|
+
data: string;
|
|
117
|
+
} | {
|
|
118
|
+
type: "http";
|
|
119
|
+
url: string;
|
|
120
|
+
} | undefined;
|
|
121
|
+
id?: string | undefined;
|
|
122
|
+
pending?: boolean | undefined;
|
|
123
|
+
_tag: "image";
|
|
124
|
+
} | {
|
|
125
|
+
name?: string | undefined;
|
|
126
|
+
pending?: boolean | undefined;
|
|
127
|
+
_tag: "file";
|
|
128
|
+
mediaType?: string | undefined;
|
|
129
|
+
url: string;
|
|
130
|
+
} | {
|
|
131
|
+
pending?: boolean | undefined;
|
|
132
|
+
_tag: "reference";
|
|
133
|
+
reference: import("@dxos/echo/internal").Ref<any>;
|
|
134
|
+
} | {
|
|
135
|
+
pending?: boolean | undefined;
|
|
136
|
+
text: string;
|
|
137
|
+
_tag: "transcript";
|
|
138
|
+
started: string;
|
|
139
|
+
} | {
|
|
140
|
+
pending?: boolean | undefined;
|
|
141
|
+
_tag: "status";
|
|
142
|
+
statusText: string;
|
|
143
|
+
} | {
|
|
144
|
+
pending?: boolean | undefined;
|
|
145
|
+
text: string;
|
|
146
|
+
_tag: "suggestion";
|
|
147
|
+
} | {
|
|
148
|
+
pending?: boolean | undefined;
|
|
149
|
+
_tag: "select";
|
|
150
|
+
options: string[];
|
|
151
|
+
} | {
|
|
152
|
+
version: unknown;
|
|
153
|
+
pending?: boolean | undefined;
|
|
154
|
+
_tag: "anchor";
|
|
155
|
+
objectId: string;
|
|
156
|
+
} | {
|
|
157
|
+
pending?: boolean | undefined;
|
|
158
|
+
text: string;
|
|
159
|
+
_tag: "proposal";
|
|
160
|
+
} | {
|
|
161
|
+
pending?: boolean | undefined;
|
|
162
|
+
_tag: "toolkit";
|
|
163
|
+
} | {
|
|
164
|
+
pending?: boolean | undefined;
|
|
165
|
+
disposition?: string | undefined;
|
|
166
|
+
_tag: "json";
|
|
167
|
+
data: string;
|
|
168
|
+
})[];
|
|
169
|
+
readonly properties?: {
|
|
170
|
+
[x: string]: any;
|
|
171
|
+
} | undefined;
|
|
172
|
+
}, Schema.Struct.Fields>;
|
|
173
|
+
objects: Schema.optional<Schema.Array$<Schema.Schema<any, {
|
|
174
|
+
id: string;
|
|
175
|
+
} & import("@dxos/echo/internal").AnyProperties, never> & {
|
|
176
|
+
readonly "~@dxos/echo/SchemaKind": import("@dxos/echo/internal").EntityKind.Object;
|
|
177
|
+
} & import("@dxos/echo/internal").TypeMeta>>;
|
|
154
178
|
options: Schema.optional<Schema.Struct<{
|
|
155
179
|
timeout: Schema.optional<typeof Schema.Number>;
|
|
156
180
|
fallbackToRaw: Schema.optional<typeof Schema.Boolean>;
|
|
@@ -159,46 +183,48 @@ export declare const ExtractionInput: Schema.Struct<{
|
|
|
159
183
|
export interface ExtractionInput extends Schema.Schema.Type<typeof ExtractionInput> {
|
|
160
184
|
}
|
|
161
185
|
export declare const ExtractionOutput: Schema.Struct<{
|
|
162
|
-
message: Type.
|
|
163
|
-
id:
|
|
164
|
-
parentMessage
|
|
165
|
-
created:
|
|
166
|
-
sender:
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
186
|
+
message: Type.Obj<{
|
|
187
|
+
readonly id: string;
|
|
188
|
+
readonly parentMessage?: string | undefined;
|
|
189
|
+
readonly created: string;
|
|
190
|
+
readonly sender: {
|
|
191
|
+
name?: string | undefined;
|
|
192
|
+
role?: "user" | "assistant" | "tool" | undefined;
|
|
193
|
+
contact?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
194
|
+
readonly image?: string | undefined;
|
|
195
|
+
readonly fullName?: string | undefined;
|
|
196
|
+
readonly preferredName?: string | undefined;
|
|
197
|
+
readonly nickname?: string | undefined;
|
|
198
|
+
readonly organization?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
199
|
+
readonly description?: string | undefined;
|
|
200
|
+
readonly name?: string | undefined;
|
|
201
|
+
readonly status?: "prospect" | "qualified" | "active" | "commit" | "reject" | undefined;
|
|
202
|
+
readonly image?: string | undefined;
|
|
203
|
+
readonly website?: string | undefined;
|
|
204
|
+
} & {
|
|
205
|
+
readonly location?: readonly [number, number, (number | undefined)?] | undefined;
|
|
180
206
|
}> | undefined;
|
|
181
|
-
jobTitle?: string | undefined;
|
|
182
|
-
department?: string | undefined;
|
|
183
|
-
notes?: string | undefined;
|
|
184
|
-
emails?: {
|
|
207
|
+
readonly jobTitle?: string | undefined;
|
|
208
|
+
readonly department?: string | undefined;
|
|
209
|
+
readonly notes?: string | undefined;
|
|
210
|
+
readonly emails?: {
|
|
185
211
|
readonly value: string;
|
|
186
212
|
readonly label?: string | undefined;
|
|
187
213
|
}[] | undefined;
|
|
188
|
-
identities?: {
|
|
214
|
+
readonly identities?: {
|
|
189
215
|
readonly value: string;
|
|
190
216
|
readonly label?: string | undefined;
|
|
191
217
|
}[] | undefined;
|
|
192
|
-
phoneNumbers?: {
|
|
218
|
+
readonly phoneNumbers?: {
|
|
193
219
|
readonly value: string;
|
|
194
220
|
readonly label?: string | undefined;
|
|
195
221
|
}[] | undefined;
|
|
196
|
-
fields?: {
|
|
222
|
+
readonly fields?: {
|
|
197
223
|
readonly value: string;
|
|
198
224
|
readonly label: string;
|
|
199
225
|
readonly category?: string | undefined;
|
|
200
226
|
}[] | undefined;
|
|
201
|
-
addresses?: {
|
|
227
|
+
readonly addresses?: {
|
|
202
228
|
readonly value: {
|
|
203
229
|
readonly street?: string | undefined;
|
|
204
230
|
readonly extended?: string | undefined;
|
|
@@ -210,107 +236,125 @@ export declare const ExtractionOutput: Schema.Struct<{
|
|
|
210
236
|
};
|
|
211
237
|
readonly label?: string | undefined;
|
|
212
238
|
}[] | undefined;
|
|
213
|
-
urls?: {
|
|
239
|
+
readonly urls?: {
|
|
214
240
|
readonly value: string;
|
|
215
241
|
readonly label?: string | undefined;
|
|
216
242
|
}[] | undefined;
|
|
217
|
-
birthday?: string | undefined;
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
}
|
|
225
|
-
blocks:
|
|
226
|
-
pending
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
pending
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
}
|
|
253
|
-
pending
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
243
|
+
readonly birthday?: string | undefined;
|
|
244
|
+
} & {
|
|
245
|
+
readonly location?: readonly [number, number, (number | undefined)?] | undefined;
|
|
246
|
+
}> | undefined;
|
|
247
|
+
identityDid?: string | undefined;
|
|
248
|
+
identityKey?: string | undefined;
|
|
249
|
+
email?: string | undefined;
|
|
250
|
+
};
|
|
251
|
+
readonly blocks: ({
|
|
252
|
+
pending?: boolean | undefined;
|
|
253
|
+
text: string;
|
|
254
|
+
mimeType?: string | undefined;
|
|
255
|
+
disposition?: string | undefined;
|
|
256
|
+
_tag: "text";
|
|
257
|
+
} | {
|
|
258
|
+
pending?: boolean | undefined;
|
|
259
|
+
_tag: "reasoning";
|
|
260
|
+
reasoningText?: string | undefined;
|
|
261
|
+
redactedText?: string | undefined;
|
|
262
|
+
signature?: string | undefined;
|
|
263
|
+
} | {
|
|
264
|
+
name: string;
|
|
265
|
+
pending?: boolean | undefined;
|
|
266
|
+
_tag: "toolCall";
|
|
267
|
+
toolCallId: string;
|
|
268
|
+
input: string;
|
|
269
|
+
providerExecuted: boolean;
|
|
270
|
+
} | {
|
|
271
|
+
name: string;
|
|
272
|
+
pending?: boolean | undefined;
|
|
273
|
+
_tag: "toolResult";
|
|
274
|
+
toolCallId: string;
|
|
275
|
+
providerExecuted: boolean;
|
|
276
|
+
result?: string | undefined;
|
|
277
|
+
error?: string | undefined;
|
|
278
|
+
} | {
|
|
279
|
+
pending?: boolean | undefined;
|
|
280
|
+
mimeType?: string | undefined;
|
|
281
|
+
_tag: "summary";
|
|
282
|
+
message?: string | undefined;
|
|
283
|
+
model?: string | undefined;
|
|
284
|
+
usage?: {
|
|
285
|
+
readonly inputTokens?: number | undefined;
|
|
286
|
+
readonly outputTokens?: number | undefined;
|
|
287
|
+
readonly totalTokens?: number | undefined;
|
|
288
|
+
} | undefined;
|
|
289
|
+
toolCalls?: number | undefined;
|
|
290
|
+
errors?: number | undefined;
|
|
291
|
+
duration?: number | undefined;
|
|
292
|
+
} | {
|
|
293
|
+
source?: {
|
|
294
|
+
type: "base64";
|
|
295
|
+
mediaType: string;
|
|
296
|
+
data: string;
|
|
297
|
+
} | {
|
|
298
|
+
type: "http";
|
|
299
|
+
url: string;
|
|
300
|
+
} | undefined;
|
|
301
|
+
id?: string | undefined;
|
|
302
|
+
pending?: boolean | undefined;
|
|
303
|
+
_tag: "image";
|
|
304
|
+
} | {
|
|
305
|
+
name?: string | undefined;
|
|
306
|
+
pending?: boolean | undefined;
|
|
307
|
+
_tag: "file";
|
|
308
|
+
mediaType?: string | undefined;
|
|
309
|
+
url: string;
|
|
310
|
+
} | {
|
|
311
|
+
pending?: boolean | undefined;
|
|
312
|
+
_tag: "reference";
|
|
313
|
+
reference: import("@dxos/echo/internal").Ref<any>;
|
|
314
|
+
} | {
|
|
315
|
+
pending?: boolean | undefined;
|
|
316
|
+
text: string;
|
|
317
|
+
_tag: "transcript";
|
|
318
|
+
started: string;
|
|
319
|
+
} | {
|
|
320
|
+
pending?: boolean | undefined;
|
|
321
|
+
_tag: "status";
|
|
322
|
+
statusText: string;
|
|
323
|
+
} | {
|
|
324
|
+
pending?: boolean | undefined;
|
|
325
|
+
text: string;
|
|
326
|
+
_tag: "suggestion";
|
|
327
|
+
} | {
|
|
328
|
+
pending?: boolean | undefined;
|
|
329
|
+
_tag: "select";
|
|
330
|
+
options: string[];
|
|
331
|
+
} | {
|
|
332
|
+
version: unknown;
|
|
333
|
+
pending?: boolean | undefined;
|
|
334
|
+
_tag: "anchor";
|
|
335
|
+
objectId: string;
|
|
336
|
+
} | {
|
|
337
|
+
pending?: boolean | undefined;
|
|
338
|
+
text: string;
|
|
339
|
+
_tag: "proposal";
|
|
340
|
+
} | {
|
|
341
|
+
pending?: boolean | undefined;
|
|
342
|
+
_tag: "toolkit";
|
|
343
|
+
} | {
|
|
344
|
+
pending?: boolean | undefined;
|
|
345
|
+
disposition?: string | undefined;
|
|
346
|
+
_tag: "json";
|
|
347
|
+
data: string;
|
|
348
|
+
})[];
|
|
349
|
+
readonly properties?: {
|
|
350
|
+
[x: string]: any;
|
|
351
|
+
} | undefined;
|
|
352
|
+
}, Schema.Struct.Fields>;
|
|
309
353
|
timeElapsed: typeof Schema.Number;
|
|
310
354
|
}>;
|
|
311
355
|
export interface ExtractionOutput extends Schema.Schema.Type<typeof ExtractionOutput> {
|
|
312
356
|
}
|
|
313
|
-
export type
|
|
357
|
+
export type ProcessTranscriptMessageProps = {
|
|
314
358
|
input: ExtractionInput;
|
|
315
359
|
function: FunctionDefinition<ExtractionInput, ExtractionOutput>;
|
|
316
360
|
executor: FunctionExecutor;
|
|
@@ -331,5 +375,5 @@ export type ExtractionFunction = FunctionDefinition<ExtractionInput, ExtractionO
|
|
|
331
375
|
/**
|
|
332
376
|
* Extract entities from the transcript message and add them to the message.
|
|
333
377
|
*/
|
|
334
|
-
export declare const processTranscriptMessage: (params:
|
|
378
|
+
export declare const processTranscriptMessage: (params: ProcessTranscriptMessageProps) => Promise<ExtractionOutput>;
|
|
335
379
|
//# sourceMappingURL=extraction.d.ts.map
|
|
@@ -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,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAIhE,eAAO,MAAM,eAAe
|
|
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,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAIhE,eAAO,MAAM,eAAe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