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

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