Skip to content

chore: prepare packages for publication (ENG-17072, ENG-17073, ENG-17074) - #47

Merged
kamescg merged 28 commits into
feat/atom-runtime-packagesfrom
chore/pre-publish-hygiene
Oct 22, 2026
Merged

kamescg merged 28 commits into
feat/atom-runtime-packagesfrom
chore/pre-publish-hygiene

Conversation

@kamescg

@kamescg kamescg commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Consumers receive bundled copies of CLI runtime dependencies, protocol bytecode through ordinary root imports, oversized declarations, and declaration maps pointing to unpublished source. This change externalizes CLI library dependencies, isolates bytecode, moves pure action envelopes into SDK, and tightens the 4.0.0 public APIs and release metadata.

Addresses ENG-17072, ENG-17073, and ENG-17074. This PR targets feat/atom-runtime-packages. It contains the 18 reviewed commits, the review fix-ups, and merges of #45 and #46, so its head is the integration state of the train; merge it after (or instead of) those two. The three atom runtime package directories are unchanged apart from #45's redaction fix.

Package impact

Package Change
cli Externalize viem and workspace dependencies in the library entry; keep the executable bundled; retain deprecated aliases to SDK envelopes for one release; exclude test helpers
sdk Own pure envelope builders and schema; narrow root exports to SDK APIs and selected shared exports; preserve ./protocol; correct shipped examples
protocol Keep bytecode on ./contracts; remove curve shims and dependency; derive config types from canonical ABI; annotate public read/write/event results
react Annotate all exported hooks; use protocol/deployments peers; document hook groups and peer requirements
periphery Remove unused FeeProxy ABI/bytecode copies
Other established packages Remove declaration maps, align Node engines, complete API/subpath docs, and apply candidate version metadata
Shared scripts and documentation Validate README/nested docs imports; enforce dependency-range policy; fix filesystem URL handling for paths with spaces; document ownership and ESM normalization

Target versions

Package Candidate version
schema-org 0.1.0-alpha.0
classifications 0.1.0-alpha.1
predicates 0.1.0-alpha.1
ids 0.1.0-alpha.1
iid-spec 0.1.0-alpha.0
iid 0.1.0-alpha.0
iid-registry 0.1.0-alpha.0
iid-ladder 0.1.0-alpha.1 (via #46)
pipeline-runtime 0.1.0-alpha.0 (via #46)
primitives 0.1.0-alpha.1
protocol 4.0.0
deployments 0.1.0-alpha.1
periphery 0.1.0-alpha.1
curves 0.1.0-alpha.1
sdk 4.0.0
cli 0.1.0-alpha.0
react 0.1.0-alpha.1

Deployments, curves and periphery move from 0.1.0 to 0.1.0-alpha.1 because their 0.1.0-alpha.0 is already on the registry; CLI, never published, uses 0.1.0-alpha.0. The three atom packages are held out of release-plan.json (their alpha.0 is the Core lineage and is never published; see docs/release.md "Held packages"). Internal dependencies on prereleases remain exact-pinned; stable versions use caret ranges, including peer and development dependencies. Manifests, lockfile, release plan, registry checks, and release documentation are aligned. Every candidate retains the alpha dist-tag; this PR does not publish or promote latest.

Identity impact

Identity impact: none — existing golden bytes unchanged.

Fixture impact

None. Conformance and golden fixture contents are unchanged.

Contract artifact

ABI and bytecode contents are unchanged. Canonical artifacts remain sourced from deployments, backed by @0xintuition/contracts-v2@1.1.0-alpha.1 and @0xintuition/contracts-v2-periphery@1.1.0-alpha.0. This PR changes export boundaries and removes redundant copies; it does not regenerate or replace contract artifacts. Artifact and sync checks pass.

Tarball measurements

Measured with npm pack --ignore-scripts --dry-run --json; counts include package metadata. All 16 established packages ship zero declaration maps.

Package Files before → after Packed bytes before → after Unpacked bytes before → after
schema-org 2,817 → 1,879 693,712 → 643,055 5,743,116 → 5,347,737
classifications 264 → 177 126,232 → 118,655 1,391,548 → 1,339,564
predicates 843 → 563 135,864 → 119,956 1,330,512 → 1,199,886
ids 36 → 25 13,623 → 9,004 45,927 → 39,031
iid-spec 52 → 52 85,486 → 85,644 278,368 → 278,820
iid 42 → 29 28,300 → 25,551 92,898 → 83,551
iid-registry 24 → 17 11,117 → 9,667 34,751 → 31,150
iid-ladder 24 → 17 29,320 → 27,750 88,403 → 83,467
primitives 27 → 19 28,418 → 25,490 119,323 → 104,591
protocol 780 → 513 186,631 → 73,478 2,787,979 → 460,455
deployments 162 → 109 224,946 → 220,486 1,972,902 → 1,931,881
periphery 201 → 131 43,813 → 23,480 278,698 → 108,375
curves 33 → 23 31,592 → 28,394 128,713 → 114,553
sdk 64 → 70 62,273 → 71,966 268,882 → 331,274
cli 658 → 331 213,316 → 131,393 2,464,592 → 1,818,638
react 48 → 33 90,242 → 25,148 1,594,998 → 133,078
Total 6,075 → 3,988 2,004,885 → 1,639,117 18,621,610 → 13,406,051

SDK grows because the pure builders and schema move into it; the combined CLI/SDK footprint shrinks. Protocol dist decreases from 2,732,436 to 402,112 bytes, and React dist from 1,588,527 to 124,280 bytes.

Validation

All 20 requested commands passed for 8087d8a, using Node v24.11.1 and Bun v1.3.11 in a clean detached checkout:

bun install --frozen-lockfile
bun run build
bun run typecheck
bun run test
bun run check
bun run registry:check
bun run registry:test
bun run release:registry:test
bun run guard:supply-chain
bun run guard:supply-chain:test
bun run artifacts:check
bun run artifacts:test
bun run conformance:check
bun run schema:validate
bun run predicates:check-generated
bun run schema-org:check-generated
bun run classifications:check-creation-profiles
bun run protocol:sync-artifacts:test
bun run pack:dry-run
bun run smoke:tarballs

The tarball smoke check installs packed packages into an isolated consumer and verifies Node, Bun, and TypeScript consumption. It also runs the README/nested docs import checker. Biome check --write covered all changed supported files, and git diff --check passed.

Validation used a checkout without spaces: the untouched atom-enrichment fixture tests have pre-existing URL.pathname assumptions that fail in a spaced worktree path. In-scope shared scripts and the IID fixture loader were fixed; the excluded atom runtime packages were left unchanged.

Rollout notes

  • Protocol 4.0.0 removes root bytecode and curve aliases. Import bytecode from @0xintuition/deployments/bytecode or @0xintuition/protocol/contracts, and curve math from @0xintuition/curves.
  • SDK 4.0.0 removes wholesale protocol and ID root re-exports. Use sdk/protocol, the direct foundation packages, or the explicitly retained shared exports listed in the migration guide.
  • CLI plan aliases remain for one release. New integrations use SDK action envelopes. The executable currently exposes encoder commands; there was no executable plan command to migrate.
  • Install the protocol and deployments peers when using React. React 18+ remains declared; React 19 is tested.
  • Keep the ESM import normalizer until existing extensionless sources and generators are migrated together.
  • Package publication and promotion remain separate release actions.

Review fix-ups (2026-10-22)

Commits after 8087d8a: merge of #45 (e0a6261), 88754e6, merge of #46 (cf1c95e), 7bc49d7.

  • Version collision (blocker from review): deployments, curves, periphery → 0.1.0-alpha.1; every exact pin cascaded (sdk, cli, protocol, periphery, react peer and dev); release-plan.json and docs/release.md updated; bun run release:registry (the live preflight, not in CI) passes.
  • Lockfile: bun does not rewrite workspace range strings on incremental installs, so the stale cli/periphery/sdk entries (0.1.0, 4.0.0) were patched to the manifest values; frozen and incremental installs both report no changes.
  • Held packages: the three atom packages leave the release plan until the application-lineage rebuild (ENG-17076..17078) publishes 0.1.0-alpha.1.
  • Registry dist-tag state is recorded in docs/release.md: nine packages have 0.1.0-alpha.0 under both latest and alpha; moving latest to the next alpha is a release-owner decision at publish time.
  • SDK root: calculateTripleId / calculateCounterTripleId (and their types) stay on the root beside calculateAtomId; the app imports them there at ten sites. The tarball smoke now asserts they are present and that bytecode is not.
  • Provenance: envelope metadata reports source.package: '@0xintuition/sdk'; the CLI README says so.
  • Docs: CLI description, SDK "Public API Areas" (envelope builders), protocol migration note on the getConfig return type.
  • Merge conflicts with feat: add Effect-free pipeline runtime and provider-local ladder policy (ENG-17075) #46 (iid-ladder README, registry script and its test, release plan, publish order) are resolved here.

Validation on 7bc49d7 in a space-free worktree, every step passing: bun install --frozen-lockfile, bun run build, bun run typecheck, bun run test (32/32 tasks), bun run check, bun run registry:check (20 packages), bun run registry:test, bun run release:registry:test, bun run guard:supply-chain, bun run guard:supply-chain:test, bun run artifacts:check, bun run artifacts:test, bun run conformance:check, bun run schema:validate, bun run predicates:check-generated, bun run schema-org:check-generated, bun run classifications:check-creation-profiles, bun run protocol:sync-artifacts:test, bun run pack:dry-run, bun run smoke:tarballs (clean-room Node/Bun/TypeScript consumption of all 20 packages), and bun run release:registry (live registry preflight for the 16-entry plan).

🤖 Generated with Claude Code

kamescg and others added 22 commits October 22, 2026 09:55
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Port provider utilities and Promise execution without Effect; preserve app provider-local identities behind an opt-in ladder policy with pinned oracle vectors.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Decode file URLs in release tooling, cover registry CLI execution in spaced and symlinked paths, and smoke-test pipeline subpaths and the bound ladder policy on Node and Bun.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The copied app tests require promtool when CI is set. Install the Ubuntu Prometheus tools before running the workspace tests.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Decode file URLs before resolving filesystem paths so uncached builds and release checks run from worktrees whose paths contain spaces. Validated with bun run build.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…endencies ENG-17072

Move pure action envelope builders and schema into SDK actions, retain deprecated CLI aliases, externalize runtime dependencies in the library bundle, and isolate test helpers. Node 20 minimum; Node 24 tested. The executable only exposes encoder commands.

Validation: full workspace build; CLI 116 tests; SDK unit tests. npm pack --dry-run --json (file count / packed bytes / unpacked bytes):
cli: 658 / 213316 / 2464592 -> 656 / 150446 / 1992192
sdk: 64 / 62273 / 268882 -> 101 / 83438 / 395768

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Keep protocol root and internal ABI imports free of bytecode; preserve bytecode on ./contracts. Remove curve math compatibility shims and dependency, document 4.0.0 migration, and give exported read/write/event helpers named return types. SDK OAuth wallet imports canonical bytecode directly.

Validation: workspace build, 216 protocol unit tests. npm pack --dry-run --json: 780 files / 186631 packed bytes / 2787979 unpacked bytes -> 768 files / 99184 packed bytes / 712972 unpacked bytes. Dist: 2732436 -> 654717 bytes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Disable declaration maps in shared TypeScript defaults and remove overrides in the 16 established packages. Smoke checks reject dangling declaration maps for this scope; atom runtime package overrides remain untouched.

Validation: workspace build; npm pack --dry-run --json confirms zero declaration maps for all 16 established packages. Before -> after (files; packed bytes; unpacked bytes):
predicates: 843 -> 563; 135882 -> 119956; 1330547 -> 1199886
schema-org: 2817 -> 1879; 693726 -> 642589; 5743151 -> 5346599
iid-registry: 24 -> 17; 11131 -> 9667; 34786 -> 31150
protocol: 768 -> 513; 99184 -> 78005; 712972 -> 549545
cli: 656 -> 331; 150446 -> 131390; 1992192 -> 1818604
periphery: 201 -> 135; 43832 -> 37883; 278733 -> 246638
iid: 42 -> 29; 28314 -> 25551; 92933 -> 83551
ids: 36 -> 25; 13639 -> 9004; 45962 -> 39031
primitives: 27 -> 19; 28431 -> 25280; 119358 -> 103974
iid-spec: 52 -> 52; 85503 -> 85503; 278403 -> 278403
sdk: 101 -> 70; 83451 -> 71949; 395820 -> 331015
classifications: 264 -> 177; 126245 -> 118598; 1391583 -> 1339414
iid-ladder: 24 -> 17; 29334 -> 27742; 88438 -> 83445
react: 48 -> 33; 90249 -> 85215; 1595033 -> 1528914
deployments: 162 -> 109; 224955 -> 220485; 1972922 -> 1931873
curves: 33 -> 23; 31601 -> 28020; 128733 -> 112850

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ENG-17074

Correct predicate and ID imports in shipped SDK migration guidance. Add a TypeScript-aware import checker covering the root README, every package README, and recursively every package docs Markdown file, including named type exports and export-map wildcards. No existing tracked README import checker was present. Validation: node scripts/check-doc-imports.mjs.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… ENG-17074

SDK 4.0.0 exports its own API and selected ID helpers and input types. Remove wholesale protocol and ID exports, migrate shipped examples to sdk/protocol, and assert the boundary in tarball smoke tests. Validation: workspace build and docs import checks.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Periphery already re-exports canonical artifacts from deployments; stop compiling and shipping unreferenced copies.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Add explicit named query return types while preserving wagmi query state and refetch APIs. Every exported hook is annotated. Document all hook groups and peer requirements; move protocol/deployments to peers with dev copies for tests. React 18+ remains supported and React 19 is tested; react-dom is an application renderer dependency.

Validation: React build and 99 tests. npm pack --dry-run --json: 33 files / 85215 packed / 1528914 unpacked bytes -> 33 / 25148 / 133060. Dist: 1522408 -> 124280 bytes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Merge duplicate dynamic-fee and gross-up sections, retain bounded solver details, and list all root exports by source module. Validation: documentation imports resolve against dist.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Use JSON import attributes and provide a readFileSync/createRequire alternative for Node environments without import attributes. Validation: documentation imports resolve against package exports.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Remove the unnecessary direct viem install from iid-ladder guidance, normalize Install/License headings, and explain classifications inherits its viem peer requirement via iid.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…17074

List all primitive subpaths, all 15 schema-org root exports, and the exact case-sensitive generated type subpath contract. Validation: documentation import checker.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Add the three atom runtime ownership rows using the existing migration documentation. Clarify deprecated CLI plan aliases. The duplicate SDK/CLI layer row was removed in ENG-17072; atom runtime package files are untouched.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Choose 0.1.0-alpha.0 for deployments, curves, periphery, and CLI; update all exact dependent pins and the release plan. Document the train policy. Registry metadata derives versions from manifests, avoiding a second hard-coded version list. Validation: bun install and registry:check.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Use stable caret ranges and retain exact prerelease pins in runtime, peer, and dev dependencies. Enforce the policy centrally and in packed manifests; release preflight checks the recorded stable baseline. Document when dependent releases are necessary. Include docs import validation in tarball smoke. Validation: registry:check, registry:test, release:registry:test.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Keep the shared normalizer because existing sources and generators still use extensionless imports. Document the preferred .js convention and the migration prerequisite for removal.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Decode the IID-spec fixture directory URL before reading files. Reconcile remaining release prose with the selected stable-caret and exact-prerelease policy. The excluded atom runtime tests contain similar URL-path assumptions; final CI parity is run from a clean checkout without spaces, without editing those packages.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Fresh-checkout validation found a remaining curves-only type import in getConfig and an SDK test still using root bytecode. Derive the config result from the canonical ABI and update the test to deployments/bytecode. Annotate the generic event parser and receipt/context helpers so the union event declaration does not inline the complete ABI.

Validation: workspace build and 116 SDK tests. Protocol baseline -> current npm pack --dry-run --json: 780 -> 513 files; 186631 -> 73478 packed bytes; 2787979 -> 460455 unpacked bytes. Dist 2732436 -> 402112 bytes; current measurement also includes ENG-17074 declaration-map removal.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@linear

linear Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

ENG-17072

ENG-17073

ENG-17074

kamescg and others added 6 commits October 22, 2026 12:29
…-17069

Add redactProviderDiagnostic and apply it in createPluginError so every
errors[] entry the engine emits is credential-free before any consumer
persists or returns it. The helper strips query strings, fragments and
userinfo from URLs (verbatim or percent-encoded), redacts credential
parameters and headers (plain, quoted, JSON-escaped), bare Bearer/Basic
tokens, and scheme-less userinfo. Mirrors the Core hotfix so both lineages
stay identical.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…s, make promtool optional (ENG-17075)

Stop emitting .d.ts.map from pipeline-runtime so the repo-wide tarball smoke
check (no dangling declaration maps) passes once both prerequisite branches
merge. Reword the metrics contract comments without references to private
repositories or internal worker names. Remove the unpinned apt install from
CI and let the promtool-backed tests skip wherever promtool is absent; the
pure exposition checks still run everywhere. Give createLadder a named
Ladder return type, tighten the README wording on minted handles, and list
the app modules that need an Effect adapter against this package.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ges ENG-17074

deployments, curves and periphery already have 0.1.0-alpha.0 on the registry, so
the candidate moves to 0.1.0-alpha.1 with every exact pin, the release plan and
the release notes following; cli stays 0.1.0-alpha.0 because it has never been
published. Record the registry dist-tag state and the release-owner decision on
`latest`, and hold the Core-lineage atom packages out of the plan until the
application-lineage rebuild lands.

Also: envelope metadata reports the SDK as its source package now that the SDK
owns the builders; the triple-id helpers return to the SDK root beside
calculateAtomId (the app imports them there); document the getConfig return type
change in the protocol migration notes and the envelope builders in the SDK README.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
# Conflicts:
#	docs/release.md
#	packages/iid-ladder/README.md
#	release-plan.json
#	scripts/package-registry.mjs
#	scripts/package-registry.test.mjs
…sts ENG-17074

Bun does not rewrite workspace dependency range strings on an incremental
install, so the cli, periphery and sdk entries still carried the old
0.1.0 and 4.0.0 ranges. Patch exactly those strings to the manifest values;
frozen and incremental installs both report no changes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant