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