@a5c-ai/babysitter-codex 0.1.6-staging.d5ce2137 → 0.1.6-staging.def8d2a0

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 (105) hide show
  1. package/.app.json +3 -0
  2. package/.codex-plugin/plugin.json +47 -0
  3. package/README.md +58 -104
  4. package/assets/icon.svg +7 -0
  5. package/assets/logo.svg +8 -0
  6. package/babysitter.lock.json +2 -3
  7. package/bin/cli.js +104 -0
  8. package/bin/install-shared.js +509 -0
  9. package/bin/install.js +48 -0
  10. package/bin/uninstall.js +40 -37
  11. package/hooks/babysitter-session-start.sh +37 -0
  12. package/hooks/babysitter-stop-hook.sh +37 -0
  13. package/hooks/user-prompt-submit.sh +39 -0
  14. package/{.codex/hooks.json → hooks.json} +3 -3
  15. package/package.json +15 -22
  16. package/scripts/team-install.js +34 -206
  17. package/skills/assimilate/SKILL.md +17 -0
  18. package/skills/babysit/SKILL.md +798 -0
  19. package/skills/call/SKILL.md +17 -0
  20. package/skills/doctor/SKILL.md +16 -0
  21. package/skills/forever/SKILL.md +15 -0
  22. package/skills/help/SKILL.md +15 -0
  23. package/skills/issue/SKILL.md +16 -0
  24. package/skills/model/SKILL.md +15 -0
  25. package/skills/observe/SKILL.md +15 -0
  26. package/skills/plan/SKILL.md +16 -0
  27. package/skills/project-install/SKILL.md +15 -0
  28. package/skills/resume/SKILL.md +15 -0
  29. package/skills/retrospect/SKILL.md +15 -0
  30. package/skills/team-install/SKILL.md +15 -0
  31. package/skills/user-install/SKILL.md +15 -0
  32. package/skills/yolo/SKILL.md +19 -0
  33. package/.codex/AGENTS.md +0 -53
  34. package/.codex/command-catalog.json +0 -130
  35. package/.codex/config.toml +0 -24
  36. package/.codex/hooks/babysitter-session-start.sh +0 -15
  37. package/.codex/hooks/babysitter-stop-hook.sh +0 -15
  38. package/.codex/hooks/on-breakpoint/handler.js +0 -11
  39. package/.codex/hooks/on-iteration-end/logger.js +0 -11
  40. package/.codex/hooks/on-iteration-start/logger.js +0 -11
  41. package/.codex/hooks/on-policy-block/logger.js +0 -3
  42. package/.codex/hooks/on-retry/logger.js +0 -3
  43. package/.codex/hooks/on-run-complete/logger.js +0 -11
  44. package/.codex/hooks/on-run-fail/logger.js +0 -11
  45. package/.codex/hooks/on-run-start/logger.js +0 -11
  46. package/.codex/hooks/on-score/logger.js +0 -11
  47. package/.codex/hooks/on-task-complete/logger.js +0 -11
  48. package/.codex/hooks/on-task-start/logger.js +0 -11
  49. package/.codex/hooks/on-tool-error/logger.js +0 -3
  50. package/.codex/hooks/on-turn-complete.js +0 -110
  51. package/.codex/hooks/session-init.js +0 -70
  52. package/.codex/hooks/user-prompt-submit.sh +0 -15
  53. package/.codex/hooks/utils.js +0 -71
  54. package/.codex/plugin.json +0 -132
  55. package/.codex/sdk-cli.js +0 -133
  56. package/.codex/sdk-package.js +0 -30
  57. package/.codex/skills/babysitter/assimilate/SKILL.md +0 -58
  58. package/.codex/skills/babysitter/call/SKILL.md +0 -590
  59. package/.codex/skills/babysitter/doctor/SKILL.md +0 -89
  60. package/.codex/skills/babysitter/forever/SKILL.md +0 -45
  61. package/.codex/skills/babysitter/help/SKILL.md +0 -49
  62. package/.codex/skills/babysitter/issue/SKILL.md +0 -36
  63. package/.codex/skills/babysitter/model/SKILL.md +0 -31
  64. package/.codex/skills/babysitter/observe/SKILL.md +0 -38
  65. package/.codex/skills/babysitter/plan/SKILL.md +0 -44
  66. package/.codex/skills/babysitter/project-install/SKILL.md +0 -65
  67. package/.codex/skills/babysitter/resume/SKILL.md +0 -30
  68. package/.codex/skills/babysitter/retrospect/SKILL.md +0 -43
  69. package/.codex/skills/babysitter/team-install/SKILL.md +0 -31
  70. package/.codex/skills/babysitter/user-install/SKILL.md +0 -53
  71. package/.codex/skills/babysitter/yolo/SKILL.md +0 -48
  72. package/.codex/state-index.js +0 -151
  73. package/.codex/turn-controller.js +0 -534
  74. package/AGENTS.md +0 -40
  75. package/CHANGELOG.md +0 -163
  76. package/SKILL.md +0 -89
  77. package/agents/openai.yaml +0 -4
  78. package/bin/postinstall.js +0 -225
  79. package/bin/turn-controller.js +0 -9
  80. package/commands/README.md +0 -23
  81. package/commands/assimilate.md +0 -27
  82. package/commands/call.md +0 -30
  83. package/commands/doctor.md +0 -27
  84. package/commands/forever.md +0 -27
  85. package/commands/help.md +0 -28
  86. package/commands/issue.md +0 -27
  87. package/commands/model.md +0 -27
  88. package/commands/observe.md +0 -27
  89. package/commands/plan.md +0 -27
  90. package/commands/project-install.md +0 -31
  91. package/commands/resume.md +0 -29
  92. package/commands/retrospect.md +0 -27
  93. package/commands/team-install.md +0 -29
  94. package/commands/user-install.md +0 -27
  95. package/commands/yolo.md +0 -28
  96. package/test/FULL_SESSION_SCENARIO.md +0 -105
  97. package/test/features-1-10.test.js +0 -39
  98. package/test/full-session-long-run.js +0 -519
  99. package/test/full-session-long-run.ps1 +0 -460
  100. package/test/full-session-scenario.js +0 -346
  101. package/test/harness.test.js +0 -54
  102. package/test/integration.test.js +0 -94
  103. package/test/packaged-install.test.js +0 -193
  104. package/test/plugin.test.js +0 -164
  105. package/test/turn-controller.test.js +0 -161
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
@@ -1,137 +1,91 @@
1
1
  # @a5c-ai/babysitter-codex
2
2
 
3
- Babysitter integration package for OpenAI Codex CLI. It packages Codex-facing
4
- skills, install helpers, mapping docs, and the hook assets used to keep
5
- Babysitter in the Codex lifecycle loop.
3
+ Babysitter integration package for OpenAI Codex CLI.
6
4
 
7
- This is a Codex skill bundle plus workspace hook templates. It is not a
8
- Claude-style manifest plugin, but it does rely on Codex's real lifecycle hook
9
- engine through `.codex/hooks.json`, and the package postinstall now wires the
10
- active workspace when the global install is launched from that workspace.
5
+ This package ships a real Codex plugin bundle:
11
6
 
12
- ## What This Package Owns
7
+ - `.codex-plugin/plugin.json`
8
+ - `skills/`
9
+ - `hooks.json`
10
+ - `hooks/`
13
11
 
14
- - Codex skill payload under `~/.codex/skills/babysitter-codex`
15
- - Codex-facing command docs
16
- - Codex runtime hook helpers under `.codex/`
17
- - Codex mapping and compatibility policy for SDK-driven orchestration
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.
18
16
 
19
- ## Active Process-Library Model
20
-
21
- `babysitter-codex` does not ship the process library. Workspace onboarding
22
- fetches the original Babysitter repo through the SDK CLI and binds the active
23
- process root in `.a5c/active/process-library.json`.
24
-
25
- Active-use process discovery should prefer:
26
-
27
- 1. Project-local `.a5c/processes`
28
- 2. The SDK-managed active process-library binding returned by
29
- `babysitter process-library:active --state-dir .a5c --json`
30
-
31
- `project-install` and `team-install` layer config, rules, profiles, and pinned
32
- content metadata. They should not be documented as creating an exclusive
33
- project/team process-library scope.
34
-
35
- ## Codex User Experience
36
-
37
- Codex should be integrated through its real hook engine:
17
+ ## Installation
38
18
 
39
- - `SessionStart` initializes Babysitter session state
40
- - `UserPromptSubmit` handles prompt-time transformations safely
41
- - `Stop` keeps Babysitter in the orchestration loop after each yielded turn
19
+ Install the SDK CLI first:
42
20
 
43
- Current contract:
21
+ ```bash
22
+ npm install -g @a5c-ai/babysitter-sdk
23
+ ```
44
24
 
45
- - start, resume, and inspect work through Codex command phrases such as
46
- `babysitter call`, `babysitter resume`, and `babysitter doctor`
47
- - let the installed Codex hook assets handle runtime state, result posting,
48
- and continuation
49
- - stop after each completed phase so the `Stop` hook can decide whether Codex
50
- exits or receives the next Babysitter iteration message
51
- - finish only when `completionProof` is emitted and echoed as
52
- `<promise>...</promise>`
25
+ clone the repo and install the plugin globally:
53
26
 
54
- Do not document external supervisors, hidden wrapper loops, or `notify` as the
55
- continuation mechanism for the plugin path.
27
+ ```bash
28
+ git clone https://github.com/a5c-ai/babysitter.git
29
+ cd babysitter
30
+ codex
56
31
 
57
- ## Installation
32
+ > /plugins
33
+ ```
58
34
 
59
- Install from npm:
35
+ then navigate to the 'babysitter' entry and select 'Install'.
60
36
 
61
- ```bash
62
- npm install -g @a5c-ai/babysitter-codex
63
- ```
37
+ ## Integration Model
64
38
 
65
- If you run that command from inside the target repository, postinstall will:
39
+ The plugin provides:
66
40
 
67
- - install the skill payload into `CODEX_HOME`
68
- - merge `~/.codex/config.toml` so `codex_hooks` is enabled
69
- - materialize workspace `.codex/hooks.json` and `.codex/config.toml` for the
70
- active workspace
71
- - clone or update the original Babysitter repo into `.a5c/process-library/...`
72
- - bind the fetched process-library root for active use through the SDK CLI
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`
73
45
 
74
- If you installed from somewhere else, run:
46
+ The process library is fetched and bound through the SDK CLI in
47
+ `~/.a5c/active/process-library.json`.
75
48
 
76
- ```bash
77
- npm install -g @a5c-ai/babysitter-sdk
78
- babysitter harness:install-plugin codex --workspace /path/to/repo
79
- ```
49
+ ## Workspace Output
80
50
 
81
- `babysitter harness:install-plugin ...` is provided by the SDK CLI, so make
82
- sure `@a5c-ai/babysitter-sdk` is installed first.
51
+ After `install --workspace`, the important files are:
83
52
 
84
- Or from a local checkout:
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/`
57
+ - `.codex/hooks/`
58
+ - `.codex/hooks.json`
59
+ - `.agents/plugins/marketplace.json`
60
+ - `.codex/config.toml`
61
+ - `.a5c/team/install.json`
62
+ - `.a5c/team/profile.json`
85
63
 
86
- ```bash
87
- cd /path/to/babysitter-codex
88
- npm install -g .
89
- ```
64
+ ## Verification
90
65
 
91
- Verify the installed skill payload:
66
+ Verify the installed plugin bundle:
92
67
 
93
68
  ```bash
94
69
  npm ls -g @a5c-ai/babysitter-codex --depth=0
95
- ls -1 ~/.codex/skills/babysitter-codex
96
- test -f ~/.codex/skills/babysitter-codex/scripts/team-install.js
97
- test -f ~/.codex/skills/babysitter-codex/.codex/hooks.json
98
- test -f ~/.codex/skills/babysitter-codex/.codex/hooks/babysitter-stop-hook.sh
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
99
78
  ```
100
79
 
101
- Verify the active process-library binding:
80
+ Verify the active shared process-library binding:
102
81
 
103
82
  ```bash
104
- babysitter process-library:active --state-dir /path/to/repo/.a5c --json
105
- ```
106
-
107
- ## Quick Start
108
-
109
- Use command phrases in Codex chat:
110
-
111
- ```text
112
- babysitter help
113
- babysitter call implement authentication with tests
114
- babysitter yolo fix lint and failing tests
115
- babysitter resume latest incomplete run
116
- babysitter doctor current run
83
+ babysitter process-library:active --json
117
84
  ```
118
85
 
119
- For Codex users, the expected interface is the Codex command phrases plus the
120
- workspace hook install created by onboarding. Raw Babysitter CLI primitives are
121
- internal harness details and live in the Codex skill, not in this user-facing
122
- README.
123
-
124
- ## Project And Team Install
125
-
126
- Use `babysitter team-install` and `babysitter project-install` from Codex chat
127
- when you want workspace onboarding. They layer pinned config and setup around
128
- the active process roots already used at runtime; they are not the source of
129
- truth for process discovery.
130
-
131
- ## Documentation
132
-
133
- - [commands/README.md](./commands/README.md)
134
- - Internal orchestration details: [.codex/skills/babysitter/call/SKILL.md](./.codex/skills/babysitter/call/SKILL.md)
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.
135
89
 
136
90
  ## License
137
91
 
@@ -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>
@@ -10,9 +10,8 @@
10
10
  "version": "0.1.4",
11
11
  "processLibrary": {
12
12
  "repo": "https://github.com/a5c-ai/babysitter.git",
13
- "path": "plugins/babysitter",
14
- "processSubpath": "plugins/babysitter/skills/babysit/process",
15
- "referenceSubpath": "plugins/babysitter/skills/babysit/reference",
13
+ "processSubpath": "library",
14
+ "referenceSubpath": "library/reference",
16
15
  "snapshotCommit": "unknown"
17
16
  }
18
17
  }
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();