Просмотр исходного кода

Merge remote-tracking branch 'origin/rcc/update' into dev/rust

# Conflicts:
#	rust/crates/rusty-claude-cli/src/main.rs
Yeachan-Heo 2 месяцев назад
Родитель
Сommit
bec07658b8
4 измененных файлов с 420 добавлено и 185 удалено
  1. 3 0
      rust/Cargo.lock
  2. 10 0
      rust/README.md
  3. 3 0
      rust/crates/rusty-claude-cli/Cargo.toml
  4. 404 185
      rust/crates/rusty-claude-cli/src/main.rs

+ 3 - 0
rust/Cargo.lock

@@ -1091,8 +1091,11 @@ dependencies = [
  "compat-harness",
  "crossterm",
  "pulldown-cmark",
+ "reqwest",
  "runtime",
+ "serde",
  "serde_json",
+ "sha2",
  "syntect",
  "tokio",
  "tools",

+ 10 - 0
rust/README.md

@@ -84,6 +84,15 @@ cargo run -p rusty-claude-cli -- logout
 
 This removes only the stored OAuth credentials and preserves unrelated JSON fields in `credentials.json`.
 
+### Self-update
+
+```bash
+cd rust
+cargo run -p rusty-claude-cli -- self-update
+```
+
+The command checks the latest GitHub release for `instructkr/clawd-code`, compares it to the current binary version, downloads the matching binary asset plus checksum manifest, verifies SHA-256, replaces the current executable, and prints the release changelog. If no published release or matching asset exists, it exits safely with an explanatory message.
+
 ## Usage examples
 
 ### 1) Prompt mode
@@ -163,6 +172,7 @@ cargo run -p rusty-claude-cli -- --resume ~/.claude/sessions/session-123456.json
 - `dump-manifests` — print extracted upstream manifest counts
 - `bootstrap-plan` — print the current bootstrap skeleton
 - `system-prompt [--cwd PATH] [--date YYYY-MM-DD]` — render the synthesized system prompt
+- `self-update` — update the installed binary from the latest GitHub release when a matching asset is available
 - `--help` / `-h` — show CLI help
 - `--version` / `-V` — print the CLI version and build info locally (no API call)
 - `--output-format text|json` — choose non-interactive prompt output rendering

+ 3 - 0
rust/crates/rusty-claude-cli/Cargo.toml

@@ -11,8 +11,11 @@ commands = { path = "../commands" }
 compat-harness = { path = "../compat-harness" }
 crossterm = "0.28"
 pulldown-cmark = "0.13"
+reqwest = { version = "0.12", default-features = false, features = ["blocking", "json", "rustls-tls"] }
 runtime = { path = "../runtime" }
+serde = { version = "1", features = ["derive"] }
 serde_json = "1"
+sha2 = "0.10"
 syntect = "5"
 tokio = { version = "1", features = ["rt-multi-thread", "time"] }
 tools = { path = "../tools" }

Разница между файлами не показана из-за своего большого размера
+ 404 - 185
rust/crates/rusty-claude-cli/src/main.rs


Некоторые файлы не были показаны из-за большого количества измененных файлов