@linhnguyen96114/agentkit-engineer 1.4.2 → 1.4.3
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 +29 -0
- package/bin/agentkit.js +1 -1
- package/package.json +2 -2
- package/scripts-dist/cli/agentkit-clear.js +18 -0
- package/scripts-dist/{agentkit-config.js → cli/agentkit-config.js} +3 -3
- package/scripts-dist/cli/agentkit-dashboard.js +19 -0
- package/scripts-dist/{agentkit-decide.js → cli/agentkit-decide.js} +1 -1
- package/scripts-dist/cli/agentkit-doctor.js +20 -0
- package/scripts-dist/cli/agentkit-hooks.js +36 -0
- package/scripts-dist/cli/agentkit-init.js +39 -0
- package/scripts-dist/{agentkit-login.js → cli/agentkit-login.js} +2 -2
- package/scripts-dist/{agentkit-logout.js → cli/agentkit-logout.js} +2 -2
- package/scripts-dist/cli/agentkit-profile.js +4 -0
- package/scripts-dist/cli/agentkit-skills.js +25 -0
- package/scripts-dist/cli/agentkit-status.js +22 -0
- package/scripts-dist/cli/agentkit-uninstall.js +18 -0
- package/scripts-dist/cli/agentkit-update.js +17 -0
- package/scripts-dist/{agentkit-whoami.js → cli/agentkit-whoami.js} +2 -2
- package/scripts-dist/{check-upstream.js → gen/check-upstream.js} +1 -1
- package/scripts-dist/gen/generate-agentkit-configs.js +2 -0
- package/scripts-dist/gen/generate-catalogs.js +10 -0
- package/scripts-dist/{run-skill-tests.js → gen/run-skill-tests.js} +1 -1
- package/scripts-dist/gen/update-check-worker.js +2 -0
- package/scripts-dist/{validate-agents-registry.js → gen/validate-agents-registry.js} +1 -1
- package/scripts-dist/lib/clear/cli.js +4 -0
- package/scripts-dist/lib/cli.js +3 -0
- package/scripts-dist/lib/doctor/checks-hooks.js +2 -2
- package/scripts-dist/lib/doctor/checks-rules.js +1 -1
- package/scripts-dist/lib/doctor/checks-skills.js +1 -1
- package/scripts-dist/lib/doctor/checks-soul.js +1 -1
- package/scripts-dist/lib/doctor/profile-resolution.js +1 -1
- package/scripts-dist/lib/file-operations.js +2 -2
- package/scripts-dist/lib/frontmatter.js +2 -0
- package/scripts-dist/lib/gitignore.js +5 -5
- package/scripts-dist/lib/global-clear-targets.js +1 -1
- package/scripts-dist/lib/hook-toggle-registry.js +1 -1
- package/scripts-dist/lib/hooks/cli.js +1 -0
- package/scripts-dist/lib/init/cli.js +1 -0
- package/scripts-dist/lib/install-profile-config.js +1 -1
- package/scripts-dist/lib/kit-install-dispatch.js +1 -1
- package/scripts-dist/lib/kit-remover.js +1 -1
- package/scripts-dist/lib/kit-scan.js +1 -1
- package/scripts-dist/lib/kits.js +1 -1
- package/scripts-dist/lib/payload/extract.js +1 -1
- package/scripts-dist/lib/payload-roots.js +1 -0
- package/scripts-dist/lib/profile-block.js +2 -2
- package/scripts-dist/lib/profile-remove.js +1 -1
- package/scripts-dist/lib/profile-rules.js +1 -1
- package/scripts-dist/lib/profile-switch-confirm.js +1 -1
- package/scripts-dist/lib/publish/payload-manifest.js +1 -1
- package/scripts-dist/lib/publish/public-client-manifest.js +1 -1
- package/scripts-dist/lib/server/kit-actions.js +1 -1
- package/scripts-dist/lib/skill-profiles.js +1 -1
- package/scripts-dist/lib/skill-tests.js +1 -1
- package/scripts-dist/lib/skills/cli.js +1 -0
- package/scripts-dist/lib/update/cli.js +4 -0
- package/scripts-dist/lib/update-notifier.js +1 -1
- package/scripts-dist/{build-hermes-distribution.js → ops/build-hermes-distribution.js} +1 -1
- package/scripts-dist/agentkit-clear.js +0 -21
- package/scripts-dist/agentkit-dashboard.js +0 -19
- package/scripts-dist/agentkit-doctor.js +0 -20
- package/scripts-dist/agentkit-hooks.js +0 -36
- package/scripts-dist/agentkit-init.js +0 -39
- package/scripts-dist/agentkit-profile.js +0 -4
- package/scripts-dist/agentkit-skills.js +0 -25
- package/scripts-dist/agentkit-status.js +0 -22
- package/scripts-dist/agentkit-uninstall.js +0 -18
- package/scripts-dist/agentkit-update.js +0 -20
- package/scripts-dist/generate-agentkit-configs.js +0 -2
- package/scripts-dist/generate-catalogs.js +0 -10
- package/scripts-dist/update-check-worker.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,32 @@
|
|
|
1
|
+
## [7.9.0](https://github.com/linhnguyen-gt/agentkit-engineer/compare/v7.8.2...v7.9.0) (2026-10-12)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
* **client:** check npm for client updates inside agentkit update ([1be7cc8](https://github.com/linhnguyen-gt/agentkit-engineer/commit/1be7cc89ccb1e52698908b1f8c567693dbb86cf3))
|
|
6
|
+
* **client:** prefetch the kit payload inside agentkit login ([366fd68](https://github.com/linhnguyen-gt/agentkit-engineer/commit/366fd68b9280353ccd8db0b6ac9b9ce76a984877))
|
|
7
|
+
|
|
8
|
+
### 🐞 Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **client-release:** select the newest v* release in the payload preflight ([a50d8b8](https://github.com/linhnguyen-gt/agentkit-engineer/commit/a50d8b8ddf1696b58fb9a621e89ceb12cb2563af))
|
|
11
|
+
* **client:** show the payload stage label during login prefetch ([9d601ce](https://github.com/linhnguyen-gt/agentkit-engineer/commit/9d601ce274304ccce34e397c7c7f1170c5ae0cb3))
|
|
12
|
+
* **client:** use the lite home bridge in commands that run outside the payload ([529f790](https://github.com/linhnguyen-gt/agentkit-engineer/commit/529f79004b7180a5aaed5a754dfbafc69ce3749a))
|
|
13
|
+
* **installer:** drop the full-profile fallback for unrecorded kits ([3d0a325](https://github.com/linhnguyen-gt/agentkit-engineer/commit/3d0a3257de4c5f732f7837eb55ec3850bd194e77))
|
|
14
|
+
|
|
15
|
+
### 📚 Documentation
|
|
16
|
+
|
|
17
|
+
* trim changelog to this project's own release history ([5d97220](https://github.com/linhnguyen-gt/agentkit-engineer/commit/5d9722018fa46fee95cb046649e23691be689a4e))
|
|
18
|
+
|
|
19
|
+
### ♻️ Code Refactoring
|
|
20
|
+
|
|
21
|
+
* **repo:** rename scripts-agentkit/ to agent-scripts/ ([47bff7d](https://github.com/linhnguyen-gt/agentkit-engineer/commit/47bff7defa763635d31129e84756a9901065eb8a))
|
|
22
|
+
* **scripts:** centralize payload directory names in lib/payload-roots ([f4a23bf](https://github.com/linhnguyen-gt/agentkit-engineer/commit/f4a23bf0c9f3a4c20f6eee724b2c72b1fac02786))
|
|
23
|
+
* **scripts:** drop clear's local removeDir/removeFile for the lib copies ([e36ef6e](https://github.com/linhnguyen-gt/agentkit-engineer/commit/e36ef6e1edf90c555afb8660d894900aa87cfa9f))
|
|
24
|
+
* **scripts:** extract five fat CLI entries into lib/<domain>/cli.ts ([1fb4bd6](https://github.com/linhnguyen-gt/agentkit-engineer/commit/1fb4bd64500a60ab1e3b8466e5c9c60c0a7f8455))
|
|
25
|
+
* **scripts:** group root scripts into cli/, gen/ and ops/ ([0902344](https://github.com/linhnguyen-gt/agentkit-engineer/commit/09023442ad32d64e0eeb208b89d7389b1c8a0e7a))
|
|
26
|
+
* **scripts:** merge the two frontmatter grammars behind lib/frontmatter.ts ([bb49b56](https://github.com/linhnguyen-gt/agentkit-engineer/commit/bb49b560735edfb0f7d4b667322a036396a3e662))
|
|
27
|
+
* **scripts:** replace kit dispatch switches with a KitDescriptor table ([e2e5c36](https://github.com/linhnguyen-gt/agentkit-engineer/commit/e2e5c362ae5bb151a0ef10c54ef47fe8d98ea7dd))
|
|
28
|
+
* **scripts:** share argv/help/exit plumbing via lib/cli runner ([a39387b](https://github.com/linhnguyen-gt/agentkit-engineer/commit/a39387b8174a63055658ab22351624bc65689265))
|
|
29
|
+
|
|
1
30
|
## [7.8.2](https://github.com/linhnguyen-gt/agentkit-engineer/compare/v7.8.1...v7.8.2) (2026-10-09)
|
|
2
31
|
|
|
3
32
|
### 🐞 Bug Fixes
|
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,".."),clientHasPayload=["skills","rules","agents","agent-kit"].every(n=>{try{return fs.statSync(path.join(packageRoot,n)).isDirectory()}catch{return!1}});async function runInPayload(n){const{resolveInstallSource:a,NoAccessError:l}=require("../scripts-dist/lib/payload/source.js"),{execPayload:e}=require("../scripts-dist/lib/payload/exec.js"),s=n.indexOf("--ref"),o=s!==-1?n[s+1]:void 0;s!==-1&&(!o||o.startsWith("--"))&&(console.error("\u2717 --ref needs a value: agentkit <command> --ref <tag|branch|sha>"),process.exit(1));const{getPayloadVersion:t}=require("../scripts-dist/lib/version-check.js");try{const i=await a({version:t(packageRoot)??"0.0.0",ref:o,interactive:!0,cliRoot:packageRoot}),r=path.join(packageRoot,"node_modules"),g=e(process.execPath,[path.join(i.root,"bin","agentkit.js"),...n],{env:{...process.env,NODE_PATH:r,AGENTKIT_NODE_MODULES:r}});process.exit(g.status==null?1:g.status)}catch(i){i instanceof l?console.error(`\u2717 ${i.message}`):console.error(`\u2717 Could not resolve the kit payload: ${i.message}`),process.exit(1)}}function scheduleUpdateNotice(){try{const{maybeNotifyUpdate:n}=require("../scripts-dist/lib/update-notifier"),{getPayloadVersion:a}=require("../scripts-dist/lib/version-check.js");let l=a(packageRoot);try{const{newestTagInstalledTree:e}=require("../scripts-dist/lib/payload/source.js"),{loadAgentkitHomeCore:s}=require("../scripts-dist/lib/agentkit-home.js");l=e(s())?.version??l}catch{}n({currentVersion:l??"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(" 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("")}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 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("")}async function main(){scheduleUpdateNotice();const n=new Set(["login","logout","whoami","uninstall","config","help","--help","-h","--version","-v"]),a=args[1]==="--help"||args[1]==="-h"||args[1]==="help",l=command!==void 0&&!n.has(command);if(l&&!a){const{checkEntitlement:e}=require("../scripts-dist/lib/entitlement/check.js");(await e({interactive:!0}).catch(()=>null))?.status!=="active"&&(console.error("\u2717 no access \u2014 this command needs an authorized login. Run `agentkit login`."),process.exit(1))}if(l&&!clientHasPayload&&await runInPayload(args),command==="db-first"){const e=path.join(__dirname,"db-first.js"),s=spawnSync(process.execPath,[e,...args.slice(1)],{stdio:"inherit"});process.exit(s.status==null?1:s.status)}else if(command==="mobile"){const e=path.join(__dirname,"mobile.js"),s=spawnSync(process.execPath,[e,...args.slice(1)],{stdio:"inherit"});process.exit(s.status==null?1:s.status)}else if(command==="frontend"){const e=path.join(__dirname,"frontend.js"),s=spawnSync(process.execPath,[e,...args.slice(1)],{stdio:"inherit"});process.exit(s.status==null?1:s.status)}else if(command==="stack"){const e=path.join(__dirname,"stack.js"),s=spawnSync(process.execPath,[e,...args.slice(1)],{stdio:"inherit"});process.exit(s.status==null?1:s.status)}else if(command==="login")require("../scripts-dist/agentkit-login.js");else if(command==="logout")require("../scripts-dist/agentkit-logout.js");else if(command==="whoami")require("../scripts-dist/agentkit-whoami.js");else if(command==="init"){const{resolveInstallSource:e,NoAccessError:s}=require("../scripts-dist/lib/payload/source.js"),{getPayloadVersion:o}=require("../scripts-dist/lib/version-check.js"),t=path.join(__dirname,".."),i=args.indexOf("--ref"),r=i!==-1?args[i+1]:void 0;i!==-1&&(!r||r.startsWith("--"))&&(console.error("\u2717 --ref needs a value: agentkit init --ref <tag|branch|sha>"),process.exit(1));const g=i!==-1?r:void 0;i!==-1&&process.argv.splice(2+i,2);try{const c=await e({version:o(t)??"0.0.0",ref:g,interactive:!0,cliRoot:t});process.env.AGENTKIT_SOURCE_ROOT=c.root,require("../scripts-dist/agentkit-init.js")}catch(c){c instanceof s?console.error(`\u2717 ${c.message}`):console.error(`\u2717 Could not resolve the kit payload: ${c.message}`),process.exit(1)}}else if(command==="profile")require("../scripts-dist/agentkit-profile.js");else if(command==="update")require("../scripts-dist/agentkit-update.js");else if(command==="clear")require("../scripts-dist/agentkit-clear.js");else if(command==="uninstall")require("../scripts-dist/agentkit-uninstall.js");else if(command==="config")require("../scripts-dist/agentkit-config.js");else if(command==="decide")require("../scripts-dist/agentkit-decide.js");else if(command==="skills")require("../scripts-dist/agentkit-skills.js");else if(command==="doctor")require("../scripts-dist/agentkit-doctor.js");else if(command==="status")require("../scripts-dist/agentkit-status.js");else if(command==="dashboard")require("../scripts-dist/agentkit-dashboard.js");else if(command==="hooks")require("../scripts-dist/agentkit-hooks.js");else if(command==="help"&&args[1]){const e=args[1];if(!clientHasPayload&&!new Set(["profile","profiles","login","logout","whoami","uninstall"]).has(e)&&await runInPayload(["help",e]),e==="profile"||e==="profiles")printProfilesGuide();else if(e==="db-first"){const o=path.join(__dirname,"db-first.js"),t=spawnSync(process.execPath,[o,"--help"],{stdio:"inherit"});process.exit(t.status==null?1:t.status)}else if(e==="mobile"){const o=path.join(__dirname,"mobile.js"),t=spawnSync(process.execPath,[o,"--help"],{stdio:"inherit"});process.exit(t.status==null?1:t.status)}else if(e==="frontend"){const o=path.join(__dirname,"frontend.js"),t=spawnSync(process.execPath,[o,"--help"],{stdio:"inherit"});process.exit(t.status==null?1:t.status)}else if(e==="stack"){const o=path.join(__dirname,"stack.js"),t=spawnSync(process.execPath,[o,"--help"],{stdio:"inherit"});process.exit(t.status==null?1:t.status)}else e==="login"?(process.argv=[process.argv[0],path.join(__dirname,"..","scripts-dist","agentkit-login.js"),"--help"],require("../scripts-dist/agentkit-login.js")):e==="logout"?(process.argv=[process.argv[0],path.join(__dirname,"..","scripts-dist","agentkit-logout.js"),"--help"],require("../scripts-dist/agentkit-logout.js")):e==="whoami"?(process.argv=[process.argv[0],path.join(__dirname,"..","scripts-dist","agentkit-whoami.js"),"--help"],require("../scripts-dist/agentkit-whoami.js")):e==="init"?(process.argv=[process.argv[0],path.join(__dirname,"..","scripts-dist","agentkit-init.js"),"--help"],require("../scripts-dist/agentkit-init.js")):e==="update"?(process.argv=[process.argv[0],path.join(__dirname,"..","scripts-dist","agentkit-update.js"),"--help"],require("../scripts-dist/agentkit-update.js")):e==="clear"?(process.argv=[process.argv[0],path.join(__dirname,"..","scripts-dist","agentkit-clear.js"),"--help"],require("../scripts-dist/agentkit-clear.js")):e==="uninstall"?(process.argv=[process.argv[0],path.join(__dirname,"..","scripts-dist","agentkit-uninstall.js"),"--help"],require("../scripts-dist/agentkit-uninstall.js")):e==="config"?(process.argv=[process.argv[0],path.join(__dirname,"..","scripts-dist","agentkit-config.js"),"--help"],require("../scripts-dist/agentkit-config.js")):e==="decide"?(process.argv=[process.argv[0],path.join(__dirname,"..","scripts-dist","agentkit-decide.js"),"--help"],require("../scripts-dist/agentkit-decide.js")):e==="skills"?(process.argv=[process.argv[0],path.join(__dirname,"..","scripts-dist","agentkit-skills.js"),"help"],require("../scripts-dist/agentkit-skills.js")):e==="doctor"?(process.argv=[process.argv[0],path.join(__dirname,"..","scripts-dist","agentkit-doctor.js"),"--help"],require("../scripts-dist/agentkit-doctor.js")):e==="status"?(process.argv=[process.argv[0],path.join(__dirname,"..","scripts-dist","agentkit-status.js"),"--help"],require("../scripts-dist/agentkit-status.js")):e==="dashboard"?(process.argv=[process.argv[0],path.join(__dirname,"..","scripts-dist","agentkit-dashboard.js"),"--help"],require("../scripts-dist/agentkit-dashboard.js")):e==="hooks"?(process.argv=[process.argv[0],path.join(__dirname,"..","scripts-dist","agentkit-hooks.js"),"help"],require("../scripts-dist/agentkit-hooks.js")):(console.log(`Unknown command: ${e}`),console.log(""),printGeneralHelp(),process.exit(1))}else if(command==="--version"||command==="-v"){const e=require("../package.json");let s=typeof e.payloadVersion=="string"?e.payloadVersion:null;try{const{newestTagInstalledTree:t}=require("../scripts-dist/lib/payload/source.js"),{loadAgentkitHomeCore:i}=require("../scripts-dist/lib/agentkit-home.js");s=t(i())?.version??s}catch{}const o=s&&s!==e.version?` (payload v${s})`:"";console.log(`v${e.version}${o}`)}else 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(n=>{try{return fs.statSync(path.join(packageRoot,n)).isDirectory()}catch{return!1}});async function runInPayload(n){const{resolveInstallSource:a,NoAccessError:l}=require("../scripts-dist/lib/payload/source.js"),{execPayload:e}=require("../scripts-dist/lib/payload/exec.js"),s=n.indexOf("--ref"),o=s!==-1?n[s+1]:void 0;s!==-1&&(!o||o.startsWith("--"))&&(console.error("\u2717 --ref needs a value: agentkit <command> --ref <tag|branch|sha>"),process.exit(1));const{getPayloadVersion:t}=require("../scripts-dist/lib/version-check.js");try{const i=await a({version:t(packageRoot)??"0.0.0",ref:o,interactive:!0,cliRoot:packageRoot}),r=path.join(packageRoot,"node_modules"),g=e(process.execPath,[path.join(i.root,"bin","agentkit.js"),...n],{env:{...process.env,NODE_PATH:r,AGENTKIT_NODE_MODULES:r}});process.exit(g.status==null?1:g.status)}catch(i){i instanceof l?console.error(`\u2717 ${i.message}`):console.error(`\u2717 Could not resolve the kit payload: ${i.message}`),process.exit(1)}}function scheduleUpdateNotice(){try{const{maybeNotifyUpdate:n}=require("../scripts-dist/lib/update-notifier"),{getPayloadVersion:a}=require("../scripts-dist/lib/version-check.js");let l=a(packageRoot);try{const{newestTagInstalledTree:e}=require("../scripts-dist/lib/payload/source.js"),{loadAgentkitHomeCore:s}=require("../scripts-dist/lib/agentkit-home.js");l=e(s())?.version??l}catch{}n({currentVersion:l??"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(" 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("")}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 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("")}async function main(){scheduleUpdateNotice();const n=new Set(["login","logout","whoami","uninstall","config","help","--help","-h","--version","-v"]),a=args[1]==="--help"||args[1]==="-h"||args[1]==="help",l=command!==void 0&&!n.has(command);if(l&&!a){const{checkEntitlement:e}=require("../scripts-dist/lib/entitlement/check.js");(await e({interactive:!0}).catch(()=>null))?.status!=="active"&&(console.error("\u2717 no access \u2014 this command needs an authorized login. Run `agentkit login`."),process.exit(1))}if(l&&!clientHasPayload&&await runInPayload(args),command==="db-first"){const e=path.join(__dirname,"db-first.js"),s=spawnSync(process.execPath,[e,...args.slice(1)],{stdio:"inherit"});process.exit(s.status==null?1:s.status)}else if(command==="mobile"){const e=path.join(__dirname,"mobile.js"),s=spawnSync(process.execPath,[e,...args.slice(1)],{stdio:"inherit"});process.exit(s.status==null?1:s.status)}else if(command==="frontend"){const e=path.join(__dirname,"frontend.js"),s=spawnSync(process.execPath,[e,...args.slice(1)],{stdio:"inherit"});process.exit(s.status==null?1:s.status)}else if(command==="stack"){const e=path.join(__dirname,"stack.js"),s=spawnSync(process.execPath,[e,...args.slice(1)],{stdio:"inherit"});process.exit(s.status==null?1:s.status)}else if(command==="login")require("../scripts-dist/cli/agentkit-login.js");else if(command==="logout")require("../scripts-dist/cli/agentkit-logout.js");else if(command==="whoami")require("../scripts-dist/cli/agentkit-whoami.js");else if(command==="init"){const{resolveInstallSource:e,NoAccessError:s}=require("../scripts-dist/lib/payload/source.js"),{getPayloadVersion:o}=require("../scripts-dist/lib/version-check.js"),t=path.join(__dirname,".."),i=args.indexOf("--ref"),r=i!==-1?args[i+1]:void 0;i!==-1&&(!r||r.startsWith("--"))&&(console.error("\u2717 --ref needs a value: agentkit init --ref <tag|branch|sha>"),process.exit(1));const g=i!==-1?r:void 0;i!==-1&&process.argv.splice(2+i,2);try{const c=await e({version:o(t)??"0.0.0",ref:g,interactive:!0,cliRoot:t});process.env.AGENTKIT_SOURCE_ROOT=c.root,require("../scripts-dist/cli/agentkit-init.js")}catch(c){c instanceof s?console.error(`\u2717 ${c.message}`):console.error(`\u2717 Could not resolve the kit payload: ${c.message}`),process.exit(1)}}else if(command==="profile")require("../scripts-dist/cli/agentkit-profile.js");else if(command==="update")require("../scripts-dist/cli/agentkit-update.js");else if(command==="clear")require("../scripts-dist/cli/agentkit-clear.js");else if(command==="uninstall")require("../scripts-dist/cli/agentkit-uninstall.js");else if(command==="config")require("../scripts-dist/cli/agentkit-config.js");else if(command==="decide")require("../scripts-dist/cli/agentkit-decide.js");else if(command==="skills")require("../scripts-dist/cli/agentkit-skills.js");else if(command==="doctor")require("../scripts-dist/cli/agentkit-doctor.js");else if(command==="status")require("../scripts-dist/cli/agentkit-status.js");else if(command==="dashboard")require("../scripts-dist/cli/agentkit-dashboard.js");else if(command==="hooks")require("../scripts-dist/cli/agentkit-hooks.js");else if(command==="help"&&args[1]){const e=args[1];if(!clientHasPayload&&!new Set(["profile","profiles","login","logout","whoami","uninstall"]).has(e)&&await runInPayload(["help",e]),e==="profile"||e==="profiles")printProfilesGuide();else if(e==="db-first"){const o=path.join(__dirname,"db-first.js"),t=spawnSync(process.execPath,[o,"--help"],{stdio:"inherit"});process.exit(t.status==null?1:t.status)}else if(e==="mobile"){const o=path.join(__dirname,"mobile.js"),t=spawnSync(process.execPath,[o,"--help"],{stdio:"inherit"});process.exit(t.status==null?1:t.status)}else if(e==="frontend"){const o=path.join(__dirname,"frontend.js"),t=spawnSync(process.execPath,[o,"--help"],{stdio:"inherit"});process.exit(t.status==null?1:t.status)}else if(e==="stack"){const o=path.join(__dirname,"stack.js"),t=spawnSync(process.execPath,[o,"--help"],{stdio:"inherit"});process.exit(t.status==null?1:t.status)}else e==="login"?(process.argv=[process.argv[0],path.join(__dirname,"..","scripts-dist","cli","agentkit-login.js"),"--help"],require("../scripts-dist/cli/agentkit-login.js")):e==="logout"?(process.argv=[process.argv[0],path.join(__dirname,"..","scripts-dist","cli","agentkit-logout.js"),"--help"],require("../scripts-dist/cli/agentkit-logout.js")):e==="whoami"?(process.argv=[process.argv[0],path.join(__dirname,"..","scripts-dist","cli","agentkit-whoami.js"),"--help"],require("../scripts-dist/cli/agentkit-whoami.js")):e==="init"?(process.argv=[process.argv[0],path.join(__dirname,"..","scripts-dist","cli","agentkit-init.js"),"--help"],require("../scripts-dist/cli/agentkit-init.js")):e==="update"?(process.argv=[process.argv[0],path.join(__dirname,"..","scripts-dist","cli","agentkit-update.js"),"--help"],require("../scripts-dist/cli/agentkit-update.js")):e==="clear"?(process.argv=[process.argv[0],path.join(__dirname,"..","scripts-dist","cli","agentkit-clear.js"),"--help"],require("../scripts-dist/cli/agentkit-clear.js")):e==="uninstall"?(process.argv=[process.argv[0],path.join(__dirname,"..","scripts-dist","cli","agentkit-uninstall.js"),"--help"],require("../scripts-dist/cli/agentkit-uninstall.js")):e==="config"?(process.argv=[process.argv[0],path.join(__dirname,"..","scripts-dist","cli","agentkit-config.js"),"--help"],require("../scripts-dist/cli/agentkit-config.js")):e==="decide"?(process.argv=[process.argv[0],path.join(__dirname,"..","scripts-dist","cli","agentkit-decide.js"),"--help"],require("../scripts-dist/cli/agentkit-decide.js")):e==="skills"?(process.argv=[process.argv[0],path.join(__dirname,"..","scripts-dist","cli","agentkit-skills.js"),"help"],require("../scripts-dist/cli/agentkit-skills.js")):e==="doctor"?(process.argv=[process.argv[0],path.join(__dirname,"..","scripts-dist","cli","agentkit-doctor.js"),"--help"],require("../scripts-dist/cli/agentkit-doctor.js")):e==="status"?(process.argv=[process.argv[0],path.join(__dirname,"..","scripts-dist","cli","agentkit-status.js"),"--help"],require("../scripts-dist/cli/agentkit-status.js")):e==="dashboard"?(process.argv=[process.argv[0],path.join(__dirname,"..","scripts-dist","cli","agentkit-dashboard.js"),"--help"],require("../scripts-dist/cli/agentkit-dashboard.js")):e==="hooks"?(process.argv=[process.argv[0],path.join(__dirname,"..","scripts-dist","cli","agentkit-hooks.js"),"help"],require("../scripts-dist/cli/agentkit-hooks.js")):(console.log(`Unknown command: ${e}`),console.log(""),printGeneralHelp(),process.exit(1))}else if(command==="--version"||command==="-v"){const e=require("../package.json");let s=typeof e.payloadVersion=="string"?e.payloadVersion:null;try{const{newestTagInstalledTree:t}=require("../scripts-dist/lib/payload/source.js"),{loadAgentkitHomeCore:i}=require("../scripts-dist/lib/agentkit-home.js");s=t(i())?.version??s}catch{}const o=s&&s!==e.version?` (payload v${s})`:"";console.log(`v${e.version}${o}`)}else printGeneralHelp()}main();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@linhnguyen96114/agentkit-engineer",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.3",
|
|
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.9.0",
|
|
24
24
|
"publishConfig": {
|
|
25
25
|
"access": "public"
|
|
26
26
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const cli_1=require("../lib/cli"),cli_2=require("../lib/clear/cli");function printHelp(){console.log(`
|
|
3
|
+
Agentkit Clear
|
|
4
|
+
Remove Agentkit installations from current project or global user directories
|
|
5
|
+
|
|
6
|
+
Usage:
|
|
7
|
+
agentkit clear [options]
|
|
8
|
+
|
|
9
|
+
Options:
|
|
10
|
+
--project, -p Remove Agentkit from the current project
|
|
11
|
+
--global, -g Remove Agentkit from global user directories
|
|
12
|
+
--help, -h Show this help message
|
|
13
|
+
|
|
14
|
+
Examples:
|
|
15
|
+
agentkit clear # Interactive removal picker
|
|
16
|
+
agentkit clear --project # Clear project-scoped files
|
|
17
|
+
agentkit clear --global # Clear globally-installed platforms
|
|
18
|
+
`)}(0,cli_1.runCli)({command:"clear",printHelp,helpArgs:cli_1.helpAnywhere,handler:cli_2.runClear});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const agentkit_home_1=require("
|
|
3
|
-
${colors.bright}${colors.cyan}${e}${colors.reset}`),console.log("\u2500".repeat(e.length))}function codingLevelRemoved(){console.log("coding-level support was removed"),process.exit(1)}function handleAutoUpdate(e){const
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const agentkit_home_1=require("../lib/agentkit-home"),cli_1=require("../lib/cli"),providers_1=require("../lib/semantic-decision/providers"),store_1=require("../lib/semantic-decision/store"),version_check_1=require("../lib/version-check"),colors={reset:"\x1B[0m",bright:"\x1B[1m",red:"\x1B[31m",green:"\x1B[32m",blue:"\x1B[34m",cyan:"\x1B[36m"};function printSuccess(e){console.log(`${colors.green}\u2713${colors.reset} ${e}`)}function printError(e){console.log(`${colors.red}\u2717${colors.reset} ${e}`)}function printInfo(e){console.log(`${colors.blue}\u2139${colors.reset} ${e}`)}function printSection(e){console.log(`
|
|
3
|
+
${colors.bright}${colors.cyan}${e}${colors.reset}`),console.log("\u2500".repeat(e.length))}function codingLevelRemoved(){console.log("coding-level support was removed"),process.exit(1)}function handleAutoUpdate(e){const t=(0,version_check_1.getConfigPath)();if(e.length===0){const i=(0,version_check_1.getAutoUpdateEnabled)();console.log(""),printSection("Auto Update Status"),console.log(`Auto update: ${i?colors.green+"enabled"+colors.reset:colors.red+"disabled"+colors.reset}`),console.log(""),printInfo("Use 'agentkit config autoupdate on' to enable"),printInfo("Use 'agentkit config autoupdate off' to disable"),console.log("");return}const o=e[0].toLowerCase();if(o!=="on"&&o!=="off"&&o!=="enable"&&o!=="disable"){printError("Invalid option. Use 'on', 'off', 'enable', or 'disable'");return}const n=o==="on"||o==="enable";try{const i=(0,agentkit_home_1.loadAgentkitHomeCore)().mergeJson(t,s=>(s.autoUpdate=n,s));if(console.log(""),!i){printError("Failed to update config \u2014 another process may hold the lock, or the home is read-only"),process.exitCode=1;return}printSuccess(n?"Auto update enabled":"Auto update disabled"),console.log("")}catch(i){printError(`Failed to update config: ${i.message}`),process.exitCode=1}}function semanticEntry(){const o=((0,agentkit_home_1.loadAgentkitHomeCore)().readJson((0,version_check_1.getConfigPath)())??{}).semanticDecision;return o===null||typeof o!="object"?{enabled:!1,provider:"jev",model:""}:{enabled:"enabled"in o&&o.enabled===!0,provider:"provider"in o&&typeof o.provider=="string"&&o.provider!==""?o.provider:"jev",model:"model"in o&&typeof o.model=="string"?o.model:""}}function handleSemantic(e){const t=(0,agentkit_home_1.loadAgentkitHomeCore)(),o=t.toDisplayPath(t.getSemanticEnvPath());if(e.length===0){const a=semanticEntry();console.log(""),printSection("Semantic Decisions"),console.log(`Status: ${a.enabled?`${colors.green}enabled${colors.reset}`:`${colors.red}off${colors.reset}`}`),console.log(`Provider: ${a.provider}${a.model?` (model ${a.model})`:""}`),console.log(""),printInfo("Off by default, and a project may only turn it off \u2014 never on."),printInfo(`Credentials: the environment first, then ${o} (TYPESAFE_API_KEY).`),printInfo("Use 'agentkit config semantic enable' or 'disable' to change it; --provider and --model refine it."),console.log("");return}const n=e[0].toLowerCase();if(n!=="enable"&&n!=="disable"&&n!=="on"&&n!=="off"){printError("Invalid option. Use 'enable' or 'disable'");return}const i=e.indexOf("--provider"),s=i>=0?e[i+1]??"":semanticEntry().provider;if(!(0,providers_1.providerIds)().includes(s)){printError(`Unknown provider "${s}". Known providers: ${(0,providers_1.providerIds)().join(", ")}`);return}const l=e.indexOf("--model"),c=l>=0?e[l+1]??"":semanticEntry().model,r=n==="enable"||n==="on",d=(0,store_1.writeSemanticSettings)({enabled:r,provider:s,...c?{model:c}:{}});if(console.log(""),!d.ok){printError(d.message),process.exitCode=1;return}printSuccess(`Semantic decisions ${r?"enabled":"disabled"} (provider ${s}).`),r&&printInfo(`Put TYPESAFE_API_KEY in the environment or in ${o}; calls refuse with exit 4 until then.`),console.log("")}function printHelp(){console.log(`
|
|
4
4
|
${colors.bright}Agentkit Config Manager${colors.reset}
|
|
5
5
|
Manage autoupdate settings
|
|
6
6
|
|
|
@@ -23,4 +23,4 @@ ${colors.bright}Examples:${colors.reset}
|
|
|
23
23
|
agentkit config semantic # Show semantic-decision status
|
|
24
24
|
agentkit config semantic enable --provider jev
|
|
25
25
|
agentkit config semantic disable
|
|
26
|
-
`)}
|
|
26
|
+
`)}(0,cli_1.runCli)({command:"config",printHelp,helpArgs:e=>e.length===0||e[0]==="help"||e.includes("--help")||e.includes("-h"),handler:e=>{const t=e[0],o=e.slice(1);switch(t){case"get":case"set":case"list":case"status":case"interactive":codingLevelRemoved();break;case"autoupdate":handleAutoUpdate(o);break;case"semantic":handleSemantic(o);break;default:printError(`Unknown command: ${t}`),printInfo('Run "agentkit config help" for usage information')}}});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(r,e,n,t){t===void 0&&(t=n);var o=Object.getOwnPropertyDescriptor(e,n);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(r,t,o)}):(function(r,e,n,t){t===void 0&&(t=n),r[t]=e[n]})),__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(n){var t=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[t.length]=o);return t},r(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var t=r(e),o=0;o<t.length;o++)t[o]!=="default"&&__createBinding(n,e,t[o]);return __setModuleDefault(n,e),n}})();Object.defineProperty(exports,"__esModule",{value:!0});const fs=__importStar(require("fs")),path=__importStar(require("path")),cli_1=require("../lib/cli"),agentkit_home_1=require("../lib/agentkit-home"),logger_1=require("../lib/logger"),open_browser_1=require("../lib/open-browser"),auth_token_1=require("../lib/server/auth-token"),bundle_info_1=require("../lib/server/bundle-info"),http_server_1=require("../lib/server/http-server"),instance_lock_1=require("../lib/server/instance-lock"),repoRoot=path.resolve(__dirname,"..","..");function parseFlags(r){const e=r.indexOf("--port"),n=r.indexOf("--token-file"),t=e>=0?Number(r[e+1]):0;return{port:Number.isInteger(t)&&t>=0&&t<=65535?t:0,open:!r.includes("--no-open"),tokenFile:n>=0?r[n+1]??null:null}}function resolveServeRoot(){const r=(0,bundle_info_1.bundleRoot)(repoRoot);return fs.existsSync(path.join(r,"index.html"))||((0,logger_1.printError)("The dashboard UI is missing. Run: pnpm build:dashboard"),process.exit(1)),r}function printHelp(){console.log(`
|
|
3
|
+
Agentkit Dashboard
|
|
4
|
+
Open the local observability dashboard in your browser
|
|
5
|
+
|
|
6
|
+
Usage:
|
|
7
|
+
agentkit dashboard [options]
|
|
8
|
+
|
|
9
|
+
Options:
|
|
10
|
+
--port <number> Bind to a specific port (default: auto-assigned / 4321)
|
|
11
|
+
--no-open Do not automatically open the dashboard in browser
|
|
12
|
+
--token-file <path> Write authentication token to a specific file
|
|
13
|
+
--help, -h Show this help message
|
|
14
|
+
|
|
15
|
+
Examples:
|
|
16
|
+
agentkit dashboard # Start server and open dashboard in browser
|
|
17
|
+
agentkit dashboard --port 3000 # Use custom port 3000
|
|
18
|
+
agentkit dashboard --no-open # Start server without launching browser
|
|
19
|
+
`)}async function main(r){const e=parseFlags(r);(0,agentkit_home_1.loadAgentkitHomeCore)().ensureHome();const n=(0,instance_lock_1.readLiveLock)();if(n)return(0,logger_1.printInfo)(`A dashboard is already running: http://127.0.0.1:${n.port}/`),(0,logger_1.printInfo)("Stop it with Ctrl+C in its terminal, then start a new one."),0;const t=process.env.AGENTKIT_DASHBOARD_TOKEN||(0,auth_token_1.generateToken)();let o;try{o=await(0,http_server_1.startServer)({serveRoot:resolveServeRoot(),port:e.port,context:{repoRoot,token:t,startedAt:new Date().toISOString(),bundleGitSha:(0,bundle_info_1.readBundleGitSha)(repoRoot)}})}catch(i){return i.code==="EADDRINUSE"?(0,logger_1.printError)(`port ${e.port} is in use \u2014 omit --port to pick a free one`):(0,logger_1.printError)(`Could not start the dashboard: ${i.message}`),1}if((0,instance_lock_1.writeLock)(o.port),e.tokenFile)try{fs.rmSync(e.tokenFile,{force:!0}),fs.writeFileSync(e.tokenFile,t,{mode:384})}catch(i){(0,logger_1.printError)(`Could not write the token file: ${i.message}`)}const s=`http://127.0.0.1:${o.port}/#t=${t}`;(0,logger_1.printSuccess)(`Dashboard: ${s}`),(0,logger_1.printInfo)("Press Ctrl+C to stop");for(const i of["SIGINT","SIGTERM"])process.on(i,()=>{if(e.tokenFile)try{fs.rmSync(e.tokenFile,{force:!0})}catch{}o.shutdown()});process.on("exit",instance_lock_1.removeLock),e.open&&(0,open_browser_1.openBrowser)(s)}(0,cli_1.runCli)({command:"dashboard",printHelp,helpArgs:cli_1.helpAnywhere,handler:main});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(e,t,i,r){r===void 0&&(r=i);var n=Object.getOwnPropertyDescriptor(t,i);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,r,n)}):(function(e,t,i,r){r===void 0&&(r=i),e[r]=t[i]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),__importStar=this&&this.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(i){var r=[];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(r[r.length]=n);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var i={};if(t!=null)for(var r=e(t),n=0;n<r.length;n++)r[n]!=="default"&&__createBinding(i,t,r[n]);return __setModuleDefault(i,t),i}})();Object.defineProperty(exports,"__esModule",{value:!0});const fs=__importStar(require("fs")),client_1=require("
|
|
2
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(e,t,i,r){r===void 0&&(r=i);var n=Object.getOwnPropertyDescriptor(t,i);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,r,n)}):(function(e,t,i,r){r===void 0&&(r=i),e[r]=t[i]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),__importStar=this&&this.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(i){var r=[];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(r[r.length]=n);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var i={};if(t!=null)for(var r=e(t),n=0;n<r.length;n++)r[n]!=="default"&&__createBinding(i,t,r[n]);return __setModuleDefault(i,t),i}})();Object.defineProperty(exports,"__esModule",{value:!0});const fs=__importStar(require("fs")),client_1=require("../lib/semantic-decision/client"),cli_1=require("../lib/semantic-decision/cli");async function readStdin(){const e=[];for await(const t of process.stdin)e.push(t);return Buffer.concat(e).toString("utf8")}(0,cli_1.runDecide)({argv:process.argv.slice(2),cwd:process.cwd(),readStdin,readFile:e=>fs.readFileSync(e,"utf8"),stdinIsTty:process.stdin.isTTY===!0,writeStdout:e=>process.stdout.write(e),writeStderr:e=>process.stderr.write(e)}).then(e=>{process.exit(e)}).catch(e=>{process.stderr.write(`\u2717 ${e instanceof Error?e.message:String(e)}
|
|
3
3
|
`),process.exit(client_1.EXIT_CODES["request-failed"])});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(t,e,n,o){o===void 0&&(o=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,o,r)}):(function(t,e,n,o){o===void 0&&(o=n),t[o]=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 o=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(o[o.length]=r);return o},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var o=t(e),r=0;r<o.length;r++)o[r]!=="default"&&__createBinding(n,e,o[r]);return __setModuleDefault(n,e),n}})();Object.defineProperty(exports,"__esModule",{value:!0}),exports.runChecks=runChecks;const path=__importStar(require("path")),cli_1=require("../lib/cli"),checks_entitlement_1=require("../lib/doctor/checks-entitlement"),checks_hooks_1=require("../lib/doctor/checks-hooks"),checks_install_1=require("../lib/doctor/checks-install"),checks_rules_1=require("../lib/doctor/checks-rules"),checks_semantic_1=require("../lib/doctor/checks-semantic"),checks_skills_1=require("../lib/doctor/checks-skills"),checks_soul_1=require("../lib/doctor/checks-soul"),render_1=require("../lib/doctor/render"),types_1=require("../lib/doctor/types"),install_profile_config_1=require("../lib/install-profile-config"),kit_context_1=require("../lib/kit-context"),scriptDir=__dirname,repoRoot=path.resolve(scriptDir,"..",".."),targetDir=process.cwd();function parseFlags(t){return{json:t.includes("--json"),verbose:t.includes("--verbose")}}async function resolveKit(t){const e={promptMessage:"Which kit to check?",nonTtyHint:"Pick one with `agentkit doctor` in a terminal, or cd into a project."};if(!t)return(0,kit_context_1.resolveContext)(targetDir,e);const n=console.log;console.log=(...o)=>{process.stderr.write(`${o.join(" ")}
|
|
3
|
+
`)};try{return await(0,kit_context_1.resolveContext)(targetDir,e)}finally{console.log=n}}function runChecks(t,e){return[...(0,checks_entitlement_1.checkEntitlementGroup)(),...(0,checks_install_1.checkInstall)(t,repoRoot),...(0,checks_install_1.checkStore)(),...(0,checks_install_1.checkVersion)(t,e),...(0,checks_install_1.checkStructure)(t),...(0,checks_soul_1.checkSoul)(t,repoRoot),...(0,checks_rules_1.checkRules)(t,repoRoot),...(0,checks_skills_1.checkSkills)(t,repoRoot),...(0,checks_hooks_1.checkHooks)(t,repoRoot),...(0,checks_semantic_1.checkSemanticDecision)(t)]}function printHelp(){console.log(`
|
|
4
|
+
Agentkit Doctor
|
|
5
|
+
Report the health and integrity of an installed AI development kit
|
|
6
|
+
|
|
7
|
+
Usage:
|
|
8
|
+
agentkit doctor [options]
|
|
9
|
+
|
|
10
|
+
Options:
|
|
11
|
+
--verbose Include passing checks in the output
|
|
12
|
+
--json Output machine-readable JSON CheckResult[]
|
|
13
|
+
--help, -h Show this help message
|
|
14
|
+
|
|
15
|
+
Examples:
|
|
16
|
+
agentkit doctor # Check health of the detected kit
|
|
17
|
+
agentkit doctor --verbose # Show all passing, warning, and failed checks
|
|
18
|
+
agentkit doctor --json # Machine-readable output for CI/automation
|
|
19
|
+
`)}async function main(t){const e=parseFlags(t),n=await resolveKit(e.json);if(!n)return 1;const o=runChecks(n,(0,install_profile_config_1.readCliVersion)(repoRoot));if(e.json)process.stdout.write(`${(0,render_1.renderJson)(o)}
|
|
20
|
+
`);else{console.log("");for(const r of(0,render_1.renderText)(o,e.verbose))console.log(r);console.log("")}return(0,types_1.exitCodeFor)(o)}(0,cli_1.runCli)({command:"doctor",printHelp,helpArgs:cli_1.helpAnywhere,handler:main});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const cli_1=require("../lib/cli"),cli_2=require("../lib/hooks/cli");function printHelp(){console.log(`
|
|
3
|
+
Agentkit Hooks Manager
|
|
4
|
+
See and set hook toggles in .agentkit.json
|
|
5
|
+
|
|
6
|
+
Usage:
|
|
7
|
+
agentkit hooks <command> [options]
|
|
8
|
+
agentkit hooks pick toggles interactively
|
|
9
|
+
|
|
10
|
+
Commands:
|
|
11
|
+
list One kit's toggles; picks the kit when it has to
|
|
12
|
+
enable <name...> Turn one or more hooks on
|
|
13
|
+
disable <name...> Turn one or more hooks off
|
|
14
|
+
enable --all Turn EVERY hook of the target kit on
|
|
15
|
+
disable --all Turn EVERY hook of the target kit off
|
|
16
|
+
help Show this help message
|
|
17
|
+
|
|
18
|
+
Options:
|
|
19
|
+
--kit <name> Target one kit by name, whatever the cwd
|
|
20
|
+
--global Every global install, rather than one kit
|
|
21
|
+
--all Write the master switch instead of named hooks
|
|
22
|
+
--help, -h Show this help message
|
|
23
|
+
|
|
24
|
+
Examples:
|
|
25
|
+
agentkit hooks list # Pick a kit, see its toggles
|
|
26
|
+
agentkit hooks list --kit omp # omp's toggles, no prompt
|
|
27
|
+
agentkit hooks list --global # Every global kit
|
|
28
|
+
agentkit hooks disable --kit omp language-guard
|
|
29
|
+
agentkit hooks disable scout-block # The kit resolved from this directory
|
|
30
|
+
agentkit hooks disable --all # Master switch: every hook, one command
|
|
31
|
+
agentkit hooks # Interactive picker (asks which kit)
|
|
32
|
+
|
|
33
|
+
The master switch is \`hooksEnabled\`, top-level in .agentkit.json. \`false\` turns
|
|
34
|
+
every hook of that install off, whatever the per-hook keys say; the per-hook
|
|
35
|
+
values are kept, so \`enable --all\` restores the kit to exactly what it was.
|
|
36
|
+
`)}(0,cli_1.runCli)({command:"hooks",printHelp,helpArgs:e=>e.includes("--help")||e.includes("-h")||e[0]==="help"||e[1]==="help",handler:cli_2.runHooks});
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const cli_1=require("../lib/cli"),cli_2=require("../lib/init/cli"),kits_1=require("../lib/kits"),skill_profiles_1=require("../lib/skill-profiles"),claude_agents_1=require("../lib/kit-installers/claude-agents");function printHelp(){console.log(`
|
|
3
|
+
Agentkit Installer
|
|
4
|
+
Initialize AI development kit (project or global)
|
|
5
|
+
|
|
6
|
+
Usage:
|
|
7
|
+
agentkit init [kit] [options]
|
|
8
|
+
|
|
9
|
+
Arguments:
|
|
10
|
+
[kit] Target a specific kit directly (${kits_1.ALL_KIT_NAMES.join(", ")})
|
|
11
|
+
|
|
12
|
+
Options:
|
|
13
|
+
--global, -g Install globally regardless of current directory
|
|
14
|
+
--profile <name> Install only skills for a profile (${skill_profiles_1.PROFILES.join(", ")})
|
|
15
|
+
Run \`agentkit help profile\` for what each one installs
|
|
16
|
+
--agent-models <mode> Claude Code only: ${claude_agents_1.CLAUDE_AGENT_MODELS.join(" | ")} (default pinned)
|
|
17
|
+
--force-shared-root Proceed when this kit's global root already holds another kit
|
|
18
|
+
--ref <ref> Install the payload from a specific tag/branch/sha (dev)
|
|
19
|
+
--help, -h Show this help message
|
|
20
|
+
|
|
21
|
+
Supported Platforms:
|
|
22
|
+
Claude Code, Cursor AI, Augment Code, Antigravity, OpenCode,
|
|
23
|
+
OpenAI Codex, Kimi CLI, Hermes Agent, OpenClaw, Oh My Pi, Grok Build, Pi,
|
|
24
|
+
Devin CLI
|
|
25
|
+
|
|
26
|
+
Scope:
|
|
27
|
+
- Inside a project directory: installs into the current project (single kit)
|
|
28
|
+
- Inside home directory (~): installs globally (supports selecting multiple kits)
|
|
29
|
+
- With [kit]: directly targets that kit without the interactive selection menu
|
|
30
|
+
- With --global / -g: forces global installation for the targeted kit
|
|
31
|
+
|
|
32
|
+
Examples:
|
|
33
|
+
agentkit init # Interactive installer
|
|
34
|
+
agentkit init claude # Initialize Claude Code directly
|
|
35
|
+
agentkit init claude --agent-models # Initialize Claude Code with model selection prompt
|
|
36
|
+
agentkit init cursor --profile full # Initialize Cursor with full profile
|
|
37
|
+
agentkit init omp # Initialize Oh My Pi globally
|
|
38
|
+
agentkit init hermes # Initialize Hermes Agent globally
|
|
39
|
+
`)}(0,cli_1.runCli)({command:"init",printHelp,helpArgs:cli_1.helpAnywhere,handler:cli_2.runInit});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const cli_1=require("
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const cli_1=require("../lib/auth/cli"),cli_2=require("../lib/cli");function printHelp(){console.log(`
|
|
3
3
|
Agentkit Login
|
|
4
4
|
Authorize this machine to reach the private kit repository
|
|
5
5
|
|
|
@@ -13,4 +13,4 @@ Options:
|
|
|
13
13
|
The flow asks GitHub for a device code, you approve it in the browser, and the
|
|
14
14
|
resulting token is stored in the OS credential store (Keychain on macOS) with a
|
|
15
15
|
plaintext fallback under ~/.agentkit/ for systems without one.
|
|
16
|
-
`)}
|
|
16
|
+
`)}(0,cli_2.runCli)({command:"login",printHelp,helpArgs:cli_2.helpFlagsOnly,handler:e=>(0,cli_1.runLogin)({},{openBrowser:!e.includes("--no-open")})});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const cli_1=require("
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const cli_1=require("../lib/auth/cli"),cli_2=require("../lib/cli");function printHelp(){console.log(`
|
|
3
3
|
Agentkit Logout
|
|
4
4
|
Remove the stored credential and entitlement cache
|
|
5
5
|
|
|
@@ -9,4 +9,4 @@ Usage:
|
|
|
9
9
|
Clears the credential-store entry, ~/.agentkit/auth.json and
|
|
10
10
|
~/.agentkit/entitlement.json. Fetched payload versions under
|
|
11
11
|
~/.agentkit/payload/ are kept; 'agentkit uninstall' removes them.
|
|
12
|
-
`)
|
|
12
|
+
`)}(0,cli_2.runCli)({command:"logout",printHelp,helpArgs:cli_2.helpFlagsOnly,handler:()=>(0,cli_1.runLogout)()});
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),__importStar=this&&this.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&__createBinding(t,e,r[i]);return __setModuleDefault(t,e),t}})();Object.defineProperty(exports,"__esModule",{value:!0});const path=__importStar(require("path")),init_args_1=require("../lib/init-args"),kits_1=require("../lib/kits"),logger_1=require("../lib/logger"),cli_1=require("../lib/cli"),profile_remove_1=require("../lib/profile-remove"),targetDir=process.cwd(),repoRoot=path.resolve(__dirname,"..","..");function printHelp(){console.log(`Usage: agentkit profile remove [kit] [--global]
|
|
3
|
+
|
|
4
|
+
Remove a non-core install profile by reinstalling the kit with the core profile.`)}(0,cli_1.runCli)({command:"profile",printHelp,helpArgs:cli_1.helpFlagsOnly,handler:async n=>{if(n[0]!=="remove"){printHelp(),process.exitCode=1;return}const e=n.slice(1),t=(0,init_args_1.parseKitFlag)(e);if(t.invalid){(0,logger_1.printError)(`Unknown kit: "${t.invalid}". Supported kits: ${kits_1.ALL_KIT_NAMES.join(", ")}.`),process.exitCode=1;return}const r=(0,init_args_1.parseGlobalFlag)(e);if(r&&t.kit&&!(0,kits_1.supportsGlobalInstall)(t.kit)){(0,logger_1.printError)(`${kits_1.kitDefinitions[t.kit].name} does not support global install.`),process.exitCode=1;return}const i=(0,profile_remove_1.resolveRemovalContexts)(targetDir,t.kit,r);if(i.length===0){(0,logger_1.printError)("No matching AgentKit install detected."),process.exitCode=1;return}const{removals:o,proceed:l,refuseReason:s}=await(0,profile_remove_1.planProfileRemovals)(i);if(!l){s==="non-tty"&&(process.exitCode=1);return}for(const a of o)(0,profile_remove_1.applyProfileRemoval)(a,repoRoot,targetDir)||(process.exitCode=1)}});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const cli_1=require("../lib/cli"),cli_2=require("../lib/skills/cli");function printHelp(){console.log(`
|
|
3
|
+
Agentkit Skills Manager
|
|
4
|
+
Discover and install skills on top of the active profile
|
|
5
|
+
|
|
6
|
+
Usage:
|
|
7
|
+
agentkit skills [command] [options]
|
|
8
|
+
|
|
9
|
+
Commands:
|
|
10
|
+
(none) Pick skills to install (interactive in TTY)
|
|
11
|
+
list Show the full skill catalog grouped by category
|
|
12
|
+
add <name...> Install one or more named skills
|
|
13
|
+
remove <name...> Remove skills added with \`add\` and update config
|
|
14
|
+
help Show this help message
|
|
15
|
+
|
|
16
|
+
Options:
|
|
17
|
+
--help, -h Show this help message
|
|
18
|
+
|
|
19
|
+
Examples:
|
|
20
|
+
agentkit skills # Interactive skill picker
|
|
21
|
+
agentkit skills list # Print all available skills
|
|
22
|
+
agentkit skills add databases # Add databases skill to active kit
|
|
23
|
+
agentkit skills add gsap expo # Add multiple skills
|
|
24
|
+
agentkit skills remove databases # Remove a previously added skill
|
|
25
|
+
`)}(0,cli_1.runCli)({command:"skills",printHelp,helpArgs:l=>l.includes("--help")||l.includes("-h")||l[0]==="help"||l[1]==="help",handler:cli_2.runSkills});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(s,e,r,n){n===void 0&&(n=r);var t=Object.getOwnPropertyDescriptor(e,r);(!t||("get"in t?!e.__esModule:t.writable||t.configurable))&&(t={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(s,n,t)}):(function(s,e,r,n){n===void 0&&(n=r),s[n]=e[r]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),__importStar=this&&this.__importStar||(function(){var s=function(e){return s=Object.getOwnPropertyNames||function(r){var n=[];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(n[n.length]=t);return n},s(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=s(e),t=0;t<n.length;t++)n[t]!=="default"&&__createBinding(r,e,n[t]);return __setModuleDefault(r,e),r}})();Object.defineProperty(exports,"__esModule",{value:!0});const path=__importStar(require("path")),cli_1=require("../lib/cli"),install_profile_config_1=require("../lib/install-profile-config"),logger_1=require("../lib/logger"),scan_roots_1=require("../lib/scan-roots"),collect_1=require("../lib/status/collect"),render_1=require("../lib/status/render"),repoRoot=path.resolve(__dirname,"..","..");function parseFlags(s){return{json:s.includes("--json"),verbose:s.includes("--verbose"),scan:s.includes("--scan")}}async function resolveScanRoots(s){const e=(0,scan_roots_1.readScanRoots)();if(s.scan){const r=await(0,scan_roots_1.promptScanRoots)();return r||(process.stdout.isTTY||(0,logger_1.printWarning)("--scan needs an interactive terminal."),e)}return e}function printHelp(){console.log(`
|
|
3
|
+
Agentkit Status
|
|
4
|
+
List every Agentkit installation on this machine
|
|
5
|
+
|
|
6
|
+
Usage:
|
|
7
|
+
agentkit status [options]
|
|
8
|
+
|
|
9
|
+
Options:
|
|
10
|
+
--scan Interactively select directories to scan for project installs
|
|
11
|
+
--verbose Include kit roots and unread toggles
|
|
12
|
+
--json Output machine-readable JSON StatusRow[]
|
|
13
|
+
--help, -h Show this help message
|
|
14
|
+
|
|
15
|
+
Examples:
|
|
16
|
+
agentkit status # Summary table of all installed kits
|
|
17
|
+
agentkit status --scan # Configure and run project directory scanning
|
|
18
|
+
agentkit status --verbose # Detailed status including file paths
|
|
19
|
+
agentkit status --json # Machine-readable JSON output
|
|
20
|
+
`)}async function main(s){const e=parseFlags(s),r=console.log;e.json&&(console.log=(...t)=>{process.stderr.write(`${t.join(" ")}
|
|
21
|
+
`)});let n;try{const t=await resolveScanRoots(e);t.length===0&&!e.json&&((0,logger_1.printInfo)("No scan roots configured \u2014 showing global installs only."),(0,logger_1.printInfo)("Run `agentkit status --scan` to add project directories.")),n=(0,collect_1.collectStatusRows)({repoRoot,scanRoots:t,cliVersion:(0,install_profile_config_1.readCliVersion)(repoRoot)})}finally{console.log=r}if(e.json)process.stdout.write(`${(0,render_1.renderJson)(n)}
|
|
22
|
+
`);else{(0,logger_1.printSection)("AgentKit installs"),console.log("");for(const t of(0,render_1.renderText)(n,e.verbose))console.log(t);console.log("")}return n.length===0?1:0}(0,cli_1.runCli)({command:"status",printHelp,helpArgs:cli_1.helpAnywhere,handler:main});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}):(function(t,e,n,r){r===void 0&&(r=n),t[r]=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 r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r=t(e),i=0;i<r.length;i++)r[i]!=="default"&&__createBinding(n,e,r[i]);return __setModuleDefault(n,e),n}})();Object.defineProperty(exports,"__esModule",{value:!0});const fs=__importStar(require("fs")),path=__importStar(require("path")),child_process_1=require("child_process"),cli_1=require("../lib/cli"),logger_1=require("../lib/logger"),agentkit_home_1=require("../lib/agentkit-home");function packageName(){try{const t=JSON.parse(fs.readFileSync(path.join(path.resolve(__dirname,"..",".."),"package.json"),"utf8"));if(typeof t.name=="string")return t.name}catch{}return"@linhnguyen96114/agentkit-engineer"}function removableConfigFiles(){const t=(0,agentkit_home_1.loadAgentkitHomeCore)(),e=t.getDbPath();return[t.getConfigPath(),t.getLockPath(),t.getAuthJsonPath(),t.getCredentialsPath(),t.getEntitlementPath(),e,`${e}-wal`,`${e}-shm`]}function printHelp(){console.log(`
|
|
3
|
+
Agentkit Uninstall
|
|
4
|
+
Remove Agentkit CLI from your system (global uninstall)
|
|
5
|
+
|
|
6
|
+
Usage:
|
|
7
|
+
agentkit uninstall [options]
|
|
8
|
+
|
|
9
|
+
Options:
|
|
10
|
+
--help, -h Show this help message
|
|
11
|
+
|
|
12
|
+
Notes:
|
|
13
|
+
This uninstalls the global npm package and removes CLI configuration.
|
|
14
|
+
Usage history and install registry in ~/.agentkit are preserved.
|
|
15
|
+
|
|
16
|
+
Examples:
|
|
17
|
+
agentkit uninstall # Uninstall the Agentkit CLI
|
|
18
|
+
`)}function uninstall(){(0,logger_1.printSection)("Uninstalling Agentkit CLI"),(0,logger_1.printProgress)("Removing global package...");try{(0,child_process_1.execSync)(`npm uninstall -g ${packageName()}`,{stdio:"inherit",windowsHide:!0}),(0,logger_1.printSuccess)("Package removed")}catch(e){return(0,logger_1.printError)(`Failed to uninstall: ${e.message}`),(0,logger_1.printInfo)("Try manually: npm uninstall -g "+packageName()),1}try{const{getStore:e}=require("../lib/auth/token-store");e({}).store.clear("github").catch(()=>{})}catch{}const t=(0,agentkit_home_1.loadAgentkitHomeCore)().getAgentkitHome();if(fs.existsSync(t)){(0,logger_1.printProgress)("Removing CLI config...");for(const n of removableConfigFiles())try{fs.rmSync(n,{force:!0})}catch(r){(0,logger_1.printInfo)(`Could not remove ${path.basename(n)}: ${r.message}`)}(0,logger_1.printSuccess)("CLI config removed");const e=(0,agentkit_home_1.loadAgentkitHomeCore)().getPayloadDir();if(fs.existsSync(e))try{fs.rmSync(e,{recursive:!0,force:!0}),(0,logger_1.printSuccess)("Fetched payloads removed")}catch(n){(0,logger_1.printInfo)(`Could not remove payloads: ${n.message}`),(0,logger_1.printInfo)(` Remove them with: rm -rf ${e}`)}(0,logger_1.printInfo)(`Usage history and install registry kept in ${t}`),console.log(` Remove them with: rm -rf ${t}`)}console.log(""),(0,logger_1.printSuccess)("Agentkit CLI uninstalled successfully!"),console.log(""),(0,logger_1.printInfo)("To reinstall:"),console.log(` npm i -g ${packageName()}`),console.log(" agentkit login"),console.log("")}(0,cli_1.runCli)({command:"uninstall",printHelp,helpArgs:cli_1.helpAnywhere,handler:()=>uninstall()});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const cli_1=require("../lib/cli"),cli_2=require("../lib/update/cli");function printHelp(){console.log(`
|
|
3
|
+
Agentkit CLI Update Manager
|
|
4
|
+
Client and payload version independently: npm for the client, GitHub releases for the kit
|
|
5
|
+
|
|
6
|
+
Usage:
|
|
7
|
+
agentkit update [options]
|
|
8
|
+
|
|
9
|
+
Options:
|
|
10
|
+
--yes, -y Skip confirmation prompt and update immediately
|
|
11
|
+
--ref <ref> Install a specific tag/branch/sha instead of the latest release (dev)
|
|
12
|
+
--help, -h Show this help message
|
|
13
|
+
|
|
14
|
+
Examples:
|
|
15
|
+
agentkit update # Check for updates and prompt to install
|
|
16
|
+
agentkit update --yes # Update without confirmation prompt
|
|
17
|
+
`)}(0,cli_1.runCli)({command:"update",printHelp,helpArgs:cli_1.helpAnywhere,handler:cli_2.runUpdate});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const cli_1=require("
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const cli_1=require("../lib/auth/cli"),cli_2=require("../lib/cli");function printHelp(){console.log(`
|
|
3
3
|
Agentkit Whoami
|
|
4
4
|
Show the logged-in account and its entitlement
|
|
5
5
|
|
|
@@ -8,4 +8,4 @@ Usage:
|
|
|
8
8
|
|
|
9
9
|
Exit 0 when the entitlement is active (including inside the 7-day grace
|
|
10
10
|
window), 1 when revoked or no credential exists.
|
|
11
|
-
`)
|
|
11
|
+
`)}(0,cli_2.runCli)({command:"whoami",printHelp,helpArgs:cli_2.helpFlagsOnly,handler:()=>(0,cli_1.runWhoami)()});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(t,e,a,r){r===void 0&&(r=a);var o=Object.getOwnPropertyDescriptor(e,a);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return e[a]}}),Object.defineProperty(t,r,o)}):(function(t,e,a,r){r===void 0&&(r=a),t[r]=e[a]})),__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(a){var r=[];for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(r[r.length]=o);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r=t(e),o=0;o<r.length;o++)r[o]!=="default"&&__createBinding(a,e,r[o]);return __setModuleDefault(a,e),a}})();Object.defineProperty(exports,"__esModule",{value:!0}),exports.parseOwnerRepo=parseOwnerRepo,exports.normalizeVersion=normalizeVersion,exports.interpretTagOutput=interpretTagOutput,exports.fetchLatestTag=fetchLatestTag,exports.fetchCommitsBehind=fetchCommitsBehind,exports.buildDriftRow=buildDriftRow;const child_process_1=require("child_process"),generate_catalogs_1=require("./generate-catalogs"),path=__importStar(require("path")),REPO_ROOT=path.resolve(__dirname,"..");function parseOwnerRepo(t){const e=t.match(/github\.com\/([\w.-]+)\/([\w.-]+?)(?:\.git)?\/?$/);return e?`${e[1]}/${e[2]}`:null}function normalizeVersion(t){return t.replace(/^v/,"").trim()}function interpretTagOutput(t){return{reachable:!0,tag:t.trim()||null}}function fetchLatestTag(t){try{return interpretTagOutput((0,child_process_1.execFileSync)("gh",["api",`repos/${t}/tags`,"--jq",".[0].name"],{encoding:"utf8",timeout:15e3,stdio:["ignore","pipe","ignore"]}))}catch{return{reachable:!1}}}function fetchCommitsBehind(t,e){try{const a=(0,child_process_1.execFileSync)("gh",["api",`repos/${t}/compare/${e}...HEAD`,"--jq",".ahead_by"],{encoding:"utf8",timeout:15e3,stdio:["ignore","pipe","ignore"]}).trim(),r=Number.parseInt(a,10);return Number.isNaN(r)?null:r}catch{return null}}function buildDriftRow(t,e,a=null){const r=parseOwnerRepo(t.upstream??"")??t.upstream??"?",o=t.upstream_version?normalizeVersion(t.upstream_version):null,u=e.reachable?e.tag:null,l=!!(t.upstream_commit&&e.reachable&&(!t.upstream_version||e.tag===null));let i;if(!e.reachable)i="unreachable";else if(l){if(a!==null)return{skill:t.name,ownerRepo:r,local:t.upstream_commit.slice(0,12),latest:`HEAD~${a}`,state:a===0?"current":"behind"};i="untagged"}else e.tag===null?i="untagged":o===null?i="unpinned":i=normalizeVersion(e.tag)===o?"current":"behind";return{skill:t.name,ownerRepo:r,local:o,latest:u,state:i}}function main(){const t=(0,generate_catalogs_1.collectSkills)(REPO_ROOT).filter(n=>n.upstream);if(t.length===0){console.log("No vendored skills declare an `upstream` \u2014 nothing to check.");return}console.log(`Checking ${t.length} vendored skill(s) against upstream tags...
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(t,e,a,r){r===void 0&&(r=a);var o=Object.getOwnPropertyDescriptor(e,a);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return e[a]}}),Object.defineProperty(t,r,o)}):(function(t,e,a,r){r===void 0&&(r=a),t[r]=e[a]})),__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(a){var r=[];for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(r[r.length]=o);return r},t(e)};return function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r=t(e),o=0;o<r.length;o++)r[o]!=="default"&&__createBinding(a,e,r[o]);return __setModuleDefault(a,e),a}})();Object.defineProperty(exports,"__esModule",{value:!0}),exports.parseOwnerRepo=parseOwnerRepo,exports.normalizeVersion=normalizeVersion,exports.interpretTagOutput=interpretTagOutput,exports.fetchLatestTag=fetchLatestTag,exports.fetchCommitsBehind=fetchCommitsBehind,exports.buildDriftRow=buildDriftRow;const child_process_1=require("child_process"),generate_catalogs_1=require("./generate-catalogs"),path=__importStar(require("path")),REPO_ROOT=path.resolve(__dirname,"..","..");function parseOwnerRepo(t){const e=t.match(/github\.com\/([\w.-]+)\/([\w.-]+?)(?:\.git)?\/?$/);return e?`${e[1]}/${e[2]}`:null}function normalizeVersion(t){return t.replace(/^v/,"").trim()}function interpretTagOutput(t){return{reachable:!0,tag:t.trim()||null}}function fetchLatestTag(t){try{return interpretTagOutput((0,child_process_1.execFileSync)("gh",["api",`repos/${t}/tags`,"--jq",".[0].name"],{encoding:"utf8",timeout:15e3,stdio:["ignore","pipe","ignore"]}))}catch{return{reachable:!1}}}function fetchCommitsBehind(t,e){try{const a=(0,child_process_1.execFileSync)("gh",["api",`repos/${t}/compare/${e}...HEAD`,"--jq",".ahead_by"],{encoding:"utf8",timeout:15e3,stdio:["ignore","pipe","ignore"]}).trim(),r=Number.parseInt(a,10);return Number.isNaN(r)?null:r}catch{return null}}function buildDriftRow(t,e,a=null){const r=parseOwnerRepo(t.upstream??"")??t.upstream??"?",o=t.upstream_version?normalizeVersion(t.upstream_version):null,u=e.reachable?e.tag:null,l=!!(t.upstream_commit&&e.reachable&&(!t.upstream_version||e.tag===null));let i;if(!e.reachable)i="unreachable";else if(l){if(a!==null)return{skill:t.name,ownerRepo:r,local:t.upstream_commit.slice(0,12),latest:`HEAD~${a}`,state:a===0?"current":"behind"};i="untagged"}else e.tag===null?i="untagged":o===null?i="unpinned":i=normalizeVersion(e.tag)===o?"current":"behind";return{skill:t.name,ownerRepo:r,local:o,latest:u,state:i}}function main(){const t=(0,generate_catalogs_1.collectSkills)(REPO_ROOT).filter(n=>n.upstream);if(t.length===0){console.log("No vendored skills declare an `upstream` \u2014 nothing to check.");return}console.log(`Checking ${t.length} vendored skill(s) against upstream tags...
|
|
2
2
|
`);const e=[];for(const n of t){const s=parseOwnerRepo(n.upstream??""),c=s?fetchLatestTag(s):{reachable:!1},f=s&&n.upstream_commit&&c.reachable&&(!n.upstream_version||c.tag===null)?fetchCommitsBehind(s,n.upstream_commit):null;e.push(buildDriftRow(n,c,f))}const a=(n,s)=>Math.max(n.length,...s.map(c=>(c??"\u2014").length))+2,r=a("LOCAL",e.map(n=>n.local)),o=a("LATEST",e.map(n=>n.latest)),u=a("SKILL",e.map(n=>n.skill)),l=(n,s)=>n.padEnd(s);console.log(l("SKILL",u)+l("LOCAL",r)+l("LATEST",o)+"STATE");for(const n of e)console.log(l(n.skill,u)+l(n.local??"\u2014",r)+l(n.latest??"\u2014",o)+n.state);const i=e.filter(n=>n.state==="behind"),p=e.filter(n=>n.state==="untagged"),h=e.filter(n=>n.state==="unreachable");if(i.length>0&&console.warn(`
|
|
3
3
|
\u26A0 ${i.length} skill(s) behind upstream \u2014 consider a re-sync.`),p.length>0){const n=[...new Set(p.map(s=>s.ownerRepo))].join(", ");console.warn(`
|
|
4
4
|
\u2139 ${p.length} skill(s) track an upstream that publishes no tags (${n}).
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=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 i=[];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(i[i.length]=n);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var i=t(e),n=0;n<i.length;n++)i[n]!=="default"&&__createBinding(r,e,i[n]);return __setModuleDefault(r,e),r}})();Object.defineProperty(exports,"__esModule",{value:!0}),exports.DELTAS=exports.BASE=exports.KEY_ORDER=exports.KITS=void 0,exports.renderConfig=renderConfig,exports.generateConfigs=generateConfigs;const fs=__importStar(require("fs")),path=__importStar(require("path")),payload_roots_1=require("../lib/payload-roots"),{deepMerge}=require(path.join(__dirname,"..","..","agent-kit","shared","hooks","lib","agentkit-config-utils.cjs"));exports.KITS=["claude","codex","devin","hermes","kimi","omp","openclaw","opencode"],exports.KEY_ORDER=["$schema","statusline","privacyBlock","docs","plan","paths","locale","trust","project","antigravity","skills","hooks","assertions"],exports.BASE={$schema:"./schemas/agentkit-config.schema.json",privacyBlock:!0,docs:{maxLoc:800},plan:{namingFormat:"{date}-{issue}-{slug}",dateFormat:"YYMMDD-HHmm",issuePrefix:"GH-",reportsDir:"reports",resolution:{order:["session","branch"],branchPattern:"(?:feat|fix|chore|refactor|docs)/(?:[^/]+/)?(.+)"},validation:{mode:"prompt",minQuestions:3,maxQuestions:8,focusAreas:["assumptions","risks","tradeoffs","architecture"]}},paths:{docs:"docs",plans:"plans"},locale:{thinkingLanguage:null,responseLanguage:null},trust:{passphrase:null,enabled:!1},project:{type:"auto",packageManager:"auto",framework:"auto"},hooks:{},assertions:[]},exports.DELTAS={claude:{statusline:"minimal",antigravity:{model:"gemini-3.8-flash-high"},skills:{research:{useAntigravity:!0}}},codex:{statusline:"minimal",antigravity:{model:"gemini-3.8-flash-high"},skills:{research:{useAntigravity:!0}}},devin:{statusline:"minimal",antigravity:{model:"gemini-3.8-flash-high"},skills:{research:{useAntigravity:!0}}},hermes:{statusline:"minimal",skills:{research:{useAntigravity:!1}}},kimi:{statusline:"minimal",antigravity:{model:"gemini-3.8-flash-high"},skills:{research:{useAntigravity:!0}}},omp:{statusline:"minimal",antigravity:{model:"gemini-3.8-flash-high"},skills:{research:{useAntigravity:!0}}},openclaw:{statusline:"minimal",antigravity:{model:"gemini-3.8-flash-high"},skills:{research:{useAntigravity:!0}}},opencode:{statusline:"minimal",antigravity:{model:"gemini-3.8-flash-high"},skills:{research:{useAntigravity:!0}}}};function renderConfig(t){const e=exports.DELTAS[t];if(e===void 0)throw new Error(`no delta defined for kit "${t}"`);const r=deepMerge({...exports.BASE},e),i={};for(const s of exports.KEY_ORDER)s in r&&(i[s]=r[s]);const n=new Set(Object.keys(i));for(const s of Object.keys(r))if(!n.has(s))throw new Error(`kit "${t}": key "${s}" is not in KEY_ORDER and would be dropped`);return`${JSON.stringify(i,null,2)}
|
|
2
|
+
`}function generateConfigs(t){for(const e of exports.KITS){const r=path.join(t,payload_roots_1.AGENT_KIT_DIR,e,".agentkit.json");fs.writeFileSync(r,renderConfig(e))}return[...exports.KITS]}if(require.main===module){const t=path.resolve(__dirname,"..",".."),e=generateConfigs(t);console.log(`agent-kit/*/.agentkit.json \u2014 ${e.length} kits: ${e.join(", ")}`)}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(t,r,e,n){n===void 0&&(n=e);var a=Object.getOwnPropertyDescriptor(r,e);(!a||("get"in a?!r.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return r[e]}}),Object.defineProperty(t,n,a)}):(function(t,r,e,n){n===void 0&&(n=e),t[n]=r[e]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(t,r){Object.defineProperty(t,"default",{enumerable:!0,value:r})}):function(t,r){t.default=r}),__importStar=this&&this.__importStar||(function(){var t=function(r){return t=Object.getOwnPropertyNames||function(e){var n=[];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(n[n.length]=a);return n},t(r)};return function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var n=t(r),a=0;a<n.length;a++)n[a]!=="default"&&__createBinding(e,r,n[a]);return __setModuleDefault(e,r),e}})();Object.defineProperty(exports,"__esModule",{value:!0}),exports.GUIDE_COMMANDS_END=exports.GUIDE_COMMANDS_START=exports.SKILL_STATUSES=exports.CATEGORY_TITLES=void 0,exports.collectSkills=collectSkills,exports.collectAgents=collectAgents,exports.collectCommands=collectCommands,exports.renderSkillsYaml=renderSkillsYaml,exports.renderAgentsYaml=renderAgentsYaml,exports.renderCommandsYaml=renderCommandsYaml,exports.renderSkillsReadme=renderSkillsReadme,exports.slashInvocation=slashInvocation,exports.renderGuideCommandSection=renderGuideCommandSection,exports.syncGuideCommandSections=syncGuideCommandSections,exports.generateCatalogs=generateCatalogs;const fs=__importStar(require("fs")),path=__importStar(require("path")),frontmatter_1=require("../lib/frontmatter"),agent_metadata_1=require("../lib/kit-installers/agent-metadata"),payload_roots_1=require("../lib/payload-roots"),SKILL_GROUPS=[],NOT_SKILLS=new Set(["common",...SKILL_GROUPS]);exports.CATEGORY_TITLES={"ai-ml":"AI & Machine Learning",frontend:"Frontend & Design",backend:"Backend Development",infrastructure:"Infrastructure & DevOps",database:"Database & Storage","dev-tools":"Development Tools",multimedia:"Multimedia & Processing",frameworks:"Frameworks & Platforms",security:"Security",design:"Design",documents:"Document Processing",marketing:"Marketing & Growth",seo:"SEO & Search",utilities:"Utilities & Helpers",other:"Other"},exports.SKILL_STATUSES=new Set(["experimental","stable","deprecated"]);function yamlString(t){return`"${t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function readSkill(t,r,e){const n=path.join(t,e),a=path.join(n,"SKILL.md");if(!fs.existsSync(a))return null;const s=(0,frontmatter_1.parseFrontmatter)(fs.readFileSync(a,"utf8")),i=(0,frontmatter_1.cleanFrontmatterValue)(s.category)||"other",o=(0,frontmatter_1.cleanFrontmatterValue)(s.status)||"stable";return{name:r,path:`${e}/SKILL.md`,description:(0,frontmatter_1.cleanFrontmatterValue)(s.description),category:i in exports.CATEGORY_TITLES?i:"other",status:exports.SKILL_STATUSES.has(o)?o:"stable",user_invocable:(0,frontmatter_1.cleanFrontmatterValue)(s["user-invocable"])==="true",has_scripts:fs.existsSync(path.join(n,"scripts")),has_references:fs.existsSync(path.join(n,"references")),...(0,frontmatter_1.cleanFrontmatterValue)(s.upstream)?{upstream:(0,frontmatter_1.cleanFrontmatterValue)(s.upstream)}:{},...(0,frontmatter_1.cleanFrontmatterValue)(s.upstream_commit)?{upstream_commit:(0,frontmatter_1.cleanFrontmatterValue)(s.upstream_commit)}:{},...(0,frontmatter_1.cleanFrontmatterValue)(s.upstream_version)?{upstream_version:(0,frontmatter_1.cleanFrontmatterValue)(s.upstream_version)}:{},...(0,frontmatter_1.cleanFrontmatterValue)(s.synced)?{synced:(0,frontmatter_1.cleanFrontmatterValue)(s.synced)}:{}}}function collectSkills(t){const r=path.join(t,payload_roots_1.SKILL_SOURCE_DIR),e=[];for(const n of fs.readdirSync(r,{withFileTypes:!0})){if(!n.isDirectory()||n.name.startsWith("."))continue;if(SKILL_GROUPS.includes(n.name)){const s=path.join(r,n.name);for(const i of fs.readdirSync(s,{withFileTypes:!0})){if(!i.isDirectory())continue;const o=readSkill(r,i.name,`${n.name}/${i.name}`);o&&e.push({...o,category:"documents"})}continue}if(NOT_SKILLS.has(n.name))continue;const a=readSkill(r,n.name,n.name);a&&e.push(a)}return e.sort((n,a)=>n.name.localeCompare(a.name))}function collectAgents(t){const{agents:r}=(0,agent_metadata_1.readAgentsDir)(path.join(t,payload_roots_1.AGENTS_SOURCE_DIR));return r.map(e=>({name:e.name,path:`${e.name}.md`,description:(0,agent_metadata_1.trimmedDescription)(e.description),model:e.model??"inherit",read_only:e.readOnly,memory:e.memory??"none"}))}function collectCommands(t){const r=path.join(t,payload_roots_1.COMMAND_SOURCE_DIR),e=[],n=a=>{for(const s of fs.readdirSync(a,{withFileTypes:!0})){const i=path.join(a,s.name);if(s.isDirectory())n(i);else if(s.name.endsWith(".md")){const o=path.relative(r,i),l=(0,frontmatter_1.parseFrontmatter)(fs.readFileSync(i,"utf8"));e.push({name:o.replace(/\.md$/,""),path:o,description:(0,frontmatter_1.cleanFrontmatterValue)(l.description)})}}};return n(r),e.sort((a,s)=>a.name.localeCompare(s.name))}function renderSkillsYaml(t){const r=[...new Set(t.map(n=>n.category))].sort(),e=["# Generated by scripts/gen/generate-catalogs.ts -- do not edit by hand.","# Run `npm run catalog:sync` after adding or removing a skill.","metadata:"," title: Skills Catalog"," description: Catalog of every skill in AgentKit Engineer, generated from skills/.",` total_skills: ${t.length}`,` user_invocable: ${t.filter(n=>n.user_invocable).length}`,"categories:",...r.map(n=>` ${n}: ${yamlString(exports.CATEGORY_TITLES[n])}`),"legend:"," user_invocable: Callable directly as /<name>"," has_scripts: Ships executable scripts"," has_references: Ships reference documentation"," status: Lifecycle label (experimental | stable | deprecated); deprecated still installs","skills:"];for(const n of r){e.push(` ${n}:`);for(const a of t.filter(s=>s.category===n))e.push(` - name: ${a.name}`,` path: ${a.path}`,` description: ${yamlString(a.description)}`,` status: ${a.status}`,` user_invocable: ${a.user_invocable}`,` has_scripts: ${a.has_scripts}`,` has_references: ${a.has_references}`),a.upstream&&(e.push(` upstream: ${yamlString(a.upstream)}`),a.upstream_version&&e.push(` upstream_version: ${yamlString(a.upstream_version)}`),a.upstream_commit&&e.push(` upstream_commit: ${yamlString(a.upstream_commit)}`),a.synced&&e.push(` synced: ${yamlString(a.synced)}`))}return`${e.join(`
|
|
2
|
+
`)}
|
|
3
|
+
`}function renderAgentsYaml(t){const r=["# Generated by scripts/gen/generate-catalogs.ts -- do not edit by hand.","# Run `npm run catalog:sync` after adding or removing an agent.","metadata:"," title: Agents Catalog"," description: Catalog of every subagent in AgentKit Engineer, generated from agents/.",` total_agents: ${t.length}`,"legend:"," model: Pinned model, or `inherit` when the host decides"," read_only: Cannot edit files or shell out (derived from its tools)"," memory: Persistent-memory scope (project | user | none)","agents:"];for(const e of t)r.push(` - name: ${e.name}`,` path: ${e.path}`,` description: ${yamlString(e.description)}`,` model: ${e.model}`,` read_only: ${e.read_only}`,` memory: ${e.memory}`);return`${r.join(`
|
|
4
|
+
`)}
|
|
5
|
+
`}function renderCommandsYaml(t){const r=["# Generated by scripts/gen/generate-catalogs.ts -- do not edit by hand.","# Run `npm run catalog:sync` after adding or removing a command.","metadata:"," title: Commands Catalog"," description: Catalog of every slash command in AgentKit Engineer, generated from command/.",` total_commands: ${t.length}`," note: Most workflows are skills, not commands. See SKILLS.yaml for the full set.","commands:"];for(const e of t)r.push(` - name: ${e.name}`,` path: ${e.path}`,` description: ${yamlString(e.description)}`);return`${r.join(`
|
|
6
|
+
`)}
|
|
7
|
+
`}function firstSentence(t){const r=t.trim(),e=r.match(/^(.*?[.!?])(\s|$)/),n=e?e[1]:r;return n.length>160?`${n.slice(0,157).trimEnd()}...`:n}function cell(t){return t.replace(/\|/g,"\\|")}function renderSkillsReadme(t,r){const e=[...new Set(t.map(s=>s.category))].sort(),n=t.filter(s=>s.user_invocable).length,a=["<!-- Generated by scripts/gen/generate-catalogs.ts -- do not edit by hand. -->","<!-- Run `npm run catalog:sync` after adding or removing a skill. -->","","# Skills Library","",`**${t.length} skills.** ${n} are invocable directly as \`/<name>\`; the rest`,"activate when the model judges them relevant. Machine-readable catalog:","[`guide/SKILLS.yaml`](../guide/SKILLS.yaml).","","Generated from each skill's own frontmatter, so it cannot drift from what ships.","Run `npm run catalog:sync` after adding or removing one.","","---","","## How to Use Skills","","### Name one directly","","```bash",'/ak-plan "add OAuth login" # research and write a phased plan',"/cook plans/<dir>/plan.md # execute that plan",'/ak-fix "TypeError in auth.ts" # diagnose the root cause, then fix it','/scout "where is payment handled"',"```","","### Or just describe the task","","The model routes to the right skill from the description alone. Naming one is an","override, not a requirement.","","```text",'"Investigate why the dashboard crashes after login" -> ak-debug','"Build a pricing page that does not look AI-generated" -> frontend-design','"Set up the memory MCP server" -> use-mcp',"```","",`Workflows that are not skills ship as ${r} slash ${r===1?"command":"commands"} --`,"see [`guide/COMMANDS.md`](../guide/COMMANDS.md).","","---","","## Catalog",""];for(const s of e){const i=t.filter(o=>o.category===s);a.push(`### ${exports.CATEGORY_TITLES[s]} (${i.length})`,"","| Skill | Invoke | What it does |","|-------|--------|--------------|",...i.map(o=>{const l=o.user_invocable?`\`/${o.name}\``:"_auto_",c=o.status==="stable"?"":o.status==="deprecated"?" \u26D4 _deprecated_":" \u26A0\uFE0F _experimental_";return`| **${o.name}**${c} | ${l} | ${cell(firstSentence(o.description))} |`}),"")}return a.push("---","","## Creating a Skill","","Use [`skill-creator`](./skill-creator/) -- it scaffolds the directory, writes the","frontmatter, and validates the result. After adding one, run `npm run catalog:sync`","so this page and the YAML catalogs pick it up.",""),a.join(`
|
|
8
|
+
`)}exports.GUIDE_COMMANDS_START="<!-- AGENTKIT:COMMANDS start - generated, do not edit -->",exports.GUIDE_COMMANDS_END="<!-- AGENTKIT:COMMANDS end -->";function slashInvocation(t){return`/${t.split(path.sep).join(":").split("/").join(":")}`}function renderGuideCommandSection(t){const r=t.map(n=>`| \`${slashInvocation(n.name)}\` | ${cell(firstSentence(n.description))} |`).join(`
|
|
9
|
+
`),e=t.length===1?"slash command is":"slash commands are";return[exports.GUIDE_COMMANDS_START,"",`These ${t.length} ${e} the complete set. Anything else you have`,"seen written as a slash command in older docs is a **skill**, invoked by name","(`ak-plan`, `cook`, `ak-fix`, `ak-debug`, `docs`, `ship`, `scout`, `git`, `design`).","Run `/ak-help <keyword>` to find the right one.","","| Command | Purpose |","| --- | --- |",r,"",exports.GUIDE_COMMANDS_END].join(`
|
|
10
|
+
`)}function syncGuideCommandSections(t,r){const e=path.join(t,payload_roots_1.GUIDE_DIR);if(!fs.existsSync(e))return[];const n=renderGuideCommandSection(r),a=[];for(const s of fs.readdirSync(e)){if(!s.startsWith("SETUP-")||!s.endsWith(".md"))continue;const i=path.join(e,s),o=fs.readFileSync(i,"utf8"),l=o.indexOf(exports.GUIDE_COMMANDS_START),c=o.indexOf(exports.GUIDE_COMMANDS_END);if(l===-1||c===-1)continue;const d=o.slice(0,l)+n+o.slice(c+exports.GUIDE_COMMANDS_END.length);d!==o&&(fs.writeFileSync(i,d),a.push(s))}return a}function generateCatalogs(t){const r=collectSkills(t),e=collectCommands(t),n=collectAgents(t);return fs.writeFileSync(path.join(t,payload_roots_1.GUIDE_DIR,"SKILLS.yaml"),renderSkillsYaml(r)),fs.writeFileSync(path.join(t,payload_roots_1.GUIDE_DIR,"COMMANDS.yaml"),renderCommandsYaml(e)),fs.writeFileSync(path.join(t,payload_roots_1.GUIDE_DIR,"AGENTS.yaml"),renderAgentsYaml(n)),fs.writeFileSync(path.join(t,payload_roots_1.SKILL_SOURCE_DIR,"README.md"),renderSkillsReadme(r,e.length)),syncGuideCommandSections(t,e),{skills:r.length,commands:e.length,agents:n.length}}if(require.main===module){const t=path.resolve(__dirname,"..",".."),{skills:r,commands:e,agents:n}=generateCatalogs(t);console.log(`guide/SKILLS.yaml \u2014 ${r} skills`),console.log(`guide/COMMANDS.yaml \u2014 ${e} commands`),console.log(`guide/AGENTS.yaml \u2014 ${n} agents`),console.log(`skills/README.md \u2014 ${r} skills`)}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env tsx
|
|
2
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(n,e,s,o){o===void 0&&(o=s);var r=Object.getOwnPropertyDescriptor(e,s);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[s]}}),Object.defineProperty(n,o,r)}):(function(n,e,s,o){o===void 0&&(o=s),n[o]=e[s]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),__importStar=this&&this.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(s){var o=[];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(o[o.length]=r);return o},n(e)};return function(e){if(e&&e.__esModule)return e;var s={};if(e!=null)for(var o=n(e),r=0;r<o.length;r++)o[r]!=="default"&&__createBinding(s,e,o[r]);return __setModuleDefault(s,e),s}})();Object.defineProperty(exports,"__esModule",{value:!0});const child_process_1=require("child_process"),fs=__importStar(require("fs")),path=__importStar(require("path")),skill_tests_1=require("
|
|
2
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(n,e,s,o){o===void 0&&(o=s);var r=Object.getOwnPropertyDescriptor(e,s);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[s]}}),Object.defineProperty(n,o,r)}):(function(n,e,s,o){o===void 0&&(o=s),n[o]=e[s]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),__importStar=this&&this.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(s){var o=[];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(o[o.length]=r);return o},n(e)};return function(e){if(e&&e.__esModule)return e;var s={};if(e!=null)for(var o=n(e),r=0;r<o.length;r++)o[r]!=="default"&&__createBinding(s,e,o[r]);return __setModuleDefault(s,e),s}})();Object.defineProperty(exports,"__esModule",{value:!0});const child_process_1=require("child_process"),fs=__importStar(require("fs")),path=__importStar(require("path")),skill_tests_1=require("../lib/skill-tests"),LOCAL_PY_DEPS=path.join(skill_tests_1.REPO_ROOT,".python-deps"),PYTEST_PIN="pytest==8.3.5",PYTEST_INSTALL_HINT=`python3 -m pip install --target .python-deps --break-system-packages "${PYTEST_PIN}"`;function pythonEnv(){if(!fs.existsSync(LOCAL_PY_DEPS))return process.env;const n=process.env.PYTHONPATH;return{...process.env,PYTHONPATH:n?`${LOCAL_PY_DEPS}${path.delimiter}${n}`:LOCAL_PY_DEPS}}const FILE_TIMEOUT_MS=12e4;function exec(n,e,s,o=process.env,{quiet:r=!1}={}){r||console.log(`
|
|
3
3
|
$ ${n} ${e.join(" ")} (cwd: ${path.relative(skill_tests_1.REPO_ROOT,s)||"."})`);const i=(0,child_process_1.spawnSync)(n,e,{cwd:s,env:o,stdio:r?"ignore":"inherit",timeout:FILE_TIMEOUT_MS,killSignal:"SIGKILL"});if(i.error){const l=i.error.code==="ETIMEDOUT";return console.error(l?` timed out after ${FILE_TIMEOUT_MS/1e3}s: ${e[e.length-1]}`:` failed to spawn: ${i.error.message}`),1}return i.status??1}let pytestChecked=null;function pytestAvailable(){if(pytestChecked!==null)return pytestChecked;const n=(0,child_process_1.spawnSync)("python3",["-m","pytest","--version"],{env:pythonEnv(),encoding:"utf8"});if(pytestChecked=(n.status??1)===0,pytestChecked){const e=(0,child_process_1.spawnSync)("python3",["-V"],{encoding:"utf8"}).stdout.trim();console.log(`${e} | ${n.stdout.trim()}`)}else console.error(`
|
|
4
4
|
pytest is not importable. This runner does not skip \u2014 install it:`),console.error(` ${PYTEST_INSTALL_HINT}`);return pytestChecked}function pytestRoot(n){let e=path.dirname(n);for(;e.startsWith(skill_tests_1.REPO_ROOT)&&e!==skill_tests_1.REPO_ROOT;){if(path.basename(e)==="scripts")return e;e=path.dirname(e)}return path.dirname(n)}function runFile(n,e={}){const s=path.join(skill_tests_1.REPO_ROOT,n.file);if(skill_tests_1.PYTHON_RUNNERS.includes(n.runner)){if(!pytestAvailable())return 1;const o=pytestRoot(s);return exec("python3",["-m","pytest","-q",path.relative(o,s)],o,pythonEnv(),e)}switch(n.runner){case"node:test":return exec("node",["--test",s],skill_tests_1.REPO_ROOT,process.env,e);case"node:bespoke":return exec("node",[s],skill_tests_1.REPO_ROOT,process.env,e);case"shell":return exec("bash",[s],skill_tests_1.REPO_ROOT,process.env,e);default:return console.error(`no invocation defined for runner "${n.runner}"`),1}}function verifyUnwired(n){const e=new Map(n.map(r=>[r.file,r])),s=[...skill_tests_1.KNOWN_UNWIRED].filter(r=>(0,skill_tests_1.allowlistReason)(r)==="fails"),o=[];for(const r of s){const i=e.get((0,skill_tests_1.allowlistPath)(r));if(!i||!skill_tests_1.WIRED_RUNNERS.includes(i.runner))continue;process.stdout.write(` checking ${i.file} \u2026 `);const l=runFile(i,{quiet:!0});console.log(l===0?"PASSES \u2014 remove its allowlist entry":"still fails"),l===0&&o.push(i.file)}if(o.length>0){console.error(`
|
|
5
5
|
these allowlist entries are stale \u2014 the suite passes now:`);for(const r of o)console.error(` ${r}`);return 1}return console.log(`
|