@sentry/junior 0.177.0 → 0.178.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.
Files changed (91) hide show
  1. package/dist/{agent-hooks-IYHCN7CO.js → agent-hooks-PBT4NNBV.js} +12 -12
  2. package/dist/api/conversations/archive.d.ts +5 -2
  3. package/dist/api/conversations/list.d.ts +0 -1
  4. package/dist/api/conversations/membership.d.ts +14 -0
  5. package/dist/api/conversations/projection.d.ts +2 -1
  6. package/dist/api/locations/detail.d.ts +1 -1
  7. package/dist/api/people/shared.d.ts +2 -2
  8. package/dist/api/schema/conversation.d.ts +4 -4
  9. package/dist/api/schema/location.d.ts +1 -1
  10. package/dist/api/schema/person.d.ts +1 -1
  11. package/dist/api/schema.js +1 -1
  12. package/dist/api.js +245 -166
  13. package/dist/app.js +35 -35
  14. package/dist/{catalog-runtime-2TD4CXSB.js → catalog-runtime-M7QGKPFZ.js} +5 -5
  15. package/dist/chat/agent/sandbox.d.ts +2 -0
  16. package/dist/chat/conversations/sql/participants.d.ts +1 -0
  17. package/dist/chat/conversations/store.d.ts +0 -1
  18. package/dist/chat/sandbox/errors.d.ts +4 -0
  19. package/dist/chat/sandbox/noninteractive-command.d.ts +1 -0
  20. package/dist/chat/sandbox/prepare-workspace.d.ts +27 -3
  21. package/dist/chat/sandbox/sandbox.d.ts +2 -0
  22. package/dist/chat/sandbox/session.d.ts +2 -0
  23. package/dist/chat/sandbox/snapshot/builder-sandbox.d.ts +5 -0
  24. package/dist/chat/sandbox/snapshot/install.d.ts +2 -2
  25. package/dist/chat/sandbox/snapshot/span.d.ts +3 -0
  26. package/dist/chat/sandbox/snapshot/store.d.ts +20 -17
  27. package/dist/chat/sandbox/snapshot/waiting-error.d.ts +15 -0
  28. package/dist/chat/sandbox/snapshot/workspace.d.ts +17 -0
  29. package/dist/chat/services/workspace-snapshot-wait.d.ts +27 -0
  30. package/dist/chat/workspaces/types.d.ts +1 -0
  31. package/dist/{chunk-3FWXQZJJ.js → chunk-22T3HB44.js} +1 -1
  32. package/dist/{chunk-DLTP6TUJ.js → chunk-3ZZEPLLB.js} +2 -2
  33. package/dist/{chunk-7ZFESKJ2.js → chunk-4K6VNP3S.js} +9 -9
  34. package/dist/{chunk-N4YEVOEC.js → chunk-534BO42N.js} +45 -276
  35. package/dist/{chunk-6NZRKJWU.js → chunk-6OYVH66J.js} +1 -1
  36. package/dist/{chunk-J2EWL6GJ.js → chunk-ABLODWPO.js} +1 -1
  37. package/dist/{chunk-ORMJY4RG.js → chunk-AGJ4OQ2V.js} +1 -1
  38. package/dist/{chunk-Q362TECJ.js → chunk-AQHSXA3J.js} +331 -2
  39. package/dist/{chunk-4SVAFAI2.js → chunk-AVRWMQ4U.js} +1 -1
  40. package/dist/{chunk-I7PKGMKI.js → chunk-BFLMRTPD.js} +6 -6
  41. package/dist/{chunk-ZCYABD7N.js → chunk-BHHWCNXI.js} +5 -5
  42. package/dist/{chunk-LFZODSAY.js → chunk-BUGO42R6.js} +4 -4
  43. package/dist/{chunk-7B6NW4P7.js → chunk-D3UJTX4U.js} +1 -1
  44. package/dist/{chunk-2IMQLZHS.js → chunk-FQ6BMP5P.js} +767 -81
  45. package/dist/{chunk-4TWDRU64.js → chunk-G3CQEUHI.js} +5 -5
  46. package/dist/{chunk-VGDOEKO2.js → chunk-H6ZXBFGX.js} +1 -1
  47. package/dist/{chunk-SNPQGTHJ.js → chunk-IQRPDKPJ.js} +1 -1
  48. package/dist/{chunk-CAWBLVBY.js → chunk-JVXZ3WDH.js} +6 -6
  49. package/dist/{chunk-7PZDAXIK.js → chunk-KEQAA42D.js} +1 -1
  50. package/dist/{chunk-UB5YB2ED.js → chunk-LAOP4EPL.js} +6 -6
  51. package/dist/{chunk-WYO2HXY5.js → chunk-OGRD5PFM.js} +1 -1
  52. package/dist/{chunk-AFOFVEXP.js → chunk-PRDKO3QB.js} +124 -13
  53. package/dist/{chunk-QLLOX7JY.js → chunk-QCCLDJHB.js} +8 -8
  54. package/dist/{chunk-FVVYHML7.js → chunk-RE4XWXBV.js} +6 -6
  55. package/dist/{chunk-4TRHPYTL.js → chunk-RGV6KHDM.js} +4 -4
  56. package/dist/{chunk-DGGIKWYQ.js → chunk-RGXOLPWO.js} +1 -1
  57. package/dist/{chunk-ELEAIRTG.js → chunk-TKB25A3L.js} +2 -2
  58. package/dist/{chunk-6KGMMVHF.js → chunk-U3UDPGZG.js} +2 -2
  59. package/dist/{chunk-7CVYXUOJ.js → chunk-UGWBJAGN.js} +1 -1
  60. package/dist/{chunk-LVL5NG5G.js → chunk-UMG7M32G.js} +19 -19
  61. package/dist/{chunk-LPMLAJYR.js → chunk-XCNS3CXE.js} +11 -17
  62. package/dist/{chunk-PA7QDS7P.js → chunk-XWUJWHFD.js} +204 -100
  63. package/dist/{chunk-WCQUKX74.js → chunk-ZCHHVTMF.js} +14 -5
  64. package/dist/cli/chat.js +31 -30
  65. package/dist/cli/check.js +6 -6
  66. package/dist/cli/plugins.js +13 -13
  67. package/dist/cli/snapshot-create.js +10 -10
  68. package/dist/cli/upgrade.js +7 -7
  69. package/dist/db/schema/conversation-participants.d.ts +17 -0
  70. package/dist/db/schema/conversations.d.ts +629 -1
  71. package/dist/db/schema/snapshots.d.ts +1 -1
  72. package/dist/db/schema.d.ts +18 -1
  73. package/dist/{db-A3CB76US.js → db-QVYOWATH.js} +7 -7
  74. package/dist/instrumentation.js +4 -4
  75. package/dist/nitro.js +2 -2
  76. package/dist/{oauth-callback-server-64QMI3IB.js → oauth-callback-server-PLPAFXO6.js} +23 -23
  77. package/dist/{runner-EIAE2BGD.js → runner-AGNEIOZS.js} +15 -15
  78. package/dist/{skills-ZADWFKDG.js → skills-U5KQ66EM.js} +6 -6
  79. package/dist/spawn-ZRYYZP2B.js +37 -0
  80. package/dist/{validation-4I6AF4CV.js → validation-QE4U45KS.js} +6 -6
  81. package/dist/version.js +1 -1
  82. package/dist/{work-BS6BZ66U.js → work-ATAXAHJJ.js} +18 -18
  83. package/dist/worker-LIL5AOER.js +24 -0
  84. package/migrations/0033_workspace_snapshot_active_build.sql +1 -0
  85. package/migrations/0034_strong_randall.sql +31 -0
  86. package/migrations/meta/0033_snapshot.json +2914 -0
  87. package/migrations/meta/0034_snapshot.json +3038 -0
  88. package/migrations/meta/_journal.json +15 -1
  89. package/package.json +5 -5
  90. package/dist/spawn-DVUOUFFC.js +0 -37
  91. package/dist/worker-RS5PWTCE.js +0 -24
@@ -13,25 +13,25 @@ import {
13
13
  getPlugins,
14
14
  setPlugins,
15
15
  validatePlugins
16
- } from "./chunk-PA7QDS7P.js";
16
+ } from "./chunk-XWUJWHFD.js";
17
17
  import "./chunk-3Y47VMHV.js";
18
- import "./chunk-LPMLAJYR.js";
19
- import "./chunk-WCQUKX74.js";
20
- import "./chunk-Q362TECJ.js";
21
- import "./chunk-VGDOEKO2.js";
22
- import "./chunk-DLTP6TUJ.js";
18
+ import "./chunk-XCNS3CXE.js";
19
+ import "./chunk-ZCHHVTMF.js";
20
+ import "./chunk-AQHSXA3J.js";
21
+ import "./chunk-H6ZXBFGX.js";
22
+ import "./chunk-3ZZEPLLB.js";
23
23
  import "./chunk-VFUK3X5B.js";
24
- import "./chunk-7PZDAXIK.js";
25
- import "./chunk-J2EWL6GJ.js";
26
- import "./chunk-7B6NW4P7.js";
24
+ import "./chunk-KEQAA42D.js";
25
+ import "./chunk-ABLODWPO.js";
26
+ import "./chunk-D3UJTX4U.js";
27
27
  import "./chunk-CGA4ERJ5.js";
28
28
  import "./chunk-M63DETLL.js";
29
- import "./chunk-7CVYXUOJ.js";
29
+ import "./chunk-UGWBJAGN.js";
30
30
  import "./chunk-6GWA276C.js";
31
31
  import "./chunk-OOUNJNMR.js";
32
32
  import "./chunk-H4HBKISO.js";
33
- import "./chunk-ORMJY4RG.js";
34
- import "./chunk-SNPQGTHJ.js";
33
+ import "./chunk-AGJ4OQ2V.js";
34
+ import "./chunk-IQRPDKPJ.js";
35
35
  import "./chunk-MLKGABMK.js";
36
36
  export {
37
37
  PluginHookDeniedError,
@@ -1,3 +1,6 @@
1
+ import type { User } from "@sentry/junior-plugin-api";
1
2
  import type { ArchiveConversationBody, ArchiveConversationResponse } from "../schema/conversation";
2
- /** Archive or restore one conversation with optimistic activity concurrency control. */
3
- export declare function archiveConversation(conversationId: string, body: ArchiveConversationBody): Promise<ArchiveConversationResponse>;
3
+ /** Read one viewer's archive timestamp for a conversation root. */
4
+ export declare function readConversationArchivedAt(viewer: User, conversationId: string): Promise<number | undefined>;
5
+ /** Archive or restore one conversation for the signed-in viewer. */
6
+ export declare function archiveConversation(viewer: User, conversationId: string, body: ArchiveConversationBody): Promise<ArchiveConversationResponse>;
@@ -84,7 +84,6 @@ declare function conversationRows(db: JuniorDatabase, limit: number, status: "ac
84
84
  } | undefined;
85
85
  } | null;
86
86
  metricRunId: string | null;
87
- archivedAt: Date | null;
88
87
  };
89
88
  destination: {
90
89
  id: string;
@@ -7,10 +7,24 @@ export declare function conversationHasParticipantUser(userId: string): SQL;
7
7
  * conversation. Used only for the actorEmail feed fallback.
8
8
  */
9
9
  export declare function conversationHasParticipantEmail(email: string): SQL;
10
+ /** True when one user's personal feed has archived this root. */
11
+ export declare function conversationArchivedForUser(userId: string): SQL;
12
+ /** True when one user's personal feed has not archived this root. */
13
+ export declare function conversationNotArchivedForUser(userId: string): SQL;
14
+ /** True when one primary-email user's personal feed has archived this root. */
15
+ export declare function conversationArchivedForEmail(email: string): SQL;
16
+ /** True when one primary-email user's personal feed has not archived this root. */
17
+ export declare function conversationNotArchivedForEmail(email: string): SQL;
10
18
  /** Root-actor ownership or a materialized participant row for the same person. */
11
19
  export declare function viewerConversationMembership(args: {
12
20
  actorMatch: SQL | undefined;
13
21
  participantMatch: SQL | undefined;
14
22
  }): SQL | undefined;
23
+ /** Read personal archive timestamps for a bounded set of conversation roots. */
24
+ export declare function conversationArchiveTimes(db: JuniorDatabase, conversationIds: readonly string[], subject: {
25
+ email: string;
26
+ } | {
27
+ userId: string;
28
+ } | undefined): Promise<Map<string, number>>;
15
29
  /** Find which of the supplied roots include the linked viewer as a participant. */
16
30
  export declare function conversationIdsWithParticipantUser(db: JuniorDatabase, conversationIds: readonly string[], userId: string): Promise<Set<string>>;
@@ -1,7 +1,7 @@
1
1
  import type { Conversation as StoredConversation } from "@/chat/conversations/store";
2
2
  import type { ConversationEventHistory, ConversationSummaryReport, ConversationUsage } from "../schema/conversation";
3
3
  import type { ConversationAccess } from "./access";
4
- type ConversationProjectionSource = Pick<StoredConversation, "actor" | "archivedAtMs" | "channelName" | "conversationId" | "createdAtMs" | "execution" | "lastActivityAtMs" | "source" | "sessionSource" | "title" | "updatedAtMs">;
4
+ type ConversationProjectionSource = Pick<StoredConversation, "actor" | "channelName" | "conversationId" | "createdAtMs" | "execution" | "lastActivityAtMs" | "source" | "sessionSource" | "title" | "updatedAtMs">;
5
5
  /** Describe whether a viewer can read one conversation's retained events. */
6
6
  export declare function conversationEventHistory(args: {
7
7
  canExposePayload: boolean;
@@ -10,6 +10,7 @@ export declare function conversationEventHistory(args: {
10
10
  /** Project one durable conversation and its SQL metrics into the REST summary. */
11
11
  export declare function conversationSummaryFromStoredConversation(args: {
12
12
  access?: ConversationAccess;
13
+ archivedAtMs?: number;
13
14
  auxiliaryCosts?: ConversationSummaryReport["auxiliaryCosts"];
14
15
  conversation: ConversationProjectionSource;
15
16
  durationMs: number;
@@ -80,7 +80,7 @@ export declare function readLocationDetail(locationId: string, options?: {
80
80
  slackUserId?: string | undefined;
81
81
  slackUserName?: string | undefined;
82
82
  } | undefined;
83
- archivedAt?: string | undefined;
83
+ archivedAt?: string | null | undefined;
84
84
  channel?: string | undefined;
85
85
  channelName?: string | undefined;
86
86
  channelNameRedacted?: boolean | undefined;
@@ -630,7 +630,7 @@ export declare const peopleTreeConversation: import("drizzle-orm/pg-core").PgTab
630
630
  identity: undefined;
631
631
  generated: undefined;
632
632
  }, {}, {}>;
633
- archivedAt: import("drizzle-orm/pg-core").PgColumn<{
633
+ legacyArchivedAt: import("drizzle-orm/pg-core").PgColumn<{
634
634
  name: string;
635
635
  tableName: "junior_conversations";
636
636
  dataType: "date";
@@ -1221,7 +1221,7 @@ export declare const peopleTreeConversation: import("drizzle-orm/pg-core").PgTab
1221
1221
  identity: undefined;
1222
1222
  generated: undefined;
1223
1223
  }, {}, {}>;
1224
- archivedAt: import("drizzle-orm/pg-core").PgColumn<{
1224
+ legacyArchivedAt: import("drizzle-orm/pg-core").PgColumn<{
1225
1225
  name: string;
1226
1226
  tableName: "people_tree_conversation";
1227
1227
  dataType: "date";
@@ -58,7 +58,7 @@ export declare const archiveConversationBodySchema: z.ZodObject<{
58
58
  lastSeenAt: z.ZodString;
59
59
  }, z.core.$strict>;
60
60
  export declare const archiveConversationResponseSchema: z.ZodObject<{
61
- archived: z.ZodBoolean;
61
+ archivedAt: z.ZodNullable<z.ZodString>;
62
62
  }, z.core.$strict>;
63
63
  export declare const createConversationBodySchema: z.ZodObject<{
64
64
  idempotencyKey: z.ZodString;
@@ -237,7 +237,7 @@ export declare const conversationSummaryReportSchema: z.ZodObject<{
237
237
  slackUserId: z.ZodOptional<z.ZodString>;
238
238
  slackUserName: z.ZodOptional<z.ZodString>;
239
239
  }, z.core.$strict>>;
240
- archivedAt: z.ZodOptional<z.ZodString>;
240
+ archivedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
241
241
  channel: z.ZodOptional<z.ZodString>;
242
242
  channelName: z.ZodOptional<z.ZodString>;
243
243
  channelNameRedacted: z.ZodOptional<z.ZodBoolean>;
@@ -749,7 +749,7 @@ export declare const conversationDetailReportSchema: z.ZodObject<{
749
749
  slackUserId: z.ZodOptional<z.ZodString>;
750
750
  slackUserName: z.ZodOptional<z.ZodString>;
751
751
  }, z.core.$strict>>;
752
- archivedAt: z.ZodOptional<z.ZodString>;
752
+ archivedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
753
753
  channel: z.ZodOptional<z.ZodString>;
754
754
  channelName: z.ZodOptional<z.ZodString>;
755
755
  channelNameRedacted: z.ZodOptional<z.ZodBoolean>;
@@ -1288,7 +1288,7 @@ export declare const conversationFeedSchema: z.ZodObject<{
1288
1288
  slackUserId: z.ZodOptional<z.ZodString>;
1289
1289
  slackUserName: z.ZodOptional<z.ZodString>;
1290
1290
  }, z.core.$strict>>;
1291
- archivedAt: z.ZodOptional<z.ZodString>;
1291
+ archivedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1292
1292
  channel: z.ZodOptional<z.ZodString>;
1293
1293
  channelName: z.ZodOptional<z.ZodString>;
1294
1294
  channelNameRedacted: z.ZodOptional<z.ZodBoolean>;
@@ -187,7 +187,7 @@ export declare const locationDetailReportSchema: z.ZodObject<{
187
187
  slackUserId: z.ZodOptional<z.ZodString>;
188
188
  slackUserName: z.ZodOptional<z.ZodString>;
189
189
  }, z.core.$strict>>;
190
- archivedAt: z.ZodOptional<z.ZodString>;
190
+ archivedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
191
191
  channel: z.ZodOptional<z.ZodString>;
192
192
  channelName: z.ZodOptional<z.ZodString>;
193
193
  channelNameRedacted: z.ZodOptional<z.ZodBoolean>;
@@ -154,7 +154,7 @@ export declare const actorProfileReportSchema: z.ZodObject<{
154
154
  slackUserId: z.ZodOptional<z.ZodString>;
155
155
  slackUserName: z.ZodOptional<z.ZodString>;
156
156
  }, z.core.$strict>>;
157
- archivedAt: z.ZodOptional<z.ZodString>;
157
+ archivedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
158
158
  channel: z.ZodOptional<z.ZodString>;
159
159
  channelName: z.ZodOptional<z.ZodString>;
160
160
  channelNameRedacted: z.ZodOptional<z.ZodBoolean>;
@@ -59,7 +59,7 @@ import {
59
59
  workspaceParamsSchema,
60
60
  workspaceRepoSchema,
61
61
  workspaceSchema
62
- } from "../chunk-ELEAIRTG.js";
62
+ } from "../chunk-TKB25A3L.js";
63
63
  import {
64
64
  healthReportSchema,
65
65
  pluginOperationalReportFeedSchema,