# frozen_string_literal: true # Friendly Ruby version check — must come before anything else so it triggers # during `gem install` when the gemspec is evaluated. if RUBY_VERSION < "2.6.0" abort <<~MSG ✗ Ruby #{RUBY_VERSION} is not supported. OpenClacky requires Ruby >= 2.6.0, but your system is running Ruby #{RUBY_VERSION}. ────────────────────────────────────────────────────────────────────── Recommended: Use the one-line installer (handles Ruby automatically) ────────────────────────────────────────────────────────────────────── /bin/bash -c "$(curl -sSL https://raw.githubusercontent.com/clacky-ai/openclacky/main/scripts/install.sh)" This script will automatically install the correct Ruby version via mise and then install OpenClacky — no manual Ruby upgrade needed. For more details, visit: https://github.com/clacky-ai/openclacky#installation MSG end require_relative "lib/clacky/version" Gem::Specification.new do |spec| spec.name = "openclacky" spec.version = Clacky::VERSION spec.authors = ["windy"] spec.email = ["yafei@dao42.com"] spec.summary = "The most Token-efficient open-source AI Agent — BYOK, Skill-driven, IM-integrated." spec.description = "OpenClacky is a 100% open-source (MIT) AI Agent that matches Claude Code on capability at comparable cost. Built on two years of agentic R&D, it ships with a minimal 16-tool core, near-100% prompt cache hit rate, idle-time auto-compression, and BYOK support for any OpenAI-compatible model. A natural-language Skill system lets you create, evolve, and monetize agent capabilities without writing code, plus first-class integrations with Feishu, WeCom, WeChat, Discord, and Telegram." spec.homepage = "https://github.com/clacky-ai/openclacky" spec.license = "MIT" spec.required_ruby_version = ">= 2.6.0", "< 4.1" spec.metadata["homepage_uri"] = spec.homepage spec.metadata["source_code_uri"] = "https://github.com/clacky-ai/openclacky" spec.metadata["changelog_uri"] = "https://github.com/clacky-ai/openclacky/blob/main/CHANGELOG.md" # Specify which files should be added to the gem when it is released. # The `git ls-files -z` loads the files in the RubyGem that have been added into git. gemspec = File.basename(__FILE__) spec.files = IO.popen(%w[git ls-files -z], chdir: __dir__, err: IO::NULL) do |ls| ls.readlines("\x0", chomp: true).reject do |f| (f == gemspec) || f.start_with?(*%w[bin/ test/ spec/ features/ .git .github appveyor Gemfile]) end end spec.bindir = "bin" spec.executables = ["clacky", "openclacky", "clarky"] spec.require_paths = ["lib"] # Runtime dependencies # faraday >= 2.9 requires Ruby >= 3.0; cap at < 2.9 so Ruby 2.6 gets 2.8.x spec.add_dependency "faraday", ">= 2.0", "< 2.9" spec.add_dependency "faraday-multipart", "~> 1.0" spec.add_dependency "thor", "~> 1.3" spec.add_dependency "tty-prompt", "~> 0.23" spec.add_dependency "tty-spinner", "~> 0.9" spec.add_dependency "diffy", "~> 3.4" spec.add_dependency "pastel", "~> 0.8" spec.add_dependency "tty-screen", "~> 0.8" spec.add_dependency "tty-markdown", "~> 0.7" # base64 is part of Ruby stdlib up to Ruby 3.3; only needed as explicit dep on Ruby 3.4+ spec.add_dependency "base64", ">= 0.1.0" # logger left stdlib in Ruby 4.0; faraday 2.8.x's response/logger.rb does a bare # `require "logger"` so without this the gem can't load on Ruby 4.0+. spec.add_dependency "logger", ">= 1.4" spec.add_dependency "websocket", "~> 1.2" spec.add_dependency "webrick", "~> 1.8" spec.add_dependency "artii", "~> 2.1" # rubyzip 3.x requires Ruby >= 3.0; pin to ~> 2.4.1 for cross-version compatibility spec.add_dependency "rubyzip", "~> 2.4.1" # rouge 4.x requires Ruby >= 2.7; bundler auto-resolves to 3.x on older rubies spec.add_dependency "rouge", ">= 3.14", "< 5.0" spec.add_dependency "ruby_rich", "~> 0.5.2" spec.add_dependency "chunky_png", "~> 1.4" # For more information and examples about making a new gem, check out our # guide at: https://bundler.io/guides/creating_gem.html end