@tom2012/cc-web 1.5.99 → 1.5.100
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
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
A self-hosted web application (distributed as npm package) that provides a browser-based interface for [Claude Code](https://docs.anthropic.com/en/docs/claude-code) CLI sessions. Create projects, each with a persistent terminal running Claude Code, and interact with them through a real-time terminal UI.
|
|
4
4
|
|
|
5
|
-
**Current version**: v1.5.
|
|
5
|
+
**Current version**: v1.5.100 | [GitHub](https://github.com/zbc0315/cc-web) | MIT License
|
|
6
6
|
|
|
7
7
|
## Features
|
|
8
8
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/memory-pool/templates.ts"],"names":[],"mappings":"AAEA,wBAAgB,cAAc,IAAI,MAAM,CAgGvC;AAED,wBAAgB,kBAAkB,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/memory-pool/templates.ts"],"names":[],"mappings":"AAEA,wBAAgB,cAAc,IAAI,MAAM,CAgGvC;AAED,wBAAgB,kBAAkB,IAAI,MAAM,CA4F3C;AAED,wBAAgB,qBAAqB,IAAI,MAAM,CAiB9C"}
|
|
@@ -110,14 +110,24 @@ function generateQuickRefMd() {
|
|
|
110
110
|
## 连接发现
|
|
111
111
|
|
|
112
112
|
1. 读取 \`~/.ccweb/port\` 获取当前端口号(如 \`3001\`)
|
|
113
|
-
2.
|
|
114
|
-
3. \`{projectId}\`
|
|
113
|
+
2. 获取 projectId:\`curl http://localhost:{port}/api/projects\` → 找到当前项目的 \`id\` 字段(UUID 格式)
|
|
114
|
+
3. BASE URL: \`http://localhost:{port}/api/memory-pool/{projectId}\`
|
|
115
115
|
|
|
116
|
-
|
|
116
|
+
> **注意:** projectId 是 ccweb 分配的 UUID(如 \`1a2df2fe-d956-4d05-b27e-d9c1c30db21a\`),**不是**文件路径。
|
|
117
|
+
|
|
118
|
+
示例:
|
|
117
119
|
\`\`\`
|
|
118
|
-
curl http://localhost:3001/api/
|
|
120
|
+
curl http://localhost:3001/api/projects # 查 UUID
|
|
121
|
+
curl http://localhost:3001/api/memory-pool/{uuid}/surface # 调 API
|
|
119
122
|
\`\`\`
|
|
120
123
|
|
|
124
|
+
## API 不可用时的 Fallback
|
|
125
|
+
|
|
126
|
+
如果 ccweb 未运行或 API 返回错误,可直接读写文件:
|
|
127
|
+
- 读取活跃层:\`cat .memory-pool/surface.md\`
|
|
128
|
+
- 读取球内容:\`cat .memory-pool/balls/ball_XXXX.md\`
|
|
129
|
+
- **不要手动修改 pool.json**,等 ccweb 恢复后通过 API 操作
|
|
130
|
+
|
|
121
131
|
## 对话开始
|
|
122
132
|
|
|
123
133
|
\`\`\`
|
|
@@ -191,7 +201,7 @@ function generateClaudeMdBlock() {
|
|
|
191
201
|
|
|
192
202
|
**每次对话开始时:**
|
|
193
203
|
1. 读取 \`.memory-pool/QUICK-REF.md\` 了解 API 操作规范(含连接发现方式)
|
|
194
|
-
2. 读取 \`~/.ccweb/port\`
|
|
204
|
+
2. 读取 \`~/.ccweb/port\` 获取端口,通过 \`GET /api/projects\` 查到项目 UUID,拼接 \`http://localhost:{port}/api/memory-pool/{uuid}/surface\` 获取活跃层记忆
|
|
195
205
|
3. 按需调用 \`POST /balls/{ballId}/hit\` 获取具体球内容
|
|
196
206
|
|
|
197
207
|
**对话过程中:**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/memory-pool/templates.ts"],"names":[],"mappings":";AAAA,uCAAuC;;AAEvC,wCAgGC;AAED,
|
|
1
|
+
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/memory-pool/templates.ts"],"names":[],"mappings":";AAAA,uCAAuC;;AAEvC,wCAgGC;AAED,gDA4FC;AAED,sDAiBC;AAjND,SAAgB,cAAc;IAC5B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8FR,CAAC;AACF,CAAC;AAED,SAAgB,kBAAkB;IAChC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0FR,CAAC;AACF,CAAC;AAED,SAAgB,qBAAqB;IACnC,OAAO;;;;;;;;;;;;;;;CAeR,CAAC;AACF,CAAC"}
|