@rubytech/create-maxy-code 0.1.24 → 0.1.27
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 +81 -17
- package/package.json +1 -1
- package/payload/platform/plugins/.claude-plugin/marketplace.json +5 -95
- package/payload/platform/plugins/admin/PLUGIN.md +46 -23
- package/payload/platform/plugins/admin/skills/onboarding/SKILL.md +111 -126
- package/payload/platform/plugins/brochures/.claude-plugin/plugin.json +8 -0
- package/payload/platform/plugins/brochures/PLUGIN.md +36 -0
- package/payload/platform/plugins/brochures/commands/make-brochure.md +11 -0
- package/payload/platform/plugins/brochures/skills/a4-print-documents/SKILL.md +478 -0
- package/payload/platform/plugins/brochures/skills/brand-design/SKILL.md +192 -0
- package/payload/platform/plugins/brochures/skills/make-brochure/SKILL.md +354 -0
- package/payload/platform/plugins/brochures/skills/make-brochure/references/seller-brief-template.md +115 -0
- package/payload/platform/plugins/brochures/skills/property-brochure/SKILL.md +119 -0
- package/payload/platform/plugins/brochures/skills/property-brochure/references/build.md +270 -0
- package/payload/platform/plugins/brochures/skills/property-brochure/references/copy.md +211 -0
- package/payload/platform/plugins/brochures/skills/property-brochure/references/images.md +166 -0
- package/payload/platform/plugins/brochures/skills/property-brochure/references/index-landing.md +376 -0
- package/payload/platform/plugins/brochures/skills/property-brochure/references/index.html +1288 -0
- package/payload/platform/plugins/brochures/skills/property-brochure/references/placeholders.md +250 -0
- package/payload/platform/plugins/brochures/skills/property-brochure/references/registers.md +47 -0
- package/payload/platform/plugins/brochures/skills/property-brochure/references/seller-brief.md +56 -0
- package/payload/platform/plugins/brochures/skills/property-brochure/references/structure.md +249 -0
- package/payload/platform/plugins/brochures/skills/property-brochure/references/template.html +2370 -0
- package/payload/platform/plugins/brochures/skills/property-extract/SKILL.md +372 -0
- package/payload/platform/plugins/buyers/.claude-plugin/plugin.json +8 -0
- package/payload/platform/plugins/buyers/PLUGIN.md +35 -0
- package/payload/platform/plugins/buyers/skills/buyer-feedback/SKILL.md +109 -0
- package/payload/platform/plugins/buyers/skills/buyer-management/SKILL.md +42 -0
- package/payload/platform/plugins/buyers/skills/buyer-management/references/buyer-qualification-questions.md +16 -0
- package/payload/platform/plugins/buyers/skills/buyer-management/references/buyer-qualification.md +59 -0
- package/payload/platform/plugins/buyers/skills/buyer-management/references/buyer-scripts.md +63 -0
- package/payload/platform/plugins/buyers/skills/buyer-management/references/buyer-working-scripts.md +54 -0
- package/payload/platform/plugins/buyers/skills/buyer-management/references/feedback-collection.md +42 -0
- package/payload/platform/plugins/buyers/skills/buyer-management/references/offer-capture.md +38 -0
- package/payload/platform/plugins/buyers/skills/buyer-management/references/viewing-booking.md +32 -0
- package/payload/platform/plugins/buyers/skills/buyer-management/references/viewing-management.md +52 -0
- package/payload/platform/plugins/buyers/skills/buyer-seller-guides/SKILL.md +407 -0
- package/payload/platform/plugins/buyers/skills/buyer-seller-guides/references/care-fees-guide.md +68 -0
- package/payload/platform/plugins/buyers/skills/buyer-seller-guides/references/divorce-sales-guide.md +61 -0
- package/payload/platform/plugins/buyers/skills/buyer-seller-guides/references/downsizing-guide.md +45 -0
- package/payload/platform/plugins/buyers/skills/buyer-seller-guides/references/first-time-buyers.md +92 -0
- package/payload/platform/plugins/buyers/skills/buyer-seller-guides/references/first-time-sellers.md +78 -0
- package/payload/platform/plugins/buyers/skills/buyer-seller-guides/references/probate-guide.md +53 -0
- package/payload/platform/plugins/buyers/skills/buyer-seller-guides/references/upsizing-guide.md +41 -0
- package/payload/platform/plugins/buyers/skills/property-enquiry/SKILL.md +126 -0
- package/payload/platform/plugins/buyers/skills/viewing-management/SKILL.md +111 -0
- package/payload/platform/plugins/cloudflare/references/dashboard-guide.md +37 -0
- package/payload/platform/plugins/cloudflare/references/manual-setup.md +81 -1
- package/payload/platform/plugins/cloudflare/scripts/__tests__/tunnel-ingress.test.ts +241 -0
- package/payload/platform/plugins/cloudflare/scripts/setup-tunnel.sh +267 -28
- package/payload/platform/plugins/cloudflare/scripts/tunnel-ingress.ts +291 -0
- package/payload/platform/plugins/cloudflare/skills/setup-tunnel/SKILL.md +42 -0
- package/payload/platform/plugins/contacts/PLUGIN.md +18 -9
- package/payload/platform/plugins/docs/references/platform.md +2 -0
- package/payload/platform/plugins/docs/references/troubleshooting.md +12 -0
- package/payload/platform/plugins/email/PLUGIN.md +18 -9
- package/payload/platform/plugins/email/mcp/dist/lib/claude-bridge.d.ts +17 -0
- package/payload/platform/plugins/email/mcp/dist/lib/claude-bridge.d.ts.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/lib/claude-bridge.js +185 -0
- package/payload/platform/plugins/email/mcp/dist/lib/claude-bridge.js.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/scripts/email-auto-respond.js +34 -111
- package/payload/platform/plugins/email/mcp/dist/scripts/email-auto-respond.js.map +1 -1
- package/payload/platform/plugins/estate-business/.claude-plugin/plugin.json +8 -0
- package/payload/platform/plugins/estate-business/PLUGIN.md +65 -0
- package/payload/platform/plugins/estate-business/skills/business-growth/SKILL.md +133 -0
- package/payload/platform/plugins/estate-business/skills/business-growth/references/buy-back-your-time.md +37 -0
- package/payload/platform/plugins/estate-business/skills/business-growth/references/firewave-gost-scorecards.md +14 -0
- package/payload/platform/plugins/estate-business/skills/business-growth/references/keller-org-model.md +17 -0
- package/payload/platform/plugins/estate-business/skills/business-growth/references/lencioni-team-models.md +22 -0
- package/payload/platform/plugins/estate-business/skills/business-growth/references/listing-management-system.md +11 -0
- package/payload/platform/plugins/estate-business/skills/business-growth/references/net-figure-form.md +11 -0
- package/payload/platform/plugins/estate-business/skills/business-growth/references/serhant-bizinbox-notes.md +13 -0
- package/payload/platform/plugins/estate-business/skills/business-growth/references/team-roles-commission.md +14 -0
- package/payload/platform/plugins/estate-business/skills/business-growth/references/va-2026-ops.md +43 -0
- package/payload/platform/plugins/estate-business/skills/business-growth/references/wingman-structure.md +13 -0
- package/payload/platform/plugins/estate-business/skills/business-operations/SKILL.md +32 -0
- package/payload/platform/plugins/estate-business/skills/business-operations/references/crm-systems.md +57 -0
- package/payload/platform/plugins/estate-business/skills/business-operations/references/hiring-guide.md +59 -0
- package/payload/platform/plugins/estate-business/skills/business-operations/references/impact-framework.md +47 -0
- package/payload/platform/plugins/estate-business/skills/business-operations/references/minutes-equal-money.md +55 -0
- package/payload/platform/plugins/estate-business/skills/business-operations/references/team-management.md +48 -0
- package/payload/platform/plugins/estate-business/skills/commission-calculator/SKILL.md +40 -0
- package/payload/platform/plugins/estate-business/skills/exp-partnership/SKILL.md +52 -0
- package/payload/platform/plugins/estate-business/skills/exp-partnership/references/12-reasons.md +39 -0
- package/payload/platform/plugins/estate-business/skills/exp-partnership/references/95-5-system.md +66 -0
- package/payload/platform/plugins/estate-business/skills/exp-partnership/references/agent-attraction-scripts.md +90 -0
- package/payload/platform/plugins/estate-business/skills/exp-partnership/references/business-partnership.md +92 -0
- package/payload/platform/plugins/estate-business/skills/exp-partnership/references/exp-model-overview.md +66 -0
- package/payload/platform/plugins/estate-business/skills/exp-partnership/references/model-comparison.md +66 -0
- package/payload/platform/plugins/estate-business/skills/exp-partnership/references/revenue-share-explained.md +57 -0
- package/payload/platform/plugins/estate-business/skills/month-end-close/SKILL.md +69 -0
- package/payload/platform/plugins/estate-business/skills/payment-batch-stager/SKILL.md +42 -0
- package/payload/platform/plugins/estate-business/skills/period-reconciler/SKILL.md +42 -0
- package/payload/platform/plugins/estate-business/skills/personal-branding/SKILL.md +117 -0
- package/payload/platform/plugins/estate-business/skills/personal-branding/references/attraction-agent-notes.md +31 -0
- package/payload/platform/plugins/estate-business/skills/personal-branding/references/attraction-agent.md +58 -0
- package/payload/platform/plugins/estate-business/skills/personal-branding/references/authenticity-boundaries.md +28 -0
- package/payload/platform/plugins/estate-business/skills/personal-branding/references/become-a-brand-leader-notes.md +19 -0
- package/payload/platform/plugins/estate-business/skills/personal-branding/references/blast-formula.md +42 -0
- package/payload/platform/plugins/estate-business/skills/personal-branding/references/brand-leader.md +48 -0
- package/payload/platform/plugins/estate-business/skills/personal-branding/references/brand-strategy-system.md +59 -0
- package/payload/platform/plugins/estate-business/skills/personal-branding/references/content-engine.md +49 -0
- package/payload/platform/plugins/estate-business/skills/personal-branding/references/firewave-blast-and-blogging.md +23 -0
- package/payload/platform/plugins/estate-business/skills/personal-branding/references/gary-v-content.md +52 -0
- package/payload/platform/plugins/estate-business/skills/personal-branding/references/gary-v-principles.md +20 -0
- package/payload/platform/plugins/estate-business/skills/personal-branding/references/oversubscribed-positioning.md +18 -0
- package/payload/platform/plugins/estate-business/skills/personal-branding/references/platforms.md +41 -0
- package/payload/platform/plugins/estate-business/skills/personal-branding/references/priestley-oversubscribed.md +54 -0
- package/payload/platform/plugins/estate-business/skills/personal-branding/references/storeys-style-examples.md +25 -0
- package/payload/platform/plugins/estate-business/skills/personal-branding/references/visual-identity.md +27 -0
- package/payload/platform/plugins/estate-coaching/.claude-plugin/plugin.json +8 -0
- package/payload/platform/plugins/estate-coaching/PLUGIN.md +55 -0
- package/payload/platform/plugins/estate-coaching/skills/agent-performance/SKILL.md +371 -0
- package/payload/platform/plugins/estate-coaching/skills/agent-performance/references/atomic-habits.md +52 -0
- package/payload/platform/plugins/estate-coaching/skills/agent-performance/references/daily-routine-scorecard.md +104 -0
- package/payload/platform/plugins/estate-coaching/skills/agent-performance/references/hp6-model.md +63 -0
- package/payload/platform/plugins/estate-coaching/skills/agent-performance/references/twelve-week-year.md +71 -0
- package/payload/platform/plugins/estate-coaching/skills/bespoke-coaching/SKILL.md +36 -0
- package/payload/platform/plugins/estate-coaching/skills/bespoke-coaching/references/coaching-boundaries.md +56 -0
- package/payload/platform/plugins/estate-coaching/skills/bespoke-coaching/references/feedback-framework.md +61 -0
- package/payload/platform/plugins/estate-coaching/skills/bespoke-coaching/references/performance-framework.md +109 -0
- package/payload/platform/plugins/estate-coaching/skills/coaching-toolkit/SKILL.md +421 -0
- package/payload/platform/plugins/estate-coaching/skills/coaching-toolkit/references/coaching-exercises.md +86 -0
- package/payload/platform/plugins/estate-coaching/skills/coaching-toolkit/references/goal-setting.md +78 -0
- package/payload/platform/plugins/estate-coaching/skills/coaching-toolkit/references/one-to-one-framework.md +92 -0
- package/payload/platform/plugins/estate-coaching/skills/coaching-toolkit/references/soi-workbook.md +103 -0
- package/payload/platform/plugins/estate-coaching/skills/serhant-training/SKILL.md +410 -0
- package/payload/platform/plugins/estate-coaching/skills/serhant-training/references/agent-training-guide.md +70 -0
- package/payload/platform/plugins/estate-coaching/skills/serhant-training/references/business-in-a-box.md +72 -0
- package/payload/platform/plugins/estate-coaching/skills/serhant-training/references/buyers-guide.md +53 -0
- package/payload/platform/plugins/estate-coaching/skills/serhant-training/references/codo-method.md +72 -0
- package/payload/platform/plugins/estate-coaching/skills/serhant-training/references/website-planning-guide.md +79 -0
- package/payload/platform/plugins/estate-onboarding/.claude-plugin/plugin.json +8 -0
- package/payload/platform/plugins/estate-onboarding/PLUGIN.md +31 -0
- package/payload/platform/plugins/estate-onboarding/skills/bootstrap/SKILL.md +26 -0
- package/payload/platform/plugins/estate-onboarding/skills/bootstrap/references/onboarding-flow.md +63 -0
- package/payload/platform/plugins/estate-sales/.claude-plugin/plugin.json +8 -0
- package/payload/platform/plugins/estate-sales/PLUGIN.md +53 -0
- package/payload/platform/plugins/estate-sales/skills/chase-progression/SKILL.md +107 -0
- package/payload/platform/plugins/estate-sales/skills/negotiation/SKILL.md +35 -0
- package/payload/platform/plugins/estate-sales/skills/negotiation/references/deal-saving.md +47 -0
- package/payload/platform/plugins/estate-sales/skills/negotiation/references/negotiation-deep-guide.md +64 -0
- package/payload/platform/plugins/estate-sales/skills/negotiation/references/negotiation-prep-principles.md +29 -0
- package/payload/platform/plugins/estate-sales/skills/negotiation/references/negotiation-techniques.md +42 -0
- package/payload/platform/plugins/estate-sales/skills/negotiation/references/offer-presentation.md +43 -0
- package/payload/platform/plugins/estate-sales/skills/risk-scorer/SKILL.md +42 -0
- package/payload/platform/plugins/estate-sales/skills/sales-closer/SKILL.md +24 -0
- package/payload/platform/plugins/estate-sales/skills/sales-closer/references/serhant-emotion-stages.md +36 -0
- package/payload/platform/plugins/estate-sales/skills/sales-discovery/SKILL.md +30 -0
- package/payload/platform/plugins/estate-sales/skills/sales-discovery/references/chris-voss-discovery.md +88 -0
- package/payload/platform/plugins/estate-sales/skills/sales-discovery/references/firewave-gost-journey.md +68 -0
- package/payload/platform/plugins/estate-sales/skills/sales-discovery/references/phil-jones-openers.md +78 -0
- package/payload/platform/plugins/estate-sales/skills/sales-discovery/references/pre-listing-checklist.md +77 -0
- package/payload/platform/plugins/estate-sales/skills/sales-discovery/references/serhant-improv.md +22 -0
- package/payload/platform/plugins/estate-sales/skills/sales-discovery/references/tom-ferry-discovery.md +103 -0
- package/payload/platform/plugins/estate-sales/skills/sales-discovery/references/vendor-motivation-competitor.md +52 -0
- package/payload/platform/plugins/estate-sales/skills/sales-negotiation/SKILL.md +29 -0
- package/payload/platform/plugins/estate-sales/skills/sales-negotiation/references/chris-voss-negotiation.md +70 -0
- package/payload/platform/plugins/estate-sales/skills/sales-negotiation/references/phil-jones-price-words.md +40 -0
- package/payload/platform/plugins/estate-sales/skills/sales-negotiation/references/serhant-negotiation-plus.md +55 -0
- package/payload/platform/plugins/estate-sales/skills/sales-negotiation/references/tom-panos-commission-pricing.md +57 -0
- package/payload/platform/plugins/estate-sales/skills/sales-negotiation/references/tony-morris-questioning.md +54 -0
- package/payload/platform/plugins/estate-sales/skills/sales-progression/SKILL.md +27 -0
- package/payload/platform/plugins/estate-sales/skills/sales-progression/references/conveyancing-guide.md +54 -0
- package/payload/platform/plugins/estate-sales/skills/sales-progression/references/transaction-tracking.md +66 -0
- package/payload/platform/plugins/estate-teaching/.claude-plugin/plugin.json +8 -0
- package/payload/platform/plugins/estate-teaching/PLUGIN.md +31 -0
- package/payload/platform/plugins/estate-teaching/skills/content-directory/SKILL.md +39 -0
- package/payload/platform/plugins/estate-teaching/skills/content-directory/references/module-delivery.md +65 -0
- package/payload/platform/plugins/estate-teaching/skills/content-directory/references/progress-tracking.md +47 -0
- package/payload/platform/plugins/leads/.claude-plugin/plugin.json +8 -0
- package/payload/platform/plugins/leads/PLUGIN.md +62 -0
- package/payload/platform/plugins/leads/skills/chain-progression-tracker/SKILL.md +51 -0
- package/payload/platform/plugins/leads/skills/diary-builder/SKILL.md +38 -0
- package/payload/platform/plugins/leads/skills/enquiry-triage/SKILL.md +36 -0
- package/payload/platform/plugins/leads/skills/lead-nurturing/SKILL.md +137 -0
- package/payload/platform/plugins/leads/skills/lead-nurturing/references/buyer-search-letter.md +28 -0
- package/payload/platform/plugins/leads/skills/lead-nurturing/references/buyer-search-letters.md +37 -0
- package/payload/platform/plugins/leads/skills/lead-nurturing/references/database-reactivation.md +30 -0
- package/payload/platform/plugins/leads/skills/lead-nurturing/references/email-nurture-sequences.md +45 -0
- package/payload/platform/plugins/leads/skills/lead-nurturing/references/facebook-referrals.md +30 -0
- package/payload/platform/plugins/leads/skills/lead-nurturing/references/firewave-email-nurture-sequences.md +41 -0
- package/payload/platform/plugins/leads/skills/lead-nurturing/references/keller-33-touch.md +34 -0
- package/payload/platform/plugins/leads/skills/lead-nurturing/references/neighbour-letters.md +31 -0
- package/payload/platform/plugins/leads/skills/lead-nurturing/references/neighbour-notification-letter.md +20 -0
- package/payload/platform/plugins/leads/skills/lead-nurturing/references/ofi-follow-up-dialogue.md +22 -0
- package/payload/platform/plugins/leads/skills/lead-nurturing/references/ofi-follow-up.md +26 -0
- package/payload/platform/plugins/leads/skills/lead-nurturing/references/serhant-three-fs-plus.md +21 -0
- package/payload/platform/plugins/leads/skills/lead-nurturing/references/sharran-10x10x10.md +18 -0
- package/payload/platform/plugins/leads/skills/lead-nurturing/references/sms-templates.md +40 -0
- package/payload/platform/plugins/leads/skills/lead-nurturing/references/sphere-of-influence-notes.md +34 -0
- package/payload/platform/plugins/leads/skills/lead-nurturing/references/sphere-of-influence.md +60 -0
- package/payload/platform/plugins/leads/skills/lead-nurturing/references/tom-panos-sms-templates.md +59 -0
- package/payload/platform/plugins/leads/skills/morning-round/SKILL.md +72 -0
- package/payload/platform/plugins/leads/skills/prospecting/SKILL.md +33 -0
- package/payload/platform/plugins/leads/skills/prospecting/references/database-matching.md +30 -0
- package/payload/platform/plugins/leads/skills/prospecting/references/database-value.md +53 -0
- package/payload/platform/plugins/leads/skills/prospecting/references/prospecting-dialogues.md +24 -0
- package/payload/platform/plugins/leads/skills/prospecting/references/reactivation.md +34 -0
- package/payload/platform/plugins/listings/.claude-plugin/plugin.json +8 -0
- package/payload/platform/plugins/listings/PLUGIN.md +103 -0
- package/payload/platform/plugins/listings/skills/comparable-finder/SKILL.md +52 -0
- package/payload/platform/plugins/listings/skills/epc-checker/SKILL.md +38 -0
- package/payload/platform/plugins/listings/skills/home-preparation/SKILL.md +28 -0
- package/payload/platform/plugins/listings/skills/home-preparation/references/kerb-appeal.md +38 -0
- package/payload/platform/plugins/listings/skills/home-preparation/references/photo-day.md +59 -0
- package/payload/platform/plugins/listings/skills/home-preparation/references/situational-tips.md +50 -0
- package/payload/platform/plugins/listings/skills/home-preparation/references/staging-guide.md +52 -0
- package/payload/platform/plugins/listings/skills/listing-copy-writer/SKILL.md +55 -0
- package/payload/platform/plugins/listings/skills/listing-presentation/SKILL.md +286 -0
- package/payload/platform/plugins/listings/skills/listing-presentation/references/booking-script.md +51 -0
- package/payload/platform/plugins/listings/skills/listing-presentation/references/objection-scripts.md +193 -0
- package/payload/platform/plugins/listings/skills/listing-presentation/references/penhaul-presentation.md +123 -0
- package/payload/platform/plugins/listings/skills/listing-presentation/references/pre-listing-kit.md +139 -0
- package/payload/platform/plugins/listings/skills/listing-presentation/references/set-to-sell.md +55 -0
- package/payload/platform/plugins/listings/skills/listing-presentation/references/sharran-frameworks.md +107 -0
- package/payload/platform/plugins/listings/skills/local-market-stats/SKILL.md +33 -0
- package/payload/platform/plugins/listings/skills/new-instruction/SKILL.md +78 -0
- package/payload/platform/plugins/listings/skills/particulars-builder/SKILL.md +48 -0
- package/payload/platform/plugins/listings/skills/portal-launch-scheduler/SKILL.md +49 -0
- package/payload/platform/plugins/listings/skills/pricing-scenario-builder/SKILL.md +35 -0
- package/payload/platform/plugins/listings/skills/property-marketing/SKILL.md +337 -0
- package/payload/platform/plugins/listings/skills/property-marketing/references/auction-report-template.md +41 -0
- package/payload/platform/plugins/listings/skills/property-marketing/references/coming-soon-campaign.md +43 -0
- package/payload/platform/plugins/listings/skills/property-marketing/references/direct-mail-templates.md +121 -0
- package/payload/platform/plugins/listings/skills/property-marketing/references/eoi-form-template.md +62 -0
- package/payload/platform/plugins/listings/skills/property-marketing/references/monthly-scorecard.md +63 -0
- package/payload/platform/plugins/listings/skills/supplier-booker/SKILL.md +39 -0
- package/payload/platform/plugins/listings/skills/talk-track-composer/SKILL.md +36 -0
- package/payload/platform/plugins/listings/skills/terms-of-business-drafter/SKILL.md +54 -0
- package/payload/platform/plugins/listings/skills/valuation-prep/SKILL.md +69 -0
- package/payload/platform/plugins/loop/.claude-plugin/plugin.json +17 -0
- package/payload/platform/plugins/loop/PLUGIN.md +108 -0
- package/payload/platform/plugins/loop/mcp/dist/index.d.ts +2 -0
- package/payload/platform/plugins/loop/mcp/dist/index.d.ts.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/index.js +293 -0
- package/payload/platform/plugins/loop/mcp/dist/index.js.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/lib/crypto.d.ts +10 -0
- package/payload/platform/plugins/loop/mcp/dist/lib/crypto.d.ts.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/lib/crypto.js +88 -0
- package/payload/platform/plugins/loop/mcp/dist/lib/crypto.js.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/lib/loop-api.d.ts +82 -0
- package/payload/platform/plugins/loop/mcp/dist/lib/loop-api.d.ts.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/lib/loop-api.js +427 -0
- package/payload/platform/plugins/loop/mcp/dist/lib/loop-api.js.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/lib/neo4j.d.ts +5 -0
- package/payload/platform/plugins/loop/mcp/dist/lib/neo4j.d.ts.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/lib/neo4j.js +40 -0
- package/payload/platform/plugins/loop/mcp/dist/lib/neo4j.js.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/customer-preferences.d.ts +10 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/customer-preferences.d.ts.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/customer-preferences.js +24 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/customer-preferences.js.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/feedback.d.ts +16 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/feedback.d.ts.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/feedback.js +35 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/feedback.js.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/key-deregister.d.ts +5 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/key-deregister.d.ts.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/key-deregister.js +19 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/key-deregister.js.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/key-list.d.ts +4 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/key-list.d.ts.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/key-list.js +14 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/key-list.js.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/key-register.d.ts +9 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/key-register.d.ts.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/key-register.js +60 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/key-register.js.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/marketing-enquiry.d.ts +13 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/marketing-enquiry.d.ts.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/marketing-enquiry.js +41 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/marketing-enquiry.js.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/marketing-match-batch.d.ts +9 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/marketing-match-batch.d.ts.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/marketing-match-batch.js +16 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/marketing-match-batch.js.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/marketing-match-request.d.ts +15 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/marketing-match-request.d.ts.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/marketing-match-request.js +11 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/marketing-match-request.js.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/marketing-match.d.ts +10 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/marketing-match.d.ts.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/marketing-match.js +39 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/marketing-match.js.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/people-detail.d.ts +9 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/people-detail.d.ts.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/people-detail.js +125 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/people-detail.js.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/people-search.d.ts +18 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/people-search.d.ts.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/people-search.js +87 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/people-search.js.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/property-detail.d.ts +10 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/property-detail.d.ts.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/property-detail.js +82 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/property-detail.js.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/property-listed.d.ts +12 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/property-listed.d.ts.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/property-listed.js +32 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/property-listed.js.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/property-request.d.ts +15 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/property-request.d.ts.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/property-request.js +11 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/property-request.js.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/property-search.d.ts +16 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/property-search.d.ts.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/property-search.js +41 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/property-search.js.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/supplier.d.ts +13 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/supplier.d.ts.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/supplier.js +49 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/supplier.js.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/team-availability.d.ts +7 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/team-availability.d.ts.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/team-availability.js +19 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/team-availability.js.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/team-info.d.ts +5 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/team-info.d.ts.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/team-info.js +32 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/team-info.js.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/viewing-create.d.ts +14 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/viewing-create.d.ts.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/viewing-create.js +11 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/viewing-create.js.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/viewing-detail.d.ts +9 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/viewing-detail.d.ts.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/viewing-detail.js +85 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/viewing-detail.js.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/viewing-search.d.ts +13 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/viewing-search.d.ts.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/viewing-search.js +44 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/viewing-search.js.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/viewing-update.d.ts +14 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/viewing-update.d.ts.map +1 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/viewing-update.js +18 -0
- package/payload/platform/plugins/loop/mcp/dist/tools/viewing-update.js.map +1 -0
- package/payload/platform/plugins/loop/mcp/package-lock.json +2549 -0
- package/payload/platform/plugins/loop/mcp/package.json +21 -0
- package/payload/platform/plugins/loop/mcp/src/__tests__/loop-swagger.snapshot.json +26467 -0
- package/payload/platform/plugins/loop/mcp/src/__tests__/swagger-write-coverage.test.ts +153 -0
- package/payload/platform/plugins/loop/mcp/src/index.ts +444 -0
- package/payload/platform/plugins/loop/mcp/src/lib/crypto.ts +105 -0
- package/payload/platform/plugins/loop/mcp/src/lib/loop-api.ts +604 -0
- package/payload/platform/plugins/loop/mcp/src/lib/neo4j.ts +51 -0
- package/payload/platform/plugins/loop/mcp/src/tools/customer-preferences.ts +66 -0
- package/payload/platform/plugins/loop/mcp/src/tools/feedback.ts +86 -0
- package/payload/platform/plugins/loop/mcp/src/tools/key-deregister.ts +27 -0
- package/payload/platform/plugins/loop/mcp/src/tools/key-list.ts +19 -0
- package/payload/platform/plugins/loop/mcp/src/tools/key-register.ts +95 -0
- package/payload/platform/plugins/loop/mcp/src/tools/marketing-enquiry.ts +113 -0
- package/payload/platform/plugins/loop/mcp/src/tools/marketing-match-batch.ts +53 -0
- package/payload/platform/plugins/loop/mcp/src/tools/marketing-match-request.ts +42 -0
- package/payload/platform/plugins/loop/mcp/src/tools/marketing-match.ts +84 -0
- package/payload/platform/plugins/loop/mcp/src/tools/people-detail.ts +245 -0
- package/payload/platform/plugins/loop/mcp/src/tools/people-search.ts +180 -0
- package/payload/platform/plugins/loop/mcp/src/tools/property-detail.ts +145 -0
- package/payload/platform/plugins/loop/mcp/src/tools/property-listed.ts +88 -0
- package/payload/platform/plugins/loop/mcp/src/tools/property-request.ts +42 -0
- package/payload/platform/plugins/loop/mcp/src/tools/property-search.ts +92 -0
- package/payload/platform/plugins/loop/mcp/src/tools/supplier.ts +129 -0
- package/payload/platform/plugins/loop/mcp/src/tools/team-availability.ts +52 -0
- package/payload/platform/plugins/loop/mcp/src/tools/team-info.ts +95 -0
- package/payload/platform/plugins/loop/mcp/src/tools/viewing-create.ts +41 -0
- package/payload/platform/plugins/loop/mcp/src/tools/viewing-detail.ts +171 -0
- package/payload/platform/plugins/loop/mcp/src/tools/viewing-search.ts +92 -0
- package/payload/platform/plugins/loop/mcp/src/tools/viewing-update.ts +53 -0
- package/payload/platform/plugins/loop/mcp/tsconfig.json +20 -0
- package/payload/platform/plugins/loop/mcp/vitest.config.ts +9 -0
- package/payload/platform/plugins/loop/skills/compliance-flag-checker/SKILL.md +53 -0
- package/payload/platform/plugins/loop/skills/priority-ranker/SKILL.md +40 -0
- package/payload/platform/plugins/loop/skills/tone-matched-drafter/SKILL.md +53 -0
- package/payload/platform/plugins/loop/skills/variance-narrator/SKILL.md +50 -0
- package/payload/platform/plugins/loop/skills/vendor-research/SKILL.md +54 -0
- package/payload/platform/plugins/memory/PLUGIN.md +58 -29
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-read.d.ts +3 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-read.d.ts.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-read.js +105 -4
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-read.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-update.d.ts.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-update.js +16 -3
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-update.js.map +1 -1
- package/payload/platform/plugins/outlook/PLUGIN.md +14 -7
- package/payload/platform/plugins/replicate/PLUGIN.md +6 -3
- package/payload/platform/plugins/scheduling/PLUGIN.md +16 -8
- package/payload/platform/plugins/tasks/PLUGIN.md +28 -14
- package/payload/platform/plugins/teaching/.claude-plugin/plugin.json +8 -0
- package/payload/platform/plugins/teaching/PLUGIN.md +57 -0
- package/payload/platform/plugins/teaching/skills/interactive-tutor/SKILL.md +59 -0
- package/payload/platform/plugins/teaching/skills/interactive-tutor/references/assessment.md +70 -0
- package/payload/platform/plugins/teaching/skills/interactive-tutor/references/classroom-conduct.md +43 -0
- package/payload/platform/plugins/teaching/skills/interactive-tutor/references/teaching-modes.md +83 -0
- package/payload/platform/plugins/teaching/skills/lesson-planner/SKILL.md +48 -0
- package/payload/platform/plugins/teaching/skills/lesson-planner/references/context-gathering.md +41 -0
- package/payload/platform/plugins/teaching/skills/lesson-planner/references/plan-structure.md +94 -0
- package/payload/platform/plugins/teaching/skills/study-pack-builder/SKILL.md +52 -0
- package/payload/platform/plugins/teaching/skills/study-pack-builder/references/disaggregation.md +49 -0
- package/payload/platform/plugins/teaching/skills/study-pack-builder/references/materials.md +116 -0
- package/payload/platform/plugins/telegram/PLUGIN.md +6 -3
- package/payload/platform/plugins/vendors/.claude-plugin/plugin.json +8 -0
- package/payload/platform/plugins/vendors/PLUGIN.md +34 -0
- package/payload/platform/plugins/vendors/skills/vendor-communication/SKILL.md +42 -0
- package/payload/platform/plugins/vendors/skills/vendor-communication/references/fee-protection-and-agenda.md +28 -0
- package/payload/platform/plugins/vendors/skills/vendor-communication/references/listing-scripts.md +44 -0
- package/payload/platform/plugins/vendors/skills/vendor-communication/references/negotiation-deep-guide.md +70 -0
- package/payload/platform/plugins/vendors/skills/vendor-communication/references/price-alignment-scripts.md +33 -0
- package/payload/platform/plugins/vendors/skills/vendor-communication/references/price-alignment.md +34 -0
- package/payload/platform/plugins/vendors/skills/vendor-communication/references/scenario-scripts.md +38 -0
- package/payload/platform/plugins/vendors/skills/vendor-communication/references/seller-engagement.md +51 -0
- package/payload/platform/plugins/vendors/skills/vendor-communication/references/valuation-booking.md +76 -0
- package/payload/platform/plugins/vendors/skills/vendor-communication/references/vendor-scripts.md +63 -0
- package/payload/platform/plugins/vendors/skills/vendor-communication/references/vendor-updates.md +41 -0
- package/payload/platform/plugins/vendors/skills/vendor-updates/SKILL.md +153 -0
- package/payload/platform/plugins/waitlist/PLUGIN.md +12 -6
- package/payload/platform/plugins/whatsapp/PLUGIN.md +25 -13
- package/payload/platform/plugins/workflows/PLUGIN.md +16 -8
- package/payload/platform/plugins/writer-craft/.claude-plugin/plugin.json +8 -0
- package/payload/platform/plugins/writer-craft/PLUGIN.md +87 -0
- package/payload/platform/plugins/writer-craft/agents/writer-craft--manuscript-reviewer.md +92 -0
- package/payload/platform/plugins/writer-craft/skills/citation-style/SKILL.md +94 -0
- package/payload/platform/plugins/writer-craft/skills/citation-style/references/book-and-chapter-models.md +77 -0
- package/payload/platform/plugins/writer-craft/skills/citation-style/references/citation-rules.md +103 -0
- package/payload/platform/plugins/writer-craft/skills/citation-style/references/journal-article-models.md +74 -0
- package/payload/platform/plugins/writer-craft/skills/citation-style/references/other-source-models.md +146 -0
- package/payload/platform/plugins/writer-craft/skills/citation-style/references/reference-list-rules.md +70 -0
- package/payload/platform/plugins/writer-craft/skills/editorial-practice/SKILL.md +108 -0
- package/payload/platform/plugins/writer-craft/skills/editorial-practice/references/copyediting.md +73 -0
- package/payload/platform/plugins/writer-craft/skills/editorial-practice/references/developmental-editing.md +85 -0
- package/payload/platform/plugins/writer-craft/skills/editorial-practice/references/genre-specific-editing.md +78 -0
- package/payload/platform/plugins/writer-craft/skills/editorial-practice/references/line-editing.md +55 -0
- package/payload/platform/plugins/writer-craft/skills/editorial-practice/references/self-editing.md +89 -0
- package/payload/platform/plugins/writer-craft/skills/persuasive-storytelling/SKILL.md +114 -0
- package/payload/platform/plugins/writer-craft/skills/persuasive-storytelling/references/audience-analysis.md +73 -0
- package/payload/platform/plugins/writer-craft/skills/persuasive-storytelling/references/crafting-persuasive-story.md +76 -0
- package/payload/platform/plugins/writer-craft/skills/persuasive-storytelling/references/persuasion-case-studies.md +67 -0
- package/payload/platform/plugins/writer-craft/skills/persuasive-storytelling/references/transformation-framework.md +86 -0
- package/payload/platform/plugins/writer-craft/skills/point-of-view/SKILL.md +97 -0
- package/payload/platform/plugins/writer-craft/skills/point-of-view/references/indirect-narration.md +72 -0
- package/payload/platform/plugins/writer-craft/skills/point-of-view/references/pov-types-and-voice.md +91 -0
- package/payload/platform/plugins/writer-craft/skills/point-of-view/references/protagonist-filter.md +71 -0
- package/payload/platform/plugins/writer-craft/skills/point-of-view/references/tense-and-person.md +85 -0
- package/payload/platform/plugins/writer-craft/skills/prose-craft/SKILL.md +100 -0
- package/payload/platform/plugins/writer-craft/skills/prose-craft/references/punctuation-and-grammar.md +72 -0
- package/payload/platform/plugins/writer-craft/skills/prose-craft/references/repetition.md +71 -0
- package/payload/platform/plugins/writer-craft/skills/prose-craft/references/sound-and-rhythm.md +64 -0
- package/payload/platform/plugins/writer-craft/skills/prose-craft/references/word-economy.md +93 -0
- package/payload/platform/plugins/writer-craft/skills/reader-engagement/SKILL.md +100 -0
- package/payload/platform/plugins/writer-craft/skills/reader-engagement/references/cause-effect-setup-payoff.md +79 -0
- package/payload/platform/plugins/writer-craft/skills/reader-engagement/references/conflict-escalation.md +81 -0
- package/payload/platform/plugins/writer-craft/skills/reader-engagement/references/hooking-readers.md +67 -0
- package/payload/platform/plugins/writer-craft/skills/reader-engagement/references/neurochemistry-of-engagement.md +94 -0
- package/payload/platform/plugins/writer-craft/skills/review-manuscript/SKILL.md +111 -0
- package/payload/platform/plugins/writer-craft/skills/review-manuscript/references/review-manuscript-checklist.md +119 -0
- package/payload/platform/plugins/writer-craft/skills/review-prose/SKILL.md +99 -0
- package/payload/platform/plugins/writer-craft/skills/review-prose/references/prose-review-checklist.md +112 -0
- package/payload/platform/plugins/writer-craft/skills/review-scene/SKILL.md +99 -0
- package/payload/platform/plugins/writer-craft/skills/review-scene/references/scene-analysis-framework.md +95 -0
- package/payload/platform/plugins/writer-craft/skills/story-architecture/SKILL.md +106 -0
- package/payload/platform/plugins/writer-craft/skills/story-architecture/references/blueprinting-and-scene-cards.md +118 -0
- package/payload/platform/plugins/writer-craft/skills/story-architecture/references/inner-issue-and-protagonist-goal.md +66 -0
- package/payload/platform/plugins/writer-craft/skills/story-architecture/references/misbelief-desire-worldview.md +87 -0
- package/payload/platform/plugins/writer-craft/skills/story-architecture/references/origin-scenes-and-escalation.md +82 -0
- package/payload/platform/plugins/writer-craft/skills/story-blueprint/SKILL.md +133 -0
- package/payload/platform/plugins/writer-craft/skills/story-blueprint/references/blueprinting-exercises.md +118 -0
- package/payload/platform/plugins/writer-craft/skills/story-blueprint/references/blueprinting-process.md +128 -0
- package/payload/platform/scripts/conversation-id-allowlist.txt +0 -1
- package/payload/platform/services/claude-session-manager/dist/config.d.ts +6 -0
- package/payload/platform/services/claude-session-manager/dist/config.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/config.js +60 -1
- package/payload/platform/services/claude-session-manager/dist/config.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/http-server.d.ts +9 -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 +48 -2
- package/payload/platform/services/claude-session-manager/dist/http-server.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/index.js +39 -0
- package/payload/platform/services/claude-session-manager/dist/index.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/pty-spawner.d.ts +22 -0
- package/payload/platform/services/claude-session-manager/dist/pty-spawner.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/pty-spawner.js +32 -1
- package/payload/platform/services/claude-session-manager/dist/pty-spawner.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/public-tool-audit.d.ts +33 -0
- package/payload/platform/services/claude-session-manager/dist/public-tool-audit.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/public-tool-audit.js +149 -0
- package/payload/platform/services/claude-session-manager/dist/public-tool-audit.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/spawn-rate-limiter.d.ts +28 -0
- package/payload/platform/services/claude-session-manager/dist/spawn-rate-limiter.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/spawn-rate-limiter.js +77 -0
- package/payload/platform/services/claude-session-manager/dist/spawn-rate-limiter.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/tool-surface.d.ts +25 -0
- package/payload/platform/services/claude-session-manager/dist/tool-surface.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/tool-surface.js +149 -0
- package/payload/platform/services/claude-session-manager/dist/tool-surface.js.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/PLUGIN.md +15 -0
- package/payload/premium-plugins/real-agency/plugins/estate-sales/PLUGIN.md +5 -0
- package/payload/premium-plugins/real-agency/plugins/leads/PLUGIN.md +16 -0
- package/payload/premium-plugins/real-agency/plugins/listings/PLUGIN.md +39 -0
- package/payload/premium-plugins/real-agency/plugins/loop/PLUGIN.md +15 -0
- package/payload/server/{chunk-2ZNKHCQB.js → chunk-2MRZBQMH.js} +1 -1
- package/payload/server/{chunk-GPUCA2RQ.js → chunk-NL7QLVAD.js} +0 -192
- package/payload/server/{chunk-IDKWGLM5.js → chunk-YPZFYTYP.js} +1 -247
- package/payload/server/{cloudflare-task-tracker-LYI5BTYI.js → cloudflare-task-tracker-QVOGHKWV.js} +2 -2
- package/payload/server/maxy-edge.js +2 -2
- package/payload/server/package.json +0 -2
- package/payload/server/public/assets/{Checkbox-D1OQD43b.js → Checkbox-YIF0payo.js} +1 -1
- package/payload/server/public/assets/{admin-czNBxWor.js → admin-DW8IJcLc.js} +1 -1
- package/payload/server/public/assets/{architectureDiagram-Q4EWVU46-BcwgT80u.js → architectureDiagram-Q4EWVU46-Bz8mlxZZ.js} +1 -1
- package/payload/server/public/assets/{blockDiagram-DXYQGD6D-BMSyZUQA.js → blockDiagram-DXYQGD6D-DwV8Z8-i.js} +1 -1
- package/payload/server/public/assets/{brand-2cku8WFs.css → brand-DqiRNMlu.css} +1 -1
- package/payload/server/public/assets/{c4Diagram-AHTNJAMY-DPRGY1jJ.js → c4Diagram-AHTNJAMY-DiUTejMp.js} +1 -1
- package/payload/server/public/assets/channel-PtVtoBEL.js +1 -0
- package/payload/server/public/assets/{chunk-336JU56O-B7oQ3g1c.js → chunk-336JU56O-4mHZpBXe.js} +2 -2
- package/payload/server/public/assets/{chunk-426QAEUC-C1P0yFXw.js → chunk-426QAEUC-Cbv0vrN9.js} +1 -1
- package/payload/server/public/assets/{chunk-4TB4RGXK-LI7kOJd0.js → chunk-4TB4RGXK-BvLhId_2.js} +1 -1
- package/payload/server/public/assets/{chunk-5FUZZQ4R-CXQRGTQE.js → chunk-5FUZZQ4R-bBafOTkw.js} +1 -1
- package/payload/server/public/assets/{chunk-5PVQY5BW-NSyzpXRy.js → chunk-5PVQY5BW-B0NqBKVy.js} +1 -1
- package/payload/server/public/assets/{chunk-EDXVE4YY-voNwxbDs.js → chunk-EDXVE4YY-CFd4SqI6.js} +1 -1
- package/payload/server/public/assets/{chunk-ENJZ2VHE-CMEMPzYY.js → chunk-ENJZ2VHE-ajf2sb6c.js} +1 -1
- package/payload/server/public/assets/{chunk-ICPOFSXX-hEbwu-pe.js → chunk-ICPOFSXX-pWg6bug7.js} +1 -1
- package/payload/server/public/assets/{chunk-OYMX7WX6-DxskDrLs.js → chunk-OYMX7WX6-OjEd-17c.js} +1 -1
- package/payload/server/public/assets/{chunk-U2HBQHQK-D7TKgUo0.js → chunk-U2HBQHQK-DbEFSPoh.js} +1 -1
- package/payload/server/public/assets/{chunk-X2U36JSP-BvPUQEPm.js → chunk-X2U36JSP-COdNwrBb.js} +1 -1
- package/payload/server/public/assets/{chunk-YZCP3GAM-BY-RWQUW.js → chunk-YZCP3GAM-CHMWuY9B.js} +1 -1
- package/payload/server/public/assets/{chunk-ZZ45TVLE-DZvOYDY6.js → chunk-ZZ45TVLE-B-uDLQOB.js} +1 -1
- package/payload/server/public/assets/classDiagram-6PBFFD2Q-RVH_SEhY.js +1 -0
- package/payload/server/public/assets/classDiagram-v2-HSJHXN6E-Cm3rAb93.js +1 -0
- package/payload/server/public/assets/clone-BjY0Wzht.js +1 -0
- package/payload/server/public/assets/{dagre-KV5264BT-Cnj0mUZl.js → dagre-KV5264BT-CMEzmhIL.js} +1 -1
- package/payload/server/public/assets/{dagre-Bt-fpckL.js → dagre-bhIG_KnW.js} +1 -1
- package/payload/server/public/assets/data-K_kS__sL.js +1 -0
- package/payload/server/public/assets/{device-url-actions-Bjz3Xzbm.js → device-url-actions-AcOyLSeF.js} +1 -1
- package/payload/server/public/assets/{diagram-5BDNPKRD-DjLzvOlx.js → diagram-5BDNPKRD-6RIoQhIL.js} +1 -1
- package/payload/server/public/assets/{diagram-G4DWMVQ6-DTfuRd-T.js → diagram-G4DWMVQ6-BSp36TVv.js} +1 -1
- package/payload/server/public/assets/{diagram-MMDJMWI5-BaL2mCnx.js → diagram-MMDJMWI5-D54fo52D.js} +1 -1
- package/payload/server/public/assets/{diagram-TYMM5635-C5InWY5R.js → diagram-TYMM5635-CWL8z-Pq.js} +1 -1
- package/payload/server/public/assets/{erDiagram-SMLLAGMA-DO7BXTpn.js → erDiagram-SMLLAGMA-AnnHBo3z.js} +1 -1
- package/payload/server/public/assets/{flowDiagram-DWJPFMVM-DDdAKfLf.js → flowDiagram-DWJPFMVM-laWmBl5o.js} +1 -1
- package/payload/server/public/assets/{ganttDiagram-T4ZO3ILL-arJD8Utm.js → ganttDiagram-T4ZO3ILL-B94ko8ie.js} +1 -1
- package/payload/server/public/assets/{gitGraphDiagram-UUTBAWPF-C55GH-OS.js → gitGraphDiagram-UUTBAWPF-DxzL1fxZ.js} +1 -1
- package/payload/server/public/assets/graph-DeEigyO_.js +1 -0
- package/payload/server/public/assets/graph-labels-C7I5QvNv.js +1 -0
- package/payload/server/public/assets/{graphlib-DL9PM7Ex.js → graphlib-CY-zIElM.js} +1 -1
- package/payload/server/public/assets/{infoDiagram-42DDH7IO-BMSGqUbG.js → infoDiagram-42DDH7IO-BMTajIIr.js} +1 -1
- package/payload/server/public/assets/{ishikawaDiagram-UXIWVN3A-Dw6BZ6BG.js → ishikawaDiagram-UXIWVN3A-B_QauE5O.js} +1 -1
- package/payload/server/public/assets/{journeyDiagram-VCZTEJTY-DrywUGXw.js → journeyDiagram-VCZTEJTY-DmlqSIih.js} +1 -1
- package/payload/server/public/assets/{kanban-definition-6JOO6SKY-DuwtVBBc.js → kanban-definition-6JOO6SKY-ZGDQT7xB.js} +1 -1
- package/payload/server/public/assets/{line-JAksyKHj.js → line-D13opgep.js} +1 -1
- package/payload/server/public/assets/{mermaid-parser.core-BMq-ApBW.js → mermaid-parser.core-C650Sual.js} +1 -1
- package/payload/server/public/assets/{mermaid.core-tH4oX0Kh.js → mermaid.core-BqnQoXTp.js} +3 -3
- package/payload/server/public/assets/{mindmap-definition-QFDTVHPH-D1OiiJga.js → mindmap-definition-QFDTVHPH-BS_8y-tY.js} +1 -1
- package/payload/server/public/assets/{page-BZpoS7iR.js → page-B_rpjIRr.js} +1 -1
- package/payload/server/public/assets/{page-CkvBvezS.js → page-qSH972X0.js} +1 -1
- package/payload/server/public/assets/{pieDiagram-DEJITSTG-Ckwm69PW.js → pieDiagram-DEJITSTG-B5OmNvBO.js} +1 -1
- package/payload/server/public/assets/{public-C-dTMgXu.js → public-DDsYgotk.js} +3 -3
- package/payload/server/public/assets/{quadrantDiagram-34T5L4WZ-COw3yZ1j.js → quadrantDiagram-34T5L4WZ-DTYITdNo.js} +1 -1
- package/payload/server/public/assets/{requirementDiagram-MS252O5E-DqGzM4K-.js → requirementDiagram-MS252O5E-CRZWxH06.js} +1 -1
- package/payload/server/public/assets/{sankeyDiagram-XADWPNL6-D-l1c_Pl.js → sankeyDiagram-XADWPNL6-DazRENhe.js} +1 -1
- package/payload/server/public/assets/{sequenceDiagram-FGHM5R23-BeIi0DtJ.js → sequenceDiagram-FGHM5R23-BcHTxmPy.js} +1 -1
- package/payload/server/public/assets/{stateDiagram-FHFEXIEX-C-jgegLk.js → stateDiagram-FHFEXIEX-DYU7nbqg.js} +1 -1
- package/payload/server/public/assets/stateDiagram-v2-QKLJ7IA2-BgljVtlp.js +1 -0
- package/payload/server/public/assets/{timeline-definition-GMOUNBTQ-BGFKkYmi.js → timeline-definition-GMOUNBTQ-BKGmqkST.js} +1 -1
- package/payload/server/public/assets/{vennDiagram-DHZGUBPP-5NuIhJLS.js → vennDiagram-DHZGUBPP-BXvLPmX7.js} +1 -1
- package/payload/server/public/assets/{wardleyDiagram-NUSXRM2D-Be9ytVut.js → wardleyDiagram-NUSXRM2D-BCclUa3Z.js} +1 -1
- package/payload/server/public/assets/{xychartDiagram-5P7HB3ND-DCyHg41R.js → xychartDiagram-5P7HB3ND-C-Xp-Eoc.js} +1 -1
- package/payload/server/public/data.html +5 -5
- package/payload/server/public/graph.html +6 -6
- package/payload/server/public/index.html +8 -8
- package/payload/server/public/public.html +5 -5
- package/payload/server/server.js +1024 -2347
- package/payload/platform/scripts/check-sdk-oauth.mjs +0 -185
- package/payload/server/public/assets/channel-fxEghWew.js +0 -1
- package/payload/server/public/assets/classDiagram-6PBFFD2Q-BsWzGW0N.js +0 -1
- package/payload/server/public/assets/classDiagram-v2-HSJHXN6E-BGVa3h90.js +0 -1
- package/payload/server/public/assets/clone-Khvocke2.js +0 -1
- package/payload/server/public/assets/data-DBd-Buhp.js +0 -1
- package/payload/server/public/assets/graph-DUtVdnZ6.js +0 -1
- package/payload/server/public/assets/graph-labels-Dxfue-fP.js +0 -1
- package/payload/server/public/assets/stateDiagram-v2-QKLJ7IA2-BaMs8Znv.js +0 -1
- /package/payload/server/public/assets/{brand-CSQuxS9w.js → brand-Bm671owU.js} +0 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import neo4j, { Driver, Session } from "neo4j-driver";
|
|
2
|
+
import { readFileSync } from "node:fs";
|
|
3
|
+
import { resolve } from "node:path";
|
|
4
|
+
|
|
5
|
+
let driver: Driver | null = null;
|
|
6
|
+
|
|
7
|
+
function readPassword(): string {
|
|
8
|
+
if (process.env.NEO4J_PASSWORD) return process.env.NEO4J_PASSWORD;
|
|
9
|
+
|
|
10
|
+
const passwordFile = resolve(
|
|
11
|
+
process.env.PLATFORM_ROOT ?? resolve(import.meta.dirname, "../../../.."),
|
|
12
|
+
"config/.neo4j-password"
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
try {
|
|
16
|
+
return readFileSync(passwordFile, "utf-8").trim();
|
|
17
|
+
} catch {
|
|
18
|
+
throw new Error(
|
|
19
|
+
`Neo4j password not found. Expected at ${passwordFile} or in NEO4J_PASSWORD env var.`
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function getDriver(): Driver {
|
|
25
|
+
if (!driver) {
|
|
26
|
+
// Task 580: NEO4J_URI must be explicit. Silent default to :7687 was the
|
|
27
|
+
// vector for Task 577's orphan data in Maxy's DB from a realagent install.
|
|
28
|
+
const uri = process.env.NEO4J_URI;
|
|
29
|
+
if (!uri) {
|
|
30
|
+
throw new Error(
|
|
31
|
+
"[loop] NEO4J_URI unset — refusing to default to bolt://localhost:7687 (Task 580)"
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
const user = process.env.NEO4J_USER ?? "neo4j";
|
|
35
|
+
const password = readPassword();
|
|
36
|
+
console.error(`[loop] resolved neo4j_uri=${uri}`);
|
|
37
|
+
driver = neo4j.driver(uri, neo4j.auth.basic(user, password));
|
|
38
|
+
}
|
|
39
|
+
return driver;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function getSession(): Session {
|
|
43
|
+
return getDriver().session();
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export async function closeDriver(): Promise<void> {
|
|
47
|
+
if (driver) {
|
|
48
|
+
await driver.close();
|
|
49
|
+
driver = null;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { loopGet, loopPost, withTeamKey } from "../lib/loop-api.js";
|
|
2
|
+
|
|
3
|
+
type PreferencesAction = "read" | "write";
|
|
4
|
+
|
|
5
|
+
// ─── Loop API V2: /customer/preferences/{personCode} ───────────
|
|
6
|
+
// Uses personCode (encoded), NOT raw personId from /people.
|
|
7
|
+
// personCode is obtained from marketing context (auto-responder,
|
|
8
|
+
// matching), not from standard /people endpoints.
|
|
9
|
+
// GET returns preferences object; POST updates it.
|
|
10
|
+
// ────────────────────────────────────────────────────────────────
|
|
11
|
+
interface LoopCustomerPreferences {
|
|
12
|
+
personCode?: number;
|
|
13
|
+
preferences?: Record<string, unknown>;
|
|
14
|
+
[key: string]: unknown;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface LoopBooleanResponse {
|
|
18
|
+
success?: boolean;
|
|
19
|
+
[key: string]: unknown;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export async function customerPreferences(params: {
|
|
23
|
+
accountId: string;
|
|
24
|
+
teamName: string;
|
|
25
|
+
personCode: number;
|
|
26
|
+
action: PreferencesAction;
|
|
27
|
+
preferences?: Record<string, unknown>;
|
|
28
|
+
}): Promise<string> {
|
|
29
|
+
const { accountId, teamName, personCode, action } = params;
|
|
30
|
+
|
|
31
|
+
if (action === "read") {
|
|
32
|
+
const result = await withTeamKey<LoopCustomerPreferences>(
|
|
33
|
+
accountId, teamName, "customer", "loop-customer-preferences",
|
|
34
|
+
async (apiKey) => {
|
|
35
|
+
return loopGet<LoopCustomerPreferences>(
|
|
36
|
+
apiKey, `/customer/preferences/${personCode}`,
|
|
37
|
+
"loop-customer-preferences", teamName
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
if (!result || (Array.isArray(result) && result.length === 0)) {
|
|
43
|
+
return `No preferences found for person ${personCode} via team "${teamName}".`;
|
|
44
|
+
}
|
|
45
|
+
return JSON.stringify(result, null, 2);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (action === "write") {
|
|
49
|
+
if (!params.preferences) {
|
|
50
|
+
throw new Error("preferences object is required when action is 'write'.");
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
await withTeamKey<LoopBooleanResponse>(
|
|
54
|
+
accountId, teamName, "customer", "loop-customer-preferences",
|
|
55
|
+
async (apiKey) => {
|
|
56
|
+
return loopPost<LoopBooleanResponse>(
|
|
57
|
+
apiKey, `/customer/preferences/${personCode}`,
|
|
58
|
+
params.preferences!, "loop-customer-preferences", teamName
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
return `Preferences updated for person ${personCode} via team "${teamName}".`;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
throw new Error(`Unknown action: ${action}. Use "read" or "write".`);
|
|
66
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import {
|
|
2
|
+
loopGet,
|
|
3
|
+
loopPost,
|
|
4
|
+
withTeamKey,
|
|
5
|
+
} from "../lib/loop-api.js";
|
|
6
|
+
|
|
7
|
+
type Department = "sales" | "lettings";
|
|
8
|
+
|
|
9
|
+
// ─── Loop API V2: /feedback/residential/{dept}/viewings/{id} ───
|
|
10
|
+
// Returns null when no feedback has been submitted. Exact schema
|
|
11
|
+
// not verified — endpoint returned null for all test viewings.
|
|
12
|
+
// Fields below are the documented schema; the [key: string]: unknown
|
|
13
|
+
// catch-all ensures any actual response fields are accessible.
|
|
14
|
+
// ────────────────────────────────────────────────────────────────
|
|
15
|
+
interface LoopViewingFeedback {
|
|
16
|
+
viewingId?: number;
|
|
17
|
+
propertyAddress?: string;
|
|
18
|
+
date?: string;
|
|
19
|
+
attendeeName?: string;
|
|
20
|
+
feedback?: string;
|
|
21
|
+
rating?: number;
|
|
22
|
+
status?: string;
|
|
23
|
+
[key: string]: unknown;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
interface LoopBooleanResponse {
|
|
27
|
+
success?: boolean;
|
|
28
|
+
[key: string]: unknown;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export async function feedbackGet(params: {
|
|
32
|
+
accountId: string;
|
|
33
|
+
teamName: string;
|
|
34
|
+
viewingId: number;
|
|
35
|
+
department: Department;
|
|
36
|
+
}): Promise<string> {
|
|
37
|
+
const { accountId, teamName, viewingId, department } = params;
|
|
38
|
+
|
|
39
|
+
const result = await withTeamKey<LoopViewingFeedback>(
|
|
40
|
+
accountId,
|
|
41
|
+
teamName,
|
|
42
|
+
"feedback",
|
|
43
|
+
"loop-feedback-get",
|
|
44
|
+
async (apiKey) => {
|
|
45
|
+
const path = `/feedback/residential/${department}/viewings/${viewingId}`;
|
|
46
|
+
return loopGet<LoopViewingFeedback>(apiKey, path, "loop-feedback-get", teamName);
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
if (!result || (Array.isArray(result) && result.length === 0)) {
|
|
51
|
+
return `No feedback found for viewing ${viewingId} (${department}) via team "${teamName}".`;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const f = result;
|
|
55
|
+
const lines = [`**Feedback for viewing ${viewingId}**`];
|
|
56
|
+
if (f.propertyAddress) lines.push(`Property: ${f.propertyAddress}`);
|
|
57
|
+
if (f.date) lines.push(`Date: ${f.date}`);
|
|
58
|
+
if (f.attendeeName) lines.push(`Attendee: ${f.attendeeName}`);
|
|
59
|
+
if (f.rating != null) lines.push(`Rating: ★${f.rating}`);
|
|
60
|
+
if (f.status) lines.push(`Status: ${f.status}`);
|
|
61
|
+
if (f.feedback) lines.push(`Feedback: ${f.feedback}`);
|
|
62
|
+
return lines.join("\n");
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export async function feedbackSubmit(params: {
|
|
66
|
+
accountId: string;
|
|
67
|
+
teamName: string;
|
|
68
|
+
viewingId: number;
|
|
69
|
+
department: Department;
|
|
70
|
+
feedback: string;
|
|
71
|
+
}): Promise<string> {
|
|
72
|
+
const { accountId, teamName, viewingId, department, feedback } = params;
|
|
73
|
+
|
|
74
|
+
await withTeamKey<LoopBooleanResponse>(
|
|
75
|
+
accountId,
|
|
76
|
+
teamName,
|
|
77
|
+
"feedback",
|
|
78
|
+
"loop-feedback-submit",
|
|
79
|
+
async (apiKey) => {
|
|
80
|
+
const path = `/feedback/residential/${department}/viewings/${viewingId}/feedback`;
|
|
81
|
+
return loopPost<LoopBooleanResponse>(apiKey, path, { result: feedback }, "loop-feedback-submit", teamName);
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
|
|
85
|
+
return `Feedback submitted for viewing ${viewingId} (${department}) via team "${teamName}".`;
|
|
86
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { getSession } from "../lib/neo4j.js";
|
|
2
|
+
|
|
3
|
+
export async function keyDeregister(params: {
|
|
4
|
+
teamName: string;
|
|
5
|
+
accountId: string;
|
|
6
|
+
}): Promise<void> {
|
|
7
|
+
const { teamName, accountId } = params;
|
|
8
|
+
|
|
9
|
+
const session = getSession();
|
|
10
|
+
try {
|
|
11
|
+
const result = await session.run(
|
|
12
|
+
`MATCH (k:LoopTeamKey {teamName: $teamName, accountId: $accountId})
|
|
13
|
+
DELETE k
|
|
14
|
+
RETURN count(k) AS deleted`,
|
|
15
|
+
{ teamName, accountId }
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
const deleted = result.records[0]?.get("deleted")?.toNumber?.() ?? 0;
|
|
19
|
+
if (deleted === 0) {
|
|
20
|
+
throw new Error(`Team "${teamName}" not found.`);
|
|
21
|
+
}
|
|
22
|
+
} finally {
|
|
23
|
+
await session.close();
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
console.error(`[loop] key-deregister team=${teamName} account=${accountId}`);
|
|
27
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { loadTeamKeys } from "../lib/loop-api.js";
|
|
2
|
+
|
|
3
|
+
export async function keyList(params: {
|
|
4
|
+
accountId: string;
|
|
5
|
+
}): Promise<string> {
|
|
6
|
+
const keys = await loadTeamKeys(params.accountId);
|
|
7
|
+
|
|
8
|
+
if (keys.length === 0) {
|
|
9
|
+
return "No Loop teams registered. Use loop-key-register to add team API keys.";
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const lines = keys.map((k) => {
|
|
13
|
+
const perms = k.permissions.join(", ");
|
|
14
|
+
const addr = k.teamAddress ? ` — ${k.teamAddress}` : "";
|
|
15
|
+
return `- **${k.teamName}**${addr} (permissions: ${perms}, registered: ${k.createdAt})`;
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
return `${keys.length} Loop team(s) registered:\n\n${lines.join("\n")}`;
|
|
19
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { getSession } from "../lib/neo4j.js";
|
|
2
|
+
import { encrypt } from "../lib/crypto.js";
|
|
3
|
+
import { loopGet, LoopApiError } from "../lib/loop-api.js";
|
|
4
|
+
|
|
5
|
+
interface LoopTeamResponse {
|
|
6
|
+
id?: string;
|
|
7
|
+
name?: string;
|
|
8
|
+
address?: string;
|
|
9
|
+
agentId?: string;
|
|
10
|
+
[key: string]: unknown;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const ALL_PERMISSIONS = ["properties", "people", "viewings", "feedback", "team", "marketing", "customer", "supplier"];
|
|
14
|
+
|
|
15
|
+
export async function keyRegister(params: {
|
|
16
|
+
teamName: string;
|
|
17
|
+
apiKey: string;
|
|
18
|
+
accountId: string;
|
|
19
|
+
permissions?: string[];
|
|
20
|
+
}): Promise<{ warning?: string }> {
|
|
21
|
+
const { teamName, apiKey, accountId } = params;
|
|
22
|
+
const permissions = params.permissions ?? ALL_PERMISSIONS;
|
|
23
|
+
|
|
24
|
+
// Validate key against Loop API — try /team endpoint
|
|
25
|
+
let teamAddress = "";
|
|
26
|
+
let agentId = "";
|
|
27
|
+
let warning: string | undefined;
|
|
28
|
+
|
|
29
|
+
try {
|
|
30
|
+
const teamData = await loopGet<LoopTeamResponse>(
|
|
31
|
+
apiKey,
|
|
32
|
+
"/team",
|
|
33
|
+
"loop-key-register",
|
|
34
|
+
teamName
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
if (Array.isArray(teamData) && teamData.length === 0) {
|
|
38
|
+
// 204 was converted to empty array — ambiguous scope
|
|
39
|
+
warning =
|
|
40
|
+
"Key accepted but Loop returned no team data (204). " +
|
|
41
|
+
"Verify the key's scope in Loop's dashboard.";
|
|
42
|
+
} else if (teamData && typeof teamData === "object") {
|
|
43
|
+
teamAddress = String(teamData.address ?? "");
|
|
44
|
+
agentId = String(teamData.agentId ?? teamData.id ?? "");
|
|
45
|
+
}
|
|
46
|
+
} catch (err) {
|
|
47
|
+
if (err instanceof LoopApiError && err.status === 401) {
|
|
48
|
+
throw new Error(
|
|
49
|
+
`Loop API rejected the key for team "${teamName}" (HTTP 401). ` +
|
|
50
|
+
`Check that the key is valid and not expired.`
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
// Network/timeout errors — still reject, key is unverified
|
|
54
|
+
throw new Error(
|
|
55
|
+
`Could not validate key against Loop API: ${err instanceof Error ? err.message : String(err)}`
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Encrypt and store
|
|
60
|
+
const encryptedKey = encrypt(apiKey);
|
|
61
|
+
const now = new Date().toISOString();
|
|
62
|
+
|
|
63
|
+
const writeSession = getSession();
|
|
64
|
+
try {
|
|
65
|
+
await writeSession.run(
|
|
66
|
+
`CREATE INDEX loop_team_key_account_team IF NOT EXISTS
|
|
67
|
+
FOR (k:LoopTeamKey) ON (k.accountId, k.teamName)`,
|
|
68
|
+
{}
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
const mergeResult = await writeSession.run(
|
|
72
|
+
`MERGE (k:LoopTeamKey {teamName: $teamName, accountId: $accountId})
|
|
73
|
+
ON CREATE SET
|
|
74
|
+
k.encryptedKey = $encryptedKey,
|
|
75
|
+
k.teamAddress = $teamAddress,
|
|
76
|
+
k.agentId = $agentId,
|
|
77
|
+
k.permissions = $permissions,
|
|
78
|
+
k.createdAt = $now,
|
|
79
|
+
k.updatedAt = $now
|
|
80
|
+
RETURN k.createdAt = $now AS created`,
|
|
81
|
+
{ teamName, encryptedKey, teamAddress, agentId, accountId, permissions, now }
|
|
82
|
+
);
|
|
83
|
+
|
|
84
|
+
const created = mergeResult.records[0]?.get("created");
|
|
85
|
+
if (!created) {
|
|
86
|
+
throw new Error(`Team "${teamName}" is already registered for this account.`);
|
|
87
|
+
}
|
|
88
|
+
} finally {
|
|
89
|
+
await writeSession.close();
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
console.error(`[loop] key-register team=${teamName} account=${accountId}`);
|
|
93
|
+
|
|
94
|
+
return { warning };
|
|
95
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { loopGet, loopPost, loopPut, withTeamKey } from "../lib/loop-api.js";
|
|
2
|
+
|
|
3
|
+
type EnquiryAction = "seller-enquiry" | "autoresponder-get" | "autoresponder-answers" | "autoresponder-details" | "autoresponder-refer";
|
|
4
|
+
|
|
5
|
+
// ─── Loop API V2: Marketing Enquiry Endpoints ──────────────────
|
|
6
|
+
// POST /marketing/enquiries/seller — submit seller enquiry
|
|
7
|
+
// GET /marketing/enquiries/auto-responder/{id}/{key} — read enquiry
|
|
8
|
+
// PUT .../auto-responder/{id}/answers/{key} — submit answers
|
|
9
|
+
// PUT .../auto-responder/{id}/details/{key} — update details
|
|
10
|
+
// PUT .../auto-responder/{id}/refer/{key} — refer enquiry
|
|
11
|
+
// Note: auto-responder uses personCode + key (UUID), not personId
|
|
12
|
+
// ────────────────────────────────────────────────────────────────
|
|
13
|
+
interface LoopBooleanResponse {
|
|
14
|
+
success?: boolean;
|
|
15
|
+
[key: string]: unknown;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
interface LoopAutoResponderDetails {
|
|
19
|
+
id?: number;
|
|
20
|
+
questions?: unknown[];
|
|
21
|
+
enquiryDetails?: unknown;
|
|
22
|
+
[key: string]: unknown;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export async function marketingEnquiry(params: {
|
|
26
|
+
accountId: string;
|
|
27
|
+
teamName: string;
|
|
28
|
+
action: EnquiryAction;
|
|
29
|
+
// For seller-enquiry
|
|
30
|
+
sellerEnquiryData?: Record<string, unknown>;
|
|
31
|
+
// For autoresponder actions
|
|
32
|
+
autoResponderId?: number;
|
|
33
|
+
autoResponderKey?: string;
|
|
34
|
+
// For autoresponder-answers
|
|
35
|
+
answers?: unknown[];
|
|
36
|
+
// For autoresponder-details
|
|
37
|
+
details?: Record<string, unknown>;
|
|
38
|
+
}): Promise<string> {
|
|
39
|
+
const { accountId, teamName, action } = params;
|
|
40
|
+
|
|
41
|
+
if (action === "seller-enquiry") {
|
|
42
|
+
await withTeamKey<LoopBooleanResponse>(
|
|
43
|
+
accountId, teamName, "marketing", "loop-marketing-enquiry",
|
|
44
|
+
async (apiKey) => {
|
|
45
|
+
return loopPost<LoopBooleanResponse>(
|
|
46
|
+
apiKey, "/marketing/enquiries/seller",
|
|
47
|
+
params.sellerEnquiryData ?? {}, "loop-marketing-enquiry", teamName
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
return `Seller enquiry submitted via team "${teamName}".`;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if (!params.autoResponderId || !params.autoResponderKey) {
|
|
55
|
+
throw new Error("autoResponderId and autoResponderKey are required for autoresponder actions.");
|
|
56
|
+
}
|
|
57
|
+
const id = params.autoResponderId;
|
|
58
|
+
const key = params.autoResponderKey;
|
|
59
|
+
|
|
60
|
+
if (action === "autoresponder-get") {
|
|
61
|
+
const result = await withTeamKey<LoopAutoResponderDetails>(
|
|
62
|
+
accountId, teamName, "marketing", "loop-marketing-enquiry",
|
|
63
|
+
async (apiKey) => {
|
|
64
|
+
return loopGet<LoopAutoResponderDetails>(
|
|
65
|
+
apiKey, `/marketing/enquiries/auto-responder/${id}/${key}`,
|
|
66
|
+
"loop-marketing-enquiry", teamName
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
return JSON.stringify(result, null, 2);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (action === "autoresponder-answers") {
|
|
74
|
+
await withTeamKey<LoopBooleanResponse>(
|
|
75
|
+
accountId, teamName, "marketing", "loop-marketing-enquiry",
|
|
76
|
+
async (apiKey) => {
|
|
77
|
+
return loopPut<LoopBooleanResponse>(
|
|
78
|
+
apiKey, `/marketing/enquiries/auto-responder/${id}/answers/${key}`,
|
|
79
|
+
params.answers ?? [], "loop-marketing-enquiry", teamName
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
return `Auto-responder answers submitted for enquiry ${id} via team "${teamName}".`;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if (action === "autoresponder-details") {
|
|
87
|
+
await withTeamKey<LoopBooleanResponse>(
|
|
88
|
+
accountId, teamName, "marketing", "loop-marketing-enquiry",
|
|
89
|
+
async (apiKey) => {
|
|
90
|
+
return loopPut<LoopBooleanResponse>(
|
|
91
|
+
apiKey, `/marketing/enquiries/auto-responder/${id}/details/${key}`,
|
|
92
|
+
params.details ?? {}, "loop-marketing-enquiry", teamName
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
return `Auto-responder details updated for enquiry ${id} via team "${teamName}".`;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
if (action === "autoresponder-refer") {
|
|
100
|
+
await withTeamKey<LoopBooleanResponse>(
|
|
101
|
+
accountId, teamName, "marketing", "loop-marketing-enquiry",
|
|
102
|
+
async (apiKey) => {
|
|
103
|
+
return loopPut<LoopBooleanResponse>(
|
|
104
|
+
apiKey, `/marketing/enquiries/auto-responder/${id}/refer/${key}`,
|
|
105
|
+
{}, "loop-marketing-enquiry", teamName
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
);
|
|
109
|
+
return `Enquiry ${id} referred via team "${teamName}".`;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
throw new Error(`Unknown action: ${action}`);
|
|
113
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import {
|
|
2
|
+
aggregateAcrossTeams,
|
|
3
|
+
formatAggregationResult,
|
|
4
|
+
loopPut,
|
|
5
|
+
} from "../lib/loop-api.js";
|
|
6
|
+
|
|
7
|
+
// ─── Loop API V2: PUT /marketing/matching/other-matches ─────────
|
|
8
|
+
// Request body: array of property IDs
|
|
9
|
+
// Response: array of matching property summaries
|
|
10
|
+
// Schema not verified via curl (depends on matching state)
|
|
11
|
+
// ────────────────────────────────────────────────────────────────
|
|
12
|
+
interface LoopMatchingSummary {
|
|
13
|
+
id?: number;
|
|
14
|
+
address?: string;
|
|
15
|
+
price?: number;
|
|
16
|
+
type?: string;
|
|
17
|
+
bedrooms?: number;
|
|
18
|
+
[key: string]: unknown;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
type Department = "sales" | "lettings";
|
|
22
|
+
|
|
23
|
+
export async function marketingMatchBatch(params: {
|
|
24
|
+
accountId: string;
|
|
25
|
+
propertyIds: number[];
|
|
26
|
+
department: Department;
|
|
27
|
+
teamName?: string;
|
|
28
|
+
}): Promise<string> {
|
|
29
|
+
const { accountId, propertyIds, department, teamName } = params;
|
|
30
|
+
|
|
31
|
+
const result = await aggregateAcrossTeams<LoopMatchingSummary>(
|
|
32
|
+
accountId,
|
|
33
|
+
"marketing",
|
|
34
|
+
"loop-marketing-match-batch",
|
|
35
|
+
async (apiKey, team) => {
|
|
36
|
+
const prefix = department === "lettings" ? "/marketing/rentals" : "/marketing";
|
|
37
|
+
const path = `${prefix}/matching/other-matches`;
|
|
38
|
+
const data = await loopPut<LoopMatchingSummary[]>(apiKey, path, propertyIds, "loop-marketing-match-batch", team);
|
|
39
|
+
return Array.isArray(data) ? data : [];
|
|
40
|
+
},
|
|
41
|
+
{ teamName }
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
return formatAggregationResult(
|
|
45
|
+
result,
|
|
46
|
+
(p) => {
|
|
47
|
+
const price = p.price ? ` — £${p.price.toLocaleString("en-GB")}` : "";
|
|
48
|
+
const beds = p.bedrooms ? ` ${p.bedrooms}bed` : "";
|
|
49
|
+
return `- ${p.address ?? "Unknown"}${price}${beds}`;
|
|
50
|
+
},
|
|
51
|
+
"matching properties"
|
|
52
|
+
);
|
|
53
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { loopPost, withTeamKey } from "../lib/loop-api.js";
|
|
2
|
+
|
|
3
|
+
type Department = "sales" | "lettings";
|
|
4
|
+
type MatchAction = "viewing" | "information" | "callback";
|
|
5
|
+
|
|
6
|
+
// ─── Loop API V2: POST /marketing/matching/{id}/{action} ────────
|
|
7
|
+
// Actions: viewing, information, callback
|
|
8
|
+
// Request body: { name?, email?, phone?, message? }
|
|
9
|
+
// Response: boolean success
|
|
10
|
+
// ────────────────────────────────────────────────────────────────
|
|
11
|
+
interface LoopBooleanResponse {
|
|
12
|
+
success?: boolean;
|
|
13
|
+
[key: string]: unknown;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export async function marketingMatchRequest(params: {
|
|
17
|
+
accountId: string;
|
|
18
|
+
teamName: string;
|
|
19
|
+
propertyId: number;
|
|
20
|
+
department: Department;
|
|
21
|
+
action: MatchAction;
|
|
22
|
+
name?: string;
|
|
23
|
+
email?: string;
|
|
24
|
+
phone?: string;
|
|
25
|
+
message?: string;
|
|
26
|
+
}): Promise<string> {
|
|
27
|
+
const { accountId, teamName, propertyId, department, action, ...body } = params;
|
|
28
|
+
|
|
29
|
+
await withTeamKey<LoopBooleanResponse>(
|
|
30
|
+
accountId,
|
|
31
|
+
teamName,
|
|
32
|
+
"marketing",
|
|
33
|
+
"loop-marketing-match-request",
|
|
34
|
+
async (apiKey) => {
|
|
35
|
+
const prefix = department === "lettings" ? "/marketing/rentals" : "/marketing";
|
|
36
|
+
const path = `${prefix}/matching/${propertyId}/${action}`;
|
|
37
|
+
return loopPost<LoopBooleanResponse>(apiKey, path, body, "loop-marketing-match-request", teamName);
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
return `${action} request submitted for matching property ${propertyId} (${department}) via team "${teamName}".`;
|
|
42
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import {
|
|
2
|
+
aggregateAcrossTeams,
|
|
3
|
+
formatAggregationResult,
|
|
4
|
+
loopGet,
|
|
5
|
+
} from "../lib/loop-api.js";
|
|
6
|
+
|
|
7
|
+
// ─── Loop API V2: /marketing/matching/{id} ─────────────────────
|
|
8
|
+
// Returned HTTP 500 for test property 895155 — may require
|
|
9
|
+
// publishedToMatching: true. Exact response schema not verified.
|
|
10
|
+
// Fields below are from Swagger docs; [key: string]: unknown
|
|
11
|
+
// ensures any actual response fields are accessible.
|
|
12
|
+
// ────────────────────────────────────────────────────────────────
|
|
13
|
+
interface LoopMatchingProperty {
|
|
14
|
+
id?: number;
|
|
15
|
+
address?: string;
|
|
16
|
+
price?: number;
|
|
17
|
+
type?: string;
|
|
18
|
+
bedrooms?: number;
|
|
19
|
+
status?: string;
|
|
20
|
+
description?: string;
|
|
21
|
+
[key: string]: unknown;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
interface LoopMatchingTeamProfile {
|
|
25
|
+
name?: string;
|
|
26
|
+
address?: string;
|
|
27
|
+
phone?: string;
|
|
28
|
+
email?: string;
|
|
29
|
+
logoUrl?: string;
|
|
30
|
+
[key: string]: unknown;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
type Department = "sales" | "lettings";
|
|
34
|
+
|
|
35
|
+
export async function marketingMatchDetail(params: {
|
|
36
|
+
accountId: string;
|
|
37
|
+
propertyId: number;
|
|
38
|
+
department: Department;
|
|
39
|
+
includeTeamProfile?: boolean;
|
|
40
|
+
teamName?: string;
|
|
41
|
+
}): Promise<string> {
|
|
42
|
+
const { accountId, propertyId, department, includeTeamProfile = false, teamName } = params;
|
|
43
|
+
|
|
44
|
+
const result = await aggregateAcrossTeams<LoopMatchingProperty>(
|
|
45
|
+
accountId,
|
|
46
|
+
"marketing",
|
|
47
|
+
"loop-marketing-match",
|
|
48
|
+
async (apiKey, team) => {
|
|
49
|
+
const prefix = department === "lettings" ? "/marketing/rentals" : "/marketing";
|
|
50
|
+
const path = `${prefix}/matching/${propertyId}`;
|
|
51
|
+
const data = await loopGet<LoopMatchingProperty>(apiKey, path, "loop-marketing-match", team);
|
|
52
|
+
if (data && typeof data === "object" && !Array.isArray(data)) {
|
|
53
|
+
if (includeTeamProfile) {
|
|
54
|
+
const profilePath = `${prefix}/matching/${propertyId}/team-profile`;
|
|
55
|
+
const profile = await loopGet<LoopMatchingTeamProfile>(apiKey, profilePath, "loop-marketing-match", team).catch(() => null);
|
|
56
|
+
if (profile) {
|
|
57
|
+
(data as Record<string, unknown>)._teamProfile = profile;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return [data];
|
|
61
|
+
}
|
|
62
|
+
return [];
|
|
63
|
+
},
|
|
64
|
+
{ teamName }
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
return formatAggregationResult(
|
|
68
|
+
result,
|
|
69
|
+
(p) => {
|
|
70
|
+
const lines = [`**${p.address ?? "Unknown address"}**`];
|
|
71
|
+
if (p.price) lines.push(`Price: £${p.price.toLocaleString("en-GB")}`);
|
|
72
|
+
if (p.type) lines.push(`Type: ${p.type}`);
|
|
73
|
+
if (p.bedrooms) lines.push(`Bedrooms: ${p.bedrooms}`);
|
|
74
|
+
if (p.status) lines.push(`Status: ${p.status}`);
|
|
75
|
+
if (p.description) lines.push(`\n${p.description}`);
|
|
76
|
+
const profile = (p as Record<string, unknown>)._teamProfile as LoopMatchingTeamProfile | undefined;
|
|
77
|
+
if (profile) {
|
|
78
|
+
lines.push(`\n**Team:** ${profile.name ?? ""} — ${profile.address ?? ""} | ${profile.phone ?? ""} | ${profile.email ?? ""}`);
|
|
79
|
+
}
|
|
80
|
+
return lines.join("\n");
|
|
81
|
+
},
|
|
82
|
+
"matching property details"
|
|
83
|
+
);
|
|
84
|
+
}
|