mirror of
https://github.com/Tencent/BrowserSkill.git
synced 2026-09-10 13:01:23 +08:00
feat(protocol): negotiate Trace v3 with v2 compatibility
Define Trace v3 wire types and generated schemas while keeping protocol 1.1 peers compatible with 1.0. Default record start still produces Trace v2, and only an explicit trace_version=3 request enables the new shape. Refs #90 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
2719e76438
commit
954078380c
32 files changed
+2573
-671
No files matched your search
@@ -151,7 +151,7 @@ describe("reduceTraceSteps", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("keeps hover steps before menu clicks", () => {
|
||||
it("drops hover steps unsupported by historical v2 clients", () => {
|
||||
const { steps } = reduceTraceSteps(
|
||||
[
|
||||
{
|
||||
@@ -167,11 +167,11 @@ describe("reduceTraceSteps", () => {
|
||||
],
|
||||
"https://example.com/app",
|
||||
);
|
||||
expect(steps.map((s) => s.op)).toEqual(["hover", "click"]);
|
||||
expect(steps.map((s) => s.op)).toEqual(["click"]);
|
||||
expect(steps[0]).toMatchObject({
|
||||
op: "hover",
|
||||
op: "click",
|
||||
page: "p1",
|
||||
target: { name: "Account" },
|
||||
target: { name: "Profile" },
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user