@chatcode/chatcode-cli-test 1.0.6 → 1.0.7

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.
Files changed (2) hide show
  1. package/dist/cli.js +1 -1
  2. package/package.json +6 -6
package/dist/cli.js CHANGED
@@ -9317,4 +9317,4 @@ Usage: chatcode-cli --remote "your task description"`,()=>A4(1));l("tengu_remote
9317
9317
  `));await TMq();let{teleportWithProgress:A$}=await Promise.resolve().then(() => (hp_(),Lp_)),W4=await A$(U8,Z6);lk6({sessionId:Z6}),HK=W4.messages}catch(Y7){if(Y7 instanceof jJ)process.stderr.write(Y7.formattedMessage+`
9318
9318
  `);else O6(Y7),process.stderr.write(f8.red(`Error: ${Q6(Y7)}
9319
9319
  `));await A4(1)}}}if(E_){let Y7=E_;try{let B_=performance.now(),A$=await xa(y_??Y7,void 0);if(!A$)return l("tengu_session_resumed",{entrypoint:"cli_flag",success:!1}),await CL(U8,`No conversation found with session ID: ${Y7}`);let W4=y_?.fullPath??A$.fullPath;if(Z7=await ALq(A$,{forkSession:!!M.forkSession,sessionIdOverride:Y7,transcriptPath:W4},y3),Z7.restoredAgentDef)P8=Z7.restoredAgentDef;l("tengu_session_resumed",{entrypoint:"cli_flag",success:!0,resume_duration_ms:Math.round(performance.now()-B_)})}catch(B_){l("tengu_session_resumed",{entrypoint:"cli_flag",success:!1}),O6(B_),await CL(U8,`Failed to resume session ${Y7}`)}}if(p)try{let Y7=await p,B_=KK(Y7,(A$)=>!A$.success);if(B_>0)process.stderr.write(f8.yellow(`Warning: ${B_}/${Y7.length} file(s) failed to download.
9320
- `))}catch(Y7){return await CL(U8,`Error downloading files: ${Q6(Y7)}`)}let b4=Z7??(Array.isArray(HK)?{messages:HK,fileHistorySnapshots:void 0,agentName:void 0,agentColor:void 0,restoredAgentDef:P8,initialState:Gz,contentReplacements:void 0}:void 0);if(b4)M08(M),J08(M),await tU6(U8,{getFpsMetrics:_K,stats:xK,initialState:b4.initialState},{...MY,mainThreadAgentDefinition:b4.restoredAgentDef??P8,initialMessages:b4.messages,initialFileHistorySnapshots:b4.fileHistorySnapshots,initialContentReplacements:b4.contentReplacements,initialAgentName:b4.agentName,initialAgentColor:b4.agentColor},MY6);else await UI_(U8,{getFpsMetrics:_K,stats:xK,initialState:Gz},Rm(mq()),{...MY,initialSearchQuery:s7,forkSession:M.forkSession,filterByPr:i4})}else{let r8=V3&&qz.length===0?V3:void 0;j_("action_after_hooks"),M08(M),J08(M);let HK=null,Z7=HK?[HK,...qz]:qz.length>0?qz:void 0;await yA8(),await tU6(U8,{getFpsMetrics:_K,stats:xK,initialState:Gz},{...MY,initialMessages:Z7,pendingHookMessages:r8},MY6)}}).version(`${MACRO.VERSION} (ChatCode CLI)`,"-v, --version","Output the version number"),B7("chromeIntegration"))K.option("--chrome","Enable browser integration"),K.option("--no-chrome","Disable browser integration");if(K.option("-w, --worktree [name]","Create a new git worktree for this session (optionally specify a name)"),K.option("--tmux","Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux."),no())K.addOption(new u$("--advisor <model>","Enable the server-side advisor tool with the specified model (alias or full ID).").hideHelp());if(K.addOption(new u$("--agent-id <id>","Teammate agent ID").hideHelp()),K.addOption(new u$("--agent-name <name>","Teammate display name").hideHelp()),K.addOption(new u$("--team-name <name>","Team name for swarm coordination").hideHelp()),K.addOption(new u$("--agent-color <color>","Teammate UI color").hideHelp()),K.addOption(new u$("--plan-mode-required","Require plan mode before implementation").hideHelp()),K.addOption(new u$("--parent-session-id <id>","Parent session ID for analytics correlation").hideHelp()),K.addOption(new u$("--teammate-mode <mode>",'How to spawn teammates: "tmux", "in-process", or "auto"').choices(["auto","tmux","in-process"]).hideHelp()),K.addOption(new u$("--agent-type <type>","Custom agent type for this teammate").hideHelp()),K.addOption(new u$("--sdk-url <url>","Use remote WebSocket endpoint for SDK I/O streaming (only with -p and stream-json format)").hideHelp()),B7("remoteControl"))K.addOption(new u$("--teleport [session]","Resume a teleport session, optionally specify session ID").hideHelp()),K.addOption(new u$("--remote [description]","Create a remote session with the given description").hideHelp());B7("remoteControl"),j_("run_main_options_built");let _=process.argv.includes("-p")||process.argv.includes("--print"),$=process.argv.some((j)=>j.startsWith("cc://")||j.startsWith("cc+unix://"));if(_&&!$)return j_("run_before_parse"),await K.parseAsync(process.argv),j_("run_after_parse"),K;let z=K.command("mcp").description("Configure and manage MCP servers").configureHelp(q()).enablePositionalOptions();if(z.command("serve").description("Start the ChatCode CLI MCP server").option("-d, --debug","Enable debug mode",()=>!0).option("--verbose","Override verbose mode setting from config",()=>!0).action(async({debug:j,verbose:M})=>{let{mcpServeHandler:J}=await Promise.resolve().then(() => (rt(),it));await J({debug:j,verbose:M})}),nx_(z),wc())rx_(z);if(z.command("remove <name>").description("Remove an MCP server").option("-s, --scope <scope>","Configuration scope (local, user, or project) - if not specified, removes from whichever scope it exists in").action(async(j,M)=>{let{mcpRemoveHandler:J}=await Promise.resolve().then(() => (rt(),it));await J(j,M)}),z.command("list").description("List configured MCP servers. Note: The workspace trust dialog is skipped and stdio servers from .mcp.json are spawned for health checks. Only use this command in directories you trust.").action(async()=>{let{mcpListHandler:j}=await Promise.resolve().then(() => (rt(),it));await j()}),z.command("get <name>").description("Get details about an MCP server. Note: The workspace trust dialog is skipped and stdio servers from .mcp.json are spawned for health checks. Only use this command in directories you trust.").action(async(j)=>{let{mcpGetHandler:M}=await Promise.resolve().then(() => (rt(),it));await M(j)}),z.command("add-json <name> <json>").description("Add an MCP server (stdio or SSE) with a JSON string").option("-s, --scope <scope>","Configuration scope (local, user, or project)","local").option("--client-secret","Prompt for OAuth client secret (or set MCP_CLIENT_SECRET env var)").action(async(j,M,J)=>{let{mcpAddJsonHandler:X}=await Promise.resolve().then(() => (rt(),it));await X(j,M,J)}),B7("desktopHandoff"))z.command("add-from-claude-desktop").description("Import MCP servers from desktop configuration (Mac and WSL only)").option("-s, --scope <scope>","Configuration scope (local, user, or project)","local").action(async(j)=>{let{mcpAddFromDesktopHandler:M}=await Promise.resolve().then(() => (rt(),it));await M(j)});z.command("reset-project-choices").description("Reset all approved and rejected project-scoped (.mcp.json) servers within this project").action(async()=>{let{mcpResetChoicesHandler:j}=await Promise.resolve().then(() => (rt(),it));await j()});let Y=K.command("auth").description("Manage authentication").configureHelp(q()),A=Y.command("login").description("Sign in to your ChatCode account").option("--email <email>","Pre-populate email address on the login page").option("--sso","Force SSO login flow").option("--console","Use ChatCode Console (API usage billing)");if(B7("consumerSubscription"))A.option("--claudeai","Use hosted subscription plan (default)");A.action(async({email:j,sso:M,console:J,claudeai:X})=>{let{authLogin:P}=await Promise.resolve().then(() => (aP6(),Aj8));await P({email:j,sso:M,console:J,claudeai:X})}),Y.command("status").description("Show authentication status").option("--json","Output as JSON (default)").option("--text","Output as human-readable text").action(async(j)=>{let{authStatus:M}=await Promise.resolve().then(() => (aP6(),Aj8));await M(j)}),Y.command("logout").description("Log out from your ChatCode account").action(async()=>{let{authLogout:j}=await Promise.resolve().then(() => (aP6(),Aj8));await j()});let O=()=>new u$("--cowork","Use cowork_plugins directory").hideHelp(),w=K.command("plugin").alias("plugins").description("Manage ChatCode CLI plugins").configureHelp(q());w.command("validate <path>").description("Validate a plugin or marketplace manifest").addOption(O()).action(async(j,M)=>{let{pluginValidateHandler:J}=await Promise.resolve().then(() => (IL(),bL));await J(j,M)}),w.command("list").description("List installed plugins").option("--json","Output as JSON").option("--available","Include available plugins from marketplaces (requires --json)").addOption(O()).action(async(j)=>{let{pluginListHandler:M}=await Promise.resolve().then(() => (IL(),bL));await M(j)});let H=w.command("marketplace").description("Manage ChatCode CLI marketplaces").configureHelp(q());if(H.command("add <source>").description("Add a marketplace from a URL, path, or GitHub repo").addOption(O()).option("--sparse <paths...>","Limit checkout to specific directories via git sparse-checkout (for monorepos). Example: --sparse .chatcode-cli-plugin plugins").option("--scope <scope>","Where to declare the marketplace: user (default), project, or local").action(async(j,M)=>{let{marketplaceAddHandler:J}=await Promise.resolve().then(() => (IL(),bL));await J(j,M)}),H.command("list").description("List all configured marketplaces").option("--json","Output as JSON").addOption(O()).action(async(j)=>{let{marketplaceListHandler:M}=await Promise.resolve().then(() => (IL(),bL));await M(j)}),H.command("remove <name>").alias("rm").description("Remove a configured marketplace").addOption(O()).action(async(j,M)=>{let{marketplaceRemoveHandler:J}=await Promise.resolve().then(() => (IL(),bL));await J(j,M)}),H.command("update [name]").description("Update marketplace(s) from their source - updates all if no name specified").addOption(O()).action(async(j,M)=>{let{marketplaceUpdateHandler:J}=await Promise.resolve().then(() => (IL(),bL));await J(j,M)}),w.command("install <plugin>").alias("i").description("Install a plugin from available marketplaces (use plugin@marketplace for specific marketplace)").option("-s, --scope <scope>","Installation scope: user, project, or local","user").addOption(O()).action(async(j,M)=>{let{pluginInstallHandler:J}=await Promise.resolve().then(() => (IL(),bL));await J(j,M)}),w.command("uninstall <plugin>").alias("remove").alias("rm").description("Uninstall an installed plugin").option("-s, --scope <scope>","Uninstall from scope: user, project, or local","user").option("--keep-data","Preserve the plugin's persistent data directory (~/.chatcode-cli/plugins/data/{id}/)").addOption(O()).action(async(j,M)=>{let{pluginUninstallHandler:J}=await Promise.resolve().then(() => (IL(),bL));await J(j,M)}),w.command("enable <plugin>").description("Enable a disabled plugin").option("-s, --scope <scope>",`Installation scope: ${Wf.join(", ")} (default: auto-detect)`).addOption(O()).action(async(j,M)=>{let{pluginEnableHandler:J}=await Promise.resolve().then(() => (IL(),bL));await J(j,M)}),w.command("disable [plugin]").description("Disable an enabled plugin").option("-a, --all","Disable all enabled plugins").option("-s, --scope <scope>",`Installation scope: ${Wf.join(", ")} (default: auto-detect)`).addOption(O()).action(async(j,M)=>{let{pluginDisableHandler:J}=await Promise.resolve().then(() => (IL(),bL));await J(j,M)}),w.command("update <plugin>").description("Update a plugin to the latest version (restart required to apply)").option("-s, --scope <scope>",`Installation scope: ${$z6.join(", ")} (default: user)`).addOption(O()).action(async(j,M)=>{let{pluginUpdateHandler:J}=await Promise.resolve().then(() => (IL(),bL));await J(j,M)}),B7("consumerSubscription"))K.command("setup-token").description("Set up a long-lived authentication token (requires hosted subscription)").action(async()=>{let[{setupTokenHandler:j},{createRoot:M}]=await Promise.all([Promise.resolve().then(() => (j08(),H08)),Promise.resolve().then(() => (r6(),lS6))]),J=await M(Cz6(!1));await j(J)});return K.command("agents").description("List configured agents").option("--setting-sources <sources>","Comma-separated list of setting sources to load (user, project, local).").action(async()=>{let{agentsHandler:j}=await Promise.resolve().then(() => (sp_(),ap_));await j(),process.exit(0)}),B7("remoteControl"),K.command("doctor").description("Check the health of your ChatCode CLI auto-updater. Note: The workspace trust dialog is skipped and stdio servers from .mcp.json are spawned for health checks. Only use this command in directories you trust.").action(async()=>{let[{doctorHandler:j},{createRoot:M}]=await Promise.all([Promise.resolve().then(() => (j08(),H08)),Promise.resolve().then(() => (r6(),lS6))]),J=await M(Cz6(!1));await j(J)}),K.command("update").alias("upgrade").description("Check for updates and install if available").action(async()=>{let{update:j}=await Promise.resolve().then(() => (ep_(),tp_));await j()}),K.command("install [target]").description("Install ChatCode CLI native build. Use [target] to specify version (stable, latest, or specific version)").option("--force","Force installation even if already installed").action(async(j,M)=>{let{installHandler:J}=await Promise.resolve().then(() => (j08(),H08));await J(j,M)}),j_("run_before_parse"),await K.parseAsync(process.argv),j_("run_after_parse"),j_("main_after_run"),oT6(),K}async function Puz({hasInitialPrompt:q,hasStdin:K,verbose:_,debug:$,debugToStderr:z,print:Y,outputFormat:A,inputFormat:O,numAllowedTools:w,numDisallowedTools:H,mcpClientCount:j,worktreeEnabled:M,skipWebFetchPreflight:J,githubActionInputs:X,dangerouslySkipPermissionsPassed:P,permissionMode:f,modeIsBypass:W,allowDangerouslySkipPermissionsPassed:Z,systemPromptFlag:v,appendSystemPromptFlag:D,thinkingConfig:N,assistantActivationPath:V}){try{l("tengu_init",{entrypoint:"claude",hasInitialPrompt:q,hasStdin:K,verbose:_,debug:$,debugToStderr:z,print:Y,outputFormat:A,inputFormat:O,numAllowedTools:w,numDisallowedTools:H,mcpClientCount:j,worktree:M,skipWebFetchPreflight:J,...X&&{githubActionInputs:X},dangerouslySkipPermissionsPassed:P,permissionMode:f,modeIsBypass:W,inProtectedNamespace:n36(),allowDangerouslySkipPermissionsPassed:Z,thinkingType:N.type,...v&&{systemPromptFlag:v},...D&&{appendSystemPromptFlag:D},is_simple:W$()||void 0,is_coordinator:void 0,...V&&{assistantActivationPath:V},autoUpdatesChannel:NK().autoUpdatesChannel??"latest",...{}})}catch(L){O6(L)}}function M08(q){}function J08(q){return}function fuz(){(process.stderr.isTTY?process.stderr:process.stdout.isTTY?process.stdout:void 0)?.write(jS)}function Wuz(q){if(typeof q!=="object"||q===null)return{};let K=q,_=K.teammateMode;return{agentId:typeof K.agentId==="string"?K.agentId:void 0,agentName:typeof K.agentName==="string"?K.agentName:void 0,teamName:typeof K.teamName==="string"?K.teamName:void 0,agentColor:typeof K.agentColor==="string"?K.agentColor:void 0,planModeRequired:typeof K.planModeRequired==="boolean"?K.planModeRequired:void 0,parentSessionId:typeof K.parentSessionId==="string"?K.parentSessionId:void 0,teammateMode:_==="auto"||_==="tmux"||_==="in-process"?_:void 0,agentType:typeof K.agentType==="string"?K.agentType:void 0}}var qg_=()=>(rY(),fY(ls8)),sxz=()=>fY(QI7),txz=()=>(f56(),fY(OHq)),exz=null,thq=11;var $hq=h(()=>{Pb();BB8();Qo8();TVq();o5();Mx6();Bu8();lS();A5();WD();hVq();qL();wb_();rq();jb_();oJ8();wz6();Fs8();uN();bP6();Ux();MP();io();XA();CU6();fK();Dq();KS6();_G();Y2();Fc6();uq();o_();wk8();Gy();aI();FT8();o8();ryq();Jb_();MK6();rq();y8();N_8();V8();fA();dI_();Ni();_hq();Bx();sX();Yhq();Fx_();EJ();Ju();Dz6();kJ();wf6();cx_();x8();DN();h9();byq();rF6();d5();dx_();A9();L8();SLq();h7();_B();NX();LJ();Ak();lJ();mB6();Xg6();zD();ER();Ia();T_();Nt6();Iq();mp();O1();qf6();lx_();aJ8();ZE();ix_();ox_();Qfq();BX6();sX();yW();uH();Ix6();WLq();C$6();LA8();Zy();F$();Fx();ou();GK();z8();h8();pK();c9();vB6();Zo8();aD();uU6();I9();V8();sx_();ex_();Ku_();_u_();zu_();Au_();wu_();ju_();Ju_();Iu_();xu_();mu_();myq();gu_();pu();b_6();BJ6();Pv6();g2();OW();s3();hN8();_1();dF6();KA();bM();FE();wN();dq6();QW();j_("main_tsx_entry");WqK();cTK();j_("main_tsx_imports_loaded");if(Kuz())process.exit(1)});var vuz={};function Zuz(){if(process.title="chatcode-cli",process.stdout.isTTY)process.stdout.write("\x1B]0;ChatCode CLI\x07")}async function Guz(){let q=process.argv.slice(2);if(q.length===1&&(q[0]==="--version"||q[0]==="-v"||q[0]==="-V")){console.log(`${MACRO.VERSION} (ChatCode CLI)`);return}let{profileCheckpoint:K}=await Promise.resolve().then(() => (Pb(),apq));if(K("cli_entry"),!hpq(q)){console.error("This ChatCode capability is not enabled in this build."),process.exitCode=1;return}if(process.argv[2]==="--claude-in-chrome-mcp"){K("cli_claude_in_chrome_mcp_path");let{runClaudeInChromeMcpServer:Y}=await Promise.resolve().then(() => (B9q(),g9q));await Y();return}else if(process.argv[2]==="--chrome-native-host"){K("cli_chrome_native_host_path");let{runChromeNativeHost:Y}=await Promise.resolve().then(() => (Qv_(),dv_));await Y();return}if(!1)switch(q[0]){case"ps":case"logs":case"attach":case"kill":default:}if((q.includes("--tmux")||q.includes("--tmux=classic"))&&(q.includes("-w")||q.includes("--worktree")||q.some((Y)=>Y.startsWith("--worktree=")))){K("cli_tmux_worktree_fast_path");let{enableConfigs:Y}=await Promise.resolve().then(() => (Dq(),qBK));Y();let{isWorktreeModeEnabled:A}=await Promise.resolve().then(() => do7);if(A()){let{execIntoTmuxWorktree:O}=await Promise.resolve().then(() => (QW(),Pv_)),w=await O(q);if(w.handled)return;if(w.error){let{exitWithError:H}=await Promise.resolve().then(() => Xpq);H(w.error)}}}if(q.length===1&&(q[0]==="--update"||q[0]==="--upgrade"))process.argv=[process.argv[0],process.argv[1],"update"];if(q.includes("--bare"))process.env.CHATCODE_CLI_SIMPLE="1";let{startCapturingEarlyInput:$}=await Promise.resolve().then(() => (KS6(),PFK));$(),K("cli_before_main_import");let{main:z}=await Promise.resolve().then(() => ($hq(),_g_));K("cli_after_main_import"),await z(),K("cli_after_main_complete")}var $g_=h(()=>{ypq();Spq();Rpq();Zuz();process.env.COREPACK_ENABLE_AUTO_PIN="0";if(process.env.CHATCODE_CLI_REMOTE==="true"){let q=process.env.NODE_OPTIONS||"";process.env.NODE_OPTIONS=q?`${q} --max-old-space-size=8192`:"--max-old-space-size=8192"}Guz()});var Ok6={name:"@chatcode/chatcode-cli-test",version:"1.0.6",description:"ChatCode CLI command-line coding assistant.",license:"SEE LICENSE IN LICENSE.md",type:"module",packageManager:"bun@1.3.5",repository:{type:"git",url:"http://gitlab.tianti.tg.unicom.local/kubernetesAMP/visualDesignPlatform/chatcode-cli.git"},engines:{node:">=18.0.0"},scripts:{dev:"bun run --feature BUDDY --feature AGENT_TRIGGERS ./src/dev-entry.ts",start:"bun run --feature BUDDY --feature AGENT_TRIGGERS ./src/dev-entry.ts",version:"bun run --feature BUDDY --feature AGENT_TRIGGERS ./src/dev-entry.ts --version",test:"bun test scripts/tests","scan:public-surface":"bun run scripts/public-surface-scan.mjs --fail-on-match","verify:public-surface":"bun run scripts/verify-public-surface-release.mjs",build:"bun run scripts/build.mjs","build:native":"bun run scripts/build.mjs --compile","build:native:all":"bun run scripts/build.mjs --compile --all","build:native:win":"bun run scripts/build.mjs --compile --targets=win32-x64","build:native:pack":"node scripts/pack-native.mjs",prepublishOnly:"bun run build"},files:["bin/","dist/cli.js","dist/vendor/","README.md"],publishConfig:{access:"public"},devDependencies:{"@alcalzone/ansi-tokenize":"0.3.0","adm-zip":"0.5.16","@ant/claude-for-chrome-mcp":"file:./shims/ant-claude-for-chrome-mcp","@ant/computer-use-input":"file:./shims/ant-computer-use-input","@ant/computer-use-mcp":"file:./shims/ant-computer-use-mcp","@ant/computer-use-swift":"file:./shims/ant-computer-use-swift","@anthropic-ai/claude-agent-sdk":"0.2.90","@anthropic-ai/mcpb":"2.1.2","@anthropic-ai/sandbox-runtime":"0.0.44","@anthropic-ai/sdk":"0.80.0","@aws-sdk/client-bedrock-runtime":"3.1020.0","@commander-js/extra-typings":"14.0.0","@growthbook/growthbook":"1.6.5","@modelcontextprotocol/sdk":"1.29.0","@opentelemetry/api":"1.9.1","@opentelemetry/api-logs":"0.214.0","@opentelemetry/core":"2.6.1","@opentelemetry/resources":"2.6.1","@opentelemetry/sdk-logs":"0.214.0","@opentelemetry/sdk-metrics":"2.6.1","@opentelemetry/sdk-trace-base":"2.6.1","@opentelemetry/semantic-conventions":"1.40.0",ajv:"8.18.0",asciichart:"1.5.25","auto-bind":"5.0.1",axios:"1.14.0","bidi-js":"1.0.3",chalk:"5.6.2",chokidar:"5.0.0","cli-boxes":"4.0.1","code-excerpt":"4.0.0",diff:"8.0.4","emoji-regex":"10.6.0","env-paths":"4.0.0",execa:"9.6.1",figures:"6.1.0","fuse.js":"7.1.0","get-east-asian-width":"1.5.0","google-auth-library":"10.6.2","highlight.js":"11.11.1","https-proxy-agent":"8.0.0",ignore:"7.0.5","indent-string":"5.0.0",ink:"6.8.0","jsonc-parser":"3.3.1","lodash-es":"4.17.23","lru-cache":"11.2.7",marked:"17.0.5","p-map":"7.0.4",picomatch:"4.0.4","proper-lockfile":"4.1.2",qrcode:"1.5.4",react:"19.2.4","react-reconciler":"0.33.0",semver:"7.7.4","shell-quote":"1.8.3","signal-exit":"4.1.0","stack-utils":"2.0.6","strip-ansi":"7.2.0","supports-hyperlinks":"4.4.0","tree-kill":"1.2.2","type-fest":"5.5.0",undici:"7.24.6","usehooks-ts":"3.1.1",uuid:"^11.1.0","vscode-jsonrpc":"8.2.1","vscode-languageserver-protocol":"3.17.5","vscode-languageserver-types":"3.17.5","wrap-ansi":"10.0.0",ws:"8.20.0",xss:"1.0.15",yaml:"2.8.3",zod:"4.3.6","color-diff-napi":"file:./shims/color-diff-napi","modifiers-napi":"file:./shims/modifiers-napi","url-handler-napi":"file:./shims/url-handler-napi"},optionalDependencies:{"@chatcode/chatcode-cli-test-darwin-arm64":"1.0.5","@chatcode/chatcode-cli-test-darwin-x64":"1.0.5","@chatcode/chatcode-cli-test-linux-x64":"1.0.5","@chatcode/chatcode-cli-test-linux-arm64":"1.0.5","@chatcode/chatcode-cli-test-win32-x64":"1.0.5"},bin:{"chatcode-cli":"./bin/cli.js",cco:"./bin/cli.js"}};z8();import{existsSync as _Sq,readdirSync as Duz,readFileSync as kuz}from"fs";import{dirname as Ag_,extname as Tuz,join as GY6,resolve as zg_}from"path";import{fileURLToPath as Nuz}from"url";if(process.platform!=="win32"&&process.platform!=="darwin")process.env.CHATCODE_CLI_NO_FLICKER??="1";process.env.CLAUDE_CODE_DISABLE_MOUSE??="0";var Yg_=Ag_(Nuz(import.meta.url)),Vuz={VERSION:Ok6.version,BUILD_TIME:"",PACKAGE_URL:Ok6.name,NATIVE_PACKAGE_URL:Ok6.name,VERSION_CHANGELOG:"",ISSUES_EXPLAINER:"contact support at https://yuanjing.chinaunicom.com",FEEDBACK_CHANNEL:"github"};if(!("MACRO"in globalThis))globalThis.MACRO=Vuz;function KSq(q,K){if(!_Sq(q))return;for(let _ of Duz(q,{withFileTypes:!0})){let $=GY6(q,_.name);if(_.isDirectory()){KSq($,K);continue}if([".ts",".tsx",".js",".jsx",".mjs",".cjs"].includes(Tuz(_.name)))K.push($)}}function Ruz(q){let K=q.replace(/\.js$/u,"");return[K,`${K}.ts`,`${K}.tsx`,`${K}.js`,`${K}.jsx`,`${K}.mjs`,`${K}.cjs`,GY6(K,"index.ts"),GY6(K,"index.tsx"),GY6(K,"index.js")].some(($)=>_Sq($))}function yuz(){let q=[],K=zg_(Yg_,"..");if(R(`cliRoot: ${K}`,{level:"warn"}),R(`_runtimeDir: ${Yg_}`),!_Sq(GY6(K,"src")))return[];KSq(GY6(K,"src"),q),KSq(GY6(K,"vendor"),q);let _=[],$=new Set,z=/(?:import|export)\s+[\s\S]*?from\s+['"](\.\.?\/[^'"]+)['"]|require\(\s*['"](\.\.?\/[^'"]+)['"]\s*\)/g;for(let Y of q){let A=kuz(Y,"utf8");for(let O of A.matchAll(z)){let w=O[1]??O[2];if(!w)continue;let H=zg_(Ag_(Y),w);if(Ruz(H))continue;let j=`${Y} -> ${w}`;if($.has(j))continue;$.add(j),_.push({importer:Y,specifier:w})}}return _.sort((Y,A)=>`${Y.importer}:${Y.specifier}`.localeCompare(`${A.importer}:${A.specifier}`))}var fXw=process.argv.slice(2),qSq=yuz();if(qSq.length>0){console.log("Wanma-CLI restored development workspace"),console.log(`version: ${Ok6.version}`),console.log(`missing relative imports: ${qSq.length}`),console.log(""),console.log("Top missing modules:");for(let q of qSq.slice(0,20))console.log(`- ${q.importer.replace(`${process.cwd()}/`,"")} -> ${q.specifier}`);console.log(""),console.log("The original app entry is still blocked by missing restored sources."),console.log("Use this workspace to continue restoration; once missing imports reach 0, this launcher will forward to src/main.tsx automatically."),process.exit(0)}await Promise.resolve().then(() => ($g_(),vuz));
9320
+ `))}catch(Y7){return await CL(U8,`Error downloading files: ${Q6(Y7)}`)}let b4=Z7??(Array.isArray(HK)?{messages:HK,fileHistorySnapshots:void 0,agentName:void 0,agentColor:void 0,restoredAgentDef:P8,initialState:Gz,contentReplacements:void 0}:void 0);if(b4)M08(M),J08(M),await tU6(U8,{getFpsMetrics:_K,stats:xK,initialState:b4.initialState},{...MY,mainThreadAgentDefinition:b4.restoredAgentDef??P8,initialMessages:b4.messages,initialFileHistorySnapshots:b4.fileHistorySnapshots,initialContentReplacements:b4.contentReplacements,initialAgentName:b4.agentName,initialAgentColor:b4.agentColor},MY6);else await UI_(U8,{getFpsMetrics:_K,stats:xK,initialState:Gz},Rm(mq()),{...MY,initialSearchQuery:s7,forkSession:M.forkSession,filterByPr:i4})}else{let r8=V3&&qz.length===0?V3:void 0;j_("action_after_hooks"),M08(M),J08(M);let HK=null,Z7=HK?[HK,...qz]:qz.length>0?qz:void 0;await yA8(),await tU6(U8,{getFpsMetrics:_K,stats:xK,initialState:Gz},{...MY,initialMessages:Z7,pendingHookMessages:r8},MY6)}}).version(`${MACRO.VERSION} (ChatCode CLI)`,"-v, --version","Output the version number"),B7("chromeIntegration"))K.option("--chrome","Enable browser integration"),K.option("--no-chrome","Disable browser integration");if(K.option("-w, --worktree [name]","Create a new git worktree for this session (optionally specify a name)"),K.option("--tmux","Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux."),no())K.addOption(new u$("--advisor <model>","Enable the server-side advisor tool with the specified model (alias or full ID).").hideHelp());if(K.addOption(new u$("--agent-id <id>","Teammate agent ID").hideHelp()),K.addOption(new u$("--agent-name <name>","Teammate display name").hideHelp()),K.addOption(new u$("--team-name <name>","Team name for swarm coordination").hideHelp()),K.addOption(new u$("--agent-color <color>","Teammate UI color").hideHelp()),K.addOption(new u$("--plan-mode-required","Require plan mode before implementation").hideHelp()),K.addOption(new u$("--parent-session-id <id>","Parent session ID for analytics correlation").hideHelp()),K.addOption(new u$("--teammate-mode <mode>",'How to spawn teammates: "tmux", "in-process", or "auto"').choices(["auto","tmux","in-process"]).hideHelp()),K.addOption(new u$("--agent-type <type>","Custom agent type for this teammate").hideHelp()),K.addOption(new u$("--sdk-url <url>","Use remote WebSocket endpoint for SDK I/O streaming (only with -p and stream-json format)").hideHelp()),B7("remoteControl"))K.addOption(new u$("--teleport [session]","Resume a teleport session, optionally specify session ID").hideHelp()),K.addOption(new u$("--remote [description]","Create a remote session with the given description").hideHelp());B7("remoteControl"),j_("run_main_options_built");let _=process.argv.includes("-p")||process.argv.includes("--print"),$=process.argv.some((j)=>j.startsWith("cc://")||j.startsWith("cc+unix://"));if(_&&!$)return j_("run_before_parse"),await K.parseAsync(process.argv),j_("run_after_parse"),K;let z=K.command("mcp").description("Configure and manage MCP servers").configureHelp(q()).enablePositionalOptions();if(z.command("serve").description("Start the ChatCode CLI MCP server").option("-d, --debug","Enable debug mode",()=>!0).option("--verbose","Override verbose mode setting from config",()=>!0).action(async({debug:j,verbose:M})=>{let{mcpServeHandler:J}=await Promise.resolve().then(() => (rt(),it));await J({debug:j,verbose:M})}),nx_(z),wc())rx_(z);if(z.command("remove <name>").description("Remove an MCP server").option("-s, --scope <scope>","Configuration scope (local, user, or project) - if not specified, removes from whichever scope it exists in").action(async(j,M)=>{let{mcpRemoveHandler:J}=await Promise.resolve().then(() => (rt(),it));await J(j,M)}),z.command("list").description("List configured MCP servers. Note: The workspace trust dialog is skipped and stdio servers from .mcp.json are spawned for health checks. Only use this command in directories you trust.").action(async()=>{let{mcpListHandler:j}=await Promise.resolve().then(() => (rt(),it));await j()}),z.command("get <name>").description("Get details about an MCP server. Note: The workspace trust dialog is skipped and stdio servers from .mcp.json are spawned for health checks. Only use this command in directories you trust.").action(async(j)=>{let{mcpGetHandler:M}=await Promise.resolve().then(() => (rt(),it));await M(j)}),z.command("add-json <name> <json>").description("Add an MCP server (stdio or SSE) with a JSON string").option("-s, --scope <scope>","Configuration scope (local, user, or project)","local").option("--client-secret","Prompt for OAuth client secret (or set MCP_CLIENT_SECRET env var)").action(async(j,M,J)=>{let{mcpAddJsonHandler:X}=await Promise.resolve().then(() => (rt(),it));await X(j,M,J)}),B7("desktopHandoff"))z.command("add-from-claude-desktop").description("Import MCP servers from desktop configuration (Mac and WSL only)").option("-s, --scope <scope>","Configuration scope (local, user, or project)","local").action(async(j)=>{let{mcpAddFromDesktopHandler:M}=await Promise.resolve().then(() => (rt(),it));await M(j)});z.command("reset-project-choices").description("Reset all approved and rejected project-scoped (.mcp.json) servers within this project").action(async()=>{let{mcpResetChoicesHandler:j}=await Promise.resolve().then(() => (rt(),it));await j()});let Y=K.command("auth").description("Manage authentication").configureHelp(q()),A=Y.command("login").description("Sign in to your ChatCode account").option("--email <email>","Pre-populate email address on the login page").option("--sso","Force SSO login flow").option("--console","Use ChatCode Console (API usage billing)");if(B7("consumerSubscription"))A.option("--claudeai","Use hosted subscription plan (default)");A.action(async({email:j,sso:M,console:J,claudeai:X})=>{let{authLogin:P}=await Promise.resolve().then(() => (aP6(),Aj8));await P({email:j,sso:M,console:J,claudeai:X})}),Y.command("status").description("Show authentication status").option("--json","Output as JSON (default)").option("--text","Output as human-readable text").action(async(j)=>{let{authStatus:M}=await Promise.resolve().then(() => (aP6(),Aj8));await M(j)}),Y.command("logout").description("Log out from your ChatCode account").action(async()=>{let{authLogout:j}=await Promise.resolve().then(() => (aP6(),Aj8));await j()});let O=()=>new u$("--cowork","Use cowork_plugins directory").hideHelp(),w=K.command("plugin").alias("plugins").description("Manage ChatCode CLI plugins").configureHelp(q());w.command("validate <path>").description("Validate a plugin or marketplace manifest").addOption(O()).action(async(j,M)=>{let{pluginValidateHandler:J}=await Promise.resolve().then(() => (IL(),bL));await J(j,M)}),w.command("list").description("List installed plugins").option("--json","Output as JSON").option("--available","Include available plugins from marketplaces (requires --json)").addOption(O()).action(async(j)=>{let{pluginListHandler:M}=await Promise.resolve().then(() => (IL(),bL));await M(j)});let H=w.command("marketplace").description("Manage ChatCode CLI marketplaces").configureHelp(q());if(H.command("add <source>").description("Add a marketplace from a URL, path, or GitHub repo").addOption(O()).option("--sparse <paths...>","Limit checkout to specific directories via git sparse-checkout (for monorepos). Example: --sparse .chatcode-cli-plugin plugins").option("--scope <scope>","Where to declare the marketplace: user (default), project, or local").action(async(j,M)=>{let{marketplaceAddHandler:J}=await Promise.resolve().then(() => (IL(),bL));await J(j,M)}),H.command("list").description("List all configured marketplaces").option("--json","Output as JSON").addOption(O()).action(async(j)=>{let{marketplaceListHandler:M}=await Promise.resolve().then(() => (IL(),bL));await M(j)}),H.command("remove <name>").alias("rm").description("Remove a configured marketplace").addOption(O()).action(async(j,M)=>{let{marketplaceRemoveHandler:J}=await Promise.resolve().then(() => (IL(),bL));await J(j,M)}),H.command("update [name]").description("Update marketplace(s) from their source - updates all if no name specified").addOption(O()).action(async(j,M)=>{let{marketplaceUpdateHandler:J}=await Promise.resolve().then(() => (IL(),bL));await J(j,M)}),w.command("install <plugin>").alias("i").description("Install a plugin from available marketplaces (use plugin@marketplace for specific marketplace)").option("-s, --scope <scope>","Installation scope: user, project, or local","user").addOption(O()).action(async(j,M)=>{let{pluginInstallHandler:J}=await Promise.resolve().then(() => (IL(),bL));await J(j,M)}),w.command("uninstall <plugin>").alias("remove").alias("rm").description("Uninstall an installed plugin").option("-s, --scope <scope>","Uninstall from scope: user, project, or local","user").option("--keep-data","Preserve the plugin's persistent data directory (~/.chatcode-cli/plugins/data/{id}/)").addOption(O()).action(async(j,M)=>{let{pluginUninstallHandler:J}=await Promise.resolve().then(() => (IL(),bL));await J(j,M)}),w.command("enable <plugin>").description("Enable a disabled plugin").option("-s, --scope <scope>",`Installation scope: ${Wf.join(", ")} (default: auto-detect)`).addOption(O()).action(async(j,M)=>{let{pluginEnableHandler:J}=await Promise.resolve().then(() => (IL(),bL));await J(j,M)}),w.command("disable [plugin]").description("Disable an enabled plugin").option("-a, --all","Disable all enabled plugins").option("-s, --scope <scope>",`Installation scope: ${Wf.join(", ")} (default: auto-detect)`).addOption(O()).action(async(j,M)=>{let{pluginDisableHandler:J}=await Promise.resolve().then(() => (IL(),bL));await J(j,M)}),w.command("update <plugin>").description("Update a plugin to the latest version (restart required to apply)").option("-s, --scope <scope>",`Installation scope: ${$z6.join(", ")} (default: user)`).addOption(O()).action(async(j,M)=>{let{pluginUpdateHandler:J}=await Promise.resolve().then(() => (IL(),bL));await J(j,M)}),B7("consumerSubscription"))K.command("setup-token").description("Set up a long-lived authentication token (requires hosted subscription)").action(async()=>{let[{setupTokenHandler:j},{createRoot:M}]=await Promise.all([Promise.resolve().then(() => (j08(),H08)),Promise.resolve().then(() => (r6(),lS6))]),J=await M(Cz6(!1));await j(J)});return K.command("agents").description("List configured agents").option("--setting-sources <sources>","Comma-separated list of setting sources to load (user, project, local).").action(async()=>{let{agentsHandler:j}=await Promise.resolve().then(() => (sp_(),ap_));await j(),process.exit(0)}),B7("remoteControl"),K.command("doctor").description("Check the health of your ChatCode CLI auto-updater. Note: The workspace trust dialog is skipped and stdio servers from .mcp.json are spawned for health checks. Only use this command in directories you trust.").action(async()=>{let[{doctorHandler:j},{createRoot:M}]=await Promise.all([Promise.resolve().then(() => (j08(),H08)),Promise.resolve().then(() => (r6(),lS6))]),J=await M(Cz6(!1));await j(J)}),K.command("update").alias("upgrade").description("Check for updates and install if available").action(async()=>{let{update:j}=await Promise.resolve().then(() => (ep_(),tp_));await j()}),K.command("install [target]").description("Install ChatCode CLI native build. Use [target] to specify version (stable, latest, or specific version)").option("--force","Force installation even if already installed").action(async(j,M)=>{let{installHandler:J}=await Promise.resolve().then(() => (j08(),H08));await J(j,M)}),j_("run_before_parse"),await K.parseAsync(process.argv),j_("run_after_parse"),j_("main_after_run"),oT6(),K}async function Puz({hasInitialPrompt:q,hasStdin:K,verbose:_,debug:$,debugToStderr:z,print:Y,outputFormat:A,inputFormat:O,numAllowedTools:w,numDisallowedTools:H,mcpClientCount:j,worktreeEnabled:M,skipWebFetchPreflight:J,githubActionInputs:X,dangerouslySkipPermissionsPassed:P,permissionMode:f,modeIsBypass:W,allowDangerouslySkipPermissionsPassed:Z,systemPromptFlag:v,appendSystemPromptFlag:D,thinkingConfig:N,assistantActivationPath:V}){try{l("tengu_init",{entrypoint:"claude",hasInitialPrompt:q,hasStdin:K,verbose:_,debug:$,debugToStderr:z,print:Y,outputFormat:A,inputFormat:O,numAllowedTools:w,numDisallowedTools:H,mcpClientCount:j,worktree:M,skipWebFetchPreflight:J,...X&&{githubActionInputs:X},dangerouslySkipPermissionsPassed:P,permissionMode:f,modeIsBypass:W,inProtectedNamespace:n36(),allowDangerouslySkipPermissionsPassed:Z,thinkingType:N.type,...v&&{systemPromptFlag:v},...D&&{appendSystemPromptFlag:D},is_simple:W$()||void 0,is_coordinator:void 0,...V&&{assistantActivationPath:V},autoUpdatesChannel:NK().autoUpdatesChannel??"latest",...{}})}catch(L){O6(L)}}function M08(q){}function J08(q){return}function fuz(){(process.stderr.isTTY?process.stderr:process.stdout.isTTY?process.stdout:void 0)?.write(jS)}function Wuz(q){if(typeof q!=="object"||q===null)return{};let K=q,_=K.teammateMode;return{agentId:typeof K.agentId==="string"?K.agentId:void 0,agentName:typeof K.agentName==="string"?K.agentName:void 0,teamName:typeof K.teamName==="string"?K.teamName:void 0,agentColor:typeof K.agentColor==="string"?K.agentColor:void 0,planModeRequired:typeof K.planModeRequired==="boolean"?K.planModeRequired:void 0,parentSessionId:typeof K.parentSessionId==="string"?K.parentSessionId:void 0,teammateMode:_==="auto"||_==="tmux"||_==="in-process"?_:void 0,agentType:typeof K.agentType==="string"?K.agentType:void 0}}var qg_=()=>(rY(),fY(ls8)),sxz=()=>fY(QI7),txz=()=>(f56(),fY(OHq)),exz=null,thq=11;var $hq=h(()=>{Pb();BB8();Qo8();TVq();o5();Mx6();Bu8();lS();A5();WD();hVq();qL();wb_();rq();jb_();oJ8();wz6();Fs8();uN();bP6();Ux();MP();io();XA();CU6();fK();Dq();KS6();_G();Y2();Fc6();uq();o_();wk8();Gy();aI();FT8();o8();ryq();Jb_();MK6();rq();y8();N_8();V8();fA();dI_();Ni();_hq();Bx();sX();Yhq();Fx_();EJ();Ju();Dz6();kJ();wf6();cx_();x8();DN();h9();byq();rF6();d5();dx_();A9();L8();SLq();h7();_B();NX();LJ();Ak();lJ();mB6();Xg6();zD();ER();Ia();T_();Nt6();Iq();mp();O1();qf6();lx_();aJ8();ZE();ix_();ox_();Qfq();BX6();sX();yW();uH();Ix6();WLq();C$6();LA8();Zy();F$();Fx();ou();GK();z8();h8();pK();c9();vB6();Zo8();aD();uU6();I9();V8();sx_();ex_();Ku_();_u_();zu_();Au_();wu_();ju_();Ju_();Iu_();xu_();mu_();myq();gu_();pu();b_6();BJ6();Pv6();g2();OW();s3();hN8();_1();dF6();KA();bM();FE();wN();dq6();QW();j_("main_tsx_entry");WqK();cTK();j_("main_tsx_imports_loaded");if(Kuz())process.exit(1)});var vuz={};function Zuz(){if(process.title="chatcode-cli",process.stdout.isTTY)process.stdout.write("\x1B]0;ChatCode CLI\x07")}async function Guz(){let q=process.argv.slice(2);if(q.length===1&&(q[0]==="--version"||q[0]==="-v"||q[0]==="-V")){console.log(`${MACRO.VERSION} (ChatCode CLI)`);return}let{profileCheckpoint:K}=await Promise.resolve().then(() => (Pb(),apq));if(K("cli_entry"),!hpq(q)){console.error("This ChatCode capability is not enabled in this build."),process.exitCode=1;return}if(process.argv[2]==="--claude-in-chrome-mcp"){K("cli_claude_in_chrome_mcp_path");let{runClaudeInChromeMcpServer:Y}=await Promise.resolve().then(() => (B9q(),g9q));await Y();return}else if(process.argv[2]==="--chrome-native-host"){K("cli_chrome_native_host_path");let{runChromeNativeHost:Y}=await Promise.resolve().then(() => (Qv_(),dv_));await Y();return}if(!1)switch(q[0]){case"ps":case"logs":case"attach":case"kill":default:}if((q.includes("--tmux")||q.includes("--tmux=classic"))&&(q.includes("-w")||q.includes("--worktree")||q.some((Y)=>Y.startsWith("--worktree=")))){K("cli_tmux_worktree_fast_path");let{enableConfigs:Y}=await Promise.resolve().then(() => (Dq(),qBK));Y();let{isWorktreeModeEnabled:A}=await Promise.resolve().then(() => do7);if(A()){let{execIntoTmuxWorktree:O}=await Promise.resolve().then(() => (QW(),Pv_)),w=await O(q);if(w.handled)return;if(w.error){let{exitWithError:H}=await Promise.resolve().then(() => Xpq);H(w.error)}}}if(q.length===1&&(q[0]==="--update"||q[0]==="--upgrade"))process.argv=[process.argv[0],process.argv[1],"update"];if(q.includes("--bare"))process.env.CHATCODE_CLI_SIMPLE="1";let{startCapturingEarlyInput:$}=await Promise.resolve().then(() => (KS6(),PFK));$(),K("cli_before_main_import");let{main:z}=await Promise.resolve().then(() => ($hq(),_g_));K("cli_after_main_import"),await z(),K("cli_after_main_complete")}var $g_=h(()=>{ypq();Spq();Rpq();Zuz();process.env.COREPACK_ENABLE_AUTO_PIN="0";if(process.env.CHATCODE_CLI_REMOTE==="true"){let q=process.env.NODE_OPTIONS||"";process.env.NODE_OPTIONS=q?`${q} --max-old-space-size=8192`:"--max-old-space-size=8192"}Guz()});var Ok6={name:"@chatcode/chatcode-cli-test",version:"1.0.7",description:"ChatCode CLI command-line coding assistant.",license:"SEE LICENSE IN LICENSE.md",type:"module",packageManager:"bun@1.3.5",repository:{type:"git",url:"http://gitlab.tianti.tg.unicom.local/kubernetesAMP/visualDesignPlatform/chatcode-cli.git"},engines:{node:">=18.0.0"},scripts:{dev:"bun run --feature BUDDY --feature AGENT_TRIGGERS ./src/dev-entry.ts",start:"bun run --feature BUDDY --feature AGENT_TRIGGERS ./src/dev-entry.ts",version:"bun run --feature BUDDY --feature AGENT_TRIGGERS ./src/dev-entry.ts --version",test:"bun test scripts/tests","scan:public-surface":"bun run scripts/public-surface-scan.mjs --fail-on-match","verify:public-surface":"bun run scripts/verify-public-surface-release.mjs",build:"bun run scripts/build.mjs","build:native":"bun run scripts/build.mjs --compile","build:native:all":"bun run scripts/build.mjs --compile --all","build:native:win":"bun run scripts/build.mjs --compile --targets=win32-x64","build:native:pack":"node scripts/pack-native.mjs",prepublishOnly:"bun run build"},files:["bin/","dist/cli.js","dist/vendor/","README.md"],publishConfig:{access:"public"},devDependencies:{"@alcalzone/ansi-tokenize":"0.3.0","adm-zip":"0.5.16","@ant/claude-for-chrome-mcp":"file:./shims/ant-claude-for-chrome-mcp","@ant/computer-use-input":"file:./shims/ant-computer-use-input","@ant/computer-use-mcp":"file:./shims/ant-computer-use-mcp","@ant/computer-use-swift":"file:./shims/ant-computer-use-swift","@anthropic-ai/claude-agent-sdk":"0.2.90","@anthropic-ai/mcpb":"2.1.2","@anthropic-ai/sandbox-runtime":"0.0.44","@anthropic-ai/sdk":"0.80.0","@aws-sdk/client-bedrock-runtime":"3.1020.0","@commander-js/extra-typings":"14.0.0","@growthbook/growthbook":"1.6.5","@modelcontextprotocol/sdk":"1.29.0","@opentelemetry/api":"1.9.1","@opentelemetry/api-logs":"0.214.0","@opentelemetry/core":"2.6.1","@opentelemetry/resources":"2.6.1","@opentelemetry/sdk-logs":"0.214.0","@opentelemetry/sdk-metrics":"2.6.1","@opentelemetry/sdk-trace-base":"2.6.1","@opentelemetry/semantic-conventions":"1.40.0",ajv:"8.18.0",asciichart:"1.5.25","auto-bind":"5.0.1",axios:"1.14.0","bidi-js":"1.0.3",chalk:"5.6.2",chokidar:"5.0.0","cli-boxes":"4.0.1","code-excerpt":"4.0.0",diff:"8.0.4","emoji-regex":"10.6.0","env-paths":"4.0.0",execa:"9.6.1",figures:"6.1.0","fuse.js":"7.1.0","get-east-asian-width":"1.5.0","google-auth-library":"10.6.2","highlight.js":"11.11.1","https-proxy-agent":"8.0.0",ignore:"7.0.5","indent-string":"5.0.0",ink:"6.8.0","jsonc-parser":"3.3.1","lodash-es":"4.17.23","lru-cache":"11.2.7",marked:"17.0.5","p-map":"7.0.4",picomatch:"4.0.4","proper-lockfile":"4.1.2",qrcode:"1.5.4",react:"19.2.4","react-reconciler":"0.33.0",semver:"7.7.4","shell-quote":"1.8.3","signal-exit":"4.1.0","stack-utils":"2.0.6","strip-ansi":"7.2.0","supports-hyperlinks":"4.4.0","tree-kill":"1.2.2","type-fest":"5.5.0",undici:"7.24.6","usehooks-ts":"3.1.1",uuid:"^11.1.0","vscode-jsonrpc":"8.2.1","vscode-languageserver-protocol":"3.17.5","vscode-languageserver-types":"3.17.5","wrap-ansi":"10.0.0",ws:"8.20.0",xss:"1.0.15",yaml:"2.8.3",zod:"4.3.6","color-diff-napi":"file:./shims/color-diff-napi","modifiers-napi":"file:./shims/modifiers-napi","url-handler-napi":"file:./shims/url-handler-napi"},optionalDependencies:{"@chatcode/chatcode-cli-test-darwin-arm64":"1.0.7","@chatcode/chatcode-cli-test-darwin-x64":"1.0.7","@chatcode/chatcode-cli-test-linux-x64":"1.0.7","@chatcode/chatcode-cli-test-linux-arm64":"1.0.7","@chatcode/chatcode-cli-test-win32-x64":"1.0.7"},bin:{"chatcode-cli":"./bin/cli.js",cco:"./bin/cli.js"}};z8();import{existsSync as _Sq,readdirSync as Duz,readFileSync as kuz}from"fs";import{dirname as Ag_,extname as Tuz,join as GY6,resolve as zg_}from"path";import{fileURLToPath as Nuz}from"url";if(process.platform!=="win32"&&process.platform!=="darwin")process.env.CHATCODE_CLI_NO_FLICKER??="1";process.env.CLAUDE_CODE_DISABLE_MOUSE??="0";var Yg_=Ag_(Nuz(import.meta.url)),Vuz={VERSION:Ok6.version,BUILD_TIME:"",PACKAGE_URL:Ok6.name,NATIVE_PACKAGE_URL:Ok6.name,VERSION_CHANGELOG:"",ISSUES_EXPLAINER:"contact support at https://yuanjing.chinaunicom.com",FEEDBACK_CHANNEL:"github"};if(!("MACRO"in globalThis))globalThis.MACRO=Vuz;function KSq(q,K){if(!_Sq(q))return;for(let _ of Duz(q,{withFileTypes:!0})){let $=GY6(q,_.name);if(_.isDirectory()){KSq($,K);continue}if([".ts",".tsx",".js",".jsx",".mjs",".cjs"].includes(Tuz(_.name)))K.push($)}}function Ruz(q){let K=q.replace(/\.js$/u,"");return[K,`${K}.ts`,`${K}.tsx`,`${K}.js`,`${K}.jsx`,`${K}.mjs`,`${K}.cjs`,GY6(K,"index.ts"),GY6(K,"index.tsx"),GY6(K,"index.js")].some(($)=>_Sq($))}function yuz(){let q=[],K=zg_(Yg_,"..");if(R(`cliRoot: ${K}`,{level:"warn"}),R(`_runtimeDir: ${Yg_}`),!_Sq(GY6(K,"src")))return[];KSq(GY6(K,"src"),q),KSq(GY6(K,"vendor"),q);let _=[],$=new Set,z=/(?:import|export)\s+[\s\S]*?from\s+['"](\.\.?\/[^'"]+)['"]|require\(\s*['"](\.\.?\/[^'"]+)['"]\s*\)/g;for(let Y of q){let A=kuz(Y,"utf8");for(let O of A.matchAll(z)){let w=O[1]??O[2];if(!w)continue;let H=zg_(Ag_(Y),w);if(Ruz(H))continue;let j=`${Y} -> ${w}`;if($.has(j))continue;$.add(j),_.push({importer:Y,specifier:w})}}return _.sort((Y,A)=>`${Y.importer}:${Y.specifier}`.localeCompare(`${A.importer}:${A.specifier}`))}var fXw=process.argv.slice(2),qSq=yuz();if(qSq.length>0){console.log("Wanma-CLI restored development workspace"),console.log(`version: ${Ok6.version}`),console.log(`missing relative imports: ${qSq.length}`),console.log(""),console.log("Top missing modules:");for(let q of qSq.slice(0,20))console.log(`- ${q.importer.replace(`${process.cwd()}/`,"")} -> ${q.specifier}`);console.log(""),console.log("The original app entry is still blocked by missing restored sources."),console.log("Use this workspace to continue restoration; once missing imports reach 0, this launcher will forward to src/main.tsx automatically."),process.exit(0)}await Promise.resolve().then(() => ($g_(),vuz));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chatcode/chatcode-cli-test",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "ChatCode CLI command-line coding assistant.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "type": "module",
@@ -114,11 +114,11 @@
114
114
  "url-handler-napi": "file:./shims/url-handler-napi"
115
115
  },
116
116
  "optionalDependencies": {
117
- "@chatcode/chatcode-cli-test-darwin-arm64": "1.0.5",
118
- "@chatcode/chatcode-cli-test-darwin-x64": "1.0.5",
119
- "@chatcode/chatcode-cli-test-linux-x64": "1.0.5",
120
- "@chatcode/chatcode-cli-test-linux-arm64": "1.0.5",
121
- "@chatcode/chatcode-cli-test-win32-x64": "1.0.5"
117
+ "@chatcode/chatcode-cli-test-darwin-arm64": "1.0.7",
118
+ "@chatcode/chatcode-cli-test-darwin-x64": "1.0.7",
119
+ "@chatcode/chatcode-cli-test-linux-x64": "1.0.7",
120
+ "@chatcode/chatcode-cli-test-linux-arm64": "1.0.7",
121
+ "@chatcode/chatcode-cli-test-win32-x64": "1.0.7"
122
122
  },
123
123
  "bin": {
124
124
  "chatcode-cli": "./bin/cli.js",