diff --git a/Cargo.lock b/Cargo.lock index 2bd0d26b49..2dc4f0b99a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7577,6 +7577,7 @@ dependencies = [ "async-trait", "chrono", "fs4", + "getrandom 0.4.3", "percent-encoding", "serde", "serde_json", diff --git a/crates/openhuman-app/Cargo.lock b/crates/openhuman-app/Cargo.lock index 4fdcabc513..d4535f388b 100644 --- a/crates/openhuman-app/Cargo.lock +++ b/crates/openhuman-app/Cargo.lock @@ -7883,6 +7883,7 @@ dependencies = [ "async-trait", "chrono", "fs4", + "getrandom 0.4.3", "percent-encoding", "serde", "serde_json", diff --git a/crates/openhuman-core/src/modules/browser_task.rs b/crates/openhuman-core/src/modules/browser_task.rs index e8a862b9c4..9b8da19b0d 100644 --- a/crates/openhuman-core/src/modules/browser_task.rs +++ b/crates/openhuman-core/src/modules/browser_task.rs @@ -69,6 +69,8 @@ pub fn start_request(config: &Config, task: &BrowserTask) -> StartTaskRequest { allow_destructive: false, browser_endpoint: None, headed: !config.browser.headless, + browser_executable: None, + browser_profile: None, }, budget: TaskBudget { max_actions: Some(task.max_actions), diff --git a/crates/openhuman-core/src/modules/browser_task_tests.rs b/crates/openhuman-core/src/modules/browser_task_tests.rs index 2fb779f7a6..67f7d974fd 100644 --- a/crates/openhuman-core/src/modules/browser_task_tests.rs +++ b/crates/openhuman-core/src/modules/browser_task_tests.rs @@ -27,6 +27,8 @@ fn start_request_confines_the_task_to_the_browser_under_host_policy() { assert_eq!(request.constraints.payment, PaymentMode::StopAtPayment); assert!(!request.constraints.allow_destructive); assert!(request.constraints.headed); + assert!(request.constraints.browser_executable.is_none()); + assert!(request.constraints.browser_profile.is_none()); assert_eq!(request.budget.max_actions, Some(12)); assert_eq!(request.budget.max_elapsed_ms, Some(90_000)); assert_eq!(request.budget.max_rescues, Some(2)); diff --git a/scripts/__tests__/check-openhuman-rust-layout.test.mjs b/scripts/__tests__/check-openhuman-rust-layout.test.mjs index fb9925c21c..01866f6cb3 100644 --- a/scripts/__tests__/check-openhuman-rust-layout.test.mjs +++ b/scripts/__tests__/check-openhuman-rust-layout.test.mjs @@ -14,7 +14,11 @@ import path from "node:path"; import test from "node:test"; import { fileURLToPath } from "node:url"; -const repoRoot = path.join(path.dirname(fileURLToPath(import.meta.url)), "..", ".."); +const repoRoot = path.join( + path.dirname(fileURLToPath(import.meta.url)), + "..", + "..", +); const scriptRel = path.join("scripts", "ci", "check-openhuman-rust-layout.mjs"); const scriptSource = fs.readFileSync(path.join(repoRoot, scriptRel), "utf8"); const SRC = "crates/openhuman-core/src"; @@ -31,13 +35,24 @@ const lines = (n) => "//\n".repeat(n); */ function run(files, pins = []) { const entries = pins.map(([file, limit]) => [`${SRC}/${file}`, limit]); - assert.match(scriptSource, PINS_RE, "fixture: the gate's pin list was not found"); + assert.match( + scriptSource, + PINS_RE, + "fixture: the gate's pin list was not found", + ); const source = scriptSource.replace( PINS_RE, `const LEGACY_LIMIT_ENTRIES = ${JSON.stringify(entries)};`, ); const root = fs.mkdtempSync(path.join(os.tmpdir(), "openhuman-rust-layout-")); - for (const dir of [SRC, "crates/openhuman-cli", "tests", "examples", "scripts/ci"]) + for (const dir of [ + SRC, + "crates/openhuman-cli", + "tests", + "examples", + "scripts/ci", + "scripts/lib", + ]) fs.mkdirSync(path.join(root, dir), { recursive: true }); fs.writeFileSync(path.join(root, "crates/openhuman-core/Cargo.toml"), ""); fs.writeFileSync(path.join(root, "crates/openhuman-cli/Cargo.toml"), ""); @@ -47,13 +62,22 @@ function run(files, pins = []) { fs.writeFileSync(abs, lines(n)); } fs.writeFileSync(path.join(root, scriptRel), source); - const result = spawnSync(process.execPath, [scriptRel], { cwd: root, encoding: "utf8" }); + fs.copyFileSync( + path.join(repoRoot, "scripts", "lib", "root-rust-targets.mjs"), + path.join(root, "scripts", "lib", "root-rust-targets.mjs"), + ); + const result = spawnSync(process.execPath, [scriptRel], { + cwd: root, + encoding: "utf8", + }); fs.rmSync(root, { recursive: true, force: true }); return { status: result.status, out: `${result.stdout}${result.stderr}` }; } test("passes at exactly the limit and at exactly a pin", () => { - const { status, out } = run({ "a.rs": 750, "big.rs": 900 }, [["big.rs", 900]]); + const { status, out } = run({ "a.rs": 750, "big.rs": 900 }, [ + ["big.rs", 900], + ]); assert.equal(status, 0, out); }); @@ -90,13 +114,19 @@ test("enforces the limit under core/, which used to be pruned by name", () => { test("a pinned file that shrank must lower its pin", () => { const { status, out } = run({ "big.rs": 850 }, [["big.rs", 900]]); assert.equal(status, 1); - assert.match(out, /big\.rs: 850 lines, below its legacy pin 900; lower the pin to 850/); + assert.match( + out, + /big\.rs: 850 lines, below its legacy pin 900; lower the pin to 850/, + ); }); test("a pinned file that fits the limit must drop its pin", () => { const { status, out } = run({ "big.rs": 700 }, [["big.rs", 900]]); assert.equal(status, 1); - assert.match(out, /big\.rs: 700 lines now fits the 750-line limit; remove its legacy exception/); + assert.match( + out, + /big\.rs: 700 lines now fits the 750-line limit; remove its legacy exception/, + ); }); test("a file pinned twice fails, because a Map keeps only the last pin", () => { @@ -109,9 +139,9 @@ test("a file pinned twice fails, because a Map keeps only the last pin", () => { }); test("the real pin list has no duplicate entry", () => { - const files = [...scriptSource.match(PINS_RE)[0].matchAll(/"(crates\/[^"]+\.rs)"/g)].map( - (m) => m[1], - ); + const files = [ + ...scriptSource.match(PINS_RE)[0].matchAll(/"(crates\/[^"]+\.rs)"/g), + ].map((m) => m[1]); assert.ok(files.length > 0, "fixture: no pins parsed"); assert.equal(new Set(files).size, files.length); }); diff --git a/vendor/tinyagents b/vendor/tinyagents index 554a20ac62..e6be8cf98b 160000 --- a/vendor/tinyagents +++ b/vendor/tinyagents @@ -1 +1 @@ -Subproject commit 554a20ac6230d07c32163a2085a712fab3c1a8b2 +Subproject commit e6be8cf98bfb93d5ecfed0951bf90617ba2ac674 diff --git a/vendor/tinybus b/vendor/tinybus index e231bf374e..51077752b5 160000 --- a/vendor/tinybus +++ b/vendor/tinybus @@ -1 +1 @@ -Subproject commit e231bf374e767d36c85cf85429d7a06fb5373446 +Subproject commit 51077752b58d87ace7edc918ddba1cb88de5bc91 diff --git a/vendor/tinycomputer b/vendor/tinycomputer index 73041b6ad7..cee0f0b7cc 160000 --- a/vendor/tinycomputer +++ b/vendor/tinycomputer @@ -1 +1 @@ -Subproject commit 73041b6ad71ec94db440261e5a2d7f9531c0111b +Subproject commit cee0f0b7ccafe4df4f0e643ba8ffe80c3f942015 diff --git a/vendor/tinyconnectors b/vendor/tinyconnectors index 913e0b1fb8..afccaa4c2c 160000 --- a/vendor/tinyconnectors +++ b/vendor/tinyconnectors @@ -1 +1 @@ -Subproject commit 913e0b1fb8353a694ee40db552fbcdd08f8e3f2a +Subproject commit afccaa4c2c31ee1e51359f7e8e98c9fe879ac417 diff --git a/vendor/tinydocs b/vendor/tinydocs index 1c9daadddc..d5eb283594 160000 --- a/vendor/tinydocs +++ b/vendor/tinydocs @@ -1 +1 @@ -Subproject commit 1c9daadddc080d9869fb1ed7b9e11387aef4de57 +Subproject commit d5eb283594c70b44882a4dafc57973a95a70f584 diff --git a/vendor/tinyhumans-sdk b/vendor/tinyhumans-sdk index f5867e07bb..4f516fa9a7 160000 --- a/vendor/tinyhumans-sdk +++ b/vendor/tinyhumans-sdk @@ -1 +1 @@ -Subproject commit f5867e07bb3e55e7d1a7c7dbc89e8098abc0e0e9 +Subproject commit 4f516fa9a75a01f7091fe3b75d0a2abe7bd3e5ee diff --git a/vendor/tinymcp b/vendor/tinymcp index a7f1489ca9..32d4c78f5f 160000 --- a/vendor/tinymcp +++ b/vendor/tinymcp @@ -1 +1 @@ -Subproject commit a7f1489ca966555048999c1cbce851d62ef98378 +Subproject commit 32d4c78f5fba31344440ec1ba9b192acf8c87d40 diff --git a/vendor/tinymemory b/vendor/tinymemory index f30b9bbb73..6d031061e3 160000 --- a/vendor/tinymemory +++ b/vendor/tinymemory @@ -1 +1 @@ -Subproject commit f30b9bbb7319a6a7c2fb1aaa3670281f1dc4a9ba +Subproject commit 6d031061e3e94a1bf4f8a45d62a55d701f7444be diff --git a/vendor/tinyruntime b/vendor/tinyruntime index e685357099..65249d533f 160000 --- a/vendor/tinyruntime +++ b/vendor/tinyruntime @@ -1 +1 @@ -Subproject commit e685357099722a25c0d61e1678df69b71a049033 +Subproject commit 65249d533ff3e1c07de29ea0b0002d6c5a8eccf0 diff --git a/vendor/tinysearch b/vendor/tinysearch index daba2fd0e4..20c4773830 160000 --- a/vendor/tinysearch +++ b/vendor/tinysearch @@ -1 +1 @@ -Subproject commit daba2fd0e4aad0a70db13a74b32ffbd074408f4f +Subproject commit 20c4773830d45ed0081f0ef50f48e3c0d5add78f diff --git a/vendor/tinyskills b/vendor/tinyskills index 3ac40d7b84..cf64fbcb3b 160000 --- a/vendor/tinyskills +++ b/vendor/tinyskills @@ -1 +1 @@ -Subproject commit 3ac40d7b8419520efac0574b5a15863709a038bb +Subproject commit cf64fbcb3b670ef5444d0f758792d7adf6353202