@humanu/orchestra 0.5.76 → 0.5.78

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.
Files changed (84) hide show
  1. package/bin/{gw.js → orchestra-cli.js} +1 -1
  2. package/bin/orchestra.js +2 -2
  3. package/install.js +41 -42
  4. package/package.json +2 -3
  5. package/resources/api/git.sh +4 -444
  6. package/resources/api/tmux.sh +4 -2791
  7. package/resources/prebuilt/linux-x64/{gw-env-copy → env-copy} +0 -0
  8. package/resources/prebuilt/linux-x64/orchestra +0 -0
  9. package/resources/prebuilt/macos-arm64/{gw-env-copy → env-copy} +0 -0
  10. package/resources/prebuilt/macos-arm64/orchestra +0 -0
  11. package/resources/prebuilt/macos-intel/{gw-env-copy → env-copy} +0 -0
  12. package/resources/prebuilt/macos-intel/orchestra +0 -0
  13. package/resources/scripts/{gw.sh → orchestra-cli.sh} +14 -14
  14. package/resources/scripts/orchestra-local.sh +6 -6
  15. package/resources/scripts/{gwr.sh → orchestra.sh} +11 -55
  16. package/resources/scripts/{shell/bridge → server/services}/ai.sh +4 -4
  17. package/resources/scripts/{gw-bridge.sh → server/services/dispatch.sh} +62 -59
  18. package/resources/scripts/server/services/git/api.sh +447 -0
  19. package/resources/scripts/{shell/git/bridge_check_branch.sh → server/services/git/check_branch_api.sh} +1 -1
  20. package/resources/scripts/{shell/git/bridge_create_worktree.sh → server/services/git/create_worktree_api.sh} +3 -3
  21. package/resources/scripts/{shell/git/bridge_create_worktree_from_existing.sh → server/services/git/create_worktree_from_existing_api.sh} +2 -2
  22. package/resources/scripts/{shell/git/bridge_create_worktree_from_remote.sh → server/services/git/create_worktree_from_remote_api.sh} +2 -2
  23. package/resources/scripts/{shell/git/bridge_delete_branch_only.sh → server/services/git/delete_branch_only_api.sh} +1 -1
  24. package/resources/scripts/{shell/git/bridge_delete_worktree.sh → server/services/git/delete_worktree_api.sh} +2 -2
  25. package/resources/scripts/{shell/git/bridge_delete_worktree_only.sh → server/services/git/delete_worktree_only_api.sh} +1 -1
  26. package/resources/scripts/{shell/git/bridge_enhanced_git_status.sh → server/services/git/enhanced_git_status_api.sh} +3 -3
  27. package/resources/scripts/{shell/git/bridge_git_status.sh → server/services/git/git_status_api.sh} +2 -2
  28. package/resources/scripts/{shell/git/bridge_list_worktrees.sh → server/services/git/list_worktrees_api.sh} +2 -2
  29. package/resources/scripts/server/services/git/merge_api.sh +12 -0
  30. package/resources/scripts/{shell/git/bridge_merge_from_primary.sh → server/services/git/merge_from_primary_api.sh} +1 -1
  31. package/resources/scripts/{shell/git/bridge_merge_into_primary.sh → server/services/git/merge_into_primary_api.sh} +1 -1
  32. package/resources/scripts/{shell/git/bridge_primary_branch.sh → server/services/git/primary_branch_api.sh} +1 -1
  33. package/resources/scripts/{shell/git/bridge_rebase_from_primary.sh → server/services/git/rebase_from_primary_api.sh} +1 -1
  34. package/resources/scripts/server/services/git/repo_api.sh +12 -0
  35. package/resources/scripts/{shell/git/bridge_repo_info.sh → server/services/git/repo_info_api.sh} +1 -1
  36. package/resources/scripts/{shell/git/bridge_squash_into_primary.sh → server/services/git/squash_into_primary_api.sh} +1 -1
  37. package/resources/scripts/{shell/git/bridge_switch_worktree.sh → server/services/git/switch_worktree_api.sh} +2 -2
  38. package/resources/scripts/server/services/git/worktree_api.sh +17 -0
  39. package/resources/scripts/{shell/bridge/utils.sh → server/services/json.sh} +23 -23
  40. package/resources/scripts/{shell/bridge → server/services/session}/tmux.sh +14 -14
  41. package/resources/scripts/server/session/tmux_api.sh +2806 -0
  42. package/resources/scripts/services.sh +6 -0
  43. package/resources/scripts/shell/AGENTS.md +63 -74
  44. package/resources/scripts/shell/build/dependencies.sh +33 -0
  45. package/resources/scripts/shell/build/install.sh +7 -0
  46. package/resources/scripts/shell/build/load.sh +10 -0
  47. package/resources/scripts/shell/build/logging.sh +6 -0
  48. package/resources/scripts/shell/build/rust.sh +18 -0
  49. package/resources/scripts/shell/build/services.sh +17 -0
  50. package/resources/scripts/shell/build/{build_usage.sh → usage.sh} +6 -6
  51. package/resources/scripts/shell/cli_load.sh +9 -0
  52. package/resources/scripts/shell/{gw_env_copy.sh → env_copy.sh} +11 -11
  53. package/resources/scripts/shell/env_copy_command.sh +2 -2
  54. package/resources/scripts/shell/git/checkout_worktree.sh +4 -4
  55. package/resources/scripts/shell/git/create_worktree.sh +2 -2
  56. package/resources/scripts/shell/git/delete_worktree.sh +1 -1
  57. package/resources/scripts/shell/git/merge.sh +1 -1
  58. package/resources/scripts/shell/git/repo.sh +1 -1
  59. package/resources/scripts/shell/git/worktree.sh +1 -1
  60. package/resources/scripts/shell/gwr/check-updates.sh +1 -1
  61. package/resources/scripts/shell/gwr_binary.sh +4 -4
  62. package/resources/scripts/shell/gwr_load.sh +1 -1
  63. package/resources/scripts/shell/gwr_services.sh +10 -0
  64. package/resources/scripts/shell/gwr_usage.sh +10 -10
  65. package/resources/scripts/shell/orchestra-command-hook.sh +15 -15
  66. package/resources/scripts/shell/orchestra-local.sh +6 -6
  67. package/resources/scripts/shell/tmux/new_session_command.sh +1 -1
  68. package/bin/gwr.js +0 -10
  69. package/resources/scripts/shell/build/build_bridge.sh +0 -17
  70. package/resources/scripts/shell/build/build_dependencies.sh +0 -33
  71. package/resources/scripts/shell/build/build_install.sh +0 -7
  72. package/resources/scripts/shell/build/build_load.sh +0 -10
  73. package/resources/scripts/shell/build/build_logging.sh +0 -6
  74. package/resources/scripts/shell/build/build_rust.sh +0 -18
  75. package/resources/scripts/shell/git/bridge_merge.sh +0 -12
  76. package/resources/scripts/shell/git/bridge_repo.sh +0 -12
  77. package/resources/scripts/shell/git/bridge_worktree.sh +0 -17
  78. package/resources/scripts/shell/gw_legacy_wrappers.sh +0 -7
  79. package/resources/scripts/shell/gw_load.sh +0 -10
  80. package/resources/scripts/shell/gwr_bridge.sh +0 -10
  81. /package/resources/scripts/shell/{gw_debug.sh → cli_debug.sh} +0 -0
  82. /package/resources/scripts/shell/{gw_err.sh → cli_err.sh} +0 -0
  83. /package/resources/scripts/shell/{gw_have_cmd.sh → cli_have_cmd.sh} +0 -0
  84. /package/resources/scripts/shell/{gw_info.sh → cli_info.sh} +0 -0
@@ -2,9 +2,9 @@
2
2
 
3
3
  gwr_show_usage() {
4
4
  cat << EOF
5
- gwr - Git Worktree Rust TUI
5
+ orchestra - Git Worktree Rust TUI
6
6
 
7
- Usage: gwr [options]
7
+ Usage: orchestra [options]
8
8
 
9
9
  A terminal user interface for managing git worktrees and tmux sessions.
10
10
 
@@ -39,18 +39,18 @@ Navigation:
39
39
  Requirements:
40
40
  • Git repository
41
41
  • Rust TUI binary (built with build.sh)
42
- gw-bridge.sh script
42
+ services.sh script
43
43
  • tmux (optional, for session management)
44
44
 
45
- For the original shell-based interface, use: gw
45
+ For the shell-based scripting interface, use: orchestra-cli
46
46
 
47
47
  Examples:
48
- gwr # Launch interactive TUI
49
- gwr --new-tmux # Start a new tmux session for the current branch
50
- gwr --new-tmux --cmd "pnpm install" --cmd "pnpm dev"
51
- gwr --debug # Launch with debug information
52
- gwr --help # Show this help
53
- gwr --update # Check for available updates
48
+ orchestra # Launch interactive TUI
49
+ orchestra --new-tmux # Start a new tmux session for the current branch
50
+ orchestra --new-tmux --cmd "pnpm install" --cmd "pnpm dev"
51
+ orchestra --debug # Launch with debug information
52
+ orchestra --help # Show this help
53
+ orchestra --update # Check for available updates
54
54
 
55
55
  EOF
56
56
  }
@@ -23,8 +23,8 @@ orchestra_rename_session() {
23
23
  return 1
24
24
  fi
25
25
 
26
- if [[ -z "${ORCHESTRA_BRIDGE_PATH-}" || ! -x "$ORCHESTRA_BRIDGE_PATH" ]]; then
27
- printf 'ORCHESTRA_BRIDGE_PATH is not set or executable\n' >&2
26
+ if [[ -z "${ORCHESTRA_SERVICES_PATH-}" || ! -x "$ORCHESTRA_SERVICES_PATH" ]]; then
27
+ printf 'ORCHESTRA_SERVICES_PATH is not set or executable\n' >&2
28
28
  return 1
29
29
  fi
30
30
 
@@ -36,7 +36,7 @@ orchestra_rename_session() {
36
36
  fi
37
37
 
38
38
  local result=""
39
- result="$("$ORCHESTRA_BRIDGE_PATH" manual-rename-session "$session_name" "$new_name" 2>/dev/null || true)"
39
+ result="$("$ORCHESTRA_SERVICES_PATH" manual-rename-session "$session_name" "$new_name" 2>/dev/null || true)"
40
40
  case "$result" in
41
41
  '"success"')
42
42
  printf 'Renamed session to: %s\n' "$new_name"
@@ -82,20 +82,20 @@ _orchestra_history_key() {
82
82
  echo "$key"
83
83
  }
84
84
 
85
- _orchestra_bridge_path() {
86
- local bridge=""
85
+ _orchestra_services_path() {
86
+ local services=""
87
87
 
88
88
  if [[ -n "${GW_ORCHESTRATOR_ROOT-}" ]]; then
89
- bridge="$GW_ORCHESTRATOR_ROOT/gw-bridge.sh"
90
- if [[ -f "$bridge" ]]; then
91
- echo "$bridge"
89
+ services="$GW_ORCHESTRATOR_ROOT/services.sh"
90
+ if [[ -f "$services" ]]; then
91
+ echo "$services"
92
92
  return
93
93
  fi
94
94
  fi
95
95
 
96
- bridge="$(cd "$_ORCHESTRA_HOOK_DIR/.." && pwd -P)/gw-bridge.sh"
97
- if [[ -f "$bridge" ]]; then
98
- echo "$bridge"
96
+ services="$(cd "$_ORCHESTRA_HOOK_DIR/.." && pwd -P)/services.sh"
97
+ if [[ -f "$services" ]]; then
98
+ echo "$services"
99
99
  return
100
100
  fi
101
101
 
@@ -149,9 +149,9 @@ _orchestra_trigger_auto_rename_async() {
149
149
  _orchestra_should_auto_rename_session "$session_name" || return
150
150
  _orchestra_should_trigger_auto_rename_command "$command" "$app" || return
151
151
 
152
- local bridge
153
- bridge="$(_orchestra_bridge_path)"
154
- [[ -n "$bridge" && -f "$bridge" ]] || return
152
+ local services
153
+ services="$(_orchestra_services_path)"
154
+ [[ -n "$services" && -f "$services" ]] || return
155
155
 
156
156
  local flag_path
157
157
  flag_path="$(_orchestra_auto_rename_flag_path "$session_name")"
@@ -173,7 +173,7 @@ _orchestra_trigger_auto_rename_async() {
173
173
 
174
174
  (
175
175
  sleep "$delay"
176
- command bash "$bridge" rename-session "$session_name" >/dev/null 2>&1 || true
176
+ command bash "$services" rename-session "$session_name" >/dev/null 2>&1 || true
177
177
  ) >/dev/null 2>&1 &
178
178
  }
179
179
 
@@ -5,7 +5,7 @@
5
5
  #
6
6
  # - Default root is $HOME/repos/orchestrator (override via ORCHESTRA_LOCAL_ROOT
7
7
  # or --root).
8
- # - Worktree flag resolves to <root>/worktrees/<name>/gwr.sh for convenience.
8
+ # - Worktree flag resolves to <root>/worktrees/<name>/orchestra.sh for convenience.
9
9
 
10
10
  set -euo pipefail
11
11
 
@@ -18,10 +18,10 @@ Launch the local Orchestra TUI directly from your cloned repository.
18
18
  Options:
19
19
  --root <path> Path to the orchestrator repo (default: $HOME/repos/orchestrator)
20
20
  or the value of $ORCHESTRA_LOCAL_ROOT if set.
21
- -w, --worktree <n> Use the worktree wrapper at <root>/worktrees/<n>/gwr.sh
21
+ -w, --worktree <n> Use the worktree wrapper at <root>/worktrees/<n>/orchestra.sh
22
22
  -h, --help Show this help and exit.
23
23
 
24
- Any remaining arguments are forwarded to the local gwr.sh script.
24
+ Any remaining arguments are forwarded to the local orchestra.sh script.
25
25
 
26
26
  Environment:
27
27
  ORCHESTRA_LOCAL_ROOT Overrides the default repo path.
@@ -67,9 +67,9 @@ main() {
67
67
  exit 1
68
68
  fi
69
69
 
70
- local script_path="$root/gwr.sh"
70
+ local script_path="$root/orchestra.sh"
71
71
  if [[ -n "$worktree" ]]; then
72
- script_path="$root/worktrees/$worktree/gwr.sh"
72
+ script_path="$root/worktrees/$worktree/orchestra.sh"
73
73
  fi
74
74
 
75
75
  if [[ ! -f "$script_path" ]]; then
@@ -78,7 +78,7 @@ main() {
78
78
  fi
79
79
 
80
80
  # This launcher is explicitly for local development; ignore installed binary
81
- # overrides so gwr.sh resolves the TUI binary from the selected checkout.
81
+ # overrides so orchestra.sh resolves the TUI binary from the selected checkout.
82
82
  unset GW_TUI_BIN
83
83
 
84
84
  if [[ ${#args[@]} -gt 0 ]]; then
@@ -30,7 +30,7 @@ cmd_new_tmux_session_with_command() {
30
30
  if [[ -z "$wt" ]]; then
31
31
  info "🌳 Creating worktree for existing branch '$branch_name'..."
32
32
  wt="$(git_ensure_worktree_for_branch "$branch_name")"
33
- gw_env_copy_files "$source_root" "$wt" "$shared_root"
33
+ env_copy_files "$source_root" "$wt" "$shared_root"
34
34
  fi
35
35
  else
36
36
  err "Branch '$branch_name' does not exist"
package/bin/gwr.js DELETED
@@ -1,10 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const path = require('path');
4
- const { spawnSync } = require('child_process');
5
-
6
- const installScript = path.join(__dirname, '..', 'install.js');
7
- const result = spawnSync(process.execPath, [installScript, '--invoke=gwr', ...process.argv.slice(2)], {
8
- stdio: 'inherit',
9
- });
10
- process.exit(result.status ?? 0);
@@ -1,17 +0,0 @@
1
- # shellcheck shell=bash
2
-
3
- build_test_bridge() {
4
- build_info "Testing gw-bridge.sh..."
5
-
6
- if [[ ! -x "$SCRIPT_DIR/gw-bridge.sh" ]]; then
7
- build_error "gw-bridge.sh not found or not executable"
8
- exit 1
9
- fi
10
-
11
- if "$SCRIPT_DIR/gw-bridge.sh" help >/dev/null 2>&1; then
12
- build_success "gw-bridge.sh basic test passed"
13
- else
14
- build_error "gw-bridge.sh test failed"
15
- exit 1
16
- fi
17
- }
@@ -1,33 +0,0 @@
1
- # shellcheck shell=bash
2
-
3
- build_check_dependencies() {
4
- build_info "Checking dependencies..."
5
-
6
- if ! command -v cargo >/dev/null 2>&1; then
7
- build_error "Rust/Cargo not found. Please install Rust: https://rustup.rs/"
8
- exit 1
9
- fi
10
-
11
- if ! command -v cc >/dev/null 2>&1 && \
12
- ! command -v clang >/dev/null 2>&1 && \
13
- ! command -v gcc >/dev/null 2>&1; then
14
- build_error "C compiler not found. Bundled SQLite requires a native C toolchain."
15
- build_error " macOS: xcode-select --install"
16
- build_error " Ubuntu/Debian: sudo apt install build-essential"
17
- build_error " RHEL/CentOS: sudo yum groupinstall 'Development Tools'"
18
- exit 1
19
- fi
20
-
21
- if ! command -v jq >/dev/null 2>&1; then
22
- build_warn "jq not found. Installing via package manager is recommended."
23
- build_warn " macOS: brew install jq"
24
- build_warn " Ubuntu/Debian: sudo apt install jq"
25
- build_warn " RHEL/CentOS: sudo yum install jq"
26
- fi
27
-
28
- if ! command -v tty >/dev/null 2>&1; then
29
- build_warn "tty command not found. Terminal title updates will be skipped."
30
- fi
31
-
32
- build_success "Dependencies check passed"
33
- }
@@ -1,7 +0,0 @@
1
- # shellcheck shell=bash
2
-
3
- build_install_global() {
4
- build_info "Installing gw-tui globally..."
5
- ( cd "$SCRIPT_DIR/gw-tui" && cargo install --path . )
6
- build_success "gw-tui installed globally"
7
- }
@@ -1,10 +0,0 @@
1
- # shellcheck shell=bash
2
-
3
- build_load() {
4
- source "$SCRIPT_DIR/shell/build/build_logging.sh"
5
- source "$SCRIPT_DIR/shell/build/build_dependencies.sh"
6
- source "$SCRIPT_DIR/shell/build/build_rust.sh"
7
- source "$SCRIPT_DIR/shell/build/build_bridge.sh"
8
- source "$SCRIPT_DIR/shell/build/build_install.sh"
9
- source "$SCRIPT_DIR/shell/build/build_usage.sh"
10
- }
@@ -1,6 +0,0 @@
1
- # shellcheck shell=bash
2
-
3
- build_info() { printf "${BLUE:-}[INFO]${NC:-} %s\n" "$*"; }
4
- build_success() { printf "${GREEN:-}[SUCCESS]${NC:-} %s\n" "$*"; }
5
- build_warn() { printf "${YELLOW:-}[WARN]${NC:-} %s\n" "$*"; }
6
- build_error() { printf "${RED:-}[ERROR]${NC:-} %s\n" "$*"; }
@@ -1,18 +0,0 @@
1
- # shellcheck shell=bash
2
-
3
- build_rust_tui() {
4
- local build_type="${1:-release}"
5
-
6
- build_info "Building gw-tui (${build_type})..."
7
-
8
- ( cd "$SCRIPT_DIR/gw-tui" && {
9
- if [[ "$build_type" == "release" ]]; then
10
- cargo build --release
11
- build_success "Built gw-tui in release mode: ./gw-tui/target/release/gw-tui"
12
- else
13
- cargo build
14
- build_success "Built gw-tui in debug mode: ./gw-tui/target/debug/gw-tui"
15
- fi
16
- }
17
- )
18
- }
@@ -1,12 +0,0 @@
1
- #!/bin/bash
2
-
3
- # shellcheck shell=bash
4
-
5
- # Master file that sources all individual bridge functions for merge operations
6
- # This maintains the same interface while using modular files
7
-
8
- # Source individual merge functions
9
- source "$(dirname "${BASH_SOURCE[0]}")/bridge_merge_from_primary.sh"
10
- source "$(dirname "${BASH_SOURCE[0]}")/bridge_rebase_from_primary.sh"
11
- source "$(dirname "${BASH_SOURCE[0]}")/bridge_merge_into_primary.sh"
12
- source "$(dirname "${BASH_SOURCE[0]}")/bridge_squash_into_primary.sh"
@@ -1,12 +0,0 @@
1
- #!/bin/bash
2
-
3
- # shellcheck shell=bash
4
-
5
- # Master file that sources all individual bridge functions for repository operations
6
- # This maintains the same interface while using modular files
7
-
8
- # Source individual repo functions
9
- source "$(dirname "${BASH_SOURCE[0]}")/bridge_repo_info.sh"
10
- source "$(dirname "${BASH_SOURCE[0]}")/bridge_git_status.sh"
11
- source "$(dirname "${BASH_SOURCE[0]}")/bridge_enhanced_git_status.sh"
12
- source "$(dirname "${BASH_SOURCE[0]}")/bridge_primary_branch.sh"
@@ -1,17 +0,0 @@
1
- #!/bin/bash
2
-
3
- # shellcheck shell=bash
4
-
5
- # Master file that sources all individual bridge functions for worktree operations
6
- # This maintains the same interface while using modular files
7
-
8
- # Source individual worktree functions
9
- source "$(dirname "${BASH_SOURCE[0]}")/bridge_list_worktrees.sh"
10
- source "$(dirname "${BASH_SOURCE[0]}")/bridge_check_branch.sh"
11
- source "$(dirname "${BASH_SOURCE[0]}")/bridge_create_worktree.sh"
12
- source "$(dirname "${BASH_SOURCE[0]}")/bridge_create_worktree_from_existing.sh"
13
- source "$(dirname "${BASH_SOURCE[0]}")/bridge_create_worktree_from_remote.sh"
14
- source "$(dirname "${BASH_SOURCE[0]}")/bridge_delete_worktree.sh"
15
- source "$(dirname "${BASH_SOURCE[0]}")/bridge_delete_worktree_only.sh"
16
- source "$(dirname "${BASH_SOURCE[0]}")/bridge_delete_branch_only.sh"
17
- source "$(dirname "${BASH_SOURCE[0]}")/bridge_switch_worktree.sh"
@@ -1,7 +0,0 @@
1
- # shellcheck shell=bash
2
-
3
- repo_root() { git_repo_root; }
4
- current_abs_path() { git_current_path; }
5
- branch_to_slug() { git_branch_to_slug "$1"; }
6
- worktree_path_to_branch() { git_worktree_path_to_branch "$1"; }
7
- list_worktrees() { git_list_worktrees; }
@@ -1,10 +0,0 @@
1
- # shellcheck shell=bash
2
-
3
- gw_load_core() {
4
- source "$SCRIPT_DIR/shell/gw_err.sh"
5
- source "$SCRIPT_DIR/shell/gw_info.sh"
6
- source "$SCRIPT_DIR/shell/gw_debug.sh"
7
- source "$SCRIPT_DIR/shell/gw_have_cmd.sh"
8
- source "$SCRIPT_DIR/shell/gw_env_copy.sh"
9
- source "$SCRIPT_DIR/shell/gw_legacy_wrappers.sh"
10
- }
@@ -1,10 +0,0 @@
1
- # shellcheck shell=bash
2
-
3
- gwr_check_bridge_script() {
4
- local bridge_path="$SCRIPT_DIR/gw-bridge.sh"
5
- if [[ ! -x "$bridge_path" ]]; then
6
- gwr_error "gw-bridge.sh not found or not executable at: $bridge_path"
7
- gwr_error "Please ensure the bridge script exists and is executable."
8
- exit 1
9
- fi
10
- }