mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-31 19:41:23 +00:00
refactor(agents): hide attempt policy types
This commit is contained in:
@@ -6,7 +6,7 @@ import type { CreateAgentSessionOptions } from "../../sessions/index.js";
|
||||
/**
|
||||
* Session construction bridge for embedded-attempt runs.
|
||||
*/
|
||||
export type EmbeddedAgentSessionOptions = {
|
||||
type EmbeddedAgentSessionOptions = {
|
||||
cwd: string;
|
||||
agentDir: string;
|
||||
authStorage: unknown;
|
||||
|
||||
@@ -6,13 +6,13 @@ import {
|
||||
type AcceptedSessionSpawn,
|
||||
} from "../../accepted-session-spawn.js";
|
||||
|
||||
export type AttemptTrajectoryTerminalStatus = "success" | "error" | "interrupted";
|
||||
type AttemptTrajectoryTerminalStatus = "success" | "error" | "interrupted";
|
||||
|
||||
/** Terminal error marker for runs that produced no user-visible delivery or durable progress. */
|
||||
export const NON_DELIVERABLE_TERMINAL_TURN_REASON = "non_deliverable_terminal_turn";
|
||||
|
||||
/** Normalized terminal status recorded for an embedded run attempt trajectory. */
|
||||
export type AttemptTrajectoryTerminal = {
|
||||
type AttemptTrajectoryTerminal = {
|
||||
status: AttemptTrajectoryTerminalStatus;
|
||||
terminalError?: typeof NON_DELIVERABLE_TERMINAL_TURN_REASON;
|
||||
};
|
||||
|
||||
@@ -24,7 +24,7 @@ export const TOOL_SEARCH_CONTROL_ALLOWLIST_NAMES = [
|
||||
type CollectAllowedToolNamesParams = Parameters<typeof collectAllowedToolNames>[0];
|
||||
|
||||
/** Derived tool allowlists used for visible prompt tools, replay tools, and empty-allowlist checks. */
|
||||
export type ToolSearchRunPlan = {
|
||||
type ToolSearchRunPlan = {
|
||||
visibleAllowedToolNames: Set<string>;
|
||||
replayAllowedToolNames: Set<string>;
|
||||
liveAllowedToolNames: Set<string>;
|
||||
|
||||
@@ -6,7 +6,7 @@ import type { ProviderRuntimeModel } from "../../../plugins/provider-runtime-mod
|
||||
import type { AgentRuntimePlan } from "../../runtime-plan/types.js";
|
||||
import { resolveTranscriptPolicy, type TranscriptPolicy } from "../../transcript-policy.js";
|
||||
|
||||
export type AttemptRuntimeModelContext = NonNullable<
|
||||
type AttemptRuntimeModelContext = NonNullable<
|
||||
Parameters<AgentRuntimePlan["transcript"]["resolvePolicy"]>[0]
|
||||
>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user