@rubytech/create-maxy-code 0.1.459 → 0.1.461

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 (189) hide show
  1. package/dist/__tests__/cron-heartbeat-registration.test.js +57 -28
  2. package/dist/__tests__/launchd-plist.test.js +26 -0
  3. package/dist/cron-registration.js +30 -8
  4. package/dist/index.js +50 -9
  5. package/dist/launchd-plist.js +1 -1
  6. package/dist/uninstall.js +9 -3
  7. package/package.json +1 -1
  8. package/payload/platform/lib/storage-broker/dist/__tests__/cf-exec.test.js +116 -6
  9. package/payload/platform/lib/storage-broker/dist/__tests__/cf-exec.test.js.map +1 -1
  10. package/payload/platform/lib/storage-broker/dist/__tests__/object-limits.test.js +20 -0
  11. package/payload/platform/lib/storage-broker/dist/__tests__/object-limits.test.js.map +1 -1
  12. package/payload/platform/lib/storage-broker/dist/__tests__/resource-limits.test.d.ts +2 -0
  13. package/payload/platform/lib/storage-broker/dist/__tests__/resource-limits.test.d.ts.map +1 -0
  14. package/payload/platform/lib/storage-broker/dist/__tests__/resource-limits.test.js +41 -0
  15. package/payload/platform/lib/storage-broker/dist/__tests__/resource-limits.test.js.map +1 -0
  16. package/payload/platform/lib/storage-broker/dist/cf-exec.d.ts +1 -0
  17. package/payload/platform/lib/storage-broker/dist/cf-exec.d.ts.map +1 -1
  18. package/payload/platform/lib/storage-broker/dist/cf-exec.js +116 -48
  19. package/payload/platform/lib/storage-broker/dist/cf-exec.js.map +1 -1
  20. package/payload/platform/lib/storage-broker/dist/index.d.ts +1 -0
  21. package/payload/platform/lib/storage-broker/dist/index.d.ts.map +1 -1
  22. package/payload/platform/lib/storage-broker/dist/index.js +1 -0
  23. package/payload/platform/lib/storage-broker/dist/index.js.map +1 -1
  24. package/payload/platform/lib/storage-broker/dist/object-limits.d.ts +27 -0
  25. package/payload/platform/lib/storage-broker/dist/object-limits.d.ts.map +1 -1
  26. package/payload/platform/lib/storage-broker/dist/object-limits.js +27 -7
  27. package/payload/platform/lib/storage-broker/dist/object-limits.js.map +1 -1
  28. package/payload/platform/lib/storage-broker/dist/resource-limits.d.ts +102 -0
  29. package/payload/platform/lib/storage-broker/dist/resource-limits.d.ts.map +1 -0
  30. package/payload/platform/lib/storage-broker/dist/resource-limits.js +105 -0
  31. package/payload/platform/lib/storage-broker/dist/resource-limits.js.map +1 -0
  32. package/payload/platform/lib/storage-broker/src/__tests__/cf-exec.test.ts +130 -7
  33. package/payload/platform/lib/storage-broker/src/__tests__/object-limits.test.ts +30 -0
  34. package/payload/platform/lib/storage-broker/src/__tests__/resource-limits.test.ts +49 -0
  35. package/payload/platform/lib/storage-broker/src/cf-exec.ts +129 -56
  36. package/payload/platform/lib/storage-broker/src/index.ts +1 -0
  37. package/payload/platform/lib/storage-broker/src/object-limits.ts +26 -6
  38. package/payload/platform/lib/storage-broker/src/resource-limits.ts +105 -0
  39. package/payload/platform/plugins/admin/skills/platform-architecture/SKILL.md +5 -4
  40. package/payload/platform/plugins/cloudflare/PLUGIN.md +3 -1
  41. package/payload/platform/plugins/cloudflare/bin/portal-enrol.mjs +96 -0
  42. package/payload/platform/plugins/cloudflare/mcp/__tests__/auth-route.test.ts +220 -0
  43. package/payload/platform/plugins/cloudflare/mcp/__tests__/authorize.test.ts +201 -0
  44. package/payload/platform/plugins/cloudflare/mcp/__tests__/file-routes.test.ts +178 -0
  45. package/payload/platform/plugins/cloudflare/mcp/__tests__/harness.test.ts +32 -0
  46. package/payload/platform/plugins/cloudflare/mcp/__tests__/passcode.test.ts +204 -0
  47. package/payload/platform/plugins/cloudflare/mcp/__tests__/portal-enrol.test.ts +207 -0
  48. package/payload/platform/plugins/cloudflare/mcp/__tests__/ratelimit.test.ts +77 -0
  49. package/payload/platform/plugins/cloudflare/mcp/__tests__/skill-contract.test.ts +46 -0
  50. package/payload/platform/plugins/cloudflare/mcp/__tests__/template-config.test.ts +55 -0
  51. package/payload/platform/plugins/cloudflare/mcp/__tests__/upload-route.test.ts +255 -0
  52. package/payload/platform/plugins/cloudflare/mcp/package.json +5 -2
  53. package/payload/platform/plugins/cloudflare/references/r2-object-storage.md +46 -0
  54. package/payload/platform/plugins/cloudflare/skills/data-portal/SKILL.md +125 -0
  55. package/payload/platform/plugins/cloudflare/skills/data-portal/template/functions/api/_lib/authorize.ts +32 -0
  56. package/payload/platform/plugins/cloudflare/skills/data-portal/template/functions/api/_lib/log.ts +12 -0
  57. package/payload/platform/plugins/cloudflare/skills/data-portal/template/functions/api/_lib/passcode.mjs +193 -0
  58. package/payload/platform/plugins/cloudflare/skills/data-portal/template/functions/api/_lib/ratelimit.ts +55 -0
  59. package/payload/platform/plugins/cloudflare/skills/data-portal/template/functions/api/_lib/session.ts +85 -0
  60. package/payload/platform/plugins/cloudflare/skills/data-portal/template/functions/api/_lib/types.ts +44 -0
  61. package/payload/platform/plugins/cloudflare/skills/data-portal/template/functions/api/auth.ts +119 -0
  62. package/payload/platform/plugins/cloudflare/skills/data-portal/template/functions/api/delete.ts +89 -0
  63. package/payload/platform/plugins/cloudflare/skills/data-portal/template/functions/api/download.ts +70 -0
  64. package/payload/platform/plugins/cloudflare/skills/data-portal/template/functions/api/files.ts +41 -0
  65. package/payload/platform/plugins/cloudflare/skills/data-portal/template/functions/api/upload.ts +151 -0
  66. package/payload/platform/plugins/cloudflare/skills/data-portal/template/public/index.html +42 -0
  67. package/payload/platform/plugins/cloudflare/skills/data-portal/template/public/portal.css +113 -0
  68. package/payload/platform/plugins/cloudflare/skills/data-portal/template/public/portal.js +155 -0
  69. package/payload/platform/plugins/cloudflare/skills/data-portal/template/schema.sql +73 -0
  70. package/payload/platform/plugins/cloudflare/skills/data-portal/template/wrangler.toml +21 -0
  71. package/payload/platform/plugins/cloudflare/skills/site-deploy/SKILL.md +8 -0
  72. package/payload/platform/plugins/docs/references/outlook-guide.md +3 -3
  73. package/payload/platform/plugins/docs/references/voice-mirror-guide.md +1 -0
  74. package/payload/platform/plugins/filesystem/PLUGIN.md +0 -1
  75. package/payload/platform/plugins/filesystem/mcp/dist/lib/scope.d.ts +14 -10
  76. package/payload/platform/plugins/filesystem/mcp/dist/lib/scope.d.ts.map +1 -1
  77. package/payload/platform/plugins/filesystem/mcp/dist/lib/scope.js +14 -10
  78. package/payload/platform/plugins/filesystem/mcp/dist/lib/scope.js.map +1 -1
  79. package/payload/platform/plugins/outlook/.claude-plugin/plugin.json +1 -1
  80. package/payload/platform/plugins/outlook/PLUGIN.md +3 -5
  81. package/payload/platform/plugins/outlook/mcp/dist/__tests__/detach.test.d.ts +2 -0
  82. package/payload/platform/plugins/outlook/mcp/dist/__tests__/detach.test.d.ts.map +1 -0
  83. package/payload/platform/plugins/outlook/mcp/dist/__tests__/detach.test.js +75 -0
  84. package/payload/platform/plugins/outlook/mcp/dist/__tests__/detach.test.js.map +1 -0
  85. package/payload/platform/plugins/outlook/mcp/dist/__tests__/draft-edit-removal.test.d.ts +2 -0
  86. package/payload/platform/plugins/outlook/mcp/dist/__tests__/draft-edit-removal.test.d.ts.map +1 -0
  87. package/payload/platform/plugins/outlook/mcp/dist/__tests__/draft-edit-removal.test.js +187 -0
  88. package/payload/platform/plugins/outlook/mcp/dist/__tests__/draft-edit-removal.test.js.map +1 -0
  89. package/payload/platform/plugins/outlook/mcp/dist/__tests__/draft-edit.test.js +1 -1
  90. package/payload/platform/plugins/outlook/mcp/dist/__tests__/draft-edit.test.js.map +1 -1
  91. package/payload/platform/plugins/outlook/mcp/dist/index.js +3 -2
  92. package/payload/platform/plugins/outlook/mcp/dist/index.js.map +1 -1
  93. package/payload/platform/plugins/outlook/mcp/dist/lib/attachment-list.d.ts +43 -0
  94. package/payload/platform/plugins/outlook/mcp/dist/lib/attachment-list.d.ts.map +1 -0
  95. package/payload/platform/plugins/outlook/mcp/dist/lib/attachment-list.js +65 -0
  96. package/payload/platform/plugins/outlook/mcp/dist/lib/attachment-list.js.map +1 -0
  97. package/payload/platform/plugins/outlook/mcp/dist/lib/detach.d.ts +65 -0
  98. package/payload/platform/plugins/outlook/mcp/dist/lib/detach.d.ts.map +1 -0
  99. package/payload/platform/plugins/outlook/mcp/dist/lib/detach.js +99 -0
  100. package/payload/platform/plugins/outlook/mcp/dist/lib/detach.js.map +1 -0
  101. package/payload/platform/plugins/outlook/mcp/dist/lib/outbound-attachments.d.ts +6 -1
  102. package/payload/platform/plugins/outlook/mcp/dist/lib/outbound-attachments.d.ts.map +1 -1
  103. package/payload/platform/plugins/outlook/mcp/dist/lib/outbound-attachments.js.map +1 -1
  104. package/payload/platform/plugins/outlook/mcp/dist/tools/draft-edit.d.ts +42 -22
  105. package/payload/platform/plugins/outlook/mcp/dist/tools/draft-edit.d.ts.map +1 -1
  106. package/payload/platform/plugins/outlook/mcp/dist/tools/draft-edit.js +59 -23
  107. package/payload/platform/plugins/outlook/mcp/dist/tools/draft-edit.js.map +1 -1
  108. package/payload/platform/plugins/outlook/mcp/dist/tools/mail-attachment.d.ts +15 -16
  109. package/payload/platform/plugins/outlook/mcp/dist/tools/mail-attachment.d.ts.map +1 -1
  110. package/payload/platform/plugins/outlook/mcp/dist/tools/mail-attachment.js +8 -41
  111. package/payload/platform/plugins/outlook/mcp/dist/tools/mail-attachment.js.map +1 -1
  112. package/payload/platform/plugins/outlook/references/auth.md +1 -1
  113. package/payload/platform/plugins/outlook/references/graph-surfaces.md +7 -3
  114. package/payload/platform/plugins/outlook/skills/outlook/SKILL.md +1 -1
  115. package/payload/platform/plugins/storage-broker/PLUGIN.md +1 -1
  116. package/payload/platform/plugins/voice-mirror/PLUGIN.md +19 -7
  117. package/payload/platform/plugins/voice-mirror/mcp/dist/index.d.ts.map +1 -1
  118. package/payload/platform/plugins/voice-mirror/mcp/dist/index.js +35 -16
  119. package/payload/platform/plugins/voice-mirror/mcp/dist/index.js.map +1 -1
  120. package/payload/platform/plugins/voice-mirror/mcp/dist/lib/admin-user.d.ts +31 -0
  121. package/payload/platform/plugins/voice-mirror/mcp/dist/lib/admin-user.d.ts.map +1 -0
  122. package/payload/platform/plugins/voice-mirror/mcp/dist/lib/admin-user.js +87 -0
  123. package/payload/platform/plugins/voice-mirror/mcp/dist/lib/admin-user.js.map +1 -0
  124. package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-distil-profile.d.ts.map +1 -1
  125. package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-distil-profile.js +111 -12
  126. package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-distil-profile.js.map +1 -1
  127. package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-ingest-session-text.d.ts.map +1 -1
  128. package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-ingest-session-text.js +2 -1
  129. package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-ingest-session-text.js.map +1 -1
  130. package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-record-feedback.d.ts.map +1 -1
  131. package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-record-feedback.js +2 -1
  132. package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-record-feedback.js.map +1 -1
  133. package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-retrieve-conditioning.d.ts.map +1 -1
  134. package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-retrieve-conditioning.js +54 -21
  135. package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-retrieve-conditioning.js.map +1 -1
  136. package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-tag-content.d.ts +2 -2
  137. package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-tag-content.d.ts.map +1 -1
  138. package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-tag-content.js +12 -3
  139. package/payload/platform/plugins/voice-mirror/mcp/dist/tools/voice-tag-content.js.map +1 -1
  140. package/payload/platform/plugins/voice-mirror/mcp/scripts/smoke.mjs +444 -0
  141. package/payload/platform/plugins/voice-mirror/skills/voice-mirror/SKILL.md +18 -2
  142. package/payload/platform/scripts/__tests__/logs-rotate.test.sh +256 -0
  143. package/payload/platform/scripts/__tests__/resume-tunnel.test.sh +79 -0
  144. package/payload/platform/scripts/logs-rotate.sh +204 -0
  145. package/payload/platform/scripts/resume-tunnel.sh +27 -0
  146. package/payload/platform/scripts/voice-author-key-audit.sh +155 -0
  147. package/payload/platform/services/claude-session-manager/dist/http-server.d.ts.map +1 -1
  148. package/payload/platform/services/claude-session-manager/dist/http-server.js +41 -5
  149. package/payload/platform/services/claude-session-manager/dist/http-server.js.map +1 -1
  150. package/payload/platform/services/claude-session-manager/dist/index.d.ts +1 -0
  151. package/payload/platform/services/claude-session-manager/dist/index.d.ts.map +1 -1
  152. package/payload/platform/services/claude-session-manager/dist/index.js +22 -0
  153. package/payload/platform/services/claude-session-manager/dist/index.js.map +1 -1
  154. package/payload/platform/services/claude-session-manager/dist/install-start-counter.d.ts +2 -0
  155. package/payload/platform/services/claude-session-manager/dist/install-start-counter.d.ts.map +1 -0
  156. package/payload/platform/services/claude-session-manager/dist/install-start-counter.js +12 -0
  157. package/payload/platform/services/claude-session-manager/dist/install-start-counter.js.map +1 -0
  158. package/payload/platform/services/claude-session-manager/dist/mcp-descriptor-resolve.d.ts +17 -0
  159. package/payload/platform/services/claude-session-manager/dist/mcp-descriptor-resolve.d.ts.map +1 -0
  160. package/payload/platform/services/claude-session-manager/dist/mcp-descriptor-resolve.js +88 -0
  161. package/payload/platform/services/claude-session-manager/dist/mcp-descriptor-resolve.js.map +1 -0
  162. package/payload/platform/services/claude-session-manager/dist/pty-census.d.ts +122 -9
  163. package/payload/platform/services/claude-session-manager/dist/pty-census.d.ts.map +1 -1
  164. package/payload/platform/services/claude-session-manager/dist/pty-census.js +214 -29
  165. package/payload/platform/services/claude-session-manager/dist/pty-census.js.map +1 -1
  166. package/payload/platform/services/claude-session-manager/dist/pty-spawner.d.ts +0 -1
  167. package/payload/platform/services/claude-session-manager/dist/pty-spawner.d.ts.map +1 -1
  168. package/payload/platform/services/claude-session-manager/dist/pty-spawner.js +36 -24
  169. package/payload/platform/services/claude-session-manager/dist/pty-spawner.js.map +1 -1
  170. package/payload/platform/services/claude-session-manager/dist/rc-daemon.d.ts.map +1 -1
  171. package/payload/platform/services/claude-session-manager/dist/rc-daemon.js +13 -1
  172. package/payload/platform/services/claude-session-manager/dist/rc-daemon.js.map +1 -1
  173. package/payload/platform/services/claude-session-manager/dist/session-memory-cap.d.ts.map +1 -1
  174. package/payload/platform/services/claude-session-manager/dist/session-memory-cap.js +4 -2
  175. package/payload/platform/services/claude-session-manager/dist/session-memory-cap.js.map +1 -1
  176. package/payload/platform/services/claude-session-manager/dist/slice-memory-policy.d.ts +150 -0
  177. package/payload/platform/services/claude-session-manager/dist/slice-memory-policy.d.ts.map +1 -0
  178. package/payload/platform/services/claude-session-manager/dist/slice-memory-policy.js +333 -0
  179. package/payload/platform/services/claude-session-manager/dist/slice-memory-policy.js.map +1 -0
  180. package/payload/platform/services/claude-session-manager/dist/start-counter.d.ts +10 -0
  181. package/payload/platform/services/claude-session-manager/dist/start-counter.d.ts.map +1 -0
  182. package/payload/platform/services/claude-session-manager/dist/start-counter.js +55 -0
  183. package/payload/platform/services/claude-session-manager/dist/start-counter.js.map +1 -0
  184. package/payload/server/{chunk-Q6W4U6HL.js → chunk-JXWFVE5X.js} +83 -39
  185. package/payload/server/server.js +268 -73
  186. package/payload/server/{src-3I2RYZFB.js → src-4F37OHLK.js} +11 -1
  187. package/payload/platform/plugins/outlook/mcp/dist/__tests__/pkce-flow.test.d.ts +0 -2
  188. package/payload/platform/plugins/outlook/mcp/dist/__tests__/pkce-flow.test.js +0 -215
  189. package/payload/platform/plugins/outlook/mcp/dist/__tests__/pkce-flow.test.js.map +0 -1
@@ -1,31 +1,44 @@
1
1
  import { patchGraph } from "../lib/graph-client.js";
2
2
  import { attachFilesToDraft, resolveAttachmentsOrRefuse } from "../lib/attach.js";
3
+ import { listMessageAttachments } from "../lib/attachment-list.js";
4
+ import { detachFromDraft, resolveRemovalsOrRefuse } from "../lib/detach.js";
3
5
  import { log } from "../lib/log.js";
4
6
  function recip(list) {
5
7
  return list.map((address) => ({ emailAddress: { address } }));
6
8
  }
7
9
  /**
8
10
  * Update an existing draft in place via PATCH /me/messages/{draftId}, and/or add
9
- * attachments to it. Graph drafts are mutable, so no delete-and-reappend. Only
10
- * the supplied fields are patched. Graph rejects a PATCH on a sent (non-draft)
11
- * message — that error is surfaced to the caller unchanged.
11
+ * and remove its attachments. Graph drafts are mutable, so no delete-and-reappend.
12
+ * Only the supplied fields are patched. Graph rejects a PATCH on a sent
13
+ * (non-draft) message — that error is surfaced to the caller unchanged.
12
14
  *
13
- * Attachments are ADDITIVE: files are added to whatever the draft already
14
- * carries. Removing or replacing an attachment is not supported here.
15
+ * Attachments edit in place like every other field: `attachments` adds files,
16
+ * `removeAttachments` takes them off by name or by attachment id, and the two
17
+ * together are a replace.
15
18
  *
16
- * "At least one change" counts attachments as well as patchable fields, so
17
- * attaching a file to an otherwise-final draft is a valid call on its own; that
18
- * case issues no PATCH at all. Paths validate before the PATCH, so a bad path
19
- * leaves the draft untouched rather than half-edited.
19
+ * ORDER (Task 1696). Local path validation, then the listing + removal
20
+ * resolution, then PATCH, then the DELETEs, then the attaches. Two properties
21
+ * fall out of resolving removals up front:
20
22
  *
21
- * A Graph-side failure is a different matter: the PATCH and the attaches are
22
- * separate calls and Graph has no transaction across them, so an attach that
23
- * fails AFTER a successful PATCH leaves the field edits applied while this
24
- * function throws. The caller is told the edit failed; the subject/recipients it
25
- * asked for are nonetheless changed. Re-running with the same arguments is safe
26
- * for the fields (PATCH is idempotent) but WILL duplicate any attachment that
27
- * already landed, because attaching is additive. Only path validation is
28
- * all-or-nothing here.
23
+ * - Removals resolve against the draft's PRE-CALL state, so "swap a.pdf for a
24
+ * newer a.pdf" pins the old file's id before the new one exists and cannot
25
+ * match the file it is meant to replace.
26
+ * - A removal naming a file the draft does not carry, or a name carried twice,
27
+ * refuses before the PATCH. Listing is a GET, so the draft is untouched.
28
+ *
29
+ * "At least one change" counts attachments and removals as well as patchable
30
+ * fields, so an attachment-only or removal-only call is valid; either issues no
31
+ * PATCH at all.
32
+ *
33
+ * A Graph-side failure is a different matter: the PATCH, the DELETEs and the
34
+ * attaches are separate calls and Graph has no transaction across them, so a
35
+ * DELETE or attach that fails AFTER a successful PATCH leaves the field edits
36
+ * applied while this function throws. The caller is told the edit failed; the
37
+ * subject/recipients it asked for are nonetheless changed. Re-running with the
38
+ * same arguments is safe for the fields (PATCH is idempotent) but WILL duplicate
39
+ * any attachment that already landed, because attaching is additive. A removal
40
+ * that already landed re-runs as a `not-on-draft` refusal, because the file it
41
+ * names is gone. Only path validation and removal resolution are all-or-nothing.
29
42
  *
30
43
  * The id in the PATCH response is authoritative for where the draft now lives,
31
44
  * so it is returned rather than the caller's `draftId` — mirroring `runDraft`,
@@ -34,9 +47,14 @@ function recip(list) {
34
47
  * reported id means the tool never asserts a handle it has not confirmed, and
35
48
  * `rotated=true` in the log makes any divergence visible (Task 1688).
36
49
  *
37
- * That is also why the attach targets the REPORTED id, not the caller's: if the
38
- * id rotated, the caller's handle no longer addresses the draft and attaching to
39
- * it would 404 or, worse, hit a stale item.
50
+ * That is also why the DELETEs and attaches target the REPORTED id, not the
51
+ * caller's: if the id rotated, the caller's handle no longer addresses the draft
52
+ * and writing to it would 404 or, worse, hit a stale item. The listing is
53
+ * necessarily read from the caller's id, since it must precede the PATCH that
54
+ * reports the authoritative one. Under a rotation — which IMMUTABLE_ID_PREFER
55
+ * makes effectively impossible — the resolved attachment ids would belong to the
56
+ * pre-rotation item and the DELETE would fail loudly rather than silently remove
57
+ * the wrong file. That is the accepted consequence, not a handled path.
40
58
  */
41
59
  export async function runDraftEdit(config, args) {
42
60
  const patch = {};
@@ -52,11 +70,20 @@ export async function runDraftEdit(config, args) {
52
70
  if (args.bcc !== undefined)
53
71
  patch.bccRecipients = recip(args.bcc);
54
72
  const hasAttachments = (args.attachments?.length ?? 0) > 0;
55
- if (Object.keys(patch).length === 0 && !hasAttachments) {
56
- throw new Error("outlook-draft-edit: pass at least one field to change (to, cc, bcc, subject, body, or attachments).");
73
+ const hasRemovals = (args.removeAttachments?.length ?? 0) > 0;
74
+ if (Object.keys(patch).length === 0 && !hasAttachments && !hasRemovals) {
75
+ throw new Error("outlook-draft-edit: pass at least one field to change (to, cc, bcc, subject, body, attachments, or removeAttachments).");
57
76
  }
58
77
  // Before any Graph write: a bad path must leave the draft untouched.
59
78
  const files = resolveAttachmentsOrRefuse(config.accountId, args.attachments, "draft-edit");
79
+ // Also before any Graph write: resolve removals against the draft's pre-call
80
+ // state. The listing is a GET, so an unresolvable removal still refuses with
81
+ // the draft untouched.
82
+ let removals = [];
83
+ if (hasRemovals) {
84
+ const { items } = await listMessageAttachments(config, args.draftId, "draft-edit");
85
+ removals = resolveRemovalsOrRefuse(items, args.removeAttachments ?? [], "draft-edit");
86
+ }
60
87
  let draftId = args.draftId;
61
88
  let rotated = false;
62
89
  if (Object.keys(patch).length > 0) {
@@ -69,6 +96,9 @@ export async function runDraftEdit(config, args) {
69
96
  rotated = reported !== args.draftId;
70
97
  draftId = reported;
71
98
  }
99
+ // Remove before adding, so a replace reads as one in the log as well as in the
100
+ // call.
101
+ await detachFromDraft(config, draftId, removals, "draft-edit");
72
102
  await attachFilesToDraft(config, draftId, files, "draft-edit");
73
103
  log({
74
104
  event: "draft-edit",
@@ -79,7 +109,13 @@ export async function runDraftEdit(config, args) {
79
109
  rotated,
80
110
  fields: Object.keys(patch).join(","),
81
111
  attachments: files.length,
112
+ removed: removals.length,
82
113
  });
83
- return { draftId, updated: true, attachments: files.map((f) => f.name) };
114
+ return {
115
+ draftId,
116
+ updated: true,
117
+ attachments: files.map((f) => f.name),
118
+ removed: removals.map((r) => r.name),
119
+ };
84
120
  }
85
121
  //# sourceMappingURL=draft-edit.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"draft-edit.js","sourceRoot":"","sources":["../../src/tools/draft-edit.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EA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AW,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;QACrC,OAAO,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;KACrC,CAAC;AACJ,CAAC"}
@@ -1,9 +1,16 @@
1
1
  import type { GraphClientConfig } from "../lib/graph-client.js";
2
+ import type { AttachmentListItem } from "../lib/attachment-list.js";
2
3
  /**
3
- * Inbound attachment retrieval for Outlook mailboxes.
4
+ * Attachment retrieval for Outlook mailboxes.
4
5
  *
5
6
  * `runMailAttachmentList` enumerates a message's attachments (metadata only, no
6
- * bytes). `runMailAttachmentDownload` fetches one file attachment's bytes and
7
+ * bytes). It is not inbound-only: a draft is a message in the same collection,
8
+ * so passing a draftId lists what that draft carries, and the id/name it returns
9
+ * is the handle outlook-draft-edit's `removeAttachments` resolves against.
10
+ * Downloading bytes is inbound in practice, since a draft's own attachments came
11
+ * from the account directory to begin with.
12
+ *
13
+ * `runMailAttachmentDownload` fetches one file attachment's bytes and
7
14
  * writes them to the account's uploads directory so the agent can Read the
8
15
  * file, forward it, or attach it to a reply.
9
16
  *
@@ -12,24 +19,16 @@ import type { GraphClientConfig } from "../lib/graph-client.js";
12
19
  * listed with their kind but refused for download, so a caller never writes a
13
20
  * zero-byte or malformed file.
14
21
  */
15
- /** Graph attachment @odata.type → a short kind the agent reads. */
16
- export type AttachmentKind = "file" | "item" | "reference" | "unknown";
17
- export interface AttachmentListItem {
18
- id: string;
19
- name: string | null;
20
- contentType: string | null;
21
- size: number;
22
- isInline: boolean;
23
- kind: AttachmentKind;
24
- }
25
22
  export interface AttachmentListResult {
26
23
  items: AttachmentListItem[];
27
24
  }
28
- export declare function attachmentKind(odataType: string | undefined): AttachmentKind;
29
25
  /**
30
- * List a message's attachments by id. Metadata only — `$select` omits
31
- * `contentBytes`, so no file bytes are downloaded. Get `messageId` from
32
- * outlook-mail-list / outlook-mail-search (both now report `hasAttachments`).
26
+ * List a message's attachments by id. Metadata only — no file bytes are
27
+ * downloaded. Get `messageId` from outlook-mail-list / outlook-mail-search
28
+ * (both now report `hasAttachments`).
29
+ *
30
+ * The GET itself lives in lib/attachment-list.ts because outlook-draft-edit
31
+ * resolves attachment removals against the same call.
33
32
  */
34
33
  export declare function runMailAttachmentList(config: GraphClientConfig, args: {
35
34
  messageId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"mail-attachment.d.ts","sourceRoot":"","sources":["../../src/tools/mail-attachment.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAKhE;;;;;;;;;;;;GAYG;AAEH,mEAAmE;AACnE,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,GAAG,SAAS,CAAC;AAEvE,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,cAAc,CAAC;CACtB;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,kBAAkB,EAAE,CAAC;CAC7B;AAWD,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,cAAc,CAW5E;AAID;;;;GAIG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,iBAAiB,EACzB,IAAI,EAAE;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,GAC1B,OAAO,CAAC,oBAAoB,CAAC,CA0C/B;AAED,MAAM,WAAW,wBAAwB;IACvC,6EAA6E;IAC7E,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;CACf;AAaD;;;;;;GAMG;AACH,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,iBAAiB,EACzB,IAAI,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,GAChD,OAAO,CAAC,wBAAwB,CAAC,CA0EnC"}
1
+ {"version":3,"file":"mail-attachment.d.ts","sourceRoot":"","sources":["../../src/tools/mail-attachment.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,OAAO,KAAK,EAAkB,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAKpF;;;;;;;;;;;;;;;;;;GAkBG;AAEH,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,kBAAkB,EAAE,CAAC;CAC7B;AAED;;;;;;;GAOG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,iBAAiB,EACzB,IAAI,EAAE;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,GAC1B,OAAO,CAAC,oBAAoB,CAAC,CAa/B;AAED,MAAM,WAAW,wBAAwB;IACvC,6EAA6E;IAC7E,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;CACf;AAkBD;;;;;;GAMG;AACH,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,iBAAiB,EACzB,IAAI,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,GAChD,OAAO,CAAC,wBAAwB,CAAC,CA0EnC"}
@@ -2,52 +2,19 @@ import { createHash } from "node:crypto";
2
2
  import { mkdirSync, statSync, unlinkSync, writeFileSync } from "node:fs";
3
3
  import { basename, join } from "node:path";
4
4
  import { callGraph } from "../lib/graph-client.js";
5
+ import { attachmentKind, listMessageAttachments } from "../lib/attachment-list.js";
5
6
  import { resolveAccountDir, OUTLOOK_ATTACHMENT_MAX_BYTES } from "../lib/outbound-attachments.js";
6
7
  import { log } from "../lib/log.js";
7
- export function attachmentKind(odataType) {
8
- switch (odataType) {
9
- case "#microsoft.graph.fileAttachment":
10
- return "file";
11
- case "#microsoft.graph.itemAttachment":
12
- return "item";
13
- case "#microsoft.graph.referenceAttachment":
14
- return "reference";
15
- default:
16
- return "unknown";
17
- }
18
- }
19
- const LIST_SELECT = "id,name,contentType,size,isInline";
20
8
  /**
21
- * List a message's attachments by id. Metadata only — `$select` omits
22
- * `contentBytes`, so no file bytes are downloaded. Get `messageId` from
23
- * outlook-mail-list / outlook-mail-search (both now report `hasAttachments`).
9
+ * List a message's attachments by id. Metadata only — no file bytes are
10
+ * downloaded. Get `messageId` from outlook-mail-list / outlook-mail-search
11
+ * (both now report `hasAttachments`).
12
+ *
13
+ * The GET itself lives in lib/attachment-list.ts because outlook-draft-edit
14
+ * resolves attachment removals against the same call.
24
15
  */
25
16
  export async function runMailAttachmentList(config, args) {
26
- // Follow @odata.nextLink to completion so a message with more attachments
27
- // than one Graph page is never silently truncated (matching mail-list /
28
- // mail-search, which paginate). The first request builds the path + $select;
29
- // each nextLink is a full URL that already encodes the select and skiptoken.
30
- const raws = [];
31
- let next;
32
- let pages = 0;
33
- do {
34
- const firstPath = `/me/messages/${encodeURIComponent(args.messageId)}/attachments`;
35
- const page = await callGraph(config, async (client) => {
36
- const req = next ? client.api(next) : client.api(firstPath).select(LIST_SELECT);
37
- return (await req.get());
38
- }, { tool: "mail-attachment", target: next ?? firstPath });
39
- raws.push(...(page.value ?? []));
40
- next = page["@odata.nextLink"];
41
- pages += 1;
42
- } while (next);
43
- const items = raws.map((a) => ({
44
- id: a.id,
45
- name: a.name ?? null,
46
- contentType: a.contentType ?? null,
47
- size: a.size ?? 0,
48
- isInline: a.isInline ?? false,
49
- kind: attachmentKind(a["@odata.type"]),
50
- }));
17
+ const { items, pages } = await listMessageAttachments(config, args.messageId, "mail-attachment");
51
18
  log({
52
19
  event: "mail-attachment",
53
20
  op: "list",
@@ -1 +1 @@
1
- {"version":3,"file":"mail-attachment.js","sourceRoot":"","sources":["../../src/tools/mail-attachment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAG3C,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AACjG,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAyCpC,MAAM,UAAU,cAAc,CAAC,SAA6B;IAC1D,QAAQ,SAAS,EAAE,CAAC;QAClB,KAAK,iCAAiC;YACpC,OAAO,MAAM,CAAC;QAChB,KAAK,iCAAiC;YACpC,OAAO,MAAM,CAAC;QAChB,KAAK,sCAAsC;YACzC,OAAO,WAAW,CAAC;QACrB;YACE,OAAO,SAAS,CAAC;IACrB,CAAC;AACH,CAAC;AAED,MAAM,WAAW,GAAG,mCAAmC,CAAC;AAExD;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,MAAyB,EACzB,IAA2B;IAE3B,0EAA0E;IAC1E,wEAAwE;IACxE,6EAA6E;IAC7E,6EAA6E;IAC7E,MAAM,IAAI,GAAoB,EAAE,CAAC;IACjC,IAAI,IAAwB,CAAC;IAC7B,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,GAAG,CAAC;QACF,MAAM,SAAS,GAAG,gBAAgB,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC;QACnF,MAAM,IAAI,GAAG,MAAM,SAAS,CAC1B,MAAM,EACN,KAAK,EAAE,MAAM,EAAE,E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AAC,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAC9E,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,IAAI,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACzD,aAAa,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IAE1C,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;IACpC,IAAI,OAAO,KAAK,GAAG,CAAC,MAAM,EAAE,CAAC;QAC3B,+DAA+D;QAC/D,IAAI,CAAC;YAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAAC,CAAC;QAAC,MAAM,CAAC,CAAC,yBAAyB,CAAC,CAAC;QAC7D,MAAM,CAAC,cAAc,EAAE,6CAA6C,IAAI,IAAI,IAAI,CAAC,YAAY,eAAe,GAAG,CAAC,MAAM,iBAAiB,OAAO,GAAG,EAAE,IAAI,CAAC,CAAC;IAC3J,CAAC;IAED,GAAG,CAAC,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,SAAS,EAAE,EAAE,EAAE,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;IAEjJ,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC;AAChF,CAAC"}
@@ -14,7 +14,7 @@ The **encrypted token store** (`token-store.ts`) is still adapted from [`nsakki5
14
14
 
15
15
  End users never register an Azure app. The `OUTLOOK_CLIENT_ID` is a **public, non-secret** value (a PKCE public-client app has no client secret), and the app is **multi-tenant** (`/common`), so **one vendor-owned Entra app per brand** serves every install and every mailbox on that brand. End users only complete the OAuth consent screen; per-mailbox tokens stay per-account and encrypted, so a shared client ID does not weaken isolation.
16
16
 
17
- The value ships as the brand default: `brands/<brand>/brand.json#outlookClientId`. The installer stamps it onto the `-claude-session-manager` unit env as `OUTLOOK_CLIENT_ID` (+ `OUTLOOK_TENANT_ID=common`), and the plugin resolves it through the PLUGIN.md `mcp.env` passthrough. A brand that ships the field empty has the plugin inert (register refuses) until its vendor app exists — no operator action makes it work.
17
+ The value ships as the brand default: `brands/<brand>/brand.json#outlookClientId`. The installer stamps it onto the `-claude-session-manager` unit env as `OUTLOOK_CLIENT_ID` (+ `OUTLOOK_TENANT_ID=common`), and the plugin's MCP server reads it from `process.env` — it arrives by inheritance down the spawn chain (manager unit env → PTY → MCP child), not through any PLUGIN.md declaration. Outlook is `mcp-manifest: auto`, whose generator branch discards the declared `mcp.env` block entirely and emits only `MCP_SPAWN_TEE_NAME` (the manifest contract). The plugin's inert `OUTLOOK_CLIENT_ID: ${OUTLOOK_CLIENT_ID}` declaration has been deleted; it reached no path. A brand that ships the field empty has the plugin inert (register refuses) until its vendor app exists — no operator action makes it work.
18
18
 
19
19
  **Per-install override (escape hatch, not required):** setting `OUTLOOK_CLIENT_ID` in the install's env overrides the brand default. This is only for a vendor testing a replacement app; normal installs need nothing.
20
20
 
@@ -134,13 +134,17 @@ Recoverable — moves to Deleted Items, never hard-deletes or expunges. An id al
134
134
 
135
135
  **Endpoints (in order):**
136
136
  1. `PATCH /me/messages/{draftId}` (`ResponseType.RAW`; success asserted on HTTP 200) with only the supplied fields (`subject`, `body` → `{ contentType, content }`, `toRecipients`, `ccRecipients`, `bccRecipients`). Graph drafts are mutable, so no delete-and-reappend. **Skipped entirely** when the call supplies attachments and no patchable field. A PATCH on a sent (non-draft) message returns a Graph error surfaced unchanged.
137
- 2. Per file, by size — identical to `outlook-mail-reply` step 3 (shared helper). Attachments are **additive**: files are added to whatever the draft already carries. Removing or replacing an existing attachment is not supported.
137
+ 2. Per file, by size — identical to `outlook-mail-reply` step 3 (shared helper). Attachments edit in place: `attachments` adds files to what the draft already carries, `removeAttachments` takes files off via `DELETE /me/messages/{draftId}/attachments/{attachmentId}`, and the two together replace a file.
138
138
 
139
- At least one patchable field **or** one attachment is required. Attachment paths are validated before step 1, so a bad path leaves the draft untouched rather than half-edited.
139
+ **Removal resolution.** Each `removeAttachments` entry is matched against `GET /me/messages/{draftId}/attachments` (the same paginated call `outlook-mail-attachment` uses — shared as `lib/attachment-list.ts`): an exact attachment-id match wins, otherwise an exact name match. Zero matches refuses `not-on-draft` and names what the draft carries; two or more name matches refuses `ambiguous-name` and names the ids that disambiguate. Both fire before the PATCH — the listing is a GET — so a bad removal leaves the draft untouched. Resolution completing before any write is what makes a same-name swap unambiguous: the old file's id is pinned before the new file exists. Two distinct targets addressing the same attachment (an id and a name for one file) are collapsed to one removal rather than refused, so each attachment is deleted at most once. The DELETEs and attaches target the id the PATCH reported, while the listing is necessarily read from the caller's id; see [Item id contract](#item-id-contract).
140
+
141
+ **Removal observability.** `op=resolve requested=<n> resolved=<m>` is emitted once every target has resolved (`m` below `n` means targets were deduped), then one `op=detach id=<name> attachmentId=<id>` per file **after** its DELETE returns. A detach count below `resolved` together with a terminal failure is the partial-removal signature: `draft-edit` is non-atomic across PATCH, DELETE and attach, so a DELETE failing on file 2 of 3 leaves the draft matching neither the before nor the requested after while the caller is told the edit failed.
142
+
143
+ At least one patchable field, **one attachment or one removal** is required. Attachment paths are validated, and removals resolved, before step 1 — so a bad path or an unresolvable removal leaves the draft untouched rather than half-edited.
140
144
 
141
145
  Step 2 targets the id step 1 **reported**, not the caller's `draftId`. Ids are immutable plugin-wide so the two normally match, but a rotated id means the caller's handle no longer addresses the draft — see [Item id contract](#item-id-contract).
142
146
 
143
- **Returned shape:** `{ draftId: string; updated: true; attachments: string[] }` — `draftId` is the id Graph reported for the updated draft, which is authoritative over the id passed in. The tool refuses rather than report `updated: true` for an id it has not read back. An attachments-only edit issues no PATCH, so it reports the caller's id.
147
+ **Returned shape:** `{ draftId: string; updated: true; attachments: string[]; removed: string[] }` — `attachments` names the files added, `removed` the files taken off. `draftId` is the id Graph reported for the updated draft, which is authoritative over the id passed in. The tool refuses rather than report `updated: true` for an id it has not read back. An attachments-only or removal-only edit issues no PATCH, so it reports the caller's id.
144
148
 
145
149
  ## outlook-mail-send
146
150
 
@@ -85,7 +85,7 @@ Every address is a **quoted string inside an array**, even when there is only on
85
85
  `"to": rob@example.com` (unquoted) and `"to": "rob@example.com"` (quoted but not an array) are both rejected before the call reaches Outlook. A rejection here means the arguments were malformed; it is not evidence that sending is broken. Check `outlook-mailbox-info` before reporting a send fault.
86
86
 
87
87
  - `outlook-draft` — create a draft in the Drafts folder (same fields, same array-of-quoted-strings shape as send, including `attachments`). Returns the draft's id, and the files are already on the draft, so it can be sent as-is.
88
- - `outlook-draft-edit draftId=<id>` — update an existing draft in place (Graph drafts are mutable, so no delete-and-reappend). Pass the draftId plus only the fields to change: `to`, `cc`, `bcc`, `subject`, `body`, `isHtml`, `attachments` (recipients and attachments take the same array-of-quoted-strings shape as send). Attachments are added to the draft, never removed. At least one field or attachment is required; a sent message cannot be edited.
88
+ - `outlook-draft-edit draftId=<id>` — update an existing draft in place (Graph drafts are mutable, so no delete-and-reappend). Pass the draftId plus only the fields to change: `to`, `cc`, `bcc`, `subject`, `body`, `isHtml`, `attachments`, `removeAttachments` (recipients and attachments take the same array-of-quoted-strings shape as send). `attachments` adds files to the draft. `removeAttachments` takes files off it, each entry either an attachment name or an attachment id. Pass both to replace a file in one call. To see what a draft carries, call `outlook-mail-attachment` with the draftId as its messageId. Removing a file the draft does not carry, or a name it carries twice, is refused and changes nothing. At least one field, attachment or removal is required; a sent message cannot be edited.
89
89
  - `outlook-draft-send draftId=<id>` — send a draft created earlier. Graph consumes the draft on send.
90
90
 
91
91
  If the mailbox was registered before send was available, the first send returns "re-register to grant send" — run `outlook-account-register` again and consent to the send scopes.
@@ -80,7 +80,7 @@ It is set independently of the email plugin's 25 MiB attachment cap. Both bound
80
80
  Both directions are checked before anything is buffered, in two places that are not redundant:
81
81
 
82
82
  - `put` is size-checked in this MCP process with `statSync` before the file is read. That is what produces the error naming the file and the limit.
83
- - The house routes enforce independently, because they are plain loopback HTTP and every agent holds `Bash`: a cap enforced only here is bypassed by one `curl`, and the house process is the one holding the account-wide credential. `/r2/object/put` rejects an over-cap body at Hono's `bodyLimit`, before the body is buffered. `get` is sized from `r2ObjectList`'s recorded `size` before any bytes move.
83
+ - The house routes enforce independently, because they are plain loopback HTTP and every agent holds `Bash`: a cap enforced only here is bypassed by one `curl`, and the house process is the one holding the account-wide credential. Every object route rejects an over-cap body at Hono's `bodyLimit`, before the body is buffered — `/r2/object/put` against a base64 object ceiling, and `list`, `get` and `delete` against a 64 KiB metadata envelope, since those three carry a bucket and a key or prefix and nothing else. `get` is additionally sized from `r2ObjectFind`'s recorded `size` before any bytes move, which stops at the page carrying the exact key rather than listing every object sharing it as a prefix.
84
84
 
85
85
  A `get` whose key has no recorded size in the listing is refused, not attempted. No recorded size means no bound, and a stale or lagging listing would otherwise transfer an unbounded object. The cost is that a genuinely missing object reports "no recorded size" rather than Cloudflare's 404.
86
86
 
@@ -29,11 +29,7 @@ mcp:
29
29
  LOG_DIR: ${LOG_DIR}
30
30
  PLATFORM_ROOT: ${PLATFORM_ROOT}
31
31
  ACCOUNT_ID: ${ACCOUNT_ID}
32
- ADMIN_USER_ID: ${ADMIN_USER_ID}
33
32
  SESSION_ID: ${SESSION_ID}
34
- NEO4J_URI: ${NEO4J_URI}
35
- NEO4J_USER: ${NEO4J_USER}
36
- NEO4J_PASSWORD: ${NEO4J_PASSWORD}
37
33
  ---
38
34
 
39
35
  # Voice Mirror
@@ -57,16 +53,32 @@ The operator is:
57
53
 
58
54
  ## Tools
59
55
 
60
- Voice mirror introduces five deterministic plugin tools. They route writes through `memory-write` so the graph-write gate stamps provenance on every node.
56
+ Voice mirror introduces five deterministic plugin tools. They write to the graph directly over an account-scoped Cypher session, not through `memory-write`: an authorship stamp does not need the re-embedding and re-validation `memory-write` performs on every call. Account scoping is enforced per query, and identity per write (see [Identity](#identity)).
61
57
 
62
58
  | Tool | Purpose |
63
59
  |------|---------|
64
- | `voice-tag-content` | Stamp `authorshipMode ∈ {human-only, human-led-agent-assisted, agent-led-human-reviewed, agent-only, unknown}`, `format ∈ {text, email, social-post, article, note, marketing-copy}`, and `voiceAuthor` on one or many `:KnowledgeDocument | :Message | :SocialPost` nodes (email threads live as `:KnowledgeDocument {source:'email'}`). Bulk-mode for backfill batches. `format` is required. `author` is optional — omit to attribute to the tagging operator. |
60
+ | `voice-tag-content` | Stamp `authorshipMode ∈ {human-only, human-led-agent-assisted, agent-led-human-reviewed, agent-only, unknown}`, `format ∈ {text, email, social-post, article, note, marketing-copy}`, and `voiceAuthor` on one or many `:KnowledgeDocument | :Message | :SocialPost` nodes (email threads live as `:KnowledgeDocument {source:'email'}`). Bulk-mode for backfill batches. `format` is required. `author` is optional — omit to attribute to the tagging operator. The resolved `voiceAuthor` must name an `:AdminUser` on the calling account or the tag is refused and nothing is written (see [Identity](#identity)). |
65
61
  | `voice-distil-profile` | Three modes, scope-aware (`scope='personal'` default walks one author; `scope='org'` walks the whole account onto the business). `mode='sample'` (default) walks the `human-only` corpus for the given `format`/`scope` and returns exemplars + recent edit intents for the agent to compose a style card; cadence-guarded (≥20% growth or ≥30 days). `mode='amend'` reads only `nodeIds` plus the existing `:VoiceProfile.styleCard` so the agent can decide whether named documents move the profile — operator-initiated, no cadence guard. `mode='write'` persists the YAML card; supply `amendedFromNodeIds` to attribute the write to specific documents (bypasses cadence + corpus walk). Trashed nodes are excluded from every walk. Omit `format` on `'sample'` to enumerate all formats in that scope's corpus and distil each. |
66
- | `voice-retrieve-conditioning` | Return `{styleCard, exemplars[], status}` for a drafting brief. Requires `brief.format` (one of the six corpus formats). `brief.scope` (default `personal`) picks personal vs org voice; a personal request with no personal profile falls back to the org profile (`status='fallback-org'`). K=5 short-form (`brief.length:'short'`), K=15 long-form (`brief.length:'long'`). Token-budget bounded. `status ∈ {ok, fallback-org, no-data, error}`. |
62
+ | `voice-retrieve-conditioning` | Return `{styleCard, exemplars[], status}` for a drafting brief. Requires `brief.format` (one of the six corpus formats). `brief.scope` (default `personal`) picks personal vs org voice; a personal request with no personal profile falls back to the org profile (`status='fallback-org'`). K=5 short-form (`brief.length:'short'`), K=15 long-form (`brief.length:'long'`). Token-budget bounded. `brief.topic` is optional and **ranks** the exemplar walk — its terms order the corpus by how many they hit, recency breaks the tie, and a topic that matches nothing still returns the K most recent. `status ∈ {ok, fallback-org, no-data, error}`; `ok` means the query ran, not that exemplars came back — read `exemplars.length` for that. Identity is not gated here: retrieval writes nothing, and a personal request that resolves no personal voice falls back to the org voice by design. |
67
63
  | `voice-record-feedback` | Capture an operator edit on an agent draft as a `:VoiceEdit {format, scope}` with a Haiku-summarised `intent`, linked back to the scoped per-format `:VoiceProfile` via `:FEEDBACK_FOR` (org edits → org profile; editor preserved via `:AUTHORED`). Requires `format`. |
68
64
  | `voice-ingest-session-text` | Write operator turns from the current session as `:Message {format:'text', authorshipMode:'human-only'}` corpus nodes. The agent reads its own operator turns from context and passes them as `turns`. Deduplicates via SHA256 `contentHash`. Invoked on demand by the voice-mirror skill when the operator asks to capture this session's voice. |
69
65
 
66
+ ## Identity
67
+
68
+ Every `userId` / `author` a tool accepts is an `:AdminUser` id that already exists on the calling account. It is never a person's name, nor a slug derived from one. A value naming no `:AdminUser` on the account is refused and nothing is written: a profile keyed on a non-existent admin is unreachable by any seat that resolves identity properly, and a `voiceAuthor` stamped with one attributes a corpus to an identity that does not exist.
69
+
70
+ The reserved org key `__org__` is exempt. It names no `:AdminUser` by design and anchors on `:LocalBusiness`. That is how the account-wide house voice works, including on a spawn that carries `ACCOUNT_ID` but no personal identity.
71
+
72
+ Each tool resolves its identity from `USER_ID` in the spawn env. A tool argument is only needed when attributing to someone other than the caller, on a multi-operator account.
73
+
74
+ A refusal names the rejected key and the account, and emits one line:
75
+
76
+ ```
77
+ [voice-identity] refuse tool=<tool> reason=unknown-admin-user userId=<key> accountId=<account>
78
+ ```
79
+
80
+ `platform/scripts/voice-author-key-audit.sh` is the standing per-install check for keys already in the graph. It is read-only and reports two distinct findings: `:VoiceProfile` keys and `voiceAuthor` stamps matching no `:AdminUser` on their account. Disposition of anything it finds is an operator decision.
81
+
70
82
  ## References
71
83
 
72
84
  No external references; the skill body defines the five tool contracts. Developer notes in `maxy-code/.docs/voice-mirror.md`.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAuC,gBAAgB,EAAuB,MAAM,8BAA8B,CAAC;AAic1H,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAuC,gBAAgB,EAAuB,MAAM,8BAA8B,CAAC;AAsd1H,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
@@ -19,7 +19,14 @@ const server = new McpServer({
19
19
  // refusal preserves account isolation. Mirrors the memory plugin's
20
20
  // pattern (Task 202).
21
21
  const accountId = process.env.ACCOUNT_ID ?? null;
22
- const userIdEnv = process.env.ADMIN_USER_ID ?? null;
22
+ // Task 1699 USER_ID is the identity the PTY spawn stamps; MCP children
23
+ // inherit it, which is how `memory` / `admin` / `scheduling` resolve the
24
+ // operator without declaring it in their env block. Empty is a legitimate
25
+ // state (silent-compaction / recorder / public spawns stamp empty), and it
26
+ // means "no identity" — normalise it to null so it can never reach a query
27
+ // as a profile key.
28
+ const userIdRaw = process.env.USER_ID ?? "";
29
+ const userIdEnv = userIdRaw.length > 0 ? userIdRaw : null;
23
30
  process.stderr.write(`[voice-mirror] boot accountId=${accountId ?? "null"} userId=${userIdEnv ?? "null"}\n`);
24
31
  function refuseNoAccount(toolName) {
25
32
  process.stderr.write(`[voice-mirror] tool=${toolName} refuse reason=no-account-context\n`);
@@ -34,9 +41,9 @@ function refuseNoAccount(toolName) {
34
41
  };
35
42
  }
36
43
  function resolveUserId() {
37
- // ADMIN_USER_ID is stamped by the admin session manager at spawn time.
38
- // When absent (e.g. specialist subagents), the operator must pass it as
39
- // a tool argument or the tools refuse rather than orphan a profile.
44
+ // USER_ID is stamped on the claude PTY at spawn time and inherited by this
45
+ // MCP child. When absent or empty, the operator must pass userId as a tool
46
+ // argument or the tools refuse rather than orphan a profile.
40
47
  return userIdEnv;
41
48
  }
42
49
  // Format enum schema — shared across tools that accept VoiceFormat.
@@ -61,11 +68,11 @@ lifelineTool(server, "voice-tag-content", "Stamp authorshipMode and format on on
61
68
  userId: z
62
69
  .string()
63
70
  .optional()
64
- .describe("Operator AdminUser id. Defaults to ADMIN_USER_ID env. Used as the default author when `author` is omitted."),
71
+ .describe("Operator AdminUser id. Defaults to USER_ID env. Used as the default author when `author` is omitted. Must name an :AdminUser that already exists on this account."),
65
72
  author: z
66
73
  .string()
67
74
  .optional()
68
- .describe("voiceAuthor userId to stamp on the nodes. Omit to attribute to the tagging operator single-operator accounts get personal attribution for free."),
75
+ .describe("voiceAuthor to stamp on the nodes — an existing :AdminUser id on this account, never a person's name or a slug derived from one. Omit to attribute to the tagging operator; single-operator accounts get personal attribution for free. Name an author only on a multi-operator account when tagging someone else's writing."),
69
76
  }, async ({ nodeIds, mode, format, userId, author }) => {
70
77
  if (!accountId)
71
78
  return refuseNoAccount("voice-tag-content");
@@ -117,7 +124,7 @@ lifelineTool(server, "voice-distil-profile", "Three-mode tool. mode='sample' (de
117
124
  userId: z
118
125
  .string()
119
126
  .optional()
120
- .describe("Operator AdminUser identifier. Defaults to ADMIN_USER_ID env from spawn context."),
127
+ .describe("Operator AdminUser identifier. Defaults to USER_ID env from spawn context."),
121
128
  format: zFormat.optional().describe("Writing format to distil. Required for mode='amend' and mode='write'. When omitted on 'sample', enumerates corpus formats and distils each that fires the cadence guard."),
122
129
  force: z
123
130
  .boolean()
@@ -149,7 +156,7 @@ lifelineTool(server, "voice-distil-profile", "Three-mode tool. mode='sample' (de
149
156
  content: [
150
157
  {
151
158
  type: "text",
152
- text: "voice-distil-profile: userId required (no ADMIN_USER_ID in spawn env).",
159
+ text: "voice-distil-profile: userId required (no USER_ID in spawn env).",
153
160
  },
154
161
  ],
155
162
  isError: true,
@@ -207,7 +214,7 @@ lifelineTool(server, "voice-retrieve-conditioning", "Return the operator's per-f
207
214
  userId: z
208
215
  .string()
209
216
  .optional()
210
- .describe("Operator AdminUser identifier. Defaults to ADMIN_USER_ID env."),
217
+ .describe("Operator AdminUser identifier. Defaults to USER_ID env."),
211
218
  format: zFormat.describe("Writing format for corpus and profile scoping."),
212
219
  topic: z
213
220
  .string()
@@ -225,12 +232,24 @@ lifelineTool(server, "voice-retrieve-conditioning", "Return the operator's per-f
225
232
  return refuseNoAccount("voice-retrieve-conditioning");
226
233
  const resolvedUserId = userId ?? resolveUserId();
227
234
  // org scope is account-wide (keyed on ORG_USER_ID + accountId) and never
228
- // reads a userId, so a specialist spawn that carries ACCOUNT_ID but no
229
- // ADMIN_USER_ID can still retrieve the house voice. Only personal scope
230
- // requires a resolved userId (Task 975).
235
+ // reads a userId, so a spawn that carries ACCOUNT_ID but no USER_ID can
236
+ // still retrieve the house voice. Only personal scope requires a resolved
237
+ // userId (Task 975).
231
238
  if ((scope ?? "personal") !== "org" && !resolvedUserId) {
232
239
  // Soft (no isError) so drafting degrades, but status:error keeps this
233
240
  // distinct from genuine no-data (Task 493).
241
+ //
242
+ // Task 1699 — this gate returns before voiceRetrieveConditioning, so the
243
+ // tool's own missing-identity line never fires and the payload's status
244
+ // lives only in the session JSONL. The shared lifeline reads isError,
245
+ // which a soft return never sets, so it logs outcome=ok. Without this
246
+ // line the failure is invisible in the logs: on the SiteDesk install,
247
+ // 93 voice-retrieve lifeline lines said outcome=ok and none carried the
248
+ // error while every retrieval on a client account was failing. Match the
249
+ // tool's own format so one grep for `[voice-retrieve] error:` finds both.
250
+ process.stderr.write(`[voice-retrieve] error: missing-identity scope=${scope ?? "personal"} ` +
251
+ `accountId=${Boolean(accountId)} userId=${Boolean(resolvedUserId)} ` +
252
+ `userId-source=${userId ? "arg" : "env"}\n`);
234
253
  return {
235
254
  content: [
236
255
  {
@@ -239,7 +258,7 @@ lifelineTool(server, "voice-retrieve-conditioning", "Return the operator's per-f
239
258
  styleCard: null,
240
259
  exemplars: [],
241
260
  status: "error",
242
- error: "no userId (no ADMIN_USER_ID in spawn env)",
261
+ error: "no userId (no USER_ID in spawn env)",
243
262
  }),
244
263
  },
245
264
  ],
@@ -307,7 +326,7 @@ lifelineTool(server, "voice-record-feedback", "Capture an operator's edit on an
307
326
  content: [
308
327
  {
309
328
  type: "text",
310
- text: "voice-record-feedback: userId required (no ADMIN_USER_ID in spawn env).",
329
+ text: "voice-record-feedback: userId required (no USER_ID in spawn env).",
311
330
  },
312
331
  ],
313
332
  isError: true,
@@ -348,7 +367,7 @@ lifelineTool(server, "voice-record-feedback", "Capture an operator's edit on an
348
367
  lifelineTool(server, "voice-ingest-session-text", "Write operator turns from the current session as :Message {format:'text', source:'admin-pty', authorshipMode:'human-only'} corpus nodes. The admin agent reads its own operator turns from the live conversation context and passes them as `turns`. Deduplication via SHA256 contentHash — re-running with the same turns is a no-op. Triggers voice-distil-profile {format:'text'} after ingest (cadence guard decides whether distillation runs). Invoked on demand by the voice-mirror skill when the operator asks to capture this session's voice.", {
349
368
  turns: z.array(z.string()).describe("Operator turns the agent read from its own session context (one string per operator message). Slash commands, harness injections, and large paste blocks are filtered out by the tool."),
350
369
  sessionId: z.string().optional().describe("Session ID for provenance."),
351
- userId: z.string().optional().describe("Operator AdminUser identifier. Defaults to ADMIN_USER_ID env."),
370
+ userId: z.string().optional().describe("Operator AdminUser identifier. Defaults to USER_ID env."),
352
371
  }, async ({ turns, sessionId, userId }) => {
353
372
  if (!accountId)
354
373
  return refuseNoAccount("voice-ingest-session-text");
@@ -358,7 +377,7 @@ lifelineTool(server, "voice-ingest-session-text", "Write operator turns from the
358
377
  content: [
359
378
  {
360
379
  type: "text",
361
- text: "voice-ingest-session-text: userId required (no ADMIN_USER_ID in spawn env).",
380
+ text: "voice-ingest-session-text: userId required (no USER_ID in spawn env).",
362
381
  },
363
382
  ],
364
383
  isError: true,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAC1E,aAAa,CAAC,cAAc,CAAC,CAAC;AAE9B,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,gBAAgB,EAAuB,MAAM,8BAA8B,CAAC;AAE1H,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AACnF,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC;IAC3B,IAAI,EAAE,mBAAmB;IACzB,OAAO,EAAE,OAAO;CACjB,CAAC,CAAC;AAEH,wEAAwE;AACxE,mEAAmE;AACnE,sBAAsB;AACtB,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC;AACjD,MAAM,SAAS,GAAG,OAAO,CAAC,GA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