@link-assistant/hive-mind 1.54.8 → 1.56.0

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,24 @@
1
1
  # @link-assistant/hive-mind
2
2
 
3
+ ## 1.56.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 391dbde: Add `hive-screens` bin command. Converts the `hive-screens.sh` script that was
8
+ embedded in README.md into a real JavaScript command shipped with the package.
9
+ Supports `--list` (safe preview), `--enter` (attach), and `--close` (terminate)
10
+ across detached GNU screen sessions that completed a mergeable solve run.
11
+ `--list`, `--enter`, and `--close` share the same matching predicate, so any
12
+ session visible under `--list` is guaranteed to be actionable by the other
13
+ flags. Selection flags `--oldest` (default), `--newest`, and `--all` are
14
+ preserved from the legacy script. Closes #1649.
15
+
16
+ ## 1.55.0
17
+
18
+ ### Minor Changes
19
+
20
+ - d696423: Add experimental bidirectional interactive mode (issue #817). Introduces three composable opt-in flags for `solve` (auto-forwarded to `hive`): `--accept-incomming-comments-as-input` (feed new PR/issue comments into Claude as stream-json input, excluding solve's own system comments), `--exclude-all-own-incomming-comments-from-input` (also skip comments authored by the same GitHub user that solve runs as), and `--bidirectional-interactive-mode` (composite convenience flag that enables `--interactive-mode` plus the two flags above). All flags default off and only take effect with `--tool claude`.
21
+
3
22
  ## 1.54.8
4
23
 
5
24
  ### Patch Changes
package/README.md CHANGED
@@ -818,124 +818,34 @@ s=$(screen -ls | awk '/Detached/ {last=$1} END{print last}'); echo "Entering $s"
818
818
 
819
819
  ### Script for managing screens
820
820
 
821
- ```bash
822
- cat <<'EOF' > hive-screens.sh
823
- #!/usr/bin/env bash
824
-
825
- enter=false
826
- close=false
827
- oldest=false
828
- newest=false
829
- all=false
830
-
831
- # --- parse args ---
832
- for arg in "$@"; do
833
- case "$arg" in
834
- --enter) enter=true ;;
835
- --close) close=true ;;
836
- --oldest) oldest=true ;;
837
- --newest) newest=true ;;
838
- --all) all=true ;;
839
- *)
840
- echo "Unknown option: $arg"
841
- exit 1
842
- ;;
843
- esac
844
- done
845
-
846
- # --- validate ---
847
- if ! $enter && ! $close; then
848
- echo "Must specify --enter or --close"
849
- exit 1
850
- fi
851
-
852
- # --- default ---
853
- if ! $oldest && ! $newest && ! $all; then
854
- oldest=true
855
- fi
856
-
857
- matches=()
858
-
859
- # --- sorting ---
860
- if $newest; then
861
- sorter="sort -nr"
862
- else
863
- sorter="sort -n"
864
- fi
865
-
866
- # --- scan sessions ---
867
- while read -r sess; do
868
- tmp=$(mktemp)
869
- clean=$(mktemp)
870
-
871
- # FIX: better capture
872
- screen -S "$sess" -X scrollback 200000 2>/dev/null
873
- sleep 0.15
874
- screen -S "$sess" -X hardcopy -h "$tmp" 2>/dev/null
875
-
876
- # strip garbage / non-printable chars
877
- tr -cd '\11\12\15\40-\176' < "$tmp" > "$clean"
878
-
879
- if grep -qi 'process completed' "$clean" &&
880
- grep -qiE 'pr is mergeable!|pr merged!' "$clean"; then
881
-
882
- log_path=$(tac "$clean" | grep -m1 -i 'full log file:' \
883
- | sed 's/.*Full log file:[[:space:]]*//')
884
-
885
- issue=$(tac "$clean" | grep -m1 -i 'Issue:[[:space:]]*https://github\.com/' \
886
- | sed 's/Issue:[[:space:]]*//')
887
-
888
- matches+=("$sess|$log_path|$issue")
889
- fi
890
-
891
- rm -f "$tmp" "$clean"
892
- done < <(screen -ls | awk '/Detached/ {print $1}' | $sorter)
893
-
894
- # --- no matches ---
895
- if [ ${#matches[@]} -eq 0 ]; then
896
- echo "No matching sessions"
897
- exit 0
898
- fi
899
-
900
- process_one() {
901
- IFS="|" read -r sess log issue <<< "$1"
902
-
903
- echo "Session: $sess"
904
-
905
- if $enter; then
906
- echo "Entering $sess"
907
- screen -r "$sess"
908
- echo "Left $sess"
909
- fi
821
+ The legacy `hive-screens.sh` script has been promoted to a first-class command:
822
+ `hive-screens`. It ships with `@link-assistant/hive-mind`, so once the package is
823
+ installed (globally, through `npx`, or in a project) it is available on `PATH`.
910
824
 
911
- [ -n "$log" ] && echo "Log: $log" || echo "Log: (not found)"
912
- [ -n "$issue" ] && echo "Issue: $issue" || echo "Issue: (not found)"
825
+ It scans detached GNU screen sessions, looks for solve runs that are done and
826
+ mergeable (scrollback contains both `process completed` and `PR is mergeable!`
827
+ or `PR merged!`), and then either lists, enters, or closes them. `--list`,
828
+ `--enter`, and `--close` share the **same matching predicate**, so anything
829
+ you see under `--list` is guaranteed to be the same set `--close` will act on
830
+ — use `--list` first to debug, then rerun with `--close`.
913
831
 
914
- if $close; then
915
- echo "Closing $sess"
916
- screen -S "$sess" -X stuff $'exit\n'
917
- fi
918
-
919
- echo "-----------------------------------"
920
- }
832
+ ```bash
833
+ # Safe preview — show every finished, mergeable solve session.
834
+ hive-screens --list --all
921
835
 
922
- # --- execution ---
923
- if $all; then
924
- for m in "${matches[@]}"; do
925
- process_one "$m"
926
- done
927
- elif $oldest; then
928
- process_one "${matches[0]}"
929
- elif $newest; then
930
- last_index=$((${#matches[@]} - 1))
931
- process_one "${matches[$last_index]}"
932
- fi
836
+ # Close the oldest finished session (same as the legacy script's default).
837
+ hive-screens --close
933
838
 
934
- EOF
839
+ # Attach to the newest finished session.
840
+ hive-screens --enter --newest
935
841
 
936
- chmod +x hive-screens.sh
842
+ # Close every finished session.
843
+ hive-screens --close --all
937
844
  ```
938
845
 
846
+ Selection defaults to `--oldest`. Supply `--newest` or `--all` to change it.
847
+ Run `hive-screens --help` for the full option list.
848
+
939
849
  ### Reboot server.
940
850
 
941
851
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@link-assistant/hive-mind",
3
- "version": "1.54.8",
3
+ "version": "1.56.0",
4
4
  "description": "AI-powered issue solver and hive mind for collaborative problem solving",
5
5
  "main": "src/hive.mjs",
6
6
  "type": "module",
@@ -11,10 +11,11 @@
11
11
  "review": "./src/review.mjs",
12
12
  "configure-claude": "./src/configure-claude.mjs",
13
13
  "start-screen": "./src/start-screen.mjs",
14
+ "hive-screens": "./src/hive-screens.mjs",
14
15
  "hive-telegram-bot": "./src/telegram-bot.mjs"
15
16
  },
16
17
  "scripts": {
17
- "test": "node tests/solve-queue.test.mjs && node tests/limits-display.test.mjs && node tests/test-usage-limit.mjs && node tests/test-codex-support.mjs && node tests/test-build-cost-info-string.mjs && node tests/test-claude-code-install-method.mjs && node tests/test-claude-quiet-config.mjs && node tests/test-configure-claude-bin.mjs && node tests/test-docker-release-order.mjs && node tests/test-docker-box-migration.mjs && node tests/test-issue-1616-pr-issue-link-preservation.mjs && node tests/test-pre-pr-failure-notifier-1640.mjs && node tests/test-ready-to-merge-pagination-1645.mjs && node tests/test-require-gh-paginate-rule.mjs && node tests/test-telegram-message-filters.mjs && node tests/test-telegram-bot-command-aliases.mjs && node tests/test-solve-queue-command.mjs && node tests/test-queue-display-1267.mjs && node tests/test-telegram-bot-launcher.mjs",
18
+ "test": "node tests/solve-queue.test.mjs && node tests/limits-display.test.mjs && node tests/test-usage-limit.mjs && node tests/test-codex-support.mjs && node tests/test-build-cost-info-string.mjs && node tests/test-claude-code-install-method.mjs && node tests/test-claude-quiet-config.mjs && node tests/test-configure-claude-bin.mjs && node tests/test-docker-release-order.mjs && node tests/test-docker-box-migration.mjs && node tests/test-hive-screens.mjs && node tests/test-issue-1616-pr-issue-link-preservation.mjs && node tests/test-pre-pr-failure-notifier-1640.mjs && node tests/test-ready-to-merge-pagination-1645.mjs && node tests/test-require-gh-paginate-rule.mjs && node tests/test-telegram-message-filters.mjs && node tests/test-telegram-bot-command-aliases.mjs && node tests/test-solve-queue-command.mjs && node tests/test-queue-display-1267.mjs && node tests/test-telegram-bot-launcher.mjs",
18
19
  "test:queue": "node tests/solve-queue.test.mjs",
19
20
  "test:limits-display": "node tests/limits-display.test.mjs",
20
21
  "test:usage-limit": "node tests/test-usage-limit.mjs",
@@ -26,7 +27,7 @@
26
27
  "changeset": "changeset",
27
28
  "changeset:version": "changeset version",
28
29
  "changeset:publish": "npm run build:pre && changeset publish",
29
- "build:pre": "chmod +x src/hive.mjs && chmod +x src/solve.mjs && chmod +x src/configure-claude.mjs",
30
+ "build:pre": "chmod +x src/hive.mjs && chmod +x src/solve.mjs && chmod +x src/configure-claude.mjs && chmod +x src/hive-screens.mjs",
30
31
  "prepare": "husky"
31
32
  },
32
33
  "repository": {