@a5c-ai/babysitter-github 5.0.1-staging.62666033 → 5.0.1-staging.686c8b317
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 +12 -14
- package/bin/install-shared.js +1 -1
- package/commands/cleanup.md +30 -8
- package/commands/doctor.md +2 -3
- package/hooks/babysitter-proxied-post-tool-use.ps1 +12 -0
- package/hooks/babysitter-proxied-post-tool-use.sh +3 -0
- package/hooks/babysitter-proxied-pre-compact.ps1 +12 -0
- package/hooks/babysitter-proxied-pre-compact.sh +3 -0
- package/hooks/babysitter-proxied-pre-tool-use.ps1 +12 -0
- package/hooks/babysitter-proxied-pre-tool-use.sh +3 -0
- package/hooks/babysitter-proxied-session-end.sh +0 -0
- package/hooks/babysitter-proxied-session-start.sh +0 -0
- package/hooks/babysitter-proxied-user-prompt-submitted.sh +0 -0
- package/hooks.json +24 -0
- package/package.json +5 -6
- package/plugin.json +1 -1
- package/scripts/create-release-tag.mjs +18 -0
- package/scripts/publish-from-tag.mjs +41 -0
- package/skills/cleanup/SKILL.md +30 -8
- package/skills/doctor/SKILL.md +2 -3
- package/versions.json +2 -2
- package/scripts/sync-command-surfaces.js +0 -20
package/README.md
CHANGED
|
@@ -28,7 +28,7 @@ Register the a5c.ai marketplace and install the plugin:
|
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
30
|
# Register the marketplace
|
|
31
|
-
copilot plugin marketplace add a5c-ai/babysitter
|
|
31
|
+
copilot plugin marketplace add a5c-ai/babysitter-claude
|
|
32
32
|
|
|
33
33
|
# Install the plugin
|
|
34
34
|
copilot plugin install babysitter
|
|
@@ -36,11 +36,10 @@ copilot plugin install babysitter
|
|
|
36
36
|
|
|
37
37
|
### Direct GitHub install
|
|
38
38
|
|
|
39
|
-
Install directly from the
|
|
40
|
-
discovers the plugin via `.github/plugin/marketplace.json` at the repo root:
|
|
39
|
+
Install directly from the generated external plugin repository:
|
|
41
40
|
|
|
42
41
|
```bash
|
|
43
|
-
copilot plugin install a5c-ai/babysitter
|
|
42
|
+
copilot plugin install a5c-ai/babysitter-github-copilot
|
|
44
43
|
```
|
|
45
44
|
|
|
46
45
|
### Alternative Installation (npm / development)
|
|
@@ -61,11 +60,11 @@ npm install -g @a5c-ai/babysitter-github
|
|
|
61
60
|
babysitter-github install
|
|
62
61
|
```
|
|
63
62
|
|
|
64
|
-
Or install from source:
|
|
63
|
+
Or install from generated source:
|
|
65
64
|
|
|
66
65
|
```bash
|
|
67
|
-
|
|
68
|
-
node bin/install.js
|
|
66
|
+
npm run generate:plugins
|
|
67
|
+
node artifacts/generated-plugins/github-copilot/bin/install.js
|
|
69
68
|
```
|
|
70
69
|
|
|
71
70
|
Install into a specific workspace:
|
|
@@ -253,8 +252,7 @@ Copilot CLI looks for the plugin manifest in these paths, checked in order:
|
|
|
253
252
|
The first match wins. This plugin uses `plugin.json` at the package root.
|
|
254
253
|
|
|
255
254
|
For marketplace discovery, Copilot CLI looks for `.github/plugin/marketplace.json`
|
|
256
|
-
at the repository root
|
|
257
|
-
used when installing via `copilot plugin install OWNER/REPO`.
|
|
255
|
+
at the repository root of the generated plugin repository.
|
|
258
256
|
|
|
259
257
|
### plugin.json Schema
|
|
260
258
|
|
|
@@ -404,7 +402,7 @@ repository root in `.github/plugin/marketplace.json`:
|
|
|
404
402
|
"name": "babysitter",
|
|
405
403
|
"description": "Multi-step workflow orchestration with event-sourced state",
|
|
406
404
|
"version": "0.1.0",
|
|
407
|
-
"source": "./
|
|
405
|
+
"source": "./"
|
|
408
406
|
}
|
|
409
407
|
]
|
|
410
408
|
}
|
|
@@ -461,7 +459,7 @@ These registries are available without running `marketplace add`.
|
|
|
461
459
|
## Plugin Structure (Directory Layout)
|
|
462
460
|
|
|
463
461
|
```
|
|
464
|
-
plugins/
|
|
462
|
+
artifacts/generated-plugins/github-copilot/
|
|
465
463
|
plugin.json # Plugin manifest (skills, hooks, metadata)
|
|
466
464
|
.github/plugin.json # Plugin manifest (alternate discovery path)
|
|
467
465
|
hooks.json # Hook configuration (sessionStart, sessionEnd, userPromptSubmitted)
|
|
@@ -579,14 +577,14 @@ compatibility where PowerShell execution is available.
|
|
|
579
577
|
git clone https://github.com/a5c-ai/babysitter.git
|
|
580
578
|
cd babysitter
|
|
581
579
|
npm install
|
|
582
|
-
|
|
580
|
+
npm run generate:plugins
|
|
583
581
|
node bin/install.js
|
|
584
582
|
```
|
|
585
583
|
|
|
586
584
|
### Publishing
|
|
587
585
|
|
|
588
586
|
```bash
|
|
589
|
-
cd plugins/
|
|
587
|
+
cd artifacts/generated-plugins/github-copilot
|
|
590
588
|
npm run deploy # Publish to npm (public)
|
|
591
589
|
npm run deploy:staging # Publish to npm with staging tag
|
|
592
590
|
```
|
|
@@ -594,7 +592,7 @@ npm run deploy:staging # Publish to npm with staging tag
|
|
|
594
592
|
### Team installation
|
|
595
593
|
|
|
596
594
|
```bash
|
|
597
|
-
cd plugins/
|
|
595
|
+
cd artifacts/generated-plugins/github-copilot
|
|
598
596
|
npm run team:install
|
|
599
597
|
```
|
|
600
598
|
|
package/bin/install-shared.js
CHANGED
|
@@ -104,7 +104,7 @@ function ensureMarketplaceEntry(marketplacePath, pluginRoot) {
|
|
|
104
104
|
name: PLUGIN_NAME,
|
|
105
105
|
source: relSource,
|
|
106
106
|
description: "Orchestrate complex, multi-step workflows with event-sourced state management, hook-based extensibility, and human-in-the-loop approval",
|
|
107
|
-
version: "5.0.
|
|
107
|
+
version: "5.0.1-staging.686c8b317",
|
|
108
108
|
author: { name: "a5c.ai" },
|
|
109
109
|
};
|
|
110
110
|
if (idx >= 0) marketplace.plugins[idx] = entry;
|
package/commands/cleanup.md
CHANGED
|
@@ -10,11 +10,33 @@ Create and run a cleanup process using the process at `skills\babysit\process\cr
|
|
|
10
10
|
|
|
11
11
|
Implementation notes (for the process):
|
|
12
12
|
- Parse arguments for `--dry-run` flag (if present, set dryRun: true in inputs) and `--keep-days N` (default: 7)
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
13
|
+
|
|
14
|
+
CRITICAL: The cleanup MUST follow this exact phase order. Do NOT delete any run before Phase 2 completes.
|
|
15
|
+
|
|
16
|
+
Phase 1 — Scan:
|
|
17
|
+
- Scan .a5c/runs/ for all runs
|
|
18
|
+
- Classify each as terminal (completed/failed) or active (in-progress/created)
|
|
19
|
+
- Identify terminal runs older than the keep-days threshold as removal candidates
|
|
20
|
+
- Never mark active/in-progress runs for removal
|
|
21
|
+
- Count and report: total runs, terminal, active, removal candidates, disk usage
|
|
22
|
+
|
|
23
|
+
Phase 2 — Aggregate insights (BEFORE any deletion):
|
|
24
|
+
- For EVERY removal candidate, read its run.json and journal/ events
|
|
25
|
+
- Extract: processId, prompt, status, event count, created date, task summaries
|
|
26
|
+
- Group by process type and extract patterns (retry counts, convergence behavior, failure modes)
|
|
27
|
+
- Append a new dated section to docs/run-history-insights.md with:
|
|
28
|
+
- Summary statistics (runs removed, disk freed, runs retained)
|
|
29
|
+
- Run categories with counts and descriptions
|
|
30
|
+
- Key patterns observed (multi-batch convergence, retry behavior, etc.)
|
|
31
|
+
- What worked well / what didn't from the run data
|
|
32
|
+
- This file MUST be written and verified before proceeding to Phase 3
|
|
33
|
+
|
|
34
|
+
Phase 3 — Confirm removal:
|
|
35
|
+
- In interactive mode, show the user what will be removed via a breakpoint
|
|
36
|
+
- In non-interactive mode (yolo), proceed with defaults
|
|
37
|
+
- In dry-run mode, stop here and show what would be removed
|
|
38
|
+
|
|
39
|
+
Phase 4 — Remove:
|
|
40
|
+
- Delete the terminal runs older than keep-days threshold
|
|
41
|
+
- Identify and remove orphaned process files not referenced by remaining runs
|
|
42
|
+
- Show remaining run count and disk usage after cleanup
|
package/commands/doctor.md
CHANGED
|
@@ -156,7 +156,6 @@ If it exists:
|
|
|
156
156
|
**Goal:** Inspect babysitter session files for health and detect runaway loops.
|
|
157
157
|
|
|
158
158
|
- Search for session state files using Glob:
|
|
159
|
-
- `plugins/babysitter/skills/babysit/state/*.md`
|
|
160
159
|
- `.a5c/state/*.md`
|
|
161
160
|
- `.a5c/state/*.json`
|
|
162
161
|
- For each session state file found:
|
|
@@ -260,7 +259,7 @@ Mark as PASS if total size < 500MB and no files > 10MB. Mark as WARN if total si
|
|
|
260
259
|
|
|
261
260
|
### 10a. Hook Registration
|
|
262
261
|
|
|
263
|
-
- Locate the plugin root. Check for `CLAUDE_PLUGIN_ROOT` env var, or search for `
|
|
262
|
+
- Locate the plugin root. Check for `CLAUDE_PLUGIN_ROOT` env var first, or search for a babysitter `hooks.json` by walking up from the current directory.
|
|
264
263
|
- If found, read `hooks.json` and verify:
|
|
265
264
|
- A `Stop` hook entry exists with a command referencing `babysitter-stop-hook.sh`.
|
|
266
265
|
- A `SessionStart` hook entry exists with a command referencing `babysitter-session-start-hook.sh`.
|
|
@@ -315,7 +314,7 @@ If the stop hook shows NO evidence of execution (no log entries, no journal even
|
|
|
315
314
|
|
|
316
315
|
Perform these diagnostic steps in order and report the first failure found:
|
|
317
316
|
|
|
318
|
-
1. **Plugin not installed**: Check if `
|
|
317
|
+
1. **Plugin not installed**: Check if `CLAUDE_PLUGIN_ROOT` is set or if a babysitter plugin directory exists relative to the project root. If neither exists, report: "Plugin not installed — the babysitter plugin directory is missing."
|
|
319
318
|
|
|
320
319
|
2. **Plugin not enabled**: Check for Claude settings files:
|
|
321
320
|
- `~/.claude/settings.json` — look for `babysitter` in `enabledPlugins`.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# PowerShell hook wrapper — sets env vars and delegates to bash
|
|
2
|
+
$env:HOOK_TYPE = 'post-tool-use'
|
|
3
|
+
$env:ADAPTER_NAME = 'copilot'
|
|
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
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# PowerShell hook wrapper — sets env vars and delegates to bash
|
|
2
|
+
$env:HOOK_TYPE = 'pre-compact'
|
|
3
|
+
$env:ADAPTER_NAME = 'copilot'
|
|
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
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# PowerShell hook wrapper — sets env vars and delegates to bash
|
|
2
|
+
$env:HOOK_TYPE = 'pre-tool-use'
|
|
3
|
+
$env:ADAPTER_NAME = 'copilot'
|
|
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
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/hooks.json
CHANGED
|
@@ -17,6 +17,30 @@
|
|
|
17
17
|
"timeoutSec": 15
|
|
18
18
|
}
|
|
19
19
|
],
|
|
20
|
+
"preToolUse": [
|
|
21
|
+
{
|
|
22
|
+
"type": "command",
|
|
23
|
+
"bash": "./hooks/babysitter-proxied-pre-tool-use.sh",
|
|
24
|
+
"powershell": "./hooks/babysitter-proxied-pre-tool-use.ps1",
|
|
25
|
+
"timeoutSec": 30
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"postToolUse": [
|
|
29
|
+
{
|
|
30
|
+
"type": "command",
|
|
31
|
+
"bash": "./hooks/babysitter-proxied-post-tool-use.sh",
|
|
32
|
+
"powershell": "./hooks/babysitter-proxied-post-tool-use.ps1",
|
|
33
|
+
"timeoutSec": 30
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"PreCompact": [
|
|
37
|
+
{
|
|
38
|
+
"type": "command",
|
|
39
|
+
"bash": "./hooks/babysitter-proxied-pre-compact.sh",
|
|
40
|
+
"powershell": "./hooks/babysitter-proxied-pre-compact.ps1",
|
|
41
|
+
"timeoutSec": 30
|
|
42
|
+
}
|
|
43
|
+
],
|
|
20
44
|
"sessionEnd": [
|
|
21
45
|
{
|
|
22
46
|
"type": "command",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@a5c-ai/babysitter-github",
|
|
3
|
-
"version": "5.0.1-staging.
|
|
3
|
+
"version": "5.0.1-staging.686c8b317",
|
|
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",
|
|
@@ -36,15 +36,14 @@
|
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@a5c-ai/babysitter-sdk": "5.0.1-staging.
|
|
39
|
+
"@a5c-ai/babysitter-sdk": "5.0.1-staging.686c8b317"
|
|
40
40
|
},
|
|
41
41
|
"repository": {
|
|
42
42
|
"type": "git",
|
|
43
|
-
"url": "git+https://github.com/a5c-ai/babysitter.git"
|
|
44
|
-
"directory": "plugins/babysitter-github"
|
|
43
|
+
"url": "git+https://github.com/a5c-ai/babysitter-github-copilot.git"
|
|
45
44
|
},
|
|
46
|
-
"homepage": "https://github.com/a5c-ai/babysitter
|
|
45
|
+
"homepage": "https://github.com/a5c-ai/babysitter-github-copilot#readme",
|
|
47
46
|
"bugs": {
|
|
48
|
-
"url": "https://github.com/a5c-ai/babysitter/issues"
|
|
47
|
+
"url": "https://github.com/a5c-ai/babysitter-github-copilot/issues"
|
|
49
48
|
}
|
|
50
49
|
}
|
package/plugin.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babysitter",
|
|
3
|
-
"version": "5.0.1-staging.
|
|
3
|
+
"version": "5.0.1-staging.686c8b317",
|
|
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": {
|
|
6
6
|
"name": "a5c.ai"
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { spawnSync } from 'node:child_process';
|
|
3
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
4
|
+
|
|
5
|
+
function run(command, args) {
|
|
6
|
+
const result = spawnSync(command, args, { encoding: 'utf8', stdio: 'inherit' });
|
|
7
|
+
if (result.status !== 0) process.exit(result.status || 1);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const branch = process.env.GITHUB_REF_NAME || 'develop';
|
|
11
|
+
const sha = (process.env.GITHUB_SHA || '').slice(0, 12);
|
|
12
|
+
const version = existsSync('package.json') ? JSON.parse(readFileSync('package.json', 'utf8')).version : JSON.parse(readFileSync('versions.json', 'utf8')).sdkVersion;
|
|
13
|
+
const normalized = String(version).replace(/[^0-9A-Za-z._-]/g, '-');
|
|
14
|
+
const tag = 'release/' + branch + '/v' + normalized + '-' + sha;
|
|
15
|
+
run('git', ['config', 'user.name', 'github-actions[bot]']);
|
|
16
|
+
run('git', ['config', 'user.email', 'github-actions[bot]@users.noreply.github.com']);
|
|
17
|
+
run('git', ['tag', tag]);
|
|
18
|
+
run('git', ['push', 'origin', tag]);
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { spawnSync } from 'node:child_process';
|
|
3
|
+
import { readFileSync } from 'node:fs';
|
|
4
|
+
|
|
5
|
+
function run(command, args, options = {}) {
|
|
6
|
+
const result = spawnSync(command, args, { stdio: options.stdio || 'inherit', encoding: options.encoding });
|
|
7
|
+
if (result.status !== 0 && !options.allowFailure) process.exit(result.status || 1);
|
|
8
|
+
return result;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function npmView(packageSpec) {
|
|
12
|
+
return run('npm', ['view', packageSpec, 'version'], { allowFailure: true, stdio: 'pipe', encoding: 'utf8' }).status === 0;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const pkg = JSON.parse(readFileSync('package.json', 'utf8'));
|
|
16
|
+
const ref = process.env.GITHUB_REF_NAME || '';
|
|
17
|
+
const branch = ref.split('/')[1] || 'develop';
|
|
18
|
+
const tag = branch === 'main' ? 'latest' : branch;
|
|
19
|
+
|
|
20
|
+
if (!process.env.NODE_AUTH_TOKEN) {
|
|
21
|
+
console.log('NODE_AUTH_TOKEN is not configured; skipping npm publish.');
|
|
22
|
+
process.exit(0);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if (npmView(pkg.name + '@' + pkg.version)) {
|
|
26
|
+
console.log(pkg.name + '@' + pkg.version + ' already exists; ensuring dist-tag ' + tag + '.');
|
|
27
|
+
run('npm', ['dist-tag', 'add', pkg.name + '@' + pkg.version, tag], { allowFailure: true });
|
|
28
|
+
process.exit(0);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
for (const field of ['dependencies', 'peerDependencies', 'optionalDependencies']) {
|
|
32
|
+
for (const [name, version] of Object.entries(pkg[field] || {})) {
|
|
33
|
+
if (!name.startsWith('@a5c-ai/') || version.startsWith('^') || version.startsWith('~') || version === '*' || version.startsWith('workspace:')) continue;
|
|
34
|
+
if (!npmView(name + '@' + version)) {
|
|
35
|
+
console.log('Required internal dependency ' + name + '@' + version + ' is not published yet; skipping npm publish.');
|
|
36
|
+
process.exit(0);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
run('npm', ['publish', '--access', 'public', '--tag', tag]);
|
package/skills/cleanup/SKILL.md
CHANGED
|
@@ -11,11 +11,33 @@ Create and run a cleanup process using the process at `skills\babysit\process\cr
|
|
|
11
11
|
|
|
12
12
|
Implementation notes (for the process):
|
|
13
13
|
- Parse arguments for `--dry-run` flag (if present, set dryRun: true in inputs) and `--keep-days N` (default: 7)
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
14
|
+
|
|
15
|
+
CRITICAL: The cleanup MUST follow this exact phase order. Do NOT delete any run before Phase 2 completes.
|
|
16
|
+
|
|
17
|
+
Phase 1 — Scan:
|
|
18
|
+
- Scan .a5c/runs/ for all runs
|
|
19
|
+
- Classify each as terminal (completed/failed) or active (in-progress/created)
|
|
20
|
+
- Identify terminal runs older than the keep-days threshold as removal candidates
|
|
21
|
+
- Never mark active/in-progress runs for removal
|
|
22
|
+
- Count and report: total runs, terminal, active, removal candidates, disk usage
|
|
23
|
+
|
|
24
|
+
Phase 2 — Aggregate insights (BEFORE any deletion):
|
|
25
|
+
- For EVERY removal candidate, read its run.json and journal/ events
|
|
26
|
+
- Extract: processId, prompt, status, event count, created date, task summaries
|
|
27
|
+
- Group by process type and extract patterns (retry counts, convergence behavior, failure modes)
|
|
28
|
+
- Append a new dated section to docs/run-history-insights.md with:
|
|
29
|
+
- Summary statistics (runs removed, disk freed, runs retained)
|
|
30
|
+
- Run categories with counts and descriptions
|
|
31
|
+
- Key patterns observed (multi-batch convergence, retry behavior, etc.)
|
|
32
|
+
- What worked well / what didn't from the run data
|
|
33
|
+
- This file MUST be written and verified before proceeding to Phase 3
|
|
34
|
+
|
|
35
|
+
Phase 3 — Confirm removal:
|
|
36
|
+
- In interactive mode, show the user what will be removed via a breakpoint
|
|
37
|
+
- In non-interactive mode (yolo), proceed with defaults
|
|
38
|
+
- In dry-run mode, stop here and show what would be removed
|
|
39
|
+
|
|
40
|
+
Phase 4 — Remove:
|
|
41
|
+
- Delete the terminal runs older than keep-days threshold
|
|
42
|
+
- Identify and remove orphaned process files not referenced by remaining runs
|
|
43
|
+
- Show remaining run count and disk usage after cleanup
|
package/skills/doctor/SKILL.md
CHANGED
|
@@ -157,7 +157,6 @@ If it exists:
|
|
|
157
157
|
**Goal:** Inspect babysitter session files for health and detect runaway loops.
|
|
158
158
|
|
|
159
159
|
- Search for session state files using Glob:
|
|
160
|
-
- `plugins/babysitter/skills/babysit/state/*.md`
|
|
161
160
|
- `.a5c/state/*.md`
|
|
162
161
|
- `.a5c/state/*.json`
|
|
163
162
|
- For each session state file found:
|
|
@@ -261,7 +260,7 @@ Mark as PASS if total size < 500MB and no files > 10MB. Mark as WARN if total si
|
|
|
261
260
|
|
|
262
261
|
### 10a. Hook Registration
|
|
263
262
|
|
|
264
|
-
- Locate the plugin root. Check for `CLAUDE_PLUGIN_ROOT` env var, or search for `
|
|
263
|
+
- Locate the plugin root. Check for `CLAUDE_PLUGIN_ROOT` env var first, or search for a babysitter `hooks.json` by walking up from the current directory.
|
|
265
264
|
- If found, read `hooks.json` and verify:
|
|
266
265
|
- A `Stop` hook entry exists with a command referencing `babysitter-stop-hook.sh`.
|
|
267
266
|
- A `SessionStart` hook entry exists with a command referencing `babysitter-session-start-hook.sh`.
|
|
@@ -316,7 +315,7 @@ If the stop hook shows NO evidence of execution (no log entries, no journal even
|
|
|
316
315
|
|
|
317
316
|
Perform these diagnostic steps in order and report the first failure found:
|
|
318
317
|
|
|
319
|
-
1. **Plugin not installed**: Check if `
|
|
318
|
+
1. **Plugin not installed**: Check if `CLAUDE_PLUGIN_ROOT` is set or if a babysitter plugin directory exists relative to the project root. If neither exists, report: "Plugin not installed — the babysitter plugin directory is missing."
|
|
320
319
|
|
|
321
320
|
2. **Plugin not enabled**: Check for Claude settings files:
|
|
322
321
|
- `~/.claude/settings.json` — look for `babysitter` in `enabledPlugins`.
|
package/versions.json
CHANGED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
const path = require('path');
|
|
5
|
-
const { spawnSync } = require('child_process');
|
|
6
|
-
|
|
7
|
-
const REPO_ROOT = path.resolve(__dirname, '..', '..');
|
|
8
|
-
const syncScript = path.join(REPO_ROOT, 'scripts', 'sync-plugin-commands.cjs');
|
|
9
|
-
const args = [syncScript, '--target', 'github-copilot'];
|
|
10
|
-
|
|
11
|
-
if (process.argv.includes('--check')) {
|
|
12
|
-
args.push('--check');
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const result = spawnSync(process.execPath, args, {
|
|
16
|
-
cwd: REPO_ROOT,
|
|
17
|
-
stdio: 'inherit',
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
process.exit(result.status ?? 1);
|