Repository navigation
Speak the 1.0 draft beside 0.4 - #69
Merged
Merged
Conversation
The site snapshot of 15:48 UTC (scripts/spec-snapshot.mjs --save) and the official kit download of the same afternoon, unmodified, at upstream commit bb98332. The kit's reference pages match the snapshot's pages apart from absolute links, and its validator and schemas match upstream kit/company apart from links the site rewrites. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Decision 51. The agent, mock and validator speak 0.4 and the 13 November 1.0 draft (bb98332), and choose the newest compatible version a Company offers; from 1.0 a newer minor version is compatible and requests declare 1.0. - 1.0 requires a description on each agent.protocols entry (8.1); the validator's 1.0 profile checks it and poppy_discover shows it. - Pushed Authorization Requests (4.2), under both versions: the Direct Sign-In card links to /poppy/sign-in, which pushes with a DPoP proof when opened and redirects with only client_id and request_uri. The Worker now forwards /poppy/* with redirect: "manual" so the 303 reaches the browser. - prompt=consent on every Direct Sign-In request to a 1.x Company (4.2, 10.8). - The same DPoP key at refresh (4.4), under both versions: keys are sealed in poppy_dpop_keys and each server's latest nonce kept in poppy_dpop_nonces, both withheld from the data export. - A message with an unknown role is the Company's content; a 1.x stream event with an unknown SSE name is skipped (8.4, 8.6). - The 1.0 validator allows a port in organization.domain and requires ES256 and PS384 in listed client-assertion algorithms. - The mock offers or requires PAR, binds refresh tokens to their key, streams a later-version event, takes null context as cleared under 1.x, and records authorize.prompt-consent, par.not-pushed, par.extra-parameters, par.code-key and dpop.refresh-key-changed, each with a TAMPERS case. - The 1.0 pin, a 15-entry requirement ledger, reviewed kit findings and a CI step for the 1.0 kit; docs and readings updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Python client chooses among 0.4 and 1.0 and declares its own version, requires 1.0's protocol descriptions, sends prompt=consent under 1.x and pushes Direct Sign-In when the issuer lists the endpoint. Each run draws the mock's version (0.4, 1.0, 1.1, or two linked), PAR, bound refresh tokens and a later version's stream event. Its model now refreshes with the key each sign-in was issued with under 1.x, which the mock's dpop.refresh-key-changed check found on the first run. In the interop grid the mocks already served 1.0 since PROTOCOL_VERSIONS gained it, and scenario D expected 0.x. D now accepts 0.4 or 1.0, and lenient-company-v04 (INTEROP_MOCK_VERSION=0.4) keeps 0.4 in CI for our agent and evil-personal-agent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A push answered after the sign-in finished in another tab, or was cancelled, no longer marks it failed: only a pending sign-in is ended, claimed before anything is awaited. - A sign-in at a Company that dropped PAR ends instead of waiting. - Rewording a 1.0 protocol description no longer counts as an interface change that fails pending work with company_changed. - An empty SSE event field is the default name, message, in our client and the Python one. - The protocol log records the push as signin.direct.push, not a token request. - An origin that never sent a DPoP nonce costs no SQL read per request. - The store header and SECURITY.md say DPoP keys are sealed at rest. - In the interop grid strict-company requires PAR, and the agent adapter opens its own sign-in page as the User's browser would; the runner checks the assertion aud at the PAR endpoint too. - The validator reuses compatibleVersions to pick a profile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Upstream's 1.0 draft, as of 13 November at commit
bb98332, has six breaking changes against 0.4. Today PDA refuses any Company that declares 1.0, and could not sign in at one that requires Pushed Authorization Requests. This PR makes the agent, mock and validator speak 1.0 beside 0.4 (decision 51), so 0.4 Companies keep working while others move to 1.0.The pin is the site as of 15:48 UTC. A snapshot from 13:36 UTC (
736ef95) was replaced before this PR was opened, because upstream added ten changelog entries in between.The first commit is the upstream snapshot and kit, unmodified (135 files, 27,149 lines). The second is the change itself: 53 files, +1,385 and −158. The third moves the Python Hypothesis client and the Docker interop grid to 1.0 as well, and the last fixes what a code review of the whole branch found. No UI file changes, and the HTML files in the diff are the snapshot's pages.
What changes for a Company
descriptionon eachagent.protocolsentry (8.1)poppy_discovergives the model the description so it can choose between the Company's agent and its APIspushed_authorization_request_endpoint, the sign-in card links to the agent's new/poppy/sign-inpage. Each time the User opens it, the agent pushes the request with its client assertion and a DPoP proof, then answers 303 to the authorization endpoint with onlyclient_idandrequest_uriprompt=consent. We don't claim the exception for a redirect received only on the opening device (reading)poppy_dpop_keys, so a refresh after a restart uses the key the refresh token was issued with. Each server's latest nonce goes inpoppy_dpop_nonces, so the kept key keeps sending itPAR and stored keys apply under 0.4 too, since RFC 9126 defines the metadata for any client and 0.4 allows keeping a key (reading). That keeps one sign-in path and one refresh path.
Of the minor changes, two reach the agent (reading). A message with a
roleit doesn't know is now relayed as the Company's content; before, it was dropped. In a 1.x conversation, a stream event with an SSE name it doesn't know is skipped. From 1.0 a newer minor version is compatible (3.4), so a Company serving 1.1 is used as 1.0 and every request declaresPoppy-Version: 1.0.Changes
Agent.
PROTOCOL_VERSIONSis["0.4", "1.0"]. The new/poppy/sign-inroute answers only the person signed in to PDA in that browser, like the callback. It refuses an expired or finished sign-in and answers 404 for an unknown id. A signed-out browser is asked to sign in to PDA first, and nothing is pushed.poppy_discoveralso tells the model that a Company's name comes from its ownpoppy.json(1.0 10.3).A Worker bug the new route found.
handlePoppyforwarded requests to the person's Durable Object with the defaultredirect: "follow", so the stub followed the agent's 303 itself and the browser got a 404. It now passesredirect: "manual". No existing route redirected, so nothing deployed was affected.Validator. A 1.0 profile (
draft-1.0.ts) is 0.4's rules plus three additions:protocol-description-empty);organization.domain;metadata-assertion-algs).Under both versions it checks the PAR endpoint is HTTPS, and reports
require_pushed_authorization_requestswithout an endpoint (par-endpoint-missing). A 1.x document newer than 1.0 is checked with the 1.0 profile and noted (version-newer-minor).Mock.
pushedAuthorization: "offered" | "required",bindRefreshTokens, andlaterStreamEvent.contextfield set tonullas cleared.authorize.prompt-consent,par.not-pushed,par.extra-parameters,par.code-keyanddpop.refresh-key-changedeach have an id inviolations.tsand aTAMPERSrow.Pins.
spec/requirements-1.0.jsongives each of the 15 changelog entries a disposition.Hypothesis client. The Python client now speaks 1.0 beside 0.4, written from the 1.0 text rather than ported from
src/poppy. Each run draws the version the mock serves (0.4, 1.0, 1.1, or two linked), PAR offered or required, bound refresh tokens, and the new stream events. On its first run the mock'sdpop.refresh-key-changedcheck caught the model itself: itsnew_dpop_keyrule switched a User to a new key, and later refreshes proved with it, which 1.0 forbids. Each sign-in now keeps its key for refresh under 1.x (its README).Interop grid. The mocks had been serving 1.0 since
PROTOCOL_VERSIONSgained it, and scenario D failed because it expected0.x. D now accepts 0.4 or 1.0. A newlenient-company-v04keeps 0.4 in CI for our agent andevil-personal-agent.strict-companynow requires PAR, and the agent adapter opens its own sign-in page as the User's browser would, so every Direct Sign-In in the grid runs both ways.Review fixes. A high-effort review of the whole branch found these, each now with a test that fails without its fix:
descriptioncounted as an interface change, so pending work failed withcompany_changed. Only the endpoint counts now.event:field, which meansmessage, made a 1.0 conversation skip the message. The Python client had the same bug.signin.direct.push.Smaller fixes, without tests:
audat the PAR endpoint too;The review also said a 1.0 Company with a port in
organization.domaincan't pass live discovery. That is our documented policy: the agent uses no Company on another port. The ledger now says that only a document given as text is checked with a port.Verification
test/poppy-1.0.test.ts(19 tests) covers:prompt=consentunder 1.0, pushed or in the URL, and not under 0.4;prompt=consent, both 1.0 consent tests fail.invalid_grant.test/poppy.test.tsfails in all three DPoP profiles. Before that fix,test/poppy.test.tsfailed about one run in three. A kept key arrived without the nonce it had used, and the mock recordeddpop.nonce-ignoredwhenever the clock had crossed a second.npm test: all five projects pass (1755, 3, 314, 454, 211).npm run typecheck,check:spec,check:docsandnpm run test:hypothesis(63) pass. Revertingprompt=consentin the Python client fails its suite withauthorize.prompt-consent.lenient-companyandstrict-companyat 1.0 andlenient-company-v04at 0.4, 30 at Print with Poppy, 8 againstevil-company, and 24 forevil-personal-agentagainst the three mocks. The HAR files show 14 pushes atstrict-companyand no authorization request there that wasn't pushed.node scripts/check-company-kit.mjs --protocol 1.0 --reviewed-findingspasses with and without--with-dpop. Its findings match the 0.4 kit's: lenient and strict 122 pass, 1 fail and 7 warnings, all from the documented DPoP prerequisite.Limits
test/activity.test.ts"describes a 0.4 conversation from its four state fields" failed in 2 of about 9 full runs on this branch, and in none of 3 onmain; it passes alone. It writes conversation state in SQL while a background read can overwrite it. I left it unchanged.🤖 Generated with Claude Code