specialist-agent 2.12.0 → 3.2.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 (323) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +33 -207
  3. package/dist/catalog.json +15529 -0
  4. package/dist/hw-worker.mjs +254 -0
  5. package/dist/icones/icone.ico +0 -0
  6. package/dist/icones/icone.png +0 -0
  7. package/dist/interface/assets/figtree-latin-400-normal-g7Dtegnw.woff2 +0 -0
  8. package/dist/interface/assets/figtree-latin-500-normal-BWnGEVsr.woff2 +0 -0
  9. package/dist/interface/assets/figtree-latin-600-normal-Cv_xCTDl.woff2 +0 -0
  10. package/dist/interface/assets/figtree-latin-700-normal-th6qEP7c.woff2 +0 -0
  11. package/dist/interface/assets/figtree-latin-ext-400-normal-CXAzuTZb.woff2 +0 -0
  12. package/dist/interface/assets/figtree-latin-ext-500-normal-Du0rIuHj.woff2 +0 -0
  13. package/dist/interface/assets/figtree-latin-ext-600-normal-DJlfifZj.woff2 +0 -0
  14. package/dist/interface/assets/figtree-latin-ext-700-normal-CS4sQkGV.woff2 +0 -0
  15. package/dist/interface/assets/index-BIyqZkro.css +1 -0
  16. package/dist/interface/assets/index-zAegy908.js +13 -0
  17. package/dist/interface/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
  18. package/dist/interface/assets/jetbrains-mono-latin-500-normal-BWZEU5yA.woff2 +0 -0
  19. package/dist/interface/assets/jetbrains-mono-latin-600-normal-C8RAYTDA.woff2 +0 -0
  20. package/dist/interface/assets/jetbrains-mono-latin-ext-400-normal-Bc8Ftmh3.woff2 +0 -0
  21. package/dist/interface/assets/jetbrains-mono-latin-ext-500-normal-Cut-4mMH.woff2 +0 -0
  22. package/dist/interface/assets/jetbrains-mono-latin-ext-600-normal-BfB_LPfz.woff2 +0 -0
  23. package/dist/interface/assets/unbounded-latin-500-normal-4slEIF53.woff2 +0 -0
  24. package/dist/interface/assets/unbounded-latin-700-normal-CaoNriVp.woff2 +0 -0
  25. package/dist/interface/assets/unbounded-latin-ext-500-normal-BTIpesyw.woff2 +0 -0
  26. package/dist/interface/assets/unbounded-latin-ext-700-normal-BLzWLLjG.woff2 +0 -0
  27. package/dist/interface/icones/apple-touch-icon.png +0 -0
  28. package/dist/interface/icones/favicon-32.png +0 -0
  29. package/dist/interface/icones/icone-192.png +0 -0
  30. package/dist/interface/icones/icone-512.png +0 -0
  31. package/dist/interface/icones/icone-mascara-512.png +0 -0
  32. package/dist/interface/index.html +19 -0
  33. package/dist/interface/manifest.webmanifest +19 -0
  34. package/dist/interface/sw.js +63 -0
  35. package/dist/specialist-agent.mjs +6919 -0
  36. package/dist/usage-worker.mjs +174 -0
  37. package/package.json +32 -57
  38. package/.claude-plugin/marketplace.json +0 -52
  39. package/.claude-plugin/plugin.json +0 -37
  40. package/.codex/INSTALL.md +0 -145
  41. package/.cursor-plugin/marketplace.json +0 -52
  42. package/.cursor-plugin/plugin.json +0 -37
  43. package/.opencode/INSTALL.md +0 -127
  44. package/.opencode/opencode.json +0 -186
  45. package/agents/analyst-lite.md +0 -48
  46. package/agents/analyst.md +0 -396
  47. package/agents/api-lite.md +0 -43
  48. package/agents/api.md +0 -427
  49. package/agents/architect-lite.md +0 -104
  50. package/agents/architect.md +0 -571
  51. package/agents/autopilot-lite.md +0 -46
  52. package/agents/autopilot.md +0 -196
  53. package/agents/cloud-lite.md +0 -75
  54. package/agents/cloud.md +0 -213
  55. package/agents/data-lite.md +0 -67
  56. package/agents/data.md +0 -306
  57. package/agents/debugger-lite.md +0 -46
  58. package/agents/debugger.md +0 -410
  59. package/agents/deps-lite.md +0 -41
  60. package/agents/deps.md +0 -363
  61. package/agents/designer-lite.md +0 -67
  62. package/agents/designer.md +0 -195
  63. package/agents/devops-lite.md +0 -67
  64. package/agents/devops.md +0 -205
  65. package/agents/docs-lite.md +0 -42
  66. package/agents/docs.md +0 -454
  67. package/agents/executor-lite.md +0 -61
  68. package/agents/executor.md +0 -695
  69. package/agents/explorer-lite.md +0 -55
  70. package/agents/explorer.md +0 -152
  71. package/agents/finance-lite.md +0 -66
  72. package/agents/finance.md +0 -255
  73. package/agents/i18n-lite.md +0 -44
  74. package/agents/i18n.md +0 -594
  75. package/agents/legal-lite.md +0 -113
  76. package/agents/legal.md +0 -302
  77. package/agents/marketing-lite.md +0 -25
  78. package/agents/marketing.md +0 -188
  79. package/agents/memory.md +0 -166
  80. package/agents/orchestrator-lite.md +0 -40
  81. package/agents/orchestrator.md +0 -512
  82. package/agents/pair-lite.md +0 -38
  83. package/agents/pair.md +0 -310
  84. package/agents/perf-lite.md +0 -42
  85. package/agents/perf.md +0 -320
  86. package/agents/planner-lite.md +0 -59
  87. package/agents/planner.md +0 -272
  88. package/agents/product-lite.md +0 -25
  89. package/agents/product.md +0 -195
  90. package/agents/refactor-lite.md +0 -42
  91. package/agents/refactor.md +0 -467
  92. package/agents/ripple-lite.md +0 -106
  93. package/agents/ripple.md +0 -166
  94. package/agents/scout-lite.md +0 -37
  95. package/agents/scout.md +0 -224
  96. package/agents/security-lite.md +0 -66
  97. package/agents/security.md +0 -252
  98. package/agents/sentry-triage-lite.md +0 -54
  99. package/agents/sentry-triage.md +0 -217
  100. package/agents/starter-lite.md +0 -80
  101. package/agents/starter.md +0 -300
  102. package/agents/support-lite.md +0 -24
  103. package/agents/support.md +0 -191
  104. package/agents/tdd-lite.md +0 -43
  105. package/agents/tdd.md +0 -329
  106. package/agents/tester-lite.md +0 -71
  107. package/agents/tester.md +0 -237
  108. package/cli/architectures.mjs +0 -713
  109. package/cli/detect-architecture.mjs +0 -752
  110. package/cli/generate-architecture.mjs +0 -1096
  111. package/cli/index.mjs +0 -1217
  112. package/cli/recommend-architecture.mjs +0 -870
  113. package/hooks/after-review.mjs +0 -130
  114. package/hooks/after-task.mjs +0 -117
  115. package/hooks/before-plan.mjs +0 -155
  116. package/hooks/before-review.mjs +0 -139
  117. package/hooks/hooks.json +0 -66
  118. package/hooks/lifecycle.json +0 -91
  119. package/hooks/native/auto-dispatch.mjs +0 -207
  120. package/hooks/native/auto-format.mjs +0 -176
  121. package/hooks/native/mcp-discovery.mjs +0 -168
  122. package/hooks/native/security-config.json +0 -38
  123. package/hooks/native/security-guard.mjs +0 -323
  124. package/hooks/native/session-context.mjs +0 -179
  125. package/hooks/native/session-end.mjs +0 -42
  126. package/hooks/native/utils.mjs +0 -62
  127. package/hooks/on-error.mjs +0 -129
  128. package/hooks/session-end.mjs +0 -185
  129. package/hooks/session-start.mjs +0 -154
  130. package/packs/angular/ARCHITECTURE.md +0 -814
  131. package/packs/angular/CLAUDE.md +0 -105
  132. package/packs/angular/agents/builder.md +0 -113
  133. package/packs/angular/agents/doctor.md +0 -187
  134. package/packs/angular/agents/migrator.md +0 -101
  135. package/packs/angular/agents/reviewer.md +0 -252
  136. package/packs/angular/agents-lite/builder.md +0 -65
  137. package/packs/angular/agents-lite/doctor.md +0 -64
  138. package/packs/angular/agents-lite/migrator.md +0 -75
  139. package/packs/angular/agents-lite/reviewer.md +0 -69
  140. package/packs/angular/skills/dev-create-component/SKILL.md +0 -56
  141. package/packs/angular/skills/dev-create-injectable/SKILL.md +0 -60
  142. package/packs/angular/skills/dev-create-module/SKILL.md +0 -49
  143. package/packs/angular/skills/dev-create-service/SKILL.md +0 -34
  144. package/packs/angular/skills/dev-create-test/SKILL.md +0 -78
  145. package/packs/angular/skills/dev-generate-types/SKILL.md +0 -37
  146. package/packs/angular/skills/docs-onboard/SKILL.md +0 -42
  147. package/packs/angular/skills/migration-migrate-component/SKILL.md +0 -42
  148. package/packs/angular/skills/migration-migrate-module/SKILL.md +0 -25
  149. package/packs/angular/skills/review-check-architecture/SKILL.md +0 -67
  150. package/packs/angular/skills/review-fix-violations/SKILL.md +0 -43
  151. package/packs/angular/skills/review-review/SKILL.md +0 -43
  152. package/packs/astro/ARCHITECTURE.md +0 -718
  153. package/packs/astro/CLAUDE.md +0 -106
  154. package/packs/astro/agents/builder.md +0 -123
  155. package/packs/astro/agents/doctor.md +0 -200
  156. package/packs/astro/agents/migrator.md +0 -105
  157. package/packs/astro/agents/reviewer.md +0 -253
  158. package/packs/astro/agents-lite/builder.md +0 -71
  159. package/packs/astro/agents-lite/doctor.md +0 -66
  160. package/packs/astro/agents-lite/migrator.md +0 -71
  161. package/packs/astro/agents-lite/reviewer.md +0 -70
  162. package/packs/astro/skills/dev-create-component/SKILL.md +0 -50
  163. package/packs/astro/skills/dev-create-island/SKILL.md +0 -63
  164. package/packs/astro/skills/dev-create-module/SKILL.md +0 -49
  165. package/packs/astro/skills/dev-create-service/SKILL.md +0 -34
  166. package/packs/astro/skills/dev-create-test/SKILL.md +0 -76
  167. package/packs/astro/skills/dev-generate-types/SKILL.md +0 -37
  168. package/packs/astro/skills/docs-onboard/SKILL.md +0 -51
  169. package/packs/astro/skills/migration-migrate-component/SKILL.md +0 -48
  170. package/packs/astro/skills/migration-migrate-module/SKILL.md +0 -25
  171. package/packs/astro/skills/review-check-architecture/SKILL.md +0 -72
  172. package/packs/astro/skills/review-fix-violations/SKILL.md +0 -43
  173. package/packs/astro/skills/review-review/SKILL.md +0 -45
  174. package/packs/nextjs/ARCHITECTURE.md +0 -1033
  175. package/packs/nextjs/CLAUDE.md +0 -106
  176. package/packs/nextjs/agents/builder.md +0 -132
  177. package/packs/nextjs/agents/doctor.md +0 -226
  178. package/packs/nextjs/agents/migrator.md +0 -101
  179. package/packs/nextjs/agents/reviewer.md +0 -243
  180. package/packs/nextjs/agents-lite/builder.md +0 -74
  181. package/packs/nextjs/agents-lite/doctor.md +0 -74
  182. package/packs/nextjs/agents-lite/migrator.md +0 -75
  183. package/packs/nextjs/agents-lite/reviewer.md +0 -73
  184. package/packs/nextjs/skills/dev-create-component/SKILL.md +0 -82
  185. package/packs/nextjs/skills/dev-create-hook/SKILL.md +0 -90
  186. package/packs/nextjs/skills/dev-create-module/SKILL.md +0 -63
  187. package/packs/nextjs/skills/dev-create-service/SKILL.md +0 -35
  188. package/packs/nextjs/skills/dev-create-test/SKILL.md +0 -106
  189. package/packs/nextjs/skills/dev-generate-types/SKILL.md +0 -37
  190. package/packs/nextjs/skills/docs-onboard/SKILL.md +0 -55
  191. package/packs/nextjs/skills/migration-migrate-component/SKILL.md +0 -58
  192. package/packs/nextjs/skills/migration-migrate-module/SKILL.md +0 -25
  193. package/packs/nextjs/skills/review-check-architecture/SKILL.md +0 -101
  194. package/packs/nextjs/skills/review-fix-violations/SKILL.md +0 -48
  195. package/packs/nextjs/skills/review-review/SKILL.md +0 -47
  196. package/packs/nuxt/ARCHITECTURE.md +0 -831
  197. package/packs/nuxt/CLAUDE.md +0 -111
  198. package/packs/nuxt/agents/builder.md +0 -120
  199. package/packs/nuxt/agents/doctor.md +0 -198
  200. package/packs/nuxt/agents/migrator.md +0 -101
  201. package/packs/nuxt/agents/reviewer.md +0 -255
  202. package/packs/nuxt/agents-lite/builder.md +0 -67
  203. package/packs/nuxt/agents-lite/doctor.md +0 -67
  204. package/packs/nuxt/agents-lite/migrator.md +0 -80
  205. package/packs/nuxt/agents-lite/reviewer.md +0 -71
  206. package/packs/nuxt/skills/dev-create-component/SKILL.md +0 -60
  207. package/packs/nuxt/skills/dev-create-composable/SKILL.md +0 -33
  208. package/packs/nuxt/skills/dev-create-module/SKILL.md +0 -49
  209. package/packs/nuxt/skills/dev-create-service/SKILL.md +0 -34
  210. package/packs/nuxt/skills/dev-create-test/SKILL.md +0 -61
  211. package/packs/nuxt/skills/dev-generate-types/SKILL.md +0 -37
  212. package/packs/nuxt/skills/docs-onboard/SKILL.md +0 -49
  213. package/packs/nuxt/skills/migration-migrate-component/SKILL.md +0 -48
  214. package/packs/nuxt/skills/migration-migrate-module/SKILL.md +0 -25
  215. package/packs/nuxt/skills/review-check-architecture/SKILL.md +0 -71
  216. package/packs/nuxt/skills/review-fix-violations/SKILL.md +0 -43
  217. package/packs/nuxt/skills/review-review/SKILL.md +0 -45
  218. package/packs/react/ARCHITECTURE.md +0 -991
  219. package/packs/react/CLAUDE.md +0 -102
  220. package/packs/react/agents/builder.md +0 -113
  221. package/packs/react/agents/doctor.md +0 -203
  222. package/packs/react/agents/migrator.md +0 -101
  223. package/packs/react/agents/reviewer.md +0 -252
  224. package/packs/react/agents-lite/builder.md +0 -65
  225. package/packs/react/agents-lite/doctor.md +0 -64
  226. package/packs/react/agents-lite/migrator.md +0 -74
  227. package/packs/react/agents-lite/reviewer.md +0 -69
  228. package/packs/react/skills/dev-create-component/SKILL.md +0 -53
  229. package/packs/react/skills/dev-create-hook/SKILL.md +0 -78
  230. package/packs/react/skills/dev-create-module/SKILL.md +0 -51
  231. package/packs/react/skills/dev-create-service/SKILL.md +0 -34
  232. package/packs/react/skills/dev-create-test/SKILL.md +0 -92
  233. package/packs/react/skills/dev-generate-types/SKILL.md +0 -37
  234. package/packs/react/skills/docs-onboard/SKILL.md +0 -42
  235. package/packs/react/skills/migration-migrate-component/SKILL.md +0 -44
  236. package/packs/react/skills/migration-migrate-module/SKILL.md +0 -25
  237. package/packs/react/skills/review-check-architecture/SKILL.md +0 -73
  238. package/packs/react/skills/review-fix-violations/SKILL.md +0 -45
  239. package/packs/react/skills/review-review/SKILL.md +0 -44
  240. package/packs/svelte/ARCHITECTURE.md +0 -975
  241. package/packs/svelte/CLAUDE.md +0 -102
  242. package/packs/svelte/agents/builder.md +0 -114
  243. package/packs/svelte/agents/doctor.md +0 -174
  244. package/packs/svelte/agents/migrator.md +0 -101
  245. package/packs/svelte/agents/reviewer.md +0 -238
  246. package/packs/svelte/agents-lite/builder.md +0 -66
  247. package/packs/svelte/agents-lite/doctor.md +0 -67
  248. package/packs/svelte/agents-lite/migrator.md +0 -82
  249. package/packs/svelte/agents-lite/reviewer.md +0 -70
  250. package/packs/svelte/skills/dev-create-component/SKILL.md +0 -77
  251. package/packs/svelte/skills/dev-create-module/SKILL.md +0 -59
  252. package/packs/svelte/skills/dev-create-service/SKILL.md +0 -35
  253. package/packs/svelte/skills/dev-create-store/SKILL.md +0 -94
  254. package/packs/svelte/skills/dev-create-test/SKILL.md +0 -98
  255. package/packs/svelte/skills/dev-generate-types/SKILL.md +0 -37
  256. package/packs/svelte/skills/docs-onboard/SKILL.md +0 -47
  257. package/packs/svelte/skills/migration-migrate-component/SKILL.md +0 -51
  258. package/packs/svelte/skills/migration-migrate-module/SKILL.md +0 -25
  259. package/packs/svelte/skills/review-check-architecture/SKILL.md +0 -79
  260. package/packs/svelte/skills/review-fix-violations/SKILL.md +0 -47
  261. package/packs/svelte/skills/review-review/SKILL.md +0 -45
  262. package/packs/vue/ARCHITECTURE.md +0 -798
  263. package/packs/vue/CLAUDE.md +0 -102
  264. package/packs/vue/agents/builder.md +0 -112
  265. package/packs/vue/agents/doctor.md +0 -185
  266. package/packs/vue/agents/migrator.md +0 -101
  267. package/packs/vue/agents/reviewer.md +0 -249
  268. package/packs/vue/agents-lite/builder.md +0 -65
  269. package/packs/vue/agents-lite/doctor.md +0 -63
  270. package/packs/vue/agents-lite/migrator.md +0 -73
  271. package/packs/vue/agents-lite/reviewer.md +0 -68
  272. package/packs/vue/skills/dev-create-component/SKILL.md +0 -58
  273. package/packs/vue/skills/dev-create-composable/SKILL.md +0 -31
  274. package/packs/vue/skills/dev-create-module/SKILL.md +0 -50
  275. package/packs/vue/skills/dev-create-service/SKILL.md +0 -34
  276. package/packs/vue/skills/dev-create-test/SKILL.md +0 -62
  277. package/packs/vue/skills/dev-generate-types/SKILL.md +0 -37
  278. package/packs/vue/skills/docs-onboard/SKILL.md +0 -42
  279. package/packs/vue/skills/migration-migrate-component/SKILL.md +0 -41
  280. package/packs/vue/skills/migration-migrate-module/SKILL.md +0 -25
  281. package/packs/vue/skills/review-check-architecture/SKILL.md +0 -73
  282. package/packs/vue/skills/review-fix-violations/SKILL.md +0 -42
  283. package/packs/vue/skills/review-review/SKILL.md +0 -43
  284. package/skills/audit/SKILL.md +0 -231
  285. package/skills/autofix/SKILL.md +0 -166
  286. package/skills/autopilot/SKILL.md +0 -286
  287. package/skills/brainstorm/SKILL.md +0 -298
  288. package/skills/checkpoint/SKILL.md +0 -217
  289. package/skills/codereview/SKILL.md +0 -268
  290. package/skills/commit/SKILL.md +0 -150
  291. package/skills/copywriting/SKILL.md +0 -218
  292. package/skills/cro/SKILL.md +0 -234
  293. package/skills/debug/SKILL.md +0 -210
  294. package/skills/design-review/SKILL.md +0 -217
  295. package/skills/discovery/SKILL.md +0 -218
  296. package/skills/estimate/SKILL.md +0 -154
  297. package/skills/finish/SKILL.md +0 -220
  298. package/skills/grill/SKILL.md +0 -270
  299. package/skills/health/SKILL.md +0 -251
  300. package/skills/improve-architecture/SKILL.md +0 -205
  301. package/skills/learn/SKILL.md +0 -260
  302. package/skills/lint/SKILL.md +0 -126
  303. package/skills/migrate-architecture/SKILL.md +0 -242
  304. package/skills/migrate-framework/SKILL.md +0 -172
  305. package/skills/onboard/SKILL.md +0 -168
  306. package/skills/plan/SKILL.md +0 -141
  307. package/skills/prd/SKILL.md +0 -241
  308. package/skills/recall/SKILL.md +0 -112
  309. package/skills/remember/SKILL.md +0 -108
  310. package/skills/seo-audit/SKILL.md +0 -240
  311. package/skills/tdd/SKILL.md +0 -201
  312. package/skills/tutorial/SKILL.md +0 -346
  313. package/skills/verify/SKILL.md +0 -168
  314. package/skills/worktree/SKILL.md +0 -168
  315. package/skills/write-skill/SKILL.md +0 -225
  316. package/templates/autopilot/PROMPT.md +0 -39
  317. package/templates/autopilot/README.md +0 -122
  318. package/templates/autopilot/devcontainer.json +0 -21
  319. package/templates/industry/ecommerce.md +0 -127
  320. package/templates/industry/fintech.md +0 -161
  321. package/templates/industry/saas.md +0 -134
  322. package/templates/session-memory.json +0 -48
  323. package/templates/skill-template/SKILL.md +0 -90
@@ -0,0 +1,174 @@
1
+ // ../../apps/gerenciador/src/agente/workers/usage-worker.ts
2
+ import { parentPort, workerData } from "node:worker_threads";
3
+
4
+ // ../../apps/gerenciador/src/agente/usage.ts
5
+ import { closeSync, openSync, readSync, readdirSync as readdirSync2, statSync as statSync2 } from "node:fs";
6
+ import { join as join2 } from "node:path";
7
+
8
+ // ../../apps/gerenciador/src/agente/files.ts
9
+ import { cpSync, existsSync, lstatSync, mkdirSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
10
+ import { dirname, join } from "node:path";
11
+ function readJson(file, fallback) {
12
+ try {
13
+ return JSON.parse(readFileSync(file, "utf8"));
14
+ } catch {
15
+ return fallback;
16
+ }
17
+ }
18
+ function writeJson(file, data) {
19
+ mkdirSync(dirname(file), { recursive: true });
20
+ const tmp = `${file}.${process.pid}.tmp`;
21
+ writeFileSync(tmp, JSON.stringify(data, null, 2) + "\n");
22
+ renameSync(tmp, file);
23
+ }
24
+
25
+ // ../../apps/gerenciador/src/agente/usage.ts
26
+ var CHUNK = 4 * 1024 * 1024;
27
+ var KEEP_DAYS = 400;
28
+ var dayOf = (iso) => {
29
+ const d = new Date(iso ?? "");
30
+ if (Number.isNaN(d.getTime())) return null;
31
+ return `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, "0")}-${String(d.getDate()).padStart(2, "0")}`;
32
+ };
33
+ function toolKeys(content) {
34
+ const keys = [];
35
+ for (const c of content) {
36
+ if (!c || c.type !== "tool_use" || typeof c.name !== "string") continue;
37
+ if (c.name === "Skill" && c.input?.skill) keys.push("skill:" + String(c.input.skill).replace(/^\//, ""));
38
+ else if ((c.name === "Task" || c.name === "Agent") && c.input?.subagent_type) keys.push("agent:" + c.input.subagent_type);
39
+ else if (c.name.startsWith("mcp__")) {
40
+ const server = c.name.slice(5).split("__")[0] || "";
41
+ const plug = /^plugin_([^_]+(?:-[^_]+)*)_/.exec(server);
42
+ keys.push(plug ? "plugin:" + plug[1] : "mcp:" + server);
43
+ }
44
+ }
45
+ return keys;
46
+ }
47
+ function eventsFromLine(line) {
48
+ if (!line.includes('"tool_use"') && !line.includes("<command-name>")) return null;
49
+ let o;
50
+ try {
51
+ o = JSON.parse(line);
52
+ } catch {
53
+ return null;
54
+ }
55
+ const day = dayOf(o.timestamp);
56
+ if (!day) return null;
57
+ const content = o.message?.content;
58
+ let keys = [];
59
+ if (o.type === "assistant" && Array.isArray(content)) keys = toolKeys(content);
60
+ else if (o.type === "user") {
61
+ const text = typeof content === "string" ? content : Array.isArray(content) ? content.map((c) => typeof c === "string" ? c : c?.text || "").join(" ") : "";
62
+ const m = /<command-name>\/?([^<\s]+)<\/command-name>/.exec(text);
63
+ if (m) keys = ["cmd:" + m[1]];
64
+ }
65
+ return keys.length ? { day, keys } : null;
66
+ }
67
+ function listTranscripts(dir, depth = 0, out = []) {
68
+ let items;
69
+ try {
70
+ items = readdirSync2(dir, { withFileTypes: true });
71
+ } catch {
72
+ return out;
73
+ }
74
+ for (const d of items) {
75
+ const full = join2(dir, d.name);
76
+ if (d.isDirectory() && depth < 4) listTranscripts(full, depth + 1, out);
77
+ else if (d.isFile() && d.name.endsWith(".jsonl")) out.push(full);
78
+ }
79
+ return out;
80
+ }
81
+ function readNew(path, rec, size) {
82
+ const fd = openSync(path, "r");
83
+ const buf = Buffer.alloc(CHUNK);
84
+ let pos = rec.offset;
85
+ let rest = "";
86
+ try {
87
+ while (pos < size) {
88
+ const n = readSync(fd, buf, 0, Math.min(CHUNK, size - pos), pos);
89
+ if (n <= 0) break;
90
+ pos += n;
91
+ const lines = (rest + buf.toString("utf8", 0, n)).split("\n");
92
+ rest = lines.pop() || "";
93
+ for (const line of lines) {
94
+ const ev = eventsFromLine(line);
95
+ if (!ev) continue;
96
+ const d = rec.days[ev.day] ||= {};
97
+ for (const k of ev.keys) d[k] = (d[k] || 0) + 1;
98
+ }
99
+ }
100
+ } finally {
101
+ closeSync(fd);
102
+ }
103
+ rec.offset = pos - Buffer.byteLength(rest, "utf8");
104
+ }
105
+ function createUsage(ctx2) {
106
+ let db = null;
107
+ const load = () => db ||= readJson(ctx2.usageFile, null) || { versao: 1, files: {} };
108
+ function refresh({ onProgress = () => {
109
+ }, now = Date.now() } = {}) {
110
+ const data = load();
111
+ const files = listTranscripts(ctx2.projectsDir);
112
+ let done = 0;
113
+ for (const path of files) {
114
+ let st;
115
+ try {
116
+ st = statSync2(path);
117
+ } catch {
118
+ continue;
119
+ }
120
+ let rec = data.files[path];
121
+ if (!rec || st.size < rec.offset) rec = data.files[path] = { offset: 0, days: {} };
122
+ if (st.size > rec.offset) {
123
+ try {
124
+ readNew(path, rec, st.size);
125
+ } catch {
126
+ }
127
+ }
128
+ rec.seen = now;
129
+ onProgress({ done: ++done, total: files.length });
130
+ }
131
+ const cutoff = dayOf(now - KEEP_DAYS * 864e5) || "";
132
+ for (const rec of Object.values(data.files)) for (const d of Object.keys(rec.days)) if (d < cutoff) delete rec.days[d];
133
+ data.updatedAt = new Date(now).toISOString();
134
+ try {
135
+ writeJson(ctx2.usageFile, data);
136
+ } catch {
137
+ }
138
+ return data;
139
+ }
140
+ function totals(days = 30, now = Date.now()) {
141
+ const data = load();
142
+ const from = dayOf(now - (days - 1) * 864e5) || "";
143
+ const count = {};
144
+ const last2 = {};
145
+ const perDay = {};
146
+ for (const rec of Object.values(data.files)) {
147
+ for (const [day, keys] of Object.entries(rec.days)) {
148
+ for (const [k, n] of Object.entries(keys)) {
149
+ if (!last2[k] || day > last2[k]) last2[k] = day;
150
+ if (day < from) continue;
151
+ count[k] = (count[k] || 0) + n;
152
+ perDay[day] = (perDay[day] || 0) + n;
153
+ }
154
+ }
155
+ }
156
+ return { days, from, count, last: last2, perDay, updatedAt: data.updatedAt || null, files: Object.keys(data.files).length };
157
+ }
158
+ return { refresh, totals };
159
+ }
160
+
161
+ // ../../apps/gerenciador/src/agente/workers/usage-worker.ts
162
+ var { ctx, windows = [7, 30, 90] } = workerData;
163
+ var usage = createUsage(ctx);
164
+ var last = 0;
165
+ usage.refresh({
166
+ onProgress: ({ done, total }) => {
167
+ const now = Date.now();
168
+ if (now - last > 250 || done === total) {
169
+ last = now;
170
+ parentPort?.postMessage({ type: "progress", done, total });
171
+ }
172
+ }
173
+ });
174
+ parentPort?.postMessage({ type: "done", totals: Object.fromEntries(windows.map((d) => [d, usage.totals(d)])) });
package/package.json CHANGED
@@ -1,77 +1,52 @@
1
1
  {
2
2
  "name": "specialist-agent",
3
- "version": "2.12.0",
3
+ "version": "3.2.0",
4
+ "description": "Gerenciador de pacotes de IA para o Claude Code: instala o agente local e abre o gerenciador no navegador, ou instala pelo terminal mods, skills, plugins, conectores MCP e programas de IA, com checagem do PC.",
4
5
  "type": "module",
5
- "description": "AI agents for Claude Code — any framework, any stack",
6
6
  "bin": {
7
- "specialist-agent": "cli/index.mjs"
7
+ "specialist-agent": "dist/specialist-agent.mjs"
8
8
  },
9
9
  "files": [
10
- "cli",
11
- "agents",
12
- "packs",
13
- "skills",
14
- "hooks",
15
- ".claude-plugin",
16
- ".cursor-plugin",
17
- ".codex",
18
- ".opencode",
19
- "templates",
10
+ "dist",
20
11
  "README.md",
21
12
  "LICENSE"
22
13
  ],
23
14
  "scripts": {
24
- "prepare": "husky",
25
- "docs:dev": "vitepress dev docs",
26
- "docs:build": "vitepress build docs",
27
- "docs:preview": "vitepress preview docs",
28
- "test": "node tests/validate-agents.mjs && node tests/test-skills.mjs",
29
- "test:validate": "node tests/validate-agents.mjs",
30
- "test:validate:strict": "node tests/validate-agents.mjs --strict",
31
- "test:skills": "node tests/test-skills.mjs",
32
- "test:hooks": "node tests/test-native-hooks.mjs",
33
- "generate:preview": "node scripts/generate-social-preview.mjs"
34
- },
35
- "devDependencies": {
36
- "@commitlint/cli": "^20.4.2",
37
- "@commitlint/config-conventional": "^20.4.2",
38
- "husky": "^9.1.7",
39
- "mermaid": "^11.12.3",
40
- "vitepress": "^1.6.3",
41
- "vitepress-plugin-mermaid": "^2.0.17"
15
+ "build": "node scripts/empacotar.mjs",
16
+ "prepack": "node scripts/empacotar.mjs",
17
+ "test": "vitest run",
18
+ "typecheck": "tsc -p tsconfig.json && tsc -p test/tsconfig.json"
42
19
  },
43
- "keywords": [
44
- "claude-code",
45
- "ai-agents",
46
- "vue",
47
- "react",
48
- "nextjs",
49
- "svelte",
50
- "developer-tools",
51
- "code-generation",
52
- "tdd",
53
- "code-review",
54
- "debugging",
55
- "cursor",
56
- "codex"
57
- ],
58
20
  "engines": {
59
- "node": ">=18"
21
+ "node": ">=20"
60
22
  },
23
+ "author": "Herbert Vicente Cotta Julio <hvcotta@gmail.com>",
61
24
  "license": "MIT",
25
+ "homepage": "https://specialistagent.com.br",
62
26
  "repository": {
63
27
  "type": "git",
64
- "url": "https://github.com/HerbertJulio/specialist-agent"
28
+ "url": "git+https://github.com/HerbertJulio/specialist-agent.git",
29
+ "directory": "packages/cli"
65
30
  },
66
- "homepage": "https://specialistagent.com.br/",
67
- "bugs": {
68
- "url": "https://github.com/HerbertJulio/specialist-agent/issues"
69
- },
70
- "funding": {
71
- "type": "github",
72
- "url": "https://github.com/sponsors/HerbertJulio"
31
+ "keywords": [
32
+ "claude-code",
33
+ "plugins",
34
+ "skills",
35
+ "mcp",
36
+ "mods",
37
+ "ai",
38
+ "installer",
39
+ "catalog",
40
+ "local-agent",
41
+ "pwa"
42
+ ],
43
+ "publishConfig": {
44
+ "access": "public",
45
+ "provenance": true
73
46
  },
74
- "dependencies": {
75
- "@clack/prompts": "^1.0.1"
47
+ "devDependencies": {
48
+ "@specialist-agent/core": "*",
49
+ "@specialist-agent/gerenciador": "*",
50
+ "esbuild": "0.28.2"
76
51
  }
77
52
  }
@@ -1,52 +0,0 @@
1
- {
2
- "name": "specialist-agent",
3
- "owner": {
4
- "name": "Herbert Julio",
5
- "email": "herbert@specialistagent.com.br"
6
- },
7
- "metadata": {
8
- "description": "Your AI development team — 36 agents and 32 skills for building, reviewing, debugging, and shipping production code.",
9
- "version": "2.11.3"
10
- },
11
- "plugins": [
12
- {
13
- "name": "specialist-agent",
14
- "source": ".",
15
- "description": "36 specialized agents and 32 skills. Supports Vue, React, Next.js, SvelteKit, Angular, Astro, and Nuxt with framework-specific patterns.",
16
- "version": "2.11.3",
17
- "author": {
18
- "name": "Herbert Julio",
19
- "email": "herbert@specialistagent.com.br"
20
- },
21
- "homepage": "https://specialistagent.com.br/",
22
- "repository": "https://github.com/HerbertJulio/specialist-agent",
23
- "license": "MIT",
24
- "keywords": [
25
- "agents",
26
- "ai-agents",
27
- "code-generation",
28
- "code-review",
29
- "tdd",
30
- "debugging",
31
- "architecture",
32
- "vue",
33
- "react",
34
- "nextjs",
35
- "svelte",
36
- "angular",
37
- "astro",
38
- "nuxt"
39
- ],
40
- "category": "development",
41
- "tags": [
42
- "ai-agents",
43
- "code-generation",
44
- "code-review",
45
- "testing",
46
- "development",
47
- "security",
48
- "architecture"
49
- ]
50
- }
51
- ]
52
- }
@@ -1,37 +0,0 @@
1
- {
2
- "name": "specialist-agent",
3
- "version": "2.11.3",
4
- "description": "Your AI development team. 36 agents and 32 skills for building, reviewing, debugging, and shipping production code. Supports Vue, React, Next.js, SvelteKit, Angular, Astro, and Nuxt.",
5
- "author": {
6
- "name": "Herbert Julio",
7
- "email": "herbert@specialistagent.com.br",
8
- "url": "https://github.com/HerbertJulio"
9
- },
10
- "repository": "https://github.com/HerbertJulio/specialist-agent",
11
- "homepage": "https://specialistagent.com.br/",
12
- "license": "MIT",
13
- "keywords": [
14
- "agents",
15
- "ai-agents",
16
- "vue",
17
- "react",
18
- "nextjs",
19
- "svelte",
20
- "angular",
21
- "astro",
22
- "nuxt",
23
- "code-generation",
24
- "code-review",
25
- "tdd",
26
- "debugging",
27
- "architecture"
28
- ],
29
- "agents": "./agents",
30
- "skills": "./skills",
31
- "hooks": "./hooks/hooks.json",
32
- "mcpServers": "./.mcp.json",
33
- "install": {
34
- "command": "npx specialist-agent init",
35
- "postInstall": "Select your framework pack when prompted"
36
- }
37
- }
package/.codex/INSTALL.md DELETED
@@ -1,145 +0,0 @@
1
- # Specialist Agent for Codex
2
-
3
- AI agents for any framework — Vue 3, React, Next.js, SvelteKit, Angular, Astro, Nuxt.
4
-
5
- ## Quick Install
6
-
7
- ### Option 1: CLI (Recommended)
8
-
9
- ```bash
10
- cd /path/to/your-project
11
- npx specialist-agent init
12
- ```
13
-
14
- The wizard will:
15
- 1. Auto-detect your framework from `package.json`
16
- 2. Let you choose Full or Lite mode
17
- 3. Install agents and skills to `.claude/`
18
-
19
- ### Option 2: Manual Installation
20
-
21
- 1. **Clone the repository:**
22
- ```bash
23
- git clone https://github.com/HerbertJulio/specialist-agent.git
24
- ```
25
-
26
- 2. **Copy your framework pack:**
27
- ```bash
28
- # For React projects
29
- cp -r specialist-agent/packs/react/* your-project/.claude/
30
-
31
- # For Vue projects
32
- cp -r specialist-agent/packs/vue/* your-project/.claude/
33
-
34
- # For Next.js projects
35
- cp -r specialist-agent/packs/nextjs/* your-project/.claude/
36
-
37
- # For SvelteKit projects
38
- cp -r specialist-agent/packs/svelte/* your-project/.claude/
39
-
40
- # For Angular projects
41
- cp -r specialist-agent/packs/angular/* your-project/.claude/
42
-
43
- # For Astro projects
44
- cp -r specialist-agent/packs/astro/* your-project/.claude/
45
-
46
- # For Nuxt projects
47
- cp -r specialist-agent/packs/nuxt/* your-project/.claude/
48
- ```
49
-
50
- 3. **Copy CLAUDE.md to your project root:**
51
- ```bash
52
- cp specialist-agent/packs/{your-framework}/CLAUDE.md your-project/CLAUDE.md
53
- ```
54
-
55
- 4. **Copy framework-agnostic agents (optional):**
56
- ```bash
57
- cp -r specialist-agent/agents/* your-project/.claude/agents/
58
- ```
59
-
60
- ## Usage in Codex
61
-
62
- Once installed, use agents by mentioning them:
63
-
64
- ```
65
- @builder create an orders module with CRUD for /v2/orders
66
- @reviewer review the authentication module
67
- @tdd implement the payment service with tests first
68
- @planner plan the user dashboard feature
69
- ```
70
-
71
- ## Available Agents
72
-
73
- ### Core
74
- - `@starter` - Create new projects from scratch
75
- - `@builder` - Build modules, components, services (pack-specific)
76
- - `@reviewer` - Unified 3-in-1 code review (pack-specific)
77
- - `@doctor` - Bug investigation (pack-specific)
78
- - `@migrator` - Legacy code migration (pack-specific)
79
-
80
- ### Workflow
81
- - `@planner` - Adaptive task planning
82
- - `@executor` - Cost-aware task execution
83
- - `@tdd` - Test-Driven Development enforcer
84
- - `@debugger` - Systematic 4-phase debugging
85
- - `@pair` - Real-time pair programming
86
- - `@analyst` - Requirements to technical specs
87
- - `@orchestrator` - Coordinate multiple agents
88
-
89
- ### Engineering
90
- - `@api` - REST/GraphQL API design
91
- - `@perf` - Performance optimization
92
- - `@i18n` - Internationalization
93
- - `@docs` - Documentation generation
94
- - `@refactor` - Code refactoring
95
- - `@deps` - Dependency management
96
- - `@explorer` - Deep codebase exploration
97
- - `@finance` - Payment and billing systems
98
- - `@cloud` - Cloud architecture and IaC
99
- - `@security` - Authentication and OWASP
100
- - `@designer` - UI/UX and design systems
101
- - `@data` - Database and caching
102
- - `@devops` - Docker, K8s, CI/CD
103
- - `@tester` - Test strategies and coverage
104
- - `@legal` - GDPR, LGPD compliance
105
- - `@architect` - Architecture migration
106
- - `@ripple` - Cascading effect analysis
107
-
108
- ### Business
109
- - `@marketing` - Landing pages, copy, SEO, growth
110
- - `@product` - Roadmaps, specs, PRDs
111
- - `@support` - Help docs, FAQs, runbooks
112
-
113
- ### Automation
114
- - `@sentry-triage` - Triage Sentry errors, auto-fix
115
- - `@autopilot` - Iterative autonomous builds
116
-
117
- ## Skills
118
-
119
- Quick shortcuts for common tasks:
120
-
121
- ```
122
- /plan [feature] - Create adaptive implementation plan
123
- /tdd [module] - TDD workflow: RED → GREEN → REFACTOR
124
- /debug [error] - Systematic debugging
125
- /checkpoint [name] - Create git checkpoint
126
- /estimate [feature] - Estimate token cost
127
- /dev-create-module [name] - Scaffold complete module
128
- ```
129
-
130
- ## Mode Selection
131
-
132
- | Mode | Model | Cost | Best For |
133
- |------|-------|------|----------|
134
- | Full | Sonnet/Opus | Higher | Complex features, architecture |
135
- | Lite | Haiku | Lower | Simple tasks, quick fixes |
136
-
137
- ## Support
138
-
139
- - Documentation: <https://specialistagent.com.br/>
140
- - Issues: https://github.com/HerbertJulio/specialist-agent/issues
141
- - Discussions: https://github.com/HerbertJulio/specialist-agent/discussions
142
-
143
- ## License
144
-
145
- MIT - Use freely.
@@ -1,52 +0,0 @@
1
- {
2
- "name": "specialist-agent",
3
- "owner": {
4
- "name": "Herbert Julio",
5
- "email": "herbert@specialistagent.com.br"
6
- },
7
- "metadata": {
8
- "description": "Your AI development team — 36 agents and 32 skills for building, reviewing, debugging, and shipping production code.",
9
- "version": "2.11.3"
10
- },
11
- "plugins": [
12
- {
13
- "name": "specialist-agent",
14
- "source": ".",
15
- "description": "36 specialized agents and 32 skills. Supports Vue, React, Next.js, SvelteKit, Angular, Astro, and Nuxt with framework-specific patterns.",
16
- "version": "2.11.3",
17
- "author": {
18
- "name": "Herbert Julio",
19
- "email": "herbert@specialistagent.com.br"
20
- },
21
- "homepage": "https://specialistagent.com.br/",
22
- "repository": "https://github.com/HerbertJulio/specialist-agent",
23
- "license": "MIT",
24
- "keywords": [
25
- "agents",
26
- "ai-agents",
27
- "code-generation",
28
- "code-review",
29
- "tdd",
30
- "debugging",
31
- "architecture",
32
- "vue",
33
- "react",
34
- "nextjs",
35
- "svelte",
36
- "angular",
37
- "astro",
38
- "nuxt"
39
- ],
40
- "category": "development",
41
- "tags": [
42
- "ai-agents",
43
- "code-generation",
44
- "code-review",
45
- "testing",
46
- "development",
47
- "security",
48
- "architecture"
49
- ]
50
- }
51
- ]
52
- }
@@ -1,37 +0,0 @@
1
- {
2
- "name": "specialist-agent",
3
- "version": "2.11.3",
4
- "description": "Your AI development team. 36 agents and 32 skills for building, reviewing, debugging, and shipping production code.",
5
- "author": {
6
- "name": "Herbert Julio",
7
- "email": "herbert@specialistagent.com.br",
8
- "url": "https://github.com/HerbertJulio"
9
- },
10
- "repository": "https://github.com/HerbertJulio/specialist-agent",
11
- "homepage": "https://specialistagent.com.br/",
12
- "license": "MIT",
13
- "keywords": [
14
- "agents",
15
- "ai-agents",
16
- "vue",
17
- "react",
18
- "nextjs",
19
- "svelte",
20
- "angular",
21
- "astro",
22
- "nuxt",
23
- "code-generation",
24
- "code-review",
25
- "tdd",
26
- "debugging",
27
- "architecture"
28
- ],
29
- "agents": "./agents",
30
- "skills": "./skills",
31
- "hooks": "./hooks/hooks.json",
32
- "mcpServers": "./.mcp.json",
33
- "install": {
34
- "command": "npx specialist-agent init",
35
- "postInstall": "Select your framework pack when prompted"
36
- }
37
- }