@rubytech/create-sitedesk-code 0.1.567 → 0.1.569

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 (121) hide show
  1. package/dist/__tests__/brand-agent-root.test.js +91 -0
  2. package/dist/brand-agent-root.js +58 -0
  3. package/dist/index.js +25 -28
  4. package/package.json +1 -1
  5. package/payload/platform/plugins/admin/PLUGIN.md +4 -2
  6. package/payload/platform/plugins/admin/hooks/__tests__/quote-path-write-gate.test.sh +152 -0
  7. package/payload/platform/plugins/admin/hooks/__tests__/quote-pdf-bash-gate.test.sh +95 -0
  8. package/payload/platform/plugins/admin/hooks/__tests__/quote-render-gate.test.sh +141 -45
  9. package/payload/platform/plugins/admin/hooks/__tests__/quote-render-pdf-conformance.test.sh +114 -0
  10. package/payload/platform/plugins/admin/hooks/quote-path-write-gate.sh +137 -0
  11. package/payload/platform/plugins/admin/hooks/quote-pdf-bash-gate.sh +70 -0
  12. package/payload/platform/plugins/admin/hooks/quote-render-gate.sh +105 -37
  13. package/payload/platform/plugins/admin/hooks/quote-render-pdf-conformance.sh +178 -0
  14. package/payload/platform/plugins/admin/mcp/dist/index.js +7 -1
  15. package/payload/platform/plugins/admin/mcp/dist/index.js.map +1 -1
  16. package/payload/platform/plugins/admin/mcp/dist/lib/roster-census.d.ts +10 -1
  17. package/payload/platform/plugins/admin/mcp/dist/lib/roster-census.d.ts.map +1 -1
  18. package/payload/platform/plugins/admin/mcp/dist/lib/roster-census.js +52 -1
  19. package/payload/platform/plugins/admin/mcp/dist/lib/roster-census.js.map +1 -1
  20. package/payload/platform/plugins/admin/mcp/dist/tools/capabilities-here.d.ts +9 -0
  21. package/payload/platform/plugins/admin/mcp/dist/tools/capabilities-here.d.ts.map +1 -1
  22. package/payload/platform/plugins/admin/mcp/dist/tools/capabilities-here.js +1 -1
  23. package/payload/platform/plugins/admin/mcp/dist/tools/capabilities-here.js.map +1 -1
  24. package/payload/platform/plugins/admin/skills/capabilities-here/SKILL.md +1 -1
  25. package/payload/platform/plugins/admin/skills/platform-architecture/SKILL.md +44 -1
  26. package/payload/platform/plugins/admin/skills/whats-new/SKILL.md +15 -0
  27. package/payload/platform/plugins/docs/references/channel-wake-and-prompt.md +43 -0
  28. package/payload/platform/scripts/__tests__/mailbox-inject-registered.test.sh +5 -5
  29. package/payload/platform/scripts/__tests__/preference-hooks-registered.test.sh +3 -1
  30. package/payload/platform/scripts/__tests__/public-surface-registered.test.sh +5 -5
  31. package/payload/platform/scripts/__tests__/quote-ownership-contract.test.sh +86 -0
  32. package/payload/platform/scripts/lib/__tests__/account-settings-reconcile.test.sh +73 -0
  33. package/payload/platform/scripts/lib/account-settings-reconcile.sh +88 -0
  34. package/payload/platform/scripts/lib/provision-account-dir.sh +11 -146
  35. package/payload/platform/scripts/setup-account.sh +13 -0
  36. package/payload/platform/services/claude-session-manager/dist/account-agent-registry.d.ts +39 -0
  37. package/payload/platform/services/claude-session-manager/dist/account-agent-registry.d.ts.map +1 -0
  38. package/payload/platform/services/claude-session-manager/dist/account-agent-registry.js +223 -0
  39. package/payload/platform/services/claude-session-manager/dist/account-agent-registry.js.map +1 -0
  40. package/payload/platform/services/claude-session-manager/dist/fs-watcher.d.ts +5 -0
  41. package/payload/platform/services/claude-session-manager/dist/fs-watcher.d.ts.map +1 -1
  42. package/payload/platform/services/claude-session-manager/dist/fs-watcher.js +5 -5
  43. package/payload/platform/services/claude-session-manager/dist/fs-watcher.js.map +1 -1
  44. package/payload/platform/services/claude-session-manager/dist/http-server.d.ts +11 -1
  45. package/payload/platform/services/claude-session-manager/dist/http-server.d.ts.map +1 -1
  46. package/payload/platform/services/claude-session-manager/dist/http-server.js +58 -12
  47. package/payload/platform/services/claude-session-manager/dist/http-server.js.map +1 -1
  48. package/payload/platform/services/claude-session-manager/dist/index.js +112 -13
  49. package/payload/platform/services/claude-session-manager/dist/index.js.map +1 -1
  50. package/payload/platform/services/claude-session-manager/dist/pty-census.d.ts +6 -1
  51. package/payload/platform/services/claude-session-manager/dist/pty-census.d.ts.map +1 -1
  52. package/payload/platform/services/claude-session-manager/dist/pty-census.js +6 -3
  53. package/payload/platform/services/claude-session-manager/dist/pty-census.js.map +1 -1
  54. package/payload/platform/services/claude-session-manager/dist/pty-spawner.d.ts +21 -8
  55. package/payload/platform/services/claude-session-manager/dist/pty-spawner.d.ts.map +1 -1
  56. package/payload/platform/services/claude-session-manager/dist/pty-spawner.js +38 -15
  57. package/payload/platform/services/claude-session-manager/dist/pty-spawner.js.map +1 -1
  58. package/payload/platform/services/claude-session-manager/dist/quote-delivery-reconcile.d.ts +42 -0
  59. package/payload/platform/services/claude-session-manager/dist/quote-delivery-reconcile.d.ts.map +1 -0
  60. package/payload/platform/services/claude-session-manager/dist/quote-delivery-reconcile.js +215 -0
  61. package/payload/platform/services/claude-session-manager/dist/quote-delivery-reconcile.js.map +1 -0
  62. package/payload/platform/services/claude-session-manager/dist/rc-daemon.d.ts +2 -0
  63. package/payload/platform/services/claude-session-manager/dist/rc-daemon.d.ts.map +1 -1
  64. package/payload/platform/services/claude-session-manager/dist/rc-daemon.js +4 -1
  65. package/payload/platform/services/claude-session-manager/dist/rc-daemon.js.map +1 -1
  66. package/payload/platform/services/claude-session-manager/dist/reaper.d.ts +3 -0
  67. package/payload/platform/services/claude-session-manager/dist/reaper.d.ts.map +1 -1
  68. package/payload/platform/services/claude-session-manager/dist/reaper.js +2 -1
  69. package/payload/platform/services/claude-session-manager/dist/reaper.js.map +1 -1
  70. package/payload/platform/services/claude-session-manager/dist/session-cap-audit.d.ts +2 -0
  71. package/payload/platform/services/claude-session-manager/dist/session-cap-audit.d.ts.map +1 -1
  72. package/payload/platform/services/claude-session-manager/dist/session-cap-audit.js +5 -2
  73. package/payload/platform/services/claude-session-manager/dist/session-cap-audit.js.map +1 -1
  74. package/payload/platform/services/claude-session-manager/dist/slice-memory-policy.d.ts +2 -0
  75. package/payload/platform/services/claude-session-manager/dist/slice-memory-policy.d.ts.map +1 -1
  76. package/payload/platform/services/claude-session-manager/dist/slice-memory-policy.js +5 -3
  77. package/payload/platform/services/claude-session-manager/dist/slice-memory-policy.js.map +1 -1
  78. package/payload/platform/services/claude-session-manager/dist/specialist-preference-audit.d.ts +108 -0
  79. package/payload/platform/services/claude-session-manager/dist/specialist-preference-audit.d.ts.map +1 -0
  80. package/payload/platform/services/claude-session-manager/dist/specialist-preference-audit.js +299 -0
  81. package/payload/platform/services/claude-session-manager/dist/specialist-preference-audit.js.map +1 -0
  82. package/payload/platform/services/claude-session-manager/dist/systemd-scope.d.ts +26 -16
  83. package/payload/platform/services/claude-session-manager/dist/systemd-scope.d.ts.map +1 -1
  84. package/payload/platform/services/claude-session-manager/dist/systemd-scope.js +84 -31
  85. package/payload/platform/services/claude-session-manager/dist/systemd-scope.js.map +1 -1
  86. package/payload/platform/services/claude-session-manager/dist/wa-channel-mcp.d.ts +7 -0
  87. package/payload/platform/services/claude-session-manager/dist/wa-channel-mcp.d.ts.map +1 -1
  88. package/payload/platform/services/claude-session-manager/dist/wa-channel-mcp.js +6 -0
  89. package/payload/platform/services/claude-session-manager/dist/wa-channel-mcp.js.map +1 -1
  90. package/payload/platform/services/telegram-channel/dist/notification.d.ts +10 -2
  91. package/payload/platform/services/telegram-channel/dist/notification.d.ts.map +1 -1
  92. package/payload/platform/services/telegram-channel/dist/notification.js +15 -3
  93. package/payload/platform/services/telegram-channel/dist/notification.js.map +1 -1
  94. package/payload/platform/services/telegram-channel/dist/server.d.ts.map +1 -1
  95. package/payload/platform/services/telegram-channel/dist/server.js +35 -3
  96. package/payload/platform/services/telegram-channel/dist/server.js.map +1 -1
  97. package/payload/platform/services/telegram-channel/dist/turn-follow.d.ts +10 -0
  98. package/payload/platform/services/telegram-channel/dist/turn-follow.d.ts.map +1 -1
  99. package/payload/platform/services/telegram-channel/dist/turn-follow.js +38 -1
  100. package/payload/platform/services/telegram-channel/dist/turn-follow.js.map +1 -1
  101. package/payload/platform/services/webchat-channel/dist/server.d.ts.map +1 -1
  102. package/payload/platform/services/webchat-channel/dist/server.js +31 -2
  103. package/payload/platform/services/webchat-channel/dist/server.js.map +1 -1
  104. package/payload/platform/services/webchat-channel/dist/turn-follow.d.ts +10 -0
  105. package/payload/platform/services/webchat-channel/dist/turn-follow.d.ts.map +1 -1
  106. package/payload/platform/services/webchat-channel/dist/turn-follow.js +38 -1
  107. package/payload/platform/services/webchat-channel/dist/turn-follow.js.map +1 -1
  108. package/payload/platform/services/whatsapp-channel/dist/instructions.d.ts +9 -0
  109. package/payload/platform/services/whatsapp-channel/dist/instructions.d.ts.map +1 -0
  110. package/payload/platform/services/whatsapp-channel/dist/instructions.js +22 -0
  111. package/payload/platform/services/whatsapp-channel/dist/instructions.js.map +1 -0
  112. package/payload/platform/services/whatsapp-channel/dist/notification.d.ts +3 -1
  113. package/payload/platform/services/whatsapp-channel/dist/notification.d.ts.map +1 -1
  114. package/payload/platform/services/whatsapp-channel/dist/notification.js +10 -2
  115. package/payload/platform/services/whatsapp-channel/dist/notification.js.map +1 -1
  116. package/payload/platform/services/whatsapp-channel/dist/server.d.ts.map +1 -1
  117. package/payload/platform/services/whatsapp-channel/dist/server.js +26 -2
  118. package/payload/platform/services/whatsapp-channel/dist/server.js.map +1 -1
  119. package/payload/platform/templates/account-settings.json +153 -0
  120. package/payload/premium-plugins/sitedesk/agents/sitedesk--quoter.md +2 -2
  121. package/payload/server/server.js +254 -96
@@ -0,0 +1,153 @@
1
+ {
2
+ "permissions": {
3
+ "defaultMode": "bypassPermissions",
4
+ "allow": [],
5
+ "deny": []
6
+ },
7
+ "hooks": {
8
+ "PreToolUse": [
9
+ {
10
+ "matcher": "Write",
11
+ "hooks": [
12
+ { "type": "command", "command": "bash $PLATFORM_ROOT/plugins/admin/hooks/archive-ingest-surface-gate.sh" },
13
+ { "type": "command", "command": "bash $PLATFORM_ROOT/plugins/admin/hooks/fs-schema-guard.sh" },
14
+ { "type": "command", "command": "bash $PLATFORM_ROOT/plugins/admin/hooks/quote-path-write-gate.sh" }
15
+ ]
16
+ },
17
+ {
18
+ "matcher": "Edit",
19
+ "hooks": [
20
+ { "type": "command", "command": "bash $PLATFORM_ROOT/plugins/admin/hooks/archive-ingest-surface-gate.sh" },
21
+ { "type": "command", "command": "bash $PLATFORM_ROOT/plugins/admin/hooks/fs-schema-guard.sh" },
22
+ { "type": "command", "command": "bash $PLATFORM_ROOT/plugins/admin/hooks/quote-path-write-gate.sh" }
23
+ ]
24
+ },
25
+ {
26
+ "matcher": "MultiEdit",
27
+ "hooks": [
28
+ { "type": "command", "command": "bash $PLATFORM_ROOT/plugins/admin/hooks/archive-ingest-surface-gate.sh" },
29
+ { "type": "command", "command": "bash $PLATFORM_ROOT/plugins/admin/hooks/fs-schema-guard.sh" },
30
+ { "type": "command", "command": "bash $PLATFORM_ROOT/plugins/admin/hooks/quote-path-write-gate.sh" }
31
+ ]
32
+ },
33
+ {
34
+ "matcher": "NotebookEdit",
35
+ "hooks": [
36
+ { "type": "command", "command": "bash $PLATFORM_ROOT/plugins/admin/hooks/archive-ingest-surface-gate.sh" },
37
+ { "type": "command", "command": "bash $PLATFORM_ROOT/plugins/admin/hooks/fs-schema-guard.sh" },
38
+ { "type": "command", "command": "bash $PLATFORM_ROOT/plugins/admin/hooks/quote-path-write-gate.sh" }
39
+ ]
40
+ },
41
+ {
42
+ "matcher": "Bash",
43
+ "hooks": [
44
+ { "type": "command", "command": "bash $PLATFORM_ROOT/plugins/admin/hooks/archive-ingest-surface-gate.sh" },
45
+ { "type": "command", "command": "bash $PLATFORM_ROOT/plugins/admin/hooks/fs-schema-guard-bash-pre.sh" },
46
+ { "type": "command", "command": "bash $PLATFORM_ROOT/plugins/admin/hooks/quote-engine-gate.sh" },
47
+ { "type": "command", "command": "bash $PLATFORM_ROOT/plugins/admin/hooks/quote-pdf-bash-gate.sh" }
48
+ ]
49
+ },
50
+ {
51
+ "hooks": [
52
+ { "type": "command", "command": "bash $PLATFORM_ROOT/plugins/admin/hooks/archive-ingest-surface-gate.sh" },
53
+ { "type": "command", "command": "bash $PLATFORM_ROOT/plugins/admin/hooks/public-tool-surface.sh" }
54
+ ]
55
+ },
56
+ {
57
+ "matcher": "WebFetch",
58
+ "hooks": [
59
+ { "type": "command", "command": "node $PLATFORM_ROOT/plugins/admin/hooks/webfetch-preflight.mjs" }
60
+ ]
61
+ },
62
+ {
63
+ "matcher": "AskUserQuestion",
64
+ "hooks": [
65
+ { "type": "command", "command": "bash $PLATFORM_ROOT/plugins/admin/hooks/askuserquestion-investigate-gate.sh" },
66
+ { "type": "command", "command": "bash $PLATFORM_ROOT/plugins/admin/hooks/askuserquestion-channel-carrier-gate.sh" }
67
+ ]
68
+ },
69
+ {
70
+ "matcher": "mcp__plugin_browser_browser__browser-pdf-save",
71
+ "hooks": [
72
+ { "type": "command", "command": "bash $PLATFORM_ROOT/plugins/admin/hooks/quote-render-gate.sh" }
73
+ ]
74
+ },
75
+ {
76
+ "matcher": "mcp__plugin_browser_browser__browser-pdf-save",
77
+ "hooks": [
78
+ { "type": "command", "command": "bash $PLATFORM_ROOT/plugins/admin/hooks/preference-consult-gate.sh" }
79
+ ]
80
+ },
81
+ {
82
+ "matcher": "mcp__plugin_email_email__email-send|mcp__plugin_email_email__email-reply|mcp__plugin_email_email__email-draft-send|mcp__plugin_outlook_outlook__outlook-mail-send|mcp__plugin_outlook_outlook__outlook-mail-reply|mcp__plugin_outlook_outlook__outlook-draft-send|SendUserFile",
83
+ "hooks": [
84
+ { "type": "command", "command": "bash $PLATFORM_ROOT/plugins/admin/hooks/preference-consult-gate.sh" }
85
+ ]
86
+ }
87
+ ],
88
+ "PostToolUse": [
89
+ {
90
+ "matcher": "Bash",
91
+ "hooks": [
92
+ { "type": "command", "command": "bash $PLATFORM_ROOT/plugins/admin/hooks/fs-schema-guard-bash-post.sh" }
93
+ ]
94
+ },
95
+ {
96
+ "matcher": "Agent",
97
+ "hooks": [
98
+ { "type": "command", "command": "bash $PLATFORM_ROOT/plugins/admin/hooks/post-tool-use-agent.sh" }
99
+ ]
100
+ },
101
+ {
102
+ "matcher": "mcp__plugin_browser_browser__browser-pdf-save",
103
+ "hooks": [
104
+ { "type": "command", "command": "bash $PLATFORM_ROOT/plugins/admin/hooks/quote-render-pdf-conformance.sh" }
105
+ ]
106
+ },
107
+ {
108
+ "matcher": "mcp__.*__.*-(export|import)-parse$",
109
+ "hooks": [
110
+ { "type": "command", "command": "bash $PLATFORM_ROOT/plugins/admin/hooks/archive-ingest-surface-gate.sh" }
111
+ ]
112
+ },
113
+ {
114
+ "matcher": "mcp__.*",
115
+ "hooks": [
116
+ { "type": "command", "command": "bash $PLATFORM_ROOT/plugins/admin/hooks/mcp-tool-missing.sh" }
117
+ ]
118
+ },
119
+ {
120
+ "matcher": "Write",
121
+ "hooks": [
122
+ { "type": "command", "command": "bash $PLATFORM_ROOT/plugins/admin/hooks/admin-authoring-observer.sh" }
123
+ ]
124
+ },
125
+ {
126
+ "matcher": "Edit",
127
+ "hooks": [
128
+ { "type": "command", "command": "bash $PLATFORM_ROOT/plugins/admin/hooks/admin-authoring-observer.sh" }
129
+ ]
130
+ }
131
+ ],
132
+ "UserPromptSubmit": [
133
+ {
134
+ "hooks": [
135
+ { "type": "command", "command": "bash $PLATFORM_ROOT/plugins/admin/hooks/archive-ingest-surface-gate.sh" },
136
+ { "type": "command", "command": "bash $PLATFORM_ROOT/plugins/admin/hooks/prompt-optimiser-directive.sh" },
137
+ { "type": "command", "command": "bash $PLATFORM_ROOT/plugins/admin/hooks/datetime-inject.sh" },
138
+ { "type": "command", "command": "bash $PLATFORM_ROOT/plugins/admin/hooks/mailbox-inject.sh" },
139
+ { "type": "command", "command": "bash $PLATFORM_ROOT/plugins/admin/hooks/preference-consult-directive.sh" },
140
+ { "type": "command", "command": "bash $PLATFORM_ROOT/plugins/admin/hooks/public-tool-surface.sh" }
141
+ ]
142
+ }
143
+ ],
144
+ "Stop": [
145
+ {
146
+ "hooks": [
147
+ { "type": "command", "command": "bash $PLATFORM_ROOT/plugins/admin/hooks/prompt-optimiser-compliance.sh" },
148
+ { "type": "command", "command": "bash $PLATFORM_ROOT/plugins/admin/hooks/public-tool-surface.sh" }
149
+ ]
150
+ }
151
+ ]
152
+ }
153
+ }
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: quoter
3
- description: "SiteDesk quoter. Delegate when the operator wants a priced quote for a job or enquiry, whether a new quote or a reprice/revision of an existing one — measuring quantities off a supplied drawing (PDF, photo, or scan) when one is given, then capturing or applying their own pricing and quotation method (items, quantity rules, pricing rules, roll-up, documents) to produce the live quote and its A4 PDF. Not for an interim valuation on a running job (that is the valuer) or a worker timesheet (that is the payroll-clerk)."
3
+ description: "SiteDesk quoter. Delegate when the operator wants a priced quote for a job or enquiry, whether a new quote or a reprice/revision of an existing one — measuring quantities off a supplied drawing (PDF, photo, or scan) when one is given, then capturing or applying their own pricing and quotation method (items, quantity rules, pricing rules, roll-up, documents) to produce the live quote and its A4 PDF. Not for an interim valuation on a running job (that is the valuer) or a worker timesheet (that is the payroll-clerk). The quoter owns the client quote document entire, figures and presentation alike, including layout, cover pages, photographs, the running header, and every later correction to an issued quote."
4
4
  summary: "Your quoter — measures a drawing into quantities, then turns the operator's own pricing method into a live priced quote and its PDF, for a new quote or a reprice."
5
5
  model: claude-sonnet-5
6
6
  tools: Skill, Read, Write, Edit, Bash, Glob, Grep, mcp__plugin_sitedesk-job_sitedesk-job__quote-engine-run, mcp__plugin_sitedesk-job_sitedesk-job__quote-render, mcp__plugin_browser_browser__browser-navigate, mcp__plugin_browser_browser__browser-pdf-save, mcp__plugin_email_email__email-send
@@ -15,7 +15,7 @@ Never run uncommanded git writes. `git init`, `git commit`, `git add`, `git stas
15
15
 
16
16
  A message from the agent that dispatched you arrives on the platform's own dispatcher channel, and it carries the same authority as the brief that dispatched you. Verify a figure or a fact against its source on disk, never against the messenger. If you still refuse, name the refusal and its reason in what you return, so the dispatcher relays it rather than guessing.
17
17
 
18
- You are the SiteDesk quoter — the owner of quote work for an independent service business (a building contractor and the like): a new priced quote, and repricing or revising an existing one. You own one deliverable: a priced quote built from the operator's own method, rendered to an A4 PDF. A reprice re-runs the same method against the job's updated payload; it is your work, not a document edit for another agent. When the operator hands over a drawing rather than finished measurements, you measure it first with the `takeoff` skill, then price the quantities with `quotation`. The admin agent dispatches a brief to you; you run the skills and return the result.
18
+ You are the SiteDesk quoter — the owner of quote work for an independent service business (a building contractor and the like): a new priced quote, and repricing or revising an existing one. You own one deliverable: a priced quote built from the operator's own method, rendered to an A4 PDF. A reprice re-runs the same method against the job's updated payload. You own the client quote document entire, its figures and its presentation alike: layout, cover pages, photographs, the running header, and every later correction to any of them. No part of a client quote document is another agent's work, and a correction to an issued quote comes back to you. When the operator hands over a drawing rather than finished measurements, you measure it first with the `takeoff` skill, then price the quantities with `quotation`. The admin agent dispatches a brief to you; you run the skills and return the result.
19
19
 
20
20
  The engine and render scripts run only through their tools. Price a job with the `quote-engine-run` tool, which runs the operator's persisted `quoting/engine.mjs` and files the figures; produce the documents with the `quote-render` tool, which runs the persisted `quoting/render.mjs` behind the reconcile, margin-leak and link-liveness gates. Never run `quoting/engine.mjs` or `quoting/render.mjs` directly with `Bash`; that skips the gates and files no receipt.
21
21