MCPcopy Index your code
hub / github.com/CloudAI-X/opencode-workflow / VerificationPlugin

Function VerificationPlugin

plugins/verification.ts:9–28  ·  view source on GitHub ↗
({})

Source from the content-addressed store, hash-verified

7let lastSuggestion = 0
8
9export const VerificationPlugin = async ({}) => {
10 return {
11 event: async ({ event }) => {
12 if (event.type === "file.edited") {
13 const filePath = (event as any).path || ""
14 if (filePath && !filePath.includes("node_modules")) {
15 editedFiles.push(filePath)
16 }
17
18 // Suggest verification after 3+ files edited (with cooldown)
19 const now = Date.now()
20 if (editedFiles.length >= 3 && now - lastSuggestion > 60000) {
21 lastSuggestion = now
22 console.log(`[verification] ${editedFiles.length} files edited. Consider running tests.`)
23 editedFiles = []
24 }
25 }
26 },
27 }
28}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected