@dxos/assistant-toolkit 0.10.0 → 0.11.0
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/chunk-Chat.mjs +144 -0
- package/dist/lib/chunk-Chat.mjs.map +1 -0
- package/dist/lib/chunk-Memory.mjs +19 -0
- package/dist/lib/chunk-Memory.mjs.map +1 -0
- package/dist/lib/{neutral/agent-rules-KWCBKJ5W.mjs → chunk-agent-rules.mjs} +8 -15
- package/dist/lib/chunk-agent-rules.mjs.map +1 -0
- package/dist/lib/chunk-agent.mjs +45 -0
- package/dist/lib/chunk-agent.mjs.map +1 -0
- package/dist/lib/chunk-artifact-add.mjs +31 -0
- package/dist/lib/chunk-artifact-add.mjs.map +1 -0
- package/dist/lib/chunk-artifact-list.mjs +23 -0
- package/dist/lib/chunk-artifact-list.mjs.map +1 -0
- package/dist/lib/chunk-context-add.mjs +16 -0
- package/dist/lib/chunk-context-add.mjs.map +1 -0
- package/dist/lib/chunk-context-remove.mjs +16 -0
- package/dist/lib/chunk-context-remove.mjs.map +1 -0
- package/dist/lib/chunk-create-agent.mjs +23 -0
- package/dist/lib/chunk-create-agent.mjs.map +1 -0
- package/dist/lib/chunk-definitions.mjs +52 -0
- package/dist/lib/chunk-definitions.mjs.map +1 -0
- package/dist/lib/chunk-definitions2.mjs +56 -0
- package/dist/lib/chunk-definitions2.mjs.map +1 -0
- package/dist/lib/chunk-definitions3.mjs +24 -0
- package/dist/lib/chunk-definitions3.mjs.map +1 -0
- package/dist/lib/chunk-delete.mjs +14 -0
- package/dist/lib/chunk-delete.mjs.map +1 -0
- package/dist/lib/chunk-enable-skills.mjs +39 -0
- package/dist/lib/chunk-enable-skills.mjs.map +1 -0
- package/dist/lib/chunk-fetch-messages.mjs +113 -0
- package/dist/lib/chunk-fetch-messages.mjs.map +1 -0
- package/dist/lib/chunk-fetch.mjs +20 -0
- package/dist/lib/chunk-fetch.mjs.map +1 -0
- package/dist/lib/chunk-get-context.mjs +55 -0
- package/dist/lib/chunk-get-context.mjs.map +1 -0
- package/dist/lib/chunk-get-current-date.mjs +17 -0
- package/dist/lib/chunk-get-current-date.mjs.map +1 -0
- package/dist/lib/chunk-load.mjs +13 -0
- package/dist/lib/chunk-load.mjs.map +1 -0
- package/dist/lib/chunk-object-create.mjs +42 -0
- package/dist/lib/chunk-object-create.mjs.map +1 -0
- package/dist/lib/chunk-object-delete.mjs +14 -0
- package/dist/lib/chunk-object-delete.mjs.map +1 -0
- package/dist/lib/chunk-object-update.mjs +19 -0
- package/dist/lib/chunk-object-update.mjs.map +1 -0
- package/dist/lib/chunk-operations.mjs +714 -0
- package/dist/lib/chunk-operations.mjs.map +1 -0
- package/dist/lib/chunk-plan-reminder.mjs +80 -0
- package/dist/lib/chunk-plan-reminder.mjs.map +1 -0
- package/dist/lib/chunk-query-skills.mjs +12 -0
- package/dist/lib/chunk-query-skills.mjs.map +1 -0
- package/dist/lib/chunk-query.mjs +36 -0
- package/dist/lib/chunk-query.mjs.map +1 -0
- package/dist/lib/chunk-query2.mjs +18 -0
- package/dist/lib/chunk-query2.mjs.map +1 -0
- package/dist/lib/chunk-relation-create.mjs +41 -0
- package/dist/lib/chunk-relation-create.mjs.map +1 -0
- package/dist/lib/chunk-relation-delete.mjs +14 -0
- package/dist/lib/chunk-relation-delete.mjs.map +1 -0
- package/dist/lib/chunk-relay.mjs +76 -0
- package/dist/lib/chunk-relay.mjs.map +1 -0
- package/dist/lib/chunk-rolldown-runtime.mjs +13 -0
- package/dist/lib/chunk-run-instructions.mjs +145 -0
- package/dist/lib/chunk-run-instructions.mjs.map +1 -0
- package/dist/lib/chunk-save.mjs +17 -0
- package/dist/lib/chunk-save.mjs.map +1 -0
- package/dist/lib/chunk-schema-add.mjs +19 -0
- package/dist/lib/chunk-schema-add.mjs.map +1 -0
- package/dist/lib/chunk-schema-list.mjs +29 -0
- package/dist/lib/chunk-schema-list.mjs.map +1 -0
- package/dist/lib/chunk-set-alarm.mjs +55 -0
- package/dist/lib/chunk-set-alarm.mjs.map +1 -0
- package/dist/lib/chunk-sync-automation.mjs +130 -0
- package/dist/lib/chunk-sync-automation.mjs.map +1 -0
- package/dist/lib/chunk-sync-issues.mjs +127 -0
- package/dist/lib/chunk-sync-issues.mjs.map +1 -0
- package/dist/lib/chunk-sync.mjs +91 -0
- package/dist/lib/chunk-sync.mjs.map +1 -0
- package/dist/lib/chunk-tag-add.mjs +14 -0
- package/dist/lib/chunk-tag-add.mjs.map +1 -0
- package/dist/lib/chunk-tag-remove.mjs +14 -0
- package/dist/lib/chunk-tag-remove.mjs.map +1 -0
- package/dist/lib/chunk-types.mjs +198 -0
- package/dist/lib/chunk-types.mjs.map +1 -0
- package/dist/lib/chunk-update-tasks.mjs +34 -0
- package/dist/lib/chunk-update-tasks.mjs.map +1 -0
- package/dist/lib/index.mjs +614 -0
- package/dist/lib/index.mjs.map +1 -0
- package/dist/lib/testing.mjs +102 -0
- package/dist/lib/testing.mjs.map +1 -0
- package/dist/types/src/skills/agent/operations/definitions.d.ts +16 -46
- package/dist/types/src/skills/agent/operations/definitions.d.ts.map +1 -1
- package/dist/types/src/skills/agent/operations/get-context.test.d.ts +2 -0
- package/dist/types/src/skills/agent/operations/get-context.test.d.ts.map +1 -0
- package/dist/types/src/skills/agent/operations/index.d.ts.map +1 -1
- package/dist/types/src/skills/agent/operations/relay.d.ts +11 -0
- package/dist/types/src/skills/agent/operations/relay.d.ts.map +1 -0
- package/dist/types/src/skills/agent/operations/relay.test.d.ts +2 -0
- package/dist/types/src/skills/agent/operations/relay.test.d.ts.map +1 -0
- package/dist/types/src/skills/agent/skill.d.ts.map +1 -1
- package/dist/types/src/skills/agent-wizard/operations/definitions.d.ts +4 -1
- package/dist/types/src/skills/agent-wizard/operations/definitions.d.ts.map +1 -1
- package/dist/types/src/skills/agent-wizard/operations/sync-automation.d.ts +26 -0
- package/dist/types/src/skills/agent-wizard/operations/sync-automation.d.ts.map +1 -0
- package/dist/types/src/skills/agent-wizard/operations/sync-automation.test.d.ts +2 -0
- package/dist/types/src/skills/agent-wizard/operations/sync-automation.test.d.ts.map +1 -0
- package/dist/types/src/skills/agent-wizard/skill.d.ts.map +1 -1
- package/dist/types/src/skills/database/operations/context-add.test.d.ts +2 -0
- package/dist/types/src/skills/database/operations/context-add.test.d.ts.map +1 -0
- package/dist/types/src/skills/database/operations/context-remove.test.d.ts +2 -0
- package/dist/types/src/skills/database/operations/context-remove.test.d.ts.map +1 -0
- package/dist/types/src/skills/database/operations/definitions.d.ts +7 -2
- package/dist/types/src/skills/database/operations/definitions.d.ts.map +1 -1
- package/dist/types/src/skills/database/operations/load.test.d.ts +2 -0
- package/dist/types/src/skills/database/operations/load.test.d.ts.map +1 -0
- package/dist/types/src/skills/database/operations/object-create.d.ts +4 -1
- package/dist/types/src/skills/database/operations/object-create.d.ts.map +1 -1
- package/dist/types/src/skills/database/operations/object-create.test.d.ts +2 -0
- package/dist/types/src/skills/database/operations/object-create.test.d.ts.map +1 -0
- package/dist/types/src/skills/database/operations/object-delete.test.d.ts +2 -0
- package/dist/types/src/skills/database/operations/object-delete.test.d.ts.map +1 -0
- package/dist/types/src/skills/database/operations/object-update.test.d.ts +2 -0
- package/dist/types/src/skills/database/operations/object-update.test.d.ts.map +1 -0
- package/dist/types/src/skills/database/operations/query.test.d.ts +2 -0
- package/dist/types/src/skills/database/operations/query.test.d.ts.map +1 -0
- package/dist/types/src/skills/database/operations/relation-create.test.d.ts +2 -0
- package/dist/types/src/skills/database/operations/relation-create.test.d.ts.map +1 -0
- package/dist/types/src/skills/database/operations/schema-add.d.ts +3 -1
- package/dist/types/src/skills/database/operations/schema-add.test.d.ts +2 -0
- package/dist/types/src/skills/database/operations/schema-add.test.d.ts.map +1 -0
- package/dist/types/src/skills/database/operations/schema-list.test.d.ts +2 -0
- package/dist/types/src/skills/database/operations/schema-list.test.d.ts.map +1 -0
- package/dist/types/src/skills/database/operations/tag-add.test.d.ts +2 -0
- package/dist/types/src/skills/database/operations/tag-add.test.d.ts.map +1 -0
- package/dist/types/src/skills/database/operations/tag-remove.test.d.ts +2 -0
- package/dist/types/src/skills/database/operations/tag-remove.test.d.ts.map +1 -0
- package/dist/types/src/skills/delegation/operations/delegate-task.d.ts +6 -5
- package/dist/types/src/skills/delegation/operations/delegate-task.d.ts.map +1 -1
- package/dist/types/src/skills/index.d.ts +1 -0
- package/dist/types/src/skills/index.d.ts.map +1 -1
- package/dist/types/src/skills/linear/operations/sync-issues.d.ts.map +1 -1
- package/dist/types/src/skills/memory/operations/delete.test.d.ts +2 -0
- package/dist/types/src/skills/memory/operations/delete.test.d.ts.map +1 -0
- package/dist/types/src/skills/memory/operations/query.test.d.ts +2 -0
- package/dist/types/src/skills/memory/operations/query.test.d.ts.map +1 -0
- package/dist/types/src/skills/memory/operations/save.test.d.ts +2 -0
- package/dist/types/src/skills/memory/operations/save.test.d.ts.map +1 -0
- package/dist/types/src/skills/planning/operations/definitions.d.ts +1 -3
- package/dist/types/src/skills/planning/operations/definitions.d.ts.map +1 -1
- package/dist/types/src/skills/planning/operations/plan-reminder.d.ts +7 -6
- package/dist/types/src/skills/planning/operations/plan-reminder.d.ts.map +1 -1
- package/dist/types/src/skills/planning/operations/plan-reminder.test.d.ts +2 -0
- package/dist/types/src/skills/planning/operations/plan-reminder.test.d.ts.map +1 -0
- package/dist/types/src/skills/planning/operations/update-tasks.d.ts +3 -1
- package/dist/types/src/skills/planning/operations/update-tasks.d.ts.map +1 -1
- package/dist/types/src/skills/project/index.d.ts +3 -0
- package/dist/types/src/skills/project/index.d.ts.map +1 -0
- package/dist/types/src/skills/project/operations/artifact-add.d.ts +5 -0
- package/dist/types/src/skills/project/operations/artifact-add.d.ts.map +1 -0
- package/dist/types/src/skills/project/operations/artifact-list.d.ts +5 -0
- package/dist/types/src/skills/project/operations/artifact-list.d.ts.map +1 -0
- package/dist/types/src/skills/project/operations/definitions.d.ts +23 -0
- package/dist/types/src/skills/project/operations/definitions.d.ts.map +1 -0
- package/dist/types/src/skills/project/operations/index.d.ts +4 -0
- package/dist/types/src/skills/project/operations/index.d.ts.map +1 -0
- package/dist/types/src/skills/project/skill.d.ts +4 -0
- package/dist/types/src/skills/project/skill.d.ts.map +1 -0
- package/dist/types/src/skills/project/skill.test.d.ts.map +1 -0
- package/dist/types/src/skills/skill-manager/skill.d.ts.map +1 -1
- package/dist/types/src/supervisor/delegation-strategy.d.ts +5 -5
- package/dist/types/src/supervisor/delegation-strategy.d.ts.map +1 -1
- package/dist/types/src/supervisor/delegation-strategy.test.d.ts +2 -0
- package/dist/types/src/supervisor/delegation-strategy.test.d.ts.map +1 -0
- package/dist/types/src/sync/sync.test.d.ts +2 -0
- package/dist/types/src/sync/sync.test.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +1 -0
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/operations.d.ts +7 -0
- package/dist/types/src/testing/operations.d.ts.map +1 -0
- package/dist/types/src/types/Agent.d.ts +28 -31
- package/dist/types/src/types/Agent.d.ts.map +1 -1
- package/dist/types/src/types/Chat.d.ts +28 -14
- package/dist/types/src/types/Chat.d.ts.map +1 -1
- package/dist/types/src/types/Chat.test.d.ts +2 -0
- package/dist/types/src/types/Chat.test.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +1 -2
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +30 -29
- package/src/operations/run-instructions.test.ts +26 -34
- package/src/operations/skill-resolution.test.ts +6 -1
- package/src/skills/agent/operations/definitions.ts +18 -62
- package/src/skills/agent/operations/get-context.test.ts +81 -0
- package/src/skills/agent/operations/get-context.ts +9 -36
- package/src/skills/agent/operations/index.ts +1 -3
- package/src/skills/agent/operations/relay.test.ts +63 -0
- package/src/skills/agent/operations/relay.ts +124 -0
- package/src/skills/agent/skill.ts +3 -15
- package/src/skills/agent-wizard/operations/create-agent.ts +3 -3
- package/src/skills/agent-wizard/operations/definitions.ts +19 -4
- package/src/skills/agent-wizard/operations/index.ts +1 -1
- package/src/skills/agent-wizard/operations/sync-automation.test.ts +103 -0
- package/src/skills/agent-wizard/operations/sync-automation.ts +205 -0
- package/src/skills/agent-wizard/skill.ts +9 -10
- package/src/skills/alarm/skill.test.ts +2 -2
- package/src/skills/browser/skill.test.ts +4 -4
- package/src/skills/database/operations/context-add.test.ts +46 -0
- package/src/skills/database/operations/context-remove.test.ts +46 -0
- package/src/skills/database/operations/definitions.ts +23 -7
- package/src/skills/database/operations/load.test.ts +38 -0
- package/src/skills/database/operations/object-create.test.ts +116 -0
- package/src/skills/database/operations/object-create.ts +13 -2
- package/src/skills/database/operations/object-delete.test.ts +37 -0
- package/src/skills/database/operations/object-update.test.ts +39 -0
- package/src/skills/database/operations/query.test.ts +128 -0
- package/src/skills/database/operations/relation-create.test.ts +46 -0
- package/src/skills/database/operations/schema-add.test.ts +79 -0
- package/src/skills/database/operations/schema-list.test.ts +42 -0
- package/src/skills/database/operations/tag-add.test.ts +41 -0
- package/src/skills/database/operations/tag-remove.test.ts +43 -0
- package/src/skills/delegation/operations/delegate-task.test.ts +51 -36
- package/src/skills/delegation/operations/delegate-task.ts +31 -48
- package/src/skills/discord/operations/fetch-messages.test.ts +2 -2
- package/src/skills/github/operations/fetch-prs.ts +1 -1
- package/src/skills/index.ts +1 -0
- package/src/skills/linear/operations/linear.test.ts +1 -1
- package/src/skills/linear/operations/sync-issues.ts +6 -23
- package/src/skills/memory/operations/delete.test.ts +37 -0
- package/src/skills/memory/operations/query.test.ts +76 -0
- package/src/skills/memory/operations/save.test.ts +43 -0
- package/src/skills/planning/operations/definitions.ts +9 -6
- package/src/skills/planning/operations/plan-reminder.test.ts +123 -0
- package/src/skills/planning/operations/plan-reminder.ts +49 -31
- package/src/skills/planning/operations/update-tasks.md +23 -22
- package/src/skills/planning/operations/update-tasks.test.ts +31 -17
- package/src/skills/planning/operations/update-tasks.ts +17 -25
- package/src/skills/project/index.ts +6 -0
- package/src/skills/project/operations/artifact-add.ts +47 -0
- package/src/skills/project/operations/artifact-list.ts +41 -0
- package/src/skills/project/operations/definitions.ts +63 -0
- package/src/skills/project/operations/index.ts +12 -0
- package/src/skills/project/skill.test.ts +78 -0
- package/src/skills/project/skill.ts +42 -0
- package/src/skills/skill-manager/operations/definitions.ts +1 -1
- package/src/skills/skill-manager/skill.test.ts +1 -1
- package/src/skills/skill-manager/skill.ts +7 -5
- package/src/skills/websearch/skill.test.ts +2 -2
- package/src/supervisor/delegation-strategy.test.ts +129 -0
- package/src/supervisor/delegation-strategy.ts +92 -56
- package/src/sync/sync.test.ts +95 -0
- package/src/sync/sync.ts +5 -3
- package/src/testing/index.ts +1 -0
- package/src/testing/operations.ts +65 -0
- package/src/types/Agent.test.ts +36 -66
- package/src/types/Agent.ts +108 -137
- package/src/types/Chat.test.ts +234 -0
- package/src/types/Chat.ts +80 -26
- package/src/types/index.ts +1 -2
- package/dist/lib/neutral/add-artifact-5JNUYLCA.mjs +0 -24
- package/dist/lib/neutral/add-artifact-5JNUYLCA.mjs.map +0 -7
- package/dist/lib/neutral/agent-BFAYIBJI.mjs +0 -65
- package/dist/lib/neutral/agent-BFAYIBJI.mjs.map +0 -7
- package/dist/lib/neutral/agent-rules-KWCBKJ5W.mjs.map +0 -7
- package/dist/lib/neutral/chunk-3KA66YBF.mjs +0 -62
- package/dist/lib/neutral/chunk-3KA66YBF.mjs.map +0 -7
- package/dist/lib/neutral/chunk-6SGNFL6I.mjs +0 -85
- package/dist/lib/neutral/chunk-6SGNFL6I.mjs.map +0 -7
- package/dist/lib/neutral/chunk-BDTGFPM7.mjs +0 -113
- package/dist/lib/neutral/chunk-BDTGFPM7.mjs.map +0 -7
- package/dist/lib/neutral/chunk-EPQCDGIV.mjs +0 -27
- package/dist/lib/neutral/chunk-EPQCDGIV.mjs.map +0 -7
- package/dist/lib/neutral/chunk-H4W22FFJ.mjs +0 -232
- package/dist/lib/neutral/chunk-H4W22FFJ.mjs.map +0 -7
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +0 -10
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +0 -7
- package/dist/lib/neutral/chunk-JBTXZQ5G.mjs +0 -60
- package/dist/lib/neutral/chunk-JBTXZQ5G.mjs.map +0 -7
- package/dist/lib/neutral/chunk-JKOOA5OS.mjs +0 -97
- package/dist/lib/neutral/chunk-JKOOA5OS.mjs.map +0 -7
- package/dist/lib/neutral/chunk-JTEBE7KA.mjs +0 -66
- package/dist/lib/neutral/chunk-JTEBE7KA.mjs.map +0 -7
- package/dist/lib/neutral/chunk-KLFXJ2Z3.mjs +0 -36
- package/dist/lib/neutral/chunk-KLFXJ2Z3.mjs.map +0 -7
- package/dist/lib/neutral/chunk-LBA5UOLF.mjs +0 -87
- package/dist/lib/neutral/chunk-LBA5UOLF.mjs.map +0 -7
- package/dist/lib/neutral/chunk-LL3MOQUZ.mjs +0 -120
- package/dist/lib/neutral/chunk-LL3MOQUZ.mjs.map +0 -7
- package/dist/lib/neutral/chunk-MFVIGJBW.mjs +0 -68
- package/dist/lib/neutral/chunk-MFVIGJBW.mjs.map +0 -7
- package/dist/lib/neutral/chunk-PBARVBNJ.mjs +0 -86
- package/dist/lib/neutral/chunk-PBARVBNJ.mjs.map +0 -7
- package/dist/lib/neutral/chunk-VJ5QBYM5.mjs +0 -61
- package/dist/lib/neutral/chunk-VJ5QBYM5.mjs.map +0 -7
- package/dist/lib/neutral/chunk-YQSQRSXG.mjs +0 -367
- package/dist/lib/neutral/chunk-YQSQRSXG.mjs.map +0 -7
- package/dist/lib/neutral/chunk-Z2HFOZXK.mjs +0 -191
- package/dist/lib/neutral/chunk-Z2HFOZXK.mjs.map +0 -7
- package/dist/lib/neutral/context-add-DZTPB3FK.mjs +0 -22
- package/dist/lib/neutral/context-add-DZTPB3FK.mjs.map +0 -7
- package/dist/lib/neutral/context-remove-XSBOM4VJ.mjs +0 -22
- package/dist/lib/neutral/context-remove-XSBOM4VJ.mjs.map +0 -7
- package/dist/lib/neutral/create-agent-5WTOFIEK.mjs +0 -35
- package/dist/lib/neutral/create-agent-5WTOFIEK.mjs.map +0 -7
- package/dist/lib/neutral/definitions-VRR5OGXI.mjs +0 -17
- package/dist/lib/neutral/definitions-VRR5OGXI.mjs.map +0 -7
- package/dist/lib/neutral/delegate-task-UX64NK4M.mjs +0 -13
- package/dist/lib/neutral/delegate-task-UX64NK4M.mjs.map +0 -7
- package/dist/lib/neutral/delete-IU7HPU3K.mjs +0 -19
- package/dist/lib/neutral/delete-IU7HPU3K.mjs.map +0 -7
- package/dist/lib/neutral/enable-skills-FHEJXQVB.mjs +0 -47
- package/dist/lib/neutral/enable-skills-FHEJXQVB.mjs.map +0 -7
- package/dist/lib/neutral/fetch-5LY25EBR.mjs +0 -24
- package/dist/lib/neutral/fetch-5LY25EBR.mjs.map +0 -7
- package/dist/lib/neutral/fetch-messages-CQMDI36G.mjs +0 -139
- package/dist/lib/neutral/fetch-messages-CQMDI36G.mjs.map +0 -7
- package/dist/lib/neutral/get-context-Q4YY6DRV.mjs +0 -77
- package/dist/lib/neutral/get-context-Q4YY6DRV.mjs.map +0 -7
- package/dist/lib/neutral/get-current-date-JR5F7ZS3.mjs +0 -17
- package/dist/lib/neutral/get-current-date-JR5F7ZS3.mjs.map +0 -7
- package/dist/lib/neutral/index.mjs +0 -875
- package/dist/lib/neutral/index.mjs.map +0 -7
- package/dist/lib/neutral/load-S6HC5TGX.mjs +0 -17
- package/dist/lib/neutral/load-S6HC5TGX.mjs.map +0 -7
- package/dist/lib/neutral/meta.json +0 -1
- package/dist/lib/neutral/object-create-PVDQ62CG.mjs +0 -32
- package/dist/lib/neutral/object-create-PVDQ62CG.mjs.map +0 -7
- package/dist/lib/neutral/object-delete-3CSL6XI6.mjs +0 -18
- package/dist/lib/neutral/object-delete-3CSL6XI6.mjs.map +0 -7
- package/dist/lib/neutral/object-update-NIGMZINM.mjs +0 -28
- package/dist/lib/neutral/object-update-NIGMZINM.mjs.map +0 -7
- package/dist/lib/neutral/plan-reminder-N4X6JPBI.mjs +0 -88
- package/dist/lib/neutral/plan-reminder-N4X6JPBI.mjs.map +0 -7
- package/dist/lib/neutral/qualifier-5CIRZYX5.mjs +0 -91
- package/dist/lib/neutral/qualifier-5CIRZYX5.mjs.map +0 -7
- package/dist/lib/neutral/query-K4R7UHLU.mjs +0 -32
- package/dist/lib/neutral/query-K4R7UHLU.mjs.map +0 -7
- package/dist/lib/neutral/query-NCTCRYTD.mjs +0 -59
- package/dist/lib/neutral/query-NCTCRYTD.mjs.map +0 -7
- package/dist/lib/neutral/query-skills-7GQFSU4V.mjs +0 -17
- package/dist/lib/neutral/query-skills-7GQFSU4V.mjs.map +0 -7
- package/dist/lib/neutral/relation-create-QKXHTL7G.mjs +0 -34
- package/dist/lib/neutral/relation-create-QKXHTL7G.mjs.map +0 -7
- package/dist/lib/neutral/relation-delete-PDIWT2JX.mjs +0 -18
- package/dist/lib/neutral/relation-delete-PDIWT2JX.mjs.map +0 -7
- package/dist/lib/neutral/run-instructions-72ASH5EZ.mjs +0 -165
- package/dist/lib/neutral/run-instructions-72ASH5EZ.mjs.map +0 -7
- package/dist/lib/neutral/save-UYVRA4RS.mjs +0 -23
- package/dist/lib/neutral/save-UYVRA4RS.mjs.map +0 -7
- package/dist/lib/neutral/schema-add-5NOK2RWE.mjs +0 -25
- package/dist/lib/neutral/schema-add-5NOK2RWE.mjs.map +0 -7
- package/dist/lib/neutral/schema-list-BZUR5KMX.mjs +0 -37
- package/dist/lib/neutral/schema-list-BZUR5KMX.mjs.map +0 -7
- package/dist/lib/neutral/set-alarm-BD3NEYSU.mjs +0 -65
- package/dist/lib/neutral/set-alarm-BD3NEYSU.mjs.map +0 -7
- package/dist/lib/neutral/sync-issues-O76MCMD3.mjs +0 -166
- package/dist/lib/neutral/sync-issues-O76MCMD3.mjs.map +0 -7
- package/dist/lib/neutral/sync-triggers-YBTLPCUB.mjs +0 -138
- package/dist/lib/neutral/sync-triggers-YBTLPCUB.mjs.map +0 -7
- package/dist/lib/neutral/tag-add-L5WNOBYY.mjs +0 -18
- package/dist/lib/neutral/tag-add-L5WNOBYY.mjs.map +0 -7
- package/dist/lib/neutral/tag-remove-WV5RPE5W.mjs +0 -18
- package/dist/lib/neutral/tag-remove-WV5RPE5W.mjs.map +0 -7
- package/dist/lib/neutral/testing/index.mjs +0 -65
- package/dist/lib/neutral/testing/index.mjs.map +0 -7
- package/dist/lib/neutral/update-tasks-HX4ILWOU.mjs +0 -46
- package/dist/lib/neutral/update-tasks-HX4ILWOU.mjs.map +0 -7
- package/dist/types/src/skills/agent/operations/add-artifact.d.ts +0 -4
- package/dist/types/src/skills/agent/operations/add-artifact.d.ts.map +0 -1
- package/dist/types/src/skills/agent/operations/agent.d.ts +0 -4
- package/dist/types/src/skills/agent/operations/agent.d.ts.map +0 -1
- package/dist/types/src/skills/agent/operations/qualifier.d.ts +0 -5
- package/dist/types/src/skills/agent/operations/qualifier.d.ts.map +0 -1
- package/dist/types/src/skills/agent/skill.test.d.ts.map +0 -1
- package/dist/types/src/skills/agent-wizard/operations/sync-triggers.d.ts +0 -8
- package/dist/types/src/skills/agent-wizard/operations/sync-triggers.d.ts.map +0 -1
- package/dist/types/src/skills/database/skill.test.d.ts +0 -2
- package/dist/types/src/skills/database/skill.test.d.ts.map +0 -1
- package/dist/types/src/skills/memory/skill.test.d.ts +0 -2
- package/dist/types/src/skills/memory/skill.test.d.ts.map +0 -1
- package/dist/types/src/skills/planning/skill.test.d.ts +0 -2
- package/dist/types/src/skills/planning/skill.test.d.ts.map +0 -1
- package/dist/types/src/types/Plan.d.ts +0 -80
- package/dist/types/src/types/Plan.d.ts.map +0 -1
- package/src/operations/run-instructions.conversations.json +0 -1
- package/src/skills/agent/operations/add-artifact.ts +0 -20
- package/src/skills/agent/operations/agent.ts +0 -69
- package/src/skills/agent/operations/qualifier.ts +0 -97
- package/src/skills/agent/skill.conversations.json +0 -1
- package/src/skills/agent/skill.test.ts +0 -728
- package/src/skills/agent-wizard/operations/sync-triggers.ts +0 -169
- package/src/skills/database/skill.conversations.json +0 -1
- package/src/skills/database/skill.test.ts +0 -531
- package/src/skills/memory/skill.conversations.json +0 -1
- package/src/skills/memory/skill.test.ts +0 -138
- package/src/skills/planning/skill.conversations.json +0 -1
- package/src/skills/planning/skill.test.ts +0 -123
- package/src/types/Plan.ts +0 -123
- /package/dist/types/src/skills/{agent → project}/skill.test.d.ts +0 -0
|
@@ -0,0 +1,614 @@
|
|
|
1
|
+
import { t as skill } from "./chunk-agent.mjs";
|
|
2
|
+
import { c as peekOutlineRef, n as Chat_exports, t as Chat } from "./chunk-Chat.mjs";
|
|
3
|
+
import { a as loadForChat, r as Agent_exports, t as McpServer_exports } from "./chunk-types.mjs";
|
|
4
|
+
import { n as Memory_exports } from "./chunk-Memory.mjs";
|
|
5
|
+
import { A as SkillManagerHandlers, B as CreateAgent, C as RelationCreate, D as TagAdd, E as SchemaList, F as GetCurrentDate, H as definitions_exports$1, I as SetAlarm, K as definitions_exports, L as definitions_exports$2, M as QuerySkills, N as definitions_exports$9, O as TagRemove, P as AlarmHandlers, R as AgentWizardHandlers, S as Query$1, T as SchemaAdd, U as AgentSkillHandlers, V as SyncAutomation, _ as ContextRemove, a as UpdateTasks, b as ObjectDelete, c as DeleteMemory, d as definitions_exports$6, f as DelegationHandlers, g as ContextAdd, h as DatabaseHandlers, i as PlanReminder, j as EnableSkills, k as definitions_exports$3, l as QueryMemories, m as delegate_task_exports, n as RunInstructions, o as definitions_exports$7, p as DelegateTask, r as PlanningHandlers, s as MemoryHandlers, t as AgentHandlers, u as SaveMemory, v as Load, w as RelationDelete, x as ObjectUpdate, y as ObjectCreate, z as AgentRules } from "./chunk-operations.mjs";
|
|
6
|
+
import { r as definitions_exports$4, t as FetchMessages } from "./chunk-definitions.mjs";
|
|
7
|
+
import { n as SyncIssues, r as definitions_exports$5, t as syncObjects } from "./chunk-sync.mjs";
|
|
8
|
+
import { n as ArtifactList, r as definitions_exports$8, t as ArtifactAdd } from "./chunk-definitions2.mjs";
|
|
9
|
+
import { n as definitions_exports$10, t as Fetch } from "./chunk-definitions3.mjs";
|
|
10
|
+
import { Instructions, Operation, OperationHandlerSet, Skill, Template, Trigger } from "@dxos/compute";
|
|
11
|
+
import { trim } from "@dxos/util";
|
|
12
|
+
import { AnthropicWebSearchTool, OpaqueToolkit } from "@dxos/ai";
|
|
13
|
+
import { AiContext } from "@dxos/assistant";
|
|
14
|
+
import { Database, Feed, Filter, Obj, Query, Ref, Type } from "@dxos/echo";
|
|
15
|
+
import { DXN as DXN$1, EID, EntityId } from "@dxos/keys";
|
|
16
|
+
import * as Effect from "effect/Effect";
|
|
17
|
+
import { EffectEx } from "@dxos/effect";
|
|
18
|
+
import { Message, Outline, Task } from "@dxos/types";
|
|
19
|
+
import { Text } from "@dxos/schema";
|
|
20
|
+
import * as Toolkit from "@effect/ai/Toolkit";
|
|
21
|
+
import * as Layer from "effect/Layer";
|
|
22
|
+
import * as Cause from "effect/Cause";
|
|
23
|
+
import * as Exit from "effect/Exit";
|
|
24
|
+
import { ProcessManager } from "@dxos/compute-runtime";
|
|
25
|
+
import { log } from "@dxos/log";
|
|
26
|
+
//#region src/skills/agent-wizard/skill.ts
|
|
27
|
+
var SKILL_KEY$13 = "org.dxos.skill.agentWizard";
|
|
28
|
+
/**
|
|
29
|
+
* Creates the Agent Wizard skill. This is a function to avoid circular dependency issues.
|
|
30
|
+
*/
|
|
31
|
+
var make$13 = () => Skill.make({
|
|
32
|
+
key: SKILL_KEY$13,
|
|
33
|
+
name: "Agent Wizard",
|
|
34
|
+
description: "Help the user create a new agent (subscriptions and optional cron compile to routines).",
|
|
35
|
+
agentCanEnable: true,
|
|
36
|
+
instructions: Template.make({ source: trim`
|
|
37
|
+
You are a wizard that helps the user create a new agent.
|
|
38
|
+
|
|
39
|
+
Agents are goal oriented and autonomously driven.
|
|
40
|
+
Each agent has instructions - the goal of the agent.
|
|
41
|
+
The instructions also typically describe what actions to perform in reaction to events (emails).
|
|
42
|
+
Agents can subscribe to emails, and durable work products belong to a project's artifacts.
|
|
43
|
+
|
|
44
|
+
Automation (subscriptions and an optional cron schedule) is compiled into routines, not stored
|
|
45
|
+
on the agent: pass subscriptions when creating the agent, and use the sync-automation tool with
|
|
46
|
+
the FULL desired config to change automation later (a cron expression schedules periodic wakes,
|
|
47
|
+
e.g. \`0 9 * * *\` for daily at 09:00; \`enabled\` on the agent is applied to every trigger).
|
|
48
|
+
|
|
49
|
+
The agent itself is an ECHO object and can be edited like any other object using the database skill.
|
|
50
|
+
You can edit the agent's instructions, name, and other properties directly.
|
|
51
|
+
If you edit the agent's \`enabled\` field, you MUST call sync-automation afterward so triggers pick it up.
|
|
52
|
+
|
|
53
|
+
IMPORTANT: Before attempting to create an agent call the [agent-rules] tool to get the rules for creating an agent.
|
|
54
|
+
` }),
|
|
55
|
+
tools: Skill.toolDefinitions({ operations: [
|
|
56
|
+
AgentRules,
|
|
57
|
+
CreateAgent,
|
|
58
|
+
SyncAutomation
|
|
59
|
+
] })
|
|
60
|
+
});
|
|
61
|
+
var skill$1 = {
|
|
62
|
+
key: SKILL_KEY$13,
|
|
63
|
+
make: make$13
|
|
64
|
+
};
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region src/skills/alarm/skill.ts
|
|
67
|
+
var SKILL_KEY$12 = "org.dxos.skill.alarm";
|
|
68
|
+
var instructions$8 = trim`
|
|
69
|
+
You can schedule an alarm to wake yourself up in the future and continue working.
|
|
70
|
+
When the alarm fires you receive a prompt carrying any reminder you set.
|
|
71
|
+
Read the current time before computing an absolute wake time.
|
|
72
|
+
`;
|
|
73
|
+
var make$12 = () => Skill.make({
|
|
74
|
+
key: SKILL_KEY$12,
|
|
75
|
+
name: "Alarm",
|
|
76
|
+
description: "Schedule a self-wake and inspect the current time.",
|
|
77
|
+
agentCanEnable: true,
|
|
78
|
+
instructions: { source: Ref.make(Text.make({ content: instructions$8 })) },
|
|
79
|
+
tools: Skill.toolDefinitions({ operations: [SetAlarm, GetCurrentDate] })
|
|
80
|
+
});
|
|
81
|
+
var skill$2 = {
|
|
82
|
+
key: SKILL_KEY$12,
|
|
83
|
+
make: make$12
|
|
84
|
+
};
|
|
85
|
+
//#endregion
|
|
86
|
+
//#region src/skills/automation/skill.ts
|
|
87
|
+
var SKILL_KEY$11 = "org.dxos.skill.automation";
|
|
88
|
+
var instructions$7 = trim`
|
|
89
|
+
Automation allows you to automatically initiate actions based on events.
|
|
90
|
+
Automations are configured by creating a trigger that references a function.
|
|
91
|
+
Whenever event that matches the trigger occurs, the function is invoked.
|
|
92
|
+
|
|
93
|
+
## Configuration
|
|
94
|
+
|
|
95
|
+
Triggers are configured by the properties of the Trigger object.
|
|
96
|
+
- enabled: Must be true for trigger to run.
|
|
97
|
+
- spec: Events that the trigger matches.
|
|
98
|
+
- function: Ref to a ${Type.getTypename(Operation.PersistentOperation)} object that will be invoked. Query the functions present in the space first, and reference them in the trigger.
|
|
99
|
+
- input: The spec of the input data that will be passed to the function.
|
|
100
|
+
|
|
101
|
+
## Input patterns
|
|
102
|
+
|
|
103
|
+
Input to the invoked function is defined by the input property of the Trigger object.
|
|
104
|
+
It's an object that supports constants or template strings.
|
|
105
|
+
|
|
106
|
+
Example:
|
|
107
|
+
|
|
108
|
+
{
|
|
109
|
+
item: '{{event.item}}',
|
|
110
|
+
instructions: 'Summarize and perform entity-extraction'
|
|
111
|
+
mailbox: { '/': 'echo://AAA/ZZZ' }
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
## Trigger kinds
|
|
115
|
+
|
|
116
|
+
- Timer: Triggered by a cron schedule.
|
|
117
|
+
- Queue: Subscribes and processes items begginging to end.
|
|
118
|
+
Note: queues are the same as feeds. The queue EID should be of form: echo://<space-id>/<queue-id>.
|
|
119
|
+
- Subscription: Subscribes and processes database items based on a query.
|
|
120
|
+
|
|
121
|
+
Avoid: email and webhook triggers.
|
|
122
|
+
|
|
123
|
+
## Editing triggers
|
|
124
|
+
|
|
125
|
+
Triggers are represented as objects of type ${Type.getTypename(Trigger.Trigger)}.
|
|
126
|
+
You need access to the Database skill to manipulate triggers.
|
|
127
|
+
Read trigger schema before manipulating triggers.
|
|
128
|
+
Having a Trigger object in the database is enough to setup an automation.
|
|
129
|
+
|
|
130
|
+
## Examples
|
|
131
|
+
|
|
132
|
+
Timer:
|
|
133
|
+
|
|
134
|
+
{
|
|
135
|
+
"function": { "/": "echo://AAA/ZZZ" },
|
|
136
|
+
"enabled": true,
|
|
137
|
+
"spec": {
|
|
138
|
+
"kind": "timer",
|
|
139
|
+
"cron": "*/5 * * * *"
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
Queue:
|
|
144
|
+
|
|
145
|
+
{
|
|
146
|
+
"function": { "/": "echo://AAA/ZZZ" },
|
|
147
|
+
"enabled": true,
|
|
148
|
+
"spec": {
|
|
149
|
+
"kind": "queue",
|
|
150
|
+
"queue": "echo://XXX/YYY"
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
Subscription:
|
|
155
|
+
|
|
156
|
+
{
|
|
157
|
+
"function": { "/": "echo://AAA/ZZZ" },
|
|
158
|
+
"enabled": true,
|
|
159
|
+
"spec": {
|
|
160
|
+
"kind": "subscription",
|
|
161
|
+
"query": { "ast": { "type": "select", "filter": { "type": "object", "typename": "dxn:org.dxos.type.person" } } }
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
`;
|
|
165
|
+
var make$11 = () => Skill.make({
|
|
166
|
+
key: SKILL_KEY$11,
|
|
167
|
+
name: "Triggers",
|
|
168
|
+
description: "Trigger management and automation.",
|
|
169
|
+
instructions: { source: Ref.make(Text.make({ content: instructions$7 })) }
|
|
170
|
+
});
|
|
171
|
+
var skill$3 = {
|
|
172
|
+
key: SKILL_KEY$11,
|
|
173
|
+
make: make$11
|
|
174
|
+
};
|
|
175
|
+
//#endregion
|
|
176
|
+
//#region src/skills/skill-manager/skill.ts
|
|
177
|
+
var SKILL_KEY$10 = "org.dxos.skill.skillManager";
|
|
178
|
+
var make$10 = () => Skill.make({
|
|
179
|
+
key: SKILL_KEY$10,
|
|
180
|
+
name: "Skill Manager",
|
|
181
|
+
description: "Query and enable skills in the current conversation.",
|
|
182
|
+
instructions: Template.make({
|
|
183
|
+
source: trim`
|
|
184
|
+
The list below is the current set of available skills — it is rendered fresh into this prompt,
|
|
185
|
+
so do NOT call [query-skills] to obtain it. Call [enable-skills] directly with the keys you
|
|
186
|
+
need; only skills marked [agent-can-enable] can be enabled by the agent.
|
|
187
|
+
Reach for [query-skills] only to re-read the list after something has changed it.
|
|
188
|
+
|
|
189
|
+
<available_skills>
|
|
190
|
+
{{#each skills}}
|
|
191
|
+
- {{key}} "{{name}}"{{#if description}} -- {{description}}{{/if}}{{#if agentCanEnable}} [agent-can-enable]{{/if}}
|
|
192
|
+
{{/each}}
|
|
193
|
+
</available_skills>
|
|
194
|
+
|
|
195
|
+
NOTE: A skill's tools only appear once it is enabled. Skills already enabled in this
|
|
196
|
+
conversation expose their tools to you directly — do not re-enable a skill whose tools you
|
|
197
|
+
can already see.
|
|
198
|
+
`,
|
|
199
|
+
inputs: [{
|
|
200
|
+
name: "skills",
|
|
201
|
+
kind: "operation",
|
|
202
|
+
operation: DXN$1.getName(QuerySkills.meta.key)
|
|
203
|
+
}]
|
|
204
|
+
}),
|
|
205
|
+
tools: Skill.toolDefinitions({ operations: [QuerySkills, EnableSkills] })
|
|
206
|
+
});
|
|
207
|
+
var skill$13 = {
|
|
208
|
+
key: SKILL_KEY$10,
|
|
209
|
+
make: make$10
|
|
210
|
+
};
|
|
211
|
+
//#endregion
|
|
212
|
+
//#region src/skills/browser/skill.ts
|
|
213
|
+
var SKILL_KEY$9 = "org.dxos.skill.browser";
|
|
214
|
+
var instructions$6 = trim`
|
|
215
|
+
You are able to connect and use a virtual browser with persistent session.
|
|
216
|
+
Browser tools are provided via MCP.
|
|
217
|
+
`;
|
|
218
|
+
var make$9 = () => Skill.make({
|
|
219
|
+
key: SKILL_KEY$9,
|
|
220
|
+
name: "Browser",
|
|
221
|
+
description: "Access to a real isolated browser.",
|
|
222
|
+
agentCanEnable: true,
|
|
223
|
+
instructions: { source: Ref.make(Text.make({ content: instructions$6 })) },
|
|
224
|
+
mcpServers: [{
|
|
225
|
+
url: "https://playwright-mcp-example.dxos.workers.dev/sse",
|
|
226
|
+
protocol: "sse"
|
|
227
|
+
}]
|
|
228
|
+
});
|
|
229
|
+
var skill$4 = {
|
|
230
|
+
key: SKILL_KEY$9,
|
|
231
|
+
make: make$9
|
|
232
|
+
};
|
|
233
|
+
//#endregion
|
|
234
|
+
//#region src/skills/connectors/skill.ts
|
|
235
|
+
var SKILL_KEY$8 = "org.dxos.skill.connectors";
|
|
236
|
+
/**
|
|
237
|
+
* Instructs the model to surface a connector prompt when a request needs a service the user has not
|
|
238
|
+
* connected, rather than failing silently. The prompt is rendered inline in the conversation by the
|
|
239
|
+
* `integration-prompt` surface, which offers to authenticate the matching connector.
|
|
240
|
+
*/
|
|
241
|
+
var instructions$5 = trim`
|
|
242
|
+
Users connect external services (such as Gmail, Slack, GitHub, Linear, and Discord) through connectors.
|
|
243
|
+
A service is available to you only when a connection to it already exists in the current space.
|
|
244
|
+
|
|
245
|
+
When a request needs a service that is not connected, DO NOT fail, refuse, or apologize. Instead, render
|
|
246
|
+
a connector prompt so the user can connect it inline. Emit a self-closing surface tag with the
|
|
247
|
+
'integration-prompt' role and the service's domain:
|
|
248
|
+
|
|
249
|
+
<surface role='integration-prompt' data='{"service":"gmail.com"}' />
|
|
250
|
+
|
|
251
|
+
Use the service's domain as the 'service' value (for example 'gmail.com', 'slack.com', 'github.com').
|
|
252
|
+
Emit the surface once, then briefly tell the user that connecting the service will let you continue.
|
|
253
|
+
`;
|
|
254
|
+
var make$8 = () => Skill.make({
|
|
255
|
+
key: SKILL_KEY$8,
|
|
256
|
+
name: "Connectors",
|
|
257
|
+
description: "Prompt the user to connect external services when a connector is required but unavailable.",
|
|
258
|
+
agentCanEnable: true,
|
|
259
|
+
instructions: { source: Ref.make(Text.make({ content: instructions$5 })) }
|
|
260
|
+
});
|
|
261
|
+
var skill$5 = {
|
|
262
|
+
key: SKILL_KEY$8,
|
|
263
|
+
make: make$8
|
|
264
|
+
};
|
|
265
|
+
//#endregion
|
|
266
|
+
//#region src/skills/database/skill.ts
|
|
267
|
+
var SKILL_KEY$7 = "org.dxos.skill.database";
|
|
268
|
+
var instructions$4 = trim`
|
|
269
|
+
You can query, create, update, and delete objects in ECHO.
|
|
270
|
+
You can manage schemas, relations, tags, and add objects to the chat context.
|
|
271
|
+
`;
|
|
272
|
+
var make$7 = () => Skill.make({
|
|
273
|
+
key: SKILL_KEY$7,
|
|
274
|
+
name: "Database",
|
|
275
|
+
description: "Query and manipulate objects in the ECHO database.",
|
|
276
|
+
agentCanEnable: true,
|
|
277
|
+
instructions: { source: Ref.make(Text.make({ content: instructions$4 })) },
|
|
278
|
+
tools: Skill.toolDefinitions({ operations: [
|
|
279
|
+
ContextAdd,
|
|
280
|
+
ContextRemove,
|
|
281
|
+
Load,
|
|
282
|
+
ObjectCreate,
|
|
283
|
+
ObjectDelete,
|
|
284
|
+
ObjectUpdate,
|
|
285
|
+
Query$1,
|
|
286
|
+
RelationCreate,
|
|
287
|
+
RelationDelete,
|
|
288
|
+
SchemaAdd,
|
|
289
|
+
SchemaList,
|
|
290
|
+
TagAdd,
|
|
291
|
+
TagRemove
|
|
292
|
+
] })
|
|
293
|
+
});
|
|
294
|
+
var skill$6 = {
|
|
295
|
+
key: SKILL_KEY$7,
|
|
296
|
+
make: make$7
|
|
297
|
+
};
|
|
298
|
+
//#endregion
|
|
299
|
+
//#region src/skills/delegation/skill.ts
|
|
300
|
+
var SKILL_KEY$6 = "org.dxos.skill.delegation";
|
|
301
|
+
var make$6 = () => Skill.make({
|
|
302
|
+
key: SKILL_KEY$6,
|
|
303
|
+
name: "Delegation",
|
|
304
|
+
description: "Delegates work to sub-agents and tracks it as plan tasks.",
|
|
305
|
+
tools: Skill.toolDefinitions({ operations: [DelegateTask] })
|
|
306
|
+
});
|
|
307
|
+
var skill$7 = {
|
|
308
|
+
key: SKILL_KEY$6,
|
|
309
|
+
make: make$6
|
|
310
|
+
};
|
|
311
|
+
//#endregion
|
|
312
|
+
//#region src/skills/discord/skill.ts
|
|
313
|
+
var SKILL_KEY$5 = "org.dxos.skill.discord";
|
|
314
|
+
/**
|
|
315
|
+
* Agent prompt instructions for managing hierarchical task lists.
|
|
316
|
+
*/
|
|
317
|
+
var instructions$3 = trim`
|
|
318
|
+
You are able to fetch messages from Discord servers.
|
|
319
|
+
|
|
320
|
+
Known servers:
|
|
321
|
+
|
|
322
|
+
DXOS serverId: 837138313172353095
|
|
323
|
+
`;
|
|
324
|
+
var make$5 = () => Skill.make({
|
|
325
|
+
key: SKILL_KEY$5,
|
|
326
|
+
name: "Discord",
|
|
327
|
+
description: "Discord integration.",
|
|
328
|
+
instructions: { source: Ref.make(Text.make({ content: instructions$3 })) },
|
|
329
|
+
tools: Skill.toolDefinitions({ operations: [FetchMessages] })
|
|
330
|
+
});
|
|
331
|
+
var skill$8 = {
|
|
332
|
+
key: SKILL_KEY$5,
|
|
333
|
+
make: make$5
|
|
334
|
+
};
|
|
335
|
+
//#endregion
|
|
336
|
+
//#region src/skills/discord/operations/index.ts
|
|
337
|
+
var DiscordHandlers = OperationHandlerSet.lazy(() => import("./chunk-fetch-messages.mjs"));
|
|
338
|
+
//#endregion
|
|
339
|
+
//#region src/skills/linear/skill.ts
|
|
340
|
+
var SKILL_KEY$4 = "org.dxos.skill.linear";
|
|
341
|
+
/**
|
|
342
|
+
* Agent prompt instructions for managing hierarchical task lists.
|
|
343
|
+
*/
|
|
344
|
+
var instructions$2 = trim`
|
|
345
|
+
You are able to sync Linear workspaces.
|
|
346
|
+
Sometimes sync does not complete in one go and you need to call the function again.
|
|
347
|
+
|
|
348
|
+
Known workspaces:
|
|
349
|
+
|
|
350
|
+
DXOS teamId: 1127c63a-6f77-4725-9229-50f6cd47321c
|
|
351
|
+
`;
|
|
352
|
+
var make$4 = () => Skill.make({
|
|
353
|
+
key: SKILL_KEY$4,
|
|
354
|
+
name: "Linear",
|
|
355
|
+
description: "Syncs Linear workspaces.",
|
|
356
|
+
instructions: { source: Ref.make(Text.make({ content: instructions$2 })) },
|
|
357
|
+
tools: Skill.toolDefinitions({ operations: [SyncIssues] })
|
|
358
|
+
});
|
|
359
|
+
var skill$9 = {
|
|
360
|
+
key: SKILL_KEY$4,
|
|
361
|
+
make: make$4
|
|
362
|
+
};
|
|
363
|
+
//#endregion
|
|
364
|
+
//#region src/skills/linear/operations/index.ts
|
|
365
|
+
var LinearHandlers = OperationHandlerSet.lazy(() => import("./chunk-sync-issues.mjs"));
|
|
366
|
+
//#endregion
|
|
367
|
+
//#region src/skills/memory/skill.ts
|
|
368
|
+
var SKILL_KEY$3 = "org.dxos.skill.memory";
|
|
369
|
+
var instructions$1 = trim`
|
|
370
|
+
You have the ability to save and recall memories.
|
|
371
|
+
Memories are persistent knowledge units stored in the database.
|
|
372
|
+
Use memories to remember facts, user preferences, decisions, and any knowledge that should persist across conversations.
|
|
373
|
+
|
|
374
|
+
When the user asks you to remember something, save it as a memory with a descriptive title.
|
|
375
|
+
When the user asks about something you might have stored, query your memories first.
|
|
376
|
+
You can also delete outdated or incorrect memories.
|
|
377
|
+
`;
|
|
378
|
+
var make$3 = () => Skill.make({
|
|
379
|
+
key: SKILL_KEY$3,
|
|
380
|
+
name: "Memory",
|
|
381
|
+
description: "Persistent memory storage and retrieval.",
|
|
382
|
+
agentCanEnable: true,
|
|
383
|
+
instructions: { source: Ref.make(Text.make({ content: instructions$1 })) },
|
|
384
|
+
tools: Skill.toolDefinitions({ operations: [
|
|
385
|
+
SaveMemory,
|
|
386
|
+
QueryMemories,
|
|
387
|
+
DeleteMemory
|
|
388
|
+
] })
|
|
389
|
+
});
|
|
390
|
+
var skill$10 = {
|
|
391
|
+
key: SKILL_KEY$3,
|
|
392
|
+
make: make$3
|
|
393
|
+
};
|
|
394
|
+
//#endregion
|
|
395
|
+
//#region src/skills/planning/skill.ts
|
|
396
|
+
var SKILL_KEY$2 = "org.dxos.skill.planning";
|
|
397
|
+
var make$2 = () => Skill.make({
|
|
398
|
+
key: SKILL_KEY$2,
|
|
399
|
+
name: "Planning",
|
|
400
|
+
description: "Plans and tracks complex tasks using artifacts.",
|
|
401
|
+
agentCanEnable: true,
|
|
402
|
+
tools: Skill.toolDefinitions({ operations: [UpdateTasks] }),
|
|
403
|
+
hooks: [{
|
|
404
|
+
spec: { _tag: "end-request" },
|
|
405
|
+
function: Ref.make(Operation.serialize(PlanReminder))
|
|
406
|
+
}]
|
|
407
|
+
});
|
|
408
|
+
var skill$11 = {
|
|
409
|
+
key: SKILL_KEY$2,
|
|
410
|
+
make: make$2
|
|
411
|
+
};
|
|
412
|
+
//#endregion
|
|
413
|
+
//#region src/skills/project/skill.ts
|
|
414
|
+
var SKILL_KEY$1 = "org.dxos.skill.project";
|
|
415
|
+
var instructions = trim`
|
|
416
|
+
You are working in the context of a project (its reference is bound into this chat).
|
|
417
|
+
The project owns a collection of artifacts: the durable work products of this project.
|
|
418
|
+
When you create an object the user asked for (a document, outline, sheet, contact, …), file it
|
|
419
|
+
into the project's artifacts with the add-artifact tool so the project owns it.
|
|
420
|
+
When looking for the project's existing material, list its artifacts first rather than searching
|
|
421
|
+
the whole space.
|
|
422
|
+
`;
|
|
423
|
+
var make$1 = () => Skill.make({
|
|
424
|
+
key: SKILL_KEY$1,
|
|
425
|
+
name: "Project",
|
|
426
|
+
description: "Manage a project's artifacts: file created objects and find existing ones.",
|
|
427
|
+
agentCanEnable: true,
|
|
428
|
+
instructions: { source: Ref.make(Text.make({ content: instructions })) },
|
|
429
|
+
tools: Skill.toolDefinitions({ operations: [ArtifactAdd, ArtifactList] })
|
|
430
|
+
});
|
|
431
|
+
var skill$12 = {
|
|
432
|
+
key: SKILL_KEY$1,
|
|
433
|
+
make: make$1
|
|
434
|
+
};
|
|
435
|
+
//#endregion
|
|
436
|
+
//#region src/skills/project/operations/index.ts
|
|
437
|
+
var ProjectHandlers = OperationHandlerSet.lazy(() => import("./chunk-artifact-add.mjs"), () => import("./chunk-artifact-list.mjs"));
|
|
438
|
+
//#endregion
|
|
439
|
+
//#region src/skills/websearch/toolkit.ts
|
|
440
|
+
var WebSearchToolkit = Toolkit.make(AnthropicWebSearchTool);
|
|
441
|
+
var WebSearchToolkitOpaque = OpaqueToolkit.make(WebSearchToolkit, Layer.empty);
|
|
442
|
+
//#endregion
|
|
443
|
+
//#region src/skills/websearch/skill.ts
|
|
444
|
+
var SKILL_KEY = "org.dxos.skill.webSearch";
|
|
445
|
+
var make = () => Skill.make({
|
|
446
|
+
key: SKILL_KEY,
|
|
447
|
+
name: "Web Search",
|
|
448
|
+
description: "Search the web.",
|
|
449
|
+
agentCanEnable: true,
|
|
450
|
+
instructions: { source: Ref.make(Text.make()) },
|
|
451
|
+
tools: Skill.toolDefinitions({
|
|
452
|
+
operations: [Fetch],
|
|
453
|
+
tools: [WebSearchToolkit.tools.AnthropicWebSearch.name]
|
|
454
|
+
})
|
|
455
|
+
});
|
|
456
|
+
var skill$14 = {
|
|
457
|
+
key: SKILL_KEY,
|
|
458
|
+
make
|
|
459
|
+
};
|
|
460
|
+
//#endregion
|
|
461
|
+
//#region src/skills/websearch/operations/index.ts
|
|
462
|
+
var WebSearchHandlers = OperationHandlerSet.lazy(() => import("./chunk-fetch.mjs"));
|
|
463
|
+
//#endregion
|
|
464
|
+
//#region src/supervisor/delegation-strategy.ts
|
|
465
|
+
var __dxlog_file = "/__w/dxos/dxos/packages/core/compute/assistant-toolkit/src/supervisor/delegation-strategy.ts";
|
|
466
|
+
/**
|
|
467
|
+
* Resolves the chat backed by the given conversation feed, if any.
|
|
468
|
+
*/
|
|
469
|
+
var findChatForFeed = (feed) => Effect.gen(function* () {
|
|
470
|
+
const chats = yield* Database.query(Filter.type(Chat)).run;
|
|
471
|
+
for (const chat of chats) if (yield* Effect.gen(function* () {
|
|
472
|
+
return (yield* Database.load(chat.feed)).id === feed.id;
|
|
473
|
+
}).pipe(Effect.orElseSucceed(() => false))) return chat;
|
|
474
|
+
});
|
|
475
|
+
/**
|
|
476
|
+
* Normalizes an LLM-reported artifact reference (bare entity id or full ECHO URI) to a
|
|
477
|
+
* fully-qualified ref in the current space. Not resolved here — it resolves lazily when read.
|
|
478
|
+
*/
|
|
479
|
+
var resolveArtifactRef = (id) => Effect.gen(function* () {
|
|
480
|
+
const parsed = EID.tryParse(id);
|
|
481
|
+
const candidate = (parsed ? EID.getEntityId(parsed) : void 0) ?? id;
|
|
482
|
+
if (!EntityId.isValid(candidate)) return yield* Effect.fail(/* @__PURE__ */ new Error(`Invalid artifact id: ${id}`));
|
|
483
|
+
const { db } = yield* Database.Service;
|
|
484
|
+
return db.makeRef(EID.make({
|
|
485
|
+
spaceId: db.spaceId,
|
|
486
|
+
entityId: candidate
|
|
487
|
+
}));
|
|
488
|
+
});
|
|
489
|
+
/**
|
|
490
|
+
* Renders a sub-agent result for inclusion in a notification message.
|
|
491
|
+
*/
|
|
492
|
+
var formatResult = (value) => typeof value === "string" ? value : JSON.stringify(value);
|
|
493
|
+
/**
|
|
494
|
+
* Extracts artifact ids a sub-agent reported in its result (see the synthesized instructions
|
|
495
|
+
* instructions). Tolerates the result being a string, or an object with `artifactIds`/`artifactId`.
|
|
496
|
+
*/
|
|
497
|
+
var extractArtifactIds = (value) => {
|
|
498
|
+
if (typeof value !== "object" || value === null) return [];
|
|
499
|
+
const record = value;
|
|
500
|
+
return (Array.isArray(record.artifactIds) ? record.artifactIds : typeof record.artifactId === "string" ? [record.artifactId] : []).filter((id) => typeof id === "string");
|
|
501
|
+
};
|
|
502
|
+
/**
|
|
503
|
+
* The durable agent tasks awaiting a sub-agent for this conversation: in-progress children of the
|
|
504
|
+
* working outline's task set whose assignee is an agent. Ordinary checklist items (markdown) are
|
|
505
|
+
* never spawned — delegation happens only through the promotion the delegate-task tool performs.
|
|
506
|
+
*/
|
|
507
|
+
var findPendingTasks = (chat, activeIds) => Effect.gen(function* () {
|
|
508
|
+
const outlineRef = peekOutlineRef(chat);
|
|
509
|
+
const outline = outlineRef ? yield* Database.load(outlineRef).pipe(Effect.orElseSucceed(() => void 0)) : void 0;
|
|
510
|
+
const taskSet = outline?.taskSet ? yield* Database.load(outline.taskSet).pipe(Effect.orElseSucceed(() => void 0)) : void 0;
|
|
511
|
+
if (!taskSet) return [];
|
|
512
|
+
return (yield* Database.query(Query.select(Filter.id(taskSet.id)).children()).run.pipe(Effect.orElseSucceed(() => []))).filter((child) => Obj.instanceOf(Task.Task, child) && child.assignee?.role === "assistant" && child.status === "in-progress" && !activeIds.has(child.id));
|
|
513
|
+
});
|
|
514
|
+
/**
|
|
515
|
+
* Supervisor behaviour for the conversational agent: after each turn, every in-progress agent
|
|
516
|
+
* task not already running is run by a sub-agent (a synthesized minimal `Routine` executed via
|
|
517
|
+
* `RunInstructions`); on completion the task status is updated, the checklist line is checked
|
|
518
|
+
* off, and a templated message is posted back to the conversation.
|
|
519
|
+
*/
|
|
520
|
+
var makeDelegationStrategy = () => ({
|
|
521
|
+
reconcile: (feed, activeIds) => Effect.gen(function* () {
|
|
522
|
+
const chat = yield* findChatForFeed(feed);
|
|
523
|
+
if (!chat) return [];
|
|
524
|
+
const pending = yield* findPendingTasks(chat, activeIds);
|
|
525
|
+
if (pending.length === 0) return [];
|
|
526
|
+
const skills = (yield* Effect.gen(function* () {
|
|
527
|
+
const runtime = yield* Effect.runtime();
|
|
528
|
+
return (yield* EffectEx.acquireReleaseResource(() => new AiContext.Binder({
|
|
529
|
+
feed,
|
|
530
|
+
runtime
|
|
531
|
+
}))).getSkills().filter((skill) => Obj.getMeta(skill).key !== skill$7.key);
|
|
532
|
+
}).pipe(Effect.scoped)).map((skill) => Ref.make(skill));
|
|
533
|
+
const delegations = [];
|
|
534
|
+
for (const task of pending) {
|
|
535
|
+
const instructions = yield* Database.add(Instructions.make({
|
|
536
|
+
name: task.title,
|
|
537
|
+
text: trim`
|
|
538
|
+
Complete the following task and report the result concisely.
|
|
539
|
+
|
|
540
|
+
If you create any documents or artifacts, call completeJob with a JSON object of the
|
|
541
|
+
form { "summary": string, "artifactIds": string[] }, where artifactIds are the exact
|
|
542
|
+
ids returned by the tools that created them. Otherwise return a short summary string.
|
|
543
|
+
|
|
544
|
+
Task: ${task.title}
|
|
545
|
+
`,
|
|
546
|
+
skills
|
|
547
|
+
}));
|
|
548
|
+
delegations.push({
|
|
549
|
+
id: task.id,
|
|
550
|
+
spawn: Effect.gen(function* () {
|
|
551
|
+
return (yield* (yield* ProcessManager.ProcessOperationInvoker.Service).invokeFiber(RunInstructions, {
|
|
552
|
+
instructions: Ref.make(instructions),
|
|
553
|
+
input: {}
|
|
554
|
+
})).pid;
|
|
555
|
+
})
|
|
556
|
+
});
|
|
557
|
+
}
|
|
558
|
+
return delegations;
|
|
559
|
+
}),
|
|
560
|
+
onComplete: (feed, id, exit) => Effect.gen(function* () {
|
|
561
|
+
const chat = yield* findChatForFeed(feed);
|
|
562
|
+
const agent = chat ? yield* loadForChat(chat) : void 0;
|
|
563
|
+
let title = id;
|
|
564
|
+
const task = (yield* Database.query(Query.select(Filter.id(id))).run.pipe(Effect.orElseSucceed(() => []))).find((candidate) => Obj.instanceOf(Task.Task, candidate));
|
|
565
|
+
if (task) {
|
|
566
|
+
Obj.update(task, (task) => {
|
|
567
|
+
task.status = Exit.isSuccess(exit) ? "done" : "failed";
|
|
568
|
+
});
|
|
569
|
+
title = task.title;
|
|
570
|
+
if (chat && Exit.isSuccess(exit)) {
|
|
571
|
+
const outlineRef = peekOutlineRef(chat);
|
|
572
|
+
const outline = outlineRef ? yield* Database.load(outlineRef).pipe(Effect.orElseSucceed(() => void 0)) : void 0;
|
|
573
|
+
const text = outline ? yield* Database.load(outline.content).pipe(Effect.orElseSucceed(() => void 0)) : void 0;
|
|
574
|
+
if (text) Obj.update(text, (text) => {
|
|
575
|
+
text.content = Outline.upsertChecklistItems(text.content, [{
|
|
576
|
+
title: task.title,
|
|
577
|
+
done: true
|
|
578
|
+
}]);
|
|
579
|
+
});
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
const artifactRefs = [];
|
|
583
|
+
if (agent && Exit.isSuccess(exit)) for (const artifactId of extractArtifactIds(exit.value)) {
|
|
584
|
+
const ref = yield* resolveArtifactRef(artifactId).pipe(Effect.orElseSucceed(() => void 0));
|
|
585
|
+
if (ref) artifactRefs.push(ref);
|
|
586
|
+
}
|
|
587
|
+
const failureCause = Exit.isFailure(exit) ? Cause.pretty(exit.cause) : void 0;
|
|
588
|
+
if (failureCause) log.warn("sub-agent failed", {
|
|
589
|
+
taskId: id,
|
|
590
|
+
title,
|
|
591
|
+
cause: failureCause
|
|
592
|
+
}, {
|
|
593
|
+
"~LogMeta": "~LogMeta",
|
|
594
|
+
F: __dxlog_file,
|
|
595
|
+
L: 238,
|
|
596
|
+
S: this
|
|
597
|
+
});
|
|
598
|
+
const blocks = [{
|
|
599
|
+
_tag: "text",
|
|
600
|
+
text: Exit.isSuccess(exit) ? `The sub-agent completed "${title}".${artifactRefs.length === 0 ? ` ${formatResult(exit.value)}` : ""}` : `The sub-agent failed to complete "${title}": ${failureCause ?? "unknown error"}`
|
|
601
|
+
}, ...artifactRefs.map((reference) => ({
|
|
602
|
+
_tag: "reference",
|
|
603
|
+
reference
|
|
604
|
+
}))];
|
|
605
|
+
yield* Feed.append(feed, [Message.make({
|
|
606
|
+
sender: "assistant",
|
|
607
|
+
blocks
|
|
608
|
+
})]);
|
|
609
|
+
})
|
|
610
|
+
});
|
|
611
|
+
//#endregion
|
|
612
|
+
export { Agent_exports as Agent, AgentHandlers, skill as AgentSkill, AgentSkillHandlers, definitions_exports as AgentSkillOperations, AgentWizardHandlers, definitions_exports$1 as AgentWizardOperations, skill$1 as AgentWizardSkill, AlarmHandlers, definitions_exports$2 as AlarmOperations, skill$2 as AlarmSkill, skill$3 as AutomationSkill, skill$4 as BrowserSkill, Chat_exports as Chat, skill$5 as ConnectorsSkill, DatabaseHandlers, definitions_exports$3 as DatabaseOperations, skill$6 as DatabaseSkill, DelegationHandlers, delegate_task_exports as DelegationOperations, skill$7 as DelegationSkill, DiscordHandlers, definitions_exports$4 as DiscordOperations, skill$8 as DiscordSkill, LinearHandlers, definitions_exports$5 as LinearOperations, skill$9 as LinearSkill, McpServer_exports as McpServer, Memory_exports as Memory, MemoryHandlers, definitions_exports$6 as MemoryOperations, skill$10 as MemorySkill, PlanningHandlers, definitions_exports$7 as PlanningOperations, skill$11 as PlanningSkill, ProjectHandlers, definitions_exports$8 as ProjectOperations, skill$12 as ProjectSkill, RunInstructions, SkillManagerHandlers, definitions_exports$9 as SkillManagerOperations, skill$13 as SkillManagerSkill, WebSearchHandlers, definitions_exports$10 as WebSearchOperations, skill$14 as WebSearchSkill, WebSearchToolkit, WebSearchToolkitOpaque, makeDelegationStrategy, syncObjects };
|
|
613
|
+
|
|
614
|
+
//# sourceMappingURL=index.mjs.map
|