|
3 | 3 | APP_NOT_INSTALLED_SAMPLE, |
4 | 4 | BROWSERSTACK_CONNECT_SAMPLE, |
5 | 5 | DEVICE_IN_USE_SAMPLE, |
| 6 | + MERGED_CARD_ACTIONS_SAMPLE, |
6 | 7 | NOT_SETTLED_SAMPLE, |
7 | 8 | OFFSCREEN_TARGET_SNAPSHOT_SAMPLE, |
8 | 9 | SETTLE_DIFF_SAMPLE, |
@@ -642,4 +643,53 @@ Use the output already shown to determine whether the feed-search UI is present, |
642 | 643 | { id: 'noRedundantInstall', pattern: /(?:^|\n)agent-device\s+install\b/i }, |
643 | 644 | ], |
644 | 645 | }, |
| 646 | + { |
| 647 | + id: 'foreground-attach-single-sim', |
| 648 | + docs: ['--help:first30', 'workflow'], |
| 649 | + task: 'You are starting fresh with no active session. The environment guarantees exactly one booted iOS simulator with exactly one app running on it -- the app you want to keep testing. Plan the command to attach to it and get its initial interactive snapshot in a single call (this only resolves unambiguously because of that guarantee, and it rejects an explicit app or device selector), then press the visible Continue control and close the session.', |
| 650 | + expectations: ['validPlanCommands', 'fullPrefix', 'usesSettleOnMutations', 'opensAndCloses'], |
| 651 | + matchers: [ |
| 652 | + { |
| 653 | + id: 'startsWithForegroundOpen', |
| 654 | + pattern: /^agent-device\s+open\s+--foreground\b/i, |
| 655 | + }, |
| 656 | + { |
| 657 | + id: 'pressesContinueAfterAttach', |
| 658 | + pattern: /agent-device\s+press\s+[^\n]*continue[^\n]*--settle\b/i, |
| 659 | + }, |
| 660 | + ], |
| 661 | + forbidden: [ |
| 662 | + { |
| 663 | + id: 'noAppPositionalWithForeground', |
| 664 | + pattern: /open[ \t]+(?!--)\S+[^\n]*--foreground\b|open[ \t]+--foreground[ \t]+(?!--)\S+/i, |
| 665 | + }, |
| 666 | + { |
| 667 | + id: 'noDeviceSelectorWithForeground', |
| 668 | + pattern: /--foreground\b[^\n]*--(?:udid|device)\b|--(?:udid|device)\b[^\n]*--foreground\b/i, |
| 669 | + }, |
| 670 | + { id: 'noRawCoordinateTarget', pattern: RAW_COORDINATE_TARGET }, |
| 671 | + ], |
| 672 | + }, |
| 673 | + { |
| 674 | + id: 'merged-card-actions-not-directly-invokable', |
| 675 | + docs: ['--help:first30', 'workflow'], |
| 676 | + task: quiz( |
| 677 | + MERGED_CARD_ACTIONS_SAMPLE, |
| 678 | + 'The goal is to reply to this post. The actions list names "Reply" as a hidden affordance on @e72, but that name is not a pressable selector. What command should run next?', |
| 679 | + ), |
| 680 | + expectations: ['validPlanCommands', 'fullPrefix'], |
| 681 | + matchers: [ |
| 682 | + { |
| 683 | + id: 'opensCardToReachReply', |
| 684 | + pattern: /(?:^|\n)agent-device\s+(?:press|click)\s+@e72\b[^\n]*--settle\b/i, |
| 685 | + }, |
| 686 | + ], |
| 687 | + forbidden: [ |
| 688 | + { |
| 689 | + id: 'noPressingActionNameAsSelector', |
| 690 | + pattern: /(?:^|\n)agent-device\s+(?:press|click|find)\b[^\n]*(?:label|text)="?reply"?/i, |
| 691 | + }, |
| 692 | + { id: 'noRawCoordinateTarget', pattern: RAW_COORDINATE_TARGET }, |
| 693 | + ], |
| 694 | + }, |
645 | 695 | ]; |
0 commit comments