@meffecta/agent 1.0.12 → 1.0.13
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/engine.json +2 -2
- package/lib/integrations.js +7 -2
- package/package.json +1 -1
- package/scripts/verify-credentials.mjs +20 -0
package/engine.json
CHANGED
package/lib/integrations.js
CHANGED
|
@@ -199,7 +199,8 @@ const INTEGRATIONS = {
|
|
|
199
199
|
needs: [
|
|
200
200
|
"A mailbox the agent can read. Either a Workspace mailbox via domain-wide delegation",
|
|
201
201
|
"(keyless, Cloud Run only), or any Gmail account you have already connected — see",
|
|
202
|
-
"`meffecta-agent connect gmail` first if you have not.",
|
|
202
|
+
"`meffecta-agent connect gmail` first if you have not. An AgentMail inbox needs none",
|
|
203
|
+
"of that: set AGENTMAIL_API_KEY and skip to the frontmatter below.",
|
|
203
204
|
],
|
|
204
205
|
steps: [
|
|
205
206
|
[
|
|
@@ -213,11 +214,15 @@ const INTEGRATIONS = {
|
|
|
213
214
|
more: [
|
|
214
215
|
"Then, in the job's frontmatter:",
|
|
215
216
|
"",
|
|
216
|
-
" inbox: crm@yourdomain.com",
|
|
217
|
+
" inbox: gmail:crm@yourdomain.com",
|
|
217
218
|
" allowFrom: you@yourdomain.com, @yourdomain.com",
|
|
218
219
|
"",
|
|
219
220
|
"and `deploy` to register it — both fields are read when the service boots.",
|
|
220
221
|
"",
|
|
222
|
+
"The system is required: `gmail:<address>`, or `agentmail:<address>` for an inbox the",
|
|
223
|
+
"agent owns. A bare address is refused rather than guessed at, because an address",
|
|
224
|
+
"polled against the wrong system finds nothing for ever and looks healthy doing it.",
|
|
225
|
+
"",
|
|
221
226
|
"allowFrom is required and enforced in code: mail from anyone not listed is dropped",
|
|
222
227
|
"before the run starts, so it never reaches the model. Leave it out and the job",
|
|
223
228
|
"refuses every message — an omission is not read as consent.",
|
package/package.json
CHANGED
|
@@ -163,6 +163,25 @@ async function checkAhrefs() {
|
|
|
163
163
|
: fail("AHREFS_API_KEY", `domain-rating-free → ${status}`);
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
+
async function checkAgentmail() {
|
|
167
|
+
if (!env.AGENTMAIL_API_KEY) {
|
|
168
|
+
return skip("AGENTMAIL_API_KEY", "unset");
|
|
169
|
+
}
|
|
170
|
+
// The cheapest call there is, and the one that answers what actually matters about this
|
|
171
|
+
// key: a key scoped to a single inbox is indistinguishable from an account-wide one until
|
|
172
|
+
// something asks, and a job pointed at another inbox would fail with a puzzling 404.
|
|
173
|
+
const { status, json } = await http("https://api.agentmail.to/v0/auth/me", {
|
|
174
|
+
headers: { Authorization: `Bearer ${env.AGENTMAIL_API_KEY}` },
|
|
175
|
+
});
|
|
176
|
+
if (status !== 200) {
|
|
177
|
+
return fail("AGENTMAIL_API_KEY", `auth/me → ${status}`);
|
|
178
|
+
}
|
|
179
|
+
ok(
|
|
180
|
+
"AGENTMAIL_API_KEY",
|
|
181
|
+
json?.scope_type === "inbox" ? `scoped to ${json.inbox_id}` : `${json?.scope_type ?? "?"}-wide scope`,
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
|
|
166
185
|
async function checkSerper() {
|
|
167
186
|
if (!env.SERPER_API_KEY) {
|
|
168
187
|
return skip("SERPER_API_KEY", "unset");
|
|
@@ -646,6 +665,7 @@ const CHECKS = [
|
|
|
646
665
|
["POSTHOG", checkPosthog],
|
|
647
666
|
["AHREFS_API_KEY", checkAhrefs],
|
|
648
667
|
["SERPER_API_KEY", checkSerper],
|
|
668
|
+
["AGENTMAIL_API_KEY", checkAgentmail],
|
|
649
669
|
["HUBSPOT_TOKEN", checkHubspot],
|
|
650
670
|
["KLEER_API_TOKEN", checkKleer],
|
|
651
671
|
["CLOUDFLARE", checkCloudflare],
|