Add plan agent system prompt and permission configuration to OmO-Plan

Completes the OmO-Plan implementation by providing the READ-ONLY system prompt
and permission configuration that enforce plan-specific constraints. This ensures
OmO-Plan operates in pure analysis and planning mode without file modifications.

Fixes: #77
References: #72, #75

🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
YeonGyu-Kim
2025-12-17 09:37:32 +09:00
parent 0625ebba5c
commit f6a5096410
2 changed files with 94 additions and 1 deletions

View File

@@ -50,6 +50,7 @@ import { BackgroundManager } from "./features/background-agent";
import { createBuiltinMcps } from "./mcp";
import { OhMyOpenCodeConfigSchema, type OhMyOpenCodeConfig, type HookName } from "./config";
import { log, deepMerge } from "./shared";
import { PLAN_SYSTEM_PROMPT, PLAN_PERMISSION } from "./agents/plan-prompt";
import * as fs from "fs";
import * as path from "path";
import * as os from "os";
@@ -313,11 +314,15 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => {
const omoPlanOverride = pluginConfig.agents?.["OmO-Plan"];
const omoPlanBase = {
...planConfigWithoutName,
prompt: PLAN_SYSTEM_PROMPT,
permission: PLAN_PERMISSION,
description: `${config.agent?.plan?.description ?? "Plan agent"} (OhMyOpenCode version)`,
color: config.agent?.plan?.color ?? "#6495ED",
};
const omoPlanConfig = omoPlanOverride ? deepMerge(omoPlanBase, omoPlanOverride) : omoPlanBase;
const omoPlanConfig = omoPlanOverride
? { ...omoPlanBase, ...omoPlanOverride }
: omoPlanBase;
config.agent = {
OmO: builtinAgents.OmO,