@a5c-ai/babysitter-cursor 0.1.1-staging.d0170171

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