yatfa 1.0.96 → 1.0.97

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yatfa",
3
- "version": "1.0.96",
3
+ "version": "1.0.97",
4
4
  "description": "YATFA - Yet Another Tool For Agents",
5
5
  "bin": "./bin/run-yatfa-agent.rb",
6
6
  "files": [
@@ -16,4 +16,4 @@
16
16
  },
17
17
  "author": "",
18
18
  "license": "ISC"
19
- }
19
+ }
@@ -5,7 +5,7 @@
5
5
  #
6
6
  # Handles:
7
7
  # - Architecture detection and multi-strategy bridge download
8
- # (local override → Civo S3 presigned URL GitHub fallback)
8
+ # (local override → mounted binary public bucket download)
9
9
  # - tmux binary download and INSIDE_TMUX=1 patching
10
10
  # - Generic file download utility (download_file)
11
11
  # - Helper script installation to /usr/local/bin
@@ -58,22 +58,12 @@ def download_agent_bridge!
58
58
  return download_agent_bridge_tmux!(target_dir)
59
59
  end
60
60
 
61
- # 3. Try Civo bucket download (production mode)
62
- if ENV["CIVO_ACCESS_KEY_ID"] && ENV["CIVO_SECRET_KEY"]
63
- puts "📥 Downloading agent-bridge from Civo bucket..."
64
- if download_from_civo!(arch, target_dir)
65
- return download_agent_bridge_tmux!(target_dir)
66
- else
67
- puts "⚠️ Civo download failed, falling back to GitHub..."
68
- end
69
- end
70
-
71
- # 4. Fallback to GitHub raw URLs (legacy)
61
+ # 3. Download from the public bucket (production mode)
72
62
  bridge_url = "#{YATFA_RAW_URL}/bin/agent-bridge-linux-#{arch}"
73
- puts "📥 Downloading agent-bridge for linux-#{arch} from GitHub..."
63
+ puts "📥 Downloading agent-bridge for linux-#{arch} from bucket..."
74
64
  system("sudo", "curl", "-fsSL", bridge_url, "-o", "#{target_dir}/agent-bridge")
75
65
  unless $?.success?
76
- puts "❌ Failed to download agent-bridge from GitHub"
66
+ puts "❌ Failed to download agent-bridge from #{bridge_url}"
77
67
  exit 1
78
68
  end
79
69
  system("sudo", "chmod", "+x", "#{target_dir}/agent-bridge")
@@ -82,63 +72,6 @@ def download_agent_bridge!
82
72
  download_agent_bridge_tmux!(target_dir)
83
73
  end
84
74
 
85
- def download_from_civo!(arch, target_dir)
86
- require "aws-sdk-s3"
87
-
88
- region = ENV["CIVO_REGION"] || "LON1"
89
- endpoint = ENV["CIVO_ENDPOINT"] || "https://objectstore.fra1.civo.com"
90
- bucket = ENV["YATFA_BINARIES_BUCKET"] || "yatfa"
91
- version = ENV["AGENT_BRIDGE_VERSION"] || "latest"
92
-
93
- binary_name = "agent-bridge-linux-#{arch}"
94
- key = "agent-bridge/#{version}/#{binary_name}"
95
-
96
- puts " Region: #{region}"
97
- puts " Bucket: #{bucket}"
98
- puts " Version: #{version}"
99
- puts " Binary: #{binary_name}"
100
-
101
- begin
102
- # Configure Civo S3-compatible client
103
- Aws.config.update({
104
- region: region,
105
- endpoint: endpoint,
106
- access_key_id: ENV["CIVO_ACCESS_KEY_ID"],
107
- secret_access_key: ENV["CIVO_SECRET_KEY"]
108
- })
109
-
110
- s3 = Aws::S3::Resource.new
111
- obj = s3.bucket(bucket).object(key)
112
-
113
- # Generate presigned URL (valid for 1 hour)
114
- url = obj.presigned_url(:get, expires_in: 3600)
115
-
116
- puts "✅ Generated presigned URL"
117
-
118
- # Download via curl (array form avoids shell interpolation of URL)
119
- system("sudo", "curl", "-fsSL", url, "-o", "#{target_dir}/agent-bridge")
120
-
121
- unless $?.success?
122
- puts "❌ Failed to download agent-bridge from Civo"
123
- return false
124
- end
125
-
126
- system("sudo", "chmod", "+x", "#{target_dir}/agent-bridge")
127
- puts "✅ Downloaded agent-bridge from Civo"
128
- return true
129
-
130
- rescue LoadError
131
- puts "⚠️ aws-sdk-s3 gem not installed"
132
- return false
133
- rescue Aws::S3::Errors::NoSuchKey
134
- puts "❌ Version #{version} not found in bucket"
135
- return false
136
- rescue => e
137
- puts "❌ Civo download failed: #{e.message}"
138
- return false
139
- end
140
- end
141
-
142
75
  def download_agent_bridge_tmux!(target_dir)
143
76
  bridge_tmux_url = "#{YATFA_RAW_URL}/bin/agent-bridge-tmux"
144
77
 
package/setup/skills.rb CHANGED
@@ -4,7 +4,7 @@
4
4
  # Extracted from setup-agent.rb for modularity (Round 2)
5
5
  #
6
6
  # Handles:
7
- # - Installing built-in skills from the SKILLS env var (Civo-hosted SKILL.md files)
7
+ # - Installing built-in skills from the SKILLS env var (R2-hosted SKILL.md files)
8
8
  # - Fetching community skills list from the backend whoami API
9
9
  # - Installing community skills from external GitHub repos
10
10
  #