Skip to content

feat(examples): add personal-agent example; move Revolut out of built-in connectors#1168

Open
buremba wants to merge 2 commits into
mainfrom
feat/revolut-personal-agent
Open

feat(examples): add personal-agent example; move Revolut out of built-in connectors#1168
buremba wants to merge 2 commits into
mainfrom
feat/revolut-personal-agent

Conversation

@buremba
Copy link
Copy Markdown
Member

@buremba buremba commented Jun 1, 2026

What

Relocates the Revolut transactions connector out of the built-in connector set into a new project-local example examples/personal-agent/, which mirrors the real buremba org.

Why

Revolut shouldn't be a built-in connector — it belongs with the personal-agent project that uses it. This makes it a project-local *.connector.ts (compiled by lobu apply), keeping the built-in set focused.

Changes

  • New examples/personal-agent/:
    • revolut-transactions.connector.ts — the connector ported verbatim (CDP browserNetworkSync capture, /api/retail/.../transactions pagination via to=<ms>, checkpoint). Imports browserNetworkSync from @lobu/connector-sdk + a local copy of browser-scraper-utils.ts (the SDK doesn't export those helpers).
    • lobu.config.tsorg: "buremba", all six buremba entity types reflected exactly (person, company, asset, subscription, topic, trip), connector wired via connectorFromFile.
    • IDENTITY.md / SOUL.md / USER.md / package.json (^9.3.0, matching sibling examples) / tsconfig.json.
  • Removed from built-ins: packages/connectors/src/revolut.ts + its server unit test; dropped the index.ts re-export; regenerated the landing connector catalog (27 → 26, revolut dropped).

Validation

  • examples/personal-agent bunx tsc --noEmit → exit 0; entity schema cross-checked field-by-field against the live buremba schema.
  • packages/connectors — zero new regressions, no dangling revolut references.
  • Pre-commit (biome + tsc) passed.

E2E (lobu apply against buremba + browser-auth + a sync run) is a follow-up; that's also the Revolut data re-capture path, now self-contained in this project.


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag @codesmith with what you need. Autofix is disabled.

Summary by CodeRabbit

  • New Features

    • Added a personal agent example for private finance, subscriptions and travel tracking, including browser-based automation helpers, persona/instruction docs, and an example config/package to run locally.
  • Chores

    • Relocated the Revolut connector into the example set.
    • Updated connector icon mappings.
    • Removed legacy Revolut unit tests.

…-in connectors

Relocates the Revolut transactions connector from the built-in connector set
into a new project-local example, `examples/personal-agent/`, and reflects the
real `buremba` org there (org slug, all six entity types: person, company,
asset, subscription, topic, trip).

- examples/personal-agent/revolut-transactions.connector.ts: the connector,
  ported verbatim (CDP browserNetworkSync capture, /api/retail/.../transactions
  pagination via to=<ms>, checkpoint). Imports browserNetworkSync from
  @lobu/connector-sdk + a local copy of browser-scraper-utils.ts.
- examples/personal-agent/lobu.config.ts: org "buremba", the six entity types,
  connector wired via connectorFromFile.
- Removes packages/connectors/src/revolut.ts + its server unit test, drops the
  index re-export, and regenerates the landing connector catalog (27 -> 26).

Revolut is no longer a built-in connector; it lives with the personal-agent
project. E2E (lobu apply + browser-auth + sync) is a follow-up.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 1, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 27f631d5-5bd6-47b8-b643-edba72501449

📥 Commits

Reviewing files that changed from the base of the PR and between 29d1852 and e90d9dc.

📒 Files selected for processing (1)
  • examples/personal-agent/lobu.config.ts

📝 Walkthrough

Walkthrough

Adds a personal-agent example (docs, browser scraper utilities, Lobu config with six entity schemas, package/tsconfig, and example connector) and removes the shared Revolut connector from core exports while updating connector icon slugs.

Changes

Personal Agent Example

Layer / File(s) Summary
Agent Documentation and Identity
examples/personal-agent/IDENTITY.md, examples/personal-agent/SOUL.md, examples/personal-agent/USER.md
Three new markdown files define the agent's scope, operational constraints, behavioral rules, and user context (data sources and preferences).
Browser Scraper Utilities
examples/personal-agent/browser-scraper-utils.ts
New TypeScript module with cookie/session extraction (getBrowserCookies, getBrowserUserDataDir, getBrowserCdpUrl), cookie expiry validation, URL safety checks (validatePublicUrl, validateUrlDomain), openStealthBrowser, handleCookieConsent, filterByCheckpoint, and withBrowserErrorCapture for deterministic artifact capture and cleanup.
Agent Config, Entities, and Project Setup
examples/personal-agent/lobu.config.ts, examples/personal-agent/package.json, examples/personal-agent/tsconfig.json, examples/personal-agent/revolut-transactions.connector.ts
Lobu config defines the personal agent, six entity schemas (person, company, asset, subscription, topic, trip), a Revolut auth/profile/connection, plus example package metadata and tsconfig; connector default class renamed to RevolutTransactionsConnector.

Core Package Updates

Layer / File(s) Summary
Connector Export and Icon Mapping Updates
packages/connectors/src/index.ts, packages/landing/scripts/gen-connectors.ts
Removes the Revolut barrel export from packages/connectors/src/index.ts and updates ICON_SLUGS in gen-connectors.ts to remove revolut and add slugs for rss, trustpilot, g2, and glassdoor.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • lobu-ai/lobu#1034: Both add per-example package.json and tsconfig.json for example isolation.

Poem

🐰 A small agent wakes to scrape the net,
Cookies in pockets, cautious and set,
Schemas tidy, trips and subs in rows,
Revolut finds a home where example grows,
Hoppity hops — the agent knows.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The PR description provides comprehensive details on what, why, and how, with validation steps, but omits the required 'Test plan' checklist section from the template. Add the 'Test plan' section with checkboxes indicating which validation steps were run (e.g., 'bun run check:fix', 'bun run typecheck', etc.) to match the repository template.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The PR title accurately summarizes the main changes: adding a personal-agent example and moving Revolut from built-in connectors to that example.
Docstring Coverage ✅ Passed Docstring coverage is 90.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/revolut-personal-agent

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
examples/personal-agent/browser-scraper-utils.ts (1)

133-134: 💤 Low value

Comment inaccuracy: link-local range description is misleading.

The comment states "fe80:..fec0:" but fe80::/10 only covers fe80:: through febf::. The fec0::/10 range was the deprecated site-local prefix, not link-local. The regex itself is correct for fe80::/10.

📝 Suggested comment fix
-    // Link-local fe80::/10 covers fe80:..fec0: (first byte 1111 1110 1x).
+    // Link-local fe80::/10 covers fe80::..febf:: (first 10 bits: 1111 1110 10).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@examples/personal-agent/browser-scraper-utils.ts` around lines 133 - 134, The
comment for the linkLocalPrefix regex is inaccurate; update the comment near the
const linkLocalPrefix = /^fe[89ab][0-9a-f]?:/ to state that fe80::/10 covers
addresses from fe80:: through febf:: (not fec0::) and remove the mention of the
deprecated site-local fec0 range, so the comment accurately describes the
fe80::/10 link-local range while leaving the regex unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@examples/personal-agent/browser-scraper-utils.ts`:
- Around line 133-134: The comment for the linkLocalPrefix regex is inaccurate;
update the comment near the const linkLocalPrefix = /^fe[89ab][0-9a-f]?:/ to
state that fe80::/10 covers addresses from fe80:: through febf:: (not fec0::)
and remove the mention of the deprecated site-local fec0 range, so the comment
accurately describes the fe80::/10 link-local range while leaving the regex
unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 57486005-6623-483d-b5be-e3841796c0fd

📥 Commits

Reviewing files that changed from the base of the PR and between 25c4df8 and 29d1852.

⛔ Files ignored due to path filters (1)
  • packages/landing/src/generated/connectors.json is excluded by !**/generated/**
📒 Files selected for processing (11)
  • examples/personal-agent/IDENTITY.md
  • examples/personal-agent/SOUL.md
  • examples/personal-agent/USER.md
  • examples/personal-agent/browser-scraper-utils.ts
  • examples/personal-agent/lobu.config.ts
  • examples/personal-agent/package.json
  • examples/personal-agent/revolut-transactions.connector.ts
  • examples/personal-agent/tsconfig.json
  • packages/connectors/src/index.ts
  • packages/landing/scripts/gen-connectors.ts
  • packages/server/src/__tests__/unit/connectors/revolut.test.ts
💤 Files with no reviewable changes (3)
  • packages/server/src/tests/unit/connectors/revolut.test.ts
  • packages/connectors/src/index.ts
  • packages/landing/scripts/gen-connectors.ts

…ic key, pin Revolut connection to the Mac device worker

- defineAgent: remove the hardcoded claude/ANTHROPIC_API_KEY provider; the agent inherits the org default and runs on the local/Mac-app device worker.
- Declare the Revolut auth-profile (browser_session) + connection pinned to the device (deviceWorkerId), with max_scrolls=100 for full-history backfill.
- Entity schemas now exact-match live buremba (apply = noop, 0 update).
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