@profoundry-us/highball 0.3.1 → 0.3.2

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/bin/highball.js CHANGED
File without changes
package/lib/run.js CHANGED
@@ -137,11 +137,25 @@ export async function run(args) {
137
137
  // friends); that id groups this run with the rest of the agent's session
138
138
  // on the dashboard. A TTY means a human at a terminal — don't block on
139
139
  // read.
140
+ //
141
+ // The deadline matters: a non-TTY stdin that nobody writes to and nobody
142
+ // closes (a pipeline, a task runner, a CI step) would otherwise hang the
143
+ // runner forever waiting for EOF. Hooks write their payload immediately,
144
+ // so a short wait costs nothing and turns an indefinite hang into a run
145
+ // with no session context.
146
+ const HOOK_STDIN_DEADLINE_MS = 400;
147
+
140
148
  async function readHookPayload() {
141
149
  if (process.stdin.isTTY) return {};
142
150
  try {
143
- let text = "";
144
- for await (const chunk of process.stdin) text += chunk;
151
+ const text = await Promise.race([
152
+ (async () => {
153
+ let buffered = "";
154
+ for await (const chunk of process.stdin) buffered += chunk;
155
+ return buffered;
156
+ })(),
157
+ new Promise((resolve) => setTimeout(() => resolve(""), HOOK_STDIN_DEADLINE_MS))
158
+ ]);
145
159
  return JSON.parse(text);
146
160
  } catch {
147
161
  return {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@profoundry-us/highball",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Highball runner — local CI for AI coding agents: runs a repo's .highball/checks.yml rules, blocks the agent on failure, and reports runs to a Highball dashboard.",
5
5
  "keywords": [
6
6
  "ai",