bps-kit 1.0.12 → 1.0.14
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 +9 -0
- package/bin/convert_to_vscode.js +23 -15
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,15 @@ 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.14] - 2026-03-08
|
|
9
|
+
### Corrigido
|
|
10
|
+
- O conversor de Copilot deixou de exportar **Skills** com a sintaxe `.instructions.md` munida de `applyTo: "**/*"`. Anteriormente, isso engatilhava o VS Code a injetar todos os 65 contextos do Antigravity na engine do Copilot de uma única vez, provocando erro letal na API GenAI (`128558 exceeds the limit of 128000`).
|
|
11
|
+
- Skills exportadas via `--vscode` voltam a ser documentos `.md` puritanos em `.github/skills/nome.md`, encarregando o Copilot Agent de performar "file reads" inteligentes on-demand seguindo mapeamento semântico no próprio `copilot-instructions.md`.
|
|
12
|
+
|
|
13
|
+
## [1.0.13] - 2026-03-08
|
|
14
|
+
### Corrigido
|
|
15
|
+
- Workflows exportadas para Copilot Prompts (`.github/prompts/`) agora processam sua integridade lexical e efetuam substituições completas via RegEx, trocando qualquer referência contextual de `GEMINI.md` ou `.agents/` para adequação na nuvem do Copilot (`copilot-instructions.md` e `.github/`).
|
|
16
|
+
|
|
8
17
|
## [1.0.12] - 2026-03-08
|
|
9
18
|
### Adicionado
|
|
10
19
|
- Script conversor do VS Code agora transcreve dinamicamente blocos de Frontmatter YAML embutindo o parâmetro `description` e array vazio em `tools: []` para os Agentes Extraídos.
|
package/bin/convert_to_vscode.js
CHANGED
|
@@ -20,43 +20,44 @@ async function convertToVsCode(destAgents, destBase) {
|
|
|
20
20
|
if (await fs.pathExists(geminiPath)) {
|
|
21
21
|
let content = await fs.readFile(geminiPath, 'utf8');
|
|
22
22
|
// Adaptamos os caminhos na rule principal para o contexto do .github/ do VS Code
|
|
23
|
-
|
|
23
|
+
// Agora, skills são arquivos normais .md, preservando o auto-routing do Copilot e estourando tokens zero.
|
|
24
|
+
content = content.replace(/\.\/\.agents\/skills\//g, './.github/skills/');
|
|
24
25
|
content = content.replace(/\.\/\.agents\/vault\//g, './.copilot-vault/');
|
|
25
26
|
content = content.replace(/\.\/\.agents\/rules\/GEMINI\.md/g, './.github/copilot-instructions.md');
|
|
27
|
+
content = content.replace(/\{skill-name\}\/SKILL\.md/g, '{skill-name}.md'); // Para buscar arquivos achatados invés de diretórios
|
|
26
28
|
|
|
27
29
|
// 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
|
|
30
|
+
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 diretório .github/prompts/ para contexto.\n`;
|
|
29
31
|
|
|
30
32
|
await fs.writeFile(path.join(gitHubDir, 'copilot-instructions.md'), content);
|
|
31
33
|
}
|
|
32
34
|
|
|
33
|
-
// 2. Converter as skills nativas (ativas) em
|
|
35
|
+
// 2. Converter as skills nativas (ativas) em arquivo comum .md achatado
|
|
36
|
+
// Importante: NÃO convertemos para .instructions.md pois o Copilot engoles todas no context limit estourando a IA!
|
|
34
37
|
const skillsDest = path.join(destAgents, 'skills');
|
|
38
|
+
const copilotSkillsDir = path.join(gitHubDir, 'skills');
|
|
39
|
+
await fs.ensureDir(copilotSkillsDir);
|
|
40
|
+
|
|
35
41
|
if (await fs.pathExists(skillsDest)) {
|
|
36
42
|
const skillsDirs = await fs.readdir(skillsDest);
|
|
37
43
|
for (const skillName of skillsDirs) {
|
|
38
44
|
const skillFile = path.join(skillsDest, skillName, 'SKILL.md');
|
|
39
45
|
if (await fs.pathExists(skillFile)) {
|
|
40
46
|
let content = await fs.readFile(skillFile, 'utf8');
|
|
41
|
-
|
|
42
|
-
|
|
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);
|
|
47
|
+
// Salvar como .md comum achatado para a IA consultar dinamicamente via "file read" só quando requisitado
|
|
48
|
+
await fs.writeFile(path.join(copilotSkillsDir, `${skillName}.md`), content);
|
|
50
49
|
}
|
|
51
50
|
}
|
|
52
51
|
}
|
|
53
52
|
|
|
54
|
-
// 3. Converter o Vault Index (Tudo que esta no index vira uma
|
|
53
|
+
// 3. Converter o Vault Index (Tudo que esta no index vira uma instrução consultável)
|
|
55
54
|
const vaultIndexSrc = path.join(destAgents, 'VAULT_INDEX.md');
|
|
56
55
|
if (await fs.pathExists(vaultIndexSrc)) {
|
|
57
56
|
let content = await fs.readFile(vaultIndexSrc, 'utf8');
|
|
58
57
|
content = content.replace(/\.\/\.agents\/vault\//g, './.copilot-vault/');
|
|
59
|
-
|
|
58
|
+
// Também trocar eventuais menções de SKILL.md para o formato achatado.md do VSCode
|
|
59
|
+
content = content.replace(/\{name\}\/SKILL\.md/g, '{name}.md');
|
|
60
|
+
await fs.writeFile(path.join(gitHubDir, 'VAULT_INDEX.md'), content);
|
|
60
61
|
}
|
|
61
62
|
|
|
62
63
|
// 4. Mover o Vault inteiro para uma pasta customizada oculta que nao polua a base restrita do Git / do Copilot local
|
|
@@ -98,9 +99,16 @@ ${content}`;
|
|
|
98
99
|
const workflowFiles = await fs.readdir(workflowsSrc);
|
|
99
100
|
for (const workflow of workflowFiles) {
|
|
100
101
|
if (workflow.endsWith('.md')) {
|
|
101
|
-
|
|
102
|
+
let content = await fs.readFile(path.join(workflowsSrc, workflow), 'utf8');
|
|
102
103
|
const promptName = workflow.replace('.md', '');
|
|
103
104
|
|
|
105
|
+
// Converter referências visuais e lógicas residuais do Antigravity nativo
|
|
106
|
+
// para o equivalente funcional da arquitetura VS Code.
|
|
107
|
+
content = content.replace(/\.\/\.agents\/rules\/GEMINI\.md/g, './.github/copilot-instructions.md');
|
|
108
|
+
content = content.replace(/\.\/\.agents\//g, './.github/');
|
|
109
|
+
content = content.replace(/GEMINI\.md/g, 'copilot-instructions.md');
|
|
110
|
+
content = content.replace(/VAULT_INDEX\.md/g, 'VAULT_INDEX.md');
|
|
111
|
+
|
|
104
112
|
// Formato exigido para GitHub Copilot Prompts (.prompt.md)
|
|
105
113
|
const vsCodePromptContent = `---
|
|
106
114
|
agent: agent
|