@rubytech/create-maxy-code 0.1.23 → 0.1.26
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/dist/index.js +63 -16
- package/package.json +1 -1
- package/payload/platform/plugins/admin/PLUGIN.md +50 -23
- package/payload/platform/plugins/admin/skills/admin-user-management/SKILL.md +47 -0
- package/payload/platform/plugins/admin/skills/commitment-followthrough/SKILL.md +60 -0
- package/payload/platform/plugins/admin/skills/file-presentation/SKILL.md +67 -0
- package/payload/platform/plugins/admin/skills/onboarding/SKILL.md +111 -126
- package/payload/platform/plugins/admin/skills/session-management/SKILL.md +62 -0
- package/payload/platform/plugins/cloudflare/references/dashboard-guide.md +37 -0
- package/payload/platform/plugins/cloudflare/references/manual-setup.md +81 -1
- package/payload/platform/plugins/cloudflare/scripts/__tests__/tunnel-ingress.test.ts +241 -0
- package/payload/platform/plugins/cloudflare/scripts/setup-tunnel.sh +267 -28
- package/payload/platform/plugins/cloudflare/scripts/tunnel-ingress.ts +291 -0
- package/payload/platform/plugins/cloudflare/skills/setup-tunnel/SKILL.md +42 -0
- package/payload/platform/plugins/contacts/PLUGIN.md +18 -9
- package/payload/platform/plugins/deep-research/.claude-plugin/plugin.json +1 -1
- package/payload/platform/plugins/deep-research/PLUGIN.md +7 -1
- package/payload/platform/plugins/deep-research/recipes/README.md +36 -0
- package/payload/platform/plugins/deep-research/skills/academic-verify/SKILL.md +75 -0
- package/payload/platform/plugins/deep-research/skills/book-mirror/SKILL.md +68 -0
- package/payload/platform/plugins/deep-research/skills/data-research/SKILL.md +108 -0
- package/payload/platform/plugins/deep-research/skills/strategic-reading/SKILL.md +69 -0
- package/payload/platform/plugins/docs/references/deployment.md +3 -2
- package/payload/platform/plugins/docs/references/platform.md +2 -0
- package/payload/platform/plugins/docs/references/troubleshooting.md +12 -0
- package/payload/platform/plugins/email/PLUGIN.md +18 -9
- package/payload/platform/plugins/email/mcp/dist/lib/claude-bridge.d.ts +17 -0
- package/payload/platform/plugins/email/mcp/dist/lib/claude-bridge.d.ts.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/lib/claude-bridge.js +185 -0
- package/payload/platform/plugins/email/mcp/dist/lib/claude-bridge.js.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/lib/imap.d.ts +1 -1
- package/payload/platform/plugins/email/mcp/dist/scripts/email-auto-respond.js +34 -111
- package/payload/platform/plugins/email/mcp/dist/scripts/email-auto-respond.js.map +1 -1
- package/payload/platform/plugins/email/mcp/dist/scripts/email-fetch.d.ts +7 -2
- package/payload/platform/plugins/email/mcp/dist/scripts/email-fetch.d.ts.map +1 -1
- package/payload/platform/plugins/email/mcp/dist/scripts/email-fetch.js +7 -2
- package/payload/platform/plugins/email/mcp/dist/scripts/email-fetch.js.map +1 -1
- package/payload/platform/plugins/linkedin-import/skills/linkedin-import/SKILL.md +2 -0
- package/payload/platform/plugins/memory/PLUGIN.md +64 -29
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-read.d.ts +3 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-read.d.ts.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-read.js +105 -4
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-read.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-update.d.ts.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-update.js +16 -3
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-update.js.map +1 -1
- package/payload/platform/plugins/memory/skills/archive-crawler/SKILL.md +67 -0
- package/payload/platform/plugins/memory/skills/concept-synthesis/SKILL.md +80 -0
- package/payload/platform/plugins/memory/skills/conversation-archive/SKILL.md +2 -0
- package/payload/platform/plugins/memory/skills/document-ingest/SKILL.md +2 -0
- package/payload/platform/plugins/outlook/PLUGIN.md +14 -7
- package/payload/platform/plugins/replicate/PLUGIN.md +6 -3
- package/payload/platform/plugins/scheduling/PLUGIN.md +19 -8
- package/payload/platform/plugins/scheduling/mcp/dist/scripts/check-due-events.d.ts +7 -3
- package/payload/platform/plugins/scheduling/mcp/dist/scripts/check-due-events.d.ts.map +1 -1
- package/payload/platform/plugins/scheduling/mcp/dist/scripts/check-due-events.js +7 -3
- package/payload/platform/plugins/scheduling/mcp/dist/scripts/check-due-events.js.map +1 -1
- package/payload/platform/plugins/scheduling/skills/briefing/SKILL.md +75 -0
- package/payload/platform/plugins/scheduling/skills/daily-prep/SKILL.md +61 -0
- package/payload/platform/plugins/tasks/PLUGIN.md +28 -14
- package/payload/platform/plugins/telegram/PLUGIN.md +6 -3
- package/payload/platform/plugins/waitlist/PLUGIN.md +12 -6
- package/payload/platform/plugins/whatsapp/PLUGIN.md +25 -13
- package/payload/platform/plugins/workflows/PLUGIN.md +16 -8
- package/payload/platform/scripts/conversation-id-allowlist.txt +0 -1
- package/payload/platform/services/claude-session-manager/dist/http-server.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/http-server.js +27 -2
- package/payload/platform/services/claude-session-manager/dist/http-server.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/index.js +27 -0
- package/payload/platform/services/claude-session-manager/dist/index.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/pty-spawner.d.ts +36 -0
- package/payload/platform/services/claude-session-manager/dist/pty-spawner.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/pty-spawner.js +41 -3
- package/payload/platform/services/claude-session-manager/dist/pty-spawner.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/system-prompt.d.ts +25 -1
- package/payload/platform/services/claude-session-manager/dist/system-prompt.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/system-prompt.js +54 -3
- package/payload/platform/services/claude-session-manager/dist/system-prompt.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/tool-surface.d.ts +25 -0
- package/payload/platform/services/claude-session-manager/dist/tool-surface.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/tool-surface.js +149 -0
- package/payload/platform/services/claude-session-manager/dist/tool-surface.js.map +1 -0
- package/payload/platform/templates/agents/admin/IDENTITY.md +38 -284
- package/payload/platform/templates/agents/admin/SOUL.md +4 -4
- package/payload/platform/templates/specialists/agents/content-producer.md +24 -69
- package/payload/platform/templates/specialists/agents/database-operator.md +49 -155
- package/payload/platform/templates/specialists/agents/personal-assistant.md +27 -177
- package/payload/platform/templates/specialists/agents/project-manager.md +29 -96
- package/payload/platform/templates/specialists/agents/research-assistant.md +36 -78
- package/payload/premium-plugins/real-agency/agents/compliance.md +14 -0
- package/payload/premium-plugins/real-agency/agents/negotiator.md +22 -0
- package/payload/premium-plugins/real-agency/agents/valuer.md +16 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/.claude-plugin/plugin.json +1 -1
- package/payload/premium-plugins/real-agency/plugins/estate-business/PLUGIN.md +44 -13
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/commission-calculator/SKILL.md +40 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/month-end-close/SKILL.md +69 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/payment-batch-stager/SKILL.md +42 -0
- package/payload/premium-plugins/real-agency/plugins/estate-business/skills/period-reconciler/SKILL.md +42 -0
- package/payload/premium-plugins/real-agency/plugins/estate-sales/.claude-plugin/plugin.json +1 -1
- package/payload/premium-plugins/real-agency/plugins/estate-sales/PLUGIN.md +32 -13
- package/payload/premium-plugins/real-agency/plugins/estate-sales/skills/chase-progression/SKILL.md +107 -0
- package/payload/premium-plugins/real-agency/plugins/estate-sales/skills/risk-scorer/SKILL.md +42 -0
- package/payload/premium-plugins/real-agency/plugins/leads/.claude-plugin/plugin.json +1 -1
- package/payload/premium-plugins/real-agency/plugins/leads/PLUGIN.md +40 -10
- package/payload/premium-plugins/real-agency/plugins/leads/skills/chain-progression-tracker/SKILL.md +51 -0
- package/payload/premium-plugins/real-agency/plugins/leads/skills/diary-builder/SKILL.md +38 -0
- package/payload/premium-plugins/real-agency/plugins/leads/skills/enquiry-triage/SKILL.md +36 -0
- package/payload/premium-plugins/real-agency/plugins/leads/skills/morning-round/SKILL.md +72 -0
- package/payload/premium-plugins/real-agency/plugins/listings/.claude-plugin/plugin.json +1 -1
- package/payload/premium-plugins/real-agency/plugins/listings/PLUGIN.md +82 -12
- package/payload/premium-plugins/real-agency/plugins/listings/skills/comparable-finder/SKILL.md +52 -0
- package/payload/premium-plugins/real-agency/plugins/listings/skills/epc-checker/SKILL.md +38 -0
- package/payload/premium-plugins/real-agency/plugins/listings/skills/listing-copy-writer/SKILL.md +55 -0
- package/payload/premium-plugins/real-agency/plugins/listings/skills/local-market-stats/SKILL.md +33 -0
- package/payload/premium-plugins/real-agency/plugins/listings/skills/new-instruction/SKILL.md +78 -0
- package/payload/premium-plugins/real-agency/plugins/listings/skills/particulars-builder/SKILL.md +48 -0
- package/payload/premium-plugins/real-agency/plugins/listings/skills/portal-launch-scheduler/SKILL.md +49 -0
- package/payload/premium-plugins/real-agency/plugins/listings/skills/pricing-scenario-builder/SKILL.md +35 -0
- package/payload/premium-plugins/real-agency/plugins/listings/skills/supplier-booker/SKILL.md +39 -0
- package/payload/premium-plugins/real-agency/plugins/listings/skills/talk-track-composer/SKILL.md +36 -0
- package/payload/premium-plugins/real-agency/plugins/listings/skills/terms-of-business-drafter/SKILL.md +54 -0
- package/payload/premium-plugins/real-agency/plugins/listings/skills/valuation-prep/SKILL.md +69 -0
- package/payload/premium-plugins/real-agency/plugins/loop/PLUGIN.md +35 -0
- package/payload/premium-plugins/real-agency/plugins/loop/skills/compliance-flag-checker/SKILL.md +53 -0
- package/payload/premium-plugins/real-agency/plugins/loop/skills/priority-ranker/SKILL.md +40 -0
- package/payload/premium-plugins/real-agency/plugins/loop/skills/tone-matched-drafter/SKILL.md +53 -0
- package/payload/premium-plugins/real-agency/plugins/loop/skills/variance-narrator/SKILL.md +50 -0
- package/payload/premium-plugins/real-agency/plugins/loop/skills/vendor-research/SKILL.md +54 -0
- package/payload/server/{chunk-2ZNKHCQB.js → chunk-2MRZBQMH.js} +1 -1
- package/payload/server/{chunk-GPUCA2RQ.js → chunk-NL7QLVAD.js} +0 -192
- package/payload/server/{chunk-IDKWGLM5.js → chunk-YPZFYTYP.js} +1 -247
- package/payload/server/{cloudflare-task-tracker-LYI5BTYI.js → cloudflare-task-tracker-QVOGHKWV.js} +2 -2
- package/payload/server/maxy-edge.js +2 -2
- package/payload/server/package.json +0 -2
- package/payload/server/public/assets/{Checkbox-D1OQD43b.js → Checkbox-YIF0payo.js} +1 -1
- package/payload/server/public/assets/{admin-czNBxWor.js → admin-DW8IJcLc.js} +1 -1
- package/payload/server/public/assets/{architectureDiagram-Q4EWVU46-BcwgT80u.js → architectureDiagram-Q4EWVU46-Bz8mlxZZ.js} +1 -1
- package/payload/server/public/assets/{blockDiagram-DXYQGD6D-BMSyZUQA.js → blockDiagram-DXYQGD6D-DwV8Z8-i.js} +1 -1
- package/payload/server/public/assets/{brand-2cku8WFs.css → brand-DqiRNMlu.css} +1 -1
- package/payload/server/public/assets/{c4Diagram-AHTNJAMY-DPRGY1jJ.js → c4Diagram-AHTNJAMY-DiUTejMp.js} +1 -1
- package/payload/server/public/assets/channel-PtVtoBEL.js +1 -0
- package/payload/server/public/assets/{chunk-336JU56O-B7oQ3g1c.js → chunk-336JU56O-4mHZpBXe.js} +2 -2
- package/payload/server/public/assets/{chunk-426QAEUC-C1P0yFXw.js → chunk-426QAEUC-Cbv0vrN9.js} +1 -1
- package/payload/server/public/assets/{chunk-4TB4RGXK-LI7kOJd0.js → chunk-4TB4RGXK-BvLhId_2.js} +1 -1
- package/payload/server/public/assets/{chunk-5FUZZQ4R-CXQRGTQE.js → chunk-5FUZZQ4R-bBafOTkw.js} +1 -1
- package/payload/server/public/assets/{chunk-5PVQY5BW-NSyzpXRy.js → chunk-5PVQY5BW-B0NqBKVy.js} +1 -1
- package/payload/server/public/assets/{chunk-EDXVE4YY-voNwxbDs.js → chunk-EDXVE4YY-CFd4SqI6.js} +1 -1
- package/payload/server/public/assets/{chunk-ENJZ2VHE-CMEMPzYY.js → chunk-ENJZ2VHE-ajf2sb6c.js} +1 -1
- package/payload/server/public/assets/{chunk-ICPOFSXX-hEbwu-pe.js → chunk-ICPOFSXX-pWg6bug7.js} +1 -1
- package/payload/server/public/assets/{chunk-OYMX7WX6-DxskDrLs.js → chunk-OYMX7WX6-OjEd-17c.js} +1 -1
- package/payload/server/public/assets/{chunk-U2HBQHQK-D7TKgUo0.js → chunk-U2HBQHQK-DbEFSPoh.js} +1 -1
- package/payload/server/public/assets/{chunk-X2U36JSP-BvPUQEPm.js → chunk-X2U36JSP-COdNwrBb.js} +1 -1
- package/payload/server/public/assets/{chunk-YZCP3GAM-BY-RWQUW.js → chunk-YZCP3GAM-CHMWuY9B.js} +1 -1
- package/payload/server/public/assets/{chunk-ZZ45TVLE-DZvOYDY6.js → chunk-ZZ45TVLE-B-uDLQOB.js} +1 -1
- package/payload/server/public/assets/classDiagram-6PBFFD2Q-RVH_SEhY.js +1 -0
- package/payload/server/public/assets/classDiagram-v2-HSJHXN6E-Cm3rAb93.js +1 -0
- package/payload/server/public/assets/clone-BjY0Wzht.js +1 -0
- package/payload/server/public/assets/{dagre-KV5264BT-Cnj0mUZl.js → dagre-KV5264BT-CMEzmhIL.js} +1 -1
- package/payload/server/public/assets/{dagre-Bt-fpckL.js → dagre-bhIG_KnW.js} +1 -1
- package/payload/server/public/assets/data-K_kS__sL.js +1 -0
- package/payload/server/public/assets/{device-url-actions-Bjz3Xzbm.js → device-url-actions-AcOyLSeF.js} +1 -1
- package/payload/server/public/assets/{diagram-5BDNPKRD-DjLzvOlx.js → diagram-5BDNPKRD-6RIoQhIL.js} +1 -1
- package/payload/server/public/assets/{diagram-G4DWMVQ6-DTfuRd-T.js → diagram-G4DWMVQ6-BSp36TVv.js} +1 -1
- package/payload/server/public/assets/{diagram-MMDJMWI5-BaL2mCnx.js → diagram-MMDJMWI5-D54fo52D.js} +1 -1
- package/payload/server/public/assets/{diagram-TYMM5635-C5InWY5R.js → diagram-TYMM5635-CWL8z-Pq.js} +1 -1
- package/payload/server/public/assets/{erDiagram-SMLLAGMA-DO7BXTpn.js → erDiagram-SMLLAGMA-AnnHBo3z.js} +1 -1
- package/payload/server/public/assets/{flowDiagram-DWJPFMVM-DDdAKfLf.js → flowDiagram-DWJPFMVM-laWmBl5o.js} +1 -1
- package/payload/server/public/assets/{ganttDiagram-T4ZO3ILL-arJD8Utm.js → ganttDiagram-T4ZO3ILL-B94ko8ie.js} +1 -1
- package/payload/server/public/assets/{gitGraphDiagram-UUTBAWPF-C55GH-OS.js → gitGraphDiagram-UUTBAWPF-DxzL1fxZ.js} +1 -1
- package/payload/server/public/assets/graph-DeEigyO_.js +1 -0
- package/payload/server/public/assets/graph-labels-C7I5QvNv.js +1 -0
- package/payload/server/public/assets/{graphlib-DL9PM7Ex.js → graphlib-CY-zIElM.js} +1 -1
- package/payload/server/public/assets/{infoDiagram-42DDH7IO-BMSGqUbG.js → infoDiagram-42DDH7IO-BMTajIIr.js} +1 -1
- package/payload/server/public/assets/{ishikawaDiagram-UXIWVN3A-Dw6BZ6BG.js → ishikawaDiagram-UXIWVN3A-B_QauE5O.js} +1 -1
- package/payload/server/public/assets/{journeyDiagram-VCZTEJTY-DrywUGXw.js → journeyDiagram-VCZTEJTY-DmlqSIih.js} +1 -1
- package/payload/server/public/assets/{kanban-definition-6JOO6SKY-DuwtVBBc.js → kanban-definition-6JOO6SKY-ZGDQT7xB.js} +1 -1
- package/payload/server/public/assets/{line-JAksyKHj.js → line-D13opgep.js} +1 -1
- package/payload/server/public/assets/{mermaid-parser.core-BMq-ApBW.js → mermaid-parser.core-C650Sual.js} +1 -1
- package/payload/server/public/assets/{mermaid.core-tH4oX0Kh.js → mermaid.core-BqnQoXTp.js} +3 -3
- package/payload/server/public/assets/{mindmap-definition-QFDTVHPH-D1OiiJga.js → mindmap-definition-QFDTVHPH-BS_8y-tY.js} +1 -1
- package/payload/server/public/assets/{page-BZpoS7iR.js → page-B_rpjIRr.js} +1 -1
- package/payload/server/public/assets/{page-CkvBvezS.js → page-qSH972X0.js} +1 -1
- package/payload/server/public/assets/{pieDiagram-DEJITSTG-Ckwm69PW.js → pieDiagram-DEJITSTG-B5OmNvBO.js} +1 -1
- package/payload/server/public/assets/{public-C-dTMgXu.js → public-DDsYgotk.js} +3 -3
- package/payload/server/public/assets/{quadrantDiagram-34T5L4WZ-COw3yZ1j.js → quadrantDiagram-34T5L4WZ-DTYITdNo.js} +1 -1
- package/payload/server/public/assets/{requirementDiagram-MS252O5E-DqGzM4K-.js → requirementDiagram-MS252O5E-CRZWxH06.js} +1 -1
- package/payload/server/public/assets/{sankeyDiagram-XADWPNL6-D-l1c_Pl.js → sankeyDiagram-XADWPNL6-DazRENhe.js} +1 -1
- package/payload/server/public/assets/{sequenceDiagram-FGHM5R23-BeIi0DtJ.js → sequenceDiagram-FGHM5R23-BcHTxmPy.js} +1 -1
- package/payload/server/public/assets/{stateDiagram-FHFEXIEX-C-jgegLk.js → stateDiagram-FHFEXIEX-DYU7nbqg.js} +1 -1
- package/payload/server/public/assets/stateDiagram-v2-QKLJ7IA2-BgljVtlp.js +1 -0
- package/payload/server/public/assets/{timeline-definition-GMOUNBTQ-BGFKkYmi.js → timeline-definition-GMOUNBTQ-BKGmqkST.js} +1 -1
- package/payload/server/public/assets/{vennDiagram-DHZGUBPP-5NuIhJLS.js → vennDiagram-DHZGUBPP-BXvLPmX7.js} +1 -1
- package/payload/server/public/assets/{wardleyDiagram-NUSXRM2D-Be9ytVut.js → wardleyDiagram-NUSXRM2D-BCclUa3Z.js} +1 -1
- package/payload/server/public/assets/{xychartDiagram-5P7HB3ND-DCyHg41R.js → xychartDiagram-5P7HB3ND-C-Xp-Eoc.js} +1 -1
- package/payload/server/public/data.html +5 -5
- package/payload/server/public/graph.html +6 -6
- package/payload/server/public/index.html +8 -8
- package/payload/server/public/public.html +5 -5
- package/payload/server/server.js +1152 -2564
- package/payload/platform/scripts/check-sdk-oauth.mjs +0 -185
- package/payload/server/public/assets/channel-fxEghWew.js +0 -1
- package/payload/server/public/assets/classDiagram-6PBFFD2Q-BsWzGW0N.js +0 -1
- package/payload/server/public/assets/classDiagram-v2-HSJHXN6E-BGVa3h90.js +0 -1
- package/payload/server/public/assets/clone-Khvocke2.js +0 -1
- package/payload/server/public/assets/data-DBd-Buhp.js +0 -1
- package/payload/server/public/assets/graph-DUtVdnZ6.js +0 -1
- package/payload/server/public/assets/graph-labels-Dxfue-fP.js +0 -1
- package/payload/server/public/assets/stateDiagram-v2-QKLJ7IA2-BaMs8Znv.js +0 -1
- /package/payload/server/public/assets/{brand-CSQuxS9w.js → brand-Bm671owU.js} +0 -0
|
@@ -155,158 +155,6 @@ async function ensureConversation(accountId, agentType, cacheKey, visitorId, age
|
|
|
155
155
|
await session.close();
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
|
-
async function findRecentConversation(visitorId, accountId, agentSlug, maxAgeHours = 24) {
|
|
159
|
-
const session = getSession();
|
|
160
|
-
try {
|
|
161
|
-
const result = await session.run(
|
|
162
|
-
`MATCH (c:Conversation {visitorId: $visitorId, accountId: $accountId, agentType: 'public'})
|
|
163
|
-
WHERE c.agentSlug = $agentSlug
|
|
164
|
-
AND c.updatedAt > datetime() - duration({hours: $maxAgeHours})
|
|
165
|
-
AND NOT c:Trashed
|
|
166
|
-
RETURN c.conversationId AS conversationId
|
|
167
|
-
ORDER BY c.updatedAt DESC
|
|
168
|
-
LIMIT 1`,
|
|
169
|
-
{ visitorId, accountId, agentSlug, maxAgeHours: neo4j.int(maxAgeHours) },
|
|
170
|
-
{ timeout: 2e3 }
|
|
171
|
-
);
|
|
172
|
-
const record = result.records[0];
|
|
173
|
-
if (!record) return null;
|
|
174
|
-
const conversationId = record.get("conversationId");
|
|
175
|
-
if (!conversationId) return null;
|
|
176
|
-
console.log(`[persist] found recent conversation ${conversationId.slice(0, 8)}\u2026 for visitor ${visitorId.slice(0, 8)}\u2026`);
|
|
177
|
-
return { conversationId };
|
|
178
|
-
} catch (err) {
|
|
179
|
-
console.error(`[persist] findRecentConversation failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
180
|
-
return null;
|
|
181
|
-
} finally {
|
|
182
|
-
await session.close();
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
async function findGroupBySlug(groupSlug, accountId) {
|
|
186
|
-
const session = getSession();
|
|
187
|
-
try {
|
|
188
|
-
const result = await session.run(
|
|
189
|
-
`MATCH (c:Conversation {groupSlug: $groupSlug, accountId: $accountId, type: 'group'})
|
|
190
|
-
WHERE NOT c:Trashed
|
|
191
|
-
RETURN c.conversationId AS conversationId, c.groupName AS groupName, c.agentSlug AS agentSlug`,
|
|
192
|
-
{ groupSlug, accountId },
|
|
193
|
-
{ timeout: 2e3 }
|
|
194
|
-
);
|
|
195
|
-
const record = result.records[0];
|
|
196
|
-
if (!record) return null;
|
|
197
|
-
return {
|
|
198
|
-
conversationId: record.get("conversationId"),
|
|
199
|
-
groupName: record.get("groupName"),
|
|
200
|
-
agentSlug: record.get("agentSlug")
|
|
201
|
-
};
|
|
202
|
-
} catch (err) {
|
|
203
|
-
console.error(`[group] findGroupBySlug failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
204
|
-
return null;
|
|
205
|
-
} finally {
|
|
206
|
-
await session.close();
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
async function getGroupParticipants(conversationId) {
|
|
210
|
-
const session = getSession();
|
|
211
|
-
try {
|
|
212
|
-
const result = await session.run(
|
|
213
|
-
`MATCH (p:Person)-[r:PARTICIPATES_IN]->(c:Conversation {conversationId: $conversationId})
|
|
214
|
-
RETURN p.givenName AS givenName, p.familyName AS familyName,
|
|
215
|
-
r.displayName AS displayName, r.joinedAt AS joinedAt, r.visitorId AS visitorId`,
|
|
216
|
-
{ conversationId }
|
|
217
|
-
);
|
|
218
|
-
return result.records.map((r) => ({
|
|
219
|
-
displayName: r.get("displayName") || r.get("givenName"),
|
|
220
|
-
givenName: r.get("givenName"),
|
|
221
|
-
familyName: r.get("familyName"),
|
|
222
|
-
joinedAt: String(r.get("joinedAt")),
|
|
223
|
-
visitorId: r.get("visitorId")
|
|
224
|
-
}));
|
|
225
|
-
} catch (err) {
|
|
226
|
-
console.error(`[group] getGroupParticipants failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
227
|
-
return [];
|
|
228
|
-
} finally {
|
|
229
|
-
await session.close();
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
async function checkGroupMembership(conversationId, visitorId) {
|
|
233
|
-
const session = getSession();
|
|
234
|
-
try {
|
|
235
|
-
const result = await session.run(
|
|
236
|
-
`MATCH (p:Person)-[r:PARTICIPATES_IN]->(c:Conversation {conversationId: $conversationId})
|
|
237
|
-
WHERE r.visitorId = $visitorId
|
|
238
|
-
RETURN r.displayName AS displayName
|
|
239
|
-
LIMIT 1`,
|
|
240
|
-
{ conversationId, visitorId }
|
|
241
|
-
);
|
|
242
|
-
return result.records[0]?.get("displayName") ?? null;
|
|
243
|
-
} catch (err) {
|
|
244
|
-
console.error(`[group] checkGroupMembership failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
245
|
-
return null;
|
|
246
|
-
} finally {
|
|
247
|
-
await session.close();
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
async function bindVisitorToGroup(conversationId, visitorId, personEmail, personPhone) {
|
|
251
|
-
const session = getSession();
|
|
252
|
-
try {
|
|
253
|
-
const result = await session.run(
|
|
254
|
-
`MATCH (p:Person)-[r:PARTICIPATES_IN]->(c:Conversation {conversationId: $conversationId})
|
|
255
|
-
WHERE ($email IS NOT NULL AND p.email = $email)
|
|
256
|
-
OR ($phone IS NOT NULL AND p.telephone = $phone)
|
|
257
|
-
SET r.visitorId = $visitorId
|
|
258
|
-
RETURN r.displayName AS displayName
|
|
259
|
-
LIMIT 1`,
|
|
260
|
-
{
|
|
261
|
-
conversationId,
|
|
262
|
-
visitorId,
|
|
263
|
-
email: personEmail ?? null,
|
|
264
|
-
phone: personPhone ?? null
|
|
265
|
-
}
|
|
266
|
-
);
|
|
267
|
-
const name = result.records[0]?.get("displayName");
|
|
268
|
-
if (name) {
|
|
269
|
-
console.error(`[group] joined id=${conversationId.slice(0, 8)}\u2026 visitor=${visitorId.slice(0, 8)}\u2026`);
|
|
270
|
-
} else {
|
|
271
|
-
console.error(`[group] auth-denied id=${conversationId.slice(0, 8)}\u2026 visitor=${visitorId.slice(0, 8)}\u2026`);
|
|
272
|
-
}
|
|
273
|
-
return name ? { displayName: name } : null;
|
|
274
|
-
} catch (err) {
|
|
275
|
-
console.error(`[group] bindVisitorToGroup failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
276
|
-
return null;
|
|
277
|
-
} finally {
|
|
278
|
-
await session.close();
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
async function getMessagesSince(conversationId, since, limit = 100) {
|
|
282
|
-
const session = getSession();
|
|
283
|
-
try {
|
|
284
|
-
const result = await session.run(
|
|
285
|
-
`MATCH (m:Message)-[:PART_OF]->(c:Conversation {conversationId: $conversationId})
|
|
286
|
-
WHERE m.createdAt > datetime($since)
|
|
287
|
-
RETURN m.messageId AS messageId, m.role AS role, m.content AS content,
|
|
288
|
-
m.senderName AS senderName, m.senderVisitorId AS senderVisitorId,
|
|
289
|
-
m.createdAt AS createdAt
|
|
290
|
-
ORDER BY m.createdAt ASC
|
|
291
|
-
LIMIT $limit`,
|
|
292
|
-
{ conversationId, since, limit: neo4j.int(limit) },
|
|
293
|
-
{ timeout: 3e3 }
|
|
294
|
-
);
|
|
295
|
-
return result.records.map((r) => ({
|
|
296
|
-
messageId: r.get("messageId"),
|
|
297
|
-
role: r.get("role"),
|
|
298
|
-
content: r.get("content"),
|
|
299
|
-
senderName: r.get("senderName"),
|
|
300
|
-
senderVisitorId: r.get("senderVisitorId"),
|
|
301
|
-
createdAt: String(r.get("createdAt"))
|
|
302
|
-
}));
|
|
303
|
-
} catch (err) {
|
|
304
|
-
console.error(`[group] getMessagesSince failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
305
|
-
return [];
|
|
306
|
-
} finally {
|
|
307
|
-
await session.close();
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
158
|
var HEX_COLOR_RE = /^#[0-9a-fA-F]{3,8}$/;
|
|
311
159
|
async function fetchBranding(accountId) {
|
|
312
160
|
const session = getSession();
|
|
@@ -576,39 +424,6 @@ async function persistMessage(conversationId, role, content, accountId, tokens,
|
|
|
576
424
|
await session.close();
|
|
577
425
|
}
|
|
578
426
|
}
|
|
579
|
-
async function writeTurnFailure(args) {
|
|
580
|
-
const session = getSession();
|
|
581
|
-
try {
|
|
582
|
-
const result = await session.run(
|
|
583
|
-
`MATCH (c:Conversation {conversationId: $conversationId, accountId: $accountId})
|
|
584
|
-
MERGE (c)-[:HAS_FAILURE]->(f:TurnFailure {conversationId: $conversationId, at: datetime($at)})
|
|
585
|
-
ON CREATE SET
|
|
586
|
-
f.mode = $mode,
|
|
587
|
-
f.cacheKey = $cacheKey,
|
|
588
|
-
f.prior_event_count = $priorEventCount,
|
|
589
|
-
f.accountId = $accountId,
|
|
590
|
-
f.receivedAt = datetime()
|
|
591
|
-
RETURN toString(f.at) AS at`,
|
|
592
|
-
{
|
|
593
|
-
conversationId: args.conversationId,
|
|
594
|
-
accountId: args.accountId,
|
|
595
|
-
mode: args.mode,
|
|
596
|
-
at: args.at,
|
|
597
|
-
cacheKey: args.cacheKey,
|
|
598
|
-
priorEventCount: args.priorEventCount
|
|
599
|
-
}
|
|
600
|
-
);
|
|
601
|
-
if (result.records.length === 0) {
|
|
602
|
-
return { ok: false, reason: "cid-not-found" };
|
|
603
|
-
}
|
|
604
|
-
return { ok: true, at: result.records[0].get("at") };
|
|
605
|
-
} catch (err) {
|
|
606
|
-
console.error(`[persist] turn-failure convId=${args.conversationId.slice(0, 8)}\u2026 error=${err instanceof Error ? err.message : String(err)}`);
|
|
607
|
-
return { ok: false, reason: "neo4j" };
|
|
608
|
-
} finally {
|
|
609
|
-
await session.close();
|
|
610
|
-
}
|
|
611
|
-
}
|
|
612
427
|
async function getAgentSessionIdForConversation(conversationId) {
|
|
613
428
|
const session = getSession();
|
|
614
429
|
try {
|
|
@@ -1444,15 +1259,8 @@ export {
|
|
|
1444
1259
|
embed,
|
|
1445
1260
|
GREETING_DIRECTIVE,
|
|
1446
1261
|
ensureConversation,
|
|
1447
|
-
findRecentConversation,
|
|
1448
|
-
findGroupBySlug,
|
|
1449
|
-
getGroupParticipants,
|
|
1450
|
-
checkGroupMembership,
|
|
1451
|
-
bindVisitorToGroup,
|
|
1452
|
-
getMessagesSince,
|
|
1453
1262
|
fetchBranding,
|
|
1454
1263
|
persistMessage,
|
|
1455
|
-
writeTurnFailure,
|
|
1456
1264
|
getAgentSessionIdForConversation,
|
|
1457
1265
|
getRecentMessages,
|
|
1458
1266
|
verifyConversationOwnership,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getConversationOwner
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NL7QLVAD.js";
|
|
4
4
|
|
|
5
5
|
// node_modules/hono/dist/compose.js
|
|
6
6
|
var compose = (middleware, onError, onNotFound) => {
|
|
@@ -3419,58 +3419,6 @@ import { readFileSync as readFileSync4, readdirSync, existsSync as existsSync4,
|
|
|
3419
3419
|
// ../lib/brand-templating/src/index.ts
|
|
3420
3420
|
import { join as join2 } from "path";
|
|
3421
3421
|
import { existsSync as existsSync3, readFileSync as readFileSync3 } from "fs";
|
|
3422
|
-
var PLACEHOLDER = "{{productName}}";
|
|
3423
|
-
var cachedProductName = null;
|
|
3424
|
-
function brandJsonPath() {
|
|
3425
|
-
const platformRoot2 = process.env.MAXY_PLATFORM_ROOT;
|
|
3426
|
-
if (!platformRoot2) {
|
|
3427
|
-
throw new Error(
|
|
3428
|
-
"[skill-loader] MAXY_PLATFORM_ROOT not set \u2014 cannot resolve brand.json"
|
|
3429
|
-
);
|
|
3430
|
-
}
|
|
3431
|
-
return join2(platformRoot2, "config", "brand.json");
|
|
3432
|
-
}
|
|
3433
|
-
function getBrandProductName() {
|
|
3434
|
-
if (cachedProductName !== null) return cachedProductName;
|
|
3435
|
-
const path = brandJsonPath();
|
|
3436
|
-
if (!existsSync3(path)) {
|
|
3437
|
-
throw new Error(`[skill-loader] brand.json missing at ${path}`);
|
|
3438
|
-
}
|
|
3439
|
-
let parsed;
|
|
3440
|
-
try {
|
|
3441
|
-
parsed = JSON.parse(readFileSync3(path, "utf-8"));
|
|
3442
|
-
} catch (err) {
|
|
3443
|
-
throw new Error(
|
|
3444
|
-
`[skill-loader] brand.json unreadable at ${path}: ${err instanceof Error ? err.message : String(err)}`
|
|
3445
|
-
);
|
|
3446
|
-
}
|
|
3447
|
-
const value = parsed.productName;
|
|
3448
|
-
if (typeof value !== "string" || value.trim() === "") {
|
|
3449
|
-
throw new Error(
|
|
3450
|
-
`[skill-loader] brand.json at ${path} has missing or empty productName`
|
|
3451
|
-
);
|
|
3452
|
-
}
|
|
3453
|
-
cachedProductName = value;
|
|
3454
|
-
return value;
|
|
3455
|
-
}
|
|
3456
|
-
function substituteBrandPlaceholders(content, sourcePath) {
|
|
3457
|
-
if (!content.includes(PLACEHOLDER)) return content;
|
|
3458
|
-
let productName;
|
|
3459
|
-
try {
|
|
3460
|
-
productName = getBrandProductName();
|
|
3461
|
-
} catch (err) {
|
|
3462
|
-
console.error(
|
|
3463
|
-
`[skill-loader] ERROR: brand.json missing \u2014 cannot resolve productName for skill ${sourcePath}`
|
|
3464
|
-
);
|
|
3465
|
-
throw err;
|
|
3466
|
-
}
|
|
3467
|
-
const occurrences = content.split(PLACEHOLDER).length - 1;
|
|
3468
|
-
const substituted = content.split(PLACEHOLDER).join(productName);
|
|
3469
|
-
console.log(
|
|
3470
|
-
`[skill-loader] brand-substituted productName=${productName} skill=${sourcePath} occurrences=${occurrences}`
|
|
3471
|
-
);
|
|
3472
|
-
return substituted;
|
|
3473
|
-
}
|
|
3474
3422
|
|
|
3475
3423
|
// app/lib/claude-agent/account.ts
|
|
3476
3424
|
var PLATFORM_ROOT2 = process.env.MAXY_PLATFORM_ROOT ?? resolve3(process.cwd(), "..");
|
|
@@ -3534,154 +3482,6 @@ function resolveAccount() {
|
|
|
3534
3482
|
}
|
|
3535
3483
|
return fallback;
|
|
3536
3484
|
}
|
|
3537
|
-
function readAgentFile(accountDir, agentName, filename) {
|
|
3538
|
-
const filePath = resolve3(accountDir, "agents", agentName, filename);
|
|
3539
|
-
if (!existsSync4(filePath)) return null;
|
|
3540
|
-
const raw2 = readFileSync4(filePath, "utf-8");
|
|
3541
|
-
if (filename.endsWith(".md")) {
|
|
3542
|
-
return substituteBrandPlaceholders(raw2, filePath);
|
|
3543
|
-
}
|
|
3544
|
-
return raw2;
|
|
3545
|
-
}
|
|
3546
|
-
var RESERVED_SLUGS = /* @__PURE__ */ new Set(["admin", "api", "assets", "brand", "bot", "privacy"]);
|
|
3547
|
-
var SLUG_PATTERN = /^[a-z][a-z0-9-]{2,49}$/;
|
|
3548
|
-
function validateAgentSlug(slug) {
|
|
3549
|
-
if (!SLUG_PATTERN.test(slug)) return false;
|
|
3550
|
-
if (RESERVED_SLUGS.has(slug)) return false;
|
|
3551
|
-
return true;
|
|
3552
|
-
}
|
|
3553
|
-
function resolveDefaultAgentSlug(accountDir) {
|
|
3554
|
-
const configPath = resolve3(accountDir, "account.json");
|
|
3555
|
-
if (!existsSync4(configPath)) {
|
|
3556
|
-
console.error("[agent-resolve] account.json not found \u2014 cannot resolve defaultAgent");
|
|
3557
|
-
return null;
|
|
3558
|
-
}
|
|
3559
|
-
let config;
|
|
3560
|
-
try {
|
|
3561
|
-
config = JSON.parse(readFileSync4(configPath, "utf-8"));
|
|
3562
|
-
} catch (err) {
|
|
3563
|
-
console.error("[agent-resolve] failed to read account.json:", err);
|
|
3564
|
-
return null;
|
|
3565
|
-
}
|
|
3566
|
-
if (!config.defaultAgent) {
|
|
3567
|
-
console.error("[agent-resolve] defaultAgent not configured in account.json \u2014 set it via the connect-whatsapp skill");
|
|
3568
|
-
return null;
|
|
3569
|
-
}
|
|
3570
|
-
const agentConfigPath = resolve3(accountDir, "agents", config.defaultAgent, "config.json");
|
|
3571
|
-
if (!existsSync4(agentConfigPath)) {
|
|
3572
|
-
console.error(`[agent-resolve] defaultAgent="${config.defaultAgent}" has no config.json at ${agentConfigPath}`);
|
|
3573
|
-
return null;
|
|
3574
|
-
}
|
|
3575
|
-
return config.defaultAgent;
|
|
3576
|
-
}
|
|
3577
|
-
function estimateTokens(text) {
|
|
3578
|
-
return Math.ceil(text.length / 4);
|
|
3579
|
-
}
|
|
3580
|
-
function resolveAgentConfig(accountDir, agentName) {
|
|
3581
|
-
let model = null;
|
|
3582
|
-
let plugins = null;
|
|
3583
|
-
let status = null;
|
|
3584
|
-
let displayName = null;
|
|
3585
|
-
let image = null;
|
|
3586
|
-
let imageShape = null;
|
|
3587
|
-
let showAgentName = false;
|
|
3588
|
-
let liveMemory = false;
|
|
3589
|
-
let knowledgeKeywords = null;
|
|
3590
|
-
let accessMode = "open";
|
|
3591
|
-
const MAX_KNOWLEDGE_KEYWORDS = 5;
|
|
3592
|
-
const configRaw = readAgentFile(accountDir, agentName, "config.json");
|
|
3593
|
-
if (configRaw) {
|
|
3594
|
-
let parsed;
|
|
3595
|
-
try {
|
|
3596
|
-
parsed = JSON.parse(configRaw);
|
|
3597
|
-
} catch {
|
|
3598
|
-
console.warn(`[agent-config] ${agentName}/config.json: invalid JSON \u2014 using defaults`);
|
|
3599
|
-
parsed = {};
|
|
3600
|
-
}
|
|
3601
|
-
model = typeof parsed.model === "string" ? parsed.model : null;
|
|
3602
|
-
plugins = Array.isArray(parsed.plugins) ? parsed.plugins : null;
|
|
3603
|
-
status = typeof parsed.status === "string" ? parsed.status : null;
|
|
3604
|
-
displayName = typeof parsed.displayName === "string" ? parsed.displayName : null;
|
|
3605
|
-
image = typeof parsed.image === "string" ? parsed.image : null;
|
|
3606
|
-
if (typeof parsed.imageShape === "string" && ["circle", "rounded"].includes(parsed.imageShape)) {
|
|
3607
|
-
imageShape = parsed.imageShape;
|
|
3608
|
-
}
|
|
3609
|
-
if (parsed.showAgentName === true) {
|
|
3610
|
-
showAgentName = true;
|
|
3611
|
-
} else if (parsed.showAgentName === "none") {
|
|
3612
|
-
showAgentName = "none";
|
|
3613
|
-
}
|
|
3614
|
-
if (image || imageShape || showAgentName) {
|
|
3615
|
-
console.log(`[agent-config] ${agentName}: image=${image || "(none)"} imageShape=${imageShape || "(none)"} showAgentName=${showAgentName}`);
|
|
3616
|
-
}
|
|
3617
|
-
if (typeof parsed.accessMode === "string" && ["gated", "paid"].includes(parsed.accessMode)) {
|
|
3618
|
-
accessMode = parsed.accessMode;
|
|
3619
|
-
}
|
|
3620
|
-
if (typeof parsed.liveMemory === "boolean") {
|
|
3621
|
-
liveMemory = parsed.liveMemory;
|
|
3622
|
-
} else if (typeof parsed.liveMemory === "string") {
|
|
3623
|
-
const lower = parsed.liveMemory.toLowerCase();
|
|
3624
|
-
if (lower === "true") {
|
|
3625
|
-
liveMemory = true;
|
|
3626
|
-
console.warn(`[agent-config] ${agentName}: liveMemory is string "true" \u2014 coercing to boolean. Fix the config to use a boolean value.`);
|
|
3627
|
-
} else if (lower === "false") {
|
|
3628
|
-
liveMemory = false;
|
|
3629
|
-
console.warn(`[agent-config] ${agentName}: liveMemory is string "false" \u2014 coercing to boolean. Fix the config to use a boolean value.`);
|
|
3630
|
-
} else {
|
|
3631
|
-
throw new Error(`[agent-config] ${agentName}: liveMemory has invalid string value "${parsed.liveMemory}" \u2014 expected boolean or "true"/"false"`);
|
|
3632
|
-
}
|
|
3633
|
-
} else if (parsed.liveMemory !== void 0 && parsed.liveMemory !== null) {
|
|
3634
|
-
throw new Error(`[agent-config] ${agentName}: liveMemory has invalid type ${typeof parsed.liveMemory} \u2014 expected boolean or "true"/"false"`);
|
|
3635
|
-
}
|
|
3636
|
-
if (Array.isArray(parsed.knowledgeKeywords) && parsed.knowledgeKeywords.length > 0) {
|
|
3637
|
-
const filtered = parsed.knowledgeKeywords.filter((k) => typeof k === "string" && k.trim()).map((k) => k.replace(/,/g, "").trim().toLowerCase()).filter(Boolean);
|
|
3638
|
-
if (filtered.length > MAX_KNOWLEDGE_KEYWORDS) {
|
|
3639
|
-
console.warn(`[agent-config] ${agentName}: knowledgeKeywords has ${filtered.length} entries \u2014 capping at ${MAX_KNOWLEDGE_KEYWORDS}`);
|
|
3640
|
-
}
|
|
3641
|
-
knowledgeKeywords = filtered.length > 0 ? filtered.slice(0, MAX_KNOWLEDGE_KEYWORDS) : null;
|
|
3642
|
-
}
|
|
3643
|
-
}
|
|
3644
|
-
let knowledge = null;
|
|
3645
|
-
let knowledgeBaked = false;
|
|
3646
|
-
const agentDir = resolve3(accountDir, "agents", agentName);
|
|
3647
|
-
const knowledgePath = resolve3(agentDir, "KNOWLEDGE.md");
|
|
3648
|
-
const summaryPath = resolve3(agentDir, "KNOWLEDGE-SUMMARY.md");
|
|
3649
|
-
const hasKnowledge = existsSync4(knowledgePath);
|
|
3650
|
-
const hasSummary = existsSync4(summaryPath);
|
|
3651
|
-
if (hasKnowledge && hasSummary) {
|
|
3652
|
-
const knowledgeMtime = statSync(knowledgePath).mtimeMs;
|
|
3653
|
-
const summaryMtime = statSync(summaryPath).mtimeMs;
|
|
3654
|
-
if (summaryMtime >= knowledgeMtime) {
|
|
3655
|
-
knowledge = readFileSync4(summaryPath, "utf-8");
|
|
3656
|
-
} else {
|
|
3657
|
-
console.warn(`[agent-config] ${agentName}: KNOWLEDGE-SUMMARY.md is stale (KNOWLEDGE.md is newer) \u2014 using full knowledge`);
|
|
3658
|
-
knowledge = readFileSync4(knowledgePath, "utf-8");
|
|
3659
|
-
}
|
|
3660
|
-
knowledgeBaked = true;
|
|
3661
|
-
} else if (hasKnowledge) {
|
|
3662
|
-
knowledge = readFileSync4(knowledgePath, "utf-8");
|
|
3663
|
-
knowledgeBaked = true;
|
|
3664
|
-
}
|
|
3665
|
-
let budget = null;
|
|
3666
|
-
const identityRaw = readAgentFile(accountDir, agentName, "IDENTITY.md");
|
|
3667
|
-
const soulRaw = readAgentFile(accountDir, agentName, "SOUL.md");
|
|
3668
|
-
if (identityRaw || soulRaw || knowledge) {
|
|
3669
|
-
const identityTokens = identityRaw ? estimateTokens(identityRaw) : 0;
|
|
3670
|
-
const soulTokens = soulRaw ? estimateTokens(soulRaw) : 0;
|
|
3671
|
-
const knowledgeTokens = knowledge ? estimateTokens(knowledge) : 0;
|
|
3672
|
-
budget = {
|
|
3673
|
-
identity: identityTokens,
|
|
3674
|
-
soul: soulTokens,
|
|
3675
|
-
knowledge: knowledgeTokens,
|
|
3676
|
-
plugins: 0,
|
|
3677
|
-
total: identityTokens + soulTokens + knowledgeTokens
|
|
3678
|
-
};
|
|
3679
|
-
}
|
|
3680
|
-
return { model, plugins, status, displayName, image, imageShape, showAgentName, knowledge, knowledgeBaked, liveMemory, knowledgeKeywords, budget, accessMode };
|
|
3681
|
-
}
|
|
3682
|
-
function getDefaultAccountId() {
|
|
3683
|
-
return resolveAccount()?.accountId ?? null;
|
|
3684
|
-
}
|
|
3685
3485
|
function resolveUserAccounts(userId) {
|
|
3686
3486
|
if (!existsSync4(ACCOUNTS_DIR)) return [];
|
|
3687
3487
|
const results = [];
|
|
@@ -3938,26 +3738,6 @@ var appendStreamLogLine = (..._args) => null;
|
|
|
3938
3738
|
// app/lib/claude-agent/summary-helpers.ts
|
|
3939
3739
|
var stripAttachmentMetaSuffix = (..._args) => null;
|
|
3940
3740
|
|
|
3941
|
-
// app/lib/claude-agent.ts
|
|
3942
|
-
var agentLogStream = (..._args) => null;
|
|
3943
|
-
var clearSessionHistory = (..._args) => null;
|
|
3944
|
-
var compactSession = (..._args) => null;
|
|
3945
|
-
var completeGrantSetup = (..._args) => null;
|
|
3946
|
-
var getAgentNameForSession = (..._args) => null;
|
|
3947
|
-
var getGrantForSession = (..._args) => null;
|
|
3948
|
-
var getGroupSlugForSession = (..._args) => null;
|
|
3949
|
-
var getStreamLogHandle = (..._args) => null;
|
|
3950
|
-
var getVisitorIdForSession = (..._args) => null;
|
|
3951
|
-
var invokeAgent = (..._args) => null;
|
|
3952
|
-
var listAdminSessionsInProgress = (..._args) => [];
|
|
3953
|
-
var registerGrantSession = (..._args) => null;
|
|
3954
|
-
var registerResumedSession = (..._args) => null;
|
|
3955
|
-
var setAgentSessionId = (..._args) => null;
|
|
3956
|
-
var setGroupContextForSession = (..._args) => null;
|
|
3957
|
-
var getSessionMessages = (..._args) => [];
|
|
3958
|
-
var sigtermFlushStreamLogs = (..._args) => null;
|
|
3959
|
-
var streamLogPathFor = (..._args) => null;
|
|
3960
|
-
|
|
3961
3741
|
// server/routes/_helpers.ts
|
|
3962
3742
|
async function safeJson(c) {
|
|
3963
3743
|
try {
|
|
@@ -4576,8 +4356,6 @@ export {
|
|
|
4576
4356
|
USERS_FILE,
|
|
4577
4357
|
LOG_DIR,
|
|
4578
4358
|
BIN_DIR,
|
|
4579
|
-
TELEGRAM_WEBHOOK_SECRET_FILE,
|
|
4580
|
-
TELEGRAM_ADMIN_WEBHOOK_SECRET_FILE,
|
|
4581
4359
|
CLAUDE_CREDENTIALS_FILE,
|
|
4582
4360
|
vncLog,
|
|
4583
4361
|
newCorrId,
|
|
@@ -4587,8 +4365,6 @@ export {
|
|
|
4587
4365
|
browserViewerLog,
|
|
4588
4366
|
validatePasswordStrength,
|
|
4589
4367
|
isPasswordValid,
|
|
4590
|
-
hashPassword,
|
|
4591
|
-
verifyPassword,
|
|
4592
4368
|
isRemoteAuthConfigured,
|
|
4593
4369
|
setRemotePassword,
|
|
4594
4370
|
verifyRemotePassword,
|
|
@@ -4604,10 +4380,6 @@ export {
|
|
|
4604
4380
|
PLATFORM_ROOT2 as PLATFORM_ROOT,
|
|
4605
4381
|
ACCOUNTS_DIR,
|
|
4606
4382
|
resolveAccount,
|
|
4607
|
-
validateAgentSlug,
|
|
4608
|
-
resolveDefaultAgentSlug,
|
|
4609
|
-
resolveAgentConfig,
|
|
4610
|
-
getDefaultAccountId,
|
|
4611
4383
|
resolveUserAccounts,
|
|
4612
4384
|
fingerprintSessionKey,
|
|
4613
4385
|
registerSession,
|
|
@@ -4629,24 +4401,6 @@ export {
|
|
|
4629
4401
|
getBundleMtimeIso,
|
|
4630
4402
|
appendStreamLogLine,
|
|
4631
4403
|
stripAttachmentMetaSuffix,
|
|
4632
|
-
agentLogStream,
|
|
4633
|
-
clearSessionHistory,
|
|
4634
|
-
compactSession,
|
|
4635
|
-
completeGrantSetup,
|
|
4636
|
-
getAgentNameForSession,
|
|
4637
|
-
getGrantForSession,
|
|
4638
|
-
getGroupSlugForSession,
|
|
4639
|
-
getStreamLogHandle,
|
|
4640
|
-
getVisitorIdForSession,
|
|
4641
|
-
invokeAgent,
|
|
4642
|
-
listAdminSessionsInProgress,
|
|
4643
|
-
registerGrantSession,
|
|
4644
|
-
registerResumedSession,
|
|
4645
|
-
setAgentSessionId,
|
|
4646
|
-
setGroupContextForSession,
|
|
4647
|
-
getSessionMessages,
|
|
4648
|
-
sigtermFlushStreamLogs,
|
|
4649
|
-
streamLogPathFor,
|
|
4650
4404
|
safeJson,
|
|
4651
4405
|
requireAdminSession,
|
|
4652
4406
|
tryCookieBridgeForConversation,
|
package/payload/server/{cloudflare-task-tracker-LYI5BTYI.js → cloudflare-task-tracker-QVOGHKWV.js}
RENAMED
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
readTunnelState,
|
|
8
8
|
recoverRunningCloudflareTasks,
|
|
9
9
|
resolveUnitGoneVerdict
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-2MRZBQMH.js";
|
|
11
|
+
import "./chunk-NL7QLVAD.js";
|
|
12
12
|
import "./chunk-JSBRDJBE.js";
|
|
13
13
|
export {
|
|
14
14
|
CLOUDFLARE_TASK_DIAGNOSTICS,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./brand-
|
|
1
|
+
import{a as e}from"./brand-Bm671owU.js";var t=e();function n({checked:e,onChange:n,label:r,disabled:i}){return(0,t.jsxs)(`label`,{className:`maxy-checkbox${i?` maxy-checkbox--disabled`:``}`,children:[(0,t.jsx)(`input`,{type:`checkbox`,checked:e,onChange:e=>n(e.target.checked),disabled:i}),(0,t.jsx)(`span`,{className:`maxy-checkbox__box`,children:`✱`}),r&&(0,t.jsx)(`span`,{className:`maxy-checkbox__label`,children:r})]})}export{n as t};
|