triflux 5.0.1 → 5.0.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triflux",
3
- "version": "5.0.1",
3
+ "version": "5.0.3",
4
4
  "description": "CLI-first multi-model orchestrator for Claude Code — route tasks to Codex, Gemini, and Claude",
5
5
  "type": "module",
6
6
  "bin": {
@@ -49,7 +49,8 @@
49
49
  "better-sqlite3": "^12.6.2",
50
50
  "pino": "^10.3.1",
51
51
  "pino-pretty": "^13.1.3",
52
- "systray2": "^2.1.4"
52
+ "systray2": "^2.1.4",
53
+ "zod": "^4.0.0"
53
54
  },
54
55
  "keywords": [
55
56
  "claude-code",
@@ -461,37 +461,22 @@ team_claim_task() {
461
461
  esac
462
462
  }
463
463
 
464
- team_complete_task() {
465
- local result="${1:-success}" # success/failed/timeout
466
- local result_summary="${2:-작업 완료}"
467
- [[ -z "$TFX_TEAM_NAME" || -z "$TFX_TEAM_TASK_ID" ]] && return 0
468
-
469
- local summary_trimmed metadata_patch result_payload
470
- summary_trimmed=$(echo "$result_summary" | head -c 4096)
471
- metadata_patch=$(bridge_json_stringify metadata-patch "$result" "$summary_trimmed" 2>/dev/null || true)
472
- result_payload=$(bridge_json_stringify task-result "$TFX_TEAM_TASK_ID" "$result" 2>/dev/null || true)
473
-
474
- # task 상태: 항상 "completed" (Claude Code API는 "failed" 미지원)
475
- # 실제 결과는 metadata.result로 전달
476
- if [[ -n "$metadata_patch" ]]; then
477
- if ! bridge_cli_with_restart "팀 task 완료 보고" "Hub 재시작 후 팀 task 완료 보고 성공." \
478
- team-task-update \
479
- --team "$TFX_TEAM_NAME" \
480
- --task-id "$TFX_TEAM_TASK_ID" \
481
- --status completed \
482
- --owner "$TFX_TEAM_AGENT_NAME" \
483
- --metadata-patch "$metadata_patch"; then
484
- echo "[tfx-route] 경고: 팀 task 완료 보고 실패 (team=$TFX_TEAM_NAME, task=$TFX_TEAM_TASK_ID, result=$result)" >&2
485
- fi
486
- fi
487
-
488
- # 리드에게 메시지 전송
489
- team_send_message "$summary_trimmed" "task ${TFX_TEAM_TASK_ID} ${result}"
490
-
491
- # Hub result 발행 (poll_messages 채널 활성화)
492
- if [[ -n "$result_payload" ]]; then
493
- if ! bridge_cli_with_restart "Hub result 발행" "Hub 재시작 후 Hub result 발행 성공." \
494
- result \
464
+ team_complete_task() {
465
+ local result="${1:-success}" # success/failed/timeout
466
+ local result_summary="${2:-작업 완료}"
467
+ [[ -z "$TFX_TEAM_NAME" || -z "$TFX_TEAM_TASK_ID" ]] && return 0
468
+
469
+ local summary_trimmed result_payload
470
+ summary_trimmed=$(echo "$result_summary" | head -c 4096)
471
+ result_payload=$(bridge_json_stringify task-result "$TFX_TEAM_TASK_ID" "$result" 2>/dev/null || true)
472
+
473
+ # task 파일 completion 쓰기는 Worker Step 6 TaskUpdate가 authority다.
474
+ # route 레벨에서는 task.result 발행 + 로컬 backup만 유지한다.
475
+
476
+ # Hub result 발행 (poll_messages 채널 활성화)
477
+ if [[ -n "$result_payload" ]]; then
478
+ if ! bridge_cli_with_restart "Hub result 발행" "Hub 재시작 후 Hub result 발행 성공." \
479
+ result \
495
480
  --agent "$TFX_TEAM_AGENT_NAME" \
496
481
  --topic task.result \
497
482
  --payload "$result_payload" \