antigravity-seo-kit 2.9.8 → 3.0.0
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/lib/installer.js +28 -83
- package/lib/utils.js +3 -3
- package/package.json +1 -1
package/lib/installer.js
CHANGED
|
@@ -73,7 +73,7 @@ async function install(licenseKey, cwd) {
|
|
|
73
73
|
const legacyAgentDir = path.join(cwd, '.agent');
|
|
74
74
|
const newAgentsDir = path.join(cwd, '.agents');
|
|
75
75
|
|
|
76
|
-
if (fs.existsSync(legacyAgentDir)
|
|
76
|
+
if (fs.existsSync(legacyAgentDir)) {
|
|
77
77
|
const spinMigrate = spinner('Restructuring to .agents/ format...').start();
|
|
78
78
|
try {
|
|
79
79
|
fs.mkdirSync(newAgentsDir, { recursive: true });
|
|
@@ -98,7 +98,7 @@ async function install(licenseKey, cwd) {
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
// Remove legacy .agent/
|
|
101
|
+
// Remove legacy .agent/ — only .agents/ should remain
|
|
102
102
|
removeRecursive(legacyAgentDir);
|
|
103
103
|
|
|
104
104
|
spinMigrate.succeed(`Restructured to .agents/ format (${migrateCount} files)`);
|
|
@@ -499,53 +499,33 @@ async function installPlugin(licenseKey) {
|
|
|
499
499
|
process.exit(1);
|
|
500
500
|
}
|
|
501
501
|
|
|
502
|
-
// Step 3:
|
|
503
|
-
//
|
|
504
|
-
//
|
|
502
|
+
// Step 3: Flatten downloaded tarball into global plugin directory
|
|
503
|
+
// Tarball extracts as .agents/ (or legacy .agent/) sub-dir inside plugin dir
|
|
504
|
+
// Move ALL contents directly into plugin root — Antigravity only reads
|
|
505
|
+
// skills/, rules/, hooks.json, mcp_config.json, plugin.json (ignores the rest)
|
|
505
506
|
const legacyAgentDir = path.join(globalPluginDir, '.agent');
|
|
506
507
|
const newAgentsDir = path.join(globalPluginDir, '.agents');
|
|
507
508
|
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
fs.
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
if (fs.existsSync(pluginSrcDir)) {
|
|
524
|
-
for (const entry of fs.readdirSync(pluginSrcDir)) {
|
|
525
|
-
const srcPath = path.join(pluginSrcDir, entry);
|
|
526
|
-
const destPath = path.join(globalPluginDir, entry);
|
|
527
|
-
if (fs.existsSync(destPath)) {
|
|
528
|
-
removeRecursive(destPath);
|
|
529
|
-
}
|
|
530
|
-
fs.renameSync(srcPath, destPath);
|
|
531
|
-
}
|
|
532
|
-
}
|
|
533
|
-
// Keep workspace-level dirs (agents, workflows) for setupWorkspace
|
|
534
|
-
const workspaceDirs = ['agents', 'workflows', 'scripts', 'config', 'dashboard', 'docs', '.shared'];
|
|
535
|
-
for (const dir of workspaceDirs) {
|
|
536
|
-
const srcDir = path.join(newAgentsDir, dir);
|
|
537
|
-
const destDir = path.join(globalPluginDir, `_workspace_${dir}`);
|
|
538
|
-
if (fs.existsSync(srcDir)) {
|
|
539
|
-
if (fs.existsSync(destDir)) removeRecursive(destDir);
|
|
540
|
-
fs.renameSync(srcDir, destDir);
|
|
509
|
+
const downloadedDir = fs.existsSync(newAgentsDir) ? newAgentsDir
|
|
510
|
+
: fs.existsSync(legacyAgentDir) ? legacyAgentDir
|
|
511
|
+
: null;
|
|
512
|
+
|
|
513
|
+
if (downloadedDir) {
|
|
514
|
+
// Move all directories into plugin root
|
|
515
|
+
for (const entry of fs.readdirSync(downloadedDir)) {
|
|
516
|
+
const src = path.join(downloadedDir, entry);
|
|
517
|
+
const dest = path.join(globalPluginDir, entry);
|
|
518
|
+
if (fs.statSync(src).isDirectory()) {
|
|
519
|
+
if (fs.existsSync(dest)) removeRecursive(dest);
|
|
520
|
+
fs.renameSync(src, dest);
|
|
521
|
+
} else {
|
|
522
|
+
if (fs.existsSync(dest)) fs.unlinkSync(dest);
|
|
523
|
+
fs.renameSync(src, dest);
|
|
541
524
|
}
|
|
542
525
|
}
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
fs.copyFileSync(archFile, path.join(globalPluginDir, '_workspace_seo-architecture.md'));
|
|
547
|
-
}
|
|
548
|
-
removeRecursive(newAgentsDir);
|
|
526
|
+
|
|
527
|
+
// Clean up extracted dir
|
|
528
|
+
removeRecursive(downloadedDir);
|
|
549
529
|
}
|
|
550
530
|
|
|
551
531
|
// Step 4: Ensure plugin.json and installed_version.json
|
|
@@ -614,15 +594,11 @@ function setupWorkspace(cwd) {
|
|
|
614
594
|
// Copy workspace-level dirs from global plugin to local .agents/
|
|
615
595
|
// Skills & rules are NOT copied — Antigravity loads them from global plugin
|
|
616
596
|
const workspaceDirs = ['agents', 'workflows', 'scripts', 'config', 'dashboard', 'docs', '.shared'];
|
|
617
|
-
const rootFiles = ['seo-architecture.md'];
|
|
597
|
+
const rootFiles = ['seo-architecture.md', 'hooks.json', 'mcp_config.json'];
|
|
618
598
|
|
|
619
599
|
let count = 0;
|
|
620
600
|
for (const dir of workspaceDirs) {
|
|
621
|
-
|
|
622
|
-
let src = path.join(globalDir, `_workspace_${dir}`);
|
|
623
|
-
if (!fs.existsSync(src)) {
|
|
624
|
-
src = path.join(globalDir, dir);
|
|
625
|
-
}
|
|
601
|
+
const src = path.join(globalDir, dir);
|
|
626
602
|
const dest = path.join(localAgentsDir, dir);
|
|
627
603
|
if (fs.existsSync(src)) {
|
|
628
604
|
count += copyRecursive(src, dest, { overwrite: true });
|
|
@@ -631,45 +607,14 @@ function setupWorkspace(cwd) {
|
|
|
631
607
|
|
|
632
608
|
// Copy root-level files
|
|
633
609
|
for (const f of rootFiles) {
|
|
634
|
-
|
|
635
|
-
if (!fs.existsSync(src)) {
|
|
636
|
-
src = path.join(globalDir, f);
|
|
637
|
-
}
|
|
610
|
+
const src = path.join(globalDir, f);
|
|
638
611
|
const dest = path.join(localAgentsDir, f);
|
|
639
|
-
if (fs.existsSync(src)) {
|
|
612
|
+
if (fs.existsSync(src) && !fs.existsSync(dest)) {
|
|
640
613
|
fs.copyFileSync(src, dest);
|
|
641
614
|
count++;
|
|
642
615
|
}
|
|
643
616
|
}
|
|
644
617
|
|
|
645
|
-
// Copy hooks.json to .agents/ root if exists in global plugin
|
|
646
|
-
const hooksFiles = ['hooks.json', '_workspace_hooks.json'];
|
|
647
|
-
for (const hf of hooksFiles) {
|
|
648
|
-
const hooksSrc = path.join(globalDir, hf);
|
|
649
|
-
if (fs.existsSync(hooksSrc)) {
|
|
650
|
-
const hooksDest = path.join(localAgentsDir, 'hooks.json');
|
|
651
|
-
if (!fs.existsSync(hooksDest)) {
|
|
652
|
-
fs.copyFileSync(hooksSrc, hooksDest);
|
|
653
|
-
count++;
|
|
654
|
-
}
|
|
655
|
-
break;
|
|
656
|
-
}
|
|
657
|
-
}
|
|
658
|
-
|
|
659
|
-
// Copy mcp_config.json to .agents/ root if exists in global plugin
|
|
660
|
-
const mcpFiles = ['mcp_config.json', '_workspace_mcp_config.json'];
|
|
661
|
-
for (const mf of mcpFiles) {
|
|
662
|
-
const mcpSrc = path.join(globalDir, mf);
|
|
663
|
-
if (fs.existsSync(mcpSrc)) {
|
|
664
|
-
const mcpDest = path.join(localAgentsDir, 'mcp_config.json');
|
|
665
|
-
if (!fs.existsSync(mcpDest)) {
|
|
666
|
-
fs.copyFileSync(mcpSrc, mcpDest);
|
|
667
|
-
count++;
|
|
668
|
-
}
|
|
669
|
-
break;
|
|
670
|
-
}
|
|
671
|
-
}
|
|
672
|
-
|
|
673
618
|
// Copy license file to workspace
|
|
674
619
|
const LICENSE_FILE_NAME = '.seo-kit-license';
|
|
675
620
|
const globalLicense = path.join(globalDir, LICENSE_FILE_NAME);
|
package/lib/utils.js
CHANGED
|
@@ -168,7 +168,7 @@ function isJsonWithApiKey(filePath) {
|
|
|
168
168
|
return false;
|
|
169
169
|
}
|
|
170
170
|
const json = JSON.parse(content);
|
|
171
|
-
|
|
171
|
+
|
|
172
172
|
// Recursive check for custom secrets
|
|
173
173
|
function hasSecret(obj) {
|
|
174
174
|
if (typeof obj !== 'object' || obj === null) return false;
|
|
@@ -189,7 +189,7 @@ function isJsonWithApiKey(filePath) {
|
|
|
189
189
|
}
|
|
190
190
|
return false;
|
|
191
191
|
}
|
|
192
|
-
|
|
192
|
+
|
|
193
193
|
return hasSecret(json);
|
|
194
194
|
} catch (err) {
|
|
195
195
|
return false;
|
|
@@ -290,7 +290,7 @@ function isValidKeyFormat(key) {
|
|
|
290
290
|
const BANNER = `
|
|
291
291
|
${colorize('cyan', '╔═══════════════════════════════════════════════════════╗')}
|
|
292
292
|
${colorize('cyan', '║')} ${colorize('bold', '🔍 SEO Kit for Google Antigravity')} ${colorize('cyan', '║')}
|
|
293
|
-
${colorize('cyan', '║')} ${colorize('dim', '
|
|
293
|
+
${colorize('cyan', '║')} ${colorize('dim', 'v3.0.0 — Professional Agentic SEO Platform')} ${colorize('cyan', '║')}
|
|
294
294
|
${colorize('cyan', '╚═══════════════════════════════════════════════════════╝')}
|
|
295
295
|
`;
|
|
296
296
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "antigravity-seo-kit",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Professional Agentic SEO Platform for Google Antigravity 2 AI Agent — 44 specialized skills covering technical audit, E-E-A-T, schema, GEO, local SEO & more",
|
|
5
5
|
"main": "lib/installer.js",
|
|
6
6
|
"bin": {
|