@rubytech/create-sitedesk-code 0.1.387 → 0.1.388

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.
Files changed (201) hide show
  1. package/package.json +1 -1
  2. package/payload/platform/config/brand.json +3 -3
  3. package/payload/platform/plugins/.claude-plugin/marketplace.json +0 -5
  4. package/payload/platform/plugins/whatsapp/references/channels-whatsapp.md +5 -3
  5. package/payload/platform/plugins/whatsapp/skills/manage-whatsapp-config/SKILL.md +2 -0
  6. package/payload/premium-plugins/.claude-plugin/marketplace.json +0 -15
  7. package/payload/server/server.js +169 -67
  8. package/payload/platform/plugins/sales/.claude-plugin/plugin.json +0 -8
  9. package/payload/platform/plugins/sales/PLUGIN.md +0 -106
  10. package/payload/platform/plugins/sales/references/close-tracking.md +0 -69
  11. package/payload/platform/plugins/sales/references/comparisons.md +0 -99
  12. package/payload/platform/plugins/sales/references/competitive-positioning.md +0 -51
  13. package/payload/platform/plugins/sales/references/faq.md +0 -73
  14. package/payload/platform/plugins/sales/references/objection-handling.md +0 -157
  15. package/payload/platform/plugins/sales/references/pricing.md +0 -101
  16. package/payload/premium-plugins/teaching/.claude-plugin/plugin.json +0 -8
  17. package/payload/premium-plugins/teaching/PLUGIN.md +0 -58
  18. package/payload/premium-plugins/teaching/skills/interactive-tutor/SKILL.md +0 -59
  19. package/payload/premium-plugins/teaching/skills/interactive-tutor/references/assessment.md +0 -70
  20. package/payload/premium-plugins/teaching/skills/interactive-tutor/references/classroom-conduct.md +0 -43
  21. package/payload/premium-plugins/teaching/skills/interactive-tutor/references/teaching-modes.md +0 -83
  22. package/payload/premium-plugins/teaching/skills/lesson-planner/SKILL.md +0 -48
  23. package/payload/premium-plugins/teaching/skills/lesson-planner/references/context-gathering.md +0 -41
  24. package/payload/premium-plugins/teaching/skills/lesson-planner/references/plan-structure.md +0 -94
  25. package/payload/premium-plugins/teaching/skills/study-pack-builder/SKILL.md +0 -52
  26. package/payload/premium-plugins/teaching/skills/study-pack-builder/references/disaggregation.md +0 -49
  27. package/payload/premium-plugins/teaching/skills/study-pack-builder/references/materials.md +0 -116
  28. package/payload/premium-plugins/venture-studio/.claude-plugin/plugin.json +0 -8
  29. package/payload/premium-plugins/venture-studio/PLUGIN.md +0 -128
  30. package/payload/premium-plugins/venture-studio/bin/scaffold.sh +0 -116
  31. package/payload/premium-plugins/venture-studio/skills/brand-pack/SKILL.md +0 -256
  32. package/payload/premium-plugins/venture-studio/skills/brand-pack/references/color-psychology.md +0 -118
  33. package/payload/premium-plugins/venture-studio/skills/investor-data-room/SKILL.md +0 -436
  34. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/business-plan-template.md +0 -64
  35. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/competitive-battlecard.md +0 -37
  36. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/competitor-analysis.md +0 -32
  37. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/compliance-research-checklist.md +0 -53
  38. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/data-room-structure.md +0 -88
  39. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/deck-blueprint-template.md +0 -39
  40. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/design-tokens-application.md +0 -79
  41. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/html-pdf-pipeline.md +0 -236
  42. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/internal-workings-scrub.md +0 -33
  43. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/monetization-strategy.md +0 -35
  44. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/pricing-strategy.md +0 -37
  45. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/strategy-frameworks.md +0 -46
  46. package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/termsheet-template.md +0 -88
  47. package/payload/premium-plugins/venture-studio/skills/investor-data-room/templates/prospectus/index.html +0 -1565
  48. package/payload/premium-plugins/venture-studio/skills/investor-data-room/templates/prospectus/render-pdf.mjs +0 -91
  49. package/payload/premium-plugins/venture-studio/skills/investor-data-room/templates/prospectus/term_sheet.html +0 -715
  50. package/payload/premium-plugins/venture-studio/skills/legal-essentials/SKILL.md +0 -65
  51. package/payload/premium-plugins/venture-studio/skills/office-hours/SKILL.md +0 -587
  52. package/payload/premium-plugins/venture-studio/skills/prototype-host/SKILL.md +0 -179
  53. package/payload/premium-plugins/venture-studio/skills/prototype-host/references/cloudflared-ingress-edit.md +0 -81
  54. package/payload/premium-plugins/venture-studio/skills/prototype-host/references/scaffold-frameworks.md +0 -60
  55. package/payload/premium-plugins/venture-studio/skills/prototype-host/references/systemd-user-service.md +0 -104
  56. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/SKILL.md +0 -342
  57. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/aarrr-metrics.md +0 -275
  58. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/assumption-testing.md +0 -93
  59. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/boolean-search.md +0 -308
  60. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/build-measure-learn.md +0 -262
  61. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/business-model-canvas.md +0 -171
  62. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/commitment-signals.md +0 -246
  63. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/design-thinking.md +0 -183
  64. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/earlyvangelist.md +0 -190
  65. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/first-principles.md +0 -58
  66. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/fishbone.md +0 -114
  67. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/five-whys.md +0 -43
  68. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/ice-scoring.md +0 -237
  69. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/innovation-accounting.md +0 -290
  70. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/jtbd.md +0 -105
  71. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/landing-page.md +0 -361
  72. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/market-sizing.md +0 -58
  73. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/market-type.md +0 -167
  74. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/mom-test.md +0 -193
  75. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/mvp-types.md +0 -200
  76. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/og-images.md +0 -239
  77. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/pareto.md +0 -103
  78. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/persona-development.md +0 -291
  79. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/pivot-types.md +0 -225
  80. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/positioning-statement.md +0 -179
  81. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/prd.md +0 -363
  82. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/pre-mortem.md +0 -74
  83. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/problem-validation.md +0 -253
  84. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/product-market-fit.md +0 -256
  85. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/research-synthesis.md +0 -276
  86. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/strategy-red-team.md +0 -41
  87. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/three-engines-of-growth.md +0 -248
  88. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/validation-tests.md +0 -89
  89. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/value-proposition-canvas.md +0 -121
  90. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/win-loss-analysis.md +0 -242
  91. package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/workflow-mapping.md +0 -271
  92. package/payload/premium-plugins/writer-craft/.claude-plugin/plugin.json +0 -21
  93. package/payload/premium-plugins/writer-craft/PLUGIN.md +0 -134
  94. package/payload/premium-plugins/writer-craft/agents/writer-craft--manuscript-reviewer.md +0 -108
  95. package/payload/premium-plugins/writer-craft/lib/mcp-lifeline/dist/index.d.ts +0 -8
  96. package/payload/premium-plugins/writer-craft/lib/mcp-lifeline/dist/index.d.ts.map +0 -1
  97. package/payload/premium-plugins/writer-craft/lib/mcp-lifeline/dist/index.js +0 -71
  98. package/payload/premium-plugins/writer-craft/lib/mcp-lifeline/dist/index.js.map +0 -1
  99. package/payload/premium-plugins/writer-craft/lib/mcp-lifeline/package.json +0 -7
  100. package/payload/premium-plugins/writer-craft/lib/mcp-spawn-tee/index.js +0 -193
  101. package/payload/premium-plugins/writer-craft/lib/mcp-spawn-tee/package.json +0 -3
  102. package/payload/premium-plugins/writer-craft/lib/mcp-stderr-tee/dist/index.d.ts +0 -51
  103. package/payload/premium-plugins/writer-craft/lib/mcp-stderr-tee/dist/index.d.ts.map +0 -1
  104. package/payload/premium-plugins/writer-craft/lib/mcp-stderr-tee/dist/index.js +0 -196
  105. package/payload/premium-plugins/writer-craft/lib/mcp-stderr-tee/dist/index.js.map +0 -1
  106. package/payload/premium-plugins/writer-craft/lib/mcp-stderr-tee/package.json +0 -7
  107. package/payload/premium-plugins/writer-craft/mcp/dist/cli/ingest-session-text.d.ts +0 -3
  108. package/payload/premium-plugins/writer-craft/mcp/dist/cli/ingest-session-text.d.ts.map +0 -1
  109. package/payload/premium-plugins/writer-craft/mcp/dist/cli/ingest-session-text.js +0 -58
  110. package/payload/premium-plugins/writer-craft/mcp/dist/cli/ingest-session-text.js.map +0 -1
  111. package/payload/premium-plugins/writer-craft/mcp/dist/index.d.ts +0 -3
  112. package/payload/premium-plugins/writer-craft/mcp/dist/index.d.ts.map +0 -1
  113. package/payload/premium-plugins/writer-craft/mcp/dist/index.js +0 -403
  114. package/payload/premium-plugins/writer-craft/mcp/dist/index.js.map +0 -1
  115. package/payload/premium-plugins/writer-craft/mcp/dist/lib/neo4j.d.ts +0 -14
  116. package/payload/premium-plugins/writer-craft/mcp/dist/lib/neo4j.d.ts.map +0 -1
  117. package/payload/premium-plugins/writer-craft/mcp/dist/lib/neo4j.js +0 -47
  118. package/payload/premium-plugins/writer-craft/mcp/dist/lib/neo4j.js.map +0 -1
  119. package/payload/premium-plugins/writer-craft/mcp/dist/lib/voice-corpus.d.ts +0 -117
  120. package/payload/premium-plugins/writer-craft/mcp/dist/lib/voice-corpus.d.ts.map +0 -1
  121. package/payload/premium-plugins/writer-craft/mcp/dist/lib/voice-corpus.js +0 -138
  122. package/payload/premium-plugins/writer-craft/mcp/dist/lib/voice-corpus.js.map +0 -1
  123. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-distil-profile.d.ts +0 -90
  124. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-distil-profile.d.ts.map +0 -1
  125. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-distil-profile.js +0 -609
  126. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-distil-profile.js.map +0 -1
  127. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-ingest-session-text.d.ts +0 -19
  128. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-ingest-session-text.d.ts.map +0 -1
  129. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-ingest-session-text.js +0 -124
  130. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-ingest-session-text.js.map +0 -1
  131. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-record-feedback.d.ts +0 -38
  132. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-record-feedback.d.ts.map +0 -1
  133. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-record-feedback.js +0 -93
  134. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-record-feedback.js.map +0 -1
  135. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-retrieve-conditioning.d.ts +0 -61
  136. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-retrieve-conditioning.d.ts.map +0 -1
  137. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-retrieve-conditioning.js +0 -171
  138. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-retrieve-conditioning.js.map +0 -1
  139. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-tag-content.d.ts +0 -35
  140. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-tag-content.d.ts.map +0 -1
  141. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-tag-content.js +0 -127
  142. package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-tag-content.js.map +0 -1
  143. package/payload/premium-plugins/writer-craft/mcp/package-lock.json +0 -1327
  144. package/payload/premium-plugins/writer-craft/mcp/package.json +0 -19
  145. package/payload/premium-plugins/writer-craft/mcp/scripts/smoke.mjs +0 -420
  146. package/payload/premium-plugins/writer-craft/mcp/src/index.ts +0 -457
  147. package/payload/premium-plugins/writer-craft/mcp/src/lib/neo4j.ts +0 -56
  148. package/payload/premium-plugins/writer-craft/mcp/src/lib/voice-corpus.ts +0 -154
  149. package/payload/premium-plugins/writer-craft/mcp/src/tools/voice-distil-profile.ts +0 -833
  150. package/payload/premium-plugins/writer-craft/mcp/src/tools/voice-ingest-session-text.ts +0 -153
  151. package/payload/premium-plugins/writer-craft/mcp/src/tools/voice-record-feedback.ts +0 -148
  152. package/payload/premium-plugins/writer-craft/mcp/src/tools/voice-retrieve-conditioning.ts +0 -270
  153. package/payload/premium-plugins/writer-craft/mcp/src/tools/voice-tag-content.ts +0 -181
  154. package/payload/premium-plugins/writer-craft/mcp/tsconfig.json +0 -8
  155. package/payload/premium-plugins/writer-craft/skills/citation-style/SKILL.md +0 -94
  156. package/payload/premium-plugins/writer-craft/skills/citation-style/references/book-and-chapter-models.md +0 -77
  157. package/payload/premium-plugins/writer-craft/skills/citation-style/references/citation-rules.md +0 -103
  158. package/payload/premium-plugins/writer-craft/skills/citation-style/references/journal-article-models.md +0 -74
  159. package/payload/premium-plugins/writer-craft/skills/citation-style/references/other-source-models.md +0 -146
  160. package/payload/premium-plugins/writer-craft/skills/citation-style/references/reference-list-rules.md +0 -70
  161. package/payload/premium-plugins/writer-craft/skills/editorial-practice/SKILL.md +0 -108
  162. package/payload/premium-plugins/writer-craft/skills/editorial-practice/references/copyediting.md +0 -73
  163. package/payload/premium-plugins/writer-craft/skills/editorial-practice/references/developmental-editing.md +0 -85
  164. package/payload/premium-plugins/writer-craft/skills/editorial-practice/references/genre-specific-editing.md +0 -78
  165. package/payload/premium-plugins/writer-craft/skills/editorial-practice/references/line-editing.md +0 -55
  166. package/payload/premium-plugins/writer-craft/skills/editorial-practice/references/self-editing.md +0 -89
  167. package/payload/premium-plugins/writer-craft/skills/persuasive-storytelling/SKILL.md +0 -114
  168. package/payload/premium-plugins/writer-craft/skills/persuasive-storytelling/references/audience-analysis.md +0 -73
  169. package/payload/premium-plugins/writer-craft/skills/persuasive-storytelling/references/crafting-persuasive-story.md +0 -76
  170. package/payload/premium-plugins/writer-craft/skills/persuasive-storytelling/references/persuasion-case-studies.md +0 -67
  171. package/payload/premium-plugins/writer-craft/skills/persuasive-storytelling/references/transformation-framework.md +0 -86
  172. package/payload/premium-plugins/writer-craft/skills/point-of-view/SKILL.md +0 -97
  173. package/payload/premium-plugins/writer-craft/skills/point-of-view/references/indirect-narration.md +0 -72
  174. package/payload/premium-plugins/writer-craft/skills/point-of-view/references/pov-types-and-voice.md +0 -91
  175. package/payload/premium-plugins/writer-craft/skills/point-of-view/references/protagonist-filter.md +0 -71
  176. package/payload/premium-plugins/writer-craft/skills/point-of-view/references/tense-and-person.md +0 -85
  177. package/payload/premium-plugins/writer-craft/skills/prose-craft/SKILL.md +0 -100
  178. package/payload/premium-plugins/writer-craft/skills/prose-craft/references/punctuation-and-grammar.md +0 -72
  179. package/payload/premium-plugins/writer-craft/skills/prose-craft/references/repetition.md +0 -71
  180. package/payload/premium-plugins/writer-craft/skills/prose-craft/references/sound-and-rhythm.md +0 -64
  181. package/payload/premium-plugins/writer-craft/skills/prose-craft/references/word-economy.md +0 -93
  182. package/payload/premium-plugins/writer-craft/skills/reader-engagement/SKILL.md +0 -100
  183. package/payload/premium-plugins/writer-craft/skills/reader-engagement/references/cause-effect-setup-payoff.md +0 -79
  184. package/payload/premium-plugins/writer-craft/skills/reader-engagement/references/conflict-escalation.md +0 -81
  185. package/payload/premium-plugins/writer-craft/skills/reader-engagement/references/hooking-readers.md +0 -67
  186. package/payload/premium-plugins/writer-craft/skills/reader-engagement/references/neurochemistry-of-engagement.md +0 -94
  187. package/payload/premium-plugins/writer-craft/skills/review-manuscript/SKILL.md +0 -111
  188. package/payload/premium-plugins/writer-craft/skills/review-manuscript/references/review-manuscript-checklist.md +0 -119
  189. package/payload/premium-plugins/writer-craft/skills/review-prose/SKILL.md +0 -99
  190. package/payload/premium-plugins/writer-craft/skills/review-prose/references/prose-review-checklist.md +0 -112
  191. package/payload/premium-plugins/writer-craft/skills/review-scene/SKILL.md +0 -99
  192. package/payload/premium-plugins/writer-craft/skills/review-scene/references/scene-analysis-framework.md +0 -95
  193. package/payload/premium-plugins/writer-craft/skills/story-architecture/SKILL.md +0 -106
  194. package/payload/premium-plugins/writer-craft/skills/story-architecture/references/blueprinting-and-scene-cards.md +0 -118
  195. package/payload/premium-plugins/writer-craft/skills/story-architecture/references/inner-issue-and-protagonist-goal.md +0 -66
  196. package/payload/premium-plugins/writer-craft/skills/story-architecture/references/misbelief-desire-worldview.md +0 -87
  197. package/payload/premium-plugins/writer-craft/skills/story-architecture/references/origin-scenes-and-escalation.md +0 -82
  198. package/payload/premium-plugins/writer-craft/skills/story-blueprint/SKILL.md +0 -133
  199. package/payload/premium-plugins/writer-craft/skills/story-blueprint/references/blueprinting-exercises.md +0 -118
  200. package/payload/premium-plugins/writer-craft/skills/story-blueprint/references/blueprinting-process.md +0 -128
  201. package/payload/premium-plugins/writer-craft/skills/voice-mirror/SKILL.md +0 -241
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rubytech/create-sitedesk-code",
3
- "version": "0.1.387",
3
+ "version": "0.1.388",
4
4
  "description": "Install SiteDesk — automated back office for independent building contractors",
5
5
  "bin": {
6
6
  "create-sitedesk-code": "./dist/index.js"
@@ -15,7 +15,7 @@
15
15
  "claudeSessionManagerPort": 19402,
16
16
  "commercialMode": false,
17
17
  "vertical": "schema-construction",
18
- "shipsPremiumBundles": ["venture-studio", "writer-craft", "teaching", "sitedesk"],
18
+ "shipsPremiumBundles": ["sitedesk"],
19
19
  "primaryContainer": { "label": "Job", "term": "Jobs" },
20
20
 
21
21
  "defaultColors": {
@@ -53,9 +53,9 @@
53
53
 
54
54
  "plugins": {
55
55
  "core": ["admin", "memory", "docs", "cloudflare", "anthropic", "workflows", "work", "scheduling", "email", "contacts", "projects", "prompt-optimiser", "browser"],
56
- "defaultEnabled": ["business-assistant", "sales"],
56
+ "defaultEnabled": ["business-assistant"],
57
57
  "available": ["connector", "telegram", "deep-research", "whatsapp", "replicate", "linkedin-import", "notion-import", "obsidian-import", "x-import", "slides"],
58
- "excluded": []
58
+ "excluded": ["sales"]
59
59
  },
60
60
 
61
61
  "externalPlugins": [
@@ -119,11 +119,6 @@
119
119
  "source": "./replicate",
120
120
  "version": "0.1.0"
121
121
  },
122
- {
123
- "name": "sales",
124
- "source": "./sales",
125
- "version": "0.1.0"
126
- },
127
122
  {
128
123
  "name": "scheduling",
129
124
  "source": "./scheduling",
@@ -101,13 +101,15 @@ The platform enforces this at multiple levels:
101
101
  | Term | Definition | Code |
102
102
  |------|-----------|------|
103
103
  | **Self phone** | The WhatsApp account's own phone number (the phone that scanned the QR code). Self-chat only. | `phonesMatch(senderPhone, selfPhone)` in `access-control.ts` |
104
- | **Admin phones** | Phones listed in `adminPhones` in `account.json`. The user's personal phone is auto-registered on QR link; additional phones are added via `whatsapp-config action: "add-admin-phone"`. Their admin session is scoped to the **house** account. | `isAdminPhone()` in `access-control.ts` — iterates `adminPhones` |
105
- | **Account managers** | Phones in the `accountManagers` map (`account.json`, phone → sub-account UUID), added via `whatsapp-config action: "add-account-manager"`. Their admin session is scoped to the **bound sub-account**, not the house. Disjoint from `adminPhones` — a phone is a house admin or a sub-account manager, never both. | `managedAccountFor()` in `access-control.ts`; the sub-account scope is applied in `ensureChannelSession` |
104
+ | **Admin phones** | Phones listed in `adminPhones` in `account.json`. The user's personal phone is auto-registered on QR link; additional phones are added via `whatsapp-config action: "add-admin-phone"`. Their admin session is scoped to the **house** account. `adminPhones` is authoritative only on the account that owns the WhatsApp paired socket (the house): `add-admin-phone` is refused on any other account, and a list left on a non-socket (sub-)account is inert and purged at boot with `[admin-identity] op=purge-nonsocket-adminphone`. To answer "is this phone a manager?" read the house account's `adminPhones` + `accountManagers` only — never a sub-account's list. | `isAdminPhone()` in `access-control.ts` — iterates `adminPhones` |
105
+ | **Account managers** | Phones in the `accountManagers` map (`account.json`, phone → sub-account UUID), added via `whatsapp-config action: "add-account-manager"`. Their admin session is scoped to the **bound sub-account**, not the house. Disjoint from `adminPhones` — a phone is a house admin or a sub-account manager, never both. | `managedAccountFor()` in `access-control.ts` resolves the sub-account **once**; `checkDmAccess` returns it as `effectiveAccountId`, and `ensureChannelSession` consumes that value without re-resolving |
106
106
  | **Public/unknown** | Any phone that is not self, not in `adminPhones`, and not in `accountManagers`. Subject to DM policy gating. | Everything else in `checkDmAccess()` |
107
107
 
108
108
  **Critical distinction:** The *self phone* is the paired device's number (the WhatsApp account SiteDesk controls). The *admin phone* is the user's personal phone (the phone they message *from*). These are typically different numbers. If the user's personal phone is not in `adminPhones` or `accountManagers`, their messages route as public — not admin.
109
109
 
110
- **Account-manager scoping — the two-account split.** A designated manager's inbound spawns an admin session scoped to their sub-account (its graph, skills, and `${USER_ID}` attribution). Replies and file delivery still go out over the **house's** paired WhatsApp device — the only WhatsApp socket — so the sub-account scope never redirects the transport. `ensureChannelSession` feeds the effective (sub-account) id to the spawn while keeping the connection (house) account for `startNativeFileFollower` and the reply path. A stale binding (deleted sub-account, or a phone wrongly also on `adminPhones`) is surfaced at boot by `account-manager-drift` and never silently mis-routes.
110
+ **Account-manager scoping — the two-account split.** A designated manager's inbound spawns an admin session scoped to their sub-account (its graph, skills, and `${USER_ID}` attribution). Replies and file delivery still go out over the **house's** paired WhatsApp device — the only WhatsApp socket — so the sub-account scope never redirects the transport. The connection (house) account is kept for `startNativeFileFollower` and the reply path. A stale binding (a phone wrongly also on `adminPhones`) is surfaced at boot by `account-manager-drift` and never silently mis-routes.
111
+
112
+ **Single source of truth + fail-closed.** The effective account is resolved **exactly once**, in the gate: `checkDmAccess` returns `effectiveAccountId` (the house account for owner/`adminPhones`/public, the bound sub-account for a manager), and that value threads through the inbound payload → gateway → `ensureChannelSession`, which spawns into it **without re-reading** the `accountManagers` map. There is no second resolution and no `?? accountId` house fallback: if a manager's bound sub-account is not a valid account, the inbound is **rejected** (no session spawned, no reply), never routed to the house. This closes the escalation where a divergence between two independent map reads handed a scoped manager a house-owner admin session. Observable signals: `op=account-manager-route … effectiveAccount=… source=gate` on a routed manager inbound; `op=account-manager-reject … reason=unresolved-effective-account` on the fail-closed drop; a standing `op=escalation-tripwire` belt that can only fire if a future change reintroduces the divergence.
111
113
 
112
114
  **`dmPolicy` behaviour (per-account):**
113
115
 
@@ -31,6 +31,8 @@ Call `whatsapp-config action: list-admin-phones` and present the current list. A
31
31
 
32
32
  Each add/remove fires immediately — admin phones are managed per-action, independent of the form's batch submit.
33
33
 
34
+ Admin phones are authoritative only on the account that owns the WhatsApp paired socket (the house). Adding an admin phone always applies to that account; the write is refused on any other account, because a phone in a sub-account's admin list is never consulted. To route a person to a specific sub-account, bind them as an account manager with `add-account-manager` instead — do not read or edit a sub-account's admin list to answer "is this phone a manager?".
35
+
34
36
  **Account managers:**
35
37
 
36
38
  An account manager is a phone bound to a specific sub-account. Its WhatsApp messages spawn an admin session scoped to that sub-account's agent, not the house. Use this when a person who manages one client sub-account should reach that sub-account's agent over WhatsApp.
@@ -8,21 +8,6 @@
8
8
  "name": "sitedesk",
9
9
  "source": "./sitedesk",
10
10
  "version": "0.1.0"
11
- },
12
- {
13
- "name": "teaching",
14
- "source": "./teaching",
15
- "version": "0.1.0"
16
- },
17
- {
18
- "name": "venture-studio",
19
- "source": "./venture-studio",
20
- "version": "0.1.0"
21
- },
22
- {
23
- "name": "writer-craft",
24
- "source": "./writer-craft",
25
- "version": "0.1.0"
26
11
  }
27
12
  ]
28
13
  }