|
|
2 months ago | |
|---|---|---|
| .. | ||
| docs | 2 months ago | |
| tests | 4 months ago | |
| .gitignore | 8 months ago | |
| README.md | 4 months ago | |
| agent-validator.ts | 4 months ago | |
| agent-validator.ts.disabled | 3 months ago | |
| bun.lock | 4 months ago | |
| notify.ts | 4 months ago | |
| package.json | 4 months ago | |
| tsconfig.json | 4 months ago | |
Validates that OpenAgent follows its defined prompt rules and execution patterns.
validate_sessionValidate the current agent session against defined rules.
validate_session
Options:
include_details (boolean, optional) - Include detailed evidence for each checkReturns: Validation report with compliance score
check_approval_gatesCheck if approval gates were properly enforced before execution operations.
check_approval_gates
Returns: Approval gate compliance status
export_validation_reportExport a comprehensive validation report to a markdown file.
export_validation_report
Options:
output_path (string, optional) - Path to save the report (defaults to .tmp/validation-{sessionID}.md)Returns: Path to exported report + summary
analyze_delegationAnalyze whether delegation decisions followed the 4+ file rule.
analyze_delegation
Returns: Delegation analysis with file count statistics
The plugin checks for:
You: "Create a new API endpoint"
[Agent works on task]
You: "validate_session"
You: "Run the tests"
Agent: "Approval needed before proceeding."
You: "Approved. Also check_approval_gates"
You: "We just finished refactoring. Export validation report"
Agent: [Exports to .tmp/validation-{id}.md]
The plugin auto-loads from .opencode/plugins/ when OpenCode starts.
Install dependencies:
cd .opencode/plugins
npm install
# or
bun install
Event Tracking - Hooks into OpenCode SDK events:
session.message.createdtool.execute.beforetool.execute.afterBehavior Analysis - Analyzes messages for:
Validation - Compares actual behavior against OpenAgent rules
Reporting - Generates compliance reports with scores and evidence
approvalKeywords in plugin codeEdit agent-validator.ts to: