feature-architect-agent 1.0.11 → 1.0.12

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/README.md CHANGED
@@ -63,7 +63,17 @@ npm install && npm run build && npm link
63
63
 
64
64
  ### API Key / Provider Setup
65
65
 
66
- **Option 1: Use FREE local models (Recommended for hackathons!)**
66
+ **Option 1: Use FREE cloud models (Recommended for hackathons!)**
67
+
68
+ ```bash
69
+ # MiniMax M2.5 - FREE tier available!
70
+ export MINIMAX_API_KEY=xxx
71
+
72
+ # Z AI GLM - FREE tier available!
73
+ export ZAI_API_KEY=xxx
74
+ ```
75
+
76
+ **Option 2: Use FREE local models**
67
77
 
68
78
  ```bash
69
79
  # OpenCode / Ollama - No API key needed!
@@ -71,7 +81,7 @@ export OPENCODE_BASE_URL=http://localhost:11434/v1
71
81
  export OPENCODE_MODEL=llama3.2
72
82
  ```
73
83
 
74
- **Option 2: Use cloud providers**
84
+ **Option 3: Use cloud providers**
75
85
 
76
86
  ```bash
77
87
  # Gemini (Google)
@@ -87,7 +97,7 @@ export ANTHROPIC_API_KEY=sk-ant-xxx
87
97
  **For persistent configuration**, add to `~/.bashrc` or `~/.zshrc`:
88
98
 
89
99
  ```bash
90
- echo 'export OPENCODE_BASE_URL=http://localhost:11434/v1' >> ~/.bashrc
100
+ echo 'export MINIMAX_API_KEY=xxx' >> ~/.bashrc
91
101
  source ~/.bashrc
92
102
  ```
93
103
 
@@ -530,14 +540,22 @@ $ feature-architect plan "Add user comments"
530
540
  The agent automatically detects which API key is available and uses the appropriate provider. No manual selection needed!
531
541
 
532
542
  **Priority order:**
533
- 1. `OPENCODE_BASE_URL` → OpenCode/Ollama (FREE - no API key needed!)
534
- 2. `GOOGLE_API_KEY` → Gemini
535
- 3. `OPENAI_API_KEY` → OpenAI (GPT-4, etc.)
536
- 4. `ANTHROPIC_API_KEY` → Claude (Anthropic)
537
- 5. `AI_API_KEY` → Generic fallback
543
+ 1. `MINIMAX_API_KEY` → MiniMax M2.5 (FREE - no signup required!)
544
+ 2. `ZAI_API_KEY` → Z AI GLM (FREE tier available!)
545
+ 3. `OPENCODE_BASE_URL` → OpenCode/Ollama (FREE - local!)
546
+ 4. `GOOGLE_API_KEY` → Gemini
547
+ 5. `OPENAI_API_KEY` → OpenAI (GPT-4, etc.)
548
+ 6. `ANTHROPIC_API_KEY` → Claude (Anthropic)
549
+ 7. `AI_API_KEY` → Generic fallback
538
550
 
539
551
  **Force specific provider:**
540
552
  ```bash
553
+ # Use MiniMax (free M2.5 model)
554
+ feature-architect plan "user profile" --provider minimax
555
+
556
+ # Use Z AI (free GLM models)
557
+ feature-architect plan "user profile" --provider zai
558
+
541
559
  # Use OpenCode (free local models)
542
560
  feature-architect plan "user profile" --provider opencode
543
561
 
@@ -588,7 +606,7 @@ feature-architect import-context --input team-context.json
588
606
  ## 🚦 Getting Started
589
607
 
590
608
  1. **Install**: `npm install -g feature-architect-agent`
591
- 2. **Set Provider**: `export OPENCODE_BASE_URL=http://localhost:11434/v1` (FREE!)
609
+ 2. **Set Provider**: `export MINIMAX_API_KEY=xxx` (FREE!)
592
610
  3. **Setup**: `cd your-project && feature-architect init`
593
611
  4. **Plan**: `feature-architect plan "your feature here"`
594
612
  5. **Implement**: Use the generated plan as your blueprint
package/dist/cli/index.js CHANGED
@@ -10,7 +10,7 @@ const program = new commander_1.Command();
10
10
  program
11
11
  .name('feature-architect')
12
12
  .description('AI-powered feature planning agent - generate complete technical specifications')
13
- .version('1.0.0');
13
+ .version('1.0.11');
14
14
  program
15
15
  .command('init')
16
16
  .description('Initialize in project (analyze codebase)')
@@ -52,11 +52,11 @@ program
52
52
  });
53
53
  // Default: show help if no command
54
54
  program.on('command:*', () => {
55
- (0, logger_js_1.header)('Feature Architect Agent v1.0.0');
55
+ (0, logger_js_1.header)('Feature Architect Agent v1.0.11');
56
56
  (0, logger_js_1.info)('AI-powered feature planning for development teams\n');
57
57
  (0, logger_js_1.dim)('Quick start:');
58
58
  (0, logger_js_1.dim)(' 1. feature-architect init # Analyze codebase');
59
- (0, logger_js_1.dim)(' 2. export ANTHROPIC_API_KEY=xxx # Set API key');
59
+ (0, logger_js_1.dim)(' 2. export MINIMAX_API_KEY=xxx # Set API key (MiniMax M2.5 - FREE!)');
60
60
  (0, logger_js_1.dim)(' 3. feature-architect plan "feature" # Plan feature');
61
61
  console.log('');
62
62
  });
@@ -1 +1 @@
1
- {"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../src/commands/plan.ts"],"names":[],"mappings":"AAQA,wBAAsB,WAAW,CAC/B,OAAO,EAAE,MAAM,EACf,OAAO,GAAE;IACP,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;CACjB,GACL,OAAO,CAAC,IAAI,CAAC,CAkKf"}
1
+ {"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../src/commands/plan.ts"],"names":[],"mappings":"AAQA,wBAAsB,WAAW,CAC/B,OAAO,EAAE,MAAM,EACf,OAAO,GAAE;IACP,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;CACjB,GACL,OAAO,CAAC,IAAI,CAAC,CA2Kf"}
@@ -39,11 +39,16 @@ async function planCommand(feature, options = {}) {
39
39
  // Auto-detect if not specified
40
40
  if (!provider) {
41
41
  // Check for API keys in environment (no built-in keys for security)
42
- // Z AI first (free GLM models)
43
- if (process.env.ZAI_API_KEY || process.env.ZHIPU_API_KEY) {
42
+ // MiniMax first (free M2.5 model)
43
+ if (process.env.MINIMAX_API_KEY) {
44
+ provider = 'minimax';
45
+ apiKey = process.env.MINIMAX_API_KEY;
46
+ // Z AI second (free GLM models)
47
+ }
48
+ else if (process.env.ZAI_API_KEY || process.env.ZHIPU_API_KEY) {
44
49
  provider = 'zai';
45
50
  apiKey = process.env.ZAI_API_KEY || process.env.ZHIPU_API_KEY;
46
- // Opencode second (free local models)
51
+ // Opencode third (free local models)
47
52
  }
48
53
  else if (process.env.OPENCODE_BASE_URL || process.env.OPENCODE_URL) {
49
54
  provider = 'opencode';
@@ -71,13 +76,15 @@ async function planCommand(feature, options = {}) {
71
76
  (0, logger_js_1.dim)('You need to set an API key or local LLM to use this tool.');
72
77
  (0, logger_js_1.dim)('');
73
78
  (0, logger_js_1.dim)('Choose one of these options:');
74
- (0, logger_js_1.dim)(' export ZAI_API_KEY=xxx # For Z AI GLM models (FREE!)');
79
+ (0, logger_js_1.dim)(' export MINIMAX_API_KEY=xxx # For MiniMax M2.5 (FREE!)');
80
+ (0, logger_js_1.dim)(' export ZAI_API_KEY=xxx # For Z AI GLM models (FREE!)');
75
81
  (0, logger_js_1.dim)(' export OPENCODE_BASE_URL=http://localhost:11434/v1 # For OpenCode/Ollama');
76
82
  (0, logger_js_1.dim)(' export GOOGLE_API_KEY=xxx # For Gemini');
77
83
  (0, logger_js_1.dim)(' export OPENAI_API_KEY=sk-xxx # For OpenAI');
78
84
  (0, logger_js_1.dim)(' export ANTHROPIC_API_KEY=sk-ant-xxx # For Claude');
79
85
  (0, logger_js_1.dim)('');
80
86
  (0, logger_js_1.dim)('Get API keys:');
87
+ (0, logger_js_1.dim)(' MiniMax: https://www.minimaxi.com/user-center/basic-information/interface-key (M2.5-Free - FREE!)');
81
88
  (0, logger_js_1.dim)(' Z AI: https://open.bigmodel.cn/usercenter/apikeys (GLM-4.7-Flash - FREE!)');
82
89
  (0, logger_js_1.dim)(' OpenCode/Ollama: Install locally - FREE!');
83
90
  (0, logger_js_1.dim)(' Gemini: https://aistudio.google.com/app/apikey');
@@ -111,6 +118,10 @@ async function planCommand(feature, options = {}) {
111
118
  provider = 'zai';
112
119
  apiKey = process.env.ZAI_API_KEY || process.env.ZHIPU_API_KEY || '';
113
120
  }
121
+ else if (providerLower === 'minimax') {
122
+ provider = 'minimax';
123
+ apiKey = process.env.MINIMAX_API_KEY || '';
124
+ }
114
125
  if (!apiKey) {
115
126
  (0, logger_js_1.error)(`No API key found for ${provider}`);
116
127
  (0, logger_js_1.dim)(`Set it with: export ${provider.toUpperCase()}_API_KEY=xxx`);
@@ -0,0 +1,41 @@
1
+ /**
2
+ * MiniMax Provider
3
+ *
4
+ * For MiniMax AI models with OpenAI-compatible APIs.
5
+ * Free models available:
6
+ * - MiniMax-M2.5-Free (FREE!)
7
+ * - MiniMax-M2.5
8
+ * - MiniMax-Text-01
9
+ * - MiniMax-Audio
10
+ *
11
+ * Get API key: https://www.minimaxi.com/user-center/basic-information/interface-key
12
+ */
13
+ import type { LLMProvider } from './types.js';
14
+ export interface MiniMaxConfig {
15
+ baseURL?: string;
16
+ model?: string;
17
+ groupId?: string;
18
+ }
19
+ export declare class MiniMaxProvider implements LLMProvider {
20
+ private baseURL;
21
+ private model;
22
+ private apiKey;
23
+ private groupId;
24
+ constructor(apiKey: string, config?: MiniMaxConfig);
25
+ generate(prompt: string, options?: {
26
+ temperature?: number;
27
+ maxTokens?: number;
28
+ }): Promise<string>;
29
+ /**
30
+ * Update the model being used
31
+ */
32
+ setModel(model: string): void;
33
+ /**
34
+ * Get current configuration
35
+ */
36
+ getConfig(): {
37
+ baseURL: string;
38
+ model: string;
39
+ };
40
+ }
41
+ //# sourceMappingURL=MiniMax.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MiniMax.d.ts","sourceRoot":"","sources":["../../src/llm/MiniMax.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,MAAM,WAAW,aAAa;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,qBAAa,eAAgB,YAAW,WAAW;IACjD,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,OAAO,CAAS;gBAGtB,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,aAAkB;IAQtB,QAAQ,CACZ,MAAM,EAAE,MAAM,EACd,OAAO,GAAE;QAAE,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAO,GACzD,OAAO,CAAC,MAAM,CAAC;IAuDlB;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAI7B;;OAEG;IACH,SAAS,IAAI;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE;CAGhD"}
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ /**
3
+ * MiniMax Provider
4
+ *
5
+ * For MiniMax AI models with OpenAI-compatible APIs.
6
+ * Free models available:
7
+ * - MiniMax-M2.5-Free (FREE!)
8
+ * - MiniMax-M2.5
9
+ * - MiniMax-Text-01
10
+ * - MiniMax-Audio
11
+ *
12
+ * Get API key: https://www.minimaxi.com/user-center/basic-information/interface-key
13
+ */
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.MiniMaxProvider = void 0;
16
+ class MiniMaxProvider {
17
+ baseURL;
18
+ model;
19
+ apiKey;
20
+ groupId;
21
+ constructor(apiKey, config = {}) {
22
+ this.baseURL = config.baseURL || process.env.MINIMAX_BASE_URL || 'https://api.minimax.chat/v1';
23
+ this.model = config.model || process.env.MINIMAX_MODEL || 'MiniMax-M2.5-Free';
24
+ this.apiKey = apiKey || process.env.MINIMAX_API_KEY || '';
25
+ this.groupId = config.groupId || process.env.MINIMAX_GROUP_ID || '';
26
+ }
27
+ async generate(prompt, options = {}) {
28
+ const temperature = options.temperature ?? 0.7;
29
+ const maxTokens = options.maxTokens ?? 8000;
30
+ try {
31
+ const headers = {
32
+ 'Content-Type': 'application/json',
33
+ 'Authorization': `Bearer ${this.apiKey}`
34
+ };
35
+ // MiniMax requires Group ID header
36
+ if (this.groupId) {
37
+ headers['GroupId'] = this.groupId;
38
+ }
39
+ const response = await fetch(`${this.baseURL}/text/chatcompletion_v2`, {
40
+ method: 'POST',
41
+ headers,
42
+ body: JSON.stringify({
43
+ model: this.model,
44
+ messages: [
45
+ {
46
+ role: 'user',
47
+ content: prompt
48
+ }
49
+ ],
50
+ temperature,
51
+ tokens_to_generate: maxTokens,
52
+ stream: false
53
+ })
54
+ });
55
+ if (!response.ok) {
56
+ const errorText = await response.text();
57
+ throw new Error(`MiniMax API error: ${response.status} ${response.statusText}\n${errorText}`);
58
+ }
59
+ const data = await response.json();
60
+ if (data.error) {
61
+ throw new Error(`MiniMax API error: ${data.error.message || JSON.stringify(data.error)}`);
62
+ }
63
+ // MiniMax response format
64
+ return data.choices?.[0]?.message?.content || data.reply || '';
65
+ }
66
+ catch (error) {
67
+ if (error instanceof Error) {
68
+ throw new Error(`MiniMax request failed: ${error.message}`);
69
+ }
70
+ throw new Error('MiniMax request failed with unknown error');
71
+ }
72
+ }
73
+ /**
74
+ * Update the model being used
75
+ */
76
+ setModel(model) {
77
+ this.model = model;
78
+ }
79
+ /**
80
+ * Get current configuration
81
+ */
82
+ getConfig() {
83
+ return { baseURL: this.baseURL, model: this.model };
84
+ }
85
+ }
86
+ exports.MiniMaxProvider = MiniMaxProvider;
@@ -1,5 +1,5 @@
1
1
  import type { LLMProvider } from './types.js';
2
- export type ProviderType = 'claude' | 'anthropic' | 'openai' | 'gemini' | 'google' | 'opencode' | 'ollama' | 'zai' | 'zhipu';
2
+ export type ProviderType = 'claude' | 'anthropic' | 'openai' | 'gemini' | 'google' | 'opencode' | 'ollama' | 'zai' | 'zhipu' | 'minimax';
3
3
  export interface ProviderConfig {
4
4
  provider: ProviderType;
5
5
  apiKey?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../src/llm/factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAO9C,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,WAAW,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,QAAQ,GAAG,KAAK,GAAG,OAAO,CAAC;AAE7H,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,YAAY,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAYD,wBAAgB,cAAc,CAAC,MAAM,EAAE,cAAc,GAAG,WAAW,CAoDlE"}
1
+ {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../src/llm/factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAQ9C,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,WAAW,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,QAAQ,GAAG,KAAK,GAAG,OAAO,GAAG,SAAS,CAAC;AAEzI,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,YAAY,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAYD,wBAAgB,cAAc,CAAC,MAAM,EAAE,cAAc,GAAG,WAAW,CA8DlE"}
@@ -6,6 +6,7 @@ const OpenAI_js_1 = require("./OpenAI.js");
6
6
  const Gemini_js_1 = require("./Gemini.js");
7
7
  const Opencode_js_1 = require("./Opencode.js");
8
8
  const ZAI_js_1 = require("./ZAI.js");
9
+ const MiniMax_js_1 = require("./MiniMax.js");
9
10
  /**
10
11
  * Normalize provider name - accepts both 'claude'/'anthropic' and 'gemini'/'google'
11
12
  */
@@ -40,6 +41,12 @@ function createProvider(config) {
40
41
  return new ZAI_js_1.ZAIProvider(apiKey || process.env.ZAI_API_KEY || '', {
41
42
  model: config.model || process.env.ZAI_MODEL || 'GLM-4.7-Flash'
42
43
  });
44
+ case 'minimax':
45
+ return new MiniMax_js_1.MiniMaxProvider(apiKey || process.env.MINIMAX_API_KEY || '', {
46
+ baseURL: process.env.MINIMAX_BASE_URL || 'https://api.minimax.chat/v1',
47
+ groupId: process.env.MINIMAX_GROUP_ID || '',
48
+ model: config.model || process.env.MINIMAX_MODEL || 'MiniMax-M2.5-Free'
49
+ });
43
50
  case 'ollama':
44
51
  throw new Error('Ollama provider not yet implemented');
45
52
  default:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "feature-architect-agent",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "description": "AI-powered feature planning agent - generates complete technical specifications",
5
5
  "main": "dist/index.js",
6
6
  "bin": {