refactor(mobile): delete the workspace and account contracts nothing imports

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
This commit is contained in:
Jinwoo-H
2026-09-07 15:43:19 -04:00
parent fb69f030af
commit 0018fd041f
4 changed files with 0 additions and 54 deletions
@@ -18,7 +18,6 @@ import type {
import { MobileWebBridgeClientError } from './mobile-web-bridge-client-error'
import { deliverMobileWebSubscriptionEvent } from './mobile-web-bridge-subscription-event-delivery'
import {
accountSubscriptionSetup,
terminalSubscriptionSetup,
browserSubscriptionSetup,
speechSubscriptionSetup,
@@ -77,10 +76,6 @@ export class MobileWebBridgeSubscriptionClient {
return subscribeMobileWebHostWorkspace(this, onEvent, onError)
}
subscribeAccount(...args: Parameters<typeof accountSubscriptionSetup>) {
return this.subscribeWith(accountSubscriptionSetup(...args))
}
subscribeTerminal(
payload: Extract<MobileWebTerminalRequest, { operation: 'subscribe' }>,
onEvent: (event: MobileWebTerminalEvent) => void,
@@ -6,11 +6,6 @@ import {
} from '../../shared/mobile-web/terminal-stream-contract'
import type { z } from 'zod'
import type { MobileWebBridgeCapability } from '../../shared/mobile-web/bridge-contract'
import {
MobileWebAccountEventSchema,
MobileWebAccountSubscribePayloadSchema,
type MobileWebAccountEvent
} from '../../shared/mobile-web/account-operation-contract'
import type { MobileWebBridgeClientError } from './mobile-web-bridge-client-error'
import {
MobileWebBrowserEventSchema,
@@ -34,20 +29,6 @@ export type MobileWebBridgeSubscriptionSetup = {
onError: (error: MobileWebBridgeClientError) => void
}
export function accountSubscriptionSetup(
onEvent: (event: MobileWebAccountEvent) => void,
onError: (error: MobileWebBridgeClientError) => void
): MobileWebBridgeSubscriptionSetup {
return {
capability: 'account',
payload: {},
payloadSchema: MobileWebAccountSubscribePayloadSchema,
eventSchema: MobileWebAccountEventSchema,
onEvent: (value) => onEvent(value as MobileWebAccountEvent),
onError
}
}
export function speechSubscriptionSetup(
onEvent: (event: MobileWebSpeechEvent) => void,
onError: (error: MobileWebBridgeClientError) => void
@@ -156,7 +156,6 @@ export const MobileWebCodexResetCreditExpectedScopeSchema = z
}
})
export const MobileWebAccountSnapshotPayloadSchema = z.object({}).strict()
export const MobileWebAccountSelectPayloadSchema = z
.object({
provider: z.enum(['claude', 'codex']),
@@ -164,7 +163,6 @@ export const MobileWebAccountSelectPayloadSchema = z
codexTarget: MobileWebRateLimitRuntimeTargetSchema.optional()
})
.strict()
export const MobileWebAccountSelectResultSchema = z.null()
export const MobileWebAccountResetCapabilityPayloadSchema = z.object({}).strict()
export const MobileWebAccountResetCapabilityResultSchema = z.boolean()
export const MobileWebAccountConsumeResetPayloadSchema = z
@@ -204,7 +202,6 @@ export const MobileWebAccountConsumeResetResultSchema = z.union([
MobileWebAccountConsumedResetResultSchema,
MobileWebAccountRejectedResetResultSchema
])
export const MobileWebAccountSubscribePayloadSchema = z.object({}).strict()
export const MobileWebAccountEventSchema = z.discriminatedUnion('type', [
z.object({
type: z.enum(['ready', 'snapshot']),
@@ -19,22 +19,6 @@ const MobileWebRepoIconSchema = z.discriminatedUnion('type', [
.strict()
])
export const MobileWebRepositoryPresentationSchema = z
.object({
id: MobileWebRepoIdSchema,
displayName: z.string().min(1).max(240),
badgeColor: z.string().max(64).optional(),
repoIcon: MobileWebRepoIconSchema.nullable().optional()
})
.strict()
export const MobileWebWorkspaceRepositoriesResultSchema = z
.object({
repositories: z.array(MobileWebRepositoryPresentationSchema).max(MOBILE_WEB_REPOSITORY_LIMIT),
truncated: z.boolean()
})
.strict()
const MobileWebHostUpstreamSchema = z
.object({
owner: z.string().max(240),
@@ -101,13 +85,6 @@ export const MobileWebWorkspaceViewSettingsSchema = z.object({
.catch(undefined)
})
export const MobileWebWorkspaceSettingsSnapshotPayloadSchema = z.object({}).strict()
export const MobileWebWorkspaceSettingsSnapshotResultSchema = z
.object({ settings: MobileWebWorkspaceViewSettingsSchema.nullable() })
.strict()
export const MobileWebWorkspaceSettingsUpdatePayloadSchema = MobileWebWorkspaceViewSettingsSchema
export const MobileWebWorkspaceSettingsUpdateResultSchema = z.null()
export const MobileWebWorkspaceUpdatePayloadSchema = z.discriminatedUnion('mutation', [
z
.object({
@@ -135,16 +112,12 @@ export const MobileWebWorkspaceRemoveResultSchema = z
.object({ workspaceId: MobileWebWorkspaceIdSchema, removed: z.literal(true) })
.strict()
export const MobileWebWorkspaceSubscribePayloadSchema = z.object({}).strict()
export const MobileWebWorkspaceChangeSchema = z
.object({
type: z.enum(['ready', 'end', 'reposChanged', 'worktreesChanged', 'error'])
})
.strict()
export type MobileWebWorkspaceRepositoriesResult = z.infer<
typeof MobileWebWorkspaceRepositoriesResultSchema
>
export type MobileWebWorkspaceViewSettings = z.infer<typeof MobileWebWorkspaceViewSettingsSchema>
export type MobileWebWorkspaceUpdatePayload = z.infer<typeof MobileWebWorkspaceUpdatePayloadSchema>
export type MobileWebWorkspaceUpdateResult = z.infer<typeof MobileWebWorkspaceUpdateResultSchema>