@sentry/junior-plugin-api 0.269.0 → 0.271.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 +28 -3
- 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. */
|
|
@@ -1871,7 +1878,10 @@ export interface IssueCredentialHookContext extends PluginContext {
|
|
|
1871
1878
|
}
|
|
1872
1879
|
/** A notice that a plugin puts on the review desk. */
|
|
1873
1880
|
export interface PluginReviewNotice {
|
|
1874
|
-
/**
|
|
1881
|
+
/**
|
|
1882
|
+
* Junior assigns the User linked to each Identity, but only when that User
|
|
1883
|
+
* is in the notice's Conversation. It leaves out the others.
|
|
1884
|
+
*/
|
|
1875
1885
|
assigneeIdentityIds: string[];
|
|
1876
1886
|
/** Markdown details for the person. */
|
|
1877
1887
|
body: string;
|
|
@@ -1912,6 +1922,8 @@ export interface HeartbeatHookContext extends PluginContext {
|
|
|
1912
1922
|
dispatch(options: DispatchOptions): Promise<DispatchResult>;
|
|
1913
1923
|
get(id: string): Promise<Dispatch | undefined>;
|
|
1914
1924
|
};
|
|
1925
|
+
/** Host embedder bound to the configured embedding model. */
|
|
1926
|
+
embedder: PluginEmbedder;
|
|
1915
1927
|
nowMs: number;
|
|
1916
1928
|
state: PluginState;
|
|
1917
1929
|
}
|
|
@@ -2391,8 +2403,21 @@ export interface ToolApprovalMetadata<TInput = unknown> {
|
|
|
2391
2403
|
*/
|
|
2392
2404
|
describeProposal?(input: TInput): string;
|
|
2393
2405
|
}
|
|
2394
|
-
/**
|
|
2395
|
-
|
|
2406
|
+
/**
|
|
2407
|
+
* Control who may call a tool.
|
|
2408
|
+
*
|
|
2409
|
+
* | Exposure | Model tool list | Tool catalog | Code Mode script |
|
|
2410
|
+
* | ----------- | --------------- | ------------ | ---------------- |
|
|
2411
|
+
* | `direct` | yes | yes | yes |
|
|
2412
|
+
* | `deferred` | no | yes | yes |
|
|
2413
|
+
* | `modelOnly` | yes | no | no |
|
|
2414
|
+
* | `codemode` | no | no | yes |
|
|
2415
|
+
* | `hidden` | no | no | no |
|
|
2416
|
+
*
|
|
2417
|
+
* The tool catalog is `searchTools` and `executeTool`. Use `modelOnly` for
|
|
2418
|
+
* tools that control the agent loop or dispatch other tools.
|
|
2419
|
+
*/
|
|
2420
|
+
export type ToolExposure = "direct" | "deferred" | "modelOnly" | "codemode" | "hidden";
|
|
2396
2421
|
export interface PluginToolDefinition<TInput = unknown, TOutput = unknown, TExecuteOutput = TOutput> extends ToolApprovalMetadata<TInput> {
|
|
2397
2422
|
description: string;
|
|
2398
2423
|
executionMode?: unknown;
|