import { type Session, type SessionEvent } from '@deepseek-ai/dsh-session'; import type { ChannelSession, PartnerState } from '../domain.js'; import type { Context } from '@deepseek-ai/cordis'; import type { Agent } from '@deepseek-ai/dsh-agent'; export interface NativeJobOrigin { jobId: string; sessionId: string; inputId: string; owner: string; routeId: string; channelId: string; userId: string; accountId: string; baseUrl: string; targetId: string; } declare module '@deepseek-ai/dsh-session/types' { interface PluginRecordMap { 'plugin:dsh-partner/native-job-origin': NativeJobOrigin; } } /** Include native jobs in Partner's busy indicator, even when its agent is idle. */ export declare function nativeJobActivity(ctx: Context, sessionId: string, events: () => readonly SessionEvent[], channelId?: string): Array<{ kind: string; label: string; sessionId: string; }>; /** Keep completed jobs in their own native turns when another user or route is present. */ export declare function installNativeJobTurns(ctx: Context, owns: (agent: Agent) => boolean): () => void; /** Record only delivery ownership; native Jobs owns execution, status, output and UI. */ export declare function recordNativeJobOrigin(session: Session, event: SessionEvent, state: PartnerState): void; /** A native completion has a proven original input; it never borrows a newer speaker's route. */ export declare function nativeJobCompletion(sessionId: string, events: readonly SessionEvent[]): { jobIds: string[]; origin: NativeJobOrigin; notice: Extract; input: Extract; } | undefined; export declare function nativeJobRoute(state: PartnerState, origin: NativeJobOrigin): ChannelSession | undefined; //# sourceMappingURL=native-job-origin.d.ts.map