Add Tzafon Northstar computer use template#134
Conversation
e9427c2 to
f599a30
Compare
Add new CLI templates for Tzafon's Northstar CUA Fast model, enabling users to scaffold browser automation projects using Kernel's infrastructure. New templates: - TypeScript: `kernel create --template ts-tzafon-cua` - Python: `kernel create --template python-tzafon-cua` Both templates include: - Agentic sampling loop using Tzafon's Lightcone SDK responses API - Computer tool mapping Northstar actions (click, type, scroll, drag, key, navigate, wait) to Kernel's Computer Controls API - Session management with optional replay recording - 1280x800 default viewport Files changed: - pkg/templates/typescript/tzafon-computer-use/ - TypeScript template - pkg/templates/python/tzafon-computer-use/ - Python template - pkg/create/templates.go - Template registration
f599a30 to
00b5338
Compare
|
|
||
| case 'drag': | ||
| await this.kernel.browsers.computer.dragMouse(this.sessionId, { | ||
| path: [ |
There was a problem hiding this comment.
dp-cursor-review-analysis
Drag actions from the Tzafon model are incomplete. The model emits {"type":"drag","x":470,"y":344} with only a start point — no end_x/end_y or x2/y2. This causes dragMouse to receive NaN for the destination, so the drag silently does nothing. This is a Tzafon model-side limitation; the template code handles drag correctly when both start and end coordinates are provided.
| self.kernel.browsers.playwright.execute( | ||
| self.session_id, code=f"await page.goto({json.dumps(action.url)})", | ||
| ) | ||
| elif t == "drag": |
There was a problem hiding this comment.
dp-cursor-review-analysis
Same drag issue as TypeScript. The Tzafon model emits drag actions with only a start point ({"type":"drag","x":470,"y":344}) and no end coordinates. The getattr fallbacks resolve to 0, so every drag ends up dragging to (0, 0). This is a Tzafon model-side limitation.
7ae85f2 to
1aeabe5
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Sayan-
left a comment
There was a problem hiding this comment.
couple of small q's. overall looks good!
| requires-python = ">=3.11" | ||
| dependencies = [ | ||
| "kernel>=0.35.0", | ||
| "tzafon", |
There was a problem hiding this comment.
is there any version pinning required for tzafon?
| elif t == "wait": | ||
| await asyncio.sleep(2) | ||
| else: | ||
| raise ToolError(f"Unknown action type: {t}") |
There was a problem hiding this comment.
does the model ever send right_click as its own action type? the README lists it but there's no case for it here -- only click with button="right" on line 80.

Adds TypeScript and Python templates for Tzafon's Northstar CUA Fast model using Kernel Computer Controls API. Tested end-to-end on Kernel.
Note
Low Risk
Low risk: changes are additive (new template directories and template registry entries) with minimal impact on existing logic beyond listing/sorting supported templates.
Overview
Adds a new
tzafon-computer-usetemplate option topkg/create/templates.go, including display metadata, ordering priority among computer-use templates, and deploy/invoke samples for both TypeScript and Python.Introduces new TypeScript and Python template projects under
pkg/templates/*/tzafon-computer-usethat run a Tzafon Lightconeresponses-based computer-use loop wired to Kernel Computer Controls, with optional replay recording, env/key scaffolding, and minimal project configs (Pythonpyproject.toml; TypeScriptpackage.json/pnpm-lock.yaml/tsconfig.json).Written by Cursor Bugbot for commit 1aeabe5. This will update automatically on new commits. Configure here.