ask-solid_errors 0.1.2 → 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: ba92491b11bac63cbf32c9ef78b4245685da5f7250dbe429103d97ea62440dda
4
- data.tar.gz: 6799651969f12c163af3220a2dbbf0007a607aed1b9b40b6c68fe3f701c361d5
3
+ metadata.gz: 97f7f95592c168dbf2e976d888c2b85031b9136c40386da559f8d7abe85abeb3
4
+ data.tar.gz: 5b3d27d615c77cee20f5b093d3841abde30f83af73d988eb6e06521dd8419e0d
5
5
  SHA512:
6
- metadata.gz: cb31e50960076744ae4f559587a9f5a59543a16e7cfe7ff025cc1aebf2ddd895448e6b9d9cd58f4f7d52fde330e1c60af1abd5ef40f2bb9ee36bed84959ee8f7
7
- data.tar.gz: 4e644898ac61e75b9408d009099259f78afaac05202ac711110033c614a18ef8337402a65184ccca010e64086c23cb2b656c86de8a23aa75653e2caf2c55522b
6
+ metadata.gz: 19e64ceac2f115da3cd2b850499e4eb382dd7686b1858f473f2db59bb450c0443e98fd6dc5794f7f961b29e9a0011d2cb2623a54241fd638913a4c9359f0200b
7
+ data.tar.gz: 36e61798a9d9840aaa7573e9ae2e985266e14816833d7abc979e24d7427044a687121af16f57759bd0340d5654eb9150722778d43b706286514511f9b554c580
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.2"
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.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kaka Ruto
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - ">="
17
17
  - !ruby/object:Gem::Version
18
- version: '0.1'
18
+ version: 0.11.3
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: '0.1'
25
+ version: 0.11.3
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: minitest
28
28
  requirement: !ruby/object:Gem::Requirement
@@ -102,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  requirements: []
105
- rubygems_version: 4.0.3
105
+ rubygems_version: 4.0.18
106
106
  specification_version: 4
107
107
  summary: SolidErrors — error tracking stored in your Rails database
108
108
  test_files: []