@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 +1 @@
1
- {"inputs":{"src/blueprint/blueprint.ts":{"bytes":6816,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"src/blueprint/registry.ts":{"bytes":1443,"imports":[],"format":"esm"},"src/blueprint/index.ts":{"bytes":553,"imports":[{"path":"src/blueprint/blueprint.ts","kind":"import-statement","original":"./blueprint"},{"path":"src/blueprint/registry.ts","kind":"import-statement","original":"./registry"}],"format":"esm"},"src/context/binding.ts":{"bytes":2953,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"src/blueprint/index.ts","kind":"import-statement","original":"../blueprint"}],"format":"esm"},"src/context/binder.ts":{"bytes":10210,"imports":[{"path":"@preact/signals-core","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/context/binding.ts","kind":"import-statement","original":"./binding"}],"format":"esm"},"src/context/index.ts":{"bytes":539,"imports":[{"path":"src/context/binder.ts","kind":"import-statement","original":"./binder"},{"path":"src/context/binding.ts","kind":"import-statement","original":"./binding"}],"format":"esm"},"src/session/version-pin.ts":{"bytes":4209,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"src/session/session.ts":{"bytes":62326,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"src/session/version-pin.ts","kind":"import-statement","original":"./version-pin"}],"format":"esm"},"src/session/index.ts":{"bytes":556,"imports":[{"path":"src/session/session.ts","kind":"import-statement","original":"./session"},{"path":"src/session/version-pin.ts","kind":"import-statement","original":"./version-pin"}],"format":"esm"},"src/conversation/conversation.ts":{"bytes":10423,"imports":[{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/context/index.ts","kind":"import-statement","original":"../context"},{"path":"src/session/index.ts","kind":"import-statement","original":"../session"}],"format":"esm"},"src/conversation/index.ts":{"bytes":475,"imports":[{"path":"src/conversation/conversation.ts","kind":"import-statement","original":"./conversation"}],"format":"esm"},"src/extraction/extraction.ts":{"bytes":6822,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true}],"format":"esm"},"raw-loader:./instructions.tpl?raw":{"bytes":1318,"imports":[]},"src/extraction/quotes.ts":{"bytes":7110,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"src/extraction/extraction-llm-function/extraction-llm-function.ts":{"bytes":8038,"imports":[{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"raw-loader:./instructions.tpl?raw","kind":"import-statement","original":"./instructions.tpl?raw"},{"path":"src/session/index.ts","kind":"import-statement","original":"../../session"},{"path":"src/extraction/extraction.ts","kind":"import-statement","original":"../extraction"},{"path":"src/extraction/quotes.ts","kind":"import-statement","original":"../quotes"}],"format":"esm"},"src/extraction/extraction-llm-function/index.ts":{"bytes":524,"imports":[{"path":"src/extraction/extraction-llm-function/extraction-llm-function.ts","kind":"import-statement","original":"./extraction-llm-function"}],"format":"esm"},"src/extraction/extraction-ner-function/named-entity-recognition.ts":{"bytes":10059,"imports":[{"path":"@xenova/transformers","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"src/extraction/extraction-ner-function/extraction-ner-function.ts":{"bytes":8897,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"src/extraction/extraction-ner-function/named-entity-recognition.ts","kind":"import-statement","original":"./named-entity-recognition"},{"path":"src/extraction/extraction.ts","kind":"import-statement","original":"../extraction"},{"path":"src/extraction/quotes.ts","kind":"import-statement","original":"../quotes"}],"format":"esm"},"src/extraction/extraction-ner-function/index.ts":{"bytes":652,"imports":[{"path":"src/extraction/extraction-ner-function/extraction-ner-function.ts","kind":"import-statement","original":"./extraction-ner-function"},{"path":"src/extraction/extraction-ner-function/named-entity-recognition.ts","kind":"import-statement","original":"./named-entity-recognition"}],"format":"esm"},"src/extraction/index.ts":{"bytes":803,"imports":[{"path":"src/extraction/extraction.ts","kind":"import-statement","original":"./extraction"},{"path":"src/extraction/extraction-llm-function/index.ts","kind":"import-statement","original":"./extraction-llm-function"},{"path":"src/extraction/extraction-ner-function/index.ts","kind":"import-statement","original":"./extraction-ner-function"},{"path":"src/extraction/quotes.ts","kind":"import-statement","original":"./quotes"}],"format":"esm"},"src/testing/exa-search-1748337321991.ts":{"bytes":75508,"imports":[],"format":"esm"},"src/testing/exa-search-1748337331526.ts":{"bytes":90578,"imports":[],"format":"esm"},"src/testing/exa-search-1748337344119.ts":{"bytes":69950,"imports":[],"format":"esm"},"src/testing/index.ts":{"bytes":1205,"imports":[{"path":"src/testing/exa-search-1748337321991.ts","kind":"import-statement","original":"./exa-search-1748337321991"},{"path":"src/testing/exa-search-1748337331526.ts","kind":"import-statement","original":"./exa-search-1748337331526"},{"path":"src/testing/exa-search-1748337344119.ts","kind":"import-statement","original":"./exa-search-1748337344119"}],"format":"esm"},"src/research/exa.ts":{"bytes":10690,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"exa-js","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"src/testing/index.ts","kind":"import-statement","original":"../testing"}],"format":"esm"},"src/research/graph.ts":{"bytes":34590,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-protocol","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"raw-loader:./instructions-research.tpl?raw":{"bytes":5065,"imports":[]},"src/research/research.ts":{"bytes":12714,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"src/research/exa.ts","kind":"import-statement","original":"./exa"},{"path":"src/research/graph.ts","kind":"import-statement","original":"./graph"},{"path":"raw-loader:./instructions-research.tpl?raw","kind":"import-statement","original":"./instructions-research.tpl?raw"},{"path":"src/session/index.ts","kind":"import-statement","original":"../session"}],"format":"esm"},"src/research/index.ts":{"bytes":619,"imports":[{"path":"src/research/exa.ts","kind":"import-statement","original":"./exa"},{"path":"src/research/research.ts","kind":"import-statement","original":"./research"},{"path":"src/research/graph.ts","kind":"import-statement","original":"./graph"}],"format":"esm"},"src/types.ts":{"bytes":845,"imports":[],"format":"esm"},"src/index.ts":{"bytes":1088,"imports":[{"path":"src/blueprint/index.ts","kind":"import-statement","original":"./blueprint"},{"path":"src/context/index.ts","kind":"import-statement","original":"./context"},{"path":"src/conversation/index.ts","kind":"import-statement","original":"./conversation"},{"path":"src/extraction/index.ts","kind":"import-statement","original":"./extraction"},{"path":"src/research/index.ts","kind":"import-statement","original":"./research"},{"path":"src/session/index.ts","kind":"import-statement","original":"./session"},{"path":"src/types.ts","kind":"import-statement","original":"./types"},{"path":"src/conversation/index.ts","kind":"import-statement","original":"./conversation"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":208292},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@preact/signals-core","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@xenova/transformers","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"exa-js","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-protocol","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["AIServiecOverloadedError","AISession","Bindings","Blueprint","BlueprintRegistry","ContextBinder","ContextBinding","Conversation","ExtractionInput","ExtractionOutput","ReferencedQuotes","Subgraph","VersionPin","combineNerTokens","createArtifactElement","createExaTool","createExtractionSchema","createGraphWriterTool","createLocalSearchTool","createMockExaTool","createTokenGroups","extractFullEntities","extractionAnthropicFn","extractionNerFn","findQuotes","findRelatedSchema","getNer","getSanitizedSchemaName","insertReferences","processTranscriptMessage","researchFn","sanitizeObjects"],"entryPoint":"src/index.ts","inputs":{"src/blueprint/blueprint.ts":{"bytesInOutput":1892},"src/blueprint/index.ts":{"bytesInOutput":0},"src/blueprint/registry.ts":{"bytesInOutput":226},"src/index.ts":{"bytesInOutput":0},"src/context/binder.ts":{"bytesInOutput":2163},"src/context/binding.ts":{"bytesInOutput":544},"src/context/index.ts":{"bytesInOutput":0},"src/conversation/conversation.ts":{"bytesInOutput":2225},"src/session/session.ts":{"bytesInOutput":16339},"src/session/version-pin.ts":{"bytesInOutput":758},"src/session/index.ts":{"bytesInOutput":0},"src/conversation/index.ts":{"bytesInOutput":0},"src/extraction/extraction.ts":{"bytesInOutput":1403},"src/extraction/index.ts":{"bytesInOutput":0},"src/extraction/extraction-llm-function/extraction-llm-function.ts":{"bytesInOutput":1764},"raw-loader:./instructions.tpl?raw":{"bytesInOutput":1376},"src/extraction/quotes.ts":{"bytesInOutput":1687},"src/extraction/extraction-llm-function/index.ts":{"bytesInOutput":0},"src/extraction/extraction-ner-function/extraction-ner-function.ts":{"bytesInOutput":2640},"src/extraction/extraction-ner-function/named-entity-recognition.ts":{"bytesInOutput":2276},"src/extraction/extraction-ner-function/index.ts":{"bytesInOutput":0},"src/research/exa.ts":{"bytesInOutput":2537},"src/testing/exa-search-1748337321991.ts":{"bytesInOutput":31265},"src/testing/exa-search-1748337331526.ts":{"bytesInOutput":43952},"src/testing/exa-search-1748337344119.ts":{"bytesInOutput":28760},"src/testing/index.ts":{"bytesInOutput":133},"src/research/index.ts":{"bytesInOutput":0},"src/research/research.ts":{"bytesInOutput":3027},"src/research/graph.ts":{"bytesInOutput":8252},"raw-loader:./instructions-research.tpl?raw":{"bytesInOutput":5201},"src/types.ts":{"bytesInOutput":61}},"bytes":160344}}}
1
+ {"inputs":{"src/conversation/context.ts":{"bytes":20293,"imports":[{"path":"@preact/signals-core","kind":"import-statement","external":true},{"path":"effect/Array","kind":"import-statement","external":true},{"path":"effect/Context","kind":"import-statement","external":true},{"path":"effect/Function","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/blueprints","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/session/artifact-diff.ts":{"bytes":2596,"imports":[{"path":"effect/Context","kind":"import-statement","external":true}],"format":"esm"},"src/session/observer.ts":{"bytes":5405,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Function","kind":"import-statement","external":true}],"format":"esm"},"src/errors.ts":{"bytes":1420,"imports":[{"path":"@dxos/errors","kind":"import-statement","external":true}],"format":"esm"},"src/session/format.ts":{"bytes":17102,"imports":[{"path":"effect/Array","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Function","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"@dxos/blueprints","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/errors.ts","kind":"import-statement","original":"../errors"},{"path":"src/session/artifact-diff.ts","kind":"import-statement","original":"./artifact-diff"}],"format":"esm"},"src/session/session.ts":{"bytes":23621,"imports":[{"path":"@effect/ai/LanguageModel","kind":"import-statement","external":true},{"path":"effect/Chunk","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Stream","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"src/session/format.ts","kind":"import-statement","original":"./format"},{"path":"src/session/observer.ts","kind":"import-statement","original":"./observer"},{"path":"node:fs","kind":"require-call","external":true}],"format":"esm"},"src/session/toolkit.ts":{"bytes":4536,"imports":[{"path":"@effect/ai/Toolkit","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/session/version-pin.ts":{"bytes":4172,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true}],"format":"esm"},"src/session/GenericToolkit.ts":{"bytes":7378,"imports":[{"path":"@effect/ai/Toolkit","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"effect/Pipeable","kind":"import-statement","external":true}],"format":"esm"},"src/session/index.ts":{"bytes":1024,"imports":[{"path":"src/session/artifact-diff.ts","kind":"import-statement","original":"./artifact-diff"},{"path":"src/session/observer.ts","kind":"import-statement","original":"./observer"},{"path":"src/session/session.ts","kind":"import-statement","original":"./session"},{"path":"src/session/toolkit.ts","kind":"import-statement","original":"./toolkit"},{"path":"src/session/version-pin.ts","kind":"import-statement","original":"./version-pin"},{"path":"src/session/GenericToolkit.ts","kind":"import-statement","original":"./GenericToolkit"}],"format":"esm"},"src/conversation/conversation.ts":{"bytes":12916,"imports":[{"path":"effect/Array","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"src/session/index.ts","kind":"import-statement","original":"../session"},{"path":"src/conversation/context.ts","kind":"import-statement","original":"./context"}],"format":"esm"},"src/conversation/index.ts":{"bytes":562,"imports":[{"path":"src/conversation/context.ts","kind":"import-statement","original":"./context"},{"path":"src/conversation/conversation.ts","kind":"import-statement","original":"./conversation"}],"format":"esm"},"src/diff.ts":{"bytes":8784,"imports":[{"path":"@automerge/automerge","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/execution-graph.ts":{"bytes":51049,"imports":[{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/functions/services.ts":{"bytes":20563,"imports":[{"path":"@effect/ai/Tool","kind":"import-statement","external":true},{"path":"effect/Context","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"effect/Record","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/functions/index.ts":{"bytes":460,"imports":[{"path":"src/functions/services.ts","kind":"import-statement","original":"./services"}],"format":"esm"},"raw-loader:/__w/dxos/dxos/packages/core/assistant/src/templates/instructions/format.tpl?raw":{"bytes":1960,"imports":[]},"raw-loader:/__w/dxos/dxos/packages/core/assistant/src/templates/instructions/system.tpl?raw":{"bytes":3351,"imports":[]},"src/templates/system.ts":{"bytes":3189,"imports":[{"path":"lodash.defaultsdeep","kind":"import-statement","external":true},{"path":"@dxos/blueprints","kind":"import-statement","external":true},{"path":"raw-loader:/__w/dxos/dxos/packages/core/assistant/src/templates/instructions/format.tpl?raw","kind":"import-statement","original":"./instructions/format.tpl?raw"},{"path":"raw-loader:/__w/dxos/dxos/packages/core/assistant/src/templates/instructions/system.tpl?raw","kind":"import-statement","original":"./instructions/system.tpl?raw"}],"format":"esm"},"src/templates/index.ts":{"bytes":458,"imports":[{"path":"src/templates/system.ts","kind":"import-statement","original":"./system"}],"format":"esm"},"src/types/artifact.ts":{"bytes":8455,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/types/index.ts":{"bytes":456,"imports":[{"path":"src/types/artifact.ts","kind":"import-statement","original":"./artifact"}],"format":"esm"},"src/index.ts":{"bytes":1081,"imports":[{"path":"src/conversation/index.ts","kind":"import-statement","original":"./conversation"},{"path":"src/diff.ts","kind":"import-statement","original":"./diff"},{"path":"src/errors.ts","kind":"import-statement","original":"./errors"},{"path":"src/execution-graph.ts","kind":"import-statement","original":"./execution-graph"},{"path":"src/functions/index.ts","kind":"import-statement","original":"./functions"},{"path":"src/session/index.ts","kind":"import-statement","original":"./session"},{"path":"src/templates/index.ts","kind":"import-statement","original":"./templates"},{"path":"src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/extraction/extraction.ts":{"bytes":6876,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true}],"format":"esm"},"src/extraction/extraction-llm-function/extraction-llm-function.ts":{"bytes":6754,"imports":[{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"src/extraction/extraction.ts","kind":"import-statement","original":"../extraction"}],"format":"esm"},"src/extraction/extraction-llm-function/index.ts":{"bytes":524,"imports":[{"path":"src/extraction/extraction-llm-function/extraction-llm-function.ts","kind":"import-statement","original":"./extraction-llm-function"}],"format":"esm"},"src/extraction/extraction-ner-function/extraction-ner-function.ts":{"bytes":6217,"imports":[{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"src/extraction/extraction.ts","kind":"import-statement","original":"../extraction"}],"format":"esm"},"src/extraction/extraction-ner-function/named-entity-recognition.ts":{"bytes":10067,"imports":[{"path":"@xenova/transformers","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"src/extraction/extraction-ner-function/index.ts":{"bytes":652,"imports":[{"path":"src/extraction/extraction-ner-function/extraction-ner-function.ts","kind":"import-statement","original":"./extraction-ner-function"},{"path":"src/extraction/extraction-ner-function/named-entity-recognition.ts","kind":"import-statement","original":"./named-entity-recognition"}],"format":"esm"},"src/extraction/quotes.ts":{"bytes":7132,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"src/extraction/index.ts":{"bytes":803,"imports":[{"path":"src/extraction/extraction.ts","kind":"import-statement","original":"./extraction"},{"path":"src/extraction/extraction-llm-function/index.ts","kind":"import-statement","original":"./extraction-llm-function"},{"path":"src/extraction/extraction-ner-function/index.ts","kind":"import-statement","original":"./extraction-ner-function"},{"path":"src/extraction/quotes.ts","kind":"import-statement","original":"./quotes"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":101721},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-HSLMI22Q.mjs","kind":"import-statement"},{"path":"@preact/signals-core","kind":"import-statement","external":true},{"path":"effect/Array","kind":"import-statement","external":true},{"path":"effect/Context","kind":"import-statement","external":true},{"path":"effect/Function","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/blueprints","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"effect/Array","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"effect/Context","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Function","kind":"import-statement","external":true},{"path":"@effect/ai/LanguageModel","kind":"import-statement","external":true},{"path":"effect/Chunk","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Stream","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"effect/Array","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Function","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"@dxos/blueprints","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/errors","kind":"import-statement","external":true},{"path":"@effect/ai/Toolkit","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@effect/ai/Toolkit","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"effect/Pipeable","kind":"import-statement","external":true},{"path":"@automerge/automerge","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@effect/ai/Tool","kind":"import-statement","external":true},{"path":"effect/Context","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"effect/Record","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"lodash.defaultsdeep","kind":"import-statement","external":true},{"path":"@dxos/blueprints","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["AiAssistantError","AiContextBinder","AiContextService","AiConversation","AiModelError","AiSession","ArtifactDiffResolver","ArtifactId","Bindings","ContextBinding","ExecutionGraph","GenerationObserver","GenericToolkit","VersionPin","applyDiffs","computeDiffsWithCursors","createArtifactElement","createSystemPrompt","createToolkit","makeToolExecutionServiceFromFunctions","makeToolResolverFromFunctions","reduceDiffs","templates"],"entryPoint":"src/index.ts","inputs":{"src/conversation/context.ts":{"bytesInOutput":4967},"src/conversation/index.ts":{"bytesInOutput":0},"src/conversation/conversation.ts":{"bytesInOutput":2908},"src/session/artifact-diff.ts":{"bytesInOutput":145},"src/session/index.ts":{"bytesInOutput":0},"src/session/observer.ts":{"bytesInOutput":923},"src/session/session.ts":{"bytesInOutput":4251},"src/session/format.ts":{"bytesInOutput":3902},"src/errors.ts":{"bytesInOutput":236},"src/session/toolkit.ts":{"bytesInOutput":744},"src/session/version-pin.ts":{"bytesInOutput":744},"src/session/GenericToolkit.ts":{"bytesInOutput":733},"src/index.ts":{"bytesInOutput":0},"src/diff.ts":{"bytesInOutput":1899},"src/execution-graph.ts":{"bytesInOutput":11999},"src/functions/services.ts":{"bytesInOutput":4435},"src/functions/index.ts":{"bytesInOutput":0},"src/templates/system.ts":{"bytesInOutput":555},"raw-loader:/__w/dxos/dxos/packages/core/assistant/src/templates/instructions/format.tpl?raw":{"bytesInOutput":2046},"raw-loader:/__w/dxos/dxos/packages/core/assistant/src/templates/instructions/system.tpl?raw":{"bytesInOutput":3424},"src/templates/index.ts":{"bytesInOutput":0},"src/types/artifact.ts":{"bytesInOutput":1641},"src/types/index.ts":{"bytesInOutput":0}},"bytes":46950},"dist/lib/node-esm/extraction/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":17617},"dist/lib/node-esm/extraction/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-HSLMI22Q.mjs","kind":"import-statement"},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@xenova/transformers","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["ExtractionInput","ExtractionOutput","ReferencedQuotes","combineNerTokens","createTokenGroups","extractFullEntities","extractionAnthropicFunction","extractionNerFunction","findQuotes","getNer","insertReferences","processTranscriptMessage"],"entryPoint":"src/extraction/index.ts","inputs":{"src/extraction/extraction.ts":{"bytesInOutput":1376},"src/extraction/index.ts":{"bytesInOutput":0},"src/extraction/extraction-llm-function/extraction-llm-function.ts":{"bytesInOutput":455},"src/extraction/extraction-llm-function/index.ts":{"bytesInOutput":0},"src/extraction/extraction-ner-function/extraction-ner-function.ts":{"bytesInOutput":431},"src/extraction/extraction-ner-function/index.ts":{"bytesInOutput":0},"src/extraction/extraction-ner-function/named-entity-recognition.ts":{"bytesInOutput":2276},"src/extraction/quotes.ts":{"bytesInOutput":1673}},"bytes":6905},"dist/lib/node-esm/chunk-HSLMI22Q.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/node-esm/chunk-HSLMI22Q.mjs":{"imports":[],"exports":["__export"],"inputs":{},"bytes":327}}}
@@ -0,0 +1,103 @@
1
+ import { type ReadonlySignal } from '@preact/signals-core';
2
+ import * as Context from 'effect/Context';
3
+ import * as Schema from 'effect/Schema';
4
+ import { Blueprint } from '@dxos/blueprints';
5
+ import { Resource } from '@dxos/context';
6
+ import { DXN, type Ref, Type } from '@dxos/echo';
7
+ import { type Queue } from '@dxos/echo-db';
8
+ import { ComplexSet } from '@dxos/util';
9
+ /**
10
+ * Thread message that binds or unbinds contextual objects to a conversation.
11
+ */
12
+ export declare const ContextBinding: Type.obj<Schema.Struct<{
13
+ blueprints: Schema.Struct<{
14
+ added: Schema.Array$<Type.ref<Type.obj<Schema.Struct<{
15
+ key: Schema.SchemaClass<string, string, never>;
16
+ name: Schema.SchemaClass<string, string, never>;
17
+ description: Schema.optional<typeof Schema.String>;
18
+ instructions: Schema.mutable<Schema.Struct<{
19
+ source: Schema.SchemaClass<import("@dxos/echo/internal").Ref<Type.OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
20
+ content: string;
21
+ }>, import("@dxos/echo-protocol").EncodedReference, never>;
22
+ inputs: Schema.optional<Schema.mutable<Schema.Array$<Schema.mutable<Schema.Struct<{
23
+ name: typeof Schema.String;
24
+ kind: Schema.optional<Schema.Literal<["value", "pass-through", "retriever", "function", "query", "resolver", "context", "schema"]>>;
25
+ default: Schema.optional<typeof Schema.Any>;
26
+ }>>>>>;
27
+ }>>;
28
+ tools: Schema.Array$<Schema.brand<typeof Schema.String, "ToolId">>;
29
+ }>>>>;
30
+ removed: Schema.Array$<Type.ref<Type.obj<Schema.Struct<{
31
+ key: Schema.SchemaClass<string, string, never>;
32
+ name: Schema.SchemaClass<string, string, never>;
33
+ description: Schema.optional<typeof Schema.String>;
34
+ instructions: Schema.mutable<Schema.Struct<{
35
+ source: Schema.SchemaClass<import("@dxos/echo/internal").Ref<Type.OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
36
+ content: string;
37
+ }>, import("@dxos/echo-protocol").EncodedReference, never>;
38
+ inputs: Schema.optional<Schema.mutable<Schema.Array$<Schema.mutable<Schema.Struct<{
39
+ name: typeof Schema.String;
40
+ kind: Schema.optional<Schema.Literal<["value", "pass-through", "retriever", "function", "query", "resolver", "context", "schema"]>>;
41
+ default: Schema.optional<typeof Schema.Any>;
42
+ }>>>>>;
43
+ }>>;
44
+ tools: Schema.Array$<Schema.brand<typeof Schema.String, "ToolId">>;
45
+ }>>>>;
46
+ }>;
47
+ objects: Schema.Struct<{
48
+ added: Schema.Array$<Type.ref<Schema.Schema<Type.Expando, {
49
+ [x: string]: any;
50
+ id: string;
51
+ }, never>>>;
52
+ removed: Schema.Array$<Type.ref<Schema.Schema<Type.Expando, {
53
+ [x: string]: any;
54
+ id: string;
55
+ }, never>>>;
56
+ }>;
57
+ }>>;
58
+ export interface ContextBinding extends Schema.Schema.Type<typeof ContextBinding> {
59
+ }
60
+ export type BindingProps = Partial<{
61
+ blueprints: Ref.Ref<Blueprint.Blueprint>[];
62
+ objects: Ref.Ref<Type.Expando>[];
63
+ }>;
64
+ export declare class Bindings {
65
+ readonly blueprints: ComplexSet<Ref.Ref<Blueprint.Blueprint>>;
66
+ readonly objects: ComplexSet<Ref.Ref<Type.Expando>>;
67
+ toJSON(): {
68
+ blueprints: DXN.String[];
69
+ objects: DXN.String[];
70
+ };
71
+ }
72
+ /**
73
+ * Manages bindings of blueprints and objects to a conversation.
74
+ */
75
+ export declare class AiContextBinder extends Resource {
76
+ private readonly _queue;
77
+ /**
78
+ * Reactive query of all bindings.
79
+ */
80
+ private _bindings?;
81
+ private _blueprints?;
82
+ private _objects?;
83
+ constructor(_queue: Queue);
84
+ get bindings(): ReadonlySignal<Bindings>;
85
+ get blueprints(): ReadonlySignal<Ref.Ref<Blueprint.Blueprint>[]>;
86
+ get objects(): ReadonlySignal<Ref.Ref<Type.Expando>[]>;
87
+ protected _open(): Promise<void>;
88
+ protected _close(): Promise<void>;
89
+ /**
90
+ * Asynchronous query of all bindings.
91
+ */
92
+ query(): Promise<Bindings>;
93
+ bind(props: BindingProps): Promise<void>;
94
+ unbind(props: BindingProps): Promise<void>;
95
+ private _reduce;
96
+ }
97
+ declare const AiContextService_base: Context.TagClass<AiContextService, "@dxos/assistant/AiContextService", {
98
+ binder: AiContextBinder;
99
+ }>;
100
+ export declare class AiContextService extends AiContextService_base {
101
+ }
102
+ export {};
103
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/conversation/context.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,cAAc,EAAY,MAAM,sBAAsB,CAAC;AAErE,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAE1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,GAAG,EAAsB,KAAK,GAAG,EAAiB,IAAI,EAAE,MAAM,YAAY,CAAC;AACpF,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC;;GAEG;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgB1B,CAAC;AAEF,MAAM,WAAW,cAAe,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,cAAc,CAAC;CAAG;AAEpF,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC;IACjC,UAAU,EAAE,GAAG,CAAC,GAAG,CAAC,SAAS,CAAC,SAAS,CAAC,EAAE,CAAC;IAC3C,OAAO,EAAE,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;CAClC,CAAC,CAAC;AAEH,qBAAa,QAAQ;IACnB,QAAQ,CAAC,UAAU,2CAA6E;IAEhG,QAAQ,CAAC,OAAO,oCAA+E;IAE/F,MAAM;;;;CAMP;AAED;;GAEG;AAEH,qBAAa,eAAgB,SAAQ,QAAQ;IAS/B,OAAO,CAAC,QAAQ,CAAC,MAAM;IARnC;;OAEG;IAEH,OAAO,CAAC,SAAS,CAAC,CAA2B;IAC7C,OAAO,CAAC,WAAW,CAAC,CAAiD;IACrE,OAAO,CAAC,QAAQ,CAAC,CAA0C;gBAE9B,MAAM,EAAE,KAAK;IAI1C,IAAI,QAAQ,6BAGX;IAED,IAAI,UAAU,mDAGb;IAED,IAAI,OAAO,4CAGV;cAGwB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;cAQtB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAMhD;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,QAAQ,CAAC;IAM1B,IAAI,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAyBxC,MAAM,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAmBhD,OAAO,CAAC,OAAO;CAmBhB;;YAKW,eAAe;;AAH3B,qBAAa,gBAAiB,SAAQ,qBAKnC;CAAG"}
@@ -1,44 +1,41 @@
1
- import { Message, type ExecutableTool } from '@dxos/ai';
2
- import { type ArtifactDefinition } from '@dxos/artifact';
3
- import { Event } from '@dxos/async';
1
+ import type * as Toolkit from '@effect/ai/Toolkit';
2
+ import * as Effect from 'effect/Effect';
3
+ import { Resource } from '@dxos/context';
4
4
  import { type Queue } from '@dxos/echo-db';
5
- import { type ServiceContainer } from '@dxos/functions';
6
- import { ContextBinder, type ContextBinding } from '../context';
7
- import { AISession, type SessionRunOptions } from '../session';
8
- export interface ConversationRunOptions {
9
- systemPrompt?: string;
5
+ import { Message } from '@dxos/types';
6
+ import { type AiSessionRunError, type AiSessionRunRequirements, type GenerationObserver } from '../session';
7
+ import { AiContextBinder, type ContextBinding } from './context';
8
+ export interface AiConversationRunParams {
10
9
  prompt: string;
11
- tools?: ExecutableTool[];
12
- artifacts?: ArtifactDefinition[];
13
- extensions?: ToolContextExtensions;
14
- generationOptions?: SessionRunOptions['generationOptions'];
15
- /** @depreacated Should be managed by the conversation. */
16
- requiredArtifactIds?: string[];
17
- artifactDiffResolver?: SessionRunOptions['artifactDiffResolver'];
10
+ system?: string;
11
+ observer?: GenerationObserver;
18
12
  }
19
- export type ConversationOptions = {
20
- serviceContainer: ServiceContainer;
21
- queue: Queue<Message | ContextBinding>;
22
- };
23
13
  /**
24
- * Persistent conversation state.
25
- * Context + history + artifacts.
26
- * Backed by a Queue.
14
+ * Durable conversation state (initiated by users and agents) backed by a Queue.
15
+ * Executes tools based on AI responses and supports cancellation of in-progress requests.
27
16
  */
28
- export declare class Conversation {
29
- private readonly _serviceContainer;
30
- private readonly _queue;
17
+ export declare class AiConversation extends Resource {
31
18
  /**
32
- * Fired when the execution loop begins.
33
- * This is called before the first message is sent.
19
+ * Message and binding queue.
34
20
  */
35
- readonly onBegin: Event<AISession>;
21
+ private readonly _queue;
36
22
  /**
37
23
  * Blueprints bound to the conversation.
38
24
  */
39
- readonly context: ContextBinder;
40
- constructor(options: ConversationOptions);
41
- run(options: ConversationRunOptions): Promise<Message[]>;
42
- getHistory(): Promise<Message[]>;
25
+ private readonly _context;
26
+ /**
27
+ * Toolkit from the current session request.
28
+ */
29
+ private _toolkit;
30
+ constructor(queue: Queue<Message.Message | ContextBinding>);
31
+ protected _open(): Promise<void>;
32
+ protected _close(): Promise<void>;
33
+ get context(): AiContextBinder;
34
+ get toolkit(): Toolkit.WithHandler<any> | undefined;
35
+ getHistory(): Promise<Message.Message[]>;
36
+ /**
37
+ * Creates a new cancelable request effect.
38
+ */
39
+ createRequest(params: AiConversationRunParams): Effect.Effect<Message.Message[], AiSessionRunError, AiSessionRunRequirements>;
43
40
  }
44
41
  //# sourceMappingURL=conversation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../../../src/conversation/conversation.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAkC,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAIxF,OAAO,EAAE,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/D,MAAM,WAAW,sBAAsB;IACrC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IAEf,KAAK,CAAC,EAAE,cAAc,EAAE,CAAC;IACzB,SAAS,CAAC,EAAE,kBAAkB,EAAE,CAAC;IACjC,UAAU,CAAC,EAAE,qBAAqB,CAAC;IACnC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC,mBAAmB,CAAC,CAAC;IAE3D,0DAA0D;IAC1D,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAG/B,oBAAoB,CAAC,EAAE,iBAAiB,CAAC,sBAAsB,CAAC,CAAC;CAClE;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,KAAK,EAAE,KAAK,CAAC,OAAO,GAAG,cAAc,CAAC,CAAC;CACxC,CAAC;AAEF;;;;GAIG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAmB;IACrD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAkC;IAEzD;;;OAGG;IACH,SAAgB,OAAO,mBAA0B;IAEjD;;OAEG;IACH,SAAgB,OAAO,EAAE,aAAa,CAAC;gBAE3B,OAAO,EAAE,mBAAmB;IAMlC,GAAG,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAmCxD,UAAU,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;CAIvC"}
1
+ {"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../../../src/conversation/conversation.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAEnD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,eAAe,CAAC;AAG3C,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EAExB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,eAAe,EAAoB,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AAEnF,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,kBAAkB,CAAC;CAC/B;AAED;;;GAGG;AACH,qBAAa,cAAe,SAAQ,QAAQ;IAC1C;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA0C;IAEjE;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAkB;IAE3C;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAuC;gBAEpC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,OAAO,GAAG,cAAc,CAAC;cAMxC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;cAKtB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAIhD,IAAW,OAAO,oBAEjB;IAED,IAAW,OAAO,yCAEjB;IAEY,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;IAKrD;;OAEG;IACH,aAAa,CACX,MAAM,EAAE,uBAAuB,GAC9B,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,iBAAiB,EAAE,wBAAwB,CAAC;CA0CjF"}
@@ -1,2 +1,3 @@
1
+ export * from './context';
1
2
  export * from './conversation';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/conversation/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/conversation/index.ts"],"names":[],"mappings":"AAIA,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { DocAccessor } from '@dxos/echo-db';
2
+ export type Diff = {
3
+ match: string;
4
+ replace: string;
5
+ };
6
+ /**
7
+ * Convert a list of diffs into a list of operations.
8
+ */
9
+ export declare const reduceDiffs: (diffs: readonly string[]) => Diff[];
10
+ export declare const computeDiffsWithCursors: <T>(accessor: DocAccessor<T>, diffs: readonly string[]) => {
11
+ cursor: string;
12
+ text: string;
13
+ }[];
14
+ export declare const applyDiffs: <T>(accessor: DocAccessor<T>, diffs: readonly string[]) => string;
15
+ //# sourceMappingURL=diff.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../../../src/diff.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAiB,MAAM,eAAe,CAAC;AAc3D,MAAM,MAAM,IAAI,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,SAAS,MAAM,EAAE,KAAG,IAAI,EAyB1D,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,CAAC,EAAE,UAAU,WAAW,CAAC,CAAC,CAAC,EAAE,OAAO,SAAS,MAAM,EAAE;;;GAU5F,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,CAAC,EAAE,UAAU,WAAW,CAAC,CAAC,CAAC,EAAE,OAAO,SAAS,MAAM,EAAE,KAAG,MAgBlF,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=diff.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diff.test.d.ts","sourceRoot":"","sources":["../../../src/diff.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,71 @@
1
+ import { BaseError } from '@dxos/errors';
2
+ declare const AiModelError_base: {
3
+ new (options?: import("@dxos/errors").BaseErrorOptions): {
4
+ code: "AI_MODEL_ERROR";
5
+ context: Record<string, unknown>;
6
+ readonly name: "AI_MODEL_ERROR";
7
+ readonly message: string;
8
+ readonly _tag: "AI_MODEL_ERROR";
9
+ stack?: string;
10
+ cause?: unknown;
11
+ };
12
+ code: "AI_MODEL_ERROR";
13
+ is(error: unknown): error is BaseError;
14
+ wrap(options?: Omit<import("@dxos/errors").BaseErrorOptions, "cause"> & {
15
+ ifTypeDiffers?: boolean;
16
+ }): (error: unknown) => {
17
+ code: "AI_MODEL_ERROR";
18
+ context: Record<string, unknown>;
19
+ readonly name: "AI_MODEL_ERROR";
20
+ readonly message: string;
21
+ readonly _tag: "AI_MODEL_ERROR";
22
+ stack?: string;
23
+ cause?: unknown;
24
+ };
25
+ extend<Code extends string = string>(code: Code, message?: string): any;
26
+ isError(error: unknown): error is Error;
27
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
28
+ prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
29
+ stackTraceLimit: number;
30
+ };
31
+ /**
32
+ * Generic error from AI model.
33
+ */
34
+ export declare class AiModelError extends AiModelError_base {
35
+ }
36
+ declare const AiAssistantError_base: {
37
+ new (options?: import("@dxos/errors").BaseErrorOptions): {
38
+ code: "AI_ASSISTANT_ERROR";
39
+ context: Record<string, unknown>;
40
+ readonly name: "AI_ASSISTANT_ERROR";
41
+ readonly message: string;
42
+ readonly _tag: "AI_ASSISTANT_ERROR";
43
+ stack?: string;
44
+ cause?: unknown;
45
+ };
46
+ code: "AI_ASSISTANT_ERROR";
47
+ is(error: unknown): error is BaseError;
48
+ wrap(options?: Omit<import("@dxos/errors").BaseErrorOptions, "cause"> & {
49
+ ifTypeDiffers?: boolean;
50
+ }): (error: unknown) => {
51
+ code: "AI_ASSISTANT_ERROR";
52
+ context: Record<string, unknown>;
53
+ readonly name: "AI_ASSISTANT_ERROR";
54
+ readonly message: string;
55
+ readonly _tag: "AI_ASSISTANT_ERROR";
56
+ stack?: string;
57
+ cause?: unknown;
58
+ };
59
+ extend<Code extends string = string>(code: Code, message?: string): any;
60
+ isError(error: unknown): error is Error;
61
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
62
+ prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
63
+ stackTraceLimit: number;
64
+ };
65
+ /**
66
+ * Generic error for AI agent execution.
67
+ */
68
+ export declare class AiAssistantError extends AiAssistantError_base {
69
+ }
70
+ export {};
71
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/errors.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;;;;;;;;;;;;;;qBAWivB,CAAC;;;;;;;;;;;;;;;;AAT3xB;;GAEG;AACH,qBAAa,YAAa,SAAQ,iBAAoD;CAAG;;;;;;;;;;;;;;qBAMisB,CAAC;;;;;;;;;;;;;;;;AAJ3xB;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,qBAA4D;CAAG"}
@@ -0,0 +1,85 @@
1
+ import { Obj } from '@dxos/echo';
2
+ import { LogLevel } from '@dxos/log';
3
+ import { ContentBlock } from '@dxos/types';
4
+ /**
5
+ * Mercurial-style Commit.
6
+ */
7
+ export type Commit = {
8
+ id: string;
9
+ parents: string[];
10
+ branch: string;
11
+ icon?: string;
12
+ level?: LogLevel;
13
+ message: string;
14
+ timestamp?: Date;
15
+ tags?: string[];
16
+ };
17
+ /**
18
+ * Models the execution graph based on a stream of events.
19
+ */
20
+ export declare class ExecutionGraph {
21
+ private readonly _skipBlocks;
22
+ private _commits;
23
+ private _branchNames;
24
+ private _lastBlockId;
25
+ private _toolCallCommitIds;
26
+ private _lastCommitByBranch;
27
+ private _pendingToolResults;
28
+ constructor(_skipBlocks?: ContentBlock.Any['_tag'][]);
29
+ /**
30
+ * Adds events to the graph.
31
+ */
32
+ addEvents(events: Obj.Any[]): void;
33
+ /**
34
+ * Processes a message event and creates commits for its blocks.
35
+ */
36
+ private _processMessage;
37
+ /**
38
+ * Processes an AgentStatus event.
39
+ */
40
+ private _processAgentStatus;
41
+ /**
42
+ * Stable sort: objects with 'created' field are sorted by it, others remain in place.
43
+ */
44
+ private sortObjectsByCreated;
45
+ /**
46
+ * Returns the current state of the graph.
47
+ */
48
+ getGraph(lastRequest?: boolean): {
49
+ branches: string[];
50
+ commits: Commit[];
51
+ };
52
+ /**
53
+ * Tracks tool calls and handles pending tool result updates.
54
+ */
55
+ private _trackToolCalls;
56
+ /**
57
+ * Updates pending tool results to point to an AgentStatus event.
58
+ */
59
+ private _updatePendingToolResults;
60
+ /**
61
+ * Handles late updates when AgentStatus is processed before tool result.
62
+ */
63
+ private _handleLateToolResultUpdate;
64
+ /**
65
+ * Gets the branch name for a tool call.
66
+ */
67
+ private _getToolCallBranch;
68
+ /**
69
+ * Gets the parents for an AgentStatus commit.
70
+ */
71
+ private _getAgentStatusParents;
72
+ /**
73
+ * Checks if a commit is a tool call commit.
74
+ */
75
+ private _isToolCallCommit;
76
+ /**
77
+ * Checks if a commit is a tool result commit.
78
+ */
79
+ private _isToolResultCommit;
80
+ /**
81
+ * Extracts tool call ID from a commit ID.
82
+ */
83
+ private _extractToolCallId;
84
+ }
85
+ //# sourceMappingURL=execution-graph.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execution-graph.d.ts","sourceRoot":"","sources":["../../../src/execution-graph.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,GAAG,EAAY,MAAM,YAAY,CAAC;AAG3C,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,YAAY,EAAW,MAAM,aAAa,CAAC;AAKpD;;GAEG;AAEH,MAAM,MAAM,MAAM,GAAG;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB,CAAC;AAqBF;;GAEG;AACH,qBAAa,cAAc;IAWb,OAAO,CAAC,QAAQ,CAAC,WAAW;IATxC,OAAO,CAAC,QAAQ,CAAgB;IAChC,OAAO,CAAC,YAAY,CAAqB;IACzC,OAAO,CAAC,YAAY,CAAqB;IAGzC,OAAO,CAAC,kBAAkB,CAA6B;IACvD,OAAO,CAAC,mBAAmB,CAA6B;IACxD,OAAO,CAAC,mBAAmB,CAA6B;gBAE3B,WAAW,GAAE,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,EAAgB;IAElF;;OAEG;IACH,SAAS,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,EAAE;IAW3B;;OAEG;IACH,OAAO,CAAC,eAAe;IAsBvB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAyB3B;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAyB5B;;OAEG;IACH,QAAQ,CAAC,WAAW,UAAQ,GAAG;QAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;QAAC,OAAO,EAAE,MAAM,EAAE,CAAA;KAAE;IAUxE;;OAEG;IACH,OAAO,CAAC,eAAe;IAqBvB;;OAEG;IACH,OAAO,CAAC,yBAAyB;IAmBjC;;OAEG;IACH,OAAO,CAAC,2BAA2B;IAoBnC;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAO1B;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAO9B;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAIzB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAI3B;;OAEG;IACH,OAAO,CAAC,kBAAkB;CAK3B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=execution-graph.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execution-graph.test.d.ts","sourceRoot":"","sources":["../../../src/execution-graph.test.ts"],"names":[],"mappings":""}
@@ -1,4 +1,4 @@
1
1
  import { type FunctionDefinition } from '@dxos/functions';
2
2
  import { ExtractionInput, ExtractionOutput } from '../extraction';
3
- export declare const extractionAnthropicFn: FunctionDefinition<ExtractionInput, ExtractionOutput>;
3
+ export declare const extractionAnthropicFunction: FunctionDefinition<ExtractionInput, ExtractionOutput>;
4
4
  //# sourceMappingURL=extraction-llm-function.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"extraction-llm-function.d.ts","sourceRoot":"","sources":["../../../../../src/extraction/extraction-llm-function/extraction-llm-function.ts"],"names":[],"mappings":"AAOA,OAAO,EAA6B,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAKrF,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGlE,eAAO,MAAM,qBAAqB,EAAE,kBAAkB,CAAC,eAAe,EAAE,gBAAgB,CAkDtF,CAAC"}
1
+ {"version":3,"file":"extraction-llm-function.d.ts","sourceRoot":"","sources":["../../../../../src/extraction/extraction-llm-function/extraction-llm-function.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,kBAAkB,EAAkB,MAAM,iBAAiB,CAAC;AAE1E,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAElE,eAAO,MAAM,2BAA2B,EAAE,kBAAkB,CAAC,eAAe,EAAE,gBAAgB,CAqD5F,CAAC"}