@a5c-ai/babysitter-codex 0.1.11-staging.1ebc5bd7 → 0.1.11-staging.1ebd71ca

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/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. 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.
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
- git clone https://github.com/a5c-ai/babysitter.git
29
- cd babysitter
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
- - `plugins/babysitter/.codex-plugin/plugin.json`
54
- - `plugins/babysitter/skills/babysit/SKILL.md`
55
- - `plugins/babysitter/hooks.json`
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 ~/.codex/plugins/babysitter/.codex-plugin/plugin.json
71
- test -f ~/.codex/plugins/babysitter/hooks.json
72
- test -f ~/.codex/plugins/babysitter/hooks/babysitter-stop-hook.sh
73
- test -f ~/.codex/plugins/babysitter/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
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
 
@@ -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',
@@ -88,7 +89,7 @@ function getHomePluginRoot() {
88
89
  if (process.env.BABYSITTER_CODEX_PLUGIN_DIR) {
89
90
  return path.resolve(process.env.BABYSITTER_CODEX_PLUGIN_DIR, PLUGIN_NAME);
90
91
  }
91
- return path.join(getCodexHome(), 'plugins', PLUGIN_NAME);
92
+ return path.join(getUserHome(), '.agents', 'plugins', PLUGIN_NAME);
92
93
  }
93
94
 
94
95
  function getHomeMarketplacePath() {
@@ -316,12 +317,14 @@ function ensureExecutable(filePath) {
316
317
  }
317
318
 
318
319
  function normalizeMarketplaceSourcePath(marketplacePath, pluginSourcePath) {
319
- let next = pluginSourcePath;
320
- if (path.isAbsolute(next)) {
321
- next = path.relative(path.dirname(marketplacePath), next);
322
- }
320
+ let next = path.relative(path.dirname(marketplacePath), pluginSourcePath);
323
321
  next = String(next || '').replace(/\\/g, '/');
324
- if (!next.startsWith('./') && !next.startsWith('../')) {
322
+ if (!next || next === '.' || next.startsWith('../')) {
323
+ throw new Error(
324
+ `Plugin source path must live under ${path.dirname(marketplacePath)} so Codex can load it via a ./-prefixed marketplace entry.`,
325
+ );
326
+ }
327
+ if (!next.startsWith('./')) {
325
328
  next = `./${next}`;
326
329
  }
327
330
  return next;
@@ -347,15 +350,15 @@ function ensureMarketplaceEntry(marketplacePath, pluginSourcePath) {
347
350
  },
348
351
  category: PLUGIN_CATEGORY,
349
352
  };
350
- const existingIndex = Array.isArray(marketplace.plugins)
351
- ? marketplace.plugins.findIndex((entry) => entry && entry.name === PLUGIN_NAME)
352
- : -1;
353
353
  if (!Array.isArray(marketplace.plugins)) {
354
354
  marketplace.plugins = [nextEntry];
355
- } else if (existingIndex >= 0) {
356
- marketplace.plugins[existingIndex] = nextEntry;
357
355
  } else {
358
- marketplace.plugins.push(nextEntry);
356
+ const sanitized = marketplace.plugins.filter((entry) => (
357
+ entry &&
358
+ entry.name !== PLUGIN_NAME &&
359
+ !LEGACY_MARKETPLACE_PLUGIN_NAMES.includes(entry.name)
360
+ ));
361
+ marketplace.plugins = [...sanitized, nextEntry];
359
362
  }
360
363
  writeJson(marketplacePath, marketplace);
361
364
  return nextEntry;
@@ -369,7 +372,11 @@ function removeMarketplaceEntry(marketplacePath) {
369
372
  if (!Array.isArray(marketplace.plugins)) {
370
373
  return;
371
374
  }
372
- marketplace.plugins = marketplace.plugins.filter((entry) => entry && entry.name !== PLUGIN_NAME);
375
+ marketplace.plugins = marketplace.plugins.filter((entry) => (
376
+ entry &&
377
+ entry.name !== PLUGIN_NAME &&
378
+ !LEGACY_MARKETPLACE_PLUGIN_NAMES.includes(entry.name)
379
+ ));
373
380
  writeJson(marketplacePath, marketplace);
374
381
  }
375
382
 
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@a5c-ai/babysitter-codex",
3
- "version": "0.1.11-staging.1ebc5bd7",
3
+ "version": "0.1.11-staging.1ebd71ca",
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",
@@ -45,6 +45,6 @@
45
45
  },
46
46
  "homepage": "https://github.com/a5c-ai/babysitter/tree/main/plugins/babysitter-codex#readme",
47
47
  "dependencies": {
48
- "@a5c-ai/babysitter-sdk": "0.0.188-staging.1ebc5bd7"
48
+ "@a5c-ai/babysitter-sdk": "0.0.188-staging.1ebd71ca"
49
49
  }
50
50
  }
@@ -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