feat(ext/ai): add CoW sandbox for Marqdo-only agent trials

Give agents a capability-capped run path that stages workspace edits until commit, so generated .mq.md can be verified without polluting the real tree.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
cflmyandCursor committed 2026-10-16 11:11:54 +08:00
1 parent 1bb16dd6db
commit 63bcb882a6
24 files changed
+1483 -2

No files matched your search

+9
View File
@@ -120,6 +120,9 @@ pub fn http_get(
headers: Option<&Value>,
) -> Result<Value, String> {
if !ctx.allow_net() {
if ctx.sandbox_session.is_some() {
return Err("net unavailable in sandbox".into());
}
return Err("http_get denied by host policy".into());
}
let url = as_text(url, "url")?;
@@ -137,6 +140,9 @@ pub fn http_post(
headers: Option<&Value>,
) -> Result<Value, String> {
if !ctx.allow_net() {
if ctx.sandbox_session.is_some() {
return Err("net unavailable in sandbox".into());
}
return Err("http_post denied by host policy".into());
}
let url = as_text(url, "url")?;
@@ -161,6 +167,9 @@ pub fn http_request(
headers: Option<&Value>,
) -> Result<Value, String> {
if !ctx.allow_net() {
if ctx.sandbox_session.is_some() {
return Err("net unavailable in sandbox".into());
}
return Err("http_request denied by host policy".into());
}
let method = as_text(method, "method")?.to_uppercase();