antigravity-seo-kit 3.0.5 → 3.1.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/lib/downloader.js CHANGED
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const https = require('https');
4
+ const http = require('http');
4
5
  const zlib = require('zlib');
5
6
  const fs = require('fs');
6
7
  const path = require('path');
@@ -21,11 +22,11 @@ function downloadBuffer(url, headers = {}, { timeout = 60000, maxRedirects = 5 }
21
22
  const parsed = new URL(url);
22
23
 
23
24
  // SECURITY: Reject HTTP — license key must never travel over cleartext
24
- if (parsed.protocol !== 'https:') {
25
+ if (parsed.protocol !== 'https:' && parsed.hostname !== '127.0.0.1' && parsed.hostname !== 'localhost') {
25
26
  return reject(new Error('HTTPS required for secure asset downloads. Refusing HTTP connection.'));
26
27
  }
27
28
 
28
- const transport = https;
29
+ const transport = parsed.protocol === 'https:' ? https : http;
29
30
 
30
31
  const options = {
31
32
  hostname: parsed.hostname,
package/lib/installer.js CHANGED
@@ -16,7 +16,7 @@ const downloader = require('./downloader');
16
16
  // No hardcoded names — scan directories for seo-* prefixed files/folders.
17
17
 
18
18
  const LEGACY_SEO_PREFIX = 'seo-';
19
- const LEGACY_DIRS = ['skills', 'workflows', 'rules', 'agents'];
19
+ const LEGACY_DIRS = ['skills', 'workflows', 'rules', 'agents', 'agent'];
20
20
 
21
21
  // ─── Install Command ────────────────────────────────────────────────────────
22
22
 
@@ -79,11 +79,12 @@ async function install(licenseKey, cwd) {
79
79
  fs.mkdirSync(newAgentsDir, { recursive: true });
80
80
 
81
81
  // ALL dirs go directly into .agents/ (flat workspace structure)
82
- const allDirs = ['skills', 'rules', 'agents', 'workflows', 'scripts', 'config', 'dashboard', 'docs', '.shared'];
82
+ const allDirs = ['skills', 'rules', 'agent', 'agents', 'workflows', 'scripts', 'config', 'dashboard', 'docs', '.shared'];
83
83
  let migrateCount = 0;
84
84
  for (const dir of allDirs) {
85
85
  const src = path.join(legacyAgentDir, dir);
86
- const dest = path.join(newAgentsDir, dir);
86
+ const targetSubDir = (dir === 'agents') ? 'agent' : dir;
87
+ const dest = path.join(newAgentsDir, targetSubDir);
87
88
  if (fs.existsSync(src)) {
88
89
  migrateCount += copyRecursive(src, dest, { overwrite: true });
89
90
  }
@@ -593,7 +594,7 @@ function setupWorkspace(cwd) {
593
594
 
594
595
  // Copy workspace-level dirs from global plugin to local .agents/
595
596
  // Skills & rules are NOT copied — Antigravity loads them from global plugin
596
- const workspaceDirs = ['agents', 'workflows', 'scripts', 'config', 'dashboard', 'docs', '.shared'];
597
+ const workspaceDirs = ['agent', 'workflows', 'scripts', 'config', 'dashboard', 'docs', '.shared'];
597
598
  const rootFiles = ['seo-architecture.md', 'hooks.json', 'mcp_config.json'];
598
599
 
599
600
  let count = 0;
@@ -660,10 +661,11 @@ function migrate(cwd) {
660
661
  let count = 0;
661
662
 
662
663
  // Copy ALL directories directly into .agents/ (flat workspace structure)
663
- const allDirs = ['skills', 'rules', 'agents', 'workflows', 'scripts', 'config', 'dashboard', 'docs', '.shared'];
664
+ const allDirs = ['skills', 'rules', 'agent', 'agents', 'workflows', 'scripts', 'config', 'dashboard', 'docs', '.shared'];
664
665
  for (const dir of allDirs) {
665
666
  const src = path.join(oldAgentDir, dir);
666
- const dest = path.join(newAgentsDir, dir);
667
+ const targetSubDir = (dir === 'agents') ? 'agent' : dir;
668
+ const dest = path.join(newAgentsDir, targetSubDir);
667
669
  if (fs.existsSync(src)) {
668
670
  count += copyRecursive(src, dest, { overwrite: true, mergeJson: true });
669
671
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antigravity-seo-kit",
3
- "version": "3.0.5",
3
+ "version": "3.1.1",
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": {
@@ -37,6 +37,8 @@
37
37
  "scripts": {
38
38
  "pack-assets": "node scripts/pack-assets.js",
39
39
  "pack-npm": "npm pack --pack-destination dist",
40
- "pack-all": "node scripts/pack-assets.js && npm pack --pack-destination dist"
40
+ "pack-all": "node scripts/pack-assets.js && npm pack --pack-destination dist",
41
+ "test-install": "node tests/test_live_install.js",
42
+ "test": "node tests/installer.test.js && node tests/test_live_install.js && python tests/test_verify_agents.py"
41
43
  }
42
44
  }