fogact 1.1.9 → 1.2.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/README.md CHANGED
@@ -51,7 +51,7 @@ Minimum bootstrap requirement: the machine needs `curl` or `wget`. The installer
51
51
  2. Choose `1. Activate service`.
52
52
  3. Enter the activation / redeem code.
53
53
  4. FogAct auto-detects the Codex / Claude entitlement and shows only supported targets.
54
- 5. Confirm the plan and restart the target tool.
54
+ 5. Confirm activation, let FogAct write the config, then restart the target tool.
55
55
 
56
56
  FogAct backs up existing configuration before writing new files.
57
57
 
package/README.zh-CN.md CHANGED
@@ -51,7 +51,7 @@ fogact
51
51
  2. 选择 `1. 激活服务`。
52
52
  3. 输入激活码 / 兑换码。
53
53
  4. FogAct 自动识别 Codex / Claude 能力,并只展示可激活的平台。
54
- 5. 确认激活计划,然后重启对应工具。
54
+ 5. 确认激活后自动写入配置,然后重启对应工具。
55
55
 
56
56
  FogAct 写入新配置前会自动备份旧配置。
57
57
 
package/bin/web-server.js CHANGED
@@ -585,6 +585,29 @@ const server = http.createServer((req, res) => {
585
585
  return;
586
586
  }
587
587
 
588
+ if (urlPath === "/health" && req.method === "GET") {
589
+ res.writeHead(200, { 'Content-Type': 'application/json' });
590
+ res.end(JSON.stringify({ success: true, status: 'ok', service: 'fogact' }));
591
+ return;
592
+ }
593
+
594
+ if (urlPath === "/api/nodes" && req.method === "GET") {
595
+ const url = new URL(req.url, `http://${req.headers.host}`);
596
+ const service = getServiceKey(url.searchParams.get("service") || "codex", "codex");
597
+ const upstream = loadUpstreamConfig({ configPath: getUpstreamConfigPath() });
598
+ const upstreamUrl = getServiceBaseUrl(upstream, service) || upstream.baseUrl;
599
+ const publicUrl = `https://${req.headers.host}`.replace(/\/+$/, "");
600
+ const nodes = [
601
+ { name: "FogAct", url: publicUrl, region: "Global" },
602
+ ];
603
+ if (upstreamUrl) {
604
+ nodes.push({ name: service === "claude" ? "Claude Upstream" : "Codex Upstream", url: upstreamUrl, region: "Upstream" });
605
+ }
606
+ res.writeHead(200, { 'Content-Type': 'application/json' });
607
+ res.end(JSON.stringify({ success: true, nodes }));
608
+ return;
609
+ }
610
+
588
611
  // Handle users API
589
612
  if (urlPath === "/api/users" && req.method === "GET") {
590
613
  if (!isAuthenticated(req)) {
@@ -1,6 +1,5 @@
1
1
  :root {
2
2
  color-scheme: light;
3
- --primary: #6d5dfc;
4
3
  --market-bg: #f7f7fb;
5
4
  --market-bg-soft: #ffffff;
6
5
  --market-ink: #101014;
@@ -29,7 +28,6 @@ html.dark,
29
28
  html.dark:root,
30
29
  body.market-dark {
31
30
  color-scheme: dark;
32
- --primary: #9b8cff;
33
31
  --market-bg: #07070a;
34
32
  --market-bg-soft: #101016;
35
33
  --market-ink: #f7f7fb;
@@ -49,8 +47,7 @@ body.market-dark {
49
47
  }
50
48
 
51
49
  body.market-page,
52
- body.market-admin,
53
- body.market-user {
50
+ body.market-admin {
54
51
  min-height: 100vh;
55
52
  margin: 0;
56
53
  color: var(--market-ink);
@@ -63,8 +60,7 @@ body.market-user {
63
60
  }
64
61
 
65
62
  body.market-page,
66
- body.market-admin,
67
- body.market-user {
63
+ body.market-admin {
68
64
  background:
69
65
  radial-gradient(circle at 18% 10%, rgba(109, 93, 252, 0.18), transparent 30%),
70
66
  radial-gradient(circle at 88% 4%, rgba(255, 122, 89, 0.18), transparent 28%),
@@ -73,8 +69,7 @@ body.market-user {
73
69
  }
74
70
 
75
71
  body.market-page::before,
76
- body.market-admin::before,
77
- body.market-user::before {
72
+ body.market-admin::before {
78
73
  content: "";
79
74
  position: fixed;
80
75
  inset: 0;
@@ -88,8 +83,7 @@ body.market-user::before {
88
83
  }
89
84
 
90
85
  body.market-page::after,
91
- body.market-admin::after,
92
- body.market-user::after {
86
+ body.market-admin::after {
93
87
  content: "";
94
88
  position: fixed;
95
89
  inset: 0;
@@ -814,12 +808,12 @@ body.market-dark .market-auth-card::before {
814
808
  }
815
809
  }
816
810
 
817
- .animate-slide-in-up,
818
- .animate-slide-in-right,
819
- .animate-fade-in,
820
- .animate-bounce-in,
821
- .fade-in,
822
- .motion-once {
811
+ body.market-page .animate-slide-in-up,
812
+ body.market-page .animate-slide-in-right,
813
+ body.market-page .animate-fade-in,
814
+ body.market-page .animate-bounce-in,
815
+ body.market-page .fade-in,
816
+ body.market-page .motion-once {
823
817
  animation: none !important;
824
818
  }
825
819
 
@@ -1115,74 +1109,7 @@ body.market-dark .market-admin [class*="text-on-error-container"] {
1115
1109
  color: color-mix(in srgb, var(--market-danger) 76%, #fff 24%) !important;
1116
1110
  }
1117
1111
 
1118
- /* Built user app polish */
1119
- body.market-user {
1120
- overflow-x: hidden;
1121
- }
1122
-
1123
- .market-user #app {
1124
- position: relative;
1125
- isolation: isolate;
1126
- min-height: 100vh;
1127
- }
1128
-
1129
- .market-user [class~="bg-white"],
1130
- .market-user [class~="bg-gray-50"],
1131
- .market-user [class~="bg-slate-50"],
1132
- .market-user [class~="bg-zinc-50"],
1133
- .market-user [class~="bg-background"],
1134
- .market-user [class~="bg-card"],
1135
- .market-user [class~="bg-muted"],
1136
- .market-user [class~="dark:bg-gray-950"],
1137
- .market-user [class~="dark:bg-slate-950"],
1138
- .market-user [class~="dark:bg-zinc-950"] {
1139
- background-color: var(--market-panel) !important;
1140
- backdrop-filter: blur(24px) saturate(135%);
1141
- }
1142
-
1143
- .market-user [class~="border"],
1144
- .market-user [class*="border-gray"],
1145
- .market-user [class*="border-slate"],
1146
- .market-user [class*="border-zinc"],
1147
- .market-user [class*="border-border"] {
1148
- border-color: var(--market-line) !important;
1149
- }
1150
-
1151
- .market-user [class~="rounded-xl"],
1152
- .market-user [class~="rounded-2xl"],
1153
- .market-user [class~="rounded-3xl"] {
1154
- border-radius: 24px !important;
1155
- }
1156
-
1157
- .market-user [class*="shadow"] {
1158
- box-shadow: var(--market-shadow-soft) !important;
1159
- }
1160
-
1161
- .market-user [class~="text-gray-900"],
1162
- .market-user [class~="text-slate-900"],
1163
- .market-user [class~="text-zinc-900"],
1164
- .market-user [class~="text-foreground"] {
1165
- color: var(--market-ink) !important;
1166
- }
1167
-
1168
- .market-user [class~="text-gray-500"],
1169
- .market-user [class~="text-gray-600"],
1170
- .market-user [class~="text-slate-500"],
1171
- .market-user [class~="text-slate-600"],
1172
- .market-user [class~="text-muted-foreground"] {
1173
- color: var(--market-muted) !important;
1174
- }
1175
-
1176
- .market-user button,
1177
- .market-user a {
1178
- transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
1179
- }
1180
-
1181
- .market-user button:hover,
1182
- .market-user a:hover {
1183
- transform: translateY(-1px);
1184
- }
1185
-
1112
+ /* User app keeps its bundled styles; avoid overriding /user/ here. */
1186
1113
  .market-card-lab {
1187
1114
  min-height: 318px;
1188
1115
  padding: 0;
@@ -55,9 +55,9 @@
55
55
  <section class="market-hero" aria-labelledby="hero-title">
56
56
  <div class="market-hero-main">
57
57
  <div class="market-kicker"><span class="market-kicker-dot"></span> CLI 激活与配额管理</div>
58
- <h1 id="hero-title" class="market-title">统一管理 Codex、Claude 与更多 <span>CLI 服务</span></h1>
58
+ <h1 id="hero-title" class="market-title"><span>Fog Coding</span><br />网关入口</h1>
59
59
  <p class="market-copy">
60
- 在一个入口完成激活码发放、用户绑定、额度查看和服务配置,减少来回切换。
60
+ 连接 Codex、Claude 等服务,处理激活码、用户和额度,一站完成。
61
61
  </p>
62
62
 
63
63
  <label class="market-search" aria-label="搜索功能入口">