@rubytech/create-maxy-code 0.1.467 → 0.1.469
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/lib/storage-broker/dist/__tests__/cf-exec.test.js +12 -2
- package/payload/platform/lib/storage-broker/dist/__tests__/cf-exec.test.js.map +1 -1
- package/payload/platform/lib/storage-broker/dist/cf-exec.d.ts +9 -1
- package/payload/platform/lib/storage-broker/dist/cf-exec.d.ts.map +1 -1
- package/payload/platform/lib/storage-broker/dist/cf-exec.js +10 -3
- package/payload/platform/lib/storage-broker/dist/cf-exec.js.map +1 -1
- package/payload/platform/lib/storage-broker/src/__tests__/cf-exec.test.ts +26 -3
- package/payload/platform/lib/storage-broker/src/cf-exec.ts +16 -3
- package/payload/platform/plugins/admin/skills/platform-architecture/SKILL.md +33 -1
- package/payload/platform/plugins/docs/references/admin-ui.md +32 -0
- package/payload/platform/plugins/google/references/auth.md +82 -12
- package/payload/platform/services/claude-session-manager/dist/account-title-stores.d.ts +17 -4
- package/payload/platform/services/claude-session-manager/dist/account-title-stores.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/account-title-stores.js +50 -13
- package/payload/platform/services/claude-session-manager/dist/account-title-stores.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/fs-watcher.d.ts +7 -0
- package/payload/platform/services/claude-session-manager/dist/fs-watcher.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/fs-watcher.js +8 -0
- package/payload/platform/services/claude-session-manager/dist/fs-watcher.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/http-server.js +8 -8
- package/payload/platform/services/claude-session-manager/dist/http-server.js.map +1 -1
- package/payload/server/{chunk-FOYHK255.js → chunk-56WJMBQQ.js} +3 -3
- package/payload/server/server.js +47 -30
- package/payload/server/{src-52M7SECF.js → src-JYPKMWJR.js} +1 -1
|
@@ -151,8 +151,8 @@ function objectUrl(accountId, bucket, key) {
|
|
|
151
151
|
return `https://api.cloudflare.com/client/v4/accounts/${accountId}/r2/buckets/${encodeURIComponent(bucket)}/objects/${encodeObjectKey(key)}`;
|
|
152
152
|
}
|
|
153
153
|
var defaultFetch = (url, init) => fetch(url, init);
|
|
154
|
-
var defaultRun2 = (cmd, args, env) => new Promise((resolve, reject) => {
|
|
155
|
-
execFile2(cmd, args, { env }, (err, stdout, stderr) => {
|
|
154
|
+
var defaultRun2 = (cmd, args, env, opts) => new Promise((resolve, reject) => {
|
|
155
|
+
execFile2(cmd, args, { env, cwd: opts?.cwd }, (err, stdout, stderr) => {
|
|
156
156
|
if (err) {
|
|
157
157
|
reject(new Error(`${cmd} ${args.join(" ")} failed: ${err.message}
|
|
158
158
|
${stderr}`));
|
|
@@ -343,7 +343,7 @@ function makeCfExec(cred, run = defaultRun2, fetchFn = defaultFetch) {
|
|
|
343
343
|
async pagesDeploy(dir, project, branch) {
|
|
344
344
|
const args = ["wrangler", "pages", "deploy", dir, "--project-name", project];
|
|
345
345
|
if (branch !== void 0) args.push("--branch", branch);
|
|
346
|
-
const { stdout } = await run("npx", args, env);
|
|
346
|
+
const { stdout } = await run("npx", args, env, { cwd: dir });
|
|
347
347
|
const plain = stdout.replace(/\[[0-9;]*m/g, "");
|
|
348
348
|
const urls = plain.match(/https:\/\/[A-Za-z0-9._-]+\.pages\.dev/g);
|
|
349
349
|
const url = urls?.[urls.length - 1];
|
package/payload/server/server.js
CHANGED
|
@@ -126,7 +126,7 @@ import {
|
|
|
126
126
|
registerResource,
|
|
127
127
|
resolveOwner,
|
|
128
128
|
tooLargeMessage
|
|
129
|
-
} from "./chunk-
|
|
129
|
+
} from "./chunk-56WJMBQQ.js";
|
|
130
130
|
import {
|
|
131
131
|
__commonJS,
|
|
132
132
|
__toESM
|
|
@@ -5316,9 +5316,6 @@ function getStatus() {
|
|
|
5316
5316
|
terminalReason: conn.terminalReason
|
|
5317
5317
|
}));
|
|
5318
5318
|
}
|
|
5319
|
-
function getSocket(accountId) {
|
|
5320
|
-
return connections.get(accountId)?.sock ?? null;
|
|
5321
|
-
}
|
|
5322
5319
|
function findConnectionByKey(conns, accountId) {
|
|
5323
5320
|
return conns.find((c) => c.accountId === accountId) ?? conns.find((c) => c.platformAccountId === accountId);
|
|
5324
5321
|
}
|
|
@@ -7085,6 +7082,21 @@ function createScheduleInjectRoutes(deps) {
|
|
|
7085
7082
|
// server/index.ts
|
|
7086
7083
|
var import_dist9 = __toESM(require_dist(), 1);
|
|
7087
7084
|
|
|
7085
|
+
// app/lib/whatsapp/socket-resolution-error.ts
|
|
7086
|
+
function formatPresentKeys(presentKeys) {
|
|
7087
|
+
return presentKeys.join(",") || "none";
|
|
7088
|
+
}
|
|
7089
|
+
function formatSocketResolutionReason(res) {
|
|
7090
|
+
return res.reason === "key-miss" ? `key-miss presentKeys=${formatPresentKeys(res.presentKeys)}` : "disconnected";
|
|
7091
|
+
}
|
|
7092
|
+
function formatSocketResolutionMessage(res, accountId, opts = {}) {
|
|
7093
|
+
if (res.reason === "key-miss") {
|
|
7094
|
+
return `WhatsApp socket key miss: no socket is registered for accountId=${accountId} (present keys: ${formatPresentKeys(res.presentKeys)}). This is an account-keying fault, not a dropped link \u2014 do not advise re-pairing.`;
|
|
7095
|
+
}
|
|
7096
|
+
const clause = opts.disconnectedClause ? `; ${opts.disconnectedClause}` : "";
|
|
7097
|
+
return `WhatsApp account "${accountId}" is registered but its transport is down${clause}.`;
|
|
7098
|
+
}
|
|
7099
|
+
|
|
7088
7100
|
// app/lib/telegram/outbound/send-text.ts
|
|
7089
7101
|
async function sendTelegramText(botToken, chatId, text) {
|
|
7090
7102
|
try {
|
|
@@ -7907,16 +7919,9 @@ async function sendWhatsAppDocument(input) {
|
|
|
7907
7919
|
const jid = normalizeJid2(to);
|
|
7908
7920
|
const res = resolveSocket(accountId);
|
|
7909
7921
|
if (!res.ok) {
|
|
7910
|
-
const reason = res
|
|
7922
|
+
const reason = formatSocketResolutionReason(res);
|
|
7911
7923
|
console.error(`${TAG20} sent document to=${jid} file=${filename} bytes=${fileStat.size} ok=false reason=${reason}`);
|
|
7912
|
-
|
|
7913
|
-
return {
|
|
7914
|
-
ok: false,
|
|
7915
|
-
status: 503,
|
|
7916
|
-
error: `WhatsApp socket key miss: no socket is registered for accountId=${accountId} (present keys: ${res.presentKeys.join(",") || "none"}). This is an account-keying fault, not a dropped link \u2014 do not advise re-pairing.`
|
|
7917
|
-
};
|
|
7918
|
-
}
|
|
7919
|
-
return { ok: false, status: 503, error: `WhatsApp account "${accountId}" is registered but its transport is down.` };
|
|
7924
|
+
return { ok: false, status: 503, error: formatSocketResolutionMessage(res, accountId) };
|
|
7920
7925
|
}
|
|
7921
7926
|
const sock = res.sock;
|
|
7922
7927
|
const buffer = Buffer.from(await readFile(resolvedPath));
|
|
@@ -8448,11 +8453,12 @@ app2.post("/config", async (c) => {
|
|
|
8448
8453
|
}
|
|
8449
8454
|
case "list-groups": {
|
|
8450
8455
|
const groupAccountId = accountId ?? "default";
|
|
8451
|
-
const
|
|
8452
|
-
if (!
|
|
8453
|
-
console.error(`${TAG22} config action=list-groups error="
|
|
8454
|
-
return c.json({ ok: false, error:
|
|
8456
|
+
const groupRes = resolveSocket(groupAccountId);
|
|
8457
|
+
if (!groupRes.ok) {
|
|
8458
|
+
console.error(`${TAG22} config action=list-groups error="${formatSocketResolutionReason(groupRes)}" accountId=${groupAccountId}`);
|
|
8459
|
+
return c.json({ ok: false, error: formatSocketResolutionMessage(groupRes, groupAccountId) });
|
|
8455
8460
|
}
|
|
8461
|
+
const sock = groupRes.sock;
|
|
8456
8462
|
try {
|
|
8457
8463
|
const participating = await sock.groupFetchAllParticipating();
|
|
8458
8464
|
const groups = Object.values(participating).map((g) => ({
|
|
@@ -8761,11 +8767,12 @@ app2.get("/group-info", async (c) => {
|
|
|
8761
8767
|
console.error(`${TAG22} group-info error="not a group JID" jid=${jid} account=${accountId}`);
|
|
8762
8768
|
return c.json({ error: `"${jid}" is not a group JID. Group JIDs end with @g.us.` }, 400);
|
|
8763
8769
|
}
|
|
8764
|
-
const
|
|
8765
|
-
if (!
|
|
8766
|
-
console.error(`${TAG22} group-info error="
|
|
8767
|
-
return c.json({ error:
|
|
8770
|
+
const res = resolveSocket(accountId);
|
|
8771
|
+
if (!res.ok) {
|
|
8772
|
+
console.error(`${TAG22} group-info error="${formatSocketResolutionReason(res)}" account=${accountId}`);
|
|
8773
|
+
return c.json({ error: formatSocketResolutionMessage(res, accountId) }, 400);
|
|
8768
8774
|
}
|
|
8775
|
+
const sock = res.sock;
|
|
8769
8776
|
const meta = await sock.groupMetadata(jid);
|
|
8770
8777
|
const result = {
|
|
8771
8778
|
jid: meta.id,
|
|
@@ -9301,7 +9308,7 @@ app3.post("/r2/object/delete", envelopeBodyLimit("write"), async (c) => {
|
|
|
9301
9308
|
});
|
|
9302
9309
|
var storage_broker_default = app3;
|
|
9303
9310
|
async function runStorageAudit(root) {
|
|
9304
|
-
const { reconcileStorage } = await import("./src-
|
|
9311
|
+
const { reconcileStorage } = await import("./src-JYPKMWJR.js");
|
|
9305
9312
|
const session = getSession();
|
|
9306
9313
|
try {
|
|
9307
9314
|
const cf = await makeHouseCfExec(root);
|
|
@@ -9334,7 +9341,7 @@ async function runStorageAudit(root) {
|
|
|
9334
9341
|
}
|
|
9335
9342
|
}
|
|
9336
9343
|
async function runPagesAudit(root) {
|
|
9337
|
-
const { reconcilePages } = await import("./src-
|
|
9344
|
+
const { reconcilePages } = await import("./src-JYPKMWJR.js");
|
|
9338
9345
|
const session = getSession();
|
|
9339
9346
|
try {
|
|
9340
9347
|
const cf = await makeHousePagesExec(root);
|
|
@@ -25590,20 +25597,29 @@ function startNativeFileFollower(input) {
|
|
|
25590
25597
|
};
|
|
25591
25598
|
const sid = input.senderId.slice(0, 8);
|
|
25592
25599
|
let lastComposingAt = Number.NEGATIVE_INFINITY;
|
|
25600
|
+
const presenceSock = (state) => {
|
|
25601
|
+
const res = resolveSocket(input.accountId);
|
|
25602
|
+
if (!res.ok) {
|
|
25603
|
+
console.error(
|
|
25604
|
+
`[whatsapp-adaptor] op=presence state=${state} sender=${sid} ok=false reason=${formatSocketResolutionReason(res)}`
|
|
25605
|
+
);
|
|
25606
|
+
return null;
|
|
25607
|
+
}
|
|
25608
|
+
console.error(`[whatsapp-adaptor] op=presence state=${state} sender=${sid}`);
|
|
25609
|
+
return res.sock;
|
|
25610
|
+
};
|
|
25593
25611
|
const onActivity = () => {
|
|
25594
25612
|
const now = Date.now();
|
|
25595
25613
|
if (now - lastComposingAt < COMPOSING_REFRESH_MS) return;
|
|
25596
25614
|
lastComposingAt = now;
|
|
25597
|
-
const sock =
|
|
25615
|
+
const sock = presenceSock("composing");
|
|
25598
25616
|
if (!sock) return;
|
|
25599
|
-
console.error(`[whatsapp-adaptor] op=presence state=composing sender=${sid}`);
|
|
25600
25617
|
void sendComposing(sock, input.senderId);
|
|
25601
25618
|
};
|
|
25602
25619
|
const onTurnComplete = () => {
|
|
25603
25620
|
lastComposingAt = Number.NEGATIVE_INFINITY;
|
|
25604
|
-
const sock =
|
|
25621
|
+
const sock = presenceSock("paused");
|
|
25605
25622
|
if (!sock) return;
|
|
25606
|
-
console.error(`[whatsapp-adaptor] op=presence state=paused sender=${sid}`);
|
|
25607
25623
|
void sendPaused(sock, input.senderId);
|
|
25608
25624
|
};
|
|
25609
25625
|
return startFollower({
|
|
@@ -27000,10 +27016,11 @@ var scheduleInjectRoutes = createScheduleInjectRoutes({
|
|
|
27000
27016
|
const res = resolveSocket(accountId);
|
|
27001
27017
|
if (!res.ok) {
|
|
27002
27018
|
if (res.reason === "key-miss") {
|
|
27003
|
-
console.error(`[whatsapp-native] op=socket-key-miss accountId=${accountId} presentKeys=${res.presentKeys
|
|
27004
|
-
throw new Error(`WhatsApp socket key miss: no socket is registered for accountId=${accountId} (present keys: ${res.presentKeys.join(",") || "none"}). This is an account-keying fault, not a dropped link \u2014 do not advise re-pairing.`);
|
|
27019
|
+
console.error(`[whatsapp-native] op=socket-key-miss accountId=${accountId} presentKeys=${formatPresentKeys(res.presentKeys)}`);
|
|
27005
27020
|
}
|
|
27006
|
-
throw new Error(
|
|
27021
|
+
throw new Error(
|
|
27022
|
+
formatSocketResolutionMessage(res, accountId, { disconnectedClause: "cannot deliver scheduled reply" })
|
|
27023
|
+
);
|
|
27007
27024
|
}
|
|
27008
27025
|
await sendTextMessage(res.sock, toWhatsappJid(destination), text, { accountId: res.accountId });
|
|
27009
27026
|
},
|