@chatcode/chatcode-cli-test 1.0.30 → 1.0.31

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/bin/cli.js CHANGED
@@ -79,7 +79,12 @@ if (!existsSync(fallbackCli)) {
79
79
  process.exit(1)
80
80
  }
81
81
 
82
- const error = run(process.execPath, [fallbackCli, ...args])
82
+ const error = run(process.execPath, [
83
+ '--max-old-space-size=4096',
84
+ '--stack_size=4096',
85
+ fallbackCli,
86
+ ...args,
87
+ ])
83
88
  if (error) {
84
89
  console.error(`Failed to run ChatCode CLI: ${error.message}`)
85
90
  process.exit(1)
package/dist/cli.js CHANGED
@@ -8767,4 +8767,4 @@ Usage: chatcode-cli --remote "your task description"`,()=>ZB(1));c("tengu_remote
8767
8767
  `));await wiQ();let{teleportWithProgress:p8}=await Promise.resolve().then(() => (moY(),uoY)),fY=await p8(sB,EA);d3A({sessionId:EA}),g0=fY.messages}catch(lJ){if(lJ instanceof sq)process.stderr.write(lJ.formattedMessage+`
8768
8768
  `);else AA(lJ),process.stderr.write(XQ.red(`Error: ${xA(lJ)}
8769
8769
  `));await ZB(1)}}}if(gY){let lJ=gY;try{let wB=performance.now(),p8=await Bc(u1??lJ,void 0);if(!p8)return c("tengu_session_resumed",{entrypoint:"cli_flag",success:!1}),await _V(sB,`No conversation found with session ID: ${lJ}`);let fY=u1?.fullPath??p8.fullPath;if(DJ=await hX0(p8,{forkSession:!!z.forkSession,sessionIdOverride:lJ,transcriptPath:fY},bX),DJ.restoredAgentDef)bB=DJ.restoredAgentDef;c("tengu_session_resumed",{entrypoint:"cli_flag",success:!0,resume_duration_ms:Math.round(performance.now()-wB)})}catch(wB){c("tengu_session_resumed",{entrypoint:"cli_flag",success:!1}),AA(wB),await _V(sB,`Failed to resume session ${lJ}`)}}if(u)try{let lJ=await u,wB=j0(lJ,(p8)=>!p8.success);if(wB>0)process.stderr.write(XQ.yellow(`Warning: ${wB}/${lJ.length} file(s) failed to download.
8770
- `))}catch(lJ){return await _V(sB,`Error downloading files: ${xA(lJ)}`)}let CB=DJ??(Array.isArray(g0)?{messages:g0,fileHistorySnapshots:void 0,agentName:void 0,agentColor:void 0,restoredAgentDef:bB,initialState:L6,contentReplacements:void 0}:void 0);if(CB)hGQ(z),gGQ(z),await ZyA(sB,{getFpsMetrics:PX,stats:AZ,initialState:CB.initialState},{...A6,mainThreadAgentDefinition:CB.restoredAgentDef??bB,initialMessages:CB.messages,initialFileHistorySnapshots:CB.fileHistorySnapshots,initialContentReplacements:CB.contentReplacements,initialAgentName:CB.agentName,initialAgentColor:CB.agentColor},IQA);else await XnY(sB,{getFpsMetrics:PX,stats:AZ,initialState:L6},vy(W0()),{...A6,initialSearchQuery:yY,forkSession:z.forkSession,filterByPr:XY})}else{let bQ=j4&&EZ.length===0?j4:void 0;$Y("action_after_hooks"),hGQ(z),gGQ(z);let g0=null,DJ=g0?[g0,...EZ]:EZ.length>0?EZ:void 0;await W8Q(),await ZyA(sB,{getFpsMetrics:PX,stats:AZ,initialState:L6},{...A6,initialMessages:DJ,pendingHookMessages:bQ},IQA)}}).version(`${MACRO.VERSION} (ChatCode CLI)`,"-v, --version","Output the version number"),QY("chromeIntegration"))Q.option("--chrome","Enable browser integration"),Q.option("--no-chrome","Disable browser integration");if(Q.option("-w, --worktree [name]","Create a new git worktree for this session (optionally specify a name)"),Q.option("--tmux","Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux."),$m())Q.addOption(new U9("--advisor <model>","Enable the server-side advisor tool with the specified model (alias or full ID).").hideHelp());if(Q.addOption(new U9("--agent-id <id>","Teammate agent ID").hideHelp()),Q.addOption(new U9("--agent-name <name>","Teammate display name").hideHelp()),Q.addOption(new U9("--team-name <name>","Team name for swarm coordination").hideHelp()),Q.addOption(new U9("--agent-color <color>","Teammate UI color").hideHelp()),Q.addOption(new U9("--plan-mode-required","Require plan mode before implementation").hideHelp()),Q.addOption(new U9("--parent-session-id <id>","Parent session ID for analytics correlation").hideHelp()),Q.addOption(new U9("--teammate-mode <mode>",'How to spawn teammates: "tmux", "in-process", or "auto"').choices(["auto","tmux","in-process"]).hideHelp()),Q.addOption(new U9("--agent-type <type>","Custom agent type for this teammate").hideHelp()),Q.addOption(new U9("--sdk-url <url>","Use remote WebSocket endpoint for SDK I/O streaming (only with -p and stream-json format)").hideHelp()),QY("remoteControl"))Q.addOption(new U9("--teleport [session]","Resume a teleport session, optionally specify session ID").hideHelp()),Q.addOption(new U9("--remote [description]","Create a remote session with the given description").hideHelp());QY("remoteControl"),$Y("run_main_options_built");let J=process.argv.includes("-p")||process.argv.includes("--print"),Y=process.argv.some((W)=>W.startsWith("cc://")||W.startsWith("cc+unix://"));if(J&&!Y)return $Y("run_before_parse"),await Q.parseAsync(process.argv),$Y("run_after_parse"),Q;let B=Q.command("mcp").description("Configure and manage MCP servers").configureHelp(A()).enablePositionalOptions();if(B.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:W,verbose:z})=>{let{mcpServeHandler:H}=await Promise.resolve().then(() => (Ol(),Ll));await H({debug:W,verbose:z})}),GrY(B),rS())qrY(B);if(B.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(W,z)=>{let{mcpRemoveHandler:H}=await Promise.resolve().then(() => (Ol(),Ll));await H(W,z)}),B.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:W}=await Promise.resolve().then(() => (Ol(),Ll));await W()}),B.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(W)=>{let{mcpGetHandler:z}=await Promise.resolve().then(() => (Ol(),Ll));await z(W)}),B.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(W,z,H)=>{let{mcpAddJsonHandler:U}=await Promise.resolve().then(() => (Ol(),Ll));await U(W,z,H)}),QY("desktopHandoff"))B.command("add-from-desktop").description("Import MCP servers from ChatCode Desktop configuration (Mac and WSL only)").option("-s, --scope <scope>","Configuration scope (local, user, or project)","local").action(async(W)=>{let{mcpAddFromDesktopHandler:z}=await Promise.resolve().then(() => (Ol(),Ll));await z(W)});B.command("reset-project-choices").description("Reset all approved and rejected project-scoped (.mcp.json) servers within this project").action(async()=>{let{mcpResetChoicesHandler:W}=await Promise.resolve().then(() => (Ol(),Ll));await W()});let X=Q.command("auth").description("Manage authentication").configureHelp(A()),Z=X.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(QY("consumerSubscription"))Z.option("--hosted","Use hosted subscription plan (default)");Z.action(async({email:W,sso:z,console:H,hosted:U})=>{let{authLogin:F}=await Promise.resolve().then(() => (SZA(),seA));await F({email:W,sso:z,console:H,hosted:U})}),X.command("status").description("Show authentication status").option("--json","Output as JSON (default)").option("--text","Output as human-readable text").action(async(W)=>{let{authStatus:z}=await Promise.resolve().then(() => (SZA(),seA));await z(W)}),X.command("logout").description("Log out from your ChatCode account").action(async()=>{let{authLogout:W}=await Promise.resolve().then(() => (SZA(),seA));await W()});let G=()=>new U9("--cowork","Use cowork_plugins directory").hideHelp(),K=Q.command("plugin").alias("plugins").description("Manage ChatCode CLI plugins").configureHelp(A());K.command("validate <path>").description("Validate a plugin or marketplace manifest").addOption(G()).action(async(W,z)=>{let{pluginValidateHandler:H}=await Promise.resolve().then(() => (oR(),aR));await H(W,z)}),K.command("list").description("List installed plugins").option("--json","Output as JSON").option("--available","Include available plugins from marketplaces (requires --json)").addOption(G()).action(async(W)=>{let{pluginListHandler:z}=await Promise.resolve().then(() => (oR(),aR));await z(W)});let q=K.command("marketplace").description("Manage ChatCode CLI marketplaces").configureHelp(A());if(q.command("add <source>").description("Add a marketplace from a URL, path, or GitHub repo").addOption(G()).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(W,z)=>{let{marketplaceAddHandler:H}=await Promise.resolve().then(() => (oR(),aR));await H(W,z)}),q.command("list").description("List all configured marketplaces").option("--json","Output as JSON").addOption(G()).action(async(W)=>{let{marketplaceListHandler:z}=await Promise.resolve().then(() => (oR(),aR));await z(W)}),q.command("remove <name>").alias("rm").description("Remove a configured marketplace").addOption(G()).action(async(W,z)=>{let{marketplaceRemoveHandler:H}=await Promise.resolve().then(() => (oR(),aR));await H(W,z)}),q.command("update [name]").description("Update marketplace(s) from their source - updates all if no name specified").addOption(G()).action(async(W,z)=>{let{marketplaceUpdateHandler:H}=await Promise.resolve().then(() => (oR(),aR));await H(W,z)}),K.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(G()).action(async(W,z)=>{let{pluginInstallHandler:H}=await Promise.resolve().then(() => (oR(),aR));await H(W,z)}),K.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(G()).action(async(W,z)=>{let{pluginUninstallHandler:H}=await Promise.resolve().then(() => (oR(),aR));await H(W,z)}),K.command("enable <plugin>").description("Enable a disabled plugin").option("-s, --scope <scope>",`Installation scope: ${IH.join(", ")} (default: auto-detect)`).addOption(G()).action(async(W,z)=>{let{pluginEnableHandler:H}=await Promise.resolve().then(() => (oR(),aR));await H(W,z)}),K.command("disable [plugin]").description("Disable an enabled plugin").option("-a, --all","Disable all enabled plugins").option("-s, --scope <scope>",`Installation scope: ${IH.join(", ")} (default: auto-detect)`).addOption(G()).action(async(W,z)=>{let{pluginDisableHandler:H}=await Promise.resolve().then(() => (oR(),aR));await H(W,z)}),K.command("update <plugin>").description("Update a plugin to the latest version (restart required to apply)").option("-s, --scope <scope>",`Installation scope: ${FAA.join(", ")} (default: user)`).addOption(G()).action(async(W,z)=>{let{pluginUpdateHandler:H}=await Promise.resolve().then(() => (oR(),aR));await H(W,z)}),QY("consumerSubscription"))Q.command("setup-token").description("Set up a long-lived authentication token (requires hosted subscription)").action(async()=>{let[{setupTokenHandler:W},{createRoot:z}]=await Promise.all([Promise.resolve().then(() => (xGQ(),fGQ)),Promise.resolve().then(() => (uA(),M8A))]),H=await z(pAA(!1));await W(H)});return Q.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:W}=await Promise.resolve().then(() => (WsY(),qsY));await W(),process.exit(0)}),QY("remoteControl"),Q.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:W},{createRoot:z}]=await Promise.all([Promise.resolve().then(() => (xGQ(),fGQ)),Promise.resolve().then(() => (uA(),M8A))]),H=await z(pAA(!1));await W(H)}),Q.command("update").alias("upgrade").description("Check for updates and install if available").action(async()=>{let{update:W}=await Promise.resolve().then(() => (HsY(),zsY));await W()}),Q.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(W,z)=>{let{installHandler:H}=await Promise.resolve().then(() => (xGQ(),fGQ));await H(W,z)}),$Y("run_before_parse"),await Q.parseAsync(process.argv),$Y("run_after_parse"),$Y("main_after_run"),cMA(),Q}async function RK1({hasInitialPrompt:A,hasStdin:Q,verbose:J,debug:Y,debugToStderr:B,print:X,outputFormat:Z,inputFormat:G,numAllowedTools:K,numDisallowedTools:q,mcpClientCount:W,worktreeEnabled:z,skipWebFetchPreflight:H,githubActionInputs:U,dangerouslySkipPermissionsPassed:F,permissionMode:N,modeIsBypass:L,allowDangerouslySkipPermissionsPassed:O,systemPromptFlag:V,appendSystemPromptFlag:M,thinkingConfig:I,assistantActivationPath:D}){try{c("tengu_init",{entrypoint:"chatcode-cli",hasInitialPrompt:A,hasStdin:Q,verbose:J,debug:Y,debugToStderr:B,print:X,outputFormat:Z,inputFormat:G,numAllowedTools:K,numDisallowedTools:q,mcpClientCount:W,worktree:z,skipWebFetchPreflight:H,...U&&{githubActionInputs:U},dangerouslySkipPermissionsPassed:F,permissionMode:N,modeIsBypass:L,inProtectedNamespace:RJA(),allowDangerouslySkipPermissionsPassed:O,thinkingType:I.type,...V&&{systemPromptFlag:V},...M&&{appendSystemPromptFlag:M},is_simple:a8()||void 0,is_coordinator:void 0,...D&&{assistantActivationPath:D},autoUpdatesChannel:i0().autoUpdatesChannel??"latest",...{}})}catch(C){AA(C)}}function hGQ(A){}function gGQ(A){return}function IK1(){(process.stderr.isTTY?process.stderr:process.stdout.isTTY?process.stdout:void 0)?.write(uI)}function DK1(A){if(typeof A!=="object"||A===null)return{};let Q=A,J=Q.teammateMode;return{agentId:typeof Q.agentId==="string"?Q.agentId:void 0,agentName:typeof Q.agentName==="string"?Q.agentName:void 0,teamName:typeof Q.teamName==="string"?Q.teamName:void 0,agentColor:typeof Q.agentColor==="string"?Q.agentColor:void 0,planModeRequired:typeof Q.planModeRequired==="boolean"?Q.planModeRequired:void 0,parentSessionId:typeof Q.parentSessionId==="string"?Q.parentSessionId:void 0,teammateMode:J==="auto"||J==="tmux"||J==="in-process"?J:void 0,agentType:typeof Q.agentType==="string"?Q.agentType:void 0}}var UsY=()=>(K6(),h6(nPQ)),XK1=()=>h6(cdJ),ZK1=()=>(jt(),h6(KdQ)),GK1=null,SZ0=11;var u70=j(()=>{VP();B90();I90();X10();T8();_VA();GOQ();mD();DN();z10();$w();ElY();w0();jlY();p0Q();VAA();pPQ();R_();FZA();$j();uz();Em();OX();Xb();gPA();n0();nQ();i2A();n2();p3();tjA();q0();aY();SZQ();BR();iC();VCA();yQ();PX0();ylY();zo();w0();zQ();Q1Q();KQ();aX();ZnY();Lg();g70();mj();Iz();p70();QrY();RW();rM();LjA();Lz();g4A();JrY();_Q();iN();QZ();NX0();rCA();$8();BrY();N7();UQ();qq();wY();ZOA();wz();jW();fN();MW();pwA();jDA();bN();vw();Yc();kY();NZQ();G0();SE();Z5();_7A();ZrY();c0Q();q$();KrY();WrY();TtQ();j7A();Iz();VU();EG();LEA();rX0();ge();FGA();hM();K9();ub();By();m0();aA();FQ();s0();l7();P$A();vPQ();GL();cPA();m7();KQ();HrY();FrY();LrY();OrY();VrY();RrY();DrY();ErY();nrY();rrY();orY();VX0();trY();rP();fe();RGA();tqA();a3();XU();AX();QGQ();K5();cCA();YX();Eq();v$();K_();us();KU();$Y("main_tsx_entry");syY();MTY();$Y("main_tsx_imports_loaded");if(qK1())process.exit(1)});var CK1={};function $K1(){if(process.title="chatcode-cli",process.stdout.isTTY)process.stdout.write("\x1B]0;ChatCode CLI\x07")}async function EK1(){let A=process.argv.slice(2);if(A.length===1&&(A[0]==="--version"||A[0]==="-v"||A[0]==="-V")){console.log(`${MACRO.VERSION} (ChatCode CLI)`);return}let{installOutboundUrlGuard:Q}=await Promise.resolve().then(() => (n90(),XvY));Q();let{profileCheckpoint:J}=await Promise.resolve().then(() => (VP(),gbJ));if(J("cli_entry"),!N30(A)){console.error("This ChatCode capability is not enabled in this build."),process.exitCode=1;return}if(process.argv[2]==="--chatcode-in-chrome-mcp"){J("cli_chatcode_in_chrome_mcp_path");let{runChatCodeInChromeMcpServer:Z}=await Promise.resolve().then(() => (deQ(),ceQ));await Z();return}else if(process.argv[2]==="--chrome-native-host"){J("cli_chrome_native_host_path");let{runChromeNativeHost:Z}=await Promise.resolve().then(() => (UvY(),HvY));await Z();return}if(!1)switch(A[0]){case"ps":case"logs":case"attach":case"kill":default:}if((A.includes("--tmux")||A.includes("--tmux=classic"))&&(A.includes("-w")||A.includes("--worktree")||A.some((Z)=>Z.startsWith("--worktree=")))){J("cli_tmux_worktree_fast_path");let{enableConfigs:Z}=await Promise.resolve().then(() => (nQ(),PC0));Z();let{isWorktreeModeEnabled:G}=await Promise.resolve().then(() => LBY);if(G()){let{execIntoTmuxWorktree:K}=await Promise.resolve().then(() => (KU(),z7J)),q=await K(A);if(q.handled)return;if(q.error){let{exitWithError:W}=await Promise.resolve().then(() => X30);W(q.error)}}}if(A.includes("--update")||A.includes("--upgrade")){let Z=A.filter((K)=>K!=="--update"&&K!=="--upgrade"&&K!=="--debug"&&K!=="-d");if(A.includes("--debug")||A.includes("-d"))process.env.DEBUG=process.env.DEBUG||"*";process.argv=[process.argv[0],process.argv[1],"update",...Z]}if(A.includes("--bare"))process.env.CHATCODE_CLI_SIMPLE="1";let{startCapturingEarlyInput:B}=await Promise.resolve().then(() => (i2A(),pP0));B(),J("cli_before_main_import");let{main:X}=await Promise.resolve().then(() => (u70(),NsY));J("cli_after_main_import"),await X(),J("cli_after_main_complete")}var LsY=j(()=>{WqQ();L30();cTA();$K1();process.env.COREPACK_ENABLE_AUTO_PIN="0";if(process.env.CHATCODE_CLI_REMOTE==="true"){let A=process.env.NODE_OPTIONS||"";process.env.NODE_OPTIONS=A?`${A} --max-old-space-size=8192`:"--max-old-space-size=8192"}EK1()});WqQ();cTA();var G3A={name:"@chatcode/chatcode-cli-test",version:"1.0.30",description:"ChatCode CLI command-line coding assistant.",license:"SEE LICENSE IN LICENSE.md",type:"module",bin:{"chatcode-cli":"bin/cli.js",cco:"bin/cli.js"},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"},chatcodeNativePackageFormat:1,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","@chatcode/chrome-mcp":"file:./shims/chatcode-chrome-mcp","@chatcode/computer-use-input":"file:./shims/chatcode-computer-use-input","@chatcode/computer-use-mcp":"file:./shims/chatcode-computer-use-mcp","@chatcode/computer-use-swift":"file:./shims/chatcode-computer-use-swift","@chatcode/mcpb":"file:./shims/chatcode-mcpb","@chatcode/sandbox-runtime":"file:./shims/chatcode-sandbox-runtime","@chatcode/sdk":"file:./shims/chatcode-sdk","@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","adm-zip":"0.5.16",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","color-diff-napi":"file:./shims/color-diff-napi",diff:"8.0.4","emoji-regex":"10.6.0","env-paths":"4.0.0",execa:"9.6.1",fflate:"0.8.2",figures:"6.1.0","fuse.js":"7.1.0","get-east-asian-width":"1.5.0","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","modifiers-napi":"file:./shims/modifiers-napi","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","url-handler-napi":"file:./shims/url-handler-napi","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"},optionalDependencies:{"@chatcode/chatcode-cli-test-darwin-arm64":"1.0.30","@chatcode/chatcode-cli-test-darwin-x64":"1.0.30","@chatcode/chatcode-cli-test-linux-x64":"1.0.30","@chatcode/chatcode-cli-test-linux-arm64":"1.0.30","@chatcode/chatcode-cli-test-win32-x64":"1.0.30"},dependencies:{"@chatcode/chatcode-cli-test":"^1.0.20"}};aA();import{existsSync as gZ0,readdirSync as jK1,readFileSync as PK1}from"fs";import{dirname as VsY,extname as yK1,join as yQA,resolve as OsY}from"path";import{fileURLToPath as TK1}from"url";if(process.platform!=="win32"&&process.platform!=="darwin")process.env.CHATCODE_CLI_NO_FLICKER??="1";process.env.CHATCODE_CLI_DISABLE_MOUSE??="0";var _sY=VsY(TK1(import.meta.url)),vK1={VERSION:G3A.version,BUILD_TIME:"",PACKAGE_URL:G3A.name,NATIVE_PACKAGE_URL:G3A.name,VERSION_CHANGELOG:"",ISSUES_EXPLAINER:"contact support at https://yuanjing.chinaunicom.com",FEEDBACK_CHANNEL:"github"};if(!("MACRO"in globalThis))globalThis.MACRO=vK1;function hZ0(A,Q){if(!gZ0(A))return;for(let J of jK1(A,{withFileTypes:!0})){let Y=yQA(A,J.name);if(J.isDirectory()){hZ0(Y,Q);continue}if([".ts",".tsx",".js",".jsx",".mjs",".cjs"].includes(yK1(J.name)))Q.push(Y)}}function bK1(A){let Q=A.replace(/\.js$/u,"");return[Q,`${Q}.ts`,`${Q}.tsx`,`${Q}.js`,`${Q}.jsx`,`${Q}.mjs`,`${Q}.cjs`,yQA(Q,"index.ts"),yQA(Q,"index.tsx"),yQA(Q,"index.js")].some((Y)=>gZ0(Y))}function kK1(){let A=[],Q=OsY(_sY,"..");if($(`cliRoot: ${Q}`,{level:"warn"}),$(`_runtimeDir: ${_sY}`),!gZ0(yQA(Q,"src")))return[];hZ0(yQA(Q,"src"),A),hZ0(yQA(Q,"vendor"),A);let J=[],Y=new Set,B=/(?:import|export)\s+[\s\S]*?from\s+['"](\.\.?\/[^'"]+)['"]|require\(\s*['"](\.\.?\/[^'"]+)['"]\s*\)/g;for(let X of A){let Z=PK1(X,"utf8");for(let G of Z.matchAll(B)){let K=G[1]??G[2];if(!K)continue;let q=OsY(VsY(X),K);if(bK1(q))continue;let W=`${X} -> ${K}`;if(Y.has(W))continue;Y.add(W),J.push({importer:X,specifier:K})}}return J.sort((X,Z)=>`${X.importer}:${X.specifier}`.localeCompare(`${Z.importer}:${Z.specifier}`))}var yf4=process.argv.slice(2),xZ0=kK1();if(xZ0.length>0){console.log("ChatCode CLI restored development workspace"),console.log(`version: ${G3A.version}`),console.log(`missing relative imports: ${xZ0.length}`),console.log(""),console.log("Top missing modules:");for(let A of xZ0.slice(0,20))console.log(`- ${A.importer.replace(`${process.cwd()}/`,"")} -> ${A.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(() => (LsY(),CK1));
8770
+ `))}catch(lJ){return await _V(sB,`Error downloading files: ${xA(lJ)}`)}let CB=DJ??(Array.isArray(g0)?{messages:g0,fileHistorySnapshots:void 0,agentName:void 0,agentColor:void 0,restoredAgentDef:bB,initialState:L6,contentReplacements:void 0}:void 0);if(CB)hGQ(z),gGQ(z),await ZyA(sB,{getFpsMetrics:PX,stats:AZ,initialState:CB.initialState},{...A6,mainThreadAgentDefinition:CB.restoredAgentDef??bB,initialMessages:CB.messages,initialFileHistorySnapshots:CB.fileHistorySnapshots,initialContentReplacements:CB.contentReplacements,initialAgentName:CB.agentName,initialAgentColor:CB.agentColor},IQA);else await XnY(sB,{getFpsMetrics:PX,stats:AZ,initialState:L6},vy(W0()),{...A6,initialSearchQuery:yY,forkSession:z.forkSession,filterByPr:XY})}else{let bQ=j4&&EZ.length===0?j4:void 0;$Y("action_after_hooks"),hGQ(z),gGQ(z);let g0=null,DJ=g0?[g0,...EZ]:EZ.length>0?EZ:void 0;await W8Q(),await ZyA(sB,{getFpsMetrics:PX,stats:AZ,initialState:L6},{...A6,initialMessages:DJ,pendingHookMessages:bQ},IQA)}}).version(`${MACRO.VERSION} (ChatCode CLI)`,"-v, --version","Output the version number"),QY("chromeIntegration"))Q.option("--chrome","Enable browser integration"),Q.option("--no-chrome","Disable browser integration");if(Q.option("-w, --worktree [name]","Create a new git worktree for this session (optionally specify a name)"),Q.option("--tmux","Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux."),$m())Q.addOption(new U9("--advisor <model>","Enable the server-side advisor tool with the specified model (alias or full ID).").hideHelp());if(Q.addOption(new U9("--agent-id <id>","Teammate agent ID").hideHelp()),Q.addOption(new U9("--agent-name <name>","Teammate display name").hideHelp()),Q.addOption(new U9("--team-name <name>","Team name for swarm coordination").hideHelp()),Q.addOption(new U9("--agent-color <color>","Teammate UI color").hideHelp()),Q.addOption(new U9("--plan-mode-required","Require plan mode before implementation").hideHelp()),Q.addOption(new U9("--parent-session-id <id>","Parent session ID for analytics correlation").hideHelp()),Q.addOption(new U9("--teammate-mode <mode>",'How to spawn teammates: "tmux", "in-process", or "auto"').choices(["auto","tmux","in-process"]).hideHelp()),Q.addOption(new U9("--agent-type <type>","Custom agent type for this teammate").hideHelp()),Q.addOption(new U9("--sdk-url <url>","Use remote WebSocket endpoint for SDK I/O streaming (only with -p and stream-json format)").hideHelp()),QY("remoteControl"))Q.addOption(new U9("--teleport [session]","Resume a teleport session, optionally specify session ID").hideHelp()),Q.addOption(new U9("--remote [description]","Create a remote session with the given description").hideHelp());QY("remoteControl"),$Y("run_main_options_built");let J=process.argv.includes("-p")||process.argv.includes("--print"),Y=process.argv.some((W)=>W.startsWith("cc://")||W.startsWith("cc+unix://"));if(J&&!Y)return $Y("run_before_parse"),await Q.parseAsync(process.argv),$Y("run_after_parse"),Q;let B=Q.command("mcp").description("Configure and manage MCP servers").configureHelp(A()).enablePositionalOptions();if(B.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:W,verbose:z})=>{let{mcpServeHandler:H}=await Promise.resolve().then(() => (Ol(),Ll));await H({debug:W,verbose:z})}),GrY(B),rS())qrY(B);if(B.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(W,z)=>{let{mcpRemoveHandler:H}=await Promise.resolve().then(() => (Ol(),Ll));await H(W,z)}),B.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:W}=await Promise.resolve().then(() => (Ol(),Ll));await W()}),B.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(W)=>{let{mcpGetHandler:z}=await Promise.resolve().then(() => (Ol(),Ll));await z(W)}),B.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(W,z,H)=>{let{mcpAddJsonHandler:U}=await Promise.resolve().then(() => (Ol(),Ll));await U(W,z,H)}),QY("desktopHandoff"))B.command("add-from-desktop").description("Import MCP servers from ChatCode Desktop configuration (Mac and WSL only)").option("-s, --scope <scope>","Configuration scope (local, user, or project)","local").action(async(W)=>{let{mcpAddFromDesktopHandler:z}=await Promise.resolve().then(() => (Ol(),Ll));await z(W)});B.command("reset-project-choices").description("Reset all approved and rejected project-scoped (.mcp.json) servers within this project").action(async()=>{let{mcpResetChoicesHandler:W}=await Promise.resolve().then(() => (Ol(),Ll));await W()});let X=Q.command("auth").description("Manage authentication").configureHelp(A()),Z=X.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(QY("consumerSubscription"))Z.option("--hosted","Use hosted subscription plan (default)");Z.action(async({email:W,sso:z,console:H,hosted:U})=>{let{authLogin:F}=await Promise.resolve().then(() => (SZA(),seA));await F({email:W,sso:z,console:H,hosted:U})}),X.command("status").description("Show authentication status").option("--json","Output as JSON (default)").option("--text","Output as human-readable text").action(async(W)=>{let{authStatus:z}=await Promise.resolve().then(() => (SZA(),seA));await z(W)}),X.command("logout").description("Log out from your ChatCode account").action(async()=>{let{authLogout:W}=await Promise.resolve().then(() => (SZA(),seA));await W()});let G=()=>new U9("--cowork","Use cowork_plugins directory").hideHelp(),K=Q.command("plugin").alias("plugins").description("Manage ChatCode CLI plugins").configureHelp(A());K.command("validate <path>").description("Validate a plugin or marketplace manifest").addOption(G()).action(async(W,z)=>{let{pluginValidateHandler:H}=await Promise.resolve().then(() => (oR(),aR));await H(W,z)}),K.command("list").description("List installed plugins").option("--json","Output as JSON").option("--available","Include available plugins from marketplaces (requires --json)").addOption(G()).action(async(W)=>{let{pluginListHandler:z}=await Promise.resolve().then(() => (oR(),aR));await z(W)});let q=K.command("marketplace").description("Manage ChatCode CLI marketplaces").configureHelp(A());if(q.command("add <source>").description("Add a marketplace from a URL, path, or GitHub repo").addOption(G()).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(W,z)=>{let{marketplaceAddHandler:H}=await Promise.resolve().then(() => (oR(),aR));await H(W,z)}),q.command("list").description("List all configured marketplaces").option("--json","Output as JSON").addOption(G()).action(async(W)=>{let{marketplaceListHandler:z}=await Promise.resolve().then(() => (oR(),aR));await z(W)}),q.command("remove <name>").alias("rm").description("Remove a configured marketplace").addOption(G()).action(async(W,z)=>{let{marketplaceRemoveHandler:H}=await Promise.resolve().then(() => (oR(),aR));await H(W,z)}),q.command("update [name]").description("Update marketplace(s) from their source - updates all if no name specified").addOption(G()).action(async(W,z)=>{let{marketplaceUpdateHandler:H}=await Promise.resolve().then(() => (oR(),aR));await H(W,z)}),K.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(G()).action(async(W,z)=>{let{pluginInstallHandler:H}=await Promise.resolve().then(() => (oR(),aR));await H(W,z)}),K.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(G()).action(async(W,z)=>{let{pluginUninstallHandler:H}=await Promise.resolve().then(() => (oR(),aR));await H(W,z)}),K.command("enable <plugin>").description("Enable a disabled plugin").option("-s, --scope <scope>",`Installation scope: ${IH.join(", ")} (default: auto-detect)`).addOption(G()).action(async(W,z)=>{let{pluginEnableHandler:H}=await Promise.resolve().then(() => (oR(),aR));await H(W,z)}),K.command("disable [plugin]").description("Disable an enabled plugin").option("-a, --all","Disable all enabled plugins").option("-s, --scope <scope>",`Installation scope: ${IH.join(", ")} (default: auto-detect)`).addOption(G()).action(async(W,z)=>{let{pluginDisableHandler:H}=await Promise.resolve().then(() => (oR(),aR));await H(W,z)}),K.command("update <plugin>").description("Update a plugin to the latest version (restart required to apply)").option("-s, --scope <scope>",`Installation scope: ${FAA.join(", ")} (default: user)`).addOption(G()).action(async(W,z)=>{let{pluginUpdateHandler:H}=await Promise.resolve().then(() => (oR(),aR));await H(W,z)}),QY("consumerSubscription"))Q.command("setup-token").description("Set up a long-lived authentication token (requires hosted subscription)").action(async()=>{let[{setupTokenHandler:W},{createRoot:z}]=await Promise.all([Promise.resolve().then(() => (xGQ(),fGQ)),Promise.resolve().then(() => (uA(),M8A))]),H=await z(pAA(!1));await W(H)});return Q.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:W}=await Promise.resolve().then(() => (WsY(),qsY));await W(),process.exit(0)}),QY("remoteControl"),Q.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:W},{createRoot:z}]=await Promise.all([Promise.resolve().then(() => (xGQ(),fGQ)),Promise.resolve().then(() => (uA(),M8A))]),H=await z(pAA(!1));await W(H)}),Q.command("update").alias("upgrade").description("Check for updates and install if available").action(async()=>{let{update:W}=await Promise.resolve().then(() => (HsY(),zsY));await W()}),Q.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(W,z)=>{let{installHandler:H}=await Promise.resolve().then(() => (xGQ(),fGQ));await H(W,z)}),$Y("run_before_parse"),await Q.parseAsync(process.argv),$Y("run_after_parse"),$Y("main_after_run"),cMA(),Q}async function RK1({hasInitialPrompt:A,hasStdin:Q,verbose:J,debug:Y,debugToStderr:B,print:X,outputFormat:Z,inputFormat:G,numAllowedTools:K,numDisallowedTools:q,mcpClientCount:W,worktreeEnabled:z,skipWebFetchPreflight:H,githubActionInputs:U,dangerouslySkipPermissionsPassed:F,permissionMode:N,modeIsBypass:L,allowDangerouslySkipPermissionsPassed:O,systemPromptFlag:V,appendSystemPromptFlag:M,thinkingConfig:I,assistantActivationPath:D}){try{c("tengu_init",{entrypoint:"chatcode-cli",hasInitialPrompt:A,hasStdin:Q,verbose:J,debug:Y,debugToStderr:B,print:X,outputFormat:Z,inputFormat:G,numAllowedTools:K,numDisallowedTools:q,mcpClientCount:W,worktree:z,skipWebFetchPreflight:H,...U&&{githubActionInputs:U},dangerouslySkipPermissionsPassed:F,permissionMode:N,modeIsBypass:L,inProtectedNamespace:RJA(),allowDangerouslySkipPermissionsPassed:O,thinkingType:I.type,...V&&{systemPromptFlag:V},...M&&{appendSystemPromptFlag:M},is_simple:a8()||void 0,is_coordinator:void 0,...D&&{assistantActivationPath:D},autoUpdatesChannel:i0().autoUpdatesChannel??"latest",...{}})}catch(C){AA(C)}}function hGQ(A){}function gGQ(A){return}function IK1(){(process.stderr.isTTY?process.stderr:process.stdout.isTTY?process.stdout:void 0)?.write(uI)}function DK1(A){if(typeof A!=="object"||A===null)return{};let Q=A,J=Q.teammateMode;return{agentId:typeof Q.agentId==="string"?Q.agentId:void 0,agentName:typeof Q.agentName==="string"?Q.agentName:void 0,teamName:typeof Q.teamName==="string"?Q.teamName:void 0,agentColor:typeof Q.agentColor==="string"?Q.agentColor:void 0,planModeRequired:typeof Q.planModeRequired==="boolean"?Q.planModeRequired:void 0,parentSessionId:typeof Q.parentSessionId==="string"?Q.parentSessionId:void 0,teammateMode:J==="auto"||J==="tmux"||J==="in-process"?J:void 0,agentType:typeof Q.agentType==="string"?Q.agentType:void 0}}var UsY=()=>(K6(),h6(nPQ)),XK1=()=>h6(cdJ),ZK1=()=>(jt(),h6(KdQ)),GK1=null,SZ0=11;var u70=j(()=>{VP();B90();I90();X10();T8();_VA();GOQ();mD();DN();z10();$w();ElY();w0();jlY();p0Q();VAA();pPQ();R_();FZA();$j();uz();Em();OX();Xb();gPA();n0();nQ();i2A();n2();p3();tjA();q0();aY();SZQ();BR();iC();VCA();yQ();PX0();ylY();zo();w0();zQ();Q1Q();KQ();aX();ZnY();Lg();g70();mj();Iz();p70();QrY();RW();rM();LjA();Lz();g4A();JrY();_Q();iN();QZ();NX0();rCA();$8();BrY();N7();UQ();qq();wY();ZOA();wz();jW();fN();MW();pwA();jDA();bN();vw();Yc();kY();NZQ();G0();SE();Z5();_7A();ZrY();c0Q();q$();KrY();WrY();TtQ();j7A();Iz();VU();EG();LEA();rX0();ge();FGA();hM();K9();ub();By();m0();aA();FQ();s0();l7();P$A();vPQ();GL();cPA();m7();KQ();HrY();FrY();LrY();OrY();VrY();RrY();DrY();ErY();nrY();rrY();orY();VX0();trY();rP();fe();RGA();tqA();a3();XU();AX();QGQ();K5();cCA();YX();Eq();v$();K_();us();KU();$Y("main_tsx_entry");syY();MTY();$Y("main_tsx_imports_loaded");if(qK1())process.exit(1)});var CK1={};function $K1(){if(process.title="chatcode-cli",process.stdout.isTTY)process.stdout.write("\x1B]0;ChatCode CLI\x07")}async function EK1(){let A=process.argv.slice(2);if(A.length===1&&(A[0]==="--version"||A[0]==="-v"||A[0]==="-V")){console.log(`${MACRO.VERSION} (ChatCode CLI)`);return}let{installOutboundUrlGuard:Q}=await Promise.resolve().then(() => (n90(),XvY));Q();let{profileCheckpoint:J}=await Promise.resolve().then(() => (VP(),gbJ));if(J("cli_entry"),!N30(A)){console.error("This ChatCode capability is not enabled in this build."),process.exitCode=1;return}if(process.argv[2]==="--chatcode-in-chrome-mcp"){J("cli_chatcode_in_chrome_mcp_path");let{runChatCodeInChromeMcpServer:Z}=await Promise.resolve().then(() => (deQ(),ceQ));await Z();return}else if(process.argv[2]==="--chrome-native-host"){J("cli_chrome_native_host_path");let{runChromeNativeHost:Z}=await Promise.resolve().then(() => (UvY(),HvY));await Z();return}if(!1)switch(A[0]){case"ps":case"logs":case"attach":case"kill":default:}if((A.includes("--tmux")||A.includes("--tmux=classic"))&&(A.includes("-w")||A.includes("--worktree")||A.some((Z)=>Z.startsWith("--worktree=")))){J("cli_tmux_worktree_fast_path");let{enableConfigs:Z}=await Promise.resolve().then(() => (nQ(),PC0));Z();let{isWorktreeModeEnabled:G}=await Promise.resolve().then(() => LBY);if(G()){let{execIntoTmuxWorktree:K}=await Promise.resolve().then(() => (KU(),z7J)),q=await K(A);if(q.handled)return;if(q.error){let{exitWithError:W}=await Promise.resolve().then(() => X30);W(q.error)}}}if(A.includes("--update")||A.includes("--upgrade")){let Z=A.filter((K)=>K!=="--update"&&K!=="--upgrade"&&K!=="--debug"&&K!=="-d");if(A.includes("--debug")||A.includes("-d"))process.env.DEBUG=process.env.DEBUG||"*";process.argv=[process.argv[0],process.argv[1],"update",...Z]}if(A.includes("--bare"))process.env.CHATCODE_CLI_SIMPLE="1";let{startCapturingEarlyInput:B}=await Promise.resolve().then(() => (i2A(),pP0));B(),J("cli_before_main_import");let{main:X}=await Promise.resolve().then(() => (u70(),NsY));J("cli_after_main_import"),await X(),J("cli_after_main_complete")}var LsY=j(()=>{WqQ();L30();cTA();$K1();process.env.COREPACK_ENABLE_AUTO_PIN="0";if(process.env.CHATCODE_CLI_REMOTE==="true"){let A=process.env.NODE_OPTIONS||"";process.env.NODE_OPTIONS=A?`${A} --max-old-space-size=8192`:"--max-old-space-size=8192"}EK1()});WqQ();cTA();var G3A={name:"@chatcode/chatcode-cli-test",version:"1.0.31",description:"ChatCode CLI command-line coding assistant.",license:"SEE LICENSE IN LICENSE.md",type:"module",bin:{"chatcode-cli":"bin/cli.js",cco:"bin/cli.js"},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"},chatcodeNativePackageFormat:1,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","@chatcode/chrome-mcp":"file:./shims/chatcode-chrome-mcp","@chatcode/computer-use-input":"file:./shims/chatcode-computer-use-input","@chatcode/computer-use-mcp":"file:./shims/chatcode-computer-use-mcp","@chatcode/computer-use-swift":"file:./shims/chatcode-computer-use-swift","@chatcode/mcpb":"file:./shims/chatcode-mcpb","@chatcode/sandbox-runtime":"file:./shims/chatcode-sandbox-runtime","@chatcode/sdk":"file:./shims/chatcode-sdk","@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","adm-zip":"0.5.16",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","color-diff-napi":"file:./shims/color-diff-napi",diff:"8.0.4","emoji-regex":"10.6.0","env-paths":"4.0.0",execa:"9.6.1",fflate:"0.8.2",figures:"6.1.0","fuse.js":"7.1.0","get-east-asian-width":"1.5.0","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","modifiers-napi":"file:./shims/modifiers-napi","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","url-handler-napi":"file:./shims/url-handler-napi","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"},optionalDependencies:{"@chatcode/chatcode-cli-test-darwin-arm64":"1.0.31","@chatcode/chatcode-cli-test-darwin-x64":"1.0.31","@chatcode/chatcode-cli-test-linux-x64":"1.0.31","@chatcode/chatcode-cli-test-linux-arm64":"1.0.31","@chatcode/chatcode-cli-test-win32-x64":"1.0.31"},dependencies:{"@chatcode/chatcode-cli-test":"^1.0.20"}};aA();import{existsSync as gZ0,readdirSync as jK1,readFileSync as PK1}from"fs";import{dirname as VsY,extname as yK1,join as yQA,resolve as OsY}from"path";import{fileURLToPath as TK1}from"url";if(process.platform!=="win32"&&process.platform!=="darwin")process.env.CHATCODE_CLI_NO_FLICKER??="1";process.env.CHATCODE_CLI_DISABLE_MOUSE??="0";var _sY=VsY(TK1(import.meta.url)),vK1={VERSION:G3A.version,BUILD_TIME:"",PACKAGE_URL:G3A.name,NATIVE_PACKAGE_URL:G3A.name,VERSION_CHANGELOG:"",ISSUES_EXPLAINER:"contact support at https://yuanjing.chinaunicom.com",FEEDBACK_CHANNEL:"github"};if(!("MACRO"in globalThis))globalThis.MACRO=vK1;function hZ0(A,Q){if(!gZ0(A))return;for(let J of jK1(A,{withFileTypes:!0})){let Y=yQA(A,J.name);if(J.isDirectory()){hZ0(Y,Q);continue}if([".ts",".tsx",".js",".jsx",".mjs",".cjs"].includes(yK1(J.name)))Q.push(Y)}}function bK1(A){let Q=A.replace(/\.js$/u,"");return[Q,`${Q}.ts`,`${Q}.tsx`,`${Q}.js`,`${Q}.jsx`,`${Q}.mjs`,`${Q}.cjs`,yQA(Q,"index.ts"),yQA(Q,"index.tsx"),yQA(Q,"index.js")].some((Y)=>gZ0(Y))}function kK1(){let A=[],Q=OsY(_sY,"..");if($(`cliRoot: ${Q}`,{level:"warn"}),$(`_runtimeDir: ${_sY}`),!gZ0(yQA(Q,"src")))return[];hZ0(yQA(Q,"src"),A),hZ0(yQA(Q,"vendor"),A);let J=[],Y=new Set,B=/(?:import|export)\s+[\s\S]*?from\s+['"](\.\.?\/[^'"]+)['"]|require\(\s*['"](\.\.?\/[^'"]+)['"]\s*\)/g;for(let X of A){let Z=PK1(X,"utf8");for(let G of Z.matchAll(B)){let K=G[1]??G[2];if(!K)continue;let q=OsY(VsY(X),K);if(bK1(q))continue;let W=`${X} -> ${K}`;if(Y.has(W))continue;Y.add(W),J.push({importer:X,specifier:K})}}return J.sort((X,Z)=>`${X.importer}:${X.specifier}`.localeCompare(`${Z.importer}:${Z.specifier}`))}var yf4=process.argv.slice(2),xZ0=kK1();if(xZ0.length>0){console.log("ChatCode CLI restored development workspace"),console.log(`version: ${G3A.version}`),console.log(`missing relative imports: ${xZ0.length}`),console.log(""),console.log("Top missing modules:");for(let A of xZ0.slice(0,20))console.log(`- ${A.importer.replace(`${process.cwd()}/`,"")} -> ${A.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(() => (LsY(),CK1));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chatcode/chatcode-cli-test",
3
- "version": "1.0.30",
3
+ "version": "1.0.31",
4
4
  "description": "ChatCode CLI command-line coding assistant.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "type": "module",
@@ -117,11 +117,11 @@
117
117
  "zod": "4.3.6"
118
118
  },
119
119
  "optionalDependencies": {
120
- "@chatcode/chatcode-cli-test-darwin-arm64": "1.0.30",
121
- "@chatcode/chatcode-cli-test-darwin-x64": "1.0.30",
122
- "@chatcode/chatcode-cli-test-linux-x64": "1.0.30",
123
- "@chatcode/chatcode-cli-test-linux-arm64": "1.0.30",
124
- "@chatcode/chatcode-cli-test-win32-x64": "1.0.30"
120
+ "@chatcode/chatcode-cli-test-darwin-arm64": "1.0.31",
121
+ "@chatcode/chatcode-cli-test-darwin-x64": "1.0.31",
122
+ "@chatcode/chatcode-cli-test-linux-x64": "1.0.31",
123
+ "@chatcode/chatcode-cli-test-linux-arm64": "1.0.31",
124
+ "@chatcode/chatcode-cli-test-win32-x64": "1.0.31"
125
125
  },
126
126
  "dependencies": {
127
127
  "@chatcode/chatcode-cli-test": "^1.0.20"