snow-flow 10.0.116 → 10.0.118

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
- "version": "10.0.116",
3
+ "version": "10.0.118",
4
4
  "name": "snow-flow",
5
5
  "description": "Snow-Flow - ServiceNow Multi-Agent Development Framework powered by AI",
6
6
  "license": "Elastic-2.0",
@@ -118,6 +118,17 @@ export function tui(input: {
118
118
  const skipThemeDetection = !!process.env.OPENCODE_SKIP_THEME_DETECTION || !!process.env.OPENCODE_REMOTE_TUI
119
119
  // promise to prevent immediate exit
120
120
  return new Promise<void>(async (resolve) => {
121
+ // Crash handlers for debugging PTY rendering issues
122
+ process.on("uncaughtException", (err) => {
123
+ console.error("[snow-flow] UNCAUGHT:", err.message, err.stack)
124
+ })
125
+ process.on("unhandledRejection", (err) => {
126
+ console.error("[snow-flow] UNHANDLED:", err)
127
+ })
128
+ process.on("exit", (code) => {
129
+ if (code !== 0) console.error("[snow-flow] EXIT code:", code)
130
+ })
131
+
121
132
  let mode: "dark" | "light" = "dark"
122
133
  if (skipThemeDetection) {
123
134
  console.log("[snow-flow] skipping theme detection")
@@ -131,10 +142,25 @@ export function tui(input: {
131
142
  resolve()
132
143
  }
133
144
 
145
+ console.log("[snow-flow] env: OTUI_USE_ALTERNATE_SCREEN=" + (process.env.OTUI_USE_ALTERNATE_SCREEN ?? "unset"))
146
+ // Test: can this PTY display ANSI at all?
147
+ process.stdout.write("\x1b[32m[snow-flow] ANSI test: this should be green\x1b[0m\n")
148
+ console.log("[snow-flow] stdout.isTTY=" + process.stdout.isTTY + " stdin.isTTY=" + process.stdin.isTTY)
149
+ console.log("[snow-flow] stdout.columns=" + process.stdout.columns + " stdout.rows=" + process.stdout.rows)
150
+
151
+ // Timeout watchdog: if render doesn't produce output in 10s, log it
152
+ const watchdog = setTimeout(() => {
153
+ console.error("[snow-flow] WATCHDOG: render() has been running for 10s without visible output")
154
+ console.error("[snow-flow] This suggests the Zig renderer is stuck or not writing to stdout")
155
+ }, 10_000)
156
+
134
157
  try {
135
- console.log("[snow-flow] starting tui...")
158
+ console.log("[snow-flow] calling render()...")
136
159
  await render(
137
160
  () => {
161
+ // This callback is invoked when the renderer is ready to build the component tree
162
+ console.error("[snow-flow] render callback invoked - component tree building")
163
+ clearTimeout(watchdog)
138
164
  return (
139
165
  <ErrorBoundary
140
166
  fallback={(error, reset) => <ErrorComponent error={error} reset={reset} onExit={onExit} mode={mode} />}
package/src/pty/index.ts CHANGED
@@ -115,6 +115,7 @@ export namespace Pty {
115
115
  extraEnv = {
116
116
  OPENCODE_SKIP_THEME_DETECTION: "1",
117
117
  OPENCODE_DISABLE_KITTY_KEYBOARD: "1",
118
+ OTUI_USE_ALTERNATE_SCREEN: "0",
118
119
  COLORTERM: "truecolor",
119
120
  FORCE_COLOR: "3",
120
121
  }
@@ -56,6 +56,7 @@ async function spawnTui(cols: number, rows: number, env?: Record<string, string>
56
56
  FORCE_COLOR: "3",
57
57
  OPENCODE_SKIP_THEME_DETECTION: "1",
58
58
  OPENCODE_DISABLE_KITTY_KEYBOARD: "1",
59
+ OTUI_USE_ALTERNATE_SCREEN: "0",
59
60
  },
60
61
  },
61
62
  )