samagotchi 0.172.0 → 0.173.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 (120) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +44 -1
  3. data/docs/architecture.md +16 -5
  4. data/docs/cli.md +2 -1
  5. data/docs/configuration.md +1 -1
  6. data/docs/internals/background-tasks.md +20 -7
  7. data/docs/internals/bridge.md +2 -2
  8. data/docs/internals/engine.md +2 -1
  9. data/docs/internals/participants.md +67 -9
  10. data/docs/internals/remote-sessions.md +1 -1
  11. data/docs/internals/web-frontend.md +44 -15
  12. data/docs/plugins.md +3 -1
  13. data/docs/sessions.md +2 -2
  14. data/docs/testing.md +43 -3
  15. data/lib/samagotchi/bridge.rb +3 -2
  16. data/lib/samagotchi/bundle_command/try/sandbox.rb +2 -2
  17. data/lib/samagotchi/bundles/core/manifest.yml +2 -2
  18. data/lib/samagotchi/bundles/slow-commands/manifest.yml +3 -3
  19. data/lib/samagotchi/bundles/slow-commands/plugin.rb +3 -3
  20. data/lib/samagotchi/bundles/system/manifest.yml +1 -1
  21. data/lib/samagotchi/engine/participants.rb +2 -2
  22. data/lib/samagotchi/engine.rb +0 -1
  23. data/lib/samagotchi/file_ref.rb +3 -5
  24. data/lib/samagotchi/guardrails/participant_refusal.rb +1 -1
  25. data/lib/samagotchi/memory_usage.rb +2 -1
  26. data/lib/samagotchi/message_parts.rb +5 -3
  27. data/lib/samagotchi/objectives_backing.rb +6 -10
  28. data/lib/samagotchi/parent_report.rb +1 -1
  29. data/lib/samagotchi/participant_prompts.rb +101 -0
  30. data/lib/samagotchi/participant_turn_mode.rb +1 -1
  31. data/lib/samagotchi/project_env.rb +7 -5
  32. data/lib/samagotchi/prompt_history.rb +2 -2
  33. data/lib/samagotchi/send_command/parent_gate.rb +2 -2
  34. data/lib/samagotchi/send_command.rb +4 -4
  35. data/lib/samagotchi/session_command_catalog.rb +210 -0
  36. data/lib/samagotchi/session_commands.rb +12 -183
  37. data/lib/samagotchi/session_manager/lifecycle.rb +5 -4
  38. data/lib/samagotchi/session_manager.rb +2 -1
  39. data/lib/samagotchi/session_stores.rb +2 -0
  40. data/lib/samagotchi/spawn_env.rb +75 -0
  41. data/lib/samagotchi/task_files.rb +51 -0
  42. data/lib/samagotchi/task_transcript.rb +67 -0
  43. data/lib/samagotchi/task_watch.rb +8 -6
  44. data/lib/samagotchi/terminal_ui/attached_loop/composer.rb +3 -3
  45. data/lib/samagotchi/terminal_ui/attached_loop/questions.rb +2 -2
  46. data/lib/samagotchi/terminal_ui/attached_loop.rb +3 -3
  47. data/lib/samagotchi/terminal_ui/input_support.rb +1 -1
  48. data/lib/samagotchi/testing/boundary.rb +5 -0
  49. data/lib/samagotchi/tool_activity.rb +63 -79
  50. data/lib/samagotchi/tool_names.rb +179 -0
  51. data/lib/samagotchi/tool_view.rb +3 -5
  52. data/lib/samagotchi/tools/ask_user_question.rb +2 -1
  53. data/lib/samagotchi/tools/builtins.rb +1 -1
  54. data/lib/samagotchi/tools/cancel_reminder.rb +2 -1
  55. data/lib/samagotchi/tools/cancel_schedule.rb +3 -1
  56. data/lib/samagotchi/tools/context_read.rb +2 -1
  57. data/lib/samagotchi/tools/delegate.rb +2 -1
  58. data/lib/samagotchi/tools/delegate_result.rb +2 -1
  59. data/lib/samagotchi/tools/edit.rb +2 -1
  60. data/lib/samagotchi/tools/execute.rb +22 -28
  61. data/lib/samagotchi/tools/forget_outputs.rb +2 -1
  62. data/lib/samagotchi/tools/leftovers.rb +8 -4
  63. data/lib/samagotchi/tools/list_reminders.rb +2 -1
  64. data/lib/samagotchi/tools/list_schedules.rb +3 -1
  65. data/lib/samagotchi/tools/list_sessions.rb +2 -1
  66. data/lib/samagotchi/tools/memory.rb +3 -2
  67. data/lib/samagotchi/tools/objectives_tool.rb +5 -4
  68. data/lib/samagotchi/tools/read.rb +2 -1
  69. data/lib/samagotchi/tools/register_reminder.rb +2 -1
  70. data/lib/samagotchi/tools/schedule_task.rb +3 -1
  71. data/lib/samagotchi/tools/send_note.rb +2 -1
  72. data/lib/samagotchi/tools/task_create.rb +2 -1
  73. data/lib/samagotchi/tools/task_get.rb +2 -1
  74. data/lib/samagotchi/tools/task_list.rb +2 -1
  75. data/lib/samagotchi/tools/task_runtime.rb +34 -154
  76. data/lib/samagotchi/tools/task_stop.rb +2 -1
  77. data/lib/samagotchi/tools/task_wait.rb +3 -2
  78. data/lib/samagotchi/tools/web_fetch.rb +2 -1
  79. data/lib/samagotchi/tools/write.rb +2 -1
  80. data/lib/samagotchi/turn_checkpoint.rb +1 -1
  81. data/lib/samagotchi/version.rb +1 -1
  82. data/lib/samagotchi/web/app.rb +38 -36
  83. data/lib/samagotchi/web/message_display.rb +1 -7
  84. data/lib/samagotchi/web/participant_access.rb +12 -4
  85. data/lib/samagotchi/web/participant_history.rb +68 -0
  86. data/lib/samagotchi/web/participant_images.rb +2 -1
  87. data/lib/samagotchi/web/participant_show.rb +5 -5
  88. data/lib/samagotchi/web/participants_admin.rb +1 -1
  89. data/lib/samagotchi/web/public/app.js +13 -10
  90. data/lib/samagotchi/web/public/card_kinds.js +51 -0
  91. data/lib/samagotchi/web/public/card_registry.js +248 -0
  92. data/lib/samagotchi/web/public/cards_offscreen.js +3 -3
  93. data/lib/samagotchi/web/public/cards_place.js +21 -4
  94. data/lib/samagotchi/web/public/history_shape.js +1 -2
  95. data/lib/samagotchi/web/public/participant_history.js +27 -0
  96. data/lib/samagotchi/web/public/question_cards.js +16 -15
  97. data/lib/samagotchi/web/public/reload_check.js +90 -72
  98. data/lib/samagotchi/web/public/session_sync.js +4 -2
  99. data/lib/samagotchi/web/public/session_view.js +6 -1
  100. data/lib/samagotchi/web/public/stage_asking.js +18 -13
  101. data/lib/samagotchi/web/public/stage_place.js +144 -0
  102. data/lib/samagotchi/web/public/stage_probe.js +64 -0
  103. data/lib/samagotchi/web/public/stage_view.js +52 -104
  104. data/lib/samagotchi/web/public/stage_waiting.js +28 -17
  105. data/lib/samagotchi/web/public/task_stop.js +1 -1
  106. data/lib/samagotchi/web/push_routes.rb +1 -1
  107. data/lib/samagotchi/web/reload_check_route.rb +5 -2
  108. data/lib/samagotchi/web/request_body.rb +72 -0
  109. data/lib/samagotchi/web/server.rb +70 -0
  110. data/lib/samagotchi/web/session_access_routes.rb +13 -11
  111. data/lib/samagotchi/web/session_control.rb +21 -15
  112. data/lib/samagotchi/web/session_create.rb +2 -1
  113. data/lib/samagotchi/web/session_show.rb +8 -8
  114. data/lib/samagotchi/web/viewer.rb +7 -2
  115. data/lib/samagotchi/web/working_set_routes.rb +3 -3
  116. data/lib/samagotchi/worker.rb +49 -182
  117. data/lib/samagotchi/worker_exit_claim.rb +102 -0
  118. data/lib/samagotchi/worker_participant_gate.rb +156 -0
  119. data/lib/samagotchi/worker_task_wakes.rb +2 -2
  120. metadata +16 -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.172.0
4
+ version: 0.173.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Dedov
@@ -580,6 +580,7 @@ files:
580
580
  - lib/samagotchi/participant_exposure.rb
581
581
  - lib/samagotchi/participant_messages.rb
582
582
  - lib/samagotchi/participant_name.rb
583
+ - lib/samagotchi/participant_prompts.rb
583
584
  - lib/samagotchi/participant_revise.rb
584
585
  - lib/samagotchi/participant_turn_mode.rb
585
586
  - lib/samagotchi/participant_uploads.rb
@@ -674,6 +675,7 @@ files:
674
675
  - lib/samagotchi/session_archive_command.rb
675
676
  - lib/samagotchi/session_chain.rb
676
677
  - lib/samagotchi/session_chain/links.rb
678
+ - lib/samagotchi/session_command_catalog.rb
677
679
  - lib/samagotchi/session_commands.rb
678
680
  - lib/samagotchi/session_config.rb
679
681
  - lib/samagotchi/session_continue.rb
@@ -711,6 +713,7 @@ files:
711
713
  - lib/samagotchi/share_terms.rb
712
714
  - lib/samagotchi/side_judgments.rb
713
715
  - lib/samagotchi/side_usage.rb
716
+ - lib/samagotchi/spawn_env.rb
714
717
  - lib/samagotchi/starting_marker.rb
715
718
  - lib/samagotchi/state_format.rb
716
719
  - lib/samagotchi/steer.rb
@@ -737,7 +740,9 @@ files:
737
740
  - lib/samagotchi/system_one/self_protect.rb
738
741
  - lib/samagotchi/system_one/similar.rb
739
742
  - lib/samagotchi/system_prompt.rb
743
+ - lib/samagotchi/task_files.rb
740
744
  - lib/samagotchi/task_finish_note.rb
745
+ - lib/samagotchi/task_transcript.rb
741
746
  - lib/samagotchi/task_watch.rb
742
747
  - lib/samagotchi/terminal_ui.rb
743
748
  - lib/samagotchi/terminal_ui/attach_launcher.rb
@@ -809,6 +814,7 @@ files:
809
814
  - lib/samagotchi/tool_declarations.rb
810
815
  - lib/samagotchi/tool_ids.rb
811
816
  - lib/samagotchi/tool_loads.rb
817
+ - lib/samagotchi/tool_names.rb
812
818
  - lib/samagotchi/tool_output_cut.rb
813
819
  - lib/samagotchi/tool_output_files.rb
814
820
  - lib/samagotchi/tool_response.rb
@@ -902,6 +908,7 @@ files:
902
908
  - lib/samagotchi/web/markdown_renderer.rb
903
909
  - lib/samagotchi/web/message_display.rb
904
910
  - lib/samagotchi/web/participant_access.rb
911
+ - lib/samagotchi/web/participant_history.rb
905
912
  - lib/samagotchi/web/participant_images.rb
906
913
  - lib/samagotchi/web/participant_review.rb
907
914
  - lib/samagotchi/web/participant_show.rb
@@ -931,6 +938,8 @@ files:
931
938
  - lib/samagotchi/web/public/block_watch.js
932
939
  - lib/samagotchi/web/public/bubbles.js
933
940
  - lib/samagotchi/web/public/card.js
941
+ - lib/samagotchi/web/public/card_kinds.js
942
+ - lib/samagotchi/web/public/card_registry.js
934
943
  - lib/samagotchi/web/public/card_stamps.js
935
944
  - lib/samagotchi/web/public/cards_offscreen.js
936
945
  - lib/samagotchi/web/public/cards_place.js
@@ -1005,6 +1014,7 @@ files:
1005
1014
  - lib/samagotchi/web/public/owner_claim.js
1006
1015
  - lib/samagotchi/web/public/owner_verify.js
1007
1016
  - lib/samagotchi/web/public/participant_bar.js
1017
+ - lib/samagotchi/web/public/participant_history.js
1008
1018
  - lib/samagotchi/web/public/participant_main.js
1009
1019
  - lib/samagotchi/web/public/participant_model.js
1010
1020
  - lib/samagotchi/web/public/participant_names.js
@@ -1059,6 +1069,8 @@ files:
1059
1069
  - lib/samagotchi/web/public/stage_opened.js
1060
1070
  - lib/samagotchi/web/public/stage_owner_wait.js
1061
1071
  - lib/samagotchi/web/public/stage_pager.js
1072
+ - lib/samagotchi/web/public/stage_place.js
1073
+ - lib/samagotchi/web/public/stage_probe.js
1062
1074
  - lib/samagotchi/web/public/stage_quiet_clock.js
1063
1075
  - lib/samagotchi/web/public/stage_slots.js
1064
1076
  - lib/samagotchi/web/public/stage_stall.js
@@ -1136,6 +1148,7 @@ files:
1136
1148
  - lib/samagotchi/web/push_routes.rb
1137
1149
  - lib/samagotchi/web/qr.rb
1138
1150
  - lib/samagotchi/web/reload_check_route.rb
1151
+ - lib/samagotchi/web/request_body.rb
1139
1152
  - lib/samagotchi/web/running.rb
1140
1153
  - lib/samagotchi/web/server.rb
1141
1154
  - lib/samagotchi/web/session_access_routes.rb
@@ -1155,9 +1168,11 @@ files:
1155
1168
  - lib/samagotchi/web/working_set_routes.rb
1156
1169
  - lib/samagotchi/worker.rb
1157
1170
  - lib/samagotchi/worker_boot.rb
1171
+ - lib/samagotchi/worker_exit_claim.rb
1158
1172
  - lib/samagotchi/worker_idle_exit.rb
1159
1173
  - lib/samagotchi/worker_inbound.rb
1160
1174
  - lib/samagotchi/worker_link.rb
1175
+ - lib/samagotchi/worker_participant_gate.rb
1161
1176
  - lib/samagotchi/worker_presence.rb
1162
1177
  - lib/samagotchi/worker_sidecar.rb
1163
1178
  - lib/samagotchi/worker_signals.rb