cp-toolkit 2.2.1 ā 2.2.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.
package/package.json
CHANGED
package/src/commands/init.js
CHANGED
|
@@ -147,6 +147,14 @@ export async function initCommand(directory, options) {
|
|
|
147
147
|
],
|
|
148
148
|
"disabled": false,
|
|
149
149
|
"autoApprove": []
|
|
150
|
+
},
|
|
151
|
+
"antigravity": {
|
|
152
|
+
"command": "node",
|
|
153
|
+
"args": [
|
|
154
|
+
"${workspaceFolder}/.github/scripts/mcp-server.js"
|
|
155
|
+
],
|
|
156
|
+
"disabled": false,
|
|
157
|
+
"autoApprove": []
|
|
150
158
|
}
|
|
151
159
|
}
|
|
152
160
|
};
|
|
@@ -167,6 +175,32 @@ export async function initCommand(directory, options) {
|
|
|
167
175
|
}
|
|
168
176
|
}
|
|
169
177
|
|
|
178
|
+
// 8. Copy scripts to .github/scripts/
|
|
179
|
+
spinner.text = 'Copying scripts...';
|
|
180
|
+
const scriptsSourceDir = path.join(templatesDir, 'scripts');
|
|
181
|
+
const scriptsTargetDir = path.join(targetDir, '.github', 'scripts');
|
|
182
|
+
if (fs.existsSync(scriptsSourceDir)) {
|
|
183
|
+
await fs.ensureDir(scriptsTargetDir);
|
|
184
|
+
await fs.copy(scriptsSourceDir, scriptsTargetDir, { overwrite: true });
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// 9. Copy ARCHITECTURE.md to .github/
|
|
188
|
+
spinner.text = 'Copying architecture documentation...';
|
|
189
|
+
const architectureSource = path.join(templatesDir, 'ARCHITECTURE.md');
|
|
190
|
+
const architectureTarget = path.join(targetDir, '.github', 'ARCHITECTURE.md');
|
|
191
|
+
if (fs.existsSync(architectureSource)) {
|
|
192
|
+
await fs.copy(architectureSource, architectureTarget, { overwrite: true });
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// 10. Copy rules to .github/rules/
|
|
196
|
+
spinner.text = 'Copying rules...';
|
|
197
|
+
const rulesSourceDir = path.join(templatesDir, 'rules');
|
|
198
|
+
const rulesTargetDir = path.join(targetDir, '.github', 'rules');
|
|
199
|
+
if (fs.existsSync(rulesSourceDir)) {
|
|
200
|
+
await fs.ensureDir(rulesTargetDir);
|
|
201
|
+
await fs.copy(rulesSourceDir, rulesTargetDir, { overwrite: true });
|
|
202
|
+
}
|
|
203
|
+
|
|
170
204
|
spinner.succeed(chalk.green('⨠Copilot Kit initialized successfully!'));
|
|
171
205
|
|
|
172
206
|
console.log(chalk.bold('\nš Created structure:'));
|
|
@@ -175,6 +209,9 @@ export async function initCommand(directory, options) {
|
|
|
175
209
|
console.log(chalk.dim(' āāā skills/ ') + chalk.cyan('ā Essential skills library'));
|
|
176
210
|
console.log(chalk.dim(' āāā instructions/ ') + chalk.cyan('ā Language-specific rules'));
|
|
177
211
|
console.log(chalk.dim(' āāā copilot-workflows/') + chalk.cyan('ā Workflow templates'));
|
|
212
|
+
console.log(chalk.dim(' āāā scripts/ ') + chalk.cyan('ā MCP server & utilities'));
|
|
213
|
+
console.log(chalk.dim(' āāā rules/ ') + chalk.cyan('ā Global AI rules'));
|
|
214
|
+
console.log(chalk.dim(' āāā ARCHITECTURE.md ') + chalk.cyan('ā System documentation'));
|
|
178
215
|
console.log(chalk.dim(' āāā copilot-instructions.md'));
|
|
179
216
|
console.log(chalk.dim(' .vscode/'));
|
|
180
217
|
console.log(chalk.dim(' āāā mcp.json ') + chalk.cyan('ā MCP server config'));
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
import * as fs from 'fs/promises';
|
|
30
30
|
import * as path from 'path';
|
|
31
31
|
|
|
32
|
-
const AGENT_ROOT = process.env.AGENT_ROOT || path.join(process.cwd(), '.
|
|
32
|
+
const AGENT_ROOT = process.env.AGENT_ROOT || path.join(process.cwd(), '.github');
|
|
33
33
|
|
|
34
34
|
// ============================================================================
|
|
35
35
|
// HELPERS
|