@a5c-ai/babysitter-omp 5.0.1-staging.d09ca951 → 5.0.1-staging.d7c7b44ac4e1

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
@@ -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
 
@@ -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.0.1-staging.d7c7b44ac4e1",
108
108
  author: { name: "a5c.ai" },
109
109
  };
110
110
  if (idx >= 0) marketplace.plugins[idx] = entry;
@@ -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`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@a5c-ai/babysitter-omp",
3
- "version": "5.0.1-staging.d09ca951",
3
+ "version": "5.0.1-staging.d7c7b44ac4e1",
4
4
  "type": "module",
5
5
  "description": "Orchestrate complex, multi-step workflows with event-sourced state management, hook-based extensibility, and human-in-the-loop approval — oh-my-pi",
6
6
  "keywords": [
@@ -46,11 +46,10 @@
46
46
  },
47
47
  "repository": {
48
48
  "type": "git",
49
- "url": "git+https://github.com/a5c-ai/babysitter.git",
50
- "directory": "plugins/babysitter-omp"
49
+ "url": "git+https://github.com/a5c-ai/babysitter-omp.git"
51
50
  },
52
- "homepage": "https://github.com/a5c-ai/babysitter/tree/main/plugins/babysitter-omp#readme",
51
+ "homepage": "https://github.com/a5c-ai/babysitter-omp#readme",
53
52
  "bugs": {
54
- "url": "https://github.com/a5c-ai/babysitter/issues"
53
+ "url": "https://github.com/a5c-ai/babysitter-omp/issues"
55
54
  }
56
55
  }
@@ -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]);
File without changes
@@ -157,7 +157,6 @@ If it exists:
157
157
  **Goal:** Inspect babysitter session files for health and detect runaway loops.
158
158
 
159
159
  - Search for session state files using Glob:
160
- - `plugins/babysitter/skills/babysit/state/*.md`
161
160
  - `.a5c/state/*.md`
162
161
  - `.a5c/state/*.json`
163
162
  - For each session state file found:
@@ -261,7 +260,7 @@ Mark as PASS if total size < 500MB and no files > 10MB. Mark as WARN if total si
261
260
 
262
261
  ### 10a. Hook Registration
263
262
 
264
- - 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.
263
+ - 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.
265
264
  - If found, read `hooks.json` and verify:
266
265
  - A `Stop` hook entry exists with a command referencing `babysitter-stop-hook.sh`.
267
266
  - A `SessionStart` hook entry exists with a command referencing `babysitter-session-start-hook.sh`.
@@ -316,7 +315,7 @@ If the stop hook shows NO evidence of execution (no log entries, no journal even
316
315
 
317
316
  Perform these diagnostic steps in order and report the first failure found:
318
317
 
319
- 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."
318
+ 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."
320
319
 
321
320
  2. **Plugin not enabled**: Check for Claude settings files:
322
321
  - `~/.claude/settings.json` — look for `babysitter` in `enabledPlugins`.
package/versions.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
- "sdkVersion": "5.0.1-staging.d09ca951",
3
- "extensionVersion": "5.0.0"
2
+ "sdkVersion": "5.0.1-staging.d7c7b44ac4e1",
3
+ "extensionVersion": "5.0.1-staging.d7c7b44ac4e1"
4
4
  }
@@ -1,108 +0,0 @@
1
- 'use strict';
2
-
3
- const path = require('path');
4
- const {
5
- listMarkdownBasenames,
6
- reportCheckResult,
7
- syncCommandMirrors,
8
- syncSkillsFromCommands,
9
- writeFileIfChanged,
10
- } = require('../../../scripts/plugin-command-sync-lib.cjs');
11
-
12
- const PACKAGE_ROOT = path.resolve(__dirname, '..');
13
- const REPO_ROOT = path.resolve(PACKAGE_ROOT, '..', '..');
14
- const ROOT_COMMANDS = path.join(REPO_ROOT, 'plugins', 'babysitter', 'commands');
15
- const COMMANDS_ROOT = path.join(PACKAGE_ROOT, 'commands');
16
- const SKILLS_ROOT = path.join(PACKAGE_ROOT, 'skills');
17
- const LABEL = 'babysitter-omp sync';
18
-
19
- const BABYSIT_SKILL = `---
20
- name: babysit
21
- description: Orchestrate via @babysitter. Use this skill when asked to babysit a run, orchestrate a process or whenever it is called explicitly. (babysit, babysitter, orchestrate, orchestrate a run, workflow, etc.)
22
- ---
23
-
24
- # babysit
25
-
26
- Orchestrate \`.a5c/runs/<runId>/\` through iterative execution.
27
-
28
- ## Dependencies
29
-
30
- ### Babysitter SDK and CLI
31
-
32
- Read the SDK version from \`versions.json\` to ensure version compatibility:
33
-
34
- \`\`\`bash
35
- PLUGIN_ROOT="\${OMP_PLUGIN_ROOT:-\$(pwd)}"
36
- SDK_VERSION=$(node -e "try{const fs=require('fs');const path=require('path');const pluginRoot=process.env.OMP_PLUGIN_ROOT||process.env.PLUGIN_ROOT||process.cwd();const probes=[path.join(pluginRoot,'versions.json'),path.join(pluginRoot,'plugins','babysitter-omp','versions.json'),path.join(pluginRoot,'node_modules','@a5c-ai','babysitter-omp','versions.json'),path.join(process.cwd(),'node_modules','@a5c-ai','babysitter-omp','versions.json')];for(const probe of probes){if(fs.existsSync(probe)){console.log(JSON.parse(fs.readFileSync(probe,'utf8')).sdkVersion||'latest');process.exit(0)}}console.log('latest')}catch{console.log('latest')}")
37
- npm i -g @a5c-ai/babysitter-sdk@$SDK_VERSION
38
-
39
- CLI="npx -y @a5c-ai/babysitter-sdk@$SDK_VERSION"
40
- \`\`\`
41
-
42
- ## Instructions
43
-
44
- Run the following command to get full orchestration instructions:
45
-
46
- \`\`\`bash
47
- babysitter instructions:babysit-skill --harness oh-my-pi --interactive
48
- \`\`\`
49
-
50
- For non-interactive mode:
51
-
52
- \`\`\`bash
53
- babysitter instructions:babysit-skill --harness oh-my-pi --no-interactive
54
- \`\`\`
55
-
56
- Follow the instructions returned by the command above to orchestrate the run.
57
- `;
58
-
59
- function getCommandNames() {
60
- return listMarkdownBasenames(ROOT_COMMANDS);
61
- }
62
-
63
- function main() {
64
- const check = process.argv.includes('--check');
65
- const commandNames = getCommandNames();
66
- const mirrorResult = syncCommandMirrors({
67
- label: LABEL,
68
- sourceRoot: ROOT_COMMANDS,
69
- targetRoot: COMMANDS_ROOT,
70
- names: commandNames,
71
- check,
72
- cwd: PACKAGE_ROOT,
73
- });
74
- const skillsResult = syncSkillsFromCommands({
75
- label: LABEL,
76
- sourceRoot: COMMANDS_ROOT,
77
- skillsRoot: SKILLS_ROOT,
78
- names: commandNames,
79
- check,
80
- cwd: PACKAGE_ROOT,
81
- });
82
-
83
- const babysitSkillPath = path.join(SKILLS_ROOT, 'babysit', 'SKILL.md');
84
- if (check) {
85
- const fs = require('fs');
86
- const stale = [...mirrorResult.stale, ...skillsResult.stale];
87
- const current = fs.existsSync(babysitSkillPath)
88
- ? fs.readFileSync(babysitSkillPath, 'utf8')
89
- : null;
90
- if (current !== BABYSIT_SKILL) {
91
- stale.push(path.relative(PACKAGE_ROOT, babysitSkillPath));
92
- }
93
- reportCheckResult(LABEL, stale);
94
- return;
95
- }
96
-
97
- const babysitUpdated = writeFileIfChanged(babysitSkillPath, BABYSIT_SKILL) ? 1 : 0;
98
- const updated = mirrorResult.updated + skillsResult.updated + babysitUpdated;
99
-
100
- if (updated === 0) {
101
- console.log(`[${LABEL}] no oh-my-pi command or skill changes were needed.`);
102
- return;
103
- }
104
-
105
- console.log(`[${LABEL}] updated ${updated} oh-my-pi command/skill file(s).`);
106
- }
107
-
108
- main();