Skip to content

v0.5.0 — replay-safe compaction, ask_question, channel generator, adapter rebind

Choose a tag to compare

@danielstpaul danielstpaul released this 25 Jul 23:44
2ba3b85

Two new loop primitives, both built as exactly-once effects, plus the adapter rebound onto RubyLLM's public single-turn seam.

Added

  • Replay-safe context compaction — long sessions no longer fail at the context window. Prior turns summarise into a CAS-claimed silas_compactions row that MessageBuilder reads deterministically: same rows, same bytes, compacted or not. config.compact_at (fraction of the model's registry window, absolute tokens for custom adapters, or nil to disable).
  • ask_question — the agent parks at zero compute to ask the operator something; the free-text answer becomes the tool result it resumes with. Inbox question card, POST /silas/api/v1/approvals/:id/answer, TTL expiry, config.ask_question escape hatch. ⚠️ Adding a builtin changes the definitions digest — settle parked turns before upgrading (details in the CHANGELOG).
  • rails g silas:channel <name> — scaffolds both halves of a transport (signature-verifying webhook controller + outbound Channel) with the security decisions pre-made. Silas::Webhook.verify_hmac, Silas::Channel.approval_url, and docs/channels.md with a worked WhatsApp example.
  • Per-agent schedulesapp/agents/<name>/schedules/ ticks start that agent, never the root.

Changed

  • The :ruby_llm adapter binds to the public Provider#complete instead of aborting Chat#complete's loop from the inside — Tool::Halt is gone from the codebase, removing the largest RubyLLM 2.0 exposure.

Removed

  • The broken demo/ cp-kits; examples/playground is the example.

Verification — 430 specs green on SQLite + Postgres (93.4% coverage); chaos matrix re-run in full: 295 kill/deploy cycles, zero duplicate side effects, byte-identical replay, including a new compact mode that kills mid-summarisation and asserts exactly-once compaction claims and byte-identical message rebuilds (chaos_host/RESULTS.md). Real-API smoke + playground evals green.