@a5c-ai/babysitter-github 5.0.1-staging.542f8525 → 5.0.1-staging.55f6fe69
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/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 +20 -20
- package/plugin.json +7 -6
- package/scripts/sync-command-surfaces.js +12 -54
- package/scripts/team-install.js +14 -84
- package/skills/cleanup/SKILL.md +21 -0
- package/skills/contrib/SKILL.md +34 -0
- 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 +2 -1
- package/.github/plugin.json +0 -25
- package/hooks/proxied-hooks.json +0 -29
|
@@ -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,50 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@a5c-ai/babysitter-github",
|
|
3
|
-
"version": "5.0.1-staging.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "5.0.1-staging.55f6fe69",
|
|
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.1-staging.55f6fe69"
|
|
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.git",
|
|
44
|
+
"directory": "plugins/babysitter-github"
|
|
45
45
|
},
|
|
46
46
|
"homepage": "https://github.com/a5c-ai/babysitter/tree/main/plugins/babysitter-github#readme",
|
|
47
|
-
"
|
|
48
|
-
"
|
|
47
|
+
"bugs": {
|
|
48
|
+
"url": "https://github.com/a5c-ai/babysitter/issues"
|
|
49
49
|
}
|
|
50
50
|
}
|
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.55f6fe69",
|
|
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
|
}
|
|
@@ -1,62 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
1
2
|
'use strict';
|
|
2
3
|
|
|
3
4
|
const path = require('path');
|
|
4
|
-
const {
|
|
5
|
-
listDirectories,
|
|
6
|
-
listMarkdownBasenames,
|
|
7
|
-
reportCheckResult,
|
|
8
|
-
syncCommandMirrors,
|
|
9
|
-
syncSkillsFromCommands,
|
|
10
|
-
} = require('../../../scripts/plugin-command-sync-lib.cjs');
|
|
5
|
+
const { spawnSync } = require('child_process');
|
|
11
6
|
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const PLUGIN_COMMANDS = path.join(PACKAGE_ROOT, 'commands');
|
|
16
|
-
const PLUGIN_SKILLS = path.join(PACKAGE_ROOT, 'skills');
|
|
17
|
-
const LABEL = 'babysitter-github sync';
|
|
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'];
|
|
18
10
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
return listMarkdownBasenames(ROOT_COMMANDS).filter((name) => local.has(name));
|
|
11
|
+
if (process.argv.includes('--check')) {
|
|
12
|
+
args.push('--check');
|
|
22
13
|
}
|
|
23
14
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function main() {
|
|
30
|
-
const check = process.argv.includes('--check');
|
|
31
|
-
const mirrorResult = syncCommandMirrors({
|
|
32
|
-
label: LABEL,
|
|
33
|
-
sourceRoot: ROOT_COMMANDS,
|
|
34
|
-
targetRoot: PLUGIN_COMMANDS,
|
|
35
|
-
names: getMirroredCommandNames(),
|
|
36
|
-
check,
|
|
37
|
-
cwd: PACKAGE_ROOT,
|
|
38
|
-
});
|
|
39
|
-
const skillsResult = syncSkillsFromCommands({
|
|
40
|
-
label: LABEL,
|
|
41
|
-
sourceRoot: PLUGIN_COMMANDS,
|
|
42
|
-
skillsRoot: PLUGIN_SKILLS,
|
|
43
|
-
names: getDerivedSkillNames(),
|
|
44
|
-
check,
|
|
45
|
-
cwd: PACKAGE_ROOT,
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
if (check) {
|
|
49
|
-
reportCheckResult(LABEL, [...mirrorResult.stale, ...skillsResult.stale]);
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
const updated = mirrorResult.updated + skillsResult.updated;
|
|
54
|
-
if (updated === 0) {
|
|
55
|
-
console.log(`[${LABEL}] no GitHub plugin command changes were needed.`);
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
console.log(`[${LABEL}] updated ${updated} GitHub plugin file(s).`);
|
|
60
|
-
}
|
|
15
|
+
const result = spawnSync(process.execPath, args, {
|
|
16
|
+
cwd: REPO_ROOT,
|
|
17
|
+
stdio: 'inherit',
|
|
18
|
+
});
|
|
61
19
|
|
|
62
|
-
|
|
20
|
+
process.exit(result.status ?? 1);
|
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
|
|
@@ -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.
|