@yunhozz/arc 0.1.9 → 0.2.0

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 (118) hide show
  1. package/MANIFEST.sha256 +109 -75
  2. package/README.md +19 -31
  3. package/claude/agents/{arc-coder.md → arc-implementer.md} +7 -7
  4. package/claude/agents/arc-planner.md +4 -4
  5. package/claude/agents/arc-qa.md +4 -4
  6. package/claude/agents/arc-reviewer.md +5 -5
  7. package/claude/agents/arc-scouter.md +3 -3
  8. package/claude/skill/SKILL.md +7 -7
  9. package/claude/skill/models.toml +3 -3
  10. package/claude/skill/references/commit.md +22 -7
  11. package/claude/skill/references/coordination.md +25 -18
  12. package/claude/skill/references/git-recovery.md +1 -1
  13. package/claude/skill/references/handoff-prep.md +25 -2
  14. package/claude/skill/references/handoff.md +116 -24
  15. package/claude/skill/references/planning.md +78 -22
  16. package/claude/skill/references/verification.md +155 -17
  17. package/claude/skill/runtime/acceptance.mjs +68 -0
  18. package/claude/skill/runtime/assignment.mjs +42 -0
  19. package/claude/skill/runtime/bootstrap.mjs +35 -0
  20. package/claude/skill/runtime/cli.mjs +8 -0
  21. package/claude/skill/runtime/command.mjs +21 -0
  22. package/claude/skill/runtime/cooperative-schema.mjs +55 -0
  23. package/claude/skill/runtime/cooperative.mjs +136 -0
  24. package/claude/skill/runtime/evaluate.mjs +40 -4
  25. package/claude/skill/runtime/external.mjs +51 -0
  26. package/claude/skill/runtime/gate.mjs +7 -7
  27. package/claude/skill/runtime/git-evidence.mjs +46 -0
  28. package/claude/skill/runtime/operations.mjs +2 -2
  29. package/claude/skill/runtime/role-policy.json +64 -19
  30. package/claude/skill/runtime/schema.mjs +1 -0
  31. package/claude/skill/runtime/scope.mjs +36 -0
  32. package/claude/skill/runtime/store.mjs +25 -4
  33. package/claude/skill/runtime/verification.mjs +123 -0
  34. package/claude/skill/scripts/model_config.py +2 -2
  35. package/codex/agents/{arc-coder.toml → arc-implementer.toml} +8 -8
  36. package/codex/agents/arc-planner.toml +6 -6
  37. package/codex/agents/arc-qa.toml +6 -6
  38. package/codex/agents/arc-reviewer.toml +6 -6
  39. package/codex/agents/arc-scouter.toml +5 -5
  40. package/codex/skill/SKILL.md +9 -9
  41. package/codex/skill/models.toml +3 -3
  42. package/codex/skill/references/commit.md +23 -8
  43. package/codex/skill/references/coordination.md +25 -18
  44. package/codex/skill/references/git-recovery.md +2 -2
  45. package/codex/skill/references/handoff-prep.md +25 -2
  46. package/codex/skill/references/handoff-worktree.md +4 -4
  47. package/codex/skill/references/handoff.md +126 -34
  48. package/codex/skill/references/planning.md +81 -23
  49. package/codex/skill/references/verification.md +160 -22
  50. package/codex/skill/runtime/acceptance.mjs +68 -0
  51. package/codex/skill/runtime/assignment.mjs +42 -0
  52. package/codex/skill/runtime/bootstrap.mjs +35 -0
  53. package/codex/skill/runtime/cli.mjs +8 -0
  54. package/codex/skill/runtime/command.mjs +21 -0
  55. package/codex/skill/runtime/cooperative-schema.mjs +55 -0
  56. package/codex/skill/runtime/cooperative.mjs +136 -0
  57. package/codex/skill/runtime/evaluate.mjs +40 -4
  58. package/codex/skill/runtime/external.mjs +51 -0
  59. package/codex/skill/runtime/gate.mjs +7 -7
  60. package/codex/skill/runtime/git-evidence.mjs +46 -0
  61. package/codex/skill/runtime/operations.mjs +2 -2
  62. package/codex/skill/runtime/role-policy.json +64 -19
  63. package/codex/skill/runtime/schema.mjs +1 -0
  64. package/codex/skill/runtime/scope.mjs +36 -0
  65. package/codex/skill/runtime/store.mjs +25 -4
  66. package/codex/skill/runtime/verification.mjs +123 -0
  67. package/codex/skill/scripts/model_config.py +3 -3
  68. package/lib/cli/postinstall.mjs +3 -16
  69. package/lib/cli/root.mjs +8 -18
  70. package/lib/cli/upgrade.mjs +1 -57
  71. package/lib/installer/manifest.mjs +7 -2
  72. package/lib/installer/plan.mjs +27 -13
  73. package/lib/installer/runtime-assets.mjs +25 -0
  74. package/lib/installer/shell-completion.mjs +15 -20
  75. package/lib/installer/targets.mjs +1 -1
  76. package/lib/installer/uninstall.mjs +5 -1
  77. package/lib/installer/upgrade-state.mjs +2 -2
  78. package/lib/installer/upgrade.mjs +2 -5
  79. package/lib/management/operations.mjs +39 -0
  80. package/lib/management/status.mjs +18 -0
  81. package/lib/management/update.mjs +58 -0
  82. package/lib/management/workflow.mjs +51 -0
  83. package/lib/models/config.mjs +1 -1
  84. package/lib/models/profiles.mjs +1 -1
  85. package/lib/policy/placement.mjs +6 -6
  86. package/lib/policy/render.mjs +3 -3
  87. package/lib/policy/role-policy.json +64 -19
  88. package/lib/release/artifact.mjs +1 -1
  89. package/lib/runtime/acceptance.mjs +68 -0
  90. package/lib/runtime/assignment.mjs +42 -0
  91. package/lib/runtime/bootstrap.mjs +35 -0
  92. package/lib/runtime/cli.mjs +8 -0
  93. package/lib/runtime/command.mjs +21 -0
  94. package/lib/runtime/cooperative-schema.mjs +55 -0
  95. package/lib/runtime/cooperative.mjs +136 -0
  96. package/lib/runtime/evaluate.mjs +40 -4
  97. package/lib/runtime/external.mjs +51 -0
  98. package/lib/runtime/gate.mjs +7 -7
  99. package/lib/runtime/git-evidence.mjs +46 -0
  100. package/lib/runtime/operations.mjs +2 -2
  101. package/lib/runtime/schema.mjs +1 -0
  102. package/lib/runtime/scope.mjs +36 -0
  103. package/lib/runtime/store.mjs +25 -4
  104. package/lib/runtime/verification.mjs +123 -0
  105. package/lib/tui/app.mjs +41 -0
  106. package/lib/tui/render.mjs +21 -0
  107. package/lib/tui/setup.mjs +20 -0
  108. package/lib/tui/terminal.mjs +71 -0
  109. package/lib/tui/workflow.mjs +12 -0
  110. package/package.json +1 -1
  111. package/scripts/postinstall.mjs +1 -3
  112. package/scripts/update-runtime-assets.mjs +6 -1
  113. package/lib/cli/choices.mjs +0 -47
  114. package/lib/cli/completion.mjs +0 -55
  115. package/lib/cli/index.mjs +0 -55
  116. package/lib/cli/preset.mjs +0 -29
  117. package/lib/cli/terminal.mjs +0 -19
  118. package/lib/cli/uninstall.mjs +0 -17
package/lib/cli/index.mjs DELETED
@@ -1,55 +0,0 @@
1
- import fs from 'node:fs';
2
- import os from 'node:os';
3
- import path from 'node:path';
4
- import {fileURLToPath} from 'node:url';
5
- const packageRoot=fileURLToPath(new URL('../../',import.meta.url));
6
- import{parsePositiveLimit}from'../limits.mjs';
7
- const usage='Usage: arc --target <claude|codex|all> --preset <economy|balanced|smart> --language <en|ko>\n [--max-total-subagents <count>] [--max-concurrent-subagents <count>]\n [--check | --dry-run] [--skip-global] [--help] [--version]\n --max-total-subagents: positive integer (default: 100)\n --max-concurrent-subagents: positive integer (default: 5)';
8
- function inputError(message){return Object.assign(new Error(message),{code:'ARC_CLI_INPUT'});}
9
- function cancelled(){return Object.assign(new Error('Installation cancelled.'),{code:'ARC_CANCELLED'});}
10
- export function parseArgs(args){
11
- const options={},seen=new Set();const names={'--max-total-subagents':'maxTotalSubagents','--max-concurrent-subagents':'maxConcurrentSubagents','--target':'target','--preset':'preset','--language':'language','--skip-global':'skipGlobal','--check':'check','--dry-run':'dryRun','--help':'help','--version':'version'};
12
- for(let i=0;i<args.length;i++){const flag=args[i],key=Object.hasOwn(names,flag)?names[flag]:undefined;if(!key)throw inputError(`Unknown argument: ${flag}`);if(seen.has(flag))throw inputError(`Duplicate argument: ${flag}`);seen.add(flag);if(key==='maxTotalSubagents'||key==='maxConcurrentSubagents'){try{options[key]=parsePositiveLimit(args[++i],flag);}catch(cause){throw inputError(cause.message);}}else if(key==='target'||key==='preset'||key==='language'){const value=args[++i],allowed=key==='target'?['claude','codex','all']:key==='preset'?['economy','balanced','smart']:['en','ko'];if(!allowed.includes(value))throw inputError(`Invalid ${key}: ${value??'missing value'}`);options[key]=value;}else options[key]=true;}
13
- if(options.check&&options.dryRun)throw inputError('--check and --dry-run cannot be combined');return options;
14
- }
15
- export async function selectChoices(options,io){return(await import('./choices.mjs')).selectChoices(options,io);}
16
- export async function runCli(args=process.argv.slice(2),{input=process.stdin,output=process.stdout,error=process.stderr,cwd=process.cwd(),env=process.env}={}){
17
- let controller,onInterrupt,progress;
18
- try{
19
- const options=parseArgs(args);if(options.help){output.write(usage+'\n');return 0;}if(options.version){output.write(JSON.parse(fs.readFileSync(path.join(packageRoot,'package.json'))).version+'\n');return 0;}
20
- if((!input.isTTY||!output.isTTY)&&(!options.target||!options.preset||!options.language))throw inputError('Non-interactive execution requires --target, --preset and --language');
21
- await selectChoices(options,{input,output});
22
- const {startProgress}=await import('./progress.mjs');
23
- const interactive=input.isTTY&&output.isTTY,label=options.check?'Checking ARC…':options.dryRun?'Preparing ARC dry run…':'Installing ARC…';
24
- if(!interactive)progress=startProgress({output,label});
25
- controller=new AbortController();onInterrupt=()=>controller.abort();process.once('SIGINT',onInterrupt);process.once('SIGTERM',onInterrupt);
26
- const {loadNative}=await import('../safe-fs/native.mjs');const native=loadNative();
27
- const [{openRoot},{verifyPayload},{resolveTarget},{buildInstallPlan,validatePlanSet}]=await Promise.all([import('../safe-fs/index.mjs'),import('../installer/manifest.mjs'),import('../installer/targets.mjs'),import('../installer/plan.mjs')]);
28
- const safeFs={openRoot:p=>openRoot(p,{native})},payload=verifyPayload({packageRoot,safeFs});
29
- const platforms=options.target==='all'?['codex','claude']:[options.target];
30
- const {previewLimits,previewLanguage}=await import('../installer/plan.mjs');const{defaultLanguage}=await import('../installer/language.mjs');const selections=platforms.map(platform=>{const target=resolveTarget(platform,{userHome:os.homedir(),env,cwd});return{target,preview:previewLimits({target,safeFs}),languagePreview:previewLanguage({target,safeFs})};});
31
- if(interactive){const{selectLimits,selectLanguage}=await import('./choices.mjs');await selectLimits(options,selections,{input,output});await selectLanguage(options,defaultLanguage(selections.map(item=>item.languagePreview.existing)),{input,output});}
32
- progress??=startProgress({output,label});
33
- const plans=selections.map(({target,preview,languagePreview})=>buildInstallPlan({payload,target,language:options.language,languagePreview,preset:options.preset,skipGlobal:options.skipGlobal,safeFs,limitsPreview:preview,limits:{...(options.maxTotalSubagents===undefined?{}:{max_total_subagents:options.maxTotalSubagents}),...(options.maxConcurrentSubagents===undefined?{}:{max_concurrent_subagents:options.maxConcurrentSubagents})},concurrentExplicit:options.maxConcurrentSubagents!==undefined||Boolean(options.concurrentSelected)}));const {attachShellCompletion}=await import('../installer/shell-completion.mjs');attachShellCompletion(plans,{safeFs});validatePlanSet(plans);
34
- const languageLabel=options.language==='ko'?'한국어':'English';
35
- progress.write(`Install: ${platforms.join('/')} · ${options.preset} · ${languageLabel}\n`);
36
- for(const plan of plans)progress.write(`${plan.target.platform}: ${plan.target.home} · total ${plan.limits.max_total_subagents} · concurrent ${plan.limits.max_concurrent_subagents}\n`);
37
- if(options.skipGlobal)progress.write('Global settings: skipped\n');
38
- else progress.write('zsh completion: eval "$(arc completion zsh)" for this session\n');
39
- if(plans.some(plan=>plan.limits.max_concurrent_subagents>plan.limits.max_total_subagents))progress.write(`Note: fresh ARC sessions cap concurrency at ${Math.min(...plans.map(plan=>plan.limits.max_total_subagents))}.\n`);
40
- if(options.dryRun)for(const plan of plans){
41
- for(const name of plan.generated.skill.keys())progress.write(`Would write file: ${path.join(plan.target.home,'skills/arc',name)}\n`);
42
- for(const name of plan.generated.profiles.keys())progress.write(`Would write file: ${path.join(plan.target.home,'agents',name)}\n`);
43
- for(const change of plan.globalChanges)progress.write(`Would update global file: ${change.path}\n`);
44
- }
45
- if(options.check||options.dryRun){progress.stop();output.write(options.check?'Check completed. No changes made.\n':'Dry run completed. No changes made.\n');return 0;}
46
- const [{installTargets},{acquireExternalSkills}]=await Promise.all([import('../installer/install.mjs'),import('../installer/acquisition.mjs')]);
47
- const result=await installTargets(plans,{safeFs,signal:controller.signal,acquisition:async()=>{const work=fs.mkdtempSync(path.join(fs.realpathSync(os.tmpdir()),'arc-acquire-'));const acquired=await acquireExternalSkills({work,safeFs,signal:controller.signal});const dispose=acquired.dispose;return{...acquired,dispose:async()=>{await dispose();fs.rmdirSync(work);}};}});
48
- progress.stop();
49
- const reportResults=()=>{for(const item of result.results){output.write(`${item.platform}: ${item.status}; rollback: ${item.rollback}\n`);for(const recovery of item.residualPaths)output.write(`Residual path: ${recovery}\n`);if(item.error)error.write(`Error: ${item.error.message}\n`);}};
50
- if(result.interrupted){reportResults();return 130;}
51
- if(result.results.every(item=>item.status==='installed'&&!item.error)){output.write(`ARC version ${JSON.parse(fs.readFileSync(path.join(packageRoot,'package.json'))).version} installed! [${result.results.map(item=>item.platform).join('/')}]\n`);return 0;}
52
- reportResults();return 1;
53
- }catch(cause){progress?.stop();error.write(`Error: ${cause.message}\n`);if(cause.code==='ARC_CLI_INPUT'){error.write(usage+'\n');return 2;}if(cause.code==='ARC_CANCELLED')return 130;return ['ARC_UNSUPPORTED_RUNTIME','ARC_NATIVE_UNAVAILABLE','ARC_TARGET_CONFIGURATION'].includes(cause.code)?2:1;
54
- }finally{progress?.stop();if(onInterrupt){process.removeListener('SIGINT',onInterrupt);process.removeListener('SIGTERM',onInterrupt);}}
55
- }
@@ -1,29 +0,0 @@
1
- import os from 'node:os';
2
- import {validatePlanSet} from '../installer/plan.mjs';
3
- import {selectChoices} from './choices.mjs';
4
- const usage='Usage: arc preset [economy|balanced|smart] --target <codex|claude|all> [--check | --dry-run] [--help]';
5
- const inputError=message=>Object.assign(new Error(message),{code:'ARC_CLI_INPUT'});
6
- export function parseArgs(args){
7
- const options={},seen=new Set();
8
- for(let i=0;i<args.length;i++){
9
- const arg=args[i];if(['economy','balanced','smart'].includes(arg)){if(options.preset)throw inputError('Duplicate preset');options.preset=arg;continue;}
10
- if(!['--target','--check','--dry-run','--help'].includes(arg))throw inputError(`Unknown argument: ${arg}`);if(seen.has(arg))throw inputError(`Duplicate argument: ${arg}`);seen.add(arg);
11
- if(arg==='--target'){const value=args[++i];if(!['codex','claude','all'].includes(value))throw inputError('Invalid target');options.target=value;}else options[arg==='--dry-run'?'dryRun':arg.slice(2)]=true;
12
- }
13
- if(options.check&&options.dryRun)throw inputError('--check and --dry-run cannot be combined');return options;
14
- }
15
- export async function runCli(args=process.argv.slice(2),{input=process.stdin,output=process.stdout,error=process.stderr}={}){
16
- let onInterrupt;
17
- try{
18
- const options=parseArgs(args);if(options.help){output.write(usage+'\n');return 0;}
19
- await selectChoices(options,{input,output});
20
- const[{loadNative},{openRoot},{resolveTarget},{buildPresetPlan,switchPresetTargets}]=await Promise.all([import('../safe-fs/native.mjs'),import('../safe-fs/index.mjs'),import('../installer/targets.mjs'),import('../installer/preset.mjs')]);
21
- const native=loadNative(),safeFs={openRoot:p=>openRoot(p,{native})};
22
- const plans=(options.target==='all'?['codex','claude']:[options.target]).map(platform=>buildPresetPlan({target:resolveTarget(platform,{userHome:os.homedir(),env:process.env}),preset:options.preset,safeFs}));
23
- validatePlanSet(plans);
24
- if(options.check||options.dryRun){for(const plan of plans){output.write(`${plan.target.platform}: ${plan.specs.length} file(s) would change\n`);if(options.dryRun)for(const spec of plan.specs)output.write(`Would write: ${spec.path}\n`);}output.write('Check completed. No changes made.\n');return 0;}
25
- const controller=new AbortController();onInterrupt=()=>controller.abort();process.once('SIGINT',onInterrupt);const result=await switchPresetTargets(plans,{safeFs,signal:controller.signal});
26
- for(const item of result.results){output.write(`${item.platform}: ${item.status}; rollback: ${item.rollback}\n`);for(const name of item.residualPaths)output.write(`Residual path: ${name}\n`);if(item.error)error.write(`Error: ${item.error.message}\n`);}
27
- output.write('Open a new session to use the selected preset.\n');return result.interrupted?130:result.results.every(item=>['updated','unchanged'].includes(item.status)&&!item.error)?0:1;
28
- }catch(cause){error.write(`Error: ${cause.message}\n`);if(cause.code==='ARC_CLI_INPUT'){error.write(usage+'\n');return 2;}return cause.code==='ARC_CANCELLED'?130:['ARC_UNSUPPORTED_RUNTIME','ARC_NATIVE_UNAVAILABLE','ARC_TARGET_CONFIGURATION'].includes(cause.code)?2:1;}finally{if(onInterrupt)process.removeListener('SIGINT',onInterrupt);}
29
- }
@@ -1,19 +0,0 @@
1
- import fs from 'node:fs';
2
- import tty from 'node:tty';
3
- function openControllingTerminal(){
4
- let inputFd,outputFd,input,output;
5
- try{
6
- inputFd=fs.openSync('/dev/tty','r+');outputFd=fs.openSync('/dev/tty','r+');
7
- input=new tty.ReadStream(inputFd);inputFd=undefined;
8
- output=new tty.WriteStream(outputFd);outputFd=undefined;
9
- return{io:{input,output,error:output},dispose(){input.destroy();output.destroy();}};
10
- }catch(cause){input?.destroy();output?.destroy();if(inputFd!==undefined)fs.closeSync(inputFd);if(outputFd!==undefined)fs.closeSync(outputFd);throw cause;}
11
- }
12
- export function openInstallerTerminal({platform=process.platform,env=process.env,input=process.stdin,output=process.stdout,error=process.stderr,openTty=openControllingTerminal}={}){
13
- if(!['darwin','linux'].includes(platform))return{kind:'skip',reason:'unsupported platform'};
14
- if(['CI','CONTINUOUS_INTEGRATION','BUILD_NUMBER','RUN_ID'].some(name=>env[name]&&env[name]!=='false'&&env[name]!=='0'))return{kind:'skip',reason:'non-interactive environment'};
15
- let owned,io;
16
- try{if(input.isTTY&&output.isTTY)io={input,output,error};else{owned=openTty();io=owned.io;}if(!io.input.isTTY||!io.output.isTTY)throw Error('Terminal is not interactive');}catch{owned?.dispose();return{kind:'skip',reason:'no interactive terminal'};}
17
- const wasRaw=Boolean(io.input.isRaw),wasFlowing=io.input.readableFlowing;let disposed=false;
18
- return{kind:'interactive',io,dispose(){if(disposed)return;disposed=true;try{if(io.input.setRawMode&&!io.input.destroyed)io.input.setRawMode(wasRaw);if(wasFlowing!==true)io.input.pause();}finally{owned?.dispose();}}};
19
- }
@@ -1,17 +0,0 @@
1
- import fs from 'node:fs';import os from 'node:os';import path from 'node:path';import {fileURLToPath} from 'node:url';
2
- const packageRoot=fileURLToPath(new URL('../../',import.meta.url));
3
- const usage='Usage: arc uninstall [--target <claude|codex|all>] [--dry-run] [--skip-global] [--help] [--version]';
4
- function inputError(message){return Object.assign(new Error(message),{code:'ARC_CLI_INPUT'});}
5
- export function parseArgs(args){const options={},seen=new Set(),names={'--target':'target','--dry-run':'dryRun','--skip-global':'skipGlobal','--help':'help','--version':'version'};for(let i=0;i<args.length;i++){const flag=args[i],key=Object.hasOwn(names,flag)?names[flag]:undefined;if(!key)throw inputError(`Unknown argument: ${flag}`);if(seen.has(flag))throw inputError(`Duplicate argument: ${flag}`);seen.add(flag);if(key==='target'){const value=args[++i];if(!['claude','codex','all'].includes(value))throw inputError(`Invalid target: ${value??'missing value'}`);options.target=value;}else options[key]=true;}return options;}
6
- export async function selectTarget(options,io={}){return(await import('./choices.mjs')).selectChoices(options,{...io,targetOnly:true});}
7
- export async function runCli(args=process.argv.slice(2),{input=process.stdin,output=process.stdout,error=process.stderr}={}){
8
- let onInterrupt;
9
- try{const options=parseArgs(args);if(options.help){output.write(usage+'\n');return 0;}if(options.version){output.write(JSON.parse(fs.readFileSync(path.join(packageRoot,'package.json'))).version+'\n');return 0;}
10
- if(!options.target&&(!input.isTTY||!output.isTTY))throw inputError('Non-interactive execution requires --target');await selectTarget(options,{input,output});
11
- const [{loadNative},{openRoot},{resolveTarget},{buildUninstallPlan,uninstallTargets}]=await Promise.all([import('../safe-fs/native.mjs'),import('../safe-fs/index.mjs'),import('../installer/targets.mjs'),import('../installer/uninstall.mjs')]);const native=loadNative(),safeFs={openRoot:p=>openRoot(p,{native})};
12
- const plans=(options.target==='all'?['codex','claude']:[options.target]).map(platform=>buildUninstallPlan({target:resolveTarget(platform,{userHome:os.homedir(),env:process.env}),safeFs,skipGlobal:options.skipGlobal}));
13
- for(const plan of plans){output.write(`${plan.target.platform}: ${plan.target.home}\n`);for(const note of plan.summary)output.write(note+'\n');if(options.dryRun){for(const name of plan.removals)output.write(`Would remove: ${name}\n`);for(const change of plan.globalChanges)output.write(`Would remove managed block: ${change.path}\n`);}}
14
- if(options.dryRun){output.write('Dry run completed. No changes made.\n');return 0;}
15
- const controller=new AbortController();onInterrupt=()=>controller.abort();process.once('SIGINT',onInterrupt);const result=await uninstallTargets(plans,{safeFs,signal:controller.signal});for(const item of result.results){output.write(`${item.platform}: ${item.status}; rollback: ${item.rollback}\n`);for(const name of item.residualPaths)output.write(`Residual path: ${name}\n`);if(item.error)error.write(`Error: ${item.error.message}\n`);}return result.interrupted?130:result.results.every(item=>item.status==='uninstalled'&&!item.error)?0:1;
16
- }catch(cause){error.write(`Error: ${cause.message}\n`);if(cause.code==='ARC_CANCELLED')return 130;if(cause.code==='ARC_CLI_INPUT'){error.write(usage+'\n');return 2;}return ['ARC_UNSUPPORTED_RUNTIME','ARC_NATIVE_UNAVAILABLE','ARC_TARGET_CONFIGURATION'].includes(cause.code)?2:1;}finally{if(onInterrupt)process.removeListener('SIGINT',onInterrupt);}
17
- }