@coworker-jp/aidr 0.1.4 → 0.1.6

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.1.4",
3
+ "version": "0.1.6",
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.1.4");
592
+ .version("0.1.5");
593
593
 
594
594
  program
595
595
  .command("install")
package/src/scheduled.mjs CHANGED
@@ -252,11 +252,13 @@ exec ${binaryPath} scan endpoint-info
252
252
  }
253
253
 
254
254
  async function installCronDir({ binaryPath, dryRun, interval = 4 }) {
255
- // /etc/cron.d entries run as the user named in the line. We embed the env
256
- // file source via a small inline script. stdout + stderr are appended to
257
- // the world-readable log so non-root users can read recent runs without
258
- // sudo.
259
- const entry = `0 */${interval} * * * root . ${SYSTEM_ENV_FILE} && ${binaryPath} scan endpoint-info >> ${SCHEDULED_LOG_FILE} 2>&1 # aidr-scheduled
255
+ // The aidr.env file is plain `KEY=VALUE` lines (no `export` prefix
256
+ // systemd's EnvironmentFile= used by the sentinel service requires that
257
+ // form). Plain `. file` sets shell-local variables that don't propagate
258
+ // to the spawned ai-scanner process; `set -a` flips on auto-export so
259
+ // every assignment becomes an environment variable. Same pattern as the
260
+ // launchd wrapper on macOS.
261
+ const entry = `0 */${interval} * * * root set -a; . ${SYSTEM_ENV_FILE}; set +a; ${binaryPath} scan endpoint-info >> ${SCHEDULED_LOG_FILE} 2>&1
260
262
  `;
261
263
  if (dryRun) {
262
264
  console.log("[dry-run] Would create:", CRON_FILE);