mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
feat(config): add embedded pi project settings policy
This commit is contained in:
@@ -930,6 +930,10 @@ export const FIELD_HELP: Record<string, string> = {
|
||||
"User-prompt template used for the pre-compaction memory flush turn when generating memory candidates. Use this only when you need custom extraction instructions beyond the default memory flush behavior.",
|
||||
"agents.defaults.compaction.memoryFlush.systemPrompt":
|
||||
"System-prompt override for the pre-compaction memory flush turn to control extraction style and safety constraints. Use carefully so custom instructions do not reduce memory quality or leak sensitive context.",
|
||||
"agents.defaults.embeddedPi":
|
||||
"Embedded Pi runner hardening controls for how workspace-local Pi settings are trusted and applied in OpenClaw sessions.",
|
||||
"agents.defaults.embeddedPi.projectSettingsPolicy":
|
||||
'How embedded Pi handles workspace-local `.pi/config/settings.json`: "sanitize" (default) strips shellPath/shellCommandPrefix, "ignore" disables project settings entirely, and "trusted" applies project settings as-is.',
|
||||
"agents.defaults.humanDelay.mode": 'Delay style for block replies ("off", "natural", "custom").',
|
||||
"agents.defaults.humanDelay.minMs": "Minimum delay in ms for custom humanDelay (default: 800).",
|
||||
"agents.defaults.humanDelay.maxMs": "Maximum delay in ms for custom humanDelay (default: 2500).",
|
||||
|
||||
@@ -414,6 +414,8 @@ export const FIELD_LABELS: Record<string, string> = {
|
||||
"Compaction Memory Flush Soft Threshold",
|
||||
"agents.defaults.compaction.memoryFlush.prompt": "Compaction Memory Flush Prompt",
|
||||
"agents.defaults.compaction.memoryFlush.systemPrompt": "Compaction Memory Flush System Prompt",
|
||||
"agents.defaults.embeddedPi": "Embedded Pi",
|
||||
"agents.defaults.embeddedPi.projectSettingsPolicy": "Embedded Pi Project Settings Policy",
|
||||
"agents.defaults.heartbeat.directPolicy": "Heartbeat Direct Policy",
|
||||
"agents.list.*.heartbeat.directPolicy": "Heartbeat Direct Policy",
|
||||
"agents.defaults.heartbeat.suppressToolErrorWarnings": "Heartbeat Suppress Tool Error Warnings",
|
||||
|
||||
@@ -158,6 +158,16 @@ export type AgentDefaultsConfig = {
|
||||
contextPruning?: AgentContextPruningConfig;
|
||||
/** Compaction tuning and pre-compaction memory flush behavior. */
|
||||
compaction?: AgentCompactionConfig;
|
||||
/** Embedded Pi runner hardening and compatibility controls. */
|
||||
embeddedPi?: {
|
||||
/**
|
||||
* How embedded Pi should trust workspace-local `.pi/config/settings.json`.
|
||||
* - sanitize (default): apply project settings except shellPath/shellCommandPrefix
|
||||
* - ignore: ignore project settings entirely
|
||||
* - trusted: trust project settings as-is
|
||||
*/
|
||||
projectSettingsPolicy?: "trusted" | "sanitize" | "ignore";
|
||||
};
|
||||
/** Vector memory search configuration (per-agent overrides supported). */
|
||||
memorySearch?: MemorySearchConfig;
|
||||
/** Default thinking level when no /think directive is present. */
|
||||
|
||||
@@ -96,6 +96,14 @@ export const AgentDefaultsSchema = z
|
||||
})
|
||||
.strict()
|
||||
.optional(),
|
||||
embeddedPi: z
|
||||
.object({
|
||||
projectSettingsPolicy: z
|
||||
.union([z.literal("trusted"), z.literal("sanitize"), z.literal("ignore")])
|
||||
.optional(),
|
||||
})
|
||||
.strict()
|
||||
.optional(),
|
||||
thinkingDefault: z
|
||||
.union([
|
||||
z.literal("off"),
|
||||
|
||||
Reference in New Issue
Block a user