codex-snapshots 0.1.0 → 0.1.1
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 +101 -6
- package/bin/codex-snapshot.mjs +1 -6326
- package/deploy/aliyun/README.md +311 -0
- package/deploy/aliyun/backup-share-data.sh +109 -0
- package/deploy/aliyun/check-ecs-status.sh +149 -0
- package/deploy/aliyun/codex-snapshot-share.env.example +29 -0
- package/deploy/aliyun/codex-snapshot-share.service +26 -0
- package/deploy/aliyun/configure-github-pages-api.sh +141 -0
- package/deploy/aliyun/configure-local-publisher.sh +197 -0
- package/deploy/aliyun/deploy-to-ecs.sh +669 -0
- package/deploy/aliyun/deploy.env.example +52 -0
- package/deploy/aliyun/doctor.mjs +398 -0
- package/deploy/aliyun/install-share-api.sh +252 -0
- package/deploy/aliyun/install-system-deps.sh +84 -0
- package/deploy/aliyun/nginx-codex-snapshots.bootstrap.conf +34 -0
- package/deploy/aliyun/nginx-codex-snapshots.conf +52 -0
- package/deploy/aliyun/preflight.mjs +321 -0
- package/deploy/aliyun/restore-share-data.sh +141 -0
- package/deploy/aliyun/verify-public-share.mjs +404 -0
- package/dist/cli/codex-snapshot.mjs +2654 -0
- package/dist/core/privacy.js +81 -0
- package/dist/core/snapshot.js +1 -0
- package/dist/renderers/markdown.mjs +81 -0
- package/dist/renderers/transcript.js +195 -0
- package/dist/server/http.js +10 -0
- package/dist/server/local-security.js +66 -0
- package/dist/server/local-viewer-app.mjs +1670 -0
- package/dist/server/local-viewer.mjs +210 -0
- package/dist/server/share-api.mjs +1149 -0
- package/dist/server/share-store.js +136 -0
- package/dist/shared/sanitize.js +126 -0
- package/dist/shared/transcript.js +1 -0
- package/dist/sources/index.mjs +2 -0
- package/dist/sources/local-history.mjs +2221 -0
- package/package.json +42 -14
- package/scripts/build-site.mjs +71 -0
- package/scripts/launch-agent.mjs +19 -227
- package/scripts/serve-site.mjs +2 -2
- package/scripts/test-aliyun-deploy-config.sh +230 -0
- package/scripts/test-share-api.mjs +967 -0
- package/scripts/test-site-config.mjs +100 -0
- package/scripts/test-static-site.mjs +403 -0
- package/scripts/write-site-config.mjs +161 -0
- package/server/share-api.mjs +1 -771
- package/site/assets/config.js +3 -0
- package/site/assets/share.js +43 -106
- package/site/assets/site.css +3 -605
- package/site/assets/site.js +15 -92
- package/site/favicon.svg +7 -0
- package/site/index.html +3 -83
- package/site/share/index.html +3 -8
package/site/favicon.svg
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" role="img" aria-label="Codex Snapshots">
|
|
2
|
+
<rect width="64" height="64" rx="14" fill="#17202a"/>
|
|
3
|
+
<path d="M19 16h26a3 3 0 0 1 3 3v26a3 3 0 0 1-3 3H19a3 3 0 0 1-3-3V19a3 3 0 0 1 3-3Z" fill="none" stroke="#eef9f6" stroke-width="4"/>
|
|
4
|
+
<path d="M23 22h11M22 23v11M41 42H30M42 41V30" fill="none" stroke="#7dd3c7" stroke-width="4" stroke-linecap="round"/>
|
|
5
|
+
<circle cx="32" cy="32" r="9" fill="#f2cc60"/>
|
|
6
|
+
<path d="M27 32h10M32 27v10" stroke="#17202a" stroke-width="3" stroke-linecap="round"/>
|
|
7
|
+
</svg>
|
package/site/index.html
CHANGED
|
@@ -5,93 +5,13 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
6
|
<meta name="description" content="面向 Codex、Claude Code 和 Trae 的本地优先、只读会话快照工具。">
|
|
7
7
|
<title>Codex Snapshots</title>
|
|
8
|
+
<link rel="icon" type="image/svg+xml" href="./favicon.svg">
|
|
8
9
|
<link rel="stylesheet" href="./assets/site.css">
|
|
9
10
|
</head>
|
|
10
11
|
<body>
|
|
11
|
-
<
|
|
12
|
-
<section class="hero" aria-labelledby="hero-title">
|
|
13
|
-
<div class="hero-copy">
|
|
14
|
-
<p class="eyebrow">本地优先的 agent 审阅工具</p>
|
|
15
|
-
<h1 id="hero-title">Codex Snapshots</h1>
|
|
16
|
-
<p class="lede">
|
|
17
|
-
从本地 Codex、Claude Code 和 Trae 会话中审阅、脱敏、导出并分享只读快照。
|
|
18
|
-
</p>
|
|
19
|
-
<div class="actions">
|
|
20
|
-
<a class="button primary" id="open-local-viewer" href="http://127.0.0.1:4321/">打开本地查看器</a>
|
|
21
|
-
<a class="button" href="https://github.com/ffffhx/codex-snapshots">GitHub 仓库</a>
|
|
22
|
-
</div>
|
|
23
|
-
</div>
|
|
24
|
-
<div class="product-shot" aria-label="Codex Snapshots 产品预览">
|
|
25
|
-
<div class="shot-sidebar">
|
|
26
|
-
<div class="shot-kicker">本地 Agents</div>
|
|
27
|
-
<div class="shot-title">项目</div>
|
|
28
|
-
<div class="shot-search"></div>
|
|
29
|
-
<div class="shot-row active"><span></span><b>garden-lab</b></div>
|
|
30
|
-
<div class="shot-row"><span></span><b>codex-snapshots</b></div>
|
|
31
|
-
<div class="shot-row"><span></span><b>coze-monorepo</b></div>
|
|
32
|
-
</div>
|
|
33
|
-
<div class="shot-main">
|
|
34
|
-
<div class="shot-top">
|
|
35
|
-
<div>
|
|
36
|
-
<div class="shot-kicker">只读审阅</div>
|
|
37
|
-
<div class="shot-heading">部署快照网站</div>
|
|
38
|
-
</div>
|
|
39
|
-
<div class="shot-switches"><span></span><span></span><span class="on"></span></div>
|
|
40
|
-
</div>
|
|
41
|
-
<div class="shot-meta">Codex | ~/Code/codex-snapshots | 已脱敏:是</div>
|
|
42
|
-
<div class="shot-bubble user">这个能变成一个独立项目吗?</div>
|
|
43
|
-
<div class="shot-bubble assistant">可以。它已经有独立的数据边界、查看器、分享 API 和部署入口。</div>
|
|
44
|
-
</div>
|
|
45
|
-
</div>
|
|
46
|
-
</section>
|
|
47
|
-
|
|
48
|
-
<section class="status-grid" aria-label="连接状态">
|
|
49
|
-
<article class="status-panel">
|
|
50
|
-
<div class="panel-heading">
|
|
51
|
-
<p class="eyebrow">本地服务</p>
|
|
52
|
-
<span class="status-pill checking" id="viewer-status">检查中</span>
|
|
53
|
-
</div>
|
|
54
|
-
<h2>打开你电脑上的只读查看器</h2>
|
|
55
|
-
<p>
|
|
56
|
-
这个网站只是入口外壳。会话数据仍保留在你的电脑上,并从
|
|
57
|
-
<code id="viewer-url-label">http://127.0.0.1:4321/</code> 读取。
|
|
58
|
-
</p>
|
|
59
|
-
<pre><code>pnpm install
|
|
60
|
-
pnpm dev</code></pre>
|
|
61
|
-
</article>
|
|
62
|
-
|
|
63
|
-
<article class="status-panel">
|
|
64
|
-
<div class="panel-heading">
|
|
65
|
-
<p class="eyebrow">云端分享</p>
|
|
66
|
-
<span class="status-pill checking" id="api-status">检查中</span>
|
|
67
|
-
</div>
|
|
68
|
-
<h2>打开一个分享快照</h2>
|
|
69
|
-
<form class="share-form" id="share-form">
|
|
70
|
-
<label>
|
|
71
|
-
<span>分享 ID</span>
|
|
72
|
-
<input id="share-id" name="id" autocomplete="off" placeholder="snap_..." spellcheck="false">
|
|
73
|
-
</label>
|
|
74
|
-
<label>
|
|
75
|
-
<span>分享 API</span>
|
|
76
|
-
<input id="api-url" name="api" autocomplete="off" spellcheck="false">
|
|
77
|
-
</label>
|
|
78
|
-
<button class="button primary" type="submit">打开分享</button>
|
|
79
|
-
</form>
|
|
80
|
-
</article>
|
|
81
|
-
</section>
|
|
82
|
-
|
|
83
|
-
<section class="commands" aria-label="命令">
|
|
84
|
-
<div>
|
|
85
|
-
<p class="eyebrow">安装</p>
|
|
86
|
-
<h2>在本地运行</h2>
|
|
87
|
-
</div>
|
|
88
|
-
<pre><code>git clone https://github.com/ffffhx/codex-snapshots.git
|
|
89
|
-
cd codex-snapshots
|
|
90
|
-
pnpm install
|
|
91
|
-
pnpm dev</code></pre>
|
|
92
|
-
</section>
|
|
93
|
-
</main>
|
|
12
|
+
<div id="root"></div>
|
|
94
13
|
|
|
14
|
+
<script src="./assets/config.js"></script>
|
|
95
15
|
<script src="./assets/site.js"></script>
|
|
96
16
|
</body>
|
|
97
17
|
</html>
|
package/site/share/index.html
CHANGED
|
@@ -5,18 +5,13 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
6
|
<meta name="description" content="查看一个已脱敏的 Codex Snapshots 云端分享。">
|
|
7
7
|
<title>快照分享 | Codex Snapshots</title>
|
|
8
|
+
<link rel="icon" type="image/svg+xml" href="../favicon.svg">
|
|
8
9
|
<link rel="stylesheet" href="../assets/site.css">
|
|
9
10
|
</head>
|
|
10
11
|
<body>
|
|
11
|
-
<
|
|
12
|
-
<header class="share-header">
|
|
13
|
-
<p class="eyebrow">云端只读快照</p>
|
|
14
|
-
<h1 id="share-title">正在加载快照</h1>
|
|
15
|
-
<p id="share-meta" class="share-meta">正在等待分享元数据。</p>
|
|
16
|
-
</header>
|
|
17
|
-
<section id="share-content" class="turns" aria-live="polite">正在加载...</section>
|
|
18
|
-
</main>
|
|
12
|
+
<div id="root"></div>
|
|
19
13
|
|
|
14
|
+
<script src="../assets/config.js"></script>
|
|
20
15
|
<script src="../assets/share.js"></script>
|
|
21
16
|
</body>
|
|
22
17
|
</html>
|