fix(agents): split embedded run shared types

This commit is contained in:
Vincent Koc
2026-04-09 08:22:37 +01:00
parent 8a07ac510b
commit dbcc574e1f
3 changed files with 23 additions and 22 deletions

View File

@@ -0,0 +1,19 @@
export type AgentStreamParams = {
/** Provider stream params override (best-effort). */
temperature?: number;
maxTokens?: number;
/** Provider fast-mode override (best-effort). */
fastMode?: boolean;
};
// Simplified tool definition for client-provided tools (OpenResponses hosted tools)
export type ClientToolDefinition = {
type: "function";
function: {
name: string;
description?: string;
parameters?: Record<string, unknown>;
/** Strict argument enforcement (Responses API). Propagated from the request. */
strict?: boolean;
};
};

View File

@@ -1,9 +1,9 @@
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 { PromptImageOrderEntry } from "../../media/prompt-image-order.js";
import type { InputProvenance } from "../../sessions/input-provenance.js";
import type { AgentStreamParams, ClientToolDefinition } from "./shared-types.js";
/** Image content block for Claude API multimodal messages. */
export type ImageContent = {
@@ -11,14 +11,7 @@ export type ImageContent = {
data: string;
mimeType: string;
};
export type AgentStreamParams = {
/** Provider stream params override (best-effort). */
temperature?: number;
maxTokens?: number;
/** Provider fast-mode override (best-effort). */
fastMode?: boolean;
};
export type { AgentStreamParams } from "./shared-types.js";
export type AgentRunContext = {
messageChannel?: string;

View File

@@ -7,23 +7,12 @@ import type { PromptImageOrderEntry } from "../../../media/prompt-image-order.js
import type { enqueueCommand } from "../../../process/command-queue.js";
import type { InputProvenance } from "../../../sessions/input-provenance.js";
import type { ExecElevatedDefaults, ExecToolDefaults } from "../../bash-tools.js";
import type { AgentStreamParams } from "../../command/types.js";
import type { AgentStreamParams, ClientToolDefinition } from "../../command/shared-types.js";
import type { AgentInternalEvent } from "../../internal-events.js";
import type { BlockReplyPayload } from "../../pi-embedded-payloads.js";
import type { BlockReplyChunking, ToolResultFormat } from "../../pi-embedded-subscribe.js";
import type { SkillSnapshot } from "../../skills.js";
// Simplified tool definition for client-provided tools (OpenResponses hosted tools)
export type ClientToolDefinition = {
type: "function";
function: {
name: string;
description?: string;
parameters?: Record<string, unknown>;
/** Strict argument enforcement (Responses API). Propagated from the request. */
strict?: boolean;
};
};
export type { ClientToolDefinition } from "../../command/shared-types.js";
export type EmbeddedRunTrigger = "cron" | "heartbeat" | "manual" | "memory" | "overflow" | "user";