@vellumai/plugin-api 0.10.3-dev.202606301343.ebf8f0b → 0.10.3-dev.202606301500.9739193

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.d.ts +21 -9
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -3646,22 +3646,34 @@ declare interface ShowPlatformLogin {
3646
3646
  }
3647
3647
 
3648
3648
  /**
3649
- * Context passed to the `shutdown` hook during daemon teardown. Kept
3650
- * intentionally narrower than {@link InitContext} — most teardown
3651
- * paths only need to know which assistant version they're shutting
3652
- * down against (e.g. for version-conditional cleanup of state files
3653
- * written by a previous boot).
3649
+ * Context passed to the `shutdown` hook. Kept intentionally narrower than
3650
+ * {@link InitContext} — teardown paths only need to know which assistant
3651
+ * version they're shutting down against (e.g. for version-conditional cleanup
3652
+ * of state files written by a previous boot) and {@link ShutdownReason why}
3653
+ * they're being torn down (so a plugin can, e.g., delete its state on
3654
+ * `uninstall` but preserve it across a plain `shutdown`).
3654
3655
  *
3655
- * Additional fields may be added as concrete plugin needs surface; the
3656
- * `assistantVersion` field mirrors the init context's so plugins that
3657
- * stash a version stamp at init can compare against the same name on
3658
- * tear-down without keeping their own copy.
3656
+ * The `assistantVersion` field mirrors the init context's so plugins that stash
3657
+ * a version stamp at init can compare against the same name on tear-down
3658
+ * without keeping their own copy.
3659
3659
  */
3660
3660
  export declare interface ShutdownContext {
3661
3661
  /** Assistant semver for compatibility checks inside the plugin. */
3662
3662
  assistantVersion: string;
3663
+ /** Why the plugin is shutting down. */
3664
+ reason: ShutdownReason;
3663
3665
  }
3664
3666
 
3667
+ /**
3668
+ * Why a plugin's `shutdown` hook is firing.
3669
+ *
3670
+ * - `shutdown` — the daemon is tearing down (process exit).
3671
+ * - `uninstall` — the plugin's directory was removed at runtime.
3672
+ * - `disable` — the plugin was disabled at runtime (e.g. a `.disabled`
3673
+ * sentinel was added, or a feature flag turned it off).
3674
+ */
3675
+ declare type ShutdownReason = "shutdown" | "uninstall" | "disable";
3676
+
3665
3677
  declare interface SignBundlePayloadRequest {
3666
3678
  type: "sign_bundle_payload";
3667
3679
  requestId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vellumai/plugin-api",
3
- "version": "0.10.3-dev.202606301343.ebf8f0b",
3
+ "version": "0.10.3-dev.202606301500.9739193",
4
4
  "description": "Public TypeScript authoring contract for Vellum assistant plugins.",
5
5
  "license": "MIT",
6
6
  "type": "module",