Skip to content

Commit bc0de22

Browse files
dcramercodex
andcommitted
fix(events): Use bound dispatch options for event prompts
Keep event prompt dispatches on the runtime-bound options type after delegated credential support split plugin input from persisted dispatch records. This preserves the no-credential event prompt path without widening createOrGetDispatch. Refs GH-435 Co-Authored-By: GPT-5 Codex <codex@openai.com>
1 parent 8538648 commit bc0de22

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

packages/junior/src/chat/events/dispatch.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import {
66
import { scheduleDispatchCallback } from "@/chat/agent-dispatch/signing";
77
import { validateDispatchOptions } from "@/chat/agent-dispatch/validation";
88
import type {
9+
BoundDispatchOptions,
910
DispatchCreateResult,
10-
DispatchOptions,
1111
DispatchRecord,
1212
} from "@/chat/agent-dispatch/types";
1313
import type { ParsedEventBinding } from "@/chat/events/bindings";
@@ -146,7 +146,7 @@ function buildEventRunPrompt(args: {
146146

147147
function resolveSlackDestination(
148148
envelope: AgentEventEnvelope,
149-
): DispatchOptions["destination"] {
149+
): BoundDispatchOptions["destination"] {
150150
const teamId =
151151
typeof envelope.scope.teamId === "string" ? envelope.scope.teamId : "";
152152
const channelId =
@@ -208,7 +208,7 @@ export async function dispatchEventPromptRuns(
208208
definition: match.definition,
209209
envelope,
210210
});
211-
const options: DispatchOptions = {
211+
const options: BoundDispatchOptions = {
212212
idempotencyKey: `event:${match.binding.id}:${envelope.sourceEventId}`,
213213
destination: resolveSlackDestination(envelope),
214214
input: buildEventRunPrompt({

0 commit comments

Comments
 (0)