@dxos/assistant 0.8.4-main.66e292d → 0.8.4-main.69d29f4

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 (84) hide show
  1. package/dist/lib/browser/chunk-7CDDG6LL.mjs +578 -0
  2. package/dist/lib/browser/chunk-7CDDG6LL.mjs.map +7 -0
  3. package/dist/lib/browser/extraction/index.mjs +3 -3
  4. package/dist/lib/browser/extraction/index.mjs.map +3 -3
  5. package/dist/lib/browser/index.mjs +239 -678
  6. package/dist/lib/browser/index.mjs.map +4 -4
  7. package/dist/lib/browser/meta.json +1 -1
  8. package/dist/lib/browser/testing/index.mjs +32 -0
  9. package/dist/lib/browser/testing/index.mjs.map +7 -0
  10. package/dist/lib/node-esm/chunk-CC7ER6Q3.mjs +579 -0
  11. package/dist/lib/node-esm/chunk-CC7ER6Q3.mjs.map +7 -0
  12. package/dist/lib/node-esm/extraction/index.mjs +3 -3
  13. package/dist/lib/node-esm/extraction/index.mjs.map +3 -3
  14. package/dist/lib/node-esm/index.mjs +239 -678
  15. package/dist/lib/node-esm/index.mjs.map +4 -4
  16. package/dist/lib/node-esm/meta.json +1 -1
  17. package/dist/lib/node-esm/testing/index.mjs +33 -0
  18. package/dist/lib/node-esm/testing/index.mjs.map +7 -0
  19. package/dist/types/src/conversation/context.d.ts +82 -50
  20. package/dist/types/src/conversation/context.d.ts.map +1 -1
  21. package/dist/types/src/conversation/context.test.d.ts +2 -0
  22. package/dist/types/src/conversation/context.test.d.ts.map +1 -0
  23. package/dist/types/src/conversation/conversation.d.ts +14 -14
  24. package/dist/types/src/conversation/conversation.d.ts.map +1 -1
  25. package/dist/types/src/conversation/conversation.test.d.ts +2 -0
  26. package/dist/types/src/conversation/conversation.test.d.ts.map +1 -0
  27. package/dist/types/src/errors.d.ts +12 -16
  28. package/dist/types/src/errors.d.ts.map +1 -1
  29. package/dist/types/src/extraction/extraction-ner-function/extraction-ner-function.d.ts +237 -236
  30. package/dist/types/src/extraction/extraction-ner-function/extraction-ner-function.d.ts.map +1 -1
  31. package/dist/types/src/extraction/extraction.d.ts +285 -241
  32. package/dist/types/src/extraction/extraction.d.ts.map +1 -1
  33. package/dist/types/src/extraction/quotes.d.ts +2 -2
  34. package/dist/types/src/extraction/quotes.d.ts.map +1 -1
  35. package/dist/types/src/functions/services.d.ts +3 -3
  36. package/dist/types/src/functions/services.d.ts.map +1 -1
  37. package/dist/types/src/functions.test.d.ts +2 -0
  38. package/dist/types/src/functions.test.d.ts.map +1 -0
  39. package/dist/types/src/session/GenericToolkit.d.ts +1 -0
  40. package/dist/types/src/session/GenericToolkit.d.ts.map +1 -1
  41. package/dist/types/src/session/format.d.ts +3 -3
  42. package/dist/types/src/session/format.d.ts.map +1 -1
  43. package/dist/types/src/session/observer.d.ts +4 -3
  44. package/dist/types/src/session/observer.d.ts.map +1 -1
  45. package/dist/types/src/session/session.d.ts +14 -9
  46. package/dist/types/src/session/session.d.ts.map +1 -1
  47. package/dist/types/src/session/toolkit.d.ts +5 -6
  48. package/dist/types/src/session/toolkit.d.ts.map +1 -1
  49. package/dist/types/src/session/version-pin.d.ts +1 -1
  50. package/dist/types/src/session/version-pin.d.ts.map +1 -1
  51. package/dist/types/src/testing/index.d.ts +2 -0
  52. package/dist/types/src/testing/index.d.ts.map +1 -0
  53. package/dist/types/src/testing/layer.d.ts +21 -0
  54. package/dist/types/src/testing/layer.d.ts.map +1 -0
  55. package/dist/types/src/types/artifact.d.ts +12 -3
  56. package/dist/types/src/types/artifact.d.ts.map +1 -1
  57. package/dist/types/tsconfig.tsbuildinfo +1 -1
  58. package/package.json +38 -29
  59. package/src/conversation/context.test.ts +46 -0
  60. package/src/conversation/context.ts +183 -65
  61. package/src/conversation/conversation.test.ts +65 -0
  62. package/src/conversation/conversation.ts +46 -49
  63. package/src/diff.test.ts +1 -1
  64. package/src/errors.ts +2 -2
  65. package/src/execution-graph.ts +2 -2
  66. package/src/extraction/extraction-ner-function/extraction-ner-function.test.ts +3 -3
  67. package/src/extraction/extraction-ner-function/extraction-ner-function.ts +1 -1
  68. package/src/extraction/extraction.ts +3 -3
  69. package/src/extraction/quotes.ts +3 -4
  70. package/src/functions/services.ts +28 -10
  71. package/src/functions.conversations.json +1 -0
  72. package/src/functions.test.ts +74 -0
  73. package/src/session/GenericToolkit.ts +1 -0
  74. package/src/session/format.test.ts +101 -38
  75. package/src/session/format.ts +11 -12
  76. package/src/session/observer.ts +3 -1
  77. package/src/session/session.conversations.json +1 -1
  78. package/src/session/session.test.ts +7 -13
  79. package/src/session/session.ts +33 -12
  80. package/src/session/toolkit.ts +13 -22
  81. package/src/session/version-pin.ts +2 -2
  82. package/src/testing/index.ts +5 -0
  83. package/src/testing/layer.ts +78 -0
  84. 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.obj<Schema.Struct<{
7
- id: import("@dxos/keys").ObjectIdClass;
8
- parentMessage: Schema.optional<import("@dxos/keys").ObjectIdClass>;
9
- created: Schema.SchemaClass<string, string, never>;
10
- sender: Schema.mutable<Schema.Struct<{
11
- role: Schema.optional<Schema.Literal<["user", "assistant", "tool"]>>;
12
- contact: Schema.optional<import("@dxos/echo/internal").RefSchema<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
13
- image?: string | undefined;
14
- fullName?: string | undefined;
15
- preferredName?: string | undefined;
16
- nickname?: string | undefined;
17
- organization?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
18
- description?: string | undefined;
19
- name?: string | undefined;
20
- status?: "prospect" | "qualified" | "active" | "commit" | "reject" | undefined;
21
- image?: string | undefined;
22
- website?: string | undefined;
23
- location?: readonly [number, number, (number | undefined)?] | undefined;
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;
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?: readonly {
29
31
  readonly value: string;
30
32
  readonly label?: string | undefined;
31
33
  }[] | undefined;
32
- identities?: {
34
+ readonly identities?: readonly {
33
35
  readonly value: string;
34
36
  readonly label?: string | undefined;
35
37
  }[] | undefined;
36
- phoneNumbers?: {
38
+ readonly phoneNumbers?: readonly {
37
39
  readonly value: string;
38
40
  readonly label?: string | undefined;
39
41
  }[] | undefined;
40
- fields?: {
42
+ readonly fields?: readonly {
41
43
  readonly value: string;
42
44
  readonly label: string;
43
45
  readonly category?: string | undefined;
44
46
  }[] | undefined;
45
- addresses?: {
47
+ readonly addresses?: readonly {
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?: readonly {
58
60
  readonly value: string;
59
61
  readonly label?: string | undefined;
60
62
  }[] | undefined;
61
- birthday?: string | undefined;
62
- location?: readonly [number, number, (number | undefined)?] | undefined;
63
- }>>;
64
- identityDid: Schema.optional<typeof Schema.String>;
65
- identityKey: Schema.optional<typeof Schema.String>;
66
- email: Schema.optional<typeof Schema.String>;
67
- name: Schema.optional<typeof Schema.String>;
68
- }>>;
69
- blocks: Schema.mutable<Schema.Array$<Schema.Union<[Schema.mutable<Schema.TaggedStruct<"anchor", {
70
- pending: Schema.optional<typeof Schema.Boolean>;
71
- objectId: import("@dxos/keys").ObjectIdClass;
72
- version: typeof Schema.Unknown;
73
- }>>, Schema.mutable<Schema.TaggedStruct<"file", {
74
- pending: Schema.optional<typeof Schema.Boolean>;
75
- url: typeof Schema.String;
76
- name: Schema.optional<typeof Schema.String>;
77
- mediaType: Schema.optional<typeof Schema.String>;
78
- }>>, Schema.mutable<Schema.TaggedStruct<"image", {
79
- pending: Schema.optional<typeof Schema.Boolean>;
80
- id: Schema.optional<typeof Schema.String>;
81
- source: Schema.optional<Schema.Union<[Schema.mutable<Schema.Struct<{
82
- type: Schema.Literal<["base64"]>;
83
- mediaType: typeof Schema.String;
84
- data: typeof Schema.String;
85
- }>>, Schema.mutable<Schema.Struct<{
86
- type: Schema.Literal<["http"]>;
87
- url: typeof Schema.String;
88
- }>>]>>;
89
- }>>, Schema.mutable<Schema.TaggedStruct<"json", {
90
- pending: Schema.optional<typeof Schema.Boolean>;
91
- disposition: Schema.optional<typeof Schema.String>;
92
- data: typeof Schema.String;
93
- }>>, Schema.mutable<Schema.TaggedStruct<"proposal", {
94
- pending: Schema.optional<typeof Schema.Boolean>;
95
- text: typeof Schema.String;
96
- }>>, Schema.mutable<Schema.TaggedStruct<"reasoning", {
97
- pending: Schema.optional<typeof Schema.Boolean>;
98
- reasoningText: Schema.optional<typeof Schema.String>;
99
- redactedText: Schema.optional<typeof Schema.String>;
100
- signature: Schema.optional<typeof Schema.String>;
101
- }>>, Schema.mutable<Schema.TaggedStruct<"reference", {
102
- pending: Schema.optional<typeof Schema.Boolean>;
103
- reference: import("@dxos/echo/internal").RefSchema<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {}>;
104
- }>>, Schema.mutable<Schema.TaggedStruct<"select", {
105
- pending: Schema.optional<typeof Schema.Boolean>;
106
- options: Schema.Array$<typeof Schema.String>;
107
- }>>, Schema.mutable<Schema.TaggedStruct<"status", {
108
- pending: Schema.optional<typeof Schema.Boolean>;
109
- statusText: typeof Schema.String;
110
- }>>, Schema.mutable<Schema.TaggedStruct<"suggestion", {
111
- pending: Schema.optional<typeof Schema.Boolean>;
112
- text: typeof Schema.String;
113
- }>>, Schema.mutable<Schema.TaggedStruct<"summary", {
114
- pending: Schema.optional<typeof Schema.Boolean>;
115
- mimeType: Schema.optional<typeof Schema.String>;
116
- message: Schema.optional<typeof Schema.String>;
117
- model: Schema.optional<typeof Schema.String>;
118
- usage: Schema.optional<Schema.Struct<{
119
- inputTokens: Schema.optional<typeof Schema.Number>;
120
- outputTokens: Schema.optional<typeof Schema.Number>;
121
- totalTokens: Schema.optional<typeof Schema.Number>;
122
- }>>;
123
- toolCalls: Schema.optional<typeof Schema.Number>;
124
- errors: Schema.optional<typeof Schema.Number>;
125
- duration: Schema.optional<typeof Schema.Number>;
126
- }>>, Schema.mutable<Schema.TaggedStruct<"text", {
127
- pending: Schema.optional<typeof Schema.Boolean>;
128
- mimeType: Schema.optional<typeof Schema.String>;
129
- text: typeof Schema.String;
130
- disposition: Schema.optional<typeof Schema.String>;
131
- }>>, Schema.mutable<Schema.TaggedStruct<"toolkit", {
132
- pending: Schema.optional<typeof Schema.Boolean>;
133
- }>>, Schema.mutable<Schema.TaggedStruct<"toolCall", {
134
- pending: Schema.optional<typeof Schema.Boolean>;
135
- toolCallId: typeof Schema.String;
136
- name: typeof Schema.String;
137
- input: typeof Schema.String;
138
- providerExecuted: typeof Schema.Boolean;
139
- }>>, Schema.mutable<Schema.TaggedStruct<"toolResult", {
140
- pending: Schema.optional<typeof Schema.Boolean>;
141
- toolCallId: typeof Schema.String;
142
- name: typeof Schema.String;
143
- result: Schema.optional<typeof Schema.String>;
144
- error: Schema.optional<typeof Schema.String>;
145
- providerExecuted: typeof Schema.Boolean;
146
- }>>, Schema.mutable<Schema.TaggedStruct<"transcript", {
147
- pending: Schema.optional<typeof Schema.Boolean>;
148
- started: typeof Schema.String;
149
- text: typeof Schema.String;
150
- }>>]>>>;
151
- properties: Schema.optional<Schema.mutable<Schema.Record$<typeof Schema.String, typeof Schema.Any>>>;
152
- }>>;
153
- objects: Schema.optional<Schema.Array$<Type.obj<Schema.Schema<import("@dxos/echo/internal").Expando, import("@dxos/echo/internal").ExpandoEncoded, never>>>>;
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>>;
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.obj<Schema.Struct<{
163
- id: import("@dxos/keys").ObjectIdClass;
164
- parentMessage: Schema.optional<import("@dxos/keys").ObjectIdClass>;
165
- created: Schema.SchemaClass<string, string, never>;
166
- sender: Schema.mutable<Schema.Struct<{
167
- role: Schema.optional<Schema.Literal<["user", "assistant", "tool"]>>;
168
- contact: Schema.optional<import("@dxos/echo/internal").RefSchema<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
169
- image?: string | undefined;
170
- fullName?: string | undefined;
171
- preferredName?: string | undefined;
172
- nickname?: string | undefined;
173
- organization?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
174
- description?: string | undefined;
175
- name?: string | undefined;
176
- status?: "prospect" | "qualified" | "active" | "commit" | "reject" | undefined;
177
- image?: string | undefined;
178
- website?: string | undefined;
179
- location?: readonly [number, number, (number | undefined)?] | undefined;
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;
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?: readonly {
185
211
  readonly value: string;
186
212
  readonly label?: string | undefined;
187
213
  }[] | undefined;
188
- identities?: {
214
+ readonly identities?: readonly {
189
215
  readonly value: string;
190
216
  readonly label?: string | undefined;
191
217
  }[] | undefined;
192
- phoneNumbers?: {
218
+ readonly phoneNumbers?: readonly {
193
219
  readonly value: string;
194
220
  readonly label?: string | undefined;
195
221
  }[] | undefined;
196
- fields?: {
222
+ readonly fields?: readonly {
197
223
  readonly value: string;
198
224
  readonly label: string;
199
225
  readonly category?: string | undefined;
200
226
  }[] | undefined;
201
- addresses?: {
227
+ readonly addresses?: readonly {
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?: readonly {
214
240
  readonly value: string;
215
241
  readonly label?: string | undefined;
216
242
  }[] | undefined;
217
- birthday?: string | undefined;
218
- location?: readonly [number, number, (number | undefined)?] | undefined;
219
- }>>;
220
- identityDid: Schema.optional<typeof Schema.String>;
221
- identityKey: Schema.optional<typeof Schema.String>;
222
- email: Schema.optional<typeof Schema.String>;
223
- name: Schema.optional<typeof Schema.String>;
224
- }>>;
225
- blocks: Schema.mutable<Schema.Array$<Schema.Union<[Schema.mutable<Schema.TaggedStruct<"anchor", {
226
- pending: Schema.optional<typeof Schema.Boolean>;
227
- objectId: import("@dxos/keys").ObjectIdClass;
228
- version: typeof Schema.Unknown;
229
- }>>, Schema.mutable<Schema.TaggedStruct<"file", {
230
- pending: Schema.optional<typeof Schema.Boolean>;
231
- url: typeof Schema.String;
232
- name: Schema.optional<typeof Schema.String>;
233
- mediaType: Schema.optional<typeof Schema.String>;
234
- }>>, Schema.mutable<Schema.TaggedStruct<"image", {
235
- pending: Schema.optional<typeof Schema.Boolean>;
236
- id: Schema.optional<typeof Schema.String>;
237
- source: Schema.optional<Schema.Union<[Schema.mutable<Schema.Struct<{
238
- type: Schema.Literal<["base64"]>;
239
- mediaType: typeof Schema.String;
240
- data: typeof Schema.String;
241
- }>>, Schema.mutable<Schema.Struct<{
242
- type: Schema.Literal<["http"]>;
243
- url: typeof Schema.String;
244
- }>>]>>;
245
- }>>, Schema.mutable<Schema.TaggedStruct<"json", {
246
- pending: Schema.optional<typeof Schema.Boolean>;
247
- disposition: Schema.optional<typeof Schema.String>;
248
- data: typeof Schema.String;
249
- }>>, Schema.mutable<Schema.TaggedStruct<"proposal", {
250
- pending: Schema.optional<typeof Schema.Boolean>;
251
- text: typeof Schema.String;
252
- }>>, Schema.mutable<Schema.TaggedStruct<"reasoning", {
253
- pending: Schema.optional<typeof Schema.Boolean>;
254
- reasoningText: Schema.optional<typeof Schema.String>;
255
- redactedText: Schema.optional<typeof Schema.String>;
256
- signature: Schema.optional<typeof Schema.String>;
257
- }>>, Schema.mutable<Schema.TaggedStruct<"reference", {
258
- pending: Schema.optional<typeof Schema.Boolean>;
259
- reference: import("@dxos/echo/internal").RefSchema<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {}>;
260
- }>>, Schema.mutable<Schema.TaggedStruct<"select", {
261
- pending: Schema.optional<typeof Schema.Boolean>;
262
- options: Schema.Array$<typeof Schema.String>;
263
- }>>, Schema.mutable<Schema.TaggedStruct<"status", {
264
- pending: Schema.optional<typeof Schema.Boolean>;
265
- statusText: typeof Schema.String;
266
- }>>, Schema.mutable<Schema.TaggedStruct<"suggestion", {
267
- pending: Schema.optional<typeof Schema.Boolean>;
268
- text: typeof Schema.String;
269
- }>>, Schema.mutable<Schema.TaggedStruct<"summary", {
270
- pending: Schema.optional<typeof Schema.Boolean>;
271
- mimeType: Schema.optional<typeof Schema.String>;
272
- message: Schema.optional<typeof Schema.String>;
273
- model: Schema.optional<typeof Schema.String>;
274
- usage: Schema.optional<Schema.Struct<{
275
- inputTokens: Schema.optional<typeof Schema.Number>;
276
- outputTokens: Schema.optional<typeof Schema.Number>;
277
- totalTokens: Schema.optional<typeof Schema.Number>;
278
- }>>;
279
- toolCalls: Schema.optional<typeof Schema.Number>;
280
- errors: Schema.optional<typeof Schema.Number>;
281
- duration: Schema.optional<typeof Schema.Number>;
282
- }>>, Schema.mutable<Schema.TaggedStruct<"text", {
283
- pending: Schema.optional<typeof Schema.Boolean>;
284
- mimeType: Schema.optional<typeof Schema.String>;
285
- text: typeof Schema.String;
286
- disposition: Schema.optional<typeof Schema.String>;
287
- }>>, Schema.mutable<Schema.TaggedStruct<"toolkit", {
288
- pending: Schema.optional<typeof Schema.Boolean>;
289
- }>>, Schema.mutable<Schema.TaggedStruct<"toolCall", {
290
- pending: Schema.optional<typeof Schema.Boolean>;
291
- toolCallId: typeof Schema.String;
292
- name: typeof Schema.String;
293
- input: typeof Schema.String;
294
- providerExecuted: typeof Schema.Boolean;
295
- }>>, Schema.mutable<Schema.TaggedStruct<"toolResult", {
296
- pending: Schema.optional<typeof Schema.Boolean>;
297
- toolCallId: typeof Schema.String;
298
- name: typeof Schema.String;
299
- result: Schema.optional<typeof Schema.String>;
300
- error: Schema.optional<typeof Schema.String>;
301
- providerExecuted: typeof Schema.Boolean;
302
- }>>, Schema.mutable<Schema.TaggedStruct<"transcript", {
303
- pending: Schema.optional<typeof Schema.Boolean>;
304
- started: typeof Schema.String;
305
- text: typeof Schema.String;
306
- }>>]>>>;
307
- properties: Schema.optional<Schema.mutable<Schema.Record$<typeof Schema.String, typeof Schema.Any>>>;
308
- }>>;
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>;
309
353
  timeElapsed: typeof Schema.Number;
310
354
  }>;
311
355
  export interface ExtractionOutput extends Schema.Schema.Type<typeof ExtractionOutput> {
312
356
  }
313
- export type ProcessTranscriptMessageParams = {
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: ProcessTranscriptMessageParams) => Promise<ExtractionOutput>;
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;;;;;;;;qBAUuC,CAAC;wBAE9C,CAAC;6BACD,CAAC;wBAGpB,CAAC;4BAA8C,CAAC;+BAIZ,CAAC;wBACzB,CAAC;0BAIT,CAAC;yBAKa,CAAC;2BACf,CAAC;4BACH,CAAD;;wBAM4C,CAAC;0BAGhD,CAAA;qBAAuC,CAAC;sBAGzC,CADC;;kCACc,CAAC;;0BAAyE,CAAC;;kCAErD,CAAC;;4BACU,CAAC;;kCACtC,CAAC;;sBACwD,CAAC;;;qCAIxB,CAAC;;yBAEzB,CAAC;;uCAIZ,CAAC;yCAI2B,CAAC;yCAA2D,CAAC;uCAAyD,CAAC;2CAA6D,CAAC;oDAAsE,CAAC;wCAA0D,CAAC;;kCAAuE,CAAC;;oBAAmE,CAAC;;kCAA0E,CAAC;;wBAAuE,CAAC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