agentation 1.0.0
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 +7 -0
- data/LICENSE +21 -0
- data/README.md +118 -0
- data/app/assets/stylesheets/agentation.css +1456 -0
- data/lib/agentation/engine.rb +38 -0
- data/lib/agentation/version.rb +5 -0
- data/lib/agentation/view_helpers.rb +30 -0
- data/lib/agentation.rb +8 -0
- data/lib/generators/agentation/install_generator.rb +71 -0
- data/vendor/javascript/agentation.esm.js +2129 -0
- metadata +96 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 6eb1491cd99c0a2ec3b1a6157d5f7d28bd5fd861a01d9b775a40ed3b1afd32aa
|
|
4
|
+
data.tar.gz: 3997f5bd617d66c616128cac4bfc868b8e078546b21760a6198143486e4c487d
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 45466d835b6320a58e927a60f38edf2eb5ff231c171727c7685ca07306c9821839867d6b182379d7213ed33890ec6dc0d1ee41e3e386488235ebd6e11cd14b1f
|
|
7
|
+
data.tar.gz: a91eeb5d6c53decfa37ef51257861f0b07e9c82ca3177e4780be4d38b4bc5bda9d39d5da385130106227c8601009a816afb36ce7f2ac72cced593e3521ae38fe
|
data/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Agentation
|
|
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 all
|
|
13
|
+
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 THE
|
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# Agentation Ruby Gem
|
|
2
|
+
|
|
3
|
+
A Rails engine that provides a floating toolbar for annotating web pages and collecting structured feedback for AI coding agents.
|
|
4
|
+
|
|
5
|
+
This gem is a Ruby/Rails port of [Agentation](https://agentation.dev/) - the original React-based annotation toolkit created by [Benji Taylor](https://github.com/benjitaylor/agentation).
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
Add to your Gemfile:
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
gem 'agentation'
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Run:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
bundle install
|
|
19
|
+
rails generate agentation:install
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
That's it! The generator automatically:
|
|
23
|
+
- Adds the stylesheet to your application.css
|
|
24
|
+
- Adds the JavaScript import to application.js
|
|
25
|
+
- Adds the toolbar helper to your layout
|
|
26
|
+
|
|
27
|
+
### Manual Installation
|
|
28
|
+
|
|
29
|
+
If you prefer manual setup or the generator doesn't work for your setup:
|
|
30
|
+
|
|
31
|
+
**1. Add stylesheet** to `app/assets/stylesheets/application.css`:
|
|
32
|
+
|
|
33
|
+
```css
|
|
34
|
+
*= require agentation
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**2. Import JavaScript** in `app/javascript/application.js`:
|
|
38
|
+
|
|
39
|
+
```javascript
|
|
40
|
+
import "agentation"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**3. Add toolbar** to your layout (before `</body>`):
|
|
44
|
+
|
|
45
|
+
```erb
|
|
46
|
+
<%= agentation_toolbar %>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Usage
|
|
50
|
+
|
|
51
|
+
The toolbar appears in the bottom-right corner. Click the sparkle icon to activate.
|
|
52
|
+
|
|
53
|
+
### Options
|
|
54
|
+
|
|
55
|
+
```erb
|
|
56
|
+
<%= agentation_toolbar(
|
|
57
|
+
output_detail: "standard", # compact, standard, detailed, forensic
|
|
58
|
+
annotation_color: "#3c82f7", # hex color for markers
|
|
59
|
+
auto_clear_after_copy: false, # clear annotations after copying
|
|
60
|
+
dark_mode: true # dark or light theme
|
|
61
|
+
) %>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Features
|
|
65
|
+
|
|
66
|
+
- Click any element to add an annotation
|
|
67
|
+
- Drag to multi-select elements
|
|
68
|
+
- Click marker to edit, Shift+click to delete
|
|
69
|
+
- Copy feedback as structured Markdown
|
|
70
|
+
- Persistent storage (localStorage)
|
|
71
|
+
- Light and dark mode support
|
|
72
|
+
- Draggable toolbar position
|
|
73
|
+
|
|
74
|
+
## Output Formats
|
|
75
|
+
|
|
76
|
+
### Compact
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
1. **button "Submit"**: Make this green
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Standard
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
### 1. button "Submit"
|
|
86
|
+
**Location:** form > .actions > button
|
|
87
|
+
**Feedback:** Make this green
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Detailed
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
### 1. button "Submit"
|
|
94
|
+
**Location:** form > .actions > button
|
|
95
|
+
**Classes:** btn, btn-primary
|
|
96
|
+
**Position:** 100px, 200px (120x40px)
|
|
97
|
+
**Feedback:** Make this green
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Forensic
|
|
101
|
+
|
|
102
|
+
Full debugging information including computed styles, accessibility info, and nearby elements.
|
|
103
|
+
|
|
104
|
+
## Requirements
|
|
105
|
+
|
|
106
|
+
- Rails 6.1+
|
|
107
|
+
- Ruby 3.0+
|
|
108
|
+
|
|
109
|
+
## Credits
|
|
110
|
+
|
|
111
|
+
This Ruby gem is based on [Agentation](https://agentation.dev/), an open-source annotation toolkit for AI coding agents.
|
|
112
|
+
|
|
113
|
+
- **Original Project:** [github.com/benjitaylor/agentation](https://github.com/benjitaylor/agentation)
|
|
114
|
+
- **Website:** [agentation.dev](https://agentation.dev/)
|
|
115
|
+
|
|
116
|
+
## License
|
|
117
|
+
|
|
118
|
+
MIT
|