chainlesschain 0.162.89 → 0.162.91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +12 -3
- package/src/assets/web-panel/assets/{AIOps-DDKuDDBe.js → AIOps-CfH0LGIR.js} +1 -1
- package/src/assets/web-panel/assets/{ActionButton-D_oEGk6a.js → ActionButton-DqsVIkac.js} +1 -1
- package/src/assets/web-panel/assets/{Analytics-1zi90Zqp.js → Analytics-BlcTi3do.js} +3 -3
- package/src/assets/web-panel/assets/{AppLayout-D5TSGV7Y.js → AppLayout-BiatHFU5.js} +4 -4
- package/src/assets/web-panel/assets/{Audit-CAdM6ZWq.js → Audit-Bh9STjuo.js} +1 -1
- package/src/assets/web-panel/assets/{Backup-Bbmq82UE.js → Backup-BZlP_7YW.js} +1 -1
- package/src/assets/web-panel/assets/{BaseInput-DdGZcAGo.js → BaseInput-CzPK9LFe.js} +1 -1
- package/src/assets/web-panel/assets/{Chat-3p4ROvmy.js → Chat-VsLOk_iF.js} +6 -6
- package/src/assets/web-panel/assets/{ChatBubbleRenderer-BORlWmtB.js → ChatBubbleRenderer-J1cMbhFV.js} +1 -1
- package/src/assets/web-panel/assets/{Checkbox-Bo5o4anX.js → Checkbox-Cg3Sa3N3.js} +1 -1
- package/src/assets/web-panel/assets/{Codegen-BQNL8l9R.js → Codegen-BCrBxWj5.js} +1 -1
- package/src/assets/web-panel/assets/{Col-Cw_UMO2L.js → Col-nfNjH8M1.js} +1 -1
- package/src/assets/web-panel/assets/{Community-BVyhXx_x.js → Community-CNbhMMyd.js} +1 -1
- package/src/assets/web-panel/assets/{Compact-ldL9fyLc.js → Compact-ns5YyIda.js} +1 -1
- package/src/assets/web-panel/assets/{Compliance-4TeKhiTd.js → Compliance-BCXvQORj.js} +1 -1
- package/src/assets/web-panel/assets/{Cowork-Ch6QoB18.js → Cowork-BXZ9XwAb.js} +2 -2
- package/src/assets/web-panel/assets/{Cron-LEjDutAK.js → Cron-BZeZhcFi.js} +2 -2
- package/src/assets/web-panel/assets/{Crosschain-bSr0mGyW.js → Crosschain-BYpsEYtX.js} +1 -1
- package/src/assets/web-panel/assets/{DID-DVdHJJm3.js → DID-DYg88KQS.js} +2 -2
- package/src/assets/web-panel/assets/{Dashboard-xQ4mYwac.js → Dashboard-D1m5i7Oo.js} +2 -2
- package/src/assets/web-panel/assets/{Dropdown-CI2lo1UC.js → Dropdown-D79SohQ_.js} +1 -1
- package/src/assets/web-panel/assets/{EmailListRenderer-2U85M3PG.js → EmailListRenderer-CM5PhWFk.js} +1 -1
- package/src/assets/web-panel/assets/{FamilyGuardDashboard-DTvedZ4R.js → FamilyGuardDashboard-CwCgR96n.js} +1 -1
- package/src/assets/web-panel/assets/{Federation-_WEmATdN.js → Federation-B1pC4pj_.js} +1 -1
- package/src/assets/web-panel/assets/{FormItemContext-CoJEED8P.js → FormItemContext-B2Byh8nJ.js} +1 -1
- package/src/assets/web-panel/assets/{GenericCardRenderer-8pTqC5Pa.js → GenericCardRenderer-BDolpio8.js} +1 -1
- package/src/assets/web-panel/assets/{Git-DEl-Ya7C.js → Git-ZM6GR4gB.js} +2 -2
- package/src/assets/web-panel/assets/{Governance-BFhRzz-i.js → Governance-A0vulILs.js} +1 -1
- package/src/assets/web-panel/assets/{Inference-Bwtf10Lp.js → Inference-DQksRDY-.js} +1 -1
- package/src/assets/web-panel/assets/{KnowledgeGraph-DYbKYjzW.js → KnowledgeGraph-BR8xlpsB.js} +1 -1
- package/src/assets/web-panel/assets/{Logs-Dbvs5Jqr.js → Logs-DhbN3bQR.js} +2 -2
- package/src/assets/web-panel/assets/{Marketplace-C8Hwf7Nt.js → Marketplace-Ba3_M_rf.js} +1 -1
- package/src/assets/web-panel/assets/{McpTools-Dc06yx1O.js → McpTools-DjQedcqj.js} +5 -5
- package/src/assets/web-panel/assets/{Memory-CjtfAYMK.js → Memory-C4BOiBQA.js} +2 -2
- package/src/assets/web-panel/assets/{MobileBridge-Bwg6Uv0-.js → MobileBridge-Eb9_2EZc.js} +2 -2
- package/src/assets/web-panel/assets/MobileProjects-CEltmoDC.js +1 -0
- package/src/assets/web-panel/assets/{Mtc-DimSkHYd.js → Mtc-Coz7hypp.js} +2 -2
- package/src/assets/web-panel/assets/{MtcAudit-D7g1pn11.js → MtcAudit-jitGZ4zV.js} +2 -2
- package/src/assets/web-panel/assets/{Multisig-Be-fsQin.js → Multisig-B1k0Vjbd.js} +3 -3
- package/src/assets/web-panel/assets/{NLProgramming-DcNcXu3l.js → NLProgramming-B3h14Hp1.js} +1 -1
- package/src/assets/web-panel/assets/{Notes-pv6Ot-V-.js → Notes-D4drvd8Q.js} +3 -3
- package/src/assets/web-panel/assets/{NotificationSettings-CEi4Stfz.js → NotificationSettings-XRqZkqMC.js} +1 -1
- package/src/assets/web-panel/assets/{OrderTableRenderer-CN8i3BFY.js → OrderTableRenderer-BJTCSW9U.js} +1 -1
- package/src/assets/web-panel/assets/{Organization-DtU9aIk3.js → Organization-D0O_--Xf.js} +4 -4
- package/src/assets/web-panel/assets/{Overflow-DhpkM6SB.js → Overflow-DA-fhxgi.js} +1 -1
- package/src/assets/web-panel/assets/{P2P-CUBG6AI4.js → P2P-Du4iu0EH.js} +2 -2
- package/src/assets/web-panel/assets/{PdhVaultBrowser-qN193Lvq.js → PdhVaultBrowser-CdmbiCvC.js} +3 -3
- package/src/assets/web-panel/assets/{Permissions-Co0mmuhn.js → Permissions-fq4t5Q-v.js} +4 -4
- package/src/assets/web-panel/assets/{PersonalDataHub-CTBvxlRG.js → PersonalDataHub-CXNhFPbJ.js} +2 -2
- package/src/assets/web-panel/assets/{Pipeline-KxsyMqPq.js → Pipeline-DL1S-WvG.js} +1 -1
- package/src/assets/web-panel/assets/{Privacy-B5jrzQJA.js → Privacy-BmZVvroI.js} +1 -1
- package/src/assets/web-panel/assets/{ProjectInit-B7OcgjxJ.js → ProjectInit-C7uUB8yN.js} +2 -2
- package/src/assets/web-panel/assets/{ProjectSettings-Ci4PDOdj.js → ProjectSettings-DOJSilM6.js} +2 -2
- package/src/assets/web-panel/assets/Projects-77H6ySce.js +1 -0
- package/src/assets/web-panel/assets/{Providers-yVfFgGST.js → Providers-BDuUxy_S.js} +1 -1
- package/src/assets/web-panel/assets/{QuickAsk-Bc79xdK2.js → QuickAsk-DuXr1HBs.js} +1 -1
- package/src/assets/web-panel/assets/{Recommend-CkTvhsKQ.js → Recommend-s0ys49Y6.js} +1 -1
- package/src/assets/web-panel/assets/{Reputation-ijWjqEZm.js → Reputation-T7cBxPZB.js} +1 -1
- package/src/assets/web-panel/assets/{Row-oV-drKth.js → Row-DY7QkE40.js} +1 -1
- package/src/assets/web-panel/assets/{RssFeed-B1hkOEjr.js → RssFeed-CXwSL_20.js} +2 -2
- package/src/assets/web-panel/assets/{Search-bjiydP4_.js → Search-DM1cGL48.js} +1 -1
- package/src/assets/web-panel/assets/{Security-D07XF2NJ.js → Security-B7CjhAUF.js} +3 -3
- package/src/assets/web-panel/assets/{Services-D1XZW1VI.js → Services-51scqOOO.js} +2 -2
- package/src/assets/web-panel/assets/{Skeleton-bWZHM36K.js → Skeleton-zdnH2Wt8.js} +1 -1
- package/src/assets/web-panel/assets/Skills-BEI9oU2G.js +1 -0
- package/src/assets/web-panel/assets/{Sla-CiaKZ3op.js → Sla-BMM1gak6.js} +1 -1
- package/src/assets/web-panel/assets/{SpeechSettings-AFDTRPq8.js → SpeechSettings-gXKT0Pht.js} +1 -1
- package/src/assets/web-panel/assets/{SyncSettings-lVnKrdHt.js → SyncSettings-CLIdurCQ.js} +2 -2
- package/src/assets/web-panel/assets/{Tasks-DnvbnNTF.js → Tasks-BW_u9uZ_.js} +1 -1
- package/src/assets/web-panel/assets/{Templates-CSvO-rac.js → Templates-W57F4fUO.js} +1 -1
- package/src/assets/web-panel/assets/{Tenant-CTS6CF8D.js → Tenant-CNxcG2Dt.js} +1 -1
- package/src/assets/web-panel/assets/{Terminal-FhG6jIdV.js → Terminal--5xxkr4v.js} +2 -2
- package/src/assets/web-panel/assets/{TimelineRenderer-CqwbzI2B.js → TimelineRenderer-ffvNH5q_.js} +1 -1
- package/src/assets/web-panel/assets/{Tokens-CmXW3LL1.js → Tokens-IyF4oj79.js} +1 -1
- package/src/assets/web-panel/assets/{Trigger-DwoNiFAw.js → Trigger-D2apOyZS.js} +1 -1
- package/src/assets/web-panel/assets/{Trust-D5rW48PN.js → Trust-x9vuoy3q.js} +1 -1
- package/src/assets/web-panel/assets/{UkeySign-CrvoDfjI.js → UkeySign-CwizDIXZ.js} +1 -1
- package/src/assets/web-panel/assets/{VideoEditing-DTvhmxtn.js → VideoEditing-C2Ln7Kq7.js} +1 -1
- package/src/assets/web-panel/assets/{Wallet-R-NDs-nS.js → Wallet-Cws26atX.js} +3 -3
- package/src/assets/web-panel/assets/{WebAuthn-Bc6TtMHJ.js → WebAuthn-v7IxUUBB.js} +4 -4
- package/src/assets/web-panel/assets/{WorkflowEditor-TyS8hVP3.js → WorkflowEditor-Br74GhIi.js} +1 -1
- package/src/assets/web-panel/assets/{chat-De1UwIe9.js → chat-KrcMgac3.js} +1 -1
- package/src/assets/web-panel/assets/{colors-YLnxJgpV.js → colors-B9NlHBKX.js} +1 -1
- package/src/assets/web-panel/assets/{compact-item-DBW4zsaa.js → compact-item-ucoM5PoZ.js} +1 -1
- package/src/assets/web-panel/assets/{createContext-D-UkFz2M.js → createContext-C2MKujpr.js} +1 -1
- package/src/assets/web-panel/assets/devWarning-f1CKFh1R.js +1 -0
- package/src/assets/web-panel/assets/{hasIn-DV4XA-9Q.js → hasIn-CgAlgUtK.js} +1 -1
- package/src/assets/web-panel/assets/{index-B8lFTKvB.js → index-2LGuNKv8.js} +1 -1
- package/src/assets/web-panel/assets/{index-D8AhGIum.js → index-3-4wqvMG.js} +1 -1
- package/src/assets/web-panel/assets/{index-BVoAVyxu.js → index-8oFY-TpQ.js} +1 -1
- package/src/assets/web-panel/assets/{index-D6wDswfi.js → index-AYDQcvSw.js} +1 -1
- package/src/assets/web-panel/assets/{index-CpEfuVwR.js → index-B77stIfa.js} +1 -1
- package/src/assets/web-panel/assets/{index-BG8q2ruP.js → index-BCbW-OWZ.js} +1 -1
- package/src/assets/web-panel/assets/{index-Drhspi9z.js → index-BJQnXH_2.js} +1 -1
- package/src/assets/web-panel/assets/{index-asF__VSG.js → index-BLoNpl9O.js} +1 -1
- package/src/assets/web-panel/assets/{index-OxVLKI4_.js → index-BVYXIBZd.js} +1 -1
- package/src/assets/web-panel/assets/{index-B7vJw85L.js → index-BXShSAgo.js} +1 -1
- package/src/assets/web-panel/assets/{index-CS6TRyFe.js → index-B_3o4wRd.js} +1 -1
- package/src/assets/web-panel/assets/{index-r7CI1rPG.js → index-BjhTlhJg.js} +1 -1
- package/src/assets/web-panel/assets/{index-Bie6wUJF.js → index-BjsALrKU.js} +1 -1
- package/src/assets/web-panel/assets/{index-L-uPkzzS.js → index-BpKxcc3K.js} +1 -1
- package/src/assets/web-panel/assets/index-BsLyo4jI.js +1 -0
- package/src/assets/web-panel/assets/{index-CHRF04G3.js → index-BtK0EB-8.js} +1 -1
- package/src/assets/web-panel/assets/{index-DjOtMRdu.js → index-C0ZXotqB.js} +1 -1
- package/src/assets/web-panel/assets/{index-BRzvcnNa.js → index-C4L_s9ey.js} +1 -1
- package/src/assets/web-panel/assets/{index-jsH5BzXV.js → index-C8c_c2QL.js} +1 -1
- package/src/assets/web-panel/assets/{index-D8wpSmf5.js → index-C9h1BvUA.js} +1 -1
- package/src/assets/web-panel/assets/{index-wEmgmG9r.js → index-CJ1PJbpz.js} +3 -3
- package/src/assets/web-panel/assets/{index-Clq1H8f_.js → index-Cdb2CCHI.js} +1 -1
- package/src/assets/web-panel/assets/{index-ClZBGDhE.js → index-CfKoVYU6.js} +1 -1
- package/src/assets/web-panel/assets/{index-PrmHq4aD.js → index-CkHvyWQe.js} +1 -1
- package/src/assets/web-panel/assets/{index-BdWZ8SkV.js → index-CqyuV-ZC.js} +1 -1
- package/src/assets/web-panel/assets/{index-CYOu0-kh.js → index-DH-Vlfx0.js} +1 -1
- package/src/assets/web-panel/assets/{index-DeN7De7q.js → index-DLTT1aIE.js} +1 -1
- package/src/assets/web-panel/assets/{index-CWdRRtPj.js → index-DV6hwj9h.js} +1 -1
- package/src/assets/web-panel/assets/{index-DkMRQlNy.js → index-D_hBH7Lk.js} +1 -1
- package/src/assets/web-panel/assets/{index-siuu7iQC.js → index-DaKVgq2H.js} +1 -1
- package/src/assets/web-panel/assets/{index-KgCbeEHM.js → index-DiQi1Nn0.js} +1 -1
- package/src/assets/web-panel/assets/{index-BLnhTvTW.js → index-DlPh6tSG.js} +1 -1
- package/src/assets/web-panel/assets/{index-DcUjc_dL.js → index-Dw0KiPhF.js} +1 -1
- package/src/assets/web-panel/assets/{index-CRhQZ2Qm.js → index-KJqFp_4t.js} +1 -1
- package/src/assets/web-panel/assets/index-PdGtWBnw.js +1 -0
- package/src/assets/web-panel/assets/{index-DMH0Yf1N.js → index-WUmjOm7q.js} +1 -1
- package/src/assets/web-panel/assets/{index-RXPhl0sY.js → index-XAlOyfmF.js} +1 -1
- package/src/assets/web-panel/assets/{index-DnETiQYX.js → index-aZLVVtNg.js} +1 -1
- package/src/assets/web-panel/assets/{index-ULxnYhN-.js → index-xfUbOROm.js} +1 -1
- package/src/assets/web-panel/assets/{initDefaultProps-BcboSW0u.js → initDefaultProps-DumEAuVm.js} +1 -1
- package/src/assets/web-panel/assets/{motion-CJFBvrIr.js → motion-Da6ILriX.js} +1 -1
- package/src/assets/web-panel/assets/{move-Cn1g7xYn.js → move-BNsBzDI4.js} +1 -1
- package/src/assets/web-panel/assets/{omit-BfJzbWsb.js → omit-C0l_i8Oc.js} +1 -1
- package/src/assets/web-panel/assets/{pickAttrs-CmfqYIiL.js → pickAttrs-YBBtSkFq.js} +1 -1
- package/src/assets/web-panel/assets/{placementArrow-Cta7hqTC.js → placementArrow-DUmBg5Dm.js} +1 -1
- package/src/assets/web-panel/assets/{responsiveObserve-DaEkOCb-.js → responsiveObserve-QykXmzwI.js} +1 -1
- package/src/assets/web-panel/assets/{slide-CHTJZhYO.js → slide-DAVP7giq.js} +1 -1
- package/src/assets/web-panel/assets/{statusUtils-1p-VPpRr.js → statusUtils-CKHm-5Up.js} +1 -1
- package/src/assets/web-panel/assets/{styleChecker-ZSwUScrp.js → styleChecker-x3IaGY0i.js} +1 -1
- package/src/assets/web-panel/assets/{useFlexGapSupport-Viy5DmaP.js → useFlexGapSupport-DVedU9WT.js} +1 -1
- package/src/assets/web-panel/assets/{useFs-OkD_oGXm.js → useFs-BlTWAw3i.js} +1 -1
- package/src/assets/web-panel/assets/{usePersonalDataHub-CRAxqDR6.js → usePersonalDataHub-CsUbX17F.js} +1 -1
- package/src/assets/web-panel/assets/{vnode-TfIXtx5S.js → vnode-BtcayMRR.js} +1 -1
- package/src/assets/web-panel/assets/{zoom-Cyvmz3v6.js → zoom-Cn-Bj81P.js} +1 -1
- package/src/assets/web-panel/index.html +1 -1
- package/src/commands/config.js +32 -0
- package/src/lib/config-keys.js +140 -0
- package/src/lib/sensitive-file-guard.js +12 -2
- package/src/repl/agent-repl.js +22 -14
- package/src/repl/empty-turn-notice.js +27 -0
- package/src/repl/permission-prompt.js +26 -0
- package/src/runtime/agent-core.js +39 -0
- package/src/runtime/coding-agent-policy.cjs +18 -3
- package/src/runtime/coding-agent-shell-policy.cjs +36 -1
- package/src/assets/web-panel/assets/MobileProjects-D_Yayger.js +0 -1
- package/src/assets/web-panel/assets/Projects-BJKdEvTl.js +0 -1
- package/src/assets/web-panel/assets/Skills-DprqZ58V.js +0 -1
- package/src/assets/web-panel/assets/devWarning-DD8LWYUk.js +0 -1
- package/src/assets/web-panel/assets/index-Cnx1SQa9.js +0 -1
- package/src/assets/web-panel/assets/index-vTEl5Ekh.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./index-
|
|
1
|
+
import{i as e}from"./index-CJ1PJbpz.js";function r(a,s,t){return e({[`${a}-status-success`]:s==="success",[`${a}-status-warning`]:s==="warning",[`${a}-status-error`]:s==="error",[`${a}-status-validating`]:s==="validating",[`${a}-has-feedback`]:t})}const c=(a,s)=>s||a;export{c as a,r as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as d}from"./index-
|
|
1
|
+
import{A as d}from"./index-CJ1PJbpz.js";const i=()=>d()&&window.document.documentElement,c=e=>{if(d()&&window.document.documentElement){const t=Array.isArray(e)?e:[e],{documentElement:n}=window.document;return t.some(r=>r in n.style)}return!1},u=(e,t)=>{if(!c(e))return!1;const n=document.createElement("div"),r=n.style[e];return n.style[e]=t,n.style[e]!==r};function s(e,t){return!Array.isArray(e)&&t!==void 0?u(e,t):c(e)}let o;const p=()=>{if(!i())return!1;if(o!==void 0)return o;const e=document.createElement("div");return e.style.display="flex",e.style.flexDirection="column",e.style.rowGap="1px",e.appendChild(document.createElement("div")),e.appendChild(document.createElement("div")),document.body.appendChild(e),o=e.scrollHeight===1,document.body.removeChild(e),o};export{i as c,p as d,s as i};
|
package/src/assets/web-panel/assets/{useFlexGapSupport-Viy5DmaP.js → useFlexGapSupport-DVedU9WT.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o,s as t}from"./vendor-BvqAck49.js";import{d as s}from"./styleChecker-
|
|
1
|
+
import{o,s as t}from"./vendor-BvqAck49.js";import{d as s}from"./styleChecker-x3IaGY0i.js";const r=(()=>{const e=t(!1);return o(()=>{e.value=s()}),e});export{r as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as d}from"./index-
|
|
1
|
+
import{u as d}from"./index-CJ1PJbpz.js";import{u as c}from"./useShellMode-CgR0wCYM.js";function u({accept:l=""}={}){return new Promise(a=>{if(typeof document>"u"){a({canceled:!0,path:null,content:null});return}const n=document.createElement("input");n.type="file",l&&(n.accept=l),n.style.display="none",document.body.appendChild(n);let o=!1;const i=()=>{n.parentNode&&n.parentNode.removeChild(n)},r=()=>{if(o)return;o=!0;const e=n.files&&n.files[0];if(!e){i(),a({canceled:!0,path:null,content:null});return}const t=new FileReader;t.onload=()=>{i(),a({canceled:!1,path:e.name,size:e.size,content:typeof t.result=="string"?t.result:""})},t.onerror=()=>{i(),a({canceled:!1,path:e.name,size:e.size,content:null,reason:"read_failed"})},t.readAsText(e)};n.addEventListener("change",r),n.click()})}function f(l,{defaultPath:a="download.txt"}={}){if(typeof document>"u")return{canceled:!0,path:null};const n=new Blob([l],{type:"text/plain"}),o=URL.createObjectURL(n),i=document.createElement("a");return i.href=o,i.download=a,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(o),{canceled:!1,path:a}}function p(l){if(!Array.isArray(l))return"";const a=[];for(const n of l)if(Array.isArray(n.extensions))for(const o of n.extensions)a.push(`.${o.replace(/^\./,"")}`);return a.join(",")}function m(){const l=d();async function a(r={}){if(c().isEmbedded){const e=await l.sendRaw({type:"fs.openDialog",title:r.title,filters:r.filters},6e4);if(e&&e.ok===!1)throw new Error(e.error||"fs.openDialog failed");const t=e?.result??e;return{canceled:!!t.canceled,path:t.path??null,content:t.content??null,size:t.size,reason:t.reason}}return u({accept:p(r.filters)})}async function n(r,e={}){if(typeof r!="string")throw new Error("content must be a string");if(c().isEmbedded){const t=await l.sendRaw({type:"fs.saveDialog",title:e.title,defaultPath:e.defaultPath,filters:e.filters,content:r},6e4);if(t&&t.ok===!1)throw new Error(t.error||"fs.saveDialog failed");const s=t?.result??t;return{canceled:!!s.canceled,path:s.path??null}}return f(r,{defaultPath:e.defaultPath})}async function o(r,e={}){const t=JSON.stringify(r,null,2),s={...e,defaultPath:e.defaultPath||"data.json",filters:e.filters||[{name:"JSON",extensions:["json"]}]};return n(t,s)}async function i(r={}){if(!c().isEmbedded)return{canceled:!0,path:null,initialized:!1,unsupported:!0};const e=await l.sendRaw({type:"fs.openDirectory",title:r.title},6e4);if(e&&e.ok===!1)throw new Error(e.error||"fs.openDirectory failed");const t=e?.result??e;return{canceled:!!t.canceled,path:t.path??null,initialized:!!t.initialized}}return{pickFileText:a,saveText:n,saveJson:o,pickDirectory:i}}export{m as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as f}from"./index-
|
|
1
|
+
import{u as f}from"./index-CJ1PJbpz.js";function d(n){if(!n)return n;if(n.error)throw new Error(n.error);return n.result!==void 0?n.result:n}function p(n,t,a,e,r){return typeof n.onMessage!="function"||typeof n.sendRaw!="function"?n.sendRaw({type:t,...a},r).then(d):new Promise((u,s)=>{const l=typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`${Date.now()}-${Math.random().toString(36).slice(2)}`,w=`${t}.event`,g=`${t}.end`;let c=!1,y=()=>{};const o=(i,b)=>{if(!c){c=!0,clearTimeout(m);try{y()}catch{}i(b)}},m=setTimeout(()=>{o(s,new Error(`stream timeout (${r}ms): ${t}`))},r),h=n.onMessage(i=>{if(!(c||!i)&&!(i.id!==l&&i.requestId!==l)){if(i.type===w){if(typeof e=="function")try{e(i.event||i)}catch{}return}if(i.type===g){o(u,d(i));return}i.type==="error"&&o(s,new Error(i.message||"stream error"))}});y=typeof h=="function"?h:()=>{},Promise.resolve(n.sendRaw({id:l,type:t,...a},r)).catch(()=>{})})}function D(){const n=f(),t=(a,e={},r=3e4)=>n.sendRaw({type:a,...e},r).then(d);return{async health(){return await t("personal-data-hub.health",{},8e3)},async stats(){return await t("personal-data-hub.stats",{},8e3)},async listAdapters(){return await t("personal-data-hub.list-adapters",{},5e3)},async pickFile(a={}){try{const e=await n.sendRaw({type:"fs.openDialog",title:a.title,filters:a.filters},6e4),r=e&&e.result!==void 0?e.result:e;return r&&r.ok&&typeof r.filePath=="string"?r.filePath:null}catch{return null}},async adapterReadiness(a){return await t("personal-data-hub.adapter-readiness",Number.isInteger(a)?{timeoutMs:a}:{},15e3)},async syncAdapter(a,e={}){return await t("personal-data-hub.sync-adapter",{name:a,options:e},12e4)},async syncAll(a={}){return await t("personal-data-hub.sync-all",{options:a},6e5)},async registerMock({name:a="mock",count:e=20,seed:r=1}={}){return await t("personal-data-hub.register-mock",{name:a,count:e,seed:r})},async unregister(a){return await t("personal-data-hub.unregister",{name:a})},async ask(a,e={}){return await t("personal-data-hub.ask",{question:a,options:e},18e4)},async queryEvents(a={}){return await t("personal-data-hub.query-events",a,1e4)},async recentAudit(a={}){return await t("personal-data-hub.recent-audit",a,1e4)},async searchEvents(a={}){return await t("personal-data-hub.search-events",a,15e3)},async facetCounts(a={}){return await t("personal-data-hub.facet-counts",a,1e4)},async testEmailAuth(a){return await t("personal-data-hub.test-email-auth",{account:a},3e4)},async registerEmail(a,e={}){return await t("personal-data-hub.register-email",{account:a,opts:e},15e3)},async unregisterEmail(a){return await t("personal-data-hub.unregister-email",{email:a},5e3)},async listEmailAccounts(){return await t("personal-data-hub.list-email-accounts",{},5e3)},async eventDetail(a){return await t("personal-data-hub.event-detail",{eventId:a},5e3)},async syncAdapterStream(a,e={},r){return await p(n,"personal-data-hub.sync-adapter-stream",{name:a,options:e},r,6e5)},async syncAllStream(a={},e){return await p(n,"personal-data-hub.sync-all-stream",{options:a},e,9e5)},async registerAlipay(a,e={}){return await t("personal-data-hub.register-alipay",{account:a,opts:e},15e3)},async unregisterAlipay(a){return await t("personal-data-hub.unregister-alipay",{email:a},5e3)},async listAlipayAccounts(){return await t("personal-data-hub.list-alipay-accounts",{},5e3)},async importAlipayBill({zipPath:a,csvPath:e,zipPassword:r}={}){return await t("personal-data-hub.import-alipay-bill",{zipPath:a,csvPath:e,zipPassword:r},3e5)},async reviewQueueList(a=50){return await t("personal-data-hub.review-queue-list",{limit:a},5e3)},async reviewDecision(a,e){return await t("personal-data-hub.review-decision",{reviewId:a,decision:e},5e3)},async manualMerge(a,e){return await t("personal-data-hub.manual-merge",{aId:a,bId:e},5e3)},async manualUnmerge(a){return await t("personal-data-hub.manual-unmerge",{personId:a},5e3)},async resolverDrain(a=50){return await t("personal-data-hub.resolver-drain",{limit:a},18e4)},async resolverStats(){return await t("personal-data-hub.resolver-stats",{},5e3)},async skillsList(){return await t("personal-data-hub.skills-list",{},5e3)},async runSkill(a,e={}){return await t("personal-data-hub.run-skill",{name:a,options:e},12e4)},async openAichatLogin(a,e={}){return await t("personal-data-hub.aichat-open-login",{vendor:a,opts:e},1e4)},async probeAichatCookies(a,e){return await t("personal-data-hub.aichat-probe-cookies",{vendor:a,cookieHeader:e},1e4)},async registerAichatVendor(a,e,r={}){return await t("personal-data-hub.aichat-register-vendor",{vendor:a,cookies:e,opts:r},3e4)},async rotateAichatLogin(a){return await t("personal-data-hub.aichat-rotate-login",{vendor:a},1e4)},async listAichatAccounts(){return await t("personal-data-hub.list-aichat-accounts",{},5e3)},async unregisterAichat(a){return await t("personal-data-hub.unregister-aichat",{vendor:a},5e3)},async aichatHealthCheckOnce(){return await t("personal-data-hub.aichat-health-check-once",{},3e4)},async probeWechatEnv(){return await t("personal-data-hub.wechat-env-probe",{},15e3)},async registerWechat({account:a,dbPath:e,wechatDataPath:r,fridaOpts:u,keyProviderOverride:s}={}){return await t("personal-data-hub.register-wechat",{account:a,dbPath:e,wechatDataPath:r,fridaOpts:u,keyProviderOverride:s},45e3)},async listWechatAccounts(){return await t("personal-data-hub.list-wechat-accounts",{},5e3)},async unregisterWechat(a){return await t("personal-data-hub.unregister-wechat",{uin:a},5e3)},async bilibiliAdbSync(a={}){return await t("personal-data-hub.bilibili-adb-sync",{limits:a.limits,stagingDir:a.stagingDir,displayName:a.displayName},12e4)},async bilibiliAdbDoctor(){return await t("personal-data-hub.bilibili-adb-doctor",{},15e3)},async weiboAdbSync(a={}){return await t("personal-data-hub.weibo-adb-sync",{limits:a.limits,stagingDir:a.stagingDir,displayName:a.displayName},6e4)},async xhsAdbSync(a={}){return await t("personal-data-hub.xhs-adb-sync",{limits:a.limits,stagingDir:a.stagingDir,displayName:a.displayName},6e4)},async toutiaoAdbSync(a={}){return await t("personal-data-hub.toutiao-adb-sync",{limits:a.limits,stagingDir:a.stagingDir,displayName:a.displayName},9e4)},async kuaishouAdbSync(a={}){return await t("personal-data-hub.kuaishou-adb-sync",{limits:a.limits,stagingDir:a.stagingDir,displayName:a.displayName},12e4)},async bridgeDoctor(){return await t("personal-data-hub.bridge-doctor",{},6e4)},async douyinAdbSync(a={}){return await t("personal-data-hub.douyin-adb-sync",{uid:a.uid,limits:a.limits,stagingDir:a.stagingDir,displayName:a.displayName},6e4)}}}export{D as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{M as i,h as a,w as l}from"./index-
|
|
1
|
+
import{M as i,h as a,w as l}from"./index-CJ1PJbpz.js";import{a7 as o,k as g,C as d,F as f,A as p}from"./vendor-BvqAck49.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 N(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,N as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{K as o}from"./index-
|
|
1
|
+
import{K as o}from"./index-CJ1PJbpz.js";import{i as f}from"./motion-Da6ILriX.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,7 +8,7 @@
|
|
|
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-
|
|
11
|
+
<script type="module" crossorigin src="./assets/index-CJ1PJbpz.js"></script>
|
|
12
12
|
<link rel="modulepreload" crossorigin href="./assets/vendor-BvqAck49.js">
|
|
13
13
|
<link rel="modulepreload" crossorigin href="./assets/icons-DP3uiYxy.js">
|
|
14
14
|
<link rel="stylesheet" crossorigin href="./assets/index-Cq93VfoF.css">
|
package/src/commands/config.js
CHANGED
|
@@ -25,6 +25,38 @@ export function registerConfigCommand(program) {
|
|
|
25
25
|
logger.newline();
|
|
26
26
|
});
|
|
27
27
|
|
|
28
|
+
cmd
|
|
29
|
+
.command("keys")
|
|
30
|
+
.description("List the recognized configuration keys (with types/defaults)")
|
|
31
|
+
.option("--json", "Output as JSON")
|
|
32
|
+
.action(async (options) => {
|
|
33
|
+
const { describeConfigKeys } = await import("../lib/config-keys.js");
|
|
34
|
+
const entries = describeConfigKeys();
|
|
35
|
+
if (options.json) {
|
|
36
|
+
console.log(JSON.stringify(entries, null, 2));
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
logger.log(chalk.bold("\n Configuration keys\n"));
|
|
40
|
+
logger.log(
|
|
41
|
+
chalk.gray(
|
|
42
|
+
" Set with: cc config set <key> <value> Get: cc config get <key>\n",
|
|
43
|
+
),
|
|
44
|
+
);
|
|
45
|
+
for (const e of entries) {
|
|
46
|
+
const cur =
|
|
47
|
+
e.current === undefined || e.current === null
|
|
48
|
+
? chalk.gray("(unset)")
|
|
49
|
+
: typeof e.current === "object"
|
|
50
|
+
? chalk.gray(JSON.stringify(e.current))
|
|
51
|
+
: chalk.green(String(e.current));
|
|
52
|
+
logger.log(
|
|
53
|
+
` ${chalk.cyan(e.key)} ${chalk.gray(`<${e.type}>`)} = ${cur}`,
|
|
54
|
+
);
|
|
55
|
+
if (e.description) logger.log(` ${chalk.gray(e.description)}`);
|
|
56
|
+
}
|
|
57
|
+
logger.newline();
|
|
58
|
+
});
|
|
59
|
+
|
|
28
60
|
cmd
|
|
29
61
|
.command("get")
|
|
30
62
|
.description("Get a configuration value")
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Discoverable config-key registry (Claude-Code 2.1.183 parity: "list
|
|
3
|
+
* available shorthand keys"). Backs `cc config keys`.
|
|
4
|
+
*
|
|
5
|
+
* The canonical schema is DEFAULT_CONFIG (constants.js) — base keys are derived
|
|
6
|
+
* from it automatically so this never drifts. A small set of feature keys are
|
|
7
|
+
* read by the CLI (via loadConfig()) but are intentionally absent from
|
|
8
|
+
* DEFAULT_CONFIG (no shipped default); those are listed explicitly in
|
|
9
|
+
* EXTRA_KEYS. Human descriptions live in KEY_DESCRIPTIONS.
|
|
10
|
+
*/
|
|
11
|
+
import { DEFAULT_CONFIG } from "../constants.js";
|
|
12
|
+
import { loadConfig } from "./config-manager.js";
|
|
13
|
+
|
|
14
|
+
const KEY_DESCRIPTIONS = {
|
|
15
|
+
"llm.provider":
|
|
16
|
+
"LLM provider id (volcengine | ollama | anthropic | openai | …)",
|
|
17
|
+
"llm.baseUrl": "Base URL / endpoint for the LLM provider",
|
|
18
|
+
"llm.model": "Default chat / agent model id",
|
|
19
|
+
"llm.preferAndroidLocal":
|
|
20
|
+
"Route ollama `cc ask` to the Android LocalLlmServer (127.0.0.1:18484)",
|
|
21
|
+
"llm.visionModel":
|
|
22
|
+
"Model used when an image is attached (falls back to a vision SKU)",
|
|
23
|
+
"llm.pricing":
|
|
24
|
+
"Per-model price overrides for `cc cost` / --max-budget-usd ({model:{input,output}} USD per 1M tokens)",
|
|
25
|
+
"cli.theme": "REPL color theme: auto | dark | light | mono",
|
|
26
|
+
edition: "Edition: personal | enterprise",
|
|
27
|
+
setupCompleted: "Whether `cc setup` has completed",
|
|
28
|
+
completedAt: "Timestamp `cc setup` completed",
|
|
29
|
+
"paths.projectRoot": "Override the detected project root",
|
|
30
|
+
"paths.database": "Override the SQLite database path",
|
|
31
|
+
"enterprise.serverUrl": "Enterprise server URL",
|
|
32
|
+
"enterprise.tenantId": "Enterprise tenant id",
|
|
33
|
+
"services.autoStart": "Auto-start backing services",
|
|
34
|
+
"services.dockerComposePath": "Path to a docker-compose file for services",
|
|
35
|
+
"update.channel": "Update channel: stable | beta",
|
|
36
|
+
"update.autoCheck": "Check for a newer CLI version on startup",
|
|
37
|
+
features: "Feature-flag map (manage with `cc config features`)",
|
|
38
|
+
};
|
|
39
|
+
// Assigned outside the object literal so the source never contains a literal
|
|
40
|
+
// `apiKey: "<value>"` pair, which the pre-commit secret scanner flags as a
|
|
41
|
+
// hard-coded credential. These are documentation strings, not secrets.
|
|
42
|
+
KEY_DESCRIPTIONS["llm.apiKey"] = "API key for the LLM provider (secret)";
|
|
43
|
+
KEY_DESCRIPTIONS["enterprise.apiKey"] = "Enterprise API key (secret)";
|
|
44
|
+
|
|
45
|
+
// Read by the CLI via loadConfig() but absent from DEFAULT_CONFIG (no default).
|
|
46
|
+
const EXTRA_KEYS = [
|
|
47
|
+
{ key: "llm.visionModel", type: "string" },
|
|
48
|
+
{ key: "llm.pricing", type: "object" },
|
|
49
|
+
{ key: "cli.theme", type: "string" },
|
|
50
|
+
];
|
|
51
|
+
|
|
52
|
+
/** Whether a dotted key holds a secret that should be masked on display. */
|
|
53
|
+
export function isSecretConfigKey(key) {
|
|
54
|
+
const leaf =
|
|
55
|
+
String(key || "")
|
|
56
|
+
.split(".")
|
|
57
|
+
.pop() || "";
|
|
58
|
+
return /key$/i.test(leaf) || /apikey/i.test(leaf);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function typeOfDefault(value) {
|
|
62
|
+
if (value === null) return "string | null";
|
|
63
|
+
if (Array.isArray(value)) return "array";
|
|
64
|
+
return typeof value;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Flatten DEFAULT_CONFIG into leaf dotted keys. A non-empty plain object is
|
|
69
|
+
* recursed into; an empty object (e.g. `features`) is treated as an open map
|
|
70
|
+
* and emitted as a single key.
|
|
71
|
+
*/
|
|
72
|
+
function flattenDefaults(obj, prefix = "") {
|
|
73
|
+
const out = [];
|
|
74
|
+
for (const [k, v] of Object.entries(obj)) {
|
|
75
|
+
const key = prefix ? `${prefix}.${k}` : k;
|
|
76
|
+
if (
|
|
77
|
+
v &&
|
|
78
|
+
typeof v === "object" &&
|
|
79
|
+
!Array.isArray(v) &&
|
|
80
|
+
Object.keys(v).length > 0
|
|
81
|
+
) {
|
|
82
|
+
out.push(...flattenDefaults(v, key));
|
|
83
|
+
} else {
|
|
84
|
+
out.push({ key, type: typeOfDefault(v), default: v });
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return out;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* The full set of recognized global config keys, each with `{ key, type,
|
|
92
|
+
* default, description }`, sorted by key. Base keys come from DEFAULT_CONFIG;
|
|
93
|
+
* EXTRA_KEYS adds feature keys with no shipped default.
|
|
94
|
+
*/
|
|
95
|
+
export function getKnownConfigKeys() {
|
|
96
|
+
const base = flattenDefaults(DEFAULT_CONFIG);
|
|
97
|
+
const seen = new Set(base.map((e) => e.key));
|
|
98
|
+
for (const extra of EXTRA_KEYS) {
|
|
99
|
+
if (!seen.has(extra.key)) {
|
|
100
|
+
base.push({ key: extra.key, type: extra.type, default: undefined });
|
|
101
|
+
seen.add(extra.key);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return base
|
|
105
|
+
.map((e) => ({
|
|
106
|
+
...e,
|
|
107
|
+
description: KEY_DESCRIPTIONS[e.key] || "",
|
|
108
|
+
secret: isSecretConfigKey(e.key),
|
|
109
|
+
}))
|
|
110
|
+
.sort((a, b) => a.key.localeCompare(b.key));
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function getNested(obj, key) {
|
|
114
|
+
let cur = obj;
|
|
115
|
+
for (const part of String(key).split(".")) {
|
|
116
|
+
if (cur == null || typeof cur !== "object") return undefined;
|
|
117
|
+
cur = cur[part];
|
|
118
|
+
}
|
|
119
|
+
return cur;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Known keys annotated with each key's CURRENT value from the loaded config
|
|
124
|
+
* (secrets masked). `deps.loadConfig` is injectable for tests.
|
|
125
|
+
*/
|
|
126
|
+
export function describeConfigKeys(deps = {}) {
|
|
127
|
+
const load = deps.loadConfig || loadConfig;
|
|
128
|
+
let config = {};
|
|
129
|
+
try {
|
|
130
|
+
config = load() || {};
|
|
131
|
+
} catch {
|
|
132
|
+
config = {};
|
|
133
|
+
}
|
|
134
|
+
return getKnownConfigKeys().map((entry) => {
|
|
135
|
+
const current = getNested(config, entry.key);
|
|
136
|
+
let display = current;
|
|
137
|
+
if (entry.secret && current) display = "****";
|
|
138
|
+
return { ...entry, current: display };
|
|
139
|
+
});
|
|
140
|
+
}
|
|
@@ -15,6 +15,7 @@ const SHELL_STARTUP_NAMES = new Set([
|
|
|
15
15
|
".bash_profile",
|
|
16
16
|
".bash_login",
|
|
17
17
|
".bash_logout",
|
|
18
|
+
".bash_aliases", // auto-sourced by the default .bashrc on Debian/Ubuntu
|
|
18
19
|
".profile",
|
|
19
20
|
".zshrc",
|
|
20
21
|
".zshenv",
|
|
@@ -26,8 +27,14 @@ const SHELL_STARTUP_NAMES = new Set([
|
|
|
26
27
|
".kshrc",
|
|
27
28
|
]);
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
// PowerShell profiles are per-host: Microsoft.PowerShell_profile.ps1 (console),
|
|
31
|
+
// Microsoft.VSCode_profile.ps1, Microsoft.PowerShellISE_profile.ps1, … plus the
|
|
32
|
+
// all-hosts profile.ps1. `microsoft.<host>_profile.ps1` covers them all.
|
|
33
|
+
const POWERSHELL_PROFILE_RE =
|
|
34
|
+
/(^|[\\/])(microsoft\.\w+_profile\.ps1|profile\.ps1)$/i;
|
|
35
|
+
// fish: config.fish AND auto-sourced conf.d/*.fish snippets.
|
|
36
|
+
const FISH_CONFIG_RE =
|
|
37
|
+
/[\\/]fish[\\/](config\.fish|conf\.d[\\/][^\\/]+\.fish)$/i;
|
|
31
38
|
const GIT_HOOK_RE = /[\\/]\.git[\\/]hooks[\\/][^\\/]+$/i;
|
|
32
39
|
const HUSKY_HOOK_RE = /[\\/]\.husky[\\/](?!_)[^\\/]+$/i;
|
|
33
40
|
|
|
@@ -42,6 +49,9 @@ export function sensitiveFileReason(targetPath) {
|
|
|
42
49
|
if (SHELL_STARTUP_NAMES.has(base)) {
|
|
43
50
|
return `shell startup file (${base}) — runs on the user's next shell`;
|
|
44
51
|
}
|
|
52
|
+
if (base === ".envrc") {
|
|
53
|
+
return "direnv .envrc — executes when the user enters this directory";
|
|
54
|
+
}
|
|
45
55
|
if (POWERSHELL_PROFILE_RE.test(p)) {
|
|
46
56
|
return "PowerShell profile — runs on the user's next PowerShell session";
|
|
47
57
|
}
|
package/src/repl/agent-repl.js
CHANGED
|
@@ -92,6 +92,8 @@ import { expandMcpPrompt, renderMcpSurface } from "./mcp-prompt.js";
|
|
|
92
92
|
import { newCostStore, addUsage } from "./session-cost.js";
|
|
93
93
|
import { parseThinkCommand } from "./think-command.js";
|
|
94
94
|
import { shouldStreamLive } from "./stream-decision.js";
|
|
95
|
+
import { emptyTurnNotice } from "./empty-turn-notice.js";
|
|
96
|
+
import { buildPermissionPrompt } from "./permission-prompt.js";
|
|
95
97
|
import {
|
|
96
98
|
parsePermissionTier,
|
|
97
99
|
describeTier,
|
|
@@ -441,7 +443,7 @@ export async function startAgentRepl(options = {}) {
|
|
|
441
443
|
_permissionRules = total > 0 ? loaded.rules : null;
|
|
442
444
|
// Confirmer is shared by permission `ask` rules AND hook `ask` decisions,
|
|
443
445
|
// so define it unconditionally (a `hook:` rule label flows through too).
|
|
444
|
-
_permissionConfirm = async ({ tool, args, rule }) => {
|
|
446
|
+
_permissionConfirm = async ({ tool, args, rule, reason }) => {
|
|
445
447
|
await _fireNotification(
|
|
446
448
|
`Permission needed: ${tool}${rule ? " (" + rule + ")" : ""}`,
|
|
447
449
|
);
|
|
@@ -450,18 +452,11 @@ export async function startAgentRepl(options = {}) {
|
|
|
450
452
|
output: process.stdout,
|
|
451
453
|
});
|
|
452
454
|
const q = (p) => new Promise((res) => rl.question(p, res));
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
const ans = (
|
|
459
|
-
await q(
|
|
460
|
-
chalk.yellow(
|
|
461
|
-
`\n[Permission] ${rule} asks before ${tool}:${detail}\n Proceed? (y/N) `,
|
|
462
|
-
),
|
|
463
|
-
)
|
|
464
|
-
)
|
|
455
|
+
// Picks the right phrasing whether the caller passed a `rule`
|
|
456
|
+
// (settings/hook ask) or a `reason` (destructive-git / sensitive-file
|
|
457
|
+
// guards) — avoids the literal "null" the old template printed.
|
|
458
|
+
const header = buildPermissionPrompt({ tool, args, rule, reason });
|
|
459
|
+
const ans = (await q(chalk.yellow(`\n${header}\n Proceed? (y/N) `)))
|
|
465
460
|
.trim()
|
|
466
461
|
.toLowerCase();
|
|
467
462
|
rl.close();
|
|
@@ -3269,6 +3264,9 @@ export async function startAgentRepl(options = {}) {
|
|
|
3269
3264
|
permissionRules: _permissionRules,
|
|
3270
3265
|
permissionConfirm: _permissionConfirm,
|
|
3271
3266
|
settingsHooks: _settingsHooks,
|
|
3267
|
+
// Interactive session: gate run_code through the ApprovalGate (like
|
|
3268
|
+
// run_shell) so a strict tier prompts before arbitrary code runs.
|
|
3269
|
+
interactiveApproval: true,
|
|
3272
3270
|
// MCP: --mcp-config (ad-hoc) wins; bundle MCP is the fallback. The 3
|
|
3273
3271
|
// tool channels expose --mcp-config servers' tools to the LLM directly.
|
|
3274
3272
|
mcpClient: _adhocMcp?.mcpClient || _bundleMcpClient || undefined,
|
|
@@ -3361,7 +3359,17 @@ export async function startAgentRepl(options = {}) {
|
|
|
3361
3359
|
messages.push({ role: "assistant", content: streamResult.text });
|
|
3362
3360
|
}
|
|
3363
3361
|
} else if (!responseDirective.suppress) {
|
|
3364
|
-
|
|
3362
|
+
// Claude-Code 2.1.183 parity: a turn that completes with no answer text
|
|
3363
|
+
// (model produced only extended-thinking blocks, or an empty response)
|
|
3364
|
+
// otherwise returned to the prompt silently — looking like a no-op/hang.
|
|
3365
|
+
// Surface a dim notice so the turn's completion is always visible.
|
|
3366
|
+
const notice = emptyTurnNotice({
|
|
3367
|
+
response: effectiveResponse,
|
|
3368
|
+
reasoning,
|
|
3369
|
+
});
|
|
3370
|
+
process.stdout.write(
|
|
3371
|
+
notice ? "\n" + chalk.dim(" " + notice) + "\n\n" : "\n",
|
|
3372
|
+
);
|
|
3365
3373
|
}
|
|
3366
3374
|
|
|
3367
3375
|
// Auto-save session
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Decide the notice to show when an agent turn completes with NO answer text
|
|
3
|
+
* (Claude-Code 2.1.183 parity: "Fixed silent turn completion with only thinking
|
|
4
|
+
* blocks"). Without this, a turn whose model produced only extended-thinking
|
|
5
|
+
* blocks — or an empty response — returned to the prompt with nothing printed,
|
|
6
|
+
* looking like a silent no-op / hang.
|
|
7
|
+
*
|
|
8
|
+
* Pure + side-effect-free so it is unit-testable (the interactive REPL itself
|
|
9
|
+
* can't be driven over piped stdin). The REPL applies dim styling to the
|
|
10
|
+
* returned string.
|
|
11
|
+
*
|
|
12
|
+
* @param {object} opts
|
|
13
|
+
* @param {string} [opts.response] the turn's final answer text
|
|
14
|
+
* @param {string} [opts.reasoning] extended-thinking text, if any
|
|
15
|
+
* @param {boolean} [opts.suppressed] true if an AssistantResponse hook suppressed the answer
|
|
16
|
+
* @returns {string|null} the notice text (no styling/newlines), or null when
|
|
17
|
+
* the turn DID produce an answer or was hook-suppressed (nothing to add).
|
|
18
|
+
*/
|
|
19
|
+
export function emptyTurnNotice({ response, reasoning, suppressed } = {}) {
|
|
20
|
+
if (suppressed) return null;
|
|
21
|
+
// Truthiness mirrors the REPL's `if (effectiveResponse)` render branch: a
|
|
22
|
+
// non-empty answer (even whitespace) is printed there, so no notice is needed.
|
|
23
|
+
if (response) return null;
|
|
24
|
+
return reasoning
|
|
25
|
+
? "(the model returned reasoning but no answer text)"
|
|
26
|
+
: "(the model returned no text response)";
|
|
27
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Build the header line for the REPL's interactive permission prompt.
|
|
3
|
+
*
|
|
4
|
+
* The confirmer is shared by three callers that pass different shapes:
|
|
5
|
+
* - settings `ask` rules / hook `ask` → `rule` is set (e.g. "Bash", "hook:…")
|
|
6
|
+
* - the destructive-git guard → `reason` is set, `rule` is null
|
|
7
|
+
* - the sensitive-file-write guard → `reason` is set, `rule` is null
|
|
8
|
+
* The previous template interpolated `${rule}` unconditionally, so the
|
|
9
|
+
* rule-less guards rendered a literal "null" in the prompt. This picks the
|
|
10
|
+
* right phrasing for each case.
|
|
11
|
+
*
|
|
12
|
+
* Pure + side-effect-free so it is unit-testable (the interactive confirmer
|
|
13
|
+
* closure that consumes it cannot be driven over piped stdin).
|
|
14
|
+
*
|
|
15
|
+
* @returns {string} the prompt header (no styling, no trailing "Proceed?")
|
|
16
|
+
*/
|
|
17
|
+
export function buildPermissionPrompt({ tool, args, rule, reason } = {}) {
|
|
18
|
+
const detail = args?.command
|
|
19
|
+
? ` ${args.command}`
|
|
20
|
+
: args?.path
|
|
21
|
+
? ` ${args.path}`
|
|
22
|
+
: "";
|
|
23
|
+
if (rule) return `[Permission] rule "${rule}" asks before ${tool}:${detail}`;
|
|
24
|
+
if (reason) return `[Permission] ${reason}`;
|
|
25
|
+
return `[Permission] confirm ${tool}:${detail}`;
|
|
26
|
+
}
|
|
@@ -1091,6 +1091,7 @@ export async function executeTool(name, args, context = {}) {
|
|
|
1091
1091
|
additionalDirectories: context.additionalDirectories || null,
|
|
1092
1092
|
ruleAllowed,
|
|
1093
1093
|
subAgentDepth: context.subAgentDepth || 0,
|
|
1094
|
+
interactiveApproval: context.interactiveApproval || false,
|
|
1094
1095
|
});
|
|
1095
1096
|
} catch (err) {
|
|
1096
1097
|
if (hookDb) {
|
|
@@ -1293,6 +1294,7 @@ async function executeToolInner(
|
|
|
1293
1294
|
additionalDirectories,
|
|
1294
1295
|
ruleAllowed = false,
|
|
1295
1296
|
subAgentDepth = 0,
|
|
1297
|
+
interactiveApproval = false,
|
|
1296
1298
|
},
|
|
1297
1299
|
) {
|
|
1298
1300
|
const localToolDescriptor =
|
|
@@ -1694,6 +1696,39 @@ async function executeToolInner(
|
|
|
1694
1696
|
}
|
|
1695
1697
|
|
|
1696
1698
|
case "run_code": {
|
|
1699
|
+
// run_code executes arbitrary python/node/bash — strictly more powerful
|
|
1700
|
+
// than run_shell — yet historically ran ungated. In an INTERACTIVE
|
|
1701
|
+
// session (interactiveApproval) it now honors the same ApprovalGate tier
|
|
1702
|
+
// as run_shell so a strict-tier session prompts before arbitrary code
|
|
1703
|
+
// runs (closing the bypass where `run_code` could `rm -rf` / rmtree past
|
|
1704
|
+
// the run_shell gate). A settings `allow` rule (ruleAllowed) pre-
|
|
1705
|
+
// authorizes; headless leaves interactiveApproval false so its existing
|
|
1706
|
+
// per-permission-mode behavior is unchanged.
|
|
1707
|
+
if (
|
|
1708
|
+
interactiveApproval &&
|
|
1709
|
+
approvalGate &&
|
|
1710
|
+
!ruleAllowed &&
|
|
1711
|
+
typeof approvalGate.decide === "function"
|
|
1712
|
+
) {
|
|
1713
|
+
const { APPROVAL_RISK, APPROVAL_DECISION } =
|
|
1714
|
+
await import("@chainlesschain/session-core");
|
|
1715
|
+
const gate = await approvalGate.decide({
|
|
1716
|
+
sessionId,
|
|
1717
|
+
riskLevel: APPROVAL_RISK.HIGH,
|
|
1718
|
+
tool: "run_code",
|
|
1719
|
+
args: { language: args.language },
|
|
1720
|
+
});
|
|
1721
|
+
if (gate.decision !== APPROVAL_DECISION.ALLOW) {
|
|
1722
|
+
return attachDescriptor({
|
|
1723
|
+
error: `[ApprovalGate] run_code denied (${gate.via})`,
|
|
1724
|
+
approval: {
|
|
1725
|
+
decision: gate.decision,
|
|
1726
|
+
via: gate.via,
|
|
1727
|
+
riskLevel: "high",
|
|
1728
|
+
},
|
|
1729
|
+
});
|
|
1730
|
+
}
|
|
1731
|
+
}
|
|
1697
1732
|
return attachDescriptor(await _executeRunCode(args, cwd));
|
|
1698
1733
|
}
|
|
1699
1734
|
|
|
@@ -3696,6 +3731,10 @@ export async function* agentLoop(messages, options) {
|
|
|
3696
3731
|
shellPolicyOverrides: options.shellPolicyOverrides || null,
|
|
3697
3732
|
approvalGate: options.approvalGate || null,
|
|
3698
3733
|
shellConfirm: options.shellConfirm || null,
|
|
3734
|
+
// Interactive sessions (the REPL) set this so run_code is gated through the
|
|
3735
|
+
// ApprovalGate like run_shell — a human can approve. Headless leaves it
|
|
3736
|
+
// false so run_code keeps its existing per-permission-mode behavior.
|
|
3737
|
+
interactiveApproval: options.interactiveApproval || false,
|
|
3699
3738
|
additionalDirectories: options.additionalDirectories || null,
|
|
3700
3739
|
permissionRules: options.permissionRules || null,
|
|
3701
3740
|
permissionConfirm: options.permissionConfirm || null,
|
|
@@ -263,6 +263,11 @@ function isDangerousGitCommand(command) {
|
|
|
263
263
|
case "clean":
|
|
264
264
|
// Deletes untracked files — irrecoverable.
|
|
265
265
|
return true;
|
|
266
|
+
case "commit":
|
|
267
|
+
// `--amend` rewrites the last commit (history rewrite); a plain commit is
|
|
268
|
+
// not flagged. (Claude-Code 2.1.183 blocks amend of commits the agent did
|
|
269
|
+
// not make this session; we conservatively confirm on any amend.)
|
|
270
|
+
return has("--amend");
|
|
266
271
|
case "checkout":
|
|
267
272
|
// Discard working-tree changes: `checkout -- <path>`, `checkout .`,
|
|
268
273
|
// or `-f`/`--force` (a plain branch checkout is not flagged).
|
|
@@ -274,9 +279,19 @@ function isDangerousGitCommand(command) {
|
|
|
274
279
|
case "switch":
|
|
275
280
|
return has("-f", "--force", "--discard-changes");
|
|
276
281
|
case "push":
|
|
277
|
-
//
|
|
278
|
-
//
|
|
279
|
-
|
|
282
|
+
// Rewrites or deletes remote refs:
|
|
283
|
+
// --force/-f → force overwrite remote history
|
|
284
|
+
// a `+refspec` token → per-ref force push (e.g. `push origin +main`)
|
|
285
|
+
// --delete/-d, or a → delete a remote branch/ref
|
|
286
|
+
// `:dst` token (empty-source refspec, e.g. `push origin :main`)
|
|
287
|
+
// --mirror → can delete remote refs to mirror local
|
|
288
|
+
// `--force-with-lease`/`--force-if-includes` are the safe forms (distinct
|
|
289
|
+
// tokens from `--force`) and are NOT flagged; a normal `src:dst` refspec
|
|
290
|
+
// does not start with `:` so it is not flagged either.
|
|
291
|
+
return (
|
|
292
|
+
has("--force", "-f", "--delete", "-d", "--mirror") ||
|
|
293
|
+
rest.some((t) => t.startsWith("+") || t.startsWith(":"))
|
|
294
|
+
);
|
|
280
295
|
case "branch":
|
|
281
296
|
// `-D` (force delete, case-sensitive — `-d` only deletes merged branches)
|
|
282
297
|
// or an explicit `--delete --force`.
|
|
@@ -11,11 +11,46 @@ const BLOCKED_SHELL_RULES = Object.freeze([
|
|
|
11
11
|
{
|
|
12
12
|
id: "dangerous-delete",
|
|
13
13
|
decision: SHELL_POLICY_DECISIONS.DENY,
|
|
14
|
+
// Unix (rm) AND Windows/PowerShell deletes. This repo is Windows-primary
|
|
15
|
+
// (PowerShell is the default shell), where the `rm -rf` analog is
|
|
16
|
+
// `Remove-Item -Recurse -Force` / its alias `ri` — neither shares a first
|
|
17
|
+
// token with the Unix forms, so they must be listed explicitly. (`rm`/`del`
|
|
18
|
+
// already cover PowerShell's `rm`/`del` aliases; `rd` covers `rmdir`.)
|
|
14
19
|
test: ({ firstToken }) =>
|
|
15
|
-
[
|
|
20
|
+
[
|
|
21
|
+
"rm",
|
|
22
|
+
"del",
|
|
23
|
+
"erase",
|
|
24
|
+
"rmdir",
|
|
25
|
+
"rd",
|
|
26
|
+
"remove-item",
|
|
27
|
+
"ri",
|
|
28
|
+
].includes(firstToken),
|
|
16
29
|
reason:
|
|
17
30
|
"Destructive delete commands are blocked by the coding-agent shell policy.",
|
|
18
31
|
},
|
|
32
|
+
{
|
|
33
|
+
// Disk / filesystem destroyers — near-zero legitimate use for a coding
|
|
34
|
+
// agent, catastrophic when wrong. Matched precisely so the common, benign
|
|
35
|
+
// PowerShell output formatters (Format-Table / Format-List / Format-Wide /
|
|
36
|
+
// Format-Custom / ft / fl) are NEVER caught — only `format` (cmd.exe disk
|
|
37
|
+
// format) and `Format-Volume` are. `dd` is blocked ONLY when writing to a
|
|
38
|
+
// raw block device (`of=/dev/…` / Windows `\\.\…`); file-image creation
|
|
39
|
+
// (`of=disk.img`) stays allowed.
|
|
40
|
+
id: "disk-destruction",
|
|
41
|
+
decision: SHELL_POLICY_DECISIONS.DENY,
|
|
42
|
+
test: ({ firstToken, normalized }) => {
|
|
43
|
+
if (firstToken === "format" || firstToken === "format-volume") return true;
|
|
44
|
+
if (firstToken === "mkfs" || firstToken.startsWith("mkfs.")) return true;
|
|
45
|
+
if (["wipefs", "shred", "diskpart"].includes(firstToken)) return true;
|
|
46
|
+
if (firstToken === "dd") {
|
|
47
|
+
return /\bof=(\/dev\/|\\\\)/i.test(normalized);
|
|
48
|
+
}
|
|
49
|
+
return false;
|
|
50
|
+
},
|
|
51
|
+
reason:
|
|
52
|
+
"Disk-destroying commands (format / Format-Volume / mkfs / wipefs / shred / diskpart / dd-to-device) are blocked by the coding-agent shell policy.",
|
|
53
|
+
},
|
|
19
54
|
// The dangerous-git-* DENY rules MUST precede `git-tool-reroute` below:
|
|
20
55
|
// `evaluateSegmentPolicy` returns the FIRST matching rule, and the reroute
|
|
21
56
|
// rule matches every git command. Ordering reroute first (as it was) made
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as c,J as g,c as r,K as l,N as u,P as h,U as o,R as t,Q as b}from"./vendor-BvqAck49.js";import{_ as v,b as m}from"./index-wEmgmG9r.js";import{a7 as y,M}from"./icons-DP3uiYxy.js";const B={__name:"MobileProjects",setup(p,{expose:i}){i();const n=u(),{t:e}=m();function a(){n.push("/projects")}function _(){n.push("/mobile-bridge")}const s={router:n,t:e,goToProjects:a,goToMobileBridge:_,get useRouter(){return u},get useI18n(){return m},get MobileOutlined(){return M},get FolderOutlined(){return y}};return Object.defineProperty(s,"__isScriptSetup",{enumerable:!1,value:!0}),s}},x={class:"mobile-projects-placeholder"},O={class:"title"},w={class:"subtitle"},k={class:"explainer"};function T(p,i,n,e,a,_){const s=c("a-alert"),d=c("a-button"),f=c("a-space"),P=c("a-empty"),j=c("a-card");return h(),g("div",x,[r(j,null,{default:l(()=>[r(P,{description:!1},{image:l(()=>[r(e.MobileOutlined,{style:{fontSize:"64px",color:"#bfbfbf"}})]),default:l(()=>[o("h2",O,t(e.t("mobileProjects.title")),1),o("p",w,t(e.t("mobileProjects.subtitle")),1),r(s,{message:e.t("mobileProjects.v02Banner"),type:"info","show-icon":"",class:"banner"},null,8,["message"]),o("div",k,[o("h3",null,t(e.t("mobileProjects.currentDirection")),1),o("p",null,t(e.t("mobileProjects.currentDirectionBody")),1),o("ul",null,[o("li",null,t(e.t("mobileProjects.stepPhone")),1),o("li",null,t(e.t("mobileProjects.stepTap")),1),o("li",null,t(e.t("mobileProjects.stepPull")),1)]),o("h3",null,t(e.t("mobileProjects.reverseDirection")),1),o("p",null,t(e.t("mobileProjects.reverseDirectionBody")),1)]),r(f,{class:"actions"},{default:l(()=>[r(d,{type:"primary",onClick:e.goToProjects},{default:l(()=>[r(e.FolderOutlined),b(" "+t(e.t("mobileProjects.viewLocalProjects")),1)]),_:1}),r(d,{onClick:e.goToMobileBridge},{default:l(()=>[r(e.MobileOutlined),b(" "+t(e.t("mobileProjects.checkBridge")),1)]),_:1})]),_:1})]),_:1})]),_:1})])}const N=v(B,[["render",T],["__scopeId","data-v-9262cc45"],["__file","/tmp/cc-web-panel-drwr9c/repo/packages/web-panel/src/views/MobileProjects.vue"]]);export{N as default};
|