agdi 2.6.4 → 2.7.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/README.md +42 -26
- package/dist/index.js +79 -15
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -26,10 +26,30 @@
|
|
|
26
26
|
|
|
27
27
|
---
|
|
28
28
|
|
|
29
|
-
##
|
|
29
|
+
## 🚀 What's New in v2.7.0
|
|
30
30
|
|
|
31
31
|
<div align="center">
|
|
32
|
-
<img src="https://img.shields.io/badge/NEW-
|
|
32
|
+
<img src="https://img.shields.io/badge/NEW-GitHub_Import-00d1b2?style=for-the-badge" alt="GitHub Import">
|
|
33
|
+
<img src="https://img.shields.io/badge/NEW-Voice_Commands-ff6b6b?style=for-the-badge" alt="Voice">
|
|
34
|
+
<img src="https://img.shields.io/badge/NEW-Self_Repair-8b5cf6?style=for-the-badge" alt="Self-Repair">
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
### ✨ New Features
|
|
38
|
+
|
|
39
|
+
| Feature | Description |
|
|
40
|
+
|---------|-------------|
|
|
41
|
+
| 🐙 **GitHub Import** | Import any public repo via URL. Fetches zipball, extracts with JSZip |
|
|
42
|
+
| 🎤 **Voice Commands** | Talk to Agdi! Uses Web Speech API for real-time transcription |
|
|
43
|
+
| 🩹 **Self-Repair** | Autonomous build error recovery. AI diagnoses and fixes errors |
|
|
44
|
+
| 🧠 **2026 Model Registry** | GPT-5.2 Codex, Claude 4.5 Sonnet, Gemini 3 Pro/Flash |
|
|
45
|
+
| 🎨 **Official Brand Logos** | SVG icons for all AI providers (no more emojis) |
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## 🎬 Cinematic Dark Mode
|
|
50
|
+
|
|
51
|
+
<div align="center">
|
|
52
|
+
<img src="https://img.shields.io/badge/Premium_Terminal_UI-blueviolet?style=for-the-badge" alt="New">
|
|
33
53
|
</div>
|
|
34
54
|
|
|
35
55
|
### ✨ Visual Upgrade
|
|
@@ -53,7 +73,7 @@
|
|
|
53
73
|
│ / ___ / /_/ / /_/ // / │
|
|
54
74
|
│ /_/ |_\____/_____/___/ │
|
|
55
75
|
│ │
|
|
56
|
-
│ v2.
|
|
76
|
+
│ v2.7.0 [ARCHITECT ONLINE] │
|
|
57
77
|
│ │
|
|
58
78
|
├──────────────────────────────────────────────────────────────┤
|
|
59
79
|
│ ╭─ SESSION INFO ─────────────────────────────────────────╮ │
|
|
@@ -85,7 +105,7 @@ agdi
|
|
|
85
105
|
|
|
86
106
|
---
|
|
87
107
|
|
|
88
|
-
## 🎯
|
|
108
|
+
## 🎯 Highlights
|
|
89
109
|
|
|
90
110
|
<table>
|
|
91
111
|
<tr>
|
|
@@ -102,39 +122,35 @@ Your code is reviewed by AI before delivery.
|
|
|
102
122
|
</td>
|
|
103
123
|
<td width="50%">
|
|
104
124
|
|
|
105
|
-
###
|
|
125
|
+
### 🎤 Voice Input (NEW)
|
|
106
126
|
```bash
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
→ /search authentication
|
|
111
|
-
🔍 src/auth/login.ts:15 (0.87)
|
|
127
|
+
🎤 Hold Space to talk
|
|
128
|
+
🎤 "Build a todo app with dark mode"
|
|
129
|
+
→ Generating...
|
|
112
130
|
```
|
|
131
|
+
Talk to build apps!
|
|
113
132
|
|
|
114
133
|
</td>
|
|
115
134
|
</tr>
|
|
116
135
|
<tr>
|
|
117
136
|
<td width="50%">
|
|
118
137
|
|
|
119
|
-
###
|
|
138
|
+
### 🐙 GitHub Import (NEW)
|
|
120
139
|
```bash
|
|
121
|
-
→ /
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
list_dir [filesystem]
|
|
125
|
-
search_code [code]
|
|
140
|
+
→ Import from: https://github.com/user/repo
|
|
141
|
+
📦 Fetching zipball...
|
|
142
|
+
✓ Imported 47 files
|
|
126
143
|
```
|
|
127
144
|
|
|
128
145
|
</td>
|
|
129
146
|
<td width="50%">
|
|
130
147
|
|
|
131
|
-
###
|
|
148
|
+
### 🩹 Self-Repair (NEW)
|
|
132
149
|
```bash
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
Preferences: 5
|
|
150
|
+
❌ npm install failed
|
|
151
|
+
🩹 Diagnosing error...
|
|
152
|
+
🔧 Applying fix: removed conflicting dep
|
|
153
|
+
✅ Build succeeded!
|
|
138
154
|
```
|
|
139
155
|
|
|
140
156
|
</td>
|
|
@@ -240,10 +256,10 @@ Your code is reviewed by AI before delivery.
|
|
|
240
256
|
|
|
241
257
|
| Provider | Models | Get Key |
|
|
242
258
|
|----------|--------|---------|
|
|
243
|
-
| **Gemini** 🔥 |
|
|
244
|
-
| **OpenRouter** | Claude, GPT-
|
|
245
|
-
| **OpenAI** | GPT-5, o3 | [platform.openai.com](https://platform.openai.com/api-keys) |
|
|
246
|
-
| **Anthropic** | Claude 4.5 Sonnet | [console.anthropic.com](https://console.anthropic.com/) |
|
|
259
|
+
| **Gemini** 🔥 | Gemini 3 Pro/Flash, 2.5 Flash | [aistudio.google.com](https://aistudio.google.com/apikey) |
|
|
260
|
+
| **OpenRouter** | Claude, GPT-5, Llama | [openrouter.ai](https://openrouter.ai/keys) |
|
|
261
|
+
| **OpenAI** | GPT-5.2 Codex, o3 | [platform.openai.com](https://platform.openai.com/api-keys) |
|
|
262
|
+
| **Anthropic** | Claude 4.5 Sonnet/Opus | [console.anthropic.com](https://console.anthropic.com/) |
|
|
247
263
|
|
|
248
264
|
---
|
|
249
265
|
|
package/dist/index.js
CHANGED
|
@@ -1519,6 +1519,54 @@ function createSpinner(text) {
|
|
|
1519
1519
|
function printIter() {
|
|
1520
1520
|
console.log(chalk8.hex(THEME.dim)("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"));
|
|
1521
1521
|
}
|
|
1522
|
+
var activeReadlineInterface = null;
|
|
1523
|
+
function registerActivePrompt(rl) {
|
|
1524
|
+
activeReadlineInterface = rl;
|
|
1525
|
+
}
|
|
1526
|
+
var flags = {
|
|
1527
|
+
yes: false,
|
|
1528
|
+
headless: false
|
|
1529
|
+
};
|
|
1530
|
+
function setFlags(newFlags) {
|
|
1531
|
+
Object.assign(flags, newFlags);
|
|
1532
|
+
}
|
|
1533
|
+
function safeExit(code = 0) {
|
|
1534
|
+
if (activeReadlineInterface) {
|
|
1535
|
+
try {
|
|
1536
|
+
activeReadlineInterface.close?.();
|
|
1537
|
+
activeReadlineInterface.destroy?.();
|
|
1538
|
+
} catch {
|
|
1539
|
+
}
|
|
1540
|
+
activeReadlineInterface = null;
|
|
1541
|
+
}
|
|
1542
|
+
setImmediate(() => {
|
|
1543
|
+
process.exit(code);
|
|
1544
|
+
});
|
|
1545
|
+
throw new Error("Process exiting");
|
|
1546
|
+
}
|
|
1547
|
+
async function smartConfirm(message, defaultValue = false) {
|
|
1548
|
+
if (flags.yes || flags.headless || process.env.CI === "true" || process.env.CI === "1") {
|
|
1549
|
+
console.log(chalk8.gray(` [Auto-approved: ${message}]`));
|
|
1550
|
+
return true;
|
|
1551
|
+
}
|
|
1552
|
+
if (!process.stdout.isTTY) {
|
|
1553
|
+
console.warn(chalk8.yellow("\u26A0\uFE0F Non-interactive session detected. Use --yes to approve actions."));
|
|
1554
|
+
return false;
|
|
1555
|
+
}
|
|
1556
|
+
const { confirm: confirm4 } = await import("@inquirer/prompts");
|
|
1557
|
+
return confirm4({ message, default: defaultValue });
|
|
1558
|
+
}
|
|
1559
|
+
async function smartSelect(message, choices, defaultValue) {
|
|
1560
|
+
if (!process.stdout.isTTY || flags.headless) {
|
|
1561
|
+
const result = defaultValue || choices[0]?.value;
|
|
1562
|
+
if (result) {
|
|
1563
|
+
console.log(chalk8.gray(` [Auto-selected: ${result}]`));
|
|
1564
|
+
}
|
|
1565
|
+
return result || null;
|
|
1566
|
+
}
|
|
1567
|
+
const { select: select5 } = await import("@inquirer/prompts");
|
|
1568
|
+
return select5({ message, choices });
|
|
1569
|
+
}
|
|
1522
1570
|
var ui = {
|
|
1523
1571
|
renderBanner,
|
|
1524
1572
|
renderBox,
|
|
@@ -1528,7 +1576,14 @@ var ui = {
|
|
|
1528
1576
|
createSpinner,
|
|
1529
1577
|
printIter,
|
|
1530
1578
|
brandGradient,
|
|
1531
|
-
THEME
|
|
1579
|
+
THEME,
|
|
1580
|
+
// Safety & Automation
|
|
1581
|
+
safeExit,
|
|
1582
|
+
smartConfirm,
|
|
1583
|
+
smartSelect,
|
|
1584
|
+
setFlags,
|
|
1585
|
+
flags,
|
|
1586
|
+
registerActivePrompt
|
|
1532
1587
|
};
|
|
1533
1588
|
|
|
1534
1589
|
// src/actions/plan-executor.ts
|
|
@@ -1631,7 +1686,12 @@ function validateAction(action) {
|
|
|
1631
1686
|
}
|
|
1632
1687
|
function parseActionPlan(response) {
|
|
1633
1688
|
try {
|
|
1634
|
-
|
|
1689
|
+
let cleanedResponse = response;
|
|
1690
|
+
const fenceMatch = response.match(/```(?:json)?\s*([\s\S]*?)```/);
|
|
1691
|
+
if (fenceMatch) {
|
|
1692
|
+
cleanedResponse = fenceMatch[1].trim();
|
|
1693
|
+
}
|
|
1694
|
+
const jsonMatch = cleanedResponse.match(/\{[\s\S]*"actions"[\s\S]*\}/);
|
|
1635
1695
|
if (!jsonMatch) {
|
|
1636
1696
|
return null;
|
|
1637
1697
|
}
|
|
@@ -4191,7 +4251,7 @@ async function startCodingMode() {
|
|
|
4191
4251
|
const env = initSession();
|
|
4192
4252
|
const isTrusted = await ensureTrusted(env.workspaceRoot);
|
|
4193
4253
|
if (!isTrusted) {
|
|
4194
|
-
|
|
4254
|
+
ui.safeExit(0);
|
|
4195
4255
|
}
|
|
4196
4256
|
logSessionStart(env.workspaceRoot, env.trustLevel);
|
|
4197
4257
|
ui.renderBox(
|
|
@@ -4385,7 +4445,7 @@ Context: ${isGitRepo() ? chalk13.green("Git Repository") : chalk13.gray("Local
|
|
|
4385
4445
|
if (error.name === "ExitPromptError") {
|
|
4386
4446
|
logSessionEnd();
|
|
4387
4447
|
console.log(chalk13.gray("\n\n\u{1F44B} Goodbye!\n"));
|
|
4388
|
-
|
|
4448
|
+
ui.safeExit(0);
|
|
4389
4449
|
}
|
|
4390
4450
|
throw error;
|
|
4391
4451
|
}
|
|
@@ -4599,12 +4659,16 @@ ${chalk14.cyan(`/_/ |_|\\_, /\\__,_//_/ `)}
|
|
|
4599
4659
|
${chalk14.cyan(` /____/ `)}
|
|
4600
4660
|
`;
|
|
4601
4661
|
var program = new Command();
|
|
4602
|
-
program.name("agdi").description(chalk14.cyan("\u{1F680} AI-powered coding assistant")).version("2.
|
|
4603
|
-
|
|
4604
|
-
|
|
4605
|
-
|
|
4662
|
+
program.name("agdi").description(chalk14.cyan("\u{1F680} AI-powered coding assistant")).version("2.7.0").option("-y, --yes", "Auto-approve all prompts (headless/CI mode)");
|
|
4663
|
+
program.hook("preAction", (thisCommand) => {
|
|
4664
|
+
const opts = thisCommand.opts();
|
|
4665
|
+
if (opts.yes) {
|
|
4666
|
+
ui.setFlags({ yes: true, headless: true });
|
|
4606
4667
|
}
|
|
4607
4668
|
});
|
|
4669
|
+
program.addHelpText("beforeAll", () => {
|
|
4670
|
+
return BANNER + "\n" + chalk14.gray(" The Open Source AI Architect") + "\n" + chalk14.gray(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n");
|
|
4671
|
+
});
|
|
4608
4672
|
program.action(async () => {
|
|
4609
4673
|
try {
|
|
4610
4674
|
await ui.renderBanner();
|
|
@@ -4615,7 +4679,7 @@ program.action(async () => {
|
|
|
4615
4679
|
} catch (error) {
|
|
4616
4680
|
if (error.name === "ExitPromptError") {
|
|
4617
4681
|
console.log(chalk14.gray("\n\n\u{1F44B} Goodbye!\n"));
|
|
4618
|
-
|
|
4682
|
+
ui.safeExit(0);
|
|
4619
4683
|
}
|
|
4620
4684
|
throw error;
|
|
4621
4685
|
}
|
|
@@ -4630,7 +4694,7 @@ program.command("auth").description("Configure API keys").option("--status", "Sh
|
|
|
4630
4694
|
} catch (error) {
|
|
4631
4695
|
if (error.name === "ExitPromptError") {
|
|
4632
4696
|
console.log(chalk14.gray("\n\n\u{1F44B} Cancelled.\n"));
|
|
4633
|
-
|
|
4697
|
+
ui.safeExit(0);
|
|
4634
4698
|
}
|
|
4635
4699
|
throw error;
|
|
4636
4700
|
}
|
|
@@ -4641,7 +4705,7 @@ program.command("model").alias("models").description("Change AI model").action(a
|
|
|
4641
4705
|
} catch (error) {
|
|
4642
4706
|
if (error.name === "ExitPromptError") {
|
|
4643
4707
|
console.log(chalk14.gray("\n\n\u{1F44B} Cancelled.\n"));
|
|
4644
|
-
|
|
4708
|
+
ui.safeExit(0);
|
|
4645
4709
|
}
|
|
4646
4710
|
throw error;
|
|
4647
4711
|
}
|
|
@@ -4655,7 +4719,7 @@ program.command("chat").description("Start a chat session").action(async () => {
|
|
|
4655
4719
|
} catch (error) {
|
|
4656
4720
|
if (error.name === "ExitPromptError") {
|
|
4657
4721
|
console.log(chalk14.gray("\n\n\u{1F44B} Goodbye!\n"));
|
|
4658
|
-
|
|
4722
|
+
ui.safeExit(0);
|
|
4659
4723
|
}
|
|
4660
4724
|
throw error;
|
|
4661
4725
|
}
|
|
@@ -4666,7 +4730,7 @@ program.command("run [directory]").description("Run a generated project").action
|
|
|
4666
4730
|
} catch (error) {
|
|
4667
4731
|
if (error.name === "ExitPromptError") {
|
|
4668
4732
|
console.log(chalk14.gray("\n\n\u{1F44B} Cancelled.\n"));
|
|
4669
|
-
|
|
4733
|
+
ui.safeExit(0);
|
|
4670
4734
|
}
|
|
4671
4735
|
throw error;
|
|
4672
4736
|
}
|
|
@@ -4709,12 +4773,12 @@ program.command("build <prompt>").alias("b").description("Generate an app from a
|
|
|
4709
4773
|
} else {
|
|
4710
4774
|
console.error(chalk14.red("\n" + msg + "\n"));
|
|
4711
4775
|
}
|
|
4712
|
-
|
|
4776
|
+
ui.safeExit(1);
|
|
4713
4777
|
}
|
|
4714
4778
|
} catch (error) {
|
|
4715
4779
|
if (error.name === "ExitPromptError") {
|
|
4716
4780
|
console.log(chalk14.gray("\n\n\u{1F44B} Cancelled.\n"));
|
|
4717
|
-
|
|
4781
|
+
ui.safeExit(0);
|
|
4718
4782
|
}
|
|
4719
4783
|
throw error;
|
|
4720
4784
|
}
|