antigravity-seo-kit 2.9.7 → 2.9.8
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 +51 -91
- package/package.json +1 -1
package/lib/installer.js
CHANGED
|
@@ -69,7 +69,7 @@ async function install(licenseKey, cwd) {
|
|
|
69
69
|
process.exit(1);
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
// Step 3: Restructure into .agents/ format if server sent legacy .agent/
|
|
72
|
+
// Step 3: Restructure into .agents/ flat format if server sent legacy .agent/
|
|
73
73
|
const legacyAgentDir = path.join(cwd, '.agent');
|
|
74
74
|
const newAgentsDir = path.join(cwd, '.agents');
|
|
75
75
|
|
|
@@ -78,10 +78,10 @@ async function install(licenseKey, cwd) {
|
|
|
78
78
|
try {
|
|
79
79
|
fs.mkdirSync(newAgentsDir, { recursive: true });
|
|
80
80
|
|
|
81
|
-
//
|
|
82
|
-
const
|
|
81
|
+
// ALL dirs go directly into .agents/ (flat workspace structure)
|
|
82
|
+
const allDirs = ['skills', 'rules', 'agents', 'workflows', 'scripts', 'config', 'dashboard', 'docs', '.shared'];
|
|
83
83
|
let migrateCount = 0;
|
|
84
|
-
for (const dir of
|
|
84
|
+
for (const dir of allDirs) {
|
|
85
85
|
const src = path.join(legacyAgentDir, dir);
|
|
86
86
|
const dest = path.join(newAgentsDir, dir);
|
|
87
87
|
if (fs.existsSync(src)) {
|
|
@@ -89,40 +89,16 @@ async function install(licenseKey, cwd) {
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
// Root-level .md
|
|
92
|
+
// Root-level files (.md, .json) → .agents/
|
|
93
93
|
for (const f of fs.readdirSync(legacyAgentDir)) {
|
|
94
94
|
const src = path.join(legacyAgentDir, f);
|
|
95
|
-
if (fs.statSync(src).isFile()
|
|
95
|
+
if (fs.statSync(src).isFile()) {
|
|
96
96
|
fs.copyFileSync(src, path.join(newAgentsDir, f));
|
|
97
97
|
migrateCount++;
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
//
|
|
102
|
-
const pluginDir = path.join(newAgentsDir, 'plugins', 'antigravity-seo-kit');
|
|
103
|
-
fs.mkdirSync(pluginDir, { recursive: true });
|
|
104
|
-
|
|
105
|
-
const skillsSrc = path.join(legacyAgentDir, 'skills');
|
|
106
|
-
if (fs.existsSync(skillsSrc)) {
|
|
107
|
-
migrateCount += copyRecursive(skillsSrc, path.join(pluginDir, 'skills'), { overwrite: true });
|
|
108
|
-
}
|
|
109
|
-
const rulesSrc = path.join(legacyAgentDir, 'rules');
|
|
110
|
-
if (fs.existsSync(rulesSrc)) {
|
|
111
|
-
migrateCount += copyRecursive(rulesSrc, path.join(pluginDir, 'rules'), { overwrite: true });
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
// Create plugin.json
|
|
115
|
-
const pluginJsonPath = path.join(pluginDir, 'plugin.json');
|
|
116
|
-
if (!fs.existsSync(pluginJsonPath)) {
|
|
117
|
-
fs.writeFileSync(pluginJsonPath, JSON.stringify({
|
|
118
|
-
name: 'antigravity-seo-kit',
|
|
119
|
-
version: PACKAGE_VERSION,
|
|
120
|
-
description: 'Professional Agentic SEO Platform — 44+ specialized skills',
|
|
121
|
-
author: { name: 'Solann', email: 'admin@solann.io' },
|
|
122
|
-
}, null, 2), 'utf-8');
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
// Remove legacy .agent/ (downloaded files only, not user data)
|
|
101
|
+
// Remove legacy .agent/
|
|
126
102
|
removeRecursive(legacyAgentDir);
|
|
127
103
|
|
|
128
104
|
spinMigrate.succeed(`Restructured to .agents/ format (${migrateCount} files)`);
|
|
@@ -250,12 +226,6 @@ async function uninstall(cwd) {
|
|
|
250
226
|
totalRemoved += legacyUninstall(cwd);
|
|
251
227
|
}
|
|
252
228
|
|
|
253
|
-
// Also clean .agents/plugins/antigravity-seo-kit/ if it exists (v3)
|
|
254
|
-
const v3PluginDir = path.join(cwd, '.agents', 'plugins', 'antigravity-seo-kit');
|
|
255
|
-
if (fs.existsSync(v3PluginDir)) {
|
|
256
|
-
totalRemoved += removeRecursive(v3PluginDir);
|
|
257
|
-
}
|
|
258
|
-
|
|
259
229
|
// Remove license file
|
|
260
230
|
removeLicenseFile(cwd);
|
|
261
231
|
|
|
@@ -354,11 +324,6 @@ async function status(cwd) {
|
|
|
354
324
|
}
|
|
355
325
|
}
|
|
356
326
|
}
|
|
357
|
-
// Also count plugin dir if v3
|
|
358
|
-
const pluginSkillsDir = path.join(cwd, '.agents', 'plugins', 'antigravity-seo-kit', 'skills');
|
|
359
|
-
if (fs.existsSync(pluginSkillsDir)) {
|
|
360
|
-
totalLegacy += fs.readdirSync(pluginSkillsDir).length;
|
|
361
|
-
}
|
|
362
327
|
console.log(` ${colorize('cyan', 'Components:')} ${totalLegacy} installed`);
|
|
363
328
|
}
|
|
364
329
|
|
|
@@ -646,17 +611,16 @@ function setupWorkspace(cwd) {
|
|
|
646
611
|
try {
|
|
647
612
|
fs.mkdirSync(localAgentsDir, { recursive: true });
|
|
648
613
|
|
|
649
|
-
//
|
|
650
|
-
//
|
|
614
|
+
// Copy workspace-level dirs from global plugin to local .agents/
|
|
615
|
+
// Skills & rules are NOT copied — Antigravity loads them from global plugin
|
|
651
616
|
const workspaceDirs = ['agents', 'workflows', 'scripts', 'config', 'dashboard', 'docs', '.shared'];
|
|
652
|
-
const
|
|
617
|
+
const rootFiles = ['seo-architecture.md'];
|
|
653
618
|
|
|
654
619
|
let count = 0;
|
|
655
620
|
for (const dir of workspaceDirs) {
|
|
656
621
|
// Try _workspace_ prefixed dirs first (v3.0 install format)
|
|
657
622
|
let src = path.join(globalDir, `_workspace_${dir}`);
|
|
658
623
|
if (!fs.existsSync(src)) {
|
|
659
|
-
// Fallback to flat dir (v2.x compat)
|
|
660
624
|
src = path.join(globalDir, dir);
|
|
661
625
|
}
|
|
662
626
|
const dest = path.join(localAgentsDir, dir);
|
|
@@ -664,7 +628,9 @@ function setupWorkspace(cwd) {
|
|
|
664
628
|
count += copyRecursive(src, dest, { overwrite: true });
|
|
665
629
|
}
|
|
666
630
|
}
|
|
667
|
-
|
|
631
|
+
|
|
632
|
+
// Copy root-level files
|
|
633
|
+
for (const f of rootFiles) {
|
|
668
634
|
let src = path.join(globalDir, `_workspace_${f}`);
|
|
669
635
|
if (!fs.existsSync(src)) {
|
|
670
636
|
src = path.join(globalDir, f);
|
|
@@ -676,18 +642,35 @@ function setupWorkspace(cwd) {
|
|
|
676
642
|
}
|
|
677
643
|
}
|
|
678
644
|
|
|
679
|
-
//
|
|
680
|
-
const
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
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
|
+
}
|
|
689
671
|
}
|
|
690
672
|
|
|
673
|
+
// Copy license file to workspace
|
|
691
674
|
const LICENSE_FILE_NAME = '.seo-kit-license';
|
|
692
675
|
const globalLicense = path.join(globalDir, LICENSE_FILE_NAME);
|
|
693
676
|
const localLicense = path.join(cwd, LICENSE_FILE_NAME);
|
|
@@ -696,6 +679,10 @@ function setupWorkspace(cwd) {
|
|
|
696
679
|
}
|
|
697
680
|
|
|
698
681
|
spin.succeed(`Workspace setup complete! Copied ${count} files to .agents/`);
|
|
682
|
+
console.log('');
|
|
683
|
+
info('Skills and rules are loaded from global plugin automatically.');
|
|
684
|
+
info('Workspace-level files (workflows, agents, scripts) are now local.');
|
|
685
|
+
console.log('');
|
|
699
686
|
} catch (err) {
|
|
700
687
|
spin.fail('Workspace setup failed');
|
|
701
688
|
error(err.message);
|
|
@@ -724,11 +711,12 @@ function migrate(cwd) {
|
|
|
724
711
|
|
|
725
712
|
const spin = spinner('Migrating .agent/ → .agents/ (v2.x → v3.0)...').start();
|
|
726
713
|
try {
|
|
714
|
+
fs.mkdirSync(newAgentsDir, { recursive: true });
|
|
727
715
|
let count = 0;
|
|
728
716
|
|
|
729
|
-
//
|
|
730
|
-
const
|
|
731
|
-
for (const dir of
|
|
717
|
+
// Copy ALL directories directly into .agents/ (flat workspace structure)
|
|
718
|
+
const allDirs = ['skills', 'rules', 'agents', 'workflows', 'scripts', 'config', 'dashboard', 'docs', '.shared'];
|
|
719
|
+
for (const dir of allDirs) {
|
|
732
720
|
const src = path.join(oldAgentDir, dir);
|
|
733
721
|
const dest = path.join(newAgentsDir, dir);
|
|
734
722
|
if (fs.existsSync(src)) {
|
|
@@ -736,43 +724,15 @@ function migrate(cwd) {
|
|
|
736
724
|
}
|
|
737
725
|
}
|
|
738
726
|
|
|
739
|
-
// Copy root-level md
|
|
740
|
-
const
|
|
741
|
-
for (const f of rootFiles) {
|
|
727
|
+
// Copy root-level files (.md, .json, etc.)
|
|
728
|
+
for (const f of fs.readdirSync(oldAgentDir)) {
|
|
742
729
|
const src = path.join(oldAgentDir, f);
|
|
743
|
-
const dest = path.join(newAgentsDir, f);
|
|
744
730
|
if (fs.statSync(src).isFile()) {
|
|
745
|
-
fs.copyFileSync(src,
|
|
731
|
+
fs.copyFileSync(src, path.join(newAgentsDir, f));
|
|
746
732
|
count++;
|
|
747
733
|
}
|
|
748
734
|
}
|
|
749
735
|
|
|
750
|
-
// 2. Copy skills + rules into plugin structure
|
|
751
|
-
const pluginDir = path.join(newAgentsDir, 'plugins', 'antigravity-seo-kit');
|
|
752
|
-
fs.mkdirSync(pluginDir, { recursive: true });
|
|
753
|
-
|
|
754
|
-
const skillsSrc = path.join(oldAgentDir, 'skills');
|
|
755
|
-
const skillsDest = path.join(pluginDir, 'skills');
|
|
756
|
-
if (fs.existsSync(skillsSrc)) {
|
|
757
|
-
count += copyRecursive(skillsSrc, skillsDest, { overwrite: true, mergeJson: true });
|
|
758
|
-
}
|
|
759
|
-
|
|
760
|
-
const rulesSrc = path.join(oldAgentDir, 'rules');
|
|
761
|
-
const rulesDest = path.join(pluginDir, 'rules');
|
|
762
|
-
if (fs.existsSync(rulesSrc)) {
|
|
763
|
-
count += copyRecursive(rulesSrc, rulesDest, { overwrite: true });
|
|
764
|
-
}
|
|
765
|
-
|
|
766
|
-
// 3. Create plugin.json if missing
|
|
767
|
-
const pluginJsonPath = path.join(pluginDir, 'plugin.json');
|
|
768
|
-
if (!fs.existsSync(pluginJsonPath)) {
|
|
769
|
-
fs.writeFileSync(pluginJsonPath, JSON.stringify({
|
|
770
|
-
name: 'antigravity-seo-kit',
|
|
771
|
-
version: PACKAGE_VERSION,
|
|
772
|
-
description: 'Migrated from v2.x .agent/ structure',
|
|
773
|
-
}, null, 2), 'utf-8');
|
|
774
|
-
}
|
|
775
|
-
|
|
776
736
|
spin.succeed(`Migration complete! ${count} files moved to .agents/`);
|
|
777
737
|
console.log('');
|
|
778
738
|
info('The old .agent/ directory has been preserved as backup.');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "antigravity-seo-kit",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.8",
|
|
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": {
|