mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 05:40:42 +00:00
Merged via squash.
Prepared head SHA: 68e5f2ce19
Co-authored-by: 100yenadmin <239388517+100yenadmin@users.noreply.github.com>
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Reviewed-by: @jalehman
50 lines
1.2 KiB
TypeScript
50 lines
1.2 KiB
TypeScript
import type { AgentMessage } from "@mariozechner/pi-agent-core";
|
|
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: AgentMessage[] | 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;
|
|
};
|