@dxos/assistant 0.8.4-main.f9ba587 → 0.8.4-main.fffef41

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 (177) hide show
  1. package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
  2. package/dist/lib/browser/chunk-J5LGTIGS.mjs.map +7 -0
  3. package/dist/lib/browser/extraction/index.mjs +225 -0
  4. package/dist/lib/browser/extraction/index.mjs.map +7 -0
  5. package/dist/lib/browser/index.mjs +1114 -1843
  6. package/dist/lib/browser/index.mjs.map +4 -4
  7. package/dist/lib/browser/meta.json +1 -1
  8. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
  9. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
  10. package/dist/lib/node-esm/extraction/index.mjs +226 -0
  11. package/dist/lib/node-esm/extraction/index.mjs.map +7 -0
  12. package/dist/lib/node-esm/index.mjs +1114 -1844
  13. package/dist/lib/node-esm/index.mjs.map +4 -4
  14. package/dist/lib/node-esm/meta.json +1 -1
  15. package/dist/types/src/conversation/context.d.ts +103 -0
  16. package/dist/types/src/conversation/context.d.ts.map +1 -0
  17. package/dist/types/src/conversation/conversation.d.ts +29 -32
  18. package/dist/types/src/conversation/conversation.d.ts.map +1 -1
  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 +15 -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 +71 -0
  26. package/dist/types/src/errors.d.ts.map +1 -0
  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 +195 -58
  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 +1 -1
  36. package/dist/types/src/extraction/extraction-ner-function/named-entity-recognition.d.ts.map +1 -1
  37. package/dist/types/src/extraction/extraction.d.ts +264 -165
  38. package/dist/types/src/extraction/extraction.d.ts.map +1 -1
  39. package/dist/types/src/extraction/quotes.d.ts +1 -1
  40. package/dist/types/src/extraction/quotes.d.ts.map +1 -1
  41. package/dist/types/src/functions/index.d.ts +2 -0
  42. package/dist/types/src/functions/index.d.ts.map +1 -0
  43. package/dist/types/src/functions/services.d.ts +20 -0
  44. package/dist/types/src/functions/services.d.ts.map +1 -0
  45. package/dist/types/src/index.d.ts +5 -5
  46. package/dist/types/src/index.d.ts.map +1 -1
  47. package/dist/types/src/session/GenericToolkit.d.ts +84 -0
  48. package/dist/types/src/session/GenericToolkit.d.ts.map +1 -0
  49. package/dist/types/src/session/artifact-diff.d.ts +27 -0
  50. package/dist/types/src/session/artifact-diff.d.ts.map +1 -0
  51. package/dist/types/src/session/error-handling.d.ts +4 -0
  52. package/dist/types/src/session/error-handling.d.ts.map +1 -0
  53. package/dist/types/src/session/format.d.ts +12 -0
  54. package/dist/types/src/session/format.d.ts.map +1 -0
  55. package/dist/types/src/session/format.test.d.ts +2 -0
  56. package/dist/types/src/session/format.test.d.ts.map +1 -0
  57. package/dist/types/src/session/index.d.ts +4 -0
  58. package/dist/types/src/session/index.d.ts.map +1 -1
  59. package/dist/types/src/session/observer.d.ts +22 -0
  60. package/dist/types/src/session/observer.d.ts.map +1 -0
  61. package/dist/types/src/session/session.d.ts +36 -268
  62. package/dist/types/src/session/session.d.ts.map +1 -1
  63. package/dist/types/src/session/toolkit.d.ts +15 -0
  64. package/dist/types/src/session/toolkit.d.ts.map +1 -0
  65. package/dist/types/src/session/version-pin.d.ts +5 -5
  66. package/dist/types/src/session/version-pin.d.ts.map +1 -1
  67. package/dist/types/src/templates/index.d.ts +2 -0
  68. package/dist/types/src/templates/index.d.ts.map +1 -0
  69. package/dist/types/src/templates/system.d.ts +18 -0
  70. package/dist/types/src/templates/system.d.ts.map +1 -0
  71. package/dist/types/src/types/artifact.d.ts +20 -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 +48 -26
  77. package/src/conversation/context.ts +186 -0
  78. package/src/conversation/conversation.ts +101 -76
  79. package/src/conversation/index.ts +1 -0
  80. package/src/diff.test.ts +43 -0
  81. package/src/diff.ts +84 -0
  82. package/src/errors.ts +15 -0
  83. package/src/execution-graph.test.ts +740 -0
  84. package/src/execution-graph.ts +509 -0
  85. package/src/extraction/extraction-llm-function/extraction-llm-function.test.ts +14 -25
  86. package/src/extraction/extraction-llm-function/extraction-llm-function.ts +48 -52
  87. package/src/extraction/extraction-ner-function/extraction-ner-function.test.ts +18 -17
  88. package/src/extraction/extraction-ner-function/extraction-ner-function.ts +43 -41
  89. package/src/extraction/extraction-ner-function/named-entity-recognition.test.ts +12 -6
  90. package/src/extraction/extraction-ner-function/named-entity-recognition.ts +3 -1
  91. package/src/extraction/extraction.ts +7 -6
  92. package/src/extraction/quotes.test.ts +3 -3
  93. package/src/extraction/quotes.ts +4 -4
  94. package/src/functions/index.ts +5 -0
  95. package/src/functions/services.ts +162 -0
  96. package/src/index.ts +5 -5
  97. package/src/session/GenericToolkit.ts +130 -0
  98. package/src/session/artifact-diff.ts +41 -0
  99. package/src/session/error-handling.ts +41 -0
  100. package/src/session/format.test.ts +61 -0
  101. package/src/session/format.ts +144 -0
  102. package/src/session/index.ts +5 -0
  103. package/src/session/observer.ts +59 -0
  104. package/src/session/session.conversations.json +1 -0
  105. package/src/session/session.test.ts +88 -214
  106. package/src/session/session.ts +170 -539
  107. package/src/session/toolkit.ts +48 -0
  108. package/src/session/version-pin.ts +11 -12
  109. package/src/templates/index.ts +5 -0
  110. package/src/templates/instructions/format.tpl +61 -0
  111. package/src/templates/instructions/system.tpl +48 -0
  112. package/src/templates/system.ts +41 -0
  113. package/src/types/artifact.ts +71 -0
  114. package/src/types/index.ts +5 -0
  115. package/src/typings.d.ts +5 -0
  116. package/dist/types/bin/chat.d.ts +0 -2
  117. package/dist/types/bin/chat.d.ts.map +0 -1
  118. package/dist/types/src/blueprint/blueprint.d.ts +0 -41
  119. package/dist/types/src/blueprint/blueprint.d.ts.map +0 -1
  120. package/dist/types/src/blueprint/index.d.ts +0 -3
  121. package/dist/types/src/blueprint/index.d.ts.map +0 -1
  122. package/dist/types/src/blueprint/registry.d.ts +0 -7
  123. package/dist/types/src/blueprint/registry.d.ts.map +0 -1
  124. package/dist/types/src/context/binder.d.ts +0 -34
  125. package/dist/types/src/context/binder.d.ts.map +0 -1
  126. package/dist/types/src/context/binding.d.ts +0 -38
  127. package/dist/types/src/context/binding.d.ts.map +0 -1
  128. package/dist/types/src/context/index.d.ts +0 -3
  129. package/dist/types/src/context/index.d.ts.map +0 -1
  130. package/dist/types/src/research/exa.d.ts +0 -7
  131. package/dist/types/src/research/exa.d.ts.map +0 -1
  132. package/dist/types/src/research/graph.d.ts +0 -41
  133. package/dist/types/src/research/graph.d.ts.map +0 -1
  134. package/dist/types/src/research/graph.test.d.ts +0 -2
  135. package/dist/types/src/research/graph.test.d.ts.map +0 -1
  136. package/dist/types/src/research/index.d.ts +0 -4
  137. package/dist/types/src/research/index.d.ts.map +0 -1
  138. package/dist/types/src/research/research.d.ts +0 -10
  139. package/dist/types/src/research/research.d.ts.map +0 -1
  140. package/dist/types/src/research/research.test.d.ts +0 -2
  141. package/dist/types/src/research/research.test.d.ts.map +0 -1
  142. package/dist/types/src/session/version-pin.test.d.ts +0 -2
  143. package/dist/types/src/session/version-pin.test.d.ts.map +0 -1
  144. package/dist/types/src/summarization/summarization.test.d.ts +0 -2
  145. package/dist/types/src/summarization/summarization.test.d.ts.map +0 -1
  146. package/dist/types/src/testing/exa-search-1748337321991.d.ts +0 -38
  147. package/dist/types/src/testing/exa-search-1748337321991.d.ts.map +0 -1
  148. package/dist/types/src/testing/exa-search-1748337331526.d.ts +0 -37
  149. package/dist/types/src/testing/exa-search-1748337331526.d.ts.map +0 -1
  150. package/dist/types/src/testing/exa-search-1748337344119.d.ts +0 -58
  151. package/dist/types/src/testing/exa-search-1748337344119.d.ts.map +0 -1
  152. package/dist/types/src/testing/index.d.ts +0 -3
  153. package/dist/types/src/testing/index.d.ts.map +0 -1
  154. package/dist/types/src/types.d.ts +0 -3
  155. package/dist/types/src/types.d.ts.map +0 -1
  156. package/src/blueprint/blueprint.ts +0 -75
  157. package/src/blueprint/index.ts +0 -6
  158. package/src/blueprint/registry.ts +0 -15
  159. package/src/context/binder.ts +0 -101
  160. package/src/context/binding.ts +0 -31
  161. package/src/context/index.ts +0 -6
  162. package/src/research/exa.ts +0 -100
  163. package/src/research/graph.test.ts +0 -15
  164. package/src/research/graph.ts +0 -337
  165. package/src/research/index.ts +0 -7
  166. package/src/research/instructions-research.tpl +0 -97
  167. package/src/research/research.test.ts +0 -190
  168. package/src/research/research.ts +0 -90
  169. package/src/session/version-pin.test.ts +0 -26
  170. package/src/summarization/summarization.test.ts +0 -221
  171. package/src/testing/exa-search-1748337321991.ts +0 -131
  172. package/src/testing/exa-search-1748337331526.ts +0 -144
  173. package/src/testing/exa-search-1748337344119.ts +0 -133
  174. package/src/testing/index.ts +0 -11
  175. package/src/typedefs.d.ts +0 -8
  176. package/src/types.ts +0 -8
  177. /package/src/extraction/extraction-llm-function/{instructions.tpl → transcription-instructions.tpl} +0 -0
@@ -1,109 +1,159 @@
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 { Expando } from '@dxos/echo/internal';
3
+ import { type FunctionDefinition } from '@dxos/functions';
4
+ import { type FunctionExecutor } from '@dxos/functions-runtime';
4
5
  export declare const ExtractionInput: Schema.Struct<{
5
6
  message: import("@dxos/echo/Type").obj<Schema.Struct<{
6
7
  id: import("@dxos/keys").ObjectIdClass;
7
- created: import("effect/Schema").SchemaClass<string, string, never>;
8
- sender: import("effect/Schema").mutable<import("effect/Schema").Struct<{
9
- contact: import("effect/Schema").optional<import("@dxos/echo/Type").ref<import("@dxos/echo/Type").obj<import("effect/Schema").Struct<{
10
- fullName: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
11
- preferredName: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
12
- nickname: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
13
- image: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
14
- organization: import("effect/Schema").optional<import("effect/Schema").Schema<import("@dxos/echo-schema").Ref<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
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> & {
15
17
  description?: string | undefined;
16
18
  id: string;
17
19
  name?: string | undefined;
18
20
  status?: "prospect" | "qualified" | "active" | "commit" | "reject" | undefined;
19
21
  image?: string | undefined;
20
22
  website?: string | undefined;
23
+ location?: readonly [number, number, (number | undefined)?] | undefined;
21
24
  }>, import("@dxos/echo-protocol").EncodedReference, never>>;
22
- jobTitle: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
23
- department: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
24
- notes: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
25
- emails: import("effect/Schema").optional<import("effect/Schema").mutable<import("effect/Schema").Array$<import("effect/Schema").Struct<{
26
- label: import("effect/Schema").optional<typeof import("effect/Schema").String>;
27
- value: import("effect/Schema").refine<string, typeof import("effect/Schema").String>;
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>;
28
31
  }>>>>;
29
- identities: import("effect/Schema").optional<import("effect/Schema").mutable<import("effect/Schema").Array$<import("effect/Schema").Struct<{
30
- label: import("effect/Schema").optional<typeof import("effect/Schema").String>;
31
- value: typeof import("effect/Schema").String;
32
+ identities: Schema.optional<Schema.mutable<Schema.Array$<Schema.Struct<{
33
+ label: Schema.optional<typeof Schema.String>;
34
+ value: typeof Schema.String;
32
35
  }>>>>;
33
- phoneNumbers: import("effect/Schema").optional<import("effect/Schema").mutable<import("effect/Schema").Array$<import("effect/Schema").Struct<{
34
- label: import("effect/Schema").optional<typeof import("effect/Schema").String>;
35
- value: typeof import("effect/Schema").String;
36
+ phoneNumbers: Schema.optional<Schema.mutable<Schema.Array$<Schema.Struct<{
37
+ label: Schema.optional<typeof Schema.String>;
38
+ value: typeof Schema.String;
36
39
  }>>>>;
37
- addresses: import("effect/Schema").optional<import("effect/Schema").mutable<import("effect/Schema").Array$<import("effect/Schema").Struct<{
38
- label: import("effect/Schema").optional<typeof import("effect/Schema").String>;
39
- value: import("effect/Schema").Struct<{
40
- street: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
41
- extended: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
42
- locality: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
43
- region: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
44
- postalCode: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
45
- postOfficeBoxNumber: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
46
- country: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
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>>;
47
50
  }>;
48
51
  }>>>>;
49
- urls: import("effect/Schema").optional<import("effect/Schema").mutable<import("effect/Schema").Array$<import("effect/Schema").Struct<{
50
- label: import("effect/Schema").optional<typeof import("effect/Schema").String>;
51
- value: import("effect/Schema").refine<string, typeof import("effect/Schema").String>;
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>;
52
55
  }>>>>;
53
- birthday: import("effect/Schema").optional<import("effect/Schema").mutable<import("effect/Schema").SchemaClass<string, string, never>>>;
54
- fields: import("effect/Schema").optional<import("effect/Schema").mutable<import("effect/Schema").Array$<import("effect/Schema").Struct<{
55
- category: import("effect/Schema").optional<typeof import("effect/Schema").String>;
56
- label: typeof import("effect/Schema").String;
57
- value: typeof import("effect/Schema").String;
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;
58
61
  }>>>>;
59
- }>>>>;
60
- identityDid: import("effect/Schema").optional<typeof import("effect/Schema").String>;
61
- identityKey: import("effect/Schema").optional<typeof import("effect/Schema").String>;
62
- email: import("effect/Schema").optional<typeof import("effect/Schema").String>;
63
- name: import("effect/Schema").optional<typeof import("effect/Schema").String>;
64
- role: import("effect/Schema").optional<import("effect/Schema").Literal<["user", "assistant"]>>;
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"]>>;
65
70
  }>>;
66
- blocks: import("effect/Schema").mutable<import("effect/Schema").Array$<import("effect/Schema").Union<[import("effect/Schema").mutable<import("effect/Schema").extend<import("effect/Schema").Struct<{
67
- pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
68
- }>, import("effect/Schema").Struct<{
69
- type: import("effect/Schema").Literal<["text"]>;
70
- disposition: import("effect/Schema").optional<typeof import("effect/Schema").String>;
71
- text: typeof import("effect/Schema").String;
72
- }>>>, import("effect/Schema").mutable<import("effect/Schema").extend<import("effect/Schema").Struct<{
73
- pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
74
- }>, import("effect/Schema").Struct<{
75
- type: import("effect/Schema").Literal<["json"]>;
76
- disposition: import("effect/Schema").optional<typeof import("effect/Schema").String>;
77
- data: typeof import("effect/Schema").String;
78
- }>>>, import("effect/Schema").mutable<import("effect/Schema").extend<import("effect/Schema").Struct<{
79
- pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
80
- }>, import("effect/Schema").Struct<{
81
- type: import("effect/Schema").Literal<["image"]>;
82
- id: import("effect/Schema").optional<typeof import("effect/Schema").String>;
83
- source: import("effect/Schema").optional<import("effect/Schema").Union<[import("effect/Schema").mutable<import("effect/Schema").Struct<{
84
- type: import("effect/Schema").Literal<["base64"]>;
85
- mediaType: typeof import("effect/Schema").String;
86
- data: typeof import("effect/Schema").String;
87
- }>>, import("effect/Schema").mutable<import("effect/Schema").Struct<{
88
- type: import("effect/Schema").Literal<["http"]>;
89
- url: typeof import("effect/Schema").String;
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
90
  }>>]>>;
91
- }>>>, import("effect/Schema").mutable<import("effect/Schema").extend<import("effect/Schema").Struct<{
92
- pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
93
- }>, import("effect/Schema").Struct<{
94
- type: import("effect/Schema").Literal<["reference"]>;
95
- reference: import("@dxos/echo/Type").ref<import("effect/Schema").Schema<import("@dxos/echo/Type").Expando, {
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, {
96
106
  [x: string]: any;
97
107
  id: string;
98
108
  }, never>>;
99
- }>>>, import("effect/Schema").mutable<import("effect/Schema").extend<import("effect/Schema").Struct<{
100
- pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
101
- }>, import("effect/Schema").Struct<{
102
- type: import("effect/Schema").Literal<["transcription"]>;
103
- started: typeof import("effect/Schema").String;
104
- text: typeof import("effect/Schema").String;
105
- }>>>]>>>;
106
- properties: import("effect/Schema").optional<import("effect/Schema").mutable<import("effect/Schema").Record$<typeof import("effect/Schema").String, typeof import("effect/Schema").Any>>>;
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>>>;
107
157
  }>>;
108
158
  objects: Schema.optional<Schema.Array$<Schema.Schema<Expando, Expando, never>>>;
109
159
  options: Schema.optional<Schema.Struct<{
@@ -116,106 +166,155 @@ export interface ExtractionInput extends Schema.Schema.Type<typeof ExtractionInp
116
166
  export declare const ExtractionOutput: Schema.Struct<{
117
167
  message: import("@dxos/echo/Type").obj<Schema.Struct<{
118
168
  id: import("@dxos/keys").ObjectIdClass;
119
- created: import("effect/Schema").SchemaClass<string, string, never>;
120
- sender: import("effect/Schema").mutable<import("effect/Schema").Struct<{
121
- contact: import("effect/Schema").optional<import("@dxos/echo/Type").ref<import("@dxos/echo/Type").obj<import("effect/Schema").Struct<{
122
- fullName: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
123
- preferredName: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
124
- nickname: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
125
- image: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
126
- organization: import("effect/Schema").optional<import("effect/Schema").Schema<import("@dxos/echo-schema").Ref<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
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> & {
127
178
  description?: string | undefined;
128
179
  id: string;
129
180
  name?: string | undefined;
130
181
  status?: "prospect" | "qualified" | "active" | "commit" | "reject" | undefined;
131
182
  image?: string | undefined;
132
183
  website?: string | undefined;
184
+ location?: readonly [number, number, (number | undefined)?] | undefined;
133
185
  }>, import("@dxos/echo-protocol").EncodedReference, never>>;
134
- jobTitle: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
135
- department: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
136
- notes: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
137
- emails: import("effect/Schema").optional<import("effect/Schema").mutable<import("effect/Schema").Array$<import("effect/Schema").Struct<{
138
- label: import("effect/Schema").optional<typeof import("effect/Schema").String>;
139
- value: import("effect/Schema").refine<string, typeof import("effect/Schema").String>;
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>;
140
192
  }>>>>;
141
- identities: import("effect/Schema").optional<import("effect/Schema").mutable<import("effect/Schema").Array$<import("effect/Schema").Struct<{
142
- label: import("effect/Schema").optional<typeof import("effect/Schema").String>;
143
- value: typeof import("effect/Schema").String;
193
+ identities: Schema.optional<Schema.mutable<Schema.Array$<Schema.Struct<{
194
+ label: Schema.optional<typeof Schema.String>;
195
+ value: typeof Schema.String;
144
196
  }>>>>;
145
- phoneNumbers: import("effect/Schema").optional<import("effect/Schema").mutable<import("effect/Schema").Array$<import("effect/Schema").Struct<{
146
- label: import("effect/Schema").optional<typeof import("effect/Schema").String>;
147
- value: typeof import("effect/Schema").String;
197
+ phoneNumbers: Schema.optional<Schema.mutable<Schema.Array$<Schema.Struct<{
198
+ label: Schema.optional<typeof Schema.String>;
199
+ value: typeof Schema.String;
148
200
  }>>>>;
149
- addresses: import("effect/Schema").optional<import("effect/Schema").mutable<import("effect/Schema").Array$<import("effect/Schema").Struct<{
150
- label: import("effect/Schema").optional<typeof import("effect/Schema").String>;
151
- value: import("effect/Schema").Struct<{
152
- street: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
153
- extended: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
154
- locality: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
155
- region: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
156
- postalCode: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
157
- postOfficeBoxNumber: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
158
- country: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
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>>;
159
211
  }>;
160
212
  }>>>>;
161
- urls: import("effect/Schema").optional<import("effect/Schema").mutable<import("effect/Schema").Array$<import("effect/Schema").Struct<{
162
- label: import("effect/Schema").optional<typeof import("effect/Schema").String>;
163
- value: import("effect/Schema").refine<string, typeof import("effect/Schema").String>;
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>;
164
216
  }>>>>;
165
- birthday: import("effect/Schema").optional<import("effect/Schema").mutable<import("effect/Schema").SchemaClass<string, string, never>>>;
166
- fields: import("effect/Schema").optional<import("effect/Schema").mutable<import("effect/Schema").Array$<import("effect/Schema").Struct<{
167
- category: import("effect/Schema").optional<typeof import("effect/Schema").String>;
168
- label: typeof import("effect/Schema").String;
169
- value: typeof import("effect/Schema").String;
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;
170
222
  }>>>>;
171
- }>>>>;
172
- identityDid: import("effect/Schema").optional<typeof import("effect/Schema").String>;
173
- identityKey: import("effect/Schema").optional<typeof import("effect/Schema").String>;
174
- email: import("effect/Schema").optional<typeof import("effect/Schema").String>;
175
- name: import("effect/Schema").optional<typeof import("effect/Schema").String>;
176
- role: import("effect/Schema").optional<import("effect/Schema").Literal<["user", "assistant"]>>;
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"]>>;
177
231
  }>>;
178
- blocks: import("effect/Schema").mutable<import("effect/Schema").Array$<import("effect/Schema").Union<[import("effect/Schema").mutable<import("effect/Schema").extend<import("effect/Schema").Struct<{
179
- pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
180
- }>, import("effect/Schema").Struct<{
181
- type: import("effect/Schema").Literal<["text"]>;
182
- disposition: import("effect/Schema").optional<typeof import("effect/Schema").String>;
183
- text: typeof import("effect/Schema").String;
184
- }>>>, import("effect/Schema").mutable<import("effect/Schema").extend<import("effect/Schema").Struct<{
185
- pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
186
- }>, import("effect/Schema").Struct<{
187
- type: import("effect/Schema").Literal<["json"]>;
188
- disposition: import("effect/Schema").optional<typeof import("effect/Schema").String>;
189
- data: typeof import("effect/Schema").String;
190
- }>>>, import("effect/Schema").mutable<import("effect/Schema").extend<import("effect/Schema").Struct<{
191
- pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
192
- }>, import("effect/Schema").Struct<{
193
- type: import("effect/Schema").Literal<["image"]>;
194
- id: import("effect/Schema").optional<typeof import("effect/Schema").String>;
195
- source: import("effect/Schema").optional<import("effect/Schema").Union<[import("effect/Schema").mutable<import("effect/Schema").Struct<{
196
- type: import("effect/Schema").Literal<["base64"]>;
197
- mediaType: typeof import("effect/Schema").String;
198
- data: typeof import("effect/Schema").String;
199
- }>>, import("effect/Schema").mutable<import("effect/Schema").Struct<{
200
- type: import("effect/Schema").Literal<["http"]>;
201
- url: typeof import("effect/Schema").String;
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;
202
251
  }>>]>>;
203
- }>>>, import("effect/Schema").mutable<import("effect/Schema").extend<import("effect/Schema").Struct<{
204
- pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
205
- }>, import("effect/Schema").Struct<{
206
- type: import("effect/Schema").Literal<["reference"]>;
207
- reference: import("@dxos/echo/Type").ref<import("effect/Schema").Schema<import("@dxos/echo/Type").Expando, {
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, {
208
267
  [x: string]: any;
209
268
  id: string;
210
269
  }, never>>;
211
- }>>>, import("effect/Schema").mutable<import("effect/Schema").extend<import("effect/Schema").Struct<{
212
- pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
213
- }>, import("effect/Schema").Struct<{
214
- type: import("effect/Schema").Literal<["transcription"]>;
215
- started: typeof import("effect/Schema").String;
216
- text: typeof import("effect/Schema").String;
217
- }>>>]>>>;
218
- properties: import("effect/Schema").optional<import("effect/Schema").mutable<import("effect/Schema").Record$<typeof import("effect/Schema").String, typeof import("effect/Schema").Any>>>;
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>>>;
219
318
  }>>;
220
319
  timeElapsed: typeof Schema.Number;
221
320
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"extraction.d.ts","sourceRoot":"","sources":["../../../../src/extraction/extraction.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAIjF,eAAO,MAAM,eAAe;;;;;;;;;;;+BA+Dq4iB,CAAC;;wBAA8E,CAAC;0BAAgD,CAAC;yBAAkG,CAAC;2BAAiD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAtDrrjB,CAAC;AACH,MAAM,WAAW,eAAgB,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,eAAe,CAAC;CAAG;AAEtF,eAAO,MAAM,gBAAgB;;;;;;;;;;;+BAmDo4iB,CAAC;;wBAA8E,CAAC;0BAAgD,CAAC;yBAAkG,CAAC;2BAAiD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAhDrrjB,CAAC;AACH,MAAM,WAAW,gBAAiB,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,gBAAgB,CAAC;CAAG;AAExF,MAAM,MAAM,8BAA8B,GAAG;IAC3C,KAAK,EAAE,eAAe,CAAC;IACvB,QAAQ,EAAE,kBAAkB,CAAC,eAAe,EAAE,gBAAgB,CAAC,CAAC;IAChE,QAAQ,EAAE,gBAAgB,CAAC;IAE3B,OAAO,CAAC,EAAE;QACR;;WAEG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;QAEjB;;;;WAIG;QACH,aAAa,CAAC,EAAE,OAAO,CAAC;KACzB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,kBAAkB,CAAC,eAAe,EAAE,gBAAgB,CAAC,CAAC;AAEvF;;GAEG;AAEH,eAAO,MAAM,wBAAwB,GAAU,QAAQ,8BAA8B,KAAG,OAAO,CAAC,gBAAgB,CAkB/G,CAAC"}
1
+ {"version":3,"file":"extraction.d.ts","sourceRoot":"","sources":["../../../../src/extraction/extraction.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAIhE,eAAO,MAAM,eAAe;;;;;;;;;;;;+BAoBJ,CAAC;;wBACG,CAAC;0BAIT,CAAC;yBAKc,CAAA;2BACd,CAAA;4BACL,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAvBf,CAAC;AACH,MAAM,WAAW,eAAgB,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,eAAe,CAAC;CAAG;AAEtF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;+BAQL,CAAC;;wBACG,CAAC;0BAIT,CAAC;yBAKc,CAAA;2BACd,CAAA;4BACL,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAjBf,CAAC;AACH,MAAM,WAAW,gBAAiB,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,gBAAgB,CAAC;CAAG;AAExF,MAAM,MAAM,8BAA8B,GAAG;IAC3C,KAAK,EAAE,eAAe,CAAC;IACvB,QAAQ,EAAE,kBAAkB,CAAC,eAAe,EAAE,gBAAgB,CAAC,CAAC;IAChE,QAAQ,EAAE,gBAAgB,CAAC;IAE3B,OAAO,CAAC,EAAE;QACR;;WAEG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;QAEjB;;;;WAIG;QACH,aAAa,CAAC,EAAE,OAAO,CAAC;KACzB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,kBAAkB,CAAC,eAAe,EAAE,gBAAgB,CAAC,CAAC;AAEvF;;GAEG;AAEH,eAAO,MAAM,wBAAwB,GAAU,QAAQ,8BAA8B,KAAG,OAAO,CAAC,gBAAgB,CAkB/G,CAAC"}
@@ -1,4 +1,4 @@
1
- import { Schema } from 'effect';
1
+ import * as Schema from 'effect/Schema';
2
2
  import { type EchoDatabase } from '@dxos/echo-db';
3
3
  export declare const ReferencedQuotes: Schema.Struct<{
4
4
  references: Schema.mutable<Schema.Array$<Schema.Struct<{
@@ -1 +1 @@
1
- {"version":3,"file":"quotes.d.ts","sourceRoot":"","sources":["../../../../src/extraction/quotes.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAKlD,eAAO,MAAM,gBAAgB;;;;;EAe3B,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE3E,eAAO,MAAM,UAAU,GAAU,QAAQ,MAAM,EAAE,EAAE,IAAI,YAAY,KAAG,OAAO,CAAC,gBAAgB,CAS7F,CAAC;AAEF;;GAEG;AAEH,eAAO,MAAM,gBAAgB,GAAI,MAAM,MAAM,EAAE,QAAQ,gBAAgB,WAYtE,CAAC"}
1
+ {"version":3,"file":"quotes.d.ts","sourceRoot":"","sources":["../../../../src/extraction/quotes.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAIxC,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAIlD,eAAO,MAAM,gBAAgB;;;;;EAe3B,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE3E,eAAO,MAAM,UAAU,GAAU,QAAQ,MAAM,EAAE,EAAE,IAAI,YAAY,KAAG,OAAO,CAAC,gBAAgB,CAS7F,CAAC;AAEF;;GAEG;AAEH,eAAO,MAAM,gBAAgB,GAAI,MAAM,MAAM,EAAE,QAAQ,gBAAgB,WAYtE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './services';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/functions/index.ts"],"names":[],"mappings":"AAIA,cAAc,YAAY,CAAC"}
@@ -0,0 +1,20 @@
1
+ import * as Tool from '@effect/ai/Tool';
2
+ import type * as Toolkit from '@effect/ai/Toolkit';
3
+ import * as Layer from 'effect/Layer';
4
+ import { ToolExecutionService, ToolResolverService } from '@dxos/ai';
5
+ import { DatabaseService } from '@dxos/echo-db';
6
+ import { FunctionDefinition, FunctionInvocationService } from '@dxos/functions';
7
+ /**
8
+ * Constructs a `ToolResolverService` whose `resolve(id)` looks up tools in the following order:
9
+ * 1. Toolkit: return an existing tool from the provided `toolkit` if one is present under `id`.
10
+ * 2. Functions in DB: query `FunctionType` by `key=id`; if found, deserialize and project to a tool
11
+ * (propagating any `deployedFunctionId` discovered in the object's metadata).
12
+ * 3. Functions passed in: fall back to a matching `FunctionDefinition` from the `functions` array.
13
+ *
14
+ * If none of the above yield a match, the effect fails with `AiToolNotFoundError`.
15
+ *
16
+ * Requires `DatabaseService` in the environment.
17
+ */
18
+ export declare const makeToolResolverFromFunctions: (functions: FunctionDefinition.Any[], toolkit: Toolkit.Toolkit<any>) => Layer.Layer<ToolResolverService, never, DatabaseService>;
19
+ export declare const makeToolExecutionServiceFromFunctions: (toolkit: Toolkit.Toolkit<any>, handlersLayer: Layer.Layer<Tool.Handler<any>, never, never>) => Layer.Layer<ToolExecutionService, never, FunctionInvocationService>;
20
+ //# sourceMappingURL=services.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../../../src/functions/services.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAGnD,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAItC,OAAO,EAAuB,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAG1F,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAY,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAG1F;;;;;;;;;;GAUG;AACH,eAAO,MAAM,6BAA6B,GACxC,WAAW,kBAAkB,CAAC,GAAG,EAAE,EACnC,SAAS,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,KAC5B,KAAK,CAAC,KAAK,CAAC,mBAAmB,EAAE,KAAK,EAAE,eAAe,CA8BzD,CAAC;AAEF,eAAO,MAAM,qCAAqC,GAChD,SAAS,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,EAC7B,eAAe,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAC1D,KAAK,CAAC,KAAK,CAAC,oBAAoB,EAAE,KAAK,EAAE,yBAAyB,CAoCpE,CAAC"}
@@ -1,9 +1,9 @@
1
- export * from './blueprint';
2
- export * from './context';
3
1
  export * from './conversation';
4
- export * from './extraction';
5
- export * from './research';
2
+ export * from './diff';
3
+ export * from './errors';
4
+ export * from './execution-graph';
5
+ export * from './functions';
6
6
  export * from './session';
7
+ export * from './templates';
7
8
  export * from './types';
8
- export * from './conversation';
9
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}