Skip to content

An agent-managed museum exhibit, built in Rust with Gajae-Code / LazyCodex — developed and maintained with no human intervention.

Rust

feat: default OAuth config for claude.com, merge UI polish rendering

Yeachan-Heoa9ac7e5bb800
diff --git a/.claude.json b/.claude.json
new file mode 100644
index 00000000..e0e4c180
--- /dev/null
+++ b/.claude.json
@@ -0,0 +1,5 @@
+{
+ "permissions": {
+ "defaultMode": "dontAsk"
+ }
+}
diff --git a/.gitignore b/.gitignore
index 324ae1de..cfa4cf33 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,6 @@ __pycache__/
archive/
.omx/
.clawd-agents/
+# Claude Code local artifacts
+.claude/settings.local.json
+.claude/sessions/
diff --git a/CLAUDE.md b/CLAUDE.md
new file mode 100644
index 00000000..d56da6e0
--- /dev/null
+++ b/CLAUDE.md
@@ -0,0 +1,21 @@
+# CLAUDE.md
+
+This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
+
+## Detected stack
+- Languages: Rust.
+- Frameworks: none detected from the supported starter markers.
+
+## Verification
+- Run Rust verification from `rust/`: `cargo fmt`, `cargo clippy --workspace --all-targets -- -D warnings`, `cargo test --workspace`
+- `src/` and `tests/` are both present; update both surfaces together when behavior changes.
+
+## Repository shape
+- `rust/` contains the Rust workspace and active CLI/runtime implementation.
+- `src/` contains source files that should stay consistent with generated guidance and tests.
+- `tests/` contains validation surfaces that should be reviewed alongside code changes.
+
+## Working agreement
+- Prefer small, reviewable changes and keep generated bootstrap files aligned with actual repo workflows.
+- Keep shared defaults in `.claude.json`; reserve `.claude/settings.local.json` for machine-local overrides.
+- Do not overwrite existing `CLAUDE.md` content automatically; update it intentionally when repo workflows change.
diff --git a/rust/.claude/sessions/session-1775012674485.json b/rust/.claude/sessions/session-1775012674485.json
new file mode 100644
index 00000000..7c66d083
--- /dev/null
+++ b/rust/.claude/sessions/session-1775012674485.json
@@ -0,0 +1 @@
+{"messages":[{"blocks":[{"text":"clear","type":"text"}],"role":"user"},{"blocks":[{"text":"\n\nI've cleared the conversation. How can I help you today?","type":"text"}],"role":"assistant","usage":{"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"input_tokens":4272,"output_tokens":17}}],"version":1}
\ No newline at end of file
diff --git a/rust/.claude/sessions/session-1775012687059.json b/rust/.claude/sessions/session-1775012687059.json
new file mode 100644
index 00000000..df02aaa0
--- /dev/null
+++ b/rust/.claude/sessions/session-1775012687059.json
@@ -0,0 +1 @@
+{"messages":[{"blocks":[{"text":"exit","type":"text"}],"role":"user"},{"blocks":[{"text":"\n\nGoodbye! 👋","type":"text"}],"role":"assistant","usage":{"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"input_tokens":4272,"output_tokens":10}}],"version":1}
\ No newline at end of file
diff --git a/rust/.claude/sessions/session-1775013221875.json b/rust/.claude/sessions/session-1775013221875.json
new file mode 100644
index 00000000..d45e4917
--- /dev/null
+++ b/rust/.claude/sessions/session-1775013221875.json
@@ -0,0 +1 @@
+{"messages":[],"version":1}
\ No newline at end of file
diff --git a/rust/.clawd-todos.json b/rust/.clawd-todos.json
index 4474dca0..18efc905 100644
--- a/rust/.clawd-todos.json
+++ b/rust/.clawd-todos.json
@@ -1,22 +1,27 @@
[
{
- "content": "Phase 0: Structural Cleanup — spawn 4 agents for 0.1-0.4",
- "activeForm": "Executing Phase 0: Structural Cleanup via sub-agents",
- "status": "in_progress"
+ "content": "Architecture & dependency analysis",
+ "activeForm": "Complete",
+ "status": "completed"
+ },
+ {
+ "content": "Runtime crate deep analysis",
+ "activeForm": "Complete",
+ "status": "completed"
},
{
- "content": "Phase 1.1-1.2: Status bar with live HUD and token counter",
- "activeForm": "Awaiting Phase 0",
- "status": "pending"
+ "content": "CLI & Tools analysis",
+ "activeForm": "Complete",
+ "status": "completed"
},
{
- "content": "Phase 2.4: Remove artificial 8ms stream delay",
- "activeForm": "Awaiting Phase 0",
- "status": "pending"
+ "content": "Code quality verification",
+ "activeForm": "Complete",
+ "status": "completed"
},
{
- "content": "Phase 3.1: Collapsible tool output",
- "activeForm": "Awaiting Phase 0",
- "status": "pending"
+ "content": "Synthesize findings into unified report",
+ "activeForm": "Writing report",
+ "status": "in_progress"
}
]
\ No newline at end of file
diff --git a/rust/crates/rusty-claude-cli/src/main.rs b/rust/crates/rusty-claude-cli/src/main.rs
index 0e9c8cfd..c17e401b 100644
--- a/rust/crates/rusty-claude-cli/src/main.rs
+++ b/rust/crates/rusty-claude-cli/src/main.rs
@@ -28,7 +28,7 @@ use runtime::{
parse_oauth_callback_request_target, save_oauth_credentials, ApiClient, ApiRequest,
AssistantEvent, CompactionConfig, ConfigLoader, ConfigSource, ContentBlock,
ConversationMessage, ConversationRuntime, MessageRole, OAuthAuthorizationRequest,
- OAuthTokenExchangeRequest, PermissionMode, PermissionPolicy, ProjectContext, RuntimeError,
+ OAuthConfig, OAuthTokenExchangeRequest, PermissionMode, PermissionPolicy, ProjectContext, RuntimeError,
Session, TokenUsage, ToolError, ToolExecutor, UsageTracker,
};
use serde_json::json;
@@ -428,15 +428,26 @@ fn print_bootstrap_plan() {
}
}
+fn default_oauth_config() -> OAuthConfig {
+ OAuthConfig {
+ client_id: String::from("9d1c250a-e61b-44d9-88ed-5944d1962f5e"),
+ authorize_url: String::from("https://platform.claude.com/oauth/authorize"),
+ token_url: String::from("https://platform.claude.com/v1/oauth/token"),
+ callback_port: None,
+ manual_redirect_url: None,
+ scopes: vec![
+ String::from("user:profile"),
+ String::from("user:inference"),
+ String::from("user:sessions:claude_code"),
+ ],
+ }
+}
+
fn run_login() -> Result<(), Box<dyn std::error::Error>> {
let cwd = env::current_dir()?;
let config = ConfigLoader::default_for(&cwd).load()?;
- let oauth = config.oauth().ok_or_else(|| {
- io::Error::new(
- io::ErrorKind::NotFound,
- "OAuth config is missing. Add settings.oauth.clientId/authorizeUrl/tokenUrl first.",
- )
- })?;
+ let default_oauth = default_oauth_config();
+ let oauth = config.oauth().unwrap_or(&default_oauth);
let callback_port = oauth.callback_port.unwrap_or(DEFAULT_OAUTH_CALLBACK_PORT);
let redirect_uri = runtime::loopback_redirect_uri(callback_port);
let pkce = generate_pkce_pair()?;