@yusukeshib/pi-babysit 0.2.2 → 0.2.3
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/index.ts +8 -6
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -1209,7 +1209,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
1209
1209
|
"Run a command or a pi subagent as a supervised background session (non-blocking); returns a session id",
|
|
1210
1210
|
promptGuidelines: [
|
|
1211
1211
|
"Run every long-lived or slow command through babysit_run instead of bash: builds, test suites, dev servers, watchers, `tail -f`, anything expected to take more than a few seconds. Give it a clear stable `name` (e.g. cargo-build).",
|
|
1212
|
-
"babysit_run { command }
|
|
1212
|
+
"After babysit_run { command } starts a process, end your response immediately so the automatic process-end notification can resume you; NEVER poll with babysit_check or sleep. Set continueAfterStart: true only when you have immediate, specific, non-polling work to do next. Call babysit_wait when you must consume the result inside the current turn (optionally with `expect` to wait for a readiness line like 'listening on').",
|
|
1213
1213
|
"babysit_run gives full PTY control: drive interactive programs (installers, wizards, REPLs) with babysit_send (text or named keys) and read the rendered screen with babysit_check { screen: true }.",
|
|
1214
1214
|
"Delegate self-contained tasks (codebase recon, a parallelizable subtask, work that would pollute your context) with babysit_run { profile: \"subagent\", task }. Launch several for independent subtasks; they run concurrently.",
|
|
1215
1215
|
"After spawning subagents, do not idle-wait and do not end your turn to wait for them: keep making progress, then call babysit_wait (ids + mode any/all) when you need their results. Steer or send follow-up tasks with babysit_send; kill runaways with babysit_kill.",
|
|
@@ -1346,11 +1346,13 @@ export default function (pi: ExtensionAPI) {
|
|
|
1346
1346
|
},
|
|
1347
1347
|
],
|
|
1348
1348
|
details: { id: res.id, kind: "process", command: params.command },
|
|
1349
|
-
//
|
|
1350
|
-
//
|
|
1351
|
-
//
|
|
1352
|
-
//
|
|
1353
|
-
|
|
1349
|
+
// Do not return `terminate: true` here. In RPC/subagent hosts that hint
|
|
1350
|
+
// can shut down the hosting pi worker, whose process-tree cleanup then
|
|
1351
|
+
// kills the otherwise detached babysit supervisor and closes its PTY
|
|
1352
|
+
// (observed as an immediate `^D`). The prompt contract tells the model
|
|
1353
|
+
// to stop after this result instead; the NOTIFY_MARKER still identifies
|
|
1354
|
+
// a parked turn to the parent/self-reaper logic.
|
|
1355
|
+
terminate: false,
|
|
1354
1356
|
};
|
|
1355
1357
|
}
|
|
1356
1358
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yusukeshib/pi-babysit",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Run anything long-lived under babysit — one supervision substrate for processes and pi subagents, surfaced to the agent as babysit_run/check/send/wait/kill.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|