@rubytech/create-sitedesk-code 0.1.452 → 0.1.453

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 (81) hide show
  1. package/package.json +1 -1
  2. package/payload/platform/plugins/admin/skills/platform-architecture/SKILL.md +4 -4
  3. package/payload/platform/plugins/cloudflare/references/api.md +1 -1
  4. package/payload/platform/plugins/cloudflare/skills/cloudflare/SKILL.md +1 -1
  5. package/payload/platform/plugins/docs/references/outlook-guide.md +3 -3
  6. package/payload/platform/plugins/outlook/.claude-plugin/plugin.json +1 -1
  7. package/payload/platform/plugins/outlook/PLUGIN.md +3 -3
  8. package/payload/platform/plugins/outlook/mcp/dist/__tests__/complete-registration.test.d.ts +2 -0
  9. package/payload/platform/plugins/outlook/mcp/dist/__tests__/complete-registration.test.d.ts.map +1 -0
  10. package/payload/platform/plugins/outlook/mcp/dist/__tests__/complete-registration.test.js +131 -0
  11. package/payload/platform/plugins/outlook/mcp/dist/__tests__/complete-registration.test.js.map +1 -0
  12. package/payload/platform/plugins/outlook/mcp/dist/__tests__/graph-client-paged.test.d.ts +2 -0
  13. package/payload/platform/plugins/outlook/mcp/dist/__tests__/graph-client-paged.test.d.ts.map +1 -0
  14. package/payload/platform/plugins/outlook/mcp/dist/__tests__/graph-client-paged.test.js +55 -0
  15. package/payload/platform/plugins/outlook/mcp/dist/__tests__/graph-client-paged.test.js.map +1 -0
  16. package/payload/platform/plugins/outlook/mcp/dist/__tests__/mail-list-paging.test.d.ts +2 -0
  17. package/payload/platform/plugins/outlook/mcp/dist/__tests__/mail-list-paging.test.d.ts.map +1 -0
  18. package/payload/platform/plugins/outlook/mcp/dist/__tests__/mail-list-paging.test.js +120 -0
  19. package/payload/platform/plugins/outlook/mcp/dist/__tests__/mail-list-paging.test.js.map +1 -0
  20. package/payload/platform/plugins/outlook/mcp/dist/__tests__/mail-search-paging.test.d.ts +2 -0
  21. package/payload/platform/plugins/outlook/mcp/dist/__tests__/mail-search-paging.test.d.ts.map +1 -0
  22. package/payload/platform/plugins/outlook/mcp/dist/__tests__/mail-search-paging.test.js +66 -0
  23. package/payload/platform/plugins/outlook/mcp/dist/__tests__/mail-search-paging.test.js.map +1 -0
  24. package/payload/platform/plugins/outlook/mcp/dist/__tests__/pending-scan.test.d.ts +2 -0
  25. package/payload/platform/plugins/outlook/mcp/dist/__tests__/pending-scan.test.d.ts.map +1 -0
  26. package/payload/platform/plugins/outlook/mcp/dist/__tests__/pending-scan.test.js +48 -0
  27. package/payload/platform/plugins/outlook/mcp/dist/__tests__/pending-scan.test.js.map +1 -0
  28. package/payload/platform/plugins/outlook/mcp/dist/auth/complete-registration.d.ts +31 -0
  29. package/payload/platform/plugins/outlook/mcp/dist/auth/complete-registration.d.ts.map +1 -0
  30. package/payload/platform/plugins/outlook/mcp/dist/auth/complete-registration.js +47 -0
  31. package/payload/platform/plugins/outlook/mcp/dist/auth/complete-registration.js.map +1 -0
  32. package/payload/platform/plugins/outlook/mcp/dist/auth/pending-scan.d.ts +11 -0
  33. package/payload/platform/plugins/outlook/mcp/dist/auth/pending-scan.d.ts.map +1 -0
  34. package/payload/platform/plugins/outlook/mcp/dist/auth/pending-scan.js +31 -0
  35. package/payload/platform/plugins/outlook/mcp/dist/auth/pending-scan.js.map +1 -0
  36. package/payload/platform/plugins/outlook/mcp/dist/index.js +13 -9
  37. package/payload/platform/plugins/outlook/mcp/dist/index.js.map +1 -1
  38. package/payload/platform/plugins/outlook/mcp/dist/lib/graph-client.d.ts +19 -0
  39. package/payload/platform/plugins/outlook/mcp/dist/lib/graph-client.d.ts.map +1 -1
  40. package/payload/platform/plugins/outlook/mcp/dist/lib/graph-client.js +14 -0
  41. package/payload/platform/plugins/outlook/mcp/dist/lib/graph-client.js.map +1 -1
  42. package/payload/platform/plugins/outlook/mcp/dist/scripts/complete-registration.d.ts +2 -0
  43. package/payload/platform/plugins/outlook/mcp/dist/scripts/complete-registration.d.ts.map +1 -0
  44. package/payload/platform/plugins/outlook/mcp/dist/scripts/complete-registration.js +111 -0
  45. package/payload/platform/plugins/outlook/mcp/dist/scripts/complete-registration.js.map +1 -0
  46. package/payload/platform/plugins/outlook/mcp/dist/tools/mail-list.d.ts +16 -1
  47. package/payload/platform/plugins/outlook/mcp/dist/tools/mail-list.d.ts.map +1 -1
  48. package/payload/platform/plugins/outlook/mcp/dist/tools/mail-list.js +37 -7
  49. package/payload/platform/plugins/outlook/mcp/dist/tools/mail-list.js.map +1 -1
  50. package/payload/platform/plugins/outlook/mcp/dist/tools/mail-search.d.ts +12 -1
  51. package/payload/platform/plugins/outlook/mcp/dist/tools/mail-search.d.ts.map +1 -1
  52. package/payload/platform/plugins/outlook/mcp/dist/tools/mail-search.js +16 -12
  53. package/payload/platform/plugins/outlook/mcp/dist/tools/mail-search.js.map +1 -1
  54. package/payload/platform/plugins/outlook/references/auth.md +2 -0
  55. package/payload/platform/plugins/outlook/references/graph-surfaces.md +20 -9
  56. package/payload/platform/plugins/outlook/skills/outlook/SKILL.md +7 -7
  57. package/payload/platform/scripts/smoke-boot-services.sh +1 -0
  58. package/payload/platform/scripts/voice-mirror-audit.sh +70 -0
  59. package/payload/platform/services/claude-session-manager/dist/config.d.ts +5 -0
  60. package/payload/platform/services/claude-session-manager/dist/config.d.ts.map +1 -1
  61. package/payload/platform/services/claude-session-manager/dist/config.js +7 -1
  62. package/payload/platform/services/claude-session-manager/dist/config.js.map +1 -1
  63. package/payload/platform/services/claude-session-manager/dist/index.js +18 -0
  64. package/payload/platform/services/claude-session-manager/dist/index.js.map +1 -1
  65. package/payload/platform/services/claude-session-manager/dist/plugin-enum.d.ts +34 -0
  66. package/payload/platform/services/claude-session-manager/dist/plugin-enum.d.ts.map +1 -0
  67. package/payload/platform/services/claude-session-manager/dist/plugin-enum.js +66 -0
  68. package/payload/platform/services/claude-session-manager/dist/plugin-enum.js.map +1 -0
  69. package/payload/premium-plugins/sitedesk/agents/sitedesk--quoter.md +2 -2
  70. package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/PLUGIN.md +1 -1
  71. package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/mcp/dist/lib/render-run.d.ts +1 -1
  72. package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/mcp/dist/lib/render-run.d.ts.map +1 -1
  73. package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/mcp/dist/lib/render-run.js +23 -3
  74. package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/mcp/dist/lib/render-run.js.map +1 -1
  75. package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/mcp/dist/tools/quote-render.js +1 -1
  76. package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/mcp/dist/tools/quote-render.js.map +1 -1
  77. package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/mcp/src/lib/__tests__/render-run.test.ts +48 -1
  78. package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/mcp/src/lib/render-run.ts +26 -4
  79. package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/mcp/src/tools/quote-render.ts +1 -1
  80. package/payload/premium-plugins/sitedesk/plugins/sitedesk-job/skills/quotation/references/quote-generation.md +39 -21
  81. package/payload/server/server.js +51 -1
@@ -49,15 +49,18 @@ whatever the operator's brand or language:
49
49
  tool reconciles it against the engine total;
50
50
  - **`data-internal-only`** on every cost, margin, or internal-rate figure in the internal view, so the
51
51
  tool asserts the two client documents carry none;
52
- - **`data-esign-accept`** on the client quote's Sign-Online anchor (one line, double-quoted `href`), so
53
- the tool asserts the acceptance link is live.
52
+ - **`data-esign-accept`** on the client quote's Sign-Online anchor (one line, double-quoted `href`)
53
+ present **only when the operator opted the quote into online acceptance** so the tool asserts the
54
+ acceptance link is live.
54
55
 
55
56
  `quote-render` enforces three fail-closed gates before it files anything: **reconcile** (each
56
57
  document's `data-quote-total` equals the engine total), **margin-leak** (no `data-internal-only` in the
57
58
  client breakdown or client quote), and **link-liveness** (the client quote's `data-esign-accept` href
58
- is an absolute `https://` URL). If any gate fails the tool files nothing and returns a cause-naming
59
- fault (`reconcile-fail`, `margin-leak`, `sign-link`, `render-absent`, `render-error`). On success it
60
- files each document to its scope (below) and returns the three HTML paths plus the gate verdicts.
59
+ is an absolute `https://` URL). Link-liveness runs **only on the opt-in path** when a `signUrl` was
60
+ passed; on the default, signer-less path the quote must carry no acceptance anchor, and a stray one
61
+ fails closed. If any gate fails the tool files nothing and returns a cause-naming fault
62
+ (`reconcile-fail`, `margin-leak`, `sign-link`, `render-absent`, `render-error`). On success it files
63
+ each document to its scope (below) and returns the three HTML paths plus the gate verdicts.
61
64
 
62
65
  The tool produces **HTML, not PDF**. Print each returned path to PDF with the `browser` plugin as the
63
66
  final step: `browser-navigate` to its `file://` URL, then `browser-pdf-save` to a `.pdf` alongside it,
@@ -80,19 +83,28 @@ expose cost and margin freely. The two client documents **never** surface a cost
80
83
  internal-rate figure. A column or line that shows the price to the client is fine; a figure that
81
84
  reveals what the work cost the operator, or the markup applied, is a leak.
82
85
 
83
- ### The acceptance block is the e-sign gated form
86
+ ### Online acceptance is optional and off by default
84
87
 
85
- The **acceptance block** in the client quote document is not free-form prose it is the signing form
86
- of the `e-sign` skill (`platform/plugins/business-assistant/skills/e-sign/SKILL.md`). That skill owns
87
- how the quote is accepted: the `name` / `email` / intent-and-consent form, the capture to D1, the
88
+ Most quotes carry **no** online-acceptance link. Online signing is an opt-in the operator asks for per
89
+ quote, not a default. **By default the client quote has no acceptance block and no Sign-Online anchor,
90
+ and it renders and ships with none.** The render script emits the acceptance block **only** when a
91
+ `signUrl` is passed to `quote-render`; with no `signUrl` it omits the block entirely. Do not add an
92
+ online-acceptance button to a quote the operator did not ask to be signable — a stray anchor on the
93
+ default path fails the render closed (`sign-link`), because a signer link with no signing page behind
94
+ it is a dead button.
95
+
96
+ The **acceptance block**, when the operator does opt in, is not free-form prose — it is the signing
97
+ form of the `e-sign` skill (`platform/plugins/business-assistant/skills/e-sign/SKILL.md`). That skill
98
+ owns how the quote is accepted: the `name` / `email` / intent-and-consent form, the capture to D1, the
88
99
  stamped acceptance certificate, and the email dispatch. This contract produces the quote document;
89
100
  e-sign turns its acceptance block into a recordable signature. This contract does not restate those
90
101
  mechanics.
91
102
 
92
- **The Sign-Online link must be live before the quote is finalised — deploy first, then inject, then
93
- render.** The acceptance block carries a **Sign-Online anchor** — the button the client taps to reach
94
- the signing page. That page does not exist until e-sign deploys it, so the client quote **cannot be
95
- rendered until the deploy has run**. The order is fixed and load-bearing:
103
+ **When the operator opts into online acceptance, the Sign-Online link must be live before the quote is
104
+ finalised — deploy first, then inject, then render.** The acceptance block carries a **Sign-Online
105
+ anchor** — the button the client taps to reach the signing page. That page does not exist until e-sign
106
+ deploys it, so a **signable** client quote **cannot be rendered until the deploy has run**. The order
107
+ is fixed and load-bearing:
96
108
 
97
109
  1. run **e-sign § 5** to deploy the signing page and take its returned absolute `https://` URL (e-sign
98
110
  § 5 names it as an explicit hand-back);
@@ -104,11 +116,13 @@ rendered until the deploy has run**. The order is fixed and load-bearing:
104
116
 
105
117
  The render script marks that one anchor with the stable attribute `data-esign-accept` so
106
118
  `quote-render`'s link-liveness gate finds it deterministically, whatever the operator's brand,
107
- wording, or language. The gate matches the anchor's opening tag, so the render script emits that
108
- opening tag on a **single line** with a **double-quoted `href`** (the default for these self-contained
109
- documents); a split tag or single-quoted `href` reads as no anchor and fails the gate closed. The
110
- anchor's `href` is **never** a placeholder, a bare `#`, or a `file://`/relative path: it is the
111
- deployed signing URL or the quote does not ship.
119
+ wording, or language. The gate applies **only on the opt-in path** (a `signUrl` was passed); on the
120
+ default path it does not run and the quote must carry no anchor. When it does apply, the gate matches
121
+ the anchor's opening tag, so the render script emits that opening tag on a **single line** with a
122
+ **double-quoted `href`** (the default for these self-contained documents); a split tag or
123
+ single-quoted `href` reads as no anchor and fails the gate closed. The anchor's `href` is **never** a
124
+ placeholder, a bare `#`, or a `file://`/relative path: it is the deployed signing URL or the quote
125
+ does not ship.
112
126
 
113
127
  When the quote is **confidential to a named client**, the acceptance is gated per e-sign § 1a. That
114
128
  section's **same-origin invariant** is load-bearing: the `/api/accept` and `/api/status` capture
@@ -166,9 +180,13 @@ these checks are enforced deterministically at render time, not as a separate ha
166
180
  - **margin-leak.** The client breakdown and client quote must carry no `data-internal-only` marker. A
167
181
  leak files nothing and returns `margin-leak`. The margin boundary is structural, not a matter of
168
182
  remembering to omit a column.
169
- - **link-liveness.** The client quote's `data-esign-accept` href must be an absolute `https://` URL,
170
- not empty, a bare fragment (`#…`), relative, `file://`, `about:`, or any non-https target. A dead
171
- link files nothing and returns `sign-link`, because a dead link emits no other signal.
183
+ - **link-liveness (opt-in only).** This gate runs only when the operator opted the quote into online
184
+ acceptance a `signUrl` was passed. Then the client quote's `data-esign-accept` href must be an
185
+ absolute `https://` URL, not empty, a bare fragment (`#…`), relative, `file://`, `about:`, or any
186
+ non-https target; a dead link files nothing and returns `sign-link`, because a dead link emits no
187
+ other signal. On the default, signer-less path (no `signUrl`) the quote must carry **no** acceptance
188
+ anchor at all; a stray anchor also returns `sign-link` (a signer link with no signing page is a dead
189
+ button).
172
190
 
173
191
  The tool emits one `[quote-render] op=render jobId=… docs=3 internal=… breakdown=… quote=…` line on
174
192
  success and `[quote-render] op=fault jobId=… reason=… detail=…` on any gate failure. On success it also
@@ -1447,7 +1447,7 @@ var serveStatic = (options = { root: "" }) => {
1447
1447
  };
1448
1448
 
1449
1449
  // server/index.ts
1450
- import { readFileSync as readFileSync38, existsSync as existsSync36, watchFile } from "fs";
1450
+ import { readFileSync as readFileSync38, existsSync as existsSync36, watchFile, readdirSync as readdirSync21, statSync as statSync14 } from "fs";
1451
1451
  import { spawn as spawn3 } from "child_process";
1452
1452
  import { createHash as createHash7 } from "crypto";
1453
1453
  import { resolve as resolve35, join as join38, basename as basename12 } from "path";
@@ -26755,6 +26755,56 @@ console.log(`${BRAND.productName} listening on http://${hostname}:${port}`);
26755
26755
  const loop = setInterval(runReconcile, RECONCILE_INTERVAL_MS);
26756
26756
  loop.unref();
26757
26757
  }
26758
+ {
26759
+ const outlookPlatformRoot = process.env.MAXY_PLATFORM_ROOT ?? join38(__dirname, "..");
26760
+ const outlookScript = resolve35(outlookPlatformRoot, "plugins/outlook/mcp/dist/scripts/complete-registration.js");
26761
+ const OUTLOOK_COMPLETE_INTERVAL_MS = 3e4;
26762
+ const runOutlookComplete = () => {
26763
+ if (!existsSync36(outlookScript)) return;
26764
+ try {
26765
+ const child = spawn3(process.execPath, [outlookScript], {
26766
+ env: { ...process.env, PLATFORM_ROOT: outlookPlatformRoot },
26767
+ stdio: "inherit"
26768
+ });
26769
+ child.unref();
26770
+ child.on("error", (err) => console.error(`[outlook-complete] spawn-failed err="${err.message}"`));
26771
+ } catch (err) {
26772
+ console.error(`[outlook-complete] spawn-failed err="${err.message}"`);
26773
+ }
26774
+ };
26775
+ const outlookFirst = setTimeout(runOutlookComplete, 18e3);
26776
+ outlookFirst.unref();
26777
+ const outlookLoop = setInterval(runOutlookComplete, OUTLOOK_COMPLETE_INTERVAL_MS);
26778
+ outlookLoop.unref();
26779
+ }
26780
+ {
26781
+ const auditRoot = process.env.MAXY_PLATFORM_ROOT ?? join38(__dirname, "..");
26782
+ const strandedAccountsDir = resolve35(auditRoot, "..", "data/accounts");
26783
+ const STRANDED_AUDIT_INTERVAL_MS = 3e5;
26784
+ const STRANDED_AGE_MS = 16 * 6e4;
26785
+ const STRANDED_UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
26786
+ const runStrandedAudit = () => {
26787
+ try {
26788
+ if (!existsSync36(strandedAccountsDir)) return;
26789
+ const now = Date.now();
26790
+ for (const name of readdirSync21(strandedAccountsDir)) {
26791
+ if (!STRANDED_UUID_RE.test(name)) continue;
26792
+ const pendingPath2 = resolve35(strandedAccountsDir, name, "secrets/outlook/pending-devicecode.enc");
26793
+ if (!existsSync36(pendingPath2)) continue;
26794
+ const ageMs = now - statSync14(pendingPath2).mtimeMs;
26795
+ if (ageMs > STRANDED_AGE_MS) {
26796
+ console.error(`[outlook-mcp] devicecode-stranded account=${name} ageSec=${Math.floor(ageMs / 1e3)}`);
26797
+ }
26798
+ }
26799
+ } catch (err) {
26800
+ console.error(`[outlook-mcp] devicecode-stranded-audit error="${err.message}"`);
26801
+ }
26802
+ };
26803
+ const strandedFirst = setTimeout(runStrandedAudit, 25e3);
26804
+ strandedFirst.unref();
26805
+ const strandedLoop = setInterval(runStrandedAudit, STRANDED_AUDIT_INTERVAL_MS);
26806
+ strandedLoop.unref();
26807
+ }
26758
26808
  {
26759
26809
  const auditPlatformRoot = process.env.MAXY_PLATFORM_ROOT ?? join38(__dirname, "..");
26760
26810
  const STORAGE_AUDIT_INTERVAL_MS = 3e5;