@dxos/assistant 0.8.3-main.672df60 → 0.8.3-staging.0fa589b
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/index.mjs +149 -60
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node/index.cjs +155 -65
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +149 -60
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/blueprint/ai.test.d.ts +2 -0
- package/dist/types/src/blueprint/ai.test.d.ts.map +1 -0
- package/dist/types/src/blueprint/blueprint.d.ts +16 -12
- package/dist/types/src/blueprint/blueprint.d.ts.map +1 -1
- package/dist/types/src/blueprint/logger.d.ts +16 -3
- package/dist/types/src/blueprint/logger.d.ts.map +1 -1
- package/dist/types/src/blueprint/machine.d.ts +37 -16
- package/dist/types/src/blueprint/machine.d.ts.map +1 -1
- 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 +31 -33
- package/dist/types/src/extraction/extraction-ner-function/extraction-ner-function.d.ts.map +1 -1
- package/dist/types/src/extraction/extraction.d.ts +104 -100
- package/dist/types/src/extraction/extraction.d.ts.map +1 -1
- package/dist/types/src/extraction/quotes.d.ts.map +1 -1
- package/dist/types/src/research/graph.d.ts +5 -4
- package/dist/types/src/research/graph.d.ts.map +1 -1
- package/dist/types/src/session/session.d.ts +6 -6
- package/dist/types/src/session/session.d.ts.map +1 -1
- package/package.json +29 -20
- package/src/blueprint/ai.test.ts +156 -0
- package/src/blueprint/blueprint.test.ts +22 -20
- package/src/blueprint/blueprint.ts +18 -14
- package/src/blueprint/logger.ts +49 -3
- package/src/blueprint/machine.ts +69 -32
- package/src/blueprint/test-data.ts +4 -4
- package/src/extraction/extraction-llm-function/extraction-llm-function.test.ts +2 -2
- package/src/extraction/extraction-llm-function/extraction-llm-function.ts +2 -1
- package/src/extraction/quotes.ts +2 -1
- package/src/research/graph.ts +7 -9
- package/src/research/research.test.ts +9 -8
- package/src/research/research.ts +2 -2
- package/src/session/session.test.ts +10 -10
- package/src/session/session.ts +4 -3
- package/src/summarization/summarization.test.ts +17 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/core/assistant/src/extraction/extraction.ts":{"bytes":6835,"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":[]},"packages/core/assistant/src/session/version-pin.ts":{"bytes":4222,"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"},"packages/core/assistant/src/session/session.ts":{"bytes":59353,"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-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":"packages/core/assistant/src/session/version-pin.ts","kind":"import-statement","original":"./version-pin"}],"format":"esm"},"packages/core/assistant/src/session/index.ts":{"bytes":569,"imports":[{"path":"packages/core/assistant/src/session/session.ts","kind":"import-statement","original":"./session"},{"path":"packages/core/assistant/src/session/version-pin.ts","kind":"import-statement","original":"./version-pin"}],"format":"esm"},"packages/core/assistant/src/extraction/quotes.ts":{"bytes":7034,"imports":[{"path":"effect","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"},"packages/core/assistant/src/extraction/extraction-llm-function/extraction-llm-function.ts":{"bytes":7661,"imports":[{"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/schema","kind":"import-statement","external":true},{"path":"raw-loader:./instructions.tpl?raw","kind":"import-statement","original":"./instructions.tpl?raw"},{"path":"packages/core/assistant/src/session/index.ts","kind":"import-statement","original":"../../session"},{"path":"packages/core/assistant/src/extraction/extraction.ts","kind":"import-statement","original":"../extraction"},{"path":"packages/core/assistant/src/extraction/quotes.ts","kind":"import-statement","original":"../quotes"}],"format":"esm"},"packages/core/assistant/src/extraction/extraction-llm-function/index.ts":{"bytes":537,"imports":[{"path":"packages/core/assistant/src/extraction/extraction-llm-function/extraction-llm-function.ts","kind":"import-statement","original":"./extraction-llm-function"}],"format":"esm"},"packages/core/assistant/src/extraction/extraction-ner-function/named-entity-recognition.ts":{"bytes":10072,"imports":[{"path":"@xenova/transformers","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/core/assistant/src/extraction/extraction-ner-function/extraction-ner-function.ts":{"bytes":8910,"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":"packages/core/assistant/src/extraction/extraction-ner-function/named-entity-recognition.ts","kind":"import-statement","original":"./named-entity-recognition"},{"path":"packages/core/assistant/src/extraction/extraction.ts","kind":"import-statement","original":"../extraction"},{"path":"packages/core/assistant/src/extraction/quotes.ts","kind":"import-statement","original":"../quotes"}],"format":"esm"},"packages/core/assistant/src/extraction/extraction-ner-function/index.ts":{"bytes":665,"imports":[{"path":"packages/core/assistant/src/extraction/extraction-ner-function/extraction-ner-function.ts","kind":"import-statement","original":"./extraction-ner-function"},{"path":"packages/core/assistant/src/extraction/extraction-ner-function/named-entity-recognition.ts","kind":"import-statement","original":"./named-entity-recognition"}],"format":"esm"},"packages/core/assistant/src/extraction/index.ts":{"bytes":816,"imports":[{"path":"packages/core/assistant/src/extraction/extraction.ts","kind":"import-statement","original":"./extraction"},{"path":"packages/core/assistant/src/extraction/extraction-llm-function/index.ts","kind":"import-statement","original":"./extraction-llm-function"},{"path":"packages/core/assistant/src/extraction/extraction-ner-function/index.ts","kind":"import-statement","original":"./extraction-ner-function"},{"path":"packages/core/assistant/src/extraction/quotes.ts","kind":"import-statement","original":"./quotes"}],"format":"esm"},"packages/core/assistant/src/testing/exa-search-1748337321991.ts":{"bytes":75521,"imports":[],"format":"esm"},"packages/core/assistant/src/testing/exa-search-1748337331526.ts":{"bytes":90591,"imports":[],"format":"esm"},"packages/core/assistant/src/testing/exa-search-1748337344119.ts":{"bytes":69963,"imports":[],"format":"esm"},"packages/core/assistant/src/testing/index.ts":{"bytes":1218,"imports":[{"path":"packages/core/assistant/src/testing/exa-search-1748337321991.ts","kind":"import-statement","original":"./exa-search-1748337321991"},{"path":"packages/core/assistant/src/testing/exa-search-1748337331526.ts","kind":"import-statement","original":"./exa-search-1748337331526"},{"path":"packages/core/assistant/src/testing/exa-search-1748337344119.ts","kind":"import-statement","original":"./exa-search-1748337344119"}],"format":"esm"},"packages/core/assistant/src/research/exa.ts":{"bytes":10703,"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":"packages/core/assistant/src/testing/index.ts","kind":"import-statement","original":"../testing"}],"format":"esm"},"packages/core/assistant/src/research/graph.ts":{"bytes":34629,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/ai","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":[]},"packages/core/assistant/src/research/research.ts":{"bytes":12349,"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":"packages/core/assistant/src/research/exa.ts","kind":"import-statement","original":"./exa"},{"path":"packages/core/assistant/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":"packages/core/assistant/src/session/index.ts","kind":"import-statement","original":"../session"}],"format":"esm"},"packages/core/assistant/src/research/index.ts":{"bytes":632,"imports":[{"path":"packages/core/assistant/src/research/exa.ts","kind":"import-statement","original":"./exa"},{"path":"packages/core/assistant/src/research/research.ts","kind":"import-statement","original":"./research"},{"path":"packages/core/assistant/src/research/graph.ts","kind":"import-statement","original":"./graph"}],"format":"esm"},"packages/core/assistant/src/types.ts":{"bytes":858,"imports":[],"format":"esm"},"packages/core/assistant/src/blueprint/blueprint.ts":{"bytes":6353,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true}],"format":"esm"},"packages/core/assistant/src/blueprint/machine.ts":{"bytes":22240,"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-schema","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/assistant/src/session/index.ts","kind":"import-statement","original":"../session"}],"format":"esm"},"packages/core/assistant/src/blueprint/logger.ts":{"bytes":11635,"imports":[{"path":"@preact/signals-core","kind":"import-statement","external":true},{"path":"chalk","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true}],"format":"esm"},"packages/core/assistant/src/blueprint/index.ts":{"bytes":647,"imports":[{"path":"packages/core/assistant/src/blueprint/blueprint.ts","kind":"import-statement","original":"./blueprint"},{"path":"packages/core/assistant/src/blueprint/machine.ts","kind":"import-statement","original":"./machine"},{"path":"packages/core/assistant/src/blueprint/logger.ts","kind":"import-statement","original":"./logger"}],"format":"esm"},"packages/core/assistant/src/index.ts":{"bytes":814,"imports":[{"path":"packages/core/assistant/src/extraction/index.ts","kind":"import-statement","original":"./extraction"},{"path":"packages/core/assistant/src/research/index.ts","kind":"import-statement","original":"./research"},{"path":"packages/core/assistant/src/session/index.ts","kind":"import-statement","original":"./session"},{"path":"packages/core/assistant/src/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/core/assistant/src/blueprint/index.ts","kind":"import-statement","original":"./blueprint"}],"format":"esm"}},"outputs":{"packages/core/assistant/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":211310},"packages/core/assistant/dist/lib/node-esm/index.mjs":{"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},{"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/schema","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-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/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-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},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/keys","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-schema","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@preact/signals-core","kind":"import-statement","external":true},{"path":"chalk","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true}],"exports":["AIServiecOverloadedError","AISession","Blueprint","BlueprintBuilder","BlueprintMachine","BlueprintParser","BlueprintSchema","BlueprintStepSchema","ExtractionInput","ExtractionOutput","Logger","ReferencedQuotes","Subgraph","VersionPin","combineNerTokens","createArtifactElement","createExaTool","createExtractionSchema","createGraphWriterTool","createLocalSearchTool","createMockExaTool","createTokenGroups","extractFullEntities","extractionAnthropicFn","extractionNerFn","findQuotes","findRelatedSchema","getNer","getSanitizedSchemaName","insertReferences","processTranscriptMessage","researchFn","sanitizeObjects","setConsolePrinter","setLogger"],"entryPoint":"packages/core/assistant/src/index.ts","inputs":{"packages/core/assistant/src/extraction/extraction.ts":{"bytesInOutput":1383},"packages/core/assistant/src/extraction/index.ts":{"bytesInOutput":0},"packages/core/assistant/src/extraction/extraction-llm-function/extraction-llm-function.ts":{"bytesInOutput":1649},"raw-loader:./instructions.tpl?raw":{"bytesInOutput":1376},"packages/core/assistant/src/session/session.ts":{"bytesInOutput":15770},"packages/core/assistant/src/session/version-pin.ts":{"bytesInOutput":758},"packages/core/assistant/src/session/index.ts":{"bytesInOutput":0},"packages/core/assistant/src/extraction/quotes.ts":{"bytesInOutput":1671},"packages/core/assistant/src/extraction/extraction-llm-function/index.ts":{"bytesInOutput":0},"packages/core/assistant/src/extraction/extraction-ner-function/extraction-ner-function.ts":{"bytesInOutput":2653},"packages/core/assistant/src/extraction/extraction-ner-function/named-entity-recognition.ts":{"bytesInOutput":2289},"packages/core/assistant/src/extraction/extraction-ner-function/index.ts":{"bytesInOutput":0},"packages/core/assistant/src/index.ts":{"bytesInOutput":0},"packages/core/assistant/src/research/exa.ts":{"bytesInOutput":2550},"packages/core/assistant/src/testing/exa-search-1748337321991.ts":{"bytesInOutput":31265},"packages/core/assistant/src/testing/exa-search-1748337331526.ts":{"bytesInOutput":43952},"packages/core/assistant/src/testing/exa-search-1748337344119.ts":{"bytesInOutput":28760},"packages/core/assistant/src/testing/index.ts":{"bytesInOutput":133},"packages/core/assistant/src/research/index.ts":{"bytesInOutput":0},"packages/core/assistant/src/research/research.ts":{"bytesInOutput":2915},"packages/core/assistant/src/research/graph.ts":{"bytesInOutput":8232},"raw-loader:./instructions-research.tpl?raw":{"bytesInOutput":5201},"packages/core/assistant/src/types.ts":{"bytesInOutput":61},"packages/core/assistant/src/blueprint/blueprint.ts":{"bytesInOutput":1489},"packages/core/assistant/src/blueprint/index.ts":{"bytesInOutput":0},"packages/core/assistant/src/blueprint/machine.ts":{"bytesInOutput":5581},"packages/core/assistant/src/blueprint/logger.ts":{"bytesInOutput":2551}},"bytes":162589}}}
|
|
1
|
+
{"inputs":{"packages/core/assistant/src/extraction/extraction.ts":{"bytes":6835,"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":[]},"packages/core/assistant/src/session/version-pin.ts":{"bytes":4222,"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"},"packages/core/assistant/src/session/session.ts":{"bytes":59501,"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":"packages/core/assistant/src/session/version-pin.ts","kind":"import-statement","original":"./version-pin"}],"format":"esm"},"packages/core/assistant/src/session/index.ts":{"bytes":569,"imports":[{"path":"packages/core/assistant/src/session/session.ts","kind":"import-statement","original":"./session"},{"path":"packages/core/assistant/src/session/version-pin.ts","kind":"import-statement","original":"./version-pin"}],"format":"esm"},"packages/core/assistant/src/extraction/quotes.ts":{"bytes":7123,"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"},"packages/core/assistant/src/extraction/extraction-llm-function/extraction-llm-function.ts":{"bytes":7821,"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":"packages/core/assistant/src/session/index.ts","kind":"import-statement","original":"../../session"},{"path":"packages/core/assistant/src/extraction/extraction.ts","kind":"import-statement","original":"../extraction"},{"path":"packages/core/assistant/src/extraction/quotes.ts","kind":"import-statement","original":"../quotes"}],"format":"esm"},"packages/core/assistant/src/extraction/extraction-llm-function/index.ts":{"bytes":537,"imports":[{"path":"packages/core/assistant/src/extraction/extraction-llm-function/extraction-llm-function.ts","kind":"import-statement","original":"./extraction-llm-function"}],"format":"esm"},"packages/core/assistant/src/extraction/extraction-ner-function/named-entity-recognition.ts":{"bytes":10072,"imports":[{"path":"@xenova/transformers","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/core/assistant/src/extraction/extraction-ner-function/extraction-ner-function.ts":{"bytes":8910,"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":"packages/core/assistant/src/extraction/extraction-ner-function/named-entity-recognition.ts","kind":"import-statement","original":"./named-entity-recognition"},{"path":"packages/core/assistant/src/extraction/extraction.ts","kind":"import-statement","original":"../extraction"},{"path":"packages/core/assistant/src/extraction/quotes.ts","kind":"import-statement","original":"../quotes"}],"format":"esm"},"packages/core/assistant/src/extraction/extraction-ner-function/index.ts":{"bytes":665,"imports":[{"path":"packages/core/assistant/src/extraction/extraction-ner-function/extraction-ner-function.ts","kind":"import-statement","original":"./extraction-ner-function"},{"path":"packages/core/assistant/src/extraction/extraction-ner-function/named-entity-recognition.ts","kind":"import-statement","original":"./named-entity-recognition"}],"format":"esm"},"packages/core/assistant/src/extraction/index.ts":{"bytes":816,"imports":[{"path":"packages/core/assistant/src/extraction/extraction.ts","kind":"import-statement","original":"./extraction"},{"path":"packages/core/assistant/src/extraction/extraction-llm-function/index.ts","kind":"import-statement","original":"./extraction-llm-function"},{"path":"packages/core/assistant/src/extraction/extraction-ner-function/index.ts","kind":"import-statement","original":"./extraction-ner-function"},{"path":"packages/core/assistant/src/extraction/quotes.ts","kind":"import-statement","original":"./quotes"}],"format":"esm"},"packages/core/assistant/src/testing/exa-search-1748337321991.ts":{"bytes":75521,"imports":[],"format":"esm"},"packages/core/assistant/src/testing/exa-search-1748337331526.ts":{"bytes":90591,"imports":[],"format":"esm"},"packages/core/assistant/src/testing/exa-search-1748337344119.ts":{"bytes":69963,"imports":[],"format":"esm"},"packages/core/assistant/src/testing/index.ts":{"bytes":1218,"imports":[{"path":"packages/core/assistant/src/testing/exa-search-1748337321991.ts","kind":"import-statement","original":"./exa-search-1748337321991"},{"path":"packages/core/assistant/src/testing/exa-search-1748337331526.ts","kind":"import-statement","original":"./exa-search-1748337331526"},{"path":"packages/core/assistant/src/testing/exa-search-1748337344119.ts","kind":"import-statement","original":"./exa-search-1748337344119"}],"format":"esm"},"packages/core/assistant/src/research/exa.ts":{"bytes":10703,"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":"packages/core/assistant/src/testing/index.ts","kind":"import-statement","original":"../testing"}],"format":"esm"},"packages/core/assistant/src/research/graph.ts":{"bytes":34603,"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":[]},"packages/core/assistant/src/research/research.ts":{"bytes":12315,"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":"packages/core/assistant/src/research/exa.ts","kind":"import-statement","original":"./exa"},{"path":"packages/core/assistant/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":"packages/core/assistant/src/session/index.ts","kind":"import-statement","original":"../session"}],"format":"esm"},"packages/core/assistant/src/research/index.ts":{"bytes":632,"imports":[{"path":"packages/core/assistant/src/research/exa.ts","kind":"import-statement","original":"./exa"},{"path":"packages/core/assistant/src/research/research.ts","kind":"import-statement","original":"./research"},{"path":"packages/core/assistant/src/research/graph.ts","kind":"import-statement","original":"./graph"}],"format":"esm"},"packages/core/assistant/src/types.ts":{"bytes":858,"imports":[],"format":"esm"},"packages/core/assistant/src/blueprint/blueprint.ts":{"bytes":6426,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true}],"format":"esm"},"packages/core/assistant/src/blueprint/machine.ts":{"bytes":25722,"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/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/assistant/src/session/index.ts","kind":"import-statement","original":"../session"}],"format":"esm"},"packages/core/assistant/src/blueprint/logger.ts":{"bytes":16321,"imports":[{"path":"@preact/signals-core","kind":"import-statement","external":true},{"path":"chalk","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/core/assistant/src/blueprint/index.ts":{"bytes":647,"imports":[{"path":"packages/core/assistant/src/blueprint/blueprint.ts","kind":"import-statement","original":"./blueprint"},{"path":"packages/core/assistant/src/blueprint/machine.ts","kind":"import-statement","original":"./machine"},{"path":"packages/core/assistant/src/blueprint/logger.ts","kind":"import-statement","original":"./logger"}],"format":"esm"},"packages/core/assistant/src/index.ts":{"bytes":814,"imports":[{"path":"packages/core/assistant/src/extraction/index.ts","kind":"import-statement","original":"./extraction"},{"path":"packages/core/assistant/src/research/index.ts","kind":"import-statement","original":"./research"},{"path":"packages/core/assistant/src/session/index.ts","kind":"import-statement","original":"./session"},{"path":"packages/core/assistant/src/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/core/assistant/src/blueprint/index.ts","kind":"import-statement","original":"./blueprint"}],"format":"esm"}},"outputs":{"packages/core/assistant/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":215523},"packages/core/assistant/dist/lib/node-esm/index.mjs":{"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},{"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/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/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},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo","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/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@preact/signals-core","kind":"import-statement","external":true},{"path":"chalk","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["AIServiecOverloadedError","AISession","Blueprint","BlueprintBuilder","BlueprintDefinition","BlueprintLoggerAdapter","BlueprintMachine","BlueprintParser","BlueprintStep","BufferedLogger","ExtractionInput","ExtractionOutput","ReferencedQuotes","Subgraph","VersionPin","combineNerTokens","createArtifactElement","createExaTool","createExtractionSchema","createGraphWriterTool","createLocalSearchTool","createMockExaTool","createTokenGroups","extractFullEntities","extractionAnthropicFn","extractionNerFn","findQuotes","findRelatedSchema","getNer","getSanitizedSchemaName","insertReferences","processTranscriptMessage","researchFn","sanitizeObjects","setConsolePrinter","setLogger"],"entryPoint":"packages/core/assistant/src/index.ts","inputs":{"packages/core/assistant/src/extraction/extraction.ts":{"bytesInOutput":1383},"packages/core/assistant/src/extraction/index.ts":{"bytesInOutput":0},"packages/core/assistant/src/extraction/extraction-llm-function/extraction-llm-function.ts":{"bytesInOutput":1693},"raw-loader:./instructions.tpl?raw":{"bytesInOutput":1376},"packages/core/assistant/src/session/session.ts":{"bytesInOutput":15806},"packages/core/assistant/src/session/version-pin.ts":{"bytesInOutput":758},"packages/core/assistant/src/session/index.ts":{"bytesInOutput":0},"packages/core/assistant/src/extraction/quotes.ts":{"bytesInOutput":1700},"packages/core/assistant/src/extraction/extraction-llm-function/index.ts":{"bytesInOutput":0},"packages/core/assistant/src/extraction/extraction-ner-function/extraction-ner-function.ts":{"bytesInOutput":2653},"packages/core/assistant/src/extraction/extraction-ner-function/named-entity-recognition.ts":{"bytesInOutput":2289},"packages/core/assistant/src/extraction/extraction-ner-function/index.ts":{"bytesInOutput":0},"packages/core/assistant/src/index.ts":{"bytesInOutput":0},"packages/core/assistant/src/research/exa.ts":{"bytesInOutput":2550},"packages/core/assistant/src/testing/exa-search-1748337321991.ts":{"bytesInOutput":31265},"packages/core/assistant/src/testing/exa-search-1748337331526.ts":{"bytesInOutput":43952},"packages/core/assistant/src/testing/exa-search-1748337344119.ts":{"bytesInOutput":28760},"packages/core/assistant/src/testing/index.ts":{"bytesInOutput":133},"packages/core/assistant/src/research/index.ts":{"bytesInOutput":0},"packages/core/assistant/src/research/research.ts":{"bytesInOutput":2910},"packages/core/assistant/src/research/graph.ts":{"bytesInOutput":8246},"raw-loader:./instructions-research.tpl?raw":{"bytesInOutput":5201},"packages/core/assistant/src/types.ts":{"bytesInOutput":61},"packages/core/assistant/src/blueprint/blueprint.ts":{"bytesInOutput":1461},"packages/core/assistant/src/blueprint/index.ts":{"bytesInOutput":0},"packages/core/assistant/src/blueprint/machine.ts":{"bytesInOutput":6264},"packages/core/assistant/src/blueprint/logger.ts":{"bytesInOutput":3703}},"bytes":164546}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai.test.d.ts","sourceRoot":"","sources":["../../../../src/blueprint/ai.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,29 +1,33 @@
|
|
|
1
1
|
import { Schema } from 'effect';
|
|
2
|
-
|
|
2
|
+
import { Type } from '@dxos/echo';
|
|
3
|
+
export declare const BlueprintStep: Schema.Struct<{
|
|
3
4
|
id: import("@dxos/keys").ObjectIdClass;
|
|
4
5
|
instructions: typeof Schema.String;
|
|
5
|
-
tools: Schema.Array$<typeof Schema.String
|
|
6
|
+
tools: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
6
7
|
}>;
|
|
7
|
-
export
|
|
8
|
-
|
|
8
|
+
export interface BlueprintStep extends Schema.Schema.Type<typeof BlueprintStep> {
|
|
9
|
+
}
|
|
10
|
+
export declare const BlueprintDefinition: Schema.Struct<{
|
|
9
11
|
steps: Schema.Array$<Schema.SchemaClass<{
|
|
10
12
|
readonly instructions: string;
|
|
11
|
-
readonly tools
|
|
13
|
+
readonly tools?: readonly string[] | undefined;
|
|
12
14
|
}, {
|
|
13
15
|
readonly instructions: string;
|
|
14
|
-
readonly tools
|
|
16
|
+
readonly tools?: readonly string[] | undefined;
|
|
15
17
|
}, never>>;
|
|
16
18
|
}>;
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
+
export interface BlueprintDefinition extends Schema.Schema.Type<typeof BlueprintDefinition> {
|
|
20
|
+
}
|
|
21
|
+
export declare const Blueprint: Type.obj<Schema.Struct<{
|
|
19
22
|
name: Schema.optional<typeof Schema.String>;
|
|
20
23
|
steps: Schema.Array$<Schema.Struct<{
|
|
21
24
|
id: import("@dxos/keys").ObjectIdClass;
|
|
22
25
|
instructions: typeof Schema.String;
|
|
23
|
-
tools: Schema.Array$<typeof Schema.String
|
|
26
|
+
tools: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
24
27
|
}>>;
|
|
25
|
-
}
|
|
26
|
-
export
|
|
28
|
+
}>>;
|
|
29
|
+
export interface Blueprint extends Schema.Schema.Type<typeof Blueprint> {
|
|
30
|
+
}
|
|
27
31
|
/**
|
|
28
32
|
* Blueprint builder API.
|
|
29
33
|
*/
|
|
@@ -44,7 +48,7 @@ export declare namespace BlueprintBuilder {
|
|
|
44
48
|
export declare namespace BlueprintParser {
|
|
45
49
|
export const create: () => Parser;
|
|
46
50
|
class Parser {
|
|
47
|
-
parse({ steps }:
|
|
51
|
+
parse({ steps }: BlueprintDefinition): Blueprint;
|
|
48
52
|
}
|
|
49
53
|
export {};
|
|
50
54
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blueprint.d.ts","sourceRoot":"","sources":["../../../../src/blueprint/blueprint.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"blueprint.d.ts","sourceRoot":"","sources":["../../../../src/blueprint/blueprint.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAY,IAAI,EAAE,MAAM,YAAY,CAAC;AAE5C,eAAO,MAAM,aAAa;;;;EAIxB,CAAC;AACH,MAAM,WAAW,aAAc,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,aAAa,CAAC;CAAG;AAElF,eAAO,MAAM,mBAAmB;;;;;;;;EAE9B,CAAC;AACH,MAAM,WAAW,mBAAoB,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,mBAAmB,CAAC;CAAG;AAE9F,eAAO,MAAM,SAAS;;;;;;;GAQrB,CAAC;AACF,MAAM,WAAW,SAAU,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,SAAS,CAAC;CAAG;AAE1E;;GAEG;AACH,yBAAiB,gBAAgB,CAAC;IAChC,MAAM,CAAC,MAAM,MAAM,eAAsB,CAAC;IAE1C,MAAM,OAAO;QACX,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAuB;QAE9C,IAAI,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;YAAE,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;SAAE,GAAG,OAAO;QAUnE,KAAK,IAAI,SAAS;KAGnB;;CACF;AAED;;GAEG;AACH,yBAAiB,eAAe,CAAC;IAC/B,MAAM,CAAC,MAAM,MAAM,cAAqB,CAAC;IAEzC,MAAM,MAAM;QACV,KAAK,CAAC,EAAE,KAAK,EAAE,EAAE,mBAAmB,GAAG,SAAS;KAUjD;;CACF"}
|
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
import { type ReadonlySignal } from '@preact/signals-core';
|
|
2
2
|
import { type CleanupFn } from '@dxos/async';
|
|
3
|
-
import { type BlueprintMachine } from './machine';
|
|
4
|
-
|
|
3
|
+
import { type BlueprintEvent, type BlueprintLogger, type BlueprintMachine } from './machine';
|
|
4
|
+
type ConsoleLogSignature = (message: string, arg?: any) => void;
|
|
5
|
+
interface Logger {
|
|
6
|
+
log: ConsoleLogSignature;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Reactive bufferedlogger.
|
|
10
|
+
*/
|
|
11
|
+
export declare class BufferedLogger implements Logger {
|
|
5
12
|
private _messages;
|
|
6
13
|
get messages(): ReadonlySignal<string[]>;
|
|
7
14
|
clear(): void;
|
|
8
15
|
log(message: string): void;
|
|
9
16
|
}
|
|
10
|
-
export declare
|
|
17
|
+
export declare class BlueprintLoggerAdapter implements BlueprintLogger {
|
|
18
|
+
private readonly logger;
|
|
19
|
+
constructor(logger?: Logger);
|
|
20
|
+
log(event: BlueprintEvent): void;
|
|
21
|
+
}
|
|
22
|
+
export declare const setLogger: (machine: BlueprintMachine, logger: BufferedLogger) => CleanupFn;
|
|
11
23
|
export declare const setConsolePrinter: (machine: BlueprintMachine, verbose?: boolean) => CleanupFn;
|
|
24
|
+
export {};
|
|
12
25
|
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../../src/blueprint/logger.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,cAAc,EAAU,MAAM,sBAAsB,CAAC;AAInE,OAAO,EAAE,KAAK,SAAS,EAAW,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../../src/blueprint/logger.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,cAAc,EAAU,MAAM,sBAAsB,CAAC;AAInE,OAAO,EAAE,KAAK,SAAS,EAAW,MAAM,aAAa,CAAC;AAItD,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EAEtB,MAAM,WAAW,CAAC;AAQnB,KAAK,mBAAmB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;AAEhE,UAAU,MAAM;IACd,GAAG,EAAE,mBAAmB,CAAC;CAC1B;AAID;;GAEG;AACH,qBAAa,cAAe,YAAW,MAAM;IAC3C,OAAO,CAAC,SAAS,CAAwB;IAEzC,IAAI,QAAQ,IAAI,cAAc,CAAC,MAAM,EAAE,CAAC,CAEvC;IAED,KAAK;IAIL,GAAG,CAAC,OAAO,EAAE,MAAM;CAGpB;AAGD,qBAAa,sBAAuB,YAAW,eAAe;IAChD,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,GAAE,MAAuB;IAE5D,GAAG,CAAC,KAAK,EAAE,cAAc;CAsB1B;AAED,eAAO,MAAM,SAAS,GAAI,SAAS,gBAAgB,EAAE,QAAQ,cAAc,KAAG,SAkB7E,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,SAAS,gBAAgB,EAAE,iBAAe,KAAG,SAkB9E,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type AiServiceClient, Message, type MessageContentBlock, type ToolRegistry } from '@dxos/ai';
|
|
2
2
|
import { Event } from '@dxos/async';
|
|
3
3
|
import { type ObjectId } from '@dxos/keys';
|
|
4
|
-
import type { Blueprint } from './blueprint';
|
|
4
|
+
import type { Blueprint, BlueprintStep } from './blueprint';
|
|
5
5
|
export type BlueprintTraceStep = {
|
|
6
6
|
status: 'done' | 'bailed' | 'skipped';
|
|
7
7
|
stepId: ObjectId;
|
|
@@ -13,12 +13,38 @@ export type BlueprintMachineState = {
|
|
|
13
13
|
state: 'working' | 'bail' | 'done';
|
|
14
14
|
};
|
|
15
15
|
type ExecutionOptions = {
|
|
16
|
-
|
|
16
|
+
aiClient: AiServiceClient;
|
|
17
17
|
/**
|
|
18
18
|
* Input to the blueprint.
|
|
19
19
|
*/
|
|
20
20
|
input?: unknown;
|
|
21
21
|
};
|
|
22
|
+
export type BlueprintEvent = {
|
|
23
|
+
type: 'begin';
|
|
24
|
+
invocationId: string;
|
|
25
|
+
} | {
|
|
26
|
+
type: 'end';
|
|
27
|
+
invocationId: string;
|
|
28
|
+
} | {
|
|
29
|
+
type: 'step-start';
|
|
30
|
+
invocationId: string;
|
|
31
|
+
step: BlueprintStep;
|
|
32
|
+
} | {
|
|
33
|
+
type: 'step-complete';
|
|
34
|
+
invocationId: string;
|
|
35
|
+
step: BlueprintStep;
|
|
36
|
+
} | {
|
|
37
|
+
type: 'message';
|
|
38
|
+
invocationId: string;
|
|
39
|
+
message: Message;
|
|
40
|
+
} | {
|
|
41
|
+
type: 'block';
|
|
42
|
+
invocationId: string;
|
|
43
|
+
block: MessageContentBlock;
|
|
44
|
+
};
|
|
45
|
+
export interface BlueprintLogger {
|
|
46
|
+
log(event: BlueprintEvent): void;
|
|
47
|
+
}
|
|
22
48
|
/**
|
|
23
49
|
* Blueprint state machine.
|
|
24
50
|
*/
|
|
@@ -27,18 +53,10 @@ export declare class BlueprintMachine {
|
|
|
27
53
|
readonly blueprint: Blueprint;
|
|
28
54
|
readonly begin: Event<void>;
|
|
29
55
|
readonly end: Event<void>;
|
|
30
|
-
readonly stepStart: Event<
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}>;
|
|
35
|
-
readonly stepComplete: Event<{
|
|
36
|
-
readonly id: string;
|
|
37
|
-
readonly instructions: string;
|
|
38
|
-
readonly tools: readonly string[];
|
|
39
|
-
}>;
|
|
40
|
-
readonly message: Event<{
|
|
41
|
-
readonly id: string;
|
|
56
|
+
readonly stepStart: Event<BlueprintStep>;
|
|
57
|
+
readonly stepComplete: Event<BlueprintStep>;
|
|
58
|
+
readonly message: Event<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
|
|
59
|
+
id: string;
|
|
42
60
|
role: "user" | "assistant";
|
|
43
61
|
content: ({
|
|
44
62
|
pending?: boolean | undefined;
|
|
@@ -113,8 +131,11 @@ export declare class BlueprintMachine {
|
|
|
113
131
|
toolUseId: string;
|
|
114
132
|
isError?: boolean | undefined;
|
|
115
133
|
}>;
|
|
116
|
-
|
|
134
|
+
private logger?;
|
|
135
|
+
private _state;
|
|
117
136
|
constructor(registry: ToolRegistry, blueprint: Blueprint);
|
|
137
|
+
get state(): BlueprintMachineState;
|
|
138
|
+
setLogger(logger: BlueprintLogger): this;
|
|
118
139
|
runToCompletion(options: ExecutionOptions): Promise<void>;
|
|
119
140
|
private _execStep;
|
|
120
141
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"machine.d.ts","sourceRoot":"","sources":["../../../../src/blueprint/machine.ts"],"names":[],"mappings":"AAMA,OAAO,EAEL,KAAK,eAAe,EACpB,OAAO,
|
|
1
|
+
{"version":3,"file":"machine.d.ts","sourceRoot":"","sources":["../../../../src/blueprint/machine.ts"],"names":[],"mappings":"AAMA,OAAO,EAEL,KAAK,eAAe,EACpB,OAAO,EACP,KAAK,mBAAmB,EAGxB,KAAK,YAAY,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAI3C,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAc5D,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;IACtC,MAAM,EAAE,QAAQ,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,KAAK,EAAE,kBAAkB,EAAE,CAAC;IAC5B,KAAK,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;CACpC,CAAC;AAQF,KAAK,gBAAgB,GAAG;IACtB,QAAQ,EAAE,eAAe,CAAC;IAE1B;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,cAAc,GACtB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,GACvC;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,GACrC;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,aAAa,CAAA;CAAE,GACjE;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,aAAa,CAAA;CAAE,GACpE;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,GAC3D;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,mBAAmB,CAAA;CAAE,CAAC;AAExE,MAAM,WAAW,eAAe;IAC9B,GAAG,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI,CAAC;CAClC;AAED;;GAEG;AACH,qBAAa,gBAAgB;IAczB,QAAQ,CAAC,QAAQ,EAAE,YAAY;IAC/B,QAAQ,CAAC,SAAS,EAAE,SAAS;IAd/B,SAAgB,KAAK,cAAqB;IAC1C,SAAgB,GAAG,cAAqB;IACxC,SAAgB,SAAS,uBAA8B;IACvD,SAAgB,YAAY,uBAA8B;IAC1D,SAAgB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAAwB;IAC/C,SAAgB,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAAoC;IAGzD,OAAO,CAAC,MAAM,CAAC,CAAkB;IAEjC,OAAO,CAAC,MAAM,CAAyD;gBAG5D,QAAQ,EAAE,YAAY,EACtB,SAAS,EAAE,SAAS;IAG/B,IAAI,KAAK,IAAI,qBAAqB,CAEjC;IAED,SAAS,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI;IAKlC,eAAe,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;YA2BjD,SAAS;CA4FxB"}
|
|
@@ -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":"AAOA,OAAO,EAA6B,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAKrF,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGlE,eAAO,MAAM,qBAAqB,EAAE,kBAAkB,CAAC,eAAe,EAAE,gBAAgB,CAiDtF,CAAC"}
|
|
@@ -1,30 +1,24 @@
|
|
|
1
1
|
export declare const extractionNerFn: import("@dxos/functions").FunctionDefinition<{
|
|
2
|
-
readonly message: {
|
|
3
|
-
|
|
2
|
+
readonly message: import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
|
|
3
|
+
id: string;
|
|
4
4
|
created: string;
|
|
5
5
|
sender: {
|
|
6
6
|
name?: string | undefined;
|
|
7
7
|
email?: string | undefined;
|
|
8
8
|
role?: "user" | "assistant" | undefined;
|
|
9
|
-
contact?: import("@dxos/echo-schema").Ref<{
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}[] | undefined;
|
|
16
|
-
organization?: import("@dxos/echo-schema").Ref<{
|
|
17
|
-
readonly id: string;
|
|
9
|
+
contact?: import("@dxos/echo-schema").Ref<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
|
|
10
|
+
image?: string | undefined;
|
|
11
|
+
fullName?: string | undefined;
|
|
12
|
+
preferredName?: string | undefined;
|
|
13
|
+
nickname?: string | undefined;
|
|
14
|
+
organization?: import("@dxos/echo-schema").Ref<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
|
|
18
15
|
description?: string | undefined;
|
|
16
|
+
id: string;
|
|
19
17
|
name?: string | undefined;
|
|
20
18
|
status?: "prospect" | "qualified" | "active" | "commit" | "reject" | undefined;
|
|
21
19
|
image?: string | undefined;
|
|
22
20
|
website?: string | undefined;
|
|
23
21
|
}> | undefined;
|
|
24
|
-
image?: string | undefined;
|
|
25
|
-
fullName?: string | undefined;
|
|
26
|
-
preferredName?: string | undefined;
|
|
27
|
-
nickname?: string | undefined;
|
|
28
22
|
jobTitle?: string | undefined;
|
|
29
23
|
department?: string | undefined;
|
|
30
24
|
notes?: string | undefined;
|
|
@@ -57,6 +51,11 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
|
|
|
57
51
|
readonly label?: string | undefined;
|
|
58
52
|
}[] | undefined;
|
|
59
53
|
birthday?: string | undefined;
|
|
54
|
+
fields?: {
|
|
55
|
+
readonly value: string;
|
|
56
|
+
readonly label: string;
|
|
57
|
+
readonly category?: string | undefined;
|
|
58
|
+
}[] | undefined;
|
|
60
59
|
}> | undefined;
|
|
61
60
|
identityDid?: string | undefined;
|
|
62
61
|
identityKey?: string | undefined;
|
|
@@ -86,7 +85,7 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
|
|
|
86
85
|
} | {
|
|
87
86
|
pending?: boolean | undefined;
|
|
88
87
|
type: "reference";
|
|
89
|
-
reference: import("@dxos/echo-schema").Ref<import("@dxos/echo
|
|
88
|
+
reference: import("@dxos/echo-schema").Ref<import("@dxos/echo/Type").Expando>;
|
|
90
89
|
} | {
|
|
91
90
|
pending?: boolean | undefined;
|
|
92
91
|
type: "transcription";
|
|
@@ -103,32 +102,26 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
|
|
|
103
102
|
} | undefined;
|
|
104
103
|
readonly objects?: readonly import("@dxos/echo-schema").Expando[] | undefined;
|
|
105
104
|
}, {
|
|
106
|
-
message: Omit<{
|
|
107
|
-
|
|
105
|
+
message: Omit<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
|
|
106
|
+
id: string;
|
|
108
107
|
created: string;
|
|
109
108
|
sender: {
|
|
110
109
|
name?: string | undefined;
|
|
111
110
|
email?: string | undefined;
|
|
112
111
|
role?: "user" | "assistant" | undefined;
|
|
113
|
-
contact?: import("@dxos/echo-schema").Ref<{
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}[] | undefined;
|
|
120
|
-
organization?: import("@dxos/echo-schema").Ref<{
|
|
121
|
-
readonly id: string;
|
|
112
|
+
contact?: import("@dxos/echo-schema").Ref<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
|
|
113
|
+
image?: string | undefined;
|
|
114
|
+
fullName?: string | undefined;
|
|
115
|
+
preferredName?: string | undefined;
|
|
116
|
+
nickname?: string | undefined;
|
|
117
|
+
organization?: import("@dxos/echo-schema").Ref<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
|
|
122
118
|
description?: string | undefined;
|
|
119
|
+
id: string;
|
|
123
120
|
name?: string | undefined;
|
|
124
121
|
status?: "prospect" | "qualified" | "active" | "commit" | "reject" | undefined;
|
|
125
122
|
image?: string | undefined;
|
|
126
123
|
website?: string | undefined;
|
|
127
124
|
}> | undefined;
|
|
128
|
-
image?: string | undefined;
|
|
129
|
-
fullName?: string | undefined;
|
|
130
|
-
preferredName?: string | undefined;
|
|
131
|
-
nickname?: string | undefined;
|
|
132
125
|
jobTitle?: string | undefined;
|
|
133
126
|
department?: string | undefined;
|
|
134
127
|
notes?: string | undefined;
|
|
@@ -161,6 +154,11 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
|
|
|
161
154
|
readonly label?: string | undefined;
|
|
162
155
|
}[] | undefined;
|
|
163
156
|
birthday?: string | undefined;
|
|
157
|
+
fields?: {
|
|
158
|
+
readonly value: string;
|
|
159
|
+
readonly label: string;
|
|
160
|
+
readonly category?: string | undefined;
|
|
161
|
+
}[] | undefined;
|
|
164
162
|
}> | undefined;
|
|
165
163
|
identityDid?: string | undefined;
|
|
166
164
|
identityKey?: string | undefined;
|
|
@@ -190,7 +188,7 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
|
|
|
190
188
|
} | {
|
|
191
189
|
pending?: boolean | undefined;
|
|
192
190
|
type: "reference";
|
|
193
|
-
reference: import("@dxos/echo-schema").Ref<import("@dxos/echo
|
|
191
|
+
reference: import("@dxos/echo-schema").Ref<import("@dxos/echo/Type").Expando>;
|
|
194
192
|
} | {
|
|
195
193
|
pending?: boolean | undefined;
|
|
196
194
|
type: "transcription";
|
|
@@ -200,7 +198,7 @@ export declare const extractionNerFn: import("@dxos/functions").FunctionDefiniti
|
|
|
200
198
|
properties?: {
|
|
201
199
|
[x: string]: any;
|
|
202
200
|
} | undefined;
|
|
203
|
-
}, "id"> & {
|
|
201
|
+
}, "id" | typeof import("@dxos/echo-schema").EntityKindId> & {
|
|
204
202
|
id?: string;
|
|
205
203
|
} & {
|
|
206
204
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extraction-ner-function.d.ts","sourceRoot":"","sources":["../../../../../src/extraction/extraction-ner-function/extraction-ner-function.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"extraction-ner-function.d.ts","sourceRoot":"","sources":["../../../../../src/extraction/extraction-ner-function/extraction-ner-function.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqC1B,CAAC"}
|