@sentry/junior 0.189.0 → 0.190.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-6QRYH6PX.js → agent-hooks-3IG2FQW2.js} +11 -11
- package/dist/api.js +27 -27
- package/dist/app.js +86 -67
- package/dist/{catalog-runtime-IETJLJFG.js → catalog-runtime-2OT7S3ZC.js} +4 -4
- package/dist/chat/actor.d.ts +7 -2
- package/dist/chat/agent-invocations/types.d.ts +44 -308
- package/dist/chat/event-tasks/tool-support.d.ts +1 -1
- package/dist/chat/resource-events/actor.d.ts +2 -2
- package/dist/chat/source.d.ts +3 -3
- package/dist/chat/task-execution/mailbox-turn.d.ts +16 -6
- package/dist/chat/task-execution/state.d.ts +2 -2
- package/dist/chat/task-execution/store.d.ts +1 -1
- package/dist/chat/task-execution/turn-cursor.d.ts +10 -1
- package/dist/chat/tools/types.d.ts +9 -2
- package/dist/{chunk-6AUR6PWR.js → chunk-2MKHYSYL.js} +3 -3
- package/dist/{chunk-MI6ZBDTS.js → chunk-2MRF22J4.js} +25 -10
- package/dist/{chunk-OEIITG5F.js → chunk-3J3BCB4J.js} +1 -1
- package/dist/{chunk-SR6OMO5C.js → chunk-4BLFIYVK.js} +8 -8
- package/dist/{chunk-E3PDZPGV.js → chunk-4PKEJK5B.js} +1 -1
- package/dist/{chunk-CMWIMFM6.js → chunk-62DRKZQU.js} +5 -5
- package/dist/{chunk-ZV6PFUA4.js → chunk-663DQH5W.js} +1 -1
- package/dist/{chunk-GP32KD2J.js → chunk-67MMSYSE.js} +1 -1
- package/dist/{chunk-5CXCGDIL.js → chunk-6BXUSF7J.js} +1 -1
- package/dist/{chunk-WWYUYKKV.js → chunk-6H7YU6XH.js} +1 -1
- package/dist/{chunk-S3SGZUOI.js → chunk-7UJ6IJCK.js} +1 -1
- package/dist/{chunk-7R5JRPCY.js → chunk-7Y7XMI6P.js} +5 -5
- package/dist/{chunk-MFSET7Q7.js → chunk-BGOLRC36.js} +24 -8
- package/dist/{chunk-MVPLEPSI.js → chunk-BUJU6C2J.js} +1 -1
- package/dist/{chunk-KN32OWL2.js → chunk-CZXZKTAI.js} +3 -3
- package/dist/{chunk-QNIOBNOY.js → chunk-DJZGQ7OL.js} +52 -39
- package/dist/{chunk-DYXVAO2E.js → chunk-DVX6U6GI.js} +1 -1
- package/dist/{chunk-4RHJ3CXR.js → chunk-ECOR3OXY.js} +13 -12
- package/dist/{chunk-WMUAKAIF.js → chunk-F3K2267N.js} +29 -27
- package/dist/{chunk-YYZNESC3.js → chunk-FVFJ57RK.js} +8 -8
- package/dist/{chunk-PCPSX4ES.js → chunk-GWCFXTB6.js} +14 -12
- package/dist/{chunk-WDHPN2GH.js → chunk-HI5KXE3C.js} +3 -3
- package/dist/{chunk-WYDF6PGK.js → chunk-IRQ3RSX3.js} +3 -3
- package/dist/{chunk-NY2F7BZA.js → chunk-JV7U4665.js} +1 -1
- package/dist/{chunk-LHKZKAZ4.js → chunk-MNHJ4WLE.js} +3 -3
- package/dist/{chunk-YNZPOFF3.js → chunk-OJFX2FP7.js} +9 -9
- package/dist/{chunk-CUYFCI4G.js → chunk-OKAHLUSU.js} +16 -13
- package/dist/{chunk-VKQWU4PO.js → chunk-OON4IQHH.js} +1 -1
- package/dist/{chunk-AC7MDOJW.js → chunk-OYCOLHCR.js} +5 -5
- package/dist/{chunk-YYSEH2WC.js → chunk-REVH4BZU.js} +2 -2
- package/dist/{chunk-UCWO5MKP.js → chunk-RLYJYEIY.js} +4 -4
- package/dist/{chunk-ZUPDSJUE.js → chunk-T66GV7A3.js} +2 -2
- package/dist/{chunk-BYBSI5TI.js → chunk-VWNIDTFR.js} +2 -2
- package/dist/{chunk-MRXMFB4L.js → chunk-W2C4TPLB.js} +5 -5
- package/dist/{chunk-PY3EIEAF.js → chunk-Y4WL4OYD.js} +1 -1
- package/dist/{chunk-WN6VLHOU.js → chunk-YFU4DGZY.js} +4 -4
- package/dist/{chunk-O35GZCKL.js → chunk-YKIAUKYH.js} +2 -2
- package/dist/{chunk-5VWAY27R.js → chunk-ZFCO2TMB.js} +1 -1
- package/dist/cli/chat.js +33 -33
- package/dist/cli/check.js +5 -5
- package/dist/cli/plugins.js +12 -12
- package/dist/cli/snapshot-create.js +9 -9
- package/dist/cli/upgrade.js +6 -6
- package/dist/db/schema/agent-invocations.d.ts +18 -6
- package/dist/db/schema.d.ts +18 -6
- package/dist/{db-LPJKR2EO.js → db-2IFDMDDY.js} +6 -6
- package/dist/instrumentation.js +3 -3
- package/dist/nitro.js +6 -6
- package/dist/{oauth-callback-server-DMXF4TTQ.js → oauth-callback-server-SZSS2KH6.js} +29 -29
- package/dist/{runner-L5DPVYCN.js → runner-2N4QU77X.js} +21 -21
- package/dist/{skills-NXG3LBCK.js → skills-VU2LZAKX.js} +5 -5
- package/dist/spawn-3K7RV4T5.js +42 -0
- package/dist/task-runner-52DYFHW3.js +36 -0
- package/dist/{validation-CH36LTOS.js → validation-IJGHK7NI.js} +5 -5
- package/dist/version.js +1 -1
- package/dist/{work-HBC5Y5VZ.js → work-DI45MLRL.js} +21 -21
- package/dist/{worker-5RDZHLXH.js → worker-FY7KWG2M.js} +10 -10
- package/package.json +5 -5
- package/dist/spawn-VRUIGKWW.js +0 -42
- package/dist/task-runner-7YTBSPXW.js +0 -36
|
@@ -13,26 +13,26 @@ import {
|
|
|
13
13
|
getPlugins,
|
|
14
14
|
setPlugins,
|
|
15
15
|
validatePlugins
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-2MRF22J4.js";
|
|
17
17
|
import "./chunk-3Y47VMHV.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-OKAHLUSU.js";
|
|
19
|
+
import "./chunk-ZFCO2TMB.js";
|
|
20
|
+
import "./chunk-HI5KXE3C.js";
|
|
21
|
+
import "./chunk-6BXUSF7J.js";
|
|
22
22
|
import "./chunk-GFBR4S3Q.js";
|
|
23
23
|
import "./chunk-VFUK3X5B.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-VWNIDTFR.js";
|
|
25
25
|
import "./chunk-D4YV5TDV.js";
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-DVX6U6GI.js";
|
|
27
|
+
import "./chunk-4PKEJK5B.js";
|
|
28
|
+
import "./chunk-663DQH5W.js";
|
|
29
29
|
import "./chunk-CEMMLV5L.js";
|
|
30
30
|
import "./chunk-N7TMSOZH.js";
|
|
31
31
|
import "./chunk-DWPN6SCH.js";
|
|
32
32
|
import "./chunk-TXKUKMVO.js";
|
|
33
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-Y4WL4OYD.js";
|
|
34
34
|
import "./chunk-PEQXYSSE.js";
|
|
35
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-JV7U4665.js";
|
|
36
36
|
export {
|
|
37
37
|
PluginHookDeniedError,
|
|
38
38
|
applyPluginFormatMarkdown,
|
package/dist/api.js
CHANGED
|
@@ -63,12 +63,12 @@ import {
|
|
|
63
63
|
resolveSlackConversationContextFromThreadId,
|
|
64
64
|
viewerConversationMembership,
|
|
65
65
|
webActorFromEmail
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-4BLFIYVK.js";
|
|
67
67
|
import {
|
|
68
68
|
buildSentryConversationUrl,
|
|
69
69
|
buildSentryEventUrl,
|
|
70
70
|
getWebAuthorization
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-OON4IQHH.js";
|
|
72
72
|
import {
|
|
73
73
|
readTaskExecutionByConversationId,
|
|
74
74
|
readTaskExecutionDays,
|
|
@@ -76,7 +76,7 @@ import {
|
|
|
76
76
|
readTaskExecutionSummaries,
|
|
77
77
|
readTaskExecutions,
|
|
78
78
|
readTaskRuns
|
|
79
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-MNHJ4WLE.js";
|
|
80
80
|
import {
|
|
81
81
|
healthReportSchema,
|
|
82
82
|
pluginOperationalReportFeedSchema,
|
|
@@ -99,24 +99,24 @@ import {
|
|
|
99
99
|
readScheduledTask,
|
|
100
100
|
readStats,
|
|
101
101
|
saveScheduledTask
|
|
102
|
-
} from "./chunk-
|
|
102
|
+
} from "./chunk-62DRKZQU.js";
|
|
103
103
|
import {
|
|
104
104
|
parseSlackThreadId
|
|
105
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-BUJU6C2J.js";
|
|
106
106
|
import {
|
|
107
107
|
cancelHumanFacingPendingMessages,
|
|
108
108
|
getConversation
|
|
109
|
-
} from "./chunk-
|
|
109
|
+
} from "./chunk-YFU4DGZY.js";
|
|
110
110
|
import "./chunk-DA2KGZZI.js";
|
|
111
111
|
import {
|
|
112
112
|
agentTurnUsageSchema,
|
|
113
113
|
fallbackShortTitle,
|
|
114
114
|
hasAgentTurnUsage,
|
|
115
115
|
renderJuniorNativeConversationEvent
|
|
116
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-YKIAUKYH.js";
|
|
117
117
|
import {
|
|
118
118
|
getCachedSnapshot
|
|
119
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-2MKHYSYL.js";
|
|
120
120
|
import "./chunk-PDO5BLNM.js";
|
|
121
121
|
import {
|
|
122
122
|
getVercelConversationWorkQueue
|
|
@@ -142,7 +142,7 @@ import {
|
|
|
142
142
|
updateWorkspace,
|
|
143
143
|
withSlackRetries,
|
|
144
144
|
workspaceRepoCheckoutPath
|
|
145
|
-
} from "./chunk-
|
|
145
|
+
} from "./chunk-2MRF22J4.js";
|
|
146
146
|
import "./chunk-3Y47VMHV.js";
|
|
147
147
|
import {
|
|
148
148
|
getConversationStore,
|
|
@@ -151,7 +151,7 @@ import {
|
|
|
151
151
|
locationFromRow,
|
|
152
152
|
parseSessionSource,
|
|
153
153
|
resolveRootConversationId
|
|
154
|
-
} from "./chunk-
|
|
154
|
+
} from "./chunk-OKAHLUSU.js";
|
|
155
155
|
import {
|
|
156
156
|
conversationReadColumns,
|
|
157
157
|
juniorApiTokens,
|
|
@@ -163,23 +163,23 @@ import {
|
|
|
163
163
|
juniorIdentities,
|
|
164
164
|
juniorSchedulerTasks,
|
|
165
165
|
juniorUsers
|
|
166
|
-
} from "./chunk-
|
|
166
|
+
} from "./chunk-ZFCO2TMB.js";
|
|
167
167
|
import {
|
|
168
168
|
create,
|
|
169
169
|
hash
|
|
170
|
-
} from "./chunk-
|
|
171
|
-
import "./chunk-
|
|
170
|
+
} from "./chunk-HI5KXE3C.js";
|
|
171
|
+
import "./chunk-6BXUSF7J.js";
|
|
172
172
|
import {
|
|
173
173
|
decodeStoredConversationEvent
|
|
174
174
|
} from "./chunk-GFBR4S3Q.js";
|
|
175
175
|
import {
|
|
176
176
|
juniorDestinations
|
|
177
177
|
} from "./chunk-VFUK3X5B.js";
|
|
178
|
-
import "./chunk-
|
|
178
|
+
import "./chunk-VWNIDTFR.js";
|
|
179
179
|
import "./chunk-D4YV5TDV.js";
|
|
180
|
-
import "./chunk-
|
|
181
|
-
import "./chunk-
|
|
182
|
-
import "./chunk-
|
|
180
|
+
import "./chunk-DVX6U6GI.js";
|
|
181
|
+
import "./chunk-4PKEJK5B.js";
|
|
182
|
+
import "./chunk-663DQH5W.js";
|
|
183
183
|
import "./chunk-CEMMLV5L.js";
|
|
184
184
|
import {
|
|
185
185
|
parseSlackChannelId,
|
|
@@ -191,9 +191,9 @@ import "./chunk-TXKUKMVO.js";
|
|
|
191
191
|
import {
|
|
192
192
|
logException,
|
|
193
193
|
logWarn
|
|
194
|
-
} from "./chunk-
|
|
194
|
+
} from "./chunk-Y4WL4OYD.js";
|
|
195
195
|
import "./chunk-PEQXYSSE.js";
|
|
196
|
-
import "./chunk-
|
|
196
|
+
import "./chunk-JV7U4665.js";
|
|
197
197
|
|
|
198
198
|
// src/api.ts
|
|
199
199
|
import { Hono as Hono9 } from "hono";
|
|
@@ -1296,7 +1296,7 @@ function surfaceFromSource(source, conversationId) {
|
|
|
1296
1296
|
}
|
|
1297
1297
|
function sourceUrlFromConversation(args) {
|
|
1298
1298
|
const { conversation } = args;
|
|
1299
|
-
if (!args.canViewPrivateContent || conversation.sessionSource?.
|
|
1299
|
+
if (!args.canViewPrivateContent || conversation.sessionSource?.kind !== "slack") {
|
|
1300
1300
|
return void 0;
|
|
1301
1301
|
}
|
|
1302
1302
|
const teamDomain = args.teamDomainByTeamId?.get(
|
|
@@ -1971,7 +1971,7 @@ async function readConversationFeedFromSql(options = {}) {
|
|
|
1971
1971
|
readRootConversationMetricsFromSql(db, conversationIds),
|
|
1972
1972
|
resolveSlackTeamDomains(
|
|
1973
1973
|
conversations.flatMap(
|
|
1974
|
-
(conversation) => conversation.sessionSource?.
|
|
1974
|
+
(conversation) => conversation.sessionSource?.kind === "slack" ? [conversation.sessionSource.teamId] : []
|
|
1975
1975
|
)
|
|
1976
1976
|
),
|
|
1977
1977
|
listConversationWork(conversationIds),
|
|
@@ -2669,7 +2669,7 @@ async function readConversationDetailFromSql(conversationId, options) {
|
|
|
2669
2669
|
...options.viewer ? { viewer: options.viewer } : void 0
|
|
2670
2670
|
}),
|
|
2671
2671
|
resolveSlackTeamDomains(
|
|
2672
|
-
record.conversation.sessionSource?.
|
|
2672
|
+
record.conversation.sessionSource?.kind === "slack" ? [record.conversation.sessionSource.teamId] : []
|
|
2673
2673
|
)
|
|
2674
2674
|
]);
|
|
2675
2675
|
const access = accessByConversation.get(conversationId);
|
|
@@ -4585,7 +4585,7 @@ async function readPeoplePluginReports(args) {
|
|
|
4585
4585
|
source: "plugins"
|
|
4586
4586
|
});
|
|
4587
4587
|
}
|
|
4588
|
-
const { getPluginProfileReports } = await import("./agent-hooks-
|
|
4588
|
+
const { getPluginProfileReports } = await import("./agent-hooks-3IG2FQW2.js");
|
|
4589
4589
|
return pluginOperationalReportFeedSchema.parse({
|
|
4590
4590
|
generatedAt: new Date(nowMs).toISOString(),
|
|
4591
4591
|
reports: await getPluginProfileReports({
|
|
@@ -5389,7 +5389,7 @@ function readDescriptionText(home) {
|
|
|
5389
5389
|
}
|
|
5390
5390
|
}
|
|
5391
5391
|
async function readSkillReports() {
|
|
5392
|
-
const { discoverSkills } = await import("./skills-
|
|
5392
|
+
const { discoverSkills } = await import("./skills-VU2LZAKX.js");
|
|
5393
5393
|
const skills = await discoverSkills();
|
|
5394
5394
|
return skillReportsSchema.parse(
|
|
5395
5395
|
skills.map((skill) => ({
|
|
@@ -5399,7 +5399,7 @@ async function readSkillReports() {
|
|
|
5399
5399
|
);
|
|
5400
5400
|
}
|
|
5401
5401
|
async function readPlugins() {
|
|
5402
|
-
const { pluginCatalogRuntime } = await import("./catalog-runtime-
|
|
5402
|
+
const { pluginCatalogRuntime } = await import("./catalog-runtime-2OT7S3ZC.js");
|
|
5403
5403
|
return pluginsSchema.parse(
|
|
5404
5404
|
pluginCatalogRuntime.getProviders().map((plugin) => ({
|
|
5405
5405
|
configKeys: plugin.manifest.configKeys ?? [],
|
|
@@ -5412,7 +5412,7 @@ async function readPlugins() {
|
|
|
5412
5412
|
async function readRuntimeInfoReport() {
|
|
5413
5413
|
const [{ homeDir }, { pluginCatalogRuntime }, plugins, skills] = await Promise.all([
|
|
5414
5414
|
import("./discovery-DWVDM7UK.js"),
|
|
5415
|
-
import("./catalog-runtime-
|
|
5415
|
+
import("./catalog-runtime-2OT7S3ZC.js"),
|
|
5416
5416
|
readPlugins(),
|
|
5417
5417
|
readSkillReports()
|
|
5418
5418
|
]);
|
|
@@ -5428,7 +5428,7 @@ async function readRuntimeInfoReport() {
|
|
|
5428
5428
|
}
|
|
5429
5429
|
async function readPluginOperationalReportFeed() {
|
|
5430
5430
|
const nowMs = Date.now();
|
|
5431
|
-
const { getPluginOperationalReports } = await import("./agent-hooks-
|
|
5431
|
+
const { getPluginOperationalReports } = await import("./agent-hooks-3IG2FQW2.js");
|
|
5432
5432
|
return pluginOperationalReportFeedSchema.parse({
|
|
5433
5433
|
source: "plugins",
|
|
5434
5434
|
generatedAt: new Date(nowMs).toISOString(),
|
package/dist/app.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
processConversationWork
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RLYJYEIY.js";
|
|
4
4
|
import {
|
|
5
5
|
bindSpawnAgent
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-T66GV7A3.js";
|
|
7
7
|
import {
|
|
8
8
|
createAgentInvocationWorker,
|
|
9
9
|
enqueueAgentInvocation,
|
|
10
10
|
listPendingAgentInvocationMailboxAppends,
|
|
11
11
|
resolveAgentInvocationId
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-OJFX2FP7.js";
|
|
13
13
|
import {
|
|
14
14
|
GET as GET2,
|
|
15
15
|
GET2 as GET3,
|
|
@@ -37,12 +37,12 @@ import {
|
|
|
37
37
|
startProcessingReaction,
|
|
38
38
|
stripLeadingBotMention,
|
|
39
39
|
wakePausedTurn
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-F3K2267N.js";
|
|
41
41
|
import "./chunk-FA6POGLH.js";
|
|
42
42
|
import {
|
|
43
43
|
AgentRunError,
|
|
44
44
|
executeTurn
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-IRQ3RSX3.js";
|
|
46
46
|
import {
|
|
47
47
|
buildDeliveredTurnStatePatch,
|
|
48
48
|
completeAuthPauseTurn,
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
getTurnUserSlackMessageTs,
|
|
54
54
|
persistAuthPauseTurnState,
|
|
55
55
|
requireTurnFailureEventId
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-7Y7XMI6P.js";
|
|
57
57
|
import {
|
|
58
58
|
claimDispatchMailboxAppend,
|
|
59
59
|
confirmDispatchMailboxAppend,
|
|
@@ -73,11 +73,11 @@ import {
|
|
|
73
73
|
processPluginTask,
|
|
74
74
|
resolveTurnSessionRouting,
|
|
75
75
|
scheduleSessionCompletedPluginTasks
|
|
76
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-ECOR3OXY.js";
|
|
77
77
|
import {
|
|
78
78
|
ConversationTurnLifecycleService,
|
|
79
79
|
getTurnLifecycle
|
|
80
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-6H7YU6XH.js";
|
|
81
81
|
import {
|
|
82
82
|
coerceThreadConversationState,
|
|
83
83
|
getLocationConfigurationService,
|
|
@@ -86,7 +86,7 @@ import {
|
|
|
86
86
|
persistThreadRuntimeState,
|
|
87
87
|
persistThreadState,
|
|
88
88
|
persistThreadStateById
|
|
89
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-W2C4TPLB.js";
|
|
90
90
|
import {
|
|
91
91
|
GET,
|
|
92
92
|
appendAndEnqueueWebMessage,
|
|
@@ -101,24 +101,24 @@ import {
|
|
|
101
101
|
resolveSlackChannelTypeFromMessage,
|
|
102
102
|
resolveSlackConversationContext,
|
|
103
103
|
webActorFromEmail
|
|
104
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-4BLFIYVK.js";
|
|
105
105
|
import {
|
|
106
106
|
createWebAuthorization,
|
|
107
107
|
deleteWebAuthorization
|
|
108
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-OON4IQHH.js";
|
|
109
109
|
import {
|
|
110
110
|
recordTaskExecution
|
|
111
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-MNHJ4WLE.js";
|
|
112
112
|
import "./chunk-UTL3MHPC.js";
|
|
113
113
|
import {
|
|
114
114
|
createVercelPluginTaskCallback,
|
|
115
115
|
queueCallback,
|
|
116
116
|
registerVercelPluginTaskDevConsumer
|
|
117
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-CZXZKTAI.js";
|
|
118
118
|
import {
|
|
119
119
|
validatePluginEgressCredentialHooks,
|
|
120
120
|
validatePluginRegistrations
|
|
121
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-3J3BCB4J.js";
|
|
122
122
|
import {
|
|
123
123
|
defineJuniorPlugins,
|
|
124
124
|
pluginCatalogConfigFromEnv,
|
|
@@ -158,11 +158,11 @@ import {
|
|
|
158
158
|
shouldEmitDevAgentTrace,
|
|
159
159
|
shouldPropagateSandboxEgressTrace,
|
|
160
160
|
unpublishedArtifactHeaders
|
|
161
|
-
} from "./chunk-
|
|
161
|
+
} from "./chunk-DJZGQ7OL.js";
|
|
162
162
|
import {
|
|
163
163
|
AuthorizationFlowDisabledError,
|
|
164
164
|
PluginCredentialFailureError
|
|
165
|
-
} from "./chunk-
|
|
165
|
+
} from "./chunk-OYCOLHCR.js";
|
|
166
166
|
import "./chunk-6Y5B5PEX.js";
|
|
167
167
|
import "./chunk-DIB4GX3G.js";
|
|
168
168
|
import {
|
|
@@ -170,14 +170,14 @@ import {
|
|
|
170
170
|
deleteMcpAuthSessionsForUserProvider,
|
|
171
171
|
deleteMcpServerSessionId,
|
|
172
172
|
deleteMcpStoredOAuthCredentials
|
|
173
|
-
} from "./chunk-
|
|
173
|
+
} from "./chunk-FVFJ57RK.js";
|
|
174
174
|
import {
|
|
175
175
|
RetryableDeliveryError,
|
|
176
176
|
createAgentRunner,
|
|
177
177
|
formatProviderLabel,
|
|
178
178
|
postSlackMessage,
|
|
179
179
|
startOAuthFlow
|
|
180
|
-
} from "./chunk-
|
|
180
|
+
} from "./chunk-GWCFXTB6.js";
|
|
181
181
|
import {
|
|
182
182
|
ConversationTurnBoundaryError,
|
|
183
183
|
CooperativeTurnYieldError,
|
|
@@ -193,7 +193,7 @@ import {
|
|
|
193
193
|
markTurnCompleted,
|
|
194
194
|
markTurnFailed,
|
|
195
195
|
startActiveTurn
|
|
196
|
-
} from "./chunk-
|
|
196
|
+
} from "./chunk-67MMSYSE.js";
|
|
197
197
|
import {
|
|
198
198
|
abandonTurnRecord,
|
|
199
199
|
appendThreadContextMessages,
|
|
@@ -229,7 +229,7 @@ import {
|
|
|
229
229
|
trimTrailingAssistantMessages,
|
|
230
230
|
turnHasReply,
|
|
231
231
|
upsertConversationMessage
|
|
232
|
-
} from "./chunk-
|
|
232
|
+
} from "./chunk-BGOLRC36.js";
|
|
233
233
|
import {
|
|
234
234
|
getExperimentalFeatures,
|
|
235
235
|
isExperimentalFeatureEnabled,
|
|
@@ -249,10 +249,10 @@ import {
|
|
|
249
249
|
scheduledRunId,
|
|
250
250
|
scheduledRunSchema,
|
|
251
251
|
withScheduledTaskLock
|
|
252
|
-
} from "./chunk-
|
|
252
|
+
} from "./chunk-62DRKZQU.js";
|
|
253
253
|
import {
|
|
254
254
|
parseSlackThreadId
|
|
255
|
-
} from "./chunk-
|
|
255
|
+
} from "./chunk-BUJU6C2J.js";
|
|
256
256
|
import {
|
|
257
257
|
CONVERSATION_WORK_STALE_ENQUEUE_MS,
|
|
258
258
|
appendAndEnqueueInboundMessage,
|
|
@@ -267,16 +267,16 @@ import {
|
|
|
267
267
|
removeActiveConversation,
|
|
268
268
|
requestConversationWork,
|
|
269
269
|
stopConversationWork
|
|
270
|
-
} from "./chunk-
|
|
270
|
+
} from "./chunk-YFU4DGZY.js";
|
|
271
271
|
import {
|
|
272
272
|
buildDeterministicAssistantMessageId,
|
|
273
273
|
buildDeterministicTurnId
|
|
274
274
|
} from "./chunk-DA2KGZZI.js";
|
|
275
|
-
import "./chunk-
|
|
275
|
+
import "./chunk-YKIAUKYH.js";
|
|
276
276
|
import {
|
|
277
277
|
getSandboxResourceConfig,
|
|
278
278
|
setSandboxResourceConfig
|
|
279
|
-
} from "./chunk-
|
|
279
|
+
} from "./chunk-2MKHYSYL.js";
|
|
280
280
|
import "./chunk-PDO5BLNM.js";
|
|
281
281
|
import "./chunk-UIE3R5XU.js";
|
|
282
282
|
import {
|
|
@@ -285,7 +285,7 @@ import {
|
|
|
285
285
|
} from "./chunk-X6GDDWQH.js";
|
|
286
286
|
import {
|
|
287
287
|
getTurnRequestDeadline
|
|
288
|
-
} from "./chunk-
|
|
288
|
+
} from "./chunk-7UJ6IJCK.js";
|
|
289
289
|
import {
|
|
290
290
|
getVercelConversationWorkQueue,
|
|
291
291
|
resolveConversationWorkQueueTopic,
|
|
@@ -321,7 +321,7 @@ import {
|
|
|
321
321
|
verifyEventTaskCredentialSubject,
|
|
322
322
|
verifyScheduledTaskCredentialSubject,
|
|
323
323
|
verifySlackDirectCredentialSubject
|
|
324
|
-
} from "./chunk-
|
|
324
|
+
} from "./chunk-2MRF22J4.js";
|
|
325
325
|
import "./chunk-3Y47VMHV.js";
|
|
326
326
|
import {
|
|
327
327
|
createSlackDestination,
|
|
@@ -333,7 +333,7 @@ import {
|
|
|
333
333
|
requireSlackDestination,
|
|
334
334
|
withConversationEventLock,
|
|
335
335
|
withConversationMutationLock
|
|
336
|
-
} from "./chunk-
|
|
336
|
+
} from "./chunk-OKAHLUSU.js";
|
|
337
337
|
import {
|
|
338
338
|
juniorAgentBindings,
|
|
339
339
|
juniorAgentInvocations,
|
|
@@ -341,13 +341,13 @@ import {
|
|
|
341
341
|
juniorConversations,
|
|
342
342
|
juniorSchedulerRuns,
|
|
343
343
|
juniorSchedulerTasks
|
|
344
|
-
} from "./chunk-
|
|
345
|
-
import "./chunk-
|
|
344
|
+
} from "./chunk-ZFCO2TMB.js";
|
|
345
|
+
import "./chunk-HI5KXE3C.js";
|
|
346
346
|
import {
|
|
347
347
|
acquireActiveLock,
|
|
348
348
|
getStateAdapter,
|
|
349
349
|
withActiveLock
|
|
350
|
-
} from "./chunk-
|
|
350
|
+
} from "./chunk-6BXUSF7J.js";
|
|
351
351
|
import {
|
|
352
352
|
instructionProvenanceFor
|
|
353
353
|
} from "./chunk-GFBR4S3Q.js";
|
|
@@ -369,17 +369,17 @@ import {
|
|
|
369
369
|
isProviderRetryError,
|
|
370
370
|
setProfiles,
|
|
371
371
|
setSlackReactionConfig
|
|
372
|
-
} from "./chunk-
|
|
372
|
+
} from "./chunk-VWNIDTFR.js";
|
|
373
373
|
import {
|
|
374
374
|
defaultModelId,
|
|
375
375
|
modelIdForProfile
|
|
376
376
|
} from "./chunk-D4YV5TDV.js";
|
|
377
|
-
import "./chunk-
|
|
378
|
-
import "./chunk-
|
|
377
|
+
import "./chunk-DVX6U6GI.js";
|
|
378
|
+
import "./chunk-REVH4BZU.js";
|
|
379
379
|
import {
|
|
380
380
|
pluginCatalogRuntime
|
|
381
|
-
} from "./chunk-
|
|
382
|
-
import "./chunk-
|
|
381
|
+
} from "./chunk-4PKEJK5B.js";
|
|
382
|
+
import "./chunk-663DQH5W.js";
|
|
383
383
|
import {
|
|
384
384
|
credentialContextForActor
|
|
385
385
|
} from "./chunk-CEMMLV5L.js";
|
|
@@ -415,13 +415,13 @@ import {
|
|
|
415
415
|
withContext,
|
|
416
416
|
withLogContext,
|
|
417
417
|
withSpan
|
|
418
|
-
} from "./chunk-
|
|
418
|
+
} from "./chunk-Y4WL4OYD.js";
|
|
419
419
|
import {
|
|
420
420
|
continueTrace
|
|
421
421
|
} from "./chunk-PEQXYSSE.js";
|
|
422
422
|
import {
|
|
423
423
|
JUNIOR_VERSION
|
|
424
|
-
} from "./chunk-
|
|
424
|
+
} from "./chunk-JV7U4665.js";
|
|
425
425
|
|
|
426
426
|
// src/app.ts
|
|
427
427
|
import { createRequire } from "module";
|
|
@@ -942,7 +942,7 @@ function dispatchOptionsErrorMessage(issues) {
|
|
|
942
942
|
return "Dispatch source must not include unknown fields";
|
|
943
943
|
}
|
|
944
944
|
if (hasIssueAtPath(issues, ["source"])) {
|
|
945
|
-
return "Dispatch
|
|
945
|
+
return "Dispatch Source kind is required";
|
|
946
946
|
}
|
|
947
947
|
if (hasIssueUnderPath(issues, ["source", "teamId"])) {
|
|
948
948
|
return "Dispatch source teamId must be a Slack team id";
|
|
@@ -8186,10 +8186,10 @@ async function resolveSlackResumeUserActor(args) {
|
|
|
8186
8186
|
async function resolveResumeExecutionIdentity(args) {
|
|
8187
8187
|
const routing = args.routingContext;
|
|
8188
8188
|
if (routing?.credentialContext) {
|
|
8189
|
-
const actor2 = routing.dispatch?.actor ?? routing.actor ?? (!("type" in routing.credentialContext.actor) ? routing.credentialContext.actor : void 0);
|
|
8189
|
+
const actor2 = args.actor ?? routing.dispatch?.actor ?? routing.actor ?? (!("type" in routing.credentialContext.actor) ? routing.credentialContext.actor : void 0);
|
|
8190
8190
|
return actor2 ? { actor: actor2, credentialContext: routing.credentialContext } : void 0;
|
|
8191
8191
|
}
|
|
8192
|
-
let actor = routing?.actor;
|
|
8192
|
+
let actor = args.actor ?? routing?.actor;
|
|
8193
8193
|
if (!actor && isResourceEventConversationMessage(args.userMessage)) {
|
|
8194
8194
|
actor = RESOURCE_EVENT_SYSTEM_ACTOR;
|
|
8195
8195
|
}
|
|
@@ -8305,6 +8305,7 @@ async function runPausedTurnInContext(payload, options, runOptions) {
|
|
|
8305
8305
|
return false;
|
|
8306
8306
|
}
|
|
8307
8307
|
const identity = await resolveResumeExecutionIdentity({
|
|
8308
|
+
actor: activeTurn.actor,
|
|
8308
8309
|
conversationId: payload.conversationId,
|
|
8309
8310
|
routingContext: options.routingContext,
|
|
8310
8311
|
teamId: destination.teamId,
|
|
@@ -8630,18 +8631,24 @@ async function commitAssistantMessage(args) {
|
|
|
8630
8631
|
|
|
8631
8632
|
// src/chat/task-execution/mailbox-turn.ts
|
|
8632
8633
|
import {
|
|
8634
|
+
createResourceEventSource,
|
|
8633
8635
|
createLocalSource,
|
|
8634
8636
|
createWebSource
|
|
8635
8637
|
} from "@sentry/junior-plugin-api";
|
|
8636
|
-
function turnInputFactsFromConversationMessage(message) {
|
|
8638
|
+
function turnInputFactsFromConversationMessage(message, args) {
|
|
8637
8639
|
if (isResourceEventConversationMessage(message)) {
|
|
8638
8640
|
return {
|
|
8639
|
-
actor: RESOURCE_EVENT_SYSTEM_ACTOR,
|
|
8641
|
+
actor: args.savedActor ?? RESOURCE_EVENT_SYSTEM_ACTOR,
|
|
8640
8642
|
author: message.author ?? RESOURCE_EVENT_MESSAGE_AUTHOR,
|
|
8641
|
-
|
|
8643
|
+
// Stored Turns written before Source was saved can only restore the old
|
|
8644
|
+
// provider stand-in from the Conversation.
|
|
8645
|
+
source: args.savedSource ?? (args.location ? createWebSource(
|
|
8646
|
+
args.conversationId,
|
|
8647
|
+
args.visibility === "private" ? "private" : "public"
|
|
8648
|
+
) : createLocalSource(args.conversationId))
|
|
8642
8649
|
};
|
|
8643
8650
|
}
|
|
8644
|
-
const actor = createActor(message.author, {
|
|
8651
|
+
const actor = args.savedActor ?? createActor(message.author, {
|
|
8645
8652
|
platform: "web",
|
|
8646
8653
|
userId: message.author?.userId
|
|
8647
8654
|
});
|
|
@@ -8651,22 +8658,20 @@ function turnInputFactsFromConversationMessage(message) {
|
|
|
8651
8658
|
return {
|
|
8652
8659
|
actor,
|
|
8653
8660
|
author: message.author ?? { userId: actor.userId },
|
|
8654
|
-
source: "web"
|
|
8661
|
+
source: args.savedSource?.kind === "web" ? args.savedSource : createWebSource(
|
|
8662
|
+
args.conversationId,
|
|
8663
|
+
args.visibility === "private" ? "private" : "public"
|
|
8664
|
+
)
|
|
8655
8665
|
};
|
|
8656
8666
|
}
|
|
8657
8667
|
function sourceFromTurnInput(args) {
|
|
8658
|
-
|
|
8659
|
-
|
|
8660
|
-
|
|
8661
|
-
|
|
8662
|
-
|
|
8663
|
-
) : createLocalSource(args.conversationId);
|
|
8664
|
-
case "web":
|
|
8665
|
-
return createWebSource(
|
|
8666
|
-
args.conversationId,
|
|
8667
|
-
args.visibility === "private" ? "private" : "public"
|
|
8668
|
-
);
|
|
8668
|
+
if (args.source.kind === "web") {
|
|
8669
|
+
return createWebSource(
|
|
8670
|
+
args.conversationId,
|
|
8671
|
+
args.visibility === "private" ? "private" : "public"
|
|
8672
|
+
);
|
|
8669
8673
|
}
|
|
8674
|
+
return args.source;
|
|
8670
8675
|
}
|
|
8671
8676
|
function hasResourceEventActor(actors) {
|
|
8672
8677
|
return Boolean(
|
|
@@ -8688,7 +8693,7 @@ async function getActiveConversationTurnId(conversationId) {
|
|
|
8688
8693
|
const turnId = active[0]?.turnId;
|
|
8689
8694
|
if (!turnId) return void 0;
|
|
8690
8695
|
const record = await getTurnRecord(conversationId, turnId);
|
|
8691
|
-
return record && record.surface === "api" && !record.dispatchId && (record.state === "paused" || record.state === "running") ? turnId : void 0;
|
|
8696
|
+
return record && (record.source?.kind === "web" || !record.source && record.surface === "api") && !record.dispatchId && (record.state === "paused" || record.state === "running") ? turnId : void 0;
|
|
8692
8697
|
}
|
|
8693
8698
|
async function getActiveMailboxTurnId(conversationId) {
|
|
8694
8699
|
const summaries = await listTurnSummaries(conversationId);
|
|
@@ -8697,7 +8702,7 @@ async function getActiveMailboxTurnId(conversationId) {
|
|
|
8697
8702
|
(summary) => !summary.dispatchId && (summary.state === "paused" || summary.state === "running")
|
|
8698
8703
|
).map((summary) => getTurnRecord(conversationId, summary.turnId))
|
|
8699
8704
|
)).filter(
|
|
8700
|
-
(record) => record && !record.dispatchId && (record.surface === "api" || hasResourceEventActor(record.actors)) && (record.state === "paused" || record.state === "running")
|
|
8705
|
+
(record) => record && !record.dispatchId && (record.source?.kind === "web" || record.source?.kind === "resource_event" || !record.source && (record.surface === "api" || hasResourceEventActor(record.actors))) && (record.state === "paused" || record.state === "running")
|
|
8701
8706
|
);
|
|
8702
8707
|
if (active.length > 1) {
|
|
8703
8708
|
throw new Error(
|
|
@@ -8747,7 +8752,7 @@ function parseWebMessages(messages) {
|
|
|
8747
8752
|
...actor.userName ? { userName: actor.userName } : void 0
|
|
8748
8753
|
},
|
|
8749
8754
|
message: entry.message,
|
|
8750
|
-
source:
|
|
8755
|
+
source: createWebSource(entry.message.conversationId)
|
|
8751
8756
|
};
|
|
8752
8757
|
});
|
|
8753
8758
|
}
|
|
@@ -8768,7 +8773,12 @@ function parseResourceEventMessages(messages) {
|
|
|
8768
8773
|
actor: RESOURCE_EVENT_SYSTEM_ACTOR,
|
|
8769
8774
|
author: RESOURCE_EVENT_MESSAGE_AUTHOR,
|
|
8770
8775
|
message,
|
|
8771
|
-
source:
|
|
8776
|
+
source: createResourceEventSource({
|
|
8777
|
+
eventKey: message.input.metadata.resourceEvent.eventKey,
|
|
8778
|
+
eventType: message.input.metadata.resourceEvent.eventType,
|
|
8779
|
+
identifier: message.input.metadata.resourceEvent.identifier,
|
|
8780
|
+
namespace: message.input.metadata.resourceEvent.namespace
|
|
8781
|
+
})
|
|
8772
8782
|
};
|
|
8773
8783
|
});
|
|
8774
8784
|
}
|
|
@@ -8889,6 +8899,8 @@ function createConversationTurnWorker(agentRunner, publishMessage) {
|
|
|
8889
8899
|
conversation,
|
|
8890
8900
|
conversationId: context.conversationId
|
|
8891
8901
|
});
|
|
8902
|
+
const savedTurn = isResume ? await getTurnRecord(context.conversationId, turnId) : void 0;
|
|
8903
|
+
let resumedResourceEvent = false;
|
|
8892
8904
|
if (isResume) {
|
|
8893
8905
|
const userMessage = getTurnUserMessage(conversation, turnId);
|
|
8894
8906
|
if (!userMessage) {
|
|
@@ -8896,7 +8908,14 @@ function createConversationTurnWorker(agentRunner, publishMessage) {
|
|
|
8896
8908
|
`Unable to locate the persisted user message for Turn "${turnId}"`
|
|
8897
8909
|
);
|
|
8898
8910
|
}
|
|
8899
|
-
|
|
8911
|
+
resumedResourceEvent = isResourceEventConversationMessage(userMessage);
|
|
8912
|
+
turnInputFacts = turnInputFactsFromConversationMessage(userMessage, {
|
|
8913
|
+
conversationId: context.conversationId,
|
|
8914
|
+
location: storedConversation?.location,
|
|
8915
|
+
savedActor: savedTurn?.actor,
|
|
8916
|
+
savedSource: savedTurn?.source,
|
|
8917
|
+
visibility: storedConversation?.visibility
|
|
8918
|
+
});
|
|
8900
8919
|
userMessageId = userMessage.id;
|
|
8901
8920
|
text = userMessage.text;
|
|
8902
8921
|
startedAtMs = userMessage.createdAtMs;
|
|
@@ -8910,13 +8929,13 @@ function createConversationTurnWorker(agentRunner, publishMessage) {
|
|
|
8910
8929
|
const { actor, author } = turnInputFacts;
|
|
8911
8930
|
const source = sourceFromTurnInput({
|
|
8912
8931
|
conversationId: context.conversationId,
|
|
8913
|
-
location: storedConversation?.location,
|
|
8914
8932
|
source: turnInputFacts.source,
|
|
8915
8933
|
visibility: storedConversation?.visibility
|
|
8916
8934
|
});
|
|
8917
8935
|
const webActor = actor.platform === "web" ? actor : void 0;
|
|
8918
|
-
const
|
|
8919
|
-
|
|
8936
|
+
const publish = savedTurn?.publishExternally ?? Boolean(
|
|
8937
|
+
storedConversation?.location && (source.kind === "resource_event" || resumedResourceEvent)
|
|
8938
|
+
);
|
|
8920
8939
|
const surface = publish ? "slack" : "api";
|
|
8921
8940
|
return await withLogContext(
|
|
8922
8941
|
{
|
|
@@ -8977,7 +8996,7 @@ function createConversationTurnWorker(agentRunner, publishMessage) {
|
|
|
8977
8996
|
meta: {
|
|
8978
8997
|
explicitMention: true,
|
|
8979
8998
|
replied: false,
|
|
8980
|
-
...
|
|
8999
|
+
...source.kind === "web" ? { source: "web" } : void 0
|
|
8981
9000
|
}
|
|
8982
9001
|
});
|
|
8983
9002
|
await persistConversationMessages({
|
|
@@ -9029,7 +9048,7 @@ function createConversationTurnWorker(agentRunner, publishMessage) {
|
|
|
9029
9048
|
conversationId: context.conversationId,
|
|
9030
9049
|
...publishedMessage ? { publishedMessage } : void 0,
|
|
9031
9050
|
sessionId: turnId,
|
|
9032
|
-
...publishedMessage ? { source: "slack" } :
|
|
9051
|
+
...publishedMessage ? { source: "slack" } : source.kind === "web" ? { source: "web" } : void 0,
|
|
9033
9052
|
text: replyText,
|
|
9034
9053
|
userMessageId
|
|
9035
9054
|
});
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pluginCatalogRuntime
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-4PKEJK5B.js";
|
|
4
|
+
import "./chunk-663DQH5W.js";
|
|
5
5
|
import "./chunk-CEMMLV5L.js";
|
|
6
6
|
import "./chunk-N7TMSOZH.js";
|
|
7
7
|
import "./chunk-DWPN6SCH.js";
|
|
8
8
|
import "./chunk-TXKUKMVO.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-Y4WL4OYD.js";
|
|
10
10
|
import "./chunk-PEQXYSSE.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-JV7U4665.js";
|
|
12
12
|
export {
|
|
13
13
|
pluginCatalogRuntime
|
|
14
14
|
};
|