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:
parent
a881e6703f
commit
3af4d5d398
556 changed files with 56609 additions and 21892 deletions
|
|
@ -99,6 +99,7 @@ pub struct AgentBuilder {
|
|||
xai_grok_tools::implementations::grok_build::deploy_app::AppBuilderDeployerConfig,
|
||||
write_file_enabled: bool,
|
||||
subagents_enabled: bool,
|
||||
background_workflows_enabled: bool,
|
||||
ask_user_question_enabled: bool,
|
||||
subagent_toggle: HashMap<String, bool>,
|
||||
task_model_slugs: Vec<String>,
|
||||
|
|
@ -176,6 +177,21 @@ fn merge_tool_params(
|
|||
}
|
||||
}
|
||||
}
|
||||
fn apply_workflow_tool_gates(
|
||||
tool_config: &mut xai_grok_tools::registry::types::ToolServerConfig,
|
||||
background_workflows_enabled: bool,
|
||||
) {
|
||||
use xai_grok_tools::types::tool::ToolKind;
|
||||
if background_workflows_enabled {
|
||||
tool_config
|
||||
.tools
|
||||
.retain(|tool| tool.kind != Some(ToolKind::GoalUpdate));
|
||||
} else {
|
||||
tool_config
|
||||
.tools
|
||||
.retain(|tool| tool.kind != Some(ToolKind::Workflow));
|
||||
}
|
||||
}
|
||||
impl AgentBuilder {
|
||||
pub fn new(
|
||||
working_directory: PathBuf,
|
||||
|
|
@ -223,6 +239,7 @@ impl AgentBuilder {
|
|||
app_builder_deployer_config: Default::default(),
|
||||
write_file_enabled: true,
|
||||
subagents_enabled: false,
|
||||
background_workflows_enabled: false,
|
||||
ask_user_question_enabled: true,
|
||||
subagent_toggle: HashMap::new(),
|
||||
task_model_slugs: Vec::new(),
|
||||
|
|
@ -533,6 +550,10 @@ impl AgentBuilder {
|
|||
self.subagents_enabled = enabled;
|
||||
self
|
||||
}
|
||||
pub fn with_background_workflows_enabled(mut self, enabled: bool) -> Self {
|
||||
self.background_workflows_enabled = enabled;
|
||||
self
|
||||
}
|
||||
/// Set public model slugs advertised in the GrokBuild Task description.
|
||||
pub fn with_task_model_slugs(mut self, slugs: Vec<String>) -> Self {
|
||||
self.task_model_slugs = slugs;
|
||||
|
|
@ -765,6 +786,7 @@ impl AgentBuilder {
|
|||
);
|
||||
tool_config.tools.retain(|tc| tc.id != ask_user_id);
|
||||
}
|
||||
apply_workflow_tool_gates(&mut tool_config, self.background_workflows_enabled);
|
||||
let task_tool_id = format!(
|
||||
"{}:{}",
|
||||
xai_grok_tools::types::tool::ToolNamespace::GrokBuild,
|
||||
|
|
|
|||
|
|
@ -280,6 +280,7 @@ fn default_grok_build_toolset() -> ToolServerConfig {
|
|||
(&search_tool::SearchTool).into(),
|
||||
(&use_tool::UseTool).into(),
|
||||
(&grok_build::UpdateGoalTool).into(),
|
||||
(&grok_build::WorkflowTool).into(),
|
||||
],
|
||||
behavior_preset: None,
|
||||
}
|
||||
|
|
@ -300,6 +301,7 @@ fn grok_build_concise_toolset() -> ToolServerConfig {
|
|||
(&grok_build::SchedulerListTool).into(),
|
||||
(&grok_build::MonitorTool).into(),
|
||||
(&grok_build::UpdateGoalTool).into(),
|
||||
(&grok_build::WorkflowTool).into(),
|
||||
],
|
||||
behavior_preset: None,
|
||||
}
|
||||
|
|
@ -329,6 +331,7 @@ pub fn grok_build_hashline_toolset(
|
|||
(&search_tool::SearchTool).into(),
|
||||
(&use_tool::UseTool).into(),
|
||||
(&grok_build::UpdateGoalTool).into(),
|
||||
(&grok_build::WorkflowTool).into(),
|
||||
]);
|
||||
ToolServerConfig {
|
||||
tools,
|
||||
|
|
@ -410,6 +413,7 @@ fn grok_build_plan_toolset() -> ToolServerConfig {
|
|||
(&search_tool::SearchTool).into(),
|
||||
(&use_tool::UseTool).into(),
|
||||
(&grok_build::UpdateGoalTool).into(),
|
||||
(&grok_build::WorkflowTool).into(),
|
||||
(&grok_build::EnterPlanModeTool).into(),
|
||||
(&grok_build::ExitPlanModeTool).into(),
|
||||
(&grok_build::AskUserQuestionTool).into(),
|
||||
|
|
@ -441,6 +445,7 @@ fn orchestrator_toolset() -> ToolServerConfig {
|
|||
(&grok_build::ExitPlanModeTool).into(),
|
||||
(&grok_build::AskUserQuestionTool).into(),
|
||||
(&grok_build::UpdateGoalTool).into(),
|
||||
(&grok_build::WorkflowTool).into(),
|
||||
(&grok_build::SchedulerCreateTool).into(),
|
||||
(&grok_build::SchedulerDeleteTool).into(),
|
||||
(&grok_build::SchedulerListTool).into(),
|
||||
|
|
@ -479,6 +484,7 @@ fn grok_build_plan_no_subagents_toolset() -> ToolServerConfig {
|
|||
(&search_tool::SearchTool).into(),
|
||||
(&use_tool::UseTool).into(),
|
||||
(&grok_build::UpdateGoalTool).into(),
|
||||
(&grok_build::WorkflowTool).into(),
|
||||
(&grok_build::EnterPlanModeTool).into(),
|
||||
(&grok_build::ExitPlanModeTool).into(),
|
||||
(&grok_build::AskUserQuestionTool).into(),
|
||||
|
|
@ -510,6 +516,7 @@ fn grok_build_ask_user_toolset() -> ToolServerConfig {
|
|||
(&search_tool::SearchTool).into(),
|
||||
(&use_tool::UseTool).into(),
|
||||
(&grok_build::UpdateGoalTool).into(),
|
||||
(&grok_build::WorkflowTool).into(),
|
||||
(&grok_build::AskUserQuestionTool).into(),
|
||||
],
|
||||
behavior_preset: None,
|
||||
|
|
@ -2020,12 +2027,10 @@ description: Minimal agent
|
|||
assert_eq!(v, McpServerRef::Named("slack".to_string()));
|
||||
let v: McpServerRef =
|
||||
serde_json::from_value(serde_json::json!({ "s" : { "type" : "stdio" } })).unwrap();
|
||||
assert!(matches!(v, McpServerRef::Inline { ref name, .. }
|
||||
if name == "s"));
|
||||
assert!(matches!(v, McpServerRef::Inline { ref name, .. } if name == "s"));
|
||||
let v: McpServerRef =
|
||||
serde_json::from_value(serde_json::json!({ "name" : "s", "type" : "stdio" })).unwrap();
|
||||
assert!(matches!(v, McpServerRef::Inline { ref name, .. }
|
||||
if name == "s"));
|
||||
assert!(matches!(v, McpServerRef::Inline { ref name, .. } if name == "s"));
|
||||
assert!(
|
||||
serde_json::from_value::<McpServerRef>(serde_json::json!({ "type" :
|
||||
"stdio" }))
|
||||
|
|
|
|||
Loading…
Reference in a new issue