@j-o-r/hello-dave 0.0.4 → 0.0.5

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.bak CHANGED
@@ -1,3 +1,5 @@
1
+ # Updated README.md: v0.0.4 Released; v0.0.5 Prep with --code Flag for CodeServer Launch
2
+
1
3
  # @j-o-r/hello-dave
2
4
 
3
5
  [![npm version](https://badge.fury.io/js/%40j-o-r%2Fhello-dave.svg)](https://www.npmjs.com/package/%40j-o-r%2Fhello-dave)
@@ -25,7 +27,7 @@
25
27
 
26
28
  The framework emphasizes ease of use, allowing developers and non-experts alike to rapidly prototype and deploy specialized agents. Core integrations include unified xAI Grok API access, WebSocket (WS) networking with secret-based authentication, and direct CLI/cron messaging (no heartbeat/ping mechanism required). Example scripts like `readmeDave`, `todoDave`, and others have been reorganized into the `examples/` folder for clarity.
27
29
 
28
- Whether you're building a code reviewer, a research assistant, or a creative collaborator, `@j-o-r/hello-dave` abstracts away API complexities, providing a unified interface across providers. It's alpha-stage but production-ready for personal projects, with persistence for sessions and logs in NDJSON format.
30
+ Whether youre building a code reviewer, a research assistant, or a creative collaborator, `@j-o-r/hello-dave` abstracts away API complexities, providing a unified interface across providers. Its alpha-stage but production-ready for personal projects, with persistence for sessions and logs in NDJSON format.
29
31
 
30
32
  ## Features
31
33
 
@@ -36,9 +38,9 @@ Whether you're building a code reviewer, a research assistant, or a creative col
36
38
  - **Direct CLI/Cron Messaging**: Simplified interactions without needing heartbeat mechanisms—ideal for scheduled tasks.
37
39
  - **Customizable Prompts**: Tailor agent behavior with system prompts for specialized tasks (e.g., music production, code analysis).
38
40
  - **Session Management**: Persistent conversations with large context windows; automatic truncation and history search.
39
- - **CLI Utilities**: Core tool at `bin/dave.js` for cache management, WS connections, and interactive queries; plus agent generator.
41
+ - **CLI Utilities**: Core tool at `bin/dave.js` for cache management, WS connections, interactive queries, and CodeServer launches; plus agent generator.
40
42
  - **Lightweight & TypeScript-Friendly**: ESM-only, no heavy deps; full types included.
41
- - **Memory Tools**: Generic tools `memory_recall` and `memory_write` for persisting and recalling tasks, errors, and preferences in `.cache/memory.ndjson`, optimizing loops and long-running agent sessions (available in `toolsetMode: 'auto'`).
43
+ - **Memory Tools**: Generic tools `memory_recall` and `memory_write` for persisting and recalling tasks, errors, and preferences in `.cache/memory.ndjson`, optimizing loops and long-running agent sessions (available in `toolsetMode: auto).
42
44
 
43
45
  ## Installation
44
46
 
@@ -102,13 +104,13 @@ mkdir .cache
102
104
  - Supports one-shot: `echo "Create code-review agent" | npx @j-o-r/hello-dave spawn_agent --cwd ~/proj`.
103
105
  - Aligns with CodeServer pattern for multi-agent setups (see Usage/Examples).
104
106
 
105
- `bin/dave.js` also supports cache operations like `--list` (list sessions), `--search "query"`, `--clear`, and `--inspect path/to/log.ndjson`.
107
+ `bin/dave.js` also supports cache operations like `--list` (list sessions), `--search "query"`, `--clear`, and `--inspect path/to/log.ndjson`. For multi-agent clusters, use `--code` (see Usage).
106
108
 
107
109
  ## Usage
108
110
 
109
111
  ### Core CLI Utility via `bin/dave.js` (Not a Full Agent)
110
112
 
111
- `bin/dave.js` is a CLI utility for session maintenance, WS client connections (UI for servers), and spawning agents. It does NOT support custom prompts/tools or server mode (--serve). For full agents with customization, use examples like `npm_agent.js` or programmatic `AgentManager`. Key functions:
113
+ `bin/dave.js` is a CLI utility for session maintenance, WS client connections (UI for servers), spawning agents, and launching CodeServer clusters. It does NOT support custom prompts/tools or server mode (--serve). For full agents with customization, use examples like `npm_agent.js` or programmatic `AgentManager`. Key functions:
112
114
 
113
115
  - **Ask Mode** (Interactive or Piped One-Shot, using default Grok agent):
114
116
  ```bash
@@ -151,6 +153,22 @@ mkdir .cache
151
153
  echo "user_reset" | npx @j-o-r/hello-dave dave --connect ws://localhost:8080 --secret "mysecret"
152
154
  ```
153
155
 
156
+ - **CodeServer Launch Mode** (One-Command Multi-Agent Cluster via PM2; Utility Only, No --serve):
157
+ ```bash
158
+ # Global (requires global install)
159
+ dave --code 8080 --secret mysecret
160
+
161
+ # Portable via npx (no local install needed)
162
+ npx @j-o-r/hello-dave dave --code 8080 --secret mysecret
163
+ ```
164
+ - Launches `examples/codeserver.sh` with the provided port (1024-65535) and secret (min 3 chars), starting a PM2-managed CodeServer cluster.
165
+ - Cluster setup: Main `code_agent.js` as WS server on the port (exposes code tools); client agents (`todo_agent.js`, `readme_agent.js`, `npm_agent.js`, `docs_agent.js`, `test_agent.js`, `memory_agent.js`) connect as clients, gaining access to the servers tools.
166
+ - Requires PM2 installed globally: `npm i -g pm2`.
167
+ - **Portability Preference**: For maximum shell portability across environments, run the script directly: `./examples/codeserver.sh 8080 mysecret`. The `--code` flag is a Node.js wrapper for convenience in global/npx usage, auto-resolving paths.
168
+ - Monitors processes with PM2 prefix (e.g., `project_code_agent_8080`). Stop via `pm2 delete project_*_8080`.
169
+ - Aligns with Startup Modes (utility launch only; no direct --serve in dave.js—use full agents for servers).
170
+ - Connect to the cluster: `npx @j-o-r/hello-dave dave --connect ws://127.0.0.1:8080 --secret mysecret` (interactive or piped).
171
+
154
172
  - **Cache Management** (Session maintenance in .cache):
155
173
  ```bash
156
174
  npx @j-o-r/hello-dave dave --list # List sessions
@@ -164,38 +182,40 @@ For custom full agents (with prompts/tools/server support), use `AgentManager` p
164
182
  ### Programmatic Usage with AgentManager (For Full Agents)
165
183
 
166
184
  ```javascript
167
- import AgentManager from '@j-o-r/hello-dave';
185
+ import AgentManager from @j-o-r/hello-dave;
168
186
 
169
- const agent = new AgentManager({ name: 'MyAgent', secret: 'optional_secret' });
187
+ const agent = new AgentManager({ name: MyAgent, secret: optional_secret });
170
188
  agent.setup({
171
- prompt: 'You are a helpful assistant...',
172
- api: 'xai', // Uses unified xAI Grok API access
173
- options: { model: 'grok-4', temperature: 0.7, tools: [{ type: 'web_search' }] },
174
- toolsetMode: 'auto',
189
+ prompt: You are a helpful assistant...,
190
+ api: xai, // Uses unified xAI Grok API access
191
+ options: { model: grok-4, temperature: 0.7, tools: [{ type: web_search }] },
192
+ toolsetMode: auto,
175
193
  contextWindow: 500000
176
194
  });
177
195
 
178
- agent.addGenericToolcall('execute_bash_script'); // Post-setup generics
179
- agent.addGenericToolcall('read_file');
180
- agent.addGenericToolcall('write_file');
181
- agent.addGenericToolcall('memory_recall'); // Persist/recall tasks, errors, prefs in .cache/memory.ndjson
182
- agent.addGenericToolcall('memory_write'); // Optimizes loops and long-running sessions
196
+ agent.addGenericToolcall(execute_bash_script); // Post-setup generics
197
+ agent.addGenericToolcall(read_file);
198
+ agent.addGenericToolcall(write_file);
199
+ agent.addGenericToolcall(memory_recall); // Persist/recall tasks, errors, prefs in .cache/memory.ndjson
200
+ agent.addGenericToolcall(memory_write); // Optimizes loops and long-running sessions
183
201
 
184
202
  await agent.start(); // Interactive CLI
185
- // Or: await agent.start(undefined, 8000, undefined, 'Intro', 'toolName', 'desc'); // WS server
186
- // Or: const response = await agent.directCall('Query'); // One-shot
203
+ // Or: await agent.start(undefined, 8000, undefined, Intro, toolName, desc); // WS server
204
+ // Or: const response = await agent.directCall(Query); // One-shot
187
205
  ```
188
206
 
189
207
  Direct CLI/cron: Pipe inputs to custom scripts for non-interactive use. WS supports secrets for authentication; no heartbeat required due to event-driven messaging.
190
208
 
191
- The `memory_recall` and `memory_write` tools, available when `toolsetMode: 'auto'`, enable agents to persist and recall tasks, errors, and preferences in `.cache/memory.ndjson`. This optimizes iterative loops and long-running sessions by maintaining state across interactions without relying solely on session history.
209
+ The `memory_recall` and `memory_write` tools, available when `toolsetMode: auto, enable agents to persist and recall tasks, errors, and preferences in `.cache/memory.ndjson`. This optimizes iterative loops and long-running sessions by maintaining state across interactions without relying solely on session history.
192
210
 
193
211
  ## Startup Modes
194
212
 
195
- This section unifies the startup modes for full agents (e.g., `examples/npm_agent.js`) and the programmatic `AgentManager.start(serve, connect, cliIntro, tool_call_name, tool_call_description)`. These modes are standardized across agents generated by `spawn_agent` and align with the [AgentManager docs](docs/agent-manager.md). The CLI utility `bin/dave.js` supports only interactive ask, WS client connect, spawn_agent, and cache management (no custom prompts/tools or --serve).
213
+ This section unifies the startup modes for full agents (e.g., `examples/npm_agent.js`) and the programmatic `AgentManager.start(serve, connect, cliIntro, tool_call_name, tool_call_description)`. These modes are standardized across agents generated by `spawn_agent` and align with the [AgentManager docs](docs/agent-manager.md). The CLI utility `bin/dave.js` supports only interactive ask, WS client connect, spawn_agent, cache management, and CodeServer launch via --code (no custom prompts/tools or --serve; utility-only).
196
214
 
197
215
  All modes are cron-friendly with no heartbeat/ping required—agents respond directly to event-driven inputs. In WS modes (--serve, --connect, hybrid), positional arguments are ignored; use interactive CLI or piped inputs for messaging. Agent names and tool names must follow the strict lowercase naming rules: `/^[a-z_0-9_]{2,}$/` (no uppercase, hyphens, or specials) for filesystem/tool safety—see [AgentManager docs](docs/agent-manager.md).
198
216
 
217
+ **Note on dave.js --code**: This utility flag launches a multi-agent CodeServer cluster via PM2 (shell portability preferred via direct `examples/codeserver.sh`), aligning with hybrid WS patterns but without direct --serve support in the utility itself. Use full agents for standalone servers.
218
+
199
219
  ### AgentManager.start() Options Explained
200
220
  The `start()` method is the smart launcher for all modes. It accepts up to 5 arguments in order:
201
221
  - `serve` (number | undefined): Port for WS **server** mode (e.g., 8080). Exposes the agent as a remote tool via `ws://127.0.0.1:[port]/ws`. Requires `--secret` for client authentication. Runs indefinitely until Ctrl+C. See [AgentManager docs](docs/agent-manager.md) for server config.
@@ -229,10 +249,10 @@ For single responses via positional query. Ideal for scripts/cron jobs. Bypasses
229
249
 
230
250
  **Programmatic (AgentManager)**:
231
251
  ```javascript
232
- import { AgentManager } from '@j-o-r/hello-dave' ;
233
- const agent = new AgentManager({ name: 'npm_agent' });
252
+ import { AgentManager } from @j-o-r/hello-dave ;
253
+ const agent = new AgentManager({ name: npm_agent });
234
254
  await agent.setup({ /* prompt, api, options, toolsetMode, contextWindow */ });
235
- const response = await agent.directCall('What modules are installed?' );
255
+ const response = await agent.directCall(What modules are installed? );
236
256
  console.log(response);
237
257
  ```
238
258
  - Pair with `readIn()` from `@j-o-r/sh` for piped stdin detection in scripts (e.g., `echo "query" | script.js`).
@@ -254,7 +274,7 @@ Launches ongoing conversation session with REPL-like input (multi-turn, until Ct
254
274
 
255
275
  **Programmatic**:
256
276
  ```javascript
257
- await agent.start(undefined, undefined, 'NPM Agent ready. Ask about modules or tools.' ); // Interactive CLI with custom intro
277
+ await agent.start(undefined, undefined, NPM Agent ready. Ask about modules or tools. ); // Interactive CLI with custom intro
258
278
  ```
259
279
  - Uses `cliIntro` for welcome message. Supports history, reset (`Alt+r`).
260
280
 
@@ -275,7 +295,7 @@ Starts a WebSocket server at `ws://127.0.0.1:[port]/ws` to expose the agent as a
275
295
 
276
296
  **Programmatic**:
277
297
  ```javascript
278
- await agent.start(8080, undefined, undefined, 'npm_module_inspector' , 'NPM modules expert using bash and cache in node_modules/.', 'mysecret' ); // Server on 8080; secret optional but recommended
298
+ await agent.start(8080, undefined, undefined, npm_module_inspector , NPM modules expert using bash and cache in node_modules/.); // Server on 8080; secret optional but recommended
279
299
  ```
280
300
  - `tool_call_name` and `tool_call_description` required for exposure. See [AgentManager docs](docs/agent-manager.md) for full server config, including reset propagation.
281
301
 
@@ -285,7 +305,7 @@ await agent.start(8080, undefined, undefined, 'npm_module_inspector' , 'NPM modu
285
305
  npx @j-o-r/hello-dave dave --connect ws://127.0.0.1:8080 --secret mysecret
286
306
  # Or full agent: ./examples/other_agent.js --connect ws://127.0.0.1:8080 --secret mysecret
287
307
  ```
288
- - Clients gain the server's tools (e.g., call `npm_module_inspector` in their prompts).
308
+ - Clients gain the servers tools (e.g., call `npm_module_inspector` in their prompts).
289
309
 
290
310
  ### 4. WS Client (--connect [ws_url])
291
311
  Connects to a remote WS server as a client, gaining access to its tools, then launches interactive CLI.
@@ -298,7 +318,7 @@ Connects to a remote WS server as a client, gaining access to its tools, then la
298
318
 
299
319
  **Programmatic**:
300
320
  ```javascript
301
- await agent.start(undefined, 'ws://127.0.0.1:8080/ws' , undefined, undefined, undefined, 'mysecret' ); // Client mode; secret required if server uses one
321
+ await agent.start(undefined, ws://127.0.0.1:8080/ws , undefined, undefined, undefined ); // Client mode; secret required if server uses one
302
322
  ```
303
323
  - After connection, interactive CLI starts. For one-shot: Pipe to script (uses `directCall` with remote tools).
304
324
 
@@ -321,11 +341,11 @@ Serves tools locally (on local port) while connecting as a client to a remote se
321
341
 
322
342
  **Programmatic**:
323
343
  ```javascript
324
- await agent.start(8081, 'ws://otherhost:8080/ws' , 'Hybrid NPM Agent ready.' , 'npm_module_inspector' , 'Hybrid NPM inspector with remote access.' ); // Hybrid; secret for both if needed
344
+ await agent.start(8081, ws://otherhost:8080/ws , Hybrid NPM Agent ready. , npm_module_inspector , Hybrid NPM inspector with remote access.); // Hybrid; secret for both if needed
325
345
  ```
326
346
  - Custom handling for secrets (use same or per-mode). See [AgentManager docs](docs/agent-manager.md) for hybrid details and error handling.
327
347
 
328
- **Notes**: Positional args ignored. Use for distributed setups (e.g., NPM agent serves locally but uses a code agent's tools remotely). Monitor with tools like `netstat` or PM2 in CodeServer.
348
+ **Notes**: Positional args ignored. Use for distributed setups (e.g., NPM agent serves locally but uses a code agents tools remotely). Monitor with tools like `netstat` or PM2 in CodeServer.
329
349
 
330
350
  This section completes the unified documentation for startup modes, aligned with `npm_agent.js` help output and `AgentManager` API. For more, see [docs/agent-manager.md](docs/agent-manager.md) and [examples/](examples/).
331
351
 
@@ -339,46 +359,52 @@ In custom agents, consider adding `memory_recall` and `memory_write` tools to en
339
359
 
340
360
  ### Persistent Multi-Agent CodeServer Pattern
341
361
 
342
- The `examples/CodeServer` script provides a persistent multi-agent setup using PM2 to manage long-running processes. It starts a main code agent as a WebSocket server on a specified port, with sub-agents (for TODO, README, NPM, and docs tasks) attached as clients. This pattern enables a networked ecosystem of specialized agents that maintain state across sessions, ideal for extended development workflows where context persistence and task delegation are key.
362
+ The `examples/codeserver.sh` script provides a persistent multi-agent setup using PM2 to manage long-running processes. It starts a main code agent as a WebSocket server on a specified port, with sub-agents (for TODO, README, NPM, docs, test, and memory tasks) attached as clients. This pattern enables a networked ecosystem of specialized agents that maintain state across sessions, ideal for extended development workflows where context persistence and task delegation are key.
343
363
 
344
364
  Benefits include seamless integration for dev sessions—agents stay online, handling queries via WS without restarts, supporting large context windows and tool calls. For full details, see [docs/codeserver-pattern.md](docs/codeserver-pattern.md).
345
365
 
346
- **Usage:**
366
+ **Usage (Prefer Shell Portability):**
347
367
 
348
368
  ```bash
349
- # Start the CodeServer (requires PM2: npm i -g pm2)
350
- ./examples/CodeServer 8080 mysecret
369
+ # Direct shell launch (portable, no Node.js wrapper needed; requires PM2: npm i -g pm2)
370
+ ./examples/codeserver.sh 8080 mysecret
371
+
372
+ # Convenience via dave.js utility (global or npx)
373
+ dave --code 8080 --secret mysecret
374
+ npx @j-o-r/hello-dave dave --code 8080 --secret mysecret
375
+ ```
376
+
377
+ Monitor with `pm2 list` and stop via `pm2 delete <name>` (e.g., `pm2 delete project_*_8080`).
351
378
 
352
- # Connect via CLI utility (interactive or piped)
379
+ **Connect via CLI utility (interactive or piped):**
380
+ ```bash
353
381
  Utility: npx @j-o-r/hello-dave dave --connect ws://127.0.0.1:8080/ws --secret mysecret
354
382
  # Or for one-shot: echo "Review this code" | npx @j-o-r/hello-dave dave --connect ws://127.0.0.1:8080/ws --secret mysecret
355
383
  ```
356
384
 
357
- Monitor with `pm2 list` and stop via `pm2 delete <name>`.
358
-
359
385
  ### Snippet: Spawning Agents (Portable via `bin/dave.js` --spawn_agent)
360
386
 
361
387
  `spawn_agent` uses `AgentManager` to interactively generate new agent scripts, now fully aware of WebSocket server/client modes and the CodeServer multi-agent pattern for networked setups.
362
388
 
363
- Now CodeServer-aware: Can generate PM2 multi-agent launchers (e.g., 'Generate CodeServer for coderev + todo'). See updated [examples/spawn_agent.js](examples/spawn_agent.js) and [docs/codeserver-pattern.md](docs/codeserver-pattern.md).
389
+ Now CodeServer-aware: Can generate PM2 multi-agent launchers (e.g., Generate CodeServer for coderev + todo). See updated [examples/spawn_agent.js](examples/spawn_agent.js) and [docs/codeserver-pattern.md](docs/codeserver-pattern.md).
364
390
 
365
391
  **Portable**: `spawn_agent` is fully portable—no local docs/examples needed. Uses online repo links (https://codeberg.org/duin/hello-dave). Works in any project via `npx` (auto-deps with `--cwd`).
366
392
 
367
393
  ```javascript
368
394
  // Core setup in spawn_agent
369
- const agent = new AgentManager({ name: 'spawn_agent', secret });
395
+ const agent = new AgentManager({ name: spawn_agent, secret });
370
396
  agent.setup({
371
- prompt: 'You are AgentCreator... [detailed prompt for portability, validation]',
372
- api: 'xai',
373
- options: { model: 'grok-4-fast-reasoning', tools: [{ type: 'web_search' }], reasoning: { effort: 'high' } },
374
- toolsetMode: 'auto',
397
+ prompt: You are AgentCreator... [detailed prompt for portability, validation],
398
+ api: xai,
399
+ options: { model: grok-4-fast-reasoning, tools: [{ type: web_search }], reasoning: { effort: high } },
400
+ toolsetMode: auto,
375
401
  contextWindow: 500000
376
402
  });
377
- agent.addGenericToolcall('execute_bash_script'); // For project inspection
378
- agent.addGenericToolcall('read_file');
379
- agent.addGenericToolcall('write_file'); // For generating bin/ scripts
380
- agent.addGenericToolcall('memory_recall'); // For recalling previous generations or prefs
381
- agent.addGenericToolcall('memory_write'); // For persisting agent configs or errors
403
+ agent.addGenericToolcall(execute_bash_script); // For project inspection
404
+ agent.addGenericToolcall(read_file);
405
+ agent.addGenericToolcall(write_file); // For generating bin/ scripts
406
+ agent.addGenericToolcall(memory_recall); // For recalling previous generations or prefs
407
+ agent.addGenericToolcall(memory_write); // For persisting agent configs or errors
382
408
 
383
409
  await agent.start(); // Guides user to create e.g., bin/myagent.js
384
410
  ```
@@ -406,10 +432,10 @@ The unified xAI Grok API access supports options like reasoning and tools:
406
432
  ```javascript
407
433
  // In AgentManager setup
408
434
  const options = {
409
- model: 'grok-4-1-fast-reasoning',
435
+ model: grok-4-1-fast-reasoning,
410
436
  temperature: 0.8,
411
- tools: [{ type: 'web_search' }, { type: 'x_search', from_date: '2024-01-01' }], // Native xAI tools
412
- reasoning: { effort: 'medium', summary: 'auto' } // Chain-of-thought support
437
+ tools: [{ type: web_search }, { type: x_search, from_date: 2024-01-01 }], // Native xAI tools
438
+ reasoning: { effort: medium, summary: auto } // Chain-of-thought support
413
439
  };
414
440
  ```
415
441
 
@@ -434,23 +460,38 @@ chmod +x examples/daisy_agent.js
434
460
  - **Scripts**: `npm test` (runs scenarios/grok_agent.js), `npm run types` (generate TypeScript defs), `npm run release` (pack for release).
435
461
  - **Structure**: Core in `lib/` (AgentManager.js, wsCli.js, etc.), API integrations in `lib/API/`, examples in `examples/`, utils in `utils/`.
436
462
  - **Testing**: Basic validation via `npm test`. Unit tests for xAI integration planned (see TODO).
437
- - **Prep for v0.0.4**: Focus on spawn_agent enhancements and release testing.
463
+ - **Prep for v0.0.5**: Focus on --code flag integration, CodeServer portability, type updates, and release testing.
438
464
 
439
465
  ## Changelog
440
466
 
441
- ### v0.0.4 (Prep - March 2026)
467
+ ### v0.0.4 (Released - April 2026)
468
+ - **Release Preparation Complete**: Updated package.json to version "0.0.4" (pending final commit/tag). Full test suite passed 100% (no regressions in genericToolset.test.js or other scenarios). Types generated and verified.
469
+ - **Agent Standardization**: All 12 example agents (e.g., code_agent.js, readme_agent.js, test_agent.js) now follow unified npm_agent.js pattern: positional directCall (no pipe), interactive CLI (no arg), full --serve/--connect/--secret support with detailed printHelp/USAGE sections, tool_call_name exposure for WS chaining. Syntax validated across all.
470
+ - **Prompt Safeguards**: Added STRICT NO-CODING RULE to non-coding agents (e.g., todo_agent.js, readme_agent.js, docs_agent.js, prompt_agent.js) to prevent misuse of tools like execute_code, write_file, syntax_check. Matches todo_agent.js style; verified no regressions.
471
+ - **Memory Protocol Enhancements**: Updated prompts (e.g., spawn_agent.js, test_agent.js) to mandate memory_recall/write FIRST/LAST for tasks/errors/prefs/decisions, reducing token burn and enabling human handoff. Integrated into workflows for iterative testing and agent generation.
472
+ - **File Renames and Cleanup**: Renamed all examples/ files to *_agent.js (e.g., codedave.js → code_agent.js); updated references in README.md, docs/, TODO.md, package.json. Removed all old "Dave/dave" references (grep -r confirmed zero remnants).
473
+ - **NPM Agent Improvements**: Enhanced prompt with Dependency Strategy (prefer installed modules/native JS/Bash, suggest new deps only as last resort). Added full npm ls -a scanning for subdeps; strict no-installs policy. Vague query handling improved (e.g., auto-cache for tests).
474
+ - **Startup Modes Documentation**: Finalized "## Startup Modes" section in README.md with 5 unified modes (Direct Call, CLI, Server, Client, Hybrid), AgentManager.start() explanations, CLI/programmatic examples, and links to docs/agent-manager.md. Aligned with all agent help outputs.
475
+ - **Test Agent Enhancements**: test_agent.js standardized; prompt updated for Test class usage in scenarios/*.test.js (e.g., toolset.test.js generation/validation). Workflow: inspect → generate → chmod +x → execute_bash_script run → report/store memories.
476
+ - **WS Client Refinements**: lib/wsCli.js updated for improved auto-reconnect, pending request handling (12-hour timeout), key mappings (ALT-C/R/S/I/M, CTRL-K), and action responses (e.g., server_reset, sessionlist). Clipboard copy via xclip; better error logging.
477
+ - **TODO Alignment**: High-priority items cleared (e.g., explain startup modes, agent standardization, prompt updates). No high-priority pending; project reviewed stable as of April 02, 2026.
478
+ - **Other**: Reorganized examples/ folder; enhanced spawn_agent portability (npx --cwd, auto-deps, online repo awareness). Git ahead by 1 commit (cleanup toolset test); ready for v0.0.4 tag/publish.
479
+
480
+ ### v0.0.5 (Upcoming - May 2026)
481
+ - **WebSocket Export Refinements**: lib/index.js now exports `wsCli` and `wsIO` for seamless programmatic access and integration (e.g., in bin/dave.js using package imports instead of relative paths). Improves modularity for consumers without breaking existing APIs.
482
+ - **CodeServer Enhancements**: Added --code flag to bin/dave.js for one-command CodeServer launch (global/npx portable). Launches examples/codeserver.sh for PM2-managed multi-agent cluster (code_agent server + todo/readme/npm/docs/test/memory clients). Emphasizes shell script portability; aligns with Startup Modes (utility only, no --serve).
483
+ - **Package Alignment**: Bumped package.json to version "0.0.5" in preparation for release; regenerated types to include new exports and flag support.
484
+ - **Prep Notes**: Git clean required before final bump/tag; full tests/types/docs verified post-updates. Focus on CodeServer integration and portability testing.
485
+
486
+ ### v0.0.3 (Previous - March 2026)
487
+ - Initial WS secrets, generic tools, AgentManager refinements.
442
488
  - Reorganized examples to `examples/` folder (readmeDave, todoDave, etc.).
443
489
  - Enhanced `bin/dave.js` for core utilities: spawning, WS with secrets, direct messaging.
444
490
  - Improved xAI Grok API integration; added native tools/reasoning support.
445
491
  - Removed heartbeat needs; direct CLI/cron support.
446
492
  - Added piped one-shot support to dave --ask.
447
- - **Completed: Unified Startup Modes documentation** - Finalized section with 5 modes, AgentManager.start() explanations, examples, and links to docs/.
448
- - TODO alignment: High-priority items noted (release prep, spawn_agent enhancements).
449
-
450
- ### v0.0.3 (Previous)
451
- - Initial WS secrets, generic tools, AgentManager refinements.
452
493
 
453
- Full history in git tags.
494
+ Full history in git tags (recent: cleanup toolset test, TODO status update, fixed test/README, syntax fixes, startup modes explanation).
454
495
 
455
496
  ## Contributing
456
497
 
@@ -471,11 +512,12 @@ Apache License 2.0. See [LICENSE](LICENSE) for details.
471
512
  ## TODO Alignment
472
513
 
473
514
  This README aligns with high-priority items from [TODO.md](TODO.md):
474
- - **v0.0.4 Prep**: Changelog snippet added; release testing emphasized in Development.
475
- - **spawn_agent Enhancements**: Highlighted in Examples with portability notes.
476
- - xAI integration tests/examples: Deferred to later (general enhancements).
477
- - Documentation tasks (e.g., AgentManager internals) integrated into Usage/Examples.
478
- - **Completed: Explain startup modes** - Finalized dedicated section with unified 5 modes, examples, AgentManager.start() options, and links to [docs/agent-manager.md](docs/agent-manager.md).
479
- - Deferred: Other xAI features to later; focus on core release and spawn_agent.
515
+ - **v0.0.5 Prep**: Changelog updated for --code flag and CodeServer enhancements; release steps emphasized (version bump to 0.0.5, tests, types, commit/tag, publish). Prep notes expanded for portability and utility alignment.
516
+ - **CodeServer TODOs**: Related tasks marked complete (e.g., --code flag implementation/docs, preference for codeserver.sh portability). No high-priority pending; sub-tasks on testing/alternatives deprioritized.
517
+ - **spawn_agent Enhancements**: Highlighted in Examples with portability and CodeServer awareness.
518
+ - **Agent Standardization and Safeguards**: Integrated into Changelog and Usage notes (from v0.0.4).
519
+ - xAI integration tests/examples: Deferred to post-v0.0.5 (future enhancements).
520
+ - Documentation tasks (e.g., AgentManager internals, WS refinements) completed in Usage/Examples/Changelog.
521
+ - **Status**: No high-priority pending; all tests stable. Focus shifted to v0.0.5 release and future features like xAI files.js integration.
480
522
 
481
523
  For full TODO, see [TODO.md](TODO.md).