antigravity-ai-kit 3.2.0 → 3.3.1
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/.agent/agents/build-error-resolver.md +158 -44
- package/.agent/agents/database-architect.md +282 -66
- package/.agent/agents/devops-engineer.md +524 -76
- package/.agent/agents/doc-updater.md +189 -39
- package/.agent/agents/e2e-runner.md +348 -55
- package/.agent/agents/explorer-agent.md +196 -68
- package/.agent/agents/knowledge-agent.md +149 -35
- package/.agent/agents/mobile-developer.md +231 -57
- package/.agent/agents/performance-optimizer.md +461 -79
- package/.agent/agents/refactor-cleaner.md +143 -35
- package/.agent/agents/reliability-engineer.md +474 -49
- package/.agent/agents/security-reviewer.md +321 -78
- package/.agent/engine/loading-rules.json +20 -4
- package/.agent/manifest.json +1 -1
- package/.agent/skills/architecture/SKILL.md +170 -49
- package/.agent/skills/database-design/SKILL.md +157 -3
- package/.agent/skills/plan-writing/domain-enhancers.md +105 -35
- package/.agent/skills/security-practices/SKILL.md +189 -9
- package/README.md +30 -13
- package/bin/ag-kit.js +87 -22
- package/lib/io.js +37 -0
- package/lib/plugin-system.js +2 -26
- package/lib/security-scanner.js +6 -0
- package/lib/updater.js +1 -0
- package/package.json +1 -1
package/lib/io.js
CHANGED
|
@@ -68,7 +68,44 @@ function readJsonSafe(filePath, defaultValue = null) {
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
+
/**
|
|
72
|
+
* Recursively copies a directory, skipping symbolic links for security.
|
|
73
|
+
*
|
|
74
|
+
* Symlinks are skipped because they could point outside the intended
|
|
75
|
+
* scope (e.g., outside .agent/), enabling path traversal attacks.
|
|
76
|
+
*
|
|
77
|
+
* @param {string} src - Source directory path
|
|
78
|
+
* @param {string} dest - Destination directory path
|
|
79
|
+
* @returns {void}
|
|
80
|
+
*/
|
|
81
|
+
function safeCopyDirSync(src, dest) {
|
|
82
|
+
if (!fs.existsSync(dest)) {
|
|
83
|
+
fs.mkdirSync(dest, { recursive: true });
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const entries = fs.readdirSync(src, { withFileTypes: true });
|
|
87
|
+
|
|
88
|
+
for (const entry of entries) {
|
|
89
|
+
const srcPath = path.join(src, entry.name);
|
|
90
|
+
const destPath = path.join(dest, entry.name);
|
|
91
|
+
|
|
92
|
+
// Security: skip symlinks to prevent path traversal
|
|
93
|
+
const stat = fs.lstatSync(srcPath);
|
|
94
|
+
if (stat.isSymbolicLink()) {
|
|
95
|
+
log.debug('Skipping symlink for security', { path: srcPath });
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
if (entry.isDirectory()) {
|
|
100
|
+
safeCopyDirSync(srcPath, destPath);
|
|
101
|
+
} else {
|
|
102
|
+
fs.copyFileSync(srcPath, destPath);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
71
107
|
module.exports = {
|
|
72
108
|
writeJsonAtomic,
|
|
73
109
|
readJsonSafe,
|
|
110
|
+
safeCopyDirSync,
|
|
74
111
|
};
|
package/lib/plugin-system.js
CHANGED
|
@@ -16,7 +16,7 @@ const fs = require('fs');
|
|
|
16
16
|
const path = require('path');
|
|
17
17
|
|
|
18
18
|
const { AGENT_DIR, ENGINE_DIR, PLUGINS_DIR, HOOKS_DIR } = require('./constants');
|
|
19
|
-
const { writeJsonAtomic } = require('./io');
|
|
19
|
+
const { writeJsonAtomic, safeCopyDirSync } = require('./io');
|
|
20
20
|
const { createLogger } = require('./logger');
|
|
21
21
|
const log = createLogger('plugin-system');
|
|
22
22
|
const PLUGINS_REGISTRY = 'plugins-registry.json';
|
|
@@ -289,7 +289,7 @@ function installPlugin(pluginPath, projectRoot) {
|
|
|
289
289
|
for (const skillDir of (manifest.skills || [])) {
|
|
290
290
|
const src = path.join(pluginPath, 'skills', skillDir);
|
|
291
291
|
const dest = path.join(projectRoot, AGENT_DIR, 'skills', skillDir);
|
|
292
|
-
|
|
292
|
+
safeCopyDirSync(src, dest);
|
|
293
293
|
installed.skills++;
|
|
294
294
|
}
|
|
295
295
|
|
|
@@ -593,31 +593,7 @@ function copyFileSync(src, dest) {
|
|
|
593
593
|
fs.copyFileSync(src, dest);
|
|
594
594
|
}
|
|
595
595
|
|
|
596
|
-
/**
|
|
597
|
-
* Recursively copies a directory.
|
|
598
|
-
*
|
|
599
|
-
* @param {string} src - Source directory
|
|
600
|
-
* @param {string} dest - Destination directory
|
|
601
|
-
* @returns {void}
|
|
602
|
-
*/
|
|
603
|
-
function copyDirSync(src, dest) {
|
|
604
|
-
if (!fs.existsSync(dest)) {
|
|
605
|
-
fs.mkdirSync(dest, { recursive: true });
|
|
606
|
-
}
|
|
607
|
-
|
|
608
|
-
const entries = fs.readdirSync(src, { withFileTypes: true });
|
|
609
596
|
|
|
610
|
-
for (const entry of entries) {
|
|
611
|
-
const srcPath = path.join(src, entry.name);
|
|
612
|
-
const destPath = path.join(dest, entry.name);
|
|
613
|
-
|
|
614
|
-
if (entry.isDirectory()) {
|
|
615
|
-
copyDirSync(srcPath, destPath);
|
|
616
|
-
} else {
|
|
617
|
-
fs.copyFileSync(srcPath, destPath);
|
|
618
|
-
}
|
|
619
|
-
}
|
|
620
|
-
}
|
|
621
597
|
|
|
622
598
|
module.exports = {
|
|
623
599
|
validatePlugin,
|
package/lib/security-scanner.js
CHANGED
|
@@ -262,6 +262,12 @@ function collectAllFiles(dirPath) {
|
|
|
262
262
|
for (const entry of entries) {
|
|
263
263
|
const fullPath = path.join(dirPath, entry.name);
|
|
264
264
|
|
|
265
|
+
// Security: skip symlinks to prevent path traversal
|
|
266
|
+
const stat = fs.lstatSync(fullPath);
|
|
267
|
+
if (stat.isSymbolicLink()) {
|
|
268
|
+
continue;
|
|
269
|
+
}
|
|
270
|
+
|
|
265
271
|
if (entry.isDirectory() && entry.name !== 'node_modules' && entry.name !== '.git') {
|
|
266
272
|
files.push(...collectAllFiles(fullPath));
|
|
267
273
|
} else if (entry.isFile()) {
|
package/lib/updater.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "antigravity-ai-kit",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.1",
|
|
4
4
|
"description": "🚀 Trust-Grade AI development framework with a 29-module runtime engine — 19 Agents, 32 Skills, 31 Commands, 14 Workflows, 327 Tests. Workflow enforcement, task governance, agent reputation, self-healing, and skill marketplace.",
|
|
5
5
|
"main": "bin/ag-kit.js",
|
|
6
6
|
"bin": {
|