Commit Graph

3 Commits

Author SHA1 Message Date
57701a1701 Add Opencode::ErrorReporter pluggable adapter
Per the same pattern as Opencode::Instrumentation in opencode-ruby:
zero-dependency default (no-op), host plugs an adapter in to route
errors to Rails.error / Honeybadger / Sentry / etc.

Used by Session, Turn, MessageArtifacts (ported in the next commit) to
report swallowed exceptions and degraded paths without coupling the
gem to any specific error-tracking library.

  # config/initializers/opencode.rb
  Opencode::ErrorReporter.adapter = ->(error, **opts) {
    Rails.error.report(error, **opts)
  }
2026-05-20 05:11:00 -07:00
49f1ac7b9d Scaffold opencode-rails gem structure
- opencode-rails.gemspec (Ruby >= 3.2, MIT)
  - runtime: opencode-ruby ~> 0.0.1.alpha1
  - runtime: activerecord/activestorage/activesupport >= 7.1, < 9.0
    Per-sublibrary deps (not the rails umbrella) so host apps don't
    pull in ActionMailer/ActionCable/ActionView just to use this gem.
- lib/opencode-rails.rb (umbrella; requires opencode-ruby then leaves
  then session/turn)
- lib/opencode/rails/version.rb (Opencode::Rails::VERSION = 0.0.1.alpha1)
- Gemfile (sibling-path pull of opencode-ruby for local dev)
- Rakefile, .gitignore

Source files will be ported in the next commit.
2026-05-20 05:09:48 -07:00
341966e398 Initial commit 2026-05-20 12:08:39 +00:00