pi-background-run 0.3.0 → 0.4.0
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 +61 -22
- package/extension/index.test.ts +521 -48
- package/extension/index.ts +466 -217
- package/package.json +1 -1
- package/skill/run-bg/SKILL.md +7 -4
package/package.json
CHANGED
package/skill/run-bg/SKILL.md
CHANGED
|
@@ -31,7 +31,7 @@ no polling.
|
|
|
31
31
|
| Start | `bgrun(command: "make test-short", name: "unit-tests")` → `started: <job-id>` (name is an optional short label; use it so jobs are recognizable in `bgstatus`, the status widget, and wake messages) |
|
|
32
32
|
| Status | `bgstatus(<job-id>)` for one job, or `bgstatus()` for this session's running jobs — finished jobs are hidden by default; pass `includeDone: true` to list them |
|
|
33
33
|
| Tail | `bgtail(<job-id>, 40)` |
|
|
34
|
-
| Clean | `bgclean()` (default 7-day retention) |
|
|
34
|
+
| Clean | `bgclean()` for this session's old logs; `bgclean all` to sweep every session's (default 7-day retention) |
|
|
35
35
|
|
|
36
36
|
## Workflow
|
|
37
37
|
|
|
@@ -86,8 +86,11 @@ no polling.
|
|
|
86
86
|
- Call the tools; never hand-roll `nohup … &` inline.
|
|
87
87
|
- One job = one id. Multiple concurrent jobs are fine — each has its own log.
|
|
88
88
|
- Logs live in `~/.pi-bgrun/jobs` (override with `PI_BGRUN_DIR`).
|
|
89
|
-
- Cleanup: `bgclean`
|
|
90
|
-
|
|
91
|
-
|
|
89
|
+
- Cleanup: `bgclean` removes only THIS session's old logs; `bgclean all`
|
|
90
|
+
sweeps every session's. Auto-sweeps at session start/shutdown are
|
|
91
|
+
session-scoped plus a global orphan pass (default on — removes finished
|
|
92
|
+
week-old logs from crashed/abandoned sessions; disable with
|
|
93
|
+
`globalAutoClean: false` / `PI_BGRUN_GLOBAL_AUTO_CLEAN=0`). Retention is
|
|
94
|
+
`cleanupDays` (default 7, configurable).
|
|
92
95
|
- To stop a running job, use `bash` with `kill <pid>` (the pid is in the `bgstatus`
|
|
93
96
|
output). There is no `bgkill` tool.
|