chainlesschain 0.40.2 → 0.40.3
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 +22 -15
- package/package.json +1 -1
- package/src/lib/agent-core.js +861 -0
- package/src/lib/chat-core.js +177 -0
- package/src/lib/interaction-adapter.js +177 -0
- package/src/lib/interactive-planner.js +524 -0
- package/src/lib/llm-providers.js +9 -1
- package/src/lib/slot-filler.js +465 -0
- package/src/lib/task-model-selector.js +5 -5
- package/src/lib/ws-agent-handler.js +403 -0
- package/src/lib/ws-chat-handler.js +145 -0
- package/src/lib/ws-server.js +280 -1
- package/src/lib/ws-session-manager.js +363 -0
- package/src/repl/agent-repl.js +159 -11
package/README.md
CHANGED
|
@@ -142,7 +142,7 @@ chainlesschain note revert <id> <ver> # Revert to a version
|
|
|
142
142
|
Start an interactive AI chat session with streaming output.
|
|
143
143
|
|
|
144
144
|
```bash
|
|
145
|
-
chainlesschain chat # Default: Ollama qwen2:7b
|
|
145
|
+
chainlesschain chat # Default: Ollama qwen2.5:7b
|
|
146
146
|
chainlesschain chat --model llama3 # Use different model
|
|
147
147
|
chainlesschain chat --provider openai --api-key sk-...
|
|
148
148
|
chainlesschain chat --agent # Agentic mode (can read/write files)
|
|
@@ -179,12 +179,14 @@ chainlesschain llm switch <name> # Switch active provider
|
|
|
179
179
|
Start an agentic AI session — the AI can read/write files, run shell commands, search the codebase, and invoke 138 built-in skills.
|
|
180
180
|
|
|
181
181
|
```bash
|
|
182
|
-
chainlesschain agent # Default: Ollama qwen2:7b
|
|
182
|
+
chainlesschain agent # Default: Ollama qwen2.5:7b
|
|
183
183
|
chainlesschain a --model llama3 # Short alias
|
|
184
184
|
chainlesschain agent --provider openai --api-key sk-...
|
|
185
185
|
```
|
|
186
186
|
|
|
187
|
-
Built-in tools: `read_file`, `write_file`, `edit_file`, `run_shell`, `search_files`, `list_dir`, `run_skill`, `list_skills`
|
|
187
|
+
Built-in tools: `read_file`, `write_file`, `edit_file`, `run_shell`, `search_files`, `list_dir`, `run_skill`, `list_skills`, `run_code`
|
|
188
|
+
|
|
189
|
+
Agent slash commands: `/plan` (plan mode), `/plan interactive <request>` (LLM-driven planning with skill recommendations), `/model`, `/provider`, `/clear`, `/compact`, `/task`, `/session`, `/stats`, `/auto` (autonomous agent), `/cowork` (multi-agent collaboration)
|
|
188
190
|
|
|
189
191
|
### `chainlesschain skill <action>`
|
|
190
192
|
|
|
@@ -826,8 +828,11 @@ chainlesschain serve # Start WebSocket server
|
|
|
826
828
|
chainlesschain serve --port 9000 # Custom port
|
|
827
829
|
chainlesschain serve --token <secret> # Enable token auth
|
|
828
830
|
chainlesschain serve --allow-remote --token <secret> # Allow remote + auth
|
|
831
|
+
chainlesschain serve --project /path/to/project # Default project root for sessions
|
|
829
832
|
```
|
|
830
833
|
|
|
834
|
+
**Session Protocol** (v0.41.0): WebSocket clients can create stateful agent/chat sessions via `session-create`, send messages via `session-message`, resume previous sessions via `session-resume`, and manage sessions via `session-list`/`session-close`. Supports `slash-command` for in-session commands and `session-answer` for interactive Q&A (SlotFiller/Planner).
|
|
835
|
+
|
|
831
836
|
---
|
|
832
837
|
|
|
833
838
|
## Global Options
|
|
@@ -854,7 +859,7 @@ Configuration is stored at `~/.chainlesschain/config.json`. The CLI creates and
|
|
|
854
859
|
"provider": "ollama",
|
|
855
860
|
"apiKey": null,
|
|
856
861
|
"baseUrl": "http://localhost:11434",
|
|
857
|
-
"model": "qwen2:7b"
|
|
862
|
+
"model": "qwen2.5:7b"
|
|
858
863
|
},
|
|
859
864
|
"enterprise": {
|
|
860
865
|
"serverUrl": null,
|
|
@@ -876,7 +881,7 @@ Configuration is stored at `~/.chainlesschain/config.json`. The CLI creates and
|
|
|
876
881
|
|
|
877
882
|
| Provider | Default Model | API Key Required |
|
|
878
883
|
| ---------------------- | ----------------- | ---------------- |
|
|
879
|
-
| Ollama (Local) | qwen2:7b
|
|
884
|
+
| Ollama (Local) | qwen2.5:7b | No |
|
|
880
885
|
| OpenAI | gpt-4o | Yes |
|
|
881
886
|
| Anthropic | claude-sonnet-4-6 | Yes |
|
|
882
887
|
| DashScope (Alibaba) | qwen-max | Yes |
|
|
@@ -903,7 +908,7 @@ Configuration is stored at `~/.chainlesschain/config.json`. The CLI creates and
|
|
|
903
908
|
```bash
|
|
904
909
|
cd packages/cli
|
|
905
910
|
npm install
|
|
906
|
-
npm test # Run all tests (
|
|
911
|
+
npm test # Run all tests (2432 tests across 109 files)
|
|
907
912
|
npm run test:unit # Unit tests only
|
|
908
913
|
npm run test:integration # Integration tests
|
|
909
914
|
npm run test:e2e # End-to-end tests
|
|
@@ -911,15 +916,17 @@ npm run test:e2e # End-to-end tests
|
|
|
911
916
|
|
|
912
917
|
### Test Coverage
|
|
913
918
|
|
|
914
|
-
| Category | Files
|
|
915
|
-
| ------------------------ |
|
|
916
|
-
| Unit — lib modules | 56
|
|
917
|
-
| Unit — commands | 15
|
|
918
|
-
| Unit — runtime | 1
|
|
919
|
-
| Integration | 5
|
|
920
|
-
| E2E | 14
|
|
921
|
-
| Core packages (external) | —
|
|
922
|
-
|
|
|
919
|
+
| Category | Files | Tests | Status |
|
|
920
|
+
| ------------------------ | ------- | -------- | --------------- |
|
|
921
|
+
| Unit — lib modules | 56 | 1200+ | All passing |
|
|
922
|
+
| Unit — commands | 15 | 350+ | All passing |
|
|
923
|
+
| Unit — runtime | 1 | 6 | All passing |
|
|
924
|
+
| Integration | 5 | 30+ | All passing |
|
|
925
|
+
| E2E | 14 | 150+ | All passing |
|
|
926
|
+
| Core packages (external) | — | 118 | All passing |
|
|
927
|
+
| Unit — WS sessions | 9 | 156 | All passing |
|
|
928
|
+
| Integration — WS session | 1 | 12 | All passing |
|
|
929
|
+
| **CLI Total** | **109** | **2432** | **All passing** |
|
|
923
930
|
|
|
924
931
|
## License
|
|
925
932
|
|