Restore alfred-commander 5.0.0 from alfredlinux.com backup tarball

This commit is contained in:
Commander 2026-04-28 12:05:45 -04:00
commit 3306a33e53
12 changed files with 4861 additions and 0 deletions

68
README.md Normal file
View File

@ -0,0 +1,68 @@
# Alfred Commander
**3,551-line VS Code extension — AI chat, voice, stats, walkthrough — the brain of Alfred IDE.**
Alfred Commander is a single-file VS Code/code-server extension that provides multi-provider AI chat, speech-to-text/text-to-speech, workspace intelligence, and an interactive walkthrough. It is the primary user interface for Alfred IDE.
## Architecture
One extension, one `extension.js` — 3,551 lines of production code. No framework, no bundler, no node_modules. Pure VS Code API.
### What It Does
| Feature | How it works |
|---------|-------------|
| **AI Chat** | Multi-provider (Anthropic Claude, OpenAI GPT, Groq, local Ollama) via streaming API |
| **Voice** | Browser SpeechRecognition for STT, Kokoro TTS engine for speech output |
| **Attachments** | Drag-and-drop files/images into chat, base64 encoding for vision models |
| **Model Picker** | Runtime model switching across all providers |
| **Stats Panel** | Account usage, token counts, billing period, plan badge |
| **Walkthrough** | 6-page interactive onboarding (sovereignty, models, voice, shortcuts, stats) |
| **Sidebar** | Custom webview with full HTML/CSS/JS UI rendered in VS Code panel |
| **MCP Tools** | 500+ tools via gocodeme-mcp service integration |
### Commands
| Command | Action |
|---------|--------|
| `alfred-commander.open` | Open the Alfred chat panel |
| `alfred-commander.toggle` | Toggle panel visibility |
| `alfred-commander.showStats` | Account & usage statistics |
| `alfred-commander.welcome` | Open walkthrough |
| `alfred-commander.workspaceStatus` | Workspace health check |
## File Structure
```
alfred-commander/
├── extension.js # 3,551 lines — entire extension
├── package.json # Extension manifest, commands, keybindings
├── extensions.json # Extension dependency declarations
├── media/
│ ├── alfred-icon.svg # Panel icon
│ └── walkthrough/
│ ├── meet-alfred.md # Introduction walkthrough
│ ├── sovereign.md # Sovereignty & privacy walkthrough
│ ├── models.md # AI model configuration
│ ├── voice.md # Voice assistant setup
│ ├── shortcuts.md # Keyboard shortcuts reference
│ └── stats.md # Usage statistics guide
```
## Key Design Decisions
- **Single file**: No build step, no transpilation, no bundler. `extension.js` is the extension.
- **Webview UI**: Full HTML/CSS/JS UI rendered inside VS Code's webview API — not a tree view or quick pick.
- **Multi-provider**: Provider abstraction supports Anthropic, OpenAI, Groq, and Ollama with a single chat interface.
- **Offline voice**: TTS via local Kokoro engine (no cloud API calls for speech).
- **Zero telemetry**: No analytics, no tracking, no phone-home. Conversations stay on the server.
## Runs On
- **Alfred IDE** (cloud): code-server 4.x on Linux — primary target
- **Alfred IDE** (desktop): Windows portable build
- **VS Code**: Compatible with stock VS Code (some features require Alfred infrastructure)
## License
AGPL-3.0

4302
extension.js Normal file

File diff suppressed because it is too large Load Diff

10
extensions.json Normal file
View File

@ -0,0 +1,10 @@
{
"recommendations": [
"gositeme.alfred-commander"
],
"unwantedRecommendations": [
"ms-vscode-remote.remote-ssh",
"ms-vscode.remote-server",
"ms-vscode.remote-explorer"
]
}

6
media/alfred-icon.svg Normal file
View File

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#e2b340" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"/>
<path d="M19 10v2a7 7 0 0 1-14 0v-2"/>
<line x1="12" y1="19" x2="12" y2="23"/>
<line x1="8" y1="23" x2="16" y2="23"/>
</svg>

After

Width:  |  Height:  |  Size: 352 B

View File

@ -0,0 +1,17 @@
# Meet Alfred
Alfred is your AI coding companion, built into the sidebar.
## What Alfred Can Do
- **Answer questions** about your code, frameworks, and tools
- **Generate code** from natural language descriptions
- **Debug issues** by analyzing errors and suggesting fixes
- **Explain code** — select any block and ask "what does this do?"
- **Run tools** — file search, terminal commands, web lookups
## How to Start
1. Click the **Alfred icon** (🅰️) in the activity bar (left side)
2. Type your question or request in the chat input
3. Press Enter — Alfred responds in real time
Alfred remembers your conversation context, so you can have natural multi-turn discussions about your code.

View File

@ -0,0 +1,18 @@
# AI Models
Alfred IDE supports multiple AI providers and models.
## Available Tiers
| Tier | Best For | Examples |
|------|----------|---------|
| **Leaf** | Simple tasks, quick answers | GPT-4o-mini, local Ollama |
| **Mid** | Code generation, analysis | Claude 3.5 Sonnet, GPT-4o |
| **Frontier** | Complex reasoning, architecture | Claude Opus, GPT-4 |
| **Max** | Research, multi-step planning | Claude Opus (extended) |
## How to Switch
Use the **model dropdown** at the top of the Alfred panel to select your preferred model.
## Local Models
If Ollama is running, local models appear automatically — your code never leaves your machine.

View File

@ -0,0 +1,24 @@
# Keyboard Shortcuts
Master these to work at full speed.
## Alfred Commands
| Shortcut | Action |
|----------|--------|
| `Ctrl+Shift+Alt+O` | Open Alfred Panel |
| `Ctrl+Shift+Alt+A` | Toggle Voice Mode |
## Essential IDE Shortcuts
| Shortcut | Action |
|----------|--------|
| `Ctrl+P` | Quick File Open |
| `Ctrl+Shift+P` | Command Palette |
| `Ctrl+`` ` | Toggle Terminal |
| `Ctrl+B` | Toggle Sidebar |
| `Ctrl+Shift+E` | File Explorer |
| `Ctrl+Shift+F` | Search Across Files |
| `Ctrl+Shift+G` | Source Control |
| `F5` | Start Debugging |
| `Ctrl+/` | Toggle Line Comment |
| `Alt+↑/↓` | Move Line Up/Down |
| `Ctrl+D` | Select Next Occurrence |

View File

@ -0,0 +1,27 @@
# Sovereign Development
Alfred IDE is built on one principle: **your code is yours**.
## What We Don't Do
- ❌ No telemetry or usage tracking
- ❌ No analytics or behavior profiling
- ❌ No data sold to third parties
- ❌ No phone-home to Microsoft, Google, or anyone
- ❌ No extension marketplace surveillance
## What We Do
- ✅ All AI calls go through your GoSiteMe account
- ✅ Conversations are stored in YOUR database
- ✅ Local Ollama models keep everything on-device
- ✅ Secret redaction engine scrubs credentials from all output
- ✅ Post-quantum encryption available via Veil Protocol
## The GoSiteMe Ecosystem
Alfred IDE is one pillar of the sovereign computing stack:
- **Alfred Linux** — AI-native operating system
- **Alfred Browser** — zero-tracking web browser
- **Alfred Mobile** — sovereign smartphone OS
- **Veil** — post-quantum encrypted messaging
- **MetaDome** — VR worlds with 51M+ AI agents
Welcome to the kingdom. 🏰

View File

@ -0,0 +1,16 @@
# Account & Usage
Monitor your plan, usage, and billing from inside the IDE.
## How to Access
Click your **username** in the bottom status bar, or run:
- Command Palette → "Alfred: Account & Usage Stats"
## What You'll See
- **Plan**: Your current subscription tier
- **Token Usage**: How many AI tokens you've consumed
- **Credit Balance**: Remaining credits for the billing period
- **Active Services**: Which ecosystem services are linked
## Commander Access
If you're the Commander (client_id 33), you have unlimited access — no token limits, no restrictions.

View File

@ -0,0 +1,18 @@
# Voice Commands
Talk to your IDE — Alfred listens, transcribes, and responds.
## How It Works
1. Click the **🎤 microphone** button in the Alfred panel
2. Speak naturally — your voice is transcribed in real time
3. Alfred processes your request and responds
## Voice Architecture
- **STT (Speech-to-Text)**: Whisper-based transcription
- **LLM**: Your selected AI model processes the request
- **TTS (Text-to-Speech)**: Kokoro voices read the response back
## Tips
- Speak clearly and at a normal pace
- You can say "stop" or click the mic again to end recording
- Voice works best with short, focused requests

168
package.json Normal file
View File

@ -0,0 +1,168 @@
{
"name": "alfred-commander",
"displayName": "Alfred IDE Assistant \u2014 Full IDE Chat & Voice",
"description": "Alfred Commander v5 Kingdom Edition \u2014 AI chat, voice AI, model routing, memory engine, cost tracking, session persistence, fleet commander. The sovereign IDE brain.",
"version": "5.0.0",
"publisher": "gositeme",
"repository": {
"type": "git",
"url": "https://alfredlinux.com/forge/commander/alfred-ide.git"
},
"homepage": "https://alfredlinux.com/forge/commander/alfred-ide",
"engines": {
"vscode": "^1.70.0"
},
"categories": [
"Other"
],
"activationEvents": [
"onStartupFinished"
],
"main": "./extension.js",
"contributes": {
"configurationDefaults": {
"window.menuBarVisibility": "visible",
"chat.disableAIFeatures": false
},
"commands": [
{
"command": "alfred-commander.open",
"title": "Alfred: Open Panel"
},
{
"command": "alfred-commander.toggle",
"title": "Alfred: Toggle Mic"
},
{
"command": "alfred-commander.showStats",
"title": "Alfred: Account & Usage Stats"
},
{
"command": "alfred-commander.welcome",
"title": "Alfred: Getting Started"
},
{
"command": "alfred-commander.workspaceStatus",
"title": "Alfred: Workspace Status"
},
{
"command": "alfred-commander.voicePanel",
"title": "Alfred: Voice AI Panel"
},
{
"command": "alfred-commander.memoryPanel",
"title": "Alfred: Memory Engine"
},
{
"command": "alfred-commander.costPanel",
"title": "Alfred: Cost & Usage Tracker"
},
{
"command": "alfred-commander.vaultPanel",
"title": "Alfred: Kingdom Vault"
},
{
"command": "alfred-commander.vaultPanel",
"title": "Alfred: Kingdom Vault"
}
],
"keybindings": [
{
"command": "alfred-commander.open",
"key": "ctrl+shift+alt+o",
"mac": "cmd+shift+alt+o"
},
{
"command": "alfred-commander.toggle",
"key": "ctrl+shift+alt+a",
"mac": "cmd+shift+alt+a"
},
{
"command": "alfred-commander.voicePanel",
"key": "ctrl+shift+alt+v",
"mac": "cmd+shift+alt+v"
}
],
"viewsContainers": {
"activitybar": [
{
"id": "alfred-commander-container",
"title": "Alfred",
"icon": "media/alfred-icon.svg"
}
]
},
"views": {
"alfred-commander-container": [
{
"type": "webview",
"id": "alfred-commander.panel",
"name": "Alfred",
"visibility": "visible"
}
]
},
"walkthroughs": [
{
"id": "alfred-ide-getting-started",
"title": "Getting Started with Alfred IDE",
"description": "Your sovereign development environment \u2014 AI-powered, zero-tracking, fully yours.",
"steps": [
{
"id": "meet-alfred",
"title": "Meet Alfred \u2014 Your AI Companion",
"description": "Alfred lives in the sidebar. Click the Alfred icon in the activity bar to open the chat panel. Ask anything \u2014 code questions, file operations, debugging help.\n\n[Open Alfred Panel](command:alfred-commander.open)",
"media": {
"markdown": "media/walkthrough/meet-alfred.md"
}
},
{
"id": "voice-commands",
"title": "Talk to Your IDE",
"description": "Alfred supports voice input. Click the microphone button or press ``Ctrl+Shift+Alt+A`` to toggle voice mode. Speak naturally \u2014 Alfred transcribes and responds.\n\n[Toggle Voice](command:alfred-commander.toggle)",
"media": {
"markdown": "media/walkthrough/voice.md"
}
},
{
"id": "choose-model",
"title": "Choose Your AI Model",
"description": "Switch between AI providers and models using the dropdown at the top of the Alfred panel. Available models include Claude, GPT, local Ollama models, and more.",
"media": {
"markdown": "media/walkthrough/models.md"
}
},
{
"id": "account-stats",
"title": "Check Your Usage & Plan",
"description": "Click your username in the status bar (bottom-left) to see your account details, token usage, plan info, and billing.\n\n[View Account Stats](command:alfred-commander.showStats)",
"media": {
"markdown": "media/walkthrough/stats.md"
}
},
{
"id": "keyboard-shortcuts",
"title": "Essential Shortcuts",
"description": "Master these shortcuts to work faster:\n- ``Ctrl+Shift+Alt+O`` \u2014 Open Alfred Panel\n- ``Ctrl+Shift+Alt+A`` \u2014 Toggle Voice\n- ``Ctrl+``` `` \u2014 Open Terminal\n- ``Ctrl+P`` \u2014 Quick File Open\n- ``Ctrl+Shift+P`` \u2014 Command Palette",
"media": {
"markdown": "media/walkthrough/shortcuts.md"
}
},
{
"id": "sovereign-ide",
"title": "Your Sovereign IDE",
"description": "Alfred IDE tracks nothing. No telemetry, no usage analytics, no data collection. Your code stays on your machine. Your conversations stay private. Welcome to sovereign development.",
"media": {
"markdown": "media/walkthrough/sovereign.md"
}
}
]
}
]
},
"__metadata": {
"installedTimestamp": 1774281381634,
"targetPlatform": "undefined",
"size": 75665
}
}

187
package.json.bak.vault Normal file
View File

@ -0,0 +1,187 @@
{
"name": "alfred-commander",
"displayName": "Alfred IDE Assistant \u2014 Full IDE Chat & Voice",
"description": "Alfred Commander v5 Kingdom Edition \u2014 AI chat, voice AI, model routing, memory engine, cost tracking, session persistence, fleet commander. The sovereign IDE brain.",
"version": "5.0.0",
"publisher": "gositeme",
"repository": {
"type": "git",
"url": "https://alfredlinux.com/forge/commander/alfred-ide.git"
},
"homepage": "https://alfredlinux.com/forge/commander/alfred-ide",
"engines": {
"vscode": "^1.70.0"
},
"categories": [
"Other"
],
"activationEvents": [
"onStartupFinished"
],
"main": "./extension.js",
"contributes": {
"configurationDefaults": {
"window.menuBarVisibility": "visible"
},
"commands": [
{
"command": "alfred-commander.open",
"title": "Alfred: Open Panel"
},
{
"command": "alfred-commander.toggle",
"title": "Alfred: Toggle Mic"
},
{
"command": "alfred-commander.showStats",
"title": "Alfred: Account & Usage Stats"
},
{
"command": "alfred-commander.welcome",
"title": "Alfred: Getting Started"
},
{
"command": "alfred-commander.workspaceStatus",
"title": "Alfred: Workspace Status"
},
{
"command": "alfred-commander.voicePanel",
"title": "Alfred: Voice AI Panel"
},
{
"command": "alfred-commander.memoryPanel",
"title": "Alfred: Memory Engine"
},
{
"command": "alfred-commander.costPanel",
"title": "Alfred: Cost & Usage Tracker"
},
{
"command": "alfred-commander.vaultPanel",
"title": "Alfred: Kingdom Vault"
}
],
"keybindings": [
{
"command": "alfred-commander.open",
"key": "ctrl+shift+alt+o",
"mac": "cmd+shift+alt+o"
},
{
"command": "alfred-commander.toggle",
"key": "ctrl+shift+alt+a",
"mac": "cmd+shift+alt+a"
},
{
"command": "alfred-commander.voicePanel",
"key": "ctrl+shift+alt+v",
"mac": "cmd+shift+alt+v"
}
],
"viewsContainers": {
"activitybar": [
{
"id": "alfred-commander-container",
"title": "Alfred",
"icon": "media/alfred-icon.svg"
}
]
},
"chatParticipants": [
{
"id": "alfred",
"fullName": "Alfred AI",
"name": "alfred",
"description": "Your sovereign AI coding assistant \u2014 powered by GoSiteMe",
"isDefault": true,
"isSticky": true,
"commands": [
{
"name": "explain",
"description": "Explain the selected code"
},
{
"name": "fix",
"description": "Fix issues in the selected code"
},
{
"name": "voice",
"description": "Open Alfred Voice AI panel"
}
]
}
],
"views": {
"alfred-commander-container": [
{
"type": "webview",
"id": "alfred-commander.panel",
"name": "Alfred",
"visibility": "visible"
}
]
},
"walkthroughs": [
{
"id": "alfred-ide-getting-started",
"title": "Getting Started with Alfred IDE",
"description": "Your sovereign development environment \u2014 AI-powered, zero-tracking, fully yours.",
"steps": [
{
"id": "meet-alfred",
"title": "Meet Alfred \u2014 Your AI Companion",
"description": "Alfred lives in the sidebar. Click the Alfred icon in the activity bar to open the chat panel. Ask anything \u2014 code questions, file operations, debugging help.\n\n[Open Alfred Panel](command:alfred-commander.open)",
"media": {
"markdown": "media/walkthrough/meet-alfred.md"
}
},
{
"id": "voice-commands",
"title": "Talk to Your IDE",
"description": "Alfred supports voice input. Click the microphone button or press ``Ctrl+Shift+Alt+A`` to toggle voice mode. Speak naturally \u2014 Alfred transcribes and responds.\n\n[Toggle Voice](command:alfred-commander.toggle)",
"media": {
"markdown": "media/walkthrough/voice.md"
}
},
{
"id": "choose-model",
"title": "Choose Your AI Model",
"description": "Switch between AI providers and models using the dropdown at the top of the Alfred panel. Available models include Claude, GPT, local Ollama models, and more.",
"media": {
"markdown": "media/walkthrough/models.md"
}
},
{
"id": "account-stats",
"title": "Check Your Usage & Plan",
"description": "Click your username in the status bar (bottom-left) to see your account details, token usage, plan info, and billing.\n\n[View Account Stats](command:alfred-commander.showStats)",
"media": {
"markdown": "media/walkthrough/stats.md"
}
},
{
"id": "keyboard-shortcuts",
"title": "Essential Shortcuts",
"description": "Master these shortcuts to work faster:\n- ``Ctrl+Shift+Alt+O`` \u2014 Open Alfred Panel\n- ``Ctrl+Shift+Alt+A`` \u2014 Toggle Voice\n- ``Ctrl+``` `` \u2014 Open Terminal\n- ``Ctrl+P`` \u2014 Quick File Open\n- ``Ctrl+Shift+P`` \u2014 Command Palette",
"media": {
"markdown": "media/walkthrough/shortcuts.md"
}
},
{
"id": "sovereign-ide",
"title": "Your Sovereign IDE",
"description": "Alfred IDE tracks nothing. No telemetry, no usage analytics, no data collection. Your code stays on your machine. Your conversations stay private. Welcome to sovereign development.",
"media": {
"markdown": "media/walkthrough/sovereign.md"
}
}
]
}
]
},
"__metadata": {
"installedTimestamp": 1774281381634,
"targetPlatform": "undefined",
"size": 75665
}
}