Skip to content

Commit 6db3f2c

Browse files
committed
chore: add a tiny loop for evals
1 parent d893c00 commit 6db3f2c

File tree

18 files changed

+493
-174
lines changed

18 files changed

+493
-174
lines changed

examples/todomvc/.claude/agents/playwright-test-planner.md

Lines changed: 2 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: playwright-test-planner
33
description: Use this agent when you need to create comprehensive test plan for a web application or website
4-
tools: Glob, Grep, Read, LS, Edit, MultiEdit, Write, mcp__playwright-test__browser_click, mcp__playwright-test__browser_close, mcp__playwright-test__browser_console_messages, mcp__playwright-test__browser_drag, mcp__playwright-test__browser_evaluate, mcp__playwright-test__browser_file_upload, mcp__playwright-test__browser_handle_dialog, mcp__playwright-test__browser_hover, mcp__playwright-test__browser_navigate, mcp__playwright-test__browser_navigate_back, mcp__playwright-test__browser_network_requests, mcp__playwright-test__browser_press_key, mcp__playwright-test__browser_select_option, mcp__playwright-test__browser_snapshot, mcp__playwright-test__browser_take_screenshot, mcp__playwright-test__browser_type, mcp__playwright-test__browser_wait_for, mcp__playwright-test__planner_setup_page
4+
tools: Glob, Grep, Read, LS, mcp__playwright-test__browser_click, mcp__playwright-test__browser_close, mcp__playwright-test__browser_console_messages, mcp__playwright-test__browser_drag, mcp__playwright-test__browser_evaluate, mcp__playwright-test__browser_file_upload, mcp__playwright-test__browser_handle_dialog, mcp__playwright-test__browser_hover, mcp__playwright-test__browser_navigate, mcp__playwright-test__browser_navigate_back, mcp__playwright-test__browser_network_requests, mcp__playwright-test__browser_press_key, mcp__playwright-test__browser_select_option, mcp__playwright-test__browser_snapshot, mcp__playwright-test__browser_take_screenshot, mcp__playwright-test__browser_type, mcp__playwright-test__browser_wait_for, mcp__playwright-test__planner_setup_page, mcp__playwright-test__planner_save_plan
55
model: sonnet
66
color: green
77
---
@@ -41,52 +41,7 @@ You will:
4141

4242
5. **Create Documentation**
4343

44-
Save your test plan as requested:
45-
- Executive summary of the tested page/application
46-
- Individual scenarios as separate sections
47-
- Each scenario formatted with numbered steps
48-
- Each test case with proposed file name for implementation
49-
- Clear expected results for verification
50-
51-
<example-spec>
52-
# TodoMVC Application - Comprehensive Test Plan
53-
54-
## Application Overview
55-
56-
The TodoMVC application is a React-based todo list manager that provides core task management functionality. The
57-
application features:
58-
59-
- **Task Management**: Add, edit, complete, and delete individual todos
60-
- **Bulk Operations**: Mark all todos as complete/incomplete and clear all completed todos
61-
- **Filtering**: View todos by All, Active, or Completed status
62-
- **URL Routing**: Support for direct navigation to filtered views via URLs
63-
- **Counter Display**: Real-time count of active (incomplete) todos
64-
- **Persistence**: State maintained during session (browser refresh behavior not tested)
65-
66-
## Test Scenarios
67-
68-
### 1. Adding New Todos
69-
70-
**Seed:** `tests/seed.spec.ts`
71-
72-
#### 1.1 Add Valid Todo
73-
74-
**File** `tests/adding-new-todos/add-valid-todo.spec.ts`
75-
76-
**Steps:**
77-
1. Click in the "What needs to be done?" input field
78-
2. Type "Buy groceries"
79-
3. Press Enter key
80-
81-
**Expected Results:**
82-
- Todo appears in the list with unchecked checkbox
83-
- Counter shows "1 item left"
84-
- Input field is cleared and ready for next entry
85-
- Todo list controls become visible (Mark all as complete checkbox)
86-
87-
#### 1.2
88-
...
89-
</example-spec>
44+
Submit your test plan using `planner_save_plan` tool.
9045

9146
**Quality Standards**:
9247
- Write steps that are specific enough for any tester to follow

package-lock.json

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
"react": "^19.1.1",
9494
"react-dom": "^19.1.1",
9595
"ssim.js": "^3.5.0",
96+
"tiny-loop": "^0.0.5",
9697
"typescript": "^5.9.2",
9798
"vite": "^6.4.1",
9899
"ws": "^8.17.1",

packages/playwright/ThirdPartyNotices.txt

Lines changed: 208 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ This project incorporates components from the projects listed below. The origina
207207
- [email protected] (https://github.com/jshttp/statuses)
208208
- [email protected] (https://github.com/hunterloftis/stoppable)
209209
- [email protected] (https://github.com/chalk/supports-color)
210+
- [email protected] (https://github.com/pavelfeldman/tiny-loop)
210211
- [email protected] (https://github.com/micromatch/to-regex-range)
211212
- [email protected] (https://github.com/component/toidentifier)
212213
- [email protected] (https://github.com/jshttp/type-is)
@@ -5883,6 +5884,212 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
58835884
=========================================
58845885
END OF [email protected] AND INFORMATION
58855886

5887+
%% [email protected] NOTICES AND INFORMATION BEGIN HERE
5888+
=========================================
5889+
Apache License
5890+
Version 2.0, January 2004
5891+
http://www.apache.org/licenses/
5892+
5893+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
5894+
5895+
1. Definitions.
5896+
5897+
"License" shall mean the terms and conditions for use, reproduction,
5898+
and distribution as defined by Sections 1 through 9 of this document.
5899+
5900+
"Licensor" shall mean the copyright owner or entity authorized by
5901+
the copyright owner that is granting the License.
5902+
5903+
"Legal Entity" shall mean the union of the acting entity and all
5904+
other entities that control, are controlled by, or are under common
5905+
control with that entity. For the purposes of this definition,
5906+
"control" means (i) the power, direct or indirect, to cause the
5907+
direction or management of such entity, whether by contract or
5908+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
5909+
outstanding shares, or (iii) beneficial ownership of such entity.
5910+
5911+
"You" (or "Your") shall mean an individual or Legal Entity
5912+
exercising permissions granted by this License.
5913+
5914+
"Source" form shall mean the preferred form for making modifications,
5915+
including but not limited to software source code, documentation
5916+
source, and configuration files.
5917+
5918+
"Object" form shall mean any form resulting from mechanical
5919+
transformation or translation of a Source form, including but
5920+
not limited to compiled object code, generated documentation,
5921+
and conversions to other media types.
5922+
5923+
"Work" shall mean the work of authorship, whether in Source or
5924+
Object form, made available under the License, as indicated by a
5925+
copyright notice that is included in or attached to the work
5926+
(an example is provided in the Appendix below).
5927+
5928+
"Derivative Works" shall mean any work, whether in Source or Object
5929+
form, that is based on (or derived from) the Work and for which the
5930+
editorial revisions, annotations, elaborations, or other modifications
5931+
represent, as a whole, an original work of authorship. For the purposes
5932+
of this License, Derivative Works shall not include works that remain
5933+
separable from, or merely link (or bind by name) to the interfaces of,
5934+
the Work and Derivative Works thereof.
5935+
5936+
"Contribution" shall mean any work of authorship, including
5937+
the original version of the Work and any modifications or additions
5938+
to that Work or Derivative Works thereof, that is intentionally
5939+
submitted to Licensor for inclusion in the Work by the copyright owner
5940+
or by an individual or Legal Entity authorized to submit on behalf of
5941+
the copyright owner. For the purposes of this definition, "submitted"
5942+
means any form of electronic, verbal, or written communication sent
5943+
to the Licensor or its representatives, including but not limited to
5944+
communication on electronic mailing lists, source code control systems,
5945+
and issue tracking systems that are managed by, or on behalf of, the
5946+
Licensor for the purpose of discussing and improving the Work, but
5947+
excluding communication that is conspicuously marked or otherwise
5948+
designated in writing by the copyright owner as "Not a Contribution."
5949+
5950+
"Contributor" shall mean Licensor and any individual or Legal Entity
5951+
on behalf of whom a Contribution has been received by Licensor and
5952+
subsequently incorporated within the Work.
5953+
5954+
2. Grant of Copyright License. Subject to the terms and conditions of
5955+
this License, each Contributor hereby grants to You a perpetual,
5956+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
5957+
copyright license to reproduce, prepare Derivative Works of,
5958+
publicly display, publicly perform, sublicense, and distribute the
5959+
Work and such Derivative Works in Source or Object form.
5960+
5961+
3. Grant of Patent License. Subject to the terms and conditions of
5962+
this License, each Contributor hereby grants to You a perpetual,
5963+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
5964+
(except as stated in this section) patent license to make, have made,
5965+
use, offer to sell, sell, import, and otherwise transfer the Work,
5966+
where such license applies only to those patent claims licensable
5967+
by such Contributor that are necessarily infringed by their
5968+
Contribution(s) alone or by combination of their Contribution(s)
5969+
with the Work to which such Contribution(s) was submitted. If You
5970+
institute patent litigation against any entity (including a
5971+
cross-claim or counterclaim in a lawsuit) alleging that the Work
5972+
or a Contribution incorporated within the Work constitutes direct
5973+
or contributory patent infringement, then any patent licenses
5974+
granted to You under this License for that Work shall terminate
5975+
as of the date such litigation is filed.
5976+
5977+
4. Redistribution. You may reproduce and distribute copies of the
5978+
Work or Derivative Works thereof in any medium, with or without
5979+
modifications, and in Source or Object form, provided that You
5980+
meet the following conditions:
5981+
5982+
(a) You must give any other recipients of the Work or
5983+
Derivative Works a copy of this License; and
5984+
5985+
(b) You must cause any modified files to carry prominent notices
5986+
stating that You changed the files; and
5987+
5988+
(c) You must retain, in the Source form of any Derivative Works
5989+
that You distribute, all copyright, patent, trademark, and
5990+
attribution notices from the Source form of the Work,
5991+
excluding those notices that do not pertain to any part of
5992+
the Derivative Works; and
5993+
5994+
(d) If the Work includes a "NOTICE" text file as part of its
5995+
distribution, then any Derivative Works that You distribute must
5996+
include a readable copy of the attribution notices contained
5997+
within such NOTICE file, excluding those notices that do not
5998+
pertain to any part of the Derivative Works, in at least one
5999+
of the following places: within a NOTICE text file distributed
6000+
as part of the Derivative Works; within the Source form or
6001+
documentation, if provided along with the Derivative Works; or,
6002+
within a display generated by the Derivative Works, if and
6003+
wherever such third-party notices normally appear. The contents
6004+
of the NOTICE file are for informational purposes only and
6005+
do not modify the License. You may add Your own attribution
6006+
notices within Derivative Works that You distribute, alongside
6007+
or as an addendum to the NOTICE text from the Work, provided
6008+
that such additional attribution notices cannot be construed
6009+
as modifying the License.
6010+
6011+
You may add Your own copyright statement to Your modifications and
6012+
may provide additional or different license terms and conditions
6013+
for use, reproduction, or distribution of Your modifications, or
6014+
for any such Derivative Works as a whole, provided Your use,
6015+
reproduction, and distribution of the Work otherwise complies with
6016+
the conditions stated in this License.
6017+
6018+
5. Submission of Contributions. Unless You explicitly state otherwise,
6019+
any Contribution intentionally submitted for inclusion in the Work
6020+
by You to the Licensor shall be under the terms and conditions of
6021+
this License, without any additional terms or conditions.
6022+
Notwithstanding the above, nothing herein shall supersede or modify
6023+
the terms of any separate license agreement you may have executed
6024+
with Licensor regarding such Contributions.
6025+
6026+
6. Trademarks. This License does not grant permission to use the trade
6027+
names, trademarks, service marks, or product names of the Licensor,
6028+
except as required for reasonable and customary use in describing the
6029+
origin of the Work and reproducing the content of the NOTICE file.
6030+
6031+
7. Disclaimer of Warranty. Unless required by applicable law or
6032+
agreed to in writing, Licensor provides the Work (and each
6033+
Contributor provides its Contributions) on an "AS IS" BASIS,
6034+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
6035+
implied, including, without limitation, any warranties or conditions
6036+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
6037+
PARTICULAR PURPOSE. You are solely responsible for determining the
6038+
appropriateness of using or redistributing the Work and assume any
6039+
risks associated with Your exercise of permissions under this License.
6040+
6041+
8. Limitation of Liability. In no event and under no legal theory,
6042+
whether in tort (including negligence), contract, or otherwise,
6043+
unless required by applicable law (such as deliberate and grossly
6044+
negligent acts) or agreed to in writing, shall any Contributor be
6045+
liable to You for damages, including any direct, indirect, special,
6046+
incidental, or consequential damages of any character arising as a
6047+
result of this License or out of the use or inability to use the
6048+
Work (including but not limited to damages for loss of goodwill,
6049+
work stoppage, computer failure or malfunction, or any and all
6050+
other commercial damages or losses), even if such Contributor
6051+
has been advised of the possibility of such damages.
6052+
6053+
9. Accepting Warranty or Additional Liability. While redistributing
6054+
the Work or Derivative Works thereof, You may choose to offer,
6055+
and charge a fee for, acceptance of support, warranty, indemnity,
6056+
or other liability obligations and/or rights consistent with this
6057+
License. However, in accepting such obligations, You may act only
6058+
on Your own behalf and on Your sole responsibility, not on behalf
6059+
of any other Contributor, and only if You agree to indemnify,
6060+
defend, and hold each Contributor harmless for any liability
6061+
incurred by, or claims asserted against, such Contributor by reason
6062+
of your accepting any such warranty or additional liability.
6063+
6064+
END OF TERMS AND CONDITIONS
6065+
6066+
APPENDIX: How to apply the Apache License to your work.
6067+
6068+
To apply the Apache License to your work, attach the following
6069+
boilerplate notice, with the fields enclosed by brackets "[]"
6070+
replaced with your own identifying information. (Don't include
6071+
the brackets!) The text should be enclosed in the appropriate
6072+
comment syntax for the file format. We also recommend that a
6073+
file or class name and description of purpose be included on the
6074+
same "printed page" as the copyright notice for easier
6075+
identification within third-party archives.
6076+
6077+
Copyright (c) Microsoft Corporation.
6078+
6079+
Licensed under the Apache License, Version 2.0 (the "License");
6080+
you may not use this file except in compliance with the License.
6081+
You may obtain a copy of the License at
6082+
6083+
http://www.apache.org/licenses/LICENSE-2.0
6084+
6085+
Unless required by applicable law or agreed to in writing, software
6086+
distributed under the License is distributed on an "AS IS" BASIS,
6087+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6088+
See the License for the specific language governing permissions and
6089+
limitations under the License.
6090+
=========================================
6091+
END OF [email protected] AND INFORMATION
6092+
58866093
%% [email protected] NOTICES AND INFORMATION BEGIN HERE
58876094
=========================================
58886095
The MIT License (MIT)
@@ -6192,6 +6399,6 @@ END OF [email protected] AND INFORMATION
61926399

61936400
SUMMARY BEGIN HERE
61946401
=========================================
6195-
Total Packages: 216
6402+
Total Packages: 217
61966403
=========================================
61976404
END OF SUMMARY

packages/playwright/bundles/mcp/package-lock.json

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/playwright/bundles/mcp/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"private": true,
55
"dependencies": {
66
"@modelcontextprotocol/sdk": "^1.17.5",
7+
"tiny-loop": "^0.0.5",
78
"zod": "^3.25.76",
89
"zod-to-json-schema": "^3.24.6"
910
}

packages/playwright/bundles/mcp/src/mcpBundleImpl.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,6 @@ export { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'
2323
export { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
2424
export { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
2525
export { CallToolRequestSchema, ListRootsRequestSchema, ListToolsRequestSchema, PingRequestSchema, ProgressNotificationSchema } from '@modelcontextprotocol/sdk/types.js';
26+
export { runLoop } from 'tiny-loop';
2627
export { z } from 'zod';
2728
export { zodToJsonSchema } from 'zod-to-json-schema';
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1-
[generateAgents.ts]
1+
[*]
2+
../mcp/sdk/
23
../mcp/test/
34
../common/
5+
6+
[generateAgents.ts]
7+
../mcp/test/

0 commit comments

Comments
 (0)