@rubytech/create-maxy-code 0.1.457 → 0.1.459
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/lib/mcp-lifeline/dist/index.d.ts.map +1 -1
- package/payload/platform/lib/mcp-lifeline/dist/index.js +22 -1
- package/payload/platform/lib/mcp-lifeline/dist/index.js.map +1 -1
- package/payload/platform/lib/mcp-lifeline/src/__tests__/lifeline.test.ts +26 -0
- package/payload/platform/lib/mcp-lifeline/src/index.ts +24 -1
- package/payload/platform/lib/storage-broker/dist/__tests__/cf-exec.test.js +322 -2
- package/payload/platform/lib/storage-broker/dist/__tests__/cf-exec.test.js.map +1 -1
- package/payload/platform/lib/storage-broker/dist/__tests__/object-limits.test.d.ts +2 -0
- package/payload/platform/lib/storage-broker/dist/__tests__/object-limits.test.d.ts.map +1 -0
- package/payload/platform/lib/storage-broker/dist/__tests__/object-limits.test.js +59 -0
- package/payload/platform/lib/storage-broker/dist/__tests__/object-limits.test.js.map +1 -0
- package/payload/platform/lib/storage-broker/dist/cf-exec.d.ts +12 -1
- package/payload/platform/lib/storage-broker/dist/cf-exec.d.ts.map +1 -1
- package/payload/platform/lib/storage-broker/dist/cf-exec.js +156 -26
- package/payload/platform/lib/storage-broker/dist/cf-exec.js.map +1 -1
- package/payload/platform/lib/storage-broker/dist/house-credential.d.ts.map +1 -1
- package/payload/platform/lib/storage-broker/dist/house-credential.js +8 -2
- package/payload/platform/lib/storage-broker/dist/house-credential.js.map +1 -1
- package/payload/platform/lib/storage-broker/dist/index.d.ts +1 -0
- package/payload/platform/lib/storage-broker/dist/index.d.ts.map +1 -1
- package/payload/platform/lib/storage-broker/dist/index.js +1 -0
- package/payload/platform/lib/storage-broker/dist/index.js.map +1 -1
- package/payload/platform/lib/storage-broker/dist/object-limits.d.ts +53 -0
- package/payload/platform/lib/storage-broker/dist/object-limits.d.ts.map +1 -0
- package/payload/platform/lib/storage-broker/dist/object-limits.js +72 -0
- package/payload/platform/lib/storage-broker/dist/object-limits.js.map +1 -0
- package/payload/platform/lib/storage-broker/src/__tests__/cf-exec.test.ts +362 -3
- package/payload/platform/lib/storage-broker/src/__tests__/object-limits.test.ts +76 -0
- package/payload/platform/lib/storage-broker/src/cf-exec.ts +230 -44
- package/payload/platform/lib/storage-broker/src/house-credential.ts +8 -2
- package/payload/platform/lib/storage-broker/src/index.ts +1 -0
- package/payload/platform/lib/storage-broker/src/object-limits.ts +75 -0
- package/payload/platform/plugins/admin/skills/platform-architecture/SKILL.md +5 -5
- package/payload/platform/plugins/cloudflare/bin/__tests__/cf-token.test.sh +145 -4
- package/payload/platform/plugins/cloudflare/bin/cf-token.sh +61 -3
- package/payload/platform/plugins/cloudflare/references/api.md +1 -1
- package/payload/platform/plugins/cloudflare/skills/cloudflare/SKILL.md +1 -1
- package/payload/platform/plugins/docs/references/outlook-guide.md +4 -4
- package/payload/platform/plugins/outlook/.claude-plugin/plugin.json +1 -1
- package/payload/platform/plugins/outlook/PLUGIN.md +2 -2
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/attach.test.d.ts +2 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/attach.test.d.ts.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/attach.test.js +138 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/attach.test.js.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/draft-attachments.test.d.ts +2 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/draft-attachments.test.d.ts.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/draft-attachments.test.js +121 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/draft-attachments.test.js.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/draft-edit-attachments.test.d.ts +2 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/draft-edit-attachments.test.d.ts.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/draft-edit-attachments.test.js +102 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/draft-edit-attachments.test.js.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/draft-edit.test.js +16 -3
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/draft-edit.test.js.map +1 -1
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/graph-client.test.js +108 -1
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/graph-client.test.js.map +1 -1
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/mail-send-attachments.test.d.ts +2 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/mail-send-attachments.test.d.ts.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/mail-send-attachments.test.js +209 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/mail-send-attachments.test.js.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/index.js +10 -7
- package/payload/platform/plugins/outlook/mcp/dist/index.js.map +1 -1
- package/payload/platform/plugins/outlook/mcp/dist/lib/attach.d.ts +37 -0
- package/payload/platform/plugins/outlook/mcp/dist/lib/attach.d.ts.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/lib/attach.js +79 -0
- package/payload/platform/plugins/outlook/mcp/dist/lib/attach.js.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/lib/graph-client.d.ts +42 -15
- package/payload/platform/plugins/outlook/mcp/dist/lib/graph-client.d.ts.map +1 -1
- package/payload/platform/plugins/outlook/mcp/dist/lib/graph-client.js +32 -1
- package/payload/platform/plugins/outlook/mcp/dist/lib/graph-client.js.map +1 -1
- package/payload/platform/plugins/outlook/mcp/dist/lib/message.d.ts +8 -0
- package/payload/platform/plugins/outlook/mcp/dist/lib/message.d.ts.map +1 -1
- package/payload/platform/plugins/outlook/mcp/dist/lib/message.js +4 -0
- package/payload/platform/plugins/outlook/mcp/dist/lib/message.js.map +1 -1
- package/payload/platform/plugins/outlook/mcp/dist/lib/outbound-attachments.d.ts +31 -8
- package/payload/platform/plugins/outlook/mcp/dist/lib/outbound-attachments.d.ts.map +1 -1
- package/payload/platform/plugins/outlook/mcp/dist/lib/outbound-attachments.js +40 -13
- package/payload/platform/plugins/outlook/mcp/dist/lib/outbound-attachments.js.map +1 -1
- package/payload/platform/plugins/outlook/mcp/dist/lib/upload-session.d.ts +9 -5
- package/payload/platform/plugins/outlook/mcp/dist/lib/upload-session.d.ts.map +1 -1
- package/payload/platform/plugins/outlook/mcp/dist/lib/upload-session.js +12 -8
- package/payload/platform/plugins/outlook/mcp/dist/lib/upload-session.js.map +1 -1
- package/payload/platform/plugins/outlook/mcp/dist/tools/calendar-event.d.ts.map +1 -1
- package/payload/platform/plugins/outlook/mcp/dist/tools/calendar-event.js +3 -5
- package/payload/platform/plugins/outlook/mcp/dist/tools/calendar-event.js.map +1 -1
- package/payload/platform/plugins/outlook/mcp/dist/tools/draft-edit.d.ts +36 -4
- 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 +56 -9
- 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 +13 -2
- package/payload/platform/plugins/outlook/mcp/dist/tools/draft.d.ts.map +1 -1
- package/payload/platform/plugins/outlook/mcp/dist/tools/draft.js +18 -4
- package/payload/platform/plugins/outlook/mcp/dist/tools/draft.js.map +1 -1
- package/payload/platform/plugins/outlook/mcp/dist/tools/mail-attachment.d.ts.map +1 -1
- package/payload/platform/plugins/outlook/mcp/dist/tools/mail-attachment.js +3 -4
- package/payload/platform/plugins/outlook/mcp/dist/tools/mail-attachment.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 +2 -4
- 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 -20
- package/payload/platform/plugins/outlook/mcp/dist/tools/mail-reply.js.map +1 -1
- package/payload/platform/plugins/outlook/mcp/dist/tools/mail-send.d.ts +27 -3
- package/payload/platform/plugins/outlook/mcp/dist/tools/mail-send.d.ts.map +1 -1
- package/payload/platform/plugins/outlook/mcp/dist/tools/mail-send.js +53 -8
- package/payload/platform/plugins/outlook/mcp/dist/tools/mail-send.js.map +1 -1
- package/payload/platform/plugins/outlook/references/graph-surfaces.md +41 -6
- package/payload/platform/plugins/outlook/skills/outlook/SKILL.md +22 -5
- package/payload/platform/plugins/storage-broker/PLUGIN.md +41 -2
- package/payload/platform/plugins/storage-broker/mcp/dist/__tests__/confine-path.test.d.ts +2 -0
- package/payload/platform/plugins/storage-broker/mcp/dist/__tests__/confine-path.test.d.ts.map +1 -0
- package/payload/platform/plugins/storage-broker/mcp/dist/__tests__/confine-path.test.js +85 -0
- package/payload/platform/plugins/storage-broker/mcp/dist/__tests__/confine-path.test.js.map +1 -0
- package/payload/platform/plugins/storage-broker/mcp/dist/__tests__/put-source.test.d.ts +2 -0
- package/payload/platform/plugins/storage-broker/mcp/dist/__tests__/put-source.test.d.ts.map +1 -0
- package/payload/platform/plugins/storage-broker/mcp/dist/__tests__/put-source.test.js +77 -0
- package/payload/platform/plugins/storage-broker/mcp/dist/__tests__/put-source.test.js.map +1 -0
- package/payload/platform/plugins/storage-broker/mcp/dist/confine-path.d.ts +12 -0
- package/payload/platform/plugins/storage-broker/mcp/dist/confine-path.d.ts.map +1 -0
- package/payload/platform/plugins/storage-broker/mcp/dist/confine-path.js +107 -0
- package/payload/platform/plugins/storage-broker/mcp/dist/confine-path.js.map +1 -0
- package/payload/platform/plugins/storage-broker/mcp/dist/index.js +86 -0
- package/payload/platform/plugins/storage-broker/mcp/dist/index.js.map +1 -1
- package/payload/platform/plugins/storage-broker/mcp/dist/put-source.d.ts +11 -0
- package/payload/platform/plugins/storage-broker/mcp/dist/put-source.d.ts.map +1 -0
- package/payload/platform/plugins/storage-broker/mcp/dist/put-source.js +35 -0
- package/payload/platform/plugins/storage-broker/mcp/dist/put-source.js.map +1 -0
- package/payload/platform/scripts/logs-read-jsonl.test.sh +118 -0
- package/payload/platform/scripts/logs-read.sh +63 -9
- package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.generated.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.generated.js +4 -0
- package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.generated.js.map +1 -1
- package/payload/server/{chunk-F4D35LKL.js → chunk-POBXIHOF.js} +34 -0
- package/payload/server/{chunk-SDYRKIYY.js → chunk-Q6W4U6HL.js} +153 -27
- package/payload/server/maxy-edge.js +1 -1
- package/payload/server/server.js +206 -6
- package/payload/server/{src-554BYJMN.js → src-3I2RYZFB.js} +9 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shared per-file attach loop for every outbound path that can carry a
|
|
3
|
+
* file: outlook-mail-reply, outlook-mail-send (draft-send route), outlook-draft,
|
|
4
|
+
* and outlook-draft-edit. Extracted from mail-reply so the sequence is written
|
|
5
|
+
* once rather than a fourth time.
|
|
6
|
+
*
|
|
7
|
+
* Kept out of `outbound-attachments.ts` deliberately: that lib is pure node:fs
|
|
8
|
+
* with a pure test suite, and folding Graph calls into it would drag
|
|
9
|
+
* graph-client and upload-session across that boundary.
|
|
10
|
+
*
|
|
11
|
+
* `tool` names the calling tool and is threaded to the Graph call tag, the
|
|
12
|
+
* upload session's error prefix, and the log line's `event`, so one
|
|
13
|
+
* attachment's lifeline greps back to the tool that sent it.
|
|
14
|
+
*/
|
|
15
|
+
import type { GraphClientConfig } from "./graph-client.js";
|
|
16
|
+
import type { OutboundAttachment } from "./outbound-attachments.js";
|
|
17
|
+
/**
|
|
18
|
+
* Validate agent-supplied paths, emitting the `op: "refuse"` line for a per-path
|
|
19
|
+
* refusal before rethrowing.
|
|
20
|
+
*
|
|
21
|
+
* Throwing here — before any postGraph — IS the orphan-draft guard: the absence
|
|
22
|
+
* of a following `op: "attach"` for that call proves it held. Account-context
|
|
23
|
+
* failures are not per-path refusals and pass through unlogged: they name no
|
|
24
|
+
* file, so a refuse line for them would carry an empty `name`.
|
|
25
|
+
*/
|
|
26
|
+
export declare function resolveAttachmentsOrRefuse(accountId: string, paths: string[] | undefined, tool: string): OutboundAttachment[];
|
|
27
|
+
/**
|
|
28
|
+
* Attach each resolved file to an existing draft. The draft must already exist
|
|
29
|
+
* and every file must already have passed `resolveOutboundAttachments`. A file
|
|
30
|
+
* at or under the inline limit is added as one base64 fileAttachment POST; a
|
|
31
|
+
* larger file (to the 25 MB cap) streams through a Graph upload session.
|
|
32
|
+
*
|
|
33
|
+
* The `op: "attach"` line is emitted AFTER the POST or session returns, never
|
|
34
|
+
* before, so a logged attach means an attach that landed.
|
|
35
|
+
*/
|
|
36
|
+
export declare function attachFilesToDraft(config: GraphClientConfig, draftId: string, files: OutboundAttachment[], tool: string): Promise<void>;
|
|
37
|
+
//# sourceMappingURL=attach.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attach.d.ts","sourceRoot":"","sources":["../../src/lib/attach.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AASpE;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,EAAE,GAAG,SAAS,EAC3B,IAAI,EAAE,MAAM,GACX,kBAAkB,EAAE,CAmBtB;AAED;;;;;;;;GAQG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,kBAAkB,EAAE,EAC3B,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,IAAI,CAAC,CAsBf"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shared per-file attach loop for every outbound path that can carry a
|
|
3
|
+
* file: outlook-mail-reply, outlook-mail-send (draft-send route), outlook-draft,
|
|
4
|
+
* and outlook-draft-edit. Extracted from mail-reply so the sequence is written
|
|
5
|
+
* once rather than a fourth time.
|
|
6
|
+
*
|
|
7
|
+
* Kept out of `outbound-attachments.ts` deliberately: that lib is pure node:fs
|
|
8
|
+
* with a pure test suite, and folding Graph calls into it would drag
|
|
9
|
+
* graph-client and upload-session across that boundary.
|
|
10
|
+
*
|
|
11
|
+
* `tool` names the calling tool and is threaded to the Graph call tag, the
|
|
12
|
+
* upload session's error prefix, and the log line's `event`, so one
|
|
13
|
+
* attachment's lifeline greps back to the tool that sent it.
|
|
14
|
+
*/
|
|
15
|
+
import { postGraph } from "./graph-client.js";
|
|
16
|
+
import { AttachmentRefusedError, resolveOutboundAttachments, toInlineAttachment, } from "./outbound-attachments.js";
|
|
17
|
+
import { uploadAttachmentSession } from "./upload-session.js";
|
|
18
|
+
import { log } from "./log.js";
|
|
19
|
+
/**
|
|
20
|
+
* Validate agent-supplied paths, emitting the `op: "refuse"` line for a per-path
|
|
21
|
+
* refusal before rethrowing.
|
|
22
|
+
*
|
|
23
|
+
* Throwing here — before any postGraph — IS the orphan-draft guard: the absence
|
|
24
|
+
* of a following `op: "attach"` for that call proves it held. Account-context
|
|
25
|
+
* failures are not per-path refusals and pass through unlogged: they name no
|
|
26
|
+
* file, so a refuse line for them would carry an empty `name`.
|
|
27
|
+
*/
|
|
28
|
+
export function resolveAttachmentsOrRefuse(accountId, paths, tool) {
|
|
29
|
+
try {
|
|
30
|
+
return resolveOutboundAttachments(accountId, paths);
|
|
31
|
+
}
|
|
32
|
+
catch (err) {
|
|
33
|
+
if (err instanceof AttachmentRefusedError) {
|
|
34
|
+
const fields = {
|
|
35
|
+
event: tool,
|
|
36
|
+
op: "refuse",
|
|
37
|
+
reason: err.reason,
|
|
38
|
+
name: err.file,
|
|
39
|
+
};
|
|
40
|
+
// Omitted rather than rendered `bytes=null` when the refusal carries no
|
|
41
|
+
// size (a bad path has none to report).
|
|
42
|
+
if (err.bytes !== undefined)
|
|
43
|
+
fields.bytes = err.bytes;
|
|
44
|
+
if (err.cap !== undefined)
|
|
45
|
+
fields.cap = err.cap;
|
|
46
|
+
log(fields);
|
|
47
|
+
}
|
|
48
|
+
throw err;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Attach each resolved file to an existing draft. The draft must already exist
|
|
53
|
+
* and every file must already have passed `resolveOutboundAttachments`. A file
|
|
54
|
+
* at or under the inline limit is added as one base64 fileAttachment POST; a
|
|
55
|
+
* larger file (to the 25 MB cap) streams through a Graph upload session.
|
|
56
|
+
*
|
|
57
|
+
* The `op: "attach"` line is emitted AFTER the POST or session returns, never
|
|
58
|
+
* before, so a logged attach means an attach that landed.
|
|
59
|
+
*/
|
|
60
|
+
export async function attachFilesToDraft(config, draftId, files, tool) {
|
|
61
|
+
for (const f of files) {
|
|
62
|
+
let chunks = 0;
|
|
63
|
+
if (f.mode === "session") {
|
|
64
|
+
chunks = await uploadAttachmentSession(config, draftId, f, tool);
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
await postGraph(config, `/me/messages/${encodeURIComponent(draftId)}/attachments`, toInlineAttachment(f), { tool });
|
|
68
|
+
}
|
|
69
|
+
log({
|
|
70
|
+
event: tool,
|
|
71
|
+
op: "attach",
|
|
72
|
+
id: f.name,
|
|
73
|
+
bytes: f.size,
|
|
74
|
+
path: f.mode,
|
|
75
|
+
chunks,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=attach.js.map
|
|
@@ -0,0 +1 @@
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I,MAAM,GAAG,CAAC,CAAC;QACf,IAAI,CAAC,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YACzB,MAAM,GAAG,MAAM,uBAAuB,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;QACnE,CAAC;aAAM,CAAC;YACN,MAAM,SAAS,CACb,MAAM,EACN,gBAAgB,kBAAkB,CAAC,OAAO,CAAC,cAAc,EACzD,kBAAkB,CAAC,CAAC,CAAC,EACrB,EAAE,IAAI,EAAE,CACT,CAAC;QACJ,CAAC;QACD,GAAG,CAAC;YACF,KAAK,EAAE,IAAI;YACX,EAAE,EAAE,QAAQ;YACZ,EAAE,EAAE,CAAC,CAAC,IAAI;YACV,KAAK,EAAE,CAAC,CAAC,IAAI;YACb,IAAI,EAAE,CAAC,CAAC,IAAI;YACZ,MAAM;SACP,CAAC,CAAC;IACL,CAAC;AACH,CAAC"}
|
|
@@ -17,6 +17,20 @@ export interface GraphClientConfig {
|
|
|
17
17
|
accountId: string;
|
|
18
18
|
tokenStore: TokenStore;
|
|
19
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* Options shared by every Graph call helper.
|
|
22
|
+
*
|
|
23
|
+
* `tool` names the caller, and drives the scope-insufficient and rate-limit
|
|
24
|
+
* messages. `target` is the specific resource path an id-addressed call acts on:
|
|
25
|
+
* without it a `graph-error` records that *something* 404'd but not *what*,
|
|
26
|
+
* which is why identifying the dead draft in Task 1688 required the session
|
|
27
|
+
* JSONL rather than the log. Collection queries address no single item and
|
|
28
|
+
* correctly leave it unset.
|
|
29
|
+
*/
|
|
30
|
+
export interface GraphCallOpts {
|
|
31
|
+
tool: string;
|
|
32
|
+
target?: string;
|
|
33
|
+
}
|
|
20
34
|
export type GraphErrorClass = {
|
|
21
35
|
kind: "auth";
|
|
22
36
|
statusCode: number;
|
|
@@ -46,6 +60,29 @@ export type GraphErrorClass = {
|
|
|
46
60
|
code: string;
|
|
47
61
|
};
|
|
48
62
|
export declare function classifyGraphError(err: unknown): GraphErrorClass;
|
|
63
|
+
/**
|
|
64
|
+
* Opt into Graph immutable item ids.
|
|
65
|
+
*
|
|
66
|
+
* Outlook item ids are NOT stable: Graph rotates an item's id when the item is
|
|
67
|
+
* moved or re-saved — including by the operator's own mail client. That is what
|
|
68
|
+
* killed a live draft handle in Task 1688: our PATCH returned 200, and four
|
|
69
|
+
* minutes later the same id returned 404 ErrorItemNotFound, so the agent
|
|
70
|
+
* concluded the draft had vanished and rebuilt it. An immutable id survives that
|
|
71
|
+
* event; a regular id does not.
|
|
72
|
+
*
|
|
73
|
+
* This rides on the one client factory because it is plugin-wide by necessity,
|
|
74
|
+
* not preference: the immutable and default namespaces carry DIFFERENT values
|
|
75
|
+
* for the same item, so a per-tool opt-in would have one tool emitting ids that
|
|
76
|
+
* another cannot address. Never set this per-tool.
|
|
77
|
+
*
|
|
78
|
+
* TRAP for whoever adds the next header: `Prefer` is also how Graph carries
|
|
79
|
+
* `outlook.timezone` and `odata.maxpagesize`. A per-request
|
|
80
|
+
* `.header("Prefer", ...)` REPLACES this one for that call, silently dropping
|
|
81
|
+
* that tool back to regular ids — the mixed-namespace break, invisible until an
|
|
82
|
+
* id passed between tools 404s. `Prefer` is a comma-separated multi-value
|
|
83
|
+
* header: append to this value, never set `Prefer` on its own.
|
|
84
|
+
*/
|
|
85
|
+
export declare const IMMUTABLE_ID_PREFER = "IdType=\"ImmutableId\"";
|
|
49
86
|
/**
|
|
50
87
|
* Factory wrapping `Client.init`. Exported as a named function so tests can
|
|
51
88
|
* `vi.spyOn(graphClient, "createGraphClient")` reliably (avoids the
|
|
@@ -66,9 +103,7 @@ export declare function getOrRefreshAccessToken(config: GraphClientConfig, force
|
|
|
66
103
|
* retry once), and respect for 429 Retry-After. All terminal classes throw
|
|
67
104
|
* with operator-readable messages.
|
|
68
105
|
*/
|
|
69
|
-
export declare function callGraph<T>(config: GraphClientConfig, invoke: (client: Client) => Promise<T>, opts?:
|
|
70
|
-
tool: string;
|
|
71
|
-
}): Promise<T>;
|
|
106
|
+
export declare function callGraph<T>(config: GraphClientConfig, invoke: (client: Client) => Promise<T>, opts?: GraphCallOpts): Promise<T>;
|
|
72
107
|
/** A single page of a Graph collection: the items plus the opaque continuation. */
|
|
73
108
|
export interface GraphPage<T> {
|
|
74
109
|
value: T[];
|
|
@@ -85,27 +120,19 @@ export interface GraphPage<T> {
|
|
|
85
120
|
*/
|
|
86
121
|
export declare function callGraphPaged<T>(config: GraphClientConfig, buildRequest: (client: Client) => {
|
|
87
122
|
get(): Promise<unknown>;
|
|
88
|
-
}, opts?:
|
|
89
|
-
tool: string;
|
|
90
|
-
}): Promise<GraphPage<T>>;
|
|
123
|
+
}, opts?: GraphCallOpts): Promise<GraphPage<T>>;
|
|
91
124
|
/** POST to Graph. See `writeGraph`. */
|
|
92
|
-
export declare function postGraph(config: GraphClientConfig, path: string, body: object | undefined, opts?: {
|
|
93
|
-
tool: string;
|
|
94
|
-
}): Promise<{
|
|
125
|
+
export declare function postGraph(config: GraphClientConfig, path: string, body: object | undefined, opts?: GraphCallOpts): Promise<{
|
|
95
126
|
status: number;
|
|
96
127
|
json: unknown | null;
|
|
97
128
|
}>;
|
|
98
129
|
/** PATCH to Graph. See `writeGraph`. */
|
|
99
|
-
export declare function patchGraph(config: GraphClientConfig, path: string, body: object | undefined, opts?: {
|
|
100
|
-
tool: string;
|
|
101
|
-
}): Promise<{
|
|
130
|
+
export declare function patchGraph(config: GraphClientConfig, path: string, body: object | undefined, opts?: GraphCallOpts): Promise<{
|
|
102
131
|
status: number;
|
|
103
132
|
json: unknown | null;
|
|
104
133
|
}>;
|
|
105
134
|
/** DELETE to Graph. See `writeGraph`. */
|
|
106
|
-
export declare function deleteGraph(config: GraphClientConfig, path: string, opts?: {
|
|
107
|
-
tool: string;
|
|
108
|
-
}): Promise<{
|
|
135
|
+
export declare function deleteGraph(config: GraphClientConfig, path: string, opts?: GraphCallOpts): Promise<{
|
|
109
136
|
status: number;
|
|
110
137
|
json: unkn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E,OAAO,GAAG,IAAI,CAAA;CAAE,CAAC,CAEnD;AAED,wCAAwC;AACxC,wBAAsB,UAAU,CAC9B,MAAM,EAAE,iBAAiB,EACzB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,IAAI,GAAE,aAAiC,GACtC,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAA;CAAE,CAAC,CAEnD;AAED,yCAAyC;AACzC,wBAAsB,WAAW,CAC/B,MAAM,EAAE,iBAAiB,EACzB,IAAI,EAAE,MAAM,EACZ,IAAI,GAAE,aAAiC,GACtC,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAA;CAAE,CAAC,CAEnD"}
|
|
@@ -78,6 +78,29 @@ export function classifyGraphError(err) {
|
|
|
78
78
|
}
|
|
79
79
|
return { kind: "other", statusCode, code: code || "Unknown" };
|
|
80
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
* Opt into Graph immutable item ids.
|
|
83
|
+
*
|
|
84
|
+
* Outlook item ids are NOT stable: Graph rotates an item's id when the item is
|
|
85
|
+
* moved or re-saved — including by the operator's own mail client. That is what
|
|
86
|
+
* killed a live draft handle in Task 1688: our PATCH returned 200, and four
|
|
87
|
+
* minutes later the same id returned 404 ErrorItemNotFound, so the agent
|
|
88
|
+
* concluded the draft had vanished and rebuilt it. An immutable id survives that
|
|
89
|
+
* event; a regular id does not.
|
|
90
|
+
*
|
|
91
|
+
* This rides on the one client factory because it is plugin-wide by necessity,
|
|
92
|
+
* not preference: the immutable and default namespaces carry DIFFERENT values
|
|
93
|
+
* for the same item, so a per-tool opt-in would have one tool emitting ids that
|
|
94
|
+
* another cannot address. Never set this per-tool.
|
|
95
|
+
*
|
|
96
|
+
* TRAP for whoever adds the next header: `Prefer` is also how Graph carries
|
|
97
|
+
* `outlook.timezone` and `odata.maxpagesize`. A per-request
|
|
98
|
+
* `.header("Prefer", ...)` REPLACES this one for that call, silently dropping
|
|
99
|
+
* that tool back to regular ids — the mixed-namespace break, invisible until an
|
|
100
|
+
* id passed between tools 404s. `Prefer` is a comma-separated multi-value
|
|
101
|
+
* header: append to this value, never set `Prefer` on its own.
|
|
102
|
+
*/
|
|
103
|
+
export const IMMUTABLE_ID_PREFER = 'IdType="ImmutableId"';
|
|
81
104
|
/**
|
|
82
105
|
* Factory wrapping `Client.init`. Exported as a named function so tests can
|
|
83
106
|
* `vi.spyOn(graphClient, "createGraphClient")` reliably (avoids the
|
|
@@ -85,6 +108,10 @@ export function classifyGraphError(err) {
|
|
|
85
108
|
*/
|
|
86
109
|
export function createGraphClient(config) {
|
|
87
110
|
return Client.init({
|
|
111
|
+
// Applies to every request, and is merged with — not displaced by — a
|
|
112
|
+
// per-request `.header()` (mail-search's ConsistencyLevel). Both properties
|
|
113
|
+
// are asserted in graph-client.test.ts and were verified against live Graph.
|
|
114
|
+
fetchOptions: { headers: { Prefer: IMMUTABLE_ID_PREFER } },
|
|
88
115
|
authProvider: async (done) => {
|
|
89
116
|
try {
|
|
90
117
|
const token = await getOrRefreshAccessToken(config);
|
|
@@ -163,6 +190,7 @@ export async function callGraph(config, invoke, opts = { tool: "graph" }) {
|
|
|
163
190
|
account: config.accountId,
|
|
164
191
|
status: cls.statusCode,
|
|
165
192
|
code: "code" in cls ? cls.code : "",
|
|
193
|
+
target: opts.target ?? "",
|
|
166
194
|
retryAfterMs: cls.kind === "rate-limit-recoverable" ? cls.retryAfterMs : null,
|
|
167
195
|
});
|
|
168
196
|
if (cls.kind === "on-prem") {
|
|
@@ -275,7 +303,10 @@ async function writeGraph(config, method, path, body, opts) {
|
|
|
275
303
|
json = await raw.json().catch(() => null);
|
|
276
304
|
}
|
|
277
305
|
return { status: raw.status, json };
|
|
278
|
-
},
|
|
306
|
+
},
|
|
307
|
+
// Every write already knows its path, so a failing write names its target
|
|
308
|
+
// without the caller threading one through.
|
|
309
|
+
{ tool: opts.tool, target: opts.target ?? path });
|
|
279
310
|
}
|
|
280
311
|
/** POST to Graph. See `writeGraph`. */
|
|
281
312
|
export async function postGraph(config, path, body, opts = { tool: "graph" }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph-client.js","sourceRoot":"","sources":["../../src/lib/graph-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"graph-client.js","sourceRoot":"","sources":["../../src/lib/graph-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAwC/B,0EAA0E;AAC1E,SAAS,mBAAmB,CAAC,GAAY;IACvC,MAAM,CAAC,GAAG,GAOT,CAAC;IAEF,MAAM,UAAU,GAAG,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC;IAEjD,IAAI,IAAI,GAAG,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC;IACxB,IAAI,CAAC,IAAI,IAAI,OAAO,CAAC,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QACxC,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAkC,CAAC;YACnE,IAAI,GAAG,MAAM,CAAC,KAAK,EAAE,IAAI,IAAI,EAAE,CAAC;QAClC,CAAC;QAAC,MAAM,CAAC;YACP,qCAAqC;QACvC,CAAC;IACH,CAAC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AG,EAAE,CAAC,IAAI,CAAC,CAAC;QAC5C,CAAC;QACD,OAAO,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC;IACtC,CAAC;IACD,0EAA0E;IAC1E,4CAA4C;IAC5C,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,IAAI,EAAE,CACjD,CAAC;AACJ,CAAC;AAED,uCAAuC;AACvC,MAAM,CAAC,KAAK,UAAU,SAAS,CAC7B,MAAyB,EACzB,IAAY,EACZ,IAAwB,EACxB,OAAsB,EAAE,IAAI,EAAE,OAAO,EAAE;IAEvC,OAAO,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AACtD,CAAC;AAED,wCAAwC;AACxC,MAAM,CAAC,KAAK,UAAU,UAAU,CAC9B,MAAyB,EACzB,IAAY,EACZ,IAAwB,EACxB,OAAsB,EAAE,IAAI,EAAE,OAAO,EAAE;IAEvC,OAAO,UAAU,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AACvD,CAAC;AAED,yCAAyC;AACzC,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,MAAyB,EACzB,IAAY,EACZ,OAAsB,EAAE,IAAI,EAAE,OAAO,EAAE;IAEvC,OAAO,UAAU,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;AAC7D,CAAC"}
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
* Build a Microsoft Graph message resource from the tool input shape shared by
|
|
3
3
|
* outlook-mail-send and outlook-draft. Graph stores one body with a single
|
|
4
4
|
* contentType, so `isHtml` chooses HTML vs Text for the whole message.
|
|
5
|
+
*
|
|
6
|
+
* `MessageInput` is the TOOL INPUT shape, not the Graph message shape —
|
|
7
|
+
* `GraphMessage` below is the latter. That is why `attachments` lives here but
|
|
8
|
+
* never reaches `buildMessage`'s output.
|
|
5
9
|
*/
|
|
6
10
|
export interface MessageInput {
|
|
7
11
|
to: string[];
|
|
@@ -10,6 +14,10 @@ export interface MessageInput {
|
|
|
10
14
|
subject: string;
|
|
11
15
|
body: string;
|
|
12
16
|
isHtml?: boolean;
|
|
17
|
+
/** Absolute paths inside the account directory. Attachments are separate Graph
|
|
18
|
+
* POSTs against the created draft, NOT part of the message resource, so
|
|
19
|
+
* `buildMessage` deliberately ignores this field. */
|
|
20
|
+
attachments?: string[];
|
|
13
21
|
}
|
|
14
22
|
interface Recipient {
|
|
15
23
|
emailAddress: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../src/lib/message.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../src/lib/message.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,EAAE,CAAC;IACb,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;0DAEsD;IACtD,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,UAAU,SAAS;IACjB,YAAY,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CACnC;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE;QAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IACxD,YAAY,EAAE,SAAS,EAAE,CAAC;IAC1B,YAAY,CAAC,EAAE,SAAS,EAAE,CAAC;IAC3B,aAAa,CAAC,EAAE,SAAS,EAAE,CAAC;CAC7B;AASD,wBAAgB,YAAY,CAAC,KAAK,EAAE,YAAY,GAAG,YAAY,CAe9D"}
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
* Build a Microsoft Graph message resource from the tool input shape shared by
|
|
3
3
|
* outlook-mail-send and outlook-draft. Graph stores one body with a single
|
|
4
4
|
* contentType, so `isHtml` chooses HTML vs Text for the whole message.
|
|
5
|
+
*
|
|
6
|
+
* `MessageInput` is the TOOL INPUT shape, not the Graph message shape —
|
|
7
|
+
* `GraphMessage` below is the latter. That is why `attachments` lives here but
|
|
8
|
+
* never reaches `buildMessage`'s output.
|
|
5
9
|
*/
|
|
6
10
|
function toRecipients(addrs) {
|
|
7
11
|
return (addrs ?? [])
|
|
@@ -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;;;;;;;;GAQG;AA2BH,SAAS,YAAY,CAAC,KAA2B;IAC/C,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC;SACjB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;SACpB,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;SAC3B,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,EAAE,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AACvD,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,KAAmB;IAC9C,MAAM,EAAE,GAAG,YAAY,CAAC,KAAK,CAAC,EAAE,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,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAClC,MAAM,GAAG,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG,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"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Outbound attachment resolver
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
2
|
+
* Outbound attachment resolver, shared by every tool that can send a file:
|
|
3
|
+
* outlook-mail-reply, outlook-mail-send, outlook-draft, and outlook-draft-edit.
|
|
4
|
+
* Mirrors the email plugin's account-scope check (realpath under the account
|
|
5
|
+
* directory, regular file, size cap), then classifies each file by how it must
|
|
6
|
+
* reach the draft:
|
|
6
7
|
*
|
|
7
8
|
* - `inline` — at or under Graph's ~3 MB fileAttachment limit; sent as a
|
|
8
9
|
* single base64 `POST /messages/{id}/attachments`.
|
|
@@ -10,12 +11,16 @@
|
|
|
10
11
|
* through a Graph upload session (see `upload-session.ts`).
|
|
11
12
|
*
|
|
12
13
|
* The account cap (25 MB) matches the email plugin's outbound cap, so an
|
|
13
|
-
* Outlook
|
|
14
|
+
* Outlook message and the equivalent IMAP message carry the same maximum.
|
|
14
15
|
*
|
|
15
16
|
* Resolution reads no bytes — it returns per-file metadata (path, size, mode)
|
|
16
|
-
* so
|
|
17
|
-
*
|
|
18
|
-
*
|
|
17
|
+
* so the caller can choose the path. Path validation happens before any Graph
|
|
18
|
+
* write, so a bad path leaves no orphan draft; bytes are read at send time by
|
|
19
|
+
* `toInlineAttachment` (inline) or the upload session (session).
|
|
20
|
+
*
|
|
21
|
+
* This module stays pure node:fs on purpose — the Graph-side attach loop lives
|
|
22
|
+
* in `attach.ts` so this boundary carries no client, no network, and no I/O
|
|
23
|
+
* beyond the filesystem.
|
|
19
24
|
*/
|
|
20
25
|
/** Graph fileAttachment inline limit for POST /messages/{id}/attachments. */
|
|
21
26
|
export declare const OUTLOOK_ATTACHMENT_INLINE_MAX_BYTES: number;
|
|
@@ -27,6 +32,24 @@ export interface GraphFileAttachment {
|
|
|
27
32
|
contentType: string;
|
|
28
33
|
contentBytes: string;
|
|
29
34
|
}
|
|
35
|
+
/** Why a single path was refused. Carried as a field so callers classify a
|
|
36
|
+
* refusal on a field, never by parsing its message. */
|
|
37
|
+
export type RefusalReason = "bad-path" | "oversize";
|
|
38
|
+
/**
|
|
39
|
+
* A per-path refusal, raised before any Graph write. Carries the fields the
|
|
40
|
+
* `op: "refuse"` log line names.
|
|
41
|
+
*
|
|
42
|
+
* Account-context failures (ACCOUNT_DIR unset, account directory unreadable)
|
|
43
|
+
* are NOT refusals: they name no file and no per-file cause, so they stay plain
|
|
44
|
+
* Errors and emit no refuse line.
|
|
45
|
+
*/
|
|
46
|
+
export declare class AttachmentRefusedError extends Error {
|
|
47
|
+
readonly reason: RefusalReason;
|
|
48
|
+
readonly file: string;
|
|
49
|
+
readonly bytes?: number | undefined;
|
|
50
|
+
readonly cap?: number | undefined;
|
|
51
|
+
constructor(message: string, reason: RefusalReason, file: string, bytes?: number | undefined, cap?: number | undefined);
|
|
52
|
+
}
|
|
30
53
|
/** A validated, account-scoped file and the Graph path it must take. */
|
|
31
54
|
export interface OutboundAttachment {
|
|
32
55
|
/** realpath, verified under the account directory. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outbound-attachments.d.ts","sourceRoot":"","sources":["../../src/lib/outbound-attachments.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"outbound-attachments.d.ts","sourceRoot":"","sources":["../../src/lib/outbound-attachments.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAKH,6EAA6E;AAC7E,eAAO,MAAM,mCAAmC,QAAkB,CAAC;AACnE,yEAAyE;AACzE,eAAO,MAAM,4BAA4B,QAAmB,CAAC;AAE7D,MAAM,WAAW,mBAAmB;IAClC,aAAa,EAAE,iCAAiC,CAAC;IACjD,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;wDACwD;AACxD,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,UAAU,CAAC;AAEpD;;;;;;;GAOG;AACH,qBAAa,sBAAuB,SAAQ,KAAK;IAG7C,QAAQ,CAAC,MAAM,EAAE,aAAa;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM;IACrB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM;IACvB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM;gBAJrB,OAAO,EAAE,MAAM,EACN,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE,MAAM,EACZ,KAAK,CAAC,EAAE,MAAM,YAAA,EACd,GAAG,CAAC,EAAE,MAAM,YAAA;CAKxB;AAED,wEAAwE;AACxE,MAAM,WAAW,kBAAkB;IACjC,sDAAsD;IACtD,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,QAAQ,GAAG,SAAS,CAAC;CAC5B;AAqBD;wEACwE;AACxE,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAQlE;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,EAAE,GAAG,SAAS,GAC1B,kBAAkB,EAAE,CA4DtB;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,kBAAkB,GAAG,mBAAmB,CAO/E;AAED,4EAA4E;AAC5E,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAGlD"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Outbound attachment resolver
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
2
|
+
* Outbound attachment resolver, shared by every tool that can send a file:
|
|
3
|
+
* outlook-mail-reply, outlook-mail-send, outlook-draft, and outlook-draft-edit.
|
|
4
|
+
* Mirrors the email plugin's account-scope check (realpath under the account
|
|
5
|
+
* directory, regular file, size cap), then classifies each file by how it must
|
|
6
|
+
* reach the draft:
|
|
6
7
|
*
|
|
7
8
|
* - `inline` — at or under Graph's ~3 MB fileAttachment limit; sent as a
|
|
8
9
|
* single base64 `POST /messages/{id}/attachments`.
|
|
@@ -10,12 +11,16 @@
|
|
|
10
11
|
* through a Graph upload session (see `upload-session.ts`).
|
|
11
12
|
*
|
|
12
13
|
* The account cap (25 MB) matches the email plugin's outbound cap, so an
|
|
13
|
-
* Outlook
|
|
14
|
+
* Outlook message and the equivalent IMAP message carry the same maximum.
|
|
14
15
|
*
|
|
15
16
|
* Resolution reads no bytes — it returns per-file metadata (path, size, mode)
|
|
16
|
-
* so
|
|
17
|
-
*
|
|
18
|
-
*
|
|
17
|
+
* so the caller can choose the path. Path validation happens before any Graph
|
|
18
|
+
* write, so a bad path leaves no orphan draft; bytes are read at send time by
|
|
19
|
+
* `toInlineAttachment` (inline) or the upload session (session).
|
|
20
|
+
*
|
|
21
|
+
* This module stays pure node:fs on purpose — the Graph-side attach loop lives
|
|
22
|
+
* in `attach.ts` so this boundary carries no client, no network, and no I/O
|
|
23
|
+
* beyond the filesystem.
|
|
19
24
|
*/
|
|
20
25
|
import { readFileSync, realpathSync, statSync } from "node:fs";
|
|
21
26
|
import { basename, extname, join } from "node:path";
|
|
@@ -23,6 +28,28 @@ import { basename, extname, join } from "node:path";
|
|
|
23
28
|
export const OUTLOOK_ATTACHMENT_INLINE_MAX_BYTES = 3 * 1024 * 1024;
|
|
24
29
|
/** Per-file account cap; parity with the email plugin's outbound cap. */
|
|
25
30
|
export const OUTLOOK_ATTACHMENT_MAX_BYTES = 25 * 1024 * 1024;
|
|
31
|
+
/**
|
|
32
|
+
* A per-path refusal, raised before any Graph write. Carries the fields the
|
|
33
|
+
* `op: "refuse"` log line names.
|
|
34
|
+
*
|
|
35
|
+
* Account-context failures (ACCOUNT_DIR unset, account directory unreadable)
|
|
36
|
+
* are NOT refusals: they name no file and no per-file cause, so they stay plain
|
|
37
|
+
* Errors and emit no refuse line.
|
|
38
|
+
*/
|
|
39
|
+
export class AttachmentRefusedError extends Error {
|
|
40
|
+
reason;
|
|
41
|
+
file;
|
|
42
|
+
bytes;
|
|
43
|
+
cap;
|
|
44
|
+
constructor(message, reason, file, bytes, cap) {
|
|
45
|
+
super(message);
|
|
46
|
+
this.reason = reason;
|
|
47
|
+
this.file = file;
|
|
48
|
+
this.bytes = bytes;
|
|
49
|
+
this.cap = cap;
|
|
50
|
+
this.name = "AttachmentRefusedError";
|
|
51
|
+
}
|
|
52
|
+
}
|
|
26
53
|
const MIME = {
|
|
27
54
|
".pdf": "application/pdf",
|
|
28
55
|
".png": "image/png",
|
|
@@ -81,19 +108,19 @@ export function resolveOutboundAttachments(accountId, paths) {
|
|
|
81
108
|
}
|
|
82
109
|
catch (err) {
|
|
83
110
|
if (err.code === "ENOENT") {
|
|
84
|
-
throw new
|
|
111
|
+
throw new AttachmentRefusedError(`Attachment not found: ${p}`, "bad-path", basename(p));
|
|
85
112
|
}
|
|
86
|
-
throw new
|
|
113
|
+
throw new AttachmentRefusedError(`Cannot read attachment ${p}: ${err instanceof Error ? err.message : String(err)}`, "bad-path", basename(p));
|
|
87
114
|
}
|
|
88
115
|
if (!rp.startsWith(accountResolved + "/")) {
|
|
89
|
-
throw new
|
|
116
|
+
throw new AttachmentRefusedError(`Attachment ${p} is outside the account directory and cannot be sent.`, "bad-path", basename(rp));
|
|
90
117
|
}
|
|
91
118
|
const st = statSync(rp);
|
|
92
119
|
if (!st.isFile()) {
|
|
93
|
-
throw new
|
|
120
|
+
throw new AttachmentRefusedError(`Attachment ${p} is not a regular file.`, "bad-path", basename(rp));
|
|
94
121
|
}
|
|
95
122
|
if (st.size > OUTLOOK_ATTACHMENT_MAX_BYTES) {
|
|
96
|
-
throw new
|
|
123
|
+
throw new AttachmentRefusedError(`Attachment ${basename(rp)} is ${(st.size / 1024 / 1024).toFixed(1)} MB; Outlook reply attachments are capped at 25 MB per file.`, "oversize", basename(rp), st.size, OUTLOOK_ATTACHMENT_MAX_BYTES);
|
|
97
124
|
}
|
|
98
125
|
out.push({
|
|
99
126
|
path: rp,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outbound-attachments.js","sourceRoot":"","sources":["../../src/lib/outbound-attachments.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"outbound-attachments.js","sourceRoot":"","sources":["../../src/lib/outbound-attachments.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEpD,6EAA6E;AAC7E,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC;AACnE,yEAAyE;AACzE,M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AC,CAAC;IACL,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,GAAuB;IACxD,OAAO;QACL,aAAa,EAAE,iCAAiC;QAChD,IAAI,EAAE,GAAG,CAAC,IAAI;QACd,WAAW,EAAE,GAAG,CAAC,WAAW;QAC5B,YAAY,EAAE,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC;KACxD,CAAC;AACJ,CAAC;AAED,4EAA4E;AAC5E,MAAM,UAAU,UAAU,CAAC,KAAe;IACxC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAClC,OAAO,SAAS,KAAK,CAAC,MAAM,mBAAmB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;AACpE,CAAC"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Graph upload-session path for
|
|
2
|
+
* Graph upload-session path for outbound attachments above the inline limit.
|
|
3
|
+
* Shared by every tool that attaches a file; `tool` names the caller for the
|
|
4
|
+
* Graph call tag and the error prefixes, so a stalled session is greppable back
|
|
5
|
+
* to the tool that started it.
|
|
3
6
|
*
|
|
4
7
|
* Two steps, distinct in auth and host:
|
|
5
8
|
* 1. `POST /me/messages/{draftId}/attachments/createUploadSession` — through
|
|
@@ -20,9 +23,10 @@ import type { OutboundAttachment } from "./outbound-attachments.js";
|
|
|
20
23
|
* Graph requires for every chunk except the final remainder. */
|
|
21
24
|
export declare const UPLOAD_CHUNK_BYTES: number;
|
|
22
25
|
/**
|
|
23
|
-
* Upload one large attachment to an existing
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
+
* Upload one large attachment to an existing draft via a Graph upload session.
|
|
27
|
+
* Returns the number of chunks PUT (for observability). The draft must already
|
|
28
|
+
* exist; the attachment must have passed `resolveOutboundAttachments`. `tool`
|
|
29
|
+
* names the calling tool for the Graph call tag and the error prefixes.
|
|
26
30
|
*/
|
|
27
|
-
export declare function uploadAttachmentSession(config: GraphClientConfig, draftId: string, att: OutboundAttachment): Promise<number>;
|
|
31
|
+
export declare function uploadAttachmentSession(config: GraphClientConfig, draftId: string, att: OutboundAttachment, tool: string): Promise<number>;
|
|
28
32
|
//# sourceMappingURL=upload-session.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload-session.d.ts","sourceRoot":"","sources":["../../src/lib/upload-session.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"upload-session.d.ts","sourceRoot":"","sources":["../../src/lib/upload-session.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAEpE;iEACiE;AACjE,eAAO,MAAM,kBAAkB,QAAkB,CAAC;AAMlD;;;;;GAKG;AACH,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,kBAAkB,EACvB,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,CAAC,CAoCjB"}
|