oh-my-agent.rb
Homebrew Formula subclass declarationRuby system-call syntax with arguments
SHA-25651af5ed7467957de4d77b17cffba9349f5a02edfcb4c4e30695190b0b9751832
MaleculeH₃(Cm₂DbPo)Md₂(Pa)
Evidence
1class OhMyAgent < Formula
2 desc "Portable multi-agent harness for .agents-based skills and workflows"
3 homepage "https://firstfluke.com/oh-my-agent/"
4 url "https://registry.npmjs.org/oh-my-agent/-/oh-my-agent-20.47.0.tgz"
5 sha256 "aee4110942bcb44b365176fb1ec3c05b820a1163380e0587f21b3a862e21f754"
6 license "MIT"
7
8 bottle do
9 sha256 cellar: :any, arm64_golden_gate: "0d480190ee658e964a247ecf77fdc75619faaaea2a026f9f3782c6936946fe5d"
10 sha256 cellar: :any, arm64_tahoe: "176227b6d88c9aff61854dffdb18c5dddafae9e62d86b1f2c8c061899d6a42ee"
11 sha256 cellar: :any, arm64_sequoia: "861eb2c6eab67819620b571c568fcee50d521cadec4b4d9c13890fffd21b38b1"
12 sha256 cellar: :any, arm64_linux: "da159d82ce85c8d1de43189f441aa0d7d4d2068c7679ea9fb5aa67ff3dc9a0c6"
13 sha256 cellar: :any, x86_64_linux: "ddc56246b06559ad543a2cbdc57dab9d77a5d95ce20b5b883a5a5e20662ce986"
14 end
15
16 depends_on "node"
17
18 def install
19 system "npm", "install", *std_npm_args
20
21 node_modules = libexec/"lib/node_modules/oh-my-agent/node_modules"
22 # Remove incompatible pre-built `bare-fs`/`bare-os`/`bare-path`/`bare-url` binaries
23 os = OS.kernel_name.downcase
24 arch = Hardware::CPU.intel? ? "x64" : Hardware::CPU.arch.to_s
25 node_modules.glob("{bare-fs,bare-os,bare-path,bare-url}/prebuilds/*")
26 .each { |dir| rm_r(dir) if dir.basename.to_s != "#{os}-#{arch}" }
27
28 rm_r(node_modules.glob("better-sqlite3/prebuilds/*"))
29 cd(node_modules/"better-sqlite3") { system "npm", "run", "build-release" }
30
31 bin.install_symlink Dir[libexec/"bin/*"]
32 end
33
34 test do
35 assert_match version.to_s, shell_output("#{bin}/oh-my-agent --version")
36
37 output = JSON.parse(shell_output("#{bin}/oh-my-agent memory init --json"))
38 assert_empty output["updated"]
39 assert_path_exists testpath/".agents/state/memories/orchestrator-session.md"
40 assert_path_exists testpath/".agents/state/memories/task-board.md"
41 end
42end