@sjawhar/claude-envoy 6.23.0 → 6.24.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.
@@ -15,7 +15,7 @@
15
15
 
16
16
  import { rm } from "node:fs/promises"
17
17
  import { formatOpenAsksSummary } from "@legion/envoy-client/dispatch-execute"
18
- import { DispatchClient } from "@legion/envoy-client/dispatch-http"
18
+ import { AnswerCut, DispatchClient } from "@legion/envoy-client/dispatch-http"
19
19
  import { messageFor } from "@legion/envoy-client/errors"
20
20
  import { sessionConfigFile, sessionDispatchSettings } from "@legion/envoy-client/session-settings"
21
21
  import { z } from "zod"
@@ -140,11 +140,15 @@ async function sessionStart(raw: unknown): Promise<void> {
140
140
  }
141
141
  process.stdout.write(`${CODEX_DISPATCH_NOTE}\n\n`)
142
142
  try {
143
+ // Under a token that carries a cut, Dispatch answers at that cut: the summary names a person
144
+ // that the answer left out as left out at the cut, as `dispatch open-asks` does, not as
145
+ // `asked of nobody`, and prints no `Left out at <cut>:` line (session-hook.ts's `openAsks`).
146
+ const cut = new AnswerCut()
143
147
  const snapshot = await new DispatchClient(dispatch.url, dispatch.credential, fetch, {
144
148
  signal: AbortSignal.timeout(OPEN_ASKS_TIMEOUT_MS),
145
- }).openAsks(input.session_id)
149
+ }).openAsks(input.session_id, undefined, cut)
146
150
  process.stdout.write(
147
- `Dispatch authored-ask summary:\n${formatOpenAsksSummary(snapshot, dispatch.publicUrl ?? dispatch.url)}\n`,
151
+ `Dispatch authored-ask summary:\n${formatOpenAsksSummary(snapshot, dispatch.publicUrl ?? dispatch.url, { asOf: cut.cut })}\n`,
148
152
  )
149
153
  } catch (error) {
150
154
  process.stdout.write(`Dispatch authored-ask summary unavailable: ${messageFor(error)}\n`)
@@ -96,7 +96,7 @@ import {
96
96
  dispatchFirstSkillFile,
97
97
  readDispatchFirstContext,
98
98
  } from "@legion/envoy-client/dispatch-first"
99
- import { DispatchClient } from "@legion/envoy-client/dispatch-http"
99
+ import { AnswerCut, DispatchClient } from "@legion/envoy-client/dispatch-http"
100
100
  import { sessionDirectory, writeAtomically } from "@legion/envoy-client/dispatch-session-directory"
101
101
  import { offWithError } from "@legion/envoy-client/envoy-config"
102
102
  import { hasErrnoCode, messageFor } from "@legion/envoy-client/errors"
@@ -376,11 +376,17 @@ async function openAsks(raw: unknown): Promise<void> {
376
376
  for (const warning of warnings) process.stdout.write(`envoy: ${warning}\n`)
377
377
  if (dispatch.enabled) {
378
378
  try {
379
+ // Under a token that carries a cut (a replayed agent's), Dispatch answers at that cut and
380
+ // leaves out the person an ask waits on where it rests on a default the records cannot
381
+ // give: the summary names a person that the answer left out as left out at the cut, as
382
+ // `dispatch open-asks` does, not as `asked of nobody`, and prints no `Left out at <cut>:`
383
+ // line.
384
+ const cut = new AnswerCut()
379
385
  const snapshot = await new DispatchClient(dispatch.url, dispatch.credential, fetch, {
380
386
  deadlineMs: OPEN_ASKS_TIMEOUT_MS,
381
- }).openAsks(input.session_id)
387
+ }).openAsks(input.session_id, undefined, cut)
382
388
  process.stdout.write(
383
- `Dispatch authored-ask summary:\n${formatOpenAsksSummary(snapshot, linkBaseOf(dispatch.publicUrl ?? dispatch.url))}\n`,
389
+ `Dispatch authored-ask summary:\n${formatOpenAsksSummary(snapshot, linkBaseOf(dispatch.publicUrl ?? dispatch.url), { asOf: cut.cut })}\n`,
384
390
  )
385
391
  } catch (error) {
386
392
  process.stdout.write(`Dispatch authored-ask summary unavailable: ${messageFor(error)}\n`)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/claude-envoy",
3
- "version": "6.23.0",
3
+ "version": "6.24.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Claude Code plugin for Legion's Envoy bus",
6
6
  "type": "module",