@dxos/assistant 0.8.4-main.84f28bd → 0.8.4-main.ae835ea

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 (179) hide show
  1. package/dist/lib/browser/chunk-4VIJTKPM.mjs +354 -0
  2. package/dist/lib/browser/chunk-4VIJTKPM.mjs.map +7 -0
  3. package/dist/lib/browser/chunk-UB26N5UF.mjs +89 -0
  4. package/dist/lib/browser/chunk-UB26N5UF.mjs.map +7 -0
  5. package/dist/lib/browser/extraction/index.mjs +272 -0
  6. package/dist/lib/browser/extraction/index.mjs.map +7 -0
  7. package/dist/lib/browser/index.mjs +754 -1873
  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-QPYHML66.mjs +13 -0
  11. package/dist/lib/browser/named-entity-recognition-QPYHML66.mjs.map +7 -0
  12. package/dist/lib/node-esm/chunk-AUUC7II4.mjs +356 -0
  13. package/dist/lib/node-esm/chunk-AUUC7II4.mjs.map +7 -0
  14. package/dist/lib/node-esm/chunk-BCFXTNSK.mjs +91 -0
  15. package/dist/lib/node-esm/chunk-BCFXTNSK.mjs.map +7 -0
  16. package/dist/lib/node-esm/extraction/index.mjs +273 -0
  17. package/dist/lib/node-esm/extraction/index.mjs.map +7 -0
  18. package/dist/lib/node-esm/index.mjs +754 -1874
  19. package/dist/lib/node-esm/index.mjs.map +4 -4
  20. package/dist/lib/node-esm/meta.json +1 -1
  21. package/dist/lib/node-esm/named-entity-recognition-2HDF46YX.mjs +14 -0
  22. package/dist/lib/node-esm/named-entity-recognition-2HDF46YX.mjs.map +7 -0
  23. package/dist/types/src/conversation/context.d.ts +103 -0
  24. package/dist/types/src/conversation/context.d.ts.map +1 -0
  25. package/dist/types/src/conversation/conversation.d.ts +29 -32
  26. package/dist/types/src/conversation/conversation.d.ts.map +1 -1
  27. package/dist/types/src/conversation/index.d.ts +1 -0
  28. package/dist/types/src/conversation/index.d.ts.map +1 -1
  29. package/dist/types/src/diff.d.ts +15 -0
  30. package/dist/types/src/diff.d.ts.map +1 -0
  31. package/dist/types/src/diff.test.d.ts +2 -0
  32. package/dist/types/src/diff.test.d.ts.map +1 -0
  33. package/dist/types/src/errors.d.ts +75 -0
  34. package/dist/types/src/errors.d.ts.map +1 -0
  35. package/dist/types/src/execution-graph.d.ts +82 -0
  36. package/dist/types/src/execution-graph.d.ts.map +1 -0
  37. package/dist/types/src/execution-graph.test.d.ts +2 -0
  38. package/dist/types/src/execution-graph.test.d.ts.map +1 -0
  39. package/dist/types/src/extraction/extraction-llm-function/extraction-llm-function.d.ts +1 -1
  40. package/dist/types/src/extraction/extraction-llm-function/extraction-llm-function.d.ts.map +1 -1
  41. package/dist/types/src/extraction/extraction-ner-function/extraction-ner-function.d.ts +210 -73
  42. package/dist/types/src/extraction/extraction-ner-function/extraction-ner-function.d.ts.map +1 -1
  43. package/dist/types/src/extraction/extraction-ner-function/named-entity-recognition.d.ts +1 -1
  44. package/dist/types/src/extraction/extraction-ner-function/named-entity-recognition.d.ts.map +1 -1
  45. package/dist/types/src/extraction/extraction.d.ts +264 -166
  46. package/dist/types/src/extraction/extraction.d.ts.map +1 -1
  47. package/dist/types/src/extraction/quotes.d.ts +1 -1
  48. package/dist/types/src/extraction/quotes.d.ts.map +1 -1
  49. package/dist/types/src/functions/index.d.ts +2 -0
  50. package/dist/types/src/functions/index.d.ts.map +1 -0
  51. package/dist/types/src/functions/services.d.ts +19 -0
  52. package/dist/types/src/functions/services.d.ts.map +1 -0
  53. package/dist/types/src/index.d.ts +5 -5
  54. package/dist/types/src/index.d.ts.map +1 -1
  55. package/dist/types/src/session/artifact-diff.d.ts +27 -0
  56. package/dist/types/src/session/artifact-diff.d.ts.map +1 -0
  57. package/dist/types/src/session/error-handling.d.ts +4 -0
  58. package/dist/types/src/session/error-handling.d.ts.map +1 -0
  59. package/dist/types/src/session/format.d.ts +186 -0
  60. package/dist/types/src/session/format.d.ts.map +1 -0
  61. package/dist/types/src/session/format.test.d.ts +2 -0
  62. package/dist/types/src/session/format.test.d.ts.map +1 -0
  63. package/dist/types/src/session/index.d.ts +3 -0
  64. package/dist/types/src/session/index.d.ts.map +1 -1
  65. package/dist/types/src/session/observer.d.ts +22 -0
  66. package/dist/types/src/session/observer.d.ts.map +1 -0
  67. package/dist/types/src/session/session.d.ts +36 -268
  68. package/dist/types/src/session/session.d.ts.map +1 -1
  69. package/dist/types/src/session/toolkit.d.ts +15 -0
  70. package/dist/types/src/session/toolkit.d.ts.map +1 -0
  71. package/dist/types/src/session/version-pin.d.ts +5 -5
  72. package/dist/types/src/session/version-pin.d.ts.map +1 -1
  73. package/dist/types/src/templates/index.d.ts +2 -0
  74. package/dist/types/src/templates/index.d.ts.map +1 -0
  75. package/dist/types/src/templates/system.d.ts +18 -0
  76. package/dist/types/src/templates/system.d.ts.map +1 -0
  77. package/dist/types/src/types/artifact.d.ts +16 -0
  78. package/dist/types/src/types/artifact.d.ts.map +1 -0
  79. package/dist/types/src/types/index.d.ts +2 -0
  80. package/dist/types/src/types/index.d.ts.map +1 -0
  81. package/dist/types/tsconfig.tsbuildinfo +1 -1
  82. package/package.json +46 -26
  83. package/src/conversation/context.ts +186 -0
  84. package/src/conversation/conversation.ts +101 -76
  85. package/src/conversation/index.ts +1 -0
  86. package/src/diff.test.ts +43 -0
  87. package/src/diff.ts +84 -0
  88. package/src/errors.ts +15 -0
  89. package/src/execution-graph.test.ts +738 -0
  90. package/src/execution-graph.ts +500 -0
  91. package/src/extraction/extraction-llm-function/extraction-llm-function.test.ts +13 -24
  92. package/src/extraction/extraction-llm-function/extraction-llm-function.ts +28 -22
  93. package/src/extraction/extraction-ner-function/extraction-ner-function.test.ts +9 -9
  94. package/src/extraction/extraction-ner-function/extraction-ner-function.ts +18 -8
  95. package/src/extraction/extraction-ner-function/named-entity-recognition.test.ts +4 -3
  96. package/src/extraction/extraction-ner-function/named-entity-recognition.ts +3 -1
  97. package/src/extraction/extraction.ts +2 -2
  98. package/src/extraction/quotes.test.ts +3 -3
  99. package/src/extraction/quotes.ts +4 -4
  100. package/src/functions/index.ts +5 -0
  101. package/src/functions/services.ts +158 -0
  102. package/src/index.ts +5 -5
  103. package/src/session/artifact-diff.ts +41 -0
  104. package/src/session/error-handling.ts +41 -0
  105. package/src/session/format.test.ts +60 -0
  106. package/src/session/format.ts +142 -0
  107. package/src/session/index.ts +3 -0
  108. package/src/session/observer.ts +59 -0
  109. package/src/session/session.conversations.json +1 -0
  110. package/src/session/session.test.ts +88 -214
  111. package/src/session/session.ts +170 -539
  112. package/src/session/toolkit.ts +48 -0
  113. package/src/session/version-pin.ts +10 -10
  114. package/src/summarization/summarization.test.ts +87 -106
  115. package/src/templates/format.tpl +60 -0
  116. package/src/templates/index.ts +5 -0
  117. package/src/templates/system.tpl +48 -0
  118. package/src/templates/system.ts +41 -0
  119. package/src/types/artifact.ts +52 -0
  120. package/src/types/index.ts +5 -0
  121. package/src/typings.d.ts +5 -0
  122. package/dist/types/bin/chat.d.ts +0 -2
  123. package/dist/types/bin/chat.d.ts.map +0 -1
  124. package/dist/types/src/blueprint/blueprint.d.ts +0 -41
  125. package/dist/types/src/blueprint/blueprint.d.ts.map +0 -1
  126. package/dist/types/src/blueprint/index.d.ts +0 -3
  127. package/dist/types/src/blueprint/index.d.ts.map +0 -1
  128. package/dist/types/src/blueprint/registry.d.ts +0 -7
  129. package/dist/types/src/blueprint/registry.d.ts.map +0 -1
  130. package/dist/types/src/context/binder.d.ts +0 -34
  131. package/dist/types/src/context/binder.d.ts.map +0 -1
  132. package/dist/types/src/context/binding.d.ts +0 -38
  133. package/dist/types/src/context/binding.d.ts.map +0 -1
  134. package/dist/types/src/context/index.d.ts +0 -3
  135. package/dist/types/src/context/index.d.ts.map +0 -1
  136. package/dist/types/src/research/exa.d.ts +0 -7
  137. package/dist/types/src/research/exa.d.ts.map +0 -1
  138. package/dist/types/src/research/graph.d.ts +0 -41
  139. package/dist/types/src/research/graph.d.ts.map +0 -1
  140. package/dist/types/src/research/graph.test.d.ts +0 -2
  141. package/dist/types/src/research/graph.test.d.ts.map +0 -1
  142. package/dist/types/src/research/index.d.ts +0 -4
  143. package/dist/types/src/research/index.d.ts.map +0 -1
  144. package/dist/types/src/research/research.d.ts +0 -10
  145. package/dist/types/src/research/research.d.ts.map +0 -1
  146. package/dist/types/src/research/research.test.d.ts +0 -2
  147. package/dist/types/src/research/research.test.d.ts.map +0 -1
  148. package/dist/types/src/session/version-pin.test.d.ts +0 -2
  149. package/dist/types/src/session/version-pin.test.d.ts.map +0 -1
  150. package/dist/types/src/testing/exa-search-1748337321991.d.ts +0 -38
  151. package/dist/types/src/testing/exa-search-1748337321991.d.ts.map +0 -1
  152. package/dist/types/src/testing/exa-search-1748337331526.d.ts +0 -37
  153. package/dist/types/src/testing/exa-search-1748337331526.d.ts.map +0 -1
  154. package/dist/types/src/testing/exa-search-1748337344119.d.ts +0 -58
  155. package/dist/types/src/testing/exa-search-1748337344119.d.ts.map +0 -1
  156. package/dist/types/src/testing/index.d.ts +0 -3
  157. package/dist/types/src/testing/index.d.ts.map +0 -1
  158. package/dist/types/src/types.d.ts +0 -3
  159. package/dist/types/src/types.d.ts.map +0 -1
  160. package/src/blueprint/blueprint.ts +0 -75
  161. package/src/blueprint/index.ts +0 -6
  162. package/src/blueprint/registry.ts +0 -15
  163. package/src/context/binder.ts +0 -101
  164. package/src/context/binding.ts +0 -31
  165. package/src/context/index.ts +0 -6
  166. package/src/research/exa.ts +0 -100
  167. package/src/research/graph.test.ts +0 -15
  168. package/src/research/graph.ts +0 -337
  169. package/src/research/index.ts +0 -7
  170. package/src/research/instructions-research.tpl +0 -97
  171. package/src/research/research.test.ts +0 -190
  172. package/src/research/research.ts +0 -90
  173. package/src/session/version-pin.test.ts +0 -26
  174. package/src/testing/exa-search-1748337321991.ts +0 -131
  175. package/src/testing/exa-search-1748337331526.ts +0 -144
  176. package/src/testing/exa-search-1748337344119.ts +0 -133
  177. package/src/testing/index.ts +0 -11
  178. package/src/typedefs.d.ts +0 -8
  179. package/src/types.ts +0 -8
@@ -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":5409,"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":17119,"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/functions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/schema","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":23653,"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/schema","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":4216,"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/index.ts":{"bytes":832,"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"}],"format":"esm"},"src/conversation/conversation.ts":{"bytes":12949,"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/functions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/schema","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":50143,"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/schema","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/functions/services.ts":{"bytes":20028,"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/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/format.tpl?raw":{"bytes":1915,"imports":[]},"raw-loader:/__w/dxos/dxos/packages/core/assistant/src/templates/system.tpl?raw":{"bytes":3351,"imports":[]},"src/templates/system.ts":{"bytes":3127,"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/format.tpl?raw","kind":"import-statement","original":"./format.tpl?raw"},{"path":"raw-loader:/__w/dxos/dxos/packages/core/assistant/src/templates/system.tpl?raw","kind":"import-statement","original":"./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":6896,"imports":[{"path":"effect/Schema","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":6844,"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/schema","kind":"import-statement","external":true}],"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"},"raw-loader:/__w/dxos/dxos/packages/core/assistant/src/extraction/extraction-llm-function/instructions.tpl?raw":{"bytes":1318,"imports":[]},"src/extraction/extraction-llm-function/extraction-llm-function.ts":{"bytes":8733,"imports":[{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"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"},{"path":"raw-loader:/__w/dxos/dxos/packages/core/assistant/src/extraction/extraction-llm-function/instructions.tpl?raw","kind":"import-statement","original":"./instructions.tpl?raw"}],"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":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/extraction-ner-function.ts":{"bytes":9310,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","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.ts","kind":"import-statement","original":"../extraction"},{"path":"src/extraction/quotes.ts","kind":"import-statement","original":"../quotes"},{"path":"src/extraction/extraction-ner-function/named-entity-recognition.ts","kind":"dynamic-import","original":"./named-entity-recognition"}],"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"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":66384},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-AUUC7II4.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/functions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/schema","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/schema","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/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/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","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":2852},"src/index.ts":{"bytesInOutput":0},"src/diff.ts":{"bytesInOutput":1899},"src/execution-graph.ts":{"bytesInOutput":11774},"src/functions/services.ts":{"bytesInOutput":4296},"src/functions/index.ts":{"bytesInOutput":0},"src/templates/system.ts":{"bytesInOutput":540},"raw-loader:/__w/dxos/dxos/packages/core/assistant/src/templates/format.tpl?raw":{"bytesInOutput":2000},"raw-loader:/__w/dxos/dxos/packages/core/assistant/src/templates/system.tpl?raw":{"bytesInOutput":3424},"src/templates/index.ts":{"bytesInOutput":0},"src/types/artifact.ts":{"bytesInOutput":1332},"src/types/index.ts":{"bytesInOutput":0}},"bytes":34212},"dist/lib/node-esm/extraction/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":17182},"dist/lib/node-esm/extraction/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-AUUC7II4.mjs","kind":"import-statement"},{"path":"dist/lib/node-esm/chunk-BCFXTNSK.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/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/internal","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/schema","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},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","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":"dist/lib/node-esm/named-entity-recognition-2HDF46YX.mjs","kind":"dynamic-import"}],"exports":["ExtractionInput","ExtractionOutput","ReferencedQuotes","combineNerTokens","createTokenGroups","extractFullEntities","extractionAnthropicFunction","extractionNerFunction","findQuotes","getNer","insertReferences","processTranscriptMessage"],"entryPoint":"src/extraction/index.ts","inputs":{"src/extraction/extraction.ts":{"bytesInOutput":1380},"src/extraction/index.ts":{"bytesInOutput":0},"src/extraction/extraction-llm-function/extraction-llm-function.ts":{"bytesInOutput":1852},"src/extraction/quotes.ts":{"bytesInOutput":1673},"raw-loader:/__w/dxos/dxos/packages/core/assistant/src/extraction/extraction-llm-function/instructions.tpl?raw":{"bytesInOutput":1376},"src/extraction/extraction-llm-function/index.ts":{"bytesInOutput":0},"src/extraction/extraction-ner-function/extraction-ner-function.ts":{"bytesInOutput":2742},"src/extraction/extraction-ner-function/index.ts":{"bytesInOutput":0}},"bytes":9965},"dist/lib/node-esm/chunk-AUUC7II4.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":29172},"dist/lib/node-esm/chunk-AUUC7II4.mjs":{"imports":[{"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":"@dxos/errors","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/schema","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/functions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/util","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}],"exports":["AiAssistantError","AiModelError","AiSession","ArtifactDiffResolver","GenerationObserver","VersionPin","createToolkit"],"inputs":{"src/session/artifact-diff.ts":{"bytesInOutput":143},"src/session/observer.ts":{"bytesInOutput":917},"src/errors.ts":{"bytesInOutput":236},"src/session/session.ts":{"bytesInOutput":4256},"src/session/format.ts":{"bytesInOutput":3923},"src/session/toolkit.ts":{"bytesInOutput":744},"src/session/version-pin.ts":{"bytesInOutput":741},"src/session/index.ts":{"bytesInOutput":0}},"bytes":11451},"dist/lib/node-esm/named-entity-recognition-2HDF46YX.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/node-esm/named-entity-recognition-2HDF46YX.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-BCFXTNSK.mjs","kind":"import-statement"}],"exports":["combineNerTokens","createTokenGroups","extractFullEntities","getNer"],"entryPoint":"src/extraction/extraction-ner-function/named-entity-recognition.ts","inputs":{},"bytes":353},"dist/lib/node-esm/chunk-BCFXTNSK.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5247},"dist/lib/node-esm/chunk-BCFXTNSK.mjs":{"imports":[{"path":"@xenova/transformers","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["combineNerTokens","createTokenGroups","extractFullEntities","getNer"],"inputs":{"src/extraction/extraction-ner-function/named-entity-recognition.ts":{"bytesInOutput":2265}},"bytes":2558}}}
@@ -0,0 +1,14 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+ import {
3
+ combineNerTokens,
4
+ createTokenGroups,
5
+ extractFullEntities,
6
+ getNer
7
+ } from "./chunk-BCFXTNSK.mjs";
8
+ export {
9
+ combineNerTokens,
10
+ createTokenGroups,
11
+ extractFullEntities,
12
+ getNer
13
+ };
14
+ //# sourceMappingURL=named-entity-recognition-2HDF46YX.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -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 { DataType } from '@dxos/schema';
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<DataType.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<DataType.Message[]>;
36
+ /**
37
+ * Creates a new cancelable request effect.
38
+ */
39
+ createRequest(params: AiConversationRunParams): Effect.Effect<DataType.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,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,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,CAA2C;IAElE;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAkB;IAE3C;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAuC;gBAEpC,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,OAAO,GAAG,cAAc,CAAC;cAMzC,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,QAAQ,CAAC,OAAO,EAAE,CAAC;IAKtD;;OAEG;IACH,aAAa,CACX,MAAM,EAAE,uBAAuB,GAC9B,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,EAAE,iBAAiB,EAAE,wBAAwB,CAAC;CA0ClF"}
@@ -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,75 @@
1
+ import { BaseError } from '@dxos/errors';
2
+ declare const AiModelError_base: {
3
+ new (options?: import("@dxos/errors").BaseErrorOptions): {
4
+ "__#private@#code": "AI_MODEL_ERROR";
5
+ "__#private@#context": Record<string, unknown>;
6
+ readonly name: "AI_MODEL_ERROR";
7
+ readonly message: string;
8
+ readonly code: "AI_MODEL_ERROR";
9
+ readonly _tag: "AI_MODEL_ERROR";
10
+ readonly context: Record<string, unknown>;
11
+ stack?: string;
12
+ cause?: unknown;
13
+ };
14
+ code: "AI_MODEL_ERROR";
15
+ is(error: unknown): error is BaseError;
16
+ wrap(options?: Omit<import("@dxos/errors").BaseErrorOptions, "cause">): (error: unknown) => {
17
+ "__#private@#code": "AI_MODEL_ERROR";
18
+ "__#private@#context": Record<string, unknown>;
19
+ readonly name: "AI_MODEL_ERROR";
20
+ readonly message: string;
21
+ readonly code: "AI_MODEL_ERROR";
22
+ readonly _tag: "AI_MODEL_ERROR";
23
+ readonly context: Record<string, unknown>;
24
+ stack?: string;
25
+ cause?: unknown;
26
+ };
27
+ extend<Code extends string = string>(code: Code, message?: string): any;
28
+ isError(error: unknown): error is Error;
29
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
30
+ prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
31
+ stackTraceLimit: number;
32
+ };
33
+ /**
34
+ * Generic error from AI model.
35
+ */
36
+ export declare class AiModelError extends AiModelError_base {
37
+ }
38
+ declare const AiAssistantError_base: {
39
+ new (options?: import("@dxos/errors").BaseErrorOptions): {
40
+ "__#private@#code": "AI_ASSISTANT_ERROR";
41
+ "__#private@#context": Record<string, unknown>;
42
+ readonly name: "AI_ASSISTANT_ERROR";
43
+ readonly message: string;
44
+ readonly code: "AI_ASSISTANT_ERROR";
45
+ readonly _tag: "AI_ASSISTANT_ERROR";
46
+ readonly context: Record<string, unknown>;
47
+ stack?: string;
48
+ cause?: unknown;
49
+ };
50
+ code: "AI_ASSISTANT_ERROR";
51
+ is(error: unknown): error is BaseError;
52
+ wrap(options?: Omit<import("@dxos/errors").BaseErrorOptions, "cause">): (error: unknown) => {
53
+ "__#private@#code": "AI_ASSISTANT_ERROR";
54
+ "__#private@#context": Record<string, unknown>;
55
+ readonly name: "AI_ASSISTANT_ERROR";
56
+ readonly message: string;
57
+ readonly code: "AI_ASSISTANT_ERROR";
58
+ readonly _tag: "AI_ASSISTANT_ERROR";
59
+ readonly context: Record<string, unknown>;
60
+ stack?: string;
61
+ cause?: unknown;
62
+ };
63
+ extend<Code extends string = string>(code: Code, message?: string): any;
64
+ isError(error: unknown): error is Error;
65
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
66
+ prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
67
+ stackTraceLimit: number;
68
+ };
69
+ /**
70
+ * Generic error for AI agent execution.
71
+ */
72
+ export declare class AiAssistantError extends AiAssistantError_base {
73
+ }
74
+ export {};
75
+ //# 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEzC;;GAEG;AACH,qBAAa,YAAa,SAAQ,iBAAoD;CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEzF;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,qBAA4D;CAAG"}
@@ -0,0 +1,82 @@
1
+ import { Obj } from '@dxos/echo';
2
+ import { LogLevel } from '@dxos/log';
3
+ /**
4
+ * Mercurial-style Commit.
5
+ */
6
+ export type Commit = {
7
+ id: string;
8
+ parents: string[];
9
+ branch: string;
10
+ icon?: string;
11
+ level?: LogLevel;
12
+ message: string;
13
+ timestamp?: Date;
14
+ tags?: string[];
15
+ };
16
+ /**
17
+ * Models the execution graph based on a stream of events.
18
+ */
19
+ export declare class ExecutionGraph {
20
+ private _commits;
21
+ private _branchNames;
22
+ private _lastBlockId;
23
+ private _toolCallCommitIds;
24
+ private _lastCommitByBranch;
25
+ private _pendingToolResults;
26
+ /**
27
+ * Adds events to the graph.
28
+ */
29
+ addEvents(events: Obj.Any[]): void;
30
+ /**
31
+ * Processes a message event and creates commits for its blocks.
32
+ */
33
+ private _processMessage;
34
+ /**
35
+ * Processes an AgentStatus event.
36
+ */
37
+ private _processAgentStatus;
38
+ /**
39
+ * Stable sort: objects with 'created' field are sorted by it, others remain in place.
40
+ */
41
+ private sortObjectsByCreated;
42
+ /**
43
+ * Returns the current state of the graph.
44
+ */
45
+ getGraph(lastRequest?: boolean): {
46
+ branches: string[];
47
+ commits: Commit[];
48
+ };
49
+ /**
50
+ * Tracks tool calls and handles pending tool result updates.
51
+ */
52
+ private _trackToolCalls;
53
+ /**
54
+ * Updates pending tool results to point to an AgentStatus event.
55
+ */
56
+ private _updatePendingToolResults;
57
+ /**
58
+ * Handles late updates when AgentStatus is processed before tool result.
59
+ */
60
+ private _handleLateToolResultUpdate;
61
+ /**
62
+ * Gets the branch name for a tool call.
63
+ */
64
+ private _getToolCallBranch;
65
+ /**
66
+ * Gets the parents for an AgentStatus commit.
67
+ */
68
+ private _getAgentStatusParents;
69
+ /**
70
+ * Checks if a commit is a tool call commit.
71
+ */
72
+ private _isToolCallCommit;
73
+ /**
74
+ * Checks if a commit is a tool result commit.
75
+ */
76
+ private _isToolResultCommit;
77
+ /**
78
+ * Extracts tool call ID from a commit ID.
79
+ */
80
+ private _extractToolCallId;
81
+ }
82
+ //# 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;AAIrC;;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;IAEzB,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;IAExD;;OAEG;IACH,SAAS,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,EAAE;IAW3B;;OAEG;IACH,OAAO,CAAC,eAAe;IAqBvB;;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":"AAUA,OAAO,EAAE,KAAK,kBAAkB,EAAkB,MAAM,iBAAiB,CAAC;AAI1E,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAKlE,eAAO,MAAM,2BAA2B,EAAE,kBAAkB,CAAC,eAAe,EAAE,gBAAgB,CAoD5F,CAAC"}