You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AfterCommandHookContext gives a command-level view but no item-level before/after state, so extensions cannot reliably detect status transitions (e.g. draft → open, open → canceled).
Current shape (SDK 2026.5.31, core/extensions/extension-types.d.ts)
result is unknown and there is no previousStatus / prior front-matter snapshot.
Why it matters
Lifecycle/notification extensions (e.g. pm-slack) want to fire on the transition, not just the terminal state. Today, on pm update --status open, an afterCommand hook can read the new status from options/result but cannot know the item was previously draft, so it can't distinguish reopen vs open vs unblock. The detection logic ends up forward-compatible-but-inert.
Proposed
Add to AfterCommandHookContext (or a typed result) the affected item id(s) plus a previousStatus/previous front-matter snapshot and the resulting status — e.g.:
This is additive (optional field) and unlocks transition-aware notifications/automation. Distinct from #104 (onWrite ctx identity) — this is the command hook surface.
Fixed by PR #109, merged as 98899d0. afterCommand now exposes additive affected item transition context for create/update/restore/delete, including previous_status/status, changed_fields, and compact previous/current snapshots without requiring extensions to parse command results.
Activity
unbraind commentedon Jun 4, 2026
Fixed by PR #109, merged as 98899d0. afterCommand now exposes additive affected item transition context for create/update/restore/delete, including previous_status/status, changed_fields, and compact previous/current snapshots without requiring extensions to parse command results.
unbraind commentedon Jul 11, 2026
pm tracker item:
pm-e9ut— SDK extension hook context and manifest capability guardrails