Repository navigation
feat: agents reach apps by CLI, MCP or HTTP - #61
Open
ahmad-ajmal wants to merge 20 commits into
Open
ahmad-ajmal wants to merge 20 commits into
ahmad-ajmal wants to merge 20 commits into
Conversation
The walk-verify skill change and the built-in Claude Code route change go out together in agent-app-framework 0.2.4 (protocol 0.2). The other packages are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0.2.4 was published with npm instead of pnpm, so its @a2app/sdk and @a2app/rules dependencies went out as workspace:* and npm could not install it. 0.2.5 carries the same changes with both pinned at 0.2.1. The Hermes plugin's install note now points at 0.2.5. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: ahmad-ajmal <ahmadajmal1514@gmail.com>
…oose more The account page every starter ships now ticks "Only let it read" by default when a person approves an agent's sign-in, and offers "Only read" first when they give an agent access themselves. An agent that only reads cannot change anything by mistake; the person unticks the box (or picks "Do everything you can do") to let it make changes. The ceiling is unchanged: an agent never does more than its person can.
…efault feat(account): an agent the person approves only reads unless they choose more
This was referenced Dec 1, 2026
Closed
Closed
ahmad-ajmal
force-pushed
the
feat/transport-channels
branch
2 times, most recently
from
December 1, 2026 16:18
98abc02 to
4561bab
Compare
…erations The spec, its schemas, and the reference that implements them. - An app declares `transports`, an ordered list of cli, mcp and http, and publishes it with `mcpUrl`. A call names the app it means (`X-A2App-App`), and another app answers 409 app_mismatch. - MCP at POST /api/_a2app/mcp/<app id>: ten tools, the same in every app. Each call is one request through the adapter's own router, so scopes, approval, guard and limits are the ones HTTP callers meet. A caller is a credential, never a session. - A destructive operation may name a read-only `preview`. The approval is the caller's that asked, and ends when the preview's answer changes. - An operation that does not apply to its record is refused, 409 operation_blocked. - A module's access may be `partial`, and whoami says `limited`. - Names may be in any script.
Both SDKs encode ids, entities and operations as one path segment, name the app a client is for, read identity without the credential, follow no redirect with it, and resolve an app's order and MCP endpoint. The Python SDK speaks 0.2.
…roving - The gate checks `transports` and previews, `scaffold --transport` puts one first, inspect reports the order, and a2app says it on every screen of an app that puts another than the CLI first. - A2APP_TOKEN is one app's: A2APP_APP names it, and it goes to no other app. - The walk quotes what an app's names and ids print in a command line, in a form PowerShell reads as text too, and shows a preview before the line that would run the call. - A spec may be in any language, and a module may have a command's name.
The first of the app's transports the run can reach, with the prompt written for it. Over MCP the harness gets a configuration file for that run, with the task's own credential, removed when it ends. Routes gain `transports` and `argsFor`.
… python adapter The reference's behavior: the declared order and `mcpUrl` in identity, app_mismatch, the MCP endpoint, approvals held to their caller and preview, operation_blocked, and `partial` access. The starter's clear-done names list-done as its preview.
…adapter The reference's behavior: the declared order and `mcpUrl` in identity, app_mismatch, the MCP endpoint, approvals held to their caller and preview, operation_blocked, and `partial` access. The starter's clear-done names list-done as its preview.
…ust adapter The reference's behavior: the declared order and `mcpUrl` in identity, app_mismatch, the MCP endpoint, approvals held to their caller and preview, operation_blocked, and `partial` access. The starter's clear-done names list-done as its preview.
…rails adapter The reference's behavior, in Ruby. The adapter is built at boot, so a declaration it refuses stops the app rather than its first request. A header value is read as text, so an idempotency key is one key over HTTP and MCP; keys stored before are converted.
… the pocketbase adapter The reference's behavior, in the JS hooks. Every MCP tool call is one request to the app's own loopback address: PocketBase serves records itself, so there is no router to hand it to. An Idempotency-Key on a record write is honored, in the same transaction as the row.
They pass the manifest's `transports` to the adapter, the account page shows an app's MCP address beside a new token, and react-node's clear-done names its preview.
Class D covers the MCP binding. The starter and multi-user checks run on any app, on any stack, and say what they did not check.
…d HTTP too With clients of their own, for where the CLI is missing or the app asks for another first. An address is held to the app it was pinned to, and a credential is sent only once the app there has said, without it, that it is the one expected.
The skills, the commands and the README.
ahmad-ajmal
force-pushed
the
feat/transport-channels
branch
from
December 1, 2026 16:21
4561bab to
7d7b365
Compare
…ers approvals From running real apps with names that are not English. - python: the manifest is read as UTF-8. Elsewhere that is the system's choice, and on Windows an app with such names did not start. - AGENTS.md says that an approval is the person's, and how the key is sent on each transport. Only the operator skill did. - AGENTS.md, the skill and the describe schema say that names and ids are percent-encoded in a path, and that only an id in `next` is already.
CraftOS-dev
reviewed
Dec 2, 2026
| * The ten tools. Framework text only: nothing an app says reaches a tool's name, | ||
| * description or schema, so an app cannot put words there. | ||
| */ | ||
| const TOOLS: readonly Tool[] = [ |
Owner
There was a problem hiding this comment.
Be careful that if these default agent app is changes in the agent app framework, their MCP counter part should also be changed. Having them in different places might cause mismatch if we forget to sync. This however, is the best solution for now, we can keep this. Just have to be mindful
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.
Agents can reach an app by CLI, MCP or HTTP, and what they may do is the same on each. CLI stays first unless someone asks otherwise. One PR for the whole task: it replaces #55 to #60, whose descriptions have the full details.
Two changes to how existing apps behave
409 operation_blocked) where it ran before, once the app takes the new adapter. A person using the app's page sees no change.What changes
"transports": ["cli", "mcp", "http"], in order. Agents use the first they can reach: without the CLI, that is MCP or HTTP. A refusal is the app's answer, never a reason to try another.scaffold --transport, the gate, the CLI's notice, the skills and AGENTS.md follow.POST /api/_a2app/mcp/<app id>: the same ten tools in every app, on all six stacks. Each call is one request through the app's own router, so scopes, approval, guard and limits are the existing ones.app_mismatch).A2APP_TOKENcan be tied to one app (A2APP_APP) and no redirect carries it.whoamisayslimited, and the order never raises an agent's access. Ids are encoded in the SDK, and over MCP are exactly what they say (b-1?xwas read asb-1), except indescribe'spathand innext, where they are percent-encoded.preview, and the approval ends when its answer changes. Every428says why (reason). A preview is held to its own declaration before it runs, and shows its answer to whoever holds the destructive operation's scope (approvals.md§3).partial, so an agent that can write some of a module is no longer told "read-only".Idempotency-Keyon record writes, which the MCP tools promise.Spec:
spec/v0_2/transports.md,approvals.md,mcp-tools.json. New fields are optional.Out since the first version: the bridge's any-harness settings (a route's own MCP file format and server name, a JSON prompt, the task, app and address as arguments, and their environment variables). Fixed:
word()inwalk.tsput names and ids in quotes but did not escape them, so an id likex $(…)ran when the printed line was pasted. Every word of it that needs it is now in single quotes, which PowerShell reads as text too; on Windows an id no shell quotes safely is printed as{id}.From review: an MCP argument that is null is one not given (
ask: nullparked a task,page: nullanswered an empty list). The plugins hold an address to the app the CLI pinned it to, read a remote app's order before choosing, and take a name two apps have for neither. The bridge setsA2APP_APPonly with the task's own token, and refuses a headless route that namesmcpwithout a way to be given the server. An app refused byA2APP_APPis not pinned. Expired approval keys are dropped.From running real apps: the Python stack reads its manifest as UTF-8 (on Windows, an app with names that are not English did not start). Every app's AGENTS.md says that an approval is the person's and how its key is sent on each transport, and that names and ids are percent-encoded in an HTTP path.
Reviewing it
toolkits/: five adapters, each standalone, so the same features written five times; a third to a half of each is its own self-testconformance/adapters/(the reference: start here, withspec/)harness-plugins/framework/spec/sdks/skills/In all +17,013 −1,105 in 160 files. Merge it with a merge commit.
Things to know
@a2app/adapter-corefrom npm, and 0.2.1 there has no MCP. Until thenscaffold --transport mcpsucceeds on it, but the app serves no MCP, shows no preview and runs blocked operations; the gate fails it only where MCP is first.partial, refuse names in other scripts, and refuse an app that hastransports(theirtoolkit-syncremoves the key).scaffoldwrites none by default.adapter-coreapp that declares nothing starts serving MCP when it updates. It grants nothing HTTP doesn't.nextas they are. A spaced one prints safely, but as several words, so that line does not run as it is.codex,geminiandaiderroutes stay CLI only: how each takes an MCP server for one run could not be confirmed.a2app_commandis CLI only, and the Marketplace kit copies have no transports or MCP. CraftBot's public links refuse the MCP path, while a newer app's identity would still advertisemcpUrlthere: an agent that meets that refusal has no other way to go.Tests
limited,A2APP_APP, the MCP endpoint (144 checks), the bridge's runs over each, the scaffold and gate checks, the plugins' order, and an adopted app over MCP. They were tried against 37 deliberate breakages of the built code, all noticed.partialand the describe cache (left out; conformance has checks for the first two), and the five adapters' own self-tests, starting a Python app on Windows, and the real-app runs below, which were done by hand on Windows (Rails in a Linux container).pnpm -r build,typecheck,test; conformance 160/160; PocketBase e2e 269/269; the Hermes and CraftBot tests (24 of Hermes' skipped); the Python SDK's own tests (in CI); each adapter's self-test. Each code fix's scenario was replayed, the bridge's token one on the environment it builds and not in a run. Of all of these, only the AGENTS.md text has tests of its own.conformance/starterconformance/multi-userdataVersion(2) or viewers count (1),Hoston the View's own pages (2), and its own error shape (5), all as on main; and that error shape over MCP (1).