@a5c-ai/babysitter-codex 0.1.6-staging.a44bcf9e → 0.1.6-staging.c7c4cba5

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.
Files changed (55) hide show
  1. package/.app.json +3 -0
  2. package/.codex-plugin/plugin.json +47 -0
  3. package/README.md +53 -105
  4. package/assets/icon.svg +7 -0
  5. package/assets/logo.svg +8 -0
  6. package/bin/cli.js +104 -0
  7. package/bin/install-shared.js +509 -0
  8. package/bin/install.js +48 -0
  9. package/bin/uninstall.js +19 -59
  10. package/hooks/babysitter-session-start.sh +37 -0
  11. package/hooks/babysitter-stop-hook.sh +37 -0
  12. package/hooks/user-prompt-submit.sh +39 -0
  13. package/{.codex/hooks.json → hooks.json} +3 -3
  14. package/package.json +13 -11
  15. package/scripts/team-install.js +32 -380
  16. package/skills/assimilate/SKILL.md +17 -0
  17. package/skills/babysit/SKILL.md +407 -0
  18. package/skills/call/SKILL.md +16 -0
  19. package/skills/doctor/SKILL.md +16 -0
  20. package/skills/forever/SKILL.md +15 -0
  21. package/skills/help/SKILL.md +15 -0
  22. package/skills/issue/SKILL.md +16 -0
  23. package/skills/model/SKILL.md +15 -0
  24. package/skills/observe/SKILL.md +15 -0
  25. package/skills/plan/SKILL.md +16 -0
  26. package/skills/project-install/SKILL.md +15 -0
  27. package/skills/resume/SKILL.md +15 -0
  28. package/skills/retrospect/SKILL.md +15 -0
  29. package/skills/team-install/SKILL.md +15 -0
  30. package/skills/user-install/SKILL.md +15 -0
  31. package/skills/yolo/SKILL.md +16 -0
  32. package/.codex/config.toml +0 -24
  33. package/.codex/hooks/babysitter-session-start.sh +0 -15
  34. package/.codex/hooks/babysitter-stop-hook.sh +0 -15
  35. package/.codex/hooks/user-prompt-submit.sh +0 -15
  36. package/.codex/skills/babysit/SKILL.md +0 -110
  37. package/SKILL.md +0 -125
  38. package/agents/openai.yaml +0 -4
  39. package/bin/postinstall.js +0 -373
  40. package/prompts/README.md +0 -28
  41. package/prompts/assimilate.md +0 -9
  42. package/prompts/call.md +0 -12
  43. package/prompts/doctor.md +0 -9
  44. package/prompts/forever.md +0 -8
  45. package/prompts/help.md +0 -8
  46. package/prompts/issue.md +0 -9
  47. package/prompts/model.md +0 -8
  48. package/prompts/observe.md +0 -8
  49. package/prompts/plan.md +0 -11
  50. package/prompts/project-install.md +0 -8
  51. package/prompts/resume.md +0 -8
  52. package/prompts/retrospect.md +0 -8
  53. package/prompts/team-install.md +0 -8
  54. package/prompts/user-install.md +0 -8
  55. package/prompts/yolo.md +0 -8
package/.app.json ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "apps": {}
3
+ }
@@ -0,0 +1,47 @@
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
+ "apps": "./.app.json",
23
+ "interface": {
24
+ "displayName": "Babysitter",
25
+ "shortDescription": "Run Babysitter orchestration flows from Codex",
26
+ "longDescription": "Babysitter adds orchestration entrypoints such as $call, $plan, and $resume, plus Codex lifecycle hooks that keep runs and workspace state in sync.",
27
+ "developerName": "a5c.ai",
28
+ "category": "Coding",
29
+ "capabilities": [
30
+ "Interactive",
31
+ "Read",
32
+ "Write"
33
+ ],
34
+ "websiteURL": "https://github.com/a5c-ai/babysitter",
35
+ "privacyPolicyURL": "https://github.com/a5c-ai/babysitter",
36
+ "termsOfServiceURL": "https://github.com/a5c-ai/babysitter",
37
+ "defaultPrompt": [
38
+ "Use Babysitter to start a new orchestration run",
39
+ "Plan a Babysitter workflow before executing it",
40
+ "Resume the latest Babysitter run in this workspace"
41
+ ],
42
+ "brandColor": "#0F766E",
43
+ "composerIcon": "./assets/icon.svg",
44
+ "logo": "./assets/logo.svg",
45
+ "screenshots": []
46
+ }
47
+ }
package/README.md CHANGED
@@ -2,44 +2,17 @@
2
2
 
3
3
  Babysitter integration package for OpenAI Codex CLI.
4
4
 
5
- This package is a Codex skill bundle plus installer assets. It is not a native
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
- ## Integration Model
34
-
35
- Babysitter for Codex uses only the hooks model:
7
+ - `.codex-plugin/plugin.json`
8
+ - `skills/`
9
+ - `hooks.json`
10
+ - `hooks/`
36
11
 
37
- - `SessionStart` seeds Babysitter session state
38
- - `UserPromptSubmit` handles prompt-time transformations
39
- - `Stop` yields continuation back into the Babysitter orchestration loop
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. 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,83 @@ Install the SDK CLI first:
49
22
  npm install -g @a5c-ai/babysitter-sdk
50
23
  ```
51
24
 
52
- Install the Codex package:
25
+ Install the Codex plugin globally:
53
26
 
54
27
  ```bash
55
- npm install -g @a5c-ai/babysitter-codex
28
+ npx @a5c-ai/babysitter-codex install
56
29
  ```
57
30
 
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.
31
+ This copies the plugin into `~/.codex/plugins/babysitter-codex`, registers it
32
+ in `~/.agents/plugins/marketplace.json`, merges the required global Codex
33
+ config into `~/.codex/config.toml`, installs the active global Codex
34
+ `skills/`, `hooks/`, and `hooks.json` surface under `~/.codex/`, and ensures
35
+ the Babysitter process library is active in `~/.a5c`.
61
36
 
62
- Then install the Codex plugin payload into the target workspace:
37
+ Install the plugin into a specific workspace:
63
38
 
64
39
  ```bash
65
- babysitter harness:install-plugin codex --workspace /path/to/repo
40
+ npx @a5c-ai/babysitter-codex install --workspace /path/to/repo
66
41
  ```
67
42
 
68
- If `npm install -g @a5c-ai/babysitter-codex` is run from inside the target
69
- workspace, `postinstall` will also auto-run the packaged `team-install.js`
70
- against that workspace.
71
-
72
- ## What `team-install.js` Does
43
+ This copies the plugin into `<workspace>/plugins/babysitter-codex`, registers
44
+ it in `<workspace>/.agents/plugins/marketplace.json`, merges
45
+ `<workspace>/.codex/config.toml`, installs the active workspace Codex
46
+ `skills/`, `hooks/`, and `hooks.json` surface under `<workspace>/.codex/`, and
47
+ records install metadata under `<workspace>/.a5c/team/`.
73
48
 
74
- `scripts/team-install.js` is the workspace installer used by the package and by
75
- `babysitter harness:install-plugin codex`.
49
+ ## Integration Model
76
50
 
77
- It:
51
+ The plugin provides:
78
52
 
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.
53
+ - `skills/babysit/SKILL.md` as the core entrypoint
54
+ - mode wrapper skills such as `$call`, `$plan`, and `$resume`
55
+ - plugin-level lifecycle hooks for `SessionStart`, `UserPromptSubmit`, and
56
+ `Stop`
94
57
 
95
- It does not create an external orchestrator, bundle the process library, or
96
- turn the workspace into a fake Codex plugin manifest.
58
+ The process library is fetched and bound through the SDK CLI in
59
+ `~/.a5c/active/process-library.json`.
97
60
 
98
- ## Resulting Workspace Files
61
+ ## Workspace Output
99
62
 
100
- After a successful workspace install, the important files are:
63
+ After `install --workspace`, the important files are:
101
64
 
102
- - `.codex/skills/babysit/SKILL.md`
103
- - `.codex/prompts/call.md`
104
- - `.codex/prompts/plan.md`
105
- - `.codex/prompts/resume.md`
65
+ - `plugins/babysitter-codex/.codex-plugin/plugin.json`
66
+ - `plugins/babysitter-codex/skills/babysit/SKILL.md`
67
+ - `plugins/babysitter-codex/hooks.json`
68
+ - `.codex/skills/`
106
69
  - `.codex/hooks/`
107
70
  - `.codex/hooks.json`
71
+ - `.agents/plugins/marketplace.json`
108
72
  - `.codex/config.toml`
109
73
  - `.a5c/team/install.json`
110
74
  - `.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
75
 
134
76
  ## Verification
135
77
 
136
- Verify the installed skill bundle:
78
+ Verify the installed plugin bundle:
137
79
 
138
80
  ```bash
139
81
  npm ls -g @a5c-ai/babysitter-codex --depth=0
140
- ls -1 ~/.codex/skills/babysit
141
- test -f ~/.codex/skills/babysit/scripts/team-install.js
142
- test -f ~/.codex/skills/babysit/.codex/hooks/babysitter-stop-hook.sh
143
- test -f ~/.codex/prompts/call.md
144
- test -f ~/.codex/prompts/plan.md
145
- test -f ~/.codex/prompts/resume.md
82
+ test -f ~/.codex/plugins/babysitter-codex/.codex-plugin/plugin.json
83
+ test -f ~/.codex/plugins/babysitter-codex/hooks.json
84
+ test -f ~/.codex/plugins/babysitter-codex/hooks/babysitter-stop-hook.sh
85
+ test -f ~/.codex/plugins/babysitter-codex/skills/babysit/SKILL.md
86
+ test -f ~/.codex/hooks.json
87
+ test -f ~/.codex/hooks/babysitter-stop-hook.sh
88
+ test -f ~/.codex/skills/babysit/SKILL.md
89
+ test -f ~/.agents/plugins/marketplace.json
146
90
  ```
147
91
 
148
- Verify the active process-library binding for a workspace:
92
+ Verify the active shared process-library binding:
149
93
 
150
94
  ```bash
151
- babysitter process-library:active --state-dir /path/to/repo/.a5c --json
95
+ babysitter process-library:active --json
152
96
  ```
153
97
 
98
+ On native Windows, Codex currently does not execute hooks. The plugin still
99
+ installs correctly, but the lifecycle hooks will not fire until Codex enables
100
+ Windows hook execution.
101
+
154
102
  ## License
155
103
 
156
104
  MIT
@@ -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>
@@ -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();