@rubytech/create-maxy-code 0.1.436 → 0.1.438
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/payload/platform/lib/active-rules/dist/index.d.ts +14 -0
- package/payload/platform/lib/active-rules/dist/index.d.ts.map +1 -1
- package/payload/platform/lib/active-rules/dist/index.js +56 -9
- package/payload/platform/lib/active-rules/dist/index.js.map +1 -1
- package/payload/platform/lib/active-rules/src/index.test.ts +106 -0
- package/payload/platform/lib/active-rules/src/index.ts +98 -9
- package/payload/platform/lib/admin-access-password/__tests__/index.test.ts +31 -0
- package/payload/platform/lib/admin-access-password/dist/index.d.ts +8 -0
- package/payload/platform/lib/admin-access-password/dist/index.d.ts.map +1 -1
- package/payload/platform/lib/admin-access-password/dist/index.js +5 -1
- package/payload/platform/lib/admin-access-password/dist/index.js.map +1 -1
- package/payload/platform/lib/admin-access-password/src/index.ts +14 -1
- package/payload/platform/lib/admins-write/__tests__/index.test.ts +27 -0
- package/payload/platform/lib/admins-write/dist/index.d.ts +8 -0
- package/payload/platform/lib/admins-write/dist/index.d.ts.map +1 -1
- package/payload/platform/lib/admins-write/dist/index.js +5 -1
- package/payload/platform/lib/admins-write/dist/index.js.map +1 -1
- package/payload/platform/lib/admins-write/src/index.ts +14 -1
- package/payload/platform/plugins/admin/.claude-plugin/plugin.json +1 -1
- package/payload/platform/plugins/admin/PLUGIN.md +4 -2
- package/payload/platform/plugins/admin/mcp/dist/credential-identity.d.ts +23 -0
- package/payload/platform/plugins/admin/mcp/dist/credential-identity.d.ts.map +1 -0
- package/payload/platform/plugins/admin/mcp/dist/credential-identity.js +35 -0
- package/payload/platform/plugins/admin/mcp/dist/credential-identity.js.map +1 -0
- package/payload/platform/plugins/admin/mcp/dist/index.js +110 -57
- package/payload/platform/plugins/admin/mcp/dist/index.js.map +1 -1
- package/payload/platform/plugins/admin/mcp/dist/tools/account-lifecycle.d.ts +22 -0
- package/payload/platform/plugins/admin/mcp/dist/tools/account-lifecycle.d.ts.map +1 -1
- package/payload/platform/plugins/admin/mcp/dist/tools/account-lifecycle.js +62 -2
- package/payload/platform/plugins/admin/mcp/dist/tools/account-lifecycle.js.map +1 -1
- package/payload/platform/plugins/admin/skills/platform-architecture/SKILL.md +6 -6
- package/payload/platform/plugins/docs/references/admin-identity-gate.md +40 -0
- package/payload/platform/plugins/docs/references/admin-session.md +2 -0
- package/payload/platform/plugins/docs/references/admin-ui.md +2 -2
- package/payload/platform/plugins/docs/references/internals.md +3 -3
- package/payload/platform/plugins/linkedin-import/skills/linkedin-import/references/profile.md +1 -1
- package/payload/platform/plugins/memory/mcp/dist/index.js +12 -3
- package/payload/platform/plugins/memory/mcp/dist/index.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-archive-write-progress.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-archive-write-progress.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-archive-write-progress.test.js +79 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-archive-write-progress.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest-write-phase-progress.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest-write-phase-progress.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest-write-phase-progress.test.js +50 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-ingest-write-phase-progress.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-reindex-progress.test.d.ts +2 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-reindex-progress.test.d.ts.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-reindex-progress.test.js +114 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/memory-reindex-progress.test.js.map +1 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/profile-read-active-rules.test.js +5 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/profile-read-active-rules.test.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-archive-write.d.ts +15 -0
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-archive-write.d.ts.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-archive-write.js +17 -17
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-archive-write.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest.js +21 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-ingest.js.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-reindex.d.ts +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-reindex.d.ts.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-reindex.js +19 -4
- package/payload/platform/plugins/memory/mcp/dist/tools/memory-reindex.js.map +1 -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 +4 -2
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-read.js.map +1 -1
- package/payload/platform/scripts/remediate-glsmith-identity.sh +500 -0
- package/payload/platform/scripts/seed-neo4j.sh +77 -12
- 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 +36 -10
- package/payload/platform/services/claude-session-manager/dist/http-server.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/identity-audit.d.ts +51 -0
- package/payload/platform/services/claude-session-manager/dist/identity-audit.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/identity-audit.js +103 -0
- package/payload/platform/services/claude-session-manager/dist/identity-audit.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/index.js +33 -0
- package/payload/platform/services/claude-session-manager/dist/index.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/jsonl-enumerator.d.ts +7 -0
- package/payload/platform/services/claude-session-manager/dist/jsonl-enumerator.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/jsonl-enumerator.js +9 -0
- package/payload/platform/services/claude-session-manager/dist/jsonl-enumerator.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/mcp-user-binding.d.ts +25 -0
- package/payload/platform/services/claude-session-manager/dist/mcp-user-binding.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/mcp-user-binding.js +42 -0
- package/payload/platform/services/claude-session-manager/dist/mcp-user-binding.js.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/preference-reconciliation-audit.d.ts +4 -1
- package/payload/platform/services/claude-session-manager/dist/preference-reconciliation-audit.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/preference-reconciliation-audit.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/redundant-operator-seat-audit.d.ts +44 -0
- package/payload/platform/services/claude-session-manager/dist/redundant-operator-seat-audit.d.ts.map +1 -0
- package/payload/platform/services/claude-session-manager/dist/redundant-operator-seat-audit.js +127 -0
- package/payload/platform/services/claude-session-manager/dist/redundant-operator-seat-audit.js.map +1 -0
- package/payload/server/{chunk-LMLVOZ6G.js → chunk-UGPQCVIW.js} +11 -38
- package/payload/server/maxy-edge.js +1 -1
- package/payload/server/public/assets/{AdminLoginScreens-CMh1pdOp.js → AdminLoginScreens-DeR71H29.js} +1 -1
- package/payload/server/public/assets/AdminShell-DlAVQUda.js +2 -0
- package/payload/server/public/assets/{Checkbox-OCfZCTCO.js → Checkbox-B629mOPp.js} +1 -1
- package/payload/server/public/assets/{admin-Bi2uYnAg.js → admin-C15h-NL0.js} +1 -1
- package/payload/server/public/assets/{arc-Bm9oSOth.js → arc-qKfXIt8v.js} +1 -1
- package/payload/server/public/assets/architecture-YZFGNWBL-FPHT7s-C.js +1 -0
- package/payload/server/public/assets/{architectureDiagram-Q4EWVU46-C2dK88g3.js → architectureDiagram-Q4EWVU46-DkVrGn7G.js} +1 -1
- package/payload/server/public/assets/{blockDiagram-DXYQGD6D-DfLSsjCJ.js → blockDiagram-DXYQGD6D-DqavswGH.js} +1 -1
- package/payload/server/public/assets/browser-B7xQLIRK.js +1 -0
- package/payload/server/public/assets/{c4Diagram-AHTNJAMY-Bxkmp6OL.js → c4Diagram-AHTNJAMY-B7fyKiXe.js} +1 -1
- package/payload/server/public/assets/calendar-A-vGm6pL.js +1 -0
- package/payload/server/public/assets/channel-j70eMvcL.js +1 -0
- package/payload/server/public/assets/chat-DAae6Z51.js +1 -0
- package/payload/server/public/assets/chevron-left-u4tjq7fI.js +1 -0
- package/payload/server/public/assets/{chunk-2KRD3SAO-BVNDFwNH.js → chunk-2KRD3SAO-DsgMtGkv.js} +1 -1
- package/payload/server/public/assets/{chunk-336JU56O-Daz6nMta.js → chunk-336JU56O-CkdISfNt.js} +2 -2
- package/payload/server/public/assets/chunk-426QAEUC-D-NcAlTW.js +1 -0
- package/payload/server/public/assets/{chunk-4BX2VUAB-DTldfvwP.js → chunk-4BX2VUAB-CYpiF2bl.js} +1 -1
- package/payload/server/public/assets/{chunk-4TB4RGXK-DhM8pwRG.js → chunk-4TB4RGXK-CWyc_F7v.js} +1 -1
- package/payload/server/public/assets/{chunk-55IACEB6-CzTsbIHo.js → chunk-55IACEB6-BbzKMw2Z.js} +1 -1
- package/payload/server/public/assets/{chunk-5FUZZQ4R-BrcObZhe.js → chunk-5FUZZQ4R-u19Nai9e.js} +1 -1
- package/payload/server/public/assets/{chunk-5PVQY5BW-SFqTuS11.js → chunk-5PVQY5BW-Ba8by6Uy.js} +1 -1
- package/payload/server/public/assets/{chunk-67CJDMHE-EIbrSGOo.js → chunk-67CJDMHE-BwUuxtyb.js} +1 -1
- package/payload/server/public/assets/{chunk-7N4EOEYR-B1D4Jorr.js → chunk-7N4EOEYR-BRH9iM9L.js} +1 -1
- package/payload/server/public/assets/{chunk-AA7GKIK3-BKHiX4cC.js → chunk-AA7GKIK3-BGoztgLL.js} +1 -1
- package/payload/server/public/assets/{chunk-BSJP7CBP-xBzu29m7.js → chunk-BSJP7CBP-C5GDAZTl.js} +1 -1
- package/payload/server/public/assets/{chunk-CIAEETIT-x2x0gMpL.js → chunk-CIAEETIT-ChY32VPS.js} +1 -1
- package/payload/server/public/assets/{chunk-EDXVE4YY-D5UkD28M.js → chunk-EDXVE4YY-CPSD3p6p.js} +1 -1
- package/payload/server/public/assets/{chunk-ENJZ2VHE-Dbz67a7E.js → chunk-ENJZ2VHE-D1oL-iUr.js} +1 -1
- package/payload/server/public/assets/{chunk-FMBD7UC4-XfWvuu2F.js → chunk-FMBD7UC4-CPvYEr54.js} +1 -1
- package/payload/server/public/assets/{chunk-FOC6F5B3-DfOEDS4q.js → chunk-FOC6F5B3-9Yyj7Vbz.js} +1 -1
- package/payload/server/public/assets/{chunk-ICPOFSXX-D_WEZZvg.js → chunk-ICPOFSXX-BaYgh8FR.js} +2 -2
- package/payload/server/public/assets/{chunk-K5T4RW27-7O627Xi1.js → chunk-K5T4RW27-5ucpeRvm.js} +1 -1
- package/payload/server/public/assets/{chunk-KGLVRYIC-BXI3XDP9.js → chunk-KGLVRYIC-DW-FHk7T.js} +1 -1
- package/payload/server/public/assets/{chunk-LIHQZDEY-B9cFNN0l.js → chunk-LIHQZDEY-CGGVfAyG.js} +1 -1
- package/payload/server/public/assets/{chunk-ORNJ4GCN-BR3UNDTn.js → chunk-ORNJ4GCN-Bv8EUa5d.js} +1 -1
- package/payload/server/public/assets/{chunk-OYMX7WX6-2wKIEtFZ.js → chunk-OYMX7WX6-C1mXJnyw.js} +1 -1
- package/payload/server/public/assets/chunk-QZHKN3VN-CAwbQBtf.js +1 -0
- package/payload/server/public/assets/{chunk-U2HBQHQK-augM3AXB.js → chunk-U2HBQHQK-PwSQz6EP.js} +1 -1
- package/payload/server/public/assets/{chunk-X2U36JSP-BAM9q9ZQ.js → chunk-X2U36JSP--NPHTBlU.js} +1 -1
- package/payload/server/public/assets/{chunk-XPW4576I-DxPpji5P.js → chunk-XPW4576I-Bbc7Da32.js} +1 -1
- package/payload/server/public/assets/{chunk-YZCP3GAM-BD3ClFXP.js → chunk-YZCP3GAM-D-9v8e--.js} +1 -1
- package/payload/server/public/assets/{chunk-ZZ45TVLE-CqxhLPep.js → chunk-ZZ45TVLE-CMPg670Q.js} +1 -1
- package/payload/server/public/assets/classDiagram-6PBFFD2Q-Ct6Rn0vt.js +1 -0
- package/payload/server/public/assets/classDiagram-v2-HSJHXN6E-B_2XCIFv.js +1 -0
- package/payload/server/public/assets/clone-DjPWA_NH.js +1 -0
- package/payload/server/public/assets/{cose-bilkent-S5V4N54A-xywWX-9i.js → cose-bilkent-S5V4N54A-NVSb1Bhy.js} +1 -1
- package/payload/server/public/assets/{dagre-KV5264BT-ChRpqqiH.js → dagre-KV5264BT-V2Ai1DFl.js} +1 -1
- package/payload/server/public/assets/{dagre-BaHjDQ-8.js → dagre-QfLcO-1j.js} +1 -1
- package/payload/server/public/assets/data-BNWpKx1d.js +1 -0
- package/payload/server/public/assets/{diagram-5BDNPKRD-KjwTpyBi.js → diagram-5BDNPKRD-Caw21693.js} +1 -1
- package/payload/server/public/assets/{diagram-G4DWMVQ6-DZO9njAF.js → diagram-G4DWMVQ6-CgwVkT2q.js} +1 -1
- package/payload/server/public/assets/{diagram-MMDJMWI5-Bus-U-TI.js → diagram-MMDJMWI5-DFUrLZhs.js} +1 -1
- package/payload/server/public/assets/{diagram-TYMM5635-CfJodFgq.js → diagram-TYMM5635-CEEiEuZJ.js} +1 -1
- package/payload/server/public/assets/{erDiagram-SMLLAGMA-Bt5zqWiW.js → erDiagram-SMLLAGMA-CG10NrT3.js} +1 -1
- package/payload/server/public/assets/file-download-4mKJxUi-.js +1 -0
- package/payload/server/public/assets/{flatten-Bpu1L63d.js → flatten-DAO0sfCM.js} +1 -1
- package/payload/server/public/assets/{flowDiagram-DWJPFMVM-B64Q590S.js → flowDiagram-DWJPFMVM-BqkV9Okv.js} +1 -1
- package/payload/server/public/assets/{ganttDiagram-T4ZO3ILL-BWdgCEpH.js → ganttDiagram-T4ZO3ILL-DRiCDQF6.js} +1 -1
- package/payload/server/public/assets/gitGraph-7Q5UKJZL-B8Hx7f-D.js +1 -0
- package/payload/server/public/assets/{gitGraphDiagram-UUTBAWPF-Djq2B0WT.js → gitGraphDiagram-UUTBAWPF-BZV2voyy.js} +1 -1
- package/payload/server/public/assets/{graph-CrJ-itbq.js → graph-D0orIRAh.js} +3 -3
- package/payload/server/public/assets/{graph-labels-CmCWaKJT.js → graph-labels-B8YAdo3Z.js} +1 -1
- package/payload/server/public/assets/{graphlib-CNJh9_lx.js → graphlib-DGPThX8M.js} +1 -1
- package/payload/server/public/assets/info-OMHHGYJF-BicCJTqU.js +1 -0
- package/payload/server/public/assets/infoDiagram-42DDH7IO-tf-8rOez.js +2 -0
- package/payload/server/public/assets/{isEmpty-DkDEVnMZ.js → isEmpty-Cb_U81C6.js} +1 -1
- package/payload/server/public/assets/{ishikawaDiagram-UXIWVN3A-V3ACkWCW.js → ishikawaDiagram-UXIWVN3A-BKsAxSvp.js} +1 -1
- package/payload/server/public/assets/{journeyDiagram-VCZTEJTY-9T0qZeH3.js → journeyDiagram-VCZTEJTY-CmliuOd-.js} +1 -1
- package/payload/server/public/assets/{kanban-definition-6JOO6SKY-CxZ0ukx3.js → kanban-definition-6JOO6SKY-DAlElMb-.js} +1 -1
- package/payload/server/public/assets/{line-DUHKCQZT.js → line-DKZqLKAC.js} +1 -1
- package/payload/server/public/assets/{linear-BgIBblun.js → linear-CbSGdh1x.js} +1 -1
- package/payload/server/public/assets/{maximize-2-_cJWIgx2.js → maximize-2-CxstTgoK.js} +1 -1
- package/payload/server/public/assets/{mermaid-parser.core-CyHygs0-.js → mermaid-parser.core-DFvbao9C.js} +2 -2
- package/payload/server/public/assets/{mermaid.core-L55fJBSx.js → mermaid.core-C0vEBxDm.js} +3 -3
- package/payload/server/public/assets/{mindmap-definition-QFDTVHPH-DczaUX_E.js → mindmap-definition-QFDTVHPH-CShASUKd.js} +1 -1
- package/payload/server/public/assets/operator-DZzuotDB.js +1 -0
- package/payload/server/public/assets/{ordinal-DK3QISRR.js → ordinal-H0tVmBDP.js} +1 -1
- package/payload/server/public/assets/packet-4T2RLAQJ-Ckn_5hq0.js +1 -0
- package/payload/server/public/assets/{page-DbUaFfk6.js → page-3g0A19Rv.js} +6 -6
- package/payload/server/public/assets/page-Ck_pLhAk.js +1 -0
- package/payload/server/public/assets/{pdf-render-COLA4aPx.js → pdf-render-jAQU0nXt.js} +1 -1
- package/payload/server/public/assets/pie-ZZUOXDRM-DzlGQW3J.js +1 -0
- package/payload/server/public/assets/{pieDiagram-DEJITSTG-Da5TdnNt.js → pieDiagram-DEJITSTG-CBZHpDAJ.js} +1 -1
- package/payload/server/public/assets/{public-CYhDdDJd.js → public-WFUQw9AD.js} +1 -1
- package/payload/server/public/assets/{quadrantDiagram-34T5L4WZ-DX7J81uh.js → quadrantDiagram-34T5L4WZ-n3bB3K91.js} +1 -1
- package/payload/server/public/assets/radar-PYXPWWZC-BHo2YD8b.js +1 -0
- package/payload/server/public/assets/{reduce-uzWdoyL7.js → reduce-DAvwat-a.js} +1 -1
- package/payload/server/public/assets/{requirementDiagram-MS252O5E-DJQGrZPG.js → requirementDiagram-MS252O5E-DiDvQK3c.js} +1 -1
- package/payload/server/public/assets/rotate-ccw-COGQTi7n.js +1 -0
- package/payload/server/public/assets/{sankeyDiagram-XADWPNL6-Ba8fGz96.js → sankeyDiagram-XADWPNL6-DWDQQZmd.js} +1 -1
- package/payload/server/public/assets/{sequenceDiagram-FGHM5R23-BmDPC7qx.js → sequenceDiagram-FGHM5R23-DmAqRlBT.js} +1 -1
- package/payload/server/public/assets/{stateDiagram-FHFEXIEX-1VkptYFz.js → stateDiagram-FHFEXIEX-D4R-n6bZ.js} +1 -1
- package/payload/server/public/assets/stateDiagram-v2-QKLJ7IA2-BcFRbGRu.js +1 -0
- package/payload/server/public/assets/tasks-B97VpwEJ.js +1 -0
- package/payload/server/public/assets/{time-entry-format-D477WAes.js → time-entry-format-C09rDHo9.js} +1 -1
- package/payload/server/public/assets/{timeline-definition-GMOUNBTQ-B92U3T_f.js → timeline-definition-GMOUNBTQ-CjiHGP4l.js} +1 -1
- package/payload/server/public/assets/treeView-SZITEDCU-BtRr5vXp.js +1 -0
- package/payload/server/public/assets/treemap-W4RFUUIX-D8p0sbyo.js +1 -0
- package/payload/server/public/assets/useCopyFeedback-CSk9KjhY.js +1 -0
- package/payload/server/public/assets/useSubAccountSwitcher-DLJFISqf.js +9 -0
- package/payload/server/public/assets/{useSubAccountSwitcher-BKCWKo97.css → useSubAccountSwitcher-Dzmd7Aip.css} +1 -1
- package/payload/server/public/assets/{useVoiceRecorder-CZPtVpM-.js → useVoiceRecorder-DCyJQkFK.js} +2 -2
- package/payload/server/public/assets/{vennDiagram-DHZGUBPP-Y6Wkihrs.js → vennDiagram-DHZGUBPP-CBdDQ7c-.js} +1 -1
- package/payload/server/public/assets/wardley-RL74JXVD-DgMn-9ZJ.js +1 -0
- package/payload/server/public/assets/{wardleyDiagram-NUSXRM2D-iJpfal2z.js → wardleyDiagram-NUSXRM2D-BlIQPKLb.js} +1 -1
- package/payload/server/public/assets/{xychartDiagram-5P7HB3ND-S0bv7oH0.js → xychartDiagram-5P7HB3ND-CslKgh9B.js} +1 -1
- package/payload/server/public/browser.html +5 -5
- package/payload/server/public/calendar.html +6 -6
- package/payload/server/public/chat.html +13 -12
- package/payload/server/public/data.html +11 -11
- package/payload/server/public/graph.html +11 -10
- package/payload/server/public/index.html +14 -14
- package/payload/server/public/operator.html +15 -14
- package/payload/server/public/public.html +13 -12
- package/payload/server/public/tasks.html +5 -4
- package/payload/server/server.js +703 -555
- package/payload/server/public/assets/AdminShell-X9Bg3AKc.js +0 -2
- package/payload/server/public/assets/architecture-YZFGNWBL-Bbnxm4F4.js +0 -1
- package/payload/server/public/assets/browser-B0ieZy-b.js +0 -1
- package/payload/server/public/assets/calendar-CRL2_9Fl.js +0 -1
- package/payload/server/public/assets/channel-CatPTq-5.js +0 -1
- package/payload/server/public/assets/chat-DUc7bt5W.js +0 -1
- package/payload/server/public/assets/chevron-left-B2DKUxLk.js +0 -1
- package/payload/server/public/assets/chunk-426QAEUC-CqLMwOdA.js +0 -1
- package/payload/server/public/assets/chunk-QZHKN3VN-CjWy8NJ7.js +0 -1
- package/payload/server/public/assets/classDiagram-6PBFFD2Q-DHhR5rdN.js +0 -1
- package/payload/server/public/assets/classDiagram-v2-HSJHXN6E-DH4pAdfu.js +0 -1
- package/payload/server/public/assets/clone-DCKzwjWW.js +0 -1
- package/payload/server/public/assets/data-C1ftMulP.js +0 -1
- package/payload/server/public/assets/file-download-CHTyUQqS.js +0 -1
- package/payload/server/public/assets/gitGraph-7Q5UKJZL-Ps5HDzLh.js +0 -1
- package/payload/server/public/assets/info-OMHHGYJF-gtlpwIig.js +0 -1
- package/payload/server/public/assets/infoDiagram-42DDH7IO-CPrWlrsa.js +0 -2
- package/payload/server/public/assets/operator-B3Mi3TW0.js +0 -1
- package/payload/server/public/assets/packet-4T2RLAQJ-DrSn1e0n.js +0 -1
- package/payload/server/public/assets/page-C1G57kPZ.js +0 -1
- package/payload/server/public/assets/pie-ZZUOXDRM-C09i6N-g.js +0 -1
- package/payload/server/public/assets/radar-PYXPWWZC-CMZN2KQH.js +0 -1
- package/payload/server/public/assets/stateDiagram-v2-QKLJ7IA2-BdgkPHuh.js +0 -1
- package/payload/server/public/assets/tasks-0OcRiBdQ.js +0 -1
- package/payload/server/public/assets/treeView-SZITEDCU-CeuUM5oL.js +0 -1
- package/payload/server/public/assets/treemap-W4RFUUIX-C--fAaJv.js +0 -1
- package/payload/server/public/assets/useCopyFeedback-CpfVOO26.js +0 -1
- package/payload/server/public/assets/useSubAccountSwitcher-Bo7bnFtC.js +0 -9
- package/payload/server/public/assets/wardley-RL74JXVD-4WPJ2UA9.js +0 -1
- /package/payload/server/public/assets/{_baseFor-Q4DeIqQC.js → _baseFor-D3BqAOBr.js} +0 -0
- /package/payload/server/public/assets/{array-WaOTgZu7.js → array-iYP9fzJp.js} +0 -0
- /package/payload/server/public/assets/{cytoscape.esm-CMmjo4hO.js → cytoscape.esm-BQSBzPsB.js} +0 -0
- /package/payload/server/public/assets/{defaultLocale-BxqJVxq5.js → defaultLocale-BrdA1gDi.js} +0 -0
- /package/payload/server/public/assets/{dist-Dx-cpU53.js → dist-Cvgxm7qv.js} +0 -0
- /package/payload/server/public/assets/{init-DX7c5Edh.js → init-Bx0S6pkp.js} +0 -0
- /package/payload/server/public/assets/{katex-B2dtGfSp.js → katex-BsiH_a6d.js} +0 -0
- /package/payload/server/public/assets/{path-CnSyroar.js → path-BLSgTy3w.js} +0 -0
- /package/payload/server/public/assets/{preload-helper-DqboRNgS.js → preload-helper-ClBMtM1g.js} +0 -0
- /package/payload/server/public/assets/{rough.esm-eLccZ4OJ.js → rough.esm-BMOtDaaS.js} +0 -0
- /package/payload/server/public/assets/{src-Dqs1wlnb.js → src-DV4LKv2E.js} +0 -0
|
@@ -48,7 +48,11 @@ function appendUsersAuditLine(audit, fields) {
|
|
|
48
48
|
// userIds are uuids (shortened to id8); sentinels (boot|install|onboarding|
|
|
49
49
|
// unknown) carry no dash and are written whole so attribution stays readable.
|
|
50
50
|
const actor = audit.actor.includes("-") ? id8(audit.actor) : audit.actor;
|
|
51
|
-
const
|
|
51
|
+
const targetFields = audit.target !== undefined
|
|
52
|
+
? ` target=${audit.target.includes("-") ? id8(audit.target) : audit.target}` +
|
|
53
|
+
` explicitUserId=${audit.explicitUserId ? "true" : "false"}`
|
|
54
|
+
: "";
|
|
55
|
+
const line = `[users-audit] action=${fields.action} actor=${actor}${targetFields}${sess} ` +
|
|
52
56
|
`field=${fields.field} rowsBefore=${fields.rowsBefore} rowsAfter=${fields.rowsAfter} ` +
|
|
53
57
|
`ts=${new Date().toISOString()}\n`;
|
|
54
58
|
try {
|
|
@@ -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,CAAC,CAAC,EAAE,CAAC,CAAC,WAAW,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC;IAC3H,CAAC;IACD,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,GAAG,gCAAgC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;IAC5E,OAAO;QACL,WAAW,EAAE,CAAC,CAAC,WAAW;QAC1B,mBAAmB,EAAE,CAAC,CAAC,mBAAmB;QAC1C,mBAAmB,EAAE,CAAC,CAAC,mBAAmB;KAC3C,CAAC;AACJ,CAAC"}
|
|
@@ -41,6 +41,14 @@ export interface AuditContext {
|
|
|
41
41
|
actor: string;
|
|
42
42
|
session?: string;
|
|
43
43
|
logFile: string;
|
|
44
|
+
/** Task 1573 — the row being written, recorded on every credential write so
|
|
45
|
+
* `actor != target` is the standing cross-identity signature. Omitted =>
|
|
46
|
+
* the line carries no target field (a self write not routed through the
|
|
47
|
+
* identity-resolving tools). */
|
|
48
|
+
target?: string;
|
|
49
|
+
/** Task 1573 — true when the caller passed an explicit `userId` (a deliberate
|
|
50
|
+
* cross-identity or self write); false/absent for an implicit self write. */
|
|
51
|
+
explicitUserId?: boolean;
|
|
44
52
|
}
|
|
45
53
|
|
|
46
54
|
/** First 8 chars — the short-id convention used across the auth logs. */
|
|
@@ -68,8 +76,13 @@ function appendUsersAuditLine(
|
|
|
68
76
|
// userIds are uuids (shortened to id8); sentinels (boot|install|onboarding|
|
|
69
77
|
// unknown) carry no dash and are written whole so attribution stays readable.
|
|
70
78
|
const actor = audit.actor.includes("-") ? id8(audit.actor) : audit.actor;
|
|
79
|
+
const targetFields =
|
|
80
|
+
audit.target !== undefined
|
|
81
|
+
? ` target=${audit.target.includes("-") ? id8(audit.target) : audit.target}` +
|
|
82
|
+
` explicitUserId=${audit.explicitUserId ? "true" : "false"}`
|
|
83
|
+
: "";
|
|
71
84
|
const line =
|
|
72
|
-
`[users-audit] action=${fields.action} actor=${actor}${sess} ` +
|
|
85
|
+
`[users-audit] action=${fields.action} actor=${actor}${targetFields}${sess} ` +
|
|
73
86
|
`field=${fields.field} rowsBefore=${fields.rowsBefore} rowsAfter=${fields.rowsAfter} ` +
|
|
74
87
|
`ts=${new Date().toISOString()}\n`;
|
|
75
88
|
try {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "admin",
|
|
3
|
-
"description": "Platform administration plugin. Provides system-status, public-hostname (deterministic Cloudflare public-URL resolver, single call returning the operator's canonical hostname so agents never guess property names on :CloudflareHostname nodes), admin-hostname (the admin-host twin of public-hostname — resolves the host that serves /calendar and the rest of the admin shell behind sign-in from the same ingress + alias + operator files, so agents point the operator at the admin /calendar URL instead of the public host that 404s it), publish-site (move an extracted static-site tree under <accountDir>/sites/<slug>/, emit one canonical path slug, and refresh llms.txt at the site root — typed refusal taxonomy replaces the prior skill-prose contract), brand-settings, account-manage, capabilities-here (deterministic install-introspection — returns enabledPlugins, tier, models, installed platform + premium specialists, registered Claude Code agent types, and the brand block as a single JSON object; the canonical tool for grounding any claim about what is enabled on the current account), account-update, the multi-account managed-service lifecycle tools (account_list, account_create, account_delete, account_purge, account_channel_routing, account_channel_routing_set — one Rubytech operator hosting N client accounts on one house install; create/delete/purge are operator-only and purge is two-step with a typed confirmation; account_create requires a managing house admin (its userId) and refuses without one, recording it as the sub-account's managingAdminUserId; account_reassign_admin repoints a client sub-account's managing admin to another live house admin (the repair path for a dangling managingAdminUserId); account_channel_routing_set repoints the install's single WhatsApp/Telegram inbound stream to a different sub-account), admin-add, admin-remove (refuses to remove a house admin who still manages one or more client sub-accounts, naming them so the operator reassigns each with account_reassign_admin first — never silently orphans them), admin-list, admin-update-pin, agent-list, agent-config-read, logs-read, plugin-read, skill-load (one-call resolve+read for SKILL.md by skill name, the canonical primitive for loading a named skill; plugin-read remains the reader for references/* and PLUGIN.md), skill-search (free-text intent → skill resolver: ranks every plugin skill's SKILL.md name+description against a query and returns the top owners with their canonical skills/<slug>/ path, so intent→skill mapping survives the available-skills menu leaving context after a compaction), store-skill (deterministic write counterpart to plugin-read; persists operator-authored skills as plugin files under the active account), session-reset, session-resume, wifi, and action-approval tools (action-pending, action-approve, action-reject, action-edit) for managing the Maxy platform.",
|
|
3
|
+
"description": "Platform administration plugin. Provides system-status, public-hostname (deterministic Cloudflare public-URL resolver, single call returning the operator's canonical hostname so agents never guess property names on :CloudflareHostname nodes), admin-hostname (the admin-host twin of public-hostname — resolves the host that serves /calendar and the rest of the admin shell behind sign-in from the same ingress + alias + operator files, so agents point the operator at the admin /calendar URL instead of the public host that 404s it), publish-site (move an extracted static-site tree under <accountDir>/sites/<slug>/, emit one canonical path slug, and refresh llms.txt at the site root — typed refusal taxonomy replaces the prior skill-prose contract), brand-settings, account-manage, capabilities-here (deterministic install-introspection — returns enabledPlugins, tier, models, installed platform + premium specialists, registered Claude Code agent types, and the brand block as a single JSON object; the canonical tool for grounding any claim about what is enabled on the current account), account-update, the multi-account managed-service lifecycle tools (account_list, account_create, account_delete, account_purge, account_channel_routing, account_channel_routing_set — one Rubytech operator hosting N client accounts on one house install; create/delete/purge are operator-only and purge is two-step with a typed confirmation; account_create requires a managing house admin (its userId) and refuses without one, recording it as the sub-account's managingAdminUserId, and also requires the client business owner's real name (ownerName), refusing a blank or the placeholder \"Owner\" and seeding it onto the sub-account's owner AdminUser and owner Person; account_reassign_admin repoints a client sub-account's managing admin to another live house admin (the repair path for a dangling managingAdminUserId); account_channel_routing_set repoints the install's single WhatsApp/Telegram inbound stream to a different sub-account), admin-add (refuses on a client sub-account, where admin access is already install-wide so a per-operator seat grants nothing — the sub-account's one identity, its business owner, is set at account creation; the house account, where operators hold PIN logins and admins[] rows, is unchanged), admin-remove (refuses to remove a house admin who still manages one or more client sub-accounts, naming them so the operator reassigns each with account_reassign_admin first — never silently orphans them), admin-list, admin-update-pin, agent-list, agent-config-read, logs-read, plugin-read, skill-load (one-call resolve+read for SKILL.md by skill name, the canonical primitive for loading a named skill; plugin-read remains the reader for references/* and PLUGIN.md), skill-search (free-text intent → skill resolver: ranks every plugin skill's SKILL.md name+description against a query and returns the top owners with their canonical skills/<slug>/ path, so intent→skill mapping survives the available-skills menu leaving context after a compaction), store-skill (deterministic write counterpart to plugin-read; persists operator-authored skills as plugin files under the active account), session-reset, session-resume, wifi, and action-approval tools (action-pending, action-approve, action-reject, action-edit) for managing the Maxy platform.",
|
|
4
4
|
"version": "0.1.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Rubytech LLC"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: admin
|
|
3
3
|
surface: platform
|
|
4
|
-
description: "Platform administration plugin. Provides system-status, public-hostname (deterministic Cloudflare public-URL resolver, single call returning the operator's canonical hostname so agents never guess property names on :CloudflareHostname nodes), admin-hostname (the admin-host twin of public-hostname — resolves the host that serves /calendar and the rest of the admin shell behind sign-in from the same ingress + alias + operator files, so agents point the operator at the admin /calendar URL instead of the public host that 404s it), publish-site (move an extracted static-site tree under <accountDir>/sites/<slug>/, emit one canonical path slug, and refresh llms.txt at the site root — typed refusal taxonomy replaces the prior skill-prose contract), brand-settings, account-manage, capabilities-here (deterministic install-introspection — returns enabledPlugins, tier, models, installed platform + premium specialists, registered Claude Code agent types, and the brand block as a single JSON object; the canonical tool for grounding any claim about what is enabled on the current account), account-update, the multi-account managed-service lifecycle tools (account_list, account_create, account_delete, account_purge, account_channel_routing, account_channel_routing_set — one Rubytech operator hosting N client accounts on one house install; create/delete/purge are operator-only and purge is two-step with a typed confirmation; account_create requires a managing house admin (its userId) and refuses without one, recording it as the sub-account's managingAdminUserId; account_reassign_admin repoints a client sub-account's managing admin to another live house admin (the repair path for a dangling managingAdminUserId); account_channel_routing_set repoints the install's single WhatsApp/Telegram inbound stream to a different sub-account), admin-add, admin-remove (refuses to remove a house admin who still manages one or more client sub-accounts, naming them so the operator reassigns each with account_reassign_admin first — never silently orphans them), admin-list, admin-update-pin, agent-list, agent-config-read, logs-read, plugin-read, skill-load (one-call resolve+read for SKILL.md by skill name, the canonical primitive for loading a named skill; plugin-read remains the reader for references/* and PLUGIN.md), skill-search (free-text intent → skill resolver: ranks every plugin skill's SKILL.md name+description against a query and returns the top owners with their canonical skills/<slug>/ path, so intent→skill mapping survives the available-skills menu leaving context after a compaction), store-skill (deterministic write counterpart to plugin-read; persists operator-authored skills as plugin files under the active account), session-reset, session-resume, wifi, and action-approval tools (action-pending, action-approve, action-reject, action-edit) for managing the Maxy platform."
|
|
4
|
+
description: "Platform administration plugin. Provides system-status, public-hostname (deterministic Cloudflare public-URL resolver, single call returning the operator's canonical hostname so agents never guess property names on :CloudflareHostname nodes), admin-hostname (the admin-host twin of public-hostname — resolves the host that serves /calendar and the rest of the admin shell behind sign-in from the same ingress + alias + operator files, so agents point the operator at the admin /calendar URL instead of the public host that 404s it), publish-site (move an extracted static-site tree under <accountDir>/sites/<slug>/, emit one canonical path slug, and refresh llms.txt at the site root — typed refusal taxonomy replaces the prior skill-prose contract), brand-settings, account-manage, capabilities-here (deterministic install-introspection — returns enabledPlugins, tier, models, installed platform + premium specialists, registered Claude Code agent types, and the brand block as a single JSON object; the canonical tool for grounding any claim about what is enabled on the current account), account-update, the multi-account managed-service lifecycle tools (account_list, account_create, account_delete, account_purge, account_channel_routing, account_channel_routing_set — one Rubytech operator hosting N client accounts on one house install; create/delete/purge are operator-only and purge is two-step with a typed confirmation; account_create requires a managing house admin (its userId) and refuses without one, recording it as the sub-account's managingAdminUserId, and also requires the client business owner's real name (ownerName), refusing a blank or the placeholder "Owner" and seeding it onto the sub-account's owner AdminUser and owner Person; account_reassign_admin repoints a client sub-account's managing admin to another live house admin (the repair path for a dangling managingAdminUserId); account_channel_routing_set repoints the install's single WhatsApp/Telegram inbound stream to a different sub-account), admin-add (refuses on a client sub-account, where admin access is already install-wide so a per-operator seat grants nothing — the sub-account's one identity, its business owner, is set at account creation; the house account, where operators hold PIN logins and admins[] rows, is unchanged), admin-remove (refuses to remove a house admin who still manages one or more client sub-accounts, naming them so the operator reassigns each with account_reassign_admin first — never silently orphans them), admin-list, admin-update-pin, agent-list, agent-config-read, logs-read, plugin-read, skill-load (one-call resolve+read for SKILL.md by skill name, the canonical primitive for loading a named skill; plugin-read remains the reader for references/* and PLUGIN.md), skill-search (free-text intent → skill resolver: ranks every plugin skill's SKILL.md name+description against a query and returns the top owners with their canonical skills/<slug>/ path, so intent→skill mapping survives the available-skills menu leaving context after a compaction), store-skill (deterministic write counterpart to plugin-read; persists operator-authored skills as plugin files under the active account), session-reset, session-resume, wifi, and action-approval tools (action-pending, action-approve, action-reject, action-edit) for managing the Maxy platform."
|
|
5
5
|
tools:
|
|
6
6
|
- name: system-status
|
|
7
7
|
publicAllowlist: false
|
|
@@ -133,7 +133,9 @@ Tools are available via the `admin` MCP server.
|
|
|
133
133
|
|
|
134
134
|
**Admin-seat authoring-skill gate.** `skill-load` and `plugin-read` refuse to return the body of a content-producer-owned authoring skill — `professional-document`, `a4-print-documents`, `publish-site` — when the caller is the admin seat (`MAXY_SESSION_ROLE=admin` with no `MAXY_SPECIALIST`). The refusal relays one line — "This deliverable is owned by content-producer. Dispatch it with the Agent tool and subagent_type content-producer." — so the admin's next action is the dispatch, not inline authoring. `plugin-read` extracts the skill slug from a `skills/<slug>/…` file path (or a slug buried in `pluginName`), so the raw-SKILL.md read path can't bypass the gate; `PLUGIN.md` and plain `references/*` reads are untouched. content-producer's own spawns carry `MAXY_SPECIALIST=content-producer` and resolve these skills normally (it reaches them via the native `Skill` tool regardless), and the public seat is out of scope. The gate is a pure name+env check before any filesystem read and fails open for any non-admin or unidentified seat — it never bricks a legitimate load. Each block emits `[admin-skill-gate] role=admin skill=<name> decision=block reason=content-producer-owned`. This is the enforcement layer; the IDENTITY.md delegation paragraph documents the intent but is not the gate ([[feedback_deterministic_means_remove_llm]], [[feedback_doctrine_paragraph_is_not_a_gate]]). Skills the admin invokes directly are deliberately excluded: `unzip-attachment` (its SKILL.md says "Invoked by the admin agent directly — admin owns all unzipping", then routes the extracted tree to a specialist) and `deck-pages` (admin-owned, a content-producer refusal target). The set is each skill's own SKILL.md "Invoked by" declaration, not the admin plugin's skill catalogue (which lists these admin-hosted skills for discovery — the catalogue is the inline path this gate closes).
|
|
135
135
|
|
|
136
|
-
**
|
|
136
|
+
**Client sub-accounts carry one owner identity, no operator seats.** Since admin access is install-wide (`canAccessAdmin` never reads `admins[]`), so `admin-add` on a `role:'client'` sub-account refuses before any store write and logs `[admin-add] op=refused-on-client reason=install-wide-access-no-seat account=<id8>`; only the house account seats admins. A standing session-manager audit (`redundant-operator-seat-audit.ts`) flags any pre-fix non-owner `AdminUser` on a client account with `[identity-audit] op=redundant-operator-seat`; removal of a flagged seat is a deliberate remediation, never automatic. See `.docs/admin-identity-surface.md`.
|
|
137
|
+
|
|
138
|
+
**Three-store admin auth invariant.** `admin-add` (on the house account) writes to all three identity stores (`users.json` PIN auth at the persistent `~/{configDir}/users.json` location , `account.json` `admins[]` role, Neo4j `:AdminUser`/`:Person` graph identity) with per-leg `[admin-auth-store]` log lines plus the `[admins-write]` chokepoint line, and returns `is_error: true` on any leg failure naming what's already written. `admin-update-pin` writes `users.json` only and emits the same `[admin-auth-store]` line. **Single chokepoint:** every `users.json` + `account.json admins[]` mutation routes through `platform/lib/admins-write` (`writeAdminEntry` for admin-add/set-pin, `removeAdminFromAccount` for admin-remove); the static check `grep -rnE 'admins\.push\|config\.admins\s*=' platform/ \| grep -v lib/admins-write` returns 0. Direct `Edit`/`Write` on `account.json` is forbidden by IDENTITY.md doctrine — mutations go through `account-update`, `plugin-toggle-enabled`, or the `admin-*` tools. **Install + boot invariants:** the installer and admin-server boot walk every account.json admins[] vs users.json; `[install-invariant]` / `[admin-invariant] direction=… userId=<id8> source=<file>` fires per divergence with a `check complete divergences=<n>` summary. Log-only — does not block. See `.docs/agents.md` § "Three-store admin auth invariant" for the full contract.
|
|
137
139
|
|
|
138
140
|
**Credential audit trail (append-only).** Every write to the credential stores emits one canonical `[users-audit] action=<set-access|clear-access|add|remove|set-pin|migrate> actor=<id8|onboarding|install|boot|unknown> [session=<id8>] field=<accessHash|pin|row> rowsBefore=<id8,…> rowsAfter=<id8,…> ts=<iso>` line to `~/{configDir}/logs/users-audit.log` — a dedicated file, distinct from `server.log`, so a credential mutation is greppable in isolation. The line is emitted at the writer chokepoint (`admin-access-password` for accessHash set/clear/migrate, `admins-write` `writeAdminEntry`/`removeAdminFromAccount` for row/pin/role) so every caller is covered; the one direct users.json writer that does not route through `writeAdminEntry` — `admin-update-pin` — emits the same line via the exported `logUsersAudit`. A write that changes no field (a clear with no hash, a migrate noop, an absent-admin remove) emits nothing. Credential-mutating MCP tools add `session=<id8>` from `SESSION_NODE_ID` so a mutation traces to its agent session even when the transcript is gone.
|
|
139
141
|
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type CredentialTargetResult = {
|
|
2
|
+
ok: true;
|
|
3
|
+
target: string;
|
|
4
|
+
isCrossIdentity: boolean;
|
|
5
|
+
} | {
|
|
6
|
+
ok: false;
|
|
7
|
+
error: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Resolve which admin row a credential tool may write.
|
|
11
|
+
*
|
|
12
|
+
* - No explicit `userId`: writes the verified caller's own row. If there is no
|
|
13
|
+
* verified caller identity, the call ERRORS (never a silent ambient fallback).
|
|
14
|
+
* - Explicit `userId` equal to the caller: a self write, no confirm needed.
|
|
15
|
+
* - Explicit `userId` differing from the caller (or with no caller to compare):
|
|
16
|
+
* a cross-identity write, allowed only with `confirm === true`.
|
|
17
|
+
*/
|
|
18
|
+
export declare function resolveCredentialTarget(input: {
|
|
19
|
+
explicitUserId?: string;
|
|
20
|
+
callerUserId?: string;
|
|
21
|
+
confirm?: boolean;
|
|
22
|
+
}): CredentialTargetResult;
|
|
23
|
+
//# sourceMappingURL=credential-identity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-identity.d.ts","sourceRoot":"","sources":["../src/credential-identity.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,sBAAsB,GAC9B;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,eAAe,EAAE,OAAO,CAAA;CAAE,GACtD;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAEhC;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE;IAC7C,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,GAAG,sBAAsB,CAkBzB"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Task 1573 — the verified-target resolver for the admin credential tools
|
|
2
|
+
// (remote-auth-set-password, admin-update-pin, remote-auth-revoke-password).
|
|
3
|
+
// It replaces the old `userId ?? process.env.USER_ID` fallback that let a
|
|
4
|
+
// no-userId call silently rewrite whatever ambient USER_ID the MCP inherited
|
|
5
|
+
// (the install owner, when the rc-spawn env leaked it). Pure and unit-tested;
|
|
6
|
+
// the tools read process.env.USER_ID (empty -> undefined) and pass it as
|
|
7
|
+
// callerUserId.
|
|
8
|
+
/**
|
|
9
|
+
* Resolve which admin row a credential tool may write.
|
|
10
|
+
*
|
|
11
|
+
* - No explicit `userId`: writes the verified caller's own row. If there is no
|
|
12
|
+
* verified caller identity, the call ERRORS (never a silent ambient fallback).
|
|
13
|
+
* - Explicit `userId` equal to the caller: a self write, no confirm needed.
|
|
14
|
+
* - Explicit `userId` differing from the caller (or with no caller to compare):
|
|
15
|
+
* a cross-identity write, allowed only with `confirm === true`.
|
|
16
|
+
*/
|
|
17
|
+
export function resolveCredentialTarget(input) {
|
|
18
|
+
const { explicitUserId, callerUserId, confirm } = input;
|
|
19
|
+
const target = explicitUserId ?? callerUserId;
|
|
20
|
+
if (!target) {
|
|
21
|
+
return {
|
|
22
|
+
ok: false,
|
|
23
|
+
error: 'no verified admin identity: this session has no authenticated admin; pass an explicit userId to act on a specific admin.',
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
const isCrossIdentity = explicitUserId !== undefined && explicitUserId !== callerUserId;
|
|
27
|
+
if (isCrossIdentity && confirm !== true) {
|
|
28
|
+
return {
|
|
29
|
+
ok: false,
|
|
30
|
+
error: `cross-identity write requires confirm=true: this would change userId ${target}, not your own credential.`,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
return { ok: true, target, isCrossIdentity };
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=credential-identity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-identity.js","sourceRoot":"","sources":["../src/credential-identity.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,6EAA6E;AAC7E,0EAA0E;AAC1E,6EAA6E;AAC7E,8EAA8E;AAC9E,yEAAyE;AACzE,gBAAgB;AAMhB;;;;;;;;GAQG;AACH,MAAM,UAAU,uBAAuB,CAAC,KAIvC;IACC,MAAM,EAAE,cAAc,EAAE,YAAY,EAAE,OAAO,EAAE,GAAG,KAAK,CAAA;IACvD,MAAM,MAAM,GAAG,cAAc,IAAI,YAAY,CAAA;IAC7C,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO;YACL,EAAE,EAAE,KAAK;YACT,KAAK,EACH,0HAA0H;SAC7H,CAAA;IACH,CAAC;IACD,MAAM,eAAe,GAAG,cAAc,KAAK,SAAS,IAAI,cAAc,KAAK,YAAY,CAAA;IACvF,IAAI,eAAe,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QACxC,OAAO;YACL,EAAE,EAAE,KAAK;YACT,KAAK,EAAE,wEAAwE,MAAM,4BAA4B;SAClH,CAAA;IACH,CAAC;IACD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,eAAe,EAAE,CAAA;AAC9C,CAAC"}
|
|
@@ -10,6 +10,7 @@ import { execFile, execFileSync } from "node:child_process";
|
|
|
10
10
|
import { appendFileSync, cpSync, existsSync, mkdirSync, readdirSync, readFileSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
11
11
|
import { writeAdminEntry, removeAdminFromAccount, logUsersAudit, formatAuditRowIds } from "../../../../lib/admins-write/dist/index.js";
|
|
12
12
|
import { setAccessPassword as setAccessPasswordHash, clearAccessPassword as clearAccessPasswordHash, accessPasswordCollides } from "../../../../lib/admin-access-password/dist/index.js";
|
|
13
|
+
import { resolveCredentialTarget } from "./credential-identity.js";
|
|
13
14
|
import { embed } from "../../../../lib/embed-client/dist/index.js";
|
|
14
15
|
import { requirePortEnv } from "../../../../lib/require-port-env/dist/index.js";
|
|
15
16
|
import { deviceUrlBlock } from "../../../../lib/device-url/dist/index.js";
|
|
@@ -27,7 +28,7 @@ import { publishSite } from "./tools/publish-site.js";
|
|
|
27
28
|
import { resolveCapabilitiesHere } from "./tools/capabilities-here.js";
|
|
28
29
|
import { runCatalogueCensus } from "./lib/catalogue-census.js";
|
|
29
30
|
import { lifelineTool } from "../../../../lib/mcp-lifeline/dist/index.js";
|
|
30
|
-
import { listAccountsFromDir, isHouseAccount, archiveAccountDir, provisionClientAccount, findHouseAccount, getChannelRoutingAccountId, setChannelRoutingAccountId, seedAccountGraphRoot, readHouseAdminUserIds, setManagingAdmin, findClientAccountsManagedBy, reassignManagingAdmin, ACCOUNT_NODE_COUNT_CYPHER, ACCOUNT_PURGE_CYPHER, } from "./tools/account-lifecycle.js";
|
|
31
|
+
import { listAccountsFromDir, isHouseAccount, archiveAccountDir, provisionClientAccount, findHouseAccount, getChannelRoutingAccountId, setChannelRoutingAccountId, seedAccountGraphRoot, isPlaceholderOwnerName, refuseClientAdminAdd, readHouseAdminUserIds, setManagingAdmin, findClientAccountsManagedBy, reassignManagingAdmin, ACCOUNT_NODE_COUNT_CYPHER, ACCOUNT_PURGE_CYPHER, } from "./tools/account-lifecycle.js";
|
|
31
32
|
function refusalGuidance(kind) {
|
|
32
33
|
switch (kind) {
|
|
33
34
|
case "unsafe-slug":
|
|
@@ -53,6 +54,15 @@ const PLATFORM_ROOT = process.env.PLATFORM_ROOT ?? resolve(import.meta.dirname,
|
|
|
53
54
|
// isolation in metadata-only mode.
|
|
54
55
|
const ACCOUNT_ID = process.env.ACCOUNT_ID ?? null;
|
|
55
56
|
process.stderr.write(`[admin] boot accountId=${ACCOUNT_ID ?? "null"}\n`);
|
|
57
|
+
/** Task 1573 — the verified caller identity for credential tools: the session's
|
|
58
|
+
* authenticated admin, carried as process.env.USER_ID, with empty treated as
|
|
59
|
+
* "no verified identity". Post Task 1573 the rc-spawn env stamps this from the
|
|
60
|
+
* authenticated admin (or empty), never the install owner via fallback, so a
|
|
61
|
+
* credential tool can trust it as the operating identity. */
|
|
62
|
+
function verifiedCaller() {
|
|
63
|
+
const u = process.env.USER_ID;
|
|
64
|
+
return u && u.length > 0 ? u : undefined;
|
|
65
|
+
}
|
|
56
66
|
function refuseNoAccount(toolName) {
|
|
57
67
|
process.stderr.write(`[admin] tool=${toolName} refuse reason=no-account-context\n`);
|
|
58
68
|
return {
|
|
@@ -866,8 +876,20 @@ eagerTool(server, "admin-add", "Add a new admin user to this account. Creates a
|
|
|
866
876
|
if (!ACCOUNT_ID)
|
|
867
877
|
return refuseNoAccount("admin-add");
|
|
868
878
|
const TAG = "[admin]";
|
|
869
|
-
|
|
870
|
-
|
|
879
|
+
// Task 1568 — a client sub-account carries one owner identity and no operator
|
|
880
|
+
// seats. Since Task 999 admin access is install-wide, so a seat here grants
|
|
881
|
+
// nothing (canAccessAdmin never reads admins[]). Refuse before any store
|
|
882
|
+
// write; the house account is where operators hold PIN logins and admins[].
|
|
883
|
+
const clientRefusal = refuseClientAdminAdd(isHouseAccount(ACCOUNTS_ROOT, ACCOUNT_ID), ACCOUNT_ID);
|
|
884
|
+
if (clientRefusal) {
|
|
885
|
+
process.stderr.write(`${clientRefusal.logLine}\n`);
|
|
886
|
+
return { content: [{ type: "text", text: `${TAG} ${clientRefusal.message}` }], isError: true };
|
|
887
|
+
}
|
|
888
|
+
// Task 1567 — the same name-required invariant as the owner-seat seeds: a
|
|
889
|
+
// blank name or the literal "Owner" placeholder is refused, never persisted.
|
|
890
|
+
if (isPlaceholderOwnerName(name)) {
|
|
891
|
+
process.stderr.write(`[admin-add] op=refused reason=no-name\n`);
|
|
892
|
+
return { content: [{ type: "text", text: `${TAG} A real name is required (it cannot be blank or the placeholder "Owner").` }], isError: true };
|
|
871
893
|
}
|
|
872
894
|
let users;
|
|
873
895
|
try {
|
|
@@ -896,7 +918,7 @@ eagerTool(server, "admin-add", "Add a new admin user to this account. Creates a
|
|
|
896
918
|
return { content: [{ type: "text", text: `${TAG} Unable to verify admin limit — cannot add admin.` }], isError: true };
|
|
897
919
|
}
|
|
898
920
|
// Resolve the calling user's identity from the session environment
|
|
899
|
-
const callerUserId =
|
|
921
|
+
const callerUserId = verifiedCaller(); // Task 1573 — empty USER_ID -> "unknown" actor, not ''
|
|
900
922
|
// PIN: use provided or generate. Constraint: minimum 4 digits, no upper bound.
|
|
901
923
|
let plaintextPin;
|
|
902
924
|
if (rawPin) {
|
|
@@ -985,10 +1007,8 @@ eagerTool(server, "admin-add", "Add a new admin user to this account. Creates a
|
|
|
985
1007
|
// pruned silently, costing the admin pin during onboarding.
|
|
986
1008
|
const result = await session.run(`MERGE (au:AdminUser {userId: $userId})
|
|
987
1009
|
ON CREATE SET au.accountId = $accountId,
|
|
988
|
-
au.name = $name,
|
|
989
1010
|
au.createdAt = $createdAt
|
|
990
1011
|
ON MATCH SET au.accountId = COALESCE(au.accountId, $accountId),
|
|
991
|
-
au.name = $name,
|
|
992
1012
|
au.updatedAt = $createdAt
|
|
993
1013
|
WITH au
|
|
994
1014
|
MATCH (b:LocalBusiness {accountId: $accountId})
|
|
@@ -1019,21 +1039,22 @@ eagerTool(server, "admin-add", "Add a new admin user to this account. Creates a
|
|
|
1019
1039
|
MERGE (au)-[:OWNS]->(newPerson)
|
|
1020
1040
|
RETURN false AS reused
|
|
1021
1041
|
}
|
|
1022
|
-
RETURN reused`, { userId,
|
|
1042
|
+
RETURN reused`, { userId, createdAt, accountId: ACCOUNT_ID, givenName, familyName, personEmbedding });
|
|
1023
1043
|
if (result.records.length > 0) {
|
|
1024
1044
|
personReused = result.records[0].get("reused");
|
|
1025
1045
|
}
|
|
1026
|
-
// post-write assertion
|
|
1027
|
-
//
|
|
1028
|
-
//
|
|
1029
|
-
//
|
|
1046
|
+
// Task 1570 — post-write assertion on the canonical invariants: the
|
|
1047
|
+
// AdminUser has its accountId, and an OWNS-Person in its own account with
|
|
1048
|
+
// a non-empty givenName (the sole name source). A Cypher regression that
|
|
1049
|
+
// drops the Person or its name is grep-detectable and loud-fails the tool.
|
|
1030
1050
|
const verify = await session.run(`MATCH (au:AdminUser {userId: $userId})
|
|
1051
|
+
OPTIONAL MATCH (au)-[:OWNS]->(p:Person) WHERE p.accountId = au.accountId
|
|
1031
1052
|
RETURN coalesce(au.accountId, '') AS accountId,
|
|
1032
|
-
coalesce(
|
|
1053
|
+
coalesce(p.givenName, '') AS givenName`, { userId });
|
|
1033
1054
|
const verifiedAccountId = verify.records[0]?.get("accountId") || "";
|
|
1034
|
-
const
|
|
1035
|
-
if (!verifiedAccountId || !
|
|
1036
|
-
throw new Error(`post-write assertion failed: AdminUser userId=${userIdShort} accountId=${verifiedAccountId || "(null)"}
|
|
1055
|
+
const verifiedGivenName = (verify.records[0]?.get("givenName") || "").trim();
|
|
1056
|
+
if (!verifiedAccountId || !verifiedGivenName) {
|
|
1057
|
+
throw new Error(`post-write assertion failed: AdminUser userId=${userIdShort} accountId=${verifiedAccountId || "(null)"} owned-Person givenName=${verifiedGivenName || "(null)"} — required fields missing after MERGE`);
|
|
1037
1058
|
}
|
|
1038
1059
|
}
|
|
1039
1060
|
finally {
|
|
@@ -1067,7 +1088,7 @@ eagerTool(server, "admin-remove", "Remove an admin from this account. Removes th
|
|
|
1067
1088
|
if (!ACCOUNT_ID)
|
|
1068
1089
|
return refuseNoAccount("admin-remove");
|
|
1069
1090
|
const TAG = "[admin]";
|
|
1070
|
-
const callerUserId =
|
|
1091
|
+
const callerUserId = verifiedCaller(); // Task 1573 — empty USER_ID -> "unknown" actor, not ''
|
|
1071
1092
|
// Read account.json and validate
|
|
1072
1093
|
let config;
|
|
1073
1094
|
let admins;
|
|
@@ -1096,17 +1117,22 @@ eagerTool(server, "admin-remove", "Remove an admin from this account. Removes th
|
|
|
1096
1117
|
return { content: [{ type: "text", text: `${TAG} Cannot remove ${userId}: they are the managing admin of ${managed.length} client sub-account(s): ${managed.join(", ")}. Reassign each to another house admin with account_reassign_admin, then retry.` }], isError: true };
|
|
1097
1118
|
}
|
|
1098
1119
|
}
|
|
1099
|
-
// Resolve the admin's name from
|
|
1100
|
-
//
|
|
1120
|
+
// Resolve the admin's name from the owned Person (Task 1570 — the canonical
|
|
1121
|
+
// and only name source, keyed on the AdminUser's own account) for the
|
|
1122
|
+
// confirmation message. Best-effort — fall back to userId if the graph is
|
|
1123
|
+
// unreachable or the owned Person is absent/nameless.
|
|
1101
1124
|
let removedName = userId;
|
|
1102
1125
|
try {
|
|
1103
1126
|
const session = getSession();
|
|
1104
1127
|
try {
|
|
1105
|
-
const result = await session.run(`MATCH (au:AdminUser {userId: $userId})
|
|
1128
|
+
const result = await session.run(`MATCH (au:AdminUser {userId: $userId})-[:OWNS]->(p:Person)
|
|
1129
|
+
WHERE p.accountId = au.accountId
|
|
1130
|
+
RETURN p.givenName AS givenName, p.familyName AS familyName LIMIT 1`, { userId });
|
|
1106
1131
|
if (result.records.length > 0) {
|
|
1107
|
-
const
|
|
1108
|
-
|
|
1109
|
-
|
|
1132
|
+
const givenName = result.records[0].get("givenName")?.trim() ?? "";
|
|
1133
|
+
const familyName = result.records[0].get("familyName")?.trim() ?? "";
|
|
1134
|
+
if (givenName)
|
|
1135
|
+
removedName = familyName ? `${givenName} ${familyName}` : givenName;
|
|
1110
1136
|
}
|
|
1111
1137
|
}
|
|
1112
1138
|
finally {
|
|
@@ -1166,20 +1192,23 @@ eagerTool(server, "admin-list", "List all admins for this account with their nam
|
|
|
1166
1192
|
if (admins.length === 0) {
|
|
1167
1193
|
return { content: [{ type: "text", text: `${TAG} No admins configured for this account.` }] };
|
|
1168
1194
|
}
|
|
1169
|
-
// Enrich with names from
|
|
1170
|
-
//
|
|
1195
|
+
// Enrich with names from each admin's owned Person (Task 1570 — the
|
|
1196
|
+
// canonical and only name source, keyed on the AdminUser's own account).
|
|
1197
|
+
// Best effort — render "(unknown)" for any userId with no named owned Person.
|
|
1171
1198
|
const userMap = new Map();
|
|
1172
1199
|
try {
|
|
1173
1200
|
const session = getSession();
|
|
1174
1201
|
try {
|
|
1175
1202
|
const result = await session.run(`UNWIND $userIds AS uid
|
|
1176
|
-
MATCH (au:AdminUser {userId: uid})
|
|
1177
|
-
|
|
1203
|
+
MATCH (au:AdminUser {userId: uid})-[:OWNS]->(p:Person)
|
|
1204
|
+
WHERE p.accountId = au.accountId
|
|
1205
|
+
RETURN uid AS userId, p.givenName AS givenName, p.familyName AS familyName`, { userIds: admins.map(a => a.userId) });
|
|
1178
1206
|
for (const record of result.records) {
|
|
1179
1207
|
const uid = record.get("userId");
|
|
1180
|
-
const
|
|
1181
|
-
|
|
1182
|
-
|
|
1208
|
+
const givenName = record.get("givenName")?.trim() ?? "";
|
|
1209
|
+
const familyName = record.get("familyName")?.trim() ?? "";
|
|
1210
|
+
if (givenName)
|
|
1211
|
+
userMap.set(uid, familyName ? `${givenName} ${familyName}` : givenName);
|
|
1183
1212
|
}
|
|
1184
1213
|
}
|
|
1185
1214
|
finally {
|
|
@@ -1198,17 +1227,21 @@ eagerTool(server, "admin-list", "List all admins for this account with their nam
|
|
|
1198
1227
|
eagerTool(server, "admin-update-pin", "Update an existing admin user's PIN. Defaults to the calling admin if no userId is given. PIN must be at least 4 digits and unique across all users on the device. PINs are device-level: updating another admin's PIN does not require shared account membership — any admin on the device can rotate any other admin's PIN, matching the existing trust model used by admin-remove.", {
|
|
1199
1228
|
userId: z.string().optional().describe("The userId of the admin whose PIN to update. Defaults to the caller (the admin invoking this tool)."),
|
|
1200
1229
|
newPin: z.string().describe("The new PIN. Minimum 4 digits, no upper bound."),
|
|
1201
|
-
|
|
1230
|
+
confirm: z.boolean().optional().describe("Required (true) only when userId names a DIFFERENT admin than the caller — confirms a deliberate cross-identity PIN change."),
|
|
1231
|
+
}, async ({ userId: targetUserId, newPin, confirm }) => {
|
|
1202
1232
|
if (!ACCOUNT_ID)
|
|
1203
1233
|
return refuseNoAccount("admin-update-pin");
|
|
1204
1234
|
const TAG = "[admin-update-pin]";
|
|
1205
|
-
const callerUserId =
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1235
|
+
const callerUserId = verifiedCaller();
|
|
1236
|
+
// Task 1573 — no ambient owner fallback. Self resolves to the verified
|
|
1237
|
+
// caller; a cross-identity write needs an explicit userId + confirm.
|
|
1238
|
+
const resolved = resolveCredentialTarget({ explicitUserId: targetUserId, callerUserId, confirm });
|
|
1239
|
+
if (!resolved.ok) {
|
|
1240
|
+
console.error(`${TAG} result=refused reason=${resolved.error.split(":")[0]}`);
|
|
1241
|
+
return { content: [{ type: "text", text: `${TAG} ${resolved.error}` }], isError: true };
|
|
1242
|
+
}
|
|
1243
|
+
const userId = resolved.target;
|
|
1244
|
+
const userIdLabel = userId.slice(0, 8);
|
|
1212
1245
|
if (newPin.length < 4) {
|
|
1213
1246
|
console.error(`${TAG} userId=${userIdLabel} result=too-short`);
|
|
1214
1247
|
return { content: [{ type: "text", text: `${TAG} PIN must be at least 4 digits.` }], isError: true };
|
|
@@ -1252,7 +1285,7 @@ eagerTool(server, "admin-update-pin", "Update an existing admin user's PIN. Defa
|
|
|
1252
1285
|
// (a pin rotation); the audited field is the pin.
|
|
1253
1286
|
{
|
|
1254
1287
|
const rows = formatAuditRowIds(users.map(u => u.userId));
|
|
1255
|
-
logUsersAudit({ actor: callerUserId ?? "unknown", session: process.env.SESSION_NODE_ID, logFile: USERS_AUDIT_LOG }, { action: "set-pin", field: "pin", rowsBefore: rows, rowsAfter: rows });
|
|
1288
|
+
logUsersAudit({ actor: callerUserId ?? "unknown", target: userId, explicitUserId: resolved.isCrossIdentity, session: process.env.SESSION_NODE_ID, logFile: USERS_AUDIT_LOG }, { action: "set-pin", field: "pin", rowsBefore: rows, rowsAfter: rows });
|
|
1256
1289
|
}
|
|
1257
1290
|
const self = userId === callerUserId;
|
|
1258
1291
|
return {
|
|
@@ -2113,13 +2146,18 @@ lifelineTool(server, "remote-auth-set-password", "Set an admin's remote access p
|
|
|
2113
2146
|
"Protects the admin interface when exposed over the tunnel — has no effect on the public endpoint or the tunnel itself.", {
|
|
2114
2147
|
password: z.string(),
|
|
2115
2148
|
userId: z.string().optional().describe("The admin to set the password for. Defaults to the calling admin. Use admin-list to find userIds."),
|
|
2116
|
-
|
|
2149
|
+
confirm: z.boolean().optional().describe("Required (true) only when userId names a DIFFERENT admin than the caller — confirms a deliberate cross-identity password change."),
|
|
2150
|
+
}, async ({ password, userId, confirm }) => {
|
|
2117
2151
|
if (!ACCOUNT_ID)
|
|
2118
2152
|
return refuseNoAccount("remote-auth-set-password");
|
|
2119
|
-
const
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
}
|
|
2153
|
+
const callerUserId = verifiedCaller();
|
|
2154
|
+
// Task 1573 — no ambient owner fallback. Self resolves to the verified
|
|
2155
|
+
// caller; a cross-identity write needs an explicit userId + confirm.
|
|
2156
|
+
const resolved = resolveCredentialTarget({ explicitUserId: userId, callerUserId, confirm });
|
|
2157
|
+
if (!resolved.ok) {
|
|
2158
|
+
return { content: [{ type: "text", text: resolved.error }], isError: true };
|
|
2159
|
+
}
|
|
2160
|
+
const targetUserId = resolved.target;
|
|
2123
2161
|
let users;
|
|
2124
2162
|
try {
|
|
2125
2163
|
users = readUsersJson();
|
|
@@ -2148,8 +2186,8 @@ lifelineTool(server, "remote-auth-set-password", "Set an admin's remote access p
|
|
|
2148
2186
|
return { content: [{ type: "text", text: `That password is already in use by another admin. Choose a different one.` }], isError: true };
|
|
2149
2187
|
}
|
|
2150
2188
|
try {
|
|
2151
|
-
await setAccessPasswordHash(targetUserId, password, USERS_FILE, { actor:
|
|
2152
|
-
console.error(`[admin] remote-access-password set userId=${targetUserId.slice(0, 8)}`);
|
|
2189
|
+
await setAccessPasswordHash(targetUserId, password, USERS_FILE, { actor: callerUserId ?? "unknown", target: targetUserId, explicitUserId: resolved.isCrossIdentity, session: process.env.SESSION_NODE_ID, logFile: USERS_AUDIT_LOG });
|
|
2190
|
+
console.error(`[admin] remote-access-password set userId=${targetUserId.slice(0, 8)} actor=${(callerUserId ?? "unknown").slice(0, 8)} explicitUserId=${resolved.isCrossIdentity}`);
|
|
2153
2191
|
return { content: [{ type: "text", text: `Remote access password set for userId ${targetUserId}.` }] };
|
|
2154
2192
|
}
|
|
2155
2193
|
catch (err) {
|
|
@@ -2160,9 +2198,17 @@ lifelineTool(server, "remote-auth-set-password", "Set an admin's remote access p
|
|
|
2160
2198
|
}
|
|
2161
2199
|
});
|
|
2162
2200
|
lifelineTool(server, "remote-auth-revoke-password", "Revoke an admin's remote access password so they can no longer obtain a NEW remote session (an already-open session lapses within 24h). " +
|
|
2163
|
-
"Does not affect any other admin's password and does not touch their PIN. Pass userId (from admin-list).", { userId: z.string().describe("The admin whose remote access password to revoke. Use admin-list to find userIds.")
|
|
2201
|
+
"Does not affect any other admin's password and does not touch their PIN. Pass userId (from admin-list).", { userId: z.string().describe("The admin whose remote access password to revoke. Use admin-list to find userIds."),
|
|
2202
|
+
confirm: z.boolean().optional().describe("Required (true) when userId names a DIFFERENT admin than the caller — confirms a deliberate cross-identity revoke.") }, async ({ userId, confirm }) => {
|
|
2164
2203
|
if (!ACCOUNT_ID)
|
|
2165
2204
|
return refuseNoAccount("remote-auth-revoke-password");
|
|
2205
|
+
const callerUserId = verifiedCaller();
|
|
2206
|
+
// Task 1573 — actor is the verified caller, never ambient env; a revoke of
|
|
2207
|
+
// another admin's password is a cross-identity write needing confirm.
|
|
2208
|
+
const resolved = resolveCredentialTarget({ explicitUserId: userId, callerUserId, confirm });
|
|
2209
|
+
if (!resolved.ok) {
|
|
2210
|
+
return { content: [{ type: "text", text: resolved.error }], isError: true };
|
|
2211
|
+
}
|
|
2166
2212
|
let users;
|
|
2167
2213
|
try {
|
|
2168
2214
|
users = readUsersJson();
|
|
@@ -2182,8 +2228,8 @@ lifelineTool(server, "remote-auth-revoke-password", "Revoke an admin's remote ac
|
|
|
2182
2228
|
return { content: [{ type: "text", text: "Refusing to revoke the last remaining remote access password — the install would have no remote access. Set another admin's password first." }], isError: true };
|
|
2183
2229
|
}
|
|
2184
2230
|
try {
|
|
2185
|
-
clearAccessPasswordHash(userId, USERS_FILE, { actor:
|
|
2186
|
-
console.error(`[admin] remote-access-password revoked userId=${userId.slice(0, 8)}`);
|
|
2231
|
+
clearAccessPasswordHash(userId, USERS_FILE, { actor: callerUserId ?? "unknown", target: userId, explicitUserId: resolved.isCrossIdentity, session: process.env.SESSION_NODE_ID, logFile: USERS_AUDIT_LOG });
|
|
2232
|
+
console.error(`[admin] remote-access-password revoked userId=${userId.slice(0, 8)} actor=${(callerUserId ?? "unknown").slice(0, 8)} explicitUserId=${resolved.isCrossIdentity}`);
|
|
2187
2233
|
return { content: [{ type: "text", text: `Remote access password revoked for userId ${userId}.` }] };
|
|
2188
2234
|
}
|
|
2189
2235
|
catch (err) {
|
|
@@ -3267,9 +3313,10 @@ eagerTool(server, "account_list", "List every sub-account on this install (one h
|
|
|
3267
3313
|
content: [{ type: "text", text: accounts.length ? lines.join("\n") : "No accounts found." }],
|
|
3268
3314
|
};
|
|
3269
3315
|
});
|
|
3270
|
-
eagerTool(server, "account_create", "Provision a new CLIENT sub-account on this install (managed service). REQUIRES
|
|
3316
|
+
eagerTool(server, "account_create", "Provision a new CLIENT sub-account on this install (managed service). REQUIRES two things: `adminUserId`, the userId of the house team member who will manage this client (get the choices from admin-list; ask the operator which one before creating); and `ownerName`, the real name of the client business's owner (ask the operator for it — never invent it or reuse the house operator's name). Mints a UUID, scaffolds the account directory (agents, specialists, settings, account.json with role:\"client\" and managingAdminUserId), seeds default plugins, and seeds the account's graph root (a :LocalBusiness plus its owner :AdminUser and owner :Person carrying ownerName) so you can populate it immediately. Refuses if adminUserId is missing/not a house admin, or if ownerName is missing/blank/the placeholder \"Owner\". Returns the new accountId. Operator-only; never creates the house sub-account (that is the install itself).", {
|
|
3271
3317
|
adminUserId: z.string().describe("The userId of the house admin who will manage this client sub-account. Must be a current house admin (see admin-list). Required — creation is refused without it."),
|
|
3272
|
-
|
|
3318
|
+
ownerName: z.string().describe("The real name of the client business's owner. Applied to both the owner AdminUser and owner Person for the new sub-account. Required — creation is refused when missing, blank, or the placeholder \"Owner\". Ask the operator; never reuse the house operator's name."),
|
|
3319
|
+
}, async ({ adminUserId, ownerName }) => {
|
|
3273
3320
|
if (!ACCOUNT_ID)
|
|
3274
3321
|
return refuseNoAccount("account_create");
|
|
3275
3322
|
// Task 1500 — every client sub-account must carry a responsible house admin.
|
|
@@ -3279,6 +3326,14 @@ eagerTool(server, "account_create", "Provision a new CLIENT sub-account on this
|
|
|
3279
3326
|
process.stderr.write(`[account-lifecycle] op=create-refused reason=no-admin adminUserId=-\n`);
|
|
3280
3327
|
return { content: [{ type: "text", text: `account_create refused: name the managing house admin (adminUserId). Call admin-list to see the choices and ask the operator which one manages this client.` }], isError: true };
|
|
3281
3328
|
}
|
|
3329
|
+
// Task 1567 — the business owner's name is a hard precondition of the
|
|
3330
|
+
// sub-account. Refuse before any scaffold so a nameless create leaves no
|
|
3331
|
+
// partial account directory or rootless graph behind. The same predicate
|
|
3332
|
+
// guards the seed (seedAccountGraphRoot) as a defence in depth.
|
|
3333
|
+
if (isPlaceholderOwnerName(ownerName)) {
|
|
3334
|
+
process.stderr.write(`[account-create] op=refused reason=no-owner-name\n`);
|
|
3335
|
+
return { content: [{ type: "text", text: `account_create refused: give the client business owner's real name (ownerName). It cannot be blank or the placeholder "Owner". Ask the operator whose business this is.` }], isError: true };
|
|
3336
|
+
}
|
|
3282
3337
|
const houseAdminUserIds = readHouseAdminUserIds(ACCOUNTS_ROOT);
|
|
3283
3338
|
if (!houseAdminUserIds.includes(adminUserId)) {
|
|
3284
3339
|
process.stderr.write(`[account-lifecycle] op=create-refused reason=unknown-admin adminUserId=${adminUserId.slice(0, 8)}\n`);
|
|
@@ -3305,13 +3360,11 @@ eagerTool(server, "account_create", "Provision a new CLIENT sub-account on this
|
|
|
3305
3360
|
// MERGE-keyed on its own userId at accountId=house, so reusing it would
|
|
3306
3361
|
// leave the client's account-scoped AdminUser MATCH empty.
|
|
3307
3362
|
const ownerUserId = randomUUID();
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
}
|
|
3314
|
-
catch { /* no users.json — default "Owner" */ }
|
|
3363
|
+
// Task 1567 — ownerName is the validated business-owner name from the tool
|
|
3364
|
+
// input (refused above if blank/placeholder). It is applied to both the
|
|
3365
|
+
// owner AdminUser and the owner Person in seedAccountGraphRoot. It is never
|
|
3366
|
+
// derived from the house operator's users.json — that seeded the wrong
|
|
3367
|
+
// person's name and defaulted to the "Owner" placeholder.
|
|
3315
3368
|
const seedSession = getSession();
|
|
3316
3369
|
let rootSeeded = false;
|
|
3317
3370
|
try {
|