@rubytech/create-realagent-code 0.1.28 → 0.1.29
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/index.js +2 -2
- package/package.json +1 -1
- package/payload/platform/plugins/admin/mcp/dist/index.js +1 -1
- package/payload/platform/plugins/admin/mcp/dist/index.js.map +1 -1
- package/payload/platform/plugins/admin/skills/plugin-management/SKILL.md +1 -1
- package/payload/platform/plugins/buyers/.claude-plugin/plugin.json +1 -1
- package/payload/platform/plugins/buyers/PLUGIN.md +1 -1
- package/payload/platform/plugins/docs/references/deployment.md +2 -2
- package/payload/platform/plugins/docs/references/plugins-guide.md +1 -1
- package/payload/platform/plugins/estate-business/.claude-plugin/plugin.json +1 -1
- package/payload/platform/plugins/estate-business/PLUGIN.md +1 -1
- package/payload/platform/plugins/estate-coaching/.claude-plugin/plugin.json +1 -1
- package/payload/platform/plugins/estate-coaching/PLUGIN.md +1 -1
- package/payload/platform/plugins/estate-onboarding/.claude-plugin/plugin.json +1 -1
- package/payload/platform/plugins/estate-onboarding/PLUGIN.md +1 -1
- package/payload/platform/plugins/estate-sales/.claude-plugin/plugin.json +1 -1
- package/payload/platform/plugins/estate-sales/PLUGIN.md +1 -1
- package/payload/platform/plugins/estate-teaching/.claude-plugin/plugin.json +1 -1
- package/payload/platform/plugins/estate-teaching/PLUGIN.md +1 -1
- package/payload/platform/plugins/leads/.claude-plugin/plugin.json +1 -1
- package/payload/platform/plugins/leads/PLUGIN.md +1 -1
- package/payload/platform/plugins/listings/.claude-plugin/plugin.json +1 -1
- package/payload/platform/plugins/listings/PLUGIN.md +1 -1
- package/payload/platform/plugins/loop/.claude-plugin/plugin.json +2 -2
- package/payload/platform/plugins/loop/PLUGIN.md +47 -24
- package/payload/platform/plugins/real-agency/plugins/.claude-plugin/marketplace.json +13 -0
- package/payload/platform/plugins/real-agency/plugins/loop/.claude-plugin/plugin.json +17 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/index.d.ts +2 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/index.d.ts.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/index.js +293 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/index.js.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/crypto.d.ts +10 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/crypto.d.ts.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/crypto.js +88 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/crypto.js.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/loop-api.d.ts +82 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/loop-api.d.ts.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/loop-api.js +427 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/loop-api.js.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/neo4j.d.ts +5 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/neo4j.d.ts.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/neo4j.js +40 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/lib/neo4j.js.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/customer-preferences.d.ts +10 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/customer-preferences.d.ts.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/customer-preferences.js +24 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/customer-preferences.js.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/feedback.d.ts +16 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/feedback.d.ts.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/feedback.js +35 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/feedback.js.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-deregister.d.ts +5 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-deregister.d.ts.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-deregister.js +19 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-deregister.js.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-list.d.ts +4 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-list.d.ts.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-list.js +14 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-list.js.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-register.d.ts +9 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-register.d.ts.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-register.js +60 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/key-register.js.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-enquiry.d.ts +13 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-enquiry.d.ts.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-enquiry.js +41 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-enquiry.js.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-batch.d.ts +9 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-batch.d.ts.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-batch.js +16 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-batch.js.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-request.d.ts +15 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-request.d.ts.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-request.js +11 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-request.js.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match.d.ts +10 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match.d.ts.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match.js +39 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match.js.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/people-detail.d.ts +9 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/people-detail.d.ts.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/people-detail.js +125 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/people-detail.js.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/people-search.d.ts +18 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/people-search.d.ts.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/people-search.js +87 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/people-search.js.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-detail.d.ts +10 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-detail.d.ts.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-detail.js +82 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-detail.js.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-listed.d.ts +12 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-listed.d.ts.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-listed.js +32 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-listed.js.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-request.d.ts +15 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-request.d.ts.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-request.js +11 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-request.js.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-search.d.ts +16 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-search.d.ts.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-search.js +41 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/property-search.js.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/supplier.d.ts +13 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/supplier.d.ts.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/supplier.js +49 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/supplier.js.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/team-availability.d.ts +7 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/team-availability.d.ts.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/team-availability.js +19 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/team-availability.js.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/team-info.d.ts +5 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/team-info.d.ts.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/team-info.js +32 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/team-info.js.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-create.d.ts +14 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-create.d.ts.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-create.js +11 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-create.js.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-detail.d.ts +9 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-detail.d.ts.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-detail.js +85 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-detail.js.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-search.d.ts +13 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-search.d.ts.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-search.js +44 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-search.js.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-update.d.ts +14 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-update.d.ts.map +1 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-update.js +18 -0
- package/payload/platform/plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-update.js.map +1 -0
- package/payload/platform/plugins/vendors/.claude-plugin/plugin.json +1 -1
- package/payload/platform/plugins/vendors/PLUGIN.md +1 -1
- package/payload/premium-plugins/real-agency/plugins/.claude-plugin/marketplace.json +0 -50
- package/payload/premium-plugins/real-agency/plugins/loop/.claude-plugin/plugin.json +3 -3
- package/payload/premium-plugins/{real-agency → real-agent}/BUNDLE.md +2 -2
- package/payload/premium-plugins/{real-agency → real-agent}/agents/buyer-enquiry/template.json +1 -1
- package/payload/premium-plugins/real-agent/plugins/.claude-plugin/marketplace.json +63 -0
- package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/.claude-plugin/plugin.json +1 -1
- package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/PLUGIN.md +1 -1
- package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/.claude-plugin/plugin.json +1 -1
- package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/PLUGIN.md +1 -1
- package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/.claude-plugin/plugin.json +1 -1
- package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/PLUGIN.md +1 -1
- package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-onboarding/.claude-plugin/plugin.json +1 -1
- package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-onboarding/PLUGIN.md +1 -1
- package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/.claude-plugin/plugin.json +1 -1
- package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/PLUGIN.md +1 -1
- package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-teaching/.claude-plugin/plugin.json +1 -1
- package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-teaching/PLUGIN.md +1 -1
- package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/.claude-plugin/plugin.json +1 -1
- package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/PLUGIN.md +1 -1
- package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/.claude-plugin/plugin.json +1 -1
- package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/PLUGIN.md +1 -1
- package/payload/premium-plugins/real-agent/plugins/loop/.claude-plugin/plugin.json +17 -0
- package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/PLUGIN.md +47 -24
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/index.d.ts +2 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/index.d.ts.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/index.js +293 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/index.js.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/lib/crypto.d.ts +10 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/lib/crypto.d.ts.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/lib/crypto.js +88 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/lib/crypto.js.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/lib/loop-api.d.ts +82 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/lib/loop-api.d.ts.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/lib/loop-api.js +427 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/lib/loop-api.js.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/lib/neo4j.d.ts +5 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/lib/neo4j.d.ts.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/lib/neo4j.js +40 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/lib/neo4j.js.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/customer-preferences.d.ts +10 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/customer-preferences.d.ts.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/customer-preferences.js +24 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/customer-preferences.js.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/feedback.d.ts +16 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/feedback.d.ts.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/feedback.js +35 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/feedback.js.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/key-deregister.d.ts +5 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/key-deregister.d.ts.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/key-deregister.js +19 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/key-deregister.js.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/key-list.d.ts +4 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/key-list.d.ts.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/key-list.js +14 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/key-list.js.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/key-register.d.ts +9 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/key-register.d.ts.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/key-register.js +60 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/key-register.js.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/marketing-enquiry.d.ts +13 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/marketing-enquiry.d.ts.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/marketing-enquiry.js +41 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/marketing-enquiry.js.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/marketing-match-batch.d.ts +9 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/marketing-match-batch.d.ts.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/marketing-match-batch.js +16 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/marketing-match-batch.js.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/marketing-match-request.d.ts +15 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/marketing-match-request.d.ts.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/marketing-match-request.js +11 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/marketing-match-request.js.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/marketing-match.d.ts +10 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/marketing-match.d.ts.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/marketing-match.js +39 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/marketing-match.js.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/people-detail.d.ts +9 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/people-detail.d.ts.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/people-detail.js +125 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/people-detail.js.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/people-search.d.ts +18 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/people-search.d.ts.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/people-search.js +87 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/people-search.js.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/property-detail.d.ts +10 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/property-detail.d.ts.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/property-detail.js +82 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/property-detail.js.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/property-listed.d.ts +12 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/property-listed.d.ts.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/property-listed.js +32 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/property-listed.js.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/property-request.d.ts +15 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/property-request.d.ts.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/property-request.js +11 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/property-request.js.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/property-search.d.ts +16 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/property-search.d.ts.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/property-search.js +41 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/property-search.js.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/supplier.d.ts +13 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/supplier.d.ts.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/supplier.js +49 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/supplier.js.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/team-availability.d.ts +7 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/team-availability.d.ts.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/team-availability.js +19 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/team-availability.js.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/team-info.d.ts +5 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/team-info.d.ts.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/team-info.js +32 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/team-info.js.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/viewing-create.d.ts +14 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/viewing-create.d.ts.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/viewing-create.js +11 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/viewing-create.js.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/viewing-detail.d.ts +9 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/viewing-detail.d.ts.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/viewing-detail.js +85 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/viewing-detail.js.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/viewing-search.d.ts +13 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/viewing-search.d.ts.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/viewing-search.js +44 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/viewing-search.js.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/viewing-update.d.ts +14 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/viewing-update.d.ts.map +1 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/viewing-update.js +18 -0
- package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/viewing-update.js.map +1 -0
- package/payload/premium-plugins/{real-agency → real-agent}/plugins/vendors/.claude-plugin/plugin.json +1 -1
- package/payload/premium-plugins/{real-agency → real-agent}/plugins/vendors/PLUGIN.md +1 -1
- package/payload/server/public/assets/{admin-DW8IJcLc.js → admin-CDvF5de6.js} +5 -5
- package/payload/server/public/index.html +1 -1
- /package/payload/premium-plugins/{real-agency → real-agent}/agents/buyer-enquiry/IDENTITY.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/agents/buyer-enquiry/SOUL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/agents/compliance.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/agents/negotiator.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/agents/valuer.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/brochures/.claude-plugin/plugin.json +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/brochures/PLUGIN.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/brochures/commands/make-brochure.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/brochures/skills/a4-print-documents/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/brochures/skills/brand-design/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/brochures/skills/make-brochure/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/brochures/skills/make-brochure/references/seller-brief-template.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/brochures/skills/property-brochure/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/brochures/skills/property-brochure/references/build.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/brochures/skills/property-brochure/references/copy.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/brochures/skills/property-brochure/references/images.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/brochures/skills/property-brochure/references/index-landing.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/brochures/skills/property-brochure/references/index.html +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/brochures/skills/property-brochure/references/placeholders.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/brochures/skills/property-brochure/references/registers.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/brochures/skills/property-brochure/references/seller-brief.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/brochures/skills/property-brochure/references/structure.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/brochures/skills/property-brochure/references/template.html +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/brochures/skills/property-extract/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/skills/buyer-feedback/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/skills/buyer-management/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/skills/buyer-management/references/buyer-qualification-questions.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/skills/buyer-management/references/buyer-qualification.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/skills/buyer-management/references/buyer-scripts.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/skills/buyer-management/references/buyer-working-scripts.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/skills/buyer-management/references/feedback-collection.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/skills/buyer-management/references/offer-capture.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/skills/buyer-management/references/viewing-booking.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/skills/buyer-management/references/viewing-management.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/skills/buyer-seller-guides/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/skills/buyer-seller-guides/references/care-fees-guide.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/skills/buyer-seller-guides/references/divorce-sales-guide.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/skills/buyer-seller-guides/references/downsizing-guide.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/skills/buyer-seller-guides/references/first-time-buyers.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/skills/buyer-seller-guides/references/first-time-sellers.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/skills/buyer-seller-guides/references/probate-guide.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/skills/buyer-seller-guides/references/upsizing-guide.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/skills/property-enquiry/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/buyers/skills/viewing-management/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/business-growth/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/business-growth/references/buy-back-your-time.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/business-growth/references/firewave-gost-scorecards.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/business-growth/references/keller-org-model.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/business-growth/references/lencioni-team-models.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/business-growth/references/listing-management-system.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/business-growth/references/net-figure-form.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/business-growth/references/serhant-bizinbox-notes.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/business-growth/references/team-roles-commission.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/business-growth/references/va-2026-ops.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/business-growth/references/wingman-structure.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/business-operations/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/business-operations/references/crm-systems.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/business-operations/references/hiring-guide.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/business-operations/references/impact-framework.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/business-operations/references/minutes-equal-money.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/business-operations/references/team-management.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/commission-calculator/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/exp-partnership/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/exp-partnership/references/12-reasons.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/exp-partnership/references/95-5-system.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/exp-partnership/references/agent-attraction-scripts.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/exp-partnership/references/business-partnership.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/exp-partnership/references/exp-model-overview.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/exp-partnership/references/model-comparison.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/exp-partnership/references/revenue-share-explained.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/month-end-close/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/payment-batch-stager/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/period-reconciler/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/personal-branding/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/personal-branding/references/attraction-agent-notes.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/personal-branding/references/attraction-agent.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/personal-branding/references/authenticity-boundaries.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/personal-branding/references/become-a-brand-leader-notes.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/personal-branding/references/blast-formula.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/personal-branding/references/brand-leader.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/personal-branding/references/brand-strategy-system.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/personal-branding/references/content-engine.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/personal-branding/references/firewave-blast-and-blogging.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/personal-branding/references/gary-v-content.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/personal-branding/references/gary-v-principles.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/personal-branding/references/oversubscribed-positioning.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/personal-branding/references/platforms.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/personal-branding/references/priestley-oversubscribed.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/personal-branding/references/storeys-style-examples.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-business/skills/personal-branding/references/visual-identity.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/skills/agent-performance/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/skills/agent-performance/references/atomic-habits.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/skills/agent-performance/references/daily-routine-scorecard.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/skills/agent-performance/references/hp6-model.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/skills/agent-performance/references/twelve-week-year.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/skills/bespoke-coaching/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/skills/bespoke-coaching/references/coaching-boundaries.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/skills/bespoke-coaching/references/feedback-framework.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/skills/bespoke-coaching/references/performance-framework.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/skills/coaching-toolkit/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/skills/coaching-toolkit/references/coaching-exercises.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/skills/coaching-toolkit/references/goal-setting.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/skills/coaching-toolkit/references/one-to-one-framework.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/skills/coaching-toolkit/references/soi-workbook.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/skills/serhant-training/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/skills/serhant-training/references/agent-training-guide.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/skills/serhant-training/references/business-in-a-box.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/skills/serhant-training/references/buyers-guide.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/skills/serhant-training/references/codo-method.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-coaching/skills/serhant-training/references/website-planning-guide.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-onboarding/skills/bootstrap/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-onboarding/skills/bootstrap/references/onboarding-flow.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/chase-progression/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/negotiation/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/negotiation/references/deal-saving.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/negotiation/references/negotiation-deep-guide.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/negotiation/references/negotiation-prep-principles.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/negotiation/references/negotiation-techniques.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/negotiation/references/offer-presentation.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/risk-scorer/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/sales-closer/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/sales-closer/references/serhant-emotion-stages.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/sales-discovery/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/sales-discovery/references/chris-voss-discovery.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/sales-discovery/references/firewave-gost-journey.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/sales-discovery/references/phil-jones-openers.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/sales-discovery/references/pre-listing-checklist.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/sales-discovery/references/serhant-improv.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/sales-discovery/references/tom-ferry-discovery.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/sales-discovery/references/vendor-motivation-competitor.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/sales-negotiation/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/sales-negotiation/references/chris-voss-negotiation.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/sales-negotiation/references/phil-jones-price-words.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/sales-negotiation/references/serhant-negotiation-plus.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/sales-negotiation/references/tom-panos-commission-pricing.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/sales-negotiation/references/tony-morris-questioning.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/sales-progression/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/sales-progression/references/conveyancing-guide.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-sales/skills/sales-progression/references/transaction-tracking.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-teaching/skills/content-directory/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-teaching/skills/content-directory/references/module-delivery.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/estate-teaching/skills/content-directory/references/progress-tracking.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/chain-progression-tracker/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/diary-builder/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/enquiry-triage/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/lead-nurturing/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/lead-nurturing/references/buyer-search-letter.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/lead-nurturing/references/buyer-search-letters.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/lead-nurturing/references/database-reactivation.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/lead-nurturing/references/email-nurture-sequences.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/lead-nurturing/references/facebook-referrals.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/lead-nurturing/references/firewave-email-nurture-sequences.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/lead-nurturing/references/keller-33-touch.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/lead-nurturing/references/neighbour-letters.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/lead-nurturing/references/neighbour-notification-letter.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/lead-nurturing/references/ofi-follow-up-dialogue.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/lead-nurturing/references/ofi-follow-up.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/lead-nurturing/references/serhant-three-fs-plus.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/lead-nurturing/references/sharran-10x10x10.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/lead-nurturing/references/sms-templates.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/lead-nurturing/references/sphere-of-influence-notes.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/lead-nurturing/references/sphere-of-influence.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/lead-nurturing/references/tom-panos-sms-templates.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/morning-round/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/prospecting/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/prospecting/references/database-matching.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/prospecting/references/database-value.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/prospecting/references/prospecting-dialogues.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/leads/skills/prospecting/references/reactivation.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/comparable-finder/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/epc-checker/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/home-preparation/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/home-preparation/references/kerb-appeal.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/home-preparation/references/photo-day.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/home-preparation/references/situational-tips.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/home-preparation/references/staging-guide.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/listing-copy-writer/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/listing-presentation/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/listing-presentation/references/booking-script.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/listing-presentation/references/objection-scripts.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/listing-presentation/references/penhaul-presentation.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/listing-presentation/references/pre-listing-kit.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/listing-presentation/references/set-to-sell.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/listing-presentation/references/sharran-frameworks.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/local-market-stats/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/new-instruction/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/particulars-builder/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/portal-launch-scheduler/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/pricing-scenario-builder/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/property-marketing/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/property-marketing/references/auction-report-template.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/property-marketing/references/coming-soon-campaign.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/property-marketing/references/direct-mail-templates.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/property-marketing/references/eoi-form-template.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/property-marketing/references/monthly-scorecard.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/supplier-booker/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/talk-track-composer/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/terms-of-business-drafter/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/listings/skills/valuation-prep/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/package-lock.json +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/package.json +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/__tests__/loop-swagger.snapshot.json +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/__tests__/swagger-write-coverage.test.ts +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/index.ts +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/lib/crypto.ts +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/lib/loop-api.ts +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/lib/neo4j.ts +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/customer-preferences.ts +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/feedback.ts +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/key-deregister.ts +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/key-list.ts +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/key-register.ts +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/marketing-enquiry.ts +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/marketing-match-batch.ts +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/marketing-match-request.ts +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/marketing-match.ts +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/people-detail.ts +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/people-search.ts +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/property-detail.ts +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/property-listed.ts +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/property-request.ts +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/property-search.ts +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/supplier.ts +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/team-availability.ts +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/team-info.ts +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/viewing-create.ts +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/viewing-detail.ts +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/viewing-search.ts +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/src/tools/viewing-update.ts +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/tsconfig.json +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/mcp/vitest.config.ts +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/skills/compliance-flag-checker/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/skills/priority-ranker/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/skills/tone-matched-drafter/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/skills/variance-narrator/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/loop/skills/vendor-research/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/vendors/skills/vendor-communication/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/vendors/skills/vendor-communication/references/fee-protection-and-agenda.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/vendors/skills/vendor-communication/references/listing-scripts.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/vendors/skills/vendor-communication/references/negotiation-deep-guide.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/vendors/skills/vendor-communication/references/price-alignment-scripts.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/vendors/skills/vendor-communication/references/price-alignment.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/vendors/skills/vendor-communication/references/scenario-scripts.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/vendors/skills/vendor-communication/references/seller-engagement.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/vendors/skills/vendor-communication/references/valuation-booking.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/vendors/skills/vendor-communication/references/vendor-scripts.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/vendors/skills/vendor-communication/references/vendor-updates.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/plugins/vendors/skills/vendor-updates/SKILL.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/specs/00-architecture-and-customization.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/specs/01-morning-round.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/specs/02-valuation-prep.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/specs/03-new-instruction.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/specs/04-chase-progression.md +0 -0
- /package/payload/premium-plugins/{real-agency → real-agent}/specs/05-month-end-close.md +0 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
export interface LoopTeamKey {
|
|
2
|
+
teamName: string;
|
|
3
|
+
encryptedKey: string;
|
|
4
|
+
teamAddress: string;
|
|
5
|
+
agentId: string;
|
|
6
|
+
permissions: string[];
|
|
7
|
+
createdAt: string;
|
|
8
|
+
updatedAt: string;
|
|
9
|
+
}
|
|
10
|
+
export interface TeamResult<T> {
|
|
11
|
+
teamName: string;
|
|
12
|
+
data: T[];
|
|
13
|
+
}
|
|
14
|
+
export interface AggregationFailure {
|
|
15
|
+
teamName: string;
|
|
16
|
+
reason: string;
|
|
17
|
+
kind: "timeout" | "other";
|
|
18
|
+
}
|
|
19
|
+
export interface AggregationResult<T> {
|
|
20
|
+
results: TeamResult<T>[];
|
|
21
|
+
failures: AggregationFailure[];
|
|
22
|
+
skipped: {
|
|
23
|
+
teamName: string;
|
|
24
|
+
reason: string;
|
|
25
|
+
}[];
|
|
26
|
+
totalTeams: number;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Load all LoopTeamKey nodes for an account from Neo4j.
|
|
30
|
+
*/
|
|
31
|
+
export declare function loadTeamKeys(accountId: string): Promise<LoopTeamKey[]>;
|
|
32
|
+
/**
|
|
33
|
+
* Make a GET request to the Loop API V2.
|
|
34
|
+
*/
|
|
35
|
+
export declare function loopGet<T>(apiKey: string, path: string, toolName: string, teamName: string): Promise<T>;
|
|
36
|
+
/**
|
|
37
|
+
* Make a POST request to the Loop API V2.
|
|
38
|
+
* For write operations: create viewings, record feedback, submit enquiries, etc.
|
|
39
|
+
* Returns parsed JSON response. Treats 204 as success with empty result.
|
|
40
|
+
*/
|
|
41
|
+
export declare function loopPost<T>(apiKey: string, path: string, body: unknown, toolName: string, teamName: string): Promise<T>;
|
|
42
|
+
/**
|
|
43
|
+
* Make a PUT request to the Loop API V2.
|
|
44
|
+
* For update operations: batch matching, submit quotes, update preferences, etc.
|
|
45
|
+
*/
|
|
46
|
+
export declare function loopPut<T>(apiKey: string, path: string, body: unknown, toolName: string, teamName: string): Promise<T>;
|
|
47
|
+
export declare class LoopApiError extends Error {
|
|
48
|
+
readonly status: number;
|
|
49
|
+
readonly teamName: string;
|
|
50
|
+
readonly path: string;
|
|
51
|
+
readonly responseBody?: string | undefined;
|
|
52
|
+
constructor(status: number, teamName: string, path: string, responseBody?: string | undefined);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Fan out a request across all registered teams for an account, merging results.
|
|
56
|
+
*
|
|
57
|
+
* Each tool provides a `buildRequest` function that takes a decrypted API key
|
|
58
|
+
* and returns the data for that team. The aggregation engine handles:
|
|
59
|
+
* - Key loading and decryption
|
|
60
|
+
* - Permission checking
|
|
61
|
+
* - Concurrent fan-out via Promise.allSettled
|
|
62
|
+
* - Result merging with teamName tags
|
|
63
|
+
* - Aggregate logging
|
|
64
|
+
*
|
|
65
|
+
* When `teamName` is provided, only that team is queried (no fan-out).
|
|
66
|
+
*/
|
|
67
|
+
export declare function aggregateAcrossTeams<T>(accountId: string, endpointGroup: string, toolName: string, buildRequest: (apiKey: string, teamName: string) => Promise<T[]>, options?: {
|
|
68
|
+
teamName?: string;
|
|
69
|
+
limitPerTeam?: number;
|
|
70
|
+
limitTotal?: number;
|
|
71
|
+
}): Promise<AggregationResult<T>>;
|
|
72
|
+
/**
|
|
73
|
+
* Resolve a single team's API key with permission checking.
|
|
74
|
+
* Handles key loading, decryption, and permission validation.
|
|
75
|
+
* Used for both reads and writes that target a specific team — no fan-out.
|
|
76
|
+
*/
|
|
77
|
+
export declare function withTeamKey<T>(accountId: string, teamName: string, endpointGroup: string, toolName: string, execute: (apiKey: string) => Promise<T>): Promise<T>;
|
|
78
|
+
/**
|
|
79
|
+
* Format an aggregation result into a human-readable text response.
|
|
80
|
+
*/
|
|
81
|
+
export declare function formatAggregationResult<T>(result: AggregationResult<T>, formatItem: (item: T, teamName: string) => string, entityName: string): string;
|
|
82
|
+
//# sourceMappingURL=loop-api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loop-api.d.ts","sourceRoot":"","sources":["../../src/lib/loop-api.ts"],"names":[],"mappings":"AA0FA,MAAM,WAAW,WAAW;IAC1B,QAA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E,CAAC,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,KAAK,MAAM,EACjD,UAAU,EAAE,MAAM,GACjB,MAAM,CA6DR"}
|
|
@@ -0,0 +1,427 @@
|
|
|
1
|
+
import { getSession } from "./neo4j.js";
|
|
2
|
+
import { decrypt } from "./crypto.js";
|
|
3
|
+
// ─────────────────────────────────────────────────────────────────
|
|
4
|
+
// Loop API V2 HTTP Client + Cross-Team Aggregation Engine
|
|
5
|
+
//
|
|
6
|
+
// ┌─ Load LoopTeamKey nodes (Neo4j) ─┐
|
|
7
|
+
// │ │
|
|
8
|
+
// ▼ │
|
|
9
|
+
// For each key: │
|
|
10
|
+
// 1. Decrypt API key │
|
|
11
|
+
// 2. Check permissions │
|
|
12
|
+
// 3. HTTP GET/POST/PUT → Loop API V2 │
|
|
13
|
+
// │ │
|
|
14
|
+
// ▼ │
|
|
15
|
+
// Promise.allSettled → merge results │
|
|
16
|
+
// Log aggregate summary │
|
|
17
|
+
// ─────────────────────────────────────────────────────────────────
|
|
18
|
+
const LOOP_BASE_URL = "https://api.loop.software";
|
|
19
|
+
const REQUEST_TIMEOUT_MS = 10_000;
|
|
20
|
+
const TIMEOUT_RETRY_BACKOFF_MS = 2_000;
|
|
21
|
+
const DEFAULT_LIMIT_PER_TEAM = 50;
|
|
22
|
+
const DEFAULT_LIMIT_TOTAL = 200;
|
|
23
|
+
// One bounded retry on transient timeout — recovers from intermittent
|
|
24
|
+
// Loop-API latency spikes that would otherwise drop a team from coverage.
|
|
25
|
+
function isTimeoutError(err) {
|
|
26
|
+
if (!(err instanceof Error))
|
|
27
|
+
return false;
|
|
28
|
+
return (err.name === "TimeoutError" ||
|
|
29
|
+
err.name === "AbortError" ||
|
|
30
|
+
/aborted due to timeout/i.test(err.message));
|
|
31
|
+
}
|
|
32
|
+
function isEnvelope(val) {
|
|
33
|
+
return (val !== null &&
|
|
34
|
+
typeof val === "object" &&
|
|
35
|
+
!Array.isArray(val) &&
|
|
36
|
+
"statusCode" in val &&
|
|
37
|
+
"httpResponseCode" in val &&
|
|
38
|
+
"data" in val);
|
|
39
|
+
}
|
|
40
|
+
function unwrapEnvelope(parsed, toolName, teamName) {
|
|
41
|
+
if (!isEnvelope(parsed)) {
|
|
42
|
+
return parsed;
|
|
43
|
+
}
|
|
44
|
+
if (parsed.statusCode !== "success") {
|
|
45
|
+
const errMsg = parsed.errors?.length
|
|
46
|
+
? parsed.errors.join("; ")
|
|
47
|
+
: `statusCode=${parsed.statusCode}`;
|
|
48
|
+
throw new Error(`Loop API error for team=${teamName} tool=${toolName}: ${errMsg} (httpResponseCode=${parsed.httpResponseCode})`);
|
|
49
|
+
}
|
|
50
|
+
if (parsed.warnings?.length) {
|
|
51
|
+
console.error(`[loop] ${toolName} team=${teamName} warnings: ${parsed.warnings.join("; ")}`);
|
|
52
|
+
}
|
|
53
|
+
return parsed.data;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Load all LoopTeamKey nodes for an account from Neo4j.
|
|
57
|
+
*/
|
|
58
|
+
export async function loadTeamKeys(accountId) {
|
|
59
|
+
const session = getSession();
|
|
60
|
+
try {
|
|
61
|
+
const result = await session.run(`MATCH (k:LoopTeamKey {accountId: $accountId})
|
|
62
|
+
RETURN k.teamName AS teamName, k.encryptedKey AS encryptedKey,
|
|
63
|
+
k.teamAddress AS teamAddress, k.agentId AS agentId,
|
|
64
|
+
k.permissions AS permissions, k.createdAt AS createdAt,
|
|
65
|
+
k.updatedAt AS updatedAt
|
|
66
|
+
ORDER BY k.teamName`, { accountId });
|
|
67
|
+
return result.records.map((r) => ({
|
|
68
|
+
teamName: r.get("teamName"),
|
|
69
|
+
encryptedKey: r.get("encryptedKey"),
|
|
70
|
+
teamAddress: r.get("teamAddress") ?? "",
|
|
71
|
+
agentId: r.get("agentId") ?? "",
|
|
72
|
+
permissions: r.get("permissions") ?? [],
|
|
73
|
+
createdAt: r.get("createdAt") ?? "",
|
|
74
|
+
updatedAt: r.get("updatedAt") ?? "",
|
|
75
|
+
}));
|
|
76
|
+
}
|
|
77
|
+
finally {
|
|
78
|
+
await session.close();
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
// Truncate to 200 chars, escape newlines, single line — `[loop] <tool> team=<t>
|
|
82
|
+
// status=<n> body="<...>"`. Emitted at the wrapper boundary before throwing so
|
|
83
|
+
// the body is visible regardless of how downstream catch sites format the error
|
|
84
|
+
// (the aggregator at line ~388 reduces LoopApiError to "HTTP <status>" and
|
|
85
|
+
// would otherwise discard the body).
|
|
86
|
+
function logErrorBody(toolName, teamName, status, body) {
|
|
87
|
+
const truncated = body.slice(0, 200).replace(/\n/g, "\\n");
|
|
88
|
+
console.error(`[loop] ${toolName} team=${teamName} status=${status} body="${truncated}"`);
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Make a GET request to the Loop API V2.
|
|
92
|
+
*/
|
|
93
|
+
export async function loopGet(apiKey, path, toolName, teamName) {
|
|
94
|
+
const url = `${LOOP_BASE_URL}${path}`;
|
|
95
|
+
const start = Date.now();
|
|
96
|
+
const response = await fetch(url, {
|
|
97
|
+
headers: { "X-Api-Key": apiKey, "Accept": "application/json" },
|
|
98
|
+
signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS),
|
|
99
|
+
});
|
|
100
|
+
const duration = Date.now() - start;
|
|
101
|
+
console.error(`[loop] ${toolName} team=${teamName} endpoint=GET ${path} status=${response.status} duration=${duration}ms`);
|
|
102
|
+
if (response.status === 204) {
|
|
103
|
+
return [];
|
|
104
|
+
}
|
|
105
|
+
if (!response.ok) {
|
|
106
|
+
const errorBody = await response.text().catch(() => "");
|
|
107
|
+
logErrorBody(toolName, teamName, response.status, errorBody);
|
|
108
|
+
throw new LoopApiError(response.status, teamName, path, errorBody);
|
|
109
|
+
}
|
|
110
|
+
const text = await response.text();
|
|
111
|
+
try {
|
|
112
|
+
const parsed = JSON.parse(text);
|
|
113
|
+
return unwrapEnvelope(parsed, toolName, teamName);
|
|
114
|
+
}
|
|
115
|
+
catch (err) {
|
|
116
|
+
if (err instanceof SyntaxError) {
|
|
117
|
+
throw new Error(`Loop returned non-JSON response for team=${teamName} path=${path} ` +
|
|
118
|
+
`(status=${response.status}, length=${text.length})`);
|
|
119
|
+
}
|
|
120
|
+
throw err;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Make a POST request to the Loop API V2.
|
|
125
|
+
* For write operations: create viewings, record feedback, submit enquiries, etc.
|
|
126
|
+
* Returns parsed JSON response. Treats 204 as success with empty result.
|
|
127
|
+
*/
|
|
128
|
+
export async function loopPost(apiKey, path, body, toolName, teamName) {
|
|
129
|
+
const url = `${LOOP_BASE_URL}${path}`;
|
|
130
|
+
const start = Date.now();
|
|
131
|
+
const response = await fetch(url, {
|
|
132
|
+
method: "POST",
|
|
133
|
+
headers: {
|
|
134
|
+
"X-Api-Key": apiKey,
|
|
135
|
+
"Accept": "application/json",
|
|
136
|
+
"Content-Type": "application/json",
|
|
137
|
+
},
|
|
138
|
+
body: JSON.stringify(body),
|
|
139
|
+
signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS),
|
|
140
|
+
});
|
|
141
|
+
const duration = Date.now() - start;
|
|
142
|
+
console.error(`[loop] WRITE ${toolName} team=${teamName} endpoint=POST ${path} status=${response.status} duration=${duration}ms`);
|
|
143
|
+
if (response.status === 204) {
|
|
144
|
+
return { success: true };
|
|
145
|
+
}
|
|
146
|
+
if (!response.ok) {
|
|
147
|
+
const errorBody = await response.text().catch(() => "");
|
|
148
|
+
logErrorBody(toolName, teamName, response.status, errorBody);
|
|
149
|
+
throw new LoopApiError(response.status, teamName, path, errorBody);
|
|
150
|
+
}
|
|
151
|
+
const text = await response.text();
|
|
152
|
+
try {
|
|
153
|
+
const parsed = JSON.parse(text);
|
|
154
|
+
return unwrapEnvelope(parsed, toolName, teamName);
|
|
155
|
+
}
|
|
156
|
+
catch (err) {
|
|
157
|
+
if (err instanceof SyntaxError) {
|
|
158
|
+
throw new Error(`Loop returned non-JSON response for team=${teamName} path=${path} ` +
|
|
159
|
+
`(status=${response.status}, length=${text.length})`);
|
|
160
|
+
}
|
|
161
|
+
throw err;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Make a PUT request to the Loop API V2.
|
|
166
|
+
* For update operations: batch matching, submit quotes, update preferences, etc.
|
|
167
|
+
*/
|
|
168
|
+
export async function loopPut(apiKey, path, body, toolName, teamName) {
|
|
169
|
+
const url = `${LOOP_BASE_URL}${path}`;
|
|
170
|
+
const start = Date.now();
|
|
171
|
+
const response = await fetch(url, {
|
|
172
|
+
method: "PUT",
|
|
173
|
+
headers: {
|
|
174
|
+
"X-Api-Key": apiKey,
|
|
175
|
+
"Accept": "application/json",
|
|
176
|
+
"Content-Type": "application/json",
|
|
177
|
+
},
|
|
178
|
+
body: JSON.stringify(body),
|
|
179
|
+
signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS),
|
|
180
|
+
});
|
|
181
|
+
const duration = Date.now() - start;
|
|
182
|
+
console.error(`[loop] WRITE ${toolName} team=${teamName} endpoint=PUT ${path} status=${response.status} duration=${duration}ms`);
|
|
183
|
+
if (response.status === 204) {
|
|
184
|
+
return { success: true };
|
|
185
|
+
}
|
|
186
|
+
if (!response.ok) {
|
|
187
|
+
const errorBody = await response.text().catch(() => "");
|
|
188
|
+
logErrorBody(toolName, teamName, response.status, errorBody);
|
|
189
|
+
throw new LoopApiError(response.status, teamName, path, errorBody);
|
|
190
|
+
}
|
|
191
|
+
const text = await response.text();
|
|
192
|
+
try {
|
|
193
|
+
const parsed = JSON.parse(text);
|
|
194
|
+
return unwrapEnvelope(parsed, toolName, teamName);
|
|
195
|
+
}
|
|
196
|
+
catch (err) {
|
|
197
|
+
if (err instanceof SyntaxError) {
|
|
198
|
+
throw new Error(`Loop returned non-JSON response for team=${teamName} path=${path} ` +
|
|
199
|
+
`(status=${response.status}, length=${text.length})`);
|
|
200
|
+
}
|
|
201
|
+
throw err;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
export class LoopApiError extends Error {
|
|
205
|
+
status;
|
|
206
|
+
teamName;
|
|
207
|
+
path;
|
|
208
|
+
responseBody;
|
|
209
|
+
constructor(status, teamName, path, responseBody) {
|
|
210
|
+
const detail = responseBody ? ` — ${responseBody.slice(0, 200)}` : "";
|
|
211
|
+
super(`Loop API returned ${status} for team=${teamName} path=${path}${detail}`);
|
|
212
|
+
this.status = status;
|
|
213
|
+
this.teamName = teamName;
|
|
214
|
+
this.path = path;
|
|
215
|
+
this.responseBody = responseBody;
|
|
216
|
+
this.name = "LoopApiError";
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Fan out a request across all registered teams for an account, merging results.
|
|
221
|
+
*
|
|
222
|
+
* Each tool provides a `buildRequest` function that takes a decrypted API key
|
|
223
|
+
* and returns the data for that team. The aggregation engine handles:
|
|
224
|
+
* - Key loading and decryption
|
|
225
|
+
* - Permission checking
|
|
226
|
+
* - Concurrent fan-out via Promise.allSettled
|
|
227
|
+
* - Result merging with teamName tags
|
|
228
|
+
* - Aggregate logging
|
|
229
|
+
*
|
|
230
|
+
* When `teamName` is provided, only that team is queried (no fan-out).
|
|
231
|
+
*/
|
|
232
|
+
export async function aggregateAcrossTeams(accountId, endpointGroup, toolName, buildRequest, options) {
|
|
233
|
+
const allKeys = await loadTeamKeys(accountId);
|
|
234
|
+
if (allKeys.length === 0) {
|
|
235
|
+
return { results: [], failures: [], skipped: [], totalTeams: 0 };
|
|
236
|
+
}
|
|
237
|
+
// Filter to specific team if requested
|
|
238
|
+
const keys = options?.teamName
|
|
239
|
+
? allKeys.filter((k) => k.teamName === options.teamName)
|
|
240
|
+
: allKeys;
|
|
241
|
+
if (keys.length === 0 && options?.teamName) {
|
|
242
|
+
return {
|
|
243
|
+
results: [],
|
|
244
|
+
failures: [{ teamName: options.teamName, reason: "Team not found", kind: "other" }],
|
|
245
|
+
skipped: [],
|
|
246
|
+
totalTeams: allKeys.length,
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
const limitPerTeam = options?.limitPerTeam ?? DEFAULT_LIMIT_PER_TEAM;
|
|
250
|
+
const limitTotal = options?.limitTotal ?? DEFAULT_LIMIT_TOTAL;
|
|
251
|
+
const results = [];
|
|
252
|
+
const failures = [];
|
|
253
|
+
const skipped = [];
|
|
254
|
+
// Check permissions and build per-team request thunks. Thunks (not stored
|
|
255
|
+
// promises) are required so a timed-out attempt can be re-invoked on retry.
|
|
256
|
+
const tasks = [];
|
|
257
|
+
for (const key of keys) {
|
|
258
|
+
if (!key.permissions.includes(endpointGroup)) {
|
|
259
|
+
console.error(`[loop] ${toolName} team=${key.teamName} — permission denied (requires: ${endpointGroup})`);
|
|
260
|
+
skipped.push({
|
|
261
|
+
teamName: key.teamName,
|
|
262
|
+
reason: `No ${endpointGroup} permission`,
|
|
263
|
+
});
|
|
264
|
+
continue;
|
|
265
|
+
}
|
|
266
|
+
let apiKey;
|
|
267
|
+
try {
|
|
268
|
+
apiKey = decrypt(key.encryptedKey);
|
|
269
|
+
}
|
|
270
|
+
catch (err) {
|
|
271
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
272
|
+
console.error(`[loop] decrypt failed for team=${key.teamName}: ${msg}`);
|
|
273
|
+
failures.push({
|
|
274
|
+
teamName: key.teamName,
|
|
275
|
+
reason: "Decryption failed",
|
|
276
|
+
kind: "other",
|
|
277
|
+
});
|
|
278
|
+
continue;
|
|
279
|
+
}
|
|
280
|
+
const teamName = key.teamName;
|
|
281
|
+
tasks.push({
|
|
282
|
+
key,
|
|
283
|
+
run: async () => {
|
|
284
|
+
try {
|
|
285
|
+
return await buildRequest(apiKey, teamName);
|
|
286
|
+
}
|
|
287
|
+
catch (err) {
|
|
288
|
+
if (!isTimeoutError(err))
|
|
289
|
+
throw err;
|
|
290
|
+
console.error(`[loop] ${toolName} team=${teamName} timed out — retrying in ${TIMEOUT_RETRY_BACKOFF_MS}ms`);
|
|
291
|
+
await new Promise((resolve) => setTimeout(resolve, TIMEOUT_RETRY_BACKOFF_MS));
|
|
292
|
+
return await buildRequest(apiKey, teamName);
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
// Fan out concurrent requests
|
|
298
|
+
const settled = await Promise.allSettled(tasks.map((t) => t.run()));
|
|
299
|
+
for (let i = 0; i < settled.length; i++) {
|
|
300
|
+
const outcome = settled[i];
|
|
301
|
+
const teamName = tasks[i].key.teamName;
|
|
302
|
+
if (outcome.status === "fulfilled") {
|
|
303
|
+
const data = Array.isArray(outcome.value)
|
|
304
|
+
? outcome.value.slice(0, limitPerTeam)
|
|
305
|
+
: [];
|
|
306
|
+
results.push({ teamName, data });
|
|
307
|
+
}
|
|
308
|
+
else {
|
|
309
|
+
const reason = outcome.reason instanceof LoopApiError
|
|
310
|
+
? `HTTP ${outcome.reason.status}`
|
|
311
|
+
: outcome.reason instanceof Error
|
|
312
|
+
? outcome.reason.message
|
|
313
|
+
: String(outcome.reason);
|
|
314
|
+
const kind = isTimeoutError(outcome.reason)
|
|
315
|
+
? "timeout"
|
|
316
|
+
: "other";
|
|
317
|
+
console.error(`[loop] ${toolName} team=${teamName} failed: ${reason}`);
|
|
318
|
+
failures.push({ teamName, reason, kind });
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
// Apply total limit across all teams
|
|
322
|
+
let totalItems = 0;
|
|
323
|
+
for (const r of results) {
|
|
324
|
+
const remaining = limitTotal - totalItems;
|
|
325
|
+
if (remaining <= 0) {
|
|
326
|
+
r.data = [];
|
|
327
|
+
}
|
|
328
|
+
else if (r.data.length > remaining) {
|
|
329
|
+
r.data = r.data.slice(0, remaining);
|
|
330
|
+
}
|
|
331
|
+
totalItems += r.data.length;
|
|
332
|
+
}
|
|
333
|
+
const timedOutCount = failures.filter((f) => f.kind === "timeout").length;
|
|
334
|
+
const erroredCount = failures.length - timedOutCount;
|
|
335
|
+
console.error(`[loop] aggregate tool=${toolName} teams=${keys.length} ` +
|
|
336
|
+
`succeeded=${results.length} failed=${failures.length} skipped=${skipped.length}`);
|
|
337
|
+
console.error(`[loop] aggregate-coverage tool=${toolName} requested=${keys.length} ` +
|
|
338
|
+
`answered=${results.length} timed_out=${timedOutCount} errored=${erroredCount}`);
|
|
339
|
+
return { results, failures, skipped, totalTeams: allKeys.length };
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* Resolve a single team's API key with permission checking.
|
|
343
|
+
* Handles key loading, decryption, and permission validation.
|
|
344
|
+
* Used for both reads and writes that target a specific team — no fan-out.
|
|
345
|
+
*/
|
|
346
|
+
export async function withTeamKey(accountId, teamName, endpointGroup, toolName, execute) {
|
|
347
|
+
const allKeys = await loadTeamKeys(accountId);
|
|
348
|
+
if (allKeys.length === 0) {
|
|
349
|
+
throw new Error("No Loop teams registered. Use loop-key-register to add team API keys.");
|
|
350
|
+
}
|
|
351
|
+
const key = allKeys.find((k) => k.teamName === teamName);
|
|
352
|
+
if (!key) {
|
|
353
|
+
const available = allKeys.map((k) => k.teamName).join(", ");
|
|
354
|
+
throw new Error(`Team "${teamName}" not found. Available teams: ${available}`);
|
|
355
|
+
}
|
|
356
|
+
if (!key.permissions.includes(endpointGroup)) {
|
|
357
|
+
throw new Error(`Team "${teamName}" does not have ${endpointGroup} permission. ` +
|
|
358
|
+
`Current permissions: ${key.permissions.join(", ")}`);
|
|
359
|
+
}
|
|
360
|
+
const apiKey = decrypt(key.encryptedKey);
|
|
361
|
+
return execute(apiKey);
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* Format an aggregation result into a human-readable text response.
|
|
365
|
+
*/
|
|
366
|
+
export function formatAggregationResult(result, formatItem, entityName) {
|
|
367
|
+
if (result.totalTeams === 0) {
|
|
368
|
+
return "No Loop teams registered. Use loop-key-register to add team API keys.";
|
|
369
|
+
}
|
|
370
|
+
const allSkippedOrFailed = result.results.length === 0 && result.failures.length + result.skipped.length > 0;
|
|
371
|
+
if (allSkippedOrFailed) {
|
|
372
|
+
const reasons = [
|
|
373
|
+
...result.failures.map((f) => `${f.teamName}: ${f.reason}`),
|
|
374
|
+
...result.skipped.map((s) => `${s.teamName}: ${s.reason}`),
|
|
375
|
+
];
|
|
376
|
+
return `All teams failed or were skipped:\n${reasons.join("\n")}`;
|
|
377
|
+
}
|
|
378
|
+
const lines = [];
|
|
379
|
+
let totalItems = 0;
|
|
380
|
+
for (const teamResult of result.results) {
|
|
381
|
+
if (teamResult.data.length === 0)
|
|
382
|
+
continue;
|
|
383
|
+
totalItems += teamResult.data.length;
|
|
384
|
+
lines.push(`\n## ${teamResult.teamName}`);
|
|
385
|
+
for (const item of teamResult.data) {
|
|
386
|
+
lines.push(formatItem(item, teamResult.teamName));
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
// Coverage = teams that had a chance to answer (succeeded + failed). Skipped
|
|
390
|
+
// teams are excluded from the denominator: they were configured-out, not lost.
|
|
391
|
+
const answered = result.results.length;
|
|
392
|
+
const failed = result.failures.length;
|
|
393
|
+
const totalCovered = answered + failed;
|
|
394
|
+
const coverageNote = formatCoverageNote(result.failures);
|
|
395
|
+
if (totalItems === 0) {
|
|
396
|
+
if (failed > 0) {
|
|
397
|
+
return `No ${entityName} found across ${answered} of ${totalCovered} teams (${coverageNote}).`;
|
|
398
|
+
}
|
|
399
|
+
const teamCount = result.results.length === 1
|
|
400
|
+
? result.results[0].teamName
|
|
401
|
+
: `${result.results.length} teams`;
|
|
402
|
+
return `No ${entityName} found across ${teamCount}.`;
|
|
403
|
+
}
|
|
404
|
+
const teamCountFragment = failed > 0 ? `${answered} of ${totalCovered} team(s)` : `${answered} team(s)`;
|
|
405
|
+
let header = `${totalItems} ${entityName} across ${teamCountFragment}:`;
|
|
406
|
+
const parts = [header, ...lines];
|
|
407
|
+
if (failed > 0) {
|
|
408
|
+
parts.push(`\n---\nNote: ${coverageNote}.`);
|
|
409
|
+
}
|
|
410
|
+
if (result.skipped.length > 0) {
|
|
411
|
+
parts.push(`Note: ${result.skipped.length} team(s) skipped (insufficient permissions).`);
|
|
412
|
+
}
|
|
413
|
+
return parts.join("\n");
|
|
414
|
+
}
|
|
415
|
+
function formatCoverageNote(failures) {
|
|
416
|
+
const timedOut = failures.filter((f) => f.kind === "timeout");
|
|
417
|
+
const errored = failures.filter((f) => f.kind !== "timeout");
|
|
418
|
+
const fragments = [];
|
|
419
|
+
if (timedOut.length > 0) {
|
|
420
|
+
fragments.push(`${timedOut.length} timed out: ${timedOut.map((f) => f.teamName).join(", ")}`);
|
|
421
|
+
}
|
|
422
|
+
if (errored.length > 0) {
|
|
423
|
+
fragments.push(`${errored.length} errored: ${errored.map((f) => f.teamName).join(", ")}`);
|
|
424
|
+
}
|
|
425
|
+
return fragments.join("; ");
|
|
426
|
+
}
|
|
427
|
+
//# sourceMappingURL=loop-api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loop-api.js","sourceRoot":"","sources":["../../src/lib/loop-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,oEAAoE;AACpE,0DAA0D;AAC1D,EAAE;AACF,yCAAyC;AACzC,2CAA2C;AAC3C,2CAA2C;AAC3C,2CAA2C;AAC3C,2CAA2C;AAC3C,2CAA2C;AAC3C,2CAA2C;AAC3C,2CAA2C;AAC3C,2CAA2C;AAC3C,2CAA2C;AAC3C,2CAA2C;AAC3C,oEAAoE;AAEpE,MAAM,aAAa,GAAG,2BAA2B,CAAC;AAClD,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAClC,MAAM,wBAAwB,GAAG,KAAK,CAAC;AACvC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAClC,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAEhC,sEAAsE;AACtE,0EAA0E;AAC1E,SAAS,cAAc,CAAC,GAAY;IAClC,IAAI,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,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAC9E,CAAC;IACJ,CAAC;IACD,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,SAAS,CAAC,IAAI,CACZ,GAAG,OAAO,CAAC,MAAM,aAAa,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAC1E,CAAC;IACJ,CAAC;IACD,OAAO,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"neo4j.d.ts","sourceRoot":"","sources":["../../src/lib/neo4j.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAuBtD,wBAAgB,SAAS,IAAI,MAAM,CAgBlC;AAED,wBAAgB,UAAU,IAAI,OAAO,CAEpC;AAED,wBAAsB,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAKjD"}
|
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
// Task 580: NEO4J_URI must be explicit. Silent default to :7687 was the
|
|
19
|
+
// vector for Task 577's orphan data in Maxy's DB from a realagent install.
|
|
20
|
+
const uri = process.env.NEO4J_URI;
|
|
21
|
+
if (!uri) {
|
|
22
|
+
throw new Error("[loop] NEO4J_URI unset — refusing to default to bolt://localhost:7687 (Task 580)");
|
|
23
|
+
}
|
|
24
|
+
const user = process.env.NEO4J_USER ?? "neo4j";
|
|
25
|
+
const password = readPassword();
|
|
26
|
+
console.error(`[loop] 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
|
|
@@ -0,0 +1 @@
|
|
|
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,OAAO,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;IAElE,MAAM,YAAY,GAAG,OAAO,CAC1B,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,aAAa,CAAC,EACxE,wBAAwB,CACzB,CAAC;IAEF,IAAI,CAAC;QACH,OAAO,YAAY,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC;IACpD,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,KAAK,CACb,yCAAyC,YAAY,gCAAgC,CACtF,CAAC;IACJ,CAAC;AACH,CAAC;AAED,MAAM,UAAU,SAAS;IACvB,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,wEAAwE;QACxE,2EAA2E;QAC3E,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC;QAClC,IAAI,CAAC,GAAG,EAAE,CAAC;YACT,MAAM,IAAI,KAAK,CACb,kFAAkF,CACnF,CAAC;QACJ,CAAC;QACD,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,OAAO,CAAC;QAC/C,MAAM,QAAQ,GAAG,YAAY,EAAE,CAAC;QAChC,OAAO,CAAC,KAAK,CAAC,6BAA6B,GAAG,EAAE,CAAC,CAAC;QAClD,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC;IAC/D,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,UAAU;IACxB,OAAO,SAAS,EAAE,CAAC,OAAO,EAAE,CAAC;AAC/B,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,WAAW;IAC/B,IAAI,MAAM,EAAE,CAAC;QACX,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;QACrB,MAAM,GAAG,IAAI,CAAC;IAChB,CAAC;AACH,CAAC"}
|
package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/customer-preferences.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type PreferencesAction = "read" | "write";
|
|
2
|
+
export declare function customerPreferences(params: {
|
|
3
|
+
accountId: string;
|
|
4
|
+
teamName: string;
|
|
5
|
+
personCode: number;
|
|
6
|
+
action: PreferencesAction;
|
|
7
|
+
preferences?: Record<string, unknown>;
|
|
8
|
+
}): Promise<string>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=customer-preferences.d.ts.map
|
package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/customer-preferences.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customer-preferences.d.ts","sourceRoot":"","sources":["../../src/tools/customer-preferences.ts"],"names":[],"mappings":"AAEA,KAAK,iBAAiB,GAAG,MAAM,GAAG,OAAO,CAAC;AAmB1C,wBAAsB,mBAAmB,CAAC,MAAM,EAAE;IAChD,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACvC,GAAG,OAAO,CAAC,MAAM,CAAC,CAsClB"}
|
package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/customer-preferences.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { loopGet, loopPost, withTeamKey } from "../lib/loop-api.js";
|
|
2
|
+
export async function customerPreferences(params) {
|
|
3
|
+
const { accountId, teamName, personCode, action } = params;
|
|
4
|
+
if (action === "read") {
|
|
5
|
+
const result = await withTeamKey(accountId, teamName, "customer", "loop-customer-preferences", async (apiKey) => {
|
|
6
|
+
return loopGet(apiKey, `/customer/preferences/${personCode}`, "loop-customer-preferences", teamName);
|
|
7
|
+
});
|
|
8
|
+
if (!result || (Array.isArray(result) && result.length === 0)) {
|
|
9
|
+
return `No preferences found for person ${personCode} via team "${teamName}".`;
|
|
10
|
+
}
|
|
11
|
+
return JSON.stringify(result, null, 2);
|
|
12
|
+
}
|
|
13
|
+
if (action === "write") {
|
|
14
|
+
if (!params.preferences) {
|
|
15
|
+
throw new Error("preferences object is required when action is 'write'.");
|
|
16
|
+
}
|
|
17
|
+
await withTeamKey(accountId, teamName, "customer", "loop-customer-preferences", async (apiKey) => {
|
|
18
|
+
return loopPost(apiKey, `/customer/preferences/${personCode}`, params.preferences, "loop-customer-preferences", teamName);
|
|
19
|
+
});
|
|
20
|
+
return `Preferences updated for person ${personCode} via team "${teamName}".`;
|
|
21
|
+
}
|
|
22
|
+
throw new Error(`Unknown action: ${action}. Use "read" or "write".`);
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=customer-preferences.js.map
|
package/payload/premium-plugins/real-agent/plugins/loop/mcp/dist/tools/customer-preferences.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customer-preferences.js","sourceRoot":"","sources":["../../src/tools/customer-preferences.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAqBpE,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,MAMzC;IACC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IAE3D,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;QACtB,MAAM,MAAM,GAAG,MAAM,WAAW,CAC9B,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,2BAA2B,EAC5D,KAAK,EAAE,MAAM,EAAE,EAAE;YACf,OAAO,OAAO,CACZ,MAAM,EAAE,yBAAyB,UAAU,EAAE,EAC7C,2BAA2B,EAAE,QAAQ,CACtC,CAAC;QACJ,CAAC,CACF,CAAC;QAEF,IAAI,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,EAAE,CAAC;YAC9D,OAAO,mCAAmC,UAAU,cAAc,QAAQ,IAAI,CAAC;QAC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