Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
344 commits
Select commit Hold shift + click to select a range
beee990
test(integration): add integration tests for logger format verification
MBanucu Jan 22, 2026
b87dcda
fix(test): fix logger integration tests
MBanucu Jan 22, 2026
a46f085
fix(test): correct API endpoints and improve UI state assertions in e…
MBanucu Jan 22, 2026
714fb7e
fix(test): stabilize WebSocket message counter e2e tests
MBanucu Jan 22, 2026
49556b8
feat(test): implement per-worker isolated test servers
MBanucu Jan 22, 2026
054afc6
refactor(test): inherit NODE_ENV and LOG_LEVEL from environment in te…
MBanucu Jan 22, 2026
aeb3a37
refactor: change 'No clients subscribed to session' from warn to debu…
MBanucu Jan 22, 2026
aa47609
fix(test): fix parallel e2e test execution failures
MBanucu Jan 22, 2026
e53ec9a
feat(pty): add /server-url slash command for web server URL
MBanucu Jan 22, 2026
f589f54
refactor(plugin): move slash command registration to config function
MBanucu Jan 22, 2026
2ac9363
chore: ignore .opencode/ local development environment
MBanucu Jan 22, 2026
29eac33
build(dev): add installation scripts for local development
MBanucu Jan 22, 2026
8573a1b
feat(web): replace plain text output with xterm.js terminal renderer
MBanucu Jan 22, 2026
e8fdee1
chore: update bun.lock for xterm.js dependencies
MBanucu Jan 22, 2026
76a45cb
feat(web): make terminal interactive with direct input handling
MBanucu Jan 22, 2026
6ac7761
fix(web): fix terminal input handling to prevent double echo and mang…
MBanucu Jan 22, 2026
c83e3bf
debug(web): add logging and temporary local echo for spacebar debugging
MBanucu Jan 22, 2026
2a1452b
test(e2e): add input capture test for PTY terminal
MBanucu Jan 22, 2026
fd859af
debug: add pino logging for terminal input capture
MBanucu Jan 22, 2026
362fa0d
feat(web): add interactive web UI for PTY session management
MBanucu Jan 22, 2026
53787bf
feat(web-ui): implement web UI for PTY sessions with xterm.js terminal
MBanucu Jan 23, 2026
48ec71e
fix(web-ui): clean up debug logging and fix WebSocket counter reset
MBanucu Jan 23, 2026
5d77514
refactor: improve codebase modularity and maintainability
MBanucu Jan 23, 2026
c2e44c2
refactor(logging): remove debugging console.log and log.debug statements
MBanucu Jan 23, 2026
d89eec0
refactor: reduce code duplication and improve maintainability
MBanucu Jan 23, 2026
555667c
refactor(logging): remove debug logging statements
MBanucu Jan 23, 2026
94e2b11
refactor(pty): improve code maintainability and eliminate duplication
MBanucu Jan 23, 2026
878f9bb
refactor: restructure web UI components and improve PTY session manag…
MBanucu Jan 23, 2026
5ea9151
test(e2e): add xterm content extraction capability
MBanucu Jan 23, 2026
4daf9bb
test(e2e): add SerializeAddon-based xterm content extraction test
MBanucu Jan 23, 2026
49d8f49
refactor: remove verbose WebSocket logging to eliminate console spam
MBanucu Jan 23, 2026
ff59dfb
fix: resolve failing e2e tests after WebSocket logging removal
MBanucu Jan 23, 2026
1cfdef8
test(e2e): add SerializeAddon vs server buffer content comparison test
MBanucu Jan 23, 2026
00fc049
feat: add comprehensive xterm content extraction testing suite
MBanucu Jan 23, 2026
f40a157
feat: restructure RingBuffer to preserve newline characters with read…
MBanucu Jan 23, 2026
3b45949
feat: add raw buffer API endpoint with comprehensive testing
MBanucu Jan 23, 2026
e4f74f4
fix: improve RingBuffer reliability and test coverage
MBanucu Jan 23, 2026
1c281d1
feat: switch app to use raw buffer endpoint for historical data
MBanucu Jan 23, 2026
ecb4ab1
feat: implement dual output callbacks for processed and raw PTY data
MBanucu Jan 23, 2026
81b51f9
refactor: separate API calls for raw data and line arrays
MBanucu Jan 23, 2026
7bb3bc2
feat(terminal): add terminal mode switching with raw and processed views
MBanucu Jan 23, 2026
94a99ed
feat(api): add plain text buffer API endpoint
MBanucu Jan 23, 2026
1a22858
test: add SerializeAddon plain text extraction test
MBanucu Jan 23, 2026
0bf913f
test: add interactive input comparison between API and SerializeAddon
MBanucu Jan 23, 2026
44b1917
test: add initial bash state comparison between API and SerializeAddon
MBanucu Jan 23, 2026
e19a688
test: enhance initial bash state test with detailed output previews
MBanucu Jan 23, 2026
98d656b
test: add cat command comparison between API and SerializeAddon
MBanucu Jan 23, 2026
622351d
fix: resolve newline handling issues in terminal data flow
MBanucu Jan 23, 2026
e0d8b4e
test: add comprehensive double-echo detection test
MBanucu Jan 23, 2026
657a399
fix: eliminate double-echo by removing local echo and simplifying to …
MBanucu Jan 23, 2026
9d83a5d
feat: add session switching content clearing test
MBanucu Jan 23, 2026
24cb26c
fix: remove all references to deleted /api/sessions/{id}/output endpoint
MBanucu Jan 23, 2026
15c6465
fix: complete /output endpoint removal and fix double-echo test
MBanucu Jan 23, 2026
748518b
feat: add comprehensive PTY debugging and input handling improvements
MBanucu Jan 24, 2026
b1b5241
refactor: remove debug console.log statements from production code
MBanucu Jan 24, 2026
0ba2698
refactor(pty): DRY up repeated session lookup with withSession() help…
MBanucu Jan 24, 2026
042120c
refactor(pty/permissions): unify and DRY permission denial/toast logic
MBanucu Jan 24, 2026
6bffcb4
refactor(pty/buffer): deduplicate trailing newline strip logic
MBanucu Jan 24, 2026
3bfb081
refactor(web/TerminalRenderer): DRY terminal output reporting and ses…
MBanucu Jan 24, 2026
07c8d5a
refactor(e2e): split xterm content extraction test suite into modular…
MBanucu Jan 24, 2026
32d315b
chore(e2e): enforce ultra-silent Playwright E2E tests (remove logs/de…
MBanucu Jan 24, 2026
921c85b
test(e2e/pty-buffer-readraw): ensure session state isolation for all …
MBanucu Jan 24, 2026
c77be1a
test(e2e/pty-buffer-readraw): fix race condition in session switch test
MBanucu Jan 24, 2026
21b79b3
test(e2e/newline-verification): robustify prompt char test and fix ty…
MBanucu Jan 24, 2026
fa4baf2
test(e2e/newline-verification): accept flexible prompt row in echo ne…
MBanucu Jan 24, 2026
c973b84
test(e2e): make dom-vs-xterm-api robust to prompt/whitespace differences
MBanucu Jan 24, 2026
c4305e5
test(e2e): enforce PTY session isolation for visual verification dom-…
MBanucu Jan 24, 2026
e7b8351
test(e2e): robustify and refactor buffer and extraction tests
MBanucu Jan 24, 2026
b2b94a1
test(e2e/input-capture): clean up tests and remove debug logs
MBanucu Jan 24, 2026
3d36c30
docs(AGENTS.md): rewrite and modernize agent/dev workflow & troublesh…
MBanucu Jan 24, 2026
d423580
test(e2e): robustify and standardize E2E interactive shell sessions
MBanucu Jan 24, 2026
3d0f4b6
test(dev server, pty-echo): update dev server and PTY echo test for i…
MBanucu Jan 24, 2026
6f02f56
test(e2e): remove noisy console.log output from E2E test files
MBanucu Jan 24, 2026
b9c0552
test(e2e): clean up PTY buffer readRaw test debug output
MBanucu Jan 24, 2026
b6631b2
test(e2e): refactor PTY buffer tests for reliability and maintainability
MBanucu Jan 24, 2026
a40b895
docs(agents): modernize and clarify AGENTS.md usage, setup, and testing
MBanucu Jan 24, 2026
e639efa
test(e2e): use Bun.stripANSI for robust ANSI stripping in buffer-readraw
MBanucu Jan 24, 2026
230746f
refactor(e2e): DRY up xterm serialize logic via shared helper
MBanucu Jan 24, 2026
0beb8ca
refactor(test e2e): migrate all E2E tests to robust event-driven waits
MBanucu Jan 25, 2026
707b779
test(e2e): deduplicate terminal helpers and harden flaky input
MBanucu Jan 25, 2026
cba88c1
test(e2e): comment unused debug code in playwright tests
MBanucu Jan 25, 2026
57e6657
refactor(web): improve static file handling security and path resolution
MBanucu Jan 26, 2026
056ca8b
chore: remove temporary documentation and config files
MBanucu Jan 26, 2026
4d0f55c
chore: prepare for npm test release
MBanucu Jan 26, 2026
d64bd87
feat: add automated testing scripts for npm packages and OpenCode plu…
MBanucu Jan 26, 2026
2202836
chore: prepare test release 0.1.4-test.1
MBanucu Jan 26, 2026
6344783
refactor(web): simplify server to always serve built assets
MBanucu Jan 27, 2026
afdabcf
chore: clean up development scripts and enable e2e test session
MBanucu Jan 27, 2026
a458a3a
refactor(test-web-server): simplify test-web-server.ts structure
MBanucu Jan 27, 2026
519b98b
refactor: clean up PTY session configuration and test artifacts
MBanucu Jan 27, 2026
5173b16
refactor: move test-web-server.ts to e2e directory
MBanucu Jan 27, 2026
d74d8f7
chore: remove redundant manual e2e test file
MBanucu Jan 27, 2026
31f96a6
refactor: move start-server.ts to test directory
MBanucu Jan 27, 2026
48be6e8
feat(web/router): add router infrastructure with parameter support an…
MBanucu Jan 27, 2026
a5a1ade
feat(web/router): migrate API routes to unified router system
MBanucu Jan 27, 2026
11fbf60
docs: update routing improvements plan for Phase 2 completion
MBanucu Jan 27, 2026
ded723b
refactor(web): consolidate error handling and add input validation
MBanucu Jan 27, 2026
cf1cb6c
docs(plan): document Phase 3 completion in routing improvements plan
MBanucu Jan 27, 2026
3a444a2
refactor(server): replace custom router with Bun's built-in routing
MBanucu Jan 27, 2026
ee6388f
refactor(web-server): serve static files via dynamic routes
MBanucu Jan 27, 2026
4d16001
fix(test): await startWebServer calls in remaining tests
MBanucu Jan 27, 2026
b5b2172
refactor(websocket): move websocket upgrade to dedicated /ws route
MBanucu Jan 27, 2026
14fbb25
refactor(server): redirect root path to index.html
MBanucu Jan 27, 2026
4e01b86
feat(web/server): implement WebSocket pub/sub and fix session updates
MBanucu Jan 27, 2026
560f1ed
refactor(web): restructure into client, server, and shared subdirecto…
MBanucu Jan 27, 2026
ed3d0e1
refactor: remove Pino logger and console.log statements
MBanucu Jan 27, 2026
bc6be8a
fix(websocket): do not return response on successful upgrade
MBanucu Jan 27, 2026
d6de54e
fix: update version and author in package.json; clean up error handli…
MBanucu Jan 27, 2026
e506a6e
docs: comprehensively update project documentation
MBanucu Jan 27, 2026
55f4ff9
refactor(pty): streamline server URL handling and add port conflict r…
MBanucu Jan 27, 2026
d7926d4
Merge upstream/main to make branch mergeable
MBanucu Jan 27, 2026
6b01be5
docs: remove completed routing simplification plan
MBanucu Jan 27, 2026
255f6de
chore: bump version to 0.1.4-test.4
MBanucu Jan 27, 2026
7795c56
refactor: rename slash command to pty-server-url
MBanucu Jan 27, 2026
512800a
chore: update package metadata to shekohex
MBanucu Jan 27, 2026
66e705d
ci: remove security job from CI workflow
MBanucu Jan 27, 2026
3aa35f5
ci: clean up CI workflow triggers
MBanucu Jan 27, 2026
914582d
fix: update import paths to resolve TypeScript module resolution errors
MBanucu Jan 27, 2026
85c15ac
ci: update workflow dependencies and commands
MBanucu Jan 28, 2026
78d9115
ci: enable matrix strategy for parallel test execution
MBanucu Jan 28, 2026
2c70483
ci(release): update workflow triggers and remove redundant steps
MBanucu Jan 28, 2026
aaa860a
fix: resolve ESLint errors and update config
MBanucu Jan 28, 2026
7db8ab4
ci: re-enable lint step in CI workflow
MBanucu Jan 28, 2026
151d989
chore(release): bump version to 0.1.4
MBanucu Jan 28, 2026
9934322
fix(pty): fix race condition in PTY read loop
MBanucu Jan 28, 2026
92e9769
style: fix prettier formatting in test files
MBanucu Jan 28, 2026
60d14a1
fix(pty): add version check before patching bun-pty
MBanucu Jan 28, 2026
9e6ee8f
style: fix prettier formatting in spawn repeat test
MBanucu Jan 28, 2026
ecb2551
ci: simplify test matrix to run all tests
MBanucu Jan 28, 2026
3d7de9d
refactor(web/server): modernize web server with class-based architect…
MBanucu Jan 30, 2026
728fa8e
fix(ci): fix CI test runs and refactor web server tests
MBanucu Jan 30, 2026
90b304e
ci: parallelize quality checks with matrix strategy
MBanucu Jan 30, 2026
7449100
refactor: extract API paths to public constants
MBanucu Jan 30, 2026
b3bcd45
style: apply prettier formatting and eslint fixes
MBanucu Jan 30, 2026
cb0dd91
build: simplify build and install scripts
MBanucu Jan 30, 2026
9330675
ci: disable fail-fast in quality matrix
MBanucu Jan 30, 2026
2bef1dd
refactor: clean up shared types and update CI tests
MBanucu Jan 30, 2026
53e8517
fix: increase websocket test timeout to prevent flakiness
MBanucu Jan 30, 2026
6a7c378
refactor(test): simplify test server startup using PTYServer
MBanucu Jan 30, 2026
6667f0c
fix(test): improve callback handling and CI test inclusion
MBanucu Jan 30, 2026
a644aab
ci: include pty-tools test in CI workflow
MBanucu Jan 30, 2026
5908f54
fix(test): enable concurrent execution and fix websocket test flakiness
MBanucu Jan 30, 2026
ac23d61
refactor(test): extract shared utilities for concurrent test execution
MBanucu Jan 30, 2026
0c8964c
ci: specify Bun version to 1.3.6 for consistency
MBanucu Jan 30, 2026
ff000eb
fix(ci): correct command syntax for concurrent test execution
MBanucu Jan 30, 2026
0c86f4a
fix(ci): correct command syntax for test execution
MBanucu Jan 30, 2026
df372fd
fix(ci): correct command syntax for test execution
MBanucu Jan 30, 2026
5d9d28f
fix(ci): update test command to include all relevant test files
MBanucu Jan 30, 2026
f0c5df5
fix(tests): remove unnecessary await from expect statements in ptyRea…
MBanucu Jan 30, 2026
2642e26
fix(ci): include pty-tools test in concurrent test execution
MBanucu Jan 30, 2026
b904666
fix(tests): add afterEach hook to restore mocks in PTY Tools tests
MBanucu Jan 30, 2026
2f16130
fix(tests): add afterEach hook to restore mocks in PTY Tools tests
MBanucu Jan 30, 2026
977f03b
fix(tests): add afterAll hook to restore mocks in PTY Tools tests
MBanucu Jan 30, 2026
e0dcd09
fix(tests): include pty-tools test in concurrent execution
MBanucu Jan 30, 2026
a343b27
fix(server): refactor server initialization and cleanup logic for imp…
MBanucu Jan 30, 2026
de63f05
fix(dependencies): remove yargs and @types/yargs from package.json
MBanucu Jan 30, 2026
71d1e54
Merge branch 'main' into fix-ci-shekohex
MBanucu Jan 30, 2026
01cc030
refactor: improve PTY session types and lifecycle management
MBanucu Jan 30, 2026
bef0351
fix(tests): update cleanup method in integration tests for consistency
MBanucu Jan 30, 2026
32118d5
Merge branch 'tmp' into fix-ci-shekohex
MBanucu Jan 30, 2026
a2f6cb9
refactor(server): remove global server management functions
MBanucu Jan 30, 2026
6e3b835
refactor(plugin): replace server URL retrieval with PTYServer instance
MBanucu Jan 30, 2026
fccb995
refactor(tests): streamline integration tests by replacing beforeEach…
MBanucu Jan 30, 2026
f69b16a
ci: include pty-echo test in CI pipeline and refactor test setup
MBanucu Jan 30, 2026
5e8df1b
style(test): fix formatting issues
MBanucu Jan 30, 2026
d5e3c5d
ci: add npm-pack-structure test to CI pipeline and update websocket t…
MBanucu Jan 30, 2026
820e927
fix: update waitOpen method to use setImmediate for better performance
MBanucu Jan 30, 2026
f2031eb
fix(test): update npm pack structure test description and remove plug…
MBanucu Jan 30, 2026
6fb51dd
fix: replace fake client with OpencodeClient in ManagedTestServer con…
MBanucu Jan 30, 2026
ba40f4e
fix: replace fake client with OpencodeClient in start-server initiali…
MBanucu Jan 30, 2026
37bc760
fix: replace fake client with OpencodeClient in PTY Echo Behavior tests
MBanucu Jan 30, 2026
6a73d0d
fix: enhance mock session data in PTY Tools tests
MBanucu Jan 30, 2026
aca13a7
fix(test): improve error handling and port file polling in npm pack i…
MBanucu Jan 30, 2026
0532445
fix(test): fix npm pack integration test by pinning working dependenc…
MBanucu Jan 30, 2026
8f5004b
style: fix code formatting in npm pack integration test
MBanucu Jan 30, 2026
450c70f
refactor(test): modernize integration tests and simplify CI test exec…
MBanucu Jan 30, 2026
f5b818f
style(test): fix prettier formatting in integration test
MBanucu Jan 30, 2026
74f938a
refactor: replace Session type with PTYSessionInfo across components …
MBanucu Jan 30, 2026
79747a1
fix(client): fix kill API endpoint and remove unhandled ping messages
MBanucu Jan 30, 2026
95544bd
test(integration): add console.log debugging for CI timeout investiga…
MBanucu Jan 30, 2026
c12e043
ci(test): increase test timeout to 30 seconds
MBanucu Jan 30, 2026
1a49d52
test(integration): wait for exited state in error conditions test
MBanucu Jan 30, 2026
7ec91b8
test(integration): log full response object for better debugging
MBanucu Jan 30, 2026
414ca86
style(test): remove all console.log debugging statements
MBanucu Jan 30, 2026
ee38da4
test(integration): add test for input to sleeping session
MBanucu Jan 30, 2026
a9ce51a
fix(e2e): fix timeout by reading actual server port from file
MBanucu Jan 30, 2026
cf45def
refactor(server): remove unused manager initialization and cleanup logic
MBanucu Jan 31, 2026
3d60153
fix(e2e): improve error handling for invalid port file format
MBanucu Jan 31, 2026
3f4b2e7
fix(e2e): fix session creation and UI update race condition
MBanucu Jan 31, 2026
bd5568c
fix(e2e): add debugging and fix session management race conditions
MBanucu Jan 31, 2026
6e22ec0
fix(e2e): fix session list UI update race condition
MBanucu Jan 31, 2026
9f65bb5
test(e2e): add console.log to WebSocket message handler
MBanucu Jan 31, 2026
a5749e7
fix(e2e): remove console listener to allow console.log output
MBanucu Jan 31, 2026
acdd973
fix(e2e): add console listener to debug browser console messages
MBanucu Jan 31, 2026
560827d
fix(e2e): make test use app's WebSocket instead of creating separate one
MBanucu Jan 31, 2026
0a77846
feat(web): add support for session:update WebSocket events
MBanucu Jan 31, 2026
4e05abb
fix(test): remove broken E2E test for historical buffer loading
MBanucu Jan 31, 2026
2105ab1
fix(test): fix e2e tests and CI build process
MBanucu Jan 31, 2026
e9df1f7
fix(websocket): fix raw_data counter not updating when typing in xterm
MBanucu Jan 31, 2026
b534586
fix(terminal): remove redundant local echo causing double characters
MBanucu Jan 31, 2026
1af9d03
refactor(terminal): simplify TerminalRenderer by removing inheritance…
MBanucu Jan 31, 2026
fbdfc7b
refactor(e2e,ui): remove unused component and flaky test, improve ses…
MBanucu Jan 31, 2026
b1eeb1b
docs(agents): add terminal system architecture documentation
MBanucu Jan 31, 2026
9778ce2
refactor(web,test): centralize routes and standardize session cleanup…
MBanucu Jan 31, 2026
d3cc66d
refactor(web,test): improve RouteBuilder API and build failure handling
MBanucu Jan 31, 2026
28bddb4
refactor(web): introduce type-safe API client with compile-time valid…
MBanucu Jan 31, 2026
c9b9644
refactor(e2e,web): centralize api client usage across tests and server
MBanucu Jan 31, 2026
0727de8
refactor(e2e): adopt api fixture across all test suites
MBanucu Jan 31, 2026
57e7586
refactor(e2e): improve fixtures with auto-navigation and session cleanup
MBanucu Jan 31, 2026
e520f56
refactor(e2e): remove redundant server parameter and navigation calls
MBanucu Jan 31, 2026
f84d070
refactor(e2e): add autoCleanup fixture and remove manual session clea…
MBanucu Jan 31, 2026
fc38600
chore(e2e): remove debug console statements from UI tests
MBanucu Jan 31, 2026
a49878a
test(pty): add integration test for pty spawn echo
MBanucu Jan 31, 2026
f40eaba
feat(formatters): improve PTY session info formatting
MBanucu Jan 31, 2026
bb64537
ci(nix-flake): add CI workflow using Nix Flakes
MBanucu Jan 31, 2026
9532e7a
test(pty-list): fix assertion for multiline session output
MBanucu Jan 31, 2026
c4e87f5
ci: add Nix Flake CI job to main workflow and remove standalone file
MBanucu Jan 31, 2026
e7510fa
ci(nix): use --command -- for each Nix devShell workflow step
MBanucu Jan 31, 2026
4c12216
test(package): simplify test:all script to direct bun test
MBanucu Jan 31, 2026
b041336
ci(nix): split Nix Flake CI unit and E2E test steps
MBanucu Jan 31, 2026
0b54660
ci(nix): add build step to Nix Flake CI workflow
MBanucu Jan 31, 2026
515669e
build(package): remove typecheck from build script
MBanucu Jan 31, 2026
91b4905
test(e2e-terminal): stabilize terminal prompt and echo E2E tests
MBanucu Jan 31, 2026
29ad888
docs(e2e): document terminal E2E test policy and ban DOM assertions
MBanucu Jan 31, 2026
a3116c9
test(e2e): clean up unused variables and debug helpers
MBanucu Jan 31, 2026
20de494
ci(github-actions): refactor nix-flake-test to use matrix strategy
MBanucu Jan 31, 2026
57fb3c6
test(e2e): ensure fast-typing PTY test creates its own session
MBanucu Jan 31, 2026
3d5f682
ci: simplify workflow matrix and remove obsolete build scripts
MBanucu Jan 31, 2026
047a5c9
fix(build): correct prepack script to run actual production build
MBanucu Jan 31, 2026
9cf8fc3
ci(github-actions): cache nix flake builds via magic nix cache
MBanucu Jan 31, 2026
e9113ce
ci(github-actions): add e2e to test matrix and install playwright
MBanucu Jan 31, 2026
235decd
chore(ci): add missing newline to workflow yaml
MBanucu Jan 31, 2026
a2ed526
fix(pty-tools): require 'args' for ptySpawn tool (BREAKING)
MBanucu Jan 31, 2026
1f51a72
refactor(test): restructure E2E tests and add WebSocket event testing
MBanucu Jan 31, 2026
d649343
Add Event-Driven E2E Testing pattern to AGENTS.md
MBanucu Jan 31, 2026
cd1f5e0
refactor(test): consolidate E2E WebSocket testing into ManagedTestClient
MBanucu Jan 31, 2026
33c742f
docs(agents): refactor AGENTS.md into structured directory
MBanucu Jan 31, 2026
1bce22a
refactor(tests): improve test reliability, error handling, and code c…
MBanucu Jan 31, 2026
7a8a1d5
test(ui): increase connect expect timeout to 10s for reliability
MBanucu Jan 31, 2026
3f0b76a
docs: fix and expand agent documentation
MBanucu Feb 1, 2026
7d8396d
refactor(e2e/fixtures): use _ for unused function parameter
MBanucu Feb 1, 2026
9362c74
style(lint): remove unused dependencies and fix empty object pattern
MBanucu Feb 1, 2026
5997012
style(types): suppress unused vars warning for infer _ pattern
MBanucu Feb 1, 2026
5b7a1da
style(performance): remove unused vars and fix any type casting
MBanucu Feb 1, 2026
f907f67
style(lint): remove unused variables in catch blocks
MBanucu Feb 1, 2026
074e6b2
style(types): replace any with Record<string, unknown> in toJSON
MBanucu Feb 1, 2026
0831567
style(callback): replace any with string in Bun.Server type
MBanucu Feb 1, 2026
5d26d40
fix(callback): correct Bun.Server generic type to undefined
MBanucu Feb 1, 2026
cd3a860
style(health): remove any cast with HealthResponse interface
MBanucu Feb 1, 2026
fd21f9a
style(responses): replace any with unknown in JsonResponse
MBanucu Feb 1, 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
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
name: Bug Report
about: Report a bug with the opencode-pty plugin
title: "[Bug]: "
labels: ["bug"]
assignees: ""
title: '[Bug]: '
labels: ['bug']
assignees: ''
---

## Description
Expand Down
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
name: Feature Request
about: Suggest a new feature or enhancement
title: "[Feature]: "
labels: ["enhancement"]
assignees: ""
title: '[Feature]: '
labels: ['enhancement']
assignees: ''
---

## Problem Statement
Expand Down
81 changes: 81 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

permissions:
contents: read
actions: read

jobs:
test:
strategy:
fail-fast: false
matrix:
quality: [test --timeout=30000, run typecheck, run lint, run format:check, run test:e2e]
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v6

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

- name: Cache Bun dependencies
uses: actions/cache@v5
with:
path: ~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-

- name: Install dependencies
run: bun install

- name: Install Playwright Browsers
run: bunx playwright install --with-deps

- name: Build
run: bun run build:prod

- name: Run test
run: bun ${{matrix.quality}}

dependency-review:
runs-on: ubuntu-24.04
if: github.event_name == 'pull_request'
steps:
- name: Checkout Repository
uses: actions/checkout@v6

- name: Dependency Review
uses: actions/dependency-review-action@v4

nix-flake-test:
strategy:
fail-fast: false
matrix:
quality: [bun run quality, bun test, bun run test:e2e]
name: Nix Flake CI
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v21
- name: Enable Magic Nix Cache
uses: DeterminateSystems/magic-nix-cache-action@v13
- name: Install dependencies (Nix devShell)
run: nix --experimental-features 'nix-command flakes' develop .# --command -- bun install

- name: Build (Nix devShell)
run: nix --experimental-features 'nix-command flakes' develop .# --command -- bun run build

- name: Quality checks (Nix devShell)
run: nix --experimental-features 'nix-command flakes' develop .# --command -- ${{matrix.quality}}
39 changes: 17 additions & 22 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: Release

on:
push:
branches:
- main
workflow_run:
workflows: ['CI']
types:
- completed
branches: [main]
workflow_dispatch:

permissions:
Expand All @@ -12,26 +14,27 @@ permissions:

jobs:
publish:
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Use Node.js
uses: actions/setup-node@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
node-version: 20
bun-version: latest

- name: Determine release state
id: determine
run: |
set -euo pipefail
CURRENT_VERSION=$(node -p "require('./package.json').version")
CURRENT_VERSION=$(bun -e 'import pkg from "./package.json"; console.log(pkg.version)')
echo "current_version=$CURRENT_VERSION" >> "$GITHUB_OUTPUT"
if git rev-parse HEAD^ >/dev/null 2>&1; then
PREVIOUS_VERSION=$(node -e "const { execSync } = require('node:child_process'); try { const data = execSync('git show HEAD^:package.json', { stdio: ['ignore', 'pipe', 'ignore'] }); const json = JSON.parse(data.toString()); if (json && typeof json.version === 'string') { process.stdout.write(json.version); } } catch (error) {}")
PREVIOUS_VERSION=$(bun -e "const { execSync } = require('node:child_process'); try { const data = execSync('git show HEAD^:package.json', { stdio: ['ignore', 'pipe', 'ignore'] }); const json = JSON.parse(data.toString()); if (json && typeof json.version === 'string') { process.stdout.write(json.version); } } catch (error) {}")
PREVIOUS_VERSION=${PREVIOUS_VERSION//$'\n'/}
else
PREVIOUS_VERSION=""
Expand All @@ -51,13 +54,7 @@ jobs:

- name: Install dependencies
if: steps.determine.outputs.changed == 'true' && steps.determine.outputs.tag_exists == 'false'
run: |
npm install -g npm@latest
npm install

- name: Type check
if: steps.determine.outputs.changed == 'true' && steps.determine.outputs.tag_exists == 'false'
run: npx tsc --noEmit
run: bun install

- name: Generate release notes
if: steps.determine.outputs.changed == 'true' && steps.determine.outputs.tag_exists == 'false'
Expand Down Expand Up @@ -123,15 +120,13 @@ jobs:

- name: Create GitHub release
if: steps.determine.outputs.changed == 'true' && steps.determine.outputs.tag_exists == 'false'
uses: actions/create-release@v1
run: |
gh release create "v${{ steps.determine.outputs.current_version }}" \
--title "v${{ steps.determine.outputs.current_version }}" \
--notes "${{ steps.release_notes.outputs.body }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.determine.outputs.current_version }}
release_name: v${{ steps.determine.outputs.current_version }}
body: ${{ steps.release_notes.outputs.body }}
generate_release_notes: false

- name: Publish to npm
if: steps.determine.outputs.changed == 'true' && steps.determine.outputs.tag_exists == 'false'
run: npm publish --access public --provenance
run: bunx npm publish --access public --provenance
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ dist
coverage
*.lcov

# test results and reports
playwright-report/
test-results/

# logs
logs
_.log
Expand Down
31 changes: 31 additions & 0 deletions .opencode/agents/docs/architecture.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Architecture

## Project Structure (Directory/Files)

- `src/plugin/pty/` — Core PTY logic, types, manager, buffer, permissions, and tools
- `src/web/` — React-based web UI, server, live session and terminal interaction
- `test/` — Unit and agent-facing tests
- `e2e/` — End-to-end (Playwright) tests, for web UI/session validation
- Use camelCase for function/variable names; PascalCase for types/classes; UPPER_CASE for constants; kebab-case for directories.

## Terminal System Architecture

### Core Components

- **`RawTerminal` Component** (`src/web/client/components/TerminalRenderer.tsx`): Single React component handling all terminal rendering and input. Uses xterm.js for terminal emulation with optimized diff-based updates.
- **`useWebSocket` Hook** (`src/web/client/hooks/useWebSocket.ts`): Manages WebSocket connections, handles incoming messages (raw_data, session_update, session_list), and routes data to appropriate handlers.
- **`useSessionManager` Hook** (`src/web/client/hooks/useSessionManager.ts`): Handles session lifecycle, input sending, and session switching with buffer fetching.
- **PTY Manager** (`src/plugin/pty/manager.ts`): Server-side session management, process spawning, and buffer operations.

### Data Flow

1. **Input Flow**: User types → `RawTerminal.onData` → `handleSendInput` → POST `/api/sessions/:id/input` → WebSocket `raw_data` message → `onRawData` callback → `rawOutput` state update → `TerminalRenderer.componentDidUpdate` → xterm.js display
2. **Output Flow**: PTY process output → `SessionLifecycle.onData` → buffer append → WebSocket `raw_data` message → `onRawData` → display update
3. **Session Switching**: Click session → `handleSessionClick` → fetch buffer → replace `rawOutput` state → clear and rewrite terminal

### Key Design Decisions

- **No Local Echo**: Input is sent directly to PTY process; PTY handles all echoing to prevent double characters
- **Diff-Based Updates**: Terminal only writes changed content for performance
- **Single Component**: Simplified from inheritance hierarchy to single `RawTerminal` class
- **WebSocket-Driven**: Real-time updates via WebSocket messages rather than polling
38 changes: 38 additions & 0 deletions .opencode/agents/docs/code-style.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Code Style

## Naming Conventions

- **Functions/Variables**: camelCase (`setOnSessionUpdate`, `rawOutputCallbacks`)
- **Types/Classes**: PascalCase (`PTYManager`, `SessionLifecycleManager`)
- **Constants**: UPPER_CASE (`DEFAULT_READ_LIMIT`, `MAX_LINE_LENGTH`)
- **Directories**: kebab-case (`src/web/client`, `e2e`)
- **Files**: kebab-case for directories, camelCase for components/hooks (`useWebSocket.ts`, `TerminalRenderer.tsx`)

## TypeScript Configuration

- Strict TypeScript settings enabled (`strict: true`)
- Module resolution: `"bundler"` with `"moduleResolution": "bundler"`
- Target: ESNext with modern features
- No implicit returns or unused variables/parameters allowed
- Explicit type annotations required where beneficial

## Formatting (Prettier)

- **Semicolons**: Disabled (`semi: false`)
- **Quotes**: Single quotes preferred (`singleQuote: true`)
- **Trailing commas**: ES5 style (`trailingComma: "es5"`)
- **Print width**: 100 characters (`printWidth: 100`)
- **Indentation**: 2 spaces, no tabs (`tabWidth: 2`, `useTabs: false`)

## Import/Export Style

- Use ES6 imports/exports
- Group imports: external libraries first, then internal modules
- Prefer named exports over default exports for better tree-shaking
- Use absolute imports for internal modules where possible

## Documentation

- Use JSDoc comments for public APIs
- Inline comments for complex logic
- No redundant comments on self-explanatory code
39 changes: 39 additions & 0 deletions .opencode/agents/docs/commands.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Commands

## Development/Run/Build

- `bun run dev` — Start Vite-based development server (frontend only)
- `bun run dev:server` — Start PTY Web UI/API in dev mode (test Web server)
- `bun run build` — Clean, typecheck, and build all assets
- `bun run build:dev` — Build assets in development mode
- `bun run build:prod` — Build assets in production mode
- `bun run install:web:dev` — Build web client in dev mode
- `bun run install:all:dev` — Build/install plugin & web client
- `bun run run:all:dev` — Full build/install workflow then run OpenCode (silent)
- `bun run preview` — Preview built UI site

## Lint/Format/Quality

- `bun run lint` — Run ESLint on all source (strict)
- `bun run lint:fix` — ESLint auto-fix
- `bun run format` — Prettier formatting (writes changes)
- `bun run format:check` — Prettier check only
- `bun run quality` — Lint, format check, and typecheck (all code-quality checks)

## Test & Typecheck

- `bun run typecheck` — Typescript strict check (no emit)
- `bun run typecheck:watch` — Typecheck in watch mode
- `bun test` — Run unit tests
- `bun test --test-name-pattern <pattern>` — Run filtered unit tests
- `bun run test:e2e` — Playwright end-to-end tests; ensure dev server built, uses `PW_DISABLE_TS_ESM=1` (disables trouble causing Playwright/Bun features) and `NODE_ENV=test` (used by tests)
- `bun run test:all` — All unit + E2E tests
- Run filtered E2E tests: `bun run test:e2e -- --grep "<pattern>"` (also supports `--repeat-each <N>` for flakiness detection and `--project <name>` for specific browser projects)

## Other

- `bun run clean` — Remove build artifacts, test results, etc.
- `bun run ci` — Run quality checks and all tests (used by CI pipeline)
- `bun run prepack` — Automatically runs before `npm pack`; builds plugin for OpenCode consumption

**Note:** Many scripts have special requirements or additional ENV flags; see inline package.json script comments for platform- or environment-specific details (e.g. Playwright+Bun TS support requires `PW_DISABLE_TS_ESM=1`).
35 changes: 35 additions & 0 deletions .opencode/agents/docs/contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Contributing

## Development Workflow

1. **Fork & Branch**: Create feature branch from main
2. **Code Changes**: Follow established conventions
3. **Testing**: Add/update tests for new functionality
4. **Quality Checks**: Run `bun run quality` before committing
5. **Commit**: Use descriptive commit messages
6. **Pull Request**: Create PR with clear description

## Pull Request Requirements

- **Tests**: Include unit and E2E tests as appropriate
- **Documentation**: Update AGENTS.md for significant changes
- **Breaking Changes**: Clearly document API changes
- **Code Review**: Address review feedback
- **CI**: All checks must pass

## Code Review Checklist

- [ ] TypeScript types correct and complete
- [ ] Error handling appropriate
- [ ] Tests added/updated
- [ ] Documentation updated
- [ ] Security considerations addressed
- [ ] Performance implications considered
- [ ] Code style conventions followed

## Commit Message Convention

- Use imperative mood: "Add feature" not "Added feature"
- Start with action verb (Add, Fix, Update, Remove, etc.)
- Keep first line under 50 characters
- Add detailed description for complex changes
29 changes: 29 additions & 0 deletions .opencode/agents/docs/dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Dependencies

## Package Management

- **Runtime**: Bun for fast package management and execution
- **Dependencies**: Listed in `package.json` with specific versions
- **Lockfile**: `bun.lockb` ensures reproducible installs
- **Peer Dependencies**: TypeScript ^5 required

## Key Dependencies

- `@opencode-ai/plugin` & `@opencode-ai/sdk` — OpenCode integration
- `@xterm/xterm` & `@xterm/addon-*` — Terminal emulation
- `bun-pty` — PTY process management
- `react` & `react-dom` — Web UI framework
- `strip-ansi` — ANSI escape sequence removal

## Development Dependencies

- Testing: `@playwright/test`, Bun test runner
- Code Quality: `eslint`, `prettier`, `typescript`
- Build: `vite`, `@vitejs/plugin-react`

## Updating Dependencies

- Use `bun update <package>` for specific package updates
- Run full test suite after updates
- Check for breaking changes in changelogs
- Update lockfile and commit together
Loading
Loading