samagotchi 0.52.0 → 0.54.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 (74) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +58 -1
  3. data/README.md +1 -1
  4. data/docs/architecture.md +94 -54
  5. data/docs/configuration.md +1 -2
  6. data/docs/context.md +104 -9
  7. data/docs/internals/background-tasks.md +1 -1
  8. data/docs/internals/bundles.md +73 -0
  9. data/docs/internals/context-telemetry.md +8 -5
  10. data/docs/internals/engine.md +16 -7
  11. data/docs/internals/tool-guardrails.md +8 -6
  12. data/docs/plugins.md +2 -1
  13. data/docs/releasing.md +6 -3
  14. data/docs/sessions.md +1 -1
  15. data/docs/testing.md +5 -3
  16. data/lib/samagotchi/analytics_file.rb +35 -0
  17. data/lib/samagotchi/bridge/turn_accumulator.rb +2 -0
  18. data/lib/samagotchi/bundle_command.rb +35 -44
  19. data/lib/samagotchi/bundle_needs.rb +4 -5
  20. data/lib/samagotchi/bundles/skills/manifest.yml +2 -2
  21. data/lib/samagotchi/bundles/skills/plugin.rb +2 -1
  22. data/lib/samagotchi/bundles/system/config_modification_protocol.md +1 -1
  23. data/lib/samagotchi/bundles/system/manifest.yml +2 -2
  24. data/lib/samagotchi/child_move.rb +6 -4
  25. data/lib/samagotchi/config.rb +0 -1
  26. data/lib/samagotchi/context_command.rb +1 -1
  27. data/lib/samagotchi/context_providers.rb +11 -14
  28. data/lib/samagotchi/context_status.rb +10 -18
  29. data/lib/samagotchi/engine.rb +132 -135
  30. data/lib/samagotchi/extension_load.rb +102 -0
  31. data/lib/samagotchi/guardrail_wiring.rb +16 -16
  32. data/lib/samagotchi/hooks/bundle_loader.rb +9 -8
  33. data/lib/samagotchi/host_registry.rb +13 -0
  34. data/lib/samagotchi/kernel_loop.rb +5 -3
  35. data/lib/samagotchi/llm/chat_loop.rb +5 -4
  36. data/lib/samagotchi/memory_bundle/asset_installer.rb +302 -0
  37. data/lib/samagotchi/memory_bundle/builder.rb +184 -190
  38. data/lib/samagotchi/memory_bundle/bundle_hook.rb +51 -0
  39. data/lib/samagotchi/memory_bundle/installed_bundle.rb +90 -0
  40. data/lib/samagotchi/memory_bundle/installer.rb +252 -488
  41. data/lib/samagotchi/memory_bundle/listing.rb +6 -6
  42. data/lib/samagotchi/memory_bundle/manifest.rb +9 -29
  43. data/lib/samagotchi/memory_bundle/plugin_ref.rb +27 -0
  44. data/lib/samagotchi/memory_bundle/profile.rb +21 -21
  45. data/lib/samagotchi/memory_bundle/provenance.rb +46 -57
  46. data/lib/samagotchi/memory_bundle/shipped_update.rb +24 -26
  47. data/lib/samagotchi/memory_bundle/status.rb +22 -24
  48. data/lib/samagotchi/memory_bundle/system_bundle.rb +4 -5
  49. data/lib/samagotchi/memory_bundle/uninstaller.rb +8 -10
  50. data/lib/samagotchi/plugin/loader.rb +8 -8
  51. data/lib/samagotchi/self_report.rb +2 -2
  52. data/lib/samagotchi/send_command.rb +4 -28
  53. data/lib/samagotchi/session_commands.rb +32 -4
  54. data/lib/samagotchi/session_continue.rb +275 -0
  55. data/lib/samagotchi/session_manager.rb +45 -257
  56. data/lib/samagotchi/session_metrics.rb +18 -21
  57. data/lib/samagotchi/sessions_command.rb +3 -2
  58. data/lib/samagotchi/terminal_ui/attached_loop.rb +2 -1
  59. data/lib/samagotchi/terminal_ui/formatting.rb +5 -1
  60. data/lib/samagotchi/terminal_ui.rb +25 -3
  61. data/lib/samagotchi/tool_activity.rb +84 -14
  62. data/lib/samagotchi/version.rb +1 -1
  63. data/lib/samagotchi/web/app.rb +3 -8
  64. data/lib/samagotchi/web/public/activity.js +2 -0
  65. data/lib/samagotchi/web/public/app.js +6 -8
  66. data/lib/samagotchi/web/public/command_complete.js +7 -2
  67. data/lib/samagotchi/web/public/ctx.js +18 -4
  68. data/lib/samagotchi/web/public/index.html +4 -2
  69. data/lib/samagotchi/web/public/question_card.js +9 -1
  70. data/lib/samagotchi/web/public/question_cards.js +5 -3
  71. data/lib/samagotchi/web/public/thinking_chip.js +31 -21
  72. data/lib/samagotchi/web/public/timing.js +8 -2
  73. data/lib/samagotchi/web/public/turn_html.js +10 -6
  74. metadata +9 -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.52.0
4
+ version: 0.54.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Dedov
@@ -131,6 +131,7 @@ files:
131
131
  - docs/guardrails.md
132
132
  - docs/hooks.md
133
133
  - docs/internals/background-tasks.md
134
+ - docs/internals/bundles.md
134
135
  - docs/internals/context-telemetry.md
135
136
  - docs/internals/engine.md
136
137
  - docs/internals/gemma4-contract.md
@@ -146,6 +147,7 @@ files:
146
147
  - docs/sub-agent.md
147
148
  - docs/testing.md
148
149
  - lib/samagotchi.rb
150
+ - lib/samagotchi/analytics_file.rb
149
151
  - lib/samagotchi/answer_command.rb
150
152
  - lib/samagotchi/answer_display.rb
151
153
  - lib/samagotchi/answer_tail.rb
@@ -257,6 +259,7 @@ files:
257
259
  - lib/samagotchi/engine.rb
258
260
  - lib/samagotchi/engine_peers.rb
259
261
  - lib/samagotchi/events.rb
262
+ - lib/samagotchi/extension_load.rb
260
263
  - lib/samagotchi/gem_update.rb
261
264
  - lib/samagotchi/generation_phase.rb
262
265
  - lib/samagotchi/git_head.rb
@@ -331,15 +334,19 @@ files:
331
334
  - lib/samagotchi/log_path.rb
332
335
  - lib/samagotchi/log_subscriber.rb
333
336
  - lib/samagotchi/memory_bundle.rb
337
+ - lib/samagotchi/memory_bundle/asset_installer.rb
334
338
  - lib/samagotchi/memory_bundle/builder.rb
339
+ - lib/samagotchi/memory_bundle/bundle_hook.rb
335
340
  - lib/samagotchi/memory_bundle/index_size.rb
336
341
  - lib/samagotchi/memory_bundle/index_sync.rb
337
342
  - lib/samagotchi/memory_bundle/index_updater.rb
343
+ - lib/samagotchi/memory_bundle/installed_bundle.rb
338
344
  - lib/samagotchi/memory_bundle/installer.rb
339
345
  - lib/samagotchi/memory_bundle/listing.rb
340
346
  - lib/samagotchi/memory_bundle/manifest.rb
341
347
  - lib/samagotchi/memory_bundle/merger.rb
342
348
  - lib/samagotchi/memory_bundle/placeholder.rb
349
+ - lib/samagotchi/memory_bundle/plugin_ref.rb
343
350
  - lib/samagotchi/memory_bundle/profile.rb
344
351
  - lib/samagotchi/memory_bundle/provenance.rb
345
352
  - lib/samagotchi/memory_bundle/shipped_update.rb
@@ -403,6 +410,7 @@ files:
403
410
  - lib/samagotchi/session_archive_command.rb
404
411
  - lib/samagotchi/session_chain.rb
405
412
  - lib/samagotchi/session_commands.rb
413
+ - lib/samagotchi/session_continue.rb
406
414
  - lib/samagotchi/session_delete_command.rb
407
415
  - lib/samagotchi/session_inbox.rb
408
416
  - lib/samagotchi/session_manager.rb