feat(plugin): v0.7.0 Plugin Adapter - All Tests Passing#3
Merged
Steffen025 merged 2 commits intomainfrom Jan 18, 2026
Merged
Conversation
…lation ## Summary Implements unified plugin architecture that translates PAI hooks to OpenCode plugin API, enabling automatic PAI pack installation in OpenCode. ## Key Changes - pai-unified.ts: Single unified plugin combining all PAI hook functionality - file-logger.ts: TUI-safe file-only logging (fixes TUI corruption) - context-loader.ts: Loads CORE skill context for chat injection - security-validator.ts: Security validation with block/confirm/allow - types.ts: Shared TypeScript interfaces for plugin handlers - tsconfig.json: TypeScript configuration for plugin development ## Hook Mappings | PAI Hook | OpenCode Plugin Hook | |----------|---------------------| | SessionStart | experimental.chat.system.transform | | PreToolUse exit(2) | permission.ask | | PreToolUse | tool.execute.before | | PostToolUse | tool.execute.after | | Stop | event | ## Deprecated - Moved old plugins to plugin/_deprecated/ Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
## What's New - Security blocking via tool.execute.before + throw Error - Context injection via experimental.chat.system.transform - TUI-safe file-only logging to /tmp/pai-opencode-debug.log - All 4 tests passing (Plugin Load, Context Injection, Security Blocking, Logging) ## Key Discoveries (OpenCode API) - Args are in output.args, NOT input.args - Throw Error to block commands (not permission.ask) - Tool names are lowercase (bash, not Bash) ## Files Changed - pai-unified.ts: Use output.args for tool arguments - security-validator.ts: Case-insensitive matching, defensive null checks - types.ts: Fixed regex patterns for parent traversal - TEST-RESULTS-v0.7.md: Comprehensive test documentation - README.md: Updated to v0.7.0 - CHANGELOG.md: Full v0.7.0 release notes - v0.7-plugin-adapter.png: Celebration graphic Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Steffen025
pushed a commit
that referenced
this pull request
Jan 23, 2026
CRITICAL ISSUES FIXED: - #1: Created Art/EXTEND.yaml manifest for skill customizations - #2: Fixed settings.json → opencode.json refs in CORE/SKILL.md (3x) - #3: Disabled PaiArchitecture.ts refs in UpdateDocumentation.md - #3b: Marked Headshot.ts as NOT IMPLEMENTED in YouTube workflow - #4: Created PAISECURITYSYSTEM/ with patterns.example.yaml - #5: Marked SkillSearch() as FUTURE FEATURE in SkillSystem.md - #6: Fixed BACKUPS location refs (MEMORY/Backups → ~/.opencode/BACKUPS/) MEDIUM WARNINGS FIXED: - W3: Clarified Notification System docs (Voice only, ntfy/Discord planned) - W11: Fixed context-loader.ts TELOS paths (removed non-existent files) - W14: Removed DocumentChanges.md refs (GitPush, WorkContextRecall) Files changed: 12 (10 modified, 2 new) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Steffen025
added a commit
that referenced
this pull request
Mar 5, 2026
Consolidates remaining work into 2 substantive PRs: - PR #3 (WP5): Algorithm v3.7.0 & Core System (~2000 lines, 25 files) - PR #4 (WP6): Installer, Migration & Release (~800 lines, 20 files) Recommend merging PR #40 as 'WP4 Complete' containing all integration work (Phases 1-3 combined). Total: 4 PRs for entire v3.0 (not 8+) Related: WP4 consolidation, PR strategy
Steffen025
added a commit
that referenced
this pull request
Mar 5, 2026
ValidateSkillStructure.ts: - Fix body length check: measure only body (excluding frontmatter), not entire file - Fix YAML regex: allow hyphens in field names ([0-9A-Za-z_-]+) - Preserve indentation for literal blocks (|): use rawDesc.replace(/\n$/, '') GenerateSkillIndex.ts: - Add warning for deep nesting (>3 parts) - Fix YAML regex: allow hyphens in field names - Preserve indentation for literal blocks OPTIMIZED-PR-PLAN.md: - Fix grammar: 'statt 1 substantiellem' → 'statt einem substanziellen PR' - Add collapsible Mermaid diagram showing PR #3 → PR #4 dependencies
leppikallio
pushed a commit
to leppikallio/pai-opencode
that referenced
this pull request
Mar 6, 2026
* feat(plugin): Add Plugin Adapter Foundation for PAI-to-OpenCode translation ## Summary Implements unified plugin architecture that translates PAI hooks to OpenCode plugin API, enabling automatic PAI pack installation in OpenCode. ## Key Changes - pai-unified.ts: Single unified plugin combining all PAI hook functionality - file-logger.ts: TUI-safe file-only logging (fixes TUI corruption) - context-loader.ts: Loads CORE skill context for chat injection - security-validator.ts: Security validation with block/confirm/allow - types.ts: Shared TypeScript interfaces for plugin handlers - tsconfig.json: TypeScript configuration for plugin development ## Hook Mappings | PAI Hook | OpenCode Plugin Hook | |----------|---------------------| | SessionStart | experimental.chat.system.transform | | PreToolUse exit(2) | permission.ask | | PreToolUse | tool.execute.before | | PostToolUse | tool.execute.after | | Stop | event | ## Deprecated - Moved old plugins to plugin/_deprecated/ Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(plugin): Complete v0.7.0 Plugin Adapter with all tests passing ## What's New - Security blocking via tool.execute.before + throw Error - Context injection via experimental.chat.system.transform - TUI-safe file-only logging to /tmp/pai-opencode-debug.log - All 4 tests passing (Plugin Load, Context Injection, Security Blocking, Logging) ## Key Discoveries (OpenCode API) - Args are in output.args, NOT input.args - Throw Error to block commands (not permission.ask) - Tool names are lowercase (bash, not Bash) ## Files Changed - pai-unified.ts: Use output.args for tool arguments - security-validator.ts: Case-insensitive matching, defensive null checks - types.ts: Fixed regex patterns for parent traversal - TEST-RESULTS-v0.7.md: Comprehensive test documentation - README.md: Updated to v0.7.0 - CHANGELOG.md: Full v0.7.0 release notes - v0.7-plugin-adapter.png: Celebration graphic Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Steffen Zellmer <steffen@MacBook-Pro-von-Steffen.fritz.box> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Steffen Zellmer <steffen@MacBookPro.fritz.box>
leppikallio
pushed a commit
to leppikallio/pai-opencode
that referenced
this pull request
Mar 6, 2026
CRITICAL ISSUES FIXED: - Steffen025#1: Created Art/EXTEND.yaml manifest for skill customizations - Steffen025#2: Fixed settings.json → opencode.json refs in CORE/SKILL.md (3x) - Steffen025#3: Disabled PaiArchitecture.ts refs in UpdateDocumentation.md - #3b: Marked Headshot.ts as NOT IMPLEMENTED in YouTube workflow - Steffen025#4: Created PAISECURITYSYSTEM/ with patterns.example.yaml - Steffen025#5: Marked SkillSearch() as FUTURE FEATURE in SkillSystem.md - Steffen025#6: Fixed BACKUPS location refs (MEMORY/Backups → ~/.opencode/BACKUPS/) MEDIUM WARNINGS FIXED: - W3: Clarified Notification System docs (Voice only, ntfy/Discord planned) - W11: Fixed context-loader.ts TELOS paths (removed non-existent files) - W14: Removed DocumentChanges.md refs (GitPush, WorkContextRecall) Files changed: 12 (10 modified, 2 new) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR completes the v0.7.0 Plugin Adapter milestone with all 4 tests passing:
What's New
rm -rf ../are now blocked/tmp/pai-opencode-debug.logKey Technical Discoveries
Files Changed
pai-unified.ts- Useoutput.argsfor tool argumentssecurity-validator.ts- Case-insensitive matching, defensive null checkstypes.ts- Fixed regex patterns for parent traversalTEST-RESULTS-v0.7.md- Comprehensive test documentationREADME.md- Updated to v0.7.0CHANGELOG.md- Full v0.7.0 release notesv0.7-plugin-adapter.png- Celebration graphicNext Steps
v0.8 Converter Tool is next - enabling automatic PAI→OpenCode translation.
🤖 Generated with Claude Code