@linhnguyen96114/agentkit-engineer 1.4.2 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/CHANGELOG.md +69 -0
  2. package/README.md +2 -2
  3. package/bin/agentkit.js +1 -1
  4. package/package.json +2 -2
  5. package/scripts-dist/cli/agentkit-clear.js +18 -0
  6. package/scripts-dist/{agentkit-config.js → cli/agentkit-config.js} +3 -3
  7. package/scripts-dist/cli/agentkit-dashboard.js +19 -0
  8. package/scripts-dist/{agentkit-decide.js → cli/agentkit-decide.js} +1 -1
  9. package/scripts-dist/cli/agentkit-doctor.js +20 -0
  10. package/scripts-dist/cli/agentkit-hooks.js +36 -0
  11. package/scripts-dist/cli/agentkit-init.js +39 -0
  12. package/scripts-dist/{agentkit-login.js → cli/agentkit-login.js} +2 -2
  13. package/scripts-dist/cli/agentkit-logout.js +12 -0
  14. package/scripts-dist/cli/agentkit-profile.js +4 -0
  15. package/scripts-dist/cli/agentkit-skills.js +30 -0
  16. package/scripts-dist/cli/agentkit-status.js +22 -0
  17. package/scripts-dist/cli/agentkit-uninstall.js +18 -0
  18. package/scripts-dist/cli/agentkit-update.js +17 -0
  19. package/scripts-dist/{agentkit-whoami.js → cli/agentkit-whoami.js} +2 -2
  20. package/scripts-dist/gen/check-upstream.js +6 -0
  21. package/scripts-dist/gen/frontend-cli.js +4 -3
  22. package/scripts-dist/gen/generate-agentkit-configs.js +2 -0
  23. package/scripts-dist/gen/generate-catalogs.js +10 -0
  24. package/scripts-dist/{run-skill-tests.js → gen/run-skill-tests.js} +1 -1
  25. package/scripts-dist/gen/sync-gamedev-upstream.js +22 -0
  26. package/scripts-dist/gen/sync-upstream.js +1 -0
  27. package/scripts-dist/gen/update-check-worker.js +2 -0
  28. package/scripts-dist/gen/upstream-skill-syncers.js +5 -0
  29. package/scripts-dist/gen/upstream-suite-syncers.js +12 -0
  30. package/scripts-dist/{validate-agents-registry.js → gen/validate-agents-registry.js} +1 -1
  31. package/scripts-dist/lib/agentkit-config-file.js +2 -2
  32. package/scripts-dist/lib/auth/cli.js +1 -1
  33. package/scripts-dist/lib/clear/cli.js +4 -0
  34. package/scripts-dist/lib/cli.js +3 -0
  35. package/scripts-dist/lib/codegraph-installer/mcp-sync.js +1 -1
  36. package/scripts-dist/lib/doctor/checks-hooks.js +2 -2
  37. package/scripts-dist/lib/doctor/checks-rules.js +1 -1
  38. package/scripts-dist/lib/doctor/checks-skills.js +1 -1
  39. package/scripts-dist/lib/doctor/checks-soul.js +1 -1
  40. package/scripts-dist/lib/doctor/profile-resolution.js +1 -1
  41. package/scripts-dist/lib/dropped-mcp-servers.js +1 -1
  42. package/scripts-dist/lib/file-operations.js +2 -2
  43. package/scripts-dist/lib/frontmatter.js +2 -0
  44. package/scripts-dist/lib/gitignore.js +5 -5
  45. package/scripts-dist/lib/global-clear-targets.js +1 -1
  46. package/scripts-dist/lib/hook-toggle-registry.js +1 -1
  47. package/scripts-dist/lib/hooks/cli.js +1 -0
  48. package/scripts-dist/lib/init/cli.js +1 -0
  49. package/scripts-dist/lib/install-profile-config.js +1 -1
  50. package/scripts-dist/lib/kit-install-dispatch.js +1 -1
  51. package/scripts-dist/lib/kit-remover.js +1 -1
  52. package/scripts-dist/lib/kit-scan.js +1 -1
  53. package/scripts-dist/lib/kits.js +1 -1
  54. package/scripts-dist/lib/payload/extract.js +1 -1
  55. package/scripts-dist/lib/payload/retention.js +1 -1
  56. package/scripts-dist/lib/payload-roots.js +1 -0
  57. package/scripts-dist/lib/profile-block.js +2 -2
  58. package/scripts-dist/lib/profile-remove.js +1 -1
  59. package/scripts-dist/lib/profile-rules.js +1 -1
  60. package/scripts-dist/lib/profile-switch-confirm.js +1 -1
  61. package/scripts-dist/lib/publish/payload-manifest.js +1 -1
  62. package/scripts-dist/lib/publish/public-client-manifest.js +1 -1
  63. package/scripts-dist/lib/server/kit-actions.js +1 -1
  64. package/scripts-dist/lib/skill-profiles.js +1 -1
  65. package/scripts-dist/lib/skill-tests.js +1 -1
  66. package/scripts-dist/lib/skills/cli.js +1 -0
  67. package/scripts-dist/lib/skills/skill-companion-assets.js +6 -0
  68. package/scripts-dist/lib/skills/skills-context-options.js +1 -0
  69. package/scripts-dist/lib/ui.js +1 -1
  70. package/scripts-dist/lib/update/cli.js +4 -0
  71. package/scripts-dist/lib/update-notifier.js +1 -1
  72. package/scripts-dist/{build-hermes-distribution.js → ops/build-hermes-distribution.js} +1 -1
  73. package/scripts-dist/agentkit-clear.js +0 -21
  74. package/scripts-dist/agentkit-dashboard.js +0 -19
  75. package/scripts-dist/agentkit-doctor.js +0 -20
  76. package/scripts-dist/agentkit-hooks.js +0 -36
  77. package/scripts-dist/agentkit-init.js +0 -39
  78. package/scripts-dist/agentkit-logout.js +0 -12
  79. package/scripts-dist/agentkit-profile.js +0 -4
  80. package/scripts-dist/agentkit-skills.js +0 -25
  81. package/scripts-dist/agentkit-status.js +0 -22
  82. package/scripts-dist/agentkit-uninstall.js +0 -18
  83. package/scripts-dist/agentkit-update.js +0 -20
  84. package/scripts-dist/check-upstream.js +0 -6
  85. package/scripts-dist/generate-agentkit-configs.js +0 -2
  86. package/scripts-dist/generate-catalogs.js +0 -10
  87. package/scripts-dist/update-check-worker.js +0 -2
package/CHANGELOG.md CHANGED
@@ -1,3 +1,72 @@
1
+ ## [7.10.0](https://github.com/linhnguyen-gt/agentkit-engineer/compare/v7.9.0...v7.10.0) (2026-10-23)
2
+
3
+ ### 🚀 Features
4
+
5
+ * **ak-orchestrate:** distill v2.2.0 routing, graph optimizer, 3-layer arbiter, and pi runtime ([003a1eb](https://github.com/linhnguyen-gt/agentkit-engineer/commit/003a1ebba960331bd3b1f5806d041a834df64484))
6
+ * **bootstrap:** add Nuxt 4 frontend adapter, CLI target, and .vue token check ([4e0ca01](https://github.com/linhnguyen-gt/agentkit-engineer/commit/4e0ca01905a76b901775bcb7217512001a003ce8))
7
+ * **claude:** use native autoCompactWindow and 1h subagentPromptCacheTtl in settings.json ([61d4fc6](https://github.com/linhnguyen-gt/agentkit-engineer/commit/61d4fc6f90e9a272ee1673f803671ae6997da0f3))
8
+ * **gamedev:** add gamedev profile with studio skills, specialist agents, and rules ([5c526c3](https://github.com/linhnguyen-gt/agentkit-engineer/commit/5c526c366501593523c70e90396af68860e7fb27))
9
+ * **gamedev:** bundle CoplayDev unityMCP server with gamedev profile and skill ([6433e94](https://github.com/linhnguyen-gt/agentkit-engineer/commit/6433e94c908f106303253c869330dfe76cb971a0))
10
+ * **scout:** modularize scanner and refine compound token ranking ([5bc235c](https://github.com/linhnguyen-gt/agentkit-engineer/commit/5bc235cfe11a2447a186103d76996a8f9c9dabcb))
11
+ * **skills:** add --project, --global, and --kit flags to agentkit skills CLI ([ac7befd](https://github.com/linhnguyen-gt/agentkit-engineer/commit/ac7befd6bcbfeec8e6a920505fabf0b07707a862))
12
+ * **skills:** add create, audit, and blast-radius optimize modes to test skill ([0633f1c](https://github.com/linhnguyen-gt/agentkit-engineer/commit/0633f1c92017d338f0816c810e9448957b735a6f))
13
+ * **skills:** install companion agents and rules for seo and gamedev skills ([1390557](https://github.com/linhnguyen-gt/agentkit-engineer/commit/13905576ad3ede92f888777afd341e2a2e04877f))
14
+ * **skills:** integrate agentkit CLI discovery and install flow into automation-recommender ([b3cf500](https://github.com/linhnguyen-gt/agentkit-engineer/commit/b3cf500239c6d1542b5eb5afacc91666aa60d10a))
15
+ * **skills:** ship typesafe-ai in core and wire ak-orchestrate into semantic decisions ([dce8438](https://github.com/linhnguyen-gt/agentkit-engineer/commit/dce8438d90e0580c2c9aaa567212c9c8bee4e4e7))
16
+ * **skills:** vendor multi-kit automation-recommender skill across all 12 kits ([22a8121](https://github.com/linhnguyen-gt/agentkit-engineer/commit/22a8121eb0c2c72b3f41e550357e5bfa6a7bc3e8))
17
+ * **sync:** expand upstream sync workflow to all vendor skill sources ([7173e9e](https://github.com/linhnguyen-gt/agentkit-engineer/commit/7173e9ea9f0a6a59e02b51e81964d589f7598ab4))
18
+
19
+ ### 🐞 Bug Fixes
20
+
21
+ * **gamedev:** omit seo specialist agents when installing gamedev profile ([e35d6a4](https://github.com/linhnguyen-gt/agentkit-engineer/commit/e35d6a4dd4b9d669fe4ddf0a06b548a8ce2141cd))
22
+ * **installer:** preserve .agentkit.json user state across kit re-install ([6a3e1b8](https://github.com/linhnguyen-gt/agentkit-engineer/commit/6a3e1b8b7dc84bcbeeb4a64866f7641b0834ea8f))
23
+ * **installer:** preserve user MCP servers across init updates ([5d2b79f](https://github.com/linhnguyen-gt/agentkit-engineer/commit/5d2b79f4e5a6c80757a271635ed0fad6d9ad8ed7))
24
+ * **skills:** restrict seo companion agents to marketing and full profiles ([125564d](https://github.com/linhnguyen-gt/agentkit-engineer/commit/125564dba9a8c6679ef64a848f599598d9e14247))
25
+
26
+ ### 📚 Documentation
27
+
28
+ * **guide:** update SETUP-ANTIGRAVITY.md for Antigravity 2.0 ([6aff249](https://github.com/linhnguyen-gt/agentkit-engineer/commit/6aff24962ad51d9b17b7a9ee27daf76ff62f1af6))
29
+ * update project docs to 7.9.0 ([6832f77](https://github.com/linhnguyen-gt/agentkit-engineer/commit/6832f7722a2caa0883fe70086a172eec3485f6cc))
30
+
31
+ ### ♻️ Code Refactoring
32
+
33
+ * **cli:** drop the literal payload path from logout copy and docs ([713ef88](https://github.com/linhnguyen-gt/agentkit-engineer/commit/713ef88dcb5517c8366021c8cfa819f1608f7165))
34
+ * **cli:** replace the dispatch ladders in bin/agentkit.js with a route table ([9f45305](https://github.com/linhnguyen-gt/agentkit-engineer/commit/9f453057cfa25fd8b7c03b491cb05d88a54d549b))
35
+ * **rules:** tighten chat reply casing and ban dash connectors in prose ([cf27d29](https://github.com/linhnguyen-gt/agentkit-engineer/commit/cf27d29d2e0ece7d3259623350c2f99ead925875))
36
+
37
+ ### ✅ Tests
38
+
39
+ * **skills:** isolate global kit-root env overrides in kit context and skills tests ([4da6fa0](https://github.com/linhnguyen-gt/agentkit-engineer/commit/4da6fa0721dcc2affd2a28848e35f317fdb9998f))
40
+
41
+ ## [7.9.0](https://github.com/linhnguyen-gt/agentkit-engineer/compare/v7.8.2...v7.9.0) (2026-10-12)
42
+
43
+ ### 🚀 Features
44
+
45
+ * **client:** check npm for client updates inside agentkit update ([1be7cc8](https://github.com/linhnguyen-gt/agentkit-engineer/commit/1be7cc89ccb1e52698908b1f8c567693dbb86cf3))
46
+ * **client:** prefetch the kit payload inside agentkit login ([366fd68](https://github.com/linhnguyen-gt/agentkit-engineer/commit/366fd68b9280353ccd8db0b6ac9b9ce76a984877))
47
+
48
+ ### 🐞 Bug Fixes
49
+
50
+ * **client-release:** select the newest v* release in the payload preflight ([a50d8b8](https://github.com/linhnguyen-gt/agentkit-engineer/commit/a50d8b8ddf1696b58fb9a621e89ceb12cb2563af))
51
+ * **client:** show the payload stage label during login prefetch ([9d601ce](https://github.com/linhnguyen-gt/agentkit-engineer/commit/9d601ce274304ccce34e397c7c7f1170c5ae0cb3))
52
+ * **client:** use the lite home bridge in commands that run outside the payload ([529f790](https://github.com/linhnguyen-gt/agentkit-engineer/commit/529f79004b7180a5aaed5a754dfbafc69ce3749a))
53
+ * **installer:** drop the full-profile fallback for unrecorded kits ([3d0a325](https://github.com/linhnguyen-gt/agentkit-engineer/commit/3d0a3257de4c5f732f7837eb55ec3850bd194e77))
54
+
55
+ ### 📚 Documentation
56
+
57
+ * trim changelog to this project's own release history ([5d97220](https://github.com/linhnguyen-gt/agentkit-engineer/commit/5d9722018fa46fee95cb046649e23691be689a4e))
58
+
59
+ ### ♻️ Code Refactoring
60
+
61
+ * **repo:** rename scripts-agentkit/ to agent-scripts/ ([47bff7d](https://github.com/linhnguyen-gt/agentkit-engineer/commit/47bff7defa763635d31129e84756a9901065eb8a))
62
+ * **scripts:** centralize payload directory names in lib/payload-roots ([f4a23bf](https://github.com/linhnguyen-gt/agentkit-engineer/commit/f4a23bf0c9f3a4c20f6eee724b2c72b1fac02786))
63
+ * **scripts:** drop clear's local removeDir/removeFile for the lib copies ([e36ef6e](https://github.com/linhnguyen-gt/agentkit-engineer/commit/e36ef6e1edf90c555afb8660d894900aa87cfa9f))
64
+ * **scripts:** extract five fat CLI entries into lib/<domain>/cli.ts ([1fb4bd6](https://github.com/linhnguyen-gt/agentkit-engineer/commit/1fb4bd64500a60ab1e3b8466e5c9c60c0a7f8455))
65
+ * **scripts:** group root scripts into cli/, gen/ and ops/ ([0902344](https://github.com/linhnguyen-gt/agentkit-engineer/commit/09023442ad32d64e0eeb208b89d7389b1c8a0e7a))
66
+ * **scripts:** merge the two frontmatter grammars behind lib/frontmatter.ts ([bb49b56](https://github.com/linhnguyen-gt/agentkit-engineer/commit/bb49b560735edfb0f7d4b667322a036396a3e662))
67
+ * **scripts:** replace kit dispatch switches with a KitDescriptor table ([e2e5c36](https://github.com/linhnguyen-gt/agentkit-engineer/commit/e2e5c362ae5bb151a0ef10c54ef47fe8d98ea7dd))
68
+ * **scripts:** share argv/help/exit plumbing via lib/cli runner ([a39387b](https://github.com/linhnguyen-gt/agentkit-engineer/commit/a39387b8174a63055658ab22351624bc65689265))
69
+
1
70
  ## [7.8.2](https://github.com/linhnguyen-gt/agentkit-engineer/compare/v7.8.1...v7.8.2) (2026-10-09)
2
71
 
3
72
  ### 🐞 Bug Fixes
package/README.md CHANGED
@@ -11,8 +11,8 @@ agentkit init # pick a kit, install it globally
11
11
  ```
12
12
 
13
13
  Access is gated: `agentkit login` authorizes a GitHub App through the device
14
- flow, and the first gated command downloads the kit payload into
15
- `~/.agentkit/payload/`. Without an authorized login, every gated command
14
+ flow, and the first gated command downloads the kit payload into the local
15
+ payload cache. Without an authorized login, every gated command
16
16
  answers `no access` and writes nothing.
17
17
 
18
18
  ## Commands
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(e=>{try{return fs.statSync(path.join(packageRoot,e)).isDirectory()}catch{return!1}});async function runInPayload(e){const{resolveInstallSource:t,NoAccessError:o}=require("../scripts-dist/lib/payload/source.js"),{execPayload:n}=require("../scripts-dist/lib/payload/exec.js"),s=e.indexOf("--ref"),l=s!==-1?e[s+1]:void 0;s!==-1&&(!l||l.startsWith("--"))&&(console.error("\u2717 --ref needs a value: agentkit <command> --ref <tag|branch|sha>"),process.exit(1));const{getPayloadVersion:i}=require("../scripts-dist/lib/version-check.js");try{const a=await t({version:i(packageRoot)??"0.0.0",ref:l,interactive:!0,cliRoot:packageRoot}),r=path.join(packageRoot,"node_modules"),c=n(process.execPath,[path.join(a.root,"bin","agentkit.js"),...e],{env:{...process.env,NODE_PATH:r,AGENTKIT_NODE_MODULES:r}});process.exit(c.status==null?1:c.status)}catch(a){a instanceof o?console.error(`\u2717 ${a.message}`):console.error(`\u2717 Could not resolve the kit payload: ${a.message}`),process.exit(1)}}function scheduleUpdateNotice(){try{const{maybeNotifyUpdate:e}=require("../scripts-dist/lib/update-notifier"),{getPayloadVersion:t}=require("../scripts-dist/lib/version-check.js");let o=t(packageRoot);try{const{newestTagInstalledTree:n}=require("../scripts-dist/lib/payload/source.js"),{loadAgentkitHomeCore:s}=require("../scripts-dist/lib/agentkit-home.js");o=n(s())?.version??o}catch{}e({currentVersion:o??"0.0.0"})}catch{}}function printProfilesGuide(){console.log("Profiles:"),console.log(" Every install takes a slice of the skill catalog. Leave --profile out and you get the"),console.log(" default for your kit; name one to take a different slice."),console.log(""),console.log(" core Workflow + tooling, minus vendor suites and niche extras (default)"),console.log(" full Every skill the kit ships"),console.log(" frontend core + frontend, design, frameworks"),console.log(" backend core + backend, database, infrastructure, security"),console.log(" mobile core + frontend, frameworks, design"),console.log(" fullstack core + frontend, backend, database, infrastructure, frameworks, design"),console.log(" gamedev core + gamedev, multimedia"),console.log(" also names: threejs, shader, ai-artist, ai-multimodal, ui-ux-pro-max, ak-scenario, ak-optimize"),console.log(" marketing core + marketing, design, seo, documents, multimedia, ai-ml"),console.log(" also names: copywriting, show-off, project-management, frontend-design, agent-browser,"),console.log(" project-organization, ak-sowat, enhance-ux-ax"),console.log(" dependency: enhance-ux-ax installs with seo (its AX engine)"),console.log(" assistant The personal agents' set \u2014 hermes and openclaw default here"),console.log(""),console.log(" The choice is recorded per kit (.agentkit.json) and reapplied on update, so a later"),console.log(" agentkit init keeps it without the flag; --profile overrides it."),console.log(""),console.log(" Missing a skill a wider profile would have installed?"),console.log(" agentkit skills list Browse the whole catalog (\u2713 = installed here)"),console.log(" agentkit skills add <name> Install one; later updates keep it"),console.log(" agentkit skills add <name> --project Install into the current project (--kit <kit>)"),console.log("")}function printGeneralHelp(){console.log("Agentkit CLI"),console.log(""),console.log("Usage:"),console.log(" agentkit <command> [options]"),console.log(" agentkit help [command]"),console.log(""),console.log("Commands:"),console.log(" agentkit init [kit] Initialize AI development kit (project or global)"),console.log(" agentkit login Authorize this machine to reach the kit repository"),console.log(" agentkit logout Remove the stored login and entitlement cache"),console.log(" agentkit whoami Show the logged-in account and its entitlement"),console.log(" agentkit profile Manage install profiles (remove)"),console.log(" agentkit update Upgrade the Agentkit CLI itself to the latest release"),console.log(" agentkit clear Remove Agentkit installations (project or global)"),console.log(" agentkit uninstall Remove Agentkit CLI from your system (global uninstall)"),console.log(" agentkit config Manage auto-update settings"),console.log(" agentkit skills Discover and install skills (list / pick / add / remove)"),console.log(" agentkit doctor Report the health of the installed kit"),console.log(" agentkit status List every kit install on this machine"),console.log(" agentkit dashboard Open the local dashboard in your browser"),console.log(" agentkit hooks See and set hook toggles (list / enable / disable)"),console.log(" agentkit db-first Scaffold a database-first backend project"),console.log(" agentkit mobile Scaffold a mobile project (Expo or Flutter)"),console.log(" agentkit frontend Scaffold a web frontend (agent workflow handoff)"),console.log(" agentkit stack Full-stack workflow tools (typed API client generator)"),console.log(""),console.log("Options:"),console.log(" --help, -h Show this help message"),console.log(" --version, -v Show CLI version"),console.log(""),printProfilesGuide(),console.log("Examples:"),console.log(" agentkit init # Run interactive installer"),console.log(" agentkit init claude # Initialize Claude Code directly (no kit menu)"),console.log(" agentkit init omp # Target a global-only kit (hermes, openclaw, omp)"),console.log(" agentkit init --profile frontend # Install only frontend-relevant skills"),console.log(" agentkit profile remove claude # Reinstall Claude with the core profile"),console.log(" agentkit profile remove --global # Remove profiles from global installs"),console.log(" # Switching an existing profile with init asks for confirmation"),console.log(" agentkit skills # Browse and pick skills to install"),console.log(" agentkit skills add databases # Add one or more skills by name"),console.log(" agentkit skills add expo --project # Add a skill into the current project"),console.log(" agentkit skills remove databases # Undo an add: delete it and forget it"),console.log(" agentkit doctor # Check the installed kit's health"),console.log(" agentkit doctor --json # Same, machine-readable"),console.log(" agentkit status # Every kit install and version"),console.log(" agentkit status --scan # Choose the directories to search"),console.log(" agentkit hooks list # Show every hook toggle"),console.log(" agentkit hooks disable scout-block # Turn one hook off"),console.log(" agentkit update # Upgrade the Agentkit CLI itself"),console.log(" agentkit clear # Remove Agentkit files from project/global"),console.log(" agentkit uninstall # Remove Agentkit CLI from system"),console.log(" agentkit config autoupdate # Show auto-update status"),console.log(" agentkit config autoupdate on # Enable auto-update"),console.log(" agentkit config semantic # Semantic decisions: status (off by default)"),console.log(" agentkit config semantic enable # Enable the semantic-decision layer"),console.log(" agentkit decide < payload.json # Ask a decision model one typed question set"),console.log(" agentkit db-first init myapp postgresql # Scaffold a backend project"),console.log(" agentkit mobile init myapp # Scaffold a mobile project"),console.log(" agentkit frontend init myapp --framework nextjs # Frontend Mode handoff"),console.log(" agentkit stack client ./api ./web/src # Typed client from the API's schema"),console.log(" agentkit help <command> # Show detailed help for a command"),console.log(" agentkit help profile # What each install profile includes"),console.log(" agentkit -v # Check version"),console.log("")}function runSiblingBin(e,t){const o=spawnSync(process.execPath,[path.join(__dirname,e),...t],{stdio:"inherit"});process.exit(o.status==null?1:o.status)}function cliEntryPath(e){return path.join(packageRoot,"scripts-dist","cli",`agentkit-${e}.js`)}function requireCliEntry(e){require(cliEntryPath(e))}async function runInit(){const{resolveInstallSource:e,NoAccessError:t}=require("../scripts-dist/lib/payload/source.js"),{getPayloadVersion:o}=require("../scripts-dist/lib/version-check.js"),n=args.indexOf("--ref"),s=n!==-1?args[n+1]:void 0;n!==-1&&(!s||s.startsWith("--"))&&(console.error("\u2717 --ref needs a value: agentkit init --ref <tag|branch|sha>"),process.exit(1));const l=n!==-1?s:void 0;n!==-1&&process.argv.splice(2+n,2);try{const i=await e({version:o(packageRoot)??"0.0.0",ref:l,interactive:!0,cliRoot:packageRoot});process.env.AGENTKIT_SOURCE_ROOT=i.root,requireCliEntry("init")}catch(i){i instanceof t?console.error(`\u2717 ${i.message}`):console.error(`\u2717 Could not resolve the kit payload: ${i.message}`),process.exit(1)}}async function runHelpTopic(e){!clientHasPayload&&!new Set(["profile","profiles","login","logout","whoami","uninstall"]).has(e)&&await runInPayload(["help",e]);const o=new Set(["db-first","mobile","frontend","stack"]),n=new Map([["login","--help"],["logout","--help"],["whoami","--help"],["init","--help"],["update","--help"],["clear","--help"],["uninstall","--help"],["config","--help"],["decide","--help"],["doctor","--help"],["status","--help"],["dashboard","--help"],["skills","help"],["hooks","help"]]);e==="profile"||e==="profiles"?printProfilesGuide():o.has(e)?runSiblingBin(`${e}.js`,["--help"]):n.has(e)?(process.argv=[process.argv[0],cliEntryPath(e),n.get(e)],requireCliEntry(e)):(console.log(`Unknown command: ${e}`),console.log(""),printGeneralHelp(),process.exit(1))}function printVersion(){const e=require("../package.json");let t=typeof e.payloadVersion=="string"?e.payloadVersion:null;try{const{newestTagInstalledTree:n}=require("../scripts-dist/lib/payload/source.js"),{loadAgentkitHomeCore:s}=require("../scripts-dist/lib/agentkit-home.js");t=n(s())?.version??t}catch{}const o=t&&t!==e.version?` (payload v${t})`:"";console.log(`v${e.version}${o}`)}async function main(){scheduleUpdateNotice();const e=new Set(["login","logout","whoami","uninstall","config","help","--help","-h","--version","-v"]),t=args[1]==="--help"||args[1]==="-h"||args[1]==="help",o=command!==void 0&&!e.has(command);if(o&&!t){const{checkEntitlement:l}=require("../scripts-dist/lib/entitlement/check.js");(await l({interactive:!0}).catch(()=>null))?.status!=="active"&&(console.error("\u2717 no access \u2014 this command needs an authorized login. Run `agentkit login`."),process.exit(1))}o&&!clientHasPayload&&await runInPayload(args);const s=[{when:command==="db-first",run:()=>runSiblingBin(`${command}.js`,args.slice(1))},{when:command==="mobile",run:()=>runSiblingBin(`${command}.js`,args.slice(1))},{when:command==="frontend",run:()=>runSiblingBin(`${command}.js`,args.slice(1))},{when:command==="stack",run:()=>runSiblingBin(`${command}.js`,args.slice(1))},{when:command==="login",run:()=>requireCliEntry(command)},{when:command==="logout",run:()=>requireCliEntry(command)},{when:command==="whoami",run:()=>requireCliEntry(command)},{when:command==="init",run:runInit},{when:command==="profile",run:()=>requireCliEntry(command)},{when:command==="update",run:()=>requireCliEntry(command)},{when:command==="clear",run:()=>requireCliEntry(command)},{when:command==="uninstall",run:()=>requireCliEntry(command)},{when:command==="config",run:()=>requireCliEntry(command)},{when:command==="decide",run:()=>requireCliEntry(command)},{when:command==="skills",run:()=>requireCliEntry(command)},{when:command==="doctor",run:()=>requireCliEntry(command)},{when:command==="status",run:()=>requireCliEntry(command)},{when:command==="dashboard",run:()=>requireCliEntry(command)},{when:command==="hooks",run:()=>requireCliEntry(command)},{when:command==="help"&&args[1],run:()=>runHelpTopic(args[1])},{when:command==="--version"||command==="-v",run:printVersion}].find(l=>l.when);s?await s.run():printGeneralHelp()}main();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linhnguyen96114/agentkit-engineer",
3
- "version": "1.4.2",
3
+ "version": "1.5.0",
4
4
  "description": "Agentkit thin client — downloads and installs the Agentkit payload after `agentkit login` entitlement.",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -20,7 +20,7 @@
20
20
  "type": "git",
21
21
  "url": "https://github.com/linhnguyen-gt/agentkit-engineer.git"
22
22
  },
23
- "payloadVersion": "7.8.2",
23
+ "payloadVersion": "7.10.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("./lib/agentkit-home"),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 n=(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 t=o==="on"||o==="enable";try{const i=(0,agentkit_home_1.loadAgentkitHomeCore)().mergeJson(n,s=>(s.autoUpdate=t,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(t?"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 n=(0,agentkit_home_1.loadAgentkitHomeCore)(),o=n.toDisplayPath(n.getSemanticEnvPath());if(e.length===0){const r=semanticEntry();console.log(""),printSection("Semantic Decisions"),console.log(`Status: ${r.enabled?`${colors.green}enabled${colors.reset}`:`${colors.red}off${colors.reset}`}`),console.log(`Provider: ${r.provider}${r.model?` (model ${r.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 t=e[0].toLowerCase();if(t!=="enable"&&t!=="disable"&&t!=="on"&&t!=="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 c=e.indexOf("--model"),l=c>=0?e[c+1]??"":semanticEntry().model,a=t==="enable"||t==="on",d=(0,store_1.writeSemanticSettings)({enabled:a,provider:s,...l?{model:l}:{}});if(console.log(""),!d.ok){printError(d.message),process.exitCode=1;return}printSuccess(`Semantic decisions ${a?"enabled":"disabled"} (provider ${s}).`),a&&printInfo(`Put TYPESAFE_API_KEY in the environment or in ${o}; calls refuse with exit 4 until then.`),console.log("")}function printHelp(){console.log(`
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
- `)}async function main(){const e=process.argv.includes("config")?process.argv.slice(3):process.argv.slice(2);if(e.length===0||e[0]==="help"||e[0]==="--help"||e[0]==="-h"){printHelp();return}const n=e[0],o=e.slice(1);switch(n){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: ${n}`),printInfo('Run "agentkit config help" for usage information')}}main().catch(e=>{printError(`Error: ${e.message}`),process.exit(1)});
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("./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)}
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("./lib/auth/cli");function printHelp(){console.log(`
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
- `)}async function main(){const e=process.argv.slice(2);if(e.includes("--help")||e.includes("-h")){printHelp();return}process.exit(await(0,cli_1.runLogin)({},{openBrowser:!e.includes("--no-open")}))}main();
16
+ `)}(0,cli_2.runCli)({command:"login",printHelp,helpArgs:cli_2.helpFlagsOnly,handler:e=>(0,cli_1.runLogin)({},{openBrowser:!e.includes("--no-open")})});
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env node
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
+ Agentkit Logout
4
+ Remove the stored credential and entitlement cache
5
+
6
+ Usage:
7
+ agentkit logout
8
+
9
+ Clears the credential-store entry, ~/.agentkit/auth.json and
10
+ ~/.agentkit/entitlement.json. Fetched payload versions are kept;
11
+ 'agentkit uninstall' removes them.
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,30 @@
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
+ --project, -p Target the current project directory
18
+ --global, -g Target a global kit install
19
+ --kit, -k <name> Target a specific kit by name (e.g. claude, cursor, codex)
20
+ --help, -h Show this help message
21
+
22
+ Examples:
23
+ agentkit skills # Interactive skill picker
24
+ agentkit skills list # Print all available skills
25
+ agentkit skills add databases # Add skill to active kit (project or global)
26
+ agentkit skills add databases --project # Add skill to current project
27
+ agentkit skills add expo -p -k claude # Add skill to project for a specific kit
28
+ agentkit skills add gsap --global # Add skill to global install
29
+ agentkit skills remove databases --project # Remove a previously added project skill
30
+ `)}(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("./lib/auth/cli");async function main(){const e=process.argv.slice(2);if(e.includes("--help")||e.includes("-h")){console.log(`
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
- `);return}process.exit(await(0,cli_1.runWhoami)())}main();
11
+ `)}(0,cli_2.runCli)({command:"whoami",printHelp,helpArgs:cli_2.helpFlagsOnly,handler:()=>(0,cli_1.runWhoami)()});
@@ -0,0 +1,6 @@
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,p=!!(t.upstream_commit&&e.reachable&&(!t.upstream_version||e.tag===null));let i;if(!e.reachable)i="unreachable";else if(p){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
+ `);const e=[],a=new Map,r=new Map;for(const n of t){const s=parseOwnerRepo(n.upstream??"");let l={reachable:!1};s&&(a.has(s)||a.set(s,fetchLatestTag(s)),l=a.get(s));let d=null;if(s&&n.upstream_commit&&l.reachable&&(!n.upstream_version||l.tag===null)){const f=`${s}@${n.upstream_commit}`;r.has(f)||r.set(f,fetchCommitsBehind(s,n.upstream_commit)),d=r.get(f)}e.push(buildDriftRow(n,l,d))}const o=(n,s)=>Math.max(n.length,...s.map(l=>(l??"\u2014").length))+2,u=o("LOCAL",e.map(n=>n.local)),p=o("LATEST",e.map(n=>n.latest)),i=o("SKILL",e.map(n=>n.skill)),c=(n,s)=>n.padEnd(s);console.log(c("SKILL",i)+c("LOCAL",u)+c("LATEST",p)+"STATE");for(const n of e)console.log(c(n.skill,i)+c(n.local??"\u2014",u)+c(n.latest??"\u2014",p)+n.state);const g=e.filter(n=>n.state==="behind"),h=e.filter(n=>n.state==="untagged"),m=e.filter(n=>n.state==="unreachable");if(g.length>0&&console.warn(`
3
+ \u26A0 ${g.length} skill(s) behind upstream \u2014 consider a re-sync.`),h.length>0){const n=[...new Set(h.map(s=>s.ownerRepo))].join(", ");console.warn(`
4
+ \u2139 ${h.length} skill(s) track an upstream that publishes no tags (${n}).
5
+ Version comparison is impossible by design there \u2014 compare by commit, or re-sync on a date.`)}m.length>0&&console.warn(`
6
+ \u26A0 ${m.length} upstream(s) unreachable (no network / no gh auth / repo gone) \u2014 skipped.`)}require.main===module&&main();
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- "use strict";var v=Object.create,m=Object.defineProperty,x=Object.getOwnPropertyDescriptor,$=Object.getOwnPropertyNames,A=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty,E=(e,n,o,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of $(n))!j.call(e,r)&&r!==o&&m(e,r,{get:()=>n[r],enumerable:!(a=x(n,r))||a.enumerable});return e},u=(e,n,o)=>(o=e!=null?v(A(e)):{},E(n||!e||!e.__esModule?m(o,"default",{value:e,enumerable:!0}):o,e)),t=u(require("fs")),s=u(require("path")),i=["nextjs","react","vue","angular"],f=["landing","crud-list","dashboard"],d=["npm","yarn","pnpm"];function F(e){return i.includes(e)}function S(e){return f.includes(e)}function M(e){return d.includes(e)}function p(e,n){let o=e.indexOf(n);return o>=0&&o+1<e.length?e[o+1]:void 0}function w(e){return e.find(n=>!n.startsWith("-"))}function R(){let e=process.argv.slice(2),n=e[0];(!n||n==="help"||n==="--help"||n==="-h")&&(k(),process.exit(0));try{switch(n){case"init":C(e.slice(1));break;case"run":P(e.slice(1));break;default:console.error(`Unknown command: ${n}
3
- `),k(),process.exit(1)}}catch(o){console.error("Error:",o instanceof Error?o.message:o),process.exit(1)}}function C(e){let n=w(e);n||(console.error("Usage: agentkit frontend init <app> --framework <nextjs|react|vue|angular> [--archetype <landing|crud-list|dashboard>] [--package-manager <npm|yarn|pnpm>]"),process.exit(1));let o=p(e,"--framework");o||(console.log(b(n)),process.exit(0)),F(o)||(console.error(`Unknown framework "${o}". Expected one of: ${i.join(", ")}`),process.exit(1));let a=null,r=p(e,"--archetype");r&&(S(r)||(console.error(`Unknown archetype "${r}". Expected one of: ${f.join(", ")}`),process.exit(1)),a=r);let c=p(e,"--package-manager")??"npm";M(c)||(console.error(`Unknown package manager "${c}". Expected one of: ${d.join(", ")}`),process.exit(1));let l={framework:o,archetype:a,packageManager:c},g=s.join(process.cwd(),"plans",n);t.mkdirSync(g,{recursive:!0});let h=s.join(g,"frontend.config.json");t.writeFileSync(h,`${JSON.stringify(l,null,2)}
2
+ "use strict";var x=Object.create,u=Object.defineProperty,v=Object.getOwnPropertyDescriptor,$=Object.getOwnPropertyNames,A=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty,S=(e,n,o,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of $(n))!j.call(e,r)&&r!==o&&u(e,r,{get:()=>n[r],enumerable:!(a=v(n,r))||a.enumerable});return e},m=(e,n,o)=>(o=e!=null?x(A(e)):{},S(n||!e||!e.__esModule?u(o,"default",{value:e,enumerable:!0}):o,e)),t=m(require("fs")),s=m(require("path")),i=["nextjs","react","vue","angular","nuxt"],f=["landing","crud-list","dashboard"],d=["npm","yarn","pnpm"];function E(e){return i.includes(e)}function F(e){return f.includes(e)}function M(e){return d.includes(e)}function p(e,n){let o=e.indexOf(n);return o>=0&&o+1<e.length?e[o+1]:void 0}function w(e){return e.find(n=>!n.startsWith("-"))}function R(){let e=process.argv.slice(2),n=e[0];(!n||n==="help"||n==="--help"||n==="-h")&&(k(),process.exit(0));try{switch(n){case"init":C(e.slice(1));break;case"run":P(e.slice(1));break;default:console.error(`Unknown command: ${n}
3
+ `),k(),process.exit(1)}}catch(o){console.error("Error:",o instanceof Error?o.message:o),process.exit(1)}}function C(e){let n=w(e);n||(console.error("Usage: agentkit frontend init <app> --framework <nextjs|react|vue|angular|nuxt> [--archetype <landing|crud-list|dashboard>] [--package-manager <npm|yarn|pnpm>]"),process.exit(1));let o=p(e,"--framework");o||(console.log(b(n)),process.exit(0)),E(o)||(console.error(`Unknown framework "${o}". Expected one of: ${i.join(", ")}`),process.exit(1));let a=null,r=p(e,"--archetype");r&&(F(r)||(console.error(`Unknown archetype "${r}". Expected one of: ${f.join(", ")}`),process.exit(1)),a=r);let c=p(e,"--package-manager")??"npm";M(c)||(console.error(`Unknown package manager "${c}". Expected one of: ${d.join(", ")}`),process.exit(1));let l={framework:o,archetype:a,packageManager:c},g=s.join(process.cwd(),"plans",n);t.mkdirSync(g,{recursive:!0});let h=s.join(g,"frontend.config.json");t.writeFileSync(h,`${JSON.stringify(l,null,2)}
4
4
  `,"utf-8"),console.log(`\u2713 wrote ${s.relative(process.cwd(),h)}`),console.log(""),console.log(y(l,n))}function P(e){let n=w(e);n||(console.error("Usage: agentkit frontend run <app>"),process.exit(1));let o=s.join(process.cwd(),"plans",n,"frontend.config.json");t.existsSync(o)||(console.log(`No frontend.config.json for "${n}". Run "agentkit frontend init ${n} --framework <fw>" first, or invoke the workflow directly:
5
5
  `),console.log(b(n)),process.exit(0));let a=JSON.parse(t.readFileSync(o,"utf-8"));console.log(`Frontend Mode handoff for "${n}" (from ${s.relative(process.cwd(),o)}):
6
6
  `),console.log(y(a,n))}function y(e,n){let o=e.archetype?`archetype "${e.archetype}" \u2014 adopted as your answer, so the workflow skips the classify prompt`:"archetype classified from your prompt (the workflow confirms it if unsure)";return["Next \u2014 the clickable UI is generated by the AI agent, not this CLI. Run:","",` /bootstrap:frontend:${e.framework} "<describe ${n}>"`,"",` - package manager: ${e.packageManager} \u2014 adopted, so the workflow does not ask`,` - ${o}`,` - the workflow reads these from plans/${n}/frontend.config.json`," - the agent scaffolds via the framework's official CLI, applies ui-ux-pro-max"," tokens, generates screens/routing/state, and proves it with the"," build/boot/lint/Playwright-smoke gate."].join(`
@@ -27,7 +27,7 @@ Archetypes (derived): ${f.join(", ")} (landing = no state)
27
27
  Package managers: ${d.join(", ")} (default npm)
28
28
 
29
29
  Options (init):
30
- --framework <name> nextjs | react | vue | angular
30
+ --framework <name> nextjs | react | vue | angular | nuxt
31
31
  --archetype <name> landing | crud-list | dashboard (optional; else derived)
32
32
  --package-manager <name> npm | yarn | pnpm (default npm)
33
33
 
@@ -36,6 +36,7 @@ Run the workflow in your AI agent:
36
36
  /bootstrap:frontend:react "a SaaS landing page with hero, features and pricing"
37
37
  /bootstrap:frontend:vue "an analytics dashboard with 3 screens"
38
38
  /bootstrap:frontend:angular "a task manager"
39
+ /bootstrap:frontend:nuxt "a SaaS dashboard with analytics"
39
40
 
40
41
  Examples:
41
42
  agentkit frontend