Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 63 additions & 62 deletions crates/chat-cli/src/cli/chat/tools/tool_index.json
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
},
"profile_name": {
"type": "string",
"description": "Optional: AWS profile name to use from ~/.aws/credentials. Defaults to default profile if not specified."
"description": "Optional: AWS profile name to use from ~/.aws/credentials. Only specify if the user explicitly mentions a profile name. If omitted, the AWS default credential chain is used (environment variables, instance profile, etc)."
},
"label": {
"type": "string",
Expand Down Expand Up @@ -305,10 +305,10 @@
"command": {
"type": "string",
"enum": [
"create",
"complete",
"load",
"add",
"create",
"complete",
"load",
"add",
"remove",
"lookup"
],
Expand Down Expand Up @@ -377,72 +377,73 @@
}
}
},
"required": ["command"]
"required": [
"command"
]
}
},
"delegate": {
"name": "delegate",
"description": "Launch and manage asynchronous agent processes. This tool allows you to delegate tasks to agents that run independently in the background.\n\nOperations:\n- launch: Start a new task with an agent (requires task parameter, agent is optional)\n- status: Check agent status and get full output if completed. Agent is optional - defaults to 'all' if not specified\n\nIf no agent is specified for launch, uses 'default_agent'. Only one task can run per agent at a time. Files are stored in ~/.aws/amazonq/.subagents/\n\nIMPORTANT: If a specific agent is requested but not found, DO NOT automatically retry with 'default_agent' or any other agent. Simply report the error and available agents to the user.\n\nExample usage:\n1. Launch with agent: {\"operation\": \"launch\", \"agent\": \"rust-agent\", \"task\": \"Create a snake game\"}\n2. Launch without agent: {\"operation\": \"launch\", \"task\": \"Write a Python script\"}\n3. Check specific agent: {\"operation\": \"status\", \"agent\": \"rust-agent\"}\n4. Check all agents: {\"operation\": \"status\", \"agent\": \"all\"}\n5. Check all agents (shorthand): {\"operation\": \"status\"}",
"input_schema": {
"type": "object",
"properties": {
"operation": {
"description": "Operation to perform: launch, status, or list",
"$ref": "#/$defs/Operation"
},
"agent": {
"description": "Agent name to use (optional - uses \"q_cli_default\" if not specified)",
"type": [
"string",
"null"
],
"default": null
},
"task": {
"description": "Task description (required for launch operation). This process is supposed to be async. DO NOT query immediately after launching a task.",
"type": [
"string",
"null"
],
"default": null
}
"properties": {
"operation": {
"description": "Operation to perform: launch, status, or list",
"$ref": "#/$defs/Operation"
},
"agent": {
"description": "Agent name to use (optional - uses \"q_cli_default\" if not specified)",
"type": [
"string",
"null"
],
"default": null
},
"required": [
"operation"
],
"$defs": {
"Operation": {
"oneOf": [
{
"description": "Launch a new agent with a specified task",
"type": "string",
"const": "launch"
},
{
"description": "Check the status of a specific agent or all agents if None is provided",
"type": "object",
"properties": {
"status": {
"type": [
"string",
"null"
]
}
},
"required": [
"status"
],
"additionalProperties": false
"task": {
"description": "Task description (required for launch operation). This process is supposed to be async. DO NOT query immediately after launching a task.",
"type": [
"string",
"null"
],
"default": null
}
},
"required": [
"operation"
],
"$defs": {
"Operation": {
"oneOf": [
{
"description": "Launch a new agent with a specified task",
"type": "string",
"const": "launch"
},
{
"description": "Check the status of a specific agent or all agents if None is provided",
"type": "object",
"properties": {
"status": {
"type": [
"string",
"null"
]
}
},
{
"description": "List all available agents",
"type": "string",
"const": "list"
}
]
}
},
"required": ["operation"]
"required": [
"status"
],
"additionalProperties": false
},
{
"description": "List all available agents",
"type": "string",
"const": "list"
}
]
}
}
}
}
}
13 changes: 0 additions & 13 deletions crates/chat-cli/src/cli/chat/tools/use_aws.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,23 +235,20 @@ mod tests {
"service_name": "ecs",
"operation_name": "list-task-definitions",
"region": "us-west-2",
"profile_name": "default",
"label": ""
}};
assert!(!cmd.requires_acceptance());
let cmd = use_aws! {{
"service_name": "lambda",
"operation_name": "list-functions",
"region": "us-west-2",
"profile_name": "default",
"label": ""
}};
assert!(!cmd.requires_acceptance());
let cmd = use_aws! {{
"service_name": "s3",
"operation_name": "put-object",
"region": "us-west-2",
"profile_name": "default",
"label": ""
}};
assert!(cmd.requires_acceptance());
Expand All @@ -267,7 +264,6 @@ mod tests {
"KeyConditionExpression": "PartitionKey = :pkValue"
},
"region": "us-west-2",
"profile_name": "default",
"label": ""
}};
let params = cmd.cli_parameters().unwrap();
Expand Down Expand Up @@ -297,7 +293,6 @@ mod tests {
// okay for this test
"parameters": {},
"region": "us-west-2",
"profile_name": "default",
"label": ""
});

Expand All @@ -320,7 +315,6 @@ mod tests {
"operation_name": "ls",
"parameters": {},
"region": "us-west-2",
"profile_name": "default",
"label": ""
});
let out = serde_json::from_value::<UseAws>(v)
Expand Down Expand Up @@ -349,7 +343,6 @@ mod tests {
"service_name": "s3",
"operation_name": "put-object",
"region": "us-west-2",
"profile_name": "default",
"label": ""
}};

Expand Down Expand Up @@ -377,7 +370,6 @@ mod tests {
"service_name": "api_gateway",
"operation_name": "request",
"region": "us-west-2",
"profile_name": "default",
"label": ""
}};

Expand All @@ -403,7 +395,6 @@ mod tests {
"service_name": "s3",
"operation_name": "list-objects",
"region": "us-west-2",
"profile_name": "default",
"label": ""
}};

Expand All @@ -417,7 +408,6 @@ mod tests {
"service_name": "s3",
"operation_name": "put-object",
"region": "us-west-2",
"profile_name": "default",
"label": ""
}};

Expand Down Expand Up @@ -450,7 +440,6 @@ mod tests {
"service_name": "s3",
"operation_name": "list-objects",
"region": "us-west-2",
"profile_name": "default",
"label": ""
}};

Expand All @@ -463,7 +452,6 @@ mod tests {
"service_name": "s3",
"operation_name": "put-object",
"region": "us-west-2",
"profile_name": "default",
"label": ""
}};

Expand Down Expand Up @@ -497,7 +485,6 @@ mod tests {
"service_name": "s3",
"operation_name": "list-objects",
"region": "us-west-2",
"profile_name": "default",
"label": ""
}};

Expand Down