Skip to content

Commit 2172730

Browse files
committed
refactor: trim bootstrap local exports
1 parent ccd4342 commit 2172730

3 files changed

Lines changed: 13 additions & 16 deletions

File tree

src/agents/bootstrap-budget.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ import { normalizeOptionalString } from "../shared/string-coerce.js";
33
import type { EmbeddedContextFile } from "./pi-embedded-helpers.js";
44
import type { WorkspaceBootstrapFile } from "./workspace.js";
55

6-
export const DEFAULT_BOOTSTRAP_NEAR_LIMIT_RATIO = 0.85;
7-
export const DEFAULT_BOOTSTRAP_PROMPT_WARNING_MAX_FILES = 3;
8-
export const DEFAULT_BOOTSTRAP_PROMPT_WARNING_SIGNATURE_HISTORY_MAX = 32;
6+
const DEFAULT_BOOTSTRAP_NEAR_LIMIT_RATIO = 0.85;
7+
const DEFAULT_BOOTSTRAP_PROMPT_WARNING_MAX_FILES = 3;
8+
const DEFAULT_BOOTSTRAP_PROMPT_WARNING_SIGNATURE_HISTORY_MAX = 32;
99

10-
export type BootstrapTruncationCause = "per-file-limit" | "total-limit";
11-
export type BootstrapPromptWarningMode = "off" | "once" | "always";
10+
type BootstrapTruncationCause = "per-file-limit" | "total-limit";
11+
type BootstrapPromptWarningMode = "off" | "once" | "always";
1212

13-
export type BootstrapInjectionStat = {
13+
type BootstrapInjectionStat = {
1414
name: string;
1515
path: string;
1616
missing: boolean;
@@ -19,12 +19,12 @@ export type BootstrapInjectionStat = {
1919
truncated: boolean;
2020
};
2121

22-
export type BootstrapAnalyzedFile = BootstrapInjectionStat & {
22+
type BootstrapAnalyzedFile = BootstrapInjectionStat & {
2323
nearLimit: boolean;
2424
causes: BootstrapTruncationCause[];
2525
};
2626

27-
export type BootstrapBudgetAnalysis = {
27+
type BootstrapBudgetAnalysis = {
2828
files: BootstrapAnalyzedFile[];
2929
truncatedFiles: BootstrapAnalyzedFile[];
3030
nearLimitFiles: BootstrapAnalyzedFile[];
@@ -40,14 +40,14 @@ export type BootstrapBudgetAnalysis = {
4040
};
4141
};
4242

43-
export type BootstrapPromptWarning = {
43+
type BootstrapPromptWarning = {
4444
signature?: string;
4545
warningShown: boolean;
4646
lines: string[];
4747
warningSignaturesSeen: string[];
4848
};
4949

50-
export type BootstrapTruncationReportMeta = {
50+
type BootstrapTruncationReportMeta = {
5151
warningMode: BootstrapPromptWarningMode;
5252
warningShown: boolean;
5353
promptWarningSignature?: string;

src/agents/bootstrap-files.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import {
2222
} from "./workspace.js";
2323

2424
export type BootstrapContextMode = "full" | "lightweight";
25-
export type BootstrapContextRunKind = "default" | "heartbeat" | "cron";
25+
type BootstrapContextRunKind = "default" | "heartbeat" | "cron";
2626

2727
const CONTINUATION_SCAN_MAX_TAIL_BYTES = 256 * 1024;
2828
const CONTINUATION_SCAN_MAX_RECORDS = 500;

src/agents/bundle-mcp-config.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,12 @@ import {
77
type BundleMcpServerConfig,
88
} from "../plugins/bundle-mcp.js";
99

10-
export type MergedBundleMcpConfig = {
10+
type MergedBundleMcpConfig = {
1111
config: BundleMcpConfig;
1212
diagnostics: BundleMcpDiagnostic[];
1313
};
1414

15-
export type BundleMcpServerMapper = (
16-
server: BundleMcpServerConfig,
17-
name: string,
18-
) => BundleMcpServerConfig;
15+
type BundleMcpServerMapper = (server: BundleMcpServerConfig, name: string) => BundleMcpServerConfig;
1916

2017
const OPENCLAW_TRANSPORT_TO_CLI_BUNDLE_TYPE: Record<string, string> = {
2118
"streamable-http": "http",

0 commit comments

Comments
 (0)