@sjawhar/pi-legion 19.10.1 → 19.11.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/dist/legion.js CHANGED
@@ -28478,7 +28478,7 @@ import { logger as logger3 } from "@oh-my-pi/pi-utils";
28478
28478
  // package.json
28479
28479
  var package_default = {
28480
28480
  name: "@sjawhar/pi-legion",
28481
- version: "19.10.1",
28481
+ version: "19.11.0",
28482
28482
  license: "Apache-2.0",
28483
28483
  type: "module",
28484
28484
  omp: {
@@ -31,6 +31,8 @@ and 7 (a conflict, the hand-over, the close) is in
31
31
  | A reply on an ask you follow | Interpret the reply in the issue's design context. Answer in its thread (`dispatch comment --reply-to <comment id>`; under an open ask whose next move is yours, such as the approval request you must revise or hand back, `--reply-to-ask <ask id> --turn agent`, since a default-turn reply hands that request back to the human and a corrected `--summary` is then refused) where the reply carries a question, a disagreement, a correction or a fact you do not have, and whenever you are unsure; an approval, or an answer that settles the question with nothing left to say, draws no comment and no message back to the person who answered. Then adjust the plan or relay the reply via `envoy_publish` to the responsible worker's role token, which an answer needing nothing from you still needs; scope and product decisions remain with you. |
32
32
  | `worker-died` | Its `role` and `phase`. That role's claim failed: its launches or prompts ran out, or its provider refused every turn of its session (its `failure.detail` reads `the provider refused <n> turns in a row: <message>`). For a phase worker the daemon holds the issue (phase `held`) and starts nothing more on it. It carries `failure` as well (the notice of a held phase, and that of a role which does not work the issue's phase; the one that ends a closed issue's production-check look carries neither `failure` nor `phase`, its `reason` naming the cause already): `cause`, one cause word of the seven the daemon chooses from (`launch_refused`, `died`, `never_registered`, `stale_plugin`, `prompt_retires_exhausted`, `provider_error`, and `unrecorded` for a failure recorded before the daemon kept a cause), `detail`, the sentence written beside that word, `death` and `startFailure`, what the runtime and the launcher last said of this claim where it recorded either, and `launchFailures`, `deaths`, `promptFailures` and `promptRetires`, each a `count` beside the `limit` it ran out at. The claim's record in `read_record` carries the same `failure`, and the issue's `heldFrom` names the phase the hold took it out of. Reassess the work, then decide with `retry_or_escalate`: `retry` when the failure looks agent-specific or transient, `escalate` to hand the held issue to the controller when it looks environmental. `reason` is optional on either decision: a `retry`'s reaches the restarted worker's task, so say in it what you changed or what you want done differently, and an `escalate`'s reaches the controller as the `escalation` key of the `held` notice that records it, so say in it why the tree cannot go on without a decision of the controller's. A `retry` of a claim that failed on refusals starts a **new session**, since resuming the one the provider refused would be refused again: that worker has read none of its own earlier work, and is told so in its first task, which names its branch and the handoffs to read. Expect it to re-read before it continues, and tell it anything only you know. |
33
33
  | `worker-stalled` | Its `role` and `reason`. The daemon's stall backstop acted on that worker's stalled turn: its agent had not stepped for longer than the `worker_stall_backstop_hours` this deployment gives the role, and most often the daemon ended the turn and brought the same session back on a new process. The `reason` is the record the daemon read — when the agent last stepped and how long ago that was, the bound it passed, when the turn began, and the last call the daemon saw, with its tool, its call id, when it started and whether it ended — and never a call's arguments, whose text the daemon keeps in no column. It says what the daemon did as well, which is not always a relaunch: where the daemon's wake pacing parked the replacement, the task was taken back and the launch that replaces the stalled process is queued, due at the moment the notice names, and that process runs on until the launch's turn, which may start nothing — a suspension waiting for the claim, a refused lifecycle recheck or the tree's close can end the claim there instead; where a suspension was already waiting for that turn, that suspension ran instead of a replacement and the claim is suspended with nothing queued for it, waiting on a resume; where the launch that replaces the process could not be written, the daemon is still retrying that launch; and where every try at that launch was refused, the claim has failed, and the `worker-died` that comes with it is yours to answer as that row says. It says what became of the stalled process too, for every end but the parked one: that it was stopped, or that the runtime did not confirm the stop, in which case that process may be running still and holding what it runs on — tell the controller of that one, because the daemon stops it again only at its next launch of that claim or at its next restart. No second notice follows any of these unless the daemon restarts while a relaunch is parked, which decides the claim again. The task that worker was serving is still owed to it, and what its return waits on is the one the notice names — the parked launch's turn, the retried launch, or a resume; the stall itself charged the claim nothing, and no phase moved: on every end but the failed one the phase goes on by itself and you start nothing. Your part is to read what the record says the agent was doing and to judge whether that work needs a decision of yours — a call that hung on something the plan did not foresee is one, a turn that comes back and finishes is not. A stall of your own session reaches you the same way, on your own issue; when the stalled claim is a tree's architect, the controller is told of it too. |
34
+ | `worker-silent` | Its `role` and `reason`. That worker stopped between turns rather than inside one: its process is up, it holds no task, and its agent has not stepped for longer than the `worker_silence_minutes` this deployment sets, so nothing in the daemon and nothing in that process was going to prompt it again. The `reason` is the record the daemon read — the issue, the role, the phase, when the agent last stepped and how long ago that was — and it ends with what the daemon wrote about it, which is the start row that sends the phase's task again, under the assignment the phase row already names where it holds one. That row is written and the worker is coming back with its phase's resume task: read the issue's record with the `legion` tool's `read_record` to see where the phase stands, and start nothing yourself. The one thing that still refuses the start is a suspension an operator holds over the claim, which the outbox reads when it runs the row and which the `reason` names: ask the operator to resume that claim, and message the role on its topic (`envoy_publish`) where its phase cannot wait. It comes once for each silence, and a worker that takes a step and then goes quiet again is told again. |
35
+ | `worker-background-stalled` | Its `role` and `reason`. That worker's own session reports background work of its own — an async job, a subagent, a background task — still running, and it has reported the same thing without change for longer than the `worker_background_hours` this deployment sets. The `reason` is the record the daemon read: the issue, the role, the phase, the kinds the session named, when it last reported them and how long ago that was. Nothing was sent to that worker and nothing will be sent for this: the daemon cannot tell a job that hung from a long one, so it names the worker to you and decides nothing. Your part is to read what the session says it is waiting on and to judge whether that work needs a decision of its own — a job waiting on a surface that does not exist, or on a person, is one; a long build or a long test run is not. Read the issue's record with the `legion` tool's `read_record` for where the phase stands, then either leave the work to finish or message the role on its topic (`envoy_publish`) with what you decide. The worker is not prompted by the silence repair while it reports such work, so nothing else is coming for it either. It comes once for each standing report: a worker whose reported work changes — a job that ends and another that starts — is told of again under the new report. |
34
36
  | `held` | Its `role` and `phase` (the phase the issue left), or `phase` with `reason: "escalated"`. Without `reason`, that phase's worker ran out of launches or prompts: the issue is held (phase `held`), the notice carries the same `failure` record as the `worker-died` that comes with it, which is yours to answer with `retry_or_escalate` as that row says, and the controller hears of the hold too. With `reason: "escalated"`, it records your own `escalate`: the controller has the issue now, it carries no `failure`, and you start nothing for it. It carries `escalation` instead, your own `reason` from that `escalate`, and carries none where you named none: the controller reads it as your account of why the issue is its, beside the cause word in the claim's own `failure` record, so say in it what the tree cannot go on without. Your `retry` is not the only release: a `todo` written on a held root releases the hold the same way and at the same price of nothing, whoever writes it, so an issue you left held may be working that phase again when you next read it. |
35
37
 
36
38
  ## A root that joins your tree, and a refused release
@@ -190,7 +190,9 @@ where. Each issue you file carries a `Filed for` line:
190
190
  ## Daily report
191
191
 
192
192
  On your first turn of each UTC day, post what Legion finished, what it closed without a change
193
- and why, and what runs: `skill://legion-controller/references/daily-report.md`.
193
+ and why, what runs, and every issue whose phase worker nothing will prompt, which a tick names in
194
+ its `silent` list (`skill://legion-controller/references/wakes.md`):
195
+ `skill://legion-controller/references/daily-report.md`.
194
196
 
195
197
  ## Deployment instructions
196
198
 
@@ -67,6 +67,13 @@ every issue by its `dispatch://` link and what it does for the reader, every pul
67
67
  link's wait ends when each blocker reaches `done` (a person's close, or the blocker's own
68
68
  merge) or its link is taken off (by a person or the tree's architect), and a children-first wait
69
69
  ends when the last open child leaves the workflow, so take nothing for them.
70
+ - **Phase workers nothing will prompt.** Each entry of the tick's `silent` list, with the role whose
71
+ claim is silent and how long it has been quiet (`skill://legion-controller/references/wakes.md`).
72
+ That list arrives on the tick wake alone and is in no `read_state` field, so the report names the
73
+ most recent tick's list and says nothing of them on a day no tick carried one.
74
+ An entry with `backgroundSince` is a worker whose own background work has stood past `worker_background_hours`,
75
+ which the daemon does not prompt.
76
+ Name it with how long that work has stood, counted from `backgroundSince`.
70
77
  - **Free slots.** Counted as the skill's "Free slots" says, in issues rather than trees; each
71
78
  stays free until an issue in the line takes it.
72
79
  - **Open capabilities.** Each row of `read_state`'s `capabilities` whose `status` is `open`: its
@@ -32,7 +32,7 @@ child, so the issue it names may be either. Name the free slots; take nothing.
32
32
  daemon waits half a minute and folds that window's events into one wake. Take nothing: it is not
33
33
  Legion's.
34
34
 
35
- ## `tick on <PROJECT>` (`{kind: "tick", openCapabilities?, blocked?}`)
35
+ ## `tick on <PROJECT>` (`{kind: "tick", openCapabilities?, blocked?, silent?}`)
36
36
 
37
37
  The daemon's periodic wake, a minute after it starts and then every
38
38
  `controller_wake_interval_seconds` (an hour by default), whatever the slots. Run the skill's every-turn
@@ -57,6 +57,32 @@ link is taken off (by a person or the tree's architect), and a children-first wa
57
57
  last open child leaves the workflow: name the waits in the day's report and
58
58
  take nothing for them.
59
59
 
60
+ `silent`, when present, is `[{issue, role, lastStep, silent, backgroundSince?}, …]`: every issue whose phase worker
61
+ nothing will prompt, with the role whose claim is silent, the moment that claim's agent last
62
+ stepped, and how long it has been quiet.
63
+ Such a worker's process is up and between turns, it holds no task, and its last recorded step is
64
+ older than this deployment's `worker_silence_minutes`, so nothing in the daemon and nothing in the
65
+ worker's own process was going to prompt it again.
66
+ The daemon writes the start row that sends that phase's task again, and tells the issue's
67
+ architect the same fact in a `worker-silent` notice.
68
+ An entry with `backgroundSince` is a worker whose own background work has stood since that moment,
69
+ past `worker_background_hours`, which the daemon does not prompt; its architect got a `worker-background-stalled` notice.
70
+ Name it in the day's report with how long its background work has stood.
71
+ Most entries here are ones that architect has been told of, and an entry is not proof of it: this
72
+ list is derived at the tick from the record, where the notice is written by the sweep that runs
73
+ each minute, so an issue that went quiet since the last sweep is named here before its architect
74
+ hears anything.
75
+ One reading parts the two as well, and it leaves an issue named here whose architect is told
76
+ nothing: this list asks nothing of the claim's serving run, where the sweep's fact names it and the
77
+ handler refuses a fact of another generation.
78
+ So read the issue's record for every entry rather than taking its architect as told:
79
+ `read_state`'s `issues.<KEY>` gives its phase and each role's claim, and says whether the worker
80
+ has moved since the tick was queued.
81
+ Where the architect of that issue is itself a claim that is not answering — its claim reads
82
+ `failed`, or the Envoy registry shows its session gone — `fresh_session` on that architect, because
83
+ a notice sent to a claim that reads nothing reaches nobody and the work stands still.
84
+ Name each silent issue in the day's report, with its role and the length of its silence.
85
+
60
86
  ## `unslotted on <KEY>` (`{kind: "unslotted", reason}`)
61
87
 
62
88
  Either a root that waited for a slot was moved from `todo` to the status `reason` names, by a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/pi-legion",
3
- "version": "19.10.1",
3
+ "version": "19.11.0",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "omp": {