@sentry/junior 0.319.0 → 0.321.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 (58) hide show
  1. package/dist/{adapter-8_S6Birm.js → adapter-BkDQYdg6.js} +1 -1
  2. package/dist/{admin-EsbUON1j.js → admin-XS3G9BOj.js} +1 -1
  3. package/dist/{agent-CtzMl32d.js → agent-CL9ZkOgx.js} +45 -52
  4. package/dist/{agent-update-delivery-pAvsbuGL.js → agent-update-delivery-t0bXEgPs.js} +4 -4
  5. package/dist/api/schema.d.ts +4 -12
  6. package/dist/api/schema.js +4 -4
  7. package/dist/api.js +30 -25
  8. package/dist/{app-tACXxJPI.d.ts → app-CwFRvmEH.d.ts} +2 -1
  9. package/dist/app.d.ts +1 -1
  10. package/dist/app.js +22 -219
  11. package/dist/{change-record-K-KsqNhT.d.ts → change-record-CRuG9Mu3.d.ts} +1 -6
  12. package/dist/{channel-access-DET5hzZM.js → channel-access-BUHB0saC.js} +1 -1
  13. package/dist/{chat-core-engine-DpM3tMVi.js → chat-core-engine-DuBaPbqK.js} +31 -14
  14. package/dist/cli/chat.js +16 -16
  15. package/dist/cli/check.js +4 -4
  16. package/dist/cli/main.js +2 -2
  17. package/dist/cli/plugins.js +3 -3
  18. package/dist/cli/snapshot-create.js +4 -4
  19. package/dist/cli/upgrade.js +2 -2
  20. package/dist/{continue-in-slack-CFzDyxkH.js → continue-in-slack-D9naZmqM.js} +3 -3
  21. package/dist/{conversation-feed-DEUdD7mb.js → conversation-feed-B1_1NJc8.js} +2 -12
  22. package/dist/{conversation-privacy-C2vYK55O.js → conversation-privacy-C0mixZKx.js} +1 -1
  23. package/dist/{create-Ta3SEIB5.js → create-CLV0M1vw.js} +2 -2
  24. package/dist/{credential-sync-DyRqDmY4.js → credential-sync-DL9r-ry5.js} +11 -11
  25. package/dist/{db-BCaNWl9p.js → db-CbURDbaB.js} +49 -28
  26. package/dist/{deployment-CfOew1Tm.js → deployment-D9uPRDMD.js} +1 -1
  27. package/dist/{engine-context-CiExoy1B.js → engine-context-BP0h6u4m.js} +389 -13
  28. package/dist/{html-Bb2Si1bR.js → html-l4hKICAL.js} +4 -4
  29. package/dist/instrumentation.js +2 -2
  30. package/dist/{list-wwDcROh9.js → list-cGaO9_Hf.js} +12 -37
  31. package/dist/{logging-BRPTXAdf.js → logging-CqgOoICc.js} +1 -1
  32. package/dist/{markers-9QoqW5ov.js → markers-BtUv4-oc.js} +40 -37
  33. package/dist/nitro.d.ts +1 -1
  34. package/dist/nitro.js +2 -2
  35. package/dist/{oauth-callback-server-vhL9b-PZ.js → oauth-callback-server-C3GxhsuB.js} +2 -2
  36. package/dist/{oauth-relay-CH2v7WiB.js → oauth-relay-BGm6sLCB.js} +1 -1
  37. package/dist/{profile-D9LdwmZi.js → profile-bLo0h7Le.js} +12 -6
  38. package/dist/{prompt-3TqxEOtc.js → prompt-CX29OGO9.js} +1 -1
  39. package/dist/{reports-K-tbtEyx.js → reports-DeDCCu_H.js} +2 -2
  40. package/dist/{resolve-BBV2qf8A.js → resolve-D9RKNH3v.js} +5 -5
  41. package/dist/{result-5IdGJP4M.js → result-BFBwK1M2.js} +7 -7
  42. package/dist/{runner-BK_joPlM.js → runner-DNdoVQg8.js} +7 -7
  43. package/dist/{sandbox-egress-signals-DXgWXXmm.js → sandbox-egress-signals-BBcCiEhm.js} +1 -1
  44. package/dist/{schema-zWGG6VC1.js → schema-RzsplzdI.js} +5 -3
  45. package/dist/{service-account-CateFyhw.js → service-account-B7E7OIFP.js} +2 -2
  46. package/dist/{skills-Ccjw8h2P.js → skills-DMJsS5e4.js} +4 -4
  47. package/dist/{slack-conversation-unfurl-ZC_TSpc4.js → slack-conversation-unfurl-EWYTnBZI.js} +7 -7
  48. package/dist/{storage-C9U7R5rM.js → storage-XD0lB4Gk.js} +2 -2
  49. package/dist/{system-prompt-table-YBTHIFlP.js → system-prompt-table-C886lsT9.js} +4 -4
  50. package/dist/{types-BNHkJrOP.js → types-CGgQ3-Bb.js} +1 -9
  51. package/dist/{users-CCRAqYb_.js → users-DBrcQl47.js} +1 -1
  52. package/dist/{validation-BCUpJa8K.js → validation-CofUHWqz.js} +1 -1
  53. package/dist/{version-BNm0JYj3.js → version-D_vbXyNw.js} +1 -1
  54. package/dist/version.js +1 -1
  55. package/dist/{worker-BhgpZ7_b.js → worker-buhFcpl9.js} +4 -4
  56. package/migrations/20261127150242_drop_space_members/migration.sql +9 -0
  57. package/migrations/20261127150242_drop_space_members/snapshot.json +53 -0
  58. package/package.json +6 -6
@@ -1,9 +1,9 @@
1
- import { R as getChatConfig } from "./adapter-8_S6Birm.js";
2
- import { Ap as juniorTurns, d as createSqlConversationEventStore, i as getConversationStore, yc as SYSTEM_IDENTITY_ID } from "./db-BCaNWl9p.js";
1
+ import { R as getChatConfig } from "./adapter-BkDQYdg6.js";
2
+ import { Op as juniorTurns, d as createSqlConversationEventStore, i as getConversationStore, vc as SYSTEM_IDENTITY_ID } from "./db-CbURDbaB.js";
3
3
  import { t as startLocalVercelQueueServer } from "./local-server-CpnGhYml.js";
4
- import { fi as projectConversationEvents } from "./markers-9QoqW5ov.js";
5
- import { n as TURN_STEP_TOPIC } from "./topic-B2EWKKBT.js";
6
- import { a as turnStepConsumer, i as createGatewayModelClient, n as turnTools, o as scheduleInput, t as createEngineContext } from "./engine-context-CiExoy1B.js";
4
+ import { mi as projectConversationEvents } from "./markers-BtUv4-oc.js";
5
+ import { n as TURN_STEP_TOPIC, t as TURN_ENDED_TOPIC } from "./topic-B2EWKKBT.js";
6
+ import { a as createGatewayModelClient, i as turnTools, o as turnStepConsumer, r as turnEndedConsumer, s as scheduleInput, t as createEngineContext } from "./engine-context-BP0h6u4m.js";
7
7
  import { eq } from "drizzle-orm";
8
8
  import { localDestinationSchema } from "@sentry/junior-plugin-api";
9
9
  import { randomUUID } from "node:crypto";
@@ -17,11 +17,11 @@ function turnGroupKey(actorIdentityId, source) {
17
17
  /**
18
18
  * `junior chat --engine core -p`: one message through the core Turn engine.
19
19
  *
20
- * The CLI is the Source. It schedules the message as an input, runs a local
21
- * Vercel Queues server that pushes each Turn step message to the Turn step
22
- * consumer in this process, and reads the reply from the stored history when
23
- * the Turn ends. The engine has no Delivery yet, so
24
- * the history is the only place that has the reply.
20
+ * The CLI is the Source. It runs a local Vercel Queues server that pushes
21
+ * each Turn step message and Turn-ended message to their consumers in this
22
+ * process, and reads the reply from the stored history when the Turn ends.
23
+ * The Turn has no Destination, so the history is the only place that has
24
+ * the reply.
25
25
  */
26
26
  const LOCAL_ACTOR = {
27
27
  fullName: "Local CLI",
@@ -31,20 +31,24 @@ const LOCAL_ACTOR = {
31
31
  };
32
32
  const TURN_POLL_INTERVAL_MS = 250;
33
33
  const TURN_STEP_CALLBACK_URL = `http://cli.localhost/${TURN_STEP_TOPIC}`;
34
+ const TURN_ENDED_CALLBACK_URL = `http://cli.localhost/${TURN_ENDED_TOPIC}`;
35
+ const NO_DELIVERY = { send: async () => {
36
+ throw new Error("The CLI has no Destination to send a reply to");
37
+ } };
34
38
  const TURN_WAIT_TIMEOUT_MS = 6e5;
35
39
  const ENDED_STATES = /* @__PURE__ */ new Set([
36
40
  "completed",
37
41
  "failed",
38
42
  "cancelled"
39
43
  ]);
40
- async function waitForTurnEnd({ executor }, turnId) {
44
+ async function waitForTurnEnd({ executor }, turnId, endHandled) {
41
45
  const deadline = Date.now() + TURN_WAIT_TIMEOUT_MS;
42
46
  while (Date.now() < deadline) {
43
47
  const [turn] = await executor.db().select({
44
48
  state: juniorTurns.state,
45
49
  endReason: juniorTurns.endReason
46
50
  }).from(juniorTurns).where(eq(juniorTurns.id, turnId));
47
- if (turn && ENDED_STATES.has(turn.state)) return turn;
51
+ if (turn && ENDED_STATES.has(turn.state) && endHandled()) return turn;
48
52
  await setTimeout(TURN_POLL_INTERVAL_MS);
49
53
  }
50
54
  throw new Error(`Turn ${turnId} did not end within ${TURN_WAIT_TIMEOUT_MS} ms`);
@@ -68,13 +72,26 @@ async function runCoreEnginePrompt(args) {
68
72
  bot: config.bot,
69
73
  tools: turnTools
70
74
  }));
75
+ let endHandled = false;
76
+ const turnEnds = turnEndedConsumer(engineCtx, NO_DELIVERY);
77
+ const turnEndedCallback = engineCtx.queue.createCallback({
78
+ ...turnEnds,
79
+ handler: async (payload, metadata) => {
80
+ await turnEnds.handler(payload, metadata);
81
+ endHandled = true;
82
+ }
83
+ });
71
84
  const server = await startLocalVercelQueueServer({
72
85
  consumers: [{
73
86
  consumerGroup: "local",
74
87
  topic: TURN_STEP_TOPIC,
75
88
  url: TURN_STEP_CALLBACK_URL
89
+ }, {
90
+ consumerGroup: "local",
91
+ topic: TURN_ENDED_TOPIC,
92
+ url: TURN_ENDED_CALLBACK_URL
76
93
  }],
77
- fetch: async (request) => request.url === TURN_STEP_CALLBACK_URL ? turnStepCallback(request) : new Response(null, { status: 404 }),
94
+ fetch: async (request) => request.url === TURN_STEP_CALLBACK_URL ? turnStepCallback(request) : request.url === TURN_ENDED_CALLBACK_URL ? turnEndedCallback(request) : new Response(null, { status: 404 }),
78
95
  port
79
96
  });
80
97
  try {
@@ -108,7 +125,7 @@ async function runCoreEnginePrompt(args) {
108
125
  destination: null,
109
126
  delivery: "defer"
110
127
  });
111
- const turn = await waitForTurnEnd(engineCtx, turnId);
128
+ const turn = await waitForTurnEnd(engineCtx, turnId, () => endHandled);
112
129
  if (turn.state !== "completed") return {
113
130
  outcome: turn.state === "cancelled" ? "cancelled" : "failed",
114
131
  reason: turn.endReason ?? turn.state
package/dist/cli/chat.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { t as loadAppPluginSet } from "../plugin-module-Cv2ETe8Y.js";
2
- import { G as loadConfig, W as installChatConfig } from "../adapter-8_S6Birm.js";
3
- import { on as createAgentRunner, t as executeAgentRun } from "../agent-CtzMl32d.js";
2
+ import { G as loadConfig, W as installChatConfig } from "../adapter-BkDQYdg6.js";
3
+ import { on as createAgentRunner, t as executeAgentRun } from "../agent-CL9ZkOgx.js";
4
4
  import path from "node:path";
5
5
  import { createHash, randomUUID } from "node:crypto";
6
6
  import { stderr, stdin, stdout } from "node:process";
@@ -109,9 +109,9 @@ async function loadLocalPluginSet() {
109
109
  async function configureLocalChatPlugins(pluginSet) {
110
110
  const [pluginsModule, appContextModule, validationModule, databaseModule] = await Promise.all([
111
111
  import("../plugins-D_Ru4CWc.js").then((n) => n.o),
112
- import("../db-BCaNWl9p.js").then((n) => n.Nd),
113
- import("../validation-BCUpJa8K.js").then((n) => n.r),
114
- import("../db-BCaNWl9p.js").then((n) => n.t)
112
+ import("../db-CbURDbaB.js").then((n) => n.jd),
113
+ import("../validation-CofUHWqz.js").then((n) => n.r),
114
+ import("../db-CbURDbaB.js").then((n) => n.t)
115
115
  ]);
116
116
  const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
117
117
  const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
@@ -164,17 +164,17 @@ function localDevServerUrl() {
164
164
  async function prepareLocalChatRun(io, pluginSet) {
165
165
  installLocalChatConfig({ eventEmbeddings: { enabled: true } });
166
166
  await configureLocalChatPlugins(pluginSet);
167
- const { runLocalAgentTurn } = await import("../runner-BK_joPlM.js");
168
- const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-vhL9b-PZ.js");
169
- const { createLocalOAuthState } = await import("../oauth-relay-CH2v7WiB.js").then((n) => n.t);
170
- const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-DXgWXXmm.js");
171
- const { bindSpawnAgent } = await import("../agent-CtzMl32d.js").then((n) => n.nn);
172
- const { bindMessageAgent } = await import("../agent-CtzMl32d.js").then((n) => n.an);
173
- const { runConversation } = await import("../agent-CtzMl32d.js").then((n) => n.Y);
174
- const { createConversationTurnWorker } = await import("../agent-CtzMl32d.js").then((n) => n.X);
175
- const { resumeForPersonInput } = await import("../markers-9QoqW5ov.js").then((n) => n.N);
167
+ const { runLocalAgentTurn } = await import("../runner-DNdoVQg8.js");
168
+ const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-C3GxhsuB.js");
169
+ const { createLocalOAuthState } = await import("../oauth-relay-BGm6sLCB.js").then((n) => n.t);
170
+ const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-BBcCiEhm.js");
171
+ const { bindSpawnAgent } = await import("../agent-CL9ZkOgx.js").then((n) => n.nn);
172
+ const { bindMessageAgent } = await import("../agent-CL9ZkOgx.js").then((n) => n.an);
173
+ const { runConversation } = await import("../agent-CL9ZkOgx.js").then((n) => n.Y);
174
+ const { createConversationTurnWorker } = await import("../agent-CL9ZkOgx.js").then((n) => n.X);
175
+ const { resumeForPersonInput } = await import("../markers-BtUv4-oc.js").then((n) => n.M);
176
176
  const { createLocalConversationWork } = await import("../conversation-work-BaT_T6EB.js");
177
- const { processConversationWork } = await import("../worker-BhgpZ7_b.js").then((n) => n.n);
177
+ const { processConversationWork } = await import("../worker-buhFcpl9.js").then((n) => n.n);
178
178
  let agentRunner;
179
179
  const localConversationWork = createLocalConversationWork(async (message) => {
180
180
  if (!agentRunner) throw new Error("Local agent runner is not ready");
@@ -241,7 +241,7 @@ async function runPrompt(options, io, pluginSet) {
241
241
  async function runCorePrompt(options, io, pluginSet) {
242
242
  installLocalChatConfig();
243
243
  await configureLocalChatPlugins(pluginSet);
244
- const { runCoreEnginePrompt } = await import("../chat-core-engine-DpM3tMVi.js");
244
+ const { runCoreEnginePrompt } = await import("../chat-core-engine-DuBaPbqK.js");
245
245
  const result = await runCoreEnginePrompt({
246
246
  conversationId: newRunConversationId(),
247
247
  message: options.message
package/dist/cli/check.js CHANGED
@@ -1,7 +1,7 @@
1
- import { G as mapBounded } from "../prompt-3TqxEOtc.js";
2
- import { a as parseSkillFile } from "../skills-Ccjw8h2P.js";
3
- import { a as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, m as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, s as JUNIOR_HEARTBEAT_ROUTE } from "../deployment-CfOew1Tm.js";
4
- import { Mf as parseInlinePluginManifest, Nf as parsePluginManifest } from "../db-BCaNWl9p.js";
1
+ import { G as mapBounded } from "../prompt-CX29OGO9.js";
2
+ import { a as parseSkillFile } from "../skills-DMJsS5e4.js";
3
+ import { a as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, m as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, s as JUNIOR_HEARTBEAT_ROUTE } from "../deployment-D9uPRDMD.js";
4
+ import { Af as parseInlinePluginManifest, jf as parsePluginManifest } from "../db-CbURDbaB.js";
5
5
  import * as z from "zod";
6
6
  import path from "node:path";
7
7
  import { mentionsTag } from "@sentry/junior-plugin-api";
package/dist/cli/main.js CHANGED
@@ -45,10 +45,10 @@ async function runChat(argv, pluginSet) {
45
45
  return await (await import("./chat.js")).runChat(argv, void 0, { pluginSet });
46
46
  }
47
47
  async function runAdmin(argv) {
48
- return await (await import("../admin-EsbUON1j.js")).runAdmin(argv);
48
+ return await (await import("../admin-XS3G9BOj.js")).runAdmin(argv);
49
49
  }
50
50
  async function runServiceAccount(argv) {
51
- return await (await import("../service-account-CateFyhw.js")).runServiceAccount(argv);
51
+ return await (await import("../service-account-B7E7OIFP.js")).runServiceAccount(argv);
52
52
  }
53
53
  function topLevelCommand(argv) {
54
54
  return (argv[0] === "--" ? argv.slice(1) : argv)[0];
@@ -1,6 +1,6 @@
1
- import { At as coreRegistrations, Id as installAppContext, Pd as createAppContext, a as getDb } from "../db-BCaNWl9p.js";
2
- import { h as createPluginLogger } from "../prompt-3TqxEOtc.js";
3
- import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-BCUpJa8K.js";
1
+ import { Md as createAppContext, Pd as installAppContext, a as getDb, kt as coreRegistrations } from "../db-CbURDbaB.js";
2
+ import { h as createPluginLogger } from "../prompt-CX29OGO9.js";
3
+ import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-CofUHWqz.js";
4
4
  import { t as loadAppPluginSet } from "../plugin-module-Cv2ETe8Y.js";
5
5
  import { a as pluginRuntimeRegistrationsFromPluginSet, i as pluginCliRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "../plugins-D_Ru4CWc.js";
6
6
  import { Command, CommanderError } from "commander";
@@ -1,7 +1,7 @@
1
- import { R as getChatConfig, n as disconnectStateAdapter } from "../adapter-8_S6Birm.js";
2
- import { Fd as getAppContext } from "../db-BCaNWl9p.js";
3
- import { n as resolve } from "../resolve-BBV2qf8A.js";
4
- import { t as create, u as SANDBOX_RUNTIME } from "../profile-D9LdwmZi.js";
1
+ import { R as getChatConfig, n as disconnectStateAdapter } from "../adapter-BkDQYdg6.js";
2
+ import { Nd as getAppContext } from "../db-CbURDbaB.js";
3
+ import { n as resolve } from "../resolve-D9RKNH3v.js";
4
+ import { t as create, u as SANDBOX_RUNTIME } from "../profile-bLo0h7Le.js";
5
5
  // src/cli/snapshot-create.ts
6
6
  const DEFAULT_TIMEOUT_MS = 6e5;
7
7
  function progressMessage(phase) {
@@ -1,5 +1,5 @@
1
- import { R as getChatConfig } from "../adapter-8_S6Birm.js";
2
- import { Ld as createPluginCatalogRuntime, c as pendingMigrations, l as readMigrationRecords, s as createJuniorSqlExecutor } from "../db-BCaNWl9p.js";
1
+ import { R as getChatConfig } from "../adapter-BkDQYdg6.js";
2
+ import { Fd as createPluginCatalogRuntime, c as pendingMigrations, l as readMigrationRecords, s as createJuniorSqlExecutor } from "../db-CbURDbaB.js";
3
3
  import { t as loadAppPluginSet } from "../plugin-module-Cv2ETe8Y.js";
4
4
  import { n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "../plugins-D_Ru4CWc.js";
5
5
  import { t as isMissingVirtualModule } from "../virtual-module-BeKA_EII.js";
@@ -1,6 +1,6 @@
1
- import { A as setFirstConversationLocation, Ai as postSlackMessage, Cl as getDashboardConversationLink, Ei as getSlackMessagePermalink, En as moveIdleConversationDestination, Li as escapeSlackMrkdwnText, N as claimProviderConversation, O as withConversationMutationLock, P as getConversationIdByProviderConversation, Ri as formatSlackLink, Ti as deleteSlackMessage, a as getDb, i as getConversationStore, o as getSqlExecutor, qp as juniorDestinations } from "./db-BCaNWl9p.js";
2
- import { E as parseSlackChannelId, P as parseSlackMessageTs, i as getStateAdapter } from "./adapter-8_S6Birm.js";
3
- import { n as joinPublicChannelForRead, t as checkSlackChannelReadAccess } from "./channel-access-DET5hzZM.js";
1
+ import { A as setFirstConversationLocation, Gp as juniorDestinations, Ii as escapeSlackMrkdwnText, Li as formatSlackLink, N as claimProviderConversation, O as withConversationMutationLock, P as getConversationIdByProviderConversation, Ti as getSlackMessagePermalink, Tn as moveIdleConversationDestination, a as getDb, i as getConversationStore, ki as postSlackMessage, o as getSqlExecutor, wi as deleteSlackMessage, xl as getDashboardConversationLink } from "./db-CbURDbaB.js";
2
+ import { E as parseSlackChannelId, P as parseSlackMessageTs, i as getStateAdapter } from "./adapter-BkDQYdg6.js";
3
+ import { n as joinPublicChannelForRead, t as checkSlackChannelReadAccess } from "./channel-access-BUHB0saC.js";
4
4
  import { and, eq } from "drizzle-orm";
5
5
  // src/chat/slack/continue-in-slack.ts
6
6
  /** Refusal for a move that cannot wait for the active Run. */
@@ -1,4 +1,4 @@
1
- import { F as actorIdentitySchema, Nt as spaceRefSchema, V as conversationDetailReportSchema, X as conversationSummaryReportSchema, Xt as messageAttachmentSchema, zt as inboxItemChangeRecordSchema } from "./types-BNHkJrOP.js";
1
+ import { F as actorIdentitySchema, Nt as spaceRefSchema, V as conversationDetailReportSchema, X as conversationSummaryReportSchema, Xt as messageAttachmentSchema, zt as inboxItemChangeRecordSchema } from "./types-CGgQ3-Bb.js";
2
2
  import * as z from "zod";
3
3
  // src/reporting-schema.ts
4
4
  const healthReportSchema = z.object({
@@ -296,14 +296,6 @@ const conversationFeedMediaSchema = z.object({
296
296
  id: z.string().min(1)
297
297
  }).strict();
298
298
  /**
299
- * The viewer's newest answer to an Inbox item that the Conversation added:
300
- * when it closed and the options they picked. A text answer has no choices.
301
- */
302
- const conversationFeedViewerAnswerSchema = z.object({
303
- choices: z.array(z.string()),
304
- closedAt: z.string().datetime()
305
- }).strict();
306
- /**
307
299
  * A root in the feed, or one of its visible Threads. A Thread nests under
308
300
  * its nearest visible Thread ancestor, or under the root. Tasks never show.
309
301
  */
@@ -321,9 +313,7 @@ const conversationFeedItemSchema = conversationSummaryReportSchema.extend({
321
313
  * Only on a root, and only when the cap cut some.
322
314
  */
323
315
  omittedThreadCount: z.number().int().positive().optional(),
324
- threads: z.lazy(() => z.array(conversationFeedItemSchema)).optional(),
325
- /** Only on the viewer's own feed. */
326
- viewerAnswer: conversationFeedViewerAnswerSchema.optional()
316
+ threads: z.lazy(() => z.array(conversationFeedItemSchema)).optional()
327
317
  });
328
318
  const conversationFeedSchema = z.object({
329
319
  conversations: z.array(conversationFeedItemSchema),
@@ -1,4 +1,4 @@
1
- import { m as logWarn } from "./logging-BRPTXAdf.js";
1
+ import { m as logWarn } from "./logging-CqgOoICc.js";
2
2
  import { AsyncLocalStorage } from "node:async_hooks";
3
3
  import { renderSystemMessageUpdate } from "@earendil-works/pi-ai";
4
4
  // src/chat/conversation-privacy.ts
@@ -1,5 +1,5 @@
1
- import { Bp as juniorConversations, Ft as getAgentBinding, Sn as hasConversationStop, Sp as juniorAgentBindings, Wf as nextDetailVersion, i as getConversationStore, in as ensureConversationWake, o as getSqlExecutor, on as getConversationWorkState, zt as spawnChildAgentInputSchema } from "./db-BCaNWl9p.js";
2
- import { A as getConversationStoppedAtMs, E as getSpawnedChildConversationId, Ft as addConversationNote, Nr as loadTurnStart, b as agentConfigSchema, f as readChildConversationSender, m as buildParentMessage, n as recordSubagentStartedMarker, o as listOpenChildAgents, p as appendParentMessage, w as getChildAgentLockName, x as readAgentConfig } from "./markers-9QoqW5ov.js";
1
+ import { Hf as nextDetailVersion, Pt as getAgentBinding, Rp as juniorConversations, Rt as spawnChildAgentInputSchema, an as getConversationWorkState, bp as juniorAgentBindings, i as getConversationStore, o as getSqlExecutor, rn as ensureConversationWake, xn as hasConversationStop } from "./db-CbURDbaB.js";
2
+ import { C as getChildAgentLockName, Nr as loadTurnStart, Pt as addConversationNote, T as getSpawnedChildConversationId, b as readAgentConfig, f as readChildConversationSender, k as getConversationStoppedAtMs, m as buildParentMessage, n as recordSubagentStartedMarker, o as listOpenChildAgents, p as appendParentMessage, y as agentConfigSchema } from "./markers-BtUv4-oc.js";
3
3
  import { eq } from "drizzle-orm";
4
4
  import { randomUUID } from "node:crypto";
5
5
  // src/chat/agent/types.ts
@@ -1,15 +1,15 @@
1
1
  import { l as homeDir } from "./topics-DxuKurCX.js";
2
- import { L as botConfig, R as getChatConfig, c as acquireActiveLock, i as getStateAdapter, k as parseSlackUserId, z as getRuntimeMetadata } from "./adapter-8_S6Birm.js";
3
- import { Ai as postSlackMessage, Ec as findUserByVerifiedEmails, Fd as getAppContext, Jd as buildOAuthTokenRequest, Oc as upsertLinkedIdentity, Xd as hasRequiredOAuthScope, Yd as parseOAuthTokenResponse, Zs as getSlackClient, af as getMcpAuthSession, bc as resolveActorIdentityId, df as putMcpStoredOAuthCredentials, o as getSqlExecutor, pc as readIdentityById, sf as getMcpStoredOAuthCredentials, tf as deleteMcpAuthSession, wf as getMcpProviderErrorAttributes } from "./db-BCaNWl9p.js";
4
- import { O as isNativeIdentityProvider, f as logException, g as runBestEffort, m as logWarn } from "./logging-BRPTXAdf.js";
5
- import { G as mapBounded } from "./prompt-3TqxEOtc.js";
6
- import { Nn as recordAuthenticationLinked, Or as getTurnRecord, Pn as recordAuthorizationCompleted, Q as coerceThreadConversationState, Y as getPersistedThreadState, et as deleteWebAuthorization, fr as authorizationId, li as formatProviderLabel, ui as parseOAuthStatePayload, yr as getConversationPendingAuth } from "./markers-9QoqW5ov.js";
7
- import { Zt as finalizeMcpAuthorization, nt as wakeAuthorizedTurn, rt as wakePausedTurn } from "./agent-CtzMl32d.js";
8
- import { t as discoverSkills } from "./skills-Ccjw8h2P.js";
9
- import { A as createUserTokenStore, I as resolvePluginOAuthAccount } from "./profile-D9LdwmZi.js";
10
- import { i as lookupSlackUserProfile } from "./users-CCRAqYb_.js";
11
- import { s as readConnectedOAuthTokens, t as escapeHtml, u as htmlCallbackResponse } from "./html-Bb2Si1bR.js";
12
- import { n as relayLocalOAuthCallback } from "./oauth-relay-CH2v7WiB.js";
2
+ import { L as botConfig, R as getChatConfig, c as acquireActiveLock, i as getStateAdapter, k as parseSlackUserId, z as getRuntimeMetadata } from "./adapter-BkDQYdg6.js";
3
+ import { $d as deleteMcpAuthSession, Dc as upsertLinkedIdentity, Jd as hasRequiredOAuthScope, Kd as buildOAuthTokenRequest, Nd as getAppContext, Sf as getMcpProviderErrorAttributes, Tc as findUserByVerifiedEmails, Xs as getSlackClient, af as getMcpStoredOAuthCredentials, fc as readIdentityById, ki as postSlackMessage, lf as putMcpStoredOAuthCredentials, o as getSqlExecutor, qd as parseOAuthTokenResponse, rf as getMcpAuthSession, yc as resolveActorIdentityId } from "./db-CbURDbaB.js";
4
+ import { O as isNativeIdentityProvider, f as logException, g as runBestEffort, m as logWarn } from "./logging-CqgOoICc.js";
5
+ import { G as mapBounded } from "./prompt-CX29OGO9.js";
6
+ import { $ as deleteWebAuthorization, J as getPersistedThreadState, Mn as recordAuthenticationLinked, Nn as recordAuthorizationCompleted, Or as getTurnRecord, Z as coerceThreadConversationState, di as formatProviderLabel, fi as parseOAuthStatePayload, fr as authorizationId, yr as getConversationPendingAuth } from "./markers-BtUv4-oc.js";
7
+ import { Zt as finalizeMcpAuthorization, nt as wakeAuthorizedTurn, rt as wakePausedTurn } from "./agent-CL9ZkOgx.js";
8
+ import { t as discoverSkills } from "./skills-DMJsS5e4.js";
9
+ import { A as createUserTokenStore, I as resolvePluginOAuthAccount } from "./profile-bLo0h7Le.js";
10
+ import { i as lookupSlackUserProfile } from "./users-DBrcQl47.js";
11
+ import { s as readConnectedOAuthTokens, t as escapeHtml, u as htmlCallbackResponse } from "./html-l4hKICAL.js";
12
+ import { n as relayLocalOAuthCallback } from "./oauth-relay-BGm6sLCB.js";
13
13
  import * as z from "zod";
14
14
  import path from "node:path";
15
15
  import { pluginStoredTokensSchema } from "@sentry/junior-plugin-api";