@sentry/junior-plugin-api 0.179.0 → 0.180.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
@@ -90,9 +90,10 @@ import { z as z3 } from "zod";
90
90
  var slackTeamIdSchema = z3.string().regex(/^T[A-Z0-9]+$/);
91
91
  var slackConversationIdSchema = z3.string().regex(/^(C|G|D)[A-Z0-9]+$/);
92
92
  var localConversationIdSchema = z3.string().regex(/^local:[a-z0-9_-]+:[a-z0-9][a-z0-9_-]*$/);
93
- var exactActorUserIdSchema = z3.string().min(1).refine(
93
+ var actorUserIdSchema = z3.string().min(1).refine(
94
94
  (value) => value === value.trim() && value.toLowerCase() !== "unknown"
95
95
  );
96
+ var exactActorUserIdSchema = actorUserIdSchema;
96
97
  var nonBlankStringSchema = z3.string().refine((value) => value.trim().length > 0);
97
98
  var exactNonBlankStringSchema = nonBlankStringSchema.refine(
98
99
  (value) => value === value.trim()
@@ -264,8 +265,8 @@ function createSlackSource(input) {
264
265
  visibility: input.visibility,
265
266
  teamId: input.teamId,
266
267
  channelId: input.channelId,
267
- ...input.messageTs ? { messageTs: input.messageTs } : {},
268
- ...input.threadTs ? { threadTs: input.threadTs } : {}
268
+ ...input.messageTs ? { messageTs: input.messageTs } : void 0,
269
+ ...input.threadTs ? { threadTs: input.threadTs } : void 0
269
270
  };
270
271
  }
271
272
  function createLocalSource(conversationId) {
@@ -601,7 +602,7 @@ function createZodTool(definition, helperName) {
601
602
  }
602
603
  return outputSchema.parse(result);
603
604
  }
604
- } : {}
605
+ } : void 0
605
606
  };
606
607
  }
607
608
  function zodTool(definition) {
@@ -863,11 +864,14 @@ var pluginUserPageLinkSchema = z10.object({
863
864
  pluginName: nonBlankStringSchema.max(100)
864
865
  }).strict();
865
866
  var pluginUserPageLinksSchema = z10.array(pluginUserPageLinkSchema);
867
+ var pluginUserPageCursorSchema = nonBlankStringSchema.max(1e3).optional();
868
+ var pluginUserPageFilterSchema = nonBlankStringSchema.max(64).optional();
869
+ var pluginUserPageQuerySchema = z10.string().trim().max(200).optional();
866
870
  var pluginUserPageInputSchema = z10.object({
867
- cursor: nonBlankStringSchema.max(1e3).optional(),
868
- filter: nonBlankStringSchema.max(64).optional(),
871
+ cursor: pluginUserPageCursorSchema,
872
+ filter: pluginUserPageFilterSchema,
869
873
  limit: z10.number().int().min(1).max(50),
870
- query: z10.string().trim().max(200).optional()
874
+ query: pluginUserPageQuerySchema
871
875
  }).strict();
872
876
  export {
873
877
  EgressAuthRequired,
@@ -880,6 +884,7 @@ export {
880
884
  RESOURCE_EVENT_SUMMARY_MAX_LENGTH,
881
885
  RESOURCE_EVENT_TEXT_MAX_LENGTH,
882
886
  actorSchema,
887
+ actorUserIdSchema,
883
888
  conversationAnnotationInputSchema,
884
889
  conversationEventIconSchema,
885
890
  conversationEventPresentationSchema,
@@ -925,9 +930,12 @@ export {
925
930
  pluginToolContinuationSchema,
926
931
  pluginToolOutputSchema,
927
932
  pluginUserPageContentSchema,
933
+ pluginUserPageCursorSchema,
934
+ pluginUserPageFilterSchema,
928
935
  pluginUserPageInputSchema,
929
936
  pluginUserPageLinkSchema,
930
937
  pluginUserPageLinksSchema,
938
+ pluginUserPageQuerySchema,
931
939
  promptContextSchema,
932
940
  promptMessageSchema,
933
941
  replyAttributionSchema,
package/dist/schemas.d.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  import { z } from "zod";
2
+ /** Exact non-blank actor user id that rejects the sentinel "unknown". */
3
+ export declare const actorUserIdSchema: z.ZodString;
2
4
  export declare const nonBlankStringSchema: z.ZodString;
3
5
  /** Runtime platform names supported by plugin public contracts. */
4
6
  export declare const platformSchema: z.ZodEnum<{
package/dist/tasks.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Public plugin background-task contracts.
3
3
  *
4
- * Plugins register small task handlers, while Junior core owns durable
5
- * scheduling, queue delivery, retries, and the bounded run projection.
4
+ * Plugins register small task handlers. Junior core owns scheduling, delivery,
5
+ * retries, and the bounded run projection.
6
6
  */
7
7
  import { z } from "zod";
8
8
  import type { PluginConversationEvents } from "./conversation-events";
@@ -68,6 +68,12 @@ export declare const pluginUserPageLinksSchema: z.ZodArray<z.ZodObject<{
68
68
  }, z.core.$strict>>;
69
69
  /** Safe navigation metadata for one registered plugin user page. */
70
70
  export type PluginUserPageLink = z.output<typeof pluginUserPageLinkSchema>;
71
+ /** Optional cursor token for one plugin user page reader. */
72
+ export declare const pluginUserPageCursorSchema: z.ZodOptional<z.ZodString>;
73
+ /** Optional filter token for one plugin user page reader. */
74
+ export declare const pluginUserPageFilterSchema: z.ZodOptional<z.ZodString>;
75
+ /** Optional free-text query for one plugin user page reader. */
76
+ export declare const pluginUserPageQuerySchema: z.ZodOptional<z.ZodString>;
71
77
  /** Validated query state passed to one plugin user page reader. */
72
78
  export declare const pluginUserPageInputSchema: z.ZodObject<{
73
79
  cursor: z.ZodOptional<z.ZodString>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/junior-plugin-api",
3
- "version": "0.179.0",
3
+ "version": "0.180.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -26,7 +26,8 @@
26
26
  "zod": "^4.4.3"
27
27
  },
28
28
  "devDependencies": {
29
- "oxlint": "^1.66.0",
29
+ "@oxlint/plugins": "1.79.0",
30
+ "oxlint": "^1.79.0",
30
31
  "tsup": "^8.5.1",
31
32
  "typescript": "^6.0.3"
32
33
  },
package/src/context.ts CHANGED
@@ -128,8 +128,8 @@ export function createSlackSource(input: {
128
128
  visibility: input.visibility,
129
129
  teamId: input.teamId,
130
130
  channelId: input.channelId,
131
- ...(input.messageTs ? { messageTs: input.messageTs } : {}),
132
- ...(input.threadTs ? { threadTs: input.threadTs } : {}),
131
+ ...(input.messageTs ? { messageTs: input.messageTs } : undefined),
132
+ ...(input.threadTs ? { threadTs: input.threadTs } : undefined),
133
133
  };
134
134
  }
135
135
 
package/src/schemas.ts CHANGED
@@ -5,12 +5,14 @@ const slackConversationIdSchema = z.string().regex(/^(C|G|D)[A-Z0-9]+$/);
5
5
  const localConversationIdSchema = z
6
6
  .string()
7
7
  .regex(/^local:[a-z0-9_-]+:[a-z0-9][a-z0-9_-]*$/);
8
- const exactActorUserIdSchema = z
8
+ /** Exact non-blank actor user id that rejects the sentinel "unknown". */
9
+ export const actorUserIdSchema = z
9
10
  .string()
10
11
  .min(1)
11
12
  .refine(
12
13
  (value) => value === value.trim() && value.toLowerCase() !== "unknown",
13
14
  );
15
+ const exactActorUserIdSchema = actorUserIdSchema;
14
16
 
15
17
  export const nonBlankStringSchema = z
16
18
  .string()
package/src/tasks.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Public plugin background-task contracts.
3
3
  *
4
- * Plugins register small task handlers, while Junior core owns durable
5
- * scheduling, queue delivery, retries, and the bounded run projection.
4
+ * Plugins register small task handlers. Junior core owns scheduling, delivery,
5
+ * retries, and the bounded run projection.
6
6
  */
7
7
  import { z } from "zod";
8
8
  import type { PluginConversationEvents } from "./conversation-events";
package/src/tools.ts CHANGED
@@ -455,7 +455,7 @@ function createZodTool<
455
455
  return outputSchema.parse(result);
456
456
  },
457
457
  }
458
- : {}),
458
+ : undefined),
459
459
  } as PluginToolDefinition<
460
460
  z.output<TInputSchema>,
461
461
  z.output<TOutputSchema>,
package/src/user-pages.ts CHANGED
@@ -86,13 +86,26 @@ export const pluginUserPageLinksSchema = z.array(pluginUserPageLinkSchema);
86
86
  /** Safe navigation metadata for one registered plugin user page. */
87
87
  export type PluginUserPageLink = z.output<typeof pluginUserPageLinkSchema>;
88
88
 
89
+ /** Optional cursor token for one plugin user page reader. */
90
+ export const pluginUserPageCursorSchema = nonBlankStringSchema
91
+ .max(1_000)
92
+ .optional();
93
+
94
+ /** Optional filter token for one plugin user page reader. */
95
+ export const pluginUserPageFilterSchema = nonBlankStringSchema
96
+ .max(64)
97
+ .optional();
98
+
99
+ /** Optional free-text query for one plugin user page reader. */
100
+ export const pluginUserPageQuerySchema = z.string().trim().max(200).optional();
101
+
89
102
  /** Validated query state passed to one plugin user page reader. */
90
103
  export const pluginUserPageInputSchema = z
91
104
  .object({
92
- cursor: nonBlankStringSchema.max(1_000).optional(),
93
- filter: nonBlankStringSchema.max(64).optional(),
105
+ cursor: pluginUserPageCursorSchema,
106
+ filter: pluginUserPageFilterSchema,
94
107
  limit: z.number().int().min(1).max(50),
95
- query: z.string().trim().max(200).optional(),
108
+ query: pluginUserPageQuerySchema,
96
109
  })
97
110
  .strict();
98
111