@a5c-ai/babysitter-openclaw 5.0.1-staging.ff2c19f9 → 5.0.1-staging.ffad3b46492e
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 +18 -11
- package/bin/install-shared.cjs +2 -2
- package/bin/uninstall.cjs +0 -1
- package/commands/call.md +5 -1
- package/commands/cleanup.md +30 -8
- package/commands/doctor.md +2 -3
- package/commands/help.md +2 -1
- package/commands/observe.md +6 -1
- package/commands/yolo.md +11 -7
- package/extensions/hooks/gateway-request-completed.ts +20 -0
- package/extensions/hooks/gateway-request-received.ts +20 -0
- package/extensions/hooks/{before-prompt-build.ts → gateway-request-routed.ts} +3 -3
- package/extensions/hooks/{session-end.ts → plugin-tool-after.ts} +3 -3
- package/extensions/hooks/{session-start.ts → plugin-tool-before.ts} +3 -3
- package/extensions/hooks/{agent-end.ts → plugin-turn-stop.ts} +3 -3
- package/hooks/{babysitter-proxied-session-end.js → babysitter-proxied-gateway-request-completed.js} +0 -0
- package/hooks/{babysitter-proxied-session-end.sh → babysitter-proxied-gateway-request-completed.sh} +0 -0
- package/hooks/{babysitter-proxied-session-start.js → babysitter-proxied-gateway-request-received.js} +0 -0
- package/hooks/{babysitter-proxied-session-start.sh → babysitter-proxied-gateway-request-received.sh} +0 -0
- package/hooks/{babysitter-proxied-before-prompt-build.js → babysitter-proxied-gateway-request-routed.js} +1 -1
- package/hooks/babysitter-proxied-gateway-request-routed.sh +3 -0
- package/hooks/babysitter-proxied-plugin-tool-after.js +24 -0
- package/hooks/babysitter-proxied-plugin-tool-after.sh +3 -0
- package/hooks/babysitter-proxied-plugin-tool-before.js +24 -0
- package/hooks/babysitter-proxied-plugin-tool-before.sh +3 -0
- package/hooks/{babysitter-proxied-agent-end.js → babysitter-proxied-plugin-turn-stop.js} +1 -1
- package/hooks.json +1 -24
- package/openclaw.plugin.json +7 -5
- package/package.json +10 -9
- package/plugin.json +1 -1
- package/scripts/create-release-tag.mjs +18 -0
- package/scripts/publish-from-tag.mjs +41 -0
- package/scripts/team-install.cjs +1 -1
- package/skills/babysit/SKILL.md +3 -2
- package/skills/call/SKILL.md +5 -1
- package/skills/cleanup/SKILL.md +30 -8
- package/skills/doctor/SKILL.md +2 -3
- package/skills/help/SKILL.md +2 -1
- package/skills/observe/SKILL.md +6 -1
- package/skills/yolo/SKILL.md +5 -1
- package/versions.json +2 -1
- package/hooks/babysitter-proxied-agent-end.sh +0 -3
- package/hooks/babysitter-proxied-before-prompt-build.sh +0 -3
- package/scripts/sync-command-docs.cjs +0 -107
- /package/hooks/{babysitter-proxied-stop-hook.sh → babysitter-proxied-plugin-turn-stop.sh} +0 -0
package/README.md
CHANGED
|
@@ -13,24 +13,31 @@ The SDK (`@a5c-ai/babysitter-sdk`) remains the single source of truth for orches
|
|
|
13
13
|
|
|
14
14
|
## Installation
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Install the Babysitter CLI once:
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
|
-
|
|
19
|
+
npm install -g @a5c-ai/babysitter
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
### Primary: Babysitter Harness Install
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
Use the SDK helper for scriptable global or workspace installs. This is the canonical path used by the installer tests and resolves to `npx --yes @a5c-ai/babysitter-openclaw install ...` under the hood:
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
-
|
|
27
|
+
# Global install
|
|
28
|
+
babysitter harness:install-plugin openclaw
|
|
29
|
+
|
|
30
|
+
# Workspace install
|
|
31
|
+
babysitter harness:install-plugin openclaw --workspace /path/to/repo
|
|
28
32
|
```
|
|
29
33
|
|
|
30
|
-
|
|
34
|
+
This installs the `@a5c-ai/babysitter-openclaw` npm package and registers it with OpenClaw.
|
|
35
|
+
|
|
36
|
+
### Secondary: Published package installer
|
|
31
37
|
|
|
32
38
|
```bash
|
|
33
|
-
npx @a5c-ai/babysitter-openclaw install --
|
|
39
|
+
npx --yes @a5c-ai/babysitter-openclaw install --global
|
|
40
|
+
npx --yes @a5c-ai/babysitter-openclaw install --workspace /path/to/repo
|
|
34
41
|
```
|
|
35
42
|
|
|
36
43
|
### Verify Installation
|
|
@@ -42,7 +49,7 @@ babysitter harness:discover --json
|
|
|
42
49
|
### Removal
|
|
43
50
|
|
|
44
51
|
```bash
|
|
45
|
-
|
|
52
|
+
npx --yes @a5c-ai/babysitter-openclaw uninstall --global
|
|
46
53
|
```
|
|
47
54
|
|
|
48
55
|
## Architecture
|
|
@@ -68,7 +75,7 @@ OpenClaw is a **daemon-based harness**. It runs as a persistent process and expo
|
|
|
68
75
|
3. **Each agent turn ends** -- `agent_end` hook fires asynchronously (fire-and-forget via `spawn` + `unref`), triggering `babysitter hook:run --hook-type stop --harness openclaw` to advance the orchestration iteration.
|
|
69
76
|
4. **Session ends** -- `session_end` hook finalizes any active Babysitter runs.
|
|
70
77
|
|
|
71
|
-
The `agent_end` handler intentionally uses `spawn` with `unref()` rather than `execFileSync` so it does not block the next agent turn. Errors are logged to `$BABYSITTER_LOG_DIR/
|
|
78
|
+
The `agent_end` handler intentionally uses `spawn` with `unref()` rather than `execFileSync` so it does not block the next agent turn. Errors are logged to `$BABYSITTER_LOG_DIR/agent-platform-end-hook.log` but never propagate to the agent.
|
|
72
79
|
|
|
73
80
|
### Dual Hook Surface
|
|
74
81
|
|
|
@@ -204,7 +211,7 @@ When the `babysitter` CLI is not available globally, hooks fall back to `npx -y
|
|
|
204
211
|
## Plugin Layout
|
|
205
212
|
|
|
206
213
|
```text
|
|
207
|
-
plugins/
|
|
214
|
+
artifacts/generated-plugins/openclaw/
|
|
208
215
|
|-- package.json # npm package manifest
|
|
209
216
|
|-- plugin.json # Babysitter plugin manifest
|
|
210
217
|
|-- openclaw.plugin.json # OpenClaw-native plugin manifest
|
|
@@ -262,7 +269,7 @@ npm install
|
|
|
262
269
|
### Running Tests
|
|
263
270
|
|
|
264
271
|
```bash
|
|
265
|
-
cd plugins/
|
|
272
|
+
cd artifacts/generated-plugins/openclaw
|
|
266
273
|
npm test
|
|
267
274
|
npm run test:integration
|
|
268
275
|
npm run test:packaged-install
|
package/bin/install-shared.cjs
CHANGED
|
@@ -13,7 +13,7 @@ function getUserHome() {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
function getHarnessHome() {
|
|
16
|
-
return path.join(os.homedir(),
|
|
16
|
+
return path.join(os.homedir(), ".openclaw");
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
function getHomePluginRoot(scope) {
|
|
@@ -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.ffad3b46492e",
|
|
108
108
|
author: { name: "a5c.ai" },
|
|
109
109
|
};
|
|
110
110
|
if (idx >= 0) marketplace.plugins[idx] = entry;
|
package/bin/uninstall.cjs
CHANGED
package/commands/call.md
CHANGED
|
@@ -4,4 +4,8 @@ argument-hint: Specific instructions for the run.
|
|
|
4
4
|
allowed-tools: Read, Grep, Write, Task, Bash, Edit, Grep, Glob, WebFetch, WebSearch, Search, AskUserQuestion, TodoWrite, TodoRead, Skill, BashOutput, KillShell, MultiEdit, LS
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md).
|
|
7
|
+
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.
|
|
8
|
+
|
|
9
|
+
User arguments for this command:
|
|
10
|
+
|
|
11
|
+
$ARGUMENTS
|
package/commands/cleanup.md
CHANGED
|
@@ -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
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
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
|
package/commands/doctor.md
CHANGED
|
@@ -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 `
|
|
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 `
|
|
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/commands/help.md
CHANGED
|
@@ -233,7 +233,8 @@ SECONDARY COMMANDS
|
|
|
233
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
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
|
+
it prints the local URL to share with the user. Do not use `babysitter observe`
|
|
237
|
+
as a fallback; the core Babysitter CLI does not expose that subcommand.
|
|
237
238
|
|
|
238
239
|
Example: /babysitter:observe
|
|
239
240
|
(opens browser showing all runs with live-updating task
|
package/commands/observe.md
CHANGED
|
@@ -7,6 +7,11 @@ allowed-tools: Read, Grep, Write, Task, Bash
|
|
|
7
7
|
Run the babysitter observer dashboard:
|
|
8
8
|
|
|
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
|
-
2. Launch the dashboard: `npx -y @a5c-ai/babysitter-observer-dashboard@latest --watch-dir <dir
|
|
10
|
+
2. Launch the standalone dashboard package: `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
12
|
4. Report the URL printed by the dashboard to the user, then open it in the browser.
|
|
13
|
+
|
|
14
|
+
Do not fall back to `babysitter observe`; the core Babysitter CLI does not expose
|
|
15
|
+
that subcommand. Some harness runtimes may provide a separate
|
|
16
|
+
`agent-platform observe` surface, but this skill uses the verified standalone
|
|
17
|
+
dashboard package.
|
package/commands/yolo.md
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Orchestrate a babysitter run. use this command to start babysitting a complex workflow in a non-interactive mode, without any user interaction or breakpoints in the 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
|
-
|
|
1
|
+
---
|
|
2
|
+
description: Orchestrate a babysitter run. use this command to start babysitting a complex workflow in a non-interactive mode, without any user interaction or breakpoints in the 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
|
+
Run the Babysitter orchestration instructions directly through the CLI, without any user interaction or breakpoints. In Claude Code, use Bash to run `babysitter instructions:babysit-skill --harness claude-code --no-interactive`; in Codex, run `babysitter instructions:babysit-skill --harness codex --no-interactive`; in other harnesses, use the same command with that harness id. Then follow the returned instructions in this same turn until completion proof is produced. Do not stop after reading the instructions, do not invoke the Skill tool first, and use the non-interactive/no-breakpoints path when the instructions offer a mode choice.
|
|
8
|
+
|
|
9
|
+
User arguments for this command:
|
|
10
|
+
|
|
11
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenClaw gateway.request.completed hook — delegates to shell script.
|
|
3
|
+
*/
|
|
4
|
+
import { execFileSync } from "node:child_process";
|
|
5
|
+
import { resolve, dirname } from "node:path";
|
|
6
|
+
import { fileURLToPath } from "node:url";
|
|
7
|
+
|
|
8
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
9
|
+
const PLUGIN_ROOT = resolve(__dirname, "../..");
|
|
10
|
+
|
|
11
|
+
export async function gatewayRequestCompletedHandler(context: Record<string, unknown>): Promise<void> {
|
|
12
|
+
try {
|
|
13
|
+
execFileSync("bash", [resolve(PLUGIN_ROOT, "hooks/babysitter-proxied-gateway-request-completed.sh")], {
|
|
14
|
+
input: JSON.stringify(context),
|
|
15
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
16
|
+
timeout: 30000,
|
|
17
|
+
env: { ...process.env, ADAPTER_NAME: "openclaw", PLUGIN_ROOT },
|
|
18
|
+
});
|
|
19
|
+
} catch { /* best-effort */ }
|
|
20
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenClaw gateway.request.received hook — delegates to shell script.
|
|
3
|
+
*/
|
|
4
|
+
import { execFileSync } from "node:child_process";
|
|
5
|
+
import { resolve, dirname } from "node:path";
|
|
6
|
+
import { fileURLToPath } from "node:url";
|
|
7
|
+
|
|
8
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
9
|
+
const PLUGIN_ROOT = resolve(__dirname, "../..");
|
|
10
|
+
|
|
11
|
+
export async function gatewayRequestReceivedHandler(context: Record<string, unknown>): Promise<void> {
|
|
12
|
+
try {
|
|
13
|
+
execFileSync("bash", [resolve(PLUGIN_ROOT, "hooks/babysitter-proxied-gateway-request-received.sh")], {
|
|
14
|
+
input: JSON.stringify(context),
|
|
15
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
16
|
+
timeout: 30000,
|
|
17
|
+
env: { ...process.env, ADAPTER_NAME: "openclaw", PLUGIN_ROOT },
|
|
18
|
+
});
|
|
19
|
+
} catch { /* best-effort */ }
|
|
20
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* OpenClaw
|
|
2
|
+
* OpenClaw gateway.request.routed hook — delegates to shell script.
|
|
3
3
|
*/
|
|
4
4
|
import { execFileSync } from "node:child_process";
|
|
5
5
|
import { resolve, dirname } from "node:path";
|
|
@@ -8,9 +8,9 @@ import { fileURLToPath } from "node:url";
|
|
|
8
8
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
9
9
|
const PLUGIN_ROOT = resolve(__dirname, "../..");
|
|
10
10
|
|
|
11
|
-
export async function
|
|
11
|
+
export async function gatewayRequestRoutedHandler(context: Record<string, unknown>): Promise<void> {
|
|
12
12
|
try {
|
|
13
|
-
execFileSync("bash", [resolve(PLUGIN_ROOT, "hooks/babysitter-proxied-
|
|
13
|
+
execFileSync("bash", [resolve(PLUGIN_ROOT, "hooks/babysitter-proxied-gateway-request-routed.sh")], {
|
|
14
14
|
input: JSON.stringify(context),
|
|
15
15
|
stdio: ["pipe", "pipe", "pipe"],
|
|
16
16
|
timeout: 30000,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* OpenClaw
|
|
2
|
+
* OpenClaw plugin.tool.after hook — delegates to shell script.
|
|
3
3
|
*/
|
|
4
4
|
import { execFileSync } from "node:child_process";
|
|
5
5
|
import { resolve, dirname } from "node:path";
|
|
@@ -8,9 +8,9 @@ import { fileURLToPath } from "node:url";
|
|
|
8
8
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
9
9
|
const PLUGIN_ROOT = resolve(__dirname, "../..");
|
|
10
10
|
|
|
11
|
-
export async function
|
|
11
|
+
export async function pluginToolAfterHandler(context: Record<string, unknown>): Promise<void> {
|
|
12
12
|
try {
|
|
13
|
-
execFileSync("bash", [resolve(PLUGIN_ROOT, "hooks/babysitter-proxied-
|
|
13
|
+
execFileSync("bash", [resolve(PLUGIN_ROOT, "hooks/babysitter-proxied-plugin-tool-after.sh")], {
|
|
14
14
|
input: JSON.stringify(context),
|
|
15
15
|
stdio: ["pipe", "pipe", "pipe"],
|
|
16
16
|
timeout: 30000,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* OpenClaw
|
|
2
|
+
* OpenClaw plugin.tool.before hook — delegates to shell script.
|
|
3
3
|
*/
|
|
4
4
|
import { execFileSync } from "node:child_process";
|
|
5
5
|
import { resolve, dirname } from "node:path";
|
|
@@ -8,9 +8,9 @@ import { fileURLToPath } from "node:url";
|
|
|
8
8
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
9
9
|
const PLUGIN_ROOT = resolve(__dirname, "../..");
|
|
10
10
|
|
|
11
|
-
export async function
|
|
11
|
+
export async function pluginToolBeforeHandler(context: Record<string, unknown>): Promise<void> {
|
|
12
12
|
try {
|
|
13
|
-
execFileSync("bash", [resolve(PLUGIN_ROOT, "hooks/babysitter-proxied-
|
|
13
|
+
execFileSync("bash", [resolve(PLUGIN_ROOT, "hooks/babysitter-proxied-plugin-tool-before.sh")], {
|
|
14
14
|
input: JSON.stringify(context),
|
|
15
15
|
stdio: ["pipe", "pipe", "pipe"],
|
|
16
16
|
timeout: 30000,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* OpenClaw
|
|
2
|
+
* OpenClaw plugin.turn.stop hook — delegates to shell script.
|
|
3
3
|
*/
|
|
4
4
|
import { execFileSync } from "node:child_process";
|
|
5
5
|
import { resolve, dirname } from "node:path";
|
|
@@ -8,9 +8,9 @@ import { fileURLToPath } from "node:url";
|
|
|
8
8
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
9
9
|
const PLUGIN_ROOT = resolve(__dirname, "../..");
|
|
10
10
|
|
|
11
|
-
export async function
|
|
11
|
+
export async function pluginTurnStopHandler(context: Record<string, unknown>): Promise<void> {
|
|
12
12
|
try {
|
|
13
|
-
execFileSync("bash", [resolve(PLUGIN_ROOT, "hooks/babysitter-proxied-
|
|
13
|
+
execFileSync("bash", [resolve(PLUGIN_ROOT, "hooks/babysitter-proxied-plugin-turn-stop.sh")], {
|
|
14
14
|
input: JSON.stringify(context),
|
|
15
15
|
stdio: ["pipe", "pipe", "pipe"],
|
|
16
16
|
timeout: 30000,
|
package/hooks/{babysitter-proxied-session-end.js → babysitter-proxied-gateway-request-completed.js}
RENAMED
|
File without changes
|
package/hooks/{babysitter-proxied-session-end.sh → babysitter-proxied-gateway-request-completed.sh}
RENAMED
|
File without changes
|
package/hooks/{babysitter-proxied-session-start.js → babysitter-proxied-gateway-request-received.js}
RENAMED
|
File without changes
|
package/hooks/{babysitter-proxied-session-start.sh → babysitter-proxied-gateway-request-received.sh}
RENAMED
|
File without changes
|
|
@@ -8,7 +8,7 @@ var PLUGIN_ROOT = process.env.PLUGIN_ROOT || process.env.PLUGIN_ROOT || path.res
|
|
|
8
8
|
var stdin = "";
|
|
9
9
|
try { stdin = readFileSync(0, "utf8"); } catch {}
|
|
10
10
|
try {
|
|
11
|
-
var result = execSync("bash " + JSON.stringify(path.join(PLUGIN_ROOT, "hooks/
|
|
11
|
+
var result = execSync("bash " + JSON.stringify(path.join(PLUGIN_ROOT, "hooks/user-prompt-submit.sh")), {
|
|
12
12
|
input: stdin,
|
|
13
13
|
stdio: ["pipe", "pipe", "pipe"],
|
|
14
14
|
timeout: 30000,
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
var execSync = require("child_process").execSync;
|
|
4
|
+
var path = require("path");
|
|
5
|
+
var readFileSync = require("fs").readFileSync;
|
|
6
|
+
|
|
7
|
+
var PLUGIN_ROOT = process.env.PLUGIN_ROOT || process.env.PLUGIN_ROOT || path.resolve(__dirname, "..");
|
|
8
|
+
var stdin = "";
|
|
9
|
+
try { stdin = readFileSync(0, "utf8"); } catch {}
|
|
10
|
+
try {
|
|
11
|
+
var result = execSync("bash " + JSON.stringify(path.join(PLUGIN_ROOT, "hooks/post-tool-use.sh")), {
|
|
12
|
+
input: stdin,
|
|
13
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
14
|
+
timeout: 30000,
|
|
15
|
+
env: Object.assign({}, process.env, {
|
|
16
|
+
HOOK_TYPE: process.env.HOOK_TYPE || "",
|
|
17
|
+
ADAPTER_NAME: process.env.ADAPTER_NAME || "openclaw",
|
|
18
|
+
PLUGIN_ROOT: PLUGIN_ROOT
|
|
19
|
+
})
|
|
20
|
+
});
|
|
21
|
+
process.stdout.write(result);
|
|
22
|
+
} catch (e) {
|
|
23
|
+
process.stdout.write("{}\n");
|
|
24
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
var execSync = require("child_process").execSync;
|
|
4
|
+
var path = require("path");
|
|
5
|
+
var readFileSync = require("fs").readFileSync;
|
|
6
|
+
|
|
7
|
+
var PLUGIN_ROOT = process.env.PLUGIN_ROOT || process.env.PLUGIN_ROOT || path.resolve(__dirname, "..");
|
|
8
|
+
var stdin = "";
|
|
9
|
+
try { stdin = readFileSync(0, "utf8"); } catch {}
|
|
10
|
+
try {
|
|
11
|
+
var result = execSync("bash " + JSON.stringify(path.join(PLUGIN_ROOT, "hooks/pre-tool-use.sh")), {
|
|
12
|
+
input: stdin,
|
|
13
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
14
|
+
timeout: 30000,
|
|
15
|
+
env: Object.assign({}, process.env, {
|
|
16
|
+
HOOK_TYPE: process.env.HOOK_TYPE || "",
|
|
17
|
+
ADAPTER_NAME: process.env.ADAPTER_NAME || "openclaw",
|
|
18
|
+
PLUGIN_ROOT: PLUGIN_ROOT
|
|
19
|
+
})
|
|
20
|
+
});
|
|
21
|
+
process.stdout.write(result);
|
|
22
|
+
} catch (e) {
|
|
23
|
+
process.stdout.write("{}\n");
|
|
24
|
+
}
|
|
@@ -8,7 +8,7 @@ var PLUGIN_ROOT = process.env.PLUGIN_ROOT || process.env.PLUGIN_ROOT || path.res
|
|
|
8
8
|
var stdin = "";
|
|
9
9
|
try { stdin = readFileSync(0, "utf8"); } catch {}
|
|
10
10
|
try {
|
|
11
|
-
var result = execSync("bash " + JSON.stringify(path.join(PLUGIN_ROOT, "hooks/
|
|
11
|
+
var result = execSync("bash " + JSON.stringify(path.join(PLUGIN_ROOT, "hooks/stop.sh")), {
|
|
12
12
|
input: stdin,
|
|
13
13
|
stdio: ["pipe", "pipe", "pipe"],
|
|
14
14
|
timeout: 30000,
|
package/hooks.json
CHANGED
|
@@ -1,27 +1,4 @@
|
|
|
1
1
|
{
|
|
2
2
|
"description": "babysitter plugin hooks for OpenClaw",
|
|
3
|
-
"hooks": {
|
|
4
|
-
"SessionStart": [
|
|
5
|
-
{
|
|
6
|
-
"matcher": "*",
|
|
7
|
-
"hooks": [
|
|
8
|
-
{
|
|
9
|
-
"type": "command",
|
|
10
|
-
"command": "./hooks/babysitter-proxied-session-start.sh"
|
|
11
|
-
}
|
|
12
|
-
]
|
|
13
|
-
}
|
|
14
|
-
],
|
|
15
|
-
"Stop": [
|
|
16
|
-
{
|
|
17
|
-
"matcher": "*",
|
|
18
|
-
"hooks": [
|
|
19
|
-
{
|
|
20
|
-
"type": "command",
|
|
21
|
-
"command": "./hooks/babysitter-proxied-stop-hook.sh"
|
|
22
|
-
}
|
|
23
|
-
]
|
|
24
|
-
}
|
|
25
|
-
]
|
|
26
|
-
}
|
|
3
|
+
"hooks": {}
|
|
27
4
|
}
|
package/openclaw.plugin.json
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babysitter",
|
|
3
|
-
"version": "5.0.1-staging.
|
|
3
|
+
"version": "5.0.1-staging.ffad3b46492e",
|
|
4
4
|
"description": "Orchestrate complex, multi-step workflows with event-sourced state management, hook-based extensibility, and human-in-the-loop approval",
|
|
5
5
|
"entrypoint": "extensions/index.ts",
|
|
6
6
|
"hooks": {
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
7
|
+
"gateway.request.received": "extensions/hooks/gateway-request-received.ts",
|
|
8
|
+
"plugin.turn.stop": "extensions/hooks/plugin-turn-stop.ts",
|
|
9
|
+
"gateway.request.routed": "extensions/hooks/gateway-request-routed.ts",
|
|
10
|
+
"plugin.tool.before": "extensions/hooks/plugin-tool-before.ts",
|
|
11
|
+
"plugin.tool.after": "extensions/hooks/plugin-tool-after.ts",
|
|
12
|
+
"gateway.request.completed": "extensions/hooks/gateway-request-completed.ts"
|
|
11
13
|
},
|
|
12
14
|
"capabilities": [
|
|
13
15
|
"orchestration",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@a5c-ai/babysitter-openclaw",
|
|
3
|
-
"version": "5.0.1-staging.
|
|
3
|
+
"version": "5.0.1-staging.ffad3b46492e",
|
|
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",
|
|
6
6
|
"openclaw": {
|
|
@@ -22,21 +22,19 @@
|
|
|
22
22
|
"sdk-integration"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@a5c-ai/babysitter-sdk": "5.0.1-staging.
|
|
25
|
+
"@a5c-ai/babysitter-sdk": "5.0.1-staging.ffad3b46492e"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"openclaw": "*"
|
|
29
29
|
},
|
|
30
30
|
"scripts": {
|
|
31
|
-
"
|
|
32
|
-
"
|
|
31
|
+
"plugin:install": "node bin/install.cjs --global",
|
|
32
|
+
"plugin:uninstall": "node bin/uninstall.cjs --global",
|
|
33
33
|
"test": "node --test test/integration.test.js",
|
|
34
34
|
"test:integration": "node --test test/integration.test.js",
|
|
35
35
|
"test:packaged-install": "node test/packaged-install.test.cjs",
|
|
36
|
-
"sync:commands": "node scripts/sync-command-docs.cjs",
|
|
37
36
|
"deploy": "npm publish --access public",
|
|
38
|
-
"deploy:staging": "npm publish --access public --tag staging"
|
|
39
|
-
"team:install": "node scripts/team-install.cjs"
|
|
37
|
+
"deploy:staging": "npm publish --access public --tag staging"
|
|
40
38
|
},
|
|
41
39
|
"bin": {
|
|
42
40
|
"babysitter-openclaw": "bin/cli.cjs"
|
|
@@ -62,7 +60,10 @@
|
|
|
62
60
|
},
|
|
63
61
|
"repository": {
|
|
64
62
|
"type": "git",
|
|
65
|
-
"url": "https://github.com/a5c-ai/babysitter"
|
|
63
|
+
"url": "git+https://github.com/a5c-ai/babysitter-openclaw.git"
|
|
66
64
|
},
|
|
67
|
-
"homepage": "https://github.com/a5c-ai/babysitter
|
|
65
|
+
"homepage": "https://github.com/a5c-ai/babysitter-openclaw#readme",
|
|
66
|
+
"bugs": {
|
|
67
|
+
"url": "https://github.com/a5c-ai/babysitter-openclaw/issues"
|
|
68
|
+
}
|
|
68
69
|
}
|
package/plugin.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babysitter",
|
|
3
|
-
"version": "5.0.1-staging.
|
|
3
|
+
"version": "5.0.1-staging.ffad3b46492e",
|
|
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": "a5c.ai",
|
|
6
6
|
"license": "MIT",
|
|
@@ -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/scripts/team-install.cjs
CHANGED
package/skills/babysit/SKILL.md
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: babysit
|
|
3
|
-
description:
|
|
3
|
+
description: >-
|
|
4
|
+
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
5
|
---
|
|
5
6
|
|
|
6
7
|
# babysit
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
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.
|
|
9
10
|
|
|
10
11
|
## Dependencies
|
|
11
12
|
|
package/skills/call/SKILL.md
CHANGED
|
@@ -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
|
package/skills/cleanup/SKILL.md
CHANGED
|
@@ -11,11 +11,33 @@ Create and run a cleanup process using the process at `skills\babysit\process\cr
|
|
|
11
11
|
|
|
12
12
|
Implementation notes (for the process):
|
|
13
13
|
- Parse arguments for `--dry-run` flag (if present, set dryRun: true in inputs) and `--keep-days N` (default: 7)
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
14
|
+
|
|
15
|
+
CRITICAL: The cleanup MUST follow this exact phase order. Do NOT delete any run before Phase 2 completes.
|
|
16
|
+
|
|
17
|
+
Phase 1 — Scan:
|
|
18
|
+
- Scan .a5c/runs/ for all runs
|
|
19
|
+
- Classify each as terminal (completed/failed) or active (in-progress/created)
|
|
20
|
+
- Identify terminal runs older than the keep-days threshold as removal candidates
|
|
21
|
+
- Never mark active/in-progress runs for removal
|
|
22
|
+
- Count and report: total runs, terminal, active, removal candidates, disk usage
|
|
23
|
+
|
|
24
|
+
Phase 2 — Aggregate insights (BEFORE any deletion):
|
|
25
|
+
- For EVERY removal candidate, read its run.json and journal/ events
|
|
26
|
+
- Extract: processId, prompt, status, event count, created date, task summaries
|
|
27
|
+
- Group by process type and extract patterns (retry counts, convergence behavior, failure modes)
|
|
28
|
+
- Append a new dated section to docs/run-history-insights.md with:
|
|
29
|
+
- Summary statistics (runs removed, disk freed, runs retained)
|
|
30
|
+
- Run categories with counts and descriptions
|
|
31
|
+
- Key patterns observed (multi-batch convergence, retry behavior, etc.)
|
|
32
|
+
- What worked well / what didn't from the run data
|
|
33
|
+
- This file MUST be written and verified before proceeding to Phase 3
|
|
34
|
+
|
|
35
|
+
Phase 3 — Confirm removal:
|
|
36
|
+
- In interactive mode, show the user what will be removed via a breakpoint
|
|
37
|
+
- In non-interactive mode (yolo), proceed with defaults
|
|
38
|
+
- In dry-run mode, stop here and show what would be removed
|
|
39
|
+
|
|
40
|
+
Phase 4 — Remove:
|
|
41
|
+
- Delete the terminal runs older than keep-days threshold
|
|
42
|
+
- Identify and remove orphaned process files not referenced by remaining runs
|
|
43
|
+
- Show remaining run count and disk usage after cleanup
|
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`.
|
package/skills/help/SKILL.md
CHANGED
|
@@ -234,7 +234,8 @@ SECONDARY COMMANDS
|
|
|
234
234
|
How it works: Runs npx @a5c-ai/babysitter-observer-dashboard@latest which watches
|
|
235
235
|
the .a5c/runs/ directory (or a parent directory containing multiple projects) and
|
|
236
236
|
serves a live dashboard. The process is blocking -- it runs until you stop it, and
|
|
237
|
-
it prints the local URL to share with the user.
|
|
237
|
+
it prints the local URL to share with the user. Do not use `babysitter observe`
|
|
238
|
+
as a fallback; the core Babysitter CLI does not expose that subcommand.
|
|
238
239
|
|
|
239
240
|
Example: /babysitter:observe
|
|
240
241
|
(opens browser showing all runs with live-updating task
|
package/skills/observe/SKILL.md
CHANGED
|
@@ -8,6 +8,11 @@ description: Launch the babysitter observer dashboard. Installs and runs the rea
|
|
|
8
8
|
Run the babysitter observer dashboard:
|
|
9
9
|
|
|
10
10
|
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.
|
|
11
|
-
2. Launch the dashboard: `npx -y @a5c-ai/babysitter-observer-dashboard@latest --watch-dir <dir
|
|
11
|
+
2. Launch the standalone dashboard package: `npx -y @a5c-ai/babysitter-observer-dashboard@latest --watch-dir <dir>`.
|
|
12
12
|
3. This is a blocking process — it will keep running until stopped.
|
|
13
13
|
4. Report the URL printed by the dashboard to the user, then open it in the browser.
|
|
14
|
+
|
|
15
|
+
Do not fall back to `babysitter observe`; the core Babysitter CLI does not expose
|
|
16
|
+
that subcommand. Some harness runtimes may provide a separate
|
|
17
|
+
`agent-platform observe` surface, but this skill uses the verified standalone
|
|
18
|
+
dashboard package.
|
package/skills/yolo/SKILL.md
CHANGED
|
@@ -5,4 +5,8 @@ description: Orchestrate a babysitter run. use this command to start babysitting
|
|
|
5
5
|
|
|
6
6
|
# yolo
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Run the Babysitter orchestration instructions directly through the CLI, without any user interaction or breakpoints. In Claude Code, use Bash to run `babysitter instructions:babysit-skill --harness claude-code --no-interactive`; in Codex, run `babysitter instructions:babysit-skill --harness codex --no-interactive`; in other harnesses, use the same command with that harness id. Then follow the returned instructions in this same turn until completion proof is produced. Do not stop after reading the instructions, do not invoke the Skill tool first, and use the non-interactive/no-breakpoints path when the instructions offer a mode choice.
|
|
9
|
+
|
|
10
|
+
User arguments for this command:
|
|
11
|
+
|
|
12
|
+
$ARGUMENTS
|
package/versions.json
CHANGED
|
@@ -1,107 +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-openclaw 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="\${OPENCLAW_PLUGIN_ROOT:-\$(pwd)}"
|
|
36
|
-
SDK_VERSION=$(node -e "try{const fs=require('fs');const path=require('path');const pluginRoot=process.env.OPENCLAW_PLUGIN_ROOT||process.env.PLUGIN_ROOT||process.cwd();const probes=[path.join(pluginRoot,'versions.json'),path.join(pluginRoot,'plugins','babysitter-openclaw','versions.json'),path.join(pluginRoot,'node_modules','@a5c-ai','babysitter-openclaw','versions.json'),path.join(process.cwd(),'node_modules','@a5c-ai','babysitter-openclaw','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
|
-
CLI="npx -y @a5c-ai/babysitter-sdk@$SDK_VERSION"
|
|
39
|
-
\`\`\`
|
|
40
|
-
|
|
41
|
-
## Instructions
|
|
42
|
-
|
|
43
|
-
Run the following command to get full orchestration instructions:
|
|
44
|
-
|
|
45
|
-
\`\`\`bash
|
|
46
|
-
babysitter instructions:babysit-skill --harness openclaw --interactive
|
|
47
|
-
\`\`\`
|
|
48
|
-
|
|
49
|
-
For non-interactive mode:
|
|
50
|
-
|
|
51
|
-
\`\`\`bash
|
|
52
|
-
babysitter instructions:babysit-skill --harness openclaw --no-interactive
|
|
53
|
-
\`\`\`
|
|
54
|
-
|
|
55
|
-
Follow the instructions returned by the command above to orchestrate the run.
|
|
56
|
-
`;
|
|
57
|
-
|
|
58
|
-
function getCommandNames() {
|
|
59
|
-
return listMarkdownBasenames(ROOT_COMMANDS);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function main() {
|
|
63
|
-
const check = process.argv.includes('--check');
|
|
64
|
-
const commandNames = getCommandNames();
|
|
65
|
-
const mirrorResult = syncCommandMirrors({
|
|
66
|
-
label: LABEL,
|
|
67
|
-
sourceRoot: ROOT_COMMANDS,
|
|
68
|
-
targetRoot: COMMANDS_ROOT,
|
|
69
|
-
names: commandNames,
|
|
70
|
-
check,
|
|
71
|
-
cwd: PACKAGE_ROOT,
|
|
72
|
-
});
|
|
73
|
-
const skillsResult = syncSkillsFromCommands({
|
|
74
|
-
label: LABEL,
|
|
75
|
-
sourceRoot: COMMANDS_ROOT,
|
|
76
|
-
skillsRoot: SKILLS_ROOT,
|
|
77
|
-
names: commandNames,
|
|
78
|
-
check,
|
|
79
|
-
cwd: PACKAGE_ROOT,
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
const babysitSkillPath = path.join(SKILLS_ROOT, 'babysit', 'SKILL.md');
|
|
83
|
-
if (check) {
|
|
84
|
-
const fs = require('fs');
|
|
85
|
-
const stale = [...mirrorResult.stale, ...skillsResult.stale];
|
|
86
|
-
const current = fs.existsSync(babysitSkillPath)
|
|
87
|
-
? fs.readFileSync(babysitSkillPath, 'utf8')
|
|
88
|
-
: null;
|
|
89
|
-
if (current !== BABYSIT_SKILL) {
|
|
90
|
-
stale.push(path.relative(PACKAGE_ROOT, babysitSkillPath));
|
|
91
|
-
}
|
|
92
|
-
reportCheckResult(LABEL, stale);
|
|
93
|
-
return;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
const babysitUpdated = writeFileIfChanged(babysitSkillPath, BABYSIT_SKILL) ? 1 : 0;
|
|
97
|
-
const updated = mirrorResult.updated + skillsResult.updated + babysitUpdated;
|
|
98
|
-
|
|
99
|
-
if (updated === 0) {
|
|
100
|
-
console.log(`[${LABEL}] no openclaw command or skill changes were needed.`);
|
|
101
|
-
return;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
console.log(`[${LABEL}] updated ${updated} openclaw command/skill file(s).`);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
main();
|
|
File without changes
|