@meffecta/agent 1.0.12 → 1.0.14
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 +39 -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,43 @@ async function checkAhrefs() {
|
|
|
163
163
|
: fail("AHREFS_API_KEY", `domain-rating-free → ${status}`);
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
+
async function checkMevisio() {
|
|
167
|
+
if (!env.MEVISIO_HOST || !env.MEVISIO_EMAIL || !env.MEVISIO_PASSWORD) {
|
|
168
|
+
return skip("MEVISIO", "unset");
|
|
169
|
+
}
|
|
170
|
+
// A real login, because that is the only thing that proves these three agree — the platform
|
|
171
|
+
// hands an ANONYMOUS session to anyone who asks, and /gateway/api/context answers 200 with
|
|
172
|
+
// the account filled in and no user at all. Checking the host alone would report a pass.
|
|
173
|
+
const { status, json } = await http(`https://${env.MEVISIO_HOST}/identity/api/login`, {
|
|
174
|
+
method: "POST",
|
|
175
|
+
headers: { "content-type": "application/json" },
|
|
176
|
+
body: JSON.stringify({ email: env.MEVISIO_EMAIL, password: env.MEVISIO_PASSWORD }),
|
|
177
|
+
});
|
|
178
|
+
if (status !== 200 || !json?.ok) {
|
|
179
|
+
return fail("MEVISIO", `login → ${status}${json?.error ? ` ${json.error}` : ""}`);
|
|
180
|
+
}
|
|
181
|
+
ok("MEVISIO", `${env.MEVISIO_EMAIL} @ ${env.MEVISIO_HOST}`);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
async function checkAgentmail() {
|
|
185
|
+
if (!env.AGENTMAIL_API_KEY) {
|
|
186
|
+
return skip("AGENTMAIL_API_KEY", "unset");
|
|
187
|
+
}
|
|
188
|
+
// The cheapest call there is, and the one that answers what actually matters about this
|
|
189
|
+
// key: a key scoped to a single inbox is indistinguishable from an account-wide one until
|
|
190
|
+
// something asks, and a job pointed at another inbox would fail with a puzzling 404.
|
|
191
|
+
const { status, json } = await http("https://api.agentmail.to/v0/auth/me", {
|
|
192
|
+
headers: { Authorization: `Bearer ${env.AGENTMAIL_API_KEY}` },
|
|
193
|
+
});
|
|
194
|
+
if (status !== 200) {
|
|
195
|
+
return fail("AGENTMAIL_API_KEY", `auth/me → ${status}`);
|
|
196
|
+
}
|
|
197
|
+
ok(
|
|
198
|
+
"AGENTMAIL_API_KEY",
|
|
199
|
+
json?.scope_type === "inbox" ? `scoped to ${json.inbox_id}` : `${json?.scope_type ?? "?"}-wide scope`,
|
|
200
|
+
);
|
|
201
|
+
}
|
|
202
|
+
|
|
166
203
|
async function checkSerper() {
|
|
167
204
|
if (!env.SERPER_API_KEY) {
|
|
168
205
|
return skip("SERPER_API_KEY", "unset");
|
|
@@ -646,6 +683,8 @@ const CHECKS = [
|
|
|
646
683
|
["POSTHOG", checkPosthog],
|
|
647
684
|
["AHREFS_API_KEY", checkAhrefs],
|
|
648
685
|
["SERPER_API_KEY", checkSerper],
|
|
686
|
+
["AGENTMAIL_API_KEY", checkAgentmail],
|
|
687
|
+
["MEVISIO", checkMevisio],
|
|
649
688
|
["HUBSPOT_TOKEN", checkHubspot],
|
|
650
689
|
["KLEER_API_TOKEN", checkKleer],
|
|
651
690
|
["CLOUDFLARE", checkCloudflare],
|