aKode fase 5: test e snapshot adeguati alla rinomina, 429 distinto (ProviderRateLimited), cargo fmt dopo il cambio dei prefissi
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
//! Checks that overlapping policy reloads cannot publish out of order.
|
||||
|
||||
use super::ConfigManager;
|
||||
use anyhow::Result;
|
||||
use akode_config::LoaderOverrides;
|
||||
use akode_config::test_support::ManagedConfigFixture;
|
||||
use akode_http_client::NetworkPolicyDenied;
|
||||
use anyhow::Result;
|
||||
use pretty_assertions::assert_eq;
|
||||
use tempfile::tempdir;
|
||||
|
||||
@@ -53,12 +53,8 @@ async fn embedded_transports_stay_blocked_until_the_same_policy_is_published() -
|
||||
.is_err()
|
||||
);
|
||||
|
||||
let manager = ConfigManager::new_for_tests(
|
||||
home.path().to_path_buf(),
|
||||
Vec::new(),
|
||||
overrides,
|
||||
)
|
||||
.with_embedded_network_policy(policy);
|
||||
let manager = ConfigManager::new_for_tests(home.path().to_path_buf(), Vec::new(), overrides)
|
||||
.with_embedded_network_policy(policy);
|
||||
drop(manager.refresh_application_network_policy().await?);
|
||||
assert!(application.get(server.uri()).send().await.is_err());
|
||||
assert!(server.received_requests().await.unwrap().is_empty());
|
||||
@@ -177,4 +173,3 @@ async fn successive_policy_reloads_publish_in_order() -> Result<()> {
|
||||
assert!(manager.check_application_policy_load(&second_load).is_err());
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
@@ -2184,9 +2184,6 @@ mod tests {
|
||||
use crate::outgoing_message::OutgoingEnvelope;
|
||||
use crate::outgoing_message::OutgoingMessage;
|
||||
use crate::outgoing_message::OutgoingMessageSender;
|
||||
use anyhow::Result;
|
||||
use anyhow::anyhow;
|
||||
use anyhow::bail;
|
||||
use akode_app_server_protocol::AutoReviewDecisionSource;
|
||||
use akode_app_server_protocol::GuardianApprovalReviewStatus;
|
||||
use akode_app_server_protocol::JSONRPCErrorError;
|
||||
@@ -2219,6 +2216,9 @@ mod tests {
|
||||
use akode_utils_absolute_path::AbsolutePathBuf;
|
||||
use akode_utils_absolute_path::test_support::PathBufExt;
|
||||
use akode_utils_absolute_path::test_support::test_path_buf;
|
||||
use anyhow::Result;
|
||||
use anyhow::anyhow;
|
||||
use anyhow::bail;
|
||||
use core_test_support::load_default_config_for_test;
|
||||
use pretty_assertions::assert_eq;
|
||||
use serde_json::json;
|
||||
|
||||
@@ -4,8 +4,6 @@ use std::sync::atomic::AtomicI64;
|
||||
use std::sync::atomic::Ordering;
|
||||
use std::time::Duration;
|
||||
|
||||
use base64::Engine;
|
||||
use base64::engine::general_purpose::STANDARD;
|
||||
use akode_app_server_protocol::CommandExecOutputDeltaNotification;
|
||||
use akode_app_server_protocol::CommandExecOutputStream;
|
||||
use akode_app_server_protocol::CommandExecResizeParams;
|
||||
@@ -29,6 +27,8 @@ use akode_utils_pty::DEFAULT_OUTPUT_BYTES_CAP;
|
||||
use akode_utils_pty::ProcessHandle;
|
||||
use akode_utils_pty::SpawnedProcess;
|
||||
use akode_utils_pty::TerminalSize;
|
||||
use base64::Engine;
|
||||
use base64::engine::general_purpose::STANDARD;
|
||||
use tokio::sync::Mutex;
|
||||
use tokio::sync::mpsc;
|
||||
use tokio::sync::oneshot;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
//! Checks retained providers against managed policy and the current provider selection.
|
||||
|
||||
use super::*;
|
||||
use anyhow::Result;
|
||||
use akode_config::ThreadConfigContext;
|
||||
use akode_config::ThreadConfigLoadError;
|
||||
use akode_config::ThreadConfigLoadErrorCode;
|
||||
use akode_config::ThreadConfigLoaderFuture;
|
||||
use akode_config::ThreadConfigSource;
|
||||
use akode_config::test_support::ManagedConfigFixture;
|
||||
use anyhow::Result;
|
||||
use pretty_assertions::assert_eq;
|
||||
use tempfile::tempdir;
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
use super::*;
|
||||
use anyhow::Result;
|
||||
use akode_app_server_protocol::AppConfig;
|
||||
use akode_app_server_protocol::AppToolApproval;
|
||||
use akode_app_server_protocol::AppsConfig;
|
||||
@@ -8,6 +7,7 @@ use akode_app_server_protocol::ConfigLayerSource as ApiConfigLayerSource;
|
||||
use akode_config::LoaderOverrides;
|
||||
use akode_config::test_support::ManagedConfigFixture;
|
||||
use akode_utils_absolute_path::AbsolutePathBuf;
|
||||
use anyhow::Result;
|
||||
use pretty_assertions::assert_eq;
|
||||
use tempfile::tempdir;
|
||||
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
use std::sync::Arc;
|
||||
use std::sync::Weak;
|
||||
|
||||
use anyhow::Context;
|
||||
use anyhow::Result;
|
||||
use anyhow::anyhow;
|
||||
use anyhow::bail;
|
||||
use chrono::DateTime;
|
||||
use chrono::Utc;
|
||||
use akode_app_server_protocol::CurrentTimeReadParams;
|
||||
use akode_app_server_protocol::CurrentTimeReadResponse;
|
||||
use akode_app_server_protocol::ServerRequestPayload;
|
||||
@@ -14,6 +8,12 @@ use akode_core::SleepFuture;
|
||||
use akode_core::TimeFuture;
|
||||
use akode_core::TimeProvider;
|
||||
use akode_protocol::ThreadId;
|
||||
use anyhow::Context;
|
||||
use anyhow::Result;
|
||||
use anyhow::anyhow;
|
||||
use anyhow::bail;
|
||||
use chrono::DateTime;
|
||||
use chrono::Utc;
|
||||
use tokio::time::Duration;
|
||||
use tokio::time::Instant;
|
||||
use tokio::time::timeout_at;
|
||||
|
||||
@@ -4,8 +4,6 @@ use std::io::ErrorKind;
|
||||
use std::path::PathBuf;
|
||||
use std::sync::Arc;
|
||||
|
||||
use chrono::DateTime;
|
||||
use chrono::Utc;
|
||||
use akode_arg0::Arg0DispatchPaths;
|
||||
use akode_core::ThreadManager;
|
||||
use akode_core::config::ConfigOverrides;
|
||||
@@ -42,6 +40,8 @@ use akode_thread_store::ThreadMetadataPatch;
|
||||
use akode_thread_store::ThreadPersistenceMetadata;
|
||||
use akode_thread_store::ThreadStore;
|
||||
use akode_thread_store::UpdateThreadMetadataParams;
|
||||
use chrono::DateTime;
|
||||
use chrono::Utc;
|
||||
use futures::StreamExt;
|
||||
use tokio::sync::Semaphore;
|
||||
|
||||
|
||||
@@ -66,7 +66,6 @@ use crate::plugin_config_reload::PluginStartupConfig;
|
||||
use crate::transport::CHANNEL_CAPACITY;
|
||||
use crate::transport::OutboundConnectionState;
|
||||
use crate::transport::route_outgoing_envelope;
|
||||
pub use bootstrap::EmbeddedNetworkPolicy;
|
||||
use akode_app_server_protocol::AgentMessageDelivery;
|
||||
use akode_app_server_protocol::ClientNotification;
|
||||
use akode_app_server_protocol::ClientRequest;
|
||||
@@ -90,6 +89,7 @@ use akode_feedback::CodexFeedback;
|
||||
use akode_protocol::protocol::SessionSource;
|
||||
pub use akode_rollout::StateDbHandle;
|
||||
pub use akode_state::log_db::LogDbLayer;
|
||||
pub use bootstrap::EmbeddedNetworkPolicy;
|
||||
use tokio::sync::mpsc;
|
||||
use tokio::sync::oneshot;
|
||||
use tokio::time::timeout;
|
||||
@@ -1198,9 +1198,9 @@ mod tests {
|
||||
#[cfg(unix)]
|
||||
#[tokio::test]
|
||||
async fn process_output_and_exit_survive_a_full_in_process_event_queue() {
|
||||
use akode_app_server_protocol::ProcessKillParams;
|
||||
use base64::Engine;
|
||||
use base64::engine::general_purpose::STANDARD;
|
||||
use akode_app_server_protocol::ProcessKillParams;
|
||||
|
||||
let dir = TempDir::new().unwrap();
|
||||
let contents: Vec<u8> = (0..128 * 1024u32).flat_map(u32::to_le_bytes).collect();
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#![recursion_limit = "256"]
|
||||
|
||||
use clap::Parser;
|
||||
use akode_app_server::AppServerCodeModeHostArgs;
|
||||
use akode_app_server::AppServerRuntimeOptions;
|
||||
use akode_app_server::AppServerTransport;
|
||||
@@ -12,6 +11,7 @@ use akode_config::LoaderOverrides;
|
||||
use akode_protocol::protocol::SessionSource;
|
||||
use akode_utils_cli::CliConfigOverrides;
|
||||
use akode_websocket_auth::WebsocketAuthArgs;
|
||||
use clap::Parser;
|
||||
use std::path::PathBuf;
|
||||
|
||||
#[cfg(all(
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use super::AppServerArgs;
|
||||
use clap::Parser;
|
||||
use akode_app_server::AppServerTransport;
|
||||
use clap::Parser;
|
||||
use pretty_assertions::assert_eq;
|
||||
use toml::Value as TomlValue;
|
||||
use url::Url;
|
||||
|
||||
@@ -8,7 +8,6 @@ use super::message_processor_tracing_tests::read_response;
|
||||
use crate::outgoing_message::OutgoingEnvelope;
|
||||
use crate::outgoing_message::OutgoingMessage;
|
||||
use crate::transport::AppServerTransport;
|
||||
use anyhow::Result;
|
||||
use akode_app_server_protocol::GatewayOAuthLoginResponse;
|
||||
use akode_app_server_protocol::GatewayOAuthReadResponse;
|
||||
use akode_app_server_protocol::GatewayOAuthStatus;
|
||||
@@ -19,6 +18,7 @@ use akode_core::config::ConfigBuilder;
|
||||
use akode_login::AuthManager;
|
||||
use akode_login::CodexAuth;
|
||||
use akode_model_provider::test_support::seed_gateway_auth;
|
||||
use anyhow::Result;
|
||||
use pretty_assertions::assert_eq;
|
||||
use serde_json::json;
|
||||
use std::sync::Arc;
|
||||
|
||||
@@ -19,10 +19,6 @@ use crate::outgoing_message::OutgoingEnvelope;
|
||||
use crate::outgoing_message::OutgoingMessage;
|
||||
use crate::transport::AppServerTransport;
|
||||
use crate::transport::ConnectionOrigin;
|
||||
use anyhow::Context;
|
||||
use anyhow::Result;
|
||||
use app_test_support::MockResponsesConfig;
|
||||
use app_test_support::create_mock_responses_server_sequence_unchecked;
|
||||
use akode_app_server_protocol::InitializeResponse;
|
||||
use akode_app_server_protocol::JSONRPCError;
|
||||
use akode_app_server_protocol::JSONRPCResponse;
|
||||
@@ -34,6 +30,10 @@ use akode_app_server_protocol::ThreadLoadedListResponse;
|
||||
use akode_app_server_protocol::ThreadStartResponse;
|
||||
use akode_core::config::ConfigBuilder;
|
||||
use akode_login::AuthManager;
|
||||
use anyhow::Context;
|
||||
use anyhow::Result;
|
||||
use app_test_support::MockResponsesConfig;
|
||||
use app_test_support::create_mock_responses_server_sequence_unchecked;
|
||||
use core_test_support::fs_wait::wait_for_path_exists;
|
||||
use core_test_support::process::wait_for_pid_file;
|
||||
use core_test_support::stdio_server_bin;
|
||||
|
||||
@@ -6,9 +6,6 @@ use crate::outgoing_message::ConnectionId;
|
||||
use crate::outgoing_message::OutgoingMessageSender;
|
||||
use crate::plugin_config_reload::PluginStartupConfig;
|
||||
use crate::transport::AppServerTransport;
|
||||
use anyhow::Result;
|
||||
use app_test_support::create_mock_responses_server_repeating_assistant;
|
||||
use app_test_support::write_mock_responses_config_toml;
|
||||
use akode_app_server_protocol::ClientInfo;
|
||||
use akode_app_server_protocol::ClientRequest;
|
||||
use akode_app_server_protocol::InitializeCapabilities;
|
||||
@@ -30,6 +27,9 @@ use akode_feedback::CodexFeedback;
|
||||
use akode_login::AuthManager;
|
||||
use akode_protocol::protocol::SessionSource;
|
||||
use akode_protocol::protocol::W3cTraceContext;
|
||||
use anyhow::Result;
|
||||
use app_test_support::create_mock_responses_server_repeating_assistant;
|
||||
use app_test_support::write_mock_responses_config_toml;
|
||||
use opentelemetry::global;
|
||||
use opentelemetry::trace::SpanId;
|
||||
use opentelemetry::trace::SpanKind;
|
||||
|
||||
@@ -13,8 +13,6 @@ use crate::outgoing_message::ThreadScopedOutgoingMessageSender;
|
||||
use crate::skills_watcher::SkillsWatcher;
|
||||
use crate::thread_status::ThreadWatchManager;
|
||||
use crate::thread_status::resolve_thread_status;
|
||||
use chrono::Duration as ChronoDuration;
|
||||
use chrono::SecondsFormat;
|
||||
use akode_app_server_protocol::Account;
|
||||
use akode_app_server_protocol::AccountLoginCompletedNotification;
|
||||
use akode_app_server_protocol::AccountUpdatedNotification;
|
||||
@@ -416,6 +414,8 @@ use akode_thread_store::ThreadStore;
|
||||
use akode_thread_store::ThreadStoreError;
|
||||
use akode_utils_absolute_path::AbsolutePathBuf;
|
||||
use akode_utils_pty::DEFAULT_OUTPUT_BYTES_CAP;
|
||||
use chrono::Duration as ChronoDuration;
|
||||
use chrono::SecondsFormat;
|
||||
use std::collections::BTreeMap;
|
||||
use std::collections::HashMap;
|
||||
use std::collections::HashSet;
|
||||
|
||||
@@ -151,4 +151,3 @@ async fn user_reload_promotes_plugin_and_feature_requirements_without_server_cha
|
||||
);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
@@ -2,8 +2,6 @@ use crate::error_code::internal_error;
|
||||
use crate::error_code::invalid_request;
|
||||
use crate::fs_watch::FsWatchManager;
|
||||
use crate::outgoing_message::ConnectionId;
|
||||
use base64::Engine;
|
||||
use base64::engine::general_purpose::STANDARD;
|
||||
use akode_app_server_protocol::FsCopyParams;
|
||||
use akode_app_server_protocol::FsCopyResponse;
|
||||
use akode_app_server_protocol::FsCreateDirectoryParams;
|
||||
@@ -30,6 +28,8 @@ use akode_exec_server::EnvironmentManager;
|
||||
use akode_exec_server::ExecutorFileSystem;
|
||||
use akode_exec_server::RemoveOptions;
|
||||
use akode_utils_path_uri::PathUri;
|
||||
use base64::Engine;
|
||||
use base64::engine::general_purpose::STANDARD;
|
||||
use std::io;
|
||||
use std::sync::Arc;
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
use std::sync::atomic::AtomicBool;
|
||||
use std::sync::atomic::Ordering;
|
||||
|
||||
use axum::http::HeaderValue;
|
||||
use akode_login::default_client::SetOriginatorError;
|
||||
use akode_login::default_client::USER_AGENT_SUFFIX;
|
||||
use akode_login::default_client::get_codex_user_agent;
|
||||
@@ -9,6 +8,7 @@ use akode_login::default_client::set_default_client_residency_requirement;
|
||||
use akode_login::default_client::set_default_originator;
|
||||
use akode_protocol::mcp::ClientMcpExtensions;
|
||||
use akode_protocol::mcp::OPENAI_ELICITATION_EXTENSION_ID;
|
||||
use axum::http::HeaderValue;
|
||||
|
||||
use super::*;
|
||||
use crate::message_processor::ConnectionSessionState;
|
||||
|
||||
@@ -7,7 +7,6 @@ use akode_mcp::resolve_oauth_callback;
|
||||
use akode_otel::auth_storage::AuthStorageOriginator;
|
||||
use std::future::Future;
|
||||
|
||||
|
||||
const MCP_THREAD_ID_META_KEY: &str = "threadId";
|
||||
|
||||
#[derive(Clone)]
|
||||
@@ -543,15 +542,13 @@ impl McpRequestProcessor {
|
||||
request_id: ConnectionRequestId,
|
||||
result: anyhow::Result<serde_json::Value>,
|
||||
) {
|
||||
let result = result
|
||||
.map_err(mcp_operation_error)
|
||||
.and_then(|result| {
|
||||
serde_json::from_value::<McpResourceReadResponse>(result).map_err(|error| {
|
||||
internal_error(format!(
|
||||
"failed to deserialize MCP resource read response: {error}"
|
||||
))
|
||||
})
|
||||
});
|
||||
let result = result.map_err(mcp_operation_error).and_then(|result| {
|
||||
serde_json::from_value::<McpResourceReadResponse>(result).map_err(|error| {
|
||||
internal_error(format!(
|
||||
"failed to deserialize MCP resource read response: {error}"
|
||||
))
|
||||
})
|
||||
});
|
||||
outgoing.send_result(request_id, result).await;
|
||||
}
|
||||
|
||||
|
||||
@@ -828,4 +828,3 @@ impl PluginRequestProcessor {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,8 +3,6 @@ use std::collections::hash_map::Entry;
|
||||
use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
|
||||
use base64::Engine;
|
||||
use base64::engine::general_purpose::STANDARD;
|
||||
use akode_app_server_protocol::ClientResponsePayload;
|
||||
use akode_app_server_protocol::JSONRPCErrorError;
|
||||
use akode_app_server_protocol::ProcessExitedNotification;
|
||||
@@ -31,6 +29,8 @@ use akode_utils_pty::DEFAULT_OUTPUT_BYTES_CAP;
|
||||
use akode_utils_pty::ProcessHandle;
|
||||
use akode_utils_pty::SpawnedProcess;
|
||||
use akode_utils_pty::TerminalSize;
|
||||
use base64::Engine;
|
||||
use base64::engine::general_purpose::STANDARD;
|
||||
use tokio::sync::Mutex;
|
||||
use tokio::sync::mpsc;
|
||||
use tokio::sync::oneshot;
|
||||
|
||||
@@ -12,8 +12,6 @@ use crate::outgoing_message::OutgoingMessage;
|
||||
use crate::thread_sample::SampleResponseRegistry;
|
||||
use crate::thread_state::PendingNetworkApproval;
|
||||
use crate::thread_state::resolve_server_request_on_thread_listener;
|
||||
use anyhow::Context;
|
||||
use anyhow::Result;
|
||||
use akode_app_server_protocol::ClientResponsePayload;
|
||||
use akode_app_server_protocol::RequestId;
|
||||
use akode_app_server_protocol::ThreadResumeParams;
|
||||
@@ -24,6 +22,8 @@ use akode_arg0::Arg0DispatchPaths;
|
||||
use akode_goal_extension::GoalService;
|
||||
use akode_login::AuthManager;
|
||||
use akode_thread_store::PersistContext;
|
||||
use anyhow::Context;
|
||||
use anyhow::Result;
|
||||
use core_test_support::test_codex::test_codex;
|
||||
use pretty_assertions::assert_eq;
|
||||
use std::collections::HashSet;
|
||||
@@ -97,9 +97,7 @@ async fn listener_shutdown_releases_runtime_and_preserves_other_subscribers(
|
||||
remaining_connection_id,
|
||||
];
|
||||
for &connection_id in &connection_ids {
|
||||
processor
|
||||
.connection_initialized(connection_id)
|
||||
.await;
|
||||
processor.connection_initialized(connection_id).await;
|
||||
}
|
||||
let network_request_id = RequestId::Integer(4);
|
||||
if attach_before_shutdown {
|
||||
|
||||
@@ -148,9 +148,6 @@ mod thread_processor_behavior_tests {
|
||||
use super::super::*;
|
||||
use crate::outgoing_message::OutgoingEnvelope;
|
||||
use crate::outgoing_message::OutgoingMessage;
|
||||
use anyhow::Result;
|
||||
use chrono::DateTime;
|
||||
use chrono::Utc;
|
||||
use akode_app_server_protocol::ServerRequestPayload;
|
||||
use akode_app_server_protocol::ThreadItem;
|
||||
use akode_app_server_protocol::ThreadItemPayload;
|
||||
@@ -175,6 +172,9 @@ mod thread_processor_behavior_tests {
|
||||
use akode_thread_store::StoredThread;
|
||||
use akode_utils_absolute_path::test_support::PathBufExt;
|
||||
use akode_utils_absolute_path::test_support::test_path_buf;
|
||||
use anyhow::Result;
|
||||
use chrono::DateTime;
|
||||
use chrono::Utc;
|
||||
use pretty_assertions::assert_eq;
|
||||
use serde_json::Value;
|
||||
use serde_json::json;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
use super::*;
|
||||
#[cfg(test)]
|
||||
use std::io::Error as IoError;
|
||||
use akode_protocol::config_types::MultiAgentMode;
|
||||
#[cfg(test)]
|
||||
use chrono::DateTime;
|
||||
#[cfg(test)]
|
||||
use chrono::Utc;
|
||||
use akode_protocol::config_types::MultiAgentMode;
|
||||
#[cfg(test)]
|
||||
use std::io::Error as IoError;
|
||||
|
||||
#[cfg(test)]
|
||||
pub(crate) async fn read_summary_from_rollout(
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use super::*;
|
||||
|
||||
use anyhow::Result;
|
||||
use akode_protocol::protocol::USER_MESSAGE_BEGIN;
|
||||
use anyhow::Result;
|
||||
use pretty_assertions::assert_eq;
|
||||
use serde_json::json;
|
||||
use std::path::PathBuf;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use super::*;
|
||||
#[cfg(target_os = "windows")]
|
||||
use anyhow::Context as _;
|
||||
use akode_protocol::sandbox::SandboxType;
|
||||
use akode_utils_path_uri::PathUri;
|
||||
#[cfg(target_os = "windows")]
|
||||
use anyhow::Context as _;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub(crate) struct WindowsSandboxRequestProcessor {
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
use crate::LogFormat;
|
||||
use crate::StderrLogLayer;
|
||||
use crate::stderr_span_events;
|
||||
use anyhow::Context;
|
||||
use anyhow::Result;
|
||||
use akode_state::SqliteConfig;
|
||||
use akode_utils_absolute_path::test_support::PathExt;
|
||||
use anyhow::Context;
|
||||
use anyhow::Result;
|
||||
use pretty_assertions::assert_eq;
|
||||
use std::io::Read;
|
||||
use std::sync::Mutex;
|
||||
|
||||
@@ -451,7 +451,6 @@ impl ThreadStateManager {
|
||||
.insert(connection_id);
|
||||
}
|
||||
|
||||
|
||||
pub(crate) async fn wait_for_thread_subscriber(&self, thread_id: ThreadId) {
|
||||
let mut has_connections = {
|
||||
let mut state = self.state.lock().await;
|
||||
|
||||
@@ -140,7 +140,6 @@ pub(crate) fn credential_identity(auth: &akode_login::CodexAuth) -> Option<Strin
|
||||
Some(format!("{:x}", sha2::Sha256::digest(token.as_bytes())))
|
||||
}
|
||||
|
||||
|
||||
enum NativeOperation {
|
||||
Status,
|
||||
Enroll,
|
||||
|
||||
@@ -4,9 +4,9 @@ use super::test_support::Harness;
|
||||
use crate::outgoing_message::ConnectionId;
|
||||
use crate::outgoing_message::OutgoingMessage;
|
||||
use crate::transport::ConnectionOrigin;
|
||||
use anyhow::Result;
|
||||
use akode_app_server_protocol as rpc;
|
||||
use akode_protocol::mcp::OPENAI_ELICITATION_EXTENSION_ID;
|
||||
use anyhow::Result;
|
||||
use pretty_assertions::assert_eq;
|
||||
use serde_json::json;
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
//! Validates local verification requests and maps native results into the app-server API.
|
||||
//! Native diagnostics stay private; clients receive bounded input errors and typed reasons.
|
||||
|
||||
use base64::Engine as _;
|
||||
use base64::engine::general_purpose::URL_SAFE_NO_PAD;
|
||||
use akode_app_server_protocol as rpc;
|
||||
use akode_user_verification as native;
|
||||
use base64::Engine as _;
|
||||
use base64::engine::general_purpose::URL_SAFE_NO_PAD;
|
||||
|
||||
pub(super) fn validate(
|
||||
params: rpc::UserVerificationVerifyParams,
|
||||
|
||||
@@ -8,9 +8,9 @@ use crate::outgoing_message::OutgoingEnvelope;
|
||||
use crate::outgoing_message::OutgoingMessage;
|
||||
use crate::transport::AppServerTransport;
|
||||
use crate::transport::ConnectionOrigin;
|
||||
use anyhow::Result;
|
||||
use akode_app_server_protocol as rpc;
|
||||
use akode_protocol::ThreadId;
|
||||
use anyhow::Result;
|
||||
use pretty_assertions::assert_eq;
|
||||
use serde_json::json;
|
||||
use std::sync::Arc;
|
||||
|
||||
@@ -11,14 +11,14 @@ use crate::outgoing_message::OutgoingEnvelope;
|
||||
use crate::outgoing_message::OutgoingMessage;
|
||||
use crate::outgoing_message::OutgoingMessageSender;
|
||||
use crate::transport::AppServerTransport;
|
||||
use anyhow::Result;
|
||||
use akode_config::types::AuthCredentialsStoreMode;
|
||||
use akode_arg0::Arg0DispatchPaths;
|
||||
use akode_config::LoaderOverrides;
|
||||
use akode_config::types::AuthCredentialsStoreMode;
|
||||
use akode_core::config::ConfigBuilder;
|
||||
use akode_exec_server::EnvironmentManager;
|
||||
use akode_feedback::CodexFeedback;
|
||||
use akode_protocol::protocol::SessionSource;
|
||||
use anyhow::Result;
|
||||
use pretty_assertions::assert_eq;
|
||||
use serde_json::json;
|
||||
use std::sync::Mutex;
|
||||
|
||||
Reference in New Issue
Block a user