#11 Enable Windows
main with: (AI generated)
What I Found (empirical)
| Test | Result |
|---|---|
| Session via extension (relay + node-pty) | TUSTEP starts, then Error in TXTWIN from function sb: Das handle ist ungültig |
tustep.exe with piped stdin | Popup: „kein Konsolenfenster gefunden“ — TUSTEP demands a real console |
Start via winpty | winpty assertion in winpty.cc:924 (no size without a tty) |
-s in a real console window (Start-Process) | Window opens, process dies instantly, popup |
Installer shortcut / .tsd file association | tustep.exe /e / tustep.exe /s "%1" — slash switches |
Three concrete bugs to fix
-
Wrong switch syntax on Windows (
relay.ts): extension passes-s; Windows TUSTEP expects/s(proven by the installer’s own registry entry). Make it platform-dependent. -
TSD file line endings (
session.ts): written with LF (join('\n')); write CRLF on Windows. Also: the generated file hasTUSTEP_PRJ=empty even though the default is'vscode'— normalize the project value before validating and writing. -
No working directory for TUSTEP (
relay.ts,spawn(...)): addcwd: dirname(startProgram)sotustep.iniis found.
Remaining open question
Whether TUSTEP’s TXTWIN works under ConPTY at all (your “handle ist ungültig” suggests it might not). First test the fixes above in a plain cmd window:
cd "C:\Program Files (x86)\tustep"
tustep.exe /s D:\Daten_LG\Documents\tustep-vscode\.tustep-vscode\tustep.txt
If the dialog runs there but not in VS Code, the fallback is spawning TUSTEP in a real console via conhost.exe instead of the relay.
Sideshow
npm scripts are POSIX-only (rm -rf, GNU find/chmod in postinstall) — they break Windows builds/packaging. Irrelevant to the runtime bug, but worth fixing for Windows development.
(AI generated)
Update: sources checked
The manuals and the C sources shipped with the installation
(tustep/source-code/win/) settle most open questions.
Confirmed by source:
-sis invalid — parser only accepts/s,/e,/d,/.tsd,/.tf(start.c:451ff). Bug #1 confirmed.- “kein Konsolenfenster gefunden” =
AllocConsole()+SetConsoleActiveScreenBufferfailing on piped stdout (start.c:165–171). - The VS Code relay error is exactly
SetConsoleActiveScreenBufferon a non-console stdout:ERROR_INVALID_HANDLE(txtwin.c:113), reached only in dialog mode — whichstart.c:539always forces (TUSTEP_MDS=DIALOG, the precedingGetEnvironmentVariableis commented out). - But: TSD lines become env vars after that (
start.c:585ff), soTUSTEP_MDS=BATCHin the TSD would skip TXTWIN entirely — an option for one-shot task runs, not for the interactive relay. - TSD parser strips CR and LF (
start.c:610ff) → CRLF fix is defensive only. start.cchecks theDelegationConsoleregistry key (default terminal must be conhost) on every start.
Still to check (needs Windows):
- Decisive:
tustep.exe /s <generated .tsd>in a plain cmd window — does the dialog run there? - Same via the fixed extension — does TXTWIN work under ConPTY? (Expected: no.)
- One-shot run with
TUSTEP_MDS=BATCHadded to the TSD.
Plan: fix the three bugs + tests (npm test gate) → retest on Windows →
if ConPTY still fails, spawn via conhost.exe in the relay → cross-platform
npm scripts → document in docs/tustep-session-integration.md, verify a
packaged .vsix.