forgetproof Try the button

Rendered from company/README.md; raw Markdown.

Bay Parcel, the reference Company#

Bay Parcel is the reference Company for ForgetMe v1: a fictional courier that serves the contract on its own origin, with its own Ed25519 key and its own SQLite files, so a personal agent holding an opaque reference can ask it to withdraw a record and receive the Company's own signed receipts. This page shows you what Bay Parcel is made of, how to run and test it, and which parts of it are fixtures; its routes and its three holders are in the tables below.

Status: deployed at company.forget.stellarminds.ai as the second party of the demo; not a product, and every account on it is a synthetic fixture that expires.

A Company is an organisation a personal agent shared a record with. Bay Parcel holds the delivery addresses that Pim, the demo's fictional agent, shared with it. It is a Poppy 1.0 Company: Poppy is the Personal Agent Protocol, and Bay Parcel verifies the agent's Session header on every request but the index, issues and checks OAuth access tokens from its own issuer, and performs a withdrawal only through the Operations extension, version 3, on the person's approval of the exact terms it states. Each of its stores is a holder that ends with one outcome word and one receipt. The glossary has the rest; the wire contract is what it implements.

The parts#

Routes#

RouteWhat
GET /.well-known/poppy.jsonDiscovery (spec 3.1): protocol_version, organization, auth (the issuer is this origin; disabled, see Fixtures; scope descriptions and hints), apis (the OpenAPI description below), extensions: the stellarminds.ai/forget-me entry with its scope names, and operations version 3.
GET /.well-known/oauth-protected-resource, GET /.well-known/oauth-authorization-serverThe two OAuth metadata documents of spec 3.2: the resource names the issuer, the issuer lists the resource, the token and revocation endpoints, refresh_token as its only grant, private_key_jwt with ES256 and PS384.
GET /openapi.jsonThe APIs poppy.json lists, with the scope each needs and which operation can answer approval_required.
POST /oauth/token, POST /oauth/revokeThe synthetic issuer: grant_type=refresh_token with a client assertion (RFC 7523; aud exactly the issuer, five minutes at most, a fresh jti), optional scope (narrowing) and resource (this origin only); RFC 7009 revocation, which ends the access tokens too. OAuth errors: invalid_client, invalid_grant, invalid_scope, invalid_target, unsupported_grant_type.
GET /forget-me/v1The index: issuer, keys, routes, scopes, limits, status, approval (Operations 3, user approvals only), identity (Poppy 1.0, the issuer, the OAuth scope names). Public, tenant-neutral, no Session header.
POST /forget-me/v1/preview, POST …/submit, GET …/operations/{id}, GET …/operations/{id}/evidenceThe contract, as Poppy resources: Poppy-Session (verified as spec 5.3 says), Poppy-Version, Poppy-Extensions, Authorization: Bearer <access token> with scope forget-me:item (or forget-me:account for {"scope": "account"}); submit also needs "operations";v="3" declared and, to perform anything, Poppy-Approval of the exact terms it stated (the contract's section 6.1).
GET /forget-me/v{n}/… for n ≠ 1404 unsupported_version.
GET/POST /api/addresses, POST /api/deliveries, GET /api/lookup, POST /api/addresses/{id}/restoreThe Company's own API (scope addresses), as Poppy resources too: what an agent uses when it shares an address (it gets a reference back), what the courier reads, and the undo path the withdrawal must defeat.
POST /fixture/accounts, POST /fixture/revokeLabelled fixtures, not protocol endpoints: a synthetic account, optionally seeded (addresses, deliveries, records_busy_seconds, archive_copy, scopes, neighbour), with a refresh token for the client_id named (grant); and signing the account out (every refresh token and access token of it), which is what a queued step sees as lost authority. Rate limited per visitor; accounts expire after COMPANY_ACCOUNT_TTL seconds (30 minutes).

Holders#

HolderKindOutcome in the usual run
recordssqliteinspected-and-clear: the record deleted by id, its delivery summaries rebuilt from provenance, the residue erased, every byte scanned, a restore attempt refused.
invoicessqliteintentionally-retained while an invoice carrying the address is inside its 90-day retention (disclosed in the preview as an exception with the single option keep, with retained_until); invoices past retention are deleted and the residue erased.
archivefilesinspected-and-clear when the legacy export does not carry the exact text, with a coverage limit saying why the export can only be searched; bytes-still-found with "a person reviews it" when it does. Nothing in it is ever deleted on a guess.

A records_busy_seconds fixture makes the address book busy: the records step ends queued, the operation is done with outstanding: 1, and a later poll of the same id (or the Company's next start) runs the step and shows the new outcome. A credential revoked in between makes the queued step end error with "nothing done: the request lost its authority before this step ran".

Two accounts may hold the same address line; the neighbour fixture creates the current tenant at the same address. A withdrawal touches only the caller's record, and the receipt's counts are about the caller's records and their residue. It says nothing about other accounts.

Run it#

uv run python -m company

It ends with Uvicorn running on http://0.0.0.0:8090, and curl -s http://localhost:8090/forget-me/v1 answers the index with "issuer": "Bay Parcel (reference Company)". Variables:

VariableMeaning
COMPANY_ORIGIN=http://localhost:8090The Company's identifier and the base of every URL it publishes; else RAILWAY_PUBLIC_DOMAIN, else the request's host.
COMPANY_DEV_CLIENTS=1Accept http:// and loopback client ids, such as a Pim on localhost. Development and tests only, never in production.
COMPANY_TOKEN_TTL=3600Access token lifetime in seconds. COMPANY_APPROVAL_TTL=900 is how long an offered revision can be approved.

The demo site asks this Company when FORGETME_COMPANY_URL points at it (the demo site). The Company fetches the site's client metadata document at PIM_ORIGIN/poppy/agent.json, so the site must be reachable from the Company under that origin. On Railway it is; locally set COMPANY_DEV_CLIENTS=1.

Tests#

uv run pytest tests/test_company.py          # the conformance set, in-process, over Poppy
uv run pytest tests/test_poppy.py            # negotiation, identity and the approval exchange; documents checked against the Poppy kit's schemas
uv run pytest tests/test_wire.py             # a public-contract client over real HTTP, two processes

Each ends with a passed count and no failures. What poppy.py checks, and the upstream section each check comes from, is written beside each check in the code; the kit's own schemas for every document are in schemas/poppy-1.0-kit/.

Fixtures#

The issuer offers Personal Agents no sign-in type (auth.disabled: true): its only account holders are fictional. POST /fixture/accounts creates a synthetic account for the demo's fictional user and mints the refresh token a sign-in would have produced, for the one Personal Agent named. From there on everything is the protocol, and that fixture is the one thing a real Company replaces with Direct or Device Sign-In. Accounts expire after thirty minutes.

Limits#

Next steps#