fraim-framework 2.0.38 → 2.0.42

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.
@@ -117,9 +117,13 @@ done
117
117
  CONFIG_FILE=".fraim/config.json"
118
118
  if [ ! -f "$CONFIG_FILE" ]; then
119
119
  echo "Error: Config file not found at $CONFIG_FILE" >&2
120
+ echo "Make sure you're running this script from the project root directory" >&2
121
+ echo "Current directory: $(pwd)" >&2
120
122
  exit 1
121
123
  fi
122
124
 
125
+ echo "Using config file: $CONFIG_FILE"
126
+
123
127
  if ! command -v node &> /dev/null; then
124
128
  echo "Error: node is required but not installed." >&2
125
129
  exit 1
@@ -280,6 +284,9 @@ echo
280
284
  # Step 2: Clone the repo
281
285
  echo "Step 2: Cloning repository..."
282
286
 
287
+ echo "Issue number = $ISSUE_NUMBER, Editor = $EDITOR, Base branch = $BASE_BRANCH"
288
+ echo
289
+
283
290
  # Get current workspace path
284
291
  CURRENT_WORKSPACE=$(pwd)
285
292
  echo "Current workspace: $CURRENT_WORKSPACE"
@@ -1,70 +1,74 @@
1
- #!/bin/bash
2
- # verify-pr-comments.sh
3
- # Ensures agents properly retrieve and address PR comments
4
-
5
- set -e
6
-
7
- PR_NUMBER=$1
8
-
9
- # Load repository config from config.json
10
- CONFIG_FILE=".fraim/config.json"
11
- if [ ! -f "$CONFIG_FILE" ]; then
12
- echo "Error: Config file not found at $CONFIG_FILE" >&2
13
- exit 1
14
- fi
15
-
16
- if ! command -v node &> /dev/null; then
17
- echo "Error: node is required but not installed." >&2
18
- exit 1
19
- fi
20
-
21
- # Extract values using node reading from stdin
22
- NODE_SCRIPT="
23
- const fs = require('fs');
24
- try {
25
- const input = fs.readFileSync(0, 'utf-8');
26
- const config = JSON.parse(input);
27
- const repo = config.git;
28
- if (!repo || !repo.repoOwner || !repo.repoName) {
29
- process.exit(1);
30
- }
31
- console.log(\`\${repo.repoOwner}:\${repo.repoName}\`);
32
- } catch (e) {
33
- process.exit(1);
34
- }
35
- "
36
-
37
- REPO_INFO=$(cat "$CONFIG_FILE" | node -e "$NODE_SCRIPT")
38
- if [ $? -ne 0 ]; then
39
- echo "Error: Failed to parse repository config from $CONFIG_FILE" >&2
40
- echo "Required: git.repoOwner, git.repoName" >&2
41
- exit 1
42
- fi
43
-
44
- IFS=':' read -r REPO_OWNER REPO_NAME <<< "$REPO_INFO"
45
-
46
- if [ -z "$PR_NUMBER" ]; then
47
- echo "❌ ERROR: PR number required"
48
- echo "Usage: $0 <PR_NUMBER>"
49
- exit 1
50
- fi
51
-
52
- echo "🔍 Verifying PR comment processing for #$PR_NUMBER ($REPO_OWNER/$REPO_NAME)"
53
-
54
- # Get all comments
55
- gh api "repos/$REPO_OWNER/$REPO_NAME/pulls/$PR_NUMBER/comments?per_page=100" \
56
- --jq '.[] | "[\(.id)] \(.path // "pr"):\(.line // "general") - \(.body)"' \
57
- > pr-comments-verification.txt
58
-
59
- COMMENT_COUNT=$(wc -l < pr-comments-verification.txt)
60
- echo "📋 Found $COMMENT_COUNT comments"
61
- echo "📄 Comments saved to pr-comments-verification.txt"
62
-
63
- if [ "$COMMENT_COUNT" -eq 0 ]; then
64
- echo " No comments found - agent can proceed"
65
- exit 0
66
- fi
67
-
68
- echo ""
69
- echo "⚠️ Agent MUST address each comment before claiming completion"
70
- echo "📝 Agent must provide evidence table showing resolution of all $COMMENT_COUNT comments"
1
+ #!/bin/bash
2
+ # verify-pr-comments.sh
3
+ # Ensures agents properly retrieve and address PR comments
4
+
5
+ set -e
6
+
7
+ PR_NUMBER=$1
8
+
9
+ # Load repository config from config.json
10
+ CONFIG_FILE=".fraim/config.json"
11
+ if [ ! -f "$CONFIG_FILE" ]; then
12
+ echo "Error: Config file not found at $CONFIG_FILE" >&2
13
+ echo "Make sure you're running this script from the project root directory" >&2
14
+ echo "Current directory: $(pwd)" >&2
15
+ exit 1
16
+ fi
17
+
18
+ echo "Using config file: $CONFIG_FILE"
19
+
20
+ if ! command -v node &> /dev/null; then
21
+ echo "Error: node is required but not installed." >&2
22
+ exit 1
23
+ fi
24
+
25
+ # Extract values using node reading from stdin
26
+ NODE_SCRIPT="
27
+ const fs = require('fs');
28
+ try {
29
+ const input = fs.readFileSync(0, 'utf-8');
30
+ const config = JSON.parse(input);
31
+ const repo = config.git;
32
+ if (!repo || !repo.repoOwner || !repo.repoName) {
33
+ process.exit(1);
34
+ }
35
+ console.log(\`\${repo.repoOwner}:\${repo.repoName}\`);
36
+ } catch (e) {
37
+ process.exit(1);
38
+ }
39
+ "
40
+
41
+ REPO_INFO=$(cat "$CONFIG_FILE" | node -e "$NODE_SCRIPT")
42
+ if [ $? -ne 0 ]; then
43
+ echo "Error: Failed to parse repository config from $CONFIG_FILE" >&2
44
+ echo "Required: git.repoOwner, git.repoName" >&2
45
+ exit 1
46
+ fi
47
+
48
+ IFS=':' read -r REPO_OWNER REPO_NAME <<< "$REPO_INFO"
49
+
50
+ if [ -z "$PR_NUMBER" ]; then
51
+ echo "❌ ERROR: PR number required"
52
+ echo "Usage: $0 <PR_NUMBER>"
53
+ exit 1
54
+ fi
55
+
56
+ echo "🔍 Verifying PR comment processing for #$PR_NUMBER ($REPO_OWNER/$REPO_NAME)"
57
+
58
+ # Get all comments
59
+ gh api "repos/$REPO_OWNER/$REPO_NAME/pulls/$PR_NUMBER/comments?per_page=100" \
60
+ --jq '.[] | "[\(.id)] \(.path // "pr"):\(.line // "general") - \(.body)"' \
61
+ > pr-comments-verification.txt
62
+
63
+ COMMENT_COUNT=$(wc -l < pr-comments-verification.txt)
64
+ echo "📋 Found $COMMENT_COUNT comments"
65
+ echo "📄 Comments saved to pr-comments-verification.txt"
66
+
67
+ if [ "$COMMENT_COUNT" -eq 0 ]; then
68
+ echo "✅ No comments found - agent can proceed"
69
+ exit 0
70
+ fi
71
+
72
+ echo ""
73
+ echo "⚠️ Agent MUST address each comment before claiming completion"
74
+ echo "📝 Agent must provide evidence table showing resolution of all $COMMENT_COUNT comments"