@rubytech/create-siteoffice-code 0.1.256
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__/brand-fonts.test.js +102 -0
- package/dist/__tests__/brew-install.test.js +151 -0
- package/dist/__tests__/brew-resolve.test.js +138 -0
- package/dist/__tests__/bundler-rewrite-platform-lib.test.js +68 -0
- package/dist/__tests__/cdp-port-no-silent-fallback.test.js +53 -0
- package/dist/__tests__/claude-ptys-slice.test.js +25 -0
- package/dist/__tests__/cloudflared-slice.test.js +19 -0
- package/dist/__tests__/entitlement-flag.test.js +43 -0
- package/dist/__tests__/init-logging.test.js +85 -0
- package/dist/__tests__/installer-settings-permissions.test.js +112 -0
- package/dist/__tests__/installer-specialist-registration.test.js +116 -0
- package/dist/__tests__/launchd-plist.test.js +195 -0
- package/dist/__tests__/macos-darwin-branch.test.js +85 -0
- package/dist/__tests__/macos-version.test.js +96 -0
- package/dist/__tests__/onboarding-state-readback.test.js +61 -0
- package/dist/__tests__/peer-brand-detect.test.js +103 -0
- package/dist/__tests__/platform-detect.test.js +50 -0
- package/dist/__tests__/platform-port-stamp.test.js +28 -0
- package/dist/__tests__/plugin-install.test.js +123 -0
- package/dist/__tests__/port-canonicalisation.test.js +200 -0
- package/dist/__tests__/preflight-port-classifier.test.js +330 -0
- package/dist/__tests__/premium-bundle-gate.test.js +59 -0
- package/dist/__tests__/premium-mcp-discover.test.js +127 -0
- package/dist/__tests__/rss-sampler-installer.test.js +27 -0
- package/dist/__tests__/samba-provision.test.js +226 -0
- package/dist/__tests__/snap-chromium.test.js +115 -0
- package/dist/__tests__/tier-flag.test.js +53 -0
- package/dist/apt-resolve.js +73 -0
- package/dist/brew-install.js +180 -0
- package/dist/brew-resolve.js +68 -0
- package/dist/bundler-rewrite-platform-lib.js +29 -0
- package/dist/index.js +4048 -0
- package/dist/init-logging.js +28 -0
- package/dist/launchd-plist.js +68 -0
- package/dist/lib/plugin-install.js +110 -0
- package/dist/lib/premium-mcp-discover.js +41 -0
- package/dist/macos-version.js +53 -0
- package/dist/onboarding-readback.js +27 -0
- package/dist/peer-brand-detect.js +39 -0
- package/dist/permissions-seed.js +76 -0
- package/dist/pinned-binaries.js +12 -0
- package/dist/platform-detect.js +36 -0
- package/dist/port-resolution.js +208 -0
- package/dist/preflight-port-classifier.js +222 -0
- package/dist/samba-provision.js +218 -0
- package/dist/snap-chromium.js +88 -0
- package/dist/specialist-registration.js +78 -0
- package/dist/tier-flag.js +85 -0
- package/dist/uninstall.js +947 -0
- package/package.json +35 -0
- package/payload/platform/.docs/search-surface-contract.md +58 -0
- package/payload/platform/config/brand-registry.json +28 -0
- package/payload/platform/config/brand.json +82 -0
- package/payload/platform/docs/superpowers/plans/2026-06-02-task-610-follower-202-retry.md +372 -0
- package/payload/platform/docs/superpowers/plans/2026-06-04-public-agent-knowledge-delivery.md +230 -0
- package/payload/platform/docs/superpowers/specs/2026-06-02-task-610-follower-202-retry-design.md +116 -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/admin-conversation-purge/dist/index.d.ts +54 -0
- package/payload/platform/lib/admin-conversation-purge/dist/index.d.ts.map +1 -0
- package/payload/platform/lib/admin-conversation-purge/dist/index.js +84 -0
- package/payload/platform/lib/admin-conversation-purge/dist/index.js.map +1 -0
- package/payload/platform/lib/admin-conversation-purge/src/index.ts +120 -0
- package/payload/platform/lib/admin-conversation-purge/tsconfig.json +8 -0
- package/payload/platform/lib/admins-write/dist/index.d.ts +86 -0
- package/payload/platform/lib/admins-write/dist/index.d.ts.map +1 -0
- package/payload/platform/lib/admins-write/dist/index.js +245 -0
- package/payload/platform/lib/admins-write/dist/index.js.map +1 -0
- package/payload/platform/lib/admins-write/src/index.ts +305 -0
- package/payload/platform/lib/admins-write/tsconfig.json +8 -0
- package/payload/platform/lib/aeo-llms-txt-writer/dist/index.d.ts +33 -0
- package/payload/platform/lib/aeo-llms-txt-writer/dist/index.d.ts.map +1 -0
- package/payload/platform/lib/aeo-llms-txt-writer/dist/index.js +119 -0
- package/payload/platform/lib/aeo-llms-txt-writer/dist/index.js.map +1 -0
- package/payload/platform/lib/aeo-llms-txt-writer/src/index.ts +172 -0
- package/payload/platform/lib/aeo-llms-txt-writer/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/embed-client/dist/index.d.ts +4 -0
- package/payload/platform/lib/embed-client/dist/index.d.ts.map +1 -0
- package/payload/platform/lib/embed-client/dist/index.js +53 -0
- package/payload/platform/lib/embed-client/dist/index.js.map +1 -0
- package/payload/platform/lib/embed-client/src/index.ts +53 -0
- package/payload/platform/lib/embed-client/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 +845 -0
- package/payload/platform/lib/graph-mcp/dist/index.js.map +1 -0
- package/payload/platform/lib/graph-mcp/dist/schema-cache.d.ts +76 -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 +218 -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 +1074 -0
- package/payload/platform/lib/graph-mcp/src/schema-cache.ts +243 -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/boosts.d.ts +39 -0
- package/payload/platform/lib/graph-search/dist/boosts.d.ts.map +1 -0
- package/payload/platform/lib/graph-search/dist/boosts.js +57 -0
- package/payload/platform/lib/graph-search/dist/boosts.js.map +1 -0
- package/payload/platform/lib/graph-search/dist/dedup.d.ts +29 -0
- package/payload/platform/lib/graph-search/dist/dedup.d.ts.map +1 -0
- package/payload/platform/lib/graph-search/dist/dedup.js +97 -0
- package/payload/platform/lib/graph-search/dist/dedup.js.map +1 -0
- package/payload/platform/lib/graph-search/dist/index.d.ts +355 -0
- package/payload/platform/lib/graph-search/dist/index.d.ts.map +1 -0
- package/payload/platform/lib/graph-search/dist/index.js +864 -0
- package/payload/platform/lib/graph-search/dist/index.js.map +1 -0
- package/payload/platform/lib/graph-search/dist/query-expansion.d.ts +37 -0
- package/payload/platform/lib/graph-search/dist/query-expansion.d.ts.map +1 -0
- package/payload/platform/lib/graph-search/dist/query-expansion.js +101 -0
- package/payload/platform/lib/graph-search/dist/query-expansion.js.map +1 -0
- package/payload/platform/lib/graph-search/dist/route.d.ts +29 -0
- package/payload/platform/lib/graph-search/dist/route.d.ts.map +1 -0
- package/payload/platform/lib/graph-search/dist/route.js +53 -0
- package/payload/platform/lib/graph-search/dist/route.js.map +1 -0
- package/payload/platform/lib/graph-search/dist/rrf-fusion.d.ts +31 -0
- package/payload/platform/lib/graph-search/dist/rrf-fusion.d.ts.map +1 -0
- package/payload/platform/lib/graph-search/dist/rrf-fusion.js +57 -0
- package/payload/platform/lib/graph-search/dist/rrf-fusion.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__/boosts.test.ts +59 -0
- package/payload/platform/lib/graph-search/src/__tests__/brochure-threshold.test.ts +136 -0
- package/payload/platform/lib/graph-search/src/__tests__/dedup.test.ts +83 -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 +357 -0
- package/payload/platform/lib/graph-search/src/__tests__/hybrid.test.ts +355 -0
- package/payload/platform/lib/graph-search/src/__tests__/route.test.ts +62 -0
- package/payload/platform/lib/graph-search/src/__tests__/rrf-fusion.test.ts +39 -0
- package/payload/platform/lib/graph-search/src/__tests__/vector-index-coverage.test.ts +198 -0
- package/payload/platform/lib/graph-search/src/__tests__/vector-threshold.test.ts +170 -0
- package/payload/platform/lib/graph-search/src/boosts.ts +61 -0
- package/payload/platform/lib/graph-search/src/dedup.ts +108 -0
- package/payload/platform/lib/graph-search/src/index.ts +1162 -0
- package/payload/platform/lib/graph-search/src/route.ts +70 -0
- package/payload/platform/lib/graph-search/src/rrf-fusion.ts +62 -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-style/dist/index.d.ts +80 -0
- package/payload/platform/lib/graph-style/dist/index.d.ts.map +1 -0
- package/payload/platform/lib/graph-style/dist/index.js +285 -0
- package/payload/platform/lib/graph-style/dist/index.js.map +1 -0
- package/payload/platform/lib/graph-style/src/__tests__/parity.test.ts +114 -0
- package/payload/platform/lib/graph-style/src/index.ts +299 -0
- package/payload/platform/lib/graph-style/tsconfig.json +9 -0
- package/payload/platform/lib/graph-style/vitest.config.ts +9 -0
- package/payload/platform/lib/graph-trash/dist/index.d.ts +106 -0
- package/payload/platform/lib/graph-trash/dist/index.d.ts.map +1 -0
- package/payload/platform/lib/graph-trash/dist/index.js +340 -0
- package/payload/platform/lib/graph-trash/dist/index.js.map +1 -0
- package/payload/platform/lib/graph-trash/package.json +7 -0
- package/payload/platform/lib/graph-trash/src/index.ts +493 -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 +263 -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 +30 -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 +88 -0
- package/payload/platform/lib/graph-write/dist/conversation-provenance.js.map +1 -0
- package/payload/platform/lib/graph-write/dist/index.d.ts +151 -0
- package/payload/platform/lib/graph-write/dist/index.d.ts.map +1 -0
- package/payload/platform/lib/graph-write/dist/index.js +377 -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 +279 -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 +148 -0
- package/payload/platform/lib/graph-write/src/index.ts +491 -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/package.json +7 -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/package.json +7 -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 +116 -0
- package/payload/platform/lib/oauth-llm/dist/index.d.ts.map +1 -0
- package/payload/platform/lib/oauth-llm/dist/index.js +386 -0
- package/payload/platform/lib/oauth-llm/dist/index.js.map +1 -0
- package/payload/platform/lib/obsidian-parser/dist/index.d.ts +98 -0
- package/payload/platform/lib/obsidian-parser/dist/index.d.ts.map +1 -0
- package/payload/platform/lib/obsidian-parser/dist/index.js +480 -0
- package/payload/platform/lib/obsidian-parser/dist/index.js.map +1 -0
- package/payload/platform/lib/obsidian-parser/src/index.ts +572 -0
- package/payload/platform/lib/obsidian-parser/tsconfig.json +8 -0
- package/payload/platform/lib/persistent-components/dist/index.d.ts +20 -0
- package/payload/platform/lib/persistent-components/dist/index.d.ts.map +1 -0
- package/payload/platform/lib/persistent-components/dist/index.js +31 -0
- package/payload/platform/lib/persistent-components/dist/index.js.map +1 -0
- package/payload/platform/lib/persistent-components/src/index.ts +27 -0
- package/payload/platform/lib/persistent-components/tsconfig.json +8 -0
- package/payload/platform/lib/require-port-env/dist/index.d.ts +31 -0
- package/payload/platform/lib/require-port-env/dist/index.d.ts.map +1 -0
- package/payload/platform/lib/require-port-env/dist/index.js +52 -0
- package/payload/platform/lib/require-port-env/dist/index.js.map +1 -0
- package/payload/platform/lib/require-port-env/src/index.ts +56 -0
- package/payload/platform/lib/require-port-env/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/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 +158 -0
- package/payload/platform/neo4j/schema.cypher +1899 -0
- package/payload/platform/package-lock.json +4060 -0
- package/payload/platform/package.json +26 -0
- package/payload/platform/plugins/.claude-plugin/marketplace.json +158 -0
- package/payload/platform/plugins/admin/.claude-plugin/plugin.json +17 -0
- package/payload/platform/plugins/admin/PLUGIN.md +163 -0
- package/payload/platform/plugins/admin/hooks/__tests__/archive-ingest-surface-gate.test.sh +191 -0
- package/payload/platform/plugins/admin/hooks/__tests__/askuserquestion-investigate-gate.test.sh +176 -0
- package/payload/platform/plugins/admin/hooks/__tests__/hook-emit-stale-lock-ttl.test.sh +102 -0
- package/payload/platform/plugins/admin/hooks/__tests__/hook-emit.test.sh +75 -0
- package/payload/platform/plugins/admin/hooks/__tests__/pin-identity-gate.test.sh +96 -0
- package/payload/platform/plugins/admin/hooks/__tests__/post-tool-use-agent.test.sh +173 -0
- package/payload/platform/plugins/admin/hooks/__tests__/prompt-optimiser-directive.test.sh +70 -0
- package/payload/platform/plugins/admin/hooks/admin-authoring-observer.sh +155 -0
- package/payload/platform/plugins/admin/hooks/archive-ingest-surface-gate.sh +224 -0
- package/payload/platform/plugins/admin/hooks/askuserquestion-investigate-gate.sh +257 -0
- package/payload/platform/plugins/admin/hooks/lib/hook-emit.sh +143 -0
- package/payload/platform/plugins/admin/hooks/lib/maxy-mcp-plugins.txt +16 -0
- package/payload/platform/plugins/admin/hooks/mcp-tool-missing.sh +94 -0
- package/payload/platform/plugins/admin/hooks/pin-identity-gate.sh +136 -0
- package/payload/platform/plugins/admin/hooks/post-tool-use-agent.sh +155 -0
- package/payload/platform/plugins/admin/hooks/prompt-optimiser-directive.sh +52 -0
- package/payload/platform/plugins/admin/hooks/webfetch-preflight.mjs +363 -0
- package/payload/platform/plugins/admin/mcp/dist/__tests__/admin-authoring-skill-gate.test.d.ts +2 -0
- package/payload/platform/plugins/admin/mcp/dist/__tests__/admin-authoring-skill-gate.test.d.ts.map +1 -0
- package/payload/platform/plugins/admin/mcp/dist/__tests__/admin-authoring-skill-gate.test.js +79 -0
- package/payload/platform/plugins/admin/mcp/dist/__tests__/admin-authoring-skill-gate.test.js.map +1 -0
- package/payload/platform/plugins/admin/mcp/dist/__tests__/admin-identity-authenticate.test.d.ts +2 -0
- package/payload/platform/plugins/admin/mcp/dist/__tests__/admin-identity-authenticate.test.d.ts.map +1 -0
- package/payload/platform/plugins/admin/mcp/dist/__tests__/admin-identity-authenticate.test.js +34 -0
- package/payload/platform/plugins/admin/mcp/dist/__tests__/admin-identity-authenticate.test.js.map +1 -0
- package/payload/platform/plugins/admin/mcp/dist/__tests__/capabilities-here.test.d.ts +2 -0
- package/payload/platform/plugins/admin/mcp/dist/__tests__/capabilities-here.test.d.ts.map +1 -0
- package/payload/platform/plugins/admin/mcp/dist/__tests__/capabilities-here.test.js +130 -0
- package/payload/platform/plugins/admin/mcp/dist/__tests__/capabilities-here.test.js.map +1 -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/__tests__/skill-no-prescribed-role.test.d.ts +2 -0
- package/payload/platform/plugins/admin/mcp/dist/__tests__/skill-no-prescribed-role.test.d.ts.map +1 -0
- package/payload/platform/plugins/admin/mcp/dist/__tests__/skill-no-prescribed-role.test.js +50 -0
- package/payload/platform/plugins/admin/mcp/dist/__tests__/skill-no-prescribed-role.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 +3120 -0
- package/payload/platform/plugins/admin/mcp/dist/index.js.map +1 -0
- package/payload/platform/plugins/admin/mcp/dist/lib/catalogue-census.d.ts +14 -0
- package/payload/platform/plugins/admin/mcp/dist/lib/catalogue-census.d.ts.map +1 -0
- package/payload/platform/plugins/admin/mcp/dist/lib/catalogue-census.js +50 -0
- package/payload/platform/plugins/admin/mcp/dist/lib/catalogue-census.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 +44 -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 +187 -0
- package/payload/platform/plugins/admin/mcp/dist/skill-resolution.js.map +1 -0
- package/payload/platform/plugins/admin/mcp/dist/tools/admin-identity-authenticate.d.ts +6 -0
- package/payload/platform/plugins/admin/mcp/dist/tools/admin-identity-authenticate.d.ts.map +1 -0
- package/payload/platform/plugins/admin/mcp/dist/tools/admin-identity-authenticate.js +32 -0
- package/payload/platform/plugins/admin/mcp/dist/tools/admin-identity-authenticate.js.map +1 -0
- package/payload/platform/plugins/admin/mcp/dist/tools/capabilities-here.d.ts +28 -0
- package/payload/platform/plugins/admin/mcp/dist/tools/capabilities-here.d.ts.map +1 -0
- package/payload/platform/plugins/admin/mcp/dist/tools/capabilities-here.js +68 -0
- package/payload/platform/plugins/admin/mcp/dist/tools/capabilities-here.js.map +1 -0
- package/payload/platform/plugins/admin/mcp/dist/tools/publish-site.d.ts +34 -0
- package/payload/platform/plugins/admin/mcp/dist/tools/publish-site.d.ts.map +1 -0
- package/payload/platform/plugins/admin/mcp/dist/tools/publish-site.js +176 -0
- package/payload/platform/plugins/admin/mcp/dist/tools/publish-site.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/publish-site-routing.md +44 -0
- package/payload/platform/plugins/admin/skills/a4-print-documents/SKILL.md +241 -0
- package/payload/platform/plugins/admin/skills/access-manager/SKILL.md +30 -0
- package/payload/platform/plugins/admin/skills/access-manager/references/operations.md +154 -0
- package/payload/platform/plugins/admin/skills/admin-user-management/SKILL.md +49 -0
- package/payload/platform/plugins/admin/skills/business-profile/SKILL.md +53 -0
- package/payload/platform/plugins/admin/skills/capabilities-here/SKILL.md +31 -0
- package/payload/platform/plugins/admin/skills/datetime/SKILL.md +149 -0
- package/payload/platform/plugins/admin/skills/deck-pages/SKILL.md +404 -0
- package/payload/platform/plugins/admin/skills/file-presentation/SKILL.md +47 -0
- package/payload/platform/plugins/admin/skills/insight/SKILL.md +24 -0
- package/payload/platform/plugins/admin/skills/investigate/SKILL.md +318 -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/platform-architecture/SKILL.md +3943 -0
- package/payload/platform/plugins/admin/skills/plugin-management/SKILL.md +99 -0
- package/payload/platform/plugins/admin/skills/professional-document/SKILL.md +178 -0
- package/payload/platform/plugins/admin/skills/public-agent-manager/SKILL.md +256 -0
- package/payload/platform/plugins/admin/skills/publish-site/SKILL.md +42 -0
- package/payload/platform/plugins/admin/skills/qr-code/SKILL.md +36 -0
- package/payload/platform/plugins/admin/skills/qr-code/references/data-formats.md +113 -0
- package/payload/platform/plugins/admin/skills/session-management/SKILL.md +62 -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 +45 -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 +193 -0
- package/payload/platform/plugins/admin/skills/superpowers-sprint/SKILL.md +361 -0
- package/payload/platform/plugins/admin/skills/task/SKILL.md +314 -0
- package/payload/platform/plugins/admin/skills/unzip-attachment/SKILL.md +84 -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 +52 -0
- package/payload/platform/plugins/admin/skills/upgrade/SKILL.md +34 -0
- package/payload/platform/plugins/aeo/.claude-plugin/plugin.json +17 -0
- package/payload/platform/plugins/aeo/PLUGIN.md +80 -0
- package/payload/platform/plugins/aeo/mcp/dist/__tests__/audit-heuristics.test.d.ts +2 -0
- package/payload/platform/plugins/aeo/mcp/dist/__tests__/audit-heuristics.test.d.ts.map +1 -0
- package/payload/platform/plugins/aeo/mcp/dist/__tests__/audit-heuristics.test.js +121 -0
- package/payload/platform/plugins/aeo/mcp/dist/__tests__/audit-heuristics.test.js.map +1 -0
- package/payload/platform/plugins/aeo/mcp/dist/__tests__/schema-mapping.test.d.ts +2 -0
- package/payload/platform/plugins/aeo/mcp/dist/__tests__/schema-mapping.test.d.ts.map +1 -0
- package/payload/platform/plugins/aeo/mcp/dist/__tests__/schema-mapping.test.js +129 -0
- package/payload/platform/plugins/aeo/mcp/dist/__tests__/schema-mapping.test.js.map +1 -0
- package/payload/platform/plugins/aeo/mcp/dist/index.d.ts +2 -0
- package/payload/platform/plugins/aeo/mcp/dist/index.d.ts.map +1 -0
- package/payload/platform/plugins/aeo/mcp/dist/index.js +189 -0
- package/payload/platform/plugins/aeo/mcp/dist/index.js.map +1 -0
- package/payload/platform/plugins/aeo/mcp/dist/lib/audit-heuristics.d.ts +27 -0
- package/payload/platform/plugins/aeo/mcp/dist/lib/audit-heuristics.d.ts.map +1 -0
- package/payload/platform/plugins/aeo/mcp/dist/lib/audit-heuristics.js +274 -0
- package/payload/platform/plugins/aeo/mcp/dist/lib/audit-heuristics.js.map +1 -0
- package/payload/platform/plugins/aeo/mcp/dist/lib/neo4j.d.ts +5 -0
- package/payload/platform/plugins/aeo/mcp/dist/lib/neo4j.d.ts.map +1 -0
- package/payload/platform/plugins/aeo/mcp/dist/lib/neo4j.js +38 -0
- package/payload/platform/plugins/aeo/mcp/dist/lib/neo4j.js.map +1 -0
- package/payload/platform/plugins/aeo/mcp/dist/lib/schema-mapping.d.ts +48 -0
- package/payload/platform/plugins/aeo/mcp/dist/lib/schema-mapping.d.ts.map +1 -0
- package/payload/platform/plugins/aeo/mcp/dist/lib/schema-mapping.js +254 -0
- package/payload/platform/plugins/aeo/mcp/dist/lib/schema-mapping.js.map +1 -0
- package/payload/platform/plugins/aeo/mcp/dist/tools/aeo-audit-page.d.ts +25 -0
- package/payload/platform/plugins/aeo/mcp/dist/tools/aeo-audit-page.d.ts.map +1 -0
- package/payload/platform/plugins/aeo/mcp/dist/tools/aeo-audit-page.js +78 -0
- package/payload/platform/plugins/aeo/mcp/dist/tools/aeo-audit-page.js.map +1 -0
- package/payload/platform/plugins/aeo/mcp/dist/tools/aeo-emit-jsonld.d.ts +18 -0
- package/payload/platform/plugins/aeo/mcp/dist/tools/aeo-emit-jsonld.d.ts.map +1 -0
- package/payload/platform/plugins/aeo/mcp/dist/tools/aeo-emit-jsonld.js +56 -0
- package/payload/platform/plugins/aeo/mcp/dist/tools/aeo-emit-jsonld.js.map +1 -0
- package/payload/platform/plugins/aeo/mcp/dist/tools/aeo-write-llms-txt.d.ts +9 -0
- package/payload/platform/plugins/aeo/mcp/dist/tools/aeo-write-llms-txt.d.ts.map +1 -0
- package/payload/platform/plugins/aeo/mcp/dist/tools/aeo-write-llms-txt.js +11 -0
- package/payload/platform/plugins/aeo/mcp/dist/tools/aeo-write-llms-txt.js.map +1 -0
- package/payload/platform/plugins/aeo/mcp/package.json +22 -0
- package/payload/platform/plugins/aeo/mcp/vitest.config.ts +9 -0
- package/payload/platform/plugins/aeo/skills/structured-answer/SKILL.md +53 -0
- package/payload/platform/plugins/browser/.claude-plugin/plugin.json +17 -0
- package/payload/platform/plugins/browser/PLUGIN.md +114 -0
- package/payload/platform/plugins/browser/mcp/dist/index.d.ts +2 -0
- package/payload/platform/plugins/browser/mcp/dist/index.d.ts.map +1 -0
- package/payload/platform/plugins/browser/mcp/dist/index.js +165 -0
- package/payload/platform/plugins/browser/mcp/dist/index.js.map +1 -0
- package/payload/platform/plugins/browser/mcp/dist/lib/cdp-actions.d.ts +98 -0
- package/payload/platform/plugins/browser/mcp/dist/lib/cdp-actions.d.ts.map +1 -0
- package/payload/platform/plugins/browser/mcp/dist/lib/cdp-actions.js +455 -0
- package/payload/platform/plugins/browser/mcp/dist/lib/cdp-actions.js.map +1 -0
- package/payload/platform/plugins/browser/mcp/dist/lib/cdp-render.d.ts +44 -0
- package/payload/platform/plugins/browser/mcp/dist/lib/cdp-render.d.ts.map +1 -0
- package/payload/platform/plugins/browser/mcp/dist/lib/cdp-render.js +89 -0
- package/payload/platform/plugins/browser/mcp/dist/lib/cdp-render.js.map +1 -0
- package/payload/platform/plugins/browser/mcp/dist/lib/cdp-session.d.ts +153 -0
- package/payload/platform/plugins/browser/mcp/dist/lib/cdp-session.d.ts.map +1 -0
- package/payload/platform/plugins/browser/mcp/dist/lib/cdp-session.js +401 -0
- package/payload/platform/plugins/browser/mcp/dist/lib/cdp-session.js.map +1 -0
- package/payload/platform/plugins/browser/mcp/package.json +19 -0
- package/payload/platform/plugins/business-assistant/.claude-plugin/plugin.json +8 -0
- package/payload/platform/plugins/business-assistant/PLUGIN.md +62 -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/.claude-plugin/plugin.json +8 -0
- package/payload/platform/plugins/cloudflare/PLUGIN.md +61 -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 +24 -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 +551 -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/api.md +166 -0
- package/payload/platform/plugins/cloudflare/references/d1-data-capture.md +157 -0
- package/payload/platform/plugins/cloudflare/references/dashboard-guide.md +173 -0
- package/payload/platform/plugins/cloudflare/references/hosting-sites.md +66 -0
- package/payload/platform/plugins/cloudflare/references/manual-setup.md +633 -0
- package/payload/platform/plugins/cloudflare/references/reset-guide.md +119 -0
- package/payload/platform/plugins/cloudflare/references/serving-published-sites.md +73 -0
- package/payload/platform/plugins/cloudflare/skills/cloudflare/SKILL.md +72 -0
- package/payload/platform/plugins/contacts/.claude-plugin/plugin.json +17 -0
- package/payload/platform/plugins/contacts/PLUGIN.md +62 -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 +467 -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 +52 -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 +181 -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 +122 -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/.claude-plugin/plugin.json +8 -0
- package/payload/platform/plugins/deep-research/PLUGIN.md +19 -0
- package/payload/platform/plugins/deep-research/recipes/README.md +36 -0
- package/payload/platform/plugins/deep-research/skills/academic-verify/SKILL.md +75 -0
- package/payload/platform/plugins/deep-research/skills/book-mirror/SKILL.md +68 -0
- package/payload/platform/plugins/deep-research/skills/data-research/SKILL.md +108 -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/deep-research/skills/strategic-reading/SKILL.md +69 -0
- package/payload/platform/plugins/docs/.claude-plugin/plugin.json +8 -0
- package/payload/platform/plugins/docs/PLUGIN.md +58 -0
- package/payload/platform/plugins/docs/references/access-control.md +84 -0
- package/payload/platform/plugins/docs/references/admin-identity-gate.md +81 -0
- package/payload/platform/plugins/docs/references/admin-session.md +177 -0
- package/payload/platform/plugins/docs/references/admin-ui.md +266 -0
- package/payload/platform/plugins/docs/references/aeo.md +87 -0
- package/payload/platform/plugins/docs/references/attachments.md +44 -0
- package/payload/platform/plugins/docs/references/cloudflare.md +102 -0
- package/payload/platform/plugins/docs/references/contacts-guide.md +94 -0
- package/payload/platform/plugins/docs/references/deployment.md +303 -0
- package/payload/platform/plugins/docs/references/getting-started.md +82 -0
- package/payload/platform/plugins/docs/references/graph.md +163 -0
- package/payload/platform/plugins/docs/references/internals.md +539 -0
- package/payload/platform/plugins/docs/references/investigate-and-task-skills.md +9 -0
- package/payload/platform/plugins/docs/references/linkedin-extension.md +49 -0
- package/payload/platform/plugins/docs/references/memory-guide.md +163 -0
- package/payload/platform/plugins/docs/references/neo4j.md +63 -0
- package/payload/platform/plugins/docs/references/outlook-guide.md +69 -0
- package/payload/platform/plugins/docs/references/platform.md +193 -0
- package/payload/platform/plugins/docs/references/plugins-guide.md +188 -0
- package/payload/platform/plugins/docs/references/projects-guide.md +94 -0
- package/payload/platform/plugins/docs/references/samba.md +80 -0
- package/payload/platform/plugins/docs/references/session-retrospective.md +14 -0
- package/payload/platform/plugins/docs/references/settings.md +82 -0
- package/payload/platform/plugins/docs/references/slides.md +31 -0
- package/payload/platform/plugins/docs/references/telegram-guide.md +58 -0
- package/payload/platform/plugins/docs/references/troubleshooting.md +289 -0
- package/payload/platform/plugins/docs/references/visitor-graph.md +83 -0
- package/payload/platform/plugins/docs/references/voice-mirror-guide.md +64 -0
- package/payload/platform/plugins/docs/superpowers/plans/2026-06-01-memory-edge.md +589 -0
- package/payload/platform/plugins/email/.claude-plugin/plugin.json +17 -0
- package/payload/platform/plugins/email/PLUGIN.md +98 -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 +381 -0
- package/payload/platform/plugins/email/mcp/dist/index.js.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/lib/attachment-archive.d.ts +39 -0
- package/payload/platform/plugins/email/mcp/dist/lib/attachment-archive.d.ts.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/lib/attachment-archive.js +0 -0
- package/payload/platform/plugins/email/mcp/dist/lib/attachment-archive.js.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/lib/attachment-resolve.d.ts +19 -0
- package/payload/platform/plugins/email/mcp/dist/lib/attachment-resolve.d.ts.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/lib/attachment-resolve.js +64 -0
- package/payload/platform/plugins/email/mcp/dist/lib/attachment-resolve.js.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/lib/claude-bridge.d.ts +17 -0
- package/payload/platform/plugins/email/mcp/dist/lib/claude-bridge.d.ts.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/lib/claude-bridge.js +186 -0
- package/payload/platform/plugins/email/mcp/dist/lib/claude-bridge.js.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/lib/conversation-archive-dispatch.d.ts +30 -0
- package/payload/platform/plugins/email/mcp/dist/lib/conversation-archive-dispatch.d.ts.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/lib/conversation-archive-dispatch.js +305 -0
- package/payload/platform/plugins/email/mcp/dist/lib/conversation-archive-dispatch.js.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/lib/conversation-archive-lookup.d.ts +19 -0
- package/payload/platform/plugins/email/mcp/dist/lib/conversation-archive-lookup.d.ts.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/lib/conversation-archive-lookup.js +51 -0
- package/payload/platform/plugins/email/mcp/dist/lib/conversation-archive-lookup.js.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/lib/credentials.d.ts +89 -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 +245 -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 +29 -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 +18 -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 +266 -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 +770 -0
- package/payload/platform/plugins/email/mcp/dist/lib/imap.js.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/lib/ingest-batch.d.ts +23 -0
- package/payload/platform/plugins/email/mcp/dist/lib/ingest-batch.d.ts.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/lib/ingest-batch.js +15 -0
- package/payload/platform/plugins/email/mcp/dist/lib/ingest-batch.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 +60 -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 +675 -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 +25 -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 +78 -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 +817 -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 +30 -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 +215 -0
- package/payload/platform/plugins/email/mcp/dist/scripts/email-fetch.js.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/scripts/send-transactional.d.ts +2 -0
- package/payload/platform/plugins/email/mcp/dist/scripts/send-transactional.d.ts.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/scripts/send-transactional.js +56 -0
- package/payload/platform/plugins/email/mcp/dist/scripts/send-transactional.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-classify.d.ts +6 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-classify.d.ts.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-classify.js +89 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-classify.js.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-fetch.d.ts +15 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-fetch.d.ts.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-fetch.js +54 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-fetch.js.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-graph-query.d.ts +24 -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 +293 -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-ingest.d.ts +20 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-ingest.d.ts.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-ingest.js +191 -0
- package/payload/platform/plugins/email/mcp/dist/tools/email-ingest.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 +84 -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 +11 -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 +74 -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 +67 -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 +11 -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 +37 -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 +162 -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 +22 -0
- package/payload/platform/plugins/email/references/email-reference.md +144 -0
- package/payload/platform/plugins/email/skills/email-composition/SKILL.md +184 -0
- package/payload/platform/plugins/email/skills/email-ingest/SKILL.md +87 -0
- package/payload/platform/plugins/graph/.claude-plugin/plugin.json +8 -0
- package/payload/platform/plugins/graph/PLUGIN.md +37 -0
- package/payload/platform/plugins/graph-viewer/.claude-plugin/plugin.json +8 -0
- package/payload/platform/plugins/graph-viewer/PLUGIN.md +56 -0
- package/payload/platform/plugins/graph-viewer/mcp/dist/index.d.ts +7 -0
- package/payload/platform/plugins/graph-viewer/mcp/dist/index.d.ts.map +1 -0
- package/payload/platform/plugins/graph-viewer/mcp/dist/index.js +70 -0
- package/payload/platform/plugins/graph-viewer/mcp/dist/index.js.map +1 -0
- package/payload/platform/plugins/graph-viewer/mcp/dist/lib/neo4j.d.ts +5 -0
- package/payload/platform/plugins/graph-viewer/mcp/dist/lib/neo4j.d.ts.map +1 -0
- package/payload/platform/plugins/graph-viewer/mcp/dist/lib/neo4j.js +43 -0
- package/payload/platform/plugins/graph-viewer/mcp/dist/lib/neo4j.js.map +1 -0
- package/payload/platform/plugins/graph-viewer/mcp/dist/render/draw.d.ts +28 -0
- package/payload/platform/plugins/graph-viewer/mcp/dist/render/draw.d.ts.map +1 -0
- package/payload/platform/plugins/graph-viewer/mcp/dist/render/draw.js +73 -0
- package/payload/platform/plugins/graph-viewer/mcp/dist/render/draw.js.map +1 -0
- package/payload/platform/plugins/graph-viewer/mcp/dist/render/layout.d.ts +40 -0
- package/payload/platform/plugins/graph-viewer/mcp/dist/render/layout.d.ts.map +1 -0
- package/payload/platform/plugins/graph-viewer/mcp/dist/render/layout.js +117 -0
- package/payload/platform/plugins/graph-viewer/mcp/dist/render/layout.js.map +1 -0
- package/payload/platform/plugins/graph-viewer/mcp/dist/tools/graph-render.d.ts +45 -0
- package/payload/platform/plugins/graph-viewer/mcp/dist/tools/graph-render.d.ts.map +1 -0
- package/payload/platform/plugins/graph-viewer/mcp/dist/tools/graph-render.js +198 -0
- package/payload/platform/plugins/graph-viewer/mcp/dist/tools/graph-render.js.map +1 -0
- package/payload/platform/plugins/graph-viewer/mcp/package.json +25 -0
- package/payload/platform/plugins/graph-viewer/mcp/vitest.config.ts +8 -0
- package/payload/platform/plugins/graph-viewer/skills/render-graph/SKILL.md +38 -0
- package/payload/platform/plugins/linkedin-extension/.claude-plugin/plugin.json +8 -0
- package/payload/platform/plugins/linkedin-extension/PLUGIN.md +58 -0
- package/payload/platform/plugins/linkedin-extension/extension/README.md +44 -0
- package/payload/platform/plugins/linkedin-extension/extension/__tests__/fixtures/profile.html +34 -0
- package/payload/platform/plugins/linkedin-extension/extension/__tests__/fixtures/thread.html +36 -0
- package/payload/platform/plugins/linkedin-extension/extension/assets/pill.css +52 -0
- package/payload/platform/plugins/linkedin-extension/extension/background/sw.js +60 -0
- package/payload/platform/plugins/linkedin-extension/extension/content/extractors.js +127 -0
- package/payload/platform/plugins/linkedin-extension/extension/content/profile.js +82 -0
- package/payload/platform/plugins/linkedin-extension/extension/content/thread.js +84 -0
- package/payload/platform/plugins/linkedin-extension/extension/manifest.json +32 -0
- package/payload/platform/plugins/linkedin-extension/extension/options/options.html +33 -0
- package/payload/platform/plugins/linkedin-extension/extension/options/options.js +30 -0
- package/payload/platform/plugins/linkedin-extension/skills/linkedin-extension/SKILL.md +91 -0
- package/payload/platform/plugins/linkedin-import/.claude-plugin/plugin.json +8 -0
- package/payload/platform/plugins/linkedin-import/PLUGIN.md +27 -0
- package/payload/platform/plugins/linkedin-import/skills/linkedin-import/SKILL.md +119 -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 +94 -0
- package/payload/platform/plugins/memory/.claude-plugin/plugin.json +17 -0
- package/payload/platform/plugins/memory/PLUGIN.md +291 -0
- package/payload/platform/plugins/memory/bin/conversation-archive-ingest.mjs +616 -0
- package/payload/platform/plugins/memory/bin/conversation-archive-ingest.sh +106 -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 +2522 -0
- package/payload/platform/plugins/memory/mcp/dist/index.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/compiled-truth-revision.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/compiled-truth-revision.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/compiled-truth-revision.test.js +68 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/compiled-truth-revision.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/compiled-truth-rewriter-operator-hint.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/compiled-truth-rewriter-operator-hint.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/compiled-truth-rewriter-operator-hint.test.js +90 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/compiled-truth-rewriter-operator-hint.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/document-sectioniser.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/document-sectioniser.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/document-sectioniser.test.js +41 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/document-sectioniser.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/graph-write-embed-net.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/graph-write-embed-net.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/graph-write-embed-net.test.js +90 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/graph-write-embed-net.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/graph-write-gate-label.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/graph-write-gate-label.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/graph-write-gate-label.test.js +30 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/graph-write-gate-label.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/graph-write-gate-property.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/graph-write-gate-property.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/graph-write-gate-property.test.js +25 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/graph-write-gate-property.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/label-delete-gate.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/label-delete-gate.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/label-delete-gate.test.js +62 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/label-delete-gate.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/label-origin-gate.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/label-origin-gate.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/label-origin-gate.test.js +50 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/label-origin-gate.test.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 +154 -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 +226 -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__/neo4j-password-path.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/neo4j-password-path.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/neo4j-password-path.test.js +57 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/neo4j-password-path.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/phase-backlinks.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/phase-backlinks.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/phase-backlinks.test.js +24 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/phase-backlinks.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/phase-prune-revisions.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/phase-prune-revisions.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/phase-prune-revisions.test.js +51 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/phase-prune-revisions.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/phase-tag-normalisation.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/phase-tag-normalisation.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/phase-tag-normalisation.test.js +51 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/phase-tag-normalisation.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/relative-date.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/relative-date.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/relative-date.test.js +68 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/relative-date.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/resolve-active-vertical.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/resolve-active-vertical.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/resolve-active-vertical.test.js +116 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/resolve-active-vertical.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/schema-cypher-drift.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/schema-cypher-drift.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/schema-cypher-drift.test.js +67 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/schema-cypher-drift.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 +217 -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 +640 -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/__tests__/timeline-extractor.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/timeline-extractor.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/timeline-extractor.test.js +111 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/timeline-extractor.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/typed-edge-schema.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/typed-edge-schema.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/typed-edge-schema.test.js +79 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/typed-edge-schema.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/vector-indexed-labels-drift.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/vector-indexed-labels-drift.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/vector-indexed-labels-drift.test.js +27 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/vector-indexed-labels-drift.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/compiled-truth-revision.d.ts +91 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/compiled-truth-revision.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/compiled-truth-revision.js +39 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/compiled-truth-revision.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/compiled-truth-rewriter.d.ts +60 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/compiled-truth-rewriter.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/compiled-truth-rewriter.js +169 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/compiled-truth-rewriter.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/email.d.ts +3 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/email.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/email.js +61 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/email.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/index.d.ts +7 -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 +36 -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 +38 -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-normalisers/x-dm.d.ts +3 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/x-dm.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/x-dm.js +101 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-normalisers/x-dm.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 +16 -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 +43 -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 +60 -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/conversation-pipeline/turn-text-cache-path.d.ts +8 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-pipeline/turn-text-cache-path.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-pipeline/turn-text-cache-path.js +27 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/conversation-pipeline/turn-text-cache-path.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/document-sectioniser.d.ts +10 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/document-sectioniser.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/document-sectioniser.js +47 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/document-sectioniser.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/index.d.ts +44 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/index.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/index.js +14 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/index.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/phase-backlinks.d.ts +15 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/phase-backlinks.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/phase-backlinks.js +37 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/phase-backlinks.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/phase-citation-audit.d.ts +3 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/phase-citation-audit.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/phase-citation-audit.js +16 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/phase-citation-audit.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/phase-dead-edges.d.ts +19 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/phase-dead-edges.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/phase-dead-edges.js +39 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/phase-dead-edges.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/phase-orphans.d.ts +19 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/phase-orphans.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/phase-orphans.js +42 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/phase-orphans.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/phase-prune-revisions.d.ts +21 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/phase-prune-revisions.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/phase-prune-revisions.js +27 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/phase-prune-revisions.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/phase-stale-truth.d.ts +18 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/phase-stale-truth.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/phase-stale-truth.js +60 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/phase-stale-truth.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/phase-tag-normalisation.d.ts +25 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/phase-tag-normalisation.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/phase-tag-normalisation.js +90 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/dream-cycle/phase-tag-normalisation.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/embeddings.d.ts +2 -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 +6 -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 +41 -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 +113 -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 +76 -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 +148 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/graph-write-gate.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/kd-classify-gate.d.ts +41 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/kd-classify-gate.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/kd-classify-gate.js +69 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/kd-classify-gate.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/label-delete-gate.d.ts +18 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/label-delete-gate.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/label-delete-gate.js +31 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/label-delete-gate.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/label-origin-gate.d.ts +18 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/label-origin-gate.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/label-origin-gate.js +35 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/label-origin-gate.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/live-schema-source.d.ts +119 -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 +208 -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 +248 -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 +824 -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/log-ingest.d.ts +65 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/log-ingest.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/log-ingest.js +182 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/log-ingest.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/neo4j.d.ts +19 -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 +76 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/neo4j.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/relative-date.d.ts +13 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/relative-date.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/relative-date.js +191 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/relative-date.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/resolve-active-vertical.d.ts +33 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/resolve-active-vertical.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/resolve-active-vertical.js +44 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/resolve-active-vertical.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/schema-loader.d.ts +141 -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 +516 -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 +92 -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 +243 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/schema-validator.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/section-types.d.ts +127 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/section-types.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/section-types.js +56 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/section-types.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/timeline-extractor.d.ts +19 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/timeline-extractor.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/timeline-extractor.js +179 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/timeline-extractor.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/typed-edge-pass.d.ts +35 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/typed-edge-pass.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/typed-edge-pass.js +28 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/typed-edge-pass.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/typed-edge-schema.d.ts +29 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/typed-edge-schema.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/typed-edge-schema.js +142 -0
- package/payload/platform/plugins/memory/mcp/dist/lib/typed-edge-schema.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__/_helpers/emit-capture.d.ts +22 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/_helpers/emit-capture.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/_helpers/emit-capture.js +44 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/_helpers/emit-capture.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/build-text-representation-bound.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/build-text-representation-bound.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/build-text-representation-bound.test.js +20 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/build-text-representation-bound.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/conversation-archive-derive-insights-emit.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/conversation-archive-derive-insights-emit.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/conversation-archive-derive-insights-emit.test.js +68 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/conversation-archive-derive-insights-emit.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/conversation-archive-derive-insights.test.d.ts +7 -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 +298 -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-emit.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/conversation-archive-enrich-rejection-emit.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/conversation-archive-enrich-rejection-emit.test.js +48 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/conversation-archive-enrich-rejection-emit.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-archive-preference-embed.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/conversation-archive-preference-embed.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/conversation-archive-preference-embed.test.js +67 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/conversation-archive-preference-embed.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/conversation-memory-expunge-emit.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/conversation-memory-expunge-emit.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/conversation-memory-expunge-emit.test.js +53 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/conversation-memory-expunge-emit.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 +75 -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__/embeddings-cap.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/embeddings-cap.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/embeddings-cap.test.js +34 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/embeddings-cap.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/graph-prune-denylist-add-emit.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/graph-prune-denylist-add-emit.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/graph-prune-denylist-add-emit.test.js +40 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/graph-prune-denylist-add-emit.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/graph-prune-denylist-remove-emit.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/graph-prune-denylist-remove-emit.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/graph-prune-denylist-remove-emit.test.js +39 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/graph-prune-denylist-remove-emit.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/log-ingest.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/log-ingest.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/log-ingest.test.js +241 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/log-ingest.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-archive-section-writer.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-archive-section-writer.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-archive-section-writer.test.js +61 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-archive-section-writer.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-archive-write-emit.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-archive-write-emit.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-archive-write-emit.test.js +88 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-archive-write-emit.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 +106 -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-classify-emit.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-classify-emit.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-classify-emit.test.js +58 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-classify-emit.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-compiled-truth-history.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-compiled-truth-history.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-compiled-truth-history.test.js +129 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-compiled-truth-history.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-delete-emit.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-delete-emit.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-delete-emit.test.js +64 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-delete-emit.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-delete-reserved-label.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-delete-reserved-label.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-delete-reserved-label.test.js +141 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-delete-reserved-label.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-edge.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-edge.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-edge.test.js +164 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-edge.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-edit-attachment-emit.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-edit-attachment-emit.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-edit-attachment-emit.test.js +70 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-edit-attachment-emit.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-empty-trash-admin-conversation.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-empty-trash-admin-conversation.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-empty-trash-admin-conversation.test.js +168 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-empty-trash-admin-conversation.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-empty-trash-emit.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-empty-trash-emit.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-empty-trash-emit.test.js +48 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-empty-trash-emit.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-empty-trash-reserved-label.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-empty-trash-reserved-label.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-empty-trash-reserved-label.test.js +86 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-empty-trash-reserved-label.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest-body-server-sliced.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest-body-server-sliced.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest-body-server-sliced.test.js +95 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest-body-server-sliced.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest-chat-body-server-sliced.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest-chat-body-server-sliced.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest-chat-body-server-sliced.test.js +124 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest-chat-body-server-sliced.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest-emit.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest-emit.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest-emit.test.js +74 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest-emit.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest-extract-emit.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest-extract-emit.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest-extract-emit.test.js +47 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest-extract-emit.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest-inline-rewrite.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest-inline-rewrite.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest-inline-rewrite.test.js +66 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest-inline-rewrite.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest-section-properties-strip.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest-section-properties-strip.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest-section-properties-strip.test.js +104 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest-section-properties-strip.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest-web-emit.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest-web-emit.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest-web-emit.test.js +65 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest-web-emit.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 +175 -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__/memory-lookup-by-name.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-lookup-by-name.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-lookup-by-name.test.js +135 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-lookup-by-name.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-reindex-emit.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-reindex-emit.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-reindex-emit.test.js +43 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-reindex-emit.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-reindex.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-reindex.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-reindex.test.js +87 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-reindex.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-rename-attachment-emit.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-rename-attachment-emit.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-rename-attachment-emit.test.js +65 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-rename-attachment-emit.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-report-tools.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-report-tools.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-report-tools.test.js +115 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-report-tools.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-restore-emit.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-restore-emit.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-restore-emit.test.js +49 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-restore-emit.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-search-fields.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-search-fields.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-search-fields.test.js +128 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-search-fields.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-search-threshold.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-search-threshold.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-search-threshold.test.js +34 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-search-threshold.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-update-by-name.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-update-by-name.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-update-by-name.test.js +125 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-update-by-name.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-update-emit.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-update-emit.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-update-emit.test.js +79 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-update-emit.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-update-operator-hint.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-update-operator-hint.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-update-operator-hint.test.js +329 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-update-operator-hint.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-write-compiled-truth-rejection.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-write-compiled-truth-rejection.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-write-compiled-truth-rejection.test.js +39 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-write-compiled-truth-rejection.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-write-emit.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-write-emit.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-write-emit.test.js +81 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-write-emit.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-write-timeline-learned-at.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-write-timeline-learned-at.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-write-timeline-learned-at.test.js +30 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-write-timeline-learned-at.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/profile-delete-emit.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/profile-delete-emit.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/profile-delete-emit.test.js +62 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/profile-delete-emit.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/profile-update-emit.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/profile-update-emit.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/profile-update-emit.test.js +76 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/profile-update-emit.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 +88 -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 +149 -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 +114 -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 +415 -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 +124 -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-archive-list-chunks.d.ts +43 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/conversation-archive-list-chunks.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/conversation-archive-list-chunks.js +96 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/conversation-archive-list-chunks.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 +15 -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 +32 -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 +31 -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/image-fetch.d.ts +15 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/image-fetch.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/image-fetch.js +64 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/image-fetch.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/kd-classify.d.ts +6 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/kd-classify.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/kd-classify.js +73 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/kd-classify.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-archive-write.d.ts +202 -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 +1084 -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-brain-capture-recent.d.ts +35 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-brain-capture-recent.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-brain-capture-recent.js +80 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-brain-capture-recent.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 +62 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-classify.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-compiled-truth-history.d.ts +41 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-compiled-truth-history.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-compiled-truth-history.js +73 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-compiled-truth-history.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-delete.d.ts +65 -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 +151 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-delete.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-dream-run.d.ts +48 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-dream-run.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-dream-run.js +197 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-dream-run.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-edge.d.ts +21 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-edge.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-edge.js +51 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-edge.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 +95 -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 +50 -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 +104 -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 +37 -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 +97 -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 +32 -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 +116 -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 +194 -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 +1273 -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-lookup-by-name.d.ts +16 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-lookup-by-name.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-lookup-by-name.js +56 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-lookup-by-name.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-node-exists.d.ts +28 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-node-exists.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-node-exists.js +46 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-node-exists.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 +127 -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 +67 -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-report-list.d.ts +28 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-report-list.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-report-list.js +64 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-report-list.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-report-read-latest.d.ts +24 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-report-read-latest.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-report-read-latest.js +49 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-report-read-latest.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-report-write.d.ts +34 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-report-write.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-report-write.js +99 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-report-write.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 +47 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-restore.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-review-queue.d.ts +29 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-review-queue.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-review-queue.js +67 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-review-queue.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-search.d.ts +7 -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 +184 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-search.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-signals-recent.d.ts +35 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-signals-recent.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-signals-recent.js +73 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-signals-recent.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-typed-edge-pass.d.ts +29 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-typed-edge-pass.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-typed-edge-pass.js +22 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-typed-edge-pass.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-update-by-name.d.ts +15 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-update-by-name.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-update-by-name.js +45 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-update-by-name.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-update.d.ts +16 -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 +194 -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 +376 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-write.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/obsidian-vault-import.d.ts +127 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/obsidian-vault-import.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/obsidian-vault-import.js +477 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/obsidian-vault-import.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 +35 -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 +46 -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 +423 -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 +395 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-update.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/session-retrospective-skip-rate.d.ts +30 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/session-retrospective-skip-rate.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/session-retrospective-skip-rate.js +130 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/session-retrospective-skip-rate.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/package.json +23 -0
- package/payload/platform/plugins/memory/mcp/scripts/backfill-typed-edges.ts +72 -0
- package/payload/platform/plugins/memory/mcp/scripts/boot-smoke.sh +69 -0
- package/payload/platform/plugins/memory/mcp/scripts/generate-edge-docs.ts +75 -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 +48 -0
- package/payload/platform/plugins/memory/references/graph-primitives.md +394 -0
- package/payload/platform/plugins/memory/references/schema-base.md +334 -0
- package/payload/platform/plugins/memory/references/schema-construction.md +72 -0
- package/payload/platform/plugins/memory/references/schema-creator.md +35 -0
- package/payload/platform/plugins/memory/references/schema-estate-agent.md +110 -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/references/transcript-formats/circleback.md +49 -0
- package/payload/platform/plugins/memory/references/transcript-formats/granola.md +50 -0
- package/payload/platform/plugins/memory/references/transcript-formats/otter.md +50 -0
- package/payload/platform/plugins/memory/skills/archive-crawler/SKILL.md +67 -0
- package/payload/platform/plugins/memory/skills/challenge/SKILL.md +52 -0
- package/payload/platform/plugins/memory/skills/concept-synthesis/SKILL.md +79 -0
- package/payload/platform/plugins/memory/skills/connect/SKILL.md +56 -0
- package/payload/platform/plugins/memory/skills/conversation-archive/SKILL.md +193 -0
- package/payload/platform/plugins/memory/skills/conversation-archive-enrich/SKILL.md +207 -0
- package/payload/platform/plugins/memory/skills/conversation-archive-mcp/SKILL.md +170 -0
- package/payload/platform/plugins/memory/skills/conversational-memory/SKILL.md +113 -0
- package/payload/platform/plugins/memory/skills/document-ingest/SKILL.md +331 -0
- package/payload/platform/plugins/memory/skills/emerge/SKILL.md +87 -0
- package/payload/platform/plugins/notion-import/.claude-plugin/plugin.json +8 -0
- package/payload/platform/plugins/notion-import/PLUGIN.md +27 -0
- package/payload/platform/plugins/notion-import/skills/notion-import/SKILL.md +114 -0
- package/payload/platform/plugins/notion-import/skills/notion-import/references/attachments.md +55 -0
- package/payload/platform/plugins/notion-import/skills/notion-import/references/databases.md +83 -0
- package/payload/platform/plugins/notion-import/skills/notion-import/references/page-tree.md +61 -0
- package/payload/platform/plugins/notion-import/skills/notion-import/references/workspace-export.md +41 -0
- package/payload/platform/plugins/obsidian-import/.claude-plugin/plugin.json +8 -0
- package/payload/platform/plugins/obsidian-import/PLUGIN.md +39 -0
- package/payload/platform/plugins/obsidian-import/skills/obsidian-import/SKILL.md +92 -0
- package/payload/platform/plugins/obsidian-import/skills/obsidian-import/references/attachments.md +80 -0
- package/payload/platform/plugins/obsidian-import/skills/obsidian-import/references/daily-notes.md +31 -0
- package/payload/platform/plugins/obsidian-import/skills/obsidian-import/references/vault-structure.md +46 -0
- package/payload/platform/plugins/obsidian-import/skills/obsidian-import/references/wikilinks.md +70 -0
- package/payload/platform/plugins/outlook/.claude-plugin/plugin.json +17 -0
- package/payload/platform/plugins/outlook/PLUGIN.md +74 -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 +183 -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/.claude-plugin/plugin.json +8 -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/prompt-optimiser/.claude-plugin/plugin.json +8 -0
- package/payload/platform/plugins/prompt-optimiser/PLUGIN.md +14 -0
- package/payload/platform/plugins/prompt-optimiser/skills/prompt-optimiser/SKILL.md +318 -0
- package/payload/platform/plugins/replicate/.claude-plugin/plugin.json +17 -0
- package/payload/platform/plugins/replicate/PLUGIN.md +49 -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 +125 -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 +201 -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/.claude-plugin/plugin.json +8 -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 +73 -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/.claude-plugin/plugin.json +17 -0
- package/payload/platform/plugins/scheduling/PLUGIN.md +153 -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 +440 -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-graph-ingest.d.ts +80 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/ics-graph-ingest.d.ts.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/ics-graph-ingest.js +410 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/ics-graph-ingest.js.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/lib/ics.d.ts +63 -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 +471 -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 +24 -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 +572 -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-archive-ics.d.ts +20 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-archive-ics.d.ts.map +1 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-archive-ics.js +63 -0
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-archive-ics.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 +77 -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/scheduling/skills/briefing/SKILL.md +86 -0
- package/payload/platform/plugins/scheduling/skills/daily-prep/SKILL.md +61 -0
- package/payload/platform/plugins/slides/.claude-plugin/plugin.json +8 -0
- package/payload/platform/plugins/slides/LICENSE +21 -0
- package/payload/platform/plugins/slides/PLUGIN.md +18 -0
- package/payload/platform/plugins/slides/PROVENANCE.md +40 -0
- package/payload/platform/plugins/slides/commands/add-slide.md +29 -0
- package/payload/platform/plugins/slides/commands/slides-claus.md +39 -0
- package/payload/platform/plugins/slides/commands/slides-new-component.md +39 -0
- package/payload/platform/plugins/slides/commands/slides-outline.md +43 -0
- package/payload/platform/plugins/slides/commands/slides-review.md +52 -0
- package/payload/platform/plugins/slides/commands/slides-theme.md +64 -0
- package/payload/platform/plugins/slides/commands/slides.md +59 -0
- package/payload/platform/plugins/slides/skills/deck-system/REFERENCE.md +581 -0
- package/payload/platform/plugins/slides/skills/deck-system/SKILL.md +607 -0
- package/payload/platform/plugins/slides/skills/deck-system/STORYTELLING-board.md +426 -0
- package/payload/platform/plugins/slides/skills/deck-system/STORYTELLING-claus.md +185 -0
- package/payload/platform/plugins/slides/skills/deck-system/STORYTELLING-mbb.md +450 -0
- package/payload/platform/plugins/slides/skills/deck-system/STORYTELLING-product-launch.md +579 -0
- package/payload/platform/plugins/slides/skills/deck-system/STORYTELLING-sales.md +464 -0
- package/payload/platform/plugins/slides/skills/deck-system/STORYTELLING-sequoia.md +489 -0
- package/payload/platform/plugins/slides/skills/deck-system/STORYTELLING.md +273 -0
- package/payload/platform/plugins/slides/skills/deck-system/deck-craft.html +1371 -0
- package/payload/platform/plugins/slides/skills/deck-system/deck-solid.html +1667 -0
- package/payload/platform/plugins/slides/skills/deck-system/deck.html +1359 -0
- package/payload/platform/plugins/substack-import/.claude-plugin/plugin.json +8 -0
- package/payload/platform/plugins/substack-import/PLUGIN.md +34 -0
- package/payload/platform/plugins/substack-import/skills/substack-import/SKILL.md +183 -0
- package/payload/platform/plugins/substack-import/skills/substack-import/references/archive-shape.md +68 -0
- package/payload/platform/plugins/substack-import/skills/substack-import/references/attachments.md +72 -0
- package/payload/platform/plugins/substack-import/skills/substack-import/references/engagement.md +61 -0
- package/payload/platform/plugins/substack-import/skills/substack-import/references/posts.md +80 -0
- package/payload/platform/plugins/substack-import/skills/substack-import/references/subscribers.md +74 -0
- package/payload/platform/plugins/telegram/.claude-plugin/plugin.json +17 -0
- package/payload/platform/plugins/telegram/PLUGIN.md +53 -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/url-get/.claude-plugin/plugin.json +17 -0
- package/payload/platform/plugins/url-get/PLUGIN.md +91 -0
- package/payload/platform/plugins/url-get/mcp/dist/index.d.ts +9 -0
- package/payload/platform/plugins/url-get/mcp/dist/index.d.ts.map +1 -0
- package/payload/platform/plugins/url-get/mcp/dist/index.js +53 -0
- package/payload/platform/plugins/url-get/mcp/dist/index.js.map +1 -0
- package/payload/platform/plugins/url-get/mcp/dist/lib/summarise.d.ts +8 -0
- package/payload/platform/plugins/url-get/mcp/dist/lib/summarise.d.ts.map +1 -0
- package/payload/platform/plugins/url-get/mcp/dist/lib/summarise.js +83 -0
- package/payload/platform/plugins/url-get/mcp/dist/lib/summarise.js.map +1 -0
- package/payload/platform/plugins/url-get/mcp/dist/tools/url-get.d.ts +21 -0
- package/payload/platform/plugins/url-get/mcp/dist/tools/url-get.d.ts.map +1 -0
- package/payload/platform/plugins/url-get/mcp/dist/tools/url-get.js +133 -0
- package/payload/platform/plugins/url-get/mcp/dist/tools/url-get.js.map +1 -0
- package/payload/platform/plugins/url-get/mcp/package.json +22 -0
- package/payload/platform/plugins/whatsapp/.claude-plugin/plugin.json +17 -0
- package/payload/platform/plugins/whatsapp/PLUGIN.md +108 -0
- package/payload/platform/plugins/whatsapp/mcp/dist/__tests__/boot-without-env.test.d.ts +2 -0
- package/payload/platform/plugins/whatsapp/mcp/dist/__tests__/boot-without-env.test.d.ts.map +1 -0
- package/payload/platform/plugins/whatsapp/mcp/dist/__tests__/boot-without-env.test.js +58 -0
- package/payload/platform/plugins/whatsapp/mcp/dist/__tests__/boot-without-env.test.js.map +1 -0
- package/payload/platform/plugins/whatsapp/mcp/dist/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 +489 -0
- package/payload/platform/plugins/whatsapp/mcp/dist/index.js.map +1 -0
- package/payload/platform/plugins/whatsapp/mcp/package.json +21 -0
- package/payload/platform/plugins/whatsapp/mcp/vitest.config.ts +9 -0
- package/payload/platform/plugins/whatsapp/references/channels-whatsapp.md +256 -0
- package/payload/platform/plugins/whatsapp/skills/connect-whatsapp/SKILL.md +82 -0
- package/payload/platform/plugins/whatsapp/skills/manage-whatsapp-config/SKILL.md +93 -0
- package/payload/platform/plugins/work/.claude-plugin/plugin.json +17 -0
- package/payload/platform/plugins/work/.mcp.json +13 -0
- package/payload/platform/plugins/work/PLUGIN.md +124 -0
- package/payload/platform/plugins/work/mcp/dist/cli/project-create-cli.d.ts +2 -0
- package/payload/platform/plugins/work/mcp/dist/cli/project-create-cli.d.ts.map +1 -0
- package/payload/platform/plugins/work/mcp/dist/cli/project-create-cli.js +78 -0
- package/payload/platform/plugins/work/mcp/dist/cli/project-create-cli.js.map +1 -0
- package/payload/platform/plugins/work/mcp/dist/index.d.ts +2 -0
- package/payload/platform/plugins/work/mcp/dist/index.d.ts.map +1 -0
- package/payload/platform/plugins/work/mcp/dist/index.js +547 -0
- package/payload/platform/plugins/work/mcp/dist/index.js.map +1 -0
- package/payload/platform/plugins/work/mcp/dist/lib/embeddings.d.ts +7 -0
- package/payload/platform/plugins/work/mcp/dist/lib/embeddings.d.ts.map +1 -0
- package/payload/platform/plugins/work/mcp/dist/lib/embeddings.js +24 -0
- package/payload/platform/plugins/work/mcp/dist/lib/embeddings.js.map +1 -0
- package/payload/platform/plugins/work/mcp/dist/lib/neo4j.d.ts +5 -0
- package/payload/platform/plugins/work/mcp/dist/lib/neo4j.d.ts.map +1 -0
- package/payload/platform/plugins/work/mcp/dist/lib/neo4j.js +40 -0
- package/payload/platform/plugins/work/mcp/dist/lib/neo4j.js.map +1 -0
- package/payload/platform/plugins/work/mcp/dist/tools/project-complete.d.ts +17 -0
- package/payload/platform/plugins/work/mcp/dist/tools/project-complete.d.ts.map +1 -0
- package/payload/platform/plugins/work/mcp/dist/tools/project-complete.js +76 -0
- package/payload/platform/plugins/work/mcp/dist/tools/project-complete.js.map +1 -0
- package/payload/platform/plugins/work/mcp/dist/tools/project-create.d.ts +29 -0
- package/payload/platform/plugins/work/mcp/dist/tools/project-create.d.ts.map +1 -0
- package/payload/platform/plugins/work/mcp/dist/tools/project-create.js +235 -0
- package/payload/platform/plugins/work/mcp/dist/tools/project-create.js.map +1 -0
- package/payload/platform/plugins/work/mcp/dist/tools/project-get.d.ts +40 -0
- package/payload/platform/plugins/work/mcp/dist/tools/project-get.d.ts.map +1 -0
- package/payload/platform/plugins/work/mcp/dist/tools/project-get.js +125 -0
- package/payload/platform/plugins/work/mcp/dist/tools/project-get.js.map +1 -0
- package/payload/platform/plugins/work/mcp/dist/tools/project-list.d.ts +26 -0
- package/payload/platform/plugins/work/mcp/dist/tools/project-list.d.ts.map +1 -0
- package/payload/platform/plugins/work/mcp/dist/tools/project-list.js +81 -0
- package/payload/platform/plugins/work/mcp/dist/tools/project-list.js.map +1 -0
- package/payload/platform/plugins/work/mcp/dist/tools/project-update.d.ts +19 -0
- package/payload/platform/plugins/work/mcp/dist/tools/project-update.d.ts.map +1 -0
- package/payload/platform/plugins/work/mcp/dist/tools/project-update.js +102 -0
- package/payload/platform/plugins/work/mcp/dist/tools/project-update.js.map +1 -0
- package/payload/platform/plugins/work/mcp/dist/tools/session-list.d.ts +20 -0
- package/payload/platform/plugins/work/mcp/dist/tools/session-list.d.ts.map +1 -0
- package/payload/platform/plugins/work/mcp/dist/tools/session-list.js +37 -0
- package/payload/platform/plugins/work/mcp/dist/tools/session-list.js.map +1 -0
- package/payload/platform/plugins/work/mcp/dist/tools/session-name.d.ts +12 -0
- package/payload/platform/plugins/work/mcp/dist/tools/session-name.d.ts.map +1 -0
- package/payload/platform/plugins/work/mcp/dist/tools/session-name.js +28 -0
- package/payload/platform/plugins/work/mcp/dist/tools/session-name.js.map +1 -0
- package/payload/platform/plugins/work/mcp/dist/tools/work-complete.d.ts +16 -0
- package/payload/platform/plugins/work/mcp/dist/tools/work-complete.d.ts.map +1 -0
- package/payload/platform/plugins/work/mcp/dist/tools/work-complete.js +33 -0
- package/payload/platform/plugins/work/mcp/dist/tools/work-complete.js.map +1 -0
- package/payload/platform/plugins/work/mcp/dist/tools/work-create.d.ts +63 -0
- package/payload/platform/plugins/work/mcp/dist/tools/work-create.d.ts.map +1 -0
- package/payload/platform/plugins/work/mcp/dist/tools/work-create.js +141 -0
- package/payload/platform/plugins/work/mcp/dist/tools/work-create.js.map +1 -0
- package/payload/platform/plugins/work/mcp/dist/tools/work-get.d.ts +19 -0
- package/payload/platform/plugins/work/mcp/dist/tools/work-get.d.ts.map +1 -0
- package/payload/platform/plugins/work/mcp/dist/tools/work-get.js +51 -0
- package/payload/platform/plugins/work/mcp/dist/tools/work-get.js.map +1 -0
- package/payload/platform/plugins/work/mcp/dist/tools/work-list.d.ts +18 -0
- package/payload/platform/plugins/work/mcp/dist/tools/work-list.d.ts.map +1 -0
- package/payload/platform/plugins/work/mcp/dist/tools/work-list.js +66 -0
- package/payload/platform/plugins/work/mcp/dist/tools/work-list.js.map +1 -0
- package/payload/platform/plugins/work/mcp/dist/tools/work-ready.d.ts +21 -0
- package/payload/platform/plugins/work/mcp/dist/tools/work-ready.d.ts.map +1 -0
- package/payload/platform/plugins/work/mcp/dist/tools/work-ready.js +54 -0
- package/payload/platform/plugins/work/mcp/dist/tools/work-ready.js.map +1 -0
- package/payload/platform/plugins/work/mcp/dist/tools/work-relate.d.ts +12 -0
- package/payload/platform/plugins/work/mcp/dist/tools/work-relate.d.ts.map +1 -0
- package/payload/platform/plugins/work/mcp/dist/tools/work-relate.js +59 -0
- package/payload/platform/plugins/work/mcp/dist/tools/work-relate.js.map +1 -0
- package/payload/platform/plugins/work/mcp/dist/tools/work-update.d.ts +32 -0
- package/payload/platform/plugins/work/mcp/dist/tools/work-update.d.ts.map +1 -0
- package/payload/platform/plugins/work/mcp/dist/tools/work-update.js +112 -0
- package/payload/platform/plugins/work/mcp/dist/tools/work-update.js.map +1 -0
- package/payload/platform/plugins/work/mcp/package.json +20 -0
- package/payload/platform/plugins/work/skills/execute-task/SKILL.md +101 -0
- package/payload/platform/plugins/workflows/.claude-plugin/plugin.json +17 -0
- package/payload/platform/plugins/workflows/.mcp.json +12 -0
- package/payload/platform/plugins/workflows/PLUGIN.md +160 -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 +440 -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 +66 -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 +187 -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 +25 -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 +56 -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 +33 -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 +130 -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 +51 -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 +382 -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 +24 -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 +48 -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 +150 -0
- package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-update.js.map +1 -0
- package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-validate.d.ts +13 -0
- package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-validate.d.ts.map +1 -0
- package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-validate.js +53 -0
- package/payload/platform/plugins/workflows/mcp/dist/tools/workflow-validate.js.map +1 -0
- package/payload/platform/plugins/workflows/mcp/package.json +20 -0
- package/payload/platform/plugins/workflows/mcp/test-runner.mjs +710 -0
- package/payload/platform/plugins/workflows/mcp/test-workflows.sh +77 -0
- package/payload/platform/plugins/workflows/skills/workflow-manager/SKILL.md +93 -0
- package/payload/platform/plugins/x-import/.claude-plugin/plugin.json +8 -0
- package/payload/platform/plugins/x-import/PLUGIN.md +33 -0
- package/payload/platform/plugins/x-import/references/archive-shape.md +124 -0
- package/payload/platform/plugins/x-import/references/transcript-shape.md +121 -0
- package/payload/platform/plugins/x-import/skills/x-import/SKILL.md +123 -0
- package/payload/platform/scripts/__tests__/agents-md-bootstrap.test.sh +111 -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/__tests__/resume-tunnel.test.sh +251 -0
- package/payload/platform/scripts/admin-conversation-recover.mjs +386 -0
- package/payload/platform/scripts/admin-persist-audit.ts +211 -0
- package/payload/platform/scripts/check-architecture-skill-no-drift.mjs +114 -0
- package/payload/platform/scripts/check-canonical-tool-names.mjs +110 -0
- package/payload/platform/scripts/check-cypher-int-params.mjs +277 -0
- package/payload/platform/scripts/check-no-conversation-id-leaks.mjs +165 -0
- package/payload/platform/scripts/check-no-direct-clipboard.mjs +54 -0
- package/payload/platform/scripts/check-no-esm-require.mjs +138 -0
- package/payload/platform/scripts/check-no-legacy-spawn-route.mjs +37 -0
- package/payload/platform/scripts/check-no-task-id-leaks.mjs +110 -0
- package/payload/platform/scripts/check-plugin-references.mjs +256 -0
- package/payload/platform/scripts/check-plugin-tools-mcp-consistency.mjs +136 -0
- package/payload/platform/scripts/check-roles-doc-completeness.mjs +96 -0
- package/payload/platform/scripts/check-skill-frontmatter.mjs +139 -0
- package/payload/platform/scripts/check-skill-load-coverage.mjs +100 -0
- package/payload/platform/scripts/check-specialist-tool-surface.mjs +323 -0
- package/payload/platform/scripts/conversation-id-allowlist.txt +142 -0
- package/payload/platform/scripts/dedupe-userprofile-ghosts.sh +388 -0
- package/payload/platform/scripts/generate-canonical-tool-names.mjs +63 -0
- package/payload/platform/scripts/generate-entitlement-fixture.mjs +152 -0
- package/payload/platform/scripts/identity-forbidden-token-check.mjs +88 -0
- package/payload/platform/scripts/installer-device-verify.sh +249 -0
- package/payload/platform/scripts/lib/agents-md-bootstrap.sh +49 -0
- package/payload/platform/scripts/lib/canonical-tool-names.mjs +88 -0
- package/payload/platform/scripts/lib/read-brand-json.sh +69 -0
- package/payload/platform/scripts/lib/resolve-account-dir.sh +184 -0
- package/payload/platform/scripts/log-adherence-check.sh +125 -0
- package/payload/platform/scripts/logs-read-jsonl.test.sh +307 -0
- package/payload/platform/scripts/logs-read.sh +980 -0
- package/payload/platform/scripts/logs-read.test.sh +159 -0
- package/payload/platform/scripts/redact-install-logs.sh +87 -0
- package/payload/platform/scripts/resume-tunnel.sh +148 -0
- package/payload/platform/scripts/rss-sampler.sh +58 -0
- package/payload/platform/scripts/seed-neo4j.sh +193 -0
- package/payload/platform/scripts/setup-account.sh +373 -0
- package/payload/platform/scripts/smoke-boot-services.sh +413 -0
- package/payload/platform/scripts/test-laptop-vnc-boot.sh +88 -0
- package/payload/platform/scripts/verify-skill-tool-surface.sh +389 -0
- package/payload/platform/scripts/vnc.sh +476 -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/admin-identity-audit.d.ts +39 -0
- package/payload/platform/services/claude-session-manager/dist/admin-identity-audit.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/admin-identity-audit.js +133 -0
- package/payload/platform/services/claude-session-manager/dist/admin-identity-audit.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/agent-identity-locator.d.ts +23 -0
- package/payload/platform/services/claude-session-manager/dist/agent-identity-locator.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/agent-identity-locator.js +29 -0
- package/payload/platform/services/claude-session-manager/dist/agent-identity-locator.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/auth-snapshot.d.ts +4 -0
- package/payload/platform/services/claude-session-manager/dist/auth-snapshot.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/auth-snapshot.js +50 -0
- package/payload/platform/services/claude-session-manager/dist/auth-snapshot.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/brand-foreign-filter.d.ts +30 -0
- package/payload/platform/services/claude-session-manager/dist/brand-foreign-filter.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/brand-foreign-filter.js +86 -0
- package/payload/platform/services/claude-session-manager/dist/brand-foreign-filter.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.d.ts +7 -0
- package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.generated.d.ts +5 -0
- package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.generated.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.generated.js +205 -0
- package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.generated.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.js +23 -0
- package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/config.d.ts +55 -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 +234 -0
- package/payload/platform/services/claude-session-manager/dist/config.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/fs-watcher.d.ts +150 -0
- package/payload/platform/services/claude-session-manager/dist/fs-watcher.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/fs-watcher.js +881 -0
- package/payload/platform/services/claude-session-manager/dist/fs-watcher.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/hooks-discovery.d.ts +7 -0
- package/payload/platform/services/claude-session-manager/dist/hooks-discovery.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/hooks-discovery.js +90 -0
- package/payload/platform/services/claude-session-manager/dist/hooks-discovery.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/http-server.d.ts +40 -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 +1761 -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 +675 -0
- package/payload/platform/services/claude-session-manager/dist/index.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/jsonl-enumerator.d.ts +43 -0
- package/payload/platform/services/claude-session-manager/dist/jsonl-enumerator.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/jsonl-enumerator.js +155 -0
- package/payload/platform/services/claude-session-manager/dist/jsonl-enumerator.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/jsonl-observer.d.ts +30 -0
- package/payload/platform/services/claude-session-manager/dist/jsonl-observer.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/jsonl-observer.js +204 -0
- package/payload/platform/services/claude-session-manager/dist/jsonl-observer.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/jsonl-path.d.ts +41 -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 +105 -0
- package/payload/platform/services/claude-session-manager/dist/jsonl-path.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/jsonl-tail.d.ts +81 -0
- package/payload/platform/services/claude-session-manager/dist/jsonl-tail.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/jsonl-tail.js +499 -0
- package/payload/platform/services/claude-session-manager/dist/jsonl-tail.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/mcp-tools-probe.d.ts +38 -0
- package/payload/platform/services/claude-session-manager/dist/mcp-tools-probe.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/mcp-tools-probe.js +131 -0
- package/payload/platform/services/claude-session-manager/dist/mcp-tools-probe.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/permission-mode-tail.d.ts +20 -0
- package/payload/platform/services/claude-session-manager/dist/permission-mode-tail.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/permission-mode-tail.js +71 -0
- package/payload/platform/services/claude-session-manager/dist/permission-mode-tail.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/pty-census.d.ts +40 -0
- package/payload/platform/services/claude-session-manager/dist/pty-census.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/pty-census.js +125 -0
- package/payload/platform/services/claude-session-manager/dist/pty-census.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/pty-spawner.d.ts +641 -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 +2077 -0
- package/payload/platform/services/claude-session-manager/dist/pty-spawner.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/public-agent-reachability.d.ts +40 -0
- package/payload/platform/services/claude-session-manager/dist/public-agent-reachability.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/public-agent-reachability.js +123 -0
- package/payload/platform/services/claude-session-manager/dist/public-agent-reachability.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/public-tool-audit.d.ts +33 -0
- package/payload/platform/services/claude-session-manager/dist/public-tool-audit.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/public-tool-audit.js +149 -0
- package/payload/platform/services/claude-session-manager/dist/public-tool-audit.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/rc-daemon.d.ts +157 -0
- package/payload/platform/services/claude-session-manager/dist/rc-daemon.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/rc-daemon.js +556 -0
- package/payload/platform/services/claude-session-manager/dist/rc-daemon.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/rc-life.d.ts +4 -0
- package/payload/platform/services/claude-session-manager/dist/rc-life.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/rc-life.js +16 -0
- package/payload/platform/services/claude-session-manager/dist/rc-life.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/rc-script-spawn.d.ts +80 -0
- package/payload/platform/services/claude-session-manager/dist/rc-script-spawn.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/rc-script-spawn.js +306 -0
- package/payload/platform/services/claude-session-manager/dist/rc-script-spawn.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/reaper.d.ts +28 -0
- package/payload/platform/services/claude-session-manager/dist/reaper.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/reaper.js +118 -0
- package/payload/platform/services/claude-session-manager/dist/reaper.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/session-sidecar.d.ts +91 -0
- package/payload/platform/services/claude-session-manager/dist/session-sidecar.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/session-sidecar.js +232 -0
- package/payload/platform/services/claude-session-manager/dist/session-sidecar.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/session-store.d.ts +49 -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 +52 -0
- package/payload/platform/services/claude-session-manager/dist/session-store.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/spawn-rate-limiter.d.ts +28 -0
- package/payload/platform/services/claude-session-manager/dist/spawn-rate-limiter.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/spawn-rate-limiter.js +77 -0
- package/payload/platform/services/claude-session-manager/dist/spawn-rate-limiter.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/specialist-drift.d.ts +60 -0
- package/payload/platform/services/claude-session-manager/dist/specialist-drift.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/specialist-drift.js +203 -0
- package/payload/platform/services/claude-session-manager/dist/specialist-drift.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/system-prompt.d.ts +151 -0
- package/payload/platform/services/claude-session-manager/dist/system-prompt.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/system-prompt.js +445 -0
- package/payload/platform/services/claude-session-manager/dist/system-prompt.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/systemd-scope.d.ts +164 -0
- package/payload/platform/services/claude-session-manager/dist/systemd-scope.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/systemd-scope.js +296 -0
- package/payload/platform/services/claude-session-manager/dist/systemd-scope.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/systemd-spawn.d.ts +83 -0
- package/payload/platform/services/claude-session-manager/dist/systemd-spawn.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/systemd-spawn.js +345 -0
- package/payload/platform/services/claude-session-manager/dist/systemd-spawn.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/tool-surface.d.ts +69 -0
- package/payload/platform/services/claude-session-manager/dist/tool-surface.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/tool-surface.js +373 -0
- package/payload/platform/services/claude-session-manager/dist/tool-surface.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/types.d.ts +41 -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 +79 -0
- package/payload/platform/services/claude-session-manager/dist/url-capture.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/user-title-store.d.ts +39 -0
- package/payload/platform/services/claude-session-manager/dist/user-title-store.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/user-title-store.js +138 -0
- package/payload/platform/services/claude-session-manager/dist/user-title-store.js.map +1 -0
- package/payload/platform/services/claude-session-manager/package.json +22 -0
- package/payload/platform/services/claude-session-manager/scripts/stash-cleanup.sh +410 -0
- package/payload/platform/services/claude-session-manager/vitest.config.ts +14 -0
- package/payload/platform/templates/account.json +12 -0
- package/payload/platform/templates/agents/admin/AGENTS.md +23 -0
- package/payload/platform/templates/agents/admin/IDENTITY.md +69 -0
- package/payload/platform/templates/agents/admin/LEARNINGS.md +3 -0
- package/payload/platform/templates/agents/admin/SOUL.md +1 -0
- package/payload/platform/templates/agents/public/IDENTITY.md +19 -0
- package/payload/platform/templates/specialists/.claude-plugin/plugin.json +4 -0
- package/payload/platform/templates/specialists/agents/archive-ingest-operator.md +45 -0
- package/payload/platform/templates/specialists/agents/citation-auditor.md +37 -0
- package/payload/platform/templates/specialists/agents/coding-assistant.md +73 -0
- package/payload/platform/templates/specialists/agents/compiled-truth-rewriter.md +42 -0
- package/payload/platform/templates/specialists/agents/content-producer.md +65 -0
- package/payload/platform/templates/specialists/agents/database-operator.md +29 -0
- package/payload/platform/templates/specialists/agents/librarian.md +57 -0
- package/payload/platform/templates/specialists/agents/personal-assistant.md +63 -0
- package/payload/platform/templates/specialists/agents/project-manager.md +63 -0
- package/payload/platform/templates/specialists/agents/public-session-reviewer.md +40 -0
- package/payload/platform/templates/specialists/agents/research-assistant.md +73 -0
- package/payload/platform/templates/specialists/agents/typed-edge-classifier.md +37 -0
- package/payload/platform/templates/systemd/edge.service.template +38 -0
- package/payload/platform/tsconfig.base.json +18 -0
- package/payload/premium-plugins/.claude-plugin/marketplace.json +23 -0
- package/payload/premium-plugins/teaching/.claude-plugin/plugin.json +8 -0
- package/payload/premium-plugins/teaching/PLUGIN.md +58 -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/venture-studio/.claude-plugin/plugin.json +8 -0
- package/payload/premium-plugins/venture-studio/PLUGIN.md +119 -0
- package/payload/premium-plugins/venture-studio/bin/scaffold.sh +116 -0
- package/payload/premium-plugins/venture-studio/skills/brand-pack/SKILL.md +256 -0
- package/payload/premium-plugins/venture-studio/skills/brand-pack/references/color-psychology.md +118 -0
- package/payload/premium-plugins/venture-studio/skills/investor-data-room/SKILL.md +376 -0
- package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/business-plan-template.md +64 -0
- package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/compliance-research-checklist.md +53 -0
- package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/data-room-structure.md +88 -0
- package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/deck-blueprint-template.md +39 -0
- package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/design-tokens-application.md +79 -0
- package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/html-pdf-pipeline.md +236 -0
- package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/internal-workings-scrub.md +33 -0
- package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/termsheet-template.md +88 -0
- package/payload/premium-plugins/venture-studio/skills/investor-data-room/templates/prospectus/index.html +1565 -0
- package/payload/premium-plugins/venture-studio/skills/investor-data-room/templates/prospectus/render-pdf.mjs +91 -0
- package/payload/premium-plugins/venture-studio/skills/investor-data-room/templates/prospectus/term_sheet.html +715 -0
- package/payload/premium-plugins/venture-studio/skills/office-hours/SKILL.md +587 -0
- package/payload/premium-plugins/venture-studio/skills/prototype-host/SKILL.md +179 -0
- package/payload/premium-plugins/venture-studio/skills/prototype-host/references/cloudflared-ingress-edit.md +81 -0
- package/payload/premium-plugins/venture-studio/skills/prototype-host/references/scaffold-frameworks.md +60 -0
- package/payload/premium-plugins/venture-studio/skills/prototype-host/references/systemd-user-service.md +104 -0
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/SKILL.md +336 -0
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/aarrr-metrics.md +275 -0
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/assumption-testing.md +93 -0
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/boolean-search.md +308 -0
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/build-measure-learn.md +262 -0
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/business-model-canvas.md +171 -0
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/commitment-signals.md +246 -0
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/design-thinking.md +183 -0
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/earlyvangelist.md +190 -0
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/first-principles.md +58 -0
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/fishbone.md +114 -0
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/five-whys.md +43 -0
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/ice-scoring.md +237 -0
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/innovation-accounting.md +290 -0
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/jtbd.md +105 -0
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/landing-page.md +361 -0
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/market-type.md +167 -0
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/mom-test.md +193 -0
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/mvp-types.md +200 -0
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/og-images.md +239 -0
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/pareto.md +103 -0
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/persona-development.md +291 -0
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/pivot-types.md +225 -0
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/positioning-statement.md +179 -0
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/prd.md +363 -0
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/pre-mortem.md +74 -0
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/problem-validation.md +253 -0
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/product-market-fit.md +256 -0
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/research-synthesis.md +276 -0
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/three-engines-of-growth.md +248 -0
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/validation-tests.md +89 -0
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/value-proposition-canvas.md +121 -0
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/win-loss-analysis.md +242 -0
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/workflow-mapping.md +271 -0
- package/payload/premium-plugins/writer-craft/.claude-plugin/plugin.json +17 -0
- package/payload/premium-plugins/writer-craft/PLUGIN.md +134 -0
- package/payload/premium-plugins/writer-craft/agents/writer-craft--manuscript-reviewer.md +96 -0
- package/payload/premium-plugins/writer-craft/lib/mcp-stderr-tee/dist/index.d.ts +51 -0
- package/payload/premium-plugins/writer-craft/lib/mcp-stderr-tee/dist/index.d.ts.map +1 -0
- package/payload/premium-plugins/writer-craft/lib/mcp-stderr-tee/dist/index.js +196 -0
- package/payload/premium-plugins/writer-craft/lib/mcp-stderr-tee/dist/index.js.map +1 -0
- package/payload/premium-plugins/writer-craft/lib/mcp-stderr-tee/package.json +7 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/cli/ingest-session-text.d.ts +3 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/cli/ingest-session-text.d.ts.map +1 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/cli/ingest-session-text.js +58 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/cli/ingest-session-text.js.map +1 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/index.d.ts +3 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/index.d.ts.map +1 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/index.js +362 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/index.js.map +1 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/lib/neo4j.d.ts +14 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/lib/neo4j.d.ts.map +1 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/lib/neo4j.js +47 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/lib/neo4j.js.map +1 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/lib/voice-corpus.d.ts +86 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/lib/voice-corpus.d.ts.map +1 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/lib/voice-corpus.js +110 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/lib/voice-corpus.js.map +1 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-distil-profile.d.ts +82 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-distil-profile.d.ts.map +1 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-distil-profile.js +560 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-distil-profile.js.map +1 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-ingest-session-text.d.ts +19 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-ingest-session-text.d.ts.map +1 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-ingest-session-text.js +123 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-ingest-session-text.js.map +1 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-record-feedback.d.ts +32 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-record-feedback.d.ts.map +1 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-record-feedback.js +82 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-record-feedback.js.map +1 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-retrieve-conditioning.d.ts +47 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-retrieve-conditioning.d.ts.map +1 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-retrieve-conditioning.js +160 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-retrieve-conditioning.js.map +1 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-tag-content.d.ts +17 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-tag-content.d.ts.map +1 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-tag-content.js +98 -0
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-tag-content.js.map +1 -0
- package/payload/premium-plugins/writer-craft/mcp/package-lock.json +1327 -0
- package/payload/premium-plugins/writer-craft/mcp/package.json +19 -0
- package/payload/premium-plugins/writer-craft/mcp/scripts/smoke.mjs +351 -0
- package/payload/premium-plugins/writer-craft/mcp/src/index.ts +409 -0
- package/payload/premium-plugins/writer-craft/mcp/src/lib/neo4j.ts +56 -0
- package/payload/premium-plugins/writer-craft/mcp/src/lib/voice-corpus.ts +115 -0
- package/payload/premium-plugins/writer-craft/mcp/src/tools/voice-distil-profile.ts +767 -0
- package/payload/premium-plugins/writer-craft/mcp/src/tools/voice-ingest-session-text.ts +152 -0
- package/payload/premium-plugins/writer-craft/mcp/src/tools/voice-record-feedback.ts +128 -0
- package/payload/premium-plugins/writer-craft/mcp/src/tools/voice-retrieve-conditioning.ts +234 -0
- package/payload/premium-plugins/writer-craft/mcp/src/tools/voice-tag-content.ts +139 -0
- package/payload/premium-plugins/writer-craft/mcp/tsconfig.json +8 -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/premium-plugins/writer-craft/skills/voice-mirror/SKILL.md +228 -0
- package/payload/server/adminuser-self-heal-YC47O34W.js +46 -0
- package/payload/server/chunk-76HRO7NX.js +5684 -0
- package/payload/server/chunk-HYQNUVGO.js +38 -0
- package/payload/server/maxy-edge.js +814 -0
- package/payload/server/package.json +11 -0
- package/payload/server/public/assets/AdminShell-T-YknnBn.js +1 -0
- package/payload/server/public/assets/AdminShell-qc_xy7Az.css +1 -0
- package/payload/server/public/assets/Checkbox-DmDxpqVv.js +1 -0
- package/payload/server/public/assets/_baseFor-Cs8Y-rGh.js +1 -0
- package/payload/server/public/assets/admin-COUV-jgt.js +1 -0
- package/payload/server/public/assets/admin-CWMpccrR.css +1 -0
- package/payload/server/public/assets/arc-B2CweJq3.js +1 -0
- package/payload/server/public/assets/architecture-YZFGNWBL-Dnn6Hc65.js +1 -0
- package/payload/server/public/assets/architectureDiagram-Q4EWVU46-DP2o-MFV.js +36 -0
- package/payload/server/public/assets/array-iHZP4KWJ.js +1 -0
- package/payload/server/public/assets/blockDiagram-DXYQGD6D-DO4mcYDJ.js +132 -0
- package/payload/server/public/assets/c4Diagram-AHTNJAMY-Sy1giHbj.js +10 -0
- package/payload/server/public/assets/channel-CEpR_0rE.js +1 -0
- package/payload/server/public/assets/chunk-2KRD3SAO-CKsCYCsN.js +1 -0
- package/payload/server/public/assets/chunk-336JU56O-C0-P-aUF.js +2 -0
- package/payload/server/public/assets/chunk-426QAEUC-DFjEt3Zb.js +1 -0
- package/payload/server/public/assets/chunk-4BX2VUAB-B8bqAmBa.js +1 -0
- package/payload/server/public/assets/chunk-4TB4RGXK-D1k0VSlW.js +206 -0
- package/payload/server/public/assets/chunk-55IACEB6-B-p_QNqz.js +1 -0
- package/payload/server/public/assets/chunk-5FUZZQ4R-D6U6tV_j.js +62 -0
- package/payload/server/public/assets/chunk-5PVQY5BW-CYK76xfs.js +2 -0
- package/payload/server/public/assets/chunk-67CJDMHE-BC9js-lf.js +1 -0
- package/payload/server/public/assets/chunk-7N4EOEYR-4j2OqKkv.js +1 -0
- package/payload/server/public/assets/chunk-AA7GKIK3-Coen-fXN.js +1 -0
- package/payload/server/public/assets/chunk-BSJP7CBP-CAiOBvec.js +1 -0
- package/payload/server/public/assets/chunk-CIAEETIT-AJzzpZVb.js +1 -0
- package/payload/server/public/assets/chunk-DD-I1_y5.js +1 -0
- package/payload/server/public/assets/chunk-EDXVE4YY-BL4BKozX.js +1 -0
- package/payload/server/public/assets/chunk-ENJZ2VHE-mhAFG8UD.js +10 -0
- package/payload/server/public/assets/chunk-FMBD7UC4-H231gZA_.js +15 -0
- package/payload/server/public/assets/chunk-FOC6F5B3-Cl3ZZjYG.js +1 -0
- package/payload/server/public/assets/chunk-ICPOFSXX-DOEzvzJa.js +122 -0
- package/payload/server/public/assets/chunk-K5T4RW27-C_ipbUDD.js +94 -0
- package/payload/server/public/assets/chunk-KGLVRYIC-CTsDNSCU.js +1 -0
- package/payload/server/public/assets/chunk-LIHQZDEY-DvSXhkGf.js +1 -0
- package/payload/server/public/assets/chunk-ORNJ4GCN-p574NOI7.js +1 -0
- package/payload/server/public/assets/chunk-OYMX7WX6-BlEgFM6U.js +231 -0
- package/payload/server/public/assets/chunk-QZHKN3VN-DpF06ZZQ.js +1 -0
- package/payload/server/public/assets/chunk-U2HBQHQK-B2bDK0jv.js +70 -0
- package/payload/server/public/assets/chunk-X2U36JSP-D69BxKFw.js +1 -0
- package/payload/server/public/assets/chunk-XPW4576I-Dm-PcyUi.js +32 -0
- package/payload/server/public/assets/chunk-YZCP3GAM-Be8RnXgx.js +1 -0
- package/payload/server/public/assets/chunk-ZZ45TVLE-Ck8PCTa4.js +1 -0
- package/payload/server/public/assets/classDiagram-6PBFFD2Q-CYbXvKLI.js +1 -0
- package/payload/server/public/assets/classDiagram-v2-HSJHXN6E-DEyHzRhq.js +1 -0
- package/payload/server/public/assets/clone-y8gexbBy.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-CmkW2Eaj.js +1 -0
- package/payload/server/public/assets/cytoscape.esm-BR2GOQ8_.js +321 -0
- package/payload/server/public/assets/dagre-Dqp-ns8F.js +1 -0
- package/payload/server/public/assets/dagre-KV5264BT-ZgWWXPLc.js +4 -0
- package/payload/server/public/assets/data-gy6QH9c1.js +1 -0
- package/payload/server/public/assets/defaultLocale-B9aLeOTg.js +1 -0
- package/payload/server/public/assets/diagram-5BDNPKRD-CTX5-ScM.js +10 -0
- package/payload/server/public/assets/diagram-G4DWMVQ6-BovIsO6H.js +24 -0
- package/payload/server/public/assets/diagram-MMDJMWI5-DcETsQy-.js +43 -0
- package/payload/server/public/assets/diagram-TYMM5635-yyq6peoZ.js +24 -0
- package/payload/server/public/assets/dist-DB-VPj_8.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-CiNToftB.js +85 -0
- package/payload/server/public/assets/flatten-BtFI066E.js +1 -0
- package/payload/server/public/assets/flowDiagram-DWJPFMVM-Xnl3SpIM.js +162 -0
- package/payload/server/public/assets/ganttDiagram-T4ZO3ILL-C1iyWe0f.js +292 -0
- package/payload/server/public/assets/gitGraph-7Q5UKJZL-CNs-LD5i.js +1 -0
- package/payload/server/public/assets/gitGraphDiagram-UUTBAWPF-D97pbMQb.js +106 -0
- package/payload/server/public/assets/graph-labels-cZu4pK16.js +1 -0
- package/payload/server/public/assets/graph-qz5tFKqU.js +51 -0
- package/payload/server/public/assets/graphlib-Lq8ijgON.js +1 -0
- package/payload/server/public/assets/info-OMHHGYJF-DsTNigSS.js +1 -0
- package/payload/server/public/assets/infoDiagram-42DDH7IO-C_OarRTA.js +2 -0
- package/payload/server/public/assets/init-BNFRgqHM.js +1 -0
- package/payload/server/public/assets/inter-cyrillic-400-normal-HOLc17fK.woff +0 -0
- package/payload/server/public/assets/inter-cyrillic-400-normal-obahsSVq.woff2 +0 -0
- package/payload/server/public/assets/inter-cyrillic-500-normal-BasfLYem.woff2 +0 -0
- package/payload/server/public/assets/inter-cyrillic-500-normal-CxZf_p3X.woff +0 -0
- package/payload/server/public/assets/inter-cyrillic-ext-400-normal-BQZuk6qB.woff2 +0 -0
- package/payload/server/public/assets/inter-cyrillic-ext-400-normal-DQukG94-.woff +0 -0
- package/payload/server/public/assets/inter-cyrillic-ext-500-normal-B0yAr1jD.woff2 +0 -0
- package/payload/server/public/assets/inter-cyrillic-ext-500-normal-BmqWE9Dz.woff +0 -0
- package/payload/server/public/assets/inter-greek-400-normal-B4URO6DV.woff2 +0 -0
- package/payload/server/public/assets/inter-greek-400-normal-q2sYcFCs.woff +0 -0
- package/payload/server/public/assets/inter-greek-500-normal-BIZE56-Y.woff2 +0 -0
- package/payload/server/public/assets/inter-greek-500-normal-Xzm54t5V.woff +0 -0
- package/payload/server/public/assets/inter-greek-ext-400-normal-DGGRlc-M.woff2 +0 -0
- package/payload/server/public/assets/inter-greek-ext-400-normal-KugGGMne.woff +0 -0
- package/payload/server/public/assets/inter-greek-ext-500-normal-2j5mBUwD.woff +0 -0
- package/payload/server/public/assets/inter-greek-ext-500-normal-C4iEst2y.woff2 +0 -0
- package/payload/server/public/assets/inter-latin-400-normal-C38fXH4l.woff2 +0 -0
- package/payload/server/public/assets/inter-latin-400-normal-CyCys3Eg.woff +0 -0
- package/payload/server/public/assets/inter-latin-500-normal-BL9OpVg8.woff +0 -0
- package/payload/server/public/assets/inter-latin-500-normal-Cerq10X2.woff2 +0 -0
- package/payload/server/public/assets/inter-latin-ext-400-normal-77YHD8bZ.woff +0 -0
- package/payload/server/public/assets/inter-latin-ext-400-normal-C1nco2VV.woff2 +0 -0
- package/payload/server/public/assets/inter-latin-ext-500-normal-BxGbmqWO.woff +0 -0
- package/payload/server/public/assets/inter-latin-ext-500-normal-CV4jyFjo.woff2 +0 -0
- package/payload/server/public/assets/inter-vietnamese-400-normal-Bbgyi5SW.woff +0 -0
- package/payload/server/public/assets/inter-vietnamese-400-normal-DMkecbls.woff2 +0 -0
- package/payload/server/public/assets/inter-vietnamese-500-normal-DOriooB6.woff2 +0 -0
- package/payload/server/public/assets/inter-vietnamese-500-normal-mJboJaSs.woff +0 -0
- package/payload/server/public/assets/isEmpty-D6QovjYR.js +1 -0
- package/payload/server/public/assets/ishikawaDiagram-UXIWVN3A-B8XBdjJn.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-CZYbiOaQ.js +139 -0
- package/payload/server/public/assets/kanban-definition-6JOO6SKY-B1PybFoh.js +89 -0
- package/payload/server/public/assets/katex-B-EfS3nw.js +257 -0
- package/payload/server/public/assets/line-D-tw3hHp.js +1 -0
- package/payload/server/public/assets/linear-BHhXD3cd.js +1 -0
- package/payload/server/public/assets/mermaid-parser.core-C9RAnysF.js +4 -0
- package/payload/server/public/assets/mermaid.core-B532LT1r.js +11 -0
- package/payload/server/public/assets/mindmap-definition-QFDTVHPH-DGlgeeTV.js +96 -0
- package/payload/server/public/assets/newsreader-latin-300-normal-AOSWdb_s.woff +0 -0
- package/payload/server/public/assets/newsreader-latin-300-normal-FGBQ0wlI.woff2 +0 -0
- package/payload/server/public/assets/newsreader-latin-400-normal-BFBkh4jY.woff2 +0 -0
- package/payload/server/public/assets/newsreader-latin-400-normal-gRTjlS2D.woff +0 -0
- package/payload/server/public/assets/newsreader-latin-500-normal-B66TYsaK.woff2 +0 -0
- package/payload/server/public/assets/newsreader-latin-500-normal-DFwuUcdu.woff +0 -0
- package/payload/server/public/assets/newsreader-latin-ext-300-normal-CFtw49Zd.woff +0 -0
- package/payload/server/public/assets/newsreader-latin-ext-300-normal-DRMzurxT.woff2 +0 -0
- package/payload/server/public/assets/newsreader-latin-ext-400-normal-DYA1XoQK.woff +0 -0
- package/payload/server/public/assets/newsreader-latin-ext-400-normal-svq1FPys.woff2 +0 -0
- package/payload/server/public/assets/newsreader-latin-ext-500-normal-BNHmvKvI.woff2 +0 -0
- package/payload/server/public/assets/newsreader-latin-ext-500-normal-CZruMFou.woff +0 -0
- package/payload/server/public/assets/newsreader-vietnamese-300-normal-CsrIkm-V.woff +0 -0
- package/payload/server/public/assets/newsreader-vietnamese-300-normal-D3VHEe81.woff2 +0 -0
- package/payload/server/public/assets/newsreader-vietnamese-400-normal-BekUZro8.woff +0 -0
- package/payload/server/public/assets/newsreader-vietnamese-400-normal-DdKr49mV.woff2 +0 -0
- package/payload/server/public/assets/newsreader-vietnamese-500-normal-BEAbKU8A.woff +0 -0
- package/payload/server/public/assets/newsreader-vietnamese-500-normal-CL6a8tp2.woff2 +0 -0
- package/payload/server/public/assets/ordinal-Bl-aM5b9.js +1 -0
- package/payload/server/public/assets/packet-4T2RLAQJ-DGES22b-.js +1 -0
- package/payload/server/public/assets/path-DmWWdwp7.js +1 -0
- package/payload/server/public/assets/pie-ZZUOXDRM-ChKeDbzt.js +1 -0
- package/payload/server/public/assets/pieDiagram-DEJITSTG-DV9FIWko.js +30 -0
- package/payload/server/public/assets/public-Bu2_Xi0a.js +35 -0
- package/payload/server/public/assets/public-vnj7OhQj.css +1 -0
- package/payload/server/public/assets/quadrantDiagram-34T5L4WZ-Betwya4l.js +7 -0
- package/payload/server/public/assets/radar-PYXPWWZC-FGG5Fs7N.js +1 -0
- package/payload/server/public/assets/reduce-BD4xUd2c.js +1 -0
- package/payload/server/public/assets/requirementDiagram-MS252O5E-Cq3vODdg.js +84 -0
- package/payload/server/public/assets/rough.esm-Ci7Kjt46.js +1 -0
- package/payload/server/public/assets/sankeyDiagram-XADWPNL6-x8krXWcS.js +10 -0
- package/payload/server/public/assets/sequenceDiagram-FGHM5R23-i-_uH-Yl.js +157 -0
- package/payload/server/public/assets/src-C1jfwBq0.js +1 -0
- package/payload/server/public/assets/stateDiagram-FHFEXIEX-il4KqSgI.js +1 -0
- package/payload/server/public/assets/stateDiagram-v2-QKLJ7IA2-B6zNJ6Tv.js +1 -0
- package/payload/server/public/assets/timeline-definition-GMOUNBTQ-DATdZkA5.js +120 -0
- package/payload/server/public/assets/treeView-SZITEDCU-VAQQdbtf.js +1 -0
- package/payload/server/public/assets/treemap-W4RFUUIX-DKchO3zI.js +1 -0
- package/payload/server/public/assets/useSelectionMode-A5KItZ2T.js +13 -0
- package/payload/server/public/assets/useSelectionMode-C-Ojh7W9.css +1 -0
- package/payload/server/public/assets/vennDiagram-DHZGUBPP-BJh9tJTt.js +34 -0
- package/payload/server/public/assets/wardley-RL74JXVD-CBGtx0bS.js +1 -0
- package/payload/server/public/assets/wardleyDiagram-NUSXRM2D-EMN1Hdfg.js +20 -0
- package/payload/server/public/assets/xychartDiagram-5P7HB3ND-DbUWXa7T.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/consent.css +97 -0
- package/payload/server/public/consent.js +259 -0
- package/payload/server/public/data.html +19 -0
- package/payload/server/public/favicon.ico +0 -0
- package/payload/server/public/graph.html +20 -0
- package/payload/server/public/index.html +21 -0
- package/payload/server/public/privacy.html +129 -0
- package/payload/server/public/public.html +19 -0
- package/payload/server/public/robots.txt +5 -0
- package/payload/server/public/v.js +244 -0
- package/payload/server/public/vnc-popout.html +63 -0
- package/payload/server/server-init.cjs +197 -0
- package/payload/server/server.js +21128 -0
|
@@ -0,0 +1,2077 @@
|
|
|
1
|
+
// Spawn a `claude --verbose` PTY child and resolve once the fs-watcher
|
|
2
|
+
// reports the PID file Claude Code writes at process init
|
|
3
|
+
// (`${CLAUDE_CONFIG_DIR}/sessions/<pid>.json` for entrypoint=cli). That
|
|
4
|
+
// file carries the intrinsic sessionId, bridgeSessionId, agent, status
|
|
5
|
+
// and cwd directly — earlier and more authoritatively than the
|
|
6
|
+
// `/remote-control` URL banner. URL capture still runs in parallel so
|
|
7
|
+
// the operator-facing iframe URL is populated, but it no longer gates
|
|
8
|
+
// /spawn's response.
|
|
9
|
+
//
|
|
10
|
+
// The manager mints zero session ids. Both the intrinsic id and the
|
|
11
|
+
// bridgeSessionId come from Claude Code's own state files.
|
|
12
|
+
//
|
|
13
|
+
// Task 147 — the recorder (database-operator) spawn is structurally
|
|
14
|
+
// identical to a Sidebar "New session" spawn. Same /spawn body shape;
|
|
15
|
+
// the recorder only differs by three overrides on the body
|
|
16
|
+
// (`specialist`, `model`, `initialMessage`). No recorder-specific
|
|
17
|
+
// preflight, no recorder-specific tool-surface gate, no
|
|
18
|
+
// `originatingSessionId` discriminator, no `MAXY_IS_RECORDER` env stamp.
|
|
19
|
+
// The PTY's own first-use error is the contract for tool absence.
|
|
20
|
+
// Auto-archive on end_turn for the database-operator specialist is
|
|
21
|
+
// applied in `http-server.ts` based on the resolved `specialist` value.
|
|
22
|
+
//
|
|
23
|
+
// Spawn failure surfaces (return 500 with `stderrTail`):
|
|
24
|
+
// which-claude-not-found, pty-spawn-failed, pid-file-timeout,
|
|
25
|
+
// host-context-unresolved, identity-unresolved, mcp-config-write-failed.
|
|
26
|
+
import { mkdirSync, writeFileSync, existsSync, readFileSync, readdirSync } from 'node:fs';
|
|
27
|
+
import { tmpdir } from 'node:os';
|
|
28
|
+
import { dirname, join } from 'node:path';
|
|
29
|
+
import { randomUUID } from 'node:crypto';
|
|
30
|
+
import { defaultSystemctlRunner, scopeUnitName, stopScopeUnit, } from './systemd-scope.js';
|
|
31
|
+
import { startUrlCapture } from './url-capture.js';
|
|
32
|
+
import { jsonlPathForSessionId, sidecarPathForSessionId, permissionModeLogPathForSessionId, projectsDirForCwd, } from './jsonl-path.js';
|
|
33
|
+
import { readSidecar, writeSidecar, updateSidecar } from './session-sidecar.js';
|
|
34
|
+
import { probeMcpServerTools, } from './mcp-tools-probe.js';
|
|
35
|
+
// CSI (Cursor / Style) escape sequence: ESC `[` <args> <final-letter>.
|
|
36
|
+
const PTY_TAIL_CSI = /\x1b\[[0-9;?]*[A-Za-z]/g;
|
|
37
|
+
const PTY_TAIL_BYTES = 4 * 1024;
|
|
38
|
+
const PTY_TAIL_LOG_BYTES = 1024;
|
|
39
|
+
function attachPtyTail(pty) {
|
|
40
|
+
let buf = '';
|
|
41
|
+
let sub = pty.onData((data) => {
|
|
42
|
+
buf += data.replace(PTY_TAIL_CSI, '');
|
|
43
|
+
if (buf.length > PTY_TAIL_BYTES)
|
|
44
|
+
buf = buf.slice(buf.length - PTY_TAIL_BYTES);
|
|
45
|
+
});
|
|
46
|
+
return {
|
|
47
|
+
getTail: () => buf,
|
|
48
|
+
dispose: () => {
|
|
49
|
+
if (sub) {
|
|
50
|
+
sub.dispose();
|
|
51
|
+
sub = null;
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function formatTailForLog(tail) {
|
|
57
|
+
const trimmed = tail.length > PTY_TAIL_LOG_BYTES ? tail.slice(-PTY_TAIL_LOG_BYTES) : tail;
|
|
58
|
+
return JSON.stringify(trimmed);
|
|
59
|
+
}
|
|
60
|
+
import { composeAppendSystemPrompt, } from './system-prompt.js';
|
|
61
|
+
import { discoverHooks } from './hooks-discovery.js';
|
|
62
|
+
import { CC_NATIVE_TOOLS } from './specialist-drift.js';
|
|
63
|
+
// Task 609 — deny-basis sentinel for dontAsk public spawns whose resolved
|
|
64
|
+
// allowlist is empty. Follows the mcp__<server>__<tool> allowlist grammar;
|
|
65
|
+
// server `none` is never registered in any brand's .mcp.json, so the token
|
|
66
|
+
// matches no real tool and grants nothing. It is absent from CC_NATIVE_TOOLS,
|
|
67
|
+
// so an allowlist anchored on it stays native-excluding. Its only job is to
|
|
68
|
+
// make `--allowed-tools` present and non-empty so dontAsk fails closed.
|
|
69
|
+
const DONTASK_DENY_BASIS = 'mcp__none__deny-basis';
|
|
70
|
+
// Task 612 / 615 — every public spawn gets ZERO tool surface (webchat,
|
|
71
|
+
// whatsapp, telegram). Measured on realagent-code (claude 2.1.160, brand
|
|
72
|
+
// settings.json permissions.allow:["*"]): a per-spawn permissions.deny in the
|
|
73
|
+
// same --settings as the prompt-skip keys is the ONLY lever that beats the
|
|
74
|
+
// brand allow:["*"] — a global deny:["*"] is a no-op (the `*`-vs-`*` collision
|
|
75
|
+
// resolves to allow). Bare tool names gate command tools (Bash/Skill/Task) but
|
|
76
|
+
// are no-ops for file/path tools, which need a Tool(//**) path form;
|
|
77
|
+
// deny:["Read(//**)"] is absolute over any allow, so no attachment Read
|
|
78
|
+
// carve-out survives (the carve-out is dropped — see Task 613). A server-scoped
|
|
79
|
+
// mcp__<srv>__* wildcard gates the one MCP surface a public spawn could
|
|
80
|
+
// otherwise expose (the memory plugin, short prefix mcp__memory__). The deny
|
|
81
|
+
// list is enumerative and maintained in lockstep with CC_NATIVE_TOOLS (the
|
|
82
|
+
// pty-spawner-public-deny audit test reconciles them).
|
|
83
|
+
/** File tools that need a `Tool(//**)` path form alongside their bare name —
|
|
84
|
+
* a bare deny of these is a no-op against a path-argument call. */
|
|
85
|
+
const CC_FILE_PATH_TOOLS = [
|
|
86
|
+
'Read', 'Write', 'Edit', 'MultiEdit', 'Glob', 'Grep', 'LS', 'NotebookRead', 'NotebookEdit',
|
|
87
|
+
];
|
|
88
|
+
/** Harness/agent-framework tools that exist in a live public spawn but are NOT
|
|
89
|
+
* in CC_NATIVE_TOOLS, so they are listed here and denied by bare name. Two
|
|
90
|
+
* sources: the deferred-load set (`deferred_tools_delta.addedNames` — the
|
|
91
|
+
* Cron, Enter/Exit, and Task families, Monitor, PushNotification,
|
|
92
|
+
* RemoteTrigger, plus `ToolSearch`) and the EAGER agent-framework tools
|
|
93
|
+
* `ScheduleWakeup` +
|
|
94
|
+
* `Workflow`, which the Task 612 on-device acceptance probe found still
|
|
95
|
+
* reachable after the deferred set was denied — `Workflow` spawns subagents,
|
|
96
|
+
* so leaving it open is a privilege-escalation hole, not merely extra surface.
|
|
97
|
+
* `LSP` (language-server code intelligence) was added by Task 614: a real
|
|
98
|
+
* `claude` capture exposes it, and the deny-list reconciliation test
|
|
99
|
+
* (public-deny-reconciliation.test.ts) flagged it as reachable-but-undenied.
|
|
100
|
+
*
|
|
101
|
+
* Maintainer note: this list and CC_FILE_PATH_TOOLS are name-only. The
|
|
102
|
+
* reconciliation test catches a NEW tool's bare-name omission, but a flat
|
|
103
|
+
* registry cannot reveal which tools take a path argument — so classifying a
|
|
104
|
+
* brand-new tool as a file tool that also needs a `(//**)` path form in
|
|
105
|
+
* CC_FILE_PATH_TOOLS remains a maintainer responsibility (Task 614). */
|
|
106
|
+
const CC_HARNESS_TOOLS = [
|
|
107
|
+
'ToolSearch', 'Monitor', 'PushNotification', 'RemoteTrigger',
|
|
108
|
+
'ScheduleWakeup', 'Workflow', 'LSP',
|
|
109
|
+
'EnterPlanMode', 'ExitPlanMode', 'EnterWorktree', 'ExitWorktree',
|
|
110
|
+
'CronCreate', 'CronDelete', 'CronList',
|
|
111
|
+
'TaskCreate', 'TaskGet', 'TaskList', 'TaskOutput', 'TaskStop', 'TaskUpdate',
|
|
112
|
+
];
|
|
113
|
+
/** Server-scoped MCP wildcard(s) for the public surface. The only MCP server a
|
|
114
|
+
* public spawn could register is the memory plugin (short prefix). */
|
|
115
|
+
const PUBLIC_DENY_MCP = ['mcp__memory__*'];
|
|
116
|
+
/** The per-spawn `permissions.deny` set for a public session (any channel):
|
|
117
|
+
* every CC native tool by bare name, a `(//**)` path form for every file tool,
|
|
118
|
+
* every harness tool by bare name, and the memory MCP server wildcard. Sorted
|
|
119
|
+
* and deduped so the emitted argv is stable and the audit test can compare. */
|
|
120
|
+
export function buildPublicDeny() {
|
|
121
|
+
const entries = [
|
|
122
|
+
...CC_NATIVE_TOOLS,
|
|
123
|
+
...CC_HARNESS_TOOLS,
|
|
124
|
+
...CC_FILE_PATH_TOOLS.map((t) => `${t}(//**)`),
|
|
125
|
+
...PUBLIC_DENY_MCP,
|
|
126
|
+
];
|
|
127
|
+
return [...new Set(entries)].sort();
|
|
128
|
+
}
|
|
129
|
+
// Task 455 — two-layer alive invariant for the `livePtys` map.
|
|
130
|
+
//
|
|
131
|
+
// Layer 1: PURGE-ON-EXIT. Both the natural-exit handler
|
|
132
|
+
// (`handlePtyNaturalExit`) and the operator-request stop (`stopSession`)
|
|
133
|
+
// delete the tracker from `livePtys` once its claude child has gone.
|
|
134
|
+
// The delete is guarded by an identity check so a respawn that has
|
|
135
|
+
// already replaced the entry under the same sessionId is never
|
|
136
|
+
// clobbered.
|
|
137
|
+
//
|
|
138
|
+
// Layer 2: FILTER-ON-LOOKUP. Every reader that asks "is there a live
|
|
139
|
+
// PTY for this sessionId?" — `isLive`, `livePidForSession`, the
|
|
140
|
+
// `stopSession` lookup — goes through `resolveLiveTracker`, which
|
|
141
|
+
// returns the entry only when it is present AND `exited` is false.
|
|
142
|
+
// Layer 2 is the load-bearing layer: it handles the case where a
|
|
143
|
+
// future write path sets `t.exited = true` without deleting (the
|
|
144
|
+
// failure shape this task was filed against). Layer 1 hardens the
|
|
145
|
+
// purge for callers that read `livePtys` directly, but the stop
|
|
146
|
+
// route never does — every stop-relevant read flows through Layer 2.
|
|
147
|
+
//
|
|
148
|
+
// `priorExitedBySessionId` is the per-sessionId count of PTYs that
|
|
149
|
+
// have exited inside this manager-process lifetime. It is bumped
|
|
150
|
+
// by `handlePtyNaturalExit` and read by the /stop route's
|
|
151
|
+
// observability line so the operator can see respawn history
|
|
152
|
+
// when investigating a "stop did nothing" report.
|
|
153
|
+
const livePtys = new Map();
|
|
154
|
+
const priorExitedBySessionId = new Map();
|
|
155
|
+
/** Task 558 — track when each tracker was registered (manager-process
|
|
156
|
+
* wall clock, ms). The post-archive sweep uses this as the lower
|
|
157
|
+
* bound for `heldSinceArchiveMs`: the master cannot have been held
|
|
158
|
+
* longer than the manager has known about its tracker. Module-scoped
|
|
159
|
+
* so the existing PtyTracker shape stays unchanged. */
|
|
160
|
+
const trackerRegisteredAt = new Map();
|
|
161
|
+
/** Task 455 — canonical alive resolver. Returns the tracker for
|
|
162
|
+
* `sessionId` only when an entry exists AND it has not been marked
|
|
163
|
+
* exited. Module-private; the public readers below thread through
|
|
164
|
+
* it so the alive contract has exactly one definition site. */
|
|
165
|
+
function resolveLiveTracker(sessionId) {
|
|
166
|
+
const t = livePtys.get(sessionId);
|
|
167
|
+
if (!t || t.exited)
|
|
168
|
+
return null;
|
|
169
|
+
return t;
|
|
170
|
+
}
|
|
171
|
+
/** Returns true when the manager has a live PtyHandle for `sessionId`.
|
|
172
|
+
* False for exited rows (the tracker is removed) and for sessions the
|
|
173
|
+
* manager never spawned (e.g. a JSONL-only archived row). */
|
|
174
|
+
export function isLive(sessionId) {
|
|
175
|
+
return resolveLiveTracker(sessionId) !== null;
|
|
176
|
+
}
|
|
177
|
+
/** Task 271 — read-only PID accessor for the live PTY at `sessionId`.
|
|
178
|
+
* Returns the PID when a tracker exists and has not exited, null
|
|
179
|
+
* otherwise. Used by the /promote refusal path so the 409 payload can
|
|
180
|
+
* identify the live process the operator must end first. Mirrors
|
|
181
|
+
* `isLive`'s encapsulation rule: returns a primitive, not the handle. */
|
|
182
|
+
export function livePidForSession(sessionId) {
|
|
183
|
+
return resolveLiveTracker(sessionId)?.pid ?? null;
|
|
184
|
+
}
|
|
185
|
+
/** Task 455 — count of prior PTYs that exited for this sessionId within
|
|
186
|
+
* this manager-process lifetime. Read by the /stop route to surface a
|
|
187
|
+
* one-line observability hit when the count is > 0, so operators can
|
|
188
|
+
* see respawn history without changing the success-path log shape. */
|
|
189
|
+
export function priorExitedCountForSession(sessionId) {
|
|
190
|
+
return priorExitedBySessionId.get(sessionId) ?? 0;
|
|
191
|
+
}
|
|
192
|
+
/** Test seam — read-only access to the tracker for a given session.
|
|
193
|
+
* Production routes never call this; they use the dedicated mutation
|
|
194
|
+
* exports (`writeInputToPty`, `killSession`, `onPtyExit`, etc.) so
|
|
195
|
+
* the PtyHandle stays encapsulated inside the module. */
|
|
196
|
+
export function getPtyTrackerForTests(sessionId) {
|
|
197
|
+
return livePtys.get(sessionId);
|
|
198
|
+
}
|
|
199
|
+
/** Register a callback to fire when the PTY for `sessionId` exits.
|
|
200
|
+
* Returns true when the tracker exists (callback was wired); false
|
|
201
|
+
* when no live PTY is tracked for that id (the caller's contract
|
|
202
|
+
* fires regardless — e.g. `attachPublicAudit` skips on no-tracker).
|
|
203
|
+
* Routes call this instead of reaching into the tracker for `.pty`. */
|
|
204
|
+
export function onPtyExit(sessionId, cb) {
|
|
205
|
+
const t = livePtys.get(sessionId);
|
|
206
|
+
if (!t)
|
|
207
|
+
return false;
|
|
208
|
+
t.pty.onExit(cb);
|
|
209
|
+
return true;
|
|
210
|
+
}
|
|
211
|
+
/** Iterate every live tracker. Used by index.ts's shutdown loop to
|
|
212
|
+
* SIGTERM each PTY synchronously, and by checkSlotsAndMaybeEvict's
|
|
213
|
+
* LRU search to walk specialists when the cap is hit. */
|
|
214
|
+
export function forEachLivePty(cb) {
|
|
215
|
+
for (const t of livePtys.values())
|
|
216
|
+
cb(t);
|
|
217
|
+
}
|
|
218
|
+
/** Count of live trackers. Surfaced by /healthz so the operator can
|
|
219
|
+
* see process-side liveness without scanning the watcher's row index. */
|
|
220
|
+
export function livePtyCount() {
|
|
221
|
+
return livePtys.size;
|
|
222
|
+
}
|
|
223
|
+
/** Test-only — clear the tracker map between vitest cases. Production
|
|
224
|
+
* never invokes this; the only legitimate eviction is PTY exit.
|
|
225
|
+
* Task 455 — also clears `priorExitedBySessionId` so tests that
|
|
226
|
+
* predate the exit-history counter (and only call this reset) do
|
|
227
|
+
* not leak counter state across vitest file boundaries. */
|
|
228
|
+
export function __resetPtyTrackerForTests() {
|
|
229
|
+
livePtys.clear();
|
|
230
|
+
priorExitedBySessionId.clear();
|
|
231
|
+
trackerRegisteredAt.clear();
|
|
232
|
+
}
|
|
233
|
+
/** Test-only — clear the exit-history counter between vitest cases.
|
|
234
|
+
* Production never invokes this; the counter resets naturally on
|
|
235
|
+
* manager restart. `__resetPtyTrackerForTests` clears this map too;
|
|
236
|
+
* this narrower export is retained for tests that want to reset
|
|
237
|
+
* only the counter without touching the live tracker map. */
|
|
238
|
+
export function __resetExitHistoryForTests() {
|
|
239
|
+
priorExitedBySessionId.clear();
|
|
240
|
+
}
|
|
241
|
+
/** Test-only — directly register a tracker without going through
|
|
242
|
+
* `spawnClaudeSession`. Used by FD-release / natural-exit tests that
|
|
243
|
+
* need to construct a known PtyHandle + tracker pair and exercise
|
|
244
|
+
* `killSession` / `handlePtyNaturalExit` against it. */
|
|
245
|
+
export function __registerPtyTrackerForTests(tracker) {
|
|
246
|
+
livePtys.set(tracker.sessionId, tracker);
|
|
247
|
+
trackerRegisteredAt.set(tracker.sessionId, Date.now());
|
|
248
|
+
}
|
|
249
|
+
/** Task 171 — specialists whose `--agent <name>` spawn has no human in the
|
|
250
|
+
* loop: no operator browser tab, no chat channel, no `claude.ai/code/session_<id>`
|
|
251
|
+
* URL to open. For these, `--remote-control` is dead weight (one outbound
|
|
252
|
+
* WebSocket to Anthropic per spawn plus a PTY-byte regex that never matches)
|
|
253
|
+
* and the URL-capture handler is not attached. Membership is by specialist
|
|
254
|
+
* name — the values that `SpawnArgs.specialist` carries — sourced from
|
|
255
|
+
* archive Task 085 (specialist plumbing) and this task. New headless
|
|
256
|
+
* specialists register their name here; channel-facing specialists
|
|
257
|
+
* (content-producer, librarian, personal-assistant, project-manager,
|
|
258
|
+
* research-assistant) stay out.
|
|
259
|
+
*/
|
|
260
|
+
export const HEADLESS_ROLES = new Set([
|
|
261
|
+
'database-operator',
|
|
262
|
+
'citation-auditor',
|
|
263
|
+
'typed-edge-classifier',
|
|
264
|
+
'compiled-truth-rewriter',
|
|
265
|
+
]);
|
|
266
|
+
export const PERMISSION_MODES = ['default', 'acceptEdits', 'plan', 'auto', 'bypassPermissions', 'dontAsk'];
|
|
267
|
+
/** Task 165 — read the agent's `tools:` frontmatter line from
|
|
268
|
+
* `$CLAUDE_CONFIG_DIR/agents/<specialist>.md`. Loud-fails when the file
|
|
269
|
+
* is missing or when no `tools:` line exists in the frontmatter, since
|
|
270
|
+
* either case means `--agent <name>` would silently fall back to the
|
|
271
|
+
* admin surface — the exact defect Task 165 closes. Returns the tool
|
|
272
|
+
* names in the order they were declared (the caller sorts before
|
|
273
|
+
* emitting argv). */
|
|
274
|
+
export function readSpecialistTools(claudeConfigDir, specialist) {
|
|
275
|
+
const path = join(claudeConfigDir, 'agents', `${specialist}.md`);
|
|
276
|
+
let raw;
|
|
277
|
+
try {
|
|
278
|
+
raw = readFileSync(path, 'utf8');
|
|
279
|
+
}
|
|
280
|
+
catch (err) {
|
|
281
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
282
|
+
throw new Error(`[pty-spawner] specialist-agent-file-missing path=${path} err=${msg}`);
|
|
283
|
+
}
|
|
284
|
+
// Frontmatter delimited by lines that contain only `---`. Read tools:
|
|
285
|
+
// line within the first delimited block.
|
|
286
|
+
const lines = raw.split(/\r?\n/);
|
|
287
|
+
if (lines[0]?.trim() !== '---') {
|
|
288
|
+
throw new Error(`[pty-spawner] specialist-agent-no-frontmatter path=${path}`);
|
|
289
|
+
}
|
|
290
|
+
let toolsLine = null;
|
|
291
|
+
for (let i = 1; i < lines.length; i++) {
|
|
292
|
+
const line = lines[i];
|
|
293
|
+
if (line.trim() === '---')
|
|
294
|
+
break;
|
|
295
|
+
const m = line.match(/^tools:\s*(.+)$/);
|
|
296
|
+
if (m) {
|
|
297
|
+
toolsLine = m[1];
|
|
298
|
+
break;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
if (toolsLine === null) {
|
|
302
|
+
throw new Error(`[pty-spawner] specialist-agent-no-tools-line path=${path}`);
|
|
303
|
+
}
|
|
304
|
+
return toolsLine
|
|
305
|
+
.split(',')
|
|
306
|
+
.map((t) => t.trim())
|
|
307
|
+
.filter((t) => t.length > 0);
|
|
308
|
+
}
|
|
309
|
+
export function expandPlaceholders(raw, vars) {
|
|
310
|
+
return raw.replace(/\$\{([A-Z_][A-Z0-9_]*)\}/g, (m, name) => {
|
|
311
|
+
return Object.prototype.hasOwnProperty.call(vars, name) ? vars[name] : m;
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
/** Task 215 — pull the `<server>` segment out of a qualified MCP tool name
|
|
315
|
+
* the way Claude Code's plugin-tool registry surfaces it. Two shapes
|
|
316
|
+
* exist in the wild:
|
|
317
|
+
*
|
|
318
|
+
* - Long prefix: `mcp__plugin_<plugin>_<server>__<tool>` — emitted by
|
|
319
|
+
* Claude Code when an MCP server is registered via plugin manifest
|
|
320
|
+
* (post-Task-209 native plugin-system path; what `--agent <name>`
|
|
321
|
+
* specialist spawns receive in Registry #1).
|
|
322
|
+
* - Short prefix: `mcp__<server>__<tool>` — emitted by Claude Code when
|
|
323
|
+
* an MCP server is registered via `--mcp-config <path>` (admin operator
|
|
324
|
+
* spawns; what Registry #2 produces directly).
|
|
325
|
+
*
|
|
326
|
+
* Both must resolve to the same `<server>` slug so the probe can match
|
|
327
|
+
* the qualified name against `toolSurface.mcpServers` keys, which the
|
|
328
|
+
* manager populates from PLUGIN.md basenames in `tool-surface.ts`. The
|
|
329
|
+
* pre-Task-215 inline regex `/^mcp__(.+?)__/` extracted `plugin_<plugin>_<server>`
|
|
330
|
+
* from the long-prefix shape (lazy match stops at the first `__`),
|
|
331
|
+
* which never matched any tool-surface key — the failure mode this
|
|
332
|
+
* helper closes.
|
|
333
|
+
*
|
|
334
|
+
* Returns `null` for any name that matches neither shape. The caller
|
|
335
|
+
* surfaces those names through the inventory line's `unparseable-tools=`
|
|
336
|
+
* field so a malformed agent-frontmatter entry can't masquerade as a
|
|
337
|
+
* missing server. */
|
|
338
|
+
export function extractServerNameFromQualifiedTool(qualified) {
|
|
339
|
+
// Long prefix has the literal `plugin` marker between `mcp__` and the
|
|
340
|
+
// plugin slug — Claude Code stamps it for every plugin-manifest MCP
|
|
341
|
+
// server, even when plugin and server slugs are equal (the common
|
|
342
|
+
// maxy case: plugin=memory, server=memory).
|
|
343
|
+
const longMatch = qualified.match(/^mcp__plugin_([^_]+)_([^_]+)__/);
|
|
344
|
+
if (longMatch)
|
|
345
|
+
return longMatch[2];
|
|
346
|
+
// Short prefix has no `plugin` marker; the first segment IS the server
|
|
347
|
+
// slug. Used by admin's `--mcp-config` registrations and by any
|
|
348
|
+
// historical fixture that predates the plugin-manifest rename.
|
|
349
|
+
const shortMatch = qualified.match(/^mcp__([^_]+)__/);
|
|
350
|
+
if (shortMatch)
|
|
351
|
+
return shortMatch[1];
|
|
352
|
+
return null;
|
|
353
|
+
}
|
|
354
|
+
/** Task 215 — classify the agent's frontmatter `tools:` list against the
|
|
355
|
+
* manager's tool-surface registry. Used by both the per-spawn `.mcp.json`
|
|
356
|
+
* writer (admin) and the tool-inventory probe (specialist). Returns the
|
|
357
|
+
* set of server names to spawn AND the two diagnostic sets the inventory
|
|
358
|
+
* line surfaces when non-empty: tokens that didn't parse at all
|
|
359
|
+
* (`unparseableTools`) and parseable tokens whose server isn't in the
|
|
360
|
+
* registry (`missingServers`). Both diagnostic sets are empty in the
|
|
361
|
+
* healthy case, so the existing log line shape stays unchanged for
|
|
362
|
+
* passing spawns. */
|
|
363
|
+
export function classifySpecialistTools(tools, toolSurfaceServers) {
|
|
364
|
+
const matchedServers = new Set();
|
|
365
|
+
const unparseable = [];
|
|
366
|
+
const missingSet = new Set();
|
|
367
|
+
for (const t of tools) {
|
|
368
|
+
const server = extractServerNameFromQualifiedTool(t);
|
|
369
|
+
if (server === null) {
|
|
370
|
+
unparseable.push(t);
|
|
371
|
+
continue;
|
|
372
|
+
}
|
|
373
|
+
if (toolSurfaceServers.has(server)) {
|
|
374
|
+
matchedServers.add(server);
|
|
375
|
+
}
|
|
376
|
+
else if (!missingSet.has(server)) {
|
|
377
|
+
missingSet.add(server);
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
return {
|
|
381
|
+
matchedServers,
|
|
382
|
+
unparseableTools: unparseable,
|
|
383
|
+
missingServers: Array.from(missingSet),
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
/** Builds the placeholder map for per-spawn `mcp.json` env substitution.
|
|
387
|
+
* Exported for Task 142 unit coverage that asserts `PLATFORM_PORT` and
|
|
388
|
+
* `MAXY_BRAND_PORT` resolve from the manager process env, and for
|
|
389
|
+
* Task 476 unit coverage that asserts SESSION_ID equals the passed
|
|
390
|
+
* sessionId and never the accountId. */
|
|
391
|
+
export function buildMcpPlaceholders(p, env = process.env) {
|
|
392
|
+
const platformPort = env.PLATFORM_PORT;
|
|
393
|
+
const maxyBrandPort = env.MAXY_BRAND_PORT;
|
|
394
|
+
if (!platformPort) {
|
|
395
|
+
throw new Error('[claude-session-manager] PLATFORM_PORT not set — manager unit must stamp it (Task 142)');
|
|
396
|
+
}
|
|
397
|
+
if (!maxyBrandPort) {
|
|
398
|
+
throw new Error('[claude-session-manager] MAXY_BRAND_PORT not set — manager unit must stamp it');
|
|
399
|
+
}
|
|
400
|
+
// Task 205 — USER_ID lands in lockstep with ACCOUNT_ID. Empty string on
|
|
401
|
+
// silent-compaction / recorder spawns; never undefined, so JSON
|
|
402
|
+
// serialization of mcp.json yields a stable shape.
|
|
403
|
+
//
|
|
404
|
+
// Task 476 — SESSION_ID is the spawner-minted UUID, passed to claude via
|
|
405
|
+
// `--session-id` (fresh) or `--resume` (restored) so the value the
|
|
406
|
+
// plugin reads matches the value claude writes to its PID file and
|
|
407
|
+
// JSONL. The previous revision aliased this from the senderId field,
|
|
408
|
+
// which on admin spawns equals the accountId — every admin MCP child
|
|
409
|
+
// therefore read SESSION_ID === accountId and stamped that onto every
|
|
410
|
+
// graph write.
|
|
411
|
+
//
|
|
412
|
+
// Task 487 — AGENT_SLUG carries provenance ('admin' for the admin
|
|
413
|
+
// operator, so writes stamp `createdByAgent="admin"`); AGENT_SLUG_SCOPE
|
|
414
|
+
// carries read-scope (empty for the admin operator, so memory-search
|
|
415
|
+
// stays wide-open). They were one var until Task 487 split them.
|
|
416
|
+
// Task 492 — CDP_PORT reaches the `browser` plugin's MCP server so it can
|
|
417
|
+
// attach to the per-brand VNC Chromium. Unlike PLATFORM_PORT/MAXY_BRAND_PORT
|
|
418
|
+
// this does NOT throw when absent: buildMcpPlaceholders runs for every spawn,
|
|
419
|
+
// so a throw would break all agents brand-wide if the stamp ever regressed.
|
|
420
|
+
// CDP is Pi-only — a laptop native-display install has no VNC Chromium — so
|
|
421
|
+
// an empty value is a legitimate state where browser-render returns a loud
|
|
422
|
+
// cdp-unreachable, contained to that one tool.
|
|
423
|
+
return {
|
|
424
|
+
PLATFORM_ROOT: p.platformRoot,
|
|
425
|
+
PREMIUM_PLUGINS_ROOT: join(dirname(p.platformRoot), 'premium-plugins'),
|
|
426
|
+
ACCOUNT_ID: p.accountId,
|
|
427
|
+
USER_ID: p.userId ?? '',
|
|
428
|
+
SESSION_ID: p.sessionId,
|
|
429
|
+
AGENT_SLUG: p.agentSlug,
|
|
430
|
+
AGENT_SLUG_SCOPE: p.agentScopeSlug,
|
|
431
|
+
LOG_DIR: p.logDir,
|
|
432
|
+
PLATFORM_PORT: platformPort,
|
|
433
|
+
MAXY_BRAND_PORT: maxyBrandPort,
|
|
434
|
+
CDP_PORT: env.CDP_PORT ?? '',
|
|
435
|
+
};
|
|
436
|
+
}
|
|
437
|
+
function writePerSpawnMcpConfig(p) {
|
|
438
|
+
const serversForRole = [];
|
|
439
|
+
if (p.specialistTools !== null) {
|
|
440
|
+
// Task 165 — specialist spawn. Project the agent's `tools:`
|
|
441
|
+
// frontmatter to the set of plugin namespaces it references; include
|
|
442
|
+
// only those MCP servers. A specialist that only writes graph
|
|
443
|
+
// (database-operator: memory, contacts, work) does not get the
|
|
444
|
+
// dozens of other admin servers stamped into its mcp.json.
|
|
445
|
+
//
|
|
446
|
+
// Task 215 — uses `classifySpecialistTools` so post-Task-209
|
|
447
|
+
// long-prefix names (`mcp__plugin_<plugin>_<server>__<tool>`) resolve
|
|
448
|
+
// to their `<server>` slug rather than the legacy lazy-regex capture
|
|
449
|
+
// of `plugin_<plugin>_<server>`. This branch is dead for production
|
|
450
|
+
// (Task 207 dropped `.mcp.json` writes for specialists) but the
|
|
451
|
+
// classifier keeps it correct for any future caller and for tests
|
|
452
|
+
// that exercise the legacy path.
|
|
453
|
+
const { matchedServers } = classifySpecialistTools(p.specialistTools, p.toolSurface.mcpServers);
|
|
454
|
+
for (const [name, desc] of p.toolSurface.mcpServers) {
|
|
455
|
+
if (matchedServers.has(name))
|
|
456
|
+
serversForRole.push([name, desc]);
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
else if (p.role === 'admin') {
|
|
460
|
+
for (const [name, desc] of p.toolSurface.mcpServers)
|
|
461
|
+
serversForRole.push([name, desc]);
|
|
462
|
+
}
|
|
463
|
+
// Task 615 — the public agent is toolless by construction. Its per-spawn
|
|
464
|
+
// `.mcp.json` registers ZERO servers; booting any MCP child for a surface
|
|
465
|
+
// whose `--allowed-tools` is empty and whose permissions.deny blocks every
|
|
466
|
+
// tool wastes a process and would surface tools in inventory probes the
|
|
467
|
+
// session can never call. (No `else` branch: serversForRole stays empty.)
|
|
468
|
+
// Task 142 — placeholder set includes PLATFORM_PORT (internal loopback,
|
|
469
|
+
// == MAXY_UI_INTERNAL_PORT) and MAXY_BRAND_PORT (brand-public). Both
|
|
470
|
+
// are stamped on the manager systemd unit by
|
|
471
|
+
// `buildClaudeSessionManagerUnitFile`, so the manager process inherits
|
|
472
|
+
// them and the substitution can never silently fall back.
|
|
473
|
+
const placeholders = buildMcpPlaceholders(p);
|
|
474
|
+
const mcpServers = {};
|
|
475
|
+
for (const [name, desc] of serversForRole) {
|
|
476
|
+
const entry = {
|
|
477
|
+
command: expandPlaceholders(desc.command, placeholders),
|
|
478
|
+
args: desc.args.map((a) => expandPlaceholders(a, placeholders)),
|
|
479
|
+
};
|
|
480
|
+
if (desc.env) {
|
|
481
|
+
const env = {};
|
|
482
|
+
for (const [k, v] of Object.entries(desc.env))
|
|
483
|
+
env[k] = expandPlaceholders(v, placeholders);
|
|
484
|
+
entry.env = env;
|
|
485
|
+
}
|
|
486
|
+
mcpServers[name] = entry;
|
|
487
|
+
}
|
|
488
|
+
const payload = JSON.stringify({ mcpServers }, null, 2);
|
|
489
|
+
// Task 476 — filename uses the minted sessionId so two concurrent
|
|
490
|
+
// spawns never collide. Pre-476 this used `bridgeSuffixHint` (==
|
|
491
|
+
// senderId, == accountId on admin spawns), which DID collide between
|
|
492
|
+
// parallel admin sessions for the same account.
|
|
493
|
+
const fileName = `maxy-mcp-${p.sessionId.replace(/[^A-Za-z0-9_-]/g, '_')}.json`;
|
|
494
|
+
const target = join(p.targetDir, fileName);
|
|
495
|
+
try {
|
|
496
|
+
mkdirSync(p.targetDir, { recursive: true });
|
|
497
|
+
writeFileSync(target, payload, 'utf8');
|
|
498
|
+
}
|
|
499
|
+
catch (err) {
|
|
500
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
501
|
+
p.logger(`mcp-config-write-failed target=${target} err=${JSON.stringify(msg)}`);
|
|
502
|
+
return { ok: false, detail: msg };
|
|
503
|
+
}
|
|
504
|
+
const resolvedServers = new Map();
|
|
505
|
+
for (const [name, entry] of Object.entries(mcpServers)) {
|
|
506
|
+
resolvedServers.set(name, {
|
|
507
|
+
command: entry.command,
|
|
508
|
+
args: entry.args,
|
|
509
|
+
env: entry.env,
|
|
510
|
+
});
|
|
511
|
+
}
|
|
512
|
+
return {
|
|
513
|
+
ok: true,
|
|
514
|
+
path: target,
|
|
515
|
+
bytes: Buffer.byteLength(payload, 'utf8'),
|
|
516
|
+
serverCount: serversForRole.length,
|
|
517
|
+
resolvedServers,
|
|
518
|
+
};
|
|
519
|
+
}
|
|
520
|
+
/** Task 600 — minimum MemAvailable (MB) required to admit a new specialist
|
|
521
|
+
* spawn. Calibrated for the 16GB minimum device spec: 4GB reserve keeps
|
|
522
|
+
* room for one more heavy claude.exe session (~5GB peak) plus OS headroom. */
|
|
523
|
+
const MIN_ADMISSION_MB = 4096;
|
|
524
|
+
/** Read MemAvailable from /proc/meminfo and return in MB.
|
|
525
|
+
* Returns null when /proc/meminfo does not exist (non-Linux). */
|
|
526
|
+
function defaultReadMemAvailableMb() {
|
|
527
|
+
const MEMINFO_PATH = '/proc/meminfo';
|
|
528
|
+
try {
|
|
529
|
+
const content = readFileSync(MEMINFO_PATH, 'utf-8');
|
|
530
|
+
const match = content.match(/^MemAvailable:\s+(\d+)\s+kB/m);
|
|
531
|
+
if (!match)
|
|
532
|
+
return null;
|
|
533
|
+
return Math.floor(Number(match[1]) / 1024);
|
|
534
|
+
}
|
|
535
|
+
catch {
|
|
536
|
+
return null;
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
/** Pre-spawn slot accounting. Returns either a rejection (caller should
|
|
540
|
+
* surface as 503) or undefined when the spawn may proceed. Eviction of an
|
|
541
|
+
* idle specialist row, when needed, happens here too. Operator
|
|
542
|
+
* (non-specialist) spawns are exempt from both guards. */
|
|
543
|
+
function checkSlotsAndMaybeEvict(deps, args) {
|
|
544
|
+
const isSpecialistSpawn = typeof args.specialist === 'string' && args.specialist.length > 0;
|
|
545
|
+
if (!isSpecialistSpawn)
|
|
546
|
+
return undefined;
|
|
547
|
+
// Task 600 — memory gate: reject before touching PTY slots if the host
|
|
548
|
+
// does not have enough free RAM to safely accommodate another heavy session.
|
|
549
|
+
const readMem = deps.readMemAvailableMb ?? defaultReadMemAvailableMb;
|
|
550
|
+
const memAvailableMb = readMem();
|
|
551
|
+
if (memAvailableMb !== null && memAvailableMb < MIN_ADMISSION_MB) {
|
|
552
|
+
deps.logger(`[pty-cap] low-memory account=${deps.accountId} memAvailableMb=${memAvailableMb} thresholdMb=${MIN_ADMISSION_MB} rejected-specialist=${args.senderId}`);
|
|
553
|
+
return { kind: 'low-memory', memAvailableMb, thresholdMb: MIN_ADMISSION_MB };
|
|
554
|
+
}
|
|
555
|
+
const liveRows = deps.watcher.all().filter((r) => r.state === 'live');
|
|
556
|
+
const specialistRows = liveRows.filter((r) => r.agent !== null);
|
|
557
|
+
if (specialistRows.length >= deps.specialistCap) {
|
|
558
|
+
const idleOldest = specialistRows
|
|
559
|
+
.filter((r) => r.status === 'idle' && !existsSync(jsonlPathForSessionId(deps.spawnCwd, r.sessionId)))
|
|
560
|
+
.sort((a, b) => a.updatedAt - b.updatedAt)[0];
|
|
561
|
+
if (!idleOldest) {
|
|
562
|
+
deps.logger(`[pty-cap] specialist-cap-reached account=${deps.accountId} current=${specialistRows.length} cap=${deps.specialistCap} evicted=none`);
|
|
563
|
+
return { kind: 'specialist-cap-reached', currentCount: specialistRows.length, cap: deps.specialistCap };
|
|
564
|
+
}
|
|
565
|
+
const victim = livePtys.get(idleOldest.sessionId);
|
|
566
|
+
if (victim && !victim.exited) {
|
|
567
|
+
// Task 250 — eviction routes through systemctl stop of the scope
|
|
568
|
+
// unit, matching the operator-stop and reaper paths. Without this,
|
|
569
|
+
// an evicted specialist would only die when the manager process
|
|
570
|
+
// closes its master fd (and the SIGHUP wrap inside the scope makes
|
|
571
|
+
// it not die at all). systemctl stop gives systemd the cgroup-level
|
|
572
|
+
// SIGTERM→SIGKILL escalation, with TimeoutStopSec=5 as the ceiling.
|
|
573
|
+
// Task 451 — stopScopeUnit is async; eviction is fire-and-forget by
|
|
574
|
+
// design. The evicted scope is still active (the victim hasn't
|
|
575
|
+
// exited), so the in-cgroup TimeoutStopSec handles SIGTERM→SIGKILL.
|
|
576
|
+
// We don't await, but `.catch` avoids an unhandled-rejection warning.
|
|
577
|
+
// The pid is intentionally omitted: post-flight verify is reserved
|
|
578
|
+
// for the post-restart boot-seed and stopSession paths where the
|
|
579
|
+
// scope may already be collapsed.
|
|
580
|
+
const run = deps.runSystemctl ?? defaultSystemctlRunner;
|
|
581
|
+
void stopScopeUnit(run, victim.scopeUnitToken).catch(() => { });
|
|
582
|
+
}
|
|
583
|
+
livePtys.delete(idleOldest.sessionId);
|
|
584
|
+
trackerRegisteredAt.delete(idleOldest.sessionId);
|
|
585
|
+
deps.logger(`[pty-cap] specialist-cap-reached account=${deps.accountId} current=${specialistRows.length} cap=${deps.specialistCap} evicted=${idleOldest.sessionId} pty-tracker-size=${livePtys.size}`);
|
|
586
|
+
}
|
|
587
|
+
if (liveRows.length >= deps.totalPtyCap - deps.operatorReserve) {
|
|
588
|
+
deps.logger(`[pty-cap] operator-slots-reserved total=${liveRows.length} reserve=${deps.operatorReserve} totalCap=${deps.totalPtyCap} rejected-specialist=${args.senderId}`);
|
|
589
|
+
return {
|
|
590
|
+
kind: 'operator-slots-reserved',
|
|
591
|
+
total: liveRows.length,
|
|
592
|
+
reserve: deps.operatorReserve,
|
|
593
|
+
totalCap: deps.totalPtyCap,
|
|
594
|
+
};
|
|
595
|
+
}
|
|
596
|
+
return undefined;
|
|
597
|
+
}
|
|
598
|
+
/** Task 215 — single source of truth for matching probe results against
|
|
599
|
+
* the frontmatter allowlist. Builds the `offered` set with BOTH short
|
|
600
|
+
* and long prefix shapes so an agent file's `mcp__plugin_<plugin>_<server>__<tool>`
|
|
601
|
+
* declaration intersects with the probe's per-tool reply regardless of
|
|
602
|
+
* which Claude Code registry path registers the server at runtime.
|
|
603
|
+
* `mcpListedCount` is incremented per actual tool, not per prefix variant
|
|
604
|
+
* — the two prefixes refer to the same underlying tool. */
|
|
605
|
+
function buildOfferedSet(result) {
|
|
606
|
+
const offered = new Set();
|
|
607
|
+
let mcpListedCount = 0;
|
|
608
|
+
for (const [serverName, tools] of result) {
|
|
609
|
+
for (const tool of tools) {
|
|
610
|
+
offered.add(`mcp__${serverName}__${tool}`);
|
|
611
|
+
offered.add(`mcp__plugin_${serverName}_${serverName}__${tool}`);
|
|
612
|
+
mcpListedCount++;
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
return { offered, mcpListedCount };
|
|
616
|
+
}
|
|
617
|
+
/** Task 215 — render the optional `unparseable-tools=` and `missing-servers=`
|
|
618
|
+
* fields. Empty inputs return an empty string so the inventory line stays
|
|
619
|
+
* exactly the legacy shape when the spawn is healthy (no need to teach
|
|
620
|
+
* every operator-side grep to skip blank fields). */
|
|
621
|
+
function buildDiagnosticFields(unparseable, missing) {
|
|
622
|
+
let out = '';
|
|
623
|
+
if (unparseable.length > 0)
|
|
624
|
+
out += ` unparseable-tools=${unparseable.join(',')}`;
|
|
625
|
+
if (missing.length > 0)
|
|
626
|
+
out += ` missing-servers=${missing.join(',')}`;
|
|
627
|
+
return out;
|
|
628
|
+
}
|
|
629
|
+
/** Task 178 — fire-and-forget aggregator. Probes each MCP server in the
|
|
630
|
+
* spawn's resolved mcp.json for its `tools/list` reply, then emits one
|
|
631
|
+
* `[pty-spawn-tool-inventory]` line per spawn. Specialist spawns only —
|
|
632
|
+
* operator spawns have no agent frontmatter and the failure shape this
|
|
633
|
+
* closes the gap on is recorder-specific. The function never throws;
|
|
634
|
+
* probe errors emit a `[pty-spawn-tool-inventory-failed]` line on the
|
|
635
|
+
* same logger so the gap is itself observable.
|
|
636
|
+
*
|
|
637
|
+
* Task 215 — accepts `unparseableTools` and `missingServers` from the
|
|
638
|
+
* caller's classifier so the line surfaces both diagnostic classes when
|
|
639
|
+
* non-empty. The two paths catch different defects: an unparseable token
|
|
640
|
+
* signals a malformed frontmatter entry; a missing server signals a typo
|
|
641
|
+
* or a stale plugin name that no longer maps to a tool-surface registry
|
|
642
|
+
* key. */
|
|
643
|
+
function emitToolInventoryAsync(p) {
|
|
644
|
+
p.readMcpToolInventory({ servers: p.resolvedServers, timeoutMs: p.timeoutMs })
|
|
645
|
+
.then((result) => {
|
|
646
|
+
const { offered, mcpListedCount } = buildOfferedSet(result);
|
|
647
|
+
const exposed = [];
|
|
648
|
+
const notExposed = [];
|
|
649
|
+
for (const name of p.frontmatterAllowlist) {
|
|
650
|
+
if (offered.has(name))
|
|
651
|
+
exposed.push(name);
|
|
652
|
+
else
|
|
653
|
+
notExposed.push(name);
|
|
654
|
+
}
|
|
655
|
+
// Task 207 — `argv-tools=0` is now the literal truth for specialist
|
|
656
|
+
// spawns (no `--allowed-tools` push). The frontmatter list is implied
|
|
657
|
+
// by `exposed.length + notExposed.length`; the load-bearing signal is
|
|
658
|
+
// `mcp-listed-tools` (does the agent's plugin namespace resolve via
|
|
659
|
+
// plugin-system?) and `not-exposed` (does it match what the agent
|
|
660
|
+
// declared?). When both reach the brief's target values, the
|
|
661
|
+
// recorder turn produces real `tool_use` blocks.
|
|
662
|
+
const diag = buildDiagnosticFields(p.unparseableTools, p.missingServers);
|
|
663
|
+
p.logger(`[pty-spawn-tool-inventory] sessionId=${p.sessionId} specialist=${p.specialist} argv-tools=0 mcp-listed-tools=${mcpListedCount} exposed=${exposed.join(',')} not-exposed=${notExposed.join(',')}${diag}`);
|
|
664
|
+
})
|
|
665
|
+
.catch((err) => {
|
|
666
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
667
|
+
p.logger(`[pty-spawn-tool-inventory-failed] sessionId=${p.sessionId} specialist=${p.specialist} err=${JSON.stringify(msg)}`);
|
|
668
|
+
});
|
|
669
|
+
}
|
|
670
|
+
const finalSnapshotState = new Map();
|
|
671
|
+
/** Watchdog ceiling for "model never produced a first turn" — if no
|
|
672
|
+
* `[recorder-turn]` lands within this window, the watchdog fires the
|
|
673
|
+
* final snapshot with `reason=first-turn-timeout`. 60 s is the same
|
|
674
|
+
* order-of-magnitude as the PID-file timeout and well below typical
|
|
675
|
+
* operator patience; tunable in tests via `__setFirstTurnTimeoutMsForTests`. */
|
|
676
|
+
const DEFAULT_FIRST_TURN_TIMEOUT_MS = 60_000;
|
|
677
|
+
let firstTurnTimeoutMs = DEFAULT_FIRST_TURN_TIMEOUT_MS;
|
|
678
|
+
/** Test seam. Production never calls this; the `__` prefix matches the
|
|
679
|
+
* in-repo convention for non-API helpers. */
|
|
680
|
+
export function __setFirstTurnTimeoutMsForTests(ms) {
|
|
681
|
+
firstTurnTimeoutMs = ms;
|
|
682
|
+
}
|
|
683
|
+
export function __resetFirstTurnTimeoutMsForTests() {
|
|
684
|
+
firstTurnTimeoutMs = DEFAULT_FIRST_TURN_TIMEOUT_MS;
|
|
685
|
+
}
|
|
686
|
+
/** Task 215 — fire the `[pty-spawn-tool-inventory-final]` line once per
|
|
687
|
+
* specialist spawn. Idempotent: a second call (e.g. watchdog races a
|
|
688
|
+
* late recorder-turn) is a no-op via the `fired` guard. Re-runs the
|
|
689
|
+
* probe against the same resolvedServers map the spawn-time probe used,
|
|
690
|
+
* so the line reports what the probe would observe AT first-turn
|
|
691
|
+
* time — the timing question Phase 1 of Task 215 was filed to answer.
|
|
692
|
+
*
|
|
693
|
+
* The probe is async and the PTY can exit while it's in flight. Both the
|
|
694
|
+
* `.then` and `.catch` paths gate emission on `finalSnapshotState.has`
|
|
695
|
+
* to suppress phantom lines for sessions whose PTY-exit cleanup ran
|
|
696
|
+
* while the probe was still running. The captured `state` reference
|
|
697
|
+
* still holds the logger, so the emission would mechanically work — but
|
|
698
|
+
* it would lie about a dead session, which is worse than no line. */
|
|
699
|
+
function fireFinalSnapshot(sessionId, reason) {
|
|
700
|
+
const state = finalSnapshotState.get(sessionId);
|
|
701
|
+
if (!state || state.fired)
|
|
702
|
+
return;
|
|
703
|
+
state.fired = true;
|
|
704
|
+
if (state.watchdog) {
|
|
705
|
+
clearTimeout(state.watchdog);
|
|
706
|
+
state.watchdog = null;
|
|
707
|
+
}
|
|
708
|
+
state.readMcpToolInventory({ servers: state.resolvedServers, timeoutMs: state.timeoutMs })
|
|
709
|
+
.then((result) => {
|
|
710
|
+
if (!finalSnapshotState.has(sessionId))
|
|
711
|
+
return;
|
|
712
|
+
const { offered, mcpListedCount } = buildOfferedSet(result);
|
|
713
|
+
const exposed = [];
|
|
714
|
+
const notExposed = [];
|
|
715
|
+
for (const name of state.frontmatterAllowlist) {
|
|
716
|
+
if (offered.has(name))
|
|
717
|
+
exposed.push(name);
|
|
718
|
+
else
|
|
719
|
+
notExposed.push(name);
|
|
720
|
+
}
|
|
721
|
+
const msSinceSpawn = Date.now() - state.spawnedAt;
|
|
722
|
+
const diag = buildDiagnosticFields(state.unparseableTools, state.missingServers);
|
|
723
|
+
state.logger(`[pty-spawn-tool-inventory-final] sessionId=${sessionId} specialist=${state.specialist} mcp-listed-tools=${mcpListedCount} exposed=${exposed.join(',')} not-exposed=${notExposed.join(',')} ms-since-spawn=${msSinceSpawn} reason=${reason}${diag}`);
|
|
724
|
+
})
|
|
725
|
+
.catch((err) => {
|
|
726
|
+
if (!finalSnapshotState.has(sessionId))
|
|
727
|
+
return;
|
|
728
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
729
|
+
state.logger(`[pty-spawn-tool-inventory-final-failed] sessionId=${sessionId} specialist=${state.specialist} reason=${reason} err=${JSON.stringify(msg)}`);
|
|
730
|
+
});
|
|
731
|
+
}
|
|
732
|
+
/** Test seam — clear any leftover per-spawn state between tests so a
|
|
733
|
+
* failing test doesn't pollute the next one's Map. Production never
|
|
734
|
+
* invokes this; the only legitimate eviction path is PTY exit. */
|
|
735
|
+
export function __clearFinalSnapshotStateForTests() {
|
|
736
|
+
for (const state of finalSnapshotState.values()) {
|
|
737
|
+
if (state.watchdog)
|
|
738
|
+
clearTimeout(state.watchdog);
|
|
739
|
+
}
|
|
740
|
+
finalSnapshotState.clear();
|
|
741
|
+
}
|
|
742
|
+
export async function spawnClaudeSession(deps, args) {
|
|
743
|
+
const rejection = checkSlotsAndMaybeEvict(deps, args);
|
|
744
|
+
if (rejection) {
|
|
745
|
+
return { ok: false, rejected: rejection };
|
|
746
|
+
}
|
|
747
|
+
const startedAt = new Date().toISOString();
|
|
748
|
+
const start = Date.now();
|
|
749
|
+
// Task 476 — mint the canonical sessionId before any argv work. One
|
|
750
|
+
// UUID end-to-end: passed to claude via `--session-id <uuid>` (fresh)
|
|
751
|
+
// or `--resume <uuid>` (restored); substituted into `${SESSION_ID}` in
|
|
752
|
+
// the per-spawn mcp.json; used as the systemd scope unit token (Task
|
|
753
|
+
// 250); keyed onto the sidecar; returned to the caller. Resume spawns
|
|
754
|
+
// re-use the prior canonical sessionId. The PID file claude writes is
|
|
755
|
+
// asserted (fresh spawns only — see Task 258 comment below) to carry
|
|
756
|
+
// this same UUID; mismatch fails the spawn loudly.
|
|
757
|
+
const sessionId = args.resumeClaudeSessionId ?? randomUUID();
|
|
758
|
+
const sessionIdSource = args.resumeClaudeSessionId ? 'resume' : 'minted';
|
|
759
|
+
const unitToken = sessionId;
|
|
760
|
+
// Task 476/487 — two slugs, one derivation:
|
|
761
|
+
// - agentSlug (provenance → ${AGENT_SLUG}): specialist name on subagent
|
|
762
|
+
// spawns, public agent slug on public spawns, and the 'admin' sentinel
|
|
763
|
+
// on the admin operator spawn so writes stamp `createdByAgent="admin"`
|
|
764
|
+
// instead of "unknown".
|
|
765
|
+
// - agentScopeSlug (read-scope → ${AGENT_SLUG_SCOPE}): the same slug for
|
|
766
|
+
// specialist/public, but EMPTY for the admin operator so memory-search
|
|
767
|
+
// stays wide-open (a non-empty slug activates the `$agentSlug IN
|
|
768
|
+
// node.agents` filter in graph-search). This reproduces the pre-487
|
|
769
|
+
// AGENT_SLUG value exactly — read-scope is unchanged for every role.
|
|
770
|
+
// Specialist/public spawns share one slug for both concerns; only the
|
|
771
|
+
// admin operator (no specialist, no public slug) splits 'admin' vs ''.
|
|
772
|
+
const agentSlug = args.specialist ?? args.agentSlug ?? 'admin';
|
|
773
|
+
const agentScopeSlug = args.specialist ?? args.agentSlug ?? '';
|
|
774
|
+
const composedHost = deps.tunnelUrlOverride !== undefined
|
|
775
|
+
? { ...deps.host, tunnelUrl: deps.tunnelUrlOverride }
|
|
776
|
+
: deps.host;
|
|
777
|
+
// Task 165 — when the spawn is a specialist subagent (`--agent <name>`),
|
|
778
|
+
// the agent file at `$CLAUDE_CONFIG_DIR/agents/<name>.md` IS the prompt.
|
|
779
|
+
// Do not stack admin IDENTITY / SOUL / about-owner / plugin manifests on
|
|
780
|
+
// top: that scaffolding caused the recorder to behave as the admin agent
|
|
781
|
+
// on every turn since Task 147. Operator (non-specialist) spawns retain
|
|
782
|
+
// the full composer.
|
|
783
|
+
const isSpecialistSpawn = typeof args.specialist === 'string' && args.specialist.length > 0;
|
|
784
|
+
let appendSystemPrompt = '';
|
|
785
|
+
// The compose-system-prompt block carries per-section byte counts the
|
|
786
|
+
// [pty-spawn] log line emits later in this function. When the spawn is
|
|
787
|
+
// a specialist subagent we skip composeAppendSystemPrompt entirely, so
|
|
788
|
+
// those byte counts are zero — the agent file IS the prompt.
|
|
789
|
+
let composedBytes = { identity: 0, soul: 0, knowledge: 0, aboutOwner: 0, dormantPlugins: 0 };
|
|
790
|
+
if (!isSpecialistSpawn) {
|
|
791
|
+
const composed = composeAppendSystemPrompt(composedHost,
|
|
792
|
+
// Task 638 — a public spawn composes from agents/<slug>; the slug is
|
|
793
|
+
// args.agentSlug (Task 346), falling back to the bundled default public
|
|
794
|
+
// agent 'public' when a public spawn arrives with no slug. Admin reads
|
|
795
|
+
// agents/admin and carries no slug.
|
|
796
|
+
args.role === 'public'
|
|
797
|
+
? { accountDir: deps.accountDir, role: 'public', agentSlug: args.agentSlug ?? 'public' }
|
|
798
|
+
: { accountDir: deps.accountDir, role: 'admin' }, {
|
|
799
|
+
aboutOwner: args.aboutOwner,
|
|
800
|
+
dormantPlugins: args.dormantPlugins,
|
|
801
|
+
activePlugins: args.activePlugins,
|
|
802
|
+
specialistDomains: args.specialistDomains,
|
|
803
|
+
// role=public spawns surface the visitor's session_key as
|
|
804
|
+
// `<chat-session>` so first-party-link skills (Task 336 property-card
|
|
805
|
+
// click redirect) can correlate the click log to the recommend-fire
|
|
806
|
+
// log. Admin spawns have no visitor identity — sentinel suppressed.
|
|
807
|
+
chatSessionKey: args.role === 'public' ? args.senderId : undefined,
|
|
808
|
+
});
|
|
809
|
+
if (!composed.ok) {
|
|
810
|
+
if (composed.reason === 'host-unresolved') {
|
|
811
|
+
const stderrTail = deps.host.lanIPv4Diagnostic ?? 'append-system-prompt unresolved';
|
|
812
|
+
deps.logger(`spawn-failed reason=host-context-unresolved stderr-tail=${JSON.stringify(stderrTail)}`);
|
|
813
|
+
return { ok: false, reason: 'host-context-unresolved', stderrTail };
|
|
814
|
+
}
|
|
815
|
+
const sep = composed.detail.lastIndexOf(':');
|
|
816
|
+
const file = sep > 0 ? composed.detail.slice(0, sep) : composed.detail;
|
|
817
|
+
const err = sep > 0 ? composed.detail.slice(sep + 1) : '';
|
|
818
|
+
// Task 618 — public dud refusals (empty/missing SOUL or KNOWLEDGE) carry
|
|
819
|
+
// their own reason so creation/Test-Greet names the file to author. The
|
|
820
|
+
// visitor sees an unavailable state; the dud is never served.
|
|
821
|
+
if (composed.reason === 'soul-empty' ||
|
|
822
|
+
composed.reason === 'knowledge-missing' ||
|
|
823
|
+
composed.reason === 'knowledge-empty') {
|
|
824
|
+
deps.logger(`[pty-spawn] spawn-failed reason=${composed.reason} role=public slug=${agentSlug} file=${file} err=${err}`);
|
|
825
|
+
return { ok: false, reason: composed.reason, stderrTail: composed.detail };
|
|
826
|
+
}
|
|
827
|
+
deps.logger(`[pty-spawn] spawn-failed reason=identity-unresolved accountDir=${deps.accountDir} role=${args.role} file=${file} err=${err}`);
|
|
828
|
+
return { ok: false, reason: 'identity-unresolved', stderrTail: composed.detail };
|
|
829
|
+
}
|
|
830
|
+
appendSystemPrompt = composed.block;
|
|
831
|
+
composedBytes = {
|
|
832
|
+
identity: composed.identityBytes,
|
|
833
|
+
soul: composed.soulBytes,
|
|
834
|
+
knowledge: composed.knowledgeBytes,
|
|
835
|
+
aboutOwner: composed.aboutOwnerBytes,
|
|
836
|
+
dormantPlugins: composed.dormantPluginsBytes,
|
|
837
|
+
};
|
|
838
|
+
deps.logger(`compose-system-prompt-ok role=${args.role} accountDir=${deps.accountDir} appendSystemPromptBytes=${Buffer.byteLength(appendSystemPrompt, 'utf8')} identityBytes=${composed.identityBytes} soulBytes=${composed.soulBytes} knowledgeBytes=${composed.knowledgeBytes} aboutOwnerBytes=${composed.aboutOwnerBytes} dormantPluginsBytes=${composed.dormantPluginsBytes} pluginManifestBytes=${composed.pluginManifestBytes} specialistDomainsBytes=${composed.specialistDomainsBytes} chatSessionBytes=${composed.chatSessionBytes}`);
|
|
839
|
+
// Task 618 — one structured line per public compose carries the byte
|
|
840
|
+
// counts so "did KNOWLEDGE reach the prompt?" is answerable from logs
|
|
841
|
+
// without reproduction. knowledgeBytes=0 cannot occur on a successful
|
|
842
|
+
// public spawn (empty ⇒ refusal), so a 0 here would itself be the anomaly.
|
|
843
|
+
if (args.role === 'public') {
|
|
844
|
+
deps.logger(`[pty-spawn] op=public-prompt-compose role=public slug=${agentSlug} identityBytes=${composed.identityBytes} soulBytes=${composed.soulBytes} knowledgeBytes=${composed.knowledgeBytes}`);
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
else {
|
|
848
|
+
deps.logger(`compose-system-prompt-skipped role=${args.role} specialist=${args.specialist} reason=agent-file-is-the-prompt`);
|
|
849
|
+
}
|
|
850
|
+
// Task 171 — headless specialists drop --remote-control and the
|
|
851
|
+
// URL-capture handler. The flag is load-bearing only for spawns whose
|
|
852
|
+
// session_<id> URL an operator opens in a browser.
|
|
853
|
+
//
|
|
854
|
+
// Task 500 — public/visitor spawns also drop --remote-control. Visitors
|
|
855
|
+
// drive the conversation through the channel-pty bridge, never the
|
|
856
|
+
// session_<id> RC URL, so the flag is dead weight (one idle outbound
|
|
857
|
+
// WebSocket per visitor). Admin interactive sessions now run under the
|
|
858
|
+
// per-account `claude rc` daemon, not per-spawn --remote-control.
|
|
859
|
+
const headless = isSpecialistSpawn && HEADLESS_ROLES.has(args.specialist);
|
|
860
|
+
const remoteControl = !headless && args.role !== 'public';
|
|
861
|
+
const argv = ['--verbose'];
|
|
862
|
+
if (remoteControl)
|
|
863
|
+
argv.push('--remote-control');
|
|
864
|
+
if (!isSpecialistSpawn) {
|
|
865
|
+
argv.push('--append-system-prompt', appendSystemPrompt);
|
|
866
|
+
}
|
|
867
|
+
if (args.resumeClaudeSessionId) {
|
|
868
|
+
argv.push('--resume', args.resumeClaudeSessionId);
|
|
869
|
+
}
|
|
870
|
+
else {
|
|
871
|
+
// Task 476 — pass the minted sessionId to claude so its PID file and
|
|
872
|
+
// JSONL carry the same UUID the spawner already stamped into
|
|
873
|
+
// mcp.json, the sidecar key, and the systemd unit token. Without
|
|
874
|
+
// this, claude mints its own and the spawner had to scrape the PID
|
|
875
|
+
// file to learn it.
|
|
876
|
+
argv.push('--session-id', sessionId);
|
|
877
|
+
}
|
|
878
|
+
if (args.specialist) {
|
|
879
|
+
argv.push('--agent', args.specialist);
|
|
880
|
+
}
|
|
881
|
+
if (args.model) {
|
|
882
|
+
argv.push('--model', args.model);
|
|
883
|
+
}
|
|
884
|
+
if (args.channels && args.channels.length > 0) {
|
|
885
|
+
for (const ch of args.channels) {
|
|
886
|
+
argv.push('--channels', ch);
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
// Task 165 — specialist spawn narrows `--allowed-tools` to the agent's
|
|
890
|
+
// frontmatter `tools:` list, not the admin surface. Pre-165, every
|
|
891
|
+
// specialist (recorder, etc.) was launched with the full 131-tool admin
|
|
892
|
+
// allowlist, defeating the agent file's gate. Operator spawns retain
|
|
893
|
+
// the role-based surface.
|
|
894
|
+
let specialistTools = null;
|
|
895
|
+
let strippedCount = 0;
|
|
896
|
+
if (isSpecialistSpawn) {
|
|
897
|
+
try {
|
|
898
|
+
specialistTools = readSpecialistTools(deps.claudeConfigDir, args.specialist);
|
|
899
|
+
}
|
|
900
|
+
catch (err) {
|
|
901
|
+
const detail = err instanceof Error ? err.message : String(err);
|
|
902
|
+
deps.logger(`spawn-failed reason=identity-unresolved detail=${JSON.stringify(detail)}`);
|
|
903
|
+
return { ok: false, reason: 'identity-unresolved', stderrTail: detail };
|
|
904
|
+
}
|
|
905
|
+
// Task 173 — brand-excluded tools from boot-time drift land in
|
|
906
|
+
// deps.specialistToolStripList. Drop them before they reach argv so
|
|
907
|
+
// the spawn does not pass a `--allowed-tools` name whose MCP server
|
|
908
|
+
// is absent from this brand. The strip is per-specialist and exact-
|
|
909
|
+
// match by tool name; the drift assertion has already determined
|
|
910
|
+
// which tools belong here.
|
|
911
|
+
const stripSet = deps.specialistToolStripList?.get(args.specialist);
|
|
912
|
+
if (stripSet && stripSet.size > 0) {
|
|
913
|
+
const filtered = specialistTools.filter((t) => !stripSet.has(t));
|
|
914
|
+
strippedCount = specialistTools.length - filtered.length;
|
|
915
|
+
specialistTools = filtered;
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
// Task 207 — specialist spawns no longer push `--allowed-tools` argv.
|
|
919
|
+
// `--agent <name>` resolves the agent file's `tools:` frontmatter
|
|
920
|
+
// natively against Claude Code's plugin-tool registry (registry #1);
|
|
921
|
+
// the argv push was Task 165's belt-and-suspenders mirror that became
|
|
922
|
+
// load-bearing in the wrong direction after Task 203's `mcp__plugin_…`
|
|
923
|
+
// rename: the per-spawn `.mcp.json` registered servers under the
|
|
924
|
+
// bare-name namespace, so the renamed argv filter found zero matches
|
|
925
|
+
// and collapsed registry #2 to empty. Specialist agent-frontmatter
|
|
926
|
+
// tools are still READ above (jsonlTail.register consumes the array,
|
|
927
|
+
// strip-list observability still fires) but never reach argv.
|
|
928
|
+
// Operator (non-specialist) spawns retain the role-based push.
|
|
929
|
+
// Task 615 — every public spawn (any channel) gets ZERO tools. The per-spawn
|
|
930
|
+
// permissions.deny below is the authority; the allowlist exposes nothing and
|
|
931
|
+
// the attachment Read scope is dropped. Replaces the Task 346 liveMemory
|
|
932
|
+
// toggle, which only ever narrowed the public memory surface and is removed.
|
|
933
|
+
const isPublic = args.role === 'public';
|
|
934
|
+
const allowed = specialistTools !== null
|
|
935
|
+
? Array.from(new Set(specialistTools)).sort()
|
|
936
|
+
: (() => {
|
|
937
|
+
// Task 615 — expose nothing for any public spawn. The Task 609 sentinel
|
|
938
|
+
// below keeps --allowed-tools non-empty so dontAsk stays fail-closed.
|
|
939
|
+
if (isPublic)
|
|
940
|
+
return [];
|
|
941
|
+
// Task 579 — the admin operator spawn unions in every Claude Code
|
|
942
|
+
// native tool. The PLUGIN.md-derived `toolSurface.admin` covers only
|
|
943
|
+
// MCP tools; without this union, `--allowed-tools` is set explicitly
|
|
944
|
+
// to that subset and the CLI silently denies the built-ins (LS,
|
|
945
|
+
// Glob, Read, Bash, …), so the admin seat could not enumerate its
|
|
946
|
+
// own disk.
|
|
947
|
+
const unioned = new Set(deps.toolSurface.admin);
|
|
948
|
+
for (const t of CC_NATIVE_TOOLS)
|
|
949
|
+
unioned.add(t);
|
|
950
|
+
return Array.from(unioned).sort();
|
|
951
|
+
})();
|
|
952
|
+
if (isSpecialistSpawn) {
|
|
953
|
+
deps.logger(`pty-spawn-allowlist specialist=${args.specialist} source=native-agent-flag count=skipped stripped=${strippedCount}`);
|
|
954
|
+
}
|
|
955
|
+
else {
|
|
956
|
+
for (const tool of allowed) {
|
|
957
|
+
argv.push('--allowed-tools', tool);
|
|
958
|
+
}
|
|
959
|
+
const excludedSample = args.role === 'public'
|
|
960
|
+
? Array.from(deps.toolSurface.admin).filter((t) => !deps.toolSurface.public.has(t)).sort().slice(0, 5).join(',')
|
|
961
|
+
: '';
|
|
962
|
+
// Task 615 — every public spawn resolves an empty allowlist and denies the
|
|
963
|
+
// whole surface, so report the closed posture; the authority is the
|
|
964
|
+
// op=public-deny-injected line.
|
|
965
|
+
const memoryField = isPublic ? ` memory=denied(zero-tool-surface)` : '';
|
|
966
|
+
deps.logger(`tool-allowlist role=${args.role} count=${allowed.length} excluded=${excludedSample}${memoryField}`);
|
|
967
|
+
}
|
|
968
|
+
// Task 485 — observability for the gated/open public-spawn split. Mode
|
|
969
|
+
// is inferred from the presence of the slice token (caller's bridge has
|
|
970
|
+
// already gated the spawn on the cookie + accessMode). admin spawns are
|
|
971
|
+
// skipped — the line is only meaningful on `role=public`.
|
|
972
|
+
if (args.role === 'public') {
|
|
973
|
+
const mode = args.sliceToken && args.sliceToken.length > 0 ? 'gated' : 'open';
|
|
974
|
+
const sliceField = args.sliceToken && args.sliceToken.length > 0
|
|
975
|
+
? args.sliceToken.slice(0, 8)
|
|
976
|
+
: 'none';
|
|
977
|
+
const personField = args.personId && args.personId.length > 0 ? args.personId : 'none';
|
|
978
|
+
deps.logger(`[pty-spawn] role=public mode=${mode} sliceToken=${sliceField} personId=${personField}`);
|
|
979
|
+
}
|
|
980
|
+
// Task 222 — the admin memory-write/update revoke that Task 213 implemented
|
|
981
|
+
// at this CLI boundary moved to a PreToolUse hook, which Task 575 then
|
|
982
|
+
// deleted entirely. Delegation boundaries (admin direct vs Task subagent)
|
|
983
|
+
// are now governed at the doctrine layer via IDENTITY.md. The CLI
|
|
984
|
+
// `--disallowed-tools` flag was load-bearing in the wrong direction: it
|
|
985
|
+
// filters the tool surface of the spawned Claude Code process AND every
|
|
986
|
+
// in-window Task subagent spawned from it, so the
|
|
987
|
+
// admin-delegates-graph-write-to-database-operator contract introduced
|
|
988
|
+
// by Task 214 stopped working — database-operator's frontmatter listed
|
|
989
|
+
// the writers, but the inherited CLI deny stripped them.
|
|
990
|
+
//
|
|
991
|
+
// Task 207 — `--permission-mode bypassPermissions` for specialist spawns
|
|
992
|
+
// when the caller has not explicitly set one. Headless specialists have
|
|
993
|
+
// no operator to consent to write-tool invocations; default mode blocks
|
|
994
|
+
// them with `Claude requested permissions to use mcp__plugin_…, but you
|
|
995
|
+
// haven't granted it yet` and the recorder turn ends with zero writes.
|
|
996
|
+
// Operator (non-specialist) spawns keep default mode — the operator IS
|
|
997
|
+
// the consenter.
|
|
998
|
+
//
|
|
999
|
+
// Task 211 / 232 / 236 — modes whose first-time entry shows a consent
|
|
1000
|
+
// dialog pre-accept it by passing `--settings` (the `flagSettings`
|
|
1001
|
+
// source in Claude Code's settings precedence chain) with the
|
|
1002
|
+
// matching documented skip-prompt key. Without it the PTY hangs at the
|
|
1003
|
+
// prompt until the fs-watcher pid-file 30 s timeout kills it. The
|
|
1004
|
+
// Claude Code binary ships two such keys (`strings $(which claude) |
|
|
1005
|
+
// grep '^skip[A-Z][a-zA-Z]*Prompt$'`):
|
|
1006
|
+
//
|
|
1007
|
+
// bypassPermissions → skipDangerousModePermissionPrompt
|
|
1008
|
+
// ("Yes, I accept / No, exit" disclaimer)
|
|
1009
|
+
// every other mode → skipAutoPermissionPrompt
|
|
1010
|
+
// ("Enable auto mode?" first-time consent)
|
|
1011
|
+
//
|
|
1012
|
+
// Task 576 — claude v2.1.158 surfaces the auto-mode consent on
|
|
1013
|
+
// default-mode launches too, not only on `--permission-mode=auto`.
|
|
1014
|
+
// Default-mode PTYs hung at the prompt with `flag-settings-bytes=0`
|
|
1015
|
+
// until the fs-watcher killed them at the 30 s timeout.
|
|
1016
|
+
//
|
|
1017
|
+
// Task 605 — the brand's `settings.json` ships `permissions.defaultMode:
|
|
1018
|
+
// bypassPermissions`. When the spawn argv omits `--permission-mode`
|
|
1019
|
+
// (the `default` branch below skips it) Claude Code falls back to that
|
|
1020
|
+
// `userSettings` value and the session is actually elevated to bypass —
|
|
1021
|
+
// surfacing the dangerous-mode disclaimer, NOT the auto-mode prompt. A
|
|
1022
|
+
// `default`-mode spawn that only waived `skipAutoPermissionPrompt` hung
|
|
1023
|
+
// at the disclaimer until the 30 s timeout (public chat `cafe65db`).
|
|
1024
|
+
// Because the effective mode at the binary depends on settings the
|
|
1025
|
+
// spawner does not read, every mode now waives BOTH prompts — a skip
|
|
1026
|
+
// key for a prompt that does not appear is a no-op. The waiver MUST
|
|
1027
|
+
// stay per-spawn — writing it into the brand's
|
|
1028
|
+
// `~/.<brand>/.claude/settings.json` (the `userSettings` source) would
|
|
1029
|
+
// permanently waive the disclaimer for every Claude Code session under
|
|
1030
|
+
// the brand. Task 232 added the bypass row; Task 236 added the auto
|
|
1031
|
+
// row; Task 576 broadened to default/plan/acceptEdits; Task 605 made
|
|
1032
|
+
// every mode waive both prompts. New keys land here by extending the
|
|
1033
|
+
// map; no other call site needs to change.
|
|
1034
|
+
// Task 506 — public web-chat sessions face untrusted internet input and
|
|
1035
|
+
// have no operator to answer a permission prompt. Left in `default` mode
|
|
1036
|
+
// they inherit the brand `settings.json` `permissions.defaultMode:
|
|
1037
|
+
// bypassPermissions` + `allow: ["*"]` (seeded by Task 583 for the
|
|
1038
|
+
// claude.ai/code admin surface), which nullifies the narrow public
|
|
1039
|
+
// `--allowed-tools` list and grants the anonymous visitor full native
|
|
1040
|
+
// tools (Bash/Write/Edit/Read) auto-approved — a fail-OPEN RCE-class
|
|
1041
|
+
// exposure, and the agent flails with those tools until the 120 s webchat
|
|
1042
|
+
// turn-timeout fires. `dontAsk` is fail-CLOSED: it never prompts and
|
|
1043
|
+
// auto-denies any tool not in `--allowed-tools`, and the explicit
|
|
1044
|
+
// `--permission-mode dontAsk` flag overrides the brand `defaultMode`.
|
|
1045
|
+
// Verified on the device (claude 2.1.160): `dontAsk` denies Bash even with
|
|
1046
|
+
// `allow: ["*"]` present. The gate is central here (the single spawn
|
|
1047
|
+
// chokepoint) rather than threaded per-caller, and is scoped to
|
|
1048
|
+
// `webchat` — WhatsApp/Telegram share the profile but stay `default`
|
|
1049
|
+
// pending a separate decision (Task 506 scope). An explicit
|
|
1050
|
+
// `args.permissionMode` (operator-selected) still wins.
|
|
1051
|
+
// Task 612 / 615 — every public spawn is an anonymous, zero-tool surface; it
|
|
1052
|
+
// is pinned to the strictest mode and is NOT operator-overridable. Forcing
|
|
1053
|
+
// dontAsk here (rather than letting `args.permissionMode` win, as Task 506
|
|
1054
|
+
// allowed) keeps the empty-allowlist 609 sentinel reachable and prevents a
|
|
1055
|
+
// future caller from downgrading the surface to bypassPermissions, which would
|
|
1056
|
+
// skip the per-spawn permissions.deny entirely. Other roles keep the
|
|
1057
|
+
// operator-selected mode.
|
|
1058
|
+
const effectiveMode = isSpecialistSpawn
|
|
1059
|
+
? (args.permissionMode ?? 'bypassPermissions')
|
|
1060
|
+
: isPublic
|
|
1061
|
+
? 'dontAsk'
|
|
1062
|
+
: (args.permissionMode ?? 'default');
|
|
1063
|
+
const BOTH_PROMPTS = '{"skipDangerousModePermissionPrompt":true,"skipAutoPermissionPrompt":true}';
|
|
1064
|
+
const FLAG_SETTINGS_BY_MODE = {
|
|
1065
|
+
bypassPermissions: BOTH_PROMPTS,
|
|
1066
|
+
auto: BOTH_PROMPTS,
|
|
1067
|
+
default: BOTH_PROMPTS,
|
|
1068
|
+
plan: BOTH_PROMPTS,
|
|
1069
|
+
acceptEdits: BOTH_PROMPTS,
|
|
1070
|
+
dontAsk: BOTH_PROMPTS,
|
|
1071
|
+
};
|
|
1072
|
+
let flagSettingsValue = FLAG_SETTINGS_BY_MODE[effectiveMode] ?? '';
|
|
1073
|
+
// Task 612 / 615 — merge the zero-tool-surface permissions.deny into the SAME
|
|
1074
|
+
// --settings that carries the prompt-skip keys. Measured: this per-spawn deny
|
|
1075
|
+
// beats the brand allow:["*"] (the only lever that does). The gate binds on
|
|
1076
|
+
// role=public (every channel), not on effectiveMode — an operator who
|
|
1077
|
+
// hand-picks a non-dontAsk mode for a public spawn still gets the closed
|
|
1078
|
+
// surface.
|
|
1079
|
+
if (isPublic) {
|
|
1080
|
+
const base = flagSettingsValue ? JSON.parse(flagSettingsValue) : {};
|
|
1081
|
+
const deny = buildPublicDeny();
|
|
1082
|
+
base.permissions = { ...(base.permissions ?? {}), deny };
|
|
1083
|
+
flagSettingsValue = JSON.stringify(base);
|
|
1084
|
+
deps.logger(`op=public-deny-injected count=${deny.length} tools=${deny.join(',')}`);
|
|
1085
|
+
}
|
|
1086
|
+
if (effectiveMode !== 'default') {
|
|
1087
|
+
argv.push('--permission-mode', effectiveMode);
|
|
1088
|
+
}
|
|
1089
|
+
if (flagSettingsValue) {
|
|
1090
|
+
argv.push('--settings', flagSettingsValue);
|
|
1091
|
+
}
|
|
1092
|
+
// Task 278 — when auto is requested, capture the binary's
|
|
1093
|
+
// `[auto-mode] verifyAutoModeGateAccess: enabledState=...` debug line
|
|
1094
|
+
// so the manager can derive `effectivePermissionMode` and surface a
|
|
1095
|
+
// downgrade in the admin UI. The 2.1.150 binary writes `auto` to the
|
|
1096
|
+
// JSONL `permission-mode` record whether or not it actually entered
|
|
1097
|
+
// auto at runtime, so the JSONL is not a usable signal source. The
|
|
1098
|
+
// `--debug=auto-mode` category filter narrows the file to one line per
|
|
1099
|
+
// gate-check (about 237 bytes). Task 476 — sessionId is now known up
|
|
1100
|
+
// front, so the debug file is written directly to its canonical
|
|
1101
|
+
// `<sessionId>.permission-mode.log` path; the prior pending-path +
|
|
1102
|
+
// post-waitForPid rename dance (Task 278) collapsed once unitToken
|
|
1103
|
+
// and sessionId unified. Non-auto spawns are untouched.
|
|
1104
|
+
if (effectiveMode === 'auto') {
|
|
1105
|
+
const projectsDir = projectsDirForCwd(deps.spawnCwd);
|
|
1106
|
+
mkdirSync(projectsDir, { recursive: true });
|
|
1107
|
+
const permissionModeLogPath = permissionModeLogPathForSessionId(deps.spawnCwd, sessionId);
|
|
1108
|
+
writeFileSync(permissionModeLogPath, '');
|
|
1109
|
+
argv.push('--debug=auto-mode', `--debug-file=${permissionModeLogPath}`);
|
|
1110
|
+
}
|
|
1111
|
+
// Single MCP channel (Task 502). Admin and specialist spawns take platform
|
|
1112
|
+
// MCPs only from installed plugins (long prefix `mcp__plugin_<p>_<p>__<t>`),
|
|
1113
|
+
// never the per-spawn `.mcp.json` — registering the same server through both
|
|
1114
|
+
// channels let the plugin channel win the name collision while the
|
|
1115
|
+
// instructions referenced the short per-spawn name, so short-prefix calls
|
|
1116
|
+
// failed until the model guessed the long name. Per-account env (ACCOUNT_ID,
|
|
1117
|
+
// USER_ID, NEO4J_URI, NEO4J_PASSWORD, PLATFORM_ROOT, CLAUDE_CONFIG_DIR) rides
|
|
1118
|
+
// the PTY env block below. Public spawns keep the per-spawn write so the
|
|
1119
|
+
// toolless visitor boots ZERO MCP servers (Task 615): the written file carries
|
|
1120
|
+
// an empty `mcpServers`, and `--strict-mcp-config` below blocks auto-discovery
|
|
1121
|
+
// of any project `.mcp.json`, so no server reaches an anonymous visitor.
|
|
1122
|
+
let mcpConfigResult = null;
|
|
1123
|
+
if (args.role === 'public' && !isSpecialistSpawn) {
|
|
1124
|
+
mcpConfigResult = writePerSpawnMcpConfig({
|
|
1125
|
+
role: args.role,
|
|
1126
|
+
toolSurface: deps.toolSurface,
|
|
1127
|
+
accountId: deps.accountId,
|
|
1128
|
+
userId: args.userId,
|
|
1129
|
+
platformRoot: deps.platformRoot,
|
|
1130
|
+
logDir: deps.logDir,
|
|
1131
|
+
sessionId,
|
|
1132
|
+
agentSlug,
|
|
1133
|
+
agentScopeSlug,
|
|
1134
|
+
targetDir: deps.mcpConfigDir ?? tmpdir(),
|
|
1135
|
+
logger: deps.logger,
|
|
1136
|
+
specialistTools,
|
|
1137
|
+
});
|
|
1138
|
+
if (!mcpConfigResult.ok) {
|
|
1139
|
+
return { ok: false, reason: 'mcp-config-write-failed', stderrTail: mcpConfigResult.detail };
|
|
1140
|
+
}
|
|
1141
|
+
argv.push('--mcp-config', mcpConfigResult.path);
|
|
1142
|
+
// Task 205 — surface whether the placeholder map received a non-empty
|
|
1143
|
+
// USER_ID. Silent-compaction / recorder spawns legitimately stamp empty;
|
|
1144
|
+
// a cookie-auth admin spawn with userId-present=no is a regression and
|
|
1145
|
+
// names exactly which spawn produced the `MissingUserIdError` later.
|
|
1146
|
+
deps.logger(`pty-spawn-mcp-config-env userId-present=${args.userId && args.userId.length > 0 ? 'yes' : 'no'}`);
|
|
1147
|
+
}
|
|
1148
|
+
// Task 502 — every pty-spawn passes `--strict-mcp-config` so Claude Code uses
|
|
1149
|
+
// only explicit MCP sources and never auto-discovers a project `.mcp.json`.
|
|
1150
|
+
// Admin + specialist spawns therefore take platform MCPs solely from installed
|
|
1151
|
+
// plugins (long prefix); public spawns add their restricted `--mcp-config`
|
|
1152
|
+
// above. The `claude rc` daemon no longer writes a project `.mcp.json` (its
|
|
1153
|
+
// composer sessions ride installed plugins via the daemon child env), so there
|
|
1154
|
+
// is no short-prefix project file left to collide with the long names.
|
|
1155
|
+
argv.push('--strict-mcp-config');
|
|
1156
|
+
const dirsToAdd = [...deps.agentsDirs[args.role]];
|
|
1157
|
+
if (args.role === 'admin' && existsSync(deps.perAccountSpecialistsDir)) {
|
|
1158
|
+
dirsToAdd.push(deps.perAccountSpecialistsDir);
|
|
1159
|
+
}
|
|
1160
|
+
for (const d of dirsToAdd) {
|
|
1161
|
+
argv.push('--add-dir', d);
|
|
1162
|
+
deps.logger(`pty-spawn-agents-dir role=${args.role} path=${d}`);
|
|
1163
|
+
}
|
|
1164
|
+
if (mcpConfigResult) {
|
|
1165
|
+
deps.logger(`pty-spawn-mcp-config servers=${mcpConfigResult.serverCount} tools=${allowed.length} bytes=${mcpConfigResult.bytes} path=${mcpConfigResult.path}`);
|
|
1166
|
+
}
|
|
1167
|
+
else {
|
|
1168
|
+
// Admin + specialist spawns omit the per-spawn .mcp.json (Task 502 / 207);
|
|
1169
|
+
// their MCP registration is the installed-plugin channel (long prefix),
|
|
1170
|
+
// visible via the plugin-manifest log chain at session start, not here.
|
|
1171
|
+
deps.logger(`pty-spawn-mcp-config role=${args.role} specialist=${args.specialist ?? 'none'} source=installed-plugins`);
|
|
1172
|
+
}
|
|
1173
|
+
// Task 612 / 615 — every public spawn denies all native Read (no path-scoped
|
|
1174
|
+
// carve-out survives the brand allow:["*"]), so no attachment --add-dir + Read
|
|
1175
|
+
// scope is pushed on any public channel; redelivering uploads off native Read
|
|
1176
|
+
// is Task 613.
|
|
1177
|
+
// Task 609 — a public spawn runs in dontAsk (Task 506 / 615), which
|
|
1178
|
+
// fail-closes only against tools NOT in an explicit --allowed-tools. The
|
|
1179
|
+
// public surface now resolves empty on every channel (Task 615), so the loops
|
|
1180
|
+
// above push NO --allowed-tools flag, leaving dontAsk nothing to deny against
|
|
1181
|
+
// and the brand settings.json allow:["*"] re-opens every native tool to an
|
|
1182
|
+
// anonymous visitor (fail-OPEN, the c11777df repro). Anchor the closed posture
|
|
1183
|
+
// with one non-native deny-basis token: its MCP server `none` is never
|
|
1184
|
+
// registered, so it grants nothing while making --allowed-tools present and
|
|
1185
|
+
// non-empty. Native exclusion is checked by bare name against CC_NATIVE_TOOLS.
|
|
1186
|
+
// Must precede the `--` prompt sentinel below, which ends option parsing. The
|
|
1187
|
+
// guard binds on effectiveMode === 'dontAsk', not the channel — every public
|
|
1188
|
+
// spawn resolves to dontAsk, and an operator-selected dontAsk admin spawn is
|
|
1189
|
+
// anchored too; both are the correct fail-closed invariant.
|
|
1190
|
+
if (effectiveMode === 'dontAsk') {
|
|
1191
|
+
const emittedAllowed = [];
|
|
1192
|
+
for (let k = 0; k < argv.length - 1; k++) {
|
|
1193
|
+
if (argv[k] === '--allowed-tools')
|
|
1194
|
+
emittedAllowed.push(argv[k + 1]);
|
|
1195
|
+
}
|
|
1196
|
+
if (emittedAllowed.length === 0) {
|
|
1197
|
+
argv.push('--allowed-tools', DONTASK_DENY_BASIS);
|
|
1198
|
+
emittedAllowed.push(DONTASK_DENY_BASIS);
|
|
1199
|
+
}
|
|
1200
|
+
const nativeExcluded = !emittedAllowed.some((t) => CC_NATIVE_TOOLS.has(t));
|
|
1201
|
+
deps.logger(`op=dontask-allowlist-guard count=${emittedAllowed.length} nativeExcluded=${nativeExcluded}`);
|
|
1202
|
+
// Brief-mandated backstop. Unreachable while the anchor above is
|
|
1203
|
+
// unconditional; it exists so a future change that conditions the anchor
|
|
1204
|
+
// away cannot silently reintroduce a fail-open dontAsk launch.
|
|
1205
|
+
if (emittedAllowed.length === 0) {
|
|
1206
|
+
deps.logger(`spawn-config-error reason=dontask-empty-allowlist sessionId=${sessionId} channel=${args.channel}`);
|
|
1207
|
+
return { ok: false, reason: 'dontask-empty-allowlist', stderrTail: 'dontAsk spawn produced an empty --allowed-tools (Task 609)' };
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
// Task 153 / 162 — trailing positional `prompt`. The claude CLI signature
|
|
1211
|
+
// is `claude [options] [command] [prompt]`; when set, the string becomes
|
|
1212
|
+
// the session's first user turn at PTY startup. The POSIX `--` sentinel
|
|
1213
|
+
// ends options parsing so the preceding variadic flags (`--add-dir`,
|
|
1214
|
+
// `--allowed-tools`) cannot swallow the prompt as another value.
|
|
1215
|
+
const promptBytes = Buffer.byteLength(args.initialMessage ?? '', 'utf8');
|
|
1216
|
+
let promptPositional = false;
|
|
1217
|
+
if (args.initialMessage && args.initialMessage.length > 0) {
|
|
1218
|
+
argv.push('--', args.initialMessage);
|
|
1219
|
+
promptPositional = true;
|
|
1220
|
+
}
|
|
1221
|
+
const hooksResolved = discoverHooks(deps.spawnCwd, process.env.CLAUDE_CONFIG_DIR);
|
|
1222
|
+
// Task 205 — `userId` slug on the spawn-start line lets the operator
|
|
1223
|
+
// pair a spawn with the subsequent jsonl. `absent` only on documented
|
|
1224
|
+
// silent-compaction / recorder paths. Slice pattern matches the UI
|
|
1225
|
+
// route's spawn-request-in log (claude-sessions.ts).
|
|
1226
|
+
const userIdSlug = args.userId ? args.userId.slice(0, 8) : 'absent';
|
|
1227
|
+
// Task 207 — assemble the PTY env once so the spawn-start log can name
|
|
1228
|
+
// the explicit specialist-env keys before the spawn fires. The keys-only
|
|
1229
|
+
// surface lets `grep env-keys=` on server.log confirm the contract at
|
|
1230
|
+
// spawn time without leaking secret values into logs.
|
|
1231
|
+
const spawnEnv = {
|
|
1232
|
+
...process.env,
|
|
1233
|
+
TERM: 'xterm-256color',
|
|
1234
|
+
MAXY_SESSION_ROLE: args.role,
|
|
1235
|
+
MAXY_HIDDEN_SPAWN: args.hidden ? '1' : '0',
|
|
1236
|
+
// Task 147 — Stop-hook gate against recursion now reads the
|
|
1237
|
+
// specialist value, since the recorder is a Sidebar-equivalent
|
|
1238
|
+
// spawn with `specialist=database-operator`. No standalone
|
|
1239
|
+
// recorder-only env flag.
|
|
1240
|
+
MAXY_SPECIALIST: args.specialist ?? '',
|
|
1241
|
+
// Task 205 — admin operator's userId on the MCP child env so
|
|
1242
|
+
// scheduling, memory, time-resolve etc. can key UserProfile reads
|
|
1243
|
+
// by (accountId, userId). Empty string on silent-compaction /
|
|
1244
|
+
// recorder paths; MCP module init must stay boot-tolerant per
|
|
1245
|
+
// the Task 202 contract, so handlers refuse at first use rather
|
|
1246
|
+
// than refusing at boot.
|
|
1247
|
+
USER_ID: args.userId ?? '',
|
|
1248
|
+
// Task 210 — disable Claude Code's default-on auto-memory feature
|
|
1249
|
+
// on every spawn this manager creates. Operator knowledge writes
|
|
1250
|
+
// are owned by the Stop-hook → database-operator → Neo4j pipeline
|
|
1251
|
+
// (Task 081); the auto-memory directory at
|
|
1252
|
+
// `<configDir>/projects/<slug>/memory/` is a competing parallel
|
|
1253
|
+
// store that defeats the graph contract. The env knob is named
|
|
1254
|
+
// in the claude binary's strings table and contracts that, when
|
|
1255
|
+
// set, claude will not read from or write to the auto-memory dir.
|
|
1256
|
+
CLAUDE_CODE_DISABLE_AUTO_MEMORY: '1',
|
|
1257
|
+
};
|
|
1258
|
+
// Task 207 — specialist spawns inherit per-account env explicitly so
|
|
1259
|
+
// plugin-system MCP children get a deterministic context without the
|
|
1260
|
+
// per-spawn `.mcp.json` (dropped above). `{...process.env}` already
|
|
1261
|
+
// covers the production case where the manager systemd unit sets
|
|
1262
|
+
// these — the explicit overwrite documents the contract, plumbs the
|
|
1263
|
+
// values through `deps` so unit tests can inject them, and surfaces
|
|
1264
|
+
// them on the `env-keys=` log line below. Operator spawns are unchanged;
|
|
1265
|
+
// their per-spawn `.mcp.json` continues to inject these via placeholders.
|
|
1266
|
+
//
|
|
1267
|
+
// Task 210 — `CLAUDE_CODE_DISABLE_AUTO_MEMORY` is a harness-control
|
|
1268
|
+
// flag set on every spawn (operator + specialist), so it leads the
|
|
1269
|
+
// env-keys list and the `env-keys=` field is always emitted. This
|
|
1270
|
+
// lets `grep env-keys=CLAUDE_CODE_DISABLE_AUTO_MEMORY server.log`
|
|
1271
|
+
// prove the auto-memory disable is in effect on the most recent
|
|
1272
|
+
// spawn without inspecting the binary's behaviour.
|
|
1273
|
+
const envKeys = ['CLAUDE_CODE_DISABLE_AUTO_MEMORY'];
|
|
1274
|
+
// Task 335 — public spawns scope every graph read to `scope: "public"`
|
|
1275
|
+
// via ALLOWED_SCOPES on the inherited env. The memory MCP server reads
|
|
1276
|
+
// this and constrains memory-search results; without it a public agent
|
|
1277
|
+
// would see admin-scoped nodes, breaking the public/admin boundary the
|
|
1278
|
+
// role split exists to enforce.
|
|
1279
|
+
if (args.role === 'public') {
|
|
1280
|
+
spawnEnv.ALLOWED_SCOPES = 'public';
|
|
1281
|
+
envKeys.push('ALLOWED_SCOPES');
|
|
1282
|
+
// Task 485 — when the caller resolved an active gated grant, stamp the
|
|
1283
|
+
// slice ringfence vars so the memory MCP server widens reads to the
|
|
1284
|
+
// visitor's user-scoped slice and the session-end reviewer hook has the
|
|
1285
|
+
// person id to dispatch with. Skipped on open-mode public spawns where
|
|
1286
|
+
// the slice tokens are absent by definition.
|
|
1287
|
+
if (args.sliceToken && args.sliceToken.length > 0) {
|
|
1288
|
+
spawnEnv.ACCESS_SLICE_TOKEN = args.sliceToken;
|
|
1289
|
+
envKeys.push('ACCESS_SLICE_TOKEN');
|
|
1290
|
+
}
|
|
1291
|
+
if (args.personId && args.personId.length > 0) {
|
|
1292
|
+
spawnEnv.ACCESS_PERSON_ID = args.personId;
|
|
1293
|
+
envKeys.push('ACCESS_PERSON_ID');
|
|
1294
|
+
}
|
|
1295
|
+
}
|
|
1296
|
+
// Task 485 — the session-end reviewer (and any subagent it dispatches via
|
|
1297
|
+
// Task, including database-operator) needs three env vars to stay inside
|
|
1298
|
+
// the ringfence:
|
|
1299
|
+
// - RECORDER_SLICE_TOKEN: memory-write stamps sliceToken + scope=user
|
|
1300
|
+
// on every created node; memory-update loud-fails on cross-slice
|
|
1301
|
+
// mutation.
|
|
1302
|
+
// - ACCESS_SLICE_TOKEN + ALLOWED_SCOPES=public: memory-search WHERE
|
|
1303
|
+
// restricts to (n.sliceToken = $env OR n.scope = "public"), so the
|
|
1304
|
+
// reviewer reads ONLY the visitor's slice + public-scope agent
|
|
1305
|
+
// knowledge — never another visitor's user-scope rows, never
|
|
1306
|
+
// admin-scope rows. The reviewer runs as role=admin (so the admin
|
|
1307
|
+
// mcp.json gives it memory tools) but its read filter is the same
|
|
1308
|
+
// shape the gated public agent uses.
|
|
1309
|
+
//
|
|
1310
|
+
// The reviewer's `tools:` frontmatter still narrows the active surface to
|
|
1311
|
+
// memory-search + Task; the env-level filter is defence-in-depth in case
|
|
1312
|
+
// a future edit widens the agent template.
|
|
1313
|
+
if (args.specialist === 'public-session-reviewer' && args.sliceToken && args.sliceToken.length > 0) {
|
|
1314
|
+
spawnEnv.RECORDER_SLICE_TOKEN = args.sliceToken;
|
|
1315
|
+
spawnEnv.ACCESS_SLICE_TOKEN = args.sliceToken;
|
|
1316
|
+
spawnEnv.ALLOWED_SCOPES = 'public';
|
|
1317
|
+
envKeys.push('RECORDER_SLICE_TOKEN', 'ACCESS_SLICE_TOKEN', 'ALLOWED_SCOPES');
|
|
1318
|
+
if (args.personId && args.personId.length > 0) {
|
|
1319
|
+
spawnEnv.ACCESS_PERSON_ID = args.personId;
|
|
1320
|
+
envKeys.push('ACCESS_PERSON_ID');
|
|
1321
|
+
}
|
|
1322
|
+
}
|
|
1323
|
+
// Task 502 — admin operator spawns now take platform MCPs from installed
|
|
1324
|
+
// plugins (no per-spawn `.mcp.json`), so the per-account + per-spawn env that
|
|
1325
|
+
// the admin `.mcp.json` used to inject via placeholders must instead ride the
|
|
1326
|
+
// PTY process env: Claude Code substitutes `${ACCOUNT_ID}` / `${SESSION_ID}` /
|
|
1327
|
+
// `${AGENT_SLUG}` / `${AGENT_SLUG_SCOPE}` etc. in each installed plugin's
|
|
1328
|
+
// PLUGIN.md `mcp:` block from this spawnEnv. The same is true for every
|
|
1329
|
+
// specialist spawn (Task 207/476/487). Without these stamps, plugin MCP
|
|
1330
|
+
// children boot with empty context — graph writes record
|
|
1331
|
+
// `createdBySession=unknown` / `createdByAgent=unknown`, and per-account
|
|
1332
|
+
// handlers refuse at first use. Public operator spawns keep the per-spawn
|
|
1333
|
+
// `.mcp.json` placeholder path, so they are excluded here. For specialists
|
|
1334
|
+
// agentSlug === agentScopeSlug (the specialist name).
|
|
1335
|
+
if (isSpecialistSpawn || args.role === 'admin') {
|
|
1336
|
+
spawnEnv.ACCOUNT_ID = deps.accountId;
|
|
1337
|
+
spawnEnv.PLATFORM_ROOT = deps.platformRoot;
|
|
1338
|
+
spawnEnv.CLAUDE_CONFIG_DIR = deps.claudeConfigDir;
|
|
1339
|
+
spawnEnv.NEO4J_URI = deps.brandedNeo4jUri ?? '';
|
|
1340
|
+
spawnEnv.NEO4J_PASSWORD = deps.brandedNeo4jPassword ?? '';
|
|
1341
|
+
spawnEnv.SESSION_ID = sessionId;
|
|
1342
|
+
spawnEnv.AGENT_SLUG = agentSlug;
|
|
1343
|
+
spawnEnv.AGENT_SLUG_SCOPE = agentScopeSlug;
|
|
1344
|
+
envKeys.push('ACCOUNT_ID', 'USER_ID', 'PLATFORM_ROOT', 'CLAUDE_CONFIG_DIR', 'NEO4J_URI', 'NEO4J_PASSWORD', 'SESSION_ID', 'AGENT_SLUG', 'AGENT_SLUG_SCOPE');
|
|
1345
|
+
}
|
|
1346
|
+
// Task 382 — stamp SESSION_NODE_ID on both admin AND specialist spawn
|
|
1347
|
+
// envs so the memory/contacts MCP wrappers see the active conversation's
|
|
1348
|
+
// sessionId and auto-inject the inbound :PRODUCED edge on writes to
|
|
1349
|
+
// gated labels (:Person, :Organization, etc.). The same env-var name covers
|
|
1350
|
+
// both branches because the wrapper contract is single. Skipped when the
|
|
1351
|
+
// arg is absent — autonomous spawns (cron, scheduled-task) without a parent
|
|
1352
|
+
// conversation must thread `producedByTaskId` via `work-create` instead.
|
|
1353
|
+
if (typeof args.conversationNodeId === 'string' && args.conversationNodeId.length > 0) {
|
|
1354
|
+
spawnEnv.SESSION_NODE_ID = args.conversationNodeId;
|
|
1355
|
+
envKeys.push('SESSION_NODE_ID');
|
|
1356
|
+
}
|
|
1357
|
+
const envKeysField = ` env-keys=${envKeys.join(',')}`;
|
|
1358
|
+
deps.logger(`pty-spawn-start claudeBin=${deps.claudeBin} argv-count=${argv.length} append-system-prompt-bytes=${Buffer.byteLength(appendSystemPrompt, 'utf8')} permission-mode=${args.permissionMode ?? 'default'} flag-settings-bytes=${Buffer.byteLength(flagSettingsValue, 'utf8')} resume=${args.resumeClaudeSessionId ? 'yes' : 'no'} sessionId=${sessionId.slice(0, 8)} session-id-source=${sessionIdSource} agentSlug=${agentSlug || '-'} specialist=${args.specialist ?? 'none'} prompt-positional=${promptPositional ? 'yes' : 'no'} prompt-bytes=${promptBytes} userId=${userIdSlug} hooksResolved=${hooksResolved.join(',') || 'none'}${envKeysField}`);
|
|
1359
|
+
const ptySpawnStart = Date.now();
|
|
1360
|
+
let pty;
|
|
1361
|
+
try {
|
|
1362
|
+
pty = deps.spawnPty(deps.claudeBin, argv, spawnEnv, unitToken);
|
|
1363
|
+
}
|
|
1364
|
+
catch (err) {
|
|
1365
|
+
const e = err;
|
|
1366
|
+
const reason = e.code === 'ENOENT' ? 'which-claude-not-found' : 'pty-spawn-failed';
|
|
1367
|
+
const stderrTail = e.message?.slice(-200) ?? '';
|
|
1368
|
+
deps.logger(`spawn-failed reason=${reason} stderr-tail=${JSON.stringify(stderrTail)} pty-spawn-ms=${Date.now() - ptySpawnStart}`);
|
|
1369
|
+
return { ok: false, reason, stderrTail };
|
|
1370
|
+
}
|
|
1371
|
+
deps.logger(`pty-spawned pid=${pty.pid} ms=${Date.now() - ptySpawnStart}`);
|
|
1372
|
+
// Task 476 — register the minted sessionId with the watcher BEFORE
|
|
1373
|
+
// waitForPid fires. Production fs-watcher ignores the hook (it learns
|
|
1374
|
+
// sessionId from claude's PID file, which already carries this same
|
|
1375
|
+
// UUID because `--session-id` was passed). Test mocks use it to
|
|
1376
|
+
// build the synthetic row's sessionId, so the equality assertion
|
|
1377
|
+
// below passes without each test harvesting `--session-id` from argv.
|
|
1378
|
+
deps.watcher.registerPidSessionId?.(pty.pid, sessionId);
|
|
1379
|
+
const tail = attachPtyTail(pty);
|
|
1380
|
+
// URL capture runs in parallel; its result is patched onto the
|
|
1381
|
+
// sidecar when (if) it fires. The spawn promise does not block on
|
|
1382
|
+
// it. A timeout here is logged but not a failure — the operator's
|
|
1383
|
+
// iframe URL falls back to UI-side construction from bridgeSessionId.
|
|
1384
|
+
//
|
|
1385
|
+
// Task 171 — headless spawns never emit the `/remote-control is active`
|
|
1386
|
+
// banner (the flag is absent), so the handler is not attached and no
|
|
1387
|
+
// PTY bytes are consumed by a regex that will never match. Task 500 —
|
|
1388
|
+
// same for public spawns (remoteControl is false), so the gate keys off
|
|
1389
|
+
// `remoteControl`, not `headless`.
|
|
1390
|
+
//
|
|
1391
|
+
// Task 260 — `capturedUrl` is the value SpawnedSession returns to the
|
|
1392
|
+
// caller (the route includes it in the immediate /spawn response when
|
|
1393
|
+
// the banner happens to land before the spawn promise resolves). The
|
|
1394
|
+
// canonical surface is the sidecar; the captured value is also written
|
|
1395
|
+
// there via `updateSidecar` so the watcher's row picks it up.
|
|
1396
|
+
let capturedUrl = null;
|
|
1397
|
+
// Mutable holder so the URL callback can find the row once sessionId
|
|
1398
|
+
// is known. The PID-file event below sets sessionIdRef.current.
|
|
1399
|
+
const sessionIdRef = { current: null };
|
|
1400
|
+
if (remoteControl) {
|
|
1401
|
+
startUrlCapture({
|
|
1402
|
+
pty,
|
|
1403
|
+
timeoutMs: deps.urlCaptureTimeoutMs,
|
|
1404
|
+
logger: deps.logger,
|
|
1405
|
+
onUrl: (url) => {
|
|
1406
|
+
capturedUrl = url;
|
|
1407
|
+
deps.logger(`url-captured pid=${pty.pid} url=${url}`);
|
|
1408
|
+
const sid = sessionIdRef.current;
|
|
1409
|
+
if (!sid)
|
|
1410
|
+
return;
|
|
1411
|
+
const sidecarPath = sidecarPathForSessionId(deps.spawnCwd, sid);
|
|
1412
|
+
const written = updateSidecar(sidecarPath, { url }, deps.logger);
|
|
1413
|
+
if (!written) {
|
|
1414
|
+
deps.logger(`[session-sidecar] url-update-skipped sessionId=${sid.slice(0, 8)} reason=sidecar-missing`);
|
|
1415
|
+
return;
|
|
1416
|
+
}
|
|
1417
|
+
// Force the watcher to re-read the sidecar so its row index
|
|
1418
|
+
// surfaces the new URL to /events and /list. fs.watch does not
|
|
1419
|
+
// fire for sidecar writes (we only watch *.jsonl and PID files).
|
|
1420
|
+
deps.watcher.refreshSidecar(sid);
|
|
1421
|
+
deps.onUrlCaptured?.(sid);
|
|
1422
|
+
},
|
|
1423
|
+
onTimeout: () => {
|
|
1424
|
+
deps.logger(`url-capture-timeout pid=${pty.pid} ms=${Date.now() - start}`);
|
|
1425
|
+
},
|
|
1426
|
+
});
|
|
1427
|
+
}
|
|
1428
|
+
// Wait for the watcher's PID-file event. The watcher resolves
|
|
1429
|
+
// synchronously if the file already exists (race-safe boot scan).
|
|
1430
|
+
// Task 476 — this wait is now a "claude has booted" signal, NOT the
|
|
1431
|
+
// source of truth for sessionId. The spawner minted the sessionId at
|
|
1432
|
+
// the top of pty-spawn and passed it to claude via `--session-id`
|
|
1433
|
+
// (fresh) or `--resume` (resume); the assertion below confirms claude
|
|
1434
|
+
// honoured it on fresh spawns. Task 258 still applies on resume:
|
|
1435
|
+
// `claude --resume` can briefly write a fresh mint to its PID file
|
|
1436
|
+
// before rewriting (per Task 186) to the prior canonical id. Resume
|
|
1437
|
+
// spawns therefore tolerate the transient — equality is guaranteed
|
|
1438
|
+
// by --resume semantics so the assertion would only false-positive on
|
|
1439
|
+
// the race.
|
|
1440
|
+
let row;
|
|
1441
|
+
try {
|
|
1442
|
+
row = await deps.watcher.waitForPid(pty.pid, deps.pidFileTimeoutMs);
|
|
1443
|
+
}
|
|
1444
|
+
catch (err) {
|
|
1445
|
+
pty.kill('SIGKILL');
|
|
1446
|
+
const stderrTail = tail.getTail();
|
|
1447
|
+
tail.dispose();
|
|
1448
|
+
const detail = err instanceof Error ? err.message : String(err);
|
|
1449
|
+
deps.logger(`spawn-failed reason=pid-file-timeout pid=${pty.pid} detail=${JSON.stringify(detail)} stderr-tail=${formatTailForLog(stderrTail)}`);
|
|
1450
|
+
return { ok: false, reason: 'pid-file-timeout', stderrTail };
|
|
1451
|
+
}
|
|
1452
|
+
// Task 476 — sessionId was minted at the top of pty-spawn and passed
|
|
1453
|
+
// to claude via `--session-id` / `--resume`. The PID file's sessionId
|
|
1454
|
+
// is asserted equal on fresh spawns; resume spawns tolerate a brief
|
|
1455
|
+
// transient mismatch (Task 258: claude --resume can briefly write a
|
|
1456
|
+
// fresh mint to the PID file before rewriting to the prior canonical
|
|
1457
|
+
// id). A mismatch on a fresh spawn means the claude binary did not
|
|
1458
|
+
// honour `--session-id` and is a loud spawn-failure, not silent
|
|
1459
|
+
// rebinding.
|
|
1460
|
+
if (sessionIdSource === 'minted' && row.sessionId !== sessionId) {
|
|
1461
|
+
pty.kill('SIGKILL');
|
|
1462
|
+
tail.dispose();
|
|
1463
|
+
deps.logger(`spawn-failed reason=pid-file-session-mismatch minted=${sessionId.slice(0, 8)} pid-file=${row.sessionId.slice(0, 8)} pid=${pty.pid}`);
|
|
1464
|
+
return { ok: false, reason: 'pid-file-session-mismatch', stderrTail: `pid-file sessionId=${row.sessionId} != minted=${sessionId}` };
|
|
1465
|
+
}
|
|
1466
|
+
sessionIdRef.current = sessionId;
|
|
1467
|
+
const specialist = args.specialist ?? row.agent ?? null;
|
|
1468
|
+
const hidden = args.hidden === true;
|
|
1469
|
+
// Task 260 — write the sidecar BEFORE registering the tracker. The
|
|
1470
|
+
// sidecar is the canonical record of spawn metadata; the watcher
|
|
1471
|
+
// row will read it the moment the JSONL CREATE event fires (the
|
|
1472
|
+
// first user turn flush). If the write fails — disk full, RO mount,
|
|
1473
|
+
// unexpected eperm — refuse the spawn loudly rather than launch a
|
|
1474
|
+
// metadata-less PTY that the wire payload could not honour. The
|
|
1475
|
+
// PTY is killed in the catch so no orphan claude child remains.
|
|
1476
|
+
//
|
|
1477
|
+
// Task 342 — on a resume spawn, `claude --resume` does NOT reprint
|
|
1478
|
+
// the `/remote-control is active` banner, so `capturedUrl` stays
|
|
1479
|
+
// null and writing the sidecar fresh would wipe the URL captured
|
|
1480
|
+
// during the original spawn. Read the prior sidecar and carry
|
|
1481
|
+
// forward the URL when capture didn't fire. Field-by-field audit:
|
|
1482
|
+
// only `url` is preserved — all other fields are either operator-
|
|
1483
|
+
// settable on the resume body (senderId/role/channel/permissionMode/
|
|
1484
|
+
// model/hidden/specialist) or re-derived by tails
|
|
1485
|
+
// (effectivePermissionMode). `startedAt` re-stamps to this PTY's
|
|
1486
|
+
// start time, the pre-existing behaviour.
|
|
1487
|
+
const sidecarPath = sidecarPathForSessionId(deps.spawnCwd, sessionId);
|
|
1488
|
+
const priorSidecar = args.resumeClaudeSessionId
|
|
1489
|
+
? readSidecar(sidecarPath, deps.logger).sidecar
|
|
1490
|
+
: null;
|
|
1491
|
+
const resolvedUrl = capturedUrl ?? priorSidecar?.url ?? null;
|
|
1492
|
+
const urlSource = capturedUrl ? 'captured' : priorSidecar?.url ? 'prior-sidecar' : 'none';
|
|
1493
|
+
deps.logger(`sidecar-url-source sessionId=${sessionId.slice(0, 8)} url-source=${urlSource} resume=${args.resumeClaudeSessionId ? 'yes' : 'no'}`);
|
|
1494
|
+
const sidecar = {
|
|
1495
|
+
senderId: args.senderId,
|
|
1496
|
+
role: args.role,
|
|
1497
|
+
channel: args.channel,
|
|
1498
|
+
url: resolvedUrl,
|
|
1499
|
+
startedAt,
|
|
1500
|
+
permissionMode: args.permissionMode ?? null,
|
|
1501
|
+
// Task 278 — null until `permission-mode-tail.ts` consumes the first
|
|
1502
|
+
// `[auto-mode] verifyAutoModeGateAccess` debug line from the file
|
|
1503
|
+
// we just renamed above (when effectiveMode === 'auto'). On non-auto
|
|
1504
|
+
// spawns no capture exists, so the field stays null forever and the
|
|
1505
|
+
// pane renders the requested mode plain.
|
|
1506
|
+
effectivePermissionMode: null,
|
|
1507
|
+
model: args.model ?? null,
|
|
1508
|
+
hidden,
|
|
1509
|
+
specialist,
|
|
1510
|
+
// Task 451 — persist the scope token so boot-seed can reattach the
|
|
1511
|
+
// surviving scope to this row after a manager restart, even when the
|
|
1512
|
+
// unit token is a fresh-spawn UUID that does not equal `sessionId`.
|
|
1513
|
+
scopeUnitToken: unitToken,
|
|
1514
|
+
// Task 550 — composer bridge ULIDs are appended by the http-server's
|
|
1515
|
+
// pid-file watcher subscription on /rc-spawn binds. A resume that
|
|
1516
|
+
// already had bridgeIds keeps them; a fresh spawn starts empty.
|
|
1517
|
+
bridgeIds: priorSidecar?.bridgeIds ?? [],
|
|
1518
|
+
};
|
|
1519
|
+
try {
|
|
1520
|
+
writeSidecar(sidecarPath, sidecar, deps.logger);
|
|
1521
|
+
}
|
|
1522
|
+
catch (err) {
|
|
1523
|
+
const detail = err instanceof Error ? err.message : String(err);
|
|
1524
|
+
pty.kill('SIGKILL');
|
|
1525
|
+
const stderrTail = tail.getTail();
|
|
1526
|
+
tail.dispose();
|
|
1527
|
+
deps.logger(`spawn-failed reason=sidecar-write-failed sessionId=${sessionId.slice(0, 8)} path=${sidecarPath} err=${JSON.stringify(detail)} stderr-tail=${formatTailForLog(stderrTail)}`);
|
|
1528
|
+
return { ok: false, reason: 'sidecar-write-failed', stderrTail };
|
|
1529
|
+
}
|
|
1530
|
+
// Task 260 — the watcher's row was built BEFORE we wrote the sidecar
|
|
1531
|
+
// (waitForPid resolved first), so its sidecar fields are still null.
|
|
1532
|
+
// Force a re-read so subsequent /list and /events calls see the
|
|
1533
|
+
// freshly-written senderId/role/channel/etc. Some test fixtures use
|
|
1534
|
+
// a hand-built watcher mock that predates `refreshSidecar` on the
|
|
1535
|
+
// interface — the optional-chain keeps them working without a forced
|
|
1536
|
+
// sweep update.
|
|
1537
|
+
deps.watcher.refreshSidecar?.(sessionId);
|
|
1538
|
+
const tracker = {
|
|
1539
|
+
sessionId,
|
|
1540
|
+
bridgeSessionId: row.bridgeSessionId ?? `session_${sessionId}`,
|
|
1541
|
+
bridgeSuffix: row.bridgeSuffix ?? sessionId,
|
|
1542
|
+
pid: pty.pid,
|
|
1543
|
+
pty,
|
|
1544
|
+
exited: false,
|
|
1545
|
+
fdReleased: false,
|
|
1546
|
+
hidden,
|
|
1547
|
+
specialist,
|
|
1548
|
+
scopeUnitToken: unitToken,
|
|
1549
|
+
};
|
|
1550
|
+
livePtys.set(sessionId, tracker);
|
|
1551
|
+
trackerRegisteredAt.set(sessionId, Date.now());
|
|
1552
|
+
deps.logger(`[pty-tracker] op=spawn sessionId=${sessionId.slice(0, 8)} pid=${pty.pid} size=${livePtys.size}`);
|
|
1553
|
+
if (hidden) {
|
|
1554
|
+
deps.logger(`hidden-spawn specialist=${specialist ?? 'none'} sessionId=${sessionId} pid=${pty.pid}`);
|
|
1555
|
+
}
|
|
1556
|
+
// PTY exit: mark exited; the watcher will fire a delete event when
|
|
1557
|
+
// claude removes its PID file, which the http-server subscriber
|
|
1558
|
+
// translates into an archived row (JSONL still on disk if any turn ran).
|
|
1559
|
+
pty.onExit((e) => {
|
|
1560
|
+
const stderrTail = tail.getTail();
|
|
1561
|
+
tail.dispose();
|
|
1562
|
+
handlePtyNaturalExit({ logger: deps.logger }, tracker, e, stderrTail);
|
|
1563
|
+
});
|
|
1564
|
+
const responseMs = Date.now() - start;
|
|
1565
|
+
deps.logger(`spawn-response-returned sessionId=${sessionId} pid=${pty.pid} ms=${responseMs}`);
|
|
1566
|
+
deps.logger(`spawn pid=${pty.pid} sessionId=${sessionId} senderId=${args.senderId} role=${args.role} channel=${args.channel} permissionMode=${args.permissionMode ?? 'default'} remoteControl=${remoteControl} latency-ms=${responseMs}`);
|
|
1567
|
+
deps.logger(`[pty-spawn] sessionId=${sessionId} appendSystemPromptBytes=${Buffer.byteLength(appendSystemPrompt, 'utf8')} identityBytes=${composedBytes.identity} soulBytes=${composedBytes.soul} knowledgeBytes=${composedBytes.knowledge} aboutOwnerBytes=${composedBytes.aboutOwner} dormantPluginsBytes=${composedBytes.dormantPlugins} accountDir=${deps.accountDir} role=${args.role} specialist=${args.specialist ?? 'none'} hostname=${deps.host.hostname} lanIPv4=${deps.host.lanIPv4} adminUrl=${deps.host.adminUrl} tunnelUrl=${composedHost.tunnelUrl ?? 'none'}`);
|
|
1568
|
+
// Task 178 — emit [pty-spawn-tool-inventory] for specialist spawns. The
|
|
1569
|
+
// probe runs in parallel with the real claude child's own MCP handshake
|
|
1570
|
+
// and is fire-and-forget: it never blocks the spawn response, and its
|
|
1571
|
+
// own failures emit a [pty-spawn-tool-inventory-failed] line. Operator
|
|
1572
|
+
// (admin/public) spawns have no agent frontmatter — the failure shape
|
|
1573
|
+
// this closes the gap on is recorder-specific (Task 174 §3).
|
|
1574
|
+
//
|
|
1575
|
+
// Task 207 — descriptors come from `deps.toolSurface.mcpServers`
|
|
1576
|
+
// directly (narrowed to the plugin namespaces the agent file's
|
|
1577
|
+
// `tools:` frontmatter references) instead of the per-spawn `.mcp.json`
|
|
1578
|
+
// that this task drops for specialists. The probe still spawns its
|
|
1579
|
+
// own MCP children to query `tools/list`; it does not — and cannot —
|
|
1580
|
+
// inspect Claude Code's internal plugin-tool registry. `argv-tools` is
|
|
1581
|
+
// now 0 for specialists (no `--allowed-tools` push); `mcp-listed-tools`
|
|
1582
|
+
// continues to reflect what each MCP server actually offers. The
|
|
1583
|
+
// not-exposed = (frontmatter ∖ offered) computation still surfaces
|
|
1584
|
+
// namespace-mismatch regressions.
|
|
1585
|
+
if (isSpecialistSpawn && specialistTools !== null) {
|
|
1586
|
+
// Task 476 — the probe spawns transient MCP children to call
|
|
1587
|
+
// tools/list. They share the same placeholder map as the live
|
|
1588
|
+
// spawn so any write a plugin performs during boot lands with the
|
|
1589
|
+
// same SESSION_ID + AGENT_SLUG as the live children would.
|
|
1590
|
+
const placeholders = buildMcpPlaceholders({
|
|
1591
|
+
platformRoot: deps.platformRoot,
|
|
1592
|
+
accountId: deps.accountId,
|
|
1593
|
+
userId: args.userId,
|
|
1594
|
+
sessionId,
|
|
1595
|
+
agentSlug,
|
|
1596
|
+
agentScopeSlug,
|
|
1597
|
+
logDir: deps.logDir,
|
|
1598
|
+
});
|
|
1599
|
+
// Task 215 — classify the frontmatter list once. `matchedServers` is
|
|
1600
|
+
// the set of `toolSurface.mcpServers` keys to spawn for the probe;
|
|
1601
|
+
// `unparseableTools` and `missingServers` ride downstream into both
|
|
1602
|
+
// the spawn-time and end-of-first-turn inventory lines, so a future
|
|
1603
|
+
// namespace drift (or an agent file with a typo) can be told apart
|
|
1604
|
+
// from a real MCP boot failure by reading server.log alone.
|
|
1605
|
+
const { matchedServers, unparseableTools, missingServers } = classifySpecialistTools(specialistTools, deps.toolSurface.mcpServers);
|
|
1606
|
+
const resolvedServers = new Map();
|
|
1607
|
+
for (const [name, desc] of deps.toolSurface.mcpServers) {
|
|
1608
|
+
if (!matchedServers.has(name))
|
|
1609
|
+
continue;
|
|
1610
|
+
const probeEnv = desc.env
|
|
1611
|
+
? Object.fromEntries(Object.entries(desc.env).map(([k, v]) => [k, expandPlaceholders(v, placeholders)]))
|
|
1612
|
+
: undefined;
|
|
1613
|
+
resolvedServers.set(name, {
|
|
1614
|
+
command: expandPlaceholders(desc.command, placeholders),
|
|
1615
|
+
args: desc.args.map((a) => expandPlaceholders(a, placeholders)),
|
|
1616
|
+
env: probeEnv,
|
|
1617
|
+
});
|
|
1618
|
+
}
|
|
1619
|
+
const readInventory = deps.readMcpToolInventory
|
|
1620
|
+
?? ((req) => probeMcpServerTools({
|
|
1621
|
+
servers: req.servers,
|
|
1622
|
+
baseEnv: process.env,
|
|
1623
|
+
timeoutMs: req.timeoutMs,
|
|
1624
|
+
}));
|
|
1625
|
+
const inventoryTimeoutMs = deps.toolInventoryProbeTimeoutMs ?? 5_000;
|
|
1626
|
+
emitToolInventoryAsync({
|
|
1627
|
+
sessionId: sessionId,
|
|
1628
|
+
specialist: args.specialist,
|
|
1629
|
+
frontmatterAllowlist: specialistTools,
|
|
1630
|
+
resolvedServers,
|
|
1631
|
+
unparseableTools,
|
|
1632
|
+
missingServers,
|
|
1633
|
+
readMcpToolInventory: readInventory,
|
|
1634
|
+
timeoutMs: inventoryTimeoutMs,
|
|
1635
|
+
logger: deps.logger,
|
|
1636
|
+
});
|
|
1637
|
+
// Task 215 — register the per-spawn state that the JsonlTail callback
|
|
1638
|
+
// (or the watchdog timer) needs to fire the final snapshot. State is
|
|
1639
|
+
// module-scoped so a stale entry past PTY exit is a leak; the exit
|
|
1640
|
+
// handler below explicitly clears it. The watchdog covers the failure
|
|
1641
|
+
// mode where the model emits zero useful content (the exact defect
|
|
1642
|
+
// this task investigates): without the timer, a spawn that never
|
|
1643
|
+
// produces a first turn would never emit a final snapshot, and the
|
|
1644
|
+
// operator would have no signal at all for the broken case.
|
|
1645
|
+
finalSnapshotState.set(sessionId, {
|
|
1646
|
+
specialist: args.specialist,
|
|
1647
|
+
frontmatterAllowlist: specialistTools,
|
|
1648
|
+
resolvedServers,
|
|
1649
|
+
unparseableTools,
|
|
1650
|
+
missingServers,
|
|
1651
|
+
readMcpToolInventory: readInventory,
|
|
1652
|
+
timeoutMs: inventoryTimeoutMs,
|
|
1653
|
+
logger: deps.logger,
|
|
1654
|
+
spawnedAt: Date.now(),
|
|
1655
|
+
fired: false,
|
|
1656
|
+
watchdog: setTimeout(() => fireFinalSnapshot(sessionId, 'first-turn-timeout'), firstTurnTimeoutMs),
|
|
1657
|
+
});
|
|
1658
|
+
}
|
|
1659
|
+
// Task 183 — register the specialist spawn with the JSONL tail. The
|
|
1660
|
+
// tail's state must exist BEFORE any JSONL modify event fires so the
|
|
1661
|
+
// first init-shaped record produces Line 1. Task 207 — `--allowed-tools`
|
|
1662
|
+
// is no longer pushed for specialists, so `argvTools` is the empty array
|
|
1663
|
+
// for them; `toolsArgvMissingFromExposed` becomes a no-op, which is the
|
|
1664
|
+
// correct semantic (nothing was launched on argv, so nothing can be
|
|
1665
|
+
// missing). Operator spawns do not register; the tail emits nothing for
|
|
1666
|
+
// them.
|
|
1667
|
+
//
|
|
1668
|
+
// Task 215 — `onFirstTurn` fires the `[pty-spawn-tool-inventory-final]`
|
|
1669
|
+
// snapshot when the model emits its first non-thinking assistant
|
|
1670
|
+
// record. Paired with the watchdog timer set above (in the Task-178
|
|
1671
|
+
// probe block); whichever fires first wins, the other is a no-op via
|
|
1672
|
+
// the `fired` guard inside `fireFinalSnapshot`.
|
|
1673
|
+
if (isSpecialistSpawn && deps.jsonlTail) {
|
|
1674
|
+
deps.jsonlTail.register(sessionId, {
|
|
1675
|
+
specialist: args.specialist,
|
|
1676
|
+
argvTools: [],
|
|
1677
|
+
onFirstTurn: () => fireFinalSnapshot(sessionId, 'first-turn'),
|
|
1678
|
+
});
|
|
1679
|
+
pty.onExit(() => deps.jsonlTail?.unregister(sessionId));
|
|
1680
|
+
}
|
|
1681
|
+
// Task 215 — PTY-exit cleanup for the final-snapshot state runs
|
|
1682
|
+
// INDEPENDENTLY of the JsonlTail wiring. When `deps.jsonlTail` is
|
|
1683
|
+
// undefined (test fixtures, partial-mock deployments), state was
|
|
1684
|
+
// still registered above in the Task-178 probe block, and the
|
|
1685
|
+
// watchdog timer needs to be canceled on exit to prevent a leak
|
|
1686
|
+
// that fires `[pty-spawn-tool-inventory-final] reason=first-turn-timeout`
|
|
1687
|
+
// against a long-dead session 60 s later.
|
|
1688
|
+
if (isSpecialistSpawn && specialistTools !== null) {
|
|
1689
|
+
pty.onExit(() => {
|
|
1690
|
+
const state = finalSnapshotState.get(sessionId);
|
|
1691
|
+
if (state?.watchdog)
|
|
1692
|
+
clearTimeout(state.watchdog);
|
|
1693
|
+
finalSnapshotState.delete(sessionId);
|
|
1694
|
+
});
|
|
1695
|
+
}
|
|
1696
|
+
deps.onSessionReady?.(tracker);
|
|
1697
|
+
return {
|
|
1698
|
+
ok: true,
|
|
1699
|
+
session: {
|
|
1700
|
+
sessionId,
|
|
1701
|
+
pid: pty.pid,
|
|
1702
|
+
startedAt,
|
|
1703
|
+
url: capturedUrl,
|
|
1704
|
+
tracker,
|
|
1705
|
+
},
|
|
1706
|
+
};
|
|
1707
|
+
}
|
|
1708
|
+
/** Task 176 — natural-exit handler. Fires when the claude child exits on
|
|
1709
|
+
* its own (operator `/quit`, SIGINT in the PTY, crash, network drop on
|
|
1710
|
+
* `--remote-control`), with no operator `/stop` and no auto-archive in
|
|
1711
|
+
* flight. Mirrors `killSession`'s post-Task-170 fd-release + tracker
|
|
1712
|
+
* removal contract on the second exit branch the original task
|
|
1713
|
+
* explicitly out-of-scoped. Without this, the master fd lingers in
|
|
1714
|
+
* node-pty's internal socket until V8 GC finalises the IPty object,
|
|
1715
|
+
* and the tracker entry survives until manager shutdown — so the
|
|
1716
|
+
* shutdown loop SIGTERMs PIDs that already logged `process-exited`.
|
|
1717
|
+
*
|
|
1718
|
+
* Side-effect order is load-bearing: set `exited` first so any
|
|
1719
|
+
* concurrent `killSession` sees the already-exited branch; release the
|
|
1720
|
+
* fd second (idempotent on a destroyed socket via the try/catch in
|
|
1721
|
+
* `releasePtyMasterFd`); drop the tracker third (Map.delete on a
|
|
1722
|
+
* missing key is a no-op, so the operator-request follow-up that
|
|
1723
|
+
* races us is harmless). The log line carries the same `master-fd=...`
|
|
1724
|
+
* suffix the operator-request path emits — every `kill … pid=<n>`
|
|
1725
|
+
* line in `server.log` now ends in `master-fd=...`, no exceptions.
|
|
1726
|
+
*
|
|
1727
|
+
* Exported so `__tests__/stop-session-fd-release.test.ts` can verify
|
|
1728
|
+
* the contract end-to-end without re-implementing the handler in test
|
|
1729
|
+
* code. */
|
|
1730
|
+
export function handlePtyNaturalExit(deps, tracker, exit, stderrTail) {
|
|
1731
|
+
tracker.exited = true;
|
|
1732
|
+
// Task 455 — bump the exit-history counter as the second side effect,
|
|
1733
|
+
// immediately after marking the tracker exited. Doing it here (rather
|
|
1734
|
+
// than at the bottom) means a later throw between flag-set and the
|
|
1735
|
+
// log line — `releasePtyMasterFd` is rescued today, but defense in
|
|
1736
|
+
// depth shouldn't rely on that staying true forever — cannot suppress
|
|
1737
|
+
// the observability signal the /stop route needs to surface respawn
|
|
1738
|
+
// history. The counter tracks "how many earlier PTYs of this sessionId
|
|
1739
|
+
// have already exited" relative to any future stop and is unconditional
|
|
1740
|
+
// on the delete-on-identity race below.
|
|
1741
|
+
priorExitedBySessionId.set(tracker.sessionId, (priorExitedBySessionId.get(tracker.sessionId) ?? 0) + 1);
|
|
1742
|
+
// Skip if a racing `killSession` already released the fd — second
|
|
1743
|
+
// destroy() on a destroyed node-pty socket throws "socket already
|
|
1744
|
+
// destroyed" and would turn this line's suffix into a false
|
|
1745
|
+
// `master-fd=close-failed`.
|
|
1746
|
+
const fdSuffix = tracker.fdReleased ? 'master-fd=closed' : releasePtyMasterFd(tracker);
|
|
1747
|
+
if (fdSuffix === 'master-fd=closed')
|
|
1748
|
+
tracker.fdReleased = true;
|
|
1749
|
+
// Task 260 — only remove the tracker entry if it is still OUR tracker.
|
|
1750
|
+
// A subsequent spawn could have replaced the entry under the same
|
|
1751
|
+
// sessionId (LRU recycle in production; cross-fixture sessionId
|
|
1752
|
+
// collision in tests).
|
|
1753
|
+
if (livePtys.get(tracker.sessionId) === tracker) {
|
|
1754
|
+
livePtys.delete(tracker.sessionId);
|
|
1755
|
+
trackerRegisteredAt.delete(tracker.sessionId);
|
|
1756
|
+
}
|
|
1757
|
+
deps.logger(`kill pid=${tracker.pid} reason=process-exited exit-code=${exit.exitCode} signal=${exit.signal ?? 'none'} stderr-tail=${formatTailForLog(stderrTail)} ${fdSuffix}`);
|
|
1758
|
+
deps.logger(`[pty-tracker] op=exit sessionId=${tracker.sessionId.slice(0, 8)} pid=${tracker.pid} size=${livePtys.size}`);
|
|
1759
|
+
}
|
|
1760
|
+
/** Release the pty master fd by destroying node-pty's internal socket.
|
|
1761
|
+
* Without this, the fd lingers until V8 GC finalizes the IPty object —
|
|
1762
|
+
* non-deterministic and accumulates under load. Returns the trailing
|
|
1763
|
+
* log suffix ("master-fd=closed" on success, "master-fd=close-failed
|
|
1764
|
+
* err=..." on throw). The throw path is rescued so a destroy failure
|
|
1765
|
+
* on a corner-case socket state cannot turn a logically-successful
|
|
1766
|
+
* stop into a 500. Task 170. */
|
|
1767
|
+
function releasePtyMasterFd(t) {
|
|
1768
|
+
try {
|
|
1769
|
+
t.pty.destroy?.();
|
|
1770
|
+
return 'master-fd=closed';
|
|
1771
|
+
}
|
|
1772
|
+
catch (err) {
|
|
1773
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
1774
|
+
return `master-fd=close-failed err=${JSON.stringify(msg)}`;
|
|
1775
|
+
}
|
|
1776
|
+
}
|
|
1777
|
+
/** Task 558 — `op=archive-release` shape. The operator-archive (UI End
|
|
1778
|
+
* click → `/stop`) is the canonical and ONLY master-fd release point
|
|
1779
|
+
* for an rc-spawn or operator session. This helper performs the release
|
|
1780
|
+
* with full verification:
|
|
1781
|
+
*
|
|
1782
|
+
* 1. Snapshot `/proc/self/fd` BEFORE the destroy (set of fd numbers).
|
|
1783
|
+
* 2. Run `releasePtyMasterFd` — captures `master-fd=<closed|close-failed>`.
|
|
1784
|
+
* 3. Snapshot `/proc/self/fd` AFTER. The set-difference is the
|
|
1785
|
+
* released fd number(s); the single-fd case is the happy path.
|
|
1786
|
+
* 4. Delete the tracker from `livePtys` + `trackerRegisteredAt` if
|
|
1787
|
+
* identity still matches (LRU-recycle guard).
|
|
1788
|
+
* 5. Emit `[rc-spawn] op=archive-release sessionId=… pid=…
|
|
1789
|
+
* master-fd=<status> fdBefore=N fdAfter=N fdDelta=N
|
|
1790
|
+
* removedFds=<list> trackerRemoved=<bool> verified=<bool>`.
|
|
1791
|
+
*
|
|
1792
|
+
* `verified=true` iff `master-fd=closed` AND `fdDelta>=1` AND
|
|
1793
|
+
* `trackerRemoved=true`. `master-fd=close-failed` is logged at error
|
|
1794
|
+
* level (`[rc-spawn-error]` prefix) — never swallowed; the next
|
|
1795
|
+
* post-archive sweep is the catch-net for that surface.
|
|
1796
|
+
*
|
|
1797
|
+
* Procfs absent (darwin dev Mac): `readOpenFdSet()` returns an empty
|
|
1798
|
+
* Set, so `fdBefore`/`fdAfter`/`fdDelta` all report 0 and `verified`
|
|
1799
|
+
* collapses to `master-fd=closed && trackerRemoved`. The verification
|
|
1800
|
+
* is best-effort on platforms without procfs — the manager process
|
|
1801
|
+
* itself only runs on linux in production. */
|
|
1802
|
+
function archiveReleaseTracker(deps, t, sessionId) {
|
|
1803
|
+
const fdBeforeSet = readOpenFdSet();
|
|
1804
|
+
const suffix = t.fdReleased ? 'master-fd=closed' : releasePtyMasterFd(t);
|
|
1805
|
+
if (suffix === 'master-fd=closed')
|
|
1806
|
+
t.fdReleased = true;
|
|
1807
|
+
const fdAfterSet = readOpenFdSet();
|
|
1808
|
+
let trackerRemoved = false;
|
|
1809
|
+
if (livePtys.get(sessionId) === t) {
|
|
1810
|
+
livePtys.delete(sessionId);
|
|
1811
|
+
trackerRegisteredAt.delete(sessionId);
|
|
1812
|
+
trackerRemoved = true;
|
|
1813
|
+
}
|
|
1814
|
+
const fdBefore = fdBeforeSet.size;
|
|
1815
|
+
const fdAfter = fdAfterSet.size;
|
|
1816
|
+
const fdDelta = fdBefore - fdAfter;
|
|
1817
|
+
const removed = [];
|
|
1818
|
+
for (const fd of fdBeforeSet)
|
|
1819
|
+
if (!fdAfterSet.has(fd))
|
|
1820
|
+
removed.push(fd);
|
|
1821
|
+
const verified = suffix === 'master-fd=closed' && fdDelta >= 1 && trackerRemoved;
|
|
1822
|
+
const prefix = suffix.startsWith('master-fd=close-failed') ? '[rc-spawn-error]' : '[rc-spawn]';
|
|
1823
|
+
deps.logger(`${prefix} op=archive-release sessionId=${sessionId.slice(0, 8)} pid=${t.pid} ${suffix} fdBefore=${fdBefore} fdAfter=${fdAfter} fdDelta=${fdDelta} removedFds=${removed.length === 0 ? 'none' : removed.join(',')} trackerRemoved=${trackerRemoved} verified=${verified}`);
|
|
1824
|
+
return { suffix, verified };
|
|
1825
|
+
}
|
|
1826
|
+
/** Task 250 + 260 — operator-request stop. Issues `systemctl --user
|
|
1827
|
+
* stop --no-block <scope>` against the PTY's scope unit (Task 250)
|
|
1828
|
+
* instead of `pty.kill('SIGTERM')`; the scope's TimeoutStopSec=5 handles
|
|
1829
|
+
* SIGTERM→SIGKILL escalation inside its own cgroup. Idempotent: a
|
|
1830
|
+
* no-such-unit response (exit code 5) is treated as success because
|
|
1831
|
+
* claude exited naturally and systemd retired the scope. The master fd
|
|
1832
|
+
* is still released locally — fd ownership stays with the manager
|
|
1833
|
+
* process and must be cleaned up there, irrespective of which process
|
|
1834
|
+
* killed claude.
|
|
1835
|
+
*
|
|
1836
|
+
* Task 260 — looks up the tracker in the module-scoped `livePtys` map
|
|
1837
|
+
* (the metadata-rich SessionStore is gone). Deletes by identity (only
|
|
1838
|
+
* if `livePtys.get(sessionId) === t`) so an LRU recycle or a
|
|
1839
|
+
* cross-fixture sessionId collision in tests never clobbers a live
|
|
1840
|
+
* PTY whose tracker was registered after the current call resolved. */
|
|
1841
|
+
export async function stopSession(deps, sessionId) {
|
|
1842
|
+
// Task 455 — alive filter: an entry with `exited=true` that somehow
|
|
1843
|
+
// survived in `livePtys` is treated as a miss, so the stop never
|
|
1844
|
+
// targets a stale pid. The natural-exit handler also purges on its
|
|
1845
|
+
// own (layer 1); this filter is layer 2 of the two-layer invariant
|
|
1846
|
+
// documented above the `livePtys` declaration.
|
|
1847
|
+
const t = resolveLiveTracker(sessionId);
|
|
1848
|
+
if (!t) {
|
|
1849
|
+
// Task 427 — row-scope fallback. The PTY survived a manager restart
|
|
1850
|
+
// (Task 250) and was reattached to its `SessionRow` by the boot-seed,
|
|
1851
|
+
// but `livePtys` is module-scoped and is never repopulated. When the
|
|
1852
|
+
// caller supplies the row's scope unit token, stop the scope directly
|
|
1853
|
+
// — there is no master fd to release because the current manager
|
|
1854
|
+
// never opened one for this process. A true miss (no row, no token)
|
|
1855
|
+
// still returns `no-store-entry`.
|
|
1856
|
+
const rowToken = deps.rowScopeUnitToken ?? null;
|
|
1857
|
+
if (rowToken === null) {
|
|
1858
|
+
return { existed: false, path: 'no-store-entry', scopeOutcome: 'no-store-entry', exitCode: null };
|
|
1859
|
+
}
|
|
1860
|
+
const start = Date.now();
|
|
1861
|
+
const unit = scopeUnitName(rowToken);
|
|
1862
|
+
const run = deps.runSystemctl ?? defaultSystemctlRunner;
|
|
1863
|
+
const stop = await stopScopeUnit(run, rowToken, {
|
|
1864
|
+
pid: deps.rowPid ?? null,
|
|
1865
|
+
killGraceMs: deps.killGraceMs,
|
|
1866
|
+
});
|
|
1867
|
+
if (stop.outcome === 'error') {
|
|
1868
|
+
deps.logger(`[stop-session] systemd-scope-stop unit=${unit} outcome=error exit-code=${stop.exitCode} ms=${Date.now() - start} sessionId=${sessionId} path=row-scope stderr=${JSON.stringify(stop.stderr.slice(-200))}`);
|
|
1869
|
+
return { existed: true, path: 'row-scope', scopeOutcome: 'error', exitCode: stop.exitCode };
|
|
1870
|
+
}
|
|
1871
|
+
deps.logger(`[stop-session] systemd-scope-stop unit=${unit} outcome=${stop.outcome} ms=${Date.now() - start} sessionId=${sessionId} path=row-scope`);
|
|
1872
|
+
return {
|
|
1873
|
+
existed: true,
|
|
1874
|
+
path: 'row-scope',
|
|
1875
|
+
scopeOutcome: stop.outcome,
|
|
1876
|
+
exitCode: stop.outcome === 'already-gone' ? stop.exitCode : 0,
|
|
1877
|
+
};
|
|
1878
|
+
}
|
|
1879
|
+
const start = Date.now();
|
|
1880
|
+
const unit = scopeUnitName(t.scopeUnitToken);
|
|
1881
|
+
if (t.exited) {
|
|
1882
|
+
// Task 176 short-circuit: if the natural-exit handler already
|
|
1883
|
+
// released the fd, skip the second destroy() — on real node-pty it
|
|
1884
|
+
// would throw "socket already destroyed" and we'd emit a false
|
|
1885
|
+
// `master-fd=close-failed`. Defense in depth still holds: if the
|
|
1886
|
+
// earlier destroy threw, fdReleased stays false and we retry here.
|
|
1887
|
+
//
|
|
1888
|
+
// Task 455 — the `resolveLiveTracker` filter above makes this
|
|
1889
|
+
// branch unreachable on entry: an exited tracker never resolves.
|
|
1890
|
+
// The check is kept as belt-and-braces in case `t.exited` flips
|
|
1891
|
+
// to true during a future `await` inserted into the happy path.
|
|
1892
|
+
const { suffix: fdSuffix } = archiveReleaseTracker({ logger: deps.logger }, t, sessionId);
|
|
1893
|
+
deps.logger(`[stop-session] systemd-scope-stop unit=${unit} outcome=already-exited ms=${Date.now() - start} sessionId=${sessionId} pid=${t.pid} ${fdSuffix}`);
|
|
1894
|
+
deps.logger(`[pty-tracker] op=exit sessionId=${sessionId.slice(0, 8)} pid=${t.pid} size=${livePtys.size}`);
|
|
1895
|
+
return { existed: true, path: 'liveptys', scopeOutcome: 'already-gone', exitCode: null };
|
|
1896
|
+
}
|
|
1897
|
+
const run = deps.runSystemctl ?? defaultSystemctlRunner;
|
|
1898
|
+
const stop = await stopScopeUnit(run, t.scopeUnitToken, {
|
|
1899
|
+
pid: t.pid,
|
|
1900
|
+
killGraceMs: deps.killGraceMs,
|
|
1901
|
+
});
|
|
1902
|
+
if (stop.outcome === 'error') {
|
|
1903
|
+
deps.logger(`[stop-session] systemd-scope-stop unit=${unit} outcome=error exit-code=${stop.exitCode} ms=${Date.now() - start} sessionId=${sessionId} pid=${t.pid} stderr=${JSON.stringify(stop.stderr.slice(-200))}`);
|
|
1904
|
+
return { existed: true, path: 'liveptys', scopeOutcome: 'error', exitCode: stop.exitCode };
|
|
1905
|
+
}
|
|
1906
|
+
// outcome=ok or already-gone — both mean the scope is on its way out (or
|
|
1907
|
+
// already retired). Release the manager-side master fd and drop the
|
|
1908
|
+
// tracker entry; the watcher will observe Claude Code's PID-file delete
|
|
1909
|
+
// shortly and emit the archive transition. Task 558 routes the release
|
|
1910
|
+
// through `archiveReleaseTracker` so every operator-stop emits a
|
|
1911
|
+
// verified `op=archive-release` line — the only window a real
|
|
1912
|
+
// master-fd leak can exist.
|
|
1913
|
+
const { suffix: fdSuffix } = archiveReleaseTracker({ logger: deps.logger }, t, sessionId);
|
|
1914
|
+
deps.logger(`[stop-session] systemd-scope-stop unit=${unit} outcome=${stop.outcome} ms=${Date.now() - start} sessionId=${sessionId} pid=${t.pid} ${fdSuffix}`);
|
|
1915
|
+
deps.logger(`[pty-tracker] op=exit sessionId=${sessionId.slice(0, 8)} pid=${t.pid} size=${livePtys.size}`);
|
|
1916
|
+
return {
|
|
1917
|
+
existed: true,
|
|
1918
|
+
path: 'liveptys',
|
|
1919
|
+
scopeOutcome: stop.outcome,
|
|
1920
|
+
exitCode: stop.outcome === 'already-gone' ? stop.exitCode : 0,
|
|
1921
|
+
};
|
|
1922
|
+
}
|
|
1923
|
+
/** Task 260 — alias preserved during the http-server callsite rename
|
|
1924
|
+
* in this branch. The canonical export name is `stopSession` (Task 250). */
|
|
1925
|
+
export const killSession = stopSession;
|
|
1926
|
+
/** Task 557 — open file-descriptor count for the manager process. Reads
|
|
1927
|
+
* `/proc/self/fd` directly. Returns -1 on platforms that don't expose
|
|
1928
|
+
* procfs (darwin dev Mac) or on read failure. Used by `[fd-census]`
|
|
1929
|
+
* log lines so an rc-spawn leak is visible as `openFds` rising while
|
|
1930
|
+
* `livePtys` stays flat across successive spawns. */
|
|
1931
|
+
export function openFdCount() {
|
|
1932
|
+
try {
|
|
1933
|
+
return readdirSync('/proc/self/fd').length;
|
|
1934
|
+
}
|
|
1935
|
+
catch {
|
|
1936
|
+
return -1;
|
|
1937
|
+
}
|
|
1938
|
+
}
|
|
1939
|
+
/** Task 558 — set-valued companion to `openFdCount`. Returns the set of
|
|
1940
|
+
* fd numbers (as strings) in `/proc/self/fd`. Empty Set on platforms
|
|
1941
|
+
* without procfs (darwin) or on read failure — distinguishable from a
|
|
1942
|
+
* genuinely-empty fd set because the manager process always holds at
|
|
1943
|
+
* least stdin/stdout/stderr. Callers that need to identify a specific
|
|
1944
|
+
* closed fd take the set-difference (before − after). */
|
|
1945
|
+
function readOpenFdSet() {
|
|
1946
|
+
try {
|
|
1947
|
+
return new Set(readdirSync('/proc/self/fd'));
|
|
1948
|
+
}
|
|
1949
|
+
catch {
|
|
1950
|
+
return new Set();
|
|
1951
|
+
}
|
|
1952
|
+
}
|
|
1953
|
+
export function runPostArchiveSweep(deps) {
|
|
1954
|
+
const now = (deps.now ?? Date.now)();
|
|
1955
|
+
const liveSessionIds = deps.liveSessionIds();
|
|
1956
|
+
const liveSessionSet = new Set(liveSessionIds);
|
|
1957
|
+
let archivedWithMaster = 0;
|
|
1958
|
+
let escalated = 0;
|
|
1959
|
+
for (const [sessionId, tracker] of livePtys.entries()) {
|
|
1960
|
+
if (!deps.isArchived(sessionId))
|
|
1961
|
+
continue;
|
|
1962
|
+
archivedWithMaster++;
|
|
1963
|
+
const archivedAt = deps.archivedAtMs(sessionId) ?? trackerRegisteredAt.get(sessionId) ?? now;
|
|
1964
|
+
const heldSinceArchiveMs = Math.max(0, now - archivedAt);
|
|
1965
|
+
deps.logger(`[fd-audit] op=orphan-master sessionId=${sessionId.slice(0, 8)} pid=${tracker.pid} archivedAt=${archivedAt} heldSinceArchiveMs=${heldSinceArchiveMs} fd=unknown`);
|
|
1966
|
+
if (heldSinceArchiveMs >= deps.ageEscalateMs) {
|
|
1967
|
+
escalated++;
|
|
1968
|
+
deps.logger(`[fd-audit] op=orphan-master-escalate sessionId=${sessionId.slice(0, 8)} fd=unknown heldSinceArchiveMs=${heldSinceArchiveMs}`);
|
|
1969
|
+
}
|
|
1970
|
+
}
|
|
1971
|
+
let orphanLiveSessionsNoMaster = 0;
|
|
1972
|
+
for (const sessionId of liveSessionIds) {
|
|
1973
|
+
if (!livePtys.has(sessionId))
|
|
1974
|
+
orphanLiveSessionsNoMaster++;
|
|
1975
|
+
}
|
|
1976
|
+
let archivedSessions = 0;
|
|
1977
|
+
for (const sessionId of livePtys.keys())
|
|
1978
|
+
if (deps.isArchived(sessionId))
|
|
1979
|
+
archivedSessions++;
|
|
1980
|
+
const summary = {
|
|
1981
|
+
archivedSessions,
|
|
1982
|
+
orphanMasters: archivedWithMaster,
|
|
1983
|
+
liveTrackers: livePtys.size,
|
|
1984
|
+
liveSessions: liveSessionSet.size,
|
|
1985
|
+
archivedWithMaster,
|
|
1986
|
+
orphanLiveSessionsNoMaster,
|
|
1987
|
+
escalated,
|
|
1988
|
+
};
|
|
1989
|
+
deps.logger(`[fd-audit] op=post-archive-sweep archivedSessions=${summary.archivedSessions} orphanMasters=${summary.orphanMasters} openFds=${openFdCount()} livePtys=${summary.liveTrackers}`);
|
|
1990
|
+
deps.logger(`[fd-audit] op=master-reconcile liveTrackers=${summary.liveTrackers} liveSessions=${summary.liveSessions} archivedWithMaster=${summary.archivedWithMaster} orphanLiveSessionsNoMaster=${summary.orphanLiveSessionsNoMaster}`);
|
|
1991
|
+
return summary;
|
|
1992
|
+
}
|
|
1993
|
+
/** Task 557 — register an rc-spawn PTY in the live tracker map so the
|
|
1994
|
+
* master fd has a defined owner and release path. Mirrors the tracker
|
|
1995
|
+
* shape `spawnClaudeSession` writes (Task 260), but skips the spawn
|
|
1996
|
+
* pipeline's sidecar/watcher/url-capture concerns — `/rc-spawn` is
|
|
1997
|
+
* fire-and-forget; claude registers itself with claude.ai/code as a
|
|
1998
|
+
* Remote Control entry without manager-side bookkeeping. The `pty.onExit`
|
|
1999
|
+
* hook lands on `handlePtyNaturalExit`, which marks the tracker exited,
|
|
2000
|
+
* releases the fd, and deletes the entry — closing the leak gap the
|
|
2001
|
+
* Task 552 non-PTY scope path created when it stopped registering a
|
|
2002
|
+
* tracker at all. */
|
|
2003
|
+
export function registerRcSpawnPty(deps, sessionId, pty, unitToken) {
|
|
2004
|
+
const tracker = {
|
|
2005
|
+
sessionId,
|
|
2006
|
+
bridgeSessionId: `session_${sessionId}`,
|
|
2007
|
+
bridgeSuffix: sessionId,
|
|
2008
|
+
pid: pty.pid,
|
|
2009
|
+
pty,
|
|
2010
|
+
exited: false,
|
|
2011
|
+
fdReleased: false,
|
|
2012
|
+
hidden: false,
|
|
2013
|
+
specialist: null,
|
|
2014
|
+
scopeUnitToken: unitToken,
|
|
2015
|
+
};
|
|
2016
|
+
livePtys.set(sessionId, tracker);
|
|
2017
|
+
trackerRegisteredAt.set(sessionId, Date.now());
|
|
2018
|
+
deps.logger(`[pty-tracker] op=spawn sessionId=${sessionId.slice(0, 8)} pid=${pty.pid} size=${livePtys.size}`);
|
|
2019
|
+
pty.onExit((e) => {
|
|
2020
|
+
handlePtyNaturalExit(deps, tracker, e, '');
|
|
2021
|
+
});
|
|
2022
|
+
return tracker;
|
|
2023
|
+
}
|
|
2024
|
+
/** Task 558 — the rc-spawn `op=fd-release trigger=session-ready` path
|
|
2025
|
+
* (Task 557) is gone: the master IS the live session, not a reclaimable
|
|
2026
|
+
* spawn artifact. The tracker is now released only by `handlePtyNaturalExit`
|
|
2027
|
+
* (the slave exited on its own) or by `stopSession`'s `op=archive-release`
|
|
2028
|
+
* (operator teardown). This export remains only because tests under
|
|
2029
|
+
* `__tests__/` reach for it directly; its body is the same idempotent
|
|
2030
|
+
* release-and-detach, called solely from those tests. Once those tests
|
|
2031
|
+
* switch to the `op=archive-release` shape (Task 558 verification), this
|
|
2032
|
+
* export can go. */
|
|
2033
|
+
export function releaseAndUnregisterRcSpawnPty(deps, tracker, trigger) {
|
|
2034
|
+
const suffix = tracker.fdReleased ? 'master-fd=closed' : releasePtyMasterFd(tracker);
|
|
2035
|
+
if (suffix === 'master-fd=closed')
|
|
2036
|
+
tracker.fdReleased = true;
|
|
2037
|
+
if (livePtys.get(tracker.sessionId) === tracker) {
|
|
2038
|
+
livePtys.delete(tracker.sessionId);
|
|
2039
|
+
trackerRegisteredAt.delete(tracker.sessionId);
|
|
2040
|
+
}
|
|
2041
|
+
deps.logger(`[pty-tracker] op=detach sessionId=${tracker.sessionId.slice(0, 8)} pid=${tracker.pid} trigger=${trigger} size=${livePtys.size}`);
|
|
2042
|
+
return { suffix, openFds: openFdCount() };
|
|
2043
|
+
}
|
|
2044
|
+
export function writeInputToPty(sessionId, text, logger, channel) {
|
|
2045
|
+
const t = livePtys.get(sessionId);
|
|
2046
|
+
if (!t)
|
|
2047
|
+
return { ok: false, error: 'not-found' };
|
|
2048
|
+
if (t.exited)
|
|
2049
|
+
return { ok: false, error: 'exited' };
|
|
2050
|
+
const bytes = Buffer.byteLength(text, 'utf8');
|
|
2051
|
+
// Task 122 — multi-line `text` must arrive at the TUI as one submitted
|
|
2052
|
+
// turn, not as keystrokes. Claude's TUI treats embedded `\n` typed via
|
|
2053
|
+
// `pty.write` as a bracketed-paste boundary that buffers and never
|
|
2054
|
+
// submits. Wrapping the bytes in DEC bracketed-paste markers
|
|
2055
|
+
// (\e[200~ ... \e[201~) and then sending `\r` makes the TUI treat the
|
|
2056
|
+
// payload as a single paste followed by an explicit submit keystroke.
|
|
2057
|
+
// Single-line text keeps the previous typed-keystroke path byte-for-byte
|
|
2058
|
+
// so the Sidebar timestamp stimulus is unchanged.
|
|
2059
|
+
const multiline = text.includes('\n');
|
|
2060
|
+
const submitMode = multiline ? 'bracketed-paste' : 'typed';
|
|
2061
|
+
try {
|
|
2062
|
+
if (multiline) {
|
|
2063
|
+
t.pty.write(`\x1b[200~${text}\x1b[201~\r`);
|
|
2064
|
+
}
|
|
2065
|
+
else {
|
|
2066
|
+
t.pty.write(text + '\r');
|
|
2067
|
+
}
|
|
2068
|
+
}
|
|
2069
|
+
catch (err) {
|
|
2070
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
2071
|
+
logger(`input-failed pid=${t.pid} sessionId=${sessionId} message=${msg}`);
|
|
2072
|
+
return { ok: false, error: 'write-failed', detail: msg };
|
|
2073
|
+
}
|
|
2074
|
+
logger(`input pid=${t.pid} sessionId=${sessionId} bytes=${bytes} channel=${channel ?? 'unknown'} multiline=${multiline} submit-mode=${submitMode}`);
|
|
2075
|
+
return { ok: true, bytes };
|
|
2076
|
+
}
|
|
2077
|
+
//# sourceMappingURL=pty-spawner.js.map
|