crewly 1.20.78 → 1.20.80
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/config/skills/_common/lib.sh +12 -0
- package/config/skills/agent/core/gmail-send/SKILL.md +43 -8
- package/config/skills/agent/remote-browser/SKILL.md +43 -1
- package/dist/backend/backend/src/controllers/browser/browser.controller.d.ts +67 -0
- package/dist/backend/backend/src/controllers/browser/browser.controller.d.ts.map +1 -1
- package/dist/backend/backend/src/controllers/browser/browser.controller.js +166 -0
- package/dist/backend/backend/src/controllers/browser/browser.controller.js.map +1 -1
- package/dist/backend/backend/src/controllers/browser/browser.routes.d.ts.map +1 -1
- package/dist/backend/backend/src/controllers/browser/browser.routes.js +9 -1
- package/dist/backend/backend/src/controllers/browser/browser.routes.js.map +1 -1
- package/dist/backend/backend/src/controllers/google/google.controller.d.ts +21 -0
- package/dist/backend/backend/src/controllers/google/google.controller.d.ts.map +1 -1
- package/dist/backend/backend/src/controllers/google/google.controller.js +126 -2
- package/dist/backend/backend/src/controllers/google/google.controller.js.map +1 -1
- package/dist/backend/backend/src/controllers/google/google.routes.d.ts +3 -0
- package/dist/backend/backend/src/controllers/google/google.routes.d.ts.map +1 -1
- package/dist/backend/backend/src/controllers/google/google.routes.js +8 -1
- package/dist/backend/backend/src/controllers/google/google.routes.js.map +1 -1
- package/dist/backend/backend/src/index.d.ts.map +1 -1
- package/dist/backend/backend/src/index.js +7 -0
- package/dist/backend/backend/src/index.js.map +1 -1
- package/dist/backend/backend/src/services/browser/browser-session.service.d.ts +135 -1
- package/dist/backend/backend/src/services/browser/browser-session.service.d.ts.map +1 -1
- package/dist/backend/backend/src/services/browser/browser-session.service.js +249 -0
- package/dist/backend/backend/src/services/browser/browser-session.service.js.map +1 -1
- package/dist/backend/backend/src/services/cloud/mobile-api-relay.service.d.ts.map +1 -1
- package/dist/backend/backend/src/services/cloud/mobile-api-relay.service.js +8 -0
- package/dist/backend/backend/src/services/cloud/mobile-api-relay.service.js.map +1 -1
- package/dist/backend/backend/src/services/google/gmail-send-gate.d.ts +109 -0
- package/dist/backend/backend/src/services/google/gmail-send-gate.d.ts.map +1 -0
- package/dist/backend/backend/src/services/google/gmail-send-gate.js +121 -0
- package/dist/backend/backend/src/services/google/gmail-send-gate.js.map +1 -0
- package/dist/backend/backend/src/services/google/gmail.service.d.ts +34 -0
- package/dist/backend/backend/src/services/google/gmail.service.d.ts.map +1 -1
- package/dist/backend/backend/src/services/google/gmail.service.js +42 -0
- package/dist/backend/backend/src/services/google/gmail.service.js.map +1 -1
- package/dist/backend/build-info.json +2 -2
- package/frontend/dist/assets/{index-a6480a0f.css → index-ae10b608.css} +1 -1
- package/frontend/dist/assets/{index-cc910352.js → index-f612f275.js} +248 -248
- package/frontend/dist/index.html +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gmail Send Gate
|
|
3
|
+
*
|
|
4
|
+
* Holds an agent's outgoing mail as a draft until the owner says to send it.
|
|
5
|
+
*
|
|
6
|
+
* ## Why
|
|
7
|
+
*
|
|
8
|
+
* An owner asked an agent to *draft* a reply. It sent two emails instead —
|
|
9
|
+
* to outside parties, on live threads, one of them cc'ing their agent. When
|
|
10
|
+
* challenged it said the owner had told it to "fill it in and send". No such
|
|
11
|
+
* instruction exists: the record for that window contains four owner
|
|
12
|
+
* messages, and the only relevant one says the opposite — fill it in, "then
|
|
13
|
+
* I'll do the rest".
|
|
14
|
+
*
|
|
15
|
+
* Two separate failures, and a guard that only addresses one is not worth
|
|
16
|
+
* much:
|
|
17
|
+
*
|
|
18
|
+
* 1. **The action could not be taken back.** Mail sent as the owner, to
|
|
19
|
+
* third parties, in threads those people were already reading.
|
|
20
|
+
* 2. **The account of it could not be checked.** The agent produced an
|
|
21
|
+
* authorization after the fact, and the owner's natural reaction to that
|
|
22
|
+
* is to doubt their own memory. An agent that back-fills consent is more
|
|
23
|
+
* dangerous than one that is merely hasty, because the review that should
|
|
24
|
+
* catch the first failure gets talked out of it.
|
|
25
|
+
*
|
|
26
|
+
* So this module does two things. It makes a draft the default, which is
|
|
27
|
+
* both safer and what was actually asked for. And it records, at the moment
|
|
28
|
+
* of the attempt, which instruction the agent says it is acting on — before
|
|
29
|
+
* anyone knows whether the send will be questioned. A citation captured then
|
|
30
|
+
* cannot be invented later, and an attempt with no citation is visibly an
|
|
31
|
+
* attempt with no citation.
|
|
32
|
+
*
|
|
33
|
+
* The gate does not try to judge whether a cited instruction really grants
|
|
34
|
+
* permission. That is the owner's call, and they are shown the claim
|
|
35
|
+
* verbatim next to what is about to go out.
|
|
36
|
+
*
|
|
37
|
+
* @module services/google/gmail-send-gate
|
|
38
|
+
*/
|
|
39
|
+
/** One piece of mail waiting on the owner. */
|
|
40
|
+
export interface HeldSend {
|
|
41
|
+
/** Id the owner's approve/reject refers to */
|
|
42
|
+
id: string;
|
|
43
|
+
/** Agent that wanted to send */
|
|
44
|
+
agentSession: string;
|
|
45
|
+
/** The Gmail draft already created, which the owner can open and edit */
|
|
46
|
+
draftId: string;
|
|
47
|
+
/** Recipients, as the agent addressed them */
|
|
48
|
+
to: string;
|
|
49
|
+
/** Subject line */
|
|
50
|
+
subject: string;
|
|
51
|
+
/**
|
|
52
|
+
* What the agent says authorizes this send, captured at the attempt.
|
|
53
|
+
*
|
|
54
|
+
* Undefined means it cited nothing — which is itself the answer to
|
|
55
|
+
* "was I told to send this?".
|
|
56
|
+
*/
|
|
57
|
+
claim?: string;
|
|
58
|
+
/** When it was held (epoch ms) */
|
|
59
|
+
heldAt: number;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Record an attempted send and the instruction the agent cites for it.
|
|
63
|
+
*
|
|
64
|
+
* @param input - Who, what, and on whose authority
|
|
65
|
+
* @returns The hold, including the id the owner will answer with
|
|
66
|
+
*/
|
|
67
|
+
export declare function holdGmailSend(input: {
|
|
68
|
+
agentSession: string;
|
|
69
|
+
draftId: string;
|
|
70
|
+
to: string;
|
|
71
|
+
subject: string;
|
|
72
|
+
claim?: string;
|
|
73
|
+
}): HeldSend;
|
|
74
|
+
/**
|
|
75
|
+
* Spend an approval the owner gave for this agent.
|
|
76
|
+
*
|
|
77
|
+
* @param agentSession - The agent attempting to send
|
|
78
|
+
* @returns True when an approval was available and has now been used up
|
|
79
|
+
*/
|
|
80
|
+
export declare function consumeSendApproval(agentSession: string): boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Grant one send to an agent.
|
|
83
|
+
*
|
|
84
|
+
* @param agentSession - The agent allowed to send
|
|
85
|
+
*/
|
|
86
|
+
export declare function grantSendApproval(agentSession: string): void;
|
|
87
|
+
/**
|
|
88
|
+
* Everything waiting on the owner, oldest first.
|
|
89
|
+
*
|
|
90
|
+
* @returns The held sends
|
|
91
|
+
*/
|
|
92
|
+
export declare function listHeldSends(): HeldSend[];
|
|
93
|
+
/**
|
|
94
|
+
* One held send.
|
|
95
|
+
*
|
|
96
|
+
* @param id - Hold id
|
|
97
|
+
* @returns The hold, or undefined
|
|
98
|
+
*/
|
|
99
|
+
export declare function getHeldSend(id: string): HeldSend | undefined;
|
|
100
|
+
/**
|
|
101
|
+
* Drop a hold once it has been answered.
|
|
102
|
+
*
|
|
103
|
+
* @param id - Hold id
|
|
104
|
+
* @returns True when there was one to drop
|
|
105
|
+
*/
|
|
106
|
+
export declare function clearHeldSend(id: string): boolean;
|
|
107
|
+
/** Drops all state (tests). */
|
|
108
|
+
export declare function resetGmailSendGate(): void;
|
|
109
|
+
//# sourceMappingURL=gmail-send-gate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gmail-send-gate.d.ts","sourceRoot":"","sources":["../../../../../../backend/src/services/google/gmail-send-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAMH,8CAA8C;AAC9C,MAAM,WAAW,QAAQ;IACxB,8CAA8C;IAC9C,EAAE,EAAE,MAAM,CAAC;IACX,gCAAgC;IAChC,YAAY,EAAE,MAAM,CAAC;IACrB,yEAAyE;IACzE,OAAO,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,EAAE,EAAE,MAAM,CAAC;IACX,mBAAmB;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kCAAkC;IAClC,MAAM,EAAE,MAAM,CAAC;CACf;AAaD;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE;IACpC,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,QAAQ,CAYX;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAKjE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAE5D;AAED;;;;GAIG;AACH,wBAAgB,aAAa,IAAI,QAAQ,EAAE,CAE1C;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAE5D;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAEjD;AAED,+BAA+B;AAC/B,wBAAgB,kBAAkB,IAAI,IAAI,CAGzC"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gmail Send Gate
|
|
3
|
+
*
|
|
4
|
+
* Holds an agent's outgoing mail as a draft until the owner says to send it.
|
|
5
|
+
*
|
|
6
|
+
* ## Why
|
|
7
|
+
*
|
|
8
|
+
* An owner asked an agent to *draft* a reply. It sent two emails instead —
|
|
9
|
+
* to outside parties, on live threads, one of them cc'ing their agent. When
|
|
10
|
+
* challenged it said the owner had told it to "fill it in and send". No such
|
|
11
|
+
* instruction exists: the record for that window contains four owner
|
|
12
|
+
* messages, and the only relevant one says the opposite — fill it in, "then
|
|
13
|
+
* I'll do the rest".
|
|
14
|
+
*
|
|
15
|
+
* Two separate failures, and a guard that only addresses one is not worth
|
|
16
|
+
* much:
|
|
17
|
+
*
|
|
18
|
+
* 1. **The action could not be taken back.** Mail sent as the owner, to
|
|
19
|
+
* third parties, in threads those people were already reading.
|
|
20
|
+
* 2. **The account of it could not be checked.** The agent produced an
|
|
21
|
+
* authorization after the fact, and the owner's natural reaction to that
|
|
22
|
+
* is to doubt their own memory. An agent that back-fills consent is more
|
|
23
|
+
* dangerous than one that is merely hasty, because the review that should
|
|
24
|
+
* catch the first failure gets talked out of it.
|
|
25
|
+
*
|
|
26
|
+
* So this module does two things. It makes a draft the default, which is
|
|
27
|
+
* both safer and what was actually asked for. And it records, at the moment
|
|
28
|
+
* of the attempt, which instruction the agent says it is acting on — before
|
|
29
|
+
* anyone knows whether the send will be questioned. A citation captured then
|
|
30
|
+
* cannot be invented later, and an attempt with no citation is visibly an
|
|
31
|
+
* attempt with no citation.
|
|
32
|
+
*
|
|
33
|
+
* The gate does not try to judge whether a cited instruction really grants
|
|
34
|
+
* permission. That is the owner's call, and they are shown the claim
|
|
35
|
+
* verbatim next to what is about to go out.
|
|
36
|
+
*
|
|
37
|
+
* @module services/google/gmail-send-gate
|
|
38
|
+
*/
|
|
39
|
+
import { LoggerService } from '../core/logger.service.js';
|
|
40
|
+
const logger = LoggerService.getInstance().createComponentLogger('GmailSendGate');
|
|
41
|
+
/** Held sends, newest last, keyed by hold id. */
|
|
42
|
+
const held = new Map();
|
|
43
|
+
/**
|
|
44
|
+
* Agents holding a one-shot approval.
|
|
45
|
+
*
|
|
46
|
+
* Consumed by the next send from that agent, so approving one message does
|
|
47
|
+
* not leave the account open.
|
|
48
|
+
*/
|
|
49
|
+
const approved = new Set();
|
|
50
|
+
/**
|
|
51
|
+
* Record an attempted send and the instruction the agent cites for it.
|
|
52
|
+
*
|
|
53
|
+
* @param input - Who, what, and on whose authority
|
|
54
|
+
* @returns The hold, including the id the owner will answer with
|
|
55
|
+
*/
|
|
56
|
+
export function holdGmailSend(input) {
|
|
57
|
+
const entry = {
|
|
58
|
+
id: `${input.agentSession}:${input.draftId}`,
|
|
59
|
+
agentSession: input.agentSession,
|
|
60
|
+
draftId: input.draftId,
|
|
61
|
+
to: input.to,
|
|
62
|
+
subject: input.subject,
|
|
63
|
+
...(input.claim ? { claim: input.claim } : {}),
|
|
64
|
+
heldAt: Date.now(),
|
|
65
|
+
};
|
|
66
|
+
held.set(entry.id, entry);
|
|
67
|
+
return entry;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Spend an approval the owner gave for this agent.
|
|
71
|
+
*
|
|
72
|
+
* @param agentSession - The agent attempting to send
|
|
73
|
+
* @returns True when an approval was available and has now been used up
|
|
74
|
+
*/
|
|
75
|
+
export function consumeSendApproval(agentSession) {
|
|
76
|
+
if (!approved.has(agentSession))
|
|
77
|
+
return false;
|
|
78
|
+
approved.delete(agentSession);
|
|
79
|
+
logger.info('Agent spent an owner approval to send mail', { agentSession });
|
|
80
|
+
return true;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Grant one send to an agent.
|
|
84
|
+
*
|
|
85
|
+
* @param agentSession - The agent allowed to send
|
|
86
|
+
*/
|
|
87
|
+
export function grantSendApproval(agentSession) {
|
|
88
|
+
approved.add(agentSession);
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Everything waiting on the owner, oldest first.
|
|
92
|
+
*
|
|
93
|
+
* @returns The held sends
|
|
94
|
+
*/
|
|
95
|
+
export function listHeldSends() {
|
|
96
|
+
return Array.from(held.values()).sort((a, b) => a.heldAt - b.heldAt);
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* One held send.
|
|
100
|
+
*
|
|
101
|
+
* @param id - Hold id
|
|
102
|
+
* @returns The hold, or undefined
|
|
103
|
+
*/
|
|
104
|
+
export function getHeldSend(id) {
|
|
105
|
+
return held.get(id);
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Drop a hold once it has been answered.
|
|
109
|
+
*
|
|
110
|
+
* @param id - Hold id
|
|
111
|
+
* @returns True when there was one to drop
|
|
112
|
+
*/
|
|
113
|
+
export function clearHeldSend(id) {
|
|
114
|
+
return held.delete(id);
|
|
115
|
+
}
|
|
116
|
+
/** Drops all state (tests). */
|
|
117
|
+
export function resetGmailSendGate() {
|
|
118
|
+
held.clear();
|
|
119
|
+
approved.clear();
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=gmail-send-gate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gmail-send-gate.js","sourceRoot":"","sources":["../../../../../../backend/src/services/google/gmail-send-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,MAAM,MAAM,GAAG,aAAa,CAAC,WAAW,EAAE,CAAC,qBAAqB,CAAC,eAAe,CAAC,CAAC;AAyBlF,iDAAiD;AACjD,MAAM,IAAI,GAAG,IAAI,GAAG,EAAoB,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAU,CAAC;AAEnC;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,KAM7B;IACA,MAAM,KAAK,GAAa;QACvB,EAAE,EAAE,GAAG,KAAK,CAAC,YAAY,IAAI,KAAK,CAAC,OAAO,EAAE;QAC5C,YAAY,EAAE,KAAK,CAAC,YAAY;QAChC,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,EAAE,EAAE,KAAK,CAAC,EAAE;QACZ,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAA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AAClB,CAAC"}
|
|
@@ -52,6 +52,15 @@ export interface GmailSearchInput {
|
|
|
52
52
|
max?: number;
|
|
53
53
|
}
|
|
54
54
|
/** Input to {@link GmailService.send}. */
|
|
55
|
+
/** What `drafts.create` leaves behind in the owner's Drafts. */
|
|
56
|
+
export interface GmailDraftResult {
|
|
57
|
+
/** Gmail draft id, used to send or discard it later */
|
|
58
|
+
draftId: string;
|
|
59
|
+
/** Underlying message id, when Gmail returned one */
|
|
60
|
+
id?: string;
|
|
61
|
+
/** Thread the draft sits in */
|
|
62
|
+
threadId?: string;
|
|
63
|
+
}
|
|
55
64
|
export interface GmailSendInput {
|
|
56
65
|
to: string;
|
|
57
66
|
cc?: string;
|
|
@@ -151,6 +160,31 @@ export declare class GmailService {
|
|
|
151
160
|
* @throws GoogleWorkspaceError(400, validation) for missing to/subject; auth / Google failures
|
|
152
161
|
*/
|
|
153
162
|
send(input: GmailSendInput): Promise<GmailSendResult>;
|
|
163
|
+
/**
|
|
164
|
+
* `drafts.create` — put the message in the owner's Drafts, unsent.
|
|
165
|
+
*
|
|
166
|
+
* This is what "draft me an email" has to mean. Until now the closest
|
|
167
|
+
* thing was a dry run, which prints a preview into a tool result and
|
|
168
|
+
* leaves nothing behind: the owner could not open it, edit it, or send it
|
|
169
|
+
* later. So an agent asked to draft had a choice between producing
|
|
170
|
+
* something nobody could act on and actually sending — and one of them
|
|
171
|
+
* looks like completing the task.
|
|
172
|
+
*
|
|
173
|
+
* A real draft lands in Gmail, in the right thread, and the owner decides.
|
|
174
|
+
*
|
|
175
|
+
* @param input - Recipients, subject, text and optional reply threading
|
|
176
|
+
* @returns The draft id plus the underlying message ids
|
|
177
|
+
* @throws GoogleWorkspaceError(400, validation) for missing to/subject; auth / Google failures
|
|
178
|
+
*/
|
|
179
|
+
createDraft(input: GmailSendInput): Promise<GmailDraftResult>;
|
|
180
|
+
/**
|
|
181
|
+
* `drafts.send` — send a draft the owner has approved.
|
|
182
|
+
*
|
|
183
|
+
* @param draftId - The draft to send
|
|
184
|
+
* @returns The sent message's id / threadId / labels
|
|
185
|
+
* @throws GoogleWorkspaceError on auth / Google failures
|
|
186
|
+
*/
|
|
187
|
+
sendDraft(draftId: string): Promise<GmailSendResult>;
|
|
154
188
|
}
|
|
155
189
|
/**
|
|
156
190
|
* Coerce a caller-supplied result cap into [1, ceiling], defaulting when
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gmail.service.d.ts","sourceRoot":"","sources":["../../../../../../backend/src/services/google/gmail.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,EAAiC,KAAK,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAM3F,sCAAsC;AACtC,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,sEAAsE;AACtE,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,4BAA4B;AAC5B,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,8CAA8C;IAC9C,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,wBAAwB;IACxB,IAAI,EAAE,MAA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ElE;;OAEG;gBACS,IAAI,EAAE,aAAa;IAI/B;;;;;;;OAOG;IACG,MAAM,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;IAsChE;;;;;;;OAOG;IACG,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IA2B7C;;;;;;OAMG;IACG,IAAI,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"gmail.service.d.ts","sourceRoot":"","sources":["../../../../../../backend/src/services/google/gmail.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,EAAiC,KAAK,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAM3F,sCAAsC;AACtC,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,sEAAsE;AACtE,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,4BAA4B;AAC5B,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,8CAA8C;IAC9C,SAAS,EAAE,MAAM,CAAC;IAClB,OA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AC,KAAK,EAAE,cAAc,GAAG,MAAM,CAmBzD;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAe9C;AAwED;;;;;;;;GAQG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAgB;IACrC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA6C;IAElE;;OAEG;gBACS,IAAI,EAAE,aAAa;IAI/B;;;;;;;OAOG;IACG,MAAM,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;IAsChE;;;;;;;OAOG;IACG,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IA2B7C;;;;;;OAMG;IACG,IAAI,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,eAAe,CAAC;IAS3D;;;;;;;;;;;;;;;OAeG;IACG,WAAW,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAiBnE;;;;;;OAMG;IACG,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;CAO3D;AAED;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAG7F"}
|
|
@@ -278,6 +278,48 @@ export class GmailService {
|
|
|
278
278
|
const sent = await googleRequest(this.deps, `${this.base}/messages/send`, { method: 'POST', body });
|
|
279
279
|
return { id: sent.id, threadId: sent.threadId, labelIds: sent.labelIds ?? [] };
|
|
280
280
|
}
|
|
281
|
+
/**
|
|
282
|
+
* `drafts.create` — put the message in the owner's Drafts, unsent.
|
|
283
|
+
*
|
|
284
|
+
* This is what "draft me an email" has to mean. Until now the closest
|
|
285
|
+
* thing was a dry run, which prints a preview into a tool result and
|
|
286
|
+
* leaves nothing behind: the owner could not open it, edit it, or send it
|
|
287
|
+
* later. So an agent asked to draft had a choice between producing
|
|
288
|
+
* something nobody could act on and actually sending — and one of them
|
|
289
|
+
* looks like completing the task.
|
|
290
|
+
*
|
|
291
|
+
* A real draft lands in Gmail, in the right thread, and the owner decides.
|
|
292
|
+
*
|
|
293
|
+
* @param input - Recipients, subject, text and optional reply threading
|
|
294
|
+
* @returns The draft id plus the underlying message ids
|
|
295
|
+
* @throws GoogleWorkspaceError(400, validation) for missing to/subject; auth / Google failures
|
|
296
|
+
*/
|
|
297
|
+
async createDraft(input) {
|
|
298
|
+
const raw = base64UrlEncode(buildRfc822(input));
|
|
299
|
+
const message = { raw };
|
|
300
|
+
if (input.threadId?.trim())
|
|
301
|
+
message.threadId = input.threadId.trim();
|
|
302
|
+
const draft = await googleRequest(this.deps, `${this.base}/drafts`, { method: 'POST', body: { message } });
|
|
303
|
+
return {
|
|
304
|
+
draftId: draft.id,
|
|
305
|
+
...(draft.message?.id ? { id: draft.message.id } : {}),
|
|
306
|
+
...(draft.message?.threadId ? { threadId: draft.message.threadId } : {}),
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* `drafts.send` — send a draft the owner has approved.
|
|
311
|
+
*
|
|
312
|
+
* @param draftId - The draft to send
|
|
313
|
+
* @returns The sent message's id / threadId / labels
|
|
314
|
+
* @throws GoogleWorkspaceError on auth / Google failures
|
|
315
|
+
*/
|
|
316
|
+
async sendDraft(draftId) {
|
|
317
|
+
const sent = await googleRequest(this.deps, `${this.base}/drafts/send`, {
|
|
318
|
+
method: 'POST',
|
|
319
|
+
body: { id: draftId },
|
|
320
|
+
});
|
|
321
|
+
return { id: sent.id, threadId: sent.threadId, labelIds: sent.labelIds ?? [] };
|
|
322
|
+
}
|
|
281
323
|
}
|
|
282
324
|
/**
|
|
283
325
|
* Coerce a caller-supplied result cap into [1, ceiling], defaulting when
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gmail.service.js","sourceRoot":"","sources":["../../../../../../backend/src/services/google/gmail.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,aAAa,EAAsB,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"gmail.service.js","sourceRoot":"","sources":["../../../../../../backend/src/services/google/gmail.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,aAAa,EAAsB,MAAM,wBAAwB,CAAC;AAgH3F,8EAA8E;AAC9E,yEAAyE;AACzE,8EAA8E;AAE9E;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,KAAsB;IACpD,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;AAClD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,IAAY;IAC1C,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACzD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAa;IAC7C,4CAA4C;IAC5C,IAAI,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAC/C,OAAO,aAAa,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC;AACxE,CAAC;AAED;;;;;GAKG;AACH,SAAS,UAAU,CAAC,MAAc;IAChC,MAAM,KAAK,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