ai-agent-config 2.7.1 → 2.7.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-agent-config",
3
- "version": "2.7.1",
3
+ "version": "2.7.2",
4
4
  "description": "Universal skill & workflow manager for AI coding assistants with bi-directional GitHub sync",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Config Manager Module
3
- * Manages user configuration for ai-agent-config v2.3
3
+ * Manages user configuration for ai-agent-config
4
4
  */
5
5
 
6
6
  const fs = require("fs");
@@ -10,6 +10,7 @@ const os = require("os");
10
10
  const CONFIG_DIR = path.join(os.homedir(), ".ai-agent");
11
11
  const CONFIG_FILE = path.join(CONFIG_DIR, "config.json");
12
12
  const OFFICIAL_SOURCES = path.join(__dirname, "../config/official-sources.json");
13
+ const CONFIG_VERSION = require("../package.json").version;
13
14
 
14
15
  /**
15
16
  * Get user config path
@@ -49,7 +50,7 @@ function loadOfficialSources() {
49
50
  */
50
51
  function createDefaultConfig() {
51
52
  const config = {
52
- version: "2.3",
53
+ version: CONFIG_VERSION,
53
54
  repository: {
54
55
  url: null,
55
56
  branch: "main",
@@ -96,11 +97,11 @@ function initConfig(force = false) {
96
97
  }
97
98
 
98
99
  /**
99
- * Migrate config from older versions to v2.3
100
+ * Migrate config from older versions to current version
100
101
  */
101
102
  function migrateConfig(oldConfig) {
102
103
  const newConfig = {
103
- version: "2.3",
104
+ version: CONFIG_VERSION,
104
105
  repository: {
105
106
  url: oldConfig.repository?.url || null,
106
107
  branch: oldConfig.repository?.branch || "main",
@@ -137,9 +138,9 @@ function loadConfig() {
137
138
  const data = fs.readFileSync(CONFIG_FILE, "utf-8");
138
139
  let config = JSON.parse(data);
139
140
 
140
- // Auto-migrate from v2.0/v2.2 to v2.3
141
- if (config.version !== "2.3") {
142
- console.log(`🔄 Migrating config from v${config.version} to v2.3...`);
141
+ // Auto-migrate from older versions
142
+ if (config.version !== CONFIG_VERSION) {
143
+ console.log(`🔄 Migrating config from v${config.version} to v${CONFIG_VERSION}...`);
143
144
  config = migrateConfig(config);
144
145
  saveConfig(config);
145
146
  console.log("✅ Config migrated successfully!");
@@ -188,10 +189,10 @@ function validateConfig(config) {
188
189
  }
189
190
  }
190
191
 
191
- // V2.3 validation
192
- if (config.version === "2.3") {
192
+ // Current version validation
193
+ if (config.version === CONFIG_VERSION) {
193
194
  if (!config.repository) {
194
- errors.push("Missing repository field in v2.3 config");
195
+ errors.push(`Missing repository field in v${CONFIG_VERSION} config`);
195
196
  } else {
196
197
  if (config.repository.url && typeof config.repository.url !== "string") {
197
198
  errors.push("repository.url must be a string");
@@ -59,6 +59,12 @@ function main() {
59
59
  console.log("📦 Repository: https://github.com/dongitran/ai-agent-config\n");
60
60
 
61
61
  // Auto-install Bitwarden MCP server to Antigravity
62
+ // Skip if AI_AGENT_NO_AUTOCONFIG is set (opt-out for security/trust)
63
+ if (process.env.AI_AGENT_NO_AUTOCONFIG === "1" || process.env.AI_AGENT_NO_AUTOCONFIG === "true") {
64
+ console.log("⏭️ Skipping auto-config (AI_AGENT_NO_AUTOCONFIG is set)\n");
65
+ return;
66
+ }
67
+
62
68
  const fs = require("fs");
63
69
  const path = require("path");
64
70
  const os = require("os");