@laitszkin/apollo-toolkit 3.10.0 → 3.11.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/CHANGELOG.md +20 -0
- package/analyse-app-logs/scripts/__pycache__/filter_logs_by_time.cpython-312.pyc +0 -0
- package/analyse-app-logs/scripts/__pycache__/log_cli_utils.cpython-312.pyc +0 -0
- package/analyse-app-logs/scripts/__pycache__/search_logs.cpython-312.pyc +0 -0
- package/docs-to-voice/scripts/__pycache__/docs_to_voice.cpython-312.pyc +0 -0
- package/generate-spec/SKILL.md +17 -15
- package/generate-spec/agents/openai.yaml +1 -1
- package/generate-spec/references/TEMPLATE_SPEC.md +103 -84
- package/generate-spec/scripts/__pycache__/create-specscpython-312.pyc +0 -0
- package/init-project-html/SKILL.md +82 -126
- package/init-project-html/agents/openai.yaml +17 -8
- package/init-project-html/lib/atlas/assets/architecture.css +140 -0
- package/init-project-html/lib/atlas/assets/viewer.client.js +93 -0
- package/init-project-html/lib/atlas/cli.js +995 -0
- package/init-project-html/lib/atlas/layout.js +229 -0
- package/init-project-html/lib/atlas/render.js +485 -0
- package/init-project-html/lib/atlas/schema.js +310 -0
- package/init-project-html/lib/atlas/state.js +402 -0
- package/init-project-html/references/TEMPLATE_SPEC.md +123 -84
- package/init-project-html/sample-demo/resources/project-architecture/assets/architecture.css +139 -1058
- package/init-project-html/sample-demo/resources/project-architecture/assets/viewer.client.js +93 -0
- package/init-project-html/sample-demo/resources/project-architecture/atlas/atlas.index.yaml +34 -0
- package/init-project-html/sample-demo/resources/project-architecture/atlas/features/get-invite-codes.yaml +159 -0
- package/init-project-html/sample-demo/resources/project-architecture/atlas/features/invite-code-registration.yaml +160 -0
- package/init-project-html/sample-demo/resources/project-architecture/features/get-invite-codes/index.html +67 -52
- package/init-project-html/sample-demo/resources/project-architecture/features/get-invite-codes/invite-code-generator.html +48 -163
- package/init-project-html/sample-demo/resources/project-architecture/features/get-invite-codes/invite-issuance-service.html +70 -196
- package/init-project-html/sample-demo/resources/project-architecture/features/get-invite-codes/postgresql.html +64 -163
- package/init-project-html/sample-demo/resources/project-architecture/features/get-invite-codes/public-api.html +68 -150
- package/init-project-html/sample-demo/resources/project-architecture/features/get-invite-codes/web-get-invite-ui.html +65 -138
- package/init-project-html/sample-demo/resources/project-architecture/features/invite-code-registration/index.html +61 -51
- package/init-project-html/sample-demo/resources/project-architecture/features/invite-code-registration/postgresql.html +66 -159
- package/init-project-html/sample-demo/resources/project-architecture/features/invite-code-registration/public-api.html +63 -143
- package/init-project-html/sample-demo/resources/project-architecture/features/invite-code-registration/registration-service.html +77 -188
- package/init-project-html/sample-demo/resources/project-architecture/features/invite-code-registration/web-register-ui.html +65 -138
- package/init-project-html/sample-demo/resources/project-architecture/index.html +232 -335
- package/init-project-html/scripts/architecture.js +65 -247
- package/katex/scripts/__pycache__/render_katex.cpython-312.pyc +0 -0
- package/open-github-issue/scripts/__pycache__/open_github_issue.cpython-312.pyc +0 -0
- package/package.json +6 -2
- package/read-github-issue/scripts/__pycache__/find_issues.cpython-312.pyc +0 -0
- package/read-github-issue/scripts/__pycache__/read_issue.cpython-312.pyc +0 -0
- package/resolve-review-comments/scripts/__pycache__/review_threads.cpython-312.pyc +0 -0
- package/spec-to-project-html/SKILL.md +61 -63
- package/spec-to-project-html/agents/openai.yaml +14 -8
- package/spec-to-project-html/references/TEMPLATE_SPEC.md +96 -83
- package/text-to-short-video/scripts/__pycache__/enforce_video_aspect_ratio.cpython-312.pyc +0 -0
|
@@ -1,140 +1,67 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
|
-
<html lang="
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
<
|
|
14
|
-
</
|
|
15
|
-
<
|
|
16
|
-
<
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
</
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
<
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
<td>機讀錯誤碼轉成本地化訊息。</td>
|
|
68
|
-
</tr>
|
|
69
|
-
</tbody>
|
|
70
|
-
</table>
|
|
71
|
-
</section>
|
|
72
|
-
|
|
73
|
-
<section class="sub-vars">
|
|
74
|
-
<h2>變數與業務用途</h2>
|
|
75
|
-
<p class="sub-vars__intro">本表盤點本子模組在記憶體中持有、決定 UI 行為的關鍵識別子。</p>
|
|
76
|
-
<table>
|
|
77
|
-
<thead><tr><th>變數</th><th>型別</th><th>作用域</th><th>業務用途</th></tr></thead>
|
|
78
|
-
<tbody>
|
|
79
|
-
<tr>
|
|
80
|
-
<td class="sub-vars__name">FormValues</td>
|
|
81
|
-
<td class="sub-vars__type">{email, password, inviteCode}</td>
|
|
82
|
-
<td><span class="sub-vars__scope sub-vars__scope--instance">instance</span></td>
|
|
83
|
-
<td>使用者目前打算送出的註冊資料;驅動所有後續驗證、按鈕可用性與請求 body。</td>
|
|
84
|
-
</tr>
|
|
85
|
-
<tr>
|
|
86
|
-
<td class="sub-vars__name">FieldErrors</td>
|
|
87
|
-
<td class="sub-vars__type">Record<field,msg> | null</td>
|
|
88
|
-
<td><span class="sub-vars__scope sub-vars__scope--call">call</span></td>
|
|
89
|
-
<td>客戶端驗證結果;非空時阻擋網路請求,避免明顯無效嘗試打到後端造成不必要負擔與錯誤訊息。</td>
|
|
90
|
-
</tr>
|
|
91
|
-
<tr>
|
|
92
|
-
<td class="sub-vars__name">UIState</td>
|
|
93
|
-
<td class="sub-vars__type">idle | loading | error | success</td>
|
|
94
|
-
<td><span class="sub-vars__scope sub-vars__scope--instance">instance</span></td>
|
|
95
|
-
<td>UI 機器狀態;<code>loading</code> 期間禁用送出按鈕避免重複提交;其他狀態決定要顯示哪個訊息/導向。</td>
|
|
96
|
-
</tr>
|
|
97
|
-
<tr>
|
|
98
|
-
<td class="sub-vars__name">Result</td>
|
|
99
|
-
<td class="sub-vars__type">{ok: NewUserID} | {err: UiError}</td>
|
|
100
|
-
<td><span class="sub-vars__scope sub-vars__scope--call">call</span></td>
|
|
101
|
-
<td>一次 <code>submit</code> 的最終回應;驅動「導向後續頁」或「停留修改再試」兩條業務分支。</td>
|
|
102
|
-
</tr>
|
|
103
|
-
<tr>
|
|
104
|
-
<td class="sub-vars__name">UiMessage</td>
|
|
105
|
-
<td class="sub-vars__type">{lang_tag, text}</td>
|
|
106
|
-
<td><span class="sub-vars__scope sub-vars__scope--call">call</span></td>
|
|
107
|
-
<td>後端機讀錯誤碼的本地化呈現;讓使用者用自身語言理解失敗原因(例如「邀請碼已被使用」)。</td>
|
|
108
|
-
</tr>
|
|
109
|
-
</tbody>
|
|
110
|
-
</table>
|
|
111
|
-
</section>
|
|
112
|
-
|
|
113
|
-
<section class="sub-dataflow">
|
|
114
|
-
<h2>內部資料流</h2>
|
|
115
|
-
<ol>
|
|
116
|
-
<li>使用者輸入 → <code>setField</code> 改寫 <code>FormValues</code>。</li>
|
|
117
|
-
<li>送出時 <code>validateClientSide(FormValues)</code> 若回 <code>FieldErrors</code>,UI 設為 <code>error</code>,<strong>不</strong>觸發網路請求。</li>
|
|
118
|
-
<li>通過驗證後 <code>submit(FormValues)</code>:UI 轉 <code>loading</code>,等待 <code>Result</code>。</li>
|
|
119
|
-
<li><code>Result.ok</code> → UI 轉 <code>success</code>,呼叫導向;<code>Result.err</code> → 經 <code>mapApiError</code> 變 <code>UiMessage</code> 顯示。</li>
|
|
120
|
-
<li>失敗後 <code>FormValues</code> 保留,使用者可修正並再次 <code>submit</code>。</li>
|
|
121
|
-
</ol>
|
|
122
|
-
</section>
|
|
123
|
-
|
|
124
|
-
<section class="sub-errors">
|
|
125
|
-
<h2>本子模組可暴露的錯誤</h2>
|
|
126
|
-
<table>
|
|
127
|
-
<thead><tr><th>類型</th><th>來源</th><th>UI 行為</th></tr></thead>
|
|
128
|
-
<tbody>
|
|
129
|
-
<tr><td><code>FieldErrors</code></td><td><code>validateClientSide</code></td><td>就地紅字;無網路請求。</td></tr>
|
|
130
|
-
<tr><td><code>UiMessage</code></td><td><code>mapApiError</code></td><td>banner/toast;表單仍可編輯。</td></tr>
|
|
131
|
-
</tbody>
|
|
132
|
-
</table>
|
|
133
|
-
</section>
|
|
134
|
-
|
|
135
|
-
<footer class="atlas-meta" style="margin-top: 2rem">
|
|
136
|
-
<p><a href="../../index.html">← 宏觀架構</a> · <a href="./index.html">← 功能總覽</a></p>
|
|
137
|
-
</footer>
|
|
138
|
-
</main>
|
|
139
|
-
</body>
|
|
2
|
+
<html lang="en" data-atlas-page="submodule">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<title>Invite-code registration · web-register-ui</title>
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
7
|
+
<link rel="stylesheet" href="../../assets/architecture.css">
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<header class="submodule-header">
|
|
11
|
+
<nav class="submodule-breadcrumb"><a href="../../index.html">← Atlas</a> · <a href="index.html">← Invite-code registration</a></nav>
|
|
12
|
+
<h1>web-register-ui <small class="submodule-kind submodule-kind--ui">UI</small></h1>
|
|
13
|
+
<p class="submodule-role">React page that captures email, password, and invite code.</p>
|
|
14
|
+
</header>
|
|
15
|
+
<main class="submodule-main">
|
|
16
|
+
<section class="sub-io" aria-label="Function I/O">
|
|
17
|
+
<h2>Function I/O</h2>
|
|
18
|
+
<table class="sub-table">
|
|
19
|
+
<thead><tr><th scope="col">Name</th><th scope="col">In</th><th scope="col">Out</th><th scope="col">Side</th><th scope="col">Purpose</th></tr></thead>
|
|
20
|
+
<tbody>
|
|
21
|
+
<tr><td>handleSubmit</td><td>FormEvent</td><td>void</td><td>io</td><td>POSTs the registration payload and routes the response.</td></tr>
|
|
22
|
+
</tbody>
|
|
23
|
+
</table>
|
|
24
|
+
</section>
|
|
25
|
+
<section class="sub-vars" aria-label="Variables">
|
|
26
|
+
<h2>Variables</h2>
|
|
27
|
+
<table class="sub-table">
|
|
28
|
+
<thead><tr><th scope="col">Name</th><th scope="col">Type</th><th scope="col">Scope</th><th scope="col">Purpose</th></tr></thead>
|
|
29
|
+
<tbody>
|
|
30
|
+
<tr><td>email</td><td>string</td><td>call</td><td>Identity for the new account; required.</td></tr>
|
|
31
|
+
<tr><td>inviteCode</td><td>string</td><td>call</td><td>Token from the off-platform invite hand-off.</td></tr>
|
|
32
|
+
</tbody>
|
|
33
|
+
</table>
|
|
34
|
+
</section>
|
|
35
|
+
<section class="sub-dataflow" aria-label="Internal data flow">
|
|
36
|
+
<h2>Internal data flow</h2>
|
|
37
|
+
<svg class="sub-dataflow__svg" viewBox="0 0 400 264" role="img" aria-label="Internal dataflow">
|
|
38
|
+
<defs><marker id="sub-arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto-start-reverse"><path d="M0,0 L10,5 L0,10 Z" /></marker></defs>
|
|
39
|
+
<g class="sub-dataflow__step">
|
|
40
|
+
<rect x="20" y="20" width="360" height="56" rx="8" ry="8" />
|
|
41
|
+
<text x="200" y="44" text-anchor="middle">Collect form fields.</text>
|
|
42
|
+
</g>
|
|
43
|
+
<line class="sub-dataflow__arrow" x1="200" y1="76" x2="200" y2="104" marker-end="url(#sub-arrow)" />
|
|
44
|
+
<g class="sub-dataflow__step">
|
|
45
|
+
<rect x="20" y="104" width="360" height="56" rx="8" ry="8" />
|
|
46
|
+
<text x="200" y="128" text-anchor="middle">POST /api/register with payload.</text>
|
|
47
|
+
</g>
|
|
48
|
+
<line class="sub-dataflow__arrow" x1="200" y1="160" x2="200" y2="188" marker-end="url(#sub-arrow)" />
|
|
49
|
+
<g class="sub-dataflow__step">
|
|
50
|
+
<rect x="20" y="188" width="360" height="56" rx="8" ry="8" />
|
|
51
|
+
<text x="200" y="212" text-anchor="middle">On 2xx redirect to /welcome; otherwise surface</text>
|
|
52
|
+
<text x="200" y="228" text-anchor="middle">field-level errors.</text>
|
|
53
|
+
</g>
|
|
54
|
+
</svg>
|
|
55
|
+
</section>
|
|
56
|
+
<section class="sub-errors" aria-label="Errors">
|
|
57
|
+
<h2>Errors</h2>
|
|
58
|
+
<table class="sub-table">
|
|
59
|
+
<thead><tr><th scope="col">Name</th><th scope="col">When</th><th scope="col">Means</th></tr></thead>
|
|
60
|
+
<tbody>
|
|
61
|
+
<tr><td>ErrInvalidCode</td><td>API returns 422 with `invite_code` reason.</td><td>Highlight the invite-code field with the API message.</td></tr>
|
|
62
|
+
</tbody>
|
|
63
|
+
</table>
|
|
64
|
+
</section>
|
|
65
|
+
</main>
|
|
66
|
+
</body>
|
|
140
67
|
</html>
|