@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.
- package/README.md +1 -1
- package/dist-lib/analytics.d.ts +27 -0
- package/dist-lib/assets/fonts/Vera.woff2 +0 -0
- package/dist-lib/assets/fonts/VeraBI.woff2 +0 -0
- package/dist-lib/assets/fonts/VeraBd.woff2 +0 -0
- package/dist-lib/assets/fonts/VeraIt.woff2 +0 -0
- package/dist-lib/assets/mapParser.worker-DrVZ3wg_.js +9 -0
- package/dist-lib/backupImport-wt8r7JXI.js +233 -0
- package/dist-lib/branding.d.ts +111 -13
- package/dist-lib/db/sqliteClient.d.ts +195 -7
- package/dist-lib/hooks/useAutoReconnect.d.ts +61 -0
- package/dist-lib/hooks/useDocumentFullscreen.d.ts +23 -0
- package/dist-lib/hooks/useKeyboardShortcuts.d.ts +37 -0
- package/dist-lib/hooks/useRecordLastPlayed.d.ts +10 -0
- package/dist-lib/import/applyMudletProfile.d.ts +35 -9
- package/dist-lib/import/backupImport.d.ts +118 -0
- package/dist-lib/import/collectProfileExport.d.ts +33 -2
- package/dist-lib/import/defaultPackages.d.ts +57 -14
- package/dist-lib/import/defaults/CF-loader/CF-loader.mpackage +0 -0
- package/dist-lib/import/defaults/MedBootstrap/MedBootstrap.mpackage +0 -0
- package/dist-lib/import/defaults/deleteOldProfiles/deleteOldProfiles.mpackage +0 -0
- package/dist-lib/import/defaults/echo/echo.mpackage +0 -0
- package/dist-lib/import/defaults/enable-accessibility/enable-accessibility.mpackage +0 -0
- package/dist-lib/import/defaults/generic_mapper/generic_mapper.mpackage +0 -0
- package/dist-lib/import/defaults/gui-drop/gui-drop.mpackage +0 -0
- package/dist-lib/import/defaults/icesus-loader/icesus-loader.mpackage +0 -0
- package/dist-lib/import/defaults/mg-loader/mg-loader.mpackage +0 -0
- package/dist-lib/import/defaults/mudlet-base-ui/mudlet-base-ui.mpackage +0 -0
- package/dist-lib/import/defaults/mudlet-mapper.xml +1215 -389
- package/dist-lib/import/mudletControlChars.d.ts +14 -0
- package/dist-lib/import/mudletHost.d.ts +73 -10
- package/dist-lib/import/mudletLink.d.ts +53 -2
- package/dist-lib/import/mudletProfileExport.d.ts +38 -5
- package/dist-lib/import/mudletProfileImport.d.ts +110 -12
- package/dist-lib/import/mudletVariables.d.ts +4 -3
- package/dist-lib/import/mudletWriteback.d.ts +15 -1
- package/dist-lib/import/mudletXmlImport.d.ts +46 -0
- package/dist-lib/import/packageFonts.d.ts +33 -0
- package/dist-lib/import/packageInstaller.d.ts +111 -7
- package/dist-lib/import/qtProfileData.d.ts +10 -0
- package/dist-lib/import/remotePackageInstall.d.ts +23 -7
- package/dist-lib/import/zipEntries.d.ts +45 -0
- package/dist-lib/index.d.ts +7 -3
- package/dist-lib/index.js +50508 -29836
- package/dist-lib/logging/SessionLogger.d.ts +75 -15
- package/dist-lib/map/MapSelectionOverlay.d.ts +2 -2
- package/dist-lib/map/MapStore.d.ts +387 -60
- package/dist-lib/map/MudletHighlightOverlay.d.ts +2 -2
- package/dist-lib/map/{MudixMapReader.d.ts → MudletMapReader.d.ts} +2 -2
- package/dist-lib/map/areaGraph.d.ts +120 -0
- package/dist-lib/map/environmentKit.d.ts +36 -0
- package/dist-lib/map/labelPixmap.d.ts +90 -0
- package/dist-lib/map/mapImageExport.d.ts +36 -2
- package/dist-lib/map/mapStyle.d.ts +11 -0
- package/dist-lib/map/mapVersion.d.ts +66 -0
- package/dist-lib/map/pathfinding.d.ts +2 -2
- package/dist-lib/mud/CharLoginController.d.ts +230 -0
- package/dist-lib/mud/ItemIdSequence.d.ts +1 -1
- package/dist-lib/mud/MudSession.d.ts +279 -22
- package/dist-lib/mud/PatternEngine.d.ts +153 -14
- package/dist-lib/mud/aliases/AliasEngine.d.ts +55 -9
- package/dist-lib/mud/autoLogin.d.ts +59 -0
- package/dist-lib/mud/commandSplit.d.ts +9 -0
- package/dist-lib/mud/connection/LineAssembler.d.ts +38 -11
- package/dist-lib/mud/connection/MudClient.d.ts +291 -53
- package/dist-lib/mud/connection/SubnegotiationRepair.d.ts +24 -0
- package/dist-lib/mud/connection/TelnetNegotiator.d.ts +208 -68
- package/dist-lib/mud/connection/telnetDebug.d.ts +8 -8
- package/dist-lib/mud/events.d.ts +102 -23
- package/dist-lib/mud/games/bundledGames.d.ts +12 -7
- package/dist-lib/mud/games/gameLinks.d.ts +40 -0
- package/dist-lib/mud/games/icons/3Kingdoms.png +0 -0
- package/dist-lib/mud/games/icons/3Scapes.png +0 -0
- package/dist-lib/mud/games/icons/achaea.png +0 -0
- package/dist-lib/mud/games/icons/aetolia.png +0 -0
- package/dist-lib/mud/games/icons/banner_astaria.png +0 -0
- package/dist-lib/mud/games/icons/banner_darkmists.png +0 -0
- package/dist-lib/mud/games/icons/banner_dreamland.png +0 -0
- package/dist-lib/mud/games/icons/banner_petria.jpg +0 -0
- package/dist-lib/mud/games/icons/banner_ropmud.png +0 -0
- package/dist-lib/mud/games/icons/blackmud.png +0 -0
- package/dist-lib/mud/games/icons/carrionfields.png +0 -0
- package/dist-lib/mud/games/icons/dragonfire_icon.png +0 -0
- package/dist-lib/mud/games/icons/fed2-logo.png +0 -0
- package/dist-lib/mud/games/icons/icesus_480x120.png +0 -0
- package/dist-lib/mud/games/icons/imperian.png +0 -0
- package/dist-lib/mud/games/icons/infinity_480x120.png +0 -0
- package/dist-lib/mud/games/icons/lusternia.png +0 -0
- package/dist-lib/mud/games/icons/morgengrauen_480x120.png +0 -0
- package/dist-lib/mud/games/icons/mudlet-tutorial.png +0 -0
- package/dist-lib/mud/games/icons/phoenixmud_480x120.png +0 -0
- package/dist-lib/mud/games/icons/starmourn.png +0 -0
- package/dist-lib/mud/games/icons/voidmud_icon.png +0 -0
- package/dist-lib/mud/games/icons/wotmudicon.png +0 -0
- package/dist-lib/mud/games/websiteLinks.d.ts +21 -0
- package/dist-lib/mud/keybindings/KeyEngine.d.ts +110 -4
- package/dist-lib/mud/keybindings/browserReservedKeys.d.ts +2 -2
- package/dist-lib/mud/keybindings/keyEventTarget.d.ts +61 -0
- package/dist-lib/mud/keybindings/qtKeys.d.ts +91 -12
- package/dist-lib/mud/protocol/atcp.d.ts +19 -0
- package/dist-lib/mud/protocol/byteString.d.ts +24 -0
- package/dist-lib/mud/protocol/charLoginFlow.d.ts +243 -16
- package/dist-lib/mud/protocol/charset.d.ts +111 -46
- package/dist-lib/mud/protocol/codePages.d.ts +10 -0
- package/dist-lib/mud/protocol/constants.d.ts +17 -10
- package/dist-lib/mud/protocol/echo.d.ts +23 -27
- package/dist-lib/mud/protocol/gmcp.d.ts +36 -6
- package/dist-lib/mud/protocol/index.d.ts +3 -2
- package/dist-lib/mud/protocol/luaLiteral.d.ts +12 -0
- package/dist-lib/mud/protocol/mccp.d.ts +83 -1
- package/dist-lib/mud/protocol/mnes.d.ts +41 -58
- package/dist-lib/mud/protocol/msdp.d.ts +11 -4
- package/dist-lib/mud/protocol/msp.d.ts +3 -2
- package/dist-lib/mud/protocol/mssp.d.ts +9 -4
- package/dist-lib/mud/protocol/multiByte.d.ts +51 -0
- package/dist-lib/mud/protocol/multiByteEncode.d.ts +42 -0
- package/dist-lib/mud/protocol/mxp.d.ts +193 -14
- package/dist-lib/mud/protocol/oauthClientFlow.d.ts +128 -0
- package/dist-lib/mud/protocol/qtCodePages.generated.d.ts +1 -0
- package/dist-lib/mud/protocol/tlsCodes.d.ts +40 -3
- package/dist-lib/mud/replay/ReplayPlayer.d.ts +16 -1
- package/dist-lib/mud/replay/replayFormat.d.ts +29 -2
- package/dist-lib/mud/text/Console.d.ts +255 -49
- package/dist-lib/mud/text/FormatState.d.ts +137 -14
- package/dist-lib/mud/text/ansiEscapes.d.ts +32 -16
- package/dist-lib/mud/text/colorParsers.d.ts +14 -2
- package/dist-lib/mud/text/colorSpaceId.d.ts +2 -0
- package/dist-lib/mud/text/colors.d.ts +17 -10
- package/dist-lib/mud/text/controlCharacterMode.d.ts +1 -1
- package/dist-lib/mud/text/hyperlinkVisibility.d.ts +1 -1
- package/dist-lib/mud/text/lineBreak.d.ts +5 -0
- package/dist-lib/mud/text/serverWrap.d.ts +2 -2
- package/dist-lib/mud/text/textAnalyzer.d.ts +79 -0
- package/dist-lib/mud/text/unicodeRuns.d.ts +11 -0
- package/dist-lib/mud/text/unicodeTables.generated.d.ts +3 -0
- package/dist-lib/mud/text/wcwidth.d.ts +27 -22
- package/dist-lib/mud/timers/TimerEngine.d.ts +163 -11
- package/dist-lib/mud/timers/workerClock.d.ts +67 -0
- package/dist-lib/mud/triggers/TriggerEngine.d.ts +449 -47
- package/dist-lib/mud/triggers/legacyColorPatterns.d.ts +58 -0
- package/dist-lib/mud/triggers/pcre/Pcre2.d.ts +83 -1
- package/dist-lib/oauth-callback.html +94 -0
- package/dist-lib/pcre2Wasm.d.ts +54 -0
- package/dist-lib/pcre2Wasm.js +241 -0
- package/dist-lib/scripting/EngineHost.d.ts +45 -21
- package/dist-lib/scripting/IScriptingRuntime.d.ts +103 -27
- package/dist-lib/scripting/MxpFrameManager.d.ts +10 -1
- package/dist-lib/scripting/ScriptingAPI.d.ts +1030 -213
- package/dist-lib/scripting/ScriptingEngine.d.ts +727 -106
- package/dist-lib/scripting/StopwatchManager.d.ts +97 -36
- package/dist-lib/scripting/http/HttpService.d.ts +9 -1
- package/dist-lib/scripting/http/userUrl.d.ts +41 -0
- package/dist-lib/scripting/lua/LuaRuntime.d.ts +352 -77
- package/dist-lib/scripting/lua/argContracts.d.ts +71 -0
- package/dist-lib/scripting/lua/bindings/automation.d.ts +1 -1
- package/dist-lib/scripting/lua/bindings/commands.d.ts +13 -0
- package/dist-lib/scripting/lua/bindings/context.d.ts +20 -2
- package/dist-lib/scripting/lua/bindings/diagnostics.d.ts +1 -1
- package/dist-lib/scripting/lua/bindings/map.d.ts +1 -1
- package/dist-lib/scripting/lua/bindings/media.d.ts +2 -2
- package/dist-lib/scripting/lua/bindings/output.d.ts +1 -1
- package/dist-lib/scripting/lua/bindings/session.d.ts +2 -2
- package/dist-lib/scripting/lua/bindings/textEdit.d.ts +1 -1
- package/dist-lib/scripting/lua/bindings/userWindows.d.ts +1 -1
- package/dist-lib/scripting/lua/byteArmor.d.ts +36 -0
- package/dist-lib/scripting/lua/imageSize.d.ts +7 -0
- package/dist-lib/scripting/lua/rex.d.ts +4 -2
- package/dist-lib/scripting/lua/sqlRowEncoder.d.ts +6 -1
- package/dist-lib/scripting/lua/utf8CaseMap.d.ts +1 -0
- package/dist-lib/scripting/lua/utf8Patterns.d.ts +21 -1
- package/dist-lib/scripting/lua/wellFormedStrings.d.ts +40 -0
- package/dist-lib/scripting/lua/yajl.d.ts +43 -5
- package/dist-lib/scripting/profilesPresence.d.ts +20 -2
- package/dist-lib/scripting/vfs/ProfileVFS.d.ts +164 -10
- package/dist-lib/scripting/vfs/fsErrors.d.ts +28 -0
- package/dist-lib/scripting/vfs/idbCommit.d.ts +20 -0
- package/dist-lib/storage/appStore.d.ts +24 -9
- package/dist-lib/storage/hooks.d.ts +5 -1
- package/dist-lib/storage/index.d.ts +2 -2
- package/dist-lib/storage/mapStorage.d.ts +2 -0
- package/dist-lib/storage/persistentStorage.d.ts +3 -1
- package/dist-lib/storage/profileStorage.d.ts +15 -0
- package/dist-lib/storage/profileVfsData.d.ts +3 -3
- package/dist-lib/storage/schema.d.ts +512 -40
- package/dist-lib/storage/storageMigration.d.ts +82 -0
- package/dist-lib/storage-g5V1b-c1.js +2039 -0
- package/dist-lib/styles.css +1 -1
- package/dist-lib/ui/AboutModal.d.ts +1 -1
- package/dist-lib/ui/BrandLoginFields.d.ts +1 -1
- package/dist-lib/ui/BrowserSignInModal.d.ts +23 -0
- package/dist-lib/ui/CmdLineMenuRegistry.d.ts +14 -5
- package/dist-lib/ui/CommandBar.d.ts +8 -8
- package/dist-lib/ui/ConnectionFormModal.d.ts +20 -1
- package/dist-lib/ui/ConnectionScreen.d.ts +9 -1
- package/dist-lib/ui/GameLinkPrompt.d.ts +28 -0
- package/dist-lib/ui/HelpModal.d.ts +5 -1
- package/dist-lib/ui/MapSymbolUsageModal.d.ts +32 -0
- package/dist-lib/ui/MouseEventRegistry.d.ts +31 -4
- package/dist-lib/ui/NotepadModal.d.ts +22 -0
- package/dist-lib/ui/ResizableModal.d.ts +16 -1
- package/dist-lib/ui/SettingsModal.d.ts +10 -1
- package/dist-lib/ui/TlsAlertBanner.d.ts +3 -1
- package/dist-lib/ui/Toolbar.d.ts +22 -1
- package/dist-lib/ui/VaultManageButton.d.ts +10 -5
- package/dist-lib/ui/VaultModal.d.ts +3 -0
- package/dist-lib/ui/buttons/ButtonsBar.d.ts +3 -1
- package/dist-lib/ui/buttons/inactiveButtons.d.ts +25 -0
- package/dist-lib/ui/cmdline/CommandLineManager.d.ts +19 -0
- package/dist-lib/ui/cmdline/plainText.d.ts +16 -0
- package/dist-lib/ui/cmdline/subCommandLine.d.ts +78 -0
- package/dist-lib/ui/cmdline/useCmdLineSelection.d.ts +26 -0
- package/dist-lib/ui/cmdline/useSubCommandLineKeys.d.ts +33 -0
- package/dist-lib/ui/codemirror/lineParagraphMarks.d.ts +19 -0
- package/dist-lib/ui/codemirror/luaHover.d.ts +7 -0
- package/dist-lib/ui/codemirror/options.d.ts +33 -0
- package/dist-lib/ui/codemirror/theme.d.ts +29 -5
- package/dist-lib/ui/commands/addonCommands.d.ts +134 -0
- package/dist-lib/ui/commands/appShortcuts.d.ts +86 -0
- package/dist-lib/ui/commands/hostCommands.d.ts +88 -0
- package/dist-lib/ui/commands/keyMatch.d.ts +20 -0
- package/dist-lib/ui/commands/keySequence.d.ts +57 -0
- package/dist-lib/ui/components/ContextMenu.d.ts +21 -1
- package/dist-lib/ui/components/FontPicker.d.ts +5 -1
- package/dist-lib/ui/components/useModalFocus.d.ts +13 -1
- package/dist-lib/ui/helpTopics.d.ts +15 -0
- package/dist-lib/ui/labels/LabelManager.d.ts +172 -9
- package/dist-lib/ui/labels/LabelOverlay.d.ts +19 -0
- package/dist-lib/ui/labels/backgroundImageSize.d.ts +19 -0
- package/dist-lib/ui/labels/labelModel.d.ts +64 -0
- package/dist-lib/ui/labels/qColor.d.ts +13 -0
- package/dist-lib/ui/labels/qtCss.d.ts +12 -4
- package/dist-lib/ui/landmarks.d.ts +9 -0
- package/dist-lib/ui/launcher/ActionMenu.d.ts +19 -0
- package/dist-lib/ui/launcher/GameDetails.d.ts +21 -0
- package/dist-lib/ui/launcher/GameSection.d.ts +18 -0
- package/dist-lib/ui/launcher/LauncherSearch.d.ts +23 -0
- package/dist-lib/ui/launcher/ProfileArt.d.ts +20 -0
- package/dist-lib/ui/launcher/ProfileSection.d.ts +43 -0
- package/dist-lib/ui/launcher/launcherModel.d.ts +72 -0
- package/dist-lib/ui/layout/overlayLayerOrder.d.ts +2 -2
- package/dist-lib/ui/menu/MenuBar.d.ts +31 -0
- package/dist-lib/ui/menu/SplitButton.d.ts +39 -0
- package/dist-lib/ui/menu/anchoredPopup.d.ts +74 -0
- package/dist-lib/ui/menu/appMenus.d.ts +65 -0
- package/dist-lib/ui/menu/menuModel.d.ts +88 -0
- package/dist-lib/ui/menu/toolbarModel.d.ts +56 -0
- package/dist-lib/ui/notepad.d.ts +76 -0
- package/dist-lib/ui/openSignInPage.d.ts +14 -0
- package/dist-lib/ui/output/OutputContextMenu.d.ts +14 -1
- package/dist-lib/ui/output/OutputRenderer.d.ts +5 -0
- package/dist-lib/ui/output/OutputSearchBar.d.ts +5 -1
- package/dist-lib/ui/output/StickyOutputPanel.d.ts +17 -3
- package/dist-lib/ui/output/TextAnalyzerModal.d.ts +25 -0
- package/dist-lib/ui/output/caretMode.d.ts +3 -2
- package/dist-lib/ui/output/clearSplit.d.ts +11 -0
- package/dist-lib/ui/output/outputCopy.d.ts +41 -2
- package/dist-lib/ui/output/outputRows.d.ts +43 -0
- package/dist-lib/ui/output/selectionGesture.d.ts +35 -0
- package/dist-lib/ui/output/wordSelection.d.ts +33 -0
- package/dist-lib/ui/search/matcher.d.ts +14 -4
- package/dist-lib/ui/settings/SettingsShell.d.ts +91 -0
- package/dist-lib/ui/settings/ShortcutEditor.d.ts +13 -0
- package/dist-lib/ui/sound/SoundManager.d.ts +210 -44
- package/dist-lib/ui/sound/closedCaption.d.ts +4 -1
- package/dist-lib/ui/sound/mediaDirection.d.ts +35 -0
- package/dist-lib/ui/tabCompletion.d.ts +53 -0
- package/dist-lib/ui/textedit/TextEditManager.d.ts +11 -2
- package/dist-lib/ui/useOpenProfiles.d.ts +1 -1
- package/dist-lib/ui/video/VideoManager.d.ts +7 -0
- package/dist-lib/ui/windows/WindowManager.d.ts +452 -37
- package/dist-lib/ui/windows/panels/ScriptEditorPanel.d.ts +14 -0
- package/dist-lib/ui/windows/panels/ScriptSearch.d.ts +6 -1
- package/dist-lib/ui/windows/panels/TextPanel.d.ts +4 -1
- package/dist-lib/ui/windows/panels/VariablesView.d.ts +37 -7
- package/dist-lib/ui/windows/panels/WindowCmdLine.d.ts +4 -2
- package/dist-lib/ui/windows/panels/aliasLoop.d.ts +24 -0
- package/dist-lib/ui/windows/panels/editorClipboard.d.ts +45 -0
- package/dist-lib/ui/windows/panels/editorUndo.d.ts +79 -0
- package/dist-lib/ui/windows/panels/mapAreaChange.d.ts +10 -0
- package/dist-lib/utils/appShellCache.d.ts +25 -0
- package/dist-lib/utils/fontFamilyName.d.ts +13 -0
- package/dist-lib/utils/fontLoader.d.ts +31 -0
- package/dist-lib/utils/formatBytes.d.ts +4 -0
- package/dist-lib/utils/mustBeOneOf.d.ts +9 -0
- package/dist-lib/utils/profileLock.d.ts +1 -1
- package/dist-lib/utils/systemTheme.d.ts +24 -0
- package/dist-lib/utils/timeZone.d.ts +10 -0
- package/dist-lib/vault/CredentialVault.d.ts +51 -5
- package/dist-lib/vault/deviceUnlock.d.ts +47 -0
- package/dist-lib/vault/vaultAccess.d.ts +24 -2
- package/dist-lib/vault/vaultHelpTopic.d.ts +9 -0
- package/dist-lib/vault/vaultRecord.d.ts +33 -1
- package/dist-lib/vfs-sw.js +220 -11
- package/dist-lib/vite.d.ts +1 -1
- package/dist-lib/vite.js +66 -43
- package/package.json +23 -15
- package/dist-lib/assets/mapParser.worker-t-3rd1zR.js +0 -9
- package/dist-lib/mud/connection/PingTracker.d.ts +0 -41
- package/dist-lib/ui/BundledGameGrid.d.ts +0 -21
- package/dist-lib/ui/ConnectionGrid.d.ts +0 -21
- 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
|
|
50
|
-
*
|
|
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
|
|
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
|
|
99
|
-
* through client name (0), terminal type
|
|
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()
|
|
130
|
-
*
|
|
131
|
-
*
|
|
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).
|
|
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
|
|
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,
|
|
173
|
-
*
|
|
174
|
-
*
|
|
175
|
-
*
|
|
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
|
-
/**
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
*
|
|
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
|
-
/**
|
|
191
|
-
*
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
*
|
|
195
|
-
*
|
|
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`,
|
|
200
|
-
*
|
|
201
|
-
*
|
|
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
|
|
209
|
-
*
|
|
210
|
-
*
|
|
211
|
-
* plain NEW-ENVIRON
|
|
212
|
-
*
|
|
213
|
-
*
|
|
214
|
-
*
|
|
215
|
-
* off for this profile or on a
|
|
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
|
|
219
|
-
*
|
|
220
|
-
*
|
|
221
|
-
*
|
|
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
|
|
224
|
-
*
|
|
225
|
-
*
|
|
226
|
-
*
|
|
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
|
-
/**
|
|
229
|
-
*
|
|
230
|
-
*
|
|
231
|
-
*
|
|
232
|
-
|
|
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('
|
|
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
|
-
* `
|
|
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
|
-
* `
|
|
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
|
-
* `
|
|
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
|
-
* `
|
|
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
|
-
* `
|
|
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
|
|
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;
|