TGYD-helige/dsh-plugins--packages-dsh-langfuse ↗★ 2

@amaster.ai/dsh-langfuse

Langfuse observability plugin for DeepSeek Harness: one generation per LLM call with a nested llm-request span, one span per tool call, one trace per session turn, subagent child sessions nested under the parent's tree. 适合需要对 LLM 调用、工具执行及会话进行详细追踪与性能分析的开发者。

パッケージ
@amaster.ai/dsh-langfuse
互換性
未検証
Harness ピア範囲
>=0.1.5-rc.1 || >=0.1.6-alpha.1 || >=0.1.7-alpha.1 || >=0.2.0-rc.1
Cordis ピア範囲
^4.0.1
バージョン
0.1.0
ライセンス
MIT
最終更新
2026/09/29

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:TGYD-helige/dsh-plugins#c5e90b86403a6463b8459173dc2d187f8c78b067&path:packages/dsh-langfuse

ドキュメント

README 全文を読む ↗

Configuration

Disabled by default. Configure via the profile's cordis.patch.yml:

- insert:
    - id: langfuse
      name: '@amaster.ai/dsh-langfuse'
      config:
        enabled: true
        publicKey: pk-lf-...
        secretKey: sk-lf-...            # secret role
        baseUrl: https://cloud.langfuse.com
        traceName: dsh-turn
        captureContent: true            # set false to record metadata only

Buffered spans drain on session/flush(session); the exporter shuts down with the plugin fiber.

With captureContent: true, both llm-call and llm-request inputs contain every llm/stream request option except the non-serializable AbortSignal. New request fields pass through without a plugin update. Langfuse's separate generation modelParameters attribute summarizes the known sampling fields; it is not part of either request input. These are dsh-side values, not exact provider HTTP payloads: adapters may add defaults, project messages/tools, or rename fields after this seam. With captureContent: false, inputs keep structural counts while the separate modelParameters attribute keeps safe parameter metadata.

Hook spans appear when a dsh hook bridge emits the paired session records. The current hook/result record does not contain stdout; successful script output can appear in the LLM request when the bridge injects it as context, while the hook span reports decision, exit code, duration, and bounded stderr. SessionStart runs before the first turn and does not emit these records, so it has no hook span.

Observability is a no-throw seam: backend errors are logged with a [dsh-langfuse] prefix and never escape into the agent loop.