chore(acp): remove unused unstable methods (#11650)
This commit is contained in:
@@ -412,20 +412,6 @@ pub struct SessionExtensionEntry {
|
||||
pub extension_key: String,
|
||||
}
|
||||
|
||||
/// List Goose-owned extension definitions available to configure or enable.
|
||||
#[derive(Debug, Default, Clone, Serialize, Deserialize, JsonSchema, JsonRpcRequest)]
|
||||
#[request(
|
||||
method = "_goose/unstable/extensions/available",
|
||||
response = GetAvailableExtensionsResponse
|
||||
)]
|
||||
pub struct GetAvailableExtensionsRequest {}
|
||||
|
||||
#[derive(Debug, Default, Clone, Serialize, Deserialize, JsonSchema, JsonRpcResponse)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct GetAvailableExtensionsResponse {
|
||||
pub extensions: Vec<GooseExtension>,
|
||||
}
|
||||
|
||||
/// List configured extensions and any warnings.
|
||||
#[derive(Debug, Default, Clone, Serialize, Deserialize, JsonSchema, JsonRpcRequest)]
|
||||
#[request(
|
||||
@@ -505,15 +491,6 @@ pub struct PreferencesSaveRequest {
|
||||
pub values: Vec<PreferenceValue>,
|
||||
}
|
||||
|
||||
/// Remove allowlisted user preferences.
|
||||
#[derive(Debug, Default, Clone, Serialize, Deserialize, JsonSchema, JsonRpcRequest)]
|
||||
#[request(method = "_goose/unstable/preferences/remove", response = EmptyResponse)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct PreferencesRemoveRequest {
|
||||
#[serde(default)]
|
||||
pub keys: Vec<PreferenceKey>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Default, Clone, Serialize, Deserialize, JsonSchema, JsonRpcRequest)]
|
||||
#[request(method = "_goose/unstable/config/read", response = ConfigReadResponse)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
@@ -690,23 +667,6 @@ pub struct OnboardingImportApplyResponse {
|
||||
pub provider_defaults: Option<DefaultsReadResponse>,
|
||||
}
|
||||
|
||||
/// Set a dictation provider secret value.
|
||||
#[derive(Debug, Default, Clone, Serialize, Deserialize, JsonSchema, JsonRpcRequest)]
|
||||
#[request(method = "_goose/unstable/dictation/secret/save", response = EmptyResponse)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct DictationSecretSaveRequest {
|
||||
pub provider: String,
|
||||
pub value: String,
|
||||
}
|
||||
|
||||
/// Remove a dictation provider secret value.
|
||||
#[derive(Debug, Default, Clone, Serialize, Deserialize, JsonSchema, JsonRpcRequest)]
|
||||
#[request(method = "_goose/unstable/dictation/secret/delete", response = EmptyResponse)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct DictationSecretDeleteRequest {
|
||||
pub provider: String,
|
||||
}
|
||||
|
||||
/// Return list-style metadata for a single session without loading the conversation.
|
||||
#[derive(Debug, Default, Clone, Serialize, Deserialize, JsonSchema, JsonRpcRequest)]
|
||||
#[request(
|
||||
@@ -2283,15 +2243,6 @@ pub struct DictationModelDeleteRequest {
|
||||
pub model_id: String,
|
||||
}
|
||||
|
||||
/// Persist the user's model selection for a given provider.
|
||||
#[derive(Debug, Default, Clone, Serialize, Deserialize, JsonSchema, JsonRpcRequest)]
|
||||
#[request(method = "_goose/unstable/dictation/models/select", response = EmptyResponse)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct DictationModelSelectRequest {
|
||||
pub provider: String,
|
||||
pub model_id: String,
|
||||
}
|
||||
|
||||
/// Permission level for a tool.
|
||||
#[derive(Debug, Default, Clone, Copy, Serialize, Deserialize, JsonSchema)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
|
||||
@@ -95,11 +95,6 @@
|
||||
"requestType": "GetConfigExtensionsRequest_unstable",
|
||||
"responseType": "GetConfigExtensionsResponse_unstable"
|
||||
},
|
||||
{
|
||||
"method": "_goose/unstable/extensions/available",
|
||||
"requestType": "GetAvailableExtensionsRequest_unstable",
|
||||
"responseType": "GetAvailableExtensionsResponse_unstable"
|
||||
},
|
||||
{
|
||||
"method": "_goose/unstable/config/extensions/add",
|
||||
"requestType": "AddConfigExtensionRequest_unstable",
|
||||
@@ -225,11 +220,6 @@
|
||||
"requestType": "PreferencesSaveRequest_unstable",
|
||||
"responseType": "EmptyResponse"
|
||||
},
|
||||
{
|
||||
"method": "_goose/unstable/preferences/remove",
|
||||
"requestType": "PreferencesRemoveRequest_unstable",
|
||||
"responseType": "EmptyResponse"
|
||||
},
|
||||
{
|
||||
"method": "_goose/unstable/config/read",
|
||||
"requestType": "ConfigReadRequest_unstable",
|
||||
@@ -470,16 +460,6 @@
|
||||
"requestType": "DictationConfigRequest_unstable",
|
||||
"responseType": "DictationConfigResponse_unstable"
|
||||
},
|
||||
{
|
||||
"method": "_goose/unstable/dictation/secret/save",
|
||||
"requestType": "DictationSecretSaveRequest_unstable",
|
||||
"responseType": "EmptyResponse"
|
||||
},
|
||||
{
|
||||
"method": "_goose/unstable/dictation/secret/delete",
|
||||
"requestType": "DictationSecretDeleteRequest_unstable",
|
||||
"responseType": "EmptyResponse"
|
||||
},
|
||||
{
|
||||
"method": "_goose/unstable/dictation/models/list",
|
||||
"requestType": "DictationModelsListRequest_unstable",
|
||||
@@ -505,11 +485,6 @@
|
||||
"requestType": "DictationModelDeleteRequest_unstable",
|
||||
"responseType": "EmptyResponse"
|
||||
},
|
||||
{
|
||||
"method": "_goose/unstable/dictation/models/select",
|
||||
"requestType": "DictationModelSelectRequest_unstable",
|
||||
"responseType": "EmptyResponse"
|
||||
},
|
||||
{
|
||||
"method": "_goose/unstable/local-inference/models/list",
|
||||
"requestType": "LocalInferenceModelsListRequest_unstable",
|
||||
|
||||
@@ -1512,28 +1512,6 @@
|
||||
"enabled"
|
||||
]
|
||||
},
|
||||
"GetAvailableExtensionsRequest_unstable": {
|
||||
"type": "object",
|
||||
"description": "List Goose-owned extension definitions available to configure or enable.",
|
||||
"x-side": "agent",
|
||||
"x-method": "_goose/unstable/extensions/available"
|
||||
},
|
||||
"GetAvailableExtensionsResponse_unstable": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"extensions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/GooseExtension"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"extensions"
|
||||
],
|
||||
"x-side": "agent",
|
||||
"x-method": "_goose/unstable/extensions/available"
|
||||
},
|
||||
"AddConfigExtensionRequest_unstable": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -3162,21 +3140,6 @@
|
||||
"x-side": "agent",
|
||||
"x-method": "_goose/unstable/preferences/save"
|
||||
},
|
||||
"PreferencesRemoveRequest_unstable": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"keys": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/PreferenceKey"
|
||||
},
|
||||
"default": []
|
||||
}
|
||||
},
|
||||
"description": "Remove allowlisted user preferences.",
|
||||
"x-side": "agent",
|
||||
"x-method": "_goose/unstable/preferences/remove"
|
||||
},
|
||||
"ConfigReadRequest_unstable": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -5609,38 +5572,6 @@
|
||||
"description"
|
||||
]
|
||||
},
|
||||
"DictationSecretSaveRequest_unstable": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"provider": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"provider",
|
||||
"value"
|
||||
],
|
||||
"description": "Set a dictation provider secret value.",
|
||||
"x-side": "agent",
|
||||
"x-method": "_goose/unstable/dictation/secret/save"
|
||||
},
|
||||
"DictationSecretDeleteRequest_unstable": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"provider": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"provider"
|
||||
],
|
||||
"description": "Remove a dictation provider secret value.",
|
||||
"x-side": "agent",
|
||||
"x-method": "_goose/unstable/dictation/secret/delete"
|
||||
},
|
||||
"DictationModelsListRequest_unstable": {
|
||||
"type": "object",
|
||||
"description": "List available local Whisper models with their download status.",
|
||||
@@ -5806,24 +5737,6 @@
|
||||
"x-side": "agent",
|
||||
"x-method": "_goose/unstable/dictation/models/delete"
|
||||
},
|
||||
"DictationModelSelectRequest_unstable": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"provider": {
|
||||
"type": "string"
|
||||
},
|
||||
"modelId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"provider",
|
||||
"modelId"
|
||||
],
|
||||
"description": "Persist the user's model selection for a given provider.",
|
||||
"x-side": "agent",
|
||||
"x-method": "_goose/unstable/dictation/models/select"
|
||||
},
|
||||
"LocalInferenceModelsListRequest_unstable": {
|
||||
"type": "object",
|
||||
"x-side": "agent",
|
||||
@@ -7192,15 +7105,6 @@
|
||||
"description": "Params for _goose/unstable/config/extensions/list",
|
||||
"title": "GetConfigExtensionsRequest_unstable"
|
||||
},
|
||||
{
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/$defs/GetAvailableExtensionsRequest_unstable"
|
||||
}
|
||||
],
|
||||
"description": "Params for _goose/unstable/extensions/available",
|
||||
"title": "GetAvailableExtensionsRequest_unstable"
|
||||
},
|
||||
{
|
||||
"allOf": [
|
||||
{
|
||||
@@ -7426,15 +7330,6 @@
|
||||
"description": "Params for _goose/unstable/preferences/save",
|
||||
"title": "PreferencesSaveRequest_unstable"
|
||||
},
|
||||
{
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/$defs/PreferencesRemoveRequest_unstable"
|
||||
}
|
||||
],
|
||||
"description": "Params for _goose/unstable/preferences/remove",
|
||||
"title": "PreferencesRemoveRequest_unstable"
|
||||
},
|
||||
{
|
||||
"allOf": [
|
||||
{
|
||||
@@ -7867,24 +7762,6 @@
|
||||
"description": "Params for _goose/unstable/dictation/config",
|
||||
"title": "DictationConfigRequest_unstable"
|
||||
},
|
||||
{
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/$defs/DictationSecretSaveRequest_unstable"
|
||||
}
|
||||
],
|
||||
"description": "Params for _goose/unstable/dictation/secret/save",
|
||||
"title": "DictationSecretSaveRequest_unstable"
|
||||
},
|
||||
{
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/$defs/DictationSecretDeleteRequest_unstable"
|
||||
}
|
||||
],
|
||||
"description": "Params for _goose/unstable/dictation/secret/delete",
|
||||
"title": "DictationSecretDeleteRequest_unstable"
|
||||
},
|
||||
{
|
||||
"allOf": [
|
||||
{
|
||||
@@ -7930,15 +7807,6 @@
|
||||
"description": "Params for _goose/unstable/dictation/models/delete",
|
||||
"title": "DictationModelDeleteRequest_unstable"
|
||||
},
|
||||
{
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/$defs/DictationModelSelectRequest_unstable"
|
||||
}
|
||||
],
|
||||
"description": "Params for _goose/unstable/dictation/models/select",
|
||||
"title": "DictationModelSelectRequest_unstable"
|
||||
},
|
||||
{
|
||||
"allOf": [
|
||||
{
|
||||
@@ -8188,14 +8056,6 @@
|
||||
],
|
||||
"title": "GetConfigExtensionsResponse_unstable"
|
||||
},
|
||||
{
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/$defs/GetAvailableExtensionsResponse_unstable"
|
||||
}
|
||||
],
|
||||
"title": "GetAvailableExtensionsResponse_unstable"
|
||||
},
|
||||
{
|
||||
"allOf": [
|
||||
{
|
||||
|
||||
@@ -62,18 +62,6 @@ impl GooseAcpAgent {
|
||||
Ok(EmptyResponse {})
|
||||
}
|
||||
|
||||
pub(super) async fn on_preferences_remove(
|
||||
&self,
|
||||
req: PreferencesRemoveRequest,
|
||||
) -> Result<EmptyResponse, agent_client_protocol::Error> {
|
||||
let config = self.config()?;
|
||||
for key in req.keys {
|
||||
let def = preference_def(key)?;
|
||||
config.delete(def.config_key).internal_err()?;
|
||||
}
|
||||
Ok(EmptyResponse {})
|
||||
}
|
||||
|
||||
pub(super) async fn on_config_read(
|
||||
&self,
|
||||
req: ConfigReadRequest,
|
||||
|
||||
@@ -180,13 +180,6 @@ impl GooseAcpAgent {
|
||||
self.on_get_config_extensions().await
|
||||
}
|
||||
|
||||
#[custom_method(GetAvailableExtensionsRequest)]
|
||||
async fn dispatch_get_available_extensions(
|
||||
&self,
|
||||
) -> Result<GetAvailableExtensionsResponse, agent_client_protocol::Error> {
|
||||
self.on_get_available_extensions().await
|
||||
}
|
||||
|
||||
#[custom_method(AddConfigExtensionRequest)]
|
||||
async fn dispatch_add_config_extension(
|
||||
&self,
|
||||
@@ -387,14 +380,6 @@ impl GooseAcpAgent {
|
||||
self.on_preferences_save(req).await
|
||||
}
|
||||
|
||||
#[custom_method(PreferencesRemoveRequest)]
|
||||
async fn dispatch_preferences_remove(
|
||||
&self,
|
||||
req: PreferencesRemoveRequest,
|
||||
) -> Result<EmptyResponse, agent_client_protocol::Error> {
|
||||
self.on_preferences_remove(req).await
|
||||
}
|
||||
|
||||
#[custom_method(ConfigReadRequest)]
|
||||
async fn dispatch_config_read(
|
||||
&self,
|
||||
@@ -779,22 +764,6 @@ impl GooseAcpAgent {
|
||||
self.on_dictation_config(_req).await
|
||||
}
|
||||
|
||||
#[custom_method(DictationSecretSaveRequest)]
|
||||
async fn dispatch_dictation_secret_save(
|
||||
&self,
|
||||
req: DictationSecretSaveRequest,
|
||||
) -> Result<EmptyResponse, agent_client_protocol::Error> {
|
||||
self.on_dictation_secret_save(req).await
|
||||
}
|
||||
|
||||
#[custom_method(DictationSecretDeleteRequest)]
|
||||
async fn dispatch_dictation_secret_delete(
|
||||
&self,
|
||||
req: DictationSecretDeleteRequest,
|
||||
) -> Result<EmptyResponse, agent_client_protocol::Error> {
|
||||
self.on_dictation_secret_delete(req).await
|
||||
}
|
||||
|
||||
#[custom_method(DictationModelsListRequest)]
|
||||
async fn dispatch_dictation_models_list(
|
||||
&self,
|
||||
@@ -835,14 +804,6 @@ impl GooseAcpAgent {
|
||||
self.on_dictation_model_delete(_req).await
|
||||
}
|
||||
|
||||
#[custom_method(DictationModelSelectRequest)]
|
||||
async fn dispatch_dictation_model_select(
|
||||
&self,
|
||||
req: DictationModelSelectRequest,
|
||||
) -> Result<EmptyResponse, agent_client_protocol::Error> {
|
||||
self.on_dictation_model_select(req).await
|
||||
}
|
||||
|
||||
#[custom_method(LocalInferenceModelsListRequest)]
|
||||
async fn dispatch_local_inference_models_list(
|
||||
&self,
|
||||
|
||||
@@ -2,8 +2,8 @@ use super::*;
|
||||
#[cfg(feature = "local-inference")]
|
||||
use crate::dictation::providers::transcribe_local;
|
||||
use crate::dictation::providers::{
|
||||
all_providers, get_provider_def, is_configured, transcribe_with_model,
|
||||
transcribe_with_provider, DictationProvider,
|
||||
all_providers, is_configured, transcribe_with_model, transcribe_with_provider,
|
||||
DictationProvider,
|
||||
};
|
||||
#[cfg(feature = "local-inference")]
|
||||
use crate::dictation::whisper;
|
||||
@@ -139,30 +139,6 @@ impl GooseAcpAgent {
|
||||
Ok(DictationConfigResponse { providers })
|
||||
}
|
||||
|
||||
pub(super) async fn on_dictation_secret_save(
|
||||
&self,
|
||||
req: DictationSecretSaveRequest,
|
||||
) -> Result<EmptyResponse, agent_client_protocol::Error> {
|
||||
let provider = parse_dictation_provider(&req.provider)?;
|
||||
let key = dictation_secret_config_key(provider)?;
|
||||
let config = self.config()?;
|
||||
config.set_secret(key, &req.value).internal_err()?;
|
||||
Config::global().invalidate_secrets_cache();
|
||||
Ok(EmptyResponse {})
|
||||
}
|
||||
|
||||
pub(super) async fn on_dictation_secret_delete(
|
||||
&self,
|
||||
req: DictationSecretDeleteRequest,
|
||||
) -> Result<EmptyResponse, agent_client_protocol::Error> {
|
||||
let provider = parse_dictation_provider(&req.provider)?;
|
||||
let key = dictation_secret_config_key(provider)?;
|
||||
let config = self.config()?;
|
||||
config.delete_secret(key).internal_err()?;
|
||||
Config::global().invalidate_secrets_cache();
|
||||
Ok(EmptyResponse {})
|
||||
}
|
||||
|
||||
pub(super) async fn on_dictation_models_list(
|
||||
&self,
|
||||
_req: DictationModelsListRequest,
|
||||
@@ -324,82 +300,6 @@ impl GooseAcpAgent {
|
||||
#[cfg(not(feature = "local-inference"))]
|
||||
Err(agent_client_protocol::Error::invalid_params().data("Local inference not enabled"))
|
||||
}
|
||||
|
||||
pub(super) async fn on_dictation_model_select(
|
||||
&self,
|
||||
req: DictationModelSelectRequest,
|
||||
) -> Result<EmptyResponse, agent_client_protocol::Error> {
|
||||
#[cfg(not(feature = "local-inference"))]
|
||||
if req.provider == "local" {
|
||||
return Err(
|
||||
agent_client_protocol::Error::invalid_params().data("Local inference not enabled")
|
||||
);
|
||||
}
|
||||
|
||||
let provider: DictationProvider = serde_json::from_value(serde_json::Value::String(
|
||||
req.provider.clone(),
|
||||
))
|
||||
.map_err(|_| {
|
||||
agent_client_protocol::Error::invalid_params()
|
||||
.data(format!("Unknown provider: {}", req.provider))
|
||||
})?;
|
||||
|
||||
let key = match provider {
|
||||
DictationProvider::OpenAI => OPENAI_TRANSCRIPTION_MODEL_CONFIG_KEY,
|
||||
DictationProvider::Groq => GROQ_TRANSCRIPTION_MODEL_CONFIG_KEY,
|
||||
DictationProvider::ElevenLabs => ELEVENLABS_TRANSCRIPTION_MODEL_CONFIG_KEY,
|
||||
DictationProvider::ModelNative => return Ok(EmptyResponse {}),
|
||||
#[cfg(feature = "local-inference")]
|
||||
DictationProvider::Local => {
|
||||
let model = whisper::get_model(&req.model_id).ok_or_else(|| {
|
||||
agent_client_protocol::Error::invalid_params().data("Unknown model id")
|
||||
})?;
|
||||
if !model.is_downloaded() {
|
||||
return Err(agent_client_protocol::Error::invalid_params()
|
||||
.data("Local Whisper model is not downloaded"));
|
||||
}
|
||||
whisper::LOCAL_WHISPER_MODEL_CONFIG_KEY
|
||||
}
|
||||
};
|
||||
|
||||
crate::config::Config::global()
|
||||
.set_param(key, req.model_id)
|
||||
.internal_err()?;
|
||||
|
||||
Ok(EmptyResponse {})
|
||||
}
|
||||
}
|
||||
|
||||
fn parse_dictation_provider(
|
||||
provider: &str,
|
||||
) -> Result<DictationProvider, agent_client_protocol::Error> {
|
||||
serde_json::from_value(serde_json::Value::String(provider.to_string())).map_err(|_| {
|
||||
agent_client_protocol::Error::invalid_params().data(format!("Unknown provider: {provider}"))
|
||||
})
|
||||
}
|
||||
|
||||
fn dictation_secret_config_key(
|
||||
provider: DictationProvider,
|
||||
) -> Result<&'static str, agent_client_protocol::Error> {
|
||||
if provider == DictationProvider::ModelNative {
|
||||
return Err(agent_client_protocol::Error::invalid_params()
|
||||
.data("Model-native provider uses the active chat provider's credentials."));
|
||||
}
|
||||
|
||||
let def = get_provider_def(provider);
|
||||
if def.uses_provider_config {
|
||||
return Err(agent_client_protocol::Error::invalid_params().data(
|
||||
"Dictation provider uses the main provider configuration. Configure its credentials in provider settings instead.",
|
||||
));
|
||||
}
|
||||
|
||||
#[cfg(feature = "local-inference")]
|
||||
if provider == DictationProvider::Local {
|
||||
return Err(agent_client_protocol::Error::invalid_params()
|
||||
.data("Dictation provider does not use an API key or secret."));
|
||||
}
|
||||
|
||||
Ok(def.config_key)
|
||||
}
|
||||
|
||||
fn dictation_model_config_key(provider: DictationProvider) -> Option<String> {
|
||||
|
||||
@@ -59,20 +59,6 @@ impl GooseAcpAgent {
|
||||
})
|
||||
}
|
||||
|
||||
pub(super) async fn on_get_available_extensions(
|
||||
&self,
|
||||
) -> Result<GetAvailableExtensionsResponse, agent_client_protocol::Error> {
|
||||
let extensions = crate::config::get_available_extensions()
|
||||
.into_iter()
|
||||
.map(|config| config_to_goose_extension(&config))
|
||||
.collect::<Result<Vec<_>, _>>()?
|
||||
.into_iter()
|
||||
.flatten()
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
Ok(GetAvailableExtensionsResponse { extensions })
|
||||
}
|
||||
|
||||
pub(super) async fn on_add_config_extension(
|
||||
&self,
|
||||
req: AddConfigExtensionRequest,
|
||||
|
||||
@@ -418,50 +418,6 @@ fn test_custom_session_extensions_add_list_remove() {
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[serial]
|
||||
fn test_custom_get_available_extensions() {
|
||||
write_acp_global_config(DEFAULT_ACP_TEST_CONFIG);
|
||||
run_test(async move {
|
||||
let openai = OpenAiFixture::new(vec![], Arc::new(EnforceSessionId::default())).await;
|
||||
let conn = AcpServerConnection::new(TestConnectionConfig::default(), openai).await;
|
||||
|
||||
let result = send_custom(
|
||||
conn.cx(),
|
||||
"_goose/unstable/extensions/available",
|
||||
serde_json::json!({}),
|
||||
)
|
||||
.await;
|
||||
assert!(result.is_ok(), "expected ok, got: {:?}", result);
|
||||
|
||||
let response = result.unwrap();
|
||||
let extensions = response
|
||||
.get("extensions")
|
||||
.and_then(|extensions| extensions.as_array())
|
||||
.expect("extensions should be an array");
|
||||
assert!(!extensions.is_empty(), "extensions should not be empty");
|
||||
assert!(
|
||||
extensions.iter().all(|extension| matches!(
|
||||
extension["type"].as_str(),
|
||||
Some("builtin" | "platform")
|
||||
)),
|
||||
"available extensions should only include builtin and platform entries"
|
||||
);
|
||||
assert!(
|
||||
extensions.iter().any(|extension| {
|
||||
extension["type"] == "platform" && extension["name"] == "developer"
|
||||
}),
|
||||
"developer platform extension should be available"
|
||||
);
|
||||
assert!(
|
||||
!extensions.iter().any(|extension| {
|
||||
extension["type"] == "platform" && extension["name"] == "orchestrator"
|
||||
}),
|
||||
"hidden orchestrator platform extension should not be available"
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[serial]
|
||||
fn test_custom_prompt_methods() {
|
||||
@@ -742,7 +698,7 @@ fn test_custom_provider_inventory_includes_metadata() {
|
||||
|
||||
#[test]
|
||||
#[serial]
|
||||
fn test_custom_preferences_read_save_remove() {
|
||||
fn test_custom_preferences_read_save() {
|
||||
let config_dir = write_acp_global_config(
|
||||
"GOOSE_MODEL: gpt-4o\nGOOSE_PROVIDER: openai\nGOOSE_AUTO_COMPACT_THRESHOLD: 0.7\nGOOSE_THINKING_EFFORT: high\nVOICE_AUTO_SUBMIT_PHRASES: send it\n",
|
||||
);
|
||||
@@ -793,16 +749,6 @@ fn test_custom_preferences_read_save_remove() {
|
||||
.await
|
||||
.expect("preferences save should succeed");
|
||||
|
||||
send_custom(
|
||||
conn.cx(),
|
||||
"_goose/unstable/preferences/remove",
|
||||
serde_json::json!({
|
||||
"keys": ["voiceDictationProvider"],
|
||||
}),
|
||||
)
|
||||
.await
|
||||
.expect("preferences remove should succeed");
|
||||
|
||||
let response = send_custom(
|
||||
conn.cx(),
|
||||
"_goose/unstable/preferences/read",
|
||||
@@ -811,12 +757,12 @@ fn test_custom_preferences_read_save_remove() {
|
||||
}),
|
||||
)
|
||||
.await
|
||||
.expect("preferences read after remove should succeed");
|
||||
.expect("preferences read after save should succeed");
|
||||
assert_eq!(
|
||||
response.get("values"),
|
||||
Some(&serde_json::json!([
|
||||
{ "key": "gooseThinkingEffort", "value": "off" },
|
||||
{ "key": "voiceDictationProvider", "value": null },
|
||||
{ "key": "voiceDictationProvider", "value": "__disabled__" },
|
||||
{ "key": "voiceDictationPreferredMic", "value": "mic-1" },
|
||||
]))
|
||||
);
|
||||
@@ -964,104 +910,6 @@ fn test_custom_defaults_save_allows_unlisted_model() {
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[serial]
|
||||
fn test_custom_dictation_secret_save_delete() {
|
||||
let _env = env_lock::lock_env([
|
||||
("GOOSE_DISABLE_KEYRING", Some("1")),
|
||||
("GROQ_API_KEY", None::<&str>),
|
||||
]);
|
||||
let config_dir = write_acp_global_config(
|
||||
"GOOSE_MODEL: gpt-4o\nGOOSE_PROVIDER: openai\nGOOSE_DISABLE_KEYRING: true\n",
|
||||
);
|
||||
|
||||
run_test(async move {
|
||||
let openai = OpenAiFixture::new(vec![], Arc::new(EnforceSessionId::default())).await;
|
||||
let config = TestConnectionConfig {
|
||||
data_root: config_dir.clone(),
|
||||
..Default::default()
|
||||
};
|
||||
let conn = AcpServerConnection::new(config, openai).await;
|
||||
|
||||
send_custom(
|
||||
conn.cx(),
|
||||
"_goose/unstable/dictation/secret/save",
|
||||
serde_json::json!({
|
||||
"provider": "groq",
|
||||
"value": "groq-key",
|
||||
}),
|
||||
)
|
||||
.await
|
||||
.expect("dictation secret save should succeed");
|
||||
|
||||
let config = send_custom(
|
||||
conn.cx(),
|
||||
"_goose/unstable/dictation/config",
|
||||
serde_json::json!({}),
|
||||
)
|
||||
.await
|
||||
.expect("dictation config should succeed");
|
||||
assert_eq!(
|
||||
config
|
||||
.pointer("/providers/groq/configured")
|
||||
.and_then(|value| value.as_bool()),
|
||||
Some(true)
|
||||
);
|
||||
|
||||
let provider_config_result = send_custom(
|
||||
conn.cx(),
|
||||
"_goose/unstable/dictation/secret/save",
|
||||
serde_json::json!({
|
||||
"provider": "openai",
|
||||
"value": "openai-key",
|
||||
}),
|
||||
)
|
||||
.await;
|
||||
assert!(
|
||||
provider_config_result.is_err(),
|
||||
"provider-config dictation providers should be rejected"
|
||||
);
|
||||
|
||||
let unknown_result = send_custom(
|
||||
conn.cx(),
|
||||
"_goose/unstable/dictation/secret/save",
|
||||
serde_json::json!({
|
||||
"provider": "unknown",
|
||||
"value": "key",
|
||||
}),
|
||||
)
|
||||
.await;
|
||||
assert!(
|
||||
unknown_result.is_err(),
|
||||
"unknown provider should be rejected"
|
||||
);
|
||||
|
||||
send_custom(
|
||||
conn.cx(),
|
||||
"_goose/unstable/dictation/secret/delete",
|
||||
serde_json::json!({
|
||||
"provider": "groq",
|
||||
}),
|
||||
)
|
||||
.await
|
||||
.expect("dictation secret delete should succeed");
|
||||
|
||||
let config = send_custom(
|
||||
conn.cx(),
|
||||
"_goose/unstable/dictation/config",
|
||||
serde_json::json!({}),
|
||||
)
|
||||
.await
|
||||
.expect("dictation config should succeed");
|
||||
assert_eq!(
|
||||
config
|
||||
.pointer("/providers/groq/configured")
|
||||
.and_then(|value| value.as_bool()),
|
||||
Some(false)
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[serial]
|
||||
fn test_raw_config_and_secret_methods_are_removed() {
|
||||
|
||||
@@ -71,14 +71,13 @@ fn write_secrets(config_dir: &std::path::Path, secrets: &str) {
|
||||
|
||||
#[test]
|
||||
#[serial]
|
||||
fn acp_secret_mutations_and_inventory_refresh_invalidate_global_secret_cache() {
|
||||
fn provider_secret_mutations_and_inventory_refresh_invalidate_global_secret_cache() {
|
||||
let root = tempfile::tempdir().unwrap();
|
||||
let root_path = root.path().to_string_lossy().to_string();
|
||||
let _env = env_lock::lock_env([
|
||||
("GOOSE_PATH_ROOT", Some(root_path.as_str())),
|
||||
("GOOSE_DISABLE_KEYRING", Some("1")),
|
||||
("ANTHROPIC_API_KEY", None),
|
||||
("GROQ_API_KEY", None),
|
||||
("OPENAI_API_KEY", None),
|
||||
("XAI_API_KEY", None),
|
||||
("XAI_HOST", None),
|
||||
@@ -87,16 +86,7 @@ fn acp_secret_mutations_and_inventory_refresh_invalidate_global_secret_cache() {
|
||||
let config_dir = Paths::config_dir();
|
||||
let data_dir = Paths::data_dir();
|
||||
write_config(&config_dir);
|
||||
write_secrets(&config_dir, "GROQ_API_KEY: stale-key\n");
|
||||
|
||||
run_test(async move {
|
||||
assert_eq!(
|
||||
Config::global()
|
||||
.get_secret::<String>("GROQ_API_KEY")
|
||||
.unwrap(),
|
||||
"stale-key"
|
||||
);
|
||||
|
||||
let openai = common_tests::fixtures::OpenAiFixture::new(
|
||||
vec![],
|
||||
Arc::new(EnforceSessionId::default()),
|
||||
@@ -109,45 +99,6 @@ fn acp_secret_mutations_and_inventory_refresh_invalidate_global_secret_cache() {
|
||||
};
|
||||
let conn = AcpServerConnection::new(config, openai).await;
|
||||
|
||||
write_secrets(&config_dir, "GROQ_API_KEY: fresh-key\n");
|
||||
send_custom(
|
||||
conn.cx(),
|
||||
"_goose/unstable/dictation/secret/save",
|
||||
serde_json::json!({
|
||||
"provider": "groq",
|
||||
"value": "fresh-key",
|
||||
}),
|
||||
)
|
||||
.await
|
||||
.expect("dictation secret save should succeed");
|
||||
|
||||
assert_eq!(
|
||||
Config::global()
|
||||
.get_secret::<String>("GROQ_API_KEY")
|
||||
.unwrap(),
|
||||
"fresh-key",
|
||||
"ACP dictation secret save should invalidate the global secrets cache"
|
||||
);
|
||||
|
||||
write_secrets(&config_dir, "{}\n");
|
||||
send_custom(
|
||||
conn.cx(),
|
||||
"_goose/unstable/dictation/secret/delete",
|
||||
serde_json::json!({
|
||||
"provider": "groq",
|
||||
}),
|
||||
)
|
||||
.await
|
||||
.expect("dictation secret delete should succeed");
|
||||
|
||||
assert!(
|
||||
matches!(
|
||||
Config::global().get_secret::<String>("GROQ_API_KEY"),
|
||||
Err(ConfigError::NotFound(_))
|
||||
),
|
||||
"ACP dictation secret delete should invalidate the global secrets cache"
|
||||
);
|
||||
|
||||
let save_provider_config = send_custom(
|
||||
conn.cx(),
|
||||
"_goose/unstable/providers/config/save",
|
||||
|
||||
@@ -51,11 +51,8 @@ import type {
|
||||
DictationModelDownloadProgressRequest_unstable,
|
||||
DictationModelDownloadProgressResponse_unstable,
|
||||
DictationModelDownloadRequest_unstable,
|
||||
DictationModelSelectRequest_unstable,
|
||||
DictationModelsListRequest_unstable,
|
||||
DictationModelsListResponse_unstable,
|
||||
DictationSecretDeleteRequest_unstable,
|
||||
DictationSecretSaveRequest_unstable,
|
||||
DictationTranscribeRequest_unstable,
|
||||
DictationTranscribeResponse_unstable,
|
||||
EncodeRecipeRequest_unstable,
|
||||
@@ -64,8 +61,6 @@ import type {
|
||||
ExportSessionResponse_unstable,
|
||||
ExportSourceRequest_unstable,
|
||||
ExportSourceResponse_unstable,
|
||||
GetAvailableExtensionsRequest_unstable,
|
||||
GetAvailableExtensionsResponse_unstable,
|
||||
GetConfigExtensionsRequest_unstable,
|
||||
GetConfigExtensionsResponse_unstable,
|
||||
GetPromptRequest_unstable,
|
||||
@@ -130,7 +125,6 @@ import type {
|
||||
PauseScheduleRequest_unstable,
|
||||
PreferencesReadRequest_unstable,
|
||||
PreferencesReadResponse_unstable,
|
||||
PreferencesRemoveRequest_unstable,
|
||||
PreferencesSaveRequest_unstable,
|
||||
PromptOperationResponse_unstable,
|
||||
ProviderCatalogListRequest_unstable,
|
||||
@@ -215,7 +209,6 @@ import {
|
||||
zEncodeRecipeResponse_unstable,
|
||||
zExportSessionResponse_unstable,
|
||||
zExportSourceResponse_unstable,
|
||||
zGetAvailableExtensionsResponse_unstable,
|
||||
zGetConfigExtensionsResponse_unstable,
|
||||
zGetPromptResponse_unstable,
|
||||
zGetSessionExtensionsResponse_unstable,
|
||||
@@ -461,18 +454,6 @@ export class GooseExtClient {
|
||||
) as GetConfigExtensionsResponse_unstable;
|
||||
}
|
||||
|
||||
async extensionsAvailable_unstable(
|
||||
params: GetAvailableExtensionsRequest_unstable,
|
||||
): Promise<GetAvailableExtensionsResponse_unstable> {
|
||||
const raw = await this.conn.request(
|
||||
"_goose/unstable/extensions/available",
|
||||
params,
|
||||
);
|
||||
return zGetAvailableExtensionsResponse_unstable.parse(
|
||||
raw,
|
||||
) as GetAvailableExtensionsResponse_unstable;
|
||||
}
|
||||
|
||||
async configExtensionsAdd_unstable(
|
||||
params: AddConfigExtensionRequest_unstable,
|
||||
): Promise<void> {
|
||||
@@ -746,12 +727,6 @@ export class GooseExtClient {
|
||||
await this.conn.request("_goose/unstable/preferences/save", params);
|
||||
}
|
||||
|
||||
async preferencesRemove_unstable(
|
||||
params: PreferencesRemoveRequest_unstable,
|
||||
): Promise<void> {
|
||||
await this.conn.request("_goose/unstable/preferences/remove", params);
|
||||
}
|
||||
|
||||
async configRead_unstable(
|
||||
params: ConfigReadRequest_unstable,
|
||||
): Promise<ConfigReadResponse_unstable> {
|
||||
@@ -1229,18 +1204,6 @@ export class GooseExtClient {
|
||||
) as DictationConfigResponse_unstable;
|
||||
}
|
||||
|
||||
async dictationSecretSave_unstable(
|
||||
params: DictationSecretSaveRequest_unstable,
|
||||
): Promise<void> {
|
||||
await this.conn.request("_goose/unstable/dictation/secret/save", params);
|
||||
}
|
||||
|
||||
async dictationSecretDelete_unstable(
|
||||
params: DictationSecretDeleteRequest_unstable,
|
||||
): Promise<void> {
|
||||
await this.conn.request("_goose/unstable/dictation/secret/delete", params);
|
||||
}
|
||||
|
||||
async dictationModelsList_unstable(
|
||||
params: DictationModelsListRequest_unstable,
|
||||
): Promise<DictationModelsListResponse_unstable> {
|
||||
@@ -1286,12 +1249,6 @@ export class GooseExtClient {
|
||||
await this.conn.request("_goose/unstable/dictation/models/delete", params);
|
||||
}
|
||||
|
||||
async dictationModelsSelect_unstable(
|
||||
params: DictationModelSelectRequest_unstable,
|
||||
): Promise<void> {
|
||||
await this.conn.request("_goose/unstable/dictation/models/select", params);
|
||||
}
|
||||
|
||||
async localInferenceModelsList_unstable(
|
||||
params: LocalInferenceModelsListRequest_unstable,
|
||||
): Promise<LocalInferenceModelsListResponse_unstable> {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -752,17 +752,6 @@ export type GooseExtensionEntry = {
|
||||
configKey?: string | null;
|
||||
};
|
||||
|
||||
/**
|
||||
* List Goose-owned extension definitions available to configure or enable.
|
||||
*/
|
||||
export type GetAvailableExtensionsRequest_unstable = {
|
||||
[key: string]: unknown;
|
||||
};
|
||||
|
||||
export type GetAvailableExtensionsResponse_unstable = {
|
||||
extensions: Array<GooseExtension>;
|
||||
};
|
||||
|
||||
/**
|
||||
* Persist a new extension to the user's global goose config.
|
||||
*/
|
||||
@@ -1360,13 +1349,6 @@ export type PreferencesSaveRequest_unstable = {
|
||||
values?: Array<PreferenceValue>;
|
||||
};
|
||||
|
||||
/**
|
||||
* Remove allowlisted user preferences.
|
||||
*/
|
||||
export type PreferencesRemoveRequest_unstable = {
|
||||
keys?: Array<PreferenceKey>;
|
||||
};
|
||||
|
||||
export type ConfigReadRequest_unstable = {
|
||||
key: string;
|
||||
isSecret?: boolean;
|
||||
@@ -2248,21 +2230,6 @@ export type DictationModelOption = {
|
||||
description: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Set a dictation provider secret value.
|
||||
*/
|
||||
export type DictationSecretSaveRequest_unstable = {
|
||||
provider: string;
|
||||
value: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Remove a dictation provider secret value.
|
||||
*/
|
||||
export type DictationSecretDeleteRequest_unstable = {
|
||||
provider: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* List available local Whisper models with their download status.
|
||||
*/
|
||||
@@ -2330,14 +2297,6 @@ export type DictationModelDeleteRequest_unstable = {
|
||||
modelId: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Persist the user's model selection for a given provider.
|
||||
*/
|
||||
export type DictationModelSelectRequest_unstable = {
|
||||
provider: string;
|
||||
modelId: string;
|
||||
};
|
||||
|
||||
export type LocalInferenceModelsListRequest_unstable = {
|
||||
[key: string]: unknown;
|
||||
};
|
||||
@@ -2661,14 +2620,14 @@ export type RecipeParamsAction = 'submit' | 'cancel';
|
||||
export type ExtRequest = {
|
||||
id: string;
|
||||
method: string;
|
||||
params?: AddSessionExtensionRequest_unstable | RemoveSessionExtensionRequest_unstable | GetToolsRequest_unstable | SetToolPermissionsRequest_unstable | GooseToolCallRequest_unstable | ReadResourceRequest_unstable | AppsListRequest_unstable | AppsExportRequest_unstable | AppsImportRequest_unstable | AppsDeleteRequest_unstable | UpdateWorkingDirRequest_unstable | SetSessionSystemPromptRequest_unstable | SteerSessionRequest_unstable | DiagnosticsGetRequest_unstable | ListPromptsRequest_unstable | GetPromptRequest_unstable | SavePromptRequest_unstable | ResetPromptRequest_unstable | GetConfigExtensionsRequest_unstable | GetAvailableExtensionsRequest_unstable | AddConfigExtensionRequest_unstable | RemoveConfigExtensionRequest_unstable | SetConfigExtensionEnabledRequest_unstable | GetSessionExtensionsRequest_unstable | ListProvidersRequest_unstable | ProviderSupportedModelsListRequest_unstable | ProviderCatalogListRequest_unstable | ProviderSetupCatalogListRequest_unstable | ProviderCatalogTemplateRequest_unstable | CustomProviderCreateRequest_unstable | CustomProviderReadRequest_unstable | CustomProviderUpdateRequest_unstable | CustomProviderDeleteRequest_unstable | RefreshProviderInventoryRequest_unstable | ProviderReadinessCheckRequest_unstable | ProviderConfigReadRequest_unstable | ProviderConfigStatusRequest_unstable | ProviderConfigSaveRequest_unstable | ProviderConfigDeleteRequest_unstable | ProviderConfigAuthenticateRequest_unstable | ProviderSecretsListRequest_unstable | ProviderSecretDeleteRequest_unstable | CanonicalModelInfoRequest_unstable | PreferencesReadRequest_unstable | PreferencesSaveRequest_unstable | PreferencesRemoveRequest_unstable | ConfigReadRequest_unstable | ConfigUpsertRequest_unstable | ConfigRemoveRequest_unstable | ConfigReadAllRequest_unstable | DefaultsReadRequest_unstable | DefaultsSaveRequest_unstable | DefaultsClearRequest_unstable | OnboardingImportScanRequest_unstable | OnboardingImportApplyRequest_unstable | ExportSessionRequest_unstable | ImportSessionRequest_unstable | ShareSessionNostrRequest_unstable | EncodeRecipeRequest_unstable | DecodeRecipeRequest_unstable | ScanRecipeRequest_unstable | ListRecipesRequest_unstable | DeleteRecipeRequest_unstable | ScheduleRecipeRequest_unstable | SetRecipeSlashCommandRequest_unstable | SaveRecipeRequest_unstable | ParseRecipeRequest_unstable | RecipeToYamlRequest_unstable | ListSchedulesRequest_unstable | ListScheduleSessionsRequest_unstable | CreateScheduleRequest_unstable | DeleteScheduleRequest_unstable | PauseScheduleRequest_unstable | UnpauseScheduleRequest_unstable | UpdateScheduleRequest_unstable | RunScheduleNowRequest_unstable | KillRunningJobRequest_unstable | InspectRunningJobRequest_unstable | GetSessionInfoRequest_unstable | TruncateSessionConversationRequest_unstable | UpdateSessionProjectRequest_unstable | RenameSessionRequest_unstable | ArchiveSessionRequest_unstable | UnarchiveSessionRequest_unstable | CreateSourceRequest_unstable | ListSourcesRequest_unstable | ListAgentMentionsRequest_unstable | ListSlashCommandsRequest_unstable | UpdateSourceRequest_unstable | DeleteSourceRequest_unstable | ExportSourceRequest_unstable | ImportSourcesRequest_unstable | DictationTranscribeRequest_unstable | DictationConfigRequest_unstable | DictationSecretSaveRequest_unstable | DictationSecretDeleteRequest_unstable | DictationModelsListRequest_unstable | DictationModelDownloadRequest_unstable | DictationModelDownloadProgressRequest_unstable | DictationModelCancelRequest_unstable | DictationModelDeleteRequest_unstable | DictationModelSelectRequest_unstable | LocalInferenceModelsListRequest_unstable | LocalInferenceModelDownloadRequest_unstable | LocalInferenceModelDownloadProgressRequest_unstable | LocalInferenceModelDownloadCancelRequest_unstable | LocalInferenceModelDeleteRequest_unstable | LocalInferenceModelEvictRequest_unstable | LocalInferenceModelSettingsReadRequest_unstable | LocalInferenceModelSettingsUpdateRequest_unstable | LocalInferenceHuggingFaceSearchRequest_unstable | LocalInferenceHuggingFaceRepoVariantsRequest_unstable | LocalInferenceBuiltinChatTemplatesListRequest_unstable | {
|
||||
params?: AddSessionExtensionRequest_unstable | RemoveSessionExtensionRequest_unstable | GetToolsRequest_unstable | SetToolPermissionsRequest_unstable | GooseToolCallRequest_unstable | ReadResourceRequest_unstable | AppsListRequest_unstable | AppsExportRequest_unstable | AppsImportRequest_unstable | AppsDeleteRequest_unstable | UpdateWorkingDirRequest_unstable | SetSessionSystemPromptRequest_unstable | SteerSessionRequest_unstable | DiagnosticsGetRequest_unstable | ListPromptsRequest_unstable | GetPromptRequest_unstable | SavePromptRequest_unstable | ResetPromptRequest_unstable | GetConfigExtensionsRequest_unstable | AddConfigExtensionRequest_unstable | RemoveConfigExtensionRequest_unstable | SetConfigExtensionEnabledRequest_unstable | GetSessionExtensionsRequest_unstable | ListProvidersRequest_unstable | ProviderSupportedModelsListRequest_unstable | ProviderCatalogListRequest_unstable | ProviderSetupCatalogListRequest_unstable | ProviderCatalogTemplateRequest_unstable | CustomProviderCreateRequest_unstable | CustomProviderReadRequest_unstable | CustomProviderUpdateRequest_unstable | CustomProviderDeleteRequest_unstable | RefreshProviderInventoryRequest_unstable | ProviderReadinessCheckRequest_unstable | ProviderConfigReadRequest_unstable | ProviderConfigStatusRequest_unstable | ProviderConfigSaveRequest_unstable | ProviderConfigDeleteRequest_unstable | ProviderConfigAuthenticateRequest_unstable | ProviderSecretsListRequest_unstable | ProviderSecretDeleteRequest_unstable | CanonicalModelInfoRequest_unstable | PreferencesReadRequest_unstable | PreferencesSaveRequest_unstable | ConfigReadRequest_unstable | ConfigUpsertRequest_unstable | ConfigRemoveRequest_unstable | ConfigReadAllRequest_unstable | DefaultsReadRequest_unstable | DefaultsSaveRequest_unstable | DefaultsClearRequest_unstable | OnboardingImportScanRequest_unstable | OnboardingImportApplyRequest_unstable | ExportSessionRequest_unstable | ImportSessionRequest_unstable | ShareSessionNostrRequest_unstable | EncodeRecipeRequest_unstable | DecodeRecipeRequest_unstable | ScanRecipeRequest_unstable | ListRecipesRequest_unstable | DeleteRecipeRequest_unstable | ScheduleRecipeRequest_unstable | SetRecipeSlashCommandRequest_unstable | SaveRecipeRequest_unstable | ParseRecipeRequest_unstable | RecipeToYamlRequest_unstable | ListSchedulesRequest_unstable | ListScheduleSessionsRequest_unstable | CreateScheduleRequest_unstable | DeleteScheduleRequest_unstable | PauseScheduleRequest_unstable | UnpauseScheduleRequest_unstable | UpdateScheduleRequest_unstable | RunScheduleNowRequest_unstable | KillRunningJobRequest_unstable | InspectRunningJobRequest_unstable | GetSessionInfoRequest_unstable | TruncateSessionConversationRequest_unstable | UpdateSessionProjectRequest_unstable | RenameSessionRequest_unstable | ArchiveSessionRequest_unstable | UnarchiveSessionRequest_unstable | CreateSourceRequest_unstable | ListSourcesRequest_unstable | ListAgentMentionsRequest_unstable | ListSlashCommandsRequest_unstable | UpdateSourceRequest_unstable | DeleteSourceRequest_unstable | ExportSourceRequest_unstable | ImportSourcesRequest_unstable | DictationTranscribeRequest_unstable | DictationConfigRequest_unstable | DictationModelsListRequest_unstable | DictationModelDownloadRequest_unstable | DictationModelDownloadProgressRequest_unstable | DictationModelCancelRequest_unstable | DictationModelDeleteRequest_unstable | LocalInferenceModelsListRequest_unstable | LocalInferenceModelDownloadRequest_unstable | LocalInferenceModelDownloadProgressRequest_unstable | LocalInferenceModelDownloadCancelRequest_unstable | LocalInferenceModelDeleteRequest_unstable | LocalInferenceModelEvictRequest_unstable | LocalInferenceModelSettingsReadRequest_unstable | LocalInferenceModelSettingsUpdateRequest_unstable | LocalInferenceHuggingFaceSearchRequest_unstable | LocalInferenceHuggingFaceRepoVariantsRequest_unstable | LocalInferenceBuiltinChatTemplatesListRequest_unstable | {
|
||||
[key: string]: unknown;
|
||||
} | null;
|
||||
};
|
||||
|
||||
export type ExtResponse = {
|
||||
id: string;
|
||||
result?: EmptyResponse | GetToolsResponse_unstable | SetToolPermissionsResponse_unstable | GooseToolCallResponse_unstable | ReadResourceResponse_unstable | AppsListResponse_unstable | AppsExportResponse_unstable | AppsImportResponse_unstable | AppsDeleteResponse_unstable | SteerSessionResponse_unstable | DiagnosticsGetResponse_unstable | ListPromptsResponse_unstable | GetPromptResponse_unstable | PromptOperationResponse_unstable | GetConfigExtensionsResponse_unstable | GetAvailableExtensionsResponse_unstable | GetSessionExtensionsResponse_unstable | ListProvidersResponse_unstable | ProviderSupportedModelsListResponse_unstable | ProviderCatalogListResponse_unstable | ProviderSetupCatalogListResponse_unstable | ProviderCatalogTemplateResponse_unstable | CustomProviderCreateResponse_unstable | CustomProviderReadResponse_unstable | CustomProviderUpdateResponse_unstable | CustomProviderDeleteResponse_unstable | RefreshProviderInventoryResponse_unstable | ProviderReadinessCheckResponse_unstable | ProviderConfigReadResponse_unstable | ProviderConfigStatusResponse_unstable | ProviderConfigChangeResponse_unstable | ProviderSecretsListResponse_unstable | CanonicalModelInfoResponse_unstable | PreferencesReadResponse_unstable | ConfigReadResponse_unstable | ConfigReadAllResponse_unstable | DefaultsReadResponse_unstable | OnboardingImportScanResponse_unstable | OnboardingImportApplyResponse_unstable | ExportSessionResponse_unstable | ImportSessionResponse_unstable | ShareSessionNostrResponse_unstable | EncodeRecipeResponse_unstable | DecodeRecipeResponse_unstable | ScanRecipeResponse_unstable | ListRecipesResponse_unstable | SaveRecipeResponse_unstable | ParseRecipeResponse_unstable | RecipeToYamlResponse_unstable | ListSchedulesResponse_unstable | ListScheduleSessionsResponse_unstable | CreateScheduleResponse_unstable | UpdateScheduleResponse_unstable | RunScheduleNowResponse_unstable | KillRunningJobResponse_unstable | InspectRunningJobResponse_unstable | GetSessionInfoResponse_unstable | CreateSourceResponse_unstable | ListSourcesResponse_unstable | ListAgentMentionsResponse_unstable | ListSlashCommandsResponse_unstable | UpdateSourceResponse_unstable | ExportSourceResponse_unstable | ImportSourcesResponse_unstable | DictationTranscribeResponse_unstable | DictationConfigResponse_unstable | DictationModelsListResponse_unstable | DictationModelDownloadProgressResponse_unstable | LocalInferenceModelsListResponse_unstable | LocalInferenceModelDownloadResponse_unstable | LocalInferenceModelDownloadProgressResponse_unstable | LocalInferenceModelSettingsReadResponse_unstable | LocalInferenceModelSettingsUpdateResponse_unstable | LocalInferenceHuggingFaceSearchResponse_unstable | LocalInferenceHuggingFaceRepoVariantsResponse_unstable | LocalInferenceBuiltinChatTemplatesListResponse_unstable | unknown;
|
||||
result?: EmptyResponse | GetToolsResponse_unstable | SetToolPermissionsResponse_unstable | GooseToolCallResponse_unstable | ReadResourceResponse_unstable | AppsListResponse_unstable | AppsExportResponse_unstable | AppsImportResponse_unstable | AppsDeleteResponse_unstable | SteerSessionResponse_unstable | DiagnosticsGetResponse_unstable | ListPromptsResponse_unstable | GetPromptResponse_unstable | PromptOperationResponse_unstable | GetConfigExtensionsResponse_unstable | GetSessionExtensionsResponse_unstable | ListProvidersResponse_unstable | ProviderSupportedModelsListResponse_unstable | ProviderCatalogListResponse_unstable | ProviderSetupCatalogListResponse_unstable | ProviderCatalogTemplateResponse_unstable | CustomProviderCreateResponse_unstable | CustomProviderReadResponse_unstable | CustomProviderUpdateResponse_unstable | CustomProviderDeleteResponse_unstable | RefreshProviderInventoryResponse_unstable | ProviderReadinessCheckResponse_unstable | ProviderConfigReadResponse_unstable | ProviderConfigStatusResponse_unstable | ProviderConfigChangeResponse_unstable | ProviderSecretsListResponse_unstable | CanonicalModelInfoResponse_unstable | PreferencesReadResponse_unstable | ConfigReadResponse_unstable | ConfigReadAllResponse_unstable | DefaultsReadResponse_unstable | OnboardingImportScanResponse_unstable | OnboardingImportApplyResponse_unstable | ExportSessionResponse_unstable | ImportSessionResponse_unstable | ShareSessionNostrResponse_unstable | EncodeRecipeResponse_unstable | DecodeRecipeResponse_unstable | ScanRecipeResponse_unstable | ListRecipesResponse_unstable | SaveRecipeResponse_unstable | ParseRecipeResponse_unstable | RecipeToYamlResponse_unstable | ListSchedulesResponse_unstable | ListScheduleSessionsResponse_unstable | CreateScheduleResponse_unstable | UpdateScheduleResponse_unstable | RunScheduleNowResponse_unstable | KillRunningJobResponse_unstable | InspectRunningJobResponse_unstable | GetSessionInfoResponse_unstable | CreateSourceResponse_unstable | ListSourcesResponse_unstable | ListAgentMentionsResponse_unstable | ListSlashCommandsResponse_unstable | UpdateSourceResponse_unstable | ExportSourceResponse_unstable | ImportSourcesResponse_unstable | DictationTranscribeResponse_unstable | DictationConfigResponse_unstable | DictationModelsListResponse_unstable | DictationModelDownloadProgressResponse_unstable | LocalInferenceModelsListResponse_unstable | LocalInferenceModelDownloadResponse_unstable | LocalInferenceModelDownloadProgressResponse_unstable | LocalInferenceModelSettingsReadResponse_unstable | LocalInferenceModelSettingsUpdateResponse_unstable | LocalInferenceHuggingFaceSearchResponse_unstable | LocalInferenceHuggingFaceRepoVariantsResponse_unstable | LocalInferenceBuiltinChatTemplatesListResponse_unstable | unknown;
|
||||
} | {
|
||||
error: {
|
||||
code: number;
|
||||
|
||||
@@ -493,15 +493,6 @@ export const zGetConfigExtensionsResponse_unstable = z.object({
|
||||
warnings: z.array(z.string()).optional().default([])
|
||||
});
|
||||
|
||||
/**
|
||||
* List Goose-owned extension definitions available to configure or enable.
|
||||
*/
|
||||
export const zGetAvailableExtensionsRequest_unstable = z.record(z.string(), z.unknown());
|
||||
|
||||
export const zGetAvailableExtensionsResponse_unstable = z.object({
|
||||
extensions: z.array(zGooseExtension)
|
||||
});
|
||||
|
||||
/**
|
||||
* Persist a new extension to the user's global goose config.
|
||||
*/
|
||||
@@ -1015,13 +1006,6 @@ export const zPreferencesSaveRequest_unstable = z.object({
|
||||
values: z.array(zPreferenceValue).optional().default([])
|
||||
});
|
||||
|
||||
/**
|
||||
* Remove allowlisted user preferences.
|
||||
*/
|
||||
export const zPreferencesRemoveRequest_unstable = z.object({
|
||||
keys: z.array(zPreferenceKey).optional().default([])
|
||||
});
|
||||
|
||||
export const zConfigReadRequest_unstable = z.object({
|
||||
key: z.string(),
|
||||
isSecret: z.boolean().optional().default(false)
|
||||
@@ -1777,21 +1761,6 @@ export const zDictationConfigResponse_unstable = z.object({
|
||||
providers: z.record(z.string(), zDictationProviderStatusEntry)
|
||||
});
|
||||
|
||||
/**
|
||||
* Set a dictation provider secret value.
|
||||
*/
|
||||
export const zDictationSecretSaveRequest_unstable = z.object({
|
||||
provider: z.string(),
|
||||
value: z.string()
|
||||
});
|
||||
|
||||
/**
|
||||
* Remove a dictation provider secret value.
|
||||
*/
|
||||
export const zDictationSecretDeleteRequest_unstable = z.object({
|
||||
provider: z.string()
|
||||
});
|
||||
|
||||
/**
|
||||
* List available local Whisper models with their download status.
|
||||
*/
|
||||
@@ -1851,14 +1820,6 @@ export const zDictationModelDeleteRequest_unstable = z.object({
|
||||
modelId: z.string()
|
||||
});
|
||||
|
||||
/**
|
||||
* Persist the user's model selection for a given provider.
|
||||
*/
|
||||
export const zDictationModelSelectRequest_unstable = z.object({
|
||||
provider: z.string(),
|
||||
modelId: z.string()
|
||||
});
|
||||
|
||||
export const zLocalInferenceModelsListRequest_unstable = z.record(z.string(), z.unknown());
|
||||
|
||||
export const zLocalInferenceDownloadState = z.enum([
|
||||
@@ -2217,7 +2178,6 @@ export const zExtRequest = z.object({
|
||||
zSavePromptRequest_unstable,
|
||||
zResetPromptRequest_unstable,
|
||||
zGetConfigExtensionsRequest_unstable,
|
||||
zGetAvailableExtensionsRequest_unstable,
|
||||
zAddConfigExtensionRequest_unstable,
|
||||
zRemoveConfigExtensionRequest_unstable,
|
||||
zSetConfigExtensionEnabledRequest_unstable,
|
||||
@@ -2243,7 +2203,6 @@ export const zExtRequest = z.object({
|
||||
zCanonicalModelInfoRequest_unstable,
|
||||
zPreferencesReadRequest_unstable,
|
||||
zPreferencesSaveRequest_unstable,
|
||||
zPreferencesRemoveRequest_unstable,
|
||||
zConfigReadRequest_unstable,
|
||||
zConfigUpsertRequest_unstable,
|
||||
zConfigRemoveRequest_unstable,
|
||||
@@ -2292,14 +2251,11 @@ export const zExtRequest = z.object({
|
||||
zImportSourcesRequest_unstable,
|
||||
zDictationTranscribeRequest_unstable,
|
||||
zDictationConfigRequest_unstable,
|
||||
zDictationSecretSaveRequest_unstable,
|
||||
zDictationSecretDeleteRequest_unstable,
|
||||
zDictationModelsListRequest_unstable,
|
||||
zDictationModelDownloadRequest_unstable,
|
||||
zDictationModelDownloadProgressRequest_unstable,
|
||||
zDictationModelCancelRequest_unstable,
|
||||
zDictationModelDeleteRequest_unstable,
|
||||
zDictationModelSelectRequest_unstable,
|
||||
zLocalInferenceModelsListRequest_unstable,
|
||||
zLocalInferenceModelDownloadRequest_unstable,
|
||||
zLocalInferenceModelDownloadProgressRequest_unstable,
|
||||
@@ -2336,7 +2292,6 @@ export const zExtResponse = z.union([
|
||||
zGetPromptResponse_unstable,
|
||||
zPromptOperationResponse_unstable,
|
||||
zGetConfigExtensionsResponse_unstable,
|
||||
zGetAvailableExtensionsResponse_unstable,
|
||||
zGetSessionExtensionsResponse_unstable,
|
||||
zListProvidersResponse_unstable,
|
||||
zProviderSupportedModelsListResponse_unstable,
|
||||
|
||||
Reference in New Issue
Block a user