@paigy/harness 0.3.2 → 0.3.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.
Files changed (4) hide show
  1. package/README.md +39 -1
  2. package/dist/cli.js +32944 -29118
  3. package/dist/main.js +4768 -1126
  4. package/package.json +1 -1
package/README.md CHANGED
@@ -101,6 +101,40 @@ empty box. Note also that presence is **not** in the E2EE lane (`e2ee/flow.md` c
101
101
  notifications and responses) — which is why the publisher clips each line and shortens
102
102
  absolute paths to their last two segments before it leaves the machine.
103
103
 
104
+ ## The broker has a space too
105
+
106
+ > Owner, 2026-08-28: *"i feel like the desktop app also needs a space for the broker, and
107
+ > the queue of things to deal with after that."*
108
+
109
+ Every agent on this Mac had a face on the perch and a page behind it. **Paigy** — the one
110
+ actually holding the work, since a note is a request addressed to the broker — had none,
111
+ even though this is the machine its sweep runs on (`paigy-harness triage`, #1255). You
112
+ could produce a proposal here and then had to pick up a phone to act on it.
113
+
114
+ So the home screen gains a **broker card** (the mark, and one standing sentence: how many
115
+ open notes, when it last swept, whether something is waiting on a click), and behind it a
116
+ **page**:
117
+
118
+ - **What Paigy suggests** — `GET /api/triage`'s open proposal, grouped exactly as the
119
+ phone groups it: close, stale, and one card per hatchling with the queue it would
120
+ receive underneath it. One button per group, `POST /api/triage/:id/accept` with no
121
+ `noteIds` — the same endpoint the phone's button and the CLI's `--apply` hit, so the
122
+ three doors cannot mean three different things by "accept". **Nothing on the page has
123
+ happened**; accepting is the user's, always.
124
+ - **The queue** — every open note, longest-ignored first, with its assignee and the same
125
+ deterministic `why` a sweep would quote (`no movement in 40 days`). Opening a note and
126
+ answering it still belongs to the phone; this is the *shape of the pile*, which is what
127
+ the machine can say.
128
+ - **Sweep the queue** — calls `runTriage` directly, not our own CLI: it is already a
129
+ function with injected network deps, and a shell-out would read the DEFAULT `~/.paigy`
130
+ slot while this window is deliberately the `Desktop` one. A refusal (no judge on this
131
+ machine) stays on screen with the exact install line; a clean run's transcript goes,
132
+ because the cards it just produced say it better.
133
+
134
+ `src/broker.ts` is the whole read, and it computes nothing of its own: the queue is
135
+ `noteSignals()` — literally the dossier the sweep judges — so the card and the proposal
136
+ above it can never disagree about what "open" or "40 days idle" means.
137
+
104
138
  ## The catalog and the doctor
105
139
 
106
140
  The other thing Buzz got right: connecting a harness should be a status line and a
@@ -130,6 +164,9 @@ src/harness/ events.ts the neutral HarnessEvent the driver produces
130
164
  src/paigy/ level.ts event → NotifyLevel
131
165
  bridge.ts mirror turns, ask permissions/questions, setup nudges
132
166
  conversation.ts the round trip — your words into a running agent's stdin
167
+ src/triage/ evidence.ts the deterministic signals; judge.ts the one model boundary
168
+ verdict.ts the prompt + its defensive parser; triage.ts the sweep itself
169
+ src/broker.ts what Paigy is HOLDING — the open queue + the one open proposal, one read
133
170
  src/run.ts the whole bridge, Electron-free — what main.ts and cli.ts both drive
134
171
  src/main.ts Electron main; renderer/ is a doctor, a form and a log
135
172
  src/cli.ts `paigy-harness` — the same bridge from a terminal or a service unit
@@ -216,7 +253,8 @@ node apps/desktop/dist/cli.js host --grant ~/projects # standby, launchable fr
216
253
  ```
217
254
 
218
255
  The window deliberately has NO run form — launching moved to the phone (companion.md).
219
- It shows pairing, the doctor, the workspace allow-list, a Stop button, and the log.
256
+ It shows pairing, the party, the broker's card and queue, the doctor, the workspace
257
+ allow-list, a Stop button, and the log.
220
258
 
221
259
  Headless flags: `--harness claude|codex`, `--mode bypass|ask`, `--cwd DIR`,
222
260
  `--identity NAME`, `--grace SECONDS`, `--doctor`; subcommands `host [--grant DIR]…`