aigency 0.3.0 → 0.5.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.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +34 -0
  3. data/README.md +7 -15
  4. data/lib/aigency/aigent/current_time.rb +33 -0
  5. data/lib/aigency/aigent/shell.rb +124 -0
  6. data/lib/aigency/aigent.rb +110 -36
  7. data/lib/aigency/delegator.rb +11 -0
  8. data/lib/aigency/plugin/shell.rb +11 -0
  9. data/lib/aigency/plugin.rb +6 -2
  10. data/lib/aigency/rake.rb +13 -0
  11. data/lib/aigency/sandbox/copy_from_tempdir.rb +30 -0
  12. data/lib/aigency/sandbox/copy_to_tempdir.rb +30 -0
  13. data/lib/aigency/sandbox/exec.rb +2 -2
  14. data/lib/aigency/sandbox/helpers.rb +15 -0
  15. data/lib/aigency/sandbox.rb +9 -5
  16. data/lib/aigency/shell.rb +4 -11
  17. data/lib/aigency/tempdir/helpers.rb +15 -0
  18. data/lib/aigency/tempdir/list.rb +18 -0
  19. data/lib/aigency/tempdir/read.rb +28 -0
  20. data/lib/aigency/tempdir/size.rb +27 -0
  21. data/lib/aigency/tempdir/write.rb +28 -0
  22. data/lib/aigency/tempdir.rb +19 -0
  23. data/lib/aigency/tool.rb +5 -0
  24. data/lib/aigency/usability.rb +1 -0
  25. data/lib/aigency/version.rb +1 -1
  26. data/lib/aigency/workspace/cat.rb +2 -2
  27. data/lib/aigency/workspace/{shell.rb → cmd.rb} +3 -3
  28. data/lib/aigency/workspace/copy_from_tempdir.rb +29 -0
  29. data/lib/aigency/workspace/copy_to_tempdir.rb +29 -0
  30. data/lib/aigency/workspace/cp.rb +2 -2
  31. data/lib/aigency/workspace/diff.rb +2 -2
  32. data/lib/aigency/workspace/grep.rb +2 -2
  33. data/lib/aigency/workspace/head.rb +2 -2
  34. data/lib/aigency/workspace/ls.rb +2 -2
  35. data/lib/aigency/workspace/mkdir.rb +2 -2
  36. data/lib/aigency/workspace/mv.rb +2 -2
  37. data/lib/aigency/workspace/rm.rb +2 -2
  38. data/lib/aigency/workspace/tail.rb +2 -2
  39. data/lib/aigency/workspace/wc.rb +2 -2
  40. data/lib/aigency/workspace/write.rb +2 -2
  41. data/lib/aigency/workspace.rb +4 -4
  42. data/lib/aigency.rb +16 -14
  43. data/scaffold/{Rakefile → aigent/aigent.rake} +1 -10
  44. data/scaffold/{.gitignore → enlist/.gitignore} +1 -0
  45. data/scaffold/{README.md → enlist/README.md} +7 -3
  46. data/scaffold/enlist/Rakefile +9 -0
  47. data/scaffold/enlist/bin/aigent +11 -0
  48. data/scaffold/{config → enlist/config}/schedule.rb +5 -0
  49. data/scaffold/sandbox/Dockerfile +37 -0
  50. data/scaffold/sandbox/docker-compose.yml +37 -0
  51. data/{lib/aigency/sandbox/squid.conf.tpl → scaffold/sandbox/squid.conf} +4 -2
  52. data/scaffold/sandbox/ssh_config +2 -0
  53. metadata +49 -17
  54. data/lib/aigency/sandbox/Dockerfile.tpl +0 -13
  55. data/lib/aigency/sandbox/docker-compose.yml.tpl +0 -26
  56. data/scaffold/config/aigent.yml +0 -9
  57. /data/scaffold/{.env.example → enlist/.env.example} +0 -0
  58. /data/scaffold/{Gemfile → enlist/Gemfile} +0 -0
  59. /data/scaffold/{IDENTITY.md → enlist/IDENTITY.md} +0 -0
@@ -0,0 +1,37 @@
1
+ services:
2
+ app:
3
+ build:
4
+ context: .
5
+ dockerfile: ./sandbox/Dockerfile
6
+ networks: [sandbox]
7
+ restart: unless-stopped
8
+ depends_on:
9
+ - egress
10
+ volumes:
11
+ - ./data/sandbox:/sandbox
12
+ - ./data/sandbox_ssh:/sandbox/.ssh
13
+ working_dir: /sandbox
14
+ environment:
15
+ - http_proxy=http://egress:3128
16
+ - https_proxy=http://egress:3128
17
+ - HTTP_PROXY=http://egress:3128
18
+ - HTTPS_PROXY=http://egress:3128
19
+ - no_proxy=localhost,127.0.0.1,::1
20
+ - NO_PROXY=localhost,127.0.0.1,::1
21
+ command: ["sleep", "infinity"]
22
+
23
+ egress:
24
+ image: ubuntu/squid
25
+ networks: [sandbox, outside]
26
+ volumes:
27
+ - ./sandbox/squid.conf:/etc/squid/squid.conf:ro
28
+
29
+ networks:
30
+ sandbox:
31
+ internal: true
32
+ driver: bridge
33
+ driver_opts:
34
+ com.docker.network.bridge.gateway_mode_ipv4: isolated
35
+ com.docker.network.bridge.gateway_mode_ipv6: isolated
36
+ outside:
37
+ driver: bridge
@@ -11,10 +11,12 @@ forwarded_for off # don't leak the container's IP downstream
11
11
 
12
12
  acl SSL_ports port 443
13
13
  acl Safe_ports port 80 443
14
- acl http_targets dstdomain example.com
14
+ acl http_targets dstdomain \
15
+ www.example.com
15
16
 
16
17
  acl SSH_ports port 22
17
- acl ssh_targets dstdomain example.com
18
+ acl ssh_targets dstdomain \
19
+ ssh.example.com
18
20
 
19
21
  http_access allow CONNECT ssh_targets SSH_ports
20
22
  http_access deny !Safe_ports
@@ -0,0 +1,2 @@
1
+ Host *
2
+ ProxyCommand nc -X connect -x egress:3128 %h %p
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aigency
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fred Snyder
@@ -23,6 +23,20 @@ dependencies:
23
23
  - - "~>"
24
24
  - !ruby/object:Gem::Version
25
25
  version: '3.2'
26
+ - !ruby/object:Gem::Dependency
27
+ name: faraday
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - "~>"
31
+ - !ruby/object:Gem::Version
32
+ version: '2.15'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '2.15'
26
40
  - !ruby/object:Gem::Dependency
27
41
  name: fileutils
28
42
  requirement: !ruby/object:Gem::Requirement
@@ -43,14 +57,14 @@ dependencies:
43
57
  requirements:
44
58
  - - "~>"
45
59
  - !ruby/object:Gem::Version
46
- version: '1.15'
60
+ version: '2.1'
47
61
  type: :runtime
48
62
  prerelease: false
49
63
  version_requirements: !ruby/object:Gem::Requirement
50
64
  requirements:
51
65
  - - "~>"
52
66
  - !ruby/object:Gem::Version
53
- version: '1.15'
67
+ version: '2.1'
54
68
  - !ruby/object:Gem::Dependency
55
69
  name: thor
56
70
  requirement: !ruby/object:Gem::Requirement
@@ -120,18 +134,32 @@ files:
120
134
  - exe/aigency
121
135
  - lib/aigency.rb
122
136
  - lib/aigency/aigent.rb
137
+ - lib/aigency/aigent/current_time.rb
138
+ - lib/aigency/aigent/shell.rb
139
+ - lib/aigency/delegator.rb
123
140
  - lib/aigency/plugin.rb
141
+ - lib/aigency/plugin/shell.rb
142
+ - lib/aigency/rake.rb
124
143
  - lib/aigency/sandbox.rb
125
- - lib/aigency/sandbox/Dockerfile.tpl
126
- - lib/aigency/sandbox/docker-compose.yml.tpl
144
+ - lib/aigency/sandbox/copy_from_tempdir.rb
145
+ - lib/aigency/sandbox/copy_to_tempdir.rb
127
146
  - lib/aigency/sandbox/exec.rb
128
- - lib/aigency/sandbox/squid.conf.tpl
147
+ - lib/aigency/sandbox/helpers.rb
129
148
  - lib/aigency/shell.rb
149
+ - lib/aigency/tempdir.rb
150
+ - lib/aigency/tempdir/helpers.rb
151
+ - lib/aigency/tempdir/list.rb
152
+ - lib/aigency/tempdir/read.rb
153
+ - lib/aigency/tempdir/size.rb
154
+ - lib/aigency/tempdir/write.rb
130
155
  - lib/aigency/tool.rb
131
156
  - lib/aigency/usability.rb
132
157
  - lib/aigency/version.rb
133
158
  - lib/aigency/workspace.rb
134
159
  - lib/aigency/workspace/cat.rb
160
+ - lib/aigency/workspace/cmd.rb
161
+ - lib/aigency/workspace/copy_from_tempdir.rb
162
+ - lib/aigency/workspace/copy_to_tempdir.rb
135
163
  - lib/aigency/workspace/cp.rb
136
164
  - lib/aigency/workspace/diff.rb
137
165
  - lib/aigency/workspace/grep.rb
@@ -141,18 +169,22 @@ files:
141
169
  - lib/aigency/workspace/mkdir.rb
142
170
  - lib/aigency/workspace/mv.rb
143
171
  - lib/aigency/workspace/rm.rb
144
- - lib/aigency/workspace/shell.rb
145
172
  - lib/aigency/workspace/tail.rb
146
173
  - lib/aigency/workspace/wc.rb
147
174
  - lib/aigency/workspace/write.rb
148
- - scaffold/.env.example
149
- - scaffold/.gitignore
150
- - scaffold/Gemfile
151
- - scaffold/IDENTITY.md
152
- - scaffold/README.md
153
- - scaffold/Rakefile
154
- - scaffold/config/aigent.yml
155
- - scaffold/config/schedule.rb
175
+ - scaffold/aigent/aigent.rake
176
+ - scaffold/enlist/.env.example
177
+ - scaffold/enlist/.gitignore
178
+ - scaffold/enlist/Gemfile
179
+ - scaffold/enlist/IDENTITY.md
180
+ - scaffold/enlist/README.md
181
+ - scaffold/enlist/Rakefile
182
+ - scaffold/enlist/bin/aigent
183
+ - scaffold/enlist/config/schedule.rb
184
+ - scaffold/sandbox/Dockerfile
185
+ - scaffold/sandbox/docker-compose.yml
186
+ - scaffold/sandbox/squid.conf
187
+ - scaffold/sandbox/ssh_config
156
188
  - sig/aigency.rbs
157
189
  licenses: []
158
190
  metadata: {}
@@ -163,14 +195,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
163
195
  requirements:
164
196
  - - ">="
165
197
  - !ruby/object:Gem::Version
166
- version: 3.2.0
198
+ version: 3.4.1
167
199
  required_rubygems_version: !ruby/object:Gem::Requirement
168
200
  requirements:
169
201
  - - ">="
170
202
  - !ruby/object:Gem::Version
171
203
  version: '0'
172
204
  requirements: []
173
- rubygems_version: 4.0.11
205
+ rubygems_version: 4.0.16
174
206
  specification_version: 4
175
207
  summary: A framework for building agentic AI workers.
176
208
  test_files: []
@@ -1,13 +0,0 @@
1
- FROM alpine:latest
2
-
3
- RUN apk add --no-cache \
4
- build-base \
5
- musl-dev \
6
- linux-headers \
7
- git \
8
- curl
9
-
10
- RUN adduser -D -h /sandbox user
11
- USER user
12
-
13
- CMD ["sleep", "infinity"]
@@ -1,26 +0,0 @@
1
- services:
2
- app:
3
- build:
4
- context: .
5
- dockerfile: Dockerfile
6
- volumes:
7
- - ./data/sandbox:/sandbox
8
- - ./data/sandbox_ssh:/sandbox/.ssh:ro
9
- working_dir: /sandbox
10
- command: ["sleep", "infinity"]
11
-
12
- egress:
13
- image: ubuntu/squid
14
- networks: [sandbox, outside]
15
- volumes:
16
- - ./squid.conf:/etc/squid/squid.conf:ro
17
-
18
- networks:
19
- sandbox:
20
- internal: true
21
- driver: bridge
22
- driver_opts:
23
- com.docker.network.bridge.gateway_mode_ipv4: isolated
24
- com.docker.network.bridge.gateway_mode_ipv6: isolated
25
- outside:
26
- driver: bridge
@@ -1,9 +0,0 @@
1
- name: Aigent
2
- openai_api_base: ${OPENAI_API_BASE}
3
- openai_api_key: ${OPENAI_API_KEY}
4
- # max_tokens: 65536
5
- plugins:
6
- # You should only need either a workspace or a sandbox, not both. If you
7
- # enable one, it's recommended that you disable the other.
8
- # - sandbox
9
- - workspace
File without changes
File without changes
File without changes