feat: remove legacy OpenCode runtime

Cut product flows over to Coding/Pi and retain only the migration-owned v1 boundary. Promote supported native optional packages because electron-builder omitted pnpm transitive optional closure from the packaged ASAR.
This commit is contained in:
brother7 committed 2026-08-24 12:17:43 +08:00
1 parent 61fede2b4d
commit 5a275b93a7
199 files changed
+1330 -64725

No files matched your search

+9 -9
View File
@@ -292,7 +292,7 @@ describe('auth host api routes', () => {
response.res,
new URL('http://127.0.0.1:13210/api/auth/login'),
{
opencodeManager: { stop: vi.fn().mockResolvedValue(undefined) },
codingProducts: { sleep: vi.fn().mockResolvedValue(undefined) },
} as never,
);
@@ -892,7 +892,7 @@ describe('auth host api routes', () => {
response.res,
new URL('http://127.0.0.1:13210/api/auth/logout'),
{
opencodeManager: { stop },
codingProducts: { sleep: stop },
imageWorkspace: { closeEventSessions },
} as never,
);
@@ -918,7 +918,7 @@ describe('auth host api routes', () => {
response.res,
new URL('http://127.0.0.1:13210/api/auth/logout'),
{
opencodeManager: { stop },
codingProducts: { sleep: stop },
} as never,
);
@@ -942,7 +942,7 @@ describe('auth host api routes', () => {
response.res,
new URL('http://127.0.0.1:13210/api/auth/logout'),
{
opencodeManager: { stop: vi.fn().mockResolvedValue(undefined) },
codingProducts: { sleep: vi.fn().mockResolvedValue(undefined) },
imageWorkspace: {
closeEventSessions: vi.fn().mockRejectedValue(new Error('remote close failed')),
},
@@ -972,7 +972,7 @@ describe('auth host api routes', () => {
response.res,
new URL('http://127.0.0.1:13210/api/auth/logout'),
{
opencodeManager: { stop: vi.fn().mockResolvedValue(undefined) },
codingProducts: { sleep: vi.fn().mockResolvedValue(undefined) },
imageWorkspace: { closeEventSessions },
} as never,
);
@@ -1010,7 +1010,7 @@ describe('auth host api routes', () => {
}),
response.res,
new URL('http://127.0.0.1:13210/api/auth/logout'),
{ opencodeManager: { stop } } as never,
{ codingProducts: { sleep: stop } } as never,
);
expect(response.statusCode).toBe(400);
@@ -1031,7 +1031,7 @@ describe('auth host api routes', () => {
);
vi.stubGlobal('fetch', fetchMock);
const stop = vi.fn().mockRejectedValue(new Error('runtime stop failed'));
const context = { opencodeManager: { stop } } as never;
const context = { codingProducts: { sleep: stop } } as never;
const logoutResponse = createResponse();
await handleAuthRoutes(
@@ -1070,7 +1070,7 @@ describe('auth host api routes', () => {
response.res,
new URL('http://127.0.0.1:13210/api/auth/logout'),
{
opencodeManager: { stop: vi.fn().mockResolvedValue(undefined) },
codingProducts: { sleep: vi.fn().mockResolvedValue(undefined) },
} as never,
);
@@ -1105,7 +1105,7 @@ describe('auth host api routes', () => {
response.res,
new URL('http://127.0.0.1:13210/api/auth/logout'),
{
opencodeManager: { stop: vi.fn().mockResolvedValue(undefined) },
codingProducts: { sleep: vi.fn().mockResolvedValue(undefined) },
} as never,
);