fix: bump pctx_code_mode to 0.3.0 for iterator type checking fix (#7892)
Signed-off-by: Clyde <clyde@Clydes-Mac-Studio.local> Signed-off-by: Dale Lakes <6843636+spitfire55@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Generated
+36
-80
@@ -6693,33 +6693,35 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pctx_code_execution_runtime"
|
name = "pctx_code_execution_runtime"
|
||||||
version = "0.1.3"
|
version = "0.2.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9180fee1264bed9613b65e8702b2bd4ba404a4606d802ac237808e032d476e84"
|
checksum = "a8b66a19b684e077ab0bc39b10922cf76e1685ff6a65198fe0bc4004c4be314f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"deno_core",
|
"deno_core",
|
||||||
"deno_error",
|
"deno_error",
|
||||||
"pctx_config",
|
"pctx_config",
|
||||||
"rmcp 0.14.0",
|
"pctx_registry",
|
||||||
|
"rmcp 1.2.0",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"thiserror 2.0.18",
|
"thiserror 2.0.18",
|
||||||
|
"tokio",
|
||||||
"tracing",
|
"tracing",
|
||||||
"url",
|
"url",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pctx_code_mode"
|
name = "pctx_code_mode"
|
||||||
version = "0.2.3"
|
version = "0.3.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1006bf745381b3726592032cbee129f27873296810be199e04dfe759820e96f8"
|
checksum = "3d9f5ffc774d0c440e780aaa2593fbf5c5710e5b5c63a6b498116d3f46a09fe0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"futures",
|
"futures",
|
||||||
"pctx_code_execution_runtime",
|
|
||||||
"pctx_codegen",
|
"pctx_codegen",
|
||||||
"pctx_config",
|
"pctx_config",
|
||||||
"pctx_executor",
|
"pctx_executor",
|
||||||
|
"pctx_registry",
|
||||||
"schemars 1.2.1",
|
"schemars 1.2.1",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
@@ -6731,9 +6733,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pctx_codegen"
|
name = "pctx_codegen"
|
||||||
version = "0.2.0"
|
version = "0.3.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "fe8bc4029f5177e4c7a3fd03f702832fe56ef77c34bb165990875fba25980f95"
|
checksum = "7b05191d9a37d1101f3a78e770e1a2b5521e75ce718f1165fb15ac16025d297b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"biome_formatter",
|
"biome_formatter",
|
||||||
"biome_js_formatter",
|
"biome_js_formatter",
|
||||||
@@ -6753,9 +6755,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pctx_config"
|
name = "pctx_config"
|
||||||
version = "0.1.3"
|
version = "0.1.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "3f5d3440e3936b1e06f168ce1657dbb0f05e2be63972ddb51050f81a12e771fb"
|
checksum = "88750f27b7000e143e8b7c5703947fe9565b1a616e119513578bf08ef40fc24f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"base64 0.22.1",
|
"base64 0.22.1",
|
||||||
@@ -6765,8 +6767,8 @@ dependencies = [
|
|||||||
"keyring",
|
"keyring",
|
||||||
"opentelemetry-otlp",
|
"opentelemetry-otlp",
|
||||||
"opentelemetry_sdk",
|
"opentelemetry_sdk",
|
||||||
"reqwest 0.12.28",
|
"reqwest 0.13.2",
|
||||||
"rmcp 0.14.0",
|
"rmcp 1.2.0",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"shlex",
|
"shlex",
|
||||||
@@ -6789,17 +6791,17 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pctx_executor"
|
name = "pctx_executor"
|
||||||
version = "0.1.3"
|
version = "0.2.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1d0d78d239a4840d4452bafa4fde7c5ad1f128af85f14c2e3d4c72360551183f"
|
checksum = "52c6f6e9ae409b20157d7f60623e32de6627b7a80a159e3ee5c1472c4f36ba64"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"deno_core",
|
"deno_core",
|
||||||
"deno_resolver",
|
"deno_resolver",
|
||||||
"futures",
|
"futures",
|
||||||
"node_resolver",
|
"node_resolver",
|
||||||
"pctx_code_execution_runtime",
|
"pctx_code_execution_runtime",
|
||||||
"pctx_config",
|
|
||||||
"pctx_deno_transpiler",
|
"pctx_deno_transpiler",
|
||||||
|
"pctx_registry",
|
||||||
"pctx_type_check_runtime",
|
"pctx_type_check_runtime",
|
||||||
"regex",
|
"regex",
|
||||||
"serde",
|
"serde",
|
||||||
@@ -6812,10 +6814,25 @@ dependencies = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pctx_type_check_runtime"
|
name = "pctx_registry"
|
||||||
version = "0.1.2"
|
version = "0.1.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "46d99b3ee5c8b345ba4038552ed4f6776a7a702e9739d35b99ffcc4eb7647e9b"
|
checksum = "9a49c948ffc8c07357e76b2e0008503c9fafaf49d91fd7e00e672bbd7aabd157"
|
||||||
|
dependencies = [
|
||||||
|
"deno_error",
|
||||||
|
"pctx_config",
|
||||||
|
"rmcp 1.2.0",
|
||||||
|
"serde_json",
|
||||||
|
"thiserror 2.0.18",
|
||||||
|
"tokio",
|
||||||
|
"tracing",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pctx_type_check_runtime"
|
||||||
|
version = "0.1.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "cda6e59419494a65a7915ae4780708de2e72c70af21d68b7dfd64e1540c838cc"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"deno_ast",
|
"deno_ast",
|
||||||
"deno_core",
|
"deno_core",
|
||||||
@@ -7707,13 +7724,9 @@ checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"base64 0.22.1",
|
"base64 0.22.1",
|
||||||
"bytes",
|
"bytes",
|
||||||
"cookie",
|
|
||||||
"cookie_store",
|
|
||||||
"encoding_rs",
|
|
||||||
"futures-channel",
|
"futures-channel",
|
||||||
"futures-core",
|
"futures-core",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
"h2 0.4.13",
|
|
||||||
"http 1.4.0",
|
"http 1.4.0",
|
||||||
"http-body 1.0.1",
|
"http-body 1.0.1",
|
||||||
"http-body-util",
|
"http-body-util",
|
||||||
@@ -7722,12 +7735,10 @@ dependencies = [
|
|||||||
"hyper-util",
|
"hyper-util",
|
||||||
"js-sys",
|
"js-sys",
|
||||||
"log",
|
"log",
|
||||||
"mime",
|
|
||||||
"percent-encoding",
|
"percent-encoding",
|
||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
"quinn",
|
"quinn",
|
||||||
"rustls 0.23.37",
|
"rustls 0.23.37",
|
||||||
"rustls-native-certs",
|
|
||||||
"rustls-pki-types",
|
"rustls-pki-types",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
@@ -7735,14 +7746,12 @@ dependencies = [
|
|||||||
"sync_wrapper",
|
"sync_wrapper",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tokio-rustls 0.26.4",
|
"tokio-rustls 0.26.4",
|
||||||
"tokio-util",
|
|
||||||
"tower",
|
"tower",
|
||||||
"tower-http",
|
"tower-http",
|
||||||
"tower-service",
|
"tower-service",
|
||||||
"url",
|
"url",
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
"wasm-bindgen-futures",
|
"wasm-bindgen-futures",
|
||||||
"wasm-streams 0.4.2",
|
|
||||||
"web-sys",
|
"web-sys",
|
||||||
"webpki-roots 1.0.6",
|
"webpki-roots 1.0.6",
|
||||||
]
|
]
|
||||||
@@ -7791,7 +7800,7 @@ dependencies = [
|
|||||||
"url",
|
"url",
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
"wasm-bindgen-futures",
|
"wasm-bindgen-futures",
|
||||||
"wasm-streams 0.5.0",
|
"wasm-streams",
|
||||||
"web-sys",
|
"web-sys",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -7850,33 +7859,6 @@ dependencies = [
|
|||||||
"tracing",
|
"tracing",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "rmcp"
|
|
||||||
version = "0.14.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "0a621b37a548ff6ab6292d57841eb25785a7f146d89391a19c9f199414bd13da"
|
|
||||||
dependencies = [
|
|
||||||
"async-trait",
|
|
||||||
"base64 0.22.1",
|
|
||||||
"chrono",
|
|
||||||
"futures",
|
|
||||||
"http 1.4.0",
|
|
||||||
"pastey",
|
|
||||||
"pin-project-lite",
|
|
||||||
"process-wrap",
|
|
||||||
"reqwest 0.12.28",
|
|
||||||
"rmcp-macros 0.14.0",
|
|
||||||
"schemars 1.2.1",
|
|
||||||
"serde",
|
|
||||||
"serde_json",
|
|
||||||
"sse-stream",
|
|
||||||
"thiserror 2.0.18",
|
|
||||||
"tokio",
|
|
||||||
"tokio-stream",
|
|
||||||
"tokio-util",
|
|
||||||
"tracing",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rmcp"
|
name = "rmcp"
|
||||||
version = "1.2.0"
|
version = "1.2.0"
|
||||||
@@ -7925,19 +7907,6 @@ dependencies = [
|
|||||||
"syn 2.0.117",
|
"syn 2.0.117",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "rmcp-macros"
|
|
||||||
version = "0.14.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "6b79ed92303f9262db79575aa8c3652581668e9d136be6fd0b9ededa78954c95"
|
|
||||||
dependencies = [
|
|
||||||
"darling 0.23.0",
|
|
||||||
"proc-macro2",
|
|
||||||
"quote",
|
|
||||||
"serde_json",
|
|
||||||
"syn 2.0.117",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rmcp-macros"
|
name = "rmcp-macros"
|
||||||
version = "1.2.0"
|
version = "1.2.0"
|
||||||
@@ -11298,19 +11267,6 @@ dependencies = [
|
|||||||
"wasmparser",
|
"wasmparser",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "wasm-streams"
|
|
||||||
version = "0.4.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65"
|
|
||||||
dependencies = [
|
|
||||||
"futures-util",
|
|
||||||
"js-sys",
|
|
||||||
"wasm-bindgen",
|
|
||||||
"wasm-bindgen-futures",
|
|
||||||
"web-sys",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wasm-streams"
|
name = "wasm-streams"
|
||||||
version = "0.5.0"
|
version = "0.5.0"
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ tree-sitter-rust = { workspace = true }
|
|||||||
tree-sitter-swift = { workspace = true }
|
tree-sitter-swift = { workspace = true }
|
||||||
tree-sitter-typescript = { workspace = true }
|
tree-sitter-typescript = { workspace = true }
|
||||||
which = { workspace = true }
|
which = { workspace = true }
|
||||||
pctx_code_mode = { version = "^0.2.3", optional = true }
|
pctx_code_mode = { version = "^0.3.0", optional = true }
|
||||||
pulldown-cmark = "0.13.0"
|
pulldown-cmark = "0.13.0"
|
||||||
llama-cpp-2 = { version = "0.1.137", features = ["sampler"] }
|
llama-cpp-2 = { version = "0.1.137", features = ["sampler"] }
|
||||||
encoding_rs = "0.8.35"
|
encoding_rs = "0.8.35"
|
||||||
|
|||||||
@@ -5,8 +5,10 @@ use crate::agents::tool_execution::ToolCallContext;
|
|||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use async_trait::async_trait;
|
use async_trait::async_trait;
|
||||||
use indoc::indoc;
|
use indoc::indoc;
|
||||||
|
use pctx_code_mode::config::ToolDisclosure;
|
||||||
use pctx_code_mode::model::{CallbackConfig, ExecuteInput, GetFunctionDetailsInput};
|
use pctx_code_mode::model::{CallbackConfig, ExecuteInput, GetFunctionDetailsInput};
|
||||||
use pctx_code_mode::{CallbackRegistry, CodeMode};
|
use pctx_code_mode::registry::{CallbackFn, PctxRegistry};
|
||||||
|
use pctx_code_mode::CodeMode;
|
||||||
use rmcp::model::{
|
use rmcp::model::{
|
||||||
CallToolRequestParams, CallToolResult, Content, Implementation, InitializeResult, JsonObject,
|
CallToolRequestParams, CallToolResult, Content, Implementation, InitializeResult, JsonObject,
|
||||||
ListToolsResult, RawContent, Role, ServerCapabilities, Tool as McpTool, ToolAnnotations,
|
ListToolsResult, RawContent, Role, ServerCapabilities, Tool as McpTool, ToolAnnotations,
|
||||||
@@ -105,7 +107,7 @@ impl CodeExecutionClient {
|
|||||||
};
|
};
|
||||||
cfgs.push(CallbackConfig {
|
cfgs.push(CallbackConfig {
|
||||||
name,
|
name,
|
||||||
namespace,
|
namespace: Some(namespace),
|
||||||
description: tool.description.as_ref().map(|d| d.to_string()),
|
description: tool.description.as_ref().map(|d| d.to_string()),
|
||||||
input_schema: Some(json!(tool.input_schema)),
|
input_schema: Some(json!(tool.input_schema)),
|
||||||
output_schema: tool.output_schema.as_ref().map(|s| json!(s)),
|
output_schema: tool.output_schema.as_ref().map(|s| json!(s)),
|
||||||
@@ -152,7 +154,7 @@ impl CodeExecutionClient {
|
|||||||
&self,
|
&self,
|
||||||
session_id: &str,
|
session_id: &str,
|
||||||
code_mode: &CodeMode,
|
code_mode: &CodeMode,
|
||||||
) -> Result<CallbackRegistry, String> {
|
) -> Result<PctxRegistry, String> {
|
||||||
let manager = self
|
let manager = self
|
||||||
.context
|
.context
|
||||||
.extension_manager
|
.extension_manager
|
||||||
@@ -160,12 +162,12 @@ impl CodeExecutionClient {
|
|||||||
.and_then(|w| w.upgrade())
|
.and_then(|w| w.upgrade())
|
||||||
.ok_or("Extension manager not available")?;
|
.ok_or("Extension manager not available")?;
|
||||||
|
|
||||||
let registry = CallbackRegistry::default();
|
let registry = PctxRegistry::default();
|
||||||
for cfg in code_mode.callbacks() {
|
for cfg in code_mode.callbacks() {
|
||||||
let full_name = format!("{}__{}", &cfg.namespace, &cfg.name);
|
let full_name = format!("{}__{}", cfg.namespace.as_deref().unwrap_or(""), &cfg.name);
|
||||||
let callback = create_tool_callback(session_id.to_string(), full_name, manager.clone());
|
let callback = create_tool_callback(session_id.to_string(), full_name, manager.clone());
|
||||||
registry
|
registry
|
||||||
.add(&cfg.id(), callback)
|
.add_callback(&cfg.id(), callback)
|
||||||
.map_err(|e| format!("Failed to register callback: {e}"))?;
|
.map_err(|e| format!("Failed to register callback: {e}"))?;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -224,7 +226,7 @@ impl CodeExecutionClient {
|
|||||||
|
|
||||||
rt.block_on(async move {
|
rt.block_on(async move {
|
||||||
code_mode
|
code_mode
|
||||||
.execute(&code, Some(registry))
|
.execute_typescript(&code, ToolDisclosure::default(), Some(registry))
|
||||||
.await
|
.await
|
||||||
.map_err(|e| format!("Execution error: {e}"))
|
.map_err(|e| format!("Execution error: {e}"))
|
||||||
})
|
})
|
||||||
@@ -240,7 +242,7 @@ fn create_tool_callback(
|
|||||||
session_id: String,
|
session_id: String,
|
||||||
full_name: String,
|
full_name: String,
|
||||||
manager: Arc<crate::agents::ExtensionManager>,
|
manager: Arc<crate::agents::ExtensionManager>,
|
||||||
) -> pctx_code_mode::CallbackFn {
|
) -> CallbackFn {
|
||||||
Arc::new(move |args: Option<Value>| {
|
Arc::new(move |args: Option<Value>| {
|
||||||
let session_id = session_id.clone();
|
let session_id = session_id.clone();
|
||||||
let full_name = full_name.clone();
|
let full_name = full_name.clone();
|
||||||
|
|||||||
Reference in New Issue
Block a user