Skip to content

feat(client): the eleven package-lifecycle methods (#3563 PR-4) - #3577

Merged
os-zhuang merged 1 commit into
mainfrom
claude/screen-flow-submit-resume-v9dqjx
Jul 27, 2026
Merged

feat(client): the eleven package-lifecycle methods (#3563 PR-4)#3577
os-zhuang merged 1 commit into
mainfrom
claude/screen-flow-submit-resume-v9dqjx

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

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.packages expressed 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 raw fetch today.

The surface

Every shape mirrored from domains/packages.ts (read in full):

Method Route ADR
update(id, patch) PATCH /packages/:id — manifest name/description/version; identity + lifecycle state not editable
publish(id, opts?) POST /:id/publish
publishDrafts(id, opts?) POST /:id/publish-drafts — whole-app draft promotion; seed drafts materialize rows (seedApplied) 0033
discardDrafts(id, opts?) POST /:id/discard-drafts 0033
listCommits(id) GET /:id/commits — timeline, newest-first 0067
revertCommit(id, commitId, opts?) POST /:id/commits/:commitId/revert — the revert is itself a commit 0067
rollback(id, commitId, opts?) POST /:id/rollbackcommitId required (server 400s without it) 0067
revert(id) POST /:id/revert — to last published state
export(id) GET /:id/export — portable manifest, marketplace-install-local shape 0070
adoptOrphans(id, opts?) POST /:id/adopt-orphans — rebind package-less metadata 0070 D5
duplicate(id, targetPackageId, opts?) POST /:id/duplicate — clone + re-namespace 0070 D4

Ledger + docs

  • All eleven rows flip gapsdk; the conformance ratchet drops to 6.
  • Docs-site packages row updated from the stale "6 methods" to the real 17, naming the three ADR generations.

Remaining 6 gaps after this PR: meta drafts/published/FSM (3) + automation descriptors (3).

Test plan

  • 11 new unit tests: route shapes, PATCH body passthrough, required commitId, URL-encoding of both path params in revertCommit, portable-manifest GET, duplicate's required targetPackageId + renaming options.
  • Client suite 140 passed; both ledger-guard halves green; ESLint clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LX9ut3MK3KykE11S9bJmv5


Generated by Claude Code

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
@vercel

vercel Bot commented Jul 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
objectstack Ignored Ignored Jul 27, 2026 7:39am

Request Review

@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tests tooling labels Jul 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 2 package(s): @objectstack/client, @objectstack/runtime.

26 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:

  • content/docs/ai/skills-reference.mdx (via packages/client)
  • content/docs/api/client-sdk.mdx (via @objectstack/client, packages/runtime)
  • content/docs/api/data-flow.mdx (via @objectstack/client)
  • content/docs/api/environment-routing.mdx (via @objectstack/client)
  • content/docs/api/error-catalog.mdx (via @objectstack/client)
  • content/docs/api/index.mdx (via @objectstack/runtime)
  • content/docs/api/wire-format.mdx (via @objectstack/runtime)
  • content/docs/automation/hook-bodies.mdx (via @objectstack/runtime)
  • content/docs/concepts/north-star.mdx (via packages/runtime)
  • content/docs/data-modeling/drivers.mdx (via @objectstack/runtime)
  • content/docs/deployment/index.mdx (via @objectstack/runtime)
  • content/docs/deployment/production-readiness.mdx (via @objectstack/runtime)
  • content/docs/deployment/single-project-mode.mdx (via @objectstack/runtime)
  • content/docs/deployment/vercel.mdx (via @objectstack/runtime)
  • content/docs/getting-started/your-first-project.mdx (via @objectstack/client, @objectstack/runtime)
  • content/docs/kernel/runtime-services/data-service.mdx (via packages/client)
  • content/docs/kernel/runtime-services/index.mdx (via packages/client)
  • content/docs/permissions/authentication.mdx (via @objectstack/client, @objectstack/runtime)
  • content/docs/permissions/authorization.mdx (via packages/runtime)
  • content/docs/plugins/packages.mdx (via @objectstack/client, @objectstack/runtime)
  • content/docs/protocol/kernel/http-protocol.mdx (via @objectstack/runtime)
  • content/docs/protocol/kernel/index.mdx (via @objectstack/runtime)
  • content/docs/protocol/kernel/lifecycle.mdx (via @objectstack/runtime)
  • content/docs/protocol/kernel/realtime-protocol.mdx (via @objectstack/client)
  • content/docs/releases/implementation-status.mdx (via @objectstack/client, @objectstack/runtime)
  • content/docs/releases/v16.mdx (via @objectstack/client)

Advisory only. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs origin/main → pass the list as args.docs.

@os-zhuang
os-zhuang marked this pull request as ready for review July 27, 2026 07:48
@os-zhuang
os-zhuang merged commit e295ad1 into main Jul 27, 2026
16 checks passed
@os-zhuang
os-zhuang deleted the claude/screen-flow-submit-resume-v9dqjx branch July 27, 2026 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tests tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants