Skip to content

Switch to @onkernel/cu-playwright package and template refactoring #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

bigboateng
Copy link

@bigboateng bigboateng commented Jun 23, 2025

Description

🔄 Implementation Changes

  • Switched from custom inline implementation to @onkernel/cu-playwright package

📦 Template Restructuring

  • Renamed templates/python/computer-use → templates/python/claude-cu
  • Renamed templates/typescript/anthropic-computer-use → templates/typescript/claude-cu
  • Both Python and TypeScript now use the same template name: claude-cu (shorter and cleaner)

Updated app names for consistency:
Python: python-cu → python-claude-cu
TypeScript: ts-anthropic-cu → ts-claude-cu

# Unified template name
npx create-kernel-app my-app --template claude-cu --language python
npx create-kernel-app my-app --template claude-cu --language typescript

Implementation Checklist

  • Implemented this change in TypeScript
  • Implemented this change in Python (updated app name and template structure)

Everything below is not applicable

Testing

  • All tests pass locally
  • Linted
  • Added tests for new functionality (if applicable)

Docs

  • Link to a PR in our docs repo documenting your change (if applicable)

Visual Proof

  1. Template selection of ts-claude-cuI

image

  1. Successful deployment of the template generated ts app

image
3. *Sucessful run of a query *

image

Related Issue

maybe related?

Additional Notes

  • Used git mv to preserve file history during template renames for python

- Remove templates/typescript/computer-use directory and all related files
- Update CLI to make computer-use template Python-only
- Remove TypeScript-specific computer-use examples from invoke samples
- Simplify template offerings while preserving Python computer-use functionality
- TypeScript users can use the cua template for computer use functionality
@bigboateng bigboateng marked this pull request as ready for review June 23, 2025 16:22
@juecd juecd self-requested a review June 23, 2025 17:25
@juecd
Copy link
Contributor

juecd commented Jun 23, 2025

I think we still want to include a cu sample app in create-kernel-app, so kernel invoke ts-cu cu-task --payload '{"query": "Search for the top 3 restaurants in NYC according to Pete Wells"}' still works. But it should reference our published SDK instead. Does that make sense? e.g. in /typescript/cu the repo should basically be:

// index.ts
import { ComputerUseAgent } from '@onkernel/cu-playwright-ts';
const agent = new ComputerUseAgent({
  apiKey: process.env.ANTHROPIC_API_KEY!,
  page,
});
const answer = await agent.execute(payload.query); // payload from app.action("cu-task"), ...

@bigboateng
Copy link
Author

I think we still want to include a cu sample app in create-kernel-app, so kernel invoke ts-cu cu-task --payload '{"query": "Search for the top 3 restaurants in NYC according to Pete Wells"}' still works. But it should reference our published SDK instead. Does that make sense? e.g. in /typescript/cu the repo should basically be:

// index.ts
import { ComputerUseAgent } from '@onkernel/cu-playwright-ts';
const agent = new ComputerUseAgent({
  apiKey: process.env.ANTHROPIC_API_KEY!,
  page,
});
const answer = await agent.execute(payload.query); // payload from app.action("cu-task"), ...

Yep working on the cu sample here #42 should we put that in this pr too? I thought seperating will be cleaner

@bigboateng bigboateng mentioned this pull request Jun 27, 2025
6 tasks
- Rename templates/python/computer-use -> templates/python/claude-cu
- Rename templates/typescript/anthropic-computer-use -> templates/typescript/claude-cu
- Update index.ts to use 'claude-cu' template name for both Python and TypeScript
- Update app names: python-cu -> python-claude-cu, ts-anthropic-cu -> ts-claude-cu
- Update README.md with new template names and examples
- Maintain git history with git mv for clean diffs
@bigboateng bigboateng changed the title refactor: remove TypeScript computer-use template Switch to @onkernel/cu-playwright package and template refactoring Jun 30, 2025
@bigboateng
Copy link
Author

@juecd made the changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants