@dxos/assistant 0.8.4-main.67995b8 → 0.8.4-main.a4bbb77

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 (166) hide show
  1. package/dist/lib/browser/chunk-ILL2CN3G.mjs +374 -0
  2. package/dist/lib/browser/chunk-ILL2CN3G.mjs.map +7 -0
  3. package/dist/lib/browser/{chunk-6WRGDEMH.mjs → chunk-UB26N5UF.mjs} +2 -2
  4. package/dist/lib/browser/chunk-UB26N5UF.mjs.map +7 -0
  5. package/dist/lib/browser/extraction/index.mjs +32 -29
  6. package/dist/lib/browser/extraction/index.mjs.map +4 -4
  7. package/dist/lib/browser/index.mjs +682 -1035
  8. package/dist/lib/browser/index.mjs.map +4 -4
  9. package/dist/lib/browser/meta.json +1 -1
  10. package/dist/lib/browser/{named-entity-recognition-O46UTCLR.mjs → named-entity-recognition-QPYHML66.mjs} +2 -2
  11. package/dist/lib/node-esm/{chunk-3UU5V4FS.mjs → chunk-BCFXTNSK.mjs} +2 -2
  12. package/dist/lib/node-esm/chunk-BCFXTNSK.mjs.map +7 -0
  13. package/dist/lib/node-esm/chunk-GVKA7VL3.mjs +376 -0
  14. package/dist/lib/node-esm/chunk-GVKA7VL3.mjs.map +7 -0
  15. package/dist/lib/node-esm/extraction/index.mjs +32 -29
  16. package/dist/lib/node-esm/extraction/index.mjs.map +4 -4
  17. package/dist/lib/node-esm/index.mjs +682 -1035
  18. package/dist/lib/node-esm/index.mjs.map +4 -4
  19. package/dist/lib/node-esm/meta.json +1 -1
  20. package/dist/lib/node-esm/{named-entity-recognition-W4VMRCH6.mjs → named-entity-recognition-2HDF46YX.mjs} +2 -2
  21. package/dist/types/src/{context/binding.d.ts → conversation/context.d.ts} +45 -3
  22. package/dist/types/src/conversation/context.d.ts.map +1 -0
  23. package/dist/types/src/conversation/conversation.d.ts +24 -21
  24. package/dist/types/src/conversation/conversation.d.ts.map +1 -1
  25. package/dist/types/src/conversation/index.d.ts +1 -0
  26. package/dist/types/src/conversation/index.d.ts.map +1 -1
  27. package/dist/types/src/diff.d.ts +15 -0
  28. package/dist/types/src/diff.d.ts.map +1 -0
  29. package/dist/types/src/diff.test.d.ts +2 -0
  30. package/dist/types/src/diff.test.d.ts.map +1 -0
  31. package/dist/types/src/errors.d.ts +46 -9
  32. package/dist/types/src/errors.d.ts.map +1 -1
  33. package/dist/types/src/execution-graph.d.ts +82 -0
  34. package/dist/types/src/execution-graph.d.ts.map +1 -0
  35. package/dist/types/src/execution-graph.test.d.ts +2 -0
  36. package/dist/types/src/execution-graph.test.d.ts.map +1 -0
  37. package/dist/types/src/extraction/extraction-llm-function/extraction-llm-function.d.ts +1 -1
  38. package/dist/types/src/extraction/extraction-llm-function/extraction-llm-function.d.ts.map +1 -1
  39. package/dist/types/src/extraction/extraction-ner-function/extraction-ner-function.d.ts +94 -55
  40. package/dist/types/src/extraction/extraction-ner-function/extraction-ner-function.d.ts.map +1 -1
  41. package/dist/types/src/extraction/extraction-ner-function/named-entity-recognition.d.ts.map +1 -1
  42. package/dist/types/src/extraction/extraction.d.ts +250 -216
  43. package/dist/types/src/extraction/extraction.d.ts.map +1 -1
  44. package/dist/types/src/functions/services.d.ts +15 -3
  45. package/dist/types/src/functions/services.d.ts.map +1 -1
  46. package/dist/types/src/index.d.ts +3 -2
  47. package/dist/types/src/index.d.ts.map +1 -1
  48. package/dist/types/src/session/artifact-diff.d.ts +27 -0
  49. package/dist/types/src/session/artifact-diff.d.ts.map +1 -0
  50. package/dist/types/src/session/error-handling.d.ts +4 -0
  51. package/dist/types/src/session/error-handling.d.ts.map +1 -0
  52. package/dist/types/src/session/format.d.ts +184 -0
  53. package/dist/types/src/session/format.d.ts.map +1 -0
  54. package/dist/types/src/session/format.test.d.ts +2 -0
  55. package/dist/types/src/session/format.test.d.ts.map +1 -0
  56. package/dist/types/src/session/index.d.ts +3 -0
  57. package/dist/types/src/session/index.d.ts.map +1 -1
  58. package/dist/types/src/session/observer.d.ts +22 -0
  59. package/dist/types/src/session/observer.d.ts.map +1 -0
  60. package/dist/types/src/session/session.d.ts +23 -236
  61. package/dist/types/src/session/session.d.ts.map +1 -1
  62. package/dist/types/src/session/toolkit.d.ts +14 -0
  63. package/dist/types/src/session/toolkit.d.ts.map +1 -0
  64. package/dist/types/src/session/version-pin.d.ts +2 -2
  65. package/dist/types/src/session/version-pin.d.ts.map +1 -1
  66. package/dist/types/src/templates/index.d.ts +1 -1
  67. package/dist/types/src/templates/system.d.ts +18 -0
  68. package/dist/types/src/templates/system.d.ts.map +1 -0
  69. package/dist/types/src/types.d.ts +3 -0
  70. package/dist/types/src/types.d.ts.map +1 -1
  71. package/dist/types/tsconfig.tsbuildinfo +1 -1
  72. package/package.json +34 -33
  73. package/src/conversation/context.ts +154 -0
  74. package/src/conversation/conversation.ts +76 -53
  75. package/src/conversation/index.ts +1 -0
  76. package/src/diff.test.ts +43 -0
  77. package/src/diff.ts +79 -0
  78. package/src/errors.ts +6 -1
  79. package/src/execution-graph.test.ts +738 -0
  80. package/src/execution-graph.ts +500 -0
  81. package/src/extraction/extraction-llm-function/extraction-llm-function.test.ts +8 -7
  82. package/src/extraction/extraction-llm-function/extraction-llm-function.ts +12 -10
  83. package/src/extraction/extraction-ner-function/extraction-ner-function.test.ts +9 -9
  84. package/src/extraction/extraction-ner-function/extraction-ner-function.ts +13 -6
  85. package/src/extraction/extraction-ner-function/named-entity-recognition.test.ts +2 -1
  86. package/src/extraction/extraction-ner-function/named-entity-recognition.ts +2 -0
  87. package/src/extraction/quotes.test.ts +3 -3
  88. package/src/extraction/quotes.ts +2 -2
  89. package/src/functions/services.ts +97 -43
  90. package/src/index.ts +3 -2
  91. package/src/session/artifact-diff.ts +41 -0
  92. package/src/session/error-handling.ts +40 -0
  93. package/src/session/format.test.ts +60 -0
  94. package/src/session/format.ts +139 -0
  95. package/src/session/index.ts +3 -0
  96. package/src/session/observer.ts +58 -0
  97. package/src/session/session.conversations.json +1 -0
  98. package/src/session/session.test.ts +33 -197
  99. package/src/session/session.ts +119 -249
  100. package/src/session/toolkit.ts +46 -0
  101. package/src/session/version-pin.ts +4 -4
  102. package/src/summarization/summarization.test.ts +9 -7
  103. package/src/templates/format.tpl +60 -0
  104. package/src/templates/index.ts +1 -1
  105. package/src/templates/system.tpl +48 -0
  106. package/src/templates/system.ts +41 -0
  107. package/src/types.ts +10 -5
  108. package/src/typings.d.ts +5 -0
  109. package/dist/lib/browser/chunk-6WRGDEMH.mjs.map +0 -7
  110. package/dist/lib/browser/chunk-SIXTNSGV.mjs +0 -250
  111. package/dist/lib/browser/chunk-SIXTNSGV.mjs.map +0 -7
  112. package/dist/lib/node-esm/chunk-3UU5V4FS.mjs.map +0 -7
  113. package/dist/lib/node-esm/chunk-FD5NXKDP.mjs +0 -252
  114. package/dist/lib/node-esm/chunk-FD5NXKDP.mjs.map +0 -7
  115. package/dist/types/bin/chat.d.ts +0 -2
  116. package/dist/types/bin/chat.d.ts.map +0 -1
  117. package/dist/types/src/context/binder.d.ts +0 -34
  118. package/dist/types/src/context/binder.d.ts.map +0 -1
  119. package/dist/types/src/context/binding.d.ts.map +0 -1
  120. package/dist/types/src/context/index.d.ts +0 -3
  121. package/dist/types/src/context/index.d.ts.map +0 -1
  122. package/dist/types/src/research/exa.d.ts +0 -12
  123. package/dist/types/src/research/exa.d.ts.map +0 -1
  124. package/dist/types/src/research/graph.d.ts +0 -51
  125. package/dist/types/src/research/graph.d.ts.map +0 -1
  126. package/dist/types/src/research/graph.test.d.ts +0 -2
  127. package/dist/types/src/research/graph.test.d.ts.map +0 -1
  128. package/dist/types/src/research/index.d.ts +0 -4
  129. package/dist/types/src/research/index.d.ts.map +0 -1
  130. package/dist/types/src/research/research.d.ts +0 -10
  131. package/dist/types/src/research/research.d.ts.map +0 -1
  132. package/dist/types/src/research/research.test.d.ts +0 -2
  133. package/dist/types/src/research/research.test.d.ts.map +0 -1
  134. package/dist/types/src/session/version-pin.test.d.ts +0 -2
  135. package/dist/types/src/session/version-pin.test.d.ts.map +0 -1
  136. package/dist/types/src/templates/prompt.d.ts +0 -30
  137. package/dist/types/src/templates/prompt.d.ts.map +0 -1
  138. package/dist/types/src/testing/exa-search-1748337321991.d.ts +0 -38
  139. package/dist/types/src/testing/exa-search-1748337321991.d.ts.map +0 -1
  140. package/dist/types/src/testing/exa-search-1748337331526.d.ts +0 -37
  141. package/dist/types/src/testing/exa-search-1748337331526.d.ts.map +0 -1
  142. package/dist/types/src/testing/exa-search-1748337344119.d.ts +0 -58
  143. package/dist/types/src/testing/exa-search-1748337344119.d.ts.map +0 -1
  144. package/dist/types/src/testing/index.d.ts +0 -3
  145. package/dist/types/src/testing/index.d.ts.map +0 -1
  146. package/src/context/binder.ts +0 -103
  147. package/src/context/binding.ts +0 -32
  148. package/src/context/index.ts +0 -6
  149. package/src/research/exa.ts +0 -97
  150. package/src/research/graph.test.ts +0 -64
  151. package/src/research/graph.ts +0 -369
  152. package/src/research/index.ts +0 -7
  153. package/src/research/instructions-research.tpl +0 -98
  154. package/src/research/research.test.ts +0 -190
  155. package/src/research/research.ts +0 -87
  156. package/src/session/__snapshots__/session.test.ts.snap +0 -32
  157. package/src/session/version-pin.test.ts +0 -7
  158. package/src/templates/assistant.tpl +0 -111
  159. package/src/templates/prompt.ts +0 -45
  160. package/src/testing/exa-search-1748337321991.ts +0 -131
  161. package/src/testing/exa-search-1748337331526.ts +0 -144
  162. package/src/testing/exa-search-1748337344119.ts +0 -133
  163. package/src/testing/index.ts +0 -11
  164. package/src/typedefs.d.ts +0 -8
  165. /package/dist/lib/browser/{named-entity-recognition-O46UTCLR.mjs.map → named-entity-recognition-QPYHML66.mjs.map} +0 -0
  166. /package/dist/lib/node-esm/{named-entity-recognition-W4VMRCH6.mjs.map → named-entity-recognition-2HDF46YX.mjs.map} +0 -0
@@ -4,135 +4,152 @@ import { type FunctionDefinition, type FunctionExecutor } from '@dxos/functions'
4
4
  export declare const ExtractionInput: Schema.Struct<{
5
5
  message: import("@dxos/echo/Type").obj<Schema.Struct<{
6
6
  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> & {
7
+ parentMessage: Schema.optional<import("@dxos/keys").ObjectIdClass>;
8
+ created: Schema.SchemaClass<string, string, never>;
9
+ sender: Schema.mutable<Schema.Struct<{
10
+ contact: Schema.optional<import("@dxos/echo/Type").ref<import("@dxos/echo/Type").obj<Schema.Struct<{
11
+ fullName: Schema.optional<Schema.SchemaClass<string, string, never>>;
12
+ preferredName: Schema.optional<Schema.SchemaClass<string, string, never>>;
13
+ nickname: Schema.optional<Schema.SchemaClass<string, string, never>>;
14
+ image: Schema.optional<Schema.SchemaClass<string, string, never>>;
15
+ organization: Schema.optional<Schema.Schema<import("@dxos/echo-schema").Ref<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
15
16
  id: string;
16
- name?: string | undefined;
17
17
  description?: string | undefined;
18
+ name?: string | undefined;
18
19
  status?: "prospect" | "qualified" | "active" | "commit" | "reject" | undefined;
19
20
  image?: string | undefined;
20
21
  website?: string | undefined;
21
22
  }>, 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>;
23
+ jobTitle: Schema.optional<Schema.SchemaClass<string, string, never>>;
24
+ department: Schema.optional<Schema.SchemaClass<string, string, never>>;
25
+ notes: Schema.optional<Schema.SchemaClass<string, string, never>>;
26
+ emails: Schema.optional<Schema.mutable<Schema.Array$<Schema.Struct<{
27
+ label: Schema.optional<typeof Schema.String>;
28
+ value: Schema.refine<string, typeof Schema.String>;
28
29
  }>>>>;
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;
30
+ identities: Schema.optional<Schema.mutable<Schema.Array$<Schema.Struct<{
31
+ label: Schema.optional<typeof Schema.String>;
32
+ value: typeof Schema.String;
32
33
  }>>>>;
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;
34
+ phoneNumbers: Schema.optional<Schema.mutable<Schema.Array$<Schema.Struct<{
35
+ label: Schema.optional<typeof Schema.String>;
36
+ value: typeof Schema.String;
36
37
  }>>>>;
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>>;
38
+ addresses: Schema.optional<Schema.mutable<Schema.Array$<Schema.Struct<{
39
+ label: Schema.optional<typeof Schema.String>;
40
+ value: Schema.Struct<{
41
+ street: Schema.optional<Schema.SchemaClass<string, string, never>>;
42
+ extended: Schema.optional<Schema.SchemaClass<string, string, never>>;
43
+ locality: Schema.optional<Schema.SchemaClass<string, string, never>>;
44
+ region: Schema.optional<Schema.SchemaClass<string, string, never>>;
45
+ postalCode: Schema.optional<Schema.SchemaClass<string, string, never>>;
46
+ postOfficeBoxNumber: Schema.optional<Schema.SchemaClass<string, string, never>>;
47
+ country: Schema.optional<Schema.SchemaClass<string, string, never>>;
47
48
  }>;
48
49
  }>>>>;
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>;
50
+ urls: Schema.optional<Schema.mutable<Schema.Array$<Schema.Struct<{
51
+ label: Schema.optional<typeof Schema.String>;
52
+ value: Schema.refine<string, typeof Schema.String>;
52
53
  }>>>>;
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;
54
+ birthday: Schema.optional<Schema.SchemaClass<string, string, never>>;
55
+ fields: Schema.optional<Schema.mutable<Schema.Array$<Schema.Struct<{
56
+ category: Schema.optional<typeof Schema.String>;
57
+ label: typeof Schema.String;
58
+ value: typeof Schema.String;
58
59
  }>>>>;
59
60
  }>>>>;
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"]>>;
61
+ identityDid: Schema.optional<typeof Schema.String>;
62
+ identityKey: Schema.optional<typeof Schema.String>;
63
+ email: Schema.optional<typeof Schema.String>;
64
+ name: Schema.optional<typeof Schema.String>;
65
+ role: Schema.optional<Schema.Literal<["user", "assistant", "tool"]>>;
65
66
  }>>;
66
- blocks: import("effect/Schema").mutable<import("effect/Schema").Array$<import("effect/Schema").Union<[import("effect/Schema").mutable<import("effect/Schema").TaggedStruct<"anchor", {
67
- pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
67
+ blocks: Schema.mutable<Schema.Array$<Schema.Union<[Schema.mutable<Schema.TaggedStruct<"anchor", {
68
+ pending: Schema.optional<typeof Schema.Boolean>;
68
69
  objectId: import("@dxos/keys").ObjectIdClass;
69
- version: typeof import("effect/Schema").Unknown;
70
- }>>, import("effect/Schema").mutable<import("effect/Schema").TaggedStruct<"file", {
71
- pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
72
- url: typeof import("effect/Schema").String;
73
- name: import("effect/Schema").optional<typeof import("effect/Schema").String>;
74
- mediaType: import("effect/Schema").optional<typeof import("effect/Schema").String>;
75
- }>>, import("effect/Schema").mutable<import("effect/Schema").TaggedStruct<"image", {
76
- pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
77
- id: import("effect/Schema").optional<typeof import("effect/Schema").String>;
78
- source: import("effect/Schema").optional<import("effect/Schema").Union<[import("effect/Schema").mutable<import("effect/Schema").Struct<{
79
- type: import("effect/Schema").Literal<["base64"]>;
80
- mediaType: typeof import("effect/Schema").String;
81
- data: typeof import("effect/Schema").String;
82
- }>>, import("effect/Schema").mutable<import("effect/Schema").Struct<{
83
- type: import("effect/Schema").Literal<["http"]>;
84
- url: typeof import("effect/Schema").String;
70
+ version: typeof Schema.Unknown;
71
+ }>>, Schema.mutable<Schema.TaggedStruct<"file", {
72
+ pending: Schema.optional<typeof Schema.Boolean>;
73
+ url: typeof Schema.String;
74
+ name: Schema.optional<typeof Schema.String>;
75
+ mediaType: Schema.optional<typeof Schema.String>;
76
+ }>>, Schema.mutable<Schema.TaggedStruct<"image", {
77
+ pending: Schema.optional<typeof Schema.Boolean>;
78
+ id: Schema.optional<typeof Schema.String>;
79
+ source: Schema.optional<Schema.Union<[Schema.mutable<Schema.Struct<{
80
+ type: Schema.Literal<["base64"]>;
81
+ mediaType: typeof Schema.String;
82
+ data: typeof Schema.String;
83
+ }>>, Schema.mutable<Schema.Struct<{
84
+ type: Schema.Literal<["http"]>;
85
+ url: typeof Schema.String;
85
86
  }>>]>>;
86
- }>>, import("effect/Schema").mutable<import("effect/Schema").TaggedStruct<"json", {
87
- pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
88
- disposition: import("effect/Schema").optional<typeof import("effect/Schema").String>;
89
- data: typeof import("effect/Schema").String;
90
- }>>, import("effect/Schema").mutable<import("effect/Schema").TaggedStruct<"proposal", {
91
- pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
92
- text: typeof import("effect/Schema").String;
93
- }>>, import("effect/Schema").mutable<import("effect/Schema").TaggedStruct<"reasoning", {
94
- pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
95
- reasoningText: import("effect/Schema").optional<typeof import("effect/Schema").String>;
96
- redactedText: import("effect/Schema").optional<typeof import("effect/Schema").String>;
97
- signature: import("effect/Schema").optional<typeof import("effect/Schema").String>;
98
- }>>, import("effect/Schema").mutable<import("effect/Schema").TaggedStruct<"reference", {
99
- pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
100
- reference: import("@dxos/echo/Type").ref<import("effect/Schema").Schema<import("@dxos/echo/Type").Expando, {
87
+ }>>, Schema.mutable<Schema.TaggedStruct<"json", {
88
+ pending: Schema.optional<typeof Schema.Boolean>;
89
+ disposition: Schema.optional<typeof Schema.String>;
90
+ data: typeof Schema.String;
91
+ }>>, Schema.mutable<Schema.TaggedStruct<"proposal", {
92
+ pending: Schema.optional<typeof Schema.Boolean>;
93
+ text: typeof Schema.String;
94
+ }>>, Schema.mutable<Schema.TaggedStruct<"reasoning", {
95
+ pending: Schema.optional<typeof Schema.Boolean>;
96
+ reasoningText: Schema.optional<typeof Schema.String>;
97
+ redactedText: Schema.optional<typeof Schema.String>;
98
+ signature: Schema.optional<typeof Schema.String>;
99
+ }>>, Schema.mutable<Schema.TaggedStruct<"reference", {
100
+ pending: Schema.optional<typeof Schema.Boolean>;
101
+ reference: import("@dxos/echo/Type").ref<Schema.Schema<import("@dxos/echo/Type").Expando, {
101
102
  [x: string]: any;
102
103
  id: string;
103
104
  }, never>>;
104
- }>>, import("effect/Schema").mutable<import("effect/Schema").TaggedStruct<"select", {
105
- pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
106
- options: import("effect/Schema").Array$<typeof import("effect/Schema").String>;
107
- }>>, import("effect/Schema").mutable<import("effect/Schema").TaggedStruct<"status", {
108
- pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
109
- statusText: typeof import("effect/Schema").String;
110
- }>>, import("effect/Schema").mutable<import("effect/Schema").TaggedStruct<"suggest", {
111
- pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
112
- text: typeof import("effect/Schema").String;
113
- }>>, import("effect/Schema").mutable<import("effect/Schema").TaggedStruct<"text", {
114
- pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
115
- mimeType: import("effect/Schema").optional<typeof import("effect/Schema").String>;
116
- text: typeof import("effect/Schema").String;
117
- disposition: import("effect/Schema").optional<typeof import("effect/Schema").String>;
118
- }>>, import("effect/Schema").mutable<import("effect/Schema").TaggedStruct<"toolCall", {
119
- pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
120
- toolCallId: typeof import("effect/Schema").String;
121
- name: typeof import("effect/Schema").String;
122
- input: typeof import("effect/Schema").Unknown;
123
- }>>, import("effect/Schema").mutable<import("effect/Schema").TaggedStruct<"toolList", {
124
- pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
125
- }>>, import("effect/Schema").mutable<import("effect/Schema").TaggedStruct<"toolResult", {
126
- pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
127
- toolCallId: typeof import("effect/Schema").String;
128
- name: typeof import("effect/Schema").String;
129
- result: typeof import("effect/Schema").Unknown;
130
- }>>, import("effect/Schema").mutable<import("effect/Schema").TaggedStruct<"transcript", {
131
- pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
132
- started: typeof import("effect/Schema").String;
133
- text: typeof import("effect/Schema").String;
105
+ }>>, Schema.mutable<Schema.TaggedStruct<"select", {
106
+ pending: Schema.optional<typeof Schema.Boolean>;
107
+ options: Schema.Array$<typeof Schema.String>;
108
+ }>>, Schema.mutable<Schema.TaggedStruct<"status", {
109
+ pending: Schema.optional<typeof Schema.Boolean>;
110
+ statusText: typeof Schema.String;
111
+ }>>, Schema.mutable<Schema.TaggedStruct<"suggestion", {
112
+ pending: Schema.optional<typeof Schema.Boolean>;
113
+ text: typeof Schema.String;
114
+ }>>, Schema.mutable<Schema.TaggedStruct<"summary", {
115
+ pending: Schema.optional<typeof Schema.Boolean>;
116
+ mimeType: Schema.optional<typeof Schema.String>;
117
+ message: Schema.optional<typeof Schema.String>;
118
+ model: Schema.optional<typeof Schema.String>;
119
+ usage: Schema.optional<Schema.Struct<{
120
+ inputTokens: Schema.optional<typeof Schema.Number>;
121
+ outputTokens: Schema.optional<typeof Schema.Number>;
122
+ totalTokens: Schema.optional<typeof Schema.Number>;
123
+ }>>;
124
+ toolCalls: Schema.optional<typeof Schema.Number>;
125
+ errors: Schema.optional<typeof Schema.Number>;
126
+ duration: Schema.optional<typeof Schema.Number>;
127
+ }>>, Schema.mutable<Schema.TaggedStruct<"text", {
128
+ pending: Schema.optional<typeof Schema.Boolean>;
129
+ mimeType: Schema.optional<typeof Schema.String>;
130
+ text: typeof Schema.String;
131
+ disposition: Schema.optional<typeof Schema.String>;
132
+ }>>, Schema.mutable<Schema.TaggedStruct<"toolkit", {
133
+ pending: Schema.optional<typeof Schema.Boolean>;
134
+ }>>, Schema.mutable<Schema.TaggedStruct<"toolCall", {
135
+ pending: Schema.optional<typeof Schema.Boolean>;
136
+ toolCallId: typeof Schema.String;
137
+ name: typeof Schema.String;
138
+ input: typeof Schema.String;
139
+ providerExecuted: typeof Schema.Boolean;
140
+ }>>, Schema.mutable<Schema.TaggedStruct<"toolResult", {
141
+ pending: Schema.optional<typeof Schema.Boolean>;
142
+ toolCallId: typeof Schema.String;
143
+ name: typeof Schema.String;
144
+ result: Schema.optional<typeof Schema.String>;
145
+ error: Schema.optional<typeof Schema.String>;
146
+ providerExecuted: typeof Schema.Boolean;
147
+ }>>, Schema.mutable<Schema.TaggedStruct<"transcript", {
148
+ pending: Schema.optional<typeof Schema.Boolean>;
149
+ started: typeof Schema.String;
150
+ text: typeof Schema.String;
134
151
  }>>]>>>;
135
- properties: import("effect/Schema").optional<import("effect/Schema").mutable<import("effect/Schema").Record$<typeof import("effect/Schema").String, typeof import("effect/Schema").Any>>>;
152
+ properties: Schema.optional<Schema.mutable<Schema.Record$<typeof Schema.String, typeof Schema.Any>>>;
136
153
  }>>;
137
154
  objects: Schema.optional<Schema.Array$<Schema.Schema<Expando, Expando, never>>>;
138
155
  options: Schema.optional<Schema.Struct<{
@@ -145,135 +162,152 @@ export interface ExtractionInput extends Schema.Schema.Type<typeof ExtractionInp
145
162
  export declare const ExtractionOutput: Schema.Struct<{
146
163
  message: import("@dxos/echo/Type").obj<Schema.Struct<{
147
164
  id: import("@dxos/keys").ObjectIdClass;
148
- created: import("effect/Schema").SchemaClass<string, string, never>;
149
- sender: import("effect/Schema").mutable<import("effect/Schema").Struct<{
150
- contact: import("effect/Schema").optional<import("@dxos/echo/Type").ref<import("@dxos/echo/Type").obj<import("effect/Schema").Struct<{
151
- fullName: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
152
- preferredName: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
153
- nickname: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
154
- image: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
155
- 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> & {
165
+ parentMessage: Schema.optional<import("@dxos/keys").ObjectIdClass>;
166
+ created: Schema.SchemaClass<string, string, never>;
167
+ sender: Schema.mutable<Schema.Struct<{
168
+ contact: Schema.optional<import("@dxos/echo/Type").ref<import("@dxos/echo/Type").obj<Schema.Struct<{
169
+ fullName: Schema.optional<Schema.SchemaClass<string, string, never>>;
170
+ preferredName: Schema.optional<Schema.SchemaClass<string, string, never>>;
171
+ nickname: Schema.optional<Schema.SchemaClass<string, string, never>>;
172
+ image: Schema.optional<Schema.SchemaClass<string, string, never>>;
173
+ organization: Schema.optional<Schema.Schema<import("@dxos/echo-schema").Ref<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
156
174
  id: string;
157
- name?: string | undefined;
158
175
  description?: string | undefined;
176
+ name?: string | undefined;
159
177
  status?: "prospect" | "qualified" | "active" | "commit" | "reject" | undefined;
160
178
  image?: string | undefined;
161
179
  website?: string | undefined;
162
180
  }>, import("@dxos/echo-protocol").EncodedReference, never>>;
163
- jobTitle: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
164
- department: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
165
- notes: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
166
- emails: import("effect/Schema").optional<import("effect/Schema").mutable<import("effect/Schema").Array$<import("effect/Schema").Struct<{
167
- label: import("effect/Schema").optional<typeof import("effect/Schema").String>;
168
- value: import("effect/Schema").refine<string, typeof import("effect/Schema").String>;
181
+ jobTitle: Schema.optional<Schema.SchemaClass<string, string, never>>;
182
+ department: Schema.optional<Schema.SchemaClass<string, string, never>>;
183
+ notes: Schema.optional<Schema.SchemaClass<string, string, never>>;
184
+ emails: Schema.optional<Schema.mutable<Schema.Array$<Schema.Struct<{
185
+ label: Schema.optional<typeof Schema.String>;
186
+ value: Schema.refine<string, typeof Schema.String>;
169
187
  }>>>>;
170
- identities: import("effect/Schema").optional<import("effect/Schema").mutable<import("effect/Schema").Array$<import("effect/Schema").Struct<{
171
- label: import("effect/Schema").optional<typeof import("effect/Schema").String>;
172
- value: typeof import("effect/Schema").String;
188
+ identities: Schema.optional<Schema.mutable<Schema.Array$<Schema.Struct<{
189
+ label: Schema.optional<typeof Schema.String>;
190
+ value: typeof Schema.String;
173
191
  }>>>>;
174
- phoneNumbers: import("effect/Schema").optional<import("effect/Schema").mutable<import("effect/Schema").Array$<import("effect/Schema").Struct<{
175
- label: import("effect/Schema").optional<typeof import("effect/Schema").String>;
176
- value: typeof import("effect/Schema").String;
192
+ phoneNumbers: Schema.optional<Schema.mutable<Schema.Array$<Schema.Struct<{
193
+ label: Schema.optional<typeof Schema.String>;
194
+ value: typeof Schema.String;
177
195
  }>>>>;
178
- addresses: import("effect/Schema").optional<import("effect/Schema").mutable<import("effect/Schema").Array$<import("effect/Schema").Struct<{
179
- label: import("effect/Schema").optional<typeof import("effect/Schema").String>;
180
- value: import("effect/Schema").Struct<{
181
- street: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
182
- extended: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
183
- locality: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
184
- region: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
185
- postalCode: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
186
- postOfficeBoxNumber: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
187
- country: import("effect/Schema").optional<import("effect/Schema").SchemaClass<string, string, never>>;
196
+ addresses: Schema.optional<Schema.mutable<Schema.Array$<Schema.Struct<{
197
+ label: Schema.optional<typeof Schema.String>;
198
+ value: Schema.Struct<{
199
+ street: Schema.optional<Schema.SchemaClass<string, string, never>>;
200
+ extended: Schema.optional<Schema.SchemaClass<string, string, never>>;
201
+ locality: Schema.optional<Schema.SchemaClass<string, string, never>>;
202
+ region: Schema.optional<Schema.SchemaClass<string, string, never>>;
203
+ postalCode: Schema.optional<Schema.SchemaClass<string, string, never>>;
204
+ postOfficeBoxNumber: Schema.optional<Schema.SchemaClass<string, string, never>>;
205
+ country: Schema.optional<Schema.SchemaClass<string, string, never>>;
188
206
  }>;
189
207
  }>>>>;
190
- urls: import("effect/Schema").optional<import("effect/Schema").mutable<import("effect/Schema").Array$<import("effect/Schema").Struct<{
191
- label: import("effect/Schema").optional<typeof import("effect/Schema").String>;
192
- value: import("effect/Schema").refine<string, typeof import("effect/Schema").String>;
208
+ urls: Schema.optional<Schema.mutable<Schema.Array$<Schema.Struct<{
209
+ label: Schema.optional<typeof Schema.String>;
210
+ value: Schema.refine<string, typeof Schema.String>;
193
211
  }>>>>;
194
- birthday: import("effect/Schema").optional<import("effect/Schema").mutable<import("effect/Schema").SchemaClass<string, string, never>>>;
195
- fields: import("effect/Schema").optional<import("effect/Schema").mutable<import("effect/Schema").Array$<import("effect/Schema").Struct<{
196
- category: import("effect/Schema").optional<typeof import("effect/Schema").String>;
197
- label: typeof import("effect/Schema").String;
198
- value: typeof import("effect/Schema").String;
212
+ birthday: Schema.optional<Schema.SchemaClass<string, string, never>>;
213
+ fields: Schema.optional<Schema.mutable<Schema.Array$<Schema.Struct<{
214
+ category: Schema.optional<typeof Schema.String>;
215
+ label: typeof Schema.String;
216
+ value: typeof Schema.String;
199
217
  }>>>>;
200
218
  }>>>>;
201
- identityDid: import("effect/Schema").optional<typeof import("effect/Schema").String>;
202
- identityKey: import("effect/Schema").optional<typeof import("effect/Schema").String>;
203
- email: import("effect/Schema").optional<typeof import("effect/Schema").String>;
204
- name: import("effect/Schema").optional<typeof import("effect/Schema").String>;
205
- role: import("effect/Schema").optional<import("effect/Schema").Literal<["user", "assistant"]>>;
219
+ identityDid: Schema.optional<typeof Schema.String>;
220
+ identityKey: Schema.optional<typeof Schema.String>;
221
+ email: Schema.optional<typeof Schema.String>;
222
+ name: Schema.optional<typeof Schema.String>;
223
+ role: Schema.optional<Schema.Literal<["user", "assistant", "tool"]>>;
206
224
  }>>;
207
- blocks: import("effect/Schema").mutable<import("effect/Schema").Array$<import("effect/Schema").Union<[import("effect/Schema").mutable<import("effect/Schema").TaggedStruct<"anchor", {
208
- pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
225
+ blocks: Schema.mutable<Schema.Array$<Schema.Union<[Schema.mutable<Schema.TaggedStruct<"anchor", {
226
+ pending: Schema.optional<typeof Schema.Boolean>;
209
227
  objectId: import("@dxos/keys").ObjectIdClass;
210
- version: typeof import("effect/Schema").Unknown;
211
- }>>, import("effect/Schema").mutable<import("effect/Schema").TaggedStruct<"file", {
212
- pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
213
- url: typeof import("effect/Schema").String;
214
- name: import("effect/Schema").optional<typeof import("effect/Schema").String>;
215
- mediaType: import("effect/Schema").optional<typeof import("effect/Schema").String>;
216
- }>>, import("effect/Schema").mutable<import("effect/Schema").TaggedStruct<"image", {
217
- pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
218
- id: import("effect/Schema").optional<typeof import("effect/Schema").String>;
219
- source: import("effect/Schema").optional<import("effect/Schema").Union<[import("effect/Schema").mutable<import("effect/Schema").Struct<{
220
- type: import("effect/Schema").Literal<["base64"]>;
221
- mediaType: typeof import("effect/Schema").String;
222
- data: typeof import("effect/Schema").String;
223
- }>>, import("effect/Schema").mutable<import("effect/Schema").Struct<{
224
- type: import("effect/Schema").Literal<["http"]>;
225
- url: typeof import("effect/Schema").String;
228
+ version: typeof Schema.Unknown;
229
+ }>>, Schema.mutable<Schema.TaggedStruct<"file", {
230
+ pending: Schema.optional<typeof Schema.Boolean>;
231
+ url: typeof Schema.String;
232
+ name: Schema.optional<typeof Schema.String>;
233
+ mediaType: Schema.optional<typeof Schema.String>;
234
+ }>>, Schema.mutable<Schema.TaggedStruct<"image", {
235
+ pending: Schema.optional<typeof Schema.Boolean>;
236
+ id: Schema.optional<typeof Schema.String>;
237
+ source: Schema.optional<Schema.Union<[Schema.mutable<Schema.Struct<{
238
+ type: Schema.Literal<["base64"]>;
239
+ mediaType: typeof Schema.String;
240
+ data: typeof Schema.String;
241
+ }>>, Schema.mutable<Schema.Struct<{
242
+ type: Schema.Literal<["http"]>;
243
+ url: typeof Schema.String;
226
244
  }>>]>>;
227
- }>>, import("effect/Schema").mutable<import("effect/Schema").TaggedStruct<"json", {
228
- pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
229
- disposition: import("effect/Schema").optional<typeof import("effect/Schema").String>;
230
- data: typeof import("effect/Schema").String;
231
- }>>, import("effect/Schema").mutable<import("effect/Schema").TaggedStruct<"proposal", {
232
- pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
233
- text: typeof import("effect/Schema").String;
234
- }>>, import("effect/Schema").mutable<import("effect/Schema").TaggedStruct<"reasoning", {
235
- pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
236
- reasoningText: import("effect/Schema").optional<typeof import("effect/Schema").String>;
237
- redactedText: import("effect/Schema").optional<typeof import("effect/Schema").String>;
238
- signature: import("effect/Schema").optional<typeof import("effect/Schema").String>;
239
- }>>, import("effect/Schema").mutable<import("effect/Schema").TaggedStruct<"reference", {
240
- pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
241
- reference: import("@dxos/echo/Type").ref<import("effect/Schema").Schema<import("@dxos/echo/Type").Expando, {
245
+ }>>, Schema.mutable<Schema.TaggedStruct<"json", {
246
+ pending: Schema.optional<typeof Schema.Boolean>;
247
+ disposition: Schema.optional<typeof Schema.String>;
248
+ data: typeof Schema.String;
249
+ }>>, Schema.mutable<Schema.TaggedStruct<"proposal", {
250
+ pending: Schema.optional<typeof Schema.Boolean>;
251
+ text: typeof Schema.String;
252
+ }>>, Schema.mutable<Schema.TaggedStruct<"reasoning", {
253
+ pending: Schema.optional<typeof Schema.Boolean>;
254
+ reasoningText: Schema.optional<typeof Schema.String>;
255
+ redactedText: Schema.optional<typeof Schema.String>;
256
+ signature: Schema.optional<typeof Schema.String>;
257
+ }>>, Schema.mutable<Schema.TaggedStruct<"reference", {
258
+ pending: Schema.optional<typeof Schema.Boolean>;
259
+ reference: import("@dxos/echo/Type").ref<Schema.Schema<import("@dxos/echo/Type").Expando, {
242
260
  [x: string]: any;
243
261
  id: string;
244
262
  }, never>>;
245
- }>>, import("effect/Schema").mutable<import("effect/Schema").TaggedStruct<"select", {
246
- pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
247
- options: import("effect/Schema").Array$<typeof import("effect/Schema").String>;
248
- }>>, import("effect/Schema").mutable<import("effect/Schema").TaggedStruct<"status", {
249
- pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
250
- statusText: typeof import("effect/Schema").String;
251
- }>>, import("effect/Schema").mutable<import("effect/Schema").TaggedStruct<"suggest", {
252
- pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
253
- text: typeof import("effect/Schema").String;
254
- }>>, import("effect/Schema").mutable<import("effect/Schema").TaggedStruct<"text", {
255
- pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
256
- mimeType: import("effect/Schema").optional<typeof import("effect/Schema").String>;
257
- text: typeof import("effect/Schema").String;
258
- disposition: import("effect/Schema").optional<typeof import("effect/Schema").String>;
259
- }>>, import("effect/Schema").mutable<import("effect/Schema").TaggedStruct<"toolCall", {
260
- pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
261
- toolCallId: typeof import("effect/Schema").String;
262
- name: typeof import("effect/Schema").String;
263
- input: typeof import("effect/Schema").Unknown;
264
- }>>, import("effect/Schema").mutable<import("effect/Schema").TaggedStruct<"toolList", {
265
- pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
266
- }>>, import("effect/Schema").mutable<import("effect/Schema").TaggedStruct<"toolResult", {
267
- pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
268
- toolCallId: typeof import("effect/Schema").String;
269
- name: typeof import("effect/Schema").String;
270
- result: typeof import("effect/Schema").Unknown;
271
- }>>, import("effect/Schema").mutable<import("effect/Schema").TaggedStruct<"transcript", {
272
- pending: import("effect/Schema").optional<typeof import("effect/Schema").Boolean>;
273
- started: typeof import("effect/Schema").String;
274
- text: typeof import("effect/Schema").String;
263
+ }>>, Schema.mutable<Schema.TaggedStruct<"select", {
264
+ pending: Schema.optional<typeof Schema.Boolean>;
265
+ options: Schema.Array$<typeof Schema.String>;
266
+ }>>, Schema.mutable<Schema.TaggedStruct<"status", {
267
+ pending: Schema.optional<typeof Schema.Boolean>;
268
+ statusText: typeof Schema.String;
269
+ }>>, Schema.mutable<Schema.TaggedStruct<"suggestion", {
270
+ pending: Schema.optional<typeof Schema.Boolean>;
271
+ text: typeof Schema.String;
272
+ }>>, Schema.mutable<Schema.TaggedStruct<"summary", {
273
+ pending: Schema.optional<typeof Schema.Boolean>;
274
+ mimeType: Schema.optional<typeof Schema.String>;
275
+ message: Schema.optional<typeof Schema.String>;
276
+ model: Schema.optional<typeof Schema.String>;
277
+ usage: Schema.optional<Schema.Struct<{
278
+ inputTokens: Schema.optional<typeof Schema.Number>;
279
+ outputTokens: Schema.optional<typeof Schema.Number>;
280
+ totalTokens: Schema.optional<typeof Schema.Number>;
281
+ }>>;
282
+ toolCalls: Schema.optional<typeof Schema.Number>;
283
+ errors: Schema.optional<typeof Schema.Number>;
284
+ duration: Schema.optional<typeof Schema.Number>;
285
+ }>>, Schema.mutable<Schema.TaggedStruct<"text", {
286
+ pending: Schema.optional<typeof Schema.Boolean>;
287
+ mimeType: Schema.optional<typeof Schema.String>;
288
+ text: typeof Schema.String;
289
+ disposition: Schema.optional<typeof Schema.String>;
290
+ }>>, Schema.mutable<Schema.TaggedStruct<"toolkit", {
291
+ pending: Schema.optional<typeof Schema.Boolean>;
292
+ }>>, Schema.mutable<Schema.TaggedStruct<"toolCall", {
293
+ pending: Schema.optional<typeof Schema.Boolean>;
294
+ toolCallId: typeof Schema.String;
295
+ name: typeof Schema.String;
296
+ input: typeof Schema.String;
297
+ providerExecuted: typeof Schema.Boolean;
298
+ }>>, Schema.mutable<Schema.TaggedStruct<"toolResult", {
299
+ pending: Schema.optional<typeof Schema.Boolean>;
300
+ toolCallId: typeof Schema.String;
301
+ name: typeof Schema.String;
302
+ result: Schema.optional<typeof Schema.String>;
303
+ error: Schema.optional<typeof Schema.String>;
304
+ providerExecuted: typeof Schema.Boolean;
305
+ }>>, Schema.mutable<Schema.TaggedStruct<"transcript", {
306
+ pending: Schema.optional<typeof Schema.Boolean>;
307
+ started: typeof Schema.String;
308
+ text: typeof Schema.String;
275
309
  }>>]>>>;
276
- properties: import("effect/Schema").optional<import("effect/Schema").mutable<import("effect/Schema").Record$<typeof import("effect/Schema").String, typeof import("effect/Schema").Any>>>;
310
+ properties: Schema.optional<Schema.mutable<Schema.Record$<typeof Schema.String, typeof Schema.Any>>>;
277
311
  }>>;
278
312
  timeElapsed: typeof Schema.Number;
279
313
  }>;
@@ -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;;;;;;;;;;;;wBA+Dk1iB,CAAC;+BAAqD,CAAC;0BAAgD,CAAC;yBAAkG,CAAC;2BAAiD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAtDzmjB,CAAC;AACH,MAAM,WAAW,eAAgB,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,eAAe,CAAC;CAAG;AAEtF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;wBAmDi1iB,CAAC;+BAAqD,CAAC;0BAAgD,CAAC;yBAAkG,CAAC;2BAAiD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAhDzmjB,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,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+D8ic,CAAC;wBAA0C,CAAC;0BAA4C,CAAC;yBAA8F,CAAC;2BAA6C,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAtD9yc,CAAC;AACH,MAAM,WAAW,eAAgB,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,eAAe,CAAC;CAAG;AAEtF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;+BAmD6ic,CAAC;wBAA0C,CAAC;0BAA4C,CAAC;yBAA8F,CAAC;2BAA6C,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAhD9yc,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,6 +1,18 @@
1
+ import { Tool, type Toolkit } from '@effect/ai';
1
2
  import { Layer } from 'effect';
2
3
  import { ToolExecutionService, ToolResolverService } from '@dxos/ai';
3
- import { LocalFunctionExecutionService, type FunctionDefinition } from '@dxos/functions';
4
- export declare const makeToolResolverFromFunctions: (functions: FunctionDefinition<any, any>[]) => Layer.Layer<ToolResolverService>;
5
- export declare const makeToolExecutionServiceFromFunctions: (functions: FunctionDefinition<any, any>[]) => Layer.Layer<ToolExecutionService, never, LocalFunctionExecutionService>;
4
+ import { DatabaseService, FunctionDefinition, FunctionInvocationService } from '@dxos/functions';
5
+ /**
6
+ * Constructs a `ToolResolverService` whose `resolve(id)` looks up tools in the following order:
7
+ * 1. Toolkit: return an existing tool from the provided `toolkit` if one is present under `id`.
8
+ * 2. Functions in DB: query `FunctionType` by `key=id`; if found, deserialize and project to a tool
9
+ * (propagating any `deployedFunctionId` discovered in the object's metadata).
10
+ * 3. Functions passed in: fall back to a matching `FunctionDefinition` from the `functions` array.
11
+ *
12
+ * If none of the above yield a match, the effect fails with `AiToolNotFoundError`.
13
+ *
14
+ * Requires `DatabaseService` in the environment.
15
+ */
16
+ export declare const makeToolResolverFromFunctions: (functions: FunctionDefinition<any, any>[], toolkit: Toolkit.Toolkit<any>) => Layer.Layer<ToolResolverService, never, DatabaseService>;
17
+ export declare const makeToolExecutionServiceFromFunctions: (toolkit: Toolkit.Toolkit<any>, handlersLayer: Layer.Layer<Tool.Handler<any>, never, never>) => Layer.Layer<ToolExecutionService, never, FunctionInvocationService>;
6
18
  //# sourceMappingURL=services.d.ts.map