Files
openclaw/src/plugins/host-hook-turn-types.ts
Coder adcac404e1 fix(llm): repair invalid streaming unicode escapes
Repair invalid \u escapes during streaming JSON parsing without changing valid Unicode escapes. Split oversized node CI doctor/infra shards and fix the restart test mock deadlock so PR CI stays under the no-output threshold.\n\nCo-authored-by: Coder <83845889+coder999999999@users.noreply.github.com>
2026-05-30 20:53:26 +01:00

49 lines
1.1 KiB
TypeScript

import type { PluginJsonValue } from "./host-hook-json.js";
export type PluginNextTurnInjectionPlacement = "prepend_context" | "append_context";
export type PluginNextTurnInjection = {
sessionKey: string;
text: string;
idempotencyKey?: string;
placement?: PluginNextTurnInjectionPlacement;
ttlMs?: number;
metadata?: PluginJsonValue;
};
export type PluginNextTurnInjectionRecord = Omit<PluginNextTurnInjection, "sessionKey"> & {
id: string;
pluginId: string;
pluginName?: string;
createdAt: number;
placement: PluginNextTurnInjectionPlacement;
};
export type PluginNextTurnInjectionEnqueueResult = {
enqueued: boolean;
id: string;
sessionKey: string;
};
export type PluginAgentTurnPrepareEvent = {
prompt: string;
messages: unknown[];
queuedInjections: PluginNextTurnInjectionRecord[];
};
export type PluginAgentTurnPrepareResult = {
prependContext?: string;
appendContext?: string;
};
export type PluginHeartbeatPromptContributionEvent = {
sessionKey?: string;
agentId?: string;
heartbeatName?: string;
};
export type PluginHeartbeatPromptContributionResult = {
prependContext?: string;
appendContext?: string;
};