samagotchi 0.13.0 → 0.14.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 (40) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +55 -1
  3. data/bin/chi +4 -7
  4. data/docs/configuration.md +50 -7
  5. data/docs/guardrails.md +2 -1
  6. data/docs/plugins.md +27 -12
  7. data/docs/sessions.md +1 -1
  8. data/docs/sub-agent.md +1 -1
  9. data/lib/samagotchi/bridge/card_store.rb +94 -6
  10. data/lib/samagotchi/bridge.rb +3 -1
  11. data/lib/samagotchi/bundles/check-in/manifest.yml +2 -2
  12. data/lib/samagotchi/bundles/check-in/plugin.rb +68 -5
  13. data/lib/samagotchi/bundles/mcp/manifest.yml +2 -2
  14. data/lib/samagotchi/bundles/mcp/plugin.rb +166 -34
  15. data/lib/samagotchi/bundles/system/manifest.yml +1 -1
  16. data/lib/samagotchi/config.rb +31 -6
  17. data/lib/samagotchi/context_window.rb +30 -5
  18. data/lib/samagotchi/engine.rb +14 -3
  19. data/lib/samagotchi/guardrails/parent_approvals.rb +5 -2
  20. data/lib/samagotchi/host_registry.rb +31 -6
  21. data/lib/samagotchi/kernel_loop.rb +1 -1
  22. data/lib/samagotchi/llm/chat_loop.rb +5 -3
  23. data/lib/samagotchi/llm/turn_settings.rb +7 -5
  24. data/lib/samagotchi/session_manager.rb +6 -0
  25. data/lib/samagotchi/system_prompt.rb +1 -1
  26. data/lib/samagotchi/terminal_ui/attached_loop.rb +37 -10
  27. data/lib/samagotchi/terminal_ui.rb +16 -3
  28. data/lib/samagotchi/tools/delegate_wait.rb +17 -10
  29. data/lib/samagotchi/tools/memory.rb +3 -3
  30. data/lib/samagotchi/utf8_default.rb +29 -0
  31. data/lib/samagotchi/version.rb +1 -1
  32. data/lib/samagotchi/web/app.rb +18 -7
  33. data/lib/samagotchi/web/public/activity.js +6 -1
  34. data/lib/samagotchi/web/public/app.js +39 -6
  35. data/lib/samagotchi/web/public/index.html +8 -1
  36. data/lib/samagotchi/web/public/notify.js +16 -3
  37. data/lib/samagotchi/web/public/question_cards.js +3 -1
  38. data/lib/samagotchi/web/public/sessions_list.js +37 -0
  39. data/lib/samagotchi/web/public/turn_view.js +6 -9
  40. metadata +2 -1
@@ -24,19 +24,16 @@ import * as model from "./turn_model.js";
24
24
  import { createHold } from "./hold.js";
25
25
 
26
26
  // A row's status (live, or a saved tool record's on reload): running,
27
- // error, stopped (a task_wait the user's Stop ended), else ok ("done").
27
+ // error, stopped (a task_wait the user's Stop ended), blocked (a guardrail
28
+ // denied it), else ok ("done").
29
+ const NAMED_STATUSES = ["running", "error", "stopped", "blocked"];
30
+
28
31
  function activityStatusClass(status) {
29
- if (status === "running") return "running";
30
- if (status === "error") return "error";
31
- if (status === "stopped") return "stopped";
32
- return "ok";
32
+ return NAMED_STATUSES.includes(status) ? status : "ok";
33
33
  }
34
34
 
35
35
  function activityStatusLabel(status) {
36
- if (status === "running") return "running";
37
- if (status === "error") return "error";
38
- if (status === "stopped") return "stopped";
39
- return "done";
36
+ return NAMED_STATUSES.includes(status) ? status : "done";
40
37
  }
41
38
 
42
39
  // A live tool row filled from its activity row (status, title, output).
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.13.0
4
+ version: 0.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Dedov
@@ -394,6 +394,7 @@ files:
394
394
  - lib/samagotchi/update_command.rb
395
395
  - lib/samagotchi/update_hint.rb
396
396
  - lib/samagotchi/used_memories.rb
397
+ - lib/samagotchi/utf8_default.rb
397
398
  - lib/samagotchi/version.rb
398
399
  - lib/samagotchi/vision_context.rb
399
400
  - lib/samagotchi/vision_support.rb