@a5c-ai/babysitter-github 5.0.1-staging.f6432257 → 5.0.1-staging.ff2c19f9
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 +382 -210
- package/bin/install.js +41 -90
- package/bin/uninstall.js +12 -63
- package/commands/doctor.md +5 -5
- package/commands/help.md +245 -244
- package/commands/observe.md +12 -12
- package/hooks/babysitter-proxied-session-end.ps1 +10 -114
- package/hooks/babysitter-proxied-session-end.sh +2 -111
- package/hooks/babysitter-proxied-session-start.ps1 +10 -187
- package/hooks/babysitter-proxied-session-start.sh +6 -168
- package/hooks/babysitter-proxied-user-prompt-submitted.ps1 +10 -90
- package/hooks/babysitter-proxied-user-prompt-submitted.sh +2 -86
- package/hooks.json +10 -10
- package/package.json +18 -20
- package/plugin.json +7 -6
- package/scripts/team-install.js +14 -84
- 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/resume/SKILL.md +1 -1
- package/skills/retrospect/SKILL.md +48 -48
- package/skills/user-install/SKILL.md +3 -3
- package/skills/yolo/SKILL.md +8 -0
- package/versions.json +1 -1
- package/.github/plugin.json +0 -25
- package/hooks/proxied-hooks.json +0 -29
- package/hooks/session-end.ps1 +0 -69
- package/hooks/session-end.sh +0 -54
- package/hooks/session-start.ps1 +0 -111
- package/hooks/session-start.sh +0 -101
- package/hooks/user-prompt-submitted.ps1 +0 -52
- package/hooks/user-prompt-submitted.sh +0 -31
|
@@ -1,87 +1,3 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
#
|
|
5
|
-
# Applies density-filter compression to long user prompts.
|
|
6
|
-
# Delegates to SDK CLI: babysitter hook:run --hook-type user-prompt-submitted
|
|
7
|
-
#
|
|
8
|
-
# NOTE: Output from this hook is IGNORED by Copilot CLI.
|
|
9
|
-
# This hook is for logging and side-effects only.
|
|
10
|
-
|
|
11
|
-
PLUGIN_ROOT="${COPILOT_PLUGIN_DIR:-$(cd "$(dirname "$0")/.." && pwd)}"
|
|
12
|
-
PROXY_MARKER_FILE="${PLUGIN_ROOT}/.hooks-proxy-install-attempted"
|
|
13
|
-
|
|
14
|
-
GLOBAL_ROOT="${BABYSITTER_GLOBAL_STATE_DIR:-$HOME/.a5c}"
|
|
15
|
-
LOG_DIR="${BABYSITTER_LOG_DIR:-${GLOBAL_ROOT}/logs}"
|
|
16
|
-
mkdir -p "$LOG_DIR" 2>/dev/null
|
|
17
|
-
|
|
18
|
-
# Get required version from versions.json (used for hooks-proxy)
|
|
19
|
-
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")
|
|
20
|
-
|
|
21
|
-
# ---------------------------------------------------------------------------
|
|
22
|
-
# Hooks-proxy install (same pattern as SDK install in session-start)
|
|
23
|
-
# ---------------------------------------------------------------------------
|
|
24
|
-
|
|
25
|
-
install_hooks_proxy() {
|
|
26
|
-
local target_version="$1"
|
|
27
|
-
if npm i -g "@a5c-ai/hooks-proxy-cli@${target_version}" --loglevel=error 2>/dev/null; then
|
|
28
|
-
return 0
|
|
29
|
-
else
|
|
30
|
-
if npm i -g "@a5c-ai/hooks-proxy-cli@${target_version}" --prefix "$HOME/.local" --loglevel=error 2>/dev/null; then
|
|
31
|
-
export PATH="$HOME/.local/bin:$PATH"
|
|
32
|
-
return 0
|
|
33
|
-
fi
|
|
34
|
-
fi
|
|
35
|
-
return 1
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
# Resolve hooks-proxy binary
|
|
39
|
-
PROXY=""
|
|
40
|
-
if command -v a5c-hooks-proxy &>/dev/null; then
|
|
41
|
-
PROXY="a5c-hooks-proxy"
|
|
42
|
-
elif [ -f "$HOME/.local/bin/a5c-hooks-proxy" ]; then
|
|
43
|
-
PROXY="$HOME/.local/bin/a5c-hooks-proxy"
|
|
44
|
-
fi
|
|
45
|
-
|
|
46
|
-
# Install if not found (only attempt once per plugin version)
|
|
47
|
-
if [ -z "$PROXY" ] && [ ! -f "$PROXY_MARKER_FILE" ]; then
|
|
48
|
-
install_hooks_proxy "$SDK_VERSION"
|
|
49
|
-
echo "$SDK_VERSION" > "$PROXY_MARKER_FILE" 2>/dev/null
|
|
50
|
-
if command -v a5c-hooks-proxy &>/dev/null; then
|
|
51
|
-
PROXY="a5c-hooks-proxy"
|
|
52
|
-
elif [ -f "$HOME/.local/bin/a5c-hooks-proxy" ]; then
|
|
53
|
-
PROXY="$HOME/.local/bin/a5c-hooks-proxy"
|
|
54
|
-
fi
|
|
55
|
-
fi
|
|
56
|
-
|
|
57
|
-
# npx fallback if still not found
|
|
58
|
-
if [ -z "$PROXY" ]; then
|
|
59
|
-
PROXY="npx -y @a5c-ai/hooks-proxy-cli@${SDK_VERSION} "
|
|
60
|
-
fi
|
|
61
|
-
|
|
62
|
-
# ---------------------------------------------------------------------------
|
|
63
|
-
# Capture stdin and delegate to hooks-proxy
|
|
64
|
-
# ---------------------------------------------------------------------------
|
|
65
|
-
|
|
66
|
-
INPUT_FILE=$(mktemp 2>/dev/null || echo "/tmp/hook-user-prompt-submitted-$$.json")
|
|
67
|
-
cat > "$INPUT_FILE"
|
|
68
|
-
|
|
69
|
-
if command -v babysitter &>/dev/null; then
|
|
70
|
-
babysitter log --type hook --label "hook:user-prompt-submitted" --message "Unified hook invoked" --source shell-hook 2>/dev/null || true
|
|
71
|
-
fi
|
|
72
|
-
|
|
73
|
-
STDERR_LOG="$LOG_DIR/babysitter-user-prompt-submitted-hook-stderr.log"
|
|
74
|
-
|
|
75
|
-
$PROXY invoke \
|
|
76
|
-
--adapter copilot \
|
|
77
|
-
--handler "babysitter hook:run --harness unified --hook-type user-prompt-submitted --json" \
|
|
78
|
-
--json \
|
|
79
|
-
< "$INPUT_FILE" 2>"$STDERR_LOG" || true
|
|
80
|
-
|
|
81
|
-
if command -v babysitter &>/dev/null; then
|
|
82
|
-
babysitter log --type hook --label "hook:user-prompt-submitted" --message "Hook complete" --source shell-hook 2>/dev/null || true
|
|
83
|
-
fi
|
|
84
|
-
|
|
85
|
-
rm -f "$INPUT_FILE" 2>/dev/null
|
|
86
|
-
|
|
87
|
-
exit 0
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
babysitter hook:run --harness unified --hook-type user-prompt-submit --json
|
package/hooks.json
CHANGED
|
@@ -4,25 +4,25 @@
|
|
|
4
4
|
"sessionStart": [
|
|
5
5
|
{
|
|
6
6
|
"type": "command",
|
|
7
|
-
"bash": "
|
|
8
|
-
"powershell": "
|
|
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": "
|
|
16
|
-
"powershell": "
|
|
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": "
|
|
24
|
-
"powershell": "
|
|
25
|
-
"timeoutSec":
|
|
23
|
+
"bash": "./hooks/babysitter-proxied-session-end.sh",
|
|
24
|
+
"powershell": "./hooks/babysitter-proxied-session-end.ps1",
|
|
25
|
+
"timeoutSec": 30
|
|
26
26
|
}
|
|
27
27
|
]
|
|
28
28
|
}
|
package/package.json
CHANGED
|
@@ -1,50 +1,48 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@a5c-ai/babysitter-github",
|
|
3
|
-
"version": "5.0.1-staging.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "5.0.1-staging.ff2c19f9",
|
|
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
|
-
"
|
|
7
|
-
"
|
|
6
|
+
"deploy": "npm publish --access public",
|
|
7
|
+
"deploy:staging": "npm publish --access public --tag staging",
|
|
8
8
|
"postinstall": "node bin/install.js",
|
|
9
9
|
"preuninstall": "node bin/uninstall.js",
|
|
10
10
|
"team:install": "node scripts/team-install.js",
|
|
11
|
-
"
|
|
12
|
-
"
|
|
11
|
+
"test": "node scripts/sync-command-surfaces.js --check",
|
|
12
|
+
"sync:commands": "node scripts/sync-command-surfaces.js"
|
|
13
13
|
},
|
|
14
14
|
"bin": {
|
|
15
|
-
"babysitter-github": "bin/cli.js"
|
|
15
|
+
"babysitter-github-copilot": "bin/cli.js"
|
|
16
16
|
},
|
|
17
17
|
"files": [
|
|
18
|
-
"
|
|
18
|
+
"bin/",
|
|
19
19
|
"hooks.json",
|
|
20
20
|
"hooks/",
|
|
21
21
|
"skills/",
|
|
22
|
-
"
|
|
22
|
+
"commands/",
|
|
23
23
|
"scripts/",
|
|
24
|
-
"
|
|
24
|
+
"plugin.json",
|
|
25
25
|
"AGENTS.md",
|
|
26
|
-
"
|
|
27
|
-
".
|
|
28
|
-
"
|
|
26
|
+
"README.md",
|
|
27
|
+
"versions.json",
|
|
28
|
+
"package.json"
|
|
29
29
|
],
|
|
30
30
|
"keywords": [
|
|
31
31
|
"babysitter",
|
|
32
32
|
"github-copilot",
|
|
33
|
-
"orchestration"
|
|
34
|
-
"ai-agent",
|
|
35
|
-
"sdk-integration"
|
|
33
|
+
"orchestration"
|
|
36
34
|
],
|
|
37
35
|
"author": "a5c.ai",
|
|
38
36
|
"license": "MIT",
|
|
39
37
|
"publishConfig": {
|
|
40
38
|
"access": "public"
|
|
41
39
|
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@a5c-ai/babysitter-sdk": "5.0.1-staging.ff2c19f9"
|
|
42
|
+
},
|
|
42
43
|
"repository": {
|
|
43
44
|
"type": "git",
|
|
44
45
|
"url": "https://github.com/a5c-ai/babysitter"
|
|
45
46
|
},
|
|
46
|
-
"homepage": "https://github.com/a5c-ai/babysitter/tree/main/plugins/babysitter-github#readme"
|
|
47
|
-
"dependencies": {
|
|
48
|
-
"@a5c-ai/babysitter-sdk": "5.0.1-staging.f6432257"
|
|
49
|
-
}
|
|
47
|
+
"homepage": "https://github.com/a5c-ai/babysitter/tree/main/plugins/babysitter-github#readme"
|
|
50
48
|
}
|
package/plugin.json
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babysitter",
|
|
3
|
-
"version": "5.0.1-staging.
|
|
4
|
-
"description": "Orchestrate complex, multi-step workflows with event-sourced state management, hook-based extensibility, and human-in-the-loop approval
|
|
3
|
+
"version": "5.0.1-staging.ff2c19f9",
|
|
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
|
-
"name": "a5c.ai"
|
|
7
|
-
"email": "support@a5c.ai"
|
|
6
|
+
"name": "a5c.ai"
|
|
8
7
|
},
|
|
9
8
|
"license": "MIT",
|
|
10
9
|
"skills": "skills/",
|
|
@@ -21,8 +20,10 @@
|
|
|
21
20
|
"automation",
|
|
22
21
|
"event-sourced",
|
|
23
22
|
"hooks",
|
|
24
|
-
"
|
|
23
|
+
"TDD",
|
|
24
|
+
"quality-convergence",
|
|
25
25
|
"agent",
|
|
26
|
-
"LLM"
|
|
26
|
+
"LLM",
|
|
27
|
+
"github-copilot"
|
|
27
28
|
]
|
|
28
29
|
}
|
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.');
|
|
@@ -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.
|