ask-solid_errors 0.1.1 → 0.1.3

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: 9bc92f1121f81b6a0ed87e8e141a698a13257e12fa6306fbc564032b964c2b2c
4
- data.tar.gz: f25b7fe3b53975150dd5880ca08f1c188b5d2f19d957414a87a186c26c521f82
3
+ metadata.gz: 97f7f95592c168dbf2e976d888c2b85031b9136c40386da559f8d7abe85abeb3
4
+ data.tar.gz: 5b3d27d615c77cee20f5b093d3841abde30f83af73d988eb6e06521dd8419e0d
5
5
  SHA512:
6
- metadata.gz: 61aa60d118cd6f17e7604af52673b5f6e56d1606c31f65edce8145fe9d24e32f34c0c186e780aeb85559bc7e9daa3b6588586cf035bef7166a5703637c21da20
7
- data.tar.gz: 4e5727509ea785da77c7bf989124cec2b1d6a11551fd2cc9536b80a35fc7be7fbf3d2d3a7f6800e3acd44cc2647442a122e4ffca95ae41510fdd2bfc46600a83
6
+ metadata.gz: 19e64ceac2f115da3cd2b850499e4eb382dd7686b1858f473f2db59bb450c0443e98fd6dc5794f7f961b29e9a0011d2cb2623a54241fd638913a4c9359f0200b
7
+ data.tar.gz: 36e61798a9d9840aaa7573e9ae2e985266e14816833d7abc979e24d7427044a687121af16f57759bd0340d5654eb9150722778d43b706286514511f9b554c580
data/CHANGELOG.md ADDED
@@ -0,0 +1,17 @@
1
+ ## [0.1.2] - 2026-06-25
2
+
3
+ ### Changed
4
+ - Gemspec validation test. Infrastructure: rubocop, overcommit, bin/setup, CI matrix, SimpleCov.
5
+ # Changelog
6
+
7
+ ## 0.1.0 (2026-06-10)
8
+
9
+ ### Added
10
+
11
+ - `Ask::SolidErrors.context` — DESCRIPTION, GEM_NAME, QUICK_START for system prompts
12
+ - `Ask::SolidErrors.client` — ClientProxy wrapping `SolidErrors::Error` with ActiveRecord delegation
13
+ - `Ask::SolidErrors.recent`, `.find`, `.unresolved`, `.resolved`, `.by_class`, `.by_severity`, `.search`, `.occurrence_count` — module-level convenience helpers
14
+ - `Ask::SolidErrors::Errors` — structured error knowledge (18 common Rails exceptions, 3 severity levels, database schema documentation)
15
+ - No authentication needed — SolidErrors queries the Rails database directly via ActiveRecord
16
+ - Guard clause `ensure_solid_errors_loaded!` with clear error message if gem is missing
17
+ - Full Minitest test suite with in-memory SQLite (41 tests, 76 assertions)
data/README.md CHANGED
@@ -1,6 +1,11 @@
1
1
  # ask-solid_errors
2
2
 
3
- SolidErrors — error tracking stored in your Rails database
3
+ [![Gem Version](https://badge.fury.io/rb/ask-solid_errors.svg)](https://badge.fury.io/rb/ask-solid_errors)
4
+
5
+ SolidErrors service context for AI agents in the ask-rb ecosystem. It wraps
6
+ the SolidErrors ActiveRecord models so agents can query the error tracking
7
+ data stored in your Rails database, and provides a structured error guide for
8
+ common SolidErrors situations.
4
9
 
5
10
  ## Installation
6
11
 
@@ -8,24 +13,23 @@ SolidErrors — error tracking stored in your Rails database
8
13
  gem "ask-solid_errors"
9
14
  ```
10
15
 
11
- ## Prerequisites
12
-
13
- This gem requires the `solid_errors` gem to be installed and configured in your Rails app:
16
+ This gem has no HTTP client and needs no authentication. It requires the
17
+ `solid_errors` gem and its tables in your Rails app:
14
18
 
15
19
  ```ruby
16
20
  gem "solid_errors"
17
21
  ```
18
22
 
19
- Run the SolidErrors migration:
20
-
21
23
  ```bash
22
24
  bin/rails solid_errors:install:migrations
23
25
  bin/rails db:migrate
24
26
  ```
25
27
 
26
- ## Usage
28
+ ## Quick Start
27
29
 
28
30
  ```ruby
31
+ require "ask-solid_errors"
32
+
29
33
  # Recent errors
30
34
  errors = Ask::SolidErrors.recent(limit: 10)
31
35
  errors.map { |e| { id: e.id, class: e.exception_class, message: e.message.truncate(200) } }
@@ -36,29 +40,40 @@ error.backtrace
36
40
  error.context
37
41
  error.occurrences
38
42
 
39
- # Filter by status
40
- Ask::SolidErrors.unresolved # errors needing attention
41
- Ask::SolidErrors.resolved # previously resolved errors
42
-
43
- # Filter by class or severity
43
+ # Filter by status, class, or severity
44
+ Ask::SolidErrors.unresolved
45
+ Ask::SolidErrors.resolved
44
46
  Ask::SolidErrors.by_class("ActiveRecord::RecordNotFound")
45
47
  Ask::SolidErrors.by_severity("error")
46
48
 
47
- # Search messages
49
+ # Search messages and count occurrences
48
50
  Ask::SolidErrors.search("timeout")
49
-
50
- # Occurrence count
51
51
  Ask::SolidErrors.occurrence_count(error)
52
- Ask::SolidErrors.occurrence_count(42)
53
-
54
- # Low-level client for custom queries
55
- client = Ask::SolidErrors.client
56
- client.where(exception_class: "RuntimeError").order(created_at: :desc)
57
52
  ```
58
53
 
54
+ ## Key entry points
55
+
56
+ - `Ask::SolidErrors.client` - a proxy wrapping `SolidErrors::Error`. Query
57
+ methods return `ActiveRecord::Relation` objects that can be chained further.
58
+ - Convenience helpers: `recent(limit: 10)`, `find(id)`, `unresolved`,
59
+ `resolved`, `by_class(klass)`, `by_severity(severity)`, `search(query)`,
60
+ and `occurrence_count(error)`.
61
+ - `Ask::SolidErrors::Errors` - structured error knowledge for agents:
62
+ guidance by exception class and severity level, plus schema reference.
63
+ - `Ask::SolidErrors::DESCRIPTION`, `GEM_NAME`, and `QUICK_START` - metadata
64
+ constants for system prompts.
65
+
66
+ ## Full documentation
67
+
68
+ The full ask-rb documentation lives at https://ask-rb.github.io/ask-docs.
69
+ [Services: SolidErrors](https://ask-rb.github.io/ask-docs/services/solid_errors)
70
+ covers ask-solid_errors in depth, including the client, error guide, and
71
+ constants. API reference: https://ask-rb.github.io/ask-docs/reference/api.
72
+
59
73
  ## Development
60
74
 
61
- ```bash
75
+ ```
76
+ bundle install
62
77
  bundle exec rake test
63
78
  ```
64
79
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ask
4
4
  module SolidErrors
5
- VERSION = "0.1.1"
5
+ VERSION = "0.1.3"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ask-solid_errors
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kaka Ruto
@@ -9,6 +9,20 @@ bindir: bin
9
9
  cert_chain: []
10
10
  date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: ask-core
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - ">="
17
+ - !ruby/object:Gem::Version
18
+ version: 0.11.3
19
+ type: :runtime
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - ">="
24
+ - !ruby/object:Gem::Version
25
+ version: 0.11.3
12
26
  - !ruby/object:Gem::Dependency
13
27
  name: minitest
14
28
  requirement: !ruby/object:Gem::Requirement
@@ -51,20 +65,6 @@ dependencies:
51
65
  - - "~>"
52
66
  - !ruby/object:Gem::Version
53
67
  version: '13.0'
54
- - !ruby/object:Gem::Dependency
55
- name: ask-core
56
- requirement: !ruby/object:Gem::Requirement
57
- requirements:
58
- - - "~>"
59
- - !ruby/object:Gem::Version
60
- version: '0.1'
61
- type: :runtime
62
- prerelease: false
63
- version_requirements: !ruby/object:Gem::Requirement
64
- requirements:
65
- - - "~>"
66
- - !ruby/object:Gem::Version
67
- version: '0.1'
68
68
  description: Error context for agents via SolidErrors for the ask-rb ecosystem.
69
69
  email:
70
70
  - kaka@myrrlabs.com
@@ -72,6 +72,7 @@ executables: []
72
72
  extensions: []
73
73
  extra_rdoc_files: []
74
74
  files:
75
+ - CHANGELOG.md
75
76
  - LICENSE
76
77
  - README.md
77
78
  - lib/ask-solid_errors.rb
@@ -83,7 +84,10 @@ files:
83
84
  homepage: https://github.com/ask-rb/ask-solid_errors
84
85
  licenses:
85
86
  - MIT
86
- metadata: {}
87
+ metadata:
88
+ homepage_uri: https://github.com/ask-rb/ask-solid_errors
89
+ source_code_uri: https://github.com/ask-rb/ask-solid_errors
90
+ changelog_uri: https://github.com/ask-rb/ask-solid_errors/blob/master/CHANGELOG.md
87
91
  rdoc_options: []
88
92
  require_paths:
89
93
  - lib
@@ -98,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
102
  - !ruby/object:Gem::Version
99
103
  version: '0'
100
104
  requirements: []
101
- rubygems_version: 4.0.3
105
+ rubygems_version: 4.0.18
102
106
  specification_version: 4
103
107
  summary: SolidErrors — error tracking stored in your Rails database
104
108
  test_files: []