Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
24d6232
Update README.md
MasuRii Dec 28, 2025
6e748b0
Update README.md
MasuRii Dec 28, 2025
2ac9fbd
✨ feat(tts): replace Python edge-tts with native Node.js implementation
MasuRii Dec 28, 2025
7a952b5
🔖 chore(release): bump version to 1.0.8
MasuRii Dec 28, 2025
3194f37
✨ feat(linux): add Linux platform support for audio, volume, and disp…
MasuRii Dec 28, 2025
35cdffc
1.0.9
MasuRii Dec 28, 2025
76f4a91
🐛 fix(wake): improve monitor wake reliability on Windows
MasuRii Jan 2, 2026
c9ff0e0
🐛 fix(events): add support for OpenCode SDK v1.1.x permission events
MasuRii Jan 6, 2026
f1b7538
✨ feat(package): add Bun runtime support and update documentation
MasuRii Jan 6, 2026
630fa56
🔖 chore(release): bump version to 1.0.11
MasuRii Jan 6, 2026
aba24e8
✨ feat: add permission batching with count-aware TTS messages
MasuRii Jan 7, 2026
55385a3
✨ feat: add question tool support for OpenCode SDK v1.1.7+
MasuRii Jan 8, 2026
2350270
✨ feat: add plugin enable/disable master switch and question tool sup…
MasuRii Jan 9, 2026
6d8808b
✨ feat: add AI-generated dynamic notification messages
MasuRii Jan 9, 2026
397aa88
🔖 chore(release): bump version to 1.2.0
MasuRii Jan 9, 2026
f888330
🐛 fix: resolve AI message generation issues and notification delays
MasuRii Jan 9, 2026
071bb91
Merge pull request #3 from MasuRii/feature/ai-generated-messages
MasuRii Jan 9, 2026
74c8d19
docs: update package description and README configuration section
MasuRii Jan 9, 2026
6ecdf51
🐛 fix(config): prevent user config values from being overwritten on p…
MasuRii Jan 9, 2026
3e7f64c
Add OpenAI-compatible TTS engine support
mathisto Jan 11, 2026
61d34dc
✨ feat(config): add OpenAI-compatible TTS configuration documentation…
MasuRii Jan 11, 2026
647dc22
Merge pull request #7 from MasuRii/feat/openai-tts-compatibility
MasuRii Jan 11, 2026
1d94a91
Merge branch 'master' of https://github.com/MasuRii/opencode-smart-vo…
MasuRii Jan 22, 2026
72765b0
feat(docs): feature initialization
MasuRii Jan 16, 2026
dc41b0f
feat(initial): initial ralph
MasuRii Jan 16, 2026
a5e7e04
build(test): add Bun test configuration to package.json
MasuRii Jan 16, 2026
00a024e
build(test): add bunfig.toml with test runner configuration
MasuRii Jan 16, 2026
839a747
test(setup): add test infrastructure preload and mock utilities
MasuRii Jan 16, 2026
c274d82
build(deps): add node-notifier for desktop notifications
MasuRii Jan 16, 2026
b884c23
feat(notify): add desktop notification module for cross-platform support
MasuRii Jan 16, 2026
0fece9b
feat(config): add desktop notification configuration options
MasuRii Jan 16, 2026
d65b3ef
feat(notify): integrate desktop notifications into main plugin
MasuRii Jan 16, 2026
99a1202
docs(readme): add Linux desktop notification dependency instructions
MasuRii Jan 16, 2026
4d64dca
test(notify): add unit tests for desktop notification module
MasuRii Jan 16, 2026
29d5a89
test(config): add unit tests for desktop notification config fields
MasuRii Jan 16, 2026
dcd1aba
feat(config): add error notification configuration options
MasuRii Jan 16, 2026
41404d7
feat(notify): add session.error event handler and getErrorMessage helper
MasuRii Jan 16, 2026
a4aa2d2
test(notify): add unit tests for error handler functionality
MasuRii Jan 16, 2026
271631d
build(deps): add detect-terminal for focus detection
MasuRii Jan 16, 2026
dfda7bb
feat(notify): add focus detection module for macOS terminal focus
MasuRii Jan 16, 2026
f20ddbd
feat(config): add suppressWhenFocused config option for focus detection
MasuRii Jan 16, 2026
0f7d2f1
feat(notify): integrate focus detection into notification flow
MasuRii Jan 16, 2026
950cbde
docs(readme): add focus detection platform limitations documentation
MasuRii Jan 16, 2026
80eed38
test(focus): add focus detection unit tests and fix export
MasuRii Jan 16, 2026
ea48afe
feat(webhook): add Discord webhook integration module
MasuRii Jan 16, 2026
d06e0ea
feat(config): add webhook configuration options
MasuRii Jan 18, 2026
605f1cc
feat(webhook): integrate webhook into notification flow
MasuRii Jan 18, 2026
e7af4cd
docs(readme): add webhook documentation and update events table
MasuRii Jan 18, 2026
e7e0102
test(webhook): add comprehensive unit tests for webhook module
MasuRii Jan 18, 2026
3aec40e
feat(config): add sound theme configuration options
MasuRii Jan 18, 2026
87edef2
feat(sound-theme): create sound theme module for custom sound packs
MasuRii Jan 18, 2026
b7d17d9
feat(sound-theme): integrate sound theme into notification flow
MasuRii Jan 18, 2026
7ccf6f8
docs(sound-theme): document sound theme feature in readme
MasuRii Jan 18, 2026
0fddb5b
feat(config): add per-project sound configuration options
MasuRii Jan 18, 2026
680f901
feat(per-project-sound): create project sound selection logic
MasuRii Jan 18, 2026
8dcb6bf
feat(per-project-sound): integrate per-project sound into playback
MasuRii Jan 18, 2026
44f1280
test(per-project-sound): add unit tests for per-project sound assignment
MasuRii Jan 18, 2026
e62c923
test(config): add comprehensive unit tests for utility functions
MasuRii Jan 18, 2026
6675c17
test(config): add unit tests for loadConfig and migration logic
MasuRii Jan 18, 2026
16447cd
test(ai-messages): add unit tests for generateAIMessage and getSmartM…
MasuRii Jan 18, 2026
d300615
test(linux): add unit tests for Linux compatibility module
MasuRii Jan 18, 2026
bbfd3ea
test(tts): add comprehensive unit tests and fix cross-test pollution
MasuRii Jan 18, 2026
2515a25
test(e2e): add comprehensive integration tests for plugin core
MasuRii Jan 18, 2026
bd1ec65
test(e2e): add comprehensive tests for intelligent reminder flow
MasuRii Jan 18, 2026
6d8a993
test(e2e): add comprehensive configuration integration tests
MasuRii Jan 18, 2026
c820400
feat(test): add .env.example for integration tests
MasuRii Jan 18, 2026
ef40412
ci: add github actions test workflow
MasuRii Jan 18, 2026
6132e29
docs(readme): add coverage badge and local testing documentation
MasuRii Jan 18, 2026
108b44d
feat(test): add integration tests for cloud APIs
MasuRii Jan 18, 2026
e908b62
docs(contributing): add contributing guidelines for development and t…
MasuRii Jan 18, 2026
3f02124
docs(readme): update readme with all new enhancement features
MasuRii Jan 18, 2026
86eda6b
chore(metadata): update project metadata after completion
MasuRii Jan 18, 2026
2ce7022
chore(config): update .gitignore configuration
MasuRii Jan 18, 2026
c4d95e2
docs(readme): update README documentation for completed project
MasuRii Jan 18, 2026
ae3af71
feat(config): add granular notification control configuration
MasuRii Jan 19, 2026
7d4242a
feat(notification): implement granular notification control logic
MasuRii Jan 19, 2026
49311b9
docs(readme): document granular notification control feature
MasuRii Jan 19, 2026
1d495d6
test(config): add tests for granular notification control
MasuRii Jan 19, 2026
a98905e
feat(config): add live config reload and improved disabled state hand…
MasuRii Jan 21, 2026
28a6f87
fix(config): change forceVolume default to false
MasuRii Jan 21, 2026
c1e10d9
feat(ai): add context-aware AI messages with session context
MasuRii Jan 21, 2026
fd727dd
chore(deps): bump @elevenlabs/elevenlabs-js to 2.32.0
MasuRii Jan 21, 2026
0b138da
docs(readme): update forceVolume default and add enableContextAwareAI…
MasuRii Jan 21, 2026
7f32d09
test(ai-messages): add unit tests for context-aware AI feature
MasuRii Jan 21, 2026
f86828a
fix(tests): fix pre-existing test failures
MasuRii Jan 21, 2026
ee6a79b
feat(ai): derive project name from worktree path for context-aware AI
MasuRii Jan 22, 2026
3a291bd
test(ai): update context-aware AI tests for SDK worktree property
MasuRii Jan 22, 2026
3c4c43e
fix(tts): improve error handling with safer null checks
MasuRii Jan 22, 2026
9531075
chore(release): bump version to 1.3.0
MasuRii Jan 22, 2026
a48f792
fix(tests): make E2E tests platform-aware for CI compatibility
MasuRii Jan 22, 2026
d1e599c
fix(tests): skip Windows-only TTS tests on Linux CI
MasuRii Jan 22, 2026
1eafe9b
fix(tests): skip SAPI reminder test on non-Windows platforms
MasuRii Jan 22, 2026
b60f163
fix: cross-platform compatibility for sound theme ordering and AI tim…
MasuRii Jan 22, 2026
56a3490
chore: lower coverage threshold from 70% to 50%
MasuRii Jan 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Test

on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]

jobs:
test:
name: Run Unit & E2E Tests
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Run tests with coverage
run: bun test --coverage

- name: Upload coverage report
uses: actions/upload-artifact@v4
if: always()
with:
name: coverage-report
path: coverage/
retention-days: 7
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@ Thumbs.db
# Environment
.env
.env.local
tests/.env.local

# Coverage reports
coverage/
129 changes: 129 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# Contributing to OpenCode Smart Voice Notify

Thank you for your interest in contributing to OpenCode Smart Voice Notify! This document provides guidelines for development, testing, and submitting contributions.

## Development Environment Setup

1. **Clone the repository**:
```bash
git clone https://github.com/MasuRii/opencode-smart-voice-notify.git
cd opencode-smart-voice-notify
```

2. **Install dependencies**:
We recommend using [Bun](https://bun.sh) for the fastest development experience, but `npm` also works.
```bash
bun install
# or
npm install
```

3. **Link to OpenCode**:
Add the local path to your `~/.config/opencode/opencode.json`:
```json
{
"plugin": ["file:///path/to/opencode-smart-voice-notify"]
}
```

## Testing Guidelines

We take testing seriously. All new features and bug fixes should include appropriate tests.

### Running Tests

The project uses Bun's built-in test runner.

```bash
# Run all tests
bun test

# Run tests with coverage report
bun test --coverage

# Run tests in watch mode (useful during development)
bun test --watch

# Run a specific test file
bun test tests/unit/config.test.js
```

### Test File Naming & Location

- **Unit Tests**: Place in `tests/unit/`. Name files as `[module].test.js`.
- **E2E Tests**: Place in `tests/e2e/`. Name files as `[feature].test.js`.
- **Integration Tests**: Place in `tests/integration/`. These tests use real API credentials.

### Test Infrastructure

We provide a comprehensive test setup in `tests/setup.js` which is preloaded for all tests. It includes utilities for:

- **Filesystem Isolation**: `createTestTempDir()` creates a sandbox for each test.
- **Config Mocks**: `createTestConfig()` and `createMinimalConfig()`.
- **Shell Mocking**: `createMockShellRunner()` to intercept and verify shell commands.
- **SDK Mocking**: `createMockClient()` to simulate the OpenCode SDK environment.
- **Event Mocks**: `createMockEvent` and `mockEvents` factory for plugin events.

### Coverage Requirements

We maintain a high standard for code coverage.
- **Minimum Requirement**: 70% line coverage for all new code.
- **Ideal**: 90%+ function coverage.
- PRs that significantly decrease overall coverage may be rejected or require additional tests.

## Mock Usage Guidelines

Avoid using real system calls or external APIs in unit and E2E tests.

### Shell Commands
Instead of using the real `$` shell runner, use `createMockShellRunner()`:
```javascript
import { createMockShellRunner } from '../setup.js';

const mockShell = createMockShellRunner({
handler: (command) => {
if (command.includes('osascript')) return { stdout: Buffer.from('iTerm2') };
return { exitCode: 0 };
}
});

// Use it in your tests
await mockShell`echo "hello"`;
expect(mockShell.getCallCount()).toBe(1);
```

### OpenCode Client
Use `createMockClient()` to verify interactions with the OpenCode TUI, sessions, and permissions:
```javascript
import { createMockClient } from '../setup.js';

const client = createMockClient();
await client.tui.showToast({ body: { message: 'Hello' } });
expect(client.tui.getToastCalls()[0].message).toBe('Hello');
```

## Integration Testing (Credentials)

If you need to test real cloud APIs (ElevenLabs, OpenAI, etc.):
1. Copy `tests/.env.example` to `tests/.env.local`.
2. Fill in your real API keys.
3. Run `bun test tests/integration/`.

**NEVER** commit `tests/.env.local` to the repository. It is included in `.gitignore` by default.

## Coding Standards

- Use **ESM** (ECMAScript Modules) syntax (`import`/`export`).
- Follow the existing code style (use 2 spaces for indentation).
- Add JSDoc comments for all new functions and modules.
- Ensure `bun run typecheck` (if available) or basic linting passes.

## Pull Request Process

1. Create a new branch for your feature or bug fix.
2. Implement your changes and add tests.
3. Verify all tests pass locally (`bun test`).
4. Ensure your changes follow the existing architecture patterns.
5. Submit a PR with a clear description of what changed and why.

Thank you for contributing!
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2025 MasuRii
Copyright (c) 2026 MasuRii

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading