sgclaw: snapshot today's runtime and skill updates

This commit is contained in:
zyl
2026-03-30 15:05:39 +08:00
parent c793bfc6a1
commit f51d6b7659
50 changed files with 3473 additions and 621 deletions

View File

@@ -1,5 +1,5 @@
use sgclaw::runtime::{RuntimeEngine, RuntimeProfile, ToolPolicy};
use sgclaw::config::{BrowserBackend, OfficeBackend, PlannerMode, SgClawSettings};
use sgclaw::runtime::{RuntimeEngine, RuntimeProfile, ToolPolicy};
#[test]
fn browser_attached_profile_exposes_browser_surface_without_becoming_browser_only() {
@@ -39,6 +39,23 @@ fn browser_attached_export_prompt_requires_openxml_completion() {
assert!(instruction.contains("final answer must include the generated local .xlsx path"));
}
#[test]
fn browser_attached_publish_prompt_requires_explicit_confirmation_before_clicking_publish() {
let engine = RuntimeEngine::new(RuntimeProfile::BrowserAttached);
let instruction = engine.build_instruction(
"请直接发表这篇知乎文章,标题是测试标题,正文是第一段内容",
Some("https://www.zhihu.com/creator"),
Some("知乎创作中心"),
true,
);
assert!(instruction.contains("publish a Zhihu article"));
assert!(instruction.contains("must not click publish without explicit human confirmation"));
assert!(instruction.contains("ask for confirmation concisely"));
assert!(instruction.contains("stop after the confirmation request"));
}
#[test]
fn legacy_settings_default_to_plan_first_superrpa_and_openxml_backends() {
let settings = SgClawSettings::from_legacy_deepseek_fields(