Commit Graph

1013 Commits

Author SHA1 Message Date
Bellman 24ccb59bd2
Merge pull request #2851 from ultraworkers/docs/roadmap-329-slash-agents-json-opacity
docs(roadmap): add #329 for slash agents JSON opacity
2026-04-29 23:33:47 +09:00
Yeachan-Heo 0e8e75ef75 docs(roadmap): add #329 for slash agents JSON opacity
Constraint: Respond to dogfood nudge with exactly one concrete clawability pinpoint from direct claw-code use.\nEvidence: rebuilt actual debug binary at git_sha 0f7578c0; compared resume-safe /agents --output-format json with top-level claw agents --output-format json.\nFinding: slash /agents JSON only exposes kind,text while top-level agents JSON exposes structured agents[] inventory and provenance.\nTested: cargo run --manifest-path rust/Cargo.toml --bin claw -- version --output-format json; ./rust/target/debug/claw --resume latest /agents --output-format json; ./rust/target/debug/claw agents --output-format json; git diff --check; scripts/fmt.sh --check.\nNot-tested: full Rust suite; roadmap-only documentation change.
2026-04-29 14:01:36 +00:00
Bellman 0f7578c064
Merge pull request #2849 from ultraworkers/docs/roadmap-328-dogfood-pinpoint
Add ROADMAP #328 for native-agent source provenance
2026-04-29 22:35:51 +09:00
Yeachan-Heo 213d406cbf Record why native-agent provenance needs dogfood follow-up
Constraint: Scope requested ROADMAP.md only with exactly one new #328 pinpoint from direct claw dogfood.\nRejected: Implementing the agents-help fix now | user requested roadmap-only evidence item.\nConfidence: high\nScope-risk: narrow\nDirective: Keep agent help source roots derived from the same loader registry as agents list; do not hand-maintain a divergent root list.\nTested: cargo run --manifest-path rust/Cargo.toml --bin claw -- version --output-format json; ./rust/target/debug/claw version --output-format json; ./rust/target/debug/claw agents help --output-format json; ./rust/target/debug/claw agents --output-format json; git diff --check; scripts/fmt.sh --check\nNot-tested: Full Rust test suite; roadmap-only documentation change.
2026-04-29 13:33:23 +00:00
Bellman ee85fed6ca
Merge pull request #2847 from ultraworkers/docs/roadmap-327-dogfood-pinpoint
Add ROADMAP #327 for MCP help source mismatch
2026-04-29 22:06:45 +09:00
Yeachan-Heo 3a34d83749 Record why MCP source help needs dogfood follow-up
Constraint: Scope limited to ROADMAP.md and one new pinpoint #327 from actual rebuilt claw dogfood.
Rejected: Code fix in this branch | user requested roadmap-only filing.
Confidence: high
Scope-risk: narrow
Directive: Keep mcp help source lists derived from actual config discovery, not hard-coded partial docs.
Tested: ./rust/target/debug/claw version --output-format json; ./rust/target/debug/claw mcp --help; ./rust/target/debug/claw mcp help --output-format json; temp .claw.json mcp list proof; git diff --check; scripts/fmt.sh --check
Not-tested: Full Rust test suite, documentation-only change.
2026-04-29 13:02:27 +00:00
Bellman 981aff7c8b
Merge pull request #2845 from ultraworkers/docs/roadmap-326-dogfood-pinpoint
docs(roadmap): add #326 pane inventory opacity pinpoint
2026-04-29 21:35:26 +09:00
Yeachan-Heo c94940effa docs: add roadmap 326 pane inventory opacity 2026-04-29 12:33:36 +00:00
Bellman b90875fa8e
Merge pull request #2843 from ultraworkers/docs/roadmap-325-help-json-schema
docs(roadmap): add #325 help json schema opacity pinpoint
2026-04-29 21:05:12 +09:00
Yeachan-Heo 2567cbcc78 Pin help JSON schema opacity for automation
Document the dogfood gap where help JSON stays parseable but hides command metadata inside a prose message, so future implementation can expose machine-readable command, slash-command, and resume-safety fields.\n\nConstraint: user requested ROADMAP.md-only pinpoint for issue #325 from origin/main d607ff36.\nRejected: implementing the schema now | requested fix shape is roadmap documentation only.\nConfidence: high\nScope-risk: narrow\nDirective: keep message for humans while adding schema/versioned structured help metadata when implementing.\nTested: git diff --check; scripts/fmt.sh --check\nNot-tested: runtime CLI behavior unchanged by docs-only change
2026-04-29 12:02:14 +00:00
Bellman d607ff3674
Merge pull request #2840 from ultraworkers/docs/roadmap-324-stale-binary-provenance
docs(roadmap): add #324 stale binary provenance pinpoint
2026-04-29 20:34:27 +09:00
Yeachan-Heo cdf6282965 Record why stale binary provenance needs a roadmap pin
Constraint: Documentation-only follow-up from current main e7074f47 after PR #2838; edit scope limited to ROADMAP.md.\nRejected: Implementing provenance detection now | user requested roadmap entry only.\nConfidence: high\nScope-risk: narrow\nDirective: Future implementation should compare embedded build git_sha/build date to workspace HEAD/dirty state without leaking secrets.\nTested: git diff --check; scripts/fmt.sh --check\nNot-tested: Runtime provenance behavior; this commit only records the roadmap requirement.
2026-04-29 11:31:19 +00:00
Bellman e7074f47ee
Merge pull request #2838 from ultraworkers/docs/roadmap-322-323-clean
docs(roadmap): add #322 #323 — json stream corruption and session identity contradiction
2026-04-29 19:40:50 +09:00
YeonGyu-Kim 9468383b67 docs(roadmap): add #322 #323 — json stream corruption and session identity contradiction 2026-04-29 19:38:00 +09:00
Bellman 1da2781816
Merge pull request #2835 from ultraworkers/docs/roadmap-249-issue-github-oauth-opacity
docs(roadmap): add #249 issue GitHub OAuth opacity pinpoint
2026-04-29 19:31:50 +09:00
Yeachan-Heo 9037430d52 docs(roadmap): add #249 issue github oauth opacity pinpoint 2026-04-29 10:01:16 +00:00
Bellman 8e22f757d8
Merge pull request #2834 from ultraworkers/docs/roadmap-248-prompt-mode-silent-hang
docs(roadmap): add #248 prompt-mode silent-hang pinpoint
2026-04-29 18:31:48 +09:00
zhaoyanchao 3810cbb5e4 chore: 添加 IntelliJ IDEA 项目配置文件
添加 .idea 目录下的 VCS、检查配置、模块设置等 IntelliJ IDEA 项目配置文件,以便在 IDE 中正确管理项目。
2026-04-29 17:18:40 +08:00
Yeachan-Heo 7676b376ae docs(roadmap): add #248 prompt-mode silent-hang pinpoint 2026-04-29 08:24:37 +00:00
Sigrid Jin (ง'̀-'́)ง oO 1011a83823
Merge pull request #2829 from ultraworkers/fix/issue-320-session-lifecycle-classification
Fix session lifecycle classification for idle tmux shells
2026-04-29 16:11:58 +09:00
Yeachan-Heo 1376d92064 Filter stub commands from resume-safe help
Keep claw --help's resume-safe slash command summary aligned with the interactive command list by filtering STUB_COMMANDS and adding regression coverage.
2026-04-29 03:31:34 +00:00
zhaoyanchao f9a3993335 更改github workflow 2026-04-29 10:12:03 +08:00
zhaoyanchao 94383375d6 添加deepseek api 支持 2026-04-29 10:08:08 +08:00
zhaoyanchao 7fa548e273 拉取原分支 2026-04-28 23:42:26 +08:00
zhaoyanchao f27ec8a2f4 提交 2026-04-28 23:41:50 +08:00
zhaoyanchao cf5264a7a5 feat(worker): 添加工具权限提示检测与状态处理
- 在 worker 启动过程中添加对 MCP/工具权限提示的检测
- 新增 WorkerStatus::ToolPermissionRequired 状态和相应事件分类
- 扩展 StartupEvidenceBundle 以记录工具权限提示信息
- 在 readiness 快照中将工具权限阻塞的 worker 标记为 blocked
- 修复 allowedTools 空列表验证,防止无效的 --allowedTools 参数
- 更新 CLAUDE.md 文档,统一使用 scripts/fmt.sh 进行代码格式化
- 在 trust_resolver 中添加模式匹配和序列化支持
2026-04-28 23:33:31 +08:00
zhaoyanchao 0a868b82e6 docs: 将README.md替换为中文项目简介
- 移除原有英文README内容,仅保留简短中文介绍
- 添加README-old.md保存原有完整文档
- 简化项目描述,聚焦于核心信息
2026-04-28 22:49:22 +08:00
Yeachan-Heo be53e04671 Classify saved sessions by live work rather than pane existence
Operator status previously treated any tmux pane in a workspace as equivalent to active work. The new classifier uses tmux pane command/path metadata as a soft signal, treats plain shells as idle, and adds dirty-worktree abandoned markers to status and session-list output for clawhip consumers.

Constraint: Keep issue #320 prototype minimal and additive without new dependencies

Rejected: Screen-scraping pane output | fragile and broader than needed for lifecycle classification

Confidence: high

Scope-risk: narrow

Tested: cargo test -p rusty-claude-cli

Tested: cargo check -p rusty-claude-cli

Not-tested: cargo clippy -p rusty-claude-cli --all-targets -- -D warnings is blocked by pre-existing commands crate clippy::unnecessary_wraps warnings
2026-04-28 13:12:37 +00:00
Yeachan-Heo cb56dc12ab Document Rust formatting wrapper
Make scripts/fmt.sh robust to caller cwd and document it as the supported repo-root formatting entrypoint for the Rust workspace.
2026-04-28 09:38:46 +00:00
Yeachan-Heo 71686a20fc Resolve fmt wrapper path from its own directory
The formatting wrapper should remain safe when invoked through different current directories or shell contexts, so resolve the script directory before entering the Rust workspace and forwarding cargo fmt arguments.

Constraint: Wrapper must be runnable from repo root while forwarding flags like --check
Rejected: Leave relative dirname cd | less robust if invocation context changes
Confidence: high
Scope-risk: narrow
Tested: scripts/fmt.sh --check
Tested: git diff --check
2026-04-28 09:38:40 +00:00
Yeachan-Heo 07992b8a1b Make Rust formatting guidance runnable from repo root
The Rust crate layout expects formatting to run from the rust directory, so add a root-level wrapper that preserves the working command while forwarding user flags like --check. Documentation now points contributors at the wrapper instead of the misleading virtual-workspace manifest invocation.

Constraint: Root-level cargo fmt --manifest-path rust/Cargo.toml is misleading for this virtual workspace
Rejected: Document cd rust && cargo fmt directly | a root wrapper gives one stable repo-root command
Confidence: high
Scope-risk: narrow
Tested: scripts/fmt.sh --check
Tested: git diff --check
2026-04-28 09:38:08 +00:00
Yeachan-Heo 74ea754d29 Restore Rust formatting compliance
Run rustfmt from the Rust workspace so CI format checks pass without changing behavior.

Constraint: Scope is formatting-only across tracked Rust files

Confidence: high

Scope-risk: narrow

Tested: cd rust && cargo fmt --check

Tested: git diff --check
2026-04-28 09:19:16 +00:00
zhaoyanchao ae0623316b test: 移除已弃用的 Qwen 模型错误提示测试
清理测试代码中针对已弃用 `qwen-plus` 模型的错误提示断言,
该模型现已使用 `qwen/qwen-plus` 格式,相关提示逻辑已移除。
2026-04-28 15:19:37 +08:00
zhaoyanchao 2a985c1cc7 feat(runtime): 为上下文超限错误添加自动重试机制
添加 RuntimeError::is_retryable_context_error 方法,用于识别可重试的上下文错误(如令牌超限、上下文窗口超限等)。当对话执行遇到此类错误时,自动触发会话压缩并重试,而非直接失败,提高系统的鲁棒性。
2026-04-28 14:53:57 +08:00
zhaoyanchao 8fc9296fed refactor(commands): 简化函数签名并移除多余括号以提升代码整洁性
将多个函数的参数签名改为单行形式,减少视觉噪音
移除render_mcp_report_for函数中不必要的括号,使代码更简洁
更新测试代码以匹配新的函数调用方式
2026-04-28 14:38:34 +08:00
zhaoyanchao 5b353aee26 style: 应用 rustfmt 格式化代码并调整部分代码风格
- 对多个文件应用 rustfmt 格式化,统一代码风格
- 调整长行分割以符合代码规范
- 统一导入语句顺序(std 相关导入在前)
- 使用内联格式字符串(format!("{now}"))
- 移除不必要的空行和尾随空格
- 为部分函数添加 #[must_use] 属性
- 优化测试断言格式以提高可读性
2026-04-28 14:26:16 +08:00
zhaoyanchao 490fffb530 ci: 删除冗余工作流并优化CI触发策略
移除 .github/workflows/rust.yml 文件,其功能已由 rust-ci.yml 覆盖。
修改 rust-ci.yml,删除 push 触发器以减少资源消耗,仅保留 pull_request 触发和手动触发。
2026-04-28 14:08:53 +08:00
zhaoyanchao d1693bc918 ci(release): 添加musl构建目标并优化Linux二进制文件
- 为Linux构建添加musl目标以提升兼容性
- 为macOS ARM64添加明确的构建目标
- 添加musl-tools安装步骤用于Linux环境
- 更新构建路径以适配目标架构目录结构
- 对Linux二进制文件执行strip操作减小体积
2026-04-28 14:05:14 +08:00
zhaoyanchao 6cf90d6878 Merge branch 'main' of github.com:davids-dot/claw-code 2026-04-28 13:51:19 +08:00
zhaoyanchao e4e3ad50e3 feat: 增强模型支持和错误处理
- 扩展 OpenAI 兼容客户端以支持 ali 和 glm 前缀的路由
- 改进凭证检测逻辑,优先使用 DASHSCOPE_API_KEY 当 OPENAI_API_KEY 不存在时
- 增强 .env 文件搜索路径,支持从可执行文件目录和家目录加载
- 改进 API 错误处理,自动截断会话历史并继续对话
- 为 missing_credentials 错误添加堆栈跟踪以便调试
- 扩展模型验证以支持更多 Dashscope 和 xAI 模型
- 添加系统升级指令文档和调试脚本
- 清理旧的会话文件和待办事项
2026-04-28 13:51:09 +08:00
Davids dot e62139d1d7
Add GitHub Actions workflow for Rust projects 2026-04-28 13:48:20 +08:00
Yeachan-Heo 77afde768c Clarify allowed tool status handling
Reject empty --allowedTools inputs instead of treating them as an empty restriction, and surface status JSON metadata that distinguishes default unrestricted tools from flag-provided allow lists.

Confidence: high
Scope-risk: narrow
Tested: cargo test -p rusty-claude-cli rejects_empty_allowed_tools_flag -- --nocapture
Tested: cargo test -p tools allowed_tools_rejects_empty_token_lists -- --nocapture
Tested: cargo check -p rusty-claude-cli -p tools
Tested: cargo test -p rusty-claude-cli -p tools
Not-tested: full workspace cargo fmt --check is blocked by pre-existing unrelated formatting drift
2026-04-28 05:44:14 +00:00
Yeachan-Heo 6db68a2baa Expose tool permission gates as structured worker blockers
Worker boot could previously stall on an interactive MCP/tool permission prompt while readiness and startup-timeout surfaces only had generic idle/no-evidence shapes. This adds a first-class blocked lifecycle state, structured event payload, startup evidence fields, and regression coverage so callers can report the exact server/tool gate instead of pane-scraping.

Constraint: ROADMAP #200 requires tool/server identity, prompt age, and session-only versus always-allow capability in status/evidence surfaces
Rejected: Treat MCP/tool prompts as trust gates | conflates distinct prompts and loses tool identity
Rejected: Leave allow-scope as pane text only | clawhip still could not classify the blocker without scraping
Confidence: high
Scope-risk: moderate
Directive: Keep tool_permission_required distinct from trust_required; downstream claws rely on server/tool payload plus allow-scope metadata
Tested: cargo test -p runtime tool_permission
Tested: cargo fmt -p runtime -- --check && cargo clippy -p runtime --all-targets -- -D warnings && cargo test -p runtime
Tested: cargo test --workspace
Not-tested: live interactive MCP permission prompt in tmux
2026-04-27 09:28:09 +00:00
Yeachan-Heo 5b910356a2 Preserve trust boundaries during pulled follow-up
The pull brought the branch current with origin/main while replaying local follow-up work. Conflict resolution kept the roadmap/progress additions and integrated the runtime event/trust changes with upstream's newer surfaces.

The trust allowlist now treats worktree_pattern as an additional required predicate, including the missing-worktree case, so auto-trust cannot fall back to cwd-only matching when a worktree constraint was declared. The runtime formatting cleanup keeps clippy/fmt green after the merge.

Constraint: Local branch was 109 commits behind origin/main with dirty tracked follow-up work.

Rejected: Drop the autostash after conflict resolution | keeping it preserves a reversible safety backup for unrelated recovery.

Confidence: high

Scope-risk: moderate

Directive: Do not relax worktree_pattern matching without preserving the missing-worktree regression.

Tested: git diff --cached --check; cargo fmt -p runtime -- --check; cargo clippy -p runtime --all-targets -- -D warnings; cargo test -p runtime; cargo test --workspace; architect verification approved

Not-tested: Live tmux/worker auto-trust behavior outside unit/integration tests
2026-04-27 09:05:50 +00:00
zhaoyanchao 2b5e8181ba feat(bash): 添加 git push 到主分支时检测并发送 ship provenance事件
- 在 bash 执行器中集成 git push 检测逻辑
- 添加获取当前分支、提交哈希和 Git 用户信息的功能- 实现 ShipProvenance 结构体和相关事件类型
- 发送 ship.prepared事件到 LaneEvent 系统- 添加对请求大小限制的错误处理和建议操作字段
- 更新临时目录生成逻辑以避免测试冲突
- 扩展初始化命令的结构化输出支持
2026-04-24 13:38:09 +08:00
zhaoyanchao 66e1dece53 本地调整 2026-04-24 12:54:57 +08:00
Davids dot e6acf5e0f9
Merge branch 'ultraworkers:main' into main 2026-04-24 12:52:24 +08:00
YeonGyu-Kim a389f8dff1 file: #160 — session_store missing list_sessions, delete_session, session_exists — claw cannot enumerate or clean up sessions without filesystem hacks 2026-04-22 08:47:52 +09:00
YeonGyu-Kim 7a014170ba file: #159 — run_turn_loop hardcodes empty denied_tools, permission denials absent from multi-turn sessions 2026-04-22 06:48:03 +09:00
YeonGyu-Kim 986f8e89fd file: #158 — compact_messages_if_needed drops turns silently, no structured compaction event 2026-04-22 06:37:54 +09:00