@sentry/junior 0.124.2 → 0.125.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 (72) hide show
  1. package/dist/{agent-hooks-HJQTURNC.js → agent-hooks-MF5UZRCO.js} +8 -8
  2. package/dist/api/conversations/auxiliary-costs.d.ts +6 -0
  3. package/dist/api/conversations/detail.d.ts +10 -0
  4. package/dist/api/conversations/list.d.ts +11 -0
  5. package/dist/api/conversations/projection.d.ts +2 -1
  6. package/dist/api/locations/detail.d.ts +20 -0
  7. package/dist/api/people/profile.d.ts +10 -0
  8. package/dist/api/people/shared.d.ts +36 -0
  9. package/dist/api/plugin-reports.d.ts +1 -0
  10. package/dist/api/schema/conversation.d.ts +40 -0
  11. package/dist/api/schema/location.d.ts +10 -0
  12. package/dist/api/schema/person.d.ts +10 -0
  13. package/dist/api/schema.d.ts +2 -2
  14. package/dist/api/schema.js +4 -2
  15. package/dist/api.js +322 -169
  16. package/dist/app.js +22 -23
  17. package/dist/{catalog-runtime-F356WNZS.js → catalog-runtime-V6SJTUV7.js} +5 -5
  18. package/dist/chat/agent/prompt.d.ts +1 -0
  19. package/dist/chat/conversations/history.d.ts +4 -2
  20. package/dist/chat/conversations/sql/conversation-row.d.ts +7 -4
  21. package/dist/chat/conversations/sql/store.d.ts +2 -1
  22. package/dist/chat/conversations/store.d.ts +9 -1
  23. package/dist/chat/pi/client.d.ts +1 -0
  24. package/dist/chat/plugins/agent-hooks.d.ts +1 -0
  25. package/dist/chat/plugins/conversation-event-stats.d.ts +3 -0
  26. package/dist/chat/plugins/conversation-events.d.ts +1 -1
  27. package/dist/chat/slack/source-link.d.ts +5 -0
  28. package/dist/chat/source.d.ts +16 -0
  29. package/dist/{chunk-VMRKIKGO.js → chunk-2R5MASH3.js} +1 -1
  30. package/dist/{chunk-EOSC6JOC.js → chunk-2U5CLBYF.js} +1 -1
  31. package/dist/{chunk-AYQZCJZJ.js → chunk-6ZBSTNYN.js} +14 -0
  32. package/dist/{chunk-CMYDYVOD.js → chunk-7K57FJXR.js} +6 -5
  33. package/dist/{chunk-SMTAXLX4.js → chunk-CAPBVX4L.js} +2 -2
  34. package/dist/{chunk-7P7YVJKH.js → chunk-EXD2Z3YR.js} +2 -2
  35. package/dist/{chunk-SS7MAJF5.js → chunk-HT7DSLKL.js} +16 -14
  36. package/dist/{chunk-PR3M62LK.js → chunk-HX236W2U.js} +6 -4
  37. package/dist/{chunk-WKBPFZ25.js → chunk-IHNBJHEP.js} +1 -1
  38. package/dist/{chunk-DW6SLS5F.js → chunk-IS4DGI5J.js} +73 -17
  39. package/dist/{chunk-4JW3YNQZ.js → chunk-JT3YMQR3.js} +7 -9
  40. package/dist/{chunk-L7EZRQ2J.js → chunk-K6MQWEEJ.js} +7 -7
  41. package/dist/{chunk-574YK7QW.js → chunk-KN7QI56S.js} +23 -3
  42. package/dist/{chunk-NNKVDYXN.js → chunk-LG5TXWXI.js} +11 -11
  43. package/dist/{chunk-ASK74NM6.js → chunk-MVYNJECP.js} +1 -1
  44. package/dist/{chunk-AQKVWIPR.js → chunk-MYKSUTUV.js} +4 -4
  45. package/dist/{chunk-ZO6E537B.js → chunk-NM3PMQS6.js} +1 -1
  46. package/dist/{chunk-IXTIJQ7Z.js → chunk-ODB55JM7.js} +162 -15
  47. package/dist/{chunk-IMLJE2NY.js → chunk-Q3UF3K77.js} +2 -2
  48. package/dist/{chunk-GCGJGSQL.js → chunk-S4PUICSB.js} +2 -0
  49. package/dist/{chunk-PE44LDDQ.js → chunk-UTL3MHPC.js} +1 -0
  50. package/dist/{chunk-KYKLQYSU.js → chunk-XJYGLTYI.js} +1 -1
  51. package/dist/{chunk-7LDOW4QA.js → chunk-ZXGBLAYQ.js} +1 -1
  52. package/dist/cli/chat.js +23 -23
  53. package/dist/cli/check.js +6 -6
  54. package/dist/cli/plugins.js +11 -11
  55. package/dist/cli/snapshot-create.js +8 -8
  56. package/dist/cli/upgrade.js +6 -6
  57. package/dist/db/schema/conversations.d.ts +20 -0
  58. package/dist/db/schema.d.ts +19 -0
  59. package/dist/{db-4SU2HJSV.js → db-JSDSWK7T.js} +6 -6
  60. package/dist/instrumentation.js +2 -2
  61. package/dist/nitro.js +2 -2
  62. package/dist/{oauth-callback-server-MMCH5QV6.js → oauth-callback-server-UMS2T3HN.js} +16 -17
  63. package/dist/reporting-schema.d.ts +2 -0
  64. package/dist/{runner-ZDSNVGYA.js → runner-RGOANIRV.js} +11 -12
  65. package/dist/{skills-7G7LBHLK.js → skills-GBLPOQOD.js} +6 -6
  66. package/dist/{validation-2ETDADPB.js → validation-BMQY6CD4.js} +6 -6
  67. package/dist/version.js +1 -1
  68. package/migrations/0013_conversation_session_source.sql +38 -0
  69. package/migrations/meta/0013_snapshot.json +1250 -0
  70. package/migrations/meta/_journal.json +8 -1
  71. package/package.json +6 -6
  72. package/dist/chunk-BA5KHLPQ.js +0 -55
@@ -1,23 +1,25 @@
1
1
  import {
2
+ getConversationEventStore,
2
3
  getDb
3
- } from "./chunk-DW6SLS5F.js";
4
+ } from "./chunk-IS4DGI5J.js";
4
5
  import {
5
6
  juniorConversationAnnotations,
7
+ juniorConversationEvents,
6
8
  juniorIdentities,
7
9
  juniorUsers
8
- } from "./chunk-GCGJGSQL.js";
10
+ } from "./chunk-S4PUICSB.js";
9
11
  import {
10
12
  SANDBOX_WORKSPACE_ROOT,
11
13
  getStateAdapter,
12
14
  sleep
13
- } from "./chunk-KYKLQYSU.js";
15
+ } from "./chunk-XJYGLTYI.js";
14
16
  import {
15
17
  botConfig,
16
18
  completeObject,
17
19
  embedTexts,
18
20
  getSlackBotToken,
19
21
  standardModelId
20
- } from "./chunk-574YK7QW.js";
22
+ } from "./chunk-KN7QI56S.js";
21
23
  import {
22
24
  isActorUserId,
23
25
  parseActorUserId
@@ -30,7 +32,7 @@ import {
30
32
  setSpanAttributes,
31
33
  setSpanStatus,
32
34
  withSpan
33
- } from "./chunk-ASK74NM6.js";
35
+ } from "./chunk-MVYNJECP.js";
34
36
  import {
35
37
  parseSlackChannelReferenceId,
36
38
  parseSlackMessageTs,
@@ -106,6 +108,133 @@ async function listConversationAnnotations(db, conversationId) {
106
108
  });
107
109
  }
108
110
 
111
+ // src/chat/plugins/conversation-events.ts
112
+ function registeredDefinition(plugin, value) {
113
+ return plugin.conversationEvents?.find(
114
+ (definition) => definition === value.definition
115
+ );
116
+ }
117
+ function eventIdentityVersion(plugin, definition) {
118
+ let version = definition.version;
119
+ for (const candidate of plugin.conversationEvents ?? []) {
120
+ if (candidate.eventName === definition.eventName) {
121
+ version = Math.min(version, candidate.version);
122
+ }
123
+ }
124
+ return version;
125
+ }
126
+ function createPluginConversationEvents(args) {
127
+ return {
128
+ async emit(value) {
129
+ const definition = registeredDefinition(args.plugin, value);
130
+ if (!definition) {
131
+ throw new Error(
132
+ `Plugin "${args.plugin.manifest.name}" cannot emit an unregistered conversation event.`
133
+ );
134
+ }
135
+ const content = definition.parse(value.data);
136
+ const identityVersion = eventIdentityVersion(args.plugin, definition);
137
+ await getConversationEventStore().append(
138
+ args.conversationId,
139
+ [
140
+ {
141
+ createdAtMs: Date.now(),
142
+ idempotencyKey: `plugin:${args.plugin.manifest.name}:operation:${args.operationId}:event:${definition.eventName}@${identityVersion}`,
143
+ data: {
144
+ type: "structured_event",
145
+ namespace: args.plugin.manifest.name,
146
+ name: definition.eventName,
147
+ version: definition.version,
148
+ turnId: args.turnId,
149
+ content
150
+ }
151
+ }
152
+ ],
153
+ { activity: "preserve" }
154
+ );
155
+ }
156
+ };
157
+ }
158
+ function renderPluginConversationEvent(args) {
159
+ const plugin = getPlugins().find(
160
+ (candidate) => candidate.manifest.name === args.namespace
161
+ );
162
+ const definition = plugin?.conversationEvents?.find(
163
+ (candidate) => candidate.eventName === args.name && candidate.version === args.version
164
+ );
165
+ if (!definition) return void 0;
166
+ return definition.renderEvent(definition.parse(args.content));
167
+ }
168
+
169
+ // src/chat/plugins/conversation-event-stats.ts
170
+ import { and as and2, eq as eq2, gte, lt, sql } from "drizzle-orm";
171
+ import { z } from "zod";
172
+ var DAY_MS = 24 * 60 * 60 * 1e3;
173
+ var costRowSchema = z.object({
174
+ costUsd: z.number().finite().nonnegative(),
175
+ date: z.string().date(),
176
+ events: z.number().int().nonnegative()
177
+ }).strict();
178
+ function startOfUtcDay(value) {
179
+ const date = new Date(value);
180
+ date.setUTCHours(0, 0, 0, 0);
181
+ return date;
182
+ }
183
+ function registeredEventName(plugin, eventName) {
184
+ if (!plugin.conversationEvents?.some(
185
+ (definition) => definition.eventName === eventName
186
+ )) {
187
+ throw new TypeError(
188
+ `Plugin "${plugin.manifest.name}" did not register event "${eventName}"`
189
+ );
190
+ }
191
+ return eventName;
192
+ }
193
+ function createPluginConversationEventStats(plugin, now = Date.now) {
194
+ return {
195
+ async costsByDay(input) {
196
+ const eventName = registeredEventName(plugin, input.eventName);
197
+ const end = startOfUtcDay(now());
198
+ const start = new Date(end.getTime() - (input.days - 1) * DAY_MS);
199
+ const endExclusive = new Date(end.getTime() + DAY_MS);
200
+ const date = sql`TO_CHAR(
201
+ ${juniorConversationEvents.createdAt} AT TIME ZONE 'UTC',
202
+ 'YYYY-MM-DD'
203
+ )`;
204
+ const cost = sql`CASE
205
+ WHEN jsonb_typeof(${juniorConversationEvents.payload}->'content'->'costUsd') = 'number'
206
+ THEN (${juniorConversationEvents.payload}->'content'->>'costUsd')::double precision
207
+ ELSE 0
208
+ END`;
209
+ const rows = await getDb().select({
210
+ costUsd: sql`SUM(${cost})::double precision`.mapWith(Number),
211
+ date,
212
+ events: sql`COUNT(*)::integer`.mapWith(Number)
213
+ }).from(juniorConversationEvents).where(
214
+ and2(
215
+ eq2(juniorConversationEvents.type, "structured_event"),
216
+ sql`${juniorConversationEvents.payload}->>'namespace' = ${plugin.manifest.name}`,
217
+ sql`${juniorConversationEvents.payload}->>'name' = ${eventName}`,
218
+ gte(juniorConversationEvents.createdAt, start),
219
+ lt(juniorConversationEvents.createdAt, endExclusive)
220
+ )
221
+ ).groupBy(date);
222
+ const byDate = new Map(
223
+ z.array(costRowSchema).parse(rows).map((row) => [row.date, row])
224
+ );
225
+ return Array.from({ length: input.days }, (_, index) => {
226
+ const day = new Date(start.getTime() + index * DAY_MS);
227
+ const date2 = day.toISOString().slice(0, 10);
228
+ return byDate.get(date2) ?? {
229
+ costUsd: 0,
230
+ date: date2,
231
+ events: 0
232
+ };
233
+ });
234
+ }
235
+ };
236
+ }
237
+
109
238
  // src/chat/plugins/logging.ts
110
239
  function createPluginLogger(plugin) {
111
240
  return {
@@ -149,7 +278,10 @@ function createPluginModel(pluginName, options = {}, runtime = {}) {
149
278
  pluginModelRole: "structured"
150
279
  }
151
280
  });
152
- return { object: result.object };
281
+ return {
282
+ object: result.object,
283
+ ...result.costUsd !== void 0 ? { costUsd: result.costUsd } : {}
284
+ };
153
285
  }
154
286
  };
155
287
  }
@@ -321,7 +453,7 @@ function getSlackToolContext(context) {
321
453
  }
322
454
 
323
455
  // src/chat/plugins/viewer-actors.ts
324
- import { and as and2, eq as eq2 } from "drizzle-orm";
456
+ import { and as and3, eq as eq3 } from "drizzle-orm";
325
457
  import {
326
458
  actorSchema
327
459
  } from "@sentry/junior-plugin-api";
@@ -335,10 +467,10 @@ async function readViewerActorsFromSql(db, email) {
335
467
  provider: juniorIdentities.provider,
336
468
  providerSubjectId: juniorIdentities.providerSubjectId,
337
469
  providerTenantId: juniorIdentities.providerTenantId
338
- }).from(juniorIdentities).innerJoin(juniorUsers, eq2(juniorUsers.id, juniorIdentities.userId)).where(
339
- and2(
340
- eq2(juniorUsers.primaryEmailNormalized, normalizedEmail),
341
- eq2(juniorIdentities.kind, "user")
470
+ }).from(juniorIdentities).innerJoin(juniorUsers, eq3(juniorUsers.id, juniorIdentities.userId)).where(
471
+ and3(
472
+ eq3(juniorUsers.primaryEmailNormalized, normalizedEmail),
473
+ eq3(juniorIdentities.kind, "user")
342
474
  )
343
475
  );
344
476
  const actors = [];
@@ -919,7 +1051,7 @@ function resolveChannelCapabilities(channelId) {
919
1051
  }
920
1052
 
921
1053
  // src/chat/plugins/agent-hooks.ts
922
- import { z } from "zod";
1054
+ import { z as z2 } from "zod";
923
1055
  var PluginHookDeniedError = class extends Error {
924
1056
  constructor(message) {
925
1057
  super(message);
@@ -951,7 +1083,7 @@ var PLUGIN_ROUTE_METHODS = /* @__PURE__ */ new Set([
951
1083
  var PLUGIN_PROMPT_CONTRIBUTION_TOTAL_MAX_CHARS = 16e3;
952
1084
  var PLUGIN_PROMPT_CONTEXT_MAX_BYTES = 8e3;
953
1085
  var PLUGIN_PROMPT_CONTEXT_TOTAL_MAX_BYTES = 16e3;
954
- var systemPromptMessageArraySchema = z.array(promptMessageSchema);
1086
+ var systemPromptMessageArraySchema = z2.array(promptMessageSchema);
955
1087
  function isRecord(value) {
956
1088
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
957
1089
  }
@@ -973,12 +1105,20 @@ function systemPromptPluginContext(plugin) {
973
1105
  ...basePluginContext(plugin)
974
1106
  };
975
1107
  }
976
- function invocationPluginContext(plugin, context) {
1108
+ function invocationPluginContext(plugin, context, turnId) {
977
1109
  const base = basePluginContext(plugin);
978
1110
  const common = {
979
1111
  ...base,
980
1112
  conversationId: context.conversationId,
981
1113
  embedder: createPluginEmbedder(plugin.manifest.name),
1114
+ ...context.conversationId && turnId ? {
1115
+ events: createPluginConversationEvents({
1116
+ conversationId: context.conversationId,
1117
+ operationId: `user-prompt:${turnId}`,
1118
+ plugin,
1119
+ turnId
1120
+ })
1121
+ } : {},
982
1122
  model: createPluginModel(plugin.manifest.name, plugin.model),
983
1123
  source: context.source,
984
1124
  text: context.userText ?? "",
@@ -1198,7 +1338,7 @@ async function getPluginUserPromptContributions(args) {
1198
1338
  }
1199
1339
  try {
1200
1340
  const rawResult = await hook({
1201
- ...invocationPluginContext(plugin, args.context)
1341
+ ...invocationPluginContext(plugin, args.context, args.turnId)
1202
1342
  });
1203
1343
  if (rawResult === void 0) {
1204
1344
  continue;
@@ -1471,6 +1611,7 @@ function getPluginApiRoutes() {
1471
1611
  }
1472
1612
  const app = hook({
1473
1613
  ...basePluginContext(plugin),
1614
+ eventStats: createPluginConversationEventStats(plugin),
1474
1615
  viewer: {
1475
1616
  actors: readViewerActors
1476
1617
  }
@@ -1647,6 +1788,9 @@ function sanitizeOperationalReport(args) {
1647
1788
  return void 0;
1648
1789
  }
1649
1790
  const sanitizedSeries = { key, label };
1791
+ if (item.format === "usd") {
1792
+ sanitizedSeries.format = "usd";
1793
+ }
1650
1794
  const tone = operationalReportTone(item.tone);
1651
1795
  if (tone) {
1652
1796
  sanitizedSeries.tone = tone;
@@ -1756,6 +1900,7 @@ async function getPluginOperationalReports(nowMs) {
1756
1900
  const state = createPluginState(pluginName);
1757
1901
  const report = await hook({
1758
1902
  ...basePluginContext(plugin),
1903
+ eventStats: createPluginConversationEventStats(plugin, () => nowMs),
1759
1904
  nowMs,
1760
1905
  state: pluginReadState(state)
1761
1906
  });
@@ -1930,6 +2075,8 @@ function createPluginHookRunner(input = {}) {
1930
2075
 
1931
2076
  export {
1932
2077
  listConversationAnnotations,
2078
+ createPluginConversationEvents,
2079
+ renderPluginConversationEvent,
1933
2080
  createPluginLogger,
1934
2081
  createPluginModel,
1935
2082
  createPluginEmbedder,
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  getDb
3
- } from "./chunk-DW6SLS5F.js";
3
+ } from "./chunk-IS4DGI5J.js";
4
4
  import {
5
5
  juniorStats
6
- } from "./chunk-GCGJGSQL.js";
6
+ } from "./chunk-S4PUICSB.js";
7
7
 
8
8
  // src/stats.ts
9
9
  import { and, asc, gte, lte, sql } from "drizzle-orm";
@@ -101,6 +101,8 @@ var juniorConversations = pgTable3(
101
101
  conversationId: text3("conversation_id").primaryKey(),
102
102
  schemaVersion: integer("schema_version").notNull().default(1),
103
103
  source: text3("source").$type(),
104
+ /** Structured session Source locator; set-once on the conversation root. */
105
+ sessionSource: jsonb2("source_json").$type(),
104
106
  originType: text3("origin_type"),
105
107
  originId: text3("origin_id"),
106
108
  originRunId: text3("origin_run_id"),
@@ -77,6 +77,7 @@ var pluginOperationalBarChartWidgetSchema = z.object({
77
77
  id: z.string().min(1),
78
78
  series: z.array(
79
79
  z.object({
80
+ format: z.literal("usd").optional(),
80
81
  key: z.string().min(1),
81
82
  label: z.string().min(1),
82
83
  tone: pluginOperationalToneSchema.optional()
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getChatConfig
3
- } from "./chunk-574YK7QW.js";
3
+ } from "./chunk-KN7QI56S.js";
4
4
 
5
5
  // src/chat/state/adapter.ts
6
6
  import { createMemoryState } from "@chat-adapter/state-memory";
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
  var package_default = {
3
3
  name: "@sentry/junior",
4
- version: "0.124.2",
4
+ version: "0.125.0",
5
5
  private: false,
6
6
  publishConfig: {
7
7
  access: "public"
package/dist/cli/chat.js CHANGED
@@ -1,39 +1,39 @@
1
1
  import {
2
2
  createAgentRunner,
3
3
  executeAgentRun
4
- } from "../chunk-SS7MAJF5.js";
4
+ } from "../chunk-HT7DSLKL.js";
5
5
  import "../chunk-DIB4GX3G.js";
6
- import "../chunk-L7EZRQ2J.js";
7
- import "../chunk-CMYDYVOD.js";
6
+ import "../chunk-K6MQWEEJ.js";
7
+ import "../chunk-7K57FJXR.js";
8
8
  import "../chunk-HDSDCEPK.js";
9
- import "../chunk-AQKVWIPR.js";
10
- import "../chunk-IMLJE2NY.js";
11
- import "../chunk-PR3M62LK.js";
9
+ import "../chunk-MYKSUTUV.js";
10
+ import "../chunk-Q3UF3K77.js";
11
+ import "../chunk-HX236W2U.js";
12
12
  import "../chunk-PDO5BLNM.js";
13
13
  import "../chunk-UIE3R5XU.js";
14
14
  import {
15
15
  loadAppPluginSet
16
16
  } from "../chunk-Y2CM7HXH.js";
17
- import "../chunk-IXTIJQ7Z.js";
18
- import "../chunk-DW6SLS5F.js";
19
- import "../chunk-GCGJGSQL.js";
20
- import "../chunk-KYKLQYSU.js";
21
- import "../chunk-574YK7QW.js";
17
+ import "../chunk-ODB55JM7.js";
18
+ import "../chunk-IS4DGI5J.js";
19
+ import "../chunk-S4PUICSB.js";
20
+ import "../chunk-XJYGLTYI.js";
21
+ import "../chunk-KN7QI56S.js";
22
22
  import "../chunk-VFUK3X5B.js";
23
23
  import "../chunk-S7G34U75.js";
24
- import "../chunk-SMTAXLX4.js";
25
- import "../chunk-ZO6E537B.js";
26
- import "../chunk-EOSC6JOC.js";
24
+ import "../chunk-CAPBVX4L.js";
25
+ import "../chunk-NM3PMQS6.js";
26
+ import "../chunk-2U5CLBYF.js";
27
27
  import "../chunk-W3U3YQYI.js";
28
28
  import "../chunk-HZF5P5UN.js";
29
- import "../chunk-ASK74NM6.js";
29
+ import "../chunk-MVYNJECP.js";
30
30
  import "../chunk-OB42YVAE.js";
31
31
  import "../chunk-F3B2YJ76.js";
32
32
  import "../chunk-6GWA276C.js";
33
33
  import "../chunk-OOUNJNMR.js";
34
34
  import "../chunk-H4HBKISO.js";
35
- import "../chunk-VMRKIKGO.js";
36
- import "../chunk-7LDOW4QA.js";
35
+ import "../chunk-2R5MASH3.js";
36
+ import "../chunk-ZXGBLAYQ.js";
37
37
  import "../chunk-MLKGABMK.js";
38
38
 
39
39
  // src/cli/chat.ts
@@ -156,10 +156,10 @@ async function configureLocalChatPlugins(pluginSet) {
156
156
  databaseModule
157
157
  ] = await Promise.all([
158
158
  import("../plugins-HW4VWW6G.js"),
159
- import("../agent-hooks-HJQTURNC.js"),
160
- import("../catalog-runtime-F356WNZS.js"),
161
- import("../validation-2ETDADPB.js"),
162
- import("../db-4SU2HJSV.js")
159
+ import("../agent-hooks-MF5UZRCO.js"),
160
+ import("../catalog-runtime-V6SJTUV7.js"),
161
+ import("../validation-BMQY6CD4.js"),
162
+ import("../db-JSDSWK7T.js")
163
163
  ]);
164
164
  const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
165
165
  const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
@@ -223,8 +223,8 @@ function localDevServerUrl() {
223
223
  async function prepareLocalChatRun(io, pluginSet) {
224
224
  defaultStateAdapterForLocalChat();
225
225
  await configureLocalChatPlugins(pluginSet);
226
- const { runLocalAgentTurn } = await import("../runner-ZDSNVGYA.js");
227
- const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-MMCH5QV6.js");
226
+ const { runLocalAgentTurn } = await import("../runner-RGOANIRV.js");
227
+ const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-UMS2T3HN.js");
228
228
  const { createLocalOAuthState } = await import("../oauth-relay-3ZU72UGL.js");
229
229
  const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-CDFAP67O.js");
230
230
  const agentRunner = createAgentRunner(executeAgentRun);
package/dist/cli/check.js CHANGED
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  parseSkillFile
3
- } from "../chunk-SMTAXLX4.js";
4
- import "../chunk-ZO6E537B.js";
3
+ } from "../chunk-CAPBVX4L.js";
4
+ import "../chunk-NM3PMQS6.js";
5
5
  import {
6
6
  parseInlinePluginManifest,
7
7
  parsePluginManifest
8
- } from "../chunk-EOSC6JOC.js";
8
+ } from "../chunk-2U5CLBYF.js";
9
9
  import "../chunk-W3U3YQYI.js";
10
10
  import "../chunk-HZF5P5UN.js";
11
- import "../chunk-ASK74NM6.js";
11
+ import "../chunk-MVYNJECP.js";
12
12
  import "../chunk-OB42YVAE.js";
13
13
  import "../chunk-F3B2YJ76.js";
14
14
  import "../chunk-6GWA276C.js";
@@ -18,8 +18,8 @@ import {
18
18
  JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE,
19
19
  JUNIOR_HEARTBEAT_ROUTE,
20
20
  LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION
21
- } from "../chunk-VMRKIKGO.js";
22
- import "../chunk-7LDOW4QA.js";
21
+ } from "../chunk-2R5MASH3.js";
22
+ import "../chunk-ZXGBLAYQ.js";
23
23
  import "../chunk-MLKGABMK.js";
24
24
 
25
25
  // src/cli/check.ts
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  validatePluginEgressCredentialHooks,
3
3
  validatePluginRegistrations
4
- } from "../chunk-WKBPFZ25.js";
4
+ } from "../chunk-IHNBJHEP.js";
5
5
  import {
6
6
  pluginCatalogConfigFromPluginSet,
7
7
  pluginCliRegistrationsFromPluginSet,
@@ -14,29 +14,29 @@ import {
14
14
  createPluginLogger,
15
15
  setPlugins,
16
16
  validatePlugins
17
- } from "../chunk-IXTIJQ7Z.js";
17
+ } from "../chunk-ODB55JM7.js";
18
18
  import {
19
19
  getDb
20
- } from "../chunk-DW6SLS5F.js";
21
- import "../chunk-GCGJGSQL.js";
22
- import "../chunk-KYKLQYSU.js";
23
- import "../chunk-574YK7QW.js";
20
+ } from "../chunk-IS4DGI5J.js";
21
+ import "../chunk-S4PUICSB.js";
22
+ import "../chunk-XJYGLTYI.js";
23
+ import "../chunk-KN7QI56S.js";
24
24
  import "../chunk-VFUK3X5B.js";
25
25
  import "../chunk-S7G34U75.js";
26
26
  import {
27
27
  pluginCatalogRuntime
28
- } from "../chunk-ZO6E537B.js";
29
- import "../chunk-EOSC6JOC.js";
28
+ } from "../chunk-NM3PMQS6.js";
29
+ import "../chunk-2U5CLBYF.js";
30
30
  import "../chunk-W3U3YQYI.js";
31
31
  import "../chunk-HZF5P5UN.js";
32
- import "../chunk-ASK74NM6.js";
32
+ import "../chunk-MVYNJECP.js";
33
33
  import "../chunk-OB42YVAE.js";
34
34
  import "../chunk-F3B2YJ76.js";
35
35
  import "../chunk-6GWA276C.js";
36
36
  import "../chunk-OOUNJNMR.js";
37
37
  import "../chunk-H4HBKISO.js";
38
- import "../chunk-VMRKIKGO.js";
39
- import "../chunk-7LDOW4QA.js";
38
+ import "../chunk-2R5MASH3.js";
39
+ import "../chunk-ZXGBLAYQ.js";
40
40
  import "../chunk-MLKGABMK.js";
41
41
 
42
42
  // src/cli/plugins.ts
@@ -1,26 +1,26 @@
1
1
  import {
2
2
  create,
3
3
  resolve
4
- } from "../chunk-AQKVWIPR.js";
4
+ } from "../chunk-MYKSUTUV.js";
5
5
  import {
6
6
  disconnectStateAdapter
7
- } from "../chunk-KYKLQYSU.js";
8
- import "../chunk-574YK7QW.js";
7
+ } from "../chunk-XJYGLTYI.js";
8
+ import "../chunk-KN7QI56S.js";
9
9
  import "../chunk-S7G34U75.js";
10
10
  import {
11
11
  pluginCatalogRuntime
12
- } from "../chunk-ZO6E537B.js";
13
- import "../chunk-EOSC6JOC.js";
12
+ } from "../chunk-NM3PMQS6.js";
13
+ import "../chunk-2U5CLBYF.js";
14
14
  import "../chunk-W3U3YQYI.js";
15
15
  import "../chunk-HZF5P5UN.js";
16
- import "../chunk-ASK74NM6.js";
16
+ import "../chunk-MVYNJECP.js";
17
17
  import "../chunk-OB42YVAE.js";
18
18
  import "../chunk-F3B2YJ76.js";
19
19
  import "../chunk-6GWA276C.js";
20
20
  import "../chunk-OOUNJNMR.js";
21
21
  import "../chunk-H4HBKISO.js";
22
- import "../chunk-VMRKIKGO.js";
23
- import "../chunk-7LDOW4QA.js";
22
+ import "../chunk-2R5MASH3.js";
23
+ import "../chunk-ZXGBLAYQ.js";
24
24
  import "../chunk-MLKGABMK.js";
25
25
 
26
26
  // src/cli/snapshot-create.ts
@@ -8,25 +8,25 @@ import {
8
8
  } from "../chunk-Y2CM7HXH.js";
9
9
  import {
10
10
  createJuniorSqlExecutor
11
- } from "../chunk-GCGJGSQL.js";
11
+ } from "../chunk-S4PUICSB.js";
12
12
  import {
13
13
  getChatConfig
14
- } from "../chunk-574YK7QW.js";
14
+ } from "../chunk-KN7QI56S.js";
15
15
  import "../chunk-VFUK3X5B.js";
16
16
  import "../chunk-S7G34U75.js";
17
17
  import {
18
18
  createPluginCatalogRuntime
19
- } from "../chunk-EOSC6JOC.js";
19
+ } from "../chunk-2U5CLBYF.js";
20
20
  import "../chunk-W3U3YQYI.js";
21
21
  import "../chunk-HZF5P5UN.js";
22
- import "../chunk-ASK74NM6.js";
22
+ import "../chunk-MVYNJECP.js";
23
23
  import "../chunk-OB42YVAE.js";
24
24
  import "../chunk-F3B2YJ76.js";
25
25
  import "../chunk-6GWA276C.js";
26
26
  import "../chunk-OOUNJNMR.js";
27
27
  import "../chunk-H4HBKISO.js";
28
- import "../chunk-VMRKIKGO.js";
29
- import "../chunk-7LDOW4QA.js";
28
+ import "../chunk-2R5MASH3.js";
29
+ import "../chunk-ZXGBLAYQ.js";
30
30
  import "../chunk-MLKGABMK.js";
31
31
 
32
32
  // src/chat/conversations/sql/migrations.ts
@@ -1,3 +1,4 @@
1
+ import type { SessionSource } from "@/chat/source";
1
2
  import type { ConversationSource, ConversationStatus } from "@/chat/conversations/store";
2
3
  export declare const juniorConversations: import("drizzle-orm/pg-core").PgTableWithColumns<{
3
4
  name: "junior_conversations";
@@ -56,6 +57,25 @@ export declare const juniorConversations: import("drizzle-orm/pg-core").PgTableW
56
57
  }, {}, {
57
58
  $type: ConversationSource;
58
59
  }>;
60
+ sessionSource: import("drizzle-orm/pg-core").PgColumn<{
61
+ name: "source_json";
62
+ tableName: "junior_conversations";
63
+ dataType: "json";
64
+ columnType: "PgJsonb";
65
+ data: SessionSource;
66
+ driverParam: unknown;
67
+ notNull: false;
68
+ hasDefault: false;
69
+ isPrimaryKey: false;
70
+ isAutoincrement: false;
71
+ hasRuntimeDefault: false;
72
+ enumValues: undefined;
73
+ baseColumn: never;
74
+ identity: undefined;
75
+ generated: undefined;
76
+ }, {}, {
77
+ $type: SessionSource;
78
+ }>;
59
79
  originType: import("drizzle-orm/pg-core").PgColumn<{
60
80
  name: "origin_type";
61
81
  tableName: "junior_conversations";
@@ -512,6 +512,25 @@ export declare const juniorSqlSchema: {
512
512
  }, {}, {
513
513
  $type: import("../chat/conversations/store").ConversationSource;
514
514
  }>;
515
+ sessionSource: import("drizzle-orm/pg-core").PgColumn<{
516
+ name: "source_json";
517
+ tableName: "junior_conversations";
518
+ dataType: "json";
519
+ columnType: "PgJsonb";
520
+ data: import("../chat/source").SessionSource;
521
+ driverParam: unknown;
522
+ notNull: false;
523
+ hasDefault: false;
524
+ isPrimaryKey: false;
525
+ isAutoincrement: false;
526
+ hasRuntimeDefault: false;
527
+ enumValues: undefined;
528
+ baseColumn: never;
529
+ identity: undefined;
530
+ generated: undefined;
531
+ }, {}, {
532
+ $type: import("../chat/source").SessionSource;
533
+ }>;
515
534
  originType: import("drizzle-orm/pg-core").PgColumn<{
516
535
  name: "origin_type";
517
536
  tableName: "junior_conversations";
@@ -5,17 +5,17 @@ import {
5
5
  getConversationStore,
6
6
  getDb,
7
7
  getSqlExecutor
8
- } from "./chunk-DW6SLS5F.js";
9
- import "./chunk-GCGJGSQL.js";
10
- import "./chunk-574YK7QW.js";
8
+ } from "./chunk-IS4DGI5J.js";
9
+ import "./chunk-S4PUICSB.js";
10
+ import "./chunk-KN7QI56S.js";
11
11
  import "./chunk-VFUK3X5B.js";
12
12
  import "./chunk-S7G34U75.js";
13
- import "./chunk-ASK74NM6.js";
13
+ import "./chunk-MVYNJECP.js";
14
14
  import "./chunk-OB42YVAE.js";
15
15
  import "./chunk-F3B2YJ76.js";
16
16
  import "./chunk-6GWA276C.js";
17
- import "./chunk-VMRKIKGO.js";
18
- import "./chunk-7LDOW4QA.js";
17
+ import "./chunk-2R5MASH3.js";
18
+ import "./chunk-ZXGBLAYQ.js";
19
19
  import "./chunk-MLKGABMK.js";
20
20
  export {
21
21
  closeDb,
@@ -16,8 +16,8 @@ import {
16
16
  import {
17
17
  getDeploymentServiceVersion,
18
18
  getDeploymentTelemetryAttributes
19
- } from "./chunk-VMRKIKGO.js";
20
- import "./chunk-7LDOW4QA.js";
19
+ } from "./chunk-2R5MASH3.js";
20
+ import "./chunk-ZXGBLAYQ.js";
21
21
  import "./chunk-MLKGABMK.js";
22
22
 
23
23
  // src/chat/sentry-payload-filter.ts