Skip to content

fix(agents): extend onAgentEvent callback type with sessionKey#12

Merged
timeleft-- merged 1 commit into
ga/1.0from
fix/onAgentEvent-sessionKey-type
May 2, 2026
Merged

fix(agents): extend onAgentEvent callback type with sessionKey#12
timeleft-- merged 1 commit into
ga/1.0from
fix/onAgentEvent-sessionKey-type

Conversation

@timeleft--
Copy link
Copy Markdown
Member

Summary

Adds sessionKey?: string to the onAgentEvent callback type in two locations:

  • src/agents/pi-embedded-subscribe.types.ts:33
  • src/agents/pi-embedded-runner/run/params.ts:121

Why

Cherry-pick 86fcceb9a5 (fix(agents): finalize embedded lifecycle backstop) accesses evt.sessionKey inside the onAgentEvent callback at src/auto-reply/reply/agent-runner-execution.ts:1109. The type-extension that adds sessionKey?: string to the callback signature is in upstream commit 1184925572 (fix(ci): speed up release validation live probes) — a CI-perf commit that bundled an unrelated type extension. We correctly excluded 1184925572 under D8 (not backport-eligible: it's a perf/refactor, not a fix), but missed that the lifecycle backstop depends on the type subset.

Without this fix, pnpm build (specifically build:plugin-sdk:dts) fails with TS2339 and the release tarball never builds. This caused KissClaw run 25261002727 to fail.

Triage classification

Type-only extension. No runtime behavior change. Narrowly scoped to two callback declarations — the smallest viable fix.

Test plan

  • pnpm install --frozen-lockfile succeeds
  • pnpm build succeeds locally (was failing before this commit)
  • CI build passes after merge
  • Subsequent v1.0.1-rc.2 release builds tarball + sha256 + metadata assets

The lifecycle backstop cherry-pick (`fix(agents): finalize embedded
lifecycle backstop`) accesses `evt.sessionKey` inside the `onAgentEvent`
callback in `agent-runner-execution.ts`, but the callback type
declared in `pi-embedded-subscribe.types.ts` and `pi-embedded-runner/
run/params.ts` does not include `sessionKey`. This is the type-only
piece of upstream `1184925572` (a CI-perf commit that bundled an
unrelated type extension); we excluded that cherry-pick under D8 but
need the type-extension subset to keep the build green.

Without this, `pnpm build` (specifically `build:plugin-sdk:dts`) fails
with TS2339 in agent-runner-execution.ts:1109 and the release tarball
never builds.

Triage commit: type-only extension, no runtime change, narrowly scoped
to the two callback declarations.
@timeleft-- timeleft-- merged commit ecc6593 into ga/1.0 May 2, 2026
2 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant