mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 07:40:44 +00:00
refactor: trim agent type exports
This commit is contained in:
@@ -11,7 +11,7 @@ import {
|
||||
type EmbeddedAgentRuntime,
|
||||
} from "./pi-embedded-runner/runtime.js";
|
||||
|
||||
export type AgentRuntimeMetadata = {
|
||||
type AgentRuntimeMetadata = {
|
||||
id: string;
|
||||
fallback?: "pi" | "none";
|
||||
source: "env" | "agent" | "defaults" | "implicit";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export type AnnounceIdFromChildRunParams = {
|
||||
type AnnounceIdFromChildRunParams = {
|
||||
childSessionKey: string;
|
||||
childRunId: string;
|
||||
};
|
||||
|
||||
@@ -7,7 +7,7 @@ export const CONTEXT_WINDOW_WARN_BELOW_TOKENS = 8_000;
|
||||
const CONTEXT_WINDOW_HARD_MIN_RATIO = 0.1;
|
||||
const CONTEXT_WINDOW_WARN_BELOW_RATIO = 0.2;
|
||||
|
||||
export type ContextWindowSource = "model" | "modelsConfig" | "agentContextTokens" | "default";
|
||||
type ContextWindowSource = "model" | "modelsConfig" | "agentContextTokens" | "default";
|
||||
|
||||
export type ContextWindowInfo = {
|
||||
tokens: number;
|
||||
@@ -62,19 +62,19 @@ export function resolveContextWindowInfo(params: {
|
||||
return baseInfo;
|
||||
}
|
||||
|
||||
export type ContextWindowGuardResult = ContextWindowInfo & {
|
||||
type ContextWindowGuardResult = ContextWindowInfo & {
|
||||
hardMinTokens: number;
|
||||
warnBelowTokens: number;
|
||||
shouldWarn: boolean;
|
||||
shouldBlock: boolean;
|
||||
};
|
||||
|
||||
export type ContextWindowGuardThresholds = {
|
||||
type ContextWindowGuardThresholds = {
|
||||
hardMinTokens: number;
|
||||
warnBelowTokens: number;
|
||||
};
|
||||
|
||||
export type ContextWindowGuardHint = {
|
||||
type ContextWindowGuardHint = {
|
||||
endpointClass: ReturnType<typeof resolveProviderEndpoint>["endpointClass"];
|
||||
likelySelfHosted: boolean;
|
||||
};
|
||||
|
||||
@@ -4,7 +4,7 @@ import { normalizeLowercaseStringOrEmpty } from "../shared/string-coerce.js";
|
||||
import { liveProvidersShareOwningPlugin } from "./live-provider-owner.js";
|
||||
import { normalizeProviderId } from "./provider-id.js";
|
||||
|
||||
export type ModelRef = {
|
||||
type ModelRef = {
|
||||
provider?: string | null;
|
||||
id?: string | null;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user