Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
414 changes: 159 additions & 255 deletions bun.lock

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,34 +78,34 @@
"format:fix": "biome format --write ."
},
"devDependencies": {
"@biomejs/biome": "2.3.13",
"@playwright/test": "1.57.0",
"@types/bun": "^1.3.8",
"@types/jsdom": "^27.0.0",
"@types/react": "^18.3.27",
"@types/react-dom": "^18.3.7",
"@vitejs/plugin-react": "^4.7.0",
"@biomejs/biome": "2.5.14",
"@playwright/test": "1.63.0",
"@types/bun": "^1.4.2",
"@types/jsdom": "^30.0.0",
"@types/react": "^19.3.0",
"@types/react-dom": "^19.3.0",
"@vitejs/plugin-react": "^6.1.1",
"@xterm/addon-fit": "^0.11.0",
"@xterm/addon-serialize": "^0.14.0",
"@xterm/xterm": "^6.0.0",
"happy-dom": "^20.5.0",
"jsdom": "^27.4.0",
"playwright-core": "1.57.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"happy-dom": "^20.14.5",
"jsdom": "^30.1.0",
"playwright-core": "1.63.0",
"react": "^19.3.0",
"react-dom": "^19.3.0",
"typescript": "^5.9.3",
"vite": "^7.3.1"
"vite": "^8.3.0"
},
"peerDependencies": {
"typescript": "^5"
},
"engines": {
"opencode": ">=1.3.13"
"opencode": ">=1.18.31"
},
"dependencies": {
"@opencode-ai/plugin": "^1.3.13",
"@opencode-ai/sdk": "^1.3.13",
"@opencode-ai/plugin": "^1.18.31",
"@opencode-ai/sdk": "^1.18.31",
"bun-pty": "^0.4.10",
"open": "^11.0.0"
"open": "^11.0.4"
}
}
52 changes: 52 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:recommended", ":semanticCommits"],
"schedule": ["before 6am on monday"],
"labels": ["dependencies"],
"lockFileMaintenance": {
"enabled": true,
"schedule": ["before 6am on monday"]
},
"packageRules": [
{
"groupName": "opencode-ai",
"matchPackageNames": ["@opencode-ai/plugin", "@opencode-ai/sdk"]
},
{
"groupName": "vite",
"matchPackageNames": ["vite", "@vitejs/plugin-react"]
},
{
"groupName": "test tooling",
"matchPackageNames": [
"@playwright/test",
"playwright-core",
"happy-dom",
"jsdom",
"@types/jsdom"
]
},
{
"groupName": "lint and formatting",
"matchPackageNames": ["@biomejs/biome"]
},
{
"groupName": "type definitions",
"matchPackageNames": ["@types/bun", "@types/react", "@types/react-dom", "@types/jsdom"]
},
{
"groupName": "GitHub Actions",
"matchManagers": ["github-actions"],
"pinDigests": true
},
{
"groupName": "dev dependencies (non-major)",
"matchDepTypes": ["devDependencies"],
"matchUpdateTypes": ["minor", "patch"]
},
{
"matchUpdateTypes": ["major"],
"addLabels": ["major"]
}
]
}
26 changes: 26 additions & 0 deletions socket.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Socket for GitHub configuration.
#
# The committed file is inert on its own: the Socket for GitHub app must be
# installed on this repository before it takes effect (see
# https://docs.socket.dev/docs/socket-yml).
version: 2

# Only evaluate pull requests that touch dependency manifests or lockfiles.
triggerPaths:
- "package.json"
- "bun.lock"

# Keep test fixtures out of dependency ingestion.
projectIgnorePaths:
- "test/e2e/fixtures"

issueRules:
unresolvedRequire: true
telemetry: true
hasNativeCode: true
gitDependency: true
httpDependency: true

githubApp:
enabled: true
dependencyOverviewEnabled: true
2 changes: 1 addition & 1 deletion src/plugin/pty/session-lifecycle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class SessionLifecycleManager {
this.sessionTimeouts.delete(session.id)

const currentSession = this.sessions.get(session.id)
if (!currentSession || currentSession.status !== 'running') {
if (currentSession?.status !== 'running') {
return
}

Expand Down
2 changes: 1 addition & 1 deletion src/web/client/components/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export function App() {
rawOutput={rawOutput}
onSendInput={handleSendInput}
onInterrupt={handleKillSession}
disabled={!activeSession || activeSession.status !== 'running'}
disabled={activeSession?.status !== 'running'}
/>
</div>
<div className="debug-info" data-testid="debug-info">
Expand Down
4 changes: 3 additions & 1 deletion src/web/server/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ export class PTYServer implements Disposable {
websocket: {
data: undefined as undefined,
perMessageDeflate: true,
open: (ws) => ws.subscribe('sessions:update'),
open: (ws) => {
ws.subscribe('sessions:update')
},
message: handleWebSocketMessage,
close: (ws) => {
ws.subscriptions.forEach((topic) => {
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export const test = base.extend<TestFixtures, WorkerFixtures>({

// Parse URL to extract port number
const urlMatch = serverURL.match(/http:\/\/(?:127\.0\.0\.1|\[::1\]):(\d+)/)
if (!urlMatch || !urlMatch[1]) {
if (!urlMatch?.[1]) {
throw new Error(`Invalid port file format: ${serverURL}`)
}
const port = parseInt(urlMatch[1], 10)
Expand Down
9 changes: 5 additions & 4 deletions test/pty-spawn-echo.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,12 @@ describe('ptySpawn Integration', () => {
}
)

expect(result).toContain('<pty_spawned>')
expect(result).toContain('Command: echo Hello World')
expect(result).toContain('Status: running')
const resultText = typeof result === 'string' ? result : result.output
expect(resultText).toContain('<pty_spawned>')
expect(resultText).toContain('Command: echo Hello World')
expect(resultText).toContain('Status: running')

const sessionIdMatch = result.match(/ID: (.+)/)
const sessionIdMatch = resultText.match(/ID: (.+)/)
expect(sessionIdMatch).toBeTruthy()
const sessionId = sessionIdMatch?.[1] ?? ''

Expand Down