Commit Graph

531 Commits

Author SHA1 Message Date
bellman
2f0b5b36eb fix: wrap concurrent ENOENT as domain-specific session error (#112)
Session save_to_path now wraps ENOENT errors from rotate and atomic
write with a clear "possible concurrent modification" message instead
of surfacing raw OS errno. Helps operators debugging race conditions
when multiple claw invocations touch the same session file.

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 10:19:43 +09:00
bellman
c848eeb768 fix: status JSON reports all workspace panes not just the first (#326)
SessionLifecycleSummary now collects all matching tmux panes into an
all_panes field and includes them in the JSON output. Previously the
status command returned on the first non-idle pane, losing all other
active panes in the same workspace/session.

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 10:15:23 +09:00
bellman
d4aad7103e fix: add actionable auth hint to 401/403 API errors (#28)
401 and 403 errors now include a hint explaining which env vars to
check for each provider (OPENAI_API_KEY, ANTHROPIC_API_KEY, etc.)
and suggesting claw doctor for credential verification.

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 10:10:24 +09:00
bellman
b60cbebb3a feat: skills install --project flag for project-level scope (#95)
claw skills install --project <path> now installs to .claw/skills/
in the current project instead of the user-level registry. Skills
installed at project level are already discovered by the existing
registry system. Both text and JSON handlers updated.

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 10:05:36 +09:00
bellman
7c4bcd92b6 fix: expand ${VAR} and ~/ in MCP config fields (#92)
MCP server config now expands ${VAR} environment variable references
and ~/ home directory prefix in command, args, and url fields. Previously
these values were passed verbatim to execve/URL-parse, causing silent
"No such file or directory" failures for standard config patterns.

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 10:00:45 +09:00
bellman
f8822aabdb fix: config merge concatenates arrays instead of replacing (#106)
deep_merge_objects now concatenates arrays when both layers provide
the same key. Previously permissions.allow, hooks.PreToolUse, etc.
from earlier config layers (e.g. ~/.claw/settings.json) were silently
discarded when a later layer (e.g. project .claw/settings.json) set
the same key. Now arrays are merged additively across layers.

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 09:57:22 +09:00
bellman
aca6584fd5 fix: normalize permission rule tool names to lowercase (#94)
PermissionRule::parse now normalizes tool_name to lowercase, matching
the runtime convention. Previously "Bash(rm:*)" would never match
because the runtime tool name is lowercase "bash". Same fix applied
to denied_tools list.

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 09:53:26 +09:00
bellman
b8cbb1834f fix: /clear preserves session_id to prevent resume divergence (#114)
/resume mode /clear now preserves the original session_id instead of
generating a new one. This prevents the filename/meta-header divergence
where /session list reported an id that --resume couldn't find.

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 09:47:37 +09:00
bellman
cb027adf65 fix: /session switch and /session fork return structured JSON in resume mode (#113)
/session switch and /session fork now return structured JSON with
kind:error, error_kind:unsupported_resumed_command, and actionable
hint instead of a raw error string that resume callers couldn't parse.

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 09:42:16 +09:00
bellman
5bdffbe161 docs: mark ROADMAP #330 DONE (verified /cost and /stats work in resume)
Verified with a roundtrip test: creating a session with usage data
({input_tokens:100, output_tokens:50}), saving to JSONL, loading via
--resume, and running /cost and /stats both return correct values.
The UsageTracker::from_session reads message.usage which is properly
serialized/deserialized by ConversationMessage::to_json/from_json.

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 09:32:23 +09:00
bellman
04f18862a8 fix: strip macOS /private symlink prefix from JSON cwd (#421)
Add friendly_cwd() helper that strips /private prefix on macOS so
status, doctor, and diff JSON output matches user-visible invocation
cwd instead of the canonicalized /private/tmp path.

Applied to status_context() and render_doctor_report().

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 09:08:09 +09:00
bellman
f0e10ff182 docs: mark ROADMAP #342 DONE (covered by #325)
342: /commands command-index alias is now covered by /help --output-format
json which returns structured commands array with 139 entries (name,
summary, resume_supported per command). Implemented in #325.

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 08:56:25 +09:00
bellman
0cab03df75 fix: /model returns structured JSON in resume mode (#343)
/model was in the unsupported resume group but is a read-only command
that can safely return model configuration. Now returns default_model,
configured_model, resolved_model, and requested_model in JSON mode.

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 08:54:11 +09:00
bellman
eb86f4d2c3 fix: reject --compact for non-prompt subcommands (#98)
--compact was silently ignored when used with non-prompt commands like
claw --compact status or claw --compact config. Now returns a typed
error with guidance on proper usage.

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 07:25:49 +09:00
bellman
6c3d7be370 fix: /tasks returns structured JSON in resume mode (#341)
/tasks was marked resume_supported but rejected in resume mode.
Now returns a structured JSON response with kind:'tasks' and note
that background tasks are only available in the interactive REPL.

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 07:15:36 +09:00
bellman
cd18cf5385 fix: /config help returns structured section list (#344)
/config help now returns a list of available config sections in both
text and JSON mode instead of treating 'help' as an unsupported section.

Text mode shows available sections with descriptions.
JSON mode returns available_sections array with loaded_keys count.

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 07:05:16 +09:00
bellman
2f3120e70a fix: add structured command list to top-level help JSON (#325)
Top-level 'claw --output-format json help' now includes a 'commands'
array with name, summary, and resume_supported for each registered
slash command, plus 'total_commands' count.

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 06:57:51 +09:00
bellman
f1a16398fe fix: plugins enable/disable only reloads when state changes (#411)
plugins enable now checks if the plugin was already enabled before
setting reload_runtime:true. Same for disable. Returns 'already enabled'
or 'already disabled' in the message when no state change occurred.

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 06:49:01 +09:00
bellman
8d50276366 docs: mark ROADMAP #339 DONE (/session delete resume-safe)
339: /session delete works in resume mode with --force flag. The
confirmation-required path returns a typed JSON error with hint.
delete-force path performs actual deletion with proper JSON response.

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 06:40:48 +09:00
bellman
13992ade54 docs: mark ROADMAP #129 DONE (verified code flow)
129: MCP server startup does not block credential validation - credentials
are resolved via resolve_cli_auth_source() before build_runtime() which
is where MCP state discovery happens.

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 06:33:20 +09:00
bellman
b04b1d6ac8 feat: detect git rebase/merge/cherry-pick/bisect states (#89)
Add GitOperation enum to detect mid-operation git states from the
branch header in git status --short --branch output.

- Rebase: 'rebasing ...' in branch header
- Merge: '[merge-in-progress]' tag
- Cherry-pick: 'cherry-pick-in-progress' tag
- Bisect: 'bisect-in-progress' tag

Operation state appears in:
- status text: 'rebase-in-progress, dirty · 3 files · ...'
- status JSON: 'git_operation' field (null when no operation)
- git_state headline includes operation prefix

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 06:31:33 +09:00
bellman
934bf2837a fix: validate --base-commit is a hex SHA (#122)
--base-commit now rejects non-hex strings and strings outside 7-64
character range. Matches the pattern used by --reasoning-effort.

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 06:21:24 +09:00
bellman
b94c49c323 fix: use existing path in system-prompt test (#99 fix regression)
The --cwd validation added in #99 rejects non-existent paths, but the
test used /tmp/project which doesn't exist on CI Linux runners. Changed
to /tmp which exists everywhere.

Also marks ROADMAP #123 DONE (--allowedTools normalization verified).

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 06:13:25 +09:00
bellman
5df485cba9 docs: mark ROADMAP #120,121 DONE
120: config parse errors now surfaced via load_error with hint
121: hooks already uses PreToolUse/PostToolUse/Claude Code format

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 06:05:36 +09:00
bellman
c8e973513c fix: redact MCP server sensitive fields in JSON (#90)
MCP server details JSON now redacts args (shows count only),
strips URL query params which may contain tokens, and shows
headers_helper as configured/not-configured boolean instead of
the raw command string. env_keys and header_keys still exposed
(key names only, not values).

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 05:59:52 +09:00
bellman
8f9315bdc9 docs: mark ROADMAP #32,43 DONE with runtime evidence
32: OpenAI model passthrough verified (model: openai/gpt-4, source: flag)
43: Hook ingress opacity fixed (hook_validation structured in status JSON)

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 05:51:18 +09:00
bellman
12a091afe6 docs: mark ROADMAP #111,115 DONE
111: /providers routes to doctor slash command
115: init generates acceptEdits not dontAsk

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 05:48:42 +09:00
bellman
9f0cf3b888 docs: mark ROADMAP #101,104 DONE
101: RUSTY_CLAUDE_PERMISSION_MODE normalize maps aliases to valid modes
104: export CLI path and slash command both return kind:export

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 05:46:04 +09:00
bellman
6e94c1a97f docs: mark ROADMAP #93,109 DONE
93: --resume /tmp returns typed invalid_resume_argument error
109: config validation emits structured ConfigDiagnostic + warnings[]

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 05:40:50 +09:00
bellman
38626cad20 docs: mark ROADMAP #85,88,125,126 DONE
85: skills discovery bounded by git root (nearest_git_root in prompt.rs)
88: instruction file discovery bounded by git root
125: git_state reports 'no_git_repo' when not in git repo
126: config section exposes 'merged' key-value pairs

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 05:36:41 +09:00
bellman
b8f066347b fix: structured bootstrap-plan phases JSON (#412)
bootstrap-plan --output-format json now returns phases as structured
objects with id, label, description, and order fields instead of
raw Rust enum variant name strings. Also exposes total_phases count.

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 05:29:27 +09:00
bellman
5adc751053 docs: mark ROADMAP #97 DONE
97: empty --allowedTools is unrestricted (no restrictions = default mode)

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 05:24:15 +09:00
bellman
adf5bd165e fix: validate --cwd and --date for system-prompt (#99)
--cwd now validates the path exists and is a directory before passing
it to the system prompt renderer. --date rejects values with newlines
or >20 chars to prevent prompt injection.

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 05:18:31 +09:00
bellman
b220366176 docs: mark ROADMAP 81-83,87,91,102,117,128 DONE with direct evidence
81: project_root correctly reports per-CWD paths
82: sandbox correctly reports macOS degraded state (filesystem_active + unsupported)
83: system-prompt --date parameter works correctly
87: default permission_mode is workspace-write from config
91: permission mode aliases resolve to valid modes
102: config-time MCP check is by design for local preflight
117: -p flag parses single token correctly
128: validate_model_syntax rejects malformed models with hints

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 05:10:08 +09:00
bellman
b5d67ef249 docs: mark ROADMAP #105,118 DONE
105: status reads model from .claw.json config (model_source: config)
118: /stats and /tokens both route to stats handler

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 05:04:27 +09:00
bellman
9a40568e1c docs: mark ROADMAP #80,86,100 DONE
80: session lookup error now returns session_not_found with hint
86: .claw.json invalid JSON handled gracefully by config loader
100: binary_provenance exposes git_sha, build_date in status JSON

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 05:02:30 +09:00
bellman
41b3566468 fix: update resume help test for message field parity (#338)
Changed resumed_help_command_emits_structured_json to assert 'message'
field instead of 'text', matching the #338 fix for help JSON field
consistency.

Also marked ROADMAP #340 and #345 DONE with direct runtime evidence:
340: resume /session help now routes JSON to stdout (verified)
345: resume /config <section> now returns section-specific JSON (verified)

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 05:01:05 +09:00
bellman
b86159cbb7 docs: mark ROADMAP #124,127 DONE with direct evidence
124: validate_model_syntax already rejects empty, spaces, and invalid formats
127: subcommand --json already routes to local JSON handlers

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 04:56:06 +09:00
bellman
5e5b9966c0 docs: mark 8 ROADMAP items DONE (78,84,103,107,108,110,116,119)
78: plugins CLI wired as CliAction::Plugins (verified runtime)
84: dump-manifests fixed 2026-06-03
103: agents discovery handles .md with YAML frontmatter (#442)
107: hook validation in doctor JSON (verified runtime)
108: CLI typos → command_not_found (verified runtime)
110: ConfigLoader discovers project/user/local configs
116: unknown keys now emit warnings not errors (#441)
119: bare_slash_command_guidance checks aliases (#772)

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 04:52:40 +09:00
bellman
33f771f3f5 docs: mark ROADMAP #77 DONE (classify_error_kind implemented)
Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 04:51:16 +09:00
bellman
3fbfcc40ca docs: mark ROADMAP 327,328,408,6 DONE with fix evidence
327: mcp help now includes .claw.json in sources list
328: agents help now includes ~/.codex/agents in sources list
408: status JSON now has is_clean boolean field
6: terminal is transport principle — implementation tracked by #810-#816

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 04:47:58 +09:00
bellman
c7c5c11d1e fix: correct help source lists, add is_clean to status JSON
#327: mcp help now includes .claw.json in documented sources list
#328: agents help now includes ~/.codex/agents in documented sources list
#408: added is_clean boolean to status JSON workspace for unambiguous
  dirty-state detection; changed_files documented as total non-clean count
#338: resume help field consistency (committed earlier)

Also marked 52 items with explicit done/verified evidence as DONE
in ROADMAP.md, including product principles (1-6) and items with
confirmed fix text (13-75, 96, 200).

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 04:46:10 +09:00
bellman
c0447e2be1 docs: mark ROADMAP 338,410 DONE with fix evidence
338: resume help now uses 'message' field consistent with top-level help
410: mcp and skills list now expose 'count' field for polymorphic consumption

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 04:35:51 +09:00
bellman
76f9a134ae docs: mark 16 ROADMAP items as DONE with direct verification evidence
Items verified with direct runtime evidence:
- #7: plugins CLI wired as CliAction::Plugins
- #77: classify_error_kind exists with 69 references
- #90: error envelopes carry machine-readable hint field
- #119: bare_slash_command_guidance checks aliases
- #346: agents show returns agent_not_found error
- #348: plugins list returns structured plugins[] array
- #349: plugins show returns plugin_not_found error
- #350: plugins enable returns typed error (not hang)
- #351: plugins disable returns typed error on stdout
- #352: plugins update returns typed error on stdout
- #353: plugins uninstall returns typed error on stdout
- #354: memory list returns interactive_only error
- #355: session list returns structured JSON
- #358: cost --help returns command_not_found
- #380: tokens --help returns command_not_found
- #381: cache --help returns command_not_found

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 04:27:24 +09:00
bellman
9c11325e83 docs: mark additional pre-440 ROADMAP items as DONE
Items verified against current codebase: 322, 323, 329, 337, 422 and
10 early items with confirmed fix evidence.

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 04:23:02 +09:00
bellman
4708ab1611 fix: add structured help JSON and provider BASE_URL validation
#683-#692: help topic JSON now includes usage, purpose, formats,
related, local_only, requires_credentials, and aliases extracted
from help prose. Export and doctor keep their custom structured
responses.

#466: new check_base_url_health() validates ANTHROPIC_BASE_URL,
OPENAI_BASE_URL, XAI_BASE_URL, and DASHSCOPE_BASE_URL for basic
HTTP(S) URL format. Non-http schemes and empty values produce a
warn-level diagnostic.

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 04:14:08 +09:00
bellman
311e719e5d docs: mark ROADMAP 696-697 DONE
696: compact returns interactive_only error in non-interactive mode
697: plugins uninstall already returns typed not-found error

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 03:49:31 +09:00
bellman
b926a9d25f docs: mark ROADMAP 713-716,723,734-735,737,767,771,774-776,781 as DONE
14 items with verified fixes marked as DONE.

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 03:45:14 +09:00
bellman
2f8679bd15 fix: track duplicate global flags in status JSON
status --output-format json now exposes duplicate_flags array listing
any --model, --output-format, or --permission-mode flags specified
more than once. Uses a module-level static for cross-function access.

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 03:36:16 +09:00
bellman
9ef21e23f3 fix: expose merged key-value pairs in config JSON
render_config_json now includes a 'merged' object with actual
key-value pairs from the resolved runtime configuration, not just
the count.

Generated with https://github.com/Yeachan-Heo/gajae-code
Co-authored-by: Gajae Code <dev@gajae-code.com>
2026-06-05 03:12:19 +09:00