ework-aio 0.3.9 → 0.4.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 +2 -2
- package/scripts/e2e-install.sh +46 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ework-aio",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.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",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"ework-daemon": "^0.3.0",
|
|
50
|
-
"ework-web": "^0.
|
|
50
|
+
"ework-web": "^0.6.0",
|
|
51
51
|
"opencode-ework": "^0.1.0",
|
|
52
52
|
"zod": "^3.23.0"
|
|
53
53
|
},
|
package/scripts/e2e-install.sh
CHANGED
|
@@ -634,6 +634,52 @@ 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
|
+
|
|
637
683
|
# Phase 6: uninstall
|
|
638
684
|
# -----------------------------------------------------------------------------
|
|
639
685
|
echo
|