mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 10:10:45 +00:00
refactor: hide shared constants
This commit is contained in:
@@ -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" "$@"';
|
||||
|
||||
|
||||
@@ -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>;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user