antigravity-seo-kit 2.9.9 → 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 +14 -77
- package/lib/utils.js +3 -3
- package/package.json +1 -1
package/lib/installer.js
CHANGED
|
@@ -499,10 +499,10 @@ async function installPlugin(licenseKey) {
|
|
|
499
499
|
process.exit(1);
|
|
500
500
|
}
|
|
501
501
|
|
|
502
|
-
// Step 3:
|
|
503
|
-
// Tarball
|
|
504
|
-
//
|
|
505
|
-
//
|
|
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)
|
|
506
506
|
const legacyAgentDir = path.join(globalPluginDir, '.agent');
|
|
507
507
|
const newAgentsDir = path.join(globalPluginDir, '.agents');
|
|
508
508
|
|
|
@@ -511,47 +511,19 @@ async function installPlugin(licenseKey) {
|
|
|
511
511
|
: null;
|
|
512
512
|
|
|
513
513
|
if (downloadedDir) {
|
|
514
|
-
//
|
|
515
|
-
const
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
const src = path.join(downloadedDir, dir);
|
|
520
|
-
const dest = path.join(globalPluginDir, dir);
|
|
521
|
-
if (fs.existsSync(src)) {
|
|
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()) {
|
|
522
519
|
if (fs.existsSync(dest)) removeRecursive(dest);
|
|
523
520
|
fs.renameSync(src, dest);
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
for (const file of pluginFiles) {
|
|
528
|
-
const src = path.join(downloadedDir, file);
|
|
529
|
-
const dest = path.join(globalPluginDir, file);
|
|
530
|
-
if (fs.existsSync(src)) {
|
|
521
|
+
} else {
|
|
531
522
|
if (fs.existsSync(dest)) fs.unlinkSync(dest);
|
|
532
523
|
fs.renameSync(src, dest);
|
|
533
524
|
}
|
|
534
525
|
}
|
|
535
526
|
|
|
536
|
-
// Workspace-level dirs → _workspace_ prefix (for setupWorkspace later)
|
|
537
|
-
const workspaceDirs = ['agents', 'workflows', 'scripts', 'config', 'dashboard', 'docs', '.shared'];
|
|
538
|
-
for (const dir of workspaceDirs) {
|
|
539
|
-
const src = path.join(downloadedDir, dir);
|
|
540
|
-
const dest = path.join(globalPluginDir, `_workspace_${dir}`);
|
|
541
|
-
if (fs.existsSync(src)) {
|
|
542
|
-
if (fs.existsSync(dest)) removeRecursive(dest);
|
|
543
|
-
fs.renameSync(src, dest);
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
// Workspace root files (.md) → _workspace_ prefix
|
|
548
|
-
for (const f of fs.readdirSync(downloadedDir)) {
|
|
549
|
-
const src = path.join(downloadedDir, f);
|
|
550
|
-
if (fs.statSync(src).isFile() && f.endsWith('.md')) {
|
|
551
|
-
fs.copyFileSync(src, path.join(globalPluginDir, `_workspace_${f}`));
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
|
|
555
527
|
// Clean up extracted dir
|
|
556
528
|
removeRecursive(downloadedDir);
|
|
557
529
|
}
|
|
@@ -622,15 +594,11 @@ function setupWorkspace(cwd) {
|
|
|
622
594
|
// Copy workspace-level dirs from global plugin to local .agents/
|
|
623
595
|
// Skills & rules are NOT copied — Antigravity loads them from global plugin
|
|
624
596
|
const workspaceDirs = ['agents', 'workflows', 'scripts', 'config', 'dashboard', 'docs', '.shared'];
|
|
625
|
-
const rootFiles = ['seo-architecture.md'];
|
|
597
|
+
const rootFiles = ['seo-architecture.md', 'hooks.json', 'mcp_config.json'];
|
|
626
598
|
|
|
627
599
|
let count = 0;
|
|
628
600
|
for (const dir of workspaceDirs) {
|
|
629
|
-
|
|
630
|
-
let src = path.join(globalDir, `_workspace_${dir}`);
|
|
631
|
-
if (!fs.existsSync(src)) {
|
|
632
|
-
src = path.join(globalDir, dir);
|
|
633
|
-
}
|
|
601
|
+
const src = path.join(globalDir, dir);
|
|
634
602
|
const dest = path.join(localAgentsDir, dir);
|
|
635
603
|
if (fs.existsSync(src)) {
|
|
636
604
|
count += copyRecursive(src, dest, { overwrite: true });
|
|
@@ -639,45 +607,14 @@ function setupWorkspace(cwd) {
|
|
|
639
607
|
|
|
640
608
|
// Copy root-level files
|
|
641
609
|
for (const f of rootFiles) {
|
|
642
|
-
|
|
643
|
-
if (!fs.existsSync(src)) {
|
|
644
|
-
src = path.join(globalDir, f);
|
|
645
|
-
}
|
|
610
|
+
const src = path.join(globalDir, f);
|
|
646
611
|
const dest = path.join(localAgentsDir, f);
|
|
647
|
-
if (fs.existsSync(src)) {
|
|
612
|
+
if (fs.existsSync(src) && !fs.existsSync(dest)) {
|
|
648
613
|
fs.copyFileSync(src, dest);
|
|
649
614
|
count++;
|
|
650
615
|
}
|
|
651
616
|
}
|
|
652
617
|
|
|
653
|
-
// Copy hooks.json to .agents/ root if exists in global plugin
|
|
654
|
-
const hooksFiles = ['hooks.json', '_workspace_hooks.json'];
|
|
655
|
-
for (const hf of hooksFiles) {
|
|
656
|
-
const hooksSrc = path.join(globalDir, hf);
|
|
657
|
-
if (fs.existsSync(hooksSrc)) {
|
|
658
|
-
const hooksDest = path.join(localAgentsDir, 'hooks.json');
|
|
659
|
-
if (!fs.existsSync(hooksDest)) {
|
|
660
|
-
fs.copyFileSync(hooksSrc, hooksDest);
|
|
661
|
-
count++;
|
|
662
|
-
}
|
|
663
|
-
break;
|
|
664
|
-
}
|
|
665
|
-
}
|
|
666
|
-
|
|
667
|
-
// Copy mcp_config.json to .agents/ root if exists in global plugin
|
|
668
|
-
const mcpFiles = ['mcp_config.json', '_workspace_mcp_config.json'];
|
|
669
|
-
for (const mf of mcpFiles) {
|
|
670
|
-
const mcpSrc = path.join(globalDir, mf);
|
|
671
|
-
if (fs.existsSync(mcpSrc)) {
|
|
672
|
-
const mcpDest = path.join(localAgentsDir, 'mcp_config.json');
|
|
673
|
-
if (!fs.existsSync(mcpDest)) {
|
|
674
|
-
fs.copyFileSync(mcpSrc, mcpDest);
|
|
675
|
-
count++;
|
|
676
|
-
}
|
|
677
|
-
break;
|
|
678
|
-
}
|
|
679
|
-
}
|
|
680
|
-
|
|
681
618
|
// Copy license file to workspace
|
|
682
619
|
const LICENSE_FILE_NAME = '.seo-kit-license';
|
|
683
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": {
|