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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/dist/lib/browser/chunk-ILL2CN3G.mjs +374 -0
  2. package/dist/lib/browser/chunk-ILL2CN3G.mjs.map +7 -0
  3. package/dist/lib/browser/chunk-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 +712 -1870
  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-BCFXTNSK.mjs +91 -0
  13. package/dist/lib/node-esm/chunk-BCFXTNSK.mjs.map +7 -0
  14. package/dist/lib/node-esm/chunk-GVKA7VL3.mjs +376 -0
  15. package/dist/lib/node-esm/chunk-GVKA7VL3.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 +712 -1871
  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 +96 -0
  24. package/dist/types/src/conversation/context.d.ts.map +1 -0
  25. package/dist/types/src/conversation/conversation.d.ts +28 -31
  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 +198 -65
  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 +254 -162
  46. package/dist/types/src/extraction/extraction.d.ts.map +1 -1
  47. package/dist/types/src/functions/index.d.ts +2 -0
  48. package/dist/types/src/functions/index.d.ts.map +1 -0
  49. package/dist/types/src/functions/services.d.ts +18 -0
  50. package/dist/types/src/functions/services.d.ts.map +1 -0
  51. package/dist/types/src/index.d.ts +5 -5
  52. package/dist/types/src/index.d.ts.map +1 -1
  53. package/dist/types/src/session/artifact-diff.d.ts +27 -0
  54. package/dist/types/src/session/artifact-diff.d.ts.map +1 -0
  55. package/dist/types/src/session/error-handling.d.ts +4 -0
  56. package/dist/types/src/session/error-handling.d.ts.map +1 -0
  57. package/dist/types/src/session/format.d.ts +184 -0
  58. package/dist/types/src/session/format.d.ts.map +1 -0
  59. package/dist/types/src/session/format.test.d.ts +2 -0
  60. package/dist/types/src/session/format.test.d.ts.map +1 -0
  61. package/dist/types/src/session/index.d.ts +3 -0
  62. package/dist/types/src/session/index.d.ts.map +1 -1
  63. package/dist/types/src/session/observer.d.ts +22 -0
  64. package/dist/types/src/session/observer.d.ts.map +1 -0
  65. package/dist/types/src/session/session.d.ts +32 -268
  66. package/dist/types/src/session/session.d.ts.map +1 -1
  67. package/dist/types/src/session/toolkit.d.ts +14 -0
  68. package/dist/types/src/session/toolkit.d.ts.map +1 -0
  69. package/dist/types/src/session/version-pin.d.ts +4 -4
  70. package/dist/types/src/session/version-pin.d.ts.map +1 -1
  71. package/dist/types/src/templates/index.d.ts +2 -0
  72. package/dist/types/src/templates/index.d.ts.map +1 -0
  73. package/dist/types/src/templates/system.d.ts +18 -0
  74. package/dist/types/src/templates/system.d.ts.map +1 -0
  75. package/dist/types/src/types.d.ts +13 -0
  76. package/dist/types/src/types.d.ts.map +1 -1
  77. package/dist/types/tsconfig.tsbuildinfo +1 -1
  78. package/package.json +50 -24
  79. package/src/conversation/context.ts +154 -0
  80. package/src/conversation/conversation.ts +89 -73
  81. package/src/conversation/index.ts +1 -0
  82. package/src/diff.test.ts +43 -0
  83. package/src/diff.ts +79 -0
  84. package/src/errors.ts +15 -0
  85. package/src/execution-graph.test.ts +738 -0
  86. package/src/execution-graph.ts +500 -0
  87. package/src/extraction/extraction-llm-function/extraction-llm-function.test.ts +13 -24
  88. package/src/extraction/extraction-llm-function/extraction-llm-function.ts +27 -21
  89. package/src/extraction/extraction-ner-function/extraction-ner-function.test.ts +9 -9
  90. package/src/extraction/extraction-ner-function/extraction-ner-function.ts +17 -7
  91. package/src/extraction/extraction-ner-function/named-entity-recognition.test.ts +4 -3
  92. package/src/extraction/extraction-ner-function/named-entity-recognition.ts +3 -1
  93. package/src/extraction/quotes.test.ts +3 -3
  94. package/src/extraction/quotes.ts +2 -2
  95. package/src/functions/index.ts +5 -0
  96. package/src/functions/services.ts +153 -0
  97. package/src/index.ts +5 -5
  98. package/src/session/artifact-diff.ts +41 -0
  99. package/src/session/error-handling.ts +40 -0
  100. package/src/session/format.test.ts +60 -0
  101. package/src/session/format.ts +139 -0
  102. package/src/session/index.ts +3 -0
  103. package/src/session/observer.ts +58 -0
  104. package/src/session/session.conversations.json +1 -0
  105. package/src/session/session.test.ts +86 -215
  106. package/src/session/session.ts +163 -539
  107. package/src/session/toolkit.ts +46 -0
  108. package/src/session/version-pin.ts +9 -9
  109. package/src/summarization/summarization.test.ts +86 -106
  110. package/src/templates/format.tpl +60 -0
  111. package/src/templates/index.ts +5 -0
  112. package/src/templates/system.tpl +48 -0
  113. package/src/templates/system.ts +41 -0
  114. package/src/types.ts +45 -1
  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/testing/exa-search-1748337321991.d.ts +0 -38
  145. package/dist/types/src/testing/exa-search-1748337321991.d.ts.map +0 -1
  146. package/dist/types/src/testing/exa-search-1748337331526.d.ts +0 -37
  147. package/dist/types/src/testing/exa-search-1748337331526.d.ts.map +0 -1
  148. package/dist/types/src/testing/exa-search-1748337344119.d.ts +0 -58
  149. package/dist/types/src/testing/exa-search-1748337344119.d.ts.map +0 -1
  150. package/dist/types/src/testing/index.d.ts +0 -3
  151. package/dist/types/src/testing/index.d.ts.map +0 -1
  152. package/src/blueprint/blueprint.ts +0 -75
  153. package/src/blueprint/index.ts +0 -6
  154. package/src/blueprint/registry.ts +0 -15
  155. package/src/context/binder.ts +0 -101
  156. package/src/context/binding.ts +0 -31
  157. package/src/context/index.ts +0 -6
  158. package/src/research/exa.ts +0 -100
  159. package/src/research/graph.test.ts +0 -15
  160. package/src/research/graph.ts +0 -337
  161. package/src/research/index.ts +0 -7
  162. package/src/research/instructions-research.tpl +0 -97
  163. package/src/research/research.test.ts +0 -190
  164. package/src/research/research.ts +0 -90
  165. package/src/session/version-pin.test.ts +0 -26
  166. package/src/testing/exa-search-1748337321991.ts +0 -131
  167. package/src/testing/exa-search-1748337331526.ts +0 -144
  168. package/src/testing/exa-search-1748337344119.ts +0 -133
  169. package/src/testing/index.ts +0 -11
  170. package/src/typedefs.d.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":16750,"imports":[{"path":"@preact/signals-core","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/blueprints","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/session/artifact-diff.ts":{"bytes":2575,"imports":[{"path":"effect","kind":"import-statement","external":true}],"format":"esm"},"src/session/observer.ts":{"bytes":5294,"imports":[{"path":"effect","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":16676,"imports":[{"path":"effect","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":24283,"imports":[{"path":"@effect/ai","kind":"import-statement","external":true},{"path":"effect","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":4411,"imports":[{"path":"@effect/ai","kind":"import-statement","external":true},{"path":"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":4556,"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/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":12371,"imports":[{"path":"effect","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":8472,"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":50847,"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":19561,"imports":[{"path":"@effect/ai","kind":"import-statement","external":true},{"path":"effect","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.ts":{"bytes":6867,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"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.ts","kind":"import-statement","original":"./types"}],"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"},"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"},"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":8731,"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":"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":9308,"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.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":64435},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-GVKA7VL3.mjs","kind":"import-statement"},{"path":"@preact/signals-core","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/blueprints","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/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","kind":"import-statement","external":true},{"path":"effect","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","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":3891},"src/conversation/index.ts":{"bytesInOutput":0},"src/conversation/conversation.ts":{"bytesInOutput":2806},"src/index.ts":{"bytesInOutput":0},"src/diff.ts":{"bytesInOutput":1899},"src/execution-graph.ts":{"bytesInOutput":12095},"src/functions/services.ts":{"bytesInOutput":4129},"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.ts":{"bytesInOutput":1334}},"bytes":33237},"dist/lib/node-esm/extraction/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":17257},"dist/lib/node-esm/extraction/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-GVKA7VL3.mjs","kind":"import-statement"},{"path":"dist/lib/node-esm/chunk-BCFXTNSK.mjs","kind":"import-statement"},{"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":"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":1370},"src/extraction/index.ts":{"bytesInOutput":0},"src/extraction/extraction-llm-function/extraction-llm-function.ts":{"bytesInOutput":1850},"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":2740},"src/extraction/extraction-ner-function/index.ts":{"bytesInOutput":0}},"bytes":9951},"dist/lib/node-esm/chunk-GVKA7VL3.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":29144},"dist/lib/node-esm/chunk-GVKA7VL3.mjs":{"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/errors","kind":"import-statement","external":true},{"path":"@effect/ai","kind":"import-statement","external":true},{"path":"effect","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","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","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/util","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}],"exports":["AiAssistantError","AiModelError","AiSession","ArtifactDiffResolver","GenerationObserver","VersionPin","createToolkit"],"inputs":{"src/session/artifact-diff.ts":{"bytesInOutput":134},"src/session/observer.ts":{"bytesInOutput":874},"src/errors.ts":{"bytesInOutput":236},"src/session/session.ts":{"bytesInOutput":4638},"src/session/format.ts":{"bytesInOutput":3790},"src/session/toolkit.ts":{"bytesInOutput":737},"src/session/version-pin.ts":{"bytesInOutput":1030},"src/session/index.ts":{"bytesInOutput":0}},"bytes":11930},"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,96 @@
1
+ import { type ReadonlySignal } from '@preact/signals-core';
2
+ import { Context, Schema } from 'effect';
3
+ import { Blueprint } from '@dxos/blueprints';
4
+ import { DXN, type Ref, Type } from '@dxos/echo';
5
+ import { type Queue } from '@dxos/echo-db';
6
+ import { ComplexSet } from '@dxos/util';
7
+ /**
8
+ * Thread message that binds or unbinds contextual objects to a conversation.
9
+ */
10
+ export declare const ContextBinding: Type.obj<Schema.Struct<{
11
+ blueprints: Schema.Struct<{
12
+ added: Schema.Array$<Type.ref<Type.obj<Schema.Struct<{
13
+ key: Schema.SchemaClass<string, string, never>;
14
+ name: Schema.SchemaClass<string, string, never>;
15
+ description: Schema.optional<typeof Schema.String>;
16
+ instructions: Schema.mutable<Schema.Struct<{
17
+ source: Schema.SchemaClass<import("@dxos/echo-schema").Ref<Type.OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
18
+ content: string;
19
+ }>, import("@dxos/echo-protocol").EncodedReference, never>;
20
+ inputs: Schema.optional<Schema.mutable<Schema.Array$<Schema.mutable<Schema.Struct<{
21
+ name: typeof Schema.String;
22
+ kind: Schema.optional<Schema.Literal<["value", "pass-through", "retriever", "function", "query", "resolver", "context", "schema"]>>;
23
+ default: Schema.optional<typeof Schema.Any>;
24
+ }>>>>>;
25
+ }>>;
26
+ tools: Schema.Array$<Schema.brand<typeof Schema.String, "ToolId">>;
27
+ }>>>>;
28
+ removed: Schema.Array$<Type.ref<Type.obj<Schema.Struct<{
29
+ key: Schema.SchemaClass<string, string, never>;
30
+ name: Schema.SchemaClass<string, string, never>;
31
+ description: Schema.optional<typeof Schema.String>;
32
+ instructions: Schema.mutable<Schema.Struct<{
33
+ source: Schema.SchemaClass<import("@dxos/echo-schema").Ref<Type.OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
34
+ content: string;
35
+ }>, import("@dxos/echo-protocol").EncodedReference, never>;
36
+ inputs: Schema.optional<Schema.mutable<Schema.Array$<Schema.mutable<Schema.Struct<{
37
+ name: typeof Schema.String;
38
+ kind: Schema.optional<Schema.Literal<["value", "pass-through", "retriever", "function", "query", "resolver", "context", "schema"]>>;
39
+ default: Schema.optional<typeof Schema.Any>;
40
+ }>>>>>;
41
+ }>>;
42
+ tools: Schema.Array$<Schema.brand<typeof Schema.String, "ToolId">>;
43
+ }>>>>;
44
+ }>;
45
+ objects: Schema.Struct<{
46
+ added: Schema.Array$<Type.ref<Schema.Schema<Type.Expando, {
47
+ [x: string]: any;
48
+ id: string;
49
+ }, never>>>;
50
+ removed: Schema.Array$<Type.ref<Schema.Schema<Type.Expando, {
51
+ [x: string]: any;
52
+ id: string;
53
+ }, never>>>;
54
+ }>;
55
+ }>>;
56
+ export interface ContextBinding extends Schema.Schema.Type<typeof ContextBinding> {
57
+ }
58
+ export type BindingProps = Partial<{
59
+ blueprints: Ref.Ref<Blueprint.Blueprint>[];
60
+ objects: Ref.Ref<Type.Expando>[];
61
+ }>;
62
+ export declare class Bindings {
63
+ readonly blueprints: ComplexSet<Ref.Ref<Blueprint.Blueprint>>;
64
+ readonly objects: ComplexSet<Ref.Ref<Type.Expando>>;
65
+ toJSON(): {
66
+ blueprints: DXN.String[];
67
+ objects: DXN.String[];
68
+ };
69
+ }
70
+ /**
71
+ * Manages bindings of blueprints and objects to a conversation.
72
+ */
73
+ export declare class AiContextBinder {
74
+ private readonly _queue;
75
+ /**
76
+ * Reactive query of all bindings.
77
+ */
78
+ readonly bindings: ReadonlySignal<Bindings>;
79
+ readonly blueprints: ReadonlySignal<Ref.Ref<Blueprint.Blueprint>[]>;
80
+ readonly objects: ReadonlySignal<Ref.Ref<Type.Expando>[]>;
81
+ constructor(_queue: Queue);
82
+ /**
83
+ * Asynchronous query of all bindings.
84
+ */
85
+ query(): Promise<Bindings>;
86
+ bind(props: BindingProps): Promise<void>;
87
+ unbind(props: BindingProps): Promise<void>;
88
+ private _reduce;
89
+ }
90
+ declare const AiContextService_base: Context.TagClass<AiContextService, "@dxos/assistant/AiContextService", {
91
+ binder: AiContextBinder;
92
+ }>;
93
+ export declare class AiContextService extends AiContextService_base {
94
+ }
95
+ export {};
96
+ //# 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;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGzC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAO,KAAK,GAAG,EAAiB,IAAI,EAAE,MAAM,YAAY,CAAC;AACrE,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,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,eAAe;IAad,OAAO,CAAC,QAAQ,CAAC,MAAM;IAZnC;;OAEG;IAEH,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAqD;IAEhG,QAAQ,CAAC,UAAU,EAAE,cAAc,CAAC,GAAG,CAAC,GAAG,CAAC,SAAS,CAAC,SAAS,CAAC,EAAE,CAAC,CAEhE;IAEH,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAoD;gBAEhF,MAAM,EAAE,KAAK;IAE1C;;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 Toolkit } from '@effect/ai';
2
+ import { Effect } from 'effect';
4
3
  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;
4
+ import { DataType } from '@dxos/schema';
5
+ import { type AiSessionRunError, type AiSessionRunRequirements, type GenerationObserver } from '../session';
6
+ import { AiContextBinder, type ContextBinding } from './context';
7
+ export interface AiConversationRunParams {
10
8
  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'];
9
+ system?: string;
10
+ observer?: GenerationObserver;
18
11
  }
19
- export type ConversationOptions = {
20
- serviceContainer: ServiceContainer;
21
- queue: Queue<Message | ContextBinding>;
12
+ export type AiConversationOptions = {
13
+ queue: Queue<DataType.Message | ContextBinding>;
22
14
  };
23
15
  /**
24
- * Persistent conversation state.
25
- * Context + history + artifacts.
26
- * Backed by a Queue.
16
+ * Durable conversation state (initiated by users and agents) backed by a Queue.
17
+ * Executes tools based on AI responses and supports cancellation of in-progress requests.
27
18
  */
28
- export declare class Conversation {
29
- private readonly _serviceContainer;
30
- private readonly _queue;
19
+ export declare class AiConversation {
31
20
  /**
32
- * Fired when the execution loop begins.
33
- * This is called before the first message is sent.
21
+ * Message and binding queue.
34
22
  */
35
- readonly onBegin: Event<AISession>;
23
+ private readonly _queue;
36
24
  /**
37
25
  * Blueprints bound to the conversation.
38
26
  */
39
- readonly context: ContextBinder;
40
- constructor(options: ConversationOptions);
41
- run(options: ConversationRunOptions): Promise<Message[]>;
42
- getHistory(): Promise<Message[]>;
27
+ private readonly _context;
28
+ /**
29
+ * Toolkit from the current session request.
30
+ */
31
+ private _toolkit;
32
+ constructor(options: AiConversationOptions);
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,EAAE,KAAK,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAS,MAAM,EAAU,MAAM,QAAQ,CAAC;AAG/C,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,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,OAAO,GAAG,cAAc,CAAC,CAAC;CACjD,CAAC;AAEF;;;GAGG;AACH,qBAAa,cAAc;IACzB;;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,OAAO,EAAE,qBAAqB;IAKjD,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;AAS3D,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"}