@yunhozz/arc 0.1.10 → 0.2.1
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/MANIFEST.sha256 +59 -50
- package/README.md +17 -49
- package/claude/agents/arc-implementer.md +4 -2
- package/claude/agents/arc-planner.md +2 -2
- package/claude/agents/arc-qa.md +3 -3
- package/claude/agents/arc-reviewer.md +2 -2
- package/claude/agents/arc-scouter.md +2 -2
- package/claude/skill/SKILL.md +3 -1
- package/claude/skill/references/commit.md +1 -1
- package/claude/skill/references/coordination.md +6 -2
- package/claude/skill/references/handoff-prep.md +5 -1
- package/claude/skill/references/handoff.md +23 -2
- package/claude/skill/references/planning.md +11 -2
- package/claude/skill/references/verification.md +6 -0
- package/claude/skill/references/visual-companion.md +6 -0
- package/claude/skill/runtime/bootstrap.mjs +1 -1
- package/claude/skill/runtime/cli.mjs +8 -0
- package/{lib/cli/workflow.mjs → claude/skill/runtime/command.mjs} +4 -4
- package/codex/agents/arc-implementer.toml +5 -2
- package/codex/agents/arc-planner.toml +2 -2
- package/codex/agents/arc-qa.toml +3 -3
- package/codex/agents/arc-reviewer.toml +2 -2
- package/codex/agents/arc-scouter.toml +2 -2
- package/codex/skill/SKILL.md +3 -1
- package/codex/skill/references/commit.md +1 -1
- package/codex/skill/references/coordination.md +6 -2
- package/codex/skill/references/handoff-prep.md +5 -1
- package/codex/skill/references/handoff.md +22 -2
- package/codex/skill/references/planning.md +11 -2
- package/codex/skill/references/verification.md +6 -0
- package/codex/skill/references/visual-companion.md +6 -0
- package/codex/skill/runtime/bootstrap.mjs +1 -1
- package/codex/skill/runtime/cli.mjs +8 -0
- package/codex/skill/runtime/command.mjs +21 -0
- package/lib/cli/postinstall.mjs +3 -16
- package/lib/cli/root.mjs +8 -19
- package/lib/cli/upgrade.mjs +1 -57
- package/lib/installer/manifest.mjs +6 -1
- package/lib/installer/runtime-assets.mjs +25 -0
- package/lib/installer/shell-completion.mjs +15 -20
- package/lib/installer/uninstall.mjs +5 -1
- package/lib/installer/upgrade-state.mjs +2 -2
- package/lib/installer/upgrade.mjs +2 -5
- package/lib/management/operations.mjs +39 -0
- package/lib/management/status.mjs +18 -0
- package/lib/management/update.mjs +58 -0
- package/lib/management/workflow.mjs +51 -0
- package/lib/policy/role-policy.json +7 -7
- package/lib/release/artifact.mjs +1 -1
- package/lib/runtime/bootstrap.mjs +1 -1
- package/lib/runtime/cli.mjs +8 -0
- package/lib/runtime/command.mjs +21 -0
- package/lib/tui/app.mjs +96 -0
- package/lib/tui/render.mjs +43 -0
- package/lib/tui/setup.mjs +21 -0
- package/lib/tui/terminal.mjs +81 -0
- package/lib/tui/workflow.mjs +12 -0
- package/package.json +1 -1
- package/scripts/postinstall.mjs +1 -3
- package/scripts/update-runtime-assets.mjs +6 -1
- package/lib/cli/choices.mjs +0 -47
- package/lib/cli/completion.mjs +0 -55
- package/lib/cli/index.mjs +0 -55
- package/lib/cli/preset.mjs +0 -29
- package/lib/cli/terminal.mjs +0 -19
- package/lib/cli/uninstall.mjs +0 -17
package/lib/cli/uninstall.mjs
DELETED
|
@@ -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
|
-
}
|