@rubytech/create-maxy-code 0.1.363 → 0.1.364
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/package.json +1 -1
- package/payload/platform/plugins/whatsapp/.claude-plugin/plugin.json +1 -1
- package/payload/platform/plugins/whatsapp/PLUGIN.md +8 -1
- package/payload/platform/plugins/whatsapp/mcp/dist/index.js +16 -0
- package/payload/platform/plugins/whatsapp/mcp/dist/index.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.generated.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.generated.js +1 -0
- package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.generated.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/http-server.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/http-server.js +40 -6
- package/payload/platform/services/claude-session-manager/dist/http-server.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/system-prompt.d.ts +8 -0
- package/payload/platform/services/claude-session-manager/dist/system-prompt.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/system-prompt.js +25 -3
- package/payload/platform/services/claude-session-manager/dist/system-prompt.js.map +1 -1
- package/payload/platform/templates/specialists/agents/personal-assistant.md +1 -1
- package/payload/server/public/assets/{graph-BIAaLslC.js → graph-CYMIe4B_.js} +4 -4
- package/payload/server/public/graph.html +1 -1
- package/payload/server/server.js +37 -0
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
6
|
<title>Graph — Maxy</title>
|
|
7
7
|
<link rel="icon" href="/favicon.ico">
|
|
8
|
-
<script type="module" crossorigin src="/assets/graph-
|
|
8
|
+
<script type="module" crossorigin src="/assets/graph-CYMIe4B_.js"></script>
|
|
9
9
|
<link rel="modulepreload" crossorigin href="/assets/chunk-CAM3fms7.js">
|
|
10
10
|
<link rel="modulepreload" crossorigin href="/assets/OperatorConversations-BwnO3IUP.js">
|
|
11
11
|
<link rel="modulepreload" crossorigin href="/assets/graph-labels-CXt55mIP.js">
|
package/payload/server/server.js
CHANGED
|
@@ -6622,6 +6622,43 @@ app2.post("/send-document", async (c) => {
|
|
|
6622
6622
|
return c.json({ error: String(err) }, 500);
|
|
6623
6623
|
}
|
|
6624
6624
|
});
|
|
6625
|
+
app2.post("/send-admin", async (c) => {
|
|
6626
|
+
try {
|
|
6627
|
+
const body = await c.req.json().catch(() => ({}));
|
|
6628
|
+
const { phone, text } = body;
|
|
6629
|
+
if (!phone || typeof phone !== "string") {
|
|
6630
|
+
return c.json({ error: 'Missing required field "phone" (E.164 format, e.g. +441234567890).' }, 400);
|
|
6631
|
+
}
|
|
6632
|
+
if (!text || typeof text !== "string") {
|
|
6633
|
+
return c.json({ error: 'Missing required field "text".' }, 400);
|
|
6634
|
+
}
|
|
6635
|
+
const account = resolveAccount();
|
|
6636
|
+
if (!account) {
|
|
6637
|
+
return c.json({ error: "No account configured." }, 500);
|
|
6638
|
+
}
|
|
6639
|
+
const adminPhones = readAdminPhones(account.accountDir);
|
|
6640
|
+
if (!isAdminPhone(phone, adminPhones)) {
|
|
6641
|
+
console.error(`[whatsapp:outbound] op=send-refused reason=not-admin-phone to=${phone}`);
|
|
6642
|
+
return c.json(
|
|
6643
|
+
{ error: `Refused: ${phone} is not on the admin-phone list. Only a number registered with whatsapp-config add-admin-phone can receive an agent-initiated send.` },
|
|
6644
|
+
403
|
|
6645
|
+
);
|
|
6646
|
+
}
|
|
6647
|
+
const accountId = validateAccountId(body.accountId);
|
|
6648
|
+
const sock = getSocket(accountId);
|
|
6649
|
+
if (!sock) {
|
|
6650
|
+
return c.json({ error: `WhatsApp account "${accountId}" is not connected.` }, 503);
|
|
6651
|
+
}
|
|
6652
|
+
const result = await sendTextMessage(sock, normalizeE164(phone), text, { accountId });
|
|
6653
|
+
if (!result.success) {
|
|
6654
|
+
return c.json({ error: result.error ?? "send failed" }, 500);
|
|
6655
|
+
}
|
|
6656
|
+
return c.json({ success: true, messageId: result.messageId });
|
|
6657
|
+
} catch (err) {
|
|
6658
|
+
console.error(`${TAG20} send-admin error: ${String(err)}`);
|
|
6659
|
+
return c.json({ error: String(err) }, 500);
|
|
6660
|
+
}
|
|
6661
|
+
});
|
|
6625
6662
|
app2.get("/activity", (c) => {
|
|
6626
6663
|
try {
|
|
6627
6664
|
const accountId = c.req.query("accountId") ?? void 0;
|