ework-aio 0.3.9 → 0.5.0

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": "ework-aio",
3
- "version": "0.3.9",
3
+ "version": "0.5.0",
4
4
  "description": "All-in-one installer for ework (issue tracker) + ework-daemon (AI bridge) + opencode-ework (plugin). One command: npm i -g ework-aio && ework-aio install.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -46,8 +46,8 @@
46
46
  "postinstall": "echo '\\n ework-aio installed. Run \\033[1mework-aio install\\033[0m to set up services.\\n Help: ework-aio --help\\n'"
47
47
  },
48
48
  "dependencies": {
49
- "ework-daemon": "^0.3.0",
50
- "ework-web": "^0.5.0",
49
+ "ework-daemon": "^0.4.0",
50
+ "ework-web": "^0.7.0",
51
51
  "opencode-ework": "^0.1.0",
52
52
  "zod": "^3.23.0"
53
53
  },
@@ -634,6 +634,81 @@ info "skipping Phase 5.5 (E2E_DB=mysql or no migration sidecar)"
634
634
  fi
635
635
 
636
636
  # -----------------------------------------------------------------------------
637
+ # Phase 5.6: Session API smoke test
638
+ # -----------------------------------------------------------------------------
639
+ # Verifies the new OpenCode session API endpoints (ework-daemon@0.3.0+) respond.
640
+ # Also checks web session page renders via the client factory. The daemon API
641
+ # is the foundation for multi-machine session proxying (web → daemon HTTP API).
642
+ echo
643
+ echo "====================================================="
644
+ echo "Phase 5.6: session API smoke test"
645
+ echo "====================================================="
646
+
647
+ info "daemon session API: GET /api/opencode/sessions"
648
+ SESSIONS_CODE=$(curl -sS -o /tmp/e2e-sessions.json -w "%{http_code}" \
649
+ "http://127.0.0.1:$DAEMON_PORT/api/opencode/sessions?limit=10" 2>/dev/null || echo "000")
650
+ case "$SESSIONS_CODE" in
651
+ 200)
652
+ SESSIONS_COUNT=$(jq 'length' /tmp/e2e-sessions.json 2>/dev/null || echo "0")
653
+ if [[ "$SESSIONS_COUNT" -gt 0 ]]; then
654
+ pass "daemon session API: $SESSIONS_COUNT session(s) returned"
655
+ else
656
+ info "daemon session API responds (200), no sessions yet — OpenCode may not have run"
657
+ fi
658
+ ;;
659
+ 000)
660
+ info "daemon session API not reachable — skipping (older daemon?)"
661
+ ;;
662
+ *)
663
+ info "daemon session API returned HTTP $SESSIONS_CODE — older daemon without session endpoints?"
664
+ ;;
665
+ esac
666
+
667
+ info "web session page: GET /sessions (authenticated)"
668
+ WEB_SESSIONS_CODE=$(curl -sS -o /dev/null -w "%{http_code}" \
669
+ -H "Cookie: $AUTH_COOKIE" \
670
+ "http://127.0.0.1:$WORK_PORT/sessions" 2>/dev/null || echo "000")
671
+ case "$WEB_SESSIONS_CODE" in
672
+ 200)
673
+ pass "web session page renders (200)"
674
+ ;;
675
+ 302)
676
+ pass "web session page redirect (302) — post-migration re-auth likely"
677
+ ;;
678
+ *)
679
+ info "web session page returned HTTP $WEB_SESSIONS_CODE"
680
+ ;;
681
+ esac
682
+
683
+ # Phase 5.7: webhook delivery history
684
+ # Verifies the /admin/deliveries page renders with delivery records from
685
+ # the issue events triggered in Phase 5. Makes webhook failures visible.
686
+ echo
687
+ echo "====================================================="
688
+ echo "Phase 5.7: webhook delivery history"
689
+ echo "====================================================="
690
+
691
+ info "web admin deliveries page: GET /admin/deliveries (authenticated)"
692
+ DELIVERIES_CODE=$(curl -sS -o /tmp/e2e-deliveries.html -w "%{http_code}" \
693
+ -H "Cookie: $AUTH_COOKIE" \
694
+ "http://127.0.0.1:$WORK_PORT/admin/deliveries" 2>/dev/null || echo "000")
695
+ case "$DELIVERIES_CODE" in
696
+ 200)
697
+ DELIVERY_ROWS=$(grep -c 'class="st ' /tmp/e2e-deliveries.html 2>/dev/null || echo "0")
698
+ if [[ "$DELIVERY_ROWS" -gt 0 ]]; then
699
+ pass "webhook delivery history: $DELIVERY_ROWS delivery record(s) visible"
700
+ else
701
+ info "webhook delivery history page renders (200), no deliveries yet"
702
+ fi
703
+ ;;
704
+ 000)
705
+ info "webhook delivery history page not reachable — skipping"
706
+ ;;
707
+ *)
708
+ info "webhook delivery history page returned HTTP $DELIVERIES_CODE"
709
+ ;;
710
+ esac
711
+
637
712
  # Phase 6: uninstall
638
713
  # -----------------------------------------------------------------------------
639
714
  echo