@vellumai/plugin-api 0.10.5-dev.202607061707.15e4796 → 0.10.5-dev.202607061926.ed098d0
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.
- package/index.d.ts +34 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1011,6 +1011,33 @@ declare interface ContextCompacted {
|
|
|
1011
1011
|
summaryHadMemoryEcho?: boolean;
|
|
1012
1012
|
}
|
|
1013
1013
|
|
|
1014
|
+
/**
|
|
1015
|
+
* The full `conversation-deleted` context a hook receives — the dispatching
|
|
1016
|
+
* call site's {@link ConversationDeletedInputContext} plus the
|
|
1017
|
+
* pipeline-stamped {@link BaseHookContext} capabilities.
|
|
1018
|
+
*/
|
|
1019
|
+
export declare interface ConversationDeletedContext extends ConversationDeletedInputContext, BaseHookContext {
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
/**
|
|
1023
|
+
* Context passed to the `conversation-deleted` hook. Fires once per deleted
|
|
1024
|
+
* conversation — from the shared delete primitives, so every delete caller
|
|
1025
|
+
* (route, retrospective cleanup, GC) dispatches it — after the conversation's
|
|
1026
|
+
* rows are removed.
|
|
1027
|
+
*
|
|
1028
|
+
* The dispatch is fire-and-forget: the delete primitives are synchronous and
|
|
1029
|
+
* do not wait for the chain, so hooks run concurrently with whatever the
|
|
1030
|
+
* caller does after the delete and must not assume any ordering relative to
|
|
1031
|
+
* it. By the time a hook runs, the conversation's rows (messages, segments,
|
|
1032
|
+
* attachments, the conversation itself) are gone — a hook can only key its
|
|
1033
|
+
* cleanup on the id. The default memory plugin contributes a hook here that
|
|
1034
|
+
* fails its own still-pending background jobs referencing the conversation.
|
|
1035
|
+
*/
|
|
1036
|
+
declare interface ConversationDeletedInputContext {
|
|
1037
|
+
/** ID of the conversation that was deleted. */
|
|
1038
|
+
readonly conversationId: string;
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1014
1041
|
declare type ConversationErrorEvent = z.infer<typeof ConversationErrorEventSchema>;
|
|
1015
1042
|
|
|
1016
1043
|
declare const ConversationErrorEventSchema: z.ZodObject<{
|
|
@@ -1905,6 +1932,7 @@ declare const HookEventSchema: z.ZodObject<{
|
|
|
1905
1932
|
* - `post-tool-use` — {@link PostToolUseContext}
|
|
1906
1933
|
* - `stop` — {@link StopContext}
|
|
1907
1934
|
* - `post-model-call` — {@link PostModelCallContext}
|
|
1935
|
+
* - `conversation-deleted` — {@link ConversationDeletedContext}
|
|
1908
1936
|
*/
|
|
1909
1937
|
export declare type HookFunction<TCtx = unknown> = (ctx: TCtx) => Promise<Partial<TCtx> | void>;
|
|
1910
1938
|
|
|
@@ -1942,6 +1970,8 @@ export declare const HOOKS: {
|
|
|
1942
1970
|
readonly POST_MODEL_CALL: "post-model-call";
|
|
1943
1971
|
/** Fires after the loop successfully compacts a conversation mid-turn. */
|
|
1944
1972
|
readonly POST_COMPACT: "post-compact";
|
|
1973
|
+
/** Fires once per deleted conversation, after its rows are removed. Fire-and-forget cleanup signal — hooks run async with no ordering guarantee relative to the caller. */
|
|
1974
|
+
readonly CONVERSATION_DELETED: "conversation-deleted";
|
|
1945
1975
|
};
|
|
1946
1976
|
|
|
1947
1977
|
declare interface HostAppControlCancel {
|
|
@@ -3637,8 +3667,11 @@ export declare interface ShutdownContext {
|
|
|
3637
3667
|
* - `uninstall` — the plugin's directory was removed at runtime.
|
|
3638
3668
|
* - `disable` — the plugin was disabled at runtime (e.g. a `.disabled`
|
|
3639
3669
|
* sentinel was added, or a feature flag turned it off).
|
|
3670
|
+
* - `reload` — a source file inside the plugin directory changed and the
|
|
3671
|
+
* plugin is being redeployed in place; the old version's `shutdown` runs
|
|
3672
|
+
* before the new version is imported and its `init` fires.
|
|
3640
3673
|
*/
|
|
3641
|
-
declare type ShutdownReason = "shutdown" | "uninstall" | "disable";
|
|
3674
|
+
declare type ShutdownReason = "shutdown" | "uninstall" | "disable" | "reload";
|
|
3642
3675
|
|
|
3643
3676
|
declare interface SignBundlePayloadRequest {
|
|
3644
3677
|
type: "sign_bundle_payload";
|
package/package.json
CHANGED