fix(cookies): preserve full cookie attributes in cookies set --curl JSON import

The JSON-array branch of parse_curl_cookies dropped every field except
name/value, so importing a full cookie export (httpOnly session tokens,
per-domain cookies spanning multiple hosts, secure/sameSite/expiry) could
not reconstruct a usable auth state — a single --domain override cannot
cover an export that spans .chatgpt.com, .openai.com, etc.

Pass through url/domain/path/secure/httpOnly/sameSite/expires when present,
accepting common aliases from DevTools / EditThisCookie exports
(http_only, same_site, no_restriction, expirationDate). Bare {name,value}
exports are unchanged. Added a round-trip test.
This commit is contained in:
leeguooooo
2026-06-11 21:09:04 +09:00
parent 57ef011817
commit c884fb4f57
3 changed files with 82 additions and 3 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "agent-browser-stealth"
version = "0.27.0-fork.38"
version = "0.27.0-fork.39"
edition = "2021"
description = "Fast browser automation CLI for AI agents"
license = "Apache-2.0"