Dashboard › opencode › Distillation
d807f861-e1f6-4ec2-9d52-533154995adb["lore_tm_v1_eoOoo9o-88vjWVJzUNOayqwA2ASBGPO58WQPI2qLfjA"]
/home/byk/Code/opencode-v2-pilot/packages/core/src/plugin/agent.ts imports define from @opencode/plugin/effect/plugin, Effect from effect, Agent from ../agent.js, and Permission from ../permission.js; it exports AgentPlugin from ./agent.js and defines plugin ID opencode.agent.PROMPT_EXPLORE defines a file-search specialist skilled in glob matching, regex search, and file analysis; it directs use of Glob for broad patterns, Grep for regex content searches, and Read for known paths, with caller-selected thoroughness, absolute paths in final responses, no emojis, and no file creation or bash commands that modify system state."Analyzing"."read tool", "bash tool", and "edit tool"."the", "this", "my", "a", and "an"; and focus on what the user wants to do with a mentioned file rather than merely noting that it was shared."summarizing" or "generating", refuse to generate a title, or complain about the input."hello", "lol", "what's up", and "hey"; suggested intent labels include Greeting, Quick check-in, Light chat, and Intro message.PROMPT_TITLE provides nine ordered examples: 1. "debug 500 errors in production" β Debugging production 500 errors; 2. "refactor user service" β Refactoring user service; 3. "why is app.js failing" β app.js failure investigation; 4. "implement rate limiting" β Rate limiting implementation; 5. "how do I connect postgres to my API" β Postgres API connection; 6. "best practices for React hooks" β React hooks best practices; 7. "@src/credential.ts can you add refresh token support" β Credential refresh token support; 8. "@utils/parser.ts this is broken" β Parser bug fix; 9. "look at @config.json" β Config review; and 10. "@App.tsx add dark mode toggle" β Dark mode toggle in App.PROMPT_SUMMARY requires a pull-request-description style summary of 2β3 sentences maximum, describing changes rather than process, omitting tests/builds/validation and explanations of the userβs request, using first person such as "I added..." or "I fixed...", and adding no new questions."Now please run the command and paste the console output".packages/core/src/plugin/agent.ts, the opencode.agent plugin transforms Agent.defaultID into Build, described as "The default agent. Executes tools based on configured permissions.", sets mode = "primary", and appends permission { action: "question", resource: "*", effect: "allow" }.general into General, a subagent for researching complex questions and executing multiple units of work in parallel; it denies both question and subagent actions for resource "*".explore into Explore, a subagent specialized in codebase exploration through file patterns, keyword searches, and codebase questions; callers are instructed to specify "quick", "medium", or "very thorough" exploration.Explore, the plugin preserves existing permissions whose action === "external_directory" and effect === "allow" in externalDirectories.Explore uses PROMPT_EXPLORE as item.system and merges permissions in this order: deny all * actions/resources; allow grep, glob, webfetch, websearch, and read on "*"; ask before reading "*.env" and "*.env.*"; allow reading "*.env.example"; deny subagent; then ask for external_directory on "*" while retaining pre-existing allowed external-directory rules.compaction into Compaction, sets mode = "primary", and sets hidden = true.packages/core/src/plugin/agent.ts begins transforming agent ID title and sets its name to Title; subsequent configuration is below line 140 and was not included in the provided excerpt.