@sentry/junior 0.102.3 → 0.104.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.
- package/dist/{agent-hooks-I4I2DHSW.js → agent-hooks-EOFSY2PD.js} +5 -5
- package/dist/api/conversations/archive.d.ts +7 -0
- package/dist/api/conversations/detail.d.ts +7 -0
- package/dist/api/conversations/list.d.ts +109 -0
- package/dist/api/conversations/routes.d.ts +3 -0
- package/dist/api/conversations/schema.d.ts +88 -69
- package/dist/api/conversations/stats.d.ts +7 -0
- package/dist/api/conversations/subagent.d.ts +7 -0
- package/dist/api/http.d.ts +5 -0
- package/dist/api/locations/detail.d.ts +10 -2
- package/dist/api/locations/list.d.ts +7 -0
- package/dist/api/locations/routes.d.ts +3 -0
- package/dist/api/locations/schema.d.ts +4 -3
- package/dist/api/people/list.d.ts +7 -0
- package/dist/api/people/profile.d.ts +7 -0
- package/dist/api/people/routes.d.ts +3 -0
- package/dist/api/people/schema.d.ts +35 -33
- package/dist/api/people/shared.d.ts +4 -4
- package/dist/api/route.d.ts +7 -0
- package/dist/api/schema.js +11 -17
- package/dist/api.js +2184 -88
- package/dist/app.js +120 -162
- package/dist/chat/conversations/history.d.ts +6 -6
- package/dist/chat/conversations/store.d.ts +1 -0
- package/dist/chat/pi/messages.d.ts +2 -2
- package/dist/chat/plugins/agent-hooks.d.ts +2 -2
- package/dist/chat/resource-events/store.d.ts +2 -2
- package/dist/chat/sandbox/runtime-dependencies.d.ts +2 -0
- package/dist/chat/sandbox/sandbox.d.ts +1 -0
- package/dist/chat/services/provider-retry.d.ts +1 -2
- package/dist/chat/slack/tools/conversation-search.d.ts +2 -2
- package/dist/chat/state/session-log.d.ts +2 -2
- package/dist/chat/task-execution/store.d.ts +2 -2
- package/dist/chat/tools/search-tools.d.ts +2 -2
- package/dist/{chunk-ZSHL44IQ.js → chunk-4PDVOHXP.js} +1 -1
- package/dist/{chunk-3OABPOHR.js → chunk-7G4J3CR7.js} +11 -2
- package/dist/chunk-AIRE7Q2W.js +362 -0
- package/dist/{chunk-QZGVPPIJ.js → chunk-BCULHGZK.js} +24 -4
- package/dist/{chunk-IQ36I3DF.js → chunk-CCTCIISK.js} +1 -1
- package/dist/{chunk-SHBPSE7A.js → chunk-M3UAVLEN.js} +2 -3
- package/dist/{chunk-EMUZSROX.js → chunk-O7ILGCMJ.js} +78 -1
- package/dist/{chunk-EOB77KME.js → chunk-QDKRE3LS.js} +340 -9
- package/dist/{chunk-DTUSCR2Y.js → chunk-QVTVCJR4.js} +7 -7
- package/dist/{chunk-5K4N73TP.js → chunk-RMZ65YAA.js} +3 -3
- package/dist/{chunk-VSAFV2GI.js → chunk-RYDF4GOX.js} +3 -3
- package/dist/{chunk-ZIX4PNBI.js → chunk-TMWUGGSA.js} +37 -35
- package/dist/{chunk-3UK5DFKW.js → chunk-U26ZWZCN.js} +1 -1
- package/dist/{chunk-X2IPNCB5.js → chunk-VDHMFCDY.js} +65 -12
- package/dist/cli/chat.js +13 -14
- package/dist/cli/plugins.js +6 -6
- package/dist/cli/snapshot-warmup.js +7 -3
- package/dist/cli/upgrade.js +6 -7
- package/dist/db/schema/conversations.d.ts +17 -0
- package/dist/db/schema.d.ts +17 -0
- package/dist/{db-6QP6HY7U.js → db-PDMC67T3.js} +2 -2
- package/dist/{legacy-import-R3BMM2GH.js → legacy-import-G333RHJZ.js} +3 -3
- package/dist/reporting-schema.d.ts +4 -4
- package/dist/{runner-C2ZTIOUD.js → runner-6A7MQRUE.js} +9 -10
- package/migrations/0004_useful_magus.sql +1 -0
- package/migrations/meta/0004_snapshot.json +1041 -0
- package/migrations/meta/_journal.json +7 -0
- package/package.json +6 -6
- package/dist/api/conversations/list.query.d.ts +0 -103
- package/dist/chunk-2RNOB32R.js +0 -17
- package/dist/chunk-4XNQSJAX.js +0 -331
- package/dist/chunk-4YN2ZXKB.js +0 -66
- package/dist/chunk-B5QS4AVO.js +0 -319
- package/dist/chunk-F4CQEUTP.js +0 -77
- package/dist/chunk-HYDQULR2.js +0 -214
- package/dist/chunk-KFP3TZOS.js +0 -102
- package/dist/chunk-LJB2TLVT.js +0 -273
- package/dist/chunk-LVUKF5CE.js +0 -63
- package/dist/chunk-NSP6OGL2.js +0 -671
- package/dist/chunk-QNVHH5PU.js +0 -20
- package/dist/chunk-QOZOJNSE.js +0 -96
- package/dist/chunk-WPHCUGN7.js +0 -84
- package/dist/detail-OEIVZYXS.js +0 -68
- package/dist/detail-V37NTVBN.js +0 -29
- package/dist/list-AJ6RWBOG.js +0 -30
- package/dist/list-FWLIZHSW.js +0 -30
- package/dist/list-NTUT6A5M.js +0 -121
- package/dist/plugin-conversations-F3IBVNFX.js +0 -37
- package/dist/profile-3FRQP4HP.js +0 -212
- package/dist/reporting/plugin-conversations.d.ts +0 -3
- package/dist/stats-7UFY6FPE.js +0 -174
- package/dist/subagent-X3ZWJHR4.js +0 -49
|
@@ -11,13 +11,13 @@ import {
|
|
|
11
11
|
getPlugins,
|
|
12
12
|
setPlugins,
|
|
13
13
|
validatePlugins
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-ZSHL44IQ.js";
|
|
17
|
-
import "./chunk-QZGVPPIJ.js";
|
|
14
|
+
} from "./chunk-VDHMFCDY.js";
|
|
15
|
+
import "./chunk-4PDVOHXP.js";
|
|
18
16
|
import "./chunk-G3E7SCME.js";
|
|
17
|
+
import "./chunk-CCTCIISK.js";
|
|
18
|
+
import "./chunk-BCULHGZK.js";
|
|
19
19
|
import "./chunk-4ZNGQH7C.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-M3UAVLEN.js";
|
|
21
21
|
import "./chunk-FXFQNHRU.js";
|
|
22
22
|
import "./chunk-RT5BUHR5.js";
|
|
23
23
|
import "./chunk-B7PUBQQM.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;
|
|
@@ -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,22 +111,26 @@ 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
|
-
|
|
127
|
+
tool: "tool";
|
|
127
128
|
}>;
|
|
128
129
|
export declare const transcriptMessageSchema: z.ZodObject<{
|
|
130
|
+
outcome: z.ZodOptional<z.ZodEnum<{
|
|
131
|
+
error: "error";
|
|
132
|
+
aborted: "aborted";
|
|
133
|
+
}>>;
|
|
129
134
|
parts: z.ZodArray<z.ZodObject<{
|
|
130
135
|
bytes: z.ZodOptional<z.ZodNumber>;
|
|
131
136
|
chars: z.ZodOptional<z.ZodNumber>;
|
|
@@ -145,29 +150,29 @@ export declare const transcriptMessageSchema: z.ZodObject<{
|
|
|
145
150
|
sourceType: z.ZodOptional<z.ZodString>;
|
|
146
151
|
text: z.ZodOptional<z.ZodString>;
|
|
147
152
|
type: z.ZodEnum<{
|
|
153
|
+
tool_call: "tool_call";
|
|
148
154
|
text: "text";
|
|
155
|
+
unknown: "unknown";
|
|
149
156
|
thinking: "thinking";
|
|
150
|
-
tool_call: "tool_call";
|
|
151
157
|
tool_result: "tool_result";
|
|
152
|
-
unknown: "unknown";
|
|
153
158
|
}>;
|
|
154
159
|
}, z.core.$strict>>;
|
|
155
160
|
role: z.ZodEnum<{
|
|
161
|
+
system: "system";
|
|
162
|
+
user: "user";
|
|
156
163
|
unknown: "unknown";
|
|
157
164
|
assistant: "assistant";
|
|
158
|
-
system: "system";
|
|
159
|
-
tool: "tool";
|
|
160
165
|
toolResult: "toolResult";
|
|
161
|
-
|
|
166
|
+
tool: "tool";
|
|
162
167
|
}>;
|
|
163
168
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
164
169
|
}, z.core.$strict>;
|
|
165
170
|
export declare const conversationActivityStatusSchema: z.ZodEnum<{
|
|
166
171
|
error: "error";
|
|
167
|
-
completed: "completed";
|
|
168
|
-
success: "success";
|
|
169
172
|
aborted: "aborted";
|
|
173
|
+
success: "success";
|
|
170
174
|
running: "running";
|
|
175
|
+
completed: "completed";
|
|
171
176
|
}>;
|
|
172
177
|
export declare const conversationSubagentActivityReportSchema: z.ZodObject<{
|
|
173
178
|
type: z.ZodLiteral<"subagent">;
|
|
@@ -177,17 +182,17 @@ export declare const conversationSubagentActivityReportSchema: z.ZodObject<{
|
|
|
177
182
|
modelId: z.ZodOptional<z.ZodString>;
|
|
178
183
|
outcome: z.ZodOptional<z.ZodEnum<{
|
|
179
184
|
error: "error";
|
|
180
|
-
success: "success";
|
|
181
185
|
aborted: "aborted";
|
|
186
|
+
success: "success";
|
|
182
187
|
}>>;
|
|
183
188
|
parentToolCallId: z.ZodOptional<z.ZodString>;
|
|
184
189
|
reasoningLevel: z.ZodOptional<z.ZodString>;
|
|
185
190
|
status: z.ZodEnum<{
|
|
186
191
|
error: "error";
|
|
187
|
-
completed: "completed";
|
|
188
|
-
success: "success";
|
|
189
192
|
aborted: "aborted";
|
|
193
|
+
success: "success";
|
|
190
194
|
running: "running";
|
|
195
|
+
completed: "completed";
|
|
191
196
|
}>;
|
|
192
197
|
subagentKind: z.ZodString;
|
|
193
198
|
transcriptAvailable: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -204,10 +209,10 @@ export declare const conversationToolActivityReportSchema: z.ZodObject<{
|
|
|
204
209
|
redacted: z.ZodOptional<z.ZodBoolean>;
|
|
205
210
|
status: z.ZodEnum<{
|
|
206
211
|
error: "error";
|
|
207
|
-
completed: "completed";
|
|
208
|
-
success: "success";
|
|
209
212
|
aborted: "aborted";
|
|
213
|
+
success: "success";
|
|
210
214
|
running: "running";
|
|
215
|
+
completed: "completed";
|
|
211
216
|
}>;
|
|
212
217
|
subagents: z.ZodArray<z.ZodObject<{
|
|
213
218
|
type: z.ZodLiteral<"subagent">;
|
|
@@ -217,17 +222,17 @@ export declare const conversationToolActivityReportSchema: z.ZodObject<{
|
|
|
217
222
|
modelId: z.ZodOptional<z.ZodString>;
|
|
218
223
|
outcome: z.ZodOptional<z.ZodEnum<{
|
|
219
224
|
error: "error";
|
|
220
|
-
success: "success";
|
|
221
225
|
aborted: "aborted";
|
|
226
|
+
success: "success";
|
|
222
227
|
}>>;
|
|
223
228
|
parentToolCallId: z.ZodOptional<z.ZodString>;
|
|
224
229
|
reasoningLevel: z.ZodOptional<z.ZodString>;
|
|
225
230
|
status: z.ZodEnum<{
|
|
226
231
|
error: "error";
|
|
227
|
-
completed: "completed";
|
|
228
|
-
success: "success";
|
|
229
232
|
aborted: "aborted";
|
|
233
|
+
success: "success";
|
|
230
234
|
running: "running";
|
|
235
|
+
completed: "completed";
|
|
231
236
|
}>;
|
|
232
237
|
subagentKind: z.ZodString;
|
|
233
238
|
transcriptAvailable: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -247,10 +252,10 @@ export declare const conversationActivityReportSchema: z.ZodDiscriminatedUnion<[
|
|
|
247
252
|
redacted: z.ZodOptional<z.ZodBoolean>;
|
|
248
253
|
status: z.ZodEnum<{
|
|
249
254
|
error: "error";
|
|
250
|
-
completed: "completed";
|
|
251
|
-
success: "success";
|
|
252
255
|
aborted: "aborted";
|
|
256
|
+
success: "success";
|
|
253
257
|
running: "running";
|
|
258
|
+
completed: "completed";
|
|
254
259
|
}>;
|
|
255
260
|
subagents: z.ZodArray<z.ZodObject<{
|
|
256
261
|
type: z.ZodLiteral<"subagent">;
|
|
@@ -260,17 +265,17 @@ export declare const conversationActivityReportSchema: z.ZodDiscriminatedUnion<[
|
|
|
260
265
|
modelId: z.ZodOptional<z.ZodString>;
|
|
261
266
|
outcome: z.ZodOptional<z.ZodEnum<{
|
|
262
267
|
error: "error";
|
|
263
|
-
success: "success";
|
|
264
268
|
aborted: "aborted";
|
|
269
|
+
success: "success";
|
|
265
270
|
}>>;
|
|
266
271
|
parentToolCallId: z.ZodOptional<z.ZodString>;
|
|
267
272
|
reasoningLevel: z.ZodOptional<z.ZodString>;
|
|
268
273
|
status: z.ZodEnum<{
|
|
269
274
|
error: "error";
|
|
270
|
-
completed: "completed";
|
|
271
|
-
success: "success";
|
|
272
275
|
aborted: "aborted";
|
|
276
|
+
success: "success";
|
|
273
277
|
running: "running";
|
|
278
|
+
completed: "completed";
|
|
274
279
|
}>;
|
|
275
280
|
subagentKind: z.ZodString;
|
|
276
281
|
transcriptAvailable: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -285,17 +290,17 @@ export declare const conversationActivityReportSchema: z.ZodDiscriminatedUnion<[
|
|
|
285
290
|
modelId: z.ZodOptional<z.ZodString>;
|
|
286
291
|
outcome: z.ZodOptional<z.ZodEnum<{
|
|
287
292
|
error: "error";
|
|
288
|
-
success: "success";
|
|
289
293
|
aborted: "aborted";
|
|
294
|
+
success: "success";
|
|
290
295
|
}>>;
|
|
291
296
|
parentToolCallId: z.ZodOptional<z.ZodString>;
|
|
292
297
|
reasoningLevel: z.ZodOptional<z.ZodString>;
|
|
293
298
|
status: z.ZodEnum<{
|
|
294
299
|
error: "error";
|
|
295
|
-
completed: "completed";
|
|
296
|
-
success: "success";
|
|
297
300
|
aborted: "aborted";
|
|
301
|
+
success: "success";
|
|
298
302
|
running: "running";
|
|
303
|
+
completed: "completed";
|
|
299
304
|
}>;
|
|
300
305
|
subagentKind: z.ZodString;
|
|
301
306
|
transcriptAvailable: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -334,18 +339,18 @@ export declare const conversationDetailReportSchema: z.ZodObject<{
|
|
|
334
339
|
}, z.core.$strict>>;
|
|
335
340
|
conversationId: z.ZodString;
|
|
336
341
|
status: z.ZodEnum<{
|
|
337
|
-
active: "active";
|
|
338
|
-
failed: "failed";
|
|
339
342
|
completed: "completed";
|
|
343
|
+
failed: "failed";
|
|
344
|
+
active: "active";
|
|
340
345
|
}>;
|
|
341
346
|
startedAt: z.ZodString;
|
|
342
347
|
lastSeenAt: z.ZodString;
|
|
343
348
|
lastProgressAt: z.ZodString;
|
|
344
349
|
surface: z.ZodEnum<{
|
|
350
|
+
slack: "slack";
|
|
345
351
|
api: "api";
|
|
346
352
|
internal: "internal";
|
|
347
353
|
scheduler: "scheduler";
|
|
348
|
-
slack: "slack";
|
|
349
354
|
}>;
|
|
350
355
|
actorIdentity: z.ZodOptional<z.ZodObject<{
|
|
351
356
|
email: z.ZodOptional<z.ZodString>;
|
|
@@ -353,6 +358,7 @@ export declare const conversationDetailReportSchema: z.ZodObject<{
|
|
|
353
358
|
slackUserId: z.ZodOptional<z.ZodString>;
|
|
354
359
|
slackUserName: z.ZodOptional<z.ZodString>;
|
|
355
360
|
}, z.core.$strict>>;
|
|
361
|
+
archivedAt: z.ZodOptional<z.ZodString>;
|
|
356
362
|
channel: z.ZodOptional<z.ZodString>;
|
|
357
363
|
channelName: z.ZodOptional<z.ZodString>;
|
|
358
364
|
channelNameRedacted: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -371,10 +377,10 @@ export declare const conversationDetailReportSchema: z.ZodObject<{
|
|
|
371
377
|
redacted: z.ZodOptional<z.ZodBoolean>;
|
|
372
378
|
status: z.ZodEnum<{
|
|
373
379
|
error: "error";
|
|
374
|
-
completed: "completed";
|
|
375
|
-
success: "success";
|
|
376
380
|
aborted: "aborted";
|
|
381
|
+
success: "success";
|
|
377
382
|
running: "running";
|
|
383
|
+
completed: "completed";
|
|
378
384
|
}>;
|
|
379
385
|
subagents: z.ZodArray<z.ZodObject<{
|
|
380
386
|
type: z.ZodLiteral<"subagent">;
|
|
@@ -384,17 +390,17 @@ export declare const conversationDetailReportSchema: z.ZodObject<{
|
|
|
384
390
|
modelId: z.ZodOptional<z.ZodString>;
|
|
385
391
|
outcome: z.ZodOptional<z.ZodEnum<{
|
|
386
392
|
error: "error";
|
|
387
|
-
success: "success";
|
|
388
393
|
aborted: "aborted";
|
|
394
|
+
success: "success";
|
|
389
395
|
}>>;
|
|
390
396
|
parentToolCallId: z.ZodOptional<z.ZodString>;
|
|
391
397
|
reasoningLevel: z.ZodOptional<z.ZodString>;
|
|
392
398
|
status: z.ZodEnum<{
|
|
393
399
|
error: "error";
|
|
394
|
-
completed: "completed";
|
|
395
|
-
success: "success";
|
|
396
400
|
aborted: "aborted";
|
|
401
|
+
success: "success";
|
|
397
402
|
running: "running";
|
|
403
|
+
completed: "completed";
|
|
398
404
|
}>;
|
|
399
405
|
subagentKind: z.ZodString;
|
|
400
406
|
transcriptAvailable: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -409,17 +415,17 @@ export declare const conversationDetailReportSchema: z.ZodObject<{
|
|
|
409
415
|
modelId: z.ZodOptional<z.ZodString>;
|
|
410
416
|
outcome: z.ZodOptional<z.ZodEnum<{
|
|
411
417
|
error: "error";
|
|
412
|
-
success: "success";
|
|
413
418
|
aborted: "aborted";
|
|
419
|
+
success: "success";
|
|
414
420
|
}>>;
|
|
415
421
|
parentToolCallId: z.ZodOptional<z.ZodString>;
|
|
416
422
|
reasoningLevel: z.ZodOptional<z.ZodString>;
|
|
417
423
|
status: z.ZodEnum<{
|
|
418
424
|
error: "error";
|
|
419
|
-
completed: "completed";
|
|
420
|
-
success: "success";
|
|
421
425
|
aborted: "aborted";
|
|
426
|
+
success: "success";
|
|
422
427
|
running: "running";
|
|
428
|
+
completed: "completed";
|
|
423
429
|
}>;
|
|
424
430
|
subagentKind: z.ZodString;
|
|
425
431
|
transcriptAvailable: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -442,6 +448,10 @@ export declare const conversationDetailReportSchema: z.ZodObject<{
|
|
|
442
448
|
}, z.core.$strict>], "type">>>;
|
|
443
449
|
transcriptAvailable: z.ZodBoolean;
|
|
444
450
|
transcriptMetadata: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
451
|
+
outcome: z.ZodOptional<z.ZodEnum<{
|
|
452
|
+
error: "error";
|
|
453
|
+
aborted: "aborted";
|
|
454
|
+
}>>;
|
|
445
455
|
parts: z.ZodArray<z.ZodObject<{
|
|
446
456
|
bytes: z.ZodOptional<z.ZodNumber>;
|
|
447
457
|
chars: z.ZodOptional<z.ZodNumber>;
|
|
@@ -461,20 +471,20 @@ export declare const conversationDetailReportSchema: z.ZodObject<{
|
|
|
461
471
|
sourceType: z.ZodOptional<z.ZodString>;
|
|
462
472
|
text: z.ZodOptional<z.ZodString>;
|
|
463
473
|
type: z.ZodEnum<{
|
|
474
|
+
tool_call: "tool_call";
|
|
464
475
|
text: "text";
|
|
476
|
+
unknown: "unknown";
|
|
465
477
|
thinking: "thinking";
|
|
466
|
-
tool_call: "tool_call";
|
|
467
478
|
tool_result: "tool_result";
|
|
468
|
-
unknown: "unknown";
|
|
469
479
|
}>;
|
|
470
480
|
}, z.core.$strict>>;
|
|
471
481
|
role: z.ZodEnum<{
|
|
482
|
+
system: "system";
|
|
483
|
+
user: "user";
|
|
472
484
|
unknown: "unknown";
|
|
473
485
|
assistant: "assistant";
|
|
474
|
-
system: "system";
|
|
475
|
-
tool: "tool";
|
|
476
486
|
toolResult: "toolResult";
|
|
477
|
-
|
|
487
|
+
tool: "tool";
|
|
478
488
|
}>;
|
|
479
489
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
480
490
|
}, z.core.$strict>>>;
|
|
@@ -484,6 +494,10 @@ export declare const conversationDetailReportSchema: z.ZodObject<{
|
|
|
484
494
|
transcriptExpired: z.ZodOptional<z.ZodBoolean>;
|
|
485
495
|
transcriptExpiredAt: z.ZodOptional<z.ZodString>;
|
|
486
496
|
transcript: z.ZodArray<z.ZodObject<{
|
|
497
|
+
outcome: z.ZodOptional<z.ZodEnum<{
|
|
498
|
+
error: "error";
|
|
499
|
+
aborted: "aborted";
|
|
500
|
+
}>>;
|
|
487
501
|
parts: z.ZodArray<z.ZodObject<{
|
|
488
502
|
bytes: z.ZodOptional<z.ZodNumber>;
|
|
489
503
|
chars: z.ZodOptional<z.ZodNumber>;
|
|
@@ -503,20 +517,20 @@ export declare const conversationDetailReportSchema: z.ZodObject<{
|
|
|
503
517
|
sourceType: z.ZodOptional<z.ZodString>;
|
|
504
518
|
text: z.ZodOptional<z.ZodString>;
|
|
505
519
|
type: z.ZodEnum<{
|
|
520
|
+
tool_call: "tool_call";
|
|
506
521
|
text: "text";
|
|
522
|
+
unknown: "unknown";
|
|
507
523
|
thinking: "thinking";
|
|
508
|
-
tool_call: "tool_call";
|
|
509
524
|
tool_result: "tool_result";
|
|
510
|
-
unknown: "unknown";
|
|
511
525
|
}>;
|
|
512
526
|
}, z.core.$strict>>;
|
|
513
527
|
role: z.ZodEnum<{
|
|
528
|
+
system: "system";
|
|
529
|
+
user: "user";
|
|
514
530
|
unknown: "unknown";
|
|
515
531
|
assistant: "assistant";
|
|
516
|
-
system: "system";
|
|
517
|
-
tool: "tool";
|
|
518
532
|
toolResult: "toolResult";
|
|
519
|
-
|
|
533
|
+
tool: "tool";
|
|
520
534
|
}>;
|
|
521
535
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
522
536
|
}, z.core.$strict>>;
|
|
@@ -531,22 +545,26 @@ export declare const conversationSubagentTranscriptReportSchema: z.ZodObject<{
|
|
|
531
545
|
modelId: z.ZodOptional<z.ZodString>;
|
|
532
546
|
outcome: z.ZodOptional<z.ZodEnum<{
|
|
533
547
|
error: "error";
|
|
534
|
-
success: "success";
|
|
535
548
|
aborted: "aborted";
|
|
549
|
+
success: "success";
|
|
536
550
|
}>>;
|
|
537
551
|
parentToolCallId: z.ZodOptional<z.ZodString>;
|
|
538
552
|
reasoningLevel: z.ZodOptional<z.ZodString>;
|
|
539
553
|
status: z.ZodEnum<{
|
|
540
554
|
error: "error";
|
|
541
|
-
completed: "completed";
|
|
542
|
-
success: "success";
|
|
543
555
|
aborted: "aborted";
|
|
556
|
+
success: "success";
|
|
544
557
|
running: "running";
|
|
558
|
+
completed: "completed";
|
|
545
559
|
}>;
|
|
546
560
|
subagentConversationId: z.ZodOptional<z.ZodString>;
|
|
547
561
|
subagentKind: z.ZodString;
|
|
548
562
|
subagentSentryConversationUrl: z.ZodOptional<z.ZodString>;
|
|
549
563
|
transcript: z.ZodArray<z.ZodObject<{
|
|
564
|
+
outcome: z.ZodOptional<z.ZodEnum<{
|
|
565
|
+
error: "error";
|
|
566
|
+
aborted: "aborted";
|
|
567
|
+
}>>;
|
|
550
568
|
parts: z.ZodArray<z.ZodObject<{
|
|
551
569
|
bytes: z.ZodOptional<z.ZodNumber>;
|
|
552
570
|
chars: z.ZodOptional<z.ZodNumber>;
|
|
@@ -566,20 +584,20 @@ export declare const conversationSubagentTranscriptReportSchema: z.ZodObject<{
|
|
|
566
584
|
sourceType: z.ZodOptional<z.ZodString>;
|
|
567
585
|
text: z.ZodOptional<z.ZodString>;
|
|
568
586
|
type: z.ZodEnum<{
|
|
587
|
+
tool_call: "tool_call";
|
|
569
588
|
text: "text";
|
|
589
|
+
unknown: "unknown";
|
|
570
590
|
thinking: "thinking";
|
|
571
|
-
tool_call: "tool_call";
|
|
572
591
|
tool_result: "tool_result";
|
|
573
|
-
unknown: "unknown";
|
|
574
592
|
}>;
|
|
575
593
|
}, z.core.$strict>>;
|
|
576
594
|
role: z.ZodEnum<{
|
|
595
|
+
system: "system";
|
|
596
|
+
user: "user";
|
|
577
597
|
unknown: "unknown";
|
|
578
598
|
assistant: "assistant";
|
|
579
|
-
system: "system";
|
|
580
|
-
tool: "tool";
|
|
581
599
|
toolResult: "toolResult";
|
|
582
|
-
|
|
600
|
+
tool: "tool";
|
|
583
601
|
}>;
|
|
584
602
|
timestamp: z.ZodOptional<z.ZodNumber>;
|
|
585
603
|
}, z.core.$strict>>;
|
|
@@ -590,9 +608,9 @@ export declare const conversationSubagentTranscriptReportSchema: z.ZodObject<{
|
|
|
590
608
|
transcriptExpired: z.ZodOptional<z.ZodBoolean>;
|
|
591
609
|
transcriptExpiredAt: z.ZodOptional<z.ZodString>;
|
|
592
610
|
unavailableReason: z.ZodOptional<z.ZodEnum<{
|
|
611
|
+
not_found: "not_found";
|
|
593
612
|
missing_transcript_range: "missing_transcript_range";
|
|
594
613
|
missing_transcript_ref: "missing_transcript_ref";
|
|
595
|
-
not_found: "not_found";
|
|
596
614
|
}>>;
|
|
597
615
|
}, z.core.$strict>;
|
|
598
616
|
export declare const conversationFeedSchema: z.ZodObject<{
|
|
@@ -616,18 +634,18 @@ export declare const conversationFeedSchema: z.ZodObject<{
|
|
|
616
634
|
}, z.core.$strict>>;
|
|
617
635
|
conversationId: z.ZodString;
|
|
618
636
|
status: z.ZodEnum<{
|
|
619
|
-
active: "active";
|
|
620
|
-
failed: "failed";
|
|
621
637
|
completed: "completed";
|
|
638
|
+
failed: "failed";
|
|
639
|
+
active: "active";
|
|
622
640
|
}>;
|
|
623
641
|
startedAt: z.ZodString;
|
|
624
642
|
lastSeenAt: z.ZodString;
|
|
625
643
|
lastProgressAt: z.ZodString;
|
|
626
644
|
surface: z.ZodEnum<{
|
|
645
|
+
slack: "slack";
|
|
627
646
|
api: "api";
|
|
628
647
|
internal: "internal";
|
|
629
648
|
scheduler: "scheduler";
|
|
630
|
-
slack: "slack";
|
|
631
649
|
}>;
|
|
632
650
|
actorIdentity: z.ZodOptional<z.ZodObject<{
|
|
633
651
|
email: z.ZodOptional<z.ZodString>;
|
|
@@ -635,6 +653,7 @@ export declare const conversationFeedSchema: z.ZodObject<{
|
|
|
635
653
|
slackUserId: z.ZodOptional<z.ZodString>;
|
|
636
654
|
slackUserName: z.ZodOptional<z.ZodString>;
|
|
637
655
|
}, z.core.$strict>>;
|
|
656
|
+
archivedAt: z.ZodOptional<z.ZodString>;
|
|
638
657
|
channel: z.ZodOptional<z.ZodString>;
|
|
639
658
|
channelName: z.ZodOptional<z.ZodString>;
|
|
640
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>;
|