Skip to content

Conversation

@dzianisv
Copy link
Owner

@dzianisv dzianisv commented Feb 8, 2026

Summary

New: GitHub Issue Integration Plugin (github.ts)

  • Posts agent messages to associated GitHub issues as comments
  • Auto-detects issues from: URL in first message, .github-issue file, PR's closingIssuesReferences, branch name conventions
  • Configurable via ~/.config/opencode/github.json
  • Batches messages (5s interval) to avoid API rate limits
  • Optional: create new issue if none found
  • 18 unit tests

Telegram Plugin Fixes

  • Non-blocking initialization (fixes startup blocking)
  • Fixed Whisper endpoint /transcribe/transcribe-base64
  • send-notify function: Fixed placeholder leak (use null bytes instead of underscores)

Test Consolidation

  • Consolidated 17 real integration tests in test/telegram.test.ts
  • Removed 3 redundant test files

Test Results

  • ✅ Typecheck: 0 errors
  • ✅ Unit tests: 148 passed, 5 skipped (153 total)
  • ✅ Plugin load test: 5 passed
  • ✅ GitHub plugin tests: 18 passed

Files Changed

File Description
github.ts NEW GitHub issue integration plugin
test/github.test.ts NEW 18 unit tests
telegram.ts Non-blocking init, fixed Whisper endpoint
supabase/functions/send-notify/index.ts Fixed placeholder leak
test/telegram.test.ts Consolidated 17 integration tests
AGENTS.md Added pkill warning, test requirements

Add a new reflection-static.ts plugin that uses a simpler approach:
1. Ask the agent a static self-assessment question when session idles
2. Use GenAI judge to analyze the agent's response
3. If agent confirms completion → toast notification, no feedback loop
4. If agent identifies improvements → push to continue

Features:
- Simple self-assessment question: "What was the task? Are you sure you completed it?"
- GenAI-powered analysis of agent's self-assessment
- Prevents infinite feedback loops by tracking confirmed completions
- Tracks aborted sessions to skip reflection
- E2E test that verifies plugin effectiveness (scored 5/5)

New npm scripts:
- test:reflection-static: Run E2E evaluation test
- install:reflection-static: Deploy reflection-static instead of reflection.ts
- Add multiple abort detection layers (session.error, message.aborted)
- Add delay before reflection to allow abort events to arrive
- Check if last message was aborted/incomplete in runReflection
- Remove mock evaluation fallback - require real Azure LLM
- Use AZURE_OPENAI_DEPLOYMENT env var for eval model
- Change from Set to Map with timestamps for abort tracking
- Add 10 second cooldown period after Esc press
- Add type cast for error property to fix TypeScript error
- Separate completed check from error check for clearer debugging
- Match pattern from reflection.ts for consistent behavior
- telegram.ts was incorrectly placed in lib/ subdirectory (not loaded as plugin)
- Fix: deploy telegram.ts directly to ~/.config/opencode/plugin/
- Fix isSessionComplete to check completed timestamp (same as tts.ts)
- Remove install:global, add individual install scripts per plugin
- Update plugin-load.test.ts for new deployment pattern
- Improve reflection-static.ts analysis prompt to be stricter about completion

Fixes telegram notifications not being sent since commit d10a8f5
Telegram plugin fixes:
- Changed plugin initialization to non-blocking (setTimeout instead of await)
- Fixed Whisper endpoint from /transcribe to /transcribe-base64

send-notify function fix:
- Fixed placeholder leak by using null bytes instead of underscores

Test consolidation:
- Deleted redundant test files (telegram-e2e-real.ts, telegram-forward-e2e.test.ts, test-telegram-whisper.ts)
- Consolidated 17 real integration tests in test/telegram.test.ts
- All tests use real Supabase (no mocks)

Documentation updates:
- Added warnings about pkill and deployment
- Updated AGENTS.md with test requirements
- Updated plan.md with status

All tests pass: typecheck (0 errors), unit (130), plugin-load (5)
- Posts agent messages to associated GitHub issues as comments
- Auto-detects issues from: URL in first message, .github-issue file,
  PR's closingIssuesReferences, branch name conventions
- Configurable via ~/.config/opencode/github.json
- Batches messages (5s interval) to avoid API rate limits
- Optional: create new issue if none found
- 18 unit tests for URL parsing, branch detection, message formatting
@dzianisv dzianisv changed the title fix(telegram): non-blocking init, Whisper endpoint, consolidated tests feat: GitHub issue plugin + telegram fixes Feb 8, 2026
- Add github.ts to available plugins list
- Document all configuration options with table format
- Add .github-issue file format examples
- Add branch name pattern documentation
- Add debug logging instructions
- Update deployment instructions to include github.ts
- Update plan.md to mark all tasks complete
@dzianisv dzianisv merged commit e6a1adb into main Feb 8, 2026
2 checks passed
@dzianisv dzianisv deleted the feat/reflection-static-plugin branch February 8, 2026 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant