@link-assistant/hive-mind 1.54.0 → 1.54.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/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @link-assistant/hive-mind
2
2
 
3
+ ## 1.54.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 5f70953: fix(solve): post tool-generated PR comments again after v1.53.1 regression
8
+
9
+ `postTrackedComment()` in `src/tool-comments.lib.mjs` (added in #1626) was
10
+ passing the comment body to `gh api --input -` via `$({ input: payload })`,
11
+ but command-stream's option is `stdin`, not `input`. The misnamed key was
12
+ silently ignored, so `gh` read from the parent's stdin, sent an empty POST
13
+ body, and GitHub's edge returned `HTTP 400 "Whoa there!"`. Every tool-posted
14
+ comment — `AI Work Session Started`, log-upload link, `Ready to merge`,
15
+ `Auto-merged`, billing-limit notice, usage-limit notice — failed from this
16
+ one call path starting with v1.53.1.
17
+
18
+ Fix: use the documented `stdin` option so the JSON payload actually reaches
19
+ the child's stdin. The regression test pins the option name so a future
20
+ rename can't silently recur.
21
+
22
+ Fixes #1631.
23
+
3
24
  ## 1.54.0
4
25
 
5
26
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@link-assistant/hive-mind",
3
- "version": "1.54.0",
3
+ "version": "1.54.1",
4
4
  "description": "AI-powered issue solver and hive mind for collaborative problem solving",
5
5
  "main": "src/hive.mjs",
6
6
  "type": "module",
@@ -199,13 +199,14 @@ export const postTrackedComment = async ({ $, owner, repo, targetNumber, body })
199
199
  const apiPath = `repos/${owner}/${repo}/issues/${targetNumber}/comments`;
200
200
  const payload = JSON.stringify({ body });
201
201
 
202
- // `gh api --input -` reads from stdin. command-stream supports .stdin(...)
203
- // on the returned process handle (same API used in interactive-mode.lib.mjs
204
- // via execFileAsync). We build the invocation through $ so callers can
205
- // inject a mock.
202
+ // command-stream's options key is `stdin`, not `input` unknown keys are
203
+ // silently ignored, which previously left stdin inherited from the parent
204
+ // and caused `gh api --input -` to POST an empty body. GitHub's edge
205
+ // replied with HTTP 400 "Whoa there!" *before* the API layer ran. See
206
+ // issue #1631.
206
207
  let result;
207
208
  try {
208
- result = await $({ input: payload })`gh api ${apiPath} -X POST --input -`;
209
+ result = await $({ stdin: payload })`gh api ${apiPath} -X POST --input -`;
209
210
  } catch (err) {
210
211
  return { ok: false, commentId: null, stderr: err && err.message ? err.message : String(err) };
211
212
  }