@sentry/junior-plugin-api 0.269.0 → 0.270.0
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/dist/index.d.ts +24 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -595,9 +595,16 @@ export interface PluginModel {
|
|
|
595
595
|
object: z.infer<TSchema>;
|
|
596
596
|
}>;
|
|
597
597
|
}
|
|
598
|
+
/** How embedded text is used. Some models embed queries and documents differently. */
|
|
599
|
+
export type PluginEmbeddingInputType = "document" | "query";
|
|
598
600
|
export interface PluginEmbedder {
|
|
601
|
+
/** Configured embedding model id; embedTexts() reports the same value. */
|
|
602
|
+
model: string;
|
|
603
|
+
/** Provider name that embedTexts() reports. */
|
|
604
|
+
provider: string;
|
|
599
605
|
/** Embed plugin-owned text for derived retrieval without exposing provider credentials. */
|
|
600
606
|
embedTexts(input: {
|
|
607
|
+
inputType?: PluginEmbeddingInputType;
|
|
601
608
|
texts: string[];
|
|
602
609
|
}): Promise<{
|
|
603
610
|
/** Best-effort estimated provider cost for this embedding call. */
|
|
@@ -1912,6 +1919,8 @@ export interface HeartbeatHookContext extends PluginContext {
|
|
|
1912
1919
|
dispatch(options: DispatchOptions): Promise<DispatchResult>;
|
|
1913
1920
|
get(id: string): Promise<Dispatch | undefined>;
|
|
1914
1921
|
};
|
|
1922
|
+
/** Host embedder bound to the configured embedding model. */
|
|
1923
|
+
embedder: PluginEmbedder;
|
|
1915
1924
|
nowMs: number;
|
|
1916
1925
|
state: PluginState;
|
|
1917
1926
|
}
|
|
@@ -2391,8 +2400,21 @@ export interface ToolApprovalMetadata<TInput = unknown> {
|
|
|
2391
2400
|
*/
|
|
2392
2401
|
describeProposal?(input: TInput): string;
|
|
2393
2402
|
}
|
|
2394
|
-
/**
|
|
2395
|
-
|
|
2403
|
+
/**
|
|
2404
|
+
* Control who may call a tool.
|
|
2405
|
+
*
|
|
2406
|
+
* | Exposure | Model tool list | Tool catalog | Code Mode script |
|
|
2407
|
+
* | ----------- | --------------- | ------------ | ---------------- |
|
|
2408
|
+
* | `direct` | yes | yes | yes |
|
|
2409
|
+
* | `deferred` | no | yes | yes |
|
|
2410
|
+
* | `modelOnly` | yes | no | no |
|
|
2411
|
+
* | `codemode` | no | no | yes |
|
|
2412
|
+
* | `hidden` | no | no | no |
|
|
2413
|
+
*
|
|
2414
|
+
* The tool catalog is `searchTools` and `executeTool`. Use `modelOnly` for
|
|
2415
|
+
* tools that control the agent loop or dispatch other tools.
|
|
2416
|
+
*/
|
|
2417
|
+
export type ToolExposure = "direct" | "deferred" | "modelOnly" | "codemode" | "hidden";
|
|
2396
2418
|
export interface PluginToolDefinition<TInput = unknown, TOutput = unknown, TExecuteOutput = TOutput> extends ToolApprovalMetadata<TInput> {
|
|
2397
2419
|
description: string;
|
|
2398
2420
|
executionMode?: unknown;
|