autark-cli 0.5.4 → 0.5.5
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/autark.mjs +15 -16
- package/package.json +1 -1
package/autark.mjs
CHANGED
|
@@ -862,7 +862,6 @@ async function mailLint(rest) {
|
|
|
862
862
|
'compound-question': 'Compound a/b questions ("are you X or Y...") read as AI hedging across alternatives. Humans ask one specific thing. Drop the "or" and pick the more specific half.',
|
|
863
863
|
'too-long': 'Cold outreach over 400 chars (~4-6 short lines) reads as a pitch deck, not a peer note. If you wrote more, you\'re explaining instead of asking. Cut to the single sharpest sentence.',
|
|
864
864
|
'no-anchor-sig': 'Without a clickable name in the signature, the recipient has to type your name into Google to figure out who you are. The HTML <a href> / markdown [name](url) sig is the single biggest "who is this person?" mitigator. Plain "Kushal" alone is a tell.',
|
|
865
|
-
'html-in-text': 'Layout HTML tags (<div>, <p>, <br>, <span>) in the body get sent through `autark mail send --text` as text/plain — the recipient sees the literal markup in their Gmail / Outlook (we have screenshots of this happening). For paragraph breaks use a blank line. For the signature link, the single <a href="...">name</a> is allowed (recipients see "name" rendered if the inbox does any html-detection, or the raw href if not — both fine).',
|
|
866
865
|
}
|
|
867
866
|
|
|
868
867
|
const violations = []
|
|
@@ -890,14 +889,6 @@ async function mailLint(rest) {
|
|
|
890
889
|
const hasMdAnchor = /\[[^\]]+\]\(https?:\/\/[^)]+\)/.test(body)
|
|
891
890
|
const hasHtmlAnchor = /<a\b[^>]*href\s*=\s*["']https?:\/\/[^"']+["'][^>]*>[^<]+<\/a>/i.test(body)
|
|
892
891
|
if (!hasMdAnchor && !hasHtmlAnchor) violations.push({ rule: 'no-anchor-sig', detail: 'no clickable name in signature', why: WHY['no-anchor-sig'] })
|
|
893
|
-
// Layout HTML tags in the body. Catches the autark-2026-05-28 footgun where
|
|
894
|
-
// an agent wrote <div>...</div><br> markup, passed it to `mail send --text`,
|
|
895
|
-
// and 6 recipients saw raw markup in their Gmail. The <a href> signature
|
|
896
|
-
// tag is whitelisted because no-anchor-sig depends on it.
|
|
897
|
-
const layoutTagMatch = body.match(/<\s*\/?\s*(div|p|br|span|hr|table|tr|td|th|font|b|i|u|strong|em)\b[^>]*>/gi) || []
|
|
898
|
-
for (const tag of layoutTagMatch) {
|
|
899
|
-
violations.push({ rule: 'html-in-text', detail: tag, why: WHY['html-in-text'] })
|
|
900
|
-
}
|
|
901
892
|
|
|
902
893
|
if (violations.length === 0) {
|
|
903
894
|
console.log(JSON.stringify({ clean: true, length: len }, null, 2))
|
|
@@ -1438,10 +1429,10 @@ function mailUsage() {
|
|
|
1438
1429
|
console.log(`autark mail
|
|
1439
1430
|
|
|
1440
1431
|
setup --prefix <name> [--force]
|
|
1441
|
-
send --to <email[,email]> --subject <s> --text @body.txt [--run-id <id>] [--dry-run]
|
|
1442
|
-
reply --message-id <id> --text @reply.txt [--run-id <id>]
|
|
1443
|
-
reply-all --message-id <id> --text @reply.txt [--run-id <id>]
|
|
1444
|
-
forward --message-id <id> --to <email> [--text @body.txt] [--run-id <id>]
|
|
1432
|
+
send --to <email[,email]> --subject <s> [--text @body.txt] [--html @body.html] [--cc <e>] [--bcc <e>] [--reply-to <e>] [--label <l>] [--attachment <a>] [--run-id <id>] [--dry-run]
|
|
1433
|
+
reply --message-id <id> [--text @reply.txt] [--html @reply.html] [--run-id <id>]
|
|
1434
|
+
reply-all --message-id <id> [--text @reply.txt] [--html @reply.html] [--run-id <id>]
|
|
1435
|
+
forward --message-id <id> --to <email> [--text @body.txt] [--html @body.html] [--run-id <id>]
|
|
1445
1436
|
threads [--limit N]
|
|
1446
1437
|
thread <thread_id>
|
|
1447
1438
|
messages [--limit N]
|
|
@@ -1449,11 +1440,19 @@ function mailUsage() {
|
|
|
1449
1440
|
raw <message_id>
|
|
1450
1441
|
attachment --message-id <id> --attachment-id <id> [--out file]
|
|
1451
1442
|
request <METHOD> <path> [--body @json] [--raw]
|
|
1452
|
-
lint --body @draft.txt | <stdin>
|
|
1443
|
+
lint --body @draft.txt | <stdin> content-quality check (AI-tells, slop); exit 1 on violations
|
|
1444
|
+
|
|
1445
|
+
Body flags — matches AgentMail CLI + REST and the wider convention
|
|
1446
|
+
(Mailgun / SendGrid / Resend / Postmark all use the same text vs html split):
|
|
1447
|
+
|
|
1448
|
+
--text @file Plain text body, ships as text/plain MIME part.
|
|
1449
|
+
--html @file HTML body, ships as text/html MIME part.
|
|
1450
|
+
Both Ships as multipart/alternative (text fallback + html).
|
|
1453
1451
|
|
|
1454
1452
|
Mail uses the inbox-scoped token in ~/.autark/credentials.json. --dry-run
|
|
1455
|
-
prints the payload without hitting SES. lint is fully local
|
|
1456
|
-
|
|
1453
|
+
prints the payload without hitting SES. lint is fully local and only
|
|
1454
|
+
inspects content quality (slop / AI-tells) — markup correctness is a
|
|
1455
|
+
CLI/convention concern, not a slop concern.`)
|
|
1457
1456
|
}
|
|
1458
1457
|
|
|
1459
1458
|
function usage() {
|
package/package.json
CHANGED