@a5c-ai/babysitter-codex 0.1.11-staging.e805aaa5 → 0.1.11-staging.f3bdcf16
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/.codex-plugin/plugin.json +1 -1
- package/README.md +17 -18
- package/assets/logo.png +0 -0
- package/bin/install-shared.js +28 -17
- package/bin/install.js +1 -3
- package/hooks.json +3 -3
- package/package.json +5 -4
- package/plugin.lock.json +153 -0
- package/scripts/team-install.js +1 -1
- package/skills/babysit/SKILL.md +5 -8
- package/skills/doctor/SKILL.md +92 -6
- package/babysitter.lock.json +0 -18
package/README.md
CHANGED
|
@@ -10,9 +10,10 @@ This package ships a real Codex plugin bundle:
|
|
|
10
10
|
- `hooks/`
|
|
11
11
|
|
|
12
12
|
It still uses the Babysitter SDK CLI and the shared `~/.a5c` process-library
|
|
13
|
-
state.
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
state. Global install writes the plugin bundle to `~/.agents/plugins/babysitter`
|
|
14
|
+
and updates `~/.agents/plugins/marketplace.json` so Codex can load the plugin
|
|
15
|
+
through its marketplace surface. Workspace install continues to materialize a
|
|
16
|
+
workspace-local Codex surface for team setup.
|
|
16
17
|
|
|
17
18
|
## Installation
|
|
18
19
|
|
|
@@ -25,8 +26,8 @@ npm install -g @a5c-ai/babysitter-sdk
|
|
|
25
26
|
clone the repo and install the plugin globally:
|
|
26
27
|
|
|
27
28
|
```bash
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
npx -y @a5c-ai/babysitter-codex install --global
|
|
30
|
+
|
|
30
31
|
codex
|
|
31
32
|
|
|
32
33
|
> /plugins
|
|
@@ -50,9 +51,9 @@ The process library is fetched and bound through the SDK CLI in
|
|
|
50
51
|
|
|
51
52
|
After `install --workspace`, the important files are:
|
|
52
53
|
|
|
53
|
-
-
|
|
54
|
-
-
|
|
55
|
-
-
|
|
54
|
+
- `.agents/plugins/babysitter/.codex-plugin/plugin.json`
|
|
55
|
+
- `.agents/plugins/babysitter/skills/babysit/SKILL.md`
|
|
56
|
+
- `.agents/plugins/babysitter/hooks.json`
|
|
56
57
|
- `.codex/skills/`
|
|
57
58
|
- `.codex/hooks/`
|
|
58
59
|
- `.codex/hooks.json`
|
|
@@ -67,13 +68,10 @@ Verify the installed plugin bundle:
|
|
|
67
68
|
|
|
68
69
|
```bash
|
|
69
70
|
npm ls -g @a5c-ai/babysitter-codex --depth=0
|
|
70
|
-
test -f ~/.
|
|
71
|
-
test -f ~/.
|
|
72
|
-
test -f ~/.
|
|
73
|
-
test -f ~/.
|
|
74
|
-
test -f ~/.codex/hooks.json
|
|
75
|
-
test -f ~/.codex/hooks/babysitter-stop-hook.sh
|
|
76
|
-
test -f ~/.codex/skills/babysit/SKILL.md
|
|
71
|
+
test -f ~/.agents/plugins/babysitter/.codex-plugin/plugin.json
|
|
72
|
+
test -f ~/.agents/plugins/babysitter/hooks.json
|
|
73
|
+
test -f ~/.agents/plugins/babysitter/hooks/babysitter-stop-hook.sh
|
|
74
|
+
test -f ~/.agents/plugins/babysitter/skills/babysit/SKILL.md
|
|
77
75
|
test -f ~/.agents/plugins/marketplace.json
|
|
78
76
|
```
|
|
79
77
|
|
|
@@ -83,9 +81,10 @@ Verify the active shared process-library binding:
|
|
|
83
81
|
babysitter process-library:active --json
|
|
84
82
|
```
|
|
85
83
|
|
|
86
|
-
On native Windows, Codex
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
On native Windows, Codex hooks require **Codex CLI >= 0.119.0** (released
|
|
85
|
+
2026-04-10, [openai/codex#17268](https://github.com/openai/codex/pull/17268)).
|
|
86
|
+
Older Codex versions silently skipped hook execution on Windows. If hooks do
|
|
87
|
+
not fire after install, run `codex --version` and upgrade if needed.
|
|
89
88
|
|
|
90
89
|
## License
|
|
91
90
|
|
package/assets/logo.png
ADDED
|
Binary file
|
package/bin/install-shared.js
CHANGED
|
@@ -7,6 +7,7 @@ const { spawnSync } = require('child_process');
|
|
|
7
7
|
|
|
8
8
|
const PLUGIN_NAME = 'babysitter';
|
|
9
9
|
const PLUGIN_CATEGORY = 'Coding';
|
|
10
|
+
const LEGACY_MARKETPLACE_PLUGIN_NAMES = ['babysitter-codex'];
|
|
10
11
|
const LEGACY_SKILL_NAMES = [
|
|
11
12
|
'babysit',
|
|
12
13
|
'babysitter-codex',
|
|
@@ -58,12 +59,13 @@ const DEFAULT_MARKETPLACE = {
|
|
|
58
59
|
};
|
|
59
60
|
const PLUGIN_BUNDLE_ENTRIES = [
|
|
60
61
|
'.codex-plugin',
|
|
61
|
-
'.app.json',
|
|
62
62
|
'assets',
|
|
63
63
|
'hooks',
|
|
64
64
|
'hooks.json',
|
|
65
65
|
'skills',
|
|
66
|
-
'
|
|
66
|
+
'.app.json',
|
|
67
|
+
'plugin.lock.json',
|
|
68
|
+
'README.md',
|
|
67
69
|
];
|
|
68
70
|
|
|
69
71
|
function getCodexHome() {
|
|
@@ -88,7 +90,7 @@ function getHomePluginRoot() {
|
|
|
88
90
|
if (process.env.BABYSITTER_CODEX_PLUGIN_DIR) {
|
|
89
91
|
return path.resolve(process.env.BABYSITTER_CODEX_PLUGIN_DIR, PLUGIN_NAME);
|
|
90
92
|
}
|
|
91
|
-
return path.join(
|
|
93
|
+
return path.join(getUserHome(), '.agents', 'plugins', PLUGIN_NAME);
|
|
92
94
|
}
|
|
93
95
|
|
|
94
96
|
function getHomeMarketplacePath() {
|
|
@@ -316,12 +318,14 @@ function ensureExecutable(filePath) {
|
|
|
316
318
|
}
|
|
317
319
|
|
|
318
320
|
function normalizeMarketplaceSourcePath(marketplacePath, pluginSourcePath) {
|
|
319
|
-
let next = pluginSourcePath;
|
|
320
|
-
if (path.isAbsolute(next)) {
|
|
321
|
-
next = path.relative(path.dirname(marketplacePath), next);
|
|
322
|
-
}
|
|
321
|
+
let next = path.relative(path.dirname(marketplacePath), pluginSourcePath);
|
|
323
322
|
next = String(next || '').replace(/\\/g, '/');
|
|
324
|
-
if (!next.
|
|
323
|
+
if (!next || next === '.' || next.startsWith('../')) {
|
|
324
|
+
throw new Error(
|
|
325
|
+
`Plugin source path must live under ${path.dirname(marketplacePath)} so Codex can load it via a ./-prefixed marketplace entry.`,
|
|
326
|
+
);
|
|
327
|
+
}
|
|
328
|
+
if (!next.startsWith('./')) {
|
|
325
329
|
next = `./${next}`;
|
|
326
330
|
}
|
|
327
331
|
return next;
|
|
@@ -347,15 +351,15 @@ function ensureMarketplaceEntry(marketplacePath, pluginSourcePath) {
|
|
|
347
351
|
},
|
|
348
352
|
category: PLUGIN_CATEGORY,
|
|
349
353
|
};
|
|
350
|
-
const existingIndex = Array.isArray(marketplace.plugins)
|
|
351
|
-
? marketplace.plugins.findIndex((entry) => entry && entry.name === PLUGIN_NAME)
|
|
352
|
-
: -1;
|
|
353
354
|
if (!Array.isArray(marketplace.plugins)) {
|
|
354
355
|
marketplace.plugins = [nextEntry];
|
|
355
|
-
} else if (existingIndex >= 0) {
|
|
356
|
-
marketplace.plugins[existingIndex] = nextEntry;
|
|
357
356
|
} else {
|
|
358
|
-
marketplace.plugins.
|
|
357
|
+
const sanitized = marketplace.plugins.filter((entry) => (
|
|
358
|
+
entry &&
|
|
359
|
+
entry.name !== PLUGIN_NAME &&
|
|
360
|
+
!LEGACY_MARKETPLACE_PLUGIN_NAMES.includes(entry.name)
|
|
361
|
+
));
|
|
362
|
+
marketplace.plugins = [...sanitized, nextEntry];
|
|
359
363
|
}
|
|
360
364
|
writeJson(marketplacePath, marketplace);
|
|
361
365
|
return nextEntry;
|
|
@@ -369,7 +373,11 @@ function removeMarketplaceEntry(marketplacePath) {
|
|
|
369
373
|
if (!Array.isArray(marketplace.plugins)) {
|
|
370
374
|
return;
|
|
371
375
|
}
|
|
372
|
-
marketplace.plugins = marketplace.plugins.filter((entry) =>
|
|
376
|
+
marketplace.plugins = marketplace.plugins.filter((entry) => (
|
|
377
|
+
entry &&
|
|
378
|
+
entry.name !== PLUGIN_NAME &&
|
|
379
|
+
!LEGACY_MARKETPLACE_PLUGIN_NAMES.includes(entry.name)
|
|
380
|
+
));
|
|
373
381
|
writeJson(marketplacePath, marketplace);
|
|
374
382
|
}
|
|
375
383
|
|
|
@@ -489,8 +497,11 @@ function warnWindowsHooks() {
|
|
|
489
497
|
if (process.platform !== 'win32') {
|
|
490
498
|
return;
|
|
491
499
|
}
|
|
492
|
-
|
|
493
|
-
|
|
500
|
+
// Codex enabled Windows hooks in v0.119.0 (2026-04-10, openai/codex#17268).
|
|
501
|
+
// Older Codex CLIs still skip hook execution on Windows; warn so users on
|
|
502
|
+
// pinned/older versions know to upgrade.
|
|
503
|
+
console.warn('[babysitter] Note: Codex hooks on Windows require Codex CLI >= 0.119.0.');
|
|
504
|
+
console.warn('[babysitter] If hooks do not fire, run `codex --version` and upgrade if you are below 0.119.0.');
|
|
494
505
|
}
|
|
495
506
|
|
|
496
507
|
module.exports = {
|
package/bin/install.js
CHANGED
|
@@ -9,7 +9,6 @@ const {
|
|
|
9
9
|
getCodexHome,
|
|
10
10
|
getHomeMarketplacePath,
|
|
11
11
|
getHomePluginRoot,
|
|
12
|
-
installCodexSurface,
|
|
13
12
|
mergeCodexConfigFile,
|
|
14
13
|
warnWindowsHooks,
|
|
15
14
|
} = require('./install-shared');
|
|
@@ -27,7 +26,6 @@ function main() {
|
|
|
27
26
|
copyPluginBundle(PACKAGE_ROOT, pluginRoot);
|
|
28
27
|
ensureMarketplaceEntry(marketplacePath, pluginRoot);
|
|
29
28
|
mergeCodexConfigFile(path.join(codexHome, 'config.toml'));
|
|
30
|
-
installCodexSurface(PACKAGE_ROOT, codexHome);
|
|
31
29
|
|
|
32
30
|
const active = ensureGlobalProcessLibrary(PACKAGE_ROOT);
|
|
33
31
|
console.log(`[babysitter] marketplace: ${marketplacePath}`);
|
|
@@ -38,7 +36,7 @@ function main() {
|
|
|
38
36
|
console.log(`[babysitter] process library state: ${active.stateFile}`);
|
|
39
37
|
warnWindowsHooks();
|
|
40
38
|
console.log('[babysitter] Installation complete!');
|
|
41
|
-
console.log('[babysitter] Restart Codex to pick up the installed plugin and config changes
|
|
39
|
+
console.log('[babysitter] Restart Codex to pick up the installed plugin and config changes, then run Codex and install Babysitter from `/plugins`.');
|
|
42
40
|
} catch (err) {
|
|
43
41
|
console.error(`[babysitter] Failed to install plugin: ${err.message}`);
|
|
44
42
|
process.exitCode = 1;
|
package/hooks.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"hooks": {
|
|
3
3
|
"SessionStart": [
|
|
4
4
|
{
|
|
5
|
-
"matcher": "
|
|
5
|
+
"matcher": ".*",
|
|
6
6
|
"hooks": [
|
|
7
7
|
{
|
|
8
8
|
"type": "command",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
],
|
|
14
14
|
"UserPromptSubmit": [
|
|
15
15
|
{
|
|
16
|
-
"matcher": "
|
|
16
|
+
"matcher": ".*",
|
|
17
17
|
"hooks": [
|
|
18
18
|
{
|
|
19
19
|
"type": "command",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
],
|
|
25
25
|
"Stop": [
|
|
26
26
|
{
|
|
27
|
-
"matcher": "
|
|
27
|
+
"matcher": ".*",
|
|
28
28
|
"hooks": [
|
|
29
29
|
{
|
|
30
30
|
"type": "command",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@a5c-ai/babysitter-codex",
|
|
3
|
-
"version": "0.1.11-staging.
|
|
3
|
+
"version": "0.1.11-staging.f3bdcf16",
|
|
4
4
|
"description": "Babysitter Codex skill bundle and integration package for OpenAI Codex CLI with SDK-managed process-library bootstrapping, 15 orchestration modes, and BOM-safe SKILL installation",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "node test/integration.test.js && node test/packaged-install.test.js",
|
|
@@ -17,14 +17,15 @@
|
|
|
17
17
|
},
|
|
18
18
|
"files": [
|
|
19
19
|
".codex-plugin/",
|
|
20
|
-
".app.json",
|
|
21
20
|
"assets/",
|
|
22
21
|
"hooks/",
|
|
23
22
|
"hooks.json",
|
|
24
23
|
"skills/",
|
|
24
|
+
".app.json",
|
|
25
25
|
"bin/",
|
|
26
26
|
"scripts/",
|
|
27
|
-
"
|
|
27
|
+
"plugin.lock.json",
|
|
28
|
+
"README.md"
|
|
28
29
|
],
|
|
29
30
|
"keywords": [
|
|
30
31
|
"babysitter",
|
|
@@ -45,6 +46,6 @@
|
|
|
45
46
|
},
|
|
46
47
|
"homepage": "https://github.com/a5c-ai/babysitter/tree/main/plugins/babysitter-codex#readme",
|
|
47
48
|
"dependencies": {
|
|
48
|
-
"@a5c-ai/babysitter-sdk": "0.0.188-staging.
|
|
49
|
+
"@a5c-ai/babysitter-sdk": "0.0.188-staging.f3bdcf16"
|
|
49
50
|
}
|
|
50
51
|
}
|
package/plugin.lock.json
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
{
|
|
2
|
+
"lockVersion": 1,
|
|
3
|
+
"pluginId": "ai.a5c.babysitter",
|
|
4
|
+
"pluginVersion": "0.1.5",
|
|
5
|
+
"generatedBy": "@a5c-ai/babysitter-codex",
|
|
6
|
+
"generatedAt": "2026-03-11T00:00:00.000Z",
|
|
7
|
+
"skills": [
|
|
8
|
+
{
|
|
9
|
+
"id": "assimilate",
|
|
10
|
+
"vendoredPath": "skills/assimilate",
|
|
11
|
+
"source": {
|
|
12
|
+
"type": "local",
|
|
13
|
+
"path": "skills/assimilate"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"id": "babysit",
|
|
18
|
+
"vendoredPath": "skills/babysit",
|
|
19
|
+
"source": {
|
|
20
|
+
"type": "local",
|
|
21
|
+
"path": "skills/babysit"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"id": "call",
|
|
26
|
+
"vendoredPath": "skills/call",
|
|
27
|
+
"source": {
|
|
28
|
+
"type": "local",
|
|
29
|
+
"path": "skills/call"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": "doctor",
|
|
34
|
+
"vendoredPath": "skills/doctor",
|
|
35
|
+
"source": {
|
|
36
|
+
"type": "local",
|
|
37
|
+
"path": "skills/doctor"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"id": "forever",
|
|
42
|
+
"vendoredPath": "skills/forever",
|
|
43
|
+
"source": {
|
|
44
|
+
"type": "local",
|
|
45
|
+
"path": "skills/forever"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"id": "help",
|
|
50
|
+
"vendoredPath": "skills/help",
|
|
51
|
+
"source": {
|
|
52
|
+
"type": "local",
|
|
53
|
+
"path": "skills/help"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"id": "issue",
|
|
58
|
+
"vendoredPath": "skills/issue",
|
|
59
|
+
"source": {
|
|
60
|
+
"type": "local",
|
|
61
|
+
"path": "skills/issue"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"id": "model",
|
|
66
|
+
"vendoredPath": "skills/model",
|
|
67
|
+
"source": {
|
|
68
|
+
"type": "local",
|
|
69
|
+
"path": "skills/model"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"id": "observe",
|
|
74
|
+
"vendoredPath": "skills/observe",
|
|
75
|
+
"source": {
|
|
76
|
+
"type": "local",
|
|
77
|
+
"path": "skills/observe"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"id": "plan",
|
|
82
|
+
"vendoredPath": "skills/plan",
|
|
83
|
+
"source": {
|
|
84
|
+
"type": "local",
|
|
85
|
+
"path": "skills/plan"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"id": "project-install",
|
|
90
|
+
"vendoredPath": "skills/project-install",
|
|
91
|
+
"source": {
|
|
92
|
+
"type": "local",
|
|
93
|
+
"path": "skills/project-install"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"id": "resume",
|
|
98
|
+
"vendoredPath": "skills/resume",
|
|
99
|
+
"source": {
|
|
100
|
+
"type": "local",
|
|
101
|
+
"path": "skills/resume"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"id": "retrospect",
|
|
106
|
+
"vendoredPath": "skills/retrospect",
|
|
107
|
+
"source": {
|
|
108
|
+
"type": "local",
|
|
109
|
+
"path": "skills/retrospect"
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"id": "team-install",
|
|
114
|
+
"vendoredPath": "skills/team-install",
|
|
115
|
+
"source": {
|
|
116
|
+
"type": "local",
|
|
117
|
+
"path": "skills/team-install"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"id": "user-install",
|
|
122
|
+
"vendoredPath": "skills/user-install",
|
|
123
|
+
"source": {
|
|
124
|
+
"type": "local",
|
|
125
|
+
"path": "skills/user-install"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"id": "yolo",
|
|
130
|
+
"vendoredPath": "skills/yolo",
|
|
131
|
+
"source": {
|
|
132
|
+
"type": "local",
|
|
133
|
+
"path": "skills/yolo"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
],
|
|
137
|
+
"metadata": {
|
|
138
|
+
"runtime": {
|
|
139
|
+
"name": "@a5c/babysitter-codex-runtime",
|
|
140
|
+
"version": "0.1.4"
|
|
141
|
+
},
|
|
142
|
+
"content": {
|
|
143
|
+
"name": "@a5c/babysitter-codex-content",
|
|
144
|
+
"version": "0.1.4",
|
|
145
|
+
"processLibrary": {
|
|
146
|
+
"repo": "https://github.com/a5c-ai/babysitter.git",
|
|
147
|
+
"processSubpath": "library",
|
|
148
|
+
"referenceSubpath": "library/reference",
|
|
149
|
+
"snapshotCommit": "unknown"
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
package/scripts/team-install.js
CHANGED
|
@@ -32,7 +32,7 @@ function main() {
|
|
|
32
32
|
const args = parseArgs(process.argv);
|
|
33
33
|
const packageRoot = path.resolve(process.env.BABYSITTER_PACKAGE_ROOT || path.join(__dirname, '..'));
|
|
34
34
|
const workspaceRoot = args.workspace;
|
|
35
|
-
const workspacePluginRoot = path.join(workspaceRoot, 'plugins', 'babysitter');
|
|
35
|
+
const workspacePluginRoot = path.join(workspaceRoot, '.agents', 'plugins', 'babysitter');
|
|
36
36
|
const workspaceMarketplacePath = path.join(workspaceRoot, '.agents', 'plugins', 'marketplace.json');
|
|
37
37
|
const workspaceConfigPath = path.join(workspaceRoot, '.codex', 'config.toml');
|
|
38
38
|
|
package/skills/babysit/SKILL.md
CHANGED
|
@@ -18,30 +18,27 @@ 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('${CODEX_PLUGIN_ROOT}/versions.json','utf8')).sdkVersion||'latest')}catch{console.log('latest')}")
|
|
21
|
-
|
|
22
|
-
# sudo is depending on the env and system
|
|
21
|
+
CLI="npx -y @a5c-ai/babysitter-sdk@$SDK_VERSION"
|
|
23
22
|
```
|
|
24
23
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
**Alternatively, use the CLI alias:** `CLI="npx -y @a5c-ai/babysitter-sdk@$SDK_VERSION"`
|
|
24
|
+
If `babysitter` is already installed globally at the correct version, you may use `CLI="babysitter"` instead.
|
|
28
25
|
|
|
29
26
|
### jq
|
|
30
27
|
|
|
31
|
-
|
|
28
|
+
Make sure `jq` is installed and available in the path. If not, install it.
|
|
32
29
|
|
|
33
30
|
## Instructions
|
|
34
31
|
|
|
35
32
|
Run the following command to get full orchestration instructions:
|
|
36
33
|
|
|
37
34
|
```bash
|
|
38
|
-
|
|
35
|
+
$CLI instructions:babysit-skill --harness codex --interactive
|
|
39
36
|
```
|
|
40
37
|
|
|
41
38
|
For non-interactive runs (e.g., with `-p` flag or no question tool):
|
|
42
39
|
|
|
43
40
|
```bash
|
|
44
|
-
|
|
41
|
+
$CLI instructions:babysit-skill --harness codex --no-interactive
|
|
45
42
|
```
|
|
46
43
|
|
|
47
44
|
Follow the instructions returned by the command above to orchestrate the run.
|
package/skills/doctor/SKILL.md
CHANGED
|
@@ -5,9 +5,9 @@ description: Diagnose babysitter run health - journal integrity, state cache, ef
|
|
|
5
5
|
|
|
6
6
|
# doctor
|
|
7
7
|
|
|
8
|
-
You are a diagnostic agent for the babysitter runtime. Your job is to perform a comprehensive health check across
|
|
8
|
+
You are a diagnostic agent for the babysitter runtime. Your job is to perform a comprehensive health check across 14 areas and produce a structured diagnostic report. Follow each section methodically. Track results as you go and produce the final summary at the end.
|
|
9
9
|
|
|
10
|
-
Initialize a results tracker with these
|
|
10
|
+
Initialize a results tracker with these 14 checks, all starting as PENDING:
|
|
11
11
|
1. Run Discovery
|
|
12
12
|
2. Journal Integrity
|
|
13
13
|
3. State Cache Consistency
|
|
@@ -18,6 +18,10 @@ Initialize a results tracker with these 10 checks, all starting as PENDING:
|
|
|
18
18
|
8. Disk Usage
|
|
19
19
|
9. Process Validation
|
|
20
20
|
10. Hook Execution Health
|
|
21
|
+
11. Session-ID Provenance
|
|
22
|
+
12. Ancestor Liveness
|
|
23
|
+
13. Concurrent Session Detection
|
|
24
|
+
14. Windows Ancestor-Walk Strategy
|
|
21
25
|
|
|
22
26
|
---
|
|
23
27
|
|
|
@@ -351,9 +355,65 @@ Mark as FAIL if:
|
|
|
351
355
|
|
|
352
356
|
---
|
|
353
357
|
|
|
358
|
+
## 11. Session-ID Provenance
|
|
359
|
+
|
|
360
|
+
**Goal:** Verify how the current babysitter session ID was resolved and flag stale or shadowed values.
|
|
361
|
+
|
|
362
|
+
- Invoke: `npx babysitter session:whoami --json`
|
|
363
|
+
- Parse the output and inspect the `resolvedFrom` field. Classify as follows:
|
|
364
|
+
- `resolvedFrom: "pid-marker"` → mark as PASS ("Session ID derives from the live Claude Code ancestor process -- authoritative").
|
|
365
|
+
- `resolvedFrom: "env-file"` → mark as PASS with a note ("CLAUDE_ENV_FILE was used; typically healthy").
|
|
366
|
+
- `resolvedFrom: "env-var"` → mark as WARN ("`BABYSITTER_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 BABYSITTER_SESSION_ID` before invoking babysitter.
|
|
368
|
+
- `resolvedFrom: "none"` → mark as ERROR ("No session ID resolvable. Either no session-start hook fired, or the ancestor walk failed").
|
|
369
|
+
|
|
370
|
+
**Env-var shadow check:**
|
|
371
|
+
- Independently inspect `envVarPresent` and `envVarMatches` in the output.
|
|
372
|
+
- If `envVarPresent && !envVarMatches`, mark as WARN ("`BABYSITTER_SESSION_ID` in env does not match the resolved session ID; a stale value is shadowing the authoritative one. Unset the env var").
|
|
373
|
+
|
|
374
|
+
---
|
|
375
|
+
|
|
376
|
+
## 12. Ancestor Liveness
|
|
377
|
+
|
|
378
|
+
**Goal:** Confirm the PID marker references a live Claude Code process.
|
|
379
|
+
|
|
380
|
+
- Reuse the `session:whoami --json` output from check 11.
|
|
381
|
+
- Inspect the `ancestorAlive` field.
|
|
382
|
+
- If `ancestorAlive === false`, mark as ERROR ("The PID marker references a dead Claude Code process").
|
|
383
|
+
- Remediation: `babysitter session:cleanup`.
|
|
384
|
+
- Otherwise mark as PASS.
|
|
385
|
+
|
|
386
|
+
---
|
|
387
|
+
|
|
388
|
+
## 13. Concurrent Session Detection
|
|
389
|
+
|
|
390
|
+
**Goal:** Surface multiple live harness sessions that may compete for the same session ID.
|
|
391
|
+
|
|
392
|
+
- Enumerate files in `~/.a5c/` matching the pattern `current-session-*-pid-*`.
|
|
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 `BABYSITTER_SESSION_ID` appropriately -- the PID marker handles this automatically").
|
|
395
|
+
- Otherwise mark as PASS.
|
|
396
|
+
|
|
397
|
+
---
|
|
398
|
+
|
|
399
|
+
## 14. Windows Ancestor-Walk Strategy
|
|
400
|
+
|
|
401
|
+
**Goal:** Verify the ancestor-walk strategy works on Windows, where `wmic` is no longer guaranteed to be present.
|
|
402
|
+
|
|
403
|
+
- Only run this check when `process.platform === 'win32'`. On other platforms, mark as PASS ("Not applicable -- non-Windows platform").
|
|
404
|
+
- Attempt the ancestor walk by invoking `npx babysitter session:whoami --json` (reuse output from check 11 if available).
|
|
405
|
+
- If resolution succeeded (any `resolvedFrom` other than `none`), mark as PASS.
|
|
406
|
+
- If `resolvedFrom: "none"` on Windows:
|
|
407
|
+
- Test `wmic` availability: `where wmic` via shell.
|
|
408
|
+
- If absent, document that Windows 11 24H2 removed `wmic`; the fallback PowerShell CIM path should handle this.
|
|
409
|
+
- If the PowerShell ancestor walk also failed, mark as ERROR with remediation: ensure PowerShell is available (`powershell -NoProfile -Command "Get-CimInstance Win32_Process -Filter ProcessId=$PID"` should work).
|
|
410
|
+
- If the cascade works but is slow (>5s on first probe), add an INFO note on first-probe latency.
|
|
411
|
+
|
|
412
|
+
---
|
|
413
|
+
|
|
354
414
|
## Final Report
|
|
355
415
|
|
|
356
|
-
After completing all
|
|
416
|
+
After completing all 14 checks, produce the diagnostic report in this format:
|
|
357
417
|
|
|
358
418
|
```
|
|
359
419
|
============================================
|
|
@@ -380,6 +440,10 @@ OVERALL HEALTH: <HEALTHY | WARNING | CRITICAL>
|
|
|
380
440
|
| 8 | Disk Usage | <status> |
|
|
381
441
|
| 9 | Process Validation | <status> |
|
|
382
442
|
| 10 | Hook Execution Health | <status> |
|
|
443
|
+
| 11 | Session-ID Provenance | <status> |
|
|
444
|
+
| 12 | Ancestor Liveness | <status> |
|
|
445
|
+
| 13 | Concurrent Session Detection | <status> |
|
|
446
|
+
| 14 | Windows Ancestor-Walk Strategy | <status> |
|
|
383
447
|
|
|
384
448
|
--------------------------------------------
|
|
385
449
|
ISSUES & RECOMMENDATIONS
|
|
@@ -393,9 +457,9 @@ OVERALL HEALTH: <HEALTHY | WARNING | CRITICAL>
|
|
|
393
457
|
```
|
|
394
458
|
|
|
395
459
|
**Overall health determination:**
|
|
396
|
-
- **HEALTHY**: All
|
|
397
|
-
- **WARNING**: At least one check is WARN but none are FAIL.
|
|
398
|
-
- **CRITICAL**: At least one check is FAIL.
|
|
460
|
+
- **HEALTHY**: All 14 checks are PASS (INFO notes are acceptable).
|
|
461
|
+
- **WARNING**: At least one check is WARN but none are FAIL or ERROR.
|
|
462
|
+
- **CRITICAL**: At least one check is FAIL or ERROR.
|
|
399
463
|
|
|
400
464
|
Present the full detailed findings for each check BEFORE the summary table, so the user can see the evidence. End with the summary table and recommendations. Also, create a single HTML report file with all the findings that uses the arwes UI framework and open it for the user in the browser.
|
|
401
465
|
|
|
@@ -425,3 +489,25 @@ After diagnosing issues, prompt the user to report or fix what was found -- they
|
|
|
425
489
|
Example prompt after diagnosis:
|
|
426
490
|
|
|
427
491
|
> "Diagnosis found a stale lock -- process 12847 crashed without cleanup. This is a known edge case in the orchestration loop. Even if you don't want to fix it yourself, reporting it helps: run `/babysitter:contrib bug report: orchestration loop doesn't release lock on unhandled rejection` to open an issue."
|
|
492
|
+
|
|
493
|
+
---
|
|
494
|
+
|
|
495
|
+
## Self-Heal Suggestions
|
|
496
|
+
|
|
497
|
+
If any of checks 11-14 surface issues (stale env vars, dead ancestor PIDs, shadowed session IDs, or Windows ancestor-walk failures), suggest the following remediation sequence, in order. Present it as an actionable block:
|
|
498
|
+
|
|
499
|
+
```bash
|
|
500
|
+
# 1. Cleanup dead markers and orphaned state files
|
|
501
|
+
babysitter session:cleanup --dry-run # preview
|
|
502
|
+
babysitter session:cleanup # apply
|
|
503
|
+
|
|
504
|
+
# 2. Unset a stale env var
|
|
505
|
+
unset BABYSITTER_SESSION_ID
|
|
506
|
+
|
|
507
|
+
# 3. Re-bind a run explicitly if needed
|
|
508
|
+
babysitter session:resume --session-id <fresh-id> --state-dir ~/.a5c --run-id <runId> --runs-dir .a5c/runs
|
|
509
|
+
|
|
510
|
+
# 4. Start a fresh Claude Code session (closes and reopens the session)
|
|
511
|
+
```
|
|
512
|
+
|
|
513
|
+
Run steps 1 and 2 first; re-run `/babysitter:doctor` after each step to confirm the session-provenance checks return to PASS. Step 3 is only needed when a specific run must be re-bound to the fresh session. If the issue persists after step 4, escalate via `/debug` or `/babysitter:contrib`.
|
package/babysitter.lock.json
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 1,
|
|
3
|
-
"generatedAt": "2026-03-11T00:00:00.000Z",
|
|
4
|
-
"runtime": {
|
|
5
|
-
"name": "@a5c/babysitter-codex-runtime",
|
|
6
|
-
"version": "0.1.4"
|
|
7
|
-
},
|
|
8
|
-
"content": {
|
|
9
|
-
"name": "@a5c/babysitter-codex-content",
|
|
10
|
-
"version": "0.1.4",
|
|
11
|
-
"processLibrary": {
|
|
12
|
-
"repo": "https://github.com/a5c-ai/babysitter.git",
|
|
13
|
-
"processSubpath": "library",
|
|
14
|
-
"referenceSubpath": "library/reference",
|
|
15
|
-
"snapshotCommit": "unknown"
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|