Skip to content

Slice 4: tyto open, brief, find, and action feedback - #8

Merged
rvegajr merged 1 commit into
mainfrom
slice-4/brief
Oct 13, 2026
Merged

rvegajr merged 1 commit into
mainfrom
slice-4/brief

Conversation

@rvegajr

@rvegajr rvegajr commented Sep 30, 2026

Copy link
Copy Markdown
Member

Stacked on #7. Spec sentences are in docs/IMPLEMENTATION.md §4 Slice 4.

What

Core (pure)

  • assembleBrief / renderBrief. The brief covers:

    • failed Fetch/XHR requests, with a redacted response snippet;
    • uncaught errors, and console errors and warnings;
    • API calls;
    • cookie names and lifetimes (never values);
    • storage key counts;
    • page outline, up to 40 interactive refs, and the main text.

    It's scoped to the current page by log offsets, because agent-browser's errors --clear doesn't clear.

  • findLines: whole-page text search.

  • afterAction: what changed after an action.

  • normalizeRefs: e12 → @e12.

  • Mappers from agent-browser's JSON output.

  • New LogMarks port, with a fake and a file adapter (~/.tyto/marks, 0600).

CLI

  • tyto open <url>, tyto brief [--json], tyto find <words>.
  • Action commands (click, fill, type, press, select, check, uncheck, hover, scroll, dblclick) that print an AFTER report.
  • --session picks the agent's agent-browser session (default $AGENT_BROWSER_SESSION or default).

Found and fixed live

Passing a different AGENT_BROWSER_DEFAULT_TIMEOUT to a single command makes agent-browser restart that session's browser; Edge came back on its new-tab page. Browse commands now never pass env overrides, and a test pins that. Replays are unaffected: they always pass the same settings.

Tests

  • npm run check: 10 files, 95 tests, typecheck clean, gitleaks clean.

  • npm run test:live: 5 passed. The live brief tests use a throwaway agent-browser config, so they never touch saved logins.

  • Manual end to end, through Edge:

    Command Result Time
    tyto open on the planted-bug page Root cause shown (/api/items 500 database timeout plus the console error), 143 tokens 1.6 s cold / 0.35 s warm
    tyto click #save Reported the uncaught TypeError with its source line 0.3 s
    tyto find on Wikipedia "Conservation status ⏎ Vulnerable (IUCN 3.1)" 0.16 s

🤖 Generated with Claude Code

One command now shows everything about a page, for any model:

- core (pure): assembleBrief/renderBrief — failed Fetch/XHR requests
  with a redacted body snippet, uncaught errors, console errors and
  warnings, API calls, cookie names and lifetimes (never values),
  storage key counts, outline, up to 40 interactive refs, main text —
  scoped to the current page by log offsets. Plus findLines (whole-page
  text search), afterAction (navigation, requests, errors, console since
  an action), normalizeRefs (e12 → @E12), and the agent-browser JSON
  mappers. New LogMarks port, fake, and file adapter.
- cli: `tyto open`, `tyto brief [--json]`, `tyto find`, and click/fill/
  type/press/select/check/uncheck/hover/scroll/dblclick with an AFTER
  report; `--session` picks the agent's agent-browser session.

Found live: passing a different AGENT_BROWSER_DEFAULT_TIMEOUT to one
command makes agent-browser restart that session's browser (Edge fell
back to its new-tab page). Browse commands now never pass env overrides;
a test pins that.

Live: open+brief 1.6 s cold / 0.35 s warm (143 tokens, root cause
shown), click+AFTER 0.3 s with the TypeError and source line, find on
Wikipedia 0.16 s.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@rvegajr
rvegajr changed the base branch from slice-3/executor to main October 13, 2026 19:01
@rvegajr
rvegajr merged commit eadeb95 into main Oct 13, 2026
2 checks passed
@rvegajr
rvegajr deleted the slice-4/brief branch October 13, 2026 20:16
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.

1 participant