@a5c-ai/babysitter-codex 0.1.6-staging.a44bcf9e → 0.1.6-staging.bb95c1f6
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/.app.json +3 -0
- package/.codex-plugin/plugin.json +53 -0
- package/README.md +45 -109
- package/assets/icon.svg +7 -0
- package/assets/logo.svg +8 -0
- package/bin/cli.js +104 -0
- package/bin/install-shared.js +509 -0
- package/bin/install.js +48 -0
- package/bin/uninstall.js +19 -59
- package/hooks/babysitter-session-start.sh +44 -0
- package/hooks/babysitter-stop-hook.sh +44 -0
- package/hooks/user-prompt-submit.sh +33 -0
- package/{.codex/hooks.json → hooks.json} +3 -3
- package/package.json +13 -11
- package/scripts/team-install.js +32 -380
- package/skills/assimilate/SKILL.md +17 -0
- package/skills/babysit/SKILL.md +47 -0
- package/skills/call/SKILL.md +17 -0
- package/skills/doctor/SKILL.md +16 -0
- package/skills/forever/SKILL.md +15 -0
- package/skills/help/SKILL.md +15 -0
- package/skills/issue/SKILL.md +16 -0
- package/skills/model/SKILL.md +15 -0
- package/skills/observe/SKILL.md +15 -0
- package/skills/plan/SKILL.md +16 -0
- package/skills/project-install/SKILL.md +15 -0
- package/skills/resume/SKILL.md +15 -0
- package/skills/retrospect/SKILL.md +55 -0
- package/skills/team-install/SKILL.md +15 -0
- package/skills/user-install/SKILL.md +15 -0
- package/skills/yolo/SKILL.md +19 -0
- package/.codex/config.toml +0 -24
- package/.codex/hooks/babysitter-session-start.sh +0 -15
- package/.codex/hooks/babysitter-stop-hook.sh +0 -15
- package/.codex/hooks/user-prompt-submit.sh +0 -15
- package/.codex/skills/babysit/SKILL.md +0 -110
- package/SKILL.md +0 -125
- package/agents/openai.yaml +0 -4
- package/bin/postinstall.js +0 -373
- package/prompts/README.md +0 -28
- package/prompts/assimilate.md +0 -9
- package/prompts/call.md +0 -12
- package/prompts/doctor.md +0 -9
- package/prompts/forever.md +0 -8
- package/prompts/help.md +0 -8
- package/prompts/issue.md +0 -9
- package/prompts/model.md +0 -8
- package/prompts/observe.md +0 -8
- package/prompts/plan.md +0 -11
- package/prompts/project-install.md +0 -8
- package/prompts/resume.md +0 -8
- package/prompts/retrospect.md +0 -8
- package/prompts/team-install.md +0 -8
- package/prompts/user-install.md +0 -8
- package/prompts/yolo.md +0 -8
package/.app.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "babysitter-codex",
|
|
3
|
+
"version": "0.1.5",
|
|
4
|
+
"description": "Babysitter orchestration plugin for Codex with skill entrypoints and lifecycle hooks.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "a5c.ai",
|
|
7
|
+
"email": "support@a5c.ai",
|
|
8
|
+
"url": "https://github.com/a5c-ai/babysitter"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://github.com/a5c-ai/babysitter/tree/main/plugins/babysitter-codex#readme",
|
|
11
|
+
"repository": "https://github.com/a5c-ai/babysitter",
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"keywords": [
|
|
14
|
+
"babysitter",
|
|
15
|
+
"codex",
|
|
16
|
+
"orchestration",
|
|
17
|
+
"hooks",
|
|
18
|
+
"skills"
|
|
19
|
+
],
|
|
20
|
+
"skills": "./skills/",
|
|
21
|
+
"skillEntries": [
|
|
22
|
+
{
|
|
23
|
+
"name": "babysitter:retrospect",
|
|
24
|
+
"argumentHint": "[run-id...] [--all] Run IDs or --all for all runs"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"hooks": "./hooks.json",
|
|
28
|
+
"apps": "./.app.json",
|
|
29
|
+
"interface": {
|
|
30
|
+
"displayName": "Babysitter",
|
|
31
|
+
"shortDescription": "Run Babysitter orchestration flows from Codex",
|
|
32
|
+
"longDescription": "Babysitter adds orchestration entrypoints such as $call, $plan, and $resume, plus Codex lifecycle hooks that keep runs and workspace state in sync.",
|
|
33
|
+
"developerName": "a5c.ai",
|
|
34
|
+
"category": "Coding",
|
|
35
|
+
"capabilities": [
|
|
36
|
+
"Interactive",
|
|
37
|
+
"Read",
|
|
38
|
+
"Write"
|
|
39
|
+
],
|
|
40
|
+
"websiteURL": "https://github.com/a5c-ai/babysitter",
|
|
41
|
+
"privacyPolicyURL": "https://github.com/a5c-ai/babysitter",
|
|
42
|
+
"termsOfServiceURL": "https://github.com/a5c-ai/babysitter",
|
|
43
|
+
"defaultPrompt": [
|
|
44
|
+
"Use Babysitter to start a new orchestration run",
|
|
45
|
+
"Plan a Babysitter workflow before executing it",
|
|
46
|
+
"Resume the latest Babysitter run in this workspace"
|
|
47
|
+
],
|
|
48
|
+
"brandColor": "#0F766E",
|
|
49
|
+
"composerIcon": "./assets/icon.svg",
|
|
50
|
+
"logo": "./assets/logo.svg",
|
|
51
|
+
"screenshots": []
|
|
52
|
+
}
|
|
53
|
+
}
|
package/README.md
CHANGED
|
@@ -2,44 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
Babysitter integration package for OpenAI Codex CLI.
|
|
4
4
|
|
|
5
|
-
This package
|
|
6
|
-
Codex plugin manifest and it does not run an external orchestrator. The Codex
|
|
7
|
-
plugin path is:
|
|
8
|
-
|
|
9
|
-
- installed skill bundle under `~/.codex/skills/babysit`
|
|
10
|
-
- optional user-local prompt aliases under `~/.codex/prompts/call.md`,
|
|
11
|
-
`plan.md`, `resume.md`, `yolo.md`, and the rest of the Babysitter modes
|
|
12
|
-
- repo-local skill bundle under `.codex/skills/babysit`
|
|
13
|
-
- repo-local prompt aliases under `.codex/prompts/*.md`
|
|
14
|
-
- workspace `.codex/hooks.json`
|
|
15
|
-
- workspace `.codex/config.toml`
|
|
16
|
-
- workspace `.a5c/` state
|
|
17
|
-
- Babysitter SDK CLI for run creation, iteration, result posting, and
|
|
18
|
-
process-library binding
|
|
19
|
-
|
|
20
|
-
## What This Package Installs
|
|
21
|
-
|
|
22
|
-
Global install copies the Codex-facing bundle into `CODEX_HOME`:
|
|
23
|
-
|
|
24
|
-
- `SKILL.md`
|
|
25
|
-
- `.codex/`
|
|
26
|
-
- `agents/`
|
|
27
|
-
- `prompts/` as the source for user-local prompt aliases
|
|
28
|
-
- `scripts/`
|
|
29
|
-
- `babysitter.lock.json`
|
|
30
|
-
|
|
31
|
-
It does not bundle the process library.
|
|
5
|
+
This package ships a real Codex plugin bundle:
|
|
32
6
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
- `SessionStart` seeds Babysitter session state
|
|
38
|
-
- `UserPromptSubmit` handles prompt-time transformations
|
|
39
|
-
- `Stop` yields continuation back into the Babysitter orchestration loop
|
|
7
|
+
- `.codex-plugin/plugin.json`
|
|
8
|
+
- `skills/`
|
|
9
|
+
- `hooks.json`
|
|
10
|
+
- `hooks/`
|
|
40
11
|
|
|
41
|
-
|
|
42
|
-
|
|
12
|
+
It still uses the Babysitter SDK CLI and the shared `~/.a5c` process-library
|
|
13
|
+
state. The installer registers the plugin bundle and also materializes the
|
|
14
|
+
active Codex `skills/`, `hooks/`, and `hooks.json` surface at the selected
|
|
15
|
+
scope so Codex can execute the Babysitter commands and hook scripts directly.
|
|
43
16
|
|
|
44
17
|
## Installation
|
|
45
18
|
|
|
@@ -49,108 +22,71 @@ Install the SDK CLI first:
|
|
|
49
22
|
npm install -g @a5c-ai/babysitter-sdk
|
|
50
23
|
```
|
|
51
24
|
|
|
52
|
-
|
|
25
|
+
clone the repo and install the plugin globally:
|
|
53
26
|
|
|
54
27
|
```bash
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
This global install now also clones or updates the process library into
|
|
59
|
-
`~/.a5c/process-library/babysitter-repo` and binds it as the default active
|
|
60
|
-
process library in `~/.a5c/active/process-library.json` through the SDK CLI.
|
|
28
|
+
git clone https://github.com/a5c-ai/babysitter.git
|
|
29
|
+
cd babysitter
|
|
30
|
+
codex
|
|
61
31
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
```bash
|
|
65
|
-
babysitter harness:install-plugin codex --workspace /path/to/repo
|
|
32
|
+
> /plugins
|
|
66
33
|
```
|
|
67
34
|
|
|
68
|
-
|
|
69
|
-
workspace, `postinstall` will also auto-run the packaged `team-install.js`
|
|
70
|
-
against that workspace.
|
|
35
|
+
then navigate to the 'babysitter' entry and select 'Install'.
|
|
71
36
|
|
|
72
|
-
##
|
|
73
|
-
|
|
74
|
-
`scripts/team-install.js` is the workspace installer used by the package and by
|
|
75
|
-
`babysitter harness:install-plugin codex`.
|
|
37
|
+
## Integration Model
|
|
76
38
|
|
|
77
|
-
|
|
39
|
+
The plugin provides:
|
|
78
40
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
5. Copies hook scripts into `.codex/hooks`.
|
|
84
|
-
6. Clones or updates the upstream Babysitter repo into
|
|
85
|
-
`<workspace>/.a5c/process-library/babysitter-repo`.
|
|
86
|
-
7. Binds `<workspace>/.a5c/process-library/babysitter-repo/library` with
|
|
87
|
-
`babysitter process-library:use`.
|
|
88
|
-
8. Writes `<workspace>/.a5c/active/process-library.json`.
|
|
89
|
-
9. Writes or refreshes `<workspace>/.codex/hooks.json`.
|
|
90
|
-
10. Creates or merges `<workspace>/.codex/config.toml` so the workspace has the
|
|
91
|
-
required Codex settings.
|
|
92
|
-
11. Writes `<workspace>/.a5c/team/install.json`.
|
|
93
|
-
12. Creates `<workspace>/.a5c/team/profile.json` if it does not already exist.
|
|
41
|
+
- `skills/babysit/SKILL.md` as the core entrypoint
|
|
42
|
+
- mode wrapper skills such as `$call`, `$plan`, and `$resume`
|
|
43
|
+
- plugin-level lifecycle hooks for `SessionStart`, `UserPromptSubmit`, and
|
|
44
|
+
`Stop`
|
|
94
45
|
|
|
95
|
-
|
|
96
|
-
|
|
46
|
+
The process library is fetched and bound through the SDK CLI in
|
|
47
|
+
`~/.a5c/active/process-library.json`.
|
|
97
48
|
|
|
98
|
-
##
|
|
49
|
+
## Workspace Output
|
|
99
50
|
|
|
100
|
-
After
|
|
51
|
+
After `install --workspace`, the important files are:
|
|
101
52
|
|
|
102
|
-
-
|
|
103
|
-
-
|
|
104
|
-
-
|
|
105
|
-
- `.codex/
|
|
53
|
+
- `plugins/babysitter-codex/.codex-plugin/plugin.json`
|
|
54
|
+
- `plugins/babysitter-codex/skills/babysit/SKILL.md`
|
|
55
|
+
- `plugins/babysitter-codex/hooks.json`
|
|
56
|
+
- `.codex/skills/`
|
|
106
57
|
- `.codex/hooks/`
|
|
107
58
|
- `.codex/hooks.json`
|
|
59
|
+
- `.agents/plugins/marketplace.json`
|
|
108
60
|
- `.codex/config.toml`
|
|
109
61
|
- `.a5c/team/install.json`
|
|
110
62
|
- `.a5c/team/profile.json`
|
|
111
|
-
- `.a5c/active/process-library.json`
|
|
112
|
-
- `.a5c/process-library/babysitter-repo/library`
|
|
113
|
-
|
|
114
|
-
## Using It In Codex
|
|
115
|
-
|
|
116
|
-
Use the skill directly:
|
|
117
|
-
|
|
118
|
-
```text
|
|
119
|
-
$babysit implement authentication with tests
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
The optional prompt aliases are the mode shortcuts:
|
|
123
|
-
|
|
124
|
-
```text
|
|
125
|
-
/call implement authentication with tests
|
|
126
|
-
/plan migration from monolith to services
|
|
127
|
-
/resume latest
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
Each prompt alias should only forward into the `babysit` skill for the
|
|
131
|
-
matching mode. Low-level SDK commands remain runtime mechanics, not the
|
|
132
|
-
user-facing interface.
|
|
133
63
|
|
|
134
64
|
## Verification
|
|
135
65
|
|
|
136
|
-
Verify the installed
|
|
66
|
+
Verify the installed plugin bundle:
|
|
137
67
|
|
|
138
68
|
```bash
|
|
139
69
|
npm ls -g @a5c-ai/babysitter-codex --depth=0
|
|
140
|
-
|
|
141
|
-
test -f ~/.codex/
|
|
142
|
-
test -f ~/.codex/
|
|
143
|
-
test -f ~/.codex/
|
|
144
|
-
test -f ~/.codex/
|
|
145
|
-
test -f ~/.codex/
|
|
70
|
+
test -f ~/.codex/plugins/babysitter-codex/.codex-plugin/plugin.json
|
|
71
|
+
test -f ~/.codex/plugins/babysitter-codex/hooks.json
|
|
72
|
+
test -f ~/.codex/plugins/babysitter-codex/hooks/babysitter-stop-hook.sh
|
|
73
|
+
test -f ~/.codex/plugins/babysitter-codex/skills/babysit/SKILL.md
|
|
74
|
+
test -f ~/.codex/hooks.json
|
|
75
|
+
test -f ~/.codex/hooks/babysitter-stop-hook.sh
|
|
76
|
+
test -f ~/.codex/skills/babysit/SKILL.md
|
|
77
|
+
test -f ~/.agents/plugins/marketplace.json
|
|
146
78
|
```
|
|
147
79
|
|
|
148
|
-
Verify the active process-library binding
|
|
80
|
+
Verify the active shared process-library binding:
|
|
149
81
|
|
|
150
82
|
```bash
|
|
151
|
-
babysitter process-library:active --
|
|
83
|
+
babysitter process-library:active --json
|
|
152
84
|
```
|
|
153
85
|
|
|
86
|
+
On native Windows, Codex currently does not execute hooks. The plugin still
|
|
87
|
+
installs correctly, but the lifecycle hooks will not fire until Codex enables
|
|
88
|
+
Windows hook execution.
|
|
89
|
+
|
|
154
90
|
## License
|
|
155
91
|
|
|
156
92
|
MIT
|
package/assets/icon.svg
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" role="img" aria-label="Babysitter icon">
|
|
2
|
+
<rect width="64" height="64" rx="14" fill="#0F766E"/>
|
|
3
|
+
<path d="M16 22h32v20H16z" fill="#ECFEFF"/>
|
|
4
|
+
<circle cx="24" cy="32" r="3" fill="#0F766E"/>
|
|
5
|
+
<circle cx="32" cy="32" r="3" fill="#0F766E"/>
|
|
6
|
+
<circle cx="40" cy="32" r="3" fill="#0F766E"/>
|
|
7
|
+
</svg>
|
package/assets/logo.svg
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 80" role="img" aria-label="Babysitter logo">
|
|
2
|
+
<rect x="0" y="8" width="64" height="64" rx="14" fill="#0F766E"/>
|
|
3
|
+
<path d="M16 26h32v28H16z" fill="#ECFEFF"/>
|
|
4
|
+
<circle cx="24" cy="40" r="3" fill="#0F766E"/>
|
|
5
|
+
<circle cx="32" cy="40" r="3" fill="#0F766E"/>
|
|
6
|
+
<circle cx="40" cy="40" r="3" fill="#0F766E"/>
|
|
7
|
+
<text x="80" y="50" font-family="Arial, sans-serif" font-size="34" fill="#0F766E">Babysitter</text>
|
|
8
|
+
</svg>
|
package/bin/cli.js
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const { spawnSync } = require('child_process');
|
|
6
|
+
|
|
7
|
+
const PACKAGE_ROOT = path.resolve(__dirname, '..');
|
|
8
|
+
|
|
9
|
+
function printUsage() {
|
|
10
|
+
console.error([
|
|
11
|
+
'Usage:',
|
|
12
|
+
' babysitter-codex install [--global]',
|
|
13
|
+
' babysitter-codex install --workspace [path]',
|
|
14
|
+
' babysitter-codex uninstall',
|
|
15
|
+
].join('\n'));
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function parseInstallArgs(argv) {
|
|
19
|
+
let scope = 'global';
|
|
20
|
+
let workspace = null;
|
|
21
|
+
const passthrough = [];
|
|
22
|
+
|
|
23
|
+
for (let i = 0; i < argv.length; i += 1) {
|
|
24
|
+
const arg = argv[i];
|
|
25
|
+
if (arg === '--global') {
|
|
26
|
+
if (scope === 'workspace') {
|
|
27
|
+
throw new Error('install accepts either --global or --workspace, not both');
|
|
28
|
+
}
|
|
29
|
+
scope = 'global';
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
if (arg === '--workspace') {
|
|
33
|
+
if (scope === 'global' && workspace !== null) {
|
|
34
|
+
throw new Error('install accepts either --global or --workspace, not both');
|
|
35
|
+
}
|
|
36
|
+
scope = 'workspace';
|
|
37
|
+
const next = argv[i + 1];
|
|
38
|
+
if (next && !next.startsWith('-')) {
|
|
39
|
+
workspace = path.resolve(next);
|
|
40
|
+
i += 1;
|
|
41
|
+
} else {
|
|
42
|
+
workspace = process.cwd();
|
|
43
|
+
}
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
passthrough.push(arg);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return {
|
|
50
|
+
scope,
|
|
51
|
+
workspace,
|
|
52
|
+
passthrough,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function runNodeScript(scriptPath, args, extraEnv = {}) {
|
|
57
|
+
const result = spawnSync(process.execPath, [scriptPath, ...args], {
|
|
58
|
+
cwd: process.cwd(),
|
|
59
|
+
stdio: 'inherit',
|
|
60
|
+
env: {
|
|
61
|
+
...process.env,
|
|
62
|
+
...extraEnv,
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
process.exitCode = result.status ?? 1;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function main() {
|
|
69
|
+
const [command, ...rest] = process.argv.slice(2);
|
|
70
|
+
if (!command || command === '--help' || command === '-h' || command === 'help') {
|
|
71
|
+
printUsage();
|
|
72
|
+
process.exitCode = command ? 0 : 1;
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if (command === 'install') {
|
|
77
|
+
const parsed = parseInstallArgs(rest);
|
|
78
|
+
if (parsed.scope === 'workspace') {
|
|
79
|
+
const args = [];
|
|
80
|
+
if (parsed.workspace) {
|
|
81
|
+
args.push('--workspace', parsed.workspace);
|
|
82
|
+
}
|
|
83
|
+
args.push(...parsed.passthrough);
|
|
84
|
+
runNodeScript(
|
|
85
|
+
path.join(PACKAGE_ROOT, 'scripts', 'team-install.js'),
|
|
86
|
+
args,
|
|
87
|
+
{ BABYSITTER_PACKAGE_ROOT: PACKAGE_ROOT },
|
|
88
|
+
);
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
runNodeScript(path.join(PACKAGE_ROOT, 'bin', 'install.js'), parsed.passthrough);
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
if (command === 'uninstall') {
|
|
96
|
+
runNodeScript(path.join(PACKAGE_ROOT, 'bin', 'uninstall.js'), rest);
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
printUsage();
|
|
101
|
+
process.exitCode = 1;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
main();
|