samagotchi 0.125.0 → 0.126.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 (50) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +25 -1
  3. data/docs/guardrails.md +22 -0
  4. data/docs/internals/participants.md +70 -2
  5. data/docs/internals/web-push.md +10 -6
  6. data/docs/sessions.md +3 -0
  7. data/lib/samagotchi/bridge.rb +4 -3
  8. data/lib/samagotchi/bridge_client.rb +8 -1
  9. data/lib/samagotchi/bundles/known-names/hooks/known_names.rb +25 -4
  10. data/lib/samagotchi/bundles/known-names/manifest.yml +2 -2
  11. data/lib/samagotchi/bundles/system/manifest.yml +1 -1
  12. data/lib/samagotchi/child_reports.rb +3 -0
  13. data/lib/samagotchi/children_status.rb +6 -1
  14. data/lib/samagotchi/engine.rb +43 -7
  15. data/lib/samagotchi/guardrail_wiring.rb +10 -1
  16. data/lib/samagotchi/llm/chat_loop.rb +1 -0
  17. data/lib/samagotchi/session.rb +40 -3
  18. data/lib/samagotchi/session_inbox.rb +14 -8
  19. data/lib/samagotchi/session_manager.rb +11 -4
  20. data/lib/samagotchi/session_participants.rb +10 -2
  21. data/lib/samagotchi/verdict.rb +20 -0
  22. data/lib/samagotchi/verify_anchor.rb +28 -0
  23. data/lib/samagotchi/verify_fresh.rb +275 -0
  24. data/lib/samagotchi/verify_fresh_origin.rb +71 -0
  25. data/lib/samagotchi/version.rb +1 -1
  26. data/lib/samagotchi/web/app.rb +3 -0
  27. data/lib/samagotchi/web/participant_access.rb +15 -4
  28. data/lib/samagotchi/web/participant_review.rb +7 -1
  29. data/lib/samagotchi/web/participant_view.rb +46 -5
  30. data/lib/samagotchi/web/public/annotate_bar.js +9 -1
  31. data/lib/samagotchi/web/public/app.js +69 -4
  32. data/lib/samagotchi/web/public/data.js +2 -1
  33. data/lib/samagotchi/web/public/index.html +1 -0
  34. data/lib/samagotchi/web/public/notify.js +13 -2
  35. data/lib/samagotchi/web/public/participant.html +2 -1
  36. data/lib/samagotchi/web/public/participant.js +69 -7
  37. data/lib/samagotchi/web/public/send_turn.js +6 -1
  38. data/lib/samagotchi/web/public/session_state.js +5 -0
  39. data/lib/samagotchi/web/public/stream_handlers.js +3 -0
  40. data/lib/samagotchi/web/public/verdict_card.js +65 -0
  41. data/lib/samagotchi/web/public/verdict_fresh.js +120 -0
  42. data/lib/samagotchi/web/public/verify_card.css +17 -0
  43. data/lib/samagotchi/web/push/attention.rb +25 -5
  44. data/lib/samagotchi/web/push/notifier.rb +4 -3
  45. data/lib/samagotchi/web/session_control.rb +2 -0
  46. data/lib/samagotchi/web/session_summary.rb +25 -1
  47. data/lib/samagotchi/web/verify_fresh_routes.rb +110 -0
  48. data/lib/samagotchi/worker.rb +68 -9
  49. data/lib/samagotchi/worker_inbound.rb +4 -4
  50. metadata +9 -1
@@ -40,9 +40,9 @@ module Samagotchi
40
40
  # turn; +images+: its image refs ({file:, name:}); +delivery+: the wire
41
41
  # value the sender asked for ("queue", or nil for the default
42
42
  # next_step); +origin+: a TurnOrigin (a Hash is read as one).
43
- Prompt = Data.define(:text, :origin, :no_interrupt, :images, :delivery) do
44
- def initialize(text:, origin: nil, no_interrupt: false, images: [], delivery: nil)
45
- super(text:, origin: TurnOrigin.of(origin), no_interrupt:, images:, delivery:)
43
+ Prompt = Data.define(:text, :origin, :no_interrupt, :images, :delivery, :verify) do
44
+ def initialize(text:, origin: nil, no_interrupt: false, images: [], delivery: nil, verify: nil)
45
+ super(text:, origin: TurnOrigin.of(origin), no_interrupt:, images:, delivery:, verify: VerifyAnchor.from(verify))
46
46
  end
47
47
  end
48
48
 
@@ -215,7 +215,7 @@ module Samagotchi
215
215
  return if input.images.empty? && queue_as_command(input.prompt, input.origin, File.basename(input_file))
216
216
 
217
217
  yield Prompt.new(text: input.prompt, origin: input.origin, no_interrupt: input.no_interrupt, images: input.images,
218
- delivery: input.delivery)
218
+ delivery: input.delivery, verify: input.verify)
219
219
  ensure
220
220
  FileUtils.rm_f(claimed_file)
221
221
  end
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.125.0
4
+ version: 0.126.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Dedov
@@ -727,6 +727,10 @@ files:
727
727
  - lib/samagotchi/update_hint.rb
728
728
  - lib/samagotchi/used_memories.rb
729
729
  - lib/samagotchi/utf8_default.rb
730
+ - lib/samagotchi/verdict.rb
731
+ - lib/samagotchi/verify_anchor.rb
732
+ - lib/samagotchi/verify_fresh.rb
733
+ - lib/samagotchi/verify_fresh_origin.rb
730
734
  - lib/samagotchi/version.rb
731
735
  - lib/samagotchi/vision_context.rb
732
736
  - lib/samagotchi/vision_support.rb
@@ -880,6 +884,9 @@ files:
880
884
  - lib/samagotchi/web/public/vendor/directives/repeat.js
881
885
  - lib/samagotchi/web/public/vendor/directives/unsafe-html.js
882
886
  - lib/samagotchi/web/public/vendor/lit-html.js
887
+ - lib/samagotchi/web/public/verdict_card.js
888
+ - lib/samagotchi/web/public/verdict_fresh.js
889
+ - lib/samagotchi/web/public/verify_card.css
883
890
  - lib/samagotchi/web/public/verify_preset.js
884
891
  - lib/samagotchi/web/public/working_set.js
885
892
  - lib/samagotchi/web/public/working_set_rail.js
@@ -907,6 +914,7 @@ files:
907
914
  - lib/samagotchi/web/tunnel.rb
908
915
  - lib/samagotchi/web/tunnel/tailscale.rb
909
916
  - lib/samagotchi/web/update_check.rb
917
+ - lib/samagotchi/web/verify_fresh_routes.rb
910
918
  - lib/samagotchi/worker.rb
911
919
  - lib/samagotchi/worker_idle_exit.rb
912
920
  - lib/samagotchi/worker_inbound.rb