@dxos/assistant-toolkit 0.8.4-main.9be5663bfe → 0.8.4-main.abd8ff62ef
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/neutral/{add-artifact-5TOKSVLY.mjs → add-artifact-BA5WQRDU.mjs} +7 -7
- package/dist/lib/neutral/add-artifact-BA5WQRDU.mjs.map +7 -0
- package/dist/lib/neutral/agent-M2EW5M36.mjs +65 -0
- package/dist/lib/neutral/agent-M2EW5M36.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-V77TCYSP.mjs → chunk-CLHVRIYF.mjs} +76 -29
- package/dist/lib/neutral/chunk-CLHVRIYF.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-IVXBQQDJ.mjs → chunk-CVUA23QI.mjs} +2 -2
- package/dist/lib/neutral/chunk-CVUA23QI.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-MEQYXSDY.mjs → chunk-D5MG5OKX.mjs} +5 -6
- package/dist/lib/neutral/chunk-D5MG5OKX.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-B5NOGNUG.mjs → chunk-E2XRNXWP.mjs} +7 -10
- package/dist/lib/neutral/chunk-E2XRNXWP.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-BO4ZVH7M.mjs → chunk-EJAQUAKM.mjs} +3 -3
- package/dist/lib/neutral/chunk-EJAQUAKM.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-PWGX4QYR.mjs → chunk-J37DYY7A.mjs} +7 -9
- package/dist/lib/neutral/chunk-J37DYY7A.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-TCRQCJEJ.mjs → chunk-JCYLFOFK.mjs} +9 -9
- package/dist/lib/neutral/chunk-JCYLFOFK.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-YBTLIXQK.mjs → chunk-KGU725LW.mjs} +2 -2
- package/dist/lib/neutral/{chunk-YBTLIXQK.mjs.map → chunk-KGU725LW.mjs.map} +3 -3
- package/dist/lib/neutral/{chunk-VD2WAUU2.mjs → chunk-KY2TIPJ5.mjs} +47 -17
- package/dist/lib/neutral/chunk-KY2TIPJ5.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-B35UIL3R.mjs → chunk-MMTKJBB5.mjs} +3 -3
- package/dist/lib/neutral/chunk-MMTKJBB5.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-DV5DCOUE.mjs → chunk-NR3GTWRC.mjs} +3 -2
- package/dist/lib/neutral/chunk-NR3GTWRC.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-6DPL2YY5.mjs → chunk-TO5IX24K.mjs} +3 -4
- package/dist/lib/neutral/chunk-TO5IX24K.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-MEZ4UFR6.mjs → chunk-WLR3BGO4.mjs} +2 -2
- package/dist/lib/neutral/chunk-WLR3BGO4.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-AGG6OZNB.mjs → chunk-ZFXLTBZG.mjs} +4 -5
- package/dist/lib/neutral/chunk-ZFXLTBZG.mjs.map +7 -0
- package/dist/lib/neutral/{context-add-QAHU6I24.mjs → context-add-IIDPRRVB.mjs} +3 -3
- package/dist/lib/neutral/{context-add-QAHU6I24.mjs.map → context-add-IIDPRRVB.mjs.map} +1 -1
- package/dist/lib/neutral/{context-remove-VMZPMZ4E.mjs → context-remove-RDYV4PD4.mjs} +3 -3
- package/dist/lib/neutral/{context-remove-VMZPMZ4E.mjs.map → context-remove-RDYV4PD4.mjs.map} +1 -1
- package/dist/lib/neutral/{create-project-SI5SZ7LJ.mjs → create-project-GLDEAWTT.mjs} +10 -11
- package/dist/lib/neutral/create-project-GLDEAWTT.mjs.map +7 -0
- package/dist/lib/neutral/{delete-LHMZDJFA.mjs → delete-J3PMWP7Z.mjs} +4 -4
- package/dist/lib/neutral/delete-J3PMWP7Z.mjs.map +7 -0
- package/dist/lib/neutral/{enable-blueprints-4UMPKGUD.mjs → enable-blueprints-LBDZH2CY.mjs} +3 -4
- package/dist/lib/neutral/enable-blueprints-LBDZH2CY.mjs.map +7 -0
- package/dist/lib/neutral/{fetch-TLKREIZA.mjs → fetch-KHMHV7JR.mjs} +3 -3
- package/dist/lib/neutral/{fetch-TLKREIZA.mjs.map → fetch-KHMHV7JR.mjs.map} +1 -1
- package/dist/lib/neutral/{fetch-messages-AFX7ZAVE.mjs → fetch-messages-PWGUG5G3.mjs} +8 -23
- package/dist/lib/neutral/fetch-messages-PWGUG5G3.mjs.map +7 -0
- package/dist/lib/neutral/{get-context-57JQM4HZ.mjs → get-context-B55SX5Y4.mjs} +7 -7
- package/dist/lib/neutral/get-context-B55SX5Y4.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +787 -131
- package/dist/lib/neutral/index.mjs.map +4 -4
- package/dist/lib/neutral/{load-ZTOGVHWP.mjs → load-LI7HHVD6.mjs} +3 -3
- package/dist/lib/neutral/{load-ZTOGVHWP.mjs.map → load-LI7HHVD6.mjs.map} +3 -3
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/lib/neutral/{object-create-7QCGL56E.mjs → object-create-52Z7YKIA.mjs} +4 -12
- package/dist/lib/neutral/object-create-52Z7YKIA.mjs.map +7 -0
- package/dist/lib/neutral/{object-delete-KXBWC4Q4.mjs → object-delete-I266YAXI.mjs} +3 -3
- package/dist/lib/neutral/object-delete-I266YAXI.mjs.map +7 -0
- package/dist/lib/neutral/{object-update-B7RDX3JC.mjs → object-update-HY4GI7LA.mjs} +4 -4
- package/dist/lib/neutral/object-update-HY4GI7LA.mjs.map +7 -0
- package/dist/lib/neutral/{project-3J3AJCJK.mjs → project-2YBPW5N7.mjs} +6 -6
- package/dist/lib/neutral/{project-rules-NO3QVDZS.mjs → project-rules-XUBEPDP6.mjs} +7 -7
- package/dist/lib/neutral/project-rules-XUBEPDP6.mjs.map +7 -0
- package/dist/lib/neutral/{prompt-K5CIRXOD.mjs → prompt-2WZQERT4.mjs} +39 -65
- package/dist/lib/neutral/prompt-2WZQERT4.mjs.map +7 -0
- package/dist/lib/neutral/{qualifier-KSGP4CFL.mjs → qualifier-2AC2ICOB.mjs} +12 -28
- package/dist/lib/neutral/qualifier-2AC2ICOB.mjs.map +7 -0
- package/dist/lib/neutral/{query-FMGIPWJG.mjs → query-B3NOYFCK.mjs} +4 -5
- package/dist/lib/neutral/query-B3NOYFCK.mjs.map +7 -0
- package/dist/lib/neutral/{query-MN5B3MQF.mjs → query-U56GNEV6.mjs} +4 -4
- package/dist/lib/neutral/query-U56GNEV6.mjs.map +7 -0
- package/dist/lib/neutral/{query-blueprints-EKHEZAGD.mjs → query-blueprints-KXADGHSA.mjs} +3 -4
- package/dist/lib/neutral/query-blueprints-KXADGHSA.mjs.map +7 -0
- package/dist/lib/neutral/{relation-create-FSHBM5CJ.mjs → relation-create-Z3NGW4VU.mjs} +4 -12
- package/dist/lib/neutral/relation-create-Z3NGW4VU.mjs.map +7 -0
- package/dist/lib/neutral/{relation-delete-CYYQUIZY.mjs → relation-delete-LXY7W2YO.mjs} +3 -3
- package/dist/lib/neutral/relation-delete-LXY7W2YO.mjs.map +7 -0
- package/dist/lib/neutral/{save-ZWWNTBOD.mjs → save-GWAPLT3Z.mjs} +4 -4
- package/dist/lib/neutral/save-GWAPLT3Z.mjs.map +7 -0
- package/dist/lib/neutral/{schema-add-RVV364G6.mjs → schema-add-4TXJO2V7.mjs} +3 -3
- package/dist/lib/neutral/schema-add-4TXJO2V7.mjs.map +7 -0
- package/dist/lib/neutral/{schema-list-DVKEWYIU.mjs → schema-list-PJS5AFZ3.mjs} +13 -5
- package/dist/lib/neutral/schema-list-PJS5AFZ3.mjs.map +7 -0
- package/dist/lib/neutral/{sync-issues-BBAMXSZN.mjs → sync-issues-LOLHZNFL.mjs} +8 -20
- package/dist/lib/neutral/sync-issues-LOLHZNFL.mjs.map +7 -0
- package/dist/lib/neutral/{sync-triggers-6EXPBHIQ.mjs → sync-triggers-EYJM4QWR.mjs} +39 -20
- package/dist/lib/neutral/sync-triggers-EYJM4QWR.mjs.map +7 -0
- package/dist/lib/neutral/{tag-add-OUDUBR3E.mjs → tag-add-5NOHUTIE.mjs} +4 -4
- package/dist/lib/neutral/tag-add-5NOHUTIE.mjs.map +7 -0
- package/dist/lib/neutral/{tag-remove-DI3ZSLFK.mjs → tag-remove-QTKYDJAW.mjs} +4 -4
- package/dist/lib/neutral/tag-remove-QTKYDJAW.mjs.map +7 -0
- package/dist/lib/neutral/testing/index.mjs +7 -12
- package/dist/lib/neutral/testing/index.mjs.map +3 -3
- package/dist/lib/neutral/{update-blueprints-ZNWR7BBN.mjs → update-blueprints-N2AK2VUR.mjs} +3 -4
- package/dist/lib/neutral/update-blueprints-N2AK2VUR.mjs.map +7 -0
- package/dist/lib/neutral/{update-tasks-3YZ3YXIU.mjs → update-tasks-ML2FCYU5.mjs} +7 -7
- package/dist/lib/neutral/update-tasks-ML2FCYU5.mjs.map +7 -0
- package/dist/types/src/blueprints/automation/blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/automation/blueprint.d.ts.map +1 -1
- package/dist/types/src/blueprints/blueprint-manager/blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/blueprint-manager/blueprint.d.ts.map +1 -1
- package/dist/types/src/blueprints/blueprint-manager/functions/definitions.d.ts +11 -12
- package/dist/types/src/blueprints/blueprint-manager/functions/definitions.d.ts.map +1 -1
- package/dist/types/src/blueprints/blueprint-manager/functions/enable-blueprints.d.ts +6 -7
- package/dist/types/src/blueprints/blueprint-manager/functions/enable-blueprints.d.ts.map +1 -1
- package/dist/types/src/blueprints/blueprint-manager/functions/index.d.ts +1 -1
- package/dist/types/src/blueprints/blueprint-manager/functions/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/blueprint-manager/functions/query-blueprints.d.ts +5 -6
- package/dist/types/src/blueprints/blueprint-manager/functions/query-blueprints.d.ts.map +1 -1
- package/dist/types/src/blueprints/blueprint-manager/functions/update-blueprints.d.ts +2 -3
- package/dist/types/src/blueprints/blueprint-manager/functions/update-blueprints.d.ts.map +1 -1
- package/dist/types/src/blueprints/browser/blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/browser/blueprint.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/database/blueprint.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/context-add.d.ts +1 -1
- package/dist/types/src/blueprints/database/functions/context-add.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/context-remove.d.ts +1 -1
- package/dist/types/src/blueprints/database/functions/context-remove.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/definitions.d.ts +5 -5
- package/dist/types/src/blueprints/database/functions/definitions.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/index.d.ts +1 -1
- package/dist/types/src/blueprints/database/functions/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/load.d.ts +1 -1
- package/dist/types/src/blueprints/database/functions/load.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/object-create.d.ts +1 -1
- package/dist/types/src/blueprints/database/functions/object-create.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/object-delete.d.ts +1 -1
- package/dist/types/src/blueprints/database/functions/object-delete.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/object-update.d.ts +2 -2
- package/dist/types/src/blueprints/database/functions/object-update.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/query.d.ts +3 -3
- package/dist/types/src/blueprints/database/functions/query.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/relation-create.d.ts +2 -2
- package/dist/types/src/blueprints/database/functions/relation-create.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/relation-delete.d.ts +1 -1
- package/dist/types/src/blueprints/database/functions/relation-delete.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/schema-add.d.ts +1 -1
- package/dist/types/src/blueprints/database/functions/schema-add.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/schema-list.d.ts +1 -1
- package/dist/types/src/blueprints/database/functions/schema-list.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/tag-add.d.ts +1 -1
- package/dist/types/src/blueprints/database/functions/tag-add.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/tag-remove.d.ts +1 -1
- package/dist/types/src/blueprints/database/functions/tag-remove.d.ts.map +1 -1
- package/dist/types/src/blueprints/discord/blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/discord/blueprint.d.ts.map +1 -1
- package/dist/types/src/blueprints/discord/functions/definitions.d.ts +2 -3
- package/dist/types/src/blueprints/discord/functions/definitions.d.ts.map +1 -1
- package/dist/types/src/blueprints/discord/functions/fetch-messages.d.ts +2 -3
- package/dist/types/src/blueprints/discord/functions/fetch-messages.d.ts.map +1 -1
- package/dist/types/src/blueprints/discord/functions/index.d.ts +1 -1
- package/dist/types/src/blueprints/discord/functions/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/github/functions/definitions.d.ts +2 -3
- package/dist/types/src/blueprints/github/functions/definitions.d.ts.map +1 -1
- package/dist/types/src/blueprints/github/functions/fetch-prs.d.ts +2 -3
- package/dist/types/src/blueprints/github/functions/fetch-prs.d.ts.map +1 -1
- package/dist/types/src/blueprints/github/functions/index.d.ts +1 -1
- package/dist/types/src/blueprints/github/functions/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/index.d.ts +0 -3
- package/dist/types/src/blueprints/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/linear/blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/linear/blueprint.d.ts.map +1 -1
- package/dist/types/src/blueprints/linear/functions/definitions.d.ts +2 -3
- package/dist/types/src/blueprints/linear/functions/definitions.d.ts.map +1 -1
- package/dist/types/src/blueprints/linear/functions/index.d.ts +1 -1
- package/dist/types/src/blueprints/linear/functions/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/linear/functions/sync-issues.d.ts +2 -3
- package/dist/types/src/blueprints/linear/functions/sync-issues.d.ts.map +1 -1
- package/dist/types/src/blueprints/memory/blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/memory/blueprint.d.ts.map +1 -1
- package/dist/types/src/blueprints/memory/functions/definitions.d.ts +4 -4
- package/dist/types/src/blueprints/memory/functions/definitions.d.ts.map +1 -1
- package/dist/types/src/blueprints/memory/functions/delete.d.ts +2 -2
- package/dist/types/src/blueprints/memory/functions/delete.d.ts.map +1 -1
- package/dist/types/src/blueprints/memory/functions/index.d.ts +1 -1
- package/dist/types/src/blueprints/memory/functions/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/memory/functions/query.d.ts +2 -2
- package/dist/types/src/blueprints/memory/functions/query.d.ts.map +1 -1
- package/dist/types/src/blueprints/memory/functions/save.d.ts +2 -2
- package/dist/types/src/blueprints/memory/functions/save.d.ts.map +1 -1
- package/dist/types/src/blueprints/planning/blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/planning/blueprint.d.ts.map +1 -1
- package/dist/types/src/blueprints/planning/functions/definitions.d.ts +3 -3
- package/dist/types/src/blueprints/planning/functions/definitions.d.ts.map +1 -1
- package/dist/types/src/blueprints/planning/functions/index.d.ts +1 -1
- package/dist/types/src/blueprints/planning/functions/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/planning/functions/update-tasks.d.ts +3 -3
- package/dist/types/src/blueprints/planning/functions/update-tasks.d.ts.map +1 -1
- package/dist/types/src/blueprints/project/blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/project/blueprint.d.ts.map +1 -1
- package/dist/types/src/blueprints/project/functions/add-artifact.d.ts +2 -2
- package/dist/types/src/blueprints/project/functions/add-artifact.d.ts.map +1 -1
- package/dist/types/src/blueprints/project/functions/agent.d.ts +1 -1
- package/dist/types/src/blueprints/project/functions/agent.d.ts.map +1 -1
- package/dist/types/src/blueprints/project/functions/definitions.d.ts +46 -39
- package/dist/types/src/blueprints/project/functions/definitions.d.ts.map +1 -1
- package/dist/types/src/blueprints/project/functions/get-context.d.ts +4 -4
- package/dist/types/src/blueprints/project/functions/get-context.d.ts.map +1 -1
- package/dist/types/src/blueprints/project/functions/index.d.ts +1 -1
- package/dist/types/src/blueprints/project/functions/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/project/functions/qualifier.d.ts +20 -16
- package/dist/types/src/blueprints/project/functions/qualifier.d.ts.map +1 -1
- package/dist/types/src/blueprints/project-wizard/blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/project-wizard/blueprint.d.ts.map +1 -1
- package/dist/types/src/blueprints/project-wizard/functions/create-project.d.ts +20 -17
- package/dist/types/src/blueprints/project-wizard/functions/create-project.d.ts.map +1 -1
- package/dist/types/src/blueprints/project-wizard/functions/definitions.d.ts +36 -29
- package/dist/types/src/blueprints/project-wizard/functions/definitions.d.ts.map +1 -1
- package/dist/types/src/blueprints/project-wizard/functions/index.d.ts +1 -1
- package/dist/types/src/blueprints/project-wizard/functions/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/project-wizard/functions/project-rules.d.ts +1 -1
- package/dist/types/src/blueprints/project-wizard/functions/project-rules.d.ts.map +1 -1
- package/dist/types/src/blueprints/project-wizard/functions/sync-triggers.d.ts +17 -13
- package/dist/types/src/blueprints/project-wizard/functions/sync-triggers.d.ts.map +1 -1
- package/dist/types/src/blueprints/testing.d.ts +5 -13
- package/dist/types/src/blueprints/testing.d.ts.map +1 -1
- package/dist/types/src/blueprints/websearch/blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/websearch/blueprint.d.ts.map +1 -1
- package/dist/types/src/blueprints/websearch/functions/definitions.d.ts +1 -1
- package/dist/types/src/blueprints/websearch/functions/definitions.d.ts.map +1 -1
- package/dist/types/src/blueprints/websearch/functions/fetch.d.ts +1 -1
- package/dist/types/src/blueprints/websearch/functions/fetch.d.ts.map +1 -1
- package/dist/types/src/blueprints/websearch/functions/index.d.ts +1 -1
- package/dist/types/src/blueprints/websearch/functions/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/websearch/index.d.ts +1 -1
- package/dist/types/src/blueprints/websearch/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/websearch/toolkit.d.ts +2 -2
- package/dist/types/src/blueprints/websearch/toolkit.d.ts.map +1 -1
- package/dist/types/src/crud/graph.d.ts +1 -1
- package/dist/types/src/crud/graph.d.ts.map +1 -1
- package/dist/types/src/errors.d.ts +6 -6
- package/dist/types/src/errors.d.ts.map +1 -1
- package/dist/types/src/functions/agent/definitions.d.ts +15 -15
- package/dist/types/src/functions/agent/definitions.d.ts.map +1 -1
- package/dist/types/src/functions/agent/index.d.ts +1 -1
- package/dist/types/src/functions/agent/index.d.ts.map +1 -1
- package/dist/types/src/functions/agent/prompt.d.ts +1 -1
- package/dist/types/src/functions/agent/prompt.d.ts.map +1 -1
- package/dist/types/src/functions/index.d.ts +0 -2
- package/dist/types/src/functions/index.d.ts.map +1 -1
- package/dist/types/src/sync/sync.d.ts.map +1 -1
- package/dist/types/src/testing/plugins.d.ts.map +1 -1
- package/dist/types/src/types/Agent.d.ts +19 -15
- package/dist/types/src/types/Agent.d.ts.map +1 -1
- package/dist/types/src/types/Chat.d.ts +8 -4
- package/dist/types/src/types/Chat.d.ts.map +1 -1
- package/dist/types/src/types/McpServer.d.ts +18 -0
- package/dist/types/src/types/McpServer.d.ts.map +1 -0
- package/dist/types/src/types/Memory.d.ts +1 -1
- package/dist/types/src/types/Memory.d.ts.map +1 -1
- package/dist/types/src/types/Plan.d.ts +17 -14
- package/dist/types/src/types/Plan.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +1 -0
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/util/graphql.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +25 -30
- package/src/blueprints/automation/blueprint.ts +2 -5
- package/src/blueprints/blueprint-manager/blueprint.conversations.json +1 -1
- package/src/blueprints/blueprint-manager/blueprint.test.ts +59 -37
- package/src/blueprints/blueprint-manager/blueprint.ts +2 -3
- package/src/blueprints/blueprint-manager/functions/definitions.ts +2 -3
- package/src/blueprints/blueprint-manager/functions/enable-blueprints.ts +1 -2
- package/src/blueprints/blueprint-manager/functions/index.ts +1 -1
- package/src/blueprints/blueprint-manager/functions/query-blueprints.ts +1 -2
- package/src/blueprints/blueprint-manager/functions/update-blueprints.ts +1 -2
- package/src/blueprints/browser/blueprint.test.ts +6 -8
- package/src/blueprints/browser/blueprint.ts +2 -3
- package/src/blueprints/database/blueprint.conversations.json +1 -1
- package/src/blueprints/database/blueprint.test.ts +49 -8
- package/src/blueprints/database/blueprint.ts +2 -3
- package/src/blueprints/database/functions/context-add.ts +1 -1
- package/src/blueprints/database/functions/context-remove.ts +1 -1
- package/src/blueprints/database/functions/definitions.ts +1 -1
- package/src/blueprints/database/functions/index.ts +1 -1
- package/src/blueprints/database/functions/load.ts +1 -1
- package/src/blueprints/database/functions/object-create.ts +1 -1
- package/src/blueprints/database/functions/object-delete.ts +1 -1
- package/src/blueprints/database/functions/object-update.ts +2 -2
- package/src/blueprints/database/functions/query.ts +2 -3
- package/src/blueprints/database/functions/relation-create.ts +1 -1
- package/src/blueprints/database/functions/relation-delete.ts +1 -1
- package/src/blueprints/database/functions/schema-add.ts +1 -1
- package/src/blueprints/database/functions/schema-list.ts +16 -10
- package/src/blueprints/database/functions/tag-add.ts +2 -2
- package/src/blueprints/database/functions/tag-remove.ts +2 -2
- package/src/blueprints/discord/blueprint.ts +2 -3
- package/src/blueprints/discord/functions/definitions.ts +2 -3
- package/src/blueprints/discord/functions/fetch-messages.test.ts +15 -26
- package/src/blueprints/discord/functions/fetch-messages.ts +4 -5
- package/src/blueprints/discord/functions/index.ts +1 -1
- package/src/blueprints/github/functions/definitions.ts +2 -3
- package/src/blueprints/github/functions/fetch-prs.ts +3 -3
- package/src/blueprints/github/functions/index.ts +1 -1
- package/src/blueprints/index.ts +0 -3
- package/src/blueprints/linear/blueprint.ts +2 -3
- package/src/blueprints/linear/functions/definitions.ts +2 -3
- package/src/blueprints/linear/functions/index.ts +1 -1
- package/src/blueprints/linear/functions/linear.test.ts +4 -5
- package/src/blueprints/linear/functions/sync-issues.ts +3 -3
- package/src/blueprints/memory/blueprint.conversations.json +1 -1
- package/src/blueprints/memory/blueprint.test.ts +5 -5
- package/src/blueprints/memory/blueprint.ts +3 -4
- package/src/blueprints/memory/functions/definitions.ts +1 -1
- package/src/blueprints/memory/functions/delete.ts +1 -1
- package/src/blueprints/memory/functions/index.ts +1 -1
- package/src/blueprints/memory/functions/query.ts +1 -1
- package/src/blueprints/memory/functions/save.ts +1 -1
- package/src/blueprints/planning/blueprint.ts +2 -3
- package/src/blueprints/planning/functions/definitions.ts +1 -1
- package/src/blueprints/planning/functions/index.ts +1 -1
- package/src/blueprints/planning/functions/update-tasks.ts +2 -2
- package/src/blueprints/project/blueprint.conversations.json +1 -1
- package/src/blueprints/project/blueprint.test.ts +127 -36
- package/src/blueprints/project/blueprint.ts +6 -7
- package/src/blueprints/project/functions/add-artifact.ts +2 -2
- package/src/blueprints/project/functions/agent.ts +15 -37
- package/src/blueprints/project/functions/definitions.ts +5 -8
- package/src/blueprints/project/functions/get-context.ts +3 -3
- package/src/blueprints/project/functions/index.ts +1 -1
- package/src/blueprints/project/functions/qualifier.ts +5 -5
- package/src/blueprints/project-wizard/blueprint.ts +12 -8
- package/src/blueprints/project-wizard/functions/create-project.ts +3 -4
- package/src/blueprints/project-wizard/functions/definitions.ts +3 -4
- package/src/blueprints/project-wizard/functions/index.ts +1 -1
- package/src/blueprints/project-wizard/functions/project-rules.ts +2 -2
- package/src/blueprints/project-wizard/functions/sync-triggers.ts +34 -15
- package/src/blueprints/testing.ts +7 -21
- package/src/blueprints/websearch/blueprint.conversations.json +1 -1
- package/src/blueprints/websearch/blueprint.test.ts +4 -4
- package/src/blueprints/websearch/blueprint.ts +2 -3
- package/src/blueprints/websearch/functions/definitions.ts +1 -1
- package/src/blueprints/websearch/functions/fetch.ts +1 -1
- package/src/blueprints/websearch/functions/index.ts +1 -1
- package/src/blueprints/websearch/index.ts +1 -1
- package/src/blueprints/websearch/toolkit.ts +2 -2
- package/src/crud/graph.test.ts +10 -12
- package/src/functions/agent/definitions.ts +5 -7
- package/src/functions/agent/index.ts +1 -1
- package/src/functions/agent/prompt.conversations.json +1 -1
- package/src/functions/agent/prompt.test.ts +5 -6
- package/src/functions/agent/prompt.ts +44 -42
- package/src/functions/index.ts +0 -2
- package/src/sync/sync.ts +18 -7
- package/src/testing/plugins.tsx +9 -7
- package/src/types/Agent.ts +51 -20
- package/src/types/Chat.ts +1 -0
- package/src/types/McpServer.ts +37 -0
- package/src/types/Memory.ts +2 -1
- package/src/types/Plan.ts +2 -2
- package/src/types/index.ts +1 -0
- package/dist/lib/neutral/add-artifact-5TOKSVLY.mjs.map +0 -7
- package/dist/lib/neutral/agent-SZV3Q7CN.mjs +0 -97
- package/dist/lib/neutral/agent-SZV3Q7CN.mjs.map +0 -7
- package/dist/lib/neutral/chunk-6DPL2YY5.mjs.map +0 -7
- package/dist/lib/neutral/chunk-6FL4C6KD.mjs +0 -86
- package/dist/lib/neutral/chunk-6FL4C6KD.mjs.map +0 -7
- package/dist/lib/neutral/chunk-AGG6OZNB.mjs.map +0 -7
- package/dist/lib/neutral/chunk-B35UIL3R.mjs.map +0 -7
- package/dist/lib/neutral/chunk-B5NOGNUG.mjs.map +0 -7
- package/dist/lib/neutral/chunk-BO4ZVH7M.mjs.map +0 -7
- package/dist/lib/neutral/chunk-DV5DCOUE.mjs.map +0 -7
- package/dist/lib/neutral/chunk-ILZ2ODWC.mjs +0 -95
- package/dist/lib/neutral/chunk-ILZ2ODWC.mjs.map +0 -7
- package/dist/lib/neutral/chunk-IVXBQQDJ.mjs.map +0 -7
- package/dist/lib/neutral/chunk-LI6VMCJW.mjs +0 -27
- package/dist/lib/neutral/chunk-LI6VMCJW.mjs.map +0 -7
- package/dist/lib/neutral/chunk-MEQYXSDY.mjs.map +0 -7
- package/dist/lib/neutral/chunk-MEZ4UFR6.mjs.map +0 -7
- package/dist/lib/neutral/chunk-PWGX4QYR.mjs.map +0 -7
- package/dist/lib/neutral/chunk-RW4H4TKD.mjs +0 -694
- package/dist/lib/neutral/chunk-RW4H4TKD.mjs.map +0 -7
- package/dist/lib/neutral/chunk-TCRQCJEJ.mjs.map +0 -7
- package/dist/lib/neutral/chunk-V77TCYSP.mjs.map +0 -7
- package/dist/lib/neutral/chunk-VD2WAUU2.mjs.map +0 -7
- package/dist/lib/neutral/chunk-VDEDVOS6.mjs +0 -39
- package/dist/lib/neutral/chunk-VDEDVOS6.mjs.map +0 -7
- package/dist/lib/neutral/chunk-XT5ZSUS6.mjs +0 -363
- package/dist/lib/neutral/chunk-XT5ZSUS6.mjs.map +0 -7
- package/dist/lib/neutral/create-P6I22VS5.mjs +0 -23
- package/dist/lib/neutral/create-P6I22VS5.mjs.map +0 -7
- package/dist/lib/neutral/create-project-SI5SZ7LJ.mjs.map +0 -7
- package/dist/lib/neutral/delete-LHMZDJFA.mjs.map +0 -7
- package/dist/lib/neutral/document-create-53ZVNGFR.mjs +0 -57
- package/dist/lib/neutral/document-create-53ZVNGFR.mjs.map +0 -7
- package/dist/lib/neutral/enable-blueprints-4UMPKGUD.mjs.map +0 -7
- package/dist/lib/neutral/entity-extraction-B2CTBGNA.mjs +0 -196
- package/dist/lib/neutral/entity-extraction-B2CTBGNA.mjs.map +0 -7
- package/dist/lib/neutral/exa-P4G3DCYB.mjs +0 -28
- package/dist/lib/neutral/exa-P4G3DCYB.mjs.map +0 -7
- package/dist/lib/neutral/fetch-messages-AFX7ZAVE.mjs.map +0 -7
- package/dist/lib/neutral/get-context-57JQM4HZ.mjs.map +0 -7
- package/dist/lib/neutral/mock-2ARYZ54S.mjs +0 -556
- package/dist/lib/neutral/mock-2ARYZ54S.mjs.map +0 -7
- package/dist/lib/neutral/object-create-7QCGL56E.mjs.map +0 -7
- package/dist/lib/neutral/object-delete-KXBWC4Q4.mjs.map +0 -7
- package/dist/lib/neutral/object-update-B7RDX3JC.mjs.map +0 -7
- package/dist/lib/neutral/project-rules-NO3QVDZS.mjs.map +0 -7
- package/dist/lib/neutral/prompt-K5CIRXOD.mjs.map +0 -7
- package/dist/lib/neutral/qualifier-KSGP4CFL.mjs.map +0 -7
- package/dist/lib/neutral/query-FMGIPWJG.mjs.map +0 -7
- package/dist/lib/neutral/query-MN5B3MQF.mjs.map +0 -7
- package/dist/lib/neutral/query-blueprints-EKHEZAGD.mjs.map +0 -7
- package/dist/lib/neutral/read-JJN7YXHI.mjs +0 -19
- package/dist/lib/neutral/read-JJN7YXHI.mjs.map +0 -7
- package/dist/lib/neutral/relation-create-FSHBM5CJ.mjs.map +0 -7
- package/dist/lib/neutral/relation-delete-CYYQUIZY.mjs.map +0 -7
- package/dist/lib/neutral/research-7JQEX7MU.mjs +0 -109
- package/dist/lib/neutral/research-7JQEX7MU.mjs.map +0 -7
- package/dist/lib/neutral/save-ZWWNTBOD.mjs.map +0 -7
- package/dist/lib/neutral/schema-add-RVV364G6.mjs.map +0 -7
- package/dist/lib/neutral/schema-list-DVKEWYIU.mjs.map +0 -7
- package/dist/lib/neutral/sync-issues-BBAMXSZN.mjs.map +0 -7
- package/dist/lib/neutral/sync-triggers-6EXPBHIQ.mjs.map +0 -7
- package/dist/lib/neutral/tag-add-OUDUBR3E.mjs.map +0 -7
- package/dist/lib/neutral/tag-remove-DI3ZSLFK.mjs.map +0 -7
- package/dist/lib/neutral/update-J64AYUS5.mjs +0 -20
- package/dist/lib/neutral/update-J64AYUS5.mjs.map +0 -7
- package/dist/lib/neutral/update-blueprints-ZNWR7BBN.mjs.map +0 -7
- package/dist/lib/neutral/update-tasks-3YZ3YXIU.mjs.map +0 -7
- package/dist/types/src/blueprints/design/blueprint.d.ts +0 -4
- package/dist/types/src/blueprints/design/blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/design/blueprint.test.d.ts +0 -2
- package/dist/types/src/blueprints/design/blueprint.test.d.ts.map +0 -1
- package/dist/types/src/blueprints/design/index.d.ts +0 -2
- package/dist/types/src/blueprints/design/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/markdown/blueprint.d.ts +0 -4
- package/dist/types/src/blueprints/markdown/blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/markdown/functions/create.d.ts +0 -8
- package/dist/types/src/blueprints/markdown/functions/create.d.ts.map +0 -1
- package/dist/types/src/blueprints/markdown/functions/definitions.d.ts +0 -45
- package/dist/types/src/blueprints/markdown/functions/definitions.d.ts.map +0 -1
- package/dist/types/src/blueprints/markdown/functions/index.d.ts +0 -4
- package/dist/types/src/blueprints/markdown/functions/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/markdown/functions/read.d.ts +0 -17
- package/dist/types/src/blueprints/markdown/functions/read.d.ts.map +0 -1
- package/dist/types/src/blueprints/markdown/functions/update.d.ts +0 -16
- package/dist/types/src/blueprints/markdown/functions/update.d.ts.map +0 -1
- package/dist/types/src/blueprints/markdown/index.d.ts +0 -3
- package/dist/types/src/blueprints/markdown/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning-old/blueprint.d.ts +0 -4
- package/dist/types/src/blueprints/planning-old/blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning-old/blueprint.test.d.ts +0 -2
- package/dist/types/src/blueprints/planning-old/blueprint.test.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning-old/functions/definitions.d.ts +0 -31
- package/dist/types/src/blueprints/planning-old/functions/definitions.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning-old/functions/index.d.ts +0 -4
- package/dist/types/src/blueprints/planning-old/functions/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning-old/functions/read.d.ts +0 -17
- package/dist/types/src/blueprints/planning-old/functions/read.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning-old/functions/task-list.d.ts +0 -74
- package/dist/types/src/blueprints/planning-old/functions/task-list.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning-old/functions/task-list.test.d.ts +0 -2
- package/dist/types/src/blueprints/planning-old/functions/task-list.test.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning-old/functions/update.d.ts +0 -19
- package/dist/types/src/blueprints/planning-old/functions/update.d.ts.map +0 -1
- package/dist/types/src/blueprints/planning-old/index.d.ts +0 -3
- package/dist/types/src/blueprints/planning-old/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/blueprint.d.ts +0 -4
- package/dist/types/src/blueprints/research/blueprint.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/blueprint.test.d.ts +0 -2
- package/dist/types/src/blueprints/research/blueprint.test.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/functions/definitions.d.ts +0 -21
- package/dist/types/src/blueprints/research/functions/definitions.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/functions/document-create.d.ts +0 -12
- package/dist/types/src/blueprints/research/functions/document-create.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/functions/index.d.ts +0 -4
- package/dist/types/src/blueprints/research/functions/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/functions/research.d.ts +0 -18
- package/dist/types/src/blueprints/research/functions/research.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/functions/research.test.d.ts +0 -2
- package/dist/types/src/blueprints/research/functions/research.test.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/index.d.ts +0 -4
- package/dist/types/src/blueprints/research/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/types/ResearchGraph.d.ts +0 -24
- package/dist/types/src/blueprints/research/types/ResearchGraph.d.ts.map +0 -1
- package/dist/types/src/blueprints/research/types/index.d.ts +0 -7
- package/dist/types/src/blueprints/research/types/index.d.ts.map +0 -1
- package/dist/types/src/functions/entity-extraction/definitions.d.ts +0 -182
- package/dist/types/src/functions/entity-extraction/definitions.d.ts.map +0 -1
- package/dist/types/src/functions/entity-extraction/entity-extraction.d.ts +0 -4
- package/dist/types/src/functions/entity-extraction/entity-extraction.d.ts.map +0 -1
- package/dist/types/src/functions/entity-extraction/entity-extraction.test.d.ts +0 -2
- package/dist/types/src/functions/entity-extraction/entity-extraction.test.d.ts.map +0 -1
- package/dist/types/src/functions/entity-extraction/index.d.ts +0 -4
- package/dist/types/src/functions/entity-extraction/index.d.ts.map +0 -1
- package/dist/types/src/functions/exa/data/exa-search-1748337321991.d.ts +0 -38
- package/dist/types/src/functions/exa/data/exa-search-1748337321991.d.ts.map +0 -1
- package/dist/types/src/functions/exa/data/exa-search-1748337331526.d.ts +0 -37
- package/dist/types/src/functions/exa/data/exa-search-1748337331526.d.ts.map +0 -1
- package/dist/types/src/functions/exa/data/exa-search-1748337344119.d.ts +0 -58
- package/dist/types/src/functions/exa/data/exa-search-1748337344119.d.ts.map +0 -1
- package/dist/types/src/functions/exa/data/index.d.ts +0 -3
- package/dist/types/src/functions/exa/data/index.d.ts.map +0 -1
- package/dist/types/src/functions/exa/definitions.d.ts +0 -9
- package/dist/types/src/functions/exa/definitions.d.ts.map +0 -1
- package/dist/types/src/functions/exa/exa.d.ts +0 -7
- package/dist/types/src/functions/exa/exa.d.ts.map +0 -1
- package/dist/types/src/functions/exa/index.d.ts +0 -4
- package/dist/types/src/functions/exa/index.d.ts.map +0 -1
- package/dist/types/src/functions/exa/mock.d.ts +0 -6
- package/dist/types/src/functions/exa/mock.d.ts.map +0 -1
- package/src/blueprints/browser/blueprint.conversations.json +0 -1
- package/src/blueprints/design/blueprint.test.ts +0 -97
- package/src/blueprints/design/blueprint.ts +0 -41
- package/src/blueprints/design/index.ts +0 -5
- package/src/blueprints/markdown/blueprint.ts +0 -36
- package/src/blueprints/markdown/functions/create.ts +0 -20
- package/src/blueprints/markdown/functions/definitions.ts +0 -80
- package/src/blueprints/markdown/functions/index.ts +0 -13
- package/src/blueprints/markdown/functions/read.ts +0 -22
- package/src/blueprints/markdown/functions/update.ts +0 -22
- package/src/blueprints/markdown/index.ts +0 -11
- package/src/blueprints/planning-old/blueprint.test.ts +0 -122
- package/src/blueprints/planning-old/blueprint.ts +0 -106
- package/src/blueprints/planning-old/functions/definitions.ts +0 -53
- package/src/blueprints/planning-old/functions/index.ts +0 -12
- package/src/blueprints/planning-old/functions/read.ts +0 -24
- package/src/blueprints/planning-old/functions/task-list.test.ts +0 -99
- package/src/blueprints/planning-old/functions/task-list.ts +0 -165
- package/src/blueprints/planning-old/functions/update.ts +0 -31
- package/src/blueprints/planning-old/index.ts +0 -6
- package/src/blueprints/research/blueprint.test.ts +0 -7
- package/src/blueprints/research/blueprint.ts +0 -61
- package/src/blueprints/research/functions/definitions.ts +0 -87
- package/src/blueprints/research/functions/document-create.ts +0 -50
- package/src/blueprints/research/functions/index.ts +0 -12
- package/src/blueprints/research/functions/research-instructions.tpl +0 -106
- package/src/blueprints/research/functions/research.conversations.json +0 -1
- package/src/blueprints/research/functions/research.test.ts +0 -150
- package/src/blueprints/research/functions/research.ts +0 -137
- package/src/blueprints/research/index.ts +0 -7
- package/src/blueprints/research/types/ResearchGraph.ts +0 -62
- package/src/blueprints/research/types/index.ts +0 -32
- package/src/functions/entity-extraction/definitions.ts +0 -44
- package/src/functions/entity-extraction/entity-extraction.conversations.json +0 -1
- package/src/functions/entity-extraction/entity-extraction.test.ts +0 -74
- package/src/functions/entity-extraction/entity-extraction.ts +0 -159
- package/src/functions/entity-extraction/index.ts +0 -9
- package/src/functions/exa/data/exa-search-1748337321991.ts +0 -131
- package/src/functions/exa/data/exa-search-1748337331526.ts +0 -144
- package/src/functions/exa/data/exa-search-1748337344119.ts +0 -133
- package/src/functions/exa/data/index.ts +0 -11
- package/src/functions/exa/definitions.ts +0 -37
- package/src/functions/exa/exa.ts +0 -32
- package/src/functions/exa/index.ts +0 -12
- package/src/functions/exa/mock.ts +0 -62
- /package/dist/lib/neutral/{project-3J3AJCJK.mjs.map → project-2YBPW5N7.mjs.map} +0 -0
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/blueprints/markdown/functions/index.ts", "../../../src/blueprints/markdown/blueprint.ts", "../../../src/blueprints/design/blueprint.ts", "../../../src/blueprints/discord/functions/index.ts", "../../../src/blueprints/discord/blueprint.ts", "../../../src/blueprints/linear/functions/index.ts", "../../../src/blueprints/linear/blueprint.ts", "../../../src/blueprints/planning/functions/index.ts", "../../../src/blueprints/planning/blueprint.ts", "../../../src/blueprints/research/functions/index.ts", "../../../src/blueprints/research/blueprint.ts", "../../../src/blueprints/websearch/functions/index.ts", "../../../src/blueprints/websearch/blueprint.ts", "../../../src/blueprints/websearch/toolkit.ts", "../../../src/blueprints/browser/blueprint.ts", "../../../src/blueprints/database/functions/index.ts", "../../../src/blueprints/database/blueprint.ts", "../../../src/blueprints/memory/functions/index.ts", "../../../src/blueprints/memory/blueprint.ts", "../../../src/blueprints/automation/blueprint.ts", "../../../src/blueprints/blueprint-manager/functions/index.ts", "../../../src/blueprints/blueprint-manager/blueprint.ts", "../../../src/blueprints/project-wizard/functions/index.ts", "../../../src/blueprints/project-wizard/blueprint.ts", "../../../src/functions/entity-extraction/definitions.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { OperationHandlerSet } from '@dxos/operation';\n\nexport * from './definitions';\n\nexport const MarkdownHandlers = OperationHandlerSet.lazy(\n () => import('./create'),\n () => import('./read'),\n () => import('./update'),\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type AppCapabilities } from '@dxos/app-toolkit';\nimport { Blueprint } from '@dxos/blueprints';\nimport { Ref } from '@dxos/echo';\nimport { Text } from '@dxos/schema';\nimport { trim } from '@dxos/util';\n\nimport { Create, Read, Update } from './functions';\n\nconst BLUEPRINT_KEY = 'org.dxos.blueprint.markdown';\n\nconst instructions = trim`\n You read, write & create markdown documents.\n`;\n\nconst make = () =>\n Blueprint.make({\n key: BLUEPRINT_KEY,\n name: 'Markdown',\n description: 'Work with markdown documents.',\n agentCanEnable: true,\n instructions: {\n source: Ref.make(Text.make(instructions)),\n },\n tools: Blueprint.toolDefinitions({ operations: [Create, Read, Update] }),\n });\n\nconst blueprint: AppCapabilities.BlueprintDefinition = {\n key: BLUEPRINT_KEY,\n make,\n};\n\nexport default blueprint;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type AppCapabilities } from '@dxos/app-toolkit';\nimport { Blueprint } from '@dxos/blueprints';\nimport { Ref } from '@dxos/echo';\nimport { Text } from '@dxos/schema';\nimport { trim } from '@dxos/util';\n\nimport { MarkdownCreate, MarkdownRead, MarkdownUpdate } from '../markdown';\n\nconst BLUEPRINT_KEY = 'org.dxos.blueprint.design';\n\nconst instructions = trim`\n You manage a design spec based on the conversation.\n The design spec is a markdown document that is used to record the tasks.\n The design spec document follows a hierarchical structure, with nested markdown bulleted sections.\n Use the appropriate tools to read and write the design spec document.\n Maintain the document so that it can convey all relevant points from the conversation.\n When replying to the user, be terse with your comments about design doc handling.\n Do not announce when you read or write the design spec document.\n`;\n\nconst make = () =>\n Blueprint.make({\n key: BLUEPRINT_KEY,\n name: 'Design Spec',\n description: 'Preserve the conversation in the design spec.',\n instructions: {\n source: Ref.make(Text.make(instructions)),\n },\n tools: Blueprint.toolDefinitions({ operations: [MarkdownCreate, MarkdownRead, MarkdownUpdate] }),\n });\n\nconst blueprint: AppCapabilities.BlueprintDefinition = {\n key: BLUEPRINT_KEY,\n make,\n};\n\nexport default blueprint;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { OperationHandlerSet } from '@dxos/operation';\n\nexport * from './definitions';\n\nexport const DiscordHandlers = OperationHandlerSet.lazy(() => import('./fetch-messages'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type AppCapabilities } from '@dxos/app-toolkit';\nimport { Blueprint } from '@dxos/blueprints';\nimport { Ref } from '@dxos/echo';\nimport { Text } from '@dxos/schema';\nimport { trim } from '@dxos/util';\n\nimport { FetchMessages } from './functions';\n\nconst BLUEPRINT_KEY = 'org.dxos.blueprint.discord';\n\n/**\n * Agent prompt instructions for managing hierarchical task lists.\n */\nconst instructions = trim`\n You are able to fetch messages from Discord servers.\n\n Known servers:\n\n DXOS serverId: 837138313172353095\n`;\n\nconst make = () =>\n Blueprint.make({\n key: BLUEPRINT_KEY,\n name: 'Discord',\n description: 'Discord integration.',\n instructions: {\n source: Ref.make(Text.make(instructions)),\n },\n tools: Blueprint.toolDefinitions({ operations: [FetchMessages] }),\n });\n\nconst blueprint: AppCapabilities.BlueprintDefinition = {\n key: BLUEPRINT_KEY,\n make,\n};\n\nexport default blueprint;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { OperationHandlerSet } from '@dxos/operation';\n\nexport * from './definitions';\n\nexport const LinearHandlers = OperationHandlerSet.lazy(() => import('./sync-issues'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type AppCapabilities } from '@dxos/app-toolkit';\nimport { Blueprint } from '@dxos/blueprints';\nimport { Ref } from '@dxos/echo';\nimport { Text } from '@dxos/schema';\nimport { trim } from '@dxos/util';\n\nimport { SyncIssues } from './functions';\n\nconst BLUEPRINT_KEY = 'org.dxos.blueprint.linear';\n\n/**\n * Agent prompt instructions for managing hierarchical task lists.\n */\nconst instructions = trim`\n You are able to sync Linear workspaces.\n Sometimes sync does not complete in one go and you need to call the function again.\n\n Known workspaces:\n\n DXOS teamId: 1127c63a-6f77-4725-9229-50f6cd47321c\n`;\n\nconst make = () =>\n Blueprint.make({\n key: BLUEPRINT_KEY,\n name: 'Linear',\n description: 'Syncs Linear workspaces.',\n instructions: {\n source: Ref.make(Text.make(instructions)),\n },\n tools: Blueprint.toolDefinitions({ operations: [SyncIssues] }),\n });\n\nconst blueprint: AppCapabilities.BlueprintDefinition = {\n key: BLUEPRINT_KEY,\n make,\n};\n\nexport default blueprint;\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport { OperationHandlerSet } from '@dxos/operation';\n\nexport * from './definitions';\n\nexport const PlanningHandlers = OperationHandlerSet.lazy(() => import('./update-tasks'));\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport { type AppCapabilities } from '@dxos/app-toolkit';\nimport { Blueprint } from '@dxos/blueprints';\n\nimport { UpdateTasks } from './functions';\n\nconst BLUEPRINT_KEY = 'org.dxos.blueprint.planning';\n\nconst make = () =>\n Blueprint.make({\n key: BLUEPRINT_KEY,\n name: 'Planning',\n description: 'Plans and tracks complex tasks with artifact management.',\n tools: Blueprint.toolDefinitions({ operations: [UpdateTasks] }),\n });\n\nconst blueprint: AppCapabilities.BlueprintDefinition = {\n key: BLUEPRINT_KEY,\n make,\n};\n\nexport default blueprint;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { OperationHandlerSet } from '@dxos/operation';\n\nexport * from './definitions';\n\nexport const ResearchHandlers = OperationHandlerSet.lazy(\n () => import('./document-create'),\n () => import('./research'),\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type AppCapabilities } from '@dxos/app-toolkit';\nimport { Blueprint } from '@dxos/blueprints';\nimport { Ref } from '@dxos/echo';\nimport { Text } from '@dxos/schema';\nimport { trim } from '@dxos/util';\n\nimport { Research, DocumentCreate } from './functions';\n\nconst BLUEPRINT_KEY = 'org.dxos.blueprint.research';\n\n/**\n * Agent prompt instructions for managing hierarchical task lists.\n */\nconst instructions = trim`\n {{! Research }}\n\n You are an analyst that does research tasks using tools that scrape the web and create structured data.\n Structured data extraction is an experimental feature -- only enable it if the user explicitly requests it in the prompt.\n Prefer updating existing notes instead of creating new ones.\n\n <structured_mode>\n When you are done, reply with the created objects.\n Do not print the data, instead reply with inline references to the created objects.\n Those will be later substituted with the pills representing the created objects.\n Print the rest of the created objects as block references after the main note.\n\n <example>\n Based on my research, Google was founded by @dxn:queue:data:B6INSIBY3CBEF4M5VZRYBCMAHQMPYK5AJ:01K24XMVHSZHS97SG1VTVQDM5Z:01K24XPK464FSCKVQJAB2H662M and @dxn:queue:data:B6INSIBY3CBEF4M5VZRYBCMAHQMPYK5AJ:01K24XMVHSZHS97SG1VTVQDM5Z:01K24XPK46K31DDW62PBW9H2ZQ\n\n <object><dxn>dxn:queue:data:B6INSIBY3CBEF4M5VZRYBCMAHQMPYK5AJ:01K24XMVHSZHS97SG1VTVQDM5Z:01K24XPK464FSCKVQJAB2H662M</dxn></object>\n <object><dxn>dxn:queue:data:B6INSIBY3CBEF4M5VZRYBCMAHQMPYK5AJ:01K24XMVHSZHS97SG1VTVQDM5Z:01K24XPK46K31DDW62PBW9H2ZQ</dxn></object>\n <object><dxn>dxn:queue:data:B6INSIBY3CBEF4M5VZRYBCMAHQMPYK5AJ:01K24XMVHSZHS97SG1VTVQDM5Z:01K24XPK46K31DDW62PBW92333</dxn></object>\n </example>\n </structured_mode>\n\n <unstructured_mode>\n Reply normally with the text mode of the result of your research.\n </unstructured_mode>\n`;\n\nconst make = () =>\n Blueprint.make({\n key: BLUEPRINT_KEY,\n name: 'Research',\n description: 'Researches the web and creates structured data.',\n instructions: {\n source: Ref.make(Text.make(instructions)),\n },\n tools: Blueprint.toolDefinitions({ operations: [DocumentCreate, Research] }),\n });\n\nconst blueprint: AppCapabilities.BlueprintDefinition = {\n key: BLUEPRINT_KEY,\n make,\n};\n\nexport default blueprint;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { OperationHandlerSet } from '@dxos/operation';\n\nexport * from './definitions';\n\nexport const WebSearchHandlers = OperationHandlerSet.lazy(() => import('./fetch'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type AppCapabilities } from '@dxos/app-toolkit';\nimport { Blueprint } from '@dxos/blueprints';\nimport { Ref } from '@dxos/echo';\nimport { Text } from '@dxos/schema';\n\nimport { Fetch } from './functions';\n\nconst BLUEPRINT_KEY = 'org.dxos.blueprint.web-search';\n\nconst make = () =>\n Blueprint.make({\n key: BLUEPRINT_KEY,\n name: 'Web Search',\n description: 'Search the web.',\n agentCanEnable: true,\n instructions: {\n source: Ref.make(Text.make()),\n },\n tools: Blueprint.toolDefinitions({ operations: [Fetch], tools: ['AnthropicWebSearch'] }),\n });\n\nconst blueprint: AppCapabilities.BlueprintDefinition = {\n key: BLUEPRINT_KEY,\n make,\n};\n\nexport default blueprint;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as AnthropicTool from '@effect/ai-anthropic/AnthropicTool';\nimport * as Toolkit from '@effect/ai/Toolkit';\nimport * as Layer from 'effect/Layer';\n\nimport { GenericToolkit } from '@dxos/ai';\n\nexport const WebSearchToolkit = Toolkit.make(AnthropicTool.WebSearch_20250305({}));\n\nexport const WebSearchToolkitGeneric = GenericToolkit.make(WebSearchToolkit, Layer.empty);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type AppCapabilities } from '@dxos/app-toolkit';\nimport { Blueprint } from '@dxos/blueprints';\nimport { Ref } from '@dxos/echo';\nimport { Text } from '@dxos/schema';\nimport { trim } from '@dxos/util';\n\nconst BLUEPRINT_KEY = 'org.dxos.blueprint.browser';\n\nconst instructions = trim`\n You are able to connect and use a virtual browser with persistent session.\n Browser tools are provided via MCP.\n`;\n\nconst make = () =>\n Blueprint.make({\n key: BLUEPRINT_KEY,\n name: 'Browser',\n description: 'Access to a real isolated browser.',\n agentCanEnable: true,\n instructions: {\n source: Ref.make(Text.make(instructions)),\n },\n mcpServers: [\n {\n // https://dash.cloudflare.com/950816f3f59b079880a1ae33fb0ec320/workers/services/view/playwright-mcp-example/production\n url: 'https://playwright-mcp-example.dxos.workers.dev/sse',\n protocol: 'sse',\n },\n ],\n });\n\nconst blueprint: AppCapabilities.BlueprintDefinition = {\n key: BLUEPRINT_KEY,\n make,\n};\n\nexport default blueprint;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { OperationHandlerSet } from '@dxos/operation';\n\nexport * from './definitions';\n\nexport const DatabaseHandlers = OperationHandlerSet.lazy(\n () => import('./context-add'),\n () => import('./context-remove'),\n () => import('./load'),\n () => import('./object-create'),\n () => import('./object-delete'),\n () => import('./object-update'),\n () => import('./query'),\n () => import('./relation-create'),\n () => import('./relation-delete'),\n () => import('./schema-add'),\n () => import('./schema-list'),\n () => import('./tag-add'),\n () => import('./tag-remove'),\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type AppCapabilities } from '@dxos/app-toolkit';\nimport { Blueprint } from '@dxos/blueprints';\nimport { Ref } from '@dxos/echo';\nimport { Text } from '@dxos/schema';\nimport { trim } from '@dxos/util';\n\nimport {\n Query,\n Load,\n ObjectCreate,\n ObjectUpdate,\n ObjectDelete,\n SchemaAdd,\n SchemaList,\n ContextAdd,\n ContextRemove,\n RelationCreate,\n RelationDelete,\n TagAdd,\n TagRemove,\n} from './functions';\n\nconst BLUEPRINT_KEY = 'org.dxos.blueprint.database';\n\nconst instructions = trim`\n You can query, create, update, and delete objects in ECHO.\n You can manage schemas, relations, tags, and add objects to the chat context.\n`;\n\nconst make = () =>\n Blueprint.make({\n key: BLUEPRINT_KEY,\n name: 'Database',\n description: 'Query and manipulate objects in the ECHO database.',\n agentCanEnable: true,\n instructions: {\n source: Ref.make(Text.make(instructions)),\n },\n tools: Blueprint.toolDefinitions({\n operations: [\n ContextAdd,\n ContextRemove,\n Load,\n ObjectCreate,\n ObjectDelete,\n ObjectUpdate,\n Query,\n RelationCreate,\n RelationDelete,\n SchemaAdd,\n SchemaList,\n TagAdd,\n TagRemove,\n ],\n }),\n });\n\nconst blueprint: AppCapabilities.BlueprintDefinition = {\n key: BLUEPRINT_KEY,\n make,\n};\n\nexport default blueprint;\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport { OperationHandlerSet } from '@dxos/operation';\n\nexport * from './definitions';\n\nexport const MemoryHandlers = OperationHandlerSet.lazy(\n () => import('./save'),\n () => import('./query'),\n () => import('./delete'),\n);\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport { type AppCapabilities } from '@dxos/app-toolkit';\nimport { Blueprint } from '@dxos/blueprints';\nimport { Ref } from '@dxos/echo';\nimport { Text } from '@dxos/schema';\nimport { trim } from '@dxos/util';\n\nimport { QueryMemories, SaveMemory, DeleteMemory } from './functions';\n\nconst BLUEPRINT_KEY = 'dxos.org/blueprint/memory';\n\nconst instructions = trim`\n You have the ability to save and recall memories.\n Memories are persistent knowledge units stored in the database.\n Use memories to remember facts, user preferences, decisions, and any knowledge that should persist across conversations.\n\n When the user asks you to remember something, save it as a memory with a descriptive title.\n When the user asks about something you might have stored, query your memories first.\n You can also delete outdated or incorrect memories.\n`;\n\nconst make = () =>\n Blueprint.make({\n key: BLUEPRINT_KEY,\n name: 'Memory',\n description: 'Persistent memory storage and retrieval.',\n agentCanEnable: true,\n instructions: {\n source: Ref.make(Text.make(instructions)),\n },\n tools: Blueprint.toolDefinitions({ operations: [SaveMemory, QueryMemories, DeleteMemory] }),\n });\n\nconst blueprint: AppCapabilities.BlueprintDefinition = {\n key: BLUEPRINT_KEY,\n make,\n};\n\nexport default blueprint;\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport { type AppCapabilities } from '@dxos/app-toolkit';\nimport { Blueprint } from '@dxos/blueprints';\nimport { Ref } from '@dxos/echo';\nimport { Trigger } from '@dxos/functions';\nimport { Operation } from '@dxos/operation';\nimport { Text } from '@dxos/schema';\nimport { trim } from '@dxos/util';\n\nconst BLUEPRINT_KEY = 'dxos.org/blueprint/automation';\n\nconst instructions = trim`\n Automation allows you to automatically initiate actions based on events.\n Automations are configured by creating a trigger that references a function.\n Whenever event that matches the trigger occurs, the function is invoked.\n\n ## Configuration\n\n Triggers are configured by the properties of the Trigger object.\n - enabled: Must be true for trigger to run.\n - spec: Events that the trigger matches.\n - function: Ref to a ${Operation.PersistentOperation.typename} object that will be invoked. Query the functions present in the space first, and reference them in the trigger.\n - input: The spec of the input data that will be passed to the function.\n\n ## Input patterns\n\n Input to the invoked function is defined by the input property of the Trigger object.\n It's an object that supports constants or template strings.\n\n Example:\n\n {\n item: '{{event.item}}',\n instructions: 'Summarize and perform entity-extraction'\n mailbox: { '/': 'dxn:echo:AAA:ZZZ' }\n }\n\n ## Trigger kinds\n\n - Timer: Triggered by a cron schedule.\n - Queue: Subscribes and processes items begginging to end.\n Note: queues are the same as feeds. The queue DXN should be of form: dxn:queue:data:<space-id>:<queue-id>.\n - Subscription: Subscribes and processes database items based on a query.\n\n Avoid: email and webhook triggers.\n\n ## Editing triggers\n\n Triggers are represented as objects of type ${Trigger.Trigger.typename}.\n You need access to the Database blueprint to manipulate triggers.\n Read trigger schema before manipulating triggers.\n Having a Trigger object in the database is enough to setup an automation. \n\n ## Examples\n\n Timer:\n\n {\n \"function\": { \"/\": \"dxn:echo:AAA:ZZZ\" },\n \"enabled\": true,\n \"spec\": {\n \"kind\": \"timer\",\n \"cron\": \"*/5 * * * *\"\n }\n }\n\n Queue:\n\n {\n \"function\": { \"/\": \"dxn:echo:AAA:ZZZ\" },\n \"enabled\": true,\n \"spec\": {\n \"kind\": \"queue\",\n \"queue\": \"dxn:queue:data:XXX:YYY\"\n }\n }\n\n Subscription:\n\n {\n \"function\": { \"/\": \"dxn:echo:AAA:ZZZ\" },\n \"enabled\": true,\n \"spec\": {\n \"kind\": \"subscription\",\n \"query\": { \"ast\": { \"type\": \"select\", \"filter\": { \"type\": \"object\", \"typename\": \"dxn:type:org.dxos.type.person\" } } }\n }\n }\n`;\n\nconst make = () =>\n Blueprint.make({\n key: BLUEPRINT_KEY,\n name: 'Triggers',\n description: 'Trigger management and automation.',\n instructions: {\n source: Ref.make(Text.make(instructions)),\n },\n });\n\nconst blueprint: AppCapabilities.BlueprintDefinition = {\n key: BLUEPRINT_KEY,\n make,\n};\n\nexport default blueprint;\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport { OperationHandlerSet } from '@dxos/operation';\n\nexport * from './definitions';\n\nexport const BlueprintManagerHandlers = OperationHandlerSet.lazy(\n () => import('./query-blueprints'),\n () => import('./enable-blueprints'),\n () => import('./update-blueprints'),\n);\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport { type AppCapabilities } from '@dxos/app-toolkit';\nimport { Blueprint, Template } from '@dxos/blueprints';\nimport { trim } from '@dxos/util';\n\nimport { EnableBlueprints, QueryBlueprints, UpdateBlueprints } from './functions';\n\nconst BLUEPRINT_KEY = 'org.dxos.blueprint.blueprint-manager';\n\nconst make = () =>\n Blueprint.make({\n key: BLUEPRINT_KEY,\n name: 'Blueprint Manager',\n description: 'Query and enable blueprints in the current conversation.',\n instructions: Template.make({\n source: trim`\n You can query available blueprints and enable them in the current conversation.\n Use [query-blueprints] to refresh the list of available blueprints.\n Use [refresh-blueprints] to update blueprint objects stored in the database from the built-in registry when they have drifted.\n Use [enable-blueprints] to enable blueprints by their keys. Always call [query-blueprints] first.\n Only blueprints with agentCanEnable=true can be enabled by the agent.\n\n <available_blueprints>\n {{#each blueprints}}\n - {{key}} \"{{name}}\"{{#if description}} -- {{description}}{{/if}}{{#if agentCanEnable}} [agent-can-enable]{{/if}}\n {{/each}}\n </available_blueprints>\n\n NOTE: You must enable the blueprint to use it, only then the tools from that blueprint will appear.\n `,\n inputs: [\n {\n name: 'blueprints',\n kind: 'function',\n function: QueryBlueprints.meta.key,\n },\n ],\n }),\n tools: Blueprint.toolDefinitions({ operations: [QueryBlueprints, EnableBlueprints, UpdateBlueprints] }),\n });\n\nconst blueprint: AppCapabilities.BlueprintDefinition = {\n key: BLUEPRINT_KEY,\n make,\n};\n\nexport default blueprint;\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport { OperationHandlerSet } from '@dxos/operation';\n\nexport * from './definitions';\n\nexport const AgentWizardHandlers = OperationHandlerSet.lazy(\n () => import('./create-project'),\n () => import('./project-rules'),\n () => import('./sync-triggers'),\n);\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport { type AppCapabilities } from '@dxos/app-toolkit';\nimport { Blueprint, Template } from '@dxos/blueprints';\nimport { trim } from '@dxos/util';\n\nimport { AgentRules, CreateAgent, SyncTriggers } from './functions';\n\nconst BLUEPRINT_KEY = 'org.dxos.blueprint.agent-wizard';\n\n/**\n * Creates the Agent Wizard blueprint. This is a function to avoid circular dependency issues.\n */\n// TODO(dmaretskyi): Combine with Agent Blueprint.\nconst make = () =>\n Blueprint.make({\n key: BLUEPRINT_KEY,\n name: 'Agent Wizard',\n description: 'Help the user create a new agent.',\n agentCanEnable: true,\n instructions: Template.make({\n source: trim`\n You are a wizard that helps the user create a new agent.\n\n Agents are goal oriented and autonomously driven.\n Each agent has a spec - the goal of the agent.\n The spec also typically describes what actions to perform in reaction to events (emails).\n The agent has a number of associated artifacts to work with.\n Agents can subscribe to emails.\n\n The agent itself is an ECHO object and can be edited like any other object using the database blueprint.\n You can edit the agent's spec, name, and other properties directly.\n If you edit the agent's subscriptions array, you MUST call the sync-triggers function afterward to synchronize the triggers.\n\n IMPORTANT: Before attempting to create an agent call the [agent-rules] tool to get the rules for creating an agent.\n `,\n }),\n tools: Blueprint.toolDefinitions({ operations: [AgentRules, CreateAgent, SyncTriggers] }),\n });\n\nconst blueprint: AppCapabilities.BlueprintDefinition = {\n key: BLUEPRINT_KEY,\n make,\n};\n\nexport default blueprint;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { AiService } from '@dxos/ai';\nimport { Database, Obj } from '@dxos/echo';\nimport { FunctionInvocationService, QueueService, TracingService } from '@dxos/functions';\nimport { Trace } from '@dxos/functions';\nimport { Operation } from '@dxos/operation';\nimport { Message } from '@dxos/types';\n\nexport const EntityExtraction = Operation.make({\n meta: {\n key: 'org.dxos.functions.entity-extraction',\n name: 'Entity Extraction',\n description: 'Extracts entities from emails and transcripts.',\n },\n input: Schema.Struct({\n source: Message.Message.annotations({\n description: 'Email or transcript to extract entities from.',\n }),\n // TODO(dmaretskyi): Consider making this an array of blueprints instead.\n instructions: Schema.optional(Schema.String).annotations({\n description: 'Instructions extraction process.',\n }),\n }),\n output: Schema.Struct({\n entities: Schema.optional(\n Schema.Array(Obj.Unknown).annotations({\n description: 'Extracted entities.',\n }),\n ),\n }),\n services: [\n AiService.AiService,\n Database.Service,\n TracingService,\n FunctionInvocationService,\n QueueService,\n Trace.TraceService,\n ],\n});\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,SAASA,2BAA2B;AAI7B,IAAMC,mBAAmBC,oBAAoBC,KAClD,M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KAAK;EACbE,KAAKH;EACLI,MAAM;EACNC,aAAa;EACbC,gBAAgB;EAChBC,cAAcC,UAASP,KAAK;IAC1BQ,QAAQC;;;;;;;;;;;;;;;EAeV,CAAA;EACAC,OAAOT,YAAUU,gBAAgB;IAAEC,YAAY;MAACC;MAAYC;MAAaC;;EAAc,CAAA;AACzF,CAAA;AAEF,IAAMC,cAAiD;EACrDd,KAAKH;EACLC,MAAAA;AACF;AAEA,IAAAiB,sBAAeD;;;AC3Cf,YAAYE,YAAY;AAExB,SAASC,iBAAiB;AAC1B,SAASC,UAAUC,WAAW;AAC9B,SAASC,2BAA2BC,cAAcC,sBAAsB;AACxE,SAASC,aAAa;AACtB,SAASC,aAAAA,kBAAiB;AAC1B,SAASC,eAAe;AAEjB,IAAMC,mBAAmBC,WAAUC,KAAK;EAC7CC,MAAM;IACJC,KAAK;IACLC,MAAM;IACNC,aAAa;EACf;EACAC,OAAcC,cAAO;IACnBC,QAAQC,QAAQA,QAAQC,YAAY;MAClCL,aAAa;IACf,CAAA;;IAEAM,cAAqBC,gBAAgBC,aAAM,EAAEH,YAAY;MACvDL,aAAa;IACf,CAAA;EACF,CAAA;EACAS,QAAeP,cAAO;IACpBQ,UAAiBH,gBACRI,aAAMC,IAAIC,OAAO,EAAER,YAAY;MACpCL,aAAa;IACf,CAAA,CAAA;EAEJ,CAAA;EACAc,UAAU;IACRC,UAAUA;IACVC,SAASC;IACTC;IACAC;IACAC;IACAC,MAAMC;;AAEV,CAAA;",
|
|
6
|
-
"names": ["OperationHandlerSet", "MarkdownHandlers", "OperationHandlerSet", "lazy", "Blueprint", "Ref", "Text", "trim", "BLUEPRINT_KEY", "instructions", "trim", "make", "Blueprint", "key", "name", "description", "agentCanEnable", "source", "Ref", "Text", "tools", "toolDefinitions", "operations", "Create", "Read", "Update", "blueprint", "Blueprint", "Ref", "Text", "trim", "BLUEPRINT_KEY", "instructions", "trim", "make", "Blueprint", "key", "name", "description", "source", "Ref", "Text", "tools", "toolDefinitions", "operations", "MarkdownCreate", "MarkdownRead", "MarkdownUpdate", "blueprint", "blueprint_default", "OperationHandlerSet", "DiscordHandlers", "OperationHandlerSet", "lazy", "Blueprint", "Ref", "Text", "trim", "BLUEPRINT_KEY", "instructions", "trim", "make", "Blueprint", "key", "name", "description", "source", "Ref", "Text", "tools", "toolDefinitions", "operations", "FetchMessages", "blueprint", "blueprint_default", "OperationHandlerSet", "LinearHandlers", "OperationHandlerSet", "lazy", "Blueprint", "Ref", "Text", "trim", "BLUEPRINT_KEY", "instructions", "trim", "make", "Blueprint", "key", "name", "description", "source", "Ref", "Text", "tools", "toolDefinitions", "operations", "SyncIssues", "blueprint", "blueprint_default", "OperationHandlerSet", "PlanningHandlers", "OperationHandlerSet", "lazy", "Blueprint", "BLUEPRINT_KEY", "make", "Blueprint", "key", "name", "description", "tools", "toolDefinitions", "operations", "UpdateTasks", "blueprint", "blueprint_default", "OperationHandlerSet", "ResearchHandlers", "OperationHandlerSet", "lazy", "Blueprint", "Ref", "Text", "trim", "BLUEPRINT_KEY", "instructions", "trim", "make", "Blueprint", "key", "name", "description", "source", "Ref", "Text", "tools", "toolDefinitions", "operations", "DocumentCreate", "Research", "blueprint", "blueprint_default", "OperationHandlerSet", "WebSearchHandlers", "OperationHandlerSet", "lazy", "Blueprint", "Ref", "Text", "BLUEPRINT_KEY", "make", "Blueprint", "key", "name", "description", "agentCanEnable", "instructions", "source", "Ref", "Text", "tools", "toolDefinitions", "operations", "Fetch", "blueprint", "blueprint_default", "AnthropicTool", "Toolkit", "Layer", "GenericToolkit", "WebSearchToolkit", "make", "WebSearch_20250305", "WebSearchToolkitGeneric", "GenericToolkit", "empty", "Blueprint", "Ref", "Text", "trim", "BLUEPRINT_KEY", "instructions", "trim", "make", "Blueprint", "key", "name", "description", "agentCanEnable", "source", "Ref", "Text", "mcpServers", "url", "protocol", "blueprint", "blueprint_default", "OperationHandlerSet", "DatabaseHandlers", "OperationHandlerSet", "lazy", "Blueprint", "Ref", "Text", "trim", "BLUEPRINT_KEY", "instructions", "trim", "make", "Blueprint", "key", "name", "description", "agentCanEnable", "source", "Ref", "Text", "tools", "toolDefinitions", "operations", "ContextAdd", "ContextRemove", "Load", "ObjectCreate", "ObjectDelete", "ObjectUpdate", "Query", "RelationCreate", "RelationDelete", "SchemaAdd", "SchemaList", "TagAdd", "TagRemove", "blueprint", "blueprint_default", "OperationHandlerSet", "MemoryHandlers", "OperationHandlerSet", "lazy", "Blueprint", "Ref", "Text", "trim", "BLUEPRINT_KEY", "instructions", "trim", "make", "Blueprint", "key", "name", "description", "agentCanEnable", "source", "Ref", "Text", "tools", "toolDefinitions", "operations", "SaveMemory", "QueryMemories", "DeleteMemory", "blueprint", "blueprint_default", "Blueprint", "Ref", "Trigger", "Operation", "Text", "trim", "BLUEPRINT_KEY", "instructions", "trim", "Operation", "PersistentOperation", "typename", "Trigger", "make", "Blueprint", "key", "name", "description", "source", "Ref", "Text", "blueprint", "blueprint_default", "OperationHandlerSet", "BlueprintManagerHandlers", "OperationHandlerSet", "lazy", "Blueprint", "Template", "trim", "BLUEPRINT_KEY", "make", "Blueprint", "key", "name", "description", "instructions", "Template", "source", "trim", "inputs", "kind", "function", "QueryBlueprints", "meta", "tools", "toolDefinitions", "operations", "EnableBlueprints", "UpdateBlueprints", "blueprint", "blueprint_default", "OperationHandlerSet", "AgentWizardHandlers", "OperationHandlerSet", "lazy", "Blueprint", "Template", "trim", "BLUEPRINT_KEY", "make", "Blueprint", "key", "name", "description", "agentCanEnable", "instructions", "Template", "source", "trim", "tools", "toolDefinitions", "operations", "AgentRules", "CreateAgent", "SyncTriggers", "blueprint", "blueprint_default", "Schema", "AiService", "Database", "Obj", "FunctionInvocationService", "QueueService", "TracingService", "Trace", "Operation", "Message", "EntityExtraction", "Operation", "make", "meta", "key", "name", "description", "input", "Struct", "source", "Message", "annotations", "instructions", "optional", "String", "output", "entities", "Array", "Obj", "Unknown", "services", "AiService", "Database", "Service", "TracingService", "FunctionInvocationService", "QueueService", "Trace", "TraceService"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/blueprints/project/blueprint.ts", "../../../src/blueprints/project/functions/index.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport { type AppCapabilities } from '@dxos/app-toolkit';\nimport { Blueprint, Template } from '@dxos/blueprints';\nimport { trim } from '@dxos/util';\n\nimport { AddArtifact } from './functions';\n\nconst BLUEPRINT_KEY = 'org.dxos.blueprint.agent';\n\n/**\n * Creates the Agent blueprint. This is a function to avoid circular dependency issues.\n */\n// TODO(dmaretskyi): Combine with Agent Wizard.\nconst make = () =>\n Blueprint.make({\n key: BLUEPRINT_KEY,\n name: 'Agent blueprint',\n instructions: Template.make({\n source: trim`\n You work on an agent. Each agent has a spec - the goal of the agent.\n The agent plan shows the current progress of the agent.\n Agent has a number of associated artifacts you can read/write.\n You can edit them if necessary.\n\n IMPORTANT: When creating a new artifact, always add it to the agent using the add-artifact function.\n\n {{#with agent}}\n <agent id=\"{{id}}\" name=\"{{name}}\">\n <spec>\n {{spec}}\n </spec>\n <plan>\n {{plan}}\n </plan>\n\n <artifacts>\n {{#each artifacts}}\n <artifact type=\"{{type}}\" dxn=\"{{dxn}}\">\n {{name}}\n </artifact>\n {{/each}}\n </artifacts>\n </agent>\n {{/with}}\n `,\n inputs: [\n {\n name: 'agent',\n kind: 'function',\n function: 'org.dxos.function.agent.get-context',\n },\n ],\n }),\n tools: Blueprint.toolDefinitions({ operations: [AddArtifact] }),\n });\n\nconst blueprint: AppCapabilities.BlueprintDefinition = {\n key: BLUEPRINT_KEY,\n make,\n};\n\nexport default blueprint;\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport { OperationHandlerSet } from '@dxos/operation';\n\nexport * from './definitions';\n\nexport const AgentBlueprintHandlers = OperationHandlerSet.lazy(\n () => import('./add-artifact'),\n () => import('./agent'),\n () => import('./get-context'),\n () => import('./qualifier'),\n);\n"],
|
|
5
|
-
"mappings": ";;;;;AAKA,SAASA,WAAWC,gBAAgB;AACpC,SAASC,YAAY;;;ACFrB,SAASC,2BAA2B;AAI7B,IAAMC,yBAAyBC,oBAAoBC,KACxD,MAAM,OAAO,6BAAA,GACb,MAAM,OAAO,sBAAA,GACb,MAAM,OAAO,4BAAA,GACb,MAAM,OAAO,0BAAA,CAAA;;;ADFf,IAAMC,gBAAgB;AAMtB,IAAMC,OAAO,MACXC,UAAUD,KAAK;EACbE,KAAKH;EACLI,MAAM;EACNC,cAAcC,SAASL,KAAK;IAC1BM,QAAQC;;;;;;;;;;;;;;;;;;;;;;;;;;;IA2BRC,QAAQ;MACN;QACEL,MAAM;QACNM,MAAM;QACNC,UAAU;MACZ;;EAEJ,CAAA;EACAC,OAAOV,UAAUW,gBAAgB;IAAEC,YAAY;MAACC;;EAAa,CAAA;AAC/D,CAAA;AAEF,IAAMC,YAAiD;EACrDb,KAAKH;EACLC;AACF;AAEA,IAAA,oBAAee;",
|
|
6
|
-
"names": ["Blueprint", "Template", "trim", "OperationHandlerSet", "AgentBlueprintHandlers", "OperationHandlerSet", "lazy", "BLUEPRINT_KEY", "make", "Blueprint", "key", "name", "instructions", "Template", "source", "trim", "inputs", "kind", "function", "tools", "toolDefinitions", "operations", "AddArtifact", "blueprint"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/types/Plan.ts", "../../../src/types/Agent.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Schema from 'effect/Schema';\n\nimport { Annotation, Obj, Ref, Type } from '@dxos/echo';\n\nimport * as Chat from './Chat';\n\nexport const TaskId = Schema.String.pipe(Schema.brand('@dxos/assistant-toolkit/TaskId'));\nexport type TaskId = Schema.Schema.Type<typeof TaskId>;\n\nexport const Task = Schema.Struct({\n /**\n * Short task ID unique within the plan.\n */\n id: TaskId,\n\n title: Schema.String.annotations({\n description: 'Task title and description.',\n }),\n\n status: Schema.Literal('todo', 'in-progress', 'done'),\n\n /**\n * Parent task ID.\n */\n parent: Schema.optional(TaskId).annotations({\n description: 'Parent task ID.',\n }),\n\n /**\n * Chat object that this task is associated with.\n */\n chat: Schema.optional(Ref.Ref(Chat.Chat)),\n});\nexport interface Task extends Schema.Schema.Type<typeof Task> {}\n\n/**\n * Hierarchical collection of tasks for humans and agents to track progress.\n */\nexport const Plan = Schema.Struct({\n tasks: Schema.Array(Task),\n}).pipe(\n Type.object({\n typename: 'org.dxos.type.plan',\n version: '0.1.0',\n }),\n Annotation.SystemTypeAnnotation.set(true),\n);\nexport interface Plan extends Schema.Schema.Type<typeof Plan> {}\n\nexport const generateTaskId = (plan: Plan): TaskId => {\n const existingIds = plan.tasks\n .map((task) => {\n const [num, letter] = task.id.split('-');\n return parseInt(num);\n })\n .filter((_) => !isNaN(_));\n let newId;\n if (existingIds.length === 0) {\n newId = 1;\n } else {\n newId = Math.max(...existingIds) + 1;\n }\n // Add random suffix to avoid collisions.\n return TaskId.make(`${newId}-${crypto.randomUUID().slice(0, 2)}`);\n};\n\n/**\n * Add new tasks to a plan, generating IDs for new tasks.\n * Use inside an `Obj.change` callback.\n */\nexport const addTasks = (\n plan: Obj.Mutable<Plan>,\n tasks: (Pick<Task, 'title'> & Partial<Pick<Task, 'status' | 'parent' | 'chat'>>)[],\n) => {\n for (const task of tasks) {\n const taskId = generateTaskId(plan);\n plan.tasks.push({ id: taskId, ...task, status: task.status ?? 'todo' });\n }\n return plan;\n};\n\ninterface MakePlanProps {\n tasks: {\n title: string;\n status?: 'todo' | 'in-progress' | 'done';\n }[];\n}\n\nexport const makePlan = (props: MakePlanProps): Plan => {\n const plan = Obj.make(Plan, { tasks: [] });\n Obj.change(plan, (plan) => {\n addTasks(plan, props.tasks);\n });\n return plan;\n};\n\n/**\n * Formats plan to markdown format.\n */\nexport const formatPlan = (plan: Plan): string => {\n return plan.tasks\n .map((task) => `- **${task.status?.toLocaleUpperCase()}**: ${task.title ?? 'No title'} <!-- id=${task.id} -->`)\n .join('\\n');\n};\n", "//\n// Copyright 2026 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Effect from 'effect/Effect';\nimport * as Function from 'effect/Function';\nimport * as Schema from 'effect/Schema';\n\nimport { AiContextBinder, AiContextService } from '@dxos/assistant';\nimport { type Blueprint } from '@dxos/blueprints';\nimport { Annotation, Database, Feed, Obj, Ref, Relation, Type } from '@dxos/echo';\nimport { Queue } from '@dxos/echo-db';\nimport { type ObjectNotFoundError } from '@dxos/echo/Err';\nimport { FormInputAnnotation, LabelAnnotation } from '@dxos/echo/internal';\nimport { acquireReleaseResource } from '@dxos/effect';\nimport { QueueService } from '@dxos/functions';\nimport { invariant } from '@dxos/invariant';\nimport { QueueAnnotation, Text } from '@dxos/schema';\n\nimport * as Chat from './Chat';\nimport * as Plan from './Plan';\n\n/**\n * Agent schema definition.\n */\nexport const Agent = Schema.Struct({\n name: Schema.optional(Schema.String),\n\n /**\n * Instructions for the agent.\n */\n // TODO(burdon): Rename instructions.\n spec: Ref.Ref(Text.Text).pipe(FormInputAnnotation.set(false)),\n\n plan: Ref.Ref(Plan.Plan).pipe(FormInputAnnotation.set(false)),\n\n artifacts: Schema.Array(\n Schema.Struct({\n // TODO(dmaretskyi): Consider gettings names from the artifact itself using Obj.getLabel.\n name: Schema.String,\n data: Ref.Ref(Obj.Unknown),\n }),\n ).pipe(FormInputAnnotation.set(false)),\n\n /**\n * Incoming queue that the agent processes.\n */\n // NOTE: Named `queue` to conform to subscribable schema (see QueueAnnotation).\n queue: Schema.optional(Ref.Ref(Queue).pipe(FormInputAnnotation.set(false))),\n\n // TODO(dmaretskyi): Multiple chats.\n chat: Schema.optional(Ref.Ref(Chat.Chat).pipe(FormInputAnnotation.set(false))),\n\n /**\n * References to objects with a canonical queue property.\n * Schema must have the QueueAnnotation.\n */\n // TODO(dmaretskyi): Turn into an array of objects when form-data\n subscriptions: Schema.Array(Ref.Ref(Obj.Unknown)).pipe(FormInputAnnotation.set(false)),\n\n // TODO(burdon): Rename. Explain what a \"qualifying agent\" is.\n useQualifyingAgent: Schema.optional(Schema.Boolean).annotations({\n title: 'Use qualifying agent',\n description:\n 'The qualifying agent determines if the event is relevant to the agent. Related events will be added to the input queue of the agent. It is recommended to enable this.',\n }),\n}).pipe(\n Type.object({\n typename: 'org.dxos.type.agent',\n version: '0.1.0',\n }),\n LabelAnnotation.set(['name']),\n Annotation.IconAnnotation.set({\n icon: 'ph--drone--regular',\n hue: 'sky',\n }),\n QueueAnnotation.set(true),\n);\n\nexport interface Agent extends Schema.Schema.Type<typeof Agent> {}\n\n/**\n * Creates a fully initialized Agent with chat, queue, and context bindings.\n *\n * @param props - Agent properties including spec, plan, blueprints, and context objects.\n * @param blueprint - The blueprint to use for the agent context.\n * @returns An Effect that yields the initialized Agent.\n */\nexport const makeInitialized = (\n props: Omit<Obj.MakeProps<typeof Agent>, 'spec' | 'plan' | 'artifacts' | 'subscriptions' | 'chat'> &\n Partial<Pick<Obj.MakeProps<typeof Agent>, 'artifacts' | 'subscriptions'>> & {\n spec: string;\n blueprints?: Ref.Ref<Blueprint.Blueprint>[];\n contextObjects?: Ref.Ref<Obj.Any>[];\n },\n blueprint: Blueprint.Blueprint,\n): Effect.Effect<Agent, never, QueueService | Feed.FeedService | Database.Service> =>\n Effect.gen(function* () {\n const agent = Obj.make(Agent, {\n ...props,\n spec: Ref.make(Text.make(props.spec)),\n plan: Ref.make(Plan.makePlan({ tasks: [] })),\n artifacts: props.artifacts ?? [],\n subscriptions: props.subscriptions ?? [],\n useQualifyingAgent: props.useQualifyingAgent ?? true,\n });\n yield* Database.add(agent);\n const feed = yield* Database.add(Feed.make());\n const runtime = yield* Effect.runtime<Feed.FeedService>();\n const contextBinder = new AiContextBinder({ feed, runtime });\n // TODO(dmaretskyi): Blueprint registry.\n const agentBlueprint = yield* Database.add(Obj.clone(blueprint, { deep: true }));\n yield* Effect.promise(() =>\n contextBinder.bind({\n blueprints: [Ref.make(agentBlueprint), ...(props.blueprints ?? [])],\n objects: [Ref.make(agent), ...(props.contextObjects ?? [])],\n }),\n );\n const chat = yield* Database.add(\n Chat.make({\n [Obj.Parent]: agent,\n feed: Ref.make(feed),\n }),\n );\n Obj.setParent(feed, chat);\n yield* Database.add(\n Relation.make(Chat.CompanionTo, {\n [Relation.Source]: chat,\n [Relation.Target]: agent,\n }),\n );\n\n const inputQueue = yield* QueueService.createQueue();\n\n Obj.change(agent, (agent) => {\n agent.chat = Ref.make(chat);\n agent.queue = Ref.fromDXN(inputQueue.dxn);\n });\n\n return agent;\n });\n\n/**\n * Resets the agent chat history by rebuilding the chat context.\n * Preserves the existing blueprints and objects from the current chat context.\n *\n * @param agent - The agent whose chat history should be reset. Must have an existing chat.\n * @returns An Effect that resets the chat history.\n */\nexport const resetChatHistory = (\n agent: Agent,\n): Effect.Effect<void, ObjectNotFoundError, Feed.FeedService | Database.Service> =>\n Effect.gen(function* () {\n invariant(agent.chat, 'Agent must have an existing chat to reset.');\n\n const existingFeed = yield* agent.chat.pipe(Database.load).pipe(\n Effect.map((_) => _.feed),\n Effect.flatMap(Database.load),\n );\n const runtime = yield* Effect.runtime<Feed.FeedService>();\n const existingContextBinder = yield* acquireReleaseResource(\n () =>\n new AiContextBinder({\n feed: existingFeed,\n runtime,\n }),\n );\n const blueprints = existingContextBinder.getBlueprints().map((blueprint) => Ref.make(blueprint));\n const objects = existingContextBinder.getObjects().map((object) => Ref.make(object));\n\n const feed = yield* Database.add(Feed.make());\n const contextBinder = new AiContextBinder({ feed, runtime });\n yield* Effect.promise(() =>\n contextBinder.bind({\n blueprints,\n objects,\n }),\n );\n\n const chat = yield* Database.add(\n Chat.make({\n feed: Ref.make(feed),\n }),\n );\n Obj.setParent(feed, chat);\n Obj.change(agent, (agent) => {\n agent.chat = Ref.make(chat);\n });\n\n yield* Database.add(\n Relation.make(Chat.CompanionTo, {\n [Relation.Source]: chat,\n [Relation.Target]: agent,\n }),\n );\n }).pipe(Effect.scoped);\n\nexport const getFromChatContext: Effect.Effect<Agent, Error, AiContextService> = Effect.gen(function* () {\n const agents = yield* Function.pipe(AiContextService.findObjects(Agent));\n if (agents.length !== 1) {\n return yield* Effect.fail(new Error(`There should be exactly one agent in context. Got: ${agents.length}`));\n }\n\n const agent = agents[0];\n return agent;\n});\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;AAAA;;;;;;;;;;AAMA,YAAYA,YAAY;AAExB,SAASC,YAAYC,KAAKC,KAAKC,YAAY;AAIpC,IAAMC,SAAgBC,cAAOC,KAAYC,aAAM,gCAAA,CAAA;AAG/C,IAAMC,OAAcC,cAAO;;;;EAIhCC,IAAIN;EAEJO,OAAcN,cAAOO,YAAY;IAC/BC,aAAa;EACf,CAAA;EAEAC,QAAeC,eAAQ,QAAQ,eAAe,MAAA;;;;EAK9CC,QAAeC,gBAASb,MAAAA,EAAQQ,YAAY;IAC1CC,aAAa;EACf,CAAA;;;;EAKAK,MAAaD,gBAASE,IAAIA,IAASC,IAAI,CAAA;AACzC,CAAA;AAMO,IAAMC,OAAcZ,cAAO;EAChCa,OAAcC,aAAMf,IAAAA;AACtB,CAAA,EAAGF,KACDkB,KAAKC,OAAO;EACVC,UAAU;EACVC,SAAS;AACX,CAAA,GACAC,WAAWC,qBAAqBC,IAAI,IAAA,CAAA;AAI/B,IAAMC,iBAAiB,CAACC,SAAAA;AAC7B,QAAMC,cAAcD,KAAKV,MACtBY,IAAI,CAACC,SAAAA;AACJ,UAAM,CAACC,KAAKC,MAAAA,IAAUF,KAAKzB,GAAG4B,MAAM,GAAA;AACpC,WAAOC,SAASH,GAAAA;EAClB,CAAA,EACCI,OAAO,CAACC,MAAM,CAACC,MAAMD,CAAAA,CAAAA;AACxB,MAAIE;AACJ,MAAIV,YAAYW,WAAW,GAAG;AAC5BD,YAAQ;EACV,OAAO;AACLA,YAAQE,KAAKC,IAAG,GAAIb,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AW,GAAG;AACvB,WAAO,OAAcC,YAAK,IAAIC,MAAM,sDAAsDL,OAAOG,MAAM,EAAE,CAAA;EAC3G;AAEA,QAAM/C,QAAQ4C,OAAO,CAAA;AACrB,SAAO5C;AACT,CAAA;",
|
|
6
|
-
"names": ["Schema", "Annotation", "Obj", "Ref", "Type", "TaskId", "String", "pipe", "brand", "Task", "Struct", "id", "title", "annotations", "description", "status", "Literal", "parent", "optional", "chat", "Ref", "Chat", "Plan", "tasks", "Array", "Type", "object", "typename", "version", "Annotation", "SystemTypeAnnotation", "set", "generateTaskId", "plan", "existingIds", "map", "task", "num", "letter", "split", "parseInt", "filter", "_", "isNaN", "newId", "length", "Math", "max", "make", "crypto", "randomUUID", "slice", "addTasks", "taskId", "push", "makePlan", "props", "Obj", "change", "formatPlan", "toLocaleUpperCase", "join", "Effect", "Function", "Schema", "AiContextBinder", "AiContextService", "Annotation", "Database", "Feed", "Obj", "Ref", "Relation", "Type", "Queue", "FormInputAnnotation", "LabelAnnotation", "acquireReleaseResource", "QueueService", "invariant", "QueueAnnotation", "Text", "Agent", "Struct", "name", "optional", "String", "spec", "Ref", "Text", "pipe", "FormInputAnnotation", "set", "plan", "Plan", "artifacts", "Array", "data", "Obj", "Unknown", "queue", "Queue", "chat", "Chat", "subscriptions", "useQualifyingAgent", "Boolean", "annotations", "title", "description", "Type", "object", "typename", "version", "LabelAnnotation", "Annotation", "IconAnnotation", "icon", "hue", "QueueAnnotation", "makeInitialized", "props", "blueprint", "gen", "agent", "make", "makePlan", "tasks", "Database", "add", "feed", "Feed", "runtime", "contextBinder", "AiContextBinder", "agentBlueprint", "clone", "deep", "promise", "bind", "blueprints", "objects", "contextObjects", "Parent", "setParent", "Relation", "CompanionTo", "Source", "Target", "inputQueue", "QueueService", "createQueue", "change", "fromDXN", "dxn", "resetChatHistory", "invariant", "existingFeed", "load", "map", "_", "flatMap", "existingContextBinder", "acquireReleaseResource", "getBlueprints", "getObjects", "scoped", "getFromChatContext", "agents", "AiContextService", "findObjects", "length", "fail", "Error"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/sync/sync.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Filter, Obj, Query, Ref } from '@dxos/echo';\nimport { Database } from '@dxos/echo';\nimport { failedInvariant } from '@dxos/invariant';\nimport { log } from '@dxos/log';\n\n/**\n * Syncs objects to the database.\n * If there's an object with a matching foreign key in the database, it will be updated.\n * Otherwise, a new object will be added.\n * Recursively syncs top-level refs.\n *\n * @param opts.foreignKeyId - The key to use for matching objects.\n */\nexport const syncObjects: (\n objs: Obj.Unknown[],\n opts: { foreignKeyId: string },\n) => Effect.Effect<Obj.Unknown[], never, Database.Service> = Effect.fn('syncObjects')(function* (\n objs,\n { foreignKeyId },\n) {\n return yield* Effect.forEach(\n objs,\n Effect.fnUntraced(function* (obj) {\n // Sync referenced objects.\n for (const key of Object.keys(obj)) {\n if (typeof key !== 'string' || key === 'id') continue;\n if (!Ref.isRef((obj as any)[key])) continue;\n const ref: Ref.Unknown = (obj as any)[key];\n if (!ref.target) continue;\n if (Obj.getDXN(ref.target).isLocalObjectId()) {\n // obj not persisted to db.\n const [target] = yield* syncObjects([ref.target], { foreignKeyId });\n (obj as any)[key] = Ref.make(target);\n }\n }\n\n const schema = Obj.getSchema(obj) ?? failedInvariant('No schema.');\n const foreignId = Obj.getKeys(obj, foreignKeyId)[0]?.id ?? failedInvariant('No foreign key.');\n const [existing] = yield* Database.runQuery(\n Query.select(Filter.foreignKeys(schema, [{ source: foreignKeyId, id: foreignId }])),\n );\n log('sync object', {\n type: Obj.getTypename(obj),\n foreignId,\n existing: existing ? Obj.getDXN(existing) : undefined,\n });\n if (!existing) {\n yield* Database.add(obj);\n return obj;\n } else {\n copyObjectData(existing, obj);\n return existing;\n }\n }),\n { concurrency: 1 },\n );\n});\n\nconst copyObjectData = (existing: Obj.Unknown, newObj: Obj.Unknown) => {\n Obj.change(existing, (existing) => {\n // Copy properties from newObj to existing.\n for (const key of Object.keys(newObj)) {\n if (typeof key !== 'string' || key === 'id') continue;\n if (\n typeof (newObj as any)[key] !== 'string' &&\n typeof (newObj as any)[key] !== 'number' &&\n typeof (newObj as any)[key] !== 'boolean' &&\n !Ref.isRef((newObj as any)[key])\n )\n continue;\n (existing as any)[key] = (newObj as any)[key];\n }\n\n // Delete properties that don't exist in newObj.\n for (const key of Object.keys(existing)) {\n if (typeof key !== 'string' || key === 'id') continue;\n if (!(key in newObj)) {\n delete (existing as any)[key];\n }\n }\n\n // Update foreign keys.\n for (const foreignKey of Obj.getMeta(newObj).keys) {\n Obj.deleteKeys(existing, foreignKey.source);\n // TODO(dmaretskyi): Doesn't work: `Obj.getMeta(existing).keys.push(foreignKey);`\n Obj.getMeta(existing).keys.push({ ...foreignKey });\n }\n });\n};\n"],
|
|
5
|
-
"mappings": ";AAIA,YAAYA,YAAY;AAExB,SAASC,QAAQC,KAAKC,OAAOC,WAAW;AACxC,SAASC,gBAAgB;AACzB,SAASC,uBAAuB;AAChC,SAASC,WAAW;;AAUb,IAAMC,cAGuDC,UAAG,aAAA,EAAe,WACpFC,MACA,EAAEC,aAAY,GAAE;AAEhB,SAAO,OAAcC,eACnBF,MACOG,kBAAW,WAAWC,KAAG;AAE9B,eAAWC,OAAOC,OAAOC,KAAKH,GAAAA,GAAM;AAClC,UAAI,OAAOC,QAAQ,YAAYA,QAAQ,KAAM;AAC7C,UAAI,CAACX,IAAIc,MAAOJ,IAAYC,GAAAA,CAAI,EAAG;AACnC,YAAMI,MAAoBL,IAAYC,GAAAA;AACtC,UAAI,CAACI,IAAIC,OAAQ;AACjB,UAAIlB,IAAImB,OAAOF,IAAIC,MAAM,EAAEE,gBAAe,GAAI;AAE5C,cAAM,CAACF,MAAAA,IAAU,OAAOZ,YAAY;UAACW,IAAIC;WAAS;UAAET;QAAa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I,EAAEA,OAAOyB,SAAS;AACpB,eAAQX,UAAiBd,GAAAA;MAC3B;IACF;AAGA,eAAW2B,cAAcxC,IAAIyC,QAAQH,MAAAA,EAAQvB,MAAM;AACjDf,UAAI0C,WAAWf,WAAUa,WAAWT,MAAM;AAE1C/B,UAAIyC,QAAQd,SAAAA,EAAUZ,KAAK4B,KAAK;QAAE,GAAGH;MAAW,CAAA;IAClD;EACF,CAAA;AACF;",
|
|
6
|
-
"names": ["Effect", "Filter", "Obj", "Query", "Ref", "Database", "failedInvariant", "log", "syncObjects", "fn", "objs", "foreignKeyId", "forEach", "fnUntraced", "obj", "key", "Object", "keys", "isRef", "ref", "target", "getDXN", "isLocalObjectId", "make", "schema", "getSchema", "foreignId", "getKeys", "id", "existing", "runQuery", "select", "foreignKeys", "source", "type", "getTypename", "undefined", "add", "copyObjectData", "concurrency", "newObj", "change", "foreignKey", "getMeta", "deleteKeys", "push"]
|
|
7
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
// src/functions/exa/definitions.ts
|
|
2
|
-
import * as Schema from "effect/Schema";
|
|
3
|
-
import { CredentialsService } from "@dxos/functions";
|
|
4
|
-
import { Operation } from "@dxos/operation";
|
|
5
|
-
var ExaSearch = Operation.make({
|
|
6
|
-
meta: {
|
|
7
|
-
key: "org.dxos.function.exa-search",
|
|
8
|
-
name: "Exa Search",
|
|
9
|
-
description: "Search the web for information"
|
|
10
|
-
},
|
|
11
|
-
input: Schema.Struct({
|
|
12
|
-
query: Schema.String.annotations({
|
|
13
|
-
description: "The query to search for."
|
|
14
|
-
})
|
|
15
|
-
}),
|
|
16
|
-
output: Schema.Unknown,
|
|
17
|
-
services: [
|
|
18
|
-
CredentialsService
|
|
19
|
-
]
|
|
20
|
-
});
|
|
21
|
-
var ExaMock = Operation.make({
|
|
22
|
-
meta: {
|
|
23
|
-
key: "org.dxos.function.exa-mock",
|
|
24
|
-
name: "Exa mock",
|
|
25
|
-
description: "Search the web for information"
|
|
26
|
-
},
|
|
27
|
-
input: Schema.Struct({
|
|
28
|
-
query: Schema.String.annotations({
|
|
29
|
-
description: "The query to search for."
|
|
30
|
-
})
|
|
31
|
-
}),
|
|
32
|
-
output: Schema.Unknown
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
export {
|
|
36
|
-
ExaSearch,
|
|
37
|
-
ExaMock
|
|
38
|
-
};
|
|
39
|
-
//# sourceMappingURL=chunk-VDEDVOS6.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/functions/exa/definitions.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { CredentialsService } from '@dxos/functions';\nimport { Operation } from '@dxos/operation';\n\nexport const ExaSearch = Operation.make({\n meta: {\n key: 'org.dxos.function.exa-search',\n name: 'Exa Search',\n description: 'Search the web for information',\n },\n input: Schema.Struct({\n query: Schema.String.annotations({\n description: 'The query to search for.',\n }),\n }),\n output: Schema.Unknown,\n services: [CredentialsService],\n});\n\nexport const ExaMock = Operation.make({\n meta: {\n key: 'org.dxos.function.exa-mock',\n name: 'Exa mock',\n description: 'Search the web for information',\n },\n input: Schema.Struct({\n query: Schema.String.annotations({\n description: 'The query to search for.',\n }),\n }),\n output: Schema.Unknown,\n});\n"],
|
|
5
|
-
"mappings": ";AAIA,YAAYA,YAAY;AAExB,SAASC,0BAA0B;AACnC,SAASC,iBAAiB;AAEnB,IAAMC,YAAYC,UAAUC,KAAK;EACtCC,MAAM;IACJC,KAAK;IACLC,MAAM;IACNC,aAAa;EACf;EACAC,OAAcC,cAAO;IACnBC,OAAcC,cAAOC,YAAY;MAC/BL,aAAa;IACf,CAAA;EACF,CAAA;EACAM,QAAeC;EACfC,UAAU;IAACC;;AACb,CAAA;AAEO,IAAMC,UAAUf,UAAUC,KAAK;EACpCC,MAAM;IACJC,KAAK;IACLC,MAAM;IACNC,aAAa;EACf;EACAC,OAAcC,cAAO;IACnBC,OAAcC,cAAOC,YAAY;MAC/BL,aAAa;IACf,CAAA;EACF,CAAA;EACAM,QAAeC;AACjB,CAAA;",
|
|
6
|
-
"names": ["Schema", "CredentialsService", "Operation", "ExaSearch", "Operation", "make", "meta", "key", "name", "description", "input", "Struct", "query", "String", "annotations", "output", "Unknown", "services", "CredentialsService", "ExaMock"]
|
|
7
|
-
}
|
|
@@ -1,363 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__export
|
|
3
|
-
} from "./chunk-J5LGTIGS.mjs";
|
|
4
|
-
|
|
5
|
-
// src/crud/graph.ts
|
|
6
|
-
import * as Tool from "@effect/ai/Tool";
|
|
7
|
-
import * as Toolkit from "@effect/ai/Toolkit";
|
|
8
|
-
import * as Context from "effect/Context";
|
|
9
|
-
import * as Effect from "effect/Effect";
|
|
10
|
-
import * as Function from "effect/Function";
|
|
11
|
-
import * as Option from "effect/Option";
|
|
12
|
-
import * as Schema from "effect/Schema";
|
|
13
|
-
import * as SchemaAST from "effect/SchemaAST";
|
|
14
|
-
import { Entity, Filter, Obj, Query, Type } from "@dxos/echo";
|
|
15
|
-
import { Database } from "@dxos/echo";
|
|
16
|
-
import { isEncodedReference } from "@dxos/echo-protocol";
|
|
17
|
-
import { ReferenceAnnotationId, RelationSourceDXNId, RelationSourceId, RelationTargetDXNId, RelationTargetId, createObject, getTypeAnnotation, getTypeIdentifierAnnotation } from "@dxos/echo/internal";
|
|
18
|
-
import { mapAst } from "@dxos/effect";
|
|
19
|
-
import { ContextQueueService } from "@dxos/functions";
|
|
20
|
-
import { DXN, ObjectId } from "@dxos/keys";
|
|
21
|
-
import { log } from "@dxos/log";
|
|
22
|
-
import { deepMapValues, isNonNullable, trim } from "@dxos/util";
|
|
23
|
-
var __dxlog_file = "/__w/dxos/dxos/packages/core/assistant-toolkit/src/crud/graph.ts";
|
|
24
|
-
var Subgraph = Schema.Struct({
|
|
25
|
-
/** Objects and relations. */
|
|
26
|
-
objects: Schema.Array(Schema.Any)
|
|
27
|
-
});
|
|
28
|
-
var findRelatedSchema = async (db, anchor) => {
|
|
29
|
-
const allSchemas = await db.graph.schemaRegistry.query().run();
|
|
30
|
-
return allSchemas.filter((schema) => {
|
|
31
|
-
if (getTypeAnnotation(schema)?.kind !== Entity.Kind.Relation) {
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
return isSchemaAddressableByDxn(anchor, DXN.parse(getTypeAnnotation(schema).sourceSchema)) || isSchemaAddressableByDxn(anchor, DXN.parse(getTypeAnnotation(schema).targetSchema));
|
|
35
|
-
}).map((schema) => ({
|
|
36
|
-
kind: "relation",
|
|
37
|
-
schema
|
|
38
|
-
}));
|
|
39
|
-
};
|
|
40
|
-
var isSchemaAddressableByDxn = (schema, dxn) => {
|
|
41
|
-
if (getTypeIdentifierAnnotation(schema) === dxn.toString()) {
|
|
42
|
-
return true;
|
|
43
|
-
}
|
|
44
|
-
const t = dxn.asTypeDXN();
|
|
45
|
-
if (t) {
|
|
46
|
-
return t.type === Type.getTypename(schema);
|
|
47
|
-
}
|
|
48
|
-
return false;
|
|
49
|
-
};
|
|
50
|
-
var LocalSearchToolkit = Toolkit.make(Tool.make("search_local_search", {
|
|
51
|
-
description: "Search the local database for information using a vector index",
|
|
52
|
-
parameters: {
|
|
53
|
-
query: Schema.String.annotations({
|
|
54
|
-
description: "The query to search for. Could be a question or a topic or a set of keywords."
|
|
55
|
-
})
|
|
56
|
-
},
|
|
57
|
-
success: Schema.Unknown,
|
|
58
|
-
failure: Schema.Never,
|
|
59
|
-
dependencies: [
|
|
60
|
-
Database.Service
|
|
61
|
-
]
|
|
62
|
-
}));
|
|
63
|
-
var LocalSearchHandler = LocalSearchToolkit.toLayer({
|
|
64
|
-
search_local_search: Effect.fn(function* ({ query: query2 }) {
|
|
65
|
-
const objects = yield* Database.runQuery(Query.select(Filter.text(query2, {
|
|
66
|
-
type: "vector"
|
|
67
|
-
})));
|
|
68
|
-
const results = [
|
|
69
|
-
...objects
|
|
70
|
-
];
|
|
71
|
-
const option = yield* Effect.serviceOption(ContextQueueService);
|
|
72
|
-
if (Option.isSome(option)) {
|
|
73
|
-
const queueObjects = yield* Effect.promise(() => option.value.queue.queryObjects());
|
|
74
|
-
results.push(...queueObjects);
|
|
75
|
-
}
|
|
76
|
-
return trim`
|
|
77
|
-
<local_context>
|
|
78
|
-
${JSON.stringify(results, null, 2)}
|
|
79
|
-
</local_context>
|
|
80
|
-
`;
|
|
81
|
-
})
|
|
82
|
-
});
|
|
83
|
-
var GraphWriterSchema = class extends Context.Tag("@dxos/assistant/GraphWriterSchema")() {
|
|
84
|
-
};
|
|
85
|
-
var makeGraphWriterToolkit = ({ schema }) => {
|
|
86
|
-
return Toolkit.make(Tool.make("graph_writer", {
|
|
87
|
-
description: "Write to the local graph database",
|
|
88
|
-
parameters: createExtractionSchema(schema).fields,
|
|
89
|
-
success: Schema.Unknown,
|
|
90
|
-
failure: Schema.Never,
|
|
91
|
-
dependencies: [
|
|
92
|
-
Database.Service,
|
|
93
|
-
ContextQueueService
|
|
94
|
-
]
|
|
95
|
-
}).annotateContext(Context.make(GraphWriterSchema, {
|
|
96
|
-
schema
|
|
97
|
-
})));
|
|
98
|
-
};
|
|
99
|
-
var makeGraphWriterHandler = (toolkit, { onAppend } = {}) => {
|
|
100
|
-
const { schema } = Context.get(toolkit.tools.graph_writer.annotations, GraphWriterSchema);
|
|
101
|
-
return toolkit.toLayer({
|
|
102
|
-
graph_writer: Effect.fn(function* (input) {
|
|
103
|
-
const { db } = yield* Database.Service;
|
|
104
|
-
const { queue } = yield* ContextQueueService;
|
|
105
|
-
const data = yield* Effect.promise(() => sanitizeObjects(schema, input, db, queue));
|
|
106
|
-
yield* Effect.promise(() => queue.append(data));
|
|
107
|
-
const dxns = data.map((obj) => Obj.getDXN(obj));
|
|
108
|
-
onAppend?.(dxns);
|
|
109
|
-
return dxns;
|
|
110
|
-
})
|
|
111
|
-
});
|
|
112
|
-
};
|
|
113
|
-
var createExtractionSchema = (types) => {
|
|
114
|
-
return Schema.Struct({
|
|
115
|
-
...Object.fromEntries(types.map(preprocessSchema).map((schema, index) => [
|
|
116
|
-
`objects_${getSanitizedSchemaName(types[index])}`,
|
|
117
|
-
Schema.optional(Schema.Array(schema)).annotations({
|
|
118
|
-
description: `The objects of type: ${Type.getDXN(types[index])?.asTypeDXN().type}. ${SchemaAST.getDescriptionAnnotation(types[index].ast).pipe(Option.getOrElse(() => ""))}`
|
|
119
|
-
})
|
|
120
|
-
]))
|
|
121
|
-
});
|
|
122
|
-
};
|
|
123
|
-
var getSanitizedSchemaName = (schema) => {
|
|
124
|
-
return Type.getDXN(schema).asTypeDXN().type.replaceAll(/[^a-zA-Z0-9]+/g, "_");
|
|
125
|
-
};
|
|
126
|
-
var sanitizeObjects = async (types, data, db, queue) => {
|
|
127
|
-
const entries = types.map((type) => data[`objects_${getSanitizedSchemaName(type)}`]?.map((object) => ({
|
|
128
|
-
data: object,
|
|
129
|
-
schema: type
|
|
130
|
-
})) ?? []).flat();
|
|
131
|
-
const idMap = /* @__PURE__ */ new Map();
|
|
132
|
-
const existingIds = /* @__PURE__ */ new Set();
|
|
133
|
-
const enitties = /* @__PURE__ */ new Map();
|
|
134
|
-
const resolveId = (id) => {
|
|
135
|
-
if (ObjectId.isValid(id)) {
|
|
136
|
-
existingIds.add(id);
|
|
137
|
-
return DXN.fromLocalObjectId(id);
|
|
138
|
-
}
|
|
139
|
-
const mappedId = idMap.get(id);
|
|
140
|
-
if (mappedId) {
|
|
141
|
-
return DXN.fromLocalObjectId(mappedId);
|
|
142
|
-
}
|
|
143
|
-
return void 0;
|
|
144
|
-
};
|
|
145
|
-
const res = entries.map((entry) => {
|
|
146
|
-
if (ObjectId.isValid(entry.data.id)) {
|
|
147
|
-
return entry;
|
|
148
|
-
}
|
|
149
|
-
idMap.set(entry.data.id, ObjectId.random());
|
|
150
|
-
entry.data.id = idMap.get(entry.data.id);
|
|
151
|
-
return entry;
|
|
152
|
-
}).map((entry) => {
|
|
153
|
-
const data2 = deepMapValues(entry.data, (value, recurse) => {
|
|
154
|
-
if (isEncodedReference(value)) {
|
|
155
|
-
const ref = value["/"];
|
|
156
|
-
const id = resolveId(ref);
|
|
157
|
-
if (id) {
|
|
158
|
-
return {
|
|
159
|
-
"/": id.toString()
|
|
160
|
-
};
|
|
161
|
-
} else {
|
|
162
|
-
return {
|
|
163
|
-
"/": `search:?q=${encodeURIComponent(ref)}`
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
return recurse(value);
|
|
168
|
-
});
|
|
169
|
-
if (Entity.getKind(entry.schema) === "relation") {
|
|
170
|
-
const sourceDxn = resolveId(data2.source);
|
|
171
|
-
if (!sourceDxn) {
|
|
172
|
-
log.warn("source not found", {
|
|
173
|
-
source: data2.source
|
|
174
|
-
}, {
|
|
175
|
-
F: __dxlog_file,
|
|
176
|
-
L: 273,
|
|
177
|
-
S: void 0,
|
|
178
|
-
C: (f, a) => f(...a)
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
const targetDxn = resolveId(data2.target);
|
|
182
|
-
if (!targetDxn) {
|
|
183
|
-
log.warn("target not found", {
|
|
184
|
-
target: data2.target
|
|
185
|
-
}, {
|
|
186
|
-
F: __dxlog_file,
|
|
187
|
-
L: 277,
|
|
188
|
-
S: void 0,
|
|
189
|
-
C: (f, a) => f(...a)
|
|
190
|
-
});
|
|
191
|
-
}
|
|
192
|
-
delete data2.source;
|
|
193
|
-
delete data2.target;
|
|
194
|
-
data2[RelationSourceDXNId] = sourceDxn;
|
|
195
|
-
data2[RelationTargetDXNId] = targetDxn;
|
|
196
|
-
}
|
|
197
|
-
return {
|
|
198
|
-
data: data2,
|
|
199
|
-
schema: entry.schema
|
|
200
|
-
};
|
|
201
|
-
}).filter((object) => !existingIds.has(object.data.id));
|
|
202
|
-
const dbObjects = await db.query(Query.select(Filter.id(...existingIds))).run();
|
|
203
|
-
const queueObjects = await queue?.getObjectsById([
|
|
204
|
-
...existingIds
|
|
205
|
-
]) ?? [];
|
|
206
|
-
const objects = [
|
|
207
|
-
...dbObjects,
|
|
208
|
-
...queueObjects
|
|
209
|
-
].filter(isNonNullable);
|
|
210
|
-
log.info("objects", {
|
|
211
|
-
dbObjects,
|
|
212
|
-
queueObjects,
|
|
213
|
-
existingIds
|
|
214
|
-
}, {
|
|
215
|
-
F: __dxlog_file,
|
|
216
|
-
L: 298,
|
|
217
|
-
S: void 0,
|
|
218
|
-
C: (f, a) => f(...a)
|
|
219
|
-
});
|
|
220
|
-
const missing = Array.from(existingIds).filter((id) => !objects.some((object) => object.id === id));
|
|
221
|
-
if (missing.length > 0) {
|
|
222
|
-
throw new Error(`Object IDs do not point to existing objects: ${missing.join(", ")}`);
|
|
223
|
-
}
|
|
224
|
-
return res.flatMap(({ data: data2, schema }) => {
|
|
225
|
-
let skip = false;
|
|
226
|
-
if (RelationSourceDXNId in data2) {
|
|
227
|
-
const id = data2[RelationSourceDXNId].asEchoDXN()?.echoId;
|
|
228
|
-
const obj = objects.find((object) => object.id === id) ?? enitties.get(id);
|
|
229
|
-
if (obj) {
|
|
230
|
-
delete data2[RelationSourceDXNId];
|
|
231
|
-
data2[RelationSourceId] = obj;
|
|
232
|
-
} else {
|
|
233
|
-
skip = true;
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
if (RelationTargetDXNId in data2) {
|
|
237
|
-
const id = data2[RelationTargetDXNId].asEchoDXN()?.echoId;
|
|
238
|
-
const obj = objects.find((object) => object.id === id) ?? enitties.get(id);
|
|
239
|
-
if (obj) {
|
|
240
|
-
delete data2[RelationTargetDXNId];
|
|
241
|
-
data2[RelationTargetId] = obj;
|
|
242
|
-
} else {
|
|
243
|
-
skip = true;
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
if (!skip) {
|
|
247
|
-
const obj = createObject(schema, data2);
|
|
248
|
-
enitties.set(obj.id, obj);
|
|
249
|
-
return [
|
|
250
|
-
obj
|
|
251
|
-
];
|
|
252
|
-
}
|
|
253
|
-
return [];
|
|
254
|
-
});
|
|
255
|
-
};
|
|
256
|
-
var SoftRef = Schema.Struct({
|
|
257
|
-
"/": Schema.String
|
|
258
|
-
}).annotations({
|
|
259
|
-
description: "Reference to another object."
|
|
260
|
-
});
|
|
261
|
-
var preprocessSchema = (schema) => {
|
|
262
|
-
const isRelationSchema = Entity.getKind(schema) === "relation";
|
|
263
|
-
const go = (ast, visited = /* @__PURE__ */ new Set()) => {
|
|
264
|
-
if (visited.has(ast)) {
|
|
265
|
-
return ast;
|
|
266
|
-
}
|
|
267
|
-
visited.add(ast);
|
|
268
|
-
if (SchemaAST.getAnnotation(ast, ReferenceAnnotationId).pipe(Option.isSome)) {
|
|
269
|
-
return SoftRef.ast;
|
|
270
|
-
}
|
|
271
|
-
return mapAst(ast, (child) => go(child, visited));
|
|
272
|
-
};
|
|
273
|
-
return Schema.make(mapAst(schema.ast, (ast) => go(ast))).pipe(Schema.omit("id"), Schema.extend(Schema.Struct({
|
|
274
|
-
id: Schema.String.annotations({
|
|
275
|
-
description: "The id of this object. Come up with a unique id based on your judgement."
|
|
276
|
-
})
|
|
277
|
-
})), isRelationSchema ? Schema.extend(Schema.Struct({
|
|
278
|
-
source: Schema.String.annotations({
|
|
279
|
-
description: "The id of the source object for this relation."
|
|
280
|
-
}),
|
|
281
|
-
target: Schema.String.annotations({
|
|
282
|
-
description: "The id of the target object for this relation."
|
|
283
|
-
})
|
|
284
|
-
})) : Function.identity);
|
|
285
|
-
};
|
|
286
|
-
|
|
287
|
-
// src/blueprints/research/types/ResearchGraph.ts
|
|
288
|
-
var ResearchGraph_exports = {};
|
|
289
|
-
__export(ResearchGraph_exports, {
|
|
290
|
-
LegacyResearchGraph: () => LegacyResearchGraph,
|
|
291
|
-
ResearchGraph: () => ResearchGraph,
|
|
292
|
-
contextQueueLayer: () => contextQueueLayer,
|
|
293
|
-
create: () => create,
|
|
294
|
-
query: () => query
|
|
295
|
-
});
|
|
296
|
-
import * as Effect2 from "effect/Effect";
|
|
297
|
-
import * as Layer from "effect/Layer";
|
|
298
|
-
import * as Schema2 from "effect/Schema";
|
|
299
|
-
import { Database as Database2, Obj as Obj2, Query as Query2, Ref, Type as Type2 } from "@dxos/echo";
|
|
300
|
-
import { Queue } from "@dxos/echo-db";
|
|
301
|
-
import { SystemTypeAnnotation } from "@dxos/echo/internal";
|
|
302
|
-
import { ContextQueueService as ContextQueueService2, QueueService } from "@dxos/functions";
|
|
303
|
-
var LegacyResearchGraph = Schema2.Struct({
|
|
304
|
-
queue: Ref.Ref(Queue)
|
|
305
|
-
}).pipe(Type2.object({
|
|
306
|
-
typename: "org.dxos.type.research-graph",
|
|
307
|
-
version: "0.1.0"
|
|
308
|
-
}), SystemTypeAnnotation.set(true));
|
|
309
|
-
var ResearchGraph = Schema2.Struct({
|
|
310
|
-
queue: Ref.Ref(Queue)
|
|
311
|
-
}).pipe(Type2.object({
|
|
312
|
-
typename: "org.dxos.type.researchGraph",
|
|
313
|
-
version: "0.1.0"
|
|
314
|
-
}), SystemTypeAnnotation.set(true));
|
|
315
|
-
var create = Effect2.fn("createResearchGraph")(function* () {
|
|
316
|
-
const queue = yield* QueueService.createQueue();
|
|
317
|
-
return yield* Database2.add(Obj2.make(ResearchGraph, {
|
|
318
|
-
queue: Ref.fromDXN(queue.dxn)
|
|
319
|
-
}));
|
|
320
|
-
});
|
|
321
|
-
var query = Effect2.fn("queryResearchGraph")(function* () {
|
|
322
|
-
const objects = yield* Database2.runQuery(Query2.type(ResearchGraph));
|
|
323
|
-
return objects.at(0);
|
|
324
|
-
});
|
|
325
|
-
var contextQueueLayer = Layer.unwrapEffect(Effect2.gen(function* () {
|
|
326
|
-
const researchGraph = (yield* query()) ?? (yield* create());
|
|
327
|
-
const researchQueue = yield* Database2.load(researchGraph.queue);
|
|
328
|
-
return ContextQueueService2.layer(researchQueue);
|
|
329
|
-
}));
|
|
330
|
-
|
|
331
|
-
// src/blueprints/research/types/index.ts
|
|
332
|
-
import { Text } from "@dxos/schema";
|
|
333
|
-
import { Event, HasConnection, HasRelationship, LegacyOrganization, LegacyPerson, Pipeline, Task } from "@dxos/types";
|
|
334
|
-
var ResearchDataTypes = [
|
|
335
|
-
// Objects
|
|
336
|
-
Event.Event,
|
|
337
|
-
Task.Task,
|
|
338
|
-
Text.Text,
|
|
339
|
-
// TODO(wittjosiah): Until views (e.g., Table) support relations this needs to be expressed via organization ref.
|
|
340
|
-
// Employer.Employer,
|
|
341
|
-
// Organization.Organization,
|
|
342
|
-
LegacyPerson,
|
|
343
|
-
LegacyOrganization,
|
|
344
|
-
Pipeline.Pipeline,
|
|
345
|
-
// Relations
|
|
346
|
-
HasRelationship.HasRelationship,
|
|
347
|
-
HasConnection.HasConnection
|
|
348
|
-
];
|
|
349
|
-
|
|
350
|
-
export {
|
|
351
|
-
Subgraph,
|
|
352
|
-
findRelatedSchema,
|
|
353
|
-
LocalSearchToolkit,
|
|
354
|
-
LocalSearchHandler,
|
|
355
|
-
makeGraphWriterToolkit,
|
|
356
|
-
makeGraphWriterHandler,
|
|
357
|
-
createExtractionSchema,
|
|
358
|
-
getSanitizedSchemaName,
|
|
359
|
-
sanitizeObjects,
|
|
360
|
-
ResearchGraph_exports,
|
|
361
|
-
ResearchDataTypes
|
|
362
|
-
};
|
|
363
|
-
//# sourceMappingURL=chunk-XT5ZSUS6.mjs.map
|