@vellumai/plugin-api 0.11.11-staging.2 → 0.11.11-staging.4
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 +79 -0
- package/index.js +2 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1375,6 +1375,7 @@ declare const AssistantEventEnvelopeSchema: z.ZodObject<{
|
|
|
1375
1375
|
reason: z.ZodEnum<{
|
|
1376
1376
|
thinking_delta: "thinking_delta";
|
|
1377
1377
|
message_dequeued: "message_dequeued";
|
|
1378
|
+
message_interrupted: "message_interrupted";
|
|
1378
1379
|
first_text_delta: "first_text_delta";
|
|
1379
1380
|
tool_use_start: "tool_use_start";
|
|
1380
1381
|
preview_start: "preview_start";
|
|
@@ -2049,6 +2050,10 @@ declare const AssistantEventEnvelopeSchema: z.ZodObject<{
|
|
|
2049
2050
|
filePath: z.ZodOptional<z.ZodString>;
|
|
2050
2051
|
}, z.core.$strip>>>;
|
|
2051
2052
|
attachmentWarnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2053
|
+
assistantTextVisibility: z.ZodOptional<z.ZodEnum<{
|
|
2054
|
+
private: "private";
|
|
2055
|
+
visible: "visible";
|
|
2056
|
+
}>>;
|
|
2052
2057
|
}, z.core.$strip>, z.ZodObject<{
|
|
2053
2058
|
type: z.ZodLiteral<"message_dequeued">;
|
|
2054
2059
|
conversationId: z.ZodString;
|
|
@@ -2898,6 +2903,7 @@ declare const AssistantEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2898
2903
|
reason: z.ZodEnum<{
|
|
2899
2904
|
thinking_delta: "thinking_delta";
|
|
2900
2905
|
message_dequeued: "message_dequeued";
|
|
2906
|
+
message_interrupted: "message_interrupted";
|
|
2901
2907
|
first_text_delta: "first_text_delta";
|
|
2902
2908
|
tool_use_start: "tool_use_start";
|
|
2903
2909
|
preview_start: "preview_start";
|
|
@@ -3572,6 +3578,10 @@ declare const AssistantEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
3572
3578
|
filePath: z.ZodOptional<z.ZodString>;
|
|
3573
3579
|
}, z.core.$strip>>>;
|
|
3574
3580
|
attachmentWarnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3581
|
+
assistantTextVisibility: z.ZodOptional<z.ZodEnum<{
|
|
3582
|
+
private: "private";
|
|
3583
|
+
visible: "visible";
|
|
3584
|
+
}>>;
|
|
3575
3585
|
}, z.core.$strip>, z.ZodObject<{
|
|
3576
3586
|
type: z.ZodLiteral<"message_dequeued">;
|
|
3577
3587
|
conversationId: z.ZodString;
|
|
@@ -4238,6 +4248,18 @@ declare interface BaseSubscriberEntry {
|
|
|
4238
4248
|
*/
|
|
4239
4249
|
export declare function buildMessageExcerpt(rawContent: string, query: string): Promise<string>;
|
|
4240
4250
|
|
|
4251
|
+
/**
|
|
4252
|
+
* The turn-cancellation guard every side-effecting tool calls, host tools and
|
|
4253
|
+
* plugin tools alike. It lives on the plugin API surface because that is the
|
|
4254
|
+
* only module a plugin may import from, and the guard must be one
|
|
4255
|
+
* implementation rather than a copy per side of the boundary.
|
|
4256
|
+
*/
|
|
4257
|
+
/** The slice of a tool's context this guard reads. */
|
|
4258
|
+
export declare interface CancellableToolContext {
|
|
4259
|
+
/** Cooperative cancellation signal for the turn, when the caller supplies one. */
|
|
4260
|
+
signal?: AbortSignal;
|
|
4261
|
+
}
|
|
4262
|
+
|
|
4241
4263
|
/**
|
|
4242
4264
|
* Conversation-type axis within an adapter (the "channel-type" cascade
|
|
4243
4265
|
* level): direct message, private channel/group, public channel. Adapters
|
|
@@ -5611,6 +5633,7 @@ declare const messageMetadataSchema: z.ZodObject<{
|
|
|
5611
5633
|
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
5612
5634
|
voiceSessionTurn: z.ZodOptional<z.ZodBoolean>;
|
|
5613
5635
|
messageKind: z.ZodOptional<z.ZodString>;
|
|
5636
|
+
assistantTextVisibility: z.ZodOptional<z.ZodString>;
|
|
5614
5637
|
providerErrorCode: z.ZodOptional<z.ZodString>;
|
|
5615
5638
|
providerErrorCategory: z.ZodOptional<z.ZodString>;
|
|
5616
5639
|
backgroundToolCompletion: z.ZodOptional<z.ZodObject<{
|
|
@@ -5631,6 +5654,7 @@ declare const messageMetadataSchema: z.ZodObject<{
|
|
|
5631
5654
|
forkSourceMessageId: z.ZodOptional<z.ZodString>;
|
|
5632
5655
|
imageSourcePaths: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
5633
5656
|
attachmentStoredPaths: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
5657
|
+
interruptedPriorTurn: z.ZodOptional<z.ZodBoolean>;
|
|
5634
5658
|
memoryInjectedBlock: z.ZodOptional<z.ZodString>;
|
|
5635
5659
|
memoryV3InjectedBlock: z.ZodOptional<z.ZodString>;
|
|
5636
5660
|
memoryV3InjectedBlockFormat: z.ZodOptional<z.ZodNumber>;
|
|
@@ -5731,6 +5755,17 @@ export declare function parseMessageMetadata(metadataJson: string | null): Promi
|
|
|
5731
5755
|
*/
|
|
5732
5756
|
declare function parseMessageMetadata_2(metadataJson: string | null): MessageMetadata_2 | undefined;
|
|
5733
5757
|
|
|
5758
|
+
/**
|
|
5759
|
+
* Read the `surfaceId` out of a `ui_show` tool result, or `undefined` when the
|
|
5760
|
+
* content is not a surface envelope.
|
|
5761
|
+
*
|
|
5762
|
+
* Trailing prose after the JSON object is tolerated: guidance belongs in a
|
|
5763
|
+
* `note` field, but a caller that appends it instead must not silently cost
|
|
5764
|
+
* the reader its `surfaceId`: losing the id makes a live progress surface
|
|
5765
|
+
* invisible to the completion nudge, and the user watches it spin forever.
|
|
5766
|
+
*/
|
|
5767
|
+
export declare function parseSurfaceShowResultId(content: string): string | undefined;
|
|
5768
|
+
|
|
5734
5769
|
/**
|
|
5735
5770
|
* Plugin-facing facade over the host's system-card writer: a daemon-authored
|
|
5736
5771
|
* transcript notice, persisted as an assistant row stamped
|
|
@@ -5936,6 +5971,28 @@ declare interface PostModelCallInputContext {
|
|
|
5936
5971
|
messages: Message[];
|
|
5937
5972
|
/** Provider-reported stop reason for the turn; `null` when not reported. */
|
|
5938
5973
|
readonly stopReason: string | null;
|
|
5974
|
+
/**
|
|
5975
|
+
* True when this run's plain assistant text does not reach the user: the
|
|
5976
|
+
* turn routes its reply through the `send_user_message` tool instead, and
|
|
5977
|
+
* {@link content}'s text blocks are private working notes. A hook that
|
|
5978
|
+
* decides whether the user was answered must read this rather than assume
|
|
5979
|
+
* visible text was delivered. Absent or false on every ordinary run, so a
|
|
5980
|
+
* hook reads it as `=== true`.
|
|
5981
|
+
*/
|
|
5982
|
+
readonly assistantTextSuppressed?: boolean;
|
|
5983
|
+
/**
|
|
5984
|
+
* Whether the user has already been told the OUTCOME of this run's work,
|
|
5985
|
+
* decided by the host so a hook cannot reach a different answer than the
|
|
5986
|
+
* loop does.
|
|
5987
|
+
*
|
|
5988
|
+
* True when the last response that called any tool reported on the work
|
|
5989
|
+
* before it: every one of its tool calls delivered a message to the user. A
|
|
5990
|
+
* response that sends a message alongside other tool calls is a progress
|
|
5991
|
+
* update, and a call the executor rejects (blank or non-string message)
|
|
5992
|
+
* delivers nothing, so neither counts. Absent on a host that does not
|
|
5993
|
+
* compute it, so a hook reads it as `=== true`.
|
|
5994
|
+
*/
|
|
5995
|
+
readonly userToldOutcome?: boolean;
|
|
5939
5996
|
/**
|
|
5940
5997
|
* The provider rejection that ended the call, on a rejection outcome. Absent
|
|
5941
5998
|
* on a finalized reply. A hook that recovers from a specific rejection class
|
|
@@ -7399,6 +7456,22 @@ export declare interface ThinkingContent {
|
|
|
7399
7456
|
signature: string;
|
|
7400
7457
|
}
|
|
7401
7458
|
|
|
7459
|
+
/**
|
|
7460
|
+
* Stop a side-effecting tool whose turn was cancelled before it acted.
|
|
7461
|
+
*
|
|
7462
|
+
* Call this immediately before the step that changes something the user would
|
|
7463
|
+
* notice: a write, a create/update/delete, a message send, a process spawn, a
|
|
7464
|
+
* paid provider call. The agent loop tells the model an aborted batch was
|
|
7465
|
+
* cancelled, so anything that lands after the abort is work the model believes
|
|
7466
|
+
* never happened.
|
|
7467
|
+
*
|
|
7468
|
+
* Throws the signal's own reason, which is the daemon's tagged abort reason
|
|
7469
|
+
* for a conversation abort and a `DOMException` named `AbortError` for a plain
|
|
7470
|
+
* one. The tool executor recognizes both and reports the call as an expected
|
|
7471
|
+
* cancellation rather than a tool failure.
|
|
7472
|
+
*/
|
|
7473
|
+
export declare function throwIfCancelled(context: CancellableToolContext): void;
|
|
7474
|
+
|
|
7402
7475
|
/** Discriminated container so future tools can add their own metadata. */
|
|
7403
7476
|
declare interface ToolActivityMetadata {
|
|
7404
7477
|
webSearch?: WebSearchMetadata;
|
|
@@ -7491,6 +7564,12 @@ export declare interface ToolContext {
|
|
|
7491
7564
|
* @legacy
|
|
7492
7565
|
*/
|
|
7493
7566
|
diskPressureCleanupModeActive?: boolean;
|
|
7567
|
+
/**
|
|
7568
|
+
* Whether this turn routes its user-facing text through `send_user_message`.
|
|
7569
|
+
* Read by the cleanup-mode gate, which keeps that tool callable on a gated
|
|
7570
|
+
* turn: the wire offers it, so the executor must not refuse it.
|
|
7571
|
+
*/
|
|
7572
|
+
sendUserMessageActive?: boolean;
|
|
7494
7573
|
/**
|
|
7495
7574
|
* Prompt the user for a secret value via native SecureField UI.
|
|
7496
7575
|
* @legacy
|
package/index.js
CHANGED
|
@@ -42,6 +42,7 @@ export const listInstalledSkills = api.listInstalledSkills;
|
|
|
42
42
|
export const mediaBlockAttachmentId = api.mediaBlockAttachmentId;
|
|
43
43
|
export const openTranscriptionSession = api.openTranscriptionSession;
|
|
44
44
|
export const parseMessageMetadata = api.parseMessageMetadata;
|
|
45
|
+
export const parseSurfaceShowResultId = api.parseSurfaceShowResultId;
|
|
45
46
|
export const persistSystemCard = api.persistSystemCard;
|
|
46
47
|
export const publishEvent = api.publishEvent;
|
|
47
48
|
export const quarantineRefusedExchanges = api.quarantineRefusedExchanges;
|
|
@@ -60,4 +61,5 @@ export const stringifyMessageContent = api.stringifyMessageContent;
|
|
|
60
61
|
export const sweepOrphanedGraphNodePoints = api.sweepOrphanedGraphNodePoints;
|
|
61
62
|
export const syncMessageToDisk = api.syncMessageToDisk;
|
|
62
63
|
export const synthesizeText = api.synthesizeText;
|
|
64
|
+
export const throwIfCancelled = api.throwIfCancelled;
|
|
63
65
|
export const updateMessageMetadata = api.updateMessageMetadata;
|