@a5c-ai/babysitter-cursor 5.0.1-staging.25e625f3 → 5.0.1-staging.26a773f9

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/bin/cli.js CHANGED
@@ -5,6 +5,8 @@ const path = require('path');
5
5
  const { spawnSync } = require('child_process');
6
6
 
7
7
  const PACKAGE_ROOT = path.resolve(__dirname, '..');
8
+ let shared;
9
+ try { shared = require('./install-shared'); } catch {}
8
10
 
9
11
  function printUsage() {
10
12
  console.error([
@@ -61,6 +63,9 @@ function main() {
61
63
  }
62
64
 
63
65
  if (command === 'install') {
66
+ if (shared && typeof shared.harnessCliRoute === 'function' && shared.harnessCliRoute(rest, PACKAGE_ROOT, runNodeScript)) {
67
+ return;
68
+ }
64
69
  const parsed = parseInstallArgs(rest);
65
70
  if (parsed.scope === 'workspace') {
66
71
  const args = [];
@@ -13,7 +13,7 @@ function getUserHome() {
13
13
  }
14
14
 
15
15
  function getHarnessHome() {
16
- return path.join(os.homedir(), '.cursor');
16
+ return path.join(os.homedir(), ".cursor");
17
17
  }
18
18
 
19
19
  function getHomePluginRoot(scope) {
@@ -198,10 +198,10 @@ function ensureGlobalProcessLibrary(packageRoot) {
198
198
  // Appended after the compiler base and SDK surface — can override base functions.
199
199
 
200
200
  const HOOK_SCRIPT_NAMES = [
201
- 'session-start.sh',
202
- 'session-start.ps1',
203
- 'stop-hook.sh',
204
- 'stop-hook.ps1',
201
+ 'babysitter-proxied-session-start.sh',
202
+ 'babysitter-proxied-session-start.ps1',
203
+ 'babysitter-proxied-stop.sh',
204
+ 'babysitter-proxied-stop.ps1',
205
205
  ];
206
206
 
207
207
  const DEFAULT_MARKETPLACE = {
@@ -489,22 +489,22 @@ module.exports = {
489
489
  resolveCliCommand,
490
490
  runCli,
491
491
  ensureGlobalProcessLibrary,
492
- HOOK_SCRIPT_NAMES,
493
- DEFAULT_MARKETPLACE,
494
- MANAGED_HOOKS_CONFIG_PATHS,
495
492
  PLUGIN_BUNDLE_ENTRIES,
496
- getCursorHome,
497
- getHomePluginRoot,
498
- getHomeMarketplacePath,
499
493
  copyRecursive,
500
494
  copyPluginBundle,
495
+ DEFAULT_MARKETPLACE,
501
496
  normalizeMarketplaceSourcePath,
502
497
  normalizeMarketplaceName,
503
498
  ensureMarketplaceEntry,
504
499
  removeMarketplaceEntry,
505
- getManagedHooksConfigPath,
506
500
  mergeManagedHooksConfig,
501
+ warnWindowsHooks,
502
+ HOOK_SCRIPT_NAMES,
503
+ MANAGED_HOOKS_CONFIG_PATHS,
504
+ getCursorHome,
505
+ getHomePluginRoot,
506
+ getHomeMarketplacePath,
507
+ getManagedHooksConfigPath,
507
508
  removeManagedHooks,
508
509
  installCursorSurface,
509
- warnWindowsHooks,
510
510
  };
package/bin/install.js CHANGED
@@ -15,6 +15,9 @@ function main() {
15
15
  try {
16
16
  shared.copyPluginBundle(PACKAGE_ROOT, pluginRoot);
17
17
  shared.ensureMarketplaceEntry(marketplacePath, pluginRoot);
18
+ if (typeof shared.harnessInstall === 'function') {
19
+ shared.harnessInstall(PACKAGE_ROOT, pluginRoot);
20
+ }
18
21
  shared.runPostInstall && shared.runPostInstall(pluginRoot);
19
22
  console.log(`[${shared.PLUGIN_NAME}] Installation complete!`);
20
23
  console.log(`[${shared.PLUGIN_NAME}] Restart your IDE/CLI to pick up the plugin.`);
package/bin/uninstall.js CHANGED
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  'use strict';
3
3
 
4
- const path = require('path');
5
4
  const fs = require('fs');
6
5
  const shared = require('./install-shared');
7
6
 
@@ -4,16 +4,16 @@
4
4
  "sessionStart": [
5
5
  {
6
6
  "type": "command",
7
- "bash": "bash \"./hooks/session-start.sh\"",
8
- "powershell": "powershell -NoProfile -ExecutionPolicy Bypass -File \"./hooks/session-start.ps1\"",
7
+ "bash": "bash \"./hooks/babysitter-proxied-session-start.sh\"",
8
+ "powershell": "powershell -NoProfile -ExecutionPolicy Bypass -File \"./hooks/babysitter-proxied-session-start.ps1\"",
9
9
  "timeoutSec": 30
10
10
  }
11
11
  ],
12
12
  "stop": [
13
13
  {
14
14
  "type": "command",
15
- "bash": "bash \"./hooks/stop-hook.sh\"",
16
- "powershell": "powershell -NoProfile -ExecutionPolicy Bypass -File \"./hooks/stop-hook.ps1\"",
15
+ "bash": "bash \"./hooks/babysitter-proxied-stop.sh\"",
16
+ "powershell": "powershell -NoProfile -ExecutionPolicy Bypass -File \"./hooks/babysitter-proxied-stop.ps1\"",
17
17
  "loop_limit": null
18
18
  }
19
19
  ]
package/hooks.json CHANGED
@@ -4,16 +4,16 @@
4
4
  "sessionStart": [
5
5
  {
6
6
  "type": "command",
7
- "bash": "bash \"./hooks/session-start.sh\"",
8
- "powershell": "powershell -NoProfile -ExecutionPolicy Bypass -File \"./hooks/session-start.ps1\"",
7
+ "bash": "bash \"./hooks/babysitter-proxied-session-start.sh\"",
8
+ "powershell": "powershell -NoProfile -ExecutionPolicy Bypass -File \"./hooks/babysitter-proxied-session-start.ps1\"",
9
9
  "timeoutSec": 30
10
10
  }
11
11
  ],
12
12
  "stop": [
13
13
  {
14
14
  "type": "command",
15
- "bash": "bash \"./hooks/stop-hook.sh\"",
16
- "powershell": "powershell -NoProfile -ExecutionPolicy Bypass -File \"./hooks/stop-hook.ps1\"",
15
+ "bash": "bash \"./hooks/babysitter-proxied-stop.sh\"",
16
+ "powershell": "powershell -NoProfile -ExecutionPolicy Bypass -File \"./hooks/babysitter-proxied-stop.ps1\"",
17
17
  "loop_limit": null
18
18
  }
19
19
  ]
package/package.json CHANGED
@@ -1,15 +1,13 @@
1
1
  {
2
2
  "name": "@a5c-ai/babysitter-cursor",
3
- "version": "5.0.1-staging.25e625f3",
3
+ "version": "5.0.1-staging.26a773f9",
4
4
  "description": "Orchestrate complex, multi-step workflows with event-sourced state management, hook-based extensibility, and human-in-the-loop approval",
5
5
  "scripts": {
6
6
  "deploy": "npm publish --access public",
7
7
  "deploy:staging": "npm publish --access public --tag staging",
8
8
  "postinstall": "node bin/install.js",
9
9
  "preuninstall": "node bin/uninstall.js",
10
- "team:install": "node scripts/team-install.js",
11
- "test": "node scripts/sync-command-surfaces.js --check",
12
- "sync:commands": "node scripts/sync-command-surfaces.js"
10
+ "team:install": "node scripts/team-install.js"
13
11
  },
14
12
  "bin": {
15
13
  "babysitter-cursor": "bin/cli.js"
@@ -37,11 +35,15 @@
37
35
  "access": "public"
38
36
  },
39
37
  "dependencies": {
40
- "@a5c-ai/babysitter-sdk": "5.0.1-staging.25e625f3"
38
+ "@a5c-ai/babysitter-sdk": "5.0.1-staging.26a773f9"
41
39
  },
42
40
  "repository": {
43
41
  "type": "git",
44
- "url": "https://github.com/a5c-ai/babysitter"
42
+ "url": "git+https://github.com/a5c-ai/babysitter.git",
43
+ "directory": "plugins/babysitter-cursor"
45
44
  },
46
- "homepage": "https://github.com/a5c-ai/babysitter/tree/main/plugins/babysitter-cursor#readme"
45
+ "homepage": "https://github.com/a5c-ai/babysitter/tree/main/plugins/babysitter-cursor#readme",
46
+ "bugs": {
47
+ "url": "https://github.com/a5c-ai/babysitter/issues"
48
+ }
47
49
  }
package/plugin.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "babysitter",
3
- "version": "5.0.1-staging.25e625f3",
3
+ "version": "5.0.1-staging.26a773f9",
4
4
  "description": "Orchestrate complex, multi-step workflows with event-sourced state management, hook-based extensibility, and human-in-the-loop approval",
5
5
  "author": "a5c.ai",
6
6
  "license": "MIT",
@@ -11,10 +11,13 @@ for (var i = 0; i < process.argv.length; i++) {
11
11
  }
12
12
  }
13
13
 
14
+ var src = process.env.PLUGIN_PACKAGE_ROOT || path.resolve(__dirname, '..');
14
15
  var dest = shared.getHomePluginRoot('workspace');
15
16
  console.log('[babysitter] Team install to ' + dest);
16
17
 
17
- var src = process.env.PLUGIN_PACKAGE_ROOT || path.resolve(__dirname, '..');
18
18
  shared.copyPluginBundle(src, dest);
19
+ if (typeof shared.harnessTeamInstall === 'function') {
20
+ shared.harnessTeamInstall(src, dest, workspace);
21
+ }
19
22
  shared.runPostInstall(dest);
20
23
  console.log('[babysitter] Team install complete.');
package/versions.json CHANGED
@@ -1,3 +1,4 @@
1
1
  {
2
- "sdkVersion": "5.0.1-staging.25e625f3"
2
+ "sdkVersion": "5.0.1-staging.26a773f9",
3
+ "extensionVersion": "5.0.0"
3
4
  }
@@ -1,12 +0,0 @@
1
- # PowerShell hook wrapper — sets env vars and delegates to bash
2
- $env:HOOK_TYPE = 'session-start'
3
- $env:ADAPTER_NAME = 'cursor'
4
- $env:PLUGIN_ROOT = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
5
-
6
- $input_data = [Console]::In.ReadToEnd()
7
- $result = $input_data | & bash "$PSScriptRoot/../$($MyInvocation.MyCommand.Name -replace '\.ps1$','.sh')" 2>$null
8
- if ($LASTEXITCODE -eq 0 -and $result) {
9
- Write-Output $result
10
- } else {
11
- Write-Output '{}'
12
- }
@@ -1,11 +0,0 @@
1
- #!/bin/bash
2
- # Session Start — installs SDK if needed, then runs hook handler.
3
- set -euo pipefail
4
- PLUGIN_ROOT="${PLUGIN_ROOT:-$(cd "$(dirname "$0")/.." && pwd)}"
5
- 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")
6
- if ! command -v babysitter &>/dev/null; then
7
- npm i -g "@a5c-ai/babysitter-sdk@${SDK_VERSION}" --loglevel=error 2>/dev/null || \
8
- npm i -g "@a5c-ai/babysitter-sdk@${SDK_VERSION}" --prefix "$HOME/.local" --loglevel=error 2>/dev/null || true
9
- [ -d "$HOME/.local/bin" ] && export PATH="$HOME/.local/bin:$PATH"
10
- fi
11
- babysitter hook:run --harness unified --hook-type session-start --json
@@ -1,12 +0,0 @@
1
- # PowerShell hook wrapper — sets env vars and delegates to bash
2
- $env:HOOK_TYPE = 'stop'
3
- $env:ADAPTER_NAME = 'cursor'
4
- $env:PLUGIN_ROOT = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
5
-
6
- $input_data = [Console]::In.ReadToEnd()
7
- $result = $input_data | & bash "$PSScriptRoot/../$($MyInvocation.MyCommand.Name -replace '\.ps1$','.sh')" 2>$null
8
- if ($LASTEXITCODE -eq 0 -and $result) {
9
- Write-Output $result
10
- } else {
11
- Write-Output '{}'
12
- }
@@ -1,3 +0,0 @@
1
- #!/bin/bash
2
- set -euo pipefail
3
- babysitter hook:run --harness unified --hook-type stop --json