@vellumai/plugin-api 0.11.10-dev.202609100918.0821a35 → 0.11.10-dev.202609101415.05cbbf9
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 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -4849,6 +4849,7 @@ export declare type HookBroadcast = (detail: Record<string, unknown>) => void;
|
|
|
4849
4849
|
* - `post-model-call` — {@link PostModelCallContext}
|
|
4850
4850
|
* - `conversation-deleted` — {@link ConversationDeletedContext}
|
|
4851
4851
|
* - `conversations-cleared` — {@link ConversationsClearedContext}
|
|
4852
|
+
* - `message-deleted`: {@link MessageDeletedContext}
|
|
4852
4853
|
*/
|
|
4853
4854
|
export declare type HookFunction<TCtx = unknown> = (ctx: TCtx) => Promise<Partial<TCtx> | void>;
|
|
4854
4855
|
|
|
@@ -4890,6 +4891,8 @@ export declare const HOOKS: {
|
|
|
4890
4891
|
readonly CONVERSATION_DELETED: "conversation-deleted";
|
|
4891
4892
|
/** Fires once when every conversation is wiped at once (the clear-all reset), after the main tables are cleared. Carries no `conversationId`; cleanup hooks wipe their own per-conversation state wholesale. */
|
|
4892
4893
|
readonly CONVERSATIONS_CLEARED: "conversations-cleared";
|
|
4894
|
+
/** Fires once per deleted message row, after the row is removed, carrying the row's `(createdAt, id)` so a hook can settle state that pointed at it. Fire-and-forget cleanup signal, like `conversation-deleted`; whole-conversation deletes dispatch that hook instead. */
|
|
4895
|
+
readonly MESSAGE_DELETED: "message-deleted";
|
|
4893
4896
|
};
|
|
4894
4897
|
|
|
4895
4898
|
/**
|
|
@@ -5535,6 +5538,37 @@ export declare interface Message {
|
|
|
5535
5538
|
content: ContentBlock[];
|
|
5536
5539
|
}
|
|
5537
5540
|
|
|
5541
|
+
/**
|
|
5542
|
+
* The full `message-deleted` context a hook receives: the dispatching call
|
|
5543
|
+
* site's {@link MessageDeletedInputContext} plus the pipeline-stamped
|
|
5544
|
+
* {@link BaseHookContext} capabilities.
|
|
5545
|
+
*/
|
|
5546
|
+
export declare interface MessageDeletedContext extends MessageDeletedInputContext, BaseHookContext {
|
|
5547
|
+
}
|
|
5548
|
+
|
|
5549
|
+
/**
|
|
5550
|
+
* Context passed to the `message-deleted` hook. Fires once per deleted
|
|
5551
|
+
* message row, from the shared single-message delete primitive, after the row
|
|
5552
|
+
* is removed. Whole-conversation deletes dispatch `conversation-deleted`
|
|
5553
|
+
* instead.
|
|
5554
|
+
*
|
|
5555
|
+
* Fire-and-forget like `conversation-deleted`: the primitive is synchronous
|
|
5556
|
+
* and does not wait for the chain. The row is gone by the time a hook runs,
|
|
5557
|
+
* so the context carries the row's `createdAt` alongside its id. Together
|
|
5558
|
+
* they are the `(createdAt, id)` position the row held, which is what a hook
|
|
5559
|
+
* keeping a cursor on that row needs to record once the row can no longer be
|
|
5560
|
+
* looked up. The default memory plugin contributes a hook here that stamps
|
|
5561
|
+
* its retrospective cursor.
|
|
5562
|
+
*/
|
|
5563
|
+
declare interface MessageDeletedInputContext {
|
|
5564
|
+
/** ID of the conversation that owned the row. */
|
|
5565
|
+
readonly conversationId: string;
|
|
5566
|
+
/** ID of the deleted message row. */
|
|
5567
|
+
readonly messageId: string;
|
|
5568
|
+
/** The deleted row's `createdAt`. */
|
|
5569
|
+
readonly createdAt: number;
|
|
5570
|
+
}
|
|
5571
|
+
|
|
5538
5572
|
declare type MessageLexicalSearchResult = Awaited<ReturnType<searchMessageIdsLexical_2>>[number];
|
|
5539
5573
|
|
|
5540
5574
|
declare interface MessageLexicalSearchResult_2 {
|
package/package.json
CHANGED