Synced from monorepo
Synced from monorepo Changes: - Report invalid MCP server config instead of failing startup - Keep completed terminal output when the gateway connection is lost - Show a duration-only detail view for single-task task output - Don't let a stale registry turn counter hide local sessions - Raise the file-descriptor soft limit on Linux and log effective limits at startup - Stop aborting when HTTP client construction fails - Make session thread and runtime spawn failures recoverable - Fix main-prompt paste parity in the question freeform input - Fire SessionEnd hooks on /exit and headless quit - Embed the deployment-config signing public key - Repaint paste-chip background on inline panel inputs - Security: prevent acceptEdits from auto-approving agent writes into the always-trusted global hook root - Fix stacked "Worked for" markers so parks render as status and turns close with exactly one marker - Parse hooks from config files - Add a remote kill-switch for managed-config signature verification - Security: fix workspace file-reference resolution bypassing workspace filesystem confinement Source-Revision: d02693a856a54f1030695b36b91d276e96b30b23
This commit is contained in:
parent
6e38642082
commit
47348d13ec
138 changed files with 7283 additions and 5796 deletions
|
|
@ -87,7 +87,46 @@ pub fn seed_fake_oauth_coding_data_opted_out(content: &ContentController, user:
|
|||
seed_fake_oauth_with_opt_out(content, user, true);
|
||||
}
|
||||
|
||||
/// Like [`seed_fake_oauth_coding_data_opted_out`], but on a Zero Data
|
||||
/// Retention team (`team_blocked_reasons` carries `BLOCKED_REASON_NO_LOGS`,
|
||||
/// the shell's `GrokAuth::is_zdr_team` trigger) — locks the settings modal's
|
||||
/// `coding_data_sharing` row to `ZDR` and suppresses the privacy banner.
|
||||
pub fn seed_fake_oauth_zdr_team(content: &ContentController, user: &str) {
|
||||
seed_fake_oauth_raw(
|
||||
content,
|
||||
user,
|
||||
true,
|
||||
",\n \"team_name\": \"PTY ZDR Team\",\n \"team_role\": \"MEMBER\",\n \
|
||||
\"team_blocked_reasons\": [\"BLOCKED_REASON_NO_LOGS\"]",
|
||||
);
|
||||
}
|
||||
|
||||
/// Like [`seed_fake_oauth_coding_data_opted_out`], but as a non-admin member
|
||||
/// of a (non-ZDR) team — locks the settings modal's `coding_data_sharing`
|
||||
/// row to `Opt out · Admin Managed` and suppresses the privacy banner.
|
||||
pub fn seed_fake_oauth_team_member(content: &ContentController, user: &str) {
|
||||
seed_fake_oauth_raw(
|
||||
content,
|
||||
user,
|
||||
true,
|
||||
",\n \"team_name\": \"PTY Team\",\n \"team_role\": \"MEMBER\"",
|
||||
);
|
||||
}
|
||||
|
||||
fn seed_fake_oauth_with_opt_out(content: &ContentController, user: &str, opted_out: bool) {
|
||||
seed_fake_oauth_raw(content, user, opted_out, "");
|
||||
}
|
||||
|
||||
/// Shared auth.json template writer. `team_fields` is a raw JSON fragment
|
||||
/// spliced after `coding_data_retention_opt_out` (empty = no team; field
|
||||
/// names must match the shell's `GrokAuth` serde names in
|
||||
/// `xai-grok-shell/src/auth/model.rs`).
|
||||
fn seed_fake_oauth_raw(
|
||||
content: &ContentController,
|
||||
user: &str,
|
||||
opted_out: bool,
|
||||
team_fields: &str,
|
||||
) {
|
||||
let grok_home = content.home().join(".grok");
|
||||
std::fs::create_dir_all(&grok_home).expect("create temp .grok");
|
||||
std::fs::write(
|
||||
|
|
@ -104,7 +143,7 @@ fn seed_fake_oauth_with_opt_out(content: &ContentController, user: &str, opted_o
|
|||
"refresh_token": "pty-test-refresh-token",
|
||||
"oidc_issuer": "https://auth.x.ai",
|
||||
"oidc_client_id": "b1a00492-073a-47ea-816f-4c329264a828",
|
||||
"coding_data_retention_opt_out": {opted_out}
|
||||
"coding_data_retention_opt_out": {opted_out}{team_fields}
|
||||
}}
|
||||
}}"#
|
||||
),
|
||||
|
|
|
|||
|
|
@ -42,8 +42,8 @@ pub use content::{
|
|||
pub use env::pager_binary;
|
||||
pub use flows::{
|
||||
inference_request_count, oauth_credential_ops, seed_fake_oauth,
|
||||
seed_fake_oauth_coding_data_opted_out, submit_turn, wait_for_labels_absent,
|
||||
wait_for_model_via_new_sessions,
|
||||
seed_fake_oauth_coding_data_opted_out, seed_fake_oauth_team_member, seed_fake_oauth_zdr_team,
|
||||
submit_turn, wait_for_labels_absent, wait_for_model_via_new_sessions,
|
||||
};
|
||||
pub use host_clipboard::HostClipboardTextGuard;
|
||||
pub use leader::LeaderCluster;
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ pub mod keys {
|
|||
pub const Q: &[u8] = b"q";
|
||||
pub const DOWN: &[u8] = b"\x1b[B";
|
||||
pub const UP: &[u8] = b"\x1b[A";
|
||||
pub const RIGHT: &[u8] = b"\x1b[C";
|
||||
pub const PGDN: &[u8] = b"\x1b[6~";
|
||||
pub const PGUP: &[u8] = b"\x1b[5~";
|
||||
pub const ENTER: &[u8] = b"\r";
|
||||
|
|
@ -28,6 +29,8 @@ pub mod keys {
|
|||
/// Ctrl+R (0x12) — prompt history search / scrollback mouse-reporting toggle.
|
||||
pub const CTRL_R: &[u8] = b"\x12";
|
||||
pub const ESC: &[u8] = b"\x1b";
|
||||
/// F2 (SS3 `ESC O Q`, the xterm encoding crossterm parses) — opens the settings modal.
|
||||
pub const F2: &[u8] = b"\x1bOQ";
|
||||
}
|
||||
|
||||
/// One explicit environment mutation applied after the TestSandbox baseline.
|
||||
|
|
|
|||
Loading…
Reference in a new issue