{"_id":"opencode-pty","_rev":"17-b0e8228641cef16c7dd2ac0661589f33","name":"opencode-pty","dist-tags":{"latest":"0.4.0"},"versions":{"0.0.0":{"name":"opencode-pty","version":"0.0.0","keywords":["opencode","opencode-plugin","pty","pseudo-terminal","terminal","background-process","interactive","cli","shell","dev-server","bun"],"author":{"name":"shekohex"},"license":"MIT","_id":"opencode-pty@0.0.0","maintainers":[{"name":"shekohex","email":"dev+npm@shadykhalifa.me"}],"homepage":"https://github.com/shekohex/opencode-pty#readme","bugs":{"url":"https://github.com/shekohex/opencode-pty/issues"},"dist":{"shasum":"1ca24dc93b01a5d35b25886939b06e8d1bdaa49c","tarball":"https://registry.npmjs.org/opencode-pty/-/opencode-pty-0.0.0.tgz","fileCount":22,"integrity":"sha512-Z/Pxj0tbR8dDozeVpQpWOKRoHum2x9X0oAiOU20zha/qrV5vizZFyPIHF34Pzm8ifWPdPumk6GQgFMz6UEnXtg==","signatures":[{"sig":"MEQCIEpQjUVRRl3FIFNr5smIAEkrIje2CdySEBa5HRN8P36oAiBHLzXcl9pbfni86b9NYWoPkMKtGDpokYTSJVs+cO18PA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":39090},"type":"module","module":"index.ts","gitHead":"8d6520f75fbfc197af4ecf0195ac0459f291ad14","scripts":{"test":"bun test","typecheck":"tsc --noEmit"},"_npmUser":{"name":"shekohex","email":"dev+npm@shadykhalifa.me"},"repository":{"url":"git+https://github.com/shekohex/opencode-pty.git","type":"git"},"_npmVersion":"11.6.1","description":"OpenCode plugin for interactive PTY management - run background processes, send input, read output with regex filtering","directories":{},"_nodeVersion":"24.11.0","dependencies":{"bun-pty":"^0.4.2"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","@opencode-ai/sdk":"^1.0.146","@opencode-ai/plugin":"^1.0.146"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/opencode-pty_0.0.0_1765644722516_0.8882467135967977","host":"s3://npm-registry-packages-npm-production"}},"0.0.1":{"name":"opencode-pty","version":"0.0.1","keywords":["opencode","opencode-plugin","pty","pseudo-terminal","terminal","background-process","interactive","cli","shell","dev-server","bun"],"author":{"name":"shekohex"},"license":"MIT","_id":"opencode-pty@0.0.1","maintainers":[{"name":"shekohex","email":"dev+npm@shadykhalifa.me"}],"homepage":"https://github.com/shekohex/opencode-pty#readme","bugs":{"url":"https://github.com/shekohex/opencode-pty/issues"},"dist":{"shasum":"0ec12a3834af62eed57dc590229579ef04230c05","tarball":"https://registry.npmjs.org/opencode-pty/-/opencode-pty-0.0.1.tgz","fileCount":22,"integrity":"sha512-BIg2i3EObAKLnwVa8L9WxAnR8mzfQDUM4TW9jEJXCmUrTXtkqoutPVgQs+NUGJBNxEweNqpFcUNFshaWRJ6lEg==","signatures":[{"sig":"MEUCIQDVY4A4dkN9Rm7StrIIPaISHrTZwVW0jCMse30OsXY4KwIgNYWJX2wkRdxS1BtVHgC4b1k4YLJ2a3Aw/6LyxXDJEVg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/opencode-pty@0.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":39090},"type":"module","module":"index.ts","gitHead":"e81a5a7b350e703dece3a81140859ec37766a2f7","scripts":{"test":"bun test","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:eeac02e1-3d22-42f2-aebe-598ec2aced5d"}},"repository":{"url":"git+https://github.com/shekohex/opencode-pty.git","type":"git"},"_npmVersion":"11.7.0","description":"OpenCode plugin for interactive PTY management - run background processes, send input, read output with regex filtering","directories":{},"_nodeVersion":"20.19.6","dependencies":{"bun-pty":"^0.4.2"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","@opencode-ai/sdk":"^1.0.146","@opencode-ai/plugin":"^1.0.146"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/opencode-pty_0.0.1_1765644813142_0.7615191433898874","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"opencode-pty","version":"0.1.0","keywords":["opencode","opencode-plugin","pty","pseudo-terminal","terminal","background-process","interactive","cli","shell","dev-server","bun"],"author":{"name":"shekohex"},"license":"MIT","_id":"opencode-pty@0.1.0","maintainers":[{"name":"shekohex","email":"dev+npm@shadykhalifa.me"}],"homepage":"https://github.com/shekohex/opencode-pty#readme","bugs":{"url":"https://github.com/shekohex/opencode-pty/issues"},"dist":{"shasum":"9f0cc09564cf935ad31a8dfb4b6d2a412b8fac28","tarball":"https://registry.npmjs.org/opencode-pty/-/opencode-pty-0.1.0.tgz","fileCount":22,"integrity":"sha512-Q4iCeZEXPmjse8ivIbBRl8mgp06uYmkfMDYgnghOhGw5Sym3YpBVQF8v6OoEXOZJBrQjmjhLu0jWS8agYTkHrw==","signatures":[{"sig":"MEYCIQD6F9d62LE2yh1utTv7f8ckG0SGZJIYg1EL2z/fKeW2mwIhAIVqcpujx/2Ehu1faF4H6cYap6VyJkIcBfFQMdqH22x8","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/opencode-pty@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":39090},"type":"module","module":"index.ts","gitHead":"98d457affa0b2de619923aeaa8a0f2237904f637","scripts":{"test":"bun test","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:eeac02e1-3d22-42f2-aebe-598ec2aced5d"}},"repository":{"url":"git+https://github.com/shekohex/opencode-pty.git","type":"git"},"_npmVersion":"11.7.0","description":"OpenCode plugin for interactive PTY management - run background processes, send input, read output with regex filtering","directories":{},"_nodeVersion":"20.19.6","dependencies":{"bun-pty":"^0.4.2"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","@opencode-ai/sdk":"^1.0.146","@opencode-ai/plugin":"^1.0.146"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/opencode-pty_0.1.0_1765644866889_0.9629689353481163","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"opencode-pty","version":"0.1.1","keywords":["opencode","opencode-plugin","pty","pseudo-terminal","terminal","background-process","interactive","cli","shell","dev-server","bun"],"author":{"name":"shekohex"},"license":"MIT","_id":"opencode-pty@0.1.1","maintainers":[{"name":"shekohex","email":"dev+npm@shadykhalifa.me"}],"homepage":"https://github.com/shekohex/opencode-pty#readme","bugs":{"url":"https://github.com/shekohex/opencode-pty/issues"},"dist":{"shasum":"ffcfe484f4efadec2bc60229ae9982c53cc132e1","tarball":"https://registry.npmjs.org/opencode-pty/-/opencode-pty-0.1.1.tgz","fileCount":22,"integrity":"sha512-pXpkDAU4gUF5Qqk/qLI5kcERSYx1ijGWjrbnhe5T2Sb37DZa0zwLAKgfRFKpVTLwyFP2jWuPn53iSAF0qvEzKA==","signatures":[{"sig":"MEUCIQCfRLHmovySRr69H/jMkC0hGQrQZIkUZqmvIwK8cW/1BwIgRIoMcSErTBJQ9RMmIKxoQHsI0Ay5XbEEHeSDiMYBkoI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/opencode-pty@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":39857},"type":"module","module":"index.ts","gitHead":"c7828eb13745b0cad76995669dc8c52710747ac7","scripts":{"test":"bun test","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:eeac02e1-3d22-42f2-aebe-598ec2aced5d"}},"repository":{"url":"git+https://github.com/shekohex/opencode-pty.git","type":"git"},"_npmVersion":"11.7.0","description":"OpenCode plugin for interactive PTY management - run background processes, send input, read output with regex filtering","directories":{},"_nodeVersion":"20.19.6","dependencies":{"bun-pty":"^0.4.2"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","@opencode-ai/sdk":"^1.0.146","@opencode-ai/plugin":"^1.0.146"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/opencode-pty_0.1.1_1767095766821_0.9797789528290795","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"opencode-pty","version":"0.1.2","keywords":["opencode","opencode-plugin","pty","pseudo-terminal","terminal","background-process","interactive","cli","shell","dev-server","bun"],"author":{"name":"shekohex"},"license":"MIT","_id":"opencode-pty@0.1.2","maintainers":[{"name":"shekohex","email":"dev+npm@shadykhalifa.me"}],"homepage":"https://github.com/shekohex/opencode-pty#readme","bugs":{"url":"https://github.com/shekohex/opencode-pty/issues"},"dist":{"shasum":"d3e05f458aff77e270931eb086b40cd7da1b96a9","tarball":"https://registry.npmjs.org/opencode-pty/-/opencode-pty-0.1.2.tgz","fileCount":22,"integrity":"sha512-D47GWFKVRpyaFtImaSCWQ07foXcm/BzT1rOI7QBKSVT6ZRgiLBFQm1WPNblm6mD/59JVU8v9fG51YviQB5l3yw==","signatures":[{"sig":"MEYCIQCKgMjRSWikRSWzs6Q7Ht44opVDM8+QLzKP2UjEv7jTEgIhAOTKOmjfPLwfXfy0jzWvNVtu9NRhNGNQbIbjh6bo3XgR","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/opencode-pty@0.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":39853},"type":"module","module":"index.ts","gitHead":"83804df9d9062962b665923fc090de0a12e0c102","scripts":{"test":"bun test","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:eeac02e1-3d22-42f2-aebe-598ec2aced5d"}},"repository":{"url":"git+https://github.com/shekohex/opencode-pty.git","type":"git"},"_npmVersion":"11.7.0","description":"OpenCode plugin for interactive PTY management - run background processes, send input, read output with regex filtering","directories":{},"_nodeVersion":"20.19.6","dependencies":{"bun-pty":"^0.4.2","@opencode-ai/sdk":"^1.1.3","@opencode-ai/plugin":"^1.1.3"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/opencode-pty_0.1.2_1767730894012_0.5625534403446442","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"opencode-pty","version":"0.1.3","keywords":["opencode","opencode-plugin","pty","pseudo-terminal","terminal","background-process","interactive","cli","shell","dev-server","bun"],"author":{"name":"shekohex"},"license":"MIT","_id":"opencode-pty@0.1.3","maintainers":[{"name":"shekohex","email":"dev+npm@shadykhalifa.me"}],"homepage":"https://github.com/shekohex/opencode-pty#readme","bugs":{"url":"https://github.com/shekohex/opencode-pty/issues"},"dist":{"shasum":"3ff45eb112ba7c236657beb9cb7fa7309bdcf47d","tarball":"https://registry.npmjs.org/opencode-pty/-/opencode-pty-0.1.3.tgz","fileCount":22,"integrity":"sha512-VYnH95mnY8b2VKtHMAZIcmVcS00UCZn4wmWtrnNISiei/H4MjZLVRn7qS81A0x9OleGH+RfKnm2D9ORUxOdsBQ==","signatures":[{"sig":"MEUCIQDVyvtV0vcSTa75JOOzwNxaqW89lwBf8dZArmzuvf5lRQIgVUvT/+8wi3ihiqwMf0v/6yRImeCT94Ac4kZhe1Q/+EY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/opencode-pty@0.1.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":43334},"type":"module","module":"index.ts","gitHead":"9b4c387f50b961763b9f7d6cdb7657b1493567c9","scripts":{"test":"bun test","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:eeac02e1-3d22-42f2-aebe-598ec2aced5d"}},"repository":{"url":"git+https://github.com/shekohex/opencode-pty.git","type":"git"},"_npmVersion":"11.7.0","description":"OpenCode plugin for interactive PTY management - run background processes, send input, read output with regex filtering","directories":{},"_nodeVersion":"20.19.6","dependencies":{"bun-pty":"^0.4.2","@opencode-ai/sdk":"^1.1.3","@opencode-ai/plugin":"^1.1.3"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/opencode-pty_0.1.3_1767884793652_0.5554954634396081","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"opencode-pty","version":"0.1.4","keywords":["opencode","opencode-plugin","pty","pseudo-terminal","terminal","background-process","interactive","cli","shell","dev-server","bun"],"author":{"name":"shekohex"},"license":"MIT","_id":"opencode-pty@0.1.4","maintainers":[{"name":"shekohex","email":"dev+npm@shadykhalifa.me"}],"homepage":"https://github.com/shekohex/opencode-pty#readme","bugs":{"url":"https://github.com/shekohex/opencode-pty/issues"},"dist":{"shasum":"0f06a1d234e578ab29bb6624cc7bb2ec2d5a0e82","tarball":"https://registry.npmjs.org/opencode-pty/-/opencode-pty-0.1.4.tgz","fileCount":22,"integrity":"sha512-wGbqgFboL9Cx2WLjA0GxldqGFWu9VMmBozITerET1oXmevtnjgOOZ0RZH3AB/7xtBqd4yJvZrloOpiWo7wvIVw==","signatures":[{"sig":"MEUCIQCJobg70jsbmgW6axQpgyqMiwxKOLwNP/WQaDzXMQ14kQIgMiP9pn2icLNS4CfVdPjxuxotb9RUS32La00BPTPyxwo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/opencode-pty@0.1.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":43725},"type":"module","module":"index.ts","gitHead":"46d0605ea987a8793bbf2df12a8165f4b01e2043","scripts":{"test":"bun test","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:eeac02e1-3d22-42f2-aebe-598ec2aced5d"}},"repository":{"url":"git+https://github.com/shekohex/opencode-pty.git","type":"git"},"_npmVersion":"11.7.0","description":"OpenCode plugin for interactive PTY management - run background processes, send input, read output with regex filtering","directories":{},"_nodeVersion":"20.19.6","dependencies":{"bun-pty":"^0.4.2","@opencode-ai/sdk":"^1.1.3","@opencode-ai/plugin":"^1.1.3"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/opencode-pty_0.1.4_1767886448640_0.2452227548408712","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"opencode-pty","version":"0.1.5","keywords":["opencode","opencode-plugin","pty","pseudo-terminal","terminal","background-process","interactive","cli","shell","dev-server","bun"],"author":{"name":"shekohex"},"license":"MIT","_id":"opencode-pty@0.1.5","maintainers":[{"name":"shekohex","email":"dev+npm@shadykhalifa.me"}],"homepage":"https://github.com/shekohex/opencode-pty#readme","bugs":{"url":"https://github.com/shekohex/opencode-pty/issues"},"dist":{"shasum":"58ecf1bee3182d29ec6f826666b42bbbbf7f6212","tarball":"https://registry.npmjs.org/opencode-pty/-/opencode-pty-0.1.5.tgz","fileCount":22,"integrity":"sha512-vxufpeWYWfTeFwBjy631/7z1h5GclTq2d+gb7CzUX6L2suhZhAE4roL6EKR8ZpDP4c5dZNbY2NbtlsxyknDmaQ==","signatures":[{"sig":"MEUCIQDaoU+osHNDxM5kfVb/z83Z1qNxlTLbUjTiaa8A7YEj0wIgOGSMppPPV/Rxqf9vsTaXeoUMA9TxfnMD2Qqy3tZ6GR4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/opencode-pty@0.1.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":43724},"type":"module","module":"index.ts","gitHead":"6c417c49648b1ff8e12ecfe19172d7abade09f31","scripts":{"test":"bun test","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:eeac02e1-3d22-42f2-aebe-598ec2aced5d"}},"repository":{"url":"git+https://github.com/shekohex/opencode-pty.git","type":"git"},"_npmVersion":"11.8.0","description":"OpenCode plugin for interactive PTY management - run background processes, send input, read output with regex filtering","directories":{},"_nodeVersion":"20.20.0","dependencies":{"bun-pty":"^0.4.8","@opencode-ai/sdk":"^1.1.3","@opencode-ai/plugin":"^1.1.3"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"1.3.1"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/opencode-pty_0.1.5_1769787167424_0.4620434691976061","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"opencode-pty","version":"0.2.0","keywords":["opencode","opencode-plugin","pty","pseudo-terminal","terminal","background-process","interactive","cli","shell","dev-server","bun"],"author":{"name":"shekohex"},"license":"MIT","_id":"opencode-pty@0.2.0","maintainers":[{"name":"shekohex","email":"dev+npm@shadykhalifa.me"}],"homepage":"https://github.com/shekohex/opencode-pty#readme","bugs":{"url":"https://github.com/shekohex/opencode-pty/issues"},"dist":{"shasum":"5c66a4be0e19c54cf8ad9c05b166b8de10d9f6d1","tarball":"https://registry.npmjs.org/opencode-pty/-/opencode-pty-0.2.0.tgz","fileCount":54,"integrity":"sha512-lYzVjZ3wtx+eh+DZQjS3zdE3DyDNj6uX/tczYVCFbxyvjK/7DpIGfatS5zM3py0FZLzRLf8f+BhiSRmii4c1Cg==","signatures":[{"sig":"MEYCIQCr0cetpmv5ivIwu4/1tRmCxAMXzzmnoxSqp1ABhYzuVwIhAMMXQ71lCBBYUY2Mbj6X2QeX9W77wJ/EeorLrO80HWon","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":632997},"type":"module","module":"index.ts","exports":{"./*":"./src/*.ts","./*/*":"./src/*/*.ts","./*/*/*":"./src/*/*/*.ts","./*/*/*/*":"./src/*/*/*/*.ts","./*/*/*/*/*":"./src/*/*/*/*/*.ts"},"gitHead":"9355b2ebef472d39737ff378f4333aeaaa313fbe","scripts":{"lint":"eslint . --ext .ts,.tsx,.js,.jsx","clean":"rm -rf dist playwright-report test-results","format":"prettier --write .","prepack":"bun build:prod","quality":"bun lint && bun format:check && bun typecheck","lint:fix":"eslint . --ext .ts,.tsx,.js,.jsx --fix","test:all":"bun test && bun test:e2e","test:e2e":"PW_DISABLE_TS_ESM=1 NODE_ENV=test bun --bun playwright test","build:dev":"bun clean && vite build --mode development","typecheck":"tsc --noEmit","build:prod":"bun clean && vite build --mode production","format:check":"prettier --check .","typecheck:watch":"tsc --noEmit --watch"},"_npmUser":{"name":"shekohex","email":"dev+npm@shadykhalifa.me"},"repository":{"url":"git+https://github.com/shekohex/opencode-pty.git","type":"git"},"_npmVersion":"11.6.2","description":"OpenCode plugin for interactive PTY management - run background processes, send input, read output with regex filtering","directories":{},"_nodeVersion":"24.13.0","dependencies":{"open":"^11.0.0","moment":"^2.30.1","bun-pty":"^0.4.8","@opencode-ai/sdk":"^1.1.51","@opencode-ai/plugin":"^1.1.51"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^7.3.1","jsdom":"^27.4.0","react":"^18.3.1","eslint":"^9.39.2","prettier":"^3.8.1","happy-dom":"^20.5.0","react-dom":"^18.3.1","@types/bun":"^1.3.8","typescript":"^5.9.3","@types/jsdom":"^27.0.0","@types/react":"^18.3.27","@xterm/xterm":"^6.0.0","playwright-core":"1.57.0","@playwright/test":"1.57.0","@types/react-dom":"^18.3.7","@xterm/addon-fit":"^0.11.0","eslint-plugin-react":"^7.37.5","@vitejs/plugin-react":"^4.7.0","eslint-plugin-import":"^2.32.0","@xterm/addon-serialize":"^0.14.0","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.5","@typescript-eslint/parser":"^8.54.0","eslint-plugin-react-hooks":"^7.0.1","@typescript-eslint/eslint-plugin":"^8.54.0"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/opencode-pty_0.2.0_1770215916326_0.10059053121191486","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"opencode-pty","version":"0.2.1","keywords":["opencode","opencode-plugin","pty","pseudo-terminal","terminal","background-process","interactive","cli","shell","dev-server","bun"],"author":{"name":"shekohex"},"license":"MIT","_id":"opencode-pty@0.2.1","maintainers":[{"name":"shekohex","email":"dev+npm@shadykhalifa.me"}],"homepage":"https://github.com/shekohex/opencode-pty#readme","bugs":{"url":"https://github.com/shekohex/opencode-pty/issues"},"dist":{"shasum":"732a6cbdd6d8822ef4ac12b14d602507a1255b36","tarball":"https://registry.npmjs.org/opencode-pty/-/opencode-pty-0.2.1.tgz","fileCount":54,"integrity":"sha512-TI3R4WRrR9xMHYws8r91o0JM+3k0LF+0/o2k3/EHTAn9WXQetUCoEwgeVcXet/tIHpUVGI5bBbRSvADOfEkWgg==","signatures":[{"sig":"MEUCIQDowEWJvijLhgSSQYpwA9d+vJwBoPrmijdgp0ir4M7PxAIgKgqX05bV9ztEI56hef2iXEOUh+0pO55pIhu/STWK7nQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":633319},"type":"module","module":"index.ts","exports":{"./*":"./src/*.ts","./*/*":"./src/*/*.ts","./*/*/*":"./src/*/*/*.ts","./*/*/*/*":"./src/*/*/*/*.ts","./*/*/*/*/*":"./src/*/*/*/*/*.ts"},"gitHead":"c5558758ea70aa7e4f08322287394ec84e7844ca","scripts":{"lint":"eslint . --ext .ts,.tsx,.js,.jsx","clean":"rm -rf dist playwright-report test-results","format":"prettier --write .","prepack":"bun build:prod","quality":"bun lint && bun format:check && bun typecheck","lint:fix":"eslint . --ext .ts,.tsx,.js,.jsx --fix","test:all":"bun test && bun test:e2e","test:e2e":"PW_DISABLE_TS_ESM=1 NODE_ENV=test bun --bun playwright test","build:dev":"bun clean && vite build --mode development","typecheck":"tsc --noEmit","build:prod":"bun clean && vite build --mode production","format:check":"prettier --check .","typecheck:watch":"tsc --noEmit --watch"},"_npmUser":{"name":"shekohex","email":"dev+npm@shadykhalifa.me"},"repository":{"url":"git+https://github.com/shekohex/opencode-pty.git","type":"git"},"_npmVersion":"11.6.2","description":"OpenCode plugin for interactive PTY management - run background processes, send input, read output with regex filtering","directories":{},"_nodeVersion":"24.13.0","dependencies":{"open":"^11.0.0","moment":"^2.30.1","bun-pty":"^0.4.8","@opencode-ai/sdk":"^1.1.51","@opencode-ai/plugin":"^1.1.51"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^7.3.1","jsdom":"^27.4.0","react":"^18.3.1","eslint":"^9.39.2","prettier":"^3.8.1","happy-dom":"^20.5.0","react-dom":"^18.3.1","@types/bun":"^1.3.8","typescript":"^5.9.3","@types/jsdom":"^27.0.0","@types/react":"^18.3.27","@xterm/xterm":"^6.0.0","playwright-core":"1.57.0","@playwright/test":"1.57.0","@types/react-dom":"^18.3.7","@xterm/addon-fit":"^0.11.0","eslint-plugin-react":"^7.37.5","@vitejs/plugin-react":"^4.7.0","eslint-plugin-import":"^2.32.0","@xterm/addon-serialize":"^0.14.0","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.5","@typescript-eslint/parser":"^8.54.0","eslint-plugin-react-hooks":"^7.0.1","@typescript-eslint/eslint-plugin":"^8.54.0"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/opencode-pty_0.2.1_1770388207484_0.4210437999025436","host":"s3://npm-registry-packages-npm-production"}},"0.2.3":{"name":"opencode-pty","version":"0.2.3","keywords":["opencode","opencode-plugin","pty","pseudo-terminal","terminal","background-process","interactive","cli","shell","dev-server","bun"],"author":{"name":"shekohex"},"license":"MIT","_id":"opencode-pty@0.2.3","maintainers":[{"name":"shekohex","email":"dev+npm@shadykhalifa.me"}],"homepage":"https://github.com/shekohex/opencode-pty#readme","bugs":{"url":"https://github.com/shekohex/opencode-pty/issues"},"dist":{"shasum":"7d96902e0abbef72cda09a3e7b21719e34b28211","tarball":"https://registry.npmjs.org/opencode-pty/-/opencode-pty-0.2.3.tgz","fileCount":53,"integrity":"sha512-KbZ3jAVkOvcirmKmqd0GUjQ15pjAO8QnKdi2yF94cXeNayw8paeSNW6gzIL1imxAF8dOTcc66+MdT/S3o7OhMA==","signatures":[{"sig":"MEYCIQDfBkBkAHu70wn0nX16+sURy/6OL4BlK0Q4AsWM72Dx5QIhAOX+8TxLF+F5peNO9RkjGRTjNIeWxQv0NDlYBRbeWA+Z","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":630137},"type":"module","module":"index.ts","exports":{"./*":"./src/*.ts","./*/*":"./src/*/*.ts","./*/*/*":"./src/*/*/*.ts","./*/*/*/*":"./src/*/*/*/*.ts","./*/*/*/*/*":"./src/*/*/*/*/*.ts"},"gitHead":"078bc32b44c5300c4b06d1953e421d8625474996","scripts":{"lint":"biome lint .","clean":"rm -rf dist playwright-report test-results","format":"biome format .","prepack":"bun build:prod","lint:fix":"biome lint --write .","test:all":"bun unittest && bun test:e2e","test:e2e":"PW_DISABLE_TS_ESM=1 NODE_ENV=test bun --bun playwright test","unittest":"bun test","build:dev":"bun clean && vite build --mode development","typecheck":"tsc --noEmit","build:prod":"bun clean && vite build --mode production","format:fix":"biome format --write ."},"_npmUser":{"name":"shekohex","email":"dev+npm@shadykhalifa.me"},"repository":{"url":"git+https://github.com/shekohex/opencode-pty.git","type":"git"},"_npmVersion":"11.6.2","description":"OpenCode plugin for interactive PTY management - run background processes, send input, read output with regex filtering","directories":{},"_nodeVersion":"24.13.0","dependencies":{"open":"^11.0.0","moment":"^2.30.1","bun-pty":"^0.4.8","@opencode-ai/sdk":"^1.1.51","@opencode-ai/plugin":"^1.1.51"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^7.3.1","jsdom":"^27.4.0","react":"^18.3.1","happy-dom":"^20.5.0","react-dom":"^18.3.1","@types/bun":"^1.3.8","typescript":"^5.9.3","@types/jsdom":"^27.0.0","@types/react":"^18.3.27","@xterm/xterm":"^6.0.0","@biomejs/biome":"2.3.13","playwright-core":"1.57.0","@playwright/test":"1.57.0","@types/react-dom":"^18.3.7","@xterm/addon-fit":"^0.11.0","@vitejs/plugin-react":"^4.7.0","@xterm/addon-serialize":"^0.14.0"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/opencode-pty_0.2.3_1771350626018_0.7529214115983505","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"opencode-pty","version":"0.3.0","keywords":["opencode","opencode-plugin","pty","pseudo-terminal","terminal","background-process","interactive","cli","shell","dev-server","bun"],"author":{"name":"shekohex"},"license":"MIT","_id":"opencode-pty@0.3.0","maintainers":[{"name":"shekohex","email":"dev+npm@shadykhalifa.me"}],"homepage":"https://github.com/shekohex/opencode-pty#readme","bugs":{"url":"https://github.com/shekohex/opencode-pty/issues"},"dist":{"shasum":"19e965e00c2c4db470600d01611bcdfb325c49d6","tarball":"https://registry.npmjs.org/opencode-pty/-/opencode-pty-0.3.0.tgz","fileCount":53,"integrity":"sha512-IwjcJepSdaXJl3+9MXL7DmjNJybPOm8yGx9PZBYAq9beYeJE5CBBYA6c23j+1jxjXEoGPWzmJb4irlcNN1UWZQ==","signatures":[{"sig":"MEUCIQCrdOWnXL1nMbPaxyAGAg9pVnhNeetGJ8F5CQvSxMjLMAIgMPkUfCp0+nOLEfogcoMqAsGxzD2TtimVSpTlUmwkuaY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":630214},"type":"module","module":"index.ts","engines":{"opencode":">=1.3.13"},"exports":{"./*":"./src/*.ts","./*/*":"./src/*/*.ts","./*/*/*":"./src/*/*/*.ts","./server":"./index.ts","./*/*/*/*":"./src/*/*/*/*.ts","./*/*/*/*/*":"./src/*/*/*/*/*.ts"},"gitHead":"063b4c2077d7d858d7d71f8b1be529c5df430873","scripts":{"lint":"biome lint .","clean":"rm -rf dist playwright-report test-results","format":"biome format .","prepack":"bun build:prod","lint:fix":"biome lint --write .","test:all":"bun unittest && bun test:e2e","test:e2e":"PW_DISABLE_TS_ESM=1 NODE_ENV=test bun --bun playwright test","unittest":"bun test","build:dev":"bun clean && vite build --mode development","typecheck":"tsc --noEmit","build:prod":"bun clean && vite build --mode production","format:fix":"biome format --write ."},"_npmUser":{"name":"shekohex","email":"dev+npm@shadykhalifa.me"},"repository":{"url":"git+https://github.com/shekohex/opencode-pty.git","type":"git"},"_npmVersion":"11.6.2","description":"OpenCode plugin for interactive PTY management - run background processes, send input, read output with regex filtering","directories":{},"_nodeVersion":"24.13.0","dependencies":{"open":"^11.0.0","moment":"^2.30.1","bun-pty":"^0.4.8","@opencode-ai/sdk":"^1.3.13","@opencode-ai/plugin":"^1.3.13"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^7.3.1","jsdom":"^27.4.0","react":"^18.3.1","happy-dom":"^20.5.0","react-dom":"^18.3.1","@types/bun":"^1.3.8","typescript":"^5.9.3","@types/jsdom":"^27.0.0","@types/react":"^18.3.27","@xterm/xterm":"^6.0.0","@biomejs/biome":"2.3.13","playwright-core":"1.57.0","@playwright/test":"1.57.0","@types/react-dom":"^18.3.7","@xterm/addon-fit":"^0.11.0","@vitejs/plugin-react":"^4.7.0","@xterm/addon-serialize":"^0.14.0"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/opencode-pty_0.3.0_1775047899844_0.6074334926831775","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"opencode-pty","version":"0.3.1","keywords":["opencode","opencode-plugin","pty","pseudo-terminal","terminal","background-process","interactive","cli","shell","dev-server","bun"],"author":{"name":"shekohex"},"license":"MIT","_id":"opencode-pty@0.3.1","maintainers":[{"name":"shekohex","email":"dev+npm@shadykhalifa.me"}],"homepage":"https://github.com/shekohex/opencode-pty#readme","bugs":{"url":"https://github.com/shekohex/opencode-pty/issues"},"dist":{"shasum":"42eec2a216056b4158345ee09731f076da63a4df","tarball":"https://registry.npmjs.org/opencode-pty/-/opencode-pty-0.3.1.tgz","fileCount":53,"integrity":"sha512-nmtMmI27kNn8d+phVykhrxySw1SwV39DRUfftUaOQUp/Dll3677DFE/LDfMZNPqr2/xDxngYFuIuaxiLlcKTtA==","signatures":[{"sig":"MEUCIGpIGzhz7li9oeVZK3sqBMB8SZC49AAqXFbzOLdy4psQAiEA5Up7v7RF93m9TdPdXBIE3Zno4OOYGUYSNwLlphhtBqQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":630135},"type":"module","module":"index.ts","engines":{"opencode":">=1.3.13"},"exports":{"./*":"./src/*.ts","./*/*":"./src/*/*.ts","./*/*/*":"./src/*/*/*.ts","./server":"./index.ts","./*/*/*/*":"./src/*/*/*/*.ts","./*/*/*/*/*":"./src/*/*/*/*/*.ts"},"gitHead":"cf716c73bec46920763db28d4d9f7da0da8a4993","scripts":{"lint":"biome lint .","clean":"rm -rf dist playwright-report test-results","format":"biome format .","prepack":"bun build:prod","lint:fix":"biome lint --write .","test:all":"bun unittest && bun test:e2e","test:e2e":"PW_DISABLE_TS_ESM=1 NODE_ENV=test bun --bun playwright test","unittest":"bun test","build:dev":"bun clean && vite build --mode development","typecheck":"tsc --noEmit","build:prod":"bun clean && vite build --mode production","format:fix":"biome format --write ."},"_npmUser":{"name":"shekohex","email":"dev+npm@shadykhalifa.me"},"repository":{"url":"git+https://github.com/shekohex/opencode-pty.git","type":"git"},"_npmVersion":"11.6.2","description":"OpenCode plugin for interactive PTY management - run background processes, send input, read output with regex filtering","directories":{},"_nodeVersion":"24.13.0","dependencies":{"open":"^11.0.0","bun-pty":"^0.4.8","@opencode-ai/sdk":"^1.3.13","@opencode-ai/plugin":"^1.3.13"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^7.3.1","jsdom":"^27.4.0","react":"^18.3.1","happy-dom":"^20.5.0","react-dom":"^18.3.1","@types/bun":"^1.3.8","typescript":"^5.9.3","@types/jsdom":"^27.0.0","@types/react":"^18.3.27","@xterm/xterm":"^6.0.0","@biomejs/biome":"2.3.13","playwright-core":"1.57.0","@playwright/test":"1.57.0","@types/react-dom":"^18.3.7","@xterm/addon-fit":"^0.11.0","@vitejs/plugin-react":"^4.7.0","@xterm/addon-serialize":"^0.14.0"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/opencode-pty_0.3.1_1775054236753_0.9757373928454018","host":"s3://npm-registry-packages-npm-production"}},"0.3.2":{"name":"opencode-pty","version":"0.3.2","keywords":["opencode","opencode-plugin","pty","pseudo-terminal","terminal","background-process","interactive","cli","shell","dev-server","bun"],"author":{"name":"shekohex"},"license":"MIT","_id":"opencode-pty@0.3.2","maintainers":[{"name":"shekohex","email":"dev+npm@shadykhalifa.me"}],"homepage":"https://github.com/shekohex/opencode-pty#readme","bugs":{"url":"https://github.com/shekohex/opencode-pty/issues"},"dist":{"shasum":"def75617b249e4778f7caa3874b8591ac5fba703","tarball":"https://registry.npmjs.org/opencode-pty/-/opencode-pty-0.3.2.tgz","fileCount":53,"integrity":"sha512-nG4OaOCuYWe/m+pF66QKng51z+KzRJN6ulL4XGGNHy5TNqd/eC5mAwFhUsBBxGg6aqXlHgApNaPFT9o6nIF/LQ==","signatures":[{"sig":"MEQCIFHefQd46tDnfzZhO1xNyMqOoKhoyrJnLi+gKNsGQBd8AiBWH7c5aZmsfifazU1RHtnSj/qPPBxqgO6aW8gwr22c8w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":632383},"type":"module","module":"index.ts","engines":{"opencode":">=1.3.13"},"exports":{"./*":"./src/*.ts","./*/*":"./src/*/*.ts","./*/*/*":"./src/*/*/*.ts","./server":"./index.ts","./*/*/*/*":"./src/*/*/*/*.ts","./*/*/*/*/*":"./src/*/*/*/*/*.ts"},"gitHead":"af2c0f8ceaf4a656462dfd3266d45020ffb1fcd3","scripts":{"lint":"biome lint .","clean":"rm -rf dist playwright-report test-results","format":"biome format .","prepack":"bun build:prod","lint:fix":"biome lint --write .","test:all":"bun unittest && bun test:e2e","test:e2e":"PW_DISABLE_TS_ESM=1 NODE_ENV=test bun --bun playwright test","unittest":"bun test","build:dev":"bun clean && vite build --mode development","typecheck":"tsc --noEmit","build:prod":"bun clean && vite build --mode production","format:fix":"biome format --write ."},"_npmUser":{"name":"shekohex","email":"dev+npm@shadykhalifa.me"},"repository":{"url":"git+https://github.com/shekohex/opencode-pty.git","type":"git"},"_npmVersion":"11.6.2","description":"OpenCode plugin for interactive PTY management - run background processes, send input, read output with regex filtering","directories":{},"_nodeVersion":"24.13.0","dependencies":{"open":"^11.0.0","bun-pty":"^0.4.8","@opencode-ai/sdk":"^1.3.13","@opencode-ai/plugin":"^1.3.13"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^7.3.1","jsdom":"^27.4.0","react":"^18.3.1","happy-dom":"^20.5.0","react-dom":"^18.3.1","@types/bun":"^1.3.8","typescript":"^5.9.3","@types/jsdom":"^27.0.0","@types/react":"^18.3.27","@xterm/xterm":"^6.0.0","@biomejs/biome":"2.3.13","playwright-core":"1.57.0","@playwright/test":"1.57.0","@types/react-dom":"^18.3.7","@xterm/addon-fit":"^0.11.0","@vitejs/plugin-react":"^4.7.0","@xterm/addon-serialize":"^0.14.0"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/opencode-pty_0.3.2_1775238094562_0.4328536390384128","host":"s3://npm-registry-packages-npm-production"}},"0.3.4":{"name":"opencode-pty","version":"0.3.4","keywords":["opencode","opencode-plugin","pty","pseudo-terminal","terminal","background-process","interactive","cli","shell","dev-server","bun"],"author":{"name":"shekohex"},"license":"MIT","_id":"opencode-pty@0.3.4","maintainers":[{"name":"shekohex","email":"dev+npm@shadykhalifa.me"}],"homepage":"https://github.com/shekohex/opencode-pty#readme","bugs":{"url":"https://github.com/shekohex/opencode-pty/issues"},"dist":{"shasum":"32f523f16df45211e2148bdc3225003b32d63e08","tarball":"https://registry.npmjs.org/opencode-pty/-/opencode-pty-0.3.4.tgz","fileCount":143,"integrity":"sha512-nyA32iBGkftD4nc4NeWSJsDINqtMrYNaA4VRaGZGq57LB+zQ94IfRXd22FMKgHXcGsda9u3iptp/pePTx2KcgQ==","signatures":[{"sig":"MEUCICziWJmubjN1RA3vfGPpcUs6geY+ZK3bI5pUiQEDm8y5AiEA3tBdic5CiiMZrcDH+CyxAujmKusGKkuNxbBJ5qDj0LU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/opencode-pty@0.3.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":705209},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.js","engines":{"opencode":">=1.3.13"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./*":{"types":"./dist/src/*.d.ts","default":"./dist/src/*.js"},"./*/*":{"types":"./dist/src/*/*.d.ts","default":"./dist/src/*/*.js"},"./*/*/*":{"types":"./dist/src/*/*/*.d.ts","default":"./dist/src/*/*/*.js"},"./server":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./*/*/*/*":{"types":"./dist/src/*/*/*/*.d.ts","default":"./dist/src/*/*/*/*.js"}},"gitHead":"9b2b7eb43a31c21a5102d1e11f26b96f86949991","scripts":{"lint":"biome lint .","clean":"rm -rf dist playwright-report test-results","format":"biome format .","prepack":"bun build:prod","lint:fix":"biome lint --write .","test:all":"bun unittest && bun test:e2e","test:e2e":"PW_DISABLE_TS_ESM=1 NODE_ENV=test bun --bun playwright test","unittest":"bun test","build:dev":"bun clean && bun build:plugin && vite build --mode development","typecheck":"tsc --noEmit","build:prod":"bun clean && bun build:plugin && vite build --mode production","format:fix":"biome format --write .","build:plugin":"tsc -p tsconfig.build.json && bun x copyfiles -u 0 \"src/**/*.txt\" dist"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:37c774ac-1886-4b90-9dd9-a3ee40442511"}},"repository":{"url":"git+https://github.com/shekohex/opencode-pty.git","type":"git"},"_npmVersion":"11.11.0","description":"OpenCode plugin for interactive PTY management - run background processes, send input, read output with regex filtering","directories":{},"_nodeVersion":"24.14.1","dependencies":{"open":"^11.0.0","bun-pty":"^0.4.8","@opencode-ai/sdk":"^1.3.13","@opencode-ai/plugin":"^1.3.13"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^7.3.1","jsdom":"^27.4.0","react":"^18.3.1","happy-dom":"^20.5.0","react-dom":"^18.3.1","@types/bun":"^1.3.8","typescript":"^5.9.3","@types/jsdom":"^27.0.0","@types/react":"^18.3.27","@xterm/xterm":"^6.0.0","@biomejs/biome":"2.3.13","playwright-core":"1.57.0","@playwright/test":"1.57.0","@types/react-dom":"^18.3.7","@xterm/addon-fit":"^0.11.0","@vitejs/plugin-react":"^4.7.0","@xterm/addon-serialize":"^0.14.0"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/opencode-pty_0.3.4_1776694122307_0.9992779189101961","host":"s3://npm-registry-packages-npm-production"}},"0.3.6":{"name":"opencode-pty","version":"0.3.6","keywords":["opencode","opencode-plugin","pty","pseudo-terminal","terminal","background-process","interactive","cli","shell","dev-server","bun"],"author":{"name":"shekohex"},"license":"MIT","_id":"opencode-pty@0.3.6","maintainers":[{"name":"shekohex","email":"dev+npm@shadykhalifa.me"}],"homepage":"https://github.com/shekohex/opencode-pty#readme","bugs":{"url":"https://github.com/shekohex/opencode-pty/issues"},"dist":{"shasum":"2cc255631f6e7b483604ba727ff2090993707196","tarball":"https://registry.npmjs.org/opencode-pty/-/opencode-pty-0.3.6.tgz","fileCount":143,"integrity":"sha512-C6Ji9E8QwfOuxInjDPzA9duyuIqQH967/DcULJ8/nRoGlr2VLD6OOLzIoyZ8IUCdD+oM4HPQ5SJfsQng/MusvA==","signatures":[{"sig":"MEYCIQCOFoo3Rd1uM0jXjWWRLik8ww+hrmSpF93HVWrYpsGN/wIhAIbgySg1dgEMydtX3lOnBSt5z8fJnPAOrdj8MgrkA7pF","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/opencode-pty@0.3.6","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":704771},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.js","engines":{"opencode":">=1.3.13"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./*":{"types":"./dist/src/*.d.ts","default":"./dist/src/*.js"},"./*/*":{"types":"./dist/src/*/*.d.ts","default":"./dist/src/*/*.js"},"./*/*/*":{"types":"./dist/src/*/*/*.d.ts","default":"./dist/src/*/*/*.js"},"./server":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./*/*/*/*":{"types":"./dist/src/*/*/*/*.d.ts","default":"./dist/src/*/*/*/*.js"}},"gitHead":"599b16562b63ba87019e22db430a16a9e5327bcd","scripts":{"lint":"biome lint .","clean":"rm -rf dist playwright-report test-results","format":"biome format .","prepack":"bun build:prod","lint:fix":"biome lint --write .","test:all":"bun unittest && bun test:e2e","test:e2e":"PW_DISABLE_TS_ESM=1 NODE_ENV=test bun --bun playwright test","unittest":"bun test","build:dev":"bun clean && bun build:plugin && vite build --mode development","typecheck":"tsc --noEmit","build:prod":"bun clean && bun build:plugin && vite build --mode production","format:fix":"biome format --write .","build:plugin":"tsc -p tsconfig.build.json && bun x copyfiles -u 0 \"src/**/*.txt\" dist"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:37c774ac-1886-4b90-9dd9-a3ee40442511"}},"repository":{"url":"git+https://github.com/shekohex/opencode-pty.git","type":"git"},"_npmVersion":"11.16.0","description":"OpenCode plugin for interactive PTY management - run background processes, send input, read output with regex filtering","directories":{},"_nodeVersion":"24.18.0","dependencies":{"open":"^11.0.0","bun-pty":"^0.4.10","@opencode-ai/sdk":"^1.3.13","@opencode-ai/plugin":"^1.3.13"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^7.3.1","jsdom":"^27.4.0","react":"^18.3.1","happy-dom":"^20.5.0","react-dom":"^18.3.1","@types/bun":"^1.3.8","typescript":"^5.9.3","@types/jsdom":"^27.0.0","@types/react":"^18.3.27","@xterm/xterm":"^6.0.0","@biomejs/biome":"2.3.13","playwright-core":"1.57.0","@playwright/test":"1.57.0","@types/react-dom":"^18.3.7","@xterm/addon-fit":"^0.11.0","@vitejs/plugin-react":"^4.7.0","@xterm/addon-serialize":"^0.14.0"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/opencode-pty_0.3.6_1783263069974_0.7581649190745323","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"_id":"opencode-pty@0.4.0","bugs":{"url":"https://github.com/shekohex/opencode-pty/issues"},"dist":{"shasum":"c04969a8c7f4e42ac9df53a025883723759b7440","tarball":"https://registry.npmjs.org/opencode-pty/-/opencode-pty-0.4.0.tgz","fileCount":183,"integrity":"sha512-7p0VSsSvZuXrcS6A2rDWc7PBNXZ7EkKyVBjfxT+ftqQG4r4VHz/bUtVx89Pp90KJ//PY0crFbMGY8K+V0WQ7rA==","signatures":[{"sig":"MEQCIB3IjXU6S3tsnNA1zgrxbWCifN9vOPN8oAu8Cvj+PwsrAiBAawIpCfZnFFxAauu3Uwoy7IBRle534400hJdol9GBAQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHhjpzAohM07oQyak2lN2Vp2rbU/QONCosmXsHwr1DDAAiEAyej/vjoiYEPCcHNC5M/aHyoV2UzCfei7GqBdo1r3Ezc="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/opencode-pty@0.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":740263},"main":"dist/index.js","name":"opencode-pty","type":"module","types":"dist/index.d.ts","author":{"name":"shekohex"},"module":"dist/index.js","engines":{"opencode":">=1.3.13"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./*":{"types":"./dist/src/*.d.ts","default":"./dist/src/*.js"},"./v2":{"types":"./dist/src/v2/index.d.ts","default":"./dist/src/v2/index.js"},"./*/*":{"types":"./dist/src/*/*.d.ts","default":"./dist/src/*/*.js"},"./*/*/*":{"types":"./dist/src/*/*/*.d.ts","default":"./dist/src/*/*/*.js"},"./server":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./*/*/*/*":{"types":"./dist/src/*/*/*/*.d.ts","default":"./dist/src/*/*/*/*.js"}},"gitHead":"ce5f61ce939761dd80a2171a0f8a26b8aa01363c","license":"MIT","scripts":{"lint":"biome lint .","clean":"rm -rf dist playwright-report test-results","format":"biome format .","prepack":"bun build:prod","lint:fix":"biome lint --write .","test:all":"bun unittest && bun test:e2e","test:e2e":"PW_DISABLE_TS_ESM=1 NODE_ENV=test bun --bun playwright test","unittest":"bun test","build:dev":"bun clean && bun build:plugin && vite build --mode development","typecheck":"tsc --noEmit","build:prod":"bun clean && bun build:plugin && vite build --mode production","format:fix":"biome format --write .","build:plugin":"tsc -p tsconfig.build.json && bun x copyfiles -u 0 \"src/**/*.txt\" dist"},"version":"0.4.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:37c774ac-1886-4b90-9dd9-a3ee40442511"}},"homepage":"https://github.com/shekohex/opencode-pty#readme","keywords":["opencode","opencode-plugin","pty","pseudo-terminal","terminal","background-process","interactive","cli","shell","dev-server","bun"],"repository":{"url":"git+https://github.com/shekohex/opencode-pty.git","type":"git"},"_npmVersion":"11.19.0","description":"OpenCode plugin for interactive PTY management - run background processes, send input, read output with regex filtering","directories":{},"maintainers":[{"name":"shekohex","email":"dev+npm@shadykhalifa.me"}],"_nodeVersion":"24.20.0","dependencies":{"open":"^11.0.0","bun-pty":"^0.4.10","@opencode-ai/sdk":"^1.3.13","@opencode-ai/plugin":"^1.3.13"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^7.3.1","jsdom":"^27.4.0","react":"^18.3.1","happy-dom":"^20.5.0","react-dom":"^18.3.1","@types/bun":"^1.3.8","typescript":"^5.9.3","@types/jsdom":"^27.0.0","@types/react":"^18.3.27","@xterm/xterm":"^6.0.0","@biomejs/biome":"2.3.13","playwright-core":"1.57.0","@playwright/test":"1.57.0","@types/react-dom":"^18.3.7","@xterm/addon-fit":"^0.11.0","@vitejs/plugin-react":"^4.7.0","@xterm/addon-serialize":"^0.14.0"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/opencode-pty_0.4.0_1789730310489_0.24413203235984793"}}},"time":{"created":"2025-12-13T16:52:02.331Z","modified":"2026-09-18T11:18:30.970Z","0.0.0":"2025-12-13T16:52:02.646Z","0.0.1":"2025-12-13T16:53:33.276Z","0.1.0":"2025-12-13T16:54:27.028Z","0.1.1":"2025-12-30T11:56:06.967Z","0.1.2":"2026-01-06T20:21:34.173Z","0.1.3":"2026-01-08T15:06:33.799Z","0.1.4":"2026-01-08T15:34:08.765Z","0.1.5":"2026-01-30T15:32:47.588Z","0.2.0":"2026-02-04T14:38:36.535Z","0.2.1":"2026-02-06T14:30:07.709Z","0.2.3":"2026-02-17T17:50:26.294Z","0.3.0":"2026-04-01T12:51:40.030Z","0.3.1":"2026-04-01T14:37:16.938Z","0.3.2":"2026-04-03T17:41:34.729Z","0.3.4":"2026-04-20T14:08:42.484Z","0.3.6":"2026-07-05T14:51:10.130Z","0.4.0":"2026-09-18T11:18:30.588Z"},"bugs":{"url":"https://github.com/shekohex/opencode-pty/issues"},"author":{"name":"shekohex"},"license":"MIT","homepage":"https://github.com/shekohex/opencode-pty#readme","keywords":["opencode","opencode-plugin","pty","pseudo-terminal","terminal","background-process","interactive","cli","shell","dev-server","bun"],"repository":{"url":"git+https://github.com/shekohex/opencode-pty.git","type":"git"},"description":"OpenCode plugin for interactive PTY management - run background processes, send input, read output with regex filtering","maintainers":[{"name":"shekohex","email":"dev+npm@shadykhalifa.me"}],"readme":"# opencode-pty\n\nA plugin for [OpenCode](https://opencode.ai) that provides interactive PTY (pseudo-terminal) management, enabling the AI agent to run background processes, send interactive input, and read output on demand.\n\n## Why?\n\nOpenCode's built-in `bash` tool runs commands synchronously—the agent waits for completion. This works for quick commands, but not for:\n\n- **Dev servers** (`npm run dev`, `cargo watch`)\n- **Watch modes** (`npm test -- --watch`)\n- **Long-running processes** (database servers, tunnels)\n- **Interactive programs** (REPLs, prompts)\n\nThis plugin gives the agent full control over multiple terminal sessions, like tabs in a terminal app.\n\n## Features\n\n- **Background Execution**: Spawn processes that run independently\n- **Multiple Sessions**: Manage multiple PTYs simultaneously\n- **Interactive Input**: Send keystrokes, Ctrl+C, arrow keys, etc.\n- **Output Buffer**: Read output anytime with pagination (offset/limit)\n- **Pattern Filtering**: Search output using regex (like `grep`)\n- **Exit Notifications**: Get notified when processes finish (eliminates polling)\n- **Permission Support**: Respects OpenCode's bash permission settings\n- **Session Lifecycle**: Sessions persist until explicitly killed\n- **Auto-cleanup**: PTYs are cleaned up when OpenCode sessions end\n- **Web UI**: Modern React-based interface for session management\n- **Real-time Streaming**: WebSocket-based live output updates\n\n## Setup\n\n### OpenCode V1\n\nAdd the plugin to your [OpenCode config](https://opencode.ai/docs/config/):\n\n```json\n{\n  \"$schema\": \"https://opencode.ai/config.json\",\n  \"plugin\": [\"opencode-pty\"]\n}\n```\n\n### OpenCode V2\n\nOpenCode V2 uses the new plugin API. You can load `opencode-pty/v2` and optionally configure options (such as a fixed web UI port):\n\n```json\n{\n  \"$schema\": \"https://opencode.ai/config.json\",\n  \"plugin\": [\n    {\n      \"package\": \"opencode-pty/v2\",\n      \"options\": {\n        \"port\": 4200,\n        \"hostname\": \"127.0.0.1\",\n        \"autostart\": false\n      }\n    }\n  ]\n}\n```\n\n| Option | Type | Default | Description |\n| --- | --- | --- | --- |\n| `port` | `number` | `0` (ephemeral) | Fixed port for the PTY Web UI observer server |\n| `hostname` | `string` | `\"::1\"` | Hostname to bind the PTY Web UI server to |\n| `autostart` | `boolean` | `false` | Automatically start the Web UI server on startup |\n\nOpenCode will automatically install the plugin on next run.\n\n## Updating\n\nOpenCode automatically checks for and installs plugin updates on startup. You don't need to do anything manually!\n\nIf you ever need to force a clean reinstall, you can clear the cache:\n\n```bash\nrm -rf ~/.cache/opencode/node_modules/opencode-pty\nopencode\n```\n\n## Tools Provided\n\n| Tool        | Description                                                                 |\n| ----------- | --------------------------------------------------------------------------- |\n| `pty_spawn` | Create a new PTY session (command, args, workdir, env, title, notifyOnExit, timeoutSeconds) |\n| `pty_write` | Send input to a PTY (text, escape sequences like `\\x03` for Ctrl+C)         |\n| `pty_read`  | Read output buffer with pagination and optional regex filtering             |\n| `pty_list`  | List all PTY sessions with status, PID, line count                          |\n| `pty_kill`  | Terminate a PTY, optionally cleanup the buffer                              |\n\n## Slash Commands\n\nThis plugin provides slash commands that can be used in OpenCode chat:\n\n| Command                    | Description                                        |\n| -------------------------- | -------------------------------------------------- |\n| `/pty-open-background-spy` | Open the PTY web server interface in the browser   |\n| `/pty-show-server-url`     | Show the URL of the running PTY web server instance |\n\n## Web UI\n\nThis plugin includes a modern React-based web interface for monitoring and interacting with PTY sessions.\n\n[![opencode-pty Web UI Demo](https://img.youtube.com/vi/wPqmTPnzvVY/0.jpg)](https://youtu.be/wPqmTPnzvVY)\n\nIf you instruct the coding agent to run something in background, you have to name it \"session\",\ni.e. \"run xy as a background SESSION\".\nIf you name it \"task\" or \"process\" or anything else, the agent will sometimes run it as background subprocess using `&`.\n\n### Starting the Web UI\n\n1. Run opencode with the plugin.\n2. Run slash command `/pty-open-background-spy`.\n\nThis will start the background sessions observer cockpit server and launch the browser with web UI.\n\n### Features\n\n- **Session List**: View all active PTY sessions with status indicators\n- **Real-time Output**: Live streaming of process output via WebSocket\n- **Interactive Input**: Send commands and input to running processes\n- **Session Management**: Kill sessions directly from the UI\n- **Connection Status**: Visual indicator of WebSocket connection status\n\n### REST API\n\nThe web server provides a REST API for session management:\n\n| Method   | Endpoint                         | Description                                                                 |\n| -------- | -------------------------------- | --------------------------------------------------------------------------- |\n| `GET`    | `/api/sessions`                  | List all PTY sessions                                                       |\n| `POST`   | `/api/sessions`                  | Create a new PTY session                                                    |\n| `GET`    | `/api/sessions/:id`              | Get session details                                                         |\n| `POST`   | `/api/sessions/:id/input`        | Send input to a session                                                     |\n| `DELETE` | `/api/sessions/:id`              | Kill a session (without cleanup)                                            |\n| `DELETE` | `/api/sessions/:id/cleanup`      | Kill and cleanup a session                                                  |\n| `GET`    | `/api/sessions/:id/buffer/plain` | Get session output buffer (returns `{ plain: string, byteLength: number }`) |\n| `GET`    | `/api/sessions/:id/buffer/raw`   | Get session output buffer (raw data)                                        |\n| `DELETE` | `/api/sessions`                  | Clear all sessions                                                          |\n| `GET`    | `/health`                        | Server health check with metrics                                            |\n\n#### Session Creation\n\n```bash\ncurl -X POST http://localhost:[PORT]/api/sessions \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"command\": \"bash\",\n    \"args\": [\"-c\", \"echo hello && sleep 10\"],\n    \"description\": \"Test session\",\n    \"timeoutSeconds\": 5\n  }'\n```\n\nReplace `[PORT]` with the actual port number shown in the server console output.\n\n#### WebSocket Streaming\n\nConnect to `/ws` for real-time updates:\n\n```javascript\nconst ws = new WebSocket('ws://localhost:[PORT]/ws')\n\nws.onmessage = (event) => {\n  const data = JSON.parse(event.data)\n  if (data.type === 'raw_data') {\n    console.log('New output:', data.rawData)\n  } else if (data.type === 'session_list') {\n    console.log('Session list:', data.sessions)\n  }\n}\n```\n\nReplace `[PORT]` with the actual port number shown in the browser when running the slash command output.\n\n### Development\n\nFuture implementation will include:\n\n#### App\n\n- A startup script that runs the server (in the same process).\n- The startup script will run `bun vite` with an environment variable set to the server URL\n- The client will use this environment variable for WebSocket and HTTP requests\n\nThis will ease the development on the client.\n\n## Usage Examples\n\n### Start a dev server\n\n```\npty_spawn: command=\"npm\", args=[\"run\", \"dev\"], title=\"Dev Server\"\n→ Returns: pty_a1b2c3d4\n```\n\n### Start a timed session\n\n```\npty_spawn: command=\"npm\", args=[\"run\", \"dev\"], title=\"Dev Server\", timeoutSeconds=600\n→ Returns: pty_a1b2c3d4\n```\n\n### Check server output\n\n```\npty_read: id=\"pty_a1b2c3d4\", limit=50\n→ Shows last 50 lines of output\n```\n\n### Filter for errors\n\n```\npty_read: id=\"pty_a1b2c3d4\", pattern=\"error|ERROR\", ignoreCase=true\n→ Shows only lines matching the pattern\n```\n\n### Send Ctrl+C to stop\n\n```\npty_write: id=\"pty_a1b2c3d4\", data=\"\\x03\"\n→ Sends interrupt signal\n```\n\n### Kill and cleanup\n\n```\npty_kill: id=\"pty_a1b2c3d4\", cleanup=true\n→ Terminates process and frees buffer\n```\n\n### Run with exit notification\n\n```\npty_spawn: command=\"npm\", args=[\"run\", \"build\"], title=\"Build\", notifyOnExit=true\n→ Returns: pty_a1b2c3d4\n```\n\nThe AI agent will receive a notification when the build completes:\n\n```xml\n<pty_exited>\nID: pty_a1b2c3d4\nTitle: Build\nExit Code: 0\nOutput Lines: 42\nLast Line: Build completed successfully.\n</pty_exited>\n\nUse pty_read to check the full output.\n```\n\nThis eliminates the need for polling—perfect for long-running processes like builds, tests, or deployment scripts. If the process fails (non-zero exit code), the notification will suggest using `pty_read` with the `pattern` parameter to search for errors.\n\n## Configuration\n\n### Environment Variables\n\n| Variable               | Default    | Description                                        |\n| ---------------------- | ---------- | -------------------------------------------------- |\n| `PTY_MAX_BUFFER_LINES` | `50000`    | Maximum lines to keep in output buffer per session |\n| `PTY_WEB_HOSTNAME`     | `::1`      | Hostname for the web server to bind to (IPv6 loopback by default) |\n| `PTY_WEB_PORT`         | `0` (random) | Port for the web server (0 = random port)        |\n\n### Permissions\n\nThis plugin respects OpenCode's [permission settings](https://opencode.ai/docs/permissions/) for the `bash` tool. Commands spawned via `pty_spawn` are checked against your `permission.bash` configuration.\n\n```json\n{\n  \"$schema\": \"https://opencode.ai/config.json\",\n  \"permission\": {\n    \"bash\": {\n      \"npm *\": \"allow\",\n      \"git push\": \"deny\",\n      \"terraform *\": \"deny\"\n    }\n  }\n}\n```\n\n> [!IMPORTANT]\n> **Limitations compared to built-in bash tool:**\n>\n> - **\"ask\" permissions are treated as \"deny\"**: Since plugins cannot trigger OpenCode's permission prompt UI, commands matching an \"ask\" pattern will be denied. A toast notification will inform you when this happens. Configure explicit \"allow\" or \"deny\" for commands you want to use with PTY.\n> - **\"external_directory\" with \"ask\" is treated as \"allow\"**: When the working directory is outside the project and `permission.external_directory` is set to \"ask\", this plugin allows it (with a log message). Set to \"deny\" explicitly if you want to block external directories.\n\n#### Example: Allow specific commands for PTY\n\n```json\n{\n  \"$schema\": \"https://opencode.ai/config.json\",\n  \"permission\": {\n    \"bash\": {\n      \"npm run dev\": \"allow\",\n      \"npm run build\": \"allow\",\n      \"npm test *\": \"allow\",\n      \"cargo *\": \"allow\",\n      \"python *\": \"allow\"\n    }\n  }\n}\n```\n\n## How It Works\n\n1. **Spawn**: Creates a PTY using [bun-pty](https://github.com/nicksrandall/bun-pty), runs command in background\n2. **Buffer**: Output is captured into a rolling line buffer (ring buffer)\n3. **Read**: Agent can read buffer anytime with offset/limit pagination\n4. **Filter**: Optional regex pattern filters lines before pagination\n5. **Write**: Agent can send any input including escape sequences\n6. **Lifecycle**: Sessions track status (running/exited/killed), persist until cleanup\n7. **Notify**: When `notifyOnExit` is true, sends a message to the session when the process exits\n8. **Web UI**: React frontend connects via WebSocket for real-time updates\n\n## Session Lifecycle\n\n```\nspawn → running → [exited | killed]\n                      ↓\n              (stays in list until cleanup=true)\n```\n\nSessions remain in the list after exit so the agent can:\n\n- Read final output\n- Check exit code\n- Compare logs between runs\n\nUse `pty_kill` with `cleanup=true` to remove completely.\n\n## Local Development\n\n```bash\ngit clone https://github.com/shekohex/opencode-pty.git\ncd opencode-pty\nbun ci          # install packages from bun.lock\nbun lint        # Runs Biome linting checks\nbun format      # Runs Biome formatting checks\nbun typecheck   # Runs TypeScript type checking\nbun build:dev   # Build the React app for development\nbun unittest    # Runs the unit tests\nbun test:e2e    # Runs the e2e tests\n```\n\nTo load a local checkout in OpenCode:\n\n```json\n{\n  \"$schema\": \"https://opencode.ai/config.json\",\n  \"plugin\": [\"file:///absolute/path/to/opencode-pty/index.ts\"]\n}\n```\n\n## Diagrams\n\n### Sequence\n\n#### Use Case 1 – Opening the PTY Monitor Web UI\n\n```mermaid\nsequenceDiagram\n    participant User as Human User\n    participant Chat as OpenCode Chat\n    participant Core as OpenCode Core\n    participant Plugin as PTY Plugin\n    participant Manager as PTY Manager (in Plugin)\n    participant WS as WebSocket Server (in Plugin)\n    participant Browser as Web Browser\n\n    Note over Plugin,WS: Plugin starts/owns the WS server and Manager\n\n    User->>Chat: Types /pty-open-background-spy\n    Chat->>Core: Slash command received\n    Core->>Plugin: Dispatches to registered command handler\n    Plugin->>Browser: open(server.url.origin)\n    activate Browser\n    Browser->>WS: Connects → ws://.../ws\n    WS->>Manager: Queries for current sessions (manager.list())\n    Manager-->>WS: Returns session data\n    WS-->>Browser: Sends session_list + subscribes to updates\n    Browser-->>User: PTY monitor UI appears (sessions + terminals)\n```\n\n#### Use Case 2 – Starting a Long-Running Background Process\n\n```mermaid\nsequenceDiagram\n    participant User\n    participant Chat as OpenCode Chat\n    participant Agent as AI Agent\n    participant Plugin as PTY Plugin\n    participant Manager as PTY Manager\n    participant PTY as bun-pty Process\n    participant WS as WebSocket Server\n    participant UI as PTY Web UI (optional)\n\n    User->>Chat: \"start vite dev server in background\"\n    Chat->>Agent: User message\n    Agent->>Plugin: Calls pty_spawn(command=\"vite\", args=[\"dev\"], ...)\n    Plugin->>Manager: spawn(options)\n    Manager->>PTY: Launches real process\n    activate PTY\n    PTY-->>Manager: stdout/stderr chunks\n    Manager->>Manager: Appends to RingBuffer\n    Manager->>WS: Publishes raw_data + session_update\n    alt UI already open\n        WS-->>UI: Real-time terminal output\n        UI-->>User: Live xterm.js view\n    end\n    Plugin-->>Agent: Returns session info\n    Agent-->>Chat: \"Dev server started (ID: pty_abc123)\"\n    Chat-->>User: Confirmation message\n```\n\n#### Use Case 3 – Sending Interactive Input to a Running Session\n\n```mermaid\nsequenceDiagram\n    participant User\n    participant UI as PTY Web UI\n    participant WS as WebSocket Server\n    participant Manager as PTY Manager\n    participant PTY as bun-pty Process\n\n    %% Variant A: Human typing in browser (most common)\n    User->>UI: Types \"rs<Enter>\" or pastes text\n    UI->>WS: Sends {type:\"input\", sessionId, data:\"rs\\n\"}\n    WS->>Manager: write(sessionId, data)\n    Manager->>PTY: process.write(data)\n    PTY-->>Manager: New output (restart message, etc.)\n    Manager->>WS: Publishes raw_data\n    WS-->>UI: Updates xterm.js live\n\n    %% Variant B: AI sending input\n    Note over User,UI: Alternative path – AI controlled\n    Agent->>Plugin: pty_write(id, \"\\x03\")  // e.g. Ctrl+C\n    Plugin->>Manager: write(id, data)\n    Manager->>PTY: process.write(\"\\x03\")\n```\n\n#### Use Case 4 – Reading Output / Logs On Demand\n\n```mermaid\nsequenceDiagram\n    participant User\n    participant Chat\n    participant Agent as AI Agent\n    participant Plugin as PTY Plugin\n    participant Manager as PTY Manager\n    participant Buffer as RingBuffer\n\n    User->>Chat: \"show me the last 200 lines of the dev server\"\n    Chat->>Agent: User question\n    Agent->>Plugin: pty_read(id, offset?, limit=200, pattern?)\n    Plugin->>Manager: read / search request\n    Manager->>Buffer: read(offset, limit) or search(pattern)\n    Buffer-->>Manager: Matching / paginated lines\n    Manager-->>Plugin: Raw or formatted lines\n    Plugin-->>Agent: Text response\n    Agent-->>Chat: \"Here are the logs:\\n\\n1 | [vite] ... \\n...\"\n    Chat-->>User: Logs displayed in chat\n```\n\n#### Use Case 5A – Killing / Cleaning Up a Session via Web UI\n\n```mermaid\nsequenceDiagram\n    participant User\n    participant UI as PTY Web UI\n    participant HTTP as HTTP Server\n    participant Manager as PTY Manager\n    participant PTY as bun-pty Process\n    participant WS as WebSocket Server\n\n    Note over PTY: Assuming PTY is active (running process)<br>notifyOnExit = false (no chat notification,<br>but WS/UI always gets status updates)\n\n    activate PTY\n\n    User->>UI: Clicks \"Kill\" / \"×\" on session\n    UI->>HTTP: DELETE /api/sessions/:id  (or /cleanup)\n    HTTP->>Manager: kill(id, cleanup?)\n    Manager->>PTY: Sends SIGTERM (if running)\n    PTY-->>Manager: onExit event (code, signal)\n    deactivate PTY\n    Manager->>WS: Publishes session_update (status: killed/exited)\n    WS-->>UI: UI updates → shows \"exited\" or removes entry\n```\n\n#### Use Case 5B – Killing / Cleaning Up a Session via Agent\n\n```mermaid\nsequenceDiagram\n    participant User\n    participant Chat as OpenCode Chat\n    participant Agent as AI Agent\n    participant Plugin as PTY Plugin\n    participant Manager as PTY Manager\n    participant PTY as bun-pty Process\n    participant WS as WebSocket Server\n    participant UI as PTY Web UI (optional)\n\n    Note over PTY: Assuming PTY is active (running process)<br>notifyOnExit = false (no chat notification,<br>but WS/UI always gets status updates)\n\n    activate PTY\n\n    User->>Chat: \"kill the dev server\"\n    Chat->>Agent: User request\n    Agent->>Plugin: pty_kill(id, cleanup=true)\n    Plugin->>Manager: kill(id, true)\n    Manager->>PTY: SIGTERM + remove from list (if cleanup)\n    PTY-->>Manager: onExit event (code, signal)\n    deactivate PTY\n    Manager->>WS: Broadcast session_update (status: killed/exited)\n    alt UI open\n        WS-->>UI: UI updates → shows \"exited\" or removes entry\n    end\n    Plugin-->>Agent: Success response\n    Agent-->>Chat: \"Session killed\"\n    Chat-->>User: Confirmation in chat\n```\n\n#### Use Case 6 – Automatic Exit Notification\n\n```mermaid\nsequenceDiagram\n    participant PTY as bun-pty Process\n    participant Manager as PTY Manager\n    participant Plugin as PTY Plugin\n    participant Chat as OpenCode Chat\n    participant Agent as AI Agent\n    participant User\n\n    %%{init: {'sequence': {'messageAlign': 'left'}}}%%\n\n    activate PTY\n    Note over PTY: Long-running process (dev server, tests, etc.)\n    PTY-->>Manager: Process exits → exitCode\n    deactivate PTY\n    alt notifyOnExit was true when spawned\n        Manager->>Plugin: Triggers exit notification\n        Plugin->>Chat: Sends formatted message via SDK<br><pty_exited><br>ID: pty_abc123<br>Exit: 0<br>Lines: 342<br>Last: Server running at http://localhost:5173<br></pty_exited>\n        Chat-->>User: Notification appears in chat\n        Chat->>Agent: Triggers agent with exit message\n    end\n    Manager->>WS: Publishes final session_update (status: exited)\n    alt UI open\n        WS-->>UI: UI shows red \"exited\" badge / stops live output\n    end\n```\n\n## License\n\nMIT\n\n## Contributing\n\nContributions are welcome! Please open an issue or submit a PR.\n\n## Credits\n\n- [OpenCode](https://opencode.ai) - The AI coding assistant this plugin extends\n- [bun-pty](https://github.com/nicksrandall/bun-pty) - Cross-platform PTY for Bun\n","readmeFilename":"README.md"}