@dxos/assistant 0.8.4-main.e8ec1fe → 0.8.4-main.ef1bc66f44

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