wispy-cli 2.7.15 → 2.7.17

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
@@ -1,486 +1,804 @@
1
- # Wispy CLI
1
+ # wispy-cli
2
2
 
3
- Wispy CLI is a terminal-first AI workspace assistant for operators who want one place to chat, delegate, automate, audit, remember, and hand work across local and remote sessions.
3
+ **AI workspace assistant chat, automate, and orchestrate from the terminal.**
4
4
 
5
- Version `2.7.4` centers the product around an interactive workflow: onboarding, setup, and operator-facing commands guide you through menus instead of dropping you into brittle flag-heavy flows. The chat stack combines a REPL, a six-view TUI workspace, long-term memory, sub-agent orchestration, MCP, multi-channel messaging, scheduling, and a trust model built for real execution.
5
+ wispy-cli puts a trustworthy AI co-pilot in your shell. It handles multi-turn conversations, tool execution with approval controls, session persistence, sub-agent orchestration, code review, browser automation, and more all from a single `wispy` command.
6
6
 
7
- ## Highlights
7
+ ---
8
8
 
9
- | Area | What ships in v2.7.4 |
10
- | --- | --- |
11
- | Model access | 29 AI providers across hosted, aggregator, OAuth, and local/self-hosted routes, including Google, Anthropic, OpenAI, Groq, DeepSeek, Ollama, OpenRouter, Mistral, Cohere, Perplexity, Together, Fireworks, Replicate, Anyscale, and GitHub Copilot |
12
- | Auth | API key flows plus OAuth-based auth, including GitHub Copilot support introduced in `v2.6.0` |
13
- | Interaction | Interactive command flows since `v2.7.0`; no-arg command entry routes into menus instead of dead-ending |
14
- | Terminal UX | REPL with autocomplete and inline preview hints, plus shell completion auto-installed during setup |
15
- | TUI | Multi-panel workspace OS with 6 views: `chat`, `overview`, `agents`, `memory`, `audit`, `settings` |
16
- | Trust | `careful`, `balanced`, `yolo`, dry-run previews, receipts, approval prompts, permissions, audit trail, replay |
17
- | Continuity | `where`, `handoff`, `sync` for local/remote awareness and state transfer |
18
- | Memory | `remember`, `recall`, `forget`, `memories` plus persistent memory files |
19
- | Skills | `teach`, `improve`, skill loading, reusable learned workflows |
20
- | Orchestration | Agents, sub-agents, pipeline-style delegation, MCP integration, 18+ built-in tools |
21
- | Channels | Telegram, Discord, Slack, WhatsApp, Signal, Email |
22
- | Scheduling | Cron-based task scheduling with persisted jobs and history |
23
- | Quality | Test suite passing: `91/91` |
9
+ ## Table of Contents
24
10
 
25
- ## Installation
11
+ - [Quick Start](#quick-start)
12
+ - [Commands](#commands)
13
+ - [Global Flags](#global-flags)
14
+ - [Feature Highlights](#feature-highlights)
15
+ - [Providers](#providers)
16
+ - [Configuration](#configuration)
17
+ - [Agent System](#agent-system)
18
+ - [Trust & Security](#trust--security)
19
+ - [Memory System](#memory-system)
20
+ - [Sub-Agent Orchestration](#sub-agent-orchestration)
21
+ - [Browser Integration](#browser-integration)
22
+ - [Text-to-Speech](#text-to-speech)
23
+ - [Code Review](#code-review)
24
+ - [JSONL Event Stream](#jsonl-event-stream)
25
+ - [Sessions](#sessions)
26
+ - [Architecture](#architecture)
27
+ - [Development](#development)
28
+ - [Credits](#credits)
26
29
 
27
- ### Requirements
28
-
29
- | Requirement | Version |
30
- | --- | --- |
31
- | Node.js | `>= 18` |
32
- | Package manager | `npm` |
30
+ ---
33
31
 
34
- ### Install globally
32
+ ## Quick Start
35
33
 
36
34
  ```bash
35
+ # Install
37
36
  npm install -g wispy-cli
37
+
38
+ # First-time setup (choose provider, set API key)
39
+ wispy setup
40
+
41
+ # Start chatting
42
+ wispy
38
43
  ```
39
44
 
40
- ### Run
45
+ One-shot (non-interactive):
41
46
 
42
47
  ```bash
43
- wispy
48
+ wispy "summarize the last 10 commits"
49
+ wispy exec "list all TODO comments in src/" --json # JSONL output
44
50
  ```
45
51
 
46
- On first run, Wispy launches guided setup, helps configure a provider, and installs shell completion automatically for supported shells.
52
+ ---
53
+
54
+ ## Commands
55
+
56
+ ### Core
57
+
58
+ | Command | Description |
59
+ |---------|-------------|
60
+ | `wispy` | Start interactive REPL |
61
+ | `wispy <message>` | One-shot chat |
62
+ | `wispy exec <message>` | Non-interactive one-shot (CI/pipeline friendly) |
63
+ | `wispy setup` | Run first-time setup wizard |
64
+
65
+ ### Configuration
66
+
67
+ | Command | Description |
68
+ |---------|-------------|
69
+ | `wispy config show` | Print full config as JSON |
70
+ | `wispy config path` | Print path to config file |
71
+ | `wispy config get <key>` | Get a config value |
72
+ | `wispy config set <key> <value>` | Set a config value |
73
+ | `wispy config delete <key>` | Delete a config key |
74
+ | `wispy config reset` | Reset config to defaults (with confirmation) |
75
+ | `wispy config edit` | Open config in `$EDITOR` |
76
+
77
+ ### System
78
+
79
+ | Command | Description |
80
+ |---------|-------------|
81
+ | `wispy doctor` | Check system health (provider, API key, dirs) |
82
+ | `wispy model` | Interactive model/provider picker |
83
+ | `wispy model list` | List all available models by provider |
84
+ | `wispy model <name>` | Set model directly (e.g. `wispy model gpt-4o`) |
85
+ | `wispy where` | Show current mode, provider, workstream, and memory stats |
86
+
87
+ ### Feature Flags
88
+
89
+ | Command | Description |
90
+ |---------|-------------|
91
+ | `wispy features list` | List all feature flags with status |
92
+ | `wispy features enable <name>` | Enable a feature flag |
93
+ | `wispy features disable <name>` | Disable a feature flag |
94
+
95
+ ### Agents
96
+
97
+ | Command | Description |
98
+ |---------|-------------|
99
+ | `wispy agents` | List available agents (built-in + custom) |
100
+ | `wispy agents list` | Alias for `wispy agents` |
101
+
102
+ ### Sessions
103
+
104
+ | Command | Description |
105
+ |---------|-------------|
106
+ | `wispy sessions` | List sessions (interactive picker) |
107
+ | `wispy sessions --all` | List sessions from all workstreams |
108
+ | `wispy sessions --no-interactive` | Non-interactive listing |
109
+ | `wispy resume [session-id]` | Resume a previous session |
110
+ | `wispy resume --last` | Resume the most recent session |
111
+ | `wispy fork [session-id]` | Fork a session (branch from history) |
112
+ | `wispy fork --last` | Fork the most recent session |
113
+
114
+ ### Code Review
115
+
116
+ | Command | Description |
117
+ |---------|-------------|
118
+ | `wispy review` | Review uncommitted changes (staged + unstaged) |
119
+ | `wispy review --base <branch>` | Review changes against a base branch |
120
+ | `wispy review --commit <sha>` | Review a specific commit |
121
+ | `wispy review --json` | Output review as structured JSON |
122
+ | `wispy review --title <title>` | Add context title to review |
123
+
124
+ ### Secrets
125
+
126
+ | Command | Description |
127
+ |---------|-------------|
128
+ | `wispy secrets list` | List stored secret keys |
129
+ | `wispy secrets set <key> <value>` | Store an encrypted secret |
130
+ | `wispy secrets get <key>` | Retrieve a secret (masked) |
131
+ | `wispy secrets get <key> --reveal` | Show the actual value |
132
+ | `wispy secrets delete <key>` | Delete a secret |
133
+
134
+ ### Browser
135
+
136
+ | Command | Description |
137
+ |---------|-------------|
138
+ | `wispy browser` | Show browser bridge status |
139
+ | `wispy browser status` | Alias for `wispy browser` |
140
+ | `wispy browser tabs [browser]` | List open tabs |
141
+ | `wispy browser attach [browser]` | Attach to a running browser |
142
+ | `wispy browser navigate <url>` | Navigate to URL |
143
+ | `wispy browser screenshot [file]` | Take a screenshot |
144
+ | `wispy browser doctor` | Full browser bridge diagnostics |
145
+
146
+ ### Text-to-Speech
147
+
148
+ | Command | Description |
149
+ |---------|-------------|
150
+ | `wispy tts "<text>"` | Speak text (OpenAI TTS or macOS `say`) |
151
+ | `wispy tts "<text>" --voice <name>` | Use a specific voice |
152
+ | `wispy tts "<text>" --provider openai\|macos` | Force a TTS provider |
153
+ | `wispy tts "<text>" --play` | Play audio immediately (macOS) |
154
+
155
+ ### Trust & Security
156
+
157
+ | Command | Description |
158
+ |---------|-------------|
159
+ | `wispy trust` | Interactive trust settings (level, audit log) |
160
+ | `wispy trust level` | Show/set security level |
161
+ | `wispy trust log` | View approval audit log |
162
+
163
+ ### Continuity
164
+
165
+ | Command | Description |
166
+ |---------|-------------|
167
+ | `wispy where` | Show current mode, workstream, provider |
168
+ | `wispy handoff cloud` | Push local context to cloud |
169
+ | `wispy handoff local` | Pull remote context to local |
47
170
 
48
- ## Quick Start
171
+ ### Skills
172
+
173
+ | Command | Description |
174
+ |---------|-------------|
175
+ | `wispy skill list` | List learned skills |
176
+ | `wispy skill run <name>` | Run a skill |
177
+ | `wispy teach <name>` | Create a skill from conversation |
178
+ | `wispy improve <name>` | Improve an existing skill |
179
+
180
+ ### Server & TUI
181
+
182
+ | Command | Description |
183
+ |---------|-------------|
184
+ | `wispy server start` | Start HTTP/WebSocket server |
185
+ | `wispy server stop` | Stop server |
186
+ | `wispy server status` | Show server status |
187
+ | `wispy tui` | Launch full-screen terminal UI |
188
+ | `wispy overview` | Director view of all workstreams |
189
+
190
+ ### Cost
191
+
192
+ | Command | Description |
193
+ |---------|-------------|
194
+ | `wispy cost` | Show API spending report (session + all-time) |
195
+ | `wispy budget` | Alias for `wispy cost` |
196
+
197
+ ---
198
+
199
+ ## Global Flags
200
+
201
+ | Flag | Description |
202
+ |------|-------------|
203
+ | `-w, --workstream <name>` | Set active workstream |
204
+ | `-p, --profile <name>` | Use a named config profile |
205
+ | `-i, --image <path>` | Attach image (can repeat for multiple) |
206
+ | `--session <id>` | Resume an existing session |
207
+ | `--name <name>` | Give this session a display name |
208
+ | `--model <name>` | Override AI model for this run |
209
+ | `--provider <name>` | Override AI provider for this run |
210
+ | `--personality <name>` | Set personality (`pragmatic`, `concise`, `explanatory`, `friendly`, `strict`) |
211
+ | `--agent <name>` | Use a named agent (`reviewer`, `planner`, `explorer`, or custom) |
212
+ | `--effort <level>` | Effort level: `low`, `medium`, `high`, `max` (default: `medium`) |
213
+ | `--system-prompt <text>` | Replace default system prompt entirely |
214
+ | `--append-system-prompt <text>` | Append text to the default system prompt |
215
+ | `--max-budget-usd <amount>` | Session budget cap (e.g. `5.00`) |
216
+ | `--allowedTools <patterns>` | Only allow specified tools (e.g. `"read_file Bash(git:*)"`) |
217
+ | `--disallowedTools <patterns>` | Block specified tools (e.g. `"write_file delete_file"`) |
218
+ | `--json` | Output JSONL events (for `exec` command, CI use) |
219
+ | `-h, --help` | Show help |
220
+ | `-v, --version` | Show version |
221
+
222
+ ---
223
+
224
+ ## Feature Highlights
225
+
226
+ ### Smart Routing
227
+
228
+ Automatically routes tasks to the most suitable model based on task type. Complex reasoning goes to capable models; quick lookups use fast models.
229
+
230
+ Enable: `wispy features enable smart_routing`
231
+
232
+ ### Task Decomposition
233
+
234
+ Splits complex tasks into parallel subtasks and executes them concurrently, then merges results. Dramatically faster for multi-file operations.
235
+
236
+ Enable: `wispy features enable task_decomposition`
237
+
238
+ ### Context Compaction
239
+
240
+ Automatically summarizes older conversation history when approaching token limits, keeping context fresh without losing important information.
241
+
242
+ Enable: `wispy features enable context_compaction`
243
+
244
+ ### Loop Detection
245
+
246
+ Detects when the AI is stuck in a repetitive tool-call loop and breaks out gracefully with a summary.
247
+
248
+ Enable: `wispy features enable loop_detection`
249
+
250
+ ### Browser Integration
251
+
252
+ Control a real browser via `local-browser-bridge`. Navigate pages, take screenshots, list tabs, extract content.
49
253
 
50
- ### Start the main REPL
254
+ Enable: `wispy features enable browser_integration`
255
+
256
+ Requires: `npx local-browser-bridge serve`
257
+
258
+ ### Auto Memory
259
+
260
+ Automatically extracts facts, decisions, and preferences from conversations and saves them to the memory store for future sessions.
261
+
262
+ Enable: `wispy features enable auto_memory`
263
+
264
+ ### Multi-Agent Orchestration
265
+
266
+ Spawn concurrent sub-agents for parallel execution. Each agent runs in an isolated worker thread with its own tool access.
267
+
268
+ Enable: `wispy features enable multi_agent`
269
+
270
+ ### TTS
271
+
272
+ Automatic text-to-speech output. Supports OpenAI TTS (multiple voices) and macOS `say` as fallback.
273
+
274
+ Enable: `wispy features enable tts`
275
+
276
+ ---
277
+
278
+ ## Providers
279
+
280
+ wispy-cli supports 27 AI providers out of the box:
281
+
282
+ | Provider | Key | Notes |
283
+ |----------|-----|-------|
284
+ | Google AI | `google` | Gemini 2.0/2.5 series |
285
+ | Anthropic | `anthropic` | Claude 3.x/4.x series |
286
+ | OpenAI | `openai` | GPT-4o, o1, o3 series |
287
+ | xAI | `xai` | Grok models |
288
+ | Mistral | `mistral` | Mistral + Codestral |
289
+ | Together AI | `together` | Open-source model hosting |
290
+ | NVIDIA | `nvidia` | NVIDIA NIM |
291
+ | Groq | `groq` | Ultra-fast inference |
292
+ | DeepSeek | `deepseek` | DeepSeek-V3/R1 |
293
+ | Chutes | `chutes` | Chutes API |
294
+ | OpenRouter | `openrouter` | 200+ models via one key |
295
+ | Vercel AI SDK | `vercelai` | Vercel AI gateway |
296
+ | Kimi | `kimi` | Moonshot AI |
297
+ | MiniMax | `minimax` | MiniMax models |
298
+ | Venice | `venice` | Privacy-focused |
299
+ | Hugging Face | `huggingface` | HF Inference API |
300
+ | Cloudflare | `cloudflare` | Workers AI |
301
+ | VolcEngine | `volcengine` | ByteDance cloud |
302
+ | BytePlus | `byteplus` | BytePlus models |
303
+ | ZAI | `zai` | ZAI models |
304
+ | DashScope | `dashscope` | Alibaba Cloud |
305
+ | Xiaomi | `xiaomi` | Xiaomi models |
306
+ | GitHub Copilot | `github-copilot` | Copilot models |
307
+ | Ollama | `ollama` | Local models (no key) |
308
+ | vLLM | `vllm` | Self-hosted vLLM |
309
+ | SGLang | `sglang` | Self-hosted SGLang |
310
+ | LiteLLM | `litellm` | LiteLLM proxy |
311
+
312
+ Set via `wispy setup`, env vars (`GOOGLE_API_KEY`, `ANTHROPIC_API_KEY`, etc.), or `~/.wispy/config.json`.
313
+
314
+ ---
315
+
316
+ ## Configuration
317
+
318
+ ### Global config: `~/.wispy/config.json`
319
+
320
+ ```json
321
+ {
322
+ "provider": "google",
323
+ "model": "gemini-2.5-flash",
324
+ "workstream": "default",
325
+ "personality": "pragmatic",
326
+ "securityLevel": "balanced",
327
+ "locale": "en",
328
+ "memory": {
329
+ "enabled": true,
330
+ "autoExtract": false
331
+ }
332
+ }
333
+ ```
334
+
335
+ ### Profiles
336
+
337
+ Named config sets for switching between environments:
51
338
 
52
339
  ```bash
53
- wispy
340
+ wispy config set profiles.work.provider anthropic
341
+ wispy config set profiles.work.model claude-3-5-sonnet-20241022
342
+ wispy -p work "review this architecture"
343
+ ```
344
+
345
+ ### Per-project settings: `.wispy/settings.json`
346
+
347
+ wispy walks up from `cwd` to find a project settings file:
348
+
349
+ ```json
350
+ {
351
+ "personality": "strict",
352
+ "model": "claude-3-5-sonnet-20241022",
353
+ "allowedTools": ["read_file", "list_directory", "run_command"],
354
+ "agents": {
355
+ "custom-reviewer": {
356
+ "description": "Security-focused code reviewer",
357
+ "systemPrompt": "You are a security expert. Focus on vulnerabilities."
358
+ }
359
+ }
360
+ }
54
361
  ```
55
362
 
56
- ### Send a one-shot message
363
+ ### MCP servers: `~/.wispy/mcp.json`
364
+
365
+ Configure Model Context Protocol servers:
366
+
367
+ ```json
368
+ {
369
+ "servers": [
370
+ {
371
+ "name": "filesystem",
372
+ "command": "npx",
373
+ "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/project"]
374
+ }
375
+ ]
376
+ }
377
+ ```
378
+
379
+ ---
380
+
381
+ ## Agent System
382
+
383
+ ### Built-in Agents
384
+
385
+ | Agent | Description |
386
+ |-------|-------------|
387
+ | `default` | General-purpose assistant |
388
+ | `reviewer` | Code reviewer — bugs, security, performance, best practices |
389
+ | `planner` | Project planner — breaks tasks into concrete steps |
390
+ | `explorer` | Codebase explorer — navigates files, understands architecture |
57
391
 
58
392
  ```bash
59
- wispy "Summarize the current repository and suggest next steps."
393
+ wispy --agent reviewer "check auth.mjs for security issues"
394
+ wispy --agent planner "build a REST API with authentication"
395
+ ```
396
+
397
+ ### Custom Agents
398
+
399
+ Define custom agents in `~/.wispy/config.json` or `.wispy/settings.json`:
400
+
401
+ ```json
402
+ {
403
+ "agents": {
404
+ "devops": {
405
+ "description": "Infrastructure and deployment specialist",
406
+ "systemPrompt": "You are a DevOps engineer. Focus on reliability and automation.",
407
+ "personality": "pragmatic",
408
+ "allowedTools": ["run_command", "read_file"]
409
+ }
410
+ }
411
+ }
60
412
  ```
61
413
 
62
- ### Open a specific workstream
414
+ Use with: `wispy --agent devops "set up CI/CD pipeline"`
415
+
416
+ ---
417
+
418
+ ## Trust & Security
419
+
420
+ ### Security Levels
421
+
422
+ | Level | Behavior |
423
+ |-------|----------|
424
+ | `careful` | Approve all file writes, all commands |
425
+ | `balanced` | Approve dangerous ops, notify writes (default) |
426
+ | `yolo` | Auto-approve everything (use with caution) |
63
427
 
64
428
  ```bash
65
- wispy -w infra
429
+ wispy trust # Interactive settings
430
+ wispy config set securityLevel careful
66
431
  ```
67
432
 
68
- ### Launch the full terminal UI
433
+ ### Tool Permissions
434
+
435
+ Control which tools the AI can use per-session:
69
436
 
70
437
  ```bash
71
- wispy-tui
438
+ # Allow only read tools
439
+ wispy --allowedTools "read_file list_directory" "explain this codebase"
440
+
441
+ # Block destructive tools
442
+ wispy --disallowedTools "delete_file run_command" "refactor auth module"
443
+
444
+ # Bash command patterns
445
+ wispy --allowedTools "read_file Bash(git:*)" "show git history"
72
446
  ```
73
447
 
74
- ### Check current execution context
448
+ ### Budget Cap
449
+
450
+ Prevent runaway API spending:
75
451
 
76
452
  ```bash
77
- wispy where
453
+ wispy --max-budget-usd 2.00 "analyze all 500 files in src/"
78
454
  ```
79
455
 
80
- ### Inspect configuration
456
+ ### Audit Log
457
+
458
+ All tool approvals and executions are logged. View with:
81
459
 
82
460
  ```bash
83
- wispy config show
84
- wispy config get provider
85
- wispy config set provider openai
86
- wispy config delete apiKey
87
- wispy config reset
88
- wispy config path
89
- wispy config edit
461
+ wispy trust log
90
462
  ```
91
463
 
92
- ## Provider Support
464
+ ### Loop Detection
93
465
 
94
- Wispy v2.7.4 is positioned as a multi-provider workspace client with support spanning hosted APIs, local runtimes, aggregators, and OAuth-backed access.
466
+ Detects and breaks repetitive tool-call loops automatically. Configure sensitivity via feature flags.
95
467
 
96
- | Category | Examples |
97
- | --- | --- |
98
- | Hosted frontier APIs | Google, Anthropic, OpenAI, xAI, Mistral, Cohere, Perplexity |
99
- | Fast and cost-focused | Groq, DeepSeek, Together, Fireworks, Replicate, Anyscale |
100
- | Aggregators and gateways | OpenRouter, Vercel AI Gateway |
101
- | Regional and specialist providers | Kimi, MiniMax, Z.AI/GLM, DashScope, Volcengine, BytePlus, Xiaomi |
102
- | Local and self-hosted | Ollama, vLLM, SGLang, LiteLLM |
103
- | OAuth-backed access | GitHub Copilot |
468
+ ---
104
469
 
105
- ### Authentication
470
+ ## Memory System
106
471
 
107
- | Mode | Notes |
108
- | --- | --- |
109
- | API keys | Standard provider key flow |
110
- | OAuth | Device flow support, including GitHub Copilot |
111
- | Local runtimes | Host/base URL driven for local inference stacks |
472
+ Wispy stores persistent memory in `~/.wispy/memory/`. Memory is plain Markdown files, organized by topic.
112
473
 
113
- Examples:
474
+ ### In-session commands
114
475
 
115
- ```bash
116
- export GOOGLE_AI_KEY=...
117
- wispy
118
476
  ```
119
-
120
- ```bash
121
- wispy auth github-copilot
122
- wispy
477
+ /memory Show memory summary
478
+ /remember <fact> Save a fact to memory
479
+ /forget <topic> Delete a memory topic
480
+ /memory search <query> Search memory
123
481
  ```
124
482
 
483
+ ### Auto-memory
484
+
485
+ When `auto_memory` feature is enabled, wispy automatically extracts facts from conversations:
486
+
125
487
  ```bash
126
- export OLLAMA_HOST=http://localhost:11434
127
- wispy
488
+ wispy features enable auto_memory
128
489
  ```
129
490
 
130
- ## Interfaces
491
+ ---
492
+
493
+ ## Sub-Agent Orchestration
131
494
 
132
- ### REPL
495
+ wispy can spawn parallel sub-agents for complex multi-step tasks. Each agent runs in an isolated worker thread.
133
496
 
134
- The default `wispy` interface is a conversational REPL with:
497
+ ```bash
498
+ # Example: analyze entire codebase in parallel
499
+ wispy "analyze all modules in src/ in parallel and give me a security report"
500
+ ```
135
501
 
136
- - slash commands
137
- - command autocomplete
138
- - inline preview hints
139
- - one-shot and persistent workstream usage
140
- - token and cost visibility
502
+ Sub-agents share the same tool registry but have isolated conversation state. Results are merged and returned to the orchestrating agent.
141
503
 
142
- Examples:
504
+ Configure with `multi_agent` feature flag:
143
505
 
144
506
  ```bash
145
- wispy
146
- wispy -w product
147
- wispy "Search this repo for sync-related code paths."
507
+ wispy features enable multi_agent
148
508
  ```
149
509
 
150
- ### TUI Workspace OS
510
+ ---
511
+
512
+ ## Browser Integration
151
513
 
152
- `wispy-tui` is a multi-panel terminal workspace with six built-in views.
514
+ Control a running browser via [local-browser-bridge](https://www.npmjs.com/package/local-browser-bridge):
515
+
516
+ ```bash
517
+ # Start the bridge (in another terminal)
518
+ npx local-browser-bridge serve
153
519
 
154
- | View | Purpose |
155
- | --- | --- |
156
- | `chat` | Main conversation and tool execution surface |
157
- | `overview` | Cross-workstream status and recent activity |
158
- | `agents` | Running and recent agent/sub-agent activity |
159
- | `memory` | Search and inspect persistent memories |
160
- | `audit` | Execution timeline, approvals, and receipts |
161
- | `settings` | Model, provider, and runtime status surface |
520
+ # Then use wispy browser commands
521
+ wispy browser tabs
522
+ wispy browser navigate https://example.com
523
+ wispy browser screenshot output.png
162
524
 
163
- ## Trust and Execution Model
525
+ # Or ask wispy to use the browser in chat
526
+ wispy "go to github.com and tell me what's trending today"
527
+ ```
164
528
 
165
- Wispy is built around trustworthy execution rather than blind automation.
529
+ Enable browser feature: `wispy features enable browser_integration`
166
530
 
167
- | Capability | Description |
168
- | --- | --- |
169
- | Trust modes | `careful`, `balanced`, `yolo` |
170
- | Dry-run | Preview actions before execution |
171
- | Receipts | Inspect recent execution details |
172
- | Approval prompts | Human-in-the-loop confirmation for sensitive actions |
173
- | Audit trail | Persisted audit log and replayable session history |
174
- | Permissions | Per-tool policy visibility and overrides |
531
+ ---
175
532
 
176
- Examples:
533
+ ## Text-to-Speech
177
534
 
178
535
  ```bash
179
- wispy trust
180
- wispy trust level careful
181
- wispy trust log --today
182
- wispy trust receipt <session-id>
183
- wispy trust replay <session-id>
536
+ # Speak with auto-detected provider (OpenAI > macOS say)
537
+ wispy tts "Hello, I am Wispy"
538
+
539
+ # Use OpenAI with a specific voice
540
+ wispy tts "Welcome back" --provider openai --voice nova --play
541
+
542
+ # Use macOS say
543
+ wispy tts "Build complete" --provider macos --play
184
544
  ```
185
545
 
186
- ## Continuity
546
+ Voices (OpenAI): `alloy`, `echo`, `fable`, `onyx`, `nova`, `shimmer`
187
547
 
188
- Wispy keeps workspace state portable across local and remote environments.
548
+ Enable TTS in responses: `wispy features enable tts`
189
549
 
190
- | Command | Purpose |
191
- | --- | --- |
192
- | `where` | Show current mode, provider, workstream, sync, memory, and session context |
193
- | `handoff` | Push or pull state and generate a handoff summary |
194
- | `sync` | Sync sessions, memory, workstreams, cron metadata, and permissions |
550
+ ---
195
551
 
196
- Examples:
552
+ ## Code Review
197
553
 
198
554
  ```bash
199
- wispy where
200
- wispy handoff cloud
201
- wispy handoff local
202
- wispy sync
203
- ```
555
+ # Review all uncommitted changes
556
+ wispy review
204
557
 
205
- ## Memory, Skills, and Agents
558
+ # Review against a branch
559
+ wispy review --base main
206
560
 
207
- ### Memory
561
+ # Review a specific commit
562
+ wispy review --commit abc1234
208
563
 
209
- Wispy stores long-term memory under `~/.wispy/memory/` and exposes both natural-language and command-driven memory operations.
564
+ # Get structured JSON output (for CI integration)
565
+ wispy review --json > review.json
566
+ ```
567
+
568
+ Review output format:
569
+
570
+ ```
571
+ ## Summary
572
+ [Brief summary of changes]
210
573
 
211
- | Command | Purpose |
212
- | --- | --- |
213
- | `remember` | Save something important |
214
- | `recall` | Search memories |
215
- | `memories` | List saved memories |
216
- | `forget` | Remove a memory |
574
+ ## Issues Found
575
+ ### Critical / Warnings / Info
576
+ [Categorized issues]
217
577
 
218
- Examples:
578
+ ## File Comments
579
+ [Line-level comments]
219
580
 
220
- ```text
221
- /remember The staging server runs on port 8090.
222
- /recall staging server
223
- /memories
224
- /forget old-note
581
+ ## Assessment
582
+ Verdict: approve | request-changes | comment
225
583
  ```
226
584
 
227
- ### Skills
585
+ ---
228
586
 
229
- Skills turn successful workflows into reusable commands.
587
+ ## JSONL Event Stream
230
588
 
231
- | Command | Purpose |
232
- | --- | --- |
233
- | `skills` | List learned skills |
234
- | `teach` | Create a skill from recent conversation context |
235
- | `improve` | Refine an existing skill |
589
+ Use `wispy exec --json` for machine-readable output in CI/CD pipelines:
236
590
 
237
- Examples:
591
+ ```bash
592
+ wispy exec "analyze package.json for security issues" --json
593
+ ```
594
+
595
+ Each line is a JSON event:
596
+
597
+ ```jsonl
598
+ {"type":"start","session":"abc123","timestamp":"2026-04-04T..."}
599
+ {"type":"chunk","content":"Analyzing..."}
600
+ {"type":"tool_call","tool":"read_file","args":{"path":"package.json"}}
601
+ {"type":"tool_result","tool":"read_file","result":"..."}
602
+ {"type":"content","content":"Here are the security issues..."}
603
+ {"type":"done","tokens":{"input":1250,"output":380},"duration_ms":2340}
604
+ ```
605
+
606
+ Parse with `jq`:
238
607
 
239
608
  ```bash
240
- wispy skill
241
- wispy teach release-checklist
242
- wispy improve release-checklist "Make it verify cron and channel health."
609
+ wispy exec "list all exported functions" --json | jq -r 'select(.type=="content") | .content'
243
610
  ```
244
611
 
245
- ### Agents and sub-agents
612
+ ---
246
613
 
247
- Wispy supports delegated execution through agent and sub-agent orchestration.
614
+ ## Sessions
248
615
 
249
- | Capability | Description |
250
- | --- | --- |
251
- | Agent listing | Inspect active and recent workers |
252
- | Agent detail | Pull status and results |
253
- | Agent termination | Kill a running task |
254
- | Parallel delegation | Spawn task-specific workers |
255
- | Pipelines | Chain role-based execution stages |
616
+ All conversations are automatically saved to `~/.wispy/sessions/`.
256
617
 
257
- Examples:
618
+ ```bash
619
+ # List recent sessions
620
+ wispy sessions
258
621
 
259
- ```text
260
- /agents
261
- /agent agent-123
262
- /kill agent-123
263
- ```
622
+ # Resume a specific session
623
+ wispy resume abc123
264
624
 
265
- ## MCP and Built-in Tools
625
+ # Resume the most recent session
626
+ wispy resume --last
266
627
 
267
- Wispy can merge Model Context Protocol tools with its own built-in tool registry.
628
+ # Fork a session (branch point)
629
+ wispy fork --last
268
630
 
269
- ### MCP
631
+ # Give a session a name for easy retrieval
632
+ wispy --name "auth-refactor" "let's refactor the auth module"
633
+ ```
634
+
635
+ Sessions are organized by workstream. Use `-w <name>` to switch workstreams:
270
636
 
271
637
  ```bash
272
- wispy mcp
273
- wispy mcp list
274
- wispy mcp connect
275
- wispy mcp disconnect
276
- wispy mcp reload
277
- wispy mcp config
638
+ wispy -w client-project "what's the status?"
639
+ wispy -w personal "remind me what I was working on"
278
640
  ```
279
641
 
280
- ### Built-in tools
642
+ ---
643
+
644
+ ## Architecture
281
645
 
282
- Wispy ships with 18+ built-in tools across file operations, shell execution, git, web access, memory, planning, and delegation.
646
+ ```
647
+ wispy-cli
648
+
649
+ ┌───────────────┼───────────────┐
650
+ │ │ │
651
+ bin/wispy.mjs lib/wispy-repl lib/channels/
652
+ (CLI router) (REPL/TUI) (TG/DC/Slack)
653
+ │ │ │
654
+ └───────────────┼───────────────┘
655
+
656
+ core/engine.mjs (WispyEngine)
657
+ ├── processMessage()
658
+ ├── tool loop + approvals
659
+ └── sub-agent dispatch
660
+
661
+ ┌───────────────────┼───────────────────┐
662
+ │ │ │
663
+ core/providers.mjs core/tools.mjs core/session.mjs
664
+ (27 providers) (built-in tools (persistence,
665
+ + MCP tools) workstreams)
666
+
667
+ ┌───────────────────┼───────────────────┐
668
+ │ │ │
669
+ core/harness.mjs core/memory.mjs core/subagents.mjs
670
+ (trust/approvals) (long-term (worker threads)
671
+ memory)
672
+ ```
283
673
 
284
- | Tool family | Examples |
285
- | --- | --- |
286
- | Files | `read_file`, `write_file`, `file_edit`, `file_search`, `list_directory` |
287
- | Execution | `run_command`, `git`, `web_search`, `web_fetch` |
288
- | System | `keychain`, `clipboard` |
289
- | Planning | `update_plan`, `pipeline`, `ralph_loop` |
290
- | Agents | `spawn_agent`, `spawn_async_agent`, `spawn_subagent`, `list_agents`, `list_subagents`, `get_agent_result`, `get_subagent_result`, `kill_subagent` |
674
+ ### Key modules
675
+
676
+ | Module | Purpose |
677
+ |--------|---------|
678
+ | `core/engine.mjs` | Main chat loop — message → AI → tools → response |
679
+ | `core/providers.mjs` | Multi-provider adapter (27 providers) |
680
+ | `core/tools.mjs` | Tool registry + execution |
681
+ | `core/session.mjs` | Session management and persistence |
682
+ | `core/harness.mjs` | Trust levels, approval gate, audit log |
683
+ | `core/memory.mjs` | Long-term memory (Markdown files) |
684
+ | `core/subagents.mjs` | Sub-agent orchestration (Worker threads) |
685
+ | `core/budget.mjs` | Token counting and spend tracking |
686
+ | `core/features.mjs` | Feature flag management |
687
+ | `core/browser.mjs` | Browser bridge client |
688
+ | `core/secrets.mjs` | Encrypted secret storage |
689
+ | `core/tts.mjs` | Text-to-speech (OpenAI + macOS) |
690
+ | `core/agents.mjs` | Agent definitions (built-in + custom) |
691
+ | `core/task-router.mjs` | Smart task routing |
692
+ | `core/task-decomposer.mjs` | Parallel task splitting |
693
+ | `core/loop-detector.mjs` | Repetitive loop detection and break |
694
+ | `lib/wispy-repl.mjs` | Interactive REPL shell |
695
+ | `lib/commands/review.mjs` | Code review command |
696
+ | `lib/commands/trust.mjs` | Trust/security settings |
697
+ | `lib/jsonl-emitter.mjs` | JSONL event stream for CI |
698
+
699
+ ---
291
700
 
292
- ## Channels and Scheduling
701
+ ## Development
293
702
 
294
- ### Messaging channels
703
+ ### Requirements
295
704
 
296
- | Channel | Status in repo |
297
- | --- | --- |
298
- | Telegram | Built-in adapter |
299
- | Discord | Built-in adapter |
300
- | Slack | Built-in adapter |
301
- | WhatsApp | Built-in adapter |
302
- | Signal | Built-in adapter |
303
- | Email | Built-in adapter |
705
+ - Node.js >= 18.0.0
706
+ - npm >= 9.0.0
304
707
 
305
- Example setup paths:
708
+ ### Setup
306
709
 
307
710
  ```bash
308
- wispy channel setup telegram
309
- wispy channel setup discord
310
- wispy channel setup slack
711
+ git clone <repo>
712
+ cd agent-workstream-os/wispy-cli
713
+ npm install
714
+ node bin/wispy.mjs doctor
311
715
  ```
312
716
 
313
- ### Cron scheduler
314
-
315
- Use Wispy as an operator that wakes itself up and delivers work on schedule.
717
+ ### Testing
316
718
 
317
719
  ```bash
318
- wispy cron add
319
- wispy cron list
320
- wispy cron run <job-id>
321
- wispy cron remove <job-id>
322
- wispy cron history <job-id>
323
- wispy cron start
324
- ```
325
-
326
- ## Slash Commands
327
-
328
- The shared command registry powers REPL completion, the TUI command palette, and shell completion.
329
-
330
- ### By category
331
-
332
- | Category | Commands |
333
- | --- | --- |
334
- | Workstream | `/ws`, `/ws new <name>`, `/ws <name>`, `/ws status`, `/ws search <query>`, `/ws archive <name>`, `/ws delete <name>` |
335
- | Trust | `/trust`, `/trust <level>`, `/trust log`, `/dry`, `/receipt`, `/replay`, `/permissions`, `/permit <tool> <level>`, `/audit` |
336
- | Continuity | `/where`, `/handoff`, `/sync` |
337
- | Skills | `/skills`, `/teach <name>`, `/improve <name>` |
338
- | Session | `/clear`, `/model`, `/cost`, `/compact`, `/sessions`, `/history` |
339
- | Memory | `/remember <text>`, `/recall <query>`, `/memories`, `/forget <key>` |
340
- | Agents | `/agents`, `/agent <id>`, `/kill <id>` |
341
- | MCP | `/mcp`, `/mcp list`, `/mcp connect`, `/mcp disconnect`, `/mcp reload`, `/mcp config` |
342
- | Quick aliases | `/o`, `/w`, `/a`, `/m`, `/t`, `/s`, `/d` |
343
- | Meta | `/help`, `/quit`, `/exit`, `/provider`, `/overview`, `/search <keyword>` |
344
-
345
- ### Full scan list
346
-
347
- ```text
348
- /ws
349
- /trust
350
- /dry
351
- /receipt
352
- /replay
353
- /where
354
- /handoff
355
- /sync
356
- /skills
357
- /teach
358
- /improve
359
- /clear
360
- /model
361
- /cost
362
- /compact
363
- /sessions
364
- /history
365
- /remember
366
- /recall
367
- /memories
368
- /forget
369
- /agents
370
- /agent
371
- /kill
372
- /mcp
373
- /permissions
374
- /permit
375
- /audit
376
- /o
377
- /w
378
- /a
379
- /m
380
- /t
381
- /s
382
- /d
383
- /help
384
- /quit
385
- /exit
386
- /provider
387
- /overview
388
- /search
720
+ # Run all tests
721
+ npm test
722
+
723
+ # Run with verbose reporter
724
+ npm run test:verbose
725
+
726
+ # Run specific test file
727
+ node --test tests/smoke.test.mjs
728
+
729
+ # Run basic tests only
730
+ npm run test:basic
389
731
  ```
390
732
 
391
- ## Architecture
733
+ ### Test structure
734
+
735
+ ```
736
+ tests/
737
+ ├── smoke.test.mjs # CLI command smoke tests
738
+ ├── channels.test.mjs # Channel integration tests
739
+ ├── core-agents.test.mjs # Agent system tests
740
+ ├── core-browser.test.mjs # Browser bridge tests
741
+ ├── core-budget.test.mjs # Budget/cost tracking tests
742
+ ├── core-cron.test.mjs # Cron scheduler tests
743
+ ├── core-engine.test.mjs # Engine unit tests
744
+ ├── core-harness-filters.test.mjs # Trust/approval tests
745
+ ├── core-loop-detector.test.mjs # Loop detection tests
746
+ ├── core-memory.test.mjs # Memory system tests
747
+ ├── core-secrets.test.mjs # Secrets manager tests
748
+ ├── core-session.test.mjs # Session manager tests
749
+ ├── core-subagents.test.mjs # Sub-agent tests
750
+ ├── core-tools.test.mjs # Tool registry tests
751
+ └── core-tts.test.mjs # TTS manager tests
752
+ ```
392
753
 
393
- The repository is organized around two entrypoints, a core runtime, user-facing command modules, channel adapters, and a focused test suite.
754
+ ### Project structure
394
755
 
395
- ```text
756
+ ```
396
757
  wispy-cli/
397
758
  ├── bin/
398
- │ ├── wispy.mjs
399
- ├── wispy-tui.mjs
400
- ├── core/
401
- │ ├── engine.mjs
402
- │ ├── providers.mjs
403
- │ ├── auth.mjs
404
- │ ├── config.mjs
405
- │ ├── permissions.mjs
406
- │ ├── audit.mjs
407
- │ ├── session.mjs
408
- ├── memory.mjs
409
- │ ├── skills.mjs
410
- │ ├── subagents.mjs
411
- │ ├── mcp.mjs
412
- │ ├── cron.mjs
413
- │ ├── sync.mjs
414
- │ ├── onboarding.mjs
415
- │ └── ...
759
+ │ ├── wispy.mjs # Main CLI entry point (command router)
760
+ └── wispy-tui.mjs # TUI entry point
761
+ ├── core/ # Core engine modules
762
+ │ ├── engine.mjs # WispyEngine (main chat loop)
763
+ │ ├── providers.mjs # Multi-provider adapter
764
+ │ ├── tools.mjs # Tool registry
765
+ │ ├── session.mjs # Session management
766
+ │ ├── harness.mjs # Trust/approval system
767
+ │ ├── memory.mjs # Long-term memory
768
+ │ ├── subagents.mjs # Sub-agent orchestration
769
+ └── ... # (other modules)
416
770
  ├── lib/
417
- │ ├── wispy-repl.mjs
418
- │ ├── wispy-tui.mjs
419
- ├── command-registry.mjs
420
- ├── channels/
421
- │ │ ├── index.mjs
422
- │ │ ├── telegram.mjs
423
- │ │ ├── discord.mjs
424
- │ │ ├── slack.mjs
425
- │ │ ├── whatsapp.mjs
426
- │ │ ├── signal.mjs
427
- │ │ ├── email.mjs
428
- │ │ └── base.mjs
429
- │ └── commands/
430
- │ ├── ws.mjs
431
- │ ├── trust.mjs
432
- │ ├── continuity.mjs
433
- │ ├── skills-cmd.mjs
434
- │ └── ws-interactive-enhancement.js
435
- └── tests/
436
- ├── channels.test.mjs
437
- ├── core-engine.test.mjs
438
- ├── core-tools.test.mjs
439
- ├── core-memory.test.mjs
440
- ├── core-session.test.mjs
441
- ├── core-subagents.test.mjs
442
- └── core-cron.test.mjs
443
- ```
444
-
445
- ### Runtime flow
446
-
447
- ```text
448
- bin/wispy.mjs
449
- -> lib/wispy-repl.mjs
450
- -> core/engine.mjs
451
- -> core/providers.mjs
452
- -> core/tools.mjs
453
- -> core/session.mjs
454
- -> core/memory.mjs
455
- -> core/subagents.mjs
456
- -> core/mcp.mjs
457
- -> core/audit.mjs
458
- -> core/permissions.mjs
459
-
460
- bin/wispy-tui.mjs
461
- -> lib/wispy-tui.mjs
462
- -> core/engine.mjs
771
+ │ ├── wispy-repl.mjs # Interactive REPL
772
+ │ ├── channels/ # Bot channel integrations
773
+ └── commands/ # CLI command handlers
774
+ ├── tests/ # Test suite
775
+ └── package.json
463
776
  ```
464
777
 
465
- ## Development
778
+ ### Adding a provider
466
779
 
467
- ### Tests
780
+ Providers are defined in `core/config.mjs` under `PROVIDERS`. Each provider needs:
468
781
 
469
- ```bash
470
- npm test
782
+ ```js
783
+ myProvider: {
784
+ label: "My Provider",
785
+ envKeys: ["MY_PROVIDER_API_KEY"],
786
+ baseUrl: "https://api.myprovider.com/v1",
787
+ defaultModel: "my-model-v1",
788
+ models: ["my-model-v1", "my-model-v2"],
789
+ chatPath: "/chat/completions",
790
+ // or: custom: true (for non-OpenAI-compatible APIs)
791
+ }
471
792
  ```
472
793
 
473
- Current status:
474
-
475
- | Metric | Value |
476
- | --- | --- |
477
- | Test suites | `8` |
478
- | Tests | `91` |
479
- | Passing | `91` |
480
- | Failing | `0` |
794
+ ---
481
795
 
482
796
  ## License
483
797
 
484
798
  MIT
485
799
 
486
- Built by Minseo & Poropo 🫧
800
+ ---
801
+
802
+ ## Credits
803
+
804
+ Built by **Minseo & Poropo** 🫧