Skip to content

Add the inbox and freeagent plugins; inbox indexes into the knowledge base - #12

Merged
cliftonc merged 4 commits into
mainfrom
feat/inbox-knowledge
Oct 24, 2026
Merged

cliftonc merged 4 commits into
mainfrom
feat/inbox-knowledge

Conversation

@cliftonc

Copy link
Copy Markdown
Contributor

Two new plugins, both first releases (previous: null), to ship in 3.6.0.

inbox — organisations receive forwarded email through Cloudflare Email Routing. The plugin claims the kit's emailHandlers catch-all and resolves the organisation from the recipient's local part; inbox.parse extracts text/HTML bodies and attachments (bytes in R2), applies the sender allow-list and authentication checks, recognises Gmail/Proton forwarding confirmations, and calls every inbox:consumers contribution. Inbox page, Settings → Inbox, CLI rocketflare inbox list|status, agent tools inbox_list_messages / inbox_get_message. Three tables (inbox_settings, inbox_messages, inbox_attachments) with RLS.

  • Knowledge base: parsed messages and their document attachments are indexed into the knowledge base (inbox:message, inbox:attachment), upserted on reprocess and removed on delete; Settings → Inbox can turn it off.
  • Test queries are scoped by tenant.
  • Needs kit ≥ 0.22.0 (minKit: 0.22.0), the release that added the emailHandlers slot.

freeagent — an organisation connects its FreeAgent company over OAuth and its books (bank accounts, transactions, explanations, categories, contacts, bills, invoices) are mirrored every 30 minutes by updated_since. Service API for other plugins, read tools plus approval-gated write tools for agents, Settings → FreeAgent, a FreeAgent page, CLI rocketflare freeagent status|sync, and cubes for analytics when installed. Nine tables with RLS. minKit: 0.21.0. FREEAGENT_ENVIRONMENT is declared as a secret var on purpose (a non-secret var broke the parity test).

Both are in the README table and in ci.yml plugin_subdirs.

🤖 Generated with Claude Code

cliftonc and others added 4 commits October 24, 2026 10:38
Requires kit 0.22.0 (emailHandlers slot, storage() on background contexts).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One OAuth connection per organisation (signed state, public callback at
/api/hooks/freeagent/callback, tokens sealed, invalid_grant marks it
needs_reconnect). A typed client always sends X-Api-Version 2026-09-01,
refreshes single-flight two minutes before expiry, backs off on 429
Retry-After (bounded), follows Link pagination and never sends the token
off the FreeAgent API host. freeagent.sync (cron */30, Sync now, after
connecting) mirrors bank accounts, transactions, explanations,
categories, contacts, bills and invoices incrementally by updated_since
into tenant-scoped freeagent_* tables, then calls freeagent:sync-listeners.

Exports freeagentClientFor, explainTransaction, attachToExplanation,
deleteExplanation, createBill and listUnexplainedTransactions; five read
agent tools plus two approval-gated write tools; Settings -> FreeAgent and
a FreeAgent page; CLI status/sync; drizzle-cube cubes contributed to
analytics (inert without it); and the freeagent skill.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dge base

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cliftonc
cliftonc merged commit 7056b29 into main Oct 24, 2026
14 checks passed
cliftonc added a commit that referenced this pull request Oct 24, 2026
First releases of inbox (inbound email through Cloudflare Email Routing,
indexed into the knowledge base; needs kit 0.22.0) and freeagent (an
organisation's FreeAgent books mirrored every 30 minutes; needs kit 0.21.0),
from #12. The other five plugins are version stamps only. README install
commands name the 3.6.0 tag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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