@rubytech/create-maxy-code 0.1.496 → 0.1.498
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/docs/superpowers/plans/2026-07-24-task-1942-subaccount-switcher-brand-head.md +327 -0
- package/payload/platform/docs/superpowers/specs/2026-07-24-task-1942-subaccount-switcher-brand-head-design.md +35 -0
- package/payload/platform/plugins/admin/skills/platform-architecture/SKILL.md +72 -12
- package/payload/platform/plugins/docs/references/admin-ui.md +50 -10
- package/payload/platform/plugins/docs/references/outlook-guide.md +5 -1
- package/payload/platform/plugins/docs/references/sweep-guide.md +16 -0
- package/payload/platform/plugins/memory/PLUGIN.md +2 -0
- package/payload/platform/plugins/memory/mcp/dist/index.js +2 -2
- package/payload/platform/plugins/memory/mcp/dist/index.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/scripts/__tests__/dream-cycle-sweep-decision.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/scripts/__tests__/dream-cycle-sweep-decision.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/scripts/__tests__/dream-cycle-sweep-decision.test.js +84 -0
- package/payload/platform/plugins/memory/mcp/dist/scripts/__tests__/dream-cycle-sweep-decision.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/scripts/dream-cycle-sweep-decision.d.ts +54 -0
- package/payload/platform/plugins/memory/mcp/dist/scripts/dream-cycle-sweep-decision.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/scripts/dream-cycle-sweep-decision.js +58 -0
- package/payload/platform/plugins/memory/mcp/dist/scripts/dream-cycle-sweep-decision.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/scripts/dream-cycle-sweep.d.ts +30 -0
- package/payload/platform/plugins/memory/mcp/dist/scripts/dream-cycle-sweep.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/scripts/dream-cycle-sweep.js +204 -0
- package/payload/platform/plugins/memory/mcp/dist/scripts/dream-cycle-sweep.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/conversation-archive-derive-insights.test.js +30 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/conversation-archive-derive-insights.test.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/conversation-archive-derive-insights.d.ts +4 -2
- package/payload/platform/plugins/memory/mcp/dist/tools/conversation-archive-derive-insights.d.ts.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/conversation-archive-derive-insights.js +38 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/conversation-archive-derive-insights.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/vitest.config.ts +2 -0
- package/payload/platform/plugins/memory/skills/conversation-archive-enrich/SKILL.md +10 -4
- package/payload/platform/plugins/outlook/.claude-plugin/plugin.json +1 -1
- package/payload/platform/plugins/outlook/PLUGIN.md +6 -2
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/dispatch-grouping.test.d.ts +2 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/dispatch-grouping.test.d.ts.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/dispatch-grouping.test.js +54 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/dispatch-grouping.test.js.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/fetch-body-fromname.test.d.ts +2 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/fetch-body-fromname.test.d.ts.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/fetch-body-fromname.test.js +19 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/fetch-body-fromname.test.js.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/mail-ingest-decisions.test.d.ts +2 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/mail-ingest-decisions.test.d.ts.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/mail-ingest-decisions.test.js +20 -0
- package/payload/platform/plugins/outlook/mcp/dist/__tests__/mail-ingest-decisions.test.js.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/index.js +21 -0
- package/payload/platform/plugins/outlook/mcp/dist/index.js.map +1 -1
- package/payload/platform/plugins/outlook/mcp/dist/lib/conversation-archive-dispatch.d.ts +40 -0
- package/payload/platform/plugins/outlook/mcp/dist/lib/conversation-archive-dispatch.d.ts.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/lib/conversation-archive-dispatch.js +143 -0
- package/payload/platform/plugins/outlook/mcp/dist/lib/conversation-archive-dispatch.js.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/lib/neo4j.d.ts +5 -0
- package/payload/platform/plugins/outlook/mcp/dist/lib/neo4j.d.ts.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/lib/neo4j.js +44 -0
- package/payload/platform/plugins/outlook/mcp/dist/lib/neo4j.js.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/tools/mail-fetch-body.d.ts +14 -0
- package/payload/platform/plugins/outlook/mcp/dist/tools/mail-fetch-body.d.ts.map +1 -1
- package/payload/platform/plugins/outlook/mcp/dist/tools/mail-fetch-body.js +13 -1
- package/payload/platform/plugins/outlook/mcp/dist/tools/mail-fetch-body.js.map +1 -1
- package/payload/platform/plugins/outlook/mcp/dist/tools/mail-ingest.d.ts +27 -0
- package/payload/platform/plugins/outlook/mcp/dist/tools/mail-ingest.d.ts.map +1 -0
- package/payload/platform/plugins/outlook/mcp/dist/tools/mail-ingest.js +69 -0
- package/payload/platform/plugins/outlook/mcp/dist/tools/mail-ingest.js.map +1 -0
- package/payload/platform/plugins/outlook/mcp/package.json +1 -0
- package/payload/platform/plugins/outlook/references/graph-surfaces.md +10 -1
- package/payload/platform/plugins/outlook/skills/outlook/SKILL.md +4 -0
- package/payload/platform/plugins/outlook/skills/outlook-mail-ingest/SKILL.md +85 -0
- package/payload/platform/plugins/sweep/PLUGIN.md +5 -1
- package/payload/platform/plugins/sweep/skills/email-graph-sweep/SKILL.md +165 -0
- 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/templates/specialists/agents/personal-assistant.md +1 -1
- package/payload/server/package.json +2 -1
- package/payload/server/public/activity.html +6 -6
- package/payload/server/public/assets/{AdminLoginScreens-CFF28MGy.js → AdminLoginScreens-Ce5aBBWF.js} +1 -1
- package/payload/server/public/assets/AdminShell-BFVVkWFC.js +2 -0
- package/payload/server/public/assets/{activity-CElZcdjR.js → activity-CKUYOLd2.js} +1 -1
- package/payload/server/public/assets/admin-BWb8me-E.js +1 -0
- package/payload/server/public/assets/{arc-CFMJyMm-.js → arc-CpWWSum8.js} +1 -1
- package/payload/server/public/assets/architecture-YZFGNWBL-D-AX2VuA.js +1 -0
- package/payload/server/public/assets/{architectureDiagram-Q4EWVU46-CiSSgdL8.js → architectureDiagram-Q4EWVU46-D2EzaII0.js} +1 -1
- package/payload/server/public/assets/{blockDiagram-DXYQGD6D-_sXtIW5c.js → blockDiagram-DXYQGD6D-8kDpaNSZ.js} +1 -1
- package/payload/server/public/assets/{bot-Q-JmeVT3.js → bot-DESMpxSQ.js} +1 -1
- package/payload/server/public/assets/{browser-BrfPJMYF.js → browser-CpLq_DIo.js} +1 -1
- package/payload/server/public/assets/{c4Diagram-AHTNJAMY-Bh7OAMXs.js → c4Diagram-AHTNJAMY-CbwmZpK3.js} +1 -1
- package/payload/server/public/assets/calendar-ClOwyuz-.js +1 -0
- package/payload/server/public/assets/channel-DZ5sh6YQ.js +1 -0
- package/payload/server/public/assets/chat-qtOiJX-Y.js +1 -0
- package/payload/server/public/assets/chevron-left-BzIg4in6.js +1 -0
- package/payload/server/public/assets/chevron-right-BcFSa9C3.js +1 -0
- package/payload/server/public/assets/{chunk-2KRD3SAO-D4fktAwW.js → chunk-2KRD3SAO-PFheZ9mw.js} +1 -1
- package/payload/server/public/assets/{chunk-336JU56O-CcQoKH2G.js → chunk-336JU56O-CCFOp5VK.js} +2 -2
- package/payload/server/public/assets/chunk-426QAEUC-CcjBLp4a.js +1 -0
- package/payload/server/public/assets/{chunk-4BX2VUAB-C13Wz3zS.js → chunk-4BX2VUAB-Hz4JWOf2.js} +1 -1
- package/payload/server/public/assets/{chunk-4TB4RGXK-BL48D7gN.js → chunk-4TB4RGXK-4xeV0s85.js} +1 -1
- package/payload/server/public/assets/{chunk-55IACEB6-TmOKdy8a.js → chunk-55IACEB6-4QKgBpoh.js} +1 -1
- package/payload/server/public/assets/{chunk-5FUZZQ4R-DZ_jSF6N.js → chunk-5FUZZQ4R-ms3K6Z5z.js} +1 -1
- package/payload/server/public/assets/{chunk-5PVQY5BW-De4G1vfV.js → chunk-5PVQY5BW-CIC4GIGi.js} +1 -1
- package/payload/server/public/assets/{chunk-67CJDMHE-Cif9Uu5C.js → chunk-67CJDMHE-B-XrWVmV.js} +1 -1
- package/payload/server/public/assets/{chunk-7N4EOEYR-WjTHCXnd.js → chunk-7N4EOEYR-C7ECOUYQ.js} +1 -1
- package/payload/server/public/assets/{chunk-AA7GKIK3-CwCfdQmb.js → chunk-AA7GKIK3-DOZ6Fxwk.js} +1 -1
- package/payload/server/public/assets/{chunk-BSJP7CBP-9A67yXwT.js → chunk-BSJP7CBP-4cJ_b0c6.js} +1 -1
- package/payload/server/public/assets/{chunk-CIAEETIT-DPMiWSBi.js → chunk-CIAEETIT--mhZipWM.js} +1 -1
- package/payload/server/public/assets/{chunk-EDXVE4YY-C2f_Qvx-.js → chunk-EDXVE4YY-jZpVwob_.js} +1 -1
- package/payload/server/public/assets/{chunk-ENJZ2VHE-B-Q9EbSQ.js → chunk-ENJZ2VHE-Nn-p-xIA.js} +1 -1
- package/payload/server/public/assets/{chunk-FMBD7UC4-Bmt_ZRlV.js → chunk-FMBD7UC4-DyNpcKOS.js} +1 -1
- package/payload/server/public/assets/{chunk-FOC6F5B3-DfGJGxpX.js → chunk-FOC6F5B3-C0P8q1uz.js} +1 -1
- package/payload/server/public/assets/{chunk-ICPOFSXX-Wyym1Q8K.js → chunk-ICPOFSXX-CdXQ5SfI.js} +2 -2
- package/payload/server/public/assets/{chunk-K5T4RW27-DMpoaqw2.js → chunk-K5T4RW27-BVZJKKsT.js} +1 -1
- package/payload/server/public/assets/{chunk-KGLVRYIC-DYUFgri2.js → chunk-KGLVRYIC-QlVWTe0V.js} +1 -1
- package/payload/server/public/assets/{chunk-LIHQZDEY-x3LmeKmx.js → chunk-LIHQZDEY-CpGVZutP.js} +1 -1
- package/payload/server/public/assets/{chunk-ORNJ4GCN-BeuNAWkW.js → chunk-ORNJ4GCN-WVcS6fUC.js} +1 -1
- package/payload/server/public/assets/{chunk-OYMX7WX6-BUWVAfQA.js → chunk-OYMX7WX6-B7hiSTed.js} +1 -1
- package/payload/server/public/assets/chunk-QZHKN3VN-B2WjDYBE.js +1 -0
- package/payload/server/public/assets/{chunk-U2HBQHQK-DKS5adQo.js → chunk-U2HBQHQK-DJPnZxGy.js} +1 -1
- package/payload/server/public/assets/{chunk-X2U36JSP-CT_UM4IN.js → chunk-X2U36JSP-DilBs1Yc.js} +1 -1
- package/payload/server/public/assets/{chunk-XPW4576I-ByFnN4JO.js → chunk-XPW4576I-B5-uyrJ0.js} +1 -1
- package/payload/server/public/assets/{chunk-YZCP3GAM-DCetC20J.js → chunk-YZCP3GAM-BNO4z0Mv.js} +1 -1
- package/payload/server/public/assets/{chunk-ZZ45TVLE-Bh1QIv8N.js → chunk-ZZ45TVLE-BzHMQpip.js} +1 -1
- package/payload/server/public/assets/classDiagram-6PBFFD2Q-CT3jNrze.js +1 -0
- package/payload/server/public/assets/classDiagram-v2-HSJHXN6E-DJRsjAkC.js +1 -0
- package/payload/server/public/assets/clock-Dr3NGtjR.js +1 -0
- package/payload/server/public/assets/clone-FcEDnoMT.js +1 -0
- package/payload/server/public/assets/{cose-bilkent-S5V4N54A-DgLEaApT.js → cose-bilkent-S5V4N54A-3DWYmn1o.js} +1 -1
- package/payload/server/public/assets/{dagre-unhMIyVo.js → dagre-Cpy31xJW.js} +1 -1
- package/payload/server/public/assets/{dagre-KV5264BT-BfkUPrEV.js → dagre-KV5264BT-C8fyxHFd.js} +1 -1
- package/payload/server/public/assets/data-BjqC4hyM.js +1 -0
- package/payload/server/public/assets/{diagram-5BDNPKRD-BjjwcTD9.js → diagram-5BDNPKRD-ycyhnLvr.js} +1 -1
- package/payload/server/public/assets/{diagram-G4DWMVQ6-BbgWtVSS.js → diagram-G4DWMVQ6-BkeYicIt.js} +1 -1
- package/payload/server/public/assets/{diagram-MMDJMWI5-DyAnkWGy.js → diagram-MMDJMWI5-BcGZU-Q3.js} +1 -1
- package/payload/server/public/assets/{diagram-TYMM5635-SAMMoLxq.js → diagram-TYMM5635-DuBDCFb_.js} +1 -1
- package/payload/server/public/assets/{dist-C9D_xz81.js → dist-BYc_arNy.js} +1 -1
- package/payload/server/public/assets/{erDiagram-SMLLAGMA-Cvo-5-fD.js → erDiagram-SMLLAGMA-DmkeOzvp.js} +1 -1
- package/payload/server/public/assets/{flatten-BXzaHgtL.js → flatten-QjnJ1Gcl.js} +1 -1
- package/payload/server/public/assets/{flowDiagram-DWJPFMVM-y3o2Ycld.js → flowDiagram-DWJPFMVM-CkE-pjuB.js} +1 -1
- package/payload/server/public/assets/{ganttDiagram-T4ZO3ILL-BEm_CQaK.js → ganttDiagram-T4ZO3ILL-Cjiy3kvE.js} +1 -1
- package/payload/server/public/assets/gitGraph-7Q5UKJZL-D1uhnP9U.js +1 -0
- package/payload/server/public/assets/{gitGraphDiagram-UUTBAWPF-CqmOxS7F.js → gitGraphDiagram-UUTBAWPF-CsI4lKZm.js} +1 -1
- package/payload/server/public/assets/{graph-BLO4nVi3.js → graph-B7niLM97.js} +3 -3
- package/payload/server/public/assets/{graph-labels-ibEi7ggo.js → graph-labels-DykmXYHA.js} +1 -1
- package/payload/server/public/assets/{graphlib-_HfbQcBf.js → graphlib-BkXxC6D5.js} +1 -1
- package/payload/server/public/assets/info-OMHHGYJF-oNm27GAV.js +1 -0
- package/payload/server/public/assets/infoDiagram-42DDH7IO-LxTftqyS.js +2 -0
- package/payload/server/public/assets/{isEmpty-uB1dEu_Z.js → isEmpty-BavJI9Cn.js} +1 -1
- package/payload/server/public/assets/{ishikawaDiagram-UXIWVN3A-C_d0vcZC.js → ishikawaDiagram-UXIWVN3A-D8lZtjRc.js} +1 -1
- package/payload/server/public/assets/{journeyDiagram-VCZTEJTY-DsjRBqlW.js → journeyDiagram-VCZTEJTY-kLE7SiR_.js} +1 -1
- package/payload/server/public/assets/{kanban-definition-6JOO6SKY-BwtK6LS-.js → kanban-definition-6JOO6SKY-ove6JuD3.js} +1 -1
- package/payload/server/public/assets/{line-szBCFOLJ.js → line-CZMSoxM6.js} +1 -1
- package/payload/server/public/assets/{linear-X3O7lwK3.js → linear-Be8IK9hK.js} +1 -1
- package/payload/server/public/assets/{maximize-2-CezchDEF.js → maximize-2-BbzPm7o8.js} +1 -1
- package/payload/server/public/assets/{mermaid-parser.core-BavvMAhU.js → mermaid-parser.core-BBADqbnp.js} +2 -2
- package/payload/server/public/assets/{mermaid.core-Br2F9Hdm.js → mermaid.core-mH3N7K0I.js} +3 -3
- package/payload/server/public/assets/{mindmap-definition-QFDTVHPH-4qlwXoJ-.js → mindmap-definition-QFDTVHPH-BjwwwWil.js} +1 -1
- package/payload/server/public/assets/{operator-B-3vkwO8.js → operator-icJwMkZF.js} +1 -1
- package/payload/server/public/assets/{ordinal-CZY9laxg.js → ordinal-BHeIKG-K.js} +1 -1
- package/payload/server/public/assets/packet-4T2RLAQJ-eQNVGiK3.js +1 -0
- package/payload/server/public/assets/page-DUgrGrJp.js +1 -0
- package/payload/server/public/assets/{page-BL1ko2_-.js → page-iG57nKOg.js} +4 -4
- package/payload/server/public/assets/{pdf-render-H884L3EI.js → pdf-render-fJz4vym9.js} +1 -1
- package/payload/server/public/assets/pie-ZZUOXDRM-E1u-48rt.js +1 -0
- package/payload/server/public/assets/{pieDiagram-DEJITSTG-BbXryIg0.js → pieDiagram-DEJITSTG-D-lXWWta.js} +1 -1
- package/payload/server/public/assets/{public-DxfSLhNp.js → public-CkOumzpf.js} +1 -1
- package/payload/server/public/assets/{quadrantDiagram-34T5L4WZ-BHLjcvh3.js → quadrantDiagram-34T5L4WZ-13QyG_AO.js} +1 -1
- package/payload/server/public/assets/radar-PYXPWWZC-Cn2cGN90.js +1 -0
- package/payload/server/public/assets/{reduce-BGQzAenn.js → reduce-Fm685to3.js} +1 -1
- package/payload/server/public/assets/{requirementDiagram-MS252O5E-BXaVO0lk.js → requirementDiagram-MS252O5E-Bx45Bgn4.js} +1 -1
- package/payload/server/public/assets/{rotate-ccw-CWvGAut4.js → rotate-ccw-L42fL8ey.js} +1 -1
- package/payload/server/public/assets/routines-JOV6xdYh.js +1 -0
- package/payload/server/public/assets/{sankeyDiagram-XADWPNL6-CmN1s17Q.js → sankeyDiagram-XADWPNL6-Cj-Gq25v.js} +1 -1
- package/payload/server/public/assets/{sequenceDiagram-FGHM5R23-DC08e5NY.js → sequenceDiagram-FGHM5R23-B8RDRq93.js} +1 -1
- package/payload/server/public/assets/{src-BTKk8KAG.js → src-D3VYuW_Z.js} +1 -1
- package/payload/server/public/assets/{stateDiagram-FHFEXIEX-DnoQMuOW.js → stateDiagram-FHFEXIEX-DoyFF1Kl.js} +1 -1
- package/payload/server/public/assets/stateDiagram-v2-QKLJ7IA2-Bml-X4-H.js +1 -0
- package/payload/server/public/assets/{tasks-DlXIN3v3.js → tasks-GNtvZL8F.js} +1 -1
- package/payload/server/public/assets/{time-entry-format-VzHwljTv.js → time-entry-format-BreNpFLJ.js} +1 -1
- package/payload/server/public/assets/{timeline-definition-GMOUNBTQ-eTn3uRaH.js → timeline-definition-GMOUNBTQ-Df4RQXm6.js} +1 -1
- package/payload/server/public/assets/treeView-SZITEDCU-CimabhXy.js +1 -0
- package/payload/server/public/assets/treemap-W4RFUUIX-Cg264rpM.js +1 -0
- package/payload/server/public/assets/{triangle-alert-C5BpoPlq.js → triangle-alert-DumCWC08.js} +1 -1
- package/payload/server/public/assets/{useCopyFeedback-h1qT8mpZ.js → useCopyFeedback-DHCtz8qX.js} +1 -1
- package/payload/server/public/assets/{useSubAccountSwitcher-DDStL7Nt.js → useSubAccountSwitcher-Bc7XHr0L.js} +2 -2
- package/payload/server/public/assets/useSubAccountSwitcher-DPHQJO7E.css +1 -0
- package/payload/server/public/assets/{useVoiceRecorder-kqMitFlk.js → useVoiceRecorder-Cu6zvuFx.js} +2 -2
- package/payload/server/public/assets/{vennDiagram-DHZGUBPP-DNx6o_ZQ.js → vennDiagram-DHZGUBPP-D2o5og9l.js} +1 -1
- package/payload/server/public/assets/wardley-RL74JXVD-tbgfCg0E.js +1 -0
- package/payload/server/public/assets/{wardleyDiagram-NUSXRM2D-BZOchqF3.js → wardleyDiagram-NUSXRM2D-BDueObbS.js} +1 -1
- package/payload/server/public/assets/wrench-iWkROE1V.js +1 -0
- package/payload/server/public/assets/{xychartDiagram-5P7HB3ND-ZBEGH6ZI.js → xychartDiagram-5P7HB3ND-BTYs4Fgh.js} +1 -1
- package/payload/server/public/browser.html +5 -5
- package/payload/server/public/calendar.html +8 -7
- package/payload/server/public/chat.html +15 -15
- package/payload/server/public/data.html +12 -12
- package/payload/server/public/graph.html +10 -11
- package/payload/server/public/index.html +16 -17
- package/payload/server/public/operator.html +16 -16
- package/payload/server/public/public.html +15 -15
- package/payload/server/public/routines.html +20 -0
- package/payload/server/public/tasks.html +7 -7
- package/payload/server/server.js +417 -203
- package/payload/server/public/assets/AdminShell-ClIT8c0K.js +0 -2
- package/payload/server/public/assets/admin-BHiA9_Ks.js +0 -1
- package/payload/server/public/assets/architecture-YZFGNWBL-Cypt5qHL.js +0 -1
- package/payload/server/public/assets/calendar-D45S_aal.js +0 -1
- package/payload/server/public/assets/channel-BMyXE4zc.js +0 -1
- package/payload/server/public/assets/chat-gy8scQov.js +0 -1
- package/payload/server/public/assets/chevron-down-CdxvexgY.js +0 -1
- package/payload/server/public/assets/chevron-left-D5LLz6ke.js +0 -1
- package/payload/server/public/assets/chevron-right-DzPmwDew.js +0 -1
- package/payload/server/public/assets/chunk-426QAEUC-Xu6JKP4d.js +0 -1
- package/payload/server/public/assets/chunk-QZHKN3VN-7_kS3RBy.js +0 -1
- package/payload/server/public/assets/classDiagram-6PBFFD2Q-DJqbNcuC.js +0 -1
- package/payload/server/public/assets/classDiagram-v2-HSJHXN6E-CGglqfQA.js +0 -1
- package/payload/server/public/assets/clone-BiTMTzp_.js +0 -1
- package/payload/server/public/assets/data-CUsNHUpu.js +0 -1
- package/payload/server/public/assets/gitGraph-7Q5UKJZL-C_-XjxLd.js +0 -1
- package/payload/server/public/assets/info-OMHHGYJF-BH8yDCfL.js +0 -1
- package/payload/server/public/assets/infoDiagram-42DDH7IO-DyDXyJ6U.js +0 -2
- package/payload/server/public/assets/packet-4T2RLAQJ-Bajcns4r.js +0 -1
- package/payload/server/public/assets/page-BbxoY4QI.js +0 -1
- package/payload/server/public/assets/pie-ZZUOXDRM-D7hjM5w1.js +0 -1
- package/payload/server/public/assets/radar-PYXPWWZC-B46d5x7a.js +0 -1
- package/payload/server/public/assets/stateDiagram-v2-QKLJ7IA2-CrstH34p.js +0 -1
- package/payload/server/public/assets/treeView-SZITEDCU-3XQh5xQ1.js +0 -1
- package/payload/server/public/assets/treemap-W4RFUUIX-DwR-_l5z.js +0 -1
- package/payload/server/public/assets/useSubAccountSwitcher-DnfX9Uxe.css +0 -1
- package/payload/server/public/assets/wardley-RL74JXVD-DZp9oCGv.js +0 -1
- /package/payload/server/public/assets/{_baseFor-CMWvz0uA.js → _baseFor-Bvwvhrz4.js} +0 -0
- /package/payload/server/public/assets/{array-Cny_NT6T.js → array-D3d-WgFW.js} +0 -0
- /package/payload/server/public/assets/{chunk-TPjIAO9U.js → chunk-fQC6bEKA.js} +0 -0
- /package/payload/server/public/assets/{cytoscape.esm-De0CCmB2.js → cytoscape.esm-Cun-OM6a.js} +0 -0
- /package/payload/server/public/assets/{defaultLocale-BahRht8U.js → defaultLocale-CisKV5Ew.js} +0 -0
- /package/payload/server/public/assets/{init-DoIvjoJ_.js → init-D9ZOVaZ3.js} +0 -0
- /package/payload/server/public/assets/{katex-Bfn1OZEl.js → katex-C-3ZDK8o.js} +0 -0
- /package/payload/server/public/assets/{path-CTezU8L5.js → path-BMOgQSLM.js} +0 -0
- /package/payload/server/public/assets/{preload-helper-D_sPnjeL.js → preload-helper-DL2DwvxV.js} +0 -0
- /package/payload/server/public/assets/{rough.esm-BJo4pvXu.js → rough.esm-BrTFrov0.js} +0 -0
package/payload/server/server.js
CHANGED
|
@@ -7176,8 +7176,8 @@ function webchatTurnTimeoutMs() {
|
|
|
7176
7176
|
return Number(process.env.WEBCHAT_TURN_TIMEOUT_MS ?? String(2 * 6e4));
|
|
7177
7177
|
}
|
|
7178
7178
|
function createChatRoutes(deps) {
|
|
7179
|
-
const
|
|
7180
|
-
|
|
7179
|
+
const app66 = new Hono();
|
|
7180
|
+
app66.post("/", async (c) => {
|
|
7181
7181
|
console.log(`[chat-route] entered route=public method=POST`);
|
|
7182
7182
|
const contentType = c.req.header("content-type") ?? "";
|
|
7183
7183
|
const account = resolveAccount();
|
|
@@ -7441,7 +7441,7 @@ ${result.result.text}` : result.result.text;
|
|
|
7441
7441
|
}
|
|
7442
7442
|
});
|
|
7443
7443
|
});
|
|
7444
|
-
return
|
|
7444
|
+
return app66;
|
|
7445
7445
|
}
|
|
7446
7446
|
|
|
7447
7447
|
// app/lib/channel-pty-bridge/admin-session-id.ts
|
|
@@ -7475,8 +7475,8 @@ function isLoopbackAddr(addr) {
|
|
|
7475
7475
|
return addr === "127.0.0.1" || addr === "::1" || addr === "::ffff:127.0.0.1";
|
|
7476
7476
|
}
|
|
7477
7477
|
function createScheduleInjectRoutes(deps) {
|
|
7478
|
-
const
|
|
7479
|
-
|
|
7478
|
+
const app66 = new Hono();
|
|
7479
|
+
app66.post("/", async (c) => {
|
|
7480
7480
|
const env = c.env;
|
|
7481
7481
|
const remoteAddr = env?.incoming?.socket?.remoteAddress ?? "";
|
|
7482
7482
|
if (!isLoopbackAddr(remoteAddr)) {
|
|
@@ -7577,7 +7577,7 @@ function createScheduleInjectRoutes(deps) {
|
|
|
7577
7577
|
console.error(`${TAG20} op=inject-spawn eventId=${eventId} sessionId=${sessionId} result=ok status=-`);
|
|
7578
7578
|
return c.json({ ok: true }, 200);
|
|
7579
7579
|
});
|
|
7580
|
-
return
|
|
7580
|
+
return app66;
|
|
7581
7581
|
}
|
|
7582
7582
|
|
|
7583
7583
|
// server/index.ts
|
|
@@ -8774,6 +8774,23 @@ function filterConversationsForSubAccount(conversations, managerPhones) {
|
|
|
8774
8774
|
}
|
|
8775
8775
|
return out;
|
|
8776
8776
|
}
|
|
8777
|
+
function unionThread(a, b) {
|
|
8778
|
+
const seen = /* @__PURE__ */ new Set();
|
|
8779
|
+
const merged = [];
|
|
8780
|
+
for (const rec of [...a, ...b]) {
|
|
8781
|
+
if (seen.has(rec.messageId)) continue;
|
|
8782
|
+
seen.add(rec.messageId);
|
|
8783
|
+
merged.push(rec);
|
|
8784
|
+
}
|
|
8785
|
+
return merged.sort((x, y) => Date.parse(x.dateSent) - Date.parse(y.dateSent));
|
|
8786
|
+
}
|
|
8787
|
+
function unionConversationMaps(a, b) {
|
|
8788
|
+
const out = /* @__PURE__ */ new Map();
|
|
8789
|
+
for (const jid of /* @__PURE__ */ new Set([...a.keys(), ...b.keys()])) {
|
|
8790
|
+
out.set(jid, unionThread(a.get(jid) ?? [], b.get(jid) ?? []));
|
|
8791
|
+
}
|
|
8792
|
+
return out;
|
|
8793
|
+
}
|
|
8777
8794
|
|
|
8778
8795
|
// app/lib/whatsapp/authorize-recall-read.ts
|
|
8779
8796
|
function authorizeRecallRead(input) {
|
|
@@ -9263,7 +9280,10 @@ app2.get("/conversations", (c) => {
|
|
|
9263
9280
|
const projecting = projection.managerPhones != null;
|
|
9264
9281
|
const managerPhonesBound = projection.managerPhones?.length ?? 0;
|
|
9265
9282
|
const allConversations = readAllConversations(storeAccountId);
|
|
9266
|
-
const scoped = projection.managerPhones ?
|
|
9283
|
+
const scoped = projection.managerPhones ? unionConversationMaps(
|
|
9284
|
+
filterConversationsForSubAccount(allConversations, projection.managerPhones),
|
|
9285
|
+
readAllConversations(resolveReadStoreKey(requestedAccountId))
|
|
9286
|
+
) : allConversations;
|
|
9267
9287
|
const conversations = [...scoped.entries()].map(([jid, messages]) => {
|
|
9268
9288
|
const last = messages.length > 0 ? messages[messages.length - 1] : null;
|
|
9269
9289
|
return {
|
|
@@ -9302,12 +9322,20 @@ app2.get("/messages", (c) => {
|
|
|
9302
9322
|
projection.managerPhones,
|
|
9303
9323
|
conversationCounterpartyPhone(jid, storeMessages[0]?.senderTelephone ?? "")
|
|
9304
9324
|
);
|
|
9305
|
-
const
|
|
9325
|
+
const ownStoreAccountId = projecting ? resolveReadStoreKey(requestedAccountId) : storeAccountId;
|
|
9326
|
+
const houseThread = counterpartyBound ? storeMessages : [];
|
|
9327
|
+
const ownThread = projecting ? readConversation(ownStoreAccountId, jid) : [];
|
|
9328
|
+
const sourceById = /* @__PURE__ */ new Map();
|
|
9329
|
+
for (const m of houseThread) if (!sourceById.has(m.messageId)) sourceById.set(m.messageId, storeAccountId);
|
|
9330
|
+
for (const m of ownThread) if (!sourceById.has(m.messageId)) sourceById.set(m.messageId, ownStoreAccountId);
|
|
9331
|
+
const bounded = projecting ? unionThread(houseThread, ownThread) : houseThread;
|
|
9306
9332
|
const limited = effectiveLimit ? bounded.slice(-effectiveLimit) : bounded;
|
|
9307
|
-
const threadReactions = foldReactions(
|
|
9333
|
+
const threadReactions = foldReactions(
|
|
9334
|
+
projecting ? [...readReactions(storeAccountId, jid), ...readReactions(ownStoreAccountId, jid)] : readReactions(storeAccountId, jid)
|
|
9335
|
+
);
|
|
9308
9336
|
let withAttachments = 0;
|
|
9309
9337
|
const messages = limited.map((m) => {
|
|
9310
|
-
const attachment = recallAttachment(storeAccountId, m.attachmentId);
|
|
9338
|
+
const attachment = recallAttachment(sourceById.get(m.messageId) ?? storeAccountId, m.attachmentId);
|
|
9311
9339
|
if (attachment) withAttachments += 1;
|
|
9312
9340
|
const reactions = threadReactions.get(m.msgKeyId);
|
|
9313
9341
|
return {
|
|
@@ -13791,8 +13819,8 @@ async function reapplyLeversViaManager() {
|
|
|
13791
13819
|
var WEBCHAT_SEND_TURN_WINDOW_MS = Number(process.env.WEBCHAT_SEND_TURN_WINDOW_MS ?? String(15e3));
|
|
13792
13820
|
var sendSeq = 0;
|
|
13793
13821
|
function createWebchatRoutes(deps) {
|
|
13794
|
-
const
|
|
13795
|
-
|
|
13822
|
+
const app66 = new Hono();
|
|
13823
|
+
app66.post("/send", requireAdminSession, async (c) => {
|
|
13796
13824
|
let accountId;
|
|
13797
13825
|
try {
|
|
13798
13826
|
accountId = resolvePlatformAccountId();
|
|
@@ -13995,7 +14023,7 @@ ${note}` : note;
|
|
|
13995
14023
|
if (turnTimer.unref) turnTimer.unref();
|
|
13996
14024
|
return c.json({ ok: true });
|
|
13997
14025
|
});
|
|
13998
|
-
|
|
14026
|
+
app66.post("/interrupt", requireAdminSession, async (c) => {
|
|
13999
14027
|
const cacheKey = c.get("cacheKey");
|
|
14000
14028
|
const requesterUserId = (cacheKey ? getUserIdForSession(cacheKey) : void 0) ?? null;
|
|
14001
14029
|
const primaryUserId = resolvePrimaryAdminUserId();
|
|
@@ -14023,7 +14051,7 @@ ${note}` : note;
|
|
|
14023
14051
|
}
|
|
14024
14052
|
return c.json({ ok: true, stopped: outcome.stopped, intId: outcome.intId, deadChild: outcome.deadChild }, 200);
|
|
14025
14053
|
});
|
|
14026
|
-
|
|
14054
|
+
app66.post("/settings", requireAdminSession, async (c) => {
|
|
14027
14055
|
const body = await c.req.json().catch(() => null);
|
|
14028
14056
|
const op = body?.op;
|
|
14029
14057
|
const value = body?.value;
|
|
@@ -14063,7 +14091,7 @@ ${note}` : note;
|
|
|
14063
14091
|
console.log(`[webchat:settings] op=${op} outcome=accepted value=${value} settingsApplied=${settingsApplied}`);
|
|
14064
14092
|
return c.json({ ok: true, settingsApplied });
|
|
14065
14093
|
});
|
|
14066
|
-
|
|
14094
|
+
app66.get("/session", requireAdminSession, async (c) => {
|
|
14067
14095
|
let accountId;
|
|
14068
14096
|
try {
|
|
14069
14097
|
accountId = resolvePlatformAccountId();
|
|
@@ -14141,7 +14169,7 @@ ${note}` : note;
|
|
|
14141
14169
|
const indicators = await fetchComposerIndicators(sessionId);
|
|
14142
14170
|
return c.json({ sessionId, projectDir, source, sizeBytes: jsonlSizeBytes(projectDir, sessionId), pendingPermissionPrompt: deps.pendingPromptFor?.(`session:${sessionId}`) ?? null, deliveryFailure: deps.deliveryFailureFor?.(`session:${sessionId}`) ?? null, ...indicators, ...readLevers(account) });
|
|
14143
14171
|
});
|
|
14144
|
-
|
|
14172
|
+
app66.post("/permission-verdict", requireAdminSession, async (c) => {
|
|
14145
14173
|
const body = await c.req.json().catch(() => null);
|
|
14146
14174
|
const sessionId = body?.sessionId;
|
|
14147
14175
|
const requestId = body?.request_id;
|
|
@@ -14158,7 +14186,7 @@ ${note}` : note;
|
|
|
14158
14186
|
const ok = deps.resolvePermissionVerdict?.(`session:${sessionId}`, requestId, behavior) ?? false;
|
|
14159
14187
|
return c.json({ ok });
|
|
14160
14188
|
});
|
|
14161
|
-
return
|
|
14189
|
+
return app66;
|
|
14162
14190
|
}
|
|
14163
14191
|
|
|
14164
14192
|
// server/routes/webchat-greeting.ts
|
|
@@ -23530,6 +23558,161 @@ app46.get("/booking-link", requireAdminSession, (c) => {
|
|
|
23530
23558
|
});
|
|
23531
23559
|
var calendar_default = app46;
|
|
23532
23560
|
|
|
23561
|
+
// server/routes/admin/routines.ts
|
|
23562
|
+
import cronParser from "cron-parser";
|
|
23563
|
+
var { parseExpression } = cronParser;
|
|
23564
|
+
var app47 = new Hono();
|
|
23565
|
+
var AUTOMATION_WHERE = "(e.recurrence IS NOT NULL OR e.agentChannel IS NOT NULL OR e.actionPlugin IS NOT NULL)";
|
|
23566
|
+
var ROUTINE_COLS = `e.eventId AS eventId, e.name AS name, e.eventStatus AS eventStatus,
|
|
23567
|
+
e.recurrence AS recurrence, e.nextRun AS nextRun, e.lastTriggered AS lastTriggered,
|
|
23568
|
+
e.timezone AS timezone, e.startDate AS startDate,
|
|
23569
|
+
e.agentChannel AS agentChannel, e.agentDestination AS agentDestination, e.agentPrompt AS agentPrompt,
|
|
23570
|
+
e.actionPlugin AS actionPlugin, e.actionTool AS actionTool, e.actionArgs AS actionArgs,
|
|
23571
|
+
e.notes AS notes, e.lastDispatchResult AS lastDispatchResult, e.lastDispatchAt AS lastDispatchAt`;
|
|
23572
|
+
function mapRoutine(r) {
|
|
23573
|
+
const g = (k) => r.get(k) ?? null;
|
|
23574
|
+
return {
|
|
23575
|
+
eventId: g("eventId"),
|
|
23576
|
+
name: g("name"),
|
|
23577
|
+
eventStatus: g("eventStatus"),
|
|
23578
|
+
recurrence: g("recurrence"),
|
|
23579
|
+
nextRun: g("nextRun"),
|
|
23580
|
+
lastTriggered: g("lastTriggered"),
|
|
23581
|
+
timezone: g("timezone"),
|
|
23582
|
+
startDate: g("startDate"),
|
|
23583
|
+
agentChannel: g("agentChannel"),
|
|
23584
|
+
agentDestination: g("agentDestination"),
|
|
23585
|
+
agentPrompt: g("agentPrompt"),
|
|
23586
|
+
actionPlugin: g("actionPlugin"),
|
|
23587
|
+
actionTool: g("actionTool"),
|
|
23588
|
+
actionArgs: g("actionArgs"),
|
|
23589
|
+
notes: g("notes"),
|
|
23590
|
+
lastDispatchResult: g("lastDispatchResult"),
|
|
23591
|
+
lastDispatchAt: g("lastDispatchAt")
|
|
23592
|
+
};
|
|
23593
|
+
}
|
|
23594
|
+
app47.get("/", requireAdminSession, async (c) => {
|
|
23595
|
+
const accountId = getAccountIdForSession(c.var.cacheKey);
|
|
23596
|
+
if (!accountId) {
|
|
23597
|
+
console.error('[admin:routines] op=list auth-rejected reason="no account for session"');
|
|
23598
|
+
return c.json({ error: "Account not found for session" }, 401);
|
|
23599
|
+
}
|
|
23600
|
+
const session = getSession();
|
|
23601
|
+
try {
|
|
23602
|
+
const res = await session.run(
|
|
23603
|
+
`MATCH (e:Event {accountId: $accountId})
|
|
23604
|
+
WHERE ${AUTOMATION_WHERE}
|
|
23605
|
+
RETURN ${ROUTINE_COLS}
|
|
23606
|
+
ORDER BY e.nextRun`,
|
|
23607
|
+
{ accountId }
|
|
23608
|
+
);
|
|
23609
|
+
const routines = res.records.map(mapRoutine);
|
|
23610
|
+
console.log(`[admin:routines] op=list accountId=${accountId.slice(0, 8)} count=${routines.length}`);
|
|
23611
|
+
return c.json({ routines });
|
|
23612
|
+
} catch (err) {
|
|
23613
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
23614
|
+
console.error(`[admin:routines] op=list-fail err="${message}"`);
|
|
23615
|
+
return c.json({ error: `Routines unavailable: ${message}` }, 503);
|
|
23616
|
+
} finally {
|
|
23617
|
+
await session.close();
|
|
23618
|
+
}
|
|
23619
|
+
});
|
|
23620
|
+
app47.get("/:eventId", requireAdminSession, async (c) => {
|
|
23621
|
+
const accountId = getAccountIdForSession(c.var.cacheKey);
|
|
23622
|
+
if (!accountId) return c.json({ error: "Account not found for session" }, 401);
|
|
23623
|
+
const eventId = c.req.param("eventId");
|
|
23624
|
+
const session = getSession();
|
|
23625
|
+
try {
|
|
23626
|
+
const res = await session.run(
|
|
23627
|
+
`MATCH (e:Event {eventId: $eventId, accountId: $accountId})
|
|
23628
|
+
WHERE ${AUTOMATION_WHERE}
|
|
23629
|
+
RETURN ${ROUTINE_COLS}`,
|
|
23630
|
+
{ eventId, accountId }
|
|
23631
|
+
);
|
|
23632
|
+
const found = res.records.length > 0;
|
|
23633
|
+
console.log(`[admin:routines] op=get id=${eventId.slice(0, 8)} found=${found}`);
|
|
23634
|
+
if (!found) return c.json({ error: "Routine not found" }, 404);
|
|
23635
|
+
return c.json({ routine: mapRoutine(res.records[0]) });
|
|
23636
|
+
} catch (err) {
|
|
23637
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
23638
|
+
console.error(`[admin:routines] op=get-fail id=${eventId.slice(0, 8)} err="${message}"`);
|
|
23639
|
+
return c.json({ error: `Routine unavailable: ${message}` }, 503);
|
|
23640
|
+
} finally {
|
|
23641
|
+
await session.close();
|
|
23642
|
+
}
|
|
23643
|
+
});
|
|
23644
|
+
app47.patch("/:eventId", requireAdminSession, async (c) => {
|
|
23645
|
+
const accountId = getAccountIdForSession(c.var.cacheKey);
|
|
23646
|
+
if (!accountId) return c.json({ error: "Account not found for session" }, 401);
|
|
23647
|
+
const eventId = c.req.param("eventId");
|
|
23648
|
+
const body = await c.req.json().catch(() => ({}));
|
|
23649
|
+
const setClauses = [];
|
|
23650
|
+
const params = { eventId, accountId };
|
|
23651
|
+
const fields = [];
|
|
23652
|
+
let nextRunLog = "unchanged";
|
|
23653
|
+
if (typeof body.agentPrompt === "string") {
|
|
23654
|
+
setClauses.push("e.agentPrompt = $agentPrompt");
|
|
23655
|
+
params.agentPrompt = body.agentPrompt;
|
|
23656
|
+
fields.push("agentPrompt");
|
|
23657
|
+
}
|
|
23658
|
+
if (typeof body.recurrence === "string") {
|
|
23659
|
+
const tzSession = getSession();
|
|
23660
|
+
let timezone = null;
|
|
23661
|
+
try {
|
|
23662
|
+
const tzRes = await tzSession.run(
|
|
23663
|
+
`MATCH (e:Event {eventId: $eventId, accountId: $accountId}) RETURN e.timezone AS timezone`,
|
|
23664
|
+
{ eventId, accountId }
|
|
23665
|
+
);
|
|
23666
|
+
timezone = tzRes.records[0]?.get("timezone") ?? null;
|
|
23667
|
+
} catch (err) {
|
|
23668
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
23669
|
+
console.error(`[admin:routines] op=patch id=${eventId.slice(0, 8)} outcome=rejected reason=tz-read-fail err="${message}"`);
|
|
23670
|
+
return c.json({ error: `Routine unavailable: ${message}` }, 503);
|
|
23671
|
+
} finally {
|
|
23672
|
+
await tzSession.close();
|
|
23673
|
+
}
|
|
23674
|
+
try {
|
|
23675
|
+
const interval = parseExpression(body.recurrence, { currentDate: /* @__PURE__ */ new Date(), tz: timezone ?? void 0 });
|
|
23676
|
+
const nextRun = interval.next().toISOString();
|
|
23677
|
+
setClauses.push("e.recurrence = $recurrence", "e.nextRun = $nextRun");
|
|
23678
|
+
params.recurrence = body.recurrence;
|
|
23679
|
+
params.nextRun = nextRun;
|
|
23680
|
+
fields.push("recurrence");
|
|
23681
|
+
nextRunLog = nextRun;
|
|
23682
|
+
} catch (err) {
|
|
23683
|
+
const reason = err instanceof Error ? err.message : String(err);
|
|
23684
|
+
console.error(`[admin:routines] op=patch id=${eventId.slice(0, 8)} outcome=rejected reason=invalid-cron cron=${body.recurrence}`);
|
|
23685
|
+
return c.json({ error: `Invalid recurrence: ${reason}` }, 400);
|
|
23686
|
+
}
|
|
23687
|
+
}
|
|
23688
|
+
if (setClauses.length === 0) return c.json({ error: "No editable fields supplied" }, 400);
|
|
23689
|
+
setClauses.push("e.updatedAt = $updatedAt");
|
|
23690
|
+
params.updatedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
23691
|
+
const session = getSession();
|
|
23692
|
+
try {
|
|
23693
|
+
const res = await session.run(
|
|
23694
|
+
`MATCH (e:Event {eventId: $eventId, accountId: $accountId})
|
|
23695
|
+
WHERE ${AUTOMATION_WHERE}
|
|
23696
|
+
SET ${setClauses.join(", ")}
|
|
23697
|
+
RETURN ${ROUTINE_COLS}`,
|
|
23698
|
+
params
|
|
23699
|
+
);
|
|
23700
|
+
if (res.records.length === 0) {
|
|
23701
|
+
console.error(`[admin:routines] op=patch id=${eventId.slice(0, 8)} outcome=rejected reason=not-found`);
|
|
23702
|
+
return c.json({ error: "Routine not found" }, 404);
|
|
23703
|
+
}
|
|
23704
|
+
console.log(`[admin:routines] op=patch id=${eventId.slice(0, 8)} fields=${fields.join("+")} outcome=ok nextRun=${nextRunLog} cron=${params.recurrence ?? "unchanged"}`);
|
|
23705
|
+
return c.json({ routine: mapRoutine(res.records[0]) });
|
|
23706
|
+
} catch (err) {
|
|
23707
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
23708
|
+
console.error(`[admin:routines] op=patch id=${eventId.slice(0, 8)} outcome=rejected reason=${message}`);
|
|
23709
|
+
return c.json({ error: `Update failed: ${message}` }, 503);
|
|
23710
|
+
} finally {
|
|
23711
|
+
await session.close();
|
|
23712
|
+
}
|
|
23713
|
+
});
|
|
23714
|
+
var routines_default = app47;
|
|
23715
|
+
|
|
23533
23716
|
// app/lib/time-entry-format.ts
|
|
23534
23717
|
function secondsBetween(startIso, endIso) {
|
|
23535
23718
|
const s = Date.parse(startIso);
|
|
@@ -23551,8 +23734,8 @@ function toNum(v) {
|
|
|
23551
23734
|
var TAG39 = "[task-timer]";
|
|
23552
23735
|
var COMPLETED = /* @__PURE__ */ new Set(["completed"]);
|
|
23553
23736
|
var HIDDEN_FROM_OPEN = /* @__PURE__ */ new Set(["completed", "cancelled"]);
|
|
23554
|
-
var
|
|
23555
|
-
|
|
23737
|
+
var app48 = new Hono();
|
|
23738
|
+
app48.get("/", requireAdminSession, async (c) => {
|
|
23556
23739
|
const cacheKey = c.var.cacheKey;
|
|
23557
23740
|
const accountId = getAccountIdForSession(cacheKey);
|
|
23558
23741
|
if (!accountId) {
|
|
@@ -23639,13 +23822,13 @@ app47.get("/", requireAdminSession, async (c) => {
|
|
|
23639
23822
|
await session.close();
|
|
23640
23823
|
}
|
|
23641
23824
|
});
|
|
23642
|
-
var tasks_list_default =
|
|
23825
|
+
var tasks_list_default = app48;
|
|
23643
23826
|
|
|
23644
23827
|
// server/routes/admin/task-timer-start.ts
|
|
23645
23828
|
import { randomUUID as randomUUID14 } from "crypto";
|
|
23646
23829
|
var TAG40 = "[task-timer]";
|
|
23647
|
-
var
|
|
23648
|
-
|
|
23830
|
+
var app49 = new Hono();
|
|
23831
|
+
app49.post("/", requireAdminSession, async (c) => {
|
|
23649
23832
|
const cacheKey = c.var.cacheKey;
|
|
23650
23833
|
const accountId = getAccountIdForSession(cacheKey);
|
|
23651
23834
|
if (!accountId) return c.json({ error: "Account not found for session" }, 401);
|
|
@@ -23700,13 +23883,13 @@ app48.post("/", requireAdminSession, async (c) => {
|
|
|
23700
23883
|
await session.close();
|
|
23701
23884
|
}
|
|
23702
23885
|
});
|
|
23703
|
-
var task_timer_start_default =
|
|
23886
|
+
var task_timer_start_default = app49;
|
|
23704
23887
|
|
|
23705
23888
|
// server/routes/admin/task-timer-stop.ts
|
|
23706
23889
|
import neo4j5 from "neo4j-driver";
|
|
23707
23890
|
var TAG41 = "[task-timer]";
|
|
23708
|
-
var
|
|
23709
|
-
|
|
23891
|
+
var app50 = new Hono();
|
|
23892
|
+
app50.post("/", requireAdminSession, async (c) => {
|
|
23710
23893
|
const cacheKey = c.var.cacheKey;
|
|
23711
23894
|
const accountId = getAccountIdForSession(cacheKey);
|
|
23712
23895
|
if (!accountId) return c.json({ error: "Account not found for session" }, 401);
|
|
@@ -23773,12 +23956,12 @@ app49.post("/", requireAdminSession, async (c) => {
|
|
|
23773
23956
|
await session.close();
|
|
23774
23957
|
}
|
|
23775
23958
|
});
|
|
23776
|
-
var task_timer_stop_default =
|
|
23959
|
+
var task_timer_stop_default = app50;
|
|
23777
23960
|
|
|
23778
23961
|
// server/routes/admin/task-complete.ts
|
|
23779
23962
|
var TAG42 = "[task-timer]";
|
|
23780
|
-
var
|
|
23781
|
-
|
|
23963
|
+
var app51 = new Hono();
|
|
23964
|
+
app51.post("/", requireAdminSession, async (c) => {
|
|
23782
23965
|
const cacheKey = c.var.cacheKey;
|
|
23783
23966
|
const accountId = getAccountIdForSession(cacheKey);
|
|
23784
23967
|
if (!accountId) return c.json({ error: "Account not found for session" }, 401);
|
|
@@ -23816,14 +23999,14 @@ app50.post("/", requireAdminSession, async (c) => {
|
|
|
23816
23999
|
await session.close();
|
|
23817
24000
|
}
|
|
23818
24001
|
});
|
|
23819
|
-
var task_complete_default =
|
|
24002
|
+
var task_complete_default = app51;
|
|
23820
24003
|
|
|
23821
24004
|
// server/routes/admin/task-time-adjust.ts
|
|
23822
24005
|
import { randomUUID as randomUUID15 } from "crypto";
|
|
23823
24006
|
import neo4j6 from "neo4j-driver";
|
|
23824
24007
|
var TAG43 = "[task-time-adjust]";
|
|
23825
|
-
var
|
|
23826
|
-
|
|
24008
|
+
var app52 = new Hono();
|
|
24009
|
+
app52.post("/", requireAdminSession, async (c) => {
|
|
23827
24010
|
const cacheKey = c.var.cacheKey;
|
|
23828
24011
|
const accountId = getAccountIdForSession(cacheKey);
|
|
23829
24012
|
if (!accountId) return c.json({ error: "Account not found for session" }, 401);
|
|
@@ -23897,11 +24080,11 @@ app51.post("/", requireAdminSession, async (c) => {
|
|
|
23897
24080
|
await session.close();
|
|
23898
24081
|
}
|
|
23899
24082
|
});
|
|
23900
|
-
var task_time_adjust_default =
|
|
24083
|
+
var task_time_adjust_default = app52;
|
|
23901
24084
|
|
|
23902
24085
|
// server/routes/admin/activity.ts
|
|
23903
24086
|
import { readdirSync as readdirSync24 } from "fs";
|
|
23904
|
-
var
|
|
24087
|
+
var app53 = new Hono();
|
|
23905
24088
|
var TAG44 = "[activity]";
|
|
23906
24089
|
function resolveHouseAccountId(accounts) {
|
|
23907
24090
|
const houses = accounts.filter((a) => a.config.role === "house");
|
|
@@ -23923,7 +24106,7 @@ function countAccountDirsOnDisk() {
|
|
|
23923
24106
|
return null;
|
|
23924
24107
|
}
|
|
23925
24108
|
}
|
|
23926
|
-
|
|
24109
|
+
app53.get("/", requireAdminSession, async (c) => {
|
|
23927
24110
|
const req = requestToken();
|
|
23928
24111
|
const cacheKey = c.var.cacheKey;
|
|
23929
24112
|
const caller2 = getAccountIdForSession(cacheKey) ?? null;
|
|
@@ -24032,60 +24215,61 @@ app52.get("/", requireAdminSession, async (c) => {
|
|
|
24032
24215
|
}
|
|
24033
24216
|
});
|
|
24034
24217
|
});
|
|
24035
|
-
var activity_default =
|
|
24218
|
+
var activity_default = app53;
|
|
24036
24219
|
|
|
24037
24220
|
// server/routes/admin/index.ts
|
|
24038
|
-
var
|
|
24039
|
-
|
|
24040
|
-
|
|
24041
|
-
|
|
24042
|
-
|
|
24043
|
-
|
|
24044
|
-
|
|
24045
|
-
|
|
24046
|
-
|
|
24047
|
-
|
|
24048
|
-
|
|
24049
|
-
|
|
24050
|
-
|
|
24051
|
-
|
|
24052
|
-
|
|
24053
|
-
|
|
24054
|
-
|
|
24055
|
-
|
|
24056
|
-
|
|
24057
|
-
|
|
24058
|
-
|
|
24059
|
-
|
|
24060
|
-
|
|
24061
|
-
|
|
24062
|
-
|
|
24063
|
-
|
|
24064
|
-
|
|
24065
|
-
|
|
24066
|
-
|
|
24067
|
-
|
|
24068
|
-
|
|
24069
|
-
|
|
24070
|
-
|
|
24071
|
-
|
|
24072
|
-
|
|
24073
|
-
|
|
24074
|
-
|
|
24075
|
-
|
|
24076
|
-
|
|
24077
|
-
|
|
24078
|
-
|
|
24079
|
-
|
|
24080
|
-
|
|
24081
|
-
|
|
24221
|
+
var app54 = new Hono();
|
|
24222
|
+
app54.route("/session", session_default);
|
|
24223
|
+
app54.route("/accounts", accounts_default);
|
|
24224
|
+
app54.route("/logs", logs_default);
|
|
24225
|
+
app54.route("/claude-info", claude_info_default);
|
|
24226
|
+
app54.route("/attachment", attachment_default);
|
|
24227
|
+
app54.route("/agents", agents_default);
|
|
24228
|
+
app54.route("/sessions", sessions_default);
|
|
24229
|
+
app54.route("/claude-sessions", claude_sessions_default);
|
|
24230
|
+
app54.route("/log-ingest", log_ingest_default);
|
|
24231
|
+
app54.route("/events", events_default);
|
|
24232
|
+
app54.route("/files", files_default);
|
|
24233
|
+
app54.route("/graph-search", graph_search_default);
|
|
24234
|
+
app54.route("/graph-subgraph", graph_subgraph_default);
|
|
24235
|
+
app54.route("/graph-delete", graph_delete_default);
|
|
24236
|
+
app54.route("/graph-restore", graph_restore_default);
|
|
24237
|
+
app54.route("/graph-labels-in-graph", graph_labels_in_graph_default);
|
|
24238
|
+
app54.route("/graph-default-view", graph_default_view_default);
|
|
24239
|
+
app54.route("/sidebar-artefacts", sidebar_artefacts_default);
|
|
24240
|
+
app54.route("/sidebar-sessions", sidebar_sessions_default);
|
|
24241
|
+
app54.route("/session-delete", session_delete_default);
|
|
24242
|
+
app54.route("/session-stop", session_stop_default);
|
|
24243
|
+
app54.route("/session-archive", session_archive_default);
|
|
24244
|
+
app54.route("/session-rename", session_rename_default);
|
|
24245
|
+
app54.route("/session-usage", session_usage_default);
|
|
24246
|
+
app54.route("/browser", browser_default);
|
|
24247
|
+
app54.route("/session-rc-spawn", session_rc_spawn_default);
|
|
24248
|
+
app54.route("/session-reseat", session_reseat_default);
|
|
24249
|
+
app54.route("/system-stats", system_stats_default);
|
|
24250
|
+
app54.route("/health-brand", health_default2);
|
|
24251
|
+
app54.route("/linkedin-ingest", linkedin_ingest_default);
|
|
24252
|
+
app54.route("/post-turn-context", post_turn_context_default);
|
|
24253
|
+
app54.route("/public-session-context", public_session_context_default);
|
|
24254
|
+
app54.route("/public-session-exit", public_session_exit_default);
|
|
24255
|
+
app54.route("/access-session-evict", access_session_evict_default);
|
|
24256
|
+
app54.route("/enrol-person", enrol_person_default);
|
|
24257
|
+
app54.route("/calendar", calendar_default);
|
|
24258
|
+
app54.route("/routines", routines_default);
|
|
24259
|
+
app54.route("/tasks-list", tasks_list_default);
|
|
24260
|
+
app54.route("/task-timer-start", task_timer_start_default);
|
|
24261
|
+
app54.route("/task-timer-stop", task_timer_stop_default);
|
|
24262
|
+
app54.route("/task-complete", task_complete_default);
|
|
24263
|
+
app54.route("/task-time-adjust", task_time_adjust_default);
|
|
24264
|
+
app54.route("/activity", activity_default);
|
|
24265
|
+
var admin_default = app54;
|
|
24082
24266
|
|
|
24083
24267
|
// server/routes/access/verify-token.ts
|
|
24084
24268
|
var TAG45 = "[access-verify]";
|
|
24085
24269
|
var MINT_TAG = "[access-session-mint]";
|
|
24086
24270
|
var COOKIE_NAME = "__access_session";
|
|
24087
|
-
var
|
|
24088
|
-
|
|
24271
|
+
var app55 = new Hono();
|
|
24272
|
+
app55.post("/", async (c) => {
|
|
24089
24273
|
const ip = c.var.clientIp || "unknown";
|
|
24090
24274
|
let body;
|
|
24091
24275
|
try {
|
|
@@ -24167,7 +24351,7 @@ app54.post("/", async (c) => {
|
|
|
24167
24351
|
displayName: grant.displayName
|
|
24168
24352
|
});
|
|
24169
24353
|
});
|
|
24170
|
-
var verify_token_default =
|
|
24354
|
+
var verify_token_default = app55;
|
|
24171
24355
|
|
|
24172
24356
|
// app/lib/access-email.ts
|
|
24173
24357
|
import { spawn as spawn2 } from "child_process";
|
|
@@ -24230,9 +24414,9 @@ async function sendMagicLinkEmail(payload) {
|
|
|
24230
24414
|
|
|
24231
24415
|
// server/routes/access/request-magic-link.ts
|
|
24232
24416
|
var TAG46 = "[access-request-link]";
|
|
24233
|
-
var
|
|
24417
|
+
var app56 = new Hono();
|
|
24234
24418
|
var VISITOR_MESSAGE = "If that email is on the invite list, a fresh link is on the way.";
|
|
24235
|
-
|
|
24419
|
+
app56.post("/", async (c) => {
|
|
24236
24420
|
let body;
|
|
24237
24421
|
try {
|
|
24238
24422
|
body = await c.req.json();
|
|
@@ -24306,13 +24490,13 @@ app55.post("/", async (c) => {
|
|
|
24306
24490
|
);
|
|
24307
24491
|
return c.json({ message: VISITOR_MESSAGE }, 200);
|
|
24308
24492
|
});
|
|
24309
|
-
var request_magic_link_default =
|
|
24493
|
+
var request_magic_link_default = app56;
|
|
24310
24494
|
|
|
24311
24495
|
// server/routes/access/index.ts
|
|
24312
|
-
var
|
|
24313
|
-
|
|
24314
|
-
|
|
24315
|
-
var access_default =
|
|
24496
|
+
var app57 = new Hono();
|
|
24497
|
+
app57.route("/verify-token", verify_token_default);
|
|
24498
|
+
app57.route("/request-magic-link", request_magic_link_default);
|
|
24499
|
+
var access_default = app57;
|
|
24316
24500
|
|
|
24317
24501
|
// server/routes/sites.ts
|
|
24318
24502
|
import { existsSync as existsSync36, readFileSync as readFileSync39, realpathSync as realpathSync7, statSync as statSync14 } from "fs";
|
|
@@ -24347,8 +24531,8 @@ function getExt(p) {
|
|
|
24347
24531
|
if (idx < p.lastIndexOf("/")) return "";
|
|
24348
24532
|
return p.slice(idx).toLowerCase();
|
|
24349
24533
|
}
|
|
24350
|
-
var
|
|
24351
|
-
|
|
24534
|
+
var app58 = new Hono();
|
|
24535
|
+
app58.get("/:rel{.*}", (c) => {
|
|
24352
24536
|
const reqPath = c.req.path;
|
|
24353
24537
|
const rawRel = c.req.param("rel") ?? "";
|
|
24354
24538
|
const trimmed = rawRel.replace(/^\/+/, "").replace(/\/+$/, "");
|
|
@@ -24451,7 +24635,7 @@ app57.get("/:rel{.*}", (c) => {
|
|
|
24451
24635
|
"X-Content-Type-Options": "nosniff"
|
|
24452
24636
|
});
|
|
24453
24637
|
});
|
|
24454
|
-
var sites_default =
|
|
24638
|
+
var sites_default = app58;
|
|
24455
24639
|
|
|
24456
24640
|
// app/lib/visitor-token.ts
|
|
24457
24641
|
import { createHmac, randomBytes, timingSafeEqual } from "crypto";
|
|
@@ -24551,7 +24735,7 @@ function readBrandConfig() {
|
|
|
24551
24735
|
}
|
|
24552
24736
|
|
|
24553
24737
|
// server/routes/visitor-consent.ts
|
|
24554
|
-
var
|
|
24738
|
+
var app59 = new Hono();
|
|
24555
24739
|
var CONSENT_COOKIE_NAME = "mxy_consent";
|
|
24556
24740
|
var CONSENT_COOKIE_MAX_AGE_SECONDS = 60 * 60 * 24 * 365;
|
|
24557
24741
|
var DEFAULT_CONSENT_COPY = {
|
|
@@ -24596,17 +24780,17 @@ function siteSlugFromReferer(referer) {
|
|
|
24596
24780
|
return "";
|
|
24597
24781
|
}
|
|
24598
24782
|
}
|
|
24599
|
-
|
|
24783
|
+
app59.options("/consent", (c) => {
|
|
24600
24784
|
const origin = getOrigin(c);
|
|
24601
24785
|
setCorsHeaders(c, origin);
|
|
24602
24786
|
return c.body(null, 204);
|
|
24603
24787
|
});
|
|
24604
|
-
|
|
24788
|
+
app59.options("/brand-config", (c) => {
|
|
24605
24789
|
const origin = getOrigin(c);
|
|
24606
24790
|
setCorsHeaders(c, origin);
|
|
24607
24791
|
return c.body(null, 204);
|
|
24608
24792
|
});
|
|
24609
|
-
|
|
24793
|
+
app59.post("/consent", async (c) => {
|
|
24610
24794
|
const origin = getOrigin(c);
|
|
24611
24795
|
setCorsHeaders(c, origin);
|
|
24612
24796
|
let raw;
|
|
@@ -24646,7 +24830,7 @@ app58.post("/consent", async (c) => {
|
|
|
24646
24830
|
console.log(`[consent] ${parsed.decision} site=${site} brand=${brandName} tokenBound=${tokenBound}`);
|
|
24647
24831
|
return c.body(null, 204);
|
|
24648
24832
|
});
|
|
24649
|
-
|
|
24833
|
+
app59.get("/brand-config", (c) => {
|
|
24650
24834
|
const origin = getOrigin(c);
|
|
24651
24835
|
setCorsHeaders(c, origin);
|
|
24652
24836
|
const brand = readBrandConfig();
|
|
@@ -24656,7 +24840,7 @@ app58.get("/brand-config", (c) => {
|
|
|
24656
24840
|
c.header("Cache-Control", "public, max-age=300");
|
|
24657
24841
|
return c.json({ consent: { copy, palette } });
|
|
24658
24842
|
});
|
|
24659
|
-
var visitor_consent_default =
|
|
24843
|
+
var visitor_consent_default = app59;
|
|
24660
24844
|
|
|
24661
24845
|
// server/routes/listings.ts
|
|
24662
24846
|
function getCookie(headerValue, name) {
|
|
@@ -24683,8 +24867,8 @@ function appendConsentParams(pageUrl, token) {
|
|
|
24683
24867
|
}
|
|
24684
24868
|
var SAFE_SLUG_RE = /^[a-z0-9](?:[a-z0-9-]{0,118}[a-z0-9])?$/;
|
|
24685
24869
|
var CHAT_SESSION_KEY_RE = /^[A-Za-z0-9][A-Za-z0-9_-]{7,127}$/;
|
|
24686
|
-
var
|
|
24687
|
-
|
|
24870
|
+
var app60 = new Hono();
|
|
24871
|
+
app60.get("/:slug/click", async (c) => {
|
|
24688
24872
|
const slug = c.req.param("slug") ?? "";
|
|
24689
24873
|
const rawSession = c.req.query("session") ?? "";
|
|
24690
24874
|
const sessionKey = CHAT_SESSION_KEY_RE.test(rawSession) ? rawSession : "invalid";
|
|
@@ -24748,10 +24932,10 @@ app59.get("/:slug/click", async (c) => {
|
|
|
24748
24932
|
console.log(`[property-card-click] sessionKey=${sessionKey} listingSlug=${slug} consent=${consentCookie ?? "absent"} ts=${(/* @__PURE__ */ new Date()).toISOString()}`);
|
|
24749
24933
|
return c.redirect(redirectUrl, 302);
|
|
24750
24934
|
});
|
|
24751
|
-
var listings_default =
|
|
24935
|
+
var listings_default = app60;
|
|
24752
24936
|
|
|
24753
24937
|
// server/routes/visitor-event.ts
|
|
24754
|
-
var
|
|
24938
|
+
var app61 = new Hono();
|
|
24755
24939
|
var BOT_UA_RE = /\b(bot|crawl|spider|slurp|headlesschrome|phantomjs|googlebot|bingbot|yandex|baiduspider|ahrefsbot|semrushbot|mj12bot|dotbot|petalbot)\b/i;
|
|
24756
24940
|
var buckets = /* @__PURE__ */ new Map();
|
|
24757
24941
|
var RATE_LIMIT = 60;
|
|
@@ -24827,12 +25011,12 @@ function originAllowed(origin, allowlist) {
|
|
|
24827
25011
|
return false;
|
|
24828
25012
|
}
|
|
24829
25013
|
}
|
|
24830
|
-
|
|
25014
|
+
app61.options("/event", (c) => {
|
|
24831
25015
|
const origin = getOrigin2(c);
|
|
24832
25016
|
setCorsHeaders2(c, origin);
|
|
24833
25017
|
return c.body(null, 204);
|
|
24834
25018
|
});
|
|
24835
|
-
|
|
25019
|
+
app61.post("/event", async (c) => {
|
|
24836
25020
|
const origin = getOrigin2(c);
|
|
24837
25021
|
setCorsHeaders2(c, origin);
|
|
24838
25022
|
const ua = c.req.header("user-agent") ?? "";
|
|
@@ -25037,7 +25221,7 @@ async function writeEvent(opts) {
|
|
|
25037
25221
|
);
|
|
25038
25222
|
}
|
|
25039
25223
|
}
|
|
25040
|
-
var visitor_event_default =
|
|
25224
|
+
var visitor_event_default = app61;
|
|
25041
25225
|
|
|
25042
25226
|
// server/routes/session.ts
|
|
25043
25227
|
import { resolve as resolve33 } from "path";
|
|
@@ -25083,8 +25267,8 @@ function withVisitorCookie(response, visitorId) {
|
|
|
25083
25267
|
headers
|
|
25084
25268
|
});
|
|
25085
25269
|
}
|
|
25086
|
-
var
|
|
25087
|
-
|
|
25270
|
+
var app62 = new Hono();
|
|
25271
|
+
app62.post("/", async (c) => {
|
|
25088
25272
|
let body;
|
|
25089
25273
|
try {
|
|
25090
25274
|
body = await c.req.json();
|
|
@@ -25231,7 +25415,7 @@ app61.post("/", async (c) => {
|
|
|
25231
25415
|
newVisitorId
|
|
25232
25416
|
);
|
|
25233
25417
|
});
|
|
25234
|
-
var session_default2 =
|
|
25418
|
+
var session_default2 = app62;
|
|
25235
25419
|
|
|
25236
25420
|
// server/lib/calendar-slots.ts
|
|
25237
25421
|
var WEEKDAYS = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"];
|
|
@@ -25314,17 +25498,17 @@ function computeOpenSlots(config, busy, fromISO, toISO) {
|
|
|
25314
25498
|
}
|
|
25315
25499
|
|
|
25316
25500
|
// server/routes/calendar-public.ts
|
|
25317
|
-
var
|
|
25501
|
+
var app63 = new Hono();
|
|
25318
25502
|
function setCors(c) {
|
|
25319
25503
|
c.header("Access-Control-Allow-Origin", "*");
|
|
25320
25504
|
c.header("Access-Control-Allow-Methods", "GET, OPTIONS");
|
|
25321
25505
|
c.header("Access-Control-Allow-Headers", "content-type");
|
|
25322
25506
|
}
|
|
25323
|
-
|
|
25507
|
+
app63.options("/free-busy", (c) => {
|
|
25324
25508
|
setCors(c);
|
|
25325
25509
|
return c.body(null, 204);
|
|
25326
25510
|
});
|
|
25327
|
-
|
|
25511
|
+
app63.get("/free-busy", async (c) => {
|
|
25328
25512
|
setCors(c);
|
|
25329
25513
|
const from = c.req.query("from");
|
|
25330
25514
|
const to = c.req.query("to");
|
|
@@ -25380,14 +25564,14 @@ app62.get("/free-busy", async (c) => {
|
|
|
25380
25564
|
await session.close();
|
|
25381
25565
|
}
|
|
25382
25566
|
});
|
|
25383
|
-
var calendar_public_default =
|
|
25567
|
+
var calendar_public_default = app63;
|
|
25384
25568
|
|
|
25385
25569
|
// server/routes/portal-fetch.ts
|
|
25386
25570
|
import { createReadStream as createReadStream3 } from "fs";
|
|
25387
25571
|
import { stat as stat8, readFile as readFile8, realpath } from "fs/promises";
|
|
25388
25572
|
import { join as join44, resolve as resolve34, sep as sep9 } from "path";
|
|
25389
25573
|
import { Readable as Readable3 } from "stream";
|
|
25390
|
-
var
|
|
25574
|
+
var app64 = new Hono();
|
|
25391
25575
|
var TAG47 = "[portal-fetch]";
|
|
25392
25576
|
async function verifySignature(secret, accountId, relPath, expiresAtMs, signature, nowMs) {
|
|
25393
25577
|
if (!secret || !signature) return false;
|
|
@@ -25550,9 +25734,9 @@ async function handle(c, headOnly) {
|
|
|
25550
25734
|
}
|
|
25551
25735
|
});
|
|
25552
25736
|
}
|
|
25553
|
-
|
|
25554
|
-
|
|
25555
|
-
var portal_fetch_default =
|
|
25737
|
+
app64.get("/fetch", (c) => handle(c, false));
|
|
25738
|
+
app64.on("HEAD", "/fetch", (c) => handle(c, true));
|
|
25739
|
+
var portal_fetch_default = app64;
|
|
25556
25740
|
|
|
25557
25741
|
// app/lib/timeentry-census.ts
|
|
25558
25742
|
var TAG48 = "[timeentry-census]";
|
|
@@ -26612,8 +26796,8 @@ var streamSSE = (c, cb, onError) => {
|
|
|
26612
26796
|
|
|
26613
26797
|
// app/lib/whatsapp/gateway/routes.ts
|
|
26614
26798
|
function createWaChannelRoutes(deps) {
|
|
26615
|
-
const
|
|
26616
|
-
|
|
26799
|
+
const app66 = new Hono();
|
|
26800
|
+
app66.get("/wa-channel/inbound", (c) => {
|
|
26617
26801
|
const senderId = c.req.query("senderId");
|
|
26618
26802
|
if (!senderId) return c.json({ error: "senderId required" }, 400);
|
|
26619
26803
|
return streamSSE(c, async (stream2) => {
|
|
@@ -26631,7 +26815,7 @@ function createWaChannelRoutes(deps) {
|
|
|
26631
26815
|
}
|
|
26632
26816
|
});
|
|
26633
26817
|
});
|
|
26634
|
-
|
|
26818
|
+
app66.post("/wa-channel/reply", async (c) => {
|
|
26635
26819
|
const body = await c.req.json().catch(() => null);
|
|
26636
26820
|
const senderId = body?.senderId;
|
|
26637
26821
|
const text = body?.text;
|
|
@@ -26652,7 +26836,7 @@ function createWaChannelRoutes(deps) {
|
|
|
26652
26836
|
console.error(`[whatsapp-native] op=reply-dispatch senderId=${senderId} bytes=${bytes}`);
|
|
26653
26837
|
return c.json({ ok: true });
|
|
26654
26838
|
});
|
|
26655
|
-
|
|
26839
|
+
app66.post("/wa-channel/reply-document", async (c) => {
|
|
26656
26840
|
const body = await c.req.json().catch(() => null);
|
|
26657
26841
|
const senderId = body?.senderId;
|
|
26658
26842
|
const files = body?.files;
|
|
@@ -26691,7 +26875,7 @@ function createWaChannelRoutes(deps) {
|
|
|
26691
26875
|
}
|
|
26692
26876
|
return c.json({ ok: true, results });
|
|
26693
26877
|
});
|
|
26694
|
-
|
|
26878
|
+
app66.post("/wa-channel/ready", async (c) => {
|
|
26695
26879
|
const body = await c.req.json().catch(() => null);
|
|
26696
26880
|
const senderId = body?.senderId;
|
|
26697
26881
|
if (typeof senderId !== "string") {
|
|
@@ -26700,7 +26884,7 @@ function createWaChannelRoutes(deps) {
|
|
|
26700
26884
|
deps.onReady?.(senderId);
|
|
26701
26885
|
return c.json({ ok: true });
|
|
26702
26886
|
});
|
|
26703
|
-
|
|
26887
|
+
app66.post("/wa-channel/received", async (c) => {
|
|
26704
26888
|
const body = await c.req.json().catch(() => null);
|
|
26705
26889
|
const senderId = body?.senderId;
|
|
26706
26890
|
const waMessageId = body?.waMessageId;
|
|
@@ -26710,7 +26894,7 @@ function createWaChannelRoutes(deps) {
|
|
|
26710
26894
|
deps.onReceived?.(senderId, waMessageId);
|
|
26711
26895
|
return c.json({ ok: true });
|
|
26712
26896
|
});
|
|
26713
|
-
|
|
26897
|
+
app66.post("/wa-channel/turn-end", async (c) => {
|
|
26714
26898
|
const body = await c.req.json().catch(() => null);
|
|
26715
26899
|
const senderId = body?.senderId;
|
|
26716
26900
|
const sessionId = body?.sessionId;
|
|
@@ -26743,7 +26927,7 @@ function createWaChannelRoutes(deps) {
|
|
|
26743
26927
|
console.error(`[whatsapp-native] op=turn-end sessionId=${sid} replied=no delivered=none`);
|
|
26744
26928
|
return c.json({ ok: true, delivered: "none" });
|
|
26745
26929
|
});
|
|
26746
|
-
return
|
|
26930
|
+
return app66;
|
|
26747
26931
|
}
|
|
26748
26932
|
|
|
26749
26933
|
// app/lib/whatsapp/gateway/wa-gateway.ts
|
|
@@ -27161,8 +27345,8 @@ var import_dist8 = __toESM(require_dist(), 1);
|
|
|
27161
27345
|
|
|
27162
27346
|
// app/lib/webchat/gateway/routes.ts
|
|
27163
27347
|
function createWebchatChannelRoutes(deps) {
|
|
27164
|
-
const
|
|
27165
|
-
|
|
27348
|
+
const app66 = new Hono();
|
|
27349
|
+
app66.get("/webchat-channel/inbound", (c) => {
|
|
27166
27350
|
const key = c.req.query("key");
|
|
27167
27351
|
if (!key) return c.json({ error: "key required" }, 400);
|
|
27168
27352
|
return streamSSE(c, async (stream2) => {
|
|
@@ -27180,7 +27364,7 @@ function createWebchatChannelRoutes(deps) {
|
|
|
27180
27364
|
}
|
|
27181
27365
|
});
|
|
27182
27366
|
});
|
|
27183
|
-
|
|
27367
|
+
app66.post("/webchat-channel/reply", async (c) => {
|
|
27184
27368
|
const body = await c.req.json().catch(() => null);
|
|
27185
27369
|
const key = body?.key;
|
|
27186
27370
|
const text = body?.text;
|
|
@@ -27190,7 +27374,7 @@ function createWebchatChannelRoutes(deps) {
|
|
|
27190
27374
|
deps.onReply?.(key, text);
|
|
27191
27375
|
return c.json({ ok: true });
|
|
27192
27376
|
});
|
|
27193
|
-
|
|
27377
|
+
app66.post("/webchat-channel/connector-auth", async (c) => {
|
|
27194
27378
|
const body = await c.req.json().catch(() => null);
|
|
27195
27379
|
const key = body?.key;
|
|
27196
27380
|
const sessionId = body?.sessionId;
|
|
@@ -27203,7 +27387,7 @@ function createWebchatChannelRoutes(deps) {
|
|
|
27203
27387
|
const result = await deps.onConnectorAuth({ key, sessionId, name, completed });
|
|
27204
27388
|
return c.json(result);
|
|
27205
27389
|
});
|
|
27206
|
-
|
|
27390
|
+
app66.post("/webchat-channel/ready", async (c) => {
|
|
27207
27391
|
const body = await c.req.json().catch(() => null);
|
|
27208
27392
|
const key = body?.key;
|
|
27209
27393
|
if (typeof key !== "string") {
|
|
@@ -27212,7 +27396,7 @@ function createWebchatChannelRoutes(deps) {
|
|
|
27212
27396
|
deps.onReady?.(key);
|
|
27213
27397
|
return c.json({ ok: true });
|
|
27214
27398
|
});
|
|
27215
|
-
|
|
27399
|
+
app66.post("/webchat-channel/permission-request", async (c) => {
|
|
27216
27400
|
const body = await c.req.json().catch(() => null);
|
|
27217
27401
|
const key = body?.key;
|
|
27218
27402
|
const requestId = body?.request_id;
|
|
@@ -27226,7 +27410,7 @@ function createWebchatChannelRoutes(deps) {
|
|
|
27226
27410
|
const verdict = await deps.awaitPermissionVerdict({ key, requestId, toolName, description, inputPreview });
|
|
27227
27411
|
return c.json(verdict);
|
|
27228
27412
|
});
|
|
27229
|
-
|
|
27413
|
+
app66.post("/webchat-channel/received", async (c) => {
|
|
27230
27414
|
const body = await c.req.json().catch(() => null);
|
|
27231
27415
|
const key = body?.key;
|
|
27232
27416
|
const messageId = body?.messageId;
|
|
@@ -27236,7 +27420,7 @@ function createWebchatChannelRoutes(deps) {
|
|
|
27236
27420
|
deps.onReceived?.(key, messageId);
|
|
27237
27421
|
return c.json({ ok: true });
|
|
27238
27422
|
});
|
|
27239
|
-
|
|
27423
|
+
app66.post("/webchat-channel/turn-end", async (c) => {
|
|
27240
27424
|
const body = await c.req.json().catch(() => null);
|
|
27241
27425
|
const key = body?.key;
|
|
27242
27426
|
const sessionId = body?.sessionId;
|
|
@@ -27259,7 +27443,7 @@ function createWebchatChannelRoutes(deps) {
|
|
|
27259
27443
|
console.error(`[webchat-native] op=turn-end channel=webchat key=${k} sessionId=${sid} replied=no delivered=none`);
|
|
27260
27444
|
return c.json({ ok: true, delivered: "none" });
|
|
27261
27445
|
});
|
|
27262
|
-
return
|
|
27446
|
+
return app66;
|
|
27263
27447
|
}
|
|
27264
27448
|
|
|
27265
27449
|
// app/lib/webchat/gateway/webchat-gateway.ts
|
|
@@ -28346,8 +28530,8 @@ var import_dist9 = __toESM(require_dist(), 1);
|
|
|
28346
28530
|
|
|
28347
28531
|
// app/lib/telegram/gateway/routes.ts
|
|
28348
28532
|
function createTelegramChannelRoutes(deps) {
|
|
28349
|
-
const
|
|
28350
|
-
|
|
28533
|
+
const app66 = new Hono();
|
|
28534
|
+
app66.get("/tg-channel/inbound", (c) => {
|
|
28351
28535
|
const key = c.req.query("key");
|
|
28352
28536
|
if (!key) return c.json({ error: "key required" }, 400);
|
|
28353
28537
|
return streamSSE(c, async (stream2) => {
|
|
@@ -28365,7 +28549,7 @@ function createTelegramChannelRoutes(deps) {
|
|
|
28365
28549
|
}
|
|
28366
28550
|
});
|
|
28367
28551
|
});
|
|
28368
|
-
|
|
28552
|
+
app66.post("/tg-channel/reply", async (c) => {
|
|
28369
28553
|
const body = await c.req.json().catch(() => null);
|
|
28370
28554
|
const key = body?.key;
|
|
28371
28555
|
const text = body?.text;
|
|
@@ -28381,7 +28565,7 @@ function createTelegramChannelRoutes(deps) {
|
|
|
28381
28565
|
console.error(`[telegram-native] op=reply key=${key} bytes=${Buffer.byteLength(text, "utf8")}`);
|
|
28382
28566
|
return c.json({ ok: true });
|
|
28383
28567
|
});
|
|
28384
|
-
|
|
28568
|
+
app66.post("/tg-channel/ready", async (c) => {
|
|
28385
28569
|
const body = await c.req.json().catch(() => null);
|
|
28386
28570
|
const key = body?.key;
|
|
28387
28571
|
if (typeof key !== "string") {
|
|
@@ -28390,7 +28574,7 @@ function createTelegramChannelRoutes(deps) {
|
|
|
28390
28574
|
deps.onReady?.(key);
|
|
28391
28575
|
return c.json({ ok: true });
|
|
28392
28576
|
});
|
|
28393
|
-
|
|
28577
|
+
app66.post("/tg-channel/received", async (c) => {
|
|
28394
28578
|
const body = await c.req.json().catch(() => null);
|
|
28395
28579
|
const key = body?.key;
|
|
28396
28580
|
const messageId = body?.messageId;
|
|
@@ -28400,7 +28584,7 @@ function createTelegramChannelRoutes(deps) {
|
|
|
28400
28584
|
deps.onReceived?.(key, messageId);
|
|
28401
28585
|
return c.json({ ok: true });
|
|
28402
28586
|
});
|
|
28403
|
-
|
|
28587
|
+
app66.post("/tg-channel/turn-end", async (c) => {
|
|
28404
28588
|
const body = await c.req.json().catch(() => null);
|
|
28405
28589
|
const key = body?.key;
|
|
28406
28590
|
const sessionId = body?.sessionId;
|
|
@@ -28433,7 +28617,7 @@ function createTelegramChannelRoutes(deps) {
|
|
|
28433
28617
|
console.error(`[telegram-native] op=turn-end key=${key} sessionId=${sid} replied=no delivered=none`);
|
|
28434
28618
|
return c.json({ ok: true, delivered: "none" });
|
|
28435
28619
|
});
|
|
28436
|
-
return
|
|
28620
|
+
return app66;
|
|
28437
28621
|
}
|
|
28438
28622
|
|
|
28439
28623
|
// app/lib/telegram/gateway/telegram-gateway.ts
|
|
@@ -29338,7 +29522,7 @@ watchFile(ALIAS_DOMAINS_PATH, { interval: 2e3 }, () => {
|
|
|
29338
29522
|
function isPublicHost(host) {
|
|
29339
29523
|
return host.startsWith("public.") || aliasDomains.has(host);
|
|
29340
29524
|
}
|
|
29341
|
-
var
|
|
29525
|
+
var app65 = new Hono();
|
|
29342
29526
|
function resolveChannelOverride(accountId, channel, senderId) {
|
|
29343
29527
|
try {
|
|
29344
29528
|
const dir = listValidAccounts().find((a) => a.accountId === accountId)?.accountDir;
|
|
@@ -29514,7 +29698,7 @@ var waGateway = new WaGateway({
|
|
|
29514
29698
|
nativeFileFollowers.set(senderId, ac);
|
|
29515
29699
|
}
|
|
29516
29700
|
});
|
|
29517
|
-
|
|
29701
|
+
app65.route("/", waGateway.routes());
|
|
29518
29702
|
waGateway.startSweeper();
|
|
29519
29703
|
function runDuplicateSenderAudit() {
|
|
29520
29704
|
try {
|
|
@@ -29637,7 +29821,7 @@ var webchatGateway = new WebchatGateway({
|
|
|
29637
29821
|
firePublicSessionEndReview: (input) => firePublicSessionEndReview(input)
|
|
29638
29822
|
});
|
|
29639
29823
|
setWebchatGateway(webchatGateway);
|
|
29640
|
-
|
|
29824
|
+
app65.route("/", webchatGateway.routes());
|
|
29641
29825
|
webchatGateway.startSweeper();
|
|
29642
29826
|
webchatGateway.startPublicReaper();
|
|
29643
29827
|
var telegramFileFollowers = /* @__PURE__ */ new Map();
|
|
@@ -29681,7 +29865,7 @@ var telegramGateway = new TelegramGateway({
|
|
|
29681
29865
|
}
|
|
29682
29866
|
});
|
|
29683
29867
|
setTelegramGateway(telegramGateway);
|
|
29684
|
-
|
|
29868
|
+
app65.route("/", telegramGateway.routes());
|
|
29685
29869
|
telegramGateway.startSweeper();
|
|
29686
29870
|
var chatRoutes = createChatRoutes({
|
|
29687
29871
|
handleInbound: (input) => webchatGateway.handleInbound(input),
|
|
@@ -29715,19 +29899,19 @@ var scheduleInjectRoutes = createScheduleInjectRoutes({
|
|
|
29715
29899
|
return managed.account;
|
|
29716
29900
|
}
|
|
29717
29901
|
});
|
|
29718
|
-
|
|
29719
|
-
|
|
29902
|
+
app65.route("/api/channel/schedule-inject", scheduleInjectRoutes);
|
|
29903
|
+
app65.use("*", clientIpMiddleware);
|
|
29720
29904
|
function allowsSameOriginFraming(path3) {
|
|
29721
29905
|
return path3 === "/vnc-viewer.html" || path3.startsWith("/api/admin/attachment/") || path3.startsWith("/api/public-reader/attachment/") || path3 === "/api/admin/files/download";
|
|
29722
29906
|
}
|
|
29723
|
-
|
|
29907
|
+
app65.use("*", async (c, next) => {
|
|
29724
29908
|
await next();
|
|
29725
29909
|
c.header("X-Content-Type-Options", "nosniff");
|
|
29726
29910
|
c.header("Referrer-Policy", "strict-origin-when-cross-origin");
|
|
29727
29911
|
c.header("X-Frame-Options", allowsSameOriginFraming(c.req.path) ? "SAMEORIGIN" : "DENY");
|
|
29728
29912
|
});
|
|
29729
29913
|
var HTTP_LOG_PATHS = /* @__PURE__ */ new Set(["/vnc-viewer.html", "/vnc-popout.html"]);
|
|
29730
|
-
|
|
29914
|
+
app65.use("*", async (c, next) => {
|
|
29731
29915
|
if (!HTTP_LOG_PATHS.has(c.req.path)) {
|
|
29732
29916
|
await next();
|
|
29733
29917
|
return;
|
|
@@ -29745,7 +29929,7 @@ app64.use("*", async (c, next) => {
|
|
|
29745
29929
|
});
|
|
29746
29930
|
}
|
|
29747
29931
|
});
|
|
29748
|
-
|
|
29932
|
+
app65.use("*", async (c, next) => {
|
|
29749
29933
|
const host = (c.req.header("host") ?? "").split(":")[0];
|
|
29750
29934
|
if (isOperatorHost(host, getOperatorDomains()) || !isPublicHost(host)) {
|
|
29751
29935
|
await next();
|
|
@@ -29783,7 +29967,7 @@ function resolveRemoteAuthOpts(c) {
|
|
|
29783
29967
|
return { ...brandLoginOpts, origin };
|
|
29784
29968
|
}
|
|
29785
29969
|
var MAX_LOGIN_BODY = 8 * 1024;
|
|
29786
|
-
|
|
29970
|
+
app65.post("/__remote-auth/login", async (c) => {
|
|
29787
29971
|
const client = clientFrom(c);
|
|
29788
29972
|
const clientIp = client.ip || "unknown";
|
|
29789
29973
|
if (!requestIsTlsTerminated(c)) {
|
|
@@ -29828,7 +30012,7 @@ app64.post("/__remote-auth/login", async (c) => {
|
|
|
29828
30012
|
}
|
|
29829
30013
|
});
|
|
29830
30014
|
});
|
|
29831
|
-
|
|
30015
|
+
app65.get("/__remote-auth/logout", (c) => {
|
|
29832
30016
|
const client = clientFrom(c);
|
|
29833
30017
|
const clientIp = client.ip || "unknown";
|
|
29834
30018
|
console.error(`[remote-auth] logout ip=${clientIp}`);
|
|
@@ -29841,7 +30025,7 @@ app64.get("/__remote-auth/logout", (c) => {
|
|
|
29841
30025
|
}
|
|
29842
30026
|
});
|
|
29843
30027
|
});
|
|
29844
|
-
|
|
30028
|
+
app65.post("/__remote-auth/change-password", async (c) => {
|
|
29845
30029
|
const client = clientFrom(c);
|
|
29846
30030
|
const clientIp = client.ip || "unknown";
|
|
29847
30031
|
const rateLimited = checkRateLimit(client);
|
|
@@ -29900,13 +30084,13 @@ app64.post("/__remote-auth/change-password", async (c) => {
|
|
|
29900
30084
|
return c.html(renderLoginPage({ ...resolveRemoteAuthOpts(c), mode: "change", changeError: "Failed to save password", redirect }), 200);
|
|
29901
30085
|
}
|
|
29902
30086
|
});
|
|
29903
|
-
|
|
30087
|
+
app65.get("/__remote-auth/setup", (c) => {
|
|
29904
30088
|
if (isRemoteAuthConfigured()) {
|
|
29905
30089
|
return c.redirect("/");
|
|
29906
30090
|
}
|
|
29907
30091
|
return c.html(renderLoginPage({ ...resolveRemoteAuthOpts(c), mode: "setup" }), 200);
|
|
29908
30092
|
});
|
|
29909
|
-
|
|
30093
|
+
app65.post("/__remote-auth/set-initial-password", async (c) => {
|
|
29910
30094
|
if (isRemoteAuthConfigured()) {
|
|
29911
30095
|
return c.redirect("/");
|
|
29912
30096
|
}
|
|
@@ -29944,10 +30128,10 @@ app64.post("/__remote-auth/set-initial-password", async (c) => {
|
|
|
29944
30128
|
return c.html(renderLoginPage({ ...resolveRemoteAuthOpts(c), mode: "setup", setupError: "Failed to save password. Please try again." }), 200);
|
|
29945
30129
|
}
|
|
29946
30130
|
});
|
|
29947
|
-
|
|
30131
|
+
app65.get("/api/remote-auth/status", (c) => {
|
|
29948
30132
|
return c.json({ configured: isRemoteAuthConfigured() });
|
|
29949
30133
|
});
|
|
29950
|
-
|
|
30134
|
+
app65.post("/api/remote-auth/set-password", async (c) => {
|
|
29951
30135
|
let body;
|
|
29952
30136
|
try {
|
|
29953
30137
|
body = await c.req.json();
|
|
@@ -29986,10 +30170,10 @@ app64.post("/api/remote-auth/set-password", async (c) => {
|
|
|
29986
30170
|
return c.json({ error: "Failed to save password" }, 500);
|
|
29987
30171
|
}
|
|
29988
30172
|
});
|
|
29989
|
-
|
|
30173
|
+
app65.route("/api/_client-error", client_error_default);
|
|
29990
30174
|
console.log("[client-error-route] mounted");
|
|
29991
30175
|
var PWA_PUBLIC_PATHS = /* @__PURE__ */ new Set(["/sw.js", ...PWA_SURFACES.map((s) => s.manifestPath)]);
|
|
29992
|
-
|
|
30176
|
+
app65.use("*", async (c, next) => {
|
|
29993
30177
|
const host = (c.req.header("host") ?? "").split(":")[0];
|
|
29994
30178
|
const path3 = c.req.path;
|
|
29995
30179
|
if (path3 === "/favicon.ico" || path3.startsWith("/assets/") || path3.startsWith("/brand/") || // Public free/busy is read by the booking page (a separate Cloudflare Pages
|
|
@@ -30033,28 +30217,28 @@ app64.use("*", async (c, next) => {
|
|
|
30033
30217
|
}
|
|
30034
30218
|
return c.html(renderLoginPage({ ...resolveRemoteAuthOpts(c), redirect: path3 }), 200);
|
|
30035
30219
|
});
|
|
30036
|
-
|
|
30037
|
-
|
|
30038
|
-
|
|
30039
|
-
|
|
30040
|
-
|
|
30041
|
-
|
|
30042
|
-
|
|
30220
|
+
app65.route("/api/health", health_default);
|
|
30221
|
+
app65.route("/api/chat", chatRoutes);
|
|
30222
|
+
app65.route("/api/whatsapp", whatsapp_default);
|
|
30223
|
+
app65.route("/api/storage", storage_broker_default);
|
|
30224
|
+
app65.route("/api/whatsapp-reader", whatsapp_reader_default);
|
|
30225
|
+
app65.route("/api/public-reader", public_reader_default);
|
|
30226
|
+
app65.route("/api/webchat", createWebchatRoutes({
|
|
30043
30227
|
handleInbound: (input) => webchatGateway.handleInbound(input),
|
|
30044
30228
|
// Task 940 — the permission relay's pointer read + verdict write.
|
|
30045
30229
|
pendingPromptFor: (key) => webchatGateway.pendingPromptFor(key),
|
|
30046
30230
|
deliveryFailureFor: (key) => webchatGateway.deliveryFailureFor(key),
|
|
30047
30231
|
resolvePermissionVerdict: (key, requestId, behavior) => webchatGateway.resolvePermissionVerdict(key, requestId, behavior)
|
|
30048
30232
|
}));
|
|
30049
|
-
|
|
30050
|
-
|
|
30051
|
-
|
|
30052
|
-
|
|
30053
|
-
|
|
30054
|
-
|
|
30055
|
-
|
|
30056
|
-
|
|
30057
|
-
|
|
30233
|
+
app65.route("/api/webchat/greeting", webchat_greeting_default);
|
|
30234
|
+
app65.route("/api/telegram", telegram_default);
|
|
30235
|
+
app65.route("/api/quickbooks", quickbooks_default);
|
|
30236
|
+
app65.route("/api/onboarding", onboarding_default);
|
|
30237
|
+
app65.route("/api/admin", admin_default);
|
|
30238
|
+
app65.route("/api/access", access_default);
|
|
30239
|
+
app65.route("/api/session", session_default2);
|
|
30240
|
+
app65.route("/api/calendar", calendar_public_default);
|
|
30241
|
+
app65.route("/api/portal", portal_fetch_default);
|
|
30058
30242
|
var SAFE_SLUG_RE2 = /^[a-z][a-z0-9-]{2,49}$/;
|
|
30059
30243
|
var SAFE_FILENAME_RE = /^[a-z0-9_][a-z0-9_.-]{0,99}$/i;
|
|
30060
30244
|
var IMAGE_MIME = {
|
|
@@ -30066,7 +30250,7 @@ var IMAGE_MIME = {
|
|
|
30066
30250
|
".svg": "image/svg+xml",
|
|
30067
30251
|
".ico": "image/x-icon"
|
|
30068
30252
|
};
|
|
30069
|
-
|
|
30253
|
+
app65.get("/agent-assets/:slug/:filename", (c) => {
|
|
30070
30254
|
const slug = c.req.param("slug");
|
|
30071
30255
|
const filename = c.req.param("filename");
|
|
30072
30256
|
if (!SAFE_SLUG_RE2.test(slug)) {
|
|
@@ -30101,7 +30285,7 @@ app64.get("/agent-assets/:slug/:filename", (c) => {
|
|
|
30101
30285
|
"Cache-Control": "public, max-age=3600"
|
|
30102
30286
|
});
|
|
30103
30287
|
});
|
|
30104
|
-
|
|
30288
|
+
app65.get("/generated/:filename", (c) => {
|
|
30105
30289
|
const filename = c.req.param("filename");
|
|
30106
30290
|
if (!SAFE_FILENAME_RE.test(filename) || filename.includes("..")) {
|
|
30107
30291
|
console.error(`[generated] serve file=${filename} status=403`);
|
|
@@ -30131,10 +30315,10 @@ app64.get("/generated/:filename", (c) => {
|
|
|
30131
30315
|
"Cache-Control": "public, max-age=86400"
|
|
30132
30316
|
});
|
|
30133
30317
|
});
|
|
30134
|
-
|
|
30135
|
-
|
|
30136
|
-
|
|
30137
|
-
|
|
30318
|
+
app65.route("/sites", sites_default);
|
|
30319
|
+
app65.route("/listings", listings_default);
|
|
30320
|
+
app65.route("/v", visitor_event_default);
|
|
30321
|
+
app65.route("/v", visitor_consent_default);
|
|
30138
30322
|
var htmlCache = /* @__PURE__ */ new Map();
|
|
30139
30323
|
var brandLogoPath = "/brand/maxy-monochrome.png";
|
|
30140
30324
|
var brandIconPath = "/brand/maxy-monochrome.png";
|
|
@@ -30289,7 +30473,7 @@ function brandedPublicHtml(agentSlug) {
|
|
|
30289
30473
|
function agentUnavailableHtml() {
|
|
30290
30474
|
return `<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>${escapeHtml(BRAND.productName)}</title></head><body style="font-family:system-ui,sans-serif;max-width:32rem;margin:4rem auto;padding:0 1.5rem;color:#222"><h1 style="font-size:1.25rem">Agent unavailable</h1><p>This agent isn't available right now. If you reached this page from a saved link, the agent may have been turned off.</p></body></html>`;
|
|
30291
30475
|
}
|
|
30292
|
-
|
|
30476
|
+
app65.get("/", (c) => {
|
|
30293
30477
|
const host = (c.req.header("host") ?? "").split(":")[0];
|
|
30294
30478
|
const klass = classifyHost(host, getOperatorDomains(), isPublicHost);
|
|
30295
30479
|
if (klass === "operator") {
|
|
@@ -30311,12 +30495,12 @@ app64.get("/", (c) => {
|
|
|
30311
30495
|
console.log(`[host-class] host=${host} class=admin served=index.html`);
|
|
30312
30496
|
return c.html(cachedHtml("index.html"));
|
|
30313
30497
|
});
|
|
30314
|
-
|
|
30498
|
+
app65.get("/public", (c) => {
|
|
30315
30499
|
const host = (c.req.header("host") ?? "").split(":")[0];
|
|
30316
30500
|
if (isPublicHost(host)) return c.text("Not found", 404);
|
|
30317
30501
|
return c.html(cachedHtml("public.html"));
|
|
30318
30502
|
});
|
|
30319
|
-
|
|
30503
|
+
app65.get("/public-chat", (c) => {
|
|
30320
30504
|
const host = (c.req.header("host") ?? "").split(":")[0];
|
|
30321
30505
|
if (isPublicHost(host)) return c.text("Not found", 404);
|
|
30322
30506
|
return c.html(cachedHtml("public.html"));
|
|
@@ -30335,9 +30519,9 @@ async function logViewerFetch(c, next) {
|
|
|
30335
30519
|
duration_ms: Date.now() - start
|
|
30336
30520
|
});
|
|
30337
30521
|
}
|
|
30338
|
-
|
|
30339
|
-
|
|
30340
|
-
|
|
30522
|
+
app65.use("/vnc-viewer.html", logViewerFetch);
|
|
30523
|
+
app65.use("/vnc-popout.html", logViewerFetch);
|
|
30524
|
+
app65.get("/vnc-popout.html", (c) => {
|
|
30341
30525
|
let html = htmlCache.get("vnc-popout.html");
|
|
30342
30526
|
if (!html) {
|
|
30343
30527
|
html = readFileSync45(resolve41(process.cwd(), "public", "vnc-popout.html"), "utf-8");
|
|
@@ -30350,7 +30534,7 @@ app64.get("/vnc-popout.html", (c) => {
|
|
|
30350
30534
|
}
|
|
30351
30535
|
return c.html(html);
|
|
30352
30536
|
});
|
|
30353
|
-
|
|
30537
|
+
app65.post("/api/vnc/client-event", async (c) => {
|
|
30354
30538
|
let body;
|
|
30355
30539
|
try {
|
|
30356
30540
|
body = await c.req.json();
|
|
@@ -30371,11 +30555,11 @@ app64.post("/api/vnc/client-event", async (c) => {
|
|
|
30371
30555
|
});
|
|
30372
30556
|
return c.json({ ok: true });
|
|
30373
30557
|
});
|
|
30374
|
-
|
|
30558
|
+
app65.get("/g/:slug", (c) => {
|
|
30375
30559
|
return c.html(brandedPublicHtml(resolveDefaultSlug() ?? void 0));
|
|
30376
30560
|
});
|
|
30377
30561
|
for (const pwa of PWA_SURFACES) {
|
|
30378
|
-
|
|
30562
|
+
app65.get(pwa.manifestPath, (c) => {
|
|
30379
30563
|
const manifest = buildManifest(pwa, {
|
|
30380
30564
|
productName: BRAND.productName,
|
|
30381
30565
|
appIcon192: brandAppIcon192Path,
|
|
@@ -30391,7 +30575,7 @@ for (const pwa of PWA_SURFACES) {
|
|
|
30391
30575
|
return c.body(JSON.stringify(manifest));
|
|
30392
30576
|
});
|
|
30393
30577
|
}
|
|
30394
|
-
|
|
30578
|
+
app65.get("/sw.js", (c) => {
|
|
30395
30579
|
if (SW_SOURCE == null) {
|
|
30396
30580
|
console.error("[pwa] op=sw status=500 reason=sw-source-missing");
|
|
30397
30581
|
return c.text("Service worker unavailable", 500);
|
|
@@ -30400,12 +30584,12 @@ app64.get("/sw.js", (c) => {
|
|
|
30400
30584
|
console.log(`[pwa] op=sw status=200 ct=${SW_CONTENT_TYPE}`);
|
|
30401
30585
|
return c.body(SW_SOURCE);
|
|
30402
30586
|
});
|
|
30403
|
-
|
|
30587
|
+
app65.get("/graph", (c) => {
|
|
30404
30588
|
const host = (c.req.header("host") ?? "").split(":")[0];
|
|
30405
30589
|
if (isPublicHost(host) || isOperatorHost(host, getOperatorDomains())) return c.text("Not found", 404);
|
|
30406
30590
|
return c.html(cachedHtml("graph.html"));
|
|
30407
30591
|
});
|
|
30408
|
-
|
|
30592
|
+
app65.get("/chat", (c) => {
|
|
30409
30593
|
const host = (c.req.header("host") ?? "").split(":")[0];
|
|
30410
30594
|
if (isOperatorHost(host, getOperatorDomains())) {
|
|
30411
30595
|
console.log(`[host-class] host=${host} class=operator served=operator.html`);
|
|
@@ -30414,32 +30598,37 @@ app64.get("/chat", (c) => {
|
|
|
30414
30598
|
if (isPublicHost(host)) return c.text("Not found", 404);
|
|
30415
30599
|
return c.html(cachedHtml("chat.html"));
|
|
30416
30600
|
});
|
|
30417
|
-
|
|
30601
|
+
app65.get("/data", (c) => {
|
|
30418
30602
|
const host = (c.req.header("host") ?? "").split(":")[0];
|
|
30419
30603
|
if (isPublicHost(host)) return c.text("Not found", 404);
|
|
30420
30604
|
return c.html(cachedHtml("data.html"));
|
|
30421
30605
|
});
|
|
30422
|
-
|
|
30606
|
+
app65.get("/tasks", (c) => {
|
|
30423
30607
|
const host = (c.req.header("host") ?? "").split(":")[0];
|
|
30424
30608
|
if (isPublicHost(host)) return c.text("Not found", 404);
|
|
30425
30609
|
return c.html(cachedHtml("tasks.html"));
|
|
30426
30610
|
});
|
|
30427
|
-
|
|
30611
|
+
app65.get("/activity", (c) => {
|
|
30428
30612
|
const host = (c.req.header("host") ?? "").split(":")[0];
|
|
30429
30613
|
if (isPublicHost(host)) return c.text("Not found", 404);
|
|
30430
30614
|
return c.html(cachedHtml("activity.html"));
|
|
30431
30615
|
});
|
|
30432
|
-
|
|
30616
|
+
app65.get("/calendar", (c) => {
|
|
30433
30617
|
const host = (c.req.header("host") ?? "").split(":")[0];
|
|
30434
30618
|
if (isPublicHost(host)) return c.text("Not found", 404);
|
|
30435
30619
|
return c.html(cachedHtml("calendar.html"));
|
|
30436
30620
|
});
|
|
30437
|
-
|
|
30621
|
+
app65.get("/routines", (c) => {
|
|
30622
|
+
const host = (c.req.header("host") ?? "").split(":")[0];
|
|
30623
|
+
if (isPublicHost(host)) return c.text("Not found", 404);
|
|
30624
|
+
return c.html(cachedHtml("routines.html"));
|
|
30625
|
+
});
|
|
30626
|
+
app65.get("/browser", (c) => {
|
|
30438
30627
|
const host = (c.req.header("host") ?? "").split(":")[0];
|
|
30439
30628
|
if (isPublicHost(host) || isOperatorHost(host, getOperatorDomains())) return c.text("Not found", 404);
|
|
30440
30629
|
return c.html(cachedHtml("browser.html"));
|
|
30441
30630
|
});
|
|
30442
|
-
|
|
30631
|
+
app65.get("/:slug", async (c, next) => {
|
|
30443
30632
|
const slug = c.req.param("slug");
|
|
30444
30633
|
if (AGENT_SLUG_PATTERN.test(`/${slug}`)) {
|
|
30445
30634
|
const account = resolveAccount();
|
|
@@ -30454,13 +30643,13 @@ app64.get("/:slug", async (c, next) => {
|
|
|
30454
30643
|
await next();
|
|
30455
30644
|
});
|
|
30456
30645
|
if (brandFaviconPath !== "/favicon.ico") {
|
|
30457
|
-
|
|
30646
|
+
app65.get("/favicon.ico", (c) => {
|
|
30458
30647
|
c.header("Cache-Control", "public, max-age=300");
|
|
30459
30648
|
return c.redirect(brandFaviconPath, 302);
|
|
30460
30649
|
});
|
|
30461
30650
|
}
|
|
30462
|
-
|
|
30463
|
-
|
|
30651
|
+
app65.use("/*", serveStatic({ root: "./public" }));
|
|
30652
|
+
app65.all("*", (c) => {
|
|
30464
30653
|
const host = (c.req.header("host") ?? "").split(":")[0];
|
|
30465
30654
|
const path3 = c.req.path;
|
|
30466
30655
|
if (isPublicHost(host)) {
|
|
@@ -30474,7 +30663,7 @@ app64.all("*", (c) => {
|
|
|
30474
30663
|
});
|
|
30475
30664
|
var port = requirePortEnv("MAXY_UI_INTERNAL_PORT", { tag: "ui-server" });
|
|
30476
30665
|
var hostname = process.env.HOSTNAME ?? "127.0.0.1";
|
|
30477
|
-
var httpServer = serve({ fetch:
|
|
30666
|
+
var httpServer = serve({ fetch: app65.fetch, port, hostname });
|
|
30478
30667
|
console.log(`${BRAND.productName} listening on http://${hostname}:${port}`);
|
|
30479
30668
|
{
|
|
30480
30669
|
const reconcilePlatformRoot = process.env.MAXY_PLATFORM_ROOT ?? join47(__dirname, "..");
|
|
@@ -30516,6 +30705,31 @@ console.log(`${BRAND.productName} listening on http://${hostname}:${port}`);
|
|
|
30516
30705
|
}
|
|
30517
30706
|
});
|
|
30518
30707
|
}
|
|
30708
|
+
{
|
|
30709
|
+
const DREAM_CYCLE_SWEEP_INTERVAL_MS = 36e5;
|
|
30710
|
+
const dreamPlatformRoot = process.env.MAXY_PLATFORM_ROOT ?? join47(__dirname, "..");
|
|
30711
|
+
const dreamSweepScript = resolve41(dreamPlatformRoot, "plugins/memory/mcp/dist/scripts/dream-cycle-sweep.js");
|
|
30712
|
+
registerLoop({
|
|
30713
|
+
name: "dream-cycle-sweep",
|
|
30714
|
+
intervalMs: DREAM_CYCLE_SWEEP_INTERVAL_MS,
|
|
30715
|
+
firstRunDelayMs: 3e4,
|
|
30716
|
+
detached: true,
|
|
30717
|
+
run: (ctx) => {
|
|
30718
|
+
if (!existsSync42(dreamSweepScript)) return;
|
|
30719
|
+
try {
|
|
30720
|
+
const child = spawn3(process.execPath, [dreamSweepScript], {
|
|
30721
|
+
env: { ...process.env, PLATFORM_ROOT: dreamPlatformRoot },
|
|
30722
|
+
stdio: "inherit"
|
|
30723
|
+
});
|
|
30724
|
+
child.unref();
|
|
30725
|
+
ctx.child(child.pid);
|
|
30726
|
+
child.on("error", (err) => console.error(`[dream-cycle-sweep] spawn-failed err="${err.message}"`));
|
|
30727
|
+
} catch (err) {
|
|
30728
|
+
console.error(`[dream-cycle-sweep] spawn-failed err="${err.message}"`);
|
|
30729
|
+
}
|
|
30730
|
+
}
|
|
30731
|
+
});
|
|
30732
|
+
}
|
|
30519
30733
|
{
|
|
30520
30734
|
const outlookPlatformRoot = process.env.MAXY_PLATFORM_ROOT ?? join47(__dirname, "..");
|
|
30521
30735
|
const outlookScript = resolve41(outlookPlatformRoot, "plugins/outlook/mcp/dist/scripts/complete-registration.js");
|
|
@@ -30825,7 +31039,7 @@ for (const m of SUBAPP_MANIFEST) {
|
|
|
30825
31039
|
}
|
|
30826
31040
|
try {
|
|
30827
31041
|
const registered = [];
|
|
30828
|
-
for (const r of
|
|
31042
|
+
for (const r of app65.routes ?? []) {
|
|
30829
31043
|
if (typeof r.path !== "string" || r.path.includes(":") || r.path.includes("*")) continue;
|
|
30830
31044
|
if (AGENT_SLUG_PATTERN.test(r.path)) {
|
|
30831
31045
|
registered.push({ method: (r.method ?? "ALL").toUpperCase(), path: r.path });
|