mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 10:20:42 +00:00
refactor: trim bootstrap local exports
This commit is contained in:
@@ -3,14 +3,14 @@ import { normalizeOptionalString } from "../shared/string-coerce.js";
|
||||
import type { EmbeddedContextFile } from "./pi-embedded-helpers.js";
|
||||
import type { WorkspaceBootstrapFile } from "./workspace.js";
|
||||
|
||||
export const DEFAULT_BOOTSTRAP_NEAR_LIMIT_RATIO = 0.85;
|
||||
export const DEFAULT_BOOTSTRAP_PROMPT_WARNING_MAX_FILES = 3;
|
||||
export const DEFAULT_BOOTSTRAP_PROMPT_WARNING_SIGNATURE_HISTORY_MAX = 32;
|
||||
const DEFAULT_BOOTSTRAP_NEAR_LIMIT_RATIO = 0.85;
|
||||
const DEFAULT_BOOTSTRAP_PROMPT_WARNING_MAX_FILES = 3;
|
||||
const DEFAULT_BOOTSTRAP_PROMPT_WARNING_SIGNATURE_HISTORY_MAX = 32;
|
||||
|
||||
export type BootstrapTruncationCause = "per-file-limit" | "total-limit";
|
||||
export type BootstrapPromptWarningMode = "off" | "once" | "always";
|
||||
type BootstrapTruncationCause = "per-file-limit" | "total-limit";
|
||||
type BootstrapPromptWarningMode = "off" | "once" | "always";
|
||||
|
||||
export type BootstrapInjectionStat = {
|
||||
type BootstrapInjectionStat = {
|
||||
name: string;
|
||||
path: string;
|
||||
missing: boolean;
|
||||
@@ -19,12 +19,12 @@ export type BootstrapInjectionStat = {
|
||||
truncated: boolean;
|
||||
};
|
||||
|
||||
export type BootstrapAnalyzedFile = BootstrapInjectionStat & {
|
||||
type BootstrapAnalyzedFile = BootstrapInjectionStat & {
|
||||
nearLimit: boolean;
|
||||
causes: BootstrapTruncationCause[];
|
||||
};
|
||||
|
||||
export type BootstrapBudgetAnalysis = {
|
||||
type BootstrapBudgetAnalysis = {
|
||||
files: BootstrapAnalyzedFile[];
|
||||
truncatedFiles: BootstrapAnalyzedFile[];
|
||||
nearLimitFiles: BootstrapAnalyzedFile[];
|
||||
@@ -40,14 +40,14 @@ export type BootstrapBudgetAnalysis = {
|
||||
};
|
||||
};
|
||||
|
||||
export type BootstrapPromptWarning = {
|
||||
type BootstrapPromptWarning = {
|
||||
signature?: string;
|
||||
warningShown: boolean;
|
||||
lines: string[];
|
||||
warningSignaturesSeen: string[];
|
||||
};
|
||||
|
||||
export type BootstrapTruncationReportMeta = {
|
||||
type BootstrapTruncationReportMeta = {
|
||||
warningMode: BootstrapPromptWarningMode;
|
||||
warningShown: boolean;
|
||||
promptWarningSignature?: string;
|
||||
|
||||
@@ -22,7 +22,7 @@ import {
|
||||
} from "./workspace.js";
|
||||
|
||||
export type BootstrapContextMode = "full" | "lightweight";
|
||||
export type BootstrapContextRunKind = "default" | "heartbeat" | "cron";
|
||||
type BootstrapContextRunKind = "default" | "heartbeat" | "cron";
|
||||
|
||||
const CONTINUATION_SCAN_MAX_TAIL_BYTES = 256 * 1024;
|
||||
const CONTINUATION_SCAN_MAX_RECORDS = 500;
|
||||
|
||||
@@ -7,15 +7,12 @@ import {
|
||||
type BundleMcpServerConfig,
|
||||
} from "../plugins/bundle-mcp.js";
|
||||
|
||||
export type MergedBundleMcpConfig = {
|
||||
type MergedBundleMcpConfig = {
|
||||
config: BundleMcpConfig;
|
||||
diagnostics: BundleMcpDiagnostic[];
|
||||
};
|
||||
|
||||
export type BundleMcpServerMapper = (
|
||||
server: BundleMcpServerConfig,
|
||||
name: string,
|
||||
) => BundleMcpServerConfig;
|
||||
type BundleMcpServerMapper = (server: BundleMcpServerConfig, name: string) => BundleMcpServerConfig;
|
||||
|
||||
const OPENCLAW_TRANSPORT_TO_CLI_BUNDLE_TYPE: Record<string, string> = {
|
||||
"streamable-http": "http",
|
||||
|
||||
Reference in New Issue
Block a user