@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
package/dist/claude-FRRWJSTJ.js
DELETED
|
@@ -1,362 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
MODEL_PRICING
|
|
4
|
-
} from "./chunk-5JGJACDU.js";
|
|
5
|
-
import "./chunk-PDX44BCA.js";
|
|
6
|
-
|
|
7
|
-
// src/core/providers/claude.ts
|
|
8
|
-
var MODEL_IDS = {
|
|
9
|
-
opus: "claude-opus-4-5-20251101",
|
|
10
|
-
sonnet: "claude-sonnet-4-20250514",
|
|
11
|
-
haiku: "claude-haiku-4-20250514"
|
|
12
|
-
};
|
|
13
|
-
var ClaudeAgentProvider = class {
|
|
14
|
-
name = "claude";
|
|
15
|
-
apiKey = null;
|
|
16
|
-
baseUrl = "https://api.anthropic.com/v1";
|
|
17
|
-
constructor() {
|
|
18
|
-
this.apiKey = process.env.ANTHROPIC_API_KEY || null;
|
|
19
|
-
}
|
|
20
|
-
listModels() {
|
|
21
|
-
return ["opus", "sonnet", "haiku"];
|
|
22
|
-
}
|
|
23
|
-
supportsParallel() {
|
|
24
|
-
return true;
|
|
25
|
-
}
|
|
26
|
-
supportsMcp() {
|
|
27
|
-
return true;
|
|
28
|
-
}
|
|
29
|
-
getTokenCost(model) {
|
|
30
|
-
return MODEL_PRICING[model];
|
|
31
|
-
}
|
|
32
|
-
async isAvailable() {
|
|
33
|
-
return !!this.apiKey;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Spawn an agent and return streaming messages
|
|
37
|
-
*/
|
|
38
|
-
async *spawn(agent, options) {
|
|
39
|
-
if (!this.apiKey) {
|
|
40
|
-
yield {
|
|
41
|
-
type: "error",
|
|
42
|
-
content: "ANTHROPIC_API_KEY not set",
|
|
43
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
44
|
-
};
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
const model = options.model || "sonnet";
|
|
48
|
-
const modelId = MODEL_IDS[model];
|
|
49
|
-
const systemPrompt = this.buildSystemPrompt(agent, options);
|
|
50
|
-
const messages = [
|
|
51
|
-
{ role: "user", content: options.task }
|
|
52
|
-
];
|
|
53
|
-
let totalUsage = { input: 0, output: 0, total: 0 };
|
|
54
|
-
let continueLoop = true;
|
|
55
|
-
let loopCount = 0;
|
|
56
|
-
const maxLoops = 50;
|
|
57
|
-
while (continueLoop && loopCount < maxLoops) {
|
|
58
|
-
loopCount++;
|
|
59
|
-
try {
|
|
60
|
-
const response = await this.streamRequest(modelId, systemPrompt, messages, options);
|
|
61
|
-
let assistantContent = [];
|
|
62
|
-
let currentToolUse = null;
|
|
63
|
-
for await (const event of response) {
|
|
64
|
-
if (event.type === "content_block_start" && event.content_block) {
|
|
65
|
-
if (event.content_block.type === "tool_use") {
|
|
66
|
-
currentToolUse = {
|
|
67
|
-
id: event.content_block.id || "",
|
|
68
|
-
name: event.content_block.name || "",
|
|
69
|
-
input: ""
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
} else if (event.type === "content_block_delta" && event.delta) {
|
|
73
|
-
if (event.delta.type === "text_delta" && event.delta.text) {
|
|
74
|
-
yield {
|
|
75
|
-
type: "text",
|
|
76
|
-
content: event.delta.text,
|
|
77
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
78
|
-
};
|
|
79
|
-
} else if (event.delta.type === "input_json_delta" && currentToolUse) {
|
|
80
|
-
currentToolUse.input += event.delta.partial_json || "";
|
|
81
|
-
}
|
|
82
|
-
} else if (event.type === "content_block_stop") {
|
|
83
|
-
if (currentToolUse) {
|
|
84
|
-
const toolInput = JSON.parse(currentToolUse.input || "{}");
|
|
85
|
-
assistantContent.push({
|
|
86
|
-
type: "tool_use",
|
|
87
|
-
id: currentToolUse.id,
|
|
88
|
-
name: currentToolUse.name,
|
|
89
|
-
input: toolInput
|
|
90
|
-
});
|
|
91
|
-
yield {
|
|
92
|
-
type: "tool_use",
|
|
93
|
-
content: `Using tool: ${currentToolUse.name}`,
|
|
94
|
-
toolName: currentToolUse.name,
|
|
95
|
-
toolInput,
|
|
96
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
97
|
-
};
|
|
98
|
-
currentToolUse = null;
|
|
99
|
-
}
|
|
100
|
-
} else if (event.type === "message_delta" && event.usage) {
|
|
101
|
-
totalUsage.input += event.usage.input_tokens || 0;
|
|
102
|
-
totalUsage.output += event.usage.output_tokens || 0;
|
|
103
|
-
totalUsage.total = totalUsage.input + totalUsage.output;
|
|
104
|
-
} else if (event.type === "message_stop") {
|
|
105
|
-
const hasToolUse = assistantContent.some((c) => c.type === "tool_use");
|
|
106
|
-
if (hasToolUse) {
|
|
107
|
-
messages.push({
|
|
108
|
-
role: "assistant",
|
|
109
|
-
content: assistantContent
|
|
110
|
-
});
|
|
111
|
-
const toolResults = await this.executeTools(assistantContent, options);
|
|
112
|
-
messages.push({
|
|
113
|
-
role: "user",
|
|
114
|
-
content: toolResults
|
|
115
|
-
});
|
|
116
|
-
for (const result of toolResults) {
|
|
117
|
-
if (result.type === "tool_result") {
|
|
118
|
-
yield {
|
|
119
|
-
type: "tool_result",
|
|
120
|
-
content: typeof result.content === "string" ? result.content : JSON.stringify(result.content),
|
|
121
|
-
toolName: result.tool_use_id,
|
|
122
|
-
toolResult: result.content,
|
|
123
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
assistantContent = [];
|
|
128
|
-
} else {
|
|
129
|
-
continueLoop = false;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
if (options.budget?.maxTokens && totalUsage.total > options.budget.maxTokens) {
|
|
134
|
-
yield {
|
|
135
|
-
type: "error",
|
|
136
|
-
content: `Token budget exceeded: ${totalUsage.total} > ${options.budget.maxTokens}`,
|
|
137
|
-
usage: totalUsage,
|
|
138
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
139
|
-
};
|
|
140
|
-
continueLoop = false;
|
|
141
|
-
}
|
|
142
|
-
} catch (error) {
|
|
143
|
-
yield {
|
|
144
|
-
type: "error",
|
|
145
|
-
content: error instanceof Error ? error.message : String(error),
|
|
146
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
147
|
-
};
|
|
148
|
-
continueLoop = false;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
yield {
|
|
152
|
-
type: "done",
|
|
153
|
-
content: "Agent completed",
|
|
154
|
-
usage: totalUsage,
|
|
155
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
// ==========================================================================
|
|
159
|
-
// Private Methods
|
|
160
|
-
// ==========================================================================
|
|
161
|
-
buildSystemPrompt(agent, options) {
|
|
162
|
-
const parts = [];
|
|
163
|
-
parts.push(options.context.systemPrompt);
|
|
164
|
-
parts.push(`
|
|
165
|
-
## Your Role: ${agent.name.toUpperCase()}
|
|
166
|
-
`);
|
|
167
|
-
parts.push(agent.role);
|
|
168
|
-
if (agent.focus) {
|
|
169
|
-
parts.push("\n### Focus Areas\n");
|
|
170
|
-
if (agent.focus.reads.length > 0) {
|
|
171
|
-
parts.push(`**Read**: ${agent.focus.reads.join(", ")}`);
|
|
172
|
-
}
|
|
173
|
-
if (agent.focus.writes.length > 0) {
|
|
174
|
-
parts.push(`**Write**: ${agent.focus.writes.join(", ")}`);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
if (options.context.handoffContext) {
|
|
178
|
-
parts.push("\n### Context from Previous Agent\n");
|
|
179
|
-
parts.push(options.context.handoffContext);
|
|
180
|
-
}
|
|
181
|
-
if (options.context.symbols.length > 0) {
|
|
182
|
-
parts.push("\n### Symbols in Scope\n");
|
|
183
|
-
parts.push(options.context.symbols.join(", "));
|
|
184
|
-
}
|
|
185
|
-
return parts.join("\n");
|
|
186
|
-
}
|
|
187
|
-
async *streamRequest(model, system, messages, options) {
|
|
188
|
-
const response = await fetch(`${this.baseUrl}/messages`, {
|
|
189
|
-
method: "POST",
|
|
190
|
-
headers: {
|
|
191
|
-
"Content-Type": "application/json",
|
|
192
|
-
"x-api-key": this.apiKey,
|
|
193
|
-
"anthropic-version": "2023-06-01"
|
|
194
|
-
},
|
|
195
|
-
body: JSON.stringify({
|
|
196
|
-
model,
|
|
197
|
-
max_tokens: options.budget?.maxTokens || 4096,
|
|
198
|
-
system,
|
|
199
|
-
messages,
|
|
200
|
-
stream: true,
|
|
201
|
-
tools: this.getAvailableTools(options)
|
|
202
|
-
})
|
|
203
|
-
});
|
|
204
|
-
if (!response.ok) {
|
|
205
|
-
const error = await response.text();
|
|
206
|
-
throw new Error(`API error: ${response.status} - ${error}`);
|
|
207
|
-
}
|
|
208
|
-
if (!response.body) {
|
|
209
|
-
throw new Error("No response body");
|
|
210
|
-
}
|
|
211
|
-
const reader = response.body.getReader();
|
|
212
|
-
const decoder = new TextDecoder();
|
|
213
|
-
let buffer = "";
|
|
214
|
-
while (true) {
|
|
215
|
-
const { done, value } = await reader.read();
|
|
216
|
-
if (done) break;
|
|
217
|
-
buffer += decoder.decode(value, { stream: true });
|
|
218
|
-
const lines = buffer.split("\n");
|
|
219
|
-
buffer = lines.pop() || "";
|
|
220
|
-
for (const line of lines) {
|
|
221
|
-
if (line.startsWith("data: ")) {
|
|
222
|
-
const data = line.slice(6).trim();
|
|
223
|
-
if (data && data !== "[DONE]") {
|
|
224
|
-
try {
|
|
225
|
-
yield JSON.parse(data);
|
|
226
|
-
} catch {
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
getAvailableTools(options) {
|
|
234
|
-
const tools = [
|
|
235
|
-
{
|
|
236
|
-
name: "read_file",
|
|
237
|
-
description: "Read a file from the filesystem",
|
|
238
|
-
input_schema: {
|
|
239
|
-
type: "object",
|
|
240
|
-
properties: {
|
|
241
|
-
path: { type: "string", description: "Path to the file" }
|
|
242
|
-
},
|
|
243
|
-
required: ["path"]
|
|
244
|
-
}
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
name: "write_file",
|
|
248
|
-
description: "Write content to a file",
|
|
249
|
-
input_schema: {
|
|
250
|
-
type: "object",
|
|
251
|
-
properties: {
|
|
252
|
-
path: { type: "string", description: "Path to the file" },
|
|
253
|
-
content: { type: "string", description: "Content to write" }
|
|
254
|
-
},
|
|
255
|
-
required: ["path", "content"]
|
|
256
|
-
}
|
|
257
|
-
},
|
|
258
|
-
{
|
|
259
|
-
name: "search_files",
|
|
260
|
-
description: "Search for files matching a pattern",
|
|
261
|
-
input_schema: {
|
|
262
|
-
type: "object",
|
|
263
|
-
properties: {
|
|
264
|
-
pattern: { type: "string", description: "Glob pattern" },
|
|
265
|
-
path: { type: "string", description: "Directory to search in" }
|
|
266
|
-
},
|
|
267
|
-
required: ["pattern"]
|
|
268
|
-
}
|
|
269
|
-
},
|
|
270
|
-
{
|
|
271
|
-
name: "run_command",
|
|
272
|
-
description: "Run a shell command",
|
|
273
|
-
input_schema: {
|
|
274
|
-
type: "object",
|
|
275
|
-
properties: {
|
|
276
|
-
command: { type: "string", description: "Command to run" },
|
|
277
|
-
cwd: { type: "string", description: "Working directory" }
|
|
278
|
-
},
|
|
279
|
-
required: ["command"]
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
];
|
|
283
|
-
if (options.mcpServerPath) {
|
|
284
|
-
tools.push({
|
|
285
|
-
name: "mcp_call",
|
|
286
|
-
description: "Call an MCP tool",
|
|
287
|
-
input_schema: {
|
|
288
|
-
type: "object",
|
|
289
|
-
properties: {
|
|
290
|
-
tool: { type: "string", description: "MCP tool name" },
|
|
291
|
-
args: { type: "object", description: "Tool arguments" }
|
|
292
|
-
},
|
|
293
|
-
required: ["tool"]
|
|
294
|
-
}
|
|
295
|
-
});
|
|
296
|
-
}
|
|
297
|
-
return tools;
|
|
298
|
-
}
|
|
299
|
-
async executeTools(content, options) {
|
|
300
|
-
const results = [];
|
|
301
|
-
for (const block of content) {
|
|
302
|
-
if (block.type === "tool_use" && block.id && block.name) {
|
|
303
|
-
let result;
|
|
304
|
-
try {
|
|
305
|
-
result = await this.executeTool(block.name, block.input || {}, options);
|
|
306
|
-
} catch (error) {
|
|
307
|
-
result = `Error: ${error instanceof Error ? error.message : String(error)}`;
|
|
308
|
-
}
|
|
309
|
-
results.push({
|
|
310
|
-
type: "tool_result",
|
|
311
|
-
tool_use_id: block.id,
|
|
312
|
-
content: result
|
|
313
|
-
});
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
return results;
|
|
317
|
-
}
|
|
318
|
-
async executeTool(name, input, options) {
|
|
319
|
-
const cwd = options.workingDirectory || process.cwd();
|
|
320
|
-
const { execSync } = await import("child_process");
|
|
321
|
-
const fs = await import("fs");
|
|
322
|
-
const path = await import("path");
|
|
323
|
-
const { glob } = await import("glob");
|
|
324
|
-
switch (name) {
|
|
325
|
-
case "read_file": {
|
|
326
|
-
const filePath = path.resolve(cwd, input.path);
|
|
327
|
-
return fs.readFileSync(filePath, "utf-8");
|
|
328
|
-
}
|
|
329
|
-
case "write_file": {
|
|
330
|
-
const filePath = path.resolve(cwd, input.path);
|
|
331
|
-
const dir = path.dirname(filePath);
|
|
332
|
-
if (!fs.existsSync(dir)) {
|
|
333
|
-
fs.mkdirSync(dir, { recursive: true });
|
|
334
|
-
}
|
|
335
|
-
fs.writeFileSync(filePath, input.content);
|
|
336
|
-
return `Written to ${filePath}`;
|
|
337
|
-
}
|
|
338
|
-
case "search_files": {
|
|
339
|
-
const searchPath = input.path ? path.resolve(cwd, input.path) : cwd;
|
|
340
|
-
const files = await glob(input.pattern, { cwd: searchPath });
|
|
341
|
-
return files.join("\n");
|
|
342
|
-
}
|
|
343
|
-
case "run_command": {
|
|
344
|
-
const cmdCwd = input.cwd ? path.resolve(cwd, input.cwd) : cwd;
|
|
345
|
-
const output = execSync(input.command, {
|
|
346
|
-
cwd: cmdCwd,
|
|
347
|
-
encoding: "utf-8",
|
|
348
|
-
timeout: options.timeout || 3e4
|
|
349
|
-
});
|
|
350
|
-
return output;
|
|
351
|
-
}
|
|
352
|
-
case "mcp_call": {
|
|
353
|
-
return `MCP tool ${input.tool} called with ${JSON.stringify(input.args)}`;
|
|
354
|
-
}
|
|
355
|
-
default:
|
|
356
|
-
return `Unknown tool: ${name}`;
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
};
|
|
360
|
-
export {
|
|
361
|
-
ClaudeAgentProvider
|
|
362
|
-
};
|
|
@@ -1,276 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
MODEL_PRICING
|
|
4
|
-
} from "./chunk-5JGJACDU.js";
|
|
5
|
-
import "./chunk-PDX44BCA.js";
|
|
6
|
-
|
|
7
|
-
// src/core/providers/claude-cli.ts
|
|
8
|
-
import * as fs from "fs";
|
|
9
|
-
import * as path from "path";
|
|
10
|
-
import { spawn } from "child_process";
|
|
11
|
-
import { EventEmitter } from "events";
|
|
12
|
-
var ClaudeCliProvider = class {
|
|
13
|
-
name = "claude-cli";
|
|
14
|
-
claudePath = null;
|
|
15
|
-
constructor() {
|
|
16
|
-
}
|
|
17
|
-
listModels() {
|
|
18
|
-
return ["opus", "sonnet", "haiku"];
|
|
19
|
-
}
|
|
20
|
-
supportsParallel() {
|
|
21
|
-
return true;
|
|
22
|
-
}
|
|
23
|
-
supportsMcp() {
|
|
24
|
-
return true;
|
|
25
|
-
}
|
|
26
|
-
getTokenCost(model) {
|
|
27
|
-
return MODEL_PRICING[model];
|
|
28
|
-
}
|
|
29
|
-
async isAvailable() {
|
|
30
|
-
try {
|
|
31
|
-
const { execSync } = await import("child_process");
|
|
32
|
-
const result = execSync("which claude", { encoding: "utf-8" }).trim();
|
|
33
|
-
if (result) {
|
|
34
|
-
this.claudePath = result;
|
|
35
|
-
return true;
|
|
36
|
-
}
|
|
37
|
-
} catch {
|
|
38
|
-
const paths = [
|
|
39
|
-
"/usr/local/bin/claude",
|
|
40
|
-
path.join(process.env.HOME || "", ".local/bin/claude"),
|
|
41
|
-
path.join(process.env.HOME || "", ".claude/bin/claude")
|
|
42
|
-
];
|
|
43
|
-
for (const p of paths) {
|
|
44
|
-
if (fs.existsSync(p)) {
|
|
45
|
-
this.claudePath = p;
|
|
46
|
-
return true;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return false;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Spawn an agent by invoking claude CLI with streaming output
|
|
54
|
-
*/
|
|
55
|
-
async *spawn(agent, options) {
|
|
56
|
-
if (!this.claudePath) {
|
|
57
|
-
yield {
|
|
58
|
-
type: "error",
|
|
59
|
-
content: "Claude CLI not found",
|
|
60
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
61
|
-
};
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
const prompt = this.buildPrompt(agent, options);
|
|
65
|
-
yield {
|
|
66
|
-
type: "text",
|
|
67
|
-
content: `Starting ${agent.name} agent via CLI (streaming)...
|
|
68
|
-
`,
|
|
69
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
70
|
-
};
|
|
71
|
-
const args = [
|
|
72
|
-
"--print",
|
|
73
|
-
// Non-interactive mode
|
|
74
|
-
"--permission-mode",
|
|
75
|
-
"acceptEdits",
|
|
76
|
-
// Auto-accept to avoid prompts
|
|
77
|
-
"--output-format",
|
|
78
|
-
"stream-json",
|
|
79
|
-
// Streaming JSON for real-time output
|
|
80
|
-
"--no-session-persistence"
|
|
81
|
-
// Don't persist session (faster startup)
|
|
82
|
-
];
|
|
83
|
-
if (options.model) {
|
|
84
|
-
args.push("--model", options.model);
|
|
85
|
-
}
|
|
86
|
-
if (options.workingDirectory) {
|
|
87
|
-
args.push("--add-dir", options.workingDirectory);
|
|
88
|
-
}
|
|
89
|
-
args.push("-p", prompt.slice(0, 8e3));
|
|
90
|
-
const messageEmitter = new EventEmitter();
|
|
91
|
-
let totalUsage = { input: 0, output: 0, total: 0 };
|
|
92
|
-
let lastError = null;
|
|
93
|
-
let completed = false;
|
|
94
|
-
const proc = spawn(this.claudePath, args, {
|
|
95
|
-
cwd: options.workingDirectory || process.cwd(),
|
|
96
|
-
env: { ...process.env },
|
|
97
|
-
stdio: ["pipe", "pipe", "pipe"]
|
|
98
|
-
});
|
|
99
|
-
let buffer = "";
|
|
100
|
-
proc.stdout?.on("data", (data) => {
|
|
101
|
-
buffer += data.toString();
|
|
102
|
-
const lines = buffer.split("\n");
|
|
103
|
-
buffer = lines.pop() || "";
|
|
104
|
-
for (const line of lines) {
|
|
105
|
-
if (!line.trim()) continue;
|
|
106
|
-
try {
|
|
107
|
-
const msg = JSON.parse(line);
|
|
108
|
-
messageEmitter.emit("message", msg);
|
|
109
|
-
} catch {
|
|
110
|
-
messageEmitter.emit("text", line);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
proc.stderr?.on("data", (data) => {
|
|
115
|
-
const text = data.toString();
|
|
116
|
-
if (!text.includes("Error")) {
|
|
117
|
-
messageEmitter.emit("progress", text);
|
|
118
|
-
} else {
|
|
119
|
-
lastError = text;
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
proc.on("close", (code) => {
|
|
123
|
-
completed = true;
|
|
124
|
-
messageEmitter.emit("done", code);
|
|
125
|
-
});
|
|
126
|
-
proc.on("error", (err) => {
|
|
127
|
-
lastError = err.message;
|
|
128
|
-
messageEmitter.emit("error", err);
|
|
129
|
-
});
|
|
130
|
-
const timeoutMs = options.timeout || 3 * 60 * 1e3;
|
|
131
|
-
const timeoutHandle = setTimeout(() => {
|
|
132
|
-
proc.kill();
|
|
133
|
-
lastError = `Claude CLI timed out after ${timeoutMs / 1e3}s`;
|
|
134
|
-
messageEmitter.emit("timeout");
|
|
135
|
-
}, timeoutMs);
|
|
136
|
-
const messageQueue = [];
|
|
137
|
-
let resolveNext = null;
|
|
138
|
-
const pushMessage = (msg) => {
|
|
139
|
-
if (resolveNext) {
|
|
140
|
-
resolveNext(msg);
|
|
141
|
-
resolveNext = null;
|
|
142
|
-
} else {
|
|
143
|
-
messageQueue.push(msg);
|
|
144
|
-
}
|
|
145
|
-
};
|
|
146
|
-
messageEmitter.on("message", (msg) => {
|
|
147
|
-
if (msg.type === "assistant" && msg.message?.content) {
|
|
148
|
-
for (const content of msg.message.content) {
|
|
149
|
-
if (content.type === "text" && content.text) {
|
|
150
|
-
pushMessage({
|
|
151
|
-
type: "text",
|
|
152
|
-
content: content.text,
|
|
153
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
154
|
-
});
|
|
155
|
-
} else if (content.type === "tool_use" && content.name) {
|
|
156
|
-
pushMessage({
|
|
157
|
-
type: "tool_use",
|
|
158
|
-
content: `Using tool: ${content.name}`,
|
|
159
|
-
toolName: content.name,
|
|
160
|
-
toolInput: content.input,
|
|
161
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
} else if (msg.type === "result") {
|
|
166
|
-
if (msg.usage) {
|
|
167
|
-
totalUsage = {
|
|
168
|
-
input: msg.usage.input_tokens || 0,
|
|
169
|
-
output: msg.usage.output_tokens || 0,
|
|
170
|
-
total: (msg.usage.input_tokens || 0) + (msg.usage.output_tokens || 0)
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
});
|
|
175
|
-
messageEmitter.on("text", (text) => {
|
|
176
|
-
pushMessage({
|
|
177
|
-
type: "text",
|
|
178
|
-
content: text + "\n",
|
|
179
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
180
|
-
});
|
|
181
|
-
});
|
|
182
|
-
messageEmitter.on("progress", (_text) => {
|
|
183
|
-
pushMessage({
|
|
184
|
-
type: "text",
|
|
185
|
-
content: ".",
|
|
186
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
187
|
-
});
|
|
188
|
-
});
|
|
189
|
-
messageEmitter.on("done", () => {
|
|
190
|
-
clearTimeout(timeoutHandle);
|
|
191
|
-
pushMessage({
|
|
192
|
-
type: "done",
|
|
193
|
-
content: "Agent completed",
|
|
194
|
-
usage: totalUsage,
|
|
195
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
196
|
-
});
|
|
197
|
-
});
|
|
198
|
-
messageEmitter.on("timeout", () => {
|
|
199
|
-
pushMessage({
|
|
200
|
-
type: "error",
|
|
201
|
-
content: lastError || "Timeout",
|
|
202
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
203
|
-
});
|
|
204
|
-
});
|
|
205
|
-
messageEmitter.on("error", (err) => {
|
|
206
|
-
clearTimeout(timeoutHandle);
|
|
207
|
-
pushMessage({
|
|
208
|
-
type: "error",
|
|
209
|
-
content: err.message,
|
|
210
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
211
|
-
});
|
|
212
|
-
});
|
|
213
|
-
while (!completed || messageQueue.length > 0) {
|
|
214
|
-
if (messageQueue.length > 0) {
|
|
215
|
-
const msg = messageQueue.shift();
|
|
216
|
-
yield msg;
|
|
217
|
-
if (msg.type === "done" || msg.type === "error") {
|
|
218
|
-
break;
|
|
219
|
-
}
|
|
220
|
-
} else {
|
|
221
|
-
const msg = await new Promise((resolve) => {
|
|
222
|
-
resolveNext = resolve;
|
|
223
|
-
setTimeout(() => resolve(null), 100);
|
|
224
|
-
});
|
|
225
|
-
if (msg) {
|
|
226
|
-
yield msg;
|
|
227
|
-
if (msg.type === "done" || msg.type === "error") {
|
|
228
|
-
break;
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
if (lastError && !completed) {
|
|
234
|
-
yield {
|
|
235
|
-
type: "error",
|
|
236
|
-
content: lastError,
|
|
237
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
238
|
-
};
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
// ==========================================================================
|
|
242
|
-
// Private Methods
|
|
243
|
-
// ==========================================================================
|
|
244
|
-
buildPrompt(agent, options) {
|
|
245
|
-
const parts = [];
|
|
246
|
-
parts.push(`# ${agent.name.toUpperCase()} Agent`);
|
|
247
|
-
parts.push("");
|
|
248
|
-
parts.push("## Role");
|
|
249
|
-
parts.push(agent.role);
|
|
250
|
-
parts.push("");
|
|
251
|
-
parts.push("## Task");
|
|
252
|
-
parts.push(options.task);
|
|
253
|
-
parts.push("");
|
|
254
|
-
if (options.context.systemPrompt) {
|
|
255
|
-
parts.push("## Context");
|
|
256
|
-
parts.push(options.context.systemPrompt.slice(0, 3e3));
|
|
257
|
-
parts.push("");
|
|
258
|
-
}
|
|
259
|
-
if (options.context.symbols.length > 0) {
|
|
260
|
-
parts.push("## Symbols");
|
|
261
|
-
parts.push(options.context.symbols.join(", "));
|
|
262
|
-
parts.push("");
|
|
263
|
-
}
|
|
264
|
-
if (options.context.handoffContext) {
|
|
265
|
-
parts.push("## From Previous Agent");
|
|
266
|
-
parts.push(options.context.handoffContext);
|
|
267
|
-
parts.push("");
|
|
268
|
-
}
|
|
269
|
-
parts.push("## Instructions");
|
|
270
|
-
parts.push("Complete the task above. Be concise and focused. Keep response under 500 words.");
|
|
271
|
-
return parts.join("\n");
|
|
272
|
-
}
|
|
273
|
-
};
|
|
274
|
-
export {
|
|
275
|
-
ClaudeCliProvider
|
|
276
|
-
};
|