@riddledc/riddle-proof 0.7.161 → 0.7.162
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-ZE2U5EML.js → chunk-ZLNPYVMJ.js} +72 -99
- package/dist/cli.cjs +72 -99
- package/dist/cli.js +1 -1
- package/dist/index.cjs +72 -99
- package/dist/index.js +1 -1
- package/dist/profile.cjs +72 -99
- package/dist/profile.js +1 -1
- package/dist/proof-run-engine.d.cts +3 -3
- package/dist/proof-run-engine.d.ts +3 -3
- package/package.json +1 -1
|
@@ -5738,106 +5738,79 @@ async function executeSetupAction(action, ordinal, viewport) {
|
|
|
5738
5738
|
const durationMs = setupNumber(action.duration_ms ?? action.durationMs, 0);
|
|
5739
5739
|
const pointerType = String(action.pointer_type || action.pointerType || "mouse").trim().toLowerCase();
|
|
5740
5740
|
if (pointerType === "touch" || pointerType === "pen") {
|
|
5741
|
-
const
|
|
5742
|
-
|
|
5743
|
-
|
|
5744
|
-
|
|
5745
|
-
|
|
5746
|
-
|
|
5747
|
-
|
|
5748
|
-
|
|
5749
|
-
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
|
|
5756
|
-
|
|
5757
|
-
|
|
5758
|
-
|
|
5759
|
-
|
|
5760
|
-
|
|
5761
|
-
|
|
5762
|
-
|
|
5763
|
-
|
|
5764
|
-
|
|
5765
|
-
|
|
5766
|
-
|
|
5767
|
-
|
|
5768
|
-
|
|
5769
|
-
|
|
5770
|
-
|
|
5771
|
-
|
|
5772
|
-
|
|
5773
|
-
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
|
|
5777
|
-
|
|
5778
|
-
|
|
5779
|
-
|
|
5780
|
-
|
|
5781
|
-
|
|
5782
|
-
|
|
5783
|
-
|
|
5784
|
-
|
|
5785
|
-
|
|
5786
|
-
|
|
5787
|
-
|
|
5788
|
-
}
|
|
5789
|
-
|
|
5790
|
-
|
|
5791
|
-
|
|
5792
|
-
|
|
5793
|
-
|
|
5794
|
-
|
|
5795
|
-
|
|
5796
|
-
|
|
5797
|
-
|
|
5798
|
-
}
|
|
5799
|
-
|
|
5800
|
-
});
|
|
5801
|
-
const point = (progress) => ({
|
|
5802
|
-
clientX: rect.left + payload.start.x + (payload.end.x - payload.start.x) * progress,
|
|
5803
|
-
clientY: rect.top + payload.start.y + (payload.end.y - payload.start.y) * progress,
|
|
5804
|
-
});
|
|
5805
|
-
const dispatch = (type, progress) => {
|
|
5806
|
-
const coords = point(progress);
|
|
5807
|
-
element.dispatchEvent(new PointerEvent(type, {
|
|
5808
|
-
bubbles: true,
|
|
5809
|
-
cancelable: true,
|
|
5810
|
-
composed: true,
|
|
5811
|
-
pointerId,
|
|
5812
|
-
pointerType: payload.pointerType,
|
|
5813
|
-
isPrimary: true,
|
|
5814
|
-
buttons: type === "pointerup" ? 0 : 1,
|
|
5815
|
-
button: type === "pointerup" ? 0 : 0,
|
|
5816
|
-
clientX: coords.clientX,
|
|
5817
|
-
clientY: coords.clientY,
|
|
5818
|
-
}));
|
|
5819
|
-
};
|
|
5820
|
-
try {
|
|
5821
|
-
dispatch("pointerover", 0);
|
|
5822
|
-
dispatch("pointerenter", 0);
|
|
5823
|
-
dispatch("pointerdown", 0);
|
|
5824
|
-
for (let step = 1; step <= payload.steps; step += 1) {
|
|
5825
|
-
dispatch("pointermove", step / payload.steps);
|
|
5826
|
-
if (payload.durationMs && payload.steps > 1) await wait(payload.durationMs / payload.steps);
|
|
5741
|
+
const client = await page.context().newCDPSession(page);
|
|
5742
|
+
try {
|
|
5743
|
+
if (pointerType === "touch") {
|
|
5744
|
+
const touchPoint = (x, y) => ({
|
|
5745
|
+
x,
|
|
5746
|
+
y,
|
|
5747
|
+
radiusX: 1,
|
|
5748
|
+
radiusY: 1,
|
|
5749
|
+
force: 1,
|
|
5750
|
+
id: 11,
|
|
5751
|
+
});
|
|
5752
|
+
await client.send("Input.dispatchTouchEvent", {
|
|
5753
|
+
type: "touchStart",
|
|
5754
|
+
touchPoints: [touchPoint(start.x, start.y)],
|
|
5755
|
+
});
|
|
5756
|
+
for (let step = 1; step <= steps; step += 1) {
|
|
5757
|
+
const progress = step / steps;
|
|
5758
|
+
await client.send("Input.dispatchTouchEvent", {
|
|
5759
|
+
type: "touchMove",
|
|
5760
|
+
touchPoints: [
|
|
5761
|
+
touchPoint(
|
|
5762
|
+
start.x + (end.x - start.x) * progress,
|
|
5763
|
+
start.y + (end.y - start.y) * progress,
|
|
5764
|
+
),
|
|
5765
|
+
],
|
|
5766
|
+
});
|
|
5767
|
+
if (durationMs && steps > 1) await page.waitForTimeout(durationMs / steps);
|
|
5768
|
+
}
|
|
5769
|
+
await client.send("Input.dispatchTouchEvent", {
|
|
5770
|
+
type: "touchEnd",
|
|
5771
|
+
touchPoints: [],
|
|
5772
|
+
});
|
|
5773
|
+
} else {
|
|
5774
|
+
await client.send("Input.dispatchMouseEvent", {
|
|
5775
|
+
type: "mouseMoved",
|
|
5776
|
+
x: start.x,
|
|
5777
|
+
y: start.y,
|
|
5778
|
+
pointerType: "pen",
|
|
5779
|
+
});
|
|
5780
|
+
await client.send("Input.dispatchMouseEvent", {
|
|
5781
|
+
type: "mousePressed",
|
|
5782
|
+
x: start.x,
|
|
5783
|
+
y: start.y,
|
|
5784
|
+
button: "left",
|
|
5785
|
+
buttons: 1,
|
|
5786
|
+
clickCount: 1,
|
|
5787
|
+
pointerType: "pen",
|
|
5788
|
+
});
|
|
5789
|
+
for (let step = 1; step <= steps; step += 1) {
|
|
5790
|
+
const progress = step / steps;
|
|
5791
|
+
await client.send("Input.dispatchMouseEvent", {
|
|
5792
|
+
type: "mouseMoved",
|
|
5793
|
+
x: start.x + (end.x - start.x) * progress,
|
|
5794
|
+
y: start.y + (end.y - start.y) * progress,
|
|
5795
|
+
button: "left",
|
|
5796
|
+
buttons: 1,
|
|
5797
|
+
pointerType: "pen",
|
|
5798
|
+
});
|
|
5799
|
+
if (durationMs && steps > 1) await page.waitForTimeout(durationMs / steps);
|
|
5827
5800
|
}
|
|
5828
|
-
|
|
5829
|
-
|
|
5830
|
-
|
|
5831
|
-
|
|
5832
|
-
|
|
5801
|
+
await client.send("Input.dispatchMouseEvent", {
|
|
5802
|
+
type: "mouseReleased",
|
|
5803
|
+
x: end.x,
|
|
5804
|
+
y: end.y,
|
|
5805
|
+
button: "left",
|
|
5806
|
+
buttons: 0,
|
|
5807
|
+
clickCount: 1,
|
|
5808
|
+
pointerType: "pen",
|
|
5809
|
+
});
|
|
5833
5810
|
}
|
|
5834
|
-
}
|
|
5835
|
-
|
|
5836
|
-
|
|
5837
|
-
end: localEnd,
|
|
5838
|
-
steps,
|
|
5839
|
-
durationMs,
|
|
5840
|
-
});
|
|
5811
|
+
} finally {
|
|
5812
|
+
await client.detach().catch(() => {});
|
|
5813
|
+
}
|
|
5841
5814
|
} else {
|
|
5842
5815
|
await page.mouse.move(start.x, start.y);
|
|
5843
5816
|
await page.mouse.down();
|
|
@@ -5870,7 +5843,7 @@ async function executeSetupAction(action, ordinal, viewport) {
|
|
|
5870
5843
|
to_x: toX,
|
|
5871
5844
|
to_y: toY,
|
|
5872
5845
|
pointer_type: pointerType,
|
|
5873
|
-
|
|
5846
|
+
input_dispatch: pointerType === "touch" || pointerType === "pen" ? "cdp" : "playwright_mouse",
|
|
5874
5847
|
steps,
|
|
5875
5848
|
duration_ms: durationMs || undefined,
|
|
5876
5849
|
};
|
package/dist/cli.cjs
CHANGED
|
@@ -12679,106 +12679,79 @@ async function executeSetupAction(action, ordinal, viewport) {
|
|
|
12679
12679
|
const durationMs = setupNumber(action.duration_ms ?? action.durationMs, 0);
|
|
12680
12680
|
const pointerType = String(action.pointer_type || action.pointerType || "mouse").trim().toLowerCase();
|
|
12681
12681
|
if (pointerType === "touch" || pointerType === "pen") {
|
|
12682
|
-
const
|
|
12683
|
-
|
|
12684
|
-
|
|
12685
|
-
|
|
12686
|
-
|
|
12687
|
-
|
|
12688
|
-
|
|
12689
|
-
|
|
12690
|
-
|
|
12691
|
-
|
|
12692
|
-
|
|
12693
|
-
|
|
12694
|
-
|
|
12695
|
-
|
|
12696
|
-
|
|
12697
|
-
|
|
12698
|
-
|
|
12699
|
-
|
|
12700
|
-
|
|
12701
|
-
|
|
12702
|
-
|
|
12703
|
-
|
|
12704
|
-
|
|
12705
|
-
|
|
12706
|
-
|
|
12707
|
-
|
|
12708
|
-
|
|
12709
|
-
|
|
12710
|
-
|
|
12711
|
-
|
|
12712
|
-
|
|
12713
|
-
|
|
12714
|
-
|
|
12715
|
-
|
|
12716
|
-
|
|
12717
|
-
|
|
12718
|
-
|
|
12719
|
-
|
|
12720
|
-
|
|
12721
|
-
|
|
12722
|
-
|
|
12723
|
-
|
|
12724
|
-
|
|
12725
|
-
|
|
12726
|
-
|
|
12727
|
-
|
|
12728
|
-
|
|
12729
|
-
}
|
|
12730
|
-
|
|
12731
|
-
|
|
12732
|
-
|
|
12733
|
-
|
|
12734
|
-
|
|
12735
|
-
|
|
12736
|
-
|
|
12737
|
-
|
|
12738
|
-
|
|
12739
|
-
}
|
|
12740
|
-
|
|
12741
|
-
});
|
|
12742
|
-
const point = (progress) => ({
|
|
12743
|
-
clientX: rect.left + payload.start.x + (payload.end.x - payload.start.x) * progress,
|
|
12744
|
-
clientY: rect.top + payload.start.y + (payload.end.y - payload.start.y) * progress,
|
|
12745
|
-
});
|
|
12746
|
-
const dispatch = (type, progress) => {
|
|
12747
|
-
const coords = point(progress);
|
|
12748
|
-
element.dispatchEvent(new PointerEvent(type, {
|
|
12749
|
-
bubbles: true,
|
|
12750
|
-
cancelable: true,
|
|
12751
|
-
composed: true,
|
|
12752
|
-
pointerId,
|
|
12753
|
-
pointerType: payload.pointerType,
|
|
12754
|
-
isPrimary: true,
|
|
12755
|
-
buttons: type === "pointerup" ? 0 : 1,
|
|
12756
|
-
button: type === "pointerup" ? 0 : 0,
|
|
12757
|
-
clientX: coords.clientX,
|
|
12758
|
-
clientY: coords.clientY,
|
|
12759
|
-
}));
|
|
12760
|
-
};
|
|
12761
|
-
try {
|
|
12762
|
-
dispatch("pointerover", 0);
|
|
12763
|
-
dispatch("pointerenter", 0);
|
|
12764
|
-
dispatch("pointerdown", 0);
|
|
12765
|
-
for (let step = 1; step <= payload.steps; step += 1) {
|
|
12766
|
-
dispatch("pointermove", step / payload.steps);
|
|
12767
|
-
if (payload.durationMs && payload.steps > 1) await wait(payload.durationMs / payload.steps);
|
|
12682
|
+
const client = await page.context().newCDPSession(page);
|
|
12683
|
+
try {
|
|
12684
|
+
if (pointerType === "touch") {
|
|
12685
|
+
const touchPoint = (x, y) => ({
|
|
12686
|
+
x,
|
|
12687
|
+
y,
|
|
12688
|
+
radiusX: 1,
|
|
12689
|
+
radiusY: 1,
|
|
12690
|
+
force: 1,
|
|
12691
|
+
id: 11,
|
|
12692
|
+
});
|
|
12693
|
+
await client.send("Input.dispatchTouchEvent", {
|
|
12694
|
+
type: "touchStart",
|
|
12695
|
+
touchPoints: [touchPoint(start.x, start.y)],
|
|
12696
|
+
});
|
|
12697
|
+
for (let step = 1; step <= steps; step += 1) {
|
|
12698
|
+
const progress = step / steps;
|
|
12699
|
+
await client.send("Input.dispatchTouchEvent", {
|
|
12700
|
+
type: "touchMove",
|
|
12701
|
+
touchPoints: [
|
|
12702
|
+
touchPoint(
|
|
12703
|
+
start.x + (end.x - start.x) * progress,
|
|
12704
|
+
start.y + (end.y - start.y) * progress,
|
|
12705
|
+
),
|
|
12706
|
+
],
|
|
12707
|
+
});
|
|
12708
|
+
if (durationMs && steps > 1) await page.waitForTimeout(durationMs / steps);
|
|
12709
|
+
}
|
|
12710
|
+
await client.send("Input.dispatchTouchEvent", {
|
|
12711
|
+
type: "touchEnd",
|
|
12712
|
+
touchPoints: [],
|
|
12713
|
+
});
|
|
12714
|
+
} else {
|
|
12715
|
+
await client.send("Input.dispatchMouseEvent", {
|
|
12716
|
+
type: "mouseMoved",
|
|
12717
|
+
x: start.x,
|
|
12718
|
+
y: start.y,
|
|
12719
|
+
pointerType: "pen",
|
|
12720
|
+
});
|
|
12721
|
+
await client.send("Input.dispatchMouseEvent", {
|
|
12722
|
+
type: "mousePressed",
|
|
12723
|
+
x: start.x,
|
|
12724
|
+
y: start.y,
|
|
12725
|
+
button: "left",
|
|
12726
|
+
buttons: 1,
|
|
12727
|
+
clickCount: 1,
|
|
12728
|
+
pointerType: "pen",
|
|
12729
|
+
});
|
|
12730
|
+
for (let step = 1; step <= steps; step += 1) {
|
|
12731
|
+
const progress = step / steps;
|
|
12732
|
+
await client.send("Input.dispatchMouseEvent", {
|
|
12733
|
+
type: "mouseMoved",
|
|
12734
|
+
x: start.x + (end.x - start.x) * progress,
|
|
12735
|
+
y: start.y + (end.y - start.y) * progress,
|
|
12736
|
+
button: "left",
|
|
12737
|
+
buttons: 1,
|
|
12738
|
+
pointerType: "pen",
|
|
12739
|
+
});
|
|
12740
|
+
if (durationMs && steps > 1) await page.waitForTimeout(durationMs / steps);
|
|
12768
12741
|
}
|
|
12769
|
-
|
|
12770
|
-
|
|
12771
|
-
|
|
12772
|
-
|
|
12773
|
-
|
|
12742
|
+
await client.send("Input.dispatchMouseEvent", {
|
|
12743
|
+
type: "mouseReleased",
|
|
12744
|
+
x: end.x,
|
|
12745
|
+
y: end.y,
|
|
12746
|
+
button: "left",
|
|
12747
|
+
buttons: 0,
|
|
12748
|
+
clickCount: 1,
|
|
12749
|
+
pointerType: "pen",
|
|
12750
|
+
});
|
|
12774
12751
|
}
|
|
12775
|
-
}
|
|
12776
|
-
|
|
12777
|
-
|
|
12778
|
-
end: localEnd,
|
|
12779
|
-
steps,
|
|
12780
|
-
durationMs,
|
|
12781
|
-
});
|
|
12752
|
+
} finally {
|
|
12753
|
+
await client.detach().catch(() => {});
|
|
12754
|
+
}
|
|
12782
12755
|
} else {
|
|
12783
12756
|
await page.mouse.move(start.x, start.y);
|
|
12784
12757
|
await page.mouse.down();
|
|
@@ -12811,7 +12784,7 @@ async function executeSetupAction(action, ordinal, viewport) {
|
|
|
12811
12784
|
to_x: toX,
|
|
12812
12785
|
to_y: toY,
|
|
12813
12786
|
pointer_type: pointerType,
|
|
12814
|
-
|
|
12787
|
+
input_dispatch: pointerType === "touch" || pointerType === "pen" ? "cdp" : "playwright_mouse",
|
|
12815
12788
|
steps,
|
|
12816
12789
|
duration_ms: durationMs || undefined,
|
|
12817
12790
|
};
|
package/dist/cli.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -14471,106 +14471,79 @@ async function executeSetupAction(action, ordinal, viewport) {
|
|
|
14471
14471
|
const durationMs = setupNumber(action.duration_ms ?? action.durationMs, 0);
|
|
14472
14472
|
const pointerType = String(action.pointer_type || action.pointerType || "mouse").trim().toLowerCase();
|
|
14473
14473
|
if (pointerType === "touch" || pointerType === "pen") {
|
|
14474
|
-
const
|
|
14475
|
-
|
|
14476
|
-
|
|
14477
|
-
|
|
14478
|
-
|
|
14479
|
-
|
|
14480
|
-
|
|
14481
|
-
|
|
14482
|
-
|
|
14483
|
-
|
|
14484
|
-
|
|
14485
|
-
|
|
14486
|
-
|
|
14487
|
-
|
|
14488
|
-
|
|
14489
|
-
|
|
14490
|
-
|
|
14491
|
-
|
|
14492
|
-
|
|
14493
|
-
|
|
14494
|
-
|
|
14495
|
-
|
|
14496
|
-
|
|
14497
|
-
|
|
14498
|
-
|
|
14499
|
-
|
|
14500
|
-
|
|
14501
|
-
|
|
14502
|
-
|
|
14503
|
-
|
|
14504
|
-
|
|
14505
|
-
|
|
14506
|
-
|
|
14507
|
-
|
|
14508
|
-
|
|
14509
|
-
|
|
14510
|
-
|
|
14511
|
-
|
|
14512
|
-
|
|
14513
|
-
|
|
14514
|
-
|
|
14515
|
-
|
|
14516
|
-
|
|
14517
|
-
|
|
14518
|
-
|
|
14519
|
-
|
|
14520
|
-
|
|
14521
|
-
}
|
|
14522
|
-
|
|
14523
|
-
|
|
14524
|
-
|
|
14525
|
-
|
|
14526
|
-
|
|
14527
|
-
|
|
14528
|
-
|
|
14529
|
-
|
|
14530
|
-
|
|
14531
|
-
}
|
|
14532
|
-
|
|
14533
|
-
});
|
|
14534
|
-
const point = (progress) => ({
|
|
14535
|
-
clientX: rect.left + payload.start.x + (payload.end.x - payload.start.x) * progress,
|
|
14536
|
-
clientY: rect.top + payload.start.y + (payload.end.y - payload.start.y) * progress,
|
|
14537
|
-
});
|
|
14538
|
-
const dispatch = (type, progress) => {
|
|
14539
|
-
const coords = point(progress);
|
|
14540
|
-
element.dispatchEvent(new PointerEvent(type, {
|
|
14541
|
-
bubbles: true,
|
|
14542
|
-
cancelable: true,
|
|
14543
|
-
composed: true,
|
|
14544
|
-
pointerId,
|
|
14545
|
-
pointerType: payload.pointerType,
|
|
14546
|
-
isPrimary: true,
|
|
14547
|
-
buttons: type === "pointerup" ? 0 : 1,
|
|
14548
|
-
button: type === "pointerup" ? 0 : 0,
|
|
14549
|
-
clientX: coords.clientX,
|
|
14550
|
-
clientY: coords.clientY,
|
|
14551
|
-
}));
|
|
14552
|
-
};
|
|
14553
|
-
try {
|
|
14554
|
-
dispatch("pointerover", 0);
|
|
14555
|
-
dispatch("pointerenter", 0);
|
|
14556
|
-
dispatch("pointerdown", 0);
|
|
14557
|
-
for (let step = 1; step <= payload.steps; step += 1) {
|
|
14558
|
-
dispatch("pointermove", step / payload.steps);
|
|
14559
|
-
if (payload.durationMs && payload.steps > 1) await wait(payload.durationMs / payload.steps);
|
|
14474
|
+
const client = await page.context().newCDPSession(page);
|
|
14475
|
+
try {
|
|
14476
|
+
if (pointerType === "touch") {
|
|
14477
|
+
const touchPoint = (x, y) => ({
|
|
14478
|
+
x,
|
|
14479
|
+
y,
|
|
14480
|
+
radiusX: 1,
|
|
14481
|
+
radiusY: 1,
|
|
14482
|
+
force: 1,
|
|
14483
|
+
id: 11,
|
|
14484
|
+
});
|
|
14485
|
+
await client.send("Input.dispatchTouchEvent", {
|
|
14486
|
+
type: "touchStart",
|
|
14487
|
+
touchPoints: [touchPoint(start.x, start.y)],
|
|
14488
|
+
});
|
|
14489
|
+
for (let step = 1; step <= steps; step += 1) {
|
|
14490
|
+
const progress = step / steps;
|
|
14491
|
+
await client.send("Input.dispatchTouchEvent", {
|
|
14492
|
+
type: "touchMove",
|
|
14493
|
+
touchPoints: [
|
|
14494
|
+
touchPoint(
|
|
14495
|
+
start.x + (end.x - start.x) * progress,
|
|
14496
|
+
start.y + (end.y - start.y) * progress,
|
|
14497
|
+
),
|
|
14498
|
+
],
|
|
14499
|
+
});
|
|
14500
|
+
if (durationMs && steps > 1) await page.waitForTimeout(durationMs / steps);
|
|
14501
|
+
}
|
|
14502
|
+
await client.send("Input.dispatchTouchEvent", {
|
|
14503
|
+
type: "touchEnd",
|
|
14504
|
+
touchPoints: [],
|
|
14505
|
+
});
|
|
14506
|
+
} else {
|
|
14507
|
+
await client.send("Input.dispatchMouseEvent", {
|
|
14508
|
+
type: "mouseMoved",
|
|
14509
|
+
x: start.x,
|
|
14510
|
+
y: start.y,
|
|
14511
|
+
pointerType: "pen",
|
|
14512
|
+
});
|
|
14513
|
+
await client.send("Input.dispatchMouseEvent", {
|
|
14514
|
+
type: "mousePressed",
|
|
14515
|
+
x: start.x,
|
|
14516
|
+
y: start.y,
|
|
14517
|
+
button: "left",
|
|
14518
|
+
buttons: 1,
|
|
14519
|
+
clickCount: 1,
|
|
14520
|
+
pointerType: "pen",
|
|
14521
|
+
});
|
|
14522
|
+
for (let step = 1; step <= steps; step += 1) {
|
|
14523
|
+
const progress = step / steps;
|
|
14524
|
+
await client.send("Input.dispatchMouseEvent", {
|
|
14525
|
+
type: "mouseMoved",
|
|
14526
|
+
x: start.x + (end.x - start.x) * progress,
|
|
14527
|
+
y: start.y + (end.y - start.y) * progress,
|
|
14528
|
+
button: "left",
|
|
14529
|
+
buttons: 1,
|
|
14530
|
+
pointerType: "pen",
|
|
14531
|
+
});
|
|
14532
|
+
if (durationMs && steps > 1) await page.waitForTimeout(durationMs / steps);
|
|
14560
14533
|
}
|
|
14561
|
-
|
|
14562
|
-
|
|
14563
|
-
|
|
14564
|
-
|
|
14565
|
-
|
|
14534
|
+
await client.send("Input.dispatchMouseEvent", {
|
|
14535
|
+
type: "mouseReleased",
|
|
14536
|
+
x: end.x,
|
|
14537
|
+
y: end.y,
|
|
14538
|
+
button: "left",
|
|
14539
|
+
buttons: 0,
|
|
14540
|
+
clickCount: 1,
|
|
14541
|
+
pointerType: "pen",
|
|
14542
|
+
});
|
|
14566
14543
|
}
|
|
14567
|
-
}
|
|
14568
|
-
|
|
14569
|
-
|
|
14570
|
-
end: localEnd,
|
|
14571
|
-
steps,
|
|
14572
|
-
durationMs,
|
|
14573
|
-
});
|
|
14544
|
+
} finally {
|
|
14545
|
+
await client.detach().catch(() => {});
|
|
14546
|
+
}
|
|
14574
14547
|
} else {
|
|
14575
14548
|
await page.mouse.move(start.x, start.y);
|
|
14576
14549
|
await page.mouse.down();
|
|
@@ -14603,7 +14576,7 @@ async function executeSetupAction(action, ordinal, viewport) {
|
|
|
14603
14576
|
to_x: toX,
|
|
14604
14577
|
to_y: toY,
|
|
14605
14578
|
pointer_type: pointerType,
|
|
14606
|
-
|
|
14579
|
+
input_dispatch: pointerType === "touch" || pointerType === "pen" ? "cdp" : "playwright_mouse",
|
|
14607
14580
|
steps,
|
|
14608
14581
|
duration_ms: durationMs || undefined,
|
|
14609
14582
|
};
|
package/dist/index.js
CHANGED
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
resolveRiddleProofProfileTimeoutSec,
|
|
63
63
|
slugifyRiddleProofProfileName,
|
|
64
64
|
summarizeRiddleProofProfileResult
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-ZLNPYVMJ.js";
|
|
66
66
|
import {
|
|
67
67
|
DEFAULT_RIDDLE_API_BASE_URL,
|
|
68
68
|
DEFAULT_RIDDLE_API_KEY_FILE,
|
package/dist/profile.cjs
CHANGED
|
@@ -5785,106 +5785,79 @@ async function executeSetupAction(action, ordinal, viewport) {
|
|
|
5785
5785
|
const durationMs = setupNumber(action.duration_ms ?? action.durationMs, 0);
|
|
5786
5786
|
const pointerType = String(action.pointer_type || action.pointerType || "mouse").trim().toLowerCase();
|
|
5787
5787
|
if (pointerType === "touch" || pointerType === "pen") {
|
|
5788
|
-
const
|
|
5789
|
-
|
|
5790
|
-
|
|
5791
|
-
|
|
5792
|
-
|
|
5793
|
-
|
|
5794
|
-
|
|
5795
|
-
|
|
5796
|
-
|
|
5797
|
-
|
|
5798
|
-
|
|
5799
|
-
|
|
5800
|
-
|
|
5801
|
-
|
|
5802
|
-
|
|
5803
|
-
|
|
5804
|
-
|
|
5805
|
-
|
|
5806
|
-
|
|
5807
|
-
|
|
5808
|
-
|
|
5809
|
-
|
|
5810
|
-
|
|
5811
|
-
|
|
5812
|
-
|
|
5813
|
-
|
|
5814
|
-
|
|
5815
|
-
|
|
5816
|
-
|
|
5817
|
-
|
|
5818
|
-
|
|
5819
|
-
|
|
5820
|
-
|
|
5821
|
-
|
|
5822
|
-
|
|
5823
|
-
|
|
5824
|
-
|
|
5825
|
-
|
|
5826
|
-
|
|
5827
|
-
|
|
5828
|
-
|
|
5829
|
-
|
|
5830
|
-
|
|
5831
|
-
|
|
5832
|
-
|
|
5833
|
-
|
|
5834
|
-
|
|
5835
|
-
}
|
|
5836
|
-
|
|
5837
|
-
|
|
5838
|
-
|
|
5839
|
-
|
|
5840
|
-
|
|
5841
|
-
|
|
5842
|
-
|
|
5843
|
-
|
|
5844
|
-
|
|
5845
|
-
}
|
|
5846
|
-
|
|
5847
|
-
});
|
|
5848
|
-
const point = (progress) => ({
|
|
5849
|
-
clientX: rect.left + payload.start.x + (payload.end.x - payload.start.x) * progress,
|
|
5850
|
-
clientY: rect.top + payload.start.y + (payload.end.y - payload.start.y) * progress,
|
|
5851
|
-
});
|
|
5852
|
-
const dispatch = (type, progress) => {
|
|
5853
|
-
const coords = point(progress);
|
|
5854
|
-
element.dispatchEvent(new PointerEvent(type, {
|
|
5855
|
-
bubbles: true,
|
|
5856
|
-
cancelable: true,
|
|
5857
|
-
composed: true,
|
|
5858
|
-
pointerId,
|
|
5859
|
-
pointerType: payload.pointerType,
|
|
5860
|
-
isPrimary: true,
|
|
5861
|
-
buttons: type === "pointerup" ? 0 : 1,
|
|
5862
|
-
button: type === "pointerup" ? 0 : 0,
|
|
5863
|
-
clientX: coords.clientX,
|
|
5864
|
-
clientY: coords.clientY,
|
|
5865
|
-
}));
|
|
5866
|
-
};
|
|
5867
|
-
try {
|
|
5868
|
-
dispatch("pointerover", 0);
|
|
5869
|
-
dispatch("pointerenter", 0);
|
|
5870
|
-
dispatch("pointerdown", 0);
|
|
5871
|
-
for (let step = 1; step <= payload.steps; step += 1) {
|
|
5872
|
-
dispatch("pointermove", step / payload.steps);
|
|
5873
|
-
if (payload.durationMs && payload.steps > 1) await wait(payload.durationMs / payload.steps);
|
|
5788
|
+
const client = await page.context().newCDPSession(page);
|
|
5789
|
+
try {
|
|
5790
|
+
if (pointerType === "touch") {
|
|
5791
|
+
const touchPoint = (x, y) => ({
|
|
5792
|
+
x,
|
|
5793
|
+
y,
|
|
5794
|
+
radiusX: 1,
|
|
5795
|
+
radiusY: 1,
|
|
5796
|
+
force: 1,
|
|
5797
|
+
id: 11,
|
|
5798
|
+
});
|
|
5799
|
+
await client.send("Input.dispatchTouchEvent", {
|
|
5800
|
+
type: "touchStart",
|
|
5801
|
+
touchPoints: [touchPoint(start.x, start.y)],
|
|
5802
|
+
});
|
|
5803
|
+
for (let step = 1; step <= steps; step += 1) {
|
|
5804
|
+
const progress = step / steps;
|
|
5805
|
+
await client.send("Input.dispatchTouchEvent", {
|
|
5806
|
+
type: "touchMove",
|
|
5807
|
+
touchPoints: [
|
|
5808
|
+
touchPoint(
|
|
5809
|
+
start.x + (end.x - start.x) * progress,
|
|
5810
|
+
start.y + (end.y - start.y) * progress,
|
|
5811
|
+
),
|
|
5812
|
+
],
|
|
5813
|
+
});
|
|
5814
|
+
if (durationMs && steps > 1) await page.waitForTimeout(durationMs / steps);
|
|
5815
|
+
}
|
|
5816
|
+
await client.send("Input.dispatchTouchEvent", {
|
|
5817
|
+
type: "touchEnd",
|
|
5818
|
+
touchPoints: [],
|
|
5819
|
+
});
|
|
5820
|
+
} else {
|
|
5821
|
+
await client.send("Input.dispatchMouseEvent", {
|
|
5822
|
+
type: "mouseMoved",
|
|
5823
|
+
x: start.x,
|
|
5824
|
+
y: start.y,
|
|
5825
|
+
pointerType: "pen",
|
|
5826
|
+
});
|
|
5827
|
+
await client.send("Input.dispatchMouseEvent", {
|
|
5828
|
+
type: "mousePressed",
|
|
5829
|
+
x: start.x,
|
|
5830
|
+
y: start.y,
|
|
5831
|
+
button: "left",
|
|
5832
|
+
buttons: 1,
|
|
5833
|
+
clickCount: 1,
|
|
5834
|
+
pointerType: "pen",
|
|
5835
|
+
});
|
|
5836
|
+
for (let step = 1; step <= steps; step += 1) {
|
|
5837
|
+
const progress = step / steps;
|
|
5838
|
+
await client.send("Input.dispatchMouseEvent", {
|
|
5839
|
+
type: "mouseMoved",
|
|
5840
|
+
x: start.x + (end.x - start.x) * progress,
|
|
5841
|
+
y: start.y + (end.y - start.y) * progress,
|
|
5842
|
+
button: "left",
|
|
5843
|
+
buttons: 1,
|
|
5844
|
+
pointerType: "pen",
|
|
5845
|
+
});
|
|
5846
|
+
if (durationMs && steps > 1) await page.waitForTimeout(durationMs / steps);
|
|
5874
5847
|
}
|
|
5875
|
-
|
|
5876
|
-
|
|
5877
|
-
|
|
5878
|
-
|
|
5879
|
-
|
|
5848
|
+
await client.send("Input.dispatchMouseEvent", {
|
|
5849
|
+
type: "mouseReleased",
|
|
5850
|
+
x: end.x,
|
|
5851
|
+
y: end.y,
|
|
5852
|
+
button: "left",
|
|
5853
|
+
buttons: 0,
|
|
5854
|
+
clickCount: 1,
|
|
5855
|
+
pointerType: "pen",
|
|
5856
|
+
});
|
|
5880
5857
|
}
|
|
5881
|
-
}
|
|
5882
|
-
|
|
5883
|
-
|
|
5884
|
-
end: localEnd,
|
|
5885
|
-
steps,
|
|
5886
|
-
durationMs,
|
|
5887
|
-
});
|
|
5858
|
+
} finally {
|
|
5859
|
+
await client.detach().catch(() => {});
|
|
5860
|
+
}
|
|
5888
5861
|
} else {
|
|
5889
5862
|
await page.mouse.move(start.x, start.y);
|
|
5890
5863
|
await page.mouse.down();
|
|
@@ -5917,7 +5890,7 @@ async function executeSetupAction(action, ordinal, viewport) {
|
|
|
5917
5890
|
to_x: toX,
|
|
5918
5891
|
to_y: toY,
|
|
5919
5892
|
pointer_type: pointerType,
|
|
5920
|
-
|
|
5893
|
+
input_dispatch: pointerType === "touch" || pointerType === "pen" ? "cdp" : "playwright_mouse",
|
|
5921
5894
|
steps,
|
|
5922
5895
|
duration_ms: durationMs || undefined,
|
|
5923
5896
|
};
|
package/dist/profile.js
CHANGED
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
resolveRiddleProofProfileTimeoutSec,
|
|
24
24
|
slugifyRiddleProofProfileName,
|
|
25
25
|
summarizeRiddleProofProfileResult
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-ZLNPYVMJ.js";
|
|
27
27
|
export {
|
|
28
28
|
RIDDLE_PROOF_PROFILE_CHECK_TYPES,
|
|
29
29
|
RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
|
|
@@ -292,7 +292,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
292
292
|
blocking?: boolean;
|
|
293
293
|
details?: Record<string, unknown>;
|
|
294
294
|
ok: boolean;
|
|
295
|
-
action: "
|
|
295
|
+
action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
|
|
296
296
|
state_path: string;
|
|
297
297
|
stage: any;
|
|
298
298
|
summary: string;
|
|
@@ -382,7 +382,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
382
382
|
continueWithStage?: WorkflowStage | null;
|
|
383
383
|
blocking?: boolean;
|
|
384
384
|
details?: Record<string, unknown>;
|
|
385
|
-
action: "
|
|
385
|
+
action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
|
|
386
386
|
state_path: string;
|
|
387
387
|
stage: any;
|
|
388
388
|
checkpoint: string;
|
|
@@ -659,7 +659,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
659
659
|
error?: undefined;
|
|
660
660
|
} | {
|
|
661
661
|
ok: boolean;
|
|
662
|
-
action: "
|
|
662
|
+
action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
|
|
663
663
|
state_path: string;
|
|
664
664
|
stage: any;
|
|
665
665
|
summary: string;
|
|
@@ -292,7 +292,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
292
292
|
blocking?: boolean;
|
|
293
293
|
details?: Record<string, unknown>;
|
|
294
294
|
ok: boolean;
|
|
295
|
-
action: "
|
|
295
|
+
action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
|
|
296
296
|
state_path: string;
|
|
297
297
|
stage: any;
|
|
298
298
|
summary: string;
|
|
@@ -382,7 +382,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
382
382
|
continueWithStage?: WorkflowStage | null;
|
|
383
383
|
blocking?: boolean;
|
|
384
384
|
details?: Record<string, unknown>;
|
|
385
|
-
action: "
|
|
385
|
+
action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
|
|
386
386
|
state_path: string;
|
|
387
387
|
stage: any;
|
|
388
388
|
checkpoint: string;
|
|
@@ -659,7 +659,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
659
659
|
error?: undefined;
|
|
660
660
|
} | {
|
|
661
661
|
ok: boolean;
|
|
662
|
-
action: "
|
|
662
|
+
action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
|
|
663
663
|
state_path: string;
|
|
664
664
|
stage: any;
|
|
665
665
|
summary: string;
|