@rubytech/create-maxy-code 0.1.462 → 0.1.463
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/payload/platform/plugins/admin/skills/platform-architecture/SKILL.md +2 -2
- package/payload/platform/plugins/docs/references/internals.md +1 -1
- package/payload/platform/plugins/outlook/mcp/dist/lib/message.d.ts +1 -6
- package/payload/platform/plugins/outlook/mcp/dist/lib/message.d.ts.map +1 -1
- package/payload/platform/plugins/outlook/mcp/dist/lib/message.js +9 -17
- package/payload/platform/plugins/outlook/mcp/dist/lib/message.js.map +1 -1
- package/payload/platform/plugins/outlook/mcp/dist/lib/recipients.d.ts +56 -0
- package/payload/platform/plugins/outlook/mcp/dist/lib/recipients.d.ts.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/lib/recipients.js +40 -0
- package/payload/platform/plugins/outlook/mcp/dist/lib/recipients.js.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/tools/draft-edit.d.ts.map +1 -1
- package/payload/platform/plugins/outlook/mcp/dist/tools/draft-edit.js +1 -3
- package/payload/platform/plugins/outlook/mcp/dist/tools/draft-edit.js.map +1 -1
- package/payload/platform/plugins/outlook/mcp/dist/tools/draft.d.ts.map +1 -1
- package/payload/platform/plugins/outlook/mcp/dist/tools/draft.js +3 -18
- package/payload/platform/plugins/outlook/mcp/dist/tools/draft.js.map +1 -1
- package/payload/platform/plugins/outlook/mcp/dist/tools/mail-fetch-body.d.ts.map +1 -1
- package/payload/platform/plugins/outlook/mcp/dist/tools/mail-fetch-body.js +1 -3
- package/payload/platform/plugins/outlook/mcp/dist/tools/mail-fetch-body.js.map +1 -1
- package/payload/platform/plugins/outlook/mcp/dist/tools/mail-reply.d.ts.map +1 -1
- package/payload/platform/plugins/outlook/mcp/dist/tools/mail-reply.js +3 -18
- package/payload/platform/plugins/outlook/mcp/dist/tools/mail-reply.js.map +1 -1
- package/payload/platform/plugins/scheduling/mcp/dist/scripts/__tests__/agent-turn-dispatch.test.js +6 -32
- package/payload/platform/plugins/scheduling/mcp/dist/scripts/__tests__/agent-turn-dispatch.test.js.map +1 -1
- package/payload/platform/plugins/scheduling/mcp/dist/scripts/agent-turn-dispatch.d.ts.map +1 -1
- package/payload/platform/plugins/scheduling/mcp/dist/scripts/agent-turn-dispatch.js +10 -30
- package/payload/platform/plugins/scheduling/mcp/dist/scripts/agent-turn-dispatch.js.map +1 -1
- package/payload/platform/plugins/scheduling/mcp/dist/tools/__tests__/schedule-cancel.test.js +24 -21
- package/payload/platform/plugins/scheduling/mcp/dist/tools/__tests__/schedule-cancel.test.js.map +1 -1
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-cancel.d.ts +27 -18
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-cancel.d.ts.map +1 -1
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-cancel.js +31 -27
- package/payload/platform/plugins/scheduling/mcp/dist/tools/schedule-cancel.js.map +1 -1
- package/payload/platform/services/telegram-channel/dist/server.d.ts.map +1 -1
- package/payload/platform/services/telegram-channel/dist/server.js +0 -4
- package/payload/platform/services/telegram-channel/dist/server.js.map +1 -1
- package/payload/platform/services/webchat-channel/dist/server.d.ts.map +1 -1
- package/payload/platform/services/webchat-channel/dist/server.js +0 -4
- package/payload/platform/services/webchat-channel/dist/server.js.map +1 -1
- package/payload/platform/services/whatsapp-channel/dist/server.d.ts.map +1 -1
- package/payload/platform/services/whatsapp-channel/dist/server.js +0 -4
- package/payload/platform/services/whatsapp-channel/dist/server.js.map +1 -1
- package/payload/server/public/assets/{chat-CufidiBQ.js → chat-DYT5H81o.js} +1 -1
- package/payload/server/public/assets/{operator-Cj0B_usT.js → operator-gm2eP4r6.js} +1 -1
- package/payload/server/public/assets/page-BoPorLg-.js +32 -0
- package/payload/server/public/assets/{public-BkNW9e9T.js → public-DqJk6qgW.js} +1 -1
- package/payload/server/public/chat.html +2 -2
- package/payload/server/public/operator.html +2 -2
- package/payload/server/public/public.html +2 -2
- package/payload/server/server.js +70 -61
- package/payload/server/public/assets/page-84Fdwiu_.js +0 -32
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: platform-architecture
|
|
3
3
|
description: Use when grounding any documented-surface claim about what Maxy ships — plugins, skills, specialists, install/deploy flows, internals. This is the install catalogue, not evidence of what is enabled on the current account. For install state on this account, call `capabilities-here`; for documented surface, cite the `Source:` URL inline.
|
|
4
|
-
content-hash: sha256:
|
|
4
|
+
content-hash: sha256:ddd3d65ece37d8e4ddcc7094ade79a1113d56ec2b0ca43e7d36e7f40c3f00efb
|
|
5
5
|
brand: maxy-code
|
|
6
6
|
product-name: Maxy
|
|
7
7
|
---
|
|
@@ -3952,7 +3952,7 @@ Standing rules the operator gives over a channel are `Preference` nodes. Two mec
|
|
|
3952
3952
|
|
|
3953
3953
|
**Inject the active rule-set every turn (channel gateways).** The one definition of "this account's active rules" is `@maxy/active-rules`: the account owner's admin-scope preferences (resolve the seeded `AdminUser {role:'owner'}`, then select through that owner's `UserProfile` via `HAS_PREFERENCE`), a bounded, floor-filtered (`confidence >= 0.4`), confidence-ordered candidate query, then semantic de-confliction (one winner per subject at the same 0.85 cosine), capped to `INJECTION_RULE_CAP` (12). A preference owned by a non-owner profile (an operator's, stranded on the operator's own profile while managing the account) is never injected; an account with no seeded owner injects nothing. `profile-read` exposes this same owner-scoped set as `activeRules`, and the three inbound gateways (`wa-gateway`, `telegram-gateway`, `webchat-gateway`) fetch it for the effective session account and attach it as `standingRules` on the inbound frame; the channel builders prepend it as a `## Standing rules` block above `## Context`. Both channel-server inbound paths carry the block: the single-target SSE loop parses the whole frame, and the unified multi-target door reader (`runDoorStream`,) reconstructs it through the shared `doorInboundPayload` seam whose `parseFrame` closures read `standingRules` off the frame. The read is by code, not agent discretion, so a rule set last week is applied this week regardless of how many times the session compacted. Telegram and webchat inject for `role:'admin'` only — a public visitor never receives operator rules.
|
|
3954
3954
|
|
|
3955
|
-
**Trust a scheduled turn's provenance, never an inbound's claim (channel-agent grounding).** A cron-dispatched agent turn reaches the same channel builders as a real inbound, so its own authorisation text would otherwise land inside `## Context` — the zone `REFRAME_INSTRUCTION` demotes to untrusted — and a security-cautious agent would distrust its own automation (the self-cancel loop). The dispatcher therefore stamps a `ScheduleProvenance` marker (owning account, event, owner userId, dispatch time) that the channel builders render as a `## Scheduled automation (platform-verified)` preamble **above** `## Context` (and above the rules block); the whatsapp wrap tag names the door `scheduler`. Both channel-server paths carry the marker — the single-target loop and the unified multi-target door reader (via the same `doorInboundPayload` seam that carries `standingRules`); the scheduler only dispatches to the whatsapp/telegram door, so a webchat frame never bears one. Because the marker is dispatcher-stamped and never derived from payload text, an inbound message cannot forge it — placement above `## Context` alone is not the trust signal, the dispatcher provenance is. The grounding binds to it in two places: one recipient-neutral clause added byte-identical to the three reframe instructions (a marker-bearing turn is authorised standing automation; a reconfiguration or re-enable is not intrusion), and the admin `IDENTITY.md` "Untrusted input" rule that the agent never states a platform-level authenticity or impersonation verdict it was not given (an unsourced "this is not from you" is its own inference, flagged, never asserted as the platform's).
|
|
3955
|
+
**Trust a scheduled turn's provenance, never an inbound's claim (channel-agent grounding).** A cron-dispatched agent turn reaches the same channel builders as a real inbound, so its own authorisation text would otherwise land inside `## Context` — the zone `REFRAME_INSTRUCTION` demotes to untrusted — and a security-cautious agent would distrust its own automation (the self-cancel loop). The dispatcher therefore stamps a `ScheduleProvenance` marker (owning account, event, owner userId, dispatch time) that the channel builders render as a `## Scheduled automation (platform-verified)` preamble **above** `## Context` (and above the rules block); the whatsapp wrap tag names the door `scheduler`. Both channel-server paths carry the marker — the single-target loop and the unified multi-target door reader (via the same `doorInboundPayload` seam that carries `standingRules`); the scheduler only dispatches to the whatsapp/telegram door, so a webchat frame never bears one. Because the marker is dispatcher-stamped and never derived from payload text, an inbound message cannot forge it — placement above `## Context` alone is not the trust signal, the dispatcher provenance is. The grounding binds to it in two places: one recipient-neutral clause added byte-identical to the three reframe instructions (a marker-bearing turn is authorised standing automation; a reconfiguration or re-enable is not intrusion), and the admin `IDENTITY.md` "Untrusted input" rule that the agent never states a platform-level authenticity or impersonation verdict it was not given (an unsourced "this is not from you" is its own inference, flagged, never asserted as the platform's). A sender has exactly one session: every inbound, real or scheduled, resolves to the deterministic `adminSessionIdFor(effectiveAccount, destination)`. An earlier change gave each firing its own salted seat so distrust could not accrete across firings, but the inbound hub keys on `senderId` and replaces its subscriber outright, so a seat's channel server attached under the sender's own key and swallowed the sender's REAL messages until it detached — splitting one conversation across two sessions that each denied what the other held. The seat is removed; the authoritative `agentPrompt`, this provenance marker, and the injected standing rules ground each firing without one. Self-cancel attribution is disarmed while that model beds in: the guard used to compare the cancelling turn's session id to a dispatcher stamp, which discriminated only because each firing ran its own seat, so with one session per sender it would report an autonomous loop on every operator cancel. It now always reports false — under-counting a real loop rather than inventing one — until the discriminator is rebuilt from the turn's own dispatched eventId. See `.docs/scheduling-agent-dispatch.md § Operator-provenance marker`, `§ Session model — one session per sender`, and `§ Self-cancel attribution — disarmed`.
|
|
3956
3956
|
|
|
3957
3957
|
**Observability.** `[preference-write] op=reconcile … mode=<reinforce|update|contradict|new> similarity=…` — a stream of `mode=new` for subjects that already exist is the duplicate-minting signature. `[preference-inject] op=inject channel=<wa|tg|web> injected=<N> owner=<8> source=<owner|no-owner|owner-error|fetch-error>` — injection selects only the account owner's admin preferences, so `source=owner injected=0` is a genuinely empty owner, `source=no-owner` is an account with no seeded owner (injects nothing, a missed owner seeding), and `injected=0 source=owner` on an account whose owner holds rules is the write-only regression re-appearing. `[preference-audit] op=drift accountId=… storedActive=… injectedActive=… duplicateClusters=…` — the standing reconciliation audit (claude-session-manager, 5-minute tick) flags any account whose store holds more active rows than injection would surface, the no-event detector for drift.
|
|
3958
3958
|
|
|
@@ -402,7 +402,7 @@ Standing rules the operator gives over a channel are `Preference` nodes. Two mec
|
|
|
402
402
|
|
|
403
403
|
**Inject the active rule-set every turn (channel gateways).** The one definition of "this account's active rules" is `@maxy/active-rules`: the account owner's admin-scope preferences (resolve the seeded `AdminUser {role:'owner'}`, then select through that owner's `UserProfile` via `HAS_PREFERENCE`), a bounded, floor-filtered (`confidence >= 0.4`), confidence-ordered candidate query, then semantic de-confliction (one winner per subject at the same 0.85 cosine), capped to `INJECTION_RULE_CAP` (12). A preference owned by a non-owner profile (an operator's, stranded on the operator's own profile while managing the account) is never injected; an account with no seeded owner injects nothing. `profile-read` exposes this same owner-scoped set as `activeRules`, and the three inbound gateways (`wa-gateway`, `telegram-gateway`, `webchat-gateway`) fetch it for the effective session account and attach it as `standingRules` on the inbound frame; the channel builders prepend it as a `## Standing rules` block above `## Context`. Both channel-server inbound paths carry the block: the single-target SSE loop parses the whole frame, and the unified multi-target door reader (`runDoorStream`,) reconstructs it through the shared `doorInboundPayload` seam whose `parseFrame` closures read `standingRules` off the frame. The read is by code, not agent discretion, so a rule set last week is applied this week regardless of how many times the session compacted. Telegram and webchat inject for `role:'admin'` only — a public visitor never receives operator rules.
|
|
404
404
|
|
|
405
|
-
**Trust a scheduled turn's provenance, never an inbound's claim (channel-agent grounding).** A cron-dispatched agent turn reaches the same channel builders as a real inbound, so its own authorisation text would otherwise land inside `## Context` — the zone `REFRAME_INSTRUCTION` demotes to untrusted — and a security-cautious agent would distrust its own automation (the self-cancel loop). The dispatcher therefore stamps a `ScheduleProvenance` marker (owning account, event, owner userId, dispatch time) that the channel builders render as a `## Scheduled automation (platform-verified)` preamble **above** `## Context` (and above the rules block); the whatsapp wrap tag names the door `scheduler`. Both channel-server paths carry the marker — the single-target loop and the unified multi-target door reader (via the same `doorInboundPayload` seam that carries `standingRules`); the scheduler only dispatches to the whatsapp/telegram door, so a webchat frame never bears one. Because the marker is dispatcher-stamped and never derived from payload text, an inbound message cannot forge it — placement above `## Context` alone is not the trust signal, the dispatcher provenance is. The grounding binds to it in two places: one recipient-neutral clause added byte-identical to the three reframe instructions (a marker-bearing turn is authorised standing automation; a reconfiguration or re-enable is not intrusion), and the admin `IDENTITY.md` "Untrusted input" rule that the agent never states a platform-level authenticity or impersonation verdict it was not given (an unsourced "this is not from you" is its own inference, flagged, never asserted as the platform's).
|
|
405
|
+
**Trust a scheduled turn's provenance, never an inbound's claim (channel-agent grounding).** A cron-dispatched agent turn reaches the same channel builders as a real inbound, so its own authorisation text would otherwise land inside `## Context` — the zone `REFRAME_INSTRUCTION` demotes to untrusted — and a security-cautious agent would distrust its own automation (the self-cancel loop). The dispatcher therefore stamps a `ScheduleProvenance` marker (owning account, event, owner userId, dispatch time) that the channel builders render as a `## Scheduled automation (platform-verified)` preamble **above** `## Context` (and above the rules block); the whatsapp wrap tag names the door `scheduler`. Both channel-server paths carry the marker — the single-target loop and the unified multi-target door reader (via the same `doorInboundPayload` seam that carries `standingRules`); the scheduler only dispatches to the whatsapp/telegram door, so a webchat frame never bears one. Because the marker is dispatcher-stamped and never derived from payload text, an inbound message cannot forge it — placement above `## Context` alone is not the trust signal, the dispatcher provenance is. The grounding binds to it in two places: one recipient-neutral clause added byte-identical to the three reframe instructions (a marker-bearing turn is authorised standing automation; a reconfiguration or re-enable is not intrusion), and the admin `IDENTITY.md` "Untrusted input" rule that the agent never states a platform-level authenticity or impersonation verdict it was not given (an unsourced "this is not from you" is its own inference, flagged, never asserted as the platform's). A sender has exactly one session: every inbound, real or scheduled, resolves to the deterministic `adminSessionIdFor(effectiveAccount, destination)`. An earlier change gave each firing its own salted seat so distrust could not accrete across firings, but the inbound hub keys on `senderId` and replaces its subscriber outright, so a seat's channel server attached under the sender's own key and swallowed the sender's REAL messages until it detached — splitting one conversation across two sessions that each denied what the other held. The seat is removed; the authoritative `agentPrompt`, this provenance marker, and the injected standing rules ground each firing without one. Self-cancel attribution is disarmed while that model beds in: the guard used to compare the cancelling turn's session id to a dispatcher stamp, which discriminated only because each firing ran its own seat, so with one session per sender it would report an autonomous loop on every operator cancel. It now always reports false — under-counting a real loop rather than inventing one — until the discriminator is rebuilt from the turn's own dispatched eventId. See `.docs/scheduling-agent-dispatch.md § Operator-provenance marker`, `§ Session model — one session per sender`, and `§ Self-cancel attribution — disarmed`.
|
|
406
406
|
|
|
407
407
|
**Observability.** `[preference-write] op=reconcile … mode=<reinforce|update|contradict|new> similarity=…` — a stream of `mode=new` for subjects that already exist is the duplicate-minting signature. `[preference-inject] op=inject channel=<wa|tg|web> injected=<N> owner=<8> source=<owner|no-owner|owner-error|fetch-error>` — injection selects only the account owner's admin preferences, so `source=owner injected=0` is a genuinely empty owner, `source=no-owner` is an account with no seeded owner (injects nothing, a missed owner seeding), and `injected=0 source=owner` on an account whose owner holds rules is the write-only regression re-appearing. `[preference-audit] op=drift accountId=… storedActive=… injectedActive=… duplicateClusters=…` — the standing reconciliation audit (claude-session-manager, 5-minute tick) flags any account whose store holds more active rows than injection would surface, the no-event detector for drift.
|
|
408
408
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type Recipient } from "./recipients.js";
|
|
1
2
|
/**
|
|
2
3
|
* Build a Microsoft Graph message resource from the tool input shape shared by
|
|
3
4
|
* outlook-mail-send and outlook-draft. Graph stores one body with a single
|
|
@@ -19,11 +20,6 @@ export interface MessageInput {
|
|
|
19
20
|
* `buildMessage` deliberately ignores this field. */
|
|
20
21
|
attachments?: string[];
|
|
21
22
|
}
|
|
22
|
-
interface Recipient {
|
|
23
|
-
emailAddress: {
|
|
24
|
-
address: string;
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
23
|
export interface GraphMessage {
|
|
28
24
|
subject: string;
|
|
29
25
|
body: {
|
|
@@ -35,5 +31,4 @@ export interface GraphMessage {
|
|
|
35
31
|
bccRecipients?: Recipient[];
|
|
36
32
|
}
|
|
37
33
|
export declare function buildMessage(input: MessageInput): GraphMessage;
|
|
38
|
-
export {};
|
|
39
34
|
//# sourceMappingURL=message.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../src/lib/message.ts"],"names":[],"mappings":"AAAA;;;;;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
|
-
* `GraphMessage` below is the latter. That is why `attachments` lives here but
|
|
8
|
-
* never reaches `buildMessage`'s output.
|
|
9
|
-
*/
|
|
10
|
-
function toRecipients(addrs) {
|
|
11
|
-
return (addrs ?? [])
|
|
12
|
-
.map((a) => a.trim())
|
|
13
|
-
.filter((a) => a.length > 0)
|
|
14
|
-
.map((address) => ({ emailAddress: { address } }));
|
|
1
|
+
import { recip } from "./recipients.js";
|
|
2
|
+
/** Drop blanks and surrounding whitespace from tool input. Unique to the message
|
|
3
|
+
* resource: the tools' cc/bcc PATCH paths do not sanitise, and giving `recip`
|
|
4
|
+
* this behaviour would silently change them. */
|
|
5
|
+
function clean(list) {
|
|
6
|
+
return (list ?? []).map((a) => a.trim()).filter((a) => a.length > 0);
|
|
15
7
|
}
|
|
16
8
|
export function buildMessage(input) {
|
|
17
|
-
const to =
|
|
9
|
+
const to = recip(clean(input.to));
|
|
18
10
|
if (to.length === 0) {
|
|
19
11
|
throw new Error("outlook: at least one 'to' recipient is required.");
|
|
20
12
|
}
|
|
21
|
-
const cc =
|
|
22
|
-
const bcc =
|
|
13
|
+
const cc = recip(clean(input.cc));
|
|
14
|
+
const bcc = recip(clean(input.bcc));
|
|
23
15
|
const message = {
|
|
24
16
|
subject: input.subject,
|
|
25
17
|
body: { contentType: input.isHtml ? "HTML" : "Text", content: input.body },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.js","sourceRoot":"","sources":["../../src/lib/message.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"message.js","sourceRoot":"","sources":["../../src/lib/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAkB,MAAM,iBAAiB,CAAC;AAiCxD;;iDAEiD;AACjD,SAAS,KAAK,CAAC,IAA0B;IACvC,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AACvE,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,KAAmB;IAC9C,MAAM,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;IAClC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;IACvE,CAAC;IACD,MAAM,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;IAClC,MAAM,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;IACpC,MAAM,OAAO,GAAiB;QAC5B,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,IAAI,EAAE,EAAE,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC,IAAI,EAAE;QAC1E,YAAY,EAAE,EAAE;KACjB,CAAC;IACF,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,CAAC,YAAY,GAAG,EAAE,CAAC;IAC7C,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,CAAC,aAAa,GAAG,GAAG,CAAC;IAChD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { GraphClientConfig } from "./graph-client.js";
|
|
2
|
+
/**
|
|
3
|
+
* Recipients cross this plugin's boundary in two directions, and the two shapes
|
|
4
|
+
* are not interchangeable — which is why there are two types here, not one.
|
|
5
|
+
*/
|
|
6
|
+
/** A recipient as Graph RETURNS it. Every field optional: nothing is guaranteed,
|
|
7
|
+
* so reads go through `addrs`, which drops entries carrying no address. */
|
|
8
|
+
export interface RawRecipient {
|
|
9
|
+
emailAddress?: {
|
|
10
|
+
address?: string;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
/** A recipient as this plugin CONSTRUCTS it for a Graph write. Complete by
|
|
14
|
+
* construction, which is why `recip` returns this rather than `RawRecipient`:
|
|
15
|
+
* it is the honest type, and it is assignable wherever a `RawRecipient` is
|
|
16
|
+
* expected, so one strict return type serves every call site — including
|
|
17
|
+
* `GraphMessage`, whose recipient fields require the complete shape. */
|
|
18
|
+
export interface Recipient {
|
|
19
|
+
emailAddress: {
|
|
20
|
+
address: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
/** The subset of a Graph draft this plugin reads back after a create. `id` is
|
|
24
|
+
* optional because Graph's contract does not guarantee it; every caller guards
|
|
25
|
+
* with `if (!draft?.id) throw` before use and TypeScript narrows from there. */
|
|
26
|
+
export interface DraftMsg {
|
|
27
|
+
id?: string;
|
|
28
|
+
conversationId?: string | null;
|
|
29
|
+
toRecipients?: RawRecipient[];
|
|
30
|
+
ccRecipients?: RawRecipient[];
|
|
31
|
+
}
|
|
32
|
+
/** Graph recipient list to plain addresses. */
|
|
33
|
+
export declare function addrs(list: RawRecipient[] | undefined): string[];
|
|
34
|
+
/** Plain addresses to a Graph recipient list. Deliberately does NOT sanitise:
|
|
35
|
+
* the only caller that needs trimming and blank-dropping is `buildMessage`,
|
|
36
|
+
* which does it first. Adding it here would silently change the cc/bcc paths of
|
|
37
|
+
* draft, mail-reply and draft-edit. */
|
|
38
|
+
export declare function recip(list: string[]): Recipient[];
|
|
39
|
+
/**
|
|
40
|
+
* PATCH cc/bcc onto a draft Graph has just created for a reply.
|
|
41
|
+
*
|
|
42
|
+
* Graph's createReply/createReplyAll sets the recipients from the message being
|
|
43
|
+
* replied to; anything extra has to be PATCHed onto the returned draft. The cc
|
|
44
|
+
* merge de-duplicates against the cc Graph already put on the draft, so
|
|
45
|
+
* replyAll plus an explicit cc does not double an address.
|
|
46
|
+
*
|
|
47
|
+
* It does NOT de-duplicate against `toRecipients`: a cc naming someone already
|
|
48
|
+
* on the To line lands in both fields. That is pre-existing behaviour, held
|
|
49
|
+
* deliberately by the extraction that created this module (Task 1729). Whether
|
|
50
|
+
* it is a defect or an explicit-cc-wins decision is open in Task 1745 — this is
|
|
51
|
+
* the one place a change would land.
|
|
52
|
+
*
|
|
53
|
+
* No-ops when neither cc nor bcc is supplied, so callers need no guard.
|
|
54
|
+
*/
|
|
55
|
+
export declare function applyCcBccToDraft(config: GraphClientConfig, draftId: string, existingCc: RawRecipient[] | undefined, cc: string[], bcc: string[], tool: string): Promise<void>;
|
|
56
|
+
//# sourceMappingURL=recipients.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recipients.d.ts","sourceRoot":"","sources":["../../src/lib/recipients.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAG3D;;;GAGG;AAEH;4EAC4E;AAC5E,MAAM,WAAW,YAAY;IAC3B,YAAY,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACrC;AAED;;;;yEAIyE;AACzE,MAAM,WAAW,SAAS;IACxB,YAAY,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CACnC;AAED;;iFAEiF;AACjF,MAAM,WAAW,QAAQ;IACvB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,YAAY,CAAC,EAAE,YAAY,EAAE,CAAC;IAC9B,YAAY,CAAC,EAAE,YAAY,EAAE,CAAC;CAC/B;AAED,+CAA+C;AAC/C,wBAAgB,KAAK,CAAC,IAAI,EAAE,YAAY,EAAE,GAAG,SAAS,GAAG,MAAM,EAAE,CAEhE;AAED;;;wCAGwC;AACxC,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,CAEjD;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,YAAY,EAAE,GAAG,SAAS,EACtC,EAAE,EAAE,MAAM,EAAE,EACZ,GAAG,EAAE,MAAM,EAAE,EACb,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,IAAI,CAAC,CAOf"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { patchGraph } from "./graph-client.js";
|
|
2
|
+
/** Graph recipient list to plain addresses. */
|
|
3
|
+
export function addrs(list) {
|
|
4
|
+
return (list ?? []).map((r) => r.emailAddress?.address).filter((a) => !!a);
|
|
5
|
+
}
|
|
6
|
+
/** Plain addresses to a Graph recipient list. Deliberately does NOT sanitise:
|
|
7
|
+
* the only caller that needs trimming and blank-dropping is `buildMessage`,
|
|
8
|
+
* which does it first. Adding it here would silently change the cc/bcc paths of
|
|
9
|
+
* draft, mail-reply and draft-edit. */
|
|
10
|
+
export function recip(list) {
|
|
11
|
+
return list.map((address) => ({ emailAddress: { address } }));
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* PATCH cc/bcc onto a draft Graph has just created for a reply.
|
|
15
|
+
*
|
|
16
|
+
* Graph's createReply/createReplyAll sets the recipients from the message being
|
|
17
|
+
* replied to; anything extra has to be PATCHed onto the returned draft. The cc
|
|
18
|
+
* merge de-duplicates against the cc Graph already put on the draft, so
|
|
19
|
+
* replyAll plus an explicit cc does not double an address.
|
|
20
|
+
*
|
|
21
|
+
* It does NOT de-duplicate against `toRecipients`: a cc naming someone already
|
|
22
|
+
* on the To line lands in both fields. That is pre-existing behaviour, held
|
|
23
|
+
* deliberately by the extraction that created this module (Task 1729). Whether
|
|
24
|
+
* it is a defect or an explicit-cc-wins decision is open in Task 1745 — this is
|
|
25
|
+
* the one place a change would land.
|
|
26
|
+
*
|
|
27
|
+
* No-ops when neither cc nor bcc is supplied, so callers need no guard.
|
|
28
|
+
*/
|
|
29
|
+
export async function applyCcBccToDraft(config, draftId, existingCc, cc, bcc, tool) {
|
|
30
|
+
if (cc.length === 0 && bcc.length === 0)
|
|
31
|
+
return;
|
|
32
|
+
const mergedCc = [...new Set([...addrs(existingCc), ...cc])];
|
|
33
|
+
const patch = {};
|
|
34
|
+
if (mergedCc.length > 0)
|
|
35
|
+
patch.ccRecipients = recip(mergedCc);
|
|
36
|
+
if (bcc.length > 0)
|
|
37
|
+
patch.bccRecipients = recip(bcc);
|
|
38
|
+
await patchGraph(config, `/me/messages/${encodeURIComponent(draftId)}`, patch, { tool });
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=recipients.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recipients.js","sourceRoot":"","sources":["../../src/lib/recipients.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAgC/C,+CAA+C;AAC/C,MAAM,UAAU,KAAK,CAAC,IAAgC;IACpD,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAe,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1F,CAAC;AAED;;;wCAGwC;AACxC,MAAM,UAAU,KAAK,CAAC,IAAc;IAClC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,EAAE,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AAChE,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,MAAyB,EACzB,OAAe,EACf,UAAsC,EACtC,EAAY,EACZ,GAAa,EACb,IAAY;IAEZ,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO;IAChD,MAAM,QAAQ,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;IAC7D,MAAM,KAAK,GAA4B,EAAE,CAAC;IAC1C,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC;QAAE,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC9D,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC;QAAE,KAAK,CAAC,aAAa,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;IACrD,MAAM,UAAU,CAAC,MAAM,EAAE,gBAAgB,kBAAkB,CAAC,OAAO,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;AAC3F,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"draft-edit.d.ts","sourceRoot":"","sources":["../../src/tools/draft-edit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"draft-edit.d.ts","sourceRoot":"","sources":["../../src/tools/draft-edit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAShE,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;4EACwE;IACxE,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB;0BACsB;IACtB,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC9B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,iBAAiB,EACzB,IAAI,EAAE,aAAa,GAClB,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,IAAI,CAAC;IAAC,WAAW,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAiEvF"}
|
|
@@ -3,9 +3,7 @@ import { attachFilesToDraft, resolveAttachmentsOrRefuse } from "../lib/attach.js
|
|
|
3
3
|
import { listMessageAttachments } from "../lib/attachment-list.js";
|
|
4
4
|
import { detachFromDraft, resolveRemovalsOrRefuse } from "../lib/detach.js";
|
|
5
5
|
import { log } from "../lib/log.js";
|
|
6
|
-
|
|
7
|
-
return list.map((address) => ({ emailAddress: { address } }));
|
|
8
|
-
}
|
|
6
|
+
import { recip } from "../lib/recipients.js";
|
|
9
7
|
/**
|
|
10
8
|
* Update an existing draft in place via PATCH /me/messages/{draftId}, and/or add
|
|
11
9
|
* and remove its attachments. Graph drafts are mutable, so no delete-and-reappend.
|
|
@@ -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,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAClF,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC5E,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"draft-edit.js","sourceRo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,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"draft.d.ts","sourceRoot":"","sources":["../../src/tools/draft.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,OAAO,EAAgB,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAKpE;;;;;;GAMG;AACH,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,YAAY,EAAE,IAAI,GAAG,SAAS,CAAC;IACtE,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;qFACiF;IACjF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,uEAAuE;IACvE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB;;;yDAGqD;IACrD,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAsB,QAAQ,CAAC,MAAM,EAAE,iBAAiB,EAAE,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,CA2BjG"}
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { postGraph } from "../lib/graph-client.js";
|
|
2
2
|
import { buildMessage } from "../lib/message.js";
|
|
3
3
|
import { attachFilesToDraft, resolveAttachmentsOrRefuse } from "../lib/attach.js";
|
|
4
4
|
import { log } from "../lib/log.js";
|
|
5
|
-
|
|
6
|
-
return (list ?? []).map((r) => r.emailAddress?.address).filter((a) => !!a);
|
|
7
|
-
}
|
|
8
|
-
function recip(list) {
|
|
9
|
-
return list.map((address) => ({ emailAddress: { address } }));
|
|
10
|
-
}
|
|
5
|
+
import { applyCcBccToDraft } from "../lib/recipients.js";
|
|
11
6
|
/**
|
|
12
7
|
* Create a draft via Graph, attach any files to it, and return an id naming a
|
|
13
8
|
* Drafts-folder message that already carries them and is ready for
|
|
@@ -103,17 +98,7 @@ async function createThreadedDraft(config, input) {
|
|
|
103
98
|
if (!draft?.id) {
|
|
104
99
|
throw new Error("outlook-draft: Graph created the reply draft but returned no id.");
|
|
105
100
|
}
|
|
106
|
-
|
|
107
|
-
const bcc = input.bcc ?? [];
|
|
108
|
-
if (cc.length > 0 || bcc.length > 0) {
|
|
109
|
-
const mergedCc = [...new Set([...addrs(draft.ccRecipients), ...cc])];
|
|
110
|
-
const patch = {};
|
|
111
|
-
if (mergedCc.length > 0)
|
|
112
|
-
patch.ccRecipients = recip(mergedCc);
|
|
113
|
-
if (bcc.length > 0)
|
|
114
|
-
patch.bccRecipients = recip(bcc);
|
|
115
|
-
await patchGraph(config, `/me/messages/${encodeURIComponent(draft.id)}`, patch, { tool: "draft" });
|
|
116
|
-
}
|
|
101
|
+
await applyCcBccToDraft(config, draft.id, draft.ccRecipients, input.cc ?? [], input.bcc ?? [], "draft");
|
|
117
102
|
return { draftId: draft.id, conversationId: draft.conversationId ?? null };
|
|
118
103
|
}
|
|
119
104
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"draft.js","sourceRoot":"","sources":["../../src/tools/draft.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"draft.js","sourceRoot":"","sources":["../../src/tools/draft.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAqB,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAClF,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,iBAA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ACzH,MAAM,KAAK,GAAG,IAAuB,CAAC;IACtC,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,kEAAkE,CAAC,CAAC;IACtF,CAAC;IAED,MAAM,iBAAiB,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,EAAE,IAAI,EAAE,EAAE,KAAK,CAAC,GAAG,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;IAExG,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,EAAE,cAAc,EAAE,KAAK,CAAC,cAAc,IAAI,IAAI,EAAE,CAAC;AAC7E,CAAC;AAED;;;GAGG;AACH,SAAS,2BAA2B,CAAC,KAAiB;IACpD,IAAI,KAAK,CAAC,EAAE,KAAK,SAAS,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CACb,+MAA+M,CAChN,CAAC;IACJ,CAAC;IACD,IAAI,KAAK,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CACb,+HAA+H,CAChI,CAAC;IACJ,CAAC;IACD,IAAI,KAAK,CAAC,MAAM,KAAK,IAAI,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CACb,4PAA4P,CAC7P,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mail-fetch-body.d.ts","sourceRoot":"","sources":["../../src/tools/mail-fetch-body.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"mail-fetch-body.d.ts","sourceRoot":"","sources":["../../src/tools/mail-fetch-body.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAMhE,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,EAAE,EAAE,MAAM,EAAE,CAAC;IACb,EAAE,EAAE,MAAM,EAAE,CAAC;IACb,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,MAAM,EAAE,OAAO,CAAC;IAChB,cAAc,EAAE,OAAO,CAAC;IACxB,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;CACd;AAkBD;;;;;GAKG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,iBAAiB,EACzB,IAAI,EAAE;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,GAC1B,OAAO,CAAC,eAAe,CAAC,CAmC1B"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { callGraph } from "../lib/graph-client.js";
|
|
2
2
|
import { htmlToText } from "../lib/html-to-text.js";
|
|
3
3
|
import { log } from "../lib/log.js";
|
|
4
|
+
import { addrs } from "../lib/recipients.js";
|
|
4
5
|
const SELECT = "id,subject,from,toRecipients,ccRecipients,receivedDateTime,conversationId,isRead,hasAttachments,body";
|
|
5
|
-
function addrs(list) {
|
|
6
|
-
return (list ?? []).map((r) => r.emailAddress?.address).filter((a) => !!a);
|
|
7
|
-
}
|
|
8
6
|
/**
|
|
9
7
|
* Read the COMPLETE body of one message by id. Graph's bodyPreview (returned by
|
|
10
8
|
* outlook-mail-list/-search) is capped near 255 chars; this requests the full
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mail-fetch-body.js","sourceRoot":"","sources":["../../src/tools/mail-fetch-body.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,GAAG,EAAE,MAAM,eA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AChB,OAAO,EAAE,MAAM,CAAC,SAAS;QACzB,EAAE,EAAE,IAAI,CAAC,SAAS;QAClB,KAAK,EAAE,IAAI,CAAC,MAAM;QAClB,WAAW;KACZ,CAAC,CAAC;IAEH,OAAO;QACL,EAAE,EAAE,GAAG,CAAC,EAAE;QACV,OAAO,EAAE,GAAG,CAAC,OAAO,IAAI,IAAI;QAC5B,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,YAAY,EAAE,OAAO,IAAI,IAAI;QAC7C,EAAE,EAAE,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC;QAC3B,EAAE,EAAE,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC;QAC3B,gBAAgB,EAAE,GAAG,CAAC,gBAAgB;QACtC,cAAc,EAAE,GAAG,CAAC,cAAc,IAAI,IAAI;QAC1C,MAAM,EAAE,GAAG,CAAC,MAAM,IAAI,KAAK;QAC3B,cAAc,EAAE,GAAG,CAAC,cAAc,IAAI,KAAK;QAC3C,WAAW;QACX,IAAI;KACL,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mail-reply.d.ts","sourceRoot":"","sources":["../../src/tools/mail-reply.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"mail-reply.d.ts","sourceRoot":"","sources":["../../src/tools/mail-reply.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAMhE,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,MAAM,WAAW,WAAW;IAC1B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,EAAE,EAAE,MAAM,EAAE,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AAED;;;;;;;;;GASG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,iBAAiB,EACzB,IAAI,EAAE,SAAS,GACd,OAAO,CAAC,WAAW,CAAC,CAsCtB"}
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import { postGraph
|
|
1
|
+
import { postGraph } from "../lib/graph-client.js";
|
|
2
2
|
import { attachFilesToDraft, resolveAttachmentsOrRefuse } from "../lib/attach.js";
|
|
3
3
|
import { log } from "../lib/log.js";
|
|
4
|
-
|
|
5
|
-
return (list ?? []).map((r) => r.emailAddress?.address).filter((a) => !!a);
|
|
6
|
-
}
|
|
7
|
-
function recip(list) {
|
|
8
|
-
return list.map((address) => ({ emailAddress: { address } }));
|
|
9
|
-
}
|
|
4
|
+
import { addrs, applyCcBccToDraft } from "../lib/recipients.js";
|
|
10
5
|
/**
|
|
11
6
|
* Reply to a message in-thread via Microsoft Graph. Threading is native: the
|
|
12
7
|
* createReply/createReplyAll draft carries the original conversationId. The
|
|
@@ -26,17 +21,7 @@ export async function runMailReply(config, args) {
|
|
|
26
21
|
if (!draft?.id) {
|
|
27
22
|
throw new Error("outlook-mail-reply: Graph created the reply draft but returned no id.");
|
|
28
23
|
}
|
|
29
|
-
|
|
30
|
-
const bcc = args.bcc ?? [];
|
|
31
|
-
if (cc.length > 0 || bcc.length > 0) {
|
|
32
|
-
const mergedCc = [...new Set([...addrs(draft.ccRecipients), ...cc])];
|
|
33
|
-
const patch = {};
|
|
34
|
-
if (mergedCc.length > 0)
|
|
35
|
-
patch.ccRecipients = recip(mergedCc);
|
|
36
|
-
if (bcc.length > 0)
|
|
37
|
-
patch.bccRecipients = recip(bcc);
|
|
38
|
-
await patchGraph(config, `/me/messages/${encodeURIComponent(draft.id)}`, patch, { tool: "mail-reply" });
|
|
39
|
-
}
|
|
24
|
+
await applyCcBccToDraft(config, draft.id, draft.ccRecipients, args.cc ?? [], args.bcc ?? [], "mail-reply");
|
|
40
25
|
await attachFilesToDraft(config, draft.id, files, "mail-reply");
|
|
41
26
|
await postGraph(config, `/me/messages/${encodeURIComponent(draft.id)}/send`, undefined, { tool: "mail-reply" });
|
|
42
27
|
log({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mail-reply.js","sourceRoot":"","sources":["../../src/tools/mail-reply.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"mail-reply.js","sourceRoot":"","sources":["../../src/tools/mail-reply.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAClF,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAiB,MAAM,sBAAsB,CAAC;AAkB/E;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,MAAyB,EACzB,IAAe;IAEf,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,KAAK,CAAC;IACxC,MAAM,KAAK,GAAG,0BAA0B,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;IAE3F,MAAM,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,aAAa,CAAC;IAC3D,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,SAAS,CAC9B,MAAM,EACN,gBAAgB,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,MAAM,EAAE,EAC9D,EAAE,OAAO,EAAE,IAAI,CAAC,IAAI,EAAE,E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|
87
87
|
const write = driver.runs.find((r) => r.query.includes("lastDispatchResult"));
|
|
88
88
|
expect(write?.params.lastDispatchResult).toBe("error:404");
|
|
89
89
|
});
|
|
90
|
-
it("
|
|
91
|
-
const order = [];
|
|
90
|
+
it("sends no seat id — every firing targets the sender's own session (Task 1746)", async () => {
|
|
92
91
|
const calls = [];
|
|
93
92
|
globalThis.fetch = vi.fn(async (_url, init) => {
|
|
94
|
-
order.push("fetch");
|
|
95
93
|
calls.push({ body: JSON.parse(init.body) });
|
|
96
94
|
return { ok: true, status: 200 };
|
|
97
95
|
});
|
|
@@ -99,8 +97,6 @@ describe("dispatchAgentTurn", () => {
|
|
|
99
97
|
const driver = {
|
|
100
98
|
session: () => ({
|
|
101
99
|
run: vi.fn(async (query, params) => {
|
|
102
|
-
if (query.includes("lastDispatchSessionId"))
|
|
103
|
-
order.push("stamp");
|
|
104
100
|
runs.push({ query, params });
|
|
105
101
|
return { records: [] };
|
|
106
102
|
}),
|
|
@@ -108,33 +104,11 @@ describe("dispatchAgentTurn", () => {
|
|
|
108
104
|
}),
|
|
109
105
|
};
|
|
110
106
|
await dispatchAgentTurn("evt-1", "whatsapp", "+447504472444", "reply OK", "acct-house", null, "schedule-event", "/tmp/no-accounts", driver);
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
expect(
|
|
115
|
-
|
|
116
|
-
expect(order.indexOf("stamp")).toBeLessThan(order.indexOf("fetch"));
|
|
117
|
-
});
|
|
118
|
-
it("surfaces a stamp-write failure as op=stamp-failed and still dispatches (Task 1526)", async () => {
|
|
119
|
-
globalThis.fetch = vi.fn(async () => ({ ok: true, status: 200 }));
|
|
120
|
-
// Reject only the lastDispatchSessionId stamp; the result write still succeeds.
|
|
121
|
-
const driver = {
|
|
122
|
-
session: () => ({
|
|
123
|
-
run: vi.fn(async (query) => {
|
|
124
|
-
if (query.includes("lastDispatchSessionId"))
|
|
125
|
-
throw new Error("neo4j-down");
|
|
126
|
-
return { records: [] };
|
|
127
|
-
}),
|
|
128
|
-
close: vi.fn(async () => { }),
|
|
129
|
-
}),
|
|
130
|
-
};
|
|
131
|
-
const errs = [];
|
|
132
|
-
const errSpy = vi.spyOn(console, "error").mockImplementation((m) => {
|
|
133
|
-
errs.push(String(m));
|
|
134
|
-
});
|
|
135
|
-
await expect(dispatchAgentTurn("evt-1", "whatsapp", "+447504472444", "reply OK", "acct-house", null, "schedule-event", "/tmp/no-accounts", driver)).resolves.toBeUndefined();
|
|
136
|
-
errSpy.mockRestore();
|
|
137
|
-
expect(errs.some((l) => /\[schedule-dispatch\] op=stamp-failed eventId=evt-1 .*detail=neo4j-down/.test(l))).toBe(true);
|
|
107
|
+
// Task 1526's per-firing seat is gone: no sessionId on the POST, and no
|
|
108
|
+
// lastDispatchSessionId stamp (the self-cancel guard reads the turn's own
|
|
109
|
+
// schedule provenance instead).
|
|
110
|
+
expect(calls[0].body.sessionId).toBeUndefined();
|
|
111
|
+
expect(runs.some((r) => r.query.includes("lastDispatchSessionId"))).toBe(false);
|
|
138
112
|
});
|
|
139
113
|
it("stamps operator-provenance on the inject POST outside the payload, logs op=dispatch markerOutsidePayload=true", async () => {
|
|
140
114
|
const accountsDir = mkdtempSync(join(tmpdir(), "dispatch-accounts-"));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-turn-dispatch.test.js","sourceRoot":"","sources":["../../../src/scripts/__tests__/agent-turn-dispatch.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACxE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,iBAAi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J,gBAAgB,EAChB,WAAW,EACX,MAAe,CAChB,CAAC;QAEF,MAAM,CAAC,WAAW,EAAE,CAAC;QACrB,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC;QAC9C,MAAM,CAAC,IAAI,CAAC,CAAC,aAAa,CAAC;YACzB,SAAS,EAAE,YAAY;YACvB,OAAO,EAAE,OAAO;YAChB,UAAU,EAAE,CAAC,cAAc,CAAC;YAC5B,aAAa,EAAE,gBAAgB;SAChC,CAAC,CAAC;QACH,MAAM,CAAC,OAAO,IAAI,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAChD,iFAAiF;QACjF,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,0BAA0B,CAAC,CAAC;QACvE,MAAM,CACJ,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,iFAAiF,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAC5G,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACb,MAAM,CAAC,WAAW,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACxD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-turn-dispatch.d.ts","sourceRoot":"","sources":["../../src/scripts/agent-turn-dispatch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"agent-turn-dispatch.d.ts","sourceRoot":"","sources":["../../src/scripts/agent-turn-dispatch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;A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