@dxos/assistant-toolkit 0.8.4-main.dfabb4ec29 → 0.8.4-main.effb148878
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/LICENSE +102 -5
- package/dist/lib/neutral/{add-artifact-ZUJ5DMSY.mjs → add-artifact-ZKSSMPLY.mjs} +6 -6
- package/dist/lib/neutral/{add-artifact-ZUJ5DMSY.mjs.map → add-artifact-ZKSSMPLY.mjs.map} +3 -3
- package/dist/lib/neutral/{agent-5NIKAYUK.mjs → agent-UIASE5LZ.mjs} +7 -7
- package/dist/lib/neutral/{agent-5NIKAYUK.mjs.map → agent-UIASE5LZ.mjs.map} +2 -2
- package/dist/lib/neutral/chunk-AF5TWFLV.mjs +66 -0
- package/dist/lib/neutral/chunk-AF5TWFLV.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-P4ZMYO4K.mjs → chunk-CMHECL6N.mjs} +21 -33
- package/dist/lib/neutral/chunk-CMHECL6N.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-ZFXLTBZG.mjs → chunk-DC5KITJP.mjs} +3 -2
- package/dist/lib/neutral/chunk-DC5KITJP.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-WLR3BGO4.mjs → chunk-EUHZLWCG.mjs} +2 -1
- package/dist/lib/neutral/chunk-EUHZLWCG.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-IKBIORQX.mjs → chunk-EUTROPCP.mjs} +22 -9
- package/dist/lib/neutral/chunk-EUTROPCP.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-GV66MKAQ.mjs → chunk-FNN6ERC6.mjs} +4 -3
- package/dist/lib/neutral/chunk-FNN6ERC6.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-246ACKSH.mjs → chunk-GEMRKH7J.mjs} +15 -12
- package/dist/lib/neutral/chunk-GEMRKH7J.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-EJAQUAKM.mjs → chunk-GHGJCH73.mjs} +8 -5
- package/dist/lib/neutral/chunk-GHGJCH73.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-KGU725LW.mjs → chunk-LO2S3ICN.mjs} +4 -7
- package/dist/lib/neutral/chunk-LO2S3ICN.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-TO5IX24K.mjs → chunk-MMIERIDT.mjs} +12 -9
- package/dist/lib/neutral/chunk-MMIERIDT.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-NR3GTWRC.mjs → chunk-OC77MYT5.mjs} +8 -13
- package/dist/lib/neutral/chunk-OC77MYT5.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-ROMZO4CB.mjs → chunk-ONQXVECY.mjs} +11 -9
- package/dist/lib/neutral/chunk-ONQXVECY.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-QO5SU37C.mjs → chunk-PAEPER4S.mjs} +3 -3
- package/dist/lib/neutral/{chunk-XUF53B6B.mjs → chunk-RIF2TKJJ.mjs} +10 -9
- package/dist/lib/neutral/chunk-RIF2TKJJ.mjs.map +7 -0
- package/dist/lib/neutral/{context-add-VB7AOY3G.mjs → context-add-VNJUVPSY.mjs} +4 -4
- package/dist/lib/neutral/context-add-VNJUVPSY.mjs.map +7 -0
- package/dist/lib/neutral/{context-remove-VCM3VPSO.mjs → context-remove-ZASL7ABZ.mjs} +4 -4
- package/dist/lib/neutral/context-remove-ZASL7ABZ.mjs.map +7 -0
- package/dist/lib/neutral/{create-project-EIF4OJMY.mjs → create-project-VNC2KKBG.mjs} +7 -7
- package/dist/lib/neutral/{delete-J3PMWP7Z.mjs → delete-NLBJMMBJ.mjs} +3 -3
- package/dist/lib/neutral/{enable-blueprints-LBDZH2CY.mjs → enable-blueprints-SMGQ2WCU.mjs} +4 -4
- package/dist/lib/neutral/enable-blueprints-SMGQ2WCU.mjs.map +7 -0
- package/dist/lib/neutral/{fetch-KHMHV7JR.mjs → fetch-VV3DU75K.mjs} +2 -2
- package/dist/lib/neutral/{fetch-messages-QOBBCTGC.mjs → fetch-messages-YXH77S3S.mjs} +2 -2
- package/dist/lib/neutral/{get-context-TN7X7U2H.mjs → get-context-LG2CNVII.mjs} +7 -7
- package/dist/lib/neutral/{get-context-TN7X7U2H.mjs.map → get-context-LG2CNVII.mjs.map} +3 -3
- package/dist/lib/neutral/index.mjs +84 -85
- package/dist/lib/neutral/index.mjs.map +3 -3
- package/dist/lib/neutral/{load-ALP3TK2E.mjs → load-K7HEJA54.mjs} +2 -2
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/lib/neutral/{object-create-Z57Y3X6Y.mjs → object-create-EN6PJN3L.mjs} +4 -4
- package/dist/lib/neutral/{object-create-Z57Y3X6Y.mjs.map → object-create-EN6PJN3L.mjs.map} +2 -2
- package/dist/lib/neutral/{object-delete-X53LS37B.mjs → object-delete-RMA5ZKGY.mjs} +2 -2
- package/dist/lib/neutral/{object-update-GVKSBR7T.mjs → object-update-JW5PLR2T.mjs} +3 -3
- package/dist/lib/neutral/{object-update-GVKSBR7T.mjs.map → object-update-JW5PLR2T.mjs.map} +2 -2
- package/dist/lib/neutral/{project-HPHTZ2CI.mjs → project-OGO5ABSZ.mjs} +6 -6
- package/dist/lib/neutral/{project-rules-IVDHKSKI.mjs → project-rules-IVA3DSOW.mjs} +5 -5
- package/dist/lib/neutral/{prompt-Y7NN7M5D.mjs → prompt-YVFNLD7U.mjs} +5 -5
- package/dist/lib/neutral/{prompt-Y7NN7M5D.mjs.map → prompt-YVFNLD7U.mjs.map} +3 -3
- package/dist/lib/neutral/{qualifier-VDOY5CWU.mjs → qualifier-UTPO5E3S.mjs} +15 -14
- package/dist/lib/neutral/qualifier-UTPO5E3S.mjs.map +7 -0
- package/dist/lib/neutral/{query-PPJU5622.mjs → query-3FK3ED6L.mjs} +4 -5
- package/dist/lib/neutral/query-3FK3ED6L.mjs.map +7 -0
- package/dist/lib/neutral/{query-U56GNEV6.mjs → query-GXZT4KUX.mjs} +3 -3
- package/dist/lib/neutral/{query-blueprints-KXADGHSA.mjs → query-blueprints-GA2JM54N.mjs} +2 -2
- package/dist/lib/neutral/{relation-create-XJ2IX6X3.mjs → relation-create-XOFKYPL2.mjs} +3 -3
- package/dist/lib/neutral/{relation-create-XJ2IX6X3.mjs.map → relation-create-XOFKYPL2.mjs.map} +3 -3
- package/dist/lib/neutral/{relation-delete-EP4KXAFL.mjs → relation-delete-MVJKKVEQ.mjs} +2 -2
- package/dist/lib/neutral/{save-GWAPLT3Z.mjs → save-TFQMJKG7.mjs} +3 -3
- package/dist/lib/neutral/{schema-add-Z5CY6P24.mjs → schema-add-I7BFBU55.mjs} +2 -2
- package/dist/lib/neutral/schema-list-TYGGAO2P.mjs +49 -0
- package/dist/lib/neutral/schema-list-TYGGAO2P.mjs.map +7 -0
- package/dist/lib/neutral/{sync-issues-4YE5XAK5.mjs → sync-issues-3U3EL6KO.mjs} +5 -6
- package/dist/lib/neutral/sync-issues-3U3EL6KO.mjs.map +7 -0
- package/dist/lib/neutral/{sync-triggers-CDMJVW6E.mjs → sync-triggers-M6U6RAKN.mjs} +39 -37
- package/dist/lib/neutral/sync-triggers-M6U6RAKN.mjs.map +7 -0
- package/dist/lib/neutral/{tag-add-VNIIOVJA.mjs → tag-add-RCE2QULJ.mjs} +3 -3
- package/dist/lib/neutral/{tag-add-VNIIOVJA.mjs.map → tag-add-RCE2QULJ.mjs.map} +3 -3
- package/dist/lib/neutral/{tag-remove-6R2R27W3.mjs → tag-remove-EPKB5CDE.mjs} +3 -3
- package/dist/lib/neutral/{tag-remove-6R2R27W3.mjs.map → tag-remove-EPKB5CDE.mjs.map} +3 -3
- package/dist/lib/neutral/testing/index.mjs +7 -10
- package/dist/lib/neutral/testing/index.mjs.map +3 -3
- package/dist/lib/neutral/{update-blueprints-N2AK2VUR.mjs → update-blueprints-VOGJKSMQ.mjs} +2 -2
- package/dist/lib/neutral/update-tasks-PNNNCPWH.mjs +13 -0
- package/dist/lib/neutral/update-tasks-PNNNCPWH.mjs.map +7 -0
- package/dist/types/src/blueprints/blueprint-manager/functions/definitions.d.ts +10 -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/query-blueprints.d.ts +4 -5
- package/dist/types/src/blueprints/database/functions/context-add.d.ts +3 -3
- 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 +3 -3
- package/dist/types/src/blueprints/database/functions/context-remove.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/definitions.d.ts +17 -17
- package/dist/types/src/blueprints/database/functions/definitions.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/load.d.ts +2 -2
- package/dist/types/src/blueprints/database/functions/load.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-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 +2 -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 +3 -3
- 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/schema-list.d.ts.map +1 -1
- package/dist/types/src/blueprints/database/functions/tag-add.d.ts +3 -3
- 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 +3 -3
- package/dist/types/src/blueprints/database/functions/tag-remove.d.ts.map +1 -1
- package/dist/types/src/blueprints/discord/functions/definitions.d.ts.map +1 -1
- package/dist/types/src/blueprints/github/functions/definitions.d.ts.map +1 -1
- package/dist/types/src/blueprints/linear/functions/definitions.d.ts.map +1 -1
- package/dist/types/src/blueprints/linear/functions/sync-issues.d.ts.map +1 -1
- package/dist/types/src/blueprints/memory/functions/definitions.d.ts +2 -2
- 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/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 +14 -1
- package/dist/types/src/blueprints/planning/functions/update-tasks.d.ts.map +1 -1
- package/dist/types/src/blueprints/planning/functions/update-tasks.test.d.ts +2 -0
- package/dist/types/src/blueprints/planning/functions/update-tasks.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/project/functions/add-artifact.d.ts +1 -5
- package/dist/types/src/blueprints/project/functions/add-artifact.d.ts.map +1 -1
- package/dist/types/src/blueprints/project/functions/definitions.d.ts +60 -45
- package/dist/types/src/blueprints/project/functions/definitions.d.ts.map +1 -1
- package/dist/types/src/blueprints/project/functions/get-context.d.ts +1 -12
- package/dist/types/src/blueprints/project/functions/get-context.d.ts.map +1 -1
- package/dist/types/src/blueprints/project/functions/qualifier.d.ts +3 -71
- package/dist/types/src/blueprints/project/functions/qualifier.d.ts.map +1 -1
- package/dist/types/src/blueprints/project-wizard/functions/create-project.d.ts +22 -18
- package/dist/types/src/blueprints/project-wizard/functions/definitions.d.ts +43 -36
- package/dist/types/src/blueprints/project-wizard/functions/definitions.d.ts.map +1 -1
- package/dist/types/src/blueprints/project-wizard/functions/sync-triggers.d.ts +21 -17
- package/dist/types/src/blueprints/project-wizard/functions/sync-triggers.d.ts.map +1 -1
- package/dist/types/src/blueprints/testing.d.ts +4 -4
- package/dist/types/src/blueprints/testing.d.ts.map +1 -1
- package/dist/types/src/blueprints/websearch/functions/definitions.d.ts.map +1 -1
- package/dist/types/src/crud/graph.d.ts +8 -11
- package/dist/types/src/crud/graph.d.ts.map +1 -1
- package/dist/types/src/errors.d.ts +3 -3
- package/dist/types/src/errors.d.ts.map +1 -1
- package/dist/types/src/functions/agent/definitions.d.ts +12 -13
- package/dist/types/src/functions/agent/definitions.d.ts.map +1 -1
- package/dist/types/src/sync/sync.d.ts +1 -2
- package/dist/types/src/sync/sync.d.ts.map +1 -1
- package/dist/types/src/testing/plugins.d.ts +1 -1
- package/dist/types/src/testing/plugins.d.ts.map +1 -1
- package/dist/types/src/types/Agent.d.ts +23 -22
- package/dist/types/src/types/Agent.d.ts.map +1 -1
- package/dist/types/src/types/Chat.d.ts +17 -20
- package/dist/types/src/types/Chat.d.ts.map +1 -1
- package/dist/types/src/types/McpServer.d.ts +1 -2
- package/dist/types/src/types/McpServer.d.ts.map +1 -1
- package/dist/types/src/types/Memory.d.ts +1 -2
- package/dist/types/src/types/Memory.d.ts.map +1 -1
- package/dist/types/src/types/Plan.d.ts +14 -16
- package/dist/types/src/types/Plan.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +26 -26
- package/src/blueprints/automation/blueprint.ts +3 -3
- package/src/blueprints/blueprint-manager/blueprint.conversations.json +1 -1
- package/src/blueprints/blueprint-manager/blueprint.test.ts +23 -19
- package/src/blueprints/blueprint-manager/functions/definitions.ts +8 -5
- package/src/blueprints/blueprint-manager/functions/enable-blueprints.ts +2 -2
- package/src/blueprints/database/blueprint.conversations.json +1 -1
- package/src/blueprints/database/blueprint.test.ts +15 -15
- package/src/blueprints/database/functions/context-add.ts +2 -2
- package/src/blueprints/database/functions/context-remove.ts +2 -2
- package/src/blueprints/database/functions/definitions.ts +19 -6
- package/src/blueprints/database/functions/object-create.ts +2 -2
- package/src/blueprints/database/functions/object-update.ts +1 -1
- package/src/blueprints/database/functions/query.ts +3 -4
- package/src/blueprints/database/functions/relation-create.ts +1 -1
- package/src/blueprints/database/functions/schema-list.ts +17 -10
- package/src/blueprints/database/functions/tag-add.ts +1 -1
- package/src/blueprints/database/functions/tag-remove.ts +1 -1
- package/src/blueprints/discord/functions/definitions.ts +1 -0
- package/src/blueprints/discord/functions/fetch-messages.test.ts +7 -2
- package/src/blueprints/github/functions/definitions.ts +1 -0
- package/src/blueprints/linear/functions/definitions.ts +1 -0
- package/src/blueprints/linear/functions/linear.test.ts +1 -2
- package/src/blueprints/linear/functions/sync-issues.ts +1 -2
- package/src/blueprints/memory/blueprint.conversations.json +1 -1
- package/src/blueprints/memory/functions/definitions.ts +3 -0
- package/src/blueprints/planning/blueprint.ts +1 -1
- package/src/blueprints/planning/functions/index.ts +1 -1
- package/src/blueprints/planning/functions/{definitions.ts → update-tasks.md} +29 -50
- package/src/blueprints/planning/functions/update-tasks.test.ts +55 -0
- package/src/blueprints/planning/functions/update-tasks.ts +26 -3
- package/src/blueprints/project/blueprint.conversations.json +1 -1
- package/src/blueprints/project/blueprint.test.ts +12 -14
- package/src/blueprints/project/functions/add-artifact.ts +1 -0
- package/src/blueprints/project/functions/agent.ts +2 -2
- package/src/blueprints/project/functions/definitions.ts +8 -6
- package/src/blueprints/project/functions/get-context.ts +2 -1
- package/src/blueprints/project/functions/qualifier.ts +8 -7
- package/src/blueprints/project-wizard/functions/definitions.ts +6 -4
- package/src/blueprints/project-wizard/functions/sync-triggers.ts +32 -34
- package/src/blueprints/testing.ts +10 -4
- package/src/blueprints/websearch/blueprint.conversations.json +1 -1
- package/src/blueprints/websearch/functions/definitions.ts +1 -0
- package/src/crud/graph.test.ts +1 -1
- package/src/crud/graph.ts +142 -151
- package/src/errors.ts +3 -3
- package/src/functions/agent/definitions.ts +2 -1
- package/src/functions/agent/prompt.conversations.json +1 -1
- package/src/functions/agent/prompt.test.ts +8 -11
- package/src/functions/agent/prompt.ts +2 -2
- package/src/sync/sync.ts +7 -6
- package/src/testing/plugins.tsx +8 -13
- package/src/types/Agent.ts +24 -29
- package/src/types/Chat.ts +9 -16
- package/src/types/McpServer.ts +3 -6
- package/src/types/Memory.ts +3 -3
- package/src/types/Plan.ts +4 -11
- package/dist/lib/neutral/chunk-246ACKSH.mjs.map +0 -7
- package/dist/lib/neutral/chunk-EJAQUAKM.mjs.map +0 -7
- package/dist/lib/neutral/chunk-FIGO6CA6.mjs +0 -140
- package/dist/lib/neutral/chunk-FIGO6CA6.mjs.map +0 -7
- package/dist/lib/neutral/chunk-GV66MKAQ.mjs.map +0 -7
- package/dist/lib/neutral/chunk-IKBIORQX.mjs.map +0 -7
- package/dist/lib/neutral/chunk-KGU725LW.mjs.map +0 -7
- package/dist/lib/neutral/chunk-NR3GTWRC.mjs.map +0 -7
- package/dist/lib/neutral/chunk-P4ZMYO4K.mjs.map +0 -7
- package/dist/lib/neutral/chunk-ROMZO4CB.mjs.map +0 -7
- package/dist/lib/neutral/chunk-TO5IX24K.mjs.map +0 -7
- package/dist/lib/neutral/chunk-WLR3BGO4.mjs.map +0 -7
- package/dist/lib/neutral/chunk-XUF53B6B.mjs.map +0 -7
- package/dist/lib/neutral/chunk-ZFXLTBZG.mjs.map +0 -7
- package/dist/lib/neutral/context-add-VB7AOY3G.mjs.map +0 -7
- package/dist/lib/neutral/context-remove-VCM3VPSO.mjs.map +0 -7
- package/dist/lib/neutral/enable-blueprints-LBDZH2CY.mjs.map +0 -7
- package/dist/lib/neutral/qualifier-VDOY5CWU.mjs.map +0 -7
- package/dist/lib/neutral/query-PPJU5622.mjs.map +0 -7
- package/dist/lib/neutral/schema-list-W326VPVX.mjs +0 -38
- package/dist/lib/neutral/schema-list-W326VPVX.mjs.map +0 -7
- package/dist/lib/neutral/sync-issues-4YE5XAK5.mjs.map +0 -7
- package/dist/lib/neutral/sync-triggers-CDMJVW6E.mjs.map +0 -7
- package/dist/lib/neutral/update-tasks-H7SWIFQL.mjs +0 -46
- package/dist/lib/neutral/update-tasks-H7SWIFQL.mjs.map +0 -7
- package/dist/types/src/blueprints/planning/functions/definitions.d.ts +0 -11
- package/dist/types/src/blueprints/planning/functions/definitions.d.ts.map +0 -1
- /package/dist/lib/neutral/{chunk-QO5SU37C.mjs.map → chunk-PAEPER4S.mjs.map} +0 -0
- /package/dist/lib/neutral/{create-project-EIF4OJMY.mjs.map → create-project-VNC2KKBG.mjs.map} +0 -0
- /package/dist/lib/neutral/{delete-J3PMWP7Z.mjs.map → delete-NLBJMMBJ.mjs.map} +0 -0
- /package/dist/lib/neutral/{fetch-KHMHV7JR.mjs.map → fetch-VV3DU75K.mjs.map} +0 -0
- /package/dist/lib/neutral/{fetch-messages-QOBBCTGC.mjs.map → fetch-messages-YXH77S3S.mjs.map} +0 -0
- /package/dist/lib/neutral/{load-ALP3TK2E.mjs.map → load-K7HEJA54.mjs.map} +0 -0
- /package/dist/lib/neutral/{object-delete-X53LS37B.mjs.map → object-delete-RMA5ZKGY.mjs.map} +0 -0
- /package/dist/lib/neutral/{project-HPHTZ2CI.mjs.map → project-OGO5ABSZ.mjs.map} +0 -0
- /package/dist/lib/neutral/{project-rules-IVDHKSKI.mjs.map → project-rules-IVA3DSOW.mjs.map} +0 -0
- /package/dist/lib/neutral/{query-U56GNEV6.mjs.map → query-GXZT4KUX.mjs.map} +0 -0
- /package/dist/lib/neutral/{query-blueprints-KXADGHSA.mjs.map → query-blueprints-GA2JM54N.mjs.map} +0 -0
- /package/dist/lib/neutral/{relation-delete-EP4KXAFL.mjs.map → relation-delete-MVJKKVEQ.mjs.map} +0 -0
- /package/dist/lib/neutral/{save-GWAPLT3Z.mjs.map → save-TFQMJKG7.mjs.map} +0 -0
- /package/dist/lib/neutral/{schema-add-Z5CY6P24.mjs.map → schema-add-I7BFBU55.mjs.map} +0 -0
- /package/dist/lib/neutral/{update-blueprints-N2AK2VUR.mjs.map → update-blueprints-VOGJKSMQ.mjs.map} +0 -0
package/LICENSE
CHANGED
|
@@ -1,8 +1,105 @@
|
|
|
1
|
-
|
|
2
|
-
Copyright (c) 2022 DXOS
|
|
1
|
+
# Functional Source License, Version 1.1, ALv2 Future License
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
## Abbreviation
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
FSL-1.1-Apache-2.0
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
## Notice
|
|
8
|
+
|
|
9
|
+
Copyright 2026 DXOS
|
|
10
|
+
|
|
11
|
+
## Terms and Conditions
|
|
12
|
+
|
|
13
|
+
### Licensor ("We")
|
|
14
|
+
|
|
15
|
+
The party offering the Software under these Terms and Conditions.
|
|
16
|
+
|
|
17
|
+
### The Software
|
|
18
|
+
|
|
19
|
+
The "Software" is each version of the software that we make available under
|
|
20
|
+
these Terms and Conditions, as indicated by our inclusion of these Terms and
|
|
21
|
+
Conditions with the Software.
|
|
22
|
+
|
|
23
|
+
### License Grant
|
|
24
|
+
|
|
25
|
+
Subject to your compliance with this License Grant and the Patents,
|
|
26
|
+
Redistribution and Trademark clauses below, we hereby grant you the right to
|
|
27
|
+
use, copy, modify, create derivative works, publicly perform, publicly display
|
|
28
|
+
and redistribute the Software for any Permitted Purpose identified below.
|
|
29
|
+
|
|
30
|
+
### Permitted Purpose
|
|
31
|
+
|
|
32
|
+
A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
|
|
33
|
+
means making the Software available to others in a commercial product or
|
|
34
|
+
service that:
|
|
35
|
+
|
|
36
|
+
1. substitutes for the Software;
|
|
37
|
+
|
|
38
|
+
2. substitutes for any other product or service we offer using the Software
|
|
39
|
+
that exists as of the date we make the Software available; or
|
|
40
|
+
|
|
41
|
+
3. offers the same or substantially similar functionality as the Software.
|
|
42
|
+
|
|
43
|
+
Permitted Purposes specifically include using the Software:
|
|
44
|
+
|
|
45
|
+
1. for your internal use and access;
|
|
46
|
+
|
|
47
|
+
2. for non-commercial education;
|
|
48
|
+
|
|
49
|
+
3. for non-commercial research; and
|
|
50
|
+
|
|
51
|
+
4. in connection with professional services that you provide to a licensee
|
|
52
|
+
using the Software in accordance with these Terms and Conditions.
|
|
53
|
+
|
|
54
|
+
### Patents
|
|
55
|
+
|
|
56
|
+
To the extent your use for a Permitted Purpose would necessarily infringe our
|
|
57
|
+
patents, the license grant above includes a license under our patents. If you
|
|
58
|
+
make a claim against any party that the Software infringes or contributes to
|
|
59
|
+
the infringement of any patent, then your patent license to the Software ends
|
|
60
|
+
immediately.
|
|
61
|
+
|
|
62
|
+
### Redistribution
|
|
63
|
+
|
|
64
|
+
The Terms and Conditions apply to all copies, modifications and derivatives of
|
|
65
|
+
the Software.
|
|
66
|
+
|
|
67
|
+
If you redistribute any copies, modifications or derivatives of the Software,
|
|
68
|
+
you must include a copy of or a link to these Terms and Conditions and not
|
|
69
|
+
remove any copyright notices provided in or with the Software.
|
|
70
|
+
|
|
71
|
+
### Disclaimer
|
|
72
|
+
|
|
73
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
|
|
74
|
+
IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
|
|
75
|
+
PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
|
|
76
|
+
|
|
77
|
+
IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
|
|
78
|
+
SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
|
|
79
|
+
EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
|
|
80
|
+
|
|
81
|
+
### Trademarks
|
|
82
|
+
|
|
83
|
+
Except for displaying the License Details and identifying us as the origin of
|
|
84
|
+
the Software, you have no right under these Terms and Conditions to use our
|
|
85
|
+
trademarks, trade names, service marks or product names.
|
|
86
|
+
|
|
87
|
+
## Grant of Future License
|
|
88
|
+
|
|
89
|
+
We hereby irrevocably grant you an additional license to use the Software under
|
|
90
|
+
the Apache License, Version 2.0 that is effective on the second anniversary of
|
|
91
|
+
the date we make the Software available. On or after that date, you may use the
|
|
92
|
+
Software under the Apache License, Version 2.0, in which case the following
|
|
93
|
+
will apply:
|
|
94
|
+
|
|
95
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
96
|
+
this file except in compliance with the License.
|
|
97
|
+
|
|
98
|
+
You may obtain a copy of the License at
|
|
99
|
+
|
|
100
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
101
|
+
|
|
102
|
+
Unless required by applicable law or agreed to in writing, software distributed
|
|
103
|
+
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
104
|
+
CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
|
105
|
+
specific language governing permissions and limitations under the License.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AddArtifact
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GEMRKH7J.mjs";
|
|
4
4
|
import {
|
|
5
5
|
Agent_exports
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-CMHECL6N.mjs";
|
|
7
|
+
import "./chunk-OC77MYT5.mjs";
|
|
8
|
+
import "./chunk-LO2S3ICN.mjs";
|
|
9
9
|
import "./chunk-J5LGTIGS.mjs";
|
|
10
10
|
|
|
11
11
|
// src/blueprints/project/functions/add-artifact.ts
|
|
@@ -23,8 +23,8 @@ var add_artifact_default = AddArtifact.pipe(Operation.withHandler(Effect.fnUntra
|
|
|
23
23
|
data: artifact
|
|
24
24
|
});
|
|
25
25
|
});
|
|
26
|
-
})));
|
|
26
|
+
})), Operation.opaqueHandler);
|
|
27
27
|
export {
|
|
28
28
|
add_artifact_default as default
|
|
29
29
|
};
|
|
30
|
-
//# sourceMappingURL=add-artifact-
|
|
30
|
+
//# sourceMappingURL=add-artifact-ZKSSMPLY.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/blueprints/project/functions/add-artifact.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Operation } from '@dxos/compute';\nimport { Database, Obj } from '@dxos/echo';\n\nimport { Agent } from '../../../types';\nimport { AddArtifact } from './definitions';\n\nexport default AddArtifact.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* ({ name, artifact }) {\n if (!(yield* Database.load(artifact))) {\n throw new Error('Artifact not found.');\n }\n\n const agent = yield* Agent.getFromChatContext;\n\n Obj.update(agent, (agent) => {\n agent.artifacts.push({\n name,\n data: artifact,\n });\n });\n }) as any,\n ),\n);\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,iBAAiB;AAC1B,SAASC,UAAUC,WAAW;AAK9B,IAAA,uBAAeC,YAAYC,KACzBC,UAAUC,YACDC,kBAAW,WAAW,EAAEC,MAAMC,SAAQ,GAAE;AAC7C,MAAI,EAAE,OAAOC,SAASC,KAAKF,QAAAA,IAAY;AACrC,UAAM,IAAIG,MAAM,qBAAA;EAClB;AAEA,QAAMC,QAAQ,OAAOC,cAAMC;AAE3BC,MAAIC,OAAOJ,OAAO,CAACA,WAAAA;AACjBA,IAAAA,OAAMK,UAAUC,KAAK;MACnBX;MACAY,MAAMX;IACR,CAAA;EACF,CAAA;AACF,CAAA,CAAA,
|
|
6
|
-
"names": ["Effect", "Operation", "Database", "Obj", "AddArtifact", "pipe", "Operation", "withHandler", "fnUntraced", "name", "artifact", "Database", "load", "Error", "agent", "Agent", "getFromChatContext", "Obj", "update", "artifacts", "push", "data"]
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Operation } from '@dxos/compute';\nimport { Database, Obj } from '@dxos/echo';\n\nimport { Agent } from '../../../types';\nimport { AddArtifact } from './definitions';\n\nexport default AddArtifact.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* ({ name, artifact }) {\n if (!(yield* Database.load(artifact))) {\n throw new Error('Artifact not found.');\n }\n\n const agent = yield* Agent.getFromChatContext;\n\n Obj.update(agent, (agent) => {\n agent.artifacts.push({\n name,\n data: artifact,\n });\n });\n }) as any,\n ),\n Operation.opaqueHandler,\n);\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,iBAAiB;AAC1B,SAASC,UAAUC,WAAW;AAK9B,IAAA,uBAAeC,YAAYC,KACzBC,UAAUC,YACDC,kBAAW,WAAW,EAAEC,MAAMC,SAAQ,GAAE;AAC7C,MAAI,EAAE,OAAOC,SAASC,KAAKF,QAAAA,IAAY;AACrC,UAAM,IAAIG,MAAM,qBAAA;EAClB;AAEA,QAAMC,QAAQ,OAAOC,cAAMC;AAE3BC,MAAIC,OAAOJ,OAAO,CAACA,WAAAA;AACjBA,IAAAA,OAAMK,UAAUC,KAAK;MACnBX;MACAY,MAAMX;IACR,CAAA;EACF,CAAA;AACF,CAAA,CAAA,GAEFJ,UAAUgB,aAAa;",
|
|
6
|
+
"names": ["Effect", "Operation", "Database", "Obj", "AddArtifact", "pipe", "Operation", "withHandler", "fnUntraced", "name", "artifact", "Database", "load", "Error", "agent", "Agent", "getFromChatContext", "Obj", "update", "artifacts", "push", "data", "opaqueHandler"]
|
|
7
7
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentWorker
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GEMRKH7J.mjs";
|
|
4
4
|
import {
|
|
5
5
|
Agent_exports
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-CMHECL6N.mjs";
|
|
7
|
+
import "./chunk-OC77MYT5.mjs";
|
|
8
|
+
import "./chunk-LO2S3ICN.mjs";
|
|
9
9
|
import "./chunk-J5LGTIGS.mjs";
|
|
10
10
|
|
|
11
11
|
// src/blueprints/project/functions/agent.ts
|
|
@@ -25,7 +25,7 @@ var agent_default = AgentWorker.pipe(Operation.withHandler(Effect.fnUntraced(fun
|
|
|
25
25
|
const chatFeed = yield* agent.chat.pipe(Database.load, Effect.flatMap((chat) => Database.load(chat.feed)), Effect.catchTag("ObjectNotFoundError", () => Effect.die(new Error("Unable to load agent chat feed object."))));
|
|
26
26
|
invariant(chatFeed, "Agent chat feed not found.", { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 19, S: this, A: ["chatFeed", "'Agent chat feed not found.'"] });
|
|
27
27
|
const runtime2 = yield* Effect.runtime();
|
|
28
|
-
const session = yield* acquireReleaseResource(() => new AiSession({
|
|
28
|
+
const session = yield* acquireReleaseResource(() => new AiSession.Session({
|
|
29
29
|
feed: chatFeed,
|
|
30
30
|
runtime: runtime2
|
|
31
31
|
}));
|
|
@@ -54,7 +54,7 @@ var agent_default = AgentWorker.pipe(Operation.withHandler(Effect.fnUntraced(fun
|
|
|
54
54
|
yield* session.createRequest({
|
|
55
55
|
prompt: input
|
|
56
56
|
}).pipe(Effect.provide(Layer.mergeAll(AiService.model("@anthropic/claude-opus-4-6"), ToolExecutionServices).pipe(Layer.provideMerge(Operation.withInvocationOptions({
|
|
57
|
-
conversation: Obj.
|
|
57
|
+
conversation: Obj.getURI(chatFeed)
|
|
58
58
|
})))), Effect.retry({
|
|
59
59
|
times: 2
|
|
60
60
|
}));
|
|
@@ -62,4 +62,4 @@ var agent_default = AgentWorker.pipe(Operation.withHandler(Effect.fnUntraced(fun
|
|
|
62
62
|
export {
|
|
63
63
|
agent_default as default
|
|
64
64
|
};
|
|
65
|
-
//# sourceMappingURL=agent-
|
|
65
|
+
//# sourceMappingURL=agent-UIASE5LZ.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/blueprints/project/functions/agent.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Layer from 'effect/Layer';\n\nimport { AiService } from '@dxos/ai';\nimport { AiSession, ToolExecutionServices } from '@dxos/assistant';\nimport { Operation } from '@dxos/compute';\nimport { Database, Feed, Obj } from '@dxos/echo';\nimport { acquireReleaseResource } from '@dxos/effect';\nimport { invariant } from '@dxos/invariant';\nimport { ContentBlock } from '@dxos/types';\n\nimport { Agent } from '../../../types';\nimport { AgentWorker } from './definitions';\n\nexport default AgentWorker.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* ({ agent: agentRef, prompt, event }) {\n const agent = yield* Database.load(agentRef).pipe(\n Effect.catchTag('ObjectNotFoundError', () => Effect.die(new Error('Unable to load agent object.'))),\n );\n invariant(Obj.instanceOf(Agent.Agent, agent));\n invariant(agent.chat, 'Agent has no chat.');\n\n const chatFeed = yield* agent.chat.pipe(\n Database.load,\n Effect.flatMap((chat) => Database.load(chat.feed)),\n Effect.catchTag('ObjectNotFoundError', () => Effect.die(new Error('Unable to load agent chat feed object.'))),\n );\n invariant(chatFeed, 'Agent chat feed not found.');\n const runtime = yield* Effect.runtime<Feed.FeedService>();\n const session = yield* acquireReleaseResource(() => new AiSession({ feed: chatFeed, runtime }));\n\n const agentsInContext = session.context.getObjects().filter(Obj.instanceOf(Agent.Agent));\n if (agentsInContext.length !== 1) {\n throw new Error('There should be exactly one agent in context. Got: ' + agentsInContext.length);\n }\n\n if (!prompt && !event) {\n throw new Error('Either prompt or event must be provided.');\n }\n\n let input: ContentBlock.Any[] = [];\n if (prompt) {\n input.push({ _tag: 'text', text: prompt, disposition: 'synthetic' });\n }\n if (event) {\n input.push({ _tag: 'text', text: JSON.stringify(event), disposition: 'synthetic' });\n }\n\n yield* session\n .createRequest({\n prompt: input,\n })\n .pipe(\n Effect.provide(\n Layer.mergeAll(AiService.model('@anthropic/claude-opus-4-6'), ToolExecutionServices).pipe(\n Layer.provideMerge(Operation.withInvocationOptions({ conversation: Obj.
|
|
5
|
-
"mappings": ";;;;;;;;;;;AAIA,YAAYA,YAAY;AACxB,YAAYC,WAAW;AAEvB,SAASC,iBAAiB;AAC1B,SAASC,WAAWC,6BAA6B;AACjD,SAASC,iBAAiB;AAC1B,SAASC,UAAgBC,WAAW;AACpC,SAASC,8BAA8B;AACvC,SAASC,iBAAiB;AAM1B,IAAA,eAAeC;IAMTC,gBAAUC,YAAIC,KAAWC,UAAaC,YAAAA,kBAAAA,WAAAA,EAAAA,OAAAA,UAAAA,QAAAA,MAAAA,GAAAA;AACtCJ,QAAAA,QAAUI,OAAU,SAAE,KAAA,QAAA,EAAA,KAAA,gBAAA,uBAAA,MAAA,WAAA,IAAA,MAAA,8BAAA,CAAA,CAAA,CAAA;AAEtB,YAAMC,IAAAA,WAAkBD,cAAME,OAAKC,KACjCC,GAAAA,QAASC,EAAI,YACNC,YAASJ,GAAAA,cAAkBG,GAAKH,IAAAA,GAAKK,MAAI,GAAA,CAChDC,sCAAgB,EAAuB,EAAA,CAAA;AAEzCZ,YAAUK,MAAAA,MAAU,sBAAA,EAAA,YAAA,YAAA,GAAA,cAAA,GAAA,IAAA,GAAA,MAAA,GAAA,CAAA,cAAA,sBAAA,EAAA,CAAA;AACpB,QAAMQ,WAAU,OAAOD,MAAOC,KAAAA,KAAO,SAAA,MAAA,eAAA,CAAA,SAAA,SAAA,KAAA,KAAA,IAAA,CAAA,GAAA,gBAAA,uBAAA,MAAA,WAAA,IAAA,MAAA,wCAAA,CAAA,CAAA,CAAA;AACrC,YAAMC,UAAU,8BAA8B,EAAM,YAAIC,
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Layer from 'effect/Layer';\n\nimport { AiService } from '@dxos/ai';\nimport { AiSession, ToolExecutionServices } from '@dxos/assistant';\nimport { Operation } from '@dxos/compute';\nimport { Database, Feed, Obj } from '@dxos/echo';\nimport { acquireReleaseResource } from '@dxos/effect';\nimport { invariant } from '@dxos/invariant';\nimport { ContentBlock } from '@dxos/types';\n\nimport { Agent } from '../../../types';\nimport { AgentWorker } from './definitions';\n\nexport default AgentWorker.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* ({ agent: agentRef, prompt, event }) {\n const agent = yield* Database.load(agentRef).pipe(\n Effect.catchTag('ObjectNotFoundError', () => Effect.die(new Error('Unable to load agent object.'))),\n );\n invariant(Obj.instanceOf(Agent.Agent, agent));\n invariant(agent.chat, 'Agent has no chat.');\n\n const chatFeed = yield* agent.chat.pipe(\n Database.load,\n Effect.flatMap((chat) => Database.load(chat.feed)),\n Effect.catchTag('ObjectNotFoundError', () => Effect.die(new Error('Unable to load agent chat feed object.'))),\n );\n invariant(chatFeed, 'Agent chat feed not found.');\n const runtime = yield* Effect.runtime<Feed.FeedService>();\n const session = yield* acquireReleaseResource(() => new AiSession.Session({ feed: chatFeed, runtime }));\n\n const agentsInContext = session.context.getObjects().filter(Obj.instanceOf(Agent.Agent));\n if (agentsInContext.length !== 1) {\n throw new Error('There should be exactly one agent in context. Got: ' + agentsInContext.length);\n }\n\n if (!prompt && !event) {\n throw new Error('Either prompt or event must be provided.');\n }\n\n let input: ContentBlock.Any[] = [];\n if (prompt) {\n input.push({ _tag: 'text', text: prompt, disposition: 'synthetic' });\n }\n if (event) {\n input.push({ _tag: 'text', text: JSON.stringify(event), disposition: 'synthetic' });\n }\n\n yield* session\n .createRequest({\n prompt: input,\n })\n .pipe(\n Effect.provide(\n Layer.mergeAll(AiService.model('@anthropic/claude-opus-4-6'), ToolExecutionServices).pipe(\n Layer.provideMerge(Operation.withInvocationOptions({ conversation: Obj.getURI(chatFeed) })),\n ),\n ),\n Effect.retry({ times: 2 }),\n );\n }, Effect.scoped),\n ),\n Operation.opaqueHandler,\n);\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;AAIA,YAAYA,YAAY;AACxB,YAAYC,WAAW;AAEvB,SAASC,iBAAiB;AAC1B,SAASC,WAAWC,6BAA6B;AACjD,SAASC,iBAAiB;AAC1B,SAASC,UAAgBC,WAAW;AACpC,SAASC,8BAA8B;AACvC,SAASC,iBAAiB;AAM1B,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,KAAML;MAAQM,MAAAA;MAAyB,MAAA;MACpE,aAAA;IACIL,CAAAA;;aACWG;UAAcC,KAAME;MAAuBD,MAAAA;MAAyB,MAAA,KAAA,UAAA,KAAA;MACnF,aAAA;IAEA,CAAA;;AAGE,SACK,QACIE,cACCC;IACiDC,QAAAA;EAAmC,CAAA,EAAA,KAGrFC,eAAM,eAAA,UAAA,MAAA,4BAAA,GAAA,qBAAA,EAAA,KAAA,mBAAA,UAAA,sBAAA;IAAEC,cAAO,IAAA,OAAA,QAAA;EAAE,CAAA,CAAA,CAAA,CAAA,GAAA,aAAA;IAE3BjB,OAAOkB;;;",
|
|
6
6
|
"names": ["Effect", "Layer", "AiService", "AiSession", "ToolExecutionServices", "Operation", "Database", "Obj", "acquireReleaseResource", "invariant", "AgentWorker", "invariant", "Obj", "instanceOf", "Agent", "agent", "chatFeed", "chat", "pipe", "Database", "load", "flatMap", "feed", "Effect", "runtime", "session", "AiSession", "agentsInContext", "prompt", "event", "input", "push", "_tag", "text", "disposition", "JSON", "provide", "mergeAll", "conversation", "retry", "times", "scoped"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Agent_exports,
|
|
3
|
+
Plan_exports
|
|
4
|
+
} from "./chunk-CMHECL6N.mjs";
|
|
5
|
+
|
|
6
|
+
// src/blueprints/planning/functions/update-tasks.ts
|
|
7
|
+
import * as Effect from "effect/Effect";
|
|
8
|
+
import * as Schema from "effect/Schema";
|
|
9
|
+
import { AiContext } from "@dxos/assistant";
|
|
10
|
+
import { Operation } from "@dxos/compute";
|
|
11
|
+
import { Database, Obj } from "@dxos/echo";
|
|
12
|
+
import { trim } from "@dxos/util";
|
|
13
|
+
|
|
14
|
+
// raw-loader:/__w/dxos/dxos/packages/core/compute/assistant-toolkit/src/blueprints/planning/functions/update-tasks.md?raw
|
|
15
|
+
var update_tasks_default = '## PLANNING TOOL\n\nThis tool maintains an organized task list.\nUse this to track progress, break down objectives, and ensure thoroughness.\nIf you are asked to create a plan use this tool instead of creating a new document.\nAfter creating initial tasks, update them silently without announcing changes to the user.\nImportant: Do not show or summarize the contents of the task list unless the user asks for this.\n\n### CORE USAGE PRINCIPLES\n\nCreate and manage tasks for: multi-step objectives requiring 3+ distinct actions, complex projects needing careful sequencing,\nuser requests for task organization, multiple deliverables provided together, new instructions (capture as tasks immediately with new IDs),\ncompleted work (mark `done` and add follow-ups), and active work (mark as `in-progress`, limit one at a time).\n\nSkip task management for: single straightforward actions, simple requests achievable in 1-2 steps,\ninformational queries, quick lookups or clarifications, and avoid creating verification tasks unless requested.\n\n### TOOL SPECIFICATION\n\n`update-tasks` requires an array of task objects. Each task object contains:\n\n- id (string, required): unique identifier like "task_1" or "research_sources"\n- title (string, optional): update to clarify or refine task description\n- status (string, optional): `todo` | `in-progress` | `done`\n\nTask status meanings: \'todo\' means not yet started, `in-progress` means currently being worked on, `done` means completed successfully.\n\n### OPERATIONAL GUIDELINES\n\nUpdate tasks in realtime as work progresses. Mark tasks `done` immediately upon completion.\nMaintain only ONE task with `in-progress` status at a time. Complete current tasks before starting new ones.\nUse specific, actionable task titles. Break complex work into manageable logical pieces.\nBatch task updates with other actions when possible for efficiency.\n\n### USAGE EXAMPLES\n\n<example type="research_project">\n<user_message>I need to research sustainable packaging options and write a report comparing costs and environmental impact.</user_message>\n<assistant_action>\nCreates tasks:\n1. {id: "research_materials", title: "Research sustainable packaging materials", status: "in-progress"}\n2. {id: "compare_costs", title: "Compile cost comparison data", status: "todo"}\n3. {id: "assess_impact", title: "Evaluate environmental impact metrics", status: "todo"}\n4. {id: "draft_report", title: "Write comparative analysis report", status: "todo"}\n\nBegins research work immediately in same response.\n</assistant_action>\n<reasoning>Multi-phase project requiring systematic tracking across research, analysis, and writing stages.</reasoning>\n</example>\n\n<example type="event_planning">\n<user_message>Help me plan a team retreat - venue, agenda, catering, and send invitations.</user_message>\n<assistant_action>\nCreates tasks:\n1. {id: "venue_options", title: "Research and recommend venues", status: "in-progress"}\n2. {id: "draft_agenda", title: "Create retreat agenda", status: "todo"}\n3. {id: "arrange_catering", title: "Coordinate catering options", status: "todo"}\n4. {id: "send_invites", title: "Draft and send invitations", status: "todo"}\n</assistant_action>\n<reasoning>Multiple distinct deliverables with dependencies requiring organized tracking.</reasoning>\n</example>\n\n<example type="document_analysis">\n<user_message>Review this 30-page contract for key terms, risks, and negotiation points.</user_message>\n<assistant_action>\nCreates tasks:\n1. {id: "extract_key_terms", title: "Identify key contractual terms", status: "in-progress"}\n2. {id: "flag_risks", title: "Flag potential risks and liabilities", status: "todo"}\n3. {id: "negotiation_points", title: "Compile negotiation recommendations", status: "todo"}\n4. {id: "summary_doc", title: "Prepare executive summary", status: "todo"}\n</assistant_action>\n<reasoning>Substantial analysis work requiring methodical breakdown and systematic review.</reasoning>\n</example>\n\n<example type="multiple_deliverables">\n<user_message>I need: 1) competitor analysis for three companies, 2) SWOT analysis, 3) market positioning recommendations.</user_message>\n<assistant_action>\nCreates tasks:\n1. {id: "competitor_research", title: "Research three competitor companies", status: "in-progress"}\n2. {id: "swot_analysis", title: "Develop SWOT analysis", status: "todo"}\n3. {id: "positioning_recs", title: "Create market positioning recommendations", status: "todo"}\n</assistant_action>\n<reasoning>User provided numbered list of distinct deliverables requiring separate effort.</reasoning>\n</example>\n\n<example type="skip_simple_question">\n<user_message>What\'s the difference between renewable and sustainable energy?</user_message>\n<assistant_action>Provides explanation directly without creating tasks.</assistant_action>\n<reasoning>Informational request with no actionable work to complete or track.</reasoning>\n</example>\n\n<example type="skip_quick_lookup">\n<user_message>Find the population of Tokyo.</user_message>\n<assistant_action>Searches and provides answer without task tracking.</assistant_action>\n<reasoning>Single straightforward lookup completable immediately.</reasoning>\n</example>\n\n<example type="skip_trivial_task">\n<user_message>Summarize this 2-paragraph email.</user_message>\n<assistant_action>Provides summary directly without creating tasks.</assistant_action>\n<reasoning>Single simple action requiring no breakdown or progress tracking.</reasoning>\n</example>\n\n<example type="skip_single_action">\n<user_message>Check if my flight is on time.</user_message>\n<assistant_action>Performs lookup and reports status without task management.</assistant_action>\n<reasoning>One-step action with immediate completion, no organizational benefit from tasks.</reasoning>\n</example>\n\n### BEST PRACTICES\n\nFor task creation: use descriptive unique IDs reflecting the work, start first task as `in-progress`, batch initial creation with beginning work.\nFor progress tracking: update status immediately upon completion, keep only one `in-progress` task unless parallel work is natural, add follow-up tasks as they emerge. For task breakdown: aim for reasonably-scoped tasks, group related small actions into logical units, split tasks requiring different approaches.\n\nWhen uncertain whether to use task management, err on the side of creating tasks.\nProactive organization demonstrates thoroughness and ensures comprehensive work completion.\n';
|
|
16
|
+
|
|
17
|
+
// src/blueprints/planning/functions/update-tasks.ts
|
|
18
|
+
var SimpleTask = Plan_exports.Task.omit("chat");
|
|
19
|
+
var UpdateTasks = Operation.make({
|
|
20
|
+
meta: {
|
|
21
|
+
key: "org.dxos.function.planning.update-tasks",
|
|
22
|
+
name: "Update tasks",
|
|
23
|
+
description: update_tasks_default,
|
|
24
|
+
icon: "ph--check-square-offset--regular"
|
|
25
|
+
},
|
|
26
|
+
input: Schema.Struct({
|
|
27
|
+
tasks: Schema.Array(SimpleTask)
|
|
28
|
+
}),
|
|
29
|
+
output: Schema.Any,
|
|
30
|
+
services: [
|
|
31
|
+
AiContext.Service,
|
|
32
|
+
Database.Service
|
|
33
|
+
]
|
|
34
|
+
});
|
|
35
|
+
var update_tasks_default2 = UpdateTasks.pipe(Operation.withHandler(Effect.fn(function* ({ tasks: newTasks }) {
|
|
36
|
+
const agent = yield* Agent_exports.getFromChatContext;
|
|
37
|
+
const plan = yield* Database.load(agent.plan);
|
|
38
|
+
Obj.update(plan, (plan2) => {
|
|
39
|
+
for (const task of newTasks) {
|
|
40
|
+
const existingTask = plan2.tasks.find((t) => t.id === task.id);
|
|
41
|
+
if (existingTask) {
|
|
42
|
+
existingTask.title = task.title;
|
|
43
|
+
existingTask.status = task.status;
|
|
44
|
+
} else {
|
|
45
|
+
plan2.tasks.push({
|
|
46
|
+
id: task.id,
|
|
47
|
+
title: task.title,
|
|
48
|
+
status: task.status
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
return trim`
|
|
54
|
+
You must update the task status to 'in-progress' when you start and 'done' when complete.
|
|
55
|
+
Current plan updated:
|
|
56
|
+
<plan>
|
|
57
|
+
${Plan_exports.formatPlan(plan)}
|
|
58
|
+
</plan>
|
|
59
|
+
`;
|
|
60
|
+
})));
|
|
61
|
+
|
|
62
|
+
export {
|
|
63
|
+
UpdateTasks,
|
|
64
|
+
update_tasks_default2 as update_tasks_default
|
|
65
|
+
};
|
|
66
|
+
//# sourceMappingURL=chunk-AF5TWFLV.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/blueprints/planning/functions/update-tasks.ts", "raw-loader:/__w/dxos/dxos/packages/core/compute/assistant-toolkit/src/blueprints/planning/functions/update-tasks.md?raw"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Schema from 'effect/Schema';\n\nimport { AiContext } from '@dxos/assistant';\nimport { Operation } from '@dxos/compute';\nimport { Database, Obj } from '@dxos/echo';\nimport { trim } from '@dxos/util';\n\nimport { Plan, Agent } from '../../../types';\nimport INSTRUCTIONS from './update-tasks.md?raw';\n\nconst SimpleTask = Plan.Task.omit('chat');\n\nexport const UpdateTasks = Operation.make({\n meta: {\n key: 'org.dxos.function.planning.update-tasks', // TODO(burdon): Are hyphens allowed?\n name: 'Update tasks',\n description: INSTRUCTIONS,\n icon: 'ph--check-square-offset--regular',\n },\n input: Schema.Struct({\n tasks: Schema.Array(SimpleTask),\n }),\n output: Schema.Any,\n services: [AiContext.Service, Database.Service],\n});\n\n/**\n * Updates the planning document (Agent.plan) with the given tasks.\n */\nexport default UpdateTasks.pipe(\n Operation.withHandler(\n Effect.fn(function* ({ tasks: newTasks }) {\n const agent = yield* Agent.getFromChatContext;\n // TODO(burdon): How to specify requirements/preconditions before calling?\n // TODO(burdon): How to report non-technical error?\n const plan = yield* Database.load(agent.plan);\n\n Obj.update(plan, (plan) => {\n for (const task of newTasks) {\n const existingTask = plan.tasks.find((t) => t.id === task.id);\n if (existingTask) {\n existingTask.title = task.title;\n existingTask.status = task.status;\n } else {\n plan.tasks.push({\n id: task.id,\n title: task.title,\n status: task.status,\n });\n }\n }\n });\n\n return trim`\n You must update the task status to 'in-progress' when you start and 'done' when complete.\n Current plan updated:\n <plan>\n ${Plan.formatPlan(plan)}\n </plan>\n `;\n }) as any,\n ),\n);\n", "## PLANNING TOOL\n\nThis tool maintains an organized task list.\nUse this to track progress, break down objectives, and ensure thoroughness.\nIf you are asked to create a plan use this tool instead of creating a new document.\nAfter creating initial tasks, update them silently without announcing changes to the user.\nImportant: Do not show or summarize the contents of the task list unless the user asks for this.\n\n### CORE USAGE PRINCIPLES\n\nCreate and manage tasks for: multi-step objectives requiring 3+ distinct actions, complex projects needing careful sequencing,\nuser requests for task organization, multiple deliverables provided together, new instructions (capture as tasks immediately with new IDs),\ncompleted work (mark `done` and add follow-ups), and active work (mark as `in-progress`, limit one at a time).\n\nSkip task management for: single straightforward actions, simple requests achievable in 1-2 steps,\ninformational queries, quick lookups or clarifications, and avoid creating verification tasks unless requested.\n\n### TOOL SPECIFICATION\n\n`update-tasks` requires an array of task objects. Each task object contains:\n\n- id (string, required): unique identifier like \"task_1\" or \"research_sources\"\n- title (string, optional): update to clarify or refine task description\n- status (string, optional): `todo` | `in-progress` | `done`\n\nTask status meanings: 'todo' means not yet started, `in-progress` means currently being worked on, `done` means completed successfully.\n\n### OPERATIONAL GUIDELINES\n\nUpdate tasks in realtime as work progresses. Mark tasks `done` immediately upon completion.\nMaintain only ONE task with `in-progress` status at a time. Complete current tasks before starting new ones.\nUse specific, actionable task titles. Break complex work into manageable logical pieces.\nBatch task updates with other actions when possible for efficiency.\n\n### USAGE EXAMPLES\n\n<example type=\"research_project\">\n<user_message>I need to research sustainable packaging options and write a report comparing costs and environmental impact.</user_message>\n<assistant_action>\nCreates tasks:\n1. {id: \"research_materials\", title: \"Research sustainable packaging materials\", status: \"in-progress\"}\n2. {id: \"compare_costs\", title: \"Compile cost comparison data\", status: \"todo\"}\n3. {id: \"assess_impact\", title: \"Evaluate environmental impact metrics\", status: \"todo\"}\n4. {id: \"draft_report\", title: \"Write comparative analysis report\", status: \"todo\"}\n\nBegins research work immediately in same response.\n</assistant_action>\n<reasoning>Multi-phase project requiring systematic tracking across research, analysis, and writing stages.</reasoning>\n</example>\n\n<example type=\"event_planning\">\n<user_message>Help me plan a team retreat - venue, agenda, catering, and send invitations.</user_message>\n<assistant_action>\nCreates tasks:\n1. {id: \"venue_options\", title: \"Research and recommend venues\", status: \"in-progress\"}\n2. {id: \"draft_agenda\", title: \"Create retreat agenda\", status: \"todo\"}\n3. {id: \"arrange_catering\", title: \"Coordinate catering options\", status: \"todo\"}\n4. {id: \"send_invites\", title: \"Draft and send invitations\", status: \"todo\"}\n</assistant_action>\n<reasoning>Multiple distinct deliverables with dependencies requiring organized tracking.</reasoning>\n</example>\n\n<example type=\"document_analysis\">\n<user_message>Review this 30-page contract for key terms, risks, and negotiation points.</user_message>\n<assistant_action>\nCreates tasks:\n1. {id: \"extract_key_terms\", title: \"Identify key contractual terms\", status: \"in-progress\"}\n2. {id: \"flag_risks\", title: \"Flag potential risks and liabilities\", status: \"todo\"}\n3. {id: \"negotiation_points\", title: \"Compile negotiation recommendations\", status: \"todo\"}\n4. {id: \"summary_doc\", title: \"Prepare executive summary\", status: \"todo\"}\n</assistant_action>\n<reasoning>Substantial analysis work requiring methodical breakdown and systematic review.</reasoning>\n</example>\n\n<example type=\"multiple_deliverables\">\n<user_message>I need: 1) competitor analysis for three companies, 2) SWOT analysis, 3) market positioning recommendations.</user_message>\n<assistant_action>\nCreates tasks:\n1. {id: \"competitor_research\", title: \"Research three competitor companies\", status: \"in-progress\"}\n2. {id: \"swot_analysis\", title: \"Develop SWOT analysis\", status: \"todo\"}\n3. {id: \"positioning_recs\", title: \"Create market positioning recommendations\", status: \"todo\"}\n</assistant_action>\n<reasoning>User provided numbered list of distinct deliverables requiring separate effort.</reasoning>\n</example>\n\n<example type=\"skip_simple_question\">\n<user_message>What's the difference between renewable and sustainable energy?</user_message>\n<assistant_action>Provides explanation directly without creating tasks.</assistant_action>\n<reasoning>Informational request with no actionable work to complete or track.</reasoning>\n</example>\n\n<example type=\"skip_quick_lookup\">\n<user_message>Find the population of Tokyo.</user_message>\n<assistant_action>Searches and provides answer without task tracking.</assistant_action>\n<reasoning>Single straightforward lookup completable immediately.</reasoning>\n</example>\n\n<example type=\"skip_trivial_task\">\n<user_message>Summarize this 2-paragraph email.</user_message>\n<assistant_action>Provides summary directly without creating tasks.</assistant_action>\n<reasoning>Single simple action requiring no breakdown or progress tracking.</reasoning>\n</example>\n\n<example type=\"skip_single_action\">\n<user_message>Check if my flight is on time.</user_message>\n<assistant_action>Performs lookup and reports status without task management.</assistant_action>\n<reasoning>One-step action with immediate completion, no organizational benefit from tasks.</reasoning>\n</example>\n\n### BEST PRACTICES\n\nFor task creation: use descriptive unique IDs reflecting the work, start first task as `in-progress`, batch initial creation with beginning work.\nFor progress tracking: update status immediately upon completion, keep only one `in-progress` task unless parallel work is natural, add follow-up tasks as they emerge. For task breakdown: aim for reasonably-scoped tasks, group related small actions into logical units, split tasks requiring different approaches.\n\nWhen uncertain whether to use task management, err on the side of creating tasks.\nProactive organization demonstrates thoroughness and ensures comprehensive work completion.\n"],
|
|
5
|
+
"mappings": ";;;;;;AAIA,YAAYA,YAAY;AACxB,YAAYC,YAAY;AAExB,SAASC,iBAAiB;AAC1B,SAASC,iBAAiB;AAC1B,SAASC,UAAUC,WAAW;AAC9B,SAASC,YAAY;;;ACVrB;;;ADeA,IAAMC,aAAaC,aAAKC,KAAKC,KAAK,MAAA;AAE3B,IAAMC,cAAcC,UAAUC,KAAK;EACxCC,MAAM;IACJC,KAAK;IACLC,MAAM;IACNC,aAAaC;IACbC,MAAM;EACR;EACAC,OAAcC,cAAO;IACnBC,OAAcC,aAAMhB,UAAAA;EACtB,CAAA;EACAiB,QAAeC;EACfC,UAAU;IAACC,UAAUC;IAASC,SAASD;;AACzC,CAAA;AAKA,IAAAE,wBAAenB,YAAYoB,KACzBnB,UAAUoB,YACDC,UAAG,WAAW,EAAEX,OAAOY,SAAQ,GAAE;AACtC,QAAMC,QAAQ,OAAOC,cAAMC;AAG3B,QAAMC,OAAO,OAAOT,SAASU,KAAKJ,MAAMG,IAAI;AAE5CE,MAAIC,OAAOH,MAAM,CAACA,UAAAA;AAChB,eAAWI,QAAQR,UAAU;AAC3B,YAAMS,eAAeL,MAAKhB,MAAMsB,KAAK,CAACC,MAAMA,EAAEC,OAAOJ,KAAKI,EAAE;AAC5D,UAAIH,cAAc;AAChBA,qBAAaI,QAAQL,KAAKK;AAC1BJ,qBAAaK,SAASN,KAAKM;MAC7B,OAAO;AACLV,QAAAA,MAAKhB,MAAM2B,KAAK;UACdH,IAAIJ,KAAKI;UACTC,OAAOL,KAAKK;UACZC,QAAQN,KAAKM;QACf,CAAA;MACF;IACF;EACF,CAAA;AAEA,SAAOE;;;;YAID1C,aAAK2C,WAAWb,IAAAA,CAAAA;;;AAGxB,CAAA,CAAA,CAAA;",
|
|
6
|
+
"names": ["Effect", "Schema", "AiContext", "Operation", "Database", "Obj", "trim", "SimpleTask", "Plan", "Task", "omit", "UpdateTasks", "Operation", "make", "meta", "key", "name", "description", "INSTRUCTIONS", "icon", "input", "Struct", "tasks", "Array", "output", "Any", "services", "AiContext", "Service", "Database", "update_tasks_default", "pipe", "withHandler", "fn", "newTasks", "agent", "Agent", "getFromChatContext", "plan", "load", "Obj", "update", "task", "existingTask", "find", "t", "id", "title", "status", "push", "trim", "formatPlan"]
|
|
7
|
+
}
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
Chat,
|
|
3
3
|
CompanionTo,
|
|
4
4
|
make
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-OC77MYT5.mjs";
|
|
6
6
|
import {
|
|
7
7
|
__export
|
|
8
8
|
} from "./chunk-J5LGTIGS.mjs";
|
|
@@ -19,7 +19,7 @@ __export(Plan_exports, {
|
|
|
19
19
|
makePlan: () => makePlan
|
|
20
20
|
});
|
|
21
21
|
import * as Schema from "effect/Schema";
|
|
22
|
-
import { Annotation, Obj, Ref, Type } from "@dxos/echo";
|
|
22
|
+
import { DXN, Annotation, Obj, Ref, Type } from "@dxos/echo";
|
|
23
23
|
var TaskId = Schema.String.pipe(Schema.brand("@dxos/assistant-toolkit/TaskId"));
|
|
24
24
|
var Task = Schema.Struct({
|
|
25
25
|
/**
|
|
@@ -43,10 +43,7 @@ var Task = Schema.Struct({
|
|
|
43
43
|
});
|
|
44
44
|
var Plan = Schema.Struct({
|
|
45
45
|
tasks: Schema.Array(Task)
|
|
46
|
-
}).pipe(Type.
|
|
47
|
-
typename: "org.dxos.type.plan",
|
|
48
|
-
version: "0.1.0"
|
|
49
|
-
}), Annotation.SystemTypeAnnotation.set(true));
|
|
46
|
+
}).pipe(Annotation.SystemTypeAnnotation.set(true), Type.makeObject(DXN.make("org.dxos.type.plan", "0.1.0")));
|
|
50
47
|
var generateTaskId = (plan) => {
|
|
51
48
|
const existingIds = plan.tasks.map((task) => {
|
|
52
49
|
const [num, letter] = task.id.split("-");
|
|
@@ -95,12 +92,10 @@ __export(Agent_exports, {
|
|
|
95
92
|
import * as Effect from "effect/Effect";
|
|
96
93
|
import * as Function from "effect/Function";
|
|
97
94
|
import * as Schema2 from "effect/Schema";
|
|
98
|
-
import {
|
|
99
|
-
import { Annotation as Annotation2, Database, Feed, Format, Obj as Obj2, Ref as Ref2, Relation, Type as Type2 } from "@dxos/echo";
|
|
100
|
-
import { Queue } from "@dxos/echo-db";
|
|
95
|
+
import { AiContext } from "@dxos/assistant";
|
|
96
|
+
import { DXN as DXN2, Annotation as Annotation2, Database, Feed, Format, Obj as Obj2, Ref as Ref2, Relation, Type as Type2 } from "@dxos/echo";
|
|
101
97
|
import { FormInputAnnotation } from "@dxos/echo/internal";
|
|
102
98
|
import { acquireReleaseResource } from "@dxos/effect";
|
|
103
|
-
import { QueueService } from "@dxos/functions";
|
|
104
99
|
import { invariant } from "@dxos/invariant";
|
|
105
100
|
import { Text } from "@dxos/schema";
|
|
106
101
|
var __dxlog_file = "/__w/dxos/dxos/packages/core/compute/assistant-toolkit/src/types/Agent.ts";
|
|
@@ -164,18 +159,15 @@ var Agent = Schema2.Struct({
|
|
|
164
159
|
* Input feed for subscriptions.
|
|
165
160
|
* @deprecated Subscriptions will write directly to the agent.
|
|
166
161
|
*/
|
|
167
|
-
|
|
168
|
-
}).pipe(
|
|
169
|
-
typename: "org.dxos.type.agent",
|
|
170
|
-
version: "0.1.0"
|
|
171
|
-
}), Annotation2.LabelAnnotation.set([
|
|
162
|
+
feed: Schema2.optional(Ref2.Ref(Feed.Feed).pipe(FormInputAnnotation.set(false)))
|
|
163
|
+
}).pipe(Annotation2.LabelAnnotation.set([
|
|
172
164
|
"name"
|
|
173
165
|
]), Annotation2.IconAnnotation.set({
|
|
174
166
|
icon: "ph--drone--regular",
|
|
175
167
|
hue: "sky"
|
|
176
|
-
}));
|
|
168
|
+
}), Type2.makeObject(DXN2.make("org.dxos.type.agent", "0.1.0")));
|
|
177
169
|
var makeInitialized = (props, blueprint) => Effect.gen(function* () {
|
|
178
|
-
const agent = Obj2.make(Agent, {
|
|
170
|
+
const agent = yield* Database.add(Obj2.make(Agent, {
|
|
179
171
|
...props,
|
|
180
172
|
instructions: Ref2.make(Text.make({
|
|
181
173
|
content: props.instructions
|
|
@@ -187,11 +179,10 @@ var makeInitialized = (props, blueprint) => Effect.gen(function* () {
|
|
|
187
179
|
subscriptions: props.subscriptions ?? [],
|
|
188
180
|
filterEvents: props.filterEvents ?? true,
|
|
189
181
|
enabled: props.enabled ?? true
|
|
190
|
-
});
|
|
191
|
-
yield* Database.add(agent);
|
|
182
|
+
}));
|
|
192
183
|
const feed = yield* Database.add(Feed.make());
|
|
193
184
|
const runtime2 = yield* Effect.runtime();
|
|
194
|
-
const contextBinder = new
|
|
185
|
+
const contextBinder = new AiContext.Binder({
|
|
195
186
|
feed,
|
|
196
187
|
runtime: runtime2
|
|
197
188
|
});
|
|
@@ -217,25 +208,25 @@ var makeInitialized = (props, blueprint) => Effect.gen(function* () {
|
|
|
217
208
|
[Relation.Source]: chat,
|
|
218
209
|
[Relation.Target]: agent
|
|
219
210
|
}));
|
|
220
|
-
const
|
|
211
|
+
const inputFeed = yield* Database.add(Feed.make());
|
|
221
212
|
Obj2.update(agent, (agent2) => {
|
|
222
213
|
agent2.chat = Ref2.make(chat);
|
|
223
|
-
agent2.
|
|
214
|
+
agent2.feed = Ref2.make(inputFeed);
|
|
224
215
|
});
|
|
225
216
|
return agent;
|
|
226
217
|
});
|
|
227
218
|
var resetChatHistory = (agent) => Effect.gen(function* () {
|
|
228
|
-
invariant(agent.chat, "Agent must have an existing chat to reset.", { "~LogMeta": "~LogMeta", F: __dxlog_file, L:
|
|
219
|
+
invariant(agent.chat, "Agent must have an existing chat to reset.", { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 141, S: this, A: ["agent.chat", "'Agent must have an existing chat to reset.'"] });
|
|
229
220
|
const existingFeed = yield* agent.chat.pipe(Database.load).pipe(Effect.map((_) => _.feed), Effect.flatMap(Database.load));
|
|
230
221
|
const runtime2 = yield* Effect.runtime();
|
|
231
|
-
const existingContextBinder = yield* acquireReleaseResource(() => new
|
|
222
|
+
const existingContextBinder = yield* acquireReleaseResource(() => new AiContext.Binder({
|
|
232
223
|
feed: existingFeed,
|
|
233
224
|
runtime: runtime2
|
|
234
225
|
}));
|
|
235
226
|
const blueprints = existingContextBinder.getBlueprints().map((blueprint) => Ref2.make(blueprint));
|
|
236
227
|
const objects = existingContextBinder.getObjects().map((object) => Ref2.make(object));
|
|
237
228
|
const feed = yield* Database.add(Feed.make());
|
|
238
|
-
const contextBinder = new
|
|
229
|
+
const contextBinder = new AiContext.Binder({
|
|
239
230
|
feed,
|
|
240
231
|
runtime: runtime2
|
|
241
232
|
});
|
|
@@ -256,7 +247,7 @@ var resetChatHistory = (agent) => Effect.gen(function* () {
|
|
|
256
247
|
}));
|
|
257
248
|
}).pipe(Effect.scoped);
|
|
258
249
|
var getFromChatContext = Effect.gen(function* () {
|
|
259
|
-
const agents = yield* Function.pipe(
|
|
250
|
+
const agents = yield* Function.pipe(AiContext.Service.findObjects(Agent));
|
|
260
251
|
if (agents.length !== 1) {
|
|
261
252
|
return yield* Effect.fail(new Error(`There should be exactly one agent in context. Got: ${agents.length}`));
|
|
262
253
|
}
|
|
@@ -271,24 +262,21 @@ __export(McpServer_exports, {
|
|
|
271
262
|
});
|
|
272
263
|
import * as Schema3 from "effect/Schema";
|
|
273
264
|
import { McpServer as McpServerSpec } from "@dxos/compute";
|
|
274
|
-
import { Annotation as Annotation3, Type as Type3 } from "@dxos/echo";
|
|
265
|
+
import { DXN as DXN3, Annotation as Annotation3, Type as Type3 } from "@dxos/echo";
|
|
275
266
|
import { LabelAnnotation } from "@dxos/echo/internal";
|
|
276
267
|
var McpServer = Schema3.Struct({
|
|
277
268
|
...McpServerSpec.McpServer.fields,
|
|
278
269
|
enabled: Schema3.optional(Schema3.Boolean)
|
|
279
|
-
}).pipe(
|
|
280
|
-
typename: "org.dxos.type.assistant.mcpServer",
|
|
281
|
-
version: "0.1.0"
|
|
282
|
-
}), LabelAnnotation.set([
|
|
270
|
+
}).pipe(LabelAnnotation.set([
|
|
283
271
|
"name"
|
|
284
272
|
]), Annotation3.IconAnnotation.set({
|
|
285
273
|
icon: "ph--plugs-connected--regular",
|
|
286
274
|
hue: "sky"
|
|
287
|
-
}));
|
|
275
|
+
}), Type3.makeObject(DXN3.make("org.dxos.type.assistant.mcpServer", "0.1.0")));
|
|
288
276
|
|
|
289
277
|
export {
|
|
290
278
|
Plan_exports,
|
|
291
279
|
Agent_exports,
|
|
292
280
|
McpServer_exports
|
|
293
281
|
};
|
|
294
|
-
//# sourceMappingURL=chunk-
|
|
282
|
+
//# sourceMappingURL=chunk-CMHECL6N.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/types/Plan.ts", "../../../src/types/Agent.ts", "../../../src/types/McpServer.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Schema from 'effect/Schema';\n\nimport { DXN, 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});\n\nexport type Task = Schema.Schema.Type<typeof Task>;\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(Annotation.SystemTypeAnnotation.set(true), Type.makeObject(DXN.make('org.dxos.type.plan', '0.1.0')));\nexport type Plan = Type.InstanceType<typeof Plan>;\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.update` 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.update(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 { AiContext } from '@dxos/assistant';\nimport { type Blueprint } from '@dxos/compute';\nimport { DXN, Annotation, Database, Feed, Format, Obj, Ref, Relation, Type } from '@dxos/echo';\nimport { type ObjectNotFoundError } from '@dxos/echo/Err';\nimport { FormInputAnnotation } from '@dxos/echo/internal';\nimport { acquireReleaseResource } from '@dxos/effect';\nimport { invariant } from '@dxos/invariant';\nimport { 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 * When false, agent triggers are disabled after sync-triggers runs.\n */\n enabled: Schema.optional(Schema.Boolean).annotations({\n title: 'Enabled',\n description: 'Master switch for agent automation; propagated to all triggers on sync.',\n }),\n\n /**\n * Instructions for the agent.\n */\n instructions: Ref.Ref(Text.Text).pipe(\n Format.FormatAnnotation.set(Format.TypeFormat.Markdown),\n Schema.annotations({ title: 'Instructions' }),\n ),\n\n /**\n * Primary chat for the agent.\n */\n // TODO(dmaretskyi): Multiple chats; RB: branching hierarchy.\n chat: Schema.optional(Ref.Ref(Chat.Chat).pipe(FormInputAnnotation.set(false))),\n\n // TODO(burdon): Is this used? Should it be an artifact?\n // Format.FormatAnnotation.set(Format.TypeFormat.Markdown)\n plan: Ref.Ref(Plan.Plan).pipe(FormInputAnnotation.set(false)),\n\n // TODO(burdon): Currently Memory.Memory objects are global to the space; make them artifacts?\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 // TODO(burdon): Rename object.\n data: Ref.Ref(Obj.Unknown),\n }),\n ).pipe(FormInputAnnotation.set(false)),\n\n /**\n * References to objects with a canonical queue property.\n * Schema must have the QueueAnnotation.\n */\n // Change to trigger.\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 /**\n * Cron expression for a timer trigger that invokes the agent worker on a schedule.\n * The timer trigger bypasses the qualifier and goes straight to the agent worker.\n */\n // Change to trigger.\n cron: Schema.optional(Schema.String).annotations({\n title: 'Cron',\n description: 'Cron expression for a timer trigger that invokes the agent on a schedule.',\n }),\n\n /**\n * Allow the agent to filter events.\n * Related events will be added to the input queue of the agent.\n * It is recommended to enable this.\n * @deprecated\n */\n filterEvents: Schema.optional(Schema.Boolean).annotations({\n title: 'Filter events',\n description: 'Allow the agent to filter events.',\n }),\n\n /**\n * Input feed for subscriptions.\n * @deprecated Subscriptions will write directly to the agent.\n */\n feed: Schema.optional(Ref.Ref(Feed.Feed).pipe(FormInputAnnotation.set(false))),\n}).pipe(\n Annotation.LabelAnnotation.set(['name']),\n Annotation.IconAnnotation.set({\n icon: 'ph--drone--regular',\n hue: 'sky',\n }),\n Type.makeObject(DXN.make('org.dxos.type.agent', '0.1.0')),\n);\n\nexport type Agent = Type.InstanceType<typeof Agent>;\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>, 'instructions' | 'plan' | 'artifacts' | 'subscriptions' | 'chat'> &\n Partial<Pick<Obj.MakeProps<typeof Agent>, 'artifacts' | 'subscriptions'>> & {\n instructions: string;\n blueprints?: Ref.Ref<Blueprint.Blueprint>[];\n contextObjects?: Ref.Ref<Obj.Any>[];\n },\n blueprint: Blueprint.Blueprint,\n): Effect.Effect<Agent, never, Feed.FeedService | Database.Service> =>\n Effect.gen(function* () {\n const agent = yield* Database.add(\n Obj.make(Agent, {\n ...props,\n instructions: Ref.make(Text.make({ content: props.instructions })),\n plan: Ref.make(Plan.makePlan({ tasks: [] })),\n artifacts: props.artifacts ?? [],\n subscriptions: props.subscriptions ?? [],\n filterEvents: props.filterEvents ?? true,\n enabled: props.enabled ?? true,\n }),\n );\n const feed = yield* Database.add(Feed.make());\n const runtime = yield* Effect.runtime<Feed.FeedService>();\n const contextBinder = new AiContext.Binder({ 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 inputFeed = yield* Database.add(Feed.make());\n\n Obj.update(agent, (agent) => {\n agent.chat = Ref.make(chat);\n agent.feed = Ref.make(inputFeed);\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 AiContext.Binder({\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 AiContext.Binder({ 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.update(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, AiContext.Service> = Effect.gen(function* () {\n const agents = yield* Function.pipe(AiContext.Service.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", "//\n// Copyright 2026 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Schema from 'effect/Schema';\n\nimport { McpServer as McpServerSpec } from '@dxos/compute';\nimport { DXN, Annotation, Type } from '@dxos/echo';\nimport { LabelAnnotation } from '@dxos/echo/internal';\n\n/**\n * MCP server configuration stored as a space-level ECHO object.\n *\n * Composes the canonical connection spec from `@dxos/compute` (`url`, `protocol`, `apiKey`)\n * and adds instance-level fields (`name`, `enabled`) plus ECHO annotations.\n *\n * NOTE: `apiKey` is stored in plaintext and replicated to all peers with access to the space.\n * A future iteration should move secrets to per-device credential storage or use envelope encryption.\n */\nexport const McpServer = Schema.Struct({\n ...McpServerSpec.McpServer.fields,\n enabled: Schema.optional(Schema.Boolean),\n}).pipe(\n LabelAnnotation.set(['name']),\n Annotation.IconAnnotation.set({\n icon: 'ph--plugs-connected--regular',\n hue: 'sky',\n }),\n Type.makeObject(DXN.make('org.dxos.type.assistant.mcpServer', '0.1.0')),\n);\n\nexport type McpServer = Type.InstanceType<typeof McpServer>;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;AAAA;;;;;;;;;;AAMA,YAAYA,YAAY;AAExB,SAASC,KAAKC,YAAYC,KAAKC,KAAKC,YAAY;AAIzC,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,KAAKkB,WAAWC,qBAAqBC,IAAI,IAAA,GAAOC,KAAKC,WAAWC,IAAIC,KAAK,sBAAsB,OAAA,CAAA,CAAA;AAE3F,IAAMC,iBAAiB,CAACC,SAAAA;AAC7B,QAAMC,cAAcD,KAA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W,aAAY;AAExB,SAASC,aAAaC,qBAAqB;AAC3C,SAASC,OAAAA,MAAKC,cAAAA,aAAYC,QAAAA,aAAY;AACtC,SAASC,uBAAuB;AAWzB,IAAML,YAAmBM,eAAO;EACrC,GAAGL,cAAcD,UAAUO;EAC3BC,SAAgBC,iBAAgBC,eAAO;AACzC,CAAA,EAAGC,KACDN,gBAAgBO,IAAI;EAAC;CAAO,GAC5BT,YAAWU,eAAeD,IAAI;EAC5BE,MAAM;EACNC,KAAK;AACP,CAAA,GACAX,MAAKY,WAAWd,KAAIe,KAAK,qCAAqC,OAAA,CAAA,CAAA;",
|
|
6
|
+
"names": ["Schema", "DXN", "Annotation", "Obj", "Ref", "Type", "TaskId", "String", "pipe", "brand", "Task", "Struct", "id", "title", "annotations", "description", "status", "Literal", "parent", "optional", "chat", "Ref", "Chat", "Plan", "tasks", "Array", "Annotation", "SystemTypeAnnotation", "set", "Type", "makeObject", "DXN", "make", "generateTaskId", "plan", "existingIds", "map", "task", "num", "letter", "split", "parseInt", "filter", "_", "isNaN", "newId", "length", "Math", "max", "crypto", "randomUUID", "slice", "addTasks", "taskId", "push", "makePlan", "props", "Obj", "update", "formatPlan", "toLocaleUpperCase", "join", "Effect", "Function", "Schema", "AiContext", "DXN", "Annotation", "Database", "Feed", "Format", "Obj", "Ref", "Relation", "Type", "FormInputAnnotation", "acquireReleaseResource", "invariant", "Text", "Ref", "artifacts", "Array", "Schema", "String", "data", "Obj", "description", "Annotation", "IconAnnotation", "icon", "hue", "Type", "makeObject", "props", "instructions", "Text", "make", "plan", "Plan", "subscriptions", "filterEvents", "enabled", "add", "contextBinder", "AiContext", "Binder", "feed", "runtime", "Effect", "agentBlueprint", "objects", "chat", "setParent", "Source", "Relation", "Target", "agent", "inputFeed", "existingFeed", "Database", "pipe", "existingContextBinder", "acquireReleaseResource", "blueprints", "scoped", "agents", "Error", "Schema", "McpServer", "McpServerSpec", "DXN", "Annotation", "Type", "LabelAnnotation", "Struct", "fields", "enabled", "optional", "Boolean", "pipe", "set", "IconAnnotation", "icon", "hue", "makeObject", "make"]
|
|
7
|
+
}
|
|
@@ -34,7 +34,8 @@ var TimeRange = Object.assign(TimeRangeSchema, {
|
|
|
34
34
|
var FetchMessages = Operation.make({
|
|
35
35
|
meta: {
|
|
36
36
|
key: "org.dxos.function.fetch-discord-messages",
|
|
37
|
-
name: "Sync Discord messages"
|
|
37
|
+
name: "Sync Discord messages",
|
|
38
|
+
icon: "ph--hash--regular"
|
|
38
39
|
},
|
|
39
40
|
input: Schema.Struct({
|
|
40
41
|
serverId: Schema.String.annotations({
|
|
@@ -70,4 +71,4 @@ export {
|
|
|
70
71
|
TimeRange,
|
|
71
72
|
FetchMessages
|
|
72
73
|
};
|
|
73
|
-
//# sourceMappingURL=chunk-
|
|
74
|
+
//# sourceMappingURL=chunk-DC5KITJP.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/blueprints/discord/functions/definitions.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Credential, Trace, Operation } from '@dxos/compute';\n\n// TODO(dmaretskyi): Extract.\nconst TimeRangeSchema = Schema.String.pipe(Schema.pattern(/\\d+(s|m|h|d)/)).annotations({\n description: 'Time range. 1d - 1 day, 2h - 2 hours, 30m - 30 minutes, 15s - 15 seconds.',\n examples: ['1d', '2h', '30m', '15s'],\n});\n\nexport const TimeRange = Object.assign(TimeRangeSchema, {\n toSeconds(timeRange: string) {\n const match = timeRange.match(/(\\d+)(s|m|h|d)/);\n if (!match) {\n throw new Error(`Invalid time range: ${timeRange}`);\n }\n const [_, amount, unit] = match;\n switch (unit) {\n case 's':\n return Number(amount);\n case 'm':\n return Number(amount) * 60;\n case 'h':\n return Number(amount) * 60 * 60;\n case 'd':\n return Number(amount) * 24 * 60 * 60;\n default:\n throw new Error(`Invalid time range unit: ${unit}`);\n }\n },\n});\n\nexport const FetchMessages = Operation.make({\n meta: {\n key: 'org.dxos.function.fetch-discord-messages',\n name: 'Sync Discord messages',\n icon: 'ph--hash--regular',\n },\n input: Schema.Struct({\n serverId: Schema.String.annotations({\n description: 'The ID of the server to fetch messages from.',\n }),\n channelId: Schema.optional(Schema.String).annotations({\n description:\n 'The ID of the channel to fetch messages from. Will crawl all channels from the server if not specified.',\n }),\n after: Schema.optional(Schema.Number).annotations({\n description:\n 'Fetch messages that were sent after a given date. Unix timestamp in seconds. Exclusive with `last`.',\n }),\n last: TimeRange.annotations({\n description:\n 'Time range to fetch most recent messages. Specifies the range in the past, from now. \"1d\" would fetch messages from the last 24 hours.',\n }),\n limit: Schema.optional(Schema.Number).annotations({\n description: 'The maximum number of messages to fetch.',\n }),\n pageSize: Schema.optional(Schema.Number).annotations({\n description: 'The number of messages to fetch per page.',\n }),\n ignoreUsernames: Schema.optional(Schema.Array(Schema.String)).annotations({\n description: 'Exclude messages from these usernames.',\n }),\n }),\n output: Schema.Any,\n services: [Credential.CredentialsService, Trace.TraceService],\n});\n"],
|
|
5
|
+
"mappings": ";AAIA,YAAYA,YAAY;AAExB,SAASC,YAAYC,OAAOC,iBAAiB;AAG7C,IAAMC,kBAAyBC,cAAOC,KAAYC,eAAQ,cAAA,CAAA,EAAiBC,YAAY;EACrFC,aAAa;EACbC,UAAU;IAAC;IAAM;IAAM;IAAO;;AAChC,CAAA;AAEO,IAAMC,YAAYC,OAAOC,OAAOT,iBAAiB;EACtDU,UAAUC,WAAiB;AACzB,UAAMC,QAAQD,UAAUC,MAAM,gBAAA;AAC9B,QAAI,CAACA,OAAO;AACV,YAAM,IAAIC,MAAM,uBAAuBF,SAAAA,EAAW;IACpD;AACA,UAAM,CAACG,GAAGC,QAAQC,IAAAA,IAAQJ;AAC1B,YAAQI,MAAAA;MACN,KAAK;AACH,eAAOC,OAAOF,MAAAA;MAChB,KAAK;AACH,eAAOE,OAAOF,MAAAA,IAAU;MAC1B,KAAK;AACH,eAAOE,OAAOF,MAAAA,IAAU,KAAK;MAC/B,KAAK;AACH,eAAOE,OAAOF,MAAAA,IAAU,KAAK,KAAK;MACpC;AACE,cAAM,IAAIF,MAAM,4BAA4BG,IAAAA,EAAM;IACtD;EACF;AACF,CAAA;AAEO,IAAME,gBAAgBnB,UAAUoB,KAAK;EAC1CC,MAAM;IACJC,KAAK;IACLC,MAAM;IACNC,MAAM;EACR;EACAC,OAAcC,cAAO;IACnBC,UAAiBzB,cAAOG,YAAY;MAClCC,aAAa;IACf,CAAA;IACAsB,WAAkBC,gBAAgB3B,aAAM,EAAEG,YAAY;MACpDC,aACE;IACJ,CAAA;IACAwB,OAAcD,gBAAgBX,aAAM,EAAEb,YAAY;MAChDC,aACE;IACJ,CAAA;IACAyB,MAAMvB,UAAUH,YAAY;MAC1BC,aACE;IACJ,CAAA;IACA0B,OAAcH,gBAAgBX,aAAM,EAAEb,YAAY;MAChDC,aAAa;IACf,CAAA;IACA2B,UAAiBJ,gBAAgBX,aAAM,EAAEb,YAAY;MACnDC,aAAa;IACf,CAAA;IACA4B,iBAAwBL,gBAAgBM,aAAajC,aAAM,CAAA,EAAGG,YAAY;MACxEC,aAAa;IACf,CAAA;EACF,CAAA;EACA8B,QAAeC;EACfC,UAAU;IAACxC,WAAWyC;IAAoBxC,MAAMyC;;AAClD,CAAA;",
|
|
6
|
+
"names": ["Schema", "Credential", "Trace", "Operation", "TimeRangeSchema", "String", "pipe", "pattern", "annotations", "description", "examples", "TimeRange", "Object", "assign", "toSeconds", "timeRange", "match", "Error", "_", "amount", "unit", "Number", "FetchMessages", "make", "meta", "key", "name", "icon", "input", "Struct", "serverId", "channelId", "optional", "after", "last", "limit", "pageSize", "ignoreUsernames", "Array", "output", "Any", "services", "CredentialsService", "TraceService"]
|
|
7
|
+
}
|
|
@@ -6,6 +6,7 @@ var Fetch = Operation.make({
|
|
|
6
6
|
meta: {
|
|
7
7
|
key: "org.dxos.function.web-search.fetch",
|
|
8
8
|
name: "Fetch web page",
|
|
9
|
+
icon: "ph--globe-simple--regular",
|
|
9
10
|
description: trim`
|
|
10
11
|
Fetches the content of a web page and returns the HTML.
|
|
11
12
|
Use this to get the content of a web page.
|
|
@@ -22,4 +23,4 @@ var Fetch = Operation.make({
|
|
|
22
23
|
export {
|
|
23
24
|
Fetch
|
|
24
25
|
};
|
|
25
|
-
//# sourceMappingURL=chunk-
|
|
26
|
+
//# sourceMappingURL=chunk-EUHZLWCG.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/blueprints/websearch/functions/definitions.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Operation } from '@dxos/compute';\nimport { trim } from '@dxos/util';\n\nexport const Fetch = Operation.make({\n meta: {\n key: 'org.dxos.function.web-search.fetch',\n name: 'Fetch web page',\n icon: 'ph--globe-simple--regular',\n description: trim`\n Fetches the content of a web page and returns the HTML. \n Use this to get the content of a web page.\n `,\n },\n input: Schema.Struct({\n url: Schema.String.annotations({\n description: 'The URL of the web page to fetch.',\n }),\n }),\n output: Schema.String,\n});\n"],
|
|
5
|
+
"mappings": ";AAIA,YAAYA,YAAY;AAExB,SAASC,iBAAiB;AAC1B,SAASC,YAAY;AAEd,IAAMC,QAAQF,UAAUG,KAAK;EAClCC,MAAM;IACJC,KAAK;IACLC,MAAM;IACNC,MAAM;IACNC,aAAaP;;;;EAIf;EACAQ,OAAcC,cAAO;IACnBC,KAAYC,cAAOC,YAAY;MAC7BL,aAAa;IACf,CAAA;EACF,CAAA;EACAM,QAAeF;AACjB,CAAA;",
|
|
6
|
+
"names": ["Schema", "Operation", "trim", "Fetch", "make", "meta", "key", "name", "icon", "description", "input", "Struct", "url", "String", "annotations", "output"]
|
|
7
|
+
}
|