| import type { AgentInternalEvent } from "../../agents/internal-events.js"; |
| import type { ClientToolDefinition } from "../../agents/pi-embedded-runner/run/params.js"; |
| import type { SpawnedRunMetadata } from "../../agents/spawned-context.js"; |
| import type { ChannelOutboundTargetMode } from "../../channels/plugins/types.js"; |
| import type { InputProvenance } from "../../sessions/input-provenance.js"; |
|
|
| |
| export type ImageContent = { |
| type: "image"; |
| data: string; |
| mimeType: string; |
| }; |
|
|
| export type AgentStreamParams = { |
| |
| temperature?: number; |
| maxTokens?: number; |
| |
| fastMode?: boolean; |
| }; |
|
|
| export type AgentRunContext = { |
| messageChannel?: string; |
| accountId?: string; |
| groupId?: string | null; |
| groupChannel?: string | null; |
| groupSpace?: string | null; |
| currentChannelId?: string; |
| currentThreadTs?: string; |
| replyToMode?: "off" | "first" | "all"; |
| hasRepliedRef?: { value: boolean }; |
| }; |
|
|
| export type AgentCommandOpts = { |
| message: string; |
| |
| images?: ImageContent[]; |
| |
| clientTools?: ClientToolDefinition[]; |
| |
| agentId?: string; |
| to?: string; |
| sessionId?: string; |
| sessionKey?: string; |
| thinking?: string; |
| thinkingOnce?: string; |
| verbose?: string; |
| json?: boolean; |
| timeout?: string; |
| deliver?: boolean; |
| |
| replyTo?: string; |
| |
| replyChannel?: string; |
| |
| replyAccountId?: string; |
| |
| threadId?: string | number; |
| |
| messageChannel?: string; |
| channel?: string; |
| |
| accountId?: string; |
| |
| runContext?: AgentRunContext; |
| |
| senderIsOwner?: boolean; |
| |
| groupId?: SpawnedRunMetadata["groupId"]; |
| groupChannel?: SpawnedRunMetadata["groupChannel"]; |
| groupSpace?: SpawnedRunMetadata["groupSpace"]; |
| spawnedBy?: SpawnedRunMetadata["spawnedBy"]; |
| deliveryTargetMode?: ChannelOutboundTargetMode; |
| bestEffortDeliver?: boolean; |
| abortSignal?: AbortSignal; |
| lane?: string; |
| runId?: string; |
| extraSystemPrompt?: string; |
| internalEvents?: AgentInternalEvent[]; |
| inputProvenance?: InputProvenance; |
| |
| streamParams?: AgentStreamParams; |
| |
| workspaceDir?: SpawnedRunMetadata["workspaceDir"]; |
| }; |
|
|
| export type AgentCommandIngressOpts = Omit<AgentCommandOpts, "senderIsOwner"> & { |
| |
| senderIsOwner: boolean; |
| }; |
|
|