@oooooooooo/ch0de 0.0.0-stage → 1.9.55

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.
Files changed (96) hide show
  1. package/API-TESTING.md +76 -0
  2. package/DEBTAUR-INTEGRATION.md +71 -0
  3. package/EDITING.md +80 -0
  4. package/EXPERT-PANEL.md +16 -0
  5. package/INTEGRATIONS.md +75 -0
  6. package/LICENSE +21 -0
  7. package/MODELS-DEV-LICENSE +21 -0
  8. package/PROVIDER-CONNECTIONS.md +48 -0
  9. package/PROVIDERS.md +17 -0
  10. package/README.md +523 -2
  11. package/RELIABILITY.md +95 -0
  12. package/UX-1.3.md +83 -0
  13. package/UX-1.4.1.md +13 -0
  14. package/UX-1.4.md +48 -0
  15. package/UX-1.5.md +13 -0
  16. package/UX-1.6.md +7 -0
  17. package/UX-1.7.3.md +13 -0
  18. package/UX-1.7.4.md +13 -0
  19. package/UX-1.7.md +19 -0
  20. package/acceptance-check.js +27 -0
  21. package/agent-budget.js +4 -0
  22. package/api-testing.js +140 -0
  23. package/automatic-re.js +19 -0
  24. package/benchmarks/public-baselines.json +29 -0
  25. package/benchmarks/render-1.4.0.json +8 -0
  26. package/benchmarks/targets.js +11 -0
  27. package/browser-check.js +1062 -0
  28. package/build-progress.js +10 -0
  29. package/build-quality.js +49 -0
  30. package/chode.js +7937 -0
  31. package/debtaur-engine.js +305 -0
  32. package/debtaur-orchestration.js +456 -0
  33. package/debtaur-worker.cjs +76 -0
  34. package/doctor.js +24 -0
  35. package/edit-transactions.js +79 -0
  36. package/elapsed.js +28 -0
  37. package/evidence-ledger.js +26 -0
  38. package/expert-panel.cjs +42 -0
  39. package/helios-ledger.js +405 -0
  40. package/install.cjs +25 -0
  41. package/integrations.js +30 -0
  42. package/json-output.js +8 -0
  43. package/local-memory.js +613 -0
  44. package/local-models.js +52 -0
  45. package/mcp-client.js +50 -0
  46. package/memory.js +511 -0
  47. package/model-catalog.js +46 -0
  48. package/native-tools.js +27 -0
  49. package/nosignups.js +325 -0
  50. package/observation-progress.js +33 -0
  51. package/orchestrator.js +299 -0
  52. package/package.json +158 -6
  53. package/plan-z6.js +490 -0
  54. package/project-memory.js +27 -0
  55. package/provider-capacity.js +13 -0
  56. package/provider-catalog.js +246 -0
  57. package/provider-connect.js +66 -0
  58. package/provider-credentials.js +5 -0
  59. package/provider-directory.js +8 -0
  60. package/provider-directory.json +32300 -0
  61. package/provider-errors.js +11 -0
  62. package/provider-picker.js +188 -0
  63. package/provider-policy.js +4 -0
  64. package/provider-race.js +25 -0
  65. package/provider-request.js +45 -0
  66. package/provider-store.js +13 -0
  67. package/rea-environment.js +5 -0
  68. package/read-window.js +21 -0
  69. package/recovery-context.js +3 -0
  70. package/reliability-memory.js +38 -0
  71. package/reliability-services.js +34 -0
  72. package/reliability-store.js +16 -0
  73. package/request-deadline.js +4 -0
  74. package/serve-frontend.html +172 -0
  75. package/settings-reset.js +11 -0
  76. package/skill-catalog.js +16 -0
  77. package/task-group.js +22 -0
  78. package/terminal-graphics.js +39 -0
  79. package/terminal-logo.js +76 -0
  80. package/terminal-ui.js +79 -0
  81. package/tool-call-validation.js +26 -0
  82. package/tool-health.js +22 -0
  83. package/tool-history.js +5 -0
  84. package/toolbox.js +156 -0
  85. package/tui-provider-picker.js +134 -0
  86. package/tui-worker.js +32 -0
  87. package/web-context.js +232 -0
  88. package/wolfram-math.js +6 -0
  89. package/worker-transport.js +11 -0
  90. package/workspace-commands.js +45 -0
  91. package/workspace-log.js +56 -0
  92. package/workspace-store.js +7 -0
  93. package/workspace-tui.js +113 -0
  94. package/workspace-view.js +109 -0
  95. package/worktrees.js +18 -0
  96. package/z6-integration.js +227 -0
package/README.md CHANGED
@@ -1,3 +1,524 @@
1
- # Temporary Holding Version
1
+ # chode — The Self-Healing AI Coding Harness
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ **Free tiers. HEMO auto-provisioning. Zero lock-in. Never stops.**
4
+
5
+ A Node.js coding CLI that routes requests across 17 providers, inspects referenced public pages, creates requested artifacts, and includes persistent HEMO memory.
6
+
7
+ ---
8
+
9
+ ## Quick Start
10
+
11
+ Requires Node.js 18+, npm, and Git. The installers download the current `master`, install the downloaded package globally, and verify its version. Rerun the same command to update. The npm registry name is not the release channel.
12
+
13
+ Windows PowerShell:
14
+
15
+ ```powershell
16
+ irm https://chode.borken.app/install.ps1 | iex
17
+ ```
18
+
19
+ macOS / Linux:
20
+
21
+ ```sh
22
+ curl -fsSL https://chode.borken.app/install.sh | sh
23
+ ```
24
+
25
+ Then run `chode`. If it is not found, add npm's global command directory to PATH and reopen the terminal. Set `CHODE_INSTALL_PREFIX` before installation to choose another prefix without changing global npm configuration.
26
+
27
+ From source:
28
+
29
+ ```sh
30
+ git clone --depth 1 --branch master https://github.com/fogennnnn/chode.git
31
+ cd chode/chode
32
+ # Install with the verified platform command above before launching.
33
+ ```
34
+
35
+ Use `/connect` for provider setup and `/models` to choose a provider. Never paste credentials into a prompt.
36
+
37
+ ---
38
+
39
+ ## Core Features
40
+
41
+ ### 1. Multi-Provider Routing
42
+ Routes across **16 providers** with automatic failover:
43
+
44
+ | Provider | Category | Quality | Status |
45
+ |----------|----------|---------|--------|
46
+ | **Agnes AI 2.5 Flash** | free_tier | 95 | ✅ Top with key |
47
+ | Groq | free_tier | 92 | ⚠️ Needs key |
48
+ | Google Gemini | free_tier | 94 | ⚠️ Needs key |
49
+ | DeepSeek | free_tier | 89 | ⚠️ Needs key |
50
+ | Cerebras | free_tier | 90 | ⚠️ Needs key |
51
+ | Mistral | free_tier | 88 | ⚠️ Needs key |
52
+ | OpenRouter | free_tier | 85 | ⚠️ Needs key |
53
+ | NVIDIA NIM | free_tier | 86 | ⚠️ Needs key |
54
+ | Cloudflare AI | free_tier | 72 | ⚠️ Needs key |
55
+ | Cohere | free_tier | 80 | ⚠️ Needs key |
56
+ | Ollama | local | 60 | ⚠️ Local install |
57
+ | OVHcloud | keyless | 70 | ✅ Auto-routes, no key |
58
+ | LLM7 | keyless | 65 | ✅ Auto-routes, no key |
59
+ | Anthropic | paid | 100 | ⚠️ Paid key |
60
+ | OpenAI | paid | 95 | ⚠️ Paid key |
61
+
62
+ ### 2. Self-Healing Architecture
63
+ - **Parallel routing**: Tries 3 providers simultaneously
64
+ - **Circuit breaker**: Auto-fails after 3 consecutive failures
65
+ - **Smart retries**: 429s fail over after 1 retry (no 15s burn); network blips back off 1s → 2s → 4s → 8s
66
+ - **Rate limit detection**: 429 handling with auto-wait
67
+ - **DNS checks**: Validates provider endpoints before routing
68
+ - **Auto-heal**: Resets circuit breakers after 5 minutes idle
69
+
70
+ ### 3. HEMO Memory System
71
+ Persistent, sealable memory using [hemo-vault](https://hemo-vault.oooooooooo.se/):
72
+
73
+ ```bash
74
+ # Store memories
75
+ node memory.js store project_chode "Self-healing AI harness"
76
+ node memory.js store decision_provider "Using Agnes AI" --seal
77
+
78
+ # Recall memories
79
+ node memory.js recall project_chode
80
+
81
+ # Verify on-chain seals
82
+ node memory.js verify decision_provider
83
+
84
+ # List all memories
85
+ node memory.js list
86
+
87
+ # Check status
88
+ node memory.js status
89
+ ```
90
+
91
+ **Features:**
92
+ - Persistent across sessions (not lost on restart)
93
+ - Optional on-chain sealing via HELIOS ledger
94
+ - Automatic compression of old conversations
95
+ - Context window management (4K token limit)
96
+ - Private per-agent storage (SHA-256 hashed)
97
+
98
+ ### 4. Subagent Delegation
99
+ Spawn tasks across machines:
100
+
101
+ ```bash
102
+ # Register agents
103
+ node chode.js agents add linux-server --type ssh --host 192.168.1.100 --command bash
104
+ node chode.js agents add windows-dev --type local --command node
105
+ node chode.js agents add mac-dev --type ssh --host 10.0.0.50 --command bash
106
+
107
+ # Run tasks
108
+ node chode.js agents run linux-server "npm test"
109
+ node chode.js agents run windows-dev "build the project"
110
+
111
+ # Check status
112
+ node chode.js agents status
113
+ node chode.js agents list
114
+ node chode.js agents remove <id> # Remove an agent
115
+ ```
116
+
117
+ **Agent types:**
118
+ - `local` — Spawns child process on same machine
119
+ - `ssh` — Executes via SSH to remote server (host keys verified; tasks travel base64, never shell-interpolated)
120
+ - `http` — POSTs to agent REST endpoint (`--tls` switches to https)
121
+
122
+ IDs must match `[a-zA-Z0-9_-]{1,64}`, duplicates are rejected, and
123
+ `ssh`/`http` agents require `--host`. Tokens passed via `--token` are
124
+ visible in shell history — rotate shared ones.
125
+
126
+ ### 5. Production Monitoring
127
+ ```bash
128
+ # Background health monitor
129
+ node chode.js monitor
130
+
131
+ # Cost tracking
132
+ node chode.js costs
133
+
134
+ # System metrics
135
+ node chode.js metrics
136
+
137
+ # Request queue status
138
+ node chode.js queue
139
+ ```
140
+
141
+ ---
142
+
143
+ ## Commands Reference
144
+
145
+ ### AI Commands
146
+ ```bash
147
+ node chode.js ai "your prompt" # Agentic loop with tools + auto-fallback
148
+ node chode.js ai --resume # Resume interrupted session
149
+ node chode.js ai --force agnes "prompt" # Force specific provider
150
+ node chode.js ai @notes.txt "prompt" # Include file contents as context
151
+ node chode.js ai "Recreate https://example.com as HTML" # Inspect public page and save site-copy.html
152
+ node chode.js ai "..." --output page.html # Choose HTML output path; existing files are protected
153
+ node chode.js ai "..." --overwrite --output page.html # Explicitly replace output
154
+ node chode.js ai "..." --no-web # Skip automatic public-page inspection
155
+ node chode.js ai "..." --no-tools # Single answer, no tool loop
156
+ node chode.js ai "..." --verbose # Show provider and page-inspection diagnostics
157
+ node chode.js # Continuous REPL: streams tokens, /session, /tools, /todo
158
+ node chode.js task "do X" # Isolated subagent (own session, max depth 1)
159
+ node chode.js plan "goal" # Read-only plan (inspects, never modifies)
160
+ node chode.js project "build a web app" # Multi-step project orchestration
161
+ node chode.js project --resume <id> # Continue a saved project queue
162
+ ```
163
+
164
+ The model can read, search, write, edit, run workspace commands, track todos,
165
+ fetch pages, search the web and GitHub, and find/install free dev tools by
166
+ itself (`grep`, `glob`, `read`, `write`, `edit`, `exec`, `todo`, `webfetch`,
167
+ `websearch`, `github`, `toolbox`, `ask`, `task` — workspace only, secrets denied.
168
+ `ask` prompts you live in the REPL and auto-picks the default headless.
169
+ Transient provider failures stay quiet unless `--verbose` is passed. Failed
170
+ requests queue locally (`chode pending`) so nothing is lost — the harness
171
+ keeps going on local context instead of dying.
172
+
173
+ ### Health & Discovery
174
+ ```bash
175
+ node chode.js status # Full health dashboard
176
+ node chode.js scan # Probe all providers, build leaderboard
177
+ node chode.js score # Show current rankings
178
+ node chode.js heal # Force full re-scan (clear circuit breakers)
179
+ node chode.js research # Re-probe keyless endpoints, grow overlay
180
+ ```
181
+
182
+ ### Keys & Provisioning
183
+ ```bash
184
+ node chode.js auth # View/set API keys
185
+ node chode.js provision # Auto-request free-tier keys via HEMO mail
186
+ node chode.js quickkey groq # Show signup link for provider
187
+ node chode.js models # List all registered providers
188
+ ```
189
+
190
+ ### Memory System
191
+ ```bash
192
+ node memory.js store <type:id> <value> [--seal] # Store memory
193
+ node memory.js recall <type:id> # Recall memory
194
+ node memory.js list # List all memories
195
+ node memory.js compress <session-id> # Compress old session
196
+ node memory.js context <session-id> # Build context window
197
+ node memory.js seal <type:id> # Seal memory on-chain
198
+ node memory.js verify <type:id> # Verify seal provenance
199
+ node memory.js status # Show memory stats
200
+ ```
201
+
202
+ ### Agent System
203
+ ```bash
204
+ node chode.js agents list # List registered agents
205
+ node chode.js agents add <id> --type <local|ssh|http> [flags]
206
+ node chode.js agents run <agent-id> "task" # Dispatch task
207
+ node chode.js agents status [task-id] # Check task status
208
+ node chode.js skills [list|install] # List or verify local skills
209
+ ```
210
+
211
+ ### Monitoring
212
+ ```bash
213
+ node chode.js monitor # Start background health monitor
214
+ node chode.js costs # Show cost tracking report
215
+ node chode.js metrics # Export system metrics
216
+ node chode.js queue # Show request queue status
217
+ ```
218
+
219
+ ### Project, local tools & setup
220
+ ```bash
221
+ node chode.js new <name> [--skill] # Scaffold a Worker or HEMO skill
222
+ node chode.js deps [check|install] # Check/install Wrangler
223
+ node chode.js session [list|show|reset]
224
+ node chode.js init # Create local state and setup guidance
225
+ node chode.js update # Check for a newer release
226
+ node chode.js tool <grep|glob|read|edit>
227
+ node chode.js util <b64|hash|jwt|json|url|uuid|tokens|mermaid>
228
+ node chode.js nosignups # Show no-signup tools
229
+ node chode.js helios-record [--dry-run|--live]
230
+ node chode.js help
231
+ ```
232
+
233
+ ### Security
234
+ ```bash
235
+ node chode.js audit [path] # Secrets + dangerous patterns + AI review
236
+ node chode.js audit [path] --no-ai # Deterministic report only
237
+ ```
238
+
239
+ ---
240
+
241
+ ## Getting API Keys
242
+
243
+ ### Fastest Path (Recommended)
244
+ ```bash
245
+ node chode.js quickkey groq
246
+ # Opens: https://console.groq.com/keys
247
+ # Sign up with Google (30 seconds, no credit card)
248
+ # Paste key: node chode.js auth groq [your-key]
249
+ ```
250
+
251
+ ### All Free Tier Options
252
+ | Provider | Signup | Free Tier |
253
+ |----------|--------|-----------|
254
+ | Groq | https://console.groq.com/keys | 14,400 req/day |
255
+ | Google Gemini | https://aistudio.google.com/app/apikey | 1,500 req/day |
256
+ | DeepSeek | https://platform.deepseek.com/ | Generous free |
257
+ | Cerebras | https://cloud.cerebras.ai/ | 1M tokens/day |
258
+ | Mistral | https://console.mistral.ai/ | 1B tokens/month |
259
+ | OpenRouter | https://openrouter.ai/keys | 50 req/day |
260
+ | NVIDIA NIM | https://build.nvidia.com/ | 40 req/min |
261
+ | Cloudflare AI | https://dash.cloudflare.com/ai | 10K neurons/day |
262
+ | Cohere | https://dashboard.cohere.com/ | Non-commercial |
263
+
264
+ ### Environment Variables
265
+ ```bash
266
+ export GROQ_API_KEY=sk-...
267
+ export GEMINI_API_KEY=...
268
+ export DEEPSEEK_API_KEY=...
269
+ export ANTHROPIC_API_KEY=...
270
+ export CHODE_KEY=... # Agnes AI key
271
+ ```
272
+
273
+ ---
274
+
275
+ ## Utilities & Browser Skills
276
+
277
+ Deterministic offline helpers (results on stdout, no quota, no keys):
278
+
279
+ ```bash
280
+ node chode.js util b64 encode|decode <text|@file>
281
+ node chode.js util hash md5|sha1|sha256|sha512 <text|@file>
282
+ node chode.js util jwt decode <token>
283
+ node chode.js util json pretty|minify <file|->
284
+ node chode.js util url encode|decode <text>
285
+ node chode.js util uuid
286
+ node chode.js util tokens estimate <text|@file> # heuristic: chars/4
287
+ node chode.js util mermaid render <file.mmd> [--out out.svg] # via kroki.io
288
+ ```
289
+
290
+ Curated no-signup browser tools (links only, nothing automated):
291
+
292
+ ```bash
293
+ node chode.js skills web
294
+ ```
295
+
296
+ Image/OCR: Squoosh, ClearCanvas AI, Stirling-PDF, BentoPDF · Dev: Hoppscotch, CyberChef, JSON Crack, HappyFormatter, HappyTokenizer, SQLChef, GitReverse · Diagrams: Mermaid Live, Kroki, Excalidraw, draw.io, Markmap · Local LLM: WebLLM, Forge · Transfer: PairDrop, LocalSend-Web
297
+
298
+ ## Architecture
299
+
300
+ ```
301
+ chode.js (CLI, zero runtime dependencies)
302
+ ├── web-context.js (safe public-page inspection + sanitization)
303
+ ├── Provider Registry (16 providers)
304
+ ├── Health Scanner (live probes every 30s)
305
+ ├── Leaderboard (weighted scoring: quality×35% + reliability×30% + latency×20% + recency×15%)
306
+ ├── Circuit Breaker (auto-failover on 3 failures)
307
+ ├── Parallel Router (3 providers simultaneously)
308
+ ├── Agent Tool Loop (13 tools incl. todo/web/github/toolbox/ask/task; orchestrator unbounded, subagents max 8 steps; stagnation breakers file PARTIAL)
309
+ ├── Isolated subagents (`task`: fresh session, bounded, no nesting) + read-only `plan`
310
+ ├── Token streaming (SSE with buffered fallback, tool blocks filtered live)
311
+ ├── Live markdown (per-line styled stream, pipes stay raw)
312
+ ├── Session todos (per-session plans, default stays legacy)
313
+ ├── Health prediction (15m error window feeds score/status)
314
+ ├── Pickers (bare /session and /retry open numbered selection)
315
+ ├── Toolbox (curated free tools + GitHub search, verified installers only)
316
+ ├── Pending queue (failed requests survive outages, /retry re-runs them)
317
+ ├── Rate Limit Tracker (429 detection)
318
+ ├── Request Queue (burst handling, max 100)
319
+ ├── Cost Tracker (per-provider, daily)
320
+ ├── HEMO Vault (persistent memory)
321
+ ├── HELIOS Provenance (on-chain sealing)
322
+ ├── Subagent System (local/SSH/HTTP)
323
+ └── Checkpoint Recovery (crash-resume)
324
+ ```
325
+
326
+ ---
327
+
328
+ ## Income Idea MVPs
329
+
330
+ Three business ideas tested and ready to build:
331
+
332
+ ### 1. Memory Lens — AI Photo Restoration
333
+ - Upload old/damaged photos
334
+ - AI restores colors, fixes scratches
335
+ - Generates stories from photo context
336
+ - Monetization: $5-20/photo, $29/mo subscription
337
+
338
+ ### 2. Retro Revival — AI Nostalgia Merch
339
+ - AI generates vintage-style designs
340
+ - Print-on-demand fulfillment
341
+ - Monetization: $15-40 profit/item
342
+
343
+ ### 3. Dream Decoder — Sleep Story Generator
344
+ - Voice-record dreams
345
+ - AI transcribes and interprets
346
+ - Generates personalized bedtime stories
347
+ - Monetization: $9.99/mo subscription
348
+
349
+ All three have complete test suites in `tests/`:
350
+ - `memory-lens.test.js` — 5/5 PASS
351
+ - `retro-revival.test.js` — 6/6 PASS
352
+ - `dream-decoder.test.js` — 7/7 PASS
353
+
354
+ ---
355
+
356
+ ## HEMO Ecosystem Integration
357
+
358
+ chode integrates with the HEMO agent economy:
359
+
360
+ | Service | URL | Purpose |
361
+ |---------|-----|---------|
362
+ | **HELIOS** | https://ai.oooooooooo.se | Agent identity & provenance ledger |
363
+ | **Vault** | https://hemo-vault.oooooooooo.se | Persistent agent memory |
364
+ | **MCP Gateway** | https://mcp-hemo.oooooooooo.se | Connect to Claude/Cursor/Hermes |
365
+ | **Jobs** | https://hemo-jobs.oooooooooo.se | Paid agent work marketplace |
366
+ | **Registry** | https://hemo-registry.oooooooooo.se | Verified agent directory |
367
+ | **Court** | https://hemo-court.oooooooooo.se | Staked arbitration |
368
+ | **Consensus** | https://hemo-consensus.oooooooooo.se | Reputation-weighted truth |
369
+ | **Mail** | https://hemo-mail.oooooooooo.se | Agent email |
370
+
371
+ ### Getting HEMO Identity
372
+ ```bash
373
+ # AUTO: First run creates identity
374
+ node memory.js status
375
+
376
+ # MANUAL: Create at https://ai.oooooooooo.se
377
+ POST https://ai.oooooooooo.se/api/v1/accounts
378
+ Body: {"username": "your-agent-name"}
379
+ Response: {"token": "your-bearer-token"}
380
+ ```
381
+
382
+ ---
383
+
384
+ ## Testing
385
+
386
+ ```bash
387
+ # Run all tests
388
+ npm test
389
+
390
+ # Or run individually
391
+ node tests/memory-lens.test.js
392
+ node tests/retro-revival.test.js
393
+ node tests/dream-decoder.test.js
394
+ node tests/web-context.test.js
395
+ node tests/agent-workflow.test.js
396
+ node tests/agent-loop.test.js
397
+ node tests/toolbox.test.js
398
+ node tests/interactive-tools.test.js
399
+ node tests/streaming.test.js
400
+ node tests/repl-ux.test.js
401
+ node tests/live-ux.test.js
402
+ node tests/sessions-health.test.js
403
+ node tests/ask-tool.test.js
404
+ node tests/no-pollinations.test.js
405
+ node tests/polish-audit.test.js
406
+ node tests/polish-round2.test.js
407
+ node tests/repl-pipe.test.js
408
+ node tests/polish-round3.test.js
409
+ node tests/polish-round4.test.js
410
+ node tests/subagents.test.js
411
+ node tests/plan.test.js
412
+ node tests/frontend-copy.test.js
413
+
414
+ # Syntax check
415
+ node --check chode.js
416
+ node --check memory.js
417
+ ```
418
+
419
+ ---
420
+
421
+ ## Troubleshooting
422
+
423
+ ### "All providers exhausted"
424
+ ```bash
425
+ # Check status
426
+ node chode.js status
427
+
428
+ # Scan providers
429
+ node chode.js scan
430
+
431
+ # Add a key
432
+ node chode.js quickkey groq
433
+ node chode.js auth groq [your-key]
434
+ ```
435
+
436
+ ### "DNS failed" errors
437
+ Provider endpoint may be down. Run `chode.js heal` to clear cached DNS.
438
+
439
+ ### Rate limited (429)
440
+ Auto-waits and retries. Check `node chode.js metrics` for rate limit stats.
441
+
442
+ ### Memory not persisting
443
+ ```bash
444
+ node memory.js status
445
+ # Check if HEMO identity exists
446
+ # If missing, create: POST https://ai.oooooooooo.se/api/v1/accounts
447
+ ```
448
+
449
+ ---
450
+
451
+ ## License
452
+
453
+ MIT — Robert Fogeborg 2026
454
+
455
+ ---
456
+
457
+ ## Links
458
+
459
+ - **Repository**: https://github.com/fogennnnn/chode
460
+ - **Issues**: https://github.com/fogennnnn/chode/issues
461
+ - **HEMO Docs**: https://mcp-hemo.oooooooooo.se/llms.txt
462
+ - **Vault Docs**: https://hemo-vault.oooooooooo.se/llms.txt
463
+
464
+ The official installers refuse releases below the security floor, mismatched release versions, and altered runtime checksums. Saved provider overlays cannot re-enable retired providers. Old source checkouts and historical GitHub revisions are not verified installations. If the command still reports an unexpected version, inspect `Get-Command chode -All` on PowerShell or `type -a chode` on POSIX shells; do not assume a successful install changed an existing alias or PATH order.
465
+
466
+ ### Website completion checks
467
+
468
+ Full and multi-page website requests run in the agent workspace. Chode retains the original brief across tool turns, checks requested pages and local links/assets, runs a configured production build, and repairs failed checks. Single-file website builds receive an independent review against the brief. See [website completion in 1.7.3](UX-1.7.3.md) for checks and limitations.
469
+
470
+ ### Free provider resilience
471
+
472
+ Run `chode ai "Build the complete website ..." --free`, or use `/free on` in the TUI. This restricts routing to keyless/local providers, preserves incremental build progress, honors provider cooldowns, and permits up to three automatic resumes while the TUI stays open. Ctrl+C cancels waiting. Use the same prompt/session to resume a saved CLI build; add `--fresh` to ignore its checkpoint. Provider availability still limits completion. See [free-provider resilience](UX-1.7.4.md).
473
+
474
+ ### Startup fix for 1.7.4
475
+
476
+ If `chode` exits with `TypeError: require(...).defaultFreeMode is not a function`, rerun the verified installer to upgrade to 1.7.5 or later. The release fixes interactive startup and adds packaged Linux terminal checks.
477
+
478
+ ### Worker recovery in 1.7.6
479
+
480
+ Unexpected worker exits now save a retryable task and redacted diagnostics under `.chode/worker-crashes/`, preserve generated files and checkpoints, and attempt one bounded recovery. The composer remains usable after repeated failures. Completed results are persisted before IPC delivery and recovered if delivery is interrupted. UI transport batches streaming text and omits large tool file contents that the UI does not display.
481
+
482
+ ### Provider setup (1.8.0)
483
+
484
+ Run `chode connect` or `/connect` inside the workspace. Choose a provider, paste a hidden API key, discover or enter a model, optionally test the connection, then save or select it. `/connect custom` adds an OpenAI-compatible HTTPS endpoint or a local HTTP server. OpenRouter offers browser login with PKCE; paste the single-use code after approving access. Other providers use their supported API keys. Esc or Ctrl+C cancels without saving. Keys stay out of chat, history and conversation exports; local config files use owner-only permissions on systems that enforce POSIX modes. Keys remain unencrypted on disk. A connection test sends a small request and can consume provider credits. Saving and selecting a keyed provider explicitly leaves strict keyless free mode.
485
+
486
+ Builds have no fixed wall-clock limit by default in 1.8.0. A ten-minute inactivity watchdog saves stalled work; model output and tool events reset it, heartbeats do not, and questions pause it. `/timeout <seconds>` sets an optional limit; `/timeout off` removes it. Per-call timeouts and bounded model/tool work windows remain to control hung requests and repeated failures.
487
+
488
+ ### Build reliability (1.8.1)
489
+
490
+ Build and review requests use isolated model contexts instead of replaying internal transcripts. Verification tracks the actual repair author. Planned CommonJS/ESM files must exist. Background commands are checked against their real exit code and can be inspected with the `jobs` tool; a launch is not a passing check. Active model streams use an inactivity timer and release their connections on completion. A cooling provider does not delay other ready free providers.
491
+ Repeated failed tool calls trigger a bounded provider change within the current run. Verification excludes all implementation authors, including authors restored from saved progress.
492
+
493
+ ### Completion and honest certification
494
+
495
+ A successful build does not stop at the first plausible answer. One-shot AI builds run bounded completion rounds, share their model budget, wait out short capacity windows, preserve saved work and only report success when the local completion gate passes. Planning, checking and repair stages are narrated in plain language.
496
+
497
+ Independent review is used whenever a genuinely different reviewer is available. If no independent reviewer can be reached, or the only reviewer authored the work, Chode runs its deterministic checks and labels the result as locally verified rather than pretending an external review happened. A real `FAILED` check still fails the run and triggers repair; local certification is never used to hide a failed test.
498
+
499
+ ### Retained build context (1.8.2)
500
+
501
+ Build turns retain up to 18 KB of already-returned tool observations (at most 12 results), with credential-file exclusions and known-secret redaction. No extra files are read to construct this context. Earlier observations are marked as potentially stale after edits, and verifiers remain isolated from internal build transcripts. Free-mode turns are prompted to prioritize complete useful implementation over interim narration or placeholders.
502
+
503
+ ### Grouped edits and undo
504
+
505
+ Use chode edits preview changes.json, chode edits apply changes.json, and chode undo for persistent grouped edits. See [EDITING.md](EDITING.md) and [handoff.md](handoff.md).
506
+
507
+ ## Native skills and MCP
508
+
509
+ Use `chode integrations list` to discover native integration presets, and `chode integrations setup cloudflare --global` followed by `chode mcp auth cloudflare` to connect Cloudflare to Chode. Shared Agent Skills are discovered automatically. See [INTEGRATIONS.md](INTEGRATIONS.md) for setup, authentication, trust and current limitations.
510
+
511
+ ## Provider discovery
512
+
513
+ Use `chode providers <search>` or `/providers <search>` to browse the compatible connection catalog. `/connect` supports search and numbered pages. See [PROVIDER-CONNECTIONS.md](PROVIDER-CONNECTIONS.md) for free-account distinctions, shared credentials, Agnes quota diagnostics and the test coverage. Catalog entries are not a live-vendor reliability score.
514
+
515
+ ### YOLO mode
516
+
517
+ `chode --yolo` starts the TUI with automatic approvals. Inside the TUI use `/yolo on` or `/yolo off`; the header displays YOLO while enabled. For unattended builds use `chode ai "your task" --yolo`; `CHODE_YOLO=1` also enables it, and `--no-yolo` overrides that environment setting for a build. YOLO grants Chode’s askable command, external-path and MCP approvals automatically. Plan/read-only, credential, acceptance-test and malformed-tool protections remain. Session toggles are not saved across restarts. This does not change host/OS permissions.
518
+
519
+
520
+ ### Debtaur orchestration evidence
521
+
522
+ Chode can use a separately installed, pinned standalone Debtaur WASM judge for worker ownership, handoff and current verification evidence. It makes no extra model calls and does not require Cone. The private engine is not bundled with the public installer. Run `chode debtaur status`; install an authorized local runtime with `chode debtaur setup <wasm-directory>`.
523
+
524
+ [Integration architecture, protocol, lifecycle, limits and maintenance tests](DEBTAUR-INTEGRATION.md). An unavailable judge is never reported as native approval; normal local verification remains available.
package/RELIABILITY.md ADDED
@@ -0,0 +1,95 @@
1
+ # Debtaur + Helios workflow memory
2
+
3
+ Enable once in each workspace:
4
+
5
+ ```sh
6
+ chode reliability enable
7
+ chode reliability status
8
+ ```
9
+
10
+ Enable checks Debtaur's positive and negative policy cases, pins Helios's public
11
+ Ed25519 key, and reuses the workspace's Helios identity. If none exists, it creates
12
+ one and saves its token through Chode's private credential store. Tokens never
13
+ appear in status output or memory. A changed signing key requires explicit review;
14
+ it is not silently trusted. Existing provider settings are preserved.
15
+
16
+ The Helios site at `helios.oooooooooo.se` is the landing page. The documented API
17
+ origin is `https://ai.oooooooooo.se` (the landing host returns HTML for API paths).
18
+ Debtaur's current WASM judge is `https://ooooo.fogeboro.workers.dev/api/judge`.
19
+ These contracts were exercised against both live services on 2026-10-22.
20
+
21
+ ## What happens automatically
22
+
23
+ 1. A VERIFIED Chode agent build archives its changed-file hashes, hashes of
24
+ successful completed checks, and eligible already-observed source excerpts.
25
+ Failed, pending and unverified builds never become verified memory.
26
+ 2. Records are canonical JSON addressed by SHA-256. Repeating identical evidence
27
+ produces the same ID. Up to 1,024 records of at most 64 KB each are retained,
28
+ separately from the existing 20-run project-memory summary. The archive does
29
+ not silently evict older records when full.
30
+ 3. Helios receives only an opaque project digest, record digest, schema and policy
31
+ version. Source, paths, prompts and command text stay local. Stable idempotency
32
+ keys prevent duplicate ledger leaves when a write is retried.
33
+ 4. Chode fetches the stored record and proof, verifies the signature locally with
34
+ its pinned public key, verifies Merkle directions/hashes/index/depth, and
35
+ compares the proof root with a separately fetched HTTPS tree-root snapshot.
36
+ One bounded proof reread handles concurrent tree growth; POST is not repeated
37
+ in that attempt. This is issuer-signed integrity plus an observed ledger root,
38
+ not a claim that the server's root itself carries an independent signature.
39
+ 5. On a later build, deterministic lexical ranking selects at most eight relevant
40
+ records from at most 32 candidates. Files are checked against current hashes
41
+ before every model turn (maximum 8 MB of file hashing per recall). Changed,
42
+ missing, linked, foreign or invalid records are omitted. Ties use record IDs.
43
+ 6. Debtaur's controlled-language policy derives `this memory is reusable` from
44
+ `all grounded are reusable` and a locally established grounding premise. The
45
+ model never supplies that premise. Only the direct WASM verdict is used;
46
+ generated candidates and prose are ignored. The same validated selection
47
+ reuses its proof within the build, avoiding a network call on every turn.
48
+ 7. Recall requires a valid Helios anchor by default. No more than 5 KB of selected
49
+ summaries/excerpts enters the prompt, labelled untrusted historical evidence.
50
+ It never goes to the independent verifier as author guidance. Stored memory
51
+ capacity increases; the model's context window is not enlarged.
52
+
53
+ ## Controls and failure handling
54
+
55
+ ```sh
56
+ chode reliability sync # attempt at most five pending hash-only anchors
57
+ chode reliability disable # stop recall/capture; preserve stored records
58
+ chode reliability connect # configure/reuse an identity without enabling recall
59
+ chode reliability clear # erase generated local records and receipts
60
+ chode memory clear # clear legacy project memory and the new archive
61
+ chode ai "your task" --no-memory
62
+ ```
63
+
64
+ Enable with `--allow-unanchored` only when local hash-checked history is desired
65
+ without a required Helios anchor. Status identifies this mode. Normal enable
66
+ requires anchored recall. The full `--no-memory` opt-out bypasses integration
67
+ reads, capture and service requests. The feature is opt-in per workspace;
68
+ benchmark adapters that use noMemory keep their original behavior.
69
+
70
+ Unavailable services omit recalled history or leave anchors queued, rather than
71
+ blocking the build or inventing verification. Requests include body deadlines,
72
+ response limits and cancellation. Retry-After is persisted per service across builds and client instances, including waits longer than one minute. There is no rapid retry loop on 429. Retrying
73
+ `sync` keeps the same idempotency key. A corrupt archive or active lock is preserved
74
+ for inspection. Stale locks are recovered only when their recorded process no
75
+ longer exists. Clear only removes recognized generated files after preflight;
76
+ it does not delete source files, credentials, settings or public ledger hashes.
77
+
78
+ Archive files and credentials use private file modes. Workspace escape, linked
79
+ paths, hardlinked files, credential paths and oversized inputs are excluded.
80
+ Only already-returned source excerpts whose full-file hash still matches can be
81
+ retained; Chode does not scan unrelated source files to populate memory.
82
+
83
+ ## Reliability and determinism boundaries
84
+
85
+ The archive addresses, ranking, file validation and proof checks are deterministic.
86
+ Helios proves that the anchored bytes are intact; Debtaur enforces a recall policy.
87
+ Neither proves arbitrary software correct or turns a model claim into evidence.
88
+ Current tests, protected acceptance checks, tool permissions, independent review,
89
+ provider limits and model-call budgets remain necessary. A pinned provider/model
90
+ and fixed evaluation protocol are still needed for reproducible model comparisons.
91
+ No benchmark accuracy improvement is claimed from these integration tests.
92
+
93
+ Run `node tests/reliability-memory.test.js` and `node tests/reliability-boundaries.test.js` for local HTTP, real cryptography and
94
+ actual Chode agent-loop tests. The separate live probe uses synthetic content and
95
+ hash-only metadata, not a public coding benchmark or an autonomous build score.