openclacky 0.9.17 → 0.9.18

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 (57) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -0
  3. data/lib/clacky/agent/cost_tracker.rb +0 -1
  4. data/lib/clacky/agent/hook_manager.rb +0 -1
  5. data/lib/clacky/agent/message_compressor.rb +0 -1
  6. data/lib/clacky/agent/message_compressor_helper.rb +0 -1
  7. data/lib/clacky/agent/session_serializer.rb +0 -1
  8. data/lib/clacky/agent/skill_manager.rb +0 -1
  9. data/lib/clacky/brand_config.rb +0 -1
  10. data/lib/clacky/client.rb +0 -1
  11. data/lib/clacky/default_skills/channel-setup/feishu_setup.rb +0 -2
  12. data/lib/clacky/plain_ui_controller.rb +0 -1
  13. data/lib/clacky/server/browser_manager.rb +0 -1
  14. data/lib/clacky/server/channel/adapters/feishu/adapter.rb +0 -1
  15. data/lib/clacky/server/channel/adapters/feishu/bot.rb +0 -1
  16. data/lib/clacky/server/channel/adapters/feishu/message_parser.rb +0 -1
  17. data/lib/clacky/server/channel/adapters/feishu/ws_client.rb +0 -1
  18. data/lib/clacky/server/channel/adapters/wecom/adapter.rb +0 -1
  19. data/lib/clacky/server/channel/adapters/wecom/ws_client.rb +0 -1
  20. data/lib/clacky/server/channel/adapters/weixin/adapter.rb +0 -1
  21. data/lib/clacky/server/channel/adapters/weixin/api_client.rb +0 -1
  22. data/lib/clacky/server/channel/channel_manager.rb +0 -1
  23. data/lib/clacky/server/channel/channel_ui_controller.rb +0 -1
  24. data/lib/clacky/server/http_server.rb +0 -1
  25. data/lib/clacky/server/server_master.rb +0 -1
  26. data/lib/clacky/server/session_registry.rb +0 -1
  27. data/lib/clacky/server/web_ui_controller.rb +0 -1
  28. data/lib/clacky/session_manager.rb +0 -1
  29. data/lib/clacky/skill.rb +0 -1
  30. data/lib/clacky/skill_loader.rb +4 -1
  31. data/lib/clacky/tools/browser.rb +0 -1
  32. data/lib/clacky/tools/file_reader.rb +0 -1
  33. data/lib/clacky/tools/grep.rb +0 -1
  34. data/lib/clacky/tools/run_project.rb +0 -1
  35. data/lib/clacky/tools/todo_manager.rb +0 -1
  36. data/lib/clacky/ui2/components/command_suggestions.rb +0 -1
  37. data/lib/clacky/ui2/components/inline_input.rb +0 -1
  38. data/lib/clacky/ui2/components/input_area.rb +0 -1
  39. data/lib/clacky/ui2/components/message_component.rb +0 -1
  40. data/lib/clacky/ui2/components/modal_component.rb +0 -1
  41. data/lib/clacky/ui2/components/todo_area.rb +0 -1
  42. data/lib/clacky/ui2/components/tool_component.rb +0 -1
  43. data/lib/clacky/ui2/components/welcome_banner.rb +0 -1
  44. data/lib/clacky/ui2/markdown_renderer.rb +0 -1
  45. data/lib/clacky/ui2/progress_indicator.rb +0 -1
  46. data/lib/clacky/ui2/screen_buffer.rb +0 -1
  47. data/lib/clacky/ui2/theme_manager.rb +0 -1
  48. data/lib/clacky/ui2/themes/base_theme.rb +0 -1
  49. data/lib/clacky/ui2/ui_controller.rb +0 -1
  50. data/lib/clacky/utils/arguments_parser.rb +0 -1
  51. data/lib/clacky/utils/gitignore_parser.rb +0 -1
  52. data/lib/clacky/utils/limit_stack.rb +0 -1
  53. data/lib/clacky/utils/model_pricing.rb +0 -1
  54. data/lib/clacky/version.rb +1 -1
  55. data/scripts/install.sh +215 -494
  56. data/scripts/install_full.sh +891 -0
  57. metadata +2 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1dd996048847d73d0a71f8d4833f338e4c5ae2a58c6228122b817039f2d9fda4
4
- data.tar.gz: 2003df86f0c4446d6f3d6b7d0c14eef19cc05246735acdd1f79910a0cfb0a324
3
+ metadata.gz: 538f6014a8386fcddf69dbf69efd162a00ad594d776b812eba5ac04f98953995
4
+ data.tar.gz: 4d9952dbbf2e20d1a598b136a0f01e821a1e53391240c197afe60e3570d4bfce
5
5
  SHA512:
6
- metadata.gz: ab9f7d2b510bdf5dc4736723dbfa602968a584f2d097d4747af4f5c74247f494e66d32a0420c7f7aa4b5e87662d5662671ab3c56e12bdb627bd7b4766504fda9
7
- data.tar.gz: 4e5543ac5c01d46b5be821769c1505de6797746991fa9605788a1036ed334fa03d6a3c2d7546706dcd0bde5595d94812196acbd51df8e56008c7ba493c1058ec
6
+ metadata.gz: 8ed52fb94f805bc83c8ab996c9a1f01635665b054750900623002edc29a0197c9ab99be08d192e2f1f1040c8665451e155d9878fec5a71c213d7c3130fbbb956
7
+ data.tar.gz: 248569c522a59c37c3bda8342141be750609ca4fca996a8d563fcb953e6dcb1446fbc379082691b5503679d26d9168aa8e2503f7b169b3b4daeafa9428b7cf5b
data/CHANGELOG.md CHANGED
@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.9.18] - 2026-03-28
11
+
12
+ ### Fixed
13
+ - **Brand skill config now reloads from disk on every `load_all`**: brand skills installed or activated after the initial startup were previously invisible until restart — the skill loader now refreshes `BrandConfig` each time it loads skills, so newly installed brand skills take effect immediately
14
+
15
+ ### More
16
+ - Remove `private` keyword from all internal classes to improve Ruby 2.6 compatibility
17
+ - Rename `install.sh` → `install_full.sh`; promote `install_simple.sh` → `install.sh` as the default entry point
18
+
10
19
  ## [0.9.17] - 2026-03-27
11
20
 
12
21
  ### Added
@@ -84,7 +84,6 @@ module Clacky
84
84
  # Simple approximation: characters / 4 (English text)
85
85
 
86
86
 
87
- private
88
87
 
89
88
  # Collect token usage data for current iteration and return it.
90
89
  # Does NOT call @ui directly — the caller is responsible for displaying
@@ -51,7 +51,6 @@ module Clacky
51
51
  end
52
52
  end
53
53
 
54
- private
55
54
 
56
55
  def validate_event!(event)
57
56
  return if HOOK_EVENTS.include?(event)
@@ -108,7 +108,6 @@ module Clacky
108
108
  [system_msg, *parsed_messages, *safe_recent].compact
109
109
  end
110
110
 
111
- private
112
111
 
113
112
  def parse_compressed_result(result, chunk_path: nil)
114
113
  # Return the compressed result as a single assistant message
@@ -214,7 +214,6 @@ module Clacky
214
214
  end
215
215
  end
216
216
 
217
- private
218
217
 
219
218
  # Returns true if msg is a tool result, regardless of storage format.
220
219
  # Canonical: role:"tool" | Legacy Anthropic-native: role:"user" + tool_result blocks
@@ -193,7 +193,6 @@ module Clacky
193
193
  { has_more: has_more }
194
194
  end
195
195
 
196
- private
197
196
 
198
197
  # Render a single non-user message into the UI.
199
198
  # Used by both the normal round-based replay and the compressed-session fallback.
@@ -258,7 +258,6 @@ module Clacky
258
258
  @ui&.show_info("Injected skill content for /#{skill.identifier}")
259
259
  end
260
260
 
261
- private
262
261
 
263
262
  # Find skills whose identifiers are similar to the given name.
264
263
  # Uses substring matching first, then character overlap as a fallback.
@@ -862,7 +862,6 @@ module Clacky
862
862
  }
863
863
  end
864
864
 
865
- private
866
865
 
867
866
  def to_yaml
868
867
  data = {}
data/lib/clacky/client.rb CHANGED
@@ -121,7 +121,6 @@ module Clacky
121
121
  model_str.match?(/claude(?:-3[-.]?[5-9]|-[4-9]|-sonnet-[34])/)
122
122
  end
123
123
 
124
- private
125
124
 
126
125
  # ── Bedrock Converse request / response ───────────────────────────────────
127
126
 
@@ -104,7 +104,6 @@ class ToolClient
104
104
  raise "ToolClient connection failed: #{e.message}"
105
105
  end
106
106
 
107
- private
108
107
 
109
108
  def http
110
109
  return @http if @http
@@ -286,7 +285,6 @@ class FeishuApiClient
286
285
  get_json("#{FEISHU_API_BASE}/app/#{app_id}")
287
286
  end
288
287
 
289
- private
290
288
 
291
289
  # Execute a GET fetch in the browser page context.
292
290
  # Uses window.csrfToken — required by all /developers/v1/ endpoints.
@@ -135,7 +135,6 @@ module Clacky
135
135
  def set_input_tips(message, type: :info); end
136
136
  def stop; end
137
137
 
138
- private
139
138
 
140
139
  def puts_line(text)
141
140
  @mutex.synchronize do
@@ -190,7 +190,6 @@ module Clacky
190
190
  # ---------------------------------------------------------------------------
191
191
  # Private
192
192
  # ---------------------------------------------------------------------------
193
- private
194
193
 
195
194
  def load_config
196
195
  return {} unless File.exist?(BROWSER_CONFIG_PATH)
@@ -143,7 +143,6 @@ module Clacky
143
143
  errors
144
144
  end
145
145
 
146
- private
147
146
 
148
147
  # Handle incoming WebSocket event
149
148
  # @param raw_event [Hash] Raw event data
@@ -160,7 +160,6 @@ module Clacky
160
160
  end
161
161
  end
162
162
 
163
- private
164
163
 
165
164
  # Build message content and type based on text content.
166
165
  # Uses interactive card (schema 2.0) for code blocks and tables,
@@ -42,7 +42,6 @@ module Clacky
42
42
  end
43
43
  end
44
44
 
45
- private
46
45
 
47
46
  # Parse message.receive event
48
47
  # @return [Hash, nil]
@@ -51,7 +51,6 @@ module Clacky
51
51
  @ws_socket&.close rescue nil
52
52
  end
53
53
 
54
- private
55
54
 
56
55
  # Timeout for IO.select on the read loop. Feishu server sends pings every
57
56
  # @ping_interval seconds (default 90s). Allow two missed pings before
@@ -74,7 +74,6 @@ module Clacky
74
74
  errors
75
75
  end
76
76
 
77
- private
78
77
 
79
78
  def handle_raw_message(raw)
80
79
  msgtype = raw["msgtype"]
@@ -115,7 +115,6 @@ module Clacky
115
115
  raise
116
116
  end
117
117
 
118
- private
119
118
 
120
119
  # Timeout for IO.select on the read loop. If no data arrives within this
121
120
  # window we treat the connection as dead and reconnect. This catches the
@@ -177,7 +177,6 @@ module Clacky
177
177
  false
178
178
  end
179
179
 
180
- private
181
180
 
182
181
  def process_message(msg)
183
182
  # Only process inbound USER messages (message_type 1 = USER)
@@ -173,7 +173,6 @@ module Clacky
173
173
  aes_ecb_decrypt(encrypted_bytes, raw_aes_key)
174
174
  end
175
175
 
176
- private
177
176
 
178
177
  # Full upload pipeline: encrypt → getuploadurl → CDN PUT → return CDNMedia hash.
179
178
  def upload_media(raw_bytes:, file_name:, media_type:, to_user_id:)
@@ -96,7 +96,6 @@ module Clacky
96
96
  end
97
97
  end
98
98
 
99
- private
100
99
 
101
100
  def start_adapter(platform)
102
101
  klass = Adapters.find(platform)
@@ -166,7 +166,6 @@ module Clacky
166
166
  def set_input_tips(message, type: :info); end
167
167
  def stop; end
168
168
 
169
- private
170
169
 
171
170
  def send_text(text)
172
171
  text = text.to_s.gsub(/<think>[\s\S]*?<\/think>\n*/i, "").strip
@@ -299,7 +299,6 @@ module Clacky
299
299
  server.start
300
300
  end
301
301
 
302
- private
303
302
 
304
303
  # ── Router ────────────────────────────────────────────────────────────────
305
304
 
@@ -106,7 +106,6 @@ module Clacky
106
106
  remove_pid_file
107
107
  end
108
108
 
109
- private
110
109
 
111
110
  # Spawn a fresh Ruby process that loads the (possibly updated) gem from disk.
112
111
  # The listen socket is inherited via its file descriptor number.
@@ -187,7 +187,6 @@ module Clacky
187
187
  end
188
188
  end
189
189
 
190
- private
191
190
 
192
191
  # Normalize source field from a disk session hash.
193
192
  # "system" is a legacy value renamed to "setup" — treat them as equivalent.
@@ -288,7 +288,6 @@ module Clacky
288
288
  emit("server_stop")
289
289
  end
290
290
 
291
- private
292
291
 
293
292
  # Generate a short human-readable summary for a tool call display.
294
293
  # Delegates to each tool's own format_call method when available.
@@ -108,7 +108,6 @@ module Clacky
108
108
  end.size
109
109
  end
110
110
 
111
- private
112
111
 
113
112
  def ensure_sessions_dir
114
113
  FileUtils.mkdir_p(@sessions_dir) unless Dir.exist?(@sessions_dir)
data/lib/clacky/skill.rb CHANGED
@@ -327,7 +327,6 @@ module Clacky
327
327
  end
328
328
  end
329
329
 
330
- private
331
330
 
332
331
  def load_skill
333
332
  if @brand_skill
@@ -42,6 +42,10 @@ module Clacky
42
42
  # Clears previously loaded skills before loading to ensure idempotency
43
43
  # @return [Array<Skill>] Loaded skills
44
44
  def load_all
45
+ # Always refresh brand_config from disk so newly installed/activated brand
46
+ # skills are visible even if this SkillLoader was created before the change.
47
+ @brand_config = Clacky::BrandConfig.load
48
+
45
49
  # Clear existing skills to ensure idempotent reloading
46
50
  clear
47
51
 
@@ -297,7 +301,6 @@ module Clacky
297
301
  true
298
302
  end
299
303
 
300
- private
301
304
 
302
305
  def load_skills_from_directory(dir, source_type)
303
306
  return [] unless dir.exist?
@@ -192,7 +192,6 @@ module Clacky
192
192
  }.compact
193
193
  end
194
194
 
195
- private
196
195
 
197
196
  BROWSER_CONFIG_PATH = File.expand_path("~/.clacky/browser.yml").freeze
198
197
 
@@ -313,7 +313,6 @@ module Clacky
313
313
  end
314
314
  end
315
315
 
316
- private
317
316
 
318
317
  # List first-level directory contents (files and directories)
319
318
  private def list_directory_contents(path)
@@ -267,7 +267,6 @@ module Clacky
267
267
  compact
268
268
  end
269
269
 
270
- private
271
270
 
272
271
  def search_file(file, regex, context_lines, max_matches)
273
272
  matches = []
@@ -100,7 +100,6 @@ module Clacky
100
100
  end
101
101
  end
102
102
 
103
- private
104
103
 
105
104
  def start_project
106
105
  config = load_project_config
@@ -98,7 +98,6 @@ module Clacky
98
98
  end
99
99
  end
100
100
 
101
- private
102
101
 
103
102
  def load_todos
104
103
  @todos
@@ -185,7 +185,6 @@ module Clacky
185
185
  flush
186
186
  end
187
187
 
188
- private
189
188
 
190
189
  # Update the complete commands list (system + skills)
191
190
  private def update_commands
@@ -176,7 +176,6 @@ module Clacky
176
176
  @result_queue = nil
177
177
  end
178
178
 
179
- private
180
179
 
181
180
  def handle_enter
182
181
  result = expand_placeholders(current_line)
@@ -624,7 +624,6 @@ module Clacky
624
624
  end
625
625
  end
626
626
 
627
- private
628
627
 
629
628
  # Update command suggestions based on current input
630
629
  # Shows suggestions when input starts with /
@@ -32,7 +32,6 @@ module Clacky
32
32
  end
33
33
  end
34
34
 
35
- private
36
35
 
37
36
  # Render user message
38
37
  # @param content [String] Message content
@@ -87,7 +87,6 @@ module Clacky
87
87
  ""
88
88
  end
89
89
 
90
- private
91
90
 
92
91
  # Show menu mode
93
92
  private def show_menu_mode(start_row, start_col)
@@ -92,7 +92,6 @@ module Clacky
92
92
  @height = 0
93
93
  end
94
94
 
95
- private
96
95
 
97
96
  # Truncate text to fit width
98
97
  def truncate_text(text, max_width)
@@ -34,7 +34,6 @@ module Clacky
34
34
  end
35
35
  end
36
36
 
37
- private
38
37
 
39
38
  # Render tool call
40
39
  # @param data [Hash] Tool call data
@@ -127,7 +127,6 @@ module Clacky
127
127
  )
128
128
  end
129
129
 
130
- private
131
130
 
132
131
  # Returns the colourised logo block.
133
132
  # - Branded install: dynamically generated artii ASCII art for the brand name
@@ -49,7 +49,6 @@ module Clacky
49
49
  content.match?(/^---+$/) # Horizontal rules
50
50
  end
51
51
 
52
- private
53
52
 
54
53
  # Get theme-aware colors for markdown rendering
55
54
  # @return [Hash] Color configuration for tty-markdown
@@ -43,7 +43,6 @@ module Clacky
43
43
  puts "" # Add newline after finishing
44
44
  end
45
45
 
46
- private
47
46
 
48
47
  def print_thinking_status(text)
49
48
  print "\e[u" # Restore cursor position (to after [..] symbol)
@@ -255,7 +255,6 @@ module Clacky
255
255
  $stdout.flush
256
256
  end
257
257
 
258
- private
259
258
 
260
259
  # Ensure a string is valid UTF-8.
261
260
  # stdin stays in UTF-8 mode so getc returns complete characters (including CJK).
@@ -75,7 +75,6 @@ module Clacky
75
75
  @themes[name.to_sym] = theme_class
76
76
  end
77
77
 
78
- private
79
78
 
80
79
  def register_default_themes
81
80
  register_theme(:hacker, Themes::HackerTheme)
@@ -88,7 +88,6 @@ module Clacky
88
88
  @is_dark_background.nil? ? true : @is_dark_background
89
89
  end
90
90
 
91
- private
92
91
 
93
92
  # Validate that subclass has defined required constants
94
93
  def validate_theme_definition!
@@ -813,7 +813,6 @@ module Clacky
813
813
  end
814
814
  end
815
815
 
816
- private
817
816
 
818
817
  # Build command output lines snapshot from the shared progress buffer
819
818
  private def build_command_output_lines
@@ -27,7 +27,6 @@ module Clacky
27
27
  end
28
28
  end
29
29
 
30
- private
31
30
 
32
31
  # Simple JSON repair: complete brackets and quotes, and remove XML contamination
33
32
  def self.repair_json(json_str)
@@ -31,7 +31,6 @@ module Clacky
31
31
  false
32
32
  end
33
33
 
34
- private
35
34
 
36
35
  def parse_gitignore(path)
37
36
  File.readlines(path, chomp: true).each do |line|
@@ -72,7 +72,6 @@ module Clacky
72
72
  @items.each(&block)
73
73
  end
74
74
 
75
- private
76
75
 
77
76
  def trim_if_needed
78
77
  if @items.size > @max_size
@@ -212,7 +212,6 @@ module Clacky
212
212
  end
213
213
  end
214
214
 
215
- private
216
215
 
217
216
  # Normalize model name to match pricing table keys
218
217
  def normalize_model_name(model)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Clacky
4
- VERSION = "0.9.17"
4
+ VERSION = "0.9.18"
5
5
  end