@dxos/assistant 0.8.4-main.b97322e → 0.8.4-main.dedc0f3

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 (149) hide show
  1. package/dist/lib/browser/chunk-5GJYG2ML.mjs +396 -0
  2. package/dist/lib/browser/chunk-5GJYG2ML.mjs.map +7 -0
  3. package/dist/lib/browser/chunk-UB26N5UF.mjs +89 -0
  4. package/dist/lib/browser/chunk-UB26N5UF.mjs.map +7 -0
  5. package/dist/lib/browser/extraction/index.mjs +268 -0
  6. package/dist/lib/browser/extraction/index.mjs.map +7 -0
  7. package/dist/lib/browser/index.mjs +295 -1657
  8. package/dist/lib/browser/index.mjs.map +4 -4
  9. package/dist/lib/browser/meta.json +1 -1
  10. package/dist/lib/browser/named-entity-recognition-QPYHML66.mjs +13 -0
  11. package/dist/lib/browser/named-entity-recognition-QPYHML66.mjs.map +7 -0
  12. package/dist/lib/node-esm/chunk-BCFXTNSK.mjs +91 -0
  13. package/dist/lib/node-esm/chunk-BCFXTNSK.mjs.map +7 -0
  14. package/dist/lib/node-esm/chunk-FLFCEB4P.mjs +398 -0
  15. package/dist/lib/node-esm/chunk-FLFCEB4P.mjs.map +7 -0
  16. package/dist/lib/node-esm/extraction/index.mjs +269 -0
  17. package/dist/lib/node-esm/extraction/index.mjs.map +7 -0
  18. package/dist/lib/node-esm/index.mjs +294 -1657
  19. package/dist/lib/node-esm/index.mjs.map +4 -4
  20. package/dist/lib/node-esm/meta.json +1 -1
  21. package/dist/lib/node-esm/named-entity-recognition-2HDF46YX.mjs +14 -0
  22. package/dist/lib/node-esm/named-entity-recognition-2HDF46YX.mjs.map +7 -0
  23. package/dist/types/src/conversation/context.d.ts +96 -0
  24. package/dist/types/src/conversation/context.d.ts.map +1 -0
  25. package/dist/types/src/conversation/conversation.d.ts +25 -21
  26. package/dist/types/src/conversation/conversation.d.ts.map +1 -1
  27. package/dist/types/src/conversation/index.d.ts +1 -0
  28. package/dist/types/src/conversation/index.d.ts.map +1 -1
  29. package/dist/types/src/diff.d.ts +15 -0
  30. package/dist/types/src/diff.d.ts.map +1 -0
  31. package/dist/types/src/diff.test.d.ts +2 -0
  32. package/dist/types/src/diff.test.d.ts.map +1 -0
  33. package/dist/types/src/errors.d.ts +41 -4
  34. package/dist/types/src/errors.d.ts.map +1 -1
  35. package/dist/types/src/extraction/extraction-llm-function/extraction-llm-function.d.ts +1 -1
  36. package/dist/types/src/extraction/extraction-llm-function/extraction-llm-function.d.ts.map +1 -1
  37. package/dist/types/src/extraction/extraction-ner-function/extraction-ner-function.d.ts +65 -30
  38. package/dist/types/src/extraction/extraction-ner-function/extraction-ner-function.d.ts.map +1 -1
  39. package/dist/types/src/extraction/extraction-ner-function/named-entity-recognition.d.ts.map +1 -1
  40. package/dist/types/src/extraction/extraction.d.ts +246 -216
  41. package/dist/types/src/extraction/extraction.d.ts.map +1 -1
  42. package/dist/types/src/functions/services.d.ts +4 -3
  43. package/dist/types/src/functions/services.d.ts.map +1 -1
  44. package/dist/types/src/index.d.ts +2 -3
  45. package/dist/types/src/index.d.ts.map +1 -1
  46. package/dist/types/src/session/artifact-diff.d.ts +27 -0
  47. package/dist/types/src/session/artifact-diff.d.ts.map +1 -0
  48. package/dist/types/src/session/error-handling.d.ts +4 -0
  49. package/dist/types/src/session/error-handling.d.ts.map +1 -0
  50. package/dist/types/src/session/format.d.ts +182 -0
  51. package/dist/types/src/session/format.d.ts.map +1 -0
  52. package/dist/types/src/session/format.test.d.ts +2 -0
  53. package/dist/types/src/session/format.test.d.ts.map +1 -0
  54. package/dist/types/src/session/index.d.ts +3 -0
  55. package/dist/types/src/session/index.d.ts.map +1 -1
  56. package/dist/types/src/session/observer.d.ts +22 -0
  57. package/dist/types/src/session/observer.d.ts.map +1 -0
  58. package/dist/types/src/session/session.d.ts +23 -236
  59. package/dist/types/src/session/session.d.ts.map +1 -1
  60. package/dist/types/src/session/toolkit.d.ts +14 -0
  61. package/dist/types/src/session/toolkit.d.ts.map +1 -0
  62. package/dist/types/src/session/version-pin.d.ts +2 -2
  63. package/dist/types/src/session/version-pin.d.ts.map +1 -1
  64. package/dist/types/src/templates/index.d.ts +1 -1
  65. package/dist/types/src/templates/system.d.ts +18 -0
  66. package/dist/types/src/templates/system.d.ts.map +1 -0
  67. package/dist/types/src/types.d.ts +3 -0
  68. package/dist/types/src/types.d.ts.map +1 -1
  69. package/dist/types/tsconfig.tsbuildinfo +1 -1
  70. package/package.json +45 -28
  71. package/src/conversation/context.ts +154 -0
  72. package/src/conversation/conversation.ts +80 -53
  73. package/src/conversation/index.ts +1 -0
  74. package/src/diff.test.ts +43 -0
  75. package/src/diff.ts +79 -0
  76. package/src/errors.ts +5 -0
  77. package/src/extraction/extraction-llm-function/extraction-llm-function.test.ts +8 -7
  78. package/src/extraction/extraction-llm-function/extraction-llm-function.ts +10 -10
  79. package/src/extraction/extraction-ner-function/extraction-ner-function.test.ts +9 -9
  80. package/src/extraction/extraction-ner-function/extraction-ner-function.ts +12 -7
  81. package/src/extraction/extraction-ner-function/named-entity-recognition.ts +2 -0
  82. package/src/extraction/quotes.test.ts +1 -1
  83. package/src/extraction/quotes.ts +1 -1
  84. package/src/functions/services.ts +57 -77
  85. package/src/index.ts +2 -3
  86. package/src/session/artifact-diff.ts +41 -0
  87. package/src/session/error-handling.ts +36 -0
  88. package/src/session/format.test.ts +60 -0
  89. package/src/session/format.ts +139 -0
  90. package/src/session/index.ts +3 -0
  91. package/src/session/observer.ts +58 -0
  92. package/src/session/session.test.ts +36 -38
  93. package/src/session/session.ts +113 -248
  94. package/src/session/toolkit.ts +42 -0
  95. package/src/session/version-pin.ts +4 -4
  96. package/src/summarization/summarization.test.ts +11 -22
  97. package/src/templates/format.tpl +60 -0
  98. package/src/templates/index.ts +1 -1
  99. package/src/templates/system.tpl +50 -0
  100. package/src/templates/system.ts +41 -0
  101. package/src/types.ts +10 -5
  102. package/src/typings.d.ts +5 -0
  103. package/dist/types/bin/chat.d.ts +0 -2
  104. package/dist/types/bin/chat.d.ts.map +0 -1
  105. package/dist/types/src/context/binder.d.ts +0 -34
  106. package/dist/types/src/context/binder.d.ts.map +0 -1
  107. package/dist/types/src/context/binding.d.ts +0 -56
  108. package/dist/types/src/context/binding.d.ts.map +0 -1
  109. package/dist/types/src/context/index.d.ts +0 -3
  110. package/dist/types/src/context/index.d.ts.map +0 -1
  111. package/dist/types/src/research/exa.d.ts +0 -12
  112. package/dist/types/src/research/exa.d.ts.map +0 -1
  113. package/dist/types/src/research/graph.d.ts +0 -51
  114. package/dist/types/src/research/graph.d.ts.map +0 -1
  115. package/dist/types/src/research/graph.test.d.ts +0 -2
  116. package/dist/types/src/research/graph.test.d.ts.map +0 -1
  117. package/dist/types/src/research/index.d.ts +0 -4
  118. package/dist/types/src/research/index.d.ts.map +0 -1
  119. package/dist/types/src/research/research.d.ts +0 -10
  120. package/dist/types/src/research/research.d.ts.map +0 -1
  121. package/dist/types/src/research/research.test.d.ts +0 -2
  122. package/dist/types/src/research/research.test.d.ts.map +0 -1
  123. package/dist/types/src/templates/prompt.d.ts +0 -30
  124. package/dist/types/src/templates/prompt.d.ts.map +0 -1
  125. package/dist/types/src/testing/exa-search-1748337321991.d.ts +0 -38
  126. package/dist/types/src/testing/exa-search-1748337321991.d.ts.map +0 -1
  127. package/dist/types/src/testing/exa-search-1748337331526.d.ts +0 -37
  128. package/dist/types/src/testing/exa-search-1748337331526.d.ts.map +0 -1
  129. package/dist/types/src/testing/exa-search-1748337344119.d.ts +0 -58
  130. package/dist/types/src/testing/exa-search-1748337344119.d.ts.map +0 -1
  131. package/dist/types/src/testing/index.d.ts +0 -3
  132. package/dist/types/src/testing/index.d.ts.map +0 -1
  133. package/src/context/binder.ts +0 -103
  134. package/src/context/binding.ts +0 -32
  135. package/src/context/index.ts +0 -6
  136. package/src/research/exa.ts +0 -97
  137. package/src/research/graph.test.ts +0 -64
  138. package/src/research/graph.ts +0 -369
  139. package/src/research/index.ts +0 -7
  140. package/src/research/instructions-research.tpl +0 -98
  141. package/src/research/research.test.ts +0 -190
  142. package/src/research/research.ts +0 -87
  143. package/src/templates/assistant.tpl +0 -111
  144. package/src/templates/prompt.ts +0 -45
  145. package/src/testing/exa-search-1748337321991.ts +0 -131
  146. package/src/testing/exa-search-1748337331526.ts +0 -144
  147. package/src/testing/exa-search-1748337344119.ts +0 -133
  148. package/src/testing/index.ts +0 -11
  149. package/src/typedefs.d.ts +0 -8
@@ -1,10 +1,18 @@
1
- export declare const extractionNerFn: import("@dxos/functions").FunctionDefinition<{
1
+ /**
2
+ * Named Entity Recognition model
3
+ */
4
+ export declare const extractionNerFunction: import("@dxos/functions").FunctionDefinition<{
5
+ readonly objects?: readonly import("@dxos/echo-schema").Expando[] | undefined;
6
+ readonly options?: {
7
+ readonly timeout?: number | undefined;
8
+ readonly fallbackToRaw?: boolean | undefined;
9
+ } | undefined;
2
10
  readonly message: import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
3
11
  id: string;
12
+ parentMessage?: string | undefined;
4
13
  created: string;
5
14
  sender: {
6
15
  name?: string | undefined;
7
- email?: string | undefined;
8
16
  contact?: import("@dxos/echo-schema").Ref<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
9
17
  fields?: {
10
18
  readonly value: string;
@@ -17,8 +25,8 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
17
25
  nickname?: string | undefined;
18
26
  organization?: import("@dxos/echo-schema").Ref<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
19
27
  id: string;
20
- name?: string | undefined;
21
28
  description?: string | undefined;
29
+ name?: string | undefined;
22
30
  status?: "prospect" | "qualified" | "active" | "commit" | "reject" | undefined;
23
31
  image?: string | undefined;
24
32
  website?: string | undefined;
@@ -58,6 +66,7 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
58
66
  }> | undefined;
59
67
  identityDid?: string | undefined;
60
68
  identityKey?: string | undefined;
69
+ email?: string | undefined;
61
70
  role?: "user" | "assistant" | undefined;
62
71
  };
63
72
  blocks: ({
@@ -68,8 +77,8 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
68
77
  } | {
69
78
  name?: string | undefined;
70
79
  _tag: "file";
71
- pending?: boolean | undefined;
72
80
  url: string;
81
+ pending?: boolean | undefined;
73
82
  mediaType?: string | undefined;
74
83
  } | {
75
84
  id?: string | undefined;
@@ -94,13 +103,13 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
94
103
  pending?: boolean | undefined;
95
104
  } | {
96
105
  _tag: "reasoning";
97
- pending?: boolean | undefined;
98
106
  reasoningText?: string | undefined;
99
- redactedText?: string | undefined;
100
107
  signature?: string | undefined;
108
+ redactedText?: string | undefined;
109
+ pending?: boolean | undefined;
101
110
  } | {
102
- reference: import("@dxos/echo-schema").Ref<import("@dxos/echo/Type").Expando>;
103
111
  _tag: "reference";
112
+ reference: import("@dxos/echo-schema").Ref<import("@dxos/echo/Type").Expando>;
104
113
  pending?: boolean | undefined;
105
114
  } | {
106
115
  _tag: "select";
@@ -112,29 +121,44 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
112
121
  statusText: string;
113
122
  } | {
114
123
  text: string;
115
- _tag: "suggest";
124
+ _tag: "suggestion";
125
+ pending?: boolean | undefined;
126
+ } | {
127
+ _tag: "summary";
128
+ model?: string | undefined;
129
+ usage?: {
130
+ readonly inputTokens?: number | undefined;
131
+ readonly outputTokens?: number | undefined;
132
+ readonly totalTokens?: number | undefined;
133
+ } | undefined;
116
134
  pending?: boolean | undefined;
135
+ mimeType?: string | undefined;
136
+ message?: string | undefined;
137
+ toolCalls?: number | undefined;
138
+ errors?: number | undefined;
139
+ duration?: number | undefined;
117
140
  } | {
118
141
  text: string;
119
142
  _tag: "text";
120
143
  pending?: boolean | undefined;
121
144
  disposition?: string | undefined;
122
145
  mimeType?: string | undefined;
146
+ } | {
147
+ _tag: "toolkit";
148
+ pending?: boolean | undefined;
123
149
  } | {
124
150
  name: string;
125
- input: unknown;
126
151
  _tag: "toolCall";
127
152
  pending?: boolean | undefined;
128
153
  toolCallId: string;
129
- } | {
130
- _tag: "toolList";
131
- pending?: boolean | undefined;
154
+ input: string;
132
155
  } | {
133
156
  name: string;
134
157
  _tag: "toolResult";
158
+ error?: string | undefined;
135
159
  pending?: boolean | undefined;
136
160
  toolCallId: string;
137
- result: unknown;
161
+ result?: string | undefined;
138
162
  } | {
139
163
  text: string;
140
164
  _tag: "transcript";
@@ -145,18 +169,13 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
145
169
  [x: string]: any;
146
170
  } | undefined;
147
171
  };
148
- readonly objects?: readonly import("@dxos/echo-schema").Expando[] | undefined;
149
- readonly options?: {
150
- readonly timeout?: number | undefined;
151
- readonly fallbackToRaw?: boolean | undefined;
152
- } | undefined;
153
172
  }, {
154
173
  readonly message: import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
155
174
  id: string;
175
+ parentMessage?: string | undefined;
156
176
  created: string;
157
177
  sender: {
158
178
  name?: string | undefined;
159
- email?: string | undefined;
160
179
  contact?: import("@dxos/echo-schema").Ref<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
161
180
  fields?: {
162
181
  readonly value: string;
@@ -169,8 +188,8 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
169
188
  nickname?: string | undefined;
170
189
  organization?: import("@dxos/echo-schema").Ref<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
171
190
  id: string;
172
- name?: string | undefined;
173
191
  description?: string | undefined;
192
+ name?: string | undefined;
174
193
  status?: "prospect" | "qualified" | "active" | "commit" | "reject" | undefined;
175
194
  image?: string | undefined;
176
195
  website?: string | undefined;
@@ -210,6 +229,7 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
210
229
  }> | undefined;
211
230
  identityDid?: string | undefined;
212
231
  identityKey?: string | undefined;
232
+ email?: string | undefined;
213
233
  role?: "user" | "assistant" | undefined;
214
234
  };
215
235
  blocks: ({
@@ -220,8 +240,8 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
220
240
  } | {
221
241
  name?: string | undefined;
222
242
  _tag: "file";
223
- pending?: boolean | undefined;
224
243
  url: string;
244
+ pending?: boolean | undefined;
225
245
  mediaType?: string | undefined;
226
246
  } | {
227
247
  id?: string | undefined;
@@ -246,13 +266,13 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
246
266
  pending?: boolean | undefined;
247
267
  } | {
248
268
  _tag: "reasoning";
249
- pending?: boolean | undefined;
250
269
  reasoningText?: string | undefined;
251
- redactedText?: string | undefined;
252
270
  signature?: string | undefined;
271
+ redactedText?: string | undefined;
272
+ pending?: boolean | undefined;
253
273
  } | {
254
- reference: import("@dxos/echo-schema").Ref<import("@dxos/echo/Type").Expando>;
255
274
  _tag: "reference";
275
+ reference: import("@dxos/echo-schema").Ref<import("@dxos/echo/Type").Expando>;
256
276
  pending?: boolean | undefined;
257
277
  } | {
258
278
  _tag: "select";
@@ -264,29 +284,44 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
264
284
  statusText: string;
265
285
  } | {
266
286
  text: string;
267
- _tag: "suggest";
287
+ _tag: "suggestion";
288
+ pending?: boolean | undefined;
289
+ } | {
290
+ _tag: "summary";
291
+ model?: string | undefined;
292
+ usage?: {
293
+ readonly inputTokens?: number | undefined;
294
+ readonly outputTokens?: number | undefined;
295
+ readonly totalTokens?: number | undefined;
296
+ } | undefined;
268
297
  pending?: boolean | undefined;
298
+ mimeType?: string | undefined;
299
+ message?: string | undefined;
300
+ toolCalls?: number | undefined;
301
+ errors?: number | undefined;
302
+ duration?: number | undefined;
269
303
  } | {
270
304
  text: string;
271
305
  _tag: "text";
272
306
  pending?: boolean | undefined;
273
307
  disposition?: string | undefined;
274
308
  mimeType?: string | undefined;
309
+ } | {
310
+ _tag: "toolkit";
311
+ pending?: boolean | undefined;
275
312
  } | {
276
313
  name: string;
277
- input: unknown;
278
314
  _tag: "toolCall";
279
315
  pending?: boolean | undefined;
280
316
  toolCallId: string;
281
- } | {
282
- _tag: "toolList";
283
- pending?: boolean | undefined;
317
+ input: string;
284
318
  } | {
285
319
  name: string;
286
320
  _tag: "toolResult";
321
+ error?: string | undefined;
287
322
  pending?: boolean | undefined;
288
323
  toolCallId: string;
289
- result: unknown;
324
+ result?: string | undefined;
290
325
  } | {
291
326
  text: string;
292
327
  _tag: "transcript";
@@ -1 +1 @@
1
- {"version":3,"file":"extraction-ner-function.d.ts","sourceRoot":"","sources":["../../../../../src/extraction/extraction-ner-function/extraction-ner-function.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqC1B,CAAC"}
1
+ {"version":3,"file":"extraction-ner-function.d.ts","sourceRoot":"","sources":["../../../../../src/extraction/extraction-ner-function/extraction-ner-function.ts"],"names":[],"mappings":"AAiBA;;GAEG;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwChC,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"}