@dxos/assistant 0.8.4-main.c85a9c8dae → 0.8.4-main.d05539e30a

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.
Files changed (156) hide show
  1. package/LICENSE +102 -5
  2. package/README.md +1 -1
  3. package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
  4. package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +7 -0
  5. package/dist/lib/neutral/extraction/index.mjs +31 -50
  6. package/dist/lib/neutral/extraction/index.mjs.map +4 -4
  7. package/dist/lib/neutral/index.mjs +1531 -1080
  8. package/dist/lib/neutral/index.mjs.map +4 -4
  9. package/dist/lib/neutral/meta.json +1 -1
  10. package/dist/types/src/extraction/extraction-ner-function/index.d.ts +0 -1
  11. package/dist/types/src/extraction/extraction-ner-function/index.d.ts.map +1 -1
  12. package/dist/types/src/extraction/extraction-ner-function/named-entity-recognition.d.ts.map +1 -1
  13. package/dist/types/src/extraction/extraction.d.ts +879 -153
  14. package/dist/types/src/extraction/extraction.d.ts.map +1 -1
  15. package/dist/types/src/extraction/index.d.ts +0 -1
  16. package/dist/types/src/extraction/index.d.ts.map +1 -1
  17. package/dist/types/src/extraction/quotes.d.ts.map +1 -1
  18. package/dist/types/src/functions/services.d.ts +14 -16
  19. package/dist/types/src/functions/services.d.ts.map +1 -1
  20. package/dist/types/src/index.d.ts +2 -5
  21. package/dist/types/src/index.d.ts.map +1 -1
  22. package/dist/types/src/request/AiRequest.d.ts +106 -0
  23. package/dist/types/src/request/AiRequest.d.ts.map +1 -0
  24. package/dist/types/src/request/artifact-diff.d.ts.map +1 -0
  25. package/dist/types/src/request/format.d.ts +15 -0
  26. package/dist/types/src/request/format.d.ts.map +1 -0
  27. package/dist/types/src/request/index.d.ts +4 -0
  28. package/dist/types/src/request/index.d.ts.map +1 -0
  29. package/dist/types/src/{session → request}/observer.d.ts.map +1 -1
  30. package/dist/types/src/{session → request}/version-pin.d.ts.map +1 -1
  31. package/dist/types/src/{conversation/context.d.ts → session/AiContext.d.ts} +41 -33
  32. package/dist/types/src/session/AiContext.d.ts.map +1 -0
  33. package/dist/types/src/session/AiContext.test.d.ts +2 -0
  34. package/dist/types/src/session/AiContext.test.d.ts.map +1 -0
  35. package/dist/types/src/session/AiSession.d.ts +73 -0
  36. package/dist/types/src/session/AiSession.d.ts.map +1 -0
  37. package/dist/types/src/session/index.d.ts +2 -5
  38. package/dist/types/src/session/index.d.ts.map +1 -1
  39. package/dist/types/src/session/toolkit.d.ts +5 -7
  40. package/dist/types/src/session/toolkit.d.ts.map +1 -1
  41. package/dist/types/src/templates/system.d.ts +1 -2
  42. package/dist/types/src/templates/system.d.ts.map +1 -1
  43. package/dist/types/src/{types → util}/artifact.d.ts +1 -2
  44. package/dist/types/src/util/artifact.d.ts.map +1 -0
  45. package/dist/types/src/util/diff.d.ts.map +1 -0
  46. package/dist/types/src/{diff.test.d.ts.map → util/diff.test.d.ts.map} +1 -1
  47. package/dist/types/src/util/error-handling.d.ts.map +1 -0
  48. package/dist/types/src/{errors.d.ts → util/errors.d.ts} +12 -12
  49. package/dist/types/src/util/errors.d.ts.map +1 -0
  50. package/dist/types/src/util/execution-graph.d.ts.map +1 -0
  51. package/dist/types/src/util/execution-graph.test.d.ts.map +1 -0
  52. package/dist/types/src/util/index.d.ts +7 -0
  53. package/dist/types/src/util/index.d.ts.map +1 -0
  54. package/dist/types/src/util/tracing.d.ts +237 -0
  55. package/dist/types/src/util/tracing.d.ts.map +1 -0
  56. package/dist/types/tsconfig.tsbuildinfo +1 -1
  57. package/package.json +25 -41
  58. package/src/extraction/extraction-ner-function/index.ts +0 -1
  59. package/src/extraction/extraction.ts +36 -8
  60. package/src/extraction/index.ts +0 -1
  61. package/src/functions/services.ts +58 -53
  62. package/src/index.ts +2 -5
  63. package/src/request/AiRequest.ts +386 -0
  64. package/src/{session → request}/format.ts +15 -11
  65. package/src/request/index.ts +8 -0
  66. package/src/session/AiContext.test.ts +53 -0
  67. package/src/{conversation/context.ts → session/AiContext.ts} +145 -72
  68. package/src/session/AiSession.ts +324 -0
  69. package/src/session/index.ts +3 -5
  70. package/src/session/toolkit.ts +18 -15
  71. package/src/templates/instructions/system.tpl +50 -2
  72. package/src/templates/system.ts +7 -6
  73. package/src/{types → util}/artifact.ts +2 -3
  74. package/src/{diff.test.ts → util/diff.test.ts} +3 -3
  75. package/src/{session → util}/error-handling.ts +3 -2
  76. package/src/{execution-graph.test.ts → util/execution-graph.test.ts} +1 -1
  77. package/src/{execution-graph.ts → util/execution-graph.ts} +16 -6
  78. package/src/util/index.ts +10 -0
  79. package/src/util/tracing.ts +57 -0
  80. package/dist/lib/neutral/chunk-BE6SRJ4N.mjs +0 -193
  81. package/dist/lib/neutral/chunk-BE6SRJ4N.mjs.map +0 -7
  82. package/dist/lib/neutral/testing/index.mjs +0 -38
  83. package/dist/lib/neutral/testing/index.mjs.map +0 -7
  84. package/dist/types/src/conversation/context.d.ts.map +0 -1
  85. package/dist/types/src/conversation/context.test.d.ts +0 -2
  86. package/dist/types/src/conversation/context.test.d.ts.map +0 -1
  87. package/dist/types/src/conversation/conversation.d.ts +0 -66
  88. package/dist/types/src/conversation/conversation.d.ts.map +0 -1
  89. package/dist/types/src/conversation/conversation.test.d.ts +0 -2
  90. package/dist/types/src/conversation/conversation.test.d.ts.map +0 -1
  91. package/dist/types/src/conversation/index.d.ts +0 -3
  92. package/dist/types/src/conversation/index.d.ts.map +0 -1
  93. package/dist/types/src/diff.d.ts.map +0 -1
  94. package/dist/types/src/errors.d.ts.map +0 -1
  95. package/dist/types/src/execution-graph.d.ts.map +0 -1
  96. package/dist/types/src/execution-graph.test.d.ts.map +0 -1
  97. package/dist/types/src/extraction/extraction-llm-function/extraction-llm-function.d.ts +0 -4
  98. package/dist/types/src/extraction/extraction-llm-function/extraction-llm-function.d.ts.map +0 -1
  99. package/dist/types/src/extraction/extraction-llm-function/extraction-llm-function.test.d.ts +0 -2
  100. package/dist/types/src/extraction/extraction-llm-function/extraction-llm-function.test.d.ts.map +0 -1
  101. package/dist/types/src/extraction/extraction-llm-function/index.d.ts +0 -2
  102. package/dist/types/src/extraction/extraction-llm-function/index.d.ts.map +0 -1
  103. package/dist/types/src/extraction/extraction-ner-function/extraction-ner-function.d.ts +0 -355
  104. package/dist/types/src/extraction/extraction-ner-function/extraction-ner-function.d.ts.map +0 -1
  105. package/dist/types/src/extraction/extraction-ner-function/extraction-ner-function.test.d.ts +0 -2
  106. package/dist/types/src/extraction/extraction-ner-function/extraction-ner-function.test.d.ts.map +0 -1
  107. package/dist/types/src/functions.test.d.ts +0 -2
  108. package/dist/types/src/functions.test.d.ts.map +0 -1
  109. package/dist/types/src/session/artifact-diff.d.ts.map +0 -1
  110. package/dist/types/src/session/error-handling.d.ts.map +0 -1
  111. package/dist/types/src/session/format.d.ts +0 -12
  112. package/dist/types/src/session/format.d.ts.map +0 -1
  113. package/dist/types/src/session/format.test.d.ts +0 -2
  114. package/dist/types/src/session/format.test.d.ts.map +0 -1
  115. package/dist/types/src/session/session.d.ts +0 -61
  116. package/dist/types/src/session/session.d.ts.map +0 -1
  117. package/dist/types/src/session/session.test.d.ts +0 -2
  118. package/dist/types/src/session/session.test.d.ts.map +0 -1
  119. package/dist/types/src/testing/index.d.ts +0 -2
  120. package/dist/types/src/testing/index.d.ts.map +0 -1
  121. package/dist/types/src/testing/layer.d.ts +0 -22
  122. package/dist/types/src/testing/layer.d.ts.map +0 -1
  123. package/dist/types/src/types/artifact.d.ts.map +0 -1
  124. package/dist/types/src/types/index.d.ts +0 -2
  125. package/dist/types/src/types/index.d.ts.map +0 -1
  126. package/src/conversation/context.test.ts +0 -46
  127. package/src/conversation/conversation.test.ts +0 -65
  128. package/src/conversation/conversation.ts +0 -247
  129. package/src/conversation/index.ts +0 -6
  130. package/src/extraction/extraction-llm-function/extraction-llm-function.test.ts +0 -84
  131. package/src/extraction/extraction-llm-function/extraction-llm-function.ts +0 -62
  132. package/src/extraction/extraction-llm-function/index.ts +0 -5
  133. package/src/extraction/extraction-ner-function/extraction-ner-function.test.ts +0 -116
  134. package/src/extraction/extraction-ner-function/extraction-ner-function.ts +0 -56
  135. package/src/functions.conversations.json +0 -1
  136. package/src/functions.test.ts +0 -74
  137. package/src/session/format.test.ts +0 -124
  138. package/src/session/session.conversations.json +0 -1
  139. package/src/session/session.test.ts +0 -191
  140. package/src/session/session.ts +0 -251
  141. package/src/testing/index.ts +0 -5
  142. package/src/testing/layer.ts +0 -85
  143. package/src/types/index.ts +0 -5
  144. /package/dist/types/src/{session → request}/artifact-diff.d.ts +0 -0
  145. /package/dist/types/src/{session → request}/observer.d.ts +0 -0
  146. /package/dist/types/src/{session → request}/version-pin.d.ts +0 -0
  147. /package/dist/types/src/{diff.d.ts → util/diff.d.ts} +0 -0
  148. /package/dist/types/src/{diff.test.d.ts → util/diff.test.d.ts} +0 -0
  149. /package/dist/types/src/{session → util}/error-handling.d.ts +0 -0
  150. /package/dist/types/src/{execution-graph.d.ts → util/execution-graph.d.ts} +0 -0
  151. /package/dist/types/src/{execution-graph.test.d.ts → util/execution-graph.test.d.ts} +0 -0
  152. /package/src/{session → request}/artifact-diff.ts +0 -0
  153. /package/src/{session → request}/observer.ts +0 -0
  154. /package/src/{session → request}/version-pin.ts +0 -0
  155. /package/src/{diff.ts → util/diff.ts} +0 -0
  156. /package/src/{errors.ts → util/errors.ts} +0 -0
@@ -1,24 +1,23 @@
1
1
  import * as Schema from 'effect/Schema';
2
+ import { Operation } from '@dxos/compute';
2
3
  import { Obj } from '@dxos/echo';
3
- import { type FunctionDefinition } from '@dxos/functions';
4
- import { type FunctionExecutor } from '@dxos/functions-runtime';
5
4
  export declare const ExtractionInput: Schema.Struct<{
6
5
  message: import("@dxos/echo/Type").Obj<{
7
6
  readonly id: string;
8
7
  readonly parentMessage?: string | undefined;
8
+ readonly threadId?: string | undefined;
9
9
  readonly created: string;
10
10
  readonly sender: {
11
- readonly name?: string | undefined;
12
- readonly role?: "user" | "assistant" | "tool" | undefined;
11
+ readonly role?: "assistant" | "tool" | "user" | undefined;
13
12
  readonly contact?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
14
- readonly image?: string | undefined;
15
13
  readonly fullName?: string | undefined;
16
14
  readonly preferredName?: string | undefined;
17
15
  readonly nickname?: string | undefined;
16
+ readonly image?: string | undefined;
18
17
  readonly organization?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
19
- readonly description?: string | undefined;
20
18
  readonly name?: string | undefined;
21
- readonly status?: "prospect" | "qualified" | "active" | "commit" | "reject" | undefined;
19
+ readonly description?: string | undefined;
20
+ readonly status?: "active" | "commit" | "prospect" | "qualified" | "reject" | undefined;
22
21
  readonly image?: string | undefined;
23
22
  readonly website?: string | undefined;
24
23
  } & {
@@ -28,23 +27,19 @@ export declare const ExtractionInput: Schema.Struct<{
28
27
  readonly department?: string | undefined;
29
28
  readonly notes?: string | undefined;
30
29
  readonly emails?: readonly {
31
- readonly value: string;
32
30
  readonly label?: string | undefined;
31
+ readonly value: string;
33
32
  }[] | undefined;
34
33
  readonly identities?: readonly {
35
- readonly value: string;
36
34
  readonly label?: string | undefined;
35
+ readonly value: string;
37
36
  }[] | undefined;
38
37
  readonly phoneNumbers?: readonly {
39
- readonly value: string;
40
38
  readonly label?: string | undefined;
41
- }[] | undefined;
42
- readonly fields?: readonly {
43
39
  readonly value: string;
44
- readonly label: string;
45
- readonly category?: string | undefined;
46
40
  }[] | undefined;
47
41
  readonly addresses?: readonly {
42
+ readonly label?: string | undefined;
48
43
  readonly value: {
49
44
  readonly street?: string | undefined;
50
45
  readonly extended?: string | undefined;
@@ -54,62 +49,40 @@ export declare const ExtractionInput: Schema.Struct<{
54
49
  readonly postOfficeBoxNumber?: string | undefined;
55
50
  readonly country?: string | undefined;
56
51
  };
57
- readonly label?: string | undefined;
58
52
  }[] | undefined;
59
53
  readonly urls?: readonly {
60
- readonly value: string;
61
54
  readonly label?: string | undefined;
55
+ readonly value: string;
62
56
  }[] | undefined;
63
57
  readonly birthday?: string | undefined;
58
+ readonly fields?: readonly {
59
+ readonly category?: string | undefined;
60
+ readonly label: string;
61
+ readonly value: string;
62
+ }[] | undefined;
64
63
  } & {
65
64
  readonly location?: readonly [number, number, (number | undefined)?] | undefined;
66
65
  }> | undefined;
67
66
  readonly identityDid?: string | undefined;
68
67
  readonly identityKey?: string | undefined;
69
68
  readonly email?: string | undefined;
69
+ readonly name?: string | undefined;
70
70
  };
71
71
  readonly blocks: readonly ({
72
+ readonly _tag: "anchor";
72
73
  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;
74
+ readonly objectId: string;
75
+ readonly version: unknown;
90
76
  } | {
91
- readonly name: string;
77
+ readonly _tag: "file";
92
78
  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;
79
+ readonly url: string;
80
+ readonly name?: string | undefined;
81
+ readonly mediaType?: string | undefined;
98
82
  } | {
83
+ readonly _tag: "image";
99
84
  readonly pending?: boolean | undefined;
100
- readonly mimeType?: string | undefined;
101
- readonly _tag: "stats";
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
- } | {
85
+ readonly id?: string | undefined;
113
86
  readonly source?: {
114
87
  readonly type: "base64";
115
88
  readonly mediaType: string;
@@ -118,57 +91,86 @@ export declare const ExtractionInput: Schema.Struct<{
118
91
  readonly type: "http";
119
92
  readonly url: string;
120
93
  } | undefined;
121
- readonly id?: string | undefined;
94
+ } | {
95
+ readonly _tag: "json";
122
96
  readonly pending?: boolean | undefined;
123
- readonly _tag: "image";
97
+ readonly disposition?: "cot" | "synthetic" | "user" | "version-pin" | undefined;
98
+ readonly data: string;
124
99
  } | {
125
- readonly name?: string | undefined;
100
+ readonly _tag: "proposal";
126
101
  readonly pending?: boolean | undefined;
127
- readonly _tag: "file";
128
- readonly mediaType?: string | undefined;
129
- readonly url: string;
102
+ readonly text: string;
130
103
  } | {
104
+ readonly _tag: "reasoning";
131
105
  readonly pending?: boolean | undefined;
106
+ readonly reasoningText?: string | undefined;
107
+ readonly redactedText?: string | undefined;
108
+ readonly signature?: string | undefined;
109
+ } | {
132
110
  readonly _tag: "reference";
111
+ readonly pending?: boolean | undefined;
133
112
  readonly reference: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown>;
134
113
  } | {
114
+ readonly _tag: "select";
135
115
  readonly pending?: boolean | undefined;
136
- readonly text: string;
137
- readonly _tag: "transcript";
138
- readonly started: string;
116
+ readonly options: string[];
139
117
  } | {
140
- readonly pending?: boolean | undefined;
141
118
  readonly _tag: "status";
119
+ readonly pending?: boolean | undefined;
142
120
  readonly statusText: string;
143
121
  } | {
144
- readonly pending?: boolean | undefined;
145
- readonly text: string;
146
122
  readonly _tag: "suggestion";
147
- } | {
148
123
  readonly pending?: boolean | undefined;
149
- readonly _tag: "select";
150
- readonly options: string[];
124
+ readonly text: string;
151
125
  } | {
152
- readonly version: unknown;
126
+ readonly _tag: "stats";
153
127
  readonly pending?: boolean | undefined;
154
- readonly _tag: "anchor";
155
- readonly objectId: string;
128
+ readonly mimeType?: string | undefined;
129
+ readonly message?: string | undefined;
130
+ readonly model?: string | undefined;
131
+ readonly usage?: {
132
+ readonly inputTokens?: number | undefined;
133
+ readonly outputTokens?: number | undefined;
134
+ readonly totalTokens?: number | undefined;
135
+ } | undefined;
136
+ readonly toolCalls?: number | undefined;
137
+ readonly errors?: number | undefined;
138
+ readonly duration?: number | undefined;
156
139
  } | {
140
+ readonly _tag: "text";
157
141
  readonly pending?: boolean | undefined;
142
+ readonly mimeType?: string | undefined;
158
143
  readonly text: string;
159
- readonly _tag: "proposal";
144
+ readonly disposition?: "cot" | "synthetic" | "user" | "version-pin" | undefined;
160
145
  } | {
161
- readonly pending?: boolean | undefined;
162
146
  readonly _tag: "summary";
147
+ readonly pending?: boolean | undefined;
163
148
  readonly content: string;
164
149
  } | {
165
- readonly pending?: boolean | undefined;
166
150
  readonly _tag: "toolkit";
151
+ readonly pending?: boolean | undefined;
167
152
  } | {
153
+ readonly _tag: "toolCall";
168
154
  readonly pending?: boolean | undefined;
169
- readonly disposition?: string | undefined;
170
- readonly _tag: "json";
171
- readonly data: string;
155
+ readonly toolCallId: string;
156
+ readonly name: string;
157
+ readonly input: string;
158
+ readonly providerExecuted: boolean;
159
+ readonly operationKey?: string | undefined;
160
+ readonly operationName?: string | undefined;
161
+ } | {
162
+ readonly _tag: "toolResult";
163
+ readonly pending?: boolean | undefined;
164
+ readonly toolCallId: string;
165
+ readonly name: string;
166
+ readonly result?: string | undefined;
167
+ readonly error?: string | undefined;
168
+ readonly providerExecuted: boolean;
169
+ } | {
170
+ readonly _tag: "transcript";
171
+ readonly pending?: boolean | undefined;
172
+ readonly started: string;
173
+ readonly text: string;
172
174
  })[];
173
175
  readonly properties?: {
174
176
  readonly [x: string]: any;
@@ -186,19 +188,19 @@ export declare const ExtractionOutput: Schema.Struct<{
186
188
  message: import("@dxos/echo/Type").Obj<{
187
189
  readonly id: string;
188
190
  readonly parentMessage?: string | undefined;
191
+ readonly threadId?: string | undefined;
189
192
  readonly created: string;
190
193
  readonly sender: {
191
- readonly name?: string | undefined;
192
- readonly role?: "user" | "assistant" | "tool" | undefined;
194
+ readonly role?: "assistant" | "tool" | "user" | undefined;
193
195
  readonly contact?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
194
- readonly image?: string | undefined;
195
196
  readonly fullName?: string | undefined;
196
197
  readonly preferredName?: string | undefined;
197
198
  readonly nickname?: string | undefined;
199
+ readonly image?: string | undefined;
198
200
  readonly organization?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
199
- readonly description?: string | undefined;
200
201
  readonly name?: string | undefined;
201
- readonly status?: "prospect" | "qualified" | "active" | "commit" | "reject" | undefined;
202
+ readonly description?: string | undefined;
203
+ readonly status?: "active" | "commit" | "prospect" | "qualified" | "reject" | undefined;
202
204
  readonly image?: string | undefined;
203
205
  readonly website?: string | undefined;
204
206
  } & {
@@ -208,23 +210,19 @@ export declare const ExtractionOutput: Schema.Struct<{
208
210
  readonly department?: string | undefined;
209
211
  readonly notes?: string | undefined;
210
212
  readonly emails?: readonly {
211
- readonly value: string;
212
213
  readonly label?: string | undefined;
214
+ readonly value: string;
213
215
  }[] | undefined;
214
216
  readonly identities?: readonly {
215
- readonly value: string;
216
217
  readonly label?: string | undefined;
218
+ readonly value: string;
217
219
  }[] | undefined;
218
220
  readonly phoneNumbers?: readonly {
219
- readonly value: string;
220
221
  readonly label?: string | undefined;
221
- }[] | undefined;
222
- readonly fields?: readonly {
223
222
  readonly value: string;
224
- readonly label: string;
225
- readonly category?: string | undefined;
226
223
  }[] | undefined;
227
224
  readonly addresses?: readonly {
225
+ readonly label?: string | undefined;
228
226
  readonly value: {
229
227
  readonly street?: string | undefined;
230
228
  readonly extended?: string | undefined;
@@ -234,62 +232,40 @@ export declare const ExtractionOutput: Schema.Struct<{
234
232
  readonly postOfficeBoxNumber?: string | undefined;
235
233
  readonly country?: string | undefined;
236
234
  };
237
- readonly label?: string | undefined;
238
235
  }[] | undefined;
239
236
  readonly urls?: readonly {
240
- readonly value: string;
241
237
  readonly label?: string | undefined;
238
+ readonly value: string;
242
239
  }[] | undefined;
243
240
  readonly birthday?: string | undefined;
241
+ readonly fields?: readonly {
242
+ readonly category?: string | undefined;
243
+ readonly label: string;
244
+ readonly value: string;
245
+ }[] | undefined;
244
246
  } & {
245
247
  readonly location?: readonly [number, number, (number | undefined)?] | undefined;
246
248
  }> | undefined;
247
249
  readonly identityDid?: string | undefined;
248
250
  readonly identityKey?: string | undefined;
249
251
  readonly email?: string | undefined;
252
+ readonly name?: string | undefined;
250
253
  };
251
254
  readonly blocks: readonly ({
255
+ readonly _tag: "anchor";
252
256
  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;
257
+ readonly objectId: string;
258
+ readonly version: unknown;
270
259
  } | {
271
- readonly name: string;
260
+ readonly _tag: "file";
272
261
  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;
262
+ readonly url: string;
263
+ readonly name?: string | undefined;
264
+ readonly mediaType?: string | undefined;
278
265
  } | {
266
+ readonly _tag: "image";
279
267
  readonly pending?: boolean | undefined;
280
- readonly mimeType?: string | undefined;
281
- readonly _tag: "stats";
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
- } | {
268
+ readonly id?: string | undefined;
293
269
  readonly source?: {
294
270
  readonly type: "base64";
295
271
  readonly mediaType: string;
@@ -298,57 +274,86 @@ export declare const ExtractionOutput: Schema.Struct<{
298
274
  readonly type: "http";
299
275
  readonly url: string;
300
276
  } | undefined;
301
- readonly id?: string | undefined;
277
+ } | {
278
+ readonly _tag: "json";
302
279
  readonly pending?: boolean | undefined;
303
- readonly _tag: "image";
280
+ readonly disposition?: "cot" | "synthetic" | "user" | "version-pin" | undefined;
281
+ readonly data: string;
304
282
  } | {
305
- readonly name?: string | undefined;
283
+ readonly _tag: "proposal";
306
284
  readonly pending?: boolean | undefined;
307
- readonly _tag: "file";
308
- readonly mediaType?: string | undefined;
309
- readonly url: string;
285
+ readonly text: string;
310
286
  } | {
287
+ readonly _tag: "reasoning";
311
288
  readonly pending?: boolean | undefined;
289
+ readonly reasoningText?: string | undefined;
290
+ readonly redactedText?: string | undefined;
291
+ readonly signature?: string | undefined;
292
+ } | {
312
293
  readonly _tag: "reference";
294
+ readonly pending?: boolean | undefined;
313
295
  readonly reference: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown>;
314
296
  } | {
297
+ readonly _tag: "select";
315
298
  readonly pending?: boolean | undefined;
316
- readonly text: string;
317
- readonly _tag: "transcript";
318
- readonly started: string;
299
+ readonly options: string[];
319
300
  } | {
320
- readonly pending?: boolean | undefined;
321
301
  readonly _tag: "status";
302
+ readonly pending?: boolean | undefined;
322
303
  readonly statusText: string;
323
304
  } | {
324
- readonly pending?: boolean | undefined;
325
- readonly text: string;
326
305
  readonly _tag: "suggestion";
327
- } | {
328
306
  readonly pending?: boolean | undefined;
329
- readonly _tag: "select";
330
- readonly options: string[];
307
+ readonly text: string;
331
308
  } | {
332
- readonly version: unknown;
309
+ readonly _tag: "stats";
333
310
  readonly pending?: boolean | undefined;
334
- readonly _tag: "anchor";
335
- readonly objectId: string;
311
+ readonly mimeType?: string | undefined;
312
+ readonly message?: string | undefined;
313
+ readonly model?: string | undefined;
314
+ readonly usage?: {
315
+ readonly inputTokens?: number | undefined;
316
+ readonly outputTokens?: number | undefined;
317
+ readonly totalTokens?: number | undefined;
318
+ } | undefined;
319
+ readonly toolCalls?: number | undefined;
320
+ readonly errors?: number | undefined;
321
+ readonly duration?: number | undefined;
336
322
  } | {
323
+ readonly _tag: "text";
337
324
  readonly pending?: boolean | undefined;
325
+ readonly mimeType?: string | undefined;
338
326
  readonly text: string;
339
- readonly _tag: "proposal";
327
+ readonly disposition?: "cot" | "synthetic" | "user" | "version-pin" | undefined;
340
328
  } | {
341
- readonly pending?: boolean | undefined;
342
329
  readonly _tag: "summary";
330
+ readonly pending?: boolean | undefined;
343
331
  readonly content: string;
344
332
  } | {
345
- readonly pending?: boolean | undefined;
346
333
  readonly _tag: "toolkit";
334
+ readonly pending?: boolean | undefined;
347
335
  } | {
336
+ readonly _tag: "toolCall";
348
337
  readonly pending?: boolean | undefined;
349
- readonly disposition?: string | undefined;
350
- readonly _tag: "json";
351
- readonly data: string;
338
+ readonly toolCallId: string;
339
+ readonly name: string;
340
+ readonly input: string;
341
+ readonly providerExecuted: boolean;
342
+ readonly operationKey?: string | undefined;
343
+ readonly operationName?: string | undefined;
344
+ } | {
345
+ readonly _tag: "toolResult";
346
+ readonly pending?: boolean | undefined;
347
+ readonly toolCallId: string;
348
+ readonly name: string;
349
+ readonly result?: string | undefined;
350
+ readonly error?: string | undefined;
351
+ readonly providerExecuted: boolean;
352
+ } | {
353
+ readonly _tag: "transcript";
354
+ readonly pending?: boolean | undefined;
355
+ readonly started: string;
356
+ readonly text: string;
352
357
  })[];
353
358
  readonly properties?: {
354
359
  readonly [x: string]: any;
@@ -360,8 +365,7 @@ export interface ExtractionOutput extends Schema.Schema.Type<typeof ExtractionOu
360
365
  }
361
366
  export type ProcessTranscriptMessageProps = {
362
367
  input: ExtractionInput;
363
- function: FunctionDefinition<ExtractionInput, ExtractionOutput>;
364
- executor: FunctionExecutor;
368
+ function: Operation.Definition<ExtractionInput, ExtractionOutput>;
365
369
  options?: {
366
370
  /**
367
371
  * Timeout for the entity extraction.
@@ -375,7 +379,729 @@ export type ProcessTranscriptMessageProps = {
375
379
  fallbackToRaw?: boolean;
376
380
  };
377
381
  };
378
- export type ExtractionFunction = FunctionDefinition<ExtractionInput, ExtractionOutput>;
382
+ export type ExtractionFunction = Operation.Definition<ExtractionInput, ExtractionOutput>;
383
+ /**
384
+ * Placeholder for Anthropic-based entity extraction.
385
+ * Implementation is currently disabled pending restoration of extraction logic.
386
+ */
387
+ export declare const extractionAnthropicFunction: Operation.Definition<{
388
+ readonly message: import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
389
+ readonly id: string;
390
+ readonly parentMessage?: string | undefined;
391
+ readonly threadId?: string | undefined;
392
+ readonly created: string;
393
+ readonly sender: {
394
+ readonly role?: "assistant" | "tool" | "user" | undefined;
395
+ readonly contact?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
396
+ readonly fullName?: string | undefined;
397
+ readonly preferredName?: string | undefined;
398
+ readonly nickname?: string | undefined;
399
+ readonly image?: string | undefined;
400
+ readonly organization?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
401
+ readonly name?: string | undefined;
402
+ readonly description?: string | undefined;
403
+ readonly status?: "active" | "commit" | "prospect" | "qualified" | "reject" | undefined;
404
+ readonly image?: string | undefined;
405
+ readonly website?: string | undefined;
406
+ } & {
407
+ readonly location?: readonly [number, number, (number | undefined)?] | undefined;
408
+ }> | undefined;
409
+ readonly jobTitle?: string | undefined;
410
+ readonly department?: string | undefined;
411
+ readonly notes?: string | undefined;
412
+ readonly emails?: readonly {
413
+ readonly label?: string | undefined;
414
+ readonly value: string;
415
+ }[] | undefined;
416
+ readonly identities?: readonly {
417
+ readonly label?: string | undefined;
418
+ readonly value: string;
419
+ }[] | undefined;
420
+ readonly phoneNumbers?: readonly {
421
+ readonly label?: string | undefined;
422
+ readonly value: string;
423
+ }[] | undefined;
424
+ readonly addresses?: readonly {
425
+ readonly label?: string | undefined;
426
+ readonly value: {
427
+ readonly street?: string | undefined;
428
+ readonly extended?: string | undefined;
429
+ readonly locality?: string | undefined;
430
+ readonly region?: string | undefined;
431
+ readonly postalCode?: string | undefined;
432
+ readonly postOfficeBoxNumber?: string | undefined;
433
+ readonly country?: string | undefined;
434
+ };
435
+ }[] | undefined;
436
+ readonly urls?: readonly {
437
+ readonly label?: string | undefined;
438
+ readonly value: string;
439
+ }[] | undefined;
440
+ readonly birthday?: string | undefined;
441
+ readonly fields?: readonly {
442
+ readonly category?: string | undefined;
443
+ readonly label: string;
444
+ readonly value: string;
445
+ }[] | undefined;
446
+ } & {
447
+ readonly location?: readonly [number, number, (number | undefined)?] | undefined;
448
+ }> | undefined;
449
+ readonly identityDid?: string | undefined;
450
+ readonly identityKey?: string | undefined;
451
+ readonly email?: string | undefined;
452
+ readonly name?: string | undefined;
453
+ };
454
+ readonly blocks: readonly ({
455
+ readonly _tag: "anchor";
456
+ readonly pending?: boolean | undefined;
457
+ readonly objectId: string;
458
+ readonly version: unknown;
459
+ } | {
460
+ readonly _tag: "file";
461
+ readonly pending?: boolean | undefined;
462
+ readonly url: string;
463
+ readonly name?: string | undefined;
464
+ readonly mediaType?: string | undefined;
465
+ } | {
466
+ readonly _tag: "image";
467
+ readonly pending?: boolean | undefined;
468
+ readonly id?: string | undefined;
469
+ readonly source?: {
470
+ readonly type: "base64";
471
+ readonly mediaType: string;
472
+ readonly data: string;
473
+ } | {
474
+ readonly type: "http";
475
+ readonly url: string;
476
+ } | undefined;
477
+ } | {
478
+ readonly _tag: "json";
479
+ readonly pending?: boolean | undefined;
480
+ readonly disposition?: "cot" | "synthetic" | "user" | "version-pin" | undefined;
481
+ readonly data: string;
482
+ } | {
483
+ readonly _tag: "proposal";
484
+ readonly pending?: boolean | undefined;
485
+ readonly text: string;
486
+ } | {
487
+ readonly _tag: "reasoning";
488
+ readonly pending?: boolean | undefined;
489
+ readonly reasoningText?: string | undefined;
490
+ readonly redactedText?: string | undefined;
491
+ readonly signature?: string | undefined;
492
+ } | {
493
+ readonly _tag: "reference";
494
+ readonly pending?: boolean | undefined;
495
+ readonly reference: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown>;
496
+ } | {
497
+ readonly _tag: "select";
498
+ readonly pending?: boolean | undefined;
499
+ readonly options: string[];
500
+ } | {
501
+ readonly _tag: "status";
502
+ readonly pending?: boolean | undefined;
503
+ readonly statusText: string;
504
+ } | {
505
+ readonly _tag: "suggestion";
506
+ readonly pending?: boolean | undefined;
507
+ readonly text: string;
508
+ } | {
509
+ readonly _tag: "stats";
510
+ readonly pending?: boolean | undefined;
511
+ readonly mimeType?: string | undefined;
512
+ readonly message?: string | undefined;
513
+ readonly model?: string | undefined;
514
+ readonly usage?: {
515
+ readonly inputTokens?: number | undefined;
516
+ readonly outputTokens?: number | undefined;
517
+ readonly totalTokens?: number | undefined;
518
+ } | undefined;
519
+ readonly toolCalls?: number | undefined;
520
+ readonly errors?: number | undefined;
521
+ readonly duration?: number | undefined;
522
+ } | {
523
+ readonly _tag: "text";
524
+ readonly pending?: boolean | undefined;
525
+ readonly mimeType?: string | undefined;
526
+ readonly text: string;
527
+ readonly disposition?: "cot" | "synthetic" | "user" | "version-pin" | undefined;
528
+ } | {
529
+ readonly _tag: "summary";
530
+ readonly pending?: boolean | undefined;
531
+ readonly content: string;
532
+ } | {
533
+ readonly _tag: "toolkit";
534
+ readonly pending?: boolean | undefined;
535
+ } | {
536
+ readonly _tag: "toolCall";
537
+ readonly pending?: boolean | undefined;
538
+ readonly toolCallId: string;
539
+ readonly name: string;
540
+ readonly input: string;
541
+ readonly providerExecuted: boolean;
542
+ readonly operationKey?: string | undefined;
543
+ readonly operationName?: string | undefined;
544
+ } | {
545
+ readonly _tag: "toolResult";
546
+ readonly pending?: boolean | undefined;
547
+ readonly toolCallId: string;
548
+ readonly name: string;
549
+ readonly result?: string | undefined;
550
+ readonly error?: string | undefined;
551
+ readonly providerExecuted: boolean;
552
+ } | {
553
+ readonly _tag: "transcript";
554
+ readonly pending?: boolean | undefined;
555
+ readonly started: string;
556
+ readonly text: string;
557
+ })[];
558
+ readonly properties?: {
559
+ readonly [x: string]: any;
560
+ } | undefined;
561
+ };
562
+ readonly objects?: readonly (import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown)[] | undefined;
563
+ readonly options?: {
564
+ readonly timeout?: number | undefined;
565
+ readonly fallbackToRaw?: boolean | undefined;
566
+ } | undefined;
567
+ }, {
568
+ readonly message: import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
569
+ readonly id: string;
570
+ readonly parentMessage?: string | undefined;
571
+ readonly threadId?: string | undefined;
572
+ readonly created: string;
573
+ readonly sender: {
574
+ readonly role?: "assistant" | "tool" | "user" | undefined;
575
+ readonly contact?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
576
+ readonly fullName?: string | undefined;
577
+ readonly preferredName?: string | undefined;
578
+ readonly nickname?: string | undefined;
579
+ readonly image?: string | undefined;
580
+ readonly organization?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
581
+ readonly name?: string | undefined;
582
+ readonly description?: string | undefined;
583
+ readonly status?: "active" | "commit" | "prospect" | "qualified" | "reject" | undefined;
584
+ readonly image?: string | undefined;
585
+ readonly website?: string | undefined;
586
+ } & {
587
+ readonly location?: readonly [number, number, (number | undefined)?] | undefined;
588
+ }> | undefined;
589
+ readonly jobTitle?: string | undefined;
590
+ readonly department?: string | undefined;
591
+ readonly notes?: string | undefined;
592
+ readonly emails?: readonly {
593
+ readonly label?: string | undefined;
594
+ readonly value: string;
595
+ }[] | undefined;
596
+ readonly identities?: readonly {
597
+ readonly label?: string | undefined;
598
+ readonly value: string;
599
+ }[] | undefined;
600
+ readonly phoneNumbers?: readonly {
601
+ readonly label?: string | undefined;
602
+ readonly value: string;
603
+ }[] | undefined;
604
+ readonly addresses?: readonly {
605
+ readonly label?: string | undefined;
606
+ readonly value: {
607
+ readonly street?: string | undefined;
608
+ readonly extended?: string | undefined;
609
+ readonly locality?: string | undefined;
610
+ readonly region?: string | undefined;
611
+ readonly postalCode?: string | undefined;
612
+ readonly postOfficeBoxNumber?: string | undefined;
613
+ readonly country?: string | undefined;
614
+ };
615
+ }[] | undefined;
616
+ readonly urls?: readonly {
617
+ readonly label?: string | undefined;
618
+ readonly value: string;
619
+ }[] | undefined;
620
+ readonly birthday?: string | undefined;
621
+ readonly fields?: readonly {
622
+ readonly category?: string | undefined;
623
+ readonly label: string;
624
+ readonly value: string;
625
+ }[] | undefined;
626
+ } & {
627
+ readonly location?: readonly [number, number, (number | undefined)?] | undefined;
628
+ }> | undefined;
629
+ readonly identityDid?: string | undefined;
630
+ readonly identityKey?: string | undefined;
631
+ readonly email?: string | undefined;
632
+ readonly name?: string | undefined;
633
+ };
634
+ readonly blocks: readonly ({
635
+ readonly _tag: "anchor";
636
+ readonly pending?: boolean | undefined;
637
+ readonly objectId: string;
638
+ readonly version: unknown;
639
+ } | {
640
+ readonly _tag: "file";
641
+ readonly pending?: boolean | undefined;
642
+ readonly url: string;
643
+ readonly name?: string | undefined;
644
+ readonly mediaType?: string | undefined;
645
+ } | {
646
+ readonly _tag: "image";
647
+ readonly pending?: boolean | undefined;
648
+ readonly id?: string | undefined;
649
+ readonly source?: {
650
+ readonly type: "base64";
651
+ readonly mediaType: string;
652
+ readonly data: string;
653
+ } | {
654
+ readonly type: "http";
655
+ readonly url: string;
656
+ } | undefined;
657
+ } | {
658
+ readonly _tag: "json";
659
+ readonly pending?: boolean | undefined;
660
+ readonly disposition?: "cot" | "synthetic" | "user" | "version-pin" | undefined;
661
+ readonly data: string;
662
+ } | {
663
+ readonly _tag: "proposal";
664
+ readonly pending?: boolean | undefined;
665
+ readonly text: string;
666
+ } | {
667
+ readonly _tag: "reasoning";
668
+ readonly pending?: boolean | undefined;
669
+ readonly reasoningText?: string | undefined;
670
+ readonly redactedText?: string | undefined;
671
+ readonly signature?: string | undefined;
672
+ } | {
673
+ readonly _tag: "reference";
674
+ readonly pending?: boolean | undefined;
675
+ readonly reference: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown>;
676
+ } | {
677
+ readonly _tag: "select";
678
+ readonly pending?: boolean | undefined;
679
+ readonly options: string[];
680
+ } | {
681
+ readonly _tag: "status";
682
+ readonly pending?: boolean | undefined;
683
+ readonly statusText: string;
684
+ } | {
685
+ readonly _tag: "suggestion";
686
+ readonly pending?: boolean | undefined;
687
+ readonly text: string;
688
+ } | {
689
+ readonly _tag: "stats";
690
+ readonly pending?: boolean | undefined;
691
+ readonly mimeType?: string | undefined;
692
+ readonly message?: string | undefined;
693
+ readonly model?: string | undefined;
694
+ readonly usage?: {
695
+ readonly inputTokens?: number | undefined;
696
+ readonly outputTokens?: number | undefined;
697
+ readonly totalTokens?: number | undefined;
698
+ } | undefined;
699
+ readonly toolCalls?: number | undefined;
700
+ readonly errors?: number | undefined;
701
+ readonly duration?: number | undefined;
702
+ } | {
703
+ readonly _tag: "text";
704
+ readonly pending?: boolean | undefined;
705
+ readonly mimeType?: string | undefined;
706
+ readonly text: string;
707
+ readonly disposition?: "cot" | "synthetic" | "user" | "version-pin" | undefined;
708
+ } | {
709
+ readonly _tag: "summary";
710
+ readonly pending?: boolean | undefined;
711
+ readonly content: string;
712
+ } | {
713
+ readonly _tag: "toolkit";
714
+ readonly pending?: boolean | undefined;
715
+ } | {
716
+ readonly _tag: "toolCall";
717
+ readonly pending?: boolean | undefined;
718
+ readonly toolCallId: string;
719
+ readonly name: string;
720
+ readonly input: string;
721
+ readonly providerExecuted: boolean;
722
+ readonly operationKey?: string | undefined;
723
+ readonly operationName?: string | undefined;
724
+ } | {
725
+ readonly _tag: "toolResult";
726
+ readonly pending?: boolean | undefined;
727
+ readonly toolCallId: string;
728
+ readonly name: string;
729
+ readonly result?: string | undefined;
730
+ readonly error?: string | undefined;
731
+ readonly providerExecuted: boolean;
732
+ } | {
733
+ readonly _tag: "transcript";
734
+ readonly pending?: boolean | undefined;
735
+ readonly started: string;
736
+ readonly text: string;
737
+ })[];
738
+ readonly properties?: {
739
+ readonly [x: string]: any;
740
+ } | undefined;
741
+ };
742
+ readonly timeElapsed: number;
743
+ }, never>;
744
+ /**
745
+ * Placeholder for NER-based entity extraction.
746
+ * Implementation is currently disabled pending restoration of extraction logic.
747
+ */
748
+ export declare const extractionNerFunction: Operation.Definition<{
749
+ readonly message: import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
750
+ readonly id: string;
751
+ readonly parentMessage?: string | undefined;
752
+ readonly threadId?: string | undefined;
753
+ readonly created: string;
754
+ readonly sender: {
755
+ readonly role?: "assistant" | "tool" | "user" | undefined;
756
+ readonly contact?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
757
+ readonly fullName?: string | undefined;
758
+ readonly preferredName?: string | undefined;
759
+ readonly nickname?: string | undefined;
760
+ readonly image?: string | undefined;
761
+ readonly organization?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
762
+ readonly name?: string | undefined;
763
+ readonly description?: string | undefined;
764
+ readonly status?: "active" | "commit" | "prospect" | "qualified" | "reject" | undefined;
765
+ readonly image?: string | undefined;
766
+ readonly website?: string | undefined;
767
+ } & {
768
+ readonly location?: readonly [number, number, (number | undefined)?] | undefined;
769
+ }> | undefined;
770
+ readonly jobTitle?: string | undefined;
771
+ readonly department?: string | undefined;
772
+ readonly notes?: string | undefined;
773
+ readonly emails?: readonly {
774
+ readonly label?: string | undefined;
775
+ readonly value: string;
776
+ }[] | undefined;
777
+ readonly identities?: readonly {
778
+ readonly label?: string | undefined;
779
+ readonly value: string;
780
+ }[] | undefined;
781
+ readonly phoneNumbers?: readonly {
782
+ readonly label?: string | undefined;
783
+ readonly value: string;
784
+ }[] | undefined;
785
+ readonly addresses?: readonly {
786
+ readonly label?: string | undefined;
787
+ readonly value: {
788
+ readonly street?: string | undefined;
789
+ readonly extended?: string | undefined;
790
+ readonly locality?: string | undefined;
791
+ readonly region?: string | undefined;
792
+ readonly postalCode?: string | undefined;
793
+ readonly postOfficeBoxNumber?: string | undefined;
794
+ readonly country?: string | undefined;
795
+ };
796
+ }[] | undefined;
797
+ readonly urls?: readonly {
798
+ readonly label?: string | undefined;
799
+ readonly value: string;
800
+ }[] | undefined;
801
+ readonly birthday?: string | undefined;
802
+ readonly fields?: readonly {
803
+ readonly category?: string | undefined;
804
+ readonly label: string;
805
+ readonly value: string;
806
+ }[] | undefined;
807
+ } & {
808
+ readonly location?: readonly [number, number, (number | undefined)?] | undefined;
809
+ }> | undefined;
810
+ readonly identityDid?: string | undefined;
811
+ readonly identityKey?: string | undefined;
812
+ readonly email?: string | undefined;
813
+ readonly name?: string | undefined;
814
+ };
815
+ readonly blocks: readonly ({
816
+ readonly _tag: "anchor";
817
+ readonly pending?: boolean | undefined;
818
+ readonly objectId: string;
819
+ readonly version: unknown;
820
+ } | {
821
+ readonly _tag: "file";
822
+ readonly pending?: boolean | undefined;
823
+ readonly url: string;
824
+ readonly name?: string | undefined;
825
+ readonly mediaType?: string | undefined;
826
+ } | {
827
+ readonly _tag: "image";
828
+ readonly pending?: boolean | undefined;
829
+ readonly id?: string | undefined;
830
+ readonly source?: {
831
+ readonly type: "base64";
832
+ readonly mediaType: string;
833
+ readonly data: string;
834
+ } | {
835
+ readonly type: "http";
836
+ readonly url: string;
837
+ } | undefined;
838
+ } | {
839
+ readonly _tag: "json";
840
+ readonly pending?: boolean | undefined;
841
+ readonly disposition?: "cot" | "synthetic" | "user" | "version-pin" | undefined;
842
+ readonly data: string;
843
+ } | {
844
+ readonly _tag: "proposal";
845
+ readonly pending?: boolean | undefined;
846
+ readonly text: string;
847
+ } | {
848
+ readonly _tag: "reasoning";
849
+ readonly pending?: boolean | undefined;
850
+ readonly reasoningText?: string | undefined;
851
+ readonly redactedText?: string | undefined;
852
+ readonly signature?: string | undefined;
853
+ } | {
854
+ readonly _tag: "reference";
855
+ readonly pending?: boolean | undefined;
856
+ readonly reference: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown>;
857
+ } | {
858
+ readonly _tag: "select";
859
+ readonly pending?: boolean | undefined;
860
+ readonly options: string[];
861
+ } | {
862
+ readonly _tag: "status";
863
+ readonly pending?: boolean | undefined;
864
+ readonly statusText: string;
865
+ } | {
866
+ readonly _tag: "suggestion";
867
+ readonly pending?: boolean | undefined;
868
+ readonly text: string;
869
+ } | {
870
+ readonly _tag: "stats";
871
+ readonly pending?: boolean | undefined;
872
+ readonly mimeType?: string | undefined;
873
+ readonly message?: string | undefined;
874
+ readonly model?: string | undefined;
875
+ readonly usage?: {
876
+ readonly inputTokens?: number | undefined;
877
+ readonly outputTokens?: number | undefined;
878
+ readonly totalTokens?: number | undefined;
879
+ } | undefined;
880
+ readonly toolCalls?: number | undefined;
881
+ readonly errors?: number | undefined;
882
+ readonly duration?: number | undefined;
883
+ } | {
884
+ readonly _tag: "text";
885
+ readonly pending?: boolean | undefined;
886
+ readonly mimeType?: string | undefined;
887
+ readonly text: string;
888
+ readonly disposition?: "cot" | "synthetic" | "user" | "version-pin" | undefined;
889
+ } | {
890
+ readonly _tag: "summary";
891
+ readonly pending?: boolean | undefined;
892
+ readonly content: string;
893
+ } | {
894
+ readonly _tag: "toolkit";
895
+ readonly pending?: boolean | undefined;
896
+ } | {
897
+ readonly _tag: "toolCall";
898
+ readonly pending?: boolean | undefined;
899
+ readonly toolCallId: string;
900
+ readonly name: string;
901
+ readonly input: string;
902
+ readonly providerExecuted: boolean;
903
+ readonly operationKey?: string | undefined;
904
+ readonly operationName?: string | undefined;
905
+ } | {
906
+ readonly _tag: "toolResult";
907
+ readonly pending?: boolean | undefined;
908
+ readonly toolCallId: string;
909
+ readonly name: string;
910
+ readonly result?: string | undefined;
911
+ readonly error?: string | undefined;
912
+ readonly providerExecuted: boolean;
913
+ } | {
914
+ readonly _tag: "transcript";
915
+ readonly pending?: boolean | undefined;
916
+ readonly started: string;
917
+ readonly text: string;
918
+ })[];
919
+ readonly properties?: {
920
+ readonly [x: string]: any;
921
+ } | undefined;
922
+ };
923
+ readonly objects?: readonly (import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown)[] | undefined;
924
+ readonly options?: {
925
+ readonly timeout?: number | undefined;
926
+ readonly fallbackToRaw?: boolean | undefined;
927
+ } | undefined;
928
+ }, {
929
+ readonly message: import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
930
+ readonly id: string;
931
+ readonly parentMessage?: string | undefined;
932
+ readonly threadId?: string | undefined;
933
+ readonly created: string;
934
+ readonly sender: {
935
+ readonly role?: "assistant" | "tool" | "user" | undefined;
936
+ readonly contact?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
937
+ readonly fullName?: string | undefined;
938
+ readonly preferredName?: string | undefined;
939
+ readonly nickname?: string | undefined;
940
+ readonly image?: string | undefined;
941
+ readonly organization?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
942
+ readonly name?: string | undefined;
943
+ readonly description?: string | undefined;
944
+ readonly status?: "active" | "commit" | "prospect" | "qualified" | "reject" | undefined;
945
+ readonly image?: string | undefined;
946
+ readonly website?: string | undefined;
947
+ } & {
948
+ readonly location?: readonly [number, number, (number | undefined)?] | undefined;
949
+ }> | undefined;
950
+ readonly jobTitle?: string | undefined;
951
+ readonly department?: string | undefined;
952
+ readonly notes?: string | undefined;
953
+ readonly emails?: readonly {
954
+ readonly label?: string | undefined;
955
+ readonly value: string;
956
+ }[] | undefined;
957
+ readonly identities?: readonly {
958
+ readonly label?: string | undefined;
959
+ readonly value: string;
960
+ }[] | undefined;
961
+ readonly phoneNumbers?: readonly {
962
+ readonly label?: string | undefined;
963
+ readonly value: string;
964
+ }[] | undefined;
965
+ readonly addresses?: readonly {
966
+ readonly label?: string | undefined;
967
+ readonly value: {
968
+ readonly street?: string | undefined;
969
+ readonly extended?: string | undefined;
970
+ readonly locality?: string | undefined;
971
+ readonly region?: string | undefined;
972
+ readonly postalCode?: string | undefined;
973
+ readonly postOfficeBoxNumber?: string | undefined;
974
+ readonly country?: string | undefined;
975
+ };
976
+ }[] | undefined;
977
+ readonly urls?: readonly {
978
+ readonly label?: string | undefined;
979
+ readonly value: string;
980
+ }[] | undefined;
981
+ readonly birthday?: string | undefined;
982
+ readonly fields?: readonly {
983
+ readonly category?: string | undefined;
984
+ readonly label: string;
985
+ readonly value: string;
986
+ }[] | undefined;
987
+ } & {
988
+ readonly location?: readonly [number, number, (number | undefined)?] | undefined;
989
+ }> | undefined;
990
+ readonly identityDid?: string | undefined;
991
+ readonly identityKey?: string | undefined;
992
+ readonly email?: string | undefined;
993
+ readonly name?: string | undefined;
994
+ };
995
+ readonly blocks: readonly ({
996
+ readonly _tag: "anchor";
997
+ readonly pending?: boolean | undefined;
998
+ readonly objectId: string;
999
+ readonly version: unknown;
1000
+ } | {
1001
+ readonly _tag: "file";
1002
+ readonly pending?: boolean | undefined;
1003
+ readonly url: string;
1004
+ readonly name?: string | undefined;
1005
+ readonly mediaType?: string | undefined;
1006
+ } | {
1007
+ readonly _tag: "image";
1008
+ readonly pending?: boolean | undefined;
1009
+ readonly id?: string | undefined;
1010
+ readonly source?: {
1011
+ readonly type: "base64";
1012
+ readonly mediaType: string;
1013
+ readonly data: string;
1014
+ } | {
1015
+ readonly type: "http";
1016
+ readonly url: string;
1017
+ } | undefined;
1018
+ } | {
1019
+ readonly _tag: "json";
1020
+ readonly pending?: boolean | undefined;
1021
+ readonly disposition?: "cot" | "synthetic" | "user" | "version-pin" | undefined;
1022
+ readonly data: string;
1023
+ } | {
1024
+ readonly _tag: "proposal";
1025
+ readonly pending?: boolean | undefined;
1026
+ readonly text: string;
1027
+ } | {
1028
+ readonly _tag: "reasoning";
1029
+ readonly pending?: boolean | undefined;
1030
+ readonly reasoningText?: string | undefined;
1031
+ readonly redactedText?: string | undefined;
1032
+ readonly signature?: string | undefined;
1033
+ } | {
1034
+ readonly _tag: "reference";
1035
+ readonly pending?: boolean | undefined;
1036
+ readonly reference: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & Obj.Unknown>;
1037
+ } | {
1038
+ readonly _tag: "select";
1039
+ readonly pending?: boolean | undefined;
1040
+ readonly options: string[];
1041
+ } | {
1042
+ readonly _tag: "status";
1043
+ readonly pending?: boolean | undefined;
1044
+ readonly statusText: string;
1045
+ } | {
1046
+ readonly _tag: "suggestion";
1047
+ readonly pending?: boolean | undefined;
1048
+ readonly text: string;
1049
+ } | {
1050
+ readonly _tag: "stats";
1051
+ readonly pending?: boolean | undefined;
1052
+ readonly mimeType?: string | undefined;
1053
+ readonly message?: string | undefined;
1054
+ readonly model?: string | undefined;
1055
+ readonly usage?: {
1056
+ readonly inputTokens?: number | undefined;
1057
+ readonly outputTokens?: number | undefined;
1058
+ readonly totalTokens?: number | undefined;
1059
+ } | undefined;
1060
+ readonly toolCalls?: number | undefined;
1061
+ readonly errors?: number | undefined;
1062
+ readonly duration?: number | undefined;
1063
+ } | {
1064
+ readonly _tag: "text";
1065
+ readonly pending?: boolean | undefined;
1066
+ readonly mimeType?: string | undefined;
1067
+ readonly text: string;
1068
+ readonly disposition?: "cot" | "synthetic" | "user" | "version-pin" | undefined;
1069
+ } | {
1070
+ readonly _tag: "summary";
1071
+ readonly pending?: boolean | undefined;
1072
+ readonly content: string;
1073
+ } | {
1074
+ readonly _tag: "toolkit";
1075
+ readonly pending?: boolean | undefined;
1076
+ } | {
1077
+ readonly _tag: "toolCall";
1078
+ readonly pending?: boolean | undefined;
1079
+ readonly toolCallId: string;
1080
+ readonly name: string;
1081
+ readonly input: string;
1082
+ readonly providerExecuted: boolean;
1083
+ readonly operationKey?: string | undefined;
1084
+ readonly operationName?: string | undefined;
1085
+ } | {
1086
+ readonly _tag: "toolResult";
1087
+ readonly pending?: boolean | undefined;
1088
+ readonly toolCallId: string;
1089
+ readonly name: string;
1090
+ readonly result?: string | undefined;
1091
+ readonly error?: string | undefined;
1092
+ readonly providerExecuted: boolean;
1093
+ } | {
1094
+ readonly _tag: "transcript";
1095
+ readonly pending?: boolean | undefined;
1096
+ readonly started: string;
1097
+ readonly text: string;
1098
+ })[];
1099
+ readonly properties?: {
1100
+ readonly [x: string]: any;
1101
+ } | undefined;
1102
+ };
1103
+ readonly timeElapsed: number;
1104
+ }, never>;
379
1105
  /**
380
1106
  * Extract entities from the transcript message and add them to the message.
381
1107
  */