predictor-outreach 0.2.0 → 0.3.1
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/README.md +27 -11
- package/SKILL.md +10 -2
- package/dist/bounce-collector.d.ts +43 -0
- package/dist/bounce-collector.js +276 -0
- package/dist/client.d.ts +1 -1
- package/dist/client.js +2 -1
- package/dist/config.d.ts +2 -0
- package/dist/config.js +18 -0
- package/dist/dsn.d.ts +7 -0
- package/dist/dsn.js +114 -0
- package/dist/executor.d.ts +11 -1
- package/dist/executor.js +32 -5
- package/dist/imap.d.ts +23 -0
- package/dist/imap.js +121 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +4 -0
- package/dist/journal.d.ts +3 -1
- package/dist/journal.js +3 -2
- package/dist/main.js +36 -7
- package/dist/private-config.d.ts +2 -0
- package/dist/private-config.js +1 -1
- package/dist/private-state.d.ts +5 -0
- package/dist/private-state.js +126 -0
- package/dist/server.d.ts +2 -1
- package/dist/server.js +12 -2
- package/dist/smtp.js +1 -1
- package/dist/types.d.ts +11 -1
- package/dist/types.js +18 -0
- package/openapi.json +74 -1
- package/package.json +4 -1
package/openapi.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"openapi": "3.1.0",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Predictor Outreach v1",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.3.1",
|
|
6
6
|
"description": "Email-confirmed self-service or invited tenant API. Connect issues a scoped, expiring, revocable token exactly once to the CLI. SMTP credentials never leave the local plugin. All quota, review, suppression and circuit controls remain enforced."
|
|
7
7
|
},
|
|
8
8
|
"servers": [
|
|
@@ -416,6 +416,49 @@
|
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
418
|
},
|
|
419
|
+
"/bounce-reports": {
|
|
420
|
+
"post": {
|
|
421
|
+
"operationId": "bounce_report",
|
|
422
|
+
"description": "Requires outreach:send. Local IMAP collector reports a permanent DSN matched to this tenant's original campaign, authorization, address, mailbox and Message-ID. Server reparses bounded raw MIME and rechecks evidence. Repeated same report is idempotent; accepted bounce immediately applies existing suppression and circuit controls. Credentials and ordinary inbox messages must never be submitted.",
|
|
423
|
+
"requestBody": {
|
|
424
|
+
"required": true,
|
|
425
|
+
"content": {
|
|
426
|
+
"application/json": {
|
|
427
|
+
"schema": { "$ref": "#/components/schemas/BounceReport" }
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
},
|
|
431
|
+
"responses": {
|
|
432
|
+
"200": {
|
|
433
|
+
"description": "Permanent bounce accepted or already processed",
|
|
434
|
+
"content": {
|
|
435
|
+
"application/json": {
|
|
436
|
+
"schema": {
|
|
437
|
+
"type": "object",
|
|
438
|
+
"additionalProperties": false,
|
|
439
|
+
"required": ["id", "classification", "duplicate", "suppressed"],
|
|
440
|
+
"properties": {
|
|
441
|
+
"id": { "$ref": "#/components/schemas/Uuid" },
|
|
442
|
+
"classification": { "const": "bounce" },
|
|
443
|
+
"duplicate": { "type": "boolean" },
|
|
444
|
+
"suppressed": { "const": true }
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
},
|
|
450
|
+
"400": {
|
|
451
|
+
"description": "Invalid bounded DTO or missing/ambiguous/non-permanent DSN evidence"
|
|
452
|
+
},
|
|
453
|
+
"401": { "$ref": "#/components/responses/Unauthorized" },
|
|
454
|
+
"403": {
|
|
455
|
+
"description": "Scope, tenant, campaign or original delivery evidence mismatch"
|
|
456
|
+
},
|
|
457
|
+
"409": { "description": "Same DSN identifier has changed content; stop and inspect" },
|
|
458
|
+
"413": { "description": "Bounce JSON exceeds the endpoint's bounded body limit" }
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
},
|
|
419
462
|
"/replies": {
|
|
420
463
|
"get": {
|
|
421
464
|
"operationId": "replies_list",
|
|
@@ -652,6 +695,36 @@
|
|
|
652
695
|
}
|
|
653
696
|
}
|
|
654
697
|
},
|
|
698
|
+
"BounceReport": {
|
|
699
|
+
"type": "object",
|
|
700
|
+
"additionalProperties": false,
|
|
701
|
+
"required": [
|
|
702
|
+
"batchId",
|
|
703
|
+
"address",
|
|
704
|
+
"mailbox",
|
|
705
|
+
"authorizationId",
|
|
706
|
+
"originalMessageId",
|
|
707
|
+
"rawMimeBase64"
|
|
708
|
+
],
|
|
709
|
+
"properties": {
|
|
710
|
+
"batchId": { "$ref": "#/components/schemas/Uuid" },
|
|
711
|
+
"address": { "$ref": "#/components/schemas/Address" },
|
|
712
|
+
"mailbox": { "$ref": "#/components/schemas/Address" },
|
|
713
|
+
"authorizationId": { "$ref": "#/components/schemas/Uuid" },
|
|
714
|
+
"originalMessageId": {
|
|
715
|
+
"type": "string",
|
|
716
|
+
"maxLength": 998,
|
|
717
|
+
"pattern": "^<[^\\s<>@]+@[^\\s<>@]+>$",
|
|
718
|
+
"description": "Original ASCII Message-ID from this exact local delivery; control characters forbidden"
|
|
719
|
+
},
|
|
720
|
+
"rawMimeBase64": {
|
|
721
|
+
"type": "string",
|
|
722
|
+
"maxLength": 262144,
|
|
723
|
+
"contentEncoding": "base64",
|
|
724
|
+
"description": "Canonical base64 of the matched permanent DSN only; decoded raw MIME at most 196608 bytes"
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
},
|
|
655
728
|
"Receipt": {
|
|
656
729
|
"type": "object",
|
|
657
730
|
"additionalProperties": false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "predictor-outreach",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Predictor Agent outreach MCP and credential-local SMTP executor",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -36,11 +36,14 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@modelcontextprotocol/sdk": "1.30.0",
|
|
39
|
+
"imapflow": "1.7.6",
|
|
40
|
+
"mailparser": "3.9.17",
|
|
39
41
|
"nodemailer": "9.0.6",
|
|
40
42
|
"zod": "4.4.3"
|
|
41
43
|
},
|
|
42
44
|
"devDependencies": {
|
|
43
45
|
"@types/node": "24.13.3",
|
|
46
|
+
"@types/mailparser": "3.4.6",
|
|
44
47
|
"@types/nodemailer": "8.0.1",
|
|
45
48
|
"typescript": "6.0.3",
|
|
46
49
|
"vitest": "4.1.11"
|