mirror of
https://github.com/openai/codex.git
synced 2026-05-18 10:12:59 +00:00
fix simplify tools CI
This commit is contained in:
@@ -36,7 +36,7 @@ pub use codex_tools::ToolExposure;
|
||||
|
||||
/// Typed runtime contract for locally executed tools.
|
||||
///
|
||||
/// Implementors provide the shared `ToolExecutor` behavior plus optional
|
||||
/// Implementers provide the shared `ToolExecutor` behavior plus optional
|
||||
/// core-owned metadata for hooks, telemetry, tool search, and argument diffs.
|
||||
pub(crate) trait CoreToolRuntime: ToolExecutor<ToolInvocation> {
|
||||
fn search_info(&self) -> Option<ToolSearchInfo> {
|
||||
|
||||
@@ -2109,18 +2109,19 @@ fn code_mode_augments_mcp_tool_descriptions_with_namespaced_sample() {
|
||||
&[],
|
||||
);
|
||||
|
||||
let ResponsesApiTool { description, .. } =
|
||||
find_namespace_function_tool(&tools, "mcp__sample__", "echo");
|
||||
let ToolSpec::Freeform(FreeformTool { description, .. }) = find_tool(&tools, "exec") else {
|
||||
panic!("expected freeform tool");
|
||||
};
|
||||
|
||||
assert_eq!(
|
||||
description,
|
||||
r#"Echo text
|
||||
assert!(description.contains(
|
||||
r#"### `mcp__sample__echo`
|
||||
Echo text
|
||||
|
||||
exec tool declaration:
|
||||
```ts
|
||||
declare const tools: { mcp__sample__echo(args: { message: string; }): Promise<CallToolResult>; };
|
||||
```"#
|
||||
);
|
||||
));
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -2536,18 +2537,19 @@ fn code_mode_augments_mcp_tool_descriptions_with_structured_output_sample() {
|
||||
&[],
|
||||
);
|
||||
|
||||
let ResponsesApiTool { description, .. } =
|
||||
find_namespace_function_tool(&tools, "mcp__sample__", "echo");
|
||||
let ToolSpec::Freeform(FreeformTool { description, .. }) = find_tool(&tools, "exec") else {
|
||||
panic!("expected freeform tool");
|
||||
};
|
||||
|
||||
assert_eq!(
|
||||
description,
|
||||
r#"Echo text
|
||||
assert!(description.contains(
|
||||
r#"### `mcp__sample__echo`
|
||||
Echo text
|
||||
|
||||
exec tool declaration:
|
||||
```ts
|
||||
declare const tools: { mcp__sample__echo(args: { message: string; }): Promise<CallToolResult<{ echo: string; env: string | null; }>>; };
|
||||
```"#
|
||||
);
|
||||
));
|
||||
}
|
||||
|
||||
fn discoverable_connector(id: &str, name: &str, description: &str) -> DiscoverableTool {
|
||||
|
||||
Reference in New Issue
Block a user