@agentcomms/whatsapp 0.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/LICENSE +21 -0
- package/README.md +258 -0
- package/THIRD_PARTY_LICENSES +924 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.mjs +3584 -0
- package/dist/coerce-BscjcmYU.mjs +34 -0
- package/dist/dist-COPefvtq-D67MoOnB.mjs +9880 -0
- package/dist/index.d.mts +11605 -0
- package/dist/index.mjs +12 -0
- package/dist/mcp-DXXb3Vv3-Co5BzjYe.mjs +16220 -0
- package/dist/schemas-DiGKNDNq.mjs +5885 -0
- package/dist/server-DJZWYUNK.mjs +215 -0
- package/dist/src-D_zzAWoS-BhK0GFdq-XAvBzdGB.mjs +7806 -0
- package/dist/stdio-BR8R87El.mjs +102 -0
- package/dist/stdio-CHZ2WRcx-5iYMXTdw.mjs +607 -0
- package/dist/stdio-entry-m_AQ55DZ.mjs +21 -0
- package/dist/sync-BUT0jSeG.mjs +9360 -0
- package/package.json +91 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { t as createWhatsAppMcpServer } from "./server-DJZWYUNK.mjs";
|
|
2
|
+
//#region src/mcp/stdio-entry.ts
|
|
3
|
+
/**
|
|
4
|
+
* Starting the stdio server. On stdio, stdout is the protocol, so the console is redirected to stderr first — the
|
|
5
|
+
* same precaution the Slack and Gmail servers take.
|
|
6
|
+
*/
|
|
7
|
+
function redirectConsoleToStderr() {
|
|
8
|
+
const toStderr = (...args) => {
|
|
9
|
+
process.stderr.write(`${args.map((arg) => typeof arg === "string" ? arg : JSON.stringify(arg)).join(" ")}\n`);
|
|
10
|
+
};
|
|
11
|
+
console.log = toStderr;
|
|
12
|
+
console.info = toStderr;
|
|
13
|
+
console.debug = toStderr;
|
|
14
|
+
console.warn = toStderr;
|
|
15
|
+
}
|
|
16
|
+
async function startWhatsAppStdioServer(options = {}) {
|
|
17
|
+
redirectConsoleToStderr();
|
|
18
|
+
await (await createWhatsAppMcpServer(options)).connectStdio();
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { startWhatsAppStdioServer };
|