chenchenandClaude Opus 4.8 2e37495133 feat(telemetry): retention purge + context field whitelist + size caps (#32)
Telemetry up-gating hardening (code portion of #32):

- Context field whitelist: telemetry `context` is filtered to a small set of
  non-content diagnostic keys (route/retryable/phase/exit_code/duration_ms/
  attempt) before persistence. Unknown keys — including potentially identifying
  ones (email, full file path, prompt, raw IP) — are dropped, so a client
  regression cannot land arbitrary JSON in the store. Empty/unparseable/no-allowed-key
  context is dropped to "".
- Per-field size cap: stack_top and context are truncated to 8KiB after
  redaction (backstop against unbounded blobs within batch limits).
- Retention: daily master-only task deletes telemetry rows older than
  HEICODE_TELEMETRY_RETENTION_DAYS (default 30; <=0 disables).
  HEICODE_TELEMETRY_RETENTION_INTERVAL_HOURS (default 24) sets cadence.
  model.DeleteTelemetryEventsBefore(cutoff) + controller.StartTelemetryRetentionTask()
  wired into main.go under IsMasterNode.
- GET /api/heicode/config telemetry block now surfaces retention_days for
  client/admin transparency.

Tests: whitelist drop/keep, size cap, redaction-within-allowed-key. go build/vet
clean; controller telemetry tests pass.

Affects: Manager only (telemetry ingest + retention). No billing/consume-log
change (telemetry still never bills). Privacy-doc disclosure + production
enable-checklist portions of #32 tracked in heicodeDocs sync (#34) / desktop
client API docs (#35).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 00:40:23 +08:00

Heicode

Heicode 面向多人协作、可追溯交付的软件团队:把需求对齐、实现、验证、发布和持续运营连成一条少断层的链路,并用可编排的智能体角色承接其中可标准化的环节——强调「能复盘、能审计、能按团队规模裁剪」,而不是罗列某一家的工具栈。

下面的目录表仅供工程查阅;不代表对外产品承诺、路线图或你必须采用的集成方式。

本仓 = Heicode Manager(HM)端。 历史上终端/桌面客户端(cc-haha)、官网(website)与 Manager 曾同处一个 monorepo;现已拆分,本仓只保留 Heicode Manager(基于 new-api 的模型网关 + 管理控制台)。客户端(终端 + 桌面)在 heicode-macos-release-dev / heicode-winos-release-dev 独立仓。

这个仓库里有什么(工程布局)

目录 大致含义
heicode/ Heicode Manager:基于 new-api 的模型网关 + 管理控制台。Go(Gin/GORM)后端 + web/default 前端(Bun/Rsbuild/React)。
docs/ 产品共识、实施计划与集成契约(索引见 docs/README.md)。

客户端与官网不在本仓。

产品在解决什么问题

  • 协作范式:把瀑布 / 敏捷下的角色分工落到可复述的闸门与智能体承接边界。
  • 交付可追溯:文档、沟通与变更尽量与版本、发布对齐,便于复盘与合规。
  • 模型与执行分层:HM 提供模型网关与权限 / 计费;云端 agent 由 agent_management(AM)部署,客户端拿到 agent 公网地址后直连 agent 使用。

产品定位与架构共识见 docs/heicode.md,实施计划见 docs/plan.md。

快速启动(开发联调)

Heicode Manager 在 heicode/ 子目录:Go 后端 + web/default 前端。完整构建 / 运行命令与分层规则见 heicode/CLAUDE.md 与 heicode/README.md。

与 Heicode 登录相关的最小路由(以实际代码为准):

  • GET /heicode/oauth/authorize
  • GET /heicode/oauth/session

平台侧能力还包括模型发现(如 GET /v1/models)与 Anthropic Messages 兼容入口等。

集成与对接契约见 docs/integration/(HM↔AM、桌面客户端对接等)。

许可证

heicode/(Heicode Manager,基于 new-api)许可证见 heicode/LICENSE(常见为 AGPLv3)。

S
Description
No description provided
Readme
17 MiB
Languages
Go 98.8%
Python 1.1%