samagotchi 0.55.0 → 0.57.0

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 (88) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +65 -1
  3. data/README.md +1 -1
  4. data/docs/architecture.md +6 -2
  5. data/docs/cli.md +30 -8
  6. data/docs/configuration.md +84 -8
  7. data/docs/hooks.md +2 -2
  8. data/docs/internals/background-tasks.md +1 -1
  9. data/docs/internals/engine.md +14 -0
  10. data/docs/internals/prompt-caching.md +8 -0
  11. data/docs/memory.md +1 -1
  12. data/docs/plugins.md +63 -0
  13. data/docs/sessions.md +1 -1
  14. data/lib/samagotchi/bootstrap/config_writer.rb +2 -0
  15. data/lib/samagotchi/bootstrap/probe.rb +3 -0
  16. data/lib/samagotchi/bootstrap_command.rb +2 -0
  17. data/lib/samagotchi/broadcast_command.rb +2 -0
  18. data/lib/samagotchi/bundles/core/manifest.yml +2 -1
  19. data/lib/samagotchi/bundles/mcp/manifest.yml +2 -2
  20. data/lib/samagotchi/bundles/mcp/plugin.rb +15 -1
  21. data/lib/samagotchi/bundles/slow-commands/manifest.yml +11 -0
  22. data/lib/samagotchi/bundles/slow-commands/plugin.rb +320 -0
  23. data/lib/samagotchi/bundles/system/config_modification_protocol.md +1 -1
  24. data/lib/samagotchi/bundles/system/manifest.yml +3 -3
  25. data/lib/samagotchi/bundles/system/memory_guide.md +1 -1
  26. data/lib/samagotchi/cache_confirm.rb +51 -0
  27. data/lib/samagotchi/client_id.rb +12 -0
  28. data/lib/samagotchi/config.rb +7 -3
  29. data/lib/samagotchi/context_command.rb +2 -0
  30. data/lib/samagotchi/desktop/macos.rb +3 -0
  31. data/lib/samagotchi/engine.rb +102 -8
  32. data/lib/samagotchi/engine_peers.rb +1 -0
  33. data/lib/samagotchi/gem_update.rb +3 -0
  34. data/lib/samagotchi/guardrails/shell_lex.rb +8 -0
  35. data/lib/samagotchi/guardrails/shell_paths.rb +3 -0
  36. data/lib/samagotchi/host_config.rb +6 -3
  37. data/lib/samagotchi/host_registry.rb +19 -3
  38. data/lib/samagotchi/installed_versions.rb +3 -0
  39. data/lib/samagotchi/kernel_loop.rb +99 -16
  40. data/lib/samagotchi/llm/chat_loop.rb +122 -71
  41. data/lib/samagotchi/llm/openai_chat.rb +2 -1
  42. data/lib/samagotchi/llm/stream_drops.rb +63 -0
  43. data/lib/samagotchi/llm/turn_settings.rb +9 -5
  44. data/lib/samagotchi/model_settings.rb +5 -2
  45. data/lib/samagotchi/plugin/context.rb +5 -0
  46. data/lib/samagotchi/reasoning_history.rb +132 -0
  47. data/lib/samagotchi/reasoning_history_command.rb +107 -0
  48. data/lib/samagotchi/redacted_inspect.rb +28 -0
  49. data/lib/samagotchi/self_report.rb +21 -0
  50. data/lib/samagotchi/session.rb +23 -2
  51. data/lib/samagotchi/session_commands.rb +55 -15
  52. data/lib/samagotchi/session_manager.rb +2 -1
  53. data/lib/samagotchi/session_setup.rb +7 -5
  54. data/lib/samagotchi/setting_explained.rb +20 -0
  55. data/lib/samagotchi/terminal_ui/attach_launcher.rb +2 -1
  56. data/lib/samagotchi/terminal_ui/attached_loop.rb +23 -5
  57. data/lib/samagotchi/terminal_ui/formatting.rb +8 -5
  58. data/lib/samagotchi/terminal_ui.rb +13 -6
  59. data/lib/samagotchi/thinking.rb +20 -25
  60. data/lib/samagotchi/thinking_command.rb +33 -11
  61. data/lib/samagotchi/tool_runner.rb +14 -3
  62. data/lib/samagotchi/tools/builtins.rb +6 -2
  63. data/lib/samagotchi/tools/execute.rb +3 -2
  64. data/lib/samagotchi/tools/peers.rb +4 -2
  65. data/lib/samagotchi/tools/task_runtime.rb +2 -1
  66. data/lib/samagotchi/version.rb +1 -1
  67. data/lib/samagotchi/web/app.rb +29 -6
  68. data/lib/samagotchi/web/public/app.js +44 -9
  69. data/lib/samagotchi/web/public/commands.js +36 -3
  70. data/lib/samagotchi/web/public/composer.js +5 -1
  71. data/lib/samagotchi/web/public/index.html +22 -5
  72. data/lib/samagotchi/web/public/info_bar.js +5 -3
  73. data/lib/samagotchi/web/public/level_chip.js +174 -0
  74. data/lib/samagotchi/web/public/model_pick.js +1 -1
  75. data/lib/samagotchi/web/public/question_card.js +5 -3
  76. data/lib/samagotchi/web/public/question_cards.js +21 -1
  77. data/lib/samagotchi/web/public/read_view.js +74 -0
  78. data/lib/samagotchi/web/public/reasoning_history_chip.js +49 -0
  79. data/lib/samagotchi/web/public/ref_scan.js +206 -0
  80. data/lib/samagotchi/web/public/refs.js +19 -10
  81. data/lib/samagotchi/web/public/session_state.js +5 -0
  82. data/lib/samagotchi/web/public/stream_handlers.js +10 -2
  83. data/lib/samagotchi/web/public/thinking_chip.js +33 -138
  84. data/lib/samagotchi/web/public/turn_html.js +4 -2
  85. data/lib/samagotchi/web/public/turn_view.js +5 -3
  86. data/lib/samagotchi/web/token.rb +3 -0
  87. data/lib/samagotchi/worker.rb +17 -5
  88. metadata +13 -1
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: samagotchi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.55.0
4
+ version: 0.57.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Dedov
@@ -203,6 +203,8 @@ files:
203
203
  - lib/samagotchi/bundles/mcp/plugin.rb
204
204
  - lib/samagotchi/bundles/skills/manifest.yml
205
205
  - lib/samagotchi/bundles/skills/plugin.rb
206
+ - lib/samagotchi/bundles/slow-commands/manifest.yml
207
+ - lib/samagotchi/bundles/slow-commands/plugin.rb
206
208
  - lib/samagotchi/bundles/source-links/hooks/source_links.rb
207
209
  - lib/samagotchi/bundles/source-links/manifest.yml
208
210
  - lib/samagotchi/bundles/source-links/source_links.md
@@ -212,6 +214,7 @@ files:
212
214
  - lib/samagotchi/bundles/system/manifest.yml
213
215
  - lib/samagotchi/bundles/system/memory_guide.md
214
216
  - lib/samagotchi/bundles/system/self_map.md
217
+ - lib/samagotchi/cache_confirm.rb
215
218
  - lib/samagotchi/cancellation_controller.rb
216
219
  - lib/samagotchi/child_move.rb
217
220
  - lib/samagotchi/child_reports.rb
@@ -318,6 +321,7 @@ files:
318
321
  - lib/samagotchi/llm/native_tool_normalizer.rb
319
322
  - lib/samagotchi/llm/openai_chat.rb
320
323
  - lib/samagotchi/llm/prompt_cache.rb
324
+ - lib/samagotchi/llm/stream_drops.rb
321
325
  - lib/samagotchi/llm/turn_settings.rb
322
326
  - lib/samagotchi/llm/usage.rb
323
327
  - lib/samagotchi/llm/utf8_scrub.rb
@@ -394,8 +398,11 @@ files:
394
398
  - lib/samagotchi/prompt_warmup.rb
395
399
  - lib/samagotchi/question_desk.rb
396
400
  - lib/samagotchi/queued_command.rb
401
+ - lib/samagotchi/reasoning_history.rb
402
+ - lib/samagotchi/reasoning_history_command.rb
397
403
  - lib/samagotchi/recap_setup.rb
398
404
  - lib/samagotchi/recap_store.rb
405
+ - lib/samagotchi/redacted_inspect.rb
399
406
  - lib/samagotchi/relay.rb
400
407
  - lib/samagotchi/relay_desk.rb
401
408
  - lib/samagotchi/relay_verifier.rb
@@ -420,6 +427,7 @@ files:
420
427
  - lib/samagotchi/session_retention.rb
421
428
  - lib/samagotchi/session_setup.rb
422
429
  - lib/samagotchi/sessions_command.rb
430
+ - lib/samagotchi/setting_explained.rb
423
431
  - lib/samagotchi/steer.rb
424
432
  - lib/samagotchi/steer_cut.rb
425
433
  - lib/samagotchi/system_prompt.rb
@@ -540,6 +548,7 @@ files:
540
548
  - lib/samagotchi/web/public/info_bar.js
541
549
  - lib/samagotchi/web/public/init_row.js
542
550
  - lib/samagotchi/web/public/kept_commands.js
551
+ - lib/samagotchi/web/public/level_chip.js
543
552
  - lib/samagotchi/web/public/lists_view.js
544
553
  - lib/samagotchi/web/public/live_timing.js
545
554
  - lib/samagotchi/web/public/live_turn.js
@@ -551,6 +560,9 @@ files:
551
560
  - lib/samagotchi/web/public/prompt_history.js
552
561
  - lib/samagotchi/web/public/question_card.js
553
562
  - lib/samagotchi/web/public/question_cards.js
563
+ - lib/samagotchi/web/public/read_view.js
564
+ - lib/samagotchi/web/public/reasoning_history_chip.js
565
+ - lib/samagotchi/web/public/ref_scan.js
554
566
  - lib/samagotchi/web/public/refs.js
555
567
  - lib/samagotchi/web/public/restore.js
556
568
  - lib/samagotchi/web/public/route.js