refactor: hide shared constants

This commit is contained in:
Peter Steinberger
2026-05-02 08:29:19 +01:00
parent a483de1787
commit 2f0c9358b1
4 changed files with 4 additions and 4 deletions

View File

@@ -17,7 +17,7 @@ import fs from "node:fs";
* `params.env` for per-child overrides.
*/
export const CHILD_OOM_SCORE_ADJ_ENV_KEY = "OPENCLAW_CHILD_OOM_SCORE_ADJ";
const CHILD_OOM_SCORE_ADJ_ENV_KEY = "OPENCLAW_CHILD_OOM_SCORE_ADJ";
const OOM_SCORE_WRAP_SHELL = "/bin/sh";
const OOM_SCORE_WRAP_SCRIPT = 'echo 1000 > /proc/self/oom_score_adj 2>/dev/null; exec "$0" "$@"';

View File

@@ -17,7 +17,7 @@ const STANDALONE_HTML_ERROR_HINT_RE =
export const MALFORMED_STREAMING_FRAGMENT_ERROR_MESSAGE =
"OpenClaw transport error: malformed_streaming_fragment";
export const MALFORMED_STREAMING_FRAGMENT_USER_MESSAGE =
const MALFORMED_STREAMING_FRAGMENT_USER_MESSAGE =
"LLM streaming response contained a malformed fragment. Please try again.";
type ErrorPayload = Record<string, unknown>;

View File

@@ -1,6 +1,6 @@
import type { AgentMessage } from "@mariozechner/pi-agent-core";
export const GOOGLE_TURN_ORDER_BOOTSTRAP_TEXT = "(session bootstrap)";
const GOOGLE_TURN_ORDER_BOOTSTRAP_TEXT = "(session bootstrap)";
export function sanitizeGoogleAssistantFirstOrdering(messages: AgentMessage[]): AgentMessage[] {
const first = messages[0] as { role?: unknown; content?: unknown } | undefined;

View File

@@ -2,7 +2,7 @@ import { normalizeOptionalString } from "./string-coerce.js";
export const NODE_PRESENCE_ALIVE_EVENT = "node.presence.alive";
export const NODE_PRESENCE_ALIVE_REASONS = [
const NODE_PRESENCE_ALIVE_REASONS = [
"background",
"silent_push",
"bg_app_refresh",