chainlesschain 0.162.147 → 0.162.149
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/README.md +1 -1
- package/package.json +2 -2
- package/src/assets/web-panel/.build-hash +1 -1
- package/src/assets/web-panel/assets/{AIOps-DywJ7xTv.js → AIOps-BJif14yR.js} +1 -1
- package/src/assets/web-panel/assets/{ActionButton-BTlqcY-q.js → ActionButton-CXek6gJY.js} +1 -1
- package/src/assets/web-panel/assets/{Analytics-FdG1Mvwy.js → Analytics-BgQhdAJi.js} +3 -3
- package/src/assets/web-panel/assets/{AppLayout-CVsnbvN1.js → AppLayout-DTYl5NtR.js} +5 -5
- package/src/assets/web-panel/assets/{Audit-ITdpJ7vR.js → Audit-BzATQAeR.js} +1 -1
- package/src/assets/web-panel/assets/{Backup-BfXqnXo1.js → Backup-BzdPEQhL.js} +1 -1
- package/src/assets/web-panel/assets/{BaseInput-C09ip3_E.js → BaseInput-BM0KVh8E.js} +1 -1
- package/src/assets/web-panel/assets/{Chat-qdkhB42l.js → Chat-D7fHXHkz.js} +6 -6
- package/src/assets/web-panel/assets/{ChatBubbleRenderer-D2KfETZD.js → ChatBubbleRenderer-Wm34RR-b.js} +1 -1
- package/src/assets/web-panel/assets/{Checkbox-j6WZCuff.js → Checkbox-CAiSQ9vO.js} +1 -1
- package/src/assets/web-panel/assets/{Codegen-CGZ-K3uK.js → Codegen-Df40CrEe.js} +1 -1
- package/src/assets/web-panel/assets/{Col-CIlPOAu6.js → Col-DIT2fNFU.js} +1 -1
- package/src/assets/web-panel/assets/{Community-sY-i-hic.js → Community-CSTIbW2k.js} +1 -1
- package/src/assets/web-panel/assets/{Compact-DcoEfyL8.js → Compact-DtqXZZUi.js} +1 -1
- package/src/assets/web-panel/assets/Compliance-CUtzw6o7.js +1 -0
- package/src/assets/web-panel/assets/{Cowork-DLY_fkLv.js → Cowork-CezmlnmU.js} +3 -3
- package/src/assets/web-panel/assets/{Cron-D049pZBC.js → Cron-P4BITarg.js} +2 -2
- package/src/assets/web-panel/assets/{Crosschain-DCXdE8M9.js → Crosschain-BRRiYwvq.js} +1 -1
- package/src/assets/web-panel/assets/{DID-JCvPZtjW.js → DID-L5ijB9i4.js} +2 -2
- package/src/assets/web-panel/assets/{Dashboard-Cg2xu3iE.js → Dashboard-CFxro4ob.js} +2 -2
- package/src/assets/web-panel/assets/{Dropdown-DjJLjbLh.js → Dropdown-BmAFCQ71.js} +1 -1
- package/src/assets/web-panel/assets/{EmailListRenderer-DugNcSLR.js → EmailListRenderer-DJBCEuon.js} +1 -1
- package/src/assets/web-panel/assets/{FamilyGuardDashboard-J6Nb-E30.js → FamilyGuardDashboard-z4oLq6eT.js} +1 -1
- package/src/assets/web-panel/assets/{Federation-CQ3Ttpbl.js → Federation-DsVCpHMF.js} +1 -1
- package/src/assets/web-panel/assets/{FormItemContext-Cz0NKag4.js → FormItemContext-DP3bP5th.js} +1 -1
- package/src/assets/web-panel/assets/{GenericCardRenderer-NYcMP6iz.js → GenericCardRenderer-BAXP2Gc6.js} +1 -1
- package/src/assets/web-panel/assets/{Git-B4hYN18N.js → Git-I3g_bAw9.js} +2 -2
- package/src/assets/web-panel/assets/{Governance-DOQPCcC0.js → Governance-jHS5-ioS.js} +1 -1
- package/src/assets/web-panel/assets/{Inference-HtLF746W.js → Inference-CPL7sfx9.js} +1 -1
- package/src/assets/web-panel/assets/{KnowledgeGraph-BXrk8rMm.js → KnowledgeGraph-Jf236h4C.js} +1 -1
- package/src/assets/web-panel/assets/{Logs-DS0JnD3-.js → Logs-Cm2tcSKg.js} +2 -2
- package/src/assets/web-panel/assets/{Marketplace-Cqnjihrz.js → Marketplace-CZK82rhi.js} +1 -1
- package/src/assets/web-panel/assets/{McpTools-Cx3Psk-U.js → McpTools-CZCeji7a.js} +5 -5
- package/src/assets/web-panel/assets/{Memory-BjyysPtj.js → Memory-3l2KVS9k.js} +2 -2
- package/src/assets/web-panel/assets/MobileBridge-D3Arxfeg.css +1 -0
- package/src/assets/web-panel/assets/MobileBridge-VYdpoLh6.js +1 -0
- package/src/assets/web-panel/assets/{MobileProjects-Xwf-fdOQ.js → MobileProjects-CiB9cmm1.js} +1 -1
- package/src/assets/web-panel/assets/{Mtc-Djkql5m5.js → Mtc-wCFZbBuL.js} +2 -2
- package/src/assets/web-panel/assets/{MtcAudit-D2BAZlu0.js → MtcAudit-1a3THIyG.js} +2 -2
- package/src/assets/web-panel/assets/{Multisig-ByqP1ZzH.js → Multisig-DMzLB2hG.js} +3 -3
- package/src/assets/web-panel/assets/{NLProgramming-C_kn0nE2.js → NLProgramming-D9wZbf6l.js} +1 -1
- package/src/assets/web-panel/assets/{Notes-7l7eXHPq.js → Notes-hrFe2ZM-.js} +3 -3
- package/src/assets/web-panel/assets/{NotificationSettings-BrCDoitw.js → NotificationSettings-CHGX5Jwm.js} +1 -1
- package/src/assets/web-panel/assets/OrderTableRenderer-CRIFE2Tj.js +1 -0
- package/src/assets/web-panel/assets/{Organization-DdoNAxsM.js → Organization-By7FkhtY.js} +4 -4
- package/src/assets/web-panel/assets/{Overflow-Bw7R6dE3.js → Overflow--khGSzJn.js} +1 -1
- package/src/assets/web-panel/assets/{OverrideContext-C2r4vyBb.js → OverrideContext-BlgL9440.js} +1 -1
- package/src/assets/web-panel/assets/{P2P-DJNtBugA.js → P2P-CAG9dH35.js} +2 -2
- package/src/assets/web-panel/assets/{PdhVaultBrowser-Dwhd5_ue.js → PdhVaultBrowser-B3SQZmK9.js} +3 -3
- package/src/assets/web-panel/assets/{Permissions-BYoSfhPR.js → Permissions-D35ec6JA.js} +4 -4
- package/src/assets/web-panel/assets/{PersonalDataHub-aYCYJbnH.js → PersonalDataHub-CxBF7hW_.js} +2 -2
- package/src/assets/web-panel/assets/{Pipeline-DJp6CprF.js → Pipeline-s6EtOO1s.js} +1 -1
- package/src/assets/web-panel/assets/{Privacy-Cq9HZweR.js → Privacy-BbJYmWmO.js} +1 -1
- package/src/assets/web-panel/assets/{ProjectInit-CmF0HsSt.js → ProjectInit-VGQq1jMT.js} +2 -2
- package/src/assets/web-panel/assets/{ProjectSettings-P8V5Aea2.js → ProjectSettings-B1ew3Teh.js} +2 -2
- package/src/assets/web-panel/assets/Projects-CGcNIs_g.js +1 -0
- package/src/assets/web-panel/assets/{Providers-D589v0q2.js → Providers-mrO47FIK.js} +1 -1
- package/src/assets/web-panel/assets/QrScannerModal-IJF2mHyw.js +1 -0
- package/src/assets/web-panel/assets/{MobileBridge-zJpPuf4E.css → QrScannerModal-NwAHNfiJ.css} +1 -1
- package/src/assets/web-panel/assets/{QuickAsk-lvRV2osB.js → QuickAsk-CU0wN_Z0.js} +1 -1
- package/src/assets/web-panel/assets/{Recommend-sb84MTpY.js → Recommend-DhN37R6G.js} +1 -1
- package/src/assets/web-panel/assets/RemoteSession-D_xOX_hu.js +4 -0
- package/src/assets/web-panel/assets/{Reputation-d9Y3vy-W.js → Reputation-D_Ssv7uH.js} +1 -1
- package/src/assets/web-panel/assets/{Row-DMdhLUTp.js → Row-Kx5dKxX7.js} +1 -1
- package/src/assets/web-panel/assets/{RssFeed-OL-SMDkz.js → RssFeed-BlGwqZkY.js} +2 -2
- package/src/assets/web-panel/assets/{Search-BjStLKq1.js → Search-hLFQzxpb.js} +1 -1
- package/src/assets/web-panel/assets/{Security-MeI411qr.js → Security-DMlvsVt4.js} +2 -2
- package/src/assets/web-panel/assets/{Services-UajosuhT.js → Services-Bd0Qsj2m.js} +2 -2
- package/src/assets/web-panel/assets/{Skeleton-CGpG-QJ1.js → Skeleton-DFclq9X3.js} +1 -1
- package/src/assets/web-panel/assets/{Skills-C6P2RPY-.js → Skills-BNtln2qY.js} +1 -1
- package/src/assets/web-panel/assets/{Sla-B_fPprgw.js → Sla-Dch5H19G.js} +1 -1
- package/src/assets/web-panel/assets/{SpeechSettings-CqxLjSlQ.js → SpeechSettings-2UfQcU1g.js} +1 -1
- package/src/assets/web-panel/assets/{SyncSettings-DixSfFOQ.js → SyncSettings-CD9YQr4i.js} +2 -2
- package/src/assets/web-panel/assets/{Tasks-PavzPBxc.js → Tasks-BNu-7MzI.js} +1 -1
- package/src/assets/web-panel/assets/{Templates-BYdGRnfX.js → Templates-D1n9CaIR.js} +1 -1
- package/src/assets/web-panel/assets/{Tenant-BQLgnarD.js → Tenant-DenL3iBW.js} +1 -1
- package/src/assets/web-panel/assets/Terminal-ZzU0Io1Y.js +3 -0
- package/src/assets/web-panel/assets/{TimelineRenderer-Bv7uZRM7.js → TimelineRenderer-D87IfukO.js} +1 -1
- package/src/assets/web-panel/assets/{Tokens-DxhgszRJ.js → Tokens-BkiZc8E3.js} +1 -1
- package/src/assets/web-panel/assets/{Trigger-nQYHayuc.js → Trigger-BNRSytGN.js} +1 -1
- package/src/assets/web-panel/assets/{Trust-CvqZDuZ4.js → Trust-Bwbd4X2m.js} +1 -1
- package/src/assets/web-panel/assets/{UkeySign-DaR8GV2I.js → UkeySign-B8O2bs0o.js} +1 -1
- package/src/assets/web-panel/assets/{VideoEditing-C6Mpsokw.js → VideoEditing-C2fL8zmH.js} +1 -1
- package/src/assets/web-panel/assets/{Wallet-B57VRrWc.js → Wallet-BORYDdE1.js} +4 -4
- package/src/assets/web-panel/assets/{WebAuthn-BbtEEtpq.js → WebAuthn-C0V5S2FM.js} +4 -4
- package/src/assets/web-panel/assets/{WorkflowEditor-C5LwvKmH.js → WorkflowEditor-2dR0fcHL.js} +1 -1
- package/src/assets/web-panel/assets/{chat-MzuPR5jh.js → chat-BmuAFAn8.js} +1 -1
- package/src/assets/web-panel/assets/{collapseMotion-mxzzcDsg.js → collapseMotion-DVfhbsdP.js} +1 -1
- package/src/assets/web-panel/assets/{colors-HyW8mi_y.js → colors-CN3smMcK.js} +1 -1
- package/src/assets/web-panel/assets/{compact-item-DvUSzWAp.js → compact-item-DCnxb4kW.js} +1 -1
- package/src/assets/web-panel/assets/{createContext-4MppZl7X.js → createContext-vlR43pHn.js} +1 -1
- package/src/assets/web-panel/assets/devWarning-DxwmsL4j.js +1 -0
- package/src/assets/web-panel/assets/{echarts-jxgIOFUZ.js → echarts-CL0F2SnX.js} +1 -1
- package/src/assets/web-panel/assets/{hasIn-D9q3CJ-u.js → hasIn-D04tHYFd.js} +1 -1
- package/src/assets/web-panel/assets/{icons-DP3uiYxy.js → icons-BsDmGpcT.js} +1 -1
- package/src/assets/web-panel/assets/{index-C9I5MuJ0.js → index-0DnaZGkC.js} +1 -1
- package/src/assets/web-panel/assets/{index-Caqtu6Et.js → index-430S68MN.js} +1 -1
- package/src/assets/web-panel/assets/{index-eOQO6KnV.js → index-B78xL3s2.js} +1 -1
- package/src/assets/web-panel/assets/{index-Ci6adKh8.js → index-BTPEZTk1.js} +1 -1
- package/src/assets/web-panel/assets/{index-CifKUNtV.js → index-BXRg8GFQ.js} +1 -1
- package/src/assets/web-panel/assets/{index-D7TDMMfu.js → index-BasvsWDM.js} +1 -1
- package/src/assets/web-panel/assets/{index-DNYqw0MO.js → index-BeGDEXFs.js} +1 -1
- package/src/assets/web-panel/assets/{index-m0b6Fj9q.js → index-BqhASEL4.js} +1 -1
- package/src/assets/web-panel/assets/{index-BF2JsbiX.js → index-BudvKQfG.js} +1 -1
- package/src/assets/web-panel/assets/{index-DFqvWeGc.js → index-C-6NO5il.js} +1 -1
- package/src/assets/web-panel/assets/{index-SDblbKj6.js → index-C5Sxb1sE.js} +1 -1
- package/src/assets/web-panel/assets/{index-UUMCA2Sq.js → index-CP9m9Ggr.js} +4 -4
- package/src/assets/web-panel/assets/{index--Bm6OqmU.js → index-CTOCnIQ7.js} +1 -1
- package/src/assets/web-panel/assets/index-Cg2ldRfU.js +1 -0
- package/src/assets/web-panel/assets/{index-Dv7ffI2g.js → index-ClhAHDK3.js} +1 -1
- package/src/assets/web-panel/assets/{index-BcunsBIx.js → index-CnXebZLL.js} +1 -1
- package/src/assets/web-panel/assets/{index-CvAqCAo9.js → index-CngCC8hC.js} +1 -1
- package/src/assets/web-panel/assets/{index-DcMkjb92.js → index-Cr-A0FYJ.js} +1 -1
- package/src/assets/web-panel/assets/{index-BFGfC5RS.js → index-CsAsCPJ6.js} +1 -1
- package/src/assets/web-panel/assets/{index-DDZ6fP5Z.js → index-D28DeAAB.js} +1 -1
- package/src/assets/web-panel/assets/{index-CgIfXOD9.js → index-D5LZVZ0L.js} +1 -1
- package/src/assets/web-panel/assets/{index-DmZ6-suL.js → index-D65_XseV.js} +1 -1
- package/src/assets/web-panel/assets/{index-Cs-RKRUM.js → index-D8vwp4qp.js} +1 -1
- package/src/assets/web-panel/assets/{index-B994UQfE.js → index-DDwLgQY9.js} +1 -1
- package/src/assets/web-panel/assets/{index-Btz8pU68.js → index-DIpY0qM5.js} +1 -1
- package/src/assets/web-panel/assets/{index-B5E4DhVc.js → index-DTWg-18U.js} +1 -1
- package/src/assets/web-panel/assets/{index-D2jrnaq3.js → index-DTtRscUa.js} +1 -1
- package/src/assets/web-panel/assets/{index-BmCo2Xdp.js → index-DYAtmqiv.js} +1 -1
- package/src/assets/web-panel/assets/{index-Zvtru2oE.js → index-D_n8_vfI.js} +1 -1
- package/src/assets/web-panel/assets/{index-CLAZs1Vd.js → index-DbADHwhr.js} +1 -1
- package/src/assets/web-panel/assets/{index-CucRo4Vz.js → index-DbVsQBOH.js} +1 -1
- package/src/assets/web-panel/assets/index-Dwzo-dtJ.js +1 -0
- package/src/assets/web-panel/assets/{index-C0DiL97c.js → index-HhNjnCfe.js} +1 -1
- package/src/assets/web-panel/assets/{index-Bl-E4W4q.js → index-ToUh2b1-.js} +1 -1
- package/src/assets/web-panel/assets/{index-ryFLxB1p.js → index-TslMTwNy.js} +1 -1
- package/src/assets/web-panel/assets/{index-BGQtFso0.js → index-_FIkN3jd.js} +1 -1
- package/src/assets/web-panel/assets/{index-zLwYpvX0.js → index-hpvvtAZ3.js} +1 -1
- package/src/assets/web-panel/assets/{index-Dvg5xYuP.js → index-jzR7Ujuw.js} +1 -1
- package/src/assets/web-panel/assets/{index-xvUVuFnA.js → index-ljuBiQW9.js} +1 -1
- package/src/assets/web-panel/assets/{initDefaultProps-CC--PMsC.js → initDefaultProps-C3wUb4je.js} +1 -1
- package/src/assets/web-panel/assets/{motion-DdrBjRF1.js → motion-D-jYFUNA.js} +1 -1
- package/src/assets/web-panel/assets/{move-D712Gwl2.js → move-tqb8nwJ2.js} +1 -1
- package/src/assets/web-panel/assets/{mtc-parser-39y-keKO.js → mtc-parser-DSOjMJMz.js} +1 -1
- package/src/assets/web-panel/assets/{omit-6Y51gDB9.js → omit-CJ7VimIW.js} +1 -1
- package/src/assets/web-panel/assets/{pickAttrs-Cy6EHbq9.js → pickAttrs-qXiG1iT3.js} +1 -1
- package/src/assets/web-panel/assets/{placementArrow-BYxdAm0p.js → placementArrow-CkGBcy1Z.js} +1 -1
- package/src/assets/web-panel/assets/{responsiveObserve-C9R6q_cr.js → responsiveObserve-D3WvTlLO.js} +1 -1
- package/src/assets/web-panel/assets/{slide-CXUJlilB.js → slide-BEE2ftge.js} +1 -1
- package/src/assets/web-panel/assets/{statusUtils-DOtrOeql.js → statusUtils-CsfBpxiG.js} +1 -1
- package/src/assets/web-panel/assets/{styleChecker-D5r39o92.js → styleChecker-xPrIiJPI.js} +1 -1
- package/src/assets/web-panel/assets/useFlexGapSupport-C5Yd-SCR.js +1 -0
- package/src/assets/web-panel/assets/{useFs-BkrT-Zbc.js → useFs-D_MDS8HI.js} +1 -1
- package/src/assets/web-panel/assets/{useMergedState-Cl2q1fes.js → useMergedState-Dc9sO2d7.js} +1 -1
- package/src/assets/web-panel/assets/{usePersonalDataHub-BwnnnZjU.js → usePersonalDataHub-BqJh-usA.js} +1 -1
- package/src/assets/web-panel/assets/{useRefs-DD9q4mOT.js → useRefs-CAeFRzPf.js} +1 -1
- package/src/assets/web-panel/assets/{useState-BK4hy8Ma.js → useState-LwExUYDO.js} +1 -1
- package/src/assets/web-panel/assets/{vendor-BvqAck49.js → vendor-BMxUs6UX.js} +16 -16
- package/src/assets/web-panel/assets/{vnode-SU-N4pum.js → vnode-chm_p-gz.js} +1 -1
- package/src/assets/web-panel/assets/{zoom-DHScfpTP.js → zoom-3-YDNz0Z.js} +1 -1
- package/src/assets/web-panel/index.html +3 -3
- package/src/assets/web-panel/remote-session-sw.js +43 -0
- package/src/command-manifest.json +22 -1
- package/src/commands/agent.js +44 -5
- package/src/commands/codeintel.js +252 -0
- package/src/commands/eval.js +248 -0
- package/src/commands/plugin.js +354 -0
- package/src/commands/serve.js +10 -0
- package/src/commands/team.js +456 -0
- package/src/gateways/remote-session-relay.js +160 -0
- package/src/gateways/ws/message-dispatcher.js +77 -2
- package/src/gateways/ws/remote-session-protocol.js +466 -0
- package/src/gateways/ws/ws-server.js +299 -0
- package/src/harness/golden-transcript.js +65 -0
- package/src/harness/mcp-client.js +6 -2
- package/src/harness/prompt-compressor.js +27 -1
- package/src/harness/remote-command-ledger.js +158 -0
- package/src/harness/remote-session-audit-sink.js +132 -0
- package/src/harness/remote-session-audit.js +110 -0
- package/src/harness/remote-session-crypto.js +217 -0
- package/src/harness/remote-session-push-apns.js +246 -0
- package/src/harness/remote-session-push-errors.js +15 -0
- package/src/harness/remote-session-push-fcm.js +238 -0
- package/src/harness/remote-session-push-huawei.js +174 -0
- package/src/harness/remote-session-push-oppo.js +171 -0
- package/src/harness/remote-session-push-senders.js +42 -0
- package/src/harness/remote-session-push-vivo.js +179 -0
- package/src/harness/remote-session-push-web.js +299 -0
- package/src/harness/remote-session-push-xiaomi.js +99 -0
- package/src/harness/remote-session-push.js +104 -0
- package/src/harness/remote-session-registry.js +420 -0
- package/src/index.js +6 -0
- package/src/lib/agent-core.js +2 -0
- package/src/lib/agent-sandbox.js +161 -5
- package/src/lib/agent-team/task-lease.js +434 -0
- package/src/lib/agent-team/team-budget.js +165 -0
- package/src/lib/agent-team/team-mailbox.js +106 -0
- package/src/lib/agent-team/team-runner.js +266 -0
- package/src/lib/agent-team/team-worktree.js +204 -0
- package/src/lib/agents.js +18 -0
- package/src/lib/async-hook-supervisor.cjs +305 -0
- package/src/lib/did-manager.js +6 -4
- package/src/lib/eval/runner.js +163 -0
- package/src/lib/eval/tasks.js +456 -0
- package/src/lib/eval/trend.js +185 -0
- package/src/lib/lsp/__tests__/code-intelligence.integration.test.js +129 -0
- package/src/lib/lsp/__tests__/code-intelligence.test.js +228 -0
- package/src/lib/lsp/__tests__/jsonrpc-stream.test.js +104 -0
- package/src/lib/lsp/__tests__/lsp-client.test.js +258 -0
- package/src/lib/lsp/__tests__/lsp-manager.test.js +264 -0
- package/src/lib/lsp/__tests__/lsp-server-registry.test.js +128 -0
- package/src/lib/lsp/code-intelligence.js +356 -0
- package/src/lib/lsp/jsonrpc-stream.js +139 -0
- package/src/lib/lsp/lsp-client.js +318 -0
- package/src/lib/lsp/lsp-manager.js +323 -0
- package/src/lib/lsp/lsp-server-registry.js +196 -0
- package/src/lib/mcp-oauth.js +23 -6
- package/src/lib/plugin-monitor-supervisor.js +238 -0
- package/src/lib/plugin-runtime/agents.js +51 -0
- package/src/lib/plugin-runtime/bin.js +100 -0
- package/src/lib/plugin-runtime/hooks.js +100 -0
- package/src/lib/plugin-runtime/install.js +388 -0
- package/src/lib/plugin-runtime/lsp.js +75 -0
- package/src/lib/plugin-runtime/manifest.js +458 -0
- package/src/lib/plugin-runtime/mcp.js +89 -0
- package/src/lib/plugin-runtime/monitors.js +100 -0
- package/src/lib/plugin-runtime/policy.js +144 -0
- package/src/lib/plugin-runtime/reload.js +79 -0
- package/src/lib/plugin-runtime/scopes.js +197 -0
- package/src/lib/plugin-runtime/settings.js +119 -0
- package/src/lib/plugin-runtime/signature.js +107 -0
- package/src/lib/plugin-runtime/skills.js +43 -0
- package/src/lib/plugin-runtime/trust.js +140 -0
- package/src/lib/sandbox-egress-proxy.js +162 -0
- package/src/lib/sandbox-network-policy.js +134 -0
- package/src/lib/sandbox-v2.js +10 -4
- package/src/lib/session-manager.js +7 -3
- package/src/lib/settings-hook-events.cjs +78 -6
- package/src/lib/settings-hooks.cjs +29 -3
- package/src/lib/settings-loader.cjs +35 -1
- package/src/lib/skill-loader.js +18 -0
- package/src/lib/telemetry/span-recorder.js +237 -0
- package/src/repl/agent-repl.js +400 -4
- package/src/runtime/agent-core.js +546 -52
- package/src/runtime/agent-runtime.js +8 -13
- package/src/runtime/coding-agent-contract-shared.cjs +82 -8
- package/src/runtime/coding-agent-policy.cjs +32 -7
- package/src/runtime/fallback-model.js +134 -7
- package/src/runtime/headless-runner.js +353 -108
- package/src/runtime/mcp-config.js +46 -0
- package/src/runtime/policies/agent-policy.js +2 -0
- package/src/assets/web-panel/assets/Compliance-T8EtTecW.js +0 -1
- package/src/assets/web-panel/assets/MobileBridge-CYaITZ7w.js +0 -1
- package/src/assets/web-panel/assets/OrderTableRenderer-CmtqIdwr.js +0 -1
- package/src/assets/web-panel/assets/Projects-DPd5-lNS.js +0 -1
- package/src/assets/web-panel/assets/Terminal-BzOHpq-B.js +0 -3
- package/src/assets/web-panel/assets/devWarning-6YJJMjSH.js +0 -1
- package/src/assets/web-panel/assets/index-D_oeGLr6.js +0 -1
- package/src/assets/web-panel/assets/index-Qa57YG19.js +0 -1
- package/src/assets/web-panel/assets/useFlexGapSupport-DfAD5U4Z.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{N as i,h as a,w as l}from"./index-
|
|
1
|
+
import{N as i,h as a,w as l}from"./index-CP9m9Ggr.js";import{a8 as o,k as g,C as d,F as f,A as p}from"./vendor-BMxUs6UX.js";function c(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,u=e;if(Array.isArray(e)&&(u=i(e)[0]),!u)return null;const n=o(u,r,s);return n.props=t?a(a({},n.props),r):n.props,l(typeof n.props.class!="object","class must be string"),n}function V(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return e.map(s=>c(s,r,t))}function v(e,r,t){p(o(e,a({},r)),t)}const m=e=>(e||[]).some(r=>g(r)?!(r.type===d||r.type===f&&!m(r.children)):!0)?e:null;function h(e,r,t,s){var u;const n=(u=e[r])===null||u===void 0?void 0:u.call(e,t);return m(n)?n:s?.()}export{h as a,V as b,c,v as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{K as o}from"./index-
|
|
1
|
+
import{K as o}from"./index-CP9m9Ggr.js";import{i as f}from"./motion-D-jYFUNA.js";const c=new o("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),y=new o("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),a=new o("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),s=new o("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),g=new o("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),O=new o("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),l=new o("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),u=new o("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),p=new o("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),z=new o("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),K=new o("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),w=new o("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),I={zoom:{inKeyframes:c,outKeyframes:y},"zoom-big":{inKeyframes:a,outKeyframes:s},"zoom-big-fast":{inKeyframes:a,outKeyframes:s},"zoom-left":{inKeyframes:l,outKeyframes:u},"zoom-right":{inKeyframes:p,outKeyframes:z},"zoom-up":{inKeyframes:g,outKeyframes:O},"zoom-down":{inKeyframes:K,outKeyframes:w}},h=(n,r)=>{const{antCls:m}=n,t=`${m}-${r}`,{inKeyframes:i,outKeyframes:e}=I[r];return[f(t,i,e,r==="zoom-big-fast"?n.motionDurationFast:n.motionDurationMid),{[`
|
|
2
2
|
${t}-enter,
|
|
3
3
|
${t}-appear
|
|
4
4
|
`]:{transform:"scale(0)",opacity:0,animationTimingFunction:n.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${t}-leave`]:{animationTimingFunction:n.motionEaseInOutCirc}}]};export{h as i,c as z};
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
// Injected by web-ui-server.js at serve time
|
|
9
9
|
window.__CC_CONFIG__ = __CC_CONFIG_PLACEHOLDER__;
|
|
10
10
|
</script>
|
|
11
|
-
<script type="module" crossorigin src="./assets/index-
|
|
12
|
-
<link rel="modulepreload" crossorigin href="./assets/vendor-
|
|
13
|
-
<link rel="modulepreload" crossorigin href="./assets/icons-
|
|
11
|
+
<script type="module" crossorigin src="./assets/index-CP9m9Ggr.js"></script>
|
|
12
|
+
<link rel="modulepreload" crossorigin href="./assets/vendor-BMxUs6UX.js">
|
|
13
|
+
<link rel="modulepreload" crossorigin href="./assets/icons-BsDmGpcT.js">
|
|
14
14
|
<link rel="stylesheet" crossorigin href="./assets/index-Cq93VfoF.css">
|
|
15
15
|
</head>
|
|
16
16
|
<body>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/* global self, clients */
|
|
2
|
+
// Remote Session Web Push service worker.
|
|
3
|
+
//
|
|
4
|
+
// Wakes a backgrounded browser tab for approval requests. The host's Web Push
|
|
5
|
+
// sender (packages/cli/src/harness/remote-session-push-web.js) delivers an
|
|
6
|
+
// aes128gcm-encrypted JSON payload carrying only routing ids (no session
|
|
7
|
+
// content); we surface it as a notification and, on click, focus/open the panel.
|
|
8
|
+
|
|
9
|
+
self.addEventListener('install', () => self.skipWaiting())
|
|
10
|
+
self.addEventListener('activate', (event) => event.waitUntil(self.clients.claim()))
|
|
11
|
+
|
|
12
|
+
self.addEventListener('push', (event) => {
|
|
13
|
+
let data = {}
|
|
14
|
+
try {
|
|
15
|
+
data = event.data ? event.data.json() : {}
|
|
16
|
+
} catch (_e) {
|
|
17
|
+
data = {}
|
|
18
|
+
}
|
|
19
|
+
if (data.type && data.type !== 'remote-session.approval-request') return
|
|
20
|
+
const title = data.title || 'Approval requested'
|
|
21
|
+
const body = data.body || 'A coding session needs your approval'
|
|
22
|
+
event.waitUntil(
|
|
23
|
+
self.registration.showNotification(title, {
|
|
24
|
+
body,
|
|
25
|
+
tag: data.sessionId ? `remote-session-${data.sessionId}` : 'remote-session-approval',
|
|
26
|
+
renotify: true,
|
|
27
|
+
requireInteraction: true,
|
|
28
|
+
data: { sessionId: data.sessionId || null, clientId: data.clientId || null },
|
|
29
|
+
}),
|
|
30
|
+
)
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
self.addEventListener('notificationclick', (event) => {
|
|
34
|
+
event.notification.close()
|
|
35
|
+
event.waitUntil(
|
|
36
|
+
self.clients.matchAll({ type: 'window', includeUncontrolled: true }).then((windowClients) => {
|
|
37
|
+
for (const client of windowClients) {
|
|
38
|
+
if ('focus' in client) return client.focus()
|
|
39
|
+
}
|
|
40
|
+
return self.clients.openWindow ? self.clients.openWindow('/') : undefined
|
|
41
|
+
}),
|
|
42
|
+
)
|
|
43
|
+
})
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_generated": "scripts/gen-command-manifest.mjs — do not edit by hand",
|
|
3
|
-
"commandCount":
|
|
3
|
+
"commandCount": 163,
|
|
4
4
|
"commands": [
|
|
5
5
|
{
|
|
6
6
|
"name": "a2a",
|
|
@@ -135,6 +135,13 @@
|
|
|
135
135
|
"register": "registerCliAnythingCommand",
|
|
136
136
|
"summary": "CLI-Anything — discover and register Agent-native CLI tools as skills"
|
|
137
137
|
},
|
|
138
|
+
{
|
|
139
|
+
"name": "code-intel",
|
|
140
|
+
"aliases": ["ci"],
|
|
141
|
+
"module": "./commands/codeintel.js",
|
|
142
|
+
"register": "registerCodeIntelCommand",
|
|
143
|
+
"summary": "Semantic code navigation via LSP (definition/references/symbols/diagnostics)"
|
|
144
|
+
},
|
|
138
145
|
{
|
|
139
146
|
"name": "codegen",
|
|
140
147
|
"aliases": [],
|
|
@@ -303,6 +310,13 @@
|
|
|
303
310
|
"register": "registerEncryptCommand",
|
|
304
311
|
"summary": "File encryption and database encryption management"
|
|
305
312
|
},
|
|
313
|
+
{
|
|
314
|
+
"name": "eval",
|
|
315
|
+
"aliases": [],
|
|
316
|
+
"module": "./commands/eval.js",
|
|
317
|
+
"register": "registerEvalCommand",
|
|
318
|
+
"summary": "Run the reliability eval suite (self-checking coding tasks) and report the task-success rate"
|
|
319
|
+
},
|
|
306
320
|
{
|
|
307
321
|
"name": "evolution",
|
|
308
322
|
"aliases": [],
|
|
@@ -996,6 +1010,13 @@
|
|
|
996
1010
|
"register": "registerSyncCommand",
|
|
997
1011
|
"summary": "File and knowledge synchronization"
|
|
998
1012
|
},
|
|
1013
|
+
{
|
|
1014
|
+
"name": "team",
|
|
1015
|
+
"aliases": [],
|
|
1016
|
+
"module": "./commands/team.js",
|
|
1017
|
+
"register": "registerTeamCommand",
|
|
1018
|
+
"summary": "Run a declared task graph across N teammates (exclusive leases + dependency DAG)"
|
|
1019
|
+
},
|
|
999
1020
|
{
|
|
1000
1021
|
"name": "tech",
|
|
1001
1022
|
"aliases": [],
|
package/src/commands/agent.js
CHANGED
|
@@ -177,6 +177,19 @@ export function registerAgentCommand(program) {
|
|
|
177
177
|
"Run shell commands in an ephemeral Docker sandbox (network disabled by default)",
|
|
178
178
|
)
|
|
179
179
|
.option("--sandbox-network", "Allow network access inside --sandbox")
|
|
180
|
+
.option(
|
|
181
|
+
"--otlp <file>",
|
|
182
|
+
"Write the agent run's OpenTelemetry spans (model/tool/retry) as OTLP/JSON to <file>",
|
|
183
|
+
)
|
|
184
|
+
.option(
|
|
185
|
+
"--auto-rewake",
|
|
186
|
+
"When an async `asyncRewake` hook (e.g. a background test) fails at turn end, re-engage the agent to fix it (bounded by --max-rewakes)",
|
|
187
|
+
)
|
|
188
|
+
.option(
|
|
189
|
+
"--max-rewakes <n>",
|
|
190
|
+
"Max auto-rewake re-drives per run (default 1); implies --auto-rewake",
|
|
191
|
+
(v) => parseInt(v, 10),
|
|
192
|
+
)
|
|
180
193
|
.option(
|
|
181
194
|
"--bg, --background",
|
|
182
195
|
"Start as a detached background agent and return its id immediately",
|
|
@@ -252,7 +265,7 @@ export function registerAgentCommand(program) {
|
|
|
252
265
|
)
|
|
253
266
|
.option(
|
|
254
267
|
"--fallback-model <model>",
|
|
255
|
-
"Backup model(s) to try in order when the primary fails (transient error or model-not-found). Repeatable or comma-separated; up to 3. Defaults to config llm.fallbackModels.
|
|
268
|
+
"Backup model(s) to try in order when the primary fails (transient error or model-not-found). Repeatable or comma-separated; up to 3. A `provider:model` entry (e.g. openai:gpt-4o) falls back cross-provider, using that provider's API key from its env var (skipped if unset — never reuses the primary key). Defaults to config llm.fallbackModels.",
|
|
256
269
|
(val, prev) => (prev || []).concat([val]),
|
|
257
270
|
)
|
|
258
271
|
.option(
|
|
@@ -509,6 +522,7 @@ export function registerAgentCommand(program) {
|
|
|
509
522
|
// over a settings model. Applied once here so every branch (headless +
|
|
510
523
|
// interactive, which all read options.model) picks it up; env vars are
|
|
511
524
|
// set on the process so the agent loop + child tools inherit them.
|
|
525
|
+
let settingsSandbox = null;
|
|
512
526
|
try {
|
|
513
527
|
const { loadSettingsConfig } =
|
|
514
528
|
await import("../lib/settings-loader.cjs");
|
|
@@ -520,6 +534,7 @@ export function registerAgentCommand(program) {
|
|
|
520
534
|
process.env[k] = v;
|
|
521
535
|
}
|
|
522
536
|
if (!options.model && sc.model) options.model = sc.model;
|
|
537
|
+
settingsSandbox = sc.sandbox || null;
|
|
523
538
|
} catch {
|
|
524
539
|
// settings overrides are best-effort 鈥?never block the run
|
|
525
540
|
}
|
|
@@ -651,10 +666,22 @@ export function registerAgentCommand(program) {
|
|
|
651
666
|
const fallbackChatFn = fallbackModels.length
|
|
652
667
|
? makeFallbackChatFn({
|
|
653
668
|
fallbackModels,
|
|
654
|
-
onFallback: ({
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
669
|
+
onFallback: ({
|
|
670
|
+
from,
|
|
671
|
+
to,
|
|
672
|
+
error,
|
|
673
|
+
skipped,
|
|
674
|
+
reason,
|
|
675
|
+
crossProvider,
|
|
676
|
+
}) =>
|
|
677
|
+
skipped
|
|
678
|
+
? process.stderr.write(
|
|
679
|
+
`Note: fallback "${to}" skipped (${reason}).\n`,
|
|
680
|
+
)
|
|
681
|
+
: process.stderr.write(
|
|
682
|
+
`Note: model "${from}" failed (${error}); retrying with ` +
|
|
683
|
+
`${crossProvider ? "cross-provider " : ""}fallback "${to}".\n`,
|
|
684
|
+
),
|
|
658
685
|
})
|
|
659
686
|
: undefined;
|
|
660
687
|
|
|
@@ -822,6 +849,7 @@ export function registerAgentCommand(program) {
|
|
|
822
849
|
const agentSandbox = normalizeAgentSandbox(options.sandbox, {
|
|
823
850
|
cwd: process.cwd(),
|
|
824
851
|
network: options.sandboxNetwork === true,
|
|
852
|
+
settings: settingsSandbox,
|
|
825
853
|
});
|
|
826
854
|
// Resume requested onto a session with no headless (JSONL) transcript?
|
|
827
855
|
// Warn instead of silently starting empty 鈥?headless resume rebuilds
|
|
@@ -864,6 +892,16 @@ export function registerAgentCommand(program) {
|
|
|
864
892
|
additionalDirectories,
|
|
865
893
|
sandbox: agentSandbox,
|
|
866
894
|
autoCheckpoint,
|
|
895
|
+
// --otlp <file>: capture + export the run's OTel spans as OTLP/JSON.
|
|
896
|
+
otlp: options.otlp || null,
|
|
897
|
+
// --auto-rewake / --max-rewakes: bounded re-drive on async-hook failure.
|
|
898
|
+
// --max-rewakes implies --auto-rewake (a positive budget turns it on).
|
|
899
|
+
autoRewake:
|
|
900
|
+
options.autoRewake === true ||
|
|
901
|
+
(Number.isFinite(options.maxRewakes) && options.maxRewakes > 0),
|
|
902
|
+
maxRewakes: Number.isFinite(options.maxRewakes)
|
|
903
|
+
? options.maxRewakes
|
|
904
|
+
: undefined,
|
|
867
905
|
maxTurns,
|
|
868
906
|
// commander maps --no-file-refs 鈫?options.fileRefs === false
|
|
869
907
|
expandFileRefs: options.fileRefs !== false,
|
|
@@ -975,6 +1013,7 @@ export function registerAgentCommand(program) {
|
|
|
975
1013
|
sandbox: normalizeAgentSandbox(options.sandbox, {
|
|
976
1014
|
cwd: process.cwd(),
|
|
977
1015
|
network: options.sandboxNetwork === true,
|
|
1016
|
+
settings: settingsSandbox,
|
|
978
1017
|
}),
|
|
979
1018
|
autoCheckpoint,
|
|
980
1019
|
// --vim: start the REPL in vim-mode editing (also CC_VIM=1 or /vim).
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* cc code-intel — semantic code navigation via the Language Server Protocol.
|
|
3
|
+
*
|
|
4
|
+
* End-to-end surface for the LSP code-intelligence layer (Phase 2 of the CLI
|
|
5
|
+
* optimization plan). Proves the stack works without touching the contended
|
|
6
|
+
* agent-core; the agent `code_intelligence` tool is wired separately.
|
|
7
|
+
*
|
|
8
|
+
* cc code-intel status # which servers are installed
|
|
9
|
+
* cc code-intel def <file> <line> <col> # go to definition
|
|
10
|
+
* cc code-intel refs <file> <line> <col> # find references
|
|
11
|
+
* cc code-intel hover <file> <line> <col> # type / doc info
|
|
12
|
+
* cc code-intel symbols <file> # document symbols
|
|
13
|
+
* cc code-intel wsymbols <query> # workspace symbol search
|
|
14
|
+
* cc code-intel diag <file> # diagnostics
|
|
15
|
+
* cc code-intel rename <file> <line> <col> <newName> # preview a rename
|
|
16
|
+
*
|
|
17
|
+
* Positions are 1-based (line/col), matching editor gutters.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import chalk from "chalk";
|
|
21
|
+
import { logger } from "../lib/logger.js";
|
|
22
|
+
|
|
23
|
+
function num(v, name) {
|
|
24
|
+
const n = Number.parseInt(v, 10);
|
|
25
|
+
if (!Number.isFinite(n) || n < 1) {
|
|
26
|
+
throw new Error(`${name} must be a positive integer (1-based), got "${v}"`);
|
|
27
|
+
}
|
|
28
|
+
return n;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
async function withCI(fn, { json } = {}) {
|
|
32
|
+
const { CodeIntelligence } = await import("../lib/lsp/code-intelligence.js");
|
|
33
|
+
// coldStart: each CLI invocation spawns a fresh server, so wait for the
|
|
34
|
+
// project to load before querying (the warm agent path leaves this off).
|
|
35
|
+
const ci = new CodeIntelligence({
|
|
36
|
+
projectRoot: process.cwd(),
|
|
37
|
+
coldStart: true,
|
|
38
|
+
});
|
|
39
|
+
try {
|
|
40
|
+
const result = await fn(ci);
|
|
41
|
+
if (json) {
|
|
42
|
+
console.log(JSON.stringify(result, null, 2));
|
|
43
|
+
}
|
|
44
|
+
return result;
|
|
45
|
+
} finally {
|
|
46
|
+
await ci.dispose();
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function reportUnavailable(res) {
|
|
51
|
+
logger.warn(
|
|
52
|
+
chalk.yellow(`LSP unavailable: ${res.reason}`) +
|
|
53
|
+
chalk.gray(
|
|
54
|
+
"\n → falling back to text search (`cc search` / agent search_files)",
|
|
55
|
+
),
|
|
56
|
+
);
|
|
57
|
+
process.exitCode = 3;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function fmtLoc(l) {
|
|
61
|
+
const pos = `${chalk.cyan(l.file)}:${chalk.yellow(l.line)}:${l.col}`;
|
|
62
|
+
return l.snippet ? `${pos} ${chalk.gray(l.snippet)}` : pos;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function registerCodeIntelCommand(program) {
|
|
66
|
+
const ci = program
|
|
67
|
+
.command("code-intel")
|
|
68
|
+
.alias("ci")
|
|
69
|
+
.description(
|
|
70
|
+
"Semantic code navigation via LSP (definition/references/symbols/diagnostics)",
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
ci.command("status")
|
|
74
|
+
.description("Show which language servers are installed and detectable")
|
|
75
|
+
.option("--json", "Output as JSON")
|
|
76
|
+
.action(async (options) => {
|
|
77
|
+
const { probeServers, supportedExtensions } =
|
|
78
|
+
await import("../lib/lsp/lsp-server-registry.js");
|
|
79
|
+
// Surface plugin-contributed servers too (Phase 3: .lsp.json).
|
|
80
|
+
const { ensurePluginLspServers } =
|
|
81
|
+
await import("../lib/plugin-runtime/lsp.js");
|
|
82
|
+
ensurePluginLspServers({ cwd: process.cwd() });
|
|
83
|
+
const servers = probeServers(process.cwd());
|
|
84
|
+
if (options.json) {
|
|
85
|
+
console.log(
|
|
86
|
+
JSON.stringify(
|
|
87
|
+
{ servers, extensions: supportedExtensions() },
|
|
88
|
+
null,
|
|
89
|
+
2,
|
|
90
|
+
),
|
|
91
|
+
);
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
logger.log(chalk.bold("LSP servers:"));
|
|
95
|
+
for (const s of servers) {
|
|
96
|
+
const mark = s.available ? chalk.green("✔") : chalk.gray("✖");
|
|
97
|
+
const where = s.available
|
|
98
|
+
? chalk.gray(s.command)
|
|
99
|
+
: chalk.gray("not installed");
|
|
100
|
+
logger.log(` ${mark} ${s.id.padEnd(28)} ${where}`);
|
|
101
|
+
}
|
|
102
|
+
const anyAvail = servers.some((s) => s.available);
|
|
103
|
+
if (!anyAvail) {
|
|
104
|
+
logger.log(
|
|
105
|
+
chalk.yellow(
|
|
106
|
+
"\nNo language servers found. Install one to enable semantic navigation, e.g.:\n",
|
|
107
|
+
) + chalk.gray(" npm i -g typescript-language-server typescript"),
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
ci.command("def <file> <line> <col>")
|
|
113
|
+
.description("Go to definition of the symbol at file:line:col")
|
|
114
|
+
.option("--json", "Output as JSON")
|
|
115
|
+
.action(async (file, line, col, options) => {
|
|
116
|
+
const res = await withCI(
|
|
117
|
+
(c) => c.definition(file, num(line, "line"), num(col, "col")),
|
|
118
|
+
options,
|
|
119
|
+
);
|
|
120
|
+
if (!res.available) return reportUnavailable(res);
|
|
121
|
+
if (options.json) return;
|
|
122
|
+
if (!res.locations.length)
|
|
123
|
+
return logger.log(chalk.gray("No definition found."));
|
|
124
|
+
for (const l of res.locations) logger.log(fmtLoc(l));
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
ci.command("refs <file> <line> <col>")
|
|
128
|
+
.description("Find references to the symbol at file:line:col")
|
|
129
|
+
.option("--no-decl", "Exclude the declaration itself")
|
|
130
|
+
.option("--json", "Output as JSON")
|
|
131
|
+
.action(async (file, line, col, options) => {
|
|
132
|
+
const res = await withCI(
|
|
133
|
+
(c) =>
|
|
134
|
+
c.references(file, num(line, "line"), num(col, "col"), {
|
|
135
|
+
includeDeclaration: options.decl !== false,
|
|
136
|
+
}),
|
|
137
|
+
options,
|
|
138
|
+
);
|
|
139
|
+
if (!res.available) return reportUnavailable(res);
|
|
140
|
+
if (options.json) return;
|
|
141
|
+
logger.log(chalk.bold(`${res.locations.length} reference(s):`));
|
|
142
|
+
for (const l of res.locations) logger.log(" " + fmtLoc(l));
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
ci.command("hover <file> <line> <col>")
|
|
146
|
+
.description("Show type/doc info for the symbol at file:line:col")
|
|
147
|
+
.option("--json", "Output as JSON")
|
|
148
|
+
.action(async (file, line, col, options) => {
|
|
149
|
+
const res = await withCI(
|
|
150
|
+
(c) => c.hover(file, num(line, "line"), num(col, "col")),
|
|
151
|
+
options,
|
|
152
|
+
);
|
|
153
|
+
if (!res.available) return reportUnavailable(res);
|
|
154
|
+
if (options.json) return;
|
|
155
|
+
logger.log(res.contents || chalk.gray("No hover info."));
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
ci.command("symbols <file>")
|
|
159
|
+
.description("List symbols declared in a document")
|
|
160
|
+
.option("--json", "Output as JSON")
|
|
161
|
+
.action(async (file, options) => {
|
|
162
|
+
const res = await withCI((c) => c.documentSymbols(file), options);
|
|
163
|
+
if (!res.available) return reportUnavailable(res);
|
|
164
|
+
if (options.json) return;
|
|
165
|
+
for (const s of res.symbols) {
|
|
166
|
+
const loc = chalk.gray(`${s.line}:${s.col}`);
|
|
167
|
+
const kind = chalk.magenta(s.kind.padEnd(10));
|
|
168
|
+
const container = s.container ? chalk.gray(` (${s.container})`) : "";
|
|
169
|
+
logger.log(` ${loc} ${kind} ${s.name}${container}`);
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
ci.command("wsymbols <query>")
|
|
174
|
+
.description("Search symbols across the workspace by name")
|
|
175
|
+
.option("--json", "Output as JSON")
|
|
176
|
+
.action(async (query, options) => {
|
|
177
|
+
const res = await withCI((c) => c.workspaceSymbols(query), options);
|
|
178
|
+
if (!res.available) return reportUnavailable(res);
|
|
179
|
+
if (options.json) return;
|
|
180
|
+
logger.log(chalk.bold(`${res.symbols.length} symbol(s):`));
|
|
181
|
+
for (const s of res.symbols) {
|
|
182
|
+
logger.log(
|
|
183
|
+
` ${chalk.magenta(s.kind.padEnd(10))} ${s.name} ${chalk.gray(`${s.file}:${s.line}`)}`,
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
ci.command("diag <file>")
|
|
189
|
+
.description("Show diagnostics (errors/warnings) for a file")
|
|
190
|
+
.option(
|
|
191
|
+
"--timeout <ms>",
|
|
192
|
+
"How long to wait for the server to publish",
|
|
193
|
+
"5000",
|
|
194
|
+
)
|
|
195
|
+
.option("--json", "Output as JSON")
|
|
196
|
+
.action(async (file, options) => {
|
|
197
|
+
const res = await withCI(
|
|
198
|
+
(c) =>
|
|
199
|
+
c.diagnostics(file, { timeoutMs: num(options.timeout, "timeout") }),
|
|
200
|
+
options,
|
|
201
|
+
);
|
|
202
|
+
if (!res.available) return reportUnavailable(res);
|
|
203
|
+
if (options.json) return;
|
|
204
|
+
if (!res.diagnostics.length)
|
|
205
|
+
return logger.log(chalk.green("No diagnostics."));
|
|
206
|
+
for (const d of res.diagnostics) {
|
|
207
|
+
const sev =
|
|
208
|
+
d.severity === "error"
|
|
209
|
+
? chalk.red(d.severity)
|
|
210
|
+
: d.severity === "warning"
|
|
211
|
+
? chalk.yellow(d.severity)
|
|
212
|
+
: chalk.gray(d.severity);
|
|
213
|
+
logger.log(
|
|
214
|
+
` ${chalk.gray(`${d.line}:${d.col}`)} ${sev} ${d.message}${d.code ? chalk.gray(` [${d.code}]`) : ""}`,
|
|
215
|
+
);
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
|
|
219
|
+
ci.command("rename <file> <line> <col> <newName>")
|
|
220
|
+
.description(
|
|
221
|
+
"Preview a symbol rename across files (does NOT apply the edit)",
|
|
222
|
+
)
|
|
223
|
+
.option("--json", "Output as JSON")
|
|
224
|
+
.action(async (file, line, col, newName, options) => {
|
|
225
|
+
const res = await withCI(
|
|
226
|
+
(c) =>
|
|
227
|
+
c.renamePreview(file, num(line, "line"), num(col, "col"), newName),
|
|
228
|
+
options,
|
|
229
|
+
);
|
|
230
|
+
if (!res.available) return reportUnavailable(res);
|
|
231
|
+
if (options.json) return;
|
|
232
|
+
const total = res.edits.reduce((n, f) => n + f.edits.length, 0);
|
|
233
|
+
logger.log(
|
|
234
|
+
chalk.bold(
|
|
235
|
+
`Rename would touch ${res.edits.length} file(s), ${total} edit(s):`,
|
|
236
|
+
),
|
|
237
|
+
);
|
|
238
|
+
for (const f of res.edits) {
|
|
239
|
+
logger.log(` ${chalk.cyan(f.file)} — ${f.edits.length} edit(s)`);
|
|
240
|
+
for (const e of f.edits) {
|
|
241
|
+
logger.log(chalk.gray(` ${e.line}:${e.col} → "${e.newText}"`));
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
logger.log(
|
|
245
|
+
chalk.gray(
|
|
246
|
+
"\n(preview only — apply with your editor or agent edit tools)",
|
|
247
|
+
),
|
|
248
|
+
);
|
|
249
|
+
});
|
|
250
|
+
|
|
251
|
+
return ci;
|
|
252
|
+
}
|