samagotchi 0.16.0 → 0.18.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 (95) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +149 -1
  3. data/README.md +2 -0
  4. data/docs/architecture.md +38 -2
  5. data/docs/cli.md +37 -9
  6. data/docs/configuration.md +8 -6
  7. data/docs/guardrails.md +51 -8
  8. data/docs/hooks.md +4 -1
  9. data/docs/internals/background-tasks.md +1 -0
  10. data/docs/memory.md +41 -0
  11. data/docs/plugins.md +5 -2
  12. data/docs/sessions.md +8 -6
  13. data/docs/sub-agent.md +43 -4
  14. data/docs/testing.md +47 -0
  15. data/lib/samagotchi/answer_command.rb +23 -2
  16. data/lib/samagotchi/answer_tail.rb +52 -0
  17. data/lib/samagotchi/bridge/turn_accumulator.rb +20 -5
  18. data/lib/samagotchi/bridge.rb +86 -14
  19. data/lib/samagotchi/bridge_client.rb +18 -3
  20. data/lib/samagotchi/bundle_command.rb +121 -4
  21. data/lib/samagotchi/bundles/guardrails/guardrails/rules.yml +18 -3
  22. data/lib/samagotchi/bundles/guardrails/manifest.yml +4 -4
  23. data/lib/samagotchi/bundles/system/config_modification_protocol.md +1 -1
  24. data/lib/samagotchi/bundles/system/manifest.yml +4 -4
  25. data/lib/samagotchi/bundles/system/memory_guide.md +5 -5
  26. data/lib/samagotchi/bundles/system/self_map.md +1 -0
  27. data/lib/samagotchi/commands/registry.rb +28 -0
  28. data/lib/samagotchi/config.rb +7 -1
  29. data/lib/samagotchi/continue_offer.rb +177 -0
  30. data/lib/samagotchi/engine.rb +73 -19
  31. data/lib/samagotchi/guardrails/outside.rb +46 -0
  32. data/lib/samagotchi/guardrails/parent_approvals.rb +2 -0
  33. data/lib/samagotchi/guardrails/parent_continue.rb +43 -0
  34. data/lib/samagotchi/guardrails/rules.rb +17 -5
  35. data/lib/samagotchi/guardrails/shell_git_dirs.rb +267 -0
  36. data/lib/samagotchi/guardrails/targets.rb +30 -13
  37. data/lib/samagotchi/guardrails.rb +2 -0
  38. data/lib/samagotchi/iteration_limit.rb +38 -0
  39. data/lib/samagotchi/kernel_loop.rb +2 -1
  40. data/lib/samagotchi/llm/backend.rb +2 -1
  41. data/lib/samagotchi/llm/chat_loop.rb +2 -1
  42. data/lib/samagotchi/llm/native_backend.rb +2 -1
  43. data/lib/samagotchi/memory_bundle/builder.rb +22 -0
  44. data/lib/samagotchi/memory_bundle/index_updater.rb +17 -6
  45. data/lib/samagotchi/memory_bundle/installer.rb +60 -21
  46. data/lib/samagotchi/memory_bundle/profile.rb +9 -4
  47. data/lib/samagotchi/memory_bundle/provenance.rb +14 -0
  48. data/lib/samagotchi/memory_bundle/shipped_update.rb +5 -3
  49. data/lib/samagotchi/memory_bundle/system_bundle.rb +5 -3
  50. data/lib/samagotchi/memory_bundle/trash.rb +136 -0
  51. data/lib/samagotchi/memory_bundle/uninstaller.rb +34 -5
  52. data/lib/samagotchi/parent_report.rb +39 -9
  53. data/lib/samagotchi/plugin/context.rb +14 -2
  54. data/lib/samagotchi/question_desk.rb +205 -46
  55. data/lib/samagotchi/reply_wait.rb +10 -4
  56. data/lib/samagotchi/self_report.rb +49 -3
  57. data/lib/samagotchi/send_command.rb +46 -6
  58. data/lib/samagotchi/session.rb +3 -2
  59. data/lib/samagotchi/session_commands.rb +3 -2
  60. data/lib/samagotchi/session_manager.rb +4 -1
  61. data/lib/samagotchi/session_metrics.rb +137 -48
  62. data/lib/samagotchi/sessions_command.rb +3 -2
  63. data/lib/samagotchi/system_prompt.rb +46 -5
  64. data/lib/samagotchi/terminal_ui/attached_loop.rb +39 -6
  65. data/lib/samagotchi/terminal_ui/event_renderer.rb +2 -1
  66. data/lib/samagotchi/terminal_ui/question_prompt.rb +34 -2
  67. data/lib/samagotchi/terminal_ui.rb +35 -2
  68. data/lib/samagotchi/tool_declarations.rb +2 -2
  69. data/lib/samagotchi/tools/builtins.rb +11 -3
  70. data/lib/samagotchi/tools/delegate_relay.rb +4 -0
  71. data/lib/samagotchi/tools/delegate_wait.rb +14 -5
  72. data/lib/samagotchi/tools/edit.rb +6 -1
  73. data/lib/samagotchi/tools/execute.rb +5 -4
  74. data/lib/samagotchi/tools/peers.rb +3 -2
  75. data/lib/samagotchi/tools/read.rb +2 -1
  76. data/lib/samagotchi/tools/task_runtime.rb +1 -1
  77. data/lib/samagotchi/turn_flow.rb +8 -7
  78. data/lib/samagotchi/turn_note.rb +7 -0
  79. data/lib/samagotchi/version.rb +1 -1
  80. data/lib/samagotchi/web/app.rb +189 -43
  81. data/lib/samagotchi/web/public/app.js +157 -51
  82. data/lib/samagotchi/web/public/data.js +12 -13
  83. data/lib/samagotchi/web/public/index.html +6 -1
  84. data/lib/samagotchi/web/public/notify.js +12 -5
  85. data/lib/samagotchi/web/public/question_card.js +28 -1
  86. data/lib/samagotchi/web/public/question_cards.js +74 -3
  87. data/lib/samagotchi/web/public/sessions_list.js +1 -0
  88. data/lib/samagotchi/web/public/stage_view.js +13 -1
  89. data/lib/samagotchi/web/public/strip.js +11 -0
  90. data/lib/samagotchi/web/public/timing.js +67 -12
  91. data/lib/samagotchi/web/public/turn_events.js +74 -3
  92. data/lib/samagotchi/web/public/update_notice.js +15 -0
  93. data/lib/samagotchi/worker.rb +58 -60
  94. data/lib/samagotchi/worker_sidecar.rb +7 -1
  95. metadata +10 -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.16.0
4
+ version: 0.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Dedov
@@ -137,9 +137,11 @@ files:
137
137
  - docs/releasing.md
138
138
  - docs/sessions.md
139
139
  - docs/sub-agent.md
140
+ - docs/testing.md
140
141
  - lib/samagotchi.rb
141
142
  - lib/samagotchi/answer_command.rb
142
143
  - lib/samagotchi/answer_display.rb
144
+ - lib/samagotchi/answer_tail.rb
143
145
  - lib/samagotchi/archive_store.rb
144
146
  - lib/samagotchi/atomic_file.rb
145
147
  - lib/samagotchi/bootstrap/bundles.rb
@@ -202,6 +204,7 @@ files:
202
204
  - lib/samagotchi/context_status.rb
203
205
  - lib/samagotchi/context_usage.rb
204
206
  - lib/samagotchi/context_window.rb
207
+ - lib/samagotchi/continue_offer.rb
205
208
  - lib/samagotchi/debug_log.rb
206
209
  - lib/samagotchi/desktop.rb
207
210
  - lib/samagotchi/desktop/macos.rb
@@ -228,10 +231,13 @@ files:
228
231
  - lib/samagotchi/guardrails/gate.rb
229
232
  - lib/samagotchi/guardrails/load_failures.rb
230
233
  - lib/samagotchi/guardrails/model_size.rb
234
+ - lib/samagotchi/guardrails/outside.rb
231
235
  - lib/samagotchi/guardrails/parent_approvals.rb
236
+ - lib/samagotchi/guardrails/parent_continue.rb
232
237
  - lib/samagotchi/guardrails/protected_paths.rb
233
238
  - lib/samagotchi/guardrails/rules.rb
234
239
  - lib/samagotchi/guardrails/scratch_writes.rb
240
+ - lib/samagotchi/guardrails/shell_git_dirs.rb
235
241
  - lib/samagotchi/guardrails/targets.rb
236
242
  - lib/samagotchi/guardrails/verdict.rb
237
243
  - lib/samagotchi/hooks.rb
@@ -246,6 +252,7 @@ files:
246
252
  - lib/samagotchi/idle_scheduler.rb
247
253
  - lib/samagotchi/image_store.rb
248
254
  - lib/samagotchi/installed_gem.rb
255
+ - lib/samagotchi/iteration_limit.rb
249
256
  - lib/samagotchi/kernel_loop.rb
250
257
  - lib/samagotchi/launch_mode.rb
251
258
  - lib/samagotchi/live_versions.rb
@@ -280,6 +287,7 @@ files:
280
287
  - lib/samagotchi/memory_bundle/source.rb
281
288
  - lib/samagotchi/memory_bundle/status.rb
282
289
  - lib/samagotchi/memory_bundle/system_bundle.rb
290
+ - lib/samagotchi/memory_bundle/trash.rb
283
291
  - lib/samagotchi/memory_bundle/uninstaller.rb
284
292
  - lib/samagotchi/memory_paths.rb
285
293
  - lib/samagotchi/model_catalog.rb
@@ -450,6 +458,7 @@ files:
450
458
  - lib/samagotchi/web/public/turn_events.js
451
459
  - lib/samagotchi/web/public/turn_model.js
452
460
  - lib/samagotchi/web/public/turn_view.js
461
+ - lib/samagotchi/web/public/update_notice.js
453
462
  - lib/samagotchi/web/qr.rb
454
463
  - lib/samagotchi/web/server.rb
455
464
  - lib/samagotchi/web/session_hub.rb