@dxos/assistant 0.8.4-main.f9ba587 → 0.8.4-main.fd6878d
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.
- package/dist/lib/browser/chunk-6WRGDEMH.mjs +89 -0
- package/dist/lib/browser/chunk-6WRGDEMH.mjs.map +7 -0
- package/dist/lib/browser/chunk-NZGGCEF3.mjs +341 -0
- package/dist/lib/browser/chunk-NZGGCEF3.mjs.map +7 -0
- package/dist/lib/browser/extraction/index.mjs +269 -0
- package/dist/lib/browser/extraction/index.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +240 -1905
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/named-entity-recognition-O46UTCLR.mjs +13 -0
- package/dist/lib/browser/named-entity-recognition-O46UTCLR.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-3UU5V4FS.mjs +91 -0
- package/dist/lib/node-esm/chunk-3UU5V4FS.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-XOOPGSGW.mjs +343 -0
- package/dist/lib/node-esm/chunk-XOOPGSGW.mjs.map +7 -0
- package/dist/lib/node-esm/extraction/index.mjs +270 -0
- package/dist/lib/node-esm/extraction/index.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +240 -1906
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/named-entity-recognition-W4VMRCH6.mjs +14 -0
- package/dist/lib/node-esm/named-entity-recognition-W4VMRCH6.mjs.map +7 -0
- package/dist/types/src/conversation/context.d.ts +90 -0
- package/dist/types/src/conversation/context.d.ts.map +1 -0
- package/dist/types/src/conversation/conversation.d.ts +31 -25
- package/dist/types/src/conversation/conversation.d.ts.map +1 -1
- package/dist/types/src/conversation/index.d.ts +1 -0
- package/dist/types/src/conversation/index.d.ts.map +1 -1
- package/dist/types/src/errors.d.ts +39 -0
- package/dist/types/src/errors.d.ts.map +1 -0
- package/dist/types/src/extraction/extraction-llm-function/extraction-llm-function.d.ts.map +1 -1
- package/dist/types/src/extraction/extraction-ner-function/extraction-ner-function.d.ts +143 -45
- package/dist/types/src/extraction/extraction-ner-function/extraction-ner-function.d.ts.map +1 -1
- package/dist/types/src/extraction/extraction-ner-function/named-entity-recognition.d.ts +1 -1
- package/dist/types/src/extraction/extraction-ner-function/named-entity-recognition.d.ts.map +1 -1
- package/dist/types/src/extraction/extraction.d.ts +106 -44
- package/dist/types/src/extraction/extraction.d.ts.map +1 -1
- package/dist/types/src/functions/index.d.ts +2 -0
- package/dist/types/src/functions/index.d.ts.map +1 -0
- package/dist/types/src/functions/services.d.ts +7 -0
- package/dist/types/src/functions/services.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +3 -5
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/session/artifact-diff.d.ts +27 -0
- package/dist/types/src/session/artifact-diff.d.ts.map +1 -0
- package/dist/types/src/session/format.d.ts +168 -0
- package/dist/types/src/session/format.d.ts.map +1 -0
- package/dist/types/src/session/format.test.d.ts +2 -0
- package/dist/types/src/session/format.test.d.ts.map +1 -0
- package/dist/types/src/session/index.d.ts +1 -0
- package/dist/types/src/session/index.d.ts.map +1 -1
- package/dist/types/src/session/session.d.ts +123 -239
- package/dist/types/src/session/session.d.ts.map +1 -1
- package/dist/types/src/session/version-pin.d.ts +4 -4
- package/dist/types/src/session/version-pin.d.ts.map +1 -1
- package/dist/types/src/templates/index.d.ts +2 -0
- package/dist/types/src/templates/index.d.ts.map +1 -0
- package/dist/types/src/templates/system.d.ts +22 -0
- package/dist/types/src/templates/system.d.ts.map +1 -0
- package/dist/types/src/types.d.ts +13 -0
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +46 -22
- package/src/{context/binder.ts → conversation/context.ts} +51 -19
- package/src/conversation/conversation.ts +90 -68
- package/src/conversation/index.ts +1 -0
- package/src/errors.ts +10 -0
- package/src/extraction/extraction-llm-function/extraction-llm-function.test.ts +7 -18
- package/src/extraction/extraction-llm-function/extraction-llm-function.ts +22 -17
- package/src/extraction/extraction-ner-function/extraction-ner-function.test.ts +4 -3
- package/src/extraction/extraction-ner-function/extraction-ner-function.ts +7 -4
- package/src/extraction/extraction-ner-function/named-entity-recognition.test.ts +2 -2
- package/src/extraction/extraction-ner-function/named-entity-recognition.ts +1 -1
- package/src/extraction/quotes.test.ts +1 -1
- package/src/extraction/quotes.ts +1 -1
- package/src/functions/index.ts +5 -0
- package/src/functions/services.ts +114 -0
- package/src/index.ts +3 -5
- package/src/session/__snapshots__/session.test.ts.snap +32 -0
- package/src/session/artifact-diff.ts +37 -0
- package/src/session/format.test.ts +60 -0
- package/src/session/format.ts +139 -0
- package/src/session/index.ts +1 -0
- package/src/session/session.test.ts +87 -57
- package/src/session/session.ts +220 -523
- package/src/session/version-pin.test.ts +2 -21
- package/src/session/version-pin.ts +9 -9
- package/src/summarization/summarization.test.ts +82 -106
- package/src/templates/format.tpl +55 -0
- package/src/templates/index.ts +5 -0
- package/src/templates/system.tpl +47 -0
- package/src/templates/system.ts +32 -0
- package/src/types.ts +45 -1
- package/src/typings.d.ts +5 -0
- package/dist/types/bin/chat.d.ts +0 -2
- package/dist/types/bin/chat.d.ts.map +0 -1
- package/dist/types/src/blueprint/blueprint.d.ts +0 -41
- package/dist/types/src/blueprint/blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprint/index.d.ts +0 -3
- package/dist/types/src/blueprint/index.d.ts.map +0 -1
- package/dist/types/src/blueprint/registry.d.ts +0 -7
- package/dist/types/src/blueprint/registry.d.ts.map +0 -1
- package/dist/types/src/context/binder.d.ts +0 -34
- package/dist/types/src/context/binder.d.ts.map +0 -1
- package/dist/types/src/context/binding.d.ts +0 -38
- package/dist/types/src/context/binding.d.ts.map +0 -1
- package/dist/types/src/context/index.d.ts +0 -3
- package/dist/types/src/context/index.d.ts.map +0 -1
- package/dist/types/src/research/exa.d.ts +0 -7
- package/dist/types/src/research/exa.d.ts.map +0 -1
- package/dist/types/src/research/graph.d.ts +0 -41
- package/dist/types/src/research/graph.d.ts.map +0 -1
- package/dist/types/src/research/graph.test.d.ts +0 -2
- package/dist/types/src/research/graph.test.d.ts.map +0 -1
- package/dist/types/src/research/index.d.ts +0 -4
- package/dist/types/src/research/index.d.ts.map +0 -1
- package/dist/types/src/research/research.d.ts +0 -10
- package/dist/types/src/research/research.d.ts.map +0 -1
- package/dist/types/src/research/research.test.d.ts +0 -2
- package/dist/types/src/research/research.test.d.ts.map +0 -1
- package/dist/types/src/testing/exa-search-1748337321991.d.ts +0 -38
- package/dist/types/src/testing/exa-search-1748337321991.d.ts.map +0 -1
- package/dist/types/src/testing/exa-search-1748337331526.d.ts +0 -37
- package/dist/types/src/testing/exa-search-1748337331526.d.ts.map +0 -1
- package/dist/types/src/testing/exa-search-1748337344119.d.ts +0 -58
- package/dist/types/src/testing/exa-search-1748337344119.d.ts.map +0 -1
- package/dist/types/src/testing/index.d.ts +0 -3
- package/dist/types/src/testing/index.d.ts.map +0 -1
- package/src/blueprint/blueprint.ts +0 -75
- package/src/blueprint/index.ts +0 -6
- package/src/blueprint/registry.ts +0 -15
- package/src/context/binding.ts +0 -31
- package/src/context/index.ts +0 -6
- package/src/research/exa.ts +0 -100
- package/src/research/graph.test.ts +0 -15
- package/src/research/graph.ts +0 -337
- package/src/research/index.ts +0 -7
- package/src/research/instructions-research.tpl +0 -97
- package/src/research/research.test.ts +0 -190
- package/src/research/research.ts +0 -90
- package/src/testing/exa-search-1748337321991.ts +0 -131
- package/src/testing/exa-search-1748337331526.ts +0 -144
- package/src/testing/exa-search-1748337344119.ts +0 -133
- package/src/testing/index.ts +0 -11
- 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":13488,"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":2594,"imports":[{"path":"effect","kind":"import-statement","external":true}],"format":"esm"},"src/errors.ts":{"bytes":939,"imports":[{"path":"@dxos/errors","kind":"import-statement","external":true}],"format":"esm"},"src/session/format.ts":{"bytes":16522,"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":32915,"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/log","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/session/format.ts","kind":"import-statement","original":"./format"}],"format":"esm"},"src/session/version-pin.ts":{"bytes":4194,"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":657,"imports":[{"path":"src/session/artifact-diff.ts","kind":"import-statement","original":"./artifact-diff"},{"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":11539,"imports":[{"path":"effect","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/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/functions/services.ts":{"bytes":14283,"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/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:./format.tpl?raw":{"bytes":1808,"imports":[]},"raw-loader:./system.tpl?raw":{"bytes":3227,"imports":[]},"src/templates/system.ts":{"bytes":2283,"imports":[{"path":"@dxos/blueprints","kind":"import-statement","external":true},{"path":"raw-loader:./format.tpl?raw","kind":"import-statement","original":"./format.tpl?raw"},{"path":"raw-loader:./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":894,"imports":[{"path":"src/conversation/index.ts","kind":"import-statement","original":"./conversation"},{"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"},{"path":"src/errors.ts","kind":"import-statement","original":"./errors"}],"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:./instructions.tpl?raw":{"bytes":1318,"imports":[]},"src/extraction/extraction-llm-function/extraction-llm-function.ts":{"bytes":8710,"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:./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":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":9083,"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":30109},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-XOOPGSGW.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/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/schema","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/functions","kind":"import-statement","external":true},{"path":"@dxos/invariant","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","AiConversation","AiSession","ArtifactDiffResolver","ArtifactId","Bindings","ContextBinding","GenerationObserver","VersionPin","createArtifactElement","createSystemPrompt","makeToolExecutionServiceFromFunctions","makeToolResolverFromFunctions","templates"],"entryPoint":"src/index.ts","inputs":{"src/conversation/context.ts":{"bytesInOutput":2996},"src/conversation/index.ts":{"bytesInOutput":0},"src/conversation/conversation.ts":{"bytesInOutput":2477},"src/index.ts":{"bytesInOutput":0},"src/functions/services.ts":{"bytesInOutput":3281},"src/functions/index.ts":{"bytesInOutput":0},"src/templates/system.ts":{"bytesInOutput":234},"raw-loader:./format.tpl?raw":{"bytesInOutput":1888},"raw-loader:./system.tpl?raw":{"bytesInOutput":3299},"src/templates/index.ts":{"bytesInOutput":0},"src/types.ts":{"bytesInOutput":1321}},"bytes":16310},"dist/lib/node-esm/extraction/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":17086},"dist/lib/node-esm/extraction/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-XOOPGSGW.mjs","kind":"import-statement"},{"path":"dist/lib/node-esm/chunk-3UU5V4FS.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-W4VMRCH6.mjs","kind":"dynamic-import"}],"exports":["ExtractionInput","ExtractionOutput","ReferencedQuotes","combineNerTokens","createTokenGroups","extractFullEntities","extractionAnthropicFn","extractionNerFn","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":1819},"src/extraction/quotes.ts":{"bytesInOutput":1673},"raw-loader:./instructions.tpl?raw":{"bytesInOutput":1376},"src/extraction/extraction-llm-function/index.ts":{"bytesInOutput":0},"src/extraction/extraction-ner-function/extraction-ner-function.ts":{"bytesInOutput":2729},"src/extraction/extraction-ner-function/index.ts":{"bytesInOutput":0}},"bytes":9821},"dist/lib/node-esm/chunk-XOOPGSGW.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":28433},"dist/lib/node-esm/chunk-XOOPGSGW.mjs":{"imports":[{"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/log","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/util","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","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","AiSession","ArtifactDiffResolver","GenerationObserver","VersionPin"],"inputs":{"src/session/artifact-diff.ts":{"bytesInOutput":134},"src/errors.ts":{"bytesInOutput":123},"src/session/session.ts":{"bytesInOutput":6467},"src/session/format.ts":{"bytesInOutput":3692},"src/session/version-pin.ts":{"bytesInOutput":731},"src/session/index.ts":{"bytesInOutput":0}},"bytes":11550},"dist/lib/node-esm/named-entity-recognition-W4VMRCH6.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/node-esm/named-entity-recognition-W4VMRCH6.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-3UU5V4FS.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-3UU5V4FS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5243},"dist/lib/node-esm/chunk-3UU5V4FS.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-3UU5V4FS.mjs";
|
|
8
|
+
export {
|
|
9
|
+
combineNerTokens,
|
|
10
|
+
createTokenGroups,
|
|
11
|
+
extractFullEntities,
|
|
12
|
+
getNer
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=named-entity-recognition-W4VMRCH6.mjs.map
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { type ReadonlySignal } from '@preact/signals-core';
|
|
2
|
+
import { Schema } from 'effect';
|
|
3
|
+
import { Blueprint } from '@dxos/blueprints';
|
|
4
|
+
import { 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: Type.DXN.String[];
|
|
67
|
+
objects: Type.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
|
+
//# 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,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAO,KAAK,GAAG,EAAiB,IAAI,EAAE,MAAM,YAAY,CAAC;AAChE,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;IAChG,QAAQ,CAAC,OAAO,oCAAsE;IAEtF,MAAM;;;;CAMP;AAED;;GAEG;AACH,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;IAmBxC,MAAM,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAmBhD,OAAO,CAAC,OAAO;CAahB"}
|
|
@@ -1,44 +1,50 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { type AiError, type AiLanguageModel, type AiTool, type AiToolkit } from '@effect/ai';
|
|
2
|
+
import { Effect } from 'effect';
|
|
3
|
+
import { type AiInputPreprocessingError, type AiToolNotFoundError, type ToolExecutionService, type ToolResolverService } from '@dxos/ai';
|
|
3
4
|
import { Event } from '@dxos/async';
|
|
4
5
|
import { type Queue } from '@dxos/echo-db';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
import { DataType } from '@dxos/schema';
|
|
7
|
+
import { type AiAssistantError } from '../errors';
|
|
8
|
+
import { AiSession, type GenerationObserver } from '../session';
|
|
9
|
+
import { AiContextBinder, type ContextBinding } from './context';
|
|
10
|
+
export interface AiConversationRunParams<Tools extends AiTool.Any> {
|
|
10
11
|
prompt: string;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
system?: string;
|
|
13
|
+
toolkit?: AiToolkit.AiToolkit<Tools>;
|
|
14
|
+
observer?: GenerationObserver;
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated Remove
|
|
17
|
+
*/
|
|
18
|
+
session?: AiSession;
|
|
18
19
|
}
|
|
19
|
-
export type
|
|
20
|
-
|
|
21
|
-
queue: Queue<Message | ContextBinding>;
|
|
20
|
+
export type AiConversationOptions = {
|
|
21
|
+
queue: Queue<DataType.Message | ContextBinding>;
|
|
22
22
|
};
|
|
23
23
|
/**
|
|
24
24
|
* Persistent conversation state.
|
|
25
25
|
* Context + history + artifacts.
|
|
26
26
|
* Backed by a Queue.
|
|
27
27
|
*/
|
|
28
|
-
export declare class
|
|
29
|
-
private readonly _serviceContainer;
|
|
28
|
+
export declare class AiConversation {
|
|
30
29
|
private readonly _queue;
|
|
30
|
+
/**
|
|
31
|
+
* Blueprints bound to the conversation.
|
|
32
|
+
*/
|
|
33
|
+
readonly _context: AiContextBinder;
|
|
31
34
|
/**
|
|
32
35
|
* Fired when the execution loop begins.
|
|
33
36
|
* This is called before the first message is sent.
|
|
37
|
+
*
|
|
38
|
+
* @deprecated Pass in a session instead.
|
|
34
39
|
*/
|
|
35
|
-
readonly onBegin: Event<
|
|
40
|
+
readonly onBegin: Event<AiSession>;
|
|
41
|
+
constructor(options: AiConversationOptions);
|
|
42
|
+
get context(): AiContextBinder;
|
|
43
|
+
getHistory(): Promise<DataType.Message[]>;
|
|
36
44
|
/**
|
|
37
|
-
*
|
|
45
|
+
* Executes a prompt.
|
|
46
|
+
* Each invocation creates a new `AiSession`, which handles potential tool calls.
|
|
38
47
|
*/
|
|
39
|
-
|
|
40
|
-
constructor(options: ConversationOptions);
|
|
41
|
-
run(options: ConversationRunOptions): Promise<Message[]>;
|
|
42
|
-
getHistory(): Promise<Message[]>;
|
|
48
|
+
run: <Tools extends AiTool.Any>({ session, ...params }: AiConversationRunParams<Tools>) => Effect.Effect<DataType.Message[], AiAssistantError | AiInputPreprocessingError | AiError.AiError | AiToolNotFoundError, AiLanguageModel.AiLanguageModel | ToolResolverService | ToolExecutionService | AiTool.ToHandler<Tools>>;
|
|
43
49
|
}
|
|
44
50
|
//# 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,
|
|
1
|
+
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../../../src/conversation/conversation.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,MAAM,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAC7F,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACzB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,eAAe,CAAC;AAG3C,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,KAAK,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhE,OAAO,EAAE,eAAe,EAAE,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AAEjE,MAAM,WAAW,uBAAuB,CAAC,KAAK,SAAS,MAAM,CAAC,GAAG;IAC/D,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACrC,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAE9B;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,OAAO,GAAG,cAAc,CAAC,CAAC;CACjD,CAAC;AAEF;;;;GAIG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA2C;IAElE;;OAEG;IACH,SAAgB,QAAQ,EAAE,eAAe,CAAC;IAE1C;;;;;OAKG;IAEH,SAAgB,OAAO,mBAA0B;gBAErC,OAAO,EAAE,qBAAqB;IAK1C,IAAI,OAAO,oBAEV;IAEK,UAAU,IAAI,OAAO,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;IAK/C;;;OAGG;IACH,GAAG,GAAI,KAAK,SAAS,MAAM,CAAC,GAAG,EAAE,wBAI9B,uBAAuB,CAAC,KAAK,CAAC,KAAG,MAAM,CAAC,MAAM,CAC/C,QAAQ,CAAC,OAAO,EAAE,EAClB,gBAAgB,GAAG,yBAAyB,GAAG,OAAO,CAAC,OAAO,GAAG,mBAAmB,EACpF,eAAe,CAAC,eAAe,GAAG,mBAAmB,GAAG,oBAAoB,GAAG,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CACvG,CAkCgD;CAClD"}
|
|
@@ -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,39 @@
|
|
|
1
|
+
import { BaseError } from '@dxos/errors';
|
|
2
|
+
declare const AiAssistantError_base: {
|
|
3
|
+
new (message: string, options?: import("@dxos/errors").BaseErrorOptions): {
|
|
4
|
+
#code: "AI_ASSISTANT_ERROR";
|
|
5
|
+
#context: Record<string, unknown>;
|
|
6
|
+
readonly name: "AI_ASSISTANT_ERROR";
|
|
7
|
+
readonly code: "AI_ASSISTANT_ERROR";
|
|
8
|
+
readonly _tag: "AI_ASSISTANT_ERROR";
|
|
9
|
+
readonly context: Record<string, unknown>;
|
|
10
|
+
message: string;
|
|
11
|
+
stack?: string;
|
|
12
|
+
cause?: unknown;
|
|
13
|
+
};
|
|
14
|
+
code: "AI_ASSISTANT_ERROR";
|
|
15
|
+
is(error: unknown): error is BaseError;
|
|
16
|
+
wrap(message: string, options?: Omit<import("@dxos/errors").BaseErrorOptions, "cause">): (error: unknown) => {
|
|
17
|
+
#code: "AI_ASSISTANT_ERROR";
|
|
18
|
+
#context: Record<string, unknown>;
|
|
19
|
+
readonly name: "AI_ASSISTANT_ERROR";
|
|
20
|
+
readonly code: "AI_ASSISTANT_ERROR";
|
|
21
|
+
readonly _tag: "AI_ASSISTANT_ERROR";
|
|
22
|
+
readonly context: Record<string, unknown>;
|
|
23
|
+
message: string;
|
|
24
|
+
stack?: string;
|
|
25
|
+
cause?: unknown;
|
|
26
|
+
};
|
|
27
|
+
extend<Code extends string>(code: Code): 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 for AI agent execution.
|
|
35
|
+
*/
|
|
36
|
+
export declare class AiAssistantError extends AiAssistantError_base {
|
|
37
|
+
}
|
|
38
|
+
export {};
|
|
39
|
+
//# 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,gBAAiB,SAAQ,qBAAsC;CAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extraction-llm-function.d.ts","sourceRoot":"","sources":["../../../../../src/extraction/extraction-llm-function/extraction-llm-function.ts"],"names":[],"mappings":"
|
|
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,qBAAqB,EAAE,kBAAkB,CAAC,eAAe,EAAE,gBAAgB,CAmDtF,CAAC"}
|