Files
web-terminal/ios/Packages/WireProtocol/Sources/WireProtocol/WireConstants.swift
Yaojia Wang cbaa08daba feat(ios): W0 scaffold + day-1 spike + WireProtocol frozen contract + TestSupport doubles
T-iOS-1: ios/ XcodeGen project (iOS 17, Swift 6 strict concurrency, ATS per PLAN §5.2), 5 SPM package shells, CI skeleton
T-iOS-2: Origin spike vs real server — URLSessionWebSocketTask custom Origin CONFIRMED (no Starscream); 16MiB replay + EMSGSIZE(40) errno correction written back to plan
T-iOS-3: WireProtocol frozen contract, 59 tests, 100% line coverage, cross-impl vectors vs src/protocol.ts via tsx
T-iOS-4: FakeTransport/FakeClock/FakeHTTPTransport doubles
Verify: independent agent re-ran all acceptance — 6/6 PASS
2026-07-04 21:19:30 +02:00

18 lines
848 B
Swift

/// Wire-level constants shared with the server (frozen contract, plan §3.1).
public enum WireConstants {
/// WS endpoint path (src/config.ts:41 `DEFAULT_WS_PATH`).
public static let wsPath = "/term"
/// Soft-reset prefix the server prepends to ring-buffer replay as a safety
/// net (src/types.ts:167-170 / M2). Clients may use it to recognise the
/// replay boundary; never strip it it is valid ANSI for the terminal.
public static let replaySoftResetPrefix = "\u{1B}[0m"
/// `exit.code` value meaning the PTY spawn never succeeded (M4);
/// `exit.reason` is required server-side in that case. Not a retryable state.
public static let spawnFailedExitCode = -1
/// Valid `resize` cols/rows range, inclusive (src/protocol.ts:113-115).
public static let resizeRange: ClosedRange<Int> = 1...1000
}