Add A2APP — make agent writes to Living UIs verifiable - #392
Open
ahmad-ajmal wants to merge 2 commits into
Open
Conversation
An agent asked to "add a todo for tomorrow" wrote due_date: "tomorrow". PocketBase returned 200, stored an empty string, and the agent told the user it was scheduled. It had to guess what the app contained, the write silently failed, and nothing stopped it claiming otherwise. All three are now handled in the app, so any agent benefits — verified by driving an app with curl alone, after deleting .superuser. In the app (new pb_hooks, adapter 1.6.0): - describe: entities, protocol types, conventions, from the live schema - identity: PocketBase answers 200 for unknown paths, so an "a2app" marker is the only reliable probe - write guard as router middleware, not a record hook — PocketBase coerces first, after which "tomorrow" and "" are indistinguishable - read-back backstop; errors carry a code and list every violation - origin guard, agent token, ops auth, rate limits, idempotency In the CLI: - reads describe, not PocketBase's superuser-only admin endpoint, so it holds no privilege an outside agent lacks - resolves dates and labels client-side, where a clock and Intl exist - adapter-sync ships hooks without re-vendoring the kit - a valueless --flag now errors instead of becoming `true` - gate rejects e.app inside runInTransaction, which deadlocks the process while /api/health still returns 200 In CraftBot: - the system reports what changed, from the stored record; a false claim is withheld and handed back rather than corrected in front of the user - the data model is inlined into the prompt — three attempts became one - skills load per run, so operating an app no longer carries the build recipe that rebuilt a live app after one row insert - integration bridge: capability gate, destination allowlist, no redirects adapter-sync runs at create, install, import and launch — launch is the only path reaching an app a user already had. Adds spec/OVERVIEW.md and scripts/a2app-selfcheck.sh (21 checks).
zfoong
reviewed
Jul 30, 2026
| re.IGNORECASE, | ||
| ) | ||
|
|
||
| def _gate_false_claims(self, session_id: str, actions_with_input: list) -> list: |
Collaborator
There was a problem hiding this comment.
Remove this. Handling of hallucination using pattern matching might end up badly.
zfoong
reviewed
Jul 30, 2026
| POST /api/collections/{entity}/records write (needs a token) | ||
| ``` | ||
|
|
||
| ### 4.1 Identity |
Collaborator
There was a problem hiding this comment.
Can we not have the pocket base version as part of the protocol
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An agent asked to "add a todo for tomorrow" wrote due_date: "tomorrow". PocketBase returned 200, stored an empty string, and the agent told the user it was scheduled. It had to guess what the app contained, the write silently failed, and nothing stopped it claiming otherwise.
All three are now handled in the app, so any agent benefits — verified by driving an app with curl alone, after deleting .superuser.
In the app (new pb_hooks, adapter 1.6.0):
In the CLI:
trueIn CraftBot:
adapter-sync runs at create, install, import and launch — launch is the only path reaching an app a user already had.
Adds spec/OVERVIEW.md and scripts/a2app-selfcheck.sh (21 checks).