@assemblyline-agents/gmail 0.1.0
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/LICENSE +21 -0
- package/README.md +21 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/package.json +49 -0
- package/skills/gmail/SKILL.md +13 -0
- package/skills/gmail/references/gmail.md +41 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 OpenEve contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# @assemblyline-agents/gmail
|
|
2
|
+
|
|
3
|
+
Official Assembly Line Gmail connection plugin.
|
|
4
|
+
|
|
5
|
+
It exposes Gmail threads, messages, attachments, drafts, and sends through a dedicated MCP connection. Gmail authorization stays independent from Google Calendar and Google Drive. The package exports `defineGmailConnection(options)` and bundles focused Gmail guidance under `skills/`.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npm install @assemblyline-agents/gmail
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Configure `GMAIL_MCP_URL` and `GMAIL_MCP_TOKEN`, or pass the connection URL and authentication resolver directly. New connections scaffold read-only; drafts and sends require explicit write access and the configured approval policy.
|
|
14
|
+
|
|
15
|
+
## Part of Assembly Line
|
|
16
|
+
|
|
17
|
+
This package is part of [Assembly Line](https://github.com/jasonbadeaux/openeve). See the [developer documentation](https://github.com/jasonbadeaux/openeve/tree/main/docs/developers) for setup, agent authoring, and deployment guides.
|
|
18
|
+
|
|
19
|
+
## License
|
|
20
|
+
|
|
21
|
+
MIT
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type McpPluginConnectionOptions } from "@assemblyline-agents/core";
|
|
2
|
+
export type GmailConnectionOptions = McpPluginConnectionOptions;
|
|
3
|
+
export declare function defineGmailConnection(options: GmailConnectionOptions): import("@assemblyline-agents/core").McpHttpClientConnectionDefinition;
|
|
4
|
+
export declare const openevePlugin: import("@assemblyline-agents/core").PluginModule;
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,0BAA0B,EAChC,MAAM,2BAA2B,CAAC;AAInC,MAAM,MAAM,sBAAsB,GAAG,0BAA0B,CAAC;AAEhE,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,sBAAsB,yEAEpE;AAED,eAAO,MAAM,aAAa,kDAA0C,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { connectionPluginMetadata, defineMcpPluginConnection, definePlugin } from "@assemblyline-agents/core";
|
|
2
|
+
const PLUGIN = connectionPluginMetadata("gmail");
|
|
3
|
+
export function defineGmailConnection(options) {
|
|
4
|
+
return defineMcpPluginConnection(PLUGIN, options);
|
|
5
|
+
}
|
|
6
|
+
export const openevePlugin = definePlugin({ connections: [PLUGIN] });
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,YAAY,EAEb,MAAM,2BAA2B,CAAC;AAEnC,MAAM,MAAM,GAAG,wBAAwB,CAAC,OAAO,CAAE,CAAC;AAIlD,MAAM,UAAU,qBAAqB,CAAC,OAA+B;IACnE,OAAO,yBAAyB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACpD,CAAC;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@assemblyline-agents/gmail",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"exports": {
|
|
6
|
+
".": {
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"default": "./dist/index.js"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@assemblyline-agents/core": "0.1.0"
|
|
13
|
+
},
|
|
14
|
+
"description": "Official OpenEve Gmail connection plugin.",
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"skills"
|
|
18
|
+
],
|
|
19
|
+
"engines": {
|
|
20
|
+
"node": ">=22.19.0"
|
|
21
|
+
},
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "git+https://github.com/jasonbadeaux/openeve.git",
|
|
26
|
+
"directory": "packages/gmail"
|
|
27
|
+
},
|
|
28
|
+
"bugs": {
|
|
29
|
+
"url": "https://github.com/jasonbadeaux/openeve/issues"
|
|
30
|
+
},
|
|
31
|
+
"homepage": "https://github.com/jasonbadeaux/openeve#readme",
|
|
32
|
+
"author": "OpenEve contributors",
|
|
33
|
+
"keywords": [
|
|
34
|
+
"openeve",
|
|
35
|
+
"ai",
|
|
36
|
+
"agents",
|
|
37
|
+
"gmail",
|
|
38
|
+
"email",
|
|
39
|
+
"connection",
|
|
40
|
+
"plugin"
|
|
41
|
+
],
|
|
42
|
+
"publishConfig": {
|
|
43
|
+
"access": "public"
|
|
44
|
+
},
|
|
45
|
+
"scripts": {
|
|
46
|
+
"build": "tsc -p tsconfig.json",
|
|
47
|
+
"check": "tsc -p tsconfig.json --noEmit"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gmail
|
|
3
|
+
description: Use a configured, independently authorized Gmail connection for mail search, threads, messages, attachments, drafts, and sends.
|
|
4
|
+
---
|
|
5
|
+
# Gmail
|
|
6
|
+
|
|
7
|
+
Use the `gmail` connection only for Gmail work. Its authorization is independent from Google Calendar and Google Drive; never assume either service is connected because Gmail is connected.
|
|
8
|
+
|
|
9
|
+
Read narrowly before requesting broader data. Prefer a targeted Gmail query, then inspect the exact thread or message needed. The deployment owner configures the Gmail OAuth grant or MCP bridge. Never request, print, or store access tokens, refresh tokens, client secrets, API keys, or cookies.
|
|
10
|
+
|
|
11
|
+
The scaffold is read-only. Draft creation or changes, sends, label changes, and other mailbox mutations require explicit write access and the configured approval gate. Approval for a send must cover the exact recipients, subject, body, thread, and attachments; request new approval if any of them changes.
|
|
12
|
+
|
|
13
|
+
Read `references/gmail.md` when the task needs Gmail query syntax, thread behavior, attachments, drafts, or send safety.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Gmail
|
|
2
|
+
|
|
3
|
+
Use the configured `gmail` connection for Gmail search, threads, messages, attachments, drafts, and sends.
|
|
4
|
+
|
|
5
|
+
Official documentation:
|
|
6
|
+
|
|
7
|
+
- https://developers.google.com/workspace/gmail/api/reference/rest
|
|
8
|
+
- https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.messages/send
|
|
9
|
+
- https://developers.google.com/workspace/gmail/api/reference/rest/v1/users.history/list
|
|
10
|
+
|
|
11
|
+
## Source Selection
|
|
12
|
+
|
|
13
|
+
Use a bounded search for normal recall, then fetch the exact thread or message when freshness or complete context matters. Useful Gmail searches include:
|
|
14
|
+
|
|
15
|
+
```text
|
|
16
|
+
in:inbox category:primary from:person@example.com
|
|
17
|
+
in:inbox category:primary subject:(invoice)
|
|
18
|
+
in:inbox category:primary newer_than:7d
|
|
19
|
+
in:inbox category:primary has:attachment
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Gmail's Primary tab is the system label `CATEGORY_PERSONAL`; there is no `CATEGORY_PRIMARY`. Do not describe a Primary Inbox mirror or query as all Gmail. Keep pagination bounded rather than traversing a large mailbox in a foreground turn.
|
|
23
|
+
|
|
24
|
+
## Drafts And Sends
|
|
25
|
+
|
|
26
|
+
Draft creation is a write. Sending mail is a high-impact write. Both require the configured write approval path.
|
|
27
|
+
|
|
28
|
+
Common Gmail REST endpoints are:
|
|
29
|
+
|
|
30
|
+
- `POST /gmail/v1/users/me/drafts`
|
|
31
|
+
- `PUT /gmail/v1/users/me/drafts/{id}`
|
|
32
|
+
- `POST /gmail/v1/users/me/drafts/send`
|
|
33
|
+
- `POST /gmail/v1/users/me/messages/send`
|
|
34
|
+
|
|
35
|
+
Resolve the exact MIME/RFC 2822 body before requesting approval. Approval must cover recipients, subject, body, thread id, attachments, method, path, and raw message hash where applicable. If the message changes, request approval again.
|
|
36
|
+
|
|
37
|
+
Never claim mail was sent until the provider confirms the approved send.
|
|
38
|
+
|
|
39
|
+
## Attachments
|
|
40
|
+
|
|
41
|
+
When answering from an attachment, identify the supporting filename. Keep binary handling bounded and avoid dumping private attachment content when a concise answer will do.
|