@sentry/junior 0.103.0 → 0.104.1

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 (77) hide show
  1. package/dist/{agent-hooks-NHIXBJW3.js → agent-hooks-EOFSY2PD.js} +3 -3
  2. package/dist/api/conversations/archive.d.ts +7 -0
  3. package/dist/api/conversations/detail.d.ts +7 -0
  4. package/dist/api/conversations/list.d.ts +109 -0
  5. package/dist/api/conversations/routes.d.ts +3 -0
  6. package/dist/api/conversations/schema.d.ts +72 -69
  7. package/dist/api/conversations/stats.d.ts +7 -0
  8. package/dist/api/conversations/subagent.d.ts +7 -0
  9. package/dist/api/http.d.ts +5 -0
  10. package/dist/api/locations/detail.d.ts +10 -2
  11. package/dist/api/locations/list.d.ts +7 -0
  12. package/dist/api/locations/routes.d.ts +3 -0
  13. package/dist/api/locations/schema.d.ts +4 -3
  14. package/dist/api/people/list.d.ts +7 -0
  15. package/dist/api/people/profile.d.ts +7 -0
  16. package/dist/api/people/routes.d.ts +3 -0
  17. package/dist/api/people/schema.d.ts +35 -33
  18. package/dist/api/people/shared.d.ts +3 -3
  19. package/dist/api/route.d.ts +7 -0
  20. package/dist/api/schema.js +11 -17
  21. package/dist/api.js +2184 -88
  22. package/dist/app.js +107 -101
  23. package/dist/chat/conversations/history.d.ts +6 -6
  24. package/dist/chat/conversations/store.d.ts +1 -0
  25. package/dist/chat/pi/messages.d.ts +2 -2
  26. package/dist/chat/plugins/agent-hooks.d.ts +2 -2
  27. package/dist/chat/resource-events/store.d.ts +2 -2
  28. package/dist/chat/slack/tools/conversation-search.d.ts +2 -2
  29. package/dist/chat/state/session-log.d.ts +2 -2
  30. package/dist/chat/task-execution/store.d.ts +2 -2
  31. package/dist/chat/tools/search-tools.d.ts +2 -2
  32. package/dist/chunk-AIRE7Q2W.js +362 -0
  33. package/dist/{chunk-HOBDQQJY.js → chunk-BCULHGZK.js} +23 -3
  34. package/dist/{chunk-DEQZ23O3.js → chunk-O7ILGCMJ.js} +77 -0
  35. package/dist/{chunk-C4BT2P2K.js → chunk-QDKRE3LS.js} +339 -8
  36. package/dist/{chunk-GY5ZRYPH.js → chunk-QVTVCJR4.js} +5 -5
  37. package/dist/{chunk-JXQWOCBE.js → chunk-RMZ65YAA.js} +2 -2
  38. package/dist/{chunk-E2VS47AZ.js → chunk-RYDF4GOX.js} +2 -2
  39. package/dist/{chunk-OE453VRG.js → chunk-TMWUGGSA.js} +26 -28
  40. package/dist/{chunk-JPXLAJUU.js → chunk-VDHMFCDY.js} +9 -10
  41. package/dist/cli/chat.js +10 -11
  42. package/dist/cli/plugins.js +4 -4
  43. package/dist/cli/upgrade.js +3 -4
  44. package/dist/db/schema/conversations.d.ts +17 -0
  45. package/dist/db/schema.d.ts +17 -0
  46. package/dist/{db-I343BSOM.js → db-PDMC67T3.js} +1 -1
  47. package/dist/{legacy-import-M7VBOQTK.js → legacy-import-G333RHJZ.js} +2 -2
  48. package/dist/reporting-schema.d.ts +4 -4
  49. package/dist/{runner-IEE5G4NV.js → runner-6A7MQRUE.js} +7 -8
  50. package/migrations/0004_useful_magus.sql +1 -0
  51. package/migrations/meta/0004_snapshot.json +1041 -0
  52. package/migrations/meta/_journal.json +7 -0
  53. package/package.json +6 -6
  54. package/dist/api/conversations/list.query.d.ts +0 -103
  55. package/dist/chunk-2RNOB32R.js +0 -17
  56. package/dist/chunk-6FPTHPXF.js +0 -77
  57. package/dist/chunk-6LBNXC4F.js +0 -66
  58. package/dist/chunk-7LLRS2OK.js +0 -215
  59. package/dist/chunk-B43K4C5K.js +0 -102
  60. package/dist/chunk-BQCPAIAB.js +0 -319
  61. package/dist/chunk-FW7DVHTL.js +0 -673
  62. package/dist/chunk-GCGRQJR5.js +0 -84
  63. package/dist/chunk-HRDWLE7Q.js +0 -273
  64. package/dist/chunk-LVUKF5CE.js +0 -63
  65. package/dist/chunk-QNVHH5PU.js +0 -20
  66. package/dist/chunk-QOZOJNSE.js +0 -96
  67. package/dist/chunk-VKFOVMZL.js +0 -331
  68. package/dist/detail-ENVV4HIY.js +0 -68
  69. package/dist/detail-UIOKVIET.js +0 -29
  70. package/dist/list-WR5U6JVM.js +0 -30
  71. package/dist/list-XZ4HKQ4R.js +0 -121
  72. package/dist/list-ZOUSMSEH.js +0 -30
  73. package/dist/plugin-conversations-DTUP4RH6.js +0 -37
  74. package/dist/profile-UO2N3XXG.js +0 -212
  75. package/dist/reporting/plugin-conversations.d.ts +0 -3
  76. package/dist/stats-NZIET4LT.js +0 -174
  77. package/dist/subagent-DY6XKTJ5.js +0 -49
@@ -11,11 +11,11 @@ import {
11
11
  getPlugins,
12
12
  setPlugins,
13
13
  validatePlugins
14
- } from "./chunk-JPXLAJUU.js";
15
- import "./chunk-CCTCIISK.js";
14
+ } from "./chunk-VDHMFCDY.js";
16
15
  import "./chunk-4PDVOHXP.js";
17
- import "./chunk-HOBDQQJY.js";
18
16
  import "./chunk-G3E7SCME.js";
17
+ import "./chunk-CCTCIISK.js";
18
+ import "./chunk-BCULHGZK.js";
19
19
  import "./chunk-4ZNGQH7C.js";
20
20
  import "./chunk-M3UAVLEN.js";
21
21
  import "./chunk-FXFQNHRU.js";
@@ -0,0 +1,7 @@
1
+ /** Serve the archive mutation with optimistic activity concurrency control. */
2
+ declare const _default: {
3
+ method: "patch";
4
+ path: string;
5
+ handler: (c: import("hono").Context<any, any, import("hono/types").BlankInput>) => Promise<Response>;
6
+ };
7
+ export default _default;
@@ -1,3 +1,10 @@
1
1
  import type { ConversationDetailReport } from "./schema";
2
2
  /** Load one conversation with durable content and recent run diagnostics. */
3
3
  export declare function readConversationDetail(conversationId: string): Promise<ConversationDetailReport | undefined>;
4
+ /** Serve one conversation detail endpoint. */
5
+ declare const _default: {
6
+ method: "get";
7
+ path: string;
8
+ handler: (c: import("hono").Context<any, any, import("hono/types").BlankInput>) => Promise<Response>;
9
+ };
10
+ export default _default;
@@ -1,4 +1,106 @@
1
+ import type { Conversation } from "@/chat/conversations/store";
2
+ import type { JuniorDatabase } from "@/db/db";
1
3
  import type { ConversationFeed } from "./schema";
4
+ declare function conversationRows(db: JuniorDatabase, limit: number, actorEmail?: string): Promise<{
5
+ conversation: {
6
+ conversationId: string;
7
+ schemaVersion: number;
8
+ source: import("@/chat/conversations/store").ConversationSource | null;
9
+ originType: string | null;
10
+ originId: string | null;
11
+ originRunId: string | null;
12
+ destinationId: string | null;
13
+ destination: {
14
+ platform: "slack";
15
+ teamId: string;
16
+ channelId: string;
17
+ } | {
18
+ platform: "local";
19
+ conversationId: string;
20
+ } | null;
21
+ actorIdentityId: string | null;
22
+ creatorIdentityId: string | null;
23
+ credentialSubjectIdentityId: string | null;
24
+ actor: {
25
+ email?: string | undefined;
26
+ fullName?: string | undefined;
27
+ platform?: "slack" | undefined;
28
+ slackUserId?: string | undefined;
29
+ slackUserName?: string | undefined;
30
+ teamId?: string | undefined;
31
+ } | null;
32
+ channelName: string | null;
33
+ title: string | null;
34
+ createdAt: Date;
35
+ lastActivityAt: Date;
36
+ updatedAt: Date;
37
+ executionUpdatedAt: Date | null;
38
+ executionStatus: import("@/chat/conversations/store").ConversationStatus;
39
+ runId: string | null;
40
+ lastCheckpointAt: Date | null;
41
+ lastEnqueuedAt: Date | null;
42
+ parentConversationId: string | null;
43
+ transcriptPurgedAt: Date | null;
44
+ durationMs: number;
45
+ usage: {
46
+ inputTokens?: number | undefined;
47
+ outputTokens?: number | undefined;
48
+ cachedInputTokens?: number | undefined;
49
+ cacheCreationTokens?: number | undefined;
50
+ reasoningTokens?: number | undefined;
51
+ totalTokens?: number | undefined;
52
+ cost?: {
53
+ input?: number | undefined;
54
+ output?: number | undefined;
55
+ cacheRead?: number | undefined;
56
+ cacheWrite?: number | undefined;
57
+ total?: number | undefined;
58
+ } | undefined;
59
+ } | null;
60
+ executionDurationMs: number;
61
+ executionUsage: {
62
+ inputTokens?: number | undefined;
63
+ outputTokens?: number | undefined;
64
+ cachedInputTokens?: number | undefined;
65
+ cacheCreationTokens?: number | undefined;
66
+ reasoningTokens?: number | undefined;
67
+ totalTokens?: number | undefined;
68
+ cost?: {
69
+ input?: number | undefined;
70
+ output?: number | undefined;
71
+ cacheRead?: number | undefined;
72
+ cacheWrite?: number | undefined;
73
+ total?: number | undefined;
74
+ } | undefined;
75
+ } | null;
76
+ metricRunId: string | null;
77
+ archivedAt: Date | null;
78
+ };
79
+ destinationId: string | null;
80
+ destinationVisibility: import("../../db/schema/destinations").JuniorDestinationVisibility | null;
81
+ identityDisplayName: string | null;
82
+ identityEmail: string | null;
83
+ identityHandle: string | null;
84
+ identityProvider: string | null;
85
+ identitySubjectId: string | null;
86
+ identityTenantId: string | null;
87
+ }[]>;
88
+ type ConversationRow = Awaited<ReturnType<typeof conversationRows>>[number];
89
+ /** Read one normalized conversation record directly from its SQL row. */
90
+ export declare function readConversationRecordFromSql(conversationId: string): Promise<{
91
+ conversation: Conversation;
92
+ durationMs: number;
93
+ locationId?: string;
94
+ usage: ConversationRow["conversation"]["usage"];
95
+ } | undefined>;
96
+ /**
97
+ * Build a bounded dashboard feed, applying a normalized actor-email filter
98
+ * before the limit when one is provided.
99
+ */
100
+ export declare function readConversationFeedFromSql(options?: {
101
+ actorEmail?: string;
102
+ limit?: number;
103
+ }): Promise<ConversationFeed>;
2
104
  /**
3
105
  * Load a bounded feed with an optional normalized actor-email presentation
4
106
  * filter. This filter is not an authorization boundary.
@@ -6,3 +108,10 @@ import type { ConversationFeed } from "./schema";
6
108
  export declare function readConversationFeed(options?: {
7
109
  actorEmail?: string;
8
110
  }): Promise<ConversationFeed>;
111
+ /** Serve the conversation feed endpoint. */
112
+ declare const _default: {
113
+ method: "get";
114
+ path: string;
115
+ handler: (c: import("hono").Context<any, any, import("hono/types").BlankInput>) => Promise<Response>;
116
+ };
117
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import { Hono } from "hono";
2
+ /** Create the HTTP routes owned by the conversations API. */
3
+ export declare function createConversationRoutes(): Hono;
@@ -1,14 +1,14 @@
1
1
  import { z } from "zod";
2
2
  export declare const conversationReportStatusSchema: z.ZodEnum<{
3
- active: "active";
4
- failed: "failed";
5
3
  completed: "completed";
4
+ failed: "failed";
5
+ active: "active";
6
6
  }>;
7
7
  export declare const conversationSurfaceSchema: z.ZodEnum<{
8
+ slack: "slack";
8
9
  api: "api";
9
10
  internal: "internal";
10
11
  scheduler: "scheduler";
11
- slack: "slack";
12
12
  }>;
13
13
  export declare const conversationCostSchema: z.ZodObject<{
14
14
  input: z.ZodOptional<z.ZodNumber>;
@@ -58,18 +58,18 @@ export declare const conversationSummaryReportSchema: z.ZodObject<{
58
58
  }, z.core.$strict>>;
59
59
  conversationId: z.ZodString;
60
60
  status: z.ZodEnum<{
61
- active: "active";
62
- failed: "failed";
63
61
  completed: "completed";
62
+ failed: "failed";
63
+ active: "active";
64
64
  }>;
65
65
  startedAt: z.ZodString;
66
66
  lastSeenAt: z.ZodString;
67
67
  lastProgressAt: z.ZodString;
68
68
  surface: z.ZodEnum<{
69
+ slack: "slack";
69
70
  api: "api";
70
71
  internal: "internal";
71
72
  scheduler: "scheduler";
72
- slack: "slack";
73
73
  }>;
74
74
  actorIdentity: z.ZodOptional<z.ZodObject<{
75
75
  email: z.ZodOptional<z.ZodString>;
@@ -77,6 +77,7 @@ export declare const conversationSummaryReportSchema: z.ZodObject<{
77
77
  slackUserId: z.ZodOptional<z.ZodString>;
78
78
  slackUserName: z.ZodOptional<z.ZodString>;
79
79
  }, z.core.$strict>>;
80
+ archivedAt: z.ZodOptional<z.ZodString>;
80
81
  channel: z.ZodOptional<z.ZodString>;
81
82
  channelName: z.ZodOptional<z.ZodString>;
82
83
  channelNameRedacted: z.ZodOptional<z.ZodBoolean>;
@@ -85,11 +86,11 @@ export declare const conversationSummaryReportSchema: z.ZodObject<{
85
86
  traceId: z.ZodOptional<z.ZodString>;
86
87
  }, z.core.$strict>;
87
88
  export declare const transcriptPartTypeSchema: z.ZodEnum<{
89
+ tool_call: "tool_call";
88
90
  text: "text";
91
+ unknown: "unknown";
89
92
  thinking: "thinking";
90
- tool_call: "tool_call";
91
93
  tool_result: "tool_result";
92
- unknown: "unknown";
93
94
  }>;
94
95
  export declare const transcriptPartSchema: z.ZodObject<{
95
96
  bytes: z.ZodOptional<z.ZodNumber>;
@@ -110,20 +111,20 @@ export declare const transcriptPartSchema: z.ZodObject<{
110
111
  sourceType: z.ZodOptional<z.ZodString>;
111
112
  text: z.ZodOptional<z.ZodString>;
112
113
  type: z.ZodEnum<{
114
+ tool_call: "tool_call";
113
115
  text: "text";
116
+ unknown: "unknown";
114
117
  thinking: "thinking";
115
- tool_call: "tool_call";
116
118
  tool_result: "tool_result";
117
- unknown: "unknown";
118
119
  }>;
119
120
  }, z.core.$strict>;
120
121
  export declare const transcriptRoleSchema: z.ZodEnum<{
122
+ system: "system";
123
+ user: "user";
121
124
  unknown: "unknown";
122
125
  assistant: "assistant";
123
- system: "system";
124
- tool: "tool";
125
126
  toolResult: "toolResult";
126
- user: "user";
127
+ tool: "tool";
127
128
  }>;
128
129
  export declare const transcriptMessageSchema: z.ZodObject<{
129
130
  outcome: z.ZodOptional<z.ZodEnum<{
@@ -149,29 +150,29 @@ export declare const transcriptMessageSchema: z.ZodObject<{
149
150
  sourceType: z.ZodOptional<z.ZodString>;
150
151
  text: z.ZodOptional<z.ZodString>;
151
152
  type: z.ZodEnum<{
153
+ tool_call: "tool_call";
152
154
  text: "text";
155
+ unknown: "unknown";
153
156
  thinking: "thinking";
154
- tool_call: "tool_call";
155
157
  tool_result: "tool_result";
156
- unknown: "unknown";
157
158
  }>;
158
159
  }, z.core.$strict>>;
159
160
  role: z.ZodEnum<{
161
+ system: "system";
162
+ user: "user";
160
163
  unknown: "unknown";
161
164
  assistant: "assistant";
162
- system: "system";
163
- tool: "tool";
164
165
  toolResult: "toolResult";
165
- user: "user";
166
+ tool: "tool";
166
167
  }>;
167
168
  timestamp: z.ZodOptional<z.ZodNumber>;
168
169
  }, z.core.$strict>;
169
170
  export declare const conversationActivityStatusSchema: z.ZodEnum<{
170
171
  error: "error";
171
- completed: "completed";
172
- success: "success";
173
172
  aborted: "aborted";
173
+ success: "success";
174
174
  running: "running";
175
+ completed: "completed";
175
176
  }>;
176
177
  export declare const conversationSubagentActivityReportSchema: z.ZodObject<{
177
178
  type: z.ZodLiteral<"subagent">;
@@ -181,17 +182,17 @@ export declare const conversationSubagentActivityReportSchema: z.ZodObject<{
181
182
  modelId: z.ZodOptional<z.ZodString>;
182
183
  outcome: z.ZodOptional<z.ZodEnum<{
183
184
  error: "error";
184
- success: "success";
185
185
  aborted: "aborted";
186
+ success: "success";
186
187
  }>>;
187
188
  parentToolCallId: z.ZodOptional<z.ZodString>;
188
189
  reasoningLevel: z.ZodOptional<z.ZodString>;
189
190
  status: z.ZodEnum<{
190
191
  error: "error";
191
- completed: "completed";
192
- success: "success";
193
192
  aborted: "aborted";
193
+ success: "success";
194
194
  running: "running";
195
+ completed: "completed";
195
196
  }>;
196
197
  subagentKind: z.ZodString;
197
198
  transcriptAvailable: z.ZodOptional<z.ZodBoolean>;
@@ -208,10 +209,10 @@ export declare const conversationToolActivityReportSchema: z.ZodObject<{
208
209
  redacted: z.ZodOptional<z.ZodBoolean>;
209
210
  status: z.ZodEnum<{
210
211
  error: "error";
211
- completed: "completed";
212
- success: "success";
213
212
  aborted: "aborted";
213
+ success: "success";
214
214
  running: "running";
215
+ completed: "completed";
215
216
  }>;
216
217
  subagents: z.ZodArray<z.ZodObject<{
217
218
  type: z.ZodLiteral<"subagent">;
@@ -221,17 +222,17 @@ export declare const conversationToolActivityReportSchema: z.ZodObject<{
221
222
  modelId: z.ZodOptional<z.ZodString>;
222
223
  outcome: z.ZodOptional<z.ZodEnum<{
223
224
  error: "error";
224
- success: "success";
225
225
  aborted: "aborted";
226
+ success: "success";
226
227
  }>>;
227
228
  parentToolCallId: z.ZodOptional<z.ZodString>;
228
229
  reasoningLevel: z.ZodOptional<z.ZodString>;
229
230
  status: z.ZodEnum<{
230
231
  error: "error";
231
- completed: "completed";
232
- success: "success";
233
232
  aborted: "aborted";
233
+ success: "success";
234
234
  running: "running";
235
+ completed: "completed";
235
236
  }>;
236
237
  subagentKind: z.ZodString;
237
238
  transcriptAvailable: z.ZodOptional<z.ZodBoolean>;
@@ -251,10 +252,10 @@ export declare const conversationActivityReportSchema: z.ZodDiscriminatedUnion<[
251
252
  redacted: z.ZodOptional<z.ZodBoolean>;
252
253
  status: z.ZodEnum<{
253
254
  error: "error";
254
- completed: "completed";
255
- success: "success";
256
255
  aborted: "aborted";
256
+ success: "success";
257
257
  running: "running";
258
+ completed: "completed";
258
259
  }>;
259
260
  subagents: z.ZodArray<z.ZodObject<{
260
261
  type: z.ZodLiteral<"subagent">;
@@ -264,17 +265,17 @@ export declare const conversationActivityReportSchema: z.ZodDiscriminatedUnion<[
264
265
  modelId: z.ZodOptional<z.ZodString>;
265
266
  outcome: z.ZodOptional<z.ZodEnum<{
266
267
  error: "error";
267
- success: "success";
268
268
  aborted: "aborted";
269
+ success: "success";
269
270
  }>>;
270
271
  parentToolCallId: z.ZodOptional<z.ZodString>;
271
272
  reasoningLevel: z.ZodOptional<z.ZodString>;
272
273
  status: z.ZodEnum<{
273
274
  error: "error";
274
- completed: "completed";
275
- success: "success";
276
275
  aborted: "aborted";
276
+ success: "success";
277
277
  running: "running";
278
+ completed: "completed";
278
279
  }>;
279
280
  subagentKind: z.ZodString;
280
281
  transcriptAvailable: z.ZodOptional<z.ZodBoolean>;
@@ -289,17 +290,17 @@ export declare const conversationActivityReportSchema: z.ZodDiscriminatedUnion<[
289
290
  modelId: z.ZodOptional<z.ZodString>;
290
291
  outcome: z.ZodOptional<z.ZodEnum<{
291
292
  error: "error";
292
- success: "success";
293
293
  aborted: "aborted";
294
+ success: "success";
294
295
  }>>;
295
296
  parentToolCallId: z.ZodOptional<z.ZodString>;
296
297
  reasoningLevel: z.ZodOptional<z.ZodString>;
297
298
  status: z.ZodEnum<{
298
299
  error: "error";
299
- completed: "completed";
300
- success: "success";
301
300
  aborted: "aborted";
301
+ success: "success";
302
302
  running: "running";
303
+ completed: "completed";
303
304
  }>;
304
305
  subagentKind: z.ZodString;
305
306
  transcriptAvailable: z.ZodOptional<z.ZodBoolean>;
@@ -338,18 +339,18 @@ export declare const conversationDetailReportSchema: z.ZodObject<{
338
339
  }, z.core.$strict>>;
339
340
  conversationId: z.ZodString;
340
341
  status: z.ZodEnum<{
341
- active: "active";
342
- failed: "failed";
343
342
  completed: "completed";
343
+ failed: "failed";
344
+ active: "active";
344
345
  }>;
345
346
  startedAt: z.ZodString;
346
347
  lastSeenAt: z.ZodString;
347
348
  lastProgressAt: z.ZodString;
348
349
  surface: z.ZodEnum<{
350
+ slack: "slack";
349
351
  api: "api";
350
352
  internal: "internal";
351
353
  scheduler: "scheduler";
352
- slack: "slack";
353
354
  }>;
354
355
  actorIdentity: z.ZodOptional<z.ZodObject<{
355
356
  email: z.ZodOptional<z.ZodString>;
@@ -357,6 +358,7 @@ export declare const conversationDetailReportSchema: z.ZodObject<{
357
358
  slackUserId: z.ZodOptional<z.ZodString>;
358
359
  slackUserName: z.ZodOptional<z.ZodString>;
359
360
  }, z.core.$strict>>;
361
+ archivedAt: z.ZodOptional<z.ZodString>;
360
362
  channel: z.ZodOptional<z.ZodString>;
361
363
  channelName: z.ZodOptional<z.ZodString>;
362
364
  channelNameRedacted: z.ZodOptional<z.ZodBoolean>;
@@ -375,10 +377,10 @@ export declare const conversationDetailReportSchema: z.ZodObject<{
375
377
  redacted: z.ZodOptional<z.ZodBoolean>;
376
378
  status: z.ZodEnum<{
377
379
  error: "error";
378
- completed: "completed";
379
- success: "success";
380
380
  aborted: "aborted";
381
+ success: "success";
381
382
  running: "running";
383
+ completed: "completed";
382
384
  }>;
383
385
  subagents: z.ZodArray<z.ZodObject<{
384
386
  type: z.ZodLiteral<"subagent">;
@@ -388,17 +390,17 @@ export declare const conversationDetailReportSchema: z.ZodObject<{
388
390
  modelId: z.ZodOptional<z.ZodString>;
389
391
  outcome: z.ZodOptional<z.ZodEnum<{
390
392
  error: "error";
391
- success: "success";
392
393
  aborted: "aborted";
394
+ success: "success";
393
395
  }>>;
394
396
  parentToolCallId: z.ZodOptional<z.ZodString>;
395
397
  reasoningLevel: z.ZodOptional<z.ZodString>;
396
398
  status: z.ZodEnum<{
397
399
  error: "error";
398
- completed: "completed";
399
- success: "success";
400
400
  aborted: "aborted";
401
+ success: "success";
401
402
  running: "running";
403
+ completed: "completed";
402
404
  }>;
403
405
  subagentKind: z.ZodString;
404
406
  transcriptAvailable: z.ZodOptional<z.ZodBoolean>;
@@ -413,17 +415,17 @@ export declare const conversationDetailReportSchema: z.ZodObject<{
413
415
  modelId: z.ZodOptional<z.ZodString>;
414
416
  outcome: z.ZodOptional<z.ZodEnum<{
415
417
  error: "error";
416
- success: "success";
417
418
  aborted: "aborted";
419
+ success: "success";
418
420
  }>>;
419
421
  parentToolCallId: z.ZodOptional<z.ZodString>;
420
422
  reasoningLevel: z.ZodOptional<z.ZodString>;
421
423
  status: z.ZodEnum<{
422
424
  error: "error";
423
- completed: "completed";
424
- success: "success";
425
425
  aborted: "aborted";
426
+ success: "success";
426
427
  running: "running";
428
+ completed: "completed";
427
429
  }>;
428
430
  subagentKind: z.ZodString;
429
431
  transcriptAvailable: z.ZodOptional<z.ZodBoolean>;
@@ -469,20 +471,20 @@ export declare const conversationDetailReportSchema: z.ZodObject<{
469
471
  sourceType: z.ZodOptional<z.ZodString>;
470
472
  text: z.ZodOptional<z.ZodString>;
471
473
  type: z.ZodEnum<{
474
+ tool_call: "tool_call";
472
475
  text: "text";
476
+ unknown: "unknown";
473
477
  thinking: "thinking";
474
- tool_call: "tool_call";
475
478
  tool_result: "tool_result";
476
- unknown: "unknown";
477
479
  }>;
478
480
  }, z.core.$strict>>;
479
481
  role: z.ZodEnum<{
482
+ system: "system";
483
+ user: "user";
480
484
  unknown: "unknown";
481
485
  assistant: "assistant";
482
- system: "system";
483
- tool: "tool";
484
486
  toolResult: "toolResult";
485
- user: "user";
487
+ tool: "tool";
486
488
  }>;
487
489
  timestamp: z.ZodOptional<z.ZodNumber>;
488
490
  }, z.core.$strict>>>;
@@ -515,20 +517,20 @@ export declare const conversationDetailReportSchema: z.ZodObject<{
515
517
  sourceType: z.ZodOptional<z.ZodString>;
516
518
  text: z.ZodOptional<z.ZodString>;
517
519
  type: z.ZodEnum<{
520
+ tool_call: "tool_call";
518
521
  text: "text";
522
+ unknown: "unknown";
519
523
  thinking: "thinking";
520
- tool_call: "tool_call";
521
524
  tool_result: "tool_result";
522
- unknown: "unknown";
523
525
  }>;
524
526
  }, z.core.$strict>>;
525
527
  role: z.ZodEnum<{
528
+ system: "system";
529
+ user: "user";
526
530
  unknown: "unknown";
527
531
  assistant: "assistant";
528
- system: "system";
529
- tool: "tool";
530
532
  toolResult: "toolResult";
531
- user: "user";
533
+ tool: "tool";
532
534
  }>;
533
535
  timestamp: z.ZodOptional<z.ZodNumber>;
534
536
  }, z.core.$strict>>;
@@ -543,17 +545,17 @@ export declare const conversationSubagentTranscriptReportSchema: z.ZodObject<{
543
545
  modelId: z.ZodOptional<z.ZodString>;
544
546
  outcome: z.ZodOptional<z.ZodEnum<{
545
547
  error: "error";
546
- success: "success";
547
548
  aborted: "aborted";
549
+ success: "success";
548
550
  }>>;
549
551
  parentToolCallId: z.ZodOptional<z.ZodString>;
550
552
  reasoningLevel: z.ZodOptional<z.ZodString>;
551
553
  status: z.ZodEnum<{
552
554
  error: "error";
553
- completed: "completed";
554
- success: "success";
555
555
  aborted: "aborted";
556
+ success: "success";
556
557
  running: "running";
558
+ completed: "completed";
557
559
  }>;
558
560
  subagentConversationId: z.ZodOptional<z.ZodString>;
559
561
  subagentKind: z.ZodString;
@@ -582,20 +584,20 @@ export declare const conversationSubagentTranscriptReportSchema: z.ZodObject<{
582
584
  sourceType: z.ZodOptional<z.ZodString>;
583
585
  text: z.ZodOptional<z.ZodString>;
584
586
  type: z.ZodEnum<{
587
+ tool_call: "tool_call";
585
588
  text: "text";
589
+ unknown: "unknown";
586
590
  thinking: "thinking";
587
- tool_call: "tool_call";
588
591
  tool_result: "tool_result";
589
- unknown: "unknown";
590
592
  }>;
591
593
  }, z.core.$strict>>;
592
594
  role: z.ZodEnum<{
595
+ system: "system";
596
+ user: "user";
593
597
  unknown: "unknown";
594
598
  assistant: "assistant";
595
- system: "system";
596
- tool: "tool";
597
599
  toolResult: "toolResult";
598
- user: "user";
600
+ tool: "tool";
599
601
  }>;
600
602
  timestamp: z.ZodOptional<z.ZodNumber>;
601
603
  }, z.core.$strict>>;
@@ -606,9 +608,9 @@ export declare const conversationSubagentTranscriptReportSchema: z.ZodObject<{
606
608
  transcriptExpired: z.ZodOptional<z.ZodBoolean>;
607
609
  transcriptExpiredAt: z.ZodOptional<z.ZodString>;
608
610
  unavailableReason: z.ZodOptional<z.ZodEnum<{
611
+ not_found: "not_found";
609
612
  missing_transcript_range: "missing_transcript_range";
610
613
  missing_transcript_ref: "missing_transcript_ref";
611
- not_found: "not_found";
612
614
  }>>;
613
615
  }, z.core.$strict>;
614
616
  export declare const conversationFeedSchema: z.ZodObject<{
@@ -632,18 +634,18 @@ export declare const conversationFeedSchema: z.ZodObject<{
632
634
  }, z.core.$strict>>;
633
635
  conversationId: z.ZodString;
634
636
  status: z.ZodEnum<{
635
- active: "active";
636
- failed: "failed";
637
637
  completed: "completed";
638
+ failed: "failed";
639
+ active: "active";
638
640
  }>;
639
641
  startedAt: z.ZodString;
640
642
  lastSeenAt: z.ZodString;
641
643
  lastProgressAt: z.ZodString;
642
644
  surface: z.ZodEnum<{
645
+ slack: "slack";
643
646
  api: "api";
644
647
  internal: "internal";
645
648
  scheduler: "scheduler";
646
- slack: "slack";
647
649
  }>;
648
650
  actorIdentity: z.ZodOptional<z.ZodObject<{
649
651
  email: z.ZodOptional<z.ZodString>;
@@ -651,6 +653,7 @@ export declare const conversationFeedSchema: z.ZodObject<{
651
653
  slackUserId: z.ZodOptional<z.ZodString>;
652
654
  slackUserName: z.ZodOptional<z.ZodString>;
653
655
  }, z.core.$strict>>;
656
+ archivedAt: z.ZodOptional<z.ZodString>;
654
657
  channel: z.ZodOptional<z.ZodString>;
655
658
  channelName: z.ZodOptional<z.ZodString>;
656
659
  channelNameRedacted: z.ZodOptional<z.ZodBoolean>;
@@ -1,3 +1,10 @@
1
1
  import type { ConversationStatsReport } from "./schema";
2
2
  /** Load aggregate conversation stats directly from durable SQL records. */
3
3
  export declare function readConversationStats(): Promise<ConversationStatsReport>;
4
+ /** Serve aggregate conversation stats. */
5
+ declare const _default: {
6
+ method: "get";
7
+ path: string;
8
+ handler: () => Promise<Response>;
9
+ };
10
+ export default _default;
@@ -1,3 +1,10 @@
1
1
  import type { ConversationSubagentTranscriptReport } from "./schema";
2
2
  /** Load one child-agent transcript from durable SQL conversation history. */
3
3
  export declare function readConversationSubagent(conversationId: string, subagentId: string): Promise<ConversationSubagentTranscriptReport>;
4
+ /** Serve one child-agent transcript endpoint. */
5
+ declare const _default: {
6
+ method: "get";
7
+ path: string;
8
+ handler: (c: import("hono").Context<any, any, import("hono/types").BlankInput>) => Promise<Response>;
9
+ };
10
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import { z } from "zod";
2
+ /** Parse route parameters and return a 400 response contract for invalid input. */
3
+ export declare function parseParams<TSchema extends z.ZodType>(schema: TSchema, params: Record<string, string>): z.infer<TSchema>;
4
+ /** Parse an HTTP query and return a 400 response contract for invalid input. */
5
+ export declare function parseQuery<TSchema extends z.ZodType>(schema: TSchema, query: unknown): z.infer<TSchema>;
@@ -40,11 +40,11 @@ export declare function readLocationDetail(locationId: string): Promise<{
40
40
  displayTitle: string;
41
41
  cumulativeDurationMs: number;
42
42
  conversationId: string;
43
- status: "active" | "failed" | "completed";
43
+ status: "completed" | "failed" | "active";
44
44
  startedAt: string;
45
45
  lastSeenAt: string;
46
46
  lastProgressAt: string;
47
- surface: "api" | "internal" | "scheduler" | "slack";
47
+ surface: "slack" | "api" | "internal" | "scheduler";
48
48
  cumulativeUsage?: {
49
49
  inputTokens?: number | undefined;
50
50
  outputTokens?: number | undefined;
@@ -66,6 +66,7 @@ export declare function readLocationDetail(locationId: string): Promise<{
66
66
  slackUserId?: string | undefined;
67
67
  slackUserName?: string | undefined;
68
68
  } | undefined;
69
+ archivedAt?: string | undefined;
69
70
  channel?: string | undefined;
70
71
  channelName?: string | undefined;
71
72
  channelNameRedacted?: boolean | undefined;
@@ -79,3 +80,10 @@ export declare function readLocationDetail(locationId: string): Promise<{
79
80
  costUsd?: number | undefined;
80
81
  tokens?: number | undefined;
81
82
  } | undefined>;
83
+ /** Serve one public location detail endpoint. */
84
+ declare const _default: {
85
+ method: "get";
86
+ path: string;
87
+ handler: (c: import("hono").Context<any, any, import("hono/types").BlankInput>) => Promise<Response>;
88
+ };
89
+ export default _default;