@essentialai/cogent 3.6.0 → 3.7.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 +18 -0
- package/dist/a2a/agent-card.d.ts +10 -0
- package/dist/a2a/agent-card.d.ts.map +1 -1
- package/dist/a2a/agent-card.js +36 -2
- package/dist/a2a/agent-card.js.map +1 -1
- package/dist/types/message.d.ts +1 -1
- package/dist/types/message.d.ts.map +1 -1
- package/dist/types/message.js +1 -1
- package/dist/types/message.js.map +1 -1
- package/dist/types/peer.d.ts +8 -2
- package/dist/types/peer.d.ts.map +1 -1
- package/dist/types/peer.js +3 -2
- package/dist/types/peer.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [3.7.0] - 2026-08-08
|
|
4
|
+
|
|
5
|
+
### Added — Cogent Mail A2A card + PeerInfo mailbox (M2.6)
|
|
6
|
+
- `PeerInfo` gains an optional `mailboxAddress` (+ `PeerInfoSchema`) — the peer's auto-provisioned
|
|
7
|
+
Cogent Mail address (non-secret; present on Team peers once a mailbox exists). The mailbox
|
|
8
|
+
password is NOT a field on `PeerInfo` and can never reach a card.
|
|
9
|
+
- `peerInfoToAgentCard` emits the mailbox as a `capabilities.extensions[]` entry
|
|
10
|
+
(`uri: https://cogent.tools/a2a/ext/mailbox`, `params: { address }`) in both the v1.0.1 and
|
|
11
|
+
v0.3.0 card shapes when present. Chosen over a `supportedInterfaces[]` `mailto:` (which would
|
|
12
|
+
falsely advertise an email task-interaction interface). Builder stays pure.
|
|
13
|
+
|
|
14
|
+
## [3.6.1] - 2026-08-06
|
|
15
|
+
|
|
16
|
+
### Added — multi-tenant surface platforms
|
|
17
|
+
- `PeerInfo` platform/transport unions + `PeerInfoSchema` zod enums gain `telegram`/`discord`
|
|
18
|
+
(`telegram-bot`/`discord-bot` transports) so the Telegram + Discord surface adapters register as
|
|
19
|
+
first-class peers. Additive only — Slack/WhatsApp/agent platforms unchanged.
|
|
20
|
+
|
|
3
21
|
## [3.6.0] - 2026-08-05
|
|
4
22
|
|
|
5
23
|
### Added — A2A Agent Card
|
package/dist/a2a/agent-card.d.ts
CHANGED
|
@@ -22,6 +22,16 @@ import type { PeerInfo } from "../types/peer.js";
|
|
|
22
22
|
export declare const COGENT_PROTOCOL_BINDING = "COGENT-RELAY";
|
|
23
23
|
/** The A2A protocol major.minor this card's interface exposes. */
|
|
24
24
|
export declare const A2A_PROTOCOL_VERSION = "1.0";
|
|
25
|
+
/**
|
|
26
|
+
* URI identifying the Cogent Mail capability EXTENSION on an Agent Card. When a peer has an
|
|
27
|
+
* auto-provisioned mailbox we advertise its ADDRESS here (see toMailboxExtensions). We use an
|
|
28
|
+
* `AgentExtension` (capabilities.extensions[]) — NOT a supportedInterfaces[] entry — because the
|
|
29
|
+
* A2A spec reserves `supportedInterfaces` for task-interaction transports (an absolute HTTPS URL
|
|
30
|
+
* + protocol binding); a `mailto:` there would falsely advertise an EMAIL task interface. The
|
|
31
|
+
* extension mechanism is the SDK's intended, least-abusive place for agent-specific protocol
|
|
32
|
+
* metadata with typed `params`, and it validates against @a2a-js/sdk's AgentExtension with no cast.
|
|
33
|
+
*/
|
|
34
|
+
export declare const COGENT_MAILBOX_EXTENSION_URI = "https://cogent.tools/a2a/ext/mailbox";
|
|
25
35
|
export interface AgentCardContext {
|
|
26
36
|
/** Base relay endpoint (e.g. https://cogent.tools) — the peer is addressed inside a session under it. */
|
|
27
37
|
endpoint: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-card.d.ts","sourceRoot":"","sources":["../../src/a2a/agent-card.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"agent-card.d.ts","sourceRoot":"","sources":["../../src/a2a/agent-card.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,SAAS,EAA8B,MAAM,aAAa,CAAC;AACzE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEjD;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,iBAAiB,CAAC;AAEtD,kEAAkE;AAClE,eAAO,MAAM,oBAAoB,QAAQ,CAAC;AAE1C;;;;;;;;GAQG;AACH,eAAO,MAAM,4BAA4B,yCAAyC,CAAC;AAEnF,MAAM,WAAW,gBAAgB;IAC/B,yGAAyG;IACzG,QAAQ,EAAE,MAAM,CAAC;IACjB,sDAAsD;IACtD,SAAS,EAAE,MAAM,CAAC;IAClB,qGAAqG;IACrG,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kGAAkG;IAClG,WAAW,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;CACjC;AAED;;;;GAIG;AACH,KAAK,WAAW,GAAG,QAAQ,GAAG;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,IAAI,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAyDF;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,EAAE,gBAAgB,GAAG,SAAS,CAuDvF"}
|
package/dist/a2a/agent-card.js
CHANGED
|
@@ -7,6 +7,16 @@
|
|
|
7
7
|
export const COGENT_PROTOCOL_BINDING = "COGENT-RELAY";
|
|
8
8
|
/** The A2A protocol major.minor this card's interface exposes. */
|
|
9
9
|
export const A2A_PROTOCOL_VERSION = "1.0";
|
|
10
|
+
/**
|
|
11
|
+
* URI identifying the Cogent Mail capability EXTENSION on an Agent Card. When a peer has an
|
|
12
|
+
* auto-provisioned mailbox we advertise its ADDRESS here (see toMailboxExtensions). We use an
|
|
13
|
+
* `AgentExtension` (capabilities.extensions[]) — NOT a supportedInterfaces[] entry — because the
|
|
14
|
+
* A2A spec reserves `supportedInterfaces` for task-interaction transports (an absolute HTTPS URL
|
|
15
|
+
* + protocol binding); a `mailto:` there would falsely advertise an EMAIL task interface. The
|
|
16
|
+
* extension mechanism is the SDK's intended, least-abusive place for agent-specific protocol
|
|
17
|
+
* metadata with typed `params`, and it validates against @a2a-js/sdk's AgentExtension with no cast.
|
|
18
|
+
*/
|
|
19
|
+
export const COGENT_MAILBOX_EXTENSION_URI = "https://cogent.tools/a2a/ext/mailbox";
|
|
10
20
|
/** "role:reviewer" / "auto-resume" → "Reviewer" / "Auto Resume". */
|
|
11
21
|
function titleCase(s) {
|
|
12
22
|
return s
|
|
@@ -36,6 +46,24 @@ function toSkills(peer) {
|
|
|
36
46
|
};
|
|
37
47
|
});
|
|
38
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* A2A capability extensions for a peer. Emits the Cogent Mail extension (address only) when the
|
|
51
|
+
* peer has an auto-provisioned mailbox; otherwise []. The mailbox ADDRESS is non-secret; the
|
|
52
|
+
* mailbox PASSWORD is never part of PeerInfo, so it can never reach the card. PURE.
|
|
53
|
+
*/
|
|
54
|
+
function toMailboxExtensions(peer) {
|
|
55
|
+
const address = peer.mailboxAddress;
|
|
56
|
+
if (!address)
|
|
57
|
+
return [];
|
|
58
|
+
return [
|
|
59
|
+
{
|
|
60
|
+
uri: COGENT_MAILBOX_EXTENSION_URI,
|
|
61
|
+
description: "Cogent Mail mailbox address (non-secret) for this peer.",
|
|
62
|
+
required: false,
|
|
63
|
+
params: { address },
|
|
64
|
+
},
|
|
65
|
+
];
|
|
66
|
+
}
|
|
39
67
|
function synthDescription(peer) {
|
|
40
68
|
const parts = [`Cogent fabric peer on ${peer.platform ?? "cc"}`];
|
|
41
69
|
if (peer.role)
|
|
@@ -60,9 +88,15 @@ export function peerInfoToAgentCard(peer, ctx) {
|
|
|
60
88
|
const version = ctx.clientVersion ?? peer.clientVersion ?? "0.0.0";
|
|
61
89
|
const provider = { organization: `Cogent · ${peer.platform ?? "cc"}`, url: "https://cogent.tools" };
|
|
62
90
|
const skills = toSkills(peer);
|
|
91
|
+
// Cogent Mail M2.6: advertise the peer's mailbox ADDRESS as an A2A capability extension (see
|
|
92
|
+
// COGENT_MAILBOX_EXTENSION_URI). Empty when the peer has no mailbox. Password can never appear
|
|
93
|
+
// here — it is not on PeerInfo. Same array feeds both card shapes below.
|
|
94
|
+
const extensions = toMailboxExtensions(peer);
|
|
63
95
|
if (ctx.cardVersion === "0.3.0") {
|
|
64
96
|
// Opt-in legacy scaffold (top-level url + protocolVersion). Different shape than the v1.0.1 type,
|
|
65
97
|
// hence the deliberate cast — this branch exists only for backward interop, not as the primary card.
|
|
98
|
+
// A2A 0.3.0 also carries capabilities.extensions[]; only surface it when non-empty so a peer
|
|
99
|
+
// WITHOUT a mailbox keeps this branch's original `capabilities: {}` shape byte-for-byte.
|
|
66
100
|
return {
|
|
67
101
|
protocolVersion: "0.3.0",
|
|
68
102
|
name,
|
|
@@ -70,7 +104,7 @@ export function peerInfoToAgentCard(peer, ctx) {
|
|
|
70
104
|
url,
|
|
71
105
|
version,
|
|
72
106
|
provider,
|
|
73
|
-
capabilities: {},
|
|
107
|
+
capabilities: extensions.length ? { extensions } : {},
|
|
74
108
|
defaultInputModes: ["text/plain"],
|
|
75
109
|
defaultOutputModes: ["text/plain"],
|
|
76
110
|
skills,
|
|
@@ -92,7 +126,7 @@ export function peerInfoToAgentCard(peer, ctx) {
|
|
|
92
126
|
tenant: ctx.sessionId,
|
|
93
127
|
},
|
|
94
128
|
],
|
|
95
|
-
capabilities: { extensions
|
|
129
|
+
capabilities: { extensions },
|
|
96
130
|
defaultInputModes: ["text/plain"],
|
|
97
131
|
defaultOutputModes: ["text/plain"],
|
|
98
132
|
skills,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-card.js","sourceRoot":"","sources":["../../src/a2a/agent-card.ts"],"names":[],"mappings":"AAgB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AE,EAAE,UAAU,EAAE;QAC5B,iBAAiB,EAAE,CAAC,YAAY,CAAC;QACjC,kBAAkB,EAAE,CAAC,YAAY,CAAC;QAClC,MAAM;QACN,eAAe,EAAE,EAAE;QACnB,oBAAoB,EAAE,EAAE;QACxB,UAAU,EAAE,EAAE;KACf,CAAC;AACJ,CAAC"}
|
package/dist/types/message.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export interface MessageRecord {
|
|
|
11
11
|
success: boolean;
|
|
12
12
|
error: string | null;
|
|
13
13
|
/** Platform that originated this message -- used for echo suppression in multi-platform sessions. */
|
|
14
|
-
originPlatform?: "cc" | "codex" | "slack" | "gchat" | "web" | "gemini" | "whatsapp";
|
|
14
|
+
originPlatform?: "cc" | "codex" | "slack" | "gchat" | "web" | "gemini" | "whatsapp" | "telegram" | "discord";
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* 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,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,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;CAC9G;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,CAAC,CAAC,OAAO,CAAC,aAAa,CAWvD,CAAC"}
|
package/dist/types/message.js
CHANGED
|
@@ -13,6 +13,6 @@ export const MessageRecordSchema = z.object({
|
|
|
13
13
|
durationMs: z.number().nullable().describe("Round-trip duration in ms"),
|
|
14
14
|
success: z.boolean().describe("Whether delivery succeeded"),
|
|
15
15
|
error: z.string().nullable().describe("Error message if delivery failed"),
|
|
16
|
-
originPlatform: z.enum(["cc", "codex", "slack", "gchat", "web", "gemini", "whatsapp"]).optional().describe("Platform that originated this message"),
|
|
16
|
+
originPlatform: z.enum(["cc", "codex", "slack", "gchat", "web", "gemini", "whatsapp", "telegram", "discord"]).optional().describe("Platform that originated this message"),
|
|
17
17
|
});
|
|
18
18
|
//# sourceMappingURL=message.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.js","sourceRoot":"","sources":["../../src/types/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,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,11 +8,11 @@ export interface PeerInfo {
|
|
|
8
8
|
registeredAt: string;
|
|
9
9
|
lastSeenAt: string;
|
|
10
10
|
/** Platform this peer belongs to (default "cc" for Claude Code). */
|
|
11
|
-
platform?: "cc" | "codex" | "slack" | "gchat" | "web" | "gemini" | "whatsapp";
|
|
11
|
+
platform?: "cc" | "codex" | "slack" | "gchat" | "web" | "gemini" | "whatsapp" | "telegram" | "discord";
|
|
12
12
|
/** Peer type: AI agent or human user. */
|
|
13
13
|
type?: "agent" | "human";
|
|
14
14
|
/** Transport mechanism for this peer. */
|
|
15
|
-
transport?: "ws" | "slack-bot" | "gchat-bot" | "websocket" | "whatsapp-cloud";
|
|
15
|
+
transport?: "ws" | "slack-bot" | "gchat-bot" | "websocket" | "whatsapp-cloud" | "telegram-bot" | "discord-bot";
|
|
16
16
|
/** Platform-specific identity fields (e.g., slackUserId, slackChannelId). */
|
|
17
17
|
platformIdentity?: Record<string, string>;
|
|
18
18
|
/**
|
|
@@ -39,6 +39,12 @@ export interface PeerInfo {
|
|
|
39
39
|
* the peer's A2A Agent Card skills[]. Optional; back-compat.
|
|
40
40
|
*/
|
|
41
41
|
capabilities?: string[];
|
|
42
|
+
/**
|
|
43
|
+
* Auto-provisioned Cogent Mail address (non-secret); present on Team peers once a
|
|
44
|
+
* mailbox exists. Form `[peer]-[channel]@mail.cogent.tools`. Fed onto the peer's A2A
|
|
45
|
+
* Agent Card so other agents can discover it. NEVER carries the password.
|
|
46
|
+
*/
|
|
47
|
+
mailboxAddress?: string;
|
|
42
48
|
}
|
|
43
49
|
/**
|
|
44
50
|
* PeerInfo schema -- describes a registered peer in a bridge session.
|
package/dist/types/peer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"peer.d.ts","sourceRoot":"","sources":["../../src/types/peer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,uFAAuF;AACvF,MAAM,WAAW,QAAQ;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;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAgB7C,CAAC"}
|
package/dist/types/peer.js
CHANGED
|
@@ -10,13 +10,14 @@ export const PeerInfoSchema = z.object({
|
|
|
10
10
|
label: z.string().describe("Human-readable label"),
|
|
11
11
|
registeredAt: z.string().datetime().describe("ISO 8601 registration timestamp"),
|
|
12
12
|
lastSeenAt: z.string().datetime().describe("ISO 8601 last activity timestamp"),
|
|
13
|
-
platform: z.enum(["cc", "codex", "slack", "gchat", "web", "gemini", "whatsapp"]).optional().describe("Platform this peer belongs to"),
|
|
13
|
+
platform: z.enum(["cc", "codex", "slack", "gchat", "web", "gemini", "whatsapp", "telegram", "discord"]).optional().describe("Platform this peer belongs to"),
|
|
14
14
|
type: z.enum(["agent", "human"]).optional().describe("Peer type: AI agent or human user"),
|
|
15
|
-
transport: z.enum(["ws", "slack-bot", "gchat-bot", "websocket", "whatsapp-cloud"]).optional().describe("Transport mechanism for this peer"),
|
|
15
|
+
transport: z.enum(["ws", "slack-bot", "gchat-bot", "websocket", "whatsapp-cloud", "telegram-bot", "discord-bot"]).optional().describe("Transport mechanism for this peer"),
|
|
16
16
|
platformIdentity: z.record(z.string(), z.string()).optional().describe("Platform-specific identity fields (slackUserId, slackChannelId, etc.)"),
|
|
17
17
|
workspaceId: z.string().optional().describe("Durable workspace identifier (Slice 5) — stable id not tied to the mutable cwd hint"),
|
|
18
18
|
threadId: z.string().optional().describe("Durable thread/conversation identifier (Slice 5)"),
|
|
19
19
|
role: z.string().max(64).optional().describe("A2A role advertised by this peer (Agent Card)"),
|
|
20
20
|
capabilities: z.array(z.string().max(64)).max(16).optional().describe("Capability strings → A2A Agent Card skills[]"),
|
|
21
|
+
mailboxAddress: z.string().max(320).optional().describe("Auto-provisioned Cogent Mail address (non-secret); NEVER the password"),
|
|
21
22
|
});
|
|
22
23
|
//# sourceMappingURL=peer.js.map
|
package/dist/types/peer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"peer.js","sourceRoot":"","sources":["../../src/types/peer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"peer.js","sourceRoot":"","sources":["../../src/types/peer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAkDxB;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAwB,CAAC,CAAC,MAAM,CAAC;IAC1D,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,iCAAiC,CAAC;IACrE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,8BAA8B,CAAC;IACrE,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;IAClD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC;IAClD,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC;IAC/E,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kCAAkC,CAAC;IAC9E,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;IAC5J,IAAI,EA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