Skip to content

Feat/kode observability#48

Draft
Gui-Yue wants to merge 3 commits intoshareAI-lab:mainfrom
Gui-Yue:feat/kode-observability
Draft

Feat/kode observability#48
Gui-Yue wants to merge 3 commits intoshareAI-lab:mainfrom
Gui-Yue:feat/kode-observability

Conversation

@Gui-Yue
Copy link
Copy Markdown
Contributor

@Gui-Yue Gui-Yue commented Apr 4, 2026

Summary

为 KODE SDK 增加 KODE 原生可观测层,包括运行时指标/observation reader、持久化observation 查询后端、OTEL bridge 支持,以及配套的 example / 文档 / 测试。

Motivation / Context

目标是把可观测性建设为 KODE SDK 的能力。

本 PR 主要完成:

  • Agent 暴露运行时 metrics 与 observation reader
  • 提供 observation 的持久化与查询能力
  • 提供 OTEL bridge/export 支持
  • 收敛并明确更安全的公共 observation 模型边界
  • 补齐 example / docs / tests,使能力具备可用性与可评审性

Type of Change

  • Bug fix
  • Feature
  • Refactor
  • Docs
  • Test
  • Chore / Build

Scope / Modules

  • core (agent / events / pool / room / scheduler)
  • infra (db / provider / sandbox / store)
  • tools (fs / bash / mcp / skills / task)
  • skills
  • examples
  • docs (en / zh-CN)
  • tests
  • other: ___

Public API

  • Exports changed in src/index.ts
  • No public API change

Breaking Changes

  • Yes , and attach report(include necessity) and transition plan
  • No

Testing

  • npm run test:unit(required)
  • npm run test:integration(if needed)
  • npm run test:e2e(if needed)

补充验证:

  • npm run build
  • 针对 observability example / shared 文件做过 TypeScript 定向检查
  • 定向执行新增测试:tests/unit/observability/http-example.test.ts
  • 使用本地 .env.test 中的真实 GLM (glm-5) 对 examples/08-observability- http.ts 做过真实端到端 smoke 验证

Impact / Risk

风险等级:低到中低。

主要风险点:

  • 新增 observation 模型与持久化链路
  • scheduler / provider 相关 metadata 变更会影响 observability 数据
  • runtime observation 与 persisted observation 的一致性

风险缓解措施:

  • 已补充 observability 相关单元测试
  • 已新增 example 层 HTTP 包装测试骨架
  • 已用真实 LLM 对 observability example 做 smoke 验证
  • 已明确 HTTP 仅属于应用层,不进入 SDK core

Checklist

  • Docs updated if needed
  • Examples updated if needed
  • New feature includes related tests and docs
  • Tests follow tests/README.md structure
  • Docs follow docs/en + docs/zh-CN format rules
  • No secrets or tokens committed
  • No dist/ changes (unless release)
  • Only one lockfile updated for the package manager used

@Gui-Yue Gui-Yue marked this pull request as draft April 4, 2026 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant