@rubytech/create-realagent 1.0.697 → 1.0.700
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/neo4j/schema.cypher +33 -4
- package/payload/platform/plugins/docs/references/deployment.md +1 -0
- package/payload/platform/plugins/docs/references/graph.md +16 -0
- package/payload/platform/plugins/docs/references/platform.md +1 -1
- package/payload/platform/plugins/docs/references/troubleshooting.md +28 -0
- package/payload/server/chunk-32ZHQJNX.js +11395 -0
- package/payload/server/chunk-3VVHVJK2.js +11405 -0
- package/payload/server/chunk-U3W5YIXU.js +11450 -0
- package/payload/server/maxy-edge.js +1 -1
- package/payload/server/public/assets/Checkbox-C24zNZ3g.js +1 -0
- package/payload/server/public/assets/{admin-BsLm49w9.js → admin-BkYrfWaE.js} +8 -8
- package/payload/server/public/assets/{arc-BMhgytDB.js → arc-CRqJUbyK.js} +1 -1
- package/payload/server/public/assets/architecture-YZFGNWBL-CXIHKKCa.js +1 -0
- package/payload/server/public/assets/{architectureDiagram-Q4EWVU46-BePoi8XC.js → architectureDiagram-Q4EWVU46-DtICG195.js} +1 -1
- package/payload/server/public/assets/{blockDiagram-DXYQGD6D-BkiwLTtq.js → blockDiagram-DXYQGD6D-nw1V7I38.js} +1 -1
- package/payload/server/public/assets/{c4Diagram-AHTNJAMY-bpjPj2Ln.js → c4Diagram-AHTNJAMY-C1eEC43O.js} +1 -1
- package/payload/server/public/assets/channel-CA7njeKl.js +1 -0
- package/payload/server/public/assets/{chunk-2KRD3SAO-ZcHg_orY.js → chunk-2KRD3SAO-Bybqj-wj.js} +1 -1
- package/payload/server/public/assets/{chunk-336JU56O-BpATJiGl.js → chunk-336JU56O-Dszn2qEY.js} +2 -2
- package/payload/server/public/assets/chunk-426QAEUC-tWQOa3-I.js +1 -0
- package/payload/server/public/assets/{chunk-4BX2VUAB-zJekz2NU.js → chunk-4BX2VUAB-DrKtrnWH.js} +1 -1
- package/payload/server/public/assets/{chunk-4TB4RGXK-CLXL19Wd.js → chunk-4TB4RGXK-CBFzVYqS.js} +1 -1
- package/payload/server/public/assets/{chunk-55IACEB6-CzqB8aoU.js → chunk-55IACEB6-BNsOFSNf.js} +1 -1
- package/payload/server/public/assets/{chunk-5FUZZQ4R-BoTfWHuW.js → chunk-5FUZZQ4R-CXZykYh_.js} +1 -1
- package/payload/server/public/assets/{chunk-5PVQY5BW-RhIfPCRB.js → chunk-5PVQY5BW-CLNppenz.js} +1 -1
- package/payload/server/public/assets/{chunk-67CJDMHE-mM1sFmlz.js → chunk-67CJDMHE-DFyE0-n0.js} +1 -1
- package/payload/server/public/assets/{chunk-7N4EOEYR-GUck0jv1.js → chunk-7N4EOEYR-BIKZD1_4.js} +1 -1
- package/payload/server/public/assets/{chunk-AA7GKIK3-BYhfUc1V.js → chunk-AA7GKIK3-D4_g24le.js} +1 -1
- package/payload/server/public/assets/{chunk-BSJP7CBP-CTsYuARh.js → chunk-BSJP7CBP-Cd9H-V61.js} +1 -1
- package/payload/server/public/assets/{chunk-CIAEETIT-CGsGmUze.js → chunk-CIAEETIT-CAU9PIQi.js} +1 -1
- package/payload/server/public/assets/{chunk-EDXVE4YY-utELKGQK.js → chunk-EDXVE4YY-CR1JfOwe.js} +1 -1
- package/payload/server/public/assets/{chunk-ENJZ2VHE-CNHjq5xK.js → chunk-ENJZ2VHE-CuXW3Isg.js} +1 -1
- package/payload/server/public/assets/{chunk-FMBD7UC4-DaRrfk3s.js → chunk-FMBD7UC4-BwGAtkIr.js} +1 -1
- package/payload/server/public/assets/{chunk-FOC6F5B3-BaeLcJVt.js → chunk-FOC6F5B3-Cn0552qP.js} +1 -1
- package/payload/server/public/assets/{chunk-ICPOFSXX-Di63NBur.js → chunk-ICPOFSXX-DEZT2XyQ.js} +2 -2
- package/payload/server/public/assets/{chunk-K5T4RW27-CTTOezMH.js → chunk-K5T4RW27-KwBFTzJ9.js} +1 -1
- package/payload/server/public/assets/{chunk-KGLVRYIC-DCkohKP2.js → chunk-KGLVRYIC-1-3y582Z.js} +1 -1
- package/payload/server/public/assets/{chunk-LIHQZDEY-osQO30uB.js → chunk-LIHQZDEY-DXIBsDHL.js} +1 -1
- package/payload/server/public/assets/{chunk-ORNJ4GCN-DoLajOOe.js → chunk-ORNJ4GCN-CRbOike7.js} +1 -1
- package/payload/server/public/assets/{chunk-OYMX7WX6-BSPzqyxs.js → chunk-OYMX7WX6-CVT9itnY.js} +1 -1
- package/payload/server/public/assets/chunk-QZHKN3VN-BwkFBCAY.js +1 -0
- package/payload/server/public/assets/{chunk-U2HBQHQK-BZnA7c4T.js → chunk-U2HBQHQK-BLgNHWFf.js} +1 -1
- package/payload/server/public/assets/{chunk-X2U36JSP-DpQ2OA_c.js → chunk-X2U36JSP-DHYLiYqc.js} +1 -1
- package/payload/server/public/assets/{chunk-XPW4576I-BccP1mlQ.js → chunk-XPW4576I-DBdiQ3Zy.js} +1 -1
- package/payload/server/public/assets/{chunk-YZCP3GAM-BAkNXu0G.js → chunk-YZCP3GAM-DXaosB5Z.js} +1 -1
- package/payload/server/public/assets/{chunk-ZZ45TVLE-DBSm41oP.js → chunk-ZZ45TVLE-B5dCmOpH.js} +1 -1
- package/payload/server/public/assets/classDiagram-6PBFFD2Q-CUZ9BU_6.js +1 -0
- package/payload/server/public/assets/classDiagram-v2-HSJHXN6E-BGYsCDux.js +1 -0
- package/payload/server/public/assets/clone-BjouONkW.js +1 -0
- package/payload/server/public/assets/{cose-bilkent-S5V4N54A-Boeb8aWs.js → cose-bilkent-S5V4N54A-DaHtPQvk.js} +1 -1
- package/payload/server/public/assets/{dagre-KV5264BT-BkvWofSp.js → dagre-KV5264BT-CAL9V_HR.js} +1 -1
- package/payload/server/public/assets/{dagre-nvPNAunb.js → dagre-N8C5Xujx.js} +1 -1
- package/payload/server/public/assets/{data-BKexd229.js → data-lJ2vb2jV.js} +1 -1
- package/payload/server/public/assets/{diagram-5BDNPKRD-CMEgyt4E.js → diagram-5BDNPKRD-pzBSPqlM.js} +1 -1
- package/payload/server/public/assets/{diagram-G4DWMVQ6-ChorrAF0.js → diagram-G4DWMVQ6-DStdLqos.js} +1 -1
- package/payload/server/public/assets/{diagram-MMDJMWI5-D_iD27po.js → diagram-MMDJMWI5-D-SfeX-6.js} +1 -1
- package/payload/server/public/assets/{diagram-TYMM5635-8qXI1ioG.js → diagram-TYMM5635-Cdr1DQ84.js} +1 -1
- package/payload/server/public/assets/{erDiagram-SMLLAGMA-BFjtKDSB.js → erDiagram-SMLLAGMA-CIg1dDZT.js} +1 -1
- package/payload/server/public/assets/{file-DZkqmm8M.js → file-16btGXA4.js} +1 -1
- package/payload/server/public/assets/{flatten-ya0TqRLc.js → flatten-CpKIi5d2.js} +1 -1
- package/payload/server/public/assets/{flowDiagram-DWJPFMVM-Bpd7IL9l.js → flowDiagram-DWJPFMVM-CJtU1T6d.js} +1 -1
- package/payload/server/public/assets/{ganttDiagram-T4ZO3ILL-CwOozU85.js → ganttDiagram-T4ZO3ILL-R4fuRAT1.js} +1 -1
- package/payload/server/public/assets/gitGraph-7Q5UKJZL-tvzbaNdg.js +1 -0
- package/payload/server/public/assets/{gitGraphDiagram-UUTBAWPF-CcPILiC9.js → gitGraphDiagram-UUTBAWPF-sifugSGn.js} +1 -1
- package/payload/server/public/assets/graph-gsP1la3h.js +50 -0
- package/payload/server/public/assets/{graphlib-B_mcXEVr.js → graphlib-DrlxPM8j.js} +1 -1
- package/payload/server/public/assets/{house-CPxWBrMl.js → house-DJ35FtjK.js} +1 -1
- package/payload/server/public/assets/info-OMHHGYJF-ByeBaFw5.js +1 -0
- package/payload/server/public/assets/infoDiagram-42DDH7IO-CjgCxerY.js +2 -0
- package/payload/server/public/assets/{isEmpty-h-wRi_o9.js → isEmpty-C3Vxk1It.js} +1 -1
- package/payload/server/public/assets/{ishikawaDiagram-UXIWVN3A-DOP9-Q8H.js → ishikawaDiagram-UXIWVN3A-CYUJOA2c.js} +1 -1
- package/payload/server/public/assets/{journeyDiagram-VCZTEJTY-DGATg0WC.js → journeyDiagram-VCZTEJTY-UltrLajs.js} +1 -1
- package/payload/server/public/assets/{jsx-runtime-2yRmkrVq.css → jsx-runtime-n7GjUxnC.css} +1 -1
- package/payload/server/public/assets/{kanban-definition-6JOO6SKY-C5PigmKg.js → kanban-definition-6JOO6SKY-BBaThtP3.js} +1 -1
- package/payload/server/public/assets/{line-DlKKhwkO.js → line-BhOwLD_o.js} +1 -1
- package/payload/server/public/assets/{linear-DD4JiB1l.js → linear-D76hoLvZ.js} +1 -1
- package/payload/server/public/assets/{mermaid-parser.core-C8xGCa9p.js → mermaid-parser.core-D8n5xV7A.js} +2 -2
- package/payload/server/public/assets/{mermaid.core-CCUSwZB_.js → mermaid.core-C3TZA9fX.js} +3 -3
- package/payload/server/public/assets/{mindmap-definition-QFDTVHPH-75k-IVhC.js → mindmap-definition-QFDTVHPH-Bv1kghvk.js} +1 -1
- package/payload/server/public/assets/{ordinal-Dwxksj1B.js → ordinal-BLrOss5K.js} +1 -1
- package/payload/server/public/assets/packet-4T2RLAQJ-Csybj5RO.js +1 -0
- package/payload/server/public/assets/pie-ZZUOXDRM-Iw1du1Bn.js +1 -0
- package/payload/server/public/assets/{pieDiagram-DEJITSTG-DN5RsDwZ.js → pieDiagram-DEJITSTG-BSYldcKa.js} +1 -1
- package/payload/server/public/assets/public-D8whQhxR.js +5 -0
- package/payload/server/public/assets/{quadrantDiagram-34T5L4WZ-Sd9x6pNe.js → quadrantDiagram-34T5L4WZ-lCDshgz1.js} +1 -1
- package/payload/server/public/assets/radar-PYXPWWZC-rEet4TBV.js +1 -0
- package/payload/server/public/assets/{reduce-BUuWaDl2.js → reduce-C5tBOlxC.js} +1 -1
- package/payload/server/public/assets/{requirementDiagram-MS252O5E-BDgifYzj.js → requirementDiagram-MS252O5E-C7j42RrO.js} +1 -1
- package/payload/server/public/assets/{sankeyDiagram-XADWPNL6-BX9VULNJ.js → sankeyDiagram-XADWPNL6-plPbHhuF.js} +1 -1
- package/payload/server/public/assets/{sequenceDiagram-FGHM5R23-z3vMxhgE.js → sequenceDiagram-FGHM5R23-D3Y8MXiX.js} +1 -1
- package/payload/server/public/assets/{share-2-Bauv6ctA.js → share-2-C-ICFdTB.js} +1 -1
- package/payload/server/public/assets/{stateDiagram-FHFEXIEX-DlP0hBxF.js → stateDiagram-FHFEXIEX-D4BdhMPy.js} +1 -1
- package/payload/server/public/assets/stateDiagram-v2-QKLJ7IA2-DhKxVkX3.js +1 -0
- package/payload/server/public/assets/{timeline-definition-GMOUNBTQ-DwQbhKCo.js → timeline-definition-GMOUNBTQ-Lh9jrYCl.js} +1 -1
- package/payload/server/public/assets/treeView-SZITEDCU-PaLYyjtc.js +1 -0
- package/payload/server/public/assets/treemap-W4RFUUIX-CEhGYFbO.js +1 -0
- package/payload/server/public/assets/{useVoiceRecorder-BTEcf6H3.js → useVoiceRecorder-xTGR1bpD.js} +8 -8
- package/payload/server/public/assets/{vennDiagram-DHZGUBPP-WTqmZWWa.js → vennDiagram-DHZGUBPP-Cx0v19iv.js} +1 -1
- package/payload/server/public/assets/wardley-RL74JXVD-xtJ4_o4d.js +1 -0
- package/payload/server/public/assets/{wardleyDiagram-NUSXRM2D-BUY50x5T.js → wardleyDiagram-NUSXRM2D-BYewCTre.js} +1 -1
- package/payload/server/public/assets/{x-Kc93nSru.js → x-BrDQr7Iy.js} +1 -1
- package/payload/server/public/assets/{xychartDiagram-5P7HB3ND-Btdq-fDj.js → xychartDiagram-5P7HB3ND-CkfIdbJu.js} +1 -1
- package/payload/server/public/data.html +6 -6
- package/payload/server/public/graph.html +7 -6
- package/payload/server/public/index.html +9 -8
- package/payload/server/public/public.html +6 -5
- package/payload/server/server.js +107 -39
- package/payload/server/public/assets/architecture-YZFGNWBL-S9-oeq_x.js +0 -1
- package/payload/server/public/assets/channel-D3U0_a1j.js +0 -1
- package/payload/server/public/assets/chunk-426QAEUC-Wz6Bpsil.js +0 -1
- package/payload/server/public/assets/chunk-QZHKN3VN-BAQp1OEl.js +0 -1
- package/payload/server/public/assets/classDiagram-6PBFFD2Q-6EGGLDD_.js +0 -1
- package/payload/server/public/assets/classDiagram-v2-HSJHXN6E-DfAV4tgE.js +0 -1
- package/payload/server/public/assets/clone-BoV8noAi.js +0 -1
- package/payload/server/public/assets/gitGraph-7Q5UKJZL-BOC4CldZ.js +0 -1
- package/payload/server/public/assets/graph-CPqHYozW.js +0 -50
- package/payload/server/public/assets/info-OMHHGYJF-BSCPTUIx.js +0 -1
- package/payload/server/public/assets/infoDiagram-42DDH7IO-T2sn--WJ.js +0 -2
- package/payload/server/public/assets/packet-4T2RLAQJ-pBa_ZhNI.js +0 -1
- package/payload/server/public/assets/pie-ZZUOXDRM-BzYOyiMb.js +0 -1
- package/payload/server/public/assets/public-BthX_YNC.js +0 -5
- package/payload/server/public/assets/radar-PYXPWWZC-CTVOaAq6.js +0 -1
- package/payload/server/public/assets/stateDiagram-v2-QKLJ7IA2-DSddQStC.js +0 -1
- package/payload/server/public/assets/treeView-SZITEDCU-OTnF4Qzw.js +0 -1
- package/payload/server/public/assets/treemap-W4RFUUIX-DlIRmHFb.js +0 -1
- package/payload/server/public/assets/wardley-RL74JXVD-DwMXAC4U.js +0 -1
- /package/payload/server/public/assets/{_baseFor-Dn4GSmI6.js → _baseFor-WfS9pKAn.js} +0 -0
- /package/payload/server/public/assets/{array-DJN9YAVf.js → array-HeX70jSN.js} +0 -0
- /package/payload/server/public/assets/{cytoscape.esm-BcJTl1re.js → cytoscape.esm-CDZo0kst.js} +0 -0
- /package/payload/server/public/assets/{defaultLocale-B4F_XsBB.js → defaultLocale-GJwWH1Jr.js} +0 -0
- /package/payload/server/public/assets/{dist-CrzV1W3-.js → dist-BKbAaes5.js} +0 -0
- /package/payload/server/public/assets/{init-DX0Y1qU4.js → init-BPLPMQ3Y.js} +0 -0
- /package/payload/server/public/assets/{jsx-runtime-7o3Lvx89.js → jsx-runtime-CHagz7cd.js} +0 -0
- /package/payload/server/public/assets/{katex-CjHJ1D7d.js → katex-CKZ-HWMQ.js} +0 -0
- /package/payload/server/public/assets/{path-7vUsG-o2.js → path-YdFzr2W6.js} +0 -0
- /package/payload/server/public/assets/{preload-helper-qlgyTAkD.js → preload-helper-BEFjQwLd.js} +0 -0
- /package/payload/server/public/assets/{rough.esm-NLRoWnq-.js → rough.esm-HAx67Hnb.js} +0 -0
- /package/payload/server/public/assets/{src-Bo15iQ7w.js → src-BvrHnOMG.js} +0 -0
package/payload/server/server.js
CHANGED
|
@@ -97,7 +97,7 @@ import {
|
|
|
97
97
|
vncLog,
|
|
98
98
|
waitForExit,
|
|
99
99
|
writeChromiumWrapper
|
|
100
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-U3W5YIXU.js";
|
|
101
101
|
|
|
102
102
|
// ../lib/graph-trash/dist/index.js
|
|
103
103
|
var require_dist = __commonJS({
|
|
@@ -4571,12 +4571,10 @@ app.get("/", async (c) => {
|
|
|
4571
4571
|
const whatsappAnyConnected = whatsappAccounts.some((a) => a.connected);
|
|
4572
4572
|
const whatsappAnyStuck = whatsappAccounts.some((a) => Boolean(a.sessionStuckReason));
|
|
4573
4573
|
let onboardingComplete;
|
|
4574
|
-
|
|
4575
|
-
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
onboardingComplete = step !== null && step >= 6;
|
|
4579
|
-
}
|
|
4574
|
+
const account = resolveAccount();
|
|
4575
|
+
if (account) {
|
|
4576
|
+
const step = await loadOnboardingStep(account.accountId);
|
|
4577
|
+
if (step !== null) onboardingComplete = step >= 6;
|
|
4580
4578
|
}
|
|
4581
4579
|
const reviewDetector = getReviewDetectorSnapshot();
|
|
4582
4580
|
return c.json({
|
|
@@ -4797,12 +4795,21 @@ app2.post("/", async (c) => {
|
|
|
4797
4795
|
role: m.role,
|
|
4798
4796
|
content: m.content
|
|
4799
4797
|
}));
|
|
4800
|
-
const uiMessages =
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4798
|
+
const uiMessages = [];
|
|
4799
|
+
for (const m of neo4jMessages) {
|
|
4800
|
+
if (m.content === GREETING_DIRECTIVE) continue;
|
|
4801
|
+
const ts = new Date(m.createdAt).getTime();
|
|
4802
|
+
if (!Number.isFinite(ts) || ts === 0) {
|
|
4803
|
+
console.error(`[session] dropped malformed createdAt messageId=${m.messageId ?? "unknown"} raw=${JSON.stringify(m.createdAt)}`);
|
|
4804
|
+
continue;
|
|
4805
|
+
}
|
|
4806
|
+
uiMessages.push({
|
|
4807
|
+
role: m.role === "user" ? "visitor" : "maxy",
|
|
4808
|
+
content: m.content,
|
|
4809
|
+
timestamp: ts,
|
|
4810
|
+
...m.role === "user" ? { senderName: m.senderName } : {}
|
|
4811
|
+
});
|
|
4812
|
+
}
|
|
4806
4813
|
const sessionKey2 = crypto.randomUUID();
|
|
4807
4814
|
registerResumedSession(sessionKey2, accountId, agentSlug, groupInfo.conversationId, agentMessages);
|
|
4808
4815
|
setGroupContextForSession(sessionKey2, {
|
|
@@ -5624,15 +5631,24 @@ app4.get("/messages", async (c) => {
|
|
|
5624
5631
|
try {
|
|
5625
5632
|
const messages = await getMessagesSince(conversationId, since, POLL_LIMIT);
|
|
5626
5633
|
console.error(`[group] poll id=${conversationId.slice(0, 8)}\u2026 visitor=${visitorId?.slice(0, 8) ?? "unknown"} since=${since} returned=${messages.length}`);
|
|
5627
|
-
|
|
5628
|
-
|
|
5634
|
+
const mapped = [];
|
|
5635
|
+
for (const m of messages) {
|
|
5636
|
+
const ts = new Date(m.createdAt).getTime();
|
|
5637
|
+
if (!Number.isFinite(ts) || ts === 0) {
|
|
5638
|
+
console.error(`[group] dropped malformed createdAt messageId=${m.messageId} raw=${JSON.stringify(m.createdAt)}`);
|
|
5639
|
+
continue;
|
|
5640
|
+
}
|
|
5641
|
+
mapped.push({
|
|
5629
5642
|
messageId: m.messageId,
|
|
5630
5643
|
role: m.role === "user" ? "visitor" : "maxy",
|
|
5631
5644
|
content: m.content,
|
|
5632
5645
|
senderName: m.senderName,
|
|
5633
5646
|
senderVisitorId: m.senderVisitorId,
|
|
5634
|
-
timestamp:
|
|
5635
|
-
})
|
|
5647
|
+
timestamp: ts
|
|
5648
|
+
});
|
|
5649
|
+
}
|
|
5650
|
+
return c.json({
|
|
5651
|
+
messages: mapped,
|
|
5636
5652
|
hasMore: messages.length >= POLL_LIMIT
|
|
5637
5653
|
});
|
|
5638
5654
|
} catch (err) {
|
|
@@ -7593,10 +7609,11 @@ function rotateIfNeeded() {
|
|
|
7593
7609
|
}
|
|
7594
7610
|
var app9 = new Hono();
|
|
7595
7611
|
app9.post("/", async (c) => {
|
|
7596
|
-
const
|
|
7612
|
+
const client = resolveClientIp(
|
|
7597
7613
|
c.env?.incoming?.socket?.remoteAddress,
|
|
7598
7614
|
c.req.header("x-forwarded-for")
|
|
7599
|
-
)
|
|
7615
|
+
);
|
|
7616
|
+
const ip = client.ip || "unknown";
|
|
7600
7617
|
const rate = checkRateLimit2(ip);
|
|
7601
7618
|
if (!rate.allow) {
|
|
7602
7619
|
if (rate.shouldLog) {
|
|
@@ -10459,6 +10476,14 @@ var FILTER_EXCLUDED_LABELS = Object.freeze(
|
|
|
10459
10476
|
"ReviewAlert"
|
|
10460
10477
|
])
|
|
10461
10478
|
);
|
|
10479
|
+
var AGENT_ACTION_LABELS = Object.freeze(
|
|
10480
|
+
/* @__PURE__ */ new Set([
|
|
10481
|
+
"ToolCall",
|
|
10482
|
+
"StepResult",
|
|
10483
|
+
"WorkflowStep",
|
|
10484
|
+
"WorkflowRun"
|
|
10485
|
+
])
|
|
10486
|
+
);
|
|
10462
10487
|
var CHILD_LABELS = Object.freeze(
|
|
10463
10488
|
/* @__PURE__ */ new Set([
|
|
10464
10489
|
"Message",
|
|
@@ -10512,6 +10537,8 @@ async function handleDefault(c, accountId) {
|
|
|
10512
10537
|
const rawLabels = c.req.query("labels") ?? "";
|
|
10513
10538
|
const labels = rawLabels.split(",").map((s) => s.trim()).filter(Boolean);
|
|
10514
10539
|
const includeTrashed = c.req.query("includeTrashed") === "1";
|
|
10540
|
+
const includeAgentActions = c.req.query("includeAgentActions") === "1";
|
|
10541
|
+
const agentActionLabels = includeAgentActions ? [] : [...AGENT_ACTION_LABELS];
|
|
10515
10542
|
if (labels.length === 0) {
|
|
10516
10543
|
console.error(
|
|
10517
10544
|
`[graph-page] load rejected reason=missing-filter account=${accountId} labels=`
|
|
@@ -10543,14 +10570,15 @@ async function handleDefault(c, accountId) {
|
|
|
10543
10570
|
try {
|
|
10544
10571
|
const countCypher = includeTrashed ? DEFAULT_COUNT_CYPHER_INCLUDE_TRASHED : DEFAULT_COUNT_CYPHER;
|
|
10545
10572
|
const fetchCypher = includeTrashed ? DEFAULT_FETCH_CYPHER_INCLUDE_TRASHED : DEFAULT_FETCH_CYPHER;
|
|
10573
|
+
const cypherParams = { accountId, labels, agentActionLabels };
|
|
10546
10574
|
const result = await session.executeRead(async (tx) => {
|
|
10547
|
-
const countResult = await tx.run(countCypher,
|
|
10575
|
+
const countResult = await tx.run(countCypher, cypherParams);
|
|
10548
10576
|
const matchedRaw = countResult.records[0]?.get("matched");
|
|
10549
10577
|
const matched = typeof matchedRaw === "bigint" ? Number(matchedRaw) : Number(matchedRaw ?? 0);
|
|
10550
10578
|
if (matched > CEILING) {
|
|
10551
10579
|
return { overLimit: true, matched };
|
|
10552
10580
|
}
|
|
10553
|
-
const fetchResult = await tx.run(fetchCypher,
|
|
10581
|
+
const fetchResult = await tx.run(fetchCypher, cypherParams);
|
|
10554
10582
|
const record = fetchResult.records[0];
|
|
10555
10583
|
const rawNodes = record?.get("nodes") ?? [];
|
|
10556
10584
|
const rawEdges = record?.get("edges") ?? [];
|
|
@@ -10575,7 +10603,7 @@ async function handleDefault(c, accountId) {
|
|
|
10575
10603
|
const edges = result.rawEdges.filter((e) => e && e.id != null);
|
|
10576
10604
|
const trashedSuffix = includeTrashed ? " includeTrashed=1" : "";
|
|
10577
10605
|
console.error(
|
|
10578
|
-
`[graph-page] load mode=default account=${accountId} labels=${labels.join(",")}${trashedSuffix} nodes=${nodes.length} edges=${edges.length} ms=${elapsed}`
|
|
10606
|
+
`[graph-page] load mode=default account=${accountId} agentActions=${includeAgentActions} labels=${labels.join(",")}${trashedSuffix} nodes=${nodes.length} edges=${edges.length} ms=${elapsed}`
|
|
10579
10607
|
);
|
|
10580
10608
|
return c.json({ nodes, edges });
|
|
10581
10609
|
} catch (err) {
|
|
@@ -10598,11 +10626,13 @@ async function handleNeighbourhood(c, accountId) {
|
|
|
10598
10626
|
400
|
|
10599
10627
|
);
|
|
10600
10628
|
}
|
|
10629
|
+
const includeAgentActions = c.req.query("includeAgentActions") === "1";
|
|
10630
|
+
const agentActionLabels = includeAgentActions ? [] : [...AGENT_ACTION_LABELS];
|
|
10601
10631
|
const started = Date.now();
|
|
10602
10632
|
const session = getSession();
|
|
10603
10633
|
try {
|
|
10604
10634
|
const result = await session.executeRead(async (tx) => {
|
|
10605
|
-
return await tx.run(NEIGHBOURHOOD_CYPHER, { accountId, elementId });
|
|
10635
|
+
return await tx.run(NEIGHBOURHOOD_CYPHER, { accountId, elementId, agentActionLabels });
|
|
10606
10636
|
});
|
|
10607
10637
|
const record = result.records[0];
|
|
10608
10638
|
const rawNodes = record?.get("nodes") ?? [];
|
|
@@ -10619,7 +10649,7 @@ async function handleNeighbourhood(c, accountId) {
|
|
|
10619
10649
|
const nodes = rawNodes.map((n) => pruneNode(n, warnedClasses, conversationWarnings));
|
|
10620
10650
|
const edges = rawEdges.filter((e) => e && e.id != null);
|
|
10621
10651
|
console.error(
|
|
10622
|
-
`[graph-page] load mode=neighbourhood account=${accountId} elementId=${elementId} nodes=${nodes.length} edges=${edges.length} ms=${elapsed}`
|
|
10652
|
+
`[graph-page] load mode=neighbourhood account=${accountId} agentActions=${includeAgentActions} elementId=${elementId} nodes=${nodes.length} edges=${edges.length} ms=${elapsed}`
|
|
10623
10653
|
);
|
|
10624
10654
|
return c.json({ nodes, edges });
|
|
10625
10655
|
} catch (err) {
|
|
@@ -10638,6 +10668,7 @@ var DEFAULT_COUNT_CYPHER = `
|
|
|
10638
10668
|
MATCH (n)
|
|
10639
10669
|
WHERE n.accountId = $accountId
|
|
10640
10670
|
AND any(lbl IN labels(n) WHERE lbl IN $labels)
|
|
10671
|
+
AND NOT any(lbl IN labels(n) WHERE lbl IN $agentActionLabels)
|
|
10641
10672
|
AND NOT n:Trashed
|
|
10642
10673
|
AND n.deletedAt IS NULL
|
|
10643
10674
|
RETURN count(n) AS matched
|
|
@@ -10651,6 +10682,7 @@ var DEFAULT_FETCH_CYPHER = `
|
|
|
10651
10682
|
MATCH (n)
|
|
10652
10683
|
WHERE n.accountId = $accountId
|
|
10653
10684
|
AND any(lbl IN labels(n) WHERE lbl IN $labels)
|
|
10685
|
+
AND NOT any(lbl IN labels(n) WHERE lbl IN $agentActionLabels)
|
|
10654
10686
|
AND NOT n:Trashed
|
|
10655
10687
|
AND n.deletedAt IS NULL
|
|
10656
10688
|
WITH collect(n) AS nodes, collect(elementId(n)) AS nodeIds
|
|
@@ -10672,6 +10704,7 @@ var DEFAULT_COUNT_CYPHER_INCLUDE_TRASHED = `
|
|
|
10672
10704
|
MATCH (n)
|
|
10673
10705
|
WHERE n.accountId = $accountId
|
|
10674
10706
|
AND any(lbl IN labels(n) WHERE lbl IN $labels)
|
|
10707
|
+
AND NOT any(lbl IN labels(n) WHERE lbl IN $agentActionLabels)
|
|
10675
10708
|
AND n.deletedAt IS NULL
|
|
10676
10709
|
RETURN count(n) AS matched
|
|
10677
10710
|
`;
|
|
@@ -10679,6 +10712,7 @@ var DEFAULT_FETCH_CYPHER_INCLUDE_TRASHED = `
|
|
|
10679
10712
|
MATCH (n)
|
|
10680
10713
|
WHERE n.accountId = $accountId
|
|
10681
10714
|
AND any(lbl IN labels(n) WHERE lbl IN $labels)
|
|
10715
|
+
AND NOT any(lbl IN labels(n) WHERE lbl IN $agentActionLabels)
|
|
10682
10716
|
AND n.deletedAt IS NULL
|
|
10683
10717
|
WITH collect(n) AS nodes, collect(elementId(n)) AS nodeIds
|
|
10684
10718
|
UNWIND nodes AS n
|
|
@@ -10705,6 +10739,7 @@ var NEIGHBOURHOOD_CYPHER = `
|
|
|
10705
10739
|
WHERE m.accountId = $accountId
|
|
10706
10740
|
AND NOT m:Trashed
|
|
10707
10741
|
AND m.deletedAt IS NULL
|
|
10742
|
+
AND NOT any(lbl IN labels(m) WHERE lbl IN $agentActionLabels)
|
|
10708
10743
|
WITH n, collect(DISTINCT m) AS neighbours
|
|
10709
10744
|
WITH [n] + [x IN neighbours WHERE x IS NOT NULL] AS windowNodes
|
|
10710
10745
|
WITH windowNodes, [x IN windowNodes | elementId(x)] AS windowIds
|
|
@@ -10932,10 +10967,18 @@ app28.get("/", requireAdminSession, async (c) => {
|
|
|
10932
10967
|
console.error('[graph-page] labels-in-graph-rejected reason="no account for session"');
|
|
10933
10968
|
return c.json({ error: "Account not found for session" }, 401);
|
|
10934
10969
|
}
|
|
10970
|
+
const includeAgentActions = c.req.query("includeAgentActions") === "1";
|
|
10935
10971
|
const started = Date.now();
|
|
10936
10972
|
const session = getSession();
|
|
10937
10973
|
try {
|
|
10938
|
-
const
|
|
10974
|
+
const excludedSet = /* @__PURE__ */ new Set([
|
|
10975
|
+
...HIDDEN_BY_DEFAULT_LABELS,
|
|
10976
|
+
...FILTER_EXCLUDED_LABELS
|
|
10977
|
+
]);
|
|
10978
|
+
if (includeAgentActions) {
|
|
10979
|
+
for (const label of AGENT_ACTION_LABELS) excludedSet.delete(label);
|
|
10980
|
+
}
|
|
10981
|
+
const excluded = [...excludedSet];
|
|
10939
10982
|
const result = await session.executeRead(async (tx) => {
|
|
10940
10983
|
return await tx.run(LABELS_IN_GRAPH_CYPHER, { accountId, excluded });
|
|
10941
10984
|
});
|
|
@@ -10950,7 +10993,7 @@ app28.get("/", requireAdminSession, async (c) => {
|
|
|
10950
10993
|
const elapsed = Date.now() - started;
|
|
10951
10994
|
const summary = labels.map((l) => `${l.label}:${l.nodeCount}:${l.relDegree}`).join(",");
|
|
10952
10995
|
console.error(
|
|
10953
|
-
`[graph-page] labels-in-graph account=${accountId} labels=${summary} ms=${elapsed}`
|
|
10996
|
+
`[graph-page] labels-in-graph account=${accountId} agentActions=${includeAgentActions} labels=${summary} ms=${elapsed}`
|
|
10954
10997
|
);
|
|
10955
10998
|
return c.json({ labels });
|
|
10956
10999
|
} catch (err) {
|
|
@@ -11234,6 +11277,19 @@ function startGraphHealthTimer() {
|
|
|
11234
11277
|
}
|
|
11235
11278
|
|
|
11236
11279
|
// server/index.ts
|
|
11280
|
+
function requestIsTlsTerminated(c) {
|
|
11281
|
+
const remote = c.env?.incoming?.socket?.remoteAddress ?? "";
|
|
11282
|
+
const peerIsLoopback = remote === "127.0.0.1" || remote === "::1" || remote === "::ffff:127.0.0.1";
|
|
11283
|
+
if (!peerIsLoopback) return false;
|
|
11284
|
+
const xfp = c.req.header("x-forwarded-proto") ?? "";
|
|
11285
|
+
return xfp.toLowerCase() === "https";
|
|
11286
|
+
}
|
|
11287
|
+
function clientFrom(c) {
|
|
11288
|
+
return resolveClientIp(
|
|
11289
|
+
c.env?.incoming?.socket?.remoteAddress,
|
|
11290
|
+
c.req.header("x-forwarded-for")
|
|
11291
|
+
);
|
|
11292
|
+
}
|
|
11237
11293
|
var PLATFORM_ROOT6 = process.env.MAXY_PLATFORM_ROOT || "";
|
|
11238
11294
|
var BRAND_JSON_PATH = PLATFORM_ROOT6 ? join9(PLATFORM_ROOT6, "config", "brand.json") : "";
|
|
11239
11295
|
var BRAND = { productName: "Maxy", hostname: "maxy", configDir: ".maxy", domain: "getmaxy.com" };
|
|
@@ -11355,8 +11411,15 @@ function resolveRemoteAuthOpts() {
|
|
|
11355
11411
|
}
|
|
11356
11412
|
var MAX_LOGIN_BODY = 8 * 1024;
|
|
11357
11413
|
app33.post("/__remote-auth/login", async (c) => {
|
|
11358
|
-
const
|
|
11359
|
-
const
|
|
11414
|
+
const client = clientFrom(c);
|
|
11415
|
+
const clientIp = client.ip || "unknown";
|
|
11416
|
+
if (!requestIsTlsTerminated(c)) {
|
|
11417
|
+
console.error(
|
|
11418
|
+
`[remote-auth] login-refused-no-tls ip=${clientIp} resolvedKind=${client.kind} xfp=${c.req.header("x-forwarded-proto") ?? ""}`
|
|
11419
|
+
);
|
|
11420
|
+
return c.text("Remote access requires TLS", 400);
|
|
11421
|
+
}
|
|
11422
|
+
const rateLimited = checkRateLimit(client);
|
|
11360
11423
|
if (rateLimited) {
|
|
11361
11424
|
const remaining = parseInt(rateLimited.match(/(\d+)s/)?.[1] ?? "0", 10);
|
|
11362
11425
|
return c.html(renderLoginPage({ ...resolveRemoteAuthOpts(), lockoutSeconds: remaining || void 0 }), 200);
|
|
@@ -11374,13 +11437,14 @@ app33.post("/__remote-auth/login", async (c) => {
|
|
|
11374
11437
|
}
|
|
11375
11438
|
const valid = await verifyRemotePassword(password);
|
|
11376
11439
|
if (!valid) {
|
|
11377
|
-
recordFailedAttempt(
|
|
11440
|
+
recordFailedAttempt(client);
|
|
11378
11441
|
console.error(`[remote-auth] login failed ip=${clientIp}`);
|
|
11379
11442
|
return c.html(renderLoginPage({ ...resolveRemoteAuthOpts(), error: "Invalid credentials", redirect }), 200);
|
|
11380
11443
|
}
|
|
11381
|
-
clearRateLimit(
|
|
11444
|
+
clearRateLimit(client);
|
|
11382
11445
|
const token = createRemoteSession();
|
|
11383
11446
|
console.error(`[remote-auth] login success ip=${clientIp}`);
|
|
11447
|
+
console.error(`[remote-auth] cookie-flags secure=true sameSite=strict`);
|
|
11384
11448
|
return new Response(null, {
|
|
11385
11449
|
status: 302,
|
|
11386
11450
|
headers: {
|
|
@@ -11390,7 +11454,7 @@ app33.post("/__remote-auth/login", async (c) => {
|
|
|
11390
11454
|
}
|
|
11391
11455
|
});
|
|
11392
11456
|
});
|
|
11393
|
-
app33.get("/__remote-auth/logout", () => {
|
|
11457
|
+
app33.get("/__remote-auth/logout", (c) => {
|
|
11394
11458
|
return new Response(null, {
|
|
11395
11459
|
status: 302,
|
|
11396
11460
|
headers: {
|
|
@@ -11401,8 +11465,9 @@ app33.get("/__remote-auth/logout", () => {
|
|
|
11401
11465
|
});
|
|
11402
11466
|
});
|
|
11403
11467
|
app33.post("/__remote-auth/change-password", async (c) => {
|
|
11404
|
-
const
|
|
11405
|
-
const
|
|
11468
|
+
const client = clientFrom(c);
|
|
11469
|
+
const clientIp = client.ip || "unknown";
|
|
11470
|
+
const rateLimited = checkRateLimit(client);
|
|
11406
11471
|
if (rateLimited) {
|
|
11407
11472
|
const remaining = parseInt(rateLimited.match(/(\d+)s/)?.[1] ?? "0", 10);
|
|
11408
11473
|
return c.html(renderLoginPage({ ...resolveRemoteAuthOpts(), lockoutSeconds: remaining || void 0 }), 200);
|
|
@@ -11422,7 +11487,7 @@ app33.post("/__remote-auth/change-password", async (c) => {
|
|
|
11422
11487
|
}
|
|
11423
11488
|
const valid = await verifyRemotePassword(currentPassword);
|
|
11424
11489
|
if (!valid) {
|
|
11425
|
-
recordFailedAttempt(
|
|
11490
|
+
recordFailedAttempt(client);
|
|
11426
11491
|
console.error(`[remote-auth] change-password failed (wrong current) ip=${clientIp}`);
|
|
11427
11492
|
return c.html(renderLoginPage({ ...resolveRemoteAuthOpts(), mode: "change", changeError: "Current password is incorrect", redirect }), 200);
|
|
11428
11493
|
}
|
|
@@ -11441,7 +11506,7 @@ app33.post("/__remote-auth/change-password", async (c) => {
|
|
|
11441
11506
|
}
|
|
11442
11507
|
try {
|
|
11443
11508
|
await setRemotePassword(newPassword);
|
|
11444
|
-
clearRateLimit(
|
|
11509
|
+
clearRateLimit(client);
|
|
11445
11510
|
console.error(`[remote-auth] password changed ip=${clientIp}`);
|
|
11446
11511
|
return c.html(renderLoginPage({ ...resolveRemoteAuthOpts(), success: "Password changed successfully. Sign in with your new password.", redirect }), 200);
|
|
11447
11512
|
} catch (err) {
|
|
@@ -11533,10 +11598,12 @@ app33.use("*", async (c, next) => {
|
|
|
11533
11598
|
await next();
|
|
11534
11599
|
return;
|
|
11535
11600
|
}
|
|
11601
|
+
const rawRemote = c.env?.incoming?.socket?.remoteAddress;
|
|
11602
|
+
const rawXff = c.req.header("x-forwarded-for");
|
|
11536
11603
|
const decision = canAccessAdmin({
|
|
11537
11604
|
host,
|
|
11538
|
-
remoteAddress:
|
|
11539
|
-
xForwardedFor:
|
|
11605
|
+
remoteAddress: rawRemote,
|
|
11606
|
+
xForwardedFor: rawXff,
|
|
11540
11607
|
cookieHeader: c.req.header("cookie"),
|
|
11541
11608
|
isPublicHost
|
|
11542
11609
|
});
|
|
@@ -11549,11 +11616,12 @@ app33.use("*", async (c, next) => {
|
|
|
11549
11616
|
await next();
|
|
11550
11617
|
return;
|
|
11551
11618
|
}
|
|
11619
|
+
const disambig = `remoteAddress="${rawRemote ?? ""}" xff="${rawXff ?? ""}" resolvedKind=${decision.client.kind}`;
|
|
11552
11620
|
if (decision.reason === "remote-unconfigured") {
|
|
11553
|
-
console.error(`[remote-auth] not configured, redirecting to setup ip=${clientIp} path=${path2}`);
|
|
11621
|
+
console.error(`[remote-auth] not configured, redirecting to setup ip=${clientIp} path=${path2} ${disambig}`);
|
|
11554
11622
|
return c.redirect("/__remote-auth/setup");
|
|
11555
11623
|
}
|
|
11556
|
-
console.error(`[remote-auth] login required ip=${clientIp} path=${path2}`);
|
|
11624
|
+
console.error(`[remote-auth] login required ip=${clientIp} path=${path2} ${disambig}`);
|
|
11557
11625
|
return c.html(renderLoginPage({ ...resolveRemoteAuthOpts(), redirect: path2 }), 200);
|
|
11558
11626
|
});
|
|
11559
11627
|
app33.route("/api/health", health_default);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-K5T4RW27-CTTOezMH.js";import{n as e}from"./chunk-7N4EOEYR-GUck0jv1.js";export{e as createArchitectureServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{it as e,rt as t}from"./chunk-ICPOFSXX-Di63NBur.js";var n=(n,r)=>e.lang.round(t.parse(n)[r]);export{n as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as e,p as t}from"./src-Bo15iQ7w.js";import{b as n}from"./chunk-ICPOFSXX-Di63NBur.js";var r=e(e=>{let{securityLevel:r}=n(),i=t(`body`);return r===`sandbox`&&(i=t((t(`#i${e}`).node()?.contentDocument??document).body)),i.select(`#${e}`)},`selectSvgElement`);export{r as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as e}from"./src-Bo15iQ7w.js";var t=class{constructor(e){this.init=e,this.records=this.init()}static{e(this,`ImperativeState`)}reset(){this.records=this.init()}};export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as e}from"./src-Bo15iQ7w.js";import"./chunk-ICPOFSXX-Di63NBur.js";import"./dist-CrzV1W3-.js";import"./chunk-5PVQY5BW-RhIfPCRB.js";import"./chunk-U2HBQHQK-BZnA7c4T.js";import"./chunk-FMBD7UC4-DaRrfk3s.js";import"./chunk-BSJP7CBP-CTsYuARh.js";import"./chunk-ZZ45TVLE-DBSm41oP.js";import"./chunk-YZCP3GAM-BAkNXu0G.js";import"./chunk-55IACEB6-CzqB8aoU.js";import"./chunk-EDXVE4YY-utELKGQK.js";import"./chunk-X2U36JSP-DpQ2OA_c.js";import"./chunk-5FUZZQ4R-BoTfWHuW.js";import"./chunk-ENJZ2VHE-CNHjq5xK.js";import"./chunk-336JU56O-BpATJiGl.js";import{i as t,n,r,t as i}from"./chunk-4TB4RGXK-CLXL19Wd.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as e}from"./src-Bo15iQ7w.js";import"./chunk-ICPOFSXX-Di63NBur.js";import"./dist-CrzV1W3-.js";import"./chunk-5PVQY5BW-RhIfPCRB.js";import"./chunk-U2HBQHQK-BZnA7c4T.js";import"./chunk-FMBD7UC4-DaRrfk3s.js";import"./chunk-BSJP7CBP-CTsYuARh.js";import"./chunk-ZZ45TVLE-DBSm41oP.js";import"./chunk-YZCP3GAM-BAkNXu0G.js";import"./chunk-55IACEB6-CzqB8aoU.js";import"./chunk-EDXVE4YY-utELKGQK.js";import"./chunk-X2U36JSP-DpQ2OA_c.js";import"./chunk-5FUZZQ4R-BoTfWHuW.js";import"./chunk-ENJZ2VHE-CNHjq5xK.js";import"./chunk-336JU56O-BpATJiGl.js";import{i as t,n,r,t as i}from"./chunk-4TB4RGXK-CLXL19Wd.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./graphlib-B_mcXEVr.js";var t=4;function n(n){return e(n,t)}export{n as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-K5T4RW27-CTTOezMH.js";import{n as e}from"./chunk-67CJDMHE-mM1sFmlz.js";export{e as createGitGraphServices};
|