@coworker-jp/aidr 0.0.9 → 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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coworker-jp/aidr",
3
- "version": "0.0.9",
3
+ "version": "0.1.0",
4
4
  "description": "AIDR setup CLI - installs ai-scanner hooks for 19+ AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {
package/src/cli.mjs CHANGED
@@ -589,7 +589,7 @@ export async function run(argv) {
589
589
  program
590
590
  .name("aidr")
591
591
  .description("AIDR setup CLI — installs ai-scanner hooks for AI coding agents")
592
- .version("0.0.9");
592
+ .version("0.1.0");
593
593
 
594
594
  program
595
595
  .command("install")
package/src/scheduled.mjs CHANGED
@@ -304,7 +304,7 @@ WantedBy=timers.target
304
304
  }
305
305
  }
306
306
 
307
- async function installLaunchd({ binaryPath, dryRun, noActivate, interval = 4 }) {
307
+ export async function installLaunchd({ binaryPath, dryRun, noActivate, interval = 4 }) {
308
308
  // launchd does not support EnvironmentFile, so we use a tiny wrapper that
309
309
  // sources /etc/aidr/aidr.env and execs the binary. Plist itself stays 0644
310
310
  // (launchctl bootstrap requires it readable); the secret lives in the env
@@ -315,6 +315,13 @@ async function installLaunchd({ binaryPath, dryRun, noActivate, interval = 4 })
315
315
  set -a
316
316
  . ${SYSTEM_ENV_FILE}
317
317
  set +a
318
+ # launchd starts daemons with a narrow default PATH (/usr/bin:/bin:/usr/sbin:/sbin)
319
+ # that omits Homebrew. Without this, scan endpoint-info silently misses brew
320
+ # packages because Command::new("brew") spawn fails — gem still works because
321
+ # /usr/bin/gem is on the default PATH. Both Apple Silicon (/opt/homebrew/bin)
322
+ # and Intel (/usr/local/bin) prefixes are safe to prepend on either arch since
323
+ # missing dirs in PATH are simply ignored at lookup time.
324
+ export PATH="/opt/homebrew/bin:/usr/local/bin:/opt/homebrew/sbin:/usr/local/sbin:\${PATH:-/usr/bin:/bin:/usr/sbin:/sbin}"
318
325
  exec ${binaryPath} scan endpoint-info
319
326
  `;
320
327