samagotchi 0.64.0 → 0.66.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 (101) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +88 -1
  3. data/README.md +2 -1
  4. data/bin/chi +51 -2
  5. data/docs/architecture.md +20 -3
  6. data/docs/cli.md +36 -2
  7. data/docs/configuration.md +177 -8
  8. data/docs/context.md +4 -1
  9. data/docs/internals/engine.md +19 -4
  10. data/docs/internals/prompt-caching.md +10 -2
  11. data/docs/memory.md +1 -1
  12. data/docs/plugins.md +163 -2
  13. data/docs/releasing.md +1 -1
  14. data/docs/sessions.md +13 -2
  15. data/docs/sub-agent.md +3 -1
  16. data/lib/samagotchi/bridge.rb +11 -1
  17. data/lib/samagotchi/bundles/claude-peer/manifest.yml +2 -2
  18. data/lib/samagotchi/bundles/claude-peer/plugin.rb +18 -1
  19. data/lib/samagotchi/bundles/codex-peer/manifest.yml +21 -0
  20. data/lib/samagotchi/bundles/codex-peer/plugin.rb +464 -0
  21. data/lib/samagotchi/bundles/codex-peer/scripts/chi-peer-SKILL.md +131 -0
  22. data/lib/samagotchi/bundles/codex-peer/scripts/pair +92 -0
  23. data/lib/samagotchi/bundles/codex-peer/skill_codex_peer.md +68 -0
  24. data/lib/samagotchi/bundles/coordinator/manifest.yml +5 -5
  25. data/lib/samagotchi/bundles/coordinator/plugin.rb +24 -2
  26. data/lib/samagotchi/bundles/dev/manifest.yml +2 -1
  27. data/lib/samagotchi/bundles/system/config_modification_protocol.md +2 -2
  28. data/lib/samagotchi/bundles/system/delegated.md +2 -1
  29. data/lib/samagotchi/bundles/system/manifest.yml +4 -4
  30. data/lib/samagotchi/bundles/system/memory_guide.md +1 -1
  31. data/lib/samagotchi/cache_confirm.rb +9 -6
  32. data/lib/samagotchi/client.rb +4 -2
  33. data/lib/samagotchi/commands/registry.rb +25 -8
  34. data/lib/samagotchi/config.rb +13 -5
  35. data/lib/samagotchi/engine.rb +151 -11
  36. data/lib/samagotchi/generation_phase.rb +17 -0
  37. data/lib/samagotchi/host_config.rb +27 -6
  38. data/lib/samagotchi/host_registry.rb +34 -11
  39. data/lib/samagotchi/idle_client.rb +62 -25
  40. data/lib/samagotchi/idle_recap.rb +5 -2
  41. data/lib/samagotchi/idle_target.rb +30 -7
  42. data/lib/samagotchi/kernel_loop.rb +9 -1
  43. data/lib/samagotchi/llm/adapters.rb +41 -0
  44. data/lib/samagotchi/llm/anthropic_assembly.rb +212 -0
  45. data/lib/samagotchi/llm/anthropic_messages.rb +416 -0
  46. data/lib/samagotchi/llm/anthropic_wire.rb +238 -0
  47. data/lib/samagotchi/llm/api_key.rb +26 -9
  48. data/lib/samagotchi/llm/chat_loop.rb +113 -14
  49. data/lib/samagotchi/llm/dialect.rb +57 -0
  50. data/lib/samagotchi/llm/errors.rb +81 -12
  51. data/lib/samagotchi/llm/model_listing.rb +111 -0
  52. data/lib/samagotchi/llm/model_result.rb +9 -2
  53. data/lib/samagotchi/llm/openai_chat.rb +46 -93
  54. data/lib/samagotchi/model_profile.rb +1 -1
  55. data/lib/samagotchi/plugin/api.rb +80 -7
  56. data/lib/samagotchi/plugin/context.rb +22 -1
  57. data/lib/samagotchi/plugin/loader.rb +3 -2
  58. data/lib/samagotchi/reasoning_history.rb +14 -4
  59. data/lib/samagotchi/recap_setup.rb +2 -1
  60. data/lib/samagotchi/self_report.rb +18 -28
  61. data/lib/samagotchi/send_command.rb +23 -7
  62. data/lib/samagotchi/session.rb +21 -3
  63. data/lib/samagotchi/session_commands.rb +16 -1
  64. data/lib/samagotchi/session_manager.rb +4 -1
  65. data/lib/samagotchi/session_metrics.rb +6 -11
  66. data/lib/samagotchi/session_setup.rb +14 -7
  67. data/lib/samagotchi/steer_cut.rb +4 -0
  68. data/lib/samagotchi/system_prompt.rb +16 -1
  69. data/lib/samagotchi/terminal_ui/attach_launcher.rb +19 -9
  70. data/lib/samagotchi/terminal_ui/attached_loop.rb +8 -2
  71. data/lib/samagotchi/terminal_ui/event_renderer.rb +2 -1
  72. data/lib/samagotchi/terminal_ui/formatting.rb +4 -3
  73. data/lib/samagotchi/terminal_ui/status_row.rb +24 -3
  74. data/lib/samagotchi/terminal_ui.rb +18 -2
  75. data/lib/samagotchi/tool_runner.rb +13 -1
  76. data/lib/samagotchi/toolkit.rb +246 -0
  77. data/lib/samagotchi/toolkit_command.rb +117 -0
  78. data/lib/samagotchi/tools/registry.rb +43 -6
  79. data/lib/samagotchi/turn_note.rb +22 -5
  80. data/lib/samagotchi/version.rb +1 -1
  81. data/lib/samagotchi/web/app.rb +14 -1
  82. data/lib/samagotchi/web/public/activity.js +3 -0
  83. data/lib/samagotchi/web/public/annotate_actions.js +109 -0
  84. data/lib/samagotchi/web/public/annotate_bar.js +84 -2
  85. data/lib/samagotchi/web/public/app.js +111 -20
  86. data/lib/samagotchi/web/public/commands.js +4 -2
  87. data/lib/samagotchi/web/public/delivery_line.js +228 -0
  88. data/lib/samagotchi/web/public/index.html +38 -0
  89. data/lib/samagotchi/web/public/info_bar.js +5 -3
  90. data/lib/samagotchi/web/public/live_turn.js +8 -0
  91. data/lib/samagotchi/web/public/session_state.js +3 -0
  92. data/lib/samagotchi/web/public/stage_model.js +27 -7
  93. data/lib/samagotchi/web/public/stage_view.js +32 -10
  94. data/lib/samagotchi/web/public/stream_handlers.js +21 -2
  95. data/lib/samagotchi/web/public/toolkit_chip.js +29 -0
  96. data/lib/samagotchi/web/public/turn_events.js +22 -8
  97. data/lib/samagotchi/web/public/turn_html.js +20 -4
  98. data/lib/samagotchi/web/public/turn_model.js +16 -9
  99. data/lib/samagotchi/web/public/turn_view.js +6 -4
  100. data/lib/samagotchi/worker.rb +2 -0
  101. metadata +17 -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.64.0
4
+ version: 0.66.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Dedov
@@ -190,6 +190,11 @@ files:
190
190
  - lib/samagotchi/bundles/claude-peer/scripts/chi-peer-SKILL.md
191
191
  - lib/samagotchi/bundles/claude-peer/scripts/pair
192
192
  - lib/samagotchi/bundles/claude-peer/skill_claude_peer.md
193
+ - lib/samagotchi/bundles/codex-peer/manifest.yml
194
+ - lib/samagotchi/bundles/codex-peer/plugin.rb
195
+ - lib/samagotchi/bundles/codex-peer/scripts/chi-peer-SKILL.md
196
+ - lib/samagotchi/bundles/codex-peer/scripts/pair
197
+ - lib/samagotchi/bundles/codex-peer/skill_codex_peer.md
193
198
  - lib/samagotchi/bundles/coordinator/manifest.yml
194
199
  - lib/samagotchi/bundles/coordinator/plugin.rb
195
200
  - lib/samagotchi/bundles/coordinator/skill_coordinator.md
@@ -321,11 +326,17 @@ files:
321
326
  - lib/samagotchi/last_turn.rb
322
327
  - lib/samagotchi/launch_mode.rb
323
328
  - lib/samagotchi/live_versions.rb
329
+ - lib/samagotchi/llm/adapters.rb
330
+ - lib/samagotchi/llm/anthropic_assembly.rb
331
+ - lib/samagotchi/llm/anthropic_messages.rb
332
+ - lib/samagotchi/llm/anthropic_wire.rb
324
333
  - lib/samagotchi/llm/api_key.rb
325
334
  - lib/samagotchi/llm/backend.rb
326
335
  - lib/samagotchi/llm/chat_loop.rb
336
+ - lib/samagotchi/llm/dialect.rb
327
337
  - lib/samagotchi/llm/errors.rb
328
338
  - lib/samagotchi/llm/http.rb
339
+ - lib/samagotchi/llm/model_listing.rb
329
340
  - lib/samagotchi/llm/model_result.rb
330
341
  - lib/samagotchi/llm/native_backend.rb
331
342
  - lib/samagotchi/llm/native_tool_normalizer.rb
@@ -483,6 +494,8 @@ files:
483
494
  - lib/samagotchi/tool_row_fields.rb
484
495
  - lib/samagotchi/tool_runner.rb
485
496
  - lib/samagotchi/tool_view.rb
497
+ - lib/samagotchi/toolkit.rb
498
+ - lib/samagotchi/toolkit_command.rb
486
499
  - lib/samagotchi/tools/args.rb
487
500
  - lib/samagotchi/tools/ask_user_question.rb
488
501
  - lib/samagotchi/tools/builtin_calls.rb
@@ -537,6 +550,7 @@ files:
537
550
  - lib/samagotchi/web/markdown_renderer.rb
538
551
  - lib/samagotchi/web/message_parts.rb
539
552
  - lib/samagotchi/web/public/activity.js
553
+ - lib/samagotchi/web/public/annotate_actions.js
540
554
  - lib/samagotchi/web/public/annotate_bar.js
541
555
  - lib/samagotchi/web/public/annotate_presets.js
542
556
  - lib/samagotchi/web/public/annotations.js
@@ -555,6 +569,7 @@ files:
555
569
  - lib/samagotchi/web/public/copy.js
556
570
  - lib/samagotchi/web/public/ctx.js
557
571
  - lib/samagotchi/web/public/data.js
572
+ - lib/samagotchi/web/public/delivery_line.js
558
573
  - lib/samagotchi/web/public/diff_view.js
559
574
  - lib/samagotchi/web/public/families_view.js
560
575
  - lib/samagotchi/web/public/favicon.svg
@@ -601,6 +616,7 @@ files:
601
616
  - lib/samagotchi/web/public/thinking_chip.js
602
617
  - lib/samagotchi/web/public/thinking_ticker.js
603
618
  - lib/samagotchi/web/public/timing.js
619
+ - lib/samagotchi/web/public/toolkit_chip.js
604
620
  - lib/samagotchi/web/public/turn_events.js
605
621
  - lib/samagotchi/web/public/turn_html.js
606
622
  - lib/samagotchi/web/public/turn_model.js