omen 0.1.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/README.md +46 -0
- data/Rakefile +1 -0
- data/lib/omen/engine.rb +6 -0
- data/lib/omen/version.rb +4 -0
- data/lib/omen.rb +6 -0
- metadata +62 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: d5c61b5e791393a47ef018d36fba4ab6455147fd7789e9ad9da2dfa3f4a3c233
|
|
4
|
+
data.tar.gz: 0ad45e83dfa5a5271acdd9c1a99741dcd360eb3d520f5b6ffe3b81d383e39152
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: dbe0dcd9d8dbe1e272b5a9f4d600631c4fa3efca709d80ea71aab1c1212317b462ce516c96d0b18292e2364792bb2167de86a9fb9b9de5cd64f97d4861e55821
|
|
7
|
+
data.tar.gz: 2fad605e52e97a599c01b842f2e00df7dc77827f1f7c7cfc22eb340101c038857e081766c90739da17c1ee3f3b469627442406c2b6c4d80984008cb0aef0847f
|
data/README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Omen
|
|
2
|
+
|
|
3
|
+
Staff ask Claude a question about the data an app holds; Claude writes the SQL, Rails runs it.
|
|
4
|
+
|
|
5
|
+
Omen ships the models and the logic to talk to Claude, parse what it says back, and run the
|
|
6
|
+
statement it wrote against a read-only connection. It ships **no controllers, routes or views** —
|
|
7
|
+
the pages belong to the app that installs it.
|
|
8
|
+
|
|
9
|
+
> **0.1.0 does nothing yet.** This release loads as a Rails engine. The models
|
|
10
|
+
> and the Claude logic land in a later version. The requirements below are what it will need, and
|
|
11
|
+
> are stated now so nobody installs it into an app it cannot work in.
|
|
12
|
+
|
|
13
|
+
## How to install
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
gem install omen
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Or, in a `Gemfile`, pinned to the current major:
|
|
20
|
+
|
|
21
|
+
```ruby
|
|
22
|
+
gem 'omen', '~> 0.1'
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Omen follows [Semantic Versioning](https://semver.org), so `~> major.minor` means `bundle update`
|
|
26
|
+
never crosses a breaking change.
|
|
27
|
+
|
|
28
|
+
## Requirements
|
|
29
|
+
|
|
30
|
+
**PostgreSQL only.** This is not a gap waiting to be filled. Two of the guarantees Omen makes are
|
|
31
|
+
Postgres features with no equivalent elsewhere: it identifies an encrypted column by the table OID
|
|
32
|
+
and column number Postgres reports for each result column, which is what stops an alias or an
|
|
33
|
+
expression from laundering one; and it narrows privileges for the statement it runs with
|
|
34
|
+
`SET LOCAL ROLE`, which reverts when the transaction ends. MySQL has `SET ROLE` but nothing
|
|
35
|
+
transaction-scoped, so a raised exception would leave a pooled connection holding the role. Omen
|
|
36
|
+
raises on any other adapter rather than running with a weaker promise.
|
|
37
|
+
|
|
38
|
+
**`db/schema.rb`, in Rails' `:ruby` schema format.** The schema is what Claude is shown, so an app
|
|
39
|
+
on `db/structure.sql` cannot use Omen. This is checked at boot rather than left to fail later.
|
|
40
|
+
|
|
41
|
+
**A read-only connection.** Omen runs every statement through a Rails connection role that cannot
|
|
42
|
+
write, and raises rather than falling back to a writable one.
|
|
43
|
+
|
|
44
|
+
## License
|
|
45
|
+
|
|
46
|
+
MIT, see [MIT-LICENSE](MIT-LICENSE).
|
data/Rakefile
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require 'bundler/gem_tasks'
|
data/lib/omen/engine.rb
ADDED
data/lib/omen/version.rb
ADDED
data/lib/omen.rb
ADDED
metadata
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: omen
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Claudio Baccigalupo
|
|
8
|
+
bindir: bin
|
|
9
|
+
cert_chain: []
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
|
+
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: rails
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - ">="
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: '0'
|
|
19
|
+
type: :runtime
|
|
20
|
+
prerelease: false
|
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
+
requirements:
|
|
23
|
+
- - ">="
|
|
24
|
+
- !ruby/object:Gem::Version
|
|
25
|
+
version: '0'
|
|
26
|
+
description: Turns a question into the SQL that answers it, and runs it read-only
|
|
27
|
+
email:
|
|
28
|
+
- claudiob@users.noreply.github.com
|
|
29
|
+
executables: []
|
|
30
|
+
extensions: []
|
|
31
|
+
extra_rdoc_files: []
|
|
32
|
+
files:
|
|
33
|
+
- README.md
|
|
34
|
+
- Rakefile
|
|
35
|
+
- lib/omen.rb
|
|
36
|
+
- lib/omen/engine.rb
|
|
37
|
+
- lib/omen/version.rb
|
|
38
|
+
homepage: https://github.com/claudiob/omen
|
|
39
|
+
licenses:
|
|
40
|
+
- MIT
|
|
41
|
+
metadata:
|
|
42
|
+
homepage_uri: https://github.com/claudiob/omen
|
|
43
|
+
source_code_uri: https://github.com/claudiob/omen/
|
|
44
|
+
changelog_uri: https://github.com/claudiob/omen/blob/main/CHANGELOG.md
|
|
45
|
+
rdoc_options: []
|
|
46
|
+
require_paths:
|
|
47
|
+
- lib
|
|
48
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
49
|
+
requirements:
|
|
50
|
+
- - ">="
|
|
51
|
+
- !ruby/object:Gem::Version
|
|
52
|
+
version: '3'
|
|
53
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
54
|
+
requirements:
|
|
55
|
+
- - ">="
|
|
56
|
+
- !ruby/object:Gem::Version
|
|
57
|
+
version: '0'
|
|
58
|
+
requirements: []
|
|
59
|
+
rubygems_version: 4.0.3
|
|
60
|
+
specification_version: 4
|
|
61
|
+
summary: Ask Claude about your own data
|
|
62
|
+
test_files: []
|