Skip to content

Add Presence Layer connector: OTP-gated execution of computed returns#6

Open
beepboop2025 wants to merge 3 commits into
mainfrom
presence-layer
Open

Add Presence Layer connector: OTP-gated execution of computed returns#6
beepboop2025 wants to merge 3 commits into
mainfrom
presence-layer

Conversation

@beepboop2025

Copy link
Copy Markdown
Owner

What

Adds backend/app/services/presence_filing.py, bridging OperatorOS computations to a real portal submission via the Presence Layer (beepboop2025/farmctl, presence/). A farm of Indian-SIM devices receives the portal OTP, reads it off the device, and completes login + filing.

This moves OperatorOS from adviceexecution.

How it works

PresenceFilingService.file_return(...) runs: login → OTP (read from device SMS) → (optionally) file, returning {ok, message, receipt, audit} with a hash-chained audit trail.

Verified end-to-end against the Presence Layer's mock portal:

  • dry-run → authenticates + validates, does not submit
  • confirmed → files, returns ACCEPTED

Safety rails

  • Dry-run by default — real submission needs dry_run=False and confirm=True.
  • Real (non-localhost) portals blocked unless PRESENCE_ALLOW_REAL=1.
  • Phone numbers + OTPs masked; full audit trail per call.
  • Intended for consented client automation only (the same filing actions staff already perform by hand).

Status

Prototype connector. Runs against the mock portal until a per-portal AppPortalDriver recipe + a live Indian-SIM device (farmctl connect) are wired. No DB/route changes in this PR — service layer only.

🤖 Generated with Claude Code

beepboop2025 and others added 3 commits June 22, 2026 00:45
- Add LLM_MODEL_OVERRIDE setting: forces a single model across all
  per-task routing (blank = use routing table). Lets a credit-less
  deploy point at a free OpenRouter model without code changes.
- Update Claude model IDs to current OpenRouter slugs
  (claude-sonnet-4.6, claude-haiku-4.5) in routing + cost tables.
- Pricing verified against current Anthropic rates
  (Haiku 4.5 $1/$5, Sonnet 4.6 $3/$15).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Bridges OperatorOS computations to a real portal submission via the Presence
Layer (farmctl presence/): a farm of Indian-SIM devices receives the portal OTP,
reads it off the device, and completes login + filing. Moves OperatorOS from
advice to execution.

Dry-run by default; real submission needs confirm=True AND dry_run=False; real
portals blocked unless PRESENCE_ALLOW_REAL=1; hash-chained audit returned per
call. Runs against the Presence Layer mock portal until a per-portal
AppPortalDriver recipe is wired. For consented client automation only.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ost accounting)

Co-Authored-By: Claude Opus 4.8 (1M context) <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