fix(agents): extend onAgentEvent callback type with sessionKey#12
Merged
Conversation
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.
This was referenced May 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
sessionKey?: stringto theonAgentEventcallback type in two locations:src/agents/pi-embedded-subscribe.types.ts:33src/agents/pi-embedded-runner/run/params.ts:121Why
Cherry-pick
86fcceb9a5(fix(agents): finalize embedded lifecycle backstop) accessesevt.sessionKeyinside theonAgentEventcallback atsrc/auto-reply/reply/agent-runner-execution.ts:1109. The type-extension that addssessionKey?: stringto the callback signature is in upstream commit1184925572(fix(ci): speed up release validation live probes) — a CI-perf commit that bundled an unrelated type extension. We correctly excluded1184925572under 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(specificallybuild: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-lockfilesucceedspnpm buildsucceeds locally (was failing before this commit)