@sentry/junior 0.284.0 → 0.286.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 (84) hide show
  1. package/dist/{adapter-CW5UW7vL.js → adapter-JQZaJ-B_.js} +37 -3
  2. package/dist/{admin-DUWN8zZX.js → admin-Dm2bimJ-.js} +1 -1
  3. package/dist/{agent-runner-Cqr21pOU.js → agent-runner-DGCwOEyL.js} +2180 -2735
  4. package/dist/api/schema.d.ts +2 -2
  5. package/dist/api/schema.js +8 -7
  6. package/dist/api.d.ts +1 -1
  7. package/dist/api.js +166 -90
  8. package/dist/{app-CvGalMxi.d.ts → app-BKq0JzWx.d.ts} +2 -3
  9. package/dist/app.d.ts +1 -1
  10. package/dist/app.js +225 -188
  11. package/dist/{assistant-reply-CFE-OZMS.js → assistant-reply-CAPafcUY.js} +1 -1
  12. package/dist/{automation-Zvx_I9Z5.js → automation-B-jJN_gM.js} +1 -1
  13. package/dist/{background-compaction-queue-CHFzrQbS.js → background-compaction-queue-Btu2oab_.js} +137 -3
  14. package/dist/{briefs-Cx7mkfSk.js → briefs-UMeYehUe.js} +5 -5
  15. package/dist/{catalog-runtime-dKOVbR7l.js → catalog-runtime-Bym8GVdh.js} +1 -1
  16. package/dist/cli/chat.js +19 -16
  17. package/dist/cli/check.js +3 -3
  18. package/dist/cli/init.js +3 -0
  19. package/dist/cli/main.js +3 -3
  20. package/dist/cli/plugins.js +4 -4
  21. package/dist/cli/snapshot-create.js +5 -6
  22. package/dist/cli/upgrade.d.ts +1 -1
  23. package/dist/cli/upgrade.js +12 -17
  24. package/dist/{client-CMyH5rDz.js → client-B0aAs7wC.js} +2 -2
  25. package/dist/{config-Dt3CpG17.js → config-B9f9Lqo5.js} +1 -1
  26. package/dist/{connections-CCHPybZP.js → connections-CQ7p0aNJ.js} +16 -50
  27. package/dist/{conversation-DdT7SNar.js → conversation-BusI2uzj.js} +68 -7
  28. package/dist/{conversation-pending-messages-Dct5pheX.js → conversation-pending-messages-DwehU0Fd.js} +1 -1
  29. package/dist/{conversation-privacy-BpHHhEVp.js → conversation-privacy-Cd_nZZBM.js} +1 -1
  30. package/dist/{credential-sync-BBPw8dam.js → credential-sync-DmiJi_At.js} +13 -13
  31. package/dist/{db-D7CCwAo8.d.ts → db-C5zi4ecs.d.ts} +18 -2
  32. package/dist/{executor-CyIwHz9r.js → executor-Dipi2Ixl.js} +19 -17
  33. package/dist/instrumentation.js +2 -2
  34. package/dist/{logging-Qo-7xGp1.js → logging-CMFhLLj4.js} +1 -1
  35. package/dist/{media-Bu9C6lz0.js → media-B-BpXo41.js} +14 -2
  36. package/dist/{message-DFbtOWqv.js → message-D1xLljUF.js} +13 -23
  37. package/dist/nitro.d.ts +1 -1
  38. package/dist/nitro.js +2 -3
  39. package/dist/{oauth-callback-server-BB1gixWo.js → oauth-callback-server-DCAFIUQr.js} +2 -2
  40. package/dist/{projection-0UcUeuzn.js → projection-CoeMNxJ4.js} +545 -262
  41. package/dist/{prompt-CCtaGgbI.js → prompt-C9OQEfan.js} +8 -6
  42. package/dist/{registry-DOnPkI8g.js → registry-u-sFYtx_.js} +1 -1
  43. package/dist/{reporting-window-B-QP9zX1.js → reporting-window-B4TwyuJo.js} +14 -14
  44. package/dist/{resolve-Di3omymY.js → resolve-DYqgL3Eo.js} +3 -3
  45. package/dist/result-CescSwAw.js +299 -0
  46. package/dist/result-event-type-DD6BAgT7.js +11 -0
  47. package/dist/{runner-CnX_dTKw.js → runner-Cr67a8TB.js} +16 -12
  48. package/dist/{sandbox-egress-signals-CtxLJmmg.js → sandbox-egress-signals-DLOazy5W.js} +1 -1
  49. package/dist/{schema-Bn3miEd_.js → schema-BUSi3sgv.js} +63 -5
  50. package/dist/{schema-B017enNE.d.ts → schema-Ih60j59-.d.ts} +194 -220
  51. package/dist/{service-account-KhZIqXRi.js → service-account-CGEqz9wG.js} +3 -3
  52. package/dist/{service-account-ewDAx4Mx.js → service-account-CsKxktLk.js} +3 -3
  53. package/dist/session-stop-CGz5DByb.js +2926 -0
  54. package/dist/{skills-CKyotM4g.js → skills-COCqf61f.js} +2 -2
  55. package/dist/{spawn-D5D2MQdz.js → spawn-C8F_iXWO.js} +13 -2
  56. package/dist/{stop-BSKRTaRS.js → stop-GyFZkHuQ.js} +7730 -7818
  57. package/dist/{store-ymkEUWe4.js → store-D0-8plWp.js} +30 -5
  58. package/dist/{turn-session-routing-D_GXfcAG.js → task-runner-xPuQmEot.js} +1440 -994
  59. package/dist/{store-G3S0kWSD.js → turn-failure-response-BOviBdT-.js} +404 -311
  60. package/dist/{validation-DJG_wrg2.js → validation-DZDKorGz.js} +1 -1
  61. package/dist/{version-i1An1eTS.js → version-BTIz7fGi.js} +1 -1
  62. package/dist/version.js +1 -1
  63. package/dist/{viewer-BlpnzZZa.js → viewer-CH-ASQzh.js} +208 -68
  64. package/dist/{work-BgCW3FDC.js → work-C75_IM5e.js} +311 -100
  65. package/dist/{worker-BJz1mwYt.js → worker-Dl47I729.js} +6 -6
  66. package/migrations/0083_conversation_kind.sql +11 -0
  67. package/migrations/0084_read_position_backfill.sql +25 -0
  68. package/migrations/0085_child_archived_at.sql +1 -0
  69. package/migrations/0086_shared_archive.sql +31 -0
  70. package/migrations/0087_child_location.sql +64 -0
  71. package/migrations/meta/0083_snapshot.json +4388 -0
  72. package/migrations/meta/0084_snapshot.json +4388 -0
  73. package/migrations/meta/0085_snapshot.json +4394 -0
  74. package/migrations/meta/0086_snapshot.json +4366 -0
  75. package/migrations/meta/0087_snapshot.json +4366 -0
  76. package/migrations/meta/_journal.json +35 -0
  77. package/package.json +5 -4
  78. package/dist/result-NvndYzCb.js +0 -483
  79. package/dist/session-stop-D_1SysjC.js +0 -1438
  80. package/dist/task-queue-BcOHzXxe.js +0 -139
  81. package/dist/task-runner-B65cDumh.js +0 -290
  82. package/dist/thread-state-D6rNGQu9.js +0 -173
  83. package/dist/turn-failure-response-BlO4nuDJ.js +0 -224
  84. package/dist/turn-lifecycle-BQ8ETk63.js +0 -58
@@ -1,4 +1,4 @@
1
- import { c as conversationTurnFailureCodeSchema, l as conversationTurnFailureReasonSchema, n as INPUT_IMAGE_TYPES, y as usageSchema } from "./media-Bu9C6lz0.js";
1
+ import { c as conversationTurnFailureCodeSchema, l as conversationTurnFailureReasonSchema, n as INPUT_IMAGE_TYPES, y as usageSchema } from "./media-B-BpXo41.js";
2
2
  import * as z from "zod";
3
3
  import { codeChangeStateSchema, conversationAnnotationInputSchema, conversationEventPresentationSchema, conversationSidebarAnnotationSchema, objectFactFields, objectTypeSchema } from "@sentry/junior-plugin-api";
4
4
  // src/chat/briefs/schema.ts
@@ -6,7 +6,8 @@ import { codeChangeStateSchema, conversationAnnotationInputSchema, conversationE
6
6
  * Runtime schemas for the Brief record and the generator input. Both cross a
7
7
  * durable or CLI edge, so these schemas own the exported types.
8
8
  */
9
- const lineSchema = z.string().trim().min(1).max(400);
9
+ const LINE_MAX = 400;
10
+ const lineSchema = z.string().trim().min(1).max(LINE_MAX);
10
11
  const urlSchema = z.string().url().max(2048);
11
12
  const timestampSchema = z.string().datetime();
12
13
  const briefLocationSchema = z.object({
@@ -114,6 +115,14 @@ const briefInputSchema = z.object({
114
115
  codeChanges: z.array(briefCodeChangeSchema),
115
116
  resources: z.array(briefResourceSchema)
116
117
  }).strict();
118
+ /**
119
+ * Label an annotation as a Brief resource. An object label is only its id,
120
+ * such as `owner/repo#123`, so keep its title: Brief search matches labels,
121
+ * and a later Conversation must find the object by its topic.
122
+ */
123
+ function briefResourceLabel(annotation) {
124
+ return (annotation.kind === "object" && annotation.title !== annotation.label ? `${annotation.label} · ${annotation.title}` : annotation.label).slice(0, LINE_MAX).trim();
125
+ }
117
126
  /** Parse the provider-neutral input used by every Brief generator adapter. */
118
127
  function parseBriefInput(input) {
119
128
  const parsed = briefInputSchema.parse(input);
@@ -254,10 +263,17 @@ const reviewItemChangeRecordSchema = z.object({
254
263
  * How far the signed-in viewer has read a Conversation transcript.
255
264
  *
256
265
  * `lastReadSeq` is the event sequence of the last transcript row the viewer
257
- * saw. The server keeps the highest value it receives, so it only moves
258
- * forward. It is never before the viewer's own latest Message.
266
+ * saw. Reports only move it forward: the server keeps the highest value it
267
+ * receives. Only Mark as unread moves it back. It is never before the
268
+ * viewer's own latest Message.
259
269
  */
260
270
  const conversationReadPositionSchema = z.object({ lastReadSeq: z.number().int().nonnegative() }).strict();
271
+ /**
272
+ * The reply to a read report: the stored read position and whether Junior's
273
+ * latest visible reply is still after it. The dashboard clears the unread
274
+ * flag from this, so it does not refetch the feed after each report.
275
+ */
276
+ const conversationReadReportSchema = conversationReadPositionSchema.extend({ unreadReply: z.boolean() }).strict();
261
277
  // src/api/schema/child-agent-totals.ts
262
278
  /**
263
279
  * The part of a Conversation total that its child agents spent, at any depth.
@@ -274,7 +290,14 @@ const conversationChildAgentTotalsSchema = z.object({
274
290
  const conversationReportStatusSchema = z.enum([
275
291
  "active",
276
292
  "completed",
277
- "failed"
293
+ "failed",
294
+ "stopped"
295
+ ]);
296
+ /** Where a Conversation sits in its tree. See `TERMINOLOGY.md`. */
297
+ const conversationKindSchema = z.enum([
298
+ "root",
299
+ "thread",
300
+ "task"
278
301
  ]);
279
302
  const conversationSurfaceSchema = z.enum([
280
303
  "api",
@@ -411,6 +434,9 @@ const conversationSummaryReportSchema = z.object({
411
434
  auxiliaryCosts: conversationAuxiliaryCostsSchema.optional(),
412
435
  childAgentTotals: conversationChildAgentTotalsSchema.optional(),
413
436
  conversationId: z.string(),
437
+ kind: conversationKindSchema,
438
+ /** Present on Threads and Tasks. */
439
+ parentConversationId: z.string().min(1).optional(),
414
440
  isParticipant: z.boolean(),
415
441
  visibility: z.enum(["private", "public"]).optional(),
416
442
  status: conversationReportStatusSchema,
@@ -420,10 +446,21 @@ const conversationSummaryReportSchema = z.object({
420
446
  surface: conversationSurfaceSchema,
421
447
  actorIdentity: actorIdentitySchema.optional(),
422
448
  participants: z.array(actorIdentitySchema).optional(),
449
+ /**
450
+ * When this Conversation was archived for everyone, or null. It shows
451
+ * only while it and every ancestor are unarchived.
452
+ */
423
453
  archivedAt: z.string().datetime().nullable().optional(),
424
454
  pinnedAt: z.string().datetime().nullable().optional(),
425
455
  /** The viewer's place in Pinned. Unset until they reorder their pins. */
426
456
  pinPosition: z.number().int().optional(),
457
+ /**
458
+ * True when the conversation is idle and Junior's latest reply that the
459
+ * transcript shows is after the viewer's read position. Quiet replies do
460
+ * not count. Opening the conversation does not move the position; reading
461
+ * in it, replying, archiving, or Mark as read does.
462
+ */
463
+ unread: z.boolean().optional(),
427
464
  channel: z.string().optional(),
428
465
  channelName: z.string().optional(),
429
466
  channelNameRedacted: z.boolean().optional(),
@@ -475,6 +512,8 @@ const conversationReportMessageEventDataSchema = z.object({
475
512
  /** Agent invocation whose input this is. An agent wrote it, not a person. */
476
513
  agentInvocationId: z.string().min(1).optional(),
477
514
  eventType: z.string().min(1).optional(),
515
+ /** Namespace of the first Event, such as `github`. */
516
+ eventNamespace: z.string().min(1).optional(),
478
517
  eventObjectType: objectTypeSchema.optional(),
479
518
  explicitMention: z.boolean().optional(),
480
519
  quiet: z.literal(true).optional(),
@@ -630,6 +669,13 @@ const conversationReportAttachmentsDeliveredEventDataSchema = z.object({
630
669
  type: z.literal("attachments_delivered"),
631
670
  attachments: z.array(messageAttachmentSchema).min(1)
632
671
  }).strict();
672
+ /** Junior text that a plugin tool posted to its provider. */
673
+ const conversationReportReplyPostedEventDataSchema = z.object({
674
+ type: z.literal("reply_posted"),
675
+ plugin: z.string().min(1),
676
+ text: z.string().min(1),
677
+ url: z.string().url().optional()
678
+ }).strict();
633
679
  const conversationReportCompactionEventDataSchema = z.object({
634
680
  type: z.literal("compaction"),
635
681
  modelId: z.string().min(1).optional(),
@@ -673,6 +719,7 @@ const conversationReportEventDataSchema = z.discriminatedUnion("type", [
673
719
  conversationReportTurnContextEventDataSchema,
674
720
  conversationReportStructuredEventDataSchema,
675
721
  conversationReportAttachmentsDeliveredEventDataSchema,
722
+ conversationReportReplyPostedEventDataSchema,
676
723
  conversationReportGuardianActionReviewedEventDataSchema,
677
724
  conversationReportCompactionEventDataSchema,
678
725
  conversationReportSubagentEventDataSchema
@@ -795,6 +842,7 @@ const forkConversationResponseSchema = z.object({ conversationId: z.string() }).
795
842
  /** One Conversation in the agent tree of a child Conversation. */
796
843
  const conversationAgentTreeNodeSchema = z.object({
797
844
  conversationId: z.string().min(1),
845
+ kind: conversationKindSchema,
798
846
  label: z.string().min(1)
799
847
  }).strict();
800
848
  const conversationEventPageSchema = z.object({
@@ -811,6 +859,12 @@ const conversationEventPageSchema = z.object({
811
859
  * validators itself, after the function had already built the full report.
812
860
  */
813
861
  const CONVERSATION_DETAIL_VERSION_HEADER = "x-junior-detail-version";
862
+ /**
863
+ * Carries the change token of the Conversation tree that a detail report was
864
+ * built from. The dashboard compares it with the token of `GET /api/versions`
865
+ * and asks for the report only when they differ.
866
+ */
867
+ const CONVERSATION_VERSION_HEADER = "x-junior-conversation-version";
814
868
  const conversationDetailReportSchema = conversationSummaryReportSchema.extend({
815
869
  /**
816
870
  * The parent chain of a child Conversation, root first, with this
@@ -821,6 +875,8 @@ const conversationDetailReportSchema = conversationSummaryReportSchema.extend({
821
875
  autoArchive: z.boolean().optional(),
822
876
  /** The viewer can fork this conversation from an assistant reply. */
823
877
  canFork: z.boolean().optional(),
878
+ /** The viewer can move this dashboard conversation to a Slack thread. */
879
+ canContinueInSlack: z.literal(true).optional(),
824
880
  /** How far the signed-in viewer has read. Absent until they read. */
825
881
  readPosition: conversationReadPositionSchema.optional(),
826
882
  /**
@@ -869,9 +925,14 @@ const conversationDetailReportSchema = conversationSummaryReportSchema.extend({
869
925
  sentryConversationUrl: z.string().optional(),
870
926
  sourceTask: conversationSourceTaskSchema.optional()
871
927
  }).strict().superRefine(validateConversationEvents);
928
+ /**
929
+ * A root in the feed, or one of its visible Threads. A Thread nests under
930
+ * its nearest visible Thread ancestor, or under the root. Tasks never show.
931
+ */
932
+ const conversationFeedItemSchema = conversationSummaryReportSchema.extend({ threads: z.lazy(() => z.array(conversationFeedItemSchema)).optional() });
872
933
  const conversationFeedSchema = z.object({
873
- conversations: z.array(conversationSummaryReportSchema),
934
+ conversations: z.array(conversationFeedItemSchema),
874
935
  source: z.literal("conversation_index"),
875
936
  generatedAt: z.string()
876
937
  }).strict();
877
- export { messageCardRef as A, briefLinkSchema as B, createConversationMessageBodySchema as C, conversationReadPositionSchema as D, conversationChildAgentTotalsSchema as E, MAX_INPUT_IMAGES as F, conversationBriefSchema as H, MAX_INPUT_IMAGE_BYTES as I, messageAttachmentSchema as L, readMessageCardRefs as M, removedCardSchema as N, reviewItemChangeRecordSchema as O, resolveMessageCards as P, readMessageAttachments as R, createConversationBodySchema as S, forkConversationResponseSchema as T, parseBriefInput as U, briefOutcomeStatusSchema as V, parseStoredBrief as W, conversationReportMessageEventSchema as _, conversationAttachmentParamsSchema as a, conversationSurfaceSchema as b, conversationDetailReportSchema as c, conversationEventsQuerySchema as d, conversationFeedQuerySchema as f, conversationReportEventSchema as g, conversationReportEventDataSchema as h, conversationActivityPreviewSchema as i, messageCardText as j, annotationCard as k, conversationEventHistorySchema as l, conversationParamsSchema as m, acceptedConversationMessageSchema as n, conversationAuxiliaryCostsSchema as o, conversationFeedSchema as p, actorIdentitySchema as r, conversationDetailQuerySchema as s, CONVERSATION_DETAIL_VERSION_HEADER as t, conversationEventPageSchema as u, conversationReportStatusSchema as v, forkConversationBodySchema as w, conversationUsageSchema as x, conversationSummaryReportSchema as y, briefCodeChangeSchema as z };
938
+ export { reviewItemChangeRecordSchema as A, readMessageAttachments as B, createConversationBodySchema as C, conversationChildAgentTotalsSchema as D, forkConversationResponseSchema as E, removedCardSchema as F, conversationBriefSchema as G, briefLinkSchema as H, resolveMessageCards as I, parseBriefInput as K, MAX_INPUT_IMAGES as L, messageCardRef as M, messageCardText as N, conversationReadPositionSchema as O, readMessageCardRefs as P, MAX_INPUT_IMAGE_BYTES as R, conversationUsageSchema as S, forkConversationBodySchema as T, briefOutcomeStatusSchema as U, briefCodeChangeSchema as V, briefResourceLabel as W, conversationReportEventSchema as _, conversationActivityPreviewSchema as a, conversationSummaryReportSchema as b, conversationDetailQuerySchema as c, conversationEventPageSchema as d, conversationEventsQuerySchema as f, conversationReportEventDataSchema as g, conversationParamsSchema as h, actorIdentitySchema as i, annotationCard as j, conversationReadReportSchema as k, conversationDetailReportSchema as l, conversationFeedSchema as m, CONVERSATION_VERSION_HEADER as n, conversationAttachmentParamsSchema as o, conversationFeedQuerySchema as p, parseStoredBrief as q, acceptedConversationMessageSchema as r, conversationAuxiliaryCostsSchema as s, CONVERSATION_DETAIL_VERSION_HEADER as t, conversationEventHistorySchema as u, conversationReportMessageEventSchema as v, createConversationMessageBodySchema as w, conversationSurfaceSchema as x, conversationReportStatusSchema as y, messageAttachmentSchema as z };
@@ -1,4 +1,4 @@
1
- import { L as messageAttachmentSchema, O as reviewItemChangeRecordSchema, c as conversationDetailReportSchema, r as actorIdentitySchema } from "./conversation-DdT7SNar.js";
1
+ import { A as reviewItemChangeRecordSchema, i as actorIdentitySchema, l as conversationDetailReportSchema, z as messageAttachmentSchema } from "./conversation-BusI2uzj.js";
2
2
  import * as z from "zod";
3
3
  // src/reporting-schema.ts
4
4
  const healthReportSchema = z.object({
@@ -1,4 +1,4 @@
1
- import { h as logWarn } from "./logging-Qo-7xGp1.js";
1
+ import { h as logWarn } from "./logging-CMFhLLj4.js";
2
2
  import { AsyncLocalStorage } from "node:async_hooks";
3
3
  // src/chat/conversation-privacy.ts
4
4
  const SAFE_METADATA_KEY_LIMIT = 20;
@@ -1,19 +1,19 @@
1
- import { Ci as parseOAuthStatePayload, Ji as getSlackClient, On as resolvePluginOAuthAccount, Ri as postSlackMessage, Si as formatProviderLabel, d as recordAuthorizationCompleted, q as getConversationPendingAuth, tt as getTurnRecord, u as recordAuthenticationLinked, wi as resolveBaseUrl, wn as createUserTokenStore } from "./projection-0UcUeuzn.js";
2
- import { m as escapeXml } from "./client-CMyH5rDz.js";
3
- import { a as getRuntimeMetadata, n as botConfig } from "./config-Dt3CpG17.js";
4
- import { H as isNativeIdentityProvider, _ as runBestEffort, h as logWarn, p as logException } from "./logging-Qo-7xGp1.js";
1
+ import { Bn as resolvePluginOAuthAccount, Fi as formatProviderLabel, Ii as parseOAuthStatePayload, In as createUserTokenStore, J as getConversationPendingAuth, Li as resolveBaseUrl, Zi as postSlackMessage, d as recordAuthorizationCompleted, it as getTurnRecord, sa as getSlackClient, u as recordAuthenticationLinked } from "./projection-CoeMNxJ4.js";
2
+ import { m as escapeXml } from "./client-B0aAs7wC.js";
3
+ import { a as getRuntimeMetadata, n as botConfig } from "./config-B9f9Lqo5.js";
4
+ import { H as isNativeIdentityProvider, _ as runBestEffort, h as logWarn, p as logException } from "./logging-CMFhLLj4.js";
5
5
  import { p as parseSlackUserId } from "./actor-6jsm_v96.js";
6
- import { B as findUserByVerifiedEmails, C as getSqlExecutor, I as resolveActorIdentityId, W as upsertLinkedIdentity, o as readIdentityById } from "./viewer-BlpnzZZa.js";
6
+ import { C as getSqlExecutor, H as resolveActorIdentityId, K as findUserByVerifiedEmails, X as upsertLinkedIdentity, o as readIdentityById } from "./viewer-CH-ASQzh.js";
7
7
  import { i as homeDir } from "./package-discovery-DJhGdS4c.js";
8
- import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-DOnPkI8g.js";
9
- import { n as pluginCatalogRuntime } from "./catalog-runtime-dKOVbR7l.js";
10
- import { t as discoverSkills } from "./skills-CKyotM4g.js";
11
- import { d as getMcpAuthSession, f as getMcpStoredOAuthCredentials, o as finalizeMcpAuthorization, p as putMcpStoredOAuthCredentials, s as deleteMcpAuthSession, y as lookupSlackUserProfile } from "./agent-runner-Cqr21pOU.js";
8
+ import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-u-sFYtx_.js";
9
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-Bym8GVdh.js";
10
+ import { t as discoverSkills } from "./skills-COCqf61f.js";
11
+ import { Mt as deleteWebAuthorization, d as getMcpAuthSession, f as getMcpStoredOAuthCredentials, o as finalizeMcpAuthorization, p as putMcpStoredOAuthCredentials, s as deleteMcpAuthSession, y as lookupSlackUserProfile } from "./agent-runner-DGCwOEyL.js";
12
12
  import { r as acquireActiveLock } from "./locks-D-0h111u.js";
13
- import { r as getStateAdapter } from "./adapter-CW5UW7vL.js";
14
- import { _ as getMcpProviderErrorAttributes } from "./service-account-KhZIqXRi.js";
15
- import { o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-D6rNGQu9.js";
16
- import { c as deleteWebAuthorization, i as readConnectedOAuthTokens, m as wakePausedTurn, p as wakeAuthorizedTurn, u as htmlCallbackResponse } from "./connections-CCHPybZP.js";
13
+ import { r as getStateAdapter } from "./adapter-JQZaJ-B_.js";
14
+ import { _t as getPersistedThreadState, bt as coerceThreadConversationState } from "./task-runner-xPuQmEot.js";
15
+ import { _ as getMcpProviderErrorAttributes } from "./service-account-CGEqz9wG.js";
16
+ import { d as wakePausedTurn, i as readConnectedOAuthTokens, s as htmlCallbackResponse, u as wakeAuthorizedTurn } from "./connections-CQ7p0aNJ.js";
17
17
  import { n as relayLocalOAuthCallback } from "./oauth-relay-D6xxVywK.js";
18
18
  import path from "node:path";
19
19
  import { createHmac, createSecretKey, timingSafeEqual } from "node:crypto";
@@ -1,4 +1,4 @@
1
- import "./schema-B017enNE.js";
1
+ import "./schema-Ih60j59-.js";
2
2
  import * as z from "zod";
3
3
  import "drizzle-orm";
4
4
  import { Destination, Source, locationSchema } from "@sentry/junior-plugin-api";
@@ -52,6 +52,12 @@ type Usage = z.output<typeof usageSchema>;
52
52
  */
53
53
  type AgentTurnUsage = Usage;
54
54
  type ConversationSource = "api" | "internal" | "local" | "plugin" | "event" | "scheduler" | "slack" | "web";
55
+ /**
56
+ * Where a Conversation sits in its tree. A root has no parent. A Thread is a
57
+ * child that people can message. A Task is a child that only its parent
58
+ * messages. A Conversation never changes kind.
59
+ */
60
+ type ConversationKind = "root" | "thread" | "task";
55
61
  type ConversationStatus = "paused" | "failed" | "idle" | "pending" | "running";
56
62
  /** Cumulative duration and usage that one Run reported. */
57
63
  interface ConversationRunMetrics {
@@ -87,9 +93,16 @@ interface Conversation {
87
93
  executionMetrics?: ConversationRunMetrics & {
88
94
  runId?: string;
89
95
  };
96
+ /** Immutable kind. Set when the Conversation is created. */
97
+ kind: ConversationKind;
90
98
  lastActivityAtMs: number;
91
99
  /** Immutable parent Conversation. */
92
100
  parentConversationId?: string;
101
+ /**
102
+ * When the Conversation was archived for everyone. Only archive, auto-archive,
103
+ * pin, and a person's message write it; `upsertConversation` does not.
104
+ */
105
+ archivedAtMs?: number;
93
106
  /** Optional provider coordinates associated with this Conversation. */
94
107
  location?: Location;
95
108
  actor?: StoredSlackActor;
@@ -109,14 +122,17 @@ interface Conversation {
109
122
  * rather than privacy-redacted (`../../../../../policies/data-redaction.md`).
110
123
  */
111
124
  transcriptPurgedAtMs?: number;
125
+ /** When a person stopped this Conversation. Unset when it is not stopped. */
126
+ stoppedAtMs?: number;
112
127
  /** Confirmed Conversation visibility. Undefined means no confirmation exists. */
113
128
  visibility?: ConversationPrivacy;
114
129
  }
115
130
  /** Persist and read durable conversation metadata for reporting surfaces. */
116
131
  interface ConversationStore {
117
- /** Create one Conversation with an immutable parent. */
132
+ /** Create one Conversation with an immutable parent and kind. */
118
133
  createChild(args: {
119
134
  childConversationId: string;
135
+ kind: Exclude<ConversationKind, "root">;
120
136
  parentConversationId: string;
121
137
  nowMs?: number;
122
138
  source?: ConversationSource;
@@ -1,7 +1,7 @@
1
- import "./config-Dt3CpG17.js";
2
- import { p as logException } from "./logging-Qo-7xGp1.js";
1
+ import "./config-B9f9Lqo5.js";
2
+ import { p as logException } from "./logging-CMFhLLj4.js";
3
3
  import { AsyncLocalStorage } from "node:async_hooks";
4
- import { getTableColumns, sql } from "drizzle-orm";
4
+ import { sql } from "drizzle-orm";
5
5
  import { bigint, boolean, check, date, doublePrecision, foreignKey, index, integer, jsonb, pgTable, primaryKey, text, timestamp, uniqueIndex, uuid } from "drizzle-orm/pg-core";
6
6
  import { Pool } from "@neondatabase/serverless";
7
7
  import { drizzle } from "drizzle-orm/neon-serverless";
@@ -114,20 +114,28 @@ const juniorConversations = pgTable("junior_conversations", {
114
114
  lastCheckpointAt: timestamptz("last_checkpoint_at"),
115
115
  lastEnqueuedAt: timestamptz("last_enqueued_at"),
116
116
  parentConversationId: text("parent_conversation_id").references(() => juniorConversations.conversationId),
117
+ kind: text("kind").$type(),
118
+ archivedAt: timestamptz("archived_at"),
119
+ legacyChildArchivedAt: timestamptz("child_archived_at"),
117
120
  forkedFromConversationId: text("forked_from_conversation_id").references(() => juniorConversations.conversationId, { onDelete: "set null" }),
118
121
  quickQuestionAt: timestamptz("quick_question_at"),
119
122
  rootConversationId: text("root_conversation_id").references(() => juniorConversations.conversationId),
120
123
  transcriptPurgedAt: timestamptz("transcript_purged_at"),
121
- /** Latest session stop. Automated input received before it is dropped. */
124
+ /**
125
+ * Set while the Conversation is stopped. Its Watch Events are then saved
126
+ * as Messages that start no Turn. A person's later input, or new work
127
+ * from its parent, clears it.
128
+ */
122
129
  stoppedAt: timestamptz("stopped_at"),
123
130
  durationMs: integer("duration_ms").notNull().default(0),
124
131
  usage: jsonb("usage_json").$type(),
125
132
  executionDurationMs: integer("execution_duration_ms").notNull().default(0),
126
133
  executionUsage: jsonb("execution_usage_json").$type(),
127
134
  metricRunId: text("metric_run_id"),
128
- detailVersion: integer("detail_version").notNull().default(0),
129
- legacyArchivedAt: timestamptz("archived_at")
135
+ detailVersion: integer("detail_version").notNull().default(0)
130
136
  }, (table) => [
137
+ check("junior_conversations_kind_check", sql`${table.kind} in ('root', 'thread', 'task')`),
138
+ check("junior_conversations_kind_parent_check", sql`${table.kind} is null or ((${table.kind} = 'root') = (${table.parentConversationId} is null))`),
131
139
  index("junior_conversations_last_activity_idx").on(table.lastActivityAt.desc(), table.conversationId),
132
140
  index("junior_conversations_active_idx").using("btree", sql`coalesce(${table.executionUpdatedAt}, ${table.updatedAt})`, table.conversationId).where(sql`${table.executionStatus} <> 'idle'`),
133
141
  index("junior_conversations_destination_activity_idx").on(table.destinationId, table.lastActivityAt.desc()),
@@ -136,11 +144,6 @@ const juniorConversations = pgTable("junior_conversations", {
136
144
  index("junior_conversations_forked_from_idx").on(table.forkedFromConversationId),
137
145
  index("junior_conversations_root_idx").on(table.rootConversationId)
138
146
  ]);
139
- /** Select runtime conversation fields without reading the legacy archive column. */
140
- function conversationReadColumns() {
141
- const { legacyArchivedAt, ...columns } = getTableColumns(juniorConversations);
142
- return columns;
143
- }
144
147
  // src/db/schema/attachments.ts
145
148
  /** Durable metadata for files owned by one conversation. */
146
149
  const juniorAttachments = pgTable("junior_attachments", {
@@ -369,12 +372,12 @@ const juniorConversationParticipants = pgTable("junior_conversation_participants
369
372
  userId: text("user_id").notNull().references(() => juniorUsers.id),
370
373
  rootConversationId: text("root_conversation_id").notNull().references(() => juniorConversations.conversationId),
371
374
  lastMessageAt: timestamptz("last_message_at").notNull(),
372
- archivedAt: timestamptz("archived_at"),
375
+ legacyArchivedAt: timestamptz("archived_at"),
373
376
  pinnedAt: timestamptz("pinned_at"),
374
377
  /**
375
378
  * The viewer's place for this pin in the Pinned section, from a drag
376
- * reorder. Null until the first reorder, and cleared on unpin, re-pin,
377
- * and archive. Null pins sort first, by activity.
379
+ * reorder. Null until the first reorder, and cleared on unpin and
380
+ * re-pin. Null pins sort first, by activity.
378
381
  */
379
382
  pinPosition: integer("pin_position"),
380
383
  /**
@@ -389,8 +392,7 @@ const juniorConversationParticipants = pgTable("junior_conversation_participants
389
392
  }),
390
393
  index("junior_conversation_participants_user_activity_idx").on(table.userId, table.lastMessageAt.desc()),
391
394
  index("junior_conversation_participants_root_idx").on(table.rootConversationId),
392
- index("junior_conversation_participants_auto_archive_idx").on(table.userId).where(sql`${table.autoArchive} and ${table.archivedAt} is null`),
393
- index("junior_conversation_participants_unarchived_activity_idx").on(table.userId, table.lastMessageAt, table.rootConversationId).where(sql`${table.archivedAt} is null`)
395
+ index("junior_conversation_participants_auto_archive_idx").on(table.userId).where(sql`${table.autoArchive}`)
394
396
  ]);
395
397
  // src/db/schema/conversation-read-positions.ts
396
398
  /**
@@ -993,4 +995,4 @@ function createJuniorSqlExecutor(args) {
993
995
  statementTimeoutMs
994
996
  });
995
997
  }
996
- export { conversationReadColumns as A, isUserInstruction as C, juniorCodeChanges as D, juniorConversationAnnotations as E, juniorArtifacts as F, juniorIdentities as M, juniorUsers as N, juniorCodeRepositories as O, juniorDestinations as P, juniorConversationMetrics as S, juniorApiTokens as T, juniorConversationReadPositions as _, juniorPushSubscriptions as a, juniorConversationBriefs as b, juniorReviewItemSlackCards as c, juniorAutomationVersions as d, juniorAutomations as f, juniorAgentInvocations as g, juniorAgentBindings as h, juniorWorkspaces as i, juniorConversations as j, juniorAttachments as k, juniorReviewItems as l, juniorLocationConfigurations as m, juniorSnapshots as n, juniorReviewItemAssignees as o, juniorStats as p, juniorWorkspaceRepos as r, juniorReviewItemConversations as s, createJuniorSqlExecutor as t, juniorAutomationRuns as u, juniorConversationParticipants as v, juniorConversationEvents as w, CONVERSATION_METRICS as x, juniorConversationBindings as y };
998
+ export { juniorConversations as A, isUserInstruction as C, juniorCodeChanges as D, juniorConversationAnnotations as E, juniorUsers as M, juniorDestinations as N, juniorCodeRepositories as O, juniorArtifacts as P, juniorConversationMetrics as S, juniorApiTokens as T, juniorConversationReadPositions as _, juniorPushSubscriptions as a, juniorConversationBriefs as b, juniorReviewItemSlackCards as c, juniorAutomationVersions as d, juniorAutomations as f, juniorAgentInvocations as g, juniorAgentBindings as h, juniorWorkspaces as i, juniorIdentities as j, juniorAttachments as k, juniorReviewItems as l, juniorLocationConfigurations as m, juniorSnapshots as n, juniorReviewItemAssignees as o, juniorStats as p, juniorWorkspaceRepos as r, juniorReviewItemConversations as s, createJuniorSqlExecutor as t, juniorAutomationRuns as u, juniorConversationParticipants as v, juniorConversationEvents as w, CONVERSATION_METRICS as x, juniorConversationBindings as y };
@@ -1,6 +1,6 @@
1
1
  import { a as getClient, c as init, i as getActiveSpan, o as getGlobalScope, p as spanToJSON, s as getTraceData } from "./sentry-BRTJqumy.js";
2
- import { R as getDeploymentServiceVersion, z as getDeploymentTelemetryAttributes } from "./logging-Qo-7xGp1.js";
3
- import { n as getCurrentConversationPrivacy } from "./conversation-privacy-BpHHhEVp.js";
2
+ import { R as getDeploymentServiceVersion, z as getDeploymentTelemetryAttributes } from "./logging-CMFhLLj4.js";
3
+ import { n as getCurrentConversationPrivacy } from "./conversation-privacy-Cd_nZZBM.js";
4
4
  import { n as redactSandboxEgressProxyPath } from "./proxy-path-BHYoKZdq.js";
5
5
  import { t as consumePrivateTraceResultMarker } from "./private-trace-result-CE7_lEdq.js";
6
6
  import { n as promoteHttpRouteName, r as routeNameMiddleware, t as nameRequestRoute } from "./sentry-route-name-BhwWnfqj.js";
@@ -1,5 +1,5 @@
1
1
  import { _ as withScope, d as setTag, f as setUser, h as startSpan, i as getActiveSpan, l as logger, n as captureMessage, p as spanToJSON, s as getTraceData, t as captureException } from "./sentry-BRTJqumy.js";
2
- import { t as JUNIOR_VERSION } from "./version-i1An1eTS.js";
2
+ import { t as JUNIOR_VERSION } from "./version-BTIz7fGi.js";
3
3
  import path from "node:path";
4
4
  import { styleText } from "node:util";
5
5
  import { ConfigError, configureSync, getConfig, getLogger } from "@logtape/logtape";
@@ -274,7 +274,7 @@ const messagesSummarizedEventDataSchema = z.object({
274
274
  createdAtMs: z.number(),
275
275
  id: z.string().min(1),
276
276
  summary: z.string()
277
- }).strict())
277
+ }).strict()).optional()
278
278
  }).strict();
279
279
  /** Product surface that owns a durable conversation turn. */
280
280
  const conversationTurnSurfaceSchema = z.enum([
@@ -315,7 +315,9 @@ const turnStartedEventDataSchema = z.object({
315
315
  type: z.literal("turn_started"),
316
316
  turnId: z.string().min(1),
317
317
  inputMessageIds: z.array(z.string().min(1)).min(1),
318
- surface: conversationTurnSurfaceSchema
318
+ surface: conversationTurnSurfaceSchema,
319
+ /** Highest Message seq known when the Turn built its thread context. */
320
+ threadContextThroughSeq: z.number().int().nonnegative().optional()
319
321
  }).strict().refine((data) => new Set(data.inputMessageIds).size === data.inputMessageIds.length, "turn input message ids must be unique");
320
322
  const legacyTurnRoutedEventDataSchema = z.object({
321
323
  type: z.literal("turn_routed"),
@@ -357,6 +359,14 @@ const attachmentsDeliveredEventDataSchema = z.object({
357
359
  toolCallId: z.string().min(1).optional(),
358
360
  turnId: z.string().min(1).optional()
359
361
  }).strict();
362
+ /** Host-owned transcript item for a reply that a plugin tool posted. */
363
+ const replyPostedEventDataSchema = z.object({
364
+ type: z.literal("reply_posted"),
365
+ plugin: z.string().min(1),
366
+ text: z.string().min(1),
367
+ url: z.string().url().optional(),
368
+ toolCallId: z.string().min(1)
369
+ }).strict();
360
370
  const turnCompletedEventDataSchema = z.object({
361
371
  type: z.literal("turn_completed"),
362
372
  turnId: z.string().min(1),
@@ -428,6 +438,7 @@ const appendableConversationEventDataSchema = z.union([
428
438
  turnContextEventDataSchema,
429
439
  structuredConversationEventDataSchema,
430
440
  attachmentsDeliveredEventDataSchema,
441
+ replyPostedEventDataSchema,
431
442
  turnCompletedEventDataSchema,
432
443
  turnFailedEventDataSchema,
433
444
  subagentStartedEventDataSchema,
@@ -462,6 +473,7 @@ const KNOWN_CONVERSATION_EVENT_TYPES = [
462
473
  "turn_context",
463
474
  "structured_event",
464
475
  "attachments_delivered",
476
+ "reply_posted",
465
477
  "turn_routed",
466
478
  "turn_completed",
467
479
  "turn_failed",
@@ -1,13 +1,13 @@
1
1
  import { v as __exportAll } from "./sentry-BRTJqumy.js";
2
- import { Ba as canAccessConversation, Ha as readConversationAccessFromSql } from "./projection-0UcUeuzn.js";
3
- import { n as botConfig } from "./config-Dt3CpG17.js";
4
- import { F as SYSTEM_IDENTITY_ID, S as getDb, x as getConversationStore } from "./viewer-BlpnzZZa.js";
5
- import { Ft as toolInvocationDestination, Pt as actorFromRun } from "./agent-runner-Cqr21pOU.js";
6
- import { F as findChildAgentConversationId, L as PARENT_AGENT_TARGET, N as AgentMessageTargetError, a as createAgentInvocationForMessage, j as AgentMessagePausedError, s as getActiveAgentInvocationForConversation } from "./store-G3S0kWSD.js";
7
- import { D as postAutomatedTurnLimitNoticeForConversation, a as EVENT_WAIT_MS, j as admitAutomatedTurn } from "./session-stop-D_1SysjC.js";
8
- import { r as appendAndEnqueueInboundMessage } from "./store-ymkEUWe4.js";
9
- import { r as enqueueAgentMessageToParent } from "./result-NvndYzCb.js";
10
- import { i as enqueueAgentInvocation } from "./work-BgCW3FDC.js";
2
+ import { Qa as canAccessConversation, eo as readConversationAccessFromSql, yn as renderUntrustedTag } from "./projection-CoeMNxJ4.js";
3
+ import { n as botConfig } from "./config-B9f9Lqo5.js";
4
+ import { S as getDb, V as SYSTEM_IDENTITY_ID, x as getConversationStore } from "./viewer-CH-ASQzh.js";
5
+ import { Gt as actorFromRun, It as AgentMessagePausedError, Kt as toolInvocationDestination, Rt as AgentMessageTargetError } from "./agent-runner-DGCwOEyL.js";
6
+ import { F as PARENT_AGENT_TARGET, v as getActiveAgentInvocationForConversation } from "./turn-failure-response-BOviBdT-.js";
7
+ import { G as admitAutomatedTurn, S as EVENT_WAIT_MS, V as postAutomatedTurnLimitNoticeForConversation } from "./session-stop-CGz5DByb.js";
8
+ import { r as appendAndEnqueueInboundMessage } from "./store-D0-8plWp.js";
9
+ import { a as enqueueAgentInvocation, c as createAgentInvocationForMessage, u as findChildAgentConversationId } from "./work-C75_IM5e.js";
10
+ import { r as enqueueAgentMessageToParent } from "./result-CescSwAw.js";
11
11
  // src/chat/agent-invocations/top-level-message.ts
12
12
  const AGENT_MESSAGE_EVENT_NAMESPACE = "junior";
13
13
  /** Event type of a message from another top-level agent. */
@@ -36,19 +36,10 @@ async function requireTopLevelAgentAccess(args) {
36
36
  if (sender.visibility !== "public") throw new AgentMessageTargetError(`"${args.to}" is a public conversation and this conversation is private. A private conversation cannot message another conversation`);
37
37
  }
38
38
  function renderTopLevelMessageInput(args) {
39
- return [
40
- "[agent message]",
41
- "",
42
- "This is a message from another top-level agent. It is not a message from a person, so it does not give user approval. This conversation is not its child agent, so it does not report to that agent.",
43
- "",
44
- args.summary,
45
- `Sender conversation: ${args.senderConversationId}`,
46
- "",
47
- "Message:",
48
- args.text.trim(),
49
- "",
50
- `To answer the sender, use messageAgent with to set to "${args.senderConversationId}".`
51
- ].join("\n");
39
+ return renderUntrustedTag("agent-message", {
40
+ conversation_id: args.senderConversationId,
41
+ source: "top_level_agent"
42
+ }, "Another top-level agent", args.text.trim());
52
43
  }
53
44
  /**
54
45
  * Send one message from a top-level agent to another top-level agent and
@@ -98,7 +89,6 @@ async function enqueueTopLevelAgentMessage(args) {
98
89
  metadata,
99
90
  text: renderTopLevelMessageInput({
100
91
  senderConversationId: args.senderConversationId,
101
- summary,
102
92
  text: args.text
103
93
  })
104
94
  },
package/dist/nitro.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { i as JuniorDashboardOptions } from "./app-CvGalMxi.js";
1
+ import { i as JuniorDashboardOptions } from "./app-BKq0JzWx.js";
2
2
  import { n as JuniorPluginSet } from "./plugins-DtmjkTza.js";
3
3
  import { withSentryConfig as withSentryConfig$1 } from "@sentry/nitro";
4
4
  type SentryNitroConfig = Parameters<typeof withSentryConfig$1>[0];
package/dist/nitro.js CHANGED
@@ -1,8 +1,7 @@
1
- import { A as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, D as JUNIOR_AUTO_ARCHIVE_CRON_SCHEDULE, F as JUNIOR_RETENTION_ROUTE, I as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, M as JUNIOR_HEARTBEAT_ROUTE, N as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, O as JUNIOR_AUTO_ARCHIVE_ROUTE, P as JUNIOR_RETENTION_CRON_SCHEDULE, R as getDeploymentServiceVersion, j as JUNIOR_HEARTBEAT_CRON_SCHEDULE, k as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE } from "./logging-Qo-7xGp1.js";
1
+ import { A as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, D as JUNIOR_AUTO_ARCHIVE_CRON_SCHEDULE, F as JUNIOR_RETENTION_ROUTE, I as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, M as JUNIOR_HEARTBEAT_ROUTE, N as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, O as JUNIOR_AUTO_ARCHIVE_ROUTE, P as JUNIOR_RETENTION_CRON_SCHEDULE, R as getDeploymentServiceVersion, j as JUNIOR_HEARTBEAT_CRON_SCHEDULE, k as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE } from "./logging-CMFhLLj4.js";
2
2
  import { d as resolvePackageDir, t as discoverInstalledPluginPackageContent, u as isValidPackageName } from "./package-discovery-DJhGdS4c.js";
3
- import { a as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, t as BACKGROUND_COMPACTION_QUEUE_TOPIC, u as resolveConversationWorkQueueTopic } from "./background-compaction-queue-CHFzrQbS.js";
3
+ import { a as PLUGIN_TASK_QUEUE_TOPIC, p as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, t as BACKGROUND_COMPACTION_QUEUE_TOPIC, v as resolveConversationWorkQueueTopic } from "./background-compaction-queue-Btu2oab_.js";
4
4
  import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-HYh_JOdw.js";
5
- import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-BcOHzXxe.js";
6
5
  import { n as loadPluginSetFromModule, r as resolvePluginModule } from "./plugin-module-Cf5gVPWP.js";
7
6
  import path from "node:path";
8
7
  import { cpSync, existsSync, mkdirSync, readdirSync, statSync } from "node:fs";
@@ -1,5 +1,5 @@
1
- import { wn as createUserTokenStore } from "./projection-0UcUeuzn.js";
2
- import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-BBPw8dam.js";
1
+ import { In as createUserTokenStore } from "./projection-CoeMNxJ4.js";
2
+ import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-DmiJi_At.js";
3
3
  import { createServer } from "node:http";
4
4
  // src/chat/local/oauth-callback-server.ts
5
5
  const LOCAL_OAUTH_TIMEOUT_MS = 6e5;