@a5c-ai/babysitter-codex 5.0.1-staging.ff2c19f9 → 5.1.1-staging.583e3d9a6ed7

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "babysitter",
3
- "version": "5.0.0",
3
+ "version": "5.1.1-staging.583e3d9a6ed7",
4
4
  "description": "Orchestrate complex, multi-step workflows with event-sourced state management, hook-based extensibility, and human-in-the-loop approval",
5
5
  "author": {
6
6
  "name": "a5c.ai",
@@ -20,7 +20,7 @@
20
20
  "LLM"
21
21
  ],
22
22
  "skills": "./skills/",
23
- "hooks": "./hooks/hooks.json",
23
+ "hooks": "./hooks.json",
24
24
  "apps": "./.app.json",
25
25
  "interface": {
26
26
  "displayName": "Babysitter",
@@ -45,5 +45,5 @@
45
45
  "composerIcon": "./assets/icon.svg",
46
46
  "logo": "./assets/logo.png"
47
47
  },
48
- "homepage": "https://github.com/a5c-ai/babysitter/tree/main/plugins/babysitter-codex#readme"
48
+ "homepage": "https://github.com/a5c-ai/babysitter/tree/main/plugins/babysitter-unified/per-harness/codex#readme"
49
49
  }
package/README.md CHANGED
@@ -11,29 +11,76 @@ This package ships a real Codex plugin bundle:
11
11
 
12
12
  It still uses the Babysitter SDK CLI and the shared `~/.a5c` process-library
13
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.
14
+ and updates `.agents/plugins/marketplace.json` (primary) so Codex can load the
15
+ plugin through its marketplace surface. Codex also recognizes
16
+ `.claude-plugin/marketplace.json` as a legacy marketplace path. Workspace
17
+ install continues to materialize a workspace-local Codex surface for team setup.
18
+
19
+ Codex now ships an official marketplace CLI (`codex plugin marketplace`) that
20
+ supports `add`, `list`, `upgrade`, and `remove` subcommands. Plugin bundles
21
+ installed through the marketplace are cached under
22
+ `~/.codex/plugins/cache/$MARKETPLACE/$PLUGIN/$VERSION/`.
17
23
 
18
24
  ## Installation
19
25
 
20
- Install the SDK CLI first:
26
+ Install the Babysitter CLI once:
27
+
28
+ ```bash
29
+ npm install -g @a5c-ai/babysitter
30
+ ```
31
+
32
+ Install the Codex plugin through the SDK helper. This is the canonical path used by the installer tests and resolves to `npx --yes @a5c-ai/babysitter-codex install ...` under the hood:
33
+
34
+ ```bash
35
+ # Global install
36
+ babysitter harness:install-plugin codex
37
+
38
+ # Workspace install
39
+ babysitter harness:install-plugin codex --workspace /path/to/repo
40
+ ```
41
+
42
+ You can also run the published package installer directly:
43
+
44
+ ```bash
45
+ npx --yes @a5c-ai/babysitter-codex install --global
46
+ npx --yes @a5c-ai/babysitter-codex install --workspace /path/to/repo
47
+ ```
48
+
49
+ Alternatively, use the official Codex marketplace CLI to add the babysitter
50
+ marketplace directly from GitHub:
21
51
 
22
52
  ```bash
23
- npm install -g @a5c-ai/babysitter-sdk
53
+ codex plugin marketplace add a5c-ai/babysitter --ref staging --sparse .agents/plugins
24
54
  ```
25
55
 
26
- clone the repo and install the plugin globally:
56
+ Or from a local clone:
27
57
 
28
58
  ```bash
29
- npx -y @a5c-ai/babysitter-codex install --global
59
+ codex plugin marketplace add ./path/to/babysitter
60
+ ```
61
+
62
+ Then browse and install:
63
+
64
+ ```bash
65
+ codex plugin list --source babysitter
66
+ codex plugin install babysitter --source babysitter
67
+ ```
68
+
69
+ Other marketplace commands:
70
+
71
+ ```bash
72
+ codex plugin marketplace list
73
+ codex plugin marketplace upgrade babysitter
74
+ codex plugin marketplace remove babysitter
75
+ ```
30
76
 
31
- codex
77
+ Then open Codex and finish enabling the plugin from the plugin UI:
32
78
 
33
- > /plugins
79
+ ```text
80
+ /plugins
34
81
  ```
35
82
 
36
- then navigate to the 'babysitter' entry and select 'Install'.
83
+ Navigate to the `babysitter` entry and select `Install`.
37
84
 
38
85
  If Codex was already open when you ran `install --global`, start a new thread
39
86
  after installing from `/plugins` before expecting `babysitter:*` skills such as
@@ -51,6 +98,25 @@ The plugin provides:
51
98
  The process library is fetched and bound through the SDK CLI in
52
99
  `~/.a5c/active/process-library.json`.
53
100
 
101
+ ## Hook Environment Variables
102
+
103
+ Codex exposes the following environment variables to hook scripts:
104
+
105
+ | Variable | Description |
106
+ |---|---|
107
+ | `PLUGIN_ROOT` | Absolute path to the plugin root directory (native) |
108
+ | `PLUGIN_DATA` | Persistent data directory for the plugin (native) |
109
+ | `CLAUDE_PLUGIN_ROOT` | Compatibility alias for `PLUGIN_ROOT` |
110
+ | `CLAUDE_PLUGIN_DATA` | Compatibility alias for `PLUGIN_DATA` |
111
+
112
+ Hook scripts should prefer `PLUGIN_ROOT` / `PLUGIN_DATA` but can read the
113
+ `CLAUDE_PLUGIN_ROOT` / `CLAUDE_PLUGIN_DATA` aliases for cross-harness
114
+ compatibility with Claude Code plugins.
115
+
116
+ Codex auto-detects hooks via `./hooks/hooks.json`. The `hooks` field in
117
+ `.codex-plugin/plugin.json` accepts a path, an array of paths, an inline
118
+ object, or an array of objects.
119
+
54
120
  ## Workspace Output
55
121
 
56
122
  After `install --workspace`, the important files are:
@@ -13,23 +13,23 @@ function getUserHome() {
13
13
  }
14
14
 
15
15
  function getHarnessHome() {
16
- return path.join(os.homedir(), '.codex');
16
+ return path.join(os.homedir(), ".codex");
17
17
  }
18
18
 
19
19
  function getHomePluginRoot(scope) {
20
20
  if (scope === 'workspace') return path.join(process.cwd(), '.a5c', 'plugins', PLUGIN_NAME);
21
- return path.join(path.join(os.homedir(), '.agents', 'plugins'), PLUGIN_NAME);
21
+ return path.join(path.join(os.homedir(), ".agents/plugins"), PLUGIN_NAME);
22
22
  }
23
23
 
24
24
  function getHomeMarketplacePath() {
25
- return path.join(os.homedir(), '.agents', 'plugins', 'marketplace.json');
25
+ return path.join(os.homedir(), ".agents/plugins/marketplace.json");
26
26
  }
27
27
 
28
28
  function writeFileIfChanged(filePath, contents) {
29
29
  try {
30
30
  const existing = fs.readFileSync(filePath, 'utf8');
31
31
  if (existing === contents) return false;
32
- } catch {}
32
+ } catch (e) { process.stderr.write('[extensions-adapter] file read failed for ' + filePath + ', overwriting: ' + (e instanceof Error ? e.message : String(e)) + '\n'); }
33
33
  fs.mkdirSync(path.dirname(filePath), { recursive: true });
34
34
  fs.writeFileSync(filePath, contents);
35
35
  return true;
@@ -82,7 +82,7 @@ function writeJson(filePath, value) {
82
82
  function ensureExecutable(filePath) {
83
83
  try {
84
84
  fs.chmodSync(filePath, 0o755);
85
- } catch {}
85
+ } catch (e) { process.stderr.write('[extensions-adapter] chmod failed for ' + filePath + ': ' + (e instanceof Error ? e.message : String(e)) + '\n'); }
86
86
  }
87
87
 
88
88
  function normalizeMarketplaceSourcePath(source, marketplacePath) {
@@ -104,7 +104,7 @@ function ensureMarketplaceEntry(marketplacePath, pluginRoot) {
104
104
  name: PLUGIN_NAME,
105
105
  source: relSource,
106
106
  description: "Orchestrate complex, multi-step workflows with event-sourced state management, hook-based extensibility, and human-in-the-loop approval",
107
- version: "5.0.0",
107
+ version: "5.1.1-staging.583e3d9a6ed7",
108
108
  author: { name: "a5c.ai" },
109
109
  };
110
110
  if (idx >= 0) marketplace.plugins[idx] = entry;
@@ -130,7 +130,7 @@ function runPostInstall(pluginRoot) {
130
130
  if (fs.existsSync(postInstall)) {
131
131
  spawnSync(process.execPath, [postInstall], {
132
132
  cwd: pluginRoot, stdio: 'inherit',
133
- env: { ...process.env, PLUGIN_ROOT: pluginRoot },
133
+ env: { ...process.env, PLUGIN_ROOT: pluginRoot, CLAUDE_PLUGIN_ROOT: pluginRoot },
134
134
  });
135
135
  }
136
136
  }
@@ -147,7 +147,7 @@ function resolveCliCommand(packageRoot) {
147
147
  const versionsPath = path.join(packageRoot, 'versions.json');
148
148
  const versions = readJson(versionsPath) || {};
149
149
  const ver = versions.sdkVersion || 'latest';
150
- return `npx -y @a5c-ai/babysitter-sdk@${ver}`;
150
+ return `npm exec --yes --package @a5c-ai/babysitter-sdk@${ver} -- babysitter`;
151
151
  }
152
152
 
153
153
  function runCli(packageRoot, cliArgs, options = {}) {
@@ -297,7 +297,7 @@ function renderCodexConfigToml() {
297
297
  'writable_roots = [".a5c", ".codex"]',
298
298
  '',
299
299
  '[features]',
300
- 'codex_hooks = true',
300
+ 'hooks = true',
301
301
  'multi_agent = true',
302
302
  '',
303
303
  '[agents]',
@@ -406,7 +406,7 @@ function mergeCodexConfig(existing) {
406
406
  content = insertRootKey(content, 'sandbox_mode', 'sandbox_mode = "workspace-write"');
407
407
  content = insertRootKey(content, 'project_doc_max_bytes', 'project_doc_max_bytes = 65536');
408
408
  content = ensureWritableRoots(content);
409
- content = ensureSectionLine(content, 'features', 'codex_hooks', 'codex_hooks = true');
409
+ content = ensureSectionLine(content, 'features', 'hooks', 'hooks = true');
410
410
  content = ensureSectionLine(content, 'features', 'multi_agent', 'multi_agent = true');
411
411
  content = ensureSectionLine(content, 'agents', 'max_depth', 'max_depth = 3');
412
412
  content = ensureSectionLine(content, 'agents', 'max_threads', 'max_threads = 4');
@@ -771,21 +771,28 @@ module.exports = {
771
771
  resolveCliCommand,
772
772
  runCli,
773
773
  ensureGlobalProcessLibrary,
774
+ PLUGIN_BUNDLE_ENTRIES,
775
+ copyRecursive,
776
+ copyPluginBundle,
777
+ DEFAULT_MARKETPLACE,
778
+ normalizeMarketplaceSourcePath,
779
+ ensureMarketplaceEntry,
780
+ removeMarketplaceEntry,
781
+ installManagedSkills,
782
+ mergeManagedHooksConfig,
783
+ installManagedHooks,
784
+ warnWindowsHooks,
774
785
  LEGACY_MARKETPLACE_PLUGIN_NAMES,
775
786
  LEGACY_SKILL_NAMES,
776
787
  LEGACY_PROMPT_NAMES,
777
788
  LEGACY_HOOK_SCRIPT_NAMES,
778
789
  MANAGED_HOOK_SCRIPT_NAMES,
779
- DEFAULT_MARKETPLACE,
780
- PLUGIN_BUNDLE_ENTRIES,
781
790
  getCodexHome,
782
791
  getHomePluginRoot,
783
792
  getHomeMarketplacePath,
784
793
  getWorkspacePluginRoot,
785
794
  getWorkspaceMarketplacePath,
786
795
  renderCodexConfigToml,
787
- copyRecursive,
788
- copyPluginBundle,
789
796
  insertRootKey,
790
797
  ensureSectionLine,
791
798
  ensureWritableRoots,
@@ -795,15 +802,8 @@ module.exports = {
795
802
  runBabysitterCli,
796
803
  ensureGlobalProcessLibrary,
797
804
  getMarketplaceRootDir,
798
- normalizeMarketplaceSourcePath,
799
- ensureMarketplaceEntry,
800
- removeMarketplaceEntry,
801
805
  removeLegacyCodexSurface,
802
- installManagedSkills,
803
- mergeManagedHooksConfig,
804
- installManagedHooks,
805
806
  installCodexSurface,
806
807
  harnessInstall,
807
808
  harnessTeamInstall,
808
- warnWindowsHooks,
809
809
  };
package/bin/uninstall.js CHANGED
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  'use strict';
3
3
 
4
- const path = require('path');
5
4
  const fs = require('fs');
6
5
  const shared = require('./install-shared');
7
6
 
@@ -0,0 +1,3 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ babysitter hook:run --harness unified --hook-type post-tool-use --json
@@ -0,0 +1,3 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ babysitter hook:run --harness unified --hook-type pre-tool-use --json
@@ -0,0 +1,3 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ babysitter hook:run --harness unified --hook-type session-end --json
@@ -1,7 +1,7 @@
1
1
  #!/bin/bash
2
2
  # Session Start — installs SDK if needed, then runs hook handler.
3
3
  set -euo pipefail
4
- PLUGIN_ROOT="${PLUGIN_ROOT:-$(cd "$(dirname "$0")/.." && pwd)}"
4
+ PLUGIN_ROOT="${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-$(cd "$(dirname "$0")/.." && pwd)}}"
5
5
  SDK_VERSION=$(node -e "try{console.log(JSON.parse(require('fs').readFileSync('${PLUGIN_ROOT}/versions.json','utf8')).sdkVersion||'latest')}catch{console.log('latest')}" 2>/dev/null || echo "latest")
6
6
  if ! command -v babysitter &>/dev/null; then
7
7
  npm i -g "@a5c-ai/babysitter-sdk@${SDK_VERSION}" --loglevel=error 2>/dev/null || \
File without changes
File without changes
package/hooks.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "hooks": [
7
7
  {
8
8
  "type": "command",
9
- "command": "npx -y @a5c-ai/hooks-mux-cli invoke --adapter codex --handler \"bash ./hooks/babysitter-proxied-session-start.sh\" --json"
9
+ "command": "adapters-hooks invoke --adapter codex --handler \"bash .codex/hooks/babysitter-proxied-session-start.sh\" --json"
10
10
  }
11
11
  ]
12
12
  }
@@ -17,7 +17,7 @@
17
17
  "hooks": [
18
18
  {
19
19
  "type": "command",
20
- "command": "npx -y @a5c-ai/hooks-mux-cli invoke --adapter codex --handler \"bash ./hooks/babysitter-proxied-stop.sh\" --json"
20
+ "command": "adapters-hooks invoke --adapter codex --handler \"bash .codex/hooks/babysitter-proxied-stop.sh\" --json"
21
21
  }
22
22
  ]
23
23
  }
@@ -28,7 +28,40 @@
28
28
  "hooks": [
29
29
  {
30
30
  "type": "command",
31
- "command": "npx -y @a5c-ai/hooks-mux-cli invoke --adapter codex --handler \"bash ./hooks/babysitter-proxied-user-prompt-submit.sh\" --json"
31
+ "command": "adapters-hooks invoke --adapter codex --handler \"bash .codex/hooks/babysitter-proxied-user-prompt-submit.sh\" --json"
32
+ }
33
+ ]
34
+ }
35
+ ],
36
+ "PreToolUse": [
37
+ {
38
+ "matcher": ".*",
39
+ "hooks": [
40
+ {
41
+ "type": "command",
42
+ "command": "adapters-hooks invoke --adapter codex --handler \"bash .codex/hooks/babysitter-proxied-pre-tool-use.sh\" --json"
43
+ }
44
+ ]
45
+ }
46
+ ],
47
+ "PostToolUse": [
48
+ {
49
+ "matcher": ".*",
50
+ "hooks": [
51
+ {
52
+ "type": "command",
53
+ "command": "adapters-hooks invoke --adapter codex --handler \"bash .codex/hooks/babysitter-proxied-post-tool-use.sh\" --json"
54
+ }
55
+ ]
56
+ }
57
+ ],
58
+ "SessionEnd": [
59
+ {
60
+ "matcher": ".*",
61
+ "hooks": [
62
+ {
63
+ "type": "command",
64
+ "command": "adapters-hooks invoke --adapter codex --handler \"bash .codex/hooks/babysitter-proxied-session-end.sh\" --json"
32
65
  }
33
66
  ]
34
67
  }
package/package.json CHANGED
@@ -1,13 +1,15 @@
1
1
  {
2
2
  "name": "@a5c-ai/babysitter-codex",
3
- "version": "5.0.1-staging.ff2c19f9",
3
+ "version": "5.1.1-staging.583e3d9a6ed7",
4
4
  "description": "Orchestrate complex, multi-step workflows with event-sourced state management, hook-based extensibility, and human-in-the-loop approval",
5
5
  "scripts": {
6
- "test": "node test/integration.test.js && node test/packaged-install.test.js",
7
- "sync:commands": "node scripts/sync-command-skills.js",
6
+ "test": "npm run validate:ci",
7
+ "test:integration": "node test/integration.test.js",
8
+ "test:packaged-install": "node test/packaged-install.test.js",
9
+ "validate:ci": "npm run test:integration && npm run test:packaged-install",
10
+ "team:install": "node scripts/team-install.js",
8
11
  "deploy": "npm publish --access public",
9
- "deploy:staging": "npm publish --access public --tag staging",
10
- "sync:skills": "node scripts/sync-command-skills.js"
12
+ "deploy:staging": "npm publish --access public --tag staging"
11
13
  },
12
14
  "bin": {
13
15
  "babysitter-codex": "bin/cli.js"
@@ -36,9 +38,10 @@
36
38
  },
37
39
  "repository": {
38
40
  "type": "git",
39
- "url": "https://github.com/a5c-ai/babysitter"
41
+ "url": "git+https://github.com/a5c-ai/babysitter-codex.git"
40
42
  },
41
- "dependencies": {
42
- "@a5c-ai/babysitter-sdk": "5.0.1-staging.ff2c19f9"
43
+ "homepage": "https://github.com/a5c-ai/babysitter-codex#readme",
44
+ "bugs": {
45
+ "url": "https://github.com/a5c-ai/babysitter-codex/issues"
43
46
  }
44
47
  }
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env node
2
+ import { spawnSync } from 'node:child_process';
3
+ import { existsSync, readFileSync } from 'node:fs';
4
+
5
+ function run(command, args) {
6
+ const result = spawnSync(command, args, { encoding: 'utf8', stdio: 'inherit' });
7
+ if (result.status !== 0) process.exit(result.status || 1);
8
+ }
9
+
10
+ const branch = process.env.GITHUB_REF_NAME || 'develop';
11
+ const sha = (process.env.GITHUB_SHA || '').slice(0, 12);
12
+ const version = existsSync('package.json') ? JSON.parse(readFileSync('package.json', 'utf8')).version : JSON.parse(readFileSync('versions.json', 'utf8')).sdkVersion;
13
+ const normalized = String(version).replace(/[^0-9A-Za-z._-]/g, '-');
14
+ const tag = 'release/' + branch + '/v' + normalized + '-' + sha;
15
+ run('git', ['config', 'user.name', 'github-actions[bot]']);
16
+ run('git', ['config', 'user.email', 'github-actions[bot]@users.noreply.github.com']);
17
+ run('git', ['tag', tag]);
18
+ run('git', ['push', 'origin', tag]);
@@ -0,0 +1,41 @@
1
+ #!/usr/bin/env node
2
+ import { spawnSync } from 'node:child_process';
3
+ import { readFileSync } from 'node:fs';
4
+
5
+ function run(command, args, options = {}) {
6
+ const result = spawnSync(command, args, { stdio: options.stdio || 'inherit', encoding: options.encoding });
7
+ if (result.status !== 0 && !options.allowFailure) process.exit(result.status || 1);
8
+ return result;
9
+ }
10
+
11
+ function npmView(packageSpec) {
12
+ return run('npm', ['view', packageSpec, 'version'], { allowFailure: true, stdio: 'pipe', encoding: 'utf8' }).status === 0;
13
+ }
14
+
15
+ const pkg = JSON.parse(readFileSync('package.json', 'utf8'));
16
+ const ref = process.env.GITHUB_REF_NAME || '';
17
+ const branch = ref.split('/')[1] || 'develop';
18
+ const tag = branch === 'main' ? 'latest' : branch;
19
+
20
+ if (!process.env.NODE_AUTH_TOKEN) {
21
+ console.log('NODE_AUTH_TOKEN is not configured; skipping npm publish.');
22
+ process.exit(0);
23
+ }
24
+
25
+ if (npmView(pkg.name + '@' + pkg.version)) {
26
+ console.log(pkg.name + '@' + pkg.version + ' already exists; ensuring dist-tag ' + tag + '.');
27
+ run('npm', ['dist-tag', 'add', pkg.name + '@' + pkg.version, tag], { allowFailure: true });
28
+ process.exit(0);
29
+ }
30
+
31
+ for (const field of ['dependencies', 'peerDependencies', 'optionalDependencies']) {
32
+ for (const [name, version] of Object.entries(pkg[field] || {})) {
33
+ if (!name.startsWith('@a5c-ai/') || version.startsWith('^') || version.startsWith('~') || version === '*' || version.startsWith('workspace:')) continue;
34
+ if (!npmView(name + '@' + version)) {
35
+ console.log('Required internal dependency ' + name + '@' + version + ' is not published yet; skipping npm publish.');
36
+ process.exit(0);
37
+ }
38
+ }
39
+ }
40
+
41
+ run('npm', ['publish', '--access', 'public', '--tag', tag]);
@@ -1,14 +1,24 @@
1
1
  ---
2
2
  name: babysit
3
- description: >-
4
- Orchestrate via @babysitter. Use this skill when asked to babysit a run,
5
- orchestrate a process or whenever it is called explicitly. (babysit,
6
- babysitter, orchestrate, orchestrate a run, workflow, etc.)
3
+ description: Execute via @babysitter. Use this skill when asked to babysit a task, do anything that is structured process-driven (even a loop) or whenever it is called explicitly. (babysit, babysitter, with a process, orchestrate, orchestrate a run, workflow, loop until, etc.)
4
+ allowed-tools: Read, Grep, Write, Task, Bash, Edit, Grep, Glob, WebFetch, WebSearch, Search, AskUserQuestion, TodoWrite, TodoRead, Skill, BashOutput, KillShell, MultiEdit, LS
5
+ version: 0.1.3
7
6
  ---
8
7
 
9
8
  # babysit
10
9
 
11
- Orchestrate `.a5c/runs/<runId>/` through iterative execution.
10
+ Follow the commands below exactly. but apply judgement and creativity to get the job done. no matter how small or simple the task may seem, you must use the babysitter SDK and run lifecycle to execute it. This is non-negotiable. If you are asked to do something that seems like it could be done with a simple tool call, you must still use the babysitter SDK to create a run, define tasks, execute them, and complete the run. This is how you will learn and demonstrate mastery of the babysitter system. Always follow the full process, even for trivial tasks.
11
+
12
+ Subagents that need a scratch checkout or working directory must create it under
13
+ `/tmp/<descriptive-name>/`, not under `.a5c/runs/<runId>/work`. Before returning
14
+ deliverables, validate that no run-dir worktree was left behind, for example:
15
+
16
+ ```bash
17
+ find .a5c/runs -maxdepth 3 -name work -type d -print
18
+ ```
19
+
20
+ That command should print nothing. If it prints a non-empty work directory, move
21
+ or remove only the scratch data you created before returning.
12
22
 
13
23
  ## Dependencies
14
24
 
@@ -17,13 +27,19 @@ Orchestrate `.a5c/runs/<runId>/` through iterative execution.
17
27
  Read the SDK version from `versions.json` to ensure version compatibility:
18
28
 
19
29
  ```bash
20
- SDK_VERSION=$(node -e "try{console.log(JSON.parse(require('fs').readFileSync('${CODEX_PLUGIN_ROOT}/versions.json','utf8')).sdkVersion||'latest')}catch{console.log('latest')}")
21
- npm i -g @a5c-ai/babysitter-sdk@$SDK_VERSION
22
-
23
- CLI="npx -y @a5c-ai/babysitter-sdk@$SDK_VERSION"
30
+ SDK_VERSION=$(node -e "try{console.log(JSON.parse(require('fs').readFileSync('${PLUGIN_ROOT}/versions.json','utf8')).sdkVersion||'latest')}catch{console.log('latest')}")
31
+ npm i -g @a5c-ai/babysitter-sdk@$SDK_VERSION || npm i -g @a5c-ai/babysitter-sdk@latest
32
+
33
+ if command -v babysitter >/dev/null 2>&1 && babysitter --version >/dev/null 2>&1; then
34
+ CLI="babysitter"
35
+ else
36
+ CLI="npm exec --yes --package @a5c-ai/babysitter-sdk@$SDK_VERSION -- babysitter"
37
+ fi
24
38
  ```
25
39
 
26
- If `babysitter` is already installed globally at the correct version, you may use `CLI="babysitter"` instead.
40
+ If the pinned version fails to install (e.g. not yet published), the fallback installs `latest`.
41
+
42
+ If a stale or broken global shim fails with `MODULE_NOT_FOUND`, repair it with `npm rm -g @a5c-ai/babysitter @a5c-ai/babysitter-sdk && npm i -g @a5c-ai/babysitter-sdk@$SDK_VERSION`, then re-run `babysitter --version`.
27
43
 
28
44
  ### jq
29
45
 
@@ -31,13 +47,13 @@ Make sure `jq` is installed and available in the path. If not, install it.
31
47
 
32
48
  ## Instructions
33
49
 
34
- Run the following command to get full orchestration instructions:
50
+ Run the following command to get full instructions:
35
51
 
36
52
  ```bash
37
53
  $CLI instructions:babysit-skill --harness codex --interactive
38
54
  ```
39
55
 
40
- For non-interactive runs (e.g., with `-p` flag or no question tool):
56
+ For non-interactive mode (running with `-p` flag or no AskUserQuestion tool):
41
57
 
42
58
  ```bash
43
59
  $CLI instructions:babysit-skill --harness codex --no-interactive
@@ -0,0 +1,66 @@
1
+ ---
2
+ name: blueprints
3
+ description: manage Babysitter blueprints. Use this command to list installed blueprints, browse marketplaces, install, update, uninstall, configure, or create a new blueprint.
4
+ ---
5
+
6
+ # blueprints
7
+
8
+ This command installs and manages Babysitter blueprints. A blueprint is a version-managed package of contextual instructions or deterministic Babysitter processes, not a conventional software plugin.
9
+
10
+ If the command is run without arguments, list installed blueprints with their name, version, marketplace, installation date, and last update date. Also list configured marketplaces and show how to add the default marketplace when none exist.
11
+
12
+ Blueprints can be installed at two scopes:
13
+
14
+ - **global** (`--global`): stored under `~/.a5c/`, available for all projects
15
+ - **project** (`--project`): stored under `<projectDir>/.a5c/`, project-specific
16
+
17
+ ## Marketplace Management
18
+
19
+ Marketplaces are git repositories containing a `marketplace.json` manifest and blueprint package directories. The SDK clones new marketplaces to `.a5c/blueprints/marketplaces/` for the selected scope and reads legacy `.a5c/marketplaces/` clones for compatibility.
20
+
21
+ ### Add a marketplace
22
+
23
+ ```bash
24
+ babysitter blueprints:add-marketplace --marketplace-url <url> [--marketplace-path <relative-path>] [--marketplace-branch <ref>] [--force] --global|--project [--json]
25
+ ```
26
+
27
+ ### Update a marketplace
28
+
29
+ ```bash
30
+ babysitter blueprints:update-marketplace --marketplace-name <name> [--marketplace-branch <ref>] --global|--project [--json]
31
+ ```
32
+
33
+ ### List blueprints in a marketplace
34
+
35
+ ```bash
36
+ babysitter blueprints:list-plugins --marketplace-name <name> --global|--project [--json]
37
+ ```
38
+
39
+ ## Blueprint Lifecycle
40
+
41
+ For `blueprint:install`, `blueprint:update`, `blueprint:configure`, and `blueprint:list-plugins`, the `--marketplace-name` flag is auto-detected when only one marketplace is cloned for the selected scope.
42
+
43
+ ```bash
44
+ babysitter blueprints:install --plugin-name <name> [--marketplace-name <mp>] --global|--project [--json]
45
+ babysitter blueprints:update --plugin-name <name> --marketplace-name <mp> --global|--project [--json]
46
+ babysitter blueprints:configure --plugin-name <name> --marketplace-name <mp> --global|--project [--json]
47
+ babysitter blueprints:uninstall --plugin-name <name> --marketplace-name <mp> --global|--project [--json]
48
+ ```
49
+
50
+ The `--plugin-name` flag is preserved for CLI compatibility with existing marketplace manifests. User-facing docs should call the installable a blueprint.
51
+
52
+ ## Registry Management
53
+
54
+ ```bash
55
+ babysitter blueprints:list-installed --global|--project [--json]
56
+ babysitter blueprints:update-registry --plugin-name <name> --plugin-version <ver> --marketplace-name <mp> --global|--project [--json]
57
+ babysitter blueprints:remove-from-registry --plugin-name <name> --global|--project [--json]
58
+ ```
59
+
60
+ ## Deprecated Aliases
61
+
62
+ The old `plugin:*` commands remain available as deprecated aliases for one release. Prefer `blueprint:*` in new docs, skills, and process instructions.
63
+
64
+ ## Agent Plugins Are Separate
65
+
66
+ Do not rename or reinterpret agent harness plugins while handling blueprints. `CLAUDE_PLUGIN_ROOT`, `PI_PLUGIN_ROOT`, `.claude/plugins/`, hooks-adapter, extensions-adapter, and agent plugin manifests stay plugin-specific.
@@ -5,4 +5,8 @@ description: Orchestrate a babysitter run. use this command to start babysitting
5
5
 
6
6
  # call
7
7
 
8
- Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md).
8
+ Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md). Then continue executing the returned instructions in this same turn. Do not stop after the Skill tool returns; carry the requested run through to completion proof.
9
+
10
+ User arguments for this command:
11
+
12
+ $ARGUMENTS