@a5c-ai/babysitter-codex 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/.codex-plugin/plugin.json +2 -2
- package/bin/install-shared.js +1 -1
- package/hooks/babysitter-proxied-session-start.sh +0 -0
- package/hooks/babysitter-proxied-stop.sh +0 -0
- package/hooks/babysitter-proxied-user-prompt-submit.sh +0 -0
- package/package.json +4 -5
- package/scripts/create-release-tag.mjs +18 -0
- package/scripts/publish-from-tag.mjs +41 -0
- package/skills/doctor/SKILL.md +2 -3
- package/scripts/sync-command-skills.js +0 -46
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babysitter",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.1-staging.d7c7b44ac4e1",
|
|
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",
|
|
@@ -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/bin/install-shared.js
CHANGED
|
@@ -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.
|
|
107
|
+
version: "5.0.1-staging.d7c7b44ac4e1",
|
|
108
108
|
author: { name: "a5c.ai" },
|
|
109
109
|
};
|
|
110
110
|
if (idx >= 0) marketplace.plugins[idx] = entry;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@a5c-ai/babysitter-codex",
|
|
3
|
-
"version": "5.0.1-staging.
|
|
3
|
+
"version": "5.0.1-staging.d7c7b44ac4e1",
|
|
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
6
|
"test": "npm run validate:ci",
|
|
@@ -38,11 +38,10 @@
|
|
|
38
38
|
},
|
|
39
39
|
"repository": {
|
|
40
40
|
"type": "git",
|
|
41
|
-
"url": "git+https://github.com/a5c-ai/babysitter.git"
|
|
42
|
-
"directory": "plugins/babysitter-codex"
|
|
41
|
+
"url": "git+https://github.com/a5c-ai/babysitter-codex.git"
|
|
43
42
|
},
|
|
44
|
-
"homepage": "https://github.com/a5c-ai/babysitter
|
|
43
|
+
"homepage": "https://github.com/a5c-ai/babysitter-codex#readme",
|
|
45
44
|
"bugs": {
|
|
46
|
-
"url": "https://github.com/a5c-ai/babysitter/issues"
|
|
45
|
+
"url": "https://github.com/a5c-ai/babysitter-codex/issues"
|
|
47
46
|
}
|
|
48
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]);
|
package/skills/doctor/SKILL.md
CHANGED
|
@@ -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 `
|
|
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 `
|
|
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`.
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
const fs = require('fs');
|
|
5
|
-
const path = require('path');
|
|
6
|
-
const {
|
|
7
|
-
listDirectories,
|
|
8
|
-
reportCheckResult,
|
|
9
|
-
syncSkillsFromCommands,
|
|
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 COMMANDS_ROOT = path.join(REPO_ROOT, 'plugins', 'babysitter', 'commands');
|
|
15
|
-
const SKILLS_ROOT = path.join(PACKAGE_ROOT, 'skills');
|
|
16
|
-
const LABEL = 'babysitter-codex sync';
|
|
17
|
-
|
|
18
|
-
function getCommandBackedSkillNames() {
|
|
19
|
-
return listDirectories(SKILLS_ROOT)
|
|
20
|
-
.filter((name) => fs.existsSync(path.join(COMMANDS_ROOT, `${name}.md`)));
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function main() {
|
|
24
|
-
const result = syncSkillsFromCommands({
|
|
25
|
-
label: LABEL,
|
|
26
|
-
sourceRoot: COMMANDS_ROOT,
|
|
27
|
-
skillsRoot: SKILLS_ROOT,
|
|
28
|
-
names: getCommandBackedSkillNames(),
|
|
29
|
-
check: process.argv.includes('--check'),
|
|
30
|
-
cwd: PACKAGE_ROOT,
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
if (process.argv.includes('--check')) {
|
|
34
|
-
reportCheckResult(LABEL, result.stale);
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
if (result.updated === 0) {
|
|
39
|
-
console.log(`[${LABEL}] no Codex skill changes were needed.`);
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
console.log(`[${LABEL}] updated ${result.updated} Codex skill file(s).`);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
main();
|