@sentry/junior-plugin-api 0.133.0 → 0.135.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/README.md CHANGED
@@ -47,6 +47,9 @@ reports, and other typed hook surfaces exported by this package.
47
47
  - User prompt hooks for durable turns may emit registered structured events
48
48
  through `ctx.events` for auxiliary work completed while building context.
49
49
  - Tool hooks return model-visible schemas aligned with their executor inputs.
50
+ - Tool registration hooks may use `ctx.sandbox` for plugin-owned workspace
51
+ files and commands; Junior still owns sandbox lifecycle, cancellation,
52
+ provider egress, and authorization recovery.
50
53
  - Host-owned structured model and embedding calls do not expose provider
51
54
  credentials to plugins. Both return a best-effort provider cost estimate when
52
55
  one is available.
package/dist/tools.d.ts CHANGED
@@ -27,6 +27,7 @@ export interface PluginSandbox {
27
27
  cmd: string;
28
28
  cwd?: string;
29
29
  env?: Record<string, string>;
30
+ signal?: AbortSignal;
30
31
  sudo?: boolean;
31
32
  }): Promise<{
32
33
  exitCode: number;
@@ -152,6 +153,8 @@ export interface PluginToolExecuteOptions {
152
153
  * Plugin tools should use typed input fields and runtime hook context instead.
153
154
  */
154
155
  experimental_context?: unknown;
156
+ /** Abort when the owning agent tool call is cancelled or times out. */
157
+ signal?: AbortSignal;
155
158
  /** Stable runtime tool-call id; durable create tools should derive idempotency keys from it. */
156
159
  toolCallId?: string;
157
160
  }
@@ -292,6 +295,8 @@ interface BaseToolRegistrationHookContext extends PluginContext {
292
295
  mcp?: PluginMcp;
293
296
  model: PluginModel;
294
297
  resourceEvents: PluginResourceEventToolContext;
298
+ /** Sandbox filesystem and command capability for plugin-owned workspace tools. */
299
+ sandbox: PluginSandbox;
295
300
  state: PluginState;
296
301
  users: {
297
302
  /** Resolve the current actor's stored identity and linked user. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/junior-plugin-api",
3
- "version": "0.133.0",
3
+ "version": "0.135.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
package/src/tools.ts CHANGED
@@ -41,6 +41,7 @@ export interface PluginSandbox {
41
41
  cmd: string;
42
42
  cwd?: string;
43
43
  env?: Record<string, string>;
44
+ signal?: AbortSignal;
44
45
  sudo?: boolean;
45
46
  }): Promise<{
46
47
  exitCode: number;
@@ -185,6 +186,8 @@ export interface PluginToolExecuteOptions {
185
186
  * Plugin tools should use typed input fields and runtime hook context instead.
186
187
  */
187
188
  experimental_context?: unknown;
189
+ /** Abort when the owning agent tool call is cancelled or times out. */
190
+ signal?: AbortSignal;
188
191
  /** Stable runtime tool-call id; durable create tools should derive idempotency keys from it. */
189
192
  toolCallId?: string;
190
193
  }
@@ -521,6 +524,8 @@ interface BaseToolRegistrationHookContext extends PluginContext {
521
524
  mcp?: PluginMcp;
522
525
  model: PluginModel;
523
526
  resourceEvents: PluginResourceEventToolContext;
527
+ /** Sandbox filesystem and command capability for plugin-owned workspace tools. */
528
+ sandbox: PluginSandbox;
524
529
  state: PluginState;
525
530
  users: {
526
531
  /** Resolve the current actor's stored identity and linked user. */