@rubytech/create-maxy 1.0.878 → 1.0.879
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/cloudflare/PLUGIN.md +9 -0
- package/payload/platform/plugins/docs/references/platform.md +5 -1
- package/payload/platform/templates/agents/admin/IDENTITY.md +2 -0
- package/payload/server/chunk-2INJCOYG.js +1373 -0
- package/payload/server/chunk-DOIAYD3J.js +2282 -0
- package/payload/server/chunk-ICY65BIH.js +11364 -0
- package/payload/server/chunk-Q5J4NI6Q.js +660 -0
- package/payload/server/client-pool-JAM3QHGW.js +34 -0
- package/payload/server/cloudflare-task-tracker-HUTXJQXO.js +20 -0
- package/payload/server/maxy-edge.js +3 -3
- package/payload/server/public/assets/{admin-CZlNLb9T.js → admin-uVxIhs_u.js} +3 -3
- package/payload/server/public/index.html +1 -1
- package/payload/server/server.js +55 -11
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
6
|
<title>Maxy</title>
|
|
7
7
|
<link rel="icon" href="/favicon.ico">
|
|
8
|
-
<script type="module" crossorigin src="/assets/admin-
|
|
8
|
+
<script type="module" crossorigin src="/assets/admin-uVxIhs_u.js"></script>
|
|
9
9
|
<link rel="modulepreload" crossorigin href="/assets/chunk-DD-I1_y5.js">
|
|
10
10
|
<link rel="modulepreload" crossorigin href="/assets/jsx-runtime-BEjEWeaF.js">
|
|
11
11
|
<link rel="modulepreload" crossorigin href="/assets/preload-helper-qlgyTAkD.js">
|
package/payload/server/server.js
CHANGED
|
@@ -75,7 +75,7 @@ import {
|
|
|
75
75
|
vncLog,
|
|
76
76
|
waitForExit,
|
|
77
77
|
writeChromiumWrapper
|
|
78
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-ICY65BIH.js";
|
|
79
79
|
import {
|
|
80
80
|
CDP_PORT,
|
|
81
81
|
COMMERCIAL_MODE,
|
|
@@ -114,7 +114,7 @@ import {
|
|
|
114
114
|
sigtermFlushStreamLogs,
|
|
115
115
|
unregisterSession,
|
|
116
116
|
validateSession
|
|
117
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-2INJCOYG.js";
|
|
118
118
|
import {
|
|
119
119
|
CLOUDFLARE_TASK_DIAGNOSTICS,
|
|
120
120
|
appendCloudflareSteps,
|
|
@@ -122,7 +122,7 @@ import {
|
|
|
122
122
|
openCloudflareTask,
|
|
123
123
|
readTunnelState,
|
|
124
124
|
resolveUnitGoneVerdict
|
|
125
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-Q5J4NI6Q.js";
|
|
126
126
|
import {
|
|
127
127
|
GREETING_DIRECTIVE,
|
|
128
128
|
HAIKU_MODEL,
|
|
@@ -157,7 +157,7 @@ import {
|
|
|
157
157
|
verifyConversationOwnership,
|
|
158
158
|
writeAdminUserAndPerson,
|
|
159
159
|
writeTurnFailure
|
|
160
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-DOIAYD3J.js";
|
|
161
161
|
import {
|
|
162
162
|
__commonJS,
|
|
163
163
|
__toESM
|
|
@@ -6894,7 +6894,7 @@ app9.post("/", async (c) => {
|
|
|
6894
6894
|
const safe = typeof v === "string" ? truncate(v, 200) : typeof v === "number" || typeof v === "boolean" ? String(v) : JSON.stringify(v).slice(0, 200);
|
|
6895
6895
|
return `${k}=${safe}`;
|
|
6896
6896
|
}).join(" ");
|
|
6897
|
-
const TAGGED_PREFIX_SOURCES = /* @__PURE__ */ new Set([]);
|
|
6897
|
+
const TAGGED_PREFIX_SOURCES = /* @__PURE__ */ new Set(["stream-log-click"]);
|
|
6898
6898
|
if (TAGGED_PREFIX_SOURCES.has(source)) {
|
|
6899
6899
|
console.log(
|
|
6900
6900
|
`[${source}] ts=${ts} ip=${ip} version=${version || "unknown"}${extra ? " " + extra : ""}`
|
|
@@ -7472,7 +7472,7 @@ var app11 = new Hono();
|
|
|
7472
7472
|
app11.post("/cancel", requireAdminSession, async (c) => {
|
|
7473
7473
|
const session_key = c.var.cacheKey;
|
|
7474
7474
|
try {
|
|
7475
|
-
const { interruptClient: interruptClient2 } = await import("./client-pool-
|
|
7475
|
+
const { interruptClient: interruptClient2 } = await import("./client-pool-JAM3QHGW.js");
|
|
7476
7476
|
await interruptClient2(session_key);
|
|
7477
7477
|
return c.json({ ok: true });
|
|
7478
7478
|
} catch (err) {
|
|
@@ -8518,7 +8518,12 @@ function reconstructAssistantEvents(content, components, conversationId, message
|
|
|
8518
8518
|
}
|
|
8519
8519
|
valid += 1;
|
|
8520
8520
|
const eventIndex = events.length;
|
|
8521
|
-
events.push({
|
|
8521
|
+
events.push({
|
|
8522
|
+
type: "component",
|
|
8523
|
+
name: c.name,
|
|
8524
|
+
data: parsedData,
|
|
8525
|
+
...c.attachmentId ? { attachmentId: c.attachmentId } : {}
|
|
8526
|
+
});
|
|
8522
8527
|
if (c.submitted === true) {
|
|
8523
8528
|
submittedEventIndices.push(eventIndex);
|
|
8524
8529
|
}
|
|
@@ -8731,13 +8736,15 @@ app18.post("/:id/resume", async (c) => {
|
|
|
8731
8736
|
if (match) {
|
|
8732
8737
|
const mergedComponents = j.components.map((c2, i) => {
|
|
8733
8738
|
const neoComp = match.components?.[i];
|
|
8739
|
+
const attachmentId = neoComp?.attachmentId ?? c2.artefactAttachmentId;
|
|
8734
8740
|
return {
|
|
8735
8741
|
componentId: neoComp?.componentId ?? c2.componentId,
|
|
8736
8742
|
name: c2.name,
|
|
8737
8743
|
data: c2.data,
|
|
8738
8744
|
ordinal: c2.ordinal,
|
|
8739
8745
|
textOffset: c2.textOffset,
|
|
8740
|
-
submitted: neoComp?.submitted ?? false
|
|
8746
|
+
submitted: neoComp?.submitted ?? false,
|
|
8747
|
+
...attachmentId ? { attachmentId } : {}
|
|
8741
8748
|
};
|
|
8742
8749
|
});
|
|
8743
8750
|
return {
|
|
@@ -8761,7 +8768,9 @@ app18.post("/:id/resume", async (c) => {
|
|
|
8761
8768
|
data: c2.data,
|
|
8762
8769
|
ordinal: c2.ordinal,
|
|
8763
8770
|
textOffset: c2.textOffset,
|
|
8764
|
-
submitted: false
|
|
8771
|
+
submitted: false,
|
|
8772
|
+
// Task 989 — JSONL has artefactAttachmentId for persistent components.
|
|
8773
|
+
...c2.artefactAttachmentId ? { attachmentId: c2.artefactAttachmentId } : {}
|
|
8765
8774
|
})),
|
|
8766
8775
|
attachments: []
|
|
8767
8776
|
};
|
|
@@ -9250,6 +9259,31 @@ var CLOUDFLARE_SETUP_FORM_SCHEMA = {
|
|
|
9250
9259
|
// server/routes/admin/cloudflare.ts
|
|
9251
9260
|
var SETUP_TIMEOUT_MS = 10 * 60 * 1e3;
|
|
9252
9261
|
var DOMAINS_TIMEOUT_MS = 40 * 1e3;
|
|
9262
|
+
var discoveryCache = /* @__PURE__ */ new Map();
|
|
9263
|
+
function getDiscoveryEntry(accountId) {
|
|
9264
|
+
let entry = discoveryCache.get(accountId);
|
|
9265
|
+
if (!entry) {
|
|
9266
|
+
entry = { tunnels: [], domains: [] };
|
|
9267
|
+
discoveryCache.set(accountId, entry);
|
|
9268
|
+
}
|
|
9269
|
+
return entry;
|
|
9270
|
+
}
|
|
9271
|
+
function rememberDomains(accountId, domains) {
|
|
9272
|
+
const entry = getDiscoveryEntry(accountId);
|
|
9273
|
+
entry.domains = domains;
|
|
9274
|
+
entry.domainsUpdatedAt = Date.now();
|
|
9275
|
+
}
|
|
9276
|
+
function rememberTunnels(accountId, tunnels) {
|
|
9277
|
+
const entry = getDiscoveryEntry(accountId);
|
|
9278
|
+
entry.tunnels = tunnels;
|
|
9279
|
+
entry.tunnelsUpdatedAt = Date.now();
|
|
9280
|
+
}
|
|
9281
|
+
function readDiscoveryResults(accountId) {
|
|
9282
|
+
if (!accountId) return { tunnels: [], domains: [] };
|
|
9283
|
+
const entry = discoveryCache.get(accountId);
|
|
9284
|
+
if (!entry) return { tunnels: [], domains: [] };
|
|
9285
|
+
return { tunnels: entry.tunnels, domains: entry.domains };
|
|
9286
|
+
}
|
|
9253
9287
|
function loadBrandInfo() {
|
|
9254
9288
|
const platformRoot2 = process.env.MAXY_PLATFORM_ROOT ?? resolve13(process.cwd(), "..");
|
|
9255
9289
|
const brandPath = resolve13(platformRoot2, "config", "brand.json");
|
|
@@ -9423,6 +9457,7 @@ ${result.stderr}` : ""}`;
|
|
|
9423
9457
|
correlationId,
|
|
9424
9458
|
streamLogPath
|
|
9425
9459
|
};
|
|
9460
|
+
rememberDomains(accountId, domains);
|
|
9426
9461
|
const total = Date.now() - started;
|
|
9427
9462
|
log(`phase=response-sent total_ms=${total} count=${domains.length}`);
|
|
9428
9463
|
writeRouteMilestone(
|
|
@@ -9526,6 +9561,7 @@ ${result.stderr}` : ""}`;
|
|
|
9526
9561
|
"cloudflare-tunnels",
|
|
9527
9562
|
`phase=response-sent total_ms=${total} count=${tunnels.length} source=cloudflared${nullTag}`
|
|
9528
9563
|
);
|
|
9564
|
+
rememberTunnels(accountId, tunnels);
|
|
9529
9565
|
const success = { ok: true, tunnels, defaultName, correlationId, streamLogPath };
|
|
9530
9566
|
return c.json(success, 200);
|
|
9531
9567
|
});
|
|
@@ -9535,6 +9571,8 @@ app23.post("/setup", requireAdminSession, async (c) => {
|
|
|
9535
9571
|
let correlationId;
|
|
9536
9572
|
let cacheKeyTail;
|
|
9537
9573
|
let streamLogPath;
|
|
9574
|
+
let resolvedAccountId;
|
|
9575
|
+
const heldInputs = {};
|
|
9538
9576
|
function tag() {
|
|
9539
9577
|
if (!correlationId) return "";
|
|
9540
9578
|
return ` conversationId=${correlationId} session_key=${cacheKeyTail ?? "unknown"}`;
|
|
@@ -9560,7 +9598,9 @@ app23.post("/setup", requireAdminSession, async (c) => {
|
|
|
9560
9598
|
message,
|
|
9561
9599
|
output,
|
|
9562
9600
|
correlationId,
|
|
9563
|
-
streamLogPath
|
|
9601
|
+
streamLogPath,
|
|
9602
|
+
inputsAlreadyHeld: { ...heldInputs },
|
|
9603
|
+
discoveryResults: readDiscoveryResults(resolvedAccountId)
|
|
9564
9604
|
};
|
|
9565
9605
|
return c.json(body2, 200);
|
|
9566
9606
|
}
|
|
@@ -9579,6 +9619,7 @@ app23.post("/setup", requireAdminSession, async (c) => {
|
|
|
9579
9619
|
if (!accountId) {
|
|
9580
9620
|
return err("request", "No account bound to session \u2014 refresh chat.");
|
|
9581
9621
|
}
|
|
9622
|
+
resolvedAccountId = accountId;
|
|
9582
9623
|
if (!correlationId) {
|
|
9583
9624
|
return err("request", "No active conversation for session \u2014 refresh chat.");
|
|
9584
9625
|
}
|
|
@@ -9587,6 +9628,9 @@ app23.post("/setup", requireAdminSession, async (c) => {
|
|
|
9587
9628
|
const adminFqdn = `${body.adminLabel}.${body.adminDomain}`;
|
|
9588
9629
|
const publicFqdn = body.publicLabel ? `${body.publicLabel}.${body.publicDomain}` : void 0;
|
|
9589
9630
|
const apex = body.apex && body.apex.length > 0 ? body.apex : void 0;
|
|
9631
|
+
heldInputs.admin = adminFqdn;
|
|
9632
|
+
if (publicFqdn) heldInputs.public = publicFqdn;
|
|
9633
|
+
if (apex) heldInputs.apex = apex;
|
|
9590
9634
|
log(`phase=submit-received admin=${adminFqdn} public=${publicFqdn ?? "absent"} apex=${apex ?? "absent"}`);
|
|
9591
9635
|
const account = resolveAccount();
|
|
9592
9636
|
if (!account) {
|
|
@@ -13580,7 +13624,7 @@ autoDeliverPremiumPlugins(bootEntitlement?.purchasedPlugins ?? void 0);
|
|
|
13580
13624
|
(async () => {
|
|
13581
13625
|
if (!bootAccount) return;
|
|
13582
13626
|
try {
|
|
13583
|
-
const { recoverRunningCloudflareTasks } = await import("./cloudflare-task-tracker-
|
|
13627
|
+
const { recoverRunningCloudflareTasks } = await import("./cloudflare-task-tracker-HUTXJQXO.js");
|
|
13584
13628
|
const result = await recoverRunningCloudflareTasks(
|
|
13585
13629
|
bootAccount.accountId,
|
|
13586
13630
|
configDirForWhatsApp,
|