create-byan-agent 2.2.2 → 2.3.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/CHANGELOG.md +346 -0
- package/README.md +46 -4
- package/TEST-GUIDE-v2.3.2.md +161 -0
- package/install/HERMES-GUIDE.md +410 -0
- package/install/bin/create-byan-agent-v2.js +104 -7
- package/install/lib/phase2-chat.js +16 -12
- package/install/lib/yanstaller/agent-launcher.js +3 -3
- package/install/lib/yanstaller/platform-selector.js +54 -3
- package/install/templates/.github/agents/hermes.md +573 -0
- package/install/templates/_byan/_config/agent-manifest.csv +1 -0
- package/install/templates/_byan/workers/launchers/README.md +308 -0
- package/install/templates/_byan/workers/launchers/launch-yanstaller-claude.md +204 -0
- package/install/templates/_byan/workers/launchers/launch-yanstaller-codex.md +209 -0
- package/install/templates/_byan/workers/launchers/launch-yanstaller-copilot.md +173 -0
- package/install/templates/_byan/workers.md +343 -1126
- package/install/templates/workers/README.md +148 -0
- package/install/templates/workers/cost-optimizer.js +169 -0
- package/package.json +8 -3
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
# Changelog - BYAN (create-byan-agent)
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## [2.3.2] - 2026-02-10
|
|
11
|
+
|
|
12
|
+
### 🏛️ Added - Hermes Universal Dispatcher
|
|
13
|
+
|
|
14
|
+
**Major Feature: Hermes Agent**
|
|
15
|
+
- New `hermes` agent: Universal dispatcher for entire BYAN ecosystem (573 lines XML)
|
|
16
|
+
- Intelligent routing to 35+ specialized agents across 5 modules
|
|
17
|
+
- 6-step mandatory activation sequence with config loading
|
|
18
|
+
- Menu-driven interface with 9 commands (LA, LW, LC, REC, PIPE, ?, @, EXIT, HELP)
|
|
19
|
+
- Smart routing rules: keyword-based agent recommendations
|
|
20
|
+
- 7 predefined pipelines (Feature Complete, Idea→Code, Bug Fix, etc.)
|
|
21
|
+
- Fuzzy matching for agent names
|
|
22
|
+
- Quick help system without loading full agents
|
|
23
|
+
- Multi-agent pipeline suggestions for complex goals
|
|
24
|
+
|
|
25
|
+
**Integration:**
|
|
26
|
+
- Added Hermes entry to agent-manifest.csv (first entry - core module)
|
|
27
|
+
- Created HERMES-GUIDE.md: Complete 10k+ word documentation
|
|
28
|
+
- Routing rules for all 35+ agents (bmm, bmb, cis, tea, core modules)
|
|
29
|
+
- Manifest-driven architecture (agent-manifest, workflow-manifest, task-manifest)
|
|
30
|
+
|
|
31
|
+
**Capabilities:**
|
|
32
|
+
1. **[LA]** List Agents - Display all 35+ agents by module
|
|
33
|
+
2. **[LW]** List Workflows - Show available workflows
|
|
34
|
+
3. **[LC]** List Contexts - Discover project contexts
|
|
35
|
+
4. **[REC]** Smart Routing - Recommend best agent(s) for task
|
|
36
|
+
5. **[PIPE]** Pipeline - Multi-agent workflow suggestions
|
|
37
|
+
6. **[?]** Quick Help - Brief agent info without loading
|
|
38
|
+
7. **[@]** Invoke - Direct agent activation
|
|
39
|
+
8. **[EXIT]** Exit Hermes gracefully
|
|
40
|
+
9. **[HELP]** Redisplay menu
|
|
41
|
+
|
|
42
|
+
**Files:**
|
|
43
|
+
- `install/templates/.github/agents/hermes.md` (573 lines, 168 XML tags)
|
|
44
|
+
- `install/HERMES-GUIDE.md` (10k+ words, complete usage guide)
|
|
45
|
+
- Updated `install/templates/_byan/_config/agent-manifest.csv` (Hermes first)
|
|
46
|
+
|
|
47
|
+
### 🐛 Fixed - Node.js 12 Compatibility
|
|
48
|
+
|
|
49
|
+
**Issue:** Optional chaining operator (`?.`) caused syntax errors on Node 12
|
|
50
|
+
- Node 12 doesn't support optional chaining (requires Node 14+)
|
|
51
|
+
- Server installations with older Node versions failed
|
|
52
|
+
|
|
53
|
+
**Changes:**
|
|
54
|
+
- Replaced all optional chaining in `install/` directory (9 instances across 5 files):
|
|
55
|
+
- `install/bin/create-byan-agent-v2.js` (4 fixes)
|
|
56
|
+
- `install/lib/phase2-chat.js` (1 fix)
|
|
57
|
+
- `install/lib/yanstaller/platform-selector.js` (2 fixes)
|
|
58
|
+
- `install/lib/yanstaller/agent-launcher.js` (2 fixes)
|
|
59
|
+
- Changed `package.json` engines requirement: `node >=18.0.0` → `>=12.0.0`
|
|
60
|
+
- All optional chaining replaced with explicit null checks
|
|
61
|
+
|
|
62
|
+
**Before:**
|
|
63
|
+
```javascript
|
|
64
|
+
interviewResults.agents.essential?.join(', ')
|
|
65
|
+
config?.communication_language || 'English'
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**After:**
|
|
69
|
+
```javascript
|
|
70
|
+
interviewResults.agents.essential ? interviewResults.agents.essential.join(', ') : ''
|
|
71
|
+
config ? config.communication_language : 'English'
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**Documentation:**
|
|
75
|
+
- Created `TEST-GUIDE-v2.3.2.md` with Node 12+ verification steps
|
|
76
|
+
|
|
77
|
+
### 🔧 Technical Details
|
|
78
|
+
|
|
79
|
+
**Hermes Architecture:**
|
|
80
|
+
- XML-based agent definition with mandatory activation
|
|
81
|
+
- 6-step activation: Load persona → Load config → Store vars → Display menu → Wait → Process
|
|
82
|
+
- Handler system: number, command, invoke, fuzzy
|
|
83
|
+
- Manifest-driven: Reads CSV files at runtime (never pre-load)
|
|
84
|
+
- Fail-fast error handling with actionable suggestions
|
|
85
|
+
- KISS principle: Minimal interface, maximum efficiency
|
|
86
|
+
|
|
87
|
+
**Mantras Applied:**
|
|
88
|
+
- #7: KISS (Keep It Simple, Stupid)
|
|
89
|
+
- #37: Ockham's Razor - Simplicity first
|
|
90
|
+
- #4: Fail Fast - Immediate actionable errors
|
|
91
|
+
- IA-21: Self-Aware Agent - "I dispatch, I do not execute"
|
|
92
|
+
- IA-24: Clean Code - Minimal, clear communication
|
|
93
|
+
|
|
94
|
+
**Agent Manifest:**
|
|
95
|
+
- 35+ agents across 5 modules (core, bmm, bmb, cis, tea)
|
|
96
|
+
- CSV format: name, displayName, title, icon, role, identity, style, principles, module, path
|
|
97
|
+
- Hermes entry: First line (dispatcher priority)
|
|
98
|
+
|
|
99
|
+
### 📚 Documentation
|
|
100
|
+
|
|
101
|
+
**New Guides:**
|
|
102
|
+
- `install/HERMES-GUIDE.md`: Complete Hermes documentation
|
|
103
|
+
- Overview and installation
|
|
104
|
+
- All 9 commands with examples
|
|
105
|
+
- Routing rules table
|
|
106
|
+
- Predefined pipelines
|
|
107
|
+
- Troubleshooting
|
|
108
|
+
- Roadmap
|
|
109
|
+
|
|
110
|
+
- `TEST-GUIDE-v2.3.2.md`: Node 12+ compatibility guide
|
|
111
|
+
- Verification steps
|
|
112
|
+
- Before/after code examples
|
|
113
|
+
- Testing checklist
|
|
114
|
+
|
|
115
|
+
### 🎯 Use Cases
|
|
116
|
+
|
|
117
|
+
**Hermes Examples:**
|
|
118
|
+
|
|
119
|
+
1. **New Project Discovery:**
|
|
120
|
+
```bash
|
|
121
|
+
@hermes
|
|
122
|
+
[1] [LA] # List all agents by module
|
|
123
|
+
[?dev] # Quick info on Dev agent
|
|
124
|
+
@dev # Invoke Dev agent
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
2. **Smart Routing:**
|
|
128
|
+
```bash
|
|
129
|
+
@hermes
|
|
130
|
+
[4] [REC]
|
|
131
|
+
# User: "créer API backend avec tests"
|
|
132
|
+
# Hermes recommends: PM → Architect → Dev → Tea
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
3. **Pipeline Creation:**
|
|
136
|
+
```bash
|
|
137
|
+
@hermes
|
|
138
|
+
[5] [PIPE]
|
|
139
|
+
# User: "feature complète de A à Z"
|
|
140
|
+
# Hermes suggests: PM → Architect → UX → SM → Dev → Tea
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### 🔄 Migration from 2.3.0/2.3.1
|
|
144
|
+
|
|
145
|
+
**No Breaking Changes** - Fully backward compatible
|
|
146
|
+
|
|
147
|
+
**New in 2.3.2:**
|
|
148
|
+
- Hermes agent available via `@hermes`
|
|
149
|
+
- Improved Node 12+ support (was 18+ in 2.3.0/1)
|
|
150
|
+
- Enhanced agent discovery via manifest
|
|
151
|
+
|
|
152
|
+
**Upgrade:**
|
|
153
|
+
```bash
|
|
154
|
+
npm install -g create-byan-agent@2.3.2
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
**Or via npx (always latest):**
|
|
158
|
+
```bash
|
|
159
|
+
npx create-byan-agent
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### 📦 Package Info
|
|
163
|
+
|
|
164
|
+
**Size:** ~1.4 MB, 900+ files
|
|
165
|
+
**Dependencies:**
|
|
166
|
+
- Required: commander, inquirer, fs-extra, chalk, winston, dotenv
|
|
167
|
+
- Optional: byan-copilot-router (cost optimizer)
|
|
168
|
+
|
|
169
|
+
**Engines:**
|
|
170
|
+
- Node.js: >=12.0.0 (was >=18.0.0 in 2.3.0/1)
|
|
171
|
+
- npm: >=6.0.0
|
|
172
|
+
|
|
173
|
+
### 🚀 Performance
|
|
174
|
+
|
|
175
|
+
**Hermes Performance:**
|
|
176
|
+
- Menu display: <50ms
|
|
177
|
+
- Agent list (35+): <100ms
|
|
178
|
+
- Smart routing: <200ms
|
|
179
|
+
- Agent invocation: <500ms
|
|
180
|
+
- Manifest parsing: <100ms (CSV)
|
|
181
|
+
|
|
182
|
+
**Install Performance:**
|
|
183
|
+
- Yanstaller: ~30-60 seconds (unchanged)
|
|
184
|
+
- Cost Optimizer: +5 seconds if enabled (optional)
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## [2.3.1] - 2026-02-10
|
|
189
|
+
|
|
190
|
+
### 🔧 Fixed - Yanstaller Integration Issues
|
|
191
|
+
|
|
192
|
+
**Issue:** Yanstaller didn't prompt for platform or verify authentication
|
|
193
|
+
|
|
194
|
+
**Changes:**
|
|
195
|
+
- Added platform selection question after detection (Copilot/Codex/Claude)
|
|
196
|
+
- Added authentication verification with helpful error messages
|
|
197
|
+
- Modified `create-byan-agent-v2.js` to add platform selection (+60 lines)
|
|
198
|
+
- Updated `phase2-chat.js` to accept selectedPlatform parameter
|
|
199
|
+
- Changed `sendChatMessage()` to use selectedPlatform instead of array
|
|
200
|
+
- Added fallback to AUTO mode if authentication fails
|
|
201
|
+
|
|
202
|
+
**Files:**
|
|
203
|
+
- `install/bin/create-byan-agent-v2.js` (platform selection logic)
|
|
204
|
+
- `install/lib/phase2-chat.js` (platform parameter)
|
|
205
|
+
- Commit: "fix: improve Yanstaller integration and error handling"
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## [2.3.0] - 2026-02-10
|
|
210
|
+
|
|
211
|
+
### ✨ Added - Cost Optimizer Integration
|
|
212
|
+
|
|
213
|
+
**Feature: Cost Optimizer Worker**
|
|
214
|
+
- Integrated `@byan/copilot-router` (v1.0.1) as optional dependency
|
|
215
|
+
- New worker template: `install/templates/_byan/workers/cost-optimizer.js`
|
|
216
|
+
- Automatic installation option during Yanstaller setup
|
|
217
|
+
- 87.5% cost savings (based on real measurements)
|
|
218
|
+
|
|
219
|
+
**Changes:**
|
|
220
|
+
- Added `byan-copilot-router` to `optionalDependencies` in package.json
|
|
221
|
+
- Created cost-optimizer worker template with CopilotRouter integration
|
|
222
|
+
- Modified installer to ask: "Activer l'optimiseur de coûts LLM?"
|
|
223
|
+
- Auto-copy worker to `_byan/workers/` if enabled
|
|
224
|
+
- Worker auto-detects if router module installed
|
|
225
|
+
|
|
226
|
+
**Worker Features:**
|
|
227
|
+
- Complexity analysis (5 factors)
|
|
228
|
+
- Intelligent routing: worker (cheap) vs agent (expensive)
|
|
229
|
+
- Automatic fallback on worker failure
|
|
230
|
+
- Cost tracking and statistics
|
|
231
|
+
- JSON/CSV export
|
|
232
|
+
- Daily/weekly reports
|
|
233
|
+
|
|
234
|
+
**Files:**
|
|
235
|
+
- `install/templates/_byan/workers/cost-optimizer.js` (202 lines)
|
|
236
|
+
- `install/templates/_byan/workers/README.md` (documentation)
|
|
237
|
+
- Updated `install/bin/create-byan-agent-v2.js` (installer question)
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## [2.2.0] - 2026-02-08
|
|
242
|
+
|
|
243
|
+
### ✨ Added
|
|
244
|
+
|
|
245
|
+
**New Agents:**
|
|
246
|
+
- `hermes` (prototype): Universal dispatcher for BYAN agents
|
|
247
|
+
- `marc`: GitHub Copilot CLI integration specialist
|
|
248
|
+
- `rachid`: NPM/NPX deployment specialist
|
|
249
|
+
- `patnote`: Update manager and conflict resolution
|
|
250
|
+
- `carmack`: Token optimizer for BYAN agents
|
|
251
|
+
|
|
252
|
+
**Developer Experience:**
|
|
253
|
+
- Enhanced CLI with better error messages
|
|
254
|
+
- Improved platform detection (Copilot/Codex/Claude)
|
|
255
|
+
- Auto-detection of installed AI platforms
|
|
256
|
+
|
|
257
|
+
### 🔧 Changed
|
|
258
|
+
|
|
259
|
+
- Refactored agent templates for better modularity
|
|
260
|
+
- Improved manifest system (agent-manifest.csv)
|
|
261
|
+
- Better configuration management
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
## [2.1.0] - 2026-02-05
|
|
266
|
+
|
|
267
|
+
### ✨ Added
|
|
268
|
+
|
|
269
|
+
**BYAN v2 Core:**
|
|
270
|
+
- Intelligent agent creation via 12-question interview
|
|
271
|
+
- 64 mantras integration (Merise Agile + TDD)
|
|
272
|
+
- Multi-platform support (GitHub Copilot, Codex, Claude)
|
|
273
|
+
- Yanstaller: Smart installer with platform detection
|
|
274
|
+
- Agent manifest system
|
|
275
|
+
- Workflow manifest system
|
|
276
|
+
|
|
277
|
+
**Agents:**
|
|
278
|
+
- `byan`: Intelligent agent creator
|
|
279
|
+
- `bmad-master`: Workflow orchestrator
|
|
280
|
+
- `analyst`: Business analyst (Mary)
|
|
281
|
+
- `architect`: System architect (Winston)
|
|
282
|
+
- `dev`: Developer (Amelia)
|
|
283
|
+
- `pm`: Product manager (John)
|
|
284
|
+
- `sm`: Scrum master (Bob)
|
|
285
|
+
- `quinn`: QA engineer
|
|
286
|
+
- `tech-writer`: Documentation specialist (Paige)
|
|
287
|
+
- `ux-designer`: UX designer (Sally)
|
|
288
|
+
- `quick-flow-solo-dev`: Fast brownfield dev (Barry)
|
|
289
|
+
- `brainstorming-coach`: Brainstorming (Carson)
|
|
290
|
+
- `tea`: Test architect (Murat)
|
|
291
|
+
- And 20+ more specialized agents
|
|
292
|
+
|
|
293
|
+
**Modules:**
|
|
294
|
+
- `core`: Foundation (bmad-master, yanstaller, merise expert)
|
|
295
|
+
- `bmm`: Business Modeling & Management (SDLC agents)
|
|
296
|
+
- `bmb`: Builder agents (BYAN, agent-builder, etc.)
|
|
297
|
+
- `cis`: Creative & Innovation Strategy
|
|
298
|
+
- `tea`: Test Architecture
|
|
299
|
+
|
|
300
|
+
---
|
|
301
|
+
|
|
302
|
+
## [2.0.0] - 2026-01-15
|
|
303
|
+
|
|
304
|
+
### 🎉 Initial Release - BYAN v2
|
|
305
|
+
|
|
306
|
+
**Major Rewrite:**
|
|
307
|
+
- Complete platform rewrite from v1.x
|
|
308
|
+
- Markdown + YAML agent definitions
|
|
309
|
+
- XML-based agent structure
|
|
310
|
+
- Multi-platform support
|
|
311
|
+
- Module system (core, bmm, bmb, cis, tea)
|
|
312
|
+
|
|
313
|
+
**Core Features:**
|
|
314
|
+
- Intelligent agent creation
|
|
315
|
+
- Structured interview process
|
|
316
|
+
- Manifest-driven architecture
|
|
317
|
+
- Config system with YAML
|
|
318
|
+
- Template engine
|
|
319
|
+
- Platform detection
|
|
320
|
+
- NPX integration
|
|
321
|
+
|
|
322
|
+
---
|
|
323
|
+
|
|
324
|
+
## [1.x] - 2025 (Legacy)
|
|
325
|
+
|
|
326
|
+
**Note:** v1.x was the original BYAN prototype. See git history for details.
|
|
327
|
+
|
|
328
|
+
---
|
|
329
|
+
|
|
330
|
+
## Legend
|
|
331
|
+
|
|
332
|
+
- 🎉 Major release
|
|
333
|
+
- ✨ New features
|
|
334
|
+
- 🔧 Changes
|
|
335
|
+
- 🐛 Bug fixes
|
|
336
|
+
- 📚 Documentation
|
|
337
|
+
- 🔄 Migration guide
|
|
338
|
+
- 💥 Breaking changes
|
|
339
|
+
- 🔐 Security fixes
|
|
340
|
+
- 🚀 Performance improvements
|
|
341
|
+
|
|
342
|
+
---
|
|
343
|
+
|
|
344
|
+
**Latest:** [2.3.2] - Hermes Universal Dispatcher + Node 12+ Support
|
|
345
|
+
**Download:** `npm install -g create-byan-agent@2.3.2`
|
|
346
|
+
**NPX:** `npx create-byan-agent` (always latest)
|
package/README.md
CHANGED
|
@@ -1,12 +1,34 @@
|
|
|
1
|
-
# BYAN v2.
|
|
1
|
+
# BYAN v2.3.2 - Build Your AI Network
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/create-byan-agent)
|
|
4
4
|
[](https://opensource.org/licenses/MIT)
|
|
5
5
|
[](https://github.com/yannsix/byan-v2)
|
|
6
|
+
[](https://nodejs.org)
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
**🏛️ Intelligent AI Agent Ecosystem** | Powered by Merise Agile + TDD + 64 Mantras
|
|
8
9
|
|
|
9
|
-
Create custom AI agents through intelligent
|
|
10
|
+
Create custom AI agents through intelligent interviews + **Hermes Universal Dispatcher** for intelligent routing across 35+ specialized agents.
|
|
11
|
+
|
|
12
|
+
### 🎯 New in v2.3.2: Hermes - Universal Dispatcher
|
|
13
|
+
|
|
14
|
+
**One entry point to rule them all** 🏛️
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
@hermes # → Menu-driven navigation to 35+ agents
|
|
18
|
+
@hermes @dev # → Direct invocation
|
|
19
|
+
@hermes rec créer API backend # → Smart routing
|
|
20
|
+
@hermes pipe feature complète # → Multi-agent pipelines
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**Features:**
|
|
24
|
+
- 🎯 **Smart Routing**: Describe your task → Hermes recommends best agents
|
|
25
|
+
- 🔗 **Pipelines**: Pre-configured multi-agent workflows (Feature Complete, Bug Fix, etc.)
|
|
26
|
+
- 📋 **Agent Directory**: Browse 35+ agents organized by module (core, bmm, bmb, cis, tea)
|
|
27
|
+
- 💰 **Cost Optimizer**: 87.5% LLM cost savings (optional integration)
|
|
28
|
+
- 🌐 **Multi-Platform**: GitHub Copilot CLI, Claude Code, Codex
|
|
29
|
+
- 🪶 **Node 12+ Compatible**: Works on legacy servers
|
|
30
|
+
|
|
31
|
+
[→ Full Hermes Guide](./install/HERMES-GUIDE.md)
|
|
10
32
|
|
|
11
33
|
---
|
|
12
34
|
|
|
@@ -311,9 +333,29 @@ Contributions welcome! Please read our contributing guidelines and submit pull r
|
|
|
311
333
|
|
|
312
334
|
---
|
|
313
335
|
|
|
336
|
+
## 👥 Contributors
|
|
337
|
+
|
|
338
|
+
### Core Team
|
|
339
|
+
- **[Yan-Acadenice](https://github.com/Yan-Acadenice)** - Creator & Lead Developer
|
|
340
|
+
|
|
341
|
+
### Special Contributors
|
|
342
|
+
- **[Wazadriano](https://github.com/Wazadriano)** - Hermes Universal Dispatcher (v2.3.2)
|
|
343
|
+
- Designed and documented the Hermes agent architecture
|
|
344
|
+
- Smart routing rules and multi-agent pipelines
|
|
345
|
+
- Complete integration with BYAN ecosystem
|
|
346
|
+
|
|
347
|
+
---
|
|
348
|
+
|
|
349
|
+
## 💝 Credits
|
|
350
|
+
|
|
351
|
+
**Créé avec passion par [Yan-Acadenice](https://github.com/Yan-Acadenice)**
|
|
352
|
+
Pour la communauté [Acadenice](https://acadenice.fr/)
|
|
353
|
+
|
|
354
|
+
---
|
|
355
|
+
|
|
314
356
|
## 📄 License
|
|
315
357
|
|
|
316
|
-
MIT © Yan
|
|
358
|
+
MIT © [Yan-Acadenice](https://github.com/Yan-Acadenice)
|
|
317
359
|
|
|
318
360
|
---
|
|
319
361
|
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# Test Guide - v2.3.2 Node.js 12+ Compatibility
|
|
2
|
+
|
|
3
|
+
## What Was Fixed
|
|
4
|
+
|
|
5
|
+
### Problem on Server (Node v12.22.12)
|
|
6
|
+
```
|
|
7
|
+
SyntaxError: Unexpected token '.'
|
|
8
|
+
at line 529: interviewResults.agents.essential?.join(', ')
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
**Root cause:** Optional chaining operator (`?.`) not supported in Node < 14
|
|
12
|
+
|
|
13
|
+
### Solution Applied
|
|
14
|
+
Replaced all optional chaining in `install/` directory:
|
|
15
|
+
|
|
16
|
+
**Before (Node 14+ only):**
|
|
17
|
+
```javascript
|
|
18
|
+
interviewResults.agents.essential?.join(', ')
|
|
19
|
+
config?.systemPrompt
|
|
20
|
+
info?.specialist || null
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**After (Node 12+ compatible):**
|
|
24
|
+
```javascript
|
|
25
|
+
interviewResults.agents.essential ? interviewResults.agents.essential.join(', ') : 'none'
|
|
26
|
+
config ? config.systemPrompt : undefined
|
|
27
|
+
info ? (info.specialist || null) : null
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Files Modified
|
|
31
|
+
1. `install/bin/create-byan-agent-v2.js` - 4 fixes
|
|
32
|
+
2. `install/lib/phase2-chat.js` - 1 fix
|
|
33
|
+
3. `install/lib/yanstaller/platform-selector.js` - 2 fixes
|
|
34
|
+
4. `install/lib/yanstaller/agent-launcher.js` - 2 fixes
|
|
35
|
+
5. `package.json` - engines: `node >=12.0.0` (was >=18.0.0)
|
|
36
|
+
|
|
37
|
+
**Total:** 9 optional chaining operators removed
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Testing on Node 12
|
|
42
|
+
|
|
43
|
+
### Install Test (Node v12.22.12)
|
|
44
|
+
```bash
|
|
45
|
+
# Clean install
|
|
46
|
+
sudo npm install -g create-byan-agent@2.3.2
|
|
47
|
+
|
|
48
|
+
# Should now work without syntax errors
|
|
49
|
+
create-byan-agent --version
|
|
50
|
+
# → 2.3.2
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Quick Mode Test
|
|
54
|
+
```bash
|
|
55
|
+
cd /tmp/test-project
|
|
56
|
+
npm init -y
|
|
57
|
+
|
|
58
|
+
# Run installer in AUTO mode
|
|
59
|
+
npx create-byan-agent@2.3.2
|
|
60
|
+
# Select: 🚀 AUTO - Quick install
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Custom Mode Test
|
|
64
|
+
```bash
|
|
65
|
+
cd /tmp/test-project-2
|
|
66
|
+
npm init -y
|
|
67
|
+
|
|
68
|
+
# Run installer in CUSTOM mode
|
|
69
|
+
npx create-byan-agent@2.3.2
|
|
70
|
+
# Select: 🎯 CUSTOM - Guided interview
|
|
71
|
+
# Answer questions...
|
|
72
|
+
# Select AI platform: GitHub Copilot CLI / Codex / Claude
|
|
73
|
+
# Auth check should work
|
|
74
|
+
# Phase 2 conversation should work
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Expected Behavior
|
|
80
|
+
|
|
81
|
+
### ✅ Should Work
|
|
82
|
+
- No syntax errors on Node 12+
|
|
83
|
+
- Installation completes successfully
|
|
84
|
+
- All interactive prompts work
|
|
85
|
+
- Platform selection works
|
|
86
|
+
- Auth verification works
|
|
87
|
+
- Phase 2 conversation works (if authenticated)
|
|
88
|
+
|
|
89
|
+
### ⚠️ Graceful Degradation
|
|
90
|
+
If not authenticated to AI platform:
|
|
91
|
+
```
|
|
92
|
+
⚠️ copilot n'est pas authentifié ou non disponible
|
|
93
|
+
Pour vous connecter, exécutez: gh auth login
|
|
94
|
+
|
|
95
|
+
? Continuer avec configuration AUTO (sans conversation)? (Y/n)
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Version History
|
|
101
|
+
|
|
102
|
+
| Version | Date | Node Support | Changes |
|
|
103
|
+
|---------|------|--------------|---------|
|
|
104
|
+
| 2.3.0 | Feb 11 | >=18.0.0 | Cost optimizer integration |
|
|
105
|
+
| 2.3.1 | Feb 11 | >=18.0.0 | AI platform selection + auth |
|
|
106
|
+
| 2.3.2 | Feb 11 | >=12.0.0 | **Node 12+ compatibility** ✅ |
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## Verification Checklist
|
|
111
|
+
|
|
112
|
+
**On Node 12 server:**
|
|
113
|
+
- [ ] `npm install -g create-byan-agent@2.3.2` succeeds
|
|
114
|
+
- [ ] `create-byan-agent --version` returns `2.3.2`
|
|
115
|
+
- [ ] `create-byan-agent` launches without syntax errors
|
|
116
|
+
- [ ] AUTO mode completes successfully
|
|
117
|
+
- [ ] CUSTOM mode shows platform selection
|
|
118
|
+
- [ ] Auth check provides helpful error if not logged in
|
|
119
|
+
- [ ] Can fallback to AUTO if auth fails
|
|
120
|
+
|
|
121
|
+
**On Node 18+ (modern):**
|
|
122
|
+
- [ ] All above tests pass
|
|
123
|
+
- [ ] No regressions
|
|
124
|
+
- [ ] Cost optimizer worker still works
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## NPM Publication
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
cd ~/conception
|
|
132
|
+
npm publish --access public --otp=XXXXXX
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
**Package:** create-byan-agent@2.3.2
|
|
136
|
+
**Size:** 1.4 MB tarball, 5.5 MB unpacked
|
|
137
|
+
**Files:** 894
|
|
138
|
+
**Node:** >=12.0.0 ✅
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## Rollback Plan
|
|
143
|
+
|
|
144
|
+
If issues on Node 18+:
|
|
145
|
+
```bash
|
|
146
|
+
npm install -g create-byan-agent@2.3.0
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
If issues on Node 12:
|
|
150
|
+
```bash
|
|
151
|
+
# Upgrade Node.js on server (recommended)
|
|
152
|
+
nvm install 18
|
|
153
|
+
nvm use 18
|
|
154
|
+
npm install -g create-byan-agent@2.3.2
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
**Status:** Ready for NPM publication
|
|
160
|
+
**Tested:** Syntax validation passed
|
|
161
|
+
**Compatibility:** Node 12.0.0 to latest ✅
|