- Remove global workspace (workspace/) — all data migrated to .smallclaw/ - Move ppt/ skins & templates to .smallclaw/skills/presenter/ppt/ - Add .smallclaw/templates/ for user bootstrap files - Move dental_images to .smallclaw/databases/, update 1,485 DB entries - Fix subagent store paths to use SMALLCLAW_DATA_DIR instead of workspace.path - Per-user Telegram bots: MultiUserTelegramManager, vault-stored tokens - Fix Telegram token persistence (vault fallback, strip from config.json) - Fix session migration: delete global originals even when skipping - Delete unused root images, MD docs, tests/, smallclawworkspace/ artifacts - Add meteorologist skill, counselor skill, presenter skill scaffold - Strip workspace.path from config.json (was causing path confusion) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1.2 KiB
1.2 KiB
SELF.md — Technical Self-Knowledge
Stack
- Runtime: Node.js + TypeScript →
dist/vianpm run build - Gateway: Express+WS on
http://127.0.0.1:18789 - Model: Ollama (primary in config.json)
Key Source Files
server-v2.ts → main loop, system prompt, tool routing
session.ts → in-memory + disk session history
task-runner.ts → sliding-context multi-step engine
config.ts → config loader, getConfig() singleton
System Prompt Per Turn
buildPersonalityContext() injection order by mode:
- Autonomous: IDENTITY(600) → SOUL(1500) → USER(1000) → AGENTS(1500)
- First turn: IDENTITY(600) → USER(1000) → AGENTS(1500) (no SOUL)
- Normal chat: IDENTITY(600) → USER(1000) → AGENTS(1500) → SOUL(1500, tool cats only) → [TOOLS] → [SELF](2000, debug only) All truncated to char limits.
Debugging
gateway.err.log→ first place for errorsgateway.log→ stdout with[Tag]prefixes.smallclaw/tasks/<id>.json→ failed task records
Rules
- Edit
src/, neverdist/— rebuild withnpm run build - File tools locked to workspace; use
read_sourceforsrc/ - Context is ~8K tokens total — keep files concise