feat(examples): add Context.dev search agent

MR
19h ago
+279-1

PR Checklist

Bugs / Features

  • Related issue(s) linked — standalone example.
  • Tests for the changes have been added — repeatable external E2E probes; no package tests added.
  • Docs have been added / updated.
  • Changesets have been added — private example; no published package changes.

What is the current behavior?

There is no runnable Context.dev search example.

What is the new behavior?

Adds a private search agent and linked guide using existing typed tools. It requests Highlights, preserves source URLs and partial results, and produces cited answers. Requests respect cancellation and return safe errors without account metadata or failed passages.

Before (Tools guide)After (Tools guide)
BeforeAfter
Preview (Context search guide, desktop)
Preview
Preview (Context search guide, mobile)
Preview

Notes for reviewers

  • Calls use the configured Context.dev and model accounts. Live Agent and Hono verification used OpenRouter because available OpenAI credentials were rejected; the example retains its default OpenAI model.
  • The full test command encounters unchanged Vitest discovery failures and six Elysia provider-test failures in a clean environment; the first Elysia failure reproduces on untouched target main. Native persistence E2E passes.
  • Greptile review was unavailable because the account exhausted its free credits; no Greptile clean-review claim is made.

Summary by CodeRabbit

  • New Features
    • Added a runnable Context.dev search example with source citations and support for cancellation.
  • Documentation
    • Added setup and usage guidance, including search limits, result details, and handling of errors and partial results.
    • Added links to the example in the examples list and tools documentation.

Upstream GitHub Actions workflows are awaiting approval from a repository maintainer; upstream CI has not run.