Repository navigation
0.9.112
The Muse plugin now declares two SessionStart hooks, so Muse on Windows gets the mandate and the sheet's usable role lines when the harness PATH has no sh. session-start runs the shared shell script, and session-start-windows runs hooks/session-start.ps1 muse. Muse's native hook schema takes one command per hook and rejects a per-OS variant such as commandWindows, so each hook stands down on the OS the other owns. On a machine without one of the two programs, that hook records a failed spawn at session start and the other delivers the context. @LuckyProtein found and fixed this in #332.
session-start.ps1 takes the runtime name, as session-start.sh does, and serves Codex and Muse through one sheet decoder. The decoder now drops one leading byte-order mark, as the shell reader and Pi do, and the script compares sheet text ordinally, as the shell hook compares bytes. PowerShell's -ccontains compares by culture, and under ICU globalization, as in pwsh 7, it skips zero-width characters. A session hook: off line after a second byte-order mark or a zero-width space used to turn off only the Codex Windows hook; every hook now keeps it on.
Verified. tests/session-hook-sheets.mjs adds roleCases, 35 sheets with the role lines each one adds, and the shell and PowerShell Muse suites both run them. tests/session-hook-windows.test.mjs runs the PowerShell hook under PSTACK_REQUIRE_WINDOWS_HOOK=1 with only the PowerShell directory on PATH, over sheetCases, roleCases, the XDG and USERPROFILE sheet paths, and the Linux stand-down. tests/session-hook.test.mjs covers the shell script standing down under a Windows uname. On PowerShell 7.6.9, under both ICU and invariant globalization, session-start.ps1 prints the same bytes as session-start.sh for both runtimes on 59 sheets.