@vellumai/plugin-api 0.12.1-dev.202609161417.90ecd78 → 0.12.1-dev.202609161617.3bb194e

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 (3) hide show
  1. package/index.d.ts +28 -0
  2. package/index.js +3 -0
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -4767,6 +4767,12 @@ export declare function getConversationDirPath(id: string, createdAtMs: number):
4767
4767
  */
4768
4768
  export declare function getConversationProcessingStartedAt(id: string): Promise<number | null>;
4769
4769
 
4770
+ /**
4771
+ * The tool definitions the conversation's most recent live turn sent to the
4772
+ * provider, or `null` when none has been recorded.
4773
+ */
4774
+ export declare function getConversationToolSurface(conversationId: string): Promise<ToolDefinition_2[] | null>;
4775
+
4770
4776
  /** Fetch one document from the calling plugin's index, or null. */
4771
4777
  export declare function getDocument(documentId: string): Promise<IndexedDocument | null>;
4772
4778
 
@@ -5896,6 +5902,11 @@ export declare interface PluginLogger {
5896
5902
  debug(obj: Record<string, unknown>, msg?: string): void;
5897
5903
  }
5898
5904
 
5905
+ export declare class PluginTurnNotAdmittedError extends Error {
5906
+ readonly reason: string;
5907
+ constructor(reason: string);
5908
+ }
5909
+
5899
5910
  /**
5900
5911
  * The full `post-compact` context a hook receives — the dispatching call
5901
5912
  * site's {@link PostCompactInputContext} plus the pipeline-stamped
@@ -6780,6 +6791,23 @@ export declare interface RunConversationTurnResult {
6780
6791
  queued?: boolean;
6781
6792
  }
6782
6793
 
6794
+ /**
6795
+ * Slice a string like `String.prototype.slice`, but never cut a UTF-16
6796
+ * surrogate pair in half.
6797
+ *
6798
+ * If the character at `end - 1` is a high surrogate *and* there is more of
6799
+ * the string beyond `end` (so cutting would actually orphan it), `end` is
6800
+ * decremented by one.
6801
+ *
6802
+ * If the character at `start` is a low surrogate *and* `start > 0` (so we
6803
+ * would be starting mid-pair), `start` is incremented by one.
6804
+ *
6805
+ * When `end === str.length` we do not touch a trailing high surrogate: if it
6806
+ * was already orphaned upstream, repairing it here would silently mutate
6807
+ * content. That is the sanitizer's job, not this function's.
6808
+ */
6809
+ export declare function safeStringSlice(str: string, start?: number, end?: number): string;
6810
+
6783
6811
  /** Sparse lexical search over stored message text; ranked message-id hits. */
6784
6812
  export declare function searchMessageIdsLexical(query: string, limit: number, opts?: {
6785
6813
  conversationId?: string;
package/index.js CHANGED
@@ -5,6 +5,7 @@ export const CredentialResolutionError = api.CredentialResolutionError;
5
5
  export const CredentialStoreError = api.CredentialStoreError;
6
6
  export const HOOKS = api.HOOKS;
7
7
  export const INTERNAL_NUDGE_OUTPUT_SUPPRESSION = api.INTERNAL_NUDGE_OUTPUT_SUPPRESSION;
8
+ export const PluginTurnNotAdmittedError = api.PluginTurnNotAdmittedError;
8
9
  export const REFUSAL_FALLBACK_TEXT = api.REFUSAL_FALLBACK_TEXT;
9
10
  export const RiskLevel = api.RiskLevel;
10
11
  export const TtsSynthesisError = api.TtsSynthesisError;
@@ -25,6 +26,7 @@ export const getConfiguredProvider = api.getConfiguredProvider;
25
26
  export const getConversation = api.getConversation;
26
27
  export const getConversationDirPath = api.getConversationDirPath;
27
28
  export const getConversationProcessingStartedAt = api.getConversationProcessingStartedAt;
29
+ export const getConversationToolSurface = api.getConversationToolSurface;
28
30
  export const getDocument = api.getDocument;
29
31
  export const getMessages = api.getMessages;
30
32
  export const getModelProfiles = api.getModelProfiles;
@@ -54,6 +56,7 @@ export const resolveOauthCallbackUrl = api.resolveOauthCallbackUrl;
54
56
  export const resolveUserName = api.resolveUserName;
55
57
  export const resolveWebhookUrl = api.resolveWebhookUrl;
56
58
  export const runConversationTurn = api.runConversationTurn;
59
+ export const safeStringSlice = api.safeStringSlice;
57
60
  export const searchMessageIdsLexical = api.searchMessageIdsLexical;
58
61
  export const selectedBackendSupportsMultimodal = api.selectedBackendSupportsMultimodal;
59
62
  export const storeCredential = api.storeCredential;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vellumai/plugin-api",
3
- "version": "0.12.1-dev.202609161417.90ecd78",
3
+ "version": "0.12.1-dev.202609161617.3bb194e",
4
4
  "description": "Public TypeScript authoring contract for Vellum assistant plugins.",
5
5
  "license": "MIT",
6
6
  "type": "module",