invos 1.0.0 → 2.0.2

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 (304) hide show
  1. package/README.md +21 -28
  2. package/bin/invos.js +33 -27
  3. package/kit/.agents/skills/abrir/SKILL.md +41 -0
  4. package/kit/.agents/skills/analisar-dados/SKILL.md +95 -0
  5. package/kit/.agents/skills/anuncio-google/SKILL.md +174 -0
  6. package/kit/.agents/skills/aprovar-post/SKILL.md +151 -0
  7. package/kit/.agents/skills/atualizar/SKILL.md +57 -0
  8. package/kit/.agents/skills/canvas-design/LICENSE.txt +202 -0
  9. package/kit/.agents/skills/canvas-design/SKILL.md +134 -0
  10. package/kit/.agents/skills/canvas-design/canvas-fonts/ArsenalSC-OFL.txt +93 -0
  11. package/kit/.agents/skills/canvas-design/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
  12. package/kit/.agents/skills/canvas-design/canvas-fonts/BigShoulders-Bold.ttf +0 -0
  13. package/kit/.agents/skills/canvas-design/canvas-fonts/BigShoulders-OFL.txt +93 -0
  14. package/kit/.agents/skills/canvas-design/canvas-fonts/BigShoulders-Regular.ttf +0 -0
  15. package/kit/.agents/skills/canvas-design/canvas-fonts/Boldonse-OFL.txt +93 -0
  16. package/kit/.agents/skills/canvas-design/canvas-fonts/Boldonse-Regular.ttf +0 -0
  17. package/kit/.agents/skills/canvas-design/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
  18. package/kit/.agents/skills/canvas-design/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
  19. package/kit/.agents/skills/canvas-design/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
  20. package/kit/.agents/skills/canvas-design/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
  21. package/kit/.agents/skills/canvas-design/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
  22. package/kit/.agents/skills/canvas-design/canvas-fonts/CrimsonPro-OFL.txt +93 -0
  23. package/kit/.agents/skills/canvas-design/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
  24. package/kit/.agents/skills/canvas-design/canvas-fonts/DMMono-OFL.txt +93 -0
  25. package/kit/.agents/skills/canvas-design/canvas-fonts/DMMono-Regular.ttf +0 -0
  26. package/kit/.agents/skills/canvas-design/canvas-fonts/EricaOne-OFL.txt +94 -0
  27. package/kit/.agents/skills/canvas-design/canvas-fonts/EricaOne-Regular.ttf +0 -0
  28. package/kit/.agents/skills/canvas-design/canvas-fonts/GeistMono-Bold.ttf +0 -0
  29. package/kit/.agents/skills/canvas-design/canvas-fonts/GeistMono-OFL.txt +93 -0
  30. package/kit/.agents/skills/canvas-design/canvas-fonts/GeistMono-Regular.ttf +0 -0
  31. package/kit/.agents/skills/canvas-design/canvas-fonts/Gloock-OFL.txt +93 -0
  32. package/kit/.agents/skills/canvas-design/canvas-fonts/Gloock-Regular.ttf +0 -0
  33. package/kit/.agents/skills/canvas-design/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
  34. package/kit/.agents/skills/canvas-design/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
  35. package/kit/.agents/skills/canvas-design/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
  36. package/kit/.agents/skills/canvas-design/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
  37. package/kit/.agents/skills/canvas-design/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
  38. package/kit/.agents/skills/canvas-design/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
  39. package/kit/.agents/skills/canvas-design/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
  40. package/kit/.agents/skills/canvas-design/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
  41. package/kit/.agents/skills/canvas-design/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
  42. package/kit/.agents/skills/canvas-design/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
  43. package/kit/.agents/skills/canvas-design/canvas-fonts/InstrumentSans-OFL.txt +93 -0
  44. package/kit/.agents/skills/canvas-design/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
  45. package/kit/.agents/skills/canvas-design/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
  46. package/kit/.agents/skills/canvas-design/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
  47. package/kit/.agents/skills/canvas-design/canvas-fonts/Italiana-OFL.txt +93 -0
  48. package/kit/.agents/skills/canvas-design/canvas-fonts/Italiana-Regular.ttf +0 -0
  49. package/kit/.agents/skills/canvas-design/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
  50. package/kit/.agents/skills/canvas-design/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
  51. package/kit/.agents/skills/canvas-design/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
  52. package/kit/.agents/skills/canvas-design/canvas-fonts/Jura-Light.ttf +0 -0
  53. package/kit/.agents/skills/canvas-design/canvas-fonts/Jura-Medium.ttf +0 -0
  54. package/kit/.agents/skills/canvas-design/canvas-fonts/Jura-OFL.txt +93 -0
  55. package/kit/.agents/skills/canvas-design/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
  56. package/kit/.agents/skills/canvas-design/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
  57. package/kit/.agents/skills/canvas-design/canvas-fonts/Lora-Bold.ttf +0 -0
  58. package/kit/.agents/skills/canvas-design/canvas-fonts/Lora-BoldItalic.ttf +0 -0
  59. package/kit/.agents/skills/canvas-design/canvas-fonts/Lora-Italic.ttf +0 -0
  60. package/kit/.agents/skills/canvas-design/canvas-fonts/Lora-OFL.txt +93 -0
  61. package/kit/.agents/skills/canvas-design/canvas-fonts/Lora-Regular.ttf +0 -0
  62. package/kit/.agents/skills/canvas-design/canvas-fonts/NationalPark-Bold.ttf +0 -0
  63. package/kit/.agents/skills/canvas-design/canvas-fonts/NationalPark-OFL.txt +93 -0
  64. package/kit/.agents/skills/canvas-design/canvas-fonts/NationalPark-Regular.ttf +0 -0
  65. package/kit/.agents/skills/canvas-design/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
  66. package/kit/.agents/skills/canvas-design/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
  67. package/kit/.agents/skills/canvas-design/canvas-fonts/Outfit-Bold.ttf +0 -0
  68. package/kit/.agents/skills/canvas-design/canvas-fonts/Outfit-OFL.txt +93 -0
  69. package/kit/.agents/skills/canvas-design/canvas-fonts/Outfit-Regular.ttf +0 -0
  70. package/kit/.agents/skills/canvas-design/canvas-fonts/PixelifySans-Medium.ttf +0 -0
  71. package/kit/.agents/skills/canvas-design/canvas-fonts/PixelifySans-OFL.txt +93 -0
  72. package/kit/.agents/skills/canvas-design/canvas-fonts/PoiretOne-OFL.txt +93 -0
  73. package/kit/.agents/skills/canvas-design/canvas-fonts/PoiretOne-Regular.ttf +0 -0
  74. package/kit/.agents/skills/canvas-design/canvas-fonts/RedHatMono-Bold.ttf +0 -0
  75. package/kit/.agents/skills/canvas-design/canvas-fonts/RedHatMono-OFL.txt +93 -0
  76. package/kit/.agents/skills/canvas-design/canvas-fonts/RedHatMono-Regular.ttf +0 -0
  77. package/kit/.agents/skills/canvas-design/canvas-fonts/Silkscreen-OFL.txt +93 -0
  78. package/kit/.agents/skills/canvas-design/canvas-fonts/Silkscreen-Regular.ttf +0 -0
  79. package/kit/.agents/skills/canvas-design/canvas-fonts/SmoochSans-Medium.ttf +0 -0
  80. package/kit/.agents/skills/canvas-design/canvas-fonts/SmoochSans-OFL.txt +93 -0
  81. package/kit/.agents/skills/canvas-design/canvas-fonts/Tektur-Medium.ttf +0 -0
  82. package/kit/.agents/skills/canvas-design/canvas-fonts/Tektur-OFL.txt +93 -0
  83. package/kit/.agents/skills/canvas-design/canvas-fonts/Tektur-Regular.ttf +0 -0
  84. package/kit/.agents/skills/canvas-design/canvas-fonts/WorkSans-Bold.ttf +0 -0
  85. package/kit/.agents/skills/canvas-design/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
  86. package/kit/.agents/skills/canvas-design/canvas-fonts/WorkSans-Italic.ttf +0 -0
  87. package/kit/.agents/skills/canvas-design/canvas-fonts/WorkSans-OFL.txt +93 -0
  88. package/kit/.agents/skills/canvas-design/canvas-fonts/WorkSans-Regular.ttf +0 -0
  89. package/kit/.agents/skills/canvas-design/canvas-fonts/YoungSerif-OFL.txt +93 -0
  90. package/kit/.agents/skills/canvas-design/canvas-fonts/YoungSerif-Regular.ttf +0 -0
  91. package/kit/.agents/skills/carrossel/SKILL.md +272 -0
  92. package/kit/.agents/skills/email-profissional/SKILL.md +70 -0
  93. package/kit/.agents/skills/frontend-design/LICENSE.txt +177 -0
  94. package/kit/.agents/skills/frontend-design/SKILL.md +55 -0
  95. package/kit/.agents/skills/instalar/SKILL.md +170 -0
  96. package/kit/.agents/skills/mapear-rotinas/SKILL.md +75 -0
  97. package/kit/.agents/skills/notion/SKILL.md +134 -0
  98. package/kit/.agents/skills/novo-projeto/SKILL.md +94 -0
  99. package/kit/.agents/skills/publicar-tema/SKILL.md +154 -0
  100. package/kit/.agents/skills/relatorio-ads/SKILL.md +163 -0
  101. package/kit/.agents/skills/responder-avaliacoes/SKILL.md +100 -0
  102. package/kit/.agents/skills/salvar/SKILL.md +49 -0
  103. package/kit/.agents/skills/seo/SKILL.md +310 -0
  104. package/kit/.agents/skills/youtube-summarizer/SKILL.md +223 -0
  105. package/kit/.agents/squads/README.md +84 -0
  106. package/kit/.agents/squads/hormozi-squad/README.md +1 -2
  107. package/kit/AGENTS.md +96 -137
  108. package/kit/INVOS.json +28 -20
  109. package/kit/{.agents/skills/stop-slop/LICENSE → LICENSE} +1 -1
  110. package/kit/README.md +87 -399
  111. package/kit/_memoria/empresa.md +18 -0
  112. package/kit/_memoria/estrategia.md +25 -0
  113. package/kit/_memoria/preferencias.md +12 -0
  114. package/kit/dados/README.md +15 -0
  115. package/kit/marca/design-guide.md +59 -0
  116. package/kit/marketing/README.md +44 -0
  117. package/kit/saidas/README.md +29 -0
  118. package/kit/scripts/README.md +51 -0
  119. package/kit/templates/perfis/agents-agencia.md +70 -0
  120. package/kit/templates/perfis/agents-empresa.md +75 -0
  121. package/kit/templates/perfis/agents-freelancer.md +68 -0
  122. package/kit/templates/perfis/agents-solopreneur.md +68 -0
  123. package/package.json +6 -11
  124. package/src/commands/doctor.js +63 -78
  125. package/src/commands/init.js +35 -24
  126. package/src/commands/install.js +16 -20
  127. package/src/commands/update.js +28 -66
  128. package/src/lock.js +9 -11
  129. package/src/manifest.js +1 -1
  130. package/src/resolve-kit.js +27 -12
  131. package/src/symlinks.js +36 -53
  132. package/src/utils.js +43 -66
  133. package/kit/.agents/skills/apple/DESCRIPTION.md +0 -2
  134. package/kit/.agents/skills/apple/apple-notes/SKILL.md +0 -90
  135. package/kit/.agents/skills/apple/apple-reminders/SKILL.md +0 -130
  136. package/kit/.agents/skills/audit/SKILL.md +0 -177
  137. package/kit/.agents/skills/design-marca/SKILL.md +0 -92
  138. package/kit/.agents/skills/instagram-carrossel/SKILL.md +0 -79
  139. package/kit/.agents/skills/instagram-carrossel/references/fetch-assets.md +0 -77
  140. package/kit/.agents/skills/instagram-carrossel/references/publish.md +0 -48
  141. package/kit/.agents/skills/instagram-carrossel/references/render-png.md +0 -147
  142. package/kit/.agents/skills/instagram-carrossel/scripts/publish.js +0 -165
  143. package/kit/.agents/skills/llm-wiki/SKILL.md +0 -507
  144. package/kit/.agents/skills/onboard/SKILL.md +0 -152
  145. package/kit/.agents/skills/pd-ikigai/SKILL.md +0 -269
  146. package/kit/.agents/skills/productivity/DESCRIPTION.md +0 -3
  147. package/kit/.agents/skills/productivity/google-workspace/SKILL.md +0 -335
  148. package/kit/.agents/skills/productivity/google-workspace/references/gmail-search-syntax.md +0 -63
  149. package/kit/.agents/skills/productivity/google-workspace/scripts/_hermes_home.py +0 -42
  150. package/kit/.agents/skills/productivity/google-workspace/scripts/google_api.py +0 -1225
  151. package/kit/.agents/skills/productivity/google-workspace/scripts/gws_bridge.py +0 -111
  152. package/kit/.agents/skills/productivity/google-workspace/scripts/setup.py +0 -481
  153. package/kit/.agents/skills/productivity/nano-pdf/SKILL.md +0 -52
  154. package/kit/.agents/skills/productivity/notion/SKILL.md +0 -448
  155. package/kit/.agents/skills/productivity/notion/references/block-types.md +0 -112
  156. package/kit/.agents/skills/productivity/ocr-and-documents/DESCRIPTION.md +0 -3
  157. package/kit/.agents/skills/productivity/ocr-and-documents/SKILL.md +0 -172
  158. package/kit/.agents/skills/productivity/ocr-and-documents/scripts/extract_marker.py +0 -87
  159. package/kit/.agents/skills/productivity/ocr-and-documents/scripts/extract_pymupdf.py +0 -98
  160. package/kit/.agents/skills/productivity/powerpoint/LICENSE.txt +0 -30
  161. package/kit/.agents/skills/productivity/powerpoint/SKILL.md +0 -237
  162. package/kit/.agents/skills/productivity/powerpoint/editing.md +0 -205
  163. package/kit/.agents/skills/productivity/powerpoint/pptxgenjs.md +0 -420
  164. package/kit/.agents/skills/productivity/powerpoint/scripts/__init__.py +0 -0
  165. package/kit/.agents/skills/productivity/powerpoint/scripts/add_slide.py +0 -195
  166. package/kit/.agents/skills/productivity/powerpoint/scripts/clean.py +0 -286
  167. package/kit/.agents/skills/productivity/powerpoint/scripts/office/helpers/__init__.py +0 -0
  168. package/kit/.agents/skills/productivity/powerpoint/scripts/office/helpers/merge_runs.py +0 -199
  169. package/kit/.agents/skills/productivity/powerpoint/scripts/office/helpers/simplify_redlines.py +0 -197
  170. package/kit/.agents/skills/productivity/powerpoint/scripts/office/pack.py +0 -159
  171. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +0 -1499
  172. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +0 -146
  173. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +0 -1085
  174. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +0 -11
  175. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +0 -3081
  176. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +0 -23
  177. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +0 -185
  178. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +0 -287
  179. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +0 -1676
  180. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +0 -28
  181. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +0 -144
  182. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +0 -174
  183. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +0 -25
  184. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +0 -18
  185. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +0 -59
  186. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +0 -56
  187. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +0 -195
  188. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +0 -582
  189. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +0 -25
  190. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +0 -4439
  191. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +0 -570
  192. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +0 -509
  193. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +0 -12
  194. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +0 -108
  195. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +0 -96
  196. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +0 -3646
  197. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +0 -116
  198. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ecma/fourth-edition/opc-contentTypes.xsd +0 -42
  199. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ecma/fourth-edition/opc-coreProperties.xsd +0 -50
  200. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ecma/fourth-edition/opc-digSig.xsd +0 -49
  201. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ecma/fourth-edition/opc-relationships.xsd +0 -33
  202. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/mce/mc.xsd +0 -75
  203. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-2010.xsd +0 -560
  204. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-2012.xsd +0 -67
  205. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-2018.xsd +0 -14
  206. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-cex-2018.xsd +0 -20
  207. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-cid-2016.xsd +0 -13
  208. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +0 -4
  209. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-symex-2015.xsd +0 -8
  210. package/kit/.agents/skills/proposta/SKILL.md +0 -159
  211. package/kit/.agents/skills/proposta/references/proposta-avancada.md +0 -17
  212. package/kit/.agents/skills/proposta/references/proposta.html +0 -187
  213. package/kit/.agents/skills/session-checkpoint/SKILL.md +0 -80
  214. package/kit/.agents/skills/session-end/SKILL.md +0 -166
  215. package/kit/.agents/skills/session-start/SKILL.md +0 -149
  216. package/kit/.agents/skills/social-content/SKILL.md +0 -119
  217. package/kit/.agents/skills/stop-slop/CHANGELOG.md +0 -24
  218. package/kit/.agents/skills/stop-slop/README.md +0 -62
  219. package/kit/.agents/skills/stop-slop/SKILL.md +0 -68
  220. package/kit/.agents/skills/stop-slop/references/examples.md +0 -59
  221. package/kit/.agents/skills/stop-slop/references/phrases.md +0 -128
  222. package/kit/.agents/skills/stop-slop/references/structures.md +0 -134
  223. package/kit/.agents/squads/index.md +0 -14
  224. package/kit/.agents/squads/instagram-carrossel/DEPENDENCIES.md +0 -75
  225. package/kit/.agents/squads/instagram-carrossel/README.md +0 -52
  226. package/kit/.agents/squads/instagram-carrossel/RUN.md +0 -115
  227. package/kit/.agents/squads/instagram-carrossel/_memory/memories.md +0 -16
  228. package/kit/.agents/squads/instagram-carrossel/agents/copywriter/tasks/create-slides.md +0 -96
  229. package/kit/.agents/squads/instagram-carrossel/agents/copywriter/tasks/generate-angles.md +0 -111
  230. package/kit/.agents/squads/instagram-carrossel/agents/copywriter/tasks/optimize-copy.md +0 -81
  231. package/kit/.agents/squads/instagram-carrossel/agents/copywriter.custom.md +0 -73
  232. package/kit/.agents/squads/instagram-carrossel/agents/image-designer/tasks/create-slides.md +0 -132
  233. package/kit/.agents/squads/instagram-carrossel/agents/image-designer/tasks/propose-visual-identities.md +0 -89
  234. package/kit/.agents/squads/instagram-carrossel/agents/image-designer/tasks/render-export.md +0 -100
  235. package/kit/.agents/squads/instagram-carrossel/agents/image-designer.custom.md +0 -47
  236. package/kit/.agents/squads/instagram-carrossel/agents/publisher/tasks/validate-publish.md +0 -50
  237. package/kit/.agents/squads/instagram-carrossel/agents/publisher.custom.md +0 -26
  238. package/kit/.agents/squads/instagram-carrossel/agents/researcher/tasks/find-and-rank-news.md +0 -105
  239. package/kit/.agents/squads/instagram-carrossel/agents/researcher.custom.md +0 -46
  240. package/kit/.agents/squads/instagram-carrossel/agents/reviewer/tasks/generate-feedback.md +0 -91
  241. package/kit/.agents/squads/instagram-carrossel/agents/reviewer/tasks/score-content.md +0 -103
  242. package/kit/.agents/squads/instagram-carrossel/agents/reviewer.custom.md +0 -53
  243. package/kit/.agents/squads/instagram-carrossel/output/.gitkeep +0 -0
  244. package/kit/.agents/squads/instagram-carrossel/output/slides/.gitkeep +0 -0
  245. package/kit/.agents/squads/instagram-carrossel/output/slides/rendered/.gitkeep +0 -0
  246. package/kit/.agents/squads/instagram-carrossel/pipeline/data/anti-patterns.md +0 -125
  247. package/kit/.agents/squads/instagram-carrossel/pipeline/data/domain-framework.md +0 -92
  248. package/kit/.agents/squads/instagram-carrossel/pipeline/data/instagram-feed-best-practices.md +0 -235
  249. package/kit/.agents/squads/instagram-carrossel/pipeline/data/output-examples.md +0 -244
  250. package/kit/.agents/squads/instagram-carrossel/pipeline/data/quality-criteria.md +0 -120
  251. package/kit/.agents/squads/instagram-carrossel/pipeline/data/research-brief.md +0 -135
  252. package/kit/.agents/squads/instagram-carrossel/pipeline/data/tone-of-voice.md +0 -32
  253. package/kit/.agents/squads/instagram-carrossel/pipeline/pipeline.yaml +0 -136
  254. package/kit/.agents/squads/instagram-carrossel/pipeline/steps/step-01-input-content.md +0 -38
  255. package/kit/.agents/squads/instagram-carrossel/pipeline/steps/step-02-find-news.md +0 -42
  256. package/kit/.agents/squads/instagram-carrossel/pipeline/steps/step-03-select-story.md +0 -59
  257. package/kit/.agents/squads/instagram-carrossel/pipeline/steps/step-04-generate-angles.md +0 -45
  258. package/kit/.agents/squads/instagram-carrossel/pipeline/steps/step-05-select-angle.md +0 -64
  259. package/kit/.agents/squads/instagram-carrossel/pipeline/steps/step-06-create-copy.md +0 -51
  260. package/kit/.agents/squads/instagram-carrossel/pipeline/steps/step-07-approve-copy.md +0 -52
  261. package/kit/.agents/squads/instagram-carrossel/pipeline/steps/step-08-propose-visuals.md +0 -42
  262. package/kit/.agents/squads/instagram-carrossel/pipeline/steps/step-09-select-visual.md +0 -61
  263. package/kit/.agents/squads/instagram-carrossel/pipeline/steps/step-10-create-slides.md +0 -55
  264. package/kit/.agents/squads/instagram-carrossel/pipeline/steps/step-11-approve-images.md +0 -60
  265. package/kit/.agents/squads/instagram-carrossel/pipeline/steps/step-12-review.md +0 -55
  266. package/kit/.agents/squads/instagram-carrossel/pipeline/steps/step-13-publish.md +0 -79
  267. package/kit/.agents/squads/instagram-carrossel/squad-party.csv +0 -6
  268. package/kit/.agents/squads/instagram-carrossel/squad.yaml +0 -70
  269. package/kit/COMECE-AQUI.md +0 -207
  270. package/kit/MEMORY.md +0 -31
  271. package/kit/SECURITY.md +0 -39
  272. package/kit/clientes/README.md +0 -72
  273. package/kit/clientes/_index.md +0 -32
  274. package/kit/clientes/_template/arquivos/.gitkeep +0 -0
  275. package/kit/clientes/_template/contexto.md +0 -21
  276. package/kit/clientes/_template/entregas.md +0 -20
  277. package/kit/clientes/_template/perfil.md +0 -47
  278. package/kit/clientes/_template/propostas/.gitkeep +0 -0
  279. package/kit/conteudo/README.md +0 -12
  280. package/kit/conteudo/_fila.md +0 -12
  281. package/kit/conteudo/carrosseis/.gitkeep +0 -0
  282. package/kit/conteudo/publicados/.gitkeep +0 -0
  283. package/kit/docs/audit-enxugamento-sieve.md +0 -187
  284. package/kit/docs/cli.md +0 -62
  285. package/kit/docs/hotmart-webhook.md +0 -96
  286. package/kit/docs/lab-user.md +0 -35
  287. package/kit/docs/prd-invos-cli.md +0 -264
  288. package/kit/integracoes/README.md +0 -31
  289. package/kit/integracoes/composio/README.md +0 -128
  290. package/kit/integracoes/composio/marketing-tools.md +0 -61
  291. package/kit/marca/README.md +0 -13
  292. package/kit/marca/assets/.gitkeep +0 -0
  293. package/kit/marca/marca.md +0 -57
  294. package/kit/memoria/ativo.md +0 -18
  295. package/kit/memoria/decisoes.md +0 -26
  296. package/kit/memoria/empresa.md +0 -46
  297. package/kit/memoria/historico/README.md +0 -8
  298. package/kit/memoria/insights.md +0 -11
  299. package/kit/memoria/perfil.md +0 -29
  300. package/kit/memoria/projetos.md +0 -27
  301. package/kit/memoria/regras/_TEMPLATE-exemplo.md +0 -15
  302. package/kit/memoria/regras/task-com-dono.md +0 -18
  303. package/kit/scripts/smoke-estado.sh +0 -32
  304. package/kit/scripts/validar.sh +0 -206
@@ -1,44 +1,55 @@
1
- import { existsSync, mkdirSync } from 'node:fs';
2
- import { resolve } from 'node:path';
3
- import { collectFiles, copyFileWithDirs, ensureDir } from '../utils.js';
1
+ import { existsSync } from 'node:fs';
2
+ import { resolve, basename } from 'node:path';
3
+ import { collectFiles, copyFileWithDirs, ensureDir, isDevPath } from '../utils.js';
4
4
  import { buildLock, writeLock } from '../lock.js';
5
5
  import { syncClaudeSymlinks } from '../symlinks.js';
6
6
 
7
7
  export async function init(kit, kitRoot, args) {
8
- const idx = args.indexOf('--dir');
9
- let targetDir;
10
- if (idx !== -1 && args[idx + 1]) {
11
- targetDir = resolve(process.cwd(), args[idx + 1]);
12
- } else {
13
- targetDir = resolve(process.cwd(), args[0] || '.');
8
+ let name = null;
9
+ let targetDir = null;
10
+ const rest = [...args];
11
+
12
+ for (let i = 0; i < rest.length; i++) {
13
+ if (rest[i] === '--name' && rest[i + 1]) {
14
+ name = rest[i + 1];
15
+ rest.splice(i, 2);
16
+ i--;
17
+ } else if (rest[i] === '--dir' && rest[i + 1]) {
18
+ targetDir = resolve(process.cwd(), rest[i + 1]);
19
+ rest.splice(i, 2);
20
+ i--;
21
+ }
14
22
  }
15
23
 
16
- if (targetDir === '.' || !args[0]) {
17
- targetDir = process.cwd();
24
+ if (!targetDir) {
25
+ const slug = name || rest[0];
26
+ targetDir = slug && slug !== '.'
27
+ ? resolve(process.cwd(), slug)
28
+ : process.cwd();
18
29
  }
19
30
 
20
- if (existsSync(targetDir) && targetDir !== process.cwd()) {
21
- console.error(`Directory ${targetDir} already exists. Use install for existing projects.`);
31
+ if (existsSync(resolve(targetDir, 'AGENTS.md')) && existsSync(resolve(targetDir, 'INVOS-LOCK.json'))) {
32
+ console.error('Já parece INVOS. Use: npx invos install --dir', targetDir);
22
33
  process.exit(1);
23
34
  }
24
35
 
25
36
  ensureDir(targetDir);
26
- const files = collectFiles(kitRoot, '', true);
27
-
28
- let count = 0;
37
+ const files = collectFiles(kitRoot, '', true).filter(f => !isDevPath(f.relPath));
38
+ let n = 0;
29
39
  for (const f of files) {
30
40
  const dest = resolve(targetDir, f.relPath);
31
- copyFileWithDirs(f.fullPath, dest);
32
- count++;
41
+ if (!existsSync(dest)) {
42
+ copyFileWithDirs(f.fullPath, dest);
43
+ n++;
44
+ }
33
45
  }
34
46
 
35
- // Generate lock
36
- const lock = buildLock(kitRoot, targetDir);
47
+ const lock = buildLock(kitRoot, kit.version || '2.0.0');
37
48
  writeLock(targetDir, lock);
38
-
39
- // Symlinks
40
49
  syncClaudeSymlinks(kitRoot, targetDir);
41
50
 
42
- console.log(`✓ invos init complete — ${count} files in ${targetDir}`);
43
- console.log(' Run: cd ' + targetDir + ' && npx invos doctor');
51
+ console.log(`✓ invos init — ${n} files ${targetDir}`);
52
+ console.log(` kit ${kit.version || '?'}`);
53
+ console.log(` Next: open folder → /instalar`);
54
+ console.log(` Doctor: npx invos doctor --dir ${basename(targetDir)}`);
44
55
  }
@@ -1,41 +1,37 @@
1
1
  import { existsSync } from 'node:fs';
2
2
  import { resolve } from 'node:path';
3
- import { collectFiles, copyFileWithDirs, shouldCopyOnInstall, ensureDir, isDevPath } from '../utils.js';
3
+ import {
4
+ collectFiles, copyFileWithDirs, shouldCopyOnInstall, isDevPath,
5
+ } from '../utils.js';
4
6
  import { buildLock, readLock, writeLock } from '../lock.js';
5
7
  import { syncClaudeSymlinks } from '../symlinks.js';
6
8
 
7
- export async function install(kit, kitRoot, targetDir, args) {
8
- // Collect ALL kit files (skip user-data denylist) then filter out dev infra
9
- const allFiles = collectFiles(kitRoot, '', true);
10
- const files = allFiles.filter(f => !isDevPath(f.relPath));
9
+ export async function install(kit, kitRoot, targetDir) {
10
+ const files = collectFiles(kitRoot, '', true).filter(f => !isDevPath(f.relPath));
11
11
  let copied = 0;
12
12
  let skipped = 0;
13
13
 
14
14
  for (const f of files) {
15
15
  const dest = resolve(targetDir, f.relPath);
16
- if (shouldCopyOnInstall(dest)) {
17
- if (!existsSync(dest)) {
18
- ensureDir(dest.substring(0, dest.lastIndexOf('/')) || dest);
19
- }
16
+ if (shouldCopyOnInstall(dest) && !existsSync(dest)) {
20
17
  copyFileWithDirs(f.fullPath, dest);
21
18
  copied++;
22
- } else {
19
+ } else if (existsSync(dest) && !shouldCopyOnInstall(dest)) {
20
+ skipped++;
21
+ } else if (existsSync(dest)) {
23
22
  skipped++;
23
+ } else {
24
+ copyFileWithDirs(f.fullPath, dest);
25
+ copied++;
24
26
  }
25
27
  }
26
28
 
27
- // Lock file (merge with existing)
28
- const existingLock = readLock(targetDir);
29
- const lock = buildLock(kitRoot, targetDir, existingLock?.custom || {});
30
- if (existingLock) {
31
- lock.installedAt = existingLock.installedAt;
32
- lock.custom = existingLock.custom || {};
33
- }
29
+ const existing = readLock(targetDir);
30
+ const lock = buildLock(kitRoot, kit.version || '2.0.0', existing?.custom || {});
31
+ if (existing?.installedAt) lock.installedAt = existing.installedAt;
34
32
  writeLock(targetDir, lock);
35
-
36
- // Symlinks
37
33
  syncClaudeSymlinks(kitRoot, targetDir);
38
34
 
39
- console.log(`✓ invos install — ${copied} files copied, ${skipped} skipped (kept user data)`);
35
+ console.log(`✓ invos install — ${copied} new, ${skipped} kept`);
40
36
  console.log(' Run: npx invos doctor');
41
37
  }
@@ -1,70 +1,53 @@
1
- import { existsSync, readFileSync, writeFileSync, renameSync } from 'node:fs';
1
+ import { existsSync, readFileSync, writeFileSync } from 'node:fs';
2
2
  import { resolve } from 'node:path';
3
- import { collectFiles, copyFileWithDirs, shouldOverwriteOnUpdate, sha256File, isDenylisted, isTemplatePlaceholder } from '../utils.js';
3
+ import {
4
+ collectFiles, copyFileWithDirs, shouldOverwriteOnUpdate,
5
+ sha256File, isDenylisted, isDevPath,
6
+ } from '../utils.js';
4
7
  import { readLock, updateLockShipped, writeLock } from '../lock.js';
5
8
  import { syncClaudeSymlinks } from '../symlinks.js';
6
9
 
7
10
  export async function update(kit, kitRoot, targetDir, args) {
8
11
  const dryRun = args.includes('--dry-run');
9
12
  const lock = readLock(targetDir);
10
-
11
13
  if (!lock) {
12
- console.error('INVOS-LOCK.json not found. Run install first.');
14
+ console.error('INVOS-LOCK.json missing. Run: npx invos install');
13
15
  process.exit(1);
14
16
  }
15
17
 
16
- const files = collectFiles(kitRoot, '');
18
+ console.log(` source: ${kitRoot} (bundled/local — no token)`);
19
+
20
+ const files = collectFiles(kitRoot, '', true).filter(f => !isDevPath(f.relPath));
17
21
  let updated = 0;
18
22
  let skipped = 0;
19
- let agentsBackedUp = false;
23
+ let agentsNote = false;
20
24
 
21
25
  for (const f of files) {
22
- const dest = resolve(targetDir, f.relPath);
23
26
  const rel = f.relPath;
27
+ const dest = resolve(targetDir, rel);
24
28
 
25
- // USER denylist check
26
29
  if (isDenylisted(rel)) {
27
30
  skipped++;
28
31
  continue;
29
32
  }
30
33
 
31
- // Special: AGENTS.md custom handling
32
34
  if (rel === 'AGENTS.md' && existsSync(dest)) {
33
- const shippedSha = sha256File(f.fullPath);
34
- const localSha = sha256File(dest);
35
- const customDecision = lock.custom?.['AGENTS.md'];
36
-
37
- if (localSha !== shippedSha) {
38
- if (customDecision === 'skip') {
35
+ const a = sha256File(f.fullPath);
36
+ const b = sha256File(dest);
37
+ if (a !== b) {
38
+ const decision = lock.custom?.['AGENTS.md'];
39
+ if (decision === 'replace') {
39
40
  if (!dryRun) {
40
- const bakPath = resolve(targetDir, 'AGENTS.md.shipped.bak');
41
- writeFileSync(bakPath, readFileSync(f.fullPath));
42
- console.warn('⚠️ AGENTS.md custom — backup em AGENTS.md.shipped.bak (respecting skip lock)');
43
- agentsBackedUp = true;
44
- }
45
- skipped++;
46
- continue;
47
- }
48
- if (customDecision === 'replace' || !existsSync(dest)) {
49
- // Replace: just overwrite (handled below)
50
- if (!dryRun) {
51
- const bakPath = resolve(targetDir, 'AGENTS.md.shipped.bak');
52
- writeFileSync(bakPath, readFileSync(dest));
53
- console.warn('⚠️ AGENTS.md custom — backup em AGENTS.md.shipped.bak (replacing)');
54
- agentsBackedUp = true;
41
+ writeFileSync(resolve(targetDir, 'AGENTS.md.local.bak'), readFileSync(dest));
42
+ console.warn('⚠️ AGENTS.md → replace (local.bak)');
55
43
  }
56
44
  } else {
57
- // First time seeing divergence — warn and skip
58
45
  if (!dryRun) {
59
- const bakPath = resolve(targetDir, 'AGENTS.md.shipped.bak');
60
- writeFileSync(bakPath, readFileSync(f.fullPath));
61
- console.warn('⚠️ AGENTS.md custom — backup em AGENTS.md.shipped.bak');
62
- console.warn(' Next update will respect lock. Run again with --dry-run after setting:');
63
- console.warn(' "invos update" → replace | "invos update --skip-agents" → skip');
64
-
65
- // Write to lock: ask user decision
46
+ writeFileSync(resolve(targetDir, 'AGENTS.md.shipped.bak'), readFileSync(f.fullPath));
66
47
  lock.custom = lock.custom || {};
67
- lock.custom['AGENTS.md'] = 'skip'; // default skip after first backup
48
+ lock.custom['AGENTS.md'] = 'skip';
49
+ console.warn('⚠️ AGENTS.md custom — shipped.bak; skip (lock)');
50
+ agentsNote = true;
68
51
  }
69
52
  skipped++;
70
53
  continue;
@@ -72,42 +55,21 @@ export async function update(kit, kitRoot, targetDir, args) {
72
55
  }
73
56
  }
74
57
 
75
- // Skip if template placeholder only (for SEED files on UPDATE — e.g., marca/marca.md)
76
- if (existsSync(dest) && shouldSkipSeedPlaceholder(rel, dest)) {
77
- skipped++;
78
- continue;
79
- }
80
-
81
- // Overwrite PRODUCT files
82
- if (!existsSync(dest) || shouldOverwriteOnUpdate(rel, dest, lock)) {
83
- if (!dryRun) {
84
- copyFileWithDirs(f.fullPath, dest);
85
- }
58
+ if (!existsSync(dest) || shouldOverwriteOnUpdate(rel, dest)) {
59
+ if (!dryRun) copyFileWithDirs(f.fullPath, dest);
86
60
  updated++;
87
61
  } else {
88
62
  skipped++;
89
63
  }
90
64
  }
91
65
 
92
- // Update lock
93
66
  if (!dryRun) {
94
- updateLockShipped(kitRoot, lock);
67
+ updateLockShipped(kitRoot, lock, kit.version);
95
68
  writeLock(targetDir, lock);
96
69
  syncClaudeSymlinks(kitRoot, targetDir);
97
70
  }
98
71
 
99
- console.log(`✓ invos update${dryRun ? ' (dry-run)' : ''} — ${updated} files updated, ${skipped} skipped`);
100
- if (agentsBackedUp) console.log(' AGENTS.md backup created');
101
- if (dryRun) console.log(' Run without --dry-run to apply');
102
- }
103
-
104
- function shouldSkipSeedPlaceholder(rel, destPath) {
105
- // Only skip template files that are STILL placeholders
106
- const templateFiles = ['marca/marca.md', 'memoria/perfil.md', 'memoria/empresa.md'];
107
- if (!templateFiles.includes(rel)) return false;
108
-
109
- const content = readFileSync(destPath, 'utf-8');
110
- const templateMarkers = ['[o que', '[seu nome]', 'PREENCHA', 'primeira sessão'];
111
- const lower = content.toLowerCase();
112
- return !templateMarkers.some(m => lower.includes(m));
72
+ console.log(`✓ invos update${dryRun ? ' (dry-run)' : ''} — ${updated} updated, ${skipped} skipped (USER ok)`);
73
+ console.log(` kit ${kit.version || '?'}`);
74
+ if (agentsNote) console.log(' set INVOS-LOCK custom.AGENTS.md=replace to force AGENTS');
113
75
  }
package/src/lock.js CHANGED
@@ -1,38 +1,35 @@
1
1
  import { existsSync, readFileSync, writeFileSync } from 'node:fs';
2
2
  import { resolve } from 'node:path';
3
- import { sha256File, collectFiles, isDenylisted } from './utils.js';
4
- import { loadManifest } from './manifest.js';
3
+ import { sha256File, collectFiles } from './utils.js';
5
4
 
6
5
  export function readLock(targetDir) {
7
6
  const path = resolve(targetDir, 'INVOS-LOCK.json');
8
7
  if (!existsSync(path)) return null;
9
8
  try {
10
- return JSON.parse(readFileSync(path, 'utf-8'));
9
+ return JSON.parse(readFileSync(path, 'utf8'));
11
10
  } catch {
12
11
  return null;
13
12
  }
14
13
  }
15
14
 
16
15
  export function writeLock(targetDir, data) {
17
- const path = resolve(targetDir, 'INVOS-LOCK.json');
18
- writeFileSync(path, JSON.stringify(data, null, 2) + '\n');
16
+ writeFileSync(resolve(targetDir, 'INVOS-LOCK.json'), JSON.stringify(data, null, 2) + '\n');
19
17
  }
20
18
 
21
19
  export function computeShippedSha(kitRoot) {
22
- const files = collectFiles(kitRoot, '', true);
23
20
  const shipped = {};
24
- // INVOS.json itself
25
21
  shipped['INVOS.json'] = sha256File(resolve(kitRoot, 'INVOS.json'));
26
- for (const f of files) {
22
+ for (const f of collectFiles(kitRoot, '', true)) {
23
+ if (f.relPath.startsWith('packages/')) continue;
27
24
  shipped[f.relPath] = sha256File(f.fullPath);
28
25
  }
29
26
  return shipped;
30
27
  }
31
28
 
32
- export function buildLock(kitRoot, targetDir, custom = {}) {
29
+ export function buildLock(kitRoot, kitVersion = '2.0.0', custom = {}) {
33
30
  const now = new Date().toISOString();
34
31
  return {
35
- version: '1.0.0',
32
+ version: kitVersion,
36
33
  shippedSha: computeShippedSha(kitRoot),
37
34
  custom,
38
35
  installedAt: now,
@@ -40,8 +37,9 @@ export function buildLock(kitRoot, targetDir, custom = {}) {
40
37
  };
41
38
  }
42
39
 
43
- export function updateLockShipped(kitRoot, lock) {
40
+ export function updateLockShipped(kitRoot, lock, kitVersion) {
44
41
  lock.shippedSha = computeShippedSha(kitRoot);
45
42
  lock.updatedAt = new Date().toISOString();
43
+ if (kitVersion) lock.version = kitVersion;
46
44
  return lock;
47
45
  }
package/src/manifest.js CHANGED
@@ -3,7 +3,7 @@ import { existsSync, readFileSync } from 'node:fs';
3
3
  export function loadManifest(path) {
4
4
  if (!existsSync(path)) return null;
5
5
  try {
6
- return JSON.parse(readFileSync(path, 'utf-8'));
6
+ return JSON.parse(readFileSync(path, 'utf8'));
7
7
  } catch {
8
8
  return null;
9
9
  }
@@ -3,31 +3,46 @@ import { dirname, resolve } from 'node:path';
3
3
  import { fileURLToPath } from 'node:url';
4
4
 
5
5
  const __dirname = dirname(fileURLToPath(import.meta.url));
6
+ const INVOS_KIT_ALLOWED_DIRS = ['.']; // Only current dir or explicit path from dev
7
+
8
+ function validateKitPath(p) {
9
+ if (!p || typeof p !== 'string') return false;
10
+ const resolved = resolve(p);
11
+ if (!existsSync(resolved)) {
12
+ console.error('INVOS_KIT_PATH directory does not exist:', resolved);
13
+ return false;
14
+ }
15
+ if (!existsSync(resolve(resolved, 'INVOS.json'))) return false;
16
+ return true;
17
+ }
6
18
 
7
19
  /**
8
- * Kit source resolution (first hit wins):
9
- * 1. INVOS_KIT_PATH env
10
- * 2. Bundled kit next to package (npm install / npx)
11
- * 3. Monorepo layout: packages/cli → invos root
20
+ * 1. INVOS_KIT_PATH
21
+ * 2. packages/cli/kit (bundled — npm)
22
+ * 3. parent InvOS.v2 root (dev)
12
23
  */
13
24
  export function resolveKitRoot() {
14
25
  if (process.env.INVOS_KIT_PATH) {
26
+ if (!validateKitPath(process.env.INVOS_KIT_PATH)) {
27
+ console.error('INVOS_KIT_PATH points to invalid kit directory:', process.env.INVOS_KIT_PATH);
28
+ process.exit(1);
29
+ }
15
30
  const p = resolve(process.env.INVOS_KIT_PATH);
16
- if (existsSync(resolve(p, 'INVOS.json'))) return p;
17
- console.error('INVOS_KIT_PATH set but INVOS.json missing:', p);
18
- process.exit(1);
31
+ return p;
19
32
  }
20
33
 
21
34
  const bundled = resolve(__dirname, '../kit');
22
35
  if (existsSync(resolve(bundled, 'INVOS.json'))) return bundled;
23
36
 
24
- const monorepo = resolve(__dirname, '../../..');
25
- if (existsSync(resolve(monorepo, 'INVOS.json'))) return monorepo;
37
+ // packages/cli → ../.. = InvOS.v2 root
38
+ const v2 = resolve(__dirname, '../..');
39
+ if (existsSync(resolve(v2, 'INVOS.json'))) return v2;
26
40
 
27
41
  console.error(`
28
- INVOS kit not found.
29
- - Reinstall: npm i -g invos@latest (or npx invos@latest)
30
- - Or set: export INVOS_KIT_PATH=/path/to/invos-kit
42
+ Kit INVOS v2 não encontrado.
43
+ - Dev: rode a partir de InvOS.v2 (tem INVOS.json na raiz)
44
+ - Publish: npm run bundle-kit
45
+ - Override: export INVOS_KIT_PATH=/path/to/InvOS.v2
31
46
  `);
32
47
  process.exit(1);
33
48
  }
package/src/symlinks.js CHANGED
@@ -1,78 +1,61 @@
1
- import { existsSync, mkdirSync, symlinkSync, unlinkSync, readlinkSync, readdirSync, readFileSync, statSync } from 'node:fs';
1
+ import {
2
+ existsSync, mkdirSync, symlinkSync, unlinkSync, readlinkSync,
3
+ readdirSync, statSync,
4
+ } from 'node:fs';
2
5
  import { resolve, dirname } from 'node:path';
3
6
 
4
- const CLAUDE_SKILLS_RELPATH = '../../.agents/skills';
7
+ const REL = '../../.agents/skills';
5
8
 
6
- export function syncClaudeSymlinks(kitRoot, targetRoot) {
7
- const claudeDir = resolve(targetRoot, '.claude', 'skills');
8
- const agentsDir = resolve(targetRoot, '.agents', 'skills');
9
-
10
- if (!existsSync(agentsDir)) {
11
- mkdirSync(agentsDir, { recursive: true });
12
- }
13
-
14
- const manifestPath = resolve(kitRoot, 'INVOS.json');
15
- if (!existsSync(manifestPath)) return;
16
- const manifest = JSON.parse(readFileSync(manifestPath, 'utf-8'));
17
- const skills = manifest.seed?.skills || [];
9
+ function listSkills(agentsDir) {
10
+ if (!existsSync(agentsDir)) return [];
11
+ return readdirSync(agentsDir).filter(e => {
12
+ const p = resolve(agentsDir, e);
13
+ try {
14
+ return statSync(p).isDirectory() && existsSync(resolve(p, 'SKILL.md'));
15
+ } catch (err) {
16
+ console.error('listSkills: skipping', e, err.message);
17
+ return false;
18
+ }
19
+ });
20
+ }
18
21
 
22
+ export function syncClaudeSymlinks(_kitRoot, targetRoot) {
23
+ const agentsDir = resolve(targetRoot, '.agents', 'skills');
24
+ const claudeDir = resolve(targetRoot, '.claude', 'skills');
25
+ mkdirSync(agentsDir, { recursive: true });
19
26
  mkdirSync(claudeDir, { recursive: true });
20
27
 
21
- for (const skill of skills) {
22
- const target = resolve(agentsDir, skill);
28
+ for (const skill of listSkills(agentsDir)) {
23
29
  const linkPath = resolve(claudeDir, skill);
24
-
25
- if (!existsSync(target)) continue;
26
-
27
30
  if (existsSync(linkPath)) {
28
31
  try {
29
- const existing = readlinkSync(linkPath);
30
- if (existing === `${CLAUDE_SKILLS_RELPATH}/${skill}`) continue;
31
- unlinkSync(linkPath);
32
- } catch {
32
+ if (readlinkSync(linkPath) === `${REL}/${skill}`) continue;
33
33
  unlinkSync(linkPath);
34
+ } catch (err) {
35
+ console.error('syncClaudeSymlinks: failed to update', skill, err.message);
34
36
  }
35
37
  }
36
-
37
- symlinkSync(`${CLAUDE_SKILLS_RELPATH}/${skill}`, linkPath);
38
+ symlinkSync(`${REL}/${skill}`, linkPath);
38
39
  }
39
40
  }
40
41
 
41
42
  export function checkClaudeSymlinks(targetRoot) {
43
+ const agentsDir = resolve(targetRoot, '.agents', 'skills');
42
44
  const claudeDir = resolve(targetRoot, '.claude', 'skills');
43
- if (!existsSync(claudeDir)) return { ok: false, errors: ['.claude/skills/ not found'] };
45
+ const expected = listSkills(agentsDir);
46
+ if (!expected.length) return { ok: false, errors: ['.agents/skills empty'] };
47
+ if (!existsSync(claudeDir)) return { ok: false, errors: ['.claude/skills missing'] };
44
48
 
45
49
  const errors = [];
46
- let entries = [];
47
- try {
48
- entries = readdirSync(claudeDir);
49
- } catch { return { ok: false, errors: ['.claude/skills/ unreadable'] }; }
50
-
51
- for (const entry of entries) {
52
- const linkPath = resolve(claudeDir, entry);
50
+ for (const s of expected) {
51
+ const link = resolve(claudeDir, s);
53
52
  try {
54
- const target = readlinkSync(linkPath);
55
- const absTarget = resolve(dirname(linkPath), target);
56
-
57
- // Resolve target — must exist and be a dir with SKILL.md
58
- if (!existsSync(absTarget)) {
59
- errors.push(`${entry}: target missing (${target})`);
60
- continue;
61
- }
62
- const st = statSync(absTarget);
63
- if (!st.isDirectory()) {
64
- errors.push(`${entry}: target not a directory (${target})`);
65
- continue;
66
- }
67
- // Nested skills like apple-notes → ../../.agents/skills/apple/apple-notes
68
- // are valid if the resolved target has SKILL.md
69
- if (!existsSync(resolve(absTarget, 'SKILL.md'))) {
70
- errors.push(`${entry}: target has no SKILL.md (${target})`);
71
- }
53
+ const t = readlinkSync(link);
54
+ const abs = resolve(dirname(link), t);
55
+ if (!existsSync(resolve(abs, 'SKILL.md'))) errors.push(`${s}: broken`);
72
56
  } catch {
73
- errors.push(`${entry}: not a symlink or unreadable`);
57
+ errors.push(`${s}: not a symlink`);
74
58
  }
75
59
  }
76
-
77
60
  return { ok: errors.length === 0, errors };
78
61
  }