@rubytech/create-maxy-code 0.1.94 → 0.1.95
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/package.json +1 -1
- package/payload/platform/plugins/.claude-plugin/marketplace.json +0 -5
- package/payload/platform/plugins/admin/PLUGIN.md +1 -0
- package/payload/platform/plugins/cloudflare/.claude-plugin/plugin.json +0 -9
- package/payload/platform/plugins/cloudflare/PLUGIN.md +1 -0
- package/payload/platform/plugins/contacts/PLUGIN.md +1 -0
- package/payload/platform/plugins/email/PLUGIN.md +1 -0
- package/payload/platform/plugins/memory/PLUGIN.md +1 -0
- package/payload/platform/plugins/outlook/PLUGIN.md +1 -0
- package/payload/platform/plugins/replicate/PLUGIN.md +1 -0
- package/payload/platform/plugins/scheduling/PLUGIN.md +1 -0
- package/payload/platform/plugins/telegram/PLUGIN.md +1 -0
- package/payload/platform/plugins/waitlist/PLUGIN.md +1 -0
- package/payload/platform/plugins/whatsapp/.claude-plugin/plugin.json +0 -9
- package/payload/platform/plugins/whatsapp/PLUGIN.md +1 -0
- package/payload/platform/plugins/whatsapp/mcp/dist/__tests__/boot-without-env.test.d.ts +2 -0
- package/payload/platform/plugins/whatsapp/mcp/dist/__tests__/boot-without-env.test.d.ts.map +1 -0
- package/payload/platform/plugins/whatsapp/mcp/dist/__tests__/boot-without-env.test.js +58 -0
- package/payload/platform/plugins/whatsapp/mcp/dist/__tests__/boot-without-env.test.js.map +1 -0
- package/payload/platform/plugins/whatsapp/mcp/dist/index.js +34 -17
- package/payload/platform/plugins/whatsapp/mcp/dist/index.js.map +1 -1
- package/payload/platform/plugins/whatsapp/mcp/package.json +4 -2
- package/payload/platform/plugins/whatsapp/mcp/vitest.config.ts +9 -0
- package/payload/platform/plugins/work/PLUGIN.md +1 -0
- package/payload/platform/plugins/workflows/PLUGIN.md +1 -0
- package/payload/platform/scripts/smoke-boot-services.sh +59 -0
- package/payload/platform/services/claude-session-manager/dist/fs-watcher.d.ts +1 -1
- package/payload/platform/services/claude-session-manager/dist/fs-watcher.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/fs-watcher.js +20 -9
- package/payload/platform/services/claude-session-manager/dist/fs-watcher.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/http-server.d.ts +1 -0
- package/payload/platform/services/claude-session-manager/dist/http-server.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/http-server.js +31 -4
- package/payload/platform/services/claude-session-manager/dist/http-server.js.map +1 -1
- package/payload/premium-plugins/real-agent/plugins/.claude-plugin/marketplace.json +0 -5
- package/payload/premium-plugins/real-agent/plugins/loop/.claude-plugin/plugin.json +0 -9
- package/payload/premium-plugins/real-agent/plugins/loop/PLUGIN.md +1 -0
- package/payload/premium-plugins/real-agent/plugins/property-data/.claude-plugin/plugin.json +0 -9
- package/payload/premium-plugins/real-agent/plugins/property-data/PLUGIN.md +1 -0
- package/payload/server/public/assets/admin-DXD9jJUJ.js +217 -0
- package/payload/server/public/assets/{data-BK4r8Dqy.js → data-z5dFDssI.js} +1 -1
- package/payload/server/public/assets/{graph-Cb6A8Hhs.js → graph-Cx_4VRyf.js} +1 -1
- package/payload/server/public/assets/graph-labels-CwGbP2gZ.js +1 -0
- package/payload/server/public/assets/{page-BeYR_GI2.js → page-CMT9_HHT.js} +1 -1
- package/payload/server/public/assets/{page-DVNp-Dfy.js → page-rWmmqIUu.js} +2 -2
- package/payload/server/public/data.html +3 -3
- package/payload/server/public/graph.html +3 -3
- package/payload/server/public/index.html +4 -4
- package/payload/platform/plugins/real-agency/plugins/.claude-plugin/marketplace.json +0 -13
- package/payload/platform/plugins/real-agency/plugins/loop/.claude-plugin/plugin.json +0 -17
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/index.d.ts +0 -2
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/index.d.ts.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/index.js +0 -293
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/index.js.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/crypto.d.ts +0 -10
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/crypto.d.ts.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/crypto.js +0 -88
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/crypto.js.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/loop-api.d.ts +0 -82
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/loop-api.d.ts.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/loop-api.js +0 -427
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/loop-api.js.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/neo4j.d.ts +0 -5
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/neo4j.d.ts.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/neo4j.js +0 -40
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/neo4j.js.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/customer-preferences.d.ts +0 -10
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/customer-preferences.d.ts.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/customer-preferences.js +0 -24
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/customer-preferences.js.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/feedback.d.ts +0 -16
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/feedback.d.ts.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/feedback.js +0 -35
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/feedback.js.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-deregister.d.ts +0 -5
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-deregister.d.ts.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-deregister.js +0 -19
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-deregister.js.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-list.d.ts +0 -4
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-list.d.ts.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-list.js +0 -14
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-list.js.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-register.d.ts +0 -9
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-register.d.ts.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-register.js +0 -60
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-register.js.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-enquiry.d.ts +0 -13
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-enquiry.d.ts.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-enquiry.js +0 -41
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-enquiry.js.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-batch.d.ts +0 -9
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-batch.d.ts.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-batch.js +0 -16
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-batch.js.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-request.d.ts +0 -15
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-request.d.ts.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-request.js +0 -11
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-request.js.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match.d.ts +0 -10
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match.d.ts.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match.js +0 -39
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match.js.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/people-detail.d.ts +0 -9
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/people-detail.d.ts.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/people-detail.js +0 -125
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/people-detail.js.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/people-search.d.ts +0 -18
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/people-search.d.ts.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/people-search.js +0 -87
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/people-search.js.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-detail.d.ts +0 -10
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-detail.d.ts.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-detail.js +0 -82
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-detail.js.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-listed.d.ts +0 -12
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-listed.d.ts.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-listed.js +0 -32
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-listed.js.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-request.d.ts +0 -15
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-request.d.ts.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-request.js +0 -11
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-request.js.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-search.d.ts +0 -16
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-search.d.ts.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-search.js +0 -41
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-search.js.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/supplier.d.ts +0 -13
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/supplier.d.ts.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/supplier.js +0 -49
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/supplier.js.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/team-availability.d.ts +0 -7
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/team-availability.d.ts.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/team-availability.js +0 -19
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/team-availability.js.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/team-info.d.ts +0 -5
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/team-info.d.ts.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/team-info.js +0 -32
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/team-info.js.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-create.d.ts +0 -14
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-create.d.ts.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-create.js +0 -11
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-create.js.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-detail.d.ts +0 -9
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-detail.d.ts.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-detail.js +0 -85
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-detail.js.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-search.d.ts +0 -13
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-search.d.ts.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-search.js +0 -44
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-search.js.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-update.d.ts +0 -14
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-update.d.ts.map +0 -1
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-update.js +0 -18
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-update.js.map +0 -1
- package/payload/platform/plugins/tasks/.claude-plugin/plugin.json +0 -17
- package/payload/platform/plugins/tasks/mcp/dist/index.d.ts +0 -2
- package/payload/platform/plugins/tasks/mcp/dist/index.d.ts.map +0 -1
- package/payload/platform/plugins/tasks/mcp/dist/index.js +0 -543
- package/payload/platform/plugins/tasks/mcp/dist/index.js.map +0 -1
- package/payload/platform/plugins/tasks/mcp/dist/lib/embeddings.d.ts +0 -7
- package/payload/platform/plugins/tasks/mcp/dist/lib/embeddings.d.ts.map +0 -1
- package/payload/platform/plugins/tasks/mcp/dist/lib/embeddings.js +0 -24
- package/payload/platform/plugins/tasks/mcp/dist/lib/embeddings.js.map +0 -1
- package/payload/platform/plugins/tasks/mcp/dist/lib/neo4j.d.ts +0 -5
- package/payload/platform/plugins/tasks/mcp/dist/lib/neo4j.d.ts.map +0 -1
- package/payload/platform/plugins/tasks/mcp/dist/lib/neo4j.js +0 -40
- package/payload/platform/plugins/tasks/mcp/dist/lib/neo4j.js.map +0 -1
- package/payload/platform/plugins/tasks/mcp/dist/tools/project-complete.d.ts +0 -17
- package/payload/platform/plugins/tasks/mcp/dist/tools/project-complete.d.ts.map +0 -1
- package/payload/platform/plugins/tasks/mcp/dist/tools/project-complete.js +0 -76
- package/payload/platform/plugins/tasks/mcp/dist/tools/project-complete.js.map +0 -1
- package/payload/platform/plugins/tasks/mcp/dist/tools/project-create.d.ts +0 -29
- package/payload/platform/plugins/tasks/mcp/dist/tools/project-create.d.ts.map +0 -1
- package/payload/platform/plugins/tasks/mcp/dist/tools/project-create.js +0 -235
- package/payload/platform/plugins/tasks/mcp/dist/tools/project-create.js.map +0 -1
- package/payload/platform/plugins/tasks/mcp/dist/tools/project-get.d.ts +0 -40
- package/payload/platform/plugins/tasks/mcp/dist/tools/project-get.d.ts.map +0 -1
- package/payload/platform/plugins/tasks/mcp/dist/tools/project-get.js +0 -125
- package/payload/platform/plugins/tasks/mcp/dist/tools/project-get.js.map +0 -1
- package/payload/platform/plugins/tasks/mcp/dist/tools/project-list.d.ts +0 -26
- package/payload/platform/plugins/tasks/mcp/dist/tools/project-list.d.ts.map +0 -1
- package/payload/platform/plugins/tasks/mcp/dist/tools/project-list.js +0 -81
- package/payload/platform/plugins/tasks/mcp/dist/tools/project-list.js.map +0 -1
- package/payload/platform/plugins/tasks/mcp/dist/tools/project-update.d.ts +0 -19
- package/payload/platform/plugins/tasks/mcp/dist/tools/project-update.d.ts.map +0 -1
- package/payload/platform/plugins/tasks/mcp/dist/tools/project-update.js +0 -102
- package/payload/platform/plugins/tasks/mcp/dist/tools/project-update.js.map +0 -1
- package/payload/platform/plugins/tasks/mcp/dist/tools/session-list.d.ts +0 -20
- package/payload/platform/plugins/tasks/mcp/dist/tools/session-list.d.ts.map +0 -1
- package/payload/platform/plugins/tasks/mcp/dist/tools/session-list.js +0 -37
- package/payload/platform/plugins/tasks/mcp/dist/tools/session-list.js.map +0 -1
- package/payload/platform/plugins/tasks/mcp/dist/tools/session-name.d.ts +0 -12
- package/payload/platform/plugins/tasks/mcp/dist/tools/session-name.d.ts.map +0 -1
- package/payload/platform/plugins/tasks/mcp/dist/tools/session-name.js +0 -28
- package/payload/platform/plugins/tasks/mcp/dist/tools/session-name.js.map +0 -1
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-complete.d.ts +0 -16
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-complete.d.ts.map +0 -1
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-complete.js +0 -33
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-complete.js.map +0 -1
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-create.d.ts +0 -63
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-create.d.ts.map +0 -1
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-create.js +0 -141
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-create.js.map +0 -1
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-get.d.ts +0 -19
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-get.d.ts.map +0 -1
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-get.js +0 -51
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-get.js.map +0 -1
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-list.d.ts +0 -18
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-list.d.ts.map +0 -1
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-list.js +0 -66
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-list.js.map +0 -1
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-ready.d.ts +0 -21
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-ready.d.ts.map +0 -1
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-ready.js +0 -54
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-ready.js.map +0 -1
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-relate.d.ts +0 -12
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-relate.d.ts.map +0 -1
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-relate.js +0 -59
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-relate.js.map +0 -1
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-update.d.ts +0 -32
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-update.d.ts.map +0 -1
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-update.js +0 -112
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-update.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/.claude-plugin/marketplace.json +0 -13
- package/payload/premium-plugins/real-agency/plugins/loop/.claude-plugin/plugin.json +0 -17
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/index.d.ts +0 -2
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/index.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/index.js +0 -293
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/index.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/lib/crypto.d.ts +0 -10
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/lib/crypto.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/lib/crypto.js +0 -88
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/lib/crypto.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/lib/loop-api.d.ts +0 -82
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/lib/loop-api.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/lib/loop-api.js +0 -427
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/lib/loop-api.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/lib/neo4j.d.ts +0 -5
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/lib/neo4j.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/lib/neo4j.js +0 -40
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/lib/neo4j.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/customer-preferences.d.ts +0 -10
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/customer-preferences.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/customer-preferences.js +0 -24
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/customer-preferences.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/feedback.d.ts +0 -16
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/feedback.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/feedback.js +0 -35
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/feedback.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/key-deregister.d.ts +0 -5
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/key-deregister.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/key-deregister.js +0 -19
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/key-deregister.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/key-list.d.ts +0 -4
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/key-list.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/key-list.js +0 -14
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/key-list.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/key-register.d.ts +0 -9
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/key-register.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/key-register.js +0 -60
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/key-register.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-enquiry.d.ts +0 -13
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-enquiry.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-enquiry.js +0 -41
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-enquiry.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-batch.d.ts +0 -9
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-batch.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-batch.js +0 -16
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-batch.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-request.d.ts +0 -15
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-request.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-request.js +0 -11
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-request.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match.d.ts +0 -10
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match.js +0 -39
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/people-detail.d.ts +0 -9
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/people-detail.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/people-detail.js +0 -125
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/people-detail.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/people-search.d.ts +0 -18
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/people-search.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/people-search.js +0 -87
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/people-search.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-detail.d.ts +0 -10
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-detail.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-detail.js +0 -82
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-detail.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-listed.d.ts +0 -12
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-listed.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-listed.js +0 -32
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-listed.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-request.d.ts +0 -15
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-request.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-request.js +0 -11
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-request.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-search.d.ts +0 -16
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-search.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-search.js +0 -41
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-search.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/supplier.d.ts +0 -13
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/supplier.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/supplier.js +0 -49
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/supplier.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/team-availability.d.ts +0 -7
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/team-availability.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/team-availability.js +0 -19
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/team-availability.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/team-info.d.ts +0 -5
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/team-info.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/team-info.js +0 -32
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/team-info.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-create.d.ts +0 -14
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-create.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-create.js +0 -11
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-create.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-detail.d.ts +0 -9
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-detail.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-detail.js +0 -85
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-detail.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-search.d.ts +0 -13
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-search.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-search.js +0 -44
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-search.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-update.d.ts +0 -14
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-update.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-update.js +0 -18
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-update.js.map +0 -1
- package/payload/premium-plugins/real-agent/plugins/epc/.claude-plugin/plugin.json +0 -17
- package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/index.d.ts +0 -2
- package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/index.d.ts.map +0 -1
- package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/index.js +0 -117
- package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/index.js.map +0 -1
- package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/lib/crypto.d.ts +0 -3
- package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/lib/crypto.d.ts.map +0 -1
- package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/lib/crypto.js +0 -72
- package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/lib/crypto.js.map +0 -1
- package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/lib/epc-api.d.ts +0 -60
- package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/lib/epc-api.d.ts.map +0 -1
- package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/lib/epc-api.js +0 -181
- package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/lib/epc-api.js.map +0 -1
- package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/lib/file-crypto.d.ts +0 -3
- package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/lib/file-crypto.d.ts.map +0 -1
- package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/lib/file-crypto.js +0 -49
- package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/lib/file-crypto.js.map +0 -1
- package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/lib/key-store.d.ts +0 -15
- package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/lib/key-store.d.ts.map +0 -1
- package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/lib/key-store.js +0 -130
- package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/lib/key-store.js.map +0 -1
- package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/lib/neo4j.d.ts +0 -5
- package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/lib/neo4j.d.ts.map +0 -1
- package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/lib/neo4j.js +0 -38
- package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/lib/neo4j.js.map +0 -1
- package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/tools/key-deregister.d.ts +0 -4
- package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/tools/key-deregister.d.ts.map +0 -1
- package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/tools/key-deregister.js +0 -9
- package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/tools/key-deregister.js.map +0 -1
- package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/tools/key-list.d.ts +0 -4
- package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/tools/key-list.d.ts.map +0 -1
- package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/tools/key-list.js +0 -10
- package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/tools/key-list.js.map +0 -1
- package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/tools/key-register.d.ts +0 -5
- package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/tools/key-register.d.ts.map +0 -1
- package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/tools/key-register.js +0 -36
- package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/tools/key-register.js.map +0 -1
- package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/tools/lookup.d.ts +0 -10
- package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/tools/lookup.d.ts.map +0 -1
- package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/tools/lookup.js +0 -30
- package/payload/premium-plugins/real-agent/plugins/epc/mcp/dist/tools/lookup.js.map +0 -1
- package/payload/server/public/assets/admin-ux6TKHS1.js +0 -217
- package/payload/server/public/assets/graph-labels-DCsUNtnE.js +0 -1
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import neo4j from "neo4j-driver";
|
|
2
|
-
import { readFileSync } from "node:fs";
|
|
3
|
-
import { resolve } from "node:path";
|
|
4
|
-
let driver = null;
|
|
5
|
-
function readPassword() {
|
|
6
|
-
if (process.env.NEO4J_PASSWORD)
|
|
7
|
-
return process.env.NEO4J_PASSWORD;
|
|
8
|
-
const passwordFile = resolve(process.env.PLATFORM_ROOT ?? resolve(import.meta.dirname, "../../../.."), "config/.neo4j-password");
|
|
9
|
-
try {
|
|
10
|
-
return readFileSync(passwordFile, "utf-8").trim();
|
|
11
|
-
}
|
|
12
|
-
catch {
|
|
13
|
-
throw new Error(`Neo4j password not found. Expected at ${passwordFile} or in NEO4J_PASSWORD env var.`);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
export function getDriver() {
|
|
17
|
-
if (!driver) {
|
|
18
|
-
// NEO4J_URI must be explicit. Silent default to:7687 was the
|
|
19
|
-
// vector for the orphan data in Maxy's DB from a realagent install.
|
|
20
|
-
const uri = process.env.NEO4J_URI;
|
|
21
|
-
if (!uri) {
|
|
22
|
-
throw new Error("[tasks] NEO4J_URI unset — refusing to default to bolt://localhost:7687");
|
|
23
|
-
}
|
|
24
|
-
const user = process.env.NEO4J_USER ?? "neo4j";
|
|
25
|
-
const password = readPassword();
|
|
26
|
-
console.error(`[tasks] resolved neo4j_uri=${uri}`);
|
|
27
|
-
driver = neo4j.driver(uri, neo4j.auth.basic(user, password));
|
|
28
|
-
}
|
|
29
|
-
return driver;
|
|
30
|
-
}
|
|
31
|
-
export function getSession() {
|
|
32
|
-
return getDriver().session();
|
|
33
|
-
}
|
|
34
|
-
export async function closeDriver() {
|
|
35
|
-
if (driver) {
|
|
36
|
-
await driver.close();
|
|
37
|
-
driver = null;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
//# sourceMappingURL=neo4j.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"neo4j.js","sourceRoot":"","sources":["../../src/lib/neo4j.ts"],"names":[],"mappings":"AAAA,OAAO,KAA0B,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,IAAI,MAAM,GAAkB,IAAI,CAAC;AAEjC,SAAS,YAAY;IACnB,IAAI,OAAO,CAAC,GAAG,CAAC,cAAc;QAAE,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,CAAC;AACH,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export interface ProjectCompleteParams {
|
|
2
|
-
projectId: string;
|
|
3
|
-
accountId: string;
|
|
4
|
-
note?: string;
|
|
5
|
-
}
|
|
6
|
-
export interface ProjectCompleteResult {
|
|
7
|
-
projectId: string;
|
|
8
|
-
completedTasks: number;
|
|
9
|
-
totalTasks: number;
|
|
10
|
-
incompleteChildren: Array<{
|
|
11
|
-
taskId: string;
|
|
12
|
-
name: string;
|
|
13
|
-
status: string;
|
|
14
|
-
}>;
|
|
15
|
-
}
|
|
16
|
-
export declare function projectComplete(params: ProjectCompleteParams): Promise<ProjectCompleteResult>;
|
|
17
|
-
//# sourceMappingURL=project-complete.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"project-complete.d.ts","sourceRoot":"","sources":["../../src/tools/project-complete.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,EAAE,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC7E;AAED,wBAAsB,eAAe,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAwFnG"}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { getSession } from "../lib/neo4j.js";
|
|
2
|
-
import { computeEmbedding } from "../lib/embeddings.js";
|
|
3
|
-
export async function projectComplete(params) {
|
|
4
|
-
const { projectId, accountId, note } = params;
|
|
5
|
-
const session = getSession();
|
|
6
|
-
try {
|
|
7
|
-
// Fetch the project and its children
|
|
8
|
-
const projectResult = await session.run(`MATCH (p:Project {taskId: $projectId, accountId: $accountId})
|
|
9
|
-
OPTIONAL MATCH (p)-[:HAS_TASK]->(child:Task)
|
|
10
|
-
RETURN p,
|
|
11
|
-
collect({taskId: child.taskId, name: child.name, status: child.status}) AS children`, { projectId, accountId });
|
|
12
|
-
if (projectResult.records.length === 0) {
|
|
13
|
-
throw new Error(`ProjectNotFound: ${projectId}`);
|
|
14
|
-
}
|
|
15
|
-
const rec = projectResult.records[0];
|
|
16
|
-
const p = rec.get("p").properties;
|
|
17
|
-
const children = rec.get("children")
|
|
18
|
-
.filter((c) => c.taskId !== null);
|
|
19
|
-
const totalTasks = children.length;
|
|
20
|
-
const completedTasks = children.filter((c) => c.status === "completed" || c.status === "cancelled").length;
|
|
21
|
-
const incompleteChildren = children
|
|
22
|
-
.filter((c) => c.status !== "completed" && c.status !== "cancelled")
|
|
23
|
-
.map((c) => ({ taskId: c.taskId, name: c.name, status: c.status }));
|
|
24
|
-
// Build completion note
|
|
25
|
-
const now = new Date().toISOString();
|
|
26
|
-
const timestamp = now.slice(0, 16).replace("T", " ");
|
|
27
|
-
const deferred = incompleteChildren.length;
|
|
28
|
-
const completionNote = `[${timestamp}] [PROJECT:COMPLETE] ${p.name} — ${completedTasks}/${totalTasks} tasks, ${deferred} deferred`;
|
|
29
|
-
const userNote = note ? `\n[${timestamp}] ${note}` : "";
|
|
30
|
-
const currentNotes = p.notes ?? "";
|
|
31
|
-
const newNotes = currentNotes
|
|
32
|
-
? `${currentNotes}\n${completionNote}${userNote}`
|
|
33
|
-
: `${completionNote}${userNote}`;
|
|
34
|
-
// Re-embed
|
|
35
|
-
const embeddingText = `Project: ${p.name} — ${p.description} tier: ${p.tier} status: completed ${newNotes}`;
|
|
36
|
-
const embedding = await computeEmbedding(embeddingText);
|
|
37
|
-
const setClauses = [
|
|
38
|
-
"p.status = 'completed'",
|
|
39
|
-
"p.phase = 'complete'",
|
|
40
|
-
"p.notes = $notes",
|
|
41
|
-
"p.updatedAt = $updatedAt",
|
|
42
|
-
];
|
|
43
|
-
const queryParams = {
|
|
44
|
-
projectId,
|
|
45
|
-
accountId,
|
|
46
|
-
notes: newNotes,
|
|
47
|
-
updatedAt: now,
|
|
48
|
-
};
|
|
49
|
-
if (embedding.length > 0) {
|
|
50
|
-
setClauses.push("p.embedding = $embedding");
|
|
51
|
-
queryParams.embedding = embedding;
|
|
52
|
-
}
|
|
53
|
-
await session.run(`MATCH (p:Project {taskId: $projectId, accountId: $accountId})
|
|
54
|
-
SET ${setClauses.join(", ")}`, queryParams);
|
|
55
|
-
console.error(`project-complete: ${projectId} completed, ${completedTasks}/${totalTasks} done, ${deferred} incomplete`);
|
|
56
|
-
return {
|
|
57
|
-
projectId,
|
|
58
|
-
completedTasks,
|
|
59
|
-
totalTasks,
|
|
60
|
-
incompleteChildren,
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
catch (err) {
|
|
64
|
-
if (err instanceof Error && err.message.startsWith("ProjectNotFound:")) {
|
|
65
|
-
console.error(`project-complete: failed — ${err.message}`);
|
|
66
|
-
}
|
|
67
|
-
else {
|
|
68
|
-
console.error(`project-complete: failed — ${err instanceof Error ? err.message : String(err)}`);
|
|
69
|
-
}
|
|
70
|
-
throw err;
|
|
71
|
-
}
|
|
72
|
-
finally {
|
|
73
|
-
await session.close();
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
//# sourceMappingURL=project-complete.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"project-complete.js","sourceRoot":"","sources":["../../src/tools/project-complete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAexD,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,MAA6B;IACjE,MAAM,EAAE,SAAS,EAAE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;QACpC,CAAC;QAED,MAAM,OAAO,CAAC,GAAG,CACf;aACO,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAC9B,WAAW,CACZ,CAAC;QAEF,OAAO,CAAC,KAAK,CAAC,qBAAqB,SAAS,eAAe,cAAc,IAAI,UAAU,UAAU,QAAQ,aAAa,CAAC,CAAC;QAExH,OAAO;YACL,SAAS;YACT,cAAc;YACd,UAAU;YACV,kBAAkB;SACnB,CAAC;IACJ,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAI,GAAG,YAAY,KAAK,IAAI,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,kBAAkB,CAAC,EAAE,CAAC;YACvE,OAAO,CAAC,KAAK,CAAC,8BAA8B,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;QAC7D,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,KAAK,CAAC,8BAA8B,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAClG,CAAC;QACD,MAAM,GAAG,CAAC;IACZ,CAAC;YAAS,CAAC;QACT,MAAM,OAAO,CAAC,KAAK,EAAE,CAAC;IACxB,CAAC;AACH,CAAC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { type CreatedBy } from "../../../../../lib/graph-write/dist/index.js";
|
|
2
|
-
export interface WorkItem {
|
|
3
|
-
name: string;
|
|
4
|
-
description: string;
|
|
5
|
-
priority?: "low" | "normal" | "high" | "urgent";
|
|
6
|
-
dueDate?: string;
|
|
7
|
-
/** Indices of other workItems this item blocks */
|
|
8
|
-
blocks?: number[];
|
|
9
|
-
}
|
|
10
|
-
export interface ProjectCreateParams {
|
|
11
|
-
accountId: string;
|
|
12
|
-
name: string;
|
|
13
|
-
description: string;
|
|
14
|
-
tier: "quick" | "standard" | "full";
|
|
15
|
-
clientRef?: string;
|
|
16
|
-
targetDate?: string;
|
|
17
|
-
dueDate?: string;
|
|
18
|
-
raisedBy?: string;
|
|
19
|
-
affects?: string[];
|
|
20
|
-
workItems?: WorkItem[];
|
|
21
|
-
sessionKey?: string;
|
|
22
|
-
createdBy: CreatedBy;
|
|
23
|
-
}
|
|
24
|
-
export interface ProjectCreateResult {
|
|
25
|
-
projectId: string;
|
|
26
|
-
childTaskIds: string[];
|
|
27
|
-
}
|
|
28
|
-
export declare function projectCreate(params: ProjectCreateParams): Promise<ProjectCreateResult>;
|
|
29
|
-
//# sourceMappingURL=project-create.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"project-create.d.ts","sourceRoot":"","sources":["../../src/tools/project-create.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,SAAS,EACf,MAAM,8CAA8C,CAAC;AAEtD,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAC;IAChD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kDAAkD;IAClD,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,OAAO,GAAG,UAAU,GAAG,MAAM,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,SAAS,CAAC;CACtB;AAED,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAkDD,wBAAsB,aAAa,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CA6O7F"}
|
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
import { randomUUID } from "node:crypto";
|
|
2
|
-
import { getDriver } from "../lib/neo4j.js";
|
|
3
|
-
import { computeEmbedding } from "../lib/embeddings.js";
|
|
4
|
-
import { stampCreatedBy, } from "../../../../../lib/graph-write/dist/index.js";
|
|
5
|
-
/**
|
|
6
|
-
* Validates that blocks references form a DAG (no cycles).
|
|
7
|
-
* Uses Kahn's algorithm (topological sort) on the workItems array.
|
|
8
|
-
* Throws ValidationError if cycles detected or indices out of range.
|
|
9
|
-
*/
|
|
10
|
-
function validateBlocks(workItems) {
|
|
11
|
-
const n = workItems.length;
|
|
12
|
-
// Build adjacency list and in-degree array
|
|
13
|
-
const adj = Array.from({ length: n }, () => []);
|
|
14
|
-
const inDegree = new Array(n).fill(0);
|
|
15
|
-
for (let i = 0; i < n; i++) {
|
|
16
|
-
const blocks = workItems[i].blocks;
|
|
17
|
-
if (!blocks)
|
|
18
|
-
continue;
|
|
19
|
-
for (const target of blocks) {
|
|
20
|
-
if (target < 0 || target >= n || !Number.isInteger(target)) {
|
|
21
|
-
throw new Error(`ValidationError: blocks index ${target} out of range (0-${n - 1})`);
|
|
22
|
-
}
|
|
23
|
-
if (target === i) {
|
|
24
|
-
throw new Error(`ValidationError: work item ${i} cannot block itself`);
|
|
25
|
-
}
|
|
26
|
-
// i blocks target → edge from i to target
|
|
27
|
-
adj[i].push(target);
|
|
28
|
-
inDegree[target]++;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
// Kahn's algorithm — process nodes with in-degree 0
|
|
32
|
-
const queue = [];
|
|
33
|
-
for (let i = 0; i < n; i++) {
|
|
34
|
-
if (inDegree[i] === 0)
|
|
35
|
-
queue.push(i);
|
|
36
|
-
}
|
|
37
|
-
let processed = 0;
|
|
38
|
-
while (queue.length > 0) {
|
|
39
|
-
const node = queue.shift();
|
|
40
|
-
processed++;
|
|
41
|
-
for (const neighbor of adj[node]) {
|
|
42
|
-
inDegree[neighbor]--;
|
|
43
|
-
if (inDegree[neighbor] === 0)
|
|
44
|
-
queue.push(neighbor);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
if (processed < n) {
|
|
48
|
-
throw new Error("ValidationError: circular dependency detected in work item blocks");
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
export async function projectCreate(params) {
|
|
52
|
-
const { accountId, name, description, tier, clientRef, targetDate, dueDate, raisedBy, affects, workItems = [], sessionKey, createdBy, } = params;
|
|
53
|
-
// --- Validation ---
|
|
54
|
-
if (workItems.length > 50) {
|
|
55
|
-
throw new Error("ValidationError: workItems exceeds maximum of 50");
|
|
56
|
-
}
|
|
57
|
-
if (workItems.length > 0) {
|
|
58
|
-
validateBlocks(workItems);
|
|
59
|
-
}
|
|
60
|
-
// --- Pre-compute embeddings (outside transaction) ---
|
|
61
|
-
const parentText = `Project: ${name} — ${description} tier: ${tier}`;
|
|
62
|
-
const parentEmbedding = await computeEmbedding(parentText);
|
|
63
|
-
const childEmbeddings = [];
|
|
64
|
-
for (const item of workItems) {
|
|
65
|
-
const text = `Task: ${item.name} — ${item.description} status: pending priority: ${item.priority ?? "normal"}`;
|
|
66
|
-
childEmbeddings.push(await computeEmbedding(text));
|
|
67
|
-
}
|
|
68
|
-
// --- Build node properties ---
|
|
69
|
-
const projectId = randomUUID();
|
|
70
|
-
const now = new Date().toISOString();
|
|
71
|
-
const timestamp = now.slice(0, 16).replace("T", " ");
|
|
72
|
-
const startNote = `[${timestamp}] [PROJECT:START] ${name} — ${tier} tier, ${workItems.length} tasks planned`;
|
|
73
|
-
const rawProjectProps = {
|
|
74
|
-
taskId: projectId,
|
|
75
|
-
accountId,
|
|
76
|
-
name,
|
|
77
|
-
description,
|
|
78
|
-
status: "pending",
|
|
79
|
-
priority: "normal",
|
|
80
|
-
tier,
|
|
81
|
-
phase: "planning",
|
|
82
|
-
notes: startNote,
|
|
83
|
-
createdAt: now,
|
|
84
|
-
updatedAt: now,
|
|
85
|
-
};
|
|
86
|
-
if (clientRef)
|
|
87
|
-
rawProjectProps.clientRef = clientRef;
|
|
88
|
-
if (targetDate)
|
|
89
|
-
rawProjectProps.targetDate = targetDate;
|
|
90
|
-
if (dueDate)
|
|
91
|
-
rawProjectProps.dueDate = dueDate;
|
|
92
|
-
if (parentEmbedding.length > 0)
|
|
93
|
-
rawProjectProps.embedding = parentEmbedding;
|
|
94
|
-
// Write doctrine: flatten provenance onto the node
|
|
95
|
-
// so forensic queries (WHERE n.createdByTool = 'project-create') work.
|
|
96
|
-
// project-create inlines the doctrine instead of routing through
|
|
97
|
-
// writeNodeWithEdges because the outer transaction must encompass
|
|
98
|
-
// child-Task and BLOCKS/RAISED_BY/AFFECTS creation — nested
|
|
99
|
-
// executeWrite is not permitted on a session that already has a
|
|
100
|
-
// managed tx open.
|
|
101
|
-
const projectProps = stampCreatedBy(rawProjectProps, createdBy);
|
|
102
|
-
const childIds = [];
|
|
103
|
-
const childPropsList = [];
|
|
104
|
-
for (let i = 0; i < workItems.length; i++) {
|
|
105
|
-
const item = workItems[i];
|
|
106
|
-
const childId = randomUUID();
|
|
107
|
-
childIds.push(childId);
|
|
108
|
-
const rawChildProps = {
|
|
109
|
-
taskId: childId,
|
|
110
|
-
accountId,
|
|
111
|
-
name: item.name,
|
|
112
|
-
description: item.description,
|
|
113
|
-
status: "pending",
|
|
114
|
-
priority: item.priority ?? "normal",
|
|
115
|
-
createdAt: now,
|
|
116
|
-
updatedAt: now,
|
|
117
|
-
};
|
|
118
|
-
if (item.dueDate)
|
|
119
|
-
rawChildProps.dueDate = item.dueDate;
|
|
120
|
-
if (childEmbeddings[i].length > 0)
|
|
121
|
-
rawChildProps.embedding = childEmbeddings[i];
|
|
122
|
-
// Stamp the same provenance on children. Each child has its own
|
|
123
|
-
// adjacency (HAS_TASK back to the Project) so no per-child
|
|
124
|
-
// pre-resolve is needed — the edge is co-created below.
|
|
125
|
-
childPropsList.push(stampCreatedBy(rawChildProps, createdBy));
|
|
126
|
-
}
|
|
127
|
-
// --- Single transaction: create all nodes and relationships ---
|
|
128
|
-
const driver = getDriver();
|
|
129
|
-
const session = driver.session();
|
|
130
|
-
const tx = session.beginTransaction();
|
|
131
|
-
try {
|
|
132
|
-
// Write doctrine pre-validation: resolve every
|
|
133
|
-
// adjacency source in one UNWIND round-trip BEFORE the Project is
|
|
134
|
-
// created. A Project that has no workItems, no raisedBy, no affects,
|
|
135
|
-
// and no admin-session Conversation is noise — reject loudly per
|
|
136
|
-
// doctrine. This mirrors writeNodeWithEdges' pre-check idiom but
|
|
137
|
-
// stays inside the outer tx so child-Task failures still roll the
|
|
138
|
-
// Project back atomically.
|
|
139
|
-
const candidateIds = [];
|
|
140
|
-
if (raisedBy)
|
|
141
|
-
candidateIds.push(raisedBy);
|
|
142
|
-
if (affects && affects.length > 0)
|
|
143
|
-
candidateIds.push(...affects);
|
|
144
|
-
let resolvedConversationId = null;
|
|
145
|
-
if (sessionKey) {
|
|
146
|
-
const convRes = await tx.run(`MATCH (c:Conversation {sessionKey: $sessionKey, accountId: $accountId})
|
|
147
|
-
RETURN elementId(c) AS id LIMIT 1`, { sessionKey, accountId });
|
|
148
|
-
if (convRes.records.length > 0) {
|
|
149
|
-
resolvedConversationId = convRes.records[0].get("id");
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
if (candidateIds.length > 0) {
|
|
153
|
-
const check = await tx.run(`UNWIND $ids AS id MATCH (t) WHERE elementId(t) = id RETURN collect(id) AS found`, { ids: candidateIds });
|
|
154
|
-
const found = check.records[0].get("found");
|
|
155
|
-
const missing = candidateIds.filter((id) => !found.includes(id));
|
|
156
|
-
if (missing.length > 0) {
|
|
157
|
-
throw new Error(`TargetNotFound: ${missing.length} of ${candidateIds.length} relationship target(s) did not resolve (elementId mismatch): ${missing.join(", ")}`);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
const hasAdjacency = workItems.length > 0 ||
|
|
161
|
-
!!raisedBy ||
|
|
162
|
-
(affects && affects.length > 0) ||
|
|
163
|
-
!!resolvedConversationId;
|
|
164
|
-
if (!hasAdjacency) {
|
|
165
|
-
throw new Error("Write doctrine violated: project-create requires at least one adjacency — pass workItems (≥1), raisedBy, affects, or invoke inside an admin session with an existing Conversation.");
|
|
166
|
-
}
|
|
167
|
-
// Doctrine-satisfying CREATE: adjacency is guaranteed by the
|
|
168
|
-
// pre-validation above. The Project is linked either via HAS_TASK
|
|
169
|
-
// (children below), RAISED_BY/AFFECTS (explicit params), or PART_OF
|
|
170
|
-
// Conversation (session). Within this single tx, intermediate
|
|
171
|
-
// state is not externally observable, so creating the Project
|
|
172
|
-
// first and edges in subsequent statements is safe — the
|
|
173
|
-
// [graph-health] sweep only sees committed state.
|
|
174
|
-
// See .docs/neo4j.md § Write doctrine.
|
|
175
|
-
await tx.run(`CREATE (p:Project:Task $props)`, { props: projectProps });
|
|
176
|
-
// Link to session if the Conversation was resolved above. MATCH not
|
|
177
|
-
// MERGE — a missing Conversation must not spawn an orphan
|
|
178
|
-
// Conversation just to satisfy PART_OF.
|
|
179
|
-
if (resolvedConversationId) {
|
|
180
|
-
await tx.run(`MATCH (p:Project {taskId: $projectId, accountId: $accountId})
|
|
181
|
-
MATCH (c) WHERE elementId(c) = $conversationId
|
|
182
|
-
CREATE (p)-[:PART_OF]->(c)`, { projectId, accountId, conversationId: resolvedConversationId });
|
|
183
|
-
}
|
|
184
|
-
// Create child :Task nodes and HAS_TASK relationships
|
|
185
|
-
for (const childProps of childPropsList) {
|
|
186
|
-
await tx.run(`MATCH (p:Project {taskId: $projectId, accountId: $accountId})
|
|
187
|
-
CREATE (t:Task $childProps)
|
|
188
|
-
CREATE (p)-[:HAS_TASK]->(t)`, { projectId, accountId, childProps });
|
|
189
|
-
}
|
|
190
|
-
// Create BLOCKS relationships between children
|
|
191
|
-
for (let i = 0; i < workItems.length; i++) {
|
|
192
|
-
const blocks = workItems[i].blocks;
|
|
193
|
-
if (!blocks)
|
|
194
|
-
continue;
|
|
195
|
-
for (const target of blocks) {
|
|
196
|
-
await tx.run(`MATCH (blocker:Task {taskId: $blockerId, accountId: $accountId})
|
|
197
|
-
MATCH (blocked:Task {taskId: $blockedId, accountId: $accountId})
|
|
198
|
-
CREATE (blocker)-[:BLOCKS]->(blocked)`, { blockerId: childIds[i], blockedId: childIds[target], accountId });
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
// Create RAISED_BY relationship
|
|
202
|
-
if (raisedBy) {
|
|
203
|
-
const result = await tx.run(`MATCH (p:Project {taskId: $projectId, accountId: $accountId})
|
|
204
|
-
MATCH (person) WHERE elementId(person) = $raisedBy
|
|
205
|
-
CREATE (p)-[:RAISED_BY]->(person)
|
|
206
|
-
RETURN person`, { projectId, accountId, raisedBy });
|
|
207
|
-
if (result.records.length === 0) {
|
|
208
|
-
throw new Error(`TargetNotFound: raisedBy person not found (${raisedBy})`);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
// Create AFFECTS relationships
|
|
212
|
-
if (affects && affects.length > 0) {
|
|
213
|
-
for (const entityId of affects) {
|
|
214
|
-
const result = await tx.run(`MATCH (p:Project {taskId: $projectId, accountId: $accountId})
|
|
215
|
-
MATCH (e) WHERE elementId(e) = $entityId
|
|
216
|
-
CREATE (p)-[:AFFECTS]->(e)
|
|
217
|
-
RETURN e`, { projectId, accountId, entityId });
|
|
218
|
-
if (result.records.length === 0) {
|
|
219
|
-
throw new Error(`TargetNotFound: affects entity not found (${entityId})`);
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
await tx.commit();
|
|
224
|
-
}
|
|
225
|
-
catch (err) {
|
|
226
|
-
await tx.rollback();
|
|
227
|
-
throw err;
|
|
228
|
-
}
|
|
229
|
-
finally {
|
|
230
|
-
await session.close();
|
|
231
|
-
}
|
|
232
|
-
console.error(`project-create: created ${projectId} with ${childIds.length} children, tier=${tier}`);
|
|
233
|
-
return { projectId, childTaskIds: childIds };
|
|
234
|
-
}
|
|
235
|
-
//# sourceMappingURL=project-create.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"project-create.js","sourceRoot":"","sources":["../../src/tools/project-create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EACL,cAAc,GAEf,MAAM,8CAA8C,CAAC;AA+BtD;;;;GAIG;AACH,SAAS,cAAc,CAAC,SAAqB;IAC3C,MAAM,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC;IAC3B,2CAA2C;IAC3C,MAAM,GAAG,GAAe,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;IAC5D,MAAM,QAAQ,GAAG,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAEtC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC3B,MAAM,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;QACnC,IAAI,CAAC,MAAM;YAAE,SAAS;QACtB,KAAK,MAAM,MAAM,IAAI,MAAM,EAAE,CAAC;YAC5B,IAAI,MAAM,GAAG,CAAC,IAAI,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC;gBAC3D,MAAM,IAAI,KAAK,CAAC,iCAA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M,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;oBAChC,MAAM,IAAI,KAAK,CAAC,6CAA6C,QAAQ,GAAG,CAAC,CAAC;gBAC5E,CAAC;YACH,CAAC;QACH,CAAC;QAED,MAAM,EAAE,CAAC,MAAM,EAAE,CAAC;IACpB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC;QACpB,MAAM,GAAG,CAAC;IACZ,CAAC;YAAS,CAAC;QACT,MAAM,OAAO,CAAC,KAAK,EAAE,CAAC;IACxB,CAAC;IAED,OAAO,CAAC,KAAK,CAAC,2BAA2B,SAAS,SAAS,QAAQ,CAAC,MAAM,mBAAmB,IAAI,EAAE,CAAC,CAAC;IACrG,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC;AAC/C,CAAC"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
export interface ChildTaskSummary {
|
|
2
|
-
taskId: string;
|
|
3
|
-
name: string;
|
|
4
|
-
status: string;
|
|
5
|
-
priority: string;
|
|
6
|
-
dueDate?: string;
|
|
7
|
-
blockedBy: string[];
|
|
8
|
-
}
|
|
9
|
-
export interface ProjectHealth {
|
|
10
|
-
signal: "green" | "amber" | "red" | "grey";
|
|
11
|
-
totalTasks: number;
|
|
12
|
-
completedTasks: number;
|
|
13
|
-
overdueTasks: number;
|
|
14
|
-
blockedTasks: number;
|
|
15
|
-
daysSinceLastProgress: number | null;
|
|
16
|
-
}
|
|
17
|
-
export interface ProjectDetail {
|
|
18
|
-
projectId: string;
|
|
19
|
-
name: string;
|
|
20
|
-
description: string;
|
|
21
|
-
tier: string;
|
|
22
|
-
phase: string;
|
|
23
|
-
status: string;
|
|
24
|
-
clientRef?: string;
|
|
25
|
-
targetDate?: string;
|
|
26
|
-
dueDate?: string;
|
|
27
|
-
notes?: string;
|
|
28
|
-
createdAt: string;
|
|
29
|
-
updatedAt: string;
|
|
30
|
-
health: ProjectHealth;
|
|
31
|
-
children: ChildTaskSummary[];
|
|
32
|
-
relationships: Array<{
|
|
33
|
-
type: string;
|
|
34
|
-
targetLabel: string;
|
|
35
|
-
targetId: string;
|
|
36
|
-
targetName?: string;
|
|
37
|
-
}>;
|
|
38
|
-
}
|
|
39
|
-
export declare function projectGet(projectId: string, accountId: string): Promise<ProjectDetail>;
|
|
40
|
-
//# sourceMappingURL=project-get.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"project-get.d.ts","sourceRoot":"","sources":["../../src/tools/project-get.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,OAAO,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC;IAC3C,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAC;CACtC;AAED,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,aAAa,CAAC;IACtB,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAC7B,aAAa,EAAE,KAAK,CAAC;QACnB,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,QAAQ,EAAE,MAAM,CAAC;QACjB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC,CAAC;CACJ;AAED,wBAAsB,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CA0I7F"}
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import { getSession } from "../lib/neo4j.js";
|
|
2
|
-
export async function projectGet(projectId, accountId) {
|
|
3
|
-
const session = getSession();
|
|
4
|
-
try {
|
|
5
|
-
// Fetch the project node (must have :Project label)
|
|
6
|
-
const projectResult = await session.run(`MATCH (p:Project {taskId: $projectId, accountId: $accountId}) RETURN p`, { projectId, accountId });
|
|
7
|
-
if (projectResult.records.length === 0) {
|
|
8
|
-
throw new Error(`ProjectNotFound: ${projectId}`);
|
|
9
|
-
}
|
|
10
|
-
const p = projectResult.records[0].get("p").properties;
|
|
11
|
-
// Fetch children with their blockers
|
|
12
|
-
const childrenResult = await session.run(`MATCH (proj:Project {taskId: $projectId, accountId: $accountId})-[:HAS_TASK]->(child:Task)
|
|
13
|
-
OPTIONAL MATCH (blocker:Task)-[:BLOCKS]->(child)
|
|
14
|
-
WHERE blocker.status IN ['pending', 'active']
|
|
15
|
-
RETURN child,
|
|
16
|
-
collect(DISTINCT blocker.taskId) AS blockedByIds
|
|
17
|
-
ORDER BY
|
|
18
|
-
CASE child.priority
|
|
19
|
-
WHEN 'urgent' THEN 0
|
|
20
|
-
WHEN 'high' THEN 1
|
|
21
|
-
WHEN 'normal' THEN 2
|
|
22
|
-
WHEN 'low' THEN 3
|
|
23
|
-
ELSE 4
|
|
24
|
-
END,
|
|
25
|
-
child.createdAt`, { projectId, accountId });
|
|
26
|
-
const children = childrenResult.records.map((rec) => {
|
|
27
|
-
const c = rec.get("child").properties;
|
|
28
|
-
const blockedByIds = rec.get("blockedByIds").filter((id) => id !== null);
|
|
29
|
-
const child = {
|
|
30
|
-
taskId: c.taskId,
|
|
31
|
-
name: c.name,
|
|
32
|
-
status: c.status,
|
|
33
|
-
priority: c.priority,
|
|
34
|
-
blockedBy: blockedByIds,
|
|
35
|
-
};
|
|
36
|
-
if (c.dueDate)
|
|
37
|
-
child.dueDate = c.dueDate;
|
|
38
|
-
return child;
|
|
39
|
-
});
|
|
40
|
-
// Compute health
|
|
41
|
-
const totalTasks = children.length;
|
|
42
|
-
const completedTasks = children.filter((c) => c.status === "completed").length;
|
|
43
|
-
const overdueTasks = children.filter((c) => {
|
|
44
|
-
if (!c.dueDate || c.status === "completed")
|
|
45
|
-
return false;
|
|
46
|
-
return new Date(c.dueDate) < new Date();
|
|
47
|
-
}).length;
|
|
48
|
-
const blockedTasks = children.filter((c) => c.blockedBy.length > 0).length;
|
|
49
|
-
let daysSinceLastProgress = null;
|
|
50
|
-
const completedChildren = children.filter((c) => c.status === "completed");
|
|
51
|
-
if (completedChildren.length > 0) {
|
|
52
|
-
// Approximate: use project's updatedAt as proxy for last progress
|
|
53
|
-
// (full computation would need child updatedAt, not returned in this query)
|
|
54
|
-
daysSinceLastProgress = null;
|
|
55
|
-
}
|
|
56
|
-
let signal = "green";
|
|
57
|
-
if (totalTasks === 0) {
|
|
58
|
-
signal = "grey";
|
|
59
|
-
}
|
|
60
|
-
else if (overdueTasks > 1 || (daysSinceLastProgress !== null && daysSinceLastProgress >= 7)) {
|
|
61
|
-
signal = "red";
|
|
62
|
-
}
|
|
63
|
-
else if (overdueTasks > 0 || blockedTasks > 0) {
|
|
64
|
-
signal = "amber";
|
|
65
|
-
}
|
|
66
|
-
const health = {
|
|
67
|
-
signal,
|
|
68
|
-
totalTasks,
|
|
69
|
-
completedTasks,
|
|
70
|
-
overdueTasks,
|
|
71
|
-
blockedTasks,
|
|
72
|
-
daysSinceLastProgress,
|
|
73
|
-
};
|
|
74
|
-
// Fetch non-HAS_TASK relationships (RAISED_BY, AFFECTS, PART_OF)
|
|
75
|
-
const relResult = await session.run(`MATCH (proj:Project {taskId: $projectId, accountId: $accountId})-[r]->(target)
|
|
76
|
-
WHERE type(r) <> 'HAS_TASK'
|
|
77
|
-
RETURN type(r) AS relType, labels(target) AS targetLabels, elementId(target) AS targetId,
|
|
78
|
-
target.name AS targetName, target.givenName AS targetGivenName`, { projectId, accountId });
|
|
79
|
-
const relationships = relResult.records.map((rec) => {
|
|
80
|
-
const targetLabels = rec.get("targetLabels");
|
|
81
|
-
const targetLabel = targetLabels[0] ?? "Unknown";
|
|
82
|
-
const targetId = rec.get("targetId");
|
|
83
|
-
const targetName = rec.get("targetName") ??
|
|
84
|
-
rec.get("targetGivenName") ??
|
|
85
|
-
targetId;
|
|
86
|
-
return { type: rec.get("relType"), targetLabel, targetId, targetName };
|
|
87
|
-
});
|
|
88
|
-
const detail = {
|
|
89
|
-
projectId: p.taskId,
|
|
90
|
-
name: p.name,
|
|
91
|
-
description: p.description,
|
|
92
|
-
tier: p.tier,
|
|
93
|
-
phase: p.phase,
|
|
94
|
-
status: p.status,
|
|
95
|
-
createdAt: p.createdAt,
|
|
96
|
-
updatedAt: p.updatedAt,
|
|
97
|
-
health,
|
|
98
|
-
children,
|
|
99
|
-
relationships,
|
|
100
|
-
};
|
|
101
|
-
if (p.clientRef)
|
|
102
|
-
detail.clientRef = p.clientRef;
|
|
103
|
-
if (p.targetDate)
|
|
104
|
-
detail.targetDate = p.targetDate;
|
|
105
|
-
if (p.dueDate)
|
|
106
|
-
detail.dueDate = p.dueDate;
|
|
107
|
-
if (p.notes)
|
|
108
|
-
detail.notes = p.notes;
|
|
109
|
-
console.error(`project-get: returned ${projectId} with ${children.length} children`);
|
|
110
|
-
return detail;
|
|
111
|
-
}
|
|
112
|
-
catch (err) {
|
|
113
|
-
if (err instanceof Error && err.message.startsWith("ProjectNotFound:")) {
|
|
114
|
-
console.error(`project-get: failed — ${err.message}`);
|
|
115
|
-
}
|
|
116
|
-
else {
|
|
117
|
-
console.error(`project-get: failed — ${err instanceof Error ? err.message : String(err)}`);
|
|
118
|
-
}
|
|
119
|
-
throw err;
|
|
120
|
-
}
|
|
121
|
-
finally {
|
|
122
|
-
await session.close();
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
//# sourceMappingURL=project-get.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"project-get.js","sourceRoot":"","sources":["../../src/tools/project-get.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AA2C7C,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,SAAiB,EAAE,SAAiB;IACnE,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAC7B,IAAI,CAAC;QACH,oDAAoD;QACpD,MAAM,aAAa,GAAG,MAAM,OAAO,CAAC,GAAG,CACrC,wEAAwE,EACxE,EAAE,SAAS,EAAE,SAAS,EAAE,CACzB,CAAC;QAEF,IAAI,aAAa,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACvC,MAAM,IAAI,KAAK,CAAC,oBAAoB,SAAS,EAAE,CAAC,CAAC;QACnD,CAAC;QAED,MAAM,CAAC,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC;QAEvD,qCAAqC;QACrC,MAAM,cAAc,GAAG,MAAM,OAAO,CAAC,GAAG,CACtC;;;;;;;;;;;;;yBAamB,EACnB,EAAE,SAAS,EAAE,SAAS,EAAE,CACzB,CAAC;QAEF,MAAM,QAAQ,GAAuB,cAAc,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;YACtE,MAAM,CAAC,GAAG,GAAG,CAAC,G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CAAC;YACN,OAAO,CAAC,KAAK,CAAC,yBAAyB,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC7F,CAAC;QACD,MAAM,GAAG,CAAC;IACZ,CAAC;YAAS,CAAC;QACT,MAAM,OAAO,CAAC,KAAK,EAAE,CAAC;IACxB,CAAC;AACH,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export interface ProjectHealth {
|
|
2
|
-
signal: "green" | "amber" | "red" | "grey";
|
|
3
|
-
totalTasks: number;
|
|
4
|
-
completedTasks: number;
|
|
5
|
-
overdueTasks: number;
|
|
6
|
-
blockedTasks: number;
|
|
7
|
-
daysSinceLastProgress: number | null;
|
|
8
|
-
}
|
|
9
|
-
export interface ProjectSummary {
|
|
10
|
-
projectId: string;
|
|
11
|
-
name: string;
|
|
12
|
-
tier: string;
|
|
13
|
-
phase: string;
|
|
14
|
-
status: string;
|
|
15
|
-
clientRef?: string;
|
|
16
|
-
targetDate?: string;
|
|
17
|
-
health: ProjectHealth;
|
|
18
|
-
nextAction?: string;
|
|
19
|
-
updatedAt: string;
|
|
20
|
-
}
|
|
21
|
-
export declare function projectList(params: {
|
|
22
|
-
accountId: string;
|
|
23
|
-
status?: string;
|
|
24
|
-
limit?: number;
|
|
25
|
-
}): Promise<ProjectSummary[]>;
|
|
26
|
-
//# sourceMappingURL=project-list.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"project-list.d.ts","sourceRoot":"","sources":["../../src/tools/project-list.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,OAAO,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC;IAC3C,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAC;CACtC;AAED,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,aAAa,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;CACnB;AAqBD,wBAAsB,WAAW,CAAC,MAAM,EAAE;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAsE5B"}
|