@essentialai/cogent 3.7.0 → 3.8.0
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/CHANGELOG.md +7 -0
- package/dist/types/message.d.ts +21 -0
- package/dist/types/message.d.ts.map +1 -1
- package/dist/types/message.js +10 -0
- package/dist/types/message.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [3.8.0] - 2026-08-12
|
|
4
|
+
|
|
5
|
+
### Added — Cogent Mail attachments reference layer (M2.5)
|
|
6
|
+
- `Attachment` interface + `AttachmentSchema` (`url?`, `mailMessageId?`, `name?`, `mimeType?`,
|
|
7
|
+
`size?`) and an optional `attachments?: Attachment[]` on `MessageRecord` (+ Zod schema). Purely
|
|
8
|
+
additive — records without attachments serialize byte-identically.
|
|
9
|
+
|
|
3
10
|
## [3.7.0] - 2026-08-08
|
|
4
11
|
|
|
5
12
|
### Added — Cogent Mail A2A card + PeerInfo mailbox (M2.6)
|
package/dist/types/message.d.ts
CHANGED
|
@@ -1,4 +1,23 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Cogent Mail M2.5 — an attachment REFERENCE carried on the wire (the byte transport is
|
|
4
|
+
* email; this is the reference layer). Either a public `url` (Discord/public links) OR a
|
|
5
|
+
* `mailMessageId` the recipient fetches with `cogent_fetch_mail`. `name`/`mimeType`/`size`
|
|
6
|
+
* are descriptive. Additive + optional → no-attachment messages are byte-for-byte unchanged.
|
|
7
|
+
*/
|
|
8
|
+
export interface Attachment {
|
|
9
|
+
/** Fetchable ref: a public URL (pass-through) — mutually informative with mailMessageId. */
|
|
10
|
+
url?: string;
|
|
11
|
+
/** Fetchable ref: an IMAP message-id in the recipient's mailbox (fetch via cogent_fetch_mail). */
|
|
12
|
+
mailMessageId?: string;
|
|
13
|
+
/** Display name / filename. */
|
|
14
|
+
name?: string;
|
|
15
|
+
/** MIME type, e.g. "image/png". */
|
|
16
|
+
mimeType?: string;
|
|
17
|
+
/** Size in bytes, if known. */
|
|
18
|
+
size?: number;
|
|
19
|
+
}
|
|
20
|
+
export declare const AttachmentSchema: z.ZodType<Attachment>;
|
|
2
21
|
/** Output shape for MessageRecord schema -- used for isolatedDeclarations compatibility. */
|
|
3
22
|
export interface MessageRecord {
|
|
4
23
|
id: string;
|
|
@@ -12,6 +31,8 @@ export interface MessageRecord {
|
|
|
12
31
|
error: string | null;
|
|
13
32
|
/** Platform that originated this message -- used for echo suppression in multi-platform sessions. */
|
|
14
33
|
originPlatform?: "cc" | "codex" | "slack" | "gchat" | "web" | "gemini" | "whatsapp" | "telegram" | "discord";
|
|
34
|
+
/** Cogent Mail M2.5 — file REFERENCES (byte transport = email). Optional/additive. */
|
|
35
|
+
attachments?: Attachment[];
|
|
15
36
|
}
|
|
16
37
|
/**
|
|
17
38
|
* MessageRecord schema -- describes a message exchanged between peers.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../src/types/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,4FAA4F;AAC5F,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,qGAAqG;IACrG,cAAc,CAAC,EAAE,IAAI,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../src/types/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB,4FAA4F;IAC5F,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,kGAAkG;IAClG,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,+BAA+B;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+BAA+B;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,gBAAgB,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAQiC,CAAC;AAErF,4FAA4F;AAC5F,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,qGAAqG;IACrG,cAAc,CAAC,EAAE,IAAI,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,CAAC;IAC7G,sFAAsF;IACtF,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;CAC5B;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,CAAC,CAAC,OAAO,CAAC,aAAa,CAYvD,CAAC"}
|
package/dist/types/message.js
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
export const AttachmentSchema = z
|
|
3
|
+
.object({
|
|
4
|
+
url: z.string().optional().describe("Public/fetchable URL reference"),
|
|
5
|
+
mailMessageId: z.string().optional().describe("IMAP message-id in the recipient mailbox"),
|
|
6
|
+
name: z.string().optional().describe("Display name / filename"),
|
|
7
|
+
mimeType: z.string().optional().describe("MIME type"),
|
|
8
|
+
size: z.number().int().nonnegative().optional().describe("Size in bytes"),
|
|
9
|
+
})
|
|
10
|
+
.describe("A file reference carried alongside a message (byte transport = email)");
|
|
2
11
|
/**
|
|
3
12
|
* MessageRecord schema -- describes a message exchanged between peers.
|
|
4
13
|
* Migrated from cogent-bridge src/types.ts MessageRecord interface.
|
|
@@ -14,5 +23,6 @@ export const MessageRecordSchema = z.object({
|
|
|
14
23
|
success: z.boolean().describe("Whether delivery succeeded"),
|
|
15
24
|
error: z.string().nullable().describe("Error message if delivery failed"),
|
|
16
25
|
originPlatform: z.enum(["cc", "codex", "slack", "gchat", "web", "gemini", "whatsapp", "telegram", "discord"]).optional().describe("Platform that originated this message"),
|
|
26
|
+
attachments: z.array(AttachmentSchema).optional().describe("Cogent Mail M2.5 — file references (byte transport = email)"),
|
|
17
27
|
});
|
|
18
28
|
//# sourceMappingURL=message.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.js","sourceRoot":"","sources":["../../src/types/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"message.js","sourceRoot":"","sources":["../../src/types/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAqBxB,MAAM,CAAC,MAAM,gBAAgB,GAA0B,CAAC;KACrD,MAAM,CAAC;IACN,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,gCAAgC,CAAC;IACrE,a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