Synced from monorepo

Synced from monorepo

Changes:
- Shell: accept target response id on rewind execute
- Shell: stamp response id on chat user message chunks
- Worktree: optional rebuild and stale git registration cleanup in auto-GC
- Worktree: kind-aware auto-GC TTLs and config knobs
- Worktree: macOS process CWD scan and Unix PID liveness for GC guards
- Worktree: automatic throttled GC on startup (Linux age-based; non-Linux dead-only)
- Pager: add `[ui].combine_queued_prompts` to batch queued follow-ups
- Shell: stop overwriting user skills
- Tools: read markdown in `skills/` directories untruncated
- `/usage` shows per-session token and dollar usage in the TUI
- Security: prompt on environment-dumping `ps` variants
- Security: always-safe `kubectl` no longer runs arbitrary kubeconfig credential plugins without permission
- Tools: make scheduler deletion durable
- Shell: add relocation storage primitives
- Shell: give side model calls their own conversation ids
- Fix five workflow-runtime bugs (budget, pause, cancel, reconnect)
- Security: peel `env -S` / `--split-string` operands in the Bash permission gate (managed deny/ask)
- Pager: expose doctor in the TUI
- Security: block unauthorized RCE via abused safe commands
- Pager idle watcher cue: "1 subagent still running" instead of "watching · 1 subagent"
- Security: block `rg --pre` arbitrary code execution in auto-mode
- Voice: diagnose silent-mic failures (macOS permission) and add doctor/terminal-setup Voice section
- App builder deployer: `allow_forking` and `show_built_with_grok`
- Pager: stop stacking duplicate "Worked for" markers on parked turns
- Shell: support `max` as a distinct reasoning effort tier
- Tools: serialize background `/loop` fires on the whole work unit
- Shell: add working-directory relocation state primitives
- Proto: `ClientToolResult` and `ChatConfig` client-side tools
- Shell: model providers
- Chat: select App Builder product on the Build path
- Shell: attach author identity to feedback when the deployment opts in
- Doctor: fix for SSH wrap setup
- Workflow authoring skills: create-workflow and import-claude-workflow docs
- Add read-only grok doctor
- Sandbox: apply Landlock without a controlling TTY
- Pager: recover image paste over grok wrap on headless remotes
- Pager: make actions screen-mode aware
- Shell: resume sessions when the working directory moves
- Pager: centralize terminal diagnostics
- Workspace: gate inline shell file access
- Pager: centralize terminal probes
- Pager: edit minimal prompts in an external editor
- Pager: standardize backgrounding on Ctrl+B
- Shell: recap rides the parent turn's prompt cache
- Tools: add scheduler lifecycle version clock

Source-Revision: 0f4d7c91b8b2b408333f6de1e8a76cb8eaa71899
This commit is contained in:
grokkybara[bot] 2026-07-21 18:10:23 +00:00
commit 3af4d5d398
556 changed files with 56609 additions and 21892 deletions

View file

@ -560,10 +560,12 @@ mod tests {
match output {
ToolOutputWire::Mcp { blocks } => {
assert_eq!(blocks.len(), 2);
assert!(matches!(&blocks[0], McpBlock::Text { text }
if text == "result text"));
assert!(matches!(&blocks[1], McpBlock::Image { mime_type, .. }
if mime_type == "image/png"));
assert!(
matches!(&blocks[0], McpBlock::Text { text } if text == "result text")
);
assert!(
matches!(&blocks[1], McpBlock::Image { mime_type, .. } if mime_type == "image/png")
);
}
other => panic!("expected Mcp blocks, got {other:?}"),
}

View file

@ -233,8 +233,7 @@ mod tests {
});
let notif = HubNotification::parse(&value).expect("should parse as Unknown, not None");
assert!(
matches!(notif, HubNotification::Unknown { ref method, .. }
if method == "tool.notification"),
matches!(notif, HubNotification::Unknown { ref method, .. } if method == "tool.notification"),
"tool.notification without envelope session_id should fall back to Unknown, got {notif:?}"
);
}
@ -274,8 +273,7 @@ if method == "tool.notification"),
});
let notif = HubNotification::parse(&value).expect("should parse as Unknown, not None");
assert!(
matches!(notif, HubNotification::Unknown { ref method, .. }
if method == "tools_changed"),
matches!(notif, HubNotification::Unknown { ref method, .. } if method == "tools_changed"),
"malformed tools_changed should fall back to Unknown, got {notif:?}"
);
}
@ -357,8 +355,7 @@ if method == "tools_changed"),
});
let notif = HubNotification::parse(&value).expect("should parse as Unknown, not None");
assert!(
matches!(notif, HubNotification::Unknown { ref method, .. }
if method == "tool.notification"),
matches!(notif, HubNotification::Unknown { ref method, .. } if method == "tool.notification"),
"malformed tool.notification should fall back to Unknown, got {notif:?}"
);
}

View file

@ -53,8 +53,7 @@ fn tool_id_rejects_disallowed_characters() {
] {
let err = ToolId::new(bad).unwrap_err();
assert!(
matches!(err, IdError::InvalidFormat { ref value }
if value == bad),
matches!(err, IdError::InvalidFormat { ref value } if value == bad),
"expected InvalidFormat for {bad:?}, got {err:?}"
);
}
@ -74,8 +73,7 @@ fn tool_id_rejects_empty_segments_around_separator() {
for bad in [":foo", "foo:", ":"] {
let err = ToolId::new(bad).unwrap_err();
assert!(
matches!(err, IdError::InvalidFormat { ref value }
if value == bad),
matches!(err, IdError::InvalidFormat { ref value } if value == bad),
"expected InvalidFormat for {bad:?}, got {err:?}"
);
}
@ -105,8 +103,7 @@ fn server_id_rejects_reserved_auto_prefix() {
for bad in ["auto:my-server", "auto:", "auto:tool:read_file"] {
let err = ServerId::new(bad).unwrap_err();
assert!(
matches!(err, IdError::ReservedPrefix { ref value }
if value == bad),
matches!(err, IdError::ReservedPrefix { ref value } if value == bad),
"expected ReservedPrefix for {bad:?}, got {err:?}"
);
}

View file

@ -534,8 +534,7 @@ mod tests {
]);
let blocks = extract_content_blocks(&v);
assert_eq!(blocks.len(), 2);
assert!(matches!(&blocks[0], ContentBlock::Text { text }
if text == "a"));
assert!(matches!(&blocks[0], ContentBlock::Text { text } if text == "a"));
assert!(matches!(&blocks[1], ContentBlock::Image { .. }));
}
@ -653,8 +652,7 @@ if text == "a"));
assert_eq!(blocks.len(), 2);
// First block is the remainder text (field order in JSON objects
// is not guaranteed, so just check it's Text and non-empty).
assert!(matches!(&blocks[0], ContentBlock::Text { text }
if text.contains("summary")));
assert!(matches!(&blocks[0], ContentBlock::Text { text } if text.contains("summary")));
assert!(matches!(&blocks[1], ContentBlock::Image { .. }));
}
@ -670,8 +668,7 @@ if text.contains("summary")));
let blocks = extract_content_blocks(&v);
// results field → 2 blocks extracted, metadata → remainder text.
assert_eq!(blocks.len(), 3);
assert!(matches!(&blocks[0], ContentBlock::Text { text }
if text.contains("metadata")));
assert!(matches!(&blocks[0], ContentBlock::Text { text } if text.contains("metadata")));
assert_eq!(blocks[1], ContentBlock::Text { text: "a".into() });
assert_eq!(blocks[2], ContentBlock::Text { text: "b".into() });
}

View file

@ -45,16 +45,16 @@ fn invalid_arguments_round_trips_message_and_details() {
fn not_found_maps_to_tool_not_found() {
let err = ToolError::not_found(tid("missing"), "tool 'missing' not registered");
let wire: ToolErrorWire = err.into();
assert!(matches!(wire, ToolErrorWire::ToolNotFound { tool_id }
if tool_id == tid("missing")));
assert!(matches!(wire, ToolErrorWire::ToolNotFound { tool_id } if tool_id == tid("missing")));
}
#[test]
fn permission_denied_round_trips_reason() {
let err = ToolError::permission_denied("not authorised for write");
let wire: ToolErrorWire = err.into();
assert!(matches!(wire, ToolErrorWire::PermissionDenied { reason }
if reason == "not authorised for write"));
assert!(
matches!(wire, ToolErrorWire::PermissionDenied { reason } if reason == "not authorised for write")
);
}
#[test]
@ -93,8 +93,7 @@ fn timeout_with_details() {
fn cancelled_round_trips_tool_id() {
let err = ToolError::cancelled(tid("paused"), "user cancelled");
let wire: ToolErrorWire = err.into();
assert!(matches!(wire, ToolErrorWire::Cancelled { tool_id }
if tool_id == tid("paused")));
assert!(matches!(wire, ToolErrorWire::Cancelled { tool_id } if tool_id == tid("paused")));
}
#[test]