@rubytech/create-maxy-code 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__tests__/account-id-env.test.js +48 -0
- package/dist/__tests__/apt-resolve.test.js +179 -0
- package/dist/__tests__/brew-install.test.js +141 -0
- package/dist/__tests__/brew-resolve.test.js +103 -0
- package/dist/__tests__/cdp-port-no-silent-fallback.test.js +53 -0
- package/dist/__tests__/launchd-plist.test.js +149 -0
- package/dist/__tests__/macos-version.test.js +96 -0
- package/dist/__tests__/peer-brand-detect.test.js +103 -0
- package/dist/__tests__/platform-detect.test.js +50 -0
- package/dist/__tests__/port-canonicalisation.test.js +200 -0
- package/dist/__tests__/preflight-port-classifier.test.js +330 -0
- package/dist/__tests__/snap-chromium.test.js +115 -0
- package/dist/apt-resolve.js +73 -0
- package/dist/brew-install.js +175 -0
- package/dist/brew-resolve.js +68 -0
- package/dist/index.js +3325 -0
- package/dist/launchd-plist.js +68 -0
- package/dist/macos-version.js +53 -0
- package/dist/peer-brand-detect.js +39 -0
- package/dist/pinned-binaries.js +12 -0
- package/dist/platform-detect.js +36 -0
- package/dist/port-resolution.js +153 -0
- package/dist/preflight-port-classifier.js +222 -0
- package/dist/snap-chromium.js +89 -0
- package/dist/uninstall.js +861 -0
- package/package.json +32 -0
- package/payload/platform/config/brand-registry.json +20 -0
- package/payload/platform/config/brand.json +54 -0
- package/payload/platform/lib/account-enumeration/dist/__tests__/enumerate.test.d.ts +2 -0
- package/payload/platform/lib/account-enumeration/dist/__tests__/enumerate.test.d.ts.map +1 -0
- package/payload/platform/lib/account-enumeration/dist/__tests__/enumerate.test.js +88 -0
- package/payload/platform/lib/account-enumeration/dist/__tests__/enumerate.test.js.map +1 -0
- package/payload/platform/lib/account-enumeration/dist/__tests__/validate-env.test.d.ts +2 -0
- package/payload/platform/lib/account-enumeration/dist/__tests__/validate-env.test.d.ts.map +1 -0
- package/payload/platform/lib/account-enumeration/dist/__tests__/validate-env.test.js +55 -0
- package/payload/platform/lib/account-enumeration/dist/__tests__/validate-env.test.js.map +1 -0
- package/payload/platform/lib/account-enumeration/dist/index.d.ts +49 -0
- package/payload/platform/lib/account-enumeration/dist/index.d.ts.map +1 -0
- package/payload/platform/lib/account-enumeration/dist/index.js +109 -0
- package/payload/platform/lib/account-enumeration/dist/index.js.map +1 -0
- package/payload/platform/lib/account-enumeration/src/__tests__/enumerate.test.ts +94 -0
- package/payload/platform/lib/account-enumeration/src/__tests__/validate-env.test.ts +57 -0
- package/payload/platform/lib/account-enumeration/src/index.ts +140 -0
- package/payload/platform/lib/account-enumeration/tsconfig.json +8 -0
- package/payload/platform/lib/admins-write/dist/index.d.ts +87 -0
- package/payload/platform/lib/admins-write/dist/index.d.ts.map +1 -0
- package/payload/platform/lib/admins-write/dist/index.js +248 -0
- package/payload/platform/lib/admins-write/dist/index.js.map +1 -0
- package/payload/platform/lib/admins-write/src/index.ts +311 -0
- package/payload/platform/lib/admins-write/tsconfig.json +8 -0
- package/payload/platform/lib/anthropic-key/dist/index.d.ts +22 -0
- package/payload/platform/lib/anthropic-key/dist/index.d.ts.map +1 -0
- package/payload/platform/lib/anthropic-key/dist/index.js +232 -0
- package/payload/platform/lib/anthropic-key/dist/index.js.map +1 -0
- package/payload/platform/lib/brand-templating/dist/index.d.ts +18 -0
- package/payload/platform/lib/brand-templating/dist/index.d.ts.map +1 -0
- package/payload/platform/lib/brand-templating/dist/index.js +69 -0
- package/payload/platform/lib/brand-templating/dist/index.js.map +1 -0
- package/payload/platform/lib/brand-templating/src/index.ts +76 -0
- package/payload/platform/lib/brand-templating/tsconfig.json +8 -0
- package/payload/platform/lib/device-url/dist/index.d.ts +44 -0
- package/payload/platform/lib/device-url/dist/index.d.ts.map +1 -0
- package/payload/platform/lib/device-url/dist/index.js +68 -0
- package/payload/platform/lib/device-url/dist/index.js.map +1 -0
- package/payload/platform/lib/device-url/src/index.ts +78 -0
- package/payload/platform/lib/device-url/tsconfig.json +8 -0
- package/payload/platform/lib/entitlement/PUBKEY-HASH.txt +1 -0
- package/payload/platform/lib/entitlement/dist/canonicalize.d.ts +26 -0
- package/payload/platform/lib/entitlement/dist/canonicalize.d.ts.map +1 -0
- package/payload/platform/lib/entitlement/dist/canonicalize.js +54 -0
- package/payload/platform/lib/entitlement/dist/canonicalize.js.map +1 -0
- package/payload/platform/lib/entitlement/dist/index.d.ts +76 -0
- package/payload/platform/lib/entitlement/dist/index.d.ts.map +1 -0
- package/payload/platform/lib/entitlement/dist/index.js +293 -0
- package/payload/platform/lib/entitlement/dist/index.js.map +1 -0
- package/payload/platform/lib/entitlement/rubytech-pubkey.pem +3 -0
- package/payload/platform/lib/graph-mcp/dist/__tests__/cypher-validate-write.test.d.ts +2 -0
- package/payload/platform/lib/graph-mcp/dist/__tests__/cypher-validate-write.test.d.ts.map +1 -0
- package/payload/platform/lib/graph-mcp/dist/__tests__/cypher-validate-write.test.js +97 -0
- package/payload/platform/lib/graph-mcp/dist/__tests__/cypher-validate-write.test.js.map +1 -0
- package/payload/platform/lib/graph-mcp/dist/__tests__/cypher-validate.test.d.ts +2 -0
- package/payload/platform/lib/graph-mcp/dist/__tests__/cypher-validate.test.d.ts.map +1 -0
- package/payload/platform/lib/graph-mcp/dist/__tests__/cypher-validate.test.js +112 -0
- package/payload/platform/lib/graph-mcp/dist/__tests__/cypher-validate.test.js.map +1 -0
- package/payload/platform/lib/graph-mcp/dist/__tests__/schema-cache.test.d.ts +2 -0
- package/payload/platform/lib/graph-mcp/dist/__tests__/schema-cache.test.d.ts.map +1 -0
- package/payload/platform/lib/graph-mcp/dist/__tests__/schema-cache.test.js +163 -0
- package/payload/platform/lib/graph-mcp/dist/__tests__/schema-cache.test.js.map +1 -0
- package/payload/platform/lib/graph-mcp/dist/__tests__/schema-cypher-parser.test.d.ts +2 -0
- package/payload/platform/lib/graph-mcp/dist/__tests__/schema-cypher-parser.test.d.ts.map +1 -0
- package/payload/platform/lib/graph-mcp/dist/__tests__/schema-cypher-parser.test.js +89 -0
- package/payload/platform/lib/graph-mcp/dist/__tests__/schema-cypher-parser.test.js.map +1 -0
- package/payload/platform/lib/graph-mcp/dist/__tests__/warnings-envelope.test.d.ts +2 -0
- package/payload/platform/lib/graph-mcp/dist/__tests__/warnings-envelope.test.d.ts.map +1 -0
- package/payload/platform/lib/graph-mcp/dist/__tests__/warnings-envelope.test.js +140 -0
- package/payload/platform/lib/graph-mcp/dist/__tests__/warnings-envelope.test.js.map +1 -0
- package/payload/platform/lib/graph-mcp/dist/cypher-rewrite-stamp.d.ts +37 -0
- package/payload/platform/lib/graph-mcp/dist/cypher-rewrite-stamp.d.ts.map +1 -0
- package/payload/platform/lib/graph-mcp/dist/cypher-rewrite-stamp.js +333 -0
- package/payload/platform/lib/graph-mcp/dist/cypher-rewrite-stamp.js.map +1 -0
- package/payload/platform/lib/graph-mcp/dist/cypher-shim-read.d.ts +85 -0
- package/payload/platform/lib/graph-mcp/dist/cypher-shim-read.d.ts.map +1 -0
- package/payload/platform/lib/graph-mcp/dist/cypher-shim-read.js +93 -0
- package/payload/platform/lib/graph-mcp/dist/cypher-shim-read.js.map +1 -0
- package/payload/platform/lib/graph-mcp/dist/cypher-shim-write.d.ts +71 -0
- package/payload/platform/lib/graph-mcp/dist/cypher-shim-write.d.ts.map +1 -0
- package/payload/platform/lib/graph-mcp/dist/cypher-shim-write.js +168 -0
- package/payload/platform/lib/graph-mcp/dist/cypher-shim-write.js.map +1 -0
- package/payload/platform/lib/graph-mcp/dist/cypher-validate.d.ts +50 -0
- package/payload/platform/lib/graph-mcp/dist/cypher-validate.d.ts.map +1 -0
- package/payload/platform/lib/graph-mcp/dist/cypher-validate.js +197 -0
- package/payload/platform/lib/graph-mcp/dist/cypher-validate.js.map +1 -0
- package/payload/platform/lib/graph-mcp/dist/index.d.ts +26 -0
- package/payload/platform/lib/graph-mcp/dist/index.d.ts.map +1 -0
- package/payload/platform/lib/graph-mcp/dist/index.js +847 -0
- package/payload/platform/lib/graph-mcp/dist/index.js.map +1 -0
- package/payload/platform/lib/graph-mcp/dist/schema-cache.d.ts +75 -0
- package/payload/platform/lib/graph-mcp/dist/schema-cache.d.ts.map +1 -0
- package/payload/platform/lib/graph-mcp/dist/schema-cache.js +217 -0
- package/payload/platform/lib/graph-mcp/dist/schema-cache.js.map +1 -0
- package/payload/platform/lib/graph-mcp/dist/schema-cypher-parser.d.ts +42 -0
- package/payload/platform/lib/graph-mcp/dist/schema-cypher-parser.d.ts.map +1 -0
- package/payload/platform/lib/graph-mcp/dist/schema-cypher-parser.js +87 -0
- package/payload/platform/lib/graph-mcp/dist/schema-cypher-parser.js.map +1 -0
- package/payload/platform/lib/graph-mcp/src/__tests__/cypher-validate-write.test.ts +150 -0
- package/payload/platform/lib/graph-mcp/src/__tests__/cypher-validate.test.ts +141 -0
- package/payload/platform/lib/graph-mcp/src/__tests__/schema-cache.test.ts +169 -0
- package/payload/platform/lib/graph-mcp/src/__tests__/schema-cypher-parser.test.ts +99 -0
- package/payload/platform/lib/graph-mcp/src/__tests__/warnings-envelope.test.ts +151 -0
- package/payload/platform/lib/graph-mcp/src/cypher-rewrite-stamp.ts +349 -0
- package/payload/platform/lib/graph-mcp/src/cypher-shim-read.ts +141 -0
- package/payload/platform/lib/graph-mcp/src/cypher-shim-write.ts +240 -0
- package/payload/platform/lib/graph-mcp/src/cypher-validate.ts +249 -0
- package/payload/platform/lib/graph-mcp/src/index.ts +1076 -0
- package/payload/platform/lib/graph-mcp/src/schema-cache.ts +242 -0
- package/payload/platform/lib/graph-mcp/src/schema-cypher-parser.ts +84 -0
- package/payload/platform/lib/graph-mcp/tsconfig.json +8 -0
- package/payload/platform/lib/graph-search/dist/index.d.ts +227 -0
- package/payload/platform/lib/graph-search/dist/index.d.ts.map +1 -0
- package/payload/platform/lib/graph-search/dist/index.js +525 -0
- package/payload/platform/lib/graph-search/dist/index.js.map +1 -0
- package/payload/platform/lib/graph-search/src/__tests__/bm25-label-gate.test.ts +88 -0
- package/payload/platform/lib/graph-search/src/__tests__/bm25-only.test.ts +129 -0
- package/payload/platform/lib/graph-search/src/__tests__/bm25-strong-bypass-threshold.test.ts +126 -0
- package/payload/platform/lib/graph-search/src/__tests__/brochure-threshold.test.ts +136 -0
- package/payload/platform/lib/graph-search/src/__tests__/escape-and-normalise.test.ts +53 -0
- package/payload/platform/lib/graph-search/src/__tests__/expand-batch.test.ts +206 -0
- package/payload/platform/lib/graph-search/src/__tests__/fulltext-coverage.test.ts +280 -0
- package/payload/platform/lib/graph-search/src/__tests__/hybrid.test.ts +262 -0
- package/payload/platform/lib/graph-search/src/__tests__/vector-threshold.test.ts +170 -0
- package/payload/platform/lib/graph-search/src/index.ts +718 -0
- package/payload/platform/lib/graph-search/tsconfig.json +9 -0
- package/payload/platform/lib/graph-search/vitest.config.ts +9 -0
- package/payload/platform/lib/graph-trash/dist/index.d.ts +99 -0
- package/payload/platform/lib/graph-trash/dist/index.d.ts.map +1 -0
- package/payload/platform/lib/graph-trash/dist/index.js +333 -0
- package/payload/platform/lib/graph-trash/dist/index.js.map +1 -0
- package/payload/platform/lib/graph-trash/src/index.ts +475 -0
- package/payload/platform/lib/graph-trash/tsconfig.json +8 -0
- package/payload/platform/lib/graph-write/dist/__tests__/account-id-gate.test.d.ts +2 -0
- package/payload/platform/lib/graph-write/dist/__tests__/account-id-gate.test.d.ts.map +1 -0
- package/payload/platform/lib/graph-write/dist/__tests__/account-id-gate.test.js +165 -0
- package/payload/platform/lib/graph-write/dist/__tests__/account-id-gate.test.js.map +1 -0
- package/payload/platform/lib/graph-write/dist/__tests__/action-provenance-gate.test.d.ts +2 -0
- package/payload/platform/lib/graph-write/dist/__tests__/action-provenance-gate.test.d.ts.map +1 -0
- package/payload/platform/lib/graph-write/dist/__tests__/action-provenance-gate.test.js +226 -0
- package/payload/platform/lib/graph-write/dist/__tests__/action-provenance-gate.test.js.map +1 -0
- package/payload/platform/lib/graph-write/dist/__tests__/audit.test.d.ts +2 -0
- package/payload/platform/lib/graph-write/dist/__tests__/audit.test.d.ts.map +1 -0
- package/payload/platform/lib/graph-write/dist/__tests__/audit.test.js +147 -0
- package/payload/platform/lib/graph-write/dist/__tests__/audit.test.js.map +1 -0
- package/payload/platform/lib/graph-write/dist/audit.d.ts +84 -0
- package/payload/platform/lib/graph-write/dist/audit.d.ts.map +1 -0
- package/payload/platform/lib/graph-write/dist/audit.js +129 -0
- package/payload/platform/lib/graph-write/dist/audit.js.map +1 -0
- package/payload/platform/lib/graph-write/dist/conversation-provenance.d.ts +26 -0
- package/payload/platform/lib/graph-write/dist/conversation-provenance.d.ts.map +1 -0
- package/payload/platform/lib/graph-write/dist/conversation-provenance.js +81 -0
- package/payload/platform/lib/graph-write/dist/conversation-provenance.js.map +1 -0
- package/payload/platform/lib/graph-write/dist/index.d.ts +124 -0
- package/payload/platform/lib/graph-write/dist/index.d.ts.map +1 -0
- package/payload/platform/lib/graph-write/dist/index.js +288 -0
- package/payload/platform/lib/graph-write/dist/index.js.map +1 -0
- package/payload/platform/lib/graph-write/src/__tests__/account-id-gate.test.ts +189 -0
- package/payload/platform/lib/graph-write/src/__tests__/action-provenance-gate.test.ts +252 -0
- package/payload/platform/lib/graph-write/src/__tests__/audit.test.ts +162 -0
- package/payload/platform/lib/graph-write/src/audit.ts +182 -0
- package/payload/platform/lib/graph-write/src/conversation-provenance.ts +140 -0
- package/payload/platform/lib/graph-write/src/index.ts +386 -0
- package/payload/platform/lib/graph-write/tsconfig.json +8 -0
- package/payload/platform/lib/mcp-eager/dist/index.d.ts +61 -0
- package/payload/platform/lib/mcp-eager/dist/index.d.ts.map +1 -0
- package/payload/platform/lib/mcp-eager/dist/index.js +49 -0
- package/payload/platform/lib/mcp-eager/dist/index.js.map +1 -0
- package/payload/platform/lib/mcp-eager/src/index.ts +78 -0
- package/payload/platform/lib/mcp-eager/tsconfig.json +8 -0
- package/payload/platform/lib/mcp-spawn-tee/dist/index.d.ts +53 -0
- package/payload/platform/lib/mcp-spawn-tee/dist/index.d.ts.map +1 -0
- package/payload/platform/lib/mcp-spawn-tee/dist/index.js +132 -0
- package/payload/platform/lib/mcp-spawn-tee/dist/index.js.map +1 -0
- package/payload/platform/lib/mcp-spawn-tee/src/index.ts +134 -0
- package/payload/platform/lib/mcp-spawn-tee/tsconfig.json +8 -0
- package/payload/platform/lib/mcp-stderr-tee/dist/index.d.ts +51 -0
- package/payload/platform/lib/mcp-stderr-tee/dist/index.d.ts.map +1 -0
- package/payload/platform/lib/mcp-stderr-tee/dist/index.js +196 -0
- package/payload/platform/lib/mcp-stderr-tee/dist/index.js.map +1 -0
- package/payload/platform/lib/mcp-stderr-tee/src/index.ts +206 -0
- package/payload/platform/lib/mcp-stderr-tee/tsconfig.json +8 -0
- package/payload/platform/lib/models/dist/index.d.ts +7 -0
- package/payload/platform/lib/models/dist/index.d.ts.map +1 -0
- package/payload/platform/lib/models/dist/index.js +20 -0
- package/payload/platform/lib/models/dist/index.js.map +1 -0
- package/payload/platform/lib/models/src/index.ts +18 -0
- package/payload/platform/lib/models/tsconfig.json +8 -0
- package/payload/platform/lib/oauth-llm/dist/index.d.ts +118 -0
- package/payload/platform/lib/oauth-llm/dist/index.d.ts.map +1 -0
- package/payload/platform/lib/oauth-llm/dist/index.js +388 -0
- package/payload/platform/lib/oauth-llm/dist/index.js.map +1 -0
- package/payload/platform/lib/oauth-llm/src/index.ts +585 -0
- package/payload/platform/lib/oauth-llm/tsconfig.json +8 -0
- package/payload/platform/lib/persistent-components/dist/index.d.ts +21 -0
- package/payload/platform/lib/persistent-components/dist/index.d.ts.map +1 -0
- package/payload/platform/lib/persistent-components/dist/index.js +32 -0
- package/payload/platform/lib/persistent-components/dist/index.js.map +1 -0
- package/payload/platform/lib/persistent-components/src/index.ts +28 -0
- package/payload/platform/lib/persistent-components/tsconfig.json +8 -0
- package/payload/platform/lib/screening-patterns/dist/index.d.ts +29 -0
- package/payload/platform/lib/screening-patterns/dist/index.d.ts.map +1 -0
- package/payload/platform/lib/screening-patterns/dist/index.js +48 -0
- package/payload/platform/lib/screening-patterns/dist/index.js.map +1 -0
- package/payload/platform/lib/screening-patterns/src/index.ts +51 -0
- package/payload/platform/lib/screening-patterns/tsconfig.json +8 -0
- package/payload/platform/lib/task-secrets/dist/index.d.ts +40 -0
- package/payload/platform/lib/task-secrets/dist/index.d.ts.map +1 -0
- package/payload/platform/lib/task-secrets/dist/index.js +44 -0
- package/payload/platform/lib/task-secrets/dist/index.js.map +1 -0
- package/payload/platform/lib/task-secrets/src/__tests__/redact-secrets.test.ts +127 -0
- package/payload/platform/lib/task-secrets/src/index.ts +77 -0
- package/payload/platform/lib/task-secrets/tsconfig.json +9 -0
- package/payload/platform/lib/task-secrets/vitest.config.ts +9 -0
- package/payload/platform/neo4j/edge-annotations.json +154 -0
- package/payload/platform/neo4j/schema.cypher +1104 -0
- package/payload/platform/package-lock.json +3576 -0
- package/payload/platform/package.json +25 -0
- package/payload/platform/plugins/admin/PLUGIN.md +81 -0
- package/payload/platform/plugins/admin/hooks/__tests__/archive-ingest-surface-gate.test.sh +191 -0
- package/payload/platform/plugins/admin/hooks/__tests__/playwright-file-guard.test.sh +278 -0
- package/payload/platform/plugins/admin/hooks/__tests__/pre-tool-use-base64-guard.test.sh +204 -0
- package/payload/platform/plugins/admin/hooks/archive-ingest-surface-gate.sh +225 -0
- package/payload/platform/plugins/admin/hooks/playwright-file-guard.sh +214 -0
- package/payload/platform/plugins/admin/hooks/pre-tool-use.sh +294 -0
- package/payload/platform/plugins/admin/hooks/webfetch-preflight.mjs +363 -0
- package/payload/platform/plugins/admin/mcp/dist/__tests__/plugin-read-skill-resolution.test.d.ts +2 -0
- package/payload/platform/plugins/admin/mcp/dist/__tests__/plugin-read-skill-resolution.test.d.ts.map +1 -0
- package/payload/platform/plugins/admin/mcp/dist/__tests__/plugin-read-skill-resolution.test.js +91 -0
- package/payload/platform/plugins/admin/mcp/dist/__tests__/plugin-read-skill-resolution.test.js.map +1 -0
- package/payload/platform/plugins/admin/mcp/dist/__tests__/public-hostname.test.d.ts +2 -0
- package/payload/platform/plugins/admin/mcp/dist/__tests__/public-hostname.test.d.ts.map +1 -0
- package/payload/platform/plugins/admin/mcp/dist/__tests__/public-hostname.test.js +98 -0
- package/payload/platform/plugins/admin/mcp/dist/__tests__/public-hostname.test.js.map +1 -0
- package/payload/platform/plugins/admin/mcp/dist/__tests__/skill-load-required-inputs.test.d.ts +2 -0
- package/payload/platform/plugins/admin/mcp/dist/__tests__/skill-load-required-inputs.test.d.ts.map +1 -0
- package/payload/platform/plugins/admin/mcp/dist/__tests__/skill-load-required-inputs.test.js +141 -0
- package/payload/platform/plugins/admin/mcp/dist/__tests__/skill-load-required-inputs.test.js.map +1 -0
- package/payload/platform/plugins/admin/mcp/dist/__tests__/skill-load.test.d.ts +2 -0
- package/payload/platform/plugins/admin/mcp/dist/__tests__/skill-load.test.d.ts.map +1 -0
- package/payload/platform/plugins/admin/mcp/dist/__tests__/skill-load.test.js +88 -0
- package/payload/platform/plugins/admin/mcp/dist/__tests__/skill-load.test.js.map +1 -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 +3495 -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 +40 -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 +39 -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 +249 -0
- package/payload/platform/plugins/admin/mcp/dist/lib/onboarding.js.map +1 -0
- package/payload/platform/plugins/admin/mcp/dist/lib/public-hostname.d.ts +15 -0
- package/payload/platform/plugins/admin/mcp/dist/lib/public-hostname.d.ts.map +1 -0
- package/payload/platform/plugins/admin/mcp/dist/lib/public-hostname.js +73 -0
- package/payload/platform/plugins/admin/mcp/dist/lib/public-hostname.js.map +1 -0
- package/payload/platform/plugins/admin/mcp/dist/skill-resolution.d.ts +35 -0
- package/payload/platform/plugins/admin/mcp/dist/skill-resolution.d.ts.map +1 -0
- package/payload/platform/plugins/admin/mcp/dist/skill-resolution.js +140 -0
- package/payload/platform/plugins/admin/mcp/dist/skill-resolution.js.map +1 -0
- package/payload/platform/plugins/admin/mcp/package.json +23 -0
- package/payload/platform/plugins/admin/mcp/vitest.config.ts +9 -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/a4-print-documents/SKILL.md +241 -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 +53 -0
- package/payload/platform/plugins/admin/skills/datetime/SKILL.md +91 -0
- package/payload/platform/plugins/admin/skills/deck-pages/SKILL.md +418 -0
- package/payload/platform/plugins/admin/skills/onboarding/SKILL.md +255 -0
- package/payload/platform/plugins/admin/skills/plainly/SKILL.md +105 -0
- package/payload/platform/plugins/admin/skills/plainly/references/worked-examples.md +301 -0
- package/payload/platform/plugins/admin/skills/plugin-management/SKILL.md +99 -0
- package/payload/platform/plugins/admin/skills/public-agent-manager/SKILL.md +277 -0
- package/payload/platform/plugins/admin/skills/publish-site/SKILL.md +72 -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 +113 -0
- package/payload/platform/plugins/admin/skills/skill-builder/references/lean-pattern.md +110 -0
- package/payload/platform/plugins/admin/skills/skill-builder/references/pdf-generation.md +30 -0
- package/payload/platform/plugins/admin/skills/specialist-management/SKILL.md +44 -0
- package/payload/platform/plugins/admin/skills/stream-log-review/SKILL.md +71 -0
- package/payload/platform/plugins/admin/skills/stream-log-review/references/analysis-patterns.md +189 -0
- package/payload/platform/plugins/admin/skills/unzip-attachment/SKILL.md +79 -0
- package/payload/platform/plugins/admin/skills/unzip-attachment/__tests__/preflight.sh +148 -0
- package/payload/platform/plugins/admin/skills/unzip-attachment/references/safety.md +116 -0
- package/payload/platform/plugins/admin/skills/update-knowledge/SKILL.md +47 -0
- package/payload/platform/plugins/anthropic/PLUGIN.md +40 -0
- package/payload/platform/plugins/anthropic/references/console-api.md +186 -0
- package/payload/platform/plugins/anthropic/references/setup-guide.md +36 -0
- package/payload/platform/plugins/anthropic/skills/get-api-key/SKILL.md +138 -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 +163 -0
- package/payload/platform/plugins/cloudflare/PLUGIN.md +73 -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 +29 -0
- package/payload/platform/plugins/cloudflare/mcp/dist/index.js.map +1 -0
- package/payload/platform/plugins/cloudflare/mcp/dist/lib/cloudflared.d.ts +283 -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 +1155 -0
- package/payload/platform/plugins/cloudflare/mcp/dist/lib/cloudflared.js.map +1 -0
- package/payload/platform/plugins/cloudflare/mcp/dist/lib/setup-orchestrator.d.ts +90 -0
- package/payload/platform/plugins/cloudflare/mcp/dist/lib/setup-orchestrator.d.ts.map +1 -0
- package/payload/platform/plugins/cloudflare/mcp/dist/lib/setup-orchestrator.js +550 -0
- package/payload/platform/plugins/cloudflare/mcp/dist/lib/setup-orchestrator.js.map +1 -0
- package/payload/platform/plugins/cloudflare/mcp/package.json +18 -0
- package/payload/platform/plugins/cloudflare/mcp/vitest.config.ts +10 -0
- package/payload/platform/plugins/cloudflare/references/dashboard-guide.md +108 -0
- package/payload/platform/plugins/cloudflare/references/manual-setup.md +481 -0
- package/payload/platform/plugins/cloudflare/references/reset-guide.md +118 -0
- package/payload/platform/plugins/cloudflare/scripts/_stream-log.sh +154 -0
- package/payload/platform/plugins/cloudflare/scripts/list-cf-domains.sh +98 -0
- package/payload/platform/plugins/cloudflare/scripts/list-cf-domains.ts +751 -0
- package/payload/platform/plugins/cloudflare/scripts/reset-tunnel.sh +107 -0
- package/payload/platform/plugins/cloudflare/scripts/setup-tunnel.sh +826 -0
- package/payload/platform/plugins/cloudflare/skills/setup-tunnel/SKILL.md +107 -0
- package/payload/platform/plugins/contacts/PLUGIN.md +31 -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 +433 -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 +40 -0
- package/payload/platform/plugins/contacts/mcp/dist/lib/neo4j.js.map +1 -0
- package/payload/platform/plugins/contacts/mcp/dist/lib/resolve-person.d.ts +33 -0
- package/payload/platform/plugins/contacts/mcp/dist/lib/resolve-person.d.ts.map +1 -0
- package/payload/platform/plugins/contacts/mcp/dist/lib/resolve-person.js +53 -0
- package/payload/platform/plugins/contacts/mcp/dist/lib/resolve-person.js.map +1 -0
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-create.d.ts +23 -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 +123 -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 +28 -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 +39 -0
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-delete.js.map +1 -0
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-erase.d.ts +41 -0
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-erase.d.ts.map +1 -0
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-erase.js +142 -0
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-erase.js.map +1 -0
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-export.d.ts +52 -0
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-export.d.ts.map +1 -0
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-export.js +119 -0
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-export.js.map +1 -0
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-list.d.ts +23 -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 +49 -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 +21 -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 +70 -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 +14 -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 +43 -0
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-update.js.map +1 -0
- package/payload/platform/plugins/contacts/mcp/dist/tools/group-create.d.ts +18 -0
- package/payload/platform/plugins/contacts/mcp/dist/tools/group-create.d.ts.map +1 -0
- package/payload/platform/plugins/contacts/mcp/dist/tools/group-create.js +95 -0
- package/payload/platform/plugins/contacts/mcp/dist/tools/group-create.js.map +1 -0
- package/payload/platform/plugins/contacts/mcp/dist/tools/group-manage.d.ts +15 -0
- package/payload/platform/plugins/contacts/mcp/dist/tools/group-manage.d.ts.map +1 -0
- package/payload/platform/plugins/contacts/mcp/dist/tools/group-manage.js +72 -0
- package/payload/platform/plugins/contacts/mcp/dist/tools/group-manage.js.map +1 -0
- package/payload/platform/plugins/contacts/mcp/package.json +19 -0
- package/payload/platform/plugins/deep-research/PLUGIN.md +13 -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 +52 -0
- package/payload/platform/plugins/docs/references/access-control.md +73 -0
- package/payload/platform/plugins/docs/references/admin-session.md +80 -0
- package/payload/platform/plugins/docs/references/attachments.md +44 -0
- package/payload/platform/plugins/docs/references/cloudflare.md +111 -0
- package/payload/platform/plugins/docs/references/contacts-guide.md +102 -0
- package/payload/platform/plugins/docs/references/deployment.md +150 -0
- package/payload/platform/plugins/docs/references/getting-started.md +82 -0
- package/payload/platform/plugins/docs/references/graph.md +149 -0
- package/payload/platform/plugins/docs/references/internals.md +512 -0
- package/payload/platform/plugins/docs/references/memory-guide.md +119 -0
- package/payload/platform/plugins/docs/references/migration-guide.md +90 -0
- package/payload/platform/plugins/docs/references/outlook-guide.md +69 -0
- package/payload/platform/plugins/docs/references/platform.md +111 -0
- package/payload/platform/plugins/docs/references/plugins-guide.md +174 -0
- package/payload/platform/plugins/docs/references/projects-guide.md +73 -0
- package/payload/platform/plugins/docs/references/settings.md +82 -0
- package/payload/platform/plugins/docs/references/telegram-guide.md +58 -0
- package/payload/platform/plugins/docs/references/troubleshooting.md +532 -0
- package/payload/platform/plugins/email/PLUGIN.md +49 -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 +291 -0
- package/payload/platform/plugins/email/mcp/dist/index.js.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/lib/credentials.d.ts +118 -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 +364 -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 +40 -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 +32 -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 +569 -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 +105 -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 +894 -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 +227 -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 +31 -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/email/references/email-reference.md +204 -0
- package/payload/platform/plugins/linkedin-import/PLUGIN.md +27 -0
- package/payload/platform/plugins/linkedin-import/skills/linkedin-import/SKILL.md +142 -0
- package/payload/platform/plugins/linkedin-import/skills/linkedin-import/references/connections.md +135 -0
- package/payload/platform/plugins/linkedin-import/skills/linkedin-import/references/profile.md +95 -0
- package/payload/platform/plugins/memory/PLUGIN.md +146 -0
- package/payload/platform/plugins/memory/bin/conversation-archive-ingest.mjs +879 -0
- package/payload/platform/plugins/memory/bin/conversation-archive-ingest.sh +138 -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 +1813 -0
- package/payload/platform/plugins/memory/mcp/dist/index.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/live-schema-source.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/live-schema-source.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/live-schema-source.test.js +92 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/live-schema-source.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/llm-classifier.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/llm-classifier.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/llm-classifier.test.js +225 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/llm-classifier.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/schema-loader.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/schema-loader.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/schema-loader.test.js +100 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/schema-loader.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/schema-validator.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/schema-validator.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/schema-validator.test.js +448 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/schema-validator.test.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 +69 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/attachments.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/index.d.ts +5 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/index.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/index.js +30 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/index.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/timestamp-scanner.d.ts +49 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/timestamp-scanner.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/timestamp-scanner.js +35 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/timestamp-scanner.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/types.d.ts +47 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/types.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/types.js +31 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/types.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/whatsapp-text.d.ts +3 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/whatsapp-text.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/whatsapp-text.js +155 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/whatsapp-text.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-pipeline/delta-cursor.d.ts +11 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-pipeline/delta-cursor.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-pipeline/delta-cursor.js +20 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-pipeline/delta-cursor.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-pipeline/derive-keys.d.ts +14 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-pipeline/derive-keys.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-pipeline/derive-keys.js +38 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-pipeline/derive-keys.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-pipeline/sender-bind.d.ts +16 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-pipeline/sender-bind.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-pipeline/sender-bind.js +59 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-pipeline/sender-bind.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-pipeline/sessionize.d.ts +9 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-pipeline/sessionize.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-pipeline/sessionize.js +32 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-pipeline/sessionize.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-pipeline/to-turn-text.d.ts +3 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-pipeline/to-turn-text.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-pipeline/to-turn-text.js +29 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-pipeline/to-turn-text.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/document-chunker.d.ts +45 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/document-chunker.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/document-chunker.js +125 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/document-chunker.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/document-hierarchy.d.ts +9 -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 +61 -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/filter-token.d.ts +36 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/filter-token.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/filter-token.js +86 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/filter-token.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/graph-prune.d.ts +42 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/graph-prune.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/graph-prune.js +114 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/graph-prune.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/graph-write-gate.d.ts +38 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/graph-write-gate.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/graph-write-gate.js +89 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/graph-write-gate.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/live-schema-source.d.ts +136 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/live-schema-source.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/live-schema-source.js +180 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/live-schema-source.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/llm-classifier.d.ts +246 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/llm-classifier.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/llm-classifier.js +828 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/llm-classifier.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/llm-ranker.d.ts +63 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/llm-ranker.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/llm-ranker.js +210 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/llm-ranker.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 +40 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/neo4j.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/schema-loader.d.ts +113 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/schema-loader.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/schema-loader.js +455 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/schema-loader.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/schema-validator.d.ts +83 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/schema-validator.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/schema-validator.js +209 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/schema-validator.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/uuid.d.ts +3 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/uuid.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/uuid.js +12 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/uuid.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/conversation-archive-derive-insights.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/conversation-archive-derive-insights.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/conversation-archive-derive-insights.test.js +97 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/conversation-archive-derive-insights.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/conversation-archive-enrich-rejection.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/conversation-archive-enrich-rejection.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/conversation-archive-enrich-rejection.test.js +184 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/conversation-archive-enrich-rejection.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/conversation-normalisers-source-agnosticism.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/conversation-normalisers-source-agnosticism.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/conversation-normalisers-source-agnosticism.test.js +73 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/conversation-normalisers-source-agnosticism.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/conversation-normalisers-whatsapp-text.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/conversation-normalisers-whatsapp-text.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/conversation-normalisers-whatsapp-text.test.js +109 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/conversation-normalisers-whatsapp-text.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-archive-write.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-archive-write.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-archive-write.test.js +84 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-archive-write.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest.test.js +106 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/profile-update-not-applicable.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/profile-update-not-applicable.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/profile-update-not-applicable.test.js +87 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/profile-update-not-applicable.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/profile-update-personfields-open.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/profile-update-personfields-open.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/profile-update-personfields-open.test.js +148 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/profile-update-personfields-open.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/conversation-archive-derive-insights.d.ts +89 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/conversation-archive-derive-insights.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/conversation-archive-derive-insights.js +542 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/conversation-archive-derive-insights.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/conversation-archive-enrich-rejection.d.ts +41 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/conversation-archive-enrich-rejection.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/conversation-archive-enrich-rejection.js +116 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/conversation-archive-enrich-rejection.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/conversation-memory-expunge.d.ts +8 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/conversation-memory-expunge.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/conversation-memory-expunge.js +7 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/conversation-memory-expunge.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/graph-prune-denylist-add.d.ts +7 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/graph-prune-denylist-add.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/graph-prune-denylist-add.js +28 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/graph-prune-denylist-add.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/graph-prune-denylist-list.d.ts +7 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/graph-prune-denylist-list.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/graph-prune-denylist-list.js +7 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/graph-prune-denylist-list.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/graph-prune-denylist-remove.d.ts +7 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/graph-prune-denylist-remove.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/graph-prune-denylist-remove.js +27 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/graph-prune-denylist-remove.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-archive-write.d.ts +54 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-archive-write.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-archive-write.js +231 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-archive-write.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-classify.d.ts +34 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-classify.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-classify.js +58 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-classify.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-delete.d.ts +57 -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 +106 -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 +16 -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 +91 -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-empty-trash.d.ts +22 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-empty-trash.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-empty-trash.js +36 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-empty-trash.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-find-candidates.d.ts +58 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-find-candidates.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-find-candidates.js +125 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-find-candidates.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest-extract.d.ts +28 -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 +93 -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 +87 -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 +129 -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 +827 -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 +19 -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 +125 -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-rank.d.ts +61 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-rank.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-rank.js +102 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-rank.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 +9 -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 +84 -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-restore.d.ts +24 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-restore.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-restore.js +40 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-restore.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-search.d.ts +5 -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 +42 -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 +77 -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 +47 -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 +173 -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 +24 -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 +31 -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 +44 -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 +322 -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 +65 -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 +369 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-update.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/package.json +24 -0
- package/payload/platform/plugins/memory/mcp/scripts/boot-smoke.sh +69 -0
- package/payload/platform/plugins/memory/mcp/scripts/graph/accept.sh +217 -0
- package/payload/platform/plugins/memory/mcp/scripts/graph/fixture.cypher +59 -0
- package/payload/platform/plugins/memory/mcp/vitest.config.ts +15 -0
- package/payload/platform/plugins/memory/references/graph-primitives.md +342 -0
- package/payload/platform/plugins/memory/references/schema-base.md +234 -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/conversation-archive/SKILL.md +202 -0
- package/payload/platform/plugins/memory/skills/conversation-archive-enrich/SKILL.md +159 -0
- package/payload/platform/plugins/memory/skills/conversational-memory/SKILL.md +108 -0
- package/payload/platform/plugins/memory/skills/document-ingest/SKILL.md +267 -0
- package/payload/platform/plugins/outlook/PLUGIN.md +48 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/graph-client.test.d.ts +2 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/graph-client.test.d.ts.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/graph-client.test.js +94 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/graph-client.test.js.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/log.test.d.ts +2 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/log.test.d.ts.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/log.test.js +31 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/log.test.js.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/pkce-flow.test.d.ts +2 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/pkce-flow.test.d.ts.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/pkce-flow.test.js +213 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/pkce-flow.test.js.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/token-store.test.d.ts +2 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/token-store.test.d.ts.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/token-store.test.js +130 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/token-store.test.js.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/auth/pkce-flow.d.ts +65 -0
- package/payload/platform/plugins/outlook/mcp/dist/auth/pkce-flow.d.ts.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/auth/pkce-flow.js +261 -0
- package/payload/platform/plugins/outlook/mcp/dist/auth/pkce-flow.js.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/auth/token-store.d.ts +61 -0
- package/payload/platform/plugins/outlook/mcp/dist/auth/token-store.d.ts.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/auth/token-store.js +170 -0
- package/payload/platform/plugins/outlook/mcp/dist/auth/token-store.js.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/index.d.ts +18 -0
- package/payload/platform/plugins/outlook/mcp/dist/index.d.ts.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/index.js +152 -0
- package/payload/platform/plugins/outlook/mcp/dist/index.js.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/lib/graph-client.d.ts +60 -0
- package/payload/platform/plugins/outlook/mcp/dist/lib/graph-client.d.ts.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/lib/graph-client.js +189 -0
- package/payload/platform/plugins/outlook/mcp/dist/lib/graph-client.js.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/lib/log.d.ts +23 -0
- package/payload/platform/plugins/outlook/mcp/dist/lib/log.d.ts.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/lib/log.js +53 -0
- package/payload/platform/plugins/outlook/mcp/dist/lib/log.js.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/tools/account-register.d.ts +26 -0
- package/payload/platform/plugins/outlook/mcp/dist/tools/account-register.d.ts.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/tools/account-register.js +50 -0
- package/payload/platform/plugins/outlook/mcp/dist/tools/account-register.js.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/tools/calendar-event.d.ts +12 -0
- package/payload/platform/plugins/outlook/mcp/dist/tools/calendar-event.d.ts.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/tools/calendar-event.js +32 -0
- package/payload/platform/plugins/outlook/mcp/dist/tools/calendar-event.js.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/tools/calendar-list.d.ts +59 -0
- package/payload/platform/plugins/outlook/mcp/dist/tools/calendar-list.d.ts.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/tools/calendar-list.js +54 -0
- package/payload/platform/plugins/outlook/mcp/dist/tools/calendar-list.js.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/tools/contacts-list.d.ts +14 -0
- package/payload/platform/plugins/outlook/mcp/dist/tools/contacts-list.d.ts.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/tools/contacts-list.js +45 -0
- package/payload/platform/plugins/outlook/mcp/dist/tools/contacts-list.js.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/tools/mail-list.d.ts +15 -0
- package/payload/platform/plugins/outlook/mcp/dist/tools/mail-list.d.ts.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/tools/mail-list.js +48 -0
- package/payload/platform/plugins/outlook/mcp/dist/tools/mail-list.js.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/tools/mail-search.d.ts +8 -0
- package/payload/platform/plugins/outlook/mcp/dist/tools/mail-search.d.ts.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/tools/mail-search.js +49 -0
- package/payload/platform/plugins/outlook/mcp/dist/tools/mail-search.js.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/tools/mailbox-info.d.ts +19 -0
- package/payload/platform/plugins/outlook/mcp/dist/tools/mailbox-info.d.ts.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/tools/mailbox-info.js +58 -0
- package/payload/platform/plugins/outlook/mcp/dist/tools/mailbox-info.js.map +1 -0
- package/payload/platform/plugins/outlook/mcp/package.json +20 -0
- package/payload/platform/plugins/outlook/mcp/scripts/verify-doc-impl.sh +109 -0
- package/payload/platform/plugins/outlook/references/auth.md +118 -0
- package/payload/platform/plugins/outlook/references/graph-surfaces.md +114 -0
- package/payload/platform/plugins/outlook/skills/outlook/SKILL.md +65 -0
- package/payload/platform/plugins/projects/PLUGIN.md +90 -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/replicate/PLUGIN.md +23 -0
- package/payload/platform/plugins/replicate/mcp/dist/index.d.ts +2 -0
- package/payload/platform/plugins/replicate/mcp/dist/index.d.ts.map +1 -0
- package/payload/platform/plugins/replicate/mcp/dist/index.js +106 -0
- package/payload/platform/plugins/replicate/mcp/dist/index.js.map +1 -0
- package/payload/platform/plugins/replicate/mcp/dist/lib/replicate-key.d.ts +15 -0
- package/payload/platform/plugins/replicate/mcp/dist/lib/replicate-key.d.ts.map +1 -0
- package/payload/platform/plugins/replicate/mcp/dist/lib/replicate-key.js +73 -0
- package/payload/platform/plugins/replicate/mcp/dist/lib/replicate-key.js.map +1 -0
- package/payload/platform/plugins/replicate/mcp/dist/tools/image-generate.d.ts +14 -0
- package/payload/platform/plugins/replicate/mcp/dist/tools/image-generate.d.ts.map +1 -0
- package/payload/platform/plugins/replicate/mcp/dist/tools/image-generate.js +191 -0
- package/payload/platform/plugins/replicate/mcp/dist/tools/image-generate.js.map +1 -0
- package/payload/platform/plugins/replicate/mcp/package.json +21 -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 +77 -0
- package/payload/platform/plugins/sales/references/objection-handling.md +157 -0
- package/payload/platform/plugins/sales/references/pricing.md +101 -0
- package/payload/platform/plugins/scheduling/PLUGIN.md +103 -0
- package/payload/platform/plugins/scheduling/mcp/dist/__tests__/time-resolve-description.test.d.ts +2 -0
- package/payload/platform/plugins/scheduling/mcp/dist/__tests__/time-resolve-description.test.d.ts.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/__tests__/time-resolve-description.test.js +16 -0
- package/payload/platform/plugins/scheduling/mcp/dist/__tests__/time-resolve-description.test.js.map +1 -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 +315 -0
- package/payload/platform/plugins/scheduling/mcp/dist/index.js.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/getUserTimezone.test.d.ts +2 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/getUserTimezone.test.d.ts.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/getUserTimezone.test.js +119 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/__tests__/getUserTimezone.test.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/ics.d.ts +47 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/ics.d.ts.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/ics.js +362 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/ics.js.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/neo4j.d.ts +30 -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 +89 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/neo4j.js.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/time-format.d.ts +48 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/time-format.d.ts.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/time-format.js +140 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/time-format.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 +568 -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 +25 -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 +121 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-event.js.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-export-ics.d.ts +9 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-export-ics.d.ts.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-export-ics.js +76 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-export-ics.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-import-ics.d.ts +8 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-import-ics.d.ts.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-import-ics.js +48 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-import-ics.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 +76 -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 +23 -0
- package/payload/platform/plugins/scheduling/mcp/vitest.config.ts +9 -0
- package/payload/platform/plugins/tasks/.claude-plugin/plugin.json +17 -0
- package/payload/platform/plugins/tasks/.mcp.json +13 -0
- package/payload/platform/plugins/tasks/PLUGIN.md +81 -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 +503 -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 +40 -0
- package/payload/platform/plugins/tasks/mcp/dist/lib/neo4j.js.map +1 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/project-complete.d.ts +17 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/project-complete.d.ts.map +1 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/project-complete.js +76 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/project-complete.js.map +1 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/project-create.d.ts +29 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/project-create.d.ts.map +1 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/project-create.js +235 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/project-create.js.map +1 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/project-get.d.ts +40 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/project-get.d.ts.map +1 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/project-get.js +125 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/project-get.js.map +1 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/project-list.d.ts +26 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/project-list.d.ts.map +1 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/project-list.js +81 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/project-list.js.map +1 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/project-update.d.ts +19 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/project-update.d.ts.map +1 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/project-update.js +102 -0
- package/payload/platform/plugins/tasks/mcp/dist/tools/project-update.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 +12 -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 +28 -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 +63 -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 +141 -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 +59 -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 +32 -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 +112 -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/telegram/PLUGIN.md +35 -0
- package/payload/platform/plugins/telegram/mcp/dist/index.d.ts +2 -0
- package/payload/platform/plugins/telegram/mcp/dist/index.d.ts.map +1 -0
- package/payload/platform/plugins/telegram/mcp/dist/index.js +198 -0
- package/payload/platform/plugins/telegram/mcp/dist/index.js.map +1 -0
- package/payload/platform/plugins/telegram/mcp/dist/lib/telegram.d.ts +41 -0
- package/payload/platform/plugins/telegram/mcp/dist/lib/telegram.d.ts.map +1 -0
- package/payload/platform/plugins/telegram/mcp/dist/lib/telegram.js +70 -0
- package/payload/platform/plugins/telegram/mcp/dist/lib/telegram.js.map +1 -0
- package/payload/platform/plugins/telegram/mcp/dist/tools/message-history.d.ts +16 -0
- package/payload/platform/plugins/telegram/mcp/dist/tools/message-history.d.ts.map +1 -0
- package/payload/platform/plugins/telegram/mcp/dist/tools/message-history.js +68 -0
- package/payload/platform/plugins/telegram/mcp/dist/tools/message-history.js.map +1 -0
- package/payload/platform/plugins/telegram/mcp/dist/tools/message.d.ts +20 -0
- package/payload/platform/plugins/telegram/mcp/dist/tools/message.d.ts.map +1 -0
- package/payload/platform/plugins/telegram/mcp/dist/tools/message.js +34 -0
- package/payload/platform/plugins/telegram/mcp/dist/tools/message.js.map +1 -0
- package/payload/platform/plugins/telegram/mcp/package.json +19 -0
- package/payload/platform/plugins/telegram/references/setup-guide.md +50 -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 +328 -0
- package/payload/platform/plugins/waitlist/mcp/dist/index.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 +40 -0
- package/payload/platform/plugins/waitlist/mcp/dist/lib/neo4j.js.map +1 -0
- package/payload/platform/plugins/waitlist/mcp/dist/tools/__tests__/waitlist-persist.test.d.ts +2 -0
- package/payload/platform/plugins/waitlist/mcp/dist/tools/__tests__/waitlist-persist.test.d.ts.map +1 -0
- package/payload/platform/plugins/waitlist/mcp/dist/tools/__tests__/waitlist-persist.test.js +70 -0
- package/payload/platform/plugins/waitlist/mcp/dist/tools/__tests__/waitlist-persist.test.js.map +1 -0
- package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-heal.d.ts +33 -0
- package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-heal.d.ts.map +1 -0
- package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-heal.js +124 -0
- package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-heal.js.map +1 -0
- package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-list.d.ts +23 -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 +58 -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 +83 -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 +433 -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 +19 -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 +81 -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 +28 -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 +50 -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 +33 -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 +335 -0
- package/payload/platform/plugins/waitlist/mcp/dist/tools/waitlist-setup.js.map +1 -0
- package/payload/platform/plugins/waitlist/mcp/package.json +23 -0
- package/payload/platform/plugins/waitlist/mcp/vitest.config.ts +9 -0
- package/payload/platform/plugins/whatsapp/PLUGIN.md +71 -0
- package/payload/platform/plugins/whatsapp/mcp/dist/call-api.d.ts +14 -0
- package/payload/platform/plugins/whatsapp/mcp/dist/call-api.d.ts.map +1 -0
- package/payload/platform/plugins/whatsapp/mcp/dist/call-api.js +42 -0
- package/payload/platform/plugins/whatsapp/mcp/dist/call-api.js.map +1 -0
- package/payload/platform/plugins/whatsapp/mcp/dist/index.d.ts +8 -0
- package/payload/platform/plugins/whatsapp/mcp/dist/index.d.ts.map +1 -0
- package/payload/platform/plugins/whatsapp/mcp/dist/index.js +469 -0
- package/payload/platform/plugins/whatsapp/mcp/dist/index.js.map +1 -0
- package/payload/platform/plugins/whatsapp/mcp/package.json +19 -0
- package/payload/platform/plugins/whatsapp/references/channels-whatsapp.md +257 -0
- package/payload/platform/plugins/whatsapp/skills/connect-whatsapp/SKILL.md +82 -0
- package/payload/platform/plugins/whatsapp/skills/manage-whatsapp-config/SKILL.md +99 -0
- package/payload/platform/plugins/workflows/.claude-plugin/plugin.json +16 -0
- package/payload/platform/plugins/workflows/.mcp.json +12 -0
- package/payload/platform/plugins/workflows/PLUGIN.md +297 -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 +536 -0
- package/payload/platform/plugins/workflows/mcp/dist/index.js.map +1 -0
- package/payload/platform/plugins/workflows/mcp/dist/lib/active-runs.d.ts +38 -0
- package/payload/platform/plugins/workflows/mcp/dist/lib/active-runs.d.ts.map +1 -0
- package/payload/platform/plugins/workflows/mcp/dist/lib/active-runs.js +83 -0
- package/payload/platform/plugins/workflows/mcp/dist/lib/active-runs.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 +151 -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 +299 -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 +40 -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 +153 -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 +273 -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 +32 -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 +97 -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 +48 -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 +166 -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 +28 -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 +57 -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 +64 -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 +605 -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 +29 -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 +55 -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 +44 -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 +28 -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 +71 -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 +198 -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 +71 -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 +77 -0
- package/payload/platform/plugins/workflows/skills/workflow-manager/SKILL.md +88 -0
- package/payload/platform/scripts/__tests__/admin-persist-audit.test.ts +182 -0
- package/payload/platform/scripts/__tests__/first-token-creates-stream-log.test.sh +37 -0
- package/payload/platform/scripts/__tests__/logs-read-prefix.sh +237 -0
- package/payload/platform/scripts/admin-conversation-recover.mjs +386 -0
- package/payload/platform/scripts/admin-persist-audit.ts +217 -0
- package/payload/platform/scripts/check-no-conversation-id-leaks.mjs +165 -0
- package/payload/platform/scripts/check-no-task-id-leaks.mjs +110 -0
- package/payload/platform/scripts/check-sdk-oauth.mjs +185 -0
- package/payload/platform/scripts/check-skill-load-coverage.mjs +100 -0
- package/payload/platform/scripts/component-knowledgedoc-backfill.ts +214 -0
- package/payload/platform/scripts/conversation-id-allowlist.txt +151 -0
- package/payload/platform/scripts/dedupe-userprofile-ghosts.sh +388 -0
- package/payload/platform/scripts/generate-entitlement-fixture.mjs +152 -0
- package/payload/platform/scripts/installer-device-verify.sh +249 -0
- package/payload/platform/scripts/lib/resolve-account-dir.sh +186 -0
- package/payload/platform/scripts/log-adherence-check.sh +125 -0
- package/payload/platform/scripts/logs-read.sh +577 -0
- package/payload/platform/scripts/logs-read.test.sh +159 -0
- package/payload/platform/scripts/migrate-import.sh +437 -0
- package/payload/platform/scripts/redact-install-logs.sh +87 -0
- package/payload/platform/scripts/resume-tunnel.sh +117 -0
- package/payload/platform/scripts/seed-neo4j.sh +590 -0
- package/payload/platform/scripts/taskmaster-export.sh +388 -0
- package/payload/platform/scripts/test-laptop-vnc-boot.sh +88 -0
- package/payload/platform/scripts/verify-skill-tool-surface.sh +255 -0
- package/payload/platform/scripts/vnc.sh +475 -0
- package/payload/platform/scripts/wifi-provision-server/server.js +743 -0
- package/payload/platform/scripts/wifi-provision.sh +492 -0
- package/payload/platform/services/claude-session-manager/dist/config.d.ts +12 -0
- package/payload/platform/services/claude-session-manager/dist/config.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/config.js +27 -0
- package/payload/platform/services/claude-session-manager/dist/config.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/http-server.d.ts +10 -0
- package/payload/platform/services/claude-session-manager/dist/http-server.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/http-server.js +186 -0
- package/payload/platform/services/claude-session-manager/dist/http-server.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/index.d.ts +2 -0
- package/payload/platform/services/claude-session-manager/dist/index.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/index.js +64 -0
- package/payload/platform/services/claude-session-manager/dist/index.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/jsonl-path.d.ts +4 -0
- package/payload/platform/services/claude-session-manager/dist/jsonl-path.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/jsonl-path.js +31 -0
- package/payload/platform/services/claude-session-manager/dist/jsonl-path.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/pty-spawner.d.ts +34 -0
- package/payload/platform/services/claude-session-manager/dist/pty-spawner.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/pty-spawner.js +91 -0
- package/payload/platform/services/claude-session-manager/dist/pty-spawner.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/session-store.d.ts +23 -0
- package/payload/platform/services/claude-session-manager/dist/session-store.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/session-store.js +31 -0
- package/payload/platform/services/claude-session-manager/dist/session-store.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/types.d.ts +33 -0
- package/payload/platform/services/claude-session-manager/dist/types.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/types.js +2 -0
- package/payload/platform/services/claude-session-manager/dist/types.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/url-capture.d.ts +12 -0
- package/payload/platform/services/claude-session-manager/dist/url-capture.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/url-capture.js +68 -0
- package/payload/platform/services/claude-session-manager/dist/url-capture.js.map +1 -0
- package/payload/platform/services/claude-session-manager/package.json +22 -0
- package/payload/platform/templates/account.json +12 -0
- package/payload/platform/templates/agents/admin/AGENTS.md +12 -0
- package/payload/platform/templates/agents/admin/IDENTITY.md +320 -0
- package/payload/platform/templates/agents/admin/LEARNINGS.md +3 -0
- package/payload/platform/templates/agents/admin/SOUL.md +23 -0
- package/payload/platform/templates/agents/public/IDENTITY.md +56 -0
- package/payload/platform/templates/agents/public/SOUL.md +19 -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/content-producer.md +104 -0
- package/payload/platform/templates/specialists/agents/database-operator.md +199 -0
- package/payload/platform/templates/specialists/agents/personal-assistant.md +209 -0
- package/payload/platform/templates/specialists/agents/project-manager.md +132 -0
- package/payload/platform/templates/specialists/agents/research-assistant.md +115 -0
- package/payload/platform/templates/systemd/edge.service.template +38 -0
- package/payload/platform/tsconfig.base.json +18 -0
- package/payload/premium-plugins/real-agency/BUNDLE.md +44 -0
- package/payload/premium-plugins/real-agency/agents/buyer-enquiry/IDENTITY.md +13 -0
- package/payload/premium-plugins/real-agency/agents/buyer-enquiry/SOUL.md +9 -0
- package/payload/premium-plugins/real-agency/agents/buyer-enquiry/template.json +9 -0
- package/payload/premium-plugins/real-agency/agents/compliance.md +303 -0
- package/payload/premium-plugins/real-agency/agents/negotiator.md +145 -0
- package/payload/premium-plugins/real-agency/agents/valuer.md +140 -0
- package/payload/premium-plugins/real-agency/plugins/brochures/PLUGIN.md +36 -0
- package/payload/premium-plugins/real-agency/plugins/brochures/commands/make-brochure.md +11 -0
- package/payload/premium-plugins/real-agency/plugins/brochures/skills/a4-print-documents/SKILL.md +478 -0
- package/payload/premium-plugins/real-agency/plugins/brochures/skills/brand-design/SKILL.md +192 -0
- package/payload/premium-plugins/real-agency/plugins/brochures/skills/make-brochure/SKILL.md +354 -0
- package/payload/premium-plugins/real-agency/plugins/brochures/skills/make-brochure/references/seller-brief-template.md +115 -0
- package/payload/premium-plugins/real-agency/plugins/brochures/skills/property-brochure/SKILL.md +119 -0
- package/payload/premium-plugins/real-agency/plugins/brochures/skills/property-brochure/references/build.md +270 -0
- package/payload/premium-plugins/real-agency/plugins/brochures/skills/property-brochure/references/copy.md +211 -0
- package/payload/premium-plugins/real-agency/plugins/brochures/skills/property-brochure/references/images.md +166 -0
- package/payload/premium-plugins/real-agency/plugins/brochures/skills/property-brochure/references/page-landing.md +376 -0
- package/payload/premium-plugins/real-agency/plugins/brochures/skills/property-brochure/references/page.html +1288 -0
- package/payload/premium-plugins/real-agency/plugins/brochures/skills/property-brochure/references/placeholders.md +250 -0
- package/payload/premium-plugins/real-agency/plugins/brochures/skills/property-brochure/references/registers.md +47 -0
- package/payload/premium-plugins/real-agency/plugins/brochures/skills/property-brochure/references/seller-brief.md +56 -0
- package/payload/premium-plugins/real-agency/plugins/brochures/skills/property-brochure/references/structure.md +249 -0
- package/payload/premium-plugins/real-agency/plugins/brochures/skills/property-brochure/references/template.html +2370 -0
- package/payload/premium-plugins/real-agency/plugins/brochures/skills/property-extract/SKILL.md +372 -0
- package/payload/premium-plugins/real-agency/plugins/buyers/PLUGIN.md +35 -0
- package/payload/premium-plugins/real-agency/plugins/buyers/skills/buyer-feedback/SKILL.md +109 -0
- package/payload/premium-plugins/real-agency/plugins/buyers/skills/buyer-management/SKILL.md +42 -0
- package/payload/premium-plugins/real-agency/plugins/buyers/skills/buyer-management/references/buyer-qualification-questions.md +16 -0
- package/payload/premium-plugins/real-agency/plugins/buyers/skills/buyer-management/references/buyer-qualification.md +59 -0
- package/payload/premium-plugins/real-agency/plugins/buyers/skills/buyer-management/references/buyer-scripts.md +63 -0
- package/payload/premium-plugins/real-agency/plugins/buyers/skills/buyer-management/references/buyer-working-scripts.md +54 -0
- package/payload/premium-plugins/real-agency/plugins/buyers/skills/buyer-management/references/feedback-collection.md +42 -0
- package/payload/premium-plugins/real-agency/plugins/buyers/skills/buyer-management/references/offer-capture.md +38 -0
- package/payload/premium-plugins/real-agency/plugins/buyers/skills/buyer-management/references/viewing-booking.md +32 -0
- package/payload/premium-plugins/real-agency/plugins/buyers/skills/buyer-management/references/viewing-management.md +52 -0
- package/payload/premium-plugins/real-agency/plugins/buyers/skills/buyer-seller-guides/SKILL.md +407 -0
- package/payload/premium-plugins/real-agency/plugins/buyers/skills/buyer-seller-guides/references/care-fees-guide.md +68 -0
- package/payload/premium-plugins/real-agency/plugins/buyers/skills/buyer-seller-guides/references/divorce-sales-guide.md +61 -0
- package/payload/premium-plugins/real-agency/plugins/buyers/skills/buyer-seller-guides/references/downsizing-guide.md +45 -0
- package/payload/premium-plugins/real-agency/plugins/buyers/skills/buyer-seller-guides/references/first-time-buyers.md +92 -0
- package/payload/premium-plugins/real-agency/plugins/buyers/skills/buyer-seller-guides/references/first-time-sellers.md +78 -0
- package/payload/premium-plugins/real-agency/plugins/buyers/skills/buyer-seller-guides/references/probate-guide.md +53 -0
- package/payload/premium-plugins/real-agency/plugins/buyers/skills/buyer-seller-guides/references/upsizing-guide.md +41 -0
- package/payload/premium-plugins/real-agency/plugins/buyers/skills/property-enquiry/SKILL.md +126 -0
- package/payload/premium-plugins/real-agency/plugins/buyers/skills/viewing-management/SKILL.md +111 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/PLUGIN.md +34 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/business-growth/SKILL.md +133 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/business-growth/references/buy-back-your-time.md +37 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/business-growth/references/firewave-gost-scorecards.md +14 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/business-growth/references/keller-org-model.md +17 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/business-growth/references/lencioni-team-models.md +22 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/business-growth/references/listing-management-system.md +11 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/business-growth/references/net-figure-form.md +11 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/business-growth/references/serhant-bizinbox-notes.md +13 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/business-growth/references/team-roles-commission.md +14 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/business-growth/references/va-2026-ops.md +43 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/business-growth/references/wingman-structure.md +13 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/business-operations/SKILL.md +32 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/business-operations/references/crm-systems.md +57 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/business-operations/references/hiring-guide.md +59 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/business-operations/references/impact-framework.md +47 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/business-operations/references/minutes-equal-money.md +55 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/business-operations/references/team-management.md +48 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/exp-partnership/SKILL.md +52 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/exp-partnership/references/12-reasons.md +39 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/exp-partnership/references/95-5-system.md +66 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/exp-partnership/references/agent-attraction-scripts.md +90 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/exp-partnership/references/business-partnership.md +92 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/exp-partnership/references/exp-model-overview.md +66 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/exp-partnership/references/model-comparison.md +66 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/exp-partnership/references/revenue-share-explained.md +57 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/personal-branding/SKILL.md +117 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/personal-branding/references/attraction-agent-notes.md +31 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/personal-branding/references/attraction-agent.md +58 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/personal-branding/references/authenticity-boundaries.md +28 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/personal-branding/references/become-a-brand-leader-notes.md +19 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/personal-branding/references/blast-formula.md +42 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/personal-branding/references/brand-leader.md +48 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/personal-branding/references/brand-strategy-system.md +59 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/personal-branding/references/content-engine.md +49 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/personal-branding/references/firewave-blast-and-blogging.md +23 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/personal-branding/references/gary-v-content.md +52 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/personal-branding/references/gary-v-principles.md +20 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/personal-branding/references/oversubscribed-positioning.md +18 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/personal-branding/references/platforms.md +41 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/personal-branding/references/priestley-oversubscribed.md +54 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/personal-branding/references/storeys-style-examples.md +25 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/personal-branding/references/visual-identity.md +27 -0
- package/payload/premium-plugins/real-agency/plugins/estate-coaching/PLUGIN.md +55 -0
- package/payload/premium-plugins/real-agency/plugins/estate-coaching/skills/agent-performance/SKILL.md +371 -0
- package/payload/premium-plugins/real-agency/plugins/estate-coaching/skills/agent-performance/references/atomic-habits.md +52 -0
- package/payload/premium-plugins/real-agency/plugins/estate-coaching/skills/agent-performance/references/daily-routine-scorecard.md +104 -0
- package/payload/premium-plugins/real-agency/plugins/estate-coaching/skills/agent-performance/references/hp6-model.md +63 -0
- package/payload/premium-plugins/real-agency/plugins/estate-coaching/skills/agent-performance/references/twelve-week-year.md +71 -0
- package/payload/premium-plugins/real-agency/plugins/estate-coaching/skills/bespoke-coaching/SKILL.md +36 -0
- package/payload/premium-plugins/real-agency/plugins/estate-coaching/skills/bespoke-coaching/references/coaching-boundaries.md +56 -0
- package/payload/premium-plugins/real-agency/plugins/estate-coaching/skills/bespoke-coaching/references/feedback-framework.md +61 -0
- package/payload/premium-plugins/real-agency/plugins/estate-coaching/skills/bespoke-coaching/references/performance-framework.md +109 -0
- package/payload/premium-plugins/real-agency/plugins/estate-coaching/skills/coaching-toolkit/SKILL.md +421 -0
- package/payload/premium-plugins/real-agency/plugins/estate-coaching/skills/coaching-toolkit/references/coaching-exercises.md +86 -0
- package/payload/premium-plugins/real-agency/plugins/estate-coaching/skills/coaching-toolkit/references/goal-setting.md +78 -0
- package/payload/premium-plugins/real-agency/plugins/estate-coaching/skills/coaching-toolkit/references/one-to-one-framework.md +92 -0
- package/payload/premium-plugins/real-agency/plugins/estate-coaching/skills/coaching-toolkit/references/soi-workbook.md +103 -0
- package/payload/premium-plugins/real-agency/plugins/estate-coaching/skills/serhant-training/SKILL.md +410 -0
- package/payload/premium-plugins/real-agency/plugins/estate-coaching/skills/serhant-training/references/agent-training-guide.md +70 -0
- package/payload/premium-plugins/real-agency/plugins/estate-coaching/skills/serhant-training/references/business-in-a-box.md +72 -0
- package/payload/premium-plugins/real-agency/plugins/estate-coaching/skills/serhant-training/references/buyers-guide.md +53 -0
- package/payload/premium-plugins/real-agency/plugins/estate-coaching/skills/serhant-training/references/codo-method.md +72 -0
- package/payload/premium-plugins/real-agency/plugins/estate-coaching/skills/serhant-training/references/website-planning-guide.md +79 -0
- package/payload/premium-plugins/real-agency/plugins/estate-onboarding/PLUGIN.md +31 -0
- package/payload/premium-plugins/real-agency/plugins/estate-onboarding/skills/bootstrap/SKILL.md +26 -0
- package/payload/premium-plugins/real-agency/plugins/estate-onboarding/skills/bootstrap/references/onboarding-flow.md +63 -0
- package/payload/premium-plugins/real-agency/plugins/estate-sales/PLUGIN.md +34 -0
- package/payload/premium-plugins/real-agency/plugins/estate-sales/skills/negotiation/SKILL.md +35 -0
- package/payload/premium-plugins/real-agency/plugins/estate-sales/skills/negotiation/references/deal-saving.md +47 -0
- package/payload/premium-plugins/real-agency/plugins/estate-sales/skills/negotiation/references/negotiation-deep-guide.md +64 -0
- package/payload/premium-plugins/real-agency/plugins/estate-sales/skills/negotiation/references/negotiation-prep-principles.md +29 -0
- package/payload/premium-plugins/real-agency/plugins/estate-sales/skills/negotiation/references/negotiation-techniques.md +42 -0
- package/payload/premium-plugins/real-agency/plugins/estate-sales/skills/negotiation/references/offer-presentation.md +43 -0
- package/payload/premium-plugins/real-agency/plugins/estate-sales/skills/sales-closer/SKILL.md +24 -0
- package/payload/premium-plugins/real-agency/plugins/estate-sales/skills/sales-closer/references/serhant-emotion-stages.md +36 -0
- package/payload/premium-plugins/real-agency/plugins/estate-sales/skills/sales-discovery/SKILL.md +30 -0
- package/payload/premium-plugins/real-agency/plugins/estate-sales/skills/sales-discovery/references/chris-voss-discovery.md +88 -0
- package/payload/premium-plugins/real-agency/plugins/estate-sales/skills/sales-discovery/references/firewave-gost-journey.md +68 -0
- package/payload/premium-plugins/real-agency/plugins/estate-sales/skills/sales-discovery/references/phil-jones-openers.md +78 -0
- package/payload/premium-plugins/real-agency/plugins/estate-sales/skills/sales-discovery/references/pre-listing-checklist.md +77 -0
- package/payload/premium-plugins/real-agency/plugins/estate-sales/skills/sales-discovery/references/serhant-improv.md +22 -0
- package/payload/premium-plugins/real-agency/plugins/estate-sales/skills/sales-discovery/references/tom-ferry-discovery.md +103 -0
- package/payload/premium-plugins/real-agency/plugins/estate-sales/skills/sales-discovery/references/vendor-motivation-competitor.md +52 -0
- package/payload/premium-plugins/real-agency/plugins/estate-sales/skills/sales-negotiation/SKILL.md +29 -0
- package/payload/premium-plugins/real-agency/plugins/estate-sales/skills/sales-negotiation/references/chris-voss-negotiation.md +70 -0
- package/payload/premium-plugins/real-agency/plugins/estate-sales/skills/sales-negotiation/references/phil-jones-price-words.md +40 -0
- package/payload/premium-plugins/real-agency/plugins/estate-sales/skills/sales-negotiation/references/serhant-negotiation-plus.md +55 -0
- package/payload/premium-plugins/real-agency/plugins/estate-sales/skills/sales-negotiation/references/tom-panos-commission-pricing.md +57 -0
- package/payload/premium-plugins/real-agency/plugins/estate-sales/skills/sales-negotiation/references/tony-morris-questioning.md +54 -0
- package/payload/premium-plugins/real-agency/plugins/estate-sales/skills/sales-progression/SKILL.md +27 -0
- package/payload/premium-plugins/real-agency/plugins/estate-sales/skills/sales-progression/references/conveyancing-guide.md +54 -0
- package/payload/premium-plugins/real-agency/plugins/estate-sales/skills/sales-progression/references/transaction-tracking.md +66 -0
- package/payload/premium-plugins/real-agency/plugins/estate-teaching/PLUGIN.md +31 -0
- package/payload/premium-plugins/real-agency/plugins/estate-teaching/skills/content-directory/SKILL.md +39 -0
- package/payload/premium-plugins/real-agency/plugins/estate-teaching/skills/content-directory/references/module-delivery.md +65 -0
- package/payload/premium-plugins/real-agency/plugins/estate-teaching/skills/content-directory/references/progress-tracking.md +47 -0
- package/payload/premium-plugins/real-agency/plugins/leads/PLUGIN.md +32 -0
- package/payload/premium-plugins/real-agency/plugins/leads/skills/lead-nurturing/SKILL.md +137 -0
- package/payload/premium-plugins/real-agency/plugins/leads/skills/lead-nurturing/references/buyer-search-letter.md +28 -0
- package/payload/premium-plugins/real-agency/plugins/leads/skills/lead-nurturing/references/buyer-search-letters.md +37 -0
- package/payload/premium-plugins/real-agency/plugins/leads/skills/lead-nurturing/references/database-reactivation.md +30 -0
- package/payload/premium-plugins/real-agency/plugins/leads/skills/lead-nurturing/references/email-nurture-sequences.md +45 -0
- package/payload/premium-plugins/real-agency/plugins/leads/skills/lead-nurturing/references/facebook-referrals.md +30 -0
- package/payload/premium-plugins/real-agency/plugins/leads/skills/lead-nurturing/references/firewave-email-nurture-sequences.md +41 -0
- package/payload/premium-plugins/real-agency/plugins/leads/skills/lead-nurturing/references/keller-33-touch.md +34 -0
- package/payload/premium-plugins/real-agency/plugins/leads/skills/lead-nurturing/references/neighbour-letters.md +31 -0
- package/payload/premium-plugins/real-agency/plugins/leads/skills/lead-nurturing/references/neighbour-notification-letter.md +20 -0
- package/payload/premium-plugins/real-agency/plugins/leads/skills/lead-nurturing/references/ofi-follow-up-dialogue.md +22 -0
- package/payload/premium-plugins/real-agency/plugins/leads/skills/lead-nurturing/references/ofi-follow-up.md +26 -0
- package/payload/premium-plugins/real-agency/plugins/leads/skills/lead-nurturing/references/serhant-three-fs-plus.md +21 -0
- package/payload/premium-plugins/real-agency/plugins/leads/skills/lead-nurturing/references/sharran-10x10x10.md +18 -0
- package/payload/premium-plugins/real-agency/plugins/leads/skills/lead-nurturing/references/sms-templates.md +40 -0
- package/payload/premium-plugins/real-agency/plugins/leads/skills/lead-nurturing/references/sphere-of-influence-notes.md +34 -0
- package/payload/premium-plugins/real-agency/plugins/leads/skills/lead-nurturing/references/sphere-of-influence.md +60 -0
- package/payload/premium-plugins/real-agency/plugins/leads/skills/lead-nurturing/references/tom-panos-sms-templates.md +59 -0
- package/payload/premium-plugins/real-agency/plugins/leads/skills/prospecting/SKILL.md +33 -0
- package/payload/premium-plugins/real-agency/plugins/leads/skills/prospecting/references/database-matching.md +30 -0
- package/payload/premium-plugins/real-agency/plugins/leads/skills/prospecting/references/database-value.md +53 -0
- package/payload/premium-plugins/real-agency/plugins/leads/skills/prospecting/references/prospecting-dialogues.md +24 -0
- package/payload/premium-plugins/real-agency/plugins/leads/skills/prospecting/references/reactivation.md +34 -0
- package/payload/premium-plugins/real-agency/plugins/listings/PLUGIN.md +33 -0
- package/payload/premium-plugins/real-agency/plugins/listings/skills/home-preparation/SKILL.md +28 -0
- package/payload/premium-plugins/real-agency/plugins/listings/skills/home-preparation/references/kerb-appeal.md +38 -0
- package/payload/premium-plugins/real-agency/plugins/listings/skills/home-preparation/references/photo-day.md +59 -0
- package/payload/premium-plugins/real-agency/plugins/listings/skills/home-preparation/references/situational-tips.md +50 -0
- package/payload/premium-plugins/real-agency/plugins/listings/skills/home-preparation/references/staging-guide.md +52 -0
- package/payload/premium-plugins/real-agency/plugins/listings/skills/listing-presentation/SKILL.md +286 -0
- package/payload/premium-plugins/real-agency/plugins/listings/skills/listing-presentation/references/booking-script.md +51 -0
- package/payload/premium-plugins/real-agency/plugins/listings/skills/listing-presentation/references/objection-scripts.md +193 -0
- package/payload/premium-plugins/real-agency/plugins/listings/skills/listing-presentation/references/penhaul-presentation.md +123 -0
- package/payload/premium-plugins/real-agency/plugins/listings/skills/listing-presentation/references/pre-listing-kit.md +139 -0
- package/payload/premium-plugins/real-agency/plugins/listings/skills/listing-presentation/references/set-to-sell.md +55 -0
- package/payload/premium-plugins/real-agency/plugins/listings/skills/listing-presentation/references/sharran-frameworks.md +107 -0
- package/payload/premium-plugins/real-agency/plugins/listings/skills/property-marketing/SKILL.md +337 -0
- package/payload/premium-plugins/real-agency/plugins/listings/skills/property-marketing/references/auction-report-template.md +41 -0
- package/payload/premium-plugins/real-agency/plugins/listings/skills/property-marketing/references/coming-soon-campaign.md +43 -0
- package/payload/premium-plugins/real-agency/plugins/listings/skills/property-marketing/references/direct-mail-templates.md +121 -0
- package/payload/premium-plugins/real-agency/plugins/listings/skills/property-marketing/references/eoi-form-template.md +62 -0
- package/payload/premium-plugins/real-agency/plugins/listings/skills/property-marketing/references/monthly-scorecard.md +63 -0
- package/payload/premium-plugins/real-agency/plugins/loop/PLUGIN.md +73 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/index.d.ts +2 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/index.d.ts.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/index.js +293 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/index.js.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/lib/crypto.d.ts +10 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/lib/crypto.d.ts.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/lib/crypto.js +88 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/lib/crypto.js.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/lib/loop-api.d.ts +82 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/lib/loop-api.d.ts.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/lib/loop-api.js +427 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/lib/loop-api.js.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/lib/neo4j.d.ts +5 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/lib/neo4j.d.ts.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/lib/neo4j.js +40 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/lib/neo4j.js.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/customer-preferences.d.ts +10 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/customer-preferences.d.ts.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/customer-preferences.js +24 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/customer-preferences.js.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/feedback.d.ts +16 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/feedback.d.ts.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/feedback.js +35 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/feedback.js.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/key-deregister.d.ts +5 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/key-deregister.d.ts.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/key-deregister.js +19 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/key-deregister.js.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/key-list.d.ts +4 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/key-list.d.ts.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/key-list.js +14 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/key-list.js.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/key-register.d.ts +9 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/key-register.d.ts.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/key-register.js +60 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/key-register.js.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-enquiry.d.ts +13 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-enquiry.d.ts.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-enquiry.js +41 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-enquiry.js.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-batch.d.ts +9 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-batch.d.ts.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-batch.js +16 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-batch.js.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-request.d.ts +15 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-request.d.ts.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-request.js +11 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match-request.js.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match.d.ts +10 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match.d.ts.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match.js +39 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/marketing-match.js.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/people-detail.d.ts +9 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/people-detail.d.ts.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/people-detail.js +125 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/people-detail.js.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/people-search.d.ts +18 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/people-search.d.ts.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/people-search.js +87 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/people-search.js.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-detail.d.ts +10 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-detail.d.ts.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-detail.js +82 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-detail.js.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-listed.d.ts +12 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-listed.d.ts.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-listed.js +32 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-listed.js.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-request.d.ts +15 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-request.d.ts.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-request.js +11 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-request.js.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-search.d.ts +16 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-search.d.ts.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-search.js +41 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/property-search.js.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/supplier.d.ts +13 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/supplier.d.ts.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/supplier.js +49 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/supplier.js.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/team-availability.d.ts +7 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/team-availability.d.ts.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/team-availability.js +19 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/team-availability.js.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/team-info.d.ts +5 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/team-info.d.ts.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/team-info.js +32 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/team-info.js.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-create.d.ts +14 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-create.d.ts.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-create.js +11 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-create.js.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-detail.d.ts +9 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-detail.d.ts.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-detail.js +85 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-detail.js.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-search.d.ts +13 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-search.d.ts.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-search.js +44 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-search.js.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-update.d.ts +14 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-update.d.ts.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-update.js +18 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/dist/tools/viewing-update.js.map +1 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/package-lock.json +2549 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/package.json +21 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/src/__tests__/loop-swagger.snapshot.json +26467 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/src/__tests__/swagger-write-coverage.test.ts +153 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/src/index.ts +444 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/src/lib/crypto.ts +105 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/src/lib/loop-api.ts +604 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/src/lib/neo4j.ts +51 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/src/tools/customer-preferences.ts +66 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/src/tools/feedback.ts +86 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/src/tools/key-deregister.ts +27 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/src/tools/key-list.ts +19 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/src/tools/key-register.ts +95 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/src/tools/marketing-enquiry.ts +113 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/src/tools/marketing-match-batch.ts +53 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/src/tools/marketing-match-request.ts +42 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/src/tools/marketing-match.ts +84 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/src/tools/people-detail.ts +245 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/src/tools/people-search.ts +180 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/src/tools/property-detail.ts +145 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/src/tools/property-listed.ts +88 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/src/tools/property-request.ts +42 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/src/tools/property-search.ts +92 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/src/tools/supplier.ts +129 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/src/tools/team-availability.ts +52 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/src/tools/team-info.ts +95 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/src/tools/viewing-create.ts +41 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/src/tools/viewing-detail.ts +171 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/src/tools/viewing-search.ts +92 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/src/tools/viewing-update.ts +53 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/tsconfig.json +20 -0
- package/payload/premium-plugins/real-agency/plugins/loop/mcp/vitest.config.ts +9 -0
- package/payload/premium-plugins/real-agency/plugins/vendors/PLUGIN.md +34 -0
- package/payload/premium-plugins/real-agency/plugins/vendors/skills/vendor-communication/SKILL.md +42 -0
- package/payload/premium-plugins/real-agency/plugins/vendors/skills/vendor-communication/references/fee-protection-and-agenda.md +28 -0
- package/payload/premium-plugins/real-agency/plugins/vendors/skills/vendor-communication/references/listing-scripts.md +44 -0
- package/payload/premium-plugins/real-agency/plugins/vendors/skills/vendor-communication/references/negotiation-deep-guide.md +70 -0
- package/payload/premium-plugins/real-agency/plugins/vendors/skills/vendor-communication/references/price-alignment-scripts.md +33 -0
- package/payload/premium-plugins/real-agency/plugins/vendors/skills/vendor-communication/references/price-alignment.md +34 -0
- package/payload/premium-plugins/real-agency/plugins/vendors/skills/vendor-communication/references/scenario-scripts.md +38 -0
- package/payload/premium-plugins/real-agency/plugins/vendors/skills/vendor-communication/references/seller-engagement.md +51 -0
- package/payload/premium-plugins/real-agency/plugins/vendors/skills/vendor-communication/references/valuation-booking.md +76 -0
- package/payload/premium-plugins/real-agency/plugins/vendors/skills/vendor-communication/references/vendor-scripts.md +63 -0
- package/payload/premium-plugins/real-agency/plugins/vendors/skills/vendor-communication/references/vendor-updates.md +41 -0
- package/payload/premium-plugins/real-agency/plugins/vendors/skills/vendor-updates/SKILL.md +153 -0
- package/payload/premium-plugins/teaching/PLUGIN.md +57 -0
- package/payload/premium-plugins/teaching/skills/interactive-tutor/SKILL.md +59 -0
- package/payload/premium-plugins/teaching/skills/interactive-tutor/references/assessment.md +70 -0
- package/payload/premium-plugins/teaching/skills/interactive-tutor/references/classroom-conduct.md +43 -0
- package/payload/premium-plugins/teaching/skills/interactive-tutor/references/teaching-modes.md +83 -0
- package/payload/premium-plugins/teaching/skills/lesson-planner/SKILL.md +48 -0
- package/payload/premium-plugins/teaching/skills/lesson-planner/references/context-gathering.md +41 -0
- package/payload/premium-plugins/teaching/skills/lesson-planner/references/plan-structure.md +94 -0
- package/payload/premium-plugins/teaching/skills/study-pack-builder/SKILL.md +52 -0
- package/payload/premium-plugins/teaching/skills/study-pack-builder/references/disaggregation.md +49 -0
- package/payload/premium-plugins/teaching/skills/study-pack-builder/references/materials.md +116 -0
- package/payload/premium-plugins/writer-craft/PLUGIN.md +87 -0
- package/payload/premium-plugins/writer-craft/agents/writer-craft--manuscript-reviewer.md +92 -0
- package/payload/premium-plugins/writer-craft/skills/citation-style/SKILL.md +94 -0
- package/payload/premium-plugins/writer-craft/skills/citation-style/references/book-and-chapter-models.md +77 -0
- package/payload/premium-plugins/writer-craft/skills/citation-style/references/citation-rules.md +103 -0
- package/payload/premium-plugins/writer-craft/skills/citation-style/references/journal-article-models.md +74 -0
- package/payload/premium-plugins/writer-craft/skills/citation-style/references/other-source-models.md +146 -0
- package/payload/premium-plugins/writer-craft/skills/citation-style/references/reference-list-rules.md +70 -0
- package/payload/premium-plugins/writer-craft/skills/editorial-practice/SKILL.md +108 -0
- package/payload/premium-plugins/writer-craft/skills/editorial-practice/references/copyediting.md +73 -0
- package/payload/premium-plugins/writer-craft/skills/editorial-practice/references/developmental-editing.md +85 -0
- package/payload/premium-plugins/writer-craft/skills/editorial-practice/references/genre-specific-editing.md +78 -0
- package/payload/premium-plugins/writer-craft/skills/editorial-practice/references/line-editing.md +55 -0
- package/payload/premium-plugins/writer-craft/skills/editorial-practice/references/self-editing.md +89 -0
- package/payload/premium-plugins/writer-craft/skills/persuasive-storytelling/SKILL.md +114 -0
- package/payload/premium-plugins/writer-craft/skills/persuasive-storytelling/references/audience-analysis.md +73 -0
- package/payload/premium-plugins/writer-craft/skills/persuasive-storytelling/references/crafting-persuasive-story.md +76 -0
- package/payload/premium-plugins/writer-craft/skills/persuasive-storytelling/references/persuasion-case-studies.md +67 -0
- package/payload/premium-plugins/writer-craft/skills/persuasive-storytelling/references/transformation-framework.md +86 -0
- package/payload/premium-plugins/writer-craft/skills/point-of-view/SKILL.md +97 -0
- package/payload/premium-plugins/writer-craft/skills/point-of-view/references/indirect-narration.md +72 -0
- package/payload/premium-plugins/writer-craft/skills/point-of-view/references/pov-types-and-voice.md +91 -0
- package/payload/premium-plugins/writer-craft/skills/point-of-view/references/protagonist-filter.md +71 -0
- package/payload/premium-plugins/writer-craft/skills/point-of-view/references/tense-and-person.md +85 -0
- package/payload/premium-plugins/writer-craft/skills/prose-craft/SKILL.md +100 -0
- package/payload/premium-plugins/writer-craft/skills/prose-craft/references/punctuation-and-grammar.md +72 -0
- package/payload/premium-plugins/writer-craft/skills/prose-craft/references/repetition.md +71 -0
- package/payload/premium-plugins/writer-craft/skills/prose-craft/references/sound-and-rhythm.md +64 -0
- package/payload/premium-plugins/writer-craft/skills/prose-craft/references/word-economy.md +93 -0
- package/payload/premium-plugins/writer-craft/skills/reader-engagement/SKILL.md +100 -0
- package/payload/premium-plugins/writer-craft/skills/reader-engagement/references/cause-effect-setup-payoff.md +79 -0
- package/payload/premium-plugins/writer-craft/skills/reader-engagement/references/conflict-escalation.md +81 -0
- package/payload/premium-plugins/writer-craft/skills/reader-engagement/references/hooking-readers.md +67 -0
- package/payload/premium-plugins/writer-craft/skills/reader-engagement/references/neurochemistry-of-engagement.md +94 -0
- package/payload/premium-plugins/writer-craft/skills/review-manuscript/SKILL.md +111 -0
- package/payload/premium-plugins/writer-craft/skills/review-manuscript/references/review-manuscript-checklist.md +119 -0
- package/payload/premium-plugins/writer-craft/skills/review-prose/SKILL.md +99 -0
- package/payload/premium-plugins/writer-craft/skills/review-prose/references/prose-review-checklist.md +112 -0
- package/payload/premium-plugins/writer-craft/skills/review-scene/SKILL.md +99 -0
- package/payload/premium-plugins/writer-craft/skills/review-scene/references/scene-analysis-framework.md +95 -0
- package/payload/premium-plugins/writer-craft/skills/story-architecture/SKILL.md +106 -0
- package/payload/premium-plugins/writer-craft/skills/story-architecture/references/blueprinting-and-scene-cards.md +118 -0
- package/payload/premium-plugins/writer-craft/skills/story-architecture/references/inner-issue-and-protagonist-goal.md +66 -0
- package/payload/premium-plugins/writer-craft/skills/story-architecture/references/misbelief-desire-worldview.md +87 -0
- package/payload/premium-plugins/writer-craft/skills/story-architecture/references/origin-scenes-and-escalation.md +82 -0
- package/payload/premium-plugins/writer-craft/skills/story-blueprint/SKILL.md +133 -0
- package/payload/premium-plugins/writer-craft/skills/story-blueprint/references/blueprinting-exercises.md +118 -0
- package/payload/premium-plugins/writer-craft/skills/story-blueprint/references/blueprinting-process.md +128 -0
- package/payload/server/adminuser-self-heal-QAWOZ3JV.js +45 -0
- package/payload/server/chunk-5FM432JB.js +4148 -0
- package/payload/server/chunk-6S5JTXAN.js +1544 -0
- package/payload/server/chunk-JSBRDJBE.js +30 -0
- package/payload/server/chunk-RNW625CL.js +759 -0
- package/payload/server/cloudflare-task-tracker-VC7QVU5H.js +22 -0
- package/payload/server/maxy-edge.js +1021 -0
- package/payload/server/package.json +13 -0
- package/payload/server/public/assets/Checkbox-C6ZCsPvl.js +1 -0
- package/payload/server/public/assets/_baseFor-BHtDrjIo.js +1 -0
- package/payload/server/public/assets/admin-CWMpccrR.css +1 -0
- package/payload/server/public/assets/admin-DVGJmN-k.js +216 -0
- package/payload/server/public/assets/arc-DMDAZHAN.js +1 -0
- package/payload/server/public/assets/architecture-YZFGNWBL-COhEvUpo.js +1 -0
- package/payload/server/public/assets/architectureDiagram-Q4EWVU46-DwN6H0y2.js +36 -0
- package/payload/server/public/assets/array-DetWRiSa.js +1 -0
- package/payload/server/public/assets/blockDiagram-DXYQGD6D-TUk_F7H6.js +132 -0
- package/payload/server/public/assets/c4Diagram-AHTNJAMY-CTjGko0X.js +10 -0
- package/payload/server/public/assets/channel-Cv-65bLZ.js +1 -0
- package/payload/server/public/assets/chunk-2KRD3SAO-Di4bO8ir.js +1 -0
- package/payload/server/public/assets/chunk-336JU56O-DulT46bV.js +2 -0
- package/payload/server/public/assets/chunk-426QAEUC-BwKj8yqp.js +1 -0
- package/payload/server/public/assets/chunk-4BX2VUAB-DyEhFk-Z.js +1 -0
- package/payload/server/public/assets/chunk-4TB4RGXK-CewO8YaZ.js +206 -0
- package/payload/server/public/assets/chunk-55IACEB6-BRJOZLpU.js +1 -0
- package/payload/server/public/assets/chunk-5FUZZQ4R-B3IWYz-k.js +62 -0
- package/payload/server/public/assets/chunk-5PVQY5BW-DyiDEtXY.js +2 -0
- package/payload/server/public/assets/chunk-67CJDMHE-BG6-9r6c.js +1 -0
- package/payload/server/public/assets/chunk-7N4EOEYR-BvMbitX7.js +1 -0
- package/payload/server/public/assets/chunk-AA7GKIK3-CE8mGBD5.js +1 -0
- package/payload/server/public/assets/chunk-BSJP7CBP-DP7LTBll.js +1 -0
- package/payload/server/public/assets/chunk-CIAEETIT-VfnIdN-h.js +1 -0
- package/payload/server/public/assets/chunk-DD-I1_y5.js +1 -0
- package/payload/server/public/assets/chunk-EDXVE4YY-B3u7wU36.js +1 -0
- package/payload/server/public/assets/chunk-ENJZ2VHE-BesS5YY4.js +10 -0
- package/payload/server/public/assets/chunk-FMBD7UC4-w-yBZsN2.js +15 -0
- package/payload/server/public/assets/chunk-FOC6F5B3-f9cFywhd.js +1 -0
- package/payload/server/public/assets/chunk-ICPOFSXX-C5_hbB6H.js +122 -0
- package/payload/server/public/assets/chunk-K5T4RW27-B_ZUrFUq.js +94 -0
- package/payload/server/public/assets/chunk-KGLVRYIC-CcWTvRlI.js +1 -0
- package/payload/server/public/assets/chunk-LIHQZDEY-D-5-peQw.js +1 -0
- package/payload/server/public/assets/chunk-ORNJ4GCN-B4Z5L25I.js +1 -0
- package/payload/server/public/assets/chunk-OYMX7WX6-CrL4rhBa.js +231 -0
- package/payload/server/public/assets/chunk-QZHKN3VN-CWh_0JsP.js +1 -0
- package/payload/server/public/assets/chunk-U2HBQHQK-CQpbcqRS.js +70 -0
- package/payload/server/public/assets/chunk-X2U36JSP-1HG7T4gX.js +1 -0
- package/payload/server/public/assets/chunk-XPW4576I-m1Y_r88I.js +32 -0
- package/payload/server/public/assets/chunk-YZCP3GAM-boN5wjX9.js +1 -0
- package/payload/server/public/assets/chunk-ZZ45TVLE-D6CiPO0Q.js +1 -0
- package/payload/server/public/assets/classDiagram-6PBFFD2Q-wQ2-BRyB.js +1 -0
- package/payload/server/public/assets/classDiagram-v2-HSJHXN6E-B_YLNNHy.js +1 -0
- package/payload/server/public/assets/clone-VLK-GPZZ.js +1 -0
- package/payload/server/public/assets/cormorant-cyrillic-300-normal-CzPHYadL.woff +0 -0
- package/payload/server/public/assets/cormorant-cyrillic-300-normal-DFUoTmrg.woff2 +0 -0
- package/payload/server/public/assets/cormorant-cyrillic-400-normal-C8QS47vb.woff2 +0 -0
- package/payload/server/public/assets/cormorant-cyrillic-400-normal-D3EsxgFc.woff +0 -0
- package/payload/server/public/assets/cormorant-cyrillic-500-normal-B7dJQtg-.woff +0 -0
- package/payload/server/public/assets/cormorant-cyrillic-500-normal-BLlg2W5x.woff2 +0 -0
- package/payload/server/public/assets/cormorant-cyrillic-ext-300-normal-BXl3lXsi.woff2 +0 -0
- package/payload/server/public/assets/cormorant-cyrillic-ext-300-normal-DmxSOTe3.woff +0 -0
- package/payload/server/public/assets/cormorant-cyrillic-ext-400-normal-Bgrpe4p1.woff +0 -0
- package/payload/server/public/assets/cormorant-cyrillic-ext-400-normal-BlcaxZtM.woff2 +0 -0
- package/payload/server/public/assets/cormorant-cyrillic-ext-500-normal-CdQuyvtc.woff +0 -0
- package/payload/server/public/assets/cormorant-cyrillic-ext-500-normal-pZw22qtS.woff2 +0 -0
- package/payload/server/public/assets/cormorant-latin-300-normal-CJ5dfen0.woff2 +0 -0
- package/payload/server/public/assets/cormorant-latin-300-normal-DQZObO_3.woff +0 -0
- package/payload/server/public/assets/cormorant-latin-400-normal-BGH8Vunh.woff2 +0 -0
- package/payload/server/public/assets/cormorant-latin-400-normal-C3_-2Ua-.woff +0 -0
- package/payload/server/public/assets/cormorant-latin-500-normal-Dj3SQ6fR.woff +0 -0
- package/payload/server/public/assets/cormorant-latin-500-normal-EBdSCOD3.woff2 +0 -0
- package/payload/server/public/assets/cormorant-latin-ext-300-normal-CkiUx0UG.woff +0 -0
- package/payload/server/public/assets/cormorant-latin-ext-300-normal-De3D72RL.woff2 +0 -0
- package/payload/server/public/assets/cormorant-latin-ext-400-normal-DuQ88yz3.woff2 +0 -0
- package/payload/server/public/assets/cormorant-latin-ext-400-normal-DuXFa1Dr.woff +0 -0
- package/payload/server/public/assets/cormorant-latin-ext-500-normal-AH9qog1s.woff2 +0 -0
- package/payload/server/public/assets/cormorant-latin-ext-500-normal-DAuUCO41.woff +0 -0
- package/payload/server/public/assets/cormorant-vietnamese-300-normal-BVqIp_mg.woff2 +0 -0
- package/payload/server/public/assets/cormorant-vietnamese-300-normal-CEMS9Pw-.woff +0 -0
- package/payload/server/public/assets/cormorant-vietnamese-400-normal-C-RiYxEf.woff2 +0 -0
- package/payload/server/public/assets/cormorant-vietnamese-400-normal-DmUuA7Y2.woff +0 -0
- package/payload/server/public/assets/cormorant-vietnamese-500-normal-DsPuwQHi.woff2 +0 -0
- package/payload/server/public/assets/cormorant-vietnamese-500-normal-tGBW_mI7.woff +0 -0
- package/payload/server/public/assets/cose-bilkent-S5V4N54A-BhtgY3T7.js +1 -0
- package/payload/server/public/assets/cytoscape.esm-C9yNhe1u.js +321 -0
- package/payload/server/public/assets/dagre-CncXYNX1.js +1 -0
- package/payload/server/public/assets/dagre-KV5264BT-C0CcgCHW.js +4 -0
- package/payload/server/public/assets/data-Bt4Wsocg.js +1 -0
- package/payload/server/public/assets/defaultLocale-_WRwicXn.js +1 -0
- package/payload/server/public/assets/diagram-5BDNPKRD-CkUlWbsI.js +10 -0
- package/payload/server/public/assets/diagram-G4DWMVQ6-DVZBG1Ul.js +24 -0
- package/payload/server/public/assets/diagram-MMDJMWI5-BIb06ZkK.js +43 -0
- package/payload/server/public/assets/diagram-TYMM5635-BcT0_WR8.js +24 -0
- package/payload/server/public/assets/dist-Bd4S37oi.js +1 -0
- package/payload/server/public/assets/dm-sans-latin-400-normal-BwCSEQnW.woff +0 -0
- package/payload/server/public/assets/dm-sans-latin-400-normal-CW0RaeGs.woff2 +0 -0
- package/payload/server/public/assets/dm-sans-latin-500-normal-B9HHJjqV.woff2 +0 -0
- package/payload/server/public/assets/dm-sans-latin-500-normal-Dr3UlScf.woff +0 -0
- package/payload/server/public/assets/dm-sans-latin-ext-400-normal-BjWJ59Pq.woff +0 -0
- package/payload/server/public/assets/dm-sans-latin-ext-400-normal-BtiwyxMk.woff2 +0 -0
- package/payload/server/public/assets/dm-sans-latin-ext-500-normal-BJfUCQsA.woff2 +0 -0
- package/payload/server/public/assets/dm-sans-latin-ext-500-normal-DR84L5F-.woff +0 -0
- package/payload/server/public/assets/erDiagram-SMLLAGMA-BHk6lxIT.js +85 -0
- package/payload/server/public/assets/flatten-BsWEYbBB.js +1 -0
- package/payload/server/public/assets/flowDiagram-DWJPFMVM-CjeJn490.js +162 -0
- package/payload/server/public/assets/ganttDiagram-T4ZO3ILL-BGYvX3Lv.js +292 -0
- package/payload/server/public/assets/gitGraph-7Q5UKJZL-DeTNsAO0.js +1 -0
- package/payload/server/public/assets/gitGraphDiagram-UUTBAWPF-Br4WLGzW.js +106 -0
- package/payload/server/public/assets/graph-CRSLozxc.js +1 -0
- package/payload/server/public/assets/graph-labels-CQyZQ0u6.js +1 -0
- package/payload/server/public/assets/graphlib-BWd9sMeP.js +1 -0
- package/payload/server/public/assets/info-OMHHGYJF-DJJ9GlS6.js +1 -0
- package/payload/server/public/assets/infoDiagram-42DDH7IO-BjZeQoNZ.js +2 -0
- package/payload/server/public/assets/init-sTEcj9YX.js +1 -0
- package/payload/server/public/assets/isEmpty-BWl67LAZ.js +1 -0
- package/payload/server/public/assets/ishikawaDiagram-UXIWVN3A-POMae6Ni.js +70 -0
- package/payload/server/public/assets/jetbrains-mono-cyrillic-400-normal-BEIGL1Tu.woff2 +0 -0
- package/payload/server/public/assets/jetbrains-mono-cyrillic-400-normal-ugxPyKxw.woff +0 -0
- package/payload/server/public/assets/jetbrains-mono-cyrillic-500-normal-DJqRU3vO.woff +0 -0
- package/payload/server/public/assets/jetbrains-mono-cyrillic-500-normal-DmUKJPL_.woff2 +0 -0
- package/payload/server/public/assets/jetbrains-mono-greek-400-normal-B9oWc5Lo.woff +0 -0
- package/payload/server/public/assets/jetbrains-mono-greek-400-normal-C190GLew.woff2 +0 -0
- package/payload/server/public/assets/jetbrains-mono-greek-500-normal-D7SFKleX.woff +0 -0
- package/payload/server/public/assets/jetbrains-mono-greek-500-normal-JpySY46c.woff2 +0 -0
- package/payload/server/public/assets/jetbrains-mono-latin-400-normal-6-qcROiO.woff +0 -0
- package/payload/server/public/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
- package/payload/server/public/assets/jetbrains-mono-latin-500-normal-BWZEU5yA.woff2 +0 -0
- package/payload/server/public/assets/jetbrains-mono-latin-500-normal-CJOVTJB7.woff +0 -0
- package/payload/server/public/assets/jetbrains-mono-latin-ext-400-normal-Bc8Ftmh3.woff2 +0 -0
- package/payload/server/public/assets/jetbrains-mono-latin-ext-400-normal-fXTG6kC5.woff +0 -0
- package/payload/server/public/assets/jetbrains-mono-latin-ext-500-normal-Cut-4mMH.woff2 +0 -0
- package/payload/server/public/assets/jetbrains-mono-latin-ext-500-normal-ckzbgY84.woff +0 -0
- package/payload/server/public/assets/jetbrains-mono-vietnamese-400-normal-CqNFfHCs.woff +0 -0
- package/payload/server/public/assets/jetbrains-mono-vietnamese-500-normal-DNRqzVM1.woff +0 -0
- package/payload/server/public/assets/journeyDiagram-VCZTEJTY-ledtLV6x.js +139 -0
- package/payload/server/public/assets/jsx-runtime-DvanDPKm.css +1 -0
- package/payload/server/public/assets/jsx-runtime-vPsBTwUp.js +9 -0
- package/payload/server/public/assets/kanban-definition-6JOO6SKY-DI0T4W9z.js +89 -0
- package/payload/server/public/assets/katex-s61Rgv6l.js +257 -0
- package/payload/server/public/assets/lib-W5Jcz4p8.js +33 -0
- package/payload/server/public/assets/line-D1281H12.js +1 -0
- package/payload/server/public/assets/linear-0O14Y6uf.js +1 -0
- package/payload/server/public/assets/mermaid-parser.core-Dt95U7zk.js +4 -0
- package/payload/server/public/assets/mermaid.core-BuYSs1fU.js +11 -0
- package/payload/server/public/assets/mindmap-definition-QFDTVHPH-CFE1lmfX.js +96 -0
- package/payload/server/public/assets/ordinal-krseTxxN.js +1 -0
- package/payload/server/public/assets/packet-4T2RLAQJ-CGbvGkvF.js +1 -0
- package/payload/server/public/assets/page-CSUcuVW0.js +1 -0
- package/payload/server/public/assets/page-TARBO-Yr.js +50 -0
- package/payload/server/public/assets/path-B0Ik7Tu9.js +1 -0
- package/payload/server/public/assets/pie-ZZUOXDRM-BZy8rjFn.js +1 -0
- package/payload/server/public/assets/pieDiagram-DEJITSTG-BSd9xa7v.js +30 -0
- package/payload/server/public/assets/public-5r6aRXrb.js +8 -0
- package/payload/server/public/assets/quadrantDiagram-34T5L4WZ-xYehPVw5.js +7 -0
- package/payload/server/public/assets/radar-PYXPWWZC-DcfWIVXr.js +1 -0
- package/payload/server/public/assets/reduce-tk-xY6Fv.js +1 -0
- package/payload/server/public/assets/requirementDiagram-MS252O5E-C6n77V1S.js +84 -0
- package/payload/server/public/assets/rough.esm-DKRO8IF-.js +1 -0
- package/payload/server/public/assets/sankeyDiagram-XADWPNL6-CWIfeO1M.js +10 -0
- package/payload/server/public/assets/sequenceDiagram-FGHM5R23-DDv2DuMo.js +157 -0
- package/payload/server/public/assets/src-B6XdH6xq.js +1 -0
- package/payload/server/public/assets/stateDiagram-FHFEXIEX-BPZdmsww.js +1 -0
- package/payload/server/public/assets/stateDiagram-v2-QKLJ7IA2-33eC4TwE.js +1 -0
- package/payload/server/public/assets/timeline-definition-GMOUNBTQ-BpRT_wSX.js +120 -0
- package/payload/server/public/assets/treeView-SZITEDCU-3WugwVdj.js +1 -0
- package/payload/server/public/assets/treemap-W4RFUUIX-Cf5mDLlu.js +1 -0
- package/payload/server/public/assets/vennDiagram-DHZGUBPP-BG8ubucH.js +34 -0
- package/payload/server/public/assets/wardley-RL74JXVD-Bv4md4b3.js +1 -0
- package/payload/server/public/assets/wardleyDiagram-NUSXRM2D-D4E7PU1B.js +20 -0
- package/payload/server/public/assets/xychartDiagram-5P7HB3ND-Ur2xVM-c.js +7 -0
- package/payload/server/public/brand/claude.png +0 -0
- package/payload/server/public/brand/favicon.ico +0 -0
- package/payload/server/public/brand/maxy-black.png +0 -0
- package/payload/server/public/brand/maxy-horizontal.png +0 -0
- package/payload/server/public/brand/maxy-monochrome.png +0 -0
- package/payload/server/public/brand/maxy-square.png +0 -0
- package/payload/server/public/brand/maxy.png +0 -0
- package/payload/server/public/brand/star.png +0 -0
- package/payload/server/public/brand-constants.json +8 -0
- package/payload/server/public/brand-defaults.css +12 -0
- package/payload/server/public/data.html +18 -0
- package/payload/server/public/favicon.ico +0 -0
- package/payload/server/public/graph.html +19 -0
- package/payload/server/public/index.html +23 -0
- package/payload/server/public/public.html +19 -0
- package/payload/server/public/robots.txt +5 -0
- package/payload/server/public/vnc-popout.html +63 -0
- package/payload/server/server-init.cjs +115 -0
- package/payload/server/server.js +14960 -0
|
@@ -0,0 +1,1544 @@
|
|
|
1
|
+
// app/lib/neo4j-store.ts
|
|
2
|
+
import neo4j from "neo4j-driver";
|
|
3
|
+
import { randomUUID } from "crypto";
|
|
4
|
+
import { spawn } from "child_process";
|
|
5
|
+
import { readFileSync, readdirSync, existsSync, openSync, readSync, closeSync, statSync, rmSync } from "fs";
|
|
6
|
+
import { resolve } from "path";
|
|
7
|
+
|
|
8
|
+
// ../lib/models/src/index.ts
|
|
9
|
+
var OPUS_MODEL = "claude-opus-4-7";
|
|
10
|
+
var SONNET_MODEL = "claude-sonnet-4-6";
|
|
11
|
+
var HAIKU_MODEL = "claude-haiku-4-5";
|
|
12
|
+
var MODEL_CONTEXT_WINDOW = {
|
|
13
|
+
[OPUS_MODEL]: 2e5,
|
|
14
|
+
[SONNET_MODEL]: 2e5,
|
|
15
|
+
[HAIKU_MODEL]: 2e5
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
// app/lib/neo4j-store.ts
|
|
19
|
+
var PLATFORM_ROOT = process.env.MAXY_PLATFORM_ROOT ?? resolve(process.cwd(), "..");
|
|
20
|
+
var driver = null;
|
|
21
|
+
function readPassword() {
|
|
22
|
+
if (process.env.NEO4J_PASSWORD) return process.env.NEO4J_PASSWORD;
|
|
23
|
+
const passwordFile = resolve(PLATFORM_ROOT, "config/.neo4j-password");
|
|
24
|
+
try {
|
|
25
|
+
return readFileSync(passwordFile, "utf-8").trim();
|
|
26
|
+
} catch {
|
|
27
|
+
throw new Error(
|
|
28
|
+
`Neo4j password not found. Expected at ${passwordFile} or in NEO4J_PASSWORD env var.`
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function getDriver() {
|
|
33
|
+
if (!driver) {
|
|
34
|
+
const uri = process.env.NEO4J_URI;
|
|
35
|
+
if (!uri) {
|
|
36
|
+
throw new Error(
|
|
37
|
+
"[ui/neo4j-store] NEO4J_URI unset \u2014 refusing to default to bolt://localhost:7687"
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
const user = process.env.NEO4J_USER ?? "neo4j";
|
|
41
|
+
const password = readPassword();
|
|
42
|
+
console.error(`[ui/neo4j-store] resolved neo4j_uri=${uri}`);
|
|
43
|
+
driver = neo4j.driver(uri, neo4j.auth.basic(user, password), {
|
|
44
|
+
maxConnectionPoolSize: 5
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
return driver;
|
|
48
|
+
}
|
|
49
|
+
function getSession() {
|
|
50
|
+
return getDriver().session();
|
|
51
|
+
}
|
|
52
|
+
async function runAdminUserSelfHeal(args) {
|
|
53
|
+
const { selfHealAdminUser } = await import("./adminuser-self-heal-QAWOZ3JV.js");
|
|
54
|
+
return selfHealAdminUser({ driver: getDriver(), ...args });
|
|
55
|
+
}
|
|
56
|
+
process.on("SIGINT", async () => {
|
|
57
|
+
if (driver) {
|
|
58
|
+
await driver.close();
|
|
59
|
+
driver = null;
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
var OLLAMA_URL = process.env.OLLAMA_URL ?? "http://localhost:11434";
|
|
63
|
+
var EMBED_MODEL = process.env.EMBED_MODEL ?? "nomic-embed-text";
|
|
64
|
+
async function embed(text) {
|
|
65
|
+
const res = await fetch(`${OLLAMA_URL}/api/embed`, {
|
|
66
|
+
method: "POST",
|
|
67
|
+
headers: { "Content-Type": "application/json" },
|
|
68
|
+
body: JSON.stringify({ model: EMBED_MODEL, input: text }),
|
|
69
|
+
signal: AbortSignal.timeout(5e3)
|
|
70
|
+
});
|
|
71
|
+
if (!res.ok) {
|
|
72
|
+
const body = await res.text();
|
|
73
|
+
throw new Error(`Ollama embedding failed (${res.status}): ${body}`);
|
|
74
|
+
}
|
|
75
|
+
const data = await res.json();
|
|
76
|
+
return data.embeddings[0];
|
|
77
|
+
}
|
|
78
|
+
var sessionStoreRef = null;
|
|
79
|
+
function getCachedConversationId(cacheKey) {
|
|
80
|
+
return sessionStoreRef?.get(cacheKey)?.conversationId;
|
|
81
|
+
}
|
|
82
|
+
function cacheConversationId(cacheKey, conversationId) {
|
|
83
|
+
const session = sessionStoreRef?.get(cacheKey);
|
|
84
|
+
if (session) {
|
|
85
|
+
session.conversationId = conversationId;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
var GREETING_DIRECTIVE = "[New session. Greet the visitor.]";
|
|
89
|
+
var DIRECTIVE_PREFIX = "[New session.";
|
|
90
|
+
async function ensureConversation(accountId, agentType, cacheKey, visitorId, agentSlug, userId, channelOverride, channelAddressOverride) {
|
|
91
|
+
const cached = getCachedConversationId(cacheKey);
|
|
92
|
+
if (cached) return { conversationId: cached, created: false };
|
|
93
|
+
const conversationId = randomUUID();
|
|
94
|
+
const channel = channelOverride ?? (cacheKey.startsWith("whatsapp:") ? "whatsapp" : cacheKey.startsWith("telegram:") ? "telegram" : "webchat");
|
|
95
|
+
const channelAddress = channelAddressOverride ?? (cacheKey.startsWith("whatsapp:") ? cacheKey.slice("whatsapp:".length) : cacheKey.startsWith("telegram:") ? cacheKey.slice("telegram:".length) : conversationId);
|
|
96
|
+
const conversationSublabel = agentType === "admin" ? "AdminConversation" : "PublicConversation";
|
|
97
|
+
const handlerSlug = agentSlug ?? (agentType === "admin" ? "admin" : null);
|
|
98
|
+
const wantsHandledByEdge = !!handlerSlug;
|
|
99
|
+
const handledByClause = wantsHandledByEdge ? `WITH c, created
|
|
100
|
+
OPTIONAL MATCH (a:Agent {accountId: $accountId, slug: $handlerSlug})
|
|
101
|
+
FOREACH (_ IN CASE WHEN a IS NULL THEN [] ELSE [1] END | MERGE (c)-[:HANDLED_BY]->(a))
|
|
102
|
+
RETURN c.conversationId AS conversationId, created AS created, a IS NOT NULL AS handledBy` : `RETURN c.conversationId AS conversationId, created AS created, false AS handledBy`;
|
|
103
|
+
const session = getSession();
|
|
104
|
+
try {
|
|
105
|
+
const result = await session.run(
|
|
106
|
+
`OPTIONAL MATCH (prior:Conversation {accountId: $accountId, channel: $channel, channelAddress: $channelAddress})
|
|
107
|
+
WITH prior, coalesce(prior.conversationId, $conversationId) AS finalConvId, prior IS NULL AS created
|
|
108
|
+
MERGE (c:Conversation {conversationId: finalConvId})
|
|
109
|
+
ON CREATE SET
|
|
110
|
+
c:${conversationSublabel},
|
|
111
|
+
c.accountId = $accountId,
|
|
112
|
+
c.agentType = $agentType,
|
|
113
|
+
c.channel = $channel,
|
|
114
|
+
c.channelAddress = $channelAddress,
|
|
115
|
+
${visitorId ? "c.visitorId = $visitorId," : ""}
|
|
116
|
+
${agentSlug ? "c.agentSlug = $agentSlug," : ""}
|
|
117
|
+
${userId ? "c.userId = $userId," : ""}
|
|
118
|
+
c.createdAt = datetime(),
|
|
119
|
+
c.updatedAt = datetime()
|
|
120
|
+
ON MATCH SET
|
|
121
|
+
c.updatedAt = datetime()
|
|
122
|
+
${handledByClause}`,
|
|
123
|
+
{
|
|
124
|
+
conversationId,
|
|
125
|
+
accountId,
|
|
126
|
+
agentType,
|
|
127
|
+
channel,
|
|
128
|
+
channelAddress,
|
|
129
|
+
...visitorId ? { visitorId } : {},
|
|
130
|
+
...agentSlug ? { agentSlug } : {},
|
|
131
|
+
...handlerSlug ? { handlerSlug } : {},
|
|
132
|
+
...userId ? { userId } : {}
|
|
133
|
+
}
|
|
134
|
+
);
|
|
135
|
+
const id = result.records[0]?.get("conversationId");
|
|
136
|
+
const created = result.records[0]?.get("created") === true;
|
|
137
|
+
if (id) {
|
|
138
|
+
cacheConversationId(cacheKey, id);
|
|
139
|
+
console.error(`[session] ${(/* @__PURE__ */ new Date()).toISOString()} conversation attributed: conversationId=${id.slice(0, 8)}\u2026 userId=${userId ?? "none"} ${agentType}/${accountId.slice(0, 8)}\u2026 sublabel=${conversationSublabel}`);
|
|
140
|
+
if (wantsHandledByEdge) {
|
|
141
|
+
const handled = result.records[0]?.get("handledBy");
|
|
142
|
+
const id8 = id.slice(0, 8);
|
|
143
|
+
if (handled === true) {
|
|
144
|
+
console.error(`[agent-graph] handled-by-write conversationId=${id8} slug=${handlerSlug}`);
|
|
145
|
+
} else {
|
|
146
|
+
console.error(`[agent-graph] handled-by-skip reason=no-agent-node conversationId=${id8} slug=${handlerSlug}`);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
return { conversationId: id ?? null, created };
|
|
151
|
+
} catch (err) {
|
|
152
|
+
console.error(`[persist] ensureConversation failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
153
|
+
return { conversationId: null, created: false };
|
|
154
|
+
} finally {
|
|
155
|
+
await session.close();
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
async function findRecentConversation(visitorId, accountId, agentSlug, maxAgeHours = 24) {
|
|
159
|
+
const session = getSession();
|
|
160
|
+
try {
|
|
161
|
+
const result = await session.run(
|
|
162
|
+
`MATCH (c:Conversation {visitorId: $visitorId, accountId: $accountId, agentType: 'public'})
|
|
163
|
+
WHERE c.agentSlug = $agentSlug
|
|
164
|
+
AND c.updatedAt > datetime() - duration({hours: $maxAgeHours})
|
|
165
|
+
AND NOT c:Trashed
|
|
166
|
+
RETURN c.conversationId AS conversationId
|
|
167
|
+
ORDER BY c.updatedAt DESC
|
|
168
|
+
LIMIT 1`,
|
|
169
|
+
{ visitorId, accountId, agentSlug, maxAgeHours: neo4j.int(maxAgeHours) },
|
|
170
|
+
{ timeout: 2e3 }
|
|
171
|
+
);
|
|
172
|
+
const record = result.records[0];
|
|
173
|
+
if (!record) return null;
|
|
174
|
+
const conversationId = record.get("conversationId");
|
|
175
|
+
if (!conversationId) return null;
|
|
176
|
+
console.log(`[persist] found recent conversation ${conversationId.slice(0, 8)}\u2026 for visitor ${visitorId.slice(0, 8)}\u2026`);
|
|
177
|
+
return { conversationId };
|
|
178
|
+
} catch (err) {
|
|
179
|
+
console.error(`[persist] findRecentConversation failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
180
|
+
return null;
|
|
181
|
+
} finally {
|
|
182
|
+
await session.close();
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
async function findGroupBySlug(groupSlug, accountId) {
|
|
186
|
+
const session = getSession();
|
|
187
|
+
try {
|
|
188
|
+
const result = await session.run(
|
|
189
|
+
`MATCH (c:Conversation {groupSlug: $groupSlug, accountId: $accountId, type: 'group'})
|
|
190
|
+
WHERE NOT c:Trashed
|
|
191
|
+
RETURN c.conversationId AS conversationId, c.groupName AS groupName, c.agentSlug AS agentSlug`,
|
|
192
|
+
{ groupSlug, accountId },
|
|
193
|
+
{ timeout: 2e3 }
|
|
194
|
+
);
|
|
195
|
+
const record = result.records[0];
|
|
196
|
+
if (!record) return null;
|
|
197
|
+
return {
|
|
198
|
+
conversationId: record.get("conversationId"),
|
|
199
|
+
groupName: record.get("groupName"),
|
|
200
|
+
agentSlug: record.get("agentSlug")
|
|
201
|
+
};
|
|
202
|
+
} catch (err) {
|
|
203
|
+
console.error(`[group] findGroupBySlug failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
204
|
+
return null;
|
|
205
|
+
} finally {
|
|
206
|
+
await session.close();
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
async function getGroupParticipants(conversationId) {
|
|
210
|
+
const session = getSession();
|
|
211
|
+
try {
|
|
212
|
+
const result = await session.run(
|
|
213
|
+
`MATCH (p:Person)-[r:PARTICIPATES_IN]->(c:Conversation {conversationId: $conversationId})
|
|
214
|
+
RETURN p.givenName AS givenName, p.familyName AS familyName,
|
|
215
|
+
r.displayName AS displayName, r.joinedAt AS joinedAt, r.visitorId AS visitorId`,
|
|
216
|
+
{ conversationId }
|
|
217
|
+
);
|
|
218
|
+
return result.records.map((r) => ({
|
|
219
|
+
displayName: r.get("displayName") || r.get("givenName"),
|
|
220
|
+
givenName: r.get("givenName"),
|
|
221
|
+
familyName: r.get("familyName"),
|
|
222
|
+
joinedAt: String(r.get("joinedAt")),
|
|
223
|
+
visitorId: r.get("visitorId")
|
|
224
|
+
}));
|
|
225
|
+
} catch (err) {
|
|
226
|
+
console.error(`[group] getGroupParticipants failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
227
|
+
return [];
|
|
228
|
+
} finally {
|
|
229
|
+
await session.close();
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
async function checkGroupMembership(conversationId, visitorId) {
|
|
233
|
+
const session = getSession();
|
|
234
|
+
try {
|
|
235
|
+
const result = await session.run(
|
|
236
|
+
`MATCH (p:Person)-[r:PARTICIPATES_IN]->(c:Conversation {conversationId: $conversationId})
|
|
237
|
+
WHERE r.visitorId = $visitorId
|
|
238
|
+
RETURN r.displayName AS displayName
|
|
239
|
+
LIMIT 1`,
|
|
240
|
+
{ conversationId, visitorId }
|
|
241
|
+
);
|
|
242
|
+
return result.records[0]?.get("displayName") ?? null;
|
|
243
|
+
} catch (err) {
|
|
244
|
+
console.error(`[group] checkGroupMembership failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
245
|
+
return null;
|
|
246
|
+
} finally {
|
|
247
|
+
await session.close();
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
async function bindVisitorToGroup(conversationId, visitorId, personEmail, personPhone) {
|
|
251
|
+
const session = getSession();
|
|
252
|
+
try {
|
|
253
|
+
const result = await session.run(
|
|
254
|
+
`MATCH (p:Person)-[r:PARTICIPATES_IN]->(c:Conversation {conversationId: $conversationId})
|
|
255
|
+
WHERE ($email IS NOT NULL AND p.email = $email)
|
|
256
|
+
OR ($phone IS NOT NULL AND p.telephone = $phone)
|
|
257
|
+
SET r.visitorId = $visitorId
|
|
258
|
+
RETURN r.displayName AS displayName
|
|
259
|
+
LIMIT 1`,
|
|
260
|
+
{
|
|
261
|
+
conversationId,
|
|
262
|
+
visitorId,
|
|
263
|
+
email: personEmail ?? null,
|
|
264
|
+
phone: personPhone ?? null
|
|
265
|
+
}
|
|
266
|
+
);
|
|
267
|
+
const name = result.records[0]?.get("displayName");
|
|
268
|
+
if (name) {
|
|
269
|
+
console.error(`[group] joined id=${conversationId.slice(0, 8)}\u2026 visitor=${visitorId.slice(0, 8)}\u2026`);
|
|
270
|
+
} else {
|
|
271
|
+
console.error(`[group] auth-denied id=${conversationId.slice(0, 8)}\u2026 visitor=${visitorId.slice(0, 8)}\u2026`);
|
|
272
|
+
}
|
|
273
|
+
return name ? { displayName: name } : null;
|
|
274
|
+
} catch (err) {
|
|
275
|
+
console.error(`[group] bindVisitorToGroup failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
276
|
+
return null;
|
|
277
|
+
} finally {
|
|
278
|
+
await session.close();
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
async function getMessagesSince(conversationId, since, limit = 100) {
|
|
282
|
+
const session = getSession();
|
|
283
|
+
try {
|
|
284
|
+
const result = await session.run(
|
|
285
|
+
`MATCH (m:Message)-[:PART_OF]->(c:Conversation {conversationId: $conversationId})
|
|
286
|
+
WHERE m.createdAt > datetime($since)
|
|
287
|
+
RETURN m.messageId AS messageId, m.role AS role, m.content AS content,
|
|
288
|
+
m.senderName AS senderName, m.senderVisitorId AS senderVisitorId,
|
|
289
|
+
m.createdAt AS createdAt
|
|
290
|
+
ORDER BY m.createdAt ASC
|
|
291
|
+
LIMIT $limit`,
|
|
292
|
+
{ conversationId, since, limit: neo4j.int(limit) },
|
|
293
|
+
{ timeout: 3e3 }
|
|
294
|
+
);
|
|
295
|
+
return result.records.map((r) => ({
|
|
296
|
+
messageId: r.get("messageId"),
|
|
297
|
+
role: r.get("role"),
|
|
298
|
+
content: r.get("content"),
|
|
299
|
+
senderName: r.get("senderName"),
|
|
300
|
+
senderVisitorId: r.get("senderVisitorId"),
|
|
301
|
+
createdAt: String(r.get("createdAt"))
|
|
302
|
+
}));
|
|
303
|
+
} catch (err) {
|
|
304
|
+
console.error(`[group] getMessagesSince failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
305
|
+
return [];
|
|
306
|
+
} finally {
|
|
307
|
+
await session.close();
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
async function backfillConversationChannelAddress() {
|
|
311
|
+
const session = getSession();
|
|
312
|
+
try {
|
|
313
|
+
const LEGACY_PROP = "cacheKey";
|
|
314
|
+
const result = await session.run(
|
|
315
|
+
`MATCH (c:Conversation)
|
|
316
|
+
WHERE c.channelAddress IS NULL
|
|
317
|
+
SET c.channel = coalesce(c.channel, CASE
|
|
318
|
+
WHEN c.${LEGACY_PROP} STARTS WITH 'whatsapp:' THEN 'whatsapp'
|
|
319
|
+
WHEN c.${LEGACY_PROP} STARTS WITH 'telegram:' THEN 'telegram'
|
|
320
|
+
ELSE 'webchat'
|
|
321
|
+
END),
|
|
322
|
+
c.channelAddress = CASE
|
|
323
|
+
WHEN c.${LEGACY_PROP} STARTS WITH 'whatsapp:' THEN substring(c.${LEGACY_PROP}, 9)
|
|
324
|
+
WHEN c.${LEGACY_PROP} STARTS WITH 'telegram:' THEN substring(c.${LEGACY_PROP}, 9)
|
|
325
|
+
ELSE coalesce(c.conversationId, c.${LEGACY_PROP})
|
|
326
|
+
END
|
|
327
|
+
RETURN count(c) AS updated`
|
|
328
|
+
);
|
|
329
|
+
const updatedRaw = result.records[0]?.get("updated")?.toNumber?.() ?? result.records[0]?.get("updated") ?? 0;
|
|
330
|
+
const updated = typeof updatedRaw === "number" ? updatedRaw : 0;
|
|
331
|
+
if (updated > 0) {
|
|
332
|
+
console.log(`[session-985] backfill channelAddress: updated ${updated} legacy Conversation rows`);
|
|
333
|
+
} else {
|
|
334
|
+
console.log(`[session-985] backfill channelAddress: no legacy rows needed migration`);
|
|
335
|
+
}
|
|
336
|
+
const dropRes = await session.run(
|
|
337
|
+
`MATCH (c:Conversation)
|
|
338
|
+
WHERE c.${LEGACY_PROP} IS NOT NULL AND c.channelAddress IS NOT NULL
|
|
339
|
+
REMOVE c.${LEGACY_PROP}
|
|
340
|
+
RETURN count(c) AS dropped`
|
|
341
|
+
);
|
|
342
|
+
const droppedRaw = dropRes.records[0]?.get("dropped")?.toNumber?.() ?? dropRes.records[0]?.get("dropped") ?? 0;
|
|
343
|
+
const legacyPropDropped = typeof droppedRaw === "number" ? droppedRaw : 0;
|
|
344
|
+
console.log(`[session-985] cacheKey-property-drop count=${legacyPropDropped}`);
|
|
345
|
+
return { updated, legacyPropDropped };
|
|
346
|
+
} catch (err) {
|
|
347
|
+
console.error(`[session-985] backfillConversationChannelAddress failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
348
|
+
return { updated: 0, legacyPropDropped: 0 };
|
|
349
|
+
} finally {
|
|
350
|
+
await session.close();
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
async function backfillNullUserIdConversations(userId) {
|
|
354
|
+
if (!userId) {
|
|
355
|
+
console.warn(`[session] ${(/* @__PURE__ */ new Date()).toISOString()} backfill: skipped \u2014 no userId provided (no Owner in users.json?)`);
|
|
356
|
+
return 0;
|
|
357
|
+
}
|
|
358
|
+
const session = getSession();
|
|
359
|
+
try {
|
|
360
|
+
const result = await session.run(
|
|
361
|
+
`MATCH (c:Conversation {agentType: 'admin'})
|
|
362
|
+
WHERE c.userId IS NULL
|
|
363
|
+
SET c.userId = $userId
|
|
364
|
+
RETURN count(c) AS updated`,
|
|
365
|
+
{ userId }
|
|
366
|
+
);
|
|
367
|
+
const updated = result.records[0]?.get("updated")?.toNumber?.() ?? result.records[0]?.get("updated") ?? 0;
|
|
368
|
+
if (updated > 0) {
|
|
369
|
+
console.log(`[session] ${(/* @__PURE__ */ new Date()).toISOString()} backfill: set userId on ${updated} admin conversations`);
|
|
370
|
+
} else {
|
|
371
|
+
console.log(`[session] ${(/* @__PURE__ */ new Date()).toISOString()} backfill: no orphaned admin conversations found`);
|
|
372
|
+
}
|
|
373
|
+
return typeof updated === "number" ? updated : 0;
|
|
374
|
+
} catch (err) {
|
|
375
|
+
console.error(`[session] backfillNullUserIdConversations failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
376
|
+
return 0;
|
|
377
|
+
} finally {
|
|
378
|
+
await session.close();
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
var HEX_COLOR_RE = /^#[0-9a-fA-F]{3,8}$/;
|
|
382
|
+
async function fetchBranding(accountId) {
|
|
383
|
+
const session = getSession();
|
|
384
|
+
try {
|
|
385
|
+
const result = await session.run(
|
|
386
|
+
`MATCH (b:LocalBusiness {accountId: $accountId})
|
|
387
|
+
OPTIONAL MATCH (b)-[:HAS_BRAND_ASSET]->(logo:ImageObject {purpose: "logo"})
|
|
388
|
+
OPTIONAL MATCH (b)-[:HAS_BRAND_ASSET]->(icon:ImageObject {purpose: "icon"})
|
|
389
|
+
RETURN b.name AS name,
|
|
390
|
+
b.primaryColor AS primaryColor,
|
|
391
|
+
b.accentColor AS accentColor,
|
|
392
|
+
b.backgroundColor AS backgroundColor,
|
|
393
|
+
b.tagline AS tagline,
|
|
394
|
+
logo.contentUrl AS logoUrl,
|
|
395
|
+
icon.contentUrl AS faviconUrl`,
|
|
396
|
+
{ accountId },
|
|
397
|
+
{ timeout: 2e3 }
|
|
398
|
+
);
|
|
399
|
+
const record = result.records[0];
|
|
400
|
+
if (!record) return null;
|
|
401
|
+
const name = record.get("name");
|
|
402
|
+
if (!name) return null;
|
|
403
|
+
const primaryColor = record.get("primaryColor");
|
|
404
|
+
const accentColor = record.get("accentColor");
|
|
405
|
+
const backgroundColor = record.get("backgroundColor");
|
|
406
|
+
const tagline = record.get("tagline");
|
|
407
|
+
const logoUrl = record.get("logoUrl");
|
|
408
|
+
const faviconUrl = record.get("faviconUrl");
|
|
409
|
+
const hasBranding = primaryColor || accentColor || backgroundColor || tagline || logoUrl || faviconUrl;
|
|
410
|
+
if (!hasBranding) return null;
|
|
411
|
+
const branding = { name };
|
|
412
|
+
if (primaryColor && HEX_COLOR_RE.test(primaryColor)) branding.primaryColor = primaryColor;
|
|
413
|
+
if (accentColor && HEX_COLOR_RE.test(accentColor)) branding.accentColor = accentColor;
|
|
414
|
+
if (backgroundColor && HEX_COLOR_RE.test(backgroundColor)) branding.backgroundColor = backgroundColor;
|
|
415
|
+
if (tagline) branding.tagline = tagline;
|
|
416
|
+
if (logoUrl) branding.logoUrl = logoUrl;
|
|
417
|
+
if (faviconUrl) branding.faviconUrl = faviconUrl;
|
|
418
|
+
console.error(`[branding] resolved for accountId=${accountId.slice(0, 8)}\u2026: primary=${branding.primaryColor ?? "\u2013"} logo=${branding.logoUrl ? "yes" : "no"}`);
|
|
419
|
+
return branding;
|
|
420
|
+
} catch (err) {
|
|
421
|
+
console.error(`[branding] fetchBranding failed for accountId=${accountId.slice(0, 8)}\u2026: ${err instanceof Error ? err.message : String(err)}`);
|
|
422
|
+
return null;
|
|
423
|
+
} finally {
|
|
424
|
+
await session.close();
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
var SUMMARY_MAX_LEN = 200;
|
|
428
|
+
var persistMessageLocks = /* @__PURE__ */ new Map();
|
|
429
|
+
async function persistMessage(conversationId, role, content, accountId, tokens, createdAt, sender, components, attachments) {
|
|
430
|
+
if (!content) return null;
|
|
431
|
+
const messageId = randomUUID();
|
|
432
|
+
const summary = role === "user" ? content.slice(0, SUMMARY_MAX_LEN).trim() : "";
|
|
433
|
+
let embedding = null;
|
|
434
|
+
try {
|
|
435
|
+
embedding = await embed(content);
|
|
436
|
+
} catch (err) {
|
|
437
|
+
console.error(`[persist] Embedding failed, storing without: ${err instanceof Error ? err.message : String(err)}`);
|
|
438
|
+
}
|
|
439
|
+
const prev = persistMessageLocks.get(conversationId);
|
|
440
|
+
const waited = prev !== void 0;
|
|
441
|
+
let release;
|
|
442
|
+
const mine = new Promise((resolve2) => {
|
|
443
|
+
release = resolve2;
|
|
444
|
+
});
|
|
445
|
+
const chained = (prev ?? Promise.resolve()).then(() => mine);
|
|
446
|
+
persistMessageLocks.set(conversationId, chained);
|
|
447
|
+
await prev;
|
|
448
|
+
const session = getSession();
|
|
449
|
+
try {
|
|
450
|
+
const result = await session.run(
|
|
451
|
+
`MATCH (c:Conversation {conversationId: $conversationId})
|
|
452
|
+
OPTIONAL MATCH (tail:Message)-[:PART_OF]->(c)
|
|
453
|
+
WHERE NOT (tail)-[:NEXT]->(:Message)
|
|
454
|
+
AND (tail:UserMessage OR tail:AssistantMessage)
|
|
455
|
+
// Task 857 \u2014 sublabel-scope the tail to the agent-path's own sublabels.
|
|
456
|
+
// Without this, a Task-857 :WhatsAppMessage row (no outgoing :NEXT)
|
|
457
|
+
// would be picked as tail and the agent-path would chain
|
|
458
|
+
// :WhatsAppMessage\u2192:UserMessage, crossing the live-channel chain.
|
|
459
|
+
// The live writer's tail predicate is sublabel-scoped to
|
|
460
|
+
// :WhatsAppMessage; this clause is the matching defence on the
|
|
461
|
+
// agent side. Backward-compatible \u2014 pre-Task-857 graphs only carry
|
|
462
|
+
// UserMessage/AssistantMessage sublabels under :Message.
|
|
463
|
+
// Capture whether THIS write's guard will fire. Read c.summary
|
|
464
|
+
// before the SET so the boolean reflects the pre-state, not the
|
|
465
|
+
// post-state \u2014 a false positive otherwise when a new user message
|
|
466
|
+
// happens to equal an already-set summary (verbatim retry, short
|
|
467
|
+
// catchphrase) and fooled a post-state equality check.
|
|
468
|
+
WITH c, tail, (c.summary IS NULL AND $role = 'user' AND $summary <> '') AS summarySetThisWrite
|
|
469
|
+
CREATE (m:Message:${role === "user" ? "UserMessage" : "AssistantMessage"} {
|
|
470
|
+
messageId: $messageId,
|
|
471
|
+
conversationId: $conversationId,
|
|
472
|
+
accountId: $accountId,
|
|
473
|
+
role: $role,
|
|
474
|
+
content: $content,
|
|
475
|
+
createdAt: ${createdAt ? "datetime($createdAt)" : "datetime()"}
|
|
476
|
+
${embedding ? ", embedding: $embedding" : ""}
|
|
477
|
+
${sender ? ", senderVisitorId: $senderVisitorId, senderName: $senderName" : ""}
|
|
478
|
+
${tokens?.inputTokens != null ? ", inputTokens: $inputTokens" : ""}
|
|
479
|
+
${tokens?.outputTokens != null ? ", outputTokens: $outputTokens" : ""}
|
|
480
|
+
${tokens?.cacheReadTokens != null ? ", cacheReadTokens: $cacheReadTokens" : ""}
|
|
481
|
+
${tokens?.cacheCreationTokens != null ? ", cacheCreationTokens: $cacheCreationTokens" : ""}
|
|
482
|
+
})
|
|
483
|
+
SET c.updatedAt = datetime()
|
|
484
|
+
CREATE (m)-[:PART_OF]->(c)
|
|
485
|
+
FOREACH (prev IN CASE WHEN tail IS NULL THEN [] ELSE [tail] END |
|
|
486
|
+
CREATE (prev)-[:NEXT]->(m)
|
|
487
|
+
)
|
|
488
|
+
FOREACH (_ IN CASE WHEN summarySetThisWrite THEN [1] ELSE [] END |
|
|
489
|
+
SET c.summary = $summary
|
|
490
|
+
)
|
|
491
|
+
FOREACH (comp IN $components |
|
|
492
|
+
CREATE (m)-[:HAS_COMPONENT]->(:Component {
|
|
493
|
+
componentId: comp.componentId,
|
|
494
|
+
conversationId: $conversationId,
|
|
495
|
+
accountId: $accountId,
|
|
496
|
+
messageId: $messageId,
|
|
497
|
+
name: comp.name,
|
|
498
|
+
data: comp.data,
|
|
499
|
+
ordinal: comp.ordinal,
|
|
500
|
+
textOffset: comp.textOffset,
|
|
501
|
+
submitted: false,
|
|
502
|
+
createdAt: datetime(),
|
|
503
|
+
// Task 942 \u2014 store the artefact attachmentId on the :Component
|
|
504
|
+
// itself when this is a PERSISTENT_COMPONENTS write whose disk
|
|
505
|
+
// write succeeded. Field is null for non-persistent / mime-skip
|
|
506
|
+
// / disk-fail components. Lets the audit + backfill scripts
|
|
507
|
+
// read the attachmentId directly off the :Component row instead
|
|
508
|
+
// of re-deriving (the live + heal paths use different sources \u2014
|
|
509
|
+
// sha256(block.id) live, componentId-fallback backfill \u2014 and
|
|
510
|
+
// the audit must match either).
|
|
511
|
+
attachmentId: comp.artefactAttachmentId
|
|
512
|
+
})
|
|
513
|
+
)
|
|
514
|
+
// Task 942 \u2014 for PERSISTENT_COMPONENTS whose disk write succeeded
|
|
515
|
+
// (artefactAttachmentId is non-null), MERGE the sibling
|
|
516
|
+
// :KnowledgeDocument projection AND a :HAS_KNOWLEDGE_DOCUMENT edge
|
|
517
|
+
// from the parent :Message in the same Cypher tx. ON CREATE stamps
|
|
518
|
+
// name+encodingFormat from the live render; ON MATCH only bumps
|
|
519
|
+
// updatedAt so a heal-on-resume re-run cannot clobber an operator's
|
|
520
|
+
// subsequent rename via the knowledge-documents API (eng-review \xA72).
|
|
521
|
+
// The edge makes the projection graph-discoverable from the
|
|
522
|
+
// conversation timeline so file-delete-cascade and conversation
|
|
523
|
+
// cleanup can reach it. FOREACH on the filtered list collapses to a
|
|
524
|
+
// no-op when no component has an attachmentId, preserving the
|
|
525
|
+
// text-only-turn fast path.
|
|
526
|
+
FOREACH (kd IN $knowledgeDocs |
|
|
527
|
+
MERGE (k:KnowledgeDocument {accountId: $accountId, attachmentId: kd.attachmentId})
|
|
528
|
+
ON CREATE SET k.name = kd.title,
|
|
529
|
+
k.encodingFormat = kd.mimeType,
|
|
530
|
+
k.createdAt = datetime(),
|
|
531
|
+
k.updatedAt = datetime()
|
|
532
|
+
ON MATCH SET k.updatedAt = datetime()
|
|
533
|
+
MERGE (m)-[:HAS_KNOWLEDGE_DOCUMENT]->(k)
|
|
534
|
+
)
|
|
535
|
+
FOREACH (att IN $attachments |
|
|
536
|
+
CREATE (m)-[:HAS_ATTACHMENT]->(:Attachment {
|
|
537
|
+
attachmentId: att.attachmentId,
|
|
538
|
+
conversationId: $conversationId,
|
|
539
|
+
accountId: $accountId,
|
|
540
|
+
messageId: $messageId,
|
|
541
|
+
filename: att.filename,
|
|
542
|
+
mimeType: att.mimeType,
|
|
543
|
+
sizeBytes: att.sizeBytes,
|
|
544
|
+
storagePath: att.storagePath,
|
|
545
|
+
ordinal: att.ordinal,
|
|
546
|
+
createdAt: datetime()
|
|
547
|
+
})
|
|
548
|
+
)
|
|
549
|
+
RETURN tail.messageId AS prevMessageId,
|
|
550
|
+
summarySetThisWrite,
|
|
551
|
+
size([(m2:Message)-[:PART_OF]->(c) | m2]) AS chainLen`,
|
|
552
|
+
{
|
|
553
|
+
messageId,
|
|
554
|
+
conversationId,
|
|
555
|
+
accountId,
|
|
556
|
+
role,
|
|
557
|
+
content,
|
|
558
|
+
summary,
|
|
559
|
+
...createdAt ? { createdAt } : {},
|
|
560
|
+
...embedding ? { embedding } : {},
|
|
561
|
+
...sender ? { senderVisitorId: sender.visitorId, senderName: sender.displayName } : {},
|
|
562
|
+
...tokens?.inputTokens != null ? { inputTokens: neo4j.int(tokens.inputTokens) } : {},
|
|
563
|
+
...tokens?.outputTokens != null ? { outputTokens: neo4j.int(tokens.outputTokens) } : {},
|
|
564
|
+
...tokens?.cacheReadTokens != null ? { cacheReadTokens: neo4j.int(tokens.cacheReadTokens) } : {},
|
|
565
|
+
...tokens?.cacheCreationTokens != null ? { cacheCreationTokens: neo4j.int(tokens.cacheCreationTokens) } : {},
|
|
566
|
+
components: (components ?? []).map((comp) => ({
|
|
567
|
+
componentId: comp.componentId,
|
|
568
|
+
name: comp.name,
|
|
569
|
+
data: comp.data,
|
|
570
|
+
ordinal: neo4j.int(comp.ordinal),
|
|
571
|
+
textOffset: neo4j.int(comp.textOffset),
|
|
572
|
+
// Task 942 — null for non-persistent / mime-skip / disk-fail
|
|
573
|
+
// components; the FOREACH stamps this directly onto the
|
|
574
|
+
// :Component row so audit + backfill read attachmentId without
|
|
575
|
+
// re-deriving from componentId.
|
|
576
|
+
artefactAttachmentId: comp.artefactAttachmentId ?? null
|
|
577
|
+
})),
|
|
578
|
+
// Task 942 — :KnowledgeDocument MERGE list. One row per
|
|
579
|
+
// PERSISTENT_COMPONENTS component whose disk write succeeded;
|
|
580
|
+
// text-only / mime-skip / disk-fail components are absent so
|
|
581
|
+
// the FOREACH no-ops on them. attachmentId here matches the
|
|
582
|
+
// value the stream-parser stamped after writeAttachment.
|
|
583
|
+
knowledgeDocs: (components ?? []).filter((comp) => typeof comp.artefactAttachmentId === "string").map((comp) => ({
|
|
584
|
+
attachmentId: comp.artefactAttachmentId,
|
|
585
|
+
title: comp.artefactTitle ?? "",
|
|
586
|
+
mimeType: comp.artefactMimeType ?? ""
|
|
587
|
+
})),
|
|
588
|
+
attachments: (attachments ?? []).map((att) => ({
|
|
589
|
+
attachmentId: att.attachmentId,
|
|
590
|
+
filename: att.filename,
|
|
591
|
+
mimeType: att.mimeType,
|
|
592
|
+
sizeBytes: neo4j.int(att.sizeBytes),
|
|
593
|
+
storagePath: att.storagePath,
|
|
594
|
+
ordinal: neo4j.int(att.ordinal)
|
|
595
|
+
}))
|
|
596
|
+
}
|
|
597
|
+
);
|
|
598
|
+
if (result.records.length === 0) {
|
|
599
|
+
console.error(`[persist] Neo4j write skipped \u2014 conversation not found: ${conversationId.slice(0, 8)}\u2026`);
|
|
600
|
+
return null;
|
|
601
|
+
}
|
|
602
|
+
const record = result.records[0];
|
|
603
|
+
const prevMessageId = record.get("prevMessageId") ?? null;
|
|
604
|
+
const summarySetThisWrite = record.get("summarySetThisWrite") === true;
|
|
605
|
+
const chainLenRaw = record.get("chainLen");
|
|
606
|
+
const chainLen = typeof chainLenRaw === "bigint" ? Number(chainLenRaw) : typeof chainLenRaw?.toNumber === "function" ? chainLenRaw.toNumber() : Number(chainLenRaw ?? 0);
|
|
607
|
+
const messageSublabel = role === "user" ? "UserMessage" : "AssistantMessage";
|
|
608
|
+
console.error(`[neo4j-store] append-message conversationId=${conversationId.slice(0, 8)}\u2026 messageId=${messageId.slice(0, 8)}\u2026 prev=${prevMessageId ? prevMessageId.slice(0, 8) + "\u2026" : "null"} chainLen=${chainLen} waited=${waited} sublabel=${messageSublabel}`);
|
|
609
|
+
if (summarySetThisWrite) {
|
|
610
|
+
console.error(`[neo4j-store] conversation-summary-set conversationId=${conversationId.slice(0, 8)}\u2026 len=${summary.length}`);
|
|
611
|
+
}
|
|
612
|
+
const componentList = components ?? [];
|
|
613
|
+
if (componentList.length > 0) {
|
|
614
|
+
const relsCreated = result.summary.counters.updates().relationshipsCreated;
|
|
615
|
+
const expectedComponentEdges = componentList.length;
|
|
616
|
+
const baseEdges = relsCreated - expectedComponentEdges;
|
|
617
|
+
if (baseEdges < 1) {
|
|
618
|
+
console.error(`[neo4j-store] persist-component WARN conversationId=${conversationId.slice(0, 8)}\u2026 messageId=${messageId.slice(0, 8)}\u2026 relsCreated=${relsCreated} expected\u2265${1 + expectedComponentEdges} \u2014 component edges may not have been created`);
|
|
619
|
+
}
|
|
620
|
+
for (const comp of componentList) {
|
|
621
|
+
console.error(`[neo4j-store] persist-component conversationId=${conversationId.slice(0, 8)}\u2026 messageId=${messageId.slice(0, 8)}\u2026 componentId=${comp.componentId.slice(0, 8)}\u2026 name=${comp.name} dataLen=${comp.data.length} ordinal=${comp.ordinal} textOffset=${comp.textOffset}`);
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
const attachmentList = attachments ?? [];
|
|
625
|
+
if (attachmentList.length > 0) {
|
|
626
|
+
const relsCreated = result.summary.counters.updates().relationshipsCreated;
|
|
627
|
+
const expectedAttachmentEdges = attachmentList.length;
|
|
628
|
+
const expectedComponentEdges = (components ?? []).length;
|
|
629
|
+
const baseEdges = relsCreated - expectedComponentEdges - expectedAttachmentEdges;
|
|
630
|
+
if (baseEdges < 1) {
|
|
631
|
+
console.error(`[neo4j-store] persist-attachment WARN conversationId=${conversationId.slice(0, 8)}\u2026 messageId=${messageId.slice(0, 8)}\u2026 relsCreated=${relsCreated} expected\u2265${1 + expectedComponentEdges + expectedAttachmentEdges} \u2014 attachment edges may not have been created`);
|
|
632
|
+
}
|
|
633
|
+
for (const att of attachmentList) {
|
|
634
|
+
console.error(`[neo4j-store] persist-attachment conversationId=${conversationId.slice(0, 8)}\u2026 messageId=${messageId.slice(0, 8)}\u2026 attachmentId=${att.attachmentId.slice(0, 8)}\u2026 filename=${att.filename} mimeType=${att.mimeType} sizeBytes=${att.sizeBytes} ordinal=${att.ordinal}`);
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
console.error(`[persist] ${(/* @__PURE__ */ new Date()).toISOString()} conversationId=${conversationId.slice(0, 8)}\u2026 role=${role} len=${content.length}${sender ? ` sender=${sender.displayName}` : ""}`);
|
|
638
|
+
return messageId;
|
|
639
|
+
} catch (err) {
|
|
640
|
+
console.error(`[persist] Neo4j write failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
641
|
+
return null;
|
|
642
|
+
} finally {
|
|
643
|
+
release();
|
|
644
|
+
if (persistMessageLocks.get(conversationId) === chained) {
|
|
645
|
+
persistMessageLocks.delete(conversationId);
|
|
646
|
+
}
|
|
647
|
+
await session.close();
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
async function writeTurnFailure(args) {
|
|
651
|
+
const session = getSession();
|
|
652
|
+
try {
|
|
653
|
+
const result = await session.run(
|
|
654
|
+
`MATCH (c:Conversation {conversationId: $conversationId, accountId: $accountId})
|
|
655
|
+
MERGE (c)-[:HAS_FAILURE]->(f:TurnFailure {conversationId: $conversationId, at: datetime($at)})
|
|
656
|
+
ON CREATE SET
|
|
657
|
+
f.mode = $mode,
|
|
658
|
+
f.cacheKey = $cacheKey,
|
|
659
|
+
f.prior_event_count = $priorEventCount,
|
|
660
|
+
f.accountId = $accountId,
|
|
661
|
+
f.receivedAt = datetime()
|
|
662
|
+
RETURN toString(f.at) AS at`,
|
|
663
|
+
{
|
|
664
|
+
conversationId: args.conversationId,
|
|
665
|
+
accountId: args.accountId,
|
|
666
|
+
mode: args.mode,
|
|
667
|
+
at: args.at,
|
|
668
|
+
cacheKey: args.cacheKey,
|
|
669
|
+
priorEventCount: args.priorEventCount
|
|
670
|
+
}
|
|
671
|
+
);
|
|
672
|
+
if (result.records.length === 0) {
|
|
673
|
+
return { ok: false, reason: "cid-not-found" };
|
|
674
|
+
}
|
|
675
|
+
return { ok: true, at: result.records[0].get("at") };
|
|
676
|
+
} catch (err) {
|
|
677
|
+
console.error(`[persist] turn-failure convId=${args.conversationId.slice(0, 8)}\u2026 error=${err instanceof Error ? err.message : String(err)}`);
|
|
678
|
+
return { ok: false, reason: "neo4j" };
|
|
679
|
+
} finally {
|
|
680
|
+
await session.close();
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
async function getAgentSessionIdForConversation(conversationId) {
|
|
684
|
+
const session = getSession();
|
|
685
|
+
try {
|
|
686
|
+
const result = await session.run(
|
|
687
|
+
`MATCH (c:Conversation {conversationId: $conversationId})
|
|
688
|
+
RETURN c.agentSessionId AS agentSessionId`,
|
|
689
|
+
{ conversationId }
|
|
690
|
+
);
|
|
691
|
+
const value = result.records[0]?.get("agentSessionId");
|
|
692
|
+
return typeof value === "string" && value.length > 0 ? value : null;
|
|
693
|
+
} catch (err) {
|
|
694
|
+
console.error(`[persist] agent-session-id read failed convId=${conversationId.slice(0, 8)}\u2026 error=${err instanceof Error ? err.message : String(err)}`);
|
|
695
|
+
return null;
|
|
696
|
+
} finally {
|
|
697
|
+
await session.close();
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
async function getRecentMessages(conversationId, limit = 50) {
|
|
701
|
+
const session = getSession();
|
|
702
|
+
try {
|
|
703
|
+
const result = await session.run(
|
|
704
|
+
`MATCH (tail:Message {conversationId: $conversationId})
|
|
705
|
+
WHERE NOT (tail)-[:NEXT]->(:Message)
|
|
706
|
+
WITH tail ORDER BY tail.createdAt DESC LIMIT 1
|
|
707
|
+
MATCH path = (m:Message)-[:NEXT*0..]->(tail)
|
|
708
|
+
WHERE m.conversationId = $conversationId
|
|
709
|
+
AND length(path) < $limit
|
|
710
|
+
WITH m, length(path) AS depthFromTail
|
|
711
|
+
OPTIONAL MATCH (m)-[:HAS_COMPONENT]->(c:Component)
|
|
712
|
+
WITH m, depthFromTail, c ORDER BY c.ordinal ASC
|
|
713
|
+
WITH m, depthFromTail,
|
|
714
|
+
[comp IN collect(c) WHERE comp IS NOT NULL | comp {.*}] AS components
|
|
715
|
+
OPTIONAL MATCH (m)-[:HAS_ATTACHMENT]->(a:Attachment)
|
|
716
|
+
WITH m, depthFromTail, components, a ORDER BY a.ordinal ASC
|
|
717
|
+
WITH m, depthFromTail, components,
|
|
718
|
+
[att IN collect(a) WHERE att IS NOT NULL | att {.*}] AS attachments
|
|
719
|
+
RETURN m.messageId AS messageId, m.role AS role, m.content AS content,
|
|
720
|
+
m.createdAt AS createdAt, components, attachments
|
|
721
|
+
ORDER BY depthFromTail DESC`,
|
|
722
|
+
{ conversationId, limit: neo4j.int(limit) }
|
|
723
|
+
);
|
|
724
|
+
return result.records.map((r) => {
|
|
725
|
+
const rawComponents = r.get("components") ?? [];
|
|
726
|
+
const components = rawComponents.map((c) => {
|
|
727
|
+
const rawAttachmentId = c.attachmentId;
|
|
728
|
+
const attachmentId = typeof rawAttachmentId === "string" && rawAttachmentId.length > 0 ? rawAttachmentId : void 0;
|
|
729
|
+
return {
|
|
730
|
+
componentId: String(c.componentId ?? ""),
|
|
731
|
+
name: String(c.name ?? ""),
|
|
732
|
+
data: String(c.data ?? ""),
|
|
733
|
+
ordinal: typeof c.ordinal?.toNumber === "function" ? c.ordinal.toNumber() : Number(c.ordinal ?? 0),
|
|
734
|
+
textOffset: typeof c.textOffset?.toNumber === "function" ? c.textOffset.toNumber() : Number(c.textOffset ?? 0),
|
|
735
|
+
submitted: c.submitted === true,
|
|
736
|
+
...attachmentId ? { attachmentId } : {}
|
|
737
|
+
};
|
|
738
|
+
});
|
|
739
|
+
const rawAttachments = r.get("attachments") ?? [];
|
|
740
|
+
const attachments = rawAttachments.map((a) => ({
|
|
741
|
+
attachmentId: String(a.attachmentId ?? ""),
|
|
742
|
+
filename: String(a.filename ?? ""),
|
|
743
|
+
mimeType: String(a.mimeType ?? ""),
|
|
744
|
+
sizeBytes: typeof a.sizeBytes?.toNumber === "function" ? a.sizeBytes.toNumber() : Number(a.sizeBytes ?? 0),
|
|
745
|
+
storagePath: String(a.storagePath ?? ""),
|
|
746
|
+
ordinal: typeof a.ordinal?.toNumber === "function" ? a.ordinal.toNumber() : Number(a.ordinal ?? 0),
|
|
747
|
+
accountId: String(a.accountId ?? "")
|
|
748
|
+
}));
|
|
749
|
+
return {
|
|
750
|
+
messageId: r.get("messageId"),
|
|
751
|
+
role: r.get("role"),
|
|
752
|
+
content: r.get("content"),
|
|
753
|
+
createdAt: String(r.get("createdAt")),
|
|
754
|
+
components,
|
|
755
|
+
attachments
|
|
756
|
+
};
|
|
757
|
+
});
|
|
758
|
+
} catch (err) {
|
|
759
|
+
console.error(`[persist] getRecentMessages failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
760
|
+
return [];
|
|
761
|
+
} finally {
|
|
762
|
+
await session.close();
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
async function verifyConversationOwnership(conversationId, accountId) {
|
|
766
|
+
const session = getSession();
|
|
767
|
+
try {
|
|
768
|
+
const result = await session.run(
|
|
769
|
+
`MATCH (c:Conversation {conversationId: $conversationId, accountId: $accountId})
|
|
770
|
+
RETURN c.conversationId AS id LIMIT 1`,
|
|
771
|
+
{ conversationId, accountId }
|
|
772
|
+
);
|
|
773
|
+
return result.records.length > 0;
|
|
774
|
+
} catch (err) {
|
|
775
|
+
console.error(`[persist] verifyConversationOwnership failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
776
|
+
return false;
|
|
777
|
+
} finally {
|
|
778
|
+
await session.close();
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
async function getConversationOwner(conversationId) {
|
|
782
|
+
const session = getSession();
|
|
783
|
+
try {
|
|
784
|
+
const result = await session.run(
|
|
785
|
+
`MATCH (c:Conversation {conversationId: $conversationId})
|
|
786
|
+
RETURN c.accountId AS accountId, c.userId AS userId LIMIT 1`,
|
|
787
|
+
{ conversationId }
|
|
788
|
+
);
|
|
789
|
+
const record = result.records[0];
|
|
790
|
+
if (!record) return null;
|
|
791
|
+
const accountId = record.get("accountId");
|
|
792
|
+
const userId = record.get("userId");
|
|
793
|
+
if (!accountId) return null;
|
|
794
|
+
return { accountId, userId: userId ?? null };
|
|
795
|
+
} catch (err) {
|
|
796
|
+
console.error(`[persist] getConversationOwner failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
797
|
+
return null;
|
|
798
|
+
} finally {
|
|
799
|
+
await session.close();
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
async function verifyAndGetConversationUpdatedAt(conversationId, accountId) {
|
|
803
|
+
const session = getSession();
|
|
804
|
+
try {
|
|
805
|
+
const result = await session.run(
|
|
806
|
+
`MATCH (c:Conversation {conversationId: $conversationId, accountId: $accountId})
|
|
807
|
+
RETURN toString(c.updatedAt) AS updatedAt LIMIT 1`,
|
|
808
|
+
{ conversationId, accountId }
|
|
809
|
+
);
|
|
810
|
+
const record = result.records[0];
|
|
811
|
+
return record ? record.get("updatedAt") : null;
|
|
812
|
+
} catch (err) {
|
|
813
|
+
console.error(`[persist] verifyAndGetConversationUpdatedAt failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
814
|
+
return null;
|
|
815
|
+
} finally {
|
|
816
|
+
await session.close();
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
var LIST_BACKFILL_CAP = 3;
|
|
820
|
+
async function listAdminSessions(accountId, userId, limit = 20) {
|
|
821
|
+
const session = getSession();
|
|
822
|
+
try {
|
|
823
|
+
const result = await session.run(
|
|
824
|
+
`MATCH (c:Conversation {accountId: $accountId, agentType: 'admin', userId: $userId})
|
|
825
|
+
WHERE NOT c:Trashed
|
|
826
|
+
WITH c
|
|
827
|
+
ORDER BY c.updatedAt DESC
|
|
828
|
+
LIMIT $limit
|
|
829
|
+
CALL {
|
|
830
|
+
WITH c
|
|
831
|
+
OPTIONAL MATCH (m:Message)-[:PART_OF]->(c)
|
|
832
|
+
WHERE m.role = 'user'
|
|
833
|
+
AND c.name IS NULL
|
|
834
|
+
AND NOT (m.content STARTS WITH '[New session.')
|
|
835
|
+
AND NOT (m.content STARTS WITH '{"')
|
|
836
|
+
AND size(m.content) >= 4
|
|
837
|
+
RETURN m.content AS content, m.createdAt AS createdAt
|
|
838
|
+
ORDER BY m.createdAt ASC
|
|
839
|
+
LIMIT 1
|
|
840
|
+
}
|
|
841
|
+
RETURN c.conversationId AS conversationId,
|
|
842
|
+
c.name AS name,
|
|
843
|
+
c.updatedAt AS updatedAt,
|
|
844
|
+
c.channel AS channel,
|
|
845
|
+
content AS firstSubstantiveUserMessage`,
|
|
846
|
+
{ accountId, userId, limit: neo4j.int(limit) }
|
|
847
|
+
);
|
|
848
|
+
const rows = result.records.map((r) => ({
|
|
849
|
+
conversationId: r.get("conversationId"),
|
|
850
|
+
name: r.get("name"),
|
|
851
|
+
updatedAt: String(r.get("updatedAt")),
|
|
852
|
+
channel: r.get("channel"),
|
|
853
|
+
firstSubstantiveUserMessage: r.get("firstSubstantiveUserMessage")
|
|
854
|
+
}));
|
|
855
|
+
let backfillsKicked = 0;
|
|
856
|
+
for (const row of rows) {
|
|
857
|
+
if (backfillsKicked >= LIST_BACKFILL_CAP) break;
|
|
858
|
+
if (row.name !== null) continue;
|
|
859
|
+
const seed = row.firstSubstantiveUserMessage;
|
|
860
|
+
if (!seed || !isMessageUseful(seed)) continue;
|
|
861
|
+
backfillsKicked++;
|
|
862
|
+
autoLabelSession(row.conversationId, seed).catch(() => {
|
|
863
|
+
});
|
|
864
|
+
}
|
|
865
|
+
return rows.map(({ conversationId, name, updatedAt, channel }) => ({ conversationId, name, updatedAt, channel }));
|
|
866
|
+
} catch (err) {
|
|
867
|
+
console.error(`[persist] listAdminSessions failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
868
|
+
return [];
|
|
869
|
+
} finally {
|
|
870
|
+
await session.close();
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
async function deleteConversation(conversationId) {
|
|
874
|
+
const session = getSession();
|
|
875
|
+
try {
|
|
876
|
+
const result = await session.run(
|
|
877
|
+
`MATCH (c:Conversation {conversationId: $conversationId})
|
|
878
|
+
OPTIONAL MATCH (m:Message)-[:PART_OF]->(c)
|
|
879
|
+
OPTIONAL MATCH (m)-[:HAS_COMPONENT]->(comp:Component)
|
|
880
|
+
OPTIONAL MATCH (m)-[:HAS_ATTACHMENT]->(att:Attachment)
|
|
881
|
+
DETACH DELETE att, comp, m, c
|
|
882
|
+
RETURN count(c) AS deleted`,
|
|
883
|
+
{ conversationId }
|
|
884
|
+
);
|
|
885
|
+
const deleted = result.records[0]?.get("deleted");
|
|
886
|
+
const count = typeof deleted === "object" && deleted !== null ? Number(deleted) : Number(deleted ?? 0);
|
|
887
|
+
console.error(`[persist] deleteConversation ${conversationId.slice(0, 8)}\u2026: ${count > 0 ? "deleted" : "not found"}`);
|
|
888
|
+
return count > 0;
|
|
889
|
+
} catch (err) {
|
|
890
|
+
console.error(`[persist] deleteConversation failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
891
|
+
return false;
|
|
892
|
+
} finally {
|
|
893
|
+
await session.close();
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
var GENERIC_MESSAGE = /^(h(i|ello|ey|owdy)|yo|sup|thanks|thank you|ok|okay|yes|no|good\s*(morning|afternoon|evening|night)|greetings|what'?s\s*up)[\s!?.,:;]*$/i;
|
|
897
|
+
var SESSION_LABEL_MSG_CAP = 500;
|
|
898
|
+
var SESSION_LABEL_TIMEOUT_MS = 15e3;
|
|
899
|
+
var SESSION_LABEL_MODEL = HAIKU_MODEL;
|
|
900
|
+
var SESSION_LABEL_MAX_WORDS = 6;
|
|
901
|
+
var SESSION_LABEL_MAX_ATTEMPTS = 3;
|
|
902
|
+
var SESSION_LABEL_MAX_STDERR = 2048;
|
|
903
|
+
function isMessageUseful(message) {
|
|
904
|
+
const trimmed = message.trim();
|
|
905
|
+
if (trimmed.length < 4) return false;
|
|
906
|
+
if (trimmed.startsWith('{"')) return false;
|
|
907
|
+
if (GENERIC_MESSAGE.test(trimmed)) return false;
|
|
908
|
+
if (trimmed.startsWith(DIRECTIVE_PREFIX)) return false;
|
|
909
|
+
return true;
|
|
910
|
+
}
|
|
911
|
+
function totalFailures(f) {
|
|
912
|
+
return f.skip + f.error;
|
|
913
|
+
}
|
|
914
|
+
function failureBreakdown(f) {
|
|
915
|
+
return `skip:${f.skip} error:${f.error}`;
|
|
916
|
+
}
|
|
917
|
+
var labelAccumulator = /* @__PURE__ */ new Map();
|
|
918
|
+
var _spawnOverride = null;
|
|
919
|
+
var SESSION_LABEL_SYSTEM = `You are a session labeler. Given the opening messages of a conversation with an AI assistant, produce a concise topic label.
|
|
920
|
+
|
|
921
|
+
Rules:
|
|
922
|
+
- Exactly 3 to 6 words
|
|
923
|
+
- Summarize the user's intent, do not copy verbatim
|
|
924
|
+
- Capitalize the first word only (sentence case)
|
|
925
|
+
- No punctuation, no quotes
|
|
926
|
+
- You MUST always produce a label. Vague, terse, or single-word messages still get a best-effort label (e.g. a one-word "hi" or an emoji becomes "Greeting"; an unintelligible fragment becomes "Unstructured note"). Never abstain.`;
|
|
927
|
+
async function generateSessionLabel(messages) {
|
|
928
|
+
const cappedMessages = messages.map((m) => m.slice(0, SESSION_LABEL_MSG_CAP));
|
|
929
|
+
const userContent = cappedMessages.map((m, i) => `Message ${i + 1}: ${m}`).join("\n");
|
|
930
|
+
const prompt = `${SESSION_LABEL_SYSTEM}
|
|
931
|
+
|
|
932
|
+
${userContent}`;
|
|
933
|
+
const args = [
|
|
934
|
+
"--print",
|
|
935
|
+
"--model",
|
|
936
|
+
SESSION_LABEL_MODEL,
|
|
937
|
+
"--max-turns",
|
|
938
|
+
"1",
|
|
939
|
+
"--permission-mode",
|
|
940
|
+
"dontAsk",
|
|
941
|
+
prompt
|
|
942
|
+
];
|
|
943
|
+
return new Promise((resolve2) => {
|
|
944
|
+
let stdout = "";
|
|
945
|
+
let stderr = "";
|
|
946
|
+
const spawnFn = _spawnOverride ?? spawn;
|
|
947
|
+
const proc = spawnFn("claude", args, {
|
|
948
|
+
stdio: ["ignore", "pipe", "pipe"]
|
|
949
|
+
});
|
|
950
|
+
proc.stdout?.on("data", (chunk) => {
|
|
951
|
+
stdout += chunk.toString("utf-8");
|
|
952
|
+
});
|
|
953
|
+
proc.stderr?.on("data", (chunk) => {
|
|
954
|
+
if (stderr.length < SESSION_LABEL_MAX_STDERR) {
|
|
955
|
+
stderr += chunk.toString("utf-8").slice(0, SESSION_LABEL_MAX_STDERR - stderr.length);
|
|
956
|
+
}
|
|
957
|
+
});
|
|
958
|
+
const timer = setTimeout(() => {
|
|
959
|
+
proc.kill("SIGTERM");
|
|
960
|
+
console.error("[persist] autoLabel: haiku subprocess timed out");
|
|
961
|
+
resolve2(null);
|
|
962
|
+
}, SESSION_LABEL_TIMEOUT_MS);
|
|
963
|
+
proc.on("error", (err) => {
|
|
964
|
+
clearTimeout(timer);
|
|
965
|
+
console.error(`[persist] autoLabel: subprocess error \u2014 ${err.message}`);
|
|
966
|
+
resolve2(null);
|
|
967
|
+
});
|
|
968
|
+
proc.on("close", (code) => {
|
|
969
|
+
clearTimeout(timer);
|
|
970
|
+
if (code !== 0) {
|
|
971
|
+
console.error(`[persist] autoLabel: subprocess exited code=${code}${stderr ? ` stderr=${stderr.trim().slice(0, 200)}` : ""}`);
|
|
972
|
+
resolve2(null);
|
|
973
|
+
return;
|
|
974
|
+
}
|
|
975
|
+
const text = stdout.trim();
|
|
976
|
+
if (!text) {
|
|
977
|
+
console.error("[persist] autoLabel: haiku returned empty response");
|
|
978
|
+
resolve2(null);
|
|
979
|
+
return;
|
|
980
|
+
}
|
|
981
|
+
const words = text.split(/\s+/).slice(0, SESSION_LABEL_MAX_WORDS);
|
|
982
|
+
const label = words.join(" ");
|
|
983
|
+
console.error(`[persist] autoLabel: haiku response="${label}"`);
|
|
984
|
+
resolve2(label);
|
|
985
|
+
});
|
|
986
|
+
});
|
|
987
|
+
}
|
|
988
|
+
async function autoLabelSession(conversationId, userMessage) {
|
|
989
|
+
if (!conversationId) return;
|
|
990
|
+
if (!isMessageUseful(userMessage)) {
|
|
991
|
+
const trimmed = userMessage.trim();
|
|
992
|
+
const reason = trimmed.startsWith('{"') ? "JSON envelope" : trimmed.startsWith(DIRECTIVE_PREFIX) ? "directive" : GENERIC_MESSAGE.test(trimmed) ? "greeting" : trimmed.length < 4 ? "too short" : "directive";
|
|
993
|
+
console.error(`[persist] autoLabel: skipped ${conversationId.slice(0, 8)}\u2026 \u2014 ${reason}`);
|
|
994
|
+
return;
|
|
995
|
+
}
|
|
996
|
+
try {
|
|
997
|
+
const preCheck = getSession();
|
|
998
|
+
try {
|
|
999
|
+
const res = await preCheck.run(
|
|
1000
|
+
`MATCH (c:Conversation {conversationId: $conversationId})
|
|
1001
|
+
OPTIONAL MATCH (m:Message)-[:PART_OF]->(c)
|
|
1002
|
+
WHERE m.role = 'user'
|
|
1003
|
+
WITH c, count(m) AS userCount
|
|
1004
|
+
RETURN c.name AS name, userCount`,
|
|
1005
|
+
{ conversationId }
|
|
1006
|
+
);
|
|
1007
|
+
const firstRecord = res.records[0];
|
|
1008
|
+
const existingName = firstRecord?.get("name");
|
|
1009
|
+
const userCountRaw = firstRecord?.get("userCount");
|
|
1010
|
+
const userCount = typeof userCountRaw === "object" && userCountRaw !== null ? Number(userCountRaw) : Number(userCountRaw ?? 0);
|
|
1011
|
+
if (existingName) {
|
|
1012
|
+
console.error(`[persist] autoLabel: already named ${conversationId.slice(0, 8)}\u2026 \u2014 skipping`);
|
|
1013
|
+
labelAccumulator.delete(conversationId);
|
|
1014
|
+
return;
|
|
1015
|
+
}
|
|
1016
|
+
if (userCount > 3) {
|
|
1017
|
+
console.error(`[persist] autoLabel: past autolabel window ${conversationId.slice(0, 8)}\u2026 \u2014 userCount=${userCount}, skipping`);
|
|
1018
|
+
labelAccumulator.delete(conversationId);
|
|
1019
|
+
return;
|
|
1020
|
+
}
|
|
1021
|
+
} finally {
|
|
1022
|
+
await preCheck.close();
|
|
1023
|
+
}
|
|
1024
|
+
} catch (err) {
|
|
1025
|
+
console.error(`[persist] autoLabel: pre-check read failed for ${conversationId.slice(0, 8)}\u2026 \u2014 proceeding: ${err instanceof Error ? err.message : String(err)}`);
|
|
1026
|
+
}
|
|
1027
|
+
let entry = labelAccumulator.get(conversationId);
|
|
1028
|
+
if (!entry) {
|
|
1029
|
+
entry = {
|
|
1030
|
+
messages: [],
|
|
1031
|
+
pending: false,
|
|
1032
|
+
failures: { skip: 0, error: 0 }
|
|
1033
|
+
};
|
|
1034
|
+
labelAccumulator.set(conversationId, entry);
|
|
1035
|
+
}
|
|
1036
|
+
if (totalFailures(entry.failures) >= SESSION_LABEL_MAX_ATTEMPTS) {
|
|
1037
|
+
console.error(`[persist] autoLabel: evicted ${conversationId.slice(0, 8)}\u2026 after ${SESSION_LABEL_MAX_ATTEMPTS} failed-attempts (${failureBreakdown(entry.failures)})`);
|
|
1038
|
+
labelAccumulator.delete(conversationId);
|
|
1039
|
+
return;
|
|
1040
|
+
}
|
|
1041
|
+
entry.messages.push(userMessage.trim());
|
|
1042
|
+
if (entry.pending) {
|
|
1043
|
+
console.error(`[persist] autoLabel: accumulated for ${conversationId.slice(0, 8)}\u2026 (pending, ${entry.messages.length} msgs)`);
|
|
1044
|
+
return;
|
|
1045
|
+
}
|
|
1046
|
+
entry.pending = true;
|
|
1047
|
+
try {
|
|
1048
|
+
const label = await generateSessionLabel(entry.messages);
|
|
1049
|
+
if (!label) {
|
|
1050
|
+
entry.failures.skip++;
|
|
1051
|
+
console.error(`[persist] autoLabel: generateSessionLabel returned null for ${conversationId.slice(0, 8)}\u2026 (failures ${failureBreakdown(entry.failures)}, ${entry.messages.length} msgs)`);
|
|
1052
|
+
entry.pending = false;
|
|
1053
|
+
return;
|
|
1054
|
+
}
|
|
1055
|
+
const fullLabel = `${label} \xB7 ${conversationId.slice(0, 8)}`;
|
|
1056
|
+
let embedding = null;
|
|
1057
|
+
try {
|
|
1058
|
+
embedding = await embed(fullLabel);
|
|
1059
|
+
} catch (err) {
|
|
1060
|
+
console.error(`[persist] Conversation embedding failed, labelling without: ${err instanceof Error ? err.message : String(err)}`);
|
|
1061
|
+
}
|
|
1062
|
+
const session = getSession();
|
|
1063
|
+
try {
|
|
1064
|
+
const result = await session.run(
|
|
1065
|
+
`MATCH (c:Conversation {conversationId: $conversationId})
|
|
1066
|
+
WHERE c.name IS NULL
|
|
1067
|
+
WITH c
|
|
1068
|
+
OPTIONAL MATCH (m:Message)-[:PART_OF]->(c)
|
|
1069
|
+
WHERE m.role = 'user'
|
|
1070
|
+
WITH c, count(m) AS userCount
|
|
1071
|
+
WHERE userCount <= 3
|
|
1072
|
+
SET c.name = $label, c.updatedAt = datetime()
|
|
1073
|
+
${embedding ? ", c.embedding = $embedding" : ""}
|
|
1074
|
+
RETURN c.name AS name`,
|
|
1075
|
+
{ conversationId, label: fullLabel, ...embedding ? { embedding } : {} }
|
|
1076
|
+
);
|
|
1077
|
+
if (result.records.length > 0) {
|
|
1078
|
+
console.error(`[persist] autoLabel: commit ${conversationId.slice(0, 8)}\u2026 name="${fullLabel}"${embedding ? " (embedded)" : ""}`);
|
|
1079
|
+
labelAccumulator.delete(conversationId);
|
|
1080
|
+
} else {
|
|
1081
|
+
console.error(`[persist] autoLabel: no-op commit ${conversationId.slice(0, 8)}\u2026 (name already set or userCount>3)`);
|
|
1082
|
+
labelAccumulator.delete(conversationId);
|
|
1083
|
+
}
|
|
1084
|
+
} catch (err) {
|
|
1085
|
+
entry.failures.error++;
|
|
1086
|
+
console.error(`[persist] autoLabelSession failed: ${err instanceof Error ? err.message : String(err)} (failures ${failureBreakdown(entry.failures)})`);
|
|
1087
|
+
} finally {
|
|
1088
|
+
await session.close();
|
|
1089
|
+
}
|
|
1090
|
+
} catch (err) {
|
|
1091
|
+
const currentEntry = labelAccumulator.get(conversationId);
|
|
1092
|
+
if (currentEntry) currentEntry.failures.error++;
|
|
1093
|
+
console.error(`[persist] autoLabel: unexpected error \u2014 ${err instanceof Error ? err.message : String(err)}${currentEntry ? ` (failures ${failureBreakdown(currentEntry.failures)})` : ""}`);
|
|
1094
|
+
} finally {
|
|
1095
|
+
const currentEntry = labelAccumulator.get(conversationId);
|
|
1096
|
+
if (currentEntry) currentEntry.pending = false;
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
async function renameConversation(conversationId, label) {
|
|
1100
|
+
let embedding = null;
|
|
1101
|
+
try {
|
|
1102
|
+
embedding = await embed(label);
|
|
1103
|
+
} catch (err) {
|
|
1104
|
+
console.error(`[persist] manual-label: embedding failed, persisting without: ${err instanceof Error ? err.message : String(err)}`);
|
|
1105
|
+
}
|
|
1106
|
+
const session = getSession();
|
|
1107
|
+
try {
|
|
1108
|
+
await session.run(
|
|
1109
|
+
`MATCH (c:Conversation {conversationId: $conversationId})
|
|
1110
|
+
SET c.name = $label, c.updatedAt = datetime()
|
|
1111
|
+
${embedding ? ", c.embedding = $embedding" : ""}`,
|
|
1112
|
+
{ conversationId, label, ...embedding ? { embedding } : {} }
|
|
1113
|
+
);
|
|
1114
|
+
console.error(`[persist] manual-label: renamed ${conversationId} to "${label}"${embedding ? " (embedded)" : ""}`);
|
|
1115
|
+
} finally {
|
|
1116
|
+
await session.close();
|
|
1117
|
+
}
|
|
1118
|
+
}
|
|
1119
|
+
async function getUserTimezone(accountId, userId) {
|
|
1120
|
+
const session = getSession();
|
|
1121
|
+
try {
|
|
1122
|
+
const query = userId ? `MATCH (up:UserProfile {accountId: $accountId, userId: $userId})
|
|
1123
|
+
RETURN up.timezone AS timezone` : `MATCH (up:UserProfile {accountId: $accountId})
|
|
1124
|
+
RETURN up.timezone AS timezone ORDER BY up.createdAt LIMIT 1`;
|
|
1125
|
+
const result = await session.run(query, { accountId, userId: userId ?? "" });
|
|
1126
|
+
if (result.records.length === 0) return null;
|
|
1127
|
+
const tz = result.records[0].get("timezone");
|
|
1128
|
+
return tz && tz.trim().length > 0 ? tz : null;
|
|
1129
|
+
} catch (err) {
|
|
1130
|
+
console.error(`[datetime] getUserTimezone failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
1131
|
+
return null;
|
|
1132
|
+
} finally {
|
|
1133
|
+
await session.close();
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
async function loadAdminUserName(accountId, userId) {
|
|
1137
|
+
const session = getSession();
|
|
1138
|
+
try {
|
|
1139
|
+
const result = await session.run(
|
|
1140
|
+
`MATCH (au:AdminUser {userId: $userId})-[:OWNS]->(p:Person {accountId: $accountId})
|
|
1141
|
+
RETURN p.givenName AS givenName, p.familyName AS familyName, p.avatar AS avatar
|
|
1142
|
+
LIMIT 1`,
|
|
1143
|
+
{ accountId, userId }
|
|
1144
|
+
);
|
|
1145
|
+
if (result.records.length === 0) {
|
|
1146
|
+
return { source: "fallback", reason: "no-person-node" };
|
|
1147
|
+
}
|
|
1148
|
+
const givenName = result.records[0].get("givenName");
|
|
1149
|
+
const familyName = result.records[0].get("familyName");
|
|
1150
|
+
const avatar = result.records[0].get("avatar");
|
|
1151
|
+
if (!givenName || givenName.trim().length === 0) {
|
|
1152
|
+
return { source: "fallback", reason: "no-givenName" };
|
|
1153
|
+
}
|
|
1154
|
+
const trimmedFamily = familyName && familyName.trim().length > 0 ? familyName.trim() : null;
|
|
1155
|
+
const trimmedAvatar = avatar && avatar.trim().length > 0 ? avatar.trim() : null;
|
|
1156
|
+
const joined = trimmedFamily ? `${givenName.trim()} ${trimmedFamily}` : givenName.trim();
|
|
1157
|
+
return { source: "neo4j", joined, givenName: givenName.trim(), familyName: trimmedFamily, avatar: trimmedAvatar };
|
|
1158
|
+
} catch (err) {
|
|
1159
|
+
console.error(`[admin-identity] loadAdminUserName failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
1160
|
+
return { source: "fallback", reason: "neo4j-unreachable" };
|
|
1161
|
+
} finally {
|
|
1162
|
+
await session.close();
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1165
|
+
async function writeAdminUserAndPerson(params) {
|
|
1166
|
+
const { userId, fullName, accountId } = params;
|
|
1167
|
+
const trimmed = fullName.trim();
|
|
1168
|
+
if (!trimmed) {
|
|
1169
|
+
throw new Error("writeAdminUserAndPerson: fullName cannot be empty");
|
|
1170
|
+
}
|
|
1171
|
+
const firstSpace = trimmed.search(/\s/);
|
|
1172
|
+
const givenName = firstSpace === -1 ? trimmed : trimmed.slice(0, firstSpace).trim();
|
|
1173
|
+
const familyName = firstSpace === -1 ? null : trimmed.slice(firstSpace + 1).trim() || null;
|
|
1174
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
1175
|
+
const session = getSession();
|
|
1176
|
+
try {
|
|
1177
|
+
const result = await session.run(
|
|
1178
|
+
`MERGE (au:AdminUser {userId: $userId})
|
|
1179
|
+
ON CREATE SET au.name = $fullName, au.createdAt = $now
|
|
1180
|
+
ON MATCH SET au.name = $fullName, au.updatedAt = $now
|
|
1181
|
+
WITH au
|
|
1182
|
+
|
|
1183
|
+
// Case-insensitive Person reuse: same accountId, same givenName, same familyName
|
|
1184
|
+
// (null/empty familyName collapsed to '' so 'Joel' does NOT match 'Joel Smalley').
|
|
1185
|
+
OPTIONAL MATCH (existingPerson:Person {accountId: $accountId})
|
|
1186
|
+
WHERE toLower(existingPerson.givenName) = toLower($givenName)
|
|
1187
|
+
AND coalesce(toLower(existingPerson.familyName), '') = coalesce(toLower($familyName), '')
|
|
1188
|
+
WITH au, existingPerson
|
|
1189
|
+
|
|
1190
|
+
CALL {
|
|
1191
|
+
WITH au, existingPerson
|
|
1192
|
+
WITH au, existingPerson WHERE existingPerson IS NOT NULL
|
|
1193
|
+
MERGE (au)-[:OWNS]->(existingPerson)
|
|
1194
|
+
RETURN existingPerson AS p, true AS reused
|
|
1195
|
+
UNION
|
|
1196
|
+
WITH au, existingPerson
|
|
1197
|
+
WITH au WHERE existingPerson IS NULL
|
|
1198
|
+
CREATE (newPerson:Person {
|
|
1199
|
+
accountId: $accountId,
|
|
1200
|
+
givenName: $givenName,
|
|
1201
|
+
familyName: $familyName,
|
|
1202
|
+
role: 'admin-personal',
|
|
1203
|
+
scope: 'admin',
|
|
1204
|
+
createdAt: $now
|
|
1205
|
+
})
|
|
1206
|
+
MERGE (au)-[:OWNS]->(newPerson)
|
|
1207
|
+
RETURN newPerson AS p, false AS reused
|
|
1208
|
+
}
|
|
1209
|
+
RETURN reused, elementId(p) AS personElementId,
|
|
1210
|
+
p.givenName AS givenName, p.familyName AS familyName`,
|
|
1211
|
+
{ userId, fullName: trimmed, accountId, givenName, familyName, now }
|
|
1212
|
+
);
|
|
1213
|
+
if (result.records.length === 0) {
|
|
1214
|
+
throw new Error("writeAdminUserAndPerson: no record returned");
|
|
1215
|
+
}
|
|
1216
|
+
const record = result.records[0];
|
|
1217
|
+
return {
|
|
1218
|
+
personReused: record.get("reused"),
|
|
1219
|
+
personElementId: record.get("personElementId"),
|
|
1220
|
+
givenName: record.get("givenName"),
|
|
1221
|
+
familyName: record.get("familyName")
|
|
1222
|
+
};
|
|
1223
|
+
} finally {
|
|
1224
|
+
await session.close();
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
var PROFILE_FIELD_TEMPLATES = {
|
|
1228
|
+
communication: [
|
|
1229
|
+
"preferredChannel",
|
|
1230
|
+
"quietHours",
|
|
1231
|
+
"responseLatencyExpectation",
|
|
1232
|
+
"formalityLevel",
|
|
1233
|
+
"escalationPath"
|
|
1234
|
+
],
|
|
1235
|
+
scheduling: [
|
|
1236
|
+
"workdayStartTime",
|
|
1237
|
+
"workdayEndTime",
|
|
1238
|
+
"weekendAvailability",
|
|
1239
|
+
"meetingBlockPreference",
|
|
1240
|
+
"focusBlockTiming"
|
|
1241
|
+
],
|
|
1242
|
+
decision: [
|
|
1243
|
+
"riskTolerance",
|
|
1244
|
+
"autonomyBoundary",
|
|
1245
|
+
"evidenceThreshold",
|
|
1246
|
+
"reversibilityPreference",
|
|
1247
|
+
"stakeholderConsultation"
|
|
1248
|
+
],
|
|
1249
|
+
workflow: [
|
|
1250
|
+
"batchingPreference",
|
|
1251
|
+
"taskGranularity",
|
|
1252
|
+
"deepWorkBlocks",
|
|
1253
|
+
"statusUpdateCadence",
|
|
1254
|
+
"toolingChoices"
|
|
1255
|
+
],
|
|
1256
|
+
content: [
|
|
1257
|
+
"outputFormat",
|
|
1258
|
+
"lengthPreference",
|
|
1259
|
+
"citationStyle",
|
|
1260
|
+
"tonality"
|
|
1261
|
+
],
|
|
1262
|
+
interaction: [
|
|
1263
|
+
"addressForm",
|
|
1264
|
+
"humourTolerance",
|
|
1265
|
+
"directnessLevel",
|
|
1266
|
+
"emotionalRegisterPreference"
|
|
1267
|
+
]
|
|
1268
|
+
};
|
|
1269
|
+
var TOTAL_PROFILE_FIELDS = Object.values(PROFILE_FIELD_TEMPLATES).reduce(
|
|
1270
|
+
(n, fs) => n + fs.length,
|
|
1271
|
+
0
|
|
1272
|
+
);
|
|
1273
|
+
var RECENT_FAILURES_TAIL_BYTES = 10 * 1024;
|
|
1274
|
+
async function consumeStep7FlagUI(session, accountId) {
|
|
1275
|
+
const accountDir = resolve(PLATFORM_ROOT, "..", "data/accounts", accountId);
|
|
1276
|
+
const flagPath = resolve(accountDir, "onboarding", "step7-complete");
|
|
1277
|
+
if (!existsSync(flagPath)) return false;
|
|
1278
|
+
let completedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
1279
|
+
try {
|
|
1280
|
+
const raw = readFileSync(flagPath, "utf-8").trim();
|
|
1281
|
+
if (raw) {
|
|
1282
|
+
const parsed = JSON.parse(raw);
|
|
1283
|
+
if (typeof parsed.completedAt === "string") {
|
|
1284
|
+
completedAt = parsed.completedAt;
|
|
1285
|
+
}
|
|
1286
|
+
}
|
|
1287
|
+
} catch {
|
|
1288
|
+
}
|
|
1289
|
+
const result = await session.run(
|
|
1290
|
+
`MATCH (o:OnboardingState {accountId: $accountId})
|
|
1291
|
+
SET o.step7CompletedAt = CASE WHEN o.step7CompletedAt IS NULL THEN $completedAt ELSE o.step7CompletedAt END,
|
|
1292
|
+
o.currentStep = CASE WHEN 7 > o.currentStep THEN 7 ELSE o.currentStep END,
|
|
1293
|
+
o.updatedAt = $completedAt
|
|
1294
|
+
RETURN count(o) AS updated`,
|
|
1295
|
+
{ accountId, completedAt }
|
|
1296
|
+
);
|
|
1297
|
+
const updatedRaw = result.records[0]?.get("updated");
|
|
1298
|
+
const updated = typeof updatedRaw === "number" ? updatedRaw : updatedRaw && typeof updatedRaw === "object" && "toNumber" in updatedRaw ? updatedRaw.toNumber() : 0;
|
|
1299
|
+
if (updated === 0) {
|
|
1300
|
+
console.log(
|
|
1301
|
+
`[onboarding-flag-consumed] accountId=${accountId.slice(0, 8)}\u2026 step=7 source=filesystem flagPath=${flagPath} skipped=no-node`
|
|
1302
|
+
);
|
|
1303
|
+
return false;
|
|
1304
|
+
}
|
|
1305
|
+
console.log(
|
|
1306
|
+
`[onboarding-flag-consumed] accountId=${accountId.slice(0, 8)}\u2026 step=7 source=filesystem flagPath=${flagPath} completedAt=${completedAt}`
|
|
1307
|
+
);
|
|
1308
|
+
try {
|
|
1309
|
+
rmSync(flagPath);
|
|
1310
|
+
} catch (err) {
|
|
1311
|
+
console.error(
|
|
1312
|
+
`[onboarding-flag-consumed] warn: failed to delete ${flagPath}: ${err instanceof Error ? err.message : String(err)}`
|
|
1313
|
+
);
|
|
1314
|
+
}
|
|
1315
|
+
return true;
|
|
1316
|
+
}
|
|
1317
|
+
async function loadOnboardingStep(accountId) {
|
|
1318
|
+
const session = getSession();
|
|
1319
|
+
try {
|
|
1320
|
+
await consumeStep7FlagUI(session, accountId);
|
|
1321
|
+
const result = await session.run(
|
|
1322
|
+
`MATCH (o:OnboardingState {accountId: $accountId})
|
|
1323
|
+
RETURN o.currentStep AS currentStep`,
|
|
1324
|
+
{ accountId }
|
|
1325
|
+
);
|
|
1326
|
+
if (result.records.length === 0) {
|
|
1327
|
+
return -1;
|
|
1328
|
+
}
|
|
1329
|
+
const raw = result.records[0].get("currentStep");
|
|
1330
|
+
if (typeof raw === "number") return raw;
|
|
1331
|
+
if (raw && typeof raw === "object" && "toNumber" in raw) {
|
|
1332
|
+
return raw.toNumber();
|
|
1333
|
+
}
|
|
1334
|
+
return 0;
|
|
1335
|
+
} catch (err) {
|
|
1336
|
+
console.error(`[onboarding-inject] loadOnboardingStep failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
1337
|
+
return null;
|
|
1338
|
+
} finally {
|
|
1339
|
+
await session.close();
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1342
|
+
var AGENT_FILE_ROLES = [
|
|
1343
|
+
{ filename: "IDENTITY.md", role: "identity" },
|
|
1344
|
+
{ filename: "SOUL.md", role: "soul" },
|
|
1345
|
+
{ filename: "KNOWLEDGE.md", role: "knowledge" },
|
|
1346
|
+
{ filename: "KNOWLEDGE-SUMMARY.md", role: "knowledge-summary" }
|
|
1347
|
+
];
|
|
1348
|
+
var ROLE_TO_EDGE = {
|
|
1349
|
+
identity: "HAS_IDENTITY",
|
|
1350
|
+
soul: "HAS_SOUL",
|
|
1351
|
+
knowledge: "HAS_KNOWLEDGE",
|
|
1352
|
+
"knowledge-summary": "HAS_KNOWLEDGE"
|
|
1353
|
+
};
|
|
1354
|
+
function assertSafeAgentSlug(slug) {
|
|
1355
|
+
if (!slug || slug.includes("/") || slug.includes("\\") || slug.includes("..")) {
|
|
1356
|
+
throw new Error(`[agent-graph] refusing unsafe slug=${JSON.stringify(slug)}`);
|
|
1357
|
+
}
|
|
1358
|
+
}
|
|
1359
|
+
function agentAttachmentId(accountId, slug, role) {
|
|
1360
|
+
return `agent:${accountId}:${slug}:${role}`;
|
|
1361
|
+
}
|
|
1362
|
+
async function projectAgent(accountId, accountDir, slug) {
|
|
1363
|
+
const start = Date.now();
|
|
1364
|
+
const account8 = accountId.slice(0, 8);
|
|
1365
|
+
try {
|
|
1366
|
+
assertSafeAgentSlug(slug);
|
|
1367
|
+
} catch (err) {
|
|
1368
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
1369
|
+
console.error(
|
|
1370
|
+
`[agent-graph] project FAILED slug=${slug} account=${account8} error="${msg}"`
|
|
1371
|
+
);
|
|
1372
|
+
return;
|
|
1373
|
+
}
|
|
1374
|
+
const agentDir = resolve(accountDir, "agents", slug);
|
|
1375
|
+
const configPath = resolve(agentDir, "config.json");
|
|
1376
|
+
let config;
|
|
1377
|
+
let presentRoles = [];
|
|
1378
|
+
try {
|
|
1379
|
+
if (!existsSync(configPath)) {
|
|
1380
|
+
console.error(
|
|
1381
|
+
`[agent-graph] project FAILED slug=${slug} account=${account8} error="config.json missing at ${configPath}"`
|
|
1382
|
+
);
|
|
1383
|
+
return;
|
|
1384
|
+
}
|
|
1385
|
+
config = JSON.parse(readFileSync(configPath, "utf-8"));
|
|
1386
|
+
for (const { filename, role } of AGENT_FILE_ROLES) {
|
|
1387
|
+
const filePath = resolve(agentDir, filename);
|
|
1388
|
+
if (!existsSync(filePath)) continue;
|
|
1389
|
+
const body = readFileSync(filePath, "utf-8");
|
|
1390
|
+
presentRoles.push({ role, body, edge: ROLE_TO_EDGE[role] });
|
|
1391
|
+
}
|
|
1392
|
+
} catch (err) {
|
|
1393
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
1394
|
+
console.error(
|
|
1395
|
+
`[agent-graph] project FAILED slug=${slug} account=${account8} error="${msg}"`
|
|
1396
|
+
);
|
|
1397
|
+
return;
|
|
1398
|
+
}
|
|
1399
|
+
const session = getSession();
|
|
1400
|
+
try {
|
|
1401
|
+
await session.run(
|
|
1402
|
+
`MERGE (a:Agent {accountId: $accountId, slug: $slug})
|
|
1403
|
+
ON CREATE SET a.createdAt = datetime()
|
|
1404
|
+
SET a.displayName = $displayName,
|
|
1405
|
+
a.status = $status,
|
|
1406
|
+
a.model = $model,
|
|
1407
|
+
a.liveMemory = $liveMemory,
|
|
1408
|
+
a.knowledgeKeywords = $knowledgeKeywords,
|
|
1409
|
+
a.role = 'agent',
|
|
1410
|
+
a.updatedAt = datetime()
|
|
1411
|
+
RETURN a.slug AS slug`,
|
|
1412
|
+
{
|
|
1413
|
+
accountId,
|
|
1414
|
+
slug,
|
|
1415
|
+
displayName: config.displayName ?? slug,
|
|
1416
|
+
status: config.status ?? "unknown",
|
|
1417
|
+
model: config.model ?? "",
|
|
1418
|
+
liveMemory: config.liveMemory ?? false,
|
|
1419
|
+
knowledgeKeywords: config.knowledgeKeywords ?? []
|
|
1420
|
+
}
|
|
1421
|
+
);
|
|
1422
|
+
for (const { role, body, edge } of presentRoles) {
|
|
1423
|
+
const attachmentId = agentAttachmentId(accountId, slug, role);
|
|
1424
|
+
await session.run(
|
|
1425
|
+
`MATCH (a:Agent {accountId: $accountId, slug: $slug})
|
|
1426
|
+
MERGE (k:KnowledgeDocument {attachmentId: $attachmentId})
|
|
1427
|
+
ON CREATE SET k.createdAt = datetime()
|
|
1428
|
+
SET k.accountId = $accountId,
|
|
1429
|
+
k.role = $role,
|
|
1430
|
+
k.name = $name,
|
|
1431
|
+
k.text = $text,
|
|
1432
|
+
k.scope = 'admin',
|
|
1433
|
+
k.updatedAt = datetime()
|
|
1434
|
+
MERGE (a)-[:${edge}]->(k)
|
|
1435
|
+
RETURN k.attachmentId AS attachmentId`,
|
|
1436
|
+
{
|
|
1437
|
+
accountId,
|
|
1438
|
+
slug,
|
|
1439
|
+
attachmentId,
|
|
1440
|
+
role,
|
|
1441
|
+
name: `${slug} ${role}`,
|
|
1442
|
+
text: body
|
|
1443
|
+
}
|
|
1444
|
+
);
|
|
1445
|
+
}
|
|
1446
|
+
const usesResult = await session.run(
|
|
1447
|
+
`MATCH (a:Agent {accountId: $accountId, slug: $slug})
|
|
1448
|
+
MATCH (k:KnowledgeDocument {accountId: $accountId})
|
|
1449
|
+
WHERE $slug IN coalesce(k.agents, [])
|
|
1450
|
+
AND NOT k.attachmentId STARTS WITH $namespacePrefix
|
|
1451
|
+
MERGE (a)-[:USES_KNOWLEDGE]->(k)
|
|
1452
|
+
RETURN count(k) AS uses`,
|
|
1453
|
+
{
|
|
1454
|
+
accountId,
|
|
1455
|
+
slug,
|
|
1456
|
+
namespacePrefix: `agent:${accountId}:${slug}:`
|
|
1457
|
+
}
|
|
1458
|
+
);
|
|
1459
|
+
const uses = usesResult.records[0]?.get("uses");
|
|
1460
|
+
const usesCount = typeof uses === "number" ? uses : uses && typeof uses.toNumber === "function" ? uses.toNumber() : 0;
|
|
1461
|
+
const ms = Date.now() - start;
|
|
1462
|
+
console.error(
|
|
1463
|
+
`[agent-graph] project slug=${slug} account=${account8} docs=${presentRoles.length} uses=${usesCount} ms=${ms}`
|
|
1464
|
+
);
|
|
1465
|
+
} catch (err) {
|
|
1466
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
1467
|
+
console.error(
|
|
1468
|
+
`[agent-graph] project FAILED slug=${slug} account=${account8} error="${msg}"`
|
|
1469
|
+
);
|
|
1470
|
+
throw err;
|
|
1471
|
+
} finally {
|
|
1472
|
+
await session.close();
|
|
1473
|
+
}
|
|
1474
|
+
}
|
|
1475
|
+
async function deleteAgentProjection(accountId, slug) {
|
|
1476
|
+
const start = Date.now();
|
|
1477
|
+
const account8 = accountId.slice(0, 8);
|
|
1478
|
+
assertSafeAgentSlug(slug);
|
|
1479
|
+
const session = getSession();
|
|
1480
|
+
try {
|
|
1481
|
+
await session.run(
|
|
1482
|
+
`MATCH (a:Agent {accountId: $accountId, slug: $slug})
|
|
1483
|
+
DETACH DELETE a
|
|
1484
|
+
WITH 1 AS _
|
|
1485
|
+
UNWIND $attachmentIds AS aid
|
|
1486
|
+
OPTIONAL MATCH (k:KnowledgeDocument {accountId: $accountId, attachmentId: aid})
|
|
1487
|
+
WHERE k.attachmentId STARTS WITH $namespacePrefix
|
|
1488
|
+
DETACH DELETE k`,
|
|
1489
|
+
{
|
|
1490
|
+
accountId,
|
|
1491
|
+
slug,
|
|
1492
|
+
namespacePrefix: `agent:${accountId}:${slug}:`,
|
|
1493
|
+
attachmentIds: ["identity", "soul", "knowledge", "knowledge-summary"].map((role) => agentAttachmentId(accountId, slug, role))
|
|
1494
|
+
}
|
|
1495
|
+
);
|
|
1496
|
+
const ms = Date.now() - start;
|
|
1497
|
+
console.error(
|
|
1498
|
+
`[agent-graph] delete slug=${slug} account=${account8} ms=${ms}`
|
|
1499
|
+
);
|
|
1500
|
+
} catch (err) {
|
|
1501
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
1502
|
+
console.error(
|
|
1503
|
+
`[agent-graph] delete FAILED slug=${slug} account=${account8} error="${msg}"`
|
|
1504
|
+
);
|
|
1505
|
+
throw err;
|
|
1506
|
+
} finally {
|
|
1507
|
+
await session.close();
|
|
1508
|
+
}
|
|
1509
|
+
}
|
|
1510
|
+
|
|
1511
|
+
export {
|
|
1512
|
+
HAIKU_MODEL,
|
|
1513
|
+
getSession,
|
|
1514
|
+
runAdminUserSelfHeal,
|
|
1515
|
+
embed,
|
|
1516
|
+
GREETING_DIRECTIVE,
|
|
1517
|
+
ensureConversation,
|
|
1518
|
+
findRecentConversation,
|
|
1519
|
+
findGroupBySlug,
|
|
1520
|
+
getGroupParticipants,
|
|
1521
|
+
checkGroupMembership,
|
|
1522
|
+
bindVisitorToGroup,
|
|
1523
|
+
getMessagesSince,
|
|
1524
|
+
backfillConversationChannelAddress,
|
|
1525
|
+
backfillNullUserIdConversations,
|
|
1526
|
+
fetchBranding,
|
|
1527
|
+
persistMessage,
|
|
1528
|
+
writeTurnFailure,
|
|
1529
|
+
getAgentSessionIdForConversation,
|
|
1530
|
+
getRecentMessages,
|
|
1531
|
+
verifyConversationOwnership,
|
|
1532
|
+
getConversationOwner,
|
|
1533
|
+
verifyAndGetConversationUpdatedAt,
|
|
1534
|
+
listAdminSessions,
|
|
1535
|
+
deleteConversation,
|
|
1536
|
+
generateSessionLabel,
|
|
1537
|
+
renameConversation,
|
|
1538
|
+
getUserTimezone,
|
|
1539
|
+
loadAdminUserName,
|
|
1540
|
+
writeAdminUserAndPerson,
|
|
1541
|
+
loadOnboardingStep,
|
|
1542
|
+
projectAgent,
|
|
1543
|
+
deleteAgentProjection
|
|
1544
|
+
};
|