@mudlet/mudlet-web 0.5.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (301) hide show
  1. package/README.md +1 -1
  2. package/dist-lib/analytics.d.ts +27 -0
  3. package/dist-lib/assets/fonts/Vera.woff2 +0 -0
  4. package/dist-lib/assets/fonts/VeraBI.woff2 +0 -0
  5. package/dist-lib/assets/fonts/VeraBd.woff2 +0 -0
  6. package/dist-lib/assets/fonts/VeraIt.woff2 +0 -0
  7. package/dist-lib/assets/mapParser.worker-DrVZ3wg_.js +9 -0
  8. package/dist-lib/backupImport-wt8r7JXI.js +233 -0
  9. package/dist-lib/branding.d.ts +111 -13
  10. package/dist-lib/db/sqliteClient.d.ts +195 -7
  11. package/dist-lib/hooks/useAutoReconnect.d.ts +61 -0
  12. package/dist-lib/hooks/useDocumentFullscreen.d.ts +23 -0
  13. package/dist-lib/hooks/useKeyboardShortcuts.d.ts +37 -0
  14. package/dist-lib/hooks/useRecordLastPlayed.d.ts +10 -0
  15. package/dist-lib/import/applyMudletProfile.d.ts +35 -9
  16. package/dist-lib/import/backupImport.d.ts +118 -0
  17. package/dist-lib/import/collectProfileExport.d.ts +33 -2
  18. package/dist-lib/import/defaultPackages.d.ts +57 -14
  19. package/dist-lib/import/defaults/CF-loader/CF-loader.mpackage +0 -0
  20. package/dist-lib/import/defaults/MedBootstrap/MedBootstrap.mpackage +0 -0
  21. package/dist-lib/import/defaults/deleteOldProfiles/deleteOldProfiles.mpackage +0 -0
  22. package/dist-lib/import/defaults/echo/echo.mpackage +0 -0
  23. package/dist-lib/import/defaults/enable-accessibility/enable-accessibility.mpackage +0 -0
  24. package/dist-lib/import/defaults/generic_mapper/generic_mapper.mpackage +0 -0
  25. package/dist-lib/import/defaults/gui-drop/gui-drop.mpackage +0 -0
  26. package/dist-lib/import/defaults/icesus-loader/icesus-loader.mpackage +0 -0
  27. package/dist-lib/import/defaults/mg-loader/mg-loader.mpackage +0 -0
  28. package/dist-lib/import/defaults/mudlet-base-ui/mudlet-base-ui.mpackage +0 -0
  29. package/dist-lib/import/defaults/mudlet-mapper.xml +1215 -389
  30. package/dist-lib/import/mudletControlChars.d.ts +14 -0
  31. package/dist-lib/import/mudletHost.d.ts +73 -10
  32. package/dist-lib/import/mudletLink.d.ts +53 -2
  33. package/dist-lib/import/mudletProfileExport.d.ts +38 -5
  34. package/dist-lib/import/mudletProfileImport.d.ts +110 -12
  35. package/dist-lib/import/mudletVariables.d.ts +4 -3
  36. package/dist-lib/import/mudletWriteback.d.ts +15 -1
  37. package/dist-lib/import/mudletXmlImport.d.ts +46 -0
  38. package/dist-lib/import/packageFonts.d.ts +33 -0
  39. package/dist-lib/import/packageInstaller.d.ts +111 -7
  40. package/dist-lib/import/qtProfileData.d.ts +10 -0
  41. package/dist-lib/import/remotePackageInstall.d.ts +23 -7
  42. package/dist-lib/import/zipEntries.d.ts +45 -0
  43. package/dist-lib/index.d.ts +7 -3
  44. package/dist-lib/index.js +50508 -29836
  45. package/dist-lib/logging/SessionLogger.d.ts +75 -15
  46. package/dist-lib/map/MapSelectionOverlay.d.ts +2 -2
  47. package/dist-lib/map/MapStore.d.ts +387 -60
  48. package/dist-lib/map/MudletHighlightOverlay.d.ts +2 -2
  49. package/dist-lib/map/{MudixMapReader.d.ts → MudletMapReader.d.ts} +2 -2
  50. package/dist-lib/map/areaGraph.d.ts +120 -0
  51. package/dist-lib/map/environmentKit.d.ts +36 -0
  52. package/dist-lib/map/labelPixmap.d.ts +90 -0
  53. package/dist-lib/map/mapImageExport.d.ts +36 -2
  54. package/dist-lib/map/mapStyle.d.ts +11 -0
  55. package/dist-lib/map/mapVersion.d.ts +66 -0
  56. package/dist-lib/map/pathfinding.d.ts +2 -2
  57. package/dist-lib/mud/CharLoginController.d.ts +230 -0
  58. package/dist-lib/mud/ItemIdSequence.d.ts +1 -1
  59. package/dist-lib/mud/MudSession.d.ts +279 -22
  60. package/dist-lib/mud/PatternEngine.d.ts +153 -14
  61. package/dist-lib/mud/aliases/AliasEngine.d.ts +55 -9
  62. package/dist-lib/mud/autoLogin.d.ts +59 -0
  63. package/dist-lib/mud/commandSplit.d.ts +9 -0
  64. package/dist-lib/mud/connection/LineAssembler.d.ts +38 -11
  65. package/dist-lib/mud/connection/MudClient.d.ts +291 -53
  66. package/dist-lib/mud/connection/SubnegotiationRepair.d.ts +24 -0
  67. package/dist-lib/mud/connection/TelnetNegotiator.d.ts +208 -68
  68. package/dist-lib/mud/connection/telnetDebug.d.ts +8 -8
  69. package/dist-lib/mud/events.d.ts +102 -23
  70. package/dist-lib/mud/games/bundledGames.d.ts +12 -7
  71. package/dist-lib/mud/games/gameLinks.d.ts +40 -0
  72. package/dist-lib/mud/games/icons/3Kingdoms.png +0 -0
  73. package/dist-lib/mud/games/icons/3Scapes.png +0 -0
  74. package/dist-lib/mud/games/icons/achaea.png +0 -0
  75. package/dist-lib/mud/games/icons/aetolia.png +0 -0
  76. package/dist-lib/mud/games/icons/banner_astaria.png +0 -0
  77. package/dist-lib/mud/games/icons/banner_darkmists.png +0 -0
  78. package/dist-lib/mud/games/icons/banner_dreamland.png +0 -0
  79. package/dist-lib/mud/games/icons/banner_petria.jpg +0 -0
  80. package/dist-lib/mud/games/icons/banner_ropmud.png +0 -0
  81. package/dist-lib/mud/games/icons/blackmud.png +0 -0
  82. package/dist-lib/mud/games/icons/carrionfields.png +0 -0
  83. package/dist-lib/mud/games/icons/dragonfire_icon.png +0 -0
  84. package/dist-lib/mud/games/icons/fed2-logo.png +0 -0
  85. package/dist-lib/mud/games/icons/icesus_480x120.png +0 -0
  86. package/dist-lib/mud/games/icons/imperian.png +0 -0
  87. package/dist-lib/mud/games/icons/infinity_480x120.png +0 -0
  88. package/dist-lib/mud/games/icons/lusternia.png +0 -0
  89. package/dist-lib/mud/games/icons/morgengrauen_480x120.png +0 -0
  90. package/dist-lib/mud/games/icons/mudlet-tutorial.png +0 -0
  91. package/dist-lib/mud/games/icons/phoenixmud_480x120.png +0 -0
  92. package/dist-lib/mud/games/icons/starmourn.png +0 -0
  93. package/dist-lib/mud/games/icons/voidmud_icon.png +0 -0
  94. package/dist-lib/mud/games/icons/wotmudicon.png +0 -0
  95. package/dist-lib/mud/games/websiteLinks.d.ts +21 -0
  96. package/dist-lib/mud/keybindings/KeyEngine.d.ts +110 -4
  97. package/dist-lib/mud/keybindings/browserReservedKeys.d.ts +2 -2
  98. package/dist-lib/mud/keybindings/keyEventTarget.d.ts +61 -0
  99. package/dist-lib/mud/keybindings/qtKeys.d.ts +91 -12
  100. package/dist-lib/mud/protocol/atcp.d.ts +19 -0
  101. package/dist-lib/mud/protocol/byteString.d.ts +24 -0
  102. package/dist-lib/mud/protocol/charLoginFlow.d.ts +243 -16
  103. package/dist-lib/mud/protocol/charset.d.ts +111 -46
  104. package/dist-lib/mud/protocol/codePages.d.ts +10 -0
  105. package/dist-lib/mud/protocol/constants.d.ts +17 -10
  106. package/dist-lib/mud/protocol/echo.d.ts +23 -27
  107. package/dist-lib/mud/protocol/gmcp.d.ts +36 -6
  108. package/dist-lib/mud/protocol/index.d.ts +3 -2
  109. package/dist-lib/mud/protocol/luaLiteral.d.ts +12 -0
  110. package/dist-lib/mud/protocol/mccp.d.ts +83 -1
  111. package/dist-lib/mud/protocol/mnes.d.ts +41 -58
  112. package/dist-lib/mud/protocol/msdp.d.ts +11 -4
  113. package/dist-lib/mud/protocol/msp.d.ts +3 -2
  114. package/dist-lib/mud/protocol/mssp.d.ts +9 -4
  115. package/dist-lib/mud/protocol/multiByte.d.ts +51 -0
  116. package/dist-lib/mud/protocol/multiByteEncode.d.ts +42 -0
  117. package/dist-lib/mud/protocol/mxp.d.ts +193 -14
  118. package/dist-lib/mud/protocol/oauthClientFlow.d.ts +128 -0
  119. package/dist-lib/mud/protocol/qtCodePages.generated.d.ts +1 -0
  120. package/dist-lib/mud/protocol/tlsCodes.d.ts +40 -3
  121. package/dist-lib/mud/replay/ReplayPlayer.d.ts +16 -1
  122. package/dist-lib/mud/replay/replayFormat.d.ts +29 -2
  123. package/dist-lib/mud/text/Console.d.ts +255 -49
  124. package/dist-lib/mud/text/FormatState.d.ts +137 -14
  125. package/dist-lib/mud/text/ansiEscapes.d.ts +32 -16
  126. package/dist-lib/mud/text/colorParsers.d.ts +14 -2
  127. package/dist-lib/mud/text/colorSpaceId.d.ts +2 -0
  128. package/dist-lib/mud/text/colors.d.ts +17 -10
  129. package/dist-lib/mud/text/controlCharacterMode.d.ts +1 -1
  130. package/dist-lib/mud/text/hyperlinkVisibility.d.ts +1 -1
  131. package/dist-lib/mud/text/lineBreak.d.ts +5 -0
  132. package/dist-lib/mud/text/serverWrap.d.ts +2 -2
  133. package/dist-lib/mud/text/textAnalyzer.d.ts +79 -0
  134. package/dist-lib/mud/text/unicodeRuns.d.ts +11 -0
  135. package/dist-lib/mud/text/unicodeTables.generated.d.ts +3 -0
  136. package/dist-lib/mud/text/wcwidth.d.ts +27 -22
  137. package/dist-lib/mud/timers/TimerEngine.d.ts +163 -11
  138. package/dist-lib/mud/timers/workerClock.d.ts +67 -0
  139. package/dist-lib/mud/triggers/TriggerEngine.d.ts +449 -47
  140. package/dist-lib/mud/triggers/legacyColorPatterns.d.ts +58 -0
  141. package/dist-lib/mud/triggers/pcre/Pcre2.d.ts +83 -1
  142. package/dist-lib/oauth-callback.html +94 -0
  143. package/dist-lib/pcre2Wasm.d.ts +54 -0
  144. package/dist-lib/pcre2Wasm.js +241 -0
  145. package/dist-lib/scripting/EngineHost.d.ts +45 -21
  146. package/dist-lib/scripting/IScriptingRuntime.d.ts +103 -27
  147. package/dist-lib/scripting/MxpFrameManager.d.ts +10 -1
  148. package/dist-lib/scripting/ScriptingAPI.d.ts +1030 -213
  149. package/dist-lib/scripting/ScriptingEngine.d.ts +727 -106
  150. package/dist-lib/scripting/StopwatchManager.d.ts +97 -36
  151. package/dist-lib/scripting/http/HttpService.d.ts +9 -1
  152. package/dist-lib/scripting/http/userUrl.d.ts +41 -0
  153. package/dist-lib/scripting/lua/LuaRuntime.d.ts +352 -77
  154. package/dist-lib/scripting/lua/argContracts.d.ts +71 -0
  155. package/dist-lib/scripting/lua/bindings/automation.d.ts +1 -1
  156. package/dist-lib/scripting/lua/bindings/commands.d.ts +13 -0
  157. package/dist-lib/scripting/lua/bindings/context.d.ts +20 -2
  158. package/dist-lib/scripting/lua/bindings/diagnostics.d.ts +1 -1
  159. package/dist-lib/scripting/lua/bindings/map.d.ts +1 -1
  160. package/dist-lib/scripting/lua/bindings/media.d.ts +2 -2
  161. package/dist-lib/scripting/lua/bindings/output.d.ts +1 -1
  162. package/dist-lib/scripting/lua/bindings/session.d.ts +2 -2
  163. package/dist-lib/scripting/lua/bindings/textEdit.d.ts +1 -1
  164. package/dist-lib/scripting/lua/bindings/userWindows.d.ts +1 -1
  165. package/dist-lib/scripting/lua/byteArmor.d.ts +36 -0
  166. package/dist-lib/scripting/lua/imageSize.d.ts +7 -0
  167. package/dist-lib/scripting/lua/rex.d.ts +4 -2
  168. package/dist-lib/scripting/lua/sqlRowEncoder.d.ts +6 -1
  169. package/dist-lib/scripting/lua/utf8CaseMap.d.ts +1 -0
  170. package/dist-lib/scripting/lua/utf8Patterns.d.ts +21 -1
  171. package/dist-lib/scripting/lua/wellFormedStrings.d.ts +40 -0
  172. package/dist-lib/scripting/lua/yajl.d.ts +43 -5
  173. package/dist-lib/scripting/profilesPresence.d.ts +20 -2
  174. package/dist-lib/scripting/vfs/ProfileVFS.d.ts +164 -10
  175. package/dist-lib/scripting/vfs/fsErrors.d.ts +28 -0
  176. package/dist-lib/scripting/vfs/idbCommit.d.ts +20 -0
  177. package/dist-lib/storage/appStore.d.ts +24 -9
  178. package/dist-lib/storage/hooks.d.ts +5 -1
  179. package/dist-lib/storage/index.d.ts +2 -2
  180. package/dist-lib/storage/mapStorage.d.ts +2 -0
  181. package/dist-lib/storage/persistentStorage.d.ts +3 -1
  182. package/dist-lib/storage/profileStorage.d.ts +15 -0
  183. package/dist-lib/storage/profileVfsData.d.ts +3 -3
  184. package/dist-lib/storage/schema.d.ts +512 -40
  185. package/dist-lib/storage/storageMigration.d.ts +82 -0
  186. package/dist-lib/storage-g5V1b-c1.js +2039 -0
  187. package/dist-lib/styles.css +1 -1
  188. package/dist-lib/ui/AboutModal.d.ts +1 -1
  189. package/dist-lib/ui/BrandLoginFields.d.ts +1 -1
  190. package/dist-lib/ui/BrowserSignInModal.d.ts +23 -0
  191. package/dist-lib/ui/CmdLineMenuRegistry.d.ts +14 -5
  192. package/dist-lib/ui/CommandBar.d.ts +8 -8
  193. package/dist-lib/ui/ConnectionFormModal.d.ts +20 -1
  194. package/dist-lib/ui/ConnectionScreen.d.ts +9 -1
  195. package/dist-lib/ui/GameLinkPrompt.d.ts +28 -0
  196. package/dist-lib/ui/HelpModal.d.ts +5 -1
  197. package/dist-lib/ui/MapSymbolUsageModal.d.ts +32 -0
  198. package/dist-lib/ui/MouseEventRegistry.d.ts +31 -4
  199. package/dist-lib/ui/NotepadModal.d.ts +22 -0
  200. package/dist-lib/ui/ResizableModal.d.ts +16 -1
  201. package/dist-lib/ui/SettingsModal.d.ts +10 -1
  202. package/dist-lib/ui/TlsAlertBanner.d.ts +3 -1
  203. package/dist-lib/ui/Toolbar.d.ts +22 -1
  204. package/dist-lib/ui/VaultManageButton.d.ts +10 -5
  205. package/dist-lib/ui/VaultModal.d.ts +3 -0
  206. package/dist-lib/ui/buttons/ButtonsBar.d.ts +3 -1
  207. package/dist-lib/ui/buttons/inactiveButtons.d.ts +25 -0
  208. package/dist-lib/ui/cmdline/CommandLineManager.d.ts +19 -0
  209. package/dist-lib/ui/cmdline/plainText.d.ts +16 -0
  210. package/dist-lib/ui/cmdline/subCommandLine.d.ts +78 -0
  211. package/dist-lib/ui/cmdline/useCmdLineSelection.d.ts +26 -0
  212. package/dist-lib/ui/cmdline/useSubCommandLineKeys.d.ts +33 -0
  213. package/dist-lib/ui/codemirror/lineParagraphMarks.d.ts +19 -0
  214. package/dist-lib/ui/codemirror/luaHover.d.ts +7 -0
  215. package/dist-lib/ui/codemirror/options.d.ts +33 -0
  216. package/dist-lib/ui/codemirror/theme.d.ts +29 -5
  217. package/dist-lib/ui/commands/addonCommands.d.ts +134 -0
  218. package/dist-lib/ui/commands/appShortcuts.d.ts +86 -0
  219. package/dist-lib/ui/commands/hostCommands.d.ts +88 -0
  220. package/dist-lib/ui/commands/keyMatch.d.ts +20 -0
  221. package/dist-lib/ui/commands/keySequence.d.ts +57 -0
  222. package/dist-lib/ui/components/ContextMenu.d.ts +21 -1
  223. package/dist-lib/ui/components/FontPicker.d.ts +5 -1
  224. package/dist-lib/ui/components/useModalFocus.d.ts +13 -1
  225. package/dist-lib/ui/helpTopics.d.ts +15 -0
  226. package/dist-lib/ui/labels/LabelManager.d.ts +172 -9
  227. package/dist-lib/ui/labels/LabelOverlay.d.ts +19 -0
  228. package/dist-lib/ui/labels/backgroundImageSize.d.ts +19 -0
  229. package/dist-lib/ui/labels/labelModel.d.ts +64 -0
  230. package/dist-lib/ui/labels/qColor.d.ts +13 -0
  231. package/dist-lib/ui/labels/qtCss.d.ts +12 -4
  232. package/dist-lib/ui/landmarks.d.ts +9 -0
  233. package/dist-lib/ui/launcher/ActionMenu.d.ts +19 -0
  234. package/dist-lib/ui/launcher/GameDetails.d.ts +21 -0
  235. package/dist-lib/ui/launcher/GameSection.d.ts +18 -0
  236. package/dist-lib/ui/launcher/LauncherSearch.d.ts +23 -0
  237. package/dist-lib/ui/launcher/ProfileArt.d.ts +20 -0
  238. package/dist-lib/ui/launcher/ProfileSection.d.ts +43 -0
  239. package/dist-lib/ui/launcher/launcherModel.d.ts +72 -0
  240. package/dist-lib/ui/layout/overlayLayerOrder.d.ts +2 -2
  241. package/dist-lib/ui/menu/MenuBar.d.ts +31 -0
  242. package/dist-lib/ui/menu/SplitButton.d.ts +39 -0
  243. package/dist-lib/ui/menu/anchoredPopup.d.ts +74 -0
  244. package/dist-lib/ui/menu/appMenus.d.ts +65 -0
  245. package/dist-lib/ui/menu/menuModel.d.ts +88 -0
  246. package/dist-lib/ui/menu/toolbarModel.d.ts +56 -0
  247. package/dist-lib/ui/notepad.d.ts +76 -0
  248. package/dist-lib/ui/openSignInPage.d.ts +14 -0
  249. package/dist-lib/ui/output/OutputContextMenu.d.ts +14 -1
  250. package/dist-lib/ui/output/OutputRenderer.d.ts +5 -0
  251. package/dist-lib/ui/output/OutputSearchBar.d.ts +5 -1
  252. package/dist-lib/ui/output/StickyOutputPanel.d.ts +17 -3
  253. package/dist-lib/ui/output/TextAnalyzerModal.d.ts +25 -0
  254. package/dist-lib/ui/output/caretMode.d.ts +3 -2
  255. package/dist-lib/ui/output/clearSplit.d.ts +11 -0
  256. package/dist-lib/ui/output/outputCopy.d.ts +41 -2
  257. package/dist-lib/ui/output/outputRows.d.ts +43 -0
  258. package/dist-lib/ui/output/selectionGesture.d.ts +35 -0
  259. package/dist-lib/ui/output/wordSelection.d.ts +33 -0
  260. package/dist-lib/ui/search/matcher.d.ts +14 -4
  261. package/dist-lib/ui/settings/SettingsShell.d.ts +91 -0
  262. package/dist-lib/ui/settings/ShortcutEditor.d.ts +13 -0
  263. package/dist-lib/ui/sound/SoundManager.d.ts +210 -44
  264. package/dist-lib/ui/sound/closedCaption.d.ts +4 -1
  265. package/dist-lib/ui/sound/mediaDirection.d.ts +35 -0
  266. package/dist-lib/ui/tabCompletion.d.ts +53 -0
  267. package/dist-lib/ui/textedit/TextEditManager.d.ts +11 -2
  268. package/dist-lib/ui/useOpenProfiles.d.ts +1 -1
  269. package/dist-lib/ui/video/VideoManager.d.ts +7 -0
  270. package/dist-lib/ui/windows/WindowManager.d.ts +452 -37
  271. package/dist-lib/ui/windows/panels/ScriptEditorPanel.d.ts +14 -0
  272. package/dist-lib/ui/windows/panels/ScriptSearch.d.ts +6 -1
  273. package/dist-lib/ui/windows/panels/TextPanel.d.ts +4 -1
  274. package/dist-lib/ui/windows/panels/VariablesView.d.ts +37 -7
  275. package/dist-lib/ui/windows/panels/WindowCmdLine.d.ts +4 -2
  276. package/dist-lib/ui/windows/panels/aliasLoop.d.ts +24 -0
  277. package/dist-lib/ui/windows/panels/editorClipboard.d.ts +45 -0
  278. package/dist-lib/ui/windows/panels/editorUndo.d.ts +79 -0
  279. package/dist-lib/ui/windows/panels/mapAreaChange.d.ts +10 -0
  280. package/dist-lib/utils/appShellCache.d.ts +25 -0
  281. package/dist-lib/utils/fontFamilyName.d.ts +13 -0
  282. package/dist-lib/utils/fontLoader.d.ts +31 -0
  283. package/dist-lib/utils/formatBytes.d.ts +4 -0
  284. package/dist-lib/utils/mustBeOneOf.d.ts +9 -0
  285. package/dist-lib/utils/profileLock.d.ts +1 -1
  286. package/dist-lib/utils/systemTheme.d.ts +24 -0
  287. package/dist-lib/utils/timeZone.d.ts +10 -0
  288. package/dist-lib/vault/CredentialVault.d.ts +51 -5
  289. package/dist-lib/vault/deviceUnlock.d.ts +47 -0
  290. package/dist-lib/vault/vaultAccess.d.ts +24 -2
  291. package/dist-lib/vault/vaultHelpTopic.d.ts +9 -0
  292. package/dist-lib/vault/vaultRecord.d.ts +33 -1
  293. package/dist-lib/vfs-sw.js +220 -11
  294. package/dist-lib/vite.d.ts +1 -1
  295. package/dist-lib/vite.js +66 -43
  296. package/package.json +23 -15
  297. package/dist-lib/assets/mapParser.worker-t-3rd1zR.js +0 -9
  298. package/dist-lib/mud/connection/PingTracker.d.ts +0 -41
  299. package/dist-lib/ui/BundledGameGrid.d.ts +0 -21
  300. package/dist-lib/ui/ConnectionGrid.d.ts +0 -21
  301. package/dist-lib/ui/bufferWords.d.ts +0 -38
@@ -1,5 +1,9 @@
1
1
  import type { EventBus } from "../../core/EventBus";
2
2
  import type { MudClientEvents } from "../events";
3
+ /** Columns the timestamp gutter takes off the main console when it is shown —
4
+ * the length of Mudlet's `TBuffer::smTimeStampFormat` ("hh:mm:ss.zzz "). Desktop
5
+ * takes it off the NAWS width, so a game wraps to what is left beside it. */
6
+ export declare const TIMESTAMP_GUTTER_COLUMNS = 13;
3
7
  export interface TelnetNegotiatorFlags {
4
8
  gmcpEnabled: boolean;
5
9
  mttsEnabled: boolean;
@@ -11,8 +15,6 @@ export interface TelnetNegotiatorFlags {
11
15
  mnesEnabled: boolean;
12
16
  newEnvironEnabled: boolean;
13
17
  nawsEnabled: boolean;
14
- /** Whether the game-facing transport is TLS (MTTS SSL bit, NEW-ENVIRON TLS var). */
15
- secureTransport: boolean;
16
18
  /** Whether to advertise screen-reader use (MTTS SCREEN READER bit,
17
19
  * NEW-ENVIRON SCREEN_READER var) — Mudlet's `advertiseScreenReader` config
18
20
  * key. Default false; some MUDs adjust their output (e.g. suppress ASCII
@@ -46,15 +48,20 @@ export interface TelnetNegotiatorFlags {
46
48
  }
47
49
  export interface TelnetNegotiatorHooks {
48
50
  sendRaw(data: string): void;
49
- /** GMCP came up — send the Core.Hello / Core.Supports.Set handshake
50
- * (latched by the owner so a re-offer doesn't re-announce). */
51
+ /** The server offered GMCP (IAC WILL GMCP) — send the Core.Hello /
52
+ * Core.Supports.Set handshake. Mudlet answers every offer with it,
53
+ * re-offers included — a server that switched GMCP off and on again has
54
+ * forgotten our modules. Not called for a server's IAC DO GMCP: Mudlet
55
+ * answers that with WILL alone and announces nothing until the server's
56
+ * own WILL (mudlet-web#362). */
51
57
  onGmcpNegotiated(): void;
52
- /** CHARSET came up — kick off the client-driven REQUEST listing our
53
- * preferred encodings. */
54
- onCharsetNegotiated(): void;
55
58
  /** Current inbound encoding (IANA label) — drives the MTTS UTF-8 bit and
56
59
  * the MNES/NEW-ENVIRON CHARSET variable. */
57
60
  getEncoding(): string;
61
+ /** Whether MCCP may be taken up — false under `specialForceCompressionOff`.
62
+ * The server's offer is otherwise MccpHandler's to accept; this only lets
63
+ * the negotiator turn it down while that handler stands aside. */
64
+ isMccpEnabled(): boolean;
58
65
  /** The server's option-negotiation order matched KaVir's protocol snippet —
59
66
  * it wants a version in our TTYPE reply. Fired at most once per connection;
60
67
  * the owner turns `versionInTTYPE` on and redials. */
@@ -64,7 +71,7 @@ export interface TelnetNegotiatorHooks {
64
71
  * Telnet option negotiation for a MUD session. Owns the WILL/WONT/DO/DONT
65
72
  * response policy, the per-session negotiation latches (TTYPE cycle position,
66
73
  * MXP started, NAWS accepted), the Mudlet `addSupportedTelnetOption` registry,
67
- * and the `telnet.event` (sysTelnetEvent) surface for everything unrecognized.
74
+ * and the `telnet.event` (sysTelnetEvent) surface raised for every command.
68
75
  *
69
76
  * `processFrame` makes a single position-aware walk over each incoming frame's
70
77
  * IAC sequences — skipping subnegotiation payloads and escaped `IAC IAC` bytes
@@ -83,20 +90,14 @@ export declare class TelnetNegotiator {
83
90
  * own response logic. Survives reconnects (matches the old client-field
84
91
  * lifetime: the registry lives as long as the client instance). */
85
92
  private readonly supportedTelnetOptions;
86
- /** Per-incoming-frame dedupe. Keys below 0x100 mark a natively-handled
87
- * option as already answered this frame (mirroring the old one-response-
88
- * per-frame `includes()` behavior); keys `(cmd << 8) | opt` mark a
89
- * `telnet.event` as already raised. Telnet sequences can repeat across
90
- * frames, so we only suppress duplicates within a single frame to avoid
91
- * event storms. */
92
- private readonly frameSeen;
93
93
  /** Trailing bytes of a frame that might be the start of a split IAC
94
94
  * sequence (a bare IAC, IAC WILL with no option byte yet, or an IAC SB
95
95
  * whose IAC SE hasn't arrived) — prepended to the next frame so
96
96
  * negotiation commands split across WebSocket frames aren't missed. */
97
97
  private carry;
98
- /** MTTS cycle position. The server issues SB TTYPE SEND repeatedly; we walk
99
- * through client name (0), terminal type (1), then the MTTS bitvector (2+).
98
+ /** MTTS cycle position — Mudlet's `mCycleCountMTTS`. The server issues SB
99
+ * TTYPE SEND repeatedly; we walk through client name (0), terminal type
100
+ * (1), the MTTS bitvector (2) and the bitvector again (3), then start over.
100
101
  * Reset on each connect(). */
101
102
  private ttypeStep;
102
103
  /** Latches true once MXP has started for this session — via telnet option 91
@@ -105,6 +106,10 @@ export declare class TelnetNegotiator {
105
106
  * telnet handshake, so the in-band signal is the reliable trigger. Reset on
106
107
  * each connect(). */
107
108
  private mxpStarted;
109
+ /** cTelnet's `mMxpDetectionTail`: the last three bytes of the last read
110
+ * scanned for a mode switch, so a switch the game's packets split is still
111
+ * found once the rest arrives. A read that is not scanned clears it. */
112
+ private mxpDetectionTail;
108
113
  /** Rolling window of the last {@link KAVIR_NEGOTIATION_ORDER}`.length`
109
114
  * options the server sent us a WILL/DO for, oldest first — Mudlet's
110
115
  * `mNegotiationOrder`. Compared against the KaVir fingerprint after each
@@ -114,9 +119,6 @@ export declare class TelnetNegotiator {
114
119
  * detector fires the hook at most once even though a server may keep
115
120
  * re-offering options. */
116
121
  private kaVirDetected;
117
- /** True once we've sent IAC WILL NAWS this session (proactively on connect,
118
- * or in response to a server-initiated IAC DO NAWS), so we don't re-offer. */
119
- private nawsWillSent;
120
122
  /** True once the server has accepted NAWS (IAC DO NAWS). Gates whether a
121
123
  * window-size change is pushed to the server. */
122
124
  private nawsNegotiated;
@@ -126,15 +128,43 @@ export declare class TelnetNegotiator {
126
128
  * did. See {@link isMspNegotiated}. */
127
129
  private mspNegotiated;
128
130
  /** Latest known main output window size in character columns × rows, fed in
129
- * by the session's resize observer via setWindowSize(). Null until the UI
130
- * has measured the grid at least once. Deliberately NOT cleared by reset()
131
- * so a reconnect keeps reporting the current grid. */
131
+ * by the session's resize observer via setWindowSize() — Mudlet's
132
+ * `mScreenWidth` × `mScreenHeight`. Null until the UI has measured the grid
133
+ * at least once. Deliberately NOT cleared by reset() so a reconnect keeps
134
+ * reporting the current grid. */
132
135
  private windowSize;
136
+ /** The main console's wrap column — Mudlet's `Host::mWrapAt`; 0 means
137
+ * wrapping is off. Caps the NAWS width and is reported as WORD_WRAP.
138
+ * Survives reset() like the window size. */
139
+ private wrapAt;
140
+ /** Whether the main console draws its timestamp gutter, which desktop takes
141
+ * off the NAWS width. */
142
+ private timestampsShown;
143
+ /** The NAWS width × height last sent this connection — Mudlet's `mNaws_x` /
144
+ * `mNaws_y` — so a change that leaves the reported size alone sends nothing.
145
+ * Null until the first report; cleared by reset() and by each DO NAWS. */
146
+ private lastNaws;
133
147
  /** Latches true once the server has asked us to suppress go-ahead (IAC WILL
134
- * SGA). mudix refuses SGA (line mode only), but records the request:
148
+ * SGA). Mudlet Web refuses SGA (line mode only), but records the request:
135
149
  * combined with active server echo it's the character-at-a-time signature
136
150
  * the owner uses to raise `sysCharacterModeDetected`. Reset on connect(). */
137
151
  private serverRequestedSGA;
152
+ /** Option bytes currently negotiated on, for the protocols that carry a
153
+ * sysProtocolEnabled / sysProtocolDisabled pair. Mudlet keeps one bool per
154
+ * protocol (enableGMCP, enableMSSP, …) and reads it to decide whether
155
+ * turning an offer down is news; this is that set. Cleared by reset() with
156
+ * the rest of the per-connection latches.
157
+ * @see PROTOCOL_NAMES */
158
+ private readonly enabledProtocols;
159
+ /** Mudlet's four per-option bitsets (`cTelnet::sendTelnetOption` keeps
160
+ * them), which decide whether a WONT/DONT or a repeated offer is answered:
161
+ * `hisOn` — we sent DO; `heAnnounced` — the server has sent WILL or WONT;
162
+ * `myOn` — we sent WILL; `announced` — we have sent WILL or WONT. Cleared by
163
+ * reset(). */
164
+ private readonly hisOn;
165
+ private readonly heAnnounced;
166
+ private readonly myOn;
167
+ private readonly announced;
138
168
  constructor(flags: TelnetNegotiatorFlags, eventBus: EventBus<MudClientEvents>, hooks: TelnetNegotiatorHooks);
139
169
  /** Clear the per-connection latches (call on connect). */
140
170
  reset(): void;
@@ -143,6 +173,29 @@ export declare class TelnetNegotiator {
143
173
  * config (which only decides whether we agree to negotiate at all). Gates
144
174
  * `receiveMSP`, which Mudlet refuses unless the option is live. */
145
175
  isMspNegotiated(): boolean;
176
+ /** Whether GMCP (option 201) is live — Mudlet's `isGMCPEnabled()`, which
177
+ * `sendGMCP` refuses without: nothing goes to a server that has not taken
178
+ * the option up. */
179
+ isGmcpEnabled(): boolean;
180
+ /** Whether ATCP (option 200) is live — Mudlet's `isATCPEnabled()`, the
181
+ * gate `sendATCP` refuses without, as `sendGMCP` does for GMCP. */
182
+ isAtcpEnabled(): boolean;
183
+ /** Whether CHARSET (option 42) is live — Mudlet's `enableCHARSET`. A
184
+ * REQUEST subnegotiation is read only while it is, so a server that has
185
+ * withdrawn the option cannot go on changing the encoding. */
186
+ isCharsetNegotiated(): boolean;
187
+ /** Whether the server has taken zMUD channel 102 up this connection —
188
+ * Mudlet's `isChannel102Enabled()`. It is the only gate on
189
+ * `sendTelnetChannel102`: Mudlet frames and writes the subnegotiation
190
+ * whether or not a socket is still there and answers true either way, so
191
+ * a caller is told about the option rather than about the connection. */
192
+ isChannel102Enabled(): boolean;
193
+ /** Whether we have agreed to the server's side of `opt` (sent it DO) and
194
+ * not since turned it off — Mudlet's `hisOptionState`. */
195
+ isServerOptionOn(opt: number): boolean;
196
+ /** Clear `opt` from `hisOn` without answering anything — for an option
197
+ * that lapses on its own, as compression does when its stream ends. */
198
+ forgetServerOption(opt: number): void;
146
199
  /** Drop the negotiated-MSP latch without resetting the rest of the
147
200
  * negotiation state — used on disconnect, where the option dies with the
148
201
  * connection but reset() isn't otherwise run. */
@@ -151,11 +204,6 @@ export declare class TelnetNegotiator {
151
204
  * (IAC WILL SGA). We refuse SGA, but the owner combines this with the
152
205
  * echo state to detect character-at-a-time mode. */
153
206
  get sgaRequested(): boolean;
154
- /** The WebSocket handshake completed — proactively offer NAWS (RFC 1073
155
- * has the window-owning side send WILL). The server replies IAC DO NAWS —
156
- * handled in processFrame — at which point we send the actual dimensions.
157
- * Harmless if the server doesn't support it (it answers DONT or ignores us). */
158
- onSocketOpen(): void;
159
207
  /** Mudlet `addSupportedTelnetOption(option)`. Marks the telnet option byte
160
208
  * (0..255) as one the client will accept: on the next IAC WILL <opt> we
161
209
  * reply IAC DO <opt>; on IAC DO <opt> we reply IAC WILL <opt>. Natively
@@ -166,19 +214,66 @@ export declare class TelnetNegotiator {
166
214
  /** Record the main output window's character grid (columns × rows) for NAWS.
167
215
  * The value is stored regardless of negotiation state (so a client created
168
216
  * on a later connect can be seeded with the current size); it's only sent
169
- * to the server once NAWS has been negotiated, and only when it changed. */
217
+ * to the server once NAWS has been negotiated, and only when the size it
218
+ * reports changed. */
170
219
  setWindowSize(cols: number, rows: number): void;
220
+ /** Record the main console's wrap column (Mudlet's `Host::mWrapAt`; 0 for
221
+ * off). It caps the NAWS width, so a change re-reports the size the way
222
+ * desktop's `setWindowWrap("main", n)` does. */
223
+ setWrapAt(wrapAt: number): void;
224
+ /** Record whether the main console draws its timestamp gutter, which
225
+ * desktop takes off the NAWS width. */
226
+ setTimestampsShown(shown: boolean): void;
227
+ /** Note option commands a sibling handler (EchoHandler, MccpHandler) put on
228
+ * the wire itself, so the option bitsets — and with them the STATUS reply
229
+ * and the repeat-offer checks — know about them, as Mudlet's single
230
+ * `sendTelnetOption` does. `data` is what was sent. */
231
+ noteOptionsSent(data: string): void;
171
232
  /** Walk one incoming frame (post-MCCP Latin-1 byte-string) for telnet IAC
172
- * sequences: answer WILL/WONT/DO/DONT per the option policy, auto-respond
173
- * to registered supported options, raise `telnet.event` for everything
174
- * else (including SB of unrecognized options), and watch for in-band MXP
175
- * line-mode sequences on servers that skip the option-91 handshake. */
233
+ * sequences: answer WILL/WONT/DO/DONT per the option policy, raise
234
+ * `telnet.event` for every command but GA/EOR and consumed SBs (as Mudlet's
235
+ * `processTelnetCommand` does), and watch for in-band MXP line-mode
236
+ * sequences on servers that skip the option-91 handshake. */
176
237
  processFrame(data: string): void;
177
- /** One WILL/WONT/DO/DONT for `opt`. Natively-handled options are answered
178
- * at most once per frame (matching the old `includes()`-based scan); the
179
- * supported-options registry answers every occurrence; anything left is
180
- * surfaced as a `telnet.event`. */
238
+ /**
239
+ * Run `post` — the showing of a read this negotiator has just scanned —
240
+ * without letting what it feeds in meanwhile disturb the read's detection
241
+ * tail. An escape this read leaves unfinished is joined to the NEXT read,
242
+ * not to what a trigger `feedTelnet()`s while this one is shown, so that
243
+ * must neither be joined to this read's tail nor replace it (cTelnet's
244
+ * postKeepingDetectionTail).
245
+ */
246
+ keepingMxpDetectionTail(post: () => void): void;
247
+ /** One WILL/WONT/DO/DONT for `opt`. Natively-handled options follow their
248
+ * own rules; everything else gets Mudlet's generic answer. Every
249
+ * occurrence is answered on its merits — no per-frame dedupe — so a
250
+ * server that turns an option off and on again within one packet is
251
+ * answered for each step, as Mudlet does. */
181
252
  private handleNegotiationCommand;
253
+ /** Send `IAC <cmd> <opt>` and keep the four option bitsets in step, as
254
+ * Mudlet's `cTelnet::sendTelnetOption` does. */
255
+ private sendOption;
256
+ private trackOption;
257
+ /** Mudlet's reply to STATUS SEND: `IAC SB STATUS IS`, then `WILL <opt>`
258
+ * for every option we have on and `DO <opt>` for every one we asked the
259
+ * server to have on, in option order, then `IAC SE`. Sent whether or not
260
+ * STATUS itself was negotiated, as desktop does. RFC 859 exempts the list
261
+ * from IAC escaping except for an option byte equal to SE (240), which is
262
+ * doubled. */
263
+ private sendStatusIs;
264
+ /** The answer every option gets once nothing specific to it applies —
265
+ * Mudlet's fall-through branches in `processTelnetCommand`:
266
+ * - WILL: DO for STATUS, TERMINAL-TYPE and anything registered with
267
+ * `addSupportedTelnetOption`, DONT for the rest — unless we already
268
+ * sent DO, in which case the offer is only a repeat.
269
+ * - DO: WONT to TIMING-MARK always; otherwise, unless we already said
270
+ * WILL, WILL for STATUS, TERMINAL-TYPE and registered options, WONT
271
+ * for the rest.
272
+ * - WONT: DONT when we had it on or the server had announced it before
273
+ * (RFC 854's acknowledgement), silence for a first unprompted WONT.
274
+ * - DONT: WONT when we had it on or have never said anything about it.
275
+ * Silence to an offer is what leaves a strict server waiting. */
276
+ private respondToOtherOption;
182
277
  /** Mudlet `cTelnet::trackKaVirNegotiation`. Records the option of each
183
278
  * inbound WILL/DO in a rolling window and fires the hook the first time the
184
279
  * window equals the KaVir fingerprint. Recording happens before the
@@ -187,47 +282,92 @@ export declare class TelnetNegotiator {
187
282
  * `processTelnetCommand`. */
188
283
  private trackKaVirNegotiation;
189
284
  private respondToKnownOption;
190
- /** Raise `telnet.event` for an SB of an option we neither handle natively
191
- * nor auto-negotiate (type 5 in Mudlet's sysTelnetEvent mapping). */
192
- private noticeSubnegotiation;
193
- /** `type` mirrors Mudlet's TLuaInterpreter mapping: 1=WILL, 2=WONT, 3=DO,
194
- * 4=DONT, 5=SB. Deduped per (command, option) within the frame so a server
195
- * that spams the same option doesn't flood handlers. */
285
+ /** Take the option up: answer the server, latch it on and announce it as
286
+ * Mudlet's `sysProtocolEnabled`. Raised on every acceptance rather than
287
+ * only the first, matching `raiseProtocolEvent` — a server that re-offers
288
+ * mid-session re-announces. `beforeAnnounce` runs after the agreement is
289
+ * on the wire but before the event, for handshakes that must precede
290
+ * anything a script sends in response. */
291
+ private enableProtocol;
292
+ /** Turn an offer down because the profile has that protocol switched off.
293
+ * The refusal is announced only if we had the option on: declining one
294
+ * that was never taken up is not news, and Mudlet guards it the same way. */
295
+ private refuseProtocol;
296
+ /** The server withdrew the option (IAC WONT / IAC DONT). */
297
+ private withdrawProtocol;
298
+ /** Mudlet's ATCP hello, sent after `IAC DO ATCP` and again in answer to
299
+ * the server's `Auth.Request`: the client's name and version, then the
300
+ * modules it asks for. Mudlet's list less `composer`, since there is no
301
+ * ATCP composer here to answer `Client.Compose`. */
302
+ sendAtcpHello(): void;
303
+ /** Mudlet's MSDP start sequence, sent after `IAC DO MSDP`:
304
+ * `LIST COMMANDS`, then `CLIENT_NAME` / `CLIENT_VERSION` in one frame. */
305
+ private sendMsdpHello;
306
+ /** Raise `telnet.event` (Mudlet's `sysTelnetEvent`) for one complete
307
+ * command, `raw` being its bytes from the IAC on. Mirrors the tail of
308
+ * `cTelnet::processTelnetCommand`: raised for every command — handled
309
+ * options included — except GA and EOR, which end nearly every prompt,
310
+ * and the subnegotiations of the options in `SB_CONSUMED`.
311
+ * `type` is the command byte itself (251 WILL, 250 SB, …), `option` the
312
+ * byte after it (0 for a two-byte command). `message` is a byte-string:
313
+ * desktop hands it to Lua as ARGUMENT_TYPE_BYTES, byte for byte and not
314
+ * decoded, since an option it has no handler for can carry any binary
315
+ * data. A subnegotiation's is its payload alone — without the
316
+ * `IAC SB <option>` and `IAC SE` framing, a doubled IAC unescaped, and
317
+ * empty for an empty one — and any other command's is the whole command. */
196
318
  private emitTelnetEvent;
197
319
  /** Reply to a TERMINAL-TYPE / MTTS subnegotiation. `subneg` is the SB body
198
320
  * with the option byte (24) at [0]; [1] is the request kind (1 = SEND). We
199
- * answer `IAC SB TTYPE IS <value> IAC SE`, cycling client name → terminal
200
- * type → MTTS capability bitvector on successive SENDs, then repeating the
201
- * last value to signal the list is exhausted (RFC 1091 + the MTTS standard). */
321
+ * answer `IAC SB TTYPE IS <value> IAC SE`, walking Mudlet's
322
+ * `mCycleCountMTTS` cycle on successive SENDs: client name, terminal type,
323
+ * the MTTS bitvector, the bitvector again — the repeat is what tells the
324
+ * server the list is done (RFC 1091 + the MTTS standard) — and then back to
325
+ * the client name, so a server that re-detects the client later (after a
326
+ * copyover, say) is told who it is again. With MTTS off the cycle is just
327
+ * the client name, repeated — desktop Mudlet still identifies itself, it
328
+ * only skips the MTTS steps. */
202
329
  handleTtypeSubneg(subneg: string): void;
330
+ /** The MTTS bitvector from live state — Mudlet's `getNewEnvironMTTS`: UTF-8
331
+ * when that is the encoding, SCREEN READER when advertised, MNES when the
332
+ * profile has MNES and NEW-ENVIRON both on; the rest are static (see
333
+ * computeMtts, including why SSL always is). */
334
+ private currentMtts;
203
335
  /** Handle an `IAC SB MXP IAC SE` subnegotiation. Per spec it carries no
204
336
  * payload — it merely confirms MXP is active — so we just start MXP. The
205
337
  * actual MXP markup arrives in-band and is parsed downstream by the
206
338
  * scripting engine. */
207
339
  handleMxpSubneg(): void;
208
- /** Answer an `IAC SB NEW-ENVIRON SEND … IAC SE` request, framed as
209
- * `IAC SB NEW-ENVIRON IS <marker> … VALUE … IAC SE`. Telnet option 39 is
210
- * shared by two modes: MNES reports the five core variables framed as VAR;
211
- * plain NEW-ENVIRON reports the core set plus an extended capability set,
212
- * framed as USERVAR. MNES takes precedence when both toggles are on
213
- * (matching Mudlet). The server may request specific variables or send a
214
- * bare SEND for all; selectMnesVars handles both. No-op when the option is
215
- * off for this profile or on a malformed/non-SEND body. */
340
+ /** Answer an `IAC SB NEW-ENVIRON SEND … IAC SE` request. Telnet option 39
341
+ * is shared by two modes, each answered as Mudlet answers it: MNES
342
+ * (`sendIsMNESValues`) reports the five core variables framed as VAR, one
343
+ * reply per named variable; plain NEW-ENVIRON (`sendIsNewEnvironValues`)
344
+ * reports the core set plus an extended capability set, framed as USERVAR,
345
+ * in a single reply that lists unknown names as undefined and may come
346
+ * back empty. MNES takes precedence when both toggles are on. No-op when
347
+ * the option is off for this profile or on a non-SEND body. */
216
348
  handleNewEnvironSubneg(subneg: string): void;
217
349
  /** Build the option-39 variable set from live client state. CHARSET tracks
218
- * the negotiated encoding; the extended NEW-ENVIRON capabilities derive from
219
- * the game-facing transport (TLS — false in proxy mode) and the measured
220
- * output grid (WORD_WRAP). The static identity (CLIENT_NAME/VERSION, MTTS,
221
- * TERMINAL_TYPE) and the capability defaults live in buildNewEnvironVars. */
350
+ * the negotiated encoding and WORD_WRAP the main console's wrap column
351
+ * (Mudlet's `Host::mWrapAt`, not the window's width). The static identity
352
+ * (CLIENT_NAME/VERSION, TERMINAL_TYPE) and the capability defaults live in
353
+ * buildNewEnvironVars. */
222
354
  private collectNewEnvironVars;
223
- /** Latch MXP on for this session and notify listeners. Idempotent — only the
224
- * first call emits `mxp.negotiated`; later calls (repeat WILL/DO, in-band
225
- * detection on subsequent frames) are no-ops. `viaTelnet` distinguishes a
226
- * real option-91 handshake from in-band-only detection (see the event doc). */
355
+ /** Latch MXP on for this session and notify listeners: on every switch-on
356
+ * from the game, and on the first in-band detection. `viaTelnet`
357
+ * distinguishes a real option-91 switch-on from in-band-only detection (see
358
+ * the event doc), and `viaSubnegotiation` a bare `IAC SB MXP IAC SE`. */
227
359
  private startMxp;
228
- /** Send the current window size as an `IAC SB NAWS … IAC SE` subnegotiation.
229
- * Falls back to a conventional 80×24 terminal default when the UI hasn't
230
- * reported a real size yet — better than the NAWS 0×0 "no preference"
231
- * sentinel, which some servers treat as "disable wrapping". */
232
- private sendNawsSize;
360
+ /** Mudlet's `cTelnet::sendCurrentNAWS`: report the size the game should
361
+ * format for as an `IAC SB NAWS … IAC SE` subnegotiation — once NAWS is
362
+ * on, and only when it differs from what was last sent. The width is the
363
+ * smaller of the window's columns and the wrap column, less the timestamp
364
+ * gutter when one is drawn; a game told the full window width would wrap
365
+ * wider than the client does, and every long line would break twice.
366
+ * Wrapping switched off (wrap 0, which only the Settings field can set and
367
+ * desktop has no equivalent of) leaves the window width alone.
368
+ *
369
+ * Falls back to a conventional 80×24 terminal when the UI hasn't reported a
370
+ * real size yet — better than the NAWS 0×0 "no preference" sentinel, which
371
+ * some servers treat as "disable wrapping". */
372
+ private sendCurrentNaws;
233
373
  }
@@ -1,37 +1,37 @@
1
1
  /**
2
2
  * localStorage-gated diagnostic logging for the MUD connection. Each gate is
3
- * toggled from the browser console (e.g. `localStorage.setItem('mudix.debugTelnet',
3
+ * toggled from the browser console (e.g. `localStorage.setItem('mudlet.debugTelnet',
4
4
  * '1')`) and read live on every use, so logging can be flipped mid-session
5
5
  * without a reconnect.
6
6
  */
7
7
  /**
8
- * `mudix.debugTelnet` — log every telnet command/subnegotiation byte seen on
8
+ * `mudlet.debugTelnet` — log every telnet command/subnegotiation byte seen on
9
9
  * each incoming frame, and every byte-string we send. Used to investigate
10
10
  * protocol-negotiation issues (GMCP/MSDP/MCCP not enabling) by revealing
11
11
  * exactly what crosses the wire in both directions.
12
12
  */
13
13
  export declare function debugTelnetEnabled(): boolean;
14
14
  /**
15
- * `mudix.debugFrames` — log WebSocket frame boundaries for the MUD stream.
15
+ * `mudlet.debugFrames` — log WebSocket frame boundaries for the MUD stream.
16
16
  * Used to investigate "extra line break" issues that surface when long MUD
17
17
  * lines arrive split across multiple WebSocket frames.
18
18
  */
19
19
  export declare function debugFramesEnabled(): boolean;
20
20
  /**
21
- * `mudix.debugMsp` — log MSP negotiation, parsed `!!SOUND`/`!!MUSIC` tags
21
+ * `mudlet.debugMsp` — log MSP negotiation, parsed `!!SOUND`/`!!MUSIC` tags
22
22
  * (inline and subneg), and their dispatch into the SoundManager. Use this to
23
23
  * confirm whether a MUD is actually emitting MSP and whether the client is
24
24
  * routing it through.
25
25
  */
26
26
  export declare function debugMspEnabled(): boolean;
27
27
  /**
28
- * `mudix.debugGmcp` — log every parsed GMCP message's path and (truncated) body
28
+ * `mudlet.debugGmcp` — log every parsed GMCP message's path and (truncated) body
29
29
  * as it arrives. Used to see exactly which modules a server drives — e.g.
30
30
  * whether login audio comes over `Client.Media.*` GMCP vs. MSP tags.
31
31
  */
32
32
  export declare function debugGmcpEnabled(): boolean;
33
33
  /**
34
- * `mudix.debugGa` — log every IAC GA / IAC EOR prompt marker the server sends,
34
+ * `mudlet.debugGa` — log every IAC GA / IAC EOR prompt marker the server sends,
35
35
  * plus the one-time moment the client latches into GA-driven prompt mode. Use
36
36
  * this to confirm whether a MUD actually signals its prompts (GA-less MUDs rely
37
37
  * on the `promptTimeoutMs` idle-flush fallback instead).
@@ -48,7 +48,7 @@ export declare function logTelnetNegotiation(label: string, s: string): void;
48
48
  * a malformed body from a well-formed one.
49
49
  *
50
50
  * Bodies only: plain command text is reported as a byte count, never content,
51
- * because `send()` also carries typed passwords. `Char.Login.Credentials` is
52
- * redacted for the same reason.
51
+ * because `send()` also carries typed passwords. The `Char.Login` messages in
52
+ * {@link SECRET_GMCP_MODULES} are redacted for the same reason.
53
53
  */
54
54
  export declare function logOutboundBytes(s: string): void;