@a5c-ai/babysitter-github 0.1.5-staging.fd3ab4c2 → 5.0.0
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 +14 -26
- package/bin/install-shared.js +398 -215
- package/bin/install.js +49 -89
- package/bin/uninstall.js +30 -60
- package/commands/call.md +7 -7
- package/commands/contrib.md +31 -31
- package/commands/doctor.md +5 -5
- package/commands/forever.md +6 -6
- package/commands/help.md +245 -244
- package/commands/observe.md +12 -12
- package/commands/plan.md +7 -7
- package/commands/plugins.md +249 -249
- package/commands/project-install.md +10 -10
- package/commands/resume.md +8 -8
- package/commands/retrospect.md +55 -55
- package/commands/user-install.md +10 -10
- package/commands/yolo.md +7 -7
- package/hooks/babysitter-proxied-session-end.ps1 +12 -0
- package/hooks/babysitter-proxied-session-end.sh +3 -0
- package/hooks/babysitter-proxied-session-start.ps1 +12 -0
- package/hooks/babysitter-proxied-session-start.sh +11 -0
- package/hooks/babysitter-proxied-user-prompt-submitted.ps1 +12 -0
- package/hooks/babysitter-proxied-user-prompt-submitted.sh +3 -0
- package/hooks.json +9 -9
- package/package.json +20 -21
- package/plugin.json +9 -5
- package/scripts/create-release-tag.mjs +18 -0
- package/scripts/publish-from-tag.mjs +12 -0
- package/scripts/team-install.js +14 -84
- package/skills/babysit/SKILL.md +2 -0
- package/skills/cleanup/SKILL.md +21 -0
- package/skills/contrib/SKILL.md +34 -0
- package/skills/doctor/SKILL.md +5 -5
- package/skills/forever/SKILL.md +8 -0
- package/skills/help/SKILL.md +3 -2
- package/skills/observe/SKILL.md +1 -1
- package/skills/plugins/SKILL.md +257 -0
- package/skills/project-install/SKILL.md +18 -0
- package/skills/yolo/SKILL.md +8 -0
- package/versions.json +2 -1
- package/.github/plugin.json +0 -25
- package/hooks/session-end.ps1 +0 -68
- package/hooks/session-end.sh +0 -65
- package/hooks/session-start.ps1 +0 -110
- package/hooks/session-start.sh +0 -100
- package/hooks/user-prompt-submitted.ps1 +0 -51
- package/hooks/user-prompt-submitted.sh +0 -41
- package/scripts/sync-command-surfaces.js +0 -62
package/commands/retrospect.md
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Analysis for a run and its results, process, suggestions for process improvements, process optimizations, fixes, etc. for the next runs.
|
|
3
|
-
argument-hint: "[run-id...] [--all] Specific run IDs, --all for all runs, or defaults to latest"
|
|
4
|
-
allowed-tools: Read, Grep, Write, Task, Bash, Edit, Grep, Glob, WebFetch, WebSearch, Search, AskUserQuestion, TodoWrite, TodoRead, Skill, BashOutput, KillShell, MultiEdit, LS
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md).
|
|
8
|
-
|
|
9
|
-
create and run a retrospect process:
|
|
10
|
-
|
|
11
|
-
### Run Selection
|
|
12
|
-
|
|
13
|
-
- `--all` or "all runs": list all completed/failed runs and analyze collectively
|
|
14
|
-
- Multiple run IDs: analyze each specified run
|
|
15
|
-
- Single run ID or no ID: existing behavior (latest run)
|
|
16
|
-
- In interactive mode with no run specified: ask user whether to analyze latest, select specific runs, or all runs
|
|
17
|
-
|
|
18
|
-
### Cross-Run Analysis (multi-run mode)
|
|
19
|
-
|
|
20
|
-
When analyzing multiple runs, the retrospect process should additionally cover:
|
|
21
|
-
- Common failure patterns across runs
|
|
22
|
-
- Velocity trends (tasks/time across runs)
|
|
23
|
-
- Process evolution (how processes changed)
|
|
24
|
-
- Repeated breakpoint patterns
|
|
25
|
-
- Aggregate quality metrics
|
|
26
|
-
|
|
27
|
-
implementations notes (for the process):
|
|
28
|
-
- The process should analyze the run, the process that was followed, and provide suggestions for improvements, optimizations, and fixes.
|
|
29
|
-
- The process should such have many breakpoints where the user can steer the process, provide feedback, and make decisions about how to proceed with the retrospect.
|
|
30
|
-
- The process should be designed to be flexible and adaptable to different types of runs, projects, and goals, and should be able to provide insights and suggestions that are relevant and actionable for the user. (modification to the process, skills, etc.)
|
|
31
|
-
- The process should be designed to be iterative, allowing the user to go through multiple rounds of analysis and improvement, and should be able to track the changes and improvements made over time.
|
|
32
|
-
- The process should cover:
|
|
33
|
-
- Analysis of the run and its results, including what went well, what didn't go well, and what could be improved.
|
|
34
|
-
- Analysis of the process that was followed, including what steps were taken, what tools were used, and how effective they were.
|
|
35
|
-
- Suggestions for improvements, optimizations, and fixes for both the run and the process.
|
|
36
|
-
- Implementing the improvements, optimizations, and fixes, and tracking the changes made over time.
|
|
37
|
-
### Cleanup Suggestion
|
|
38
|
-
|
|
39
|
-
After retrospect analysis, suggest running `/babysitter:cleanup` to clean up old run data and reclaim disk space.
|
|
40
|
-
|
|
41
|
-
- Ending by explicitly prompting the user to contribute back -- even just reporting an issue is valuable, they don't need to implement the fix themselves. After analysis, display a clear call-to-action:
|
|
42
|
-
|
|
43
|
-
"You've identified [specific insight/improvement]. This could help other babysitter users too. Run `/babysitter:contrib` to share it upstream -- you can either report it as an issue or submit a PR with the fix."
|
|
44
|
-
|
|
45
|
-
Route to the specific contrib workflow based on what the user wants to do:
|
|
46
|
-
|
|
47
|
-
**Just reporting (no code changes needed):**
|
|
48
|
-
- Found a bug or weakness in a process -> `/babysitter:contrib bug report: [description of what went wrong]`
|
|
49
|
-
- Found missing or confusing documentation -> `/babysitter:contrib documentation question: [what was unclear]`
|
|
50
|
-
- Have an idea for improvement but don't want to implement it -> `/babysitter:contrib feature request: [description]`
|
|
51
|
-
|
|
52
|
-
**Contributing code changes:**
|
|
53
|
-
- Process/skill/agent improvements -> `/babysitter:contrib library contribution: [description]`
|
|
54
|
-
- Bug fixes in SDK or CLI -> `/babysitter:contrib bugfix: [description]`
|
|
55
|
-
- Plugin instruction improvements -> `/babysitter:contrib library contribution: improved [plugin-name] [install|configure|uninstall] instructions`
|
|
1
|
+
---
|
|
2
|
+
description: Analysis for a run and its results, process, suggestions for process improvements, process optimizations, fixes, etc. for the next runs.
|
|
3
|
+
argument-hint: "[run-id...] [--all] Specific run IDs, --all for all runs, or defaults to latest"
|
|
4
|
+
allowed-tools: Read, Grep, Write, Task, Bash, Edit, Grep, Glob, WebFetch, WebSearch, Search, AskUserQuestion, TodoWrite, TodoRead, Skill, BashOutput, KillShell, MultiEdit, LS
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md).
|
|
8
|
+
|
|
9
|
+
create and run a retrospect process:
|
|
10
|
+
|
|
11
|
+
### Run Selection
|
|
12
|
+
|
|
13
|
+
- `--all` or "all runs": list all completed/failed runs and analyze collectively
|
|
14
|
+
- Multiple run IDs: analyze each specified run
|
|
15
|
+
- Single run ID or no ID: existing behavior (latest run)
|
|
16
|
+
- In interactive mode with no run specified: ask user whether to analyze latest, select specific runs, or all runs
|
|
17
|
+
|
|
18
|
+
### Cross-Run Analysis (multi-run mode)
|
|
19
|
+
|
|
20
|
+
When analyzing multiple runs, the retrospect process should additionally cover:
|
|
21
|
+
- Common failure patterns across runs
|
|
22
|
+
- Velocity trends (tasks/time across runs)
|
|
23
|
+
- Process evolution (how processes changed)
|
|
24
|
+
- Repeated breakpoint patterns
|
|
25
|
+
- Aggregate quality metrics
|
|
26
|
+
|
|
27
|
+
implementations notes (for the process):
|
|
28
|
+
- The process should analyze the run, the process that was followed, and provide suggestions for improvements, optimizations, and fixes.
|
|
29
|
+
- The process should such have many breakpoints where the user can steer the process, provide feedback, and make decisions about how to proceed with the retrospect.
|
|
30
|
+
- The process should be designed to be flexible and adaptable to different types of runs, projects, and goals, and should be able to provide insights and suggestions that are relevant and actionable for the user. (modification to the process, skills, etc.)
|
|
31
|
+
- The process should be designed to be iterative, allowing the user to go through multiple rounds of analysis and improvement, and should be able to track the changes and improvements made over time.
|
|
32
|
+
- The process should cover:
|
|
33
|
+
- Analysis of the run and its results, including what went well, what didn't go well, and what could be improved.
|
|
34
|
+
- Analysis of the process that was followed, including what steps were taken, what tools were used, and how effective they were.
|
|
35
|
+
- Suggestions for improvements, optimizations, and fixes for both the run and the process.
|
|
36
|
+
- Implementing the improvements, optimizations, and fixes, and tracking the changes made over time.
|
|
37
|
+
### Cleanup Suggestion
|
|
38
|
+
|
|
39
|
+
After retrospect analysis, suggest running `/babysitter:cleanup` to clean up old run data and reclaim disk space.
|
|
40
|
+
|
|
41
|
+
- Ending by explicitly prompting the user to contribute back -- even just reporting an issue is valuable, they don't need to implement the fix themselves. After analysis, display a clear call-to-action:
|
|
42
|
+
|
|
43
|
+
"You've identified [specific insight/improvement]. This could help other babysitter users too. Run `/babysitter:contrib` to share it upstream -- you can either report it as an issue or submit a PR with the fix."
|
|
44
|
+
|
|
45
|
+
Route to the specific contrib workflow based on what the user wants to do:
|
|
46
|
+
|
|
47
|
+
**Just reporting (no code changes needed):**
|
|
48
|
+
- Found a bug or weakness in a process -> `/babysitter:contrib bug report: [description of what went wrong]`
|
|
49
|
+
- Found missing or confusing documentation -> `/babysitter:contrib documentation question: [what was unclear]`
|
|
50
|
+
- Have an idea for improvement but don't want to implement it -> `/babysitter:contrib feature request: [description]`
|
|
51
|
+
|
|
52
|
+
**Contributing code changes:**
|
|
53
|
+
- Process/skill/agent improvements -> `/babysitter:contrib library contribution: [description]`
|
|
54
|
+
- Bug fixes in SDK or CLI -> `/babysitter:contrib bugfix: [description]`
|
|
55
|
+
- Plugin instruction improvements -> `/babysitter:contrib library contribution: improved [plugin-name] [install|configure|uninstall] instructions`
|
package/commands/user-install.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Set up babysitter for yourself. Guides you through onboarding — installs dependencies, interviews you about your specialties and preferences, builds your user profile, and configures the best tools for your workflow.
|
|
3
|
-
argument-hint: Specific instructions for the run.
|
|
4
|
-
allowed-tools: Read, Grep, Write, Task, Bash, Edit, Grep, Glob, WebFetch, WebSearch, Search, AskUserQuestion, TodoWrite, TodoRead, Skill, BashOutput, KillShell, MultiEdit, LS
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md).
|
|
8
|
-
|
|
1
|
+
---
|
|
2
|
+
description: Set up babysitter for yourself. Guides you through onboarding — installs dependencies, interviews you about your specialties and preferences, builds your user profile, and configures the best tools for your workflow.
|
|
3
|
+
argument-hint: Specific instructions for the run.
|
|
4
|
+
allowed-tools: Read, Grep, Write, Task, Bash, Edit, Grep, Glob, WebFetch, WebSearch, Search, AskUserQuestion, TodoWrite, TodoRead, Skill, BashOutput, KillShell, MultiEdit, LS
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md).
|
|
8
|
+
|
|
9
9
|
Before using the process library, resolve the active library root through the SDK CLI. If no binding exists yet, initialize the shared global SDK binding with:
|
|
10
10
|
|
|
11
11
|
```bash
|
|
@@ -13,5 +13,5 @@ babysitter process-library:active --json
|
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
Then use the `cradle/user-install` process from the active process library.
|
|
16
|
-
|
|
17
|
-
When the run completes, end with a friendly message that includes a polite and humorous ask to star the repo on GitHub: https://github.com/a5c-ai/babysitter
|
|
16
|
+
|
|
17
|
+
When the run completes, end with a friendly message that includes a polite and humorous ask to star the repo on GitHub: https://github.com/a5c-ai/babysitter
|
package/commands/yolo.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Orchestrate a babysitter run. use this command to start babysitting a complex workflow in a non-interactive mode, without any user interaction or breakpoints in the run.
|
|
3
|
-
argument-hint: Specific instructions for the run.
|
|
4
|
-
allowed-tools: Read, Grep, Write, Task, Bash, Edit, Grep, Glob, WebFetch, WebSearch, Search, AskUserQuestion, TodoWrite, TodoRead, Skill, BashOutput, KillShell, MultiEdit, LS
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md). but without any user interaction or breakpoints in the run.
|
|
1
|
+
---
|
|
2
|
+
description: Orchestrate a babysitter run. use this command to start babysitting a complex workflow in a non-interactive mode, without any user interaction or breakpoints in the run.
|
|
3
|
+
argument-hint: Specific instructions for the run.
|
|
4
|
+
allowed-tools: Read, Grep, Write, Task, Bash, Edit, Grep, Glob, WebFetch, WebSearch, Search, AskUserQuestion, TodoWrite, TodoRead, Skill, BashOutput, KillShell, MultiEdit, LS
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md). but without any user interaction or breakpoints in the run.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# PowerShell hook wrapper — sets env vars and delegates to bash
|
|
2
|
+
$env:HOOK_TYPE = 'session-end'
|
|
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 = 'session-start'
|
|
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,11 @@
|
|
|
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
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# PowerShell hook wrapper — sets env vars and delegates to bash
|
|
2
|
+
$env:HOOK_TYPE = 'user-prompt-submit'
|
|
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
|
+
}
|
package/hooks.json
CHANGED
|
@@ -4,24 +4,24 @@
|
|
|
4
4
|
"sessionStart": [
|
|
5
5
|
{
|
|
6
6
|
"type": "command",
|
|
7
|
-
"bash": "./hooks/session-start.sh",
|
|
8
|
-
"powershell": "./hooks/session-start.ps1",
|
|
7
|
+
"bash": "./hooks/babysitter-proxied-session-start.sh",
|
|
8
|
+
"powershell": "./hooks/babysitter-proxied-session-start.ps1",
|
|
9
9
|
"timeoutSec": 30
|
|
10
10
|
}
|
|
11
11
|
],
|
|
12
|
-
"
|
|
12
|
+
"userPromptSubmitted": [
|
|
13
13
|
{
|
|
14
14
|
"type": "command",
|
|
15
|
-
"bash": "./hooks/
|
|
16
|
-
"powershell": "./hooks/
|
|
17
|
-
"timeoutSec":
|
|
15
|
+
"bash": "./hooks/babysitter-proxied-user-prompt-submitted.sh",
|
|
16
|
+
"powershell": "./hooks/babysitter-proxied-user-prompt-submitted.ps1",
|
|
17
|
+
"timeoutSec": 15
|
|
18
18
|
}
|
|
19
19
|
],
|
|
20
|
-
"
|
|
20
|
+
"sessionEnd": [
|
|
21
21
|
{
|
|
22
22
|
"type": "command",
|
|
23
|
-
"bash": "./hooks/
|
|
24
|
-
"powershell": "./hooks/
|
|
23
|
+
"bash": "./hooks/babysitter-proxied-session-end.sh",
|
|
24
|
+
"powershell": "./hooks/babysitter-proxied-session-end.ps1",
|
|
25
25
|
"timeoutSec": 30
|
|
26
26
|
}
|
|
27
27
|
]
|
package/package.json
CHANGED
|
@@ -1,50 +1,49 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@a5c-ai/babysitter-github",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "5.0.0",
|
|
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
|
-
"test": "node scripts/sync-command-surfaces.js --check && node test/cloud-agent-install.test.js",
|
|
7
|
-
"sync:commands": "node scripts/sync-command-surfaces.js",
|
|
8
|
-
"postinstall": "node bin/install.js",
|
|
9
|
-
"preuninstall": "node bin/uninstall.js",
|
|
10
|
-
"team:install": "node scripts/team-install.js",
|
|
11
6
|
"deploy": "npm publish --access public",
|
|
12
|
-
"deploy:staging": "npm publish --access public --tag staging"
|
|
7
|
+
"deploy:staging": "npm publish --access public --tag staging",
|
|
8
|
+
"plugin:install": "node bin/install.js --global",
|
|
9
|
+
"plugin:uninstall": "node bin/uninstall.js --global",
|
|
10
|
+
"team:install": "node scripts/team-install.js"
|
|
13
11
|
},
|
|
14
12
|
"bin": {
|
|
15
13
|
"babysitter-github": "bin/cli.js"
|
|
16
14
|
},
|
|
17
15
|
"files": [
|
|
18
|
-
"
|
|
16
|
+
"bin/",
|
|
19
17
|
"hooks.json",
|
|
18
|
+
"AGENTS.md",
|
|
20
19
|
"hooks/",
|
|
21
20
|
"skills/",
|
|
22
|
-
"
|
|
21
|
+
"commands/",
|
|
23
22
|
"scripts/",
|
|
23
|
+
"plugin.json",
|
|
24
|
+
"README.md",
|
|
24
25
|
"versions.json",
|
|
25
|
-
"
|
|
26
|
-
"commands/",
|
|
27
|
-
".github/",
|
|
28
|
-
"README.md"
|
|
26
|
+
"package.json"
|
|
29
27
|
],
|
|
30
28
|
"keywords": [
|
|
31
29
|
"babysitter",
|
|
32
30
|
"github-copilot",
|
|
33
|
-
"orchestration"
|
|
34
|
-
"ai-agent",
|
|
35
|
-
"sdk-integration"
|
|
31
|
+
"orchestration"
|
|
36
32
|
],
|
|
37
33
|
"author": "a5c.ai",
|
|
38
34
|
"license": "MIT",
|
|
39
35
|
"publishConfig": {
|
|
40
36
|
"access": "public"
|
|
41
37
|
},
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"@a5c-ai/babysitter-sdk": "5.0.0"
|
|
40
|
+
},
|
|
42
41
|
"repository": {
|
|
43
42
|
"type": "git",
|
|
44
|
-
"url": "https://github.com/a5c-ai/babysitter"
|
|
43
|
+
"url": "git+https://github.com/a5c-ai/babysitter-github-copilot.git"
|
|
45
44
|
},
|
|
46
|
-
"homepage": "https://github.com/a5c-ai/babysitter
|
|
47
|
-
"
|
|
48
|
-
"
|
|
45
|
+
"homepage": "https://github.com/a5c-ai/babysitter-github-copilot#readme",
|
|
46
|
+
"bugs": {
|
|
47
|
+
"url": "https://github.com/a5c-ai/babysitter-github-copilot/issues"
|
|
49
48
|
}
|
|
50
49
|
}
|
package/plugin.json
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babysitter",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Orchestrate complex, multi-step workflows with event-sourced state management, hook-based extensibility, and human-in-the-loop approval
|
|
5
|
-
"author": {
|
|
3
|
+
"version": "5.0.0",
|
|
4
|
+
"description": "Orchestrate complex, multi-step workflows with event-sourced state management, hook-based extensibility, and human-in-the-loop approval",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "a5c.ai"
|
|
7
|
+
},
|
|
6
8
|
"license": "MIT",
|
|
7
9
|
"skills": "skills/",
|
|
8
10
|
"hooks": "hooks.json",
|
|
@@ -18,8 +20,10 @@
|
|
|
18
20
|
"automation",
|
|
19
21
|
"event-sourced",
|
|
20
22
|
"hooks",
|
|
21
|
-
"
|
|
23
|
+
"TDD",
|
|
24
|
+
"quality-convergence",
|
|
22
25
|
"agent",
|
|
23
|
-
"LLM"
|
|
26
|
+
"LLM",
|
|
27
|
+
"github-copilot"
|
|
24
28
|
]
|
|
25
29
|
}
|
|
@@ -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,12 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { spawnSync } from 'node:child_process';
|
|
3
|
+
|
|
4
|
+
function run(command, args) {
|
|
5
|
+
const result = spawnSync(command, args, { stdio: 'inherit' });
|
|
6
|
+
if (result.status !== 0) process.exit(result.status || 1);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const ref = process.env.GITHUB_REF_NAME || '';
|
|
10
|
+
const branch = ref.split('/')[1] || 'develop';
|
|
11
|
+
const tag = branch === 'main' ? 'latest' : branch;
|
|
12
|
+
run('npm', ['publish', '--access', 'public', '--tag', tag]);
|
package/scripts/team-install.js
CHANGED
|
@@ -1,93 +1,23 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const {
|
|
7
|
-
copyPluginBundle,
|
|
8
|
-
ensureGlobalProcessLibrary,
|
|
9
|
-
ensureMarketplaceEntry,
|
|
10
|
-
installCopilotSurface,
|
|
11
|
-
registerCopilotPlugin,
|
|
12
|
-
warnWindowsHooks,
|
|
13
|
-
writeJson,
|
|
14
|
-
} = require('../bin/install-shared');
|
|
4
|
+
var path = require('path');
|
|
5
|
+
var shared = require('../bin/install-shared');
|
|
15
6
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
dryRun: false,
|
|
21
|
-
};
|
|
22
|
-
for (let i = 2; i < argv.length; i += 1) {
|
|
23
|
-
if (argv[i] === '--workspace' && argv[i + 1]) {
|
|
24
|
-
args.workspace = path.resolve(argv[++i]);
|
|
25
|
-
} else if (argv[i] === '--cloud-agent') {
|
|
26
|
-
args.cloudAgent = true;
|
|
27
|
-
} else if (argv[i] === '--dry-run') {
|
|
28
|
-
args.dryRun = true;
|
|
29
|
-
}
|
|
7
|
+
var workspace = process.cwd();
|
|
8
|
+
for (var i = 0; i < process.argv.length; i++) {
|
|
9
|
+
if (process.argv[i] === '--workspace' && process.argv[i + 1]) {
|
|
10
|
+
workspace = path.resolve(process.argv[i + 1]);
|
|
30
11
|
}
|
|
31
|
-
return args;
|
|
32
12
|
}
|
|
33
13
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
const workspaceRoot = args.workspace;
|
|
38
|
-
const workspacePluginRoot = path.join(workspaceRoot, 'plugins', 'babysitter');
|
|
39
|
-
const workspaceMarketplacePath = path.join(workspaceRoot, '.agents', 'plugins', 'marketplace.json');
|
|
40
|
-
const workspaceCopilotDir = path.join(workspaceRoot, '.copilot');
|
|
14
|
+
var src = process.env.PLUGIN_PACKAGE_ROOT || path.resolve(__dirname, '..');
|
|
15
|
+
var dest = shared.getHomePluginRoot('workspace');
|
|
16
|
+
console.log('[babysitter] Team install to ' + dest);
|
|
41
17
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
workspaceRoot,
|
|
46
|
-
pluginRoot: workspacePluginRoot,
|
|
47
|
-
marketplacePath: workspaceMarketplacePath,
|
|
48
|
-
copilotDir: workspaceCopilotDir,
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
if (args.dryRun) {
|
|
52
|
-
console.log(JSON.stringify({
|
|
53
|
-
ok: true,
|
|
54
|
-
dryRun: true,
|
|
55
|
-
installInfo,
|
|
56
|
-
}, null, 2));
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
copyPluginBundle(packageRoot, workspacePluginRoot);
|
|
61
|
-
ensureMarketplaceEntry(workspaceMarketplacePath, workspacePluginRoot);
|
|
62
|
-
registerCopilotPlugin(workspacePluginRoot);
|
|
63
|
-
installCopilotSurface(packageRoot, workspaceCopilotDir);
|
|
64
|
-
if (args.cloudAgent) {
|
|
65
|
-
const { installCloudAgentSurface } = require('../bin/install-shared');
|
|
66
|
-
installInfo.cloudAgent = installCloudAgentSurface(packageRoot, workspaceRoot);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
const active = ensureGlobalProcessLibrary(packageRoot);
|
|
70
|
-
installInfo.processLibraryStateFile = active.stateFile;
|
|
71
|
-
installInfo.processLibraryRoot = active.binding?.dir || '';
|
|
72
|
-
installInfo.processLibraryCloneDir = active.defaultSpec?.cloneDir || '';
|
|
73
|
-
|
|
74
|
-
const outDir = path.join(workspaceRoot, '.a5c', 'team');
|
|
75
|
-
fs.mkdirSync(outDir, { recursive: true });
|
|
76
|
-
writeJson(path.join(outDir, 'install.json'), installInfo);
|
|
77
|
-
|
|
78
|
-
const profilePath = path.join(outDir, 'profile.json');
|
|
79
|
-
if (!fs.existsSync(profilePath)) {
|
|
80
|
-
writeJson(profilePath, {
|
|
81
|
-
teamName: 'default',
|
|
82
|
-
pluginRoot: workspacePluginRoot,
|
|
83
|
-
marketplacePath: workspaceMarketplacePath,
|
|
84
|
-
copilotDir: workspaceCopilotDir,
|
|
85
|
-
processLibraryLookupCommand: 'babysitter process-library:active --json',
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
warnWindowsHooks();
|
|
90
|
-
console.log('[team-install] complete');
|
|
18
|
+
shared.copyPluginBundle(src, dest);
|
|
19
|
+
if (typeof shared.harnessTeamInstall === 'function') {
|
|
20
|
+
shared.harnessTeamInstall(src, dest, workspace);
|
|
91
21
|
}
|
|
92
|
-
|
|
93
|
-
|
|
22
|
+
shared.runPostInstall(dest);
|
|
23
|
+
console.log('[babysitter] Team install complete.');
|
package/skills/babysit/SKILL.md
CHANGED
|
@@ -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
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cleanup
|
|
3
|
+
description: Clean up .a5c/runs and .a5c/processes directories. Aggregates insights from completed/failed runs into docs/run-history-insights.md, then removes old run data and orphaned process files.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# cleanup
|
|
7
|
+
|
|
8
|
+
Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md).
|
|
9
|
+
|
|
10
|
+
Create and run a cleanup process using the process at `skills\babysit\process\cradle\cleanup-runs.js/processes/cleanup-runs.js`.
|
|
11
|
+
|
|
12
|
+
Implementation notes (for the process):
|
|
13
|
+
- Parse arguments for `--dry-run` flag (if present, set dryRun: true in inputs) and `--keep-days N` (default: 7)
|
|
14
|
+
- The process scans .a5c/runs/ for completed/failed runs, aggregates insights, writes summaries, then removes old data
|
|
15
|
+
- Always show the user what will be removed before removing (in interactive mode via breakpoints)
|
|
16
|
+
- In non-interactive mode (yolo), proceed with cleanup using defaults
|
|
17
|
+
- The insights file goes to docs/run-history-insights.md
|
|
18
|
+
- Only remove terminal runs (completed/failed) older than the keep-days threshold
|
|
19
|
+
- Never remove active/in-progress runs
|
|
20
|
+
- Remove orphaned process files not referenced by remaining runs
|
|
21
|
+
- After cleanup, show remaining run count and disk usage
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: contrib
|
|
3
|
+
description: Submit feedback or contribute to babysitter project
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# contrib
|
|
7
|
+
|
|
8
|
+
Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md).
|
|
9
|
+
|
|
10
|
+
## Process Routing
|
|
11
|
+
|
|
12
|
+
Contribution processes live under the active process library's `cradle/` directory. Resolve the active library root with `babysitter process-library:active --json` and route based on arguments:
|
|
13
|
+
|
|
14
|
+
### Issue-based (opens a GitHub issue in a5c-ai/babysitter)
|
|
15
|
+
* **Bug report** → `cradle/bug-report.js#process` — Report a bug in the SDK, CLI, process library, etc.
|
|
16
|
+
* **Feature request** → `cradle/feature-request.js#process` — Request a new feature or enhancement
|
|
17
|
+
* **Documentation question** → `cradle/documentation-question.js#process` — Ask about undocumented behavior or missing docs
|
|
18
|
+
|
|
19
|
+
### PR-based (forks repo, creates branch, submits PR to a5c-ai/babysitter)
|
|
20
|
+
* **Bugfix** → `cradle/bugfix.js#process` — User already has the fix for a bug
|
|
21
|
+
* **Feature implementation** → `cradle/feature-implementation-contribute.js#process` — User already has a feature implementation
|
|
22
|
+
* **Harness integration** → `cradle/feature-harness-integration-contribute.js#process` — User has a harness (CI/CD, IDE, editor) integration
|
|
23
|
+
* **Library contribution** → `cradle/library-contribution.js#process` — New or improved process/skill/subagent for the library
|
|
24
|
+
* **Documentation answer** → `cradle/documentation-contribute-answer.js#process` — User has an answer for an unanswered docs question
|
|
25
|
+
|
|
26
|
+
### Router (when arguments are empty or general)
|
|
27
|
+
* **Contribute** → `cradle/contribute.js#process` — Explains contribution types and routes to the specific process
|
|
28
|
+
|
|
29
|
+
## Contribution Rules
|
|
30
|
+
|
|
31
|
+
* PR-based contributions: fork the babysitter repo (a5c-ai/babysitter) for the user, ask to star if not already starred, perform changes, submit PR
|
|
32
|
+
* Issue-based contributions: gather details, search for duplicates, review, then open an issue in a5c-ai/babysitter
|
|
33
|
+
* Add breakpoints (permissions) before ALL gh actions (fork, star, submit PR/issue) to allow user review and cancellation
|
|
34
|
+
* If arguments are empty: use the `contribute.js` router process to show options and route accordingly
|
package/skills/doctor/SKILL.md
CHANGED
|
@@ -363,13 +363,13 @@ Mark as FAIL if:
|
|
|
363
363
|
- Parse the output and inspect the `resolvedFrom` field. Classify as follows:
|
|
364
364
|
- `resolvedFrom: "pid-marker"` → mark as PASS ("Session ID derives from the live Claude Code ancestor process -- authoritative").
|
|
365
365
|
- `resolvedFrom: "env-file"` → mark as PASS with a note ("CLAUDE_ENV_FILE was used; typically healthy").
|
|
366
|
-
- `resolvedFrom: "env-var"` → mark as WARN ("`
|
|
367
|
-
- Remediation: run `babysitter session:cleanup` and start a fresh Claude Code session, or `unset
|
|
366
|
+
- `resolvedFrom: "env-var"` → mark as WARN ("`AGENT_SESSION_ID` is set without a corroborating PID marker. Likely stale from a prior Claude Code session -- see GitHub issue #130").
|
|
367
|
+
- Remediation: run `babysitter session:cleanup` and start a fresh Claude Code session, or `unset AGENT_SESSION_ID` before invoking babysitter.
|
|
368
368
|
- `resolvedFrom: "none"` → mark as ERROR ("No session ID resolvable. Either no session-start hook fired, or the ancestor walk failed").
|
|
369
369
|
|
|
370
370
|
**Env-var shadow check:**
|
|
371
371
|
- Independently inspect `envVarPresent` and `envVarMatches` in the output.
|
|
372
|
-
- If `envVarPresent && !envVarMatches`, mark as WARN ("`
|
|
372
|
+
- If `envVarPresent && !envVarMatches`, mark as WARN ("`AGENT_SESSION_ID` in env does not match the resolved session ID; a stale value is shadowing the authoritative one. Unset the env var").
|
|
373
373
|
|
|
374
374
|
---
|
|
375
375
|
|
|
@@ -391,7 +391,7 @@ Mark as FAIL if:
|
|
|
391
391
|
|
|
392
392
|
- Enumerate files in `~/.a5c/` matching the pattern `current-session-*-pid-*`.
|
|
393
393
|
- Count markers per harness (derived from the filename).
|
|
394
|
-
- If more than one live marker exists for the same harness, mark as INFO ("Multiple live Claude Code / harness sessions detected; ensure each shell scopes `
|
|
394
|
+
- If more than one live marker exists for the same harness, mark as INFO ("Multiple live Claude Code / harness sessions detected; ensure each shell scopes `AGENT_SESSION_ID` appropriately -- the PID marker handles this automatically").
|
|
395
395
|
- Otherwise mark as PASS.
|
|
396
396
|
|
|
397
397
|
---
|
|
@@ -502,7 +502,7 @@ babysitter session:cleanup --dry-run # preview
|
|
|
502
502
|
babysitter session:cleanup # apply
|
|
503
503
|
|
|
504
504
|
# 2. Unset a stale env var
|
|
505
|
-
unset
|
|
505
|
+
unset AGENT_SESSION_ID
|
|
506
506
|
|
|
507
507
|
# 3. Re-bind a run explicitly if needed
|
|
508
508
|
babysitter session:resume --session-id <fresh-id> --state-dir ~/.a5c --run-id <runId> --runs-dir .a5c/runs
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: forever
|
|
3
|
+
description: Use this command to start babysitting a never-ending babysitter run.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# forever
|
|
7
|
+
|
|
8
|
+
Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md). but create a process that uses an infinte loop and a ctx.sleep to create a never-ending babysitter loop. an example of such process is a daily process that reads new support ticket every day and tries to resolve them, then sleeps for 4 hours and repeats the process.
|
package/skills/help/SKILL.md
CHANGED
|
@@ -231,9 +231,10 @@ SECONDARY COMMANDS
|
|
|
231
231
|
effect status in your browser. Useful when running /yolo or /forever to watch
|
|
232
232
|
progress without interrupting the run.
|
|
233
233
|
|
|
234
|
-
How it works: Runs npx @
|
|
234
|
+
How it works: Runs npx @a5c-ai/babysitter-observer-dashboard@latest which watches
|
|
235
235
|
the .a5c/runs/ directory (or a parent directory containing multiple projects) and
|
|
236
|
-
serves a live dashboard. The process is blocking -- it runs until you stop it
|
|
236
|
+
serves a live dashboard. The process is blocking -- it runs until you stop it, and
|
|
237
|
+
it prints the local URL to share with the user.
|
|
237
238
|
|
|
238
239
|
Example: /babysitter:observe
|
|
239
240
|
(opens browser showing all runs with live-updating task
|
package/skills/observe/SKILL.md
CHANGED
|
@@ -10,4 +10,4 @@ Run the babysitter observer dashboard:
|
|
|
10
10
|
1. Determine the watch directory — this is usually the project's container directory (the parent of the project dir), or the current working directory if not specified.
|
|
11
11
|
2. Launch the dashboard: `npx -y @a5c-ai/babysitter-observer-dashboard@latest --watch-dir <dir>`
|
|
12
12
|
3. This is a blocking process — it will keep running until stopped.
|
|
13
|
-
4.
|
|
13
|
+
4. Report the URL printed by the dashboard to the user, then open it in the browser.
|