@reinsjs/lowering-fetch 0.6.3 → 0.6.5

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/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # @reinsjs/lowering-fetch
2
2
 
3
+ ## 0.6.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 884c840: Session run status. Every `runLoop` run now starts with `core.tools_bound` (carrying `marksEnd: true`) and ends with exactly one end marker: `core.run_paused` as before, or the new model-invisible `core.run_ended` with `status: "done" | "handoff" | "error"`. `core.run_paused` gains `awaiting` (the pending calls waiting on an approval — with `requestedAt` —, a client tool or a sub-agent) and `stopped: true` for a user stop. A `core.error` the loop retries past, or one recorded for a throwing `pullInput`, gets no `run_ended`; an error that ends the run is written together with its `run_ended`.
8
+
9
+ `runStatusOf({ held, lastMarker })` classifies a session as running / paused / done / handoff / error / interrupted / idle / unknown from a lease flag and `lastRunMarker(timeline)`. `@reinsjs/store-pg` adds `pgRunStates(client, sessionIds)`: one SQL statement reads the leases and each session's last marker, so a session list never sees a gap between "lease released" and "outcome written". "Running" is only known for runs started through the server handler with a lease registry (`createAgent` + `pgStores`).
10
+
11
+ Log shape changes: on a resumed run `core.tools_bound` now comes before `core.run_resumed` / `core.approval_decision`, and `RunResult.lastSeq` of a done or handoff run points at its `run_ended`. Live streams carry one more event (a `CUSTOM` frame in AG-UI). The TanStack adapter writes `run_ended` too, but its `tools_bound` carries no `marksEnd` and its `run_paused` no `awaiting` / `stopped`. Lowerings drop `run_ended` like other operational events.
12
+
13
+ **Rolling upgrade:** `@reinsjs/core` 0.13 and earlier reject sessions that contain `core.run_ended` (unknown event type). Upgrade every instance to the same core version at once, and do not roll back past 0.14 once such sessions exist. Sessions whose last run finished before the upgrade read `unknown`.
14
+
15
+ - Updated dependencies [884c840]
16
+ - @reinsjs/core@0.14.0
17
+
18
+ ## 0.6.4
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies [fba2410]
23
+ - @reinsjs/core@0.13.0
24
+
3
25
  ## 0.6.3
4
26
 
5
27
  ### Patch Changes
package/dist/index.js CHANGED
@@ -352,6 +352,9 @@ var NOT_SENT = {
352
352
  "marks that a call began executing, for resume and stop handling; the model learns the outcome from tool_result"
353
353
  )
354
354
  ],
355
+ "core.run_ended": [
356
+ dropped("none", "marks how a run ended, for hosts tracking session status; the model never sees it")
357
+ ],
355
358
  "core.error": [
356
359
  dropped(
357
360
  "none",
@@ -703,6 +706,7 @@ function eventsToIr(input) {
703
706
  case "core.handoff":
704
707
  case "core.tools_bound":
705
708
  case "core.tool_started":
709
+ case "core.run_ended":
706
710
  case "core.error":
707
711
  items.push({ kind: "dropped", event: e, note: NOT_SENT_NOTE });
708
712
  break;