openclacky 1.3.4 → 1.3.6

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 (65) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +39 -0
  3. data/lib/clacky/agent/fake_tool_call_detector.rb +52 -0
  4. data/lib/clacky/agent/message_compressor.rb +32 -8
  5. data/lib/clacky/agent/message_compressor_helper.rb +113 -12
  6. data/lib/clacky/agent/session_serializer.rb +3 -2
  7. data/lib/clacky/agent/tool_executor.rb +0 -12
  8. data/lib/clacky/agent.rb +74 -12
  9. data/lib/clacky/api_extension.rb +81 -0
  10. data/lib/clacky/api_extension_loader.rb +13 -1
  11. data/lib/clacky/cli.rb +0 -1
  12. data/lib/clacky/client.rb +14 -17
  13. data/lib/clacky/default_agents/_panels/time_machine/panel.js +22 -0
  14. data/lib/clacky/default_agents/base_prompt.md +1 -0
  15. data/lib/clacky/default_extensions/meeting/handler.rb +331 -0
  16. data/lib/clacky/default_extensions/meeting/meeting.js +790 -0
  17. data/lib/clacky/default_extensions/meeting/meta.yml +3 -0
  18. data/lib/clacky/default_extensions/meeting/skills/meeting-summarizer/SKILL.md +44 -0
  19. data/lib/clacky/default_skills/media-gen/SKILL.md +63 -0
  20. data/lib/clacky/default_skills/media-gen/scripts/video_seq.sh +114 -0
  21. data/lib/clacky/json_ui_controller.rb +1 -1
  22. data/lib/clacky/media/base.rb +60 -0
  23. data/lib/clacky/media/dashscope.rb +385 -21
  24. data/lib/clacky/media/gemini.rb +9 -0
  25. data/lib/clacky/media/generator.rb +52 -0
  26. data/lib/clacky/media/openai_compat.rb +166 -0
  27. data/lib/clacky/null_ui_controller.rb +13 -0
  28. data/lib/clacky/plain_ui_controller.rb +1 -1
  29. data/lib/clacky/providers.rb +50 -2
  30. data/lib/clacky/rich_ui/rich_ui_controller.rb +1 -1
  31. data/lib/clacky/server/channel/channel_ui_controller.rb +1 -1
  32. data/lib/clacky/server/http_server.rb +260 -122
  33. data/lib/clacky/server/session_registry.rb +54 -3
  34. data/lib/clacky/server/web_ui_controller.rb +3 -2
  35. data/lib/clacky/session_manager.rb +35 -4
  36. data/lib/clacky/skill_loader.rb +14 -2
  37. data/lib/clacky/tools/terminal/output_cleaner.rb +1 -3
  38. data/lib/clacky/tools/terminal.rb +0 -43
  39. data/lib/clacky/ui2/components/modal_component.rb +1 -1
  40. data/lib/clacky/ui2/layout_manager.rb +0 -5
  41. data/lib/clacky/ui2/progress_handle.rb +0 -3
  42. data/lib/clacky/ui2/ui_controller.rb +140 -40
  43. data/lib/clacky/ui_interface.rb +10 -1
  44. data/lib/clacky/utils/encoding.rb +25 -0
  45. data/lib/clacky/version.rb +1 -1
  46. data/lib/clacky/web/app.css +199 -23
  47. data/lib/clacky/web/components/onboard.js +1 -14
  48. data/lib/clacky/web/components/sidebar.js +1 -3
  49. data/lib/clacky/web/features/backup/store.js +23 -0
  50. data/lib/clacky/web/features/backup/view.js +49 -22
  51. data/lib/clacky/web/features/brand/view.js +8 -5
  52. data/lib/clacky/web/features/channels/store.js +1 -20
  53. data/lib/clacky/web/features/mcp/store.js +1 -20
  54. data/lib/clacky/web/features/profile/store.js +1 -13
  55. data/lib/clacky/web/features/profile/view.js +16 -4
  56. data/lib/clacky/web/features/skills/store.js +6 -21
  57. data/lib/clacky/web/features/tasks/view.js +77 -28
  58. data/lib/clacky/web/features/version/store.js +2 -0
  59. data/lib/clacky/web/i18n.js +46 -3
  60. data/lib/clacky/web/index.html +67 -26
  61. data/lib/clacky/web/sessions.js +177 -87
  62. data/lib/clacky/web/settings.js +34 -2
  63. data/lib/clacky/web/ws-dispatcher.js +12 -4
  64. data/lib/clacky.rb +12 -5
  65. metadata +8 -1
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "ui_interface"
4
+
5
+ module Clacky
6
+ # A UI controller that swallows every event. Used for detached/background
7
+ # subagents whose intermediate output must never reach a real UI stream
8
+ # (e.g. the WebUI chat transcript). All UIInterface methods are inherited
9
+ # as no-ops, so nothing this agent emits is broadcast anywhere.
10
+ class NullUIController
11
+ include Clacky::UIInterface
12
+ end
13
+ end
@@ -117,7 +117,7 @@ module Clacky
117
117
  puts_line("[warn] #{message}")
118
118
  end
119
119
 
120
- def show_error(message, code: nil, top_up_url: nil)
120
+ def show_error(message, code: nil, top_up_url: nil, raw_message: nil)
121
121
  puts_line("[error] #{message}")
122
122
  end
123
123
 
@@ -88,6 +88,30 @@ module Clacky
88
88
  "or-tts-gemini-2-5-pro" => "Gemini 2.5 Pro TTS"
89
89
  },
90
90
  "default_audio_model" => "or-tts-gemini-2-5-flash",
91
+ # Speech-to-text models served by the openclacky gateway, which
92
+ # routes them to Vertex AI Gemini (generateContent with inline
93
+ # audio parts). The gateway returns transcription text.
94
+ "stt_models" => [
95
+ "or-stt-gemini-3-5-flash",
96
+ "or-stt-gemini-1-5-pro"
97
+ ],
98
+ "stt_model_aliases" => {
99
+ "or-stt-gemini-3-5-flash" => "Gemini 3.5 Flash STT",
100
+ "or-stt-gemini-1-5-pro" => "Gemini 1.5 Pro STT"
101
+ },
102
+ "default_stt_model" => "or-stt-gemini-3-5-flash",
103
+ # Video understanding models served by the openclacky gateway, which
104
+ # routes video frames to Gemini (generateContent with inline image
105
+ # parts). The gateway returns analysis text.
106
+ "video_understanding_models" => [
107
+ "or-gemini-3-5-flash",
108
+ "or-gemini-3-1-pro"
109
+ ],
110
+ "video_understanding_model_aliases" => {
111
+ "or-gemini-3-5-flash" => "Gemini 3.5 Flash",
112
+ "or-gemini-3-1-pro" => "Gemini 3.1 Pro"
113
+ },
114
+ "default_video_understanding_model" => "or-gemini-3-5-flash",
91
115
  # Default OCR sidecar — used when the primary model is text-only.
92
116
  # Candidates are derived from the provider's vision-capable models;
93
117
  # this just picks the cheap+fast default to surface in "auto" mode.
@@ -418,7 +442,7 @@ module Clacky
418
442
 
419
443
  }.freeze
420
444
 
421
- MEDIA_KINDS = %w[image video audio].freeze
445
+ MEDIA_KINDS = %w[image video audio stt video_understanding].freeze
422
446
 
423
447
  class << self
424
448
  # Check if a provider preset exists
@@ -549,11 +573,33 @@ module Clacky
549
573
  preset&.dig("audio_model_aliases") || {}
550
574
  end
551
575
 
576
+ def stt_models(provider_id)
577
+ preset = PRESETS[provider_id]
578
+ preset&.dig("stt_models") || []
579
+ end
580
+
581
+ def stt_model_aliases(provider_id)
582
+ preset = PRESETS[provider_id]
583
+ preset&.dig("stt_model_aliases") || {}
584
+ end
585
+
586
+ def video_understanding_models(provider_id)
587
+ preset = PRESETS[provider_id]
588
+ preset&.dig("video_understanding_models") || []
589
+ end
590
+
591
+ def video_understanding_model_aliases(provider_id)
592
+ preset = PRESETS[provider_id]
593
+ preset&.dig("video_understanding_model_aliases") || {}
594
+ end
595
+
552
596
  def media_model_aliases(provider_id, kind)
553
597
  case kind.to_s
554
598
  when "image" then image_model_aliases(provider_id)
555
599
  when "video" then video_model_aliases(provider_id)
556
600
  when "audio" then audio_model_aliases(provider_id)
601
+ when "stt" then stt_model_aliases(provider_id)
602
+ when "video_understanding" then video_understanding_model_aliases(provider_id)
557
603
  else {}
558
604
  end
559
605
  end
@@ -599,13 +645,15 @@ module Clacky
599
645
 
600
646
  # Unified entry for media model lookup by kind.
601
647
  # @param provider_id [String]
602
- # @param kind [String] one of "image" / "video" / "audio"
648
+ # @param kind [String] one of "image" / "video" / "audio" / "stt"
603
649
  # @return [Array<String>]
604
650
  def media_models(provider_id, kind)
605
651
  case kind.to_s
606
652
  when "image" then image_models(provider_id)
607
653
  when "video" then video_models(provider_id)
608
654
  when "audio" then audio_models(provider_id)
655
+ when "stt" then stt_models(provider_id)
656
+ when "video_understanding" then video_understanding_models(provider_id)
609
657
  else []
610
658
  end
611
659
  end
@@ -331,7 +331,7 @@ module Clacky
331
331
  @shell.add_system_message("Warning: #{message}")
332
332
  end
333
333
 
334
- def show_error(message)
334
+ def show_error(message, **)
335
335
  @shell.add_error_message(message.to_s)
336
336
  end
337
337
 
@@ -145,7 +145,7 @@ module Clacky
145
145
  send_text("Warning: #{message}")
146
146
  end
147
147
 
148
- def show_error(message, code: nil, top_up_url: nil)
148
+ def show_error(message, code: nil, top_up_url: nil, raw_message: nil)
149
149
  text = "Error: #{message}"
150
150
  text += "\n#{top_up_url}" if top_up_url
151
151
  send_text(text)