Skip to content

Instantly share code, notes, and snippets.

View rgarcia's full-sized avatar

Rafael rgarcia

View GitHub Profile
@rgarcia
rgarcia / clawbench-replay-readme.md
Last active August 28, 2026 17:22
Kernel MCP ClawBench replay

Kernel MCP ClawBench replay

  • Task: v2-1202-beauty-cart-quantity-theordinary
  • Instruction: add 2 units of Multi-Peptide + HA Serum to the cart
  • Agent: Codex with GPT-5.6 Luna
  • Browser control: Kernel MCP execute_playwright_code only
  • Result: intercepted 1.0, strict judge reward 1.0
  • Replay: 4× speed, trimmed only before the first site navigation

The run searches for the product, navigates to the correct product page, changes the quantity to 2, and initiates Add to Cart. ClawBench intercepts the Cart-AddProduct request, then verifies that the request adds quantity 2 of the correct product.

@rgarcia
rgarcia / clawbench-kernel-pr-draft.md
Created August 19, 2026 20:34
ClawBench Kernel browser runtime PR draft

PR title

feat(browser-runtime): add native Kernel support

PR description

What does this PR do?

Adds Kernel as a managed browser runtime:

@rgarcia
rgarcia / prompt.md
Created August 12, 2026 16:11
kernel browser + mitmproxy

install mitmproxy locally and run mitmdump on 127.0.0.1:8080, expose it with a raw TCP tunnel using ssh -p 443 -T -R0:127.0.0.1:8080 tcp@free.pinggy.io (avoid Cloudflare quick tunnels because they reject proxy CONNECT; use ngrok TCP only if Pinggy fails), verify HTTPS proxying with curl and mitmproxy’s generated CA at ~/.mitmproxy/mitmproxy-ca-cert.pem, then create a Kernel custom HTTP proxy using the Pinggy hostname/port and pass that CA via --ca-bundle; run Kernel’s proxy health check, create a browser with --proxy-id, navigate to several HTTPS sites and send one identifiable POST with a custom header and JSON body, then inspect mitmproxy’s logs/HAR to confirm the decrypted URL, headers, body, HTTP version, and response status; report results and clean up the browser, Kernel proxy, tunnel, and mitmproxy process.

@rgarcia
rgarcia / qa-thread-e2e.ts
Created August 6, 2026 23:37
pi-dynamic-workflows named agent thread real-provider E2E test
import assert from "node:assert/strict";
import { WorkflowAgent } from "./src/agent.js";
import { runWorkflow } from "./src/workflow.js";
const model = process.env.QA_MODEL ?? "openai-codex/gpt-5.6-sol";
const agent = new WorkflowAgent({ cwd: process.cwd(), mainModel: model });
const sessions: Array<{ thread?: string; id: string }> = [];
const target = agent as unknown as {
createSessionManager(thread?: string): { getSessionId(): string };
};
@rgarcia
rgarcia / gist-summary.md
Created May 30, 2026 02:21
Kernel GPU h264_nvenc smoke test repro and results

Kernel GPU NVENC smoke test results

Summary

We investigated empty replay MP4s from GPU Kernel browsers. The failure is reproducible outside the replay API by running ffmpeg directly inside live GPU browser VMs with h264_nvenc.

Key result: NVENC capability is mixed per GPU browser VM.

  • GPU sessions tested with direct ffmpeg -c:v h264_nvenc: 22
  • NVENC-capable sessions: 12
@rgarcia
rgarcia / gist-content.md
Created March 2, 2026 22:51
Cursor + GPT models: Provider Error caused by overly-complex MCP tool JSON schemas (OpenAI nesting depth limit)

Cursor + GPT models: Provider Error caused by overly-complex MCP tool JSON schemas (OpenAI nesting depth limit)

Cursor "Provider Error" with GPT models: MCP tool schema nesting depth

Summary

When using Cursor with MCP (Model Context Protocol) servers, GPT models (gpt-5.3-codex-, gpt-5.2-codex-, etc.) return a generic "Provider Error" that gives no actionable information:

@rgarcia
rgarcia / README.md
Last active February 6, 2026 21:06
Kernel: SCP files to/from browser VMs via kernel browsers ssh

SCP Files to/from Kernel Browser VMs

The Kernel CLI's kernel browsers ssh command (kernel/cli#103) provisions an SSH server on a browser VM and tunnels the connection over WebSockets. Because it sets up a standard OpenSSH server, you can use scp (and rsync, sftp, etc.) with the same tunnel — not just interactive shells.

Prerequisites

  1. Kernel CLI v0.14.5+ (with the browsers ssh subcommand and -o json support)

  2. websocat — WebSocket-to-TCP bridge used as the SSH ProxyCommand

@rgarcia
rgarcia / SKILL.md
Created February 2, 2026 19:38
DoorDash automation skill for agent-browser
name doordash
description Access DoorDash for food delivery ordering, order history, account management, and restaurant/store browsing.
allowed-tools Bash(agent-browser:*)

DoorDash.com

Uses agent-browser with Kernel cloud browser provider. See the kernel-agent-browser skill for best practices.

@rgarcia
rgarcia / viewport-debug.sh
Created January 22, 2026 00:48
Debug script for Kernel browser viewport dimensions
#!/bin/bash
#
# Viewport Debug Script for Kernel Browsers
#
# This script demonstrates the difference between:
# 1. Creating a browser WITH viewport set at creation time
# 2. Creating a browser WITHOUT viewport (uses default 1920x1080)
#
# Usage: ./viewport-debug.sh
#
@rgarcia
rgarcia / test-kernel-provider.sh
Created January 22, 2026 00:36
Kernel provider integration test for agent-browser
#!/bin/bash
#
# Kernel Provider Integration Test
# Tests agent-browser CLI with Kernel cloud browser provider
#
# Usage:
# KERNEL_API_KEY="your-api-key" ./test-kernel-provider.sh
#
# Requirements:
# - agent-browser built (npm run build && npm run build:native)