Skip to content

Run agent work from signed Composio app events - #3

Merged
Brendan O'Leary (olearycrew) merged 4 commits into
feat/searchable-memoryfrom
feat/app-event-triggers
Nov 24, 2026
Merged

Brendan O'Leary (olearycrew) merged 4 commits into
feat/searchable-memoryfrom
feat/app-event-triggers

Conversation

@olearycrew

@olearycrew Brendan O'Leary (olearycrew) commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Written by an AI agent on behalf of Brendan O'Leary (@olearycrew), following their spec. Brendan O'Leary (@olearycrew) has not reviewed it yet.

Pidge could run scheduled work, but a connected app event could not start work. This adds approved event subscriptions that run the person's saved instruction as that user and reply in the original iMessage conversation.

Stack dependency: based on feat/searchable-memory, PR #2. Merge #2 first, then this PR. The combined branch includes the reviewed memory fixes and preserves both feature histories with ordinary merges.

Behavior

  • app_events discovers event types/config schemas and the user's active accounts, creates an approved subscription, lists configuration/recent runs, and disables or removes subscriptions. It refuses to take over an existing Composio instance.
  • /api/triggers/composio verifies raw-body signatures with the pinned SDK, requires V3 routing fields matching local ownership/account/type, and commits the inbox before acknowledgement. A subscription/log unique index deduplicates retries with different delivery IDs.
  • The minute dispatcher queues an Eve turn through Photon. A durable turn claim rejects competing execution while allowing the same turn to resume. Ordinary app-write approval and crash guards remain active. Disable stops locally before remote cleanup and blocks an action whose approval is still parked.
  • Event turns recall/search only their creator's memory. No save, promotion, correction, forgetting, or automatic event-note capture is available, including through Eve's durable memory callback reconstruction. Provider event content cannot feed dreaming through this path.
  • Memory inherited from Add searchable per-user memory and nightly dreaming #2 keeps automatic notes and dreamed facts inferred. Only authenticated /memory actions confirm explicit facts. Recall uses operation-scoped references for crash replay; unrelated additions no longer break it. If a recalled item was forgotten or corrected, replay fails closed and needs a fresh turn. No plaintext replay snapshot is retained.

Example setup input after discovery and approval:

{"action":"create","connected_account_id":"ca_test","trigger_slug":"GITHUB_COMMIT_EVENT","config":{"owner":"example","repo":"demo"},"instruction":"Summarize each new commit in one sentence and send its link here."}

Evidence

All verification used synthetic data and an isolated disposable PostgreSQL 17 instance. No paid model, real subscription, iMessage, Slack, or email calls were made.

$ TEST_DATABASE_URL=<isolated PostgreSQL 17> pnpm check
 Test Files  26 passed (26)
      Tests  170 passed (170)

$ pnpm build
✓ Compiled successfully in 11.0s
✓ Generating static pages using 3 workers (3/3) in 208ms

$ pnpm release:check
Release privacy check passed for 188 tracked paths, excluding export-ignore files.

The synthetic commit tests exercise the real SDK signature verifier, database inbox, dispatcher, ownership/completion hooks, Eve recall lifecycle, and durable memory callback execution. They verify owner-scoped retrieval, signed replay once, refused memory changes, and that only preexisting notes reach the stubbed dreamer. Model output and channel delivery remain mocked; this does not establish live response quality or universal prompt-injection resistance.

Additional tests cover malformed/stale/future signatures, metadata mismatches, simultaneous deliveries, storage/setup races, bounded hand-off retries, expiry, unlink/disconnect, uncertain creation without SDK write retries, app-write approval after a restart, disable while approval is parked, and accepted-turn replay. Inherited memory regressions cover provenance closure, atomic correction/capacity, duplicate confirmation, concurrent save limits, one model-stub call for eight simultaneous dreams, expired leases, changed dependencies, management pagination, secret patterns, and both turn-start/compaction replay restored from JSON state.

The migration regression compares a fresh database with one containing original memory-0005 data, upgrades the latter through the complete current memory PR in a separate committed migration call, and then applies triggers. It verifies repeated migration, retained data, and equal final columns/indexes. Memory's 0005 and 0006 migration files/snapshots are unchanged on this branch.

Setup and limits

Run pnpm db:migrate before the combined app starts, in this order:

  1. 0005_memory
  2. 0006_memory_safety
  3. 0007_app_event_triggers

The additional memory safety migration was required by the independent review; the trigger migration was regenerated after it. Configure a dedicated Composio project outbound webhook with V3 + composio.trigger.message and set COMPOSIO_WEBHOOK_SECRET. Installation creates no external subscription. The setup guide records later live verification and uncertain-setup recovery.

One account/event-type rule is supported; editing and resume are deferred. Hand-offs retry at most three times; events expire after 24 hours. Started model work never automatically starts a new turn after failure. Distinct provider logs may represent the same action, so neither app writes nor channel replies have universal exactly-once delivery.

Still unverified: real provider delivery/setup, model behavior and prompt-injection resistance, live dreaming, /memory browser interaction, and channel replies. Search remains keyword-based, secret detection heuristic, and tombstones exact-text only. Forgetting does not erase Eve history, provider logs, or backups. Neither PR was merged or deployed.

ELI5

Pidge can watch an app event and follow an instruction you saved. It can look up your notebook to help, but an event cannot rewrite the notebook, choose another person, or approve an action for you.

@wiz-1ca76d5187

wiz-1ca76d5187 Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities -
Data Finding Sensitive Data -
Secret Finding Secrets 1 Low
IaC Misconfiguration IaC Misconfigurations -
SAST Finding SAST Findings -
Software Management Finding Software Management Findings -
Total 1 Low

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try the Wiz Code extension for VS Code, JetBrains, or Visual Studio.

@olearycrew
Brendan O'Leary (olearycrew) changed the base branch from main to feat/searchable-memory November 24, 2026 22:23
@olearycrew
Brendan O'Leary (olearycrew) merged commit 0ab3e92 into feat/searchable-memory Nov 24, 2026
13 checks passed
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