@a5c-ai/babysitter-cursor 0.1.1-staging.88b9b847

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.
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "babysitter-cursor",
3
+ "version": "0.1.0",
4
+ "description": "Babysitter orchestration plugin for Cursor IDE/CLI with lifecycle hooks and SDK-managed process-library bootstrapping",
5
+ "author": {
6
+ "name": "a5c.ai",
7
+ "email": "support@a5c.ai"
8
+ },
9
+ "homepage": "https://github.com/a5c-ai/babysitter/tree/main/plugins/babysitter-cursor#readme",
10
+ "repository": "https://github.com/a5c-ai/babysitter",
11
+ "license": "MIT",
12
+ "keywords": [
13
+ "babysitter",
14
+ "cursor",
15
+ "orchestration",
16
+ "hooks",
17
+ "skills"
18
+ ],
19
+ "skills": "skills/",
20
+ "commands": "commands/",
21
+ "hooks": "hooks.json"
22
+ }
package/.cursorrules ADDED
@@ -0,0 +1,55 @@
1
+ # Babysitter Orchestration Agent
2
+
3
+ You are operating under Babysitter orchestration. Babysitter manages complex, multi-step
4
+ workflows with event-sourced state management, hook-based extensibility, and human-in-the-loop
5
+ approval gates.
6
+
7
+ ## Key Behaviors
8
+
9
+ 1. **Follow the process definition exactly.** Each task in the workflow has been defined with
10
+ specific inputs, outputs, and quality criteria. Do not skip steps or improvise alternatives
11
+ unless explicitly told to by the orchestrator.
12
+
13
+ 2. **Report completion accurately.** When you finish a task, your output must match the expected
14
+ result schema. Do not fabricate results or claim success without evidence.
15
+
16
+ 3. **Respect breakpoints.** When you encounter a breakpoint (human approval gate), stop and wait.
17
+ Do not attempt to bypass or auto-approve breakpoints.
18
+
19
+ 4. **Use structured output.** When the orchestrator requests JSON output, respond with valid JSON
20
+ only. Do not wrap it in markdown code fences or add commentary outside the JSON.
21
+
22
+ 5. **Completion proof.** When you have completed all assigned work, output the completion proof
23
+ token provided by the orchestrator: `<promise>COMPLETION_PROOF</promise>`. This signals the
24
+ Stop hook to allow the session to end.
25
+
26
+ ## Environment
27
+
28
+ - **Harness**: Cursor IDE/CLI
29
+ - **SDK CLI**: `babysitter` (installed globally or via npx)
30
+ - **State directory**: `.a5c/` in the project root
31
+
32
+ ## Available Skills
33
+
34
+ Use the babysitter skills for orchestration workflows:
35
+
36
+ - `babysit` - Start and orchestrate a babysitter run
37
+ - `call` - Start a new orchestration run
38
+ - `resume` - Resume an existing run
39
+ - `plan` - Plan a workflow without executing
40
+ - `doctor` - Diagnose run health and issues
41
+ - `retrospect` - Analyze completed runs
42
+ - `observe` - Monitor and inspect runs
43
+ - `help` - Get usage help
44
+ - `assimilate` - Ingest external methodologies
45
+ - `user-install` - Set up user-level configuration
46
+
47
+ ## SDK CLI Commands
48
+
49
+ ```bash
50
+ babysitter run:create --process-id <id> --entry <path>#<export> --inputs <file> --prompt "$PROMPT" --harness cursor --json
51
+ babysitter run:iterate <runDir> --json --iteration <n> --plugin-root <root>
52
+ babysitter run:status <runId> --json
53
+ babysitter task:list <runId> --pending --json
54
+ babysitter task:post <runId> <effectId> --status <ok|error> --value <file> --json
55
+ ```
package/README.md ADDED
@@ -0,0 +1,483 @@
1
+ # @a5c-ai/babysitter-cursor
2
+
3
+ Babysitter orchestration plugin for [Cursor IDE](https://cursor.com) and
4
+ its headless CLI agent mode.
5
+
6
+ This package ships a complete Cursor plugin bundle -- skills, lifecycle
7
+ hooks, and SDK integration -- that lets you run Babysitter's event-sourced,
8
+ multi-step orchestration engine directly inside Cursor sessions. It uses the
9
+ Babysitter SDK CLI and the shared `~/.a5c` process-library state. The
10
+ installer registers the plugin bundle and materializes the active skills and
11
+ hooks so Cursor can execute Babysitter commands and hook scripts directly.
12
+
13
+ ## Prerequisites
14
+
15
+ - **Node.js 22+**
16
+ - **Cursor IDE** with CLI agent support (`cursor` command available on PATH)
17
+ - **CURSOR_API_KEY** environment variable -- required for headless CLI mode
18
+ - **Babysitter SDK CLI** (`@a5c-ai/babysitter-sdk`) -- installed globally
19
+
20
+ ## Installation
21
+
22
+ Install the SDK CLI first:
23
+
24
+ ```bash
25
+ npm install -g @a5c-ai/babysitter-sdk
26
+ ```
27
+
28
+ ### Via Cursor Marketplace (recommended)
29
+
30
+ Install directly from the Cursor Marketplace:
31
+
32
+ 1. Open **Cursor IDE** and navigate to **Settings > Plugins**
33
+ 2. Search for **babysitter-cursor**
34
+ 3. Click **Install**
35
+
36
+ ### Via Babysitter plugin manager
37
+
38
+ ```bash
39
+ babysitter plugin:install babysitter-cursor --marketplace-name a5c.ai --global
40
+ ```
41
+
42
+ ### Workspace installation
43
+
44
+ ```bash
45
+ babysitter plugin:install babysitter-cursor --marketplace-name a5c.ai --project
46
+ ```
47
+
48
+ If the workspace does not already have an active process-library binding, the
49
+ installer bootstraps the shared global SDK process library automatically:
50
+
51
+ ```bash
52
+ babysitter process-library:active --json
53
+ ```
54
+
55
+ ### Alternative Installation (development)
56
+
57
+ For local development or environments without marketplace access:
58
+
59
+ #### Via npm
60
+
61
+ ```bash
62
+ npm install -g @a5c-ai/babysitter-cursor
63
+ babysitter-cursor install
64
+ ```
65
+
66
+ #### From source
67
+
68
+ ```bash
69
+ cd plugins/babysitter-cursor
70
+ node bin/install.js
71
+ ```
72
+
73
+ #### Manual installation
74
+
75
+ Copy the plugin directory to your local Cursor plugins path:
76
+
77
+ ```bash
78
+ cp -r plugins/babysitter-cursor ~/.cursor/plugins/local/babysitter-cursor
79
+ # Or symlink for faster iteration:
80
+ ln -s "$(pwd)/plugins/babysitter-cursor" ~/.cursor/plugins/local/babysitter-cursor
81
+ ```
82
+
83
+ ## Uninstallation
84
+
85
+ ```bash
86
+ babysitter-cursor uninstall
87
+ ```
88
+
89
+ Or via the plugin manager:
90
+
91
+ ```bash
92
+ babysitter plugin:uninstall babysitter-cursor --global
93
+ ```
94
+
95
+ ## Plugin Structure (Directory Layout)
96
+
97
+ ```
98
+ plugins/babysitter-cursor/
99
+ .cursor-plugin/
100
+ plugin.json # Cursor plugin manifest (skills, commands, hooks, metadata)
101
+ plugin.json # Babysitter plugin manifest (skills dir, hooks path, metadata)
102
+ hooks.json # Hook configuration (sessionStart, stop)
103
+ hooks/
104
+ session-start.sh # SessionStart lifecycle hook (bash)
105
+ session-start.ps1 # SessionStart lifecycle hook (PowerShell)
106
+ stop-hook.sh # Stop hook -- orchestration loop driver (bash)
107
+ stop-hook.ps1 # Stop hook -- orchestration loop driver (PowerShell)
108
+ skills/
109
+ babysit/SKILL.md # Core orchestration skill
110
+ call/SKILL.md # Start a new run
111
+ plan/SKILL.md # Plan without executing
112
+ resume/SKILL.md # Resume an incomplete run
113
+ doctor/SKILL.md # Diagnose run health
114
+ retrospect/SKILL.md # Analyze completed runs
115
+ observe/SKILL.md # Observer dashboard
116
+ assimilate/SKILL.md # Assimilate external methodologies
117
+ help/SKILL.md # Help and documentation
118
+ user-install/SKILL.md # User setup
119
+ bin/
120
+ cli.js # CLI entry point (babysitter-cursor command)
121
+ install.js # Installation script
122
+ install-shared.js # Shared installation utilities
123
+ uninstall.js # Uninstallation script
124
+ scripts/
125
+ team-install.js # Team-level installation
126
+ versions.json # SDK version pinning
127
+ package.json # npm package metadata
128
+ .cursorrules # Custom instructions for Cursor agent
129
+ .gitignore
130
+ ```
131
+
132
+ ## Hook Configuration
133
+
134
+ The plugin declares lifecycle hooks in `hooks.json` using the version 1
135
+ format. Hook event names use camelCase (e.g., `sessionStart`, `stop`).
136
+
137
+ ```json
138
+ {
139
+ "version": 1,
140
+ "hooks": {
141
+ "sessionStart": [
142
+ {
143
+ "type": "command",
144
+ "bash": "./hooks/session-start.sh",
145
+ "powershell": "./hooks/session-start.ps1",
146
+ "timeoutSec": 30
147
+ }
148
+ ],
149
+ "stop": [
150
+ {
151
+ "type": "command",
152
+ "bash": "./hooks/stop-hook.sh",
153
+ "powershell": "./hooks/stop-hook.ps1",
154
+ "loop_limit": null
155
+ }
156
+ ]
157
+ }
158
+ }
159
+ ```
160
+
161
+ Each hook entry specifies a `bash` and/or `powershell` command, a `type`
162
+ (currently always `"command"`), and optional parameters like `timeoutSec`
163
+ or `loop_limit`.
164
+
165
+ ### Hook Format Details
166
+
167
+ - **version**: Must be `1`. Identifies the hooks schema version.
168
+ - **Event names**: Use camelCase (`sessionStart`, `stop`). Not snake_case,
169
+ not PascalCase.
170
+ - **loop_limit**: Controls how many times the stop hook can re-inject
171
+ continuation before the session is forced to end. Set to `null` for
172
+ unlimited orchestration iterations (the default for this plugin).
173
+ - **Input**: Hooks receive JSON via stdin containing session context
174
+ (including `conversation_id` for session identification).
175
+ - **Output**: Hooks emit JSON via stdout. The stop hook uses
176
+ `{followup_message: "..."}` to auto-continue the orchestration loop.
177
+
178
+ ## Available Skills
179
+
180
+ The plugin registers ten skills that surface as slash commands within
181
+ Cursor:
182
+
183
+ | Skill | Description |
184
+ |-------|-------------|
185
+ | `babysit` | Core entrypoint. Orchestrate `.a5c/runs/<runId>/` through iterative execution. Invoke when asked to babysit, orchestrate, or run a workflow. |
186
+ | `call` | Start a new orchestration run. Everything after `$call` becomes the initial Babysitter request. Always creates an interactive run. |
187
+ | `plan` | Design a process definition without executing it. Useful for reviewing or refining a workflow before committing to a run. |
188
+ | `resume` | Resume an incomplete or paused orchestration run from where it left off. |
189
+ | `doctor` | Diagnose run health -- journal integrity, state cache, effects, locks, sessions, logs, and disk usage. |
190
+ | `retrospect` | Analyze a completed run: results, process quality, and suggestions for process improvements and optimizations. |
191
+ | `observe` | Launch the real-time observer dashboard to watch active runs. |
192
+ | `assimilate` | Assimilate an external methodology, harness, or specification into Babysitter process definitions. |
193
+ | `help` | Show documentation for Babysitter command usage, processes, skills, agents, and methodologies. |
194
+ | `user-install` | Set up Babysitter for yourself -- installs dependencies, interviews you about preferences, and configures user-level defaults. |
195
+
196
+ ## Usage Examples
197
+
198
+ ### Interactive (Cursor IDE)
199
+
200
+ Open a Cursor session and invoke any skill as a slash command:
201
+
202
+ ```text
203
+ $babysit run my-workflow
204
+ $call build and test the authentication module
205
+ $plan design a data migration pipeline
206
+ $resume
207
+ $doctor
208
+ ```
209
+
210
+ ### Headless CLI
211
+
212
+ Run Cursor in headless agent mode for fully automated orchestration. The
213
+ `CURSOR_API_KEY` environment variable must be set.
214
+
215
+ ```bash
216
+ export CURSOR_API_KEY="your-api-key"
217
+
218
+ cursor agent -p -f --trust --approve-mcps \
219
+ 'Build and test the authentication module'
220
+ ```
221
+
222
+ With a workspace directory:
223
+
224
+ ```bash
225
+ cursor agent -p -f --trust --approve-mcps \
226
+ --workspace /path/to/repo \
227
+ 'Refactor the payment service to use the new API'
228
+ ```
229
+
230
+ **Headless CLI flags:**
231
+
232
+ | Flag | Description |
233
+ |------|-------------|
234
+ | `-p` | Print mode (output to stdout) |
235
+ | `-f` | Non-interactive / force mode |
236
+ | `--trust` | Trust the workspace (skip confirmation prompts) |
237
+ | `--approve-mcps` | Auto-approve MCP server connections |
238
+ | `--workspace <dir>` | Set the working directory |
239
+
240
+ **Note:** The `afterAgentResponse` and `afterAgentThought` hook events do
241
+ NOT fire in CLI headless mode. The plugin relies on `sessionStart` and
242
+ `stop` hooks, which are supported in both interactive and headless modes.
243
+
244
+ ## Orchestration Model
245
+
246
+ The plugin drives multi-step orchestration through a stop-hook loop
247
+ pattern. This is how Babysitter iterates autonomously within Cursor:
248
+
249
+ ### SessionStart
250
+
251
+ Fires when a new Cursor session begins. The hook:
252
+
253
+ 1. Checks and installs the required SDK version (pinned in `versions.json`)
254
+ 2. Initializes a Babysitter session for the active Cursor session
255
+ 3. The session ID is extracted from `conversation_id` in the hook's stdin
256
+ JSON (not from an environment variable)
257
+
258
+ ### Stop (Orchestration Loop Driver)
259
+
260
+ When Cursor attempts to end its turn, this hook intercepts the exit and:
261
+
262
+ 1. Checks whether the active run has completed or emitted a completion proof
263
+ 2. If the run is still in progress, emits `{followup_message: "..."}` to
264
+ auto-continue the orchestration loop with the next iteration step
265
+ 3. Only allows the session to exit when the run finishes or reaches a
266
+ breakpoint requiring human input
267
+
268
+ This is what keeps Babysitter iterating autonomously -- each turn performs
269
+ one orchestration phase, and the stop hook decides whether to loop or yield.
270
+ The `loop_limit: null` setting in `hooks.json` allows unlimited iterations.
271
+
272
+ **Important:** The stop hook uses `{followup_message: "..."}` to signal
273
+ continuation, NOT `{decision: "block"}`. This is a Cursor-specific
274
+ convention.
275
+
276
+ ## Configuration
277
+
278
+ ### .cursorrules
279
+
280
+ The plugin includes a `.cursorrules` file for custom agent instructions.
281
+ This file is discovered by Cursor by convention and configures agent
282
+ behavior within sessions.
283
+
284
+ ### Environment Variables
285
+
286
+ | Variable | Default | Description |
287
+ |----------|---------|-------------|
288
+ | `CURSOR_API_KEY` | -- | API key for headless CLI mode (required) |
289
+ | `CURSOR_PLUGIN_ROOT` | Plugin directory | Plugin root directory |
290
+ | `BABYSITTER_STATE_DIR` | `<cwd>/.a5c` | State directory for session data |
291
+ | `BABYSITTER_LOG_DIR` | `<plugin>/.a5c/logs` | Log output directory |
292
+
293
+ ### SDK Version Pinning
294
+
295
+ The plugin pins its required SDK version in `versions.json`. The
296
+ SessionStart hook reads this file and ensures the correct version of
297
+ `@a5c-ai/babysitter-sdk` is installed globally before proceeding.
298
+
299
+ ## Marketplace Distribution
300
+
301
+ Cursor Marketplace is Git-based. Plugins are distributed through Git
302
+ repositories that contain a manifest file.
303
+
304
+ ### Plugin Manifest
305
+
306
+ The Cursor marketplace manifest lives at `.cursor-plugin/plugin.json`:
307
+
308
+ ```json
309
+ {
310
+ "name": "babysitter-cursor",
311
+ "version": "0.1.0",
312
+ "description": "Babysitter orchestration plugin for Cursor IDE/CLI ...",
313
+ "author": {
314
+ "name": "a5c.ai",
315
+ "email": "support@a5c.ai",
316
+ "url": "https://github.com/a5c-ai/babysitter"
317
+ },
318
+ "homepage": "https://github.com/a5c-ai/babysitter/tree/main/plugins/babysitter-cursor#readme",
319
+ "repository": "https://github.com/a5c-ai/babysitter",
320
+ "license": "MIT",
321
+ "skills": "skills/",
322
+ "hooks": "hooks.json"
323
+ }
324
+ ```
325
+
326
+ The `skills` field points to the skills directory where Cursor
327
+ auto-discovers `SKILL.md` files in subdirectories. The `hooks` field
328
+ references the `hooks.json` configuration file.
329
+
330
+ ### Marketplace Manifest
331
+
332
+ To distribute through a marketplace, add the plugin to the marketplace's
333
+ `marketplace.json`:
334
+
335
+ ```json
336
+ {
337
+ "name": "a5c.ai",
338
+ "owner": {
339
+ "name": "a5c.ai",
340
+ "email": "support@a5c.ai"
341
+ },
342
+ "metadata": {
343
+ "description": "Babysitter orchestration plugins",
344
+ "version": "1.0.0"
345
+ },
346
+ "plugins": [
347
+ {
348
+ "name": "babysitter-cursor",
349
+ "description": "Multi-step workflow orchestration for Cursor IDE",
350
+ "version": "0.1.0",
351
+ "source": "./plugins/babysitter-cursor"
352
+ }
353
+ ]
354
+ }
355
+ ```
356
+
357
+ ### User Commands
358
+
359
+ ```bash
360
+ babysitter plugin:add-marketplace --marketplace-url https://github.com/a5c-ai/babysitter --global
361
+ babysitter plugin:list-plugins --marketplace-name a5c.ai --global
362
+ babysitter plugin:install babysitter-cursor --marketplace-name a5c.ai --global
363
+ ```
364
+
365
+ ## Troubleshooting
366
+
367
+ ### Hook not firing
368
+
369
+ Run the doctor skill from within a Cursor session to diagnose hook and
370
+ session health:
371
+
372
+ ```text
373
+ $doctor
374
+ ```
375
+
376
+ Also check log output in `<plugin-root>/.a5c/logs/`:
377
+
378
+ - `babysitter-session-start-hook.log`
379
+ - `babysitter-stop-hook.log`
380
+ - `babysitter-stop-hook-stderr.log`
381
+ - `babysitter-session-start-hook-stderr.log`
382
+
383
+ ### Run stuck or not progressing
384
+
385
+ Check the run status and diagnose:
386
+
387
+ ```text
388
+ $doctor [run-id]
389
+ ```
390
+
391
+ Or inspect the run directory directly:
392
+
393
+ ```bash
394
+ babysitter run:status --run-id <runId> --json
395
+ babysitter run:events --run-id <runId> --json
396
+ ```
397
+
398
+ ### SDK version mismatch
399
+
400
+ If the plugin reports version incompatibility, ensure the pinned SDK
401
+ version is installed:
402
+
403
+ ```bash
404
+ SDK_VERSION=$(node -e "console.log(JSON.parse(require('fs').readFileSync('versions.json','utf8')).sdkVersion)")
405
+ npm install -g @a5c-ai/babysitter-sdk@$SDK_VERSION
406
+ ```
407
+
408
+ ### Headless mode not working
409
+
410
+ Verify that `CURSOR_API_KEY` is set:
411
+
412
+ ```bash
413
+ echo $CURSOR_API_KEY
414
+ ```
415
+
416
+ Ensure the `cursor` CLI is available on PATH:
417
+
418
+ ```bash
419
+ cursor --version
420
+ ```
421
+
422
+ ### afterAgentResponse / afterAgentThought hooks not firing
423
+
424
+ These hook events do not fire in CLI headless mode. This is expected
425
+ Cursor behavior. The plugin is designed to work with `sessionStart` and
426
+ `stop` hooks only, which are supported in both interactive and headless
427
+ modes.
428
+
429
+ ### Windows limitations
430
+
431
+ On native Windows, hook execution depends on shell configuration. The
432
+ plugin includes both `bash` (.sh) and `powershell` (.ps1) hook scripts
433
+ to maximize compatibility. If hooks do not fire, try running from Git Bash
434
+ or WSL. The `hooks.json` file includes `powershell` entries alongside
435
+ `bash` entries for Windows PowerShell execution support.
436
+
437
+ ## Development / Contributing
438
+
439
+ ### Local development
440
+
441
+ ```bash
442
+ git clone https://github.com/a5c-ai/babysitter.git
443
+ cd babysitter
444
+ npm install
445
+ cd plugins/babysitter-cursor
446
+ node bin/install.js
447
+ ```
448
+
449
+ ### Publishing
450
+
451
+ ```bash
452
+ cd plugins/babysitter-cursor
453
+ npm run deploy # Publish to npm (public)
454
+ npm run deploy:staging # Publish to npm with staging tag
455
+ ```
456
+
457
+ ### Team installation
458
+
459
+ ```bash
460
+ cd plugins/babysitter-cursor
461
+ npm run team:install
462
+ ```
463
+
464
+ This sets up the plugin for all team members in a shared workspace,
465
+ writing team-level configuration to `.a5c/team/`.
466
+
467
+ ### Verification
468
+
469
+ Verify the installed plugin bundle:
470
+
471
+ ```bash
472
+ npm ls -g @a5c-ai/babysitter-cursor --depth=0
473
+ ```
474
+
475
+ Verify the active shared process-library binding:
476
+
477
+ ```bash
478
+ babysitter process-library:active --json
479
+ ```
480
+
481
+ ## License
482
+
483
+ MIT
package/bin/cli.js ADDED
@@ -0,0 +1,104 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ const path = require('path');
5
+ const { spawnSync } = require('child_process');
6
+
7
+ const PACKAGE_ROOT = path.resolve(__dirname, '..');
8
+
9
+ function printUsage() {
10
+ console.error([
11
+ 'Usage:',
12
+ ' babysitter-cursor install [--global]',
13
+ ' babysitter-cursor install --workspace [path]',
14
+ ' babysitter-cursor uninstall',
15
+ ].join('\n'));
16
+ }
17
+
18
+ function parseInstallArgs(argv) {
19
+ let scope = 'global';
20
+ let workspace = null;
21
+ const passthrough = [];
22
+
23
+ for (let i = 0; i < argv.length; i += 1) {
24
+ const arg = argv[i];
25
+ if (arg === '--global') {
26
+ if (scope === 'workspace') {
27
+ throw new Error('install accepts either --global or --workspace, not both');
28
+ }
29
+ scope = 'global';
30
+ continue;
31
+ }
32
+ if (arg === '--workspace') {
33
+ if (scope === 'global' && workspace !== null) {
34
+ throw new Error('install accepts either --global or --workspace, not both');
35
+ }
36
+ scope = 'workspace';
37
+ const next = argv[i + 1];
38
+ if (next && !next.startsWith('-')) {
39
+ workspace = path.resolve(next);
40
+ i += 1;
41
+ } else {
42
+ workspace = process.cwd();
43
+ }
44
+ continue;
45
+ }
46
+ passthrough.push(arg);
47
+ }
48
+
49
+ return {
50
+ scope,
51
+ workspace,
52
+ passthrough,
53
+ };
54
+ }
55
+
56
+ function runNodeScript(scriptPath, args, extraEnv = {}) {
57
+ const result = spawnSync(process.execPath, [scriptPath, ...args], {
58
+ cwd: process.cwd(),
59
+ stdio: 'inherit',
60
+ env: {
61
+ ...process.env,
62
+ ...extraEnv,
63
+ },
64
+ });
65
+ process.exitCode = result.status ?? 1;
66
+ }
67
+
68
+ function main() {
69
+ const [command, ...rest] = process.argv.slice(2);
70
+ if (!command || command === '--help' || command === '-h' || command === 'help') {
71
+ printUsage();
72
+ process.exitCode = command ? 0 : 1;
73
+ return;
74
+ }
75
+
76
+ if (command === 'install') {
77
+ const parsed = parseInstallArgs(rest);
78
+ if (parsed.scope === 'workspace') {
79
+ const args = [];
80
+ if (parsed.workspace) {
81
+ args.push('--workspace', parsed.workspace);
82
+ }
83
+ args.push(...parsed.passthrough);
84
+ runNodeScript(
85
+ path.join(PACKAGE_ROOT, 'scripts', 'team-install.js'),
86
+ args,
87
+ { BABYSITTER_PACKAGE_ROOT: PACKAGE_ROOT },
88
+ );
89
+ return;
90
+ }
91
+ runNodeScript(path.join(PACKAGE_ROOT, 'bin', 'install.js'), parsed.passthrough);
92
+ return;
93
+ }
94
+
95
+ if (command === 'uninstall') {
96
+ runNodeScript(path.join(PACKAGE_ROOT, 'bin', 'uninstall.js'), rest);
97
+ return;
98
+ }
99
+
100
+ printUsage();
101
+ process.exitCode = 1;
102
+ }
103
+
104
+ main();