@a5c-ai/babysitter-codex 0.1.6-staging.060a3463 → 0.1.6-staging.2df34517
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 +44 -0
- package/README.md +50 -111
- package/bin/cli.js +104 -0
- package/bin/install-shared.js +424 -0
- package/bin/install.js +48 -0
- package/bin/uninstall.js +19 -59
- package/hooks/babysitter-session-start.sh +37 -0
- package/hooks/babysitter-stop-hook.sh +37 -0
- package/hooks/user-prompt-submit.sh +39 -0
- package/{.codex/hooks.json → hooks.json} +3 -3
- package/package.json +11 -11
- package/scripts/team-install.js +31 -386
- package/skills/assimilate/SKILL.md +17 -0
- package/skills/babysit/SKILL.md +414 -0
- package/skills/call/SKILL.md +16 -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 +15 -0
- package/skills/team-install/SKILL.md +15 -0
- package/skills/user-install/SKILL.md +15 -0
- package/skills/yolo/SKILL.md +16 -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 -111
- package/agents/openai.yaml +0 -4
- package/bin/postinstall.js +0 -415
- 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
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
"hooks": "./hooks.json",
|
|
22
|
+
"interface": {
|
|
23
|
+
"displayName": "Babysitter",
|
|
24
|
+
"shortDescription": "Run Babysitter orchestration flows from Codex",
|
|
25
|
+
"longDescription": "Babysitter adds orchestration entrypoints such as $call, $plan, and $resume, plus Codex lifecycle hooks that keep runs and workspace state in sync.",
|
|
26
|
+
"developerName": "a5c.ai",
|
|
27
|
+
"category": "Coding",
|
|
28
|
+
"capabilities": [
|
|
29
|
+
"Interactive",
|
|
30
|
+
"Read",
|
|
31
|
+
"Write"
|
|
32
|
+
],
|
|
33
|
+
"websiteURL": "https://github.com/a5c-ai/babysitter",
|
|
34
|
+
"privacyPolicyURL": "https://github.com/a5c-ai/babysitter",
|
|
35
|
+
"termsOfServiceURL": "https://github.com/a5c-ai/babysitter",
|
|
36
|
+
"defaultPrompt": [
|
|
37
|
+
"Use Babysitter to start a new orchestration run",
|
|
38
|
+
"Plan a Babysitter workflow before executing it",
|
|
39
|
+
"Resume the latest Babysitter run in this workspace"
|
|
40
|
+
],
|
|
41
|
+
"brandColor": "#0F766E",
|
|
42
|
+
"screenshots": []
|
|
43
|
+
}
|
|
44
|
+
}
|
package/README.md
CHANGED
|
@@ -2,44 +2,16 @@
|
|
|
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 now ships as a real Codex plugin bundle:
|
|
32
6
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
7
|
+
- `.codex-plugin/plugin.json`
|
|
8
|
+
- `skills/`
|
|
9
|
+
- `hooks.json`
|
|
10
|
+
- `hooks/`
|
|
36
11
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
The process library is fetched at workspace-install time through the SDK CLI and
|
|
42
|
-
bound for active use in `.a5c/active/process-library.json`.
|
|
12
|
+
It still uses the Babysitter SDK CLI and the shared `~/.a5c` process-library
|
|
13
|
+
state, but it no longer installs itself by copying fake skill and hook payloads
|
|
14
|
+
into `~/.codex/skills` and `~/.codex/hooks.json`.
|
|
43
15
|
|
|
44
16
|
## Installation
|
|
45
17
|
|
|
@@ -49,108 +21,75 @@ Install the SDK CLI first:
|
|
|
49
21
|
npm install -g @a5c-ai/babysitter-sdk
|
|
50
22
|
```
|
|
51
23
|
|
|
52
|
-
Install the Codex
|
|
24
|
+
Install the Codex plugin globally:
|
|
53
25
|
|
|
54
26
|
```bash
|
|
55
|
-
|
|
27
|
+
npx @a5c-ai/babysitter-codex install
|
|
56
28
|
```
|
|
57
29
|
|
|
58
|
-
This
|
|
59
|
-
`~/.
|
|
60
|
-
|
|
30
|
+
This copies the plugin into `~/.codex/plugins/babysitter-codex`, registers it
|
|
31
|
+
in `~/.agents/plugins/marketplace.json`, merges the required global Codex
|
|
32
|
+
config into `~/.codex/config.toml`, and ensures the Babysitter process library
|
|
33
|
+
is active in `~/.a5c`.
|
|
61
34
|
|
|
62
|
-
|
|
35
|
+
Install the plugin into a specific workspace:
|
|
63
36
|
|
|
64
37
|
```bash
|
|
65
|
-
babysitter
|
|
38
|
+
npx @a5c-ai/babysitter-codex install --workspace /path/to/repo
|
|
66
39
|
```
|
|
67
40
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
`scripts/team-install.js` is the workspace installer used by the package and by
|
|
75
|
-
`babysitter harness:install-plugin codex`.
|
|
76
|
-
|
|
77
|
-
It:
|
|
78
|
-
|
|
79
|
-
1. Resolves the installed package root.
|
|
80
|
-
2. Reads `babysitter.lock.json`.
|
|
81
|
-
3. Installs the single repo-local Codex skill into `.codex/skills/babysit`.
|
|
82
|
-
4. Installs the prompt aliases into `.codex/prompts`.
|
|
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.
|
|
94
|
-
|
|
95
|
-
It does not create an external orchestrator, bundle the process library, or
|
|
96
|
-
turn the workspace into a fake Codex plugin manifest.
|
|
97
|
-
|
|
98
|
-
## Resulting Workspace Files
|
|
99
|
-
|
|
100
|
-
After a successful workspace install, the important files are:
|
|
101
|
-
|
|
102
|
-
- `.codex/skills/babysit/SKILL.md`
|
|
103
|
-
- `.codex/prompts/call.md`
|
|
104
|
-
- `.codex/prompts/plan.md`
|
|
105
|
-
- `.codex/prompts/resume.md`
|
|
106
|
-
- `.codex/hooks/`
|
|
107
|
-
- `.codex/hooks.json`
|
|
108
|
-
- `.codex/config.toml`
|
|
109
|
-
- `.a5c/team/install.json`
|
|
110
|
-
- `.a5c/team/profile.json`
|
|
111
|
-
- `.a5c/active/process-library.json`
|
|
112
|
-
- `.a5c/process-library/babysitter-repo/library`
|
|
41
|
+
This copies the plugin into `<workspace>/plugins/babysitter-codex`, registers
|
|
42
|
+
it in `<workspace>/.agents/plugins/marketplace.json`, merges
|
|
43
|
+
`<workspace>/.codex/config.toml`, and records install metadata under
|
|
44
|
+
`<workspace>/.a5c/team/`.
|
|
45
|
+
|
|
46
|
+
## Integration Model
|
|
113
47
|
|
|
114
|
-
|
|
48
|
+
The plugin provides:
|
|
115
49
|
|
|
116
|
-
|
|
50
|
+
- `skills/babysit/SKILL.md` as the core entrypoint
|
|
51
|
+
- mode wrapper skills such as `$call`, `$plan`, and `$resume`
|
|
52
|
+
- plugin-level lifecycle hooks for `SessionStart`, `UserPromptSubmit`, and
|
|
53
|
+
`Stop`
|
|
117
54
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
```
|
|
55
|
+
The process library is fetched and bound through the SDK CLI in
|
|
56
|
+
`~/.a5c/active/process-library.json`.
|
|
121
57
|
|
|
122
|
-
|
|
58
|
+
## Workspace Output
|
|
123
59
|
|
|
124
|
-
|
|
125
|
-
/call implement authentication with tests
|
|
126
|
-
/plan migration from monolith to services
|
|
127
|
-
/resume latest
|
|
128
|
-
```
|
|
60
|
+
After `install --workspace`, the important files are:
|
|
129
61
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
62
|
+
- `plugins/babysitter-codex/.codex-plugin/plugin.json`
|
|
63
|
+
- `plugins/babysitter-codex/skills/babysit/SKILL.md`
|
|
64
|
+
- `plugins/babysitter-codex/hooks.json`
|
|
65
|
+
- `.agents/plugins/marketplace.json`
|
|
66
|
+
- `.codex/config.toml`
|
|
67
|
+
- `.a5c/team/install.json`
|
|
68
|
+
- `.a5c/team/profile.json`
|
|
133
69
|
|
|
134
70
|
## Verification
|
|
135
71
|
|
|
136
|
-
Verify the installed
|
|
72
|
+
Verify the installed plugin bundle:
|
|
137
73
|
|
|
138
74
|
```bash
|
|
139
75
|
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 ~/.
|
|
145
|
-
test -f ~/.codex/prompts/resume.md
|
|
76
|
+
test -f ~/.codex/plugins/babysitter-codex/.codex-plugin/plugin.json
|
|
77
|
+
test -f ~/.codex/plugins/babysitter-codex/hooks.json
|
|
78
|
+
test -f ~/.codex/plugins/babysitter-codex/hooks/babysitter-stop-hook.sh
|
|
79
|
+
test -f ~/.codex/plugins/babysitter-codex/skills/babysit/SKILL.md
|
|
80
|
+
test -f ~/.agents/plugins/marketplace.json
|
|
146
81
|
```
|
|
147
82
|
|
|
148
|
-
Verify the active process-library binding
|
|
83
|
+
Verify the active shared process-library binding:
|
|
149
84
|
|
|
150
85
|
```bash
|
|
151
|
-
babysitter process-library:active --
|
|
86
|
+
babysitter process-library:active --json
|
|
152
87
|
```
|
|
153
88
|
|
|
89
|
+
On native Windows, Codex currently does not execute hooks. The plugin still
|
|
90
|
+
installs correctly, but the lifecycle hooks will not fire until Codex enables
|
|
91
|
+
Windows hook execution.
|
|
92
|
+
|
|
154
93
|
## License
|
|
155
94
|
|
|
156
95
|
MIT
|
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();
|