feat(client): the eleven package-lifecycle methods (#3563 PR-4) - #3577
Merged
Conversation
client.packages grows from install/enable to the full lifecycle the server has shipped across three ADR generations, every shape mirrored from domains/packages.ts: - update(id, patch) — PATCH /packages/:id (manifest: name / description / version; identity and lifecycle state not editable) - publish(id, opts?) — POST /:id/publish - publishDrafts(id, opts?) — POST /:id/publish-drafts (ADR-0033 whole-app promotion; seed drafts materialize rows via seedApplied) - discardDrafts(id, opts?) — POST /:id/discard-drafts - listCommits(id) — GET /:id/commits (ADR-0067, newest-first) - revertCommit(id, commitId) — POST /:id/commits/:commitId/revert - rollback(id, commitId) — POST /:id/rollback (commitId required — server 400s without it) - revert(id) — POST /:id/revert (to last published) - export(id) — GET /:id/export (ADR-0070 portable manifest, marketplace-install-local shape) - adoptOrphans(id, opts?) — POST /:id/adopt-orphans (ADR-0070 D5) - duplicate(id, targetPackageId, opts?) — POST /:id/duplicate (ADR-0070 D4) All eleven routes existed with no SDK expression — Studio reached them via raw fetch. Ledger flips all eleven rows to sdk; the gap ratchet drops 17 → 6 (from 27 at the start of the audit). Docs-site packages row now reflects the real method count. Verified: client 140 passed (11 new), ledger guard both halves green, eslint clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LX9ut3MK3KykE11S9bJmv5
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
📓 Docs Drift CheckThis PR changes 2 package(s): 26 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
os-zhuang
marked this pull request as ready for review
July 27, 2026 07:48
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.
PR-4 of #3563: the packages batch — the largest remaining block. Gap ratchet: 17 → 6 (from 27 at the start of the audit).
The gap
client.packagesexpressed 6 of the domain's 17 routes (list/get/install/uninstall/enable/disable). The other eleven — three ADR generations of lifecycle — existed server-side with no SDK expression; Studio reaches them via rawfetchtoday.The surface
Every shape mirrored from
domains/packages.ts(read in full):update(id, patch)PATCH /packages/:id— manifest name/description/version; identity + lifecycle state not editablepublish(id, opts?)POST /:id/publishpublishDrafts(id, opts?)POST /:id/publish-drafts— whole-app draft promotion; seed drafts materialize rows (seedApplied)discardDrafts(id, opts?)POST /:id/discard-draftslistCommits(id)GET /:id/commits— timeline, newest-firstrevertCommit(id, commitId, opts?)POST /:id/commits/:commitId/revert— the revert is itself a commitrollback(id, commitId, opts?)POST /:id/rollback—commitIdrequired (server 400s without it)revert(id)POST /:id/revert— to last published stateexport(id)GET /:id/export— portable manifest,marketplace-install-localshapeadoptOrphans(id, opts?)POST /:id/adopt-orphans— rebind package-less metadataduplicate(id, targetPackageId, opts?)POST /:id/duplicate— clone + re-namespaceLedger + docs
gap→sdk; the conformance ratchet drops to 6.Remaining 6 gaps after this PR:
metadrafts/published/FSM (3) +automationdescriptors (3).Test plan
commitId, URL-encoding of both path params inrevertCommit, portable-manifest GET, duplicate's requiredtargetPackageId+ renaming options.🤖 Generated with Claude Code
https://claude.ai/code/session_01LX9ut3MK3KykE11S9bJmv5
Generated by Claude Code