Skip to content

add issue templates and workflows, clean up old file - #1

Merged
rgarcia merged 3 commits into
mainfrom
cleanup
Aug 19, 2025
Merged

add issue templates and workflows, clean up old file#1
rgarcia merged 3 commits into
mainfrom
cleanup

Conversation

@rgarcia

@rgarcia rgarcia commented Aug 19, 2025

Copy link
Copy Markdown
Contributor

TL;DR

Added standardized issue templates and a GitHub Actions workflow for CLI tests, while cleaning up old GoReleaser configuration and removing a deprecated index.ts file.

Why we made these changes

To improve contributor experience with structured issue reporting, automate CLI testing for better code quality, and simplify the codebase by removing obsolete files and configurations.

What changed?

  • Added .github/ISSUE_TEMPLATE/bug_report.md for standardized bug submissions.
  • Added .github/ISSUE_TEMPLATE/feature_request.md for standardized feature requests.
  • Added .github/workflows/test.yaml to run CLI tests automatically on pushes and pull requests.
  • Removed unused monorepo and commented-out sections from .goreleaser.yaml.
  • Removed the entire index.ts file, deprecating its former CLI responsibilities.

Description generated by Mesa. Update settings

@rgarcia
rgarcia requested a review from masnwilliams August 19, 2025 18:16

@mesa-dot-dev mesa-dot-dev Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Performed full review of 90a8b85...f8f7f6e

5 files reviewed | 0 comments | Review on Mesa | Edit Reviewer Settings

@masnwilliams masnwilliams left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@rgarcia
rgarcia merged commit e767d23 into main Aug 19, 2025
1 check passed
archandatta added a commit that referenced this pull request Jun 2, 2026
Adds browser telemetry to the CLI:
- `kernel browsers create --telemetry=all|off|<list>`
- `kernel browsers update <id> --telemetry=all|off|<list>` (partial —
unspecified categories retain state)
- `kernel browsers telemetry stream <id>` with `--categories`,
`--types`, `--seq` (Last-Event-ID resume), `-o json` (NDJSON)

Full test matrix →
https://gist.github.com/archandatta/f27eb3ea93d58e932b9fd9a7b7b9090f

## Essential run steps to validate

Build:
```bash
go build -o /tmp/kernel ./cmd/kernel
export KERNEL_API_KEY=<your key>
```

**1. Config (create / update / get):**
```bash
# create with all categories enabled
ID=$(/tmp/kernel browsers create --telemetry=all -o json | jq -r .session_id)

# verify on the session
/tmp/kernel browsers get $ID -o json | jq .telemetry

# partial update — only network is changed, others retain state
/tmp/kernel browsers update $ID --telemetry=network=off
/tmp/kernel browsers get $ID -o json | jq .telemetry

# disable everything
/tmp/kernel browsers update $ID --telemetry=off
```

**2. Live stream (text + JSON):**
```bash
# in terminal A — start streaming
/tmp/kernel browsers update $ID --telemetry=all
/tmp/kernel browsers telemetry stream $ID

# in terminal B — drive traffic via CDP (use any Playwright/CDP client) to https://kernel.sh
# events appear in terminal A: 15:04:05<TAB>[network]<TAB>network_response
```

**3. Filters:**
```bash
/tmp/kernel browsers telemetry stream $ID --categories=network
/tmp/kernel browsers telemetry stream $ID --categories=system   # monitor_* events
/tmp/kernel browsers telemetry stream $ID --types=network_response
/tmp/kernel browsers telemetry stream $ID -o json                # NDJSON envelopes
```

**4. Resume from sequence:**
```bash
# pull a seq from JSON output, then resume
/tmp/kernel browsers telemetry stream $ID --seq=1     # earliest replay (resumes after seq 1; event #1 itself is not replayable)
/tmp/kernel browsers telemetry stream $ID --seq=574   # from a specific event
```

**5. Validation paths (all should error cleanly):**
```bash
/tmp/kernel browsers create --telemetry=garbage          # invalid assignment
/tmp/kernel browsers create --telemetry=foo=on           # unknown category
/tmp/kernel browsers create --telemetry=network=yes      # invalid value
/tmp/kernel browsers telemetry stream $ID --seq=-50      # negative seq rejected
/tmp/kernel browsers telemetry stream $ID --output=yaml  # unsupported output
```

Cleanup:
```bash
/tmp/kernel browsers delete $ID
```

## Tests
- 14 unit tests under `cmd/browsers_telemetry_test.go` (`go test
./cmd/...`)
- Full end-to-end matrix run against prod API → see linked gist

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> CLI-only feature wiring to existing browser APIs; no auth or core
infra changes, with broad unit test coverage for parsing and streaming
behavior.
> 
> **Overview**
> Adds **browser telemetry** to the Kernel CLI: configure it on session
**create** and **update**, and **stream** live events from a running
session.
> 
> **Configuration** — New `--telemetry` on `browsers create` and
`browsers update` accepts `all`, `off`, or per-category lists
(`network=on,page=off`). Per-category updates only send named categories
so the API can merge; `all`/`off` set the global `Enabled` flag.
`browsers update` now allows telemetry-only updates (no
proxy/profile/viewport required).
> 
> **Streaming** — New `browsers telemetry stream <id>` uses the SDK SSE
client, resolves the session ID, supports `--categories`, `--types`,
`--seq` (Last-Event-ID resume), human-readable lines or `-o json` NDJSON
via new `PrintCompactJSONLine`. Client-side filtering and category
inference (wire `category` or type-prefix, with `monitor_*` → `system`).
> 
> **Docs & tests** — README documents flags and telemetry section; unit
tests cover param wire shapes, stream validation, filters, and
create/update telemetry mapping.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
0e33313. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
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