@dxos/assistant 0.8.4-main.5ea62a8 → 0.8.4-main.66e292d

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