@rubytech/create-realagent 1.0.406
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 +915 -0
- package/dist/uninstall.js +569 -0
- package/package.json +31 -0
- package/payload/maxy/package.json +9 -0
- package/payload/maxy/public/assets/ChatInput-7sHhJaNJ.js +42 -0
- package/payload/maxy/public/assets/ChatInput-oLFewltq.css +1 -0
- package/payload/maxy/public/assets/admin-k0izNYS1.js +352 -0
- package/payload/maxy/public/assets/cormorant-cyrillic-300-normal-CzPHYadL.woff +0 -0
- package/payload/maxy/public/assets/cormorant-cyrillic-300-normal-DFUoTmrg.woff2 +0 -0
- package/payload/maxy/public/assets/cormorant-cyrillic-400-normal-C8QS47vb.woff2 +0 -0
- package/payload/maxy/public/assets/cormorant-cyrillic-400-normal-D3EsxgFc.woff +0 -0
- package/payload/maxy/public/assets/cormorant-cyrillic-500-normal-B7dJQtg-.woff +0 -0
- package/payload/maxy/public/assets/cormorant-cyrillic-500-normal-BLlg2W5x.woff2 +0 -0
- package/payload/maxy/public/assets/cormorant-cyrillic-ext-300-normal-BXl3lXsi.woff2 +0 -0
- package/payload/maxy/public/assets/cormorant-cyrillic-ext-300-normal-DmxSOTe3.woff +0 -0
- package/payload/maxy/public/assets/cormorant-cyrillic-ext-400-normal-Bgrpe4p1.woff +0 -0
- package/payload/maxy/public/assets/cormorant-cyrillic-ext-400-normal-BlcaxZtM.woff2 +0 -0
- package/payload/maxy/public/assets/cormorant-cyrillic-ext-500-normal-CdQuyvtc.woff +0 -0
- package/payload/maxy/public/assets/cormorant-cyrillic-ext-500-normal-pZw22qtS.woff2 +0 -0
- package/payload/maxy/public/assets/cormorant-latin-300-normal-CJ5dfen0.woff2 +0 -0
- package/payload/maxy/public/assets/cormorant-latin-300-normal-DQZObO_3.woff +0 -0
- package/payload/maxy/public/assets/cormorant-latin-400-normal-BGH8Vunh.woff2 +0 -0
- package/payload/maxy/public/assets/cormorant-latin-400-normal-C3_-2Ua-.woff +0 -0
- package/payload/maxy/public/assets/cormorant-latin-500-normal-Dj3SQ6fR.woff +0 -0
- package/payload/maxy/public/assets/cormorant-latin-500-normal-EBdSCOD3.woff2 +0 -0
- package/payload/maxy/public/assets/cormorant-latin-ext-300-normal-CkiUx0UG.woff +0 -0
- package/payload/maxy/public/assets/cormorant-latin-ext-300-normal-De3D72RL.woff2 +0 -0
- package/payload/maxy/public/assets/cormorant-latin-ext-400-normal-DuQ88yz3.woff2 +0 -0
- package/payload/maxy/public/assets/cormorant-latin-ext-400-normal-DuXFa1Dr.woff +0 -0
- package/payload/maxy/public/assets/cormorant-latin-ext-500-normal-AH9qog1s.woff2 +0 -0
- package/payload/maxy/public/assets/cormorant-latin-ext-500-normal-DAuUCO41.woff +0 -0
- package/payload/maxy/public/assets/cormorant-vietnamese-300-normal-BVqIp_mg.woff2 +0 -0
- package/payload/maxy/public/assets/cormorant-vietnamese-300-normal-CEMS9Pw-.woff +0 -0
- package/payload/maxy/public/assets/cormorant-vietnamese-400-normal-C-RiYxEf.woff2 +0 -0
- package/payload/maxy/public/assets/cormorant-vietnamese-400-normal-DmUuA7Y2.woff +0 -0
- package/payload/maxy/public/assets/cormorant-vietnamese-500-normal-DsPuwQHi.woff2 +0 -0
- package/payload/maxy/public/assets/cormorant-vietnamese-500-normal-tGBW_mI7.woff +0 -0
- package/payload/maxy/public/assets/dm-sans-latin-400-normal-BwCSEQnW.woff +0 -0
- package/payload/maxy/public/assets/dm-sans-latin-400-normal-CW0RaeGs.woff2 +0 -0
- package/payload/maxy/public/assets/dm-sans-latin-500-normal-B9HHJjqV.woff2 +0 -0
- package/payload/maxy/public/assets/dm-sans-latin-500-normal-Dr3UlScf.woff +0 -0
- package/payload/maxy/public/assets/dm-sans-latin-ext-400-normal-BjWJ59Pq.woff +0 -0
- package/payload/maxy/public/assets/dm-sans-latin-ext-400-normal-BtiwyxMk.woff2 +0 -0
- package/payload/maxy/public/assets/dm-sans-latin-ext-500-normal-BJfUCQsA.woff2 +0 -0
- package/payload/maxy/public/assets/dm-sans-latin-ext-500-normal-DR84L5F-.woff +0 -0
- package/payload/maxy/public/assets/public-3Y1Xk7cO.js +5 -0
- package/payload/maxy/public/brand/claude.png +0 -0
- package/payload/maxy/public/brand/maxy-black.png +0 -0
- package/payload/maxy/public/brand/maxy-monochrome.png +0 -0
- package/payload/maxy/public/brand/maxy.png +0 -0
- package/payload/maxy/public/brand-constants.json +8 -0
- package/payload/maxy/public/brand-defaults.css +12 -0
- package/payload/maxy/public/favicon.ico +0 -0
- package/payload/maxy/public/index.html +16 -0
- package/payload/maxy/public/public.html +16 -0
- package/payload/maxy/public/robots.txt +5 -0
- package/payload/maxy/public/vnc-popout.html +59 -0
- package/payload/maxy/server-init.cjs +115 -0
- package/payload/maxy/server.js +9876 -0
- package/payload/platform/config/brand.json +42 -0
- package/payload/platform/config/cloudflared.yml +17 -0
- package/payload/platform/knowledge/maxy.md +772 -0
- package/payload/platform/neo4j/migrations/001-backfill-scope.cypher +30 -0
- package/payload/platform/neo4j/schema.cypher +557 -0
- package/payload/platform/package-lock.json +2534 -0
- package/payload/platform/package.json +20 -0
- package/payload/platform/plugins/admin/PLUGIN.md +47 -0
- package/payload/platform/plugins/admin/hooks/agent-creation-approval.sh +153 -0
- package/payload/platform/plugins/admin/hooks/agent-creation-gate.sh +309 -0
- package/payload/platform/plugins/admin/hooks/agent-creation-post.sh +157 -0
- package/payload/platform/plugins/admin/hooks/pre-tool-use.sh +49 -0
- package/payload/platform/plugins/admin/hooks/session-start.sh +88 -0
- package/payload/platform/plugins/admin/hooks/test-agent-creation-gate.sh +878 -0
- package/payload/platform/plugins/admin/mcp/dist/index.d.ts +2 -0
- package/payload/platform/plugins/admin/mcp/dist/index.d.ts.map +1 -0
- package/payload/platform/plugins/admin/mcp/dist/index.js +616 -0
- package/payload/platform/plugins/admin/mcp/dist/index.js.map +1 -0
- package/payload/platform/plugins/admin/mcp/dist/lib/neo4j.d.ts +5 -0
- package/payload/platform/plugins/admin/mcp/dist/lib/neo4j.d.ts.map +1 -0
- package/payload/platform/plugins/admin/mcp/dist/lib/neo4j.js +34 -0
- package/payload/platform/plugins/admin/mcp/dist/lib/neo4j.js.map +1 -0
- package/payload/platform/plugins/admin/mcp/dist/lib/onboarding.d.ts +23 -0
- package/payload/platform/plugins/admin/mcp/dist/lib/onboarding.d.ts.map +1 -0
- package/payload/platform/plugins/admin/mcp/dist/lib/onboarding.js +160 -0
- package/payload/platform/plugins/admin/mcp/dist/lib/onboarding.js.map +1 -0
- package/payload/platform/plugins/admin/mcp/dist/lib/onboarding.test.d.ts +2 -0
- package/payload/platform/plugins/admin/mcp/dist/lib/onboarding.test.d.ts.map +1 -0
- package/payload/platform/plugins/admin/mcp/dist/lib/onboarding.test.js +224 -0
- package/payload/platform/plugins/admin/mcp/dist/lib/onboarding.test.js.map +1 -0
- package/payload/platform/plugins/admin/mcp/package.json +21 -0
- package/payload/platform/plugins/admin/references/chat-ui-guide.md +31 -0
- package/payload/platform/plugins/admin/references/contextual-ui.md +107 -0
- package/payload/platform/plugins/admin/skills/access-manager/SKILL.md +28 -0
- package/payload/platform/plugins/admin/skills/access-manager/references/operations.md +197 -0
- package/payload/platform/plugins/admin/skills/business-profile/SKILL.md +42 -0
- package/payload/platform/plugins/admin/skills/datetime/SKILL.md +91 -0
- package/payload/platform/plugins/admin/skills/onboarding/skill.md +136 -0
- package/payload/platform/plugins/admin/skills/plugin-management/skill.md +76 -0
- package/payload/platform/plugins/admin/skills/public-agent-manager/skill.md +212 -0
- package/payload/platform/plugins/admin/skills/qr-code/SKILL.md +35 -0
- package/payload/platform/plugins/admin/skills/qr-code/references/data-formats.md +113 -0
- package/payload/platform/plugins/admin/skills/skill-builder/SKILL.md +112 -0
- package/payload/platform/plugins/admin/skills/skill-builder/references/lean-pattern.md +110 -0
- package/payload/platform/plugins/admin/skills/specialist-management/skill.md +44 -0
- package/payload/platform/plugins/admin/skills/stream-log-review/SKILL.md +40 -0
- package/payload/platform/plugins/admin/skills/stream-log-review/references/analysis-patterns.md +161 -0
- package/payload/platform/plugins/admin/skills/update-knowledge/skill.md +47 -0
- package/payload/platform/plugins/anthropic/PLUGIN.md +38 -0
- package/payload/platform/plugins/anthropic/references/setup-guide.md +114 -0
- package/payload/platform/plugins/anthropic/skills/get-api-key.md +57 -0
- package/payload/platform/plugins/business-assistant/PLUGIN.md +59 -0
- package/payload/platform/plugins/business-assistant/references/crm.md +112 -0
- package/payload/platform/plugins/business-assistant/references/document-management.md +96 -0
- package/payload/platform/plugins/business-assistant/references/escalation.md +126 -0
- package/payload/platform/plugins/business-assistant/references/invoicing.md +163 -0
- package/payload/platform/plugins/business-assistant/references/profiling.md +50 -0
- package/payload/platform/plugins/business-assistant/references/quoting.md +56 -0
- package/payload/platform/plugins/business-assistant/references/scheduling.md +127 -0
- package/payload/platform/plugins/business-assistant/references/task-management.md +155 -0
- package/payload/platform/plugins/cloudflare/PLUGIN.md +48 -0
- package/payload/platform/plugins/cloudflare/mcp/dist/index.d.ts +2 -0
- package/payload/platform/plugins/cloudflare/mcp/dist/index.d.ts.map +1 -0
- package/payload/platform/plugins/cloudflare/mcp/dist/index.js +698 -0
- package/payload/platform/plugins/cloudflare/mcp/dist/index.js.map +1 -0
- package/payload/platform/plugins/cloudflare/mcp/dist/lib/cloudflared.d.ts +101 -0
- package/payload/platform/plugins/cloudflare/mcp/dist/lib/cloudflared.d.ts.map +1 -0
- package/payload/platform/plugins/cloudflare/mcp/dist/lib/cloudflared.js +525 -0
- package/payload/platform/plugins/cloudflare/mcp/dist/lib/cloudflared.js.map +1 -0
- package/payload/platform/plugins/cloudflare/mcp/package.json +19 -0
- package/payload/platform/plugins/cloudflare/references/setup-guide.md +126 -0
- package/payload/platform/plugins/cloudflare/skills/setup-tunnel.md +217 -0
- package/payload/platform/plugins/contacts/PLUGIN.md +20 -0
- package/payload/platform/plugins/contacts/mcp/dist/index.d.ts +2 -0
- package/payload/platform/plugins/contacts/mcp/dist/index.d.ts.map +1 -0
- package/payload/platform/plugins/contacts/mcp/dist/index.js +210 -0
- package/payload/platform/plugins/contacts/mcp/dist/index.js.map +1 -0
- package/payload/platform/plugins/contacts/mcp/dist/lib/neo4j.d.ts +5 -0
- package/payload/platform/plugins/contacts/mcp/dist/lib/neo4j.d.ts.map +1 -0
- package/payload/platform/plugins/contacts/mcp/dist/lib/neo4j.js +34 -0
- package/payload/platform/plugins/contacts/mcp/dist/lib/neo4j.js.map +1 -0
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-create.d.ts +19 -0
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-create.d.ts.map +1 -0
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-create.js +68 -0
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-create.js.map +1 -0
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-delete.d.ts +12 -0
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-delete.d.ts.map +1 -0
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-delete.js +35 -0
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-delete.js.map +1 -0
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-list.d.ts +22 -0
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-list.d.ts.map +1 -0
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-list.js +47 -0
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-list.js.map +1 -0
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-lookup.d.ts +20 -0
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-lookup.d.ts.map +1 -0
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-lookup.js +57 -0
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-lookup.js.map +1 -0
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-update.d.ts +13 -0
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-update.d.ts.map +1 -0
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-update.js +54 -0
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-update.js.map +1 -0
- package/payload/platform/plugins/contacts/mcp/package.json +19 -0
- package/payload/platform/plugins/deep-research/PLUGIN.md +14 -0
- package/payload/platform/plugins/deep-research/skills/deep-research/SKILL.md +46 -0
- package/payload/platform/plugins/deep-research/skills/deep-research/references/citation-styles.md +52 -0
- package/payload/platform/plugins/deep-research/skills/deep-research/references/research-modes.md +22 -0
- package/payload/platform/plugins/deep-research/skills/deep-research/references/search-strategy.md +24 -0
- package/payload/platform/plugins/docs/PLUGIN.md +44 -0
- package/payload/platform/plugins/docs/references/access-control.md +51 -0
- package/payload/platform/plugins/docs/references/contacts-guide.md +59 -0
- package/payload/platform/plugins/docs/references/deployment.md +71 -0
- package/payload/platform/plugins/docs/references/getting-started.md +45 -0
- package/payload/platform/plugins/docs/references/memory-guide.md +87 -0
- package/payload/platform/plugins/docs/references/platform.md +64 -0
- package/payload/platform/plugins/docs/references/plugins-guide.md +83 -0
- package/payload/platform/plugins/docs/references/settings.md +89 -0
- package/payload/platform/plugins/docs/references/telegram-guide.md +58 -0
- package/payload/platform/plugins/docs/references/troubleshooting.md +88 -0
- package/payload/platform/plugins/documents/mcp/dist/index.d.ts +2 -0
- package/payload/platform/plugins/documents/mcp/dist/index.d.ts.map +1 -0
- package/payload/platform/plugins/documents/mcp/dist/index.js +98 -0
- package/payload/platform/plugins/documents/mcp/dist/index.js.map +1 -0
- package/payload/platform/plugins/email/PLUGIN.md +222 -0
- package/payload/platform/plugins/email/mcp/dist/index.d.ts +2 -0
- package/payload/platform/plugins/email/mcp/dist/index.d.ts.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/index.js +288 -0
- package/payload/platform/plugins/email/mcp/dist/index.js.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/lib/credentials.d.ts +111 -0
- package/payload/platform/plugins/email/mcp/dist/lib/credentials.d.ts.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/lib/credentials.js +357 -0
- package/payload/platform/plugins/email/mcp/dist/lib/credentials.js.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/lib/embedding.d.ts +2 -0
- package/payload/platform/plugins/email/mcp/dist/lib/embedding.d.ts.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/lib/embedding.js +24 -0
- package/payload/platform/plugins/email/mcp/dist/lib/embedding.js.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/lib/graph.d.ts +87 -0
- package/payload/platform/plugins/email/mcp/dist/lib/graph.d.ts.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/lib/graph.js +324 -0
- package/payload/platform/plugins/email/mcp/dist/lib/graph.js.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/lib/imap.d.ts +215 -0
- package/payload/platform/plugins/email/mcp/dist/lib/imap.d.ts.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/lib/imap.js +735 -0
- package/payload/platform/plugins/email/mcp/dist/lib/imap.js.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/lib/neo4j.d.ts +5 -0
- package/payload/platform/plugins/email/mcp/dist/lib/neo4j.d.ts.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/lib/neo4j.js +34 -0
- package/payload/platform/plugins/email/mcp/dist/lib/neo4j.js.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/lib/providers.d.ts +25 -0
- package/payload/platform/plugins/email/mcp/dist/lib/providers.d.ts.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/lib/providers.js +116 -0
- package/payload/platform/plugins/email/mcp/dist/lib/providers.js.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/lib/screening.d.ts +29 -0
- package/payload/platform/plugins/email/mcp/dist/lib/screening.d.ts.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/lib/screening.js +101 -0
- package/payload/platform/plugins/email/mcp/dist/lib/screening.js.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/lib/smtp.d.ts +21 -0
- package/payload/platform/plugins/email/mcp/dist/lib/smtp.d.ts.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/lib/smtp.js +77 -0
- package/payload/platform/plugins/email/mcp/dist/lib/smtp.js.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/scripts/email-auto-respond.d.ts +38 -0
- package/payload/platform/plugins/email/mcp/dist/scripts/email-auto-respond.d.ts.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/scripts/email-auto-respond.js +844 -0
- package/payload/platform/plugins/email/mcp/dist/scripts/email-auto-respond.js.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/scripts/email-fetch.d.ts +25 -0
- package/payload/platform/plugins/email/mcp/dist/scripts/email-fetch.d.ts.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/scripts/email-fetch.js +214 -0
- package/payload/platform/plugins/email/mcp/dist/scripts/email-fetch.js.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-auto-respond-config.d.ts +19 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-auto-respond-config.d.ts.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-auto-respond-config.js +151 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-auto-respond-config.js.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-graph-query.d.ts +22 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-graph-query.d.ts.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-graph-query.js +188 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-graph-query.js.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-otp-extract.d.ts +15 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-otp-extract.d.ts.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-otp-extract.js +142 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-otp-extract.js.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-read.d.ts +14 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-read.d.ts.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-read.js +75 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-read.js.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-reply.d.ts +10 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-reply.d.ts.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-reply.js +83 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-reply.js.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-search.d.ts +15 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-search.d.ts.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-search.js +63 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-search.js.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-send.d.ts +10 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-send.d.ts.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-send.js +25 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-send.js.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-setup.d.ts +22 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-setup.d.ts.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-setup.js +183 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-setup.js.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-status.d.ts +6 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-status.d.ts.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-status.js +43 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-status.js.map +1 -0
- package/payload/platform/plugins/email/mcp/package.json +23 -0
- package/payload/platform/plugins/memory/PLUGIN.md +52 -0
- package/payload/platform/plugins/memory/mcp/dist/index.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/index.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/index.js +899 -0
- package/payload/platform/plugins/memory/mcp/dist/index.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/attachments.d.ts +37 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/attachments.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/attachments.js +68 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/attachments.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/document-hierarchy.d.ts +31 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/document-hierarchy.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/document-hierarchy.js +62 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/document-hierarchy.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/embeddings.d.ts +3 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/embeddings.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/embeddings.js +29 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/embeddings.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/neo4j.d.ts +5 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/neo4j.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/neo4j.js +34 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/neo4j.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/semantic-chunker.d.ts +61 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/semantic-chunker.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/semantic-chunker.js +266 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/semantic-chunker.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/semantic-chunker.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/semantic-chunker.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/semantic-chunker.test.js +233 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/semantic-chunker.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-delete.d.ts +19 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-delete.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-delete.js +98 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-delete.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-edit-attachment.d.ts +17 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-edit-attachment.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-edit-attachment.js +92 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-edit-attachment.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest-extract.d.ts +40 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest-extract.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest-extract.js +116 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest-extract.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest-web.d.ts +20 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest-web.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest-web.js +108 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest-web.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest.d.ts +35 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest.js +233 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-list-attachments.d.ts +17 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-list-attachments.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-list-attachments.js +86 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-list-attachments.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-read-attachment.d.ts +12 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-read-attachment.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-read-attachment.js +100 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-read-attachment.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-reindex.d.ts +8 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-reindex.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-reindex.js +71 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-reindex.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-rename-attachment.d.ts +13 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-rename-attachment.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-rename-attachment.js +63 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-rename-attachment.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-search.d.ts +34 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-search.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-search.js +380 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-search.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-update.d.ts +13 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-update.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-update.js +62 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-update.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-write.d.ts +21 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-write.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-write.js +60 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-write.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-delete.d.ts +13 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-delete.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-delete.js +18 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-delete.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-read.d.ts +41 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-read.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-read.js +192 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-read.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-update.d.ts +21 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-update.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-update.js +235 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-update.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/package.json +19 -0
- package/payload/platform/plugins/memory/references/schema-base.md +102 -0
- package/payload/platform/plugins/memory/references/schema-creator.md +35 -0
- package/payload/platform/plugins/memory/references/schema-estate-agent.md +35 -0
- package/payload/platform/plugins/memory/references/schema-food-beverage.md +32 -0
- package/payload/platform/plugins/memory/references/schema-hospitality.md +31 -0
- package/payload/platform/plugins/memory/references/schema-logistics.md +30 -0
- package/payload/platform/plugins/memory/references/schema-professional-services.md +33 -0
- package/payload/platform/plugins/memory/references/schema-retail.md +33 -0
- package/payload/platform/plugins/memory/references/schema-trades.md +36 -0
- package/payload/platform/plugins/memory/skills/conversational-memory.md +99 -0
- package/payload/platform/plugins/projects/PLUGIN.md +87 -0
- package/payload/platform/plugins/projects/references/investigation.md +63 -0
- package/payload/platform/plugins/projects/references/retrospective.md +71 -0
- package/payload/platform/plugins/projects/references/review.md +51 -0
- package/payload/platform/plugins/projects/references/sprint.md +168 -0
- package/payload/platform/plugins/sales/PLUGIN.md +106 -0
- package/payload/platform/plugins/sales/references/close-tracking.md +69 -0
- package/payload/platform/plugins/sales/references/comparisons.md +99 -0
- package/payload/platform/plugins/sales/references/competitive-positioning.md +51 -0
- package/payload/platform/plugins/sales/references/faq.md +62 -0
- package/payload/platform/plugins/sales/references/objection-handling.md +157 -0
- package/payload/platform/plugins/sales/references/pricing.md +71 -0
- package/payload/platform/plugins/scheduling/PLUGIN.md +79 -0
- package/payload/platform/plugins/scheduling/mcp/dist/index.d.ts +2 -0
- package/payload/platform/plugins/scheduling/mcp/dist/index.d.ts.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/index.js +201 -0
- package/payload/platform/plugins/scheduling/mcp/dist/index.js.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/embedding.d.ts +2 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/embedding.d.ts.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/embedding.js +19 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/embedding.js.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/neo4j.d.ts +5 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/neo4j.d.ts.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/neo4j.js +34 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/neo4j.js.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/scripts/check-due-events.d.ts +20 -0
- package/payload/platform/plugins/scheduling/mcp/dist/scripts/check-due-events.d.ts.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/scripts/check-due-events.js +475 -0
- package/payload/platform/plugins/scheduling/mcp/dist/scripts/check-due-events.js.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-cancel.d.ts +7 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-cancel.d.ts.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-cancel.js +23 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-cancel.js.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-event.d.ts +23 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-event.d.ts.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-event.js +107 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-event.js.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-get.d.ts +25 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-get.d.ts.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-get.js +53 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-get.js.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-list.d.ts +20 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-list.d.ts.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-list.js +58 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-list.js.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-update.d.ts +18 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-update.d.ts.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-update.js +167 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-update.js.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/package.json +21 -0
- package/payload/platform/plugins/tasks/.claude-plugin/plugin.json +18 -0
- package/payload/platform/plugins/tasks/.mcp.json +13 -0
- package/payload/platform/plugins/tasks/PLUGIN.md +56 -0
- package/payload/platform/plugins/tasks/mcp/dist/index.d.ts +2 -0
- package/payload/platform/plugins/tasks/mcp/dist/index.d.ts.map +1 -0
- package/payload/platform/plugins/tasks/mcp/dist/index.js +287 -0
- package/payload/platform/plugins/tasks/mcp/dist/index.js.map +1 -0
- package/payload/platform/plugins/tasks/mcp/dist/lib/embeddings.d.ts +7 -0
- package/payload/platform/plugins/tasks/mcp/dist/lib/embeddings.d.ts.map +1 -0
- package/payload/platform/plugins/tasks/mcp/dist/lib/embeddings.js +24 -0
- package/payload/platform/plugins/tasks/mcp/dist/lib/embeddings.js.map +1 -0
- package/payload/platform/plugins/tasks/mcp/dist/lib/neo4j.d.ts +5 -0
- package/payload/platform/plugins/tasks/mcp/dist/lib/neo4j.d.ts.map +1 -0
- package/payload/platform/plugins/tasks/mcp/dist/lib/neo4j.js +34 -0
- package/payload/platform/plugins/tasks/mcp/dist/lib/neo4j.js.map +1 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/session-list.d.ts +20 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/session-list.d.ts.map +1 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/session-list.js +37 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/session-list.js.map +1 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/session-name.d.ts +6 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/session-name.d.ts.map +1 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/session-name.js +13 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/session-name.js.map +1 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-complete.d.ts +16 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-complete.d.ts.map +1 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-complete.js +33 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-complete.js.map +1 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-create.d.ts +18 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-create.d.ts.map +1 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-create.js +55 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-create.js.map +1 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-get.d.ts +19 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-get.d.ts.map +1 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-get.js +51 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-get.js.map +1 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-list.d.ts +18 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-list.d.ts.map +1 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-list.js +66 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-list.js.map +1 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-ready.d.ts +21 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-ready.d.ts.map +1 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-ready.js +54 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-ready.js.map +1 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-relate.d.ts +12 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-relate.d.ts.map +1 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-relate.js +31 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-relate.js.map +1 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-update.d.ts +11 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-update.d.ts.map +1 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-update.js +62 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/task-update.js.map +1 -0
- package/payload/platform/plugins/tasks/mcp/package.json +20 -0
- package/payload/platform/plugins/waitlist/PLUGIN.md +63 -0
- package/payload/platform/plugins/waitlist/mcp/dist/index.d.ts +2 -0
- package/payload/platform/plugins/waitlist/mcp/dist/index.d.ts.map +1 -0
- package/payload/platform/plugins/waitlist/mcp/dist/index.js +276 -0
- package/payload/platform/plugins/waitlist/mcp/dist/index.js.map +1 -0
- package/payload/platform/plugins/waitlist/mcp/dist/lib/anthropic.d.ts +23 -0
- package/payload/platform/plugins/waitlist/mcp/dist/lib/anthropic.d.ts.map +1 -0
- package/payload/platform/plugins/waitlist/mcp/dist/lib/anthropic.js +115 -0
- package/payload/platform/plugins/waitlist/mcp/dist/lib/anthropic.js.map +1 -0
- package/payload/platform/plugins/waitlist/mcp/dist/lib/embedding.d.ts +3 -0
- package/payload/platform/plugins/waitlist/mcp/dist/lib/embedding.d.ts.map +1 -0
- package/payload/platform/plugins/waitlist/mcp/dist/lib/embedding.js +48 -0
- package/payload/platform/plugins/waitlist/mcp/dist/lib/embedding.js.map +1 -0
- package/payload/platform/plugins/waitlist/mcp/dist/lib/neo4j.d.ts +5 -0
- package/payload/platform/plugins/waitlist/mcp/dist/lib/neo4j.d.ts.map +1 -0
- package/payload/platform/plugins/waitlist/mcp/dist/lib/neo4j.js +34 -0
- package/payload/platform/plugins/waitlist/mcp/dist/lib/neo4j.js.map +1 -0
- package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-extract.d.ts +12 -0
- package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-extract.d.ts.map +1 -0
- package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-extract.js +197 -0
- package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-extract.js.map +1 -0
- package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-list.d.ts +22 -0
- package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-list.d.ts.map +1 -0
- package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-list.js +57 -0
- package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-list.js.map +1 -0
- package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-persist.d.ts +60 -0
- package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-persist.d.ts.map +1 -0
- package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-persist.js +342 -0
- package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-persist.js.map +1 -0
- package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-review.d.ts +18 -0
- package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-review.d.ts.map +1 -0
- package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-review.js +80 -0
- package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-review.js.map +1 -0
- package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-scan.d.ts +27 -0
- package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-scan.d.ts.map +1 -0
- package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-scan.js +40 -0
- package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-scan.js.map +1 -0
- package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-setup.d.ts +31 -0
- package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-setup.d.ts.map +1 -0
- package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-setup.js +336 -0
- package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-setup.js.map +1 -0
- package/payload/platform/plugins/waitlist/mcp/package.json +21 -0
- package/payload/platform/plugins/workflows/.claude-plugin/plugin.json +17 -0
- package/payload/platform/plugins/workflows/.mcp.json +12 -0
- package/payload/platform/plugins/workflows/PLUGIN.md +187 -0
- package/payload/platform/plugins/workflows/mcp/dist/index.d.ts +2 -0
- package/payload/platform/plugins/workflows/mcp/dist/index.d.ts.map +1 -0
- package/payload/platform/plugins/workflows/mcp/dist/index.js +408 -0
- package/payload/platform/plugins/workflows/mcp/dist/index.js.map +1 -0
- package/payload/platform/plugins/workflows/mcp/dist/lib/embeddings.d.ts +2 -0
- package/payload/platform/plugins/workflows/mcp/dist/lib/embeddings.d.ts.map +1 -0
- package/payload/platform/plugins/workflows/mcp/dist/lib/embeddings.js +19 -0
- package/payload/platform/plugins/workflows/mcp/dist/lib/embeddings.js.map +1 -0
- package/payload/platform/plugins/workflows/mcp/dist/lib/llm-call.d.ts +48 -0
- package/payload/platform/plugins/workflows/mcp/dist/lib/llm-call.d.ts.map +1 -0
- package/payload/platform/plugins/workflows/mcp/dist/lib/llm-call.js +281 -0
- package/payload/platform/plugins/workflows/mcp/dist/lib/llm-call.js.map +1 -0
- package/payload/platform/plugins/workflows/mcp/dist/lib/neo4j.d.ts +5 -0
- package/payload/platform/plugins/workflows/mcp/dist/lib/neo4j.d.ts.map +1 -0
- package/payload/platform/plugins/workflows/mcp/dist/lib/neo4j.js +34 -0
- package/payload/platform/plugins/workflows/mcp/dist/lib/neo4j.js.map +1 -0
- package/payload/platform/plugins/workflows/mcp/dist/lib/step-resolver.d.ts +71 -0
- package/payload/platform/plugins/workflows/mcp/dist/lib/step-resolver.d.ts.map +1 -0
- package/payload/platform/plugins/workflows/mcp/dist/lib/step-resolver.js +183 -0
- package/payload/platform/plugins/workflows/mcp/dist/lib/step-resolver.js.map +1 -0
- package/payload/platform/plugins/workflows/mcp/dist/lib/validate-capabilities.d.ts +24 -0
- package/payload/platform/plugins/workflows/mcp/dist/lib/validate-capabilities.d.ts.map +1 -0
- package/payload/platform/plugins/workflows/mcp/dist/lib/validate-capabilities.js +60 -0
- package/payload/platform/plugins/workflows/mcp/dist/lib/validate-capabilities.js.map +1 -0
- package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-create.d.ts +35 -0
- package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-create.d.ts.map +1 -0
- package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-create.js +124 -0
- package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-create.js.map +1 -0
- package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-delete.d.ts +6 -0
- package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-delete.d.ts.map +1 -0
- package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-delete.js +25 -0
- package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-delete.js.map +1 -0
- package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-execute.d.ts +50 -0
- package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-execute.d.ts.map +1 -0
- package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-execute.js +383 -0
- package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-execute.js.map +1 -0
- package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-get.d.ts +27 -0
- package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-get.d.ts.map +1 -0
- package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-get.js +49 -0
- package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-get.js.map +1 -0
- package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-list.d.ts +16 -0
- package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-list.d.ts.map +1 -0
- package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-list.js +43 -0
- package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-list.js.map +1 -0
- package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-runs.d.ts +27 -0
- package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-runs.d.ts.map +1 -0
- package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-runs.js +64 -0
- package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-runs.js.map +1 -0
- package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-update.d.ts +11 -0
- package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-update.d.ts.map +1 -0
- package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-update.js +162 -0
- package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-update.js.map +1 -0
- package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-validate.d.ts +13 -0
- package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-validate.d.ts.map +1 -0
- package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-validate.js +53 -0
- package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-validate.js.map +1 -0
- package/payload/platform/plugins/workflows/mcp/package.json +20 -0
- package/payload/platform/plugins/workflows/mcp/test-runner.mjs +710 -0
- package/payload/platform/plugins/workflows/mcp/test-workflows.sh +73 -0
- package/payload/platform/plugins/workflows/skills/workflow-manager/skill.md +88 -0
- package/payload/platform/scripts/hooks/pre-commit +111 -0
- package/payload/platform/scripts/resume-tunnel.sh +86 -0
- package/payload/platform/scripts/seed-neo4j.sh +273 -0
- package/payload/platform/scripts/setup.sh +177 -0
- package/payload/platform/scripts/vnc.sh +127 -0
- package/payload/platform/templates/account.json +13 -0
- package/payload/platform/templates/agents/admin/AGENTS.md +10 -0
- package/payload/platform/templates/agents/admin/IDENTITY.md +124 -0
- package/payload/platform/templates/agents/admin/LEARNINGS.md +21 -0
- package/payload/platform/templates/agents/admin/SOUL.md +1 -0
- package/payload/platform/templates/agents/public/IDENTITY.md +18 -0
- package/payload/platform/templates/agents/public/SOUL.md +7 -0
- package/payload/platform/templates/agents/public/config.json +9 -0
- package/payload/platform/templates/specialists/.claude-plugin/plugin.json +4 -0
- package/payload/platform/templates/specialists/agents/admin-specialist.md +13 -0
- package/payload/platform/templates/specialists/agents/browser-specialist.md +35 -0
- package/payload/platform/templates/specialists/agents/document-specialist.md +70 -0
- package/payload/platform/templates/specialists/agents/memory-specialist.md +13 -0
- package/payload/platform/templates/specialists/agents/researcher.md +52 -0
- package/payload/platform/templates/specialists/agents/scheduler.md +11 -0
- package/payload/platform/tsconfig.base.json +18 -0
- package/payload/premium-plugins/real-agency/PLUGIN.md +101 -0
- package/payload/premium-plugins/real-agency/references/agent-performance-atomic-habits.md +52 -0
- package/payload/premium-plugins/real-agency/references/agent-performance-daily-routine-scorecard.md +104 -0
- package/payload/premium-plugins/real-agency/references/agent-performance-hp6-model.md +63 -0
- package/payload/premium-plugins/real-agency/references/agent-performance-twelve-week-year.md +71 -0
- package/payload/premium-plugins/real-agency/references/bespoke-coaching-coaching-boundaries.md +56 -0
- package/payload/premium-plugins/real-agency/references/bespoke-coaching-feedback-framework.md +61 -0
- package/payload/premium-plugins/real-agency/references/bespoke-coaching-performance-framework.md +109 -0
- package/payload/premium-plugins/real-agency/references/bootstrap-onboarding-flow.md +63 -0
- package/payload/premium-plugins/real-agency/references/business-growth-buy-back-your-time.md +37 -0
- package/payload/premium-plugins/real-agency/references/business-growth-firewave-gost-scorecards.md +14 -0
- package/payload/premium-plugins/real-agency/references/business-growth-keller-org-model.md +17 -0
- package/payload/premium-plugins/real-agency/references/business-growth-lencioni-team-models.md +22 -0
- package/payload/premium-plugins/real-agency/references/business-growth-listing-management-system.md +11 -0
- package/payload/premium-plugins/real-agency/references/business-growth-net-figure-form.md +11 -0
- package/payload/premium-plugins/real-agency/references/business-growth-serhant-bizinbox-notes.md +13 -0
- package/payload/premium-plugins/real-agency/references/business-growth-team-roles-commission.md +14 -0
- package/payload/premium-plugins/real-agency/references/business-growth-va-2026-ops.md +43 -0
- package/payload/premium-plugins/real-agency/references/business-growth-wingman-structure.md +13 -0
- package/payload/premium-plugins/real-agency/references/business-operations-crm-systems.md +57 -0
- package/payload/premium-plugins/real-agency/references/business-operations-hiring-guide.md +59 -0
- package/payload/premium-plugins/real-agency/references/business-operations-impact-framework.md +47 -0
- package/payload/premium-plugins/real-agency/references/business-operations-minutes-equal-money.md +55 -0
- package/payload/premium-plugins/real-agency/references/business-operations-team-management.md +48 -0
- package/payload/premium-plugins/real-agency/references/buyer-management-buyer-qualification-questions.md +16 -0
- package/payload/premium-plugins/real-agency/references/buyer-management-buyer-qualification.md +59 -0
- package/payload/premium-plugins/real-agency/references/buyer-management-buyer-scripts.md +63 -0
- package/payload/premium-plugins/real-agency/references/buyer-management-buyer-working-scripts.md +54 -0
- package/payload/premium-plugins/real-agency/references/buyer-management-feedback-collection.md +42 -0
- package/payload/premium-plugins/real-agency/references/buyer-management-offer-capture.md +38 -0
- package/payload/premium-plugins/real-agency/references/buyer-management-viewing-booking.md +32 -0
- package/payload/premium-plugins/real-agency/references/buyer-management-viewing-management.md +52 -0
- package/payload/premium-plugins/real-agency/references/buyer-seller-guides-care-fees-guide.md +68 -0
- package/payload/premium-plugins/real-agency/references/buyer-seller-guides-divorce-sales-guide.md +61 -0
- package/payload/premium-plugins/real-agency/references/buyer-seller-guides-downsizing-guide.md +45 -0
- package/payload/premium-plugins/real-agency/references/buyer-seller-guides-first-time-buyers.md +92 -0
- package/payload/premium-plugins/real-agency/references/buyer-seller-guides-first-time-sellers.md +78 -0
- package/payload/premium-plugins/real-agency/references/buyer-seller-guides-probate-guide.md +53 -0
- package/payload/premium-plugins/real-agency/references/buyer-seller-guides-upsizing-guide.md +41 -0
- package/payload/premium-plugins/real-agency/references/coaching-toolkit-coaching-exercises.md +86 -0
- package/payload/premium-plugins/real-agency/references/coaching-toolkit-goal-setting.md +78 -0
- package/payload/premium-plugins/real-agency/references/coaching-toolkit-one-to-one-framework.md +92 -0
- package/payload/premium-plugins/real-agency/references/coaching-toolkit-soi-workbook.md +103 -0
- package/payload/premium-plugins/real-agency/references/content-directory-module-delivery.md +65 -0
- package/payload/premium-plugins/real-agency/references/content-directory-progress-tracking.md +47 -0
- package/payload/premium-plugins/real-agency/references/exp-partnership-12-reasons.md +39 -0
- package/payload/premium-plugins/real-agency/references/exp-partnership-95-5-system.md +66 -0
- package/payload/premium-plugins/real-agency/references/exp-partnership-agent-attraction-scripts.md +90 -0
- package/payload/premium-plugins/real-agency/references/exp-partnership-business-partnership.md +92 -0
- package/payload/premium-plugins/real-agency/references/exp-partnership-exp-model-overview.md +66 -0
- package/payload/premium-plugins/real-agency/references/exp-partnership-model-comparison.md +66 -0
- package/payload/premium-plugins/real-agency/references/exp-partnership-revenue-share-explained.md +57 -0
- package/payload/premium-plugins/real-agency/references/home-preparation-kerb-appeal.md +38 -0
- package/payload/premium-plugins/real-agency/references/home-preparation-photo-day.md +59 -0
- package/payload/premium-plugins/real-agency/references/home-preparation-situational-tips.md +50 -0
- package/payload/premium-plugins/real-agency/references/home-preparation-staging-guide.md +52 -0
- package/payload/premium-plugins/real-agency/references/lead-nurturing-buyer-search-letter.md +28 -0
- package/payload/premium-plugins/real-agency/references/lead-nurturing-buyer-search-letters.md +37 -0
- package/payload/premium-plugins/real-agency/references/lead-nurturing-database-reactivation.md +30 -0
- package/payload/premium-plugins/real-agency/references/lead-nurturing-email-nurture-sequences.md +45 -0
- package/payload/premium-plugins/real-agency/references/lead-nurturing-facebook-referrals.md +30 -0
- package/payload/premium-plugins/real-agency/references/lead-nurturing-firewave-email-nurture-sequences.md +41 -0
- package/payload/premium-plugins/real-agency/references/lead-nurturing-keller-33-touch.md +34 -0
- package/payload/premium-plugins/real-agency/references/lead-nurturing-neighbour-letters.md +31 -0
- package/payload/premium-plugins/real-agency/references/lead-nurturing-neighbour-notification-letter.md +20 -0
- package/payload/premium-plugins/real-agency/references/lead-nurturing-ofi-follow-up-dialogue.md +22 -0
- package/payload/premium-plugins/real-agency/references/lead-nurturing-ofi-follow-up.md +26 -0
- package/payload/premium-plugins/real-agency/references/lead-nurturing-serhant-three-fs-plus.md +21 -0
- package/payload/premium-plugins/real-agency/references/lead-nurturing-sharran-10x10x10.md +18 -0
- package/payload/premium-plugins/real-agency/references/lead-nurturing-sms-templates.md +40 -0
- package/payload/premium-plugins/real-agency/references/lead-nurturing-sphere-of-influence-notes.md +34 -0
- package/payload/premium-plugins/real-agency/references/lead-nurturing-sphere-of-influence.md +60 -0
- package/payload/premium-plugins/real-agency/references/lead-nurturing-tom-panos-sms-templates.md +59 -0
- package/payload/premium-plugins/real-agency/references/listing-presentation-booking-script.md +51 -0
- package/payload/premium-plugins/real-agency/references/listing-presentation-objection-scripts.md +193 -0
- package/payload/premium-plugins/real-agency/references/listing-presentation-penhaul-presentation.md +123 -0
- package/payload/premium-plugins/real-agency/references/listing-presentation-pre-listing-kit.md +139 -0
- package/payload/premium-plugins/real-agency/references/listing-presentation-set-to-sell.md +55 -0
- package/payload/premium-plugins/real-agency/references/listing-presentation-sharran-frameworks.md +107 -0
- package/payload/premium-plugins/real-agency/references/negotiation-deal-saving.md +47 -0
- package/payload/premium-plugins/real-agency/references/negotiation-negotiation-deep-guide.md +64 -0
- package/payload/premium-plugins/real-agency/references/negotiation-negotiation-prep-principles.md +29 -0
- package/payload/premium-plugins/real-agency/references/negotiation-negotiation-techniques.md +42 -0
- package/payload/premium-plugins/real-agency/references/negotiation-offer-presentation.md +43 -0
- package/payload/premium-plugins/real-agency/references/personal-branding-attraction-agent-notes.md +31 -0
- package/payload/premium-plugins/real-agency/references/personal-branding-attraction-agent.md +58 -0
- package/payload/premium-plugins/real-agency/references/personal-branding-authenticity-boundaries.md +28 -0
- package/payload/premium-plugins/real-agency/references/personal-branding-become-a-brand-leader-notes.md +19 -0
- package/payload/premium-plugins/real-agency/references/personal-branding-blast-formula.md +42 -0
- package/payload/premium-plugins/real-agency/references/personal-branding-brand-leader.md +48 -0
- package/payload/premium-plugins/real-agency/references/personal-branding-brand-strategy-system.md +59 -0
- package/payload/premium-plugins/real-agency/references/personal-branding-content-engine.md +49 -0
- package/payload/premium-plugins/real-agency/references/personal-branding-firewave-blast-and-blogging.md +23 -0
- package/payload/premium-plugins/real-agency/references/personal-branding-gary-v-content.md +52 -0
- package/payload/premium-plugins/real-agency/references/personal-branding-gary-v-principles.md +20 -0
- package/payload/premium-plugins/real-agency/references/personal-branding-oversubscribed-positioning.md +18 -0
- package/payload/premium-plugins/real-agency/references/personal-branding-platforms.md +41 -0
- package/payload/premium-plugins/real-agency/references/personal-branding-priestley-oversubscribed.md +54 -0
- package/payload/premium-plugins/real-agency/references/personal-branding-storeys-style-examples.md +25 -0
- package/payload/premium-plugins/real-agency/references/personal-branding-visual-identity.md +27 -0
- package/payload/premium-plugins/real-agency/references/property-marketing-auction-report-template.md +41 -0
- package/payload/premium-plugins/real-agency/references/property-marketing-coming-soon-campaign.md +43 -0
- package/payload/premium-plugins/real-agency/references/property-marketing-direct-mail-templates.md +121 -0
- package/payload/premium-plugins/real-agency/references/property-marketing-eoi-form-template.md +62 -0
- package/payload/premium-plugins/real-agency/references/property-marketing-monthly-scorecard.md +63 -0
- package/payload/premium-plugins/real-agency/references/prospecting-database-matching.md +30 -0
- package/payload/premium-plugins/real-agency/references/prospecting-database-value.md +53 -0
- package/payload/premium-plugins/real-agency/references/prospecting-prospecting-dialogues.md +24 -0
- package/payload/premium-plugins/real-agency/references/prospecting-reactivation.md +34 -0
- package/payload/premium-plugins/real-agency/references/sales-closer-serhant-emotion-stages.md +36 -0
- package/payload/premium-plugins/real-agency/references/sales-discovery-chris-voss-discovery.md +88 -0
- package/payload/premium-plugins/real-agency/references/sales-discovery-firewave-gost-journey.md +68 -0
- package/payload/premium-plugins/real-agency/references/sales-discovery-phil-jones-openers.md +78 -0
- package/payload/premium-plugins/real-agency/references/sales-discovery-pre-listing-checklist.md +77 -0
- package/payload/premium-plugins/real-agency/references/sales-discovery-serhant-improv.md +22 -0
- package/payload/premium-plugins/real-agency/references/sales-discovery-tom-ferry-discovery.md +103 -0
- package/payload/premium-plugins/real-agency/references/sales-discovery-vendor-motivation-competitor.md +52 -0
- package/payload/premium-plugins/real-agency/references/sales-negotiation-chris-voss-negotiation.md +138 -0
- package/payload/premium-plugins/real-agency/references/sales-negotiation-phil-jones-price-words.md +68 -0
- package/payload/premium-plugins/real-agency/references/sales-negotiation-serhant-negotiation-plus.md +55 -0
- package/payload/premium-plugins/real-agency/references/sales-negotiation-tom-panos-commission-pricing.md +102 -0
- package/payload/premium-plugins/real-agency/references/sales-negotiation-tony-morris-questioning.md +71 -0
- package/payload/premium-plugins/real-agency/references/sales-progression-conveyancing-guide.md +54 -0
- package/payload/premium-plugins/real-agency/references/sales-progression-transaction-tracking.md +66 -0
- package/payload/premium-plugins/real-agency/references/serhant-training-agent-training-guide.md +70 -0
- package/payload/premium-plugins/real-agency/references/serhant-training-business-in-a-box.md +72 -0
- package/payload/premium-plugins/real-agency/references/serhant-training-buyers-guide.md +53 -0
- package/payload/premium-plugins/real-agency/references/serhant-training-codo-method.md +72 -0
- package/payload/premium-plugins/real-agency/references/serhant-training-website-planning-guide.md +79 -0
- package/payload/premium-plugins/real-agency/references/vendor-communication-fee-protection-and-agenda.md +28 -0
- package/payload/premium-plugins/real-agency/references/vendor-communication-listing-scripts.md +44 -0
- package/payload/premium-plugins/real-agency/references/vendor-communication-negotiation-deep-guide.md +70 -0
- package/payload/premium-plugins/real-agency/references/vendor-communication-price-alignment-scripts.md +33 -0
- package/payload/premium-plugins/real-agency/references/vendor-communication-price-alignment.md +34 -0
- package/payload/premium-plugins/real-agency/references/vendor-communication-scenario-scripts.md +38 -0
- package/payload/premium-plugins/real-agency/references/vendor-communication-seller-engagement.md +51 -0
- package/payload/premium-plugins/real-agency/references/vendor-communication-valuation-booking.md +76 -0
- package/payload/premium-plugins/real-agency/references/vendor-communication-vendor-scripts.md +63 -0
- package/payload/premium-plugins/real-agency/references/vendor-communication-vendor-updates.md +41 -0
- package/payload/premium-plugins/real-agency/skills/agent-performance.md +367 -0
- package/payload/premium-plugins/real-agency/skills/bespoke-coaching.md +28 -0
- package/payload/premium-plugins/real-agency/skills/bootstrap.md +26 -0
- package/payload/premium-plugins/real-agency/skills/business-growth.md +138 -0
- package/payload/premium-plugins/real-agency/skills/business-operations.md +32 -0
- package/payload/premium-plugins/real-agency/skills/buyer-feedback.md +109 -0
- package/payload/premium-plugins/real-agency/skills/buyer-management.md +41 -0
- package/payload/premium-plugins/real-agency/skills/buyer-seller-guides.md +407 -0
- package/payload/premium-plugins/real-agency/skills/coaching-toolkit.md +419 -0
- package/payload/premium-plugins/real-agency/skills/content-directory.md +39 -0
- package/payload/premium-plugins/real-agency/skills/exp-partnership.md +52 -0
- package/payload/premium-plugins/real-agency/skills/home-preparation.md +28 -0
- package/payload/premium-plugins/real-agency/skills/lead-nurturing.md +143 -0
- package/payload/premium-plugins/real-agency/skills/listing-presentation.md +286 -0
- package/payload/premium-plugins/real-agency/skills/negotiation.md +34 -0
- package/payload/premium-plugins/real-agency/skills/personal-branding.md +117 -0
- package/payload/premium-plugins/real-agency/skills/property-enquiry.md +126 -0
- package/payload/premium-plugins/real-agency/skills/property-marketing.md +337 -0
- package/payload/premium-plugins/real-agency/skills/prospecting.md +33 -0
- package/payload/premium-plugins/real-agency/skills/sales-closer.md +27 -0
- package/payload/premium-plugins/real-agency/skills/sales-discovery.md +34 -0
- package/payload/premium-plugins/real-agency/skills/sales-negotiation.md +31 -0
- package/payload/premium-plugins/real-agency/skills/sales-progression.md +27 -0
- package/payload/premium-plugins/real-agency/skills/serhant-training.md +410 -0
- package/payload/premium-plugins/real-agency/skills/valuation-booking.md +182 -0
- package/payload/premium-plugins/real-agency/skills/vendor-communication.md +42 -0
- package/payload/premium-plugins/real-agency/skills/vendor-updates.md +153 -0
- package/payload/premium-plugins/real-agency/skills/viewing-management.md +111 -0
- package/payload/premium-plugins/teaching/PLUGIN.md +58 -0
- package/payload/premium-plugins/teaching/references/assessment.md +70 -0
- package/payload/premium-plugins/teaching/references/classroom-conduct.md +43 -0
- package/payload/premium-plugins/teaching/references/context-gathering.md +41 -0
- package/payload/premium-plugins/teaching/references/disaggregation.md +49 -0
- package/payload/premium-plugins/teaching/references/materials.md +116 -0
- package/payload/premium-plugins/teaching/references/plan-structure.md +94 -0
- package/payload/premium-plugins/teaching/references/teaching-modes.md +83 -0
- package/payload/premium-plugins/teaching/skills/interactive-tutor.md +59 -0
- package/payload/premium-plugins/teaching/skills/lesson-planner.md +48 -0
- package/payload/premium-plugins/teaching/skills/study-pack-builder.md +52 -0
- package/payload/premium-plugins/writer-craft/PLUGIN.md +88 -0
- package/payload/premium-plugins/writer-craft/agents/writer-craft--manuscript-reviewer.md +92 -0
- package/payload/premium-plugins/writer-craft/references/audience-analysis.md +73 -0
- package/payload/premium-plugins/writer-craft/references/blueprinting-and-scene-cards.md +118 -0
- package/payload/premium-plugins/writer-craft/references/blueprinting-exercises.md +118 -0
- package/payload/premium-plugins/writer-craft/references/blueprinting-process.md +128 -0
- package/payload/premium-plugins/writer-craft/references/book-and-chapter-models.md +77 -0
- package/payload/premium-plugins/writer-craft/references/cause-effect-setup-payoff.md +79 -0
- package/payload/premium-plugins/writer-craft/references/citation-rules.md +103 -0
- package/payload/premium-plugins/writer-craft/references/conflict-escalation.md +81 -0
- package/payload/premium-plugins/writer-craft/references/copyediting.md +73 -0
- package/payload/premium-plugins/writer-craft/references/crafting-persuasive-story.md +76 -0
- package/payload/premium-plugins/writer-craft/references/developmental-editing.md +85 -0
- package/payload/premium-plugins/writer-craft/references/genre-specific-editing.md +78 -0
- package/payload/premium-plugins/writer-craft/references/hooking-readers.md +67 -0
- package/payload/premium-plugins/writer-craft/references/indirect-narration.md +72 -0
- package/payload/premium-plugins/writer-craft/references/inner-issue-and-protagonist-goal.md +66 -0
- package/payload/premium-plugins/writer-craft/references/journal-article-models.md +74 -0
- package/payload/premium-plugins/writer-craft/references/line-editing.md +55 -0
- package/payload/premium-plugins/writer-craft/references/misbelief-desire-worldview.md +87 -0
- package/payload/premium-plugins/writer-craft/references/neurochemistry-of-engagement.md +94 -0
- package/payload/premium-plugins/writer-craft/references/origin-scenes-and-escalation.md +82 -0
- package/payload/premium-plugins/writer-craft/references/other-source-models.md +146 -0
- package/payload/premium-plugins/writer-craft/references/persuasion-case-studies.md +67 -0
- package/payload/premium-plugins/writer-craft/references/pov-types-and-voice.md +91 -0
- package/payload/premium-plugins/writer-craft/references/prose-review-checklist.md +112 -0
- package/payload/premium-plugins/writer-craft/references/protagonist-filter.md +71 -0
- package/payload/premium-plugins/writer-craft/references/punctuation-and-grammar.md +72 -0
- package/payload/premium-plugins/writer-craft/references/reference-list-rules.md +70 -0
- package/payload/premium-plugins/writer-craft/references/repetition.md +71 -0
- package/payload/premium-plugins/writer-craft/references/review-manuscript-checklist.md +119 -0
- package/payload/premium-plugins/writer-craft/references/scene-analysis-framework.md +95 -0
- package/payload/premium-plugins/writer-craft/references/self-editing.md +89 -0
- package/payload/premium-plugins/writer-craft/references/sound-and-rhythm.md +64 -0
- package/payload/premium-plugins/writer-craft/references/tense-and-person.md +85 -0
- package/payload/premium-plugins/writer-craft/references/transformation-framework.md +86 -0
- package/payload/premium-plugins/writer-craft/references/word-economy.md +93 -0
- package/payload/premium-plugins/writer-craft/skills/citation-style.md +94 -0
- package/payload/premium-plugins/writer-craft/skills/editorial-practice.md +108 -0
- package/payload/premium-plugins/writer-craft/skills/persuasive-storytelling.md +114 -0
- package/payload/premium-plugins/writer-craft/skills/point-of-view.md +97 -0
- package/payload/premium-plugins/writer-craft/skills/prose-craft.md +100 -0
- package/payload/premium-plugins/writer-craft/skills/reader-engagement.md +100 -0
- package/payload/premium-plugins/writer-craft/skills/review-manuscript.md +111 -0
- package/payload/premium-plugins/writer-craft/skills/review-prose.md +99 -0
- package/payload/premium-plugins/writer-craft/skills/review-scene.md +99 -0
- package/payload/premium-plugins/writer-craft/skills/story-architecture.md +106 -0
- package/payload/premium-plugins/writer-craft/skills/story-blueprint.md +133 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,915 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { execFileSync, spawn, spawnSync } from "node:child_process";
|
|
3
|
+
import { existsSync, mkdirSync, writeFileSync, cpSync, readFileSync, rmSync, readdirSync, appendFileSync, openSync, closeSync } from "node:fs";
|
|
4
|
+
import { resolve, join } from "node:path";
|
|
5
|
+
import { randomBytes } from "node:crypto";
|
|
6
|
+
const PAYLOAD_DIR = resolve(import.meta.dirname, "../payload");
|
|
7
|
+
// Brand manifest — read from payload to derive all brand-specific installation values.
|
|
8
|
+
// The bundler stamps brand.json into the payload at build time.
|
|
9
|
+
const BRAND_PATH = join(PAYLOAD_DIR, "platform", "config", "brand.json");
|
|
10
|
+
if (!existsSync(BRAND_PATH)) {
|
|
11
|
+
console.error("FATAL: brand.json not found in payload. Package may be corrupted.");
|
|
12
|
+
process.exit(1);
|
|
13
|
+
}
|
|
14
|
+
let BRAND;
|
|
15
|
+
try {
|
|
16
|
+
BRAND = JSON.parse(readFileSync(BRAND_PATH, "utf-8"));
|
|
17
|
+
}
|
|
18
|
+
catch (err) {
|
|
19
|
+
console.error(`FATAL: Failed to parse brand.json: ${err.message}`);
|
|
20
|
+
process.exit(1);
|
|
21
|
+
}
|
|
22
|
+
const INSTALL_DIR = resolve(process.env.HOME ?? "/root", BRAND.installDir);
|
|
23
|
+
const LOG_DIR = resolve(process.env.HOME ?? "/root", BRAND.configDir, "logs");
|
|
24
|
+
const LOG_FILE = join(LOG_DIR, `install-${new Date().toISOString().replace(/[:.]/g, "-")}.log`);
|
|
25
|
+
// npm flags tuned for Raspberry Pi — reduce parallelism, increase patience
|
|
26
|
+
const NPM_NET_FLAGS = [
|
|
27
|
+
"--fetch-retries=5",
|
|
28
|
+
"--fetch-retry-mintimeout=30000",
|
|
29
|
+
"--fetch-retry-maxtimeout=120000",
|
|
30
|
+
"--maxsockets=3",
|
|
31
|
+
];
|
|
32
|
+
// ---------------------------------------------------------------------------
|
|
33
|
+
// Logging — timestamped to console AND persistent log file
|
|
34
|
+
// ---------------------------------------------------------------------------
|
|
35
|
+
function initLogging() {
|
|
36
|
+
mkdirSync(LOG_DIR, { recursive: true });
|
|
37
|
+
appendFileSync(LOG_FILE, [
|
|
38
|
+
"",
|
|
39
|
+
"=".repeat(64),
|
|
40
|
+
` ${BRAND.productName} Install Log — ${new Date().toISOString()}`,
|
|
41
|
+
` Node ${process.version} | ${process.platform} ${process.arch}`,
|
|
42
|
+
"=".repeat(64),
|
|
43
|
+
"",
|
|
44
|
+
].join("\n") + "\n");
|
|
45
|
+
}
|
|
46
|
+
function logFile(msg) {
|
|
47
|
+
try {
|
|
48
|
+
appendFileSync(LOG_FILE, `[${new Date().toISOString()}] ${msg}\n`);
|
|
49
|
+
}
|
|
50
|
+
catch { /* fs full */ }
|
|
51
|
+
}
|
|
52
|
+
// Mirror all console output into the log file
|
|
53
|
+
const _log = console.log;
|
|
54
|
+
const _err = console.error;
|
|
55
|
+
console.log = (...args) => { _log(...args); logFile(args.map(String).join(" ")); };
|
|
56
|
+
console.error = (...args) => { _err(...args); logFile(`[ERROR] ${args.map(String).join(" ")}`); };
|
|
57
|
+
// ---------------------------------------------------------------------------
|
|
58
|
+
// Diagnostics — system state snapshot for post-mortem analysis
|
|
59
|
+
// ---------------------------------------------------------------------------
|
|
60
|
+
function logDiagnostics(label) {
|
|
61
|
+
logFile(`\n--- Diagnostics: ${label} ---`);
|
|
62
|
+
if (!isLinux()) {
|
|
63
|
+
logFile(" (not Linux — limited diagnostics)");
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
const run = (cmd, args) => {
|
|
67
|
+
const r = spawnSync(cmd, args, { encoding: "utf-8", stdio: "pipe", timeout: 10_000 });
|
|
68
|
+
return (r.stdout || r.stderr || "").trim();
|
|
69
|
+
};
|
|
70
|
+
logFile(`Disk:\n${run("df", ["-h", "/", "/tmp"])}`);
|
|
71
|
+
logFile(`Memory:\n${run("free", ["-h"])}`);
|
|
72
|
+
logFile(`Uptime: ${run("uptime", [])}`);
|
|
73
|
+
for (const host of ["registry.npmjs.org", "github.com"]) {
|
|
74
|
+
const dns = spawnSync("host", ["-W", "5", host], { encoding: "utf-8", stdio: "pipe", timeout: 10_000 });
|
|
75
|
+
logFile(`DNS ${host}: ${dns.status === 0 ? "OK" : "FAIL"} — ${(dns.stdout || dns.stderr || "").trim().split("\n")[0]}`);
|
|
76
|
+
}
|
|
77
|
+
const curl = spawnSync("curl", [
|
|
78
|
+
"-sf", "-o", "/dev/null",
|
|
79
|
+
"-w", "HTTP %{http_code} in %{time_total}s (dns: %{time_namelookup}s, connect: %{time_connect}s)",
|
|
80
|
+
"--connect-timeout", "10",
|
|
81
|
+
"https://registry.npmjs.org/",
|
|
82
|
+
], { encoding: "utf-8", stdio: "pipe", timeout: 15_000 });
|
|
83
|
+
logFile(`Registry HTTP: ${curl.stdout?.trim() || `FAIL — ${curl.stderr?.trim()}`}`);
|
|
84
|
+
logFile(`--- End Diagnostics ---\n`);
|
|
85
|
+
}
|
|
86
|
+
/** Append the most recent npm debug log into our install log for post-mortem. */
|
|
87
|
+
function captureNpmDebugLog() {
|
|
88
|
+
const logsDir = resolve(process.env.HOME ?? "/root", ".npm/_logs");
|
|
89
|
+
if (!existsSync(logsDir))
|
|
90
|
+
return;
|
|
91
|
+
try {
|
|
92
|
+
const files = readdirSync(logsDir).filter(f => f.endsWith("-debug-0.log")).sort().reverse();
|
|
93
|
+
if (files[0]) {
|
|
94
|
+
const content = readFileSync(join(logsDir, files[0]), "utf-8");
|
|
95
|
+
logFile(`\n--- npm debug log: ${files[0]} (last 200 lines) ---`);
|
|
96
|
+
const lines = content.split("\n");
|
|
97
|
+
logFile(lines.slice(Math.max(0, lines.length - 200)).join("\n"));
|
|
98
|
+
logFile(`--- end npm debug log ---\n`);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
catch { /* ignore */ }
|
|
102
|
+
}
|
|
103
|
+
// ---------------------------------------------------------------------------
|
|
104
|
+
// Helpers
|
|
105
|
+
// ---------------------------------------------------------------------------
|
|
106
|
+
function log(step, total, message) {
|
|
107
|
+
console.log(`[${step}/${total}] ${message}`);
|
|
108
|
+
}
|
|
109
|
+
function shell(command, args, options) {
|
|
110
|
+
const cmd = options?.sudo ? "sudo" : command;
|
|
111
|
+
const cmdArgs = options?.sudo ? [command, ...args] : args;
|
|
112
|
+
const start = Date.now();
|
|
113
|
+
logFile(`> ${cmd} ${cmdArgs.join(" ")}${options?.cwd ? ` [cwd: ${options.cwd}]` : ""}`);
|
|
114
|
+
const result = spawnSync(cmd, cmdArgs, {
|
|
115
|
+
stdio: "inherit",
|
|
116
|
+
timeout: options?.timeout ?? 300_000,
|
|
117
|
+
cwd: options?.cwd,
|
|
118
|
+
});
|
|
119
|
+
const dur = ((Date.now() - start) / 1000).toFixed(1);
|
|
120
|
+
if (result.signal) {
|
|
121
|
+
logFile(` KILLED (${result.signal}) after ${dur}s`);
|
|
122
|
+
throw new Error(`Command killed (${result.signal}) after ${dur}s: ${cmd} ${cmdArgs.join(" ")}`);
|
|
123
|
+
}
|
|
124
|
+
if (result.status !== 0) {
|
|
125
|
+
logFile(` FAILED (exit ${result.status}) after ${dur}s`);
|
|
126
|
+
throw new Error(`Command failed (exit ${result.status}) after ${dur}s: ${cmd} ${cmdArgs.join(" ")}`);
|
|
127
|
+
}
|
|
128
|
+
logFile(` OK in ${dur}s`);
|
|
129
|
+
}
|
|
130
|
+
/** Wait until DNS resolves for a host. Returns true if recovered. */
|
|
131
|
+
function waitForDns(host, maxSec = 60) {
|
|
132
|
+
for (let elapsed = 0; elapsed < maxSec; elapsed += 5) {
|
|
133
|
+
const r = spawnSync("host", ["-W", "3", host], { stdio: "pipe", timeout: 5_000 });
|
|
134
|
+
if (r.status === 0) {
|
|
135
|
+
logFile(` DNS ${host}: recovered after ${elapsed}s`);
|
|
136
|
+
return true;
|
|
137
|
+
}
|
|
138
|
+
console.log(` DNS ${host} not resolving — waiting (${elapsed}s/${maxSec}s)...`);
|
|
139
|
+
spawnSync("sleep", ["5"]);
|
|
140
|
+
}
|
|
141
|
+
return false;
|
|
142
|
+
}
|
|
143
|
+
/** Retry a shell command with exponential backoff. Runs network diagnostics between attempts. */
|
|
144
|
+
function shellRetry(command, args, options, maxAttempts = 3, backoffSec = 20) {
|
|
145
|
+
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
|
|
146
|
+
try {
|
|
147
|
+
shell(command, args, options);
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
catch (err) {
|
|
151
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
152
|
+
logFile(` Attempt ${attempt}/${maxAttempts} error: ${msg}`);
|
|
153
|
+
if (attempt === maxAttempts) {
|
|
154
|
+
console.error(` All ${maxAttempts} attempts failed.`);
|
|
155
|
+
logDiagnostics(`final failure — ${command}`);
|
|
156
|
+
if (command === "npm")
|
|
157
|
+
captureNpmDebugLog();
|
|
158
|
+
throw err;
|
|
159
|
+
}
|
|
160
|
+
const wait = backoffSec * attempt;
|
|
161
|
+
console.log(` Attempt ${attempt}/${maxAttempts} failed. Retrying in ${wait}s...`);
|
|
162
|
+
// On network errors, diagnose and wait for DNS recovery before retrying
|
|
163
|
+
if (/ETIMEDOUT|EAI_AGAIN|ECONNRESET|ENOTFOUND|ENETUNREACH/.test(msg)) {
|
|
164
|
+
console.log(" Network error — running diagnostics...");
|
|
165
|
+
logDiagnostics(`network failure — attempt ${attempt}`);
|
|
166
|
+
waitForDns("registry.npmjs.org");
|
|
167
|
+
}
|
|
168
|
+
if (command === "npm")
|
|
169
|
+
captureNpmDebugLog();
|
|
170
|
+
spawnSync("sleep", [String(wait)]);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
function commandExists(cmd) {
|
|
175
|
+
try {
|
|
176
|
+
execFileSync("which", [cmd], { stdio: "pipe" });
|
|
177
|
+
return true;
|
|
178
|
+
}
|
|
179
|
+
catch {
|
|
180
|
+
return false;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
function nodeVersion() {
|
|
184
|
+
try {
|
|
185
|
+
const v = execFileSync("node", ["-v"], { encoding: "utf-8" }).trim();
|
|
186
|
+
return parseInt(v.replace("v", "").split(".")[0], 10);
|
|
187
|
+
}
|
|
188
|
+
catch {
|
|
189
|
+
return 0;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
function isLinux() {
|
|
193
|
+
return process.platform === "linux";
|
|
194
|
+
}
|
|
195
|
+
function isArm64() {
|
|
196
|
+
return process.arch === "arm64";
|
|
197
|
+
}
|
|
198
|
+
// ---------------------------------------------------------------------------
|
|
199
|
+
// Installation steps
|
|
200
|
+
// ---------------------------------------------------------------------------
|
|
201
|
+
const TOTAL = "10";
|
|
202
|
+
function installSystemDeps() {
|
|
203
|
+
log("1", TOTAL, "System dependencies and network...");
|
|
204
|
+
if (!isLinux()) {
|
|
205
|
+
console.log(" Skipping Linux-specific setup (not on Linux).");
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
shell("apt-get", ["update"], { sudo: true });
|
|
209
|
+
shell("apt-get", ["install", "-y", "curl", "git", "unzip", "jq", "avahi-daemon", "avahi-utils", "poppler-utils"], { sudo: true });
|
|
210
|
+
shell("apt-get", ["install", "-y", "tigervnc-standalone-server", "python3-websockify", "novnc", "xdg-utils", "chromium"], { sudo: true });
|
|
211
|
+
// Set hostname from brand manifest
|
|
212
|
+
try {
|
|
213
|
+
const currentHostname = execFileSync("hostname", [], { encoding: "utf-8" }).trim();
|
|
214
|
+
if (currentHostname !== BRAND.hostname) {
|
|
215
|
+
console.log(` Setting hostname to '${BRAND.hostname}' (was '${currentHostname}')...`);
|
|
216
|
+
shell("hostnamectl", ["set-hostname", BRAND.hostname], { sudo: true });
|
|
217
|
+
shell("sed", ["-i", `s/127\\.0\\.1\\.1.*$/127.0.1.1\\t${BRAND.hostname}/`, "/etc/hosts"], { sudo: true });
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
catch { /* not critical */ }
|
|
221
|
+
// Avahi service file for LAN discovery
|
|
222
|
+
const avahiService = `<?xml version="1.0" standalone='no'?>
|
|
223
|
+
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
|
|
224
|
+
<service-group>
|
|
225
|
+
<name replace-wildcards="yes">${BRAND.productName} on %h</name>
|
|
226
|
+
<service>
|
|
227
|
+
<type>_http._tcp</type>
|
|
228
|
+
<port>19200</port>
|
|
229
|
+
<txt-record>role=${BRAND.hostname}</txt-record>
|
|
230
|
+
</service>
|
|
231
|
+
</service-group>`;
|
|
232
|
+
const avahiTmpPath = `/tmp/${BRAND.hostname}-avahi.service`;
|
|
233
|
+
const avahiDestPath = `/etc/avahi/services/${BRAND.hostname}.service`;
|
|
234
|
+
try {
|
|
235
|
+
writeFileSync(avahiTmpPath, avahiService);
|
|
236
|
+
shell("cp", [avahiTmpPath, avahiDestPath], { sudo: true });
|
|
237
|
+
shell("systemctl", ["enable", "avahi-daemon"], { sudo: true });
|
|
238
|
+
shell("systemctl", ["restart", "avahi-daemon"], { sudo: true });
|
|
239
|
+
}
|
|
240
|
+
catch { /* not critical */ }
|
|
241
|
+
// Disable WiFi power management — the Pi's WiFi driver aggressively sleeps
|
|
242
|
+
// the radio between transmissions, causing dropped DNS/mDNS packets and
|
|
243
|
+
// intermittent connection resets on LAN.
|
|
244
|
+
try {
|
|
245
|
+
const nmConfDir = "/etc/NetworkManager/conf.d";
|
|
246
|
+
const nmConfFile = join(nmConfDir, `${BRAND.hostname}-no-powersave.conf`);
|
|
247
|
+
if (existsSync("/usr/bin/nmcli") && !existsSync(nmConfFile)) {
|
|
248
|
+
console.log(" Disabling WiFi power save...");
|
|
249
|
+
writeFileSync(`/tmp/${BRAND.hostname}-no-powersave.conf`, "[connection]\nwifi.powersave = 2\n");
|
|
250
|
+
shell("cp", [`/tmp/${BRAND.hostname}-no-powersave.conf`, nmConfFile], { sudo: true });
|
|
251
|
+
spawnSync("sudo", ["systemctl", "restart", "NetworkManager"], { stdio: "pipe" });
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
catch { /* not critical — wired connections unaffected */ }
|
|
255
|
+
console.log(` Device reachable at http://${BRAND.hostname}.local:19200`);
|
|
256
|
+
}
|
|
257
|
+
function installNodejs() {
|
|
258
|
+
if (commandExists("node") && nodeVersion() >= 20) {
|
|
259
|
+
log("2", TOTAL, `Node.js v${nodeVersion()} already installed.`);
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
log("2", TOTAL, "Installing Node.js...");
|
|
263
|
+
if (!isLinux()) {
|
|
264
|
+
throw new Error("Automatic Node.js installation is only supported on Linux. Install Node.js 20+ manually.");
|
|
265
|
+
}
|
|
266
|
+
spawnSync("bash", ["-c", "curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -"], { stdio: "inherit" });
|
|
267
|
+
shell("apt-get", ["install", "-y", "nodejs"], { sudo: true });
|
|
268
|
+
}
|
|
269
|
+
function installClaudeCode() {
|
|
270
|
+
let needsInstall = true;
|
|
271
|
+
if (commandExists("claude")) {
|
|
272
|
+
try {
|
|
273
|
+
const installed = execFileSync("claude", ["--version"], { encoding: "utf-8", timeout: 10_000 }).trim();
|
|
274
|
+
let latest = null;
|
|
275
|
+
try {
|
|
276
|
+
latest = execFileSync("npm", ["view", "@anthropic-ai/claude-code", "version"], { encoding: "utf-8", timeout: 30_000 }).trim();
|
|
277
|
+
}
|
|
278
|
+
catch {
|
|
279
|
+
logFile(" Could not check latest version — will attempt install anyway");
|
|
280
|
+
}
|
|
281
|
+
if (latest && installed === latest) {
|
|
282
|
+
log("3", TOTAL, `Claude Code v${installed} already up to date.`);
|
|
283
|
+
needsInstall = false;
|
|
284
|
+
}
|
|
285
|
+
else {
|
|
286
|
+
log("3", TOTAL, `Upgrading Claude Code (${installed}${latest ? ` → ${latest}` : ""})...`);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
catch {
|
|
290
|
+
log("3", TOTAL, "Claude Code found but version check failed. Reinstalling...");
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
else {
|
|
294
|
+
log("3", TOTAL, "Installing Claude Code...");
|
|
295
|
+
}
|
|
296
|
+
if (needsInstall) {
|
|
297
|
+
console.log(" This may take 15–30 minutes on Raspberry Pi...");
|
|
298
|
+
shellRetry("npm", ["install", "-g", ...NPM_NET_FLAGS, "--loglevel", "verbose", "@anthropic-ai/claude-code@latest"], { sudo: true, timeout: 2_400_000 }, // 40 min — Pi downloads can take 25+ min
|
|
299
|
+
3, 30);
|
|
300
|
+
}
|
|
301
|
+
console.log(" Registering claude-plugins-official marketplace...");
|
|
302
|
+
const marketplaceList = spawnSync("claude", ["plugin", "marketplace", "list"], { stdio: "pipe", encoding: "utf-8" });
|
|
303
|
+
if (marketplaceList.stderr)
|
|
304
|
+
process.stderr.write(marketplaceList.stderr);
|
|
305
|
+
if (!marketplaceList.stdout?.includes("claude-plugins-official")) {
|
|
306
|
+
shell("claude", ["plugin", "marketplace", "add", "anthropics/claude-plugins-official"]);
|
|
307
|
+
}
|
|
308
|
+
console.log(" Configuring git to use HTTPS for GitHub (plugin install support)...");
|
|
309
|
+
shell("git", ["config", "--global", "url.https://github.com/.insteadOf", "git@github.com:"]);
|
|
310
|
+
// Remove the Playwright plugin if previously installed. The programmatic MCP
|
|
311
|
+
// server in claude-agent.ts (with --cdp-endpoint) is the single correct path.
|
|
312
|
+
// The plugin creates a shadow server that intermittently handles tool calls
|
|
313
|
+
// without --cdp-endpoint, causing Chrome launch failures on ARM64.
|
|
314
|
+
const pluginList = spawnSync("claude", ["plugin", "list"], { stdio: "pipe", encoding: "utf-8" });
|
|
315
|
+
if (pluginList.stdout?.includes("playwright")) {
|
|
316
|
+
console.log(" Removing Playwright plugin (replaced by programmatic CDP server)...");
|
|
317
|
+
spawnSync("claude", ["plugin", "uninstall", "playwright"], { stdio: "inherit" });
|
|
318
|
+
}
|
|
319
|
+
// Ensure @playwright/mcp and all its dependencies (including playwright-core)
|
|
320
|
+
// are cached. Wipe any stale npx cache for it first — killed installs on Pi
|
|
321
|
+
// leave corrupt temp dirs that block subsequent npm operations.
|
|
322
|
+
console.log(" Pre-caching Playwright MCP server...");
|
|
323
|
+
const npxDir = resolve(process.env.HOME ?? "/root", ".npm/_npx");
|
|
324
|
+
const findResult = spawnSync("find", [npxDir, "-path", "*/@playwright/mcp/package.json", "-print", "-quit"], {
|
|
325
|
+
encoding: "utf-8", stdio: "pipe",
|
|
326
|
+
});
|
|
327
|
+
const existingCache = findResult.stdout?.trim();
|
|
328
|
+
if (existingCache) {
|
|
329
|
+
// Nuke the entire npx cache entry to avoid ENOTEMPTY errors
|
|
330
|
+
const cacheEntry = resolve(existingCache, "../../..");
|
|
331
|
+
spawnSync("rm", ["-rf", cacheEntry], { stdio: "pipe" });
|
|
332
|
+
}
|
|
333
|
+
// Fresh install — npx creates a clean cache with all deps
|
|
334
|
+
const npxResult = spawnSync("npx", ["-y", "@playwright/mcp@latest", "--version"], {
|
|
335
|
+
stdio: "pipe",
|
|
336
|
+
timeout: 180000,
|
|
337
|
+
encoding: "utf-8",
|
|
338
|
+
});
|
|
339
|
+
// Verify playwright-core landed
|
|
340
|
+
const verifyResult = spawnSync("find", [npxDir, "-path", "*/playwright-core/package.json", "-print", "-quit"], {
|
|
341
|
+
encoding: "utf-8", stdio: "pipe",
|
|
342
|
+
});
|
|
343
|
+
if (verifyResult.stdout?.trim()) {
|
|
344
|
+
console.log(" Playwright MCP server cached with all dependencies.");
|
|
345
|
+
}
|
|
346
|
+
else {
|
|
347
|
+
console.log(` Warning: Playwright MCP cache may be incomplete (browser automation may not work).${npxResult.stderr ? ` npx stderr: ${npxResult.stderr.slice(0, 200)}` : ""}`);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
function resetNeo4jAuth() {
|
|
351
|
+
const password = randomBytes(24).toString("base64url");
|
|
352
|
+
console.log(" Resetting Neo4j auth with fresh password...");
|
|
353
|
+
spawnSync("sudo", ["systemctl", "stop", "neo4j"], { stdio: "inherit" });
|
|
354
|
+
// Clear the system database (stores auth/roles) and dbms auth config.
|
|
355
|
+
// The neo4j user database (graph data) is preserved.
|
|
356
|
+
// set-initial-password only works before the system DB's first start,
|
|
357
|
+
// so we must delete it to make Neo4j treat the next start as initial.
|
|
358
|
+
spawnSync("sudo", ["rm", "-rf",
|
|
359
|
+
"/var/lib/neo4j/data/dbms",
|
|
360
|
+
"/var/lib/neo4j/data/databases/system",
|
|
361
|
+
"/var/lib/neo4j/data/transactions/system",
|
|
362
|
+
], { stdio: "inherit" });
|
|
363
|
+
shell("neo4j-admin", ["dbms", "set-initial-password", password], { sudo: true });
|
|
364
|
+
shell("systemctl", ["start", "neo4j"], { sudo: true });
|
|
365
|
+
console.log(" Waiting for Neo4j to start...");
|
|
366
|
+
for (let i = 0; i < 15; i++) {
|
|
367
|
+
const check = spawnSync("cypher-shell", [
|
|
368
|
+
"-u", "neo4j", "-p", password,
|
|
369
|
+
"-a", "bolt://localhost:7687",
|
|
370
|
+
"RETURN 1",
|
|
371
|
+
], { stdio: "pipe", timeout: 5000 });
|
|
372
|
+
if (check.status === 0)
|
|
373
|
+
break;
|
|
374
|
+
spawnSync("sleep", ["2"]);
|
|
375
|
+
}
|
|
376
|
+
return password;
|
|
377
|
+
}
|
|
378
|
+
/** Check Neo4j has a working password. Called AFTER deploy so config is in place. */
|
|
379
|
+
function ensureNeo4jPassword() {
|
|
380
|
+
const passwordFile = join(INSTALL_DIR, "platform/config/.neo4j-password");
|
|
381
|
+
const configDir = resolve(INSTALL_DIR, "platform/config");
|
|
382
|
+
mkdirSync(configDir, { recursive: true });
|
|
383
|
+
// If password file exists, verify it works
|
|
384
|
+
if (existsSync(passwordFile)) {
|
|
385
|
+
const existingPassword = readFileSync(passwordFile, "utf-8").trim();
|
|
386
|
+
const check = spawnSync("cypher-shell", [
|
|
387
|
+
"-u", "neo4j", "-p", existingPassword,
|
|
388
|
+
"-a", "bolt://localhost:7687",
|
|
389
|
+
"RETURN 1",
|
|
390
|
+
], { stdio: "pipe", timeout: 10000 });
|
|
391
|
+
if (check.status === 0) {
|
|
392
|
+
return; // Password works, data intact
|
|
393
|
+
}
|
|
394
|
+
console.log(" Stored password doesn't match Neo4j. Setting new password...");
|
|
395
|
+
}
|
|
396
|
+
else {
|
|
397
|
+
console.log(" No Neo4j password file found. Setting initial password...");
|
|
398
|
+
}
|
|
399
|
+
// Reset auth and set a new password. Graph data is preserved —
|
|
400
|
+
// only the auth config (/var/lib/neo4j/data/dbms/) is cleared.
|
|
401
|
+
const hasData = existsSync("/var/lib/neo4j/data/databases/neo4j");
|
|
402
|
+
if (hasData) {
|
|
403
|
+
console.log(" Neo4j has existing data. Resetting auth only (data preserved)...");
|
|
404
|
+
logFile(" Neo4j auth reset — clearing dbms auth, preserving databases + transactions");
|
|
405
|
+
}
|
|
406
|
+
const password = resetNeo4jAuth();
|
|
407
|
+
writeFileSync(passwordFile, password, { mode: 0o600 });
|
|
408
|
+
// Also save to persistent location (~/{configDir}/)
|
|
409
|
+
const persistDir = resolve(process.env.HOME ?? "/root", BRAND.configDir);
|
|
410
|
+
mkdirSync(persistDir, { recursive: true });
|
|
411
|
+
writeFileSync(join(persistDir, ".neo4j-password"), password, { mode: 0o600 });
|
|
412
|
+
}
|
|
413
|
+
function installNeo4j() {
|
|
414
|
+
if (commandExists("neo4j")) {
|
|
415
|
+
log("4", TOTAL, "Neo4j already installed.");
|
|
416
|
+
return;
|
|
417
|
+
}
|
|
418
|
+
log("4", TOTAL, "Installing Neo4j Community Edition 5...");
|
|
419
|
+
if (!isLinux()) {
|
|
420
|
+
throw new Error("Automatic Neo4j installation is only supported on Linux. Install Neo4j 5.11+ manually.");
|
|
421
|
+
}
|
|
422
|
+
console.log(" Installing Java 17...");
|
|
423
|
+
shell("apt-get", ["install", "-y", "openjdk-17-jre-headless"], { sudo: true });
|
|
424
|
+
spawnSync("bash", ["-c", "curl -fsSL https://debian.neo4j.com/neotechnology.gpg.key | sudo gpg --yes --dearmor -o /usr/share/keyrings/neo4j.gpg 2>/dev/null"], { stdio: "inherit" });
|
|
425
|
+
spawnSync("bash", ["-c", 'echo "deb [signed-by=/usr/share/keyrings/neo4j.gpg] https://debian.neo4j.com stable 5" | sudo tee /etc/apt/sources.list.d/neo4j.list'], { stdio: "inherit" });
|
|
426
|
+
shell("apt-get", ["update"], { sudo: true });
|
|
427
|
+
shell("apt-get", ["install", "-y", "neo4j"], { sudo: true });
|
|
428
|
+
shell("sed", ["-i", "s/#server.default_listen_address=0.0.0.0/server.default_listen_address=127.0.0.1/", "/etc/neo4j/neo4j.conf"], { sudo: true });
|
|
429
|
+
// Generate strong random password — stored in persistent location (~/{configDir}/)
|
|
430
|
+
const password = randomBytes(24).toString("base64url");
|
|
431
|
+
const persistDir = resolve(process.env.HOME ?? "/root", BRAND.configDir);
|
|
432
|
+
mkdirSync(persistDir, { recursive: true });
|
|
433
|
+
writeFileSync(join(persistDir, ".neo4j-password"), password, { mode: 0o600 });
|
|
434
|
+
// Also write to install dir (will be there when deploy step runs)
|
|
435
|
+
const configDir = resolve(INSTALL_DIR, "platform/config");
|
|
436
|
+
mkdirSync(configDir, { recursive: true });
|
|
437
|
+
writeFileSync(join(configDir, ".neo4j-password"), password, { mode: 0o600 });
|
|
438
|
+
shell("neo4j-admin", ["dbms", "set-initial-password", password], { sudo: true });
|
|
439
|
+
shell("systemctl", ["enable", "neo4j"], { sudo: true });
|
|
440
|
+
shell("systemctl", ["start", "neo4j"], { sudo: true });
|
|
441
|
+
console.log(" Neo4j started. Password stored securely.");
|
|
442
|
+
}
|
|
443
|
+
function ensureOllamaServing() {
|
|
444
|
+
const check = () => spawnSync("curl", ["-sf", "http://localhost:11434/api/tags"], {
|
|
445
|
+
stdio: "pipe", timeout: 5_000,
|
|
446
|
+
});
|
|
447
|
+
if (check().status === 0)
|
|
448
|
+
return;
|
|
449
|
+
// Log which ollama binary we're using and its version
|
|
450
|
+
const which = spawnSync("which", ["ollama"], { stdio: "pipe" });
|
|
451
|
+
const ollamaPath = which.stdout?.toString().trim() || "not found";
|
|
452
|
+
logFile(` Ollama binary: ${ollamaPath}`);
|
|
453
|
+
const version = spawnSync("ollama", ["--version"], { stdio: "pipe", timeout: 5_000 });
|
|
454
|
+
logFile(` Ollama version: ${version.stdout?.toString().trim() || version.stderr?.toString().trim() || `exit ${version.status}`}`);
|
|
455
|
+
// Check if systemd service exists
|
|
456
|
+
const svcCheck = spawnSync("systemctl", ["cat", "ollama"], { stdio: "pipe", timeout: 5_000 });
|
|
457
|
+
logFile(` Ollama systemd service: ${svcCheck.status === 0 ? "exists" : "not found"}`);
|
|
458
|
+
// Check if port 11434 is already in use by something else
|
|
459
|
+
const portCheck = spawnSync("ss", ["-tlnp"], { stdio: "pipe", timeout: 5_000 });
|
|
460
|
+
const portLines = portCheck.stdout?.toString().split("\n").filter((l) => l.includes("11434")) || [];
|
|
461
|
+
if (portLines.length > 0)
|
|
462
|
+
logFile(` Port 11434 in use: ${portLines.join("; ")}`);
|
|
463
|
+
console.log(" Starting Ollama server...");
|
|
464
|
+
logFile(" Ollama server not responding — starting ollama serve");
|
|
465
|
+
// Capture ollama serve output to a log file for diagnostics
|
|
466
|
+
const ollamaLog = join(LOG_DIR, "ollama-serve.log");
|
|
467
|
+
const logFd = openSync(ollamaLog, "a");
|
|
468
|
+
const child = spawn("ollama", ["serve"], {
|
|
469
|
+
stdio: ["ignore", logFd, logFd], detached: true,
|
|
470
|
+
});
|
|
471
|
+
child.unref();
|
|
472
|
+
closeSync(logFd);
|
|
473
|
+
logFile(` Spawned ollama serve (PID ${child.pid}), log: ${ollamaLog}`);
|
|
474
|
+
for (let elapsed = 0; elapsed < 30; elapsed += 3) {
|
|
475
|
+
spawnSync("sleep", ["3"]);
|
|
476
|
+
// Check if process is still alive
|
|
477
|
+
const alive = child.pid && spawnSync("kill", ["-0", String(child.pid)], { stdio: "pipe" }).status === 0;
|
|
478
|
+
logFile(` Poll ${elapsed + 3}s: pid ${child.pid} alive=${alive}`);
|
|
479
|
+
if (check().status === 0) {
|
|
480
|
+
logFile(` Ollama server ready after ${elapsed + 3}s`);
|
|
481
|
+
return;
|
|
482
|
+
}
|
|
483
|
+
if (!alive) {
|
|
484
|
+
// Process died — read the log to find out why
|
|
485
|
+
const serveLog = readFileSync(ollamaLog, "utf-8").slice(-2000);
|
|
486
|
+
logFile(` Ollama serve exited. Log tail:\n${serveLog}`);
|
|
487
|
+
console.error(` Ollama serve exited unexpectedly. Log: ${ollamaLog}`);
|
|
488
|
+
throw new Error(`Ollama serve failed to start. Log: ${ollamaLog}\n${serveLog}`);
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
// Timed out — include diagnostics
|
|
492
|
+
const serveLog = readFileSync(ollamaLog, "utf-8").slice(-2000);
|
|
493
|
+
logFile(` Ollama serve timed out after 30s. Log tail:\n${serveLog}`);
|
|
494
|
+
throw new Error(`Ollama server did not respond within 30s. Log: ${ollamaLog}\n${serveLog}`);
|
|
495
|
+
}
|
|
496
|
+
function installOllama() {
|
|
497
|
+
if (!commandExists("ollama")) {
|
|
498
|
+
log("5", TOTAL, "Installing Ollama...");
|
|
499
|
+
spawnSync("bash", ["-c", "curl -fsSL https://ollama.ai/install.sh | sh"], { stdio: "inherit" });
|
|
500
|
+
}
|
|
501
|
+
else {
|
|
502
|
+
log("5", TOTAL, "Ollama already installed.");
|
|
503
|
+
}
|
|
504
|
+
ensureOllamaServing();
|
|
505
|
+
console.log(" Pulling nomic-embed-text model (~300MB)...");
|
|
506
|
+
shellRetry("ollama", ["pull", "nomic-embed-text"], { timeout: 600_000 }, 3, 15);
|
|
507
|
+
}
|
|
508
|
+
function installCloudflared() {
|
|
509
|
+
if (commandExists("cloudflared")) {
|
|
510
|
+
log("6", TOTAL, "Cloudflared already installed.");
|
|
511
|
+
return;
|
|
512
|
+
}
|
|
513
|
+
log("6", TOTAL, "Installing cloudflared...");
|
|
514
|
+
if (!isLinux()) {
|
|
515
|
+
console.log(" Skipping — install manually for your platform.");
|
|
516
|
+
return;
|
|
517
|
+
}
|
|
518
|
+
const arch = isArm64() ? "arm64" : "amd64";
|
|
519
|
+
const debPath = "/tmp/cloudflared.deb";
|
|
520
|
+
shellRetry("curl", ["-fSL", "--progress-bar", `https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-${arch}.deb`, "-o", debPath], { timeout: 120_000 }, 3, 10);
|
|
521
|
+
shell("dpkg", ["-i", debPath], { sudo: true });
|
|
522
|
+
spawnSync("rm", ["-f", debPath]);
|
|
523
|
+
}
|
|
524
|
+
function deployPayload() {
|
|
525
|
+
log("7", TOTAL, `Deploying ${BRAND.productName}...`);
|
|
526
|
+
if (!existsSync(PAYLOAD_DIR)) {
|
|
527
|
+
throw new Error(`Payload not found at ${PAYLOAD_DIR}. Package may be corrupted.`);
|
|
528
|
+
}
|
|
529
|
+
// Persistent config lives at ~/{configDir}/ — survives rm -rf ~/{installDir}
|
|
530
|
+
const persistentDir = resolve(process.env.HOME ?? "/root", BRAND.configDir);
|
|
531
|
+
const persistentPasswordFile = join(persistentDir, ".neo4j-password");
|
|
532
|
+
const persistentAccountsDir = join(persistentDir, "accounts");
|
|
533
|
+
// Migrate: if password is in old location, move to persistent
|
|
534
|
+
const oldPasswordFile = join(INSTALL_DIR, "platform/config/.neo4j-password");
|
|
535
|
+
if (existsSync(oldPasswordFile) && !existsSync(persistentPasswordFile)) {
|
|
536
|
+
mkdirSync(persistentDir, { recursive: true });
|
|
537
|
+
cpSync(oldPasswordFile, persistentPasswordFile);
|
|
538
|
+
}
|
|
539
|
+
const oldAccountsDir = join(INSTALL_DIR, "platform/config/accounts");
|
|
540
|
+
if (existsSync(oldAccountsDir) && !existsSync(persistentAccountsDir)) {
|
|
541
|
+
mkdirSync(persistentDir, { recursive: true });
|
|
542
|
+
cpSync(oldAccountsDir, persistentAccountsDir, { recursive: true });
|
|
543
|
+
}
|
|
544
|
+
// Sync runtime account data to persistent backup before wipe.
|
|
545
|
+
// The admin agent writes SOUL.md and other files at runtime — capture
|
|
546
|
+
// those changes so they survive the directory wipe that follows.
|
|
547
|
+
const liveAccountsDir = join(INSTALL_DIR, "platform/config/accounts");
|
|
548
|
+
if (existsSync(liveAccountsDir)) {
|
|
549
|
+
mkdirSync(persistentDir, { recursive: true });
|
|
550
|
+
cpSync(liveAccountsDir, persistentAccountsDir, { recursive: true, force: true });
|
|
551
|
+
console.log(" Backed up account data.");
|
|
552
|
+
}
|
|
553
|
+
// Wipe old platform/maxy/premium-plugins to prevent stale files
|
|
554
|
+
// The UI server directory in the payload is always named "maxy" regardless of brand
|
|
555
|
+
for (const dir of ["platform", "maxy", "premium-plugins", "docs", ".claude"]) {
|
|
556
|
+
const target = join(INSTALL_DIR, dir);
|
|
557
|
+
if (existsSync(target)) {
|
|
558
|
+
rmSync(target, { recursive: true });
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
mkdirSync(INSTALL_DIR, { recursive: true });
|
|
562
|
+
// Deploy payload
|
|
563
|
+
cpSync(PAYLOAD_DIR, INSTALL_DIR, {
|
|
564
|
+
recursive: true,
|
|
565
|
+
force: true,
|
|
566
|
+
});
|
|
567
|
+
// Link persistent config into install directory
|
|
568
|
+
const configDir = join(INSTALL_DIR, "platform/config");
|
|
569
|
+
mkdirSync(configDir, { recursive: true });
|
|
570
|
+
if (existsSync(persistentPasswordFile)) {
|
|
571
|
+
cpSync(persistentPasswordFile, join(configDir, ".neo4j-password"));
|
|
572
|
+
console.log(" Restored Neo4j password.");
|
|
573
|
+
}
|
|
574
|
+
if (existsSync(persistentAccountsDir)) {
|
|
575
|
+
cpSync(persistentAccountsDir, join(configDir, "accounts"), { recursive: true, force: true });
|
|
576
|
+
console.log(" Restored account data.");
|
|
577
|
+
}
|
|
578
|
+
// Write version marker so the running platform knows which create-maxy produced this deployment
|
|
579
|
+
writeFileSync(join(configDir, `.${BRAND.hostname}-version`), PKG_VERSION, "utf-8");
|
|
580
|
+
console.log(` Deployed to ${INSTALL_DIR}`);
|
|
581
|
+
}
|
|
582
|
+
function buildPlatform() {
|
|
583
|
+
log("8", TOTAL, "Installing dependencies and building...");
|
|
584
|
+
// Stop the running service before rebuilding (upgrade path)
|
|
585
|
+
const svcName = BRAND.serviceName.replace(".service", "");
|
|
586
|
+
spawnSync("systemctl", ["--user", "stop", svcName], { stdio: "pipe" });
|
|
587
|
+
console.log(` Installing platform dependencies (${join(INSTALL_DIR, "platform")})...`);
|
|
588
|
+
shellRetry("npm", ["install", ...NPM_NET_FLAGS], { cwd: join(INSTALL_DIR, "platform") }, 3, 15);
|
|
589
|
+
// MCP server dist/ files are pre-compiled in the payload — no build step needed.
|
|
590
|
+
// Server external dependencies (neo4j-driver, @anthropic-ai/sdk) are listed in
|
|
591
|
+
// maxy/package.json but NOT shipped as pre-built node_modules — npm pack silently
|
|
592
|
+
// strips files from nested node_modules (e.g. rxjs/package.json), breaking require().
|
|
593
|
+
// Install fresh on device to guarantee a complete dependency tree.
|
|
594
|
+
console.log(` Installing server dependencies (${join(INSTALL_DIR, "maxy")})...`);
|
|
595
|
+
shellRetry("npm", ["install", "--omit=dev", ...NPM_NET_FLAGS], { cwd: join(INSTALL_DIR, "maxy") }, 3, 15);
|
|
596
|
+
}
|
|
597
|
+
function setupVncViewer() {
|
|
598
|
+
if (!isLinux())
|
|
599
|
+
return;
|
|
600
|
+
const novncSrc = "/usr/share/novnc";
|
|
601
|
+
const novncDest = join(INSTALL_DIR, "maxy/public/novnc");
|
|
602
|
+
if (!existsSync(join(novncSrc, "core"))) {
|
|
603
|
+
console.log(" noVNC not found — skipping VNC viewer setup.");
|
|
604
|
+
return;
|
|
605
|
+
}
|
|
606
|
+
console.log(" Installing VNC viewer...");
|
|
607
|
+
// Copy core/ and vendor/ (pako compression library) — both required by rfb.js
|
|
608
|
+
cpSync(join(novncSrc, "core"), join(novncDest, "core"), { recursive: true, force: true });
|
|
609
|
+
const vendorSrc = join(novncSrc, "vendor");
|
|
610
|
+
if (existsSync(vendorSrc)) {
|
|
611
|
+
cpSync(vendorSrc, join(novncDest, "vendor"), { recursive: true, force: true });
|
|
612
|
+
}
|
|
613
|
+
// Custom viewer: no toolbar, scales to fit, auto-connects
|
|
614
|
+
const html = `<!DOCTYPE html>
|
|
615
|
+
<html>
|
|
616
|
+
<head>
|
|
617
|
+
<meta charset="utf-8">
|
|
618
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
|
619
|
+
<title>Connect Claude</title>
|
|
620
|
+
<style>
|
|
621
|
+
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
|
622
|
+
html, body { width: 100%; height: 100%; background: #111; overflow: hidden; }
|
|
623
|
+
#screen { position: relative; width: 100%; height: 100%; }
|
|
624
|
+
</style>
|
|
625
|
+
</head>
|
|
626
|
+
<body>
|
|
627
|
+
<div id="screen"></div>
|
|
628
|
+
<script type="module">
|
|
629
|
+
import RFB from '/novnc/core/rfb.js';
|
|
630
|
+
const p = new URLSearchParams(location.search);
|
|
631
|
+
const host = p.get('host') || location.hostname;
|
|
632
|
+
const port = p.get('port') || '6080';
|
|
633
|
+
const screen = document.getElementById('screen');
|
|
634
|
+
const rfb = new RFB(screen, 'ws://' + host + ':' + port + '/websockify');
|
|
635
|
+
rfb.scaleViewport = true;
|
|
636
|
+
rfb.clipViewport = true;
|
|
637
|
+
rfb.resizeSession = false;
|
|
638
|
+
rfb.addEventListener('disconnect', () => { setTimeout(() => location.reload(), 2000); });
|
|
639
|
+
|
|
640
|
+
// --- Clipboard bridge (local ↔ remote) ---
|
|
641
|
+
window.rfb = rfb;
|
|
642
|
+
|
|
643
|
+
// Paste bridge: patch noVNC keyboard handler to not intercept Ctrl/Cmd+V.
|
|
644
|
+
// Without this patch, noVNC calls preventDefault() on every keydown,
|
|
645
|
+
// which suppresses the browser paste event. By skipping Ctrl+V, the
|
|
646
|
+
// browser fires a paste event with clipboardData — works even on HTTP.
|
|
647
|
+
if (rfb._keyboard && rfb._keyboard._handleKeyDown) {
|
|
648
|
+
const orig = rfb._keyboard._handleKeyDown.bind(rfb._keyboard);
|
|
649
|
+
rfb._keyboard._handleKeyDown = function(e) {
|
|
650
|
+
if ((e.ctrlKey || e.metaKey) && (e.key === 'v' || e.key === 'V')) return;
|
|
651
|
+
return orig(e);
|
|
652
|
+
};
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
// Catch the paste event, sync text to VNC server clipboard, then
|
|
656
|
+
// send Ctrl+V keystrokes so the remote app pastes the synced content.
|
|
657
|
+
document.addEventListener('paste', (e) => {
|
|
658
|
+
e.preventDefault();
|
|
659
|
+
const text = (e.clipboardData || window.clipboardData)?.getData('text');
|
|
660
|
+
if (!text || !window.rfb) return;
|
|
661
|
+
window.rfb.clipboardPasteFrom(text);
|
|
662
|
+
setTimeout(() => {
|
|
663
|
+
window.rfb.sendKey(0xFFE3, 'ControlLeft', true);
|
|
664
|
+
window.rfb.sendKey(0x0076, 'v', true);
|
|
665
|
+
window.rfb.sendKey(0x0076, 'v', false);
|
|
666
|
+
window.rfb.sendKey(0xFFE3, 'ControlLeft', false);
|
|
667
|
+
}, 50);
|
|
668
|
+
});
|
|
669
|
+
|
|
670
|
+
// Copy bridge: when the remote clipboard changes, notify the parent frame.
|
|
671
|
+
rfb.addEventListener('clipboard', (e) => {
|
|
672
|
+
window.parent.postMessage({ type: 'vnc-clipboard', text: e.detail.text }, '*');
|
|
673
|
+
});
|
|
674
|
+
</script>
|
|
675
|
+
</body>
|
|
676
|
+
</html>`;
|
|
677
|
+
writeFileSync(join(INSTALL_DIR, "maxy/public/vnc-viewer.html"), html);
|
|
678
|
+
console.log(" VNC viewer ready at /vnc-viewer.html");
|
|
679
|
+
}
|
|
680
|
+
function setupAccount() {
|
|
681
|
+
log("9", TOTAL, "Setting up...");
|
|
682
|
+
const seedScript = join(INSTALL_DIR, "platform/scripts/seed-neo4j.sh");
|
|
683
|
+
if (existsSync(seedScript)) {
|
|
684
|
+
shell("bash", [seedScript], { cwd: INSTALL_DIR });
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
// ---------------------------------------------------------------------------
|
|
688
|
+
// Cron Registration
|
|
689
|
+
//
|
|
690
|
+
// Registers platform cron jobs (heartbeat, email-fetch, email-auto-respond).
|
|
691
|
+
// Uses BEGIN/END markers for idempotent replacement on re-install.
|
|
692
|
+
// Crons persist across reboots — registered once at install time.
|
|
693
|
+
// Email crons run unconditionally; scripts exit early if unconfigured.
|
|
694
|
+
// ---------------------------------------------------------------------------
|
|
695
|
+
const CRON_BLOCK_BEGIN = `# BEGIN ${BRAND.productName.toUpperCase()} CRONS`;
|
|
696
|
+
const CRON_BLOCK_END = `# END ${BRAND.productName.toUpperCase()} CRONS`;
|
|
697
|
+
function installCrons() {
|
|
698
|
+
if (!isLinux())
|
|
699
|
+
return;
|
|
700
|
+
const nodeBin = spawnSync("which", ["node"], { encoding: "utf-8" }).stdout.trim() || "/usr/bin/node";
|
|
701
|
+
const platformRoot = join(INSTALL_DIR, "platform");
|
|
702
|
+
const logDir = resolve(process.env.HOME ?? "/root", BRAND.configDir, "logs");
|
|
703
|
+
// Discover the account ID for the email-fetch cron
|
|
704
|
+
const accountsDir = join(INSTALL_DIR, "platform/config/accounts");
|
|
705
|
+
let accountId = "";
|
|
706
|
+
if (existsSync(accountsDir)) {
|
|
707
|
+
try {
|
|
708
|
+
const dirs = readdirSync(accountsDir);
|
|
709
|
+
for (const d of dirs) {
|
|
710
|
+
if (existsSync(join(accountsDir, d, "account.json"))) {
|
|
711
|
+
accountId = d;
|
|
712
|
+
break;
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
catch { /* no accounts yet — email crons will run without ACCOUNT_ID and exit early */ }
|
|
717
|
+
}
|
|
718
|
+
const accountEnv = accountId ? `ACCOUNT_ID=${accountId} ` : "";
|
|
719
|
+
const cronEntries = [
|
|
720
|
+
`* * * * * mkdir -p ${logDir} && PLATFORM_ROOT=${platformRoot} ${nodeBin} ${platformRoot}/plugins/scheduling/mcp/dist/scripts/check-due-events.js >> ${logDir}/check-due-events.log 2>&1`,
|
|
721
|
+
`* * * * * mkdir -p ${logDir} && PLATFORM_ROOT=${platformRoot} ${accountEnv}${nodeBin} ${platformRoot}/plugins/email/mcp/dist/scripts/email-fetch.js >> ${logDir}/email-fetch.log 2>&1`,
|
|
722
|
+
`* * * * * mkdir -p ${logDir} && PLATFORM_ROOT=${platformRoot} ${nodeBin} ${platformRoot}/plugins/email/mcp/dist/scripts/email-auto-respond.js >> ${logDir}/email-auto-respond.log 2>&1`,
|
|
723
|
+
];
|
|
724
|
+
// Read existing crontab (empty string if none)
|
|
725
|
+
const existing = spawnSync("crontab", ["-l"], { encoding: "utf-8", stdio: ["pipe", "pipe", "pipe"] });
|
|
726
|
+
const currentCrontab = existing.status === 0 ? existing.stdout : "";
|
|
727
|
+
// Strip any existing Maxy cron block
|
|
728
|
+
const blockPattern = new RegExp(`${CRON_BLOCK_BEGIN}[\\s\\S]*?${CRON_BLOCK_END}\\n?`, "g");
|
|
729
|
+
const cleaned = currentCrontab.replace(blockPattern, "").trimEnd();
|
|
730
|
+
// Build new crontab with Maxy block
|
|
731
|
+
const newBlock = [
|
|
732
|
+
CRON_BLOCK_BEGIN,
|
|
733
|
+
...cronEntries,
|
|
734
|
+
CRON_BLOCK_END,
|
|
735
|
+
].join("\n");
|
|
736
|
+
const newCrontab = cleaned ? `${cleaned}\n${newBlock}\n` : `${newBlock}\n`;
|
|
737
|
+
// Write the new crontab
|
|
738
|
+
const write = spawnSync("crontab", ["-"], {
|
|
739
|
+
input: newCrontab,
|
|
740
|
+
encoding: "utf-8",
|
|
741
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
742
|
+
});
|
|
743
|
+
if (write.status === 0) {
|
|
744
|
+
console.log(" Cron jobs: registered (heartbeat, email-fetch, email-auto-respond)");
|
|
745
|
+
}
|
|
746
|
+
else {
|
|
747
|
+
console.error(` Cron jobs: failed to register — ${(write.stderr || "").trim()}`);
|
|
748
|
+
logFile(` crontab write failed: ${write.stderr}`);
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
function installService() {
|
|
752
|
+
log("10", TOTAL, `Starting ${BRAND.productName}...`);
|
|
753
|
+
if (!isLinux()) {
|
|
754
|
+
console.log(" Skipping systemd service (not Linux). Start manually with:");
|
|
755
|
+
console.log(` cd ${INSTALL_DIR}/maxy && MAXY_PLATFORM_ROOT=${INSTALL_DIR}/platform PORT=19200 HOSTNAME=0.0.0.0 KEEP_ALIVE_TIMEOUT=61000 node --require ./server-init.cjs server.js`);
|
|
756
|
+
return;
|
|
757
|
+
}
|
|
758
|
+
// Persist UDP buffer sizes for cloudflared QUIC stability (applied on every boot via sysctl.d)
|
|
759
|
+
const sysctlTmpPath = `/tmp/99-${BRAND.hostname}-quic.conf`;
|
|
760
|
+
const sysctlDestPath = `/etc/sysctl.d/99-${BRAND.hostname}-quic.conf`;
|
|
761
|
+
try {
|
|
762
|
+
const sysctlConf = "net.core.rmem_max=7340032\nnet.core.wmem_max=7340032\n";
|
|
763
|
+
writeFileSync(sysctlTmpPath, sysctlConf);
|
|
764
|
+
shell("cp", [sysctlTmpPath, sysctlDestPath], { sudo: true });
|
|
765
|
+
spawnSync("rm", ["-f", sysctlTmpPath]);
|
|
766
|
+
spawnSync("sudo", ["sysctl", "--system"], { stdio: "ignore", timeout: 10_000 });
|
|
767
|
+
}
|
|
768
|
+
catch { /* non-critical — values applied on next reboot */ }
|
|
769
|
+
// Create systemd user service
|
|
770
|
+
const serviceDir = resolve(process.env.HOME ?? "/root", ".config/systemd/user");
|
|
771
|
+
mkdirSync(serviceDir, { recursive: true });
|
|
772
|
+
const persistDir = resolve(process.env.HOME ?? "/root", BRAND.configDir);
|
|
773
|
+
mkdirSync(join(persistDir, "logs"), { recursive: true });
|
|
774
|
+
const serviceFile = `[Unit]
|
|
775
|
+
Description=${BRAND.productName} AI Assistant
|
|
776
|
+
After=neo4j.service
|
|
777
|
+
|
|
778
|
+
[Service]
|
|
779
|
+
Type=notify
|
|
780
|
+
NotifyAccess=all
|
|
781
|
+
WorkingDirectory=${INSTALL_DIR}/maxy
|
|
782
|
+
ExecStartPre=/bin/bash ${INSTALL_DIR}/platform/scripts/vnc.sh start
|
|
783
|
+
ExecStartPre=-/bin/bash ${INSTALL_DIR}/platform/scripts/resume-tunnel.sh
|
|
784
|
+
ExecStart=/usr/bin/node --require ./server-init.cjs server.js
|
|
785
|
+
ExecStopPost=/bin/bash ${INSTALL_DIR}/platform/scripts/vnc.sh stop
|
|
786
|
+
Restart=on-failure
|
|
787
|
+
RestartSec=5
|
|
788
|
+
WatchdogSec=30
|
|
789
|
+
TimeoutStartSec=60
|
|
790
|
+
TimeoutStopSec=10
|
|
791
|
+
Environment=NODE_ENV=production
|
|
792
|
+
Environment=PORT=19200
|
|
793
|
+
Environment=HOSTNAME=0.0.0.0
|
|
794
|
+
Environment=KEEP_ALIVE_TIMEOUT=61000
|
|
795
|
+
Environment=DISPLAY=:99
|
|
796
|
+
Environment=PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/chromium
|
|
797
|
+
Environment=MAXY_PLATFORM_ROOT=${INSTALL_DIR}/platform
|
|
798
|
+
EnvironmentFile=-${persistDir}/.env
|
|
799
|
+
StandardOutput=append:${persistDir}/logs/server.log
|
|
800
|
+
StandardError=append:${persistDir}/logs/server.log
|
|
801
|
+
|
|
802
|
+
[Install]
|
|
803
|
+
WantedBy=default.target
|
|
804
|
+
`;
|
|
805
|
+
writeFileSync(join(serviceDir, BRAND.serviceName), serviceFile);
|
|
806
|
+
// Enable lingering so user services run without login
|
|
807
|
+
try {
|
|
808
|
+
const user = execFileSync("whoami", [], { encoding: "utf-8" }).trim();
|
|
809
|
+
spawnSync("sudo", ["loginctl", "enable-linger", user], { stdio: "inherit" });
|
|
810
|
+
}
|
|
811
|
+
catch { /* not critical */ }
|
|
812
|
+
// Reload and (re)start
|
|
813
|
+
const unitName = BRAND.serviceName.replace(".service", "");
|
|
814
|
+
spawnSync("systemctl", ["--user", "daemon-reload"], { stdio: "inherit" });
|
|
815
|
+
spawnSync("systemctl", ["--user", "enable", unitName], { stdio: "inherit" });
|
|
816
|
+
spawnSync("systemctl", ["--user", "restart", unitName], { stdio: "inherit" });
|
|
817
|
+
// Wait for the server to come up
|
|
818
|
+
console.log(" Waiting for web server...");
|
|
819
|
+
let webServerUp = false;
|
|
820
|
+
for (let i = 0; i < 20; i++) {
|
|
821
|
+
try {
|
|
822
|
+
execFileSync("curl", ["-sf", "http://localhost:19200", "-o", "/dev/null"], { timeout: 3000 });
|
|
823
|
+
webServerUp = true;
|
|
824
|
+
break;
|
|
825
|
+
}
|
|
826
|
+
catch {
|
|
827
|
+
spawnSync("sleep", ["2"]);
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
if (!webServerUp) {
|
|
831
|
+
console.log(` Server may still be starting. Check http://${BRAND.hostname}.local:19200 in a moment.`);
|
|
832
|
+
}
|
|
833
|
+
// Validate CDP: the programmatic Playwright MCP server connects to Chromium
|
|
834
|
+
// via --cdp-endpoint http://127.0.0.1:9222. Chromium is started by vnc.sh
|
|
835
|
+
// (ExecStartPre) before the web server. If CDP is not responding, browser
|
|
836
|
+
// automation will fail silently during onboarding sessions.
|
|
837
|
+
console.log(" Verifying browser automation (CDP on port 9222)...");
|
|
838
|
+
const cdpCheck = spawnSync("curl", ["-sf", "http://127.0.0.1:9222/json/version", "-o", "/dev/null"], {
|
|
839
|
+
timeout: 5000,
|
|
840
|
+
stdio: "pipe",
|
|
841
|
+
});
|
|
842
|
+
if (cdpCheck.status === 0) {
|
|
843
|
+
console.log(" Browser automation ready (CDP connected).");
|
|
844
|
+
}
|
|
845
|
+
else {
|
|
846
|
+
const vncLogPath = resolve(process.env.HOME ?? "/root", BRAND.configDir, "logs/vnc-boot.log");
|
|
847
|
+
let vncLog = "";
|
|
848
|
+
try {
|
|
849
|
+
vncLog = readFileSync(vncLogPath, "utf-8").slice(-2000);
|
|
850
|
+
}
|
|
851
|
+
catch {
|
|
852
|
+
vncLog = `(no boot log found at ${vncLogPath})`;
|
|
853
|
+
}
|
|
854
|
+
console.error("");
|
|
855
|
+
console.error(" ERROR: Browser automation unavailable — CDP port 9222 not responding.");
|
|
856
|
+
console.error(" Chromium should be started by vnc.sh (ExecStartPre). Check the boot log:");
|
|
857
|
+
console.error("");
|
|
858
|
+
console.error(vncLog);
|
|
859
|
+
process.exit(1);
|
|
860
|
+
}
|
|
861
|
+
// Register cron jobs after the service is running
|
|
862
|
+
installCrons();
|
|
863
|
+
}
|
|
864
|
+
// ---------------------------------------------------------------------------
|
|
865
|
+
// Main
|
|
866
|
+
// ---------------------------------------------------------------------------
|
|
867
|
+
// Route to uninstall if --uninstall flag is present
|
|
868
|
+
const _args = process.argv.slice(2);
|
|
869
|
+
if (_args.includes("--uninstall")) {
|
|
870
|
+
const { runUninstall } = await import("./uninstall.js");
|
|
871
|
+
const exportIdx = _args.indexOf("--export-data");
|
|
872
|
+
const exportPath = exportIdx !== -1 ? _args[exportIdx + 1] : undefined;
|
|
873
|
+
const skipConfirm = _args.includes("--yes");
|
|
874
|
+
if (exportIdx !== -1 && !exportPath) {
|
|
875
|
+
console.error("--export-data requires a path argument.");
|
|
876
|
+
process.exit(1);
|
|
877
|
+
}
|
|
878
|
+
await runUninstall({ exportPath, skipConfirm });
|
|
879
|
+
process.exit(0);
|
|
880
|
+
}
|
|
881
|
+
const PKG_VERSION = JSON.parse(readFileSync(resolve(import.meta.dirname, "../package.json"), "utf-8")).version;
|
|
882
|
+
initLogging();
|
|
883
|
+
console.log("================================================================");
|
|
884
|
+
console.log(` ${BRAND.productName} — ${BRAND.tagline}. (${BRAND.hostname} v${PKG_VERSION})`);
|
|
885
|
+
console.log("================================================================");
|
|
886
|
+
console.log(` Install log: ${LOG_FILE}`);
|
|
887
|
+
console.log("");
|
|
888
|
+
logDiagnostics("pre-flight");
|
|
889
|
+
try {
|
|
890
|
+
installSystemDeps();
|
|
891
|
+
installNodejs();
|
|
892
|
+
installClaudeCode();
|
|
893
|
+
installNeo4j();
|
|
894
|
+
installOllama();
|
|
895
|
+
installCloudflared();
|
|
896
|
+
deployPayload(); // Must happen before ensureNeo4jPassword — restores config backup
|
|
897
|
+
ensureNeo4jPassword(); // Now config/.neo4j-password is available if it existed before
|
|
898
|
+
buildPlatform();
|
|
899
|
+
setupVncViewer();
|
|
900
|
+
setupAccount();
|
|
901
|
+
installService();
|
|
902
|
+
console.log("");
|
|
903
|
+
console.log("================================================================");
|
|
904
|
+
console.log("");
|
|
905
|
+
console.log(` Open in your browser: http://${BRAND.hostname}.local:19200`);
|
|
906
|
+
console.log("");
|
|
907
|
+
console.log("================================================================");
|
|
908
|
+
}
|
|
909
|
+
catch (err) {
|
|
910
|
+
console.error("");
|
|
911
|
+
console.error(`Setup failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
912
|
+
console.error(` Full log: ${LOG_FILE}`);
|
|
913
|
+
logDiagnostics("post-failure");
|
|
914
|
+
process.exit(1);
|
|
915
|
+
}
|