@vellumai/plugin-api 0.11.10-dev.202609100223.953b0c6 → 0.11.10-dev.202609100822.c03f0a4
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 +28 -0
- package/index.js +1 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -4238,6 +4238,18 @@ declare interface BaseSubscriberEntry {
|
|
|
4238
4238
|
*/
|
|
4239
4239
|
export declare function buildMessageExcerpt(rawContent: string, query: string): Promise<string>;
|
|
4240
4240
|
|
|
4241
|
+
/**
|
|
4242
|
+
* The turn-cancellation guard every side-effecting tool calls, host tools and
|
|
4243
|
+
* plugin tools alike. It lives on the plugin API surface because that is the
|
|
4244
|
+
* only module a plugin may import from, and the guard must be one
|
|
4245
|
+
* implementation rather than a copy per side of the boundary.
|
|
4246
|
+
*/
|
|
4247
|
+
/** The slice of a tool's context this guard reads. */
|
|
4248
|
+
export declare interface CancellableToolContext {
|
|
4249
|
+
/** Cooperative cancellation signal for the turn, when the caller supplies one. */
|
|
4250
|
+
signal?: AbortSignal;
|
|
4251
|
+
}
|
|
4252
|
+
|
|
4241
4253
|
/**
|
|
4242
4254
|
* Conversation-type axis within an adapter (the "channel-type" cascade
|
|
4243
4255
|
* level): direct message, private channel/group, public channel. Adapters
|
|
@@ -7410,6 +7422,22 @@ export declare interface ThinkingContent {
|
|
|
7410
7422
|
signature: string;
|
|
7411
7423
|
}
|
|
7412
7424
|
|
|
7425
|
+
/**
|
|
7426
|
+
* Stop a side-effecting tool whose turn was cancelled before it acted.
|
|
7427
|
+
*
|
|
7428
|
+
* Call this immediately before the step that changes something the user would
|
|
7429
|
+
* notice: a write, a create/update/delete, a message send, a process spawn, a
|
|
7430
|
+
* paid provider call. The agent loop tells the model an aborted batch was
|
|
7431
|
+
* cancelled, so anything that lands after the abort is work the model believes
|
|
7432
|
+
* never happened.
|
|
7433
|
+
*
|
|
7434
|
+
* Throws the signal's own reason, which is the daemon's tagged abort reason
|
|
7435
|
+
* for a conversation abort and a `DOMException` named `AbortError` for a plain
|
|
7436
|
+
* one. The tool executor recognizes both and reports the call as an expected
|
|
7437
|
+
* cancellation rather than a tool failure.
|
|
7438
|
+
*/
|
|
7439
|
+
export declare function throwIfCancelled(context: CancellableToolContext): void;
|
|
7440
|
+
|
|
7413
7441
|
/** Discriminated container so future tools can add their own metadata. */
|
|
7414
7442
|
declare interface ToolActivityMetadata {
|
|
7415
7443
|
webSearch?: WebSearchMetadata;
|
package/index.js
CHANGED
|
@@ -61,4 +61,5 @@ export const stringifyMessageContent = api.stringifyMessageContent;
|
|
|
61
61
|
export const sweepOrphanedGraphNodePoints = api.sweepOrphanedGraphNodePoints;
|
|
62
62
|
export const syncMessageToDisk = api.syncMessageToDisk;
|
|
63
63
|
export const synthesizeText = api.synthesizeText;
|
|
64
|
+
export const throwIfCancelled = api.throwIfCancelled;
|
|
64
65
|
export const updateMessageMetadata = api.updateMessageMetadata;
|
package/package.json
CHANGED