[notme-18450e] feat(dpop): publish @agentic-research/dpop to GitHub Packages#42
Merged
Merged
Conversation
…ackages Makes the extracted SDK actually consumable, which is the step that lets cloister and canonical-hours delete their vendored byte-copies (cloister-195e47). Registry: GitHub Packages. It requires the npm scope to match the org, so the package is @agentic-research/dpop, not @notme/dpop. Worth knowing before anyone external tries to use it: unlike npmjs.org, GitHub Packages requires auth to INSTALL even for public packages — GITHUB_TOKEN covers same-org Actions, everyone else needs a read:packages PAT. Moving to npmjs.org later is a rename plus a registry swap; the tradeoff is recorded in the workflow header. Packaging. The package pointed `main`/`exports` at raw src/index.ts, which is fine for workspace:* and wrong for a published artifact — consumers would have to transpile a dependency, and there were no type declarations at all. It now builds to dist/ (JS + .d.ts + sourcemaps) via tsc, and publishConfig rewrites the entry points at pack time. Workspace consumers keep resolving to src (no build needed for dev or test); the tarball ships dist. Verified by inspecting the packed tarball, not by assuming. Three `as BufferSource` casts on crypto.subtle.verify() signature args. TS 5.9 types Uint8Array generic over its buffer, and ArrayBufferLike admits SharedArrayBuffer, so strict declaration emit rejected all three call sites. Type-only, no behavior change — and notable because canonical-hours had already made exactly these three edits downstream to get its vendored copy to compile. Fixing it upstream means that local modification disappears and its copy becomes byte-identical to source. The publish workflow builds and runs the suite BEFORE publishing, since an npm version is immutable once it lands, and fails on a tag/package.json version mismatch rather than shipping something whose tag lies about its contents. Actions are SHA-pinned per the ci.yml structural guard. Verified: packages/dpop 67 pass, worker 339 pass, worker tsc clean, tsc build clean (0 errors), tarball entry points confirmed pointing at dist. Co-Authored-By: Claude Opus 4.8 <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.
Makes the extracted SDK actually consumable — the step that lets cloister and canonical-hours delete their vendored byte-copies (
cloister-195e47).Registry choice
GitHub Packages requires the npm scope to match the org, so this is
@agentic-research/dpop, not@notme/dpop.One thing worth knowing before anyone external tries to use it: unlike npmjs.org, GitHub Packages requires authentication to install even public packages.
GITHUB_TOKENcovers same-org Actions; everyone else needs aread:packagesPAT. Moving to npmjs.org later is a rename plus a registry swap — the tradeoff is recorded in the workflow header rather than left to be rediscovered.Packaging fix
The package pointed
main/exportsat rawsrc/index.ts. That's fine forworkspace:*and wrong for a published artifact — consumers would have to transpile a dependency, and there were no type declarations at all.It now builds to
dist/(JS +.d.ts+ sourcemaps) via tsc, andpublishConfigrewrites the entry points at pack time:src— no build needed for dev or testdistVerified by unpacking the actual tarball rather than assuming:
Three
as BufferSourcecastsTS 5.9 types
Uint8Arraygeneric over its buffer, andArrayBufferLikeadmitsSharedArrayBuffer, so strict declaration emit rejected all threecrypto.subtle.verify()signature args. Type-only, no behavior change.Notable because canonical-hours had already made exactly these three edits downstream to get its vendored copy to compile. Fixing it upstream means that local modification disappears and its copy becomes byte-identical to source.
The workflow
Triggered by a
dpop-v*tag. It builds and runs the suite before publishing — an npm version is immutable once it lands — and fails on a tag/package.jsonversion mismatch rather than shipping something whose tag lies about its contents. Actions SHA-pinned per theci.ymlstructural guard.Verification
packages/dpop— 67 passworker— 339 pass (parity)workertsc --noEmit— cleandist/gitignored, not committedTo release after merge
🤖 Generated with Claude Code
https://claude.ai/code/session_01UNahXs8dda3vttpWrVwVaA