@event4u/agent-config 5.3.0 → 5.4.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 (404) hide show
  1. package/.agent-src/commands/agent-handoff.md +1 -0
  2. package/.agent-src/commands/agent-status.md +1 -0
  3. package/.agent-src/commands/agents/audit.md +1 -0
  4. package/.agent-src/commands/agents/init.md +1 -0
  5. package/.agent-src/commands/agents/optimize.md +1 -0
  6. package/.agent-src/commands/agents/user/accept.md +1 -0
  7. package/.agent-src/commands/agents/user/init.md +1 -0
  8. package/.agent-src/commands/agents/user/review.md +1 -0
  9. package/.agent-src/commands/agents/user/show.md +1 -0
  10. package/.agent-src/commands/agents/user/update.md +1 -0
  11. package/.agent-src/commands/agents/user.md +1 -0
  12. package/.agent-src/commands/agents.md +1 -0
  13. package/.agent-src/commands/analytics/prune.md +1 -0
  14. package/.agent-src/commands/analytics/show.md +1 -0
  15. package/.agent-src/commands/analytics.md +1 -0
  16. package/.agent-src/commands/analyze-reference-repo.md +1 -0
  17. package/.agent-src/commands/bug-fix.md +1 -0
  18. package/.agent-src/commands/bug-investigate.md +1 -0
  19. package/.agent-src/commands/challenge-me/vision.md +1 -0
  20. package/.agent-src/commands/challenge-me/with-docs.md +1 -0
  21. package/.agent-src/commands/challenge-me.md +1 -0
  22. package/.agent-src/commands/chat-history/import.md +1 -0
  23. package/.agent-src/commands/chat-history/learn.md +1 -0
  24. package/.agent-src/commands/chat-history/show.md +1 -0
  25. package/.agent-src/commands/chat-history.md +1 -0
  26. package/.agent-src/commands/check-current-md.md +1 -0
  27. package/.agent-src/commands/commit/in-chunks.md +1 -0
  28. package/.agent-src/commands/commit.md +1 -0
  29. package/.agent-src/commands/condense.md +1 -0
  30. package/.agent-src/commands/context/create.md +1 -0
  31. package/.agent-src/commands/context/refactor.md +1 -0
  32. package/.agent-src/commands/context.md +1 -0
  33. package/.agent-src/commands/cost-report.md +1 -0
  34. package/.agent-src/commands/council/analysis.md +1 -0
  35. package/.agent-src/commands/council/debate.md +1 -0
  36. package/.agent-src/commands/council/default.md +1 -0
  37. package/.agent-src/commands/council/design.md +1 -0
  38. package/.agent-src/commands/council/optimize.md +1 -0
  39. package/.agent-src/commands/council/pr.md +1 -0
  40. package/.agent-src/commands/council.md +1 -0
  41. package/.agent-src/commands/create-pr/description-only.md +1 -0
  42. package/.agent-src/commands/create-pr.md +1 -0
  43. package/.agent-src/commands/e2e-heal.md +1 -0
  44. package/.agent-src/commands/e2e-plan.md +1 -0
  45. package/.agent-src/commands/estimate-ticket.md +1 -0
  46. package/.agent-src/commands/feature/dev.md +1 -0
  47. package/.agent-src/commands/feature/explore.md +1 -0
  48. package/.agent-src/commands/feature/plan.md +1 -0
  49. package/.agent-src/commands/feature/refactor.md +1 -0
  50. package/.agent-src/commands/feature/roadmap.md +1 -0
  51. package/.agent-src/commands/feature.md +1 -0
  52. package/.agent-src/commands/fix/ci.md +1 -0
  53. package/.agent-src/commands/fix/portability.md +1 -0
  54. package/.agent-src/commands/fix/pr-bot-comments.md +1 -0
  55. package/.agent-src/commands/fix/pr-comments.md +1 -0
  56. package/.agent-src/commands/fix/pr-developer-comments.md +1 -0
  57. package/.agent-src/commands/fix/refs.md +1 -0
  58. package/.agent-src/commands/fix/seeder.md +1 -0
  59. package/.agent-src/commands/fix.md +1 -0
  60. package/.agent-src/commands/ghostwriter/delete.md +1 -0
  61. package/.agent-src/commands/ghostwriter/fetch.md +1 -0
  62. package/.agent-src/commands/ghostwriter/list.md +1 -0
  63. package/.agent-src/commands/ghostwriter/show.md +1 -0
  64. package/.agent-src/commands/ghostwriter/write.md +1 -0
  65. package/.agent-src/commands/ghostwriter.md +1 -0
  66. package/.agent-src/commands/grill-me.md +1 -0
  67. package/.agent-src/commands/implement-ticket.md +1 -0
  68. package/.agent-src/commands/jira-ticket.md +1 -0
  69. package/.agent-src/commands/judge/on-diff.md +1 -0
  70. package/.agent-src/commands/judge/solo.md +1 -0
  71. package/.agent-src/commands/judge/steps.md +1 -0
  72. package/.agent-src/commands/judge.md +1 -0
  73. package/.agent-src/commands/knowledge/forget.md +1 -0
  74. package/.agent-src/commands/knowledge/ingest.md +1 -0
  75. package/.agent-src/commands/knowledge/list.md +1 -0
  76. package/.agent-src/commands/knowledge.md +1 -0
  77. package/.agent-src/commands/memory/add.md +1 -0
  78. package/.agent-src/commands/memory/learn-low-impact.md +1 -0
  79. package/.agent-src/commands/memory/load.md +1 -0
  80. package/.agent-src/commands/memory/mine-session.md +1 -0
  81. package/.agent-src/commands/memory/promote.md +1 -0
  82. package/.agent-src/commands/memory/propose.md +1 -0
  83. package/.agent-src/commands/memory.md +1 -0
  84. package/.agent-src/commands/mode.md +1 -0
  85. package/.agent-src/commands/module/create.md +1 -0
  86. package/.agent-src/commands/module/explore.md +1 -0
  87. package/.agent-src/commands/module.md +1 -0
  88. package/.agent-src/commands/optimize/agents-dir.md +1 -0
  89. package/.agent-src/commands/optimize/augmentignore.md +1 -0
  90. package/.agent-src/commands/optimize/rtk.md +1 -0
  91. package/.agent-src/commands/optimize/skills.md +1 -0
  92. package/.agent-src/commands/optimize-prompt.md +1 -0
  93. package/.agent-src/commands/optimize.md +1 -0
  94. package/.agent-src/commands/orchestrate.md +1 -0
  95. package/.agent-src/commands/override/create.md +1 -0
  96. package/.agent-src/commands/override/manage.md +1 -0
  97. package/.agent-src/commands/override.md +1 -0
  98. package/.agent-src/commands/package-reset.md +1 -0
  99. package/.agent-src/commands/package-test.md +1 -0
  100. package/.agent-src/commands/post-as/ghostwriter.md +1 -0
  101. package/.agent-src/commands/post-as/me.md +1 -0
  102. package/.agent-src/commands/post-as.md +1 -0
  103. package/.agent-src/commands/prepare-for-review.md +1 -0
  104. package/.agent-src/commands/project-analyze.md +1 -0
  105. package/.agent-src/commands/project-health.md +1 -0
  106. package/.agent-src/commands/quality-fix.md +1 -0
  107. package/.agent-src/commands/refine-ticket.md +1 -0
  108. package/.agent-src/commands/research/deep.md +1 -0
  109. package/.agent-src/commands/research/report.md +1 -0
  110. package/.agent-src/commands/research.md +1 -0
  111. package/.agent-src/commands/review-changes.md +1 -0
  112. package/.agent-src/commands/review-routing.md +1 -0
  113. package/.agent-src/commands/roadmap/ai-council.md +1 -0
  114. package/.agent-src/commands/roadmap/create.md +1 -0
  115. package/.agent-src/commands/roadmap/process-full.md +1 -0
  116. package/.agent-src/commands/roadmap/process-phase.md +1 -0
  117. package/.agent-src/commands/roadmap/process-step.md +1 -0
  118. package/.agent-src/commands/roadmap.md +1 -0
  119. package/.agent-src/commands/rule-compliance-audit.md +1 -0
  120. package/.agent-src/commands/set-cost-profile.md +1 -0
  121. package/.agent-src/commands/sync-agent-settings.md +1 -0
  122. package/.agent-src/commands/sync-gitignore/fix.md +1 -0
  123. package/.agent-src/commands/sync-gitignore.md +1 -0
  124. package/.agent-src/commands/tests/create.md +1 -0
  125. package/.agent-src/commands/tests/execute.md +1 -0
  126. package/.agent-src/commands/tests.md +1 -0
  127. package/.agent-src/commands/threat-model.md +1 -0
  128. package/.agent-src/commands/update-form-request-messages.md +1 -0
  129. package/.agent-src/commands/upstream-contribute.md +1 -0
  130. package/.agent-src/commands/video/from-script.md +1 -0
  131. package/.agent-src/commands/video/scene.md +1 -0
  132. package/.agent-src/commands/video/stitch.md +1 -0
  133. package/.agent-src/commands/video/storyboard.md +1 -0
  134. package/.agent-src/commands/video.md +1 -0
  135. package/.agent-src/commands/work.md +1 -0
  136. package/.agent-src/contexts/model-recommendations.md +82 -82
  137. package/.agent-src/rules/model-recommendation.md +69 -6
  138. package/.agent-src/skills/accessibility-auditor/SKILL.md +1 -0
  139. package/.agent-src/skills/activation-design/SKILL.md +1 -0
  140. package/.agent-src/skills/adr-create/SKILL.md +1 -0
  141. package/.agent-src/skills/adversarial-review/SKILL.md +1 -0
  142. package/.agent-src/skills/agent-docs-writing/SKILL.md +1 -0
  143. package/.agent-src/skills/agents-md-thin-root/SKILL.md +1 -0
  144. package/.agent-src/skills/ai-council/SKILL.md +1 -0
  145. package/.agent-src/skills/analysis-autonomous-mode/SKILL.md +1 -0
  146. package/.agent-src/skills/analysis-skill-router/SKILL.md +1 -0
  147. package/.agent-src/skills/api-design/SKILL.md +1 -0
  148. package/.agent-src/skills/api-endpoint/SKILL.md +1 -0
  149. package/.agent-src/skills/api-testing/SKILL.md +1 -0
  150. package/.agent-src/skills/architecture-review-lens/SKILL.md +1 -0
  151. package/.agent-src/skills/artisan-commands/SKILL.md +1 -0
  152. package/.agent-src/skills/async-python-patterns/SKILL.md +1 -0
  153. package/.agent-src/skills/authz-review/SKILL.md +1 -0
  154. package/.agent-src/skills/aws-infrastructure/SKILL.md +1 -0
  155. package/.agent-src/skills/blade-ui/SKILL.md +1 -0
  156. package/.agent-src/skills/blast-radius-analyzer/SKILL.md +1 -0
  157. package/.agent-src/skills/bug-analyzer/SKILL.md +1 -0
  158. package/.agent-src/skills/build-buy-partner/SKILL.md +1 -0
  159. package/.agent-src/skills/canvas-design/SKILL.md +1 -0
  160. package/.agent-src/skills/character-consistency/SKILL.md +1 -0
  161. package/.agent-src/skills/check-refs/SKILL.md +1 -0
  162. package/.agent-src/skills/churn-prevention/SKILL.md +1 -0
  163. package/.agent-src/skills/code-refactoring/SKILL.md +1 -0
  164. package/.agent-src/skills/code-review/SKILL.md +1 -0
  165. package/.agent-src/skills/command-routing/SKILL.md +1 -0
  166. package/.agent-src/skills/command-writing/SKILL.md +1 -0
  167. package/.agent-src/skills/comp-banding/SKILL.md +1 -0
  168. package/.agent-src/skills/competitive-moat-analysis/SKILL.md +1 -0
  169. package/.agent-src/skills/competitive-positioning/SKILL.md +1 -0
  170. package/.agent-src/skills/composer-packages/SKILL.md +1 -0
  171. package/.agent-src/skills/condense-memory/SKILL.md +1 -0
  172. package/.agent-src/skills/content-funnel-design/SKILL.md +1 -0
  173. package/.agent-src/skills/context-authoring/SKILL.md +1 -0
  174. package/.agent-src/skills/context-document/SKILL.md +1 -0
  175. package/.agent-src/skills/contracts-cognition/SKILL.md +1 -0
  176. package/.agent-src/skills/conventional-commits-writing/SKILL.md +1 -0
  177. package/.agent-src/skills/copilot-agents-optimization/SKILL.md +1 -0
  178. package/.agent-src/skills/copilot-config/SKILL.md +1 -0
  179. package/.agent-src/skills/customer-research/SKILL.md +1 -0
  180. package/.agent-src/skills/dashboard-design/SKILL.md +1 -0
  181. package/.agent-src/skills/data-flow-mapper/SKILL.md +1 -0
  182. package/.agent-src/skills/data-handling-judgment/SKILL.md +1 -0
  183. package/.agent-src/skills/database/SKILL.md +1 -0
  184. package/.agent-src/skills/dcf-modeling/SKILL.md +1 -0
  185. package/.agent-src/skills/deal-qualification-meddic/SKILL.md +1 -0
  186. package/.agent-src/skills/decision-record/SKILL.md +1 -0
  187. package/.agent-src/skills/deep-reading-analyst/SKILL.md +2 -0
  188. package/.agent-src/skills/defense-in-depth/SKILL.md +1 -0
  189. package/.agent-src/skills/dependency-upgrade/SKILL.md +1 -0
  190. package/.agent-src/skills/description-assist/SKILL.md +1 -0
  191. package/.agent-src/skills/design-review/SKILL.md +1 -0
  192. package/.agent-src/skills/devcontainer/SKILL.md +1 -0
  193. package/.agent-src/skills/developer-like-execution/SKILL.md +1 -0
  194. package/.agent-src/skills/discovery-interview/SKILL.md +1 -0
  195. package/.agent-src/skills/doc-coauthoring/SKILL.md +1 -0
  196. package/.agent-src/skills/docker/SKILL.md +1 -0
  197. package/.agent-src/skills/editorial-calendar/SKILL.md +1 -0
  198. package/.agent-src/skills/eloquent/SKILL.md +1 -0
  199. package/.agent-src/skills/error-handling-patterns/SKILL.md +1 -0
  200. package/.agent-src/skills/estimate-ticket/SKILL.md +1 -0
  201. package/.agent-src/skills/existing-ui-audit/SKILL.md +1 -0
  202. package/.agent-src/skills/expansion-playbook/SKILL.md +1 -0
  203. package/.agent-src/skills/fe-design/SKILL.md +1 -0
  204. package/.agent-src/skills/feature-planning/SKILL.md +1 -0
  205. package/.agent-src/skills/file-editor/SKILL.md +1 -0
  206. package/.agent-src/skills/finishing-a-development-branch/SKILL.md +1 -0
  207. package/.agent-src/skills/flux/SKILL.md +1 -0
  208. package/.agent-src/skills/forecast-accuracy/SKILL.md +1 -0
  209. package/.agent-src/skills/forecasting/SKILL.md +1 -0
  210. package/.agent-src/skills/form-handler/SKILL.md +1 -0
  211. package/.agent-src/skills/fundraising-narrative/SKILL.md +1 -0
  212. package/.agent-src/skills/funnel-analysis/SKILL.md +1 -0
  213. package/.agent-src/skills/git-workflow/SKILL.md +1 -0
  214. package/.agent-src/skills/github-ci/SKILL.md +1 -0
  215. package/.agent-src/skills/grafana/SKILL.md +1 -0
  216. package/.agent-src/skills/gtm-launch/SKILL.md +1 -0
  217. package/.agent-src/skills/guideline-writing/SKILL.md +1 -0
  218. package/.agent-src/skills/hiring-loop-design/SKILL.md +1 -0
  219. package/.agent-src/skills/incident-commander/SKILL.md +1 -0
  220. package/.agent-src/skills/jira-integration/SKILL.md +1 -0
  221. package/.agent-src/skills/jobs-events/SKILL.md +1 -0
  222. package/.agent-src/skills/judge-bug-hunter/SKILL.md +1 -0
  223. package/.agent-src/skills/judge-code-quality/SKILL.md +1 -0
  224. package/.agent-src/skills/judge-security-auditor/SKILL.md +1 -0
  225. package/.agent-src/skills/judge-test-coverage/SKILL.md +1 -0
  226. package/.agent-src/skills/laravel/SKILL.md +1 -0
  227. package/.agent-src/skills/laravel-api-endpoint/SKILL.md +1 -0
  228. package/.agent-src/skills/laravel-dto/SKILL.md +1 -0
  229. package/.agent-src/skills/laravel-horizon/SKILL.md +1 -0
  230. package/.agent-src/skills/laravel-mail/SKILL.md +1 -0
  231. package/.agent-src/skills/laravel-middleware/SKILL.md +1 -0
  232. package/.agent-src/skills/laravel-migration/SKILL.md +1 -0
  233. package/.agent-src/skills/laravel-notifications/SKILL.md +1 -0
  234. package/.agent-src/skills/laravel-pennant/SKILL.md +1 -0
  235. package/.agent-src/skills/laravel-pulse/SKILL.md +1 -0
  236. package/.agent-src/skills/laravel-reverb/SKILL.md +1 -0
  237. package/.agent-src/skills/laravel-scheduling/SKILL.md +1 -0
  238. package/.agent-src/skills/laravel-validation/SKILL.md +1 -0
  239. package/.agent-src/skills/laravel-websocket/SKILL.md +1 -0
  240. package/.agent-src/skills/launch-readiness/SKILL.md +1 -0
  241. package/.agent-src/skills/learning-to-rule-or-skill/SKILL.md +1 -0
  242. package/.agent-src/skills/lint-skills/SKILL.md +1 -0
  243. package/.agent-src/skills/livewire/SKILL.md +1 -0
  244. package/.agent-src/skills/livewire-architect/SKILL.md +1 -0
  245. package/.agent-src/skills/logging-monitoring/SKILL.md +1 -0
  246. package/.agent-src/skills/market-entry-analysis/SKILL.md +1 -0
  247. package/.agent-src/skills/markitdown/SKILL.md +1 -0
  248. package/.agent-src/skills/mcp/SKILL.md +1 -0
  249. package/.agent-src/skills/mcp-builder/SKILL.md +1 -0
  250. package/.agent-src/skills/md-language-check/SKILL.md +1 -0
  251. package/.agent-src/skills/memory-consolidation/SKILL.md +1 -0
  252. package/.agent-src/skills/merge-conflicts/SKILL.md +1 -0
  253. package/.agent-src/skills/messaging-architecture/SKILL.md +1 -0
  254. package/.agent-src/skills/migration-architect/SKILL.md +1 -0
  255. package/.agent-src/skills/mobile-e2e-strategy/SKILL.md +1 -0
  256. package/.agent-src/skills/module-detect-on-the-fly/SKILL.md +1 -0
  257. package/.agent-src/skills/module-management/SKILL.md +1 -0
  258. package/.agent-src/skills/motion-choreographer/SKILL.md +1 -0
  259. package/.agent-src/skills/multi-tenancy/SKILL.md +1 -0
  260. package/.agent-src/skills/nextjs-patterns/SKILL.md +1 -0
  261. package/.agent-src/skills/okr-tree-modeling/SKILL.md +1 -0
  262. package/.agent-src/skills/onboarding-design/SKILL.md +1 -0
  263. package/.agent-src/skills/onboarding-program/SKILL.md +1 -0
  264. package/.agent-src/skills/one-on-one-cadence/SKILL.md +1 -0
  265. package/.agent-src/skills/openapi/SKILL.md +1 -0
  266. package/.agent-src/skills/org-design/SKILL.md +1 -0
  267. package/.agent-src/skills/override-management/SKILL.md +1 -0
  268. package/.agent-src/skills/perf-feedback-craft/SKILL.md +1 -0
  269. package/.agent-src/skills/performance/SKILL.md +1 -0
  270. package/.agent-src/skills/performance-analysis/SKILL.md +1 -0
  271. package/.agent-src/skills/persona-writing/SKILL.md +1 -0
  272. package/.agent-src/skills/pest-testing/SKILL.md +1 -0
  273. package/.agent-src/skills/php-coder/SKILL.md +1 -0
  274. package/.agent-src/skills/php-debugging/SKILL.md +1 -0
  275. package/.agent-src/skills/php-service/SKILL.md +1 -0
  276. package/.agent-src/skills/pipeline-strategy/SKILL.md +1 -0
  277. package/.agent-src/skills/pixar-storyteller/SKILL.md +1 -0
  278. package/.agent-src/skills/playwright-architect/SKILL.md +1 -0
  279. package/.agent-src/skills/playwright-testing/SKILL.md +1 -0
  280. package/.agent-src/skills/po-discovery/SKILL.md +1 -0
  281. package/.agent-src/skills/positioning-strategy/SKILL.md +1 -0
  282. package/.agent-src/skills/privacy-review/SKILL.md +1 -0
  283. package/.agent-src/skills/project-analysis-core/SKILL.md +2 -0
  284. package/.agent-src/skills/project-analysis-hypothesis-driven/SKILL.md +2 -0
  285. package/.agent-src/skills/project-analysis-laravel/SKILL.md +1 -0
  286. package/.agent-src/skills/project-analysis-nextjs/SKILL.md +1 -0
  287. package/.agent-src/skills/project-analysis-node-express/SKILL.md +1 -0
  288. package/.agent-src/skills/project-analysis-react/SKILL.md +1 -0
  289. package/.agent-src/skills/project-analysis-symfony/SKILL.md +1 -0
  290. package/.agent-src/skills/project-analysis-zend-laminas/SKILL.md +1 -0
  291. package/.agent-src/skills/project-analyzer/SKILL.md +2 -0
  292. package/.agent-src/skills/project-docs/SKILL.md +1 -0
  293. package/.agent-src/skills/prompt-engineering-patterns/SKILL.md +1 -0
  294. package/.agent-src/skills/prompt-optimizer/SKILL.md +1 -0
  295. package/.agent-src/skills/quality-tools/SKILL.md +1 -0
  296. package/.agent-src/skills/react-native-setup/SKILL.md +1 -0
  297. package/.agent-src/skills/react-shadcn-ui/SKILL.md +1 -0
  298. package/.agent-src/skills/readme-reviewer/SKILL.md +1 -0
  299. package/.agent-src/skills/readme-writing/SKILL.md +1 -0
  300. package/.agent-src/skills/readme-writing-package/SKILL.md +1 -0
  301. package/.agent-src/skills/receiving-code-review/SKILL.md +1 -0
  302. package/.agent-src/skills/refine-prompt/SKILL.md +1 -0
  303. package/.agent-src/skills/refine-ticket/SKILL.md +1 -0
  304. package/.agent-src/skills/release-comms/SKILL.md +1 -0
  305. package/.agent-src/skills/repomix-packer/SKILL.md +2 -0
  306. package/.agent-src/skills/requesting-code-review/SKILL.md +1 -0
  307. package/.agent-src/skills/retention-loops/SKILL.md +1 -0
  308. package/.agent-src/skills/review-routing/SKILL.md +1 -0
  309. package/.agent-src/skills/rice-prioritization/SKILL.md +1 -0
  310. package/.agent-src/skills/risk-officer/SKILL.md +1 -0
  311. package/.agent-src/skills/roadmap-management/SKILL.md +1 -0
  312. package/.agent-src/skills/roadmap-writing/SKILL.md +1 -0
  313. package/.agent-src/skills/rtk-output-filtering/SKILL.md +1 -0
  314. package/.agent-src/skills/rule-refactor/SKILL.md +1 -0
  315. package/.agent-src/skills/rule-writing/SKILL.md +1 -0
  316. package/.agent-src/skills/runway-cognition/SKILL.md +1 -0
  317. package/.agent-src/skills/scenario-modeling/SKILL.md +1 -0
  318. package/.agent-src/skills/scene-expander/SKILL.md +1 -0
  319. package/.agent-src/skills/script-writing/SKILL.md +1 -0
  320. package/.agent-src/skills/secrets-management/SKILL.md +1 -0
  321. package/.agent-src/skills/security/SKILL.md +1 -0
  322. package/.agent-src/skills/security-audit/SKILL.md +1 -0
  323. package/.agent-src/skills/sentry-integration/SKILL.md +1 -0
  324. package/.agent-src/skills/sequential-thinking/SKILL.md +1 -0
  325. package/.agent-src/skills/skill-improvement-pipeline/SKILL.md +1 -0
  326. package/.agent-src/skills/skill-management/SKILL.md +1 -0
  327. package/.agent-src/skills/skill-reviewer/SKILL.md +1 -0
  328. package/.agent-src/skills/skill-writing/SKILL.md +1 -0
  329. package/.agent-src/skills/sql-writing/SKILL.md +1 -0
  330. package/.agent-src/skills/stakeholder-tradeoff/SKILL.md +1 -0
  331. package/.agent-src/skills/subagent-orchestration/SKILL.md +1 -0
  332. package/.agent-src/skills/symfony-workflow/SKILL.md +1 -0
  333. package/.agent-src/skills/systematic-debugging/SKILL.md +1 -0
  334. package/.agent-src/skills/tailwind-engineer/SKILL.md +1 -0
  335. package/.agent-src/skills/tech-debt-tracker/SKILL.md +1 -0
  336. package/.agent-src/skills/technical-specification/SKILL.md +1 -0
  337. package/.agent-src/skills/terraform/SKILL.md +1 -0
  338. package/.agent-src/skills/terragrunt/SKILL.md +1 -0
  339. package/.agent-src/skills/test-driven-development/SKILL.md +1 -0
  340. package/.agent-src/skills/test-performance/SKILL.md +1 -0
  341. package/.agent-src/skills/testing-anti-patterns/SKILL.md +1 -0
  342. package/.agent-src/skills/threat-modeling/SKILL.md +1 -0
  343. package/.agent-src/skills/throughput-vs-morale-tradeoff/SKILL.md +1 -0
  344. package/.agent-src/skills/token-optimizer/SKILL.md +1 -0
  345. package/.agent-src/skills/traefik/SKILL.md +1 -0
  346. package/.agent-src/skills/ui-component-architect/SKILL.md +1 -0
  347. package/.agent-src/skills/unit-economics-modeling/SKILL.md +1 -0
  348. package/.agent-src/skills/universal-project-analysis/SKILL.md +2 -0
  349. package/.agent-src/skills/upstream-contribute/SKILL.md +1 -0
  350. package/.agent-src/skills/using-git-worktrees/SKILL.md +1 -0
  351. package/.agent-src/skills/validate-feature-fit/SKILL.md +1 -0
  352. package/.agent-src/skills/verify-completion-evidence/SKILL.md +1 -0
  353. package/.agent-src/skills/video-director/SKILL.md +1 -0
  354. package/.agent-src/skills/vision-articulation/SKILL.md +1 -0
  355. package/.agent-src/skills/voc-extract/SKILL.md +1 -0
  356. package/.agent-src/skills/voice-and-tone-design/SKILL.md +1 -0
  357. package/.claude-plugin/marketplace.json +1 -1
  358. package/CHANGELOG.md +27 -238
  359. package/README.md +5 -0
  360. package/config/agent-settings.template.yml +13 -0
  361. package/dist/cli/registry.js +2 -0
  362. package/dist/cli/registry.js.map +1 -1
  363. package/dist/discovery/deprecation-report.md +1 -1
  364. package/dist/discovery/discovery-manifest.json +357 -357
  365. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  366. package/dist/discovery/discovery-manifest.summary.md +1 -1
  367. package/dist/discovery/orphan-report.md +1 -1
  368. package/dist/discovery/packs.json +2 -2
  369. package/dist/discovery/trust-report.md +1 -1
  370. package/dist/discovery/workspaces.json +2 -2
  371. package/dist/mcp/registry-manifest.json +1 -1
  372. package/dist/server/schemas/settings.js +4 -0
  373. package/dist/server/schemas/settings.js.map +1 -1
  374. package/dist/ui/assets/{index-Tk7lkVH8.js → index-DVsyUMZe.js} +2 -2
  375. package/dist/ui/assets/index-DVsyUMZe.js.map +1 -0
  376. package/dist/ui/index.html +1 -1
  377. package/docs/archive/CHANGELOG-pre-5.4.0.md +260 -0
  378. package/docs/contracts/consumer-bridge.md +2 -0
  379. package/docs/contracts/multi-tool-projection-fidelity.md +19 -0
  380. package/docs/contracts/release-pr-gating.md +6 -1
  381. package/docs/decisions/ADR-020-global-only-consumer-scope.md +24 -0
  382. package/docs/decisions/ADR-034-per-skill-model-recommendation-transport.md +63 -0
  383. package/docs/decisions/ADR-035-model-capability-tiers.md +104 -0
  384. package/docs/decisions/INDEX.md +2 -0
  385. package/docs/getting-started.md +23 -0
  386. package/package.json +1 -1
  387. package/scripts/__pycache__/validate_frontmatter.cpython-312.pyc +0 -0
  388. package/scripts/_cli/cmd_doctor.py +44 -1
  389. package/scripts/_cli/cmd_refresh.py +173 -0
  390. package/scripts/_cli/cmd_upgrade.py +142 -0
  391. package/scripts/_dispatch.bash +20 -0
  392. package/scripts/_lib/__pycache__/__init__.cpython-312.pyc +0 -0
  393. package/scripts/_lib/__pycache__/agent_src.cpython-312.pyc +0 -0
  394. package/scripts/backfill_model_tier.py +182 -0
  395. package/scripts/check_release_pr_shape.py +7 -0
  396. package/scripts/condense.py +142 -17
  397. package/scripts/hooks/dispatch_hook.py +39 -0
  398. package/scripts/install +14 -0
  399. package/scripts/lint_framework_leakage_allowlist.json +46 -46
  400. package/scripts/lint_model_tier_coverage.py +73 -0
  401. package/scripts/roadmap_progress_hook.py +28 -2
  402. package/scripts/schemas/command.schema.json +10 -0
  403. package/scripts/schemas/skill.schema.json +10 -0
  404. package/dist/ui/assets/index-Tk7lkVH8.js.map +0 -1
@@ -1 +1 @@
1
- 0e6f98f480590a02c00ae69b1276d91e390bd62bd3a6652ee7bd53afcc49c225 discovery-manifest.json
1
+ da906c7eabe30a645a5ed6a6731b1542968b0204b94f359fdf8be14870950349 discovery-manifest.json
@@ -1,6 +1,6 @@
1
1
  # Discovery Manifest — Summary
2
2
 
3
- - Generated: `2026-05-30T00:59:09Z`
3
+ - Generated: `2026-05-30T13:53:39Z`
4
4
  - Scanner: `ca7acd2ec7af`
5
5
  - Artefacts: **433**
6
6
  - Unassigned: **0**
@@ -1,6 +1,6 @@
1
1
  # Discovery — Orphan Report
2
2
 
3
- - Generated: `2026-05-30T00:59:09Z`
3
+ - Generated: `2026-05-30T13:53:39Z`
4
4
  - Orphan artefacts: **0**
5
5
 
6
6
  > An orphan is an artefact whose declared pack has no other members.
@@ -1,6 +1,6 @@
1
1
  {
2
- "checksum": "sha256:d8c983ca423afbd1d33c0dedcd540c3d13f2ae9399a6d8f2754c3a44dbc2cabf",
3
- "generated_at": "2026-05-30T00:59:09Z",
2
+ "checksum": "sha256:9fefaad4a6276325abcfc38b4b92e823973bba39efa92db3e0f6e262a1395cdb",
3
+ "generated_at": "2026-05-30T13:53:39Z",
4
4
  "packs": [
5
5
  {
6
6
  "artefact_count": 85,
@@ -1,6 +1,6 @@
1
1
  # Discovery — Trust Report
2
2
 
3
- - Generated: `2026-05-30T00:59:09Z`
3
+ - Generated: `2026-05-30T13:53:39Z`
4
4
  - Workspaces tracked: **8**
5
5
  - Human-review-required artefacts: **2**
6
6
 
@@ -1,6 +1,6 @@
1
1
  {
2
- "checksum": "sha256:d8c983ca423afbd1d33c0dedcd540c3d13f2ae9399a6d8f2754c3a44dbc2cabf",
3
- "generated_at": "2026-05-30T00:59:09Z",
2
+ "checksum": "sha256:9fefaad4a6276325abcfc38b4b92e823973bba39efa92db3e0f6e262a1395cdb",
3
+ "generated_at": "2026-05-30T13:53:39Z",
4
4
  "scanner_version": "ca7acd2ec7af",
5
5
  "workspaces": [
6
6
  {
@@ -9,7 +9,7 @@
9
9
  "homepage": "https://github.com/event4u-app/agent-config#readme",
10
10
  "name": "@event4u/agent-config",
11
11
  "repository": "https://github.com/event4u-app/agent-config",
12
- "version": "5.3.0"
12
+ "version": "5.4.0"
13
13
  },
14
14
  "registries": [
15
15
  {
@@ -25,6 +25,7 @@ const replyMethod = z.enum(['replies_endpoint', 'create_review_comment', 'auto']
25
25
  const confidenceBand = z.enum(['off', 'low', 'medium', 'high']);
26
26
  const onBlock = z.enum(['stop', 'ask', 'warn']);
27
27
  const onBlockFallback = z.enum(['stop', 'warn']);
28
+ const modelAutoSwitch = z.enum(['auto', 'suggest', 'off']);
28
29
  export const settingsSchema = z.object({
29
30
  agent_config_version: z.string().default('').describe('Pin the package to an exact semver (e.g. "1.4.2") so all teammates load the same skill / rule set. Leave empty to track whatever is installed locally — useful for the maintainers of this package, risky for production projects.'),
30
31
  cost_profile: costProfile.default('balanced').describe('Master switch for which rule tiers load and how cautiously the agent spends tokens. minimal = only the 9 kernel rules (cheapest, fewest guardrails). balanced = kernel + tier-1 (recommended default). full = kernel + tier-1 + tier-2 (most guardrails, highest token cost). custom = roll your own in agents/overrides/.'),
@@ -36,6 +37,9 @@ export const settingsSchema = z.object({
36
37
  }),
37
38
  enforcement: enforcementMode.default('advisory').describe('What happens when a budget hits 100%. advisory = show a banner, keep working (default — never blocks an active task). hard-stop = refuse further model calls until the budget resets or you raise the ceiling.'),
38
39
  }),
40
+ model: z.object({
41
+ auto_switch: modelAutoSwitch.default('suggest').describe('Per-skill model auto-switch (ADR-035). Skills declare a vendor-neutral model_tier (lite/medium/high); the generator maps it to a native Claude model (high→opus, medium→sonnet, lite→haiku). suggest (default) = never emit a native Claude model: key; the model-recommendation rule names the tier as a one-question suggestion on every surface — your explicit /model choice is never silently overridden. auto = render a native Claude model: into lite/medium/high-tier skills so Claude Code switches automatically for that turn (reverts next prompt), and suggest on surfaces without a native override. off = inert, no native key and no suggestion.'),
42
+ }).default({ auto_switch: 'suggest' }),
39
43
  personal: z.object({
40
44
  ide: z.string().default('').describe('CLI binary your IDE registers (code, code-insiders, phpstorm, cursor, windsurf, idea, subl, …). Used by the file-editor skill to open edited files. Leave empty to disable IDE integration.'),
41
45
  open_edited_files: z.boolean().default(false).describe('After the agent edits a file, run `<ide> <path>` to surface it in your editor immediately. Off by default to avoid window-stealing during long agent runs.'),
@@ -1 +1 @@
1
- {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../src/server/schemas/settings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,WAAW,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;AACtE,MAAM,eAAe,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC;AAC1D,MAAM,YAAY,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AACnD,MAAM,QAAQ,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;AACxG,MAAM,WAAW,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,iBAAiB,EAAE,eAAe,EAAE,kBAAkB,CAAC,CAAC,CAAC;AACrF,MAAM,QAAQ,GAAG,CAAC,CAAC,IAAI,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
36
  `+e.slice(t,l),t=l+1),a=c;return u+=`
37
37
  `,e.length-t>n&&a>t?u+=e.slice(t,a)+`
38
38
  `+e.slice(a+1):u+=e.slice(t),u.slice(1)}function Ko(e){for(var n="",i=0,r,t=0;t<e.length;i>=65536?t+=2:t++)i=we(e,t),r=L[i],!r&&$e(i)?(n+=e[t],i>=65536&&(n+=e[t+1])):n+=r||Mo(i);return n}function qo(e,n,i){var r="",t=e.tag,l,a,c;for(l=0,a=i.length;l<a;l+=1)c=i[l],e.replacer&&(c=e.replacer.call(i,String(l),c)),(z(e,n,c,!1,!1)||typeof c>"u"&&z(e,n,null,!1,!1))&&(r!==""&&(r+=","+(e.condenseFlow?"":" ")),r+=e.dump);e.tag=t,e.dump="["+r+"]"}function or(e,n,i,r){var t="",l=e.tag,a,c,u;for(a=0,c=i.length;a<c;a+=1)u=i[a],e.replacer&&(u=e.replacer.call(i,String(a),u)),(z(e,n+1,u,!0,!0,!1,!0)||typeof u>"u"&&z(e,n+1,null,!0,!0,!1,!0))&&((!r||t!=="")&&(t+=Xn(e,n)),e.dump&&Re===e.dump.charCodeAt(0)?t+="-":t+="- ",t+=e.dump);e.tag=l,e.dump=t||"[]"}function Go(e,n,i){var r="",t=e.tag,l=Object.keys(i),a,c,u,d,f;for(a=0,c=l.length;a<c;a+=1)f="",r!==""&&(f+=", "),e.condenseFlow&&(f+='"'),u=l[a],d=i[u],e.replacer&&(d=e.replacer.call(i,u,d)),z(e,n,u,!1,!1)&&(e.dump.length>1024&&(f+="? "),f+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),z(e,n,d,!1,!1)&&(f+=e.dump,r+=f));e.tag=t,e.dump="{"+r+"}"}function Vo(e,n,i,r){var t="",l=e.tag,a=Object.keys(i),c,u,d,f,s,h;if(e.sortKeys===!0)a.sort();else if(typeof e.sortKeys=="function")a.sort(e.sortKeys);else if(e.sortKeys)throw new F("sortKeys must be a boolean or a function");for(c=0,u=a.length;c<u;c+=1)h="",(!r||t!=="")&&(h+=Xn(e,n)),d=a[c],f=i[d],e.replacer&&(f=e.replacer.call(i,d,f)),z(e,n+1,d,!0,!0,!0)&&(s=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,s&&(e.dump&&Re===e.dump.charCodeAt(0)?h+="?":h+="? "),h+=e.dump,s&&(h+=Xn(e,n)),z(e,n+1,f,!0,s)&&(e.dump&&Re===e.dump.charCodeAt(0)?h+=":":h+=": ",h+=e.dump,t+=h));e.tag=l,e.dump=t||"{}"}function cr(e,n,i){var r,t,l,a,c,u;for(t=i?e.explicitTypes:e.implicitTypes,l=0,a=t.length;l<a;l+=1)if(c=t[l],(c.instanceOf||c.predicate)&&(!c.instanceOf||typeof n=="object"&&n instanceof c.instanceOf)&&(!c.predicate||c.predicate(n))){if(i?c.multi&&c.representName?e.tag=c.representName(n):e.tag=c.tag:e.tag="?",c.represent){if(u=e.styleMap[c.tag]||c.defaultStyle,Ct.call(c.represent)==="[object Function]")r=c.represent(n,u);else if(Tt.call(c.represent,u))r=c.represent[u](n,u);else throw new F("!<"+c.tag+'> tag resolver accepts not "'+u+'" style');e.dump=r}return!0}return!1}function z(e,n,i,r,t,l,a){e.tag=null,e.dump=i,cr(e,i,!1)||cr(e,i,!0);var c=Ct.call(e.dump),u=r,d;r&&(r=e.flowLevel<0||e.flowLevel>n);var f=c==="[object Object]"||c==="[object Array]",s,h;if(f&&(s=e.duplicates.indexOf(i),h=s!==-1),(e.tag!==null&&e.tag!=="?"||h||e.indent!==2&&n>0)&&(t=!1),h&&e.usedDuplicates[s])e.dump="*ref_"+s;else{if(f&&h&&!e.usedDuplicates[s]&&(e.usedDuplicates[s]=!0),c==="[object Object]")r&&Object.keys(e.dump).length!==0?(Vo(e,n,e.dump,t),h&&(e.dump="&ref_"+s+e.dump)):(Go(e,n,e.dump),h&&(e.dump="&ref_"+s+" "+e.dump));else if(c==="[object Array]")r&&e.dump.length!==0?(e.noArrayIndent&&!a&&n>0?or(e,n-1,e.dump,t):or(e,n,e.dump,t),h&&(e.dump="&ref_"+s+e.dump)):(qo(e,n,e.dump),h&&(e.dump="&ref_"+s+" "+e.dump));else if(c==="[object String]")e.tag!=="?"&&zo(e,e.dump,n,l,u);else{if(c==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new F("unacceptable kind of an object to dump "+c)}e.tag!==null&&e.tag!=="?"&&(d=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?d="!"+d:d.slice(0,18)==="tag:yaml.org,2002:"?d="!!"+d.slice(18):d="!<"+d+">",e.dump=d+" "+e.dump)}return!0}function Jo(e,n){var i=[],r=[],t,l;for(ni(e,i,r),t=0,l=r.length;t<l;t+=1)n.duplicates.push(i[r[t]]);n.usedDuplicates=new Array(l)}function ni(e,n,i){var r,t,l;if(e!==null&&typeof e=="object")if(t=n.indexOf(e),t!==-1)i.indexOf(t)===-1&&i.push(t);else if(n.push(e),Array.isArray(e))for(t=0,l=e.length;t<l;t+=1)ni(e[t],n,i);else for(r=Object.keys(e),t=0,l=r.length;t<l;t+=1)ni(e[r[t]],n,i)}function Qo(e,n){n=n||{};var i=new jo(n);i.noRefs||Jo(e,i);var r=e;return i.replacer&&(r=i.replacer.call({"":r},"",r)),z(i,0,r,!0,!0)?i.dump+`
39
- `:""}var Zo=Qo,Xo={dump:Zo};function ki(e,n){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+n+" instead, which is now safe by default.")}}var ec=N,nc=Qr,ic=nt,rc=at,tc=ot,lc=gi,ac=St.load,oc=St.loadAll,cc=Xo.dump,sc=F,uc={binary:ft,float:lt,map:et,null:it,pairs:ht,set:vt,timestamp:ut,bool:rt,int:tt,merge:dt,omap:pt,seq:Xr,str:Zr},dc=ki("safeLoad","load"),fc=ki("safeLoadAll","loadAll"),pc=ki("safeDump","dump"),hc={Type:ec,Schema:nc,FAILSAFE_SCHEMA:ic,JSON_SCHEMA:rc,CORE_SCHEMA:tc,DEFAULT_SCHEMA:lc,load:ac,loadAll:oc,dump:cc,YAMLException:sc,types:uc,safeLoad:dc,safeLoadAll:fc,safeDump:pc};function vc(e){if(e.trim()==="")return{};const i=hc.load(e);if(i==null)return{};if(typeof i!="object"||Array.isArray(i))throw new Error(".agent-user.yml must parse to an object");return i}const sr={id:"welcome",title:"Welcome — who are you?",navLabel:"You",subtitle:"Your name and language. Stored in .agent-user.yml; we pre-fill what we can detect.",kind:"welcome"},_c=[{id:"ai-tools",title:"Which AI tools do you use?",navLabel:"AI tools",subtitle:"Pick the editors and CLIs that should pick up this config. Auto-detect runs first; you can override.",kind:"aiTools"},{id:"roles",title:"What do you work on?",navLabel:"Roles",subtitle:"Pick the areas you work in. We use them to recommend capability packs on the next step, and they become your roles in .agent-user.yml.",kind:"roles"},{id:"packs",title:"Which capability packs do you want?",navLabel:"Packs",subtitle:"Founder-strategy, finance-basic, gtm-sales, ops-people, ai-video — pick zero or more. You can change this later.",kind:"packs"}],ur=[{id:"identity",title:"Editor and tooling",navLabel:"Editor",subtitle:"IDE goes into .agent-settings.yml so the agent opens files in the right tool. rtk presence is auto-detected (see the rtk row). Your name lives in .agent-user.yml (later step).",kind:"form",paths:["personal.ide","personal.open_edited_files"]},{id:"personality",title:"How should the agent behave?",navLabel:"Personality",subtitle:"Autonomy, output verbosity, and PR-comment style.",kind:"form",paths:["personal.autonomy","personal.minimal_output","personal.play_by_play","personal.pr_comment_bot_icon"]},{id:"cost",title:"Cost profile and budgets",navLabel:"Cost",subtitle:"Master switch for which rule tiers load, plus optional spending ceilings.",kind:"form",paths:["cost_profile","cost.budgets.daily","cost.budgets.weekly","cost.budgets.monthly","cost.enforcement"]},{id:"roadmap-quality",title:"Roadmap & quality cadence",navLabel:"Roadmap & quality",subtitle:"When the agent runs quality tools and refreshes roadmap dashboards.",kind:"form",paths:["roadmap.quality_cadence","roadmap.dashboard_regen_cadence","quality.local_auto_run","quality.wait_for_remote_ci"]},{id:"memory",title:"Memory & redaction",navLabel:"Memory",subtitle:"Inline-review threshold and transcript-redaction regexes.",kind:"form",paths:["memory.review_threshold","memory.redact_patterns"]},{id:"user-md",title:"Your .agent-user.yml",navLabel:"User profile",subtitle:"Identity, voice, preferences. Stored at agents/settings/.agent-user.yml. Skip to leave empty.",kind:"userMd"},{id:"review",title:"Review & finish",navLabel:"Review",subtitle:"These keys will change. Confirm to write .agent-settings.yml and .agent-user.yml atomically.",kind:"review"}];function Mt(e={}){return e.extended===!0?[sr,..._c,...ur]:[sr,...ur]}function On(e,n={}){const i=Mt(n),r=Math.max(0,Math.min(i.length-1,e));return i[r]}function mc(e,n){const i={type:"object",properties:{},...e.description!==void 0?{description:e.description}:{}},r=i.properties,t=e.properties??{};for(const l of n){const a=l.split(".").filter(j=>j.length>0);if(a.length===0)continue;const[c,u,d]=a;if(c===void 0)continue;const f=t[c];if(f===void 0)continue;if(u===void 0){r[c]=f;continue}const s=f.properties?.[u];if(s===void 0)continue;const p=r[c]??{type:"object",properties:{},...f.description!==void 0?{description:f.description}:{}},v=p.properties??={};if(d===void 0){v[u]=s,r[c]=p;continue}const g=s.properties?.[d];if(g===void 0)continue;const w=v[u]??{type:"object",properties:{},...s.description!==void 0?{description:s.description}:{}},m=w.properties??={};m[d]=g,v[u]=w,r[c]=p}return i}function gc({current:e,total:n}){const i=Math.max(1,n),r=Math.max(0,Math.min(i-1,e)),t=Array.from({length:i},(a,c)=>c<=r),l=Math.round((r+1)/i*100);return o("div",{class:"ac-wizard__progress",role:"progressbar","aria-valuenow":r+1,"aria-valuemin":1,"aria-valuemax":i,"aria-valuetext":`Step ${r+1} of ${i} (${l}%)`,children:t.map((a,c)=>o("span",{class:`ac-wizard__progress-segment${a?" ac-wizard__progress-segment--filled":""}`,"aria-hidden":"true"},c))})}function yc({step:e,index:n,total:i}){return o("header",{class:"ac-page__header ac-wizard__header",children:[o("p",{class:"ac-wizard__step-count",children:["Step ",n+1," of ",i]}),o("div",{class:"ac-wizard__header-text",children:[o("h1",{children:e.title}),o("p",{class:"ac-wizard__subtitle",children:e.subtitle})]}),o(gc,{current:n,total:i})]})}function bc(e){const n=e.canFinish??!0,i=e.completed??!1;return o("div",{class:"ac-form__actions ac-wizard__nav",children:[o("button",{type:"button",class:"ac-button",disabled:!e.canGoPrev||e.busy,onClick:e.onPrev,children:"Back"}),e.canSkip&&e.onSkip!==void 0?o("button",{type:"button",class:"ac-button ac-wizard__skip",disabled:e.busy,onClick:e.onSkip,children:e.skipLabel??"Skip"}):null,e.isLast?i?null:o("button",{type:"button",class:"ac-button ac-button--primary",disabled:e.busy||!n,onClick:e.onFinish,children:e.busy?"Saving…":"Finish & save"}):o("button",{type:"button",class:"ac-button ac-button--primary",disabled:!e.canGoNext||e.busy,onClick:e.onNext,children:e.nextLabel??"Next"})]})}function Dt(e,n){return e.kind!=="form"||e.paths===void 0?!1:!!(e.paths.includes(n)||e.id==="cost"&&(n.startsWith("telegraph.")||n.startsWith("verbosity.")))}function wc(e,n){return e.kind==="userMd"?n==="body"||n.startsWith("body."):Dt(e,n)}function kc(e,n){for(const i of Object.keys(n.errors))if(wc(e,i))return!0;return!1}function xc(e,n){if(kc(e,n))return{label:"needs attention",tone:"error"};if(e.kind==="userMd")return n.userMdChanged?{label:n.userMdAction==="create"?"will create":"will replace",tone:"changed"}:{label:"",tone:"idle"};if(e.kind==="form"){const i=n.changes.filter(r=>Dt(e,r.path)).length;return i===0?{label:"",tone:"idle"}:{label:`${i} change${i===1?"":"s"}`,tone:"changed"}}if(e.kind==="aiTools"){const i=n.selectedToolsCount??0;return i===0?{label:"",tone:"idle"}:{label:`${i} tool${i===1?"":"s"}`,tone:"changed"}}if(e.kind==="packs"){const i=n.selectedPacksCount??0;return i===0?{label:"",tone:"idle"}:{label:`${i} pack${i===1?"":"s"}`,tone:"changed"}}return{label:"",tone:"idle"}}function Ac(e){const n=e.steps.filter((i,r)=>r!==e.currentIndex);return o(J,{children:o("nav",{class:"ac-wizard__review-nav","aria-label":"Jump back to a step",children:[o("p",{class:"ac-wizard__review-nav-label",children:"Jump back to a step:"}),o("ul",{class:"ac-wizard__review-nav-list",children:n.map(i=>{const r=e.steps.indexOf(i),t=xc(i,e),l=t.tone==="error"?"ac-wizard__review-nav-button ac-wizard__review-nav-button--error":"ac-wizard__review-nav-button";return o("li",{children:o("button",{type:"button",class:l,onClick:()=>{e.onJump(r)},children:[o("span",{class:"ac-wizard__review-nav-index",children:r+1}),o("span",{class:"ac-wizard__review-nav-text",children:i.navLabel}),t.label!==""?o("span",{class:`ac-wizard__review-nav-status ac-wizard__review-nav-status--${t.tone}`,children:t.label}):null]})},i.id)})})]})})}function Sc(e){const n=e.abortedAt??"unknown time",i=e.abortNote??"no further detail recorded",r=e.writesSinceRollback;return o("aside",{class:"ac-banner ac-banner--recovery",role:"alert",children:[o("strong",{children:"Previous install was interrupted."}),o("p",{children:["Aborted at ",o("code",{children:n})," — ",i,". ",r," write",r===1?"":"s"," landed before the abort marker."]}),o("p",{children:"Pick how to recover before continuing. Resume reopens the wizard fresh, Rollback discards the abort state, Ignore hides this banner without touching the log."}),o("div",{class:"ac-banner__actions",children:[o("button",{type:"button",disabled:e.busy,onClick:()=>e.onResume(),children:"Resume install"}),o("button",{type:"button",disabled:e.busy,onClick:()=>e.onRollback(),children:"Rollback"}),o("button",{type:"button",disabled:e.busy,onClick:()=>e.onIgnore(),children:"Ignore"})]})]})}function Cc(){return o("section",{class:"ac-continue-screen","aria-labelledby":"ac-continue-title",children:[o("h2",{id:"ac-continue-title",children:"Install complete — continue with setup?"}),o("p",{children:"Your install selections (AI tools, roles, capability packs) are captured. Use the footer to continue:"}),o("ul",{children:[o("li",{children:[o("strong",{children:"Next"})," — go through the remaining personalisation steps: editor + tooling, personality, cost profile, roadmap & quality, memory, your",o("code",{children:" .agent-user.yml"}),", and finally the project module roots."]}),o("li",{children:[o("strong",{children:"Finish install here"})," — skip the rest and write ",o("code",{children:".agent-settings.yml"})," with the install-only selections. You can re-run ",o("code",{children:"agent-config setup"}),"later to pick up the personalisation steps."]})]})]})}function Tc(e){const n=e.version??"unknown";return o("section",{class:"ac-backup-screen","aria-labelledby":"ac-backup-title",children:[o("h2",{id:"ac-backup-title",children:"Existing v3 install detected"}),o("p",{children:["Found a v3.x install at ",o("code",{children:e.sourcePath})," ","(VERSION: ",o("code",{children:n}),"). v4 is a hard-cut release with no auto-migration — settings, identity, and history layouts changed. The wizard can back up the v3 tree before writing the v4 layout so you can roll back manually if needed."]}),e.error!==null?o("p",{class:"ac-banner ac-banner--error",children:["Backup failed: ",e.error]}):null,o("ul",{children:[o("li",{children:[o("strong",{children:"Backup v3 and proceed"})," — copies the tree to ",o("code",{children:e.backupTarget}),", then runs the v4 install. Restore later with",o("code",{children:[" mv ",e.backupTarget," ",e.sourcePath]}),"."]}),o("li",{children:[o("strong",{children:"Abort, uninstall v3 first"})," — closes the wizard. You decide what to keep."]})]}),o("div",{class:"ac-backup-screen__actions",children:[o("button",{type:"button",class:"ac-button ac-button--primary",disabled:e.busy,onClick:()=>e.onBackupAndProceed(),children:e.busy?"Backing up…":"Backup v3 and proceed"}),o("button",{type:"button",class:"ac-button",disabled:e.busy,onClick:()=>e.onAbort(),children:"Abort, uninstall v3 first"})]})]})}const jt=_(!1),Te=_(null),P=_(null),fn=_(!1),pn=_(!1),re=_(0),xi=_(null),D=_({}),Bt=_({}),Ut=_(0),he=_({}),E=_(null),ee=_(null),Ai=_(!1),ii=_(!1),Nn=_(!1),Ht=_({}),In=_([]);_("global");const Si=_(!1),M=_(!1),Ec=_(!1),hn=_(!1),vn=_(null),Ci=_([]),_n=_({}),mn=_(!0),gn=_(""),yn=_("agents");_(!1);const Wt=_(null),Oc=[{id:"claude-code",label:"Claude Code"},{id:"claude-desktop",label:"Claude Desktop"},{id:"cursor",label:"Cursor"},{id:"windsurf",label:"Windsurf"},{id:"cline",label:"Cline"},{id:"gemini-cli",label:"Gemini CLI"},{id:"copilot",label:"GitHub Copilot"},{id:"augment",label:"Augment"},{id:"aider",label:"Aider"},{id:"codex",label:"Codex"},{id:"roocode",label:"Roo Code"},{id:"continue",label:"Continue"},{id:"kilocode",label:"Kilo Code"},{id:"zed",label:"Zed"},{id:"jetbrains",label:"JetBrains"},{id:"kiro",label:"Kiro"},{id:"qoder",label:"Qoder"},{id:"opencode",label:"OpenCode"},{id:"trae",label:"Trae"},{id:"antigravity",label:"Antigravity"},{id:"codebuddy",label:"CodeBuddy"},{id:"droid",label:"Droid"},{id:"warp",label:"Warp"}],dr=_(!1),Ee=_(!1),ne=_(null),Ti=_([]),Ei=_([]),Ln=_([]),ie=_({}),fr=_(!1),Bn=_(!1),zt=_({}),pr=_(!1),Yt=_(null),Kt=_(null),qt=_("https://github.com/event4u-app/rtk");_(!1);_(null);_([]);_({});_({});const te=_({}),K=_({}),ri=_(!1),hr=_(!1);_({});_(null);_(null);_(!1);_(null);const bn=_(null),Gt=_(!1),ti=_(null),li=_(!1),ai=_(!1),oi=_(null),Oe=_(null),Ve=_(!1);function Vt(){return Mt({extended:M.value})}function Me(){return Vt().length}function Nc(e){return e??new Date().toISOString()}function Oi(e){return Math.max(0,Math.min(Me()-1,e))}function Ic(e){if("$ref"in e&&e.$ref!==void 0&&"definitions"in e&&e.definitions!==void 0){const n=e.$ref.replace("#/definitions/",""),i=e.definitions[n];if(i!==void 0)return i}return e}async function Lc(){try{return await A("/api/v1/settings")}catch(e){if(e instanceof $&&e.status===404&&e.body.error?.code==="NOT_FOUND"){const n=e.body;if(n.defaults!==void 0&&n.schema!==void 0)return{values:n.defaults,lastModified:n.lastModified??0,path:n.path??".agent-settings.yml",schema:n.schema};const i=await A("/api/v1/schema");return{values:{},lastModified:0,path:".agent-settings.yml",schema:i.settings}}throw e}}async function Fc(){try{const e=await A("/api/v1/install/recovery");bn.value=e.incomplete?e:null}catch{bn.value=null}}async function Rc(){try{const e=await A("/api/v1/install/legacy-v3");ti.value=e.present?e:null}catch{ti.value=null}}async function Pc(){ai.value=!0,oi.value=null;try{await A("/api/v1/install/backup-v3",{method:"POST"}),li.value=!0}catch(e){oi.value=e instanceof $?G(e.body.error??{code:"UNKNOWN",message:e.message}):e instanceof Error?e.message:String(e)}finally{ai.value=!1}}async function Un(e){try{await A("/api/v1/install/recovery/dismiss",{method:"POST",body:{reason:e}})}catch(n){P.value={message:n instanceof Error?n.message:String(n),tone:"error"};return}bn.value=null,Gt.value=!0}async function $c(){Te.value=null;try{Fc(),Rc();const[e,n]=await Promise.all([A("/api/v1/wizard/state"),Lc()]);xi.value=Ic(n.schema),Ut.value=n.lastModified,Bt.value=n.values,Ht.value=n.legacyHints??{},M.value=e.extendedSteps===!0,Oe.value=e.wizardMode??null;const i=Object.keys(e.partial??{});D.value=i.length>0?{...n.values,...e.partial}:n.values,re.value=Oi(e.step),Si.value=!1,jt.value=!0;const r=On(re.value,{extended:M.value});(r.kind==="welcome"||r.kind==="userMd"||r.kind==="review")&&Jt(),(r.kind==="roles"||r.kind==="aiTools"||r.kind==="packs")&&Qt(),r.kind==="aiTools"&&Zt(),r.id==="identity"&&Xt(),r.kind==="review"&&el()}catch(e){e instanceof $?Te.value=G(e.body.error??{code:"UNKNOWN",message:e.message}):Te.value=e instanceof Error?e.message:String(e)}}function Mc(e,n){return e.identity.name.trim()!==""?e:{...e,identity:{...e.identity,name:n}}}async function Jt(){if(!ii.value)try{const e=await A("/api/v1/user-md");if(Ai.value=e.exists,e.exists&&e.identity!==null){const n=qi(e.identity);ee.value=n,E.value=n}else{let n;try{const r=await A("/api/v1/user-md/template");n=qi(vc(r.body))}catch{n=Gr()}const i=Ht.value.user_name;typeof i=="string"&&i.trim()!==""&&(n=Mc(n,i)),ee.value=n,E.value=n}}catch(e){P.value={message:e instanceof Error?e.message:String(e),tone:"error"}}finally{ii.value=!0}}const Dc=new Set(["python"]);async function Qt(){if(!(dr.value||Ee.value)){Ee.value=!0,ne.value=null;try{const[e,n]=await Promise.all([A("/api/v1/wizard/manifest"),A("/api/v1/wizard/auto-detect")]),i=(e.packs??[]).map(l=>({id:l.id,label:l.label??l.id,description:l.description??"",requires_hint:l.requires_hint,cluster:l.cluster??void 0,workspaces:l.workspaces}));Ti.value=i,Ln.value=(e.workspaces??[]).filter(l=>l.id!=="agent-config-maintainer").map(l=>({id:l.id,label:l.label??l.id,description:l.description??"",default_packs:l.default_packs??[],optional_packs:l.optional_packs??[],...l.example_roles!==void 0?{example_roles:l.example_roles}:{}}));const r=new Set(i.map(l=>l.id)),t=n.signals.map(l=>l.id.startsWith("pack-")?l.id.slice(5):l.id).filter(l=>r.has(l)).filter(l=>!Dc.has(l));Ei.value=t}catch(e){e instanceof $?ne.value=G(e.body.error??{code:"UNKNOWN",message:e.message}):ne.value=e instanceof Error?e.message:String(e)}finally{Ee.value=!1,dr.value=!0}}}async function Zt(){if(!(fr.value||Bn.value)){Bn.value=!0;try{const e=await A("/api/v1/wizard/detect-tools"),n=e.tools??{},i=e.configured??[];if(zt.value=n,Object.keys(te.value).length===0){const r={};if(i.length>0)for(const t of i)r[t]=!0;else for(const[t,l]of Object.entries(n))l&&(r[t]=!0);te.value=r}}catch{}finally{Bn.value=!1,fr.value=!0}}}async function Xt(){if(!pr.value){pr.value=!0;try{const e=await A("/api/v1/wizard/detect-rtk"),n=e.installed===!0;Yt.value=n,Kt.value=e.installCommand??null,typeof e.repo=="string"&&(qt.value=e.repo);const i=D.value.personal??{};D.value={...D.value,personal:{...i,rtk_installed:n}}}catch{}}}async function jc(e,n){try{await A("/api/v1/wizard/state",{method:"POST",body:{step:e,totalSteps:Me(),partial:n,startedAt:Nc(null)}})}catch(i){P.value={message:i instanceof Error?i.message:String(i),tone:"error"}}}async function el(){pn.value=!0;try{const e=await A("/api/v1/settings/diff",{method:"POST",body:{values:D.value,ifUnmodifiedSince:Ut.value}});In.value=e.changes,he.value={}}catch(e){e instanceof $?(he.value=Wr(e.body.error??{message:e.message}),P.value={message:G(e.body.error??{code:"UNKNOWN",message:e.message}),tone:"error"}):P.value={message:e instanceof Error?e.message:String(e),tone:"error"}}finally{pn.value=!1}}function wn(){return Nn.value?!1:E.value===null||ee.value===null?E.value!==ee.value:JSON.stringify(E.value)!==JSON.stringify(ee.value)}async function ke(e){const n=Oi(e);await jc(n,D.value),re.value=n,P.value=null;const i=On(n,{extended:M.value});(i.kind==="welcome"||i.kind==="userMd")&&Jt(),(i.kind==="roles"||i.kind==="aiTools"||i.kind==="packs")&&Qt(),i.kind==="packs"&&il(),i.kind==="aiTools"&&Zt(),i.id==="identity"&&Xt(),i.kind==="review"&&el()}function nl(){const e=K.value,n=new Map(Ti.value.map(l=>[l.id,l])),i=Object.entries(e).filter(([,l])=>l===!0).map(([l])=>l).filter(l=>{const a=n.get(l)?.cluster;return a===void 0||e[a]===!0}),r=new Set,t=l=>{if(!r.has(l)){r.add(l);for(const a of n.get(l)?.requires_hint??[])t(a)}};for(const l of i)t(l);return[...r].sort()}function il(){if(ri.value)return;const e=Object.entries(ie.value).filter(([,r])=>r===!0).map(([r])=>r),n=new Map(Ln.value.map(r=>[r.id,r])),i={};for(const r of e)for(const t of n.get(r)?.default_packs??[])i[t]=!0;for(const r of Ei.value)i[r]=!0;K.value=i}function Bc(){const e=Object.entries(te.value).filter(([,r])=>r===!0).map(([r])=>r);if(e.length===0)return null;const n=nl();return{schema_version:"wizard-v2",tools:e,packs:n,settings:D.value}}async function Uc(){fn.value=!0,P.value=null;try{const e={settings:D.value},n=Object.entries(ie.value).filter(([,u])=>u===!0).map(([u])=>u),i=E.value!==null&&typeof E.value.identity?.name=="string"&&E.value.identity.name.trim().length>0;E.value!==null&&i&&(wn()||n.length>0)&&(e.identity=n.length>0?{...E.value,role:n}:E.value);const r=await A("/api/v1/wizard/finish",{method:"POST",body:e}),t="You can close this browser window now.",l=r.dryRun===!0?"Dry-run complete — no files written. Settings would be saved.":Array.isArray(r.writtenPaths)?`Saved (${r.writtenPaths.join(", ")}). Wizard complete.`:"Wizard complete.",a=M.value?Bc():null;let c="";if(a!==null)try{let u=null;await El("/api/v1/wizard/apply",a,s=>{s.type==="error"&&(u=typeof s.message=="string"?s.message:"install failed")});const d=a.tools.length,f=a.packs.length;c=u!==null?` Installer failed: ${u}. Settings were saved; re-run the wizard to retry.`:` Installer applied ${d} tool${d===1?"":"s"}`+(f>0?` and ${f} pack${f===1?"":"s"}.`:".")}catch(u){c=` Installer bridge failed: ${u instanceof $?G(u.body.error??{code:"UNKNOWN",message:u.message}):u instanceof Error?u.message:String(u)}. Settings were saved; re-run the wizard to retry the install plan.`}P.value={message:`${l}${c} ${t}`,tone:"success"},re.value=Oi(Me()-1),Bt.value=D.value,ee.value=wn()?E.value:ee.value,In.value=[],Si.value=!0}catch(e){e instanceof $?(he.value=Wr(e.body.error??{message:e.message}),P.value={message:G(e.body.error??{code:"UNKNOWN",message:e.message}),tone:"error"}):P.value={message:e instanceof Error?e.message:String(e),tone:"error"}}finally{fn.value=!1}}const Hc=["de","en","en-US","en-GB","fr","es","it","nl","pt","pt-BR"];function Wc(){if(hr.value)return;const e=E.value;if(e===null)return;hr.value=!0;let n=e;if(e.identity.name.trim()===""){const i=ln.value?.systemUser;i!==void 0&&i.trim()!==""&&(n={...n,identity:{...n.identity,name:i}})}if(!Ai.value&&typeof navigator<"u"){const i=(navigator.language||"").split("-")[0];i.length>=2&&(n={...n,language:i})}n!==e&&(E.value=n)}function zc(){const e=E.value;if(De(()=>{Wc()},[e]),e===null)return o("p",{children:"Loading…"});const n=i=>{E.value={...i,last_updated:new Date().toISOString().slice(0,10)},Nn.value=!1};return o("div",{class:"ac-wizard-step-stub ac-wizard__module-fields",children:[o("p",{children:["Tell the agent who you are. We pre-filled what we could detect — adjust freely. Stored in ",o("code",{children:".agent-user.yml"}),"."]}),o("div",{class:"ac-field",children:[o("label",{class:"ac-field__label",for:"welcome-name",children:"Name"}),o("input",{class:"ac-input",id:"welcome-name",type:"text",placeholder:"How should the agent address you?",value:e.identity.name,onInput:i=>n({...e,identity:{...e.identity,name:i.currentTarget.value}})})]}),o("div",{class:"ac-field",children:[o("label",{class:"ac-field__label",for:"welcome-lang",children:"Language"}),o("input",{class:"ac-input",id:"welcome-lang",type:"text",list:"welcome-lang-list",placeholder:"BCP-47 code, e.g. de, en, en-US",value:e.language,onInput:i=>n({...e,language:i.currentTarget.value})}),o("datalist",{id:"welcome-lang-list",children:Hc.map(i=>o("option",{value:i},i))})]})]})}function Yc(){const e=te.value,n=zt.value;return o("div",{class:"ac-wizard-step-stub",children:[o("p",{children:"Pick the AI tools you use. Tools detected on this machine are pre-selected on first run. The installer wires each selected tool's surface (skills, rules, commands) on apply; you can change this list later by re-running the wizard."}),o("ul",{class:"ac-wizard__tool-list",children:Oc.map(i=>{const r=n[i.id]===!0;return o("li",{class:"ac-wizard__tool-row",children:[o("label",{class:"ac-wizard__tool-label",children:[o("input",{type:"checkbox",checked:e[i.id]??!1,onChange:t=>{const l=t.currentTarget.checked;te.value={...e,[i.id]:l}}})," ",i.label]}),o("span",{class:`ac-badge ${r?"ac-badge--installed":"ac-badge--missing"}`,title:r?"Detected on this machine":"Not detected on this machine",children:r?"installed":"not installed"})]},i.id)})})]})}function Kc(){if(Ee.value)return o("p",{children:"Loading roles…"});if(ne.value!==null)return o("div",{class:"ac-wizard-step-stub",children:o("p",{class:"ac-banner ac-banner--error",children:["Discovery failed: ",ne.value]})});const e=ie.value,n=Ln.value,i=(r,t)=>{ie.value={...ie.value,[r]:t},il()};return o("div",{class:"ac-wizard-step-stub",children:[o("p",{children:["Pick the areas you work in. We use them to recommend capability packs on the next step, and they become your roles in",o("code",{children:" .agent-user.yml"}),"."]}),n.length===0?o("p",{children:o("em",{children:"No roles available in the manifest."})}):o("div",{class:"ac-wizard__pack-grid",children:n.map(r=>o("section",{class:"ac-pack-tile",children:[o("label",{class:"ac-pack-tile__head",children:[o("input",{type:"checkbox",checked:e[r.id]??!1,onChange:t=>{i(r.id,t.currentTarget.checked)}}),o("span",{class:"ac-pack-tile__title",children:r.label})]}),(r.example_roles??[]).length>0?o("p",{class:"ac-pack-tile__role",children:["e.g. ",(r.example_roles??[]).join(", ")]}):null,r.description!==""?o("p",{class:"ac-pack-tile__desc",children:r.description}):null]},r.id))})]})}function qc(){if(Ee.value)return o("p",{children:"Loading discovery manifest…"});if(ne.value!==null)return o("div",{class:"ac-wizard-step-stub",children:[o("p",{class:"ac-banner ac-banner--error",children:["Discovery failed: ",ne.value]}),o("p",{children:"The manifest endpoint is gated on extended-mode. Re-run the server with extended steps enabled to populate this list."})]});const e=K.value,n=new Set(Ei.value),i=new Map(Ln.value.map(s=>[s.id,s.label])),r=ie.value,t=s=>{const h=(s??[]).filter(p=>p!=="agent-config-maintainer");return h.length===0?null:o("span",{class:"ac-pack-tile__ws",children:h.map(p=>o("span",{class:`ac-badge ac-badge--ws${r[p]===!0?" ac-badge--ws-active":""}`,title:r[p]===!0?"Matches a role you picked":"Workspace / area",children:i.get(p)??p},p))})},l=Ti.value.filter(s=>s.id!=="engineering-base"),a=new Map;for(const s of l)if(s.cluster!==void 0){const h=a.get(s.cluster)??[];h.push(s),a.set(s.cluster,h)}const c=new Set(l.filter(s=>s.cluster!==void 0).map(s=>s.id)),u=l.filter(s=>!c.has(s.id)),d=(s,h)=>{ri.value=!0,K.value={...K.value,[s]:h}},f=(s,h)=>{ri.value=!0;const p={...K.value,[s]:h};if(h)for(const v of a.get(s)??[])p[v.id]===void 0&&(p[v.id]=!0);K.value=p};return o("div",{class:"ac-wizard-step-stub",children:[o("p",{children:"Pick the capability packs to install. Auto-detected packs are pre-selected; engineering hygiene is included automatically when a pack needs it. A language tile expands to its frameworks — turn the language off to skip them all."}),u.length===0?o("p",{children:o("em",{children:"No packs available in the manifest."})}):o("div",{class:"ac-wizard__pack-grid",children:u.map(s=>{const h=a.get(s.id)??[],p=h.length>0,v=e[s.id]??!1;return o("section",{class:"ac-pack-tile",children:[o("label",{class:"ac-pack-tile__head",children:[o("input",{type:"checkbox",checked:v,onChange:g=>{const b=g.currentTarget.checked;p?f(s.id,b):d(s.id,b)}}),o("span",{class:"ac-pack-tile__title",children:s.label}),n.has(s.id)?o("span",{class:"ac-badge ac-badge--installed",children:"auto-detected"}):null]}),t(s.workspaces),s.description!==""?o("p",{class:"ac-pack-tile__desc",children:s.description}):null,p?o("fieldset",{class:"ac-pack-tile__children",disabled:!v,children:h.map(g=>o("label",{class:"ac-pack-tile__child",children:[o("input",{type:"checkbox",checked:e[g.id]??!1,disabled:!v,onChange:b=>{d(g.id,b.currentTarget.checked)}}),o("span",{children:g.label})]},g.id))}):null]},s.id)})})]})}function Gc(){const e=Yt.value,n=Kt.value;return o("div",{class:"ac-rtk-row",children:[o("div",{class:"ac-rtk-row__head",children:[o("span",{class:"ac-rtk-row__label",children:["rtk ",o("small",{children:"(Rust Token Killer)"})]}),e===null?o("span",{class:"ac-badge ac-badge--missing",children:"detecting…"}):e?o("span",{class:"ac-badge ac-badge--installed",children:"installed"}):o("span",{class:"ac-badge ac-badge--missing",children:"not installed"})]}),e===!1?o("div",{class:"ac-rtk-row__install",children:[o("p",{class:"ac-field__description",children:"rtk wraps verbose CLI output for ~60–90% token savings. Install it, then re-open the wizard to pick up detection:"}),n!==null?o("code",{class:"ac-rtk-row__cmd",children:n}):null,o("a",{class:"ac-button",href:qt.value,target:"_blank",rel:"noreferrer noopener",children:"Open rtk repo"})]}):null]})}function Vc(){const e=On(re.value,{extended:M.value});if(M.value&&Oe.value==="install"&&e.id==="identity"&&!Ve.value)return o(Cc,{});if(e.kind==="form"){const i=mc(xi.value,e.paths??[]);return o(J,{children:[e.id==="identity"?o(Gc,{}):null,o(Bl,{schema:i,values:D.value,errors:he.value,onChange:r=>{D.value=r}})]})}return e.kind==="userMd"?!ii.value||E.value===null?o("p",{children:"Loading .agent-user.yml…"}):o(zl,{value:E.value,errors:he.value,hideRole:M.value&&Oe.value==="install",hideIdentityBasics:M.value&&Oe.value==="install",onChange:i=>{E.value=i,Nn.value=!1}}):e.kind==="welcome"?o(zc,{}):e.kind==="aiTools"?o(Yc,{}):e.kind==="roles"?o(Kc,{}):e.kind==="packs"?o(qc,{}):o(Ac,{steps:Vt(),currentIndex:re.value,changes:In.value,errors:he.value,userMdChanged:wn(),userMdAction:Ai.value?"replace":"create",loading:pn.value,onJump:i=>{ke(i)},selectedToolsCount:Object.values(te.value).filter(Boolean).length,selectedPacksCount:Object.values(K.value).filter(Boolean).length})}function Hn({path:e}){if(De(()=>{$c()},[]),!jt.value||xi.value===null)return o("div",{class:"ac-page",children:[o("h1",{children:"Setup wizard"}),Te.value!==null?o("p",{class:"ac-banner ac-banner--error",children:Te.value}):o("p",{children:"Loading…"})]});const n=re.value,i=Me(),r=On(n,{extended:M.value}),t=n===i-1,l=r.kind==="aiTools"&&Object.values(te.value).filter(Boolean).length===0||r.kind==="roles"&&Object.values(ie.value).filter(Boolean).length===0||r.kind==="packs"&&nl().length===0,a=M.value&&Oe.value==="install"&&r.id==="identity"&&!Ve.value,c=bn.value,u=c!==null&&!Gt.value,d=ti.value;return d!==null&&d.present&&!li.value?o("div",{class:"ac-page",children:o(Tc,{sourcePath:d.path,backupTarget:d.backupTarget,version:d.version,busy:ai.value,error:oi.value,onBackupAndProceed:()=>{Pc()},onAbort:()=>{P.value={tone:"info",message:"Aborted. Uninstall v3 manually, then re-run `agent-config install`."},li.value=!0}})}):o("div",{class:"ac-page",children:[o(yc,{step:r,index:n,total:i}),u?o(Sc,{abortedAt:c.abortedAt,abortNote:c.abortNote,writesSinceRollback:c.writesSinceRollback,busy:fn.value,onResume:()=>{Un("resume")},onRollback:()=>{Un("rollback")},onIgnore:()=>{Un("ignore")}}):null,P.value!==null?o("p",{class:`ac-banner${P.value.tone==="error"?" ac-banner--error":""}`,children:P.value.message}):null,o("div",{class:"ac-wizard__step",children:o(Vc,{})}),l?o("p",{class:"ac-wizard__hint",children:r.kind==="aiTools"?"Select at least one AI tool to continue.":r.kind==="roles"?"Select at least one role to continue.":"Select at least one capability pack to continue."}):null,o(bc,{canGoPrev:n>0,canGoNext:!t&&!l,canSkip:a||r.kind==="userMd",skipLabel:a?"Finish install here":"Skip",isLast:t,busy:fn.value||pn.value,canFinish:In.value.length>0||wn(),completed:Si.value,onPrev:()=>{ke(n-1)},onNext:()=>{if(a){Ve.value=!0;return}ke(n+1)},onSkip:()=>{if(a){Ve.value=!0,ke(Me()-1);return}Nn.value=!0,ke(n+1)},onFinish:()=>{Uc()}})]})}const kn=_(!1),ve=_(null);async function Jc(){hn.value=!0,vn.value=null;try{const e=await A("/api/v1/modules/detect");Ci.value=e.candidates,Wt.value=e.project_root;const n={};for(const i of e.candidates)n[i.path]=!0;_n.value=n,mn.value=e.proposed_block.enabled,gn.value=e.proposed_block.namespace_template??"",yn.value=e.proposed_block.agent_folder??"agents"}catch(e){vn.value=e instanceof $?G(e.body.error??{code:"UNKNOWN",message:e.message}):e instanceof Error?e.message:String(e)}finally{hn.value=!1,Ec.value=!0}}function Qc(){const e=new Set(Ci.value.map(r=>r.path)),n=_n.value,i=Object.keys(n).filter(r=>n[r]===!0&&e.has(r));return{enabled:mn.value,root_paths:i,namespace_template:gn.value,agent_folder:yn.value||"agents"}}async function Zc(){kn.value=!0,ve.value=null;try{const e=await A("/api/v1/modules/apply",{method:"POST",body:Qc()});ve.value={message:e.appliedTo!==null?`Saved project settings to ${e.appliedTo}.`:`Saved project settings to ${e.projectRoot}.`,tone:"success"}}catch(e){const n=e instanceof $?G(e.body.error??{code:"UNKNOWN",message:e.message}):e instanceof Error?e.message:String(e);ve.value={message:`Could not save project settings: ${n}`,tone:"error"}}finally{kn.value=!1}}function Xc(){if(hn.value)return o("p",{children:"Detecting module roots…"});if(vn.value!==null)return o("p",{class:"ac-banner ac-banner--error",children:["Module detection failed: ",vn.value]});const e=Ci.value,n=_n.value,i=Wt.value;return o("div",{class:"ac-section",children:[i!==null?o("p",{class:"ac-section__description",children:["Scanning ",o("code",{children:i}),". Pick which detected roots the agent should treat as modules. These write to",o("code",{children:" .agent-project-settings.yml"})," in this repo only."]}):null,o("label",{children:[o("input",{type:"checkbox",checked:mn.value,onChange:r=>{mn.value=r.currentTarget.checked}})," ","Enable module discovery (writes ",o("code",{children:"modules.enabled"}),")"]}),e.length===0?o("p",{children:[o("em",{children:"No module roots detected."})," The scan found no common module layouts (Laravel ",o("code",{children:"app/Modules/"}),", Symfony",o("code",{children:" src/Module/"}),", Node ",o("code",{children:"packages/"}),", Python",o("code",{children:" src/"}),", Go ",o("code",{children:"internal/"}),")."]}):o("ul",{style:"list-style: none; padding-left: 0;",children:e.map(r=>o("li",{children:o("label",{children:[o("input",{type:"checkbox",checked:n[r.path]??!1,onChange:t=>{const l=t.currentTarget.checked;_n.value={...n,[r.path]:l}}})," ",o("code",{children:r.path})," — ",r.stack," ",o("small",{children:["(",r.confidence," confidence)"]})]})},r.path))}),o("div",{class:"ac-wizard__module-fields",children:[o("div",{class:"ac-field",children:[o("label",{class:"ac-field__label",for:"ac-modules-namespace",children:"Namespace template"}),o("input",{id:"ac-modules-namespace",class:"ac-input",type:"text",value:gn.value,placeholder:"e.g. App\\\\Modules\\\\{ModuleName}\\\\App",onInput:r=>{gn.value=r.currentTarget.value}}),o("span",{class:"ac-field__description",children:"How a module path maps to its namespace. Leave blank to skip namespacing."})]}),o("div",{class:"ac-field",children:[o("label",{class:"ac-field__label",for:"ac-modules-agent-folder",children:"Agent folder"}),o("input",{id:"ac-modules-agent-folder",class:"ac-input",type:"text",value:yn.value,placeholder:"agents",onInput:r=>{yn.value=r.currentTarget.value}}),o("span",{class:"ac-field__description",children:["Folder name that holds per-module agent docs (default ",o("code",{children:"agents"}),")."]})]})]})]})}function es(){return De(()=>{Jc()},[]),o("div",{class:"ac-page",children:[o("header",{class:"ac-page__header",children:[o("h1",{children:"Project settings"}),o("p",{class:"ac-section__description",children:["Configuration scoped to this repository — written to",o("code",{children:" .agent-project-settings.yml"}),", not the global tree."]})]}),ve.value!==null?o("p",{class:`ac-banner ac-banner--${ve.value.tone==="success"?"success":"error"}`,children:ve.value.message}):null,o("section",{class:"ac-section",children:[o("h2",{class:"ac-section__title",children:"Modules"}),o(Xc,{})]}),o("div",{class:"ac-form__actions ac-wizard__nav",children:o("button",{type:"button",class:"ac-button ac-button--primary",disabled:kn.value||hn.value,onClick:()=>{Zc()},children:kn.value?"Saving…":"Save project settings"})})]})}const Je=_([]),xn=_([]),ci=_([]),si=_([]),An=_(null),rl=_(!1),Ne=_(null),Z=_(null),Wn=_("plain");async function ns(){Ne.value=null;try{const[e,n,i,r]=await Promise.all([A("/api/v1/workspace/roles"),A("/api/v1/workspace/sessions?limit=20"),A("/api/v1/workspace/knowledge?limit=20"),A("/api/v1/workspace/documents?limit=20")]);Je.value=e.roles,xn.value=n.sessions,ci.value=i.chunks,si.value=r.documents,rl.value=!0}catch(e){e instanceof $?Ne.value=e.body?.error?.message??e.message:Ne.value=e instanceof Error?e.message:String(e)}}async function is(e,n){Z.value=null;try{const i=await A("/api/v1/workspace/launch",{method:"POST",body:{role:e,task:n,host:"local"}});Z.value=`Started session ${i.id} (${i.role} · ${i.task}).`;const r=await A("/api/v1/workspace/sessions?limit=20");xn.value=r.sessions}catch(i){i instanceof $?Z.value=i.body?.error?.message??i.message:Z.value=i instanceof Error?i.message:String(i)}}function rs({role:e}){const n=An.value===e.slug;return o("button",{type:"button",class:`ac-workspace__role${n?" ac-workspace__role--active":""}`,"aria-current":n?"true":void 0,"aria-label":`Pick role ${e.display_name}`,onClick:()=>{An.value=e.slug,Z.value=null},children:[o("span",{class:"ac-workspace__role-name",children:e.display_name}),o("span",{class:"ac-workspace__role-status","data-status":e.status,children:e.status}),o("span",{class:"ac-workspace__role-tagline",children:e.tagline})]})}function ts({role:e}){return o("section",{class:"ac-workspace__tasks","aria-labelledby":"task-heading",children:[o("h2",{id:"task-heading",class:"ac-workspace__heading",children:["First tasks · ",e.display_name]}),e.first_tasks.length===0?o("p",{class:"ac-workspace__empty",children:"No tasks scaffolded yet for this role."}):o("ul",{class:"ac-workspace__task-list",children:e.first_tasks.map(n=>o("li",{class:"ac-workspace__task",children:[o("div",{class:"ac-workspace__task-head",children:[o("span",{class:"ac-workspace__task-name",children:n.name}),o("button",{type:"button",class:"ac-button ac-button--primary",onClick:()=>{is(e.slug,n.name)},children:"Start session"})]}),o("p",{class:"ac-workspace__task-intent",children:n.intent}),n.prompt!==""?o("code",{class:"ac-workspace__task-prompt",children:["prompts/",n.prompt]}):null]},n.name))}),e.skills.length>0?o("details",{class:"ac-workspace__skills",children:[o("summary",{children:["Skill shortlist (",e.skills.length,")"]}),o("ul",{class:"ac-workspace__skill-list",children:[e.skills.slice(0,5).map(n=>o("li",{class:"ac-workspace__skill",children:[o("code",{children:n.id})," — ",n.why]},n.id)),e.skills.length>5?o("li",{class:"ac-workspace__skill-more",children:["+ ",e.skills.length-5," more"]}):null]})]}):null]})}function ls(){return o("section",{class:"ac-workspace__sessions","aria-labelledby":"sessions-heading",children:[o("h2",{id:"sessions-heading",class:"ac-workspace__heading",children:"Recent sessions"}),xn.value.length===0?o("p",{class:"ac-workspace__empty",children:"No sessions yet — pick a role and start one."}):o("ul",{class:"ac-workspace__session-list",children:xn.value.map(e=>o("li",{class:"ac-workspace__session",children:[o("span",{class:"ac-workspace__session-id",children:e.id.slice(0,16)}),o("span",{class:"ac-workspace__session-role",children:e.role}),o("span",{class:"ac-workspace__session-task",children:e.task})]},e.id))})]})}function as(){return o("section",{class:"ac-workspace__knowledge","aria-labelledby":"knowledge-heading",children:[o("h2",{id:"knowledge-heading",class:"ac-workspace__heading",children:"Knowledge sources"}),ci.value.length===0?o("p",{class:"ac-workspace__empty",children:["No sources yet. Run ",o("code",{children:"/knowledge:ingest <path>"})," to add documents."]}):o("ol",{class:"ac-workspace__citation-list",children:ci.value.map((e,n)=>o("li",{class:"ac-workspace__citation",children:[o("span",{class:"ac-workspace__citation-marker","aria-label":`Citation ${n+1}`,children:["[",n+1,"]"]}),o("a",{href:`file://${e.source}`,class:"ac-workspace__citation-source",title:"Open source in OS default app",children:e.source.split("/").pop()??e.source}),e.pinned?o("span",{class:"ac-workspace__citation-pin","aria-label":"pinned",children:"★"}):null,o("p",{class:"ac-workspace__citation-excerpt",children:[e.excerpt.slice(0,200),e.excerpt.length>200?"…":""]})]},e.id))})]})}function os(){return o("section",{class:"ac-workspace__recent","aria-labelledby":"recent-heading",children:[o("h2",{id:"recent-heading",class:"ac-workspace__heading",children:"Recent documents"}),si.value.length===0?o("p",{class:"ac-workspace__empty",children:"No documents yet. Saved drafts land here."}):o("ul",{class:"ac-workspace__doc-list",children:si.value.map(e=>o("li",{class:"ac-workspace__doc",children:[o("span",{class:"ac-workspace__doc-type","data-type":e.type,children:e.type}),o("span",{class:"ac-workspace__doc-title",children:e.title}),o("time",{class:"ac-workspace__doc-time",dateTime:e.updated_at,children:e.updated_at.slice(0,10)})]},`${e.type}/${e.slug}`))})]})}function cs(){const e=Wn.value;return o("fieldset",{class:"ac-workspace__explain",children:[o("legend",{class:"ac-workspace__heading",children:"Explanation style"}),o("label",{class:"ac-workspace__explain-option",children:[o("input",{type:"radio",name:"explain-mode",value:"plain",checked:e==="plain",onChange:()=>{Wn.value="plain"},"aria-label":"Plain language"}),o("span",{children:"Plain language"})]}),o("label",{class:"ac-workspace__explain-option",children:[o("input",{type:"radio",name:"explain-mode",value:"technical",checked:e==="technical",onChange:()=>{Wn.value="technical"},"aria-label":"Technical detail"}),o("span",{children:"Technical detail"})]}),o("p",{class:"ac-workspace__explain-hint",children:e==="plain"?"Replies use everyday words. Toggle to see the technical view.":"Replies keep the technical vocabulary. Toggle for the plain view."})]})}function ss(){if(De(()=>{ns()},[]),Ne.value!==null)return o("div",{class:"ac-page ac-page--error",children:[o("h1",{children:"Workspace"}),o("p",{class:"ac-banner ac-banner--error",children:Ne.value})]});if(!rl.value)return o("div",{class:"ac-page",children:[o("h1",{children:"Workspace"}),o("p",{children:"Loading…"})]});const e=An.value!==null?Je.value.find(n=>n.slug===An.value)??null:null;return o("div",{class:"ac-page ac-workspace",children:[o("header",{class:"ac-page__header",children:[o("h1",{children:"Workspace"}),o("p",{class:"ac-page__subtitle",children:"Pick a role, pick a first task, run it."})]}),Z.value!==null?o("p",{class:"ac-banner",role:"status",children:Z.value}):null,o("div",{class:"ac-workspace__grid",children:[o("section",{class:"ac-workspace__roles","aria-labelledby":"roles-heading",children:[o("h2",{id:"roles-heading",class:"ac-workspace__heading",children:"Roles"}),Je.value.length===0?o("p",{class:"ac-workspace__empty",children:"No roles installed."}):o("div",{class:"ac-workspace__role-grid",children:Je.value.map(n=>o(rs,{role:n},n.slug))})]}),o("main",{class:"ac-workspace__main","aria-label":"Tasks and sessions",children:[e!==null?o(ts,{role:e}):o("p",{class:"ac-workspace__empty",children:"Pick a role on the left to see its first tasks."}),o(ls,{})]}),o("aside",{class:"ac-workspace__rail","aria-label":"Knowledge and documents",children:[o(as,{}),o(os,{}),o(cs,{})]})]})]})}const tl=[{id:"setup",label:"Setup",hashPath:"/setup",matches:["/setup","/wizard"]},{id:"project",label:"Projekt",hashPath:"/project",matches:["/project"]},{id:"tasks",label:"Tasks",hashPath:"/tasks",matches:["/tasks"]},{id:"council",label:"Council",hashPath:"/council",matches:["/council"]},{id:"memory",label:"Memory",hashPath:"/memory",matches:["/memory"]},{id:"explain",label:"Explain",hashPath:"/explain",matches:["/explain"]},{id:"workspace",label:"Workspace",hashPath:"/workspace",matches:["/workspace"]}];function us(e){for(const n of tl)for(const i of n.matches)if(e===i||e.startsWith(`${i}/`))return n.id;return null}function ds(){const e=de.value,n=us(e);return o("header",{class:"ac-topnav",children:o("div",{class:"ac-topnav__inner",children:[o("div",{class:"ac-topnav__brand",children:[o("h1",{class:"ac-topnav__title",children:"@event4u/agent-config"}),o("p",{class:"ac-topnav__subtitle",children:"Browser Wizard"})]}),o("nav",{class:"ac-topnav__tabs","aria-label":"Surfaces",children:tl.map(i=>o("button",{type:"button",class:`ac-topnav__tab${n===i.id?" ac-topnav__tab--active":""}`,"aria-current":n===i.id?"page":void 0,onClick:()=>Jn(i.hashPath),children:i.label},i.id))})]})})}function ze({name:e}){return o("div",{class:"ac-page",children:[o("header",{class:"ac-page__header",children:o("h1",{children:e})}),o("section",{class:"ac-section",children:[o("p",{class:"ac-section__description",children:["The ",o("strong",{children:e})," surface is currently served by the legacy installer GUI on port ",o("code",{children:"41100"}),". It is being ported to the modern shell in a follow-up phase (road-to-unified-setup § Phase 5)."]}),o("p",{class:"ac-section__description",children:["For now the legacy surface remains reachable via"," ",o("code",{children:"installer gui"}),"."]})]})]})}function fs({path:e}){return o("div",{class:"ac-page ac-page--error",children:[o("h1",{children:"Page not found"}),o("p",{children:["Nothing routed to ",o("code",{children:e}),". Try ",o("a",{href:"#/setup",children:"Setup"}),"."]})]})}function ps(){const e=ln.value;return e===null||e.dryRun!==!0?null:o("div",{class:"ac-dryrun-banner",role:"status","aria-live":"polite",children:[o("strong",{children:"DRY RUN"}),o("span",{children:" · no files will be written. Validation + rendering run normally; commits return a preview."})]})}function hs(e){return e==="/"||e==="/setup"||e.startsWith("/setup/")?o(Hn,{path:e}):e.startsWith("/wizard")?o(Hn,{path:e}):e==="/settings"||e.startsWith("/settings/")?o(Hn,{path:"/setup"}):e==="/project"||e.startsWith("/project/")?o(es,{}):e==="/tasks"?o(ze,{name:"Tasks"}):e==="/council"?o(ze,{name:"Council"}):e==="/memory"?o(ze,{name:"Memory"}):e==="/explain"?o(ze,{name:"Explain"}):e==="/workspace"?o(ss,{}):o(fs,{path:e})}function vs(){return De(()=>{Cl(),(de.value==="/"||de.value==="/settings"||de.value.startsWith("/settings/"))&&Jn("/setup"),Ol()},[]),o(J,{children:[o(ps,{}),o(ds,{}),hs(de.value)]})}const _s=3e4,ms=30*6e4;let Ye=null,vr=!1;function _r(e){if(!vr&&(vr=!0,!(typeof navigator>"u"||typeof navigator.sendBeacon!="function")))try{navigator.sendBeacon(`/api/v1/shutdown?token=${encodeURIComponent(e)}`)}catch{}}function gs(e){if(typeof window>"u")return()=>{};let n=Date.now();const i=()=>{n=Date.now()},r=["pointerdown","keydown","wheel","touchstart"];for(const c of r)window.addEventListener(c,i,{passive:!0});const t=()=>{document.hidden||i()};document.addEventListener("visibilitychange",t);const l=()=>{Ye!==null&&clearInterval(Ye),Ye=null;for(const c of r)window.removeEventListener(c,i);document.removeEventListener("visibilitychange",t),window.removeEventListener("pagehide",a)};Ye=setInterval(()=>{if(!document.hidden){if(Date.now()-n>ms){_r(e),l();return}A("/api/v1/ping").catch(()=>{})}},_s);function a(){_r(e)}return window.addEventListener("pagehide",a),l}function ys(){return new URLSearchParams(window.location.search).get("token")}function bs(){const e=document.getElementById("app");if(e===null)return;const n=ys();if(n===null){e.textContent="agent-config UI · missing token — re-open via `agent-config ui:serve`.";return}Tl(n),gs(n),e.textContent="",fl(o(vs,{}),e)}bs();
40
- //# sourceMappingURL=index-Tk7lkVH8.js.map
39
+ `:""}var Zo=Qo,Xo={dump:Zo};function ki(e,n){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+n+" instead, which is now safe by default.")}}var ec=N,nc=Qr,ic=nt,rc=at,tc=ot,lc=gi,ac=St.load,oc=St.loadAll,cc=Xo.dump,sc=F,uc={binary:ft,float:lt,map:et,null:it,pairs:ht,set:vt,timestamp:ut,bool:rt,int:tt,merge:dt,omap:pt,seq:Xr,str:Zr},dc=ki("safeLoad","load"),fc=ki("safeLoadAll","loadAll"),pc=ki("safeDump","dump"),hc={Type:ec,Schema:nc,FAILSAFE_SCHEMA:ic,JSON_SCHEMA:rc,CORE_SCHEMA:tc,DEFAULT_SCHEMA:lc,load:ac,loadAll:oc,dump:cc,YAMLException:sc,types:uc,safeLoad:dc,safeLoadAll:fc,safeDump:pc};function vc(e){if(e.trim()==="")return{};const i=hc.load(e);if(i==null)return{};if(typeof i!="object"||Array.isArray(i))throw new Error(".agent-user.yml must parse to an object");return i}const sr={id:"welcome",title:"Welcome — who are you?",navLabel:"You",subtitle:"Your name and language. Stored in .agent-user.yml; we pre-fill what we can detect.",kind:"welcome"},_c=[{id:"ai-tools",title:"Which AI tools do you use?",navLabel:"AI tools",subtitle:"Pick the editors and CLIs that should pick up this config. Auto-detect runs first; you can override.",kind:"aiTools"},{id:"roles",title:"What do you work on?",navLabel:"Roles",subtitle:"Pick the areas you work in. We use them to recommend capability packs on the next step, and they become your roles in .agent-user.yml.",kind:"roles"},{id:"packs",title:"Which capability packs do you want?",navLabel:"Packs",subtitle:"Founder-strategy, finance-basic, gtm-sales, ops-people, ai-video — pick zero or more. You can change this later.",kind:"packs"}],ur=[{id:"identity",title:"Editor and tooling",navLabel:"Editor",subtitle:"IDE goes into .agent-settings.yml so the agent opens files in the right tool. rtk presence is auto-detected (see the rtk row). Your name lives in .agent-user.yml (later step).",kind:"form",paths:["personal.ide","personal.open_edited_files"]},{id:"personality",title:"How should the agent behave?",navLabel:"Personality",subtitle:"Autonomy, output verbosity, and PR-comment style.",kind:"form",paths:["personal.autonomy","personal.minimal_output","personal.play_by_play","personal.pr_comment_bot_icon"]},{id:"cost",title:"Cost profile and budgets",navLabel:"Cost",subtitle:"Master switch for which rule tiers load, optional spending ceilings, and per-skill model auto-switch.",kind:"form",paths:["cost_profile","cost.budgets.daily","cost.budgets.weekly","cost.budgets.monthly","cost.enforcement","model.auto_switch"]},{id:"roadmap-quality",title:"Roadmap & quality cadence",navLabel:"Roadmap & quality",subtitle:"When the agent runs quality tools and refreshes roadmap dashboards.",kind:"form",paths:["roadmap.quality_cadence","roadmap.dashboard_regen_cadence","quality.local_auto_run","quality.wait_for_remote_ci"]},{id:"memory",title:"Memory & redaction",navLabel:"Memory",subtitle:"Inline-review threshold and transcript-redaction regexes.",kind:"form",paths:["memory.review_threshold","memory.redact_patterns"]},{id:"user-md",title:"Your .agent-user.yml",navLabel:"User profile",subtitle:"Identity, voice, preferences. Stored at agents/settings/.agent-user.yml. Skip to leave empty.",kind:"userMd"},{id:"review",title:"Review & finish",navLabel:"Review",subtitle:"These keys will change. Confirm to write .agent-settings.yml and .agent-user.yml atomically.",kind:"review"}];function Mt(e={}){return e.extended===!0?[sr,..._c,...ur]:[sr,...ur]}function On(e,n={}){const i=Mt(n),r=Math.max(0,Math.min(i.length-1,e));return i[r]}function mc(e,n){const i={type:"object",properties:{},...e.description!==void 0?{description:e.description}:{}},r=i.properties,t=e.properties??{};for(const l of n){const a=l.split(".").filter(j=>j.length>0);if(a.length===0)continue;const[c,u,d]=a;if(c===void 0)continue;const f=t[c];if(f===void 0)continue;if(u===void 0){r[c]=f;continue}const s=f.properties?.[u];if(s===void 0)continue;const p=r[c]??{type:"object",properties:{},...f.description!==void 0?{description:f.description}:{}},v=p.properties??={};if(d===void 0){v[u]=s,r[c]=p;continue}const g=s.properties?.[d];if(g===void 0)continue;const w=v[u]??{type:"object",properties:{},...s.description!==void 0?{description:s.description}:{}},m=w.properties??={};m[d]=g,v[u]=w,r[c]=p}return i}function gc({current:e,total:n}){const i=Math.max(1,n),r=Math.max(0,Math.min(i-1,e)),t=Array.from({length:i},(a,c)=>c<=r),l=Math.round((r+1)/i*100);return o("div",{class:"ac-wizard__progress",role:"progressbar","aria-valuenow":r+1,"aria-valuemin":1,"aria-valuemax":i,"aria-valuetext":`Step ${r+1} of ${i} (${l}%)`,children:t.map((a,c)=>o("span",{class:`ac-wizard__progress-segment${a?" ac-wizard__progress-segment--filled":""}`,"aria-hidden":"true"},c))})}function yc({step:e,index:n,total:i}){return o("header",{class:"ac-page__header ac-wizard__header",children:[o("p",{class:"ac-wizard__step-count",children:["Step ",n+1," of ",i]}),o("div",{class:"ac-wizard__header-text",children:[o("h1",{children:e.title}),o("p",{class:"ac-wizard__subtitle",children:e.subtitle})]}),o(gc,{current:n,total:i})]})}function bc(e){const n=e.canFinish??!0,i=e.completed??!1;return o("div",{class:"ac-form__actions ac-wizard__nav",children:[o("button",{type:"button",class:"ac-button",disabled:!e.canGoPrev||e.busy,onClick:e.onPrev,children:"Back"}),e.canSkip&&e.onSkip!==void 0?o("button",{type:"button",class:"ac-button ac-wizard__skip",disabled:e.busy,onClick:e.onSkip,children:e.skipLabel??"Skip"}):null,e.isLast?i?null:o("button",{type:"button",class:"ac-button ac-button--primary",disabled:e.busy||!n,onClick:e.onFinish,children:e.busy?"Saving…":"Finish & save"}):o("button",{type:"button",class:"ac-button ac-button--primary",disabled:!e.canGoNext||e.busy,onClick:e.onNext,children:e.nextLabel??"Next"})]})}function Dt(e,n){return e.kind!=="form"||e.paths===void 0?!1:!!(e.paths.includes(n)||e.id==="cost"&&(n.startsWith("telegraph.")||n.startsWith("verbosity.")))}function wc(e,n){return e.kind==="userMd"?n==="body"||n.startsWith("body."):Dt(e,n)}function kc(e,n){for(const i of Object.keys(n.errors))if(wc(e,i))return!0;return!1}function xc(e,n){if(kc(e,n))return{label:"needs attention",tone:"error"};if(e.kind==="userMd")return n.userMdChanged?{label:n.userMdAction==="create"?"will create":"will replace",tone:"changed"}:{label:"",tone:"idle"};if(e.kind==="form"){const i=n.changes.filter(r=>Dt(e,r.path)).length;return i===0?{label:"",tone:"idle"}:{label:`${i} change${i===1?"":"s"}`,tone:"changed"}}if(e.kind==="aiTools"){const i=n.selectedToolsCount??0;return i===0?{label:"",tone:"idle"}:{label:`${i} tool${i===1?"":"s"}`,tone:"changed"}}if(e.kind==="packs"){const i=n.selectedPacksCount??0;return i===0?{label:"",tone:"idle"}:{label:`${i} pack${i===1?"":"s"}`,tone:"changed"}}return{label:"",tone:"idle"}}function Ac(e){const n=e.steps.filter((i,r)=>r!==e.currentIndex);return o(J,{children:o("nav",{class:"ac-wizard__review-nav","aria-label":"Jump back to a step",children:[o("p",{class:"ac-wizard__review-nav-label",children:"Jump back to a step:"}),o("ul",{class:"ac-wizard__review-nav-list",children:n.map(i=>{const r=e.steps.indexOf(i),t=xc(i,e),l=t.tone==="error"?"ac-wizard__review-nav-button ac-wizard__review-nav-button--error":"ac-wizard__review-nav-button";return o("li",{children:o("button",{type:"button",class:l,onClick:()=>{e.onJump(r)},children:[o("span",{class:"ac-wizard__review-nav-index",children:r+1}),o("span",{class:"ac-wizard__review-nav-text",children:i.navLabel}),t.label!==""?o("span",{class:`ac-wizard__review-nav-status ac-wizard__review-nav-status--${t.tone}`,children:t.label}):null]})},i.id)})})]})})}function Sc(e){const n=e.abortedAt??"unknown time",i=e.abortNote??"no further detail recorded",r=e.writesSinceRollback;return o("aside",{class:"ac-banner ac-banner--recovery",role:"alert",children:[o("strong",{children:"Previous install was interrupted."}),o("p",{children:["Aborted at ",o("code",{children:n})," — ",i,". ",r," write",r===1?"":"s"," landed before the abort marker."]}),o("p",{children:"Pick how to recover before continuing. Resume reopens the wizard fresh, Rollback discards the abort state, Ignore hides this banner without touching the log."}),o("div",{class:"ac-banner__actions",children:[o("button",{type:"button",disabled:e.busy,onClick:()=>e.onResume(),children:"Resume install"}),o("button",{type:"button",disabled:e.busy,onClick:()=>e.onRollback(),children:"Rollback"}),o("button",{type:"button",disabled:e.busy,onClick:()=>e.onIgnore(),children:"Ignore"})]})]})}function Cc(){return o("section",{class:"ac-continue-screen","aria-labelledby":"ac-continue-title",children:[o("h2",{id:"ac-continue-title",children:"Install complete — continue with setup?"}),o("p",{children:"Your install selections (AI tools, roles, capability packs) are captured. Use the footer to continue:"}),o("ul",{children:[o("li",{children:[o("strong",{children:"Next"})," — go through the remaining personalisation steps: editor + tooling, personality, cost profile, roadmap & quality, memory, your",o("code",{children:" .agent-user.yml"}),", and finally the project module roots."]}),o("li",{children:[o("strong",{children:"Finish install here"})," — skip the rest and write ",o("code",{children:".agent-settings.yml"})," with the install-only selections. You can re-run ",o("code",{children:"agent-config setup"}),"later to pick up the personalisation steps."]})]})]})}function Tc(e){const n=e.version??"unknown";return o("section",{class:"ac-backup-screen","aria-labelledby":"ac-backup-title",children:[o("h2",{id:"ac-backup-title",children:"Existing v3 install detected"}),o("p",{children:["Found a v3.x install at ",o("code",{children:e.sourcePath})," ","(VERSION: ",o("code",{children:n}),"). v4 is a hard-cut release with no auto-migration — settings, identity, and history layouts changed. The wizard can back up the v3 tree before writing the v4 layout so you can roll back manually if needed."]}),e.error!==null?o("p",{class:"ac-banner ac-banner--error",children:["Backup failed: ",e.error]}):null,o("ul",{children:[o("li",{children:[o("strong",{children:"Backup v3 and proceed"})," — copies the tree to ",o("code",{children:e.backupTarget}),", then runs the v4 install. Restore later with",o("code",{children:[" mv ",e.backupTarget," ",e.sourcePath]}),"."]}),o("li",{children:[o("strong",{children:"Abort, uninstall v3 first"})," — closes the wizard. You decide what to keep."]})]}),o("div",{class:"ac-backup-screen__actions",children:[o("button",{type:"button",class:"ac-button ac-button--primary",disabled:e.busy,onClick:()=>e.onBackupAndProceed(),children:e.busy?"Backing up…":"Backup v3 and proceed"}),o("button",{type:"button",class:"ac-button",disabled:e.busy,onClick:()=>e.onAbort(),children:"Abort, uninstall v3 first"})]})]})}const jt=_(!1),Te=_(null),P=_(null),fn=_(!1),pn=_(!1),re=_(0),xi=_(null),D=_({}),Bt=_({}),Ut=_(0),he=_({}),E=_(null),ee=_(null),Ai=_(!1),ii=_(!1),Nn=_(!1),Ht=_({}),In=_([]);_("global");const Si=_(!1),M=_(!1),Ec=_(!1),hn=_(!1),vn=_(null),Ci=_([]),_n=_({}),mn=_(!0),gn=_(""),yn=_("agents");_(!1);const Wt=_(null),Oc=[{id:"claude-code",label:"Claude Code"},{id:"claude-desktop",label:"Claude Desktop"},{id:"cursor",label:"Cursor"},{id:"windsurf",label:"Windsurf"},{id:"cline",label:"Cline"},{id:"gemini-cli",label:"Gemini CLI"},{id:"copilot",label:"GitHub Copilot"},{id:"augment",label:"Augment"},{id:"aider",label:"Aider"},{id:"codex",label:"Codex"},{id:"roocode",label:"Roo Code"},{id:"continue",label:"Continue"},{id:"kilocode",label:"Kilo Code"},{id:"zed",label:"Zed"},{id:"jetbrains",label:"JetBrains"},{id:"kiro",label:"Kiro"},{id:"qoder",label:"Qoder"},{id:"opencode",label:"OpenCode"},{id:"trae",label:"Trae"},{id:"antigravity",label:"Antigravity"},{id:"codebuddy",label:"CodeBuddy"},{id:"droid",label:"Droid"},{id:"warp",label:"Warp"}],dr=_(!1),Ee=_(!1),ne=_(null),Ti=_([]),Ei=_([]),Ln=_([]),ie=_({}),fr=_(!1),Bn=_(!1),zt=_({}),pr=_(!1),Yt=_(null),Kt=_(null),qt=_("https://github.com/event4u-app/rtk");_(!1);_(null);_([]);_({});_({});const te=_({}),K=_({}),ri=_(!1),hr=_(!1);_({});_(null);_(null);_(!1);_(null);const bn=_(null),Gt=_(!1),ti=_(null),li=_(!1),ai=_(!1),oi=_(null),Oe=_(null),Ve=_(!1);function Vt(){return Mt({extended:M.value})}function Me(){return Vt().length}function Nc(e){return e??new Date().toISOString()}function Oi(e){return Math.max(0,Math.min(Me()-1,e))}function Ic(e){if("$ref"in e&&e.$ref!==void 0&&"definitions"in e&&e.definitions!==void 0){const n=e.$ref.replace("#/definitions/",""),i=e.definitions[n];if(i!==void 0)return i}return e}async function Lc(){try{return await A("/api/v1/settings")}catch(e){if(e instanceof $&&e.status===404&&e.body.error?.code==="NOT_FOUND"){const n=e.body;if(n.defaults!==void 0&&n.schema!==void 0)return{values:n.defaults,lastModified:n.lastModified??0,path:n.path??".agent-settings.yml",schema:n.schema};const i=await A("/api/v1/schema");return{values:{},lastModified:0,path:".agent-settings.yml",schema:i.settings}}throw e}}async function Fc(){try{const e=await A("/api/v1/install/recovery");bn.value=e.incomplete?e:null}catch{bn.value=null}}async function Rc(){try{const e=await A("/api/v1/install/legacy-v3");ti.value=e.present?e:null}catch{ti.value=null}}async function Pc(){ai.value=!0,oi.value=null;try{await A("/api/v1/install/backup-v3",{method:"POST"}),li.value=!0}catch(e){oi.value=e instanceof $?G(e.body.error??{code:"UNKNOWN",message:e.message}):e instanceof Error?e.message:String(e)}finally{ai.value=!1}}async function Un(e){try{await A("/api/v1/install/recovery/dismiss",{method:"POST",body:{reason:e}})}catch(n){P.value={message:n instanceof Error?n.message:String(n),tone:"error"};return}bn.value=null,Gt.value=!0}async function $c(){Te.value=null;try{Fc(),Rc();const[e,n]=await Promise.all([A("/api/v1/wizard/state"),Lc()]);xi.value=Ic(n.schema),Ut.value=n.lastModified,Bt.value=n.values,Ht.value=n.legacyHints??{},M.value=e.extendedSteps===!0,Oe.value=e.wizardMode??null;const i=Object.keys(e.partial??{});D.value=i.length>0?{...n.values,...e.partial}:n.values,re.value=Oi(e.step),Si.value=!1,jt.value=!0;const r=On(re.value,{extended:M.value});(r.kind==="welcome"||r.kind==="userMd"||r.kind==="review")&&Jt(),(r.kind==="roles"||r.kind==="aiTools"||r.kind==="packs")&&Qt(),r.kind==="aiTools"&&Zt(),r.id==="identity"&&Xt(),r.kind==="review"&&el()}catch(e){e instanceof $?Te.value=G(e.body.error??{code:"UNKNOWN",message:e.message}):Te.value=e instanceof Error?e.message:String(e)}}function Mc(e,n){return e.identity.name.trim()!==""?e:{...e,identity:{...e.identity,name:n}}}async function Jt(){if(!ii.value)try{const e=await A("/api/v1/user-md");if(Ai.value=e.exists,e.exists&&e.identity!==null){const n=qi(e.identity);ee.value=n,E.value=n}else{let n;try{const r=await A("/api/v1/user-md/template");n=qi(vc(r.body))}catch{n=Gr()}const i=Ht.value.user_name;typeof i=="string"&&i.trim()!==""&&(n=Mc(n,i)),ee.value=n,E.value=n}}catch(e){P.value={message:e instanceof Error?e.message:String(e),tone:"error"}}finally{ii.value=!0}}const Dc=new Set(["python"]);async function Qt(){if(!(dr.value||Ee.value)){Ee.value=!0,ne.value=null;try{const[e,n]=await Promise.all([A("/api/v1/wizard/manifest"),A("/api/v1/wizard/auto-detect")]),i=(e.packs??[]).map(l=>({id:l.id,label:l.label??l.id,description:l.description??"",requires_hint:l.requires_hint,cluster:l.cluster??void 0,workspaces:l.workspaces}));Ti.value=i,Ln.value=(e.workspaces??[]).filter(l=>l.id!=="agent-config-maintainer").map(l=>({id:l.id,label:l.label??l.id,description:l.description??"",default_packs:l.default_packs??[],optional_packs:l.optional_packs??[],...l.example_roles!==void 0?{example_roles:l.example_roles}:{}}));const r=new Set(i.map(l=>l.id)),t=n.signals.map(l=>l.id.startsWith("pack-")?l.id.slice(5):l.id).filter(l=>r.has(l)).filter(l=>!Dc.has(l));Ei.value=t}catch(e){e instanceof $?ne.value=G(e.body.error??{code:"UNKNOWN",message:e.message}):ne.value=e instanceof Error?e.message:String(e)}finally{Ee.value=!1,dr.value=!0}}}async function Zt(){if(!(fr.value||Bn.value)){Bn.value=!0;try{const e=await A("/api/v1/wizard/detect-tools"),n=e.tools??{},i=e.configured??[];if(zt.value=n,Object.keys(te.value).length===0){const r={};if(i.length>0)for(const t of i)r[t]=!0;else for(const[t,l]of Object.entries(n))l&&(r[t]=!0);te.value=r}}catch{}finally{Bn.value=!1,fr.value=!0}}}async function Xt(){if(!pr.value){pr.value=!0;try{const e=await A("/api/v1/wizard/detect-rtk"),n=e.installed===!0;Yt.value=n,Kt.value=e.installCommand??null,typeof e.repo=="string"&&(qt.value=e.repo);const i=D.value.personal??{};D.value={...D.value,personal:{...i,rtk_installed:n}}}catch{}}}async function jc(e,n){try{await A("/api/v1/wizard/state",{method:"POST",body:{step:e,totalSteps:Me(),partial:n,startedAt:Nc(null)}})}catch(i){P.value={message:i instanceof Error?i.message:String(i),tone:"error"}}}async function el(){pn.value=!0;try{const e=await A("/api/v1/settings/diff",{method:"POST",body:{values:D.value,ifUnmodifiedSince:Ut.value}});In.value=e.changes,he.value={}}catch(e){e instanceof $?(he.value=Wr(e.body.error??{message:e.message}),P.value={message:G(e.body.error??{code:"UNKNOWN",message:e.message}),tone:"error"}):P.value={message:e instanceof Error?e.message:String(e),tone:"error"}}finally{pn.value=!1}}function wn(){return Nn.value?!1:E.value===null||ee.value===null?E.value!==ee.value:JSON.stringify(E.value)!==JSON.stringify(ee.value)}async function ke(e){const n=Oi(e);await jc(n,D.value),re.value=n,P.value=null;const i=On(n,{extended:M.value});(i.kind==="welcome"||i.kind==="userMd")&&Jt(),(i.kind==="roles"||i.kind==="aiTools"||i.kind==="packs")&&Qt(),i.kind==="packs"&&il(),i.kind==="aiTools"&&Zt(),i.id==="identity"&&Xt(),i.kind==="review"&&el()}function nl(){const e=K.value,n=new Map(Ti.value.map(l=>[l.id,l])),i=Object.entries(e).filter(([,l])=>l===!0).map(([l])=>l).filter(l=>{const a=n.get(l)?.cluster;return a===void 0||e[a]===!0}),r=new Set,t=l=>{if(!r.has(l)){r.add(l);for(const a of n.get(l)?.requires_hint??[])t(a)}};for(const l of i)t(l);return[...r].sort()}function il(){if(ri.value)return;const e=Object.entries(ie.value).filter(([,r])=>r===!0).map(([r])=>r),n=new Map(Ln.value.map(r=>[r.id,r])),i={};for(const r of e)for(const t of n.get(r)?.default_packs??[])i[t]=!0;for(const r of Ei.value)i[r]=!0;K.value=i}function Bc(){const e=Object.entries(te.value).filter(([,r])=>r===!0).map(([r])=>r);if(e.length===0)return null;const n=nl();return{schema_version:"wizard-v2",tools:e,packs:n,settings:D.value}}async function Uc(){fn.value=!0,P.value=null;try{const e={settings:D.value},n=Object.entries(ie.value).filter(([,u])=>u===!0).map(([u])=>u),i=E.value!==null&&typeof E.value.identity?.name=="string"&&E.value.identity.name.trim().length>0;E.value!==null&&i&&(wn()||n.length>0)&&(e.identity=n.length>0?{...E.value,role:n}:E.value);const r=await A("/api/v1/wizard/finish",{method:"POST",body:e}),t="You can close this browser window now.",l=r.dryRun===!0?"Dry-run complete — no files written. Settings would be saved.":Array.isArray(r.writtenPaths)?`Saved (${r.writtenPaths.join(", ")}). Wizard complete.`:"Wizard complete.",a=M.value?Bc():null;let c="";if(a!==null)try{let u=null;await El("/api/v1/wizard/apply",a,s=>{s.type==="error"&&(u=typeof s.message=="string"?s.message:"install failed")});const d=a.tools.length,f=a.packs.length;c=u!==null?` Installer failed: ${u}. Settings were saved; re-run the wizard to retry.`:` Installer applied ${d} tool${d===1?"":"s"}`+(f>0?` and ${f} pack${f===1?"":"s"}.`:".")}catch(u){c=` Installer bridge failed: ${u instanceof $?G(u.body.error??{code:"UNKNOWN",message:u.message}):u instanceof Error?u.message:String(u)}. Settings were saved; re-run the wizard to retry the install plan.`}P.value={message:`${l}${c} ${t}`,tone:"success"},re.value=Oi(Me()-1),Bt.value=D.value,ee.value=wn()?E.value:ee.value,In.value=[],Si.value=!0}catch(e){e instanceof $?(he.value=Wr(e.body.error??{message:e.message}),P.value={message:G(e.body.error??{code:"UNKNOWN",message:e.message}),tone:"error"}):P.value={message:e instanceof Error?e.message:String(e),tone:"error"}}finally{fn.value=!1}}const Hc=["de","en","en-US","en-GB","fr","es","it","nl","pt","pt-BR"];function Wc(){if(hr.value)return;const e=E.value;if(e===null)return;hr.value=!0;let n=e;if(e.identity.name.trim()===""){const i=ln.value?.systemUser;i!==void 0&&i.trim()!==""&&(n={...n,identity:{...n.identity,name:i}})}if(!Ai.value&&typeof navigator<"u"){const i=(navigator.language||"").split("-")[0];i.length>=2&&(n={...n,language:i})}n!==e&&(E.value=n)}function zc(){const e=E.value;if(De(()=>{Wc()},[e]),e===null)return o("p",{children:"Loading…"});const n=i=>{E.value={...i,last_updated:new Date().toISOString().slice(0,10)},Nn.value=!1};return o("div",{class:"ac-wizard-step-stub ac-wizard__module-fields",children:[o("p",{children:["Tell the agent who you are. We pre-filled what we could detect — adjust freely. Stored in ",o("code",{children:".agent-user.yml"}),"."]}),o("div",{class:"ac-field",children:[o("label",{class:"ac-field__label",for:"welcome-name",children:"Name"}),o("input",{class:"ac-input",id:"welcome-name",type:"text",placeholder:"How should the agent address you?",value:e.identity.name,onInput:i=>n({...e,identity:{...e.identity,name:i.currentTarget.value}})})]}),o("div",{class:"ac-field",children:[o("label",{class:"ac-field__label",for:"welcome-lang",children:"Language"}),o("input",{class:"ac-input",id:"welcome-lang",type:"text",list:"welcome-lang-list",placeholder:"BCP-47 code, e.g. de, en, en-US",value:e.language,onInput:i=>n({...e,language:i.currentTarget.value})}),o("datalist",{id:"welcome-lang-list",children:Hc.map(i=>o("option",{value:i},i))})]})]})}function Yc(){const e=te.value,n=zt.value;return o("div",{class:"ac-wizard-step-stub",children:[o("p",{children:"Pick the AI tools you use. Tools detected on this machine are pre-selected on first run. The installer wires each selected tool's surface (skills, rules, commands) on apply; you can change this list later by re-running the wizard."}),o("ul",{class:"ac-wizard__tool-list",children:Oc.map(i=>{const r=n[i.id]===!0;return o("li",{class:"ac-wizard__tool-row",children:[o("label",{class:"ac-wizard__tool-label",children:[o("input",{type:"checkbox",checked:e[i.id]??!1,onChange:t=>{const l=t.currentTarget.checked;te.value={...e,[i.id]:l}}})," ",i.label]}),o("span",{class:`ac-badge ${r?"ac-badge--installed":"ac-badge--missing"}`,title:r?"Detected on this machine":"Not detected on this machine",children:r?"installed":"not installed"})]},i.id)})})]})}function Kc(){if(Ee.value)return o("p",{children:"Loading roles…"});if(ne.value!==null)return o("div",{class:"ac-wizard-step-stub",children:o("p",{class:"ac-banner ac-banner--error",children:["Discovery failed: ",ne.value]})});const e=ie.value,n=Ln.value,i=(r,t)=>{ie.value={...ie.value,[r]:t},il()};return o("div",{class:"ac-wizard-step-stub",children:[o("p",{children:["Pick the areas you work in. We use them to recommend capability packs on the next step, and they become your roles in",o("code",{children:" .agent-user.yml"}),"."]}),n.length===0?o("p",{children:o("em",{children:"No roles available in the manifest."})}):o("div",{class:"ac-wizard__pack-grid",children:n.map(r=>o("section",{class:"ac-pack-tile",children:[o("label",{class:"ac-pack-tile__head",children:[o("input",{type:"checkbox",checked:e[r.id]??!1,onChange:t=>{i(r.id,t.currentTarget.checked)}}),o("span",{class:"ac-pack-tile__title",children:r.label})]}),(r.example_roles??[]).length>0?o("p",{class:"ac-pack-tile__role",children:["e.g. ",(r.example_roles??[]).join(", ")]}):null,r.description!==""?o("p",{class:"ac-pack-tile__desc",children:r.description}):null]},r.id))})]})}function qc(){if(Ee.value)return o("p",{children:"Loading discovery manifest…"});if(ne.value!==null)return o("div",{class:"ac-wizard-step-stub",children:[o("p",{class:"ac-banner ac-banner--error",children:["Discovery failed: ",ne.value]}),o("p",{children:"The manifest endpoint is gated on extended-mode. Re-run the server with extended steps enabled to populate this list."})]});const e=K.value,n=new Set(Ei.value),i=new Map(Ln.value.map(s=>[s.id,s.label])),r=ie.value,t=s=>{const h=(s??[]).filter(p=>p!=="agent-config-maintainer");return h.length===0?null:o("span",{class:"ac-pack-tile__ws",children:h.map(p=>o("span",{class:`ac-badge ac-badge--ws${r[p]===!0?" ac-badge--ws-active":""}`,title:r[p]===!0?"Matches a role you picked":"Workspace / area",children:i.get(p)??p},p))})},l=Ti.value.filter(s=>s.id!=="engineering-base"),a=new Map;for(const s of l)if(s.cluster!==void 0){const h=a.get(s.cluster)??[];h.push(s),a.set(s.cluster,h)}const c=new Set(l.filter(s=>s.cluster!==void 0).map(s=>s.id)),u=l.filter(s=>!c.has(s.id)),d=(s,h)=>{ri.value=!0,K.value={...K.value,[s]:h}},f=(s,h)=>{ri.value=!0;const p={...K.value,[s]:h};if(h)for(const v of a.get(s)??[])p[v.id]===void 0&&(p[v.id]=!0);K.value=p};return o("div",{class:"ac-wizard-step-stub",children:[o("p",{children:"Pick the capability packs to install. Auto-detected packs are pre-selected; engineering hygiene is included automatically when a pack needs it. A language tile expands to its frameworks — turn the language off to skip them all."}),u.length===0?o("p",{children:o("em",{children:"No packs available in the manifest."})}):o("div",{class:"ac-wizard__pack-grid",children:u.map(s=>{const h=a.get(s.id)??[],p=h.length>0,v=e[s.id]??!1;return o("section",{class:"ac-pack-tile",children:[o("label",{class:"ac-pack-tile__head",children:[o("input",{type:"checkbox",checked:v,onChange:g=>{const b=g.currentTarget.checked;p?f(s.id,b):d(s.id,b)}}),o("span",{class:"ac-pack-tile__title",children:s.label}),n.has(s.id)?o("span",{class:"ac-badge ac-badge--installed",children:"auto-detected"}):null]}),t(s.workspaces),s.description!==""?o("p",{class:"ac-pack-tile__desc",children:s.description}):null,p?o("fieldset",{class:"ac-pack-tile__children",disabled:!v,children:h.map(g=>o("label",{class:"ac-pack-tile__child",children:[o("input",{type:"checkbox",checked:e[g.id]??!1,disabled:!v,onChange:b=>{d(g.id,b.currentTarget.checked)}}),o("span",{children:g.label})]},g.id))}):null]},s.id)})})]})}function Gc(){const e=Yt.value,n=Kt.value;return o("div",{class:"ac-rtk-row",children:[o("div",{class:"ac-rtk-row__head",children:[o("span",{class:"ac-rtk-row__label",children:["rtk ",o("small",{children:"(Rust Token Killer)"})]}),e===null?o("span",{class:"ac-badge ac-badge--missing",children:"detecting…"}):e?o("span",{class:"ac-badge ac-badge--installed",children:"installed"}):o("span",{class:"ac-badge ac-badge--missing",children:"not installed"})]}),e===!1?o("div",{class:"ac-rtk-row__install",children:[o("p",{class:"ac-field__description",children:"rtk wraps verbose CLI output for ~60–90% token savings. Install it, then re-open the wizard to pick up detection:"}),n!==null?o("code",{class:"ac-rtk-row__cmd",children:n}):null,o("a",{class:"ac-button",href:qt.value,target:"_blank",rel:"noreferrer noopener",children:"Open rtk repo"})]}):null]})}function Vc(){const e=On(re.value,{extended:M.value});if(M.value&&Oe.value==="install"&&e.id==="identity"&&!Ve.value)return o(Cc,{});if(e.kind==="form"){const i=mc(xi.value,e.paths??[]);return o(J,{children:[e.id==="identity"?o(Gc,{}):null,o(Bl,{schema:i,values:D.value,errors:he.value,onChange:r=>{D.value=r}})]})}return e.kind==="userMd"?!ii.value||E.value===null?o("p",{children:"Loading .agent-user.yml…"}):o(zl,{value:E.value,errors:he.value,hideRole:M.value&&Oe.value==="install",hideIdentityBasics:M.value&&Oe.value==="install",onChange:i=>{E.value=i,Nn.value=!1}}):e.kind==="welcome"?o(zc,{}):e.kind==="aiTools"?o(Yc,{}):e.kind==="roles"?o(Kc,{}):e.kind==="packs"?o(qc,{}):o(Ac,{steps:Vt(),currentIndex:re.value,changes:In.value,errors:he.value,userMdChanged:wn(),userMdAction:Ai.value?"replace":"create",loading:pn.value,onJump:i=>{ke(i)},selectedToolsCount:Object.values(te.value).filter(Boolean).length,selectedPacksCount:Object.values(K.value).filter(Boolean).length})}function Hn({path:e}){if(De(()=>{$c()},[]),!jt.value||xi.value===null)return o("div",{class:"ac-page",children:[o("h1",{children:"Setup wizard"}),Te.value!==null?o("p",{class:"ac-banner ac-banner--error",children:Te.value}):o("p",{children:"Loading…"})]});const n=re.value,i=Me(),r=On(n,{extended:M.value}),t=n===i-1,l=r.kind==="aiTools"&&Object.values(te.value).filter(Boolean).length===0||r.kind==="roles"&&Object.values(ie.value).filter(Boolean).length===0||r.kind==="packs"&&nl().length===0,a=M.value&&Oe.value==="install"&&r.id==="identity"&&!Ve.value,c=bn.value,u=c!==null&&!Gt.value,d=ti.value;return d!==null&&d.present&&!li.value?o("div",{class:"ac-page",children:o(Tc,{sourcePath:d.path,backupTarget:d.backupTarget,version:d.version,busy:ai.value,error:oi.value,onBackupAndProceed:()=>{Pc()},onAbort:()=>{P.value={tone:"info",message:"Aborted. Uninstall v3 manually, then re-run `agent-config install`."},li.value=!0}})}):o("div",{class:"ac-page",children:[o(yc,{step:r,index:n,total:i}),u?o(Sc,{abortedAt:c.abortedAt,abortNote:c.abortNote,writesSinceRollback:c.writesSinceRollback,busy:fn.value,onResume:()=>{Un("resume")},onRollback:()=>{Un("rollback")},onIgnore:()=>{Un("ignore")}}):null,P.value!==null?o("p",{class:`ac-banner${P.value.tone==="error"?" ac-banner--error":""}`,children:P.value.message}):null,o("div",{class:"ac-wizard__step",children:o(Vc,{})}),l?o("p",{class:"ac-wizard__hint",children:r.kind==="aiTools"?"Select at least one AI tool to continue.":r.kind==="roles"?"Select at least one role to continue.":"Select at least one capability pack to continue."}):null,o(bc,{canGoPrev:n>0,canGoNext:!t&&!l,canSkip:a||r.kind==="userMd",skipLabel:a?"Finish install here":"Skip",isLast:t,busy:fn.value||pn.value,canFinish:In.value.length>0||wn(),completed:Si.value,onPrev:()=>{ke(n-1)},onNext:()=>{if(a){Ve.value=!0;return}ke(n+1)},onSkip:()=>{if(a){Ve.value=!0,ke(Me()-1);return}Nn.value=!0,ke(n+1)},onFinish:()=>{Uc()}})]})}const kn=_(!1),ve=_(null);async function Jc(){hn.value=!0,vn.value=null;try{const e=await A("/api/v1/modules/detect");Ci.value=e.candidates,Wt.value=e.project_root;const n={};for(const i of e.candidates)n[i.path]=!0;_n.value=n,mn.value=e.proposed_block.enabled,gn.value=e.proposed_block.namespace_template??"",yn.value=e.proposed_block.agent_folder??"agents"}catch(e){vn.value=e instanceof $?G(e.body.error??{code:"UNKNOWN",message:e.message}):e instanceof Error?e.message:String(e)}finally{hn.value=!1,Ec.value=!0}}function Qc(){const e=new Set(Ci.value.map(r=>r.path)),n=_n.value,i=Object.keys(n).filter(r=>n[r]===!0&&e.has(r));return{enabled:mn.value,root_paths:i,namespace_template:gn.value,agent_folder:yn.value||"agents"}}async function Zc(){kn.value=!0,ve.value=null;try{const e=await A("/api/v1/modules/apply",{method:"POST",body:Qc()});ve.value={message:e.appliedTo!==null?`Saved project settings to ${e.appliedTo}.`:`Saved project settings to ${e.projectRoot}.`,tone:"success"}}catch(e){const n=e instanceof $?G(e.body.error??{code:"UNKNOWN",message:e.message}):e instanceof Error?e.message:String(e);ve.value={message:`Could not save project settings: ${n}`,tone:"error"}}finally{kn.value=!1}}function Xc(){if(hn.value)return o("p",{children:"Detecting module roots…"});if(vn.value!==null)return o("p",{class:"ac-banner ac-banner--error",children:["Module detection failed: ",vn.value]});const e=Ci.value,n=_n.value,i=Wt.value;return o("div",{class:"ac-section",children:[i!==null?o("p",{class:"ac-section__description",children:["Scanning ",o("code",{children:i}),". Pick which detected roots the agent should treat as modules. These write to",o("code",{children:" .agent-project-settings.yml"})," in this repo only."]}):null,o("label",{children:[o("input",{type:"checkbox",checked:mn.value,onChange:r=>{mn.value=r.currentTarget.checked}})," ","Enable module discovery (writes ",o("code",{children:"modules.enabled"}),")"]}),e.length===0?o("p",{children:[o("em",{children:"No module roots detected."})," The scan found no common module layouts (Laravel ",o("code",{children:"app/Modules/"}),", Symfony",o("code",{children:" src/Module/"}),", Node ",o("code",{children:"packages/"}),", Python",o("code",{children:" src/"}),", Go ",o("code",{children:"internal/"}),")."]}):o("ul",{style:"list-style: none; padding-left: 0;",children:e.map(r=>o("li",{children:o("label",{children:[o("input",{type:"checkbox",checked:n[r.path]??!1,onChange:t=>{const l=t.currentTarget.checked;_n.value={...n,[r.path]:l}}})," ",o("code",{children:r.path})," — ",r.stack," ",o("small",{children:["(",r.confidence," confidence)"]})]})},r.path))}),o("div",{class:"ac-wizard__module-fields",children:[o("div",{class:"ac-field",children:[o("label",{class:"ac-field__label",for:"ac-modules-namespace",children:"Namespace template"}),o("input",{id:"ac-modules-namespace",class:"ac-input",type:"text",value:gn.value,placeholder:"e.g. App\\\\Modules\\\\{ModuleName}\\\\App",onInput:r=>{gn.value=r.currentTarget.value}}),o("span",{class:"ac-field__description",children:"How a module path maps to its namespace. Leave blank to skip namespacing."})]}),o("div",{class:"ac-field",children:[o("label",{class:"ac-field__label",for:"ac-modules-agent-folder",children:"Agent folder"}),o("input",{id:"ac-modules-agent-folder",class:"ac-input",type:"text",value:yn.value,placeholder:"agents",onInput:r=>{yn.value=r.currentTarget.value}}),o("span",{class:"ac-field__description",children:["Folder name that holds per-module agent docs (default ",o("code",{children:"agents"}),")."]})]})]})]})}function es(){return De(()=>{Jc()},[]),o("div",{class:"ac-page",children:[o("header",{class:"ac-page__header",children:[o("h1",{children:"Project settings"}),o("p",{class:"ac-section__description",children:["Configuration scoped to this repository — written to",o("code",{children:" .agent-project-settings.yml"}),", not the global tree."]})]}),ve.value!==null?o("p",{class:`ac-banner ac-banner--${ve.value.tone==="success"?"success":"error"}`,children:ve.value.message}):null,o("section",{class:"ac-section",children:[o("h2",{class:"ac-section__title",children:"Modules"}),o(Xc,{})]}),o("div",{class:"ac-form__actions ac-wizard__nav",children:o("button",{type:"button",class:"ac-button ac-button--primary",disabled:kn.value||hn.value,onClick:()=>{Zc()},children:kn.value?"Saving…":"Save project settings"})})]})}const Je=_([]),xn=_([]),ci=_([]),si=_([]),An=_(null),rl=_(!1),Ne=_(null),Z=_(null),Wn=_("plain");async function ns(){Ne.value=null;try{const[e,n,i,r]=await Promise.all([A("/api/v1/workspace/roles"),A("/api/v1/workspace/sessions?limit=20"),A("/api/v1/workspace/knowledge?limit=20"),A("/api/v1/workspace/documents?limit=20")]);Je.value=e.roles,xn.value=n.sessions,ci.value=i.chunks,si.value=r.documents,rl.value=!0}catch(e){e instanceof $?Ne.value=e.body?.error?.message??e.message:Ne.value=e instanceof Error?e.message:String(e)}}async function is(e,n){Z.value=null;try{const i=await A("/api/v1/workspace/launch",{method:"POST",body:{role:e,task:n,host:"local"}});Z.value=`Started session ${i.id} (${i.role} · ${i.task}).`;const r=await A("/api/v1/workspace/sessions?limit=20");xn.value=r.sessions}catch(i){i instanceof $?Z.value=i.body?.error?.message??i.message:Z.value=i instanceof Error?i.message:String(i)}}function rs({role:e}){const n=An.value===e.slug;return o("button",{type:"button",class:`ac-workspace__role${n?" ac-workspace__role--active":""}`,"aria-current":n?"true":void 0,"aria-label":`Pick role ${e.display_name}`,onClick:()=>{An.value=e.slug,Z.value=null},children:[o("span",{class:"ac-workspace__role-name",children:e.display_name}),o("span",{class:"ac-workspace__role-status","data-status":e.status,children:e.status}),o("span",{class:"ac-workspace__role-tagline",children:e.tagline})]})}function ts({role:e}){return o("section",{class:"ac-workspace__tasks","aria-labelledby":"task-heading",children:[o("h2",{id:"task-heading",class:"ac-workspace__heading",children:["First tasks · ",e.display_name]}),e.first_tasks.length===0?o("p",{class:"ac-workspace__empty",children:"No tasks scaffolded yet for this role."}):o("ul",{class:"ac-workspace__task-list",children:e.first_tasks.map(n=>o("li",{class:"ac-workspace__task",children:[o("div",{class:"ac-workspace__task-head",children:[o("span",{class:"ac-workspace__task-name",children:n.name}),o("button",{type:"button",class:"ac-button ac-button--primary",onClick:()=>{is(e.slug,n.name)},children:"Start session"})]}),o("p",{class:"ac-workspace__task-intent",children:n.intent}),n.prompt!==""?o("code",{class:"ac-workspace__task-prompt",children:["prompts/",n.prompt]}):null]},n.name))}),e.skills.length>0?o("details",{class:"ac-workspace__skills",children:[o("summary",{children:["Skill shortlist (",e.skills.length,")"]}),o("ul",{class:"ac-workspace__skill-list",children:[e.skills.slice(0,5).map(n=>o("li",{class:"ac-workspace__skill",children:[o("code",{children:n.id})," — ",n.why]},n.id)),e.skills.length>5?o("li",{class:"ac-workspace__skill-more",children:["+ ",e.skills.length-5," more"]}):null]})]}):null]})}function ls(){return o("section",{class:"ac-workspace__sessions","aria-labelledby":"sessions-heading",children:[o("h2",{id:"sessions-heading",class:"ac-workspace__heading",children:"Recent sessions"}),xn.value.length===0?o("p",{class:"ac-workspace__empty",children:"No sessions yet — pick a role and start one."}):o("ul",{class:"ac-workspace__session-list",children:xn.value.map(e=>o("li",{class:"ac-workspace__session",children:[o("span",{class:"ac-workspace__session-id",children:e.id.slice(0,16)}),o("span",{class:"ac-workspace__session-role",children:e.role}),o("span",{class:"ac-workspace__session-task",children:e.task})]},e.id))})]})}function as(){return o("section",{class:"ac-workspace__knowledge","aria-labelledby":"knowledge-heading",children:[o("h2",{id:"knowledge-heading",class:"ac-workspace__heading",children:"Knowledge sources"}),ci.value.length===0?o("p",{class:"ac-workspace__empty",children:["No sources yet. Run ",o("code",{children:"/knowledge:ingest <path>"})," to add documents."]}):o("ol",{class:"ac-workspace__citation-list",children:ci.value.map((e,n)=>o("li",{class:"ac-workspace__citation",children:[o("span",{class:"ac-workspace__citation-marker","aria-label":`Citation ${n+1}`,children:["[",n+1,"]"]}),o("a",{href:`file://${e.source}`,class:"ac-workspace__citation-source",title:"Open source in OS default app",children:e.source.split("/").pop()??e.source}),e.pinned?o("span",{class:"ac-workspace__citation-pin","aria-label":"pinned",children:"★"}):null,o("p",{class:"ac-workspace__citation-excerpt",children:[e.excerpt.slice(0,200),e.excerpt.length>200?"…":""]})]},e.id))})]})}function os(){return o("section",{class:"ac-workspace__recent","aria-labelledby":"recent-heading",children:[o("h2",{id:"recent-heading",class:"ac-workspace__heading",children:"Recent documents"}),si.value.length===0?o("p",{class:"ac-workspace__empty",children:"No documents yet. Saved drafts land here."}):o("ul",{class:"ac-workspace__doc-list",children:si.value.map(e=>o("li",{class:"ac-workspace__doc",children:[o("span",{class:"ac-workspace__doc-type","data-type":e.type,children:e.type}),o("span",{class:"ac-workspace__doc-title",children:e.title}),o("time",{class:"ac-workspace__doc-time",dateTime:e.updated_at,children:e.updated_at.slice(0,10)})]},`${e.type}/${e.slug}`))})]})}function cs(){const e=Wn.value;return o("fieldset",{class:"ac-workspace__explain",children:[o("legend",{class:"ac-workspace__heading",children:"Explanation style"}),o("label",{class:"ac-workspace__explain-option",children:[o("input",{type:"radio",name:"explain-mode",value:"plain",checked:e==="plain",onChange:()=>{Wn.value="plain"},"aria-label":"Plain language"}),o("span",{children:"Plain language"})]}),o("label",{class:"ac-workspace__explain-option",children:[o("input",{type:"radio",name:"explain-mode",value:"technical",checked:e==="technical",onChange:()=>{Wn.value="technical"},"aria-label":"Technical detail"}),o("span",{children:"Technical detail"})]}),o("p",{class:"ac-workspace__explain-hint",children:e==="plain"?"Replies use everyday words. Toggle to see the technical view.":"Replies keep the technical vocabulary. Toggle for the plain view."})]})}function ss(){if(De(()=>{ns()},[]),Ne.value!==null)return o("div",{class:"ac-page ac-page--error",children:[o("h1",{children:"Workspace"}),o("p",{class:"ac-banner ac-banner--error",children:Ne.value})]});if(!rl.value)return o("div",{class:"ac-page",children:[o("h1",{children:"Workspace"}),o("p",{children:"Loading…"})]});const e=An.value!==null?Je.value.find(n=>n.slug===An.value)??null:null;return o("div",{class:"ac-page ac-workspace",children:[o("header",{class:"ac-page__header",children:[o("h1",{children:"Workspace"}),o("p",{class:"ac-page__subtitle",children:"Pick a role, pick a first task, run it."})]}),Z.value!==null?o("p",{class:"ac-banner",role:"status",children:Z.value}):null,o("div",{class:"ac-workspace__grid",children:[o("section",{class:"ac-workspace__roles","aria-labelledby":"roles-heading",children:[o("h2",{id:"roles-heading",class:"ac-workspace__heading",children:"Roles"}),Je.value.length===0?o("p",{class:"ac-workspace__empty",children:"No roles installed."}):o("div",{class:"ac-workspace__role-grid",children:Je.value.map(n=>o(rs,{role:n},n.slug))})]}),o("main",{class:"ac-workspace__main","aria-label":"Tasks and sessions",children:[e!==null?o(ts,{role:e}):o("p",{class:"ac-workspace__empty",children:"Pick a role on the left to see its first tasks."}),o(ls,{})]}),o("aside",{class:"ac-workspace__rail","aria-label":"Knowledge and documents",children:[o(as,{}),o(os,{}),o(cs,{})]})]})]})}const tl=[{id:"setup",label:"Setup",hashPath:"/setup",matches:["/setup","/wizard"]},{id:"project",label:"Projekt",hashPath:"/project",matches:["/project"]},{id:"tasks",label:"Tasks",hashPath:"/tasks",matches:["/tasks"]},{id:"council",label:"Council",hashPath:"/council",matches:["/council"]},{id:"memory",label:"Memory",hashPath:"/memory",matches:["/memory"]},{id:"explain",label:"Explain",hashPath:"/explain",matches:["/explain"]},{id:"workspace",label:"Workspace",hashPath:"/workspace",matches:["/workspace"]}];function us(e){for(const n of tl)for(const i of n.matches)if(e===i||e.startsWith(`${i}/`))return n.id;return null}function ds(){const e=de.value,n=us(e);return o("header",{class:"ac-topnav",children:o("div",{class:"ac-topnav__inner",children:[o("div",{class:"ac-topnav__brand",children:[o("h1",{class:"ac-topnav__title",children:"@event4u/agent-config"}),o("p",{class:"ac-topnav__subtitle",children:"Browser Wizard"})]}),o("nav",{class:"ac-topnav__tabs","aria-label":"Surfaces",children:tl.map(i=>o("button",{type:"button",class:`ac-topnav__tab${n===i.id?" ac-topnav__tab--active":""}`,"aria-current":n===i.id?"page":void 0,onClick:()=>Jn(i.hashPath),children:i.label},i.id))})]})})}function ze({name:e}){return o("div",{class:"ac-page",children:[o("header",{class:"ac-page__header",children:o("h1",{children:e})}),o("section",{class:"ac-section",children:[o("p",{class:"ac-section__description",children:["The ",o("strong",{children:e})," surface is currently served by the legacy installer GUI on port ",o("code",{children:"41100"}),". It is being ported to the modern shell in a follow-up phase (road-to-unified-setup § Phase 5)."]}),o("p",{class:"ac-section__description",children:["For now the legacy surface remains reachable via"," ",o("code",{children:"installer gui"}),"."]})]})]})}function fs({path:e}){return o("div",{class:"ac-page ac-page--error",children:[o("h1",{children:"Page not found"}),o("p",{children:["Nothing routed to ",o("code",{children:e}),". Try ",o("a",{href:"#/setup",children:"Setup"}),"."]})]})}function ps(){const e=ln.value;return e===null||e.dryRun!==!0?null:o("div",{class:"ac-dryrun-banner",role:"status","aria-live":"polite",children:[o("strong",{children:"DRY RUN"}),o("span",{children:" · no files will be written. Validation + rendering run normally; commits return a preview."})]})}function hs(e){return e==="/"||e==="/setup"||e.startsWith("/setup/")?o(Hn,{path:e}):e.startsWith("/wizard")?o(Hn,{path:e}):e==="/settings"||e.startsWith("/settings/")?o(Hn,{path:"/setup"}):e==="/project"||e.startsWith("/project/")?o(es,{}):e==="/tasks"?o(ze,{name:"Tasks"}):e==="/council"?o(ze,{name:"Council"}):e==="/memory"?o(ze,{name:"Memory"}):e==="/explain"?o(ze,{name:"Explain"}):e==="/workspace"?o(ss,{}):o(fs,{path:e})}function vs(){return De(()=>{Cl(),(de.value==="/"||de.value==="/settings"||de.value.startsWith("/settings/"))&&Jn("/setup"),Ol()},[]),o(J,{children:[o(ps,{}),o(ds,{}),hs(de.value)]})}const _s=3e4,ms=30*6e4;let Ye=null,vr=!1;function _r(e){if(!vr&&(vr=!0,!(typeof navigator>"u"||typeof navigator.sendBeacon!="function")))try{navigator.sendBeacon(`/api/v1/shutdown?token=${encodeURIComponent(e)}`)}catch{}}function gs(e){if(typeof window>"u")return()=>{};let n=Date.now();const i=()=>{n=Date.now()},r=["pointerdown","keydown","wheel","touchstart"];for(const c of r)window.addEventListener(c,i,{passive:!0});const t=()=>{document.hidden||i()};document.addEventListener("visibilitychange",t);const l=()=>{Ye!==null&&clearInterval(Ye),Ye=null;for(const c of r)window.removeEventListener(c,i);document.removeEventListener("visibilitychange",t),window.removeEventListener("pagehide",a)};Ye=setInterval(()=>{if(!document.hidden){if(Date.now()-n>ms){_r(e),l();return}A("/api/v1/ping").catch(()=>{})}},_s);function a(){_r(e)}return window.addEventListener("pagehide",a),l}function ys(){return new URLSearchParams(window.location.search).get("token")}function bs(){const e=document.getElementById("app");if(e===null)return;const n=ys();if(n===null){e.textContent="agent-config UI · missing token — re-open via `agent-config ui:serve`.";return}Tl(n),gs(n),e.textContent="",fl(o(vs,{}),e)}bs();
40
+ //# sourceMappingURL=index-DVsyUMZe.js.map