Files
Pine 9cbf4b4a8b feat(memory): 新增项目记忆库技能(.claude/skills/memory + .claude/memory)
- 主 skill SKILL.md:简明,指向 总约束/长期/短期/当前计划 与各端口记忆;定义强制工作流(读记忆→校验基线→改动→校验→提交→更新记忆)与 path:line 行号锚点规范。
- 总约束 MASTER.md:全局规则、仓库纪律、git 约定、进程铁律、记忆纪律。
- 计划三层:LONG-TERM(阶段0-5)/SHORT-TERM(当前迭代)/CURRENT(进行中)。
- 各端口记忆 ports/*.md:root/server-core/agent-desktop/park-desktop/compute-engine/training/web-official/admin-portal 的进度/已实现/已知问题/锚点。
- 各项目约束 projects/*.md(子skill):仓库/强制流程/关键路径/行号规范。
- CLAUDE.md 增补第 11 条:每次开发/改动必须调用 /memory 并提交+更新记忆。
- .gitignore 排除 .claude/settings.local.json。
2026-08-24 13:03:04 +08:00

27 lines
1.6 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# compute-engine 记忆
## 角色
算力引擎微服务(new-api 的 fork,Go):OpenAI 兼容 `/v1` 模型中继 + 额度/令牌/token 流水。**仅服务,管理/页面自研**(其自带 web 面板不使用)。独立仓库 `Pine/compute-engine`。
## 现状(2026-08-24)
- 结构:`main.go`(~/360 行) / `relay/` / `controller/` / `model/` / `router/api-router.go` / `common/` / `web/`。
- 端口 :3000(docker-compose `3000:3000`,`calciumion/new-api:latest`)。
- 内置 web UI 已由二进制嵌入(`main.go:42` embed `web/dist`,`main.go:198` 注册),但云超服意图不使用。
## 对接(server-core → compute-engine)
- 链路「规划中」已部分落地:server-core `app/services/compute_client.py` 封装修建号/发 PAT/余额/流水(loopback `http://127.0.0.1:3000`);`relay.py` 上游可改走本引擎 `/v1`(配置 `PINEAGENTS_COMPUTE_ADMIN_TOKEN` 时)。
- **关键待核对**:`compute_client.py` 默认管理路径(`/api/user`建号、`/api/token`发PAT)需按 `controller/user.go`、`router/api-router.go` admin 段实测。
- DeepSeek key 在 server-core(`app/config.py`)而非此处;渠道应迁至本引擎 `/api/channel`(阶段中)。
## 关键文件 / 锚点
- `router/api-router.go`(admin/self/log/data 路由)、`controller/user.go`、`controller/log.go`、`controller/billing.go`。
- 用户侧:`/api/user/self`(GetSelf)、`/api/user/token`(GenerateAccessToken)、`/api/log/self(/stat)`、`/api/data/self`、`/api/dashboard/billing/usage`。
## 下一步
- 实测核对管理路由;AddChannel 渠道与初始管理员;供 server-core 联调(引擎由用户先启动)。