yatfa 1.0.70 → 1.0.72
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.
- package/agents.rb +4 -4
- package/bin/install-agent.sh +10 -3
- package/bin/run-yatfa-agent.rb +2 -5
- package/lib/yatfa_agent/agent.rb +7 -2
- package/lib/yatfa_agent/setup.rb +4 -3
- package/package.json +3 -4
- package/bin/yatfa-runner +0 -12
package/agents.rb
CHANGED
|
@@ -185,7 +185,7 @@ end
|
|
|
185
185
|
AGENT_CONFIGS = {
|
|
186
186
|
'planner' => {
|
|
187
187
|
name: 'yatfa-planner',
|
|
188
|
-
skills: ['ticket-management', 'memory', 'knowledge-management', 'sentry-investigation'],
|
|
188
|
+
skills: ['ticket-management', 'memory', 'knowledge-management', 'sentry-investigation', 'agent-browser'],
|
|
189
189
|
banner: build_banner(
|
|
190
190
|
header: PLANNER_HEADER,
|
|
191
191
|
boundaries: PLANNER_BOUNDARIES
|
|
@@ -194,7 +194,7 @@ AGENT_CONFIGS = {
|
|
|
194
194
|
|
|
195
195
|
'worker' => {
|
|
196
196
|
name: 'yatfa-autonomous-worker',
|
|
197
|
-
skills: ['git-workflow', 'worker-workflow', 'memory'],
|
|
197
|
+
skills: ['git-workflow', 'worker-workflow', 'memory', 'session-learnings', 'agent-browser'],
|
|
198
198
|
banner: build_banner(
|
|
199
199
|
header: WORKER_HEADER,
|
|
200
200
|
boundaries: WORKER_BOUNDARIES,
|
|
@@ -204,7 +204,7 @@ AGENT_CONFIGS = {
|
|
|
204
204
|
|
|
205
205
|
'reviewer' => {
|
|
206
206
|
name: 'yatfa-autonomous-reviewer',
|
|
207
|
-
skills: ['reviewer-workflow', 'qa-workflow', 'memory', 'proposal-reviewer'],
|
|
207
|
+
skills: ['reviewer-workflow', 'qa-workflow', 'memory', 'session-learnings', 'proposal-reviewer', 'agent-browser'],
|
|
208
208
|
banner: build_banner(
|
|
209
209
|
header: REVIEWER_HEADER,
|
|
210
210
|
boundaries: REVIEWER_BOUNDARIES,
|
|
@@ -214,7 +214,7 @@ AGENT_CONFIGS = {
|
|
|
214
214
|
|
|
215
215
|
'researcher' => {
|
|
216
216
|
name: 'yatfa-autonomous-researcher',
|
|
217
|
-
skills: ['researcher-tactical', 'researcher-strategic', 'researcher-digest', 'researcher-telegram-processor', 'memory', 'proposal-execution', 'proposal-rework-responder', 'memory-consolidation', 'retrospective', 'knowledge-management', 'sentry-investigation'],
|
|
217
|
+
skills: ['researcher-tactical', 'researcher-strategic', 'researcher-digest', 'researcher-telegram-processor', 'memory', 'session-learnings', 'proposal-execution', 'proposal-rework-responder', 'memory-consolidation', 'retrospective', 'knowledge-management', 'sentry-investigation', 'agent-browser'],
|
|
218
218
|
banner: build_banner(
|
|
219
219
|
header: RESEARCHER_HEADER,
|
|
220
220
|
boundaries: RESEARCHER_BOUNDARIES,
|
package/bin/install-agent.sh
CHANGED
|
@@ -34,7 +34,7 @@ fi
|
|
|
34
34
|
# to ensure we can edit mounted files.
|
|
35
35
|
USER_ID=${USER_ID:-1000}
|
|
36
36
|
GROUP_ID=${GROUP_ID:-1000}
|
|
37
|
-
AGENT_USER="
|
|
37
|
+
AGENT_USER="yatfa"
|
|
38
38
|
|
|
39
39
|
# Allow UIDs outside the default range (e.g., macOS UIDs like 501)
|
|
40
40
|
if [ "$USER_ID" -lt 1000 ]; then
|
|
@@ -79,8 +79,8 @@ echo "Installing claude-code as ${AGENT_USER}"
|
|
|
79
79
|
sudo -u ${AGENT_USER} bash -c 'curl -fsSL https://claude.ai/install.sh | bash'
|
|
80
80
|
|
|
81
81
|
# Add agent user's local bin to system PATH
|
|
82
|
-
echo "export PATH=\"${AGENT_HOME}/.local/bin:\$PATH\"" >> /etc/profile.d/
|
|
83
|
-
chmod +x /etc/profile.d/
|
|
82
|
+
echo "export PATH=\"${AGENT_HOME}/.local/bin:\$PATH\"" >> /etc/profile.d/yatfa.sh
|
|
83
|
+
chmod +x /etc/profile.d/yatfa.sh
|
|
84
84
|
|
|
85
85
|
echo "Installing Github CLI"
|
|
86
86
|
# Install GitHub CLI
|
|
@@ -89,6 +89,13 @@ chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg
|
|
|
89
89
|
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list
|
|
90
90
|
apt-get update && apt-get install gh -y
|
|
91
91
|
|
|
92
|
+
# Install agent-browser (browser automation CLI for AI agents)
|
|
93
|
+
echo "Installing agent-browser"
|
|
94
|
+
npm install -g agent-browser
|
|
95
|
+
|
|
96
|
+
# Configure agent-browser to use system Chromium (already installed in Dockerfile.sandbox)
|
|
97
|
+
echo "export AGENT_BROWSER_EXECUTABLE_PATH=/usr/bin/chromium" >> /etc/profile.d/yatfa.sh
|
|
98
|
+
|
|
92
99
|
# Create wrapper script that uses local setup-agent.rb if mounted, otherwise downloads from remote
|
|
93
100
|
YATFA_VERSION=${YATFA_VERSION:-main}
|
|
94
101
|
cat << 'EOF' > /usr/local/bin/setup-agent
|
package/bin/run-yatfa-agent.rb
CHANGED
|
@@ -54,10 +54,6 @@ show_usage if ARGV.empty?
|
|
|
54
54
|
|
|
55
55
|
command = ARGV[0].downcase
|
|
56
56
|
|
|
57
|
-
# Set process title so ps/top shows the agent type instead of "node" (from npx)
|
|
58
|
-
agent_type_for_title = %w[worker planner reviewer researcher claw].include?(command) ? command : "yatfa"
|
|
59
|
-
Process.setproctitle("yatfa-#{agent_type_for_title}")
|
|
60
|
-
|
|
61
57
|
# Handle version command
|
|
62
58
|
show_version if %w[version -v --version].include?(command)
|
|
63
59
|
|
|
@@ -93,7 +89,8 @@ else
|
|
|
93
89
|
config = YatfaAgent::Config.load
|
|
94
90
|
# Fetch repositories from Rails API before building
|
|
95
91
|
YatfaAgent::Config.fetch_repositories!(config)
|
|
96
|
-
|
|
92
|
+
# Note: Docker.build_image is called inside Agent.run() only when a new
|
|
93
|
+
# container actually needs to be created (not for attach/start-existing)
|
|
97
94
|
# For "run" command, use second argument as agent type
|
|
98
95
|
# For "attach" command, handled separately above
|
|
99
96
|
agent_type_to_run = (command == "run") ? ARGV[1] : command
|
package/lib/yatfa_agent/agent.rb
CHANGED
|
@@ -86,6 +86,7 @@ module YatfaAgent
|
|
|
86
86
|
puts " Non-interactive mode: starting existing container."
|
|
87
87
|
system("docker", "start", container_name, out: File::NULL)
|
|
88
88
|
puts "✅ Agent started in background"
|
|
89
|
+
prompt_to_attach(agent_type, container_name, config, agent_configs)
|
|
89
90
|
exit 0
|
|
90
91
|
end
|
|
91
92
|
|
|
@@ -97,6 +98,7 @@ module YatfaAgent
|
|
|
97
98
|
puts "🔄 Starting existing container..."
|
|
98
99
|
system("docker", "start", container_name, out: File::NULL)
|
|
99
100
|
puts "✅ Agent started in background"
|
|
101
|
+
prompt_to_attach(agent_type, container_name, config, agent_configs)
|
|
100
102
|
exit 0
|
|
101
103
|
when "R"
|
|
102
104
|
puts ""
|
|
@@ -131,6 +133,10 @@ module YatfaAgent
|
|
|
131
133
|
|
|
132
134
|
puts "🚀 Starting #{agent_type} agent..."
|
|
133
135
|
|
|
136
|
+
# Build Docker image only when we're about to create a new container
|
|
137
|
+
# (Restart, Recreate, or no existing container)
|
|
138
|
+
Docker.build_image(config)
|
|
139
|
+
|
|
134
140
|
docker_cmd = build_docker_command(container_name, agent_type, config, agent_config, agent_def)
|
|
135
141
|
|
|
136
142
|
success = system(*docker_cmd)
|
|
@@ -192,7 +198,6 @@ module YatfaAgent
|
|
|
192
198
|
|
|
193
199
|
if running.empty?
|
|
194
200
|
puts "⚠️ #{agent_type} agent is not running. Auto-starting..."
|
|
195
|
-
Docker.build_image(config)
|
|
196
201
|
run(agent_type, config, agent_configs)
|
|
197
202
|
sleep 3
|
|
198
203
|
end
|
|
@@ -254,7 +259,7 @@ module YatfaAgent
|
|
|
254
259
|
]
|
|
255
260
|
|
|
256
261
|
# Add persistence volume for OpenClaw config and data (scoped per container)
|
|
257
|
-
docker_cmd += ["-v", "#{container_name}-openclaw-data:/home/
|
|
262
|
+
docker_cmd += ["-v", "#{container_name}-openclaw-data:/home/yatfa/.openclaw"]
|
|
258
263
|
|
|
259
264
|
# Auto-inject telegram_bot_token as env var so users don't need to duplicate in env block
|
|
260
265
|
if agent_config["telegram_bot_token"]
|
package/lib/yatfa_agent/setup.rb
CHANGED
|
@@ -533,15 +533,16 @@ module YatfaAgent
|
|
|
533
533
|
|
|
534
534
|
# Ensure /workspace is owned by agent user and writable
|
|
535
535
|
# The install-agent.sh script creates a user with USER_ID, so we use that ID directly
|
|
536
|
-
RUN rm -rf /workspace && mkdir -p /workspace && chown -R ${USER_ID}:${GROUP_ID} /home/
|
|
536
|
+
RUN rm -rf /workspace && mkdir -p /workspace && chown -R ${USER_ID}:${GROUP_ID} /home/yatfa /workspace
|
|
537
537
|
|
|
538
538
|
# Switch to agent user (will be created with USER_ID by install-agent.sh)
|
|
539
539
|
USER ${USER_ID}
|
|
540
540
|
WORKDIR /workspace
|
|
541
541
|
|
|
542
542
|
# Set default environment
|
|
543
|
-
ENV HOME=/home/
|
|
544
|
-
ENV PATH=/home/
|
|
543
|
+
ENV HOME=/home/yatfa
|
|
544
|
+
ENV PATH=/home/yatfa/.local/bin:/usr/local/bun/bin:/usr/bin:/bin:$PATH
|
|
545
|
+
ENV AGENT_BROWSER_EXECUTABLE_PATH=/usr/bin/chromium
|
|
545
546
|
|
|
546
547
|
# Default command runs setup-agent wrapper
|
|
547
548
|
# The wrapper downloads the latest setup-agent.rb on every container startup
|
package/package.json
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yatfa",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.72",
|
|
4
4
|
"description": "YATFA - Yet Another Tool For Agents",
|
|
5
|
-
"bin": "./bin/yatfa-
|
|
5
|
+
"bin": "./bin/run-yatfa-agent.rb",
|
|
6
6
|
"files": [
|
|
7
|
-
"bin/yatfa-runner",
|
|
8
7
|
"bin/run-yatfa-agent.rb",
|
|
9
8
|
"agents.rb",
|
|
10
9
|
"lib/",
|
|
@@ -16,4 +15,4 @@
|
|
|
16
15
|
},
|
|
17
16
|
"author": "",
|
|
18
17
|
"license": "ISC"
|
|
19
|
-
}
|
|
18
|
+
}
|
package/bin/yatfa-runner
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# yatfa - Agent runner wrapper
|
|
3
|
-
# Sets process name to yatfa-<agent-type> so ps/top/Activity Monitor shows it clearly.
|
|
4
|
-
# Resolve through npm symlinks (node_modules/.bin/yatfa -> ../yatfa/bin/yatfa-runner)
|
|
5
|
-
SELF="${BASH_SOURCE[0]}"
|
|
6
|
-
while [ -L "$SELF" ]; do
|
|
7
|
-
DIR="$(cd -P "$(dirname "$SELF")" && pwd)"
|
|
8
|
-
SELF="$(readlink "$SELF")"
|
|
9
|
-
[[ "$SELF" != /* ]] && SELF="$DIR/$SELF"
|
|
10
|
-
done
|
|
11
|
-
DIR="$(cd -P "$(dirname "$SELF")" && pwd)"
|
|
12
|
-
exec -a "yatfa-${1:-yatfa}" ruby "$DIR/run-yatfa-agent.rb" "$@"
|