Bundle Bun for headless Orca and profile persistence (#22635)

Bundle a pinned, verified Bun runtime for headless Orca so existing Node launch commands can hand off before opening a profile. Keep desktop execution on Electron.

Add the Bun SQLite adapter and terminal backend, bounded shutdown, process inspection and cross-platform artifact qualification. Keep future managed SSH deployment separate from current production launch paths.
This commit is contained in:
OrcaWin
2026-09-25 22:49:06 -07:00
committed by GitHub
parent 38bcdf76ac
commit 6fc3cdcad6
173 changed files with 13419 additions and 948 deletions
+39
View File
@@ -0,0 +1,39 @@
import type { StatementResultingChanges } from 'node:sqlite'
import { SqliteIntegerReader } from './sqlite-integer-reader'
import type { SqliteBindings, SqliteRow, SqliteStatement } from './sqlite-statement'
export class NodeSqliteStatement implements SqliteStatement {
private readonly integers = new SqliteIntegerReader()
constructor(private readonly statement: SqliteStatement) {
// Native number reads overflow their INT64_MIN guard on some builds and round insert rowids.
statement.setReadBigInts(true)
}
all(...parameters: SqliteBindings): SqliteRow[] {
const rows = this.statement.all(...parameters)
for (const row of rows) {
this.integers.row(row)
}
return rows
}
get(...parameters: SqliteBindings): SqliteRow | undefined {
const row = this.statement.get(...parameters)
return row === undefined ? undefined : this.integers.row(row)
}
run(...parameters: SqliteBindings): StatementResultingChanges {
return this.integers.result(this.statement.run(...parameters))
}
*iterate(...parameters: SqliteBindings): IterableIterator<SqliteRow> {
for (const row of this.statement.iterate(...parameters)) {
yield this.integers.row(row)
}
}
setReadBigInts(enabled: boolean): void {
this.integers.readBigInts = enabled
}
}