@a5c-ai/babysitter-github 0.1.4 → 0.1.5-staging.20a61093

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/README.md CHANGED
@@ -226,7 +226,7 @@ active process library before the cloud agent starts working.
226
226
  | Variable | Default | Description |
227
227
  |----------|---------|-------------|
228
228
  | `CLAUDE_PROJECT_DIR` | CWD | Project root directory (set by Copilot CLI) |
229
- | `BABYSITTER_LOG_DIR` | `<plugin>/.a5c/logs` | Log output directory |
229
+ | `BABYSITTER_LOG_DIR` | `~/.a5c/logs` | Log output directory override; default is the user-global Babysitter log root |
230
230
  | `BABYSITTER_STATE_DIR` | `<cwd>/.a5c` | State directory for session data |
231
231
 
232
232
  ### SDK Version Pinning
@@ -177,13 +177,13 @@ Mark as PASS if no issues. Mark as WARN if runaway loops or stale sessions detec
177
177
  **Goal:** Analyze babysitter log files for errors, warnings, and stop hook decisions.
178
178
 
179
179
  Read the last 50 lines of each of these log files (if they exist):
180
- - `$CLAUDE_PLUGIN_ROOT/.a5c/logs/hooks.log`
181
- - `$CLAUDE_PLUGIN_ROOT/.a5c/logs/babysitter-stop-hook.log`
182
- - `$CLAUDE_PLUGIN_ROOT/.a5c/logs/babysitter-stop-hook-stderr.log`
183
- - `$CLAUDE_PLUGIN_ROOT/.a5c/logs/babysitter-session-start-hook.log`
184
- - `$CLAUDE_PLUGIN_ROOT/.a5c/logs/babysitter-session-start-hook-stderr.log`
185
- - `$CLAUDE_PLUGIN_ROOT/.a5c/logs/babysitter.log`
186
- - `$HOME/.a5c/logs/` and relevant logs and run/session specific logs there
180
+ - `${BABYSITTER_LOG_DIR:-$HOME/.a5c/logs}/hooks.log`
181
+ - `${BABYSITTER_LOG_DIR:-$HOME/.a5c/logs}/babysitter-stop-hook.log`
182
+ - `${BABYSITTER_LOG_DIR:-$HOME/.a5c/logs}/babysitter-stop-hook-stderr.log`
183
+ - `${BABYSITTER_LOG_DIR:-$HOME/.a5c/logs}/babysitter-session-start-hook.log`
184
+ - `${BABYSITTER_LOG_DIR:-$HOME/.a5c/logs}/babysitter-session-start-hook-stderr.log`
185
+ - `${BABYSITTER_LOG_DIR:-$HOME/.a5c/logs}/babysitter.log`
186
+ - `${BABYSITTER_LOG_DIR:-$HOME/.a5c/logs}/` and relevant run/session specific logs there
187
187
 
188
188
 
189
189
  For each log file:
@@ -285,7 +285,7 @@ The hooks delegate to the `babysitter` CLI. Check if it is available:
285
285
  Check whether the stop hook has actually been invoked during this run's lifetime:
286
286
 
287
287
  **From log files:**
288
- - Read `$CLAUDE_PLUGIN_ROOT/.a5c/logs/babysitter-stop-hook.log` (if it exists).
288
+ - Read `${BABYSITTER_LOG_DIR:-$HOME/.a5c/logs}/babysitter-stop-hook.log` (if it exists).
289
289
  - Count the number of "Hook script invoked" lines. This is the total invocation count.
290
290
  - Count the number of "CLI exit code=" lines and extract exit codes.
291
291
  - If the log file does not exist or has zero invocations, the stop hook has NOT been running.
@@ -297,7 +297,7 @@ Check whether the stop hook has actually been invoked during this run's lifetime
297
297
  - If no STOP_HOOK_INVOKED events exist in the journal, note that the stop hook has not recorded any decisions for this run.
298
298
 
299
299
  **From stderr:**
300
- - Read `$CLAUDE_PLUGIN_ROOT/.a5c/logs/babysitter-stop-hook-stderr.log`.
300
+ - Read `${BABYSITTER_LOG_DIR:-$HOME/.a5c/logs}/babysitter-stop-hook-stderr.log`.
301
301
  - If it contains error output, display it and diagnose:
302
302
  - "command not found" or exit code 127 → CLI not installed (see 10c)
303
303
  - "MODULE_NOT_FOUND" or "Cannot find module" → SDK package corrupted or not built
@@ -30,7 +30,7 @@ if (-not $hasBabysitter) {
30
30
  }
31
31
  }
32
32
 
33
- $LogDir = if ($env:BABYSITTER_LOG_DIR) { $env:BABYSITTER_LOG_DIR } else { Join-Path $PluginRoot ".a5c\logs" }
33
+ $LogDir = if ($env:BABYSITTER_LOG_DIR) { $env:BABYSITTER_LOG_DIR } else { Join-Path $HOME ".a5c\logs" }
34
34
  $LogFile = Join-Path $LogDir "babysitter-session-end-hook.log"
35
35
  New-Item -ItemType Directory -Path $LogDir -Force -ErrorAction SilentlyContinue | Out-Null
36
36
 
@@ -32,7 +32,7 @@ if ! command -v babysitter &>/dev/null; then
32
32
  fi
33
33
  fi
34
34
 
35
- LOG_DIR="${BABYSITTER_LOG_DIR:-$PLUGIN_ROOT/.a5c/logs}"
35
+ LOG_DIR="${BABYSITTER_LOG_DIR:-$HOME/.a5c/logs}"
36
36
  LOG_FILE="$LOG_DIR/babysitter-session-end-hook.log"
37
37
 
38
38
  mkdir -p "$LOG_DIR" 2>/dev/null
@@ -14,7 +14,7 @@ $ErrorActionPreference = "Stop"
14
14
  $PluginRoot = if ($env:COPILOT_PLUGIN_DIR) { $env:COPILOT_PLUGIN_DIR } else { Split-Path -Parent $PSScriptRoot }
15
15
  $MarkerFile = Join-Path $PluginRoot ".babysitter-install-attempted"
16
16
 
17
- $LogDir = if ($env:BABYSITTER_LOG_DIR) { $env:BABYSITTER_LOG_DIR } else { Join-Path $PluginRoot ".a5c\logs" }
17
+ $LogDir = if ($env:BABYSITTER_LOG_DIR) { $env:BABYSITTER_LOG_DIR } else { Join-Path $HOME ".a5c\logs" }
18
18
  $LogFile = Join-Path $LogDir "babysitter-session-start-hook.log"
19
19
  New-Item -ItemType Directory -Path $LogDir -Force -ErrorAction SilentlyContinue | Out-Null
20
20
 
@@ -15,7 +15,7 @@ set -euo pipefail
15
15
  PLUGIN_ROOT="${COPILOT_PLUGIN_DIR:-$(cd "$(dirname "$0")/.." && pwd)}"
16
16
  MARKER_FILE="${PLUGIN_ROOT}/.babysitter-install-attempted"
17
17
 
18
- LOG_DIR="${BABYSITTER_LOG_DIR:-$PLUGIN_ROOT/.a5c/logs}"
18
+ LOG_DIR="${BABYSITTER_LOG_DIR:-$HOME/.a5c/logs}"
19
19
  LOG_FILE="$LOG_DIR/babysitter-session-start-hook.log"
20
20
  mkdir -p "$LOG_DIR" 2>/dev/null
21
21
 
@@ -29,7 +29,7 @@ if (-not $hasBabysitter) {
29
29
  }
30
30
  }
31
31
 
32
- $LogDir = if ($env:BABYSITTER_LOG_DIR) { $env:BABYSITTER_LOG_DIR } else { Join-Path $PluginRoot ".a5c\logs" }
32
+ $LogDir = if ($env:BABYSITTER_LOG_DIR) { $env:BABYSITTER_LOG_DIR } else { Join-Path $HOME ".a5c\logs" }
33
33
  New-Item -ItemType Directory -Path $LogDir -Force -ErrorAction SilentlyContinue | Out-Null
34
34
 
35
35
  # Capture stdin
@@ -24,7 +24,7 @@ if ! command -v babysitter &>/dev/null; then
24
24
  fi
25
25
  fi
26
26
 
27
- LOG_DIR="${BABYSITTER_LOG_DIR:-$PLUGIN_ROOT/.a5c/logs}"
27
+ LOG_DIR="${BABYSITTER_LOG_DIR:-$HOME/.a5c/logs}"
28
28
  mkdir -p "$LOG_DIR" 2>/dev/null
29
29
 
30
30
  INPUT_FILE=$(mktemp 2>/dev/null || echo "/tmp/hook-user-prompt-submitted-$$.json")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@a5c-ai/babysitter-github",
3
- "version": "0.1.4",
3
+ "version": "0.1.5-staging.20a61093",
4
4
  "description": "Babysitter orchestration plugin for GitHub Copilot CLI with lifecycle hooks and SDK-managed process-library bootstrapping",
5
5
  "scripts": {
6
6
  "test": "node scripts/sync-command-surfaces.js --check && node test/cloud-agent-install.test.js",
@@ -45,6 +45,6 @@
45
45
  },
46
46
  "homepage": "https://github.com/a5c-ai/babysitter/tree/main/plugins/babysitter-github#readme",
47
47
  "dependencies": {
48
- "@a5c-ai/babysitter-sdk": "0.0.187"
48
+ "@a5c-ai/babysitter-sdk": "0.0.188-staging.20a61093"
49
49
  }
50
50
  }
@@ -18,24 +18,21 @@ Read the SDK version from `versions.json` to ensure version compatibility:
18
18
 
19
19
  ```bash
20
20
  SDK_VERSION=$(node -e "try{console.log(JSON.parse(require('fs').readFileSync('${PLUGIN_ROOT}/versions.json','utf8')).sdkVersion||'latest')}catch{console.log('latest')}")
21
- sudo npm i -g @a5c-ai/babysitter-sdk@$SDK_VERSION
22
- # sudo is depending on the env and system
21
+ CLI="npx -y @a5c-ai/babysitter-sdk@$SDK_VERSION"
23
22
  ```
24
23
 
25
- then use the CLI alias: CLI="babysitter"
26
-
27
- **Alternatively, use the CLI alias:** `CLI="npx -y @a5c-ai/babysitter-sdk@$SDK_VERSION"`
24
+ If `babysitter` is already installed globally at the correct version, you may use `CLI="babysitter"` instead.
28
25
 
29
26
  ### jq
30
27
 
31
- make sure you have jq installed and available in the path. if not, install it.
28
+ Make sure `jq` is installed and available in the path. If not, install it.
32
29
 
33
30
  ## Instructions
34
31
 
35
32
  Run the following command to get full orchestration instructions:
36
33
 
37
34
  ```bash
38
- babysitter instructions:babysit-skill --harness github-copilot --json
35
+ $CLI instructions:babysit-skill --harness github-copilot --json
39
36
  ```
40
37
 
41
38
  Follow the instructions returned by the command above to orchestrate the run.
@@ -49,9 +46,9 @@ is ignored and cannot block or restart the session.
49
46
  Therefore, you MUST use **in-turn iteration**: run the full orchestration loop
50
47
  within a single session turn. The pattern is:
51
48
 
52
- 1. `babysitter run:iterate --json` -- get pending actions
49
+ 1. `$CLI run:iterate --json` -- get pending actions
53
50
  2. For each pending action: execute it (run tasks, post results via `task:post`)
54
- 3. `babysitter run:iterate --json` -- check for more pending actions
51
+ 3. `$CLI run:iterate --json` -- check for more pending actions
55
52
  4. Repeat steps 2-3 until run completes or reaches a breakpoint requiring user input
56
53
  5. If a breakpoint requires user input, ask the user and post the response, then continue iterating
57
54
 
@@ -63,7 +60,7 @@ the orchestration loop. The agent drives the loop directly by calling
63
60
 
64
61
  ```bash
65
62
  # Initial iterate
66
- RESULT=$(babysitter run:iterate --run-id "$RUN_ID" --json)
63
+ RESULT=$($CLI run:iterate --run-id "$RUN_ID" --json)
67
64
  STATUS=$(echo "$RESULT" | jq -r '.status')
68
65
 
69
66
  while [ "$STATUS" != "completed" ] && [ "$STATUS" != "failed" ]; do
@@ -71,7 +68,7 @@ while [ "$STATUS" != "completed" ] && [ "$STATUS" != "failed" ]; do
71
68
  # ... execute tasks, post results ...
72
69
 
73
70
  # Iterate again
74
- RESULT=$(babysitter run:iterate --run-id "$RUN_ID" --json)
71
+ RESULT=$($CLI run:iterate --run-id "$RUN_ID" --json)
75
72
  STATUS=$(echo "$RESULT" | jq -r '.status')
76
73
  done
77
74
  ```
@@ -178,13 +178,13 @@ Mark as PASS if no issues. Mark as WARN if runaway loops or stale sessions detec
178
178
  **Goal:** Analyze babysitter log files for errors, warnings, and stop hook decisions.
179
179
 
180
180
  Read the last 50 lines of each of these log files (if they exist):
181
- - `$CLAUDE_PLUGIN_ROOT/.a5c/logs/hooks.log`
182
- - `$CLAUDE_PLUGIN_ROOT/.a5c/logs/babysitter-stop-hook.log`
183
- - `$CLAUDE_PLUGIN_ROOT/.a5c/logs/babysitter-stop-hook-stderr.log`
184
- - `$CLAUDE_PLUGIN_ROOT/.a5c/logs/babysitter-session-start-hook.log`
185
- - `$CLAUDE_PLUGIN_ROOT/.a5c/logs/babysitter-session-start-hook-stderr.log`
186
- - `$CLAUDE_PLUGIN_ROOT/.a5c/logs/babysitter.log`
187
- - `$HOME/.a5c/logs/` and relevant logs and run/session specific logs there
181
+ - `${BABYSITTER_LOG_DIR:-$HOME/.a5c/logs}/hooks.log`
182
+ - `${BABYSITTER_LOG_DIR:-$HOME/.a5c/logs}/babysitter-stop-hook.log`
183
+ - `${BABYSITTER_LOG_DIR:-$HOME/.a5c/logs}/babysitter-stop-hook-stderr.log`
184
+ - `${BABYSITTER_LOG_DIR:-$HOME/.a5c/logs}/babysitter-session-start-hook.log`
185
+ - `${BABYSITTER_LOG_DIR:-$HOME/.a5c/logs}/babysitter-session-start-hook-stderr.log`
186
+ - `${BABYSITTER_LOG_DIR:-$HOME/.a5c/logs}/babysitter.log`
187
+ - `${BABYSITTER_LOG_DIR:-$HOME/.a5c/logs}/` and relevant run/session specific logs there
188
188
 
189
189
 
190
190
  For each log file:
@@ -286,7 +286,7 @@ The hooks delegate to the `babysitter` CLI. Check if it is available:
286
286
  Check whether the stop hook has actually been invoked during this run's lifetime:
287
287
 
288
288
  **From log files:**
289
- - Read `$CLAUDE_PLUGIN_ROOT/.a5c/logs/babysitter-stop-hook.log` (if it exists).
289
+ - Read `${BABYSITTER_LOG_DIR:-$HOME/.a5c/logs}/babysitter-stop-hook.log` (if it exists).
290
290
  - Count the number of "Hook script invoked" lines. This is the total invocation count.
291
291
  - Count the number of "CLI exit code=" lines and extract exit codes.
292
292
  - If the log file does not exist or has zero invocations, the stop hook has NOT been running.
@@ -298,7 +298,7 @@ Check whether the stop hook has actually been invoked during this run's lifetime
298
298
  - If no STOP_HOOK_INVOKED events exist in the journal, note that the stop hook has not recorded any decisions for this run.
299
299
 
300
300
  **From stderr:**
301
- - Read `$CLAUDE_PLUGIN_ROOT/.a5c/logs/babysitter-stop-hook-stderr.log`.
301
+ - Read `${BABYSITTER_LOG_DIR:-$HOME/.a5c/logs}/babysitter-stop-hook-stderr.log`.
302
302
  - If it contains error output, display it and diagnose:
303
303
  - "command not found" or exit code 127 → CLI not installed (see 10c)
304
304
  - "MODULE_NOT_FOUND" or "Cannot find module" → SDK package corrupted or not built
package/versions.json CHANGED
@@ -1,3 +1,3 @@
1
1
  {
2
- "sdkVersion": "0.0.187"
2
+ "sdkVersion": "0.0.188-staging.20a61093"
3
3
  }