@superglue/cli 1.1.243 → 1.1.245
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/.claude-plugin/plugin.json +1 -1
- package/dist/cli.js +27 -26
- package/dist/skills/superglue/SKILL.md +16 -15
- package/dist/skills/superglue/references/superglue-email.md +100 -0
- package/package.json +1 -1
- package/skills/superglue/SKILL.md +16 -15
- package/skills/superglue/references/superglue-email.md +100 -0
|
@@ -13,21 +13,22 @@ For protocol-specific details (HTTP, databases, Redis, file servers, GraphQL), f
|
|
|
13
13
|
|
|
14
14
|
Read these on demand — they are authoritative for their topic and kept in sync with the web agent's skill references.
|
|
15
15
|
|
|
16
|
-
| `sg skill` command
|
|
17
|
-
|
|
|
18
|
-
| `sg skill superglue-info`
|
|
19
|
-
| `sg skill integration`
|
|
20
|
-
| `sg skill http`
|
|
21
|
-
| `sg skill graphql`
|
|
22
|
-
| `sg skill postgres`
|
|
23
|
-
| `sg skill mssql`
|
|
24
|
-
| `sg skill odbc`
|
|
25
|
-
| `sg skill redis`
|
|
26
|
-
| `sg skill mongodb`
|
|
27
|
-
| `sg skill sftp-smb`
|
|
28
|
-
| `sg skill suitecloud`
|
|
29
|
-
| `sg skill file-handling`
|
|
30
|
-
| `sg skill access-rules`
|
|
16
|
+
| `sg skill` command | When to read |
|
|
17
|
+
| -------------------------- | ---------------------------------------------------------------------------------------------------- |
|
|
18
|
+
| `sg skill superglue-info` | Company info, interfaces (SDK, REST API, MCP, Web), web UI layout, execution pipeline, internals |
|
|
19
|
+
| `sg skill integration` | Deploying tools — SDK (TS/Python) usage, REST API calls, webhook triggers, retry patterns |
|
|
20
|
+
| `sg skill http` | HTTP step configuration, auth patterns, file uploads, response handling, pagination, error detection |
|
|
21
|
+
| `sg skill graphql` | GraphQL step config, schema introspection, error recovery |
|
|
22
|
+
| `sg skill postgres` | PostgreSQL connection URLs, SSL/TLS handling, schema introspection, parameterized queries |
|
|
23
|
+
| `sg skill mssql` | MSSQL / Azure SQL connection URLs, schema introspection, parameterized queries |
|
|
24
|
+
| `sg skill odbc` | ODBC connections (SAP ASE / Sybase via FreeTDS), driver config, positional `?` params |
|
|
25
|
+
| `sg skill redis` | Redis command syntax, connection URLs, key type handling |
|
|
26
|
+
| `sg skill mongodb` | MongoDB connection URLs (mongodb:// / mongodb+srv://), CRUD operations, Extended JSON, aggregation |
|
|
27
|
+
| `sg skill sftp-smb` | SFTP, FTP, and SMB operations, file upload/download semantics, path handling |
|
|
28
|
+
| `sg skill suitecloud` | NetSuite SuiteCloud deploys: custom fields, record types, scripts; validate, preview, deploy |
|
|
29
|
+
| `sg skill file-handling` | File detection, parsing, `file::` reference syntax, lazy base64 access, transform-produced files |
|
|
30
|
+
| `sg skill access-rules` | RBAC roles, resource grants, and tool/credential permissions (enterprise only) |
|
|
31
|
+
| `sg skill superglue-email` | Custom report and notification emails with attachments through superglue's email service |
|
|
31
32
|
|
|
32
33
|
## CRITICAL RULES — READ FIRST
|
|
33
34
|
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# superglue Email
|
|
2
|
+
|
|
3
|
+
superglue has its own email service. It sends HTML email with optional file attachments from superglue's sender address. Replies go to the sender's account email. It needs no SMTP server, SMTP relay, Microsoft Graph app, or mailbox connection.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
Use the superglue email service for reports, summaries, alerts, and notifications that a tool or agent sends to people in the organization.
|
|
8
|
+
|
|
9
|
+
Use a different path in these cases:
|
|
10
|
+
|
|
11
|
+
- Mail that must come from the user's own mailbox, or mail to people outside the organization: send through the user's own email provider API.
|
|
12
|
+
- Alerts for each tool run, and daily or weekly run summaries with the standard content: use the built-in run notifications in **Settings > Notifications**.
|
|
13
|
+
|
|
14
|
+
Use the email service when the content, grouping, recipients, or attachments differ from the built-in notifications. Do not recommend an SMTP relay or Microsoft Graph for these emails.
|
|
15
|
+
|
|
16
|
+
## Rules
|
|
17
|
+
|
|
18
|
+
- Recipients in `to` and `cc` must be members of the organization. superglue matches addresses to member account emails, ignoring case. `to` defaults to the sender.
|
|
19
|
+
- An email has at most 50 recipients in total.
|
|
20
|
+
- The sender is the owner of the API key that calls the service.
|
|
21
|
+
- An email has at most 10 attachments, with at most 10 MB of decoded content in total. Attachment content is UTF-8 text by default; set `encoding: "base64"` for binary files.
|
|
22
|
+
- The service only sends. The tool or script that calls it collects the data and builds the subject, the HTML, and each file.
|
|
23
|
+
- Show the user the recipients, subject, and attachment names, and get approval before the first test send.
|
|
24
|
+
|
|
25
|
+
## Tool Steps
|
|
26
|
+
|
|
27
|
+
Saved tool steps call the REST endpoint. The tool needs a connection to the superglue API:
|
|
28
|
+
|
|
29
|
+
- `url`: the superglue API endpoint.
|
|
30
|
+
- Secret `api_key`: a superglue API key with the **execute** scope. The key owner is the sender, so emails without `to` go to the key owner. To send as a different user, use a connection with that user's API key.
|
|
31
|
+
|
|
32
|
+
Build the request body in a transform step, then send it in a request step. Transforms provide `Papa` for CSV files. In this example, the connection's system ID is `superglue_api`:
|
|
33
|
+
|
|
34
|
+
```javascript
|
|
35
|
+
{
|
|
36
|
+
id: "buildEmail",
|
|
37
|
+
instruction: "Build the summary email with the failed records as a CSV attachment",
|
|
38
|
+
config: {
|
|
39
|
+
type: "transform",
|
|
40
|
+
transformCode: `(sourceData) => {
|
|
41
|
+
const failed = sourceData.fetchRuns.data.failedRecords;
|
|
42
|
+
return {
|
|
43
|
+
to: sourceData.recipients,
|
|
44
|
+
subject: "Daily job summary",
|
|
45
|
+
html: "<h1>Daily job summary</h1><p>" + failed.length + " failed records.</p>",
|
|
46
|
+
attachments: failed.length
|
|
47
|
+
? [{ filename: "failed-records.csv", content: Papa.unparse(failed) }]
|
|
48
|
+
: [],
|
|
49
|
+
};
|
|
50
|
+
}`,
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
id: "sendEmail",
|
|
55
|
+
instruction: "Send the summary email through superglue's email service",
|
|
56
|
+
modify: true,
|
|
57
|
+
config: {
|
|
58
|
+
type: "request",
|
|
59
|
+
systemId: "superglue_api",
|
|
60
|
+
method: "POST",
|
|
61
|
+
url: "<<superglue_api_url>>/v1/notify/email",
|
|
62
|
+
headers: {
|
|
63
|
+
Authorization: "Bearer <<superglue_api_api_key>>",
|
|
64
|
+
"Content-Type": "application/json",
|
|
65
|
+
},
|
|
66
|
+
body: "<<(sourceData) => JSON.stringify(sourceData.buildEmail.data)>>",
|
|
67
|
+
},
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Join the path to the connection URL with exactly one `/`. Put the file content in `attachments` directly; do not set `outputFile` on the transform step for the email.
|
|
72
|
+
|
|
73
|
+
## REST API
|
|
74
|
+
|
|
75
|
+
`POST <apiEndpoint>/v1/notify/email` with `Authorization: Bearer <apiKey>` and a JSON body:
|
|
76
|
+
|
|
77
|
+
| Field | Required | Notes |
|
|
78
|
+
| ------------- | -------- | -------------------------------------------------------------------------------------------- |
|
|
79
|
+
| `subject` | yes | Subject line. |
|
|
80
|
+
| `html` | yes | HTML body. |
|
|
81
|
+
| `text` | no | Plain-text body for mail clients that do not show HTML. |
|
|
82
|
+
| `to` | no | Array of member email addresses. Defaults to the key owner. |
|
|
83
|
+
| `cc` | no | Array of member email addresses. |
|
|
84
|
+
| `attachments` | no | Array of `{ filename, content, encoding?, contentType? }`. `encoding` is `utf8` or `base64`. |
|
|
85
|
+
|
|
86
|
+
A successful send returns `200` with `{ success: true, message, replyTo, to, cc, attachments }`. Each user can send 60 emails per hour through the endpoint.
|
|
87
|
+
|
|
88
|
+
## Errors
|
|
89
|
+
|
|
90
|
+
Error responses have a `code` and `error.message`.
|
|
91
|
+
|
|
92
|
+
| Code | Status | Cause |
|
|
93
|
+
| ----------------------- | ------ | ------------------------------------------------------------- |
|
|
94
|
+
| `INVALID_REQUEST` | 400 | A missing or malformed field. The message names the field. |
|
|
95
|
+
| `RECIPIENT_NOT_MEMBER` | 403 | A recipient is not a member. The message lists the addresses. |
|
|
96
|
+
| `TOO_MANY_RECIPIENTS` | 400 | More than 50 recipients. |
|
|
97
|
+
| `INVALID_ATTACHMENT` | 400 | Attachment content marked `base64` is not valid base64. |
|
|
98
|
+
| `ATTACHMENTS_TOO_LARGE` | 413 | Attachments exceed 10 MB decoded. |
|
|
99
|
+
| `SENDER_EMAIL_MISSING` | 400 | The sending user has no email address. |
|
|
100
|
+
| `SEND_FAILED` | 502 | The email provider rejected the email. Retry later once. |
|
package/package.json
CHANGED
|
@@ -13,21 +13,22 @@ For protocol-specific details (HTTP, databases, Redis, file servers, GraphQL), f
|
|
|
13
13
|
|
|
14
14
|
Read these on demand — they are authoritative for their topic and kept in sync with the web agent's skill references.
|
|
15
15
|
|
|
16
|
-
| `sg skill` command
|
|
17
|
-
|
|
|
18
|
-
| `sg skill superglue-info`
|
|
19
|
-
| `sg skill integration`
|
|
20
|
-
| `sg skill http`
|
|
21
|
-
| `sg skill graphql`
|
|
22
|
-
| `sg skill postgres`
|
|
23
|
-
| `sg skill mssql`
|
|
24
|
-
| `sg skill odbc`
|
|
25
|
-
| `sg skill redis`
|
|
26
|
-
| `sg skill mongodb`
|
|
27
|
-
| `sg skill sftp-smb`
|
|
28
|
-
| `sg skill suitecloud`
|
|
29
|
-
| `sg skill file-handling`
|
|
30
|
-
| `sg skill access-rules`
|
|
16
|
+
| `sg skill` command | When to read |
|
|
17
|
+
| -------------------------- | ---------------------------------------------------------------------------------------------------- |
|
|
18
|
+
| `sg skill superglue-info` | Company info, interfaces (SDK, REST API, MCP, Web), web UI layout, execution pipeline, internals |
|
|
19
|
+
| `sg skill integration` | Deploying tools — SDK (TS/Python) usage, REST API calls, webhook triggers, retry patterns |
|
|
20
|
+
| `sg skill http` | HTTP step configuration, auth patterns, file uploads, response handling, pagination, error detection |
|
|
21
|
+
| `sg skill graphql` | GraphQL step config, schema introspection, error recovery |
|
|
22
|
+
| `sg skill postgres` | PostgreSQL connection URLs, SSL/TLS handling, schema introspection, parameterized queries |
|
|
23
|
+
| `sg skill mssql` | MSSQL / Azure SQL connection URLs, schema introspection, parameterized queries |
|
|
24
|
+
| `sg skill odbc` | ODBC connections (SAP ASE / Sybase via FreeTDS), driver config, positional `?` params |
|
|
25
|
+
| `sg skill redis` | Redis command syntax, connection URLs, key type handling |
|
|
26
|
+
| `sg skill mongodb` | MongoDB connection URLs (mongodb:// / mongodb+srv://), CRUD operations, Extended JSON, aggregation |
|
|
27
|
+
| `sg skill sftp-smb` | SFTP, FTP, and SMB operations, file upload/download semantics, path handling |
|
|
28
|
+
| `sg skill suitecloud` | NetSuite SuiteCloud deploys: custom fields, record types, scripts; validate, preview, deploy |
|
|
29
|
+
| `sg skill file-handling` | File detection, parsing, `file::` reference syntax, lazy base64 access, transform-produced files |
|
|
30
|
+
| `sg skill access-rules` | RBAC roles, resource grants, and tool/credential permissions (enterprise only) |
|
|
31
|
+
| `sg skill superglue-email` | Custom report and notification emails with attachments through superglue's email service |
|
|
31
32
|
|
|
32
33
|
## CRITICAL RULES — READ FIRST
|
|
33
34
|
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# superglue Email
|
|
2
|
+
|
|
3
|
+
superglue has its own email service. It sends HTML email with optional file attachments from superglue's sender address. Replies go to the sender's account email. It needs no SMTP server, SMTP relay, Microsoft Graph app, or mailbox connection.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
Use the superglue email service for reports, summaries, alerts, and notifications that a tool or agent sends to people in the organization.
|
|
8
|
+
|
|
9
|
+
Use a different path in these cases:
|
|
10
|
+
|
|
11
|
+
- Mail that must come from the user's own mailbox, or mail to people outside the organization: send through the user's own email provider API.
|
|
12
|
+
- Alerts for each tool run, and daily or weekly run summaries with the standard content: use the built-in run notifications in **Settings > Notifications**.
|
|
13
|
+
|
|
14
|
+
Use the email service when the content, grouping, recipients, or attachments differ from the built-in notifications. Do not recommend an SMTP relay or Microsoft Graph for these emails.
|
|
15
|
+
|
|
16
|
+
## Rules
|
|
17
|
+
|
|
18
|
+
- Recipients in `to` and `cc` must be members of the organization. superglue matches addresses to member account emails, ignoring case. `to` defaults to the sender.
|
|
19
|
+
- An email has at most 50 recipients in total.
|
|
20
|
+
- The sender is the owner of the API key that calls the service.
|
|
21
|
+
- An email has at most 10 attachments, with at most 10 MB of decoded content in total. Attachment content is UTF-8 text by default; set `encoding: "base64"` for binary files.
|
|
22
|
+
- The service only sends. The tool or script that calls it collects the data and builds the subject, the HTML, and each file.
|
|
23
|
+
- Show the user the recipients, subject, and attachment names, and get approval before the first test send.
|
|
24
|
+
|
|
25
|
+
## Tool Steps
|
|
26
|
+
|
|
27
|
+
Saved tool steps call the REST endpoint. The tool needs a connection to the superglue API:
|
|
28
|
+
|
|
29
|
+
- `url`: the superglue API endpoint.
|
|
30
|
+
- Secret `api_key`: a superglue API key with the **execute** scope. The key owner is the sender, so emails without `to` go to the key owner. To send as a different user, use a connection with that user's API key.
|
|
31
|
+
|
|
32
|
+
Build the request body in a transform step, then send it in a request step. Transforms provide `Papa` for CSV files. In this example, the connection's system ID is `superglue_api`:
|
|
33
|
+
|
|
34
|
+
```javascript
|
|
35
|
+
{
|
|
36
|
+
id: "buildEmail",
|
|
37
|
+
instruction: "Build the summary email with the failed records as a CSV attachment",
|
|
38
|
+
config: {
|
|
39
|
+
type: "transform",
|
|
40
|
+
transformCode: `(sourceData) => {
|
|
41
|
+
const failed = sourceData.fetchRuns.data.failedRecords;
|
|
42
|
+
return {
|
|
43
|
+
to: sourceData.recipients,
|
|
44
|
+
subject: "Daily job summary",
|
|
45
|
+
html: "<h1>Daily job summary</h1><p>" + failed.length + " failed records.</p>",
|
|
46
|
+
attachments: failed.length
|
|
47
|
+
? [{ filename: "failed-records.csv", content: Papa.unparse(failed) }]
|
|
48
|
+
: [],
|
|
49
|
+
};
|
|
50
|
+
}`,
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
id: "sendEmail",
|
|
55
|
+
instruction: "Send the summary email through superglue's email service",
|
|
56
|
+
modify: true,
|
|
57
|
+
config: {
|
|
58
|
+
type: "request",
|
|
59
|
+
systemId: "superglue_api",
|
|
60
|
+
method: "POST",
|
|
61
|
+
url: "<<superglue_api_url>>/v1/notify/email",
|
|
62
|
+
headers: {
|
|
63
|
+
Authorization: "Bearer <<superglue_api_api_key>>",
|
|
64
|
+
"Content-Type": "application/json",
|
|
65
|
+
},
|
|
66
|
+
body: "<<(sourceData) => JSON.stringify(sourceData.buildEmail.data)>>",
|
|
67
|
+
},
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Join the path to the connection URL with exactly one `/`. Put the file content in `attachments` directly; do not set `outputFile` on the transform step for the email.
|
|
72
|
+
|
|
73
|
+
## REST API
|
|
74
|
+
|
|
75
|
+
`POST <apiEndpoint>/v1/notify/email` with `Authorization: Bearer <apiKey>` and a JSON body:
|
|
76
|
+
|
|
77
|
+
| Field | Required | Notes |
|
|
78
|
+
| ------------- | -------- | -------------------------------------------------------------------------------------------- |
|
|
79
|
+
| `subject` | yes | Subject line. |
|
|
80
|
+
| `html` | yes | HTML body. |
|
|
81
|
+
| `text` | no | Plain-text body for mail clients that do not show HTML. |
|
|
82
|
+
| `to` | no | Array of member email addresses. Defaults to the key owner. |
|
|
83
|
+
| `cc` | no | Array of member email addresses. |
|
|
84
|
+
| `attachments` | no | Array of `{ filename, content, encoding?, contentType? }`. `encoding` is `utf8` or `base64`. |
|
|
85
|
+
|
|
86
|
+
A successful send returns `200` with `{ success: true, message, replyTo, to, cc, attachments }`. Each user can send 60 emails per hour through the endpoint.
|
|
87
|
+
|
|
88
|
+
## Errors
|
|
89
|
+
|
|
90
|
+
Error responses have a `code` and `error.message`.
|
|
91
|
+
|
|
92
|
+
| Code | Status | Cause |
|
|
93
|
+
| ----------------------- | ------ | ------------------------------------------------------------- |
|
|
94
|
+
| `INVALID_REQUEST` | 400 | A missing or malformed field. The message names the field. |
|
|
95
|
+
| `RECIPIENT_NOT_MEMBER` | 403 | A recipient is not a member. The message lists the addresses. |
|
|
96
|
+
| `TOO_MANY_RECIPIENTS` | 400 | More than 50 recipients. |
|
|
97
|
+
| `INVALID_ATTACHMENT` | 400 | Attachment content marked `base64` is not valid base64. |
|
|
98
|
+
| `ATTACHMENTS_TOO_LARGE` | 413 | Attachments exceed 10 MB decoded. |
|
|
99
|
+
| `SENDER_EMAIL_MISSING` | 400 | The sending user has no email address. |
|
|
100
|
+
| `SEND_FAILED` | 502 | The email provider rejected the email. Retry later once. |
|