@involvex/super-agent-cli 0.0.83 → 0.0.85
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/dist/index.js +114 -2
- package/dist/super-agent-cli.exe +0 -0
- package/package.json +2 -1
- package/scripts/release.ps1 +51 -0
package/dist/index.js
CHANGED
|
@@ -1731,7 +1731,7 @@ var init_indexer = __esm(() => {
|
|
|
1731
1731
|
var require_package = __commonJS((exports, module) => {
|
|
1732
1732
|
module.exports = {
|
|
1733
1733
|
name: "@involvex/super-agent-cli",
|
|
1734
|
-
version: "0.0.
|
|
1734
|
+
version: "0.0.85",
|
|
1735
1735
|
description: "An open-source AI agent that brings the power of Super Agent directly into your terminal.",
|
|
1736
1736
|
keywords: [
|
|
1737
1737
|
"cli",
|
|
@@ -1784,6 +1784,7 @@ var require_package = __commonJS((exports, module) => {
|
|
|
1784
1784
|
lint: "eslint . --ext .js,.jsx,.ts,.tsx --ignore-pattern dist",
|
|
1785
1785
|
"lint:fix": "eslint . --ext .js,.jsx,.ts,.tsx --fix --ignore-pattern dist",
|
|
1786
1786
|
"package:vscode": "bun run -F super-agent-vscode package",
|
|
1787
|
+
release: "powershell -File scripts/release.ps1",
|
|
1787
1788
|
start: "bun run dist/index.js",
|
|
1788
1789
|
"start:node": "node dist/index.js",
|
|
1789
1790
|
test: "vitest run",
|
|
@@ -2343,7 +2344,7 @@ function useEnhancedInput({
|
|
|
2343
2344
|
if (disabled) {
|
|
2344
2345
|
return;
|
|
2345
2346
|
}
|
|
2346
|
-
if (key.ctrl && inputChar === "c" || inputChar === "\x03") {
|
|
2347
|
+
if (key.ctrl && (inputChar === "c" || inputChar === "C") || inputChar === "\x03") {
|
|
2347
2348
|
setInputState("");
|
|
2348
2349
|
setCursorPositionState(0);
|
|
2349
2350
|
setOriginalInput("");
|
|
@@ -4390,6 +4391,7 @@ Note: Some providers may require a full restart of the CLI to take effect.`;
|
|
|
4390
4391
|
const baseCommands = [
|
|
4391
4392
|
{ command: "/help", description: "Show help information" },
|
|
4392
4393
|
{ command: "/clear", description: "Clear chat history" },
|
|
4394
|
+
{ command: "/theme", description: "Customize application theme" },
|
|
4393
4395
|
{
|
|
4394
4396
|
command: "/init",
|
|
4395
4397
|
description: "Create Agents.md for project instructions"
|
|
@@ -4507,6 +4509,54 @@ Note: Some providers may require a full restart of the CLI to take effect.`;
|
|
|
4507
4509
|
resetHistory();
|
|
4508
4510
|
return true;
|
|
4509
4511
|
}
|
|
4512
|
+
if (trimmedInput === "/theme") {
|
|
4513
|
+
const manager = getSettingsManager();
|
|
4514
|
+
const settings = manager.loadUserSettings();
|
|
4515
|
+
const currentTheme = settings.ui.theme || "dark";
|
|
4516
|
+
setChatHistory((prev) => [
|
|
4517
|
+
...prev,
|
|
4518
|
+
{
|
|
4519
|
+
type: "assistant",
|
|
4520
|
+
content: `Current theme: ${currentTheme}
|
|
4521
|
+
|
|
4522
|
+
Available themes: dark, light
|
|
4523
|
+
|
|
4524
|
+
Usage: /theme <name>
|
|
4525
|
+
Example: /theme light`,
|
|
4526
|
+
timestamp: new Date
|
|
4527
|
+
}
|
|
4528
|
+
]);
|
|
4529
|
+
clearInput();
|
|
4530
|
+
return true;
|
|
4531
|
+
}
|
|
4532
|
+
if (trimmedInput.startsWith("/theme ")) {
|
|
4533
|
+
const themeName = trimmedInput.replace("/theme ", "").trim().toLowerCase();
|
|
4534
|
+
if (themeName === "dark" || themeName === "light") {
|
|
4535
|
+
const manager = getSettingsManager();
|
|
4536
|
+
const settings = manager.loadUserSettings();
|
|
4537
|
+
settings.ui.theme = themeName;
|
|
4538
|
+
manager.saveUserSettings(settings);
|
|
4539
|
+
setChatHistory((prev) => [
|
|
4540
|
+
...prev,
|
|
4541
|
+
{
|
|
4542
|
+
type: "assistant",
|
|
4543
|
+
content: `✅ Theme switched to: ${themeName}`,
|
|
4544
|
+
timestamp: new Date
|
|
4545
|
+
}
|
|
4546
|
+
]);
|
|
4547
|
+
} else {
|
|
4548
|
+
setChatHistory((prev) => [
|
|
4549
|
+
...prev,
|
|
4550
|
+
{
|
|
4551
|
+
type: "assistant",
|
|
4552
|
+
content: `❌ Invalid theme: ${themeName}. Available: dark, light`,
|
|
4553
|
+
timestamp: new Date
|
|
4554
|
+
}
|
|
4555
|
+
]);
|
|
4556
|
+
}
|
|
4557
|
+
clearInput();
|
|
4558
|
+
return true;
|
|
4559
|
+
}
|
|
4510
4560
|
if (trimmedInput === "/help") {
|
|
4511
4561
|
const helpEntry = {
|
|
4512
4562
|
type: "assistant",
|
|
@@ -4515,6 +4565,7 @@ Note: Some providers may require a full restart of the CLI to take effect.`;
|
|
|
4515
4565
|
Built-in Commands:
|
|
4516
4566
|
/clear - Clear chat history
|
|
4517
4567
|
/help - Show this help
|
|
4568
|
+
/theme - Customize application theme
|
|
4518
4569
|
/doctor - Check system health & connection
|
|
4519
4570
|
/init - Create Agents.md for project-specific AI instructions
|
|
4520
4571
|
/exit - Exit application
|
|
@@ -4529,6 +4580,7 @@ Provider Commands:
|
|
|
4529
4580
|
/provider set-url <id> <url> - Set base URL for provider
|
|
4530
4581
|
/provider set-account <id> <acc_id> - Set account ID (e.g. workers-ai)
|
|
4531
4582
|
/provider remove <id> - Remove a provider
|
|
4583
|
+
/provider reset - Reset provider settings to defaults
|
|
4532
4584
|
|
|
4533
4585
|
Model Commands:
|
|
4534
4586
|
/models - Show model selection UI
|
|
@@ -5282,6 +5334,33 @@ No model specified for this provider. Consider setting one with '/model set <mod
|
|
|
5282
5334
|
clearInput();
|
|
5283
5335
|
return true;
|
|
5284
5336
|
}
|
|
5337
|
+
if (trimmedInput === "/provider reset") {
|
|
5338
|
+
const manager = getSettingsManager();
|
|
5339
|
+
const settings = manager.loadUserSettings();
|
|
5340
|
+
const defaultProviders = {
|
|
5341
|
+
grok: {
|
|
5342
|
+
id: "grok",
|
|
5343
|
+
provider: "grok",
|
|
5344
|
+
model: "grok-code-fast-1",
|
|
5345
|
+
api_key: "",
|
|
5346
|
+
base_url: "https://api.x.ai/v1",
|
|
5347
|
+
default_model: "grok-code-fast-1"
|
|
5348
|
+
}
|
|
5349
|
+
};
|
|
5350
|
+
settings.active_provider = "grok";
|
|
5351
|
+
settings.providers = { ...settings.providers, ...defaultProviders };
|
|
5352
|
+
manager.saveUserSettings(settings);
|
|
5353
|
+
setChatHistory((prev) => [
|
|
5354
|
+
...prev,
|
|
5355
|
+
{
|
|
5356
|
+
type: "assistant",
|
|
5357
|
+
content: "✅ Provider settings reset to defaults.",
|
|
5358
|
+
timestamp: new Date
|
|
5359
|
+
}
|
|
5360
|
+
]);
|
|
5361
|
+
clearInput();
|
|
5362
|
+
return true;
|
|
5363
|
+
}
|
|
5285
5364
|
if (trimmedInput === "/provider list" || trimmedInput === "/provider ls") {
|
|
5286
5365
|
const manager = getSettingsManager();
|
|
5287
5366
|
const settings = manager.loadUserSettings();
|
|
@@ -9443,6 +9522,13 @@ class PerplexityProvider extends OpenAICompatibleProvider {
|
|
|
9443
9522
|
}
|
|
9444
9523
|
}
|
|
9445
9524
|
|
|
9525
|
+
// src/core/providers/openrouter.ts
|
|
9526
|
+
class OpenRouterProvider extends OpenAICompatibleProvider {
|
|
9527
|
+
constructor(apiKey, baseURL, model) {
|
|
9528
|
+
super(apiKey, baseURL || "https://openrouter.ai/api/v1", model || "anthropic/claude-3.5-sonnet", "openrouter");
|
|
9529
|
+
}
|
|
9530
|
+
}
|
|
9531
|
+
|
|
9446
9532
|
// src/core/providers/anthropic.ts
|
|
9447
9533
|
class AnthropicProvider {
|
|
9448
9534
|
name = "anthropic";
|
|
@@ -9652,6 +9738,13 @@ class DeepSeekProvider extends OpenAICompatibleProvider {
|
|
|
9652
9738
|
}
|
|
9653
9739
|
}
|
|
9654
9740
|
|
|
9741
|
+
// src/core/providers/mistral.ts
|
|
9742
|
+
class MistralProvider extends OpenAICompatibleProvider {
|
|
9743
|
+
constructor(apiKey, baseURL, model) {
|
|
9744
|
+
super(apiKey, baseURL || "https://api.mistral.ai/v1", model || "mistral-large-latest", "mistral");
|
|
9745
|
+
}
|
|
9746
|
+
}
|
|
9747
|
+
|
|
9655
9748
|
// src/core/providers/openai.ts
|
|
9656
9749
|
import OpenAI2 from "openai";
|
|
9657
9750
|
|
|
@@ -9923,6 +10016,13 @@ class CohereProvider extends OpenAICompatibleProvider {
|
|
|
9923
10016
|
}
|
|
9924
10017
|
}
|
|
9925
10018
|
|
|
10019
|
+
// src/core/providers/groq.ts
|
|
10020
|
+
class GroqProvider extends OpenAICompatibleProvider {
|
|
10021
|
+
constructor(apiKey, baseURL, model) {
|
|
10022
|
+
super(apiKey, baseURL || "https://api.groq.com/openai/v1", model || "llama-3.3-70b-versatile", "groq");
|
|
10023
|
+
}
|
|
10024
|
+
}
|
|
10025
|
+
|
|
9926
10026
|
// src/core/providers/grok.ts
|
|
9927
10027
|
import OpenAI3 from "openai";
|
|
9928
10028
|
|
|
@@ -10055,6 +10155,12 @@ class SuperAgent extends EventEmitter4 {
|
|
|
10055
10155
|
this.superAgentClient = new DeepSeekProvider(effectiveApiKey, effectiveBaseURL, effectiveModel);
|
|
10056
10156
|
} else if (providerType === "ollama") {
|
|
10057
10157
|
this.superAgentClient = new OllamaProvider(effectiveApiKey, effectiveBaseURL, effectiveModel);
|
|
10158
|
+
} else if (providerType === "mistral") {
|
|
10159
|
+
this.superAgentClient = new MistralProvider(effectiveApiKey, effectiveBaseURL, effectiveModel);
|
|
10160
|
+
} else if (providerType === "groq") {
|
|
10161
|
+
this.superAgentClient = new GroqProvider(effectiveApiKey, effectiveBaseURL, effectiveModel);
|
|
10162
|
+
} else if (providerType === "openrouter") {
|
|
10163
|
+
this.superAgentClient = new OpenRouterProvider(effectiveApiKey, effectiveBaseURL, effectiveModel);
|
|
10058
10164
|
} else {
|
|
10059
10165
|
this.superAgentClient = new OpenAICompatibleProvider(effectiveApiKey, effectiveBaseURL || "", effectiveModel, activeProviderId);
|
|
10060
10166
|
}
|
|
@@ -10181,6 +10287,12 @@ Current working directory: ${process.cwd()}`
|
|
|
10181
10287
|
this.superAgentClient = new DeepSeekProvider(effectiveApiKey, effectiveBaseURL, effectiveModel);
|
|
10182
10288
|
} else if (providerType === "ollama") {
|
|
10183
10289
|
this.superAgentClient = new OllamaProvider(effectiveApiKey, effectiveBaseURL, effectiveModel);
|
|
10290
|
+
} else if (providerType === "mistral") {
|
|
10291
|
+
this.superAgentClient = new MistralProvider(effectiveApiKey, effectiveBaseURL, effectiveModel);
|
|
10292
|
+
} else if (providerType === "groq") {
|
|
10293
|
+
this.superAgentClient = new GroqProvider(effectiveApiKey, effectiveBaseURL, effectiveModel);
|
|
10294
|
+
} else if (providerType === "openrouter") {
|
|
10295
|
+
this.superAgentClient = new OpenRouterProvider(effectiveApiKey, effectiveBaseURL, effectiveModel);
|
|
10184
10296
|
} else {
|
|
10185
10297
|
this.superAgentClient = new OpenAICompatibleProvider(effectiveApiKey, effectiveBaseURL || "", effectiveModel, activeProviderId);
|
|
10186
10298
|
}
|
package/dist/super-agent-cli.exe
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@involvex/super-agent-cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.85",
|
|
4
4
|
"description": "An open-source AI agent that brings the power of Super Agent directly into your terminal.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
"lint": "eslint . --ext .js,.jsx,.ts,.tsx --ignore-pattern dist",
|
|
54
54
|
"lint:fix": "eslint . --ext .js,.jsx,.ts,.tsx --fix --ignore-pattern dist",
|
|
55
55
|
"package:vscode": "bun run -F super-agent-vscode package",
|
|
56
|
+
"release": "powershell -File scripts/release.ps1",
|
|
56
57
|
"start": "bun run dist/index.js",
|
|
57
58
|
"start:node": "node dist/index.js",
|
|
58
59
|
"test": "vitest run",
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# scripts/release.ps1
|
|
2
|
+
$ErrorActionPreference = 'Stop' # Exit immediately if a command exits with a non-zero status.
|
|
3
|
+
|
|
4
|
+
Write-Host "Optimizing new version submission flow (PowerShell compatible)..."
|
|
5
|
+
|
|
6
|
+
# 1. Ensure clean git working directory
|
|
7
|
+
Write-Host "Checking for uncommitted changes..."
|
|
8
|
+
$gitStatus = git status --porcelain
|
|
9
|
+
if ($gitStatus) {
|
|
10
|
+
Write-Host "Error: Uncommitted changes detected. Please commit or stash them before running the release script."
|
|
11
|
+
exit 1
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
# 2. Bump version, create commit and tag
|
|
15
|
+
Write-Host "Bumping version and creating tag..."
|
|
16
|
+
# `bun pm version patch` automatically updates package.json and bun.lockb, then creates a commit and a tag like vX.Y.Z
|
|
17
|
+
$newVersionOutput = bun pm version patch
|
|
18
|
+
$NEW_VERSION = ($newVersionOutput | Select-Object -Last 1).Trim() # Assumes the last line is the version, e.g., "v1.0.1"
|
|
19
|
+
Write-Host "Version bumped to $NEW_VERSION"
|
|
20
|
+
|
|
21
|
+
# 3. Generate CHANGELOG.md
|
|
22
|
+
Write-Host "Generating CHANGELOG.md..."
|
|
23
|
+
bun run changelog
|
|
24
|
+
|
|
25
|
+
# 4. Run format and lint:fix to ensure all files (including package.json and CHANGELOG.md) adhere to standards
|
|
26
|
+
# This step might modify package.json and CHANGELOG.md again if they were not perfectly formatted
|
|
27
|
+
Write-Host "Running format and lint fix to ensure consistency..."
|
|
28
|
+
bun run format # Reformats files, including package.json and CHANGELOG.md if needed
|
|
29
|
+
bun run lint:fix # Fixes linting issues, could touch files again
|
|
30
|
+
|
|
31
|
+
# 5. Stage all changes that occurred since the last commit (which was the version bump)
|
|
32
|
+
# This includes CHANGELOG.md and any reformatting applied to package.json (or other files touched by format/lint)
|
|
33
|
+
Write-Host "Staging all remaining changes (CHANGELOG.md and formatting updates)..."
|
|
34
|
+
git add . # Use 'git add .' to stage all modifications
|
|
35
|
+
|
|
36
|
+
# 6. Amend the previous commit (the version bump commit) to include these new staged changes
|
|
37
|
+
# git commit --amend --no-edit keeps the existing commit message (e.g., "vX.Y.Z")
|
|
38
|
+
Write-Host "Amending previous commit to include CHANGELOG.md and formatting changes..."
|
|
39
|
+
git commit --amend --no-edit
|
|
40
|
+
|
|
41
|
+
# 7. Force update the tag to point to the amended commit (important!)
|
|
42
|
+
# `git commit --amend` creates a new commit SHA. We need to update the tag to point to this new SHA.
|
|
43
|
+
Write-Host "Updating Git tag $NEW_VERSION to new commit SHA..."
|
|
44
|
+
git tag -f $NEW_VERSION HEAD
|
|
45
|
+
|
|
46
|
+
# 8. Run the project build (dist/ is ignored, so it's not committed)
|
|
47
|
+
Write-Host "Running project build..."
|
|
48
|
+
bun run build
|
|
49
|
+
|
|
50
|
+
Write-Host "Release process complete for version $NEW_VERSION."
|
|
51
|
+
Write-Host "You can now push your changes with: git push --follow-tags"
|