@sentry/junior-plugin-api 0.114.0 → 0.115.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.js CHANGED
@@ -271,6 +271,7 @@ var pluginToolResultSchema = z5.object({
271
271
  continuation: pluginToolContinuationSchema.optional(),
272
272
  error: z5.union([pluginToolErrorSchema, z5.string()]).optional()
273
273
  }).passthrough();
274
+ var toolApprovalModeSchema = z5.enum(["auto", "review", "approve"]);
274
275
  function formatZodPath(path) {
275
276
  return path.length > 0 ? path.map(String).join(".") : "root";
276
277
  }
@@ -505,5 +506,6 @@ export {
505
506
  sourceTypeSchema,
506
507
  subscribableResourceSchema,
507
508
  systemActorSchema,
509
+ toolApprovalModeSchema,
508
510
  zodTool
509
511
  };
package/dist/tools.d.ts CHANGED
@@ -108,7 +108,25 @@ export type PluginToolResult = z.output<typeof pluginToolResultSchema>;
108
108
  export type PluginToolExecute<TInput = unknown, TOutput = unknown> = {
109
109
  bivarianceHack(input: TInput, options: PluginToolExecuteOptions): Promise<TOutput> | TOutput;
110
110
  }["bivarianceHack"];
111
+ /**
112
+ * Tool-declared approval mode.
113
+ *
114
+ * `auto` delegates to core policy, `review` enters approval review, and
115
+ * `approve` permits execution without review. Omission delegates to core
116
+ * defaults. These values do not select the reviewer.
117
+ *
118
+ * This is declaration metadata only; current tool execution is unchanged.
119
+ * TODO(#1053): Enforce effective approval modes before tool execution.
120
+ */
121
+ export declare const toolApprovalModeSchema: z.ZodEnum<{
122
+ auto: "auto";
123
+ review: "review";
124
+ approve: "approve";
125
+ }>;
126
+ export type ToolApprovalMode = z.output<typeof toolApprovalModeSchema>;
111
127
  export interface PluginToolDefinition<TInput = unknown, TOutput = unknown> {
128
+ /** Optional declared approval mode; omission delegates to core defaults. */
129
+ approvalMode?: ToolApprovalMode;
112
130
  annotations?: unknown;
113
131
  description: string;
114
132
  executionMode?: unknown;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/junior-plugin-api",
3
- "version": "0.114.0",
3
+ "version": "0.115.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
package/src/tools.ts CHANGED
@@ -129,7 +129,23 @@ export type PluginToolExecute<TInput = unknown, TOutput = unknown> = {
129
129
  ): Promise<TOutput> | TOutput;
130
130
  }["bivarianceHack"];
131
131
 
132
+ /**
133
+ * Tool-declared approval mode.
134
+ *
135
+ * `auto` delegates to core policy, `review` enters approval review, and
136
+ * `approve` permits execution without review. Omission delegates to core
137
+ * defaults. These values do not select the reviewer.
138
+ *
139
+ * This is declaration metadata only; current tool execution is unchanged.
140
+ * TODO(#1053): Enforce effective approval modes before tool execution.
141
+ */
142
+ export const toolApprovalModeSchema = z.enum(["auto", "review", "approve"]);
143
+
144
+ export type ToolApprovalMode = z.output<typeof toolApprovalModeSchema>;
145
+
132
146
  export interface PluginToolDefinition<TInput = unknown, TOutput = unknown> {
147
+ /** Optional declared approval mode; omission delegates to core defaults. */
148
+ approvalMode?: ToolApprovalMode;
133
149
  annotations?: unknown;
134
150
  description: string;
135
151
  executionMode?: unknown;