@edgehero/pi-dispatch-admin 0.1.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/package.json ADDED
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "@edgehero/pi-dispatch-admin",
3
+ "version": "0.1.0",
4
+ "description": "Operator console (a pi extension) + skill for the pi-dispatch self-hosted agent service: a /dispatch TUI for queue, spend, run history, triggers, and scheduled pause windows. Runs against a live pi-dispatch deployment.",
5
+ "keywords": [
6
+ "pi-package",
7
+ "pi",
8
+ "pi-coding-agent",
9
+ "coding-agent",
10
+ "extension"
11
+ ],
12
+ "license": "MIT",
13
+ "author": "Rob Boerman",
14
+ "homepage": "https://github.com/edgehero/pi-dispatch/tree/main/admin",
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git+https://github.com/edgehero/pi-dispatch.git",
18
+ "directory": "admin"
19
+ },
20
+ "bugs": "https://github.com/edgehero/pi-dispatch/issues",
21
+ "type": "module",
22
+ "files": [
23
+ "dist",
24
+ "skills"
25
+ ],
26
+ "pi": {
27
+ "extensions": [
28
+ "./dist/index.mjs"
29
+ ],
30
+ "skills": [
31
+ "./skills"
32
+ ],
33
+ "image": "https://raw.githubusercontent.com/edgehero/pi-dispatch/main/docs/images/dispatch-dashboard.svg"
34
+ },
35
+ "scripts": {
36
+ "build": "node build.mjs",
37
+ "prepublishOnly": "node build.mjs",
38
+ "test": "node --test \"test/*.test.mjs\""
39
+ },
40
+ "dependencies": {
41
+ "bullmq": "5.80.4",
42
+ "ioredis": "5.11.1"
43
+ },
44
+ "peerDependencies": {
45
+ "@earendil-works/pi-coding-agent": "0.80.7"
46
+ },
47
+ "devDependencies": {
48
+ "@earendil-works/pi-coding-agent": "0.80.7",
49
+ "@pi-dispatch/worker": "*",
50
+ "esbuild": "^0.28.1",
51
+ "typebox": "1.1.38"
52
+ }
53
+ }
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: operate-pi-dispatch
3
+ description: How to operate a pi-dispatch deployment through its tools, and how to use the operator-confirm gates on the write tools (changing limits, adding/editing/deleting triggers).
4
+ ---
5
+
6
+ # Operating pi-dispatch
7
+
8
+ pi-dispatch is a queue that runs paid autonomous agent jobs. The admin extension exposes tools to observe
9
+ and operate a deployment. Some tools only read; some turn processing on and off; some change money-affecting
10
+ configuration and are gated behind a human confirmation.
11
+
12
+ ## The tools
13
+
14
+ Observe (no approval needed):
15
+ - `dispatch_status` — queue/worker state, today's budget, settings overlay, schedulers.
16
+ - `dispatch_runs` — recent run records (PII-free). Raw job logs are never available to tools.
17
+ - `dispatch_triggers` — the configured triggers with their array `index` (needed to edit/delete one).
18
+
19
+ Control (no approval needed — reversible and money-safe):
20
+ - `dispatch_pause` — stop starting new jobs (running ones finish). This is "turn dispatch off".
21
+ - `dispatch_resume` — re-enable processing. This is "turn dispatch on".
22
+
23
+ Start a run (paid, already gated producer-side):
24
+ - `dispatch_run` — enqueue one agent run against an allowlisted local folder.
25
+
26
+ ## The human confirm gates — how to use them
27
+
28
+ These tools change money-affecting configuration and **each one asks the operator to approve a confirmation
29
+ dialog before it takes effect**:
30
+ - `dispatch_set` — change a limit/setting (e.g. `dailyCap`, `weeklyCap`, `maxTurns`, `model`). Omit `value`
31
+ to unset.
32
+ - `dispatch_trigger_add` / `dispatch_trigger_edit` / `dispatch_trigger_delete` — manage triggers.
33
+ - `dispatch_pause_add` / `dispatch_pause_delete` — manage scheduled pause windows (per folder/repo "quiet
34
+ hours": runs for a scope are deferred between certain times and auto-resume after; `dispatch_pauses` lists
35
+ them). Deferring never drops a job and costs no budget.
36
+
37
+ Use them like this:
38
+
39
+ 1. **State the change in plain language first**, with the concrete before→after, so the operator reading the
40
+ confirm dialog knows exactly what they are approving (e.g. "I'll raise the daily cap from 25 to 30 — that
41
+ allows more paid jobs per day").
42
+ 2. **Call the tool.** The operator sees a confirm dialog with the exact change and approves or declines. You
43
+ do not answer it — only the human does.
44
+ 3. **Respect the answer.** If the result is `applied: false` (`reason: "operator declined"`), the operator
45
+ said no. Accept it and stop — do **not** retry the same change, rephrase it to get a yes, or try to route
46
+ around the confirm. If you believe the change is still needed, explain why and let the operator decide.
47
+ 4. **If a tool is refused because no interactive operator is available** (headless/print mode), report that
48
+ the change can't be made without an operator at the terminal — it is not a bug to work around.
49
+
50
+ The confirm is the approval step. Treat a decline as a final, legitimate answer.