crewly 1.4.71 → 1.4.72

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.
@@ -10,13 +10,31 @@ INPUT="${1:-}"
10
10
  SESSION_NAME=$(echo "$INPUT" | jq -r '.sessionName // empty')
11
11
  require_param "sessionName" "$SESSION_NAME"
12
12
 
13
- # Get all teams and filter for the specific agent
14
- TEAMS=$(api_call GET "/teams")
15
- echo "$TEAMS" | jq --arg name "$SESSION_NAME" '
16
- .data // . | if type == "array" then . else [.] end |
17
- [.[].members // [] | .[] | select(.sessionName == $name or .name == $name)] |
18
- if length == 0 then {"error": "Agent not found", "sessionName": $name}
19
- elif length == 1 then .[0]
20
- else .
21
- end
22
- '
13
+ # Get all teams and filter for the specific agent.
14
+ # Retry once after 2s if not found (#280: registration race condition).
15
+ for attempt in 1 2; do
16
+ TEAMS=$(api_call GET "/teams")
17
+ RESULT=$(echo "$TEAMS" | jq --arg name "$SESSION_NAME" '
18
+ .data // . | if type == "array" then . else [.] end |
19
+ [.[].members // [] | .[] | select(.sessionName == $name or .name == $name)] |
20
+ if length == 0 then {"error": "Agent not found", "sessionName": $name}
21
+ elif length == 1 then .[0]
22
+ else .
23
+ end
24
+ ')
25
+
26
+ # If found, output and exit
27
+ NOT_FOUND=$(echo "$RESULT" | jq -r '.error // empty')
28
+ if [ -z "$NOT_FOUND" ]; then
29
+ echo "$RESULT"
30
+ exit 0
31
+ fi
32
+
33
+ # Retry after brief delay (registration may still be flushing to storage)
34
+ if [ "$attempt" -eq 1 ]; then
35
+ sleep 2
36
+ fi
37
+ done
38
+
39
+ # Return the not-found result after retries
40
+ echo "$RESULT"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "crewly",
3
- "version": "1.4.71",
3
+ "version": "1.4.72",
4
4
  "type": "module",
5
5
  "description": "Multi-agent orchestration platform for AI coding teams — coordinates Claude Code, Gemini CLI, and Codex agents with a real-time web dashboard",
6
6
  "main": "dist/cli/cli/src/index.js",