@osfactory/har 0.60.1 → 0.61.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.
@@ -120,6 +120,24 @@ har_allocate_port() {
120
120
  har_pick_free_port "$scan_start" "$scan_end"
121
121
  }
122
122
 
123
+ # Load persisted infra host ports from .har/state/infra.env (written by setup-infra.sh).
124
+ # Optional repo_root: when launching from a worktree, infra may live in the main checkout.
125
+ har_load_infra_state() {
126
+ local repo_root="${1:-${REPO_ROOT:-}}"
127
+ local infra_state="$SCRIPT_DIR/state/infra.env"
128
+ if [ ! -f "$infra_state" ] && [ -n "$repo_root" ]; then
129
+ local common_git_dir
130
+ common_git_dir="$(git -C "$repo_root" rev-parse --git-common-dir 2>/dev/null || true)"
131
+ if [ -n "$common_git_dir" ]; then
132
+ infra_state="$(cd "$(dirname "$common_git_dir")" && pwd)/.har/state/infra.env"
133
+ fi
134
+ fi
135
+ if [ -f "$infra_state" ]; then
136
+ # shellcheck source=/dev/null
137
+ source "$infra_state"
138
+ fi
139
+ }
140
+
123
141
  # Allocate FE/API/DEBUG ports for a slot. Sets FE_PORT, API_PORT, DEBUG_PORT.
124
142
  har_allocate_slot_app_ports() {
125
143
  local agent_id="$1"
@@ -304,6 +322,7 @@ har_regenerate_agent_env_file() {
304
322
  if [ ! -f "$template" ]; then
305
323
  return 0
306
324
  fi
325
+ har_load_infra_state "${work_dir:-${REPO_ROOT:-}}"
307
326
  AGENT_ID="$agent_id" \
308
327
  API_PORT="$API_PORT" \
309
328
  FE_PORT="$FE_PORT" \
@@ -444,6 +463,7 @@ try {
444
463
  fi
445
464
  fi
446
465
  har_allocate_slot_app_ports "$agent_id"
466
+ har_load_infra_state "$repo_root"
447
467
  DB_PORT="${AGENT_DB_PORT:-${HARNESS_DB_PORT_DEFAULT:-15432}}"
448
468
  export FE_PORT API_PORT DEBUG_PORT DB_PORT
449
469
  }
@@ -99,6 +99,7 @@ fi
99
99
 
100
100
  # Ensure shared infra is running (persists host ports in .har/state/infra.env).
101
101
  "$SCRIPT_DIR/setup-infra.sh"
102
+ har_load_infra_state
102
103
  DB_PORT="${AGENT_DB_PORT:-${HARNESS_DB_PORT_DEFAULT:-15432}}"
103
104
  MINIO_PORT="${AGENT_MINIO_PORT:-${HARNESS_MINIO_PORT_DEFAULT:-19000}}"
104
105
  BROWSER_PORT="${AGENT_BROWSER_PORT:-${HARNESS_BROWSER_PORT_DEFAULT:-13001}}"
@@ -120,6 +120,24 @@ har_allocate_port() {
120
120
  har_pick_free_port "$scan_start" "$scan_end"
121
121
  }
122
122
 
123
+ # Load persisted infra host ports from .har/state/infra.env (written by setup-infra.sh).
124
+ # Optional repo_root: when launching from a worktree, infra may live in the main checkout.
125
+ har_load_infra_state() {
126
+ local repo_root="${1:-${REPO_ROOT:-}}"
127
+ local infra_state="$SCRIPT_DIR/state/infra.env"
128
+ if [ ! -f "$infra_state" ] && [ -n "$repo_root" ]; then
129
+ local common_git_dir
130
+ common_git_dir="$(git -C "$repo_root" rev-parse --git-common-dir 2>/dev/null || true)"
131
+ if [ -n "$common_git_dir" ]; then
132
+ infra_state="$(cd "$(dirname "$common_git_dir")" && pwd)/.har/state/infra.env"
133
+ fi
134
+ fi
135
+ if [ -f "$infra_state" ]; then
136
+ # shellcheck source=/dev/null
137
+ source "$infra_state"
138
+ fi
139
+ }
140
+
123
141
  # Allocate FE/API/DEBUG ports for a slot. Sets FE_PORT, API_PORT, DEBUG_PORT.
124
142
  har_allocate_slot_app_ports() {
125
143
  local agent_id="$1"
@@ -278,6 +296,7 @@ har_regenerate_agent_env_file() {
278
296
  local env_file="$3"
279
297
  local worktree_dir="${4:-}"
280
298
  local template="${SCRIPT_DIR}/env.template"
299
+ har_load_infra_state "${work_dir:-${REPO_ROOT:-}}"
281
300
  if [ -f "$template" ]; then
282
301
  AGENT_ID="$agent_id" \
283
302
  API_PORT="${API_PORT:-}" \
@@ -426,6 +445,7 @@ try {
426
445
  fi
427
446
  fi
428
447
  har_allocate_slot_app_ports "$agent_id"
448
+ har_load_infra_state "$repo_root"
429
449
  DB_PORT="${AGENT_DB_PORT:-${HARNESS_DB_PORT_DEFAULT:-15432}}"
430
450
  export FE_PORT API_PORT DEBUG_PORT DB_PORT
431
451
  }
@@ -89,6 +89,7 @@ else
89
89
  fi
90
90
 
91
91
  "$SCRIPT_DIR/setup-infra.sh"
92
+ har_load_infra_state
92
93
 
93
94
  if [ "$RESUME" != true ]; then
94
95
  WORK_DIR="$REPO_ROOT"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osfactory/har",
3
- "version": "0.60.1",
3
+ "version": "0.61.1",
4
4
  "description": "Open harness for reproducible multi-agent coding workflows",
5
5
  "keywords": [
6
6
  "har",
@@ -34,7 +34,7 @@
34
34
  "@modelcontextprotocol/sdk": "^1.29.0",
35
35
  "@pydantic/genai-prices": "^0.0.73",
36
36
  "chalk": "^5.3.0",
37
- "inquirer": "^10.1.2",
37
+ "inquirer": "^12.11.1",
38
38
  "js-yaml": "^4.1.0",
39
39
  "ora": "^8.0.1",
40
40
  "yargs": "^17.7.2",
@@ -46,7 +46,6 @@
46
46
  "@semantic-release/git": "^10.0.1",
47
47
  "@semantic-release/github": "^11.0.1",
48
48
  "@semantic-release/npm": "^13.1.5",
49
- "@types/inquirer": "^9.0.7",
50
49
  "@types/jest": "^29.5.12",
51
50
  "@types/js-yaml": "^4.0.9",
52
51
  "@types/node": "^22.5.0",