Add structured (JSON) output for tool/agent integration
まだ誰も着手していません。
評価
調査の方向性
The issue names no implementation files, tests, or entry points; begin by locating the claw CLI output path and existing argument parsing. Done means a documented --json or --format json mode emits a machine-readable final result with status and available usage or cost data, optionally following the referenced NDJSON convention.
索引モデルが issue の本文から書いたものです。
説明
What
A machine-readable output mode for claw -- a --json (or --format json) flag that emits a structured final result instead of (or alongside) raw stdout.
Ideally:
- a single final JSON envelope with at least: the result/assistant text, an exit/outcome status, and token usage + cost when available; and/or
- a newline-delimited JSON (NDJSON) event stream for progress, terminated by the final result object (the shape codex
exec --jsonand opencoderun --format jsonalready use).
Why
Tools that drive a coding agent as a non-interactive subprocess need machine-parseable output to integrate it reliably. kazi (an open-source reconciliation controller that drives a coding agent in a loop until a goal's predicates are objectively true) supports multiple harnesses as config-driven profiles -- claude, opencode, codex, and others -- by parsing each harness's structured output for the result and token/cost usage.
Because claw currently emits only raw stdout with no structured envelope, its integration is necessarily best-effort: the raw text can be captured as the result, but there is no reliable way to extract the outcome status or token/cost. A --json mode would let claw be driven as a first-class, cost-accountable harness the same way codex/opencode are.
Suggested shape (for reference)
claw <prompt> --json
# -> {"result": "...", "status": "ok", "usage": {"input_tokens": N, "output_tokens": M, "cost_usd": X}}
Matching the codex/opencode NDJSON convention would let existing parsers be reused. Happy to share how the kazi profile contract works if useful. Thanks!
- 主要言語
- Rust
- スター
- 195k
- フォーク
- 108k
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ultraworkers/claw-code のほかの issue
-
Fix markdown formatting issues in TUI streaming: block-level element newline omission and consecutive empty line accumulation再び着手できるかも @Aditaya08 が 55 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
ultraworkers/claw-code#3259 · コメント 7 件 ·
-
bug: Missing newlines before paragraphs and code blocks in streamed Markdown rendering対応中かも @nankingjing が 94 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
ultraworkers/claw-code#3257 · コメント 2 件 ·
-
[CRITICAL][SECURITY] Untrusted project hooks bypass read-only mode for arbitrary command executionオープン
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
ultraworkers/claw-code#3301 · コメント 6 件 ·
-
Pin all third-party GitHub Actions to immutable commit SHAs across CI workflows再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
ultraworkers/claw-code#3287 · コメント 6 件 · リアクション 1 件 ·
-
難易度 1/5 1〜3時間 初心者へのやさしさ 35/100
ultraworkers/claw-code#3283 · コメント 4 件 ·
ultraworkers/claw-code の issue をすべて見る
似ている issue
-
Add Mimirオープン
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
slavakurilyak/awesome-ai-agents#759 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
compiler-explorer/compiler-explorer#9272 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 63/100
pop-os/cosmic-files#2117 ·
メンテナーはふだん 2 日以内に返信
-
L: java:gradle L: java:maven L: ruby:bundler T: bug 🐞
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
dependabot/dependabot-core#16547 ·
メンテナーはふだん 1 日以内に返信
-
bug status:ready-for-test
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
UniClipboard/UniClipboard#1985 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信