@a5c-ai/babysitter-cursor 0.1.5-staging.e72bed21 → 0.1.5-staging.ee1aa82e

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.
@@ -12,13 +12,14 @@
12
12
  $ErrorActionPreference = "Stop"
13
13
 
14
14
  $PluginRoot = if ($env:CURSOR_PLUGIN_ROOT) { $env:CURSOR_PLUGIN_ROOT } else { Split-Path -Parent $PSScriptRoot }
15
- $StateDir = if ($env:BABYSITTER_STATE_DIR) { $env:BABYSITTER_STATE_DIR } else { Join-Path $PWD ".a5c" }
15
+ $GlobalRoot = if ($env:BABYSITTER_GLOBAL_STATE_DIR) { $env:BABYSITTER_GLOBAL_STATE_DIR } else { Join-Path $HOME ".a5c" }
16
+ $StateDir = if ($env:BABYSITTER_STATE_DIR) { $env:BABYSITTER_STATE_DIR } else { Join-Path $GlobalRoot "state" }
16
17
  $MarkerFile = Join-Path $PluginRoot ".babysitter-install-attempted"
17
18
 
18
19
  $env:CURSOR_PLUGIN_ROOT = $PluginRoot
19
20
  $env:BABYSITTER_STATE_DIR = $StateDir
20
21
 
21
- $LogDir = if ($env:BABYSITTER_LOG_DIR) { $env:BABYSITTER_LOG_DIR } else { Join-Path $HOME ".a5c\logs" }
22
+ $LogDir = if ($env:BABYSITTER_LOG_DIR) { $env:BABYSITTER_LOG_DIR } else { Join-Path $GlobalRoot "logs" }
22
23
  $LogFile = Join-Path $LogDir "babysitter-session-start-hook.log"
23
24
  New-Item -ItemType Directory -Path $LogDir -Force -ErrorAction SilentlyContinue | Out-Null
24
25
 
@@ -14,8 +14,9 @@ set -euo pipefail
14
14
 
15
15
  SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
16
16
  PLUGIN_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
17
- STATE_DIR="${BABYSITTER_STATE_DIR:-${PWD}/.a5c}"
18
- LOG_DIR="${BABYSITTER_LOG_DIR:-$HOME/.a5c/logs}"
17
+ GLOBAL_ROOT="${BABYSITTER_GLOBAL_STATE_DIR:-$HOME/.a5c}"
18
+ STATE_DIR="${BABYSITTER_STATE_DIR:-${GLOBAL_ROOT}/state}"
19
+ LOG_DIR="${BABYSITTER_LOG_DIR:-${GLOBAL_ROOT}/logs}"
19
20
  LOG_FILE="$LOG_DIR/babysitter-session-start-hook.log"
20
21
 
21
22
  export CURSOR_PLUGIN_ROOT="${CURSOR_PLUGIN_ROOT:-${PLUGIN_ROOT}}"
@@ -10,12 +10,13 @@
10
10
  $ErrorActionPreference = "Stop"
11
11
 
12
12
  $PluginRoot = if ($env:CURSOR_PLUGIN_ROOT) { $env:CURSOR_PLUGIN_ROOT } else { Split-Path -Parent $PSScriptRoot }
13
- $StateDir = if ($env:BABYSITTER_STATE_DIR) { $env:BABYSITTER_STATE_DIR } else { Join-Path $PWD ".a5c" }
13
+ $GlobalRoot = if ($env:BABYSITTER_GLOBAL_STATE_DIR) { $env:BABYSITTER_GLOBAL_STATE_DIR } else { Join-Path $HOME ".a5c" }
14
+ $StateDir = if ($env:BABYSITTER_STATE_DIR) { $env:BABYSITTER_STATE_DIR } else { Join-Path $GlobalRoot "state" }
14
15
 
15
16
  $env:CURSOR_PLUGIN_ROOT = $PluginRoot
16
17
  $env:BABYSITTER_STATE_DIR = $StateDir
17
18
 
18
- $LogDir = if ($env:BABYSITTER_LOG_DIR) { $env:BABYSITTER_LOG_DIR } else { Join-Path $HOME ".a5c\logs" }
19
+ $LogDir = if ($env:BABYSITTER_LOG_DIR) { $env:BABYSITTER_LOG_DIR } else { Join-Path $GlobalRoot "logs" }
19
20
  $LogFile = Join-Path $LogDir "babysitter-stop-hook.log"
20
21
  New-Item -ItemType Directory -Path $LogDir -Force -ErrorAction SilentlyContinue | Out-Null
21
22
 
@@ -12,13 +12,19 @@ set -euo pipefail
12
12
 
13
13
  SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
14
14
  PLUGIN_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
15
- STATE_DIR="${BABYSITTER_STATE_DIR:-${PWD}/.a5c}"
16
- LOG_DIR="${BABYSITTER_LOG_DIR:-$HOME/.a5c/logs}"
15
+ GLOBAL_ROOT="${BABYSITTER_GLOBAL_STATE_DIR:-$HOME/.a5c}"
16
+ STATE_DIR="${BABYSITTER_STATE_DIR:-${GLOBAL_ROOT}/state}"
17
+ LOG_DIR="${BABYSITTER_LOG_DIR:-${GLOBAL_ROOT}/logs}"
17
18
  LOG_FILE="$LOG_DIR/babysitter-stop-hook.log"
18
19
 
19
20
  export CURSOR_PLUGIN_ROOT="${CURSOR_PLUGIN_ROOT:-${PLUGIN_ROOT}}"
20
21
  export BABYSITTER_STATE_DIR="${STATE_DIR}"
21
22
 
23
+ if ! command -v babysitter &>/dev/null; then
24
+ # No CLI available — exit 0 (no-op, proceed with original command)
25
+ exit 0
26
+ fi
27
+
22
28
  mkdir -p "$LOG_DIR" 2>/dev/null
23
29
 
24
30
  blog() {
@@ -33,16 +39,7 @@ blog "Hook script invoked"
33
39
  blog "PLUGIN_ROOT=$PLUGIN_ROOT"
34
40
  blog "STATE_DIR=$STATE_DIR"
35
41
 
36
- # Resolve babysitter CLI if not on PATH
37
- if ! command -v babysitter &>/dev/null; then
38
- if [ -x "$HOME/.local/bin/babysitter" ]; then
39
- export PATH="$HOME/.local/bin:$PATH"
40
- else
41
- SDK_VERSION=$(node -e "try{console.log(JSON.parse(require('fs').readFileSync('${PLUGIN_ROOT}/versions.json','utf8')).sdkVersion||'latest')}catch{console.log('latest')}" 2>/dev/null || echo "latest")
42
- babysitter() { npx -y "@a5c-ai/babysitter-sdk@${SDK_VERSION}" "$@"; }
43
- export -f babysitter
44
- fi
45
- fi
42
+
46
43
 
47
44
  INPUT_FILE=$(mktemp 2>/dev/null || echo "/tmp/cursor-stop-hook-$$.json")
48
45
  cat > "$INPUT_FILE"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@a5c-ai/babysitter-cursor",
3
- "version": "0.1.5-staging.e72bed21",
3
+ "version": "0.1.5-staging.ee1aa82e",
4
4
  "description": "Babysitter orchestration plugin for Cursor IDE with SDK-managed process-library bootstrapping and in-turn iteration model",
5
5
  "scripts": {
6
6
  "test": "node scripts/sync-command-surfaces.js --check",
@@ -44,6 +44,6 @@
44
44
  },
45
45
  "homepage": "https://github.com/a5c-ai/babysitter/tree/main/plugins/babysitter-cursor#readme",
46
46
  "dependencies": {
47
- "@a5c-ai/babysitter-sdk": "0.0.188-staging.e72bed21"
47
+ "@a5c-ai/babysitter-sdk": "0.0.188-staging.ee1aa82e"
48
48
  }
49
49
  }
@@ -18,6 +18,8 @@ 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
+ npm i -g @a5c-ai/babysitter-sdk@$SDK_VERSION
22
+
21
23
  CLI="npx -y @a5c-ai/babysitter-sdk@$SDK_VERSION"
22
24
  ```
23
25
 
package/versions.json CHANGED
@@ -1,3 +1,3 @@
1
1
  {
2
- "sdkVersion": "0.0.188-staging.e72bed21"
2
+ "sdkVersion": "0.0.188-staging.ee1aa82e"
3
3
  }