Commit 928f53a
Update yutori-computer-use templates for n1-latest (#113)
## Summary
- Update yutori templates (Python + TypeScript) to the `n1-latest` model
API, which uses OpenAI-compatible `tool_calls` format instead of the
previous custom format
- Remove Playwright computer mode in favor of a single Computer Controls
path (Playwright is still used for `goto_url` in kiosk mode)
- Add kiosk mode option that hides browser chrome and uses Playwright
for navigation
- Rename `max_tokens` to `max_completion_tokens`, update viewport to
1280x800, simplify the sampling loop and tool mapping
## Test plan
All 13 action types were tested against live Kernel browser sessions for
both Python and TypeScript implementations (27 tests each, all passing):
| Action | Status |
|---|---|
| `left_click`, `double_click`, `triple_click`, `right_click` | Pass |
| `hover`, `drag` | Pass |
| `type` (basic, `clear_before_typing`, `press_enter_after`) | Pass |
| `key_press` (single key, combos, modifier mapping) | Pass |
| `scroll` (up, down, left, right) | Pass |
| `goto_url`, `go_back`, `refresh`, `wait` | Pass |
| Error handling (unknown action, missing required fields, invalid
direction) | Pass |
Made with [Cursor](https://cursor.com)
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Moderate risk because it rewires the agent loop/tool protocol and
action schema for both Python and TypeScript templates, which can break
runtime behavior if the `tool_calls` or coordinate/action mapping
differs from expectations.
>
> **Overview**
> Updates the `yutori-computer-use` Python and TypeScript templates to
use Yutori `n1-latest`’s OpenAI-compatible `tool_calls` flow (tool
result messages keyed by `tool_call_id`) instead of the prior
JSON-in-content + `observation` approach.
>
> Simplifies execution to a single Computer Controls path by removing
the Playwright “mode”, adding an optional `kiosk`/`kioskMode` that
launches the browser in kiosk mode and uses Playwright only for
`goto_url`, and updating action/schema details (e.g., `coordinates` +
new click variants, `max_completion_tokens`, default viewport
`1280x800`, WebP screenshot encoding via `Pillow`/`sharp`). QA docs were
updated to reflect the new Yutori invocation patterns, and `.gitignore`
now excludes `.cursor/plans/`.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
c3757ab. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent 477c6df commit 928f53a
File tree
17 files changed
+439
-1267
lines changed- .cursor/commands
- pkg/templates
- python/yutori-computer-use
- tools
- typescript/yutori-computer-use
- tools
17 files changed
+439
-1267
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
65 | 63 | | |
66 | 64 | | |
67 | 65 | | |
| |||
72 | 70 | | |
73 | 71 | | |
74 | 72 | | |
75 | | - | |
76 | | - | |
77 | | - | |
| 73 | + | |
78 | 74 | | |
79 | 75 | | |
80 | 76 | | |
| |||
275 | 271 | | |
276 | 272 | | |
277 | 273 | | |
278 | | - | |
279 | | - | |
| 274 | + | |
| 275 | + | |
280 | 276 | | |
281 | 277 | | |
282 | 278 | | |
| |||
287 | 283 | | |
288 | 284 | | |
289 | 285 | | |
290 | | - | |
291 | | - | |
| 286 | + | |
| 287 | + | |
292 | 288 | | |
293 | 289 | | |
294 | 290 | | |
| |||
313 | 309 | | |
314 | 310 | | |
315 | 311 | | |
316 | | - | |
317 | | - | |
| 312 | + | |
| 313 | + | |
318 | 314 | | |
319 | 315 | | |
320 | 316 | | |
| |||
323 | 319 | | |
324 | 320 | | |
325 | 321 | | |
326 | | - | |
327 | | - | |
| 322 | + | |
| 323 | + | |
328 | 324 | | |
329 | 325 | | |
330 | 326 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
40 | 43 | | |
41 | 44 | | |
42 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
38 | 56 | | |
39 | 57 | | |
40 | | - | |
| 58 | + | |
41 | 59 | | |
42 | | - | |
| 60 | + | |
43 | 61 | | |
44 | 62 | | |
45 | 63 | | |
46 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
47 | 69 | | |
48 | 70 | | |
49 | 71 | | |
50 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
51 | 76 | | |
52 | 77 | | |
53 | 78 | | |
| |||
57 | 82 | | |
58 | 83 | | |
59 | 84 | | |
60 | | - | |
61 | 85 | | |
62 | 86 | | |
63 | 87 | | |
| |||
0 commit comments