@a-company/paradigm 5.10.0 → 5.21.0
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/accept-orchestration-IUAWQZUN.js +18 -0
- package/dist/add-P76GEMGF.js +8 -0
- package/dist/agent-UUTYOFTH.js +33 -0
- package/dist/agent-loader-EPXURMO7.js +2 -0
- package/dist/agent-loader-PYGPX6D2.js +2 -0
- package/dist/agent-state-KSQ3S7OB.js +2 -0
- package/dist/agents-suggest-HYTFMQD3.js +10 -0
- package/dist/aggregate-W66DM3GA.js +10 -0
- package/dist/ambient-HYZR42NX.js +35 -0
- package/dist/assess-UFPYEJKP.js +9 -0
- package/dist/auto-RHJXOZFL.js +14 -0
- package/dist/beacon-5QVYV5DF.js +13 -0
- package/dist/calibration-OLJYB5HN.js +7 -0
- package/dist/check-THVGY4R5.js +14 -0
- package/dist/chunk-22ISTMKI.js +31 -0
- package/dist/chunk-2QO33NYK.js +3 -0
- package/dist/chunk-33LKBMVK.js +134 -0
- package/dist/chunk-4QADCWPU.js +7 -0
- package/dist/chunk-4TXOVRWD.js +3 -0
- package/dist/chunk-4UJ4NIEQ.js +4 -0
- package/dist/chunk-4ZGGWZ32.js +3 -0
- package/dist/chunk-5TAVYPOV.js +2 -0
- package/dist/chunk-6EX37L4Q.js +8 -0
- package/dist/chunk-AD5TAD2A.js +5 -0
- package/dist/chunk-AGVAHVUA.js +2 -0
- package/dist/chunk-AO7ZSRME.js +13 -0
- package/dist/chunk-BFD3GFRK.js +2 -0
- package/dist/chunk-D34YFK4M.js +6 -0
- package/dist/chunk-DVZWCXB6.js +2 -0
- package/dist/chunk-EKZDFEJW.js +2 -0
- package/dist/chunk-ET5XJTSX.js +2 -0
- package/dist/chunk-FYDRENK7.js +3 -0
- package/dist/chunk-HMQ5BHP2.js +743 -0
- package/dist/chunk-HXKWL3VK.js +29 -0
- package/dist/chunk-IZSBGW6E.js +2 -0
- package/dist/chunk-J32OPJEX.js +2 -0
- package/dist/chunk-JBDMCRPP.js +7 -0
- package/dist/chunk-JIXHEBGK.js +7 -0
- package/dist/chunk-JNSJVCTU.js +2 -0
- package/dist/chunk-JQKKVAAN.js +2 -0
- package/dist/chunk-KLBH26PA.js +429 -0
- package/dist/chunk-L6K5HNDL.js +24 -0
- package/dist/chunk-LKAT7IAK.js +2 -0
- package/dist/chunk-M4UMM6DC.js +5 -0
- package/dist/chunk-NKYNHSA5.js +424 -0
- package/dist/chunk-NW6OKHE6.js +5 -0
- package/dist/chunk-NXRVR37G.js +60 -0
- package/dist/chunk-ODVKPZZ4.js +2 -0
- package/dist/chunk-PUBB7LIT.js +5 -0
- package/dist/chunk-Q2J542ST.js +2 -0
- package/dist/chunk-QGZRM6ZB.js +2 -0
- package/dist/chunk-QNZEG7IT.js +13 -0
- package/dist/chunk-QT2LKB3P.js +7 -0
- package/dist/chunk-RVRARWSY.js +9 -0
- package/dist/chunk-T6IDXUUA.js +2 -0
- package/dist/chunk-TYWB5IQJ.js +3 -0
- package/dist/chunk-UIKLE3WD.js +2 -0
- package/dist/chunk-V7K6CQVX.js +111 -0
- package/dist/chunk-VCKKJDLP.js +8 -0
- package/dist/chunk-VG7FN2TU.js +4 -0
- package/dist/chunk-W5IWDW4Y.js +16 -0
- package/dist/chunk-W7C6FFMO.js +8 -0
- package/dist/chunk-WESTEMIM.js +10 -0
- package/dist/chunk-WR6D3SC6.js +5 -0
- package/dist/chunk-WS2N27RX.js +3 -0
- package/dist/chunk-XMAV5AG6.js +2 -0
- package/dist/chunk-XROULIQN.js +2 -0
- package/dist/chunk-XUFYOXOU.js +3 -0
- package/dist/chunk-Y4XFVDZC.js +3 -0
- package/dist/chunk-Y6KXTQBG.js +2 -0
- package/dist/{chunk-GTR2TBIJ.js → chunk-Z2UZUCY6.js} +237 -1047
- package/dist/chunk-Z34K6GY2.js +8 -0
- package/dist/claude-4LR3LJQZ.js +13 -0
- package/dist/claude-cli-UP6HGH7C.js +6 -0
- package/dist/claude-code-RLJ4GX77.js +11 -0
- package/dist/claude-code-teams-R37HJY3Y.js +29 -0
- package/dist/commands-LMUD5L6R.js +455 -0
- package/dist/compliance-GZ7UAOG3.js +6 -0
- package/dist/conductor-Y5IXELTL.js +4 -0
- package/dist/config-schema-HR7LDEQ6.js +2 -0
- package/dist/constellation-CG7C4WFE.js +13 -0
- package/dist/context-audit-RSSRX6XC.js +6 -0
- package/dist/cost-IDNVMAEV.js +10 -0
- package/dist/cost-PK4KIF7R.js +2 -0
- package/dist/cursor-cli-QKF7Z6M2.js +4 -0
- package/dist/cursorrules-U5O4G5T4.js +14 -0
- package/dist/decision-loader-2XPZE4EZ.js +2 -0
- package/dist/delete-P5VULXR4.js +14 -0
- package/dist/diff-RTFUKJHF.js +9 -0
- package/dist/discipline-H7LDI6NT.js +2 -0
- package/dist/dist-3ZCH25SG.js +2 -0
- package/dist/dist-KGRCLBJP-2QAPFYNF.js +39 -0
- package/dist/dist-R3RWD35F.js +2 -0
- package/dist/dist-VGFSP3XM.js +2 -0
- package/dist/dist-VXCZWVVJ.js +2 -0
- package/dist/dist-W3XCATBJ.js +2 -0
- package/dist/docs-EDQ2STFK.js +2 -0
- package/dist/docs-RXPN6CK7.js +12 -0
- package/dist/doctor-2T2QL6VM.js +2 -0
- package/dist/drift-ILZE5BFJ.js +13 -0
- package/dist/echo-UPTQUEDU.js +46 -0
- package/dist/edit-GUU3HBVW.js +9 -0
- package/dist/event-Y3VXC2RV.js +3 -0
- package/dist/explain-files-3GPZUETV.js +4 -0
- package/dist/export-CV5KCTPS.js +2 -0
- package/dist/flow-S3RQ4YPY.js +11 -0
- package/dist/global-C44FW4G2.js +13 -0
- package/dist/graduate-3BBSC27A.js +5 -0
- package/dist/graph-CNDE5TAT.js +2 -0
- package/dist/graph-server-COZR5C3Z.js +14 -0
- package/dist/habits-4J2KRYUL.js +42 -0
- package/dist/history-UW454SDP.js +12 -0
- package/dist/hooks-XH52VGOU.js +2 -0
- package/dist/index.js +15 -1039
- package/dist/init-24MAQJFM.js +2 -0
- package/dist/integrity-UYDOOJDP.js +7 -0
- package/dist/integrity-checker-DHGMZQDG.js +2 -0
- package/dist/journal-loader-GLH7XFTK.js +2 -0
- package/dist/lint-IGKE6UPS.js +26 -0
- package/dist/list-5IUGP3ZB.js +7 -0
- package/dist/list-YKIQNKGB.js +6 -0
- package/dist/lore-loader-RVQI5GXL.js +2 -0
- package/dist/lore-loader-XY5MZRR2.js +2 -0
- package/dist/lore-server-FC2GMDLT.js +14 -0
- package/dist/manual-RXSPSFLL.js +20 -0
- package/dist/mcp.js +93 -20484
- package/dist/migrate-X5OMAFAQ.js +59 -0
- package/dist/migrate-assessments-GEI5WMI2.js +4 -0
- package/dist/model-discovery-HMB3YI4L.js +2 -0
- package/dist/nomination-engine-XF7TWPAP.js +2 -0
- package/dist/notebook-PE3JSYZI.js +11 -0
- package/dist/notebook-loader-CENTDDUJ.js +2 -0
- package/dist/orchestrate-35HBQ3O3.js +8 -0
- package/dist/peers-P2KXU7ZK.js +5 -0
- package/dist/persona-STQWZH5P.js +29 -0
- package/dist/pipeline-MZUITRVN.js +4 -0
- package/dist/platform-server-2KXHGHFV.js +25 -0
- package/dist/plugin-update-checker-M7PW434O.js +2 -0
- package/dist/portal-check-3JVNLOEP.js +8 -0
- package/dist/portal-compliance-2UG4VKWH.js +2 -0
- package/dist/probe-5L5BQDGE.js +6 -0
- package/dist/project-type-SURTOIG7.js +2 -0
- package/dist/promote-NJQDZBZA.js +8 -0
- package/dist/providers-4PXMWA7V.js +8 -0
- package/dist/quiz-FE5UGAY2.js +10 -0
- package/dist/record-YXPB34MY.js +6 -0
- package/dist/reindex-PGDQSM42.js +2 -0
- package/dist/remember-MJRNTXYS.js +14 -0
- package/dist/retag-N5XF3KXP.js +6 -0
- package/dist/review-6UAH6V3R.js +11 -0
- package/dist/review-77QI6VOC.js +6 -0
- package/dist/ripple-ZGDITCGB.js +10 -0
- package/dist/roster-FLRZ5J42.js +2 -0
- package/dist/sentinel-HYAZ3CO5.js +19 -0
- package/dist/sentinel-bridge-VR357PKL.js +2 -0
- package/dist/sentinel-mcp.js +38 -3808
- package/dist/sentinel.js +1 -34
- package/dist/serve-JE6UF5P2.js +8 -0
- package/dist/serve-L52ZUTU6.js +10 -0
- package/dist/serve-OY6XYL7F.js +12 -0
- package/dist/server-2MNROHF6.js +7 -0
- package/dist/server-4YNUIK4W.js +8 -0
- package/dist/session-tracker-SKOMBDOW.js +2 -0
- package/dist/session-work-log-3MNUDEZ6.js +2 -0
- package/dist/session-work-log-J2H5OZBR.js +2 -0
- package/dist/setup-3F5IK7MO.js +31 -0
- package/dist/setup-KPIMRZ4Q.js +2 -0
- package/dist/shift-6GCNH666.js +11 -0
- package/dist/show-BOAVWZPZ.js +7 -0
- package/dist/show-PJ5LFLIL.js +5 -0
- package/dist/snapshot-L2G56RPL.js +8 -0
- package/dist/spawn-UH5RENSE.js +12 -0
- package/dist/status-77M3SDIF.js +8 -0
- package/dist/status-A37ECYNJ.js +6 -0
- package/dist/summary-ZJLQ6KHB.js +7 -0
- package/dist/sweep-HU74OPVW.js +17 -0
- package/dist/switch-CTW4PDGI.js +17 -0
- package/dist/symphony-3QMBGCZY.js +2 -0
- package/dist/symphony-QI63XL62.js +53 -0
- package/dist/symphony-loader-XACVV2E3.js +2 -0
- package/dist/symphony-peers-U4KHMKGI.js +2 -0
- package/dist/symphony-peers-X5NGWXFP.js +2 -0
- package/dist/symphony-relay-5GY5JIPT.js +3 -0
- package/dist/sync-QRDSFETO.js +2 -0
- package/dist/sync-llms-HL5PPW3M.js +15 -0
- package/dist/task-loader-NZFDTUQ5.js +2 -0
- package/dist/team-WGERKGNP.js +2 -0
- package/dist/test-BQJMS4Y2.js +111 -0
- package/dist/thread-HFXK65D4.js +41 -0
- package/dist/timeline-K3ZFKJ3R.js +6 -0
- package/dist/triage-FCWOZASE.js +18 -0
- package/dist/tutorial-UC6YQMNN.js +305 -0
- package/dist/university-content/courses/.purpose +74 -5
- package/dist/university-content/courses/para-701.json +807 -0
- package/dist/university-content/plsat/.purpose +3 -2
- package/dist/university-ui/assets/{index-BjewBB6s.js → index-CGFJczb1.js} +2 -2
- package/dist/university-ui/assets/{index-BjewBB6s.js.map → index-CGFJczb1.js.map} +1 -1
- package/dist/university-ui/index.html +1 -1
- package/dist/upgrade-B4IOLZYK.js +53 -0
- package/dist/validate-C6SMKGYD.js +9 -0
- package/dist/validate-LSCDOLBO.js +13 -0
- package/dist/validate-VZXTJHGO.js +6 -0
- package/dist/watch-LRM5XD46.js +8 -0
- package/dist/watch-PZCCUP6K.js +9 -0
- package/dist/wisdom-XZ3QKPNP.js +7 -0
- package/dist/work-log-loader-DL5GZ2BQ.js +2 -0
- package/dist/workspace-2ODL5WLY.js +2 -0
- package/package.json +1 -1
- package/platform-ui/dist/assets/AmbientSection-DqQ2mfCO.js +1 -0
- package/platform-ui/dist/assets/{CanvasSection-DwPTRdIN.js → CanvasSection-DLW0s-Bu.js} +1 -1
- package/platform-ui/dist/assets/{DocsSection-BJc_ws4I.js → DocsSection-BQ9Hi51g.js} +1 -1
- package/platform-ui/dist/assets/{GitSection-DhqBo1xc.js → GitSection-QQeUX6o3.js} +1 -1
- package/platform-ui/dist/assets/{GraphSection-D9fhVnZ0.js → GraphSection-0c9C-w7K.js} +2 -2
- package/platform-ui/dist/assets/{GraphSection-BlgXTl53.css → GraphSection-Bbs2a8sC.css} +1 -1
- package/platform-ui/dist/assets/LoreSection--t56kCj2.js +1 -0
- package/platform-ui/dist/assets/LoreSection-qnmm3o4y.css +1 -0
- package/platform-ui/dist/assets/SentinelSection-C4OoME9U.js +1 -0
- package/platform-ui/dist/assets/{SymphonySection-BRoBaUSS.js → SymphonySection-B-rvsLxq.js} +1 -1
- package/platform-ui/dist/assets/TeamSection-CBFmNEEo.js +1 -0
- package/platform-ui/dist/assets/index-Bxp0TVaf.css +1 -0
- package/platform-ui/dist/assets/index-DPpOdAtC.js +57 -0
- package/platform-ui/dist/index.html +2 -2
- package/dist/accept-orchestration-UQLM7PTQ.js +0 -189
- package/dist/add-FZRKEGH4.js +0 -81
- package/dist/agent-WERIO2XV.js +0 -523
- package/dist/agent-loader-TFIANSF4.js +0 -44
- package/dist/agent-state-S5DAWPTF.js +0 -24
- package/dist/agents-suggest-DNSYJ6IA.js +0 -83
- package/dist/aggregate-H57K7PNV.js +0 -88
- package/dist/assess-4WVXZLZQ.js +0 -68
- package/dist/auto-QFS5NHQU.js +0 -504
- package/dist/beacon-KXZXYQHX.js +0 -251
- package/dist/calibration-V46G7JTY.js +0 -135
- package/dist/check-OWAIWV23.js +0 -175
- package/dist/chunk-2IO7JAG2.js +0 -148
- package/dist/chunk-2T6BTYBN.js +0 -712
- package/dist/chunk-36TKPM5Z.js +0 -400
- package/dist/chunk-45MUDW6E.js +0 -804
- package/dist/chunk-4BLYIB7J.js +0 -5701
- package/dist/chunk-4L3UTYQX.js +0 -677
- package/dist/chunk-4NCFWYGG.js +0 -110
- package/dist/chunk-54LTTQBH.js +0 -138
- package/dist/chunk-5EWAQHFY.js +0 -269
- package/dist/chunk-5JGJACDU.js +0 -37
- package/dist/chunk-5OUOLN6M.js +0 -659
- package/dist/chunk-5VKJBNJL.js +0 -444
- package/dist/chunk-6N3JTACN.js +0 -2260
- package/dist/chunk-6QC3YGB6.js +0 -114
- package/dist/chunk-7N7GSU6K.js +0 -34
- package/dist/chunk-ABVQGRF7.js +0 -268
- package/dist/chunk-CL7JSK52.js +0 -129
- package/dist/chunk-CSD7IHSN.js +0 -152
- package/dist/chunk-EDOAWN7J.js +0 -717
- package/dist/chunk-EKGMAM62.js +0 -525
- package/dist/chunk-EZ3GOCYC.js +0 -132
- package/dist/chunk-F3BCHPYT.js +0 -143
- package/dist/chunk-FKJUBQU3.js +0 -3081
- package/dist/chunk-GT5QGC2H.js +0 -253
- package/dist/chunk-GZDFVP2N.js +0 -540
- package/dist/chunk-IRKUEJVW.js +0 -405
- package/dist/chunk-J2JEQRT3.js +0 -164
- package/dist/chunk-JASGXLK3.js +0 -679
- package/dist/chunk-KVDYJLTC.js +0 -121
- package/dist/chunk-L27I3CPZ.js +0 -357
- package/dist/chunk-LHLIAYQ3.js +0 -185
- package/dist/chunk-MCMOGQMU.js +0 -145
- package/dist/chunk-NQKQG45G.js +0 -688
- package/dist/chunk-PBHIFAL4.js +0 -259
- package/dist/chunk-PDX44BCA.js +0 -11
- package/dist/chunk-PMXRGPRQ.js +0 -305
- package/dist/chunk-RAB5IKPR.js +0 -487
- package/dist/chunk-RJE5G7WO.js +0 -590
- package/dist/chunk-RTHA3XRE.js +0 -880
- package/dist/chunk-S2HO5MLR.js +0 -621
- package/dist/chunk-S3ORKP3V.js +0 -716
- package/dist/chunk-TAIJOFOE.js +0 -124
- package/dist/chunk-TXESEO7Y.js +0 -245
- package/dist/chunk-UPLDI7CN.js +0 -1334
- package/dist/chunk-VL67H5IC.js +0 -506
- package/dist/chunk-VPPK3SY4.js +0 -1136
- package/dist/chunk-YMDLDELF.js +0 -314
- package/dist/chunk-YO6DVTL7.js +0 -99
- package/dist/chunk-YRZ5RPEB.js +0 -1561
- package/dist/chunk-ZDHLG5VP.js +0 -5676
- package/dist/chunk-ZGUAAVMA.js +0 -756
- package/dist/chunk-ZSYVKSY6.js +0 -2602
- package/dist/claude-FRRWJSTJ.js +0 -362
- package/dist/claude-cli-XJLK2X4L.js +0 -276
- package/dist/claude-code-HTBA4XRB.js +0 -126
- package/dist/claude-code-teams-T4SP24MD.js +0 -199
- package/dist/commands-5N4ILTPH.js +0 -5859
- package/dist/conductor-CQVGTEQN.js +0 -161
- package/dist/config-schema-EA4XALGG.js +0 -154
- package/dist/constellation-A26CCGQS.js +0 -225
- package/dist/context-audit-RLO3ETRP.js +0 -682
- package/dist/cost-BGM32XJU.js +0 -93
- package/dist/cost-VI46A4XL.js +0 -174
- package/dist/cursor-cli-JVEZGHWQ.js +0 -269
- package/dist/cursorrules-HLIKJJZT.js +0 -84
- package/dist/decision-loader-WWCLIQPJ.js +0 -20
- package/dist/delete-KBRPQLPC.js +0 -56
- package/dist/diff-D4X53HAC.js +0 -126
- package/dist/discipline-FA4OZXIS.js +0 -24
- package/dist/dist-34NA5RS5.js +0 -74
- package/dist/dist-5QE2BB2B-5S3T6Y3T.js +0 -6919
- package/dist/dist-77JDTVAY.js +0 -62
- package/dist/dist-OGTSAZ55.js +0 -1358
- package/dist/dist-QK4SQAK7.js +0 -64
- package/dist/dist-TA6LSC2Q.js +0 -20
- package/dist/docs-PBZB7LYP.js +0 -89
- package/dist/docs-QIYKO3BR.js +0 -155
- package/dist/doctor-ULBOHEIC.js +0 -11
- package/dist/drift-R5NRKFHI.js +0 -251
- package/dist/echo-O2LY7CC2.js +0 -248
- package/dist/edit-R2HNLMOG.js +0 -63
- package/dist/event-25OJKDCE.js +0 -31
- package/dist/export-IWVL7XLF.js +0 -38
- package/dist/flow-CRRVV3O3.js +0 -185
- package/dist/global-3NG5JXUB.js +0 -136
- package/dist/graduate-USAWGBJM.js +0 -160
- package/dist/graph-VHUMAAS6.js +0 -12
- package/dist/graph-server-YL22VBBN.js +0 -116
- package/dist/habits-OL5NGPXO.js +0 -1405
- package/dist/history-WOWC573W.js +0 -277
- package/dist/hooks-HFWSCGPV.js +0 -12
- package/dist/integrity-IHO4FZTS.js +0 -194
- package/dist/integrity-checker-PSKJA5SB.js +0 -12
- package/dist/journal-loader-5EYSBFFY.js +0 -18
- package/dist/lint-K6CJGGPH.js +0 -456
- package/dist/list-4YK7QKFF.js +0 -57
- package/dist/list-ENR7Q4CR.js +0 -56
- package/dist/lore-loader-7NO6N6FT.js +0 -26
- package/dist/lore-server-UNJY5KC3.js +0 -118
- package/dist/manual-G6FISID5.js +0 -204
- package/dist/migrate-LS45DNEV.js +0 -889
- package/dist/migrate-assessments-RGH4O6IX.js +0 -97
- package/dist/model-discovery-D2H3VBGC.js +0 -8
- package/dist/nomination-engine-RV5CNO5B.js +0 -42
- package/dist/notebook-YWIYGEHV.js +0 -155
- package/dist/orchestrate-JLILBBJE.js +0 -324
- package/dist/peers-DEOUIZM6.js +0 -82
- package/dist/persona-UHAHIVST.js +0 -390
- package/dist/pipeline-L4HCSBGN.js +0 -263
- package/dist/platform-server-H5YO3DQD.js +0 -1475
- package/dist/plugin-update-checker-KRRSGXMV.js +0 -12
- package/dist/portal-check-NPYGII2D.js +0 -42
- package/dist/portal-compliance-J7DGAPFX.js +0 -18
- package/dist/probe-MHL5HQZ2.js +0 -167
- package/dist/promote-F6ZYZZAL.js +0 -182
- package/dist/providers-GK7PB2OL.js +0 -104
- package/dist/quiz-M66SC7F7.js +0 -99
- package/dist/record-RA4WR2BO.js +0 -49
- package/dist/reindex-5LTD53ZC.js +0 -16
- package/dist/remember-HBWJ655S.js +0 -77
- package/dist/retag-3OLCVDEQ.js +0 -62
- package/dist/review-27ATYTD2.js +0 -33
- package/dist/review-57QMURZV.js +0 -334
- package/dist/ripple-JPBXP5I3.js +0 -215
- package/dist/sentinel-4XIG4STA.js +0 -63
- package/dist/sentinel-bridge-MDUXTQRL.js +0 -109
- package/dist/serve-CAH3PHE7.js +0 -33
- package/dist/serve-INL7SNBK.js +0 -36
- package/dist/serve-KBSE36PL.js +0 -49
- package/dist/server-54SKYFFY.js +0 -1647
- package/dist/server-XUOIO7E6.js +0 -338
- package/dist/session-tracker-C4BMD5WG.js +0 -13
- package/dist/session-work-log-MZ47OAPB.js +0 -20
- package/dist/setup-EDS27WUR.js +0 -25
- package/dist/setup-KO5AFC4K.js +0 -296
- package/dist/shift-D2JOHHBF.js +0 -668
- package/dist/show-5PV5KFJE.js +0 -176
- package/dist/show-NQKYX6WQ.js +0 -82
- package/dist/snapshot-BK4RBPCG.js +0 -62
- package/dist/spawn-RCHNXDHE.js +0 -196
- package/dist/status-WGIAQODY.js +0 -71
- package/dist/summary-NIRABMF5.js +0 -140
- package/dist/sweep-QMHNSIY5.js +0 -934
- package/dist/switch-6EJPZDIA.js +0 -232
- package/dist/symphony-4OCY36AI.js +0 -791
- package/dist/symphony-B75X2MME.js +0 -326
- package/dist/symphony-loader-UZGON56V.js +0 -90
- package/dist/symphony-peers-2ZQYLRNI.js +0 -34
- package/dist/symphony-peers-OL7F6M5S.js +0 -121
- package/dist/symphony-relay-UJYUXN65.js +0 -710
- package/dist/sync-VEHUH4OA.js +0 -11
- package/dist/sync-llms-YHCFIE6X.js +0 -166
- package/dist/task-loader-LDYWQSLM.js +0 -20
- package/dist/team-O5MIIFMA.js +0 -34
- package/dist/test-566CP5KC.js +0 -1017
- package/dist/thread-N754I4D5.js +0 -274
- package/dist/timeline-M3CICQFE.js +0 -112
- package/dist/triage-HHYGT3HY.js +0 -671
- package/dist/tutorial-KD22SUNO.js +0 -666
- package/dist/upgrade-H5PF32BW.js +0 -551
- package/dist/validate-CNKEKO6A.js +0 -134
- package/dist/validate-MB5ULIHS.js +0 -39
- package/dist/validate-QH3LADM6.js +0 -64
- package/dist/watch-2TKP5PVL.js +0 -199
- package/dist/watch-ZF4ML6CD.js +0 -111
- package/dist/wisdom-AATMGNFA.js +0 -319
- package/dist/work-log-loader-5L45XNYZ.js +0 -14
- package/dist/workspace-6E6OSRNU.js +0 -21
- package/platform-ui/dist/assets/AmbientSection-WtHfNedO.js +0 -1
- package/platform-ui/dist/assets/LoreSection-C3EixkjW.css +0 -1
- package/platform-ui/dist/assets/LoreSection-CwDDHrz9.js +0 -1
- package/platform-ui/dist/assets/SentinelSection-Cl7e5oZ6.js +0 -1
- package/platform-ui/dist/assets/TeamSection-CqSIMrKz.js +0 -1
- package/platform-ui/dist/assets/index-CfpZFjea.css +0 -1
- package/platform-ui/dist/assets/index-F0KL9xrN.js +0 -57
|
@@ -1,326 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
approveFileRequest,
|
|
4
|
-
buildMessage,
|
|
5
|
-
cleanStaleAgents,
|
|
6
|
-
createThread,
|
|
7
|
-
denyFileRequest,
|
|
8
|
-
discoverClaudeCodeSessions,
|
|
9
|
-
expireOldRequests,
|
|
10
|
-
getMyIdentity,
|
|
11
|
-
getThreadMessages,
|
|
12
|
-
isAgentAsleep,
|
|
13
|
-
listAgents,
|
|
14
|
-
listFileRequests,
|
|
15
|
-
listThreads,
|
|
16
|
-
loadThread,
|
|
17
|
-
readInbox,
|
|
18
|
-
resolveAgentIdentity,
|
|
19
|
-
resolveThread,
|
|
20
|
-
routeMessage
|
|
21
|
-
} from "./chunk-S2HO5MLR.js";
|
|
22
|
-
import "./chunk-PDX44BCA.js";
|
|
23
|
-
|
|
24
|
-
// src/platform-server/routes/symphony.ts
|
|
25
|
-
import { Router } from "express";
|
|
26
|
-
function createSymphonyRouter(projectDir, broadcast) {
|
|
27
|
-
const router = Router();
|
|
28
|
-
router.get("/agents", (_req, res) => {
|
|
29
|
-
try {
|
|
30
|
-
cleanStaleAgents();
|
|
31
|
-
const agents = listAgents();
|
|
32
|
-
const discovered = discoverClaudeCodeSessions();
|
|
33
|
-
const agentIds = new Set(agents.map((a) => a.id));
|
|
34
|
-
for (const d of discovered) {
|
|
35
|
-
if (!agentIds.has(d.id)) agents.push(d);
|
|
36
|
-
}
|
|
37
|
-
const result = agents.map((a) => ({
|
|
38
|
-
id: a.id,
|
|
39
|
-
name: a.name,
|
|
40
|
-
project: a.project,
|
|
41
|
-
role: a.role,
|
|
42
|
-
status: isAgentAsleep(a) ? "asleep" : "awake",
|
|
43
|
-
lastPoll: a.lastPoll,
|
|
44
|
-
startedAt: a.startedAt,
|
|
45
|
-
statusBlurb: a.statusBlurb
|
|
46
|
-
}));
|
|
47
|
-
res.json({ agents: result });
|
|
48
|
-
} catch (err) {
|
|
49
|
-
res.status(500).json({ error: "Failed to list agents", detail: String(err) });
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
router.get("/agents/me", (_req, res) => {
|
|
53
|
-
try {
|
|
54
|
-
const identity = getMyIdentity(projectDir);
|
|
55
|
-
res.json({ identity: identity || null });
|
|
56
|
-
} catch (err) {
|
|
57
|
-
res.status(500).json({ error: "Failed to get identity", detail: String(err) });
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
router.get("/peers", async (_req, res) => {
|
|
61
|
-
try {
|
|
62
|
-
const { loadPeers } = await import("./symphony-peers-2ZQYLRNI.js");
|
|
63
|
-
const peers = loadPeers();
|
|
64
|
-
const result = peers.map((p) => ({
|
|
65
|
-
id: p.id,
|
|
66
|
-
displayName: p.displayName,
|
|
67
|
-
address: p.address,
|
|
68
|
-
connectedAt: p.connectedAt,
|
|
69
|
-
lastSeen: p.lastSeen,
|
|
70
|
-
revoked: p.revoked,
|
|
71
|
-
agents: p.agents || []
|
|
72
|
-
}));
|
|
73
|
-
res.json({ peers: result });
|
|
74
|
-
} catch (err) {
|
|
75
|
-
res.status(500).json({ error: "Failed to list peers", detail: String(err) });
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
router.get("/threads", (req, res) => {
|
|
79
|
-
try {
|
|
80
|
-
const statusParam = req.query.status;
|
|
81
|
-
let status;
|
|
82
|
-
if (statusParam === "active" || statusParam === "resolved") {
|
|
83
|
-
status = statusParam;
|
|
84
|
-
}
|
|
85
|
-
const threads = listThreads(status);
|
|
86
|
-
const result = threads.map((t) => ({
|
|
87
|
-
id: t.id,
|
|
88
|
-
topic: t.topic,
|
|
89
|
-
status: t.status,
|
|
90
|
-
participants: t.participants.map((p) => ({ id: p.id, name: p.name, type: p.type })),
|
|
91
|
-
messageCount: t.messageCount,
|
|
92
|
-
lastActivity: t.lastActivity,
|
|
93
|
-
decision: t.decision
|
|
94
|
-
}));
|
|
95
|
-
res.json({ threads: result });
|
|
96
|
-
} catch (err) {
|
|
97
|
-
res.status(500).json({ error: "Failed to list threads", detail: String(err) });
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
router.get("/threads/:threadId", (req, res) => {
|
|
101
|
-
try {
|
|
102
|
-
const { threadId } = req.params;
|
|
103
|
-
const thread = loadThread(threadId);
|
|
104
|
-
if (!thread) {
|
|
105
|
-
res.status(404).json({ error: `Thread not found: ${threadId}` });
|
|
106
|
-
return;
|
|
107
|
-
}
|
|
108
|
-
const messages = getThreadMessages(threadId);
|
|
109
|
-
const symbolsDiscussed = /* @__PURE__ */ new Set();
|
|
110
|
-
for (const msg of messages) {
|
|
111
|
-
for (const sym of msg.symbols) symbolsDiscussed.add(sym);
|
|
112
|
-
}
|
|
113
|
-
res.json({
|
|
114
|
-
thread: {
|
|
115
|
-
id: thread.id,
|
|
116
|
-
topic: thread.topic,
|
|
117
|
-
status: thread.status,
|
|
118
|
-
participants: thread.participants.map((p) => ({ id: p.id, name: p.name, type: p.type })),
|
|
119
|
-
messageCount: thread.messageCount,
|
|
120
|
-
lastActivity: thread.lastActivity,
|
|
121
|
-
decision: thread.decision
|
|
122
|
-
},
|
|
123
|
-
messages: messages.map((m) => ({
|
|
124
|
-
id: m.id,
|
|
125
|
-
sender: { id: m.sender.id, name: m.sender.name, type: m.sender.type },
|
|
126
|
-
intent: m.intent,
|
|
127
|
-
text: m.content.text,
|
|
128
|
-
timestamp: m.timestamp,
|
|
129
|
-
symbols: m.symbols,
|
|
130
|
-
diff: m.content.diff,
|
|
131
|
-
decision: m.content.decision,
|
|
132
|
-
recipients: m.recipients?.map((r) => ({ id: r.id, name: r.name }))
|
|
133
|
-
})),
|
|
134
|
-
symbolsDiscussed: [...symbolsDiscussed]
|
|
135
|
-
});
|
|
136
|
-
} catch (err) {
|
|
137
|
-
res.status(500).json({ error: "Failed to load thread", detail: String(err) });
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
router.post("/threads/:threadId/resolve", (req, res) => {
|
|
141
|
-
try {
|
|
142
|
-
const { threadId } = req.params;
|
|
143
|
-
const { decision } = req.body;
|
|
144
|
-
const success = resolveThread(threadId, decision);
|
|
145
|
-
if (!success) {
|
|
146
|
-
res.status(404).json({ error: `Thread not found: ${threadId}` });
|
|
147
|
-
return;
|
|
148
|
-
}
|
|
149
|
-
if (broadcast) {
|
|
150
|
-
broadcast({ type: "symphony:thread_resolved", threadId, decision });
|
|
151
|
-
}
|
|
152
|
-
res.json({ resolved: true, threadId, decision });
|
|
153
|
-
} catch (err) {
|
|
154
|
-
res.status(500).json({ error: "Failed to resolve thread", detail: String(err) });
|
|
155
|
-
}
|
|
156
|
-
});
|
|
157
|
-
router.post("/messages", (req, res) => {
|
|
158
|
-
try {
|
|
159
|
-
const { intent, text, threadRoot, recipients, symbols, diff, decision } = req.body;
|
|
160
|
-
if (!intent || !text) {
|
|
161
|
-
res.status(400).json({ error: "intent and text are required" });
|
|
162
|
-
return;
|
|
163
|
-
}
|
|
164
|
-
const agentId = resolveAgentIdentity(projectDir);
|
|
165
|
-
const sender = {
|
|
166
|
-
id: `human/${agentId}`,
|
|
167
|
-
name: "Human (Platform UI)",
|
|
168
|
-
type: "human"
|
|
169
|
-
};
|
|
170
|
-
let effectiveThreadRoot = threadRoot;
|
|
171
|
-
let threadCreated = false;
|
|
172
|
-
if (!threadRoot) {
|
|
173
|
-
const topic = text.length > 60 ? text.slice(0, 60) + "..." : text;
|
|
174
|
-
const thread = createThread(topic, sender);
|
|
175
|
-
effectiveThreadRoot = thread.id;
|
|
176
|
-
threadCreated = true;
|
|
177
|
-
}
|
|
178
|
-
let resolvedRecipients;
|
|
179
|
-
if (recipients && recipients.length > 0) {
|
|
180
|
-
const allAgents = listAgents();
|
|
181
|
-
resolvedRecipients = recipients.map((id) => {
|
|
182
|
-
const agent = allAgents.find((a) => a.id === id);
|
|
183
|
-
if (agent) return { id: agent.id, name: agent.name, type: "agent" };
|
|
184
|
-
return { id, name: id, type: "agent" };
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
|
-
const message = buildMessage({
|
|
188
|
-
sender,
|
|
189
|
-
recipients: resolvedRecipients,
|
|
190
|
-
intent,
|
|
191
|
-
text,
|
|
192
|
-
threadRoot: effectiveThreadRoot,
|
|
193
|
-
symbols,
|
|
194
|
-
diff,
|
|
195
|
-
decision
|
|
196
|
-
});
|
|
197
|
-
const deliveryCount = routeMessage(message);
|
|
198
|
-
if (broadcast) {
|
|
199
|
-
broadcast({
|
|
200
|
-
type: "symphony:message",
|
|
201
|
-
message: {
|
|
202
|
-
id: message.id,
|
|
203
|
-
sender: { id: sender.id, name: sender.name, type: sender.type },
|
|
204
|
-
intent: message.intent,
|
|
205
|
-
text: message.content.text,
|
|
206
|
-
timestamp: message.timestamp,
|
|
207
|
-
symbols: message.symbols,
|
|
208
|
-
diff: message.content.diff,
|
|
209
|
-
decision: message.content.decision
|
|
210
|
-
},
|
|
211
|
-
threadId: effectiveThreadRoot
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
res.json({
|
|
215
|
-
sent: true,
|
|
216
|
-
messageId: message.id,
|
|
217
|
-
threadId: effectiveThreadRoot,
|
|
218
|
-
threadCreated,
|
|
219
|
-
deliveredTo: deliveryCount
|
|
220
|
-
});
|
|
221
|
-
} catch (err) {
|
|
222
|
-
res.status(500).json({ error: "Failed to send message", detail: String(err) });
|
|
223
|
-
}
|
|
224
|
-
});
|
|
225
|
-
router.get("/inbox", (_req, res) => {
|
|
226
|
-
try {
|
|
227
|
-
const agentId = resolveAgentIdentity(projectDir);
|
|
228
|
-
const messages = readInbox(agentId);
|
|
229
|
-
res.json({
|
|
230
|
-
agentId,
|
|
231
|
-
messages: messages.map((m) => ({
|
|
232
|
-
id: m.id,
|
|
233
|
-
sender: { id: m.sender.id, name: m.sender.name, type: m.sender.type },
|
|
234
|
-
intent: m.intent,
|
|
235
|
-
text: m.content.text,
|
|
236
|
-
timestamp: m.timestamp,
|
|
237
|
-
threadRoot: m.threadRoot,
|
|
238
|
-
symbols: m.symbols
|
|
239
|
-
}))
|
|
240
|
-
});
|
|
241
|
-
} catch (err) {
|
|
242
|
-
res.status(500).json({ error: "Failed to read inbox", detail: String(err) });
|
|
243
|
-
}
|
|
244
|
-
});
|
|
245
|
-
router.get("/file-requests", (req, res) => {
|
|
246
|
-
try {
|
|
247
|
-
expireOldRequests();
|
|
248
|
-
const statusParam = req.query.status;
|
|
249
|
-
let status;
|
|
250
|
-
if (statusParam === "pending" || statusParam === "approved" || statusParam === "denied" || statusParam === "expired") {
|
|
251
|
-
status = statusParam;
|
|
252
|
-
}
|
|
253
|
-
const requests = listFileRequests(status);
|
|
254
|
-
const result = requests.map((r) => ({
|
|
255
|
-
requestId: r.request.requestId,
|
|
256
|
-
filePath: r.request.filePath,
|
|
257
|
-
reason: r.request.reason,
|
|
258
|
-
requester: { id: r.request.requester.id, name: r.request.requester.name },
|
|
259
|
-
urgency: r.request.urgency,
|
|
260
|
-
snippet: r.request.snippet,
|
|
261
|
-
status: r.status,
|
|
262
|
-
createdAt: r.createdAt,
|
|
263
|
-
resolvedAt: r.resolvedAt,
|
|
264
|
-
denyReason: r.denyReason
|
|
265
|
-
}));
|
|
266
|
-
res.json({ fileRequests: result });
|
|
267
|
-
} catch (err) {
|
|
268
|
-
res.status(500).json({ error: "Failed to list file requests", detail: String(err) });
|
|
269
|
-
}
|
|
270
|
-
});
|
|
271
|
-
router.post("/file-requests/:requestId/action", (req, res) => {
|
|
272
|
-
try {
|
|
273
|
-
const { requestId } = req.params;
|
|
274
|
-
const { action, reason } = req.body;
|
|
275
|
-
if (!action) {
|
|
276
|
-
res.status(400).json({ error: "action is required" });
|
|
277
|
-
return;
|
|
278
|
-
}
|
|
279
|
-
if (action === "deny") {
|
|
280
|
-
const success = denyFileRequest(requestId, reason);
|
|
281
|
-
res.json({ success, requestId, action: "denied", reason });
|
|
282
|
-
return;
|
|
283
|
-
}
|
|
284
|
-
const redact = action === "approve-redacted";
|
|
285
|
-
const result = approveFileRequest(requestId, projectDir, redact);
|
|
286
|
-
if (!result.success) {
|
|
287
|
-
res.status(400).json({ success: false, requestId, error: result.error });
|
|
288
|
-
return;
|
|
289
|
-
}
|
|
290
|
-
res.json({
|
|
291
|
-
success: true,
|
|
292
|
-
requestId,
|
|
293
|
-
action: redact ? "approved-redacted" : "approved",
|
|
294
|
-
filePath: result.delivery?.filePath,
|
|
295
|
-
size: result.delivery?.size
|
|
296
|
-
});
|
|
297
|
-
} catch (err) {
|
|
298
|
-
res.status(500).json({ error: "Failed to handle file request", detail: String(err) });
|
|
299
|
-
}
|
|
300
|
-
});
|
|
301
|
-
router.get("/status", (_req, res) => {
|
|
302
|
-
try {
|
|
303
|
-
cleanStaleAgents();
|
|
304
|
-
const agents = listAgents();
|
|
305
|
-
const awake = agents.filter((a) => !isAgentAsleep(a)).length;
|
|
306
|
-
const threads = listThreads("active");
|
|
307
|
-
const agentId = resolveAgentIdentity(projectDir);
|
|
308
|
-
const unread = readInbox(agentId);
|
|
309
|
-
const pendingRequests = listFileRequests("pending");
|
|
310
|
-
res.json({
|
|
311
|
-
agentCount: agents.length,
|
|
312
|
-
awakeCount: awake,
|
|
313
|
-
asleepCount: agents.length - awake,
|
|
314
|
-
activeThreadCount: threads.length,
|
|
315
|
-
unreadCount: unread.length,
|
|
316
|
-
pendingFileRequests: pendingRequests.length
|
|
317
|
-
});
|
|
318
|
-
} catch (err) {
|
|
319
|
-
res.status(500).json({ error: "Failed to get status", detail: String(err) });
|
|
320
|
-
}
|
|
321
|
-
});
|
|
322
|
-
return router;
|
|
323
|
-
}
|
|
324
|
-
export {
|
|
325
|
-
createSymphonyRouter
|
|
326
|
-
};
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
SCORE_DIR,
|
|
4
|
-
acknowledgeMessages,
|
|
5
|
-
appendJsonlLine,
|
|
6
|
-
appendToInbox,
|
|
7
|
-
appendToOutbox,
|
|
8
|
-
approveFileRequest,
|
|
9
|
-
buildMessage,
|
|
10
|
-
cleanStaleAgents,
|
|
11
|
-
createFileRequest,
|
|
12
|
-
createThread,
|
|
13
|
-
denyFileRequest,
|
|
14
|
-
discoverClaudeCodeSessions,
|
|
15
|
-
ensureMailDirs,
|
|
16
|
-
ensureScoreDirs,
|
|
17
|
-
expireOldRequests,
|
|
18
|
-
garbageCollect,
|
|
19
|
-
getAgentDir,
|
|
20
|
-
getMyIdentity,
|
|
21
|
-
getThreadMessages,
|
|
22
|
-
isAgentAsleep,
|
|
23
|
-
isPathAutoApproved,
|
|
24
|
-
isPathDenied,
|
|
25
|
-
listAgents,
|
|
26
|
-
listFileRequests,
|
|
27
|
-
listThreads,
|
|
28
|
-
loadFileRequest,
|
|
29
|
-
loadThread,
|
|
30
|
-
loadTrustConfig,
|
|
31
|
-
markAgentPollTime,
|
|
32
|
-
peekInbox,
|
|
33
|
-
readAck,
|
|
34
|
-
readInbox,
|
|
35
|
-
readJsonlFile,
|
|
36
|
-
readOutbox,
|
|
37
|
-
recordAckSize,
|
|
38
|
-
registerAgent,
|
|
39
|
-
resolveAgentIdentity,
|
|
40
|
-
resolveThread,
|
|
41
|
-
routeMessage,
|
|
42
|
-
unregisterAgent,
|
|
43
|
-
updateAgentStatus,
|
|
44
|
-
updateThread
|
|
45
|
-
} from "./chunk-NQKQG45G.js";
|
|
46
|
-
import "./chunk-7N7GSU6K.js";
|
|
47
|
-
export {
|
|
48
|
-
SCORE_DIR,
|
|
49
|
-
acknowledgeMessages,
|
|
50
|
-
appendJsonlLine,
|
|
51
|
-
appendToInbox,
|
|
52
|
-
appendToOutbox,
|
|
53
|
-
approveFileRequest,
|
|
54
|
-
buildMessage,
|
|
55
|
-
cleanStaleAgents,
|
|
56
|
-
createFileRequest,
|
|
57
|
-
createThread,
|
|
58
|
-
denyFileRequest,
|
|
59
|
-
discoverClaudeCodeSessions,
|
|
60
|
-
ensureMailDirs,
|
|
61
|
-
ensureScoreDirs,
|
|
62
|
-
expireOldRequests,
|
|
63
|
-
garbageCollect,
|
|
64
|
-
getAgentDir,
|
|
65
|
-
getMyIdentity,
|
|
66
|
-
getThreadMessages,
|
|
67
|
-
isAgentAsleep,
|
|
68
|
-
isPathAutoApproved,
|
|
69
|
-
isPathDenied,
|
|
70
|
-
listAgents,
|
|
71
|
-
listFileRequests,
|
|
72
|
-
listThreads,
|
|
73
|
-
loadFileRequest,
|
|
74
|
-
loadThread,
|
|
75
|
-
loadTrustConfig,
|
|
76
|
-
markAgentPollTime,
|
|
77
|
-
peekInbox,
|
|
78
|
-
readAck,
|
|
79
|
-
readInbox,
|
|
80
|
-
readJsonlFile,
|
|
81
|
-
readOutbox,
|
|
82
|
-
recordAckSize,
|
|
83
|
-
registerAgent,
|
|
84
|
-
resolveAgentIdentity,
|
|
85
|
-
resolveThread,
|
|
86
|
-
routeMessage,
|
|
87
|
-
unregisterAgent,
|
|
88
|
-
updateAgentStatus,
|
|
89
|
-
updateThread
|
|
90
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
PAIRING_TTL_MS,
|
|
4
|
-
PEERS_FILE,
|
|
5
|
-
addPeer,
|
|
6
|
-
computeHmacProof,
|
|
7
|
-
findPeer,
|
|
8
|
-
forgetAllPeers,
|
|
9
|
-
generatePairing,
|
|
10
|
-
loadPeers,
|
|
11
|
-
revokePeer,
|
|
12
|
-
savePeers,
|
|
13
|
-
updatePeerAgents,
|
|
14
|
-
updatePeerLastSeen,
|
|
15
|
-
verifyHmacProof,
|
|
16
|
-
verifyPairingCode
|
|
17
|
-
} from "./chunk-KVDYJLTC.js";
|
|
18
|
-
import "./chunk-PDX44BCA.js";
|
|
19
|
-
export {
|
|
20
|
-
PAIRING_TTL_MS,
|
|
21
|
-
PEERS_FILE,
|
|
22
|
-
addPeer,
|
|
23
|
-
computeHmacProof,
|
|
24
|
-
findPeer,
|
|
25
|
-
forgetAllPeers,
|
|
26
|
-
generatePairing,
|
|
27
|
-
loadPeers,
|
|
28
|
-
revokePeer,
|
|
29
|
-
savePeers,
|
|
30
|
-
updatePeerAgents,
|
|
31
|
-
updatePeerLastSeen,
|
|
32
|
-
verifyHmacProof,
|
|
33
|
-
verifyPairingCode
|
|
34
|
-
};
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import "./chunk-7N7GSU6K.js";
|
|
3
|
-
|
|
4
|
-
// ../paradigm-mcp/src/utils/symphony-peers.ts
|
|
5
|
-
import * as fs from "fs";
|
|
6
|
-
import * as path from "path";
|
|
7
|
-
import * as os from "os";
|
|
8
|
-
import * as crypto from "crypto";
|
|
9
|
-
var SCORE_DIR = path.join(os.homedir(), ".paradigm", "score");
|
|
10
|
-
var PEERS_FILE = path.join(SCORE_DIR, "peers.json");
|
|
11
|
-
var PAIRING_TTL_MS = 5 * 60 * 1e3;
|
|
12
|
-
function loadPeers() {
|
|
13
|
-
try {
|
|
14
|
-
if (!fs.existsSync(PEERS_FILE)) return [];
|
|
15
|
-
const content = fs.readFileSync(PEERS_FILE, "utf-8");
|
|
16
|
-
const parsed = JSON.parse(content);
|
|
17
|
-
if (!Array.isArray(parsed)) return [];
|
|
18
|
-
return parsed;
|
|
19
|
-
} catch {
|
|
20
|
-
return [];
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
function savePeers(peers) {
|
|
24
|
-
if (!fs.existsSync(SCORE_DIR)) {
|
|
25
|
-
fs.mkdirSync(SCORE_DIR, { recursive: true });
|
|
26
|
-
}
|
|
27
|
-
fs.writeFileSync(PEERS_FILE, JSON.stringify(peers, null, 2), { mode: 384 });
|
|
28
|
-
}
|
|
29
|
-
function findPeer(id) {
|
|
30
|
-
const peers = loadPeers();
|
|
31
|
-
return peers.find((p) => p.id === id) ?? null;
|
|
32
|
-
}
|
|
33
|
-
function addPeer(peer) {
|
|
34
|
-
const peers = loadPeers();
|
|
35
|
-
const idx = peers.findIndex((p) => p.id === peer.id);
|
|
36
|
-
if (idx >= 0) {
|
|
37
|
-
peers[idx] = peer;
|
|
38
|
-
} else {
|
|
39
|
-
peers.push(peer);
|
|
40
|
-
}
|
|
41
|
-
savePeers(peers);
|
|
42
|
-
}
|
|
43
|
-
function revokePeer(id) {
|
|
44
|
-
const peers = loadPeers();
|
|
45
|
-
const peer = peers.find((p) => p.id === id);
|
|
46
|
-
if (!peer) return false;
|
|
47
|
-
peer.revoked = true;
|
|
48
|
-
savePeers(peers);
|
|
49
|
-
return true;
|
|
50
|
-
}
|
|
51
|
-
function forgetAllPeers() {
|
|
52
|
-
const peers = loadPeers();
|
|
53
|
-
const count = peers.length;
|
|
54
|
-
if (fs.existsSync(PEERS_FILE)) {
|
|
55
|
-
fs.unlinkSync(PEERS_FILE);
|
|
56
|
-
}
|
|
57
|
-
return count;
|
|
58
|
-
}
|
|
59
|
-
function updatePeerLastSeen(id) {
|
|
60
|
-
const peers = loadPeers();
|
|
61
|
-
const peer = peers.find((p) => p.id === id);
|
|
62
|
-
if (!peer) return;
|
|
63
|
-
peer.lastSeen = (/* @__PURE__ */ new Date()).toISOString();
|
|
64
|
-
savePeers(peers);
|
|
65
|
-
}
|
|
66
|
-
function updatePeerAgents(id, agents) {
|
|
67
|
-
const peers = loadPeers();
|
|
68
|
-
const peer = peers.find((p) => p.id === id);
|
|
69
|
-
if (!peer) return;
|
|
70
|
-
peer.agents = agents;
|
|
71
|
-
savePeers(peers);
|
|
72
|
-
}
|
|
73
|
-
function generatePairing() {
|
|
74
|
-
const sharedSecret = crypto.randomBytes(32).toString("hex");
|
|
75
|
-
const code = (parseInt(crypto.randomBytes(3).toString("hex"), 16) % 1e6).toString().padStart(6, "0");
|
|
76
|
-
const codeHash = crypto.createHash("sha256").update(code).digest("hex");
|
|
77
|
-
return {
|
|
78
|
-
code,
|
|
79
|
-
codeHash,
|
|
80
|
-
sharedSecret,
|
|
81
|
-
createdAt: Date.now()
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
function verifyPairingCode(state, code) {
|
|
85
|
-
if (Date.now() - state.createdAt > PAIRING_TTL_MS) {
|
|
86
|
-
return false;
|
|
87
|
-
}
|
|
88
|
-
const hash = crypto.createHash("sha256").update(code).digest("hex");
|
|
89
|
-
return hash === state.codeHash;
|
|
90
|
-
}
|
|
91
|
-
function computeHmacProof(challenge, codeHash) {
|
|
92
|
-
return crypto.createHmac("sha256", codeHash).update(challenge).digest("hex");
|
|
93
|
-
}
|
|
94
|
-
function verifyHmacProof(challenge, codeHash, proof) {
|
|
95
|
-
const expected = computeHmacProof(challenge, codeHash);
|
|
96
|
-
if (expected.length !== proof.length) return false;
|
|
97
|
-
try {
|
|
98
|
-
return crypto.timingSafeEqual(
|
|
99
|
-
Buffer.from(expected, "hex"),
|
|
100
|
-
Buffer.from(proof, "hex")
|
|
101
|
-
);
|
|
102
|
-
} catch {
|
|
103
|
-
return false;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
export {
|
|
107
|
-
PAIRING_TTL_MS,
|
|
108
|
-
PEERS_FILE,
|
|
109
|
-
addPeer,
|
|
110
|
-
computeHmacProof,
|
|
111
|
-
findPeer,
|
|
112
|
-
forgetAllPeers,
|
|
113
|
-
generatePairing,
|
|
114
|
-
loadPeers,
|
|
115
|
-
revokePeer,
|
|
116
|
-
savePeers,
|
|
117
|
-
updatePeerAgents,
|
|
118
|
-
updatePeerLastSeen,
|
|
119
|
-
verifyHmacProof,
|
|
120
|
-
verifyPairingCode
|
|
121
|
-
};
|