@askexenow/exe-os 0.9.345 → 0.9.347
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/deploy/compose/clickhouse-config.xml +14 -0
- package/dist/{active-agent-6ZH2D6IP.js → active-agent-CMY7WTJL.js} +3 -3
- package/dist/{active-agent-BAWQYSNJ.js → active-agent-US4KO4LV.js} +3 -3
- package/dist/{agentic-ontology-IUFSZUI6.js → agentic-ontology-3Y37SQYR.js} +1 -1
- package/dist/{backfill-metadata-CWMJBLNQ.js → backfill-metadata-GK66TYQE.js} +5 -5
- package/dist/{backup-verify-NMXFX6NR.js → backup-verify-72XBKKHL.js} +1 -1
- package/dist/{behaviors-XZOZKID2.js → behaviors-G7TR6LBM.js} +6 -6
- package/dist/bin/agentic-ontology-backfill.js +6 -6
- package/dist/bin/agentic-reflection-backfill.js +7 -7
- package/dist/bin/agentic-semantic-label.js +6 -6
- package/dist/bin/backfill-conversations.js +5 -5
- package/dist/bin/backfill-responses.js +5 -5
- package/dist/bin/backfill-vectors.js +6 -6
- package/dist/bin/bulk-sync-postgres.js +10 -10
- package/dist/bin/cc-doctor.js +4 -4
- package/dist/bin/cleanup-stale-review-tasks.js +17 -16
- package/dist/bin/cli.js +18 -18
- package/dist/bin/deferred-daemon-restart.js +72 -71
- package/dist/bin/exe-agent-config.js +4 -4
- package/dist/bin/exe-agent.js +7 -7
- package/dist/bin/exe-assign.js +6 -6
- package/dist/bin/exe-boot.js +29 -28
- package/dist/bin/exe-call.js +4 -4
- package/dist/bin/exe-cloud.js +10 -10
- package/dist/bin/exe-config-dump.js +4 -4
- package/dist/bin/exe-dispatch.js +17 -16
- package/dist/bin/exe-doctor.js +4 -4
- package/dist/bin/exe-export-behaviors.js +8 -8
- package/dist/bin/exe-forget.js +7 -7
- package/dist/bin/exe-gateway.js +7 -7
- package/dist/bin/exe-healthcheck.js +4 -4
- package/dist/bin/exe-heartbeat.js +19 -18
- package/dist/bin/exe-kill.js +21 -20
- package/dist/bin/exe-launch-agent.js +26 -25
- package/dist/bin/exe-mcp.js +494 -0
- package/dist/bin/exe-memory-reads.js +5 -5
- package/dist/bin/exe-new-employee.js +8 -8
- package/dist/bin/exe-os-mcp-proxy.js +46 -10
- package/dist/bin/exe-pending-messages.js +18 -17
- package/dist/bin/exe-pending-notifications.js +17 -16
- package/dist/bin/exe-pending-reviews.js +17 -16
- package/dist/bin/exe-rename.js +4 -4
- package/dist/bin/exe-review.js +20 -19
- package/dist/bin/exe-search.js +6 -6
- package/dist/bin/exe-session-cleanup.js +21 -20
- package/dist/bin/exe-settings.js +12 -12
- package/dist/bin/exe-start-codex.js +54 -28
- package/dist/bin/exe-start-opencode.js +10 -10
- package/dist/bin/exe-status.js +18 -17
- package/dist/bin/exe-support.js +3 -3
- package/dist/bin/exe-team.js +3 -3
- package/dist/bin/git-sweep.js +18 -17
- package/dist/bin/graph-backfill.js +6 -6
- package/dist/bin/graph-export.js +6 -6
- package/dist/bin/import-history.js +9 -9
- package/dist/bin/install.js +74 -73
- package/dist/bin/intercom-check.js +4 -4
- package/dist/bin/mcp-sessions.js +2 -2
- package/dist/bin/orchestration-metrics.js +4 -4
- package/dist/bin/postgres-agentic-reflection-backfill.js +2 -2
- package/dist/bin/postgres-agentic-semantic-backfill.js +1 -1
- package/dist/bin/reconcile-backlog.js +2 -2
- package/dist/bin/registry-proxy.js +1 -1
- package/dist/bin/scan-tasks.js +17 -16
- package/dist/bin/setup.js +2 -2
- package/dist/bin/shard-migrate.js +5 -5
- package/dist/bin/stack-update.js +4 -4
- package/dist/bin/vps-health-gate.js +1 -1
- package/dist/{boot-generation-OTC2ESGV.js → boot-generation-KG43UYL4.js} +3 -3
- package/dist/{boot-review-sections-RXFU3QRA.js → boot-review-sections-56BRURLM.js} +16 -15
- package/dist/{capability-cards-HOOLOBCU.js → capability-cards-4MN3IVJO.js} +2 -2
- package/dist/{capacity-monitor-SFLPNE7M.js → capacity-monitor-4NJTN5QQ.js} +18 -17
- package/dist/{catchup-brief-YUCZX3CR.js → catchup-brief-AMBXLHXU.js} +21 -20
- package/dist/{chunk-REH7YNV4.js → chunk-2BOEUPL6.js} +1 -1
- package/dist/{chunk-W5SRIJU4.js → chunk-2ESYTX6F.js} +1 -1
- package/dist/{chunk-6YH44JOY.js → chunk-2LZMDOC6.js} +55 -10
- package/dist/{chunk-ZXQRVYRS.js → chunk-3EMAJBBN.js} +10 -6
- package/dist/{chunk-4SBOGUGG.js → chunk-3HGAAWNZ.js} +5 -5
- package/dist/{chunk-6RYNOXTC.js → chunk-3LQMUO5D.js} +3 -3
- package/dist/{chunk-CKZ7CI55.js → chunk-3T4BRBSH.js} +1 -1
- package/dist/{chunk-B77H77VF.js → chunk-4K2PLZKF.js} +1 -1
- package/dist/{chunk-GGVP2B2O.js → chunk-4P7NUL4D.js} +5 -2
- package/dist/{chunk-XM3EARTG.js → chunk-4VLRGKNY.js} +2 -2
- package/dist/{chunk-PISA226N.js → chunk-53VXPGZ2.js} +2 -2
- package/dist/{chunk-XQASVF7H.js → chunk-7667KFAG.js} +77 -22
- package/dist/{chunk-FABOJ6IJ.js → chunk-7AD4GSRT.js} +3 -3
- package/dist/{chunk-IGF7YLMD.js → chunk-7DAJHBFH.js} +1 -1
- package/dist/{chunk-DWNRLCUQ.js → chunk-AHR3F7HW.js} +1 -1
- package/dist/{chunk-O7LWR36Z.js → chunk-AJIXH5JF.js} +122 -19
- package/dist/{chunk-6Z6ZVYHA.js → chunk-BMTUSSHV.js} +1 -1
- package/dist/{chunk-SDC5XIA5.js → chunk-BRVDGE7N.js} +4 -4
- package/dist/{chunk-ENVO4NIX.js → chunk-CNIAEIWV.js} +1 -1
- package/dist/{chunk-5A5LNAMW.js → chunk-DBDMZTU5.js} +1 -1
- package/dist/{chunk-WT6YYIEL.js → chunk-DNN27P35.js} +4 -4
- package/dist/{chunk-TLQDDKU4.js → chunk-DSGFX3RT.js} +40 -10
- package/dist/{chunk-YESAKOJE.js → chunk-DZJL775P.js} +1 -1
- package/dist/{chunk-VNYSLHHX.js → chunk-EWWCMMES.js} +488 -77
- package/dist/{chunk-MJJJSU6M.js → chunk-EYWB6526.js} +3 -3
- package/dist/{chunk-Q5I5MLKV.js → chunk-F4ZW76IX.js} +1 -1
- package/dist/{chunk-T5BGKRYS.js → chunk-F6NABQJ4.js} +2 -2
- package/dist/{chunk-E5XAVXQG.js → chunk-FAH7JUNS.js} +171 -46
- package/dist/{chunk-RF3O2OZL.js → chunk-FBSAXAXQ.js} +2 -2
- package/dist/{chunk-ORVC4XVZ.js → chunk-FDOURKUO.js} +1 -1
- package/dist/{chunk-OYDXYENC.js → chunk-FJPZ7KHN.js} +1 -1
- package/dist/{chunk-7IE3NPBV.js → chunk-FM4ZI5ZP.js} +1 -1
- package/dist/{chunk-R26I3YCN.js → chunk-G4HOMQY7.js} +1 -1
- package/dist/{chunk-EK2R7ORH.js → chunk-G6IANQKD.js} +1 -1
- package/dist/{chunk-AEVN4MPT.js → chunk-H44V3Y6D.js} +1 -1
- package/dist/{chunk-XDO4DVSB.js → chunk-HWK5GKE6.js} +1 -1
- package/dist/{chunk-NLVOLANR.js → chunk-I3XN3G3H.js} +208 -162
- package/dist/{chunk-P376KDEZ.js → chunk-ILLBFFY6.js} +2 -2
- package/dist/{chunk-DUO4WGDT.js → chunk-IMHERTUL.js} +3 -3
- package/dist/{chunk-7DZYO3Z5.js → chunk-IRMJHC23.js} +2 -2
- package/dist/{chunk-MI7OSFOA.js → chunk-JLYQD2XF.js} +1 -1
- package/dist/{chunk-437JTUZZ.js → chunk-JYFBQH5O.js} +9 -9
- package/dist/{chunk-442L6MA5.js → chunk-K3ZHVW26.js} +4 -4
- package/dist/{chunk-4YXTASUU.js → chunk-KI5PFRG6.js} +26 -1
- package/dist/{chunk-4LZLQ3ZK.js → chunk-KWRO4RMT.js} +3 -3
- package/dist/{chunk-QGNOYTSU.js → chunk-LJGHAZYU.js} +7 -7
- package/dist/{chunk-W4IUPJJ2.js → chunk-M3NSYVE3.js} +5 -5
- package/dist/{chunk-UBJRI2UU.js → chunk-M722B4DA.js} +1 -1
- package/dist/{chunk-U6NQ6OEU.js → chunk-MESFJRIT.js} +1 -1
- package/dist/{chunk-SDPOSTDC.js → chunk-MT6YGWJ6.js} +1 -1
- package/dist/{chunk-MHTDXXXW.js → chunk-OE6D2IJI.js} +5 -5
- package/dist/{chunk-GWDSB25T.js → chunk-OSKWCKUC.js} +1 -1
- package/dist/{chunk-WYMGEGOM.js → chunk-PEVOVM3W.js} +4 -4
- package/dist/{chunk-MDIVCWQW.js → chunk-PO64LWTM.js} +9 -9
- package/dist/{chunk-WD6PJ7IY.js → chunk-PRUZNNEF.js} +4 -4
- package/dist/{chunk-BG4Q4ZUW.js → chunk-PYNWGP72.js} +1 -1
- package/dist/{chunk-ILBB65TX.js → chunk-QFGUAJ6T.js} +2 -2
- package/dist/{chunk-IYCE7UES.js → chunk-QIALRZZG.js} +1 -1
- package/dist/{chunk-CBWJ5DRL.js → chunk-QZA5NG6Z.js} +1 -1
- package/dist/{chunk-LF4DHB5A.js → chunk-SUG5P42S.js} +14 -4
- package/dist/{chunk-SNJLKMCY.js → chunk-SVFNWBLF.js} +26 -4
- package/dist/{chunk-GY6VSMMB.js → chunk-T7ZLJZAO.js} +1 -1
- package/dist/{chunk-XWD6F6EZ.js → chunk-TQSAPNFW.js} +40 -30
- package/dist/{chunk-SFT7M6MC.js → chunk-UMK7TNCF.js} +107 -47
- package/dist/{chunk-B3Z6LHVV.js → chunk-UO56K55W.js} +31 -6
- package/dist/{chunk-CBZPE5J4.js → chunk-UVPLZ6AK.js} +2 -2
- package/dist/{chunk-PW557TJV.js → chunk-VA3ZUIWG.js} +1 -1
- package/dist/{chunk-V3AZC2K6.js → chunk-VALVWYAK.js} +104 -11
- package/dist/{chunk-TNZSK6L7.js → chunk-VBHLE3TR.js} +1 -0
- package/dist/{chunk-JFLUUBQK.js → chunk-VDJUATQJ.js} +1 -1
- package/dist/{chunk-LOK3PZP3.js → chunk-VDKDW5IA.js} +17 -18
- package/dist/{chunk-IM6FMNTO.js → chunk-VMTKHDFM.js} +3 -3
- package/dist/{chunk-7TZ6HV4G.js → chunk-VTMSGELG.js} +6 -3
- package/dist/{chunk-4FYXYJUX.js → chunk-W666YWFU.js} +3 -3
- package/dist/{chunk-UHUODLGJ.js → chunk-W7HKGDJO.js} +3 -3
- package/dist/{chunk-NGP6LSV2.js → chunk-WNBZJSQT.js} +10 -1
- package/dist/{chunk-Q7LTWGQK.js → chunk-WOKPKILI.js} +1 -1
- package/dist/{chunk-JELPA53I.js → chunk-XDVLCS64.js} +1 -1
- package/dist/{chunk-OJBWWOSM.js → chunk-XOVHWGPV.js} +1 -1
- package/dist/{chunk-QEHVKL27.js → chunk-XRX7F7XW.js} +1 -1
- package/dist/{chunk-LEESW32W.js → chunk-Y7637VDZ.js} +2 -2
- package/dist/{chunk-QHDUGZVP.js → chunk-YJK4JZ35.js} +3 -3
- package/dist/{chunk-BLV57HND.js → chunk-YSTIPPZK.js} +1 -1
- package/dist/{chunk-7WGEZ5WM.js → chunk-Z7DWUHDP.js} +1 -1
- package/dist/{chunk-RSMOYIVR.js → chunk-ZK53K7OR.js} +1 -1
- package/dist/{chunk-3BO6S3L2.js → chunk-ZY2ABBVR.js} +144 -103
- package/dist/{chunk-WFEOKA2T.js → chunk-ZYNQXN73.js} +4 -4
- package/dist/{cleanup-graph-garbage-EVPEOMIW.js → cleanup-graph-garbage-5HKGGUS3.js} +10 -6
- package/dist/{cloud-sync-shutdown-QVXYVLWQ.js → cloud-sync-shutdown-2JAEIAW6.js} +2 -2
- package/dist/{co-activation-XGBTXQAN.js → co-activation-SYSIFY66.js} +2 -2
- package/dist/{co-occurrence-ZQAKCA5V.js → co-occurrence-QZFT5ORJ.js} +8 -4
- package/dist/{conversation-entity-extractor-CVJ43JCX.js → conversation-entity-extractor-YC3A2ODD.js} +6 -2
- package/dist/{crdt-sync-FQIHFFCI.js → crdt-sync-W45AKWCU.js} +1 -1
- package/dist/{crm-webhook-IA2N224B.js → crm-webhook-ZAGDYWB3.js} +2 -2
- package/dist/{cto-delegation-gate-5OUCWJYA.js → cto-delegation-gate-PLSICYEK.js} +16 -15
- package/dist/{daemon-orchestration-7XWMZXN4.js → daemon-orchestration-QX3FS4L2.js} +26 -21
- package/dist/{daemon-ready-QGU7MZZB.js → daemon-ready-56VAPZU6.js} +1 -1
- package/dist/{db-verify-stamp-YTRPEKZ5.js → db-verify-stamp-P2FCVTXK.js} +1 -1
- package/dist/{dispatch-ack-VYH3ONSS.js → dispatch-ack-AZL3WKCK.js} +1 -1
- package/dist/{doc-graph-extractor-VZ6SE7BC.js → doc-graph-extractor-NK6CP4LE.js} +8 -4
- package/dist/{documents-7ZVGEZ2X.js → documents-FGXV6BDL.js} +6 -6
- package/dist/{dreaming-GANGWVRH.js → dreaming-YIESEME7.js} +20 -19
- package/dist/{exe-drift-X62H7KFD.js → exe-drift-TLY7MCXW.js} +3 -3
- package/dist/{exe-export-DZNDPQ7I.js → exe-export-32J4WPS6.js} +7 -7
- package/dist/{exe-import-JZ4BOQUV.js → exe-import-MDEWE325.js} +7 -7
- package/dist/{exe-key-RWMZZOJI.js → exe-key-NW42YUA3.js} +72 -71
- package/dist/{exe-snapshot-VTGR53OI.js → exe-snapshot-NNEEAGYI.js} +21 -20
- package/dist/{fast-db-init-CZSSDWDG.js → fast-db-init-O7AECNTB.js} +1 -1
- package/dist/{founder-context-7OKZVVEH.js → founder-context-3WDZ6LIS.js} +2 -2
- package/dist/gateway/index.js +11 -11
- package/dist/{git-staleness-JN7YOMDP.js → git-staleness-GEJ7U4MW.js} +2 -2
- package/dist/{global-procedures-NOJL7AQ7.js → global-procedures-HY3BJXY4.js} +3 -3
- package/dist/{graph-auto-extract-DNY7O7YL.js → graph-auto-extract-DBAIFNDK.js} +8 -4
- package/dist/{graph-rag-HHNAX7YO.js → graph-rag-LWKKHY72.js} +6 -2
- package/dist/{hook-prefetch-LYJMDLRJ.js → hook-prefetch-KNHZNI4L.js} +17 -16
- package/dist/hooks/bug-report-worker.js +19 -19
- package/dist/hooks/codex-stop-task-finalizer.js +20 -20
- package/dist/hooks/commit-complete.js +19 -18
- package/dist/hooks/error-recall.js +7 -7
- package/dist/hooks/exe-heartbeat-hook.js +3 -3
- package/dist/hooks/ingest.js +6 -6
- package/dist/hooks/instructions-loaded.js +4 -4
- package/dist/hooks/manifest.json +19 -19
- package/dist/hooks/notification.js +4 -4
- package/dist/hooks/post-compact.js +18 -17
- package/dist/hooks/post-tool-combined.js +9 -9
- package/dist/hooks/pre-compact.js +19 -18
- package/dist/hooks/pre-tool-use.js +84 -44
- package/dist/hooks/prompt-submit.js +36 -35
- package/dist/hooks/session-end.js +23 -22
- package/dist/hooks/session-start.js +44 -23
- package/dist/hooks/stop.js +22 -21
- package/dist/hooks/subagent-stop.js +20 -19
- package/dist/hooks/summary-worker.js +23 -22
- package/dist/index.js +28 -27
- package/dist/{installer-KBK7EE3F.js → installer-AWALPCAX.js} +5 -5
- package/dist/{installer-EWFK5EBH.js → installer-R2S64Q6T.js} +5 -5
- package/dist/{installer-6O3XLAQ5.js → installer-SQF5I6YS.js} +5 -5
- package/dist/{intercom-queue-EOYSBHUA.js → intercom-queue-SJL4G3J5.js} +16 -15
- package/dist/lib/agent-config.js +2 -2
- package/dist/lib/cloud-sync.js +14 -10
- package/dist/lib/consolidation.js +7 -7
- package/dist/lib/database.js +2 -2
- package/dist/lib/db-backup.js +1 -1
- package/dist/lib/db-write-worker.js +2 -2
- package/dist/lib/db.js +2 -2
- package/dist/lib/device-registry.js +1 -1
- package/dist/lib/employee-templates.js +4 -4
- package/dist/lib/employees.js +2 -2
- package/dist/lib/exe-daemon.js +248 -194
- package/dist/lib/hybrid-search.js +6 -6
- package/dist/lib/identity.js +2 -2
- package/dist/lib/license.js +2 -2
- package/dist/lib/messaging.js +17 -16
- package/dist/lib/registry-proxy.js +1 -1
- package/dist/lib/reminders.js +3 -3
- package/dist/lib/runtime-table.js +9 -3
- package/dist/lib/schedules.js +6 -6
- package/dist/lib/session-registry.js +4 -4
- package/dist/lib/skill-learning.js +7 -7
- package/dist/lib/store.js +5 -5
- package/dist/lib/task-router.js +3 -3
- package/dist/lib/tasks.js +18 -18
- package/dist/lib/tmux-routing.js +16 -15
- package/dist/lib/token-spend.js +3 -3
- package/dist/{license-gate-WO3NO5FX.js → license-gate-ZYZQGPKW.js} +3 -3
- package/dist/{license-sync-QRG2TCBR.js → license-sync-GU3L66JR.js} +2 -2
- package/dist/mcp/register-tools.js +71 -70
- package/dist/mcp/server.js +72 -71
- package/dist/mcp/tools/complete-reminder.js +4 -4
- package/dist/mcp/tools/create-reminder.js +4 -4
- package/dist/mcp/tools/create-task.js +20 -20
- package/dist/mcp/tools/deactivate-behavior.js +8 -8
- package/dist/mcp/tools/list-reminders.js +4 -4
- package/dist/mcp/tools/list-tasks.js +20 -20
- package/dist/mcp/tools/send-message.js +19 -18
- package/dist/mcp/tools/update-task.js +19 -19
- package/dist/{mcp-http-config-A2SKBXA6.js → mcp-http-config-BV2GO7P4.js} +3 -3
- package/dist/{mcp-session-identity-PGAE4IB2.js → mcp-session-identity-3QQPOGNI.js} +16 -15
- package/dist/{memory-cards-BMHZILXL.js → memory-cards-NISTO4EP.js} +5 -5
- package/dist/{memory-graph-extractor-5EDOSSZH.js → memory-graph-extractor-CO3R5K7L.js} +9 -5
- package/dist/{memory-poisoning-defense-OV75EWM6.js → memory-poisoning-defense-QZCG3BMC.js} +2 -2
- package/dist/{memory-pressure-watchdog-MEB53N4D.js → memory-pressure-watchdog-VWQM3GXR.js} +17 -16
- package/dist/{memory-reflection-KRYBPDHC.js → memory-reflection-G32OQ3X3.js} +2 -2
- package/dist/{notification-ledger-XPT4GVNX.js → notification-ledger-C3J4HFMM.js} +17 -16
- package/dist/{notifications-XTLG4LEM.js → notifications-JIARMDZ5.js} +16 -15
- package/dist/{orchestration-events-ZZQZCV4J.js → orchestration-events-AL7AWHBX.js} +3 -3
- package/dist/{orchestrator-YXNVVWAA.js → orchestrator-LWVALDUO.js} +18 -17
- package/dist/{pipeline-router-4RBSYZND.js → pipeline-router-HK5BI3LQ.js} +3 -3
- package/dist/{plan-limits-5P5GMLKB.js → plan-limits-4LMRHOUW.js} +5 -5
- package/dist/{projection-worker-72KRZL37.js → projection-worker-Z5U6UWCE.js} +2 -2
- package/dist/{prospective-memory-HEF2QHEU.js → prospective-memory-UDQWFP5Y.js} +2 -2
- package/dist/{reranker-DA7FSOUJ.js → reranker-FX4QOK2G.js} +1 -1
- package/dist/{retrieval-health-MHNE5SSF.js → retrieval-health-2LIKKDMW.js} +1 -1
- package/dist/{review-polling-GYKRBUX2.js → review-polling-B2EP4KGE.js} +17 -16
- package/dist/runtime/index.js +24 -23
- package/dist/{session-events-Q5IYAH44.js → session-events-HVYX42HD.js} +17 -16
- package/dist/{session-kill-telemetry-P3P3U6TE.js → session-kill-telemetry-BHKUHSK2.js} +17 -16
- package/dist/{session-scope-GHM4GKYR.js → session-scope-TXCBVOSN.js} +16 -15
- package/dist/{setup-wizard-5D56CWVZ.js → setup-wizard-QMKBAK6B.js} +2 -2
- package/dist/{skill-refinement-M24DG2TN.js → skill-refinement-G6BPD6QK.js} +3 -3
- package/dist/{stack-update-ABMTXOZR.js → stack-update-CBP5S5BG.js} +3 -3
- package/dist/{steward-gate-DYQP3BWO.js → steward-gate-CGP6U7KC.js} +3 -3
- package/dist/{support-inbox-5AG4QTKQ.js → support-inbox-3ATAP7KN.js} +3 -3
- package/dist/{sweep-budget-74FIUNX3.js → sweep-budget-KMPJ7O5Z.js} +5 -1
- package/dist/{task-enforcement-6FLLHH43.js → task-enforcement-YINAK3T6.js} +17 -16
- package/dist/{task-scope-RR34UA2U.js → task-scope-5OSP2MUP.js} +16 -15
- package/dist/{tasks-crud-VI7Q65IE.js → tasks-crud-PTN36B5F.js} +22 -15
- package/dist/{tasks-notify-MLE2AVHJ.js → tasks-notify-QCJXVZCJ.js} +17 -17
- package/dist/{tasks-review-WR3XEADY.js → tasks-review-ZY3S65OV.js} +16 -15
- package/dist/{telemetry-upload-LIJY4IB7.js → telemetry-upload-Z47OEELW.js} +7 -7
- package/dist/{token-budget-JTSFQTWP.js → token-budget-B3OKOYDA.js} +3 -3
- package/dist/{tool-telemetry-L62XZXK5.js → tool-telemetry-KIHAHUPT.js} +1 -1
- package/dist/tui/App.js +24 -23
- package/dist/{tui-data-LY27NK2Z.js → tui-data-YIFXHE2D.js} +16 -15
- package/dist/{update-support-G2XWFHEH.js → update-support-IZUWVU2U.js} +9 -9
- package/dist/{work-state-heartbeat-QCLCEQV3.js → work-state-heartbeat-WIURKX3N.js} +1 -1
- package/dist/{worker-gate-XJJXOMUN.js → worker-gate-NZRA426F.js} +1 -1
- package/dist/{workflow-engine-55LTMEXZ.js → workflow-engine-LAB6TGBZ.js} +2 -2
- package/dist/{worktree-EEW45PPV.js → worktree-TBUUZJHY.js} +4 -4
- package/dist/{worktree-sweep-PBDRKK7L.js → worktree-sweep-LXDNIZPM.js} +5 -5
- package/package.json +1 -1
- package/release-notes.json +53 -89
- package/dist/exe-mcp-GCZLSGCO.js +0 -286
- /package/dist/{chunk-IGAODB3D.js → chunk-CYI2YR56.js} +0 -0
- /package/dist/{chunk-EJVVGC6C.js → chunk-D4UCBR4O.js} +0 -0
- /package/dist/{chunk-IUMAJIHE.js → chunk-FFUEDKYK.js} +0 -0
- /package/dist/{chunk-4RM3364E.js → chunk-G4JZ22KK.js} +0 -0
- /package/dist/{chunk-SPV2RTA4.js → chunk-MA22RV3T.js} +0 -0
- /package/dist/{chunk-KHIBBGMT.js → chunk-MDK7E653.js} +0 -0
- /package/dist/{chunk-5OVON46B.js → chunk-OG2RT4IY.js} +0 -0
- /package/dist/{chunk-V7RT3NZH.js → chunk-QPNXYGWG.js} +0 -0
- /package/dist/{chunk-DQOBH5VO.js → chunk-SJLZ53ZR.js} +0 -0
- /package/dist/{core-memory-X3FUV5X3.js → core-memory-FOW4BCPN.js} +0 -0
- /package/dist/{oauth-server-XKEJ4LE5.js → oauth-server-OR4RAQYM.js} +0 -0
- /package/dist/{project-boot-XBUAQWVL.js → project-boot-WP54EOAG.js} +0 -0
- /package/dist/{wiki-acl-D3CNNLP5.js → wiki-acl-4DQQCP4V.js} +0 -0
|
@@ -0,0 +1,494 @@
|
|
|
1
|
+
import "../chunk-MLKGABMK.js";
|
|
2
|
+
|
|
3
|
+
// src/bin/exe-mcp.ts
|
|
4
|
+
import { copyFileSync, existsSync, mkdirSync, readdirSync, readFileSync, renameSync, rmSync, statSync, writeFileSync } from "fs";
|
|
5
|
+
import os from "os";
|
|
6
|
+
import path from "path";
|
|
7
|
+
function isJsonObject(value) {
|
|
8
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
9
|
+
}
|
|
10
|
+
function objectKeys(value) {
|
|
11
|
+
return isJsonObject(value) ? Object.keys(value) : [];
|
|
12
|
+
}
|
|
13
|
+
function projectEntry(config, projectPath) {
|
|
14
|
+
const projects = config.projects;
|
|
15
|
+
if (!isJsonObject(projects)) return void 0;
|
|
16
|
+
const entry = projects[projectPath];
|
|
17
|
+
return isJsonObject(entry) ? entry : void 0;
|
|
18
|
+
}
|
|
19
|
+
function stringArray(value) {
|
|
20
|
+
return Array.isArray(value) ? value.filter((item) => typeof item === "string") : [];
|
|
21
|
+
}
|
|
22
|
+
function statusFromEnabled(enabled) {
|
|
23
|
+
return enabled === false ? "INACTIVE" : "ACTIVE";
|
|
24
|
+
}
|
|
25
|
+
function buildClaudeMcpStatus(config, projectPath, configPath = defaultClaudeJsonPath()) {
|
|
26
|
+
if (!isJsonObject(config)) {
|
|
27
|
+
throw new Error("Claude JSON root must be an object");
|
|
28
|
+
}
|
|
29
|
+
const userNames = objectKeys(config.mcpServers);
|
|
30
|
+
const project = projectEntry(config, projectPath);
|
|
31
|
+
const projectNames = project ? objectKeys(project.mcpServers) : [];
|
|
32
|
+
const disabledNames = project ? stringArray(project.disabledMcpServers) : [];
|
|
33
|
+
const disabledSet = new Set(disabledNames);
|
|
34
|
+
const knownNames = /* @__PURE__ */ new Set([...userNames, ...projectNames]);
|
|
35
|
+
const rows = [
|
|
36
|
+
...userNames.map((name) => ({
|
|
37
|
+
name,
|
|
38
|
+
runtime: "claude",
|
|
39
|
+
scope: "user",
|
|
40
|
+
status: disabledSet.has(name) ? "INACTIVE" : "ACTIVE",
|
|
41
|
+
configPath
|
|
42
|
+
})),
|
|
43
|
+
...projectNames.map((name) => ({
|
|
44
|
+
name,
|
|
45
|
+
runtime: "claude",
|
|
46
|
+
scope: "project",
|
|
47
|
+
status: disabledSet.has(name) ? "INACTIVE" : "ACTIVE",
|
|
48
|
+
configPath
|
|
49
|
+
})),
|
|
50
|
+
...disabledNames.filter((name, index) => !knownNames.has(name) && disabledNames.indexOf(name) === index).map((name) => ({
|
|
51
|
+
name,
|
|
52
|
+
runtime: "claude",
|
|
53
|
+
scope: "external",
|
|
54
|
+
status: "INACTIVE",
|
|
55
|
+
configPath
|
|
56
|
+
}))
|
|
57
|
+
];
|
|
58
|
+
return {
|
|
59
|
+
projectPath,
|
|
60
|
+
rows,
|
|
61
|
+
notes: project ? [] : [`Claude project entry missing for ${projectPath}; run claude in this directory before toggling Claude project MCP servers.`]
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
function buildMcpStatus(config, projectPath) {
|
|
65
|
+
const report = buildClaudeMcpStatus(config, projectPath);
|
|
66
|
+
const projectExists = isJsonObject(config) && Boolean(projectEntry(config, projectPath));
|
|
67
|
+
return {
|
|
68
|
+
...report,
|
|
69
|
+
projectExists,
|
|
70
|
+
note: report.notes[0]
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
function parseArgs(args) {
|
|
74
|
+
const parsed = { json: false, rest: [] };
|
|
75
|
+
for (let i = 0; i < args.length; i++) {
|
|
76
|
+
const arg = args[i];
|
|
77
|
+
if (arg === "--json") {
|
|
78
|
+
parsed.json = true;
|
|
79
|
+
} else if (arg === "--project") {
|
|
80
|
+
const value = args[i + 1];
|
|
81
|
+
if (!value) return { ...parsed, error: "Missing value for --project" };
|
|
82
|
+
parsed.project = value;
|
|
83
|
+
i++;
|
|
84
|
+
} else if (arg === "--runtime") {
|
|
85
|
+
const value = args[i + 1];
|
|
86
|
+
if (!value) return { ...parsed, error: "Missing value for --runtime" };
|
|
87
|
+
if (!isRuntime(value) && value !== "all") {
|
|
88
|
+
return { ...parsed, error: `Unknown runtime: ${value}` };
|
|
89
|
+
}
|
|
90
|
+
parsed.runtime = value;
|
|
91
|
+
i++;
|
|
92
|
+
} else if (arg?.startsWith("--")) {
|
|
93
|
+
return { ...parsed, error: `Unknown option: ${arg}` };
|
|
94
|
+
} else if (arg) {
|
|
95
|
+
parsed.rest.push(arg);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return parsed;
|
|
99
|
+
}
|
|
100
|
+
function isRuntime(value) {
|
|
101
|
+
return value === "claude" || value === "codex" || value === "opencode";
|
|
102
|
+
}
|
|
103
|
+
function selectedRuntimes(runtime) {
|
|
104
|
+
return runtime && runtime !== "all" ? [runtime] : ["claude", "codex", "opencode"];
|
|
105
|
+
}
|
|
106
|
+
function resolveProjectPath(project, cwd) {
|
|
107
|
+
if (!project) return path.resolve(cwd);
|
|
108
|
+
return path.isAbsolute(project) ? path.resolve(project) : path.resolve(cwd, project);
|
|
109
|
+
}
|
|
110
|
+
function usage() {
|
|
111
|
+
return `Usage:
|
|
112
|
+
exe-os mcp [list] [--runtime claude|codex|opencode|all] [--project <path>] [--json]
|
|
113
|
+
exe-os mcp disable <name> [--runtime claude|codex|opencode|all] [--project <path>]
|
|
114
|
+
exe-os mcp enable <name> [--runtime claude|codex|opencode|all] [--project <path>]
|
|
115
|
+
`;
|
|
116
|
+
}
|
|
117
|
+
function defaultClaudeJsonPath() {
|
|
118
|
+
return path.join(os.homedir(), ".claude.json");
|
|
119
|
+
}
|
|
120
|
+
function defaultCodexConfigPath() {
|
|
121
|
+
return path.join(os.homedir(), ".codex", "config.toml");
|
|
122
|
+
}
|
|
123
|
+
function defaultOpenCodeConfigPath() {
|
|
124
|
+
return path.join(os.homedir(), ".config", "opencode", "opencode.json");
|
|
125
|
+
}
|
|
126
|
+
function defaultBackupDir() {
|
|
127
|
+
return path.join(os.homedir(), ".exe-os", "mcp-config-backups");
|
|
128
|
+
}
|
|
129
|
+
function runtimePaths(opts) {
|
|
130
|
+
return {
|
|
131
|
+
claude: opts.claudeJsonPath ?? defaultClaudeJsonPath(),
|
|
132
|
+
codex: opts.codexConfigPath ?? defaultCodexConfigPath(),
|
|
133
|
+
opencode: opts.opencodeConfigPath ?? defaultOpenCodeConfigPath()
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
function readJsonConfig(filePath, label) {
|
|
137
|
+
const raw = readFileSync(filePath, "utf8");
|
|
138
|
+
let parsed;
|
|
139
|
+
try {
|
|
140
|
+
parsed = JSON.parse(raw);
|
|
141
|
+
} catch (err) {
|
|
142
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
143
|
+
throw new Error(`Failed to parse ${label} at ${filePath}: ${message}`);
|
|
144
|
+
}
|
|
145
|
+
if (!isJsonObject(parsed)) {
|
|
146
|
+
throw new Error(`${label} at ${filePath} must contain an object at the top level.`);
|
|
147
|
+
}
|
|
148
|
+
return { raw, config: parsed };
|
|
149
|
+
}
|
|
150
|
+
function readRuntimeConfig(runtime, filePath) {
|
|
151
|
+
if (!existsSync(filePath)) return void 0;
|
|
152
|
+
if (runtime === "claude") {
|
|
153
|
+
const { raw: raw2, config } = readJsonConfig(filePath, "Claude JSON");
|
|
154
|
+
return { runtime, path: filePath, raw: raw2, config };
|
|
155
|
+
}
|
|
156
|
+
if (runtime === "opencode") {
|
|
157
|
+
const { raw: raw2, config } = readJsonConfig(filePath, "OpenCode JSON");
|
|
158
|
+
return { runtime, path: filePath, raw: raw2, config };
|
|
159
|
+
}
|
|
160
|
+
const raw = readFileSync(filePath, "utf8");
|
|
161
|
+
return { runtime, path: filePath, raw, sections: parseCodexMcpSections(raw) };
|
|
162
|
+
}
|
|
163
|
+
function readRuntimeConfigs(paths, runtimes) {
|
|
164
|
+
const configs = [];
|
|
165
|
+
for (const runtime of runtimes) {
|
|
166
|
+
const config = readRuntimeConfig(runtime, paths[runtime]);
|
|
167
|
+
if (config) configs.push(config);
|
|
168
|
+
}
|
|
169
|
+
return configs;
|
|
170
|
+
}
|
|
171
|
+
function parseCodexMcpName(rawName) {
|
|
172
|
+
const trimmed = rawName.trim();
|
|
173
|
+
if (trimmed.startsWith('"') && trimmed.endsWith('"')) {
|
|
174
|
+
try {
|
|
175
|
+
const parsed = JSON.parse(trimmed);
|
|
176
|
+
if (typeof parsed === "string") return parsed;
|
|
177
|
+
} catch {
|
|
178
|
+
return trimmed.slice(1, -1);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
return trimmed;
|
|
182
|
+
}
|
|
183
|
+
function parseCodexMcpSections(raw) {
|
|
184
|
+
const headerRegex = /^\[mcp_servers\.([^\]\n]+)\][ \t]*$/gm;
|
|
185
|
+
const headers = [...raw.matchAll(headerRegex)];
|
|
186
|
+
return headers.map((match, index) => {
|
|
187
|
+
const start = match.index ?? 0;
|
|
188
|
+
const headerEnd = start + match[0].length;
|
|
189
|
+
const afterHeader = raw.slice(headerEnd);
|
|
190
|
+
const nextSection = afterHeader.match(/\n\[[^\]\n]+\][ \t]*(?:\n|$)/);
|
|
191
|
+
const nextMcpHeader = headers[index + 1]?.index;
|
|
192
|
+
const regexEnd = nextSection?.index == null ? raw.length : headerEnd + nextSection.index;
|
|
193
|
+
const end = nextMcpHeader == null ? regexEnd : Math.min(regexEnd, nextMcpHeader);
|
|
194
|
+
const body = raw.slice(headerEnd, end);
|
|
195
|
+
return {
|
|
196
|
+
name: parseCodexMcpName(match[1] ?? ""),
|
|
197
|
+
start,
|
|
198
|
+
end,
|
|
199
|
+
headerEnd,
|
|
200
|
+
body
|
|
201
|
+
};
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
function codexEnabled(section) {
|
|
205
|
+
const enabledMatch = section.body.match(/^\s*enabled\s*=\s*(true|false)\s*(?:#.*)?$/m);
|
|
206
|
+
return enabledMatch?.[1] !== "false";
|
|
207
|
+
}
|
|
208
|
+
function buildCodexMcpStatus(config) {
|
|
209
|
+
return config.sections.map((section) => ({
|
|
210
|
+
name: section.name,
|
|
211
|
+
runtime: "codex",
|
|
212
|
+
scope: "config",
|
|
213
|
+
status: codexEnabled(section) ? "ACTIVE" : "INACTIVE",
|
|
214
|
+
configPath: config.path
|
|
215
|
+
}));
|
|
216
|
+
}
|
|
217
|
+
function buildOpenCodeMcpStatus(config) {
|
|
218
|
+
const mcp = config.config.mcp;
|
|
219
|
+
if (mcp !== void 0 && !isJsonObject(mcp)) {
|
|
220
|
+
throw new Error(`OpenCode mcp key at ${config.path} must be an object.`);
|
|
221
|
+
}
|
|
222
|
+
return Object.entries(mcp ?? {}).map(([name, entry]) => ({
|
|
223
|
+
name,
|
|
224
|
+
runtime: "opencode",
|
|
225
|
+
scope: "config",
|
|
226
|
+
status: isJsonObject(entry) ? statusFromEnabled(entry.enabled) : "ACTIVE",
|
|
227
|
+
configPath: config.path
|
|
228
|
+
}));
|
|
229
|
+
}
|
|
230
|
+
function buildStatusReport(configs, projectPath) {
|
|
231
|
+
const rows = [];
|
|
232
|
+
const notes = [];
|
|
233
|
+
for (const config of configs) {
|
|
234
|
+
if (config.runtime === "claude") {
|
|
235
|
+
const report = buildClaudeMcpStatus(config.config, projectPath, config.path);
|
|
236
|
+
rows.push(...report.rows);
|
|
237
|
+
notes.push(...report.notes);
|
|
238
|
+
} else if (config.runtime === "codex") {
|
|
239
|
+
rows.push(...buildCodexMcpStatus(config));
|
|
240
|
+
} else {
|
|
241
|
+
rows.push(...buildOpenCodeMcpStatus(config));
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
return { projectPath, rows, notes };
|
|
245
|
+
}
|
|
246
|
+
function sameStringSet(left, right) {
|
|
247
|
+
if (left.length !== right.length) return false;
|
|
248
|
+
const rightSet = new Set(right);
|
|
249
|
+
return left.every((key) => rightSet.has(key));
|
|
250
|
+
}
|
|
251
|
+
function serializeJsonWithSanityCheck(originalTopLevelKeys, next, label) {
|
|
252
|
+
const serialized = JSON.stringify(next, null, 2) + "\n";
|
|
253
|
+
const roundTrip = JSON.parse(serialized);
|
|
254
|
+
if (!isJsonObject(roundTrip)) {
|
|
255
|
+
throw new Error(`Refusing to write ${label}: serialized value did not round-trip to an object.`);
|
|
256
|
+
}
|
|
257
|
+
if (!sameStringSet(originalTopLevelKeys, Object.keys(roundTrip))) {
|
|
258
|
+
throw new Error(`Refusing to write ${label}: top-level keys changed unexpectedly.`);
|
|
259
|
+
}
|
|
260
|
+
return serialized;
|
|
261
|
+
}
|
|
262
|
+
function backupConfig(configPath, backupDir) {
|
|
263
|
+
mkdirSync(backupDir, { recursive: true });
|
|
264
|
+
const stamp = (/* @__PURE__ */ new Date()).toISOString().replace(/:/g, "-");
|
|
265
|
+
const base = path.basename(configPath).replace(/[^A-Za-z0-9_.-]/g, "_");
|
|
266
|
+
const backupPath = path.join(backupDir, `${base}.${stamp}.bak`);
|
|
267
|
+
copyFileSync(configPath, backupPath);
|
|
268
|
+
const prefix = `${base}.`;
|
|
269
|
+
const backups = readdirSync(backupDir).filter((name) => name.startsWith(prefix) && name.endsWith(".bak")).map((name) => {
|
|
270
|
+
const filePath = path.join(backupDir, name);
|
|
271
|
+
return { filePath, mtimeMs: statSync(filePath).mtimeMs };
|
|
272
|
+
}).sort((a, b) => b.mtimeMs - a.mtimeMs);
|
|
273
|
+
for (const backup of backups.slice(10)) {
|
|
274
|
+
rmSync(backup.filePath, { force: true });
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
function writeAtomically(filePath, content) {
|
|
278
|
+
const tmpPath = `${filePath}.exe-mcp-tmp-${process.pid}`;
|
|
279
|
+
try {
|
|
280
|
+
writeFileSync(tmpPath, content, { mode: 384 });
|
|
281
|
+
renameSync(tmpPath, filePath);
|
|
282
|
+
} catch (err) {
|
|
283
|
+
rmSync(tmpPath, { force: true });
|
|
284
|
+
throw err;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
function renderTable(report) {
|
|
288
|
+
const rows = report.rows;
|
|
289
|
+
if (rows.length === 0) {
|
|
290
|
+
const lines2 = ["No configured MCP servers found."];
|
|
291
|
+
if (report.notes.length > 0) lines2.push("", ...report.notes);
|
|
292
|
+
return `${lines2.join("\n")}
|
|
293
|
+
`;
|
|
294
|
+
}
|
|
295
|
+
const widths = {
|
|
296
|
+
runtime: Math.max("runtime".length, ...rows.map((row) => row.runtime.length)),
|
|
297
|
+
name: Math.max("name".length, ...rows.map((row) => row.name.length)),
|
|
298
|
+
scope: Math.max("scope".length, ...rows.map((row) => row.scope.length)),
|
|
299
|
+
status: Math.max("status".length, ...rows.map((row) => row.status.length))
|
|
300
|
+
};
|
|
301
|
+
const lines = [
|
|
302
|
+
`${"runtime".padEnd(widths.runtime)} ${"name".padEnd(widths.name)} ${"scope".padEnd(widths.scope)} ${"status".padEnd(widths.status)}`,
|
|
303
|
+
`${"-".repeat(widths.runtime)} ${"-".repeat(widths.name)} ${"-".repeat(widths.scope)} ${"-".repeat(widths.status)}`,
|
|
304
|
+
...rows.map((row) => `${row.runtime.padEnd(widths.runtime)} ${row.name.padEnd(widths.name)} ${row.scope.padEnd(widths.scope)} ${row.status.padEnd(widths.status)}`)
|
|
305
|
+
];
|
|
306
|
+
if (report.notes.length > 0) lines.push("", ...report.notes);
|
|
307
|
+
return `${lines.join("\n")}
|
|
308
|
+
`;
|
|
309
|
+
}
|
|
310
|
+
function disabledArrayForMutation(project) {
|
|
311
|
+
const disabled = project.disabledMcpServers;
|
|
312
|
+
if (disabled === void 0) {
|
|
313
|
+
const next = [];
|
|
314
|
+
project.disabledMcpServers = next;
|
|
315
|
+
return next;
|
|
316
|
+
}
|
|
317
|
+
if (!Array.isArray(disabled)) {
|
|
318
|
+
throw new Error("Project disabledMcpServers exists but is not an array; refusing to overwrite it.");
|
|
319
|
+
}
|
|
320
|
+
return disabled;
|
|
321
|
+
}
|
|
322
|
+
function knownClaudeServerNames(config, project) {
|
|
323
|
+
return [.../* @__PURE__ */ new Set([...objectKeys(config.mcpServers), ...objectKeys(project.mcpServers)])];
|
|
324
|
+
}
|
|
325
|
+
function setClaudeServerEnabled(config, projectPath, name, enabled) {
|
|
326
|
+
const project = projectEntry(config.config, projectPath);
|
|
327
|
+
if (!project) return false;
|
|
328
|
+
if (!knownClaudeServerNames(config.config, project).includes(name)) return false;
|
|
329
|
+
const currentDisabled = project.disabledMcpServers;
|
|
330
|
+
if (currentDisabled !== void 0 && !Array.isArray(currentDisabled)) {
|
|
331
|
+
throw new Error("Project disabledMcpServers exists but is not an array; refusing to overwrite it.");
|
|
332
|
+
}
|
|
333
|
+
if (enabled) {
|
|
334
|
+
if (currentDisabled === void 0) return true;
|
|
335
|
+
project.disabledMcpServers = currentDisabled.filter((item) => item !== name);
|
|
336
|
+
return true;
|
|
337
|
+
}
|
|
338
|
+
const disabled = disabledArrayForMutation(project);
|
|
339
|
+
const disabledStrings = stringArray(disabled);
|
|
340
|
+
if (!disabledStrings.includes(name)) disabled.push(name);
|
|
341
|
+
return true;
|
|
342
|
+
}
|
|
343
|
+
function setCodexServerEnabled(raw, section, enabled) {
|
|
344
|
+
const desiredLine = `enabled = ${enabled ? "true" : "false"}`;
|
|
345
|
+
const sectionText = raw.slice(section.start, section.end);
|
|
346
|
+
const enabledRegex = /^(\s*)enabled\s*=\s*(?:true|false)(\s*(?:#.*)?)$/m;
|
|
347
|
+
let nextSection;
|
|
348
|
+
if (enabledRegex.test(sectionText)) {
|
|
349
|
+
nextSection = sectionText.replace(enabledRegex, `$1${desiredLine}$2`);
|
|
350
|
+
} else {
|
|
351
|
+
nextSection = `${sectionText.slice(0, section.headerEnd - section.start)}
|
|
352
|
+
${desiredLine}${sectionText.slice(section.headerEnd - section.start)}`;
|
|
353
|
+
}
|
|
354
|
+
return raw.slice(0, section.start) + nextSection + raw.slice(section.end);
|
|
355
|
+
}
|
|
356
|
+
function setOpenCodeServerEnabled(config, name, enabled) {
|
|
357
|
+
const mcp = config.config.mcp;
|
|
358
|
+
if (mcp !== void 0 && !isJsonObject(mcp)) {
|
|
359
|
+
throw new Error(`OpenCode mcp key at ${config.path} must be an object.`);
|
|
360
|
+
}
|
|
361
|
+
const servers = mcp ?? {};
|
|
362
|
+
const entry = servers[name];
|
|
363
|
+
if (entry === void 0) return false;
|
|
364
|
+
if (!isJsonObject(entry)) {
|
|
365
|
+
throw new Error(`OpenCode MCP server "${name}" at ${config.path} must be an object before it can be toggled.`);
|
|
366
|
+
}
|
|
367
|
+
entry.enabled = enabled;
|
|
368
|
+
return true;
|
|
369
|
+
}
|
|
370
|
+
function knownServerSummary(configs, projectPath) {
|
|
371
|
+
const names = /* @__PURE__ */ new Set();
|
|
372
|
+
for (const config of configs) {
|
|
373
|
+
if (config.runtime === "claude") {
|
|
374
|
+
const project = projectEntry(config.config, projectPath);
|
|
375
|
+
if (project) knownClaudeServerNames(config.config, project).forEach((name) => names.add(name));
|
|
376
|
+
} else if (config.runtime === "codex") {
|
|
377
|
+
config.sections.forEach((section) => names.add(section.name));
|
|
378
|
+
} else {
|
|
379
|
+
const mcp = config.config.mcp;
|
|
380
|
+
if (isJsonObject(mcp)) Object.keys(mcp).forEach((name) => names.add(name));
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
return names.size > 0 ? [...names].sort().join(", ") : "(none)";
|
|
384
|
+
}
|
|
385
|
+
function writeMutatedConfig(config, backupDir, content) {
|
|
386
|
+
let serialized;
|
|
387
|
+
if (config.runtime === "claude") {
|
|
388
|
+
serialized = serializeJsonWithSanityCheck(Object.keys(JSON.parse(config.raw)), config.config, "Claude JSON");
|
|
389
|
+
} else if (config.runtime === "opencode") {
|
|
390
|
+
serialized = serializeJsonWithSanityCheck(Object.keys(JSON.parse(config.raw)), config.config, "OpenCode JSON");
|
|
391
|
+
} else if (content !== void 0) {
|
|
392
|
+
serialized = content;
|
|
393
|
+
} else {
|
|
394
|
+
throw new Error("Internal error: Codex TOML mutation did not produce content.");
|
|
395
|
+
}
|
|
396
|
+
backupConfig(config.path, backupDir);
|
|
397
|
+
writeAtomically(config.path, serialized);
|
|
398
|
+
}
|
|
399
|
+
async function runList(parsed, paths, projectPath, stdout, stderr) {
|
|
400
|
+
if (parsed.rest.length > 0) {
|
|
401
|
+
stderr.write(usage());
|
|
402
|
+
return 1;
|
|
403
|
+
}
|
|
404
|
+
try {
|
|
405
|
+
const configs = readRuntimeConfigs(paths, selectedRuntimes(parsed.runtime));
|
|
406
|
+
const report = buildStatusReport(configs, projectPath);
|
|
407
|
+
stdout.write(parsed.json ? `${JSON.stringify(report, null, 2)}
|
|
408
|
+
` : renderTable(report));
|
|
409
|
+
return 0;
|
|
410
|
+
} catch (err) {
|
|
411
|
+
stderr.write(`${err instanceof Error ? err.message : String(err)}
|
|
412
|
+
`);
|
|
413
|
+
return 1;
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
async function runToggle(subcommand, parsed, paths, projectPath, backupDir, stdout, stderr) {
|
|
417
|
+
if (parsed.rest.length !== 1) {
|
|
418
|
+
stderr.write(usage());
|
|
419
|
+
return 1;
|
|
420
|
+
}
|
|
421
|
+
const name = parsed.rest[0];
|
|
422
|
+
const enabled = subcommand === "enable";
|
|
423
|
+
try {
|
|
424
|
+
const runtimes = selectedRuntimes(parsed.runtime);
|
|
425
|
+
const configs = readRuntimeConfigs(paths, runtimes);
|
|
426
|
+
if (configs.length === 0) {
|
|
427
|
+
stderr.write(`No MCP config files found for ${runtimes.join(", ")}. Run the relevant exe-os installer first.
|
|
428
|
+
`);
|
|
429
|
+
return 1;
|
|
430
|
+
}
|
|
431
|
+
const mutations = [];
|
|
432
|
+
for (const config of configs) {
|
|
433
|
+
if (config.runtime === "claude") {
|
|
434
|
+
if (setClaudeServerEnabled(config, projectPath, name, enabled)) mutations.push({ config });
|
|
435
|
+
} else if (config.runtime === "codex") {
|
|
436
|
+
const section = config.sections.find((candidate) => candidate.name === name);
|
|
437
|
+
if (section) mutations.push({ config, content: setCodexServerEnabled(config.raw, section, enabled) });
|
|
438
|
+
} else if (setOpenCodeServerEnabled(config, name, enabled)) {
|
|
439
|
+
mutations.push({ config });
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
if (mutations.length === 0) {
|
|
443
|
+
stderr.write(`Unknown server "${name}". Known servers: ${knownServerSummary(configs, projectPath)}
|
|
444
|
+
`);
|
|
445
|
+
return 1;
|
|
446
|
+
}
|
|
447
|
+
for (const mutation of mutations) {
|
|
448
|
+
writeMutatedConfig(mutation.config, backupDir, mutation.content);
|
|
449
|
+
}
|
|
450
|
+
const changedRuntimes = mutations.map((mutation) => mutation.config.runtime).join(", ");
|
|
451
|
+
stdout.write(`${name} ${enabled ? "enabled" : "disabled"} for ${changedRuntimes}.
|
|
452
|
+
`);
|
|
453
|
+
return 0;
|
|
454
|
+
} catch (err) {
|
|
455
|
+
stderr.write(`${err instanceof Error ? err.message : String(err)}
|
|
456
|
+
`);
|
|
457
|
+
return 1;
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
async function main(args, opts = {}) {
|
|
461
|
+
const stdout = opts.stdout ?? process.stdout;
|
|
462
|
+
const stderr = opts.stderr ?? process.stderr;
|
|
463
|
+
const cwd = opts.cwd ?? process.cwd();
|
|
464
|
+
const paths = runtimePaths(opts);
|
|
465
|
+
const backupDir = opts.backupDir ?? defaultBackupDir();
|
|
466
|
+
const explicitSubcommand = args[0] === "list" || args[0] === "disable" || args[0] === "enable";
|
|
467
|
+
const subcommand = explicitSubcommand ? args[0] : "list";
|
|
468
|
+
if (!explicitSubcommand && args[0] && !args[0].startsWith("--")) {
|
|
469
|
+
stderr.write(`Unknown mcp command: ${args[0]}
|
|
470
|
+
${usage()}`);
|
|
471
|
+
return 1;
|
|
472
|
+
}
|
|
473
|
+
if (!["list", "disable", "enable"].includes(subcommand)) {
|
|
474
|
+
stderr.write(`Unknown mcp command: ${subcommand}
|
|
475
|
+
${usage()}`);
|
|
476
|
+
return 1;
|
|
477
|
+
}
|
|
478
|
+
const parsed = parseArgs(args.slice(explicitSubcommand ? 1 : 0));
|
|
479
|
+
if (parsed.error) {
|
|
480
|
+
stderr.write(`${parsed.error}
|
|
481
|
+
${usage()}`);
|
|
482
|
+
return 1;
|
|
483
|
+
}
|
|
484
|
+
const projectPath = resolveProjectPath(parsed.project, cwd);
|
|
485
|
+
if (subcommand === "list") {
|
|
486
|
+
return runList(parsed, paths, projectPath, stdout, stderr);
|
|
487
|
+
}
|
|
488
|
+
return runToggle(subcommand, parsed, paths, projectPath, backupDir, stdout, stderr);
|
|
489
|
+
}
|
|
490
|
+
export {
|
|
491
|
+
buildClaudeMcpStatus,
|
|
492
|
+
buildMcpStatus,
|
|
493
|
+
main
|
|
494
|
+
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
initStore
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-TQSAPNFW.js";
|
|
5
|
+
import "../chunk-FFUEDKYK.js";
|
|
6
6
|
import "../chunk-CHCA3ZM2.js";
|
|
7
7
|
import "../chunk-OTVEIJUQ.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-VBHLE3TR.js";
|
|
9
9
|
import "../chunk-5MOYSU5A.js";
|
|
10
10
|
import "../chunk-4QCFFW2H.js";
|
|
11
11
|
import "../chunk-76CJBM36.js";
|
|
12
12
|
import "../chunk-MP2AFCGL.js";
|
|
13
13
|
import {
|
|
14
14
|
getClient
|
|
15
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-ZY2ABBVR.js";
|
|
16
16
|
import "../chunk-2I23RPSI.js";
|
|
17
|
-
import "../chunk-
|
|
17
|
+
import "../chunk-FM4ZI5ZP.js";
|
|
18
18
|
import "../chunk-OMXJMOBD.js";
|
|
19
19
|
import "../chunk-7HLWBYH7.js";
|
|
20
20
|
import "../chunk-BBMTVAE3.js";
|
|
@@ -7,26 +7,26 @@ import {
|
|
|
7
7
|
buildCustomEmployeePrompt,
|
|
8
8
|
getTemplate,
|
|
9
9
|
personalizePrompt
|
|
10
|
-
} from "../chunk-
|
|
11
|
-
import "../chunk-
|
|
10
|
+
} from "../chunk-DZJL775P.js";
|
|
11
|
+
import "../chunk-T7ZLJZAO.js";
|
|
12
12
|
import "../chunk-CQN4IKRB.js";
|
|
13
13
|
import {
|
|
14
14
|
PlanLimitError,
|
|
15
15
|
assertEmployeeLimit
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-Y7637VDZ.js";
|
|
17
17
|
import {
|
|
18
18
|
hireEmployee,
|
|
19
19
|
registerBinSymlinks,
|
|
20
20
|
validateEmployeeName
|
|
21
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-ZY2ABBVR.js";
|
|
22
22
|
import "../chunk-2I23RPSI.js";
|
|
23
|
-
import "../chunk-
|
|
23
|
+
import "../chunk-FM4ZI5ZP.js";
|
|
24
24
|
import "../chunk-OMXJMOBD.js";
|
|
25
25
|
import "../chunk-7HLWBYH7.js";
|
|
26
26
|
import "../chunk-BBMTVAE3.js";
|
|
27
27
|
import "../chunk-FXU7JOXK.js";
|
|
28
|
-
import "../chunk-
|
|
29
|
-
import "../chunk-
|
|
28
|
+
import "../chunk-ZK53K7OR.js";
|
|
29
|
+
import "../chunk-SJLZ53ZR.js";
|
|
30
30
|
import "../chunk-BCZF3AGJ.js";
|
|
31
31
|
import "../chunk-HSGBZSCA.js";
|
|
32
32
|
import {
|
|
@@ -147,7 +147,7 @@ ${rolePrompt}${emotionalSection}`;
|
|
|
147
147
|
console.error(`Warning: some launchers failed: ${bins.errors.join("; ")}`);
|
|
148
148
|
}
|
|
149
149
|
try {
|
|
150
|
-
const { resolvePackageRoot } = await import("../installer-
|
|
150
|
+
const { resolvePackageRoot } = await import("../installer-SQF5I6YS.js");
|
|
151
151
|
const { homedir } = await import("os");
|
|
152
152
|
const pkgRoot = resolvePackageRoot();
|
|
153
153
|
const wrapResult = generateSessionWrappers(pkgRoot);
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
buildMcpHttpHeaders,
|
|
4
4
|
mcpHttpPort,
|
|
5
5
|
mcpHttpUrl
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-MESFJRIT.js";
|
|
7
7
|
import "../chunk-B6TI3TZT.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-ZY2ABBVR.js";
|
|
9
9
|
import "../chunk-2I23RPSI.js";
|
|
10
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-FM4ZI5ZP.js";
|
|
11
11
|
import "../chunk-OMXJMOBD.js";
|
|
12
12
|
import "../chunk-7HLWBYH7.js";
|
|
13
13
|
import "../chunk-BBMTVAE3.js";
|
|
@@ -43,17 +43,53 @@ function parseRetryAfter(value) {
|
|
|
43
43
|
if (Number.isFinite(dateMs)) return Math.max(0, dateMs - Date.now());
|
|
44
44
|
return null;
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
const
|
|
48
|
-
|
|
46
|
+
function errorChain(err) {
|
|
47
|
+
const out = [];
|
|
48
|
+
const seen = /* @__PURE__ */ new Set();
|
|
49
|
+
const stack = [err];
|
|
50
|
+
while (stack.length > 0 && out.length < 16) {
|
|
51
|
+
const current = stack.shift();
|
|
52
|
+
if (current === void 0 || current === null || seen.has(current)) continue;
|
|
53
|
+
seen.add(current);
|
|
54
|
+
out.push(current);
|
|
55
|
+
if (typeof current !== "object") continue;
|
|
56
|
+
const withCause = current;
|
|
57
|
+
if (withCause.cause !== void 0) stack.push(withCause.cause);
|
|
58
|
+
if (Array.isArray(withCause.errors)) stack.push(...withCause.errors);
|
|
59
|
+
}
|
|
60
|
+
return out;
|
|
61
|
+
}
|
|
62
|
+
function errorCodes(err) {
|
|
63
|
+
return errorChain(err).flatMap((item) => {
|
|
64
|
+
if (!item || typeof item !== "object") return [];
|
|
65
|
+
const code = item.code;
|
|
66
|
+
return typeof code === "string" ? [code] : [];
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
function errorMessages(err) {
|
|
70
|
+
return errorChain(err).flatMap((item) => {
|
|
71
|
+
if (item instanceof Error) return [item.message];
|
|
72
|
+
if (typeof item === "string") return [item];
|
|
73
|
+
if (!item || typeof item !== "object") return [];
|
|
74
|
+
const message = item.message;
|
|
75
|
+
return typeof message === "string" ? [message] : [];
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
function isAbortOrTimeout(err) {
|
|
79
|
+
return errorChain(err).some((item) => {
|
|
80
|
+
if (!item || typeof item !== "object") return false;
|
|
81
|
+
const withFields = item;
|
|
82
|
+
return withFields.code === "ABORT_ERR" || withFields.name === "AbortError" || withFields.name === "TimeoutError";
|
|
83
|
+
});
|
|
49
84
|
}
|
|
50
85
|
function isConnectionRefused(err) {
|
|
51
|
-
return
|
|
86
|
+
return errorCodes(err).includes("ECONNREFUSED");
|
|
52
87
|
}
|
|
53
88
|
function isConnectionLost(err) {
|
|
54
|
-
|
|
55
|
-
const
|
|
56
|
-
|
|
89
|
+
if (isAbortOrTimeout(err)) return false;
|
|
90
|
+
const codes = errorCodes(err);
|
|
91
|
+
if (codes.some((code) => code === "ECONNRESET" || code === "EPIPE" || code === "UND_ERR_SOCKET")) return true;
|
|
92
|
+
return errorMessages(err).some((message) => /socket hang up/i.test(message) || /other side closed/i.test(message) || /\bterminated\b/i.test(message));
|
|
57
93
|
}
|
|
58
94
|
function isIdempotentMethod(message) {
|
|
59
95
|
const method = message.method ?? "";
|