Repository navigation
Rewrite the five libraries as a minimal core - #32
Merged
Merged
Conversation
Replace the serialized and capability APIs with six functions: createIdentity, restoreIdentity, createMnemonicIdentity, recoverIdentity, verify and validatePublicIdentity. An Identity exports its v2 backup, signs exact bytes and lends a scoped X25519 secret. Use Scure for encodings and Noble's strict verification instead of handwritten equivalents. Keep the v2 backup format, the m/101010'/25519'/0' derivation and all existing vectors. Consumers are not yet adapted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the proof, artifact, manifest, public-key and error APIs with createSealHash, createSealProof and verifySealProof. A seal v1 proof signs "ternent-seal/v1" || 0x00 || canonical JSON of its fields with an Identity, and verification reports signature and hash results separately. The CLI keeps sign and verify, reading the signer from SEAL_IDENTITY_FILE. Armour is no longer a dependency. Test vectors live in the package. Consumers are not yet adapted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ages Remove the changelogs, agent guides and Seal's CLAUDE.md, which described the retired APIs, and a stray Vite timestamp file. Each README now carries the package's interface. Identity's test vectors move into the package so its tests no longer read the docs folder. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each package ships an llms.txt for developers whose agents use it, linked from its README and the root guide. A CLAUDE.md for each package records what it owns and the rules that keep it small. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the text, file, codec, capability and error APIs with two functions. encrypt takes public identities and native X25519 age recipients, or a passphrase; decrypt takes an Identity, a native age secret key, or a passphrase. Both return binary age through one age Encrypter or Decrypter. Saved native-age vectors move into the package, and the tests check interop with the age CLI in both directions and scrypt work-factor rejection. Consumers are not yet adapted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the stateful log, projections, subscriptions and protocol subpath with createLedger, openLedger and createWriter. A history is immutable and issued only by Ledger; a writer stages validated entries and advances on a successful commit. Each commit carries a Seal v1 proof over its body. openLedger accepts only canonical v2 bytes and verifies every proof, linkage and entry rule. maxBytes is the single size limit. The v2 vector lives in the package. Consumers are not yet adapted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Remove the Seal Action, the test and release signing identities and the proof verification from CI and the release workflow, along with the release CLI commands and the mandatory Seal hook in the publisher that served them. prepare-release still records the workflow origin and checks it on resume. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Seal is now its three library functions. Remove bin/seal, the CLI and its tests, the release flow's retained verifier tools, the Seal consumer, type and isolation checks, the browser check's Seal block, the old Seal format docs and vectors, and the CLI and release-sealing mentions in the root docs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace commands, system profiles, capability sets, authoring modes, inspection handles, locked views and the /protocol, /system and /testing subpaths with createDocument, openDocument and defineModel. A model is events and one pure reducer; a document stages and commits events per group. Every entry is one age ciphertext with no group label. Membership, roles and key epochs live in encrypted group records; a key gains authority only through an accepted record. Each group replays independently, rejected commits stay as evidence with no effect, and rebase reapplies unpublished local commits onto another copy. A saved vector fixes the format. Consumers are not yet adapted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…libraries Replace eleven consumer and type checks written against the old APIs with one consumer covering all five libraries and their saved vectors, a per-package import-isolation check and one typed consumer, and rewrite the browser proof. Update AGENTS.md, CONTEXT.md, the README and the agent guide to the current design, and mark docs/ as history. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…don't need Delete packages/ui and packages/workspace (published versions remain on npm), the docs folder, an unused Vite library config and a tsconfig for a removed app. The browser consumer drops its Vue counter and CSS check, and the consumer check drops probes of the toolchain's own lint, format and test failures. Renovate no longer ignores Ledger, and guides lose their links to the removed docs. Vue stays as a root dependency because Vite+'s type declarations need it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Key discovery kept only the last key wrapped for each group epoch, so a member could wrap a fake key for an epoch another member already held, displace the real key in that reader's copy, and replay a forged creation record. Keep every candidate key per epoch, and accept events and role changes only when they decrypt with the epoch key an accepted record established. Also restore Renovate's Ledger ignore, and replace comments that restated code with the reasons behind it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… nothing A wrap's group label is the sender's claim. A member of two groups could wrap one group's key to another member labelled as the other group's, and that reader's replay filed the real group's records under the wrong group and lost access to it. Every record now names its group inside the ciphertext, and a key only opens records of the group it was wrapped for. The saved vector is regenerated for the new record format. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…bership checks setMember no longer repeats the role, no-op and last-admin checks that replay makes on the same record; replay's rejection is the error. Add tests for replay rules no test covered: group creation for someone else or at a later epoch, two records for one group in a commit, records for an unknown group, a non-member holding the current key, a no-op role change, removals that skip the epoch, name the wrong epoch or name a non-member, and malformed records. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Wraps carried group and epoch labels, and replay used them to decide what a key meant. A label is only the sender's claim, and three forgeries abused it: a fake key for a held epoch, another group's key, and the current key under an older epoch. Wraps now carry unlabelled keys. An accepted creation or removal record establishes the key that opened it; every other record counts only if the key that opened it is established as its group's current epoch. Removal records drop their epoch field. This replaces the per-epoch candidate lists and label checks; the saved vector is regenerated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Membership, roles and key epochs become public, signed entries: anyone with the file can check that every accepted change was authorised. Each epoch's public recipient is recorded, and a wrapped key is used only if it derives that recipient, so forged, mislabelled and multi-recipient keys change nothing. Events entries name their group and epoch in the clear and are decrypted with that epoch's key, so trial decryption and label handling go. Only event types and data stay encrypted. The saved vector is regenerated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…k commits Anyone can send a wrap, and a wrapped string that isn't a key made opening throw, which let any signer break a member's copy or block removals; such a secret is now skipped. A group created or rotated onto a recipient another epoch already uses is rejected, so a relabelled wrap can't open a copycat group. A commit whose first entry isn't a record is rejected instead of ignored. CONTEXT.md and the README now describe public membership exactly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…adable per epoch Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A group whose model or version this reader doesn't support skipped its events before the no-key count, so a reader without the key under-counted `unreadable`. Count first, then skip for readers who hold the key. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Concord keeps the shortest useful flow: create or open, stage and commit events, read state, export, and manage groups. Rebase and the model squash hook go; an application re-stages its events on another copy and combines its own events before staging. The README, guides and AGENTS.md state that admins are trusted to distribute keys honestly, and what follows if they don't. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A member could commit events claiming a model version no app will reach and make the group unreadable for everyone, admins included. The creation record now states the group's version, a commit may raise it only if an admin signed it, and readers on an older model refuse the group as before. openDocument calls replay directly now that nothing else opens a document. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
samternent
marked this pull request as ready for review
November 30, 2026 17:01
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.
A fresh rewrite of Identity, Seal, Armour, Ledger and Concord with no backwards compatibility. Each package is now one source file with a small interface, its own saved vectors, and a README,
llms.txtandCLAUDE.md. Library source goes from about 7,300 lines to about 1,410.Packages
e2d18a0):createIdentity,restoreIdentity,createMnemonicIdentity,recoverIdentity,verifyandvalidatePublicIdentity. Uses Noble and Scure for every primitive. The v2 backup format and the derivation path are unchanged.4e6c509,d42afba):createSealHash,createSealProofandverifySealProoffor a seal v1 detached proof. The CLI, artifacts, manifests and public-key files are removed.5db3bbb):encryptanddecryptover bytes, for public identities, native X25519 group keys and passphrases. Output is binary age.9db76b8):createLedger,openLedgerandcreateWriter. The v2 format has a Seal proof per commit, and import accepts canonical bytes only. A history is immutable and only Ledger can create one.maxBytesis the single limit. Projections and subscriptions are removed.d751f3dand the later Concord commits):createDocument,openDocumentanddefineModel.memberandadminroles. Membership, roles and key epochs are public signed entries, so anyone with the file can check every change was authorised; only event types and data are encrypted. Removing a member rotates the group key, and a new member receives the group's whole history.Repository
365f3c8,d42afba).99afc60).AGENTS.md,CONTEXT.md, the README andllms.txtdescribe the new design.CONTRIBUTING.mdand.changeset/README.mdlose their links to the removed docs.CHANGELOG.md, and theSPEC.mdin Armour and Concord, are removed. Changesets starts new changelogs at the next release.renovate.jsondrops its ignores for the deleted packages and the Vue plugin entries; the toolchain group is renamed "Vite+ toolchain". Ledger stays ignored.packages/ui,packages/workspaceanddocs/are removed, along with an unused Vite library config, a stale tsconfig and the browser consumer's Vue app (75fcf34). The published@ternent/ui@0.6.0and@ternent/workspace@0.1.0stay on npm.Not in this PR
www, thecreate-ternent-apptemplates andworkspacestill use the old APIs.packages/workspaceby local path, so it needs repointing to the published package.SEAL_RELEASE_PUBLIC_KEYvariable andSEAL_RELEASE_IDENTITY_B64secret are unused and can be deleted in repository settings.🤖 Generated with Claude Code