mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 04:20:34 +00:00
fix(agents): split embedded run shared types
This commit is contained in:
19
src/agents/command/shared-types.ts
Normal file
19
src/agents/command/shared-types.ts
Normal 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;
|
||||
};
|
||||
};
|
||||
@@ -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;
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user