gaggle 0.2.2
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/MIT-LICENSE +20 -0
- data/README.md +167 -0
- data/Rakefile +8 -0
- data/app/assets/config/gaggle_manifest.js +4 -0
- data/app/assets/stylesheets/application.css +1 -0
- data/app/assets/stylesheets/gaggle/tailwind.css +1740 -0
- data/app/controllers/gaggle/application_controller.rb +23 -0
- data/app/controllers/gaggle/channels/messages_controller.rb +27 -0
- data/app/controllers/gaggle/channels_controller.rb +84 -0
- data/app/controllers/gaggle/gooses/sessions_controller.rb +23 -0
- data/app/controllers/gaggle/gooses_controller.rb +47 -0
- data/app/controllers/gaggle/messages_controller.rb +7 -0
- data/app/controllers/gaggle/overviews_controller.rb +5 -0
- data/app/controllers/gaggle/sessions_controller.rb +27 -0
- data/app/helpers/gaggle/application_helper.rb +4 -0
- data/app/javascript/controllers/gaggle/application.js +9 -0
- data/app/javascript/controllers/gaggle/chat_field_form_controller.js +7 -0
- data/app/javascript/controllers/gaggle/index.js +4 -0
- data/app/javascript/controllers/gaggle/local_timestamp_controller.js +21 -0
- data/app/javascript/controllers/gaggle/text_area_auto_expand_controller.js +27 -0
- data/app/javascript/controllers/gaggle/transition_controller.js +102 -0
- data/app/javascript/gaggle/application.js +3 -0
- data/app/javascript/gaggle/el-transition.js +64 -0
- data/app/jobs/gaggle/application_job.rb +4 -0
- data/app/mailers/gaggle/application_mailer.rb +6 -0
- data/app/models/gaggle/application_record.rb +8 -0
- data/app/models/gaggle/channel.rb +45 -0
- data/app/models/gaggle/channel_goose.rb +11 -0
- data/app/models/gaggle/current.rb +5 -0
- data/app/models/gaggle/goose/personality_defaults.rb +87 -0
- data/app/models/gaggle/goose.rb +94 -0
- data/app/models/gaggle/message.rb +61 -0
- data/app/models/gaggle/notification.rb +47 -0
- data/app/models/gaggle/session.rb +138 -0
- data/app/views/gaggle/application/_logo.html.erb +125 -0
- data/app/views/gaggle/application/_mobile_header.html.erb +15 -0
- data/app/views/gaggle/application/_sidebar.html.erb +259 -0
- data/app/views/gaggle/channels/_channel.html.erb +22 -0
- data/app/views/gaggle/channels/_form.html.erb +70 -0
- data/app/views/gaggle/channels/edit.html.erb +10 -0
- data/app/views/gaggle/channels/gooses/index.html.erb +12 -0
- data/app/views/gaggle/channels/index.json.jbuilder +3 -0
- data/app/views/gaggle/channels/messages/new.html.erb +2 -0
- data/app/views/gaggle/channels/new.html.erb +8 -0
- data/app/views/gaggle/channels/show.html.erb +98 -0
- data/app/views/gaggle/channels/show.json.jbuilder +5 -0
- data/app/views/gaggle/channels/update.turbo_stream.erb +1 -0
- data/app/views/gaggle/gooses/_form.html.erb +65 -0
- data/app/views/gaggle/gooses/edit.html.erb +2 -0
- data/app/views/gaggle/gooses/index.json.jbuilder +5 -0
- data/app/views/gaggle/gooses/new.html.erb +2 -0
- data/app/views/gaggle/gooses/sessions/index.html.erb +55 -0
- data/app/views/gaggle/gooses/show.html.erb +41 -0
- data/app/views/gaggle/messages/_message.html.erb +30 -0
- data/app/views/gaggle/overviews/show.html.erb +17 -0
- data/app/views/gaggle/sessions/show.html.erb +76 -0
- data/app/views/layouts/gaggle/application.html.erb +19 -0
- data/config/importmap.rb +7 -0
- data/config/routes.rb +19 -0
- data/config/utility_classes.yml +22 -0
- data/db/gaggle_migrate/20250214180303_create_gaggle_tables.rb +53 -0
- data/db/gaggle_migrate/20250220002655_add_delivered_at_to_notification.rb +5 -0
- data/db/gaggle_migrate/20250220004428_create_join_table_gaggle_channel_gaggle_goose.rb +8 -0
- data/lib/gaggle/engine.rb +48 -0
- data/lib/gaggle/version.rb +3 -0
- data/lib/gaggle.rb +8 -0
- data/lib/generators/gaggle/install/install_generator.rb +7 -0
- data/lib/generators/gaggle/install/templates/db/gaggle_schema.rb +59 -0
- data/lib/generators/gaggle/update/update_generator.rb +16 -0
- metadata +269 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 664fb3a60aaaf857cc33ca007635ed9648f184125e7a1ffe90966ebc225b3d29
|
4
|
+
data.tar.gz: 46958501cc2bffa80ec0ab7760720d7f6cea4ec96e8387f316da9cccbc2a8214
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 711987c0e036a45f86ccc6c050fdd8ec4236ee399f9a7d1dba4137ca06039f2af2981dd915291f718ef4f7cc08347370ffb063ec3775f22c1fcd6c9bb3378d80
|
7
|
+
data.tar.gz: 6a5d30f9119fe13a76d822962f33287fbf15c0c8387e99dc0064342d6c39bed9f4529285ba3e9cd95f88c16d1a18963be9834175ecc453702c399b8ae0bd16d1
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright Tonksthebear
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,167 @@
|
|
1
|
+
# Gaggle
|
2
|
+
|
3
|
+
Gaggle is a Rails engine designed for development use that orchestrates multiple instances of [Goose](https://github.com/block/goose). The name is a play on words inspired by the term for a group of geese, reflecting its role in managing and coordinating multiple instances of the underlying "Goose" service.
|
4
|
+
|
5
|
+
**These are Goose instances. They can and will do things on your computer confidently. They will churn through tokens and also potentially change things you don't want. Be responsible**
|
6
|
+
|
7
|
+
**Want to just run the app? Check out the sample [Gaggle Chat](https://github.com/Tonksthebear/GaggleChat)**
|
8
|
+
|
9
|
+
## Features
|
10
|
+
- Assign names and prompts to Goose instances
|
11
|
+
- View and interact with goose instances through the running terminal directly through the web interface
|
12
|
+
- Message and collaborate with your gaggle through message threads
|
13
|
+
- Both Goose and Human can
|
14
|
+
- Create and manage channels
|
15
|
+
- Send messages to channels
|
16
|
+
- Human can
|
17
|
+
- Decide who is in a channel
|
18
|
+
- Goose can
|
19
|
+
- Check their unread notifications
|
20
|
+
- Checking threads only show new messages since the last time they were checked (hopefully saving some tokens)
|
21
|
+
- Goose instance can then do anything Goose can do (with great power comes great responsibility)
|
22
|
+
|
23
|
+
## Design
|
24
|
+
|
25
|
+
- Designed exclusively for development environments.
|
26
|
+
- Built with:
|
27
|
+
- **Turbo** (via [turbo-rails](https://github.com/hotwired/turbo-rails)) for accelerated page updates.
|
28
|
+
- **Stimulus** (via [stimulus-rails](https://github.com/hotwired/stimulus-rails)) for lightweight JavaScript interactions.
|
29
|
+
- **TailwindCSS** (via [tailwindcss-rails](https://github.com/rails/tailwindcss-rails)) for utility-first styling.
|
30
|
+
- **Importmap** (via [importmap-rails](https://github.com/rails/importmap-rails)) for managing JavaScript dependencies without Node.js.
|
31
|
+
- **Cline** (via [cline.bot](https://cline.bot)) for the AI assistant to this project. Why not make an AI gem with AI aid?
|
32
|
+
|
33
|
+
|
34
|
+
#### Homepage
|
35
|
+

|
36
|
+
|
37
|
+
#### Goose Creation
|
38
|
+

|
39
|
+
|
40
|
+
#### Live Console
|
41
|
+

|
42
|
+
|
43
|
+
#### Channels
|
44
|
+

|
45
|
+
|
46
|
+
#### Channel Management
|
47
|
+

|
48
|
+
|
49
|
+
#### Dark Mode
|
50
|
+

|
51
|
+
|
52
|
+
## Installation in an Existing Rails App
|
53
|
+
|
54
|
+
Install and configure [Goose CLI](https://block.github.io/goose/docs/getting-started/installation/)
|
55
|
+
|
56
|
+
|
57
|
+
Add this line to your application's Gemfile inside the development group:
|
58
|
+
|
59
|
+
```ruby
|
60
|
+
group :development do
|
61
|
+
gem 'gaggle', git: 'https://github.com/Tonksthebear/gaggle'
|
62
|
+
end
|
63
|
+
```
|
64
|
+
|
65
|
+
Then execute:
|
66
|
+
|
67
|
+
```shell
|
68
|
+
bundle install
|
69
|
+
```
|
70
|
+
|
71
|
+
|
72
|
+
Mount the engine in your `config/routes.rb` file:
|
73
|
+
|
74
|
+
```ruby
|
75
|
+
Rails.application.routes.draw do
|
76
|
+
mount Gaggle::Engine => "/gaggle"
|
77
|
+
end
|
78
|
+
```
|
79
|
+
|
80
|
+
Generate the MCP server:
|
81
|
+
```shell
|
82
|
+
bin/rails mcp:rails:generate_server
|
83
|
+
```
|
84
|
+
|
85
|
+
It is recommended to give Gaggle its own database. An example schema is:
|
86
|
+
```yaml
|
87
|
+
development:
|
88
|
+
primary:
|
89
|
+
<<: *default
|
90
|
+
database: storage/development.sqlite3
|
91
|
+
gaggle:
|
92
|
+
<<: *default
|
93
|
+
database: storage/gaggle.sqlite3
|
94
|
+
migrations_paths:: <%= Gaggle::Engine.root.join("db/gaggle_migrate") %>
|
95
|
+
```
|
96
|
+
|
97
|
+
Gaggle uses it's own database schema, so you will need to run the migrations:
|
98
|
+
|
99
|
+
```shell
|
100
|
+
bin/rails db:migrate:gaggle
|
101
|
+
```
|
102
|
+
|
103
|
+
Now, whenever your application is running, you can access the Gaggle dashboard at `http://your_local_server/gaggle`.
|
104
|
+
|
105
|
+
## Testing
|
106
|
+
|
107
|
+
None yet
|
108
|
+
|
109
|
+
## TODO
|
110
|
+
|
111
|
+
... testing
|
112
|
+
|
113
|
+
- Fix threading issue
|
114
|
+
- For some reason, messages don't always get sent to the Goose instance, requiring poking them to check notifications in their terminal. I assume this has something to do with threads and knowing when to send messages. I already implemented a Queue, but no luck
|
115
|
+
- Private messages (partially done)
|
116
|
+
- Let goose instances know who is in a channel (partially done)
|
117
|
+
- Let goose instances decide who is in a channel (partially done)
|
118
|
+
- Configure team structure
|
119
|
+
- Include more presets (personalities, team structure, channels)
|
120
|
+
|
121
|
+
### Running this repo locally
|
122
|
+
|
123
|
+
To run the project locally, you will need to have the following dependencies installed:
|
124
|
+
|
125
|
+
- Ruby on Rails (and associated dependencies)
|
126
|
+
- Goose CLI (make sure it's working)
|
127
|
+
|
128
|
+
|
129
|
+
Once you have the dependencies installed, you can run the project locally by running the following commands:
|
130
|
+
|
131
|
+
```shell
|
132
|
+
bundle
|
133
|
+
```
|
134
|
+
```shell
|
135
|
+
bundle exec appraisal install
|
136
|
+
```
|
137
|
+
```shell
|
138
|
+
cd test/dummy
|
139
|
+
```
|
140
|
+
```shell
|
141
|
+
bin/rails db:prepare
|
142
|
+
```
|
143
|
+
```shell
|
144
|
+
bin/dev
|
145
|
+
```
|
146
|
+
|
147
|
+
If all goes well, by the end you will have the rails server running on port 60053.
|
148
|
+
Gaggle should then be running on http://localhost:60053/gaggle.
|
149
|
+
|
150
|
+
#### Speicial Note
|
151
|
+
|
152
|
+
This engine uses [Appraisal](https://github.com/thoughtbot/appraisal) to test against multiple versions of Rails. As such, there may be some funkiness if you're unfamiliar. When running standard rails commands during development from the *root* of the project, you will need to run them with
|
153
|
+
```bash
|
154
|
+
bundle exec appraisal rails-8-propshaft [command]`
|
155
|
+
```
|
156
|
+
When running standard rails commands inside `test/dummy`, `bin/rails` should automatically inject the rails 8 propshaft appraisal environment.
|
157
|
+
|
158
|
+
## Contributing
|
159
|
+
|
160
|
+
Bug reports and pull requests are welcome on GitHub.
|
161
|
+
|
162
|
+
### Bonus
|
163
|
+
Since this was built with Cline, your cline should be able to use the [memory bank](https://docs.cline.bot/improving-your-prompting-skills/custom-instructions-library/cline-memory-bank) as well. Configure the prompt as instructed and have fun
|
164
|
+
|
165
|
+
## License
|
166
|
+
|
167
|
+
This project is licensed under the [MIT License](MIT-LICENSE).
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
@import "tailwindcss";
|