clacky 0.5.0 → 0.5.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9c76e82a2f70e2bb34e98a8c81b7cf9a7c6f561d3218e32c44b4191160614279
4
- data.tar.gz: b5aa7eb4906ac3737c58e17a9c64763dbf287c2b453b7dcc8d4db0ac64c6a241
3
+ metadata.gz: 983ad39db251444ddf4900f5a5d969c93e0b74cb7f9f73e7949ce3e05d7e8e3f
4
+ data.tar.gz: dae5536d6035f67546136f12ffe1fc52d602bdffc8dd5eeba120fec2313c4cd7
5
5
  SHA512:
6
- metadata.gz: 06c9e6dcff8dd3033145fa7945820870432265ce00cbe32728e09fccc99b698c7c7431f9cf8a887c1f249c1538f6fbfbc0e10d5a506b5d89652daa315c9ae053
7
- data.tar.gz: d374692b73182a5c844a3a1c528a5677bcba751063afe6b2604b037314afd6e4bfc9ef1121ebdc30acb49336a0a914b3035f46d705ad0816ef1a32371436c175
6
+ metadata.gz: c87cfc2c5823a2321a1a85a8fda96ecadc4cc4a9e2bc69b60705e7dc498d4212d23a26ec5b625c1b2170712074ddc15b015eea4eae51ff15821ebb1c6378fc93
7
+ data.tar.gz: 8cf8d948c812075b068479e25737a0d43999831f2dea87a018d6d62fe8c1049d96bb27076f88173ed91d4bd4ae1939669d768402ee9e8ce8e5c215c14014d909
metadata CHANGED
@@ -1,137 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clacky
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
- - windy
8
- bindir: exe
7
+ - ClackyAI Team
8
+ bindir: bin
9
9
  cert_chain: []
10
10
  date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
- name: faraday
13
+ name: openclacky
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
- - - "~>"
16
+ - - ">="
17
17
  - !ruby/object:Gem::Version
18
- version: '2.0'
18
+ version: 0.5.0
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
- - - "~>"
23
+ - - ">="
24
24
  - !ruby/object:Gem::Version
25
- version: '2.0'
26
- - !ruby/object:Gem::Dependency
27
- name: thor
28
- requirement: !ruby/object:Gem::Requirement
29
- requirements:
30
- - - "~>"
31
- - !ruby/object:Gem::Version
32
- version: '1.3'
33
- type: :runtime
34
- prerelease: false
35
- version_requirements: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - "~>"
38
- - !ruby/object:Gem::Version
39
- version: '1.3'
40
- - !ruby/object:Gem::Dependency
41
- name: tty-prompt
42
- requirement: !ruby/object:Gem::Requirement
43
- requirements:
44
- - - "~>"
45
- - !ruby/object:Gem::Version
46
- version: '0.23'
47
- type: :runtime
48
- prerelease: false
49
- version_requirements: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - "~>"
52
- - !ruby/object:Gem::Version
53
- version: '0.23'
54
- - !ruby/object:Gem::Dependency
55
- name: tty-spinner
56
- requirement: !ruby/object:Gem::Requirement
57
- requirements:
58
- - - "~>"
59
- - !ruby/object:Gem::Version
60
- version: '0.9'
61
- type: :runtime
62
- prerelease: false
63
- version_requirements: !ruby/object:Gem::Requirement
64
- requirements:
65
- - - "~>"
66
- - !ruby/object:Gem::Version
67
- version: '0.9'
68
- - !ruby/object:Gem::Dependency
69
- name: diffy
70
- requirement: !ruby/object:Gem::Requirement
71
- requirements:
72
- - - "~>"
73
- - !ruby/object:Gem::Version
74
- version: '3.4'
75
- type: :runtime
76
- prerelease: false
77
- version_requirements: !ruby/object:Gem::Requirement
78
- requirements:
79
- - - "~>"
80
- - !ruby/object:Gem::Version
81
- version: '3.4'
82
- description: Clacky is a Ruby CLI tool for interacting with Claude AI API, providing
83
- an easy way to have conversations with Claude from your terminal.
25
+ version: 0.5.0
26
+ description: This is a transitional gem that depends on openclacky. The clacky project
27
+ has been renamed to openclacky. Installing this gem will automatically install openclacky.
84
28
  email:
85
- - yafei@dao42.com
29
+ - support@clacky.ai
86
30
  executables: []
87
31
  extensions: []
88
32
  extra_rdoc_files: []
89
- files:
90
- - ".clackyrules"
91
- - ".rspec"
92
- - ".rubocop.yml"
93
- - CHANGELOG.md
94
- - CODE_OF_CONDUCT.md
95
- - LICENSE.txt
96
- - README.md
97
- - Rakefile
98
- - lib/clacky.rb
99
- - lib/clacky/agent.rb
100
- - lib/clacky/agent_config.rb
101
- - lib/clacky/cli.rb
102
- - lib/clacky/client.rb
103
- - lib/clacky/config.rb
104
- - lib/clacky/conversation.rb
105
- - lib/clacky/hook_manager.rb
106
- - lib/clacky/progress_indicator.rb
107
- - lib/clacky/session_manager.rb
108
- - lib/clacky/thinking_verbs.rb
109
- - lib/clacky/tool_registry.rb
110
- - lib/clacky/tools/base.rb
111
- - lib/clacky/tools/edit.rb
112
- - lib/clacky/tools/file_reader.rb
113
- - lib/clacky/tools/glob.rb
114
- - lib/clacky/tools/grep.rb
115
- - lib/clacky/tools/run_project.rb
116
- - lib/clacky/tools/safe_shell.rb
117
- - lib/clacky/tools/shell.rb
118
- - lib/clacky/tools/todo_manager.rb
119
- - lib/clacky/tools/trash_manager.rb
120
- - lib/clacky/tools/web_fetch.rb
121
- - lib/clacky/tools/web_search.rb
122
- - lib/clacky/tools/write.rb
123
- - lib/clacky/utils/arguments_parser.rb
124
- - lib/clacky/utils/limit_stack.rb
125
- - lib/clacky/utils/path_helper.rb
126
- - lib/clacky/version.rb
127
- - sig/clacky.rbs
128
- homepage: https://github.com/yafeilee/clacky
33
+ files: []
34
+ homepage: https://github.com/clacky-ai/open-clacky
129
35
  licenses:
130
36
  - MIT
131
37
  metadata:
132
- homepage_uri: https://github.com/yafeilee/clacky
133
- source_code_uri: https://github.com/yafeilee/clacky
134
- changelog_uri: https://github.com/yafeilee/clacky/blob/main/CHANGELOG.md
38
+ homepage_uri: https://github.com/clacky-ai/open-clacky
39
+ source_code_uri: https://github.com/clacky-ai/open-clacky
40
+ changelog_uri: https://github.com/clacky-ai/open-clacky/blob/main/CHANGELOG.md
135
41
  rdoc_options: []
136
42
  require_paths:
137
43
  - lib
@@ -148,5 +54,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
148
54
  requirements: []
149
55
  rubygems_version: 3.6.9
150
56
  specification_version: 4
151
- summary: A command-line interface for Claude AI
57
+ summary: Legacy name for openclacky gem
152
58
  test_files: []
data/.clackyrules DELETED
@@ -1,80 +0,0 @@
1
- # Clacky Project Rules (.clackyrules)
2
-
3
- ## Project Overview
4
- This is the `clacky` Ruby gem - a command-line interface for interacting with AI models (Claude, OpenAI, etc.).
5
- It provides chat functionality and autonomous AI agent capabilities with tool use.
6
-
7
- ## Project Structure
8
- - `lib/clacky/` - Main gem source code
9
- - `cli.rb` - Command-line interface using Thor
10
- - `agent.rb` - Core AI agent with tool execution
11
- - `tools/` - Built-in tools (file operations, web search, shell, etc.)
12
- - `client.rb` - API client for AI models
13
- - `config.rb` - Configuration management
14
- - `bin/` - Development executables
15
- - `spec/` - RSpec test suite
16
- - `clacky.gemspec` - Gem specification
17
-
18
- ## Development Guidelines
19
-
20
- ### Code Style
21
- - Follow Ruby conventions and best practices
22
- - Use frozen string literals: `# frozen_string_literal: true`
23
- - Keep classes focused and single-responsibility
24
- - Use meaningful variable and method names
25
- - Add descriptive comments for complex logic
26
-
27
- ### Architecture Patterns
28
- - Tools inherit from `Clacky::Tools::Base`
29
- - Each tool defines: `tool_name`, `tool_description`, `tool_category`, `tool_parameters`
30
- - Agent uses React pattern (Reason-Act-Observe) for task execution
31
- - Configuration is managed through `Clacky::Config`
32
- - CLI commands use Thor framework
33
-
34
- ### Testing
35
- - Use RSpec for testing
36
- - Test files in `spec/` directory
37
- - **IMPORTANT**: Always run `bundle exec rspec` to verify tests pass after making changes
38
- - All tests must pass before considering a task complete
39
- - Maintain good test coverage
40
- - When modifying existing functionality, ensure related tests still pass
41
- - When adding new features, consider adding corresponding tests
42
-
43
- ### Tool Development
44
- When adding new tools:
45
- 1. Create class in `lib/clacky/tools/`
46
- 2. Inherit from `Clacky::Tools::Base`
47
- 3. Define required class attributes
48
- 4. Implement `execute` method
49
- 5. Add optional `format_call` and `format_result` methods
50
- 6. Require in `lib/clacky.rb`
51
-
52
- ### Agent Behavior
53
- - TODO manager is for planning only - must execute tasks after planning
54
- - Always use tools to create/modify files, don't just return code
55
- - Maintain conversation context across tasks
56
- - Follow cost and iteration limits
57
- - Support different permission modes (confirm_all, confirm_edits, auto_approve, plan_only)
58
-
59
- ## Dependencies
60
- - Ruby >= 3.1.0
61
- - faraday (~> 2.0) - HTTP client
62
- - thor (~> 1.3) - CLI framework
63
- - tty-prompt (~> 0.23) - Interactive prompts
64
- - tty-spinner (~> 0.9) - Progress indicators
65
- - diffy (~> 3.4) - Text diffs
66
-
67
- ## Important Notes
68
- - This gem is designed to work with OpenAI-compatible APIs
69
- - Security features include safe shell execution and path validation
70
- - Agent includes cost control and message compression features
71
- - Built-in tools cover file operations, web search, code execution, and project management
72
-
73
- ## Execution Binary
74
- - Development: `bin/clacky` (in repository)
75
- - Installed gem: `clacky` command globally available
76
-
77
- ## Configuration
78
- - Stores API keys and settings in user's home directory
79
- - Supports multiple AI model providers
80
- - Configurable through `clacky config set` command
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --format documentation
2
- --color
3
- --require spec_helper
data/.rubocop.yml DELETED
@@ -1,8 +0,0 @@
1
- AllCops:
2
- TargetRubyVersion: 3.1
3
-
4
- Style/StringLiterals:
5
- EnforcedStyle: double_quotes
6
-
7
- Style/StringLiteralsInInterpolation:
8
- EnforcedStyle: double_quotes
data/CHANGELOG.md DELETED
@@ -1,74 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file.
4
-
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
-
8
- ## [Unreleased]
9
-
10
- ## [0.5.0] - 2026-01-11
11
-
12
- ### Added
13
- - **Agent Mode**: Autonomous AI agent with tool execution capabilities
14
- - **Built-in Tools**:
15
- - `safe_shell` - Safe shell command execution with security checks
16
- - `file_reader` - Read file contents
17
- - `write` - Create/overwrite files with diff preview
18
- - `edit` - Precise file editing with string replacement
19
- - `glob` - Find files using glob patterns
20
- - `grep` - Search file contents with regex
21
- - `web_search` - Search the web for information
22
- - `web_fetch` - Fetch and parse web pages
23
- - `todo_manager` - Task planning and tracking
24
- - `run_project` - Project dev server management
25
- - **Session Management**: Save, resume, and list conversation sessions
26
- - **Permission Modes**:
27
- - `auto_approve` - Automatically execute all tools
28
- - `confirm_safes` - Auto-execute safe operations, confirm risky ones
29
- - `confirm_edits` - Confirm file edits only
30
- - `confirm_all` - Confirm every tool execution
31
- - `plan_only` - Plan without executing
32
- - **Cost Control**: Track and limit API usage costs
33
- - **Message Compression**: Automatic conversation history compression
34
- - **Project Rules**: Support for `.clackyrules`, `.cursorrules`, and `CLAUDE.md`
35
- - **Interactive Confirmations**: Preview diffs and shell commands before execution
36
- - **Hook System**: Extensible event hooks for customization
37
-
38
- ### Changed
39
- - Refactored architecture to support autonomous agent capabilities
40
- - Enhanced CLI with agent command and session management
41
- - Improved error handling and retry logic for network failures
42
- - Better progress indicators during API calls and compression
43
-
44
- ### Fixed
45
- - API compatibility issues with different providers
46
- - Session restoration with error recovery
47
- - Tool execution feedback loop
48
- - Safe shell command validation
49
- - Edit tool string matching and preview
50
-
51
- ## [0.1.0] - 2025-12-27
52
-
53
- ### Added
54
- - Initial release of Clacky
55
- - Interactive chat mode for conversations with Claude
56
- - Single message mode for quick queries
57
- - Configuration management for API keys
58
- - Support for Claude 3.5 Sonnet model
59
- - Colorful terminal output with TTY components
60
- - Secure API key storage in `~/.clacky/config.yml`
61
- - Multi-turn conversation support with context preservation
62
- - Command-line interface powered by Thor
63
- - Comprehensive test suite with RSpec
64
-
65
- ### Features
66
- - `clacky chat [MESSAGE]` - Start interactive chat or send single message
67
- - `clacky config set` - Configure API key
68
- - `clacky config show` - Display current configuration
69
- - `clacky version` - Show version information
70
- - Model selection via `--model` option
71
-
72
- [Unreleased]: https://github.com/yafeilee/clacky/compare/v0.5.0...HEAD
73
- [0.5.0]: https://github.com/yafeilee/clacky/compare/v0.1.0...v0.5.0
74
- [0.1.0]: https://github.com/yafeilee/clacky/releases/tag/v0.1.0
data/CODE_OF_CONDUCT.md DELETED
@@ -1,132 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- We as members, contributors, and leaders pledge to make participation in our
6
- community a harassment-free experience for everyone, regardless of age, body
7
- size, visible or invisible disability, ethnicity, sex characteristics, gender
8
- identity and expression, level of experience, education, socio-economic status,
9
- nationality, personal appearance, race, caste, color, religion, or sexual
10
- identity and orientation.
11
-
12
- We pledge to act and interact in ways that contribute to an open, welcoming,
13
- diverse, inclusive, and healthy community.
14
-
15
- ## Our Standards
16
-
17
- Examples of behavior that contributes to a positive environment for our
18
- community include:
19
-
20
- * Demonstrating empathy and kindness toward other people
21
- * Being respectful of differing opinions, viewpoints, and experiences
22
- * Giving and gracefully accepting constructive feedback
23
- * Accepting responsibility and apologizing to those affected by our mistakes,
24
- and learning from the experience
25
- * Focusing on what is best not just for us as individuals, but for the overall
26
- community
27
-
28
- Examples of unacceptable behavior include:
29
-
30
- * The use of sexualized language or imagery, and sexual attention or advances of
31
- any kind
32
- * Trolling, insulting or derogatory comments, and personal or political attacks
33
- * Public or private harassment
34
- * Publishing others' private information, such as a physical or email address,
35
- without their explicit permission
36
- * Other conduct which could reasonably be considered inappropriate in a
37
- professional setting
38
-
39
- ## Enforcement Responsibilities
40
-
41
- Community leaders are responsible for clarifying and enforcing our standards of
42
- acceptable behavior and will take appropriate and fair corrective action in
43
- response to any behavior that they deem inappropriate, threatening, offensive,
44
- or harmful.
45
-
46
- Community leaders have the right and responsibility to remove, edit, or reject
47
- comments, commits, code, wiki edits, issues, and other contributions that are
48
- not aligned to this Code of Conduct, and will communicate reasons for moderation
49
- decisions when appropriate.
50
-
51
- ## Scope
52
-
53
- This Code of Conduct applies within all community spaces, and also applies when
54
- an individual is officially representing the community in public spaces.
55
- Examples of representing our community include using an official email address,
56
- posting via an official social media account, or acting as an appointed
57
- representative at an online or offline event.
58
-
59
- ## Enforcement
60
-
61
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
- reported to the community leaders responsible for enforcement at
63
- [INSERT CONTACT METHOD].
64
- All complaints will be reviewed and investigated promptly and fairly.
65
-
66
- All community leaders are obligated to respect the privacy and security of the
67
- reporter of any incident.
68
-
69
- ## Enforcement Guidelines
70
-
71
- Community leaders will follow these Community Impact Guidelines in determining
72
- the consequences for any action they deem in violation of this Code of Conduct:
73
-
74
- ### 1. Correction
75
-
76
- **Community Impact**: Use of inappropriate language or other behavior deemed
77
- unprofessional or unwelcome in the community.
78
-
79
- **Consequence**: A private, written warning from community leaders, providing
80
- clarity around the nature of the violation and an explanation of why the
81
- behavior was inappropriate. A public apology may be requested.
82
-
83
- ### 2. Warning
84
-
85
- **Community Impact**: A violation through a single incident or series of
86
- actions.
87
-
88
- **Consequence**: A warning with consequences for continued behavior. No
89
- interaction with the people involved, including unsolicited interaction with
90
- those enforcing the Code of Conduct, for a specified period of time. This
91
- includes avoiding interactions in community spaces as well as external channels
92
- like social media. Violating these terms may lead to a temporary or permanent
93
- ban.
94
-
95
- ### 3. Temporary Ban
96
-
97
- **Community Impact**: A serious violation of community standards, including
98
- sustained inappropriate behavior.
99
-
100
- **Consequence**: A temporary ban from any sort of interaction or public
101
- communication with the community for a specified period of time. No public or
102
- private interaction with the people involved, including unsolicited interaction
103
- with those enforcing the Code of Conduct, is allowed during this period.
104
- Violating these terms may lead to a permanent ban.
105
-
106
- ### 4. Permanent Ban
107
-
108
- **Community Impact**: Demonstrating a pattern of violation of community
109
- standards, including sustained inappropriate behavior, harassment of an
110
- individual, or aggression toward or disparagement of classes of individuals.
111
-
112
- **Consequence**: A permanent ban from any sort of public interaction within the
113
- community.
114
-
115
- ## Attribution
116
-
117
- This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
- version 2.1, available at
119
- [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
120
-
121
- Community Impact Guidelines were inspired by
122
- [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
123
-
124
- For answers to common questions about this code of conduct, see the FAQ at
125
- [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
126
- [https://www.contributor-covenant.org/translations][translations].
127
-
128
- [homepage]: https://www.contributor-covenant.org
129
- [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
130
- [Mozilla CoC]: https://github.com/mozilla/diversity
131
- [FAQ]: https://www.contributor-covenant.org/faq
132
- [translations]: https://www.contributor-covenant.org/translations
data/LICENSE.txt DELETED
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2025 windy
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.