@sourcegraph/amp 0.0.1755734404-g56e2f8 → 0.0.1755734500-g56e2f8

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/main.js +3 -3
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -5044,7 +5044,7 @@ allow ${z}${G?` ${G}`:""}`}let J={stdin:process.stdin,stdout:process.stdout,stde
5044
5044
  ${H}`;if(B==="pnpm"&&H.includes("Unable to find the global bin directory"))F+=`
5045
5045
 
5046
5046
  Hint: Try running "pnpm setup" to configure pnpm global directory, or use npm instead:
5047
- npm install -g @sourcegraph/amp`;G(new Error(F))}},error:(Z)=>{if(!Y)Y=!0,G(new Error(`Failed to spawn ${B}: ${Z.message}`))},complete:()=>{if(!Y)Y=!0,z()}})})}var Ea1=Ha1.join(e00||Ha1.join(process.env.HOME||process.cwd(),".local","state"),"amp","last-thread-id");function wj(A,Q){let B={};if(A.getOptionValueSourceWithGlobals("dangerouslyAllowAll")==="cli")B.dangerouslyAllowAll=Q.dangerouslyAllowAll;if(A.getOptionValueSourceWithGlobals("tryGpt5")==="cli")B.gpt5=Q.tryGpt5;return B}var _L2=T6.union([T6.object({command:T6.string(),args:T6.array(T6.string()).optional(),env:T6.record(T6.string(),T6.string()).optional()}).strict(),T6.object({url:T6.string()}).strict()]),PL2=T6.record(T6.string(),_L2);async function Ma1(A){try{await jL2(Ha1.dirname(Ea1),{recursive:!0}),await TL2(Ea1,A,"utf-8")}catch(Q){M1.debug("Failed to save last thread ID",Q)}}async function SL2(){try{return(await H3A(Ea1,"utf-8")).trim()}catch(A){return null}}async function vL2(A){let Q;try{Q=JSON.parse(A)}catch(B){throw new Error(`Failed to parse --mcp-config as JSON: ${B instanceof Error?B.message:String(B)}`)}try{return PL2.parse(Q)}catch(B){if(B instanceof T6.ZodError){let J=B.issues.map((D)=>`${D.path.join(".")}: ${D.message}`).join(", ");throw new Error(`Invalid MCP server configuration: ${J}`)}throw new Error(`Failed to validate MCP server configuration: ${String(B)}`)}}function kL2(A,Q){return{...A,async get(B){if(B==="mcpServers"){let J=await A.get(B)||{},D={};if(typeof J==="object")for(let[z,G]of Object.entries(J))D[z]={...G,_target:"global"};for(let[z,G]of Object.entries(Q))D[z]={...G,_target:"workspace"};return D}return A.get(B)},async keys(){let B=await A.keys();if(!B.includes("mcpServers"))B.push("mcpServers");return B},[Symbol.dispose](){A[Symbol.dispose]()}}}async function fL2(A){let Q=await oJ(`/api/threads/${A}`);if(!Q.ok){let B=await Q.text();if(Q.status===404||B.includes("not found"))throw new lB(gX.threadNotFound(A));throw new lB(`Failed to load thread ${A}`,1,`Use 'amp threads share ${A} --support' to share this with the Amp team if this persists.`)}return await Q.json()}var Y3A=[{name:"notifications",long:"notifications",type:"flag",description:(A)=>`${A?"Enable":"Disable"} sound notifications (enabled by default when not in execute mode)`},{name:"color",long:"color",type:"flag",description:(A)=>`${A?"Enable":"Disable"} color output (enabled by default if stdout and stderr are sent to a TTY)`,deprecated:!0},{name:"settingsFile",long:"settings-file",type:"option",default:process.env.AMP_SETTINGS_FILE??hX,description:`Custom settings file path (overrides the default location ${hX})`},{name:"logLevel",long:"log-level",type:"option",description:`Set log level (${Object.keys(M1).join(", ")})`},{name:"logFile",long:"log-file",type:"option",description:"Set log file location"},{name:"format",long:"format",type:"option",description:"output using the standard or new-ui. Options: `ui`, `new-ui`",choices:["ui","jsonl","new-ui"],hidden:!0,deprecated:!0},{name:"dangerouslyAllowAll",long:"dangerously-allow-all",type:"switch",default:!1,description:"Disable all command confirmation prompts (agent will execute all commands without asking)"},{name:"jetbrains",long:"jetbrains",type:"flag",default:rR(),description:(A)=>A?"Enable JetBrains integration. You must start Amp in the same directory as your JetBrains project. When enabled, Amp automatically includes your open JetBrains file and text selection with every message.":"Disable JetBrains integration.",hidden:!0},{name:"interactive",long:"interactive",type:"flag",description:(A)=>A?"Enable interactive mode. This will enable the interactive UI.":"Disable interactive mode. This will disable the interactive UI.",hidden:!0,deprecated:!0},{name:"mcpConfig",long:"mcp-config",type:"option",description:"JSON configuration or file path for MCP servers to merge with existing settings"},{name:"tryGpt5",long:"try-gpt5",type:"switch",default:!1,description:"Try GPT-5 as the primary agent model (limited time; see https://ampcode.com/news/gpt-5)"}],q3A=(A)=>("deprecated"in A)&&A.deprecated===!0,yL2=(A)=>("hidden"in A)&&A.hidden===!0,bL2=(A)=>("default"in A),gL2=(A)=>("default"in A)?A.default:void 0;function xL2(A,Q){let B=Q.args[0],J=Q.commands.map((z)=>z.name());if(B&&!B.includes(" ")&&B.length<30&&!/[./\\]/.test(B)){let z=J.filter((X)=>B.includes(X)||X.includes(B)),G="Run amp --help for a list of available commands.";if(z.length>0)G=`Did you mean: ${z.join(", ")}? Or run amp --help for all commands.`;throw new lB(gX.unknownCommand(B),1,G)}}function BK1(A){return{...A,getThreadEnvironment:VJA,createFileSystem:()=>bh,createFileChangeTrackerForThread:(Q)=>{let B=new gh(bh);return Bz0(B,bh,Q)},generateThreadTitle:z61,internalAPIClient:WK}}var Wa1=C6.file($L2.homedir()),F3A=process.env.XDG_CONFIG_HOME?C6.file(process.env.XDG_CONFIG_HOME):_6.joinPath(Wa1,".config");async function Ij(A,Q,B,J=!1){$t1("0.0.1755734404-g56e2f8"),_t1(Q.jetbrains);let D=AU1({storage:A.settings,secretStorage:A.secrets,workspaceRoots:YA.of([C6.file(process.cwd())]),defaultAmpURL:A.ampURL,defaultCacheDirectory:mp1,settingsOverrides:B,homeDir:Wa1,userConfigDir:F3A}),z=await rA(f2);M1.debug("Global configuration initialized",{hasCacheDirectory:!!z.settings.cacheDirectory,settingsKeys:Object.keys(z.settings)});let G=E11(ds()),X=P40({configService:D,toolService:G});if(process.env.AMP_TOOLBOX)jD0(G,bh,E01);try{await X.initialized}catch(V){M1.warn("Failed to wait for MCP servers, continuing anyway:",V)}if(Q.jetbrains)try{M1.debug("ide-client",{terminalEmulator:process.env.TERMINAL_EMULATOR}),await KK.start()}catch(V){let L=V instanceof Error?V.message:String(V);jD(`Failed to connect to JetBrains IDE: ${L}`)}let K=z.settings["experimental.reviewTool"]??!1,Y=z.settings["experimental.tools"]??[],q=!!process.env.JB_DIAGNOSTICS;H8A(G,!1,K,Y,q);let Z;if(!A.executeMode)Z=new JG1(process.cwd(),{},!0);else Z=new class extends JG1{async start(){}async query(){return[]}getStats(){return{state:"unstarted",stats:[]}}dispose(){}};if(!await A.secrets.get("apiKey",A.ampURL)){if(P4.write(`No API key found. Starting login flow...
5047
+ npm install -g @sourcegraph/amp`;G(new Error(F))}},error:(Z)=>{if(!Y)Y=!0,G(new Error(`Failed to spawn ${B}: ${Z.message}`))},complete:()=>{if(!Y)Y=!0,z()}})})}var Ea1=Ha1.join(e00||Ha1.join(process.env.HOME||process.cwd(),".local","state"),"amp","last-thread-id");function wj(A,Q){let B={};if(A.getOptionValueSourceWithGlobals("dangerouslyAllowAll")==="cli")B.dangerouslyAllowAll=Q.dangerouslyAllowAll;if(A.getOptionValueSourceWithGlobals("tryGpt5")==="cli")B.gpt5=Q.tryGpt5;return B}var _L2=T6.union([T6.object({command:T6.string(),args:T6.array(T6.string()).optional(),env:T6.record(T6.string(),T6.string()).optional()}).strict(),T6.object({url:T6.string()}).strict()]),PL2=T6.record(T6.string(),_L2);async function Ma1(A){try{await jL2(Ha1.dirname(Ea1),{recursive:!0}),await TL2(Ea1,A,"utf-8")}catch(Q){M1.debug("Failed to save last thread ID",Q)}}async function SL2(){try{return(await H3A(Ea1,"utf-8")).trim()}catch(A){return null}}async function vL2(A){let Q;try{Q=JSON.parse(A)}catch(B){throw new Error(`Failed to parse --mcp-config as JSON: ${B instanceof Error?B.message:String(B)}`)}try{return PL2.parse(Q)}catch(B){if(B instanceof T6.ZodError){let J=B.issues.map((D)=>`${D.path.join(".")}: ${D.message}`).join(", ");throw new Error(`Invalid MCP server configuration: ${J}`)}throw new Error(`Failed to validate MCP server configuration: ${String(B)}`)}}function kL2(A,Q){return{...A,async get(B){if(B==="mcpServers"){let J=await A.get(B)||{},D={};if(typeof J==="object")for(let[z,G]of Object.entries(J))D[z]={...G,_target:"global"};for(let[z,G]of Object.entries(Q))D[z]={...G,_target:"workspace"};return D}return A.get(B)},async keys(){let B=await A.keys();if(!B.includes("mcpServers"))B.push("mcpServers");return B},[Symbol.dispose](){A[Symbol.dispose]()}}}async function fL2(A){let Q=await oJ(`/api/threads/${A}`);if(!Q.ok){let B=await Q.text();if(Q.status===404||B.includes("not found"))throw new lB(gX.threadNotFound(A));throw new lB(`Failed to load thread ${A}`,1,`Use 'amp threads share ${A} --support' to share this with the Amp team if this persists.`)}return await Q.json()}var Y3A=[{name:"notifications",long:"notifications",type:"flag",description:(A)=>`${A?"Enable":"Disable"} sound notifications (enabled by default when not in execute mode)`},{name:"color",long:"color",type:"flag",description:(A)=>`${A?"Enable":"Disable"} color output (enabled by default if stdout and stderr are sent to a TTY)`,deprecated:!0},{name:"settingsFile",long:"settings-file",type:"option",default:process.env.AMP_SETTINGS_FILE??hX,description:`Custom settings file path (overrides the default location ${hX})`},{name:"logLevel",long:"log-level",type:"option",description:`Set log level (${Object.keys(M1).join(", ")})`},{name:"logFile",long:"log-file",type:"option",description:"Set log file location"},{name:"format",long:"format",type:"option",description:"output using the standard or new-ui. Options: `ui`, `new-ui`",choices:["ui","jsonl","new-ui"],hidden:!0,deprecated:!0},{name:"dangerouslyAllowAll",long:"dangerously-allow-all",type:"switch",default:!1,description:"Disable all command confirmation prompts (agent will execute all commands without asking)"},{name:"jetbrains",long:"jetbrains",type:"flag",default:rR(),description:(A)=>A?"Enable JetBrains integration. You must start Amp in the same directory as your JetBrains project. When enabled, Amp automatically includes your open JetBrains file and text selection with every message.":"Disable JetBrains integration.",hidden:!0},{name:"interactive",long:"interactive",type:"flag",description:(A)=>A?"Enable interactive mode. This will enable the interactive UI.":"Disable interactive mode. This will disable the interactive UI.",hidden:!0,deprecated:!0},{name:"mcpConfig",long:"mcp-config",type:"option",description:"JSON configuration or file path for MCP servers to merge with existing settings"},{name:"tryGpt5",long:"try-gpt5",type:"switch",default:!1,description:"Try GPT-5 as the primary agent model (limited time; see https://ampcode.com/news/gpt-5)"}],q3A=(A)=>("deprecated"in A)&&A.deprecated===!0,yL2=(A)=>("hidden"in A)&&A.hidden===!0,bL2=(A)=>("default"in A),gL2=(A)=>("default"in A)?A.default:void 0;function xL2(A,Q){let B=Q.args[0],J=Q.commands.map((z)=>z.name());if(B&&!B.includes(" ")&&B.length<30&&!/[./\\]/.test(B)){let z=J.filter((X)=>B.includes(X)||X.includes(B)),G="Run amp --help for a list of available commands.";if(z.length>0)G=`Did you mean: ${z.join(", ")}? Or run amp --help for all commands.`;throw new lB(gX.unknownCommand(B),1,G)}}function BK1(A){return{...A,getThreadEnvironment:VJA,createFileSystem:()=>bh,createFileChangeTrackerForThread:(Q)=>{let B=new gh(bh);return Bz0(B,bh,Q)},generateThreadTitle:z61,internalAPIClient:WK}}var Wa1=C6.file($L2.homedir()),F3A=process.env.XDG_CONFIG_HOME?C6.file(process.env.XDG_CONFIG_HOME):_6.joinPath(Wa1,".config");async function Ij(A,Q,B,J=!1){$t1("0.0.1755734500-g56e2f8"),_t1(Q.jetbrains);let D=AU1({storage:A.settings,secretStorage:A.secrets,workspaceRoots:YA.of([C6.file(process.cwd())]),defaultAmpURL:A.ampURL,defaultCacheDirectory:mp1,settingsOverrides:B,homeDir:Wa1,userConfigDir:F3A}),z=await rA(f2);M1.debug("Global configuration initialized",{hasCacheDirectory:!!z.settings.cacheDirectory,settingsKeys:Object.keys(z.settings)});let G=E11(ds()),X=P40({configService:D,toolService:G});if(process.env.AMP_TOOLBOX)jD0(G,bh,E01);try{await X.initialized}catch(V){M1.warn("Failed to wait for MCP servers, continuing anyway:",V)}if(Q.jetbrains)try{M1.debug("ide-client",{terminalEmulator:process.env.TERMINAL_EMULATOR}),await KK.start()}catch(V){let L=V instanceof Error?V.message:String(V);jD(`Failed to connect to JetBrains IDE: ${L}`)}let K=z.settings["experimental.reviewTool"]??!1,Y=z.settings["experimental.tools"]??[],q=!!process.env.JB_DIAGNOSTICS;H8A(G,!1,K,Y,q);let Z;if(!A.executeMode)Z=new JG1(process.cwd(),{},!0);else Z=new class extends JG1{async start(){}async query(){return[]}getStats(){return{state:"unstarted",stats:[]}}dispose(){}};if(!await A.secrets.get("apiKey",A.ampURL)){if(P4.write(`No API key found. Starting login flow...
5048
5048
  `),!await hL2(A))process.exit(1)}let H=gD0(),F=new NN1(H),E=new WN1(H),M=new kO1(F),W=Q.notifications!==void 0?Q.notifications:!A.executeMode,w=E8A({playNotificationSound:async(V)=>{if(W){if(F8A(V),!(J?bl1():jMA())&&z.settings["notifications.system.enabled"]!==!1){if(V==="idle")process.stdout.write("\x1B]777;notify;Amp;Agent is ready\x1B\\");else if(V==="requires-user-input")process.stdout.write("\x1B]777;notify;Amp;Waiting for approval\x1B\\")}}},windowFocused:()=>Promise.resolve(!1),threadService:F});M1.info("Starting Amp background services");let I=GE0({threadService:F,threadHistoryService:E,isExtensionDevelopment:!1}),N={configService:D,toolService:G,mcpService:X,threadService:F,threadHistoryService:E,threadSummaryService:M,threadSyncService:I,threadStorage:H,secretStorage:A.secrets,settingsStorage:A.settings,fuzzyServer:Z,notificationService:w};return{...N,async dispose(){await N.mcpService.dispose(),N.configService.unsubscribe(),N.toolService.dispose(),N.fuzzyServer.dispose(),N.threadSyncService.dispose(),N.settingsStorage[Symbol.dispose]()}}}async function hL2(A){if(!A.executeMode){if(await FG1("Would you like to log in to Amp?",["(y)es","(n)o"])!="y")return P4.write(`Login cancelled. Run the command again to retry.
5049
5049
  `),!1}return await E3A(A)}async function E3A(A){let Q=RL2(32).toString("hex"),B=await zMA(A.ampURL,Q);P4.write(`If your browser doesn't open automatically, visit:
5050
5050
 
@@ -5058,7 +5058,7 @@ ${J0.blue.bold(B)}
5058
5058
  Login successful! You can now use the Amp CLI.
5059
5059
  `),!0}catch(J){return B7.write(`
5060
5060
  Login failed: ${J instanceof Error?J.message:String(J)}
5061
- `),!1}}function mL2(A){let Q=A.outputHelp.bind(A);A.outputHelp=function(B){let J="",D=this.configureOutput();if(this.configureOutput({writeOut:(z)=>{J+=z},writeErr:(z)=>{J+=z}}),typeof B==="function")B(J);else Q(B);this.configureOutput(D),YMA(J)}}function M3A(A){mL2(A);for(let Q of A.commands)M3A(Q)}function uL2(){let A=new bJ1().name("amp").description("AI-powered coding assistant").option("--visibility <visibility>","Set thread visibility (private, public, team)").configureOutput({writeErr:()=>{}});A.exitOverride((X)=>{if(X.code==="commander.help"||X.code==="commander.version"||X.exitCode===0)Lf(),process.exit(0);let K=X.originalError??X;ka(K)}),A.option("-V, --version","output the version number",()=>{P4.write(`0.0.1755734404-g56e2f8 (released 2025-08-21T00:05:12.762Z)
5061
+ `),!1}}function mL2(A){let Q=A.outputHelp.bind(A);A.outputHelp=function(B){let J="",D=this.configureOutput();if(this.configureOutput({writeOut:(z)=>{J+=z},writeErr:(z)=>{J+=z}}),typeof B==="function")B(J);else Q(B);this.configureOutput(D),YMA(J)}}function M3A(A){mL2(A);for(let Q of A.commands)M3A(Q)}function uL2(){let A=new bJ1().name("amp").description("AI-powered coding assistant").option("--visibility <visibility>","Set thread visibility (private, public, team)").configureOutput({writeErr:()=>{}});A.exitOverride((X)=>{if(X.code==="commander.help"||X.code==="commander.version"||X.exitCode===0)Lf(),process.exit(0);let K=X.originalError??X;ka(K)}),A.option("-V, --version","output the version number",()=>{P4.write(`0.0.1755734500-g56e2f8 (released 2025-08-21T00:06:05.482Z)
5062
5062
  `),process.exit(0)}),A.addHelpText("after",QMA()),A.configureHelp({formatHelp:BMA}),A.command("logout").description("Log out by removing stored API key").action(async(X,K)=>{let Y=K.optsWithGlobals(),q=await xZ(Y);await dL2(q)}),A.command("login").description("Log in to Amp").addHelpText("after","If AMP_URL is set during login, it will be persisted to global settings for future CLI invocations, though AMP_URL will continue to take precedence.").action(async(X,K)=>{let Y=K.optsWithGlobals(),q=await xZ(Y);await lL2(q)});let Q=A.command("threads").alias("t").summary("Manage threads").description("Thread management commands. When no subcommand is provided, defaults to listing threads.").action(async(X,K)=>{let Y=K.optsWithGlobals(),q=await xZ(Y);await U3A(Y,q,K)});Q.command("new").alias("n").summary("Create a new thread").description("Create a new thread and print its ID. The thread will be empty. You can set the visibility using the --visibility option.").option("--visibility <visibility>","Set thread visibility (private, public, team)").action(async(X,K)=>{let Y=K.optsWithGlobals(),q=await xZ(Y);await oL2(Y,q,K)}),Q.command("continue [threadId]").alias("c").summary("Continue an existing thread").description("Continue an existing thread by resuming the conversation. If no thread ID is provided, the most recently used thread will be continued.").option("--pick","Pick a thread interactively from a list").action(async(X,K,Y)=>{let q=Y.optsWithGlobals(),Z=await xZ(q);if(K.pick){AU1({storage:Z.settings,secretStorage:Z.secrets,workspaceRoots:YA.of([C6.file(process.cwd())]),defaultAmpURL:Z.ampURL,homeDir:Wa1,userConfigDir:F3A});let H=await tL2();if(H)await Z3A(q,Z,H,Y);else process.exit(0)}else await Z3A(q,Z,X,Y)}),Q.command("fork [threadId]").alias("f").summary("Fork an existing thread").description("Create a new thread by forking an existing one. This copies the conversation history up to the current point and creates a new thread where you can explore different directions. If no thread ID is provided, the most recently used thread will be forked.").action(async(X,K,Y)=>{let q=Y.optsWithGlobals(),Z=await xZ(q);await sL2(q,Z,X,Y)}),Q.command("list").alias("l").summary("List all threads").description("List all your threads with their IDs, names, and last modified times.").action(async(X,K)=>{let Y=K.optsWithGlobals(),q=await xZ(Y);await U3A(Y,q,K)}),Q.command("share <threadId>").summary("Share a thread").description("Change thread visibility (private, public, team) or share with Amp support for debugging. Use --visibility to change who can access the thread, or --support to share with the Amp team for troubleshooting.").alias("s").option("--visibility <visibility>","Set thread visibility (private, public, team)").option("--support","Share thread with Amp support for debugging").action(async(X,K,Y)=>{let q=Y.optsWithGlobals(),Z=await xZ(q);await nL2(q,Z,X,Y,K.support)}),Q.command("compact <threadId>").alias("co").summary("Compact a thread").description("Compact a thread by creating a summary of the conversation history. This reduces the thread size while preserving the key information and context, making it more token efficient for future use.").action(async(X,K,Y)=>{let q=Y.optsWithGlobals(),Z=await xZ(q);await rL2(q,Z,X,Y)}),CMA(A,async(X,K)=>{let Y=await xZ(K),q=wj(X,K),Z=await Ij(Y,K,q,!1);return{context:Y,mcpService:Z.mcpService,toolService:Z.toolService,cleanupTerminal:Lf,dispose:Z.dispose.bind(Z)}}),MMA(A);function B(X,K,Y){let Z=typeof X.description==="string"?X.description:Y===void 0?X.description(!0):X.description(Y),H=new gJ1(K,Z),F=gL2(X);if(F)H.default(F);return H.hidden=yL2(X)||q3A(X),H}for(let X of Y3A)switch(X.type){case"flag":{A.addOption(B(X,`--${X.long}`)),A.addOption(B(X,`--no-${X.long}`,!1));break}case"switch":{A.addOption(B(X,`--${X.long}`,!0));break}default:{A.addOption(B(X,`--${X.long} <value>`));break}}let J=new gJ1("-x, --execute [message]","Use execute mode, optionally with user message. In execute mode, agent will execute provided prompt (either as argument, or via stdin). Only last assistant message is printed. Enabled automatically when redirecting stdout.").default(!1);A.addOption(J);let D=new gJ1("--tui","Launch experimental TUI interface").hideHelp();A.addOption(D),A.action(async(X,K)=>{let Y=X,q=await xZ(Y);if(Object.keys(Y).forEach((Z)=>{if(Z==="format"&&X.format==="jsonl"){B7.write(J0.yellow(`jsonl format is deprecated. Version "0.0.1753194394-g45962a" is required to use jsonl format.
5063
5063
  `));return}let H=Y3A.find((F)=>F.name===Z);if(H&&q3A(H)&&!bL2(H))B7.write(J0.yellow(`Warning: '--${Z}' flag is deprecated
5064
5064
  `))}),K.args.length>0)xL2(q,K);await W3A(q,Y,K)});let z=new bJ1("doctor").summary("Generate support bundle").description("Generate a support bundle for troubleshooting issues. This collects logs, configuration, and system information into a file that can be shared with Amp support for debugging.").option("--output-dir <path>","Directory to save the support bundle",process.cwd()).option("--include-full-logs","Include full log history",!1).allowUnknownOption(!1).action(async(X)=>{await aL2(X.outputDir,X.includeFullLogs)});A.addCommand(z);let G=new bJ1("update").summary("Update Amp CLI").description("Update Amp CLI to the latest version. You can specify a particular version to install, or leave blank to get the latest stable release.").option("--version <version>","Update to a specific version").allowUnknownOption(!1).action(async(X)=>{await iL2(X.version)});return A.addCommand(G),M3A(A),A}async function QK1(A,Q,B){let{thread:J,visibility:D}=B,z=J?.id??gF(),G=BK1(Q);if(J)await Q.threadStorage.set(z,J);let X=await sD.getOrCreateForThread(G,z);if(D)await Q.threadSyncService.updateThreadMeta(z,YG1(D));let K=Q.threadService.observe(z).subscribe(async(q)=>{if(VQ(q,"assistant"))await Ma1(z),K.unsubscribe()});await X.resume();let Y=await rA(f2);if(vO0(X.thread))await SO0(X.thread);return X}async function W3A(A,Q,B){let J=process.stdin,D=KG1(Q);if(D instanceof Error)jD(D.message);let z,G=null;if(typeof Q.execute==="string"){z=Q.execute;let W=(await Sl1()).trimEnd();if(W)G=W}else z=(await Sl1()).trimEnd();if(A.executeMode&&z==="")throw new lB("User message must be provided through stdin or as argument when using execute mode",1,`Either pass a message as an argument: amp -x "your message"
@@ -5078,7 +5078,7 @@ Or pipe via stdin: echo "your message" | amp -x`);if(z!==""&&!A.executeMode&&typ
5078
5078
  `);process.exit(0)}async function iL2(A){try{if(A)B7.write(J0.blue(`Updating to version ${A}...
5079
5079
  `)),await Pd1(A),B7.write(J0.green(`✓ Successfully updated to version ${A}
5080
5080
  `));else{B7.write(J0.blue(`Checking for updates...
5081
- `));let Q=await V01("0.0.1755734404-g56e2f8");if(!Q.hasUpdate)B7.write(J0.green(`✓ Amp CLI is already up to date.
5081
+ `));let Q=await V01("0.0.1755734500-g56e2f8");if(!Q.hasUpdate)B7.write(J0.green(`✓ Amp CLI is already up to date.
5082
5082
  `)),process.exit(0);B7.write(J0.blue(`Updating to version ${Q.latestVersion}...
5083
5083
  `)),await Pd1(Q.latestVersion),B7.write(J0.green(`✓ Successfully updated to version ${Q.latestVersion}
5084
5084
  `))}process.exit(0)}catch(Q){jD(Q instanceof Error?Q.message:String(Q))}}async function aL2(A,Q){try{B7.write(J0.green("Generating Amp support bundle...")+`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sourcegraph/amp",
3
- "version": "0.0.1755734404-g56e2f8",
3
+ "version": "0.0.1755734500-g56e2f8",
4
4
  "description": "CLI for Amp, an agentic coding tool in research preview from Sourcegraph.",
5
5
  "homepage": "https://ampcode.com/",
6
6
  "author": {