-
-
Review the exact recipient, purpose and fields before approving a fictional workshop contact card.
-
A consumed approval cannot request a second download. The gate rejects replay.
-
Inspect the local JSON export and decision receipts: name and email included; source notes excluded.
-
Changing the purpose exposes the difference and blocks export before the output adapter runs.
Inspiration
A person agrees to share a name and email with a library to reserve a workshop place. Later, an assistant proposes sending the same contact card to a fundraiser. The file may still look reasonable, but the operation has changed.
ShareLatch focuses on that moment: making the proposed disclosure understandable, then keeping approval attached to the exact operation. The workshop, organizations and contacts in the demonstration are fictional.
What it does
ShareLatch presents a permission card containing the recipient, purpose, selected fields and exact values. The workshop policy permits name and email; source notes are excluded from approval and export.
Approval binds an immutable snapshot, a policy version and a five-minute expiry measured from review. It can be used once. Changes to the approved operation stop execution before the output adapter runs, with the changed paths shown on screen.
Try the browser journey: approve the workshop card, change its purpose and observe the block. Restore the request, review and approve again, then download the exact JSON. Reusing that approval produces no second download request. Other scenarios change the recipient, alter an email or request excluded notes.
The browser uses clearly labelled, prepared agent proposals. The schema checks, approval state and JSON-download adapter are real. No model service, account or API key is required.
How we built it
A TypeScript authorization engine is shared by the React interface, Node tests and optional Ollama adapter. It validates structured proposals, copies reviewed values, normalizes field/key ordering and checks the current request before execution. Unknown properties, unsupported tools, duplicate fields and malformed values are rejected.
Validation and approval consumption happen synchronously before awaiting the output adapter. Concurrent attempts using one approval therefore invoke this adapter at most once. If the adapter fails, approval remains consumed. Revocation, policy rotation and expiry prevent later reuse.
The Vite application is deployed on GitHub Pages. With Node.js 24, run npm ci, npm test, npm run build and npm run preview to reproduce the browser prototype.
The optional CLI connects local Ollama proposals to the same engine. npm run agent pauses for approval; npm run agent:demo runs an explicitly scripted synthetic approval fixture. Ollama and a local model are separate optional prerequisites.
Challenges
The difficult part is keeping a readable decision precise after values mutate, time passes or executions race. Showing the changed purpose or recipient is more useful here than asking someone to interpret an opaque identifier.
The executor's trust boundary is equally important. This prototype constrains its own execution path; it cannot stop someone who modifies the runtime, controls the adapter or bypasses the gate. An integrating application must authenticate approval and make a trusted executor the required route to its protected tool.
Evidence and accomplishments
The public browser journey was exercised through changed scope, blocked export, fresh review, exact download and denied reuse. The inspected JSON contained the fictional contact's name and email, with notes absent.
A separate recorded local-model exercise used real qwen2.5:3b responses through Ollama. A deliberately requested change of recipient and purpose returned SCOPE_CHANGED; restoring the request produced one local export; repetition returned CONSUMED. Approval in this run was scripted and synthetic. It is a bounded integration exercise, not human consent or an adversarial model-security benchmark.
The suite passes 27 automated tests: 23 core and 4 adapter tests. These cover concurrency, expiry boundaries, clock rollback, revocation, policy changes, object mutation, strict parsing and output-adapter invocation. Adapter tests use mocked model responses; the saved Ollama exercise is separate.
What we learned and what's next
Approval must stay attached to a particular action throughout execution. Existing tools such as APort, LangChain human review and Cedar already address authorization. ShareLatch contributes a focused disclosure journey and visible changed-scope exercise, without claiming a new authorization primitive.
Next steps are usability testing and a trusted-server integration with durable approval state. Neither has been completed. The prototype compares declared purposes and recipient identifiers; it cannot infer actual intent or certify legal consent. There are no user-study or adoption results.
Authorship and credits
Created by Jhonatan del rio mejia with OpenAI Codex assistance in research, design, implementation, testing, documentation and presentation. The walkthrough uses real browser captures, synthetic ElevenLabs narration and English subtitles. Original project material is MIT licensed. Third-party packages, icons and optional models retain their own licenses.
Built With
- github
- lucide
- node.js
- ollama
- qwen2.5
- react
- typescript
- vite
Log in or sign up for Devpost to join the conversation.