bps-kit 1.0.9 → 1.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,11 @@ Todas as mudanças notáveis ​​neste projeto serão documentadas neste arqui
5
5
  O formato é baseado no [Keep a Changelog](https://keepachangelog.com/pt-BR/1.0.0/),
6
6
  e este projeto adere ao [Versionamento Semântico](https://semver.org/lang/pt-BR/).
7
7
 
8
+ ## [1.0.10] - 2026-03-08
9
+ ### Corrigido
10
+ - Resolução do erro `MODULE_NOT_FOUND` reportado ao disparar a CLI contendo as flags combinadas de `--extra` / `--basic` e `--vscode`.
11
+ - O utilitário conversor do GitHub Copilot havia ficado ilhado na pasta ignorada do NPM (`src/`) pois fazia parte da raiz template de desenvolvedor invés da build da CLI final. Foi realocado para a diretriz `bin/` operante.
12
+
8
13
  ## [1.0.9] - 2026-03-08
9
14
  ### Modificado
10
15
  - Refatoração visual completa do `README.md` com adição de emblemas (badges) e seções formatadas.
package/bin/cli.js CHANGED
@@ -95,7 +95,7 @@ async function runInstaller() {
95
95
  // 5. Conversor para VS Code se solicitado
96
96
  if (options.vscode) {
97
97
  spinner.text = `Transformando arquitetura para padrão GitHub Copilot (VS Code)...`;
98
- const { convertToVsCode } = require('../src/scripts/convert_to_vscode');
98
+ const { convertToVsCode } = require('./convert_to_vscode');
99
99
  await convertToVsCode(DEST_AGENTS, DEST_BASE);
100
100
  }
101
101
 
@@ -0,0 +1,87 @@
1
+ const fs = require('fs-extra');
2
+ const path = require('path');
3
+ const chalk = require('chalk');
4
+
5
+ /**
6
+ * Converte toda a estrutura .agents importada para .github estrutural do Copilot
7
+ * @param {string} destAgents O diretorio destino onde a copy crua (.agents) aportou
8
+ * @param {string} destBase A raiz do repositorio final
9
+ */
10
+ async function convertToVsCode(destAgents, destBase) {
11
+ const gitHubDir = path.join(destBase, '.github');
12
+ const copilotInstructionsDir = path.join(gitHubDir, 'instructions');
13
+
14
+ await fs.ensureDir(copilotInstructionsDir);
15
+
16
+ console.log(chalk.dim(' [VS Code] Convertendo arquivos para sintaxe do Copilot...'));
17
+
18
+ // 1. Converter a rule master GEMINI.md em copilot-instructions.md
19
+ const geminiPath = path.join(destAgents, 'rules', 'GEMINI.md');
20
+ if (await fs.pathExists(geminiPath)) {
21
+ let content = await fs.readFile(geminiPath, 'utf8');
22
+ // Adaptamos os caminhos na rule principal para o contexto do .github/ do VS Code
23
+ content = content.replace(/\.\/\.agents\/skills\//g, './.github/instructions/');
24
+ content = content.replace(/\.\/\.agents\/vault\//g, './.copilot-vault/');
25
+ content = content.replace(/\.\/\.agents\/rules\/GEMINI\.md/g, './.github/copilot-instructions.md');
26
+
27
+ // As workflows no VS Code estao desabrigadas da pasta nativa, sugerimos le-las do vault ou inline
28
+ content += `\n\n## 🔄 Workflows Base\nAs workflows antigas de Cursor (/brainstorm, etc) agora devem ser invocadas naturalmente no chat: "Rode o fluxo de brainstorm". Consulte o AGENTS.md para contexto.\n`;
29
+
30
+ await fs.writeFile(path.join(gitHubDir, 'copilot-instructions.md'), content);
31
+ }
32
+
33
+ // 2. Converter as skills nativas (ativas) em glob .instructions.md
34
+ const skillsDest = path.join(destAgents, 'skills');
35
+ if (await fs.pathExists(skillsDest)) {
36
+ const skillsDirs = await fs.readdir(skillsDest);
37
+ for (const skillName of skillsDirs) {
38
+ const skillFile = path.join(skillsDest, skillName, 'SKILL.md');
39
+ if (await fs.pathExists(skillFile)) {
40
+ let content = await fs.readFile(skillFile, 'utf8');
41
+
42
+ // Injetamos um frontmatter basico aceitavel pelo Copilot apontando para tudo (**/*)
43
+ // para que a Skill ative independente do arquivo no Workspace se for convocada.
44
+ const vsCodeContent = `---
45
+ description: ${skillName.replace(/-/g, ' ')}
46
+ applyTo: "**/*"
47
+ ---
48
+ ${content}`;
49
+ await fs.writeFile(path.join(copilotInstructionsDir, `${skillName}.instructions.md`), vsCodeContent);
50
+ }
51
+ }
52
+ }
53
+
54
+ // 3. Converter o Vault Index (Tudo que esta no index vira uma mera instruction text base local)
55
+ const vaultIndexSrc = path.join(destAgents, 'VAULT_INDEX.md');
56
+ if (await fs.pathExists(vaultIndexSrc)) {
57
+ let content = await fs.readFile(vaultIndexSrc, 'utf8');
58
+ content = content.replace(/\.\/\.agents\/vault\//g, './.copilot-vault/');
59
+ await fs.writeFile(path.join(copilotInstructionsDir, 'VAULT_INDEX.instructions.md'), content);
60
+ }
61
+
62
+ // 4. Mover o Vault inteiro para uma pasta customizada oculta que nao polua a base restrita do Git / do Copilot local
63
+ const vaultSrc = path.join(destAgents, 'vault');
64
+ const copilotVaultDir = path.join(destBase, '.copilot-vault');
65
+ if (await fs.pathExists(vaultSrc)) {
66
+ await fs.move(vaultSrc, copilotVaultDir, { overwrite: true });
67
+ }
68
+
69
+ // 5. Consolidar as 20 personas (AGENTS) num unico arquivao master na root do github chamado AGENTS.md
70
+ const agentsSrc = path.join(destAgents, 'agents');
71
+ if (await fs.pathExists(agentsSrc)) {
72
+ const agentFiles = await fs.readdir(agentsSrc);
73
+ let consolidatedAgents = `# 🤖 Antigravity Copilot Agents Roster\n\n`;
74
+ for (const agent of agentFiles) {
75
+ if (agent.endsWith('.md')) {
76
+ const content = await fs.readFile(path.join(agentsSrc, agent), 'utf8');
77
+ consolidatedAgents += `\n## Agent: ${agent.replace('.md', '')}\n${content}\n---\n`;
78
+ }
79
+ }
80
+ await fs.writeFile(path.join(gitHubDir, 'AGENTS.md'), consolidatedAgents);
81
+ }
82
+
83
+ // Limpeza pesada! Como o ambiente ja foi migrado de .agents para .github e .copilot-vault, delete a origem da instalacao hibrida.
84
+ await fs.remove(destAgents);
85
+ }
86
+
87
+ module.exports = { convertToVsCode };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bps-kit",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "BPS Kit - The Ultimate Antigravity Brain",
5
5
  "bin": {
6
6
  "bps-kit": "./bin/cli.js"