@dxos/assistant 0.8.4-main.7ace549 → 0.8.4-main.937b3ca

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 (84) hide show
  1. package/dist/lib/browser/chunk-7CDDG6LL.mjs +578 -0
  2. package/dist/lib/browser/chunk-7CDDG6LL.mjs.map +7 -0
  3. package/dist/lib/browser/extraction/index.mjs +3 -3
  4. package/dist/lib/browser/extraction/index.mjs.map +3 -3
  5. package/dist/lib/browser/index.mjs +239 -678
  6. package/dist/lib/browser/index.mjs.map +4 -4
  7. package/dist/lib/browser/meta.json +1 -1
  8. package/dist/lib/browser/testing/index.mjs +32 -0
  9. package/dist/lib/browser/testing/index.mjs.map +7 -0
  10. package/dist/lib/node-esm/chunk-CC7ER6Q3.mjs +579 -0
  11. package/dist/lib/node-esm/chunk-CC7ER6Q3.mjs.map +7 -0
  12. package/dist/lib/node-esm/extraction/index.mjs +3 -3
  13. package/dist/lib/node-esm/extraction/index.mjs.map +3 -3
  14. package/dist/lib/node-esm/index.mjs +239 -678
  15. package/dist/lib/node-esm/index.mjs.map +4 -4
  16. package/dist/lib/node-esm/meta.json +1 -1
  17. package/dist/lib/node-esm/testing/index.mjs +33 -0
  18. package/dist/lib/node-esm/testing/index.mjs.map +7 -0
  19. package/dist/types/src/conversation/context.d.ts +74 -42
  20. package/dist/types/src/conversation/context.d.ts.map +1 -1
  21. package/dist/types/src/conversation/context.test.d.ts +2 -0
  22. package/dist/types/src/conversation/context.test.d.ts.map +1 -0
  23. package/dist/types/src/conversation/conversation.d.ts +14 -14
  24. package/dist/types/src/conversation/conversation.d.ts.map +1 -1
  25. package/dist/types/src/conversation/conversation.test.d.ts +2 -0
  26. package/dist/types/src/conversation/conversation.test.d.ts.map +1 -0
  27. package/dist/types/src/errors.d.ts +12 -16
  28. package/dist/types/src/errors.d.ts.map +1 -1
  29. package/dist/types/src/extraction/extraction-ner-function/extraction-ner-function.d.ts +179 -178
  30. package/dist/types/src/extraction/extraction-ner-function/extraction-ner-function.d.ts.map +1 -1
  31. package/dist/types/src/extraction/extraction.d.ts +285 -241
  32. package/dist/types/src/extraction/extraction.d.ts.map +1 -1
  33. package/dist/types/src/extraction/quotes.d.ts +2 -2
  34. package/dist/types/src/extraction/quotes.d.ts.map +1 -1
  35. package/dist/types/src/functions/services.d.ts +3 -3
  36. package/dist/types/src/functions/services.d.ts.map +1 -1
  37. package/dist/types/src/functions.test.d.ts +2 -0
  38. package/dist/types/src/functions.test.d.ts.map +1 -0
  39. package/dist/types/src/session/GenericToolkit.d.ts +1 -0
  40. package/dist/types/src/session/GenericToolkit.d.ts.map +1 -1
  41. package/dist/types/src/session/format.d.ts +3 -3
  42. package/dist/types/src/session/format.d.ts.map +1 -1
  43. package/dist/types/src/session/observer.d.ts +4 -3
  44. package/dist/types/src/session/observer.d.ts.map +1 -1
  45. package/dist/types/src/session/session.d.ts +14 -9
  46. package/dist/types/src/session/session.d.ts.map +1 -1
  47. package/dist/types/src/session/toolkit.d.ts +5 -6
  48. package/dist/types/src/session/toolkit.d.ts.map +1 -1
  49. package/dist/types/src/session/version-pin.d.ts +1 -1
  50. package/dist/types/src/session/version-pin.d.ts.map +1 -1
  51. package/dist/types/src/testing/index.d.ts +2 -0
  52. package/dist/types/src/testing/index.d.ts.map +1 -0
  53. package/dist/types/src/testing/layer.d.ts +21 -0
  54. package/dist/types/src/testing/layer.d.ts.map +1 -0
  55. package/dist/types/src/types/artifact.d.ts +12 -3
  56. package/dist/types/src/types/artifact.d.ts.map +1 -1
  57. package/dist/types/tsconfig.tsbuildinfo +1 -1
  58. package/package.json +38 -29
  59. package/src/conversation/context.test.ts +46 -0
  60. package/src/conversation/context.ts +183 -65
  61. package/src/conversation/conversation.test.ts +65 -0
  62. package/src/conversation/conversation.ts +46 -49
  63. package/src/diff.test.ts +1 -1
  64. package/src/errors.ts +2 -2
  65. package/src/execution-graph.ts +2 -2
  66. package/src/extraction/extraction-ner-function/extraction-ner-function.test.ts +3 -3
  67. package/src/extraction/extraction-ner-function/extraction-ner-function.ts +1 -1
  68. package/src/extraction/extraction.ts +3 -3
  69. package/src/extraction/quotes.ts +3 -4
  70. package/src/functions/services.ts +28 -10
  71. package/src/functions.conversations.json +1 -0
  72. package/src/functions.test.ts +74 -0
  73. package/src/session/GenericToolkit.ts +1 -0
  74. package/src/session/format.test.ts +101 -38
  75. package/src/session/format.ts +11 -12
  76. package/src/session/observer.ts +3 -1
  77. package/src/session/session.conversations.json +1 -1
  78. package/src/session/session.test.ts +7 -13
  79. package/src/session/session.ts +33 -12
  80. package/src/session/toolkit.ts +13 -22
  81. package/src/session/version-pin.ts +2 -2
  82. package/src/testing/index.ts +5 -0
  83. package/src/testing/layer.ts +78 -0
  84. package/src/types/artifact.ts +18 -6
@@ -1 +1 @@
1
- {"inputs":{"src/conversation/context.ts":{"bytes":20071,"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":2584,"imports":[{"path":"effect/Context","kind":"import-statement","external":true}],"format":"esm"},"src/session/observer.ts":{"bytes":5405,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Function","kind":"import-statement","external":true}],"format":"esm"},"src/errors.ts":{"bytes":1420,"imports":[{"path":"@dxos/errors","kind":"import-statement","external":true}],"format":"esm"},"src/session/format.ts":{"bytes":17090,"imports":[{"path":"effect/Array","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Function","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"@dxos/blueprints","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/errors.ts","kind":"import-statement","original":"../errors"},{"path":"src/session/artifact-diff.ts","kind":"import-statement","original":"./artifact-diff"}],"format":"esm"},"src/session/session.ts":{"bytes":23621,"imports":[{"path":"@effect/ai/LanguageModel","kind":"import-statement","external":true},{"path":"effect/Chunk","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Stream","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"src/session/format.ts","kind":"import-statement","original":"./format"},{"path":"src/session/observer.ts","kind":"import-statement","original":"./observer"},{"path":"node:fs","kind":"require-call","external":true}],"format":"esm"},"src/session/toolkit.ts":{"bytes":4536,"imports":[{"path":"@effect/ai/Toolkit","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/session/version-pin.ts":{"bytes":4155,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true}],"format":"esm"},"src/session/GenericToolkit.ts":{"bytes":7378,"imports":[{"path":"@effect/ai/Toolkit","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"effect/Pipeable","kind":"import-statement","external":true}],"format":"esm"},"src/session/index.ts":{"bytes":1024,"imports":[{"path":"src/session/artifact-diff.ts","kind":"import-statement","original":"./artifact-diff"},{"path":"src/session/observer.ts","kind":"import-statement","original":"./observer"},{"path":"src/session/session.ts","kind":"import-statement","original":"./session"},{"path":"src/session/toolkit.ts","kind":"import-statement","original":"./toolkit"},{"path":"src/session/version-pin.ts","kind":"import-statement","original":"./version-pin"},{"path":"src/session/GenericToolkit.ts","kind":"import-statement","original":"./GenericToolkit"}],"format":"esm"},"src/conversation/conversation.ts":{"bytes":12916,"imports":[{"path":"effect/Array","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"src/session/index.ts","kind":"import-statement","original":"../session"},{"path":"src/conversation/context.ts","kind":"import-statement","original":"./context"}],"format":"esm"},"src/conversation/index.ts":{"bytes":562,"imports":[{"path":"src/conversation/context.ts","kind":"import-statement","original":"./context"},{"path":"src/conversation/conversation.ts","kind":"import-statement","original":"./conversation"}],"format":"esm"},"src/diff.ts":{"bytes":8784,"imports":[{"path":"@automerge/automerge","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/execution-graph.ts":{"bytes":51077,"imports":[{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/functions/services.ts":{"bytes":20563,"imports":[{"path":"@effect/ai/Tool","kind":"import-statement","external":true},{"path":"effect/Context","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"effect/Record","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/functions/index.ts":{"bytes":460,"imports":[{"path":"src/functions/services.ts","kind":"import-statement","original":"./services"}],"format":"esm"},"raw-loader:/__w/dxos/dxos/packages/core/assistant/src/templates/instructions/format.tpl?raw":{"bytes":1960,"imports":[]},"raw-loader:/__w/dxos/dxos/packages/core/assistant/src/templates/instructions/system.tpl?raw":{"bytes":3351,"imports":[]},"src/templates/system.ts":{"bytes":3189,"imports":[{"path":"lodash.defaultsdeep","kind":"import-statement","external":true},{"path":"@dxos/blueprints","kind":"import-statement","external":true},{"path":"raw-loader:/__w/dxos/dxos/packages/core/assistant/src/templates/instructions/format.tpl?raw","kind":"import-statement","original":"./instructions/format.tpl?raw"},{"path":"raw-loader:/__w/dxos/dxos/packages/core/assistant/src/templates/instructions/system.tpl?raw","kind":"import-statement","original":"./instructions/system.tpl?raw"}],"format":"esm"},"src/templates/index.ts":{"bytes":458,"imports":[{"path":"src/templates/system.ts","kind":"import-statement","original":"./system"}],"format":"esm"},"src/types/artifact.ts":{"bytes":8359,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/types/index.ts":{"bytes":456,"imports":[{"path":"src/types/artifact.ts","kind":"import-statement","original":"./artifact"}],"format":"esm"},"src/index.ts":{"bytes":1081,"imports":[{"path":"src/conversation/index.ts","kind":"import-statement","original":"./conversation"},{"path":"src/diff.ts","kind":"import-statement","original":"./diff"},{"path":"src/errors.ts","kind":"import-statement","original":"./errors"},{"path":"src/execution-graph.ts","kind":"import-statement","original":"./execution-graph"},{"path":"src/functions/index.ts","kind":"import-statement","original":"./functions"},{"path":"src/session/index.ts","kind":"import-statement","original":"./session"},{"path":"src/templates/index.ts","kind":"import-statement","original":"./templates"},{"path":"src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/extraction/extraction.ts":{"bytes":6881,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true}],"format":"esm"},"src/extraction/extraction-llm-function/extraction-llm-function.ts":{"bytes":6754,"imports":[{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"src/extraction/extraction.ts","kind":"import-statement","original":"../extraction"}],"format":"esm"},"src/extraction/extraction-llm-function/index.ts":{"bytes":524,"imports":[{"path":"src/extraction/extraction-llm-function/extraction-llm-function.ts","kind":"import-statement","original":"./extraction-llm-function"}],"format":"esm"},"src/extraction/extraction-ner-function/extraction-ner-function.ts":{"bytes":6217,"imports":[{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"src/extraction/extraction.ts","kind":"import-statement","original":"../extraction"}],"format":"esm"},"src/extraction/extraction-ner-function/named-entity-recognition.ts":{"bytes":10067,"imports":[{"path":"@xenova/transformers","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"src/extraction/extraction-ner-function/index.ts":{"bytes":652,"imports":[{"path":"src/extraction/extraction-ner-function/extraction-ner-function.ts","kind":"import-statement","original":"./extraction-ner-function"},{"path":"src/extraction/extraction-ner-function/named-entity-recognition.ts","kind":"import-statement","original":"./named-entity-recognition"}],"format":"esm"},"src/extraction/quotes.ts":{"bytes":7107,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"src/extraction/index.ts":{"bytes":803,"imports":[{"path":"src/extraction/extraction.ts","kind":"import-statement","original":"./extraction"},{"path":"src/extraction/extraction-llm-function/index.ts","kind":"import-statement","original":"./extraction-llm-function"},{"path":"src/extraction/extraction-ner-function/index.ts","kind":"import-statement","original":"./extraction-ner-function"},{"path":"src/extraction/quotes.ts","kind":"import-statement","original":"./quotes"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":101549},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-HSLMI22Q.mjs","kind":"import-statement"},{"path":"@preact/signals-core","kind":"import-statement","external":true},{"path":"effect/Array","kind":"import-statement","external":true},{"path":"effect/Context","kind":"import-statement","external":true},{"path":"effect/Function","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/blueprints","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"effect/Array","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"effect/Context","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Function","kind":"import-statement","external":true},{"path":"@effect/ai/LanguageModel","kind":"import-statement","external":true},{"path":"effect/Chunk","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Stream","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"effect/Array","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Function","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"@dxos/blueprints","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/errors","kind":"import-statement","external":true},{"path":"@effect/ai/Toolkit","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@effect/ai/Toolkit","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"effect/Pipeable","kind":"import-statement","external":true},{"path":"@automerge/automerge","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@effect/ai/Tool","kind":"import-statement","external":true},{"path":"effect/Context","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"effect/Record","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"lodash.defaultsdeep","kind":"import-statement","external":true},{"path":"@dxos/blueprints","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["AiAssistantError","AiContextBinder","AiContextService","AiConversation","AiModelError","AiSession","ArtifactDiffResolver","ArtifactId","Bindings","ContextBinding","ExecutionGraph","GenerationObserver","GenericToolkit","VersionPin","applyDiffs","computeDiffsWithCursors","createArtifactElement","createSystemPrompt","createToolkit","makeToolExecutionServiceFromFunctions","makeToolResolverFromFunctions","reduceDiffs","templates"],"entryPoint":"src/index.ts","inputs":{"src/conversation/context.ts":{"bytesInOutput":4899},"src/conversation/index.ts":{"bytesInOutput":0},"src/conversation/conversation.ts":{"bytesInOutput":2908},"src/session/artifact-diff.ts":{"bytesInOutput":145},"src/session/index.ts":{"bytesInOutput":0},"src/session/observer.ts":{"bytesInOutput":923},"src/session/session.ts":{"bytesInOutput":4251},"src/session/format.ts":{"bytesInOutput":3902},"src/errors.ts":{"bytesInOutput":236},"src/session/toolkit.ts":{"bytesInOutput":744},"src/session/version-pin.ts":{"bytesInOutput":735},"src/session/GenericToolkit.ts":{"bytesInOutput":733},"src/index.ts":{"bytesInOutput":0},"src/diff.ts":{"bytesInOutput":1899},"src/execution-graph.ts":{"bytesInOutput":11999},"src/functions/services.ts":{"bytesInOutput":4435},"src/functions/index.ts":{"bytesInOutput":0},"src/templates/system.ts":{"bytesInOutput":555},"raw-loader:/__w/dxos/dxos/packages/core/assistant/src/templates/instructions/format.tpl?raw":{"bytesInOutput":2046},"raw-loader:/__w/dxos/dxos/packages/core/assistant/src/templates/instructions/system.tpl?raw":{"bytesInOutput":3424},"src/templates/index.ts":{"bytesInOutput":0},"src/types/artifact.ts":{"bytesInOutput":1641},"src/types/index.ts":{"bytesInOutput":0}},"bytes":46873},"dist/lib/node-esm/extraction/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":17613},"dist/lib/node-esm/extraction/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-HSLMI22Q.mjs","kind":"import-statement"},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@xenova/transformers","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["ExtractionInput","ExtractionOutput","ReferencedQuotes","combineNerTokens","createTokenGroups","extractFullEntities","extractionAnthropicFunction","extractionNerFunction","findQuotes","getNer","insertReferences","processTranscriptMessage"],"entryPoint":"src/extraction/index.ts","inputs":{"src/extraction/extraction.ts":{"bytesInOutput":1369},"src/extraction/index.ts":{"bytesInOutput":0},"src/extraction/extraction-llm-function/extraction-llm-function.ts":{"bytesInOutput":455},"src/extraction/extraction-llm-function/index.ts":{"bytesInOutput":0},"src/extraction/extraction-ner-function/extraction-ner-function.ts":{"bytesInOutput":431},"src/extraction/extraction-ner-function/index.ts":{"bytesInOutput":0},"src/extraction/extraction-ner-function/named-entity-recognition.ts":{"bytesInOutput":2276},"src/extraction/quotes.ts":{"bytesInOutput":1664}},"bytes":6889},"dist/lib/node-esm/chunk-HSLMI22Q.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/node-esm/chunk-HSLMI22Q.mjs":{"imports":[],"exports":["__export"],"inputs":{},"bytes":327}}}
1
+ {"inputs":{"src/conversation/context.ts":{"bytes":31393,"imports":[{"path":"@effect-atom/atom-react","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/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/session/artifact-diff.ts":{"bytes":2584,"imports":[{"path":"effect/Context","kind":"import-statement","external":true}],"format":"esm"},"src/session/observer.ts":{"bytes":5545,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Function","kind":"import-statement","external":true}],"format":"esm"},"src/errors.ts":{"bytes":1412,"imports":[{"path":"@dxos/errors","kind":"import-statement","external":true}],"format":"esm"},"src/session/format.ts":{"bytes":16498,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Function","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"@dxos/blueprints","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/errors.ts","kind":"import-statement","original":"../errors"},{"path":"src/session/artifact-diff.ts","kind":"import-statement","original":"./artifact-diff"}],"format":"esm"},"src/session/session.ts":{"bytes":25475,"imports":[{"path":"@effect/ai/LanguageModel","kind":"import-statement","external":true},{"path":"effect/Chunk","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Stream","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"src/session/format.ts","kind":"import-statement","original":"./format"},{"path":"src/session/observer.ts","kind":"import-statement","original":"./observer"},{"path":"node:fs","kind":"require-call","external":true}],"format":"esm"},"src/session/toolkit.ts":{"bytes":4007,"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":4167,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true}],"format":"esm"},"src/session/GenericToolkit.ts":{"bytes":7442,"imports":[{"path":"@effect/ai/Toolkit","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"effect/Pipeable","kind":"import-statement","external":true}],"format":"esm"},"src/session/index.ts":{"bytes":1024,"imports":[{"path":"src/session/artifact-diff.ts","kind":"import-statement","original":"./artifact-diff"},{"path":"src/session/observer.ts","kind":"import-statement","original":"./observer"},{"path":"src/session/session.ts","kind":"import-statement","original":"./session"},{"path":"src/session/toolkit.ts","kind":"import-statement","original":"./toolkit"},{"path":"src/session/version-pin.ts","kind":"import-statement","original":"./version-pin"},{"path":"src/session/GenericToolkit.ts","kind":"import-statement","original":"./GenericToolkit"}],"format":"esm"},"src/conversation/conversation.ts":{"bytes":11550,"imports":[{"path":"effect/Effect","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/log","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"src/session/index.ts","kind":"import-statement","original":"../session"},{"path":"src/conversation/context.ts","kind":"import-statement","original":"./context"}],"format":"esm"},"src/conversation/index.ts":{"bytes":562,"imports":[{"path":"src/conversation/context.ts","kind":"import-statement","original":"./context"},{"path":"src/conversation/conversation.ts","kind":"import-statement","original":"./conversation"}],"format":"esm"},"src/diff.ts":{"bytes":8784,"imports":[{"path":"@automerge/automerge","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/execution-graph.ts":{"bytes":51089,"imports":[{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/types/artifact.ts":{"bytes":9999,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-protocol","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/functions/services.ts":{"bytes":21955,"imports":[{"path":"@effect/ai/Tool","kind":"import-statement","external":true},{"path":"effect/Context","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"effect/Record","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"src/functions/index.ts":{"bytes":460,"imports":[{"path":"src/functions/services.ts","kind":"import-statement","original":"./services"}],"format":"esm"},"raw-loader:/__w/dxos/dxos/packages/core/assistant/src/templates/instructions/format.tpl?raw":{"bytes":1960,"imports":[]},"raw-loader:/__w/dxos/dxos/packages/core/assistant/src/templates/instructions/system.tpl?raw":{"bytes":3351,"imports":[]},"src/templates/system.ts":{"bytes":3189,"imports":[{"path":"lodash.defaultsdeep","kind":"import-statement","external":true},{"path":"@dxos/blueprints","kind":"import-statement","external":true},{"path":"raw-loader:/__w/dxos/dxos/packages/core/assistant/src/templates/instructions/format.tpl?raw","kind":"import-statement","original":"./instructions/format.tpl?raw"},{"path":"raw-loader:/__w/dxos/dxos/packages/core/assistant/src/templates/instructions/system.tpl?raw","kind":"import-statement","original":"./instructions/system.tpl?raw"}],"format":"esm"},"src/templates/index.ts":{"bytes":458,"imports":[{"path":"src/templates/system.ts","kind":"import-statement","original":"./system"}],"format":"esm"},"src/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":6865,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true}],"format":"esm"},"src/extraction/extraction-llm-function/extraction-llm-function.ts":{"bytes":6754,"imports":[{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"src/extraction/extraction.ts","kind":"import-statement","original":"../extraction"}],"format":"esm"},"src/extraction/extraction-llm-function/index.ts":{"bytes":524,"imports":[{"path":"src/extraction/extraction-llm-function/extraction-llm-function.ts","kind":"import-statement","original":"./extraction-llm-function"}],"format":"esm"},"src/extraction/extraction-ner-function/extraction-ner-function.ts":{"bytes":6222,"imports":[{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"src/extraction/extraction.ts","kind":"import-statement","original":"../extraction"}],"format":"esm"},"src/extraction/extraction-ner-function/named-entity-recognition.ts":{"bytes":10067,"imports":[{"path":"@xenova/transformers","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"src/extraction/extraction-ner-function/index.ts":{"bytes":652,"imports":[{"path":"src/extraction/extraction-ner-function/extraction-ner-function.ts","kind":"import-statement","original":"./extraction-ner-function"},{"path":"src/extraction/extraction-ner-function/named-entity-recognition.ts","kind":"import-statement","original":"./named-entity-recognition"}],"format":"esm"},"src/extraction/quotes.ts":{"bytes":7035,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"src/extraction/index.ts":{"bytes":803,"imports":[{"path":"src/extraction/extraction.ts","kind":"import-statement","original":"./extraction"},{"path":"src/extraction/extraction-llm-function/index.ts","kind":"import-statement","original":"./extraction-llm-function"},{"path":"src/extraction/extraction-ner-function/index.ts","kind":"import-statement","original":"./extraction-ner-function"},{"path":"src/extraction/quotes.ts","kind":"import-statement","original":"./quotes"}],"format":"esm"},"src/testing/layer.ts":{"bytes":8328,"imports":[{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"effect/Match","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/ai/testing","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime/testing","kind":"import-statement","external":true},{"path":"src/functions/index.ts","kind":"import-statement","original":"../functions"},{"path":"src/session/index.ts","kind":"import-statement","original":"../session"}],"format":"esm"},"src/testing/index.ts":{"bytes":451,"imports":[{"path":"src/testing/layer.ts","kind":"import-statement","original":"./layer"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":58452},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-CC7ER6Q3.mjs","kind":"import-statement"},{"path":"dist/lib/node-esm/chunk-HSLMI22Q.mjs","kind":"import-statement"},{"path":"@effect-atom/atom-react","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/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"effect/Effect","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/log","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"@automerge/automerge","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"lodash.defaultsdeep","kind":"import-statement","external":true},{"path":"@dxos/blueprints","kind":"import-statement","external":true}],"exports":["AiAssistantError","AiContextBinder","AiContextService","AiConversation","AiModelError","AiSession","ArtifactDiffResolver","ArtifactId","Bindings","ContextBinding","ExecutionGraph","GenerationObserver","GenericToolkit","RefFromLLM","VersionPin","applyDiffs","computeDiffsWithCursors","createArtifactElement","createSystemPrompt","createToolkit","makeToolExecutionServiceFromFunctions","makeToolResolverFromFunctions","reduceDiffs","templates"],"entryPoint":"src/index.ts","inputs":{"src/conversation/context.ts":{"bytesInOutput":7141},"src/conversation/index.ts":{"bytesInOutput":0},"src/conversation/conversation.ts":{"bytesInOutput":2537},"src/index.ts":{"bytesInOutput":0},"src/diff.ts":{"bytesInOutput":1899},"src/execution-graph.ts":{"bytesInOutput":11999},"src/templates/system.ts":{"bytesInOutput":540},"raw-loader:/__w/dxos/dxos/packages/core/assistant/src/templates/instructions/format.tpl?raw":{"bytesInOutput":2046},"raw-loader:/__w/dxos/dxos/packages/core/assistant/src/templates/instructions/system.tpl?raw":{"bytesInOutput":3424},"src/templates/index.ts":{"bytesInOutput":0}},"bytes":30926},"dist/lib/node-esm/extraction/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":17559},"dist/lib/node-esm/extraction/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-HSLMI22Q.mjs","kind":"import-statement"},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@xenova/transformers","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["ExtractionInput","ExtractionOutput","ReferencedQuotes","combineNerTokens","createTokenGroups","extractFullEntities","extractionAnthropicFunction","extractionNerFunction","findQuotes","getNer","insertReferences","processTranscriptMessage"],"entryPoint":"src/extraction/index.ts","inputs":{"src/extraction/extraction.ts":{"bytesInOutput":1365},"src/extraction/index.ts":{"bytesInOutput":0},"src/extraction/extraction-llm-function/extraction-llm-function.ts":{"bytesInOutput":455},"src/extraction/extraction-llm-function/index.ts":{"bytesInOutput":0},"src/extraction/extraction-ner-function/extraction-ner-function.ts":{"bytesInOutput":431},"src/extraction/extraction-ner-function/index.ts":{"bytesInOutput":0},"src/extraction/extraction-ner-function/named-entity-recognition.ts":{"bytesInOutput":2276},"src/extraction/quotes.ts":{"bytesInOutput":1660}},"bytes":6881},"dist/lib/node-esm/testing/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4758},"dist/lib/node-esm/testing/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-CC7ER6Q3.mjs","kind":"import-statement"},{"path":"dist/lib/node-esm/chunk-HSLMI22Q.mjs","kind":"import-statement"},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"effect/Match","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/ai/testing","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime/testing","kind":"import-statement","external":true}],"exports":["AssistantTestLayer","AssistantTestLayerWithTriggers"],"entryPoint":"src/testing/index.ts","inputs":{"src/testing/layer.ts":{"bytesInOutput":1660},"src/testing/index.ts":{"bytesInOutput":0}},"bytes":2051},"dist/lib/node-esm/chunk-CC7ER6Q3.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":50271},"dist/lib/node-esm/chunk-CC7ER6Q3.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-HSLMI22Q.mjs","kind":"import-statement"},{"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/types","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Function","kind":"import-statement","external":true},{"path":"effect/Option","kind":"import-statement","external":true},{"path":"@dxos/blueprints","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@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-db","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@effect/ai/Toolkit","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"effect/Pipeable","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-protocol","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@effect/ai/Tool","kind":"import-statement","external":true},{"path":"effect/Context","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"effect/Record","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true}],"exports":["AiAssistantError","AiModelError","AiSession","ArtifactDiffResolver","ArtifactId","GenerationObserver","GenericToolkit_exports","RefFromLLM","VersionPin","createArtifactElement","createToolkit","makeToolExecutionServiceFromFunctions","makeToolResolverFromFunctions"],"inputs":{"src/session/artifact-diff.ts":{"bytesInOutput":143},"src/session/observer.ts":{"bytesInOutput":917},"src/errors.ts":{"bytesInOutput":232},"src/session/session.ts":{"bytesInOutput":4582},"src/session/format.ts":{"bytesInOutput":3750},"src/session/toolkit.ts":{"bytesInOutput":693},"src/session/version-pin.ts":{"bytesInOutput":732},"src/session/GenericToolkit.ts":{"bytesInOutput":733},"src/session/index.ts":{"bytesInOutput":0},"src/types/artifact.ts":{"bytesInOutput":1921},"src/types/index.ts":{"bytesInOutput":0},"src/functions/services.ts":{"bytesInOutput":4541},"src/functions/index.ts":{"bytesInOutput":0}},"bytes":19029},"dist/lib/node-esm/chunk-HSLMI22Q.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/node-esm/chunk-HSLMI22Q.mjs":{"imports":[],"exports":["__export"],"inputs":{},"bytes":327}}}
@@ -0,0 +1,33 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+ import {
3
+ GenericToolkit_exports,
4
+ makeToolExecutionServiceFromFunctions,
5
+ makeToolResolverFromFunctions
6
+ } from "../chunk-CC7ER6Q3.mjs";
7
+ import "../chunk-HSLMI22Q.mjs";
8
+
9
+ // src/testing/layer.ts
10
+ import * as Layer from "effect/Layer";
11
+ import * as Match from "effect/Match";
12
+ import { AiService } from "@dxos/ai";
13
+ import { TestAiService } from "@dxos/ai/testing";
14
+ import { CredentialsService, TracingService } from "@dxos/functions";
15
+ import { TracingServiceExt, TriggerDispatcher, TriggerStateStore } from "@dxos/functions-runtime";
16
+ import { FunctionInvocationServiceLayerTest, TestDatabaseLayer } from "@dxos/functions-runtime/testing";
17
+ var AssistantTestLayer = ({ aiServicePreset = "direct", model = "@anthropic/claude-opus-4-0", functions = [], toolkits = [], types = [], credentials = [], tracing = "noop" }) => Layer.mergeAll(AiService.model(model), makeToolResolverFromFunctions(functions, GenericToolkit_exports.merge(...toolkits).toolkit), makeToolExecutionServiceFromFunctions(GenericToolkit_exports.merge(...toolkits).toolkit, GenericToolkit_exports.merge(...toolkits).layer)).pipe(Layer.provideMerge(FunctionInvocationServiceLayerTest({
18
+ functions
19
+ })), Layer.provideMerge(Layer.mergeAll(TestAiService({
20
+ preset: aiServicePreset
21
+ }), TestDatabaseLayer({
22
+ spaceKey: "fixed",
23
+ types
24
+ }), CredentialsService.configuredLayer(credentials), Match.value(tracing).pipe(Match.when("noop", () => TracingService.layerNoop), Match.when("console", () => TracingServiceExt.layerLogInfo()), Match.when("pretty", () => TracingServiceExt.layerConsolePrettyPrint()), Match.exhaustive))));
25
+ var AssistantTestLayerWithTriggers = (options) => Layer.mergeAll(AssistantTestLayer(options), TriggerDispatcher.layer({
26
+ timeControl: "manual",
27
+ startingTime: /* @__PURE__ */ new Date("2025-09-05T15:01:00.000Z")
28
+ })).pipe(Layer.provideMerge(TriggerStateStore.layerMemory));
29
+ export {
30
+ AssistantTestLayer,
31
+ AssistantTestLayerWithTriggers
32
+ };
33
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/testing/layer.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Layer from 'effect/Layer';\nimport * as Match from 'effect/Match';\n\nimport { AiService, type ModelName } from '@dxos/ai';\nimport { TestAiService } from '@dxos/ai/testing';\nimport type { Type } from '@dxos/echo';\nimport { CredentialsService, type FunctionDefinition, type ServiceCredential, TracingService } from '@dxos/functions';\nimport { TracingServiceExt, TriggerDispatcher, TriggerStateStore } from '@dxos/functions-runtime';\nimport { FunctionInvocationServiceLayerTest, TestDatabaseLayer } from '@dxos/functions-runtime/testing';\n\nimport { makeToolExecutionServiceFromFunctions, makeToolResolverFromFunctions } from '../functions';\nimport { GenericToolkit } from '../session';\n\ninterface TestLayerOptions {\n aiServicePreset?: 'direct' | 'edge-local' | 'edge-remote';\n model?: ModelName;\n functions?: FunctionDefinition.Any[];\n toolkits?: GenericToolkit.GenericToolkit[];\n types?: Type.Entity.Any[];\n credentials?: ServiceCredential[];\n /*\n * Tracing configuration.\n * @default 'noop'\n */\n tracing?: 'noop' | 'console' | 'pretty';\n}\n\nexport const AssistantTestLayer = ({\n aiServicePreset = 'direct',\n model = '@anthropic/claude-opus-4-0',\n functions = [],\n toolkits = [],\n types = [],\n credentials = [],\n tracing = 'noop',\n}: TestLayerOptions) =>\n Layer.mergeAll(\n AiService.model(model),\n makeToolResolverFromFunctions(functions, GenericToolkit.merge(...toolkits).toolkit as any),\n makeToolExecutionServiceFromFunctions(\n GenericToolkit.merge(...toolkits).toolkit as any,\n GenericToolkit.merge(...toolkits).layer as any,\n ),\n ).pipe(\n Layer.provideMerge(\n FunctionInvocationServiceLayerTest({\n functions,\n }),\n ),\n Layer.provideMerge(\n Layer.mergeAll(\n TestAiService({ preset: aiServicePreset }),\n TestDatabaseLayer({\n spaceKey: 'fixed',\n types,\n }),\n CredentialsService.configuredLayer(credentials),\n Match.value(tracing).pipe(\n Match.when('noop', () => TracingService.layerNoop),\n Match.when('console', () => TracingServiceExt.layerLogInfo()),\n Match.when('pretty', () => TracingServiceExt.layerConsolePrettyPrint()),\n Match.exhaustive,\n ),\n ),\n ),\n );\n\ninterface TestLayerWithTriggersOptions extends TestLayerOptions {}\n\nexport const AssistantTestLayerWithTriggers = (options: TestLayerWithTriggersOptions) =>\n Layer.mergeAll(\n AssistantTestLayer(options),\n TriggerDispatcher.layer({ timeControl: 'manual', startingTime: new Date('2025-09-05T15:01:00.000Z') }),\n ).pipe(Layer.provideMerge(TriggerStateStore.layerMemory));\n"],
5
+ "mappings": ";;;;;;;;;AAIA,YAAYA,WAAW;AACvB,YAAYC,WAAW;AAEvB,SAASC,iBAAiC;AAC1C,SAASC,qBAAqB;AAE9B,SAASC,oBAAqEC,sBAAsB;AACpG,SAASC,mBAAmBC,mBAAmBC,yBAAyB;AACxE,SAASC,oCAAoCC,yBAAyB;AAmB/D,IAAMC,qBAAqB,CAAC,EACjCC,kBAAkB,UAClBC,QAAQ,8BACRC,YAAY,CAAA,GACZC,WAAW,CAAA,GACXC,QAAQ,CAAA,GACRC,cAAc,CAAA,GACdC,UAAU,OAAM,MAEVC,eACJC,UAAUP,MAAMA,KAAAA,GAChBQ,8BAA8BP,WAAWQ,uBAAeC,MAAK,GAAIR,QAAAA,EAAUS,OAAO,GAClFC,sCACEH,uBAAeC,MAAK,GAAIR,QAAAA,EAAUS,SAClCF,uBAAeC,MAAK,GAAIR,QAAAA,EAAUW,KAAK,CAAA,EAEzCC,KACMC,mBACJC,mCAAmC;EACjCf;AACF,CAAA,CAAA,GAEIc,mBACET,eACJW,cAAc;EAAEC,QAAQnB;AAAgB,CAAA,GACxCoB,kBAAkB;EAChBC,UAAU;EACVjB;AACF,CAAA,GACAkB,mBAAmBC,gBAAgBlB,WAAAA,GAC7BmB,YAAMlB,OAAAA,EAASS,KACbU,WAAK,QAAQ,MAAMC,eAAeC,SAAS,GAC3CF,WAAK,WAAW,MAAMG,kBAAkBC,aAAY,CAAA,GACpDJ,WAAK,UAAU,MAAMG,kBAAkBE,wBAAuB,CAAA,GAC9DC,gBAAU,CAAA,CAAA,CAAA;AAQnB,IAAMC,iCAAiC,CAACC,YACvC1B,eACJR,mBAAmBkC,OAAAA,GACnBC,kBAAkBpB,MAAM;EAAEqB,aAAa;EAAUC,cAAc,oBAAIC,KAAK,0BAAA;AAA4B,CAAA,CAAA,EACpGtB,KAAWC,mBAAasB,kBAAkBC,WAAW,CAAA;",
6
+ "names": ["Layer", "Match", "AiService", "TestAiService", "CredentialsService", "TracingService", "TracingServiceExt", "TriggerDispatcher", "TriggerStateStore", "FunctionInvocationServiceLayerTest", "TestDatabaseLayer", "AssistantTestLayer", "aiServicePreset", "model", "functions", "toolkits", "types", "credentials", "tracing", "mergeAll", "AiService", "makeToolResolverFromFunctions", "GenericToolkit", "merge", "toolkit", "makeToolExecutionServiceFromFunctions", "layer", "pipe", "provideMerge", "FunctionInvocationServiceLayerTest", "TestAiService", "preset", "TestDatabaseLayer", "spaceKey", "CredentialsService", "configuredLayer", "value", "when", "TracingService", "layerNoop", "TracingServiceExt", "layerLogInfo", "layerConsolePrettyPrint", "exhaustive", "AssistantTestLayerWithTriggers", "options", "TriggerDispatcher", "timeControl", "startingTime", "Date", "TriggerStateStore", "layerMemory"]
7
+ }
@@ -1,92 +1,124 @@
1
- import { type ReadonlySignal } from '@preact/signals-core';
1
+ import { Atom, Registry } from '@effect-atom/atom-react';
2
2
  import * as Context from 'effect/Context';
3
3
  import * as Schema from 'effect/Schema';
4
4
  import { Blueprint } from '@dxos/blueprints';
5
5
  import { Resource } from '@dxos/context';
6
- import { DXN, type Entity, Obj, type Ref, Type } from '@dxos/echo';
6
+ import { DXN, Obj, type Ref, Type } from '@dxos/echo';
7
7
  import { type Queue } from '@dxos/echo-db';
8
8
  import { ComplexSet } from '@dxos/util';
9
9
  /**
10
10
  * Thread message that binds or unbinds contextual objects to a conversation.
11
11
  */
12
- export declare const ContextBinding: Type.obj<Schema.Struct<{
13
- blueprints: Schema.Struct<{
14
- added: Schema.Array$<import("@dxos/echo/internal").RefSchema<Entity.OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
15
- key: string;
16
- name: string;
17
- description?: string | undefined;
18
- instructions: {
19
- source: import("@dxos/echo/internal").Ref<Entity.OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
20
- content: string;
12
+ export declare const ContextBinding: Type.Obj<{
13
+ readonly blueprints: {
14
+ readonly added: readonly import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
15
+ readonly description?: string | undefined;
16
+ readonly name: string;
17
+ readonly key: string;
18
+ readonly instructions: {
19
+ source: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
20
+ readonly content: string;
21
21
  }>;
22
22
  inputs?: {
23
+ function?: string | undefined;
23
24
  name: string;
24
25
  kind?: "function" | "value" | "pass-through" | "retriever" | "query" | "resolver" | "context" | "schema" | undefined;
25
26
  default?: any;
26
27
  }[] | undefined;
27
28
  };
28
- tools: (string & import("effect/Brand").Brand<"ToolId">)[];
29
- }>>;
30
- removed: Schema.Array$<import("@dxos/echo/internal").RefSchema<Entity.OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
31
- key: string;
32
- name: string;
33
- description?: string | undefined;
34
- instructions: {
35
- source: import("@dxos/echo/internal").Ref<Entity.OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
36
- content: string;
29
+ readonly tools: readonly (string & import("effect/Brand").Brand<"ToolId">)[];
30
+ }>[];
31
+ readonly removed: readonly import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
32
+ readonly description?: string | undefined;
33
+ readonly name: string;
34
+ readonly key: string;
35
+ readonly instructions: {
36
+ source: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
37
+ readonly content: string;
37
38
  }>;
38
39
  inputs?: {
40
+ function?: string | undefined;
39
41
  name: string;
40
42
  kind?: "function" | "value" | "pass-through" | "retriever" | "query" | "resolver" | "context" | "schema" | undefined;
41
43
  default?: any;
42
44
  }[] | undefined;
43
45
  };
44
- tools: (string & import("effect/Brand").Brand<"ToolId">)[];
45
- }>>;
46
- }>;
47
- objects: Schema.Struct<{
48
- added: Schema.Array$<import("@dxos/echo/internal").RefSchema<Entity.OfKind<import("@dxos/echo/internal").EntityKind.Object> & {}>>;
49
- removed: Schema.Array$<import("@dxos/echo/internal").RefSchema<Entity.OfKind<import("@dxos/echo/internal").EntityKind.Object> & {}>>;
50
- }>;
51
- }>>;
46
+ readonly tools: readonly (string & import("effect/Brand").Brand<"ToolId">)[];
47
+ }>[];
48
+ };
49
+ readonly objects: {
50
+ readonly added: readonly import("@dxos/echo/internal").Ref<any>[];
51
+ readonly removed: readonly import("@dxos/echo/internal").Ref<any>[];
52
+ };
53
+ }, Schema.Struct.Fields>;
52
54
  export interface ContextBinding extends Schema.Schema.Type<typeof ContextBinding> {
53
55
  }
54
56
  export type BindingProps = Partial<{
55
57
  blueprints: Ref.Ref<Blueprint.Blueprint>[];
56
- objects: Ref.Ref<Obj.Any>[];
58
+ objects: Ref.Ref<Obj.Unknown>[];
57
59
  }>;
58
60
  export declare class Bindings {
59
61
  readonly blueprints: ComplexSet<Ref.Ref<Blueprint.Blueprint>>;
60
- readonly objects: ComplexSet<Ref.Ref<Obj.Any>>;
62
+ readonly objects: ComplexSet<Ref.Ref<Obj.Unknown>>;
61
63
  toJSON(): {
62
64
  blueprints: DXN.String[];
63
65
  objects: DXN.String[];
64
66
  };
65
67
  }
68
+ export type AiContextBinderOptions = {
69
+ queue: Queue;
70
+ registry?: Registry.Registry;
71
+ };
66
72
  /**
67
73
  * Manages bindings of blueprints and objects to a conversation.
68
74
  */
69
75
  export declare class AiContextBinder extends Resource {
76
+ private readonly _blueprints;
77
+ private readonly _objects;
78
+ private readonly _registry;
70
79
  private readonly _queue;
80
+ constructor(options: AiContextBinderOptions);
81
+ /**
82
+ * Returns the blueprints atom for subscription.
83
+ */
84
+ get blueprints(): Atom.Atom<Blueprint.Blueprint[]>;
85
+ /**
86
+ * Returns the objects atom for subscription.
87
+ */
88
+ get objects(): Atom.Atom<Obj.Unknown[]>;
89
+ /**
90
+ * Gets the current blueprints value.
91
+ */
92
+ getBlueprints(): Blueprint.Blueprint[];
71
93
  /**
72
- * Reactive query of all bindings.
94
+ * Gets the current objects value.
73
95
  */
74
- private _bindings?;
75
- private _blueprints?;
76
- private _objects?;
77
- constructor(_queue: Queue);
78
- get bindings(): ReadonlySignal<Bindings>;
79
- get blueprints(): ReadonlySignal<Ref.Ref<Blueprint.Blueprint>[]>;
80
- get objects(): ReadonlySignal<Ref.Ref<Obj.Any>[]>;
96
+ getObjects(): Obj.Unknown[];
97
+ /**
98
+ * Subscribe to changes in blueprints.
99
+ */
100
+ subscribeBlueprints(cb: (blueprints: Blueprint.Blueprint[]) => void): () => void;
101
+ /**
102
+ * Subscribe to changes in objects.
103
+ */
104
+ subscribeObjects(cb: (objects: Obj.Unknown[]) => void): () => void;
81
105
  protected _open(): Promise<void>;
106
+ private _updateBindings;
82
107
  protected _close(): Promise<void>;
108
+ bind({ blueprints, objects }: BindingProps): Promise<void>;
109
+ unbind({ blueprints, objects }: BindingProps): Promise<void>;
83
110
  /**
84
- * Asynchronous query of all bindings.
111
+ * Process bindings to filter duplicates and determine next state.
112
+ */
113
+ private _processBindings;
114
+ /**
115
+ * Reduce results into sets of blueprints and objects.
85
116
  */
86
- query(): Promise<Bindings>;
87
- bind(props: BindingProps): Promise<void>;
88
- unbind(props: BindingProps): Promise<void>;
89
117
  private _reduce;
118
+ /**
119
+ * Resolve references to objects, loading them first if needed and falling back to existing objects.
120
+ */
121
+ private _resolve;
90
122
  }
91
123
  declare const AiContextService_base: Context.TagClass<AiContextService, "@dxos/assistant/AiContextService", {
92
124
  binder: AiContextBinder;
@@ -1 +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,EAAE,KAAK,MAAM,EAAU,GAAG,EAAS,KAAK,GAAG,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClF,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC;;GAEG;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAe1B,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,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;CAC7B,CAAC,CAAC;AAEH,qBAAa,QAAQ;IACnB,QAAQ,CAAC,UAAU,2CAA6E;IAEhG,QAAQ,CAAC,OAAO,+BAA0E;IAE1F,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,CAAqC;gBAEzB,MAAM,EAAE,KAAK;IAI1C,IAAI,QAAQ,6BAGX;IAED,IAAI,UAAU,mDAGb;IAED,IAAI,OAAO,uCAGV;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
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/conversation/context.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAEzD,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,EAAE,GAAG,EAAS,KAAK,GAAG,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,UAAU,EAAY,MAAM,YAAY,CAAC;AAElD;;GAEG;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;sBAER,CAAC;4BAAwB,CAAC;;wBACQ,CAAC;2BAMpD,CAAC;;;;;;;;;;;;;sBAPgB,CAAC;4BAAwB,CAAC;;wBACQ,CAAC;2BAMpD,CAAC;;;;;;;;;;wBAMF,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,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;CACjC,CAAC,CAAC;AAEH,qBAAa,QAAQ;IACnB,QAAQ,CAAC,UAAU,2CAA6E;IAGhG,QAAQ,CAAC,OAAO,mCAA8E;IAE9F,MAAM;;;;CAMP;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC;CAC9B,CAAC;AAEF;;GAEG;AAEH,qBAAa,eAAgB,SAAQ,QAAQ;IAC3C,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA6D;IACzF,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqD;IAC9E,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAoB;IAC9C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAQ;gBAEnB,OAAO,EAAE,sBAAsB;IAM3C;;OAEG;IACH,IAAI,UAAU,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC,CAEjD;IAED;;OAEG;IACH,IAAI,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,CAEtC;IAED;;OAEG;IACH,aAAa,IAAI,SAAS,CAAC,SAAS,EAAE;IAItC;;OAEG;IACH,UAAU,IAAI,GAAG,CAAC,OAAO,EAAE;IAI3B;;OAEG;IACH,mBAAmB,CAAC,EAAE,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC,SAAS,EAAE,KAAK,IAAI,GAAG,MAAM,IAAI;IAIhF;;OAEG;IACH,gBAAgB,CAAC,EAAE,EAAE,CAAC,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,KAAK,IAAI,GAAG,MAAM,IAAI;cAIzC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;YAejC,eAAe;cAwBJ,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAM1C,IAAI,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IA6B1D,MAAM,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAoBlE;;OAEG;IACH,OAAO,CAAC,gBAAgB;IA8BxB;;OAEG;IACH,OAAO,CAAC,OAAO;IAqBf;;OAEG;YACW,QAAQ;CAmBvB;;YAKW,eAAe;;AAH3B,qBAAa,gBAAiB,SAAQ,qBAKnC;CAAG"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=context.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.test.d.ts","sourceRoot":"","sources":["../../../../src/conversation/context.test.ts"],"names":[],"mappings":""}
@@ -1,41 +1,41 @@
1
1
  import type * as Toolkit from '@effect/ai/Toolkit';
2
+ import type { Registry } from '@effect-atom/atom-react';
2
3
  import * as Effect from 'effect/Effect';
3
4
  import { Resource } from '@dxos/context';
4
5
  import { type Queue } from '@dxos/echo-db';
5
6
  import { Message } from '@dxos/types';
6
7
  import { type AiSessionRunError, type AiSessionRunRequirements, type GenerationObserver } from '../session';
7
8
  import { AiContextBinder, type ContextBinding } from './context';
8
- export interface AiConversationRunParams {
9
+ export interface AiConversationRunProps {
9
10
  prompt: string;
10
11
  system?: string;
11
12
  observer?: GenerationObserver;
12
13
  }
14
+ export type AiConversationOptions = {
15
+ queue: Queue<Message.Message | ContextBinding>;
16
+ toolkit?: Toolkit.Any;
17
+ registry?: Registry.Registry;
18
+ };
13
19
  /**
14
20
  * Durable conversation state (initiated by users and agents) backed by a Queue.
15
21
  * Executes tools based on AI responses and supports cancellation of in-progress requests.
16
22
  */
17
23
  export declare class AiConversation extends Resource {
18
24
  /**
19
- * Message and binding queue.
25
+ * Blueprints and objects bound to the conversation.
20
26
  */
27
+ private readonly _binder;
21
28
  private readonly _queue;
22
- /**
23
- * Blueprints bound to the conversation.
24
- */
25
- private readonly _context;
26
- /**
27
- * Toolkit from the current session request.
28
- */
29
- private _toolkit;
30
- constructor(queue: Queue<Message.Message | ContextBinding>);
29
+ private readonly _toolkit?;
30
+ constructor(options: AiConversationOptions);
31
31
  protected _open(): Promise<void>;
32
- protected _close(): Promise<void>;
32
+ get queue(): Queue<Message.Message | ContextBinding>;
33
33
  get context(): AiContextBinder;
34
- get toolkit(): Toolkit.WithHandler<any> | undefined;
34
+ get toolkit(): Toolkit.Any | undefined;
35
35
  getHistory(): Promise<Message.Message[]>;
36
36
  /**
37
37
  * Creates a new cancelable request effect.
38
38
  */
39
- createRequest(params: AiConversationRunParams): Effect.Effect<Message.Message[], AiSessionRunError, AiSessionRunRequirements>;
39
+ createRequest(params: AiConversationRunProps): Effect.Effect<Message.Message[], AiSessionRunError, AiSessionRunRequirements>;
40
40
  }
41
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,KAAK,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAEnD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,eAAe,CAAC;AAG3C,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EAExB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,eAAe,EAAoB,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AAEnF,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,kBAAkB,CAAC;CAC/B;AAED;;;GAGG;AACH,qBAAa,cAAe,SAAQ,QAAQ;IAC1C;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA0C;IAEjE;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAkB;IAE3C;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAuC;gBAEpC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,OAAO,GAAG,cAAc,CAAC;cAMxC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;cAKtB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAIhD,IAAW,OAAO,oBAEjB;IAED,IAAW,OAAO,yCAEjB;IAEY,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;IAKrD;;OAEG;IACH,aAAa,CACX,MAAM,EAAE,uBAAuB,GAC9B,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,iBAAiB,EAAE,wBAAwB,CAAC;CA0CjF"}
1
+ {"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../../../src/conversation/conversation.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,OAAO,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,eAAe,CAAC;AAG3C,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EAExB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,eAAe,EAAoB,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AAEnF,MAAM,WAAW,sBAAsB;IACrC,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,OAAO,CAAC,OAAO,GAAG,cAAc,CAAC,CAAC;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC;IACtB,QAAQ,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC;CAC9B,CAAC;AAEF;;;GAGG;AACH,qBAAa,cAAe,SAAQ,QAAQ;IAC1C;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAkB;IAC1C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA0C;IACjE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAc;gBAErB,OAAO,EAAE,qBAAqB;cAQxB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAI/C,IAAW,KAAK,4CAEf;IAED,IAAW,OAAO,oBAEjB;IAED,IAAW,OAAO,4BAEjB;IAEY,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;IAKrD;;OAEG;IACI,aAAa,CAClB,MAAM,EAAE,sBAAsB,GAC7B,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,iBAAiB,EAAE,wBAAwB,CAAC;CAyCjF"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=conversation.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation.test.d.ts","sourceRoot":"","sources":["../../../../src/conversation/conversation.test.ts"],"names":[],"mappings":""}
@@ -1,28 +1,26 @@
1
1
  import { BaseError } from '@dxos/errors';
2
2
  declare const AiModelError_base: {
3
3
  new (options?: import("@dxos/errors").BaseErrorOptions): {
4
- code: "AI_MODEL_ERROR";
4
+ name: "AiModelError";
5
5
  context: Record<string, unknown>;
6
- readonly name: "AI_MODEL_ERROR";
7
6
  readonly message: string;
8
- readonly _tag: "AI_MODEL_ERROR";
7
+ readonly _tag: "AiModelError";
9
8
  stack?: string;
10
9
  cause?: unknown;
11
10
  };
12
- code: "AI_MODEL_ERROR";
11
+ name: "AiModelError";
13
12
  is(error: unknown): error is BaseError;
14
13
  wrap(options?: Omit<import("@dxos/errors").BaseErrorOptions, "cause"> & {
15
14
  ifTypeDiffers?: boolean;
16
15
  }): (error: unknown) => {
17
- code: "AI_MODEL_ERROR";
16
+ name: "AiModelError";
18
17
  context: Record<string, unknown>;
19
- readonly name: "AI_MODEL_ERROR";
20
18
  readonly message: string;
21
- readonly _tag: "AI_MODEL_ERROR";
19
+ readonly _tag: "AiModelError";
22
20
  stack?: string;
23
21
  cause?: unknown;
24
22
  };
25
- extend<Code extends string = string>(code: Code, message?: string): any;
23
+ extend<Name extends string = string>(name: Name, message?: string): any;
26
24
  isError(error: unknown): error is Error;
27
25
  captureStackTrace(targetObject: object, constructorOpt?: Function): void;
28
26
  prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
@@ -35,28 +33,26 @@ export declare class AiModelError extends AiModelError_base {
35
33
  }
36
34
  declare const AiAssistantError_base: {
37
35
  new (options?: import("@dxos/errors").BaseErrorOptions): {
38
- code: "AI_ASSISTANT_ERROR";
36
+ name: "AiAssistantError";
39
37
  context: Record<string, unknown>;
40
- readonly name: "AI_ASSISTANT_ERROR";
41
38
  readonly message: string;
42
- readonly _tag: "AI_ASSISTANT_ERROR";
39
+ readonly _tag: "AiAssistantError";
43
40
  stack?: string;
44
41
  cause?: unknown;
45
42
  };
46
- code: "AI_ASSISTANT_ERROR";
43
+ name: "AiAssistantError";
47
44
  is(error: unknown): error is BaseError;
48
45
  wrap(options?: Omit<import("@dxos/errors").BaseErrorOptions, "cause"> & {
49
46
  ifTypeDiffers?: boolean;
50
47
  }): (error: unknown) => {
51
- code: "AI_ASSISTANT_ERROR";
48
+ name: "AiAssistantError";
52
49
  context: Record<string, unknown>;
53
- readonly name: "AI_ASSISTANT_ERROR";
54
50
  readonly message: string;
55
- readonly _tag: "AI_ASSISTANT_ERROR";
51
+ readonly _tag: "AiAssistantError";
56
52
  stack?: string;
57
53
  cause?: unknown;
58
54
  };
59
- extend<Code extends string = string>(code: Code, message?: string): any;
55
+ extend<Name extends string = string>(name: Name, message?: string): any;
60
56
  isError(error: unknown): error is Error;
61
57
  captureStackTrace(targetObject: object, constructorOpt?: Function): void;
62
58
  prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/errors.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;;;;;;;;;;;;;;qBAWivB,CAAC;;;;;;;;;;;;;;;;AAT3xB;;GAEG;AACH,qBAAa,YAAa,SAAQ,iBAAoD;CAAG;;;;;;;;;;;;;;qBAMisB,CAAC;;;;;;;;;;;;;;;;AAJ3xB;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,qBAA4D;CAAG"}
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/errors.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;;;;;;;;;;;;;qBAWutB,CAAC;;;;;;;;;;;;;;;AATjwB;;GAEG;AACH,qBAAa,YAAa,SAAQ,iBAAkD;CAAG;;;;;;;;;;;;;qBAMyqB,CAAC;;;;;;;;;;;;;;;AAJjwB;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,qBAA0D;CAAG"}