@a5c-ai/babysitter-omp 5.0.1-staging.e4f17eff → 5.0.1-staging.ee474eb45ea7

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 (44) hide show
  1. package/README.md +2 -2
  2. package/bin/cli.cjs +43 -17
  3. package/bin/install-shared.cjs +219 -0
  4. package/bin/install.cjs +18 -33
  5. package/bin/uninstall.cjs +15 -11
  6. package/commands/call.md +7 -7
  7. package/commands/cleanup.md +30 -8
  8. package/commands/contrib.md +31 -31
  9. package/commands/doctor.md +7 -8
  10. package/commands/forever.md +6 -6
  11. package/commands/help.md +3 -2
  12. package/commands/observe.md +1 -1
  13. package/commands/plan.md +7 -7
  14. package/commands/plugins.md +249 -249
  15. package/commands/project-install.md +10 -10
  16. package/commands/resume.md +8 -8
  17. package/commands/retrospect.md +55 -55
  18. package/commands/user-install.md +10 -10
  19. package/commands/yolo.md +7 -7
  20. package/package.json +9 -15
  21. package/scripts/create-release-tag.mjs +18 -0
  22. package/scripts/publish-from-tag.mjs +41 -0
  23. package/scripts/team-install.cjs +23 -0
  24. package/skills/cleanup/SKILL.md +30 -8
  25. package/skills/contrib/SKILL.md +25 -25
  26. package/skills/doctor/SKILL.md +7 -8
  27. package/skills/help/SKILL.md +3 -2
  28. package/skills/observe/SKILL.md +1 -1
  29. package/skills/plugins/SKILL.md +243 -243
  30. package/skills/project-install/SKILL.md +3 -3
  31. package/skills/resume/SKILL.md +1 -1
  32. package/skills/retrospect/SKILL.md +48 -48
  33. package/skills/user-install/SKILL.md +3 -3
  34. package/versions.json +2 -1
  35. package/extensions/index.legacy.ts +0 -55
  36. package/hooks/babysitter-proxied-before-provider-request.js +0 -167
  37. package/hooks/babysitter-proxied-context.js +0 -165
  38. package/hooks/babysitter-proxied-session-start.js +0 -227
  39. package/hooks/babysitter-proxied-stop.js +0 -179
  40. package/hooks/babysitter-proxied-tool-call.js +0 -166
  41. package/hooks/hooks.json +0 -46
  42. package/hooks/proxied-hooks.json +0 -47
  43. package/scripts/setup.sh +0 -74
  44. package/scripts/sync-command-docs.cjs +0 -108
package/README.md CHANGED
@@ -62,7 +62,7 @@ driver, custom tools, or direct run mutation logic.
62
62
  ## Plugin Layout
63
63
 
64
64
  ```text
65
- plugins/babysitter-omp/
65
+ artifacts/generated-plugins/oh-my-pi/
66
66
  |-- package.json
67
67
  |-- versions.json
68
68
  |-- extensions/
@@ -116,7 +116,7 @@ omp plugin uninstall @a5c-ai/babysitter-omp
116
116
  ## Tests
117
117
 
118
118
  ```bash
119
- cd plugins/babysitter-omp
119
+ cd artifacts/generated-plugins/oh-my-pi
120
120
  npm test
121
121
  ```
122
122
 
package/bin/cli.cjs CHANGED
@@ -5,45 +5,51 @@ const path = require('path');
5
5
  const { spawnSync } = require('child_process');
6
6
 
7
7
  const PACKAGE_ROOT = path.resolve(__dirname, '..');
8
+ let shared;
9
+ try { shared = require('./install-shared'); } catch {}
8
10
 
9
11
  function printUsage() {
10
12
  console.error([
11
13
  'Usage:',
12
14
  ' babysitter-omp install [--global]',
13
15
  ' babysitter-omp install --workspace [path]',
14
- ' babysitter-omp uninstall [--global]',
15
16
  ' babysitter-omp uninstall',
16
17
  ].join('\n'));
17
18
  }
18
19
 
19
- function parseArgs(argv) {
20
+ function parseInstallArgs(argv) {
21
+ let scope = 'global';
20
22
  let workspace = null;
23
+ const passthrough = [];
21
24
 
22
25
  for (let i = 0; i < argv.length; i += 1) {
23
26
  const arg = argv[i];
27
+ if (arg === '--global') {
28
+ scope = 'global';
29
+ continue;
30
+ }
24
31
  if (arg === '--workspace') {
32
+ scope = 'workspace';
25
33
  const next = argv[i + 1];
26
- workspace = next && !next.startsWith('-') ? path.resolve(next) : process.cwd();
27
34
  if (next && !next.startsWith('-')) {
35
+ workspace = path.resolve(next);
28
36
  i += 1;
37
+ } else {
38
+ workspace = process.cwd();
29
39
  }
30
40
  continue;
31
41
  }
32
- if (arg === '--global') {
33
- workspace = null;
34
- continue;
35
- }
36
- throw new Error(`unknown argument: ${arg}`);
42
+ passthrough.push(arg);
37
43
  }
38
44
 
39
- return { workspace };
45
+ return { scope, workspace, passthrough };
40
46
  }
41
47
 
42
- function runNodeScript(scriptPath, args) {
48
+ function runNodeScript(scriptPath, args, extraEnv = {}) {
43
49
  const result = spawnSync(process.execPath, [scriptPath, ...args], {
44
50
  cwd: process.cwd(),
45
51
  stdio: 'inherit',
46
- env: process.env,
52
+ env: { ...process.env, ...extraEnv },
47
53
  });
48
54
  process.exitCode = result.status ?? 1;
49
55
  }
@@ -56,15 +62,35 @@ function main() {
56
62
  return;
57
63
  }
58
64
 
59
- if (command !== 'install' && command !== 'uninstall') {
60
- printUsage();
61
- process.exitCode = 1;
65
+ if (command === 'install') {
66
+ if (shared && typeof shared.harnessCliRoute === 'function' && shared.harnessCliRoute(rest, PACKAGE_ROOT, runNodeScript)) {
67
+ return;
68
+ }
69
+ const parsed = parseInstallArgs(rest);
70
+ if (parsed.scope === 'workspace') {
71
+ const args = [];
72
+ if (parsed.workspace) {
73
+ args.push('--workspace', parsed.workspace);
74
+ }
75
+ args.push(...parsed.passthrough);
76
+ runNodeScript(
77
+ path.join(PACKAGE_ROOT, 'scripts', 'team-install.cjs'),
78
+ args,
79
+ { PLUGIN_PACKAGE_ROOT: PACKAGE_ROOT },
80
+ );
81
+ return;
82
+ }
83
+ runNodeScript(path.join(PACKAGE_ROOT, 'bin', 'install.cjs'), parsed.passthrough);
84
+ return;
85
+ }
86
+
87
+ if (command === 'uninstall') {
88
+ runNodeScript(path.join(PACKAGE_ROOT, 'bin', 'uninstall.cjs'), rest);
62
89
  return;
63
90
  }
64
91
 
65
- const parsed = parseArgs(rest);
66
- const args = parsed.workspace ? ['--workspace', parsed.workspace] : ['--global'];
67
- runNodeScript(path.join(PACKAGE_ROOT, 'bin', `${command}.cjs`), args);
92
+ printUsage();
93
+ process.exitCode = 1;
68
94
  }
69
95
 
70
96
  main();
@@ -0,0 +1,219 @@
1
+ 'use strict';
2
+
3
+ const fs = require('fs');
4
+ const os = require('os');
5
+ const path = require('path');
6
+ const { spawnSync } = require('child_process');
7
+
8
+ const PLUGIN_NAME = "babysitter";
9
+ const PLUGIN_CATEGORY = 'Coding';
10
+
11
+ function getUserHome() {
12
+ return os.homedir();
13
+ }
14
+
15
+ function getHarnessHome() {
16
+ return path.join(os.homedir(), '.a5c');
17
+ }
18
+
19
+ function getHomePluginRoot(scope) {
20
+ if (scope === 'workspace') return path.join(process.cwd(), '.a5c', 'plugins', PLUGIN_NAME);
21
+ return path.join(path.join(getHarnessHome(), 'plugins'), PLUGIN_NAME);
22
+ }
23
+
24
+ function getHomeMarketplacePath() {
25
+ return path.join(getHarnessHome(), 'plugins', 'marketplace.json');
26
+ }
27
+
28
+ function writeFileIfChanged(filePath, contents) {
29
+ try {
30
+ const existing = fs.readFileSync(filePath, 'utf8');
31
+ if (existing === contents) return false;
32
+ } catch {}
33
+ fs.mkdirSync(path.dirname(filePath), { recursive: true });
34
+ fs.writeFileSync(filePath, contents);
35
+ return true;
36
+ }
37
+
38
+ function copyRecursive(src, dest) {
39
+ fs.mkdirSync(dest, { recursive: true });
40
+ for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
41
+ if (entry.name === 'node_modules' || entry.name === '.git') continue;
42
+ const s = path.join(src, entry.name);
43
+ const d = path.join(dest, entry.name);
44
+ if (entry.isDirectory()) {
45
+ copyRecursive(s, d);
46
+ } else {
47
+ fs.copyFileSync(s, d);
48
+ }
49
+ }
50
+ }
51
+
52
+ function copyPluginBundle(packageRoot, pluginRoot) {
53
+ const bundleEntries = fs.readdirSync(packageRoot).filter(
54
+ e => !['node_modules', '.git', 'test', 'dist'].includes(e)
55
+ );
56
+ fs.mkdirSync(pluginRoot, { recursive: true });
57
+ for (const entry of bundleEntries) {
58
+ const src = path.join(packageRoot, entry);
59
+ const dest = path.join(pluginRoot, entry);
60
+ const stat = fs.statSync(src);
61
+ if (stat.isDirectory()) {
62
+ copyRecursive(src, dest);
63
+ } else {
64
+ fs.copyFileSync(src, dest);
65
+ }
66
+ }
67
+ }
68
+
69
+ function readJson(filePath) {
70
+ try {
71
+ return JSON.parse(fs.readFileSync(filePath, 'utf8'));
72
+ } catch {
73
+ return null;
74
+ }
75
+ }
76
+
77
+ function writeJson(filePath, value) {
78
+ fs.mkdirSync(path.dirname(filePath), { recursive: true });
79
+ fs.writeFileSync(filePath, JSON.stringify(value, null, 2) + '\n');
80
+ }
81
+
82
+ function ensureExecutable(filePath) {
83
+ try {
84
+ fs.chmodSync(filePath, 0o755);
85
+ } catch {}
86
+ }
87
+
88
+ function normalizeMarketplaceSourcePath(source, marketplacePath) {
89
+ if (typeof source === 'string') {
90
+ return path.relative(path.dirname(marketplacePath), source).replace(/\\/g, '/');
91
+ }
92
+ return source;
93
+ }
94
+
95
+ function ensureMarketplaceEntry(marketplacePath, pluginRoot) {
96
+ let marketplace = readJson(marketplacePath) || {
97
+ name: "a5c.ai",
98
+ plugins: [],
99
+ };
100
+ if (!Array.isArray(marketplace.plugins)) marketplace.plugins = [];
101
+ const idx = marketplace.plugins.findIndex(p => p.name === PLUGIN_NAME);
102
+ const relSource = './' + normalizeMarketplaceSourcePath(pluginRoot, marketplacePath);
103
+ const entry = {
104
+ name: PLUGIN_NAME,
105
+ source: relSource,
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.1-staging.ee474eb45ea7",
108
+ author: { name: "a5c.ai" },
109
+ };
110
+ if (idx >= 0) marketplace.plugins[idx] = entry;
111
+ else marketplace.plugins.push(entry);
112
+ writeJson(marketplacePath, marketplace);
113
+ }
114
+
115
+ function removeMarketplaceEntry(marketplacePath) {
116
+ const marketplace = readJson(marketplacePath);
117
+ if (!marketplace || !Array.isArray(marketplace.plugins)) return;
118
+ marketplace.plugins = marketplace.plugins.filter(p => p.name !== PLUGIN_NAME);
119
+ writeJson(marketplacePath, marketplace);
120
+ }
121
+
122
+ function warnWindowsHooks() {
123
+ if (process.platform === 'win32') {
124
+ console.warn('[' + PLUGIN_NAME + '] Windows detected — shell hooks (.sh) require Git Bash or WSL.');
125
+ }
126
+ }
127
+
128
+ function runPostInstall(pluginRoot) {
129
+ const postInstall = path.join(pluginRoot, 'scripts', 'post-install.js');
130
+ if (fs.existsSync(postInstall)) {
131
+ spawnSync(process.execPath, [postInstall], {
132
+ cwd: pluginRoot, stdio: 'inherit',
133
+ env: { ...process.env, PLUGIN_ROOT: pluginRoot },
134
+ });
135
+ }
136
+ }
137
+
138
+ function getGlobalStateDir() {
139
+ return process.env.BABYSITTER_GLOBAL_STATE_DIR || path.join(getUserHome(), '.a5c');
140
+ }
141
+
142
+ function resolveCliCommand(packageRoot) {
143
+ try {
144
+ const result = spawnSync('babysitter', ['--version'], { stdio: 'pipe', timeout: 10000 });
145
+ if (result.status === 0) return 'babysitter';
146
+ } catch {}
147
+ const versionsPath = path.join(packageRoot, 'versions.json');
148
+ const versions = readJson(versionsPath) || {};
149
+ const ver = versions.sdkVersion || 'latest';
150
+ return `npx -y @a5c-ai/babysitter-sdk@${ver}`;
151
+ }
152
+
153
+ function runCli(packageRoot, cliArgs, options = {}) {
154
+ const cmd = resolveCliCommand(packageRoot);
155
+ const parts = cmd.split(' ');
156
+ const result = spawnSync(parts[0], [...parts.slice(1), ...cliArgs], {
157
+ stdio: options.stdio || 'inherit',
158
+ timeout: options.timeout || 120000,
159
+ cwd: options.cwd || process.cwd(),
160
+ env: { ...process.env, ...options.env },
161
+ });
162
+ return result;
163
+ }
164
+
165
+ function ensureGlobalProcessLibrary(packageRoot) {
166
+ const stateDir = getGlobalStateDir();
167
+ const activeFile = path.join(stateDir, 'active', 'process-library.json');
168
+ let active = readJson(activeFile);
169
+ if (active && active.binding && active.binding.dir) {
170
+ return active;
171
+ }
172
+ const defaultSpec = readJson(path.join(stateDir, 'process-library-defaults.json'));
173
+ const cloneDir = defaultSpec && defaultSpec.cloneDir
174
+ ? defaultSpec.cloneDir
175
+ : path.join(stateDir, 'process-library', PLUGIN_NAME + '-repo');
176
+ runCli(packageRoot, [
177
+ 'process-library:clone',
178
+ '--dir', cloneDir,
179
+ '--state-dir', stateDir,
180
+ '--json',
181
+ ], { stdio: 'pipe' });
182
+ runCli(packageRoot, [
183
+ 'process-library:use',
184
+ '--dir', cloneDir,
185
+ '--state-dir', stateDir,
186
+ '--json',
187
+ ], { stdio: 'pipe' });
188
+ active = readJson(activeFile);
189
+ return {
190
+ binding: active && active.binding ? active.binding : { dir: cloneDir },
191
+ defaultSpec: defaultSpec || { cloneDir },
192
+ stateFile: activeFile,
193
+ };
194
+ }
195
+
196
+
197
+ module.exports = {
198
+ PLUGIN_NAME,
199
+ PLUGIN_CATEGORY,
200
+ getUserHome,
201
+ getHarnessHome,
202
+ getHomePluginRoot,
203
+ getHomeMarketplacePath,
204
+ writeFileIfChanged,
205
+ copyRecursive,
206
+ copyPluginBundle,
207
+ readJson,
208
+ writeJson,
209
+ ensureExecutable,
210
+ normalizeMarketplaceSourcePath,
211
+ ensureMarketplaceEntry,
212
+ removeMarketplaceEntry,
213
+ warnWindowsHooks,
214
+ runPostInstall,
215
+ getGlobalStateDir,
216
+ resolveCliCommand,
217
+ runCli,
218
+ ensureGlobalProcessLibrary,
219
+ };
package/bin/install.cjs CHANGED
@@ -1,45 +1,30 @@
1
1
  #!/usr/bin/env node
2
2
  'use strict';
3
3
 
4
- const fs = require('fs');
5
4
  const path = require('path');
6
- const { spawnSync } = require('child_process');
5
+ const shared = require('./install-shared');
7
6
 
8
7
  const PACKAGE_ROOT = path.resolve(__dirname, '..');
9
- const PACKAGE_JSON = JSON.parse(fs.readFileSync(path.join(PACKAGE_ROOT, 'package.json'), 'utf8'));
10
8
 
11
- function parseArgs(argv) {
12
- let workspace = null;
13
- for (let i = 2; i < argv.length; i += 1) {
14
- const arg = argv[i];
15
- if (arg === '--workspace') {
16
- const next = argv[i + 1];
17
- workspace = next && !next.startsWith('-') ? path.resolve(argv[++i]) : process.cwd();
18
- continue;
19
- }
20
- if (arg === '--global') {
21
- workspace = null;
22
- continue;
9
+ function main() {
10
+ const pluginRoot = shared.getHomePluginRoot();
11
+ const marketplacePath = shared.getHomeMarketplacePath();
12
+
13
+ console.log(`[${shared.PLUGIN_NAME}] Installing plugin to ${pluginRoot}`);
14
+
15
+ try {
16
+ shared.copyPluginBundle(PACKAGE_ROOT, pluginRoot);
17
+ shared.ensureMarketplaceEntry(marketplacePath, pluginRoot);
18
+ if (typeof shared.harnessInstall === 'function') {
19
+ shared.harnessInstall(PACKAGE_ROOT, pluginRoot);
23
20
  }
24
- throw new Error(`unknown argument: ${arg}`);
21
+ shared.runPostInstall && shared.runPostInstall(pluginRoot);
22
+ console.log(`[${shared.PLUGIN_NAME}] Installation complete!`);
23
+ console.log(`[${shared.PLUGIN_NAME}] Restart your IDE/CLI to pick up the plugin.`);
24
+ } catch (err) {
25
+ console.error(`[${shared.PLUGIN_NAME}] Failed to install: ${err.message}`);
26
+ process.exitCode = 1;
25
27
  }
26
- return { workspace };
27
- }
28
-
29
- function main() {
30
- const { workspace } = parseArgs(process.argv);
31
- const result = workspace
32
- ? spawnSync('omp', ['plugin', 'link', path.resolve(workspace, 'plugins', 'babysitter-omp')], {
33
- cwd: workspace,
34
- stdio: 'inherit',
35
- env: process.env,
36
- })
37
- : spawnSync('omp', ['plugin', 'install', `${PACKAGE_JSON.name}@${PACKAGE_JSON.version}`], {
38
- cwd: process.cwd(),
39
- stdio: 'inherit',
40
- env: process.env,
41
- });
42
- process.exitCode = result.status ?? 1;
43
28
  }
44
29
 
45
30
  main();
package/bin/uninstall.cjs CHANGED
@@ -2,19 +2,23 @@
2
2
  'use strict';
3
3
 
4
4
  const fs = require('fs');
5
- const path = require('path');
6
- const { spawnSync } = require('child_process');
7
-
8
- const PACKAGE_ROOT = path.resolve(__dirname, '..');
9
- const PACKAGE_JSON = JSON.parse(fs.readFileSync(path.join(PACKAGE_ROOT, 'package.json'), 'utf8'));
5
+ const shared = require('./install-shared');
10
6
 
11
7
  function main() {
12
- const result = spawnSync('omp', ['plugin', 'uninstall', PACKAGE_JSON.name], {
13
- cwd: process.cwd(),
14
- stdio: 'inherit',
15
- env: process.env,
16
- });
17
- process.exitCode = result.status ?? 1;
8
+ const pluginRoot = shared.getHomePluginRoot();
9
+
10
+ if (!fs.existsSync(pluginRoot)) {
11
+ console.log(`[${shared.PLUGIN_NAME}] Plugin not installed at ${pluginRoot}`);
12
+ return;
13
+ }
14
+
15
+ try {
16
+ fs.rmSync(pluginRoot, { recursive: true, force: true });
17
+ console.log(`[${shared.PLUGIN_NAME}] Uninstalled from ${pluginRoot}`);
18
+ } catch (err) {
19
+ console.error(`[${shared.PLUGIN_NAME}] Failed to uninstall: ${err.message}`);
20
+ process.exitCode = 1;
21
+ }
18
22
  }
19
23
 
20
24
  main();
package/commands/call.md CHANGED
@@ -1,7 +1,7 @@
1
- ---
2
- description: Orchestrate a babysitter run. use this command to start babysitting a complex workflow.
3
- argument-hint: Specific instructions for the run.
4
- allowed-tools: Read, Grep, Write, Task, Bash, Edit, Grep, Glob, WebFetch, WebSearch, Search, AskUserQuestion, TodoWrite, TodoRead, Skill, BashOutput, KillShell, MultiEdit, LS
5
- ---
6
-
7
- Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md).
1
+ ---
2
+ description: Orchestrate a babysitter run. use this command to start babysitting a complex workflow.
3
+ argument-hint: Specific instructions for the run.
4
+ allowed-tools: Read, Grep, Write, Task, Bash, Edit, Grep, Glob, WebFetch, WebSearch, Search, AskUserQuestion, TodoWrite, TodoRead, Skill, BashOutput, KillShell, MultiEdit, LS
5
+ ---
6
+
7
+ Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md).
@@ -10,11 +10,33 @@ Create and run a cleanup process using the process at `skills\babysit\process\cr
10
10
 
11
11
  Implementation notes (for the process):
12
12
  - Parse arguments for `--dry-run` flag (if present, set dryRun: true in inputs) and `--keep-days N` (default: 7)
13
- - The process scans .a5c/runs/ for completed/failed runs, aggregates insights, writes summaries, then removes old data
14
- - Always show the user what will be removed before removing (in interactive mode via breakpoints)
15
- - In non-interactive mode (yolo), proceed with cleanup using defaults
16
- - The insights file goes to docs/run-history-insights.md
17
- - Only remove terminal runs (completed/failed) older than the keep-days threshold
18
- - Never remove active/in-progress runs
19
- - Remove orphaned process files not referenced by remaining runs
20
- - After cleanup, show remaining run count and disk usage
13
+
14
+ CRITICAL: The cleanup MUST follow this exact phase order. Do NOT delete any run before Phase 2 completes.
15
+
16
+ Phase 1 Scan:
17
+ - Scan .a5c/runs/ for all runs
18
+ - Classify each as terminal (completed/failed) or active (in-progress/created)
19
+ - Identify terminal runs older than the keep-days threshold as removal candidates
20
+ - Never mark active/in-progress runs for removal
21
+ - Count and report: total runs, terminal, active, removal candidates, disk usage
22
+
23
+ Phase 2 — Aggregate insights (BEFORE any deletion):
24
+ - For EVERY removal candidate, read its run.json and journal/ events
25
+ - Extract: processId, prompt, status, event count, created date, task summaries
26
+ - Group by process type and extract patterns (retry counts, convergence behavior, failure modes)
27
+ - Append a new dated section to docs/run-history-insights.md with:
28
+ - Summary statistics (runs removed, disk freed, runs retained)
29
+ - Run categories with counts and descriptions
30
+ - Key patterns observed (multi-batch convergence, retry behavior, etc.)
31
+ - What worked well / what didn't from the run data
32
+ - This file MUST be written and verified before proceeding to Phase 3
33
+
34
+ Phase 3 — Confirm removal:
35
+ - In interactive mode, show the user what will be removed via a breakpoint
36
+ - In non-interactive mode (yolo), proceed with defaults
37
+ - In dry-run mode, stop here and show what would be removed
38
+
39
+ Phase 4 — Remove:
40
+ - Delete the terminal runs older than keep-days threshold
41
+ - Identify and remove orphaned process files not referenced by remaining runs
42
+ - Show remaining run count and disk usage after cleanup
@@ -1,33 +1,33 @@
1
- ---
2
- description: Submit feedback or contribute to babysitter project
3
- argument-hint: Specific instructions for the run.
4
- allowed-tools: Read, Grep, Write, Task, Bash, Edit, Grep, Glob, WebFetch, WebSearch, Search, AskUserQuestion, TodoWrite, TodoRead, Skill, BashOutput, KillShell, MultiEdit, LS
5
- ---
6
-
7
- Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md).
8
-
9
- ## Process Routing
10
-
1
+ ---
2
+ description: Submit feedback or contribute to babysitter project
3
+ argument-hint: Specific instructions for the run.
4
+ allowed-tools: Read, Grep, Write, Task, Bash, Edit, Grep, Glob, WebFetch, WebSearch, Search, AskUserQuestion, TodoWrite, TodoRead, Skill, BashOutput, KillShell, MultiEdit, LS
5
+ ---
6
+
7
+ Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md).
8
+
9
+ ## Process Routing
10
+
11
11
  Contribution processes live under the active process library's `cradle/` directory. Resolve the active library root with `babysitter process-library:active --json` and route based on arguments:
12
-
13
- ### Issue-based (opens a GitHub issue in a5c-ai/babysitter)
14
- * **Bug report** → `cradle/bug-report.js#process` — Report a bug in the SDK, CLI, process library, etc.
15
- * **Feature request** → `cradle/feature-request.js#process` — Request a new feature or enhancement
16
- * **Documentation question** → `cradle/documentation-question.js#process` — Ask about undocumented behavior or missing docs
17
-
18
- ### PR-based (forks repo, creates branch, submits PR to a5c-ai/babysitter)
19
- * **Bugfix** → `cradle/bugfix.js#process` — User already has the fix for a bug
20
- * **Feature implementation** → `cradle/feature-implementation-contribute.js#process` — User already has a feature implementation
21
- * **Harness integration** → `cradle/feature-harness-integration-contribute.js#process` — User has a harness (CI/CD, IDE, editor) integration
22
- * **Library contribution** → `cradle/library-contribution.js#process` — New or improved process/skill/subagent for the library
23
- * **Documentation answer** → `cradle/documentation-contribute-answer.js#process` — User has an answer for an unanswered docs question
24
-
25
- ### Router (when arguments are empty or general)
26
- * **Contribute** → `cradle/contribute.js#process` — Explains contribution types and routes to the specific process
27
-
28
- ## Contribution Rules
29
-
30
- * PR-based contributions: fork the babysitter repo (a5c-ai/babysitter) for the user, ask to star if not already starred, perform changes, submit PR
31
- * Issue-based contributions: gather details, search for duplicates, review, then open an issue in a5c-ai/babysitter
32
- * Add breakpoints (permissions) before ALL gh actions (fork, star, submit PR/issue) to allow user review and cancellation
12
+
13
+ ### Issue-based (opens a GitHub issue in a5c-ai/babysitter)
14
+ * **Bug report** → `cradle/bug-report.js#process` — Report a bug in the SDK, CLI, process library, etc.
15
+ * **Feature request** → `cradle/feature-request.js#process` — Request a new feature or enhancement
16
+ * **Documentation question** → `cradle/documentation-question.js#process` — Ask about undocumented behavior or missing docs
17
+
18
+ ### PR-based (forks repo, creates branch, submits PR to a5c-ai/babysitter)
19
+ * **Bugfix** → `cradle/bugfix.js#process` — User already has the fix for a bug
20
+ * **Feature implementation** → `cradle/feature-implementation-contribute.js#process` — User already has a feature implementation
21
+ * **Harness integration** → `cradle/feature-harness-integration-contribute.js#process` — User has a harness (CI/CD, IDE, editor) integration
22
+ * **Library contribution** → `cradle/library-contribution.js#process` — New or improved process/skill/subagent for the library
23
+ * **Documentation answer** → `cradle/documentation-contribute-answer.js#process` — User has an answer for an unanswered docs question
24
+
25
+ ### Router (when arguments are empty or general)
26
+ * **Contribute** → `cradle/contribute.js#process` — Explains contribution types and routes to the specific process
27
+
28
+ ## Contribution Rules
29
+
30
+ * PR-based contributions: fork the babysitter repo (a5c-ai/babysitter) for the user, ask to star if not already starred, perform changes, submit PR
31
+ * Issue-based contributions: gather details, search for duplicates, review, then open an issue in a5c-ai/babysitter
32
+ * Add breakpoints (permissions) before ALL gh actions (fork, star, submit PR/issue) to allow user review and cancellation
33
33
  * If arguments are empty: use the `contribute.js` router process to show options and route accordingly
@@ -156,7 +156,6 @@ If it exists:
156
156
  **Goal:** Inspect babysitter session files for health and detect runaway loops.
157
157
 
158
158
  - Search for session state files using Glob:
159
- - `plugins/babysitter/skills/babysit/state/*.md`
160
159
  - `.a5c/state/*.md`
161
160
  - `.a5c/state/*.json`
162
161
  - For each session state file found:
@@ -260,7 +259,7 @@ Mark as PASS if total size < 500MB and no files > 10MB. Mark as WARN if total si
260
259
 
261
260
  ### 10a. Hook Registration
262
261
 
263
- - Locate the plugin root. Check for `CLAUDE_PLUGIN_ROOT` env var, or search for `plugins/babysitter/hooks/hooks.json` by walking up from the current directory.
262
+ - Locate the plugin root. Check for `CLAUDE_PLUGIN_ROOT` env var first, or search for a babysitter `hooks.json` by walking up from the current directory.
264
263
  - If found, read `hooks.json` and verify:
265
264
  - A `Stop` hook entry exists with a command referencing `babysitter-stop-hook.sh`.
266
265
  - A `SessionStart` hook entry exists with a command referencing `babysitter-session-start-hook.sh`.
@@ -315,7 +314,7 @@ If the stop hook shows NO evidence of execution (no log entries, no journal even
315
314
 
316
315
  Perform these diagnostic steps in order and report the first failure found:
317
316
 
318
- 1. **Plugin not installed**: Check if `plugins/babysitter/` exists relative to the project root and if `CLAUDE_PLUGIN_ROOT` is set. If the plugin directory doesn't exist, report: "Plugin not installed — the babysitter plugin directory is missing."
317
+ 1. **Plugin not installed**: Check if `CLAUDE_PLUGIN_ROOT` is set or if a babysitter plugin directory exists relative to the project root. If neither exists, report: "Plugin not installed — the babysitter plugin directory is missing."
319
318
 
320
319
  2. **Plugin not enabled**: Check for Claude settings files:
321
320
  - `~/.claude/settings.json` — look for `babysitter` in `enabledPlugins`.
@@ -362,13 +361,13 @@ Mark as FAIL if:
362
361
  - Parse the output and inspect the `resolvedFrom` field. Classify as follows:
363
362
  - `resolvedFrom: "pid-marker"` → mark as PASS ("Session ID derives from the live Claude Code ancestor process -- authoritative").
364
363
  - `resolvedFrom: "env-file"` → mark as PASS with a note ("CLAUDE_ENV_FILE was used; typically healthy").
365
- - `resolvedFrom: "env-var"` → mark as WARN ("`BABYSITTER_SESSION_ID` is set without a corroborating PID marker. Likely stale from a prior Claude Code session -- see GitHub issue #130").
366
- - Remediation: run `babysitter session:cleanup` and start a fresh Claude Code session, or `unset BABYSITTER_SESSION_ID` before invoking babysitter.
364
+ - `resolvedFrom: "env-var"` → mark as WARN ("`AGENT_SESSION_ID` is set without a corroborating PID marker. Likely stale from a prior Claude Code session -- see GitHub issue #130").
365
+ - Remediation: run `babysitter session:cleanup` and start a fresh Claude Code session, or `unset AGENT_SESSION_ID` before invoking babysitter.
367
366
  - `resolvedFrom: "none"` → mark as ERROR ("No session ID resolvable. Either no session-start hook fired, or the ancestor walk failed").
368
367
 
369
368
  **Env-var shadow check:**
370
369
  - Independently inspect `envVarPresent` and `envVarMatches` in the output.
371
- - If `envVarPresent && !envVarMatches`, mark as WARN ("`BABYSITTER_SESSION_ID` in env does not match the resolved session ID; a stale value is shadowing the authoritative one. Unset the env var").
370
+ - If `envVarPresent && !envVarMatches`, mark as WARN ("`AGENT_SESSION_ID` in env does not match the resolved session ID; a stale value is shadowing the authoritative one. Unset the env var").
372
371
 
373
372
  ---
374
373
 
@@ -390,7 +389,7 @@ Mark as FAIL if:
390
389
 
391
390
  - Enumerate files in `~/.a5c/` matching the pattern `current-session-*-pid-*`.
392
391
  - Count markers per harness (derived from the filename).
393
- - If more than one live marker exists for the same harness, mark as INFO ("Multiple live Claude Code / harness sessions detected; ensure each shell scopes `BABYSITTER_SESSION_ID` appropriately -- the PID marker handles this automatically").
392
+ - If more than one live marker exists for the same harness, mark as INFO ("Multiple live Claude Code / harness sessions detected; ensure each shell scopes `AGENT_SESSION_ID` appropriately -- the PID marker handles this automatically").
394
393
  - Otherwise mark as PASS.
395
394
 
396
395
  ---
@@ -501,7 +500,7 @@ babysitter session:cleanup --dry-run # preview
501
500
  babysitter session:cleanup # apply
502
501
 
503
502
  # 2. Unset a stale env var
504
- unset BABYSITTER_SESSION_ID
503
+ unset AGENT_SESSION_ID
505
504
 
506
505
  # 3. Re-bind a run explicitly if needed
507
506
  babysitter session:resume --session-id <fresh-id> --state-dir ~/.a5c --run-id <runId> --runs-dir .a5c/runs
@@ -1,7 +1,7 @@
1
- ---
2
- description: Use this command to start babysitting a never-ending babysitter run.
3
- argument-hint: Specific instructions for the run.
4
- allowed-tools: Read, Grep, Write, Task, Bash, Edit, Grep, Glob, WebFetch, WebSearch, Search, AskUserQuestion, TodoWrite, TodoRead, Skill, BashOutput, KillShell, MultiEdit, LS
5
- ---
6
-
1
+ ---
2
+ description: Use this command to start babysitting a never-ending babysitter run.
3
+ argument-hint: Specific instructions for the run.
4
+ allowed-tools: Read, Grep, Write, Task, Bash, Edit, Grep, Glob, WebFetch, WebSearch, Search, AskUserQuestion, TodoWrite, TodoRead, Skill, BashOutput, KillShell, MultiEdit, LS
5
+ ---
6
+
7
7
  Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md). but create a process that uses an infinte loop and a ctx.sleep to create a never-ending babysitter loop. an example of such process is a daily process that reads new support ticket every day and tries to resolve them, then sleeps for 4 hours and repeats the process.
package/commands/help.md CHANGED
@@ -230,9 +230,10 @@ SECONDARY COMMANDS
230
230
  effect status in your browser. Useful when running /yolo or /forever to watch
231
231
  progress without interrupting the run.
232
232
 
233
- How it works: Runs npx @yoavmayer/babysitter-observer-dashboard@latest which watches
233
+ How it works: Runs npx @a5c-ai/babysitter-observer-dashboard@latest which watches
234
234
  the .a5c/runs/ directory (or a parent directory containing multiple projects) and
235
- serves a live dashboard. The process is blocking -- it runs until you stop it.
235
+ serves a live dashboard. The process is blocking -- it runs until you stop it, and
236
+ it prints the local URL to share with the user.
236
237
 
237
238
  Example: /babysitter:observe
238
239
  (opens browser showing all runs with live-updating task
@@ -9,4 +9,4 @@ Run the babysitter observer dashboard:
9
9
  1. Determine the watch directory — this is usually the project's container directory (the parent of the project dir), or the current working directory if not specified.
10
10
  2. Launch the dashboard: `npx -y @a5c-ai/babysitter-observer-dashboard@latest --watch-dir <dir>`
11
11
  3. This is a blocking process — it will keep running until stopped.
12
- 4. Open the browser at the URL printed by the dashboard.
12
+ 4. Report the URL printed by the dashboard to the user, then open it in the browser.