@linhnguyen96114/agentkit-engineer 1.5.0 → 1.6.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.
- package/CHANGELOG.md +24 -0
- package/bin/agentkit.js +1 -1
- package/package.json +2 -2
- package/scripts-dist/lib/dropped-mcp-servers.js +1 -1
- package/scripts-dist/lib/kit-context.js +1 -1
- package/scripts-dist/lib/kit-remover.js +1 -1
- package/scripts-dist/lib/kits.js +1 -1
- package/scripts-dist/lib/profile-rules.js +1 -1
- package/scripts-dist/lib/skill-profiles.js +1 -1
- package/scripts-dist/lib/skills/skill-companion-assets.js +1 -6
- package/scripts-dist/lib/ui.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
## [7.11.0](https://github.com/linhnguyen-gt/agentkit-engineer/compare/v7.10.0...v7.11.0) (2026-10-29)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
* **init:** install project-scope skills into .agents/skills across non-claude kits ([aca9a77](https://github.com/linhnguyen-gt/agentkit-engineer/commit/aca9a779c58155641f0303c3e6195fc0ea46a833))
|
|
6
|
+
* **profile:** exclude dev-only skills, agents, and rules from marketing profile ([7dca11a](https://github.com/linhnguyen-gt/agentkit-engineer/commit/7dca11a20dea92825ed896f558448ac977068c2e))
|
|
7
|
+
* **profiles:** add godot mcp server to gamedev profile ([7b504bb](https://github.com/linhnguyen-gt/agentkit-engineer/commit/7b504bbba59660199a566f5633bec358c0f47121))
|
|
8
|
+
* **skills:** add devin runtime to ak-orchestrate and wire --orchestrate routes ([62da33f](https://github.com/linhnguyen-gt/agentkit-engineer/commit/62da33f345d5678dce4a526ecbd8853194d815c8))
|
|
9
|
+
|
|
10
|
+
### 🐞 Bug Fixes
|
|
11
|
+
|
|
12
|
+
* **init:** install gamedev companion agents and rules on the omp kit ([46a6f31](https://github.com/linhnguyen-gt/agentkit-engineer/commit/46a6f314d29769bd293f92d01bc6d7a37675301d))
|
|
13
|
+
* **release:** publish public client in semantic-release prepare step ([1f4bf94](https://github.com/linhnguyen-gt/agentkit-engineer/commit/1f4bf940557c591572f3d8afa7b885acc92f7018))
|
|
14
|
+
* **release:** scope client release notes to client-surface commits ([af86828](https://github.com/linhnguyen-gt/agentkit-engineer/commit/af86828b9c369eccc81d7629b92a96be1372fa10))
|
|
15
|
+
|
|
16
|
+
### ♻️ Code Refactoring
|
|
17
|
+
|
|
18
|
+
* **agents:** make root AGENTS.md instructions kit-neutral ([f2aeae3](https://github.com/linhnguyen-gt/agentkit-engineer/commit/f2aeae3541abeec3c446a350b415cce7a450a584))
|
|
19
|
+
* **rules:** compress skill-domain-routing prose ([87627bb](https://github.com/linhnguyen-gt/agentkit-engineer/commit/87627bbb7b1182cb8d401c358758841d01dd8095))
|
|
20
|
+
|
|
21
|
+
### ✅ Tests
|
|
22
|
+
|
|
23
|
+
* **skills:** ignore agent skill compound noun in agent-reference-drift ([4ea19bf](https://github.com/linhnguyen-gt/agentkit-engineer/commit/4ea19bf6bc5e6e2ac0e99e306b74497cf3cc10bf))
|
|
24
|
+
|
|
1
25
|
## [7.10.0](https://github.com/linhnguyen-gt/agentkit-engineer/compare/v7.9.0...v7.10.0) (2026-10-23)
|
|
2
26
|
|
|
3
27
|
### 🚀 Features
|
package/bin/agentkit.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const path=require("path"),fs=require("fs"),{spawnSync}=require("child_process"),args=process.argv.slice(2),command=args[0],packageRoot=path.join(__dirname,".."),PAYLOAD_ROOTS=["skills","rules","agents","agent-kit"],clientHasPayload=PAYLOAD_ROOTS.every(e=>{try{return fs.statSync(path.join(packageRoot,e)).isDirectory()}catch{return!1}});async function runInPayload(e){const{resolveInstallSource:t,NoAccessError:o}=require("../scripts-dist/lib/payload/source.js"),{execPayload:n}=require("../scripts-dist/lib/payload/exec.js"),s=e.indexOf("--ref"),l=s!==-1?e[s+1]:void 0;s!==-1&&(!l||l.startsWith("--"))&&(console.error("\u2717 --ref needs a value: agentkit <command> --ref <tag|branch|sha>"),process.exit(1));const{getPayloadVersion:i}=require("../scripts-dist/lib/version-check.js");try{const a=await t({version:i(packageRoot)??"0.0.0",ref:l,interactive:!0,cliRoot:packageRoot}),r=path.join(packageRoot,"node_modules"),c=n(process.execPath,[path.join(a.root,"bin","agentkit.js"),...e],{env:{...process.env,NODE_PATH:r,AGENTKIT_NODE_MODULES:r}});process.exit(c.status==null?1:c.status)}catch(a){a instanceof o?console.error(`\u2717 ${a.message}`):console.error(`\u2717 Could not resolve the kit payload: ${a.message}`),process.exit(1)}}function scheduleUpdateNotice(){try{const{maybeNotifyUpdate:e}=require("../scripts-dist/lib/update-notifier"),{getPayloadVersion:t}=require("../scripts-dist/lib/version-check.js");let o=t(packageRoot);try{const{newestTagInstalledTree:n}=require("../scripts-dist/lib/payload/source.js"),{loadAgentkitHomeCore:s}=require("../scripts-dist/lib/agentkit-home.js");o=n(s())?.version??o}catch{}e({currentVersion:o??"0.0.0"})}catch{}}function printProfilesGuide(){console.log("Profiles:"),console.log(" Every install takes a slice of the skill catalog. Leave --profile out and you get the"),console.log(" default for your kit; name one to take a different slice."),console.log(""),console.log(" core Workflow + tooling, minus vendor suites and niche extras (default)"),console.log(" full Every skill the kit ships"),console.log(" frontend core + frontend, design, frameworks"),console.log(" backend core + backend, database, infrastructure, security"),console.log(" mobile core + frontend, frameworks, design"),console.log(" fullstack core + frontend, backend, database, infrastructure, frameworks, design"),console.log(" gamedev core + gamedev, multimedia"),console.log(" also names: threejs, shader, ai-artist, ai-multimodal, ui-ux-pro-max, ak-scenario, ak-optimize"),console.log(" marketing core + marketing, design, seo, documents, multimedia, ai-ml"),console.log(" also names: copywriting, show-off, project-management, frontend-design, agent-browser,"),console.log(" project-organization, ak-sowat, enhance-ux-ax"),console.log(" dependency: enhance-ux-ax installs with seo (its AX engine)"),console.log(" assistant The personal agents' set \u2014 hermes and openclaw default here"),console.log(""),console.log(" The choice is recorded per kit (.agentkit.json) and reapplied on update, so a later"),console.log(" agentkit init keeps it without the flag; --profile overrides it."),console.log(""),console.log(" Missing a skill a wider profile would have installed?"),console.log(" agentkit skills list Browse the whole catalog (\u2713 = installed here)"),console.log(" agentkit skills add <name> Install one; later updates keep it"),console.log(" agentkit skills add <name> --project Install into the current project (--kit <kit>)"),console.log("")}function printGeneralHelp(){console.log("Agentkit CLI"),console.log(""),console.log("Usage:"),console.log(" agentkit <command> [options]"),console.log(" agentkit help [command]"),console.log(""),console.log("Commands:"),console.log(" agentkit init [kit] Initialize AI development kit (project or global)"),console.log(" agentkit login Authorize this machine to reach the kit repository"),console.log(" agentkit logout Remove the stored login and entitlement cache"),console.log(" agentkit whoami Show the logged-in account and its entitlement"),console.log(" agentkit profile Manage install profiles (remove)"),console.log(" agentkit update Upgrade the Agentkit CLI itself to the latest release"),console.log(" agentkit clear Remove Agentkit installations (project or global)"),console.log(" agentkit uninstall Remove Agentkit CLI from your system (global uninstall)"),console.log(" agentkit config Manage auto-update settings"),console.log(" agentkit skills Discover and install skills (list / pick / add / remove)"),console.log(" agentkit doctor Report the health of the installed kit"),console.log(" agentkit status List every kit install on this machine"),console.log(" agentkit dashboard Open the local dashboard in your browser"),console.log(" agentkit hooks See and set hook toggles (list / enable / disable)"),console.log(" agentkit db-first Scaffold a database-first backend project"),console.log(" agentkit mobile Scaffold a mobile project (Expo or Flutter)"),console.log(" agentkit frontend Scaffold a web frontend (agent workflow handoff)"),console.log(" agentkit stack Full-stack workflow tools (typed API client generator)"),console.log(""),console.log("Options:"),console.log(" --help, -h Show this help message"),console.log(" --version, -v Show CLI version"),console.log(""),printProfilesGuide(),console.log("Examples:"),console.log(" agentkit init # Run interactive installer"),console.log(" agentkit init claude # Initialize Claude Code directly (no kit menu)"),console.log(" agentkit init omp # Target a global-only kit (hermes, openclaw, omp)"),console.log(" agentkit init --profile frontend # Install only frontend-relevant skills"),console.log(" agentkit profile remove claude # Reinstall Claude with the core profile"),console.log(" agentkit profile remove --global # Remove profiles from global installs"),console.log(" # Switching an existing profile with init asks for confirmation"),console.log(" agentkit skills # Browse and pick skills to install"),console.log(" agentkit skills add databases # Add one or more skills by name"),console.log(" agentkit skills add expo --project # Add a skill into the current project"),console.log(" agentkit skills remove databases # Undo an add: delete it and forget it"),console.log(" agentkit doctor # Check the installed kit's health"),console.log(" agentkit doctor --json # Same, machine-readable"),console.log(" agentkit status # Every kit install and version"),console.log(" agentkit status --scan # Choose the directories to search"),console.log(" agentkit hooks list # Show every hook toggle"),console.log(" agentkit hooks disable scout-block # Turn one hook off"),console.log(" agentkit update # Upgrade the Agentkit CLI itself"),console.log(" agentkit clear # Remove Agentkit files from project/global"),console.log(" agentkit uninstall # Remove Agentkit CLI from system"),console.log(" agentkit config autoupdate # Show auto-update status"),console.log(" agentkit config autoupdate on # Enable auto-update"),console.log(" agentkit config semantic # Semantic decisions: status (off by default)"),console.log(" agentkit config semantic enable # Enable the semantic-decision layer"),console.log(" agentkit decide < payload.json # Ask a decision model one typed question set"),console.log(" agentkit db-first init myapp postgresql # Scaffold a backend project"),console.log(" agentkit mobile init myapp # Scaffold a mobile project"),console.log(" agentkit frontend init myapp --framework nextjs # Frontend Mode handoff"),console.log(" agentkit stack client ./api ./web/src # Typed client from the API's schema"),console.log(" agentkit help <command> # Show detailed help for a command"),console.log(" agentkit help profile # What each install profile includes"),console.log(" agentkit -v # Check version"),console.log("")}function runSiblingBin(e,t){const o=spawnSync(process.execPath,[path.join(__dirname,e),...t],{stdio:"inherit"});process.exit(o.status==null?1:o.status)}function cliEntryPath(e){return path.join(packageRoot,"scripts-dist","cli",`agentkit-${e}.js`)}function requireCliEntry(e){require(cliEntryPath(e))}async function runInit(){const{resolveInstallSource:e,NoAccessError:t}=require("../scripts-dist/lib/payload/source.js"),{getPayloadVersion:o}=require("../scripts-dist/lib/version-check.js"),n=args.indexOf("--ref"),s=n!==-1?args[n+1]:void 0;n!==-1&&(!s||s.startsWith("--"))&&(console.error("\u2717 --ref needs a value: agentkit init --ref <tag|branch|sha>"),process.exit(1));const l=n!==-1?s:void 0;n!==-1&&process.argv.splice(2+n,2);try{const i=await e({version:o(packageRoot)??"0.0.0",ref:l,interactive:!0,cliRoot:packageRoot});process.env.AGENTKIT_SOURCE_ROOT=i.root,requireCliEntry("init")}catch(i){i instanceof t?console.error(`\u2717 ${i.message}`):console.error(`\u2717 Could not resolve the kit payload: ${i.message}`),process.exit(1)}}async function runHelpTopic(e){!clientHasPayload&&!new Set(["profile","profiles","login","logout","whoami","uninstall"]).has(e)&&await runInPayload(["help",e]);const o=new Set(["db-first","mobile","frontend","stack"]),n=new Map([["login","--help"],["logout","--help"],["whoami","--help"],["init","--help"],["update","--help"],["clear","--help"],["uninstall","--help"],["config","--help"],["decide","--help"],["doctor","--help"],["status","--help"],["dashboard","--help"],["skills","help"],["hooks","help"]]);e==="profile"||e==="profiles"?printProfilesGuide():o.has(e)?runSiblingBin(`${e}.js`,["--help"]):n.has(e)?(process.argv=[process.argv[0],cliEntryPath(e),n.get(e)],requireCliEntry(e)):(console.log(`Unknown command: ${e}`),console.log(""),printGeneralHelp(),process.exit(1))}function printVersion(){const e=require("../package.json");let t=typeof e.payloadVersion=="string"?e.payloadVersion:null;try{const{newestTagInstalledTree:n}=require("../scripts-dist/lib/payload/source.js"),{loadAgentkitHomeCore:s}=require("../scripts-dist/lib/agentkit-home.js");t=n(s())?.version??t}catch{}const o=t&&t!==e.version?` (payload v${t})`:"";console.log(`v${e.version}${o}`)}async function main(){scheduleUpdateNotice();const e=new Set(["login","logout","whoami","uninstall","config","help","--help","-h","--version","-v"]),t=args[1]==="--help"||args[1]==="-h"||args[1]==="help",o=command!==void 0&&!e.has(command);if(o&&!t){const{checkEntitlement:l}=require("../scripts-dist/lib/entitlement/check.js");(await l({interactive:!0}).catch(()=>null))?.status!=="active"&&(console.error("\u2717 no access \u2014 this command needs an authorized login. Run `agentkit login`."),process.exit(1))}o&&!clientHasPayload&&await runInPayload(args);const s=[{when:command==="db-first",run:()=>runSiblingBin(`${command}.js`,args.slice(1))},{when:command==="mobile",run:()=>runSiblingBin(`${command}.js`,args.slice(1))},{when:command==="frontend",run:()=>runSiblingBin(`${command}.js`,args.slice(1))},{when:command==="stack",run:()=>runSiblingBin(`${command}.js`,args.slice(1))},{when:command==="login",run:()=>requireCliEntry(command)},{when:command==="logout",run:()=>requireCliEntry(command)},{when:command==="whoami",run:()=>requireCliEntry(command)},{when:command==="init",run:runInit},{when:command==="profile",run:()=>requireCliEntry(command)},{when:command==="update",run:()=>requireCliEntry(command)},{when:command==="clear",run:()=>requireCliEntry(command)},{when:command==="uninstall",run:()=>requireCliEntry(command)},{when:command==="config",run:()=>requireCliEntry(command)},{when:command==="decide",run:()=>requireCliEntry(command)},{when:command==="skills",run:()=>requireCliEntry(command)},{when:command==="doctor",run:()=>requireCliEntry(command)},{when:command==="status",run:()=>requireCliEntry(command)},{when:command==="dashboard",run:()=>requireCliEntry(command)},{when:command==="hooks",run:()=>requireCliEntry(command)},{when:command==="help"&&args[1],run:()=>runHelpTopic(args[1])},{when:command==="--version"||command==="-v",run:printVersion}].find(l=>l.when);s?await s.run():printGeneralHelp()}main();
|
|
2
|
+
const path=require("path"),fs=require("fs"),{spawnSync}=require("child_process"),args=process.argv.slice(2),command=args[0],packageRoot=path.join(__dirname,".."),PAYLOAD_ROOTS=["skills","rules","agents","agent-kit"],clientHasPayload=PAYLOAD_ROOTS.every(e=>{try{return fs.statSync(path.join(packageRoot,e)).isDirectory()}catch{return!1}});async function runInPayload(e){const{resolveInstallSource:t,NoAccessError:o}=require("../scripts-dist/lib/payload/source.js"),{execPayload:n}=require("../scripts-dist/lib/payload/exec.js"),s=e.indexOf("--ref"),l=s!==-1?e[s+1]:void 0;s!==-1&&(!l||l.startsWith("--"))&&(console.error("\u2717 --ref needs a value: agentkit <command> --ref <tag|branch|sha>"),process.exit(1));const{getPayloadVersion:i}=require("../scripts-dist/lib/version-check.js");try{const a=await t({version:i(packageRoot)??"0.0.0",ref:l,interactive:!0,cliRoot:packageRoot}),r=path.join(packageRoot,"node_modules"),c=n(process.execPath,[path.join(a.root,"bin","agentkit.js"),...e],{env:{...process.env,NODE_PATH:r,AGENTKIT_NODE_MODULES:r}});process.exit(c.status==null?1:c.status)}catch(a){a instanceof o?console.error(`\u2717 ${a.message}`):console.error(`\u2717 Could not resolve the kit payload: ${a.message}`),process.exit(1)}}function scheduleUpdateNotice(){try{const{maybeNotifyUpdate:e}=require("../scripts-dist/lib/update-notifier"),{getPayloadVersion:t}=require("../scripts-dist/lib/version-check.js");let o=t(packageRoot);try{const{newestTagInstalledTree:n}=require("../scripts-dist/lib/payload/source.js"),{loadAgentkitHomeCore:s}=require("../scripts-dist/lib/agentkit-home.js");o=n(s())?.version??o}catch{}e({currentVersion:o??"0.0.0"})}catch{}}function printProfilesGuide(){console.log("Profiles:"),console.log(" Every install takes a slice of the skill catalog. Leave --profile out and you get the"),console.log(" default for your kit; name one to take a different slice."),console.log(""),console.log(" core Workflow + tooling, minus vendor suites and niche extras (default)"),console.log(" full Every skill the kit ships"),console.log(" frontend core + frontend, design, frameworks"),console.log(" backend core + backend, database, infrastructure, security"),console.log(" mobile core + frontend, frameworks, design"),console.log(" fullstack core + frontend, backend, database, infrastructure, frameworks, design"),console.log(" gamedev core + gamedev, multimedia"),console.log(" also names: threejs, shader, ai-artist, ai-multimodal, ui-ux-pro-max, ak-scenario, ak-optimize"),console.log(" marketing core + marketing, design, seo, documents, multimedia"),console.log(" also names: ai-artist, ai-multimodal, copywriting, show-off, project-management,"),console.log(" frontend-design, agent-browser, project-organization, ak-sowat, enhance-ux-ax"),console.log(" dependency: enhance-ux-ax installs with seo (its AX engine)"),console.log(" assistant The personal agents' set \u2014 hermes and openclaw default here"),console.log(""),console.log(" The choice is recorded per kit (.agentkit.json) and reapplied on update, so a later"),console.log(" agentkit init keeps it without the flag; --profile overrides it."),console.log(""),console.log(" Missing a skill a wider profile would have installed?"),console.log(" agentkit skills list Browse the whole catalog (\u2713 = installed here)"),console.log(" agentkit skills add <name> Install one; later updates keep it"),console.log(" agentkit skills add <name> --project Install into the current project (--kit <kit>)"),console.log("")}function printGeneralHelp(){console.log("Agentkit CLI"),console.log(""),console.log("Usage:"),console.log(" agentkit <command> [options]"),console.log(" agentkit help [command]"),console.log(""),console.log("Commands:"),console.log(" agentkit init [kit] Initialize AI development kit (project or global)"),console.log(" agentkit login Authorize this machine to reach the kit repository"),console.log(" agentkit logout Remove the stored login and entitlement cache"),console.log(" agentkit whoami Show the logged-in account and its entitlement"),console.log(" agentkit profile Manage install profiles (remove)"),console.log(" agentkit update Upgrade the Agentkit CLI itself to the latest release"),console.log(" agentkit clear Remove Agentkit installations (project or global)"),console.log(" agentkit uninstall Remove Agentkit CLI from your system (global uninstall)"),console.log(" agentkit config Manage auto-update settings"),console.log(" agentkit skills Discover and install skills (list / pick / add / remove)"),console.log(" agentkit doctor Report the health of the installed kit"),console.log(" agentkit status List every kit install on this machine"),console.log(" agentkit dashboard Open the local dashboard in your browser"),console.log(" agentkit hooks See and set hook toggles (list / enable / disable)"),console.log(" agentkit db-first Scaffold a database-first backend project"),console.log(" agentkit mobile Scaffold a mobile project (Expo or Flutter)"),console.log(" agentkit frontend Scaffold a web frontend (agent workflow handoff)"),console.log(" agentkit stack Full-stack workflow tools (typed API client generator)"),console.log(""),console.log("Options:"),console.log(" --help, -h Show this help message"),console.log(" --version, -v Show CLI version"),console.log(""),printProfilesGuide(),console.log("Examples:"),console.log(" agentkit init # Run interactive installer"),console.log(" agentkit init claude # Initialize Claude Code directly (no kit menu)"),console.log(" agentkit init omp # Target a global-only kit (hermes, openclaw, omp)"),console.log(" agentkit init --profile frontend # Install only frontend-relevant skills"),console.log(" agentkit profile remove claude # Reinstall Claude with the core profile"),console.log(" agentkit profile remove --global # Remove profiles from global installs"),console.log(" # Switching an existing profile with init asks for confirmation"),console.log(" agentkit skills # Browse and pick skills to install"),console.log(" agentkit skills add databases # Add one or more skills by name"),console.log(" agentkit skills add expo --project # Add a skill into the current project"),console.log(" agentkit skills remove databases # Undo an add: delete it and forget it"),console.log(" agentkit doctor # Check the installed kit's health"),console.log(" agentkit doctor --json # Same, machine-readable"),console.log(" agentkit status # Every kit install and version"),console.log(" agentkit status --scan # Choose the directories to search"),console.log(" agentkit hooks list # Show every hook toggle"),console.log(" agentkit hooks disable scout-block # Turn one hook off"),console.log(" agentkit update # Upgrade the Agentkit CLI itself"),console.log(" agentkit clear # Remove Agentkit files from project/global"),console.log(" agentkit uninstall # Remove Agentkit CLI from system"),console.log(" agentkit config autoupdate # Show auto-update status"),console.log(" agentkit config autoupdate on # Enable auto-update"),console.log(" agentkit config semantic # Semantic decisions: status (off by default)"),console.log(" agentkit config semantic enable # Enable the semantic-decision layer"),console.log(" agentkit decide < payload.json # Ask a decision model one typed question set"),console.log(" agentkit db-first init myapp postgresql # Scaffold a backend project"),console.log(" agentkit mobile init myapp # Scaffold a mobile project"),console.log(" agentkit frontend init myapp --framework nextjs # Frontend Mode handoff"),console.log(" agentkit stack client ./api ./web/src # Typed client from the API's schema"),console.log(" agentkit help <command> # Show detailed help for a command"),console.log(" agentkit help profile # What each install profile includes"),console.log(" agentkit -v # Check version"),console.log("")}function runSiblingBin(e,t){const o=spawnSync(process.execPath,[path.join(__dirname,e),...t],{stdio:"inherit"});process.exit(o.status==null?1:o.status)}function cliEntryPath(e){return path.join(packageRoot,"scripts-dist","cli",`agentkit-${e}.js`)}function requireCliEntry(e){require(cliEntryPath(e))}async function runInit(){const{resolveInstallSource:e,NoAccessError:t}=require("../scripts-dist/lib/payload/source.js"),{getPayloadVersion:o}=require("../scripts-dist/lib/version-check.js"),n=args.indexOf("--ref"),s=n!==-1?args[n+1]:void 0;n!==-1&&(!s||s.startsWith("--"))&&(console.error("\u2717 --ref needs a value: agentkit init --ref <tag|branch|sha>"),process.exit(1));const l=n!==-1?s:void 0;n!==-1&&process.argv.splice(2+n,2);try{const i=await e({version:o(packageRoot)??"0.0.0",ref:l,interactive:!0,cliRoot:packageRoot});process.env.AGENTKIT_SOURCE_ROOT=i.root,requireCliEntry("init")}catch(i){i instanceof t?console.error(`\u2717 ${i.message}`):console.error(`\u2717 Could not resolve the kit payload: ${i.message}`),process.exit(1)}}async function runHelpTopic(e){!clientHasPayload&&!new Set(["profile","profiles","login","logout","whoami","uninstall"]).has(e)&&await runInPayload(["help",e]);const o=new Set(["db-first","mobile","frontend","stack"]),n=new Map([["login","--help"],["logout","--help"],["whoami","--help"],["init","--help"],["update","--help"],["clear","--help"],["uninstall","--help"],["config","--help"],["decide","--help"],["doctor","--help"],["status","--help"],["dashboard","--help"],["skills","help"],["hooks","help"]]);e==="profile"||e==="profiles"?printProfilesGuide():o.has(e)?runSiblingBin(`${e}.js`,["--help"]):n.has(e)?(process.argv=[process.argv[0],cliEntryPath(e),n.get(e)],requireCliEntry(e)):(console.log(`Unknown command: ${e}`),console.log(""),printGeneralHelp(),process.exit(1))}function printVersion(){const e=require("../package.json");let t=typeof e.payloadVersion=="string"?e.payloadVersion:null;try{const{newestTagInstalledTree:n}=require("../scripts-dist/lib/payload/source.js"),{loadAgentkitHomeCore:s}=require("../scripts-dist/lib/agentkit-home.js");t=n(s())?.version??t}catch{}const o=t&&t!==e.version?` (payload v${t})`:"";console.log(`v${e.version}${o}`)}async function main(){scheduleUpdateNotice();const e=new Set(["login","logout","whoami","uninstall","config","help","--help","-h","--version","-v"]),t=args[1]==="--help"||args[1]==="-h"||args[1]==="help",o=command!==void 0&&!e.has(command);if(o&&!t){const{checkEntitlement:l}=require("../scripts-dist/lib/entitlement/check.js");(await l({interactive:!0}).catch(()=>null))?.status!=="active"&&(console.error("\u2717 no access \u2014 this command needs an authorized login. Run `agentkit login`."),process.exit(1))}o&&!clientHasPayload&&await runInPayload(args);const s=[{when:command==="db-first",run:()=>runSiblingBin(`${command}.js`,args.slice(1))},{when:command==="mobile",run:()=>runSiblingBin(`${command}.js`,args.slice(1))},{when:command==="frontend",run:()=>runSiblingBin(`${command}.js`,args.slice(1))},{when:command==="stack",run:()=>runSiblingBin(`${command}.js`,args.slice(1))},{when:command==="login",run:()=>requireCliEntry(command)},{when:command==="logout",run:()=>requireCliEntry(command)},{when:command==="whoami",run:()=>requireCliEntry(command)},{when:command==="init",run:runInit},{when:command==="profile",run:()=>requireCliEntry(command)},{when:command==="update",run:()=>requireCliEntry(command)},{when:command==="clear",run:()=>requireCliEntry(command)},{when:command==="uninstall",run:()=>requireCliEntry(command)},{when:command==="config",run:()=>requireCliEntry(command)},{when:command==="decide",run:()=>requireCliEntry(command)},{when:command==="skills",run:()=>requireCliEntry(command)},{when:command==="doctor",run:()=>requireCliEntry(command)},{when:command==="status",run:()=>requireCliEntry(command)},{when:command==="dashboard",run:()=>requireCliEntry(command)},{when:command==="hooks",run:()=>requireCliEntry(command)},{when:command==="help"&&args[1],run:()=>runHelpTopic(args[1])},{when:command==="--version"||command==="-v",run:printVersion}].find(l=>l.when);s?await s.run():printGeneralHelp()}main();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@linhnguyen96114/agentkit-engineer",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "Agentkit thin client — downloads and installs the Agentkit payload after `agentkit login` entitlement.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"type": "git",
|
|
21
21
|
"url": "https://github.com/linhnguyen-gt/agentkit-engineer.git"
|
|
22
22
|
},
|
|
23
|
-
"payloadVersion": "7.
|
|
23
|
+
"payloadVersion": "7.11.0",
|
|
24
24
|
"publishConfig": {
|
|
25
25
|
"access": "public"
|
|
26
26
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),__importStar=this&&this.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o<n.length;o++)n[o]!=="default"&&__createBinding(r,e,n[o]);return __setModuleDefault(r,e),r}})();Object.defineProperty(exports,"__esModule",{value:!0}),exports.AGENTKIT_MCP_SERVERS=exports.DROPPED_MCP_SERVERS=void 0,exports.removeAgentkitMcpServers=removeAgentkitMcpServers,exports.stripDroppedMcpServers=stripDroppedMcpServers,exports.stripDroppedMcpServersFromToml=stripDroppedMcpServersFromToml;const fs=__importStar(require("fs"));exports.DROPPED_MCP_SERVERS=[{name:"git",marker:"mcp-server-git"},{name:"sequential-thinking",marker:"@modelcontextprotocol/server-sequential-thinking"}],exports.AGENTKIT_MCP_SERVERS=[{name:"playwright",marker:"@playwright/mcp"},{name:"chrome-devtools",marker:"chrome-devtools-mcp"},{name:"mobile-mcp",marker:"@mobilenext/mobile-mcp"},{name:"unityMCP",marker:"mcpforunityserver"}];function removeAgentkitMcpServers(t){let e;try{e=JSON.parse(fs.readFileSync(t,"utf-8"))}catch{return{removed:[],remaining:null}}const r=e?.mcpServers;if(!r||typeof r!="object"||Array.isArray(r))return{removed:[],remaining:null};const n=[];for(const{name:i,marker:c}of exports.AGENTKIT_MCP_SERVERS)Object.prototype.hasOwnProperty.call(r,i)&&JSON.stringify(r[i]??"").includes(c)&&(delete r[i],n.push(i));const o=Object.keys(r).length;if(n.length===0)return{removed:n,remaining:o};try{if(o===0)return{removed:n,remaining:0};const i=`${t}.${process.pid}.tmp`;try{fs.writeFileSync(i,`${JSON.stringify(e,null,2)}
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),__importStar=this&&this.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),o=0;o<n.length;o++)n[o]!=="default"&&__createBinding(r,e,n[o]);return __setModuleDefault(r,e),r}})();Object.defineProperty(exports,"__esModule",{value:!0}),exports.AGENTKIT_MCP_SERVERS=exports.DROPPED_MCP_SERVERS=void 0,exports.removeAgentkitMcpServers=removeAgentkitMcpServers,exports.stripDroppedMcpServers=stripDroppedMcpServers,exports.stripDroppedMcpServersFromToml=stripDroppedMcpServersFromToml;const fs=__importStar(require("fs"));exports.DROPPED_MCP_SERVERS=[{name:"git",marker:"mcp-server-git"},{name:"sequential-thinking",marker:"@modelcontextprotocol/server-sequential-thinking"}],exports.AGENTKIT_MCP_SERVERS=[{name:"playwright",marker:"@playwright/mcp"},{name:"chrome-devtools",marker:"chrome-devtools-mcp"},{name:"mobile-mcp",marker:"@mobilenext/mobile-mcp"},{name:"unityMCP",marker:"mcpforunityserver"},{name:"godot",marker:"@coding-solo/godot-mcp"}];function removeAgentkitMcpServers(t){let e;try{e=JSON.parse(fs.readFileSync(t,"utf-8"))}catch{return{removed:[],remaining:null}}const r=e?.mcpServers;if(!r||typeof r!="object"||Array.isArray(r))return{removed:[],remaining:null};const n=[];for(const{name:i,marker:c}of exports.AGENTKIT_MCP_SERVERS)Object.prototype.hasOwnProperty.call(r,i)&&JSON.stringify(r[i]??"").includes(c)&&(delete r[i],n.push(i));const o=Object.keys(r).length;if(n.length===0)return{removed:n,remaining:o};try{if(o===0)return{removed:n,remaining:0};const i=`${t}.${process.pid}.tmp`;try{fs.writeFileSync(i,`${JSON.stringify(e,null,2)}
|
|
2
2
|
`,"utf8"),fs.renameSync(i,t)}catch(c){throw fs.rmSync(i,{force:!0}),c}}catch{}return{removed:n,remaining:o}}function stripDroppedMcpServers(t){if(!t||typeof t!="object")return[];const e=[];for(const{name:r,marker:n}of exports.DROPPED_MCP_SERVERS)Object.prototype.hasOwnProperty.call(t,r)&&JSON.stringify(t[r]??"").includes(n)&&(delete t[r],e.push(r));return e}function stripDroppedMcpServersFromToml(t){let e=t;for(const{name:r,marker:n}of exports.DROPPED_MCP_SERVERS)e=e.replace(new RegExp(`^\\[mcp_servers\\.${escapeRegExp(r)}\\][^\\n]*(?:\\n(?!\\[).*)*\\n?`,"gm"),o=>o.includes(n)?"":o);return e===t?t:e.replace(/\n{3,}/g,`
|
|
3
3
|
|
|
4
4
|
`).trimStart()}function escapeRegExp(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(t,e,i,n){n===void 0&&(n=i);var o=Object.getOwnPropertyDescriptor(e,i);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,o)}):(function(t,e,i,n){n===void 0&&(n=i),t[n]=e[i]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),__importStar=this&&this.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(i){var n=[];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[n.length]=o);return n},t(e)};return function(e){if(e&&e.__esModule)return e;var i={};if(e!=null)for(var n=t(e),o=0;o<n.length;o++)n[o]!=="default"&&__createBinding(i,e,n[o]);return __setModuleDefault(i,e),i}})();Object.defineProperty(exports,"__esModule",{value:!0}),exports.GLOBAL_KITS=exports.KIT_GLOBAL_SKILLS_DIR=exports.KIT_SKILLS_DIR=void 0,exports.globalBaseDir=globalBaseDir,exports.projectContext=projectContext,exports.globalContext=globalContext,exports.candidateContexts=candidateContexts,exports.soleContext=soleContext,exports.resolveContext=resolveContext;const path=__importStar(require("path")),p=__importStar(require("@clack/prompts")),init_install_scope_1=require("./init-install-scope"),kits_1=require("./kits"),home_dir_1=require("./home-dir"),logger_1=require("./logger");exports.KIT_SKILLS_DIR={claude:path.join(".claude","skills"),augment:path.join(".claude","skills"),cursor:path.join(".
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(t,e,i,n){n===void 0&&(n=i);var o=Object.getOwnPropertyDescriptor(e,i);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,o)}):(function(t,e,i,n){n===void 0&&(n=i),t[n]=e[i]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),__importStar=this&&this.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(i){var n=[];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[n.length]=o);return n},t(e)};return function(e){if(e&&e.__esModule)return e;var i={};if(e!=null)for(var n=t(e),o=0;o<n.length;o++)n[o]!=="default"&&__createBinding(i,e,n[o]);return __setModuleDefault(i,e),i}})();Object.defineProperty(exports,"__esModule",{value:!0}),exports.GLOBAL_KITS=exports.KIT_GLOBAL_SKILLS_DIR=exports.KIT_SKILLS_DIR=void 0,exports.globalBaseDir=globalBaseDir,exports.projectContext=projectContext,exports.globalContext=globalContext,exports.candidateContexts=candidateContexts,exports.soleContext=soleContext,exports.resolveContext=resolveContext;const path=__importStar(require("path")),p=__importStar(require("@clack/prompts")),init_install_scope_1=require("./init-install-scope"),kits_1=require("./kits"),home_dir_1=require("./home-dir"),logger_1=require("./logger");exports.KIT_SKILLS_DIR={claude:path.join(".claude","skills"),augment:path.join(".claude","skills"),cursor:path.join(".agents","skills"),opencode:path.join(".agents","skills"),antigravity:path.join(".agents","skills"),codex:path.join(".agents","skills"),kimi:path.join(".agents","skills"),hermes:path.join(".hermes-kit","skills","agentkit"),openclaw:path.join(".openclaw-kit","skills"),omp:path.join(".omp","agentkit","skills"),grok:path.join(".agents","skills"),pi:path.join(".pi","agentkit","skills"),devin:path.join(".agents","skills")},exports.KIT_GLOBAL_SKILLS_DIR={claude:"skills",augment:"skills",cursor:"skills",opencode:"skills",antigravity:"skills",codex:"skills",kimi:"skills",hermes:path.join("skills","agentkit"),openclaw:"skills",omp:"skills",grok:"skills",pi:"skills",devin:"skills"},exports.GLOBAL_KITS=["claude","opencode","cursor","antigravity","codex","kimi","hermes","openclaw","omp","grok","pi","devin"];function globalBaseDir(t){return(0,init_install_scope_1.kitDirWithinGlobalRoot)(t,(0,init_install_scope_1.resolveGlobalRoot)(t,""))}function projectContext(t,e){const i=path.join(e,kits_1.kitDefinitions[t].dir);return{kit:t,scope:"project",kitRoot:i,destSkillsDir:path.join(e,exports.KIT_SKILLS_DIR[t]),configPath:path.join(i,".agentkit.json")}}function globalContext(t){const e=globalBaseDir(t);return{kit:t,scope:"global",kitRoot:e,destSkillsDir:path.join(e,exports.KIT_GLOBAL_SKILLS_DIR[t]),configPath:path.join(e,".agentkit.json")}}function candidateContexts(t){if(!(0,home_dir_1.isHomeDir)(t)){const i=exports.GLOBAL_KITS.filter(n=>(0,init_install_scope_1.isKitInstalledInProject)(n,t));if(i.length>0)return i.map(n=>projectContext(n,t))}return exports.GLOBAL_KITS.filter(i=>(0,init_install_scope_1.isKitInstalledGlobally)(i)).map(globalContext)}function soleContext(t){const e=candidateContexts(t);return e.length===1?e[0]:null}async function resolveContext(t,e={}){const i=candidateContexts(t);if(i.length===0)return(0,logger_1.printError)("No AgentKit install detected. Run `agentkit init` first."),null;if(i.length===1)return i[0];if(!process.stdout.isTTY)return(0,logger_1.printError)(`Multiple kits installed: ${i.map(o=>o.kit).join(", ")}.`),(0,logger_1.printInfo)(e.nonTtyHint??"Pick one with `agentkit skills` in a terminal, or cd into a project."),null;const n=await p.select({message:e.promptMessage??"Which kit to add skills to?",options:i.map(o=>({value:o.kit,label:`${kits_1.kitDefinitions[o.kit].name} (${o.scope})`}))});return p.isCancel(n)?null:i.find(o=>o.kit===n)??null}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(o,e,s,i){i===void 0&&(i=s);var n=Object.getOwnPropertyDescriptor(e,s);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[s]}}),Object.defineProperty(o,i,n)}):(function(o,e,s,i){i===void 0&&(i=s),o[i]=e[s]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(o,e){Object.defineProperty(o,"default",{enumerable:!0,value:e})}):function(o,e){o.default=e}),__importStar=this&&this.__importStar||(function(){var o=function(e){return o=Object.getOwnPropertyNames||function(s){var i=[];for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(i[i.length]=n);return i},o(e)};return function(e){if(e&&e.__esModule)return e;var s={};if(e!=null)for(var i=o(e),n=0;n<i.length;n++)i[n]!=="default"&&__createBinding(s,e,i[n]);return __setModuleDefault(s,e),s}})();Object.defineProperty(exports,"__esModule",{value:!0}),exports.kitRemovalPaths=kitRemovalPaths,exports.removePiExtras=removePiExtras,exports.removeKit=removeKit;const fs=__importStar(require("fs")),path=__importStar(require("path")),kits_1=require("./kits"),file_operations_1=require("./file-operations"),package_root_1=require("./package-root"),gitignore_1=require("./gitignore"),logger_1=require("./logger"),codex_agents_1=require("./codex-agents"),claude_instructions_1=require("./claude-instructions"),kimi_hooks_toml_1=require("./kit-installers/kimi-hooks-toml"),kimi_1=require("./kit-installers/kimi"),omp_managed_1=require("./kit-installers/omp-managed"),pi_config_json_1=require("./kit-installers/pi-config-json"),pi_packages_1=require("./kit-installers/pi-packages"),devin_hooks_1=require("./kit-installers/devin-hooks"),devin_rules_1=require("./kit-installers/devin-rules"),devin_agents_1=require("./kit-installers/devin-agents"),commands_to_skills_1=require("./kit-installers/commands-to-skills"),retired_skills_1=require("./retired-skills"),dropped_mcp_servers_1=require("./dropped-mcp-servers"),pi_home_1=require("./pi-home"),context_mode_remover_1=require("./context-mode-remover"),install_manifest_1=require("./install-manifest"),payload_roots_1=require("./payload-roots");function isFileClaimedByOtherKit(o,e,s,i=[]){return Object.entries(kits_1.kitDefinitions).some(([n,t])=>n!==e&&(t.files.includes(o)||(t.claims??[]).includes(o))&&!i.includes(t.dir)&&fs.existsSync(path.join(s,t.dir)))}function kitRemovalPaths(o,e){const s=kits_1.kitDefinitions[o];if(!s)return[];const i=[],n=t=>{i.includes(t)||i.push(t)};fs.existsSync(path.join(e,s.dir))&&n(`${s.dir}/`);for(const t of s.files)fs.existsSync(path.join(e,t))&&!isFileClaimedByOtherKit(t,o,e,[s.dir])&&n(t);if(o==="claude"){const t=path.join(e,"AGENTS.md");if(fs.existsSync(t))try{(0,claude_instructions_1.hasAikitClaudeBlock)(fs.readFileSync(t,"utf-8"))&&n("AGENTS.md")}catch{}const r=path.join(e,"CLAUDE.md");if(fs.existsSync(r))try{(0,claude_instructions_1.stripAikitClaudeBlock)(fs.readFileSync(r,"utf-8")).removedWholeFile&&n("CLAUDE.md")}catch{}}if(o==="codex"){fs.existsSync(path.join(e,".agents"))&&n(".agents/");const t=path.join(e,"AGENTS.md");if(fs.existsSync(t))try{(0,codex_agents_1.hasAikitCodexBlock)(fs.readFileSync(t,"utf-8"))&&n("AGENTS.md")}catch{}}if(o==="kimi"){const t=path.join(e,"AGENTS.md");if(fs.existsSync(t))try{(0,codex_agents_1.hasAikitCodexBlock)(fs.readFileSync(t,"utf-8"))&&n("AGENTS.md")}catch{}}if(o==="hermes"){const t=path.join(e,"AGENTS.md");if(fs.existsSync(t))try{(0,codex_agents_1.hasAikitCodexBlock)(fs.readFileSync(t,"utf-8"))&&n("AGENTS.md")}catch{}}if(o==="devin"){const t=path.join(e,"AGENTS.md");if(fs.existsSync(t))try{(0,codex_agents_1.hasAikitCodexBlock)(fs.readFileSync(t,"utf-8"))&&n("AGENTS.md")}catch{}const r=i.indexOf(`${s.dir}/`);r>=0&&i.splice(r,1);for(const c of["hooks","scripts","schemas"])fs.existsSync(path.join(e,s.dir,c))&&n(`${s.dir}/${c}/`);for(const c of(0,devin_rules_1.devinOwnedRuleNames)(path.join(e,s.dir,"rules")))n(`${s.dir}/rules/${c}`);for(const c of(0,devin_agents_1.devinOwnedAgentNames)(path.join(e,s.dir,"agents")))n(`${s.dir}/agents/${c}`);for(const c of(0,file_operations_1.shippedSkillEntries)((0,package_root_1.packageRoot)()))fs.existsSync(path.join(e,s.dir,"skills",c.name))&&n(`${s.dir}/skills/${c.name}`);for(const c of["hooks.v1.json","mcp_config.json",".agentkit.json",".agentkitignore"])fs.existsSync(path.join(e,s.dir,c))&&n(`${s.dir}/${c}`)}if(o==="claude"&&fs.existsSync(path.join(e,".mcp.json"))&&n(".mcp.json"),o==="pi"){const t=path.join(e,pi_home_1.PI_PROJECT_DIR),r=path.join(e,"AGENTS.md");if(fs.existsSync(r))try{(0,codex_agents_1.hasAikitCodexBlock)(fs.readFileSync(r,"utf-8"))&&n("AGENTS.md")}catch{}for(const c of[pi_home_1.PI_EXTENSION_FILE,pi_home_1.PI_SUBAGENT_EXTENSION_FILE])fs.existsSync(path.join(t,c))&&n(path.join(".pi",c));for(const c of[pi_home_1.PI_PROMPTS_DIR,pi_home_1.PI_AGENTS_DIR])for(const f of(0,omp_managed_1.ompManagedFileNames)(path.join(t,c)))n(path.join(".pi",c,f))}return o==="cursor"&&fs.existsSync(path.join(e,"plugins","local","context-mode"))&&n(path.join("plugins","local","context-mode")),i}function stripAgentkitBlockFrom(o,e="codex"){if(!fs.existsSync(o))return!1;const s=fs.readFileSync(o,"utf-8");if(!(e==="claude"?claude_instructions_1.hasAikitClaudeBlock:codex_agents_1.hasAikitCodexBlock)(s))return!1;const n=e==="claude"?(0,claude_instructions_1.stripAikitClaudeBlock)(s):(0,codex_agents_1.stripAikitCodexBlock)(s);return n.removedWholeFile?(0,file_operations_1.removeFile)(o)?((0,logger_1.printSuccess)(`Removed ${path.basename(o)}`),!0):!1:n.removed?(fs.writeFileSync(o,n.content,"utf8"),(0,logger_1.printSuccess)(`Removed Agentkit block from ${path.basename(o)}`),!0):!1}function removePiExtras(o,e){let s=!1;stripAgentkitBlockFrom(e)&&(s=!0);for(const r of[pi_home_1.PI_EXTENSION_FILE,pi_home_1.PI_SUBAGENT_EXTENSION_FILE]){const c=path.join(o,r);fs.existsSync(c)&&(0,file_operations_1.removeFile)(c)&&((0,logger_1.printSuccess)(`Removed ${r}`),s=!0)}for(const r of[pi_home_1.PI_PROMPTS_DIR,pi_home_1.PI_AGENTS_DIR])for(const c of(0,omp_managed_1.ompManagedFileNames)(path.join(o,r)))(0,file_operations_1.removeFile)(path.join(o,r,c))&&((0,logger_1.printSuccess)(`Removed ${path.join(r,c)}`),s=!0);const i=(0,pi_home_1.piConfigPath)(o),n=(0,pi_config_json_1.unregisterPiSkillsDir)(i,path.join(o,pi_home_1.PI_SKILLS_SUBDIR));for(const r of n.warnings)(0,logger_1.printWarning)(r);n.removed.length>0&&n.written?((0,logger_1.printSuccess)(`Unregistered the Agentkit skills directory from ${i}`),s=!0):n.warnings.length>0&&fs.existsSync(i)&&(0,logger_1.printWarning)(`Could not update ${i} \u2014 it may still register the skills directory this removal deleted. Edit it by hand, or pi will scan a path that is no longer there.`);const t=(0,pi_config_json_1.unregisterPiPackages)(i,pi_packages_1.PI_PACKAGE_SPECS);for(const r of t.warnings)(0,logger_1.printWarning)(r);return t.removed.length>0&&t.written?((0,logger_1.printSuccess)(`Unregistered ${t.removed.length} Pi extension packages from ${i}`),(0,logger_1.printWarning)(`Their files stay under ${path.join(o,"npm")} \u2014 \`pi remove <spec>\` is the command that reconciles and can take them off disk.`),s=!0):t.warnings.length>0&&fs.existsSync(i)&&(0,logger_1.printWarning)(`Could not update ${i} \u2014 it may still declare this kit's Pi extension packages. Edit it by hand, or Pi will keep loading them.`),s}function removeKit(o,e){const s=kits_1.kitDefinitions[o];if(!s)return(0,logger_1.printWarning)(`Unknown kit: ${o}`),!1;let i=!1;const n=[];(0,context_mode_remover_1.removeContextMode)({scope:"project",platform:o,rootDir:path.join(e,s.dir)});const t=path.join(e,s.dir);o!=="devin"&&fs.existsSync(t)&&(0,file_operations_1.removeDir)(t)&&((0,logger_1.printSuccess)(`Removed ${s.dir}/`),i=!0,n.push(s.dir+"/"));for(const r of s.files){const c=path.join(e,r);!fs.existsSync(c)||isFileClaimedByOtherKit(r,o,e)||(0,file_operations_1.removeFile)(c)&&((0,logger_1.printSuccess)(`Removed ${r}`),i=!0,n.push(r))}if(o==="claude"){stripAgentkitBlockFrom(path.join(e,"AGENTS.md"),"claude")&&(i=!0);const r=path.join(e,"CLAUDE.md");if(fs.existsSync(r)){const c=(0,claude_instructions_1.stripAikitClaudeBlock)(fs.readFileSync(r,"utf-8"));c.removedWholeFile?(0,file_operations_1.removeFile)(r)&&((0,logger_1.printSuccess)("Removed CLAUDE.md"),i=!0,n.push("CLAUDE.md")):c.removed&&(fs.writeFileSync(r,c.content,"utf8"),(0,logger_1.printSuccess)("Removed Agentkit import from CLAUDE.md"),i=!0)}}if(o==="codex"){const r=path.join(e,".agents");fs.existsSync(r)&&(0,file_operations_1.removeDir)(r)&&((0,logger_1.printSuccess)("Removed .agents/"),i=!0,n.push(".agents/")),stripAgentkitBlockFrom(path.join(e,"AGENTS.md"))&&(i=!0)}if(o==="kimi"&&(stripAgentkitBlockFrom(path.join(e,"AGENTS.md"))&&(i=!0),(0,kimi_hooks_toml_1.removeKimiHooks)((0,kimi_1.resolveKimiHomeConfig)())&&((0,logger_1.printSuccess)("Removed Agentkit hooks from the Kimi user config"),i=!0)),o==="hermes"&&stripAgentkitBlockFrom(path.join(e,"AGENTS.md"))&&(i=!0),o==="pi"&&removePiExtras(path.join(e,pi_home_1.PI_PROJECT_DIR),path.join(e,"AGENTS.md"))&&(i=!0),o==="devin"){stripAgentkitBlockFrom(path.join(e,"AGENTS.md"))&&(i=!0),(0,devin_hooks_1.removeDevinHooks)(path.join(t,"hooks.v1.json"),"whole")&&((0,logger_1.printSuccess)("Removed Agentkit hook handlers from .devin/hooks.v1.json"),i=!0);for(const l of["scripts","schemas"])(0,file_operations_1.removeDir)(path.join(t,l))&&((0,logger_1.printSuccess)(`Removed .devin/${l}/`),i=!0);const r=(0,devin_hooks_1.devinHookFileNames)();let c=0;for(const l of r)(0,file_operations_1.removeFile)(path.join(t,l))&&(c+=1);c>0&&((0,logger_1.printSuccess)(`Removed ${c} hook file(s) from .devin/hooks/`),i=!0);const f=[{dir:"rules",names:(0,devin_rules_1.devinOwnedRuleNames)(path.join(t,"rules"))},{dir:"agents",names:(0,devin_agents_1.devinOwnedAgentNames)(path.join(t,"agents"))}].filter(({dir:l,names:d})=>{for(const p of d)(0,file_operations_1.removeFile)(path.join(t,l,p));return d.length>0});for(const{dir:l,names:d}of f)(0,logger_1.printSuccess)(`Removed ${d.length} Agentkit file(s) from .devin/${l}/`),i=!0;const u=[...(0,file_operations_1.shippedSkillEntries)((0,package_root_1.packageRoot)()).map(l=>l.name),...(0,commands_to_skills_1.commandSkillNames)(path.join((0,package_root_1.packageRoot)(),payload_roots_1.COMMAND_SOURCE_DIR)),...(0,retired_skills_1.retiredSkillNames)()];let a=0;for(const l of u)(0,file_operations_1.removeDir)(path.join(t,"skills",l))&&(a+=1);a>0&&((0,logger_1.printSuccess)(`Removed ${a} skill(s) from .devin/skills/`),i=!0);const m=path.join(t,"mcp_config.json");if(fs.existsSync(m)){const{remaining:l}=(0,dropped_mcp_servers_1.removeAgentkitMcpServers)(m);l===0?((0,file_operations_1.removeFile)(m),(0,logger_1.printSuccess)("Removed .devin/mcp_config.json")):l===null?(0,logger_1.printWarning)("Kept .devin/mcp_config.json \u2014 it could not be read as an mcpServers map"):(0,logger_1.printWarning)(`Kept .devin/mcp_config.json \u2014 it still holds ${l} of your own server(s)`),i=!0}for(const l of[".agentkit.json",".agentkitignore",install_manifest_1.MANIFEST_FILENAME])(0,file_operations_1.removeFile)(path.join(t,l))&&(i=!0);for(const l of["skills","agents","rules","hooks/scout-block/vendor","hooks/scout-block","hooks/lib","hooks",""]){const d=l?path.join(t,l):t;try{fs.existsSync(d)&&fs.readdirSync(d).length===0&&(fs.rmdirSync(d),l||n.push(`${s.dir}/`))}catch{}}}if(o==="claude"){const r=path.join(e,".mcp.json");fs.existsSync(r)&&(0,file_operations_1.removeFile)(r)&&((0,logger_1.printSuccess)("Removed .mcp.json from project root"),i=!0,n.push(".mcp.json"))}if(o==="cursor"){const r=path.join(e,".cursor","mcp.json");fs.existsSync(r)&&(0,file_operations_1.removeFile)(r)&&((0,logger_1.printSuccess)("Removed mcp.json from .cursor/"),i=!0,n.push(".cursor/mcp.json"));const c=path.join(e,".cursor","hooks.json");fs.existsSync(c)&&(0,file_operations_1.removeFile)(c)&&((0,logger_1.printSuccess)("Removed hooks.json from .cursor/"),i=!0,n.push(".cursor/hooks.json"));const f=path.join(e,"plugins","local","context-mode");fs.existsSync(f)&&(0,file_operations_1.removeDir)(f)&&((0,logger_1.printSuccess)("Removed context-mode from Cursor local plugins directory"),i=!0);const u=path.join(e,".cursor");fs.existsSync(u)&&fs.readdirSync(u).length===0&&(0,file_operations_1.removeDir)(u)&&((0,logger_1.printSuccess)("Removed empty .cursor/ directory"),i=!0,n.push(".cursor/"))}return n.length>0&&(0,gitignore_1.cleanupGitignore)(n,e),i}
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(o,e,s,i){i===void 0&&(i=s);var n=Object.getOwnPropertyDescriptor(e,s);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[s]}}),Object.defineProperty(o,i,n)}):(function(o,e,s,i){i===void 0&&(i=s),o[i]=e[s]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(o,e){Object.defineProperty(o,"default",{enumerable:!0,value:e})}):function(o,e){o.default=e}),__importStar=this&&this.__importStar||(function(){var o=function(e){return o=Object.getOwnPropertyNames||function(s){var i=[];for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(i[i.length]=n);return i},o(e)};return function(e){if(e&&e.__esModule)return e;var s={};if(e!=null)for(var i=o(e),n=0;n<i.length;n++)i[n]!=="default"&&__createBinding(s,e,i[n]);return __setModuleDefault(s,e),s}})();Object.defineProperty(exports,"__esModule",{value:!0}),exports.kitRemovalPaths=kitRemovalPaths,exports.removePiExtras=removePiExtras,exports.removeKit=removeKit;const fs=__importStar(require("fs")),path=__importStar(require("path")),kits_1=require("./kits"),file_operations_1=require("./file-operations"),package_root_1=require("./package-root"),gitignore_1=require("./gitignore"),logger_1=require("./logger"),codex_agents_1=require("./codex-agents"),claude_instructions_1=require("./claude-instructions"),kimi_hooks_toml_1=require("./kit-installers/kimi-hooks-toml"),kimi_1=require("./kit-installers/kimi"),omp_managed_1=require("./kit-installers/omp-managed"),pi_config_json_1=require("./kit-installers/pi-config-json"),pi_packages_1=require("./kit-installers/pi-packages"),devin_hooks_1=require("./kit-installers/devin-hooks"),devin_rules_1=require("./kit-installers/devin-rules"),devin_agents_1=require("./kit-installers/devin-agents"),commands_to_skills_1=require("./kit-installers/commands-to-skills"),retired_skills_1=require("./retired-skills"),dropped_mcp_servers_1=require("./dropped-mcp-servers"),pi_home_1=require("./pi-home"),context_mode_remover_1=require("./context-mode-remover"),install_manifest_1=require("./install-manifest"),payload_roots_1=require("./payload-roots");function isFileClaimedByOtherKit(o,e,s,i=[]){return Object.entries(kits_1.kitDefinitions).some(([n,t])=>n!==e&&(t.files.includes(o)||(t.claims??[]).includes(o))&&!i.includes(t.dir)&&fs.existsSync(path.join(s,t.dir)))}function kitRemovalPaths(o,e){const s=kits_1.kitDefinitions[o];if(!s)return[];const i=[],n=t=>{i.includes(t)||i.push(t)};fs.existsSync(path.join(e,s.dir))&&n(`${s.dir}/`);for(const t of s.files)fs.existsSync(path.join(e,t))&&!isFileClaimedByOtherKit(t,o,e,[s.dir])&&n(t);if(o==="claude"){const t=path.join(e,"AGENTS.md");if(fs.existsSync(t))try{(0,claude_instructions_1.hasAikitClaudeBlock)(fs.readFileSync(t,"utf-8"))&&n("AGENTS.md")}catch{}const r=path.join(e,"CLAUDE.md");if(fs.existsSync(r))try{(0,claude_instructions_1.stripAikitClaudeBlock)(fs.readFileSync(r,"utf-8")).removedWholeFile&&n("CLAUDE.md")}catch{}}if(["codex","cursor","opencode","kimi","grok"].includes(o)&&fs.existsSync(path.join(e,".agents"))&&n(".agents/"),o==="codex"){const t=path.join(e,"AGENTS.md");if(fs.existsSync(t))try{(0,codex_agents_1.hasAikitCodexBlock)(fs.readFileSync(t,"utf-8"))&&n("AGENTS.md")}catch{}}if(o==="kimi"){const t=path.join(e,"AGENTS.md");if(fs.existsSync(t))try{(0,codex_agents_1.hasAikitCodexBlock)(fs.readFileSync(t,"utf-8"))&&n("AGENTS.md")}catch{}}if(o==="hermes"){const t=path.join(e,"AGENTS.md");if(fs.existsSync(t))try{(0,codex_agents_1.hasAikitCodexBlock)(fs.readFileSync(t,"utf-8"))&&n("AGENTS.md")}catch{}}if(o==="devin"){const t=path.join(e,"AGENTS.md");if(fs.existsSync(t))try{(0,codex_agents_1.hasAikitCodexBlock)(fs.readFileSync(t,"utf-8"))&&n("AGENTS.md")}catch{}const r=i.indexOf(`${s.dir}/`);r>=0&&i.splice(r,1);for(const c of["hooks","scripts","schemas"])fs.existsSync(path.join(e,s.dir,c))&&n(`${s.dir}/${c}/`);for(const c of(0,devin_rules_1.devinOwnedRuleNames)(path.join(e,s.dir,"rules")))n(`${s.dir}/rules/${c}`);for(const c of(0,devin_agents_1.devinOwnedAgentNames)(path.join(e,s.dir,"agents")))n(`${s.dir}/agents/${c}`);for(const c of(0,file_operations_1.shippedSkillEntries)((0,package_root_1.packageRoot)()))fs.existsSync(path.join(e,".agents","skills",c.name))&&n(`.agents/skills/${c.name}`),fs.existsSync(path.join(e,s.dir,"skills",c.name))&&n(`${s.dir}/skills/${c.name}`);for(const c of["hooks.v1.json","mcp_config.json",".agentkit.json",".agentkitignore"])fs.existsSync(path.join(e,s.dir,c))&&n(`${s.dir}/${c}`)}if(o==="claude"&&fs.existsSync(path.join(e,".mcp.json"))&&n(".mcp.json"),o==="pi"){const t=path.join(e,pi_home_1.PI_PROJECT_DIR),r=path.join(e,"AGENTS.md");if(fs.existsSync(r))try{(0,codex_agents_1.hasAikitCodexBlock)(fs.readFileSync(r,"utf-8"))&&n("AGENTS.md")}catch{}for(const c of[pi_home_1.PI_EXTENSION_FILE,pi_home_1.PI_SUBAGENT_EXTENSION_FILE])fs.existsSync(path.join(t,c))&&n(path.join(".pi",c));for(const c of[pi_home_1.PI_PROMPTS_DIR,pi_home_1.PI_AGENTS_DIR])for(const f of(0,omp_managed_1.ompManagedFileNames)(path.join(t,c)))n(path.join(".pi",c,f))}return o==="cursor"&&fs.existsSync(path.join(e,"plugins","local","context-mode"))&&n(path.join("plugins","local","context-mode")),i}function stripAgentkitBlockFrom(o,e="codex"){if(!fs.existsSync(o))return!1;const s=fs.readFileSync(o,"utf-8");if(!(e==="claude"?claude_instructions_1.hasAikitClaudeBlock:codex_agents_1.hasAikitCodexBlock)(s))return!1;const n=e==="claude"?(0,claude_instructions_1.stripAikitClaudeBlock)(s):(0,codex_agents_1.stripAikitCodexBlock)(s);return n.removedWholeFile?(0,file_operations_1.removeFile)(o)?((0,logger_1.printSuccess)(`Removed ${path.basename(o)}`),!0):!1:n.removed?(fs.writeFileSync(o,n.content,"utf8"),(0,logger_1.printSuccess)(`Removed Agentkit block from ${path.basename(o)}`),!0):!1}function removePiExtras(o,e){let s=!1;stripAgentkitBlockFrom(e)&&(s=!0);for(const r of[pi_home_1.PI_EXTENSION_FILE,pi_home_1.PI_SUBAGENT_EXTENSION_FILE]){const c=path.join(o,r);fs.existsSync(c)&&(0,file_operations_1.removeFile)(c)&&((0,logger_1.printSuccess)(`Removed ${r}`),s=!0)}for(const r of[pi_home_1.PI_PROMPTS_DIR,pi_home_1.PI_AGENTS_DIR])for(const c of(0,omp_managed_1.ompManagedFileNames)(path.join(o,r)))(0,file_operations_1.removeFile)(path.join(o,r,c))&&((0,logger_1.printSuccess)(`Removed ${path.join(r,c)}`),s=!0);const i=(0,pi_home_1.piConfigPath)(o),n=(0,pi_config_json_1.unregisterPiSkillsDir)(i,path.join(o,pi_home_1.PI_SKILLS_SUBDIR));for(const r of n.warnings)(0,logger_1.printWarning)(r);n.removed.length>0&&n.written?((0,logger_1.printSuccess)(`Unregistered the Agentkit skills directory from ${i}`),s=!0):n.warnings.length>0&&fs.existsSync(i)&&(0,logger_1.printWarning)(`Could not update ${i} \u2014 it may still register the skills directory this removal deleted. Edit it by hand, or pi will scan a path that is no longer there.`);const t=(0,pi_config_json_1.unregisterPiPackages)(i,pi_packages_1.PI_PACKAGE_SPECS);for(const r of t.warnings)(0,logger_1.printWarning)(r);return t.removed.length>0&&t.written?((0,logger_1.printSuccess)(`Unregistered ${t.removed.length} Pi extension packages from ${i}`),(0,logger_1.printWarning)(`Their files stay under ${path.join(o,"npm")} \u2014 \`pi remove <spec>\` is the command that reconciles and can take them off disk.`),s=!0):t.warnings.length>0&&fs.existsSync(i)&&(0,logger_1.printWarning)(`Could not update ${i} \u2014 it may still declare this kit's Pi extension packages. Edit it by hand, or Pi will keep loading them.`),s}function removeKit(o,e){const s=kits_1.kitDefinitions[o];if(!s)return(0,logger_1.printWarning)(`Unknown kit: ${o}`),!1;let i=!1;const n=[];(0,context_mode_remover_1.removeContextMode)({scope:"project",platform:o,rootDir:path.join(e,s.dir)});const t=path.join(e,s.dir);o!=="devin"&&fs.existsSync(t)&&(0,file_operations_1.removeDir)(t)&&((0,logger_1.printSuccess)(`Removed ${s.dir}/`),i=!0,n.push(s.dir+"/"));for(const r of s.files){const c=path.join(e,r);!fs.existsSync(c)||isFileClaimedByOtherKit(r,o,e)||(0,file_operations_1.removeFile)(c)&&((0,logger_1.printSuccess)(`Removed ${r}`),i=!0,n.push(r))}if(o==="claude"){stripAgentkitBlockFrom(path.join(e,"AGENTS.md"),"claude")&&(i=!0);const r=path.join(e,"CLAUDE.md");if(fs.existsSync(r)){const c=(0,claude_instructions_1.stripAikitClaudeBlock)(fs.readFileSync(r,"utf-8"));c.removedWholeFile?(0,file_operations_1.removeFile)(r)&&((0,logger_1.printSuccess)("Removed CLAUDE.md"),i=!0,n.push("CLAUDE.md")):c.removed&&(fs.writeFileSync(r,c.content,"utf8"),(0,logger_1.printSuccess)("Removed Agentkit import from CLAUDE.md"),i=!0)}}if(["codex","cursor","opencode","kimi","grok"].includes(o)){const r=path.join(e,".agents");fs.existsSync(r)&&(0,file_operations_1.removeDir)(r)&&((0,logger_1.printSuccess)("Removed .agents/"),i=!0,n.push(".agents/"))}if(o==="codex"&&stripAgentkitBlockFrom(path.join(e,"AGENTS.md"))&&(i=!0),o==="kimi"&&(stripAgentkitBlockFrom(path.join(e,"AGENTS.md"))&&(i=!0),(0,kimi_hooks_toml_1.removeKimiHooks)((0,kimi_1.resolveKimiHomeConfig)())&&((0,logger_1.printSuccess)("Removed Agentkit hooks from the Kimi user config"),i=!0)),o==="hermes"&&stripAgentkitBlockFrom(path.join(e,"AGENTS.md"))&&(i=!0),o==="pi"&&removePiExtras(path.join(e,pi_home_1.PI_PROJECT_DIR),path.join(e,"AGENTS.md"))&&(i=!0),o==="devin"){stripAgentkitBlockFrom(path.join(e,"AGENTS.md"))&&(i=!0),(0,devin_hooks_1.removeDevinHooks)(path.join(t,"hooks.v1.json"),"whole")&&((0,logger_1.printSuccess)("Removed Agentkit hook handlers from .devin/hooks.v1.json"),i=!0);for(const l of["scripts","schemas"])(0,file_operations_1.removeDir)(path.join(t,l))&&((0,logger_1.printSuccess)(`Removed .devin/${l}/`),i=!0);const r=(0,devin_hooks_1.devinHookFileNames)();let c=0;for(const l of r)(0,file_operations_1.removeFile)(path.join(t,l))&&(c+=1);c>0&&((0,logger_1.printSuccess)(`Removed ${c} hook file(s) from .devin/hooks/`),i=!0);const f=[{dir:"rules",names:(0,devin_rules_1.devinOwnedRuleNames)(path.join(t,"rules"))},{dir:"agents",names:(0,devin_agents_1.devinOwnedAgentNames)(path.join(t,"agents"))}].filter(({dir:l,names:d})=>{for(const h of d)(0,file_operations_1.removeFile)(path.join(t,l,h));return d.length>0});for(const{dir:l,names:d}of f)(0,logger_1.printSuccess)(`Removed ${d.length} Agentkit file(s) from .devin/${l}/`),i=!0;const u=[...(0,file_operations_1.shippedSkillEntries)((0,package_root_1.packageRoot)()).map(l=>l.name),...(0,commands_to_skills_1.commandSkillNames)(path.join((0,package_root_1.packageRoot)(),payload_roots_1.COMMAND_SOURCE_DIR)),...(0,retired_skills_1.retiredSkillNames)()];let a=0;const p=path.join(e,".agents","skills"),S=path.join(t,"skills");for(const l of u)(0,file_operations_1.removeDir)(path.join(p,l))&&(a+=1),(0,file_operations_1.removeDir)(path.join(S,l))&&(a+=1);a>0&&((0,logger_1.printSuccess)(`Removed ${a} skill(s) from .agents/skills/`),i=!0);for(const l of[p,path.join(e,".agents")])try{fs.existsSync(l)&&fs.readdirSync(l).length===0&&(fs.rmdirSync(l),l===path.join(e,".agents")&&n.push(".agents/"))}catch{}const m=path.join(t,"mcp_config.json");if(fs.existsSync(m)){const{remaining:l}=(0,dropped_mcp_servers_1.removeAgentkitMcpServers)(m);l===0?((0,file_operations_1.removeFile)(m),(0,logger_1.printSuccess)("Removed .devin/mcp_config.json")):l===null?(0,logger_1.printWarning)("Kept .devin/mcp_config.json \u2014 it could not be read as an mcpServers map"):(0,logger_1.printWarning)(`Kept .devin/mcp_config.json \u2014 it still holds ${l} of your own server(s)`),i=!0}for(const l of[".agentkit.json",".agentkitignore",install_manifest_1.MANIFEST_FILENAME])(0,file_operations_1.removeFile)(path.join(t,l))&&(i=!0);for(const l of["skills","agents","rules","hooks/scout-block/vendor","hooks/scout-block","hooks/lib","hooks",""]){const d=l?path.join(t,l):t;try{fs.existsSync(d)&&fs.readdirSync(d).length===0&&(fs.rmdirSync(d),l||n.push(`${s.dir}/`))}catch{}}}if(o==="claude"){const r=path.join(e,".mcp.json");fs.existsSync(r)&&(0,file_operations_1.removeFile)(r)&&((0,logger_1.printSuccess)("Removed .mcp.json from project root"),i=!0,n.push(".mcp.json"))}if(o==="cursor"){const r=path.join(e,".cursor","mcp.json");fs.existsSync(r)&&(0,file_operations_1.removeFile)(r)&&((0,logger_1.printSuccess)("Removed mcp.json from .cursor/"),i=!0,n.push(".cursor/mcp.json"));const c=path.join(e,".cursor","hooks.json");fs.existsSync(c)&&(0,file_operations_1.removeFile)(c)&&((0,logger_1.printSuccess)("Removed hooks.json from .cursor/"),i=!0,n.push(".cursor/hooks.json"));const f=path.join(e,"plugins","local","context-mode");fs.existsSync(f)&&(0,file_operations_1.removeDir)(f)&&((0,logger_1.printSuccess)("Removed context-mode from Cursor local plugins directory"),i=!0);const u=path.join(e,".cursor");fs.existsSync(u)&&fs.readdirSync(u).length===0&&(0,file_operations_1.removeDir)(u)&&((0,logger_1.printSuccess)("Removed empty .cursor/ directory"),i=!0,n.push(".cursor/"))}return n.length>0&&(0,gitignore_1.cleanupGitignore)(n,e),i}
|
package/scripts-dist/lib/kits.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(e,i,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(i,n);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[n]}}),Object.defineProperty(e,r,o)}):(function(e,i,n,r){r===void 0&&(r=n),e[r]=i[n]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(e,i){Object.defineProperty(e,"default",{enumerable:!0,value:i})}):function(e,i){e.default=i}),__importStar=this&&this.__importStar||(function(){var e=function(i){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(i)};return function(i){if(i&&i.__esModule)return i;var n={};if(i!=null)for(var r=e(i),o=0;o<r.length;o++)r[o]!=="default"&&__createBinding(n,i,r[o]);return __setModuleDefault(n,i),n}})();Object.defineProperty(exports,"__esModule",{value:!0}),exports.ALL_KIT_NAMES=exports.PROJECT_KITS=exports.PROJECT_ONLY_INSTALL_KITS=exports.GLOBAL_ONLY_INSTALL_KITS=exports.HOST_DETECTION=exports.kitDefinitions=void 0,exports.supportsProjectInstall=supportsProjectInstall,exports.supportsGlobalInstall=supportsGlobalInstall,exports.isHostInstalled=isHostInstalled,exports.detectAllGlobalCLIs=detectAllGlobalCLIs,exports.detectCurrentKit=detectCurrentKit,exports.choiceToKit=choiceToKit,exports.isKitName=isKitName,exports.normalizeKitName=normalizeKitName;const fs=__importStar(require("fs")),path=__importStar(require("path")),os=__importStar(require("os")),child_process_1=require("child_process");exports.kitDefinitions={claude:{name:"Claude Code",dir:".claude",files:[".mcp.json"],claims:["CLAUDE.md","AGENTS.md"]},cursor:{name:"Cursor AI",dir:".cursor",files:["AGENTS.md"]},augment:{name:"Augment Code",dir:".claude",files:["CLAUDE.md"]},antigravity:{name:"Antigravity",dir:".agents",files:["GEMINI.md"]},opencode:{name:"OpenCode",dir:".opencode",files:[]},codex:{name:"OpenAI Codex",dir:".codex",files:[]},kimi:{name:"Kimi Code",dir:".kimi-code",files:[]},hermes:{name:"Hermes Agent",dir:".hermes-kit",files:[]},openclaw:{name:"OpenClaw",dir:".openclaw-kit",files:[]},omp:{name:"Oh My Pi",dir:".omp",files:[]},grok:{name:"Grok Build",dir:".grok",files:[]},pi:{name:"Pi",dir:path.join(".pi","agentkit"),files:[]},devin:{name:"Devin CLI",dir:".devin",files:[]}};function checkCommandExists(e){try{return(0,child_process_1.execSync)(`command -v ${e}`,{stdio:"ignore"}),!0}catch{return!1}}function checkMacApp(e){return process.platform!=="darwin"?!1:[path.join("/Applications",`${e}.app`),path.join(os.homedir(),"Applications",`${e}.app`)].some(i=>fs.existsSync(i))}exports.HOST_DETECTION={claude:{commands:["claude","augment"]},opencode:{commands:["opencode"]},cursor:{commands:["cursor"],macApps:["Cursor"]},antigravity:{commands:["antigravity","gemini"],macApps:["Antigravity","Antigravity IDE"]},codex:{commands:["codex"]},kimi:{commands:["kimi"]},hermes:{commands:["hermes"]},openclaw:{commands:["openclaw"]},omp:{commands:["omp"]},grok:{commands:["grok"]},pi:{commands:["pi"]},devin:{commands:["devin"]}},exports.GLOBAL_ONLY_INSTALL_KITS=["hermes","openclaw","omp"],exports.PROJECT_ONLY_INSTALL_KITS=["augment"],exports.PROJECT_KITS=["claude","opencode","cursor","antigravity","codex","kimi","hermes","openclaw","grok","pi","devin"];function supportsProjectInstall(e){return!exports.GLOBAL_ONLY_INSTALL_KITS.includes(e)}function supportsGlobalInstall(e){return!exports.PROJECT_ONLY_INSTALL_KITS.includes(e)}function isHostInstalled(e){const i=exports.HOST_DETECTION[e];return i?(i.commands??[]).some(checkCommandExists)||(i.macApps??[]).some(checkMacApp):!1}function detectAllGlobalCLIs(){return Object.keys(exports.HOST_DETECTION).filter(e=>isHostInstalled(e))}function detectGlobalCLI(){const e=detectAllGlobalCLIs();return e.length>1?null:e[0]??null}function detectCurrentKit(e){const i=os.homedir();if(!(path.resolve(e)===path.resolve(i))){const o=[{kit:"cursor",dir:path.join(".cursor","rules"),number:"3"},{kit:"
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(e,i,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(i,n);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[n]}}),Object.defineProperty(e,r,o)}):(function(e,i,n,r){r===void 0&&(r=n),e[r]=i[n]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(e,i){Object.defineProperty(e,"default",{enumerable:!0,value:i})}):function(e,i){e.default=i}),__importStar=this&&this.__importStar||(function(){var e=function(i){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(i)};return function(i){if(i&&i.__esModule)return i;var n={};if(i!=null)for(var r=e(i),o=0;o<r.length;o++)r[o]!=="default"&&__createBinding(n,i,r[o]);return __setModuleDefault(n,i),n}})();Object.defineProperty(exports,"__esModule",{value:!0}),exports.ALL_KIT_NAMES=exports.PROJECT_KITS=exports.PROJECT_ONLY_INSTALL_KITS=exports.GLOBAL_ONLY_INSTALL_KITS=exports.HOST_DETECTION=exports.kitDefinitions=void 0,exports.supportsProjectInstall=supportsProjectInstall,exports.supportsGlobalInstall=supportsGlobalInstall,exports.isHostInstalled=isHostInstalled,exports.detectAllGlobalCLIs=detectAllGlobalCLIs,exports.detectCurrentKit=detectCurrentKit,exports.choiceToKit=choiceToKit,exports.isKitName=isKitName,exports.normalizeKitName=normalizeKitName;const fs=__importStar(require("fs")),path=__importStar(require("path")),os=__importStar(require("os")),child_process_1=require("child_process");exports.kitDefinitions={claude:{name:"Claude Code",dir:".claude",files:[".mcp.json"],claims:["CLAUDE.md","AGENTS.md"]},cursor:{name:"Cursor AI",dir:".cursor",files:["AGENTS.md"]},augment:{name:"Augment Code",dir:".claude",files:["CLAUDE.md"]},antigravity:{name:"Antigravity",dir:".agents",files:["GEMINI.md"]},opencode:{name:"OpenCode",dir:".opencode",files:[]},codex:{name:"OpenAI Codex",dir:".codex",files:[]},kimi:{name:"Kimi Code",dir:".kimi-code",files:[]},hermes:{name:"Hermes Agent",dir:".hermes-kit",files:[]},openclaw:{name:"OpenClaw",dir:".openclaw-kit",files:[]},omp:{name:"Oh My Pi",dir:".omp",files:[]},grok:{name:"Grok Build",dir:".grok",files:[]},pi:{name:"Pi",dir:path.join(".pi","agentkit"),files:[]},devin:{name:"Devin CLI",dir:".devin",files:[]}};function checkCommandExists(e){try{return(0,child_process_1.execSync)(`command -v ${e}`,{stdio:"ignore"}),!0}catch{return!1}}function checkMacApp(e){return process.platform!=="darwin"?!1:[path.join("/Applications",`${e}.app`),path.join(os.homedir(),"Applications",`${e}.app`)].some(i=>fs.existsSync(i))}exports.HOST_DETECTION={claude:{commands:["claude","augment"]},opencode:{commands:["opencode"]},cursor:{commands:["cursor"],macApps:["Cursor"]},antigravity:{commands:["antigravity","gemini"],macApps:["Antigravity","Antigravity IDE"]},codex:{commands:["codex"]},kimi:{commands:["kimi"]},hermes:{commands:["hermes"]},openclaw:{commands:["openclaw"]},omp:{commands:["omp"]},grok:{commands:["grok"]},pi:{commands:["pi"]},devin:{commands:["devin"]}},exports.GLOBAL_ONLY_INSTALL_KITS=["hermes","openclaw","omp"],exports.PROJECT_ONLY_INSTALL_KITS=["augment"],exports.PROJECT_KITS=["claude","opencode","cursor","antigravity","codex","kimi","hermes","openclaw","grok","pi","devin"];function supportsProjectInstall(e){return!exports.GLOBAL_ONLY_INSTALL_KITS.includes(e)}function supportsGlobalInstall(e){return!exports.PROJECT_ONLY_INSTALL_KITS.includes(e)}function isHostInstalled(e){const i=exports.HOST_DETECTION[e];return i?(i.commands??[]).some(checkCommandExists)||(i.macApps??[]).some(checkMacApp):!1}function detectAllGlobalCLIs(){return Object.keys(exports.HOST_DETECTION).filter(e=>isHostInstalled(e))}function detectGlobalCLI(){const e=detectAllGlobalCLIs();return e.length>1?null:e[0]??null}function detectCurrentKit(e){const i=os.homedir();if(!(path.resolve(e)===path.resolve(i))){const o=[{kit:"cursor",dir:path.join(".cursor","rules"),number:"3"},{kit:"opencode",dir:".opencode",number:"2"},{kit:"codex",dir:".codex",number:"5"},{kit:"kimi",dir:".kimi-code",number:"6"},{kit:"hermes",dir:".hermes-kit",number:"7"},{kit:"openclaw",dir:".openclaw-kit",number:"8"},{kit:"grok",dir:path.join(".grok","rules"),number:"10"},{kit:"pi",dir:path.join(".pi","agentkit"),number:"11"},{kit:"devin",dir:path.join(".devin","rules"),number:"12"},{kit:"antigravity",dir:".agents",number:"4"},{kit:"claude",dir:".claude",number:"1"}],c=path.join(e,".cursorrules"),s=path.join(e,".claude");if(fs.existsSync(c)&&fs.existsSync(s))return{kit:"cursor",number:"3"};for(const{kit:a,dir:u,number:d}of o){const t=path.join(e,u);if(fs.existsSync(t)){const l=fs.statSync(t).isDirectory(),m=fs.statSync(t).isFile();if(l||m)return{kit:a,number:d}}}}const r=detectGlobalCLI();return r?{kit:r,number:{claude:"1",opencode:"2",cursor:"3",antigravity:"4",codex:"5",kimi:"6",augment:"1",hermes:"7",openclaw:"8",omp:"9",grok:"10",pi:"11",devin:"12"}[r]}:null}function choiceToKit(e){return{1:"claude",2:"opencode",3:"cursor",4:"antigravity",5:"codex",6:"kimi"}[e]||null}exports.ALL_KIT_NAMES=["claude","cursor","augment","antigravity","opencode","codex","kimi","hermes","openclaw","omp","grok","pi","devin"];function isKitName(e){return exports.ALL_KIT_NAMES.includes(e)}const KIT_NAME_ALIASES={claude:"claude","claude-code":"claude",claudecode:"claude",claude_code:"claude",cursor:"cursor","cursor-ai":"cursor",cursorai:"cursor",cursor_ai:"cursor",augment:"augment","augment-code":"augment",augmentcode:"augment",antigravity:"antigravity",gemini:"antigravity",google:"antigravity","google-antigravity":"antigravity",opencode:"opencode","open-code":"opencode",codex:"codex",openai:"codex","openai-codex":"codex",openai_codex:"codex",kimi:"kimi","kimi-code":"kimi",kimicode:"kimi",moonshot:"kimi",hermes:"hermes","hermes-agent":"hermes",hermesagent:"hermes",openclaw:"openclaw","open-claw":"openclaw",omp:"omp","oh-my-pi":"omp",ohmypi:"omp",oh_my_pi:"omp",pi:"pi","pi-agent":"pi",piagent:"pi","pi-coding-agent":"pi",picodingagent:"pi",earendil:"pi",grok:"grok","grok-build":"grok",grokbuild:"grok",xai:"grok",devin:"devin","devin-cli":"devin",devincli:"devin",cognition:"devin"};function normalizeKitName(e){if(!e||typeof e!="string")return null;const i=e.trim().toLowerCase();return KIT_NAME_ALIASES[i]??null}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(r,e,a,t){t===void 0&&(t=a);var n=Object.getOwnPropertyDescriptor(e,a);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[a]}}),Object.defineProperty(r,t,n)}):(function(r,e,a,t){t===void 0&&(t=a),r[t]=e[a]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}):function(r,e){r.default=e}),__importStar=this&&this.__importStar||(function(){var r=function(e){return r=Object.getOwnPropertyNames||function(a){var t=[];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[t.length]=n);return t},r(e)};return function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var t=r(e),n=0;n<t.length;n++)t[n]!=="default"&&__createBinding(a,e,t[n]);return __setModuleDefault(a,e),a}})();Object.defineProperty(exports,"__esModule",{value:!0}),exports.PROFILE_RULE_SKIP=exports.GAMEDEV_RULES=void 0,exports.ruleSkipFor=ruleSkipFor,exports.rulesForProfile=rulesForProfile;const path=__importStar(require("path")),rule_metadata_1=require("./kit-installers/rule-metadata"),payload_roots_1=require("./payload-roots");exports.GAMEDEV_RULES=["ai-code","data-files","design-docs","engine-code","game-narrative","game-test-standards","gameplay-code","network-code","prototype-code","scene-files","shader-code","ui-code"],exports.PROFILE_RULE_SKIP={frontend:["database-security","team-coordination-rules"],backend:["dart","kotlin","swift","team-coordination-rules"],mobile:["database-security","team-coordination-rules"],fullstack:["team-coordination-rules"],gamedev:["dart","kotlin","swift","database-security","team-coordination-rules"],marketing:["dart","kotlin","swift","database-security","team-coordination-rules"],assistant:["dart","kotlin","swift","database-security","team-coordination-rules"]};function ruleSkipFor(r){return r==="core"||r==="full"?[]:exports.PROFILE_RULE_SKIP[r]}function rulesForProfile(r,e){const a=new Set(ruleSkipFor(e));return(0,rule_metadata_1.readRulesDir)(path.join(r,payload_roots_1.RULES_SOURCE_DIR)).rules.map(t=>t.name).filter(t=>!a.has(t))}
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(r,e,a,t){t===void 0&&(t=a);var n=Object.getOwnPropertyDescriptor(e,a);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[a]}}),Object.defineProperty(r,t,n)}):(function(r,e,a,t){t===void 0&&(t=a),r[t]=e[a]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}):function(r,e){r.default=e}),__importStar=this&&this.__importStar||(function(){var r=function(e){return r=Object.getOwnPropertyNames||function(a){var t=[];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[t.length]=n);return t},r(e)};return function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var t=r(e),n=0;n<t.length;n++)t[n]!=="default"&&__createBinding(a,e,t[n]);return __setModuleDefault(a,e),a}})();Object.defineProperty(exports,"__esModule",{value:!0}),exports.PROFILE_RULE_SKIP=exports.GAMEDEV_RULES=void 0,exports.ruleSkipFor=ruleSkipFor,exports.rulesForProfile=rulesForProfile;const path=__importStar(require("path")),rule_metadata_1=require("./kit-installers/rule-metadata"),payload_roots_1=require("./payload-roots");exports.GAMEDEV_RULES=["ai-code","data-files","design-docs","engine-code","game-narrative","game-test-standards","gameplay-code","network-code","prototype-code","scene-files","shader-code","ui-code"],exports.PROFILE_RULE_SKIP={frontend:["database-security","team-coordination-rules"],backend:["dart","kotlin","swift","team-coordination-rules"],mobile:["database-security","team-coordination-rules"],fullstack:["team-coordination-rules"],gamedev:["dart","kotlin","swift","database-security","team-coordination-rules"],marketing:["dart","kotlin","swift","database-design","database-security","framework-patterns","review-audit-self-decision","team-coordination-rules","typescript"],assistant:["dart","kotlin","swift","database-security","team-coordination-rules"]};function ruleSkipFor(r){return r==="core"||r==="full"?[]:exports.PROFILE_RULE_SKIP[r]}function rulesForProfile(r,e){const a=new Set(ruleSkipFor(e));return(0,rule_metadata_1.readRulesDir)(path.join(r,payload_roots_1.RULES_SOURCE_DIR)).rules.map(t=>t.name).filter(t=>!a.has(t))}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SKILL_DEPENDENCIES=exports.DEFAULT_EXCLUDED_SKILLS=exports.CORE_SKILLS=exports.DEFAULT_PROFILE=exports.PROFILES=void 0,exports.defaultProfileForKit=defaultProfileForKit,exports.resolveEffectiveProfile=resolveEffectiveProfile,exports.withDependencies=withDependencies,exports.isNameOnlyProfile=isNameOnlyProfile,exports.profileSkillNames=profileSkillNames,exports.profileIncludeCategories=profileIncludeCategories,exports.profileExtraSkills=profileExtraSkills,exports.isValidProfile=isValidProfile,exports.profileToSkipDirs=profileToSkipDirs,exports.resolveSkipDirs=resolveSkipDirs;const generate_catalogs_1=require("../gen/generate-catalogs"),retired_skills_1=require("./retired-skills");exports.PROFILES=["core","full","frontend","backend","mobile","fullstack","gamedev","marketing","assistant"],exports.DEFAULT_PROFILE="core";function defaultProfileForKit(e){return ASSISTANT_PROFILE_KITS.has(e)?"assistant":exports.DEFAULT_PROFILE}function resolveEffectiveProfile(e,t,s,n){return e??(t?s:null)??defaultProfileForKit(n)}const ASSISTANT_PROFILE_KITS=new Set(["hermes","openclaw"]);exports.CORE_SKILLS=new Set(["ak-plan","cook","ak-fix","test","ak-code-review","ak-debug","scout","brainstorm","ship","journal","git","worktree","docs","docs-seeker","find-skills","problem-solving","refactor","context-engineering","research","preview","mermaidjs-v11"]),exports.DEFAULT_EXCLUDED_SKILLS=new Set(["twilio","expo","flutter","gsap","shopify","zalo-mini-app","stitch","remotion","shader","threejs","clone-website","pentester","cti-expert","ai-artist","chrome-devtools","chrome-profile","xia","agentize","show-off","mintlify","seo","social-calendar","email-marketing","paid-ads","marketing-analytics","product-marketing","campaign-plan","crm-automation","pr-outreach","growth-referral","aso-app-marketing","video-content-repurposing","fomo-cc","enhance-ux-ax","gamedev"]);const PROFILE_INCLUDES={frontend:["frontend","design","frameworks"],backend:["backend","database","infrastructure","security"],mobile:["frontend","frameworks","design"],fullstack:["frontend","backend","database","infrastructure","frameworks","design"],gamedev:["gamedev","multimedia"],marketing:["marketing","design","seo","documents","multimedia"
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SKILL_DEPENDENCIES=exports.DEFAULT_EXCLUDED_SKILLS=exports.CORE_SKILLS=exports.DEFAULT_PROFILE=exports.PROFILES=void 0,exports.defaultProfileForKit=defaultProfileForKit,exports.resolveEffectiveProfile=resolveEffectiveProfile,exports.withDependencies=withDependencies,exports.isNameOnlyProfile=isNameOnlyProfile,exports.profileSkillNames=profileSkillNames,exports.profileIncludeCategories=profileIncludeCategories,exports.profileExtraSkills=profileExtraSkills,exports.profileExcludedCoreSkills=profileExcludedCoreSkills,exports.isValidProfile=isValidProfile,exports.profileToSkipDirs=profileToSkipDirs,exports.resolveSkipDirs=resolveSkipDirs;const generate_catalogs_1=require("../gen/generate-catalogs"),retired_skills_1=require("./retired-skills");exports.PROFILES=["core","full","frontend","backend","mobile","fullstack","gamedev","marketing","assistant"],exports.DEFAULT_PROFILE="core";function defaultProfileForKit(e){return ASSISTANT_PROFILE_KITS.has(e)?"assistant":exports.DEFAULT_PROFILE}function resolveEffectiveProfile(e,t,s,n){return e??(t?s:null)??defaultProfileForKit(n)}const ASSISTANT_PROFILE_KITS=new Set(["hermes","openclaw"]);exports.CORE_SKILLS=new Set(["ak-plan","cook","ak-fix","test","ak-code-review","ak-debug","scout","brainstorm","ship","journal","git","worktree","docs","docs-seeker","find-skills","problem-solving","refactor","context-engineering","research","preview","mermaidjs-v11"]),exports.DEFAULT_EXCLUDED_SKILLS=new Set(["twilio","expo","flutter","gsap","shopify","zalo-mini-app","stitch","remotion","shader","threejs","clone-website","pentester","cti-expert","ai-artist","chrome-devtools","chrome-profile","xia","agentize","show-off","mintlify","seo","social-calendar","email-marketing","paid-ads","marketing-analytics","product-marketing","campaign-plan","crm-automation","pr-outreach","growth-referral","aso-app-marketing","video-content-repurposing","fomo-cc","enhance-ux-ax","gamedev"]);const PROFILE_INCLUDES={frontend:["frontend","design","frameworks"],backend:["backend","database","infrastructure","security"],mobile:["frontend","frameworks","design"],fullstack:["frontend","backend","database","infrastructure","frameworks","design"],gamedev:["gamedev","multimedia"],marketing:["marketing","design","seo","documents","multimedia"],assistant:[]},PROFILE_EXTRA_SKILLS={gamedev:["threejs","shader","ai-artist","ai-multimodal","ui-ux-pro-max","ak-scenario","ak-optimize"],marketing:["ai-artist","ai-multimodal","copywriting","show-off","project-management","frontend-design","agent-browser","project-organization","ak-sowat","enhance-ux-ax"]},PROFILE_EXCLUDED_CORE_SKILLS={marketing:new Set(["ak-code-review","ak-debug","ak-fix","cook","git","refactor","scout","ship","test","worktree"])};exports.SKILL_DEPENDENCIES={"enhance-ux-ax":["seo"]};function withDependencies(e){const t=new Set(e);let s=!0;for(;s;){s=!1;for(const n of[...t])for(const a of exports.SKILL_DEPENDENCIES[n]??[])t.has(a)||(t.add(a),s=!0)}return t}const NAME_ONLY_PROFILES=new Set(["assistant"]),PROFILE_SKILL_NAMES={assistant:["research","problem-solving","brainstorm","context-engineering","ak-advise","ak-plan","project-organization","retro","git","test","document-skills","docs-seeker","media-processing","copywriting","mermaidjs-v11"]};function isNameOnlyProfile(e){return NAME_ONLY_PROFILES.has(e)}function profileSkillNames(e){return e==="full"||e==="core"?[]:PROFILE_SKILL_NAMES[e]??[]}function profileIncludeCategories(e){return e==="full"||e==="core"?[]:PROFILE_INCLUDES[e]}function profileExtraSkills(e){return e==="full"||e==="core"?[]:PROFILE_EXTRA_SKILLS[e]??[]}function profileExcludedCoreSkills(e){return e==="full"||e==="core"?new Set:PROFILE_EXCLUDED_CORE_SKILLS[e]??new Set}function isValidProfile(e){return exports.PROFILES.includes(e)}function profileToSkipDirs(e,t){if(t==="full")return[];if(t==="core"){const r=(0,generate_catalogs_1.collectSkills)(e),i=withDependencies(r.filter(o=>!exports.DEFAULT_EXCLUDED_SKILLS.has(o.name)).map(o=>o.name));return r.filter(o=>!i.has(o.name)).map(o=>o.name).sort()}if(NAME_ONLY_PROFILES.has(t)){const r=withDependencies(PROFILE_SKILL_NAMES[t]??[]);return(0,generate_catalogs_1.collectSkills)(e).filter(i=>!r.has(i.name)).map(i=>i.name).sort()}const s=new Set(PROFILE_INCLUDES[t]),n=new Set(PROFILE_EXTRA_SKILLS[t]??[]),a=profileExcludedCoreSkills(t),l=(0,generate_catalogs_1.collectSkills)(e),c=withDependencies(l.filter(r=>s.has(r.category)||exports.CORE_SKILLS.has(r.name)&&!a.has(r.name)||n.has(r.name)).map(r=>r.name));return l.filter(r=>!c.has(r.name)).map(r=>r.name).sort()}function resolveSkipDirs(e,t,s=[]){const n=withDependencies(s);return[...new Set([...profileToSkipDirs(e,t),...retired_skills_1.RETIRED_SKILLS])].filter(l=>!n.has(l)).sort()}
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(t,e,n,s){s===void 0&&(s=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,s,r)}):(function(t,e,n,s){s===void 0&&(s=n),t[s]=e[n]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),__importStar=this&&this.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var s=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(s[s.length]=r);return s},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var s=t(e),r=0;r<s.length;r++)s[r]!=="default"&&__createBinding(n,e,s[r]);return __setModuleDefault(n,e),n}})();Object.defineProperty(exports,"__esModule",{value:!0}),exports.agentsDirFor=agentsDirFor,exports.installAgentsForKit=installAgentsForKit,exports.syncSkillCompanionAssets=syncSkillCompanionAssets;const fs=__importStar(require("fs")),os=__importStar(require("os")),path=__importStar(require("path")),checks_rules_1=require("../doctor/checks-rules"),kit_layout_1=require("../doctor/kit-layout"),install_profile_config_1=require("../install-profile-config"),antigravity_1=require("../kit-installers/antigravity"),claude_agents_1=require("../kit-installers/claude-agents"),codex_subagents_1=require("../kit-installers/codex-subagents"),cursor_agents_1=require("../kit-installers/cursor-agents"),gamedev_profile_assets_1=require("../kit-installers/gamedev-profile-assets"),gamedev_mcp_1=require("../kit-installers/gamedev-mcp"),grok_agents_1=require("../kit-installers/grok-agents"),kimi_agents_1=require("../kit-installers/kimi-agents"),
|
|
2
|
-
${o.join(`
|
|
3
|
-
`)}
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
${r}`)}}}function installAgentsForKit(t,e,n){if(fs.existsSync(e))switch(fs.mkdirSync(n,{recursive:!0}),t.kit){case"claude":{(0,gamedev_profile_assets_1.copyMarkdownAgents)(e,n);const s=(0,install_profile_config_1.readInstallSettings)(t.configPath).agentModels??claude_agents_1.DEFAULT_CLAUDE_AGENT_MODELS;(0,claude_agents_1.applyClaudeAgentModels)(n,s);break}case"augment":case"antigravity":(0,gamedev_profile_assets_1.copyMarkdownAgents)(e,n);break;case"cursor":(0,cursor_agents_1.convertAgentsToCursor)(e,n);break;case"opencode":(0,opencode_agents_1.convertAgentsToOpenCode)(e,n);break;case"codex":(0,codex_subagents_1.convertAgentsToCodexToml)(e,n);break;case"kimi":(0,kimi_agents_1.convertAgentsToKimi)(e,n);break;case"grok":(0,grok_agents_1.convertAgentsToGrok)(e,n);break;case"devin":(0,gamedev_profile_assets_1.writeDevinGamedevAgents)(e,n);break;case"omp":writeOmpAgentsIncremental(e,n);break}}function installSeoAgentsForKit(t,e,n){const s=path.join(e,payload_roots_1.AGENTS_SOURCE_DIR);if(!fs.existsSync(s))return!1;const r=fs.readdirSync(s).filter(i=>/^seo-[a-z0-9-]+\.md$/.test(i)).sort();if(r.length===0)return!1;const a=fs.mkdtempSync(path.join(os.tmpdir(),"agentkit-seo-agents-"));try{for(const i of r)fs.copyFileSync(path.join(s,i),path.join(a,i));return installAgentsForKit(t,a,n),!0}finally{fs.rmSync(a,{recursive:!0,force:!0})}}function syncRoutingRules(t,e,n,s){if(kit_layout_1.KIT_LAYOUTS[t.kit].hasAgentkitSkills===!1)return;const r=(0,checks_rules_1.rulesDirFor)(t);if(!fs.existsSync(r))return;const a=path.join(e,payload_roots_1.RULES_SOURCE_DIR);for(const i of routing_rule_prune_1.PRUNED_RULES){const o=i.replace(/\.md$/,""),d=fs.existsSync(path.join(r,`${o}.md`))||fs.existsSync(path.join(r,`${o}.mdc`)),c=path.join(a,i);d&&fs.existsSync(c)&&(0,gamedev_profile_assets_1.writeRuleInHostFormat)(r,o,fs.readFileSync(c,"utf8"))}(0,routing_rule_prune_1.pruneRoutingRulesForInstall)(e,r,(0,skill_profiles_1.resolveSkipDirs)(e,n,[...s]))}function syncSkillCompanionAssets(t,e,n,s,r={}){const a=new Set(r.addedSkills??[]),i=new Set(r.removedSkills??[]),o=(0,profile_context_1.buildProfileInstallContext)(e,n,s),d=(0,gamedev_profile_assets_1.carriesGamedevCompanion)(o),c=(0,gamedev_profile_assets_1.carriesSeoCompanion)(o),u=(0,checks_rules_1.rulesDirFor)(t),l=agentsDirFor(t);let m=!1,_=!1,g=!1,p=!1;if(a.has("gamedev")||d)fs.existsSync(u)&&(0,gamedev_profile_assets_1.syncGamedevRules)(u,o,e),l&&installAgentsForKit(t,path.join(e,gamedev_profile_assets_1.GAMEDEV_AGENTS_SUBDIR),l),(0,gamedev_mcp_1.syncGamedevMcpForKit)(t,!0),m=a.has("gamedev");else if(i.has("gamedev")){const f=fs.existsSync(u)?(0,gamedev_profile_assets_1.removeGamedevRulesFromDir)(u):0,v=l?(0,gamedev_profile_assets_1.removeGamedevAgentsFromDir)(e,l):0,k=(0,gamedev_mcp_1.syncGamedevMcpForKit)(t,!1);_=f>0||v>0||k}if(a.has("seo")||c){const f=l?installSeoAgentsForKit(t,e,l):!1;g=a.has("seo")&&f}else i.has("seo")&&!c&&(p=(l?(0,gamedev_profile_assets_1.removeSeoAgentsFromDir)(l):0)>0);return syncRoutingRules(t,e,n,s),{gamedevInstalled:m,gamedevRemoved:_,seoInstalled:g,seoRemoved:p}}
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(t,e,n,s){s===void 0&&(s=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,s,r)}):(function(t,e,n,s){s===void 0&&(s=n),t[s]=e[n]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),__importStar=this&&this.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var s=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(s[s.length]=r);return s},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var s=t(e),r=0;r<s.length;r++)s[r]!=="default"&&__createBinding(n,e,s[r]);return __setModuleDefault(n,e),n}})();Object.defineProperty(exports,"__esModule",{value:!0}),exports.agentsDirFor=agentsDirFor,exports.installAgentsForKit=installAgentsForKit,exports.syncSkillCompanionAssets=syncSkillCompanionAssets;const fs=__importStar(require("fs")),os=__importStar(require("os")),path=__importStar(require("path")),checks_rules_1=require("../doctor/checks-rules"),kit_layout_1=require("../doctor/kit-layout"),install_profile_config_1=require("../install-profile-config"),antigravity_1=require("../kit-installers/antigravity"),claude_agents_1=require("../kit-installers/claude-agents"),codex_subagents_1=require("../kit-installers/codex-subagents"),cursor_agents_1=require("../kit-installers/cursor-agents"),gamedev_profile_assets_1=require("../kit-installers/gamedev-profile-assets"),gamedev_mcp_1=require("../kit-installers/gamedev-mcp"),grok_agents_1=require("../kit-installers/grok-agents"),kimi_agents_1=require("../kit-installers/kimi-agents"),opencode_agents_1=require("../kit-installers/opencode-agents"),profile_context_1=require("../kit-installers/profile-context"),routing_rule_prune_1=require("../kit-installers/routing-rule-prune"),omp_home_1=require("../omp-home"),payload_roots_1=require("../payload-roots"),skill_profiles_1=require("../skill-profiles");function agentsDirFor(t){return t.kit==="hermes"||t.kit==="openclaw"||t.kit==="pi"?null:t.kit==="antigravity"?path.join(t.kitRoot,antigravity_1.ANTIGRAVITY_PLUGIN_REL,"agents"):t.kit==="omp"?path.join(path.dirname(t.kitRoot),omp_home_1.OMP_AGENTS_DIR):path.join(t.kitRoot,"agents")}function installAgentsForKit(t,e,n){if(fs.existsSync(e))switch(fs.mkdirSync(n,{recursive:!0}),t.kit){case"claude":{(0,gamedev_profile_assets_1.copyMarkdownAgents)(e,n);const s=(0,install_profile_config_1.readInstallSettings)(t.configPath).agentModels??claude_agents_1.DEFAULT_CLAUDE_AGENT_MODELS;(0,claude_agents_1.applyClaudeAgentModels)(n,s);break}case"augment":case"antigravity":(0,gamedev_profile_assets_1.copyMarkdownAgents)(e,n);break;case"cursor":(0,cursor_agents_1.convertAgentsToCursor)(e,n);break;case"opencode":(0,opencode_agents_1.convertAgentsToOpenCode)(e,n);break;case"codex":(0,codex_subagents_1.convertAgentsToCodexToml)(e,n);break;case"kimi":(0,kimi_agents_1.convertAgentsToKimi)(e,n);break;case"grok":(0,grok_agents_1.convertAgentsToGrok)(e,n);break;case"devin":(0,gamedev_profile_assets_1.writeDevinGamedevAgents)(e,n);break;case"omp":(0,gamedev_profile_assets_1.writeOmpGamedevAgents)(e,n);break}}function installSeoAgentsForKit(t,e,n){const s=path.join(e,payload_roots_1.AGENTS_SOURCE_DIR);if(!fs.existsSync(s))return!1;const r=fs.readdirSync(s).filter(o=>/^seo-[a-z0-9-]+\.md$/.test(o)).sort();if(r.length===0)return!1;const i=fs.mkdtempSync(path.join(os.tmpdir(),"agentkit-seo-agents-"));try{for(const o of r)fs.copyFileSync(path.join(s,o),path.join(i,o));return installAgentsForKit(t,i,n),!0}finally{fs.rmSync(i,{recursive:!0,force:!0})}}function syncRoutingRules(t,e,n,s){if(kit_layout_1.KIT_LAYOUTS[t.kit].hasAgentkitSkills===!1)return;const r=(0,checks_rules_1.rulesDirFor)(t);if(!fs.existsSync(r))return;const i=path.join(e,payload_roots_1.RULES_SOURCE_DIR);for(const o of routing_rule_prune_1.PRUNED_RULES){const l=o.replace(/\.md$/,""),d=fs.existsSync(path.join(r,`${l}.md`))||fs.existsSync(path.join(r,`${l}.mdc`)),c=path.join(i,o);d&&fs.existsSync(c)&&(0,gamedev_profile_assets_1.writeRuleInHostFormat)(r,l,fs.readFileSync(c,"utf8"),t.kit==="omp"?"omp":void 0)}(0,routing_rule_prune_1.pruneRoutingRulesForInstall)(e,r,(0,skill_profiles_1.resolveSkipDirs)(e,n,[...s]))}function syncSkillCompanionAssets(t,e,n,s,r={}){const i=new Set(r.addedSkills??[]),o=new Set(r.removedSkills??[]),l=(0,profile_context_1.buildProfileInstallContext)(e,n,s),d=(0,gamedev_profile_assets_1.carriesGamedevCompanion)(l),c=(0,gamedev_profile_assets_1.carriesSeoCompanion)(l),u=(0,checks_rules_1.rulesDirFor)(t),a=agentsDirFor(t);let m=!1,g=!1,_=!1,p=!1;if(i.has("gamedev")||d)fs.existsSync(u)&&(0,gamedev_profile_assets_1.syncGamedevRules)(u,l,e,t.kit==="omp"?"omp":void 0),a&&installAgentsForKit(t,path.join(e,gamedev_profile_assets_1.GAMEDEV_AGENTS_SUBDIR),a),(0,gamedev_mcp_1.syncGamedevMcpForKit)(t,!0),m=i.has("gamedev");else if(o.has("gamedev")){const f=t.kit==="omp",v=fs.existsSync(u)?f?(0,gamedev_profile_assets_1.removeOmpManagedGamedevRules)(u):(0,gamedev_profile_assets_1.removeGamedevRulesFromDir)(u):0,k=a?f?(0,gamedev_profile_assets_1.removeOmpManagedGamedevAgents)(e,a):(0,gamedev_profile_assets_1.removeGamedevAgentsFromDir)(e,a):0,y=(0,gamedev_mcp_1.syncGamedevMcpForKit)(t,!1);g=v>0||k>0||y}if(i.has("seo")||c){const f=a?installSeoAgentsForKit(t,e,a):!1;_=i.has("seo")&&f}else o.has("seo")&&!c&&(p=(a?t.kit==="omp"?(0,gamedev_profile_assets_1.removeOmpManagedSeoAgents)(a):(0,gamedev_profile_assets_1.removeSeoAgentsFromDir)(a):0)>0);return syncRoutingRules(t,e,n,s),{gamedevInstalled:m,gamedevRemoved:g,seoInstalled:_,seoRemoved:p}}
|
package/scripts-dist/lib/ui.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(t,e,o,n){n===void 0&&(n=o);var
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(t,e,o,n){n===void 0&&(n=o);var s=Object.getOwnPropertyDescriptor(e,o);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[o]}}),Object.defineProperty(t,n,s)}):(function(t,e,o,n){n===void 0&&(n=o),t[n]=e[o]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),__importStar=this&&this.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(o){var n=[];for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[n.length]=s);return n},t(e)};return function(e){if(e&&e.__esModule)return e;var o={};if(e!=null)for(var n=t(e),s=0;s<n.length;s++)n[s]!=="default"&&__createBinding(o,e,n[s]);return __setModuleDefault(o,e),o}})(),__importDefault=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.supportsGlobalInstall=void 0,exports.selectProfile=selectProfile,exports.isProjectBasedDetection=isProjectBasedDetection,exports.showMenu=showMenu,exports.kitGroup=kitGroup,exports.selectKit=selectKit,exports.selectKitsGlobal=selectKitsGlobal,exports.selectHermesProfile=selectHermesProfile,exports.selectTargetsToRemove=selectTargetsToRemove,exports.confirmUndetectedHost=confirmUndetectedHost,exports.selectClaudeAgentModels=selectClaudeAgentModels,exports.askPathWithDefault=askPathWithDefault;const p=__importStar(require("@clack/prompts")),fs=__importStar(require("fs")),path=__importStar(require("path")),chalk_1=__importDefault(require("chalk")),home_dir_1=require("./home-dir"),logger_1=require("./logger"),kits_1=require("./kits"),init_install_scope_1=require("./init-install-scope"),hermes_home_1=require("./hermes-home"),skill_profiles_1=require("./skill-profiles"),claude_agents_1=require("./kit-installers/claude-agents"),PROFILE_HINTS={core:"engineering default \u2014 skips vendor suites (twilio, expo, gsap, \u2026)",full:"all skills",frontend:"core + frontend, design, frameworks",backend:"core + backend, database, infra, security",mobile:"core + frontend, frameworks, design",fullstack:"core + frontend, backend, data, infra",gamedev:"core + gamedev, multimedia + 7 named extras",marketing:"marketing, design, seo, docs, media + 10 extras (no dev skills/agents)",assistant:"15 host-portable skills (no subagents, no CLI)"};async function selectProfile(t=skill_profiles_1.DEFAULT_PROFILE){const e=await p.select({message:"Select install profile",initialValue:t,options:Object.keys(PROFILE_HINTS).map(o=>({value:o,label:o,hint:PROFILE_HINTS[o]}))});return p.isCancel(e)?null:e}function isProjectBasedDetection(t,e){if((0,home_dir_1.isHomeDir)(t))return!1;const o=path.join(t,kits_1.kitDefinitions[e].dir);return fs.existsSync(o)&&(fs.statSync(o).isDirectory()||fs.statSync(o).isFile())}function showMenu(t){const e=(0,kits_1.detectCurrentKit)(t),o=e?e.kit:null;if((0,logger_1.printSection)("Select AI Development Kit"),o){console.log("");const s=e&&isProjectBasedDetection(t,o)?"project":"global CLI";(0,logger_1.printInfo)(chalk_1.default.bold("Detected:")+" "+chalk_1.default.yellow.bold(kits_1.kitDefinitions[o].name)+" "+chalk_1.default.dim(`(${s})`)),(0,logger_1.printInfo)(chalk_1.default.dim("Select the same kit to update, or choose a different one to switch.")),console.log("")}else{const n=(0,kits_1.detectAllGlobalCLIs)();if(n.length>1){console.log("");const s=n.map(l=>kits_1.kitDefinitions[l].name).join(", ");(0,logger_1.printInfo)(chalk_1.default.bold("Multiple hosts detected:")+" "+chalk_1.default.cyan(s)),(0,logger_1.printInfo)(chalk_1.default.dim("No primary host selected. Choose which one to configure.")),console.log("")}else n.length===1?(console.log(""),(0,logger_1.printInfo)(chalk_1.default.bold("Detected:")+" "+chalk_1.default.yellow.bold(kits_1.kitDefinitions[n[0]].name)+" "+chalk_1.default.dim("(installed on this machine)")),(0,logger_1.printInfo)(chalk_1.default.dim("Select the same kit to update, or choose a different one to switch.")),console.log("")):(console.log(""),(0,logger_1.printWarning)(chalk_1.default.bold("Note:")+" Each kit is designed for its specific platform. Choose carefully!"),console.log(""))}}const GROUP_LABELS={coding:"Coding agents",personal:"Personal agents"},GROUP_ORDER=["coding","personal"],MENU_KITS=[{kit:"claude",label:"\u{1F535} Claude Code",hint:"Shared for Augment + Anthropic CLI + IDE",group:"coding"},{kit:"opencode",label:"\u26AB OpenCode",hint:"Open-source AI coding assistant",group:"coding"},{kit:"cursor",label:"\u{1F7E3} Cursor AI",hint:"AI-first code editor (Desktop + CLI)",group:"coding"},{kit:"antigravity",label:"\u{1F7E2} Antigravity",hint:"Google's agentic AI IDE (Gemini)",group:"coding"},{kit:"codex",label:"\u26AA OpenAI Codex",hint:"OpenAI coding agent for CLI and IDE",group:"coding"},{kit:"kimi",label:"\u{1F319} Kimi Code",hint:"Moonshot's CLI coding agent (kimi)",group:"coding"},{kit:"grok",label:"\u{1F6F0}\uFE0F Grok Build",hint:"xAI's CLI coding agent (grok)",group:"coding"},{kit:"omp",label:"\u{1F967} Oh My Pi",hint:"Terminal coding agent with LSP + DAP (omp)",group:"coding"},{kit:"pi",label:"\u03C0 Pi",hint:"Minimal terminal coding harness; omp forks this (pi)",group:"coding"},{kit:"devin",label:"\u{1F9E0} Devin CLI",hint:"Cognition's local coding agent (devin)",group:"coding"},{kit:"hermes",label:"\u{1F54A}\uFE0F Hermes Agent",hint:"Nous Research's personal agent (hermes)",group:"personal"},{kit:"openclaw",label:"\u{1F99E} OpenClaw",hint:"Personal agent across your chat channels (openclaw)",group:"personal"}];function kitsInGroup(t){return MENU_KITS.filter(e=>e.group===t)}function kitGroup(t){return MENU_KITS.find(e=>e.kit===t)?.group??"coding"}function projectKitsInGroup(t){return kitsInGroup(t).filter(({kit:e})=>(0,kits_1.supportsProjectInstall)(e))}async function selectKit(t){const e=(0,home_dir_1.isHomeDir)(t),o=i=>e?(0,init_install_scope_1.isKitInstalledGlobally)(i):(0,init_install_scope_1.isKitInstalledInProject)(i,t),n=e?kitsInGroup:projectKitsInGroup,s=GROUP_ORDER.flatMap(n),l=GROUP_ORDER.filter(i=>n(i).length>0),a=s.find(({kit:i})=>o(i))?.kit??s.find(({kit:i})=>(0,kits_1.isHostInstalled)(i))?.kit??s[0].kit,r=await p.select({message:"Select a kit to install",initialValue:a,options:l.flatMap(i=>n(i).map(({kit:c,label:u,hint:d})=>{const f=o(c)?chalk_1.default.green.bold(" [UPDATE]"):"",g=(0,kits_1.isHostInstalled)(c)?chalk_1.default.green(" \u2713"):chalk_1.default.dim(" (not detected)"),h=l.length>1?`${GROUP_LABELS[i]} \u2014 `:"";return{value:c,label:u+g+f,hint:h+d}}))});return p.isCancel(r)?null:r}async function selectKitsGlobal(){const t=MENU_KITS.filter(({kit:n})=>(0,init_install_scope_1.isKitInstalledGlobally)(n)).map(({kit:n})=>n),e=({kit:n,label:s,hint:l})=>{const a=(0,init_install_scope_1.isKitInstalledGlobally)(n)?chalk_1.default.green.bold(" [UPDATE]"):"",r=(0,kits_1.isHostInstalled)(n)?chalk_1.default.green(" \u2713"):chalk_1.default.dim(" (not detected)");return{value:n,label:s+r+a,hint:l}},o=await p.groupMultiselect({message:"Select kits to install (space to toggle, enter to confirm)",initialValues:t,required:!1,selectableGroups:!1,options:Object.fromEntries(GROUP_ORDER.map(n=>[GROUP_LABELS[n],kitsInGroup(n).map(e)]))});return p.isCancel(o)?null:o}async function selectHermesProfile(){const t=(0,hermes_home_1.listHermesProfiles)(),e=new Set((0,hermes_home_1.listAgentkitHermesProfiles)()),o=t.find(s=>e.has(s))??hermes_home_1.HERMES_DEFAULT_PROFILE,n=await p.select({message:"Which Hermes profile should the kit install into?",initialValue:o,options:t.map(s=>({value:s,label:s+(e.has(s)?chalk_1.default.green.bold(" [UPDATE]"):""),hint:s===hermes_home_1.HERMES_DEFAULT_PROFILE?"Hermes\u2019s own profile \u2014 what `hermes` loads with no -p":`loaded by \`hermes -p ${s}\``}))});return p.isCancel(n)?null:n}async function selectTargetsToRemove(t){const e=GROUP_ORDER.map(n=>[GROUP_LABELS[n],t.filter(s=>s.group===n).map(({value:s,label:l})=>({value:s,label:`${l}${chalk_1.default.green.bold(" [INSTALLED]")}`}))]).filter(([,n])=>n.length>0),o=await p.groupMultiselect({message:"Select what to remove (space to toggle, enter to confirm)",initialValues:[],required:!1,selectableGroups:!1,options:Object.fromEntries(e)});return p.isCancel(o)?null:o}async function confirmUndetectedHost(t){const e=await p.confirm({message:`${t} was not detected on this machine. Install its kit anyway?`,initialValue:!1});return p.isCancel(e)?!1:e}async function selectClaudeAgentModels(){const t=await p.select({message:"Claude Code agent models",initialValue:claude_agents_1.DEFAULT_CLAUDE_AGENT_MODELS,options:[{value:"pinned",label:"Keep kit defaults",hint:"opus for planner/reviewer/simplifier, sonnet for most, haiku for journal"},{value:"inherit",label:"Inherit session model",hint:"no opus/sonnet/haiku pin \u2014 subagents follow whatever this session uses"}]});return p.isCancel(t)?null:t}var kits_2=require("./kits");Object.defineProperty(exports,"supportsGlobalInstall",{enumerable:!0,get:function(){return kits_2.supportsGlobalInstall}});async function askPathWithDefault(t,e){const o=await p.text({message:t,placeholder:e,defaultValue:e});return p.isCancel(o)||!o?e:o}
|