@mono-agent/agent-app 0.11.2 → 0.11.3
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/LICENSE +674 -0
- package/dist/cli.d.ts +3 -3
- package/dist/cli.js +4 -4
- package/dist/cli.js.map +1 -1
- package/dist/config-reference.d.ts.map +1 -1
- package/dist/config-reference.js +20 -5
- package/dist/config-reference.js.map +1 -1
- package/dist/configured-agent.js +3 -1
- package/dist/configured-agent.js.map +1 -1
- package/dist/doctor.d.ts +5 -5
- package/dist/doctor.js +54 -20
- package/dist/doctor.js.map +1 -1
- package/dist/readiness-probe-worker.d.ts.map +1 -1
- package/dist/readiness-probe-worker.js +5 -2
- package/dist/readiness-probe-worker.js.map +1 -1
- package/dist/readiness-probe.d.ts.map +1 -1
- package/dist/readiness-probe.js +7 -0
- package/dist/readiness-probe.js.map +1 -1
- package/package.json +16 -16
- package/schema/mono-agent.config.schema.json +28 -4
- package/skills/mono-agent-composer/references/config-blueprint.md +83 -8
- package/skills/mono-agent-composer/references/discovery-questions.md +6 -4
- package/skills/mono-agent-composer/references/feature-coverage.md +90 -76
- package/skills/mono-agent-composer/references/package-map.md +3 -1
- package/skills/mono-agent-composer/references/playbooks.md +11 -8
- package/dist/notify-runtime.d.ts +0 -26
- package/dist/notify-runtime.d.ts.map +0 -1
- package/dist/notify-runtime.js +0 -27
- package/dist/notify-runtime.js.map +0 -1
- package/dist/notify-tool.d.ts +0 -51
- package/dist/notify-tool.d.ts.map +0 -1
- package/dist/notify-tool.js +0 -182
- package/dist/notify-tool.js.map +0 -1
- package/dist/recipes/base.d.ts +0 -15
- package/dist/recipes/base.d.ts.map +0 -1
- package/dist/recipes/base.js +0 -51
- package/dist/recipes/base.js.map +0 -1
- package/dist/recipes/catalog.d.ts +0 -4
- package/dist/recipes/catalog.d.ts.map +0 -1
- package/dist/recipes/catalog.js +0 -525
- package/dist/recipes/catalog.js.map +0 -1
- package/dist/recipes/index.d.ts +0 -11
- package/dist/recipes/index.d.ts.map +0 -1
- package/dist/recipes/index.js +0 -14
- package/dist/recipes/index.js.map +0 -1
- package/dist/recipes/types.d.ts +0 -70
- package/dist/recipes/types.d.ts.map +0 -1
- package/dist/recipes/types.js +0 -15
- package/dist/recipes/types.js.map +0 -1
- package/dist/setup.d.ts +0 -29
- package/dist/setup.d.ts.map +0 -1
- package/dist/setup.js +0 -97
- package/dist/setup.js.map +0 -1
package/dist/notify-tool.js
DELETED
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
import { createServer } from "node:http";
|
|
2
|
-
import { randomBytes, timingSafeEqual } from "node:crypto";
|
|
3
|
-
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
4
|
-
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
|
|
5
|
-
import * as z from "zod/v4";
|
|
6
|
-
/**
|
|
7
|
-
* In-process MCP server that exposes the proactive-notification tools to the agent.
|
|
8
|
-
*
|
|
9
|
-
* Unlike `memory_recall`/the adapter send tools (stdio children that re-derive
|
|
10
|
-
* everything from config/disk), notification delivery has to run a real turn on a
|
|
11
|
-
* destination channel's LIVE session, so the handler must reach the app's running
|
|
12
|
-
* channel registry — which only exists in this process. We therefore host the
|
|
13
|
-
* tools over loopback HTTP (the one MCP transport the runtime's client supports
|
|
14
|
-
* for an in-process server) and close over app-supplied delivery/discovery hooks.
|
|
15
|
-
*
|
|
16
|
-
* Two tools, both intended for proactive cron/webhook turns (the runtime extension
|
|
17
|
-
* only injects this server for those):
|
|
18
|
-
* - `list_notify_destinations` — discover the conversations the agent may notify
|
|
19
|
-
* (answers "how do I get a conversationId?" when there is no triggering payload).
|
|
20
|
-
* - `notify_conversation` — deliver a message as a real turn into one of them.
|
|
21
|
-
*/
|
|
22
|
-
export const NOTIFY_TOOLS_MCP_SERVER_NAME = "mono-agent-notify";
|
|
23
|
-
const MCP_PATH = "/mcp";
|
|
24
|
-
/**
|
|
25
|
-
* Start the in-process notify MCP server on an ephemeral loopback port. Stateless:
|
|
26
|
-
* each request gets a fresh `McpServer`+transport (the tools are pure request/response),
|
|
27
|
-
* which sidesteps session bookkeeping and concurrent-trigger races.
|
|
28
|
-
*/
|
|
29
|
-
export async function startNotifyToolsServer(deps) {
|
|
30
|
-
const token = randomBytes(24).toString("hex");
|
|
31
|
-
const expectedAuth = `Bearer ${token}`;
|
|
32
|
-
const httpServer = createServer((req, res) => {
|
|
33
|
-
void handleHttpRequest(req, res, expectedAuth, deps);
|
|
34
|
-
});
|
|
35
|
-
await new Promise((resolve, reject) => {
|
|
36
|
-
const onError = (error) => reject(error);
|
|
37
|
-
httpServer.once("error", onError);
|
|
38
|
-
httpServer.listen(0, "127.0.0.1", () => {
|
|
39
|
-
httpServer.removeListener("error", onError);
|
|
40
|
-
resolve();
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
const address = httpServer.address();
|
|
44
|
-
if (address === null || typeof address === "string") {
|
|
45
|
-
httpServer.close();
|
|
46
|
-
throw new Error("notify tools server: failed to bind a loopback port.");
|
|
47
|
-
}
|
|
48
|
-
const url = `http://127.0.0.1:${address.port}${MCP_PATH}`;
|
|
49
|
-
return {
|
|
50
|
-
url,
|
|
51
|
-
token,
|
|
52
|
-
close: () => new Promise((resolve) => {
|
|
53
|
-
httpServer.close(() => resolve());
|
|
54
|
-
}),
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
async function handleHttpRequest(req, res, expectedAuth, deps) {
|
|
58
|
-
if (!isAuthorized(req, expectedAuth)) {
|
|
59
|
-
res.writeHead(401, { "content-type": "application/json" });
|
|
60
|
-
res.end(JSON.stringify({ error: "unauthorized" }));
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
if (req.url?.split("?", 1)[0] !== MCP_PATH) {
|
|
64
|
-
res.writeHead(404, { "content-type": "application/json" });
|
|
65
|
-
res.end(JSON.stringify({ error: "not found" }));
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
// Stateless: only POST carries JSON-RPC. The single tool round-trips are
|
|
69
|
-
// request/response, so reject the optional GET/DELETE session streams.
|
|
70
|
-
if (req.method !== "POST") {
|
|
71
|
-
res.writeHead(405, { "content-type": "application/json", allow: "POST" });
|
|
72
|
-
res.end(JSON.stringify({ error: "method not allowed" }));
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
const server = buildMcpServer(deps);
|
|
76
|
-
// Stateless: omitting sessionIdGenerator runs the transport without session
|
|
77
|
-
// tracking, so a fresh server+transport per request is the correct pattern and
|
|
78
|
-
// concurrent triggers never share state.
|
|
79
|
-
const transport = new StreamableHTTPServerTransport({});
|
|
80
|
-
// Idempotent: with HTTP keep-alive the response can `finish` without firing
|
|
81
|
-
// `close`, so bind both and guard against a double-close leaking nothing.
|
|
82
|
-
let cleaned = false;
|
|
83
|
-
const cleanup = () => {
|
|
84
|
-
if (cleaned)
|
|
85
|
-
return;
|
|
86
|
-
cleaned = true;
|
|
87
|
-
void transport.close();
|
|
88
|
-
void server.close();
|
|
89
|
-
};
|
|
90
|
-
res.on("close", cleanup);
|
|
91
|
-
res.on("finish", cleanup);
|
|
92
|
-
try {
|
|
93
|
-
// The transport implements the SDK Transport interface at runtime; the cast
|
|
94
|
-
// bridges an exactOptionalPropertyTypes mismatch in the SDK's own typings.
|
|
95
|
-
await server.connect(transport);
|
|
96
|
-
await transport.handleRequest(req, res);
|
|
97
|
-
}
|
|
98
|
-
catch (error) {
|
|
99
|
-
deps.logger?.error?.("notify tools server: request failed.", { reason: reasonOf(error) });
|
|
100
|
-
if (!res.headersSent) {
|
|
101
|
-
res.writeHead(500, { "content-type": "application/json" });
|
|
102
|
-
res.end(JSON.stringify({ error: "internal error" }));
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
function isAuthorized(req, expectedAuth) {
|
|
107
|
-
const header = req.headers.authorization;
|
|
108
|
-
if (typeof header !== "string") {
|
|
109
|
-
return false;
|
|
110
|
-
}
|
|
111
|
-
const a = Buffer.from(header);
|
|
112
|
-
const b = Buffer.from(expectedAuth);
|
|
113
|
-
return a.length === b.length && timingSafeEqual(a, b);
|
|
114
|
-
}
|
|
115
|
-
function buildMcpServer(deps) {
|
|
116
|
-
const server = new McpServer({ name: "agent-notify-tools", version: "0.1.0" });
|
|
117
|
-
server.registerTool("list_notify_destinations", {
|
|
118
|
-
title: "List notification destinations",
|
|
119
|
-
description: "List the conversations you can proactively deliver a message to with notify_conversation. " +
|
|
120
|
-
"Use this when you have no triggering conversationId in hand (e.g. a scheduled/cron run) to " +
|
|
121
|
-
"discover where to reach the user. Each entry's `conversationId` is what notify_conversation " +
|
|
122
|
-
"expects — read its description for how delivery works (the destination turn's reply is what is sent).",
|
|
123
|
-
inputSchema: {},
|
|
124
|
-
}, async () => {
|
|
125
|
-
const destinations = await deps.listDestinations();
|
|
126
|
-
const lines = destinations.length === 0
|
|
127
|
-
? ["(no known destinations yet — the agent has not handled any push-channel conversation and no single allowlisted destination is configured)"]
|
|
128
|
-
: destinations.map((d) => `- ${d.conversationId}${d.lastSeen === undefined ? "" : ` (last active ${d.lastSeen})`}${d.fromAllowlist === true ? " (allowlisted, not yet used)" : ""}`);
|
|
129
|
-
return {
|
|
130
|
-
content: [{ type: "text", text: ["Conversations you can notify:", ...lines].join("\n") }],
|
|
131
|
-
structuredContent: { destinations },
|
|
132
|
-
};
|
|
133
|
-
});
|
|
134
|
-
server.registerTool("notify_conversation", {
|
|
135
|
-
title: "Notify a conversation",
|
|
136
|
-
description: "Proactively deliver a message into a conversation you are not currently handling. The message " +
|
|
137
|
-
"runs as a real turn on that conversation's own session and THAT TURN'S REPLY is what the user " +
|
|
138
|
-
"receives (so the user sees it natively and the conversation remembers it). Use this to follow up " +
|
|
139
|
-
"from a cron job or an inbound webhook callback.\n\n" +
|
|
140
|
-
"How `text` is delivered (read carefully — this is the #1 mistake):\n" +
|
|
141
|
-
"- `text` is the stimulus the destination conversation acts on; it is NOT posted verbatim. The " +
|
|
142
|
-
"destination agent reads `text` and composes the user-facing reply with its own context, and that " +
|
|
143
|
-
"reply is delivered automatically.\n" +
|
|
144
|
-
"- To deliver pre-composed or exact content (e.g. a digest), phrase `text` as an explicit reply " +
|
|
145
|
-
"instruction, e.g.: \"Reply with the text below exactly as written, adding nothing, and do not call " +
|
|
146
|
-
"any tools — your reply is delivered automatically:\\n\\n<your content>\".\n" +
|
|
147
|
-
"- The destination must NOT call its own send tools (e.g. slack_send_message) — its reply is already " +
|
|
148
|
-
"delivered, so sending again posts the message twice.\n\n" +
|
|
149
|
-
"How to choose `conversationId`:\n" +
|
|
150
|
-
"- Webhook/async callback: pass the `conversationId` carried in the triggering request payload.\n" +
|
|
151
|
-
"- Otherwise (e.g. a scheduled run): call list_notify_destinations first and pick from it.\n\n" +
|
|
152
|
-
"Delivery is bounded by the channel allowlist and may return delivered:false (e.g. unknown/disallowed " +
|
|
153
|
-
"id, channel offline). The call blocks until the destination turn replies, so keep that turn to a single " +
|
|
154
|
-
"reply — a turn that re-scans, recalls, or hunts for a send tool is slow and can hit the request timeout. " +
|
|
155
|
-
"If you receive delivered:false, do not assume it was also delivered some other way.",
|
|
156
|
-
inputSchema: {
|
|
157
|
-
conversationId: z
|
|
158
|
-
.string()
|
|
159
|
-
.min(1)
|
|
160
|
-
.describe("Destination conversationId, e.g. telegram:42 or slack:C123 (or slack:C123:1718.99 for a thread)."),
|
|
161
|
-
text: z
|
|
162
|
-
.string()
|
|
163
|
-
.min(1)
|
|
164
|
-
.describe("What to deliver. The destination conversation runs this as a turn and its reply is delivered; " +
|
|
165
|
-
"to deliver exact content, phrase this as a reply-verbatim, no-tools instruction (see the tool description)."),
|
|
166
|
-
},
|
|
167
|
-
}, async (args) => {
|
|
168
|
-
const result = await deps.deliver(args.conversationId, args.text);
|
|
169
|
-
const summary = result.delivered
|
|
170
|
-
? `Delivered to ${args.conversationId}.`
|
|
171
|
-
: `Not delivered to ${args.conversationId}${result.reason === undefined ? "" : `: ${result.reason}`}.`;
|
|
172
|
-
return {
|
|
173
|
-
content: [{ type: "text", text: summary }],
|
|
174
|
-
structuredContent: { delivered: result.delivered, ...(result.reason === undefined ? {} : { reason: result.reason }) },
|
|
175
|
-
};
|
|
176
|
-
});
|
|
177
|
-
return server;
|
|
178
|
-
}
|
|
179
|
-
function reasonOf(error) {
|
|
180
|
-
return error instanceof Error ? error.message : String(error);
|
|
181
|
-
}
|
|
182
|
-
//# sourceMappingURL=notify-tool.js.map
|
package/dist/notify-tool.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"notify-tool.js","sourceRoot":"","sources":["../src/notify-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAA0D,MAAM,WAAW,CAAC;AACjG,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAG3D,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC;AACnG,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAK5B;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,mBAAmB,CAAC;AA8BhE,MAAM,QAAQ,GAAG,MAAM,CAAC;AAExB;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,IAAqB;IAChE,MAAM,KAAK,GAAG,WAAW,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9C,MAAM,YAAY,GAAG,UAAU,KAAK,EAAE,CAAC;IAEvC,MAAM,UAAU,GAAG,YAAY,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;QAC3C,KAAK,iBAAiB,CAAC,GAAG,EAAE,GAAG,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;IAEH,MAAM,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;Q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son } from "@mono-agent/config";
|
|
2
|
-
import type { RecipeInput, RecipeInputValues } from "./types.js";
|
|
3
|
-
export declare const DEFAULT_MODEL = "claude:claude-sonnet-4-6";
|
|
4
|
-
/** The model input every recipe shares; overridable from `--model`. */
|
|
5
|
-
export declare const MODEL_INPUT: RecipeInput;
|
|
6
|
-
/**
|
|
7
|
-
* The adapter-neutral skeleton every recipe extends: runtime model, identity,
|
|
8
|
-
* empty tool policy, local artifacts, and the trace registry. Recipes spread
|
|
9
|
-
* this and add their channel / memory / sandbox / observability blocks. Mirrors
|
|
10
|
-
* `init.ts`'s scaffold so a recipe-built folder matches a hand-init'd one.
|
|
11
|
-
*/
|
|
12
|
-
export declare function baseConfig(input: RecipeInputValues): MonoAgentConfigJson;
|
|
13
|
-
/** A `memory` block for the given tier, rooted at the standard memory path. */
|
|
14
|
-
export declare function memoryBlock(mode: "lite" | "journal" | "bujo"): NonNullable<MonoAgentConfigJson["memory"]>;
|
|
15
|
-
//# sourceMappingURL=base.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/recipes/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAG9D,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEjE,eAAO,MAAM,aAAa,6BAA6B,CAAC;AAExD,uEAAuE;AACvE,eAAO,MAAM,WAAW,EAAE,WAKzB,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,iBAAiB,GAAG,mBAAmB,CA0BxE;AAED,+EAA+E;AAC/E,wBAAgB,WAAW,CACzB,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAChC,WAAW,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC,CAM5C"}
|
package/dist/recipes/base.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { monoAgentConfigWithSchema } from "../config-reference.js";
|
|
2
|
-
export const DEFAULT_MODEL = "claude:claude-sonnet-4-6";
|
|
3
|
-
/** The model input every recipe shares; overridable from `--model`. */
|
|
4
|
-
export const MODEL_INPUT = {
|
|
5
|
-
id: "model",
|
|
6
|
-
label: "Model",
|
|
7
|
-
description: "Primary runtime model reference, e.g. claude:claude-sonnet-4-6, codex:gpt-5.5, pi:ollama:gemma4:31b.",
|
|
8
|
-
default: DEFAULT_MODEL,
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* The adapter-neutral skeleton every recipe extends: runtime model, identity,
|
|
12
|
-
* empty tool policy, local artifacts, and the trace registry. Recipes spread
|
|
13
|
-
* this and add their channel / memory / sandbox / observability blocks. Mirrors
|
|
14
|
-
* `init.ts`'s scaffold so a recipe-built folder matches a hand-init'd one.
|
|
15
|
-
*/
|
|
16
|
-
export function baseConfig(input) {
|
|
17
|
-
return monoAgentConfigWithSchema({
|
|
18
|
-
runtime: {
|
|
19
|
-
model: input.model ?? DEFAULT_MODEL,
|
|
20
|
-
workspace: ".",
|
|
21
|
-
},
|
|
22
|
-
context: {
|
|
23
|
-
identityPath: "./IDENTITY.md",
|
|
24
|
-
selectedSkills: [],
|
|
25
|
-
},
|
|
26
|
-
tools: {
|
|
27
|
-
allowedTools: [],
|
|
28
|
-
disallowedTools: [],
|
|
29
|
-
},
|
|
30
|
-
artifacts: {
|
|
31
|
-
dir: "./.mono-agent/artifacts",
|
|
32
|
-
retention: {
|
|
33
|
-
maxAgeDays: 365,
|
|
34
|
-
maxCount: 50000,
|
|
35
|
-
dryRun: false,
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
traceability: {
|
|
39
|
-
registryDir: "./.mono-agent/trace-sources",
|
|
40
|
-
},
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
/** A `memory` block for the given tier, rooted at the standard memory path. */
|
|
44
|
-
export function memoryBlock(mode) {
|
|
45
|
-
return {
|
|
46
|
-
mode,
|
|
47
|
-
path: "./.mono-agent/memory",
|
|
48
|
-
writeMode: mode === "bujo" ? "capture" : "append-host-summary",
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
//# sourceMappingURL=base.js.map
|
package/dist/recipes/base.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/recipes/base.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAGnE,MAAM,CAAC,MAAM,aAAa,GAAG,0BAA0B,CAAC;AAExD,uEAAuE;AACvE,MAAM,CAAC,MAAM,WAAW,GAAgB;IACtC,EAAE,EAAE,OAAO;IACX,KAAK,EAAE,OAAO;IACd,WAAW,EAAE,sGAAsG;IACnH,OAAO,EAAE,aAAa;CACvB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAC,KAAwB;IACjD,OAAO,yBAAyB,CAAC;QAC/B,OAAO,EAAE;YACP,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,aAAa;YACnC,SAAS,EAAE,GAAG;SACf;QACD,OAAO,EAAE;YACP,YAAY,EAAE,eAAe;YAC7B,cAAc,EAAE,EAAE;SACnB;QACD,KAAK,EAAE;YACL,YAAY,EAAE,EAAE;YAChB,eAAe,EAAE,EAAE;SACpB;QACD,SAAS,EAAE;YACT,GAAG,EAAE,yBAAyB;YAC9B,SAAS,EAAE;gBACT,UAAU,EAAE,GAAG;gBACf,QAAQ,EAAE,KAAK;gBACf,MAAM,EAAE,KAAK;aACd;SACF;QACD,YAAY,EAAE;YACZ,WAAW,EAAE,6BAA6B;SAC3C;KACqB,CAAC,CAAC;AAC5B,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,WAAW,CACzB,IAAiC;IAEjC,OAAO;QACL,IAAI;QACJ,IAAI,EAAE,sBAAsB;QAC5B,SAAS,EAAE,IAAI,KAAK,MAAM,CAAC,C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