@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.
- package/package.json +1 -1
- package/payload/platform/config/brand.json +3 -3
- package/payload/platform/plugins/.claude-plugin/marketplace.json +0 -5
- package/payload/platform/plugins/whatsapp/references/channels-whatsapp.md +5 -3
- package/payload/platform/plugins/whatsapp/skills/manage-whatsapp-config/SKILL.md +2 -0
- package/payload/premium-plugins/.claude-plugin/marketplace.json +0 -15
- package/payload/server/server.js +169 -67
- package/payload/platform/plugins/sales/.claude-plugin/plugin.json +0 -8
- package/payload/platform/plugins/sales/PLUGIN.md +0 -106
- package/payload/platform/plugins/sales/references/close-tracking.md +0 -69
- package/payload/platform/plugins/sales/references/comparisons.md +0 -99
- package/payload/platform/plugins/sales/references/competitive-positioning.md +0 -51
- package/payload/platform/plugins/sales/references/faq.md +0 -73
- package/payload/platform/plugins/sales/references/objection-handling.md +0 -157
- package/payload/platform/plugins/sales/references/pricing.md +0 -101
- package/payload/premium-plugins/teaching/.claude-plugin/plugin.json +0 -8
- package/payload/premium-plugins/teaching/PLUGIN.md +0 -58
- package/payload/premium-plugins/teaching/skills/interactive-tutor/SKILL.md +0 -59
- package/payload/premium-plugins/teaching/skills/interactive-tutor/references/assessment.md +0 -70
- package/payload/premium-plugins/teaching/skills/interactive-tutor/references/classroom-conduct.md +0 -43
- package/payload/premium-plugins/teaching/skills/interactive-tutor/references/teaching-modes.md +0 -83
- package/payload/premium-plugins/teaching/skills/lesson-planner/SKILL.md +0 -48
- package/payload/premium-plugins/teaching/skills/lesson-planner/references/context-gathering.md +0 -41
- package/payload/premium-plugins/teaching/skills/lesson-planner/references/plan-structure.md +0 -94
- package/payload/premium-plugins/teaching/skills/study-pack-builder/SKILL.md +0 -52
- package/payload/premium-plugins/teaching/skills/study-pack-builder/references/disaggregation.md +0 -49
- package/payload/premium-plugins/teaching/skills/study-pack-builder/references/materials.md +0 -116
- package/payload/premium-plugins/venture-studio/.claude-plugin/plugin.json +0 -8
- package/payload/premium-plugins/venture-studio/PLUGIN.md +0 -128
- package/payload/premium-plugins/venture-studio/bin/scaffold.sh +0 -116
- package/payload/premium-plugins/venture-studio/skills/brand-pack/SKILL.md +0 -256
- package/payload/premium-plugins/venture-studio/skills/brand-pack/references/color-psychology.md +0 -118
- package/payload/premium-plugins/venture-studio/skills/investor-data-room/SKILL.md +0 -436
- package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/business-plan-template.md +0 -64
- package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/competitive-battlecard.md +0 -37
- package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/competitor-analysis.md +0 -32
- package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/compliance-research-checklist.md +0 -53
- package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/data-room-structure.md +0 -88
- package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/deck-blueprint-template.md +0 -39
- package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/design-tokens-application.md +0 -79
- package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/html-pdf-pipeline.md +0 -236
- package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/internal-workings-scrub.md +0 -33
- package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/monetization-strategy.md +0 -35
- package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/pricing-strategy.md +0 -37
- package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/strategy-frameworks.md +0 -46
- package/payload/premium-plugins/venture-studio/skills/investor-data-room/references/termsheet-template.md +0 -88
- package/payload/premium-plugins/venture-studio/skills/investor-data-room/templates/prospectus/index.html +0 -1565
- package/payload/premium-plugins/venture-studio/skills/investor-data-room/templates/prospectus/render-pdf.mjs +0 -91
- package/payload/premium-plugins/venture-studio/skills/investor-data-room/templates/prospectus/term_sheet.html +0 -715
- package/payload/premium-plugins/venture-studio/skills/legal-essentials/SKILL.md +0 -65
- package/payload/premium-plugins/venture-studio/skills/office-hours/SKILL.md +0 -587
- package/payload/premium-plugins/venture-studio/skills/prototype-host/SKILL.md +0 -179
- package/payload/premium-plugins/venture-studio/skills/prototype-host/references/cloudflared-ingress-edit.md +0 -81
- package/payload/premium-plugins/venture-studio/skills/prototype-host/references/scaffold-frameworks.md +0 -60
- package/payload/premium-plugins/venture-studio/skills/prototype-host/references/systemd-user-service.md +0 -104
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/SKILL.md +0 -342
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/aarrr-metrics.md +0 -275
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/assumption-testing.md +0 -93
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/boolean-search.md +0 -308
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/build-measure-learn.md +0 -262
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/business-model-canvas.md +0 -171
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/commitment-signals.md +0 -246
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/design-thinking.md +0 -183
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/earlyvangelist.md +0 -190
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/first-principles.md +0 -58
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/fishbone.md +0 -114
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/five-whys.md +0 -43
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/ice-scoring.md +0 -237
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/innovation-accounting.md +0 -290
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/jtbd.md +0 -105
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/landing-page.md +0 -361
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/market-sizing.md +0 -58
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/market-type.md +0 -167
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/mom-test.md +0 -193
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/mvp-types.md +0 -200
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/og-images.md +0 -239
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/pareto.md +0 -103
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/persona-development.md +0 -291
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/pivot-types.md +0 -225
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/positioning-statement.md +0 -179
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/prd.md +0 -363
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/pre-mortem.md +0 -74
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/problem-validation.md +0 -253
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/product-market-fit.md +0 -256
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/research-synthesis.md +0 -276
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/strategy-red-team.md +0 -41
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/three-engines-of-growth.md +0 -248
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/validation-tests.md +0 -89
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/value-proposition-canvas.md +0 -121
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/win-loss-analysis.md +0 -242
- package/payload/premium-plugins/venture-studio/skills/zero-to-prototype/references/workflow-mapping.md +0 -271
- package/payload/premium-plugins/writer-craft/.claude-plugin/plugin.json +0 -21
- package/payload/premium-plugins/writer-craft/PLUGIN.md +0 -134
- package/payload/premium-plugins/writer-craft/agents/writer-craft--manuscript-reviewer.md +0 -108
- package/payload/premium-plugins/writer-craft/lib/mcp-lifeline/dist/index.d.ts +0 -8
- package/payload/premium-plugins/writer-craft/lib/mcp-lifeline/dist/index.d.ts.map +0 -1
- package/payload/premium-plugins/writer-craft/lib/mcp-lifeline/dist/index.js +0 -71
- package/payload/premium-plugins/writer-craft/lib/mcp-lifeline/dist/index.js.map +0 -1
- package/payload/premium-plugins/writer-craft/lib/mcp-lifeline/package.json +0 -7
- package/payload/premium-plugins/writer-craft/lib/mcp-spawn-tee/index.js +0 -193
- package/payload/premium-plugins/writer-craft/lib/mcp-spawn-tee/package.json +0 -3
- package/payload/premium-plugins/writer-craft/lib/mcp-stderr-tee/dist/index.d.ts +0 -51
- package/payload/premium-plugins/writer-craft/lib/mcp-stderr-tee/dist/index.d.ts.map +0 -1
- package/payload/premium-plugins/writer-craft/lib/mcp-stderr-tee/dist/index.js +0 -196
- package/payload/premium-plugins/writer-craft/lib/mcp-stderr-tee/dist/index.js.map +0 -1
- package/payload/premium-plugins/writer-craft/lib/mcp-stderr-tee/package.json +0 -7
- package/payload/premium-plugins/writer-craft/mcp/dist/cli/ingest-session-text.d.ts +0 -3
- package/payload/premium-plugins/writer-craft/mcp/dist/cli/ingest-session-text.d.ts.map +0 -1
- package/payload/premium-plugins/writer-craft/mcp/dist/cli/ingest-session-text.js +0 -58
- package/payload/premium-plugins/writer-craft/mcp/dist/cli/ingest-session-text.js.map +0 -1
- package/payload/premium-plugins/writer-craft/mcp/dist/index.d.ts +0 -3
- package/payload/premium-plugins/writer-craft/mcp/dist/index.d.ts.map +0 -1
- package/payload/premium-plugins/writer-craft/mcp/dist/index.js +0 -403
- package/payload/premium-plugins/writer-craft/mcp/dist/index.js.map +0 -1
- package/payload/premium-plugins/writer-craft/mcp/dist/lib/neo4j.d.ts +0 -14
- package/payload/premium-plugins/writer-craft/mcp/dist/lib/neo4j.d.ts.map +0 -1
- package/payload/premium-plugins/writer-craft/mcp/dist/lib/neo4j.js +0 -47
- package/payload/premium-plugins/writer-craft/mcp/dist/lib/neo4j.js.map +0 -1
- package/payload/premium-plugins/writer-craft/mcp/dist/lib/voice-corpus.d.ts +0 -117
- package/payload/premium-plugins/writer-craft/mcp/dist/lib/voice-corpus.d.ts.map +0 -1
- package/payload/premium-plugins/writer-craft/mcp/dist/lib/voice-corpus.js +0 -138
- package/payload/premium-plugins/writer-craft/mcp/dist/lib/voice-corpus.js.map +0 -1
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-distil-profile.d.ts +0 -90
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-distil-profile.d.ts.map +0 -1
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-distil-profile.js +0 -609
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-distil-profile.js.map +0 -1
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-ingest-session-text.d.ts +0 -19
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-ingest-session-text.d.ts.map +0 -1
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-ingest-session-text.js +0 -124
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-ingest-session-text.js.map +0 -1
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-record-feedback.d.ts +0 -38
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-record-feedback.d.ts.map +0 -1
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-record-feedback.js +0 -93
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-record-feedback.js.map +0 -1
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-retrieve-conditioning.d.ts +0 -61
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-retrieve-conditioning.d.ts.map +0 -1
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-retrieve-conditioning.js +0 -171
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-retrieve-conditioning.js.map +0 -1
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-tag-content.d.ts +0 -35
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-tag-content.d.ts.map +0 -1
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-tag-content.js +0 -127
- package/payload/premium-plugins/writer-craft/mcp/dist/tools/voice-tag-content.js.map +0 -1
- package/payload/premium-plugins/writer-craft/mcp/package-lock.json +0 -1327
- package/payload/premium-plugins/writer-craft/mcp/package.json +0 -19
- package/payload/premium-plugins/writer-craft/mcp/scripts/smoke.mjs +0 -420
- package/payload/premium-plugins/writer-craft/mcp/src/index.ts +0 -457
- package/payload/premium-plugins/writer-craft/mcp/src/lib/neo4j.ts +0 -56
- package/payload/premium-plugins/writer-craft/mcp/src/lib/voice-corpus.ts +0 -154
- package/payload/premium-plugins/writer-craft/mcp/src/tools/voice-distil-profile.ts +0 -833
- package/payload/premium-plugins/writer-craft/mcp/src/tools/voice-ingest-session-text.ts +0 -153
- package/payload/premium-plugins/writer-craft/mcp/src/tools/voice-record-feedback.ts +0 -148
- package/payload/premium-plugins/writer-craft/mcp/src/tools/voice-retrieve-conditioning.ts +0 -270
- package/payload/premium-plugins/writer-craft/mcp/src/tools/voice-tag-content.ts +0 -181
- package/payload/premium-plugins/writer-craft/mcp/tsconfig.json +0 -8
- package/payload/premium-plugins/writer-craft/skills/citation-style/SKILL.md +0 -94
- package/payload/premium-plugins/writer-craft/skills/citation-style/references/book-and-chapter-models.md +0 -77
- package/payload/premium-plugins/writer-craft/skills/citation-style/references/citation-rules.md +0 -103
- package/payload/premium-plugins/writer-craft/skills/citation-style/references/journal-article-models.md +0 -74
- package/payload/premium-plugins/writer-craft/skills/citation-style/references/other-source-models.md +0 -146
- package/payload/premium-plugins/writer-craft/skills/citation-style/references/reference-list-rules.md +0 -70
- package/payload/premium-plugins/writer-craft/skills/editorial-practice/SKILL.md +0 -108
- package/payload/premium-plugins/writer-craft/skills/editorial-practice/references/copyediting.md +0 -73
- package/payload/premium-plugins/writer-craft/skills/editorial-practice/references/developmental-editing.md +0 -85
- package/payload/premium-plugins/writer-craft/skills/editorial-practice/references/genre-specific-editing.md +0 -78
- package/payload/premium-plugins/writer-craft/skills/editorial-practice/references/line-editing.md +0 -55
- package/payload/premium-plugins/writer-craft/skills/editorial-practice/references/self-editing.md +0 -89
- package/payload/premium-plugins/writer-craft/skills/persuasive-storytelling/SKILL.md +0 -114
- package/payload/premium-plugins/writer-craft/skills/persuasive-storytelling/references/audience-analysis.md +0 -73
- package/payload/premium-plugins/writer-craft/skills/persuasive-storytelling/references/crafting-persuasive-story.md +0 -76
- package/payload/premium-plugins/writer-craft/skills/persuasive-storytelling/references/persuasion-case-studies.md +0 -67
- package/payload/premium-plugins/writer-craft/skills/persuasive-storytelling/references/transformation-framework.md +0 -86
- package/payload/premium-plugins/writer-craft/skills/point-of-view/SKILL.md +0 -97
- package/payload/premium-plugins/writer-craft/skills/point-of-view/references/indirect-narration.md +0 -72
- package/payload/premium-plugins/writer-craft/skills/point-of-view/references/pov-types-and-voice.md +0 -91
- package/payload/premium-plugins/writer-craft/skills/point-of-view/references/protagonist-filter.md +0 -71
- package/payload/premium-plugins/writer-craft/skills/point-of-view/references/tense-and-person.md +0 -85
- package/payload/premium-plugins/writer-craft/skills/prose-craft/SKILL.md +0 -100
- package/payload/premium-plugins/writer-craft/skills/prose-craft/references/punctuation-and-grammar.md +0 -72
- package/payload/premium-plugins/writer-craft/skills/prose-craft/references/repetition.md +0 -71
- package/payload/premium-plugins/writer-craft/skills/prose-craft/references/sound-and-rhythm.md +0 -64
- package/payload/premium-plugins/writer-craft/skills/prose-craft/references/word-economy.md +0 -93
- package/payload/premium-plugins/writer-craft/skills/reader-engagement/SKILL.md +0 -100
- package/payload/premium-plugins/writer-craft/skills/reader-engagement/references/cause-effect-setup-payoff.md +0 -79
- package/payload/premium-plugins/writer-craft/skills/reader-engagement/references/conflict-escalation.md +0 -81
- package/payload/premium-plugins/writer-craft/skills/reader-engagement/references/hooking-readers.md +0 -67
- package/payload/premium-plugins/writer-craft/skills/reader-engagement/references/neurochemistry-of-engagement.md +0 -94
- package/payload/premium-plugins/writer-craft/skills/review-manuscript/SKILL.md +0 -111
- package/payload/premium-plugins/writer-craft/skills/review-manuscript/references/review-manuscript-checklist.md +0 -119
- package/payload/premium-plugins/writer-craft/skills/review-prose/SKILL.md +0 -99
- package/payload/premium-plugins/writer-craft/skills/review-prose/references/prose-review-checklist.md +0 -112
- package/payload/premium-plugins/writer-craft/skills/review-scene/SKILL.md +0 -99
- package/payload/premium-plugins/writer-craft/skills/review-scene/references/scene-analysis-framework.md +0 -95
- package/payload/premium-plugins/writer-craft/skills/story-architecture/SKILL.md +0 -106
- package/payload/premium-plugins/writer-craft/skills/story-architecture/references/blueprinting-and-scene-cards.md +0 -118
- package/payload/premium-plugins/writer-craft/skills/story-architecture/references/inner-issue-and-protagonist-goal.md +0 -66
- package/payload/premium-plugins/writer-craft/skills/story-architecture/references/misbelief-desire-worldview.md +0 -87
- package/payload/premium-plugins/writer-craft/skills/story-architecture/references/origin-scenes-and-escalation.md +0 -82
- package/payload/premium-plugins/writer-craft/skills/story-blueprint/SKILL.md +0 -133
- package/payload/premium-plugins/writer-craft/skills/story-blueprint/references/blueprinting-exercises.md +0 -118
- package/payload/premium-plugins/writer-craft/skills/story-blueprint/references/blueprinting-process.md +0 -128
- package/payload/premium-plugins/writer-craft/skills/voice-mirror/SKILL.md +0 -241
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"claudeSessionManagerPort": 19402,
|
|
16
16
|
"commercialMode": false,
|
|
17
17
|
"vertical": "schema-construction",
|
|
18
|
-
"shipsPremiumBundles": ["
|
|
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"
|
|
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": [
|
|
@@ -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
|
|
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.
|
|
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
|
}
|