@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.
- package/dist/{agent-hooks-NHIXBJW3.js → agent-hooks-EOFSY2PD.js} +3 -3
- 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 +72 -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 +3 -3
- 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 +107 -101
- 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/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-AIRE7Q2W.js +362 -0
- package/dist/{chunk-HOBDQQJY.js → chunk-BCULHGZK.js} +23 -3
- package/dist/{chunk-DEQZ23O3.js → chunk-O7ILGCMJ.js} +77 -0
- package/dist/{chunk-C4BT2P2K.js → chunk-QDKRE3LS.js} +339 -8
- package/dist/{chunk-GY5ZRYPH.js → chunk-QVTVCJR4.js} +5 -5
- package/dist/{chunk-JXQWOCBE.js → chunk-RMZ65YAA.js} +2 -2
- package/dist/{chunk-E2VS47AZ.js → chunk-RYDF4GOX.js} +2 -2
- package/dist/{chunk-OE453VRG.js → chunk-TMWUGGSA.js} +26 -28
- package/dist/{chunk-JPXLAJUU.js → chunk-VDHMFCDY.js} +9 -10
- package/dist/cli/chat.js +10 -11
- package/dist/cli/plugins.js +4 -4
- package/dist/cli/upgrade.js +3 -4
- package/dist/db/schema/conversations.d.ts +17 -0
- package/dist/db/schema.d.ts +17 -0
- package/dist/{db-I343BSOM.js → db-PDMC67T3.js} +1 -1
- package/dist/{legacy-import-M7VBOQTK.js → legacy-import-G333RHJZ.js} +2 -2
- package/dist/reporting-schema.d.ts +4 -4
- package/dist/{runner-IEE5G4NV.js → runner-6A7MQRUE.js} +7 -8
- 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-6FPTHPXF.js +0 -77
- package/dist/chunk-6LBNXC4F.js +0 -66
- package/dist/chunk-7LLRS2OK.js +0 -215
- package/dist/chunk-B43K4C5K.js +0 -102
- package/dist/chunk-BQCPAIAB.js +0 -319
- package/dist/chunk-FW7DVHTL.js +0 -673
- package/dist/chunk-GCGRQJR5.js +0 -84
- package/dist/chunk-HRDWLE7Q.js +0 -273
- package/dist/chunk-LVUKF5CE.js +0 -63
- package/dist/chunk-QNVHH5PU.js +0 -20
- package/dist/chunk-QOZOJNSE.js +0 -96
- package/dist/chunk-VKFOVMZL.js +0 -331
- package/dist/detail-ENVV4HIY.js +0 -68
- package/dist/detail-UIOKVIET.js +0 -29
- package/dist/list-WR5U6JVM.js +0 -30
- package/dist/list-XZ4HKQ4R.js +0 -121
- package/dist/list-ZOUSMSEH.js +0 -30
- package/dist/plugin-conversations-DTUP4RH6.js +0 -37
- package/dist/profile-UO2N3XXG.js +0 -212
- package/dist/reporting/plugin-conversations.d.ts +0 -3
- package/dist/stats-NZIET4LT.js +0 -174
- package/dist/subagent-DY6XKTJ5.js +0 -49
package/dist/app.js
CHANGED
|
@@ -5,15 +5,7 @@ import {
|
|
|
5
5
|
processPluginTask,
|
|
6
6
|
requireTurnFailureEventId,
|
|
7
7
|
scheduleSessionCompletedPluginTasks
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import {
|
|
10
|
-
buildSentryConversationUrl
|
|
11
|
-
} from "./chunk-LVUKF5CE.js";
|
|
12
|
-
import {
|
|
13
|
-
conversationVisibilityFromSlackChannelType,
|
|
14
|
-
resolveSlackChannelTypeFromMessage,
|
|
15
|
-
resolveSlackConversationContext
|
|
16
|
-
} from "./chunk-DEQZ23O3.js";
|
|
8
|
+
} from "./chunk-QVTVCJR4.js";
|
|
17
9
|
import {
|
|
18
10
|
CONVERSATION_WORK_CHECK_IN_INTERVAL_MS,
|
|
19
11
|
CONVERSATION_WORK_STALE_ENQUEUE_MS,
|
|
@@ -39,8 +31,12 @@ import {
|
|
|
39
31
|
startConversationWork
|
|
40
32
|
} from "./chunk-U26ZWZCN.js";
|
|
41
33
|
import {
|
|
42
|
-
GET
|
|
43
|
-
|
|
34
|
+
GET,
|
|
35
|
+
buildSentryConversationUrl,
|
|
36
|
+
conversationVisibilityFromSlackChannelType,
|
|
37
|
+
resolveSlackChannelTypeFromMessage,
|
|
38
|
+
resolveSlackConversationContext
|
|
39
|
+
} from "./chunk-O7ILGCMJ.js";
|
|
44
40
|
import "./chunk-CEA3A3UA.js";
|
|
45
41
|
import {
|
|
46
42
|
getVercelConversationWorkQueue,
|
|
@@ -106,7 +102,7 @@ import {
|
|
|
106
102
|
splitSlackReplyText,
|
|
107
103
|
startOAuthFlow,
|
|
108
104
|
truncateStatusText
|
|
109
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-TMWUGGSA.js";
|
|
110
106
|
import {
|
|
111
107
|
CooperativeTurnYieldError,
|
|
112
108
|
TurnInputCommitLostError,
|
|
@@ -134,24 +130,23 @@ import {
|
|
|
134
130
|
persistWithRetry,
|
|
135
131
|
persistYieldSessionRecord,
|
|
136
132
|
startActiveTurn
|
|
137
|
-
} from "./chunk-
|
|
133
|
+
} from "./chunk-RMZ65YAA.js";
|
|
138
134
|
import {
|
|
139
135
|
JUNIOR_THREAD_STATE_TTL_MS,
|
|
140
136
|
coerceThreadConversationState
|
|
141
137
|
} from "./chunk-XIMUQ4IU.js";
|
|
138
|
+
import "./chunk-7G4J3CR7.js";
|
|
142
139
|
import {
|
|
143
140
|
abandonAgentTurnSessionRecord,
|
|
141
|
+
commitMessages,
|
|
144
142
|
failAgentTurnSessionRecord,
|
|
145
143
|
getAgentTurnSessionRecord,
|
|
146
144
|
listAgentTurnSessionSummariesForConversation,
|
|
147
|
-
recordAgentTurnSessionSummary
|
|
148
|
-
} from "./chunk-C4BT2P2K.js";
|
|
149
|
-
import {
|
|
150
|
-
commitMessages,
|
|
151
145
|
loadConversationProjection,
|
|
152
146
|
loadProjection,
|
|
147
|
+
recordAgentTurnSessionSummary,
|
|
153
148
|
recordAuthorizationCompleted
|
|
154
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-QDKRE3LS.js";
|
|
155
150
|
import {
|
|
156
151
|
buildConversationContext,
|
|
157
152
|
createConversationMemoryService,
|
|
@@ -166,8 +161,7 @@ import {
|
|
|
166
161
|
persistConversationMessages,
|
|
167
162
|
updateConversationStats,
|
|
168
163
|
upsertConversationMessage
|
|
169
|
-
} from "./chunk-
|
|
170
|
-
import "./chunk-7G4J3CR7.js";
|
|
164
|
+
} from "./chunk-RYDF4GOX.js";
|
|
171
165
|
import "./chunk-PDO5BLNM.js";
|
|
172
166
|
import "./chunk-UIE3R5XU.js";
|
|
173
167
|
import {
|
|
@@ -183,7 +177,12 @@ import {
|
|
|
183
177
|
validatePlugins,
|
|
184
178
|
verifyScheduledTaskCredentialSubject,
|
|
185
179
|
verifySlackDirectCredentialSubject
|
|
186
|
-
} from "./chunk-
|
|
180
|
+
} from "./chunk-VDHMFCDY.js";
|
|
181
|
+
import {
|
|
182
|
+
createPluginLogger,
|
|
183
|
+
createPluginState
|
|
184
|
+
} from "./chunk-4PDVOHXP.js";
|
|
185
|
+
import "./chunk-G3E7SCME.js";
|
|
187
186
|
import {
|
|
188
187
|
SlackActionError,
|
|
189
188
|
downloadPrivateSlackFile,
|
|
@@ -195,10 +194,6 @@ import {
|
|
|
195
194
|
runWithSlackInstallationToken,
|
|
196
195
|
runWithWorkspaceTeamId
|
|
197
196
|
} from "./chunk-CCTCIISK.js";
|
|
198
|
-
import {
|
|
199
|
-
createPluginLogger,
|
|
200
|
-
createPluginState
|
|
201
|
-
} from "./chunk-4PDVOHXP.js";
|
|
202
197
|
import {
|
|
203
198
|
contextProvenance,
|
|
204
199
|
getConversationStore,
|
|
@@ -208,8 +203,7 @@ import {
|
|
|
208
203
|
juniorAgentSteps,
|
|
209
204
|
juniorConversationMessages,
|
|
210
205
|
juniorConversations
|
|
211
|
-
} from "./chunk-
|
|
212
|
-
import "./chunk-G3E7SCME.js";
|
|
206
|
+
} from "./chunk-BCULHGZK.js";
|
|
213
207
|
import {
|
|
214
208
|
sleep
|
|
215
209
|
} from "./chunk-4ZNGQH7C.js";
|
|
@@ -1208,7 +1202,7 @@ async function POST(request, waitUntil, options) {
|
|
|
1208
1202
|
import { createHmac as createHmac2, timingSafeEqual as timingSafeEqual2 } from "crypto";
|
|
1209
1203
|
|
|
1210
1204
|
// src/chat/resource-events/ingest.ts
|
|
1211
|
-
import { z as
|
|
1205
|
+
import { z as z3 } from "zod";
|
|
1212
1206
|
|
|
1213
1207
|
// src/chat/task-execution/store.ts
|
|
1214
1208
|
function metadataStore(options) {
|
|
@@ -1609,6 +1603,17 @@ async function ensureSlackMessageActorIdentity(message, teamId, lookupSlackUser2
|
|
|
1609
1603
|
}
|
|
1610
1604
|
|
|
1611
1605
|
// src/chat/slack/user.ts
|
|
1606
|
+
import { z as z2 } from "zod";
|
|
1607
|
+
var slackUserInfoSchema = z2.object({
|
|
1608
|
+
ok: z2.literal(true),
|
|
1609
|
+
user: z2.object({
|
|
1610
|
+
name: z2.string().nullish(),
|
|
1611
|
+
profile: z2.object({
|
|
1612
|
+
email: z2.string().nullish(),
|
|
1613
|
+
real_name: z2.string().nullish()
|
|
1614
|
+
}).optional()
|
|
1615
|
+
})
|
|
1616
|
+
});
|
|
1612
1617
|
var USER_CACHE_TTL_MS = 5 * 60 * 1e3;
|
|
1613
1618
|
var userCache = /* @__PURE__ */ new Map();
|
|
1614
1619
|
function userCacheKey(teamId, userId) {
|
|
@@ -1663,12 +1668,13 @@ async function lookupSlackUser(teamId, userId) {
|
|
|
1663
1668
|
);
|
|
1664
1669
|
return null;
|
|
1665
1670
|
}
|
|
1666
|
-
const
|
|
1667
|
-
if (!
|
|
1671
|
+
const parsed = slackUserInfoSchema.safeParse(await response.json());
|
|
1672
|
+
if (!parsed.success) {
|
|
1668
1673
|
return null;
|
|
1669
1674
|
}
|
|
1675
|
+
const payload = parsed.data;
|
|
1670
1676
|
const userName = payload.user.name?.trim() || void 0;
|
|
1671
|
-
const fullName = payload.user.profile?.
|
|
1677
|
+
const fullName = payload.user.profile?.real_name?.trim() || void 0;
|
|
1672
1678
|
const result = {
|
|
1673
1679
|
userName,
|
|
1674
1680
|
fullName,
|
|
@@ -2132,15 +2138,15 @@ async function enqueueResourceEventNotification(args) {
|
|
|
2132
2138
|
}
|
|
2133
2139
|
|
|
2134
2140
|
// src/chat/resource-events/ingest.ts
|
|
2135
|
-
var ingestResourceEventInputSchema =
|
|
2136
|
-
eventKey:
|
|
2137
|
-
eventType:
|
|
2138
|
-
occurredAtMs:
|
|
2139
|
-
provider:
|
|
2140
|
-
resourceRef:
|
|
2141
|
-
terminal:
|
|
2142
|
-
trustedSummary:
|
|
2143
|
-
untrustedText:
|
|
2141
|
+
var ingestResourceEventInputSchema = z3.object({
|
|
2142
|
+
eventKey: z3.string().min(1),
|
|
2143
|
+
eventType: z3.string().min(1),
|
|
2144
|
+
occurredAtMs: z3.number().finite(),
|
|
2145
|
+
provider: z3.string().min(1),
|
|
2146
|
+
resourceRef: z3.string().min(1),
|
|
2147
|
+
terminal: z3.boolean().optional(),
|
|
2148
|
+
trustedSummary: z3.string().min(1),
|
|
2149
|
+
untrustedText: z3.string().optional()
|
|
2144
2150
|
}).strict();
|
|
2145
2151
|
async function ingestResourceEvent(input, options) {
|
|
2146
2152
|
const event = ingestResourceEventInputSchema.parse(input);
|
|
@@ -2193,7 +2199,7 @@ async function ingestResourceEvent(input, options) {
|
|
|
2193
2199
|
}
|
|
2194
2200
|
|
|
2195
2201
|
// src/handlers/github-webhook/check-suite.ts
|
|
2196
|
-
import { z as
|
|
2202
|
+
import { z as z4 } from "zod";
|
|
2197
2203
|
|
|
2198
2204
|
// src/handlers/github-webhook/resource.ts
|
|
2199
2205
|
function resourceRef(repositoryFullName, pullRequestNumber) {
|
|
@@ -2210,19 +2216,19 @@ function gitHubEventKey(deliveryId, eventType) {
|
|
|
2210
2216
|
}
|
|
2211
2217
|
|
|
2212
2218
|
// src/handlers/github-webhook/check-suite.ts
|
|
2213
|
-
var checkSuiteWebhookSchema =
|
|
2214
|
-
action:
|
|
2215
|
-
check_suite:
|
|
2216
|
-
conclusion:
|
|
2217
|
-
head_sha:
|
|
2218
|
-
pull_requests:
|
|
2219
|
-
|
|
2220
|
-
number:
|
|
2219
|
+
var checkSuiteWebhookSchema = z4.object({
|
|
2220
|
+
action: z4.string(),
|
|
2221
|
+
check_suite: z4.object({
|
|
2222
|
+
conclusion: z4.string().optional().nullable(),
|
|
2223
|
+
head_sha: z4.string().optional(),
|
|
2224
|
+
pull_requests: z4.array(
|
|
2225
|
+
z4.object({
|
|
2226
|
+
number: z4.number()
|
|
2221
2227
|
})
|
|
2222
2228
|
)
|
|
2223
2229
|
}),
|
|
2224
|
-
repository:
|
|
2225
|
-
full_name:
|
|
2230
|
+
repository: z4.object({
|
|
2231
|
+
full_name: z4.string().min(1)
|
|
2226
2232
|
})
|
|
2227
2233
|
});
|
|
2228
2234
|
function normalizeGitHubCheckSuiteEvents(deliveryId, body) {
|
|
@@ -2256,23 +2262,23 @@ function normalizeGitHubCheckSuiteEvents(deliveryId, body) {
|
|
|
2256
2262
|
}
|
|
2257
2263
|
|
|
2258
2264
|
// src/handlers/github-webhook/issue-comment.ts
|
|
2259
|
-
import { z as
|
|
2260
|
-
var issueCommentWebhookSchema =
|
|
2261
|
-
action:
|
|
2262
|
-
comment:
|
|
2263
|
-
body:
|
|
2264
|
-
user:
|
|
2265
|
-
login:
|
|
2265
|
+
import { z as z5 } from "zod";
|
|
2266
|
+
var issueCommentWebhookSchema = z5.object({
|
|
2267
|
+
action: z5.string(),
|
|
2268
|
+
comment: z5.object({
|
|
2269
|
+
body: z5.string(),
|
|
2270
|
+
user: z5.object({
|
|
2271
|
+
login: z5.string().optional()
|
|
2266
2272
|
}).strip().optional()
|
|
2267
2273
|
}).strip(),
|
|
2268
|
-
issue:
|
|
2269
|
-
number:
|
|
2270
|
-
pull_request:
|
|
2271
|
-
url:
|
|
2274
|
+
issue: z5.object({
|
|
2275
|
+
number: z5.number(),
|
|
2276
|
+
pull_request: z5.object({
|
|
2277
|
+
url: z5.string().min(1)
|
|
2272
2278
|
}).strip().optional()
|
|
2273
2279
|
}).strip(),
|
|
2274
|
-
repository:
|
|
2275
|
-
full_name:
|
|
2280
|
+
repository: z5.object({
|
|
2281
|
+
full_name: z5.string().min(1)
|
|
2276
2282
|
}).strip()
|
|
2277
2283
|
}).strip();
|
|
2278
2284
|
function normalizeGitHubIssueCommentEvent(deliveryId, body) {
|
|
@@ -2298,15 +2304,15 @@ function normalizeGitHubIssueCommentEvent(deliveryId, body) {
|
|
|
2298
2304
|
}
|
|
2299
2305
|
|
|
2300
2306
|
// src/handlers/github-webhook/pull-request.ts
|
|
2301
|
-
import { z as
|
|
2302
|
-
var pullRequestWebhookSchema =
|
|
2303
|
-
action:
|
|
2304
|
-
pull_request:
|
|
2305
|
-
merged:
|
|
2306
|
-
number:
|
|
2307
|
+
import { z as z6 } from "zod";
|
|
2308
|
+
var pullRequestWebhookSchema = z6.object({
|
|
2309
|
+
action: z6.string(),
|
|
2310
|
+
pull_request: z6.object({
|
|
2311
|
+
merged: z6.boolean().optional(),
|
|
2312
|
+
number: z6.number()
|
|
2307
2313
|
}),
|
|
2308
|
-
repository:
|
|
2309
|
-
full_name:
|
|
2314
|
+
repository: z6.object({
|
|
2315
|
+
full_name: z6.string().min(1)
|
|
2310
2316
|
})
|
|
2311
2317
|
});
|
|
2312
2318
|
function normalizeGitHubPullRequestEvent(deliveryId, body) {
|
|
@@ -2331,20 +2337,20 @@ function normalizeGitHubPullRequestEvent(deliveryId, body) {
|
|
|
2331
2337
|
}
|
|
2332
2338
|
|
|
2333
2339
|
// src/handlers/github-webhook/pull-request-review-comment.ts
|
|
2334
|
-
import { z as
|
|
2335
|
-
var pullRequestReviewCommentWebhookSchema =
|
|
2336
|
-
action:
|
|
2337
|
-
comment:
|
|
2338
|
-
body:
|
|
2339
|
-
user:
|
|
2340
|
-
login:
|
|
2340
|
+
import { z as z7 } from "zod";
|
|
2341
|
+
var pullRequestReviewCommentWebhookSchema = z7.object({
|
|
2342
|
+
action: z7.string(),
|
|
2343
|
+
comment: z7.object({
|
|
2344
|
+
body: z7.string(),
|
|
2345
|
+
user: z7.object({
|
|
2346
|
+
login: z7.string().optional()
|
|
2341
2347
|
}).strip().optional()
|
|
2342
2348
|
}).strip(),
|
|
2343
|
-
pull_request:
|
|
2344
|
-
number:
|
|
2349
|
+
pull_request: z7.object({
|
|
2350
|
+
number: z7.number()
|
|
2345
2351
|
}).strip(),
|
|
2346
|
-
repository:
|
|
2347
|
-
full_name:
|
|
2352
|
+
repository: z7.object({
|
|
2353
|
+
full_name: z7.string().min(1)
|
|
2348
2354
|
}).strip()
|
|
2349
2355
|
}).strip();
|
|
2350
2356
|
function normalizeGitHubPullRequestReviewCommentEvent(deliveryId, body) {
|
|
@@ -2370,20 +2376,20 @@ function normalizeGitHubPullRequestReviewCommentEvent(deliveryId, body) {
|
|
|
2370
2376
|
}
|
|
2371
2377
|
|
|
2372
2378
|
// src/handlers/github-webhook/pull-request-review.ts
|
|
2373
|
-
import { z as
|
|
2374
|
-
var pullRequestReviewWebhookSchema =
|
|
2375
|
-
action:
|
|
2376
|
-
pull_request:
|
|
2377
|
-
number:
|
|
2379
|
+
import { z as z8 } from "zod";
|
|
2380
|
+
var pullRequestReviewWebhookSchema = z8.object({
|
|
2381
|
+
action: z8.string(),
|
|
2382
|
+
pull_request: z8.object({
|
|
2383
|
+
number: z8.number()
|
|
2378
2384
|
}),
|
|
2379
|
-
repository:
|
|
2380
|
-
full_name:
|
|
2385
|
+
repository: z8.object({
|
|
2386
|
+
full_name: z8.string().min(1)
|
|
2381
2387
|
}),
|
|
2382
|
-
review:
|
|
2383
|
-
body:
|
|
2384
|
-
state:
|
|
2385
|
-
user:
|
|
2386
|
-
login:
|
|
2388
|
+
review: z8.object({
|
|
2389
|
+
body: z8.string().optional().nullable(),
|
|
2390
|
+
state: z8.string(),
|
|
2391
|
+
user: z8.object({
|
|
2392
|
+
login: z8.string().optional()
|
|
2387
2393
|
}).optional()
|
|
2388
2394
|
})
|
|
2389
2395
|
});
|
|
@@ -7463,14 +7469,14 @@ function registerVercelPluginTaskDevConsumer() {
|
|
|
7463
7469
|
}
|
|
7464
7470
|
|
|
7465
7471
|
// src/chat/services/subscribed-decision.ts
|
|
7466
|
-
import { z as
|
|
7467
|
-
var replyDecisionSchema =
|
|
7468
|
-
should_reply:
|
|
7469
|
-
should_unsubscribe:
|
|
7472
|
+
import { z as z9 } from "zod";
|
|
7473
|
+
var replyDecisionSchema = z9.object({
|
|
7474
|
+
should_reply: z9.boolean().describe("Whether Junior should respond to this thread message."),
|
|
7475
|
+
should_unsubscribe: z9.boolean().describe(
|
|
7470
7476
|
"Whether Junior should unsubscribe from this thread because the user clearly asked it to stop participating."
|
|
7471
7477
|
),
|
|
7472
|
-
confidence:
|
|
7473
|
-
reason:
|
|
7478
|
+
confidence: z9.number().min(0).max(1).describe("Classifier confidence from 0 to 1."),
|
|
7479
|
+
reason: z9.string().optional().describe("Short reason for the decision.")
|
|
7474
7480
|
}).strict();
|
|
7475
7481
|
var ROUTER_CONFIDENCE_THRESHOLD = 0.8;
|
|
7476
7482
|
var ROUTER_CLASSIFIER_MAX_TOKENS = 240;
|
|
@@ -13,7 +13,7 @@ import { z } from "zod";
|
|
|
13
13
|
declare const piMessageStepSchema: z.ZodObject<{
|
|
14
14
|
message: z.ZodPipe<z.ZodObject<{
|
|
15
15
|
role: z.ZodString;
|
|
16
|
-
}, z.core.$loose>, z.ZodTransform<import("@earendil-works/pi-ai").AssistantMessage | import("@earendil-works/pi-ai").UserMessage | import("@earendil-works/pi-ai").ToolResultMessage<any> | import("@earendil-works/pi-agent-core").
|
|
16
|
+
}, z.core.$loose>, z.ZodTransform<import("@earendil-works/pi-ai").AssistantMessage | import("@earendil-works/pi-ai").UserMessage | import("@earendil-works/pi-ai").ToolResultMessage<any> | import("@earendil-works/pi-agent-core").BashExecutionMessage | import("@earendil-works/pi-agent-core").CustomMessage<unknown> | import("@earendil-works/pi-agent-core").BranchSummaryMessage | import("@earendil-works/pi-agent-core").CompactionSummaryMessage, {
|
|
17
17
|
[x: string]: unknown;
|
|
18
18
|
role: string;
|
|
19
19
|
}>>;
|
|
@@ -47,7 +47,7 @@ export declare const contextEpochStartSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
47
47
|
messages: z.ZodArray<z.ZodObject<{
|
|
48
48
|
message: z.ZodPipe<z.ZodObject<{
|
|
49
49
|
role: z.ZodString;
|
|
50
|
-
}, z.core.$loose>, z.ZodTransform<import("@earendil-works/pi-ai").AssistantMessage | import("@earendil-works/pi-ai").UserMessage | import("@earendil-works/pi-ai").ToolResultMessage<any> | import("@earendil-works/pi-agent-core").
|
|
50
|
+
}, z.core.$loose>, z.ZodTransform<import("@earendil-works/pi-ai").AssistantMessage | import("@earendil-works/pi-ai").UserMessage | import("@earendil-works/pi-ai").ToolResultMessage<any> | import("@earendil-works/pi-agent-core").BashExecutionMessage | import("@earendil-works/pi-agent-core").CustomMessage<unknown> | import("@earendil-works/pi-agent-core").BranchSummaryMessage | import("@earendil-works/pi-agent-core").CompactionSummaryMessage, {
|
|
51
51
|
[x: string]: unknown;
|
|
52
52
|
role: string;
|
|
53
53
|
}>>;
|
|
@@ -80,7 +80,7 @@ export declare const contextEpochStartSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
80
80
|
messages: z.ZodArray<z.ZodObject<{
|
|
81
81
|
message: z.ZodPipe<z.ZodObject<{
|
|
82
82
|
role: z.ZodString;
|
|
83
|
-
}, z.core.$loose>, z.ZodTransform<import("@earendil-works/pi-ai").AssistantMessage | import("@earendil-works/pi-ai").UserMessage | import("@earendil-works/pi-ai").ToolResultMessage<any> | import("@earendil-works/pi-agent-core").
|
|
83
|
+
}, z.core.$loose>, z.ZodTransform<import("@earendil-works/pi-ai").AssistantMessage | import("@earendil-works/pi-ai").UserMessage | import("@earendil-works/pi-ai").ToolResultMessage<any> | import("@earendil-works/pi-agent-core").BashExecutionMessage | import("@earendil-works/pi-agent-core").CustomMessage<unknown> | import("@earendil-works/pi-agent-core").BranchSummaryMessage | import("@earendil-works/pi-agent-core").CompactionSummaryMessage, {
|
|
84
84
|
[x: string]: unknown;
|
|
85
85
|
role: string;
|
|
86
86
|
}>>;
|
|
@@ -113,7 +113,7 @@ export declare const contextEpochStartSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
113
113
|
messages: z.ZodArray<z.ZodObject<{
|
|
114
114
|
message: z.ZodPipe<z.ZodObject<{
|
|
115
115
|
role: z.ZodString;
|
|
116
|
-
}, z.core.$loose>, z.ZodTransform<import("@earendil-works/pi-ai").AssistantMessage | import("@earendil-works/pi-ai").UserMessage | import("@earendil-works/pi-ai").ToolResultMessage<any> | import("@earendil-works/pi-agent-core").
|
|
116
|
+
}, z.core.$loose>, z.ZodTransform<import("@earendil-works/pi-ai").AssistantMessage | import("@earendil-works/pi-ai").UserMessage | import("@earendil-works/pi-ai").ToolResultMessage<any> | import("@earendil-works/pi-agent-core").BashExecutionMessage | import("@earendil-works/pi-agent-core").CustomMessage<unknown> | import("@earendil-works/pi-agent-core").BranchSummaryMessage | import("@earendil-works/pi-agent-core").CompactionSummaryMessage, {
|
|
117
117
|
[x: string]: unknown;
|
|
118
118
|
role: string;
|
|
119
119
|
}>>;
|
|
@@ -148,7 +148,7 @@ export declare const agentStepEntrySchema: z.ZodUnion<readonly [z.ZodUnion<reado
|
|
|
148
148
|
schemaVersion: z.ZodOptional<z.ZodNumber>;
|
|
149
149
|
message: z.ZodPipe<z.ZodObject<{
|
|
150
150
|
role: z.ZodString;
|
|
151
|
-
}, z.core.$loose>, z.ZodTransform<import("@earendil-works/pi-ai").AssistantMessage | import("@earendil-works/pi-ai").UserMessage | import("@earendil-works/pi-ai").ToolResultMessage<any> | import("@earendil-works/pi-agent-core").
|
|
151
|
+
}, z.core.$loose>, z.ZodTransform<import("@earendil-works/pi-ai").AssistantMessage | import("@earendil-works/pi-ai").UserMessage | import("@earendil-works/pi-ai").ToolResultMessage<any> | import("@earendil-works/pi-agent-core").BashExecutionMessage | import("@earendil-works/pi-agent-core").CustomMessage<unknown> | import("@earendil-works/pi-agent-core").BranchSummaryMessage | import("@earendil-works/pi-agent-core").CompactionSummaryMessage, {
|
|
152
152
|
[x: string]: unknown;
|
|
153
153
|
role: string;
|
|
154
154
|
}>>;
|
|
@@ -252,7 +252,7 @@ export declare const newAgentStepSchema: z.ZodObject<{
|
|
|
252
252
|
schemaVersion: z.ZodOptional<z.ZodNumber>;
|
|
253
253
|
message: z.ZodPipe<z.ZodObject<{
|
|
254
254
|
role: z.ZodString;
|
|
255
|
-
}, z.core.$loose>, z.ZodTransform<import("@earendil-works/pi-ai").AssistantMessage | import("@earendil-works/pi-ai").UserMessage | import("@earendil-works/pi-ai").ToolResultMessage<any> | import("@earendil-works/pi-agent-core").
|
|
255
|
+
}, z.core.$loose>, z.ZodTransform<import("@earendil-works/pi-ai").AssistantMessage | import("@earendil-works/pi-ai").UserMessage | import("@earendil-works/pi-ai").ToolResultMessage<any> | import("@earendil-works/pi-agent-core").BashExecutionMessage | import("@earendil-works/pi-agent-core").CustomMessage<unknown> | import("@earendil-works/pi-agent-core").BranchSummaryMessage | import("@earendil-works/pi-agent-core").CompactionSummaryMessage, {
|
|
256
256
|
[x: string]: unknown;
|
|
257
257
|
role: string;
|
|
258
258
|
}>>;
|
|
@@ -2,7 +2,7 @@ import { z } from "zod";
|
|
|
2
2
|
/** Permissive schema for durable Pi SDK messages whose content shape may evolve. */
|
|
3
3
|
export declare const piMessageSchema: z.ZodPipe<z.ZodObject<{
|
|
4
4
|
role: z.ZodString;
|
|
5
|
-
}, z.core.$loose>, z.ZodTransform<import("@earendil-works/pi-ai").AssistantMessage | import("@earendil-works/pi-ai").UserMessage | import("@earendil-works/pi-ai").ToolResultMessage<any> | import("@earendil-works/pi-agent-core").
|
|
5
|
+
}, z.core.$loose>, z.ZodTransform<import("@earendil-works/pi-ai").AssistantMessage | import("@earendil-works/pi-ai").UserMessage | import("@earendil-works/pi-ai").ToolResultMessage<any> | import("@earendil-works/pi-agent-core").BashExecutionMessage | import("@earendil-works/pi-agent-core").CustomMessage<unknown> | import("@earendil-works/pi-agent-core").BranchSummaryMessage | import("@earendil-works/pi-agent-core").CompactionSummaryMessage, {
|
|
6
6
|
[x: string]: unknown;
|
|
7
7
|
role: string;
|
|
8
8
|
}>>;
|
|
@@ -12,7 +12,7 @@ export type PiMessage = z.output<typeof piMessageSchema>;
|
|
|
12
12
|
export declare const piContentMessageSchema: z.ZodPipe<z.ZodObject<{
|
|
13
13
|
content: z.ZodArray<z.ZodUnknown>;
|
|
14
14
|
role: z.ZodString;
|
|
15
|
-
}, z.core.$loose>, z.ZodTransform<import("@earendil-works/pi-ai").AssistantMessage | import("@earendil-works/pi-ai").UserMessage | import("@earendil-works/pi-ai").ToolResultMessage<any> | import("@earendil-works/pi-agent-core").
|
|
15
|
+
}, z.core.$loose>, z.ZodTransform<import("@earendil-works/pi-ai").AssistantMessage | import("@earendil-works/pi-ai").UserMessage | import("@earendil-works/pi-ai").ToolResultMessage<any> | import("@earendil-works/pi-agent-core").BashExecutionMessage | import("@earendil-works/pi-agent-core").CustomMessage<unknown> | import("@earendil-works/pi-agent-core").BranchSummaryMessage | import("@earendil-works/pi-agent-core").CompactionSummaryMessage, {
|
|
16
16
|
[x: string]: unknown;
|
|
17
17
|
content: unknown[];
|
|
18
18
|
role: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PluginRoute, PluginOperationalReport, PluginRouteApp, SlackConversationLink, PluginRegistration } from "@sentry/junior-plugin-api";
|
|
2
2
|
import type { PluginPromptContributionContext } from "@/chat/plugins/prompt";
|
|
3
3
|
import type { AnyToolDefinition } from "@/chat/tools/definition";
|
|
4
4
|
import type { ToolRuntimeContext } from "@/chat/tools/types";
|
|
@@ -48,7 +48,7 @@ export declare function getPluginApiRoutes(): PluginApiRouteRegistration[];
|
|
|
48
48
|
/** Resolve the first plugin conversation URL for finalized Slack footers. */
|
|
49
49
|
export declare function getPluginSlackConversationLink(conversationId: string): SlackConversationLink | undefined;
|
|
50
50
|
/** Collect read-only operational summaries exposed by plugins. */
|
|
51
|
-
export declare function getPluginOperationalReports(nowMs: number
|
|
51
|
+
export declare function getPluginOperationalReports(nowMs: number): Promise<PluginOperationalReport[]>;
|
|
52
52
|
/** Create one runner over runtime hook plugins registered by the app. */
|
|
53
53
|
export declare function createPluginHookRunner(input?: {
|
|
54
54
|
actor?: Actor;
|
|
@@ -21,9 +21,9 @@ declare const subscriptionSchema: z.ZodObject<{
|
|
|
21
21
|
resourceRef: z.ZodString;
|
|
22
22
|
resourceType: z.ZodString;
|
|
23
23
|
status: z.ZodEnum<{
|
|
24
|
-
active: "active";
|
|
25
|
-
completed: "completed";
|
|
26
24
|
cancelled: "cancelled";
|
|
25
|
+
completed: "completed";
|
|
26
|
+
active: "active";
|
|
27
27
|
}>;
|
|
28
28
|
updatedAtMs: z.ZodNumber;
|
|
29
29
|
}, z.core.$strict>;
|
|
@@ -22,7 +22,7 @@ export declare function createSlackConversationSearchTool(scope: ConversationSea
|
|
|
22
22
|
conversation_id: string;
|
|
23
23
|
thread_ts: string;
|
|
24
24
|
message_id: string;
|
|
25
|
-
message_role: "
|
|
25
|
+
message_role: "user" | "assistant";
|
|
26
26
|
message_timestamp: string;
|
|
27
27
|
excerpt: string;
|
|
28
28
|
permalink?: string | undefined;
|
|
@@ -49,7 +49,7 @@ export declare function createSlackConversationSearchTool(scope: ConversationSea
|
|
|
49
49
|
conversation_id: string;
|
|
50
50
|
thread_ts: string;
|
|
51
51
|
message_id: string;
|
|
52
|
-
message_role: "
|
|
52
|
+
message_role: "user" | "assistant";
|
|
53
53
|
message_timestamp: string;
|
|
54
54
|
excerpt: string;
|
|
55
55
|
permalink?: string | undefined;
|
|
@@ -47,7 +47,7 @@ declare const sessionLogEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
47
47
|
sessionId: z.ZodDefault<z.ZodString>;
|
|
48
48
|
message: z.ZodPipe<z.ZodObject<{
|
|
49
49
|
role: z.ZodString;
|
|
50
|
-
}, z.core.$loose>, z.ZodTransform<import("@earendil-works/pi-ai").AssistantMessage | import("@earendil-works/pi-ai").UserMessage | import("@earendil-works/pi-ai").ToolResultMessage<any> | import("@earendil-works/pi-agent-core").
|
|
50
|
+
}, z.core.$loose>, z.ZodTransform<import("@earendil-works/pi-ai").AssistantMessage | import("@earendil-works/pi-ai").UserMessage | import("@earendil-works/pi-ai").ToolResultMessage<any> | import("@earendil-works/pi-agent-core").BashExecutionMessage | import("@earendil-works/pi-agent-core").CustomMessage<unknown> | import("@earendil-works/pi-agent-core").BranchSummaryMessage | import("@earendil-works/pi-agent-core").CompactionSummaryMessage, {
|
|
51
51
|
[x: string]: unknown;
|
|
52
52
|
role: string;
|
|
53
53
|
}>>;
|
|
@@ -85,7 +85,7 @@ declare const sessionLogEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
85
85
|
sessionId: z.ZodDefault<z.ZodString>;
|
|
86
86
|
messages: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
87
87
|
role: z.ZodString;
|
|
88
|
-
}, z.core.$loose>, z.ZodTransform<import("@earendil-works/pi-ai").AssistantMessage | import("@earendil-works/pi-ai").UserMessage | import("@earendil-works/pi-ai").ToolResultMessage<any> | import("@earendil-works/pi-agent-core").
|
|
88
|
+
}, z.core.$loose>, z.ZodTransform<import("@earendil-works/pi-ai").AssistantMessage | import("@earendil-works/pi-ai").UserMessage | import("@earendil-works/pi-ai").ToolResultMessage<any> | import("@earendil-works/pi-agent-core").BashExecutionMessage | import("@earendil-works/pi-agent-core").CustomMessage<unknown> | import("@earendil-works/pi-agent-core").BranchSummaryMessage | import("@earendil-works/pi-agent-core").CompactionSummaryMessage, {
|
|
89
89
|
[x: string]: unknown;
|
|
90
90
|
role: string;
|
|
91
91
|
}>>>;
|
|
@@ -128,7 +128,7 @@ export declare function completeConversationWork(args: {
|
|
|
128
128
|
conversationStore?: ConversationStore;
|
|
129
129
|
nowMs?: number;
|
|
130
130
|
state?: StateAdapter;
|
|
131
|
-
}): Promise<"
|
|
131
|
+
}): Promise<"pending" | "completed" | "lost_lease">;
|
|
132
132
|
/** Record one failed delivery attempt and dead-letter messages at their limit. */
|
|
133
133
|
export declare function recordAttemptFailure(args: {
|
|
134
134
|
conversationId: string;
|
|
@@ -145,7 +145,7 @@ export declare function deadLetterAttempt(args: {
|
|
|
145
145
|
conversationStore?: ConversationStore;
|
|
146
146
|
nowMs?: number;
|
|
147
147
|
state?: StateAdapter;
|
|
148
|
-
}): Promise<"
|
|
148
|
+
}): Promise<"pending" | "failed" | "lost_lease">;
|
|
149
149
|
/** Clear an expired durable lease so a later worker can resume safely. */
|
|
150
150
|
export declare function clearExpiredConversationLease(args: {
|
|
151
151
|
conversationId: string;
|
|
@@ -32,7 +32,7 @@ export declare function createSearchToolsTool(catalogTools: Record<string, AnyTo
|
|
|
32
32
|
tools: {
|
|
33
33
|
tool_name: string;
|
|
34
34
|
description: string;
|
|
35
|
-
exposure: "
|
|
35
|
+
exposure: "hidden" | "direct" | "deferred" | "modelOnly";
|
|
36
36
|
signature: string;
|
|
37
37
|
call: {
|
|
38
38
|
tool_name: string;
|
|
@@ -77,7 +77,7 @@ export declare function createSearchToolsTool(catalogTools: Record<string, AnyTo
|
|
|
77
77
|
tools: {
|
|
78
78
|
tool_name: string;
|
|
79
79
|
description: string;
|
|
80
|
-
exposure: "
|
|
80
|
+
exposure: "hidden" | "direct" | "deferred" | "modelOnly";
|
|
81
81
|
signature: string;
|
|
82
82
|
call: {
|
|
83
83
|
tool_name: string;
|