@sentry/junior 0.187.0 → 0.189.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-XVAE2554.js → agent-hooks-6QRYH6PX.js} +11 -11
- package/dist/api/acp/conversations.d.ts +2 -2
- package/dist/api/conversations/list.d.ts +7 -0
- package/dist/api/people/shared.d.ts +54 -0
- package/dist/api.js +41 -52
- package/dist/app.d.ts +1 -1
- package/dist/app.js +1001 -338
- package/dist/{catalog-runtime-DWFAC562.js → catalog-runtime-IETJLJFG.js} +4 -4
- package/dist/chat/agent/resume.d.ts +0 -2
- package/dist/chat/agent/types.d.ts +9 -14
- package/dist/chat/agent-dispatch/work.d.ts +1 -10
- package/dist/chat/agent-invocations/spawn.d.ts +1 -1
- package/dist/chat/agent-invocations/types.d.ts +296 -24
- package/dist/chat/app/conversation-work.d.ts +16 -8
- package/dist/chat/conversation-privacy.d.ts +7 -7
- package/dist/chat/conversations/destination.d.ts +12 -0
- package/dist/chat/conversations/location.d.ts +3 -8
- package/dist/chat/conversations/projection.d.ts +2 -2
- package/dist/chat/conversations/sql/location.d.ts +13 -4
- package/dist/chat/{api-turns → conversations}/stop.d.ts +2 -2
- package/dist/chat/conversations/store.d.ts +8 -11
- package/dist/chat/conversations/structured-events.d.ts +1 -1
- package/dist/chat/{api-turns/authorization.d.ts → conversations/web-authorization.d.ts} +1 -0
- package/dist/chat/conversations/web-input.d.ts +98 -0
- package/dist/chat/conversations/web-mailbox.d.ts +12 -0
- package/dist/chat/providers/slack/runtime.d.ts +1 -0
- package/dist/chat/providers/slack/system-turn.d.ts +8 -0
- package/dist/chat/resource-events/actor.d.ts +13 -12
- package/dist/chat/resource-events/notification.d.ts +1 -1
- package/dist/chat/services/guardian-action-policy.d.ts +1 -1
- package/dist/chat/services/turn-session-routing.d.ts +5 -5
- package/dist/chat/task-execution/assistant-message.d.ts +32 -0
- package/dist/chat/task-execution/conversation-turn.d.ts +8 -0
- package/dist/chat/{api-turns → task-execution}/mailbox-input.d.ts +1 -2
- package/dist/chat/task-execution/mailbox-turn.d.ts +42 -0
- package/dist/chat/task-execution/paused-turn.d.ts +1 -1
- package/dist/chat/task-execution/slack-work.d.ts +0 -2
- package/dist/{chunk-WL3R2KTS.js → chunk-4RHJ3CXR.js} +90 -289
- package/dist/{chunk-U6ZQHRIP.js → chunk-5CXCGDIL.js} +1 -1
- package/dist/{chunk-HXR3FHTE.js → chunk-5VWAY27R.js} +7 -3
- package/dist/{chunk-D3GDGREI.js → chunk-6AUR6PWR.js} +3 -3
- package/dist/{chunk-EIWYZXSM.js → chunk-7R5JRPCY.js} +8 -6
- package/dist/{chunk-WRDW3A3D.js → chunk-AC7MDOJW.js} +5 -7
- package/dist/{chunk-URZ7UD4P.js → chunk-BYBSI5TI.js} +2 -2
- package/dist/{chunk-MUPPP7A7.js → chunk-CMWIMFM6.js} +4 -182
- package/dist/{chunk-WKIS4VRK.js → chunk-CUYFCI4G.js} +70 -39
- package/dist/chunk-DA2KGZZI.js +13 -0
- package/dist/{chunk-Q6OCUQ7W.js → chunk-DYXVAO2E.js} +1 -1
- package/dist/{chunk-QH3I7ZOK.js → chunk-E3PDZPGV.js} +1 -1
- package/dist/{chunk-NU775DLU.js → chunk-GP32KD2J.js} +4 -12
- package/dist/{chunk-STF4GSK4.js → chunk-KN32OWL2.js} +5 -5
- package/dist/chunk-LHKZKAZ4.js +285 -0
- package/dist/{chunk-D5BWM37G.js → chunk-MFSET7Q7.js} +51 -341
- package/dist/{chunk-DUE4EUNL.js → chunk-MI6ZBDTS.js} +6 -6
- package/dist/{chunk-27T5HZHO.js → chunk-MRXMFB4L.js} +6 -87
- package/dist/{chunk-4A2R3AQB.js → chunk-MVPLEPSI.js} +1 -1
- package/dist/{chunk-7LRRVMPH.js → chunk-NY2F7BZA.js} +1 -1
- package/dist/chunk-O35GZCKL.js +311 -0
- package/dist/{chunk-U3KMII5Y.js → chunk-OEIITG5F.js} +1 -1
- package/dist/{chunk-6FKNNUSN.js → chunk-PCPSX4ES.js} +209 -7
- package/dist/{chunk-6YCIYOVA.js → chunk-PY3EIEAF.js} +1 -1
- package/dist/{chunk-U5POFCKM.js → chunk-QNIOBNOY.js} +284 -123
- package/dist/{chunk-JCRXXEMC.js → chunk-S3SGZUOI.js} +1 -1
- package/dist/chunk-SR6OMO5C.js +703 -0
- package/dist/{chunk-TQHCZXN7.js → chunk-UCWO5MKP.js} +7 -7
- package/dist/{chunk-ITLYUKGZ.js → chunk-VKQWU4PO.js} +2 -2
- package/dist/{chunk-JZPDYKRG.js → chunk-WDHPN2GH.js} +3 -3
- package/dist/{chunk-P2VU5JNH.js → chunk-WMUAKAIF.js} +42 -42
- package/dist/{chunk-NIKLTFBP.js → chunk-WN6VLHOU.js} +12 -5
- package/dist/{chunk-VC343WHM.js → chunk-WWYUYKKV.js} +1 -1
- package/dist/{chunk-OM4SFFJK.js → chunk-WYDF6PGK.js} +3 -3
- package/dist/{chunk-KRYJ5VOD.js → chunk-YNZPOFF3.js} +16 -21
- package/dist/{chunk-Z6OHCDXP.js → chunk-YYSEH2WC.js} +2 -2
- package/dist/{chunk-BITZUBPJ.js → chunk-YYZNESC3.js} +8 -8
- package/dist/{chunk-2VUDJGB6.js → chunk-ZUPDSJUE.js} +2 -5
- package/dist/{chunk-X5SXFVZT.js → chunk-ZV6PFUA4.js} +1 -1
- package/dist/cli/chat.js +34 -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/conversations.d.ts +62 -0
- package/dist/db/schema.d.ts +31 -0
- package/dist/{db-FBHAWVXU.js → db-LPJKR2EO.js} +6 -6
- package/dist/instrumentation.js +3 -3
- package/dist/nitro.js +6 -6
- package/dist/{oauth-callback-server-5HS5ULC6.js → oauth-callback-server-DMXF4TTQ.js} +30 -28
- package/dist/{runner-46W6NV6B.js → runner-L5DPVYCN.js} +24 -20
- package/dist/{skills-TG3QC4B6.js → skills-NXG3LBCK.js} +5 -5
- package/dist/spawn-VRUIGKWW.js +42 -0
- package/dist/task-runner-7YTBSPXW.js +36 -0
- package/dist/{validation-GMRIDBC5.js → validation-CH36LTOS.js} +5 -5
- package/dist/version.js +1 -1
- package/dist/{work-W4ULBJTU.js → work-HBC5Y5VZ.js} +22 -21
- package/dist/{worker-M6NVACS2.js → worker-5RDZHLXH.js} +10 -10
- package/migrations/0037_conversation_location.sql +23 -0
- package/migrations/meta/0037_snapshot.json +3192 -0
- package/migrations/meta/_journal.json +7 -0
- package/package.json +4 -4
- package/dist/chat/api-turns/assistant-message.d.ts +0 -12
- package/dist/chat/api-turns/cancellation.d.ts +0 -24
- package/dist/chat/api-turns/routing.d.ts +0 -51
- package/dist/chat/api-turns/work.d.ts +0 -99
- package/dist/chat/task-execution/slack-resource-event.d.ts +0 -47
- package/dist/chunk-4YD3DET6.js +0 -1503
- package/dist/chunk-6FGN7ZEG.js +0 -221
- package/dist/spawn-Y6YWBIJS.js +0 -41
- package/dist/task-runner-YSGBPN4U.js +0 -34
|
@@ -19,23 +19,23 @@ import {
|
|
|
19
19
|
releaseConversationWork,
|
|
20
20
|
requestAnotherSlice,
|
|
21
21
|
startConversationWork
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-WN6VLHOU.js";
|
|
23
|
+
import {
|
|
24
|
+
getTurnRequestDeadline
|
|
25
|
+
} from "./chunk-S3SGZUOI.js";
|
|
23
26
|
import {
|
|
24
27
|
ConversationQueueMessageRejectedError
|
|
25
28
|
} from "./chunk-JAL3CH4G.js";
|
|
26
|
-
import {
|
|
27
|
-
getTurnRequestDeadline
|
|
28
|
-
} from "./chunk-JCRXXEMC.js";
|
|
29
29
|
import {
|
|
30
30
|
getChatConfig,
|
|
31
31
|
isProviderRetryError
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-BYBSI5TI.js";
|
|
33
33
|
import {
|
|
34
34
|
logException,
|
|
35
35
|
logInfo,
|
|
36
36
|
logWarn,
|
|
37
37
|
withLogContext
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-PY3EIEAF.js";
|
|
39
39
|
|
|
40
40
|
// src/chat/task-execution/worker.ts
|
|
41
41
|
var CONVERSATION_WORK_DEFER_DELAY_MS = 15e3;
|
|
@@ -279,7 +279,7 @@ async function processConversationWorkInContext(message, options) {
|
|
|
279
279
|
let destination = initial.destination;
|
|
280
280
|
if (!destination && options.conversationStore) {
|
|
281
281
|
const stored = await options.conversationStore.get({ conversationId });
|
|
282
|
-
if (stored && !stored.
|
|
282
|
+
if (stored && !stored.parentConversationId) {
|
|
283
283
|
destination = stored.destination;
|
|
284
284
|
}
|
|
285
285
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getStateAdapter
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5CXCGDIL.js";
|
|
4
4
|
import {
|
|
5
5
|
getClient
|
|
6
6
|
} from "./chunk-PEQXYSSE.js";
|
|
7
7
|
|
|
8
|
-
// src/chat/
|
|
8
|
+
// src/chat/conversations/web-authorization.ts
|
|
9
9
|
import { randomUUID } from "crypto";
|
|
10
10
|
var WEB_AUTHORIZATION_PREFIX = "junior:web_authorization:v1";
|
|
11
11
|
var WEB_AUTHORIZATION_TTL_MS = 24 * 60 * 60 * 1e3;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
toOptionalTrimmed
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BYBSI5TI.js";
|
|
4
4
|
import {
|
|
5
5
|
pluginCatalogRuntime
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-E3PDZPGV.js";
|
|
7
7
|
import {
|
|
8
8
|
setSpanAttributes,
|
|
9
9
|
setSpanStatus
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-PY3EIEAF.js";
|
|
11
11
|
|
|
12
12
|
// src/chat/sandbox/paths.ts
|
|
13
13
|
function normalizeWorkspaceRoot(input) {
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
relayLocalOAuthCallback
|
|
3
3
|
} from "./chunk-FA6POGLH.js";
|
|
4
|
-
import {
|
|
5
|
-
buildSentryConversationUrl,
|
|
6
|
-
deleteWebAuthorization
|
|
7
|
-
} from "./chunk-ITLYUKGZ.js";
|
|
8
4
|
import {
|
|
9
5
|
AgentRunError,
|
|
10
6
|
executeTurn
|
|
11
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WYDF6PGK.js";
|
|
12
8
|
import {
|
|
13
9
|
buildDeliveredTurnStatePatch,
|
|
14
10
|
finalizeFailedTurnReplyWithEvent,
|
|
@@ -19,22 +15,26 @@ import {
|
|
|
19
15
|
getTurnUserSlackMessageTs,
|
|
20
16
|
persistAuthPauseTurnState,
|
|
21
17
|
requireTurnFailureEventId
|
|
22
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-7R5JRPCY.js";
|
|
23
19
|
import {
|
|
20
|
+
resolveTurnSessionRouting,
|
|
24
21
|
scheduleSessionCompletedPluginTasks
|
|
25
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-4RHJ3CXR.js";
|
|
26
23
|
import {
|
|
27
24
|
getTurnLifecycle
|
|
28
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-WWYUYKKV.js";
|
|
29
26
|
import {
|
|
30
27
|
coerceThreadConversationState,
|
|
31
28
|
configValueSchema,
|
|
32
29
|
getLocationConfigurationService,
|
|
33
30
|
getPersistedSandboxState,
|
|
34
31
|
getPersistedThreadState,
|
|
35
|
-
persistThreadStateById
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
persistThreadStateById
|
|
33
|
+
} from "./chunk-MRXMFB4L.js";
|
|
34
|
+
import {
|
|
35
|
+
buildSentryConversationUrl,
|
|
36
|
+
deleteWebAuthorization
|
|
37
|
+
} from "./chunk-VKQWU4PO.js";
|
|
38
38
|
import {
|
|
39
39
|
createUserTokenStore,
|
|
40
40
|
deleteMcpAuthSession,
|
|
@@ -44,8 +44,9 @@ import {
|
|
|
44
44
|
getMcpStoredOAuthCredentials,
|
|
45
45
|
lookupSlackUserProfile,
|
|
46
46
|
resolvePluginOAuthAccount
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-YYZNESC3.js";
|
|
48
48
|
import {
|
|
49
|
+
RetryableDeliveryError,
|
|
49
50
|
addReactionToMessage,
|
|
50
51
|
escapeSlackMrkdwnText,
|
|
51
52
|
formatProviderLabel,
|
|
@@ -57,20 +58,7 @@ import {
|
|
|
57
58
|
removeReactionFromMessage,
|
|
58
59
|
resolveBaseUrl,
|
|
59
60
|
truncateStatusText
|
|
60
|
-
} from "./chunk-
|
|
61
|
-
import {
|
|
62
|
-
parseSlackThreadId,
|
|
63
|
-
readSlackRawMessageContext,
|
|
64
|
-
resolveSlackChannelIdFromMessage,
|
|
65
|
-
resolveSlackChannelIdFromThreadId
|
|
66
|
-
} from "./chunk-4A2R3AQB.js";
|
|
67
|
-
import {
|
|
68
|
-
RetryableDeliveryError
|
|
69
|
-
} from "./chunk-6FGN7ZEG.js";
|
|
70
|
-
import {
|
|
71
|
-
ensureConversationWake,
|
|
72
|
-
requestConversationWork
|
|
73
|
-
} from "./chunk-NIKLTFBP.js";
|
|
61
|
+
} from "./chunk-PCPSX4ES.js";
|
|
74
62
|
import {
|
|
75
63
|
CooperativeTurnYieldError,
|
|
76
64
|
clearPendingAuth,
|
|
@@ -79,7 +67,7 @@ import {
|
|
|
79
67
|
isCooperativeTurnYieldError,
|
|
80
68
|
isPendingAuthLatestRequest,
|
|
81
69
|
markTurnFailed
|
|
82
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-GP32KD2J.js";
|
|
83
71
|
import {
|
|
84
72
|
TurnSliceLimitExceededError,
|
|
85
73
|
abandonTurnRecord,
|
|
@@ -99,13 +87,23 @@ import {
|
|
|
99
87
|
recordTurnSummary,
|
|
100
88
|
saveTurnCheckpoint,
|
|
101
89
|
turnHasReply
|
|
102
|
-
} from "./chunk-
|
|
90
|
+
} from "./chunk-MFSET7Q7.js";
|
|
103
91
|
import {
|
|
104
|
-
|
|
105
|
-
|
|
92
|
+
parseSlackThreadId,
|
|
93
|
+
readSlackRawMessageContext,
|
|
94
|
+
resolveSlackChannelIdFromMessage,
|
|
95
|
+
resolveSlackChannelIdFromThreadId
|
|
96
|
+
} from "./chunk-MVPLEPSI.js";
|
|
97
|
+
import {
|
|
98
|
+
ensureConversationWake,
|
|
99
|
+
requestConversationWork
|
|
100
|
+
} from "./chunk-WN6VLHOU.js";
|
|
106
101
|
import {
|
|
107
102
|
getTurnRequestDeadline
|
|
108
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-S3SGZUOI.js";
|
|
104
|
+
import {
|
|
105
|
+
getVercelConversationWorkQueue
|
|
106
|
+
} from "./chunk-DKIJ2RP5.js";
|
|
109
107
|
import {
|
|
110
108
|
SlackActionError,
|
|
111
109
|
getDashboardConversationLink,
|
|
@@ -114,38 +112,39 @@ import {
|
|
|
114
112
|
getSlackClient,
|
|
115
113
|
isDmChannel,
|
|
116
114
|
normalizeSlackConversationId
|
|
117
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-MI6ZBDTS.js";
|
|
118
116
|
import {
|
|
117
|
+
getConversationStore,
|
|
119
118
|
getSqlExecutor,
|
|
120
119
|
requireSlackDestination,
|
|
121
120
|
upsertIdentity,
|
|
122
121
|
upsertLinkedIdentity
|
|
123
|
-
} from "./chunk-
|
|
122
|
+
} from "./chunk-CUYFCI4G.js";
|
|
124
123
|
import {
|
|
125
124
|
acquireActiveLock,
|
|
126
125
|
getStateAdapter
|
|
127
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-5CXCGDIL.js";
|
|
128
127
|
import {
|
|
129
128
|
botConfig,
|
|
130
129
|
escapeXml,
|
|
131
130
|
getChatConfig,
|
|
132
131
|
getRuntimeMetadata,
|
|
133
132
|
normalizeSlackEmojiName
|
|
134
|
-
} from "./chunk-
|
|
133
|
+
} from "./chunk-BYBSI5TI.js";
|
|
135
134
|
import {
|
|
136
135
|
defaultModelId
|
|
137
136
|
} from "./chunk-D4YV5TDV.js";
|
|
138
137
|
import {
|
|
139
138
|
discoverSkills
|
|
140
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-YYSEH2WC.js";
|
|
141
140
|
import {
|
|
142
141
|
pluginCatalogRuntime
|
|
143
|
-
} from "./chunk-
|
|
142
|
+
} from "./chunk-E3PDZPGV.js";
|
|
144
143
|
import {
|
|
145
144
|
buildOAuthTokenRequest,
|
|
146
145
|
hasRequiredOAuthScope,
|
|
147
146
|
parseOAuthTokenResponse
|
|
148
|
-
} from "./chunk-
|
|
147
|
+
} from "./chunk-ZV6PFUA4.js";
|
|
149
148
|
import {
|
|
150
149
|
createSlackResumeActor,
|
|
151
150
|
isUserActor,
|
|
@@ -164,7 +163,7 @@ import {
|
|
|
164
163
|
setTags,
|
|
165
164
|
toOptionalString,
|
|
166
165
|
withLogContext
|
|
167
|
-
} from "./chunk-
|
|
166
|
+
} from "./chunk-PY3EIEAF.js";
|
|
168
167
|
|
|
169
168
|
// src/chat/slack/assistant-thread/status-render.ts
|
|
170
169
|
var DEFAULT_STATUS_CONTEXTS = {
|
|
@@ -1374,6 +1373,7 @@ async function resumeSlackTurnInContext(args) {
|
|
|
1374
1373
|
}
|
|
1375
1374
|
status.update(runArgs.initialStatus);
|
|
1376
1375
|
const conversationId = runArgs.conversationId;
|
|
1376
|
+
const visibility = (await getConversationStore().get({ conversationId }))?.visibility;
|
|
1377
1377
|
const visibleConversationId = lockKey;
|
|
1378
1378
|
const sessionId = runArgs.turnId;
|
|
1379
1379
|
let deliveryConversation;
|
|
@@ -1481,7 +1481,7 @@ async function resumeSlackTurnInContext(args) {
|
|
|
1481
1481
|
() => recordTurnSummary({
|
|
1482
1482
|
conversationId: runArgs.conversationId,
|
|
1483
1483
|
destination: savedRun.destination,
|
|
1484
|
-
destinationVisibility:
|
|
1484
|
+
destinationVisibility: visibility,
|
|
1485
1485
|
dispatchId,
|
|
1486
1486
|
resultMessageId: messageTs,
|
|
1487
1487
|
turnId: runArgs.turnId,
|
|
@@ -1537,7 +1537,7 @@ async function resumeSlackTurnInContext(args) {
|
|
|
1537
1537
|
durationMs: reply.diagnostics.durationMs,
|
|
1538
1538
|
usage: reply.diagnostics.usage,
|
|
1539
1539
|
destination: run.destination,
|
|
1540
|
-
destinationVisibility:
|
|
1540
|
+
destinationVisibility: visibility,
|
|
1541
1541
|
dispatchId: run.dispatch?.id,
|
|
1542
1542
|
dispatchOutcome: reply.diagnostics.outcome === "success" ? "completed" : "failed",
|
|
1543
1543
|
...dispatchErrorMessage ? { errorMessage: dispatchErrorMessage } : void 0,
|
|
@@ -1551,7 +1551,7 @@ async function resumeSlackTurnInContext(args) {
|
|
|
1551
1551
|
await recordTurnSummary({
|
|
1552
1552
|
conversationId: runArgs.conversationId,
|
|
1553
1553
|
destination: run.destination,
|
|
1554
|
-
destinationVisibility:
|
|
1554
|
+
destinationVisibility: visibility,
|
|
1555
1555
|
dispatchId: run.dispatch?.id,
|
|
1556
1556
|
dispatchOutcome: reply.diagnostics.outcome === "success" ? "completed" : "failed",
|
|
1557
1557
|
...acceptedDeliveryId ? { resultMessageId: acceptedDeliveryId } : void 0,
|
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
getConversationStore,
|
|
9
9
|
parseDestination,
|
|
10
10
|
sameDestination
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-CUYFCI4G.js";
|
|
12
12
|
import {
|
|
13
13
|
getDefaultRedisStateAdapterFor,
|
|
14
14
|
getStateAdapter
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-5CXCGDIL.js";
|
|
16
16
|
import {
|
|
17
17
|
getChatConfig
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-BYBSI5TI.js";
|
|
19
19
|
import {
|
|
20
20
|
parseStoredSlackActor
|
|
21
21
|
} from "./chunk-N7TMSOZH.js";
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
isRecord,
|
|
24
24
|
toOptionalNumber,
|
|
25
25
|
toOptionalString
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-PY3EIEAF.js";
|
|
27
27
|
|
|
28
28
|
// src/chat/task-execution/state.ts
|
|
29
29
|
import { randomUUID } from "crypto";
|
|
@@ -730,7 +730,14 @@ async function appendInboundMessageWithAdmission(args) {
|
|
|
730
730
|
if (args.exclusive && hasRunnableWork(current)) {
|
|
731
731
|
return { status: "active" };
|
|
732
732
|
}
|
|
733
|
-
|
|
733
|
+
let status;
|
|
734
|
+
if (current.execution.lease) {
|
|
735
|
+
status = current.execution.status === "running" ? "running" : "paused";
|
|
736
|
+
} else if (current.execution.status === "paused" && args.message.delivery === "defer") {
|
|
737
|
+
status = "paused";
|
|
738
|
+
} else {
|
|
739
|
+
status = "pending";
|
|
740
|
+
}
|
|
734
741
|
const next = {
|
|
735
742
|
...current,
|
|
736
743
|
destination: current.destination ?? args.message.destination,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ConversationTurnLifecycleService
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WWYUYKKV.js";
|
|
4
4
|
import {
|
|
5
5
|
runAgentWithTimeout
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-PCPSX4ES.js";
|
|
7
7
|
import {
|
|
8
8
|
getConversationEventStore
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-CUYFCI4G.js";
|
|
10
10
|
|
|
11
11
|
// src/chat/runtime/turn-execution.ts
|
|
12
12
|
var AgentRunError = class extends Error {
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentRunError,
|
|
3
3
|
executeTurn
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WYDF6PGK.js";
|
|
5
5
|
import {
|
|
6
6
|
ConversationTurnLifecycleService
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WWYUYKKV.js";
|
|
8
8
|
import {
|
|
9
9
|
getPersistedSandboxState,
|
|
10
10
|
getPersistedThreadState,
|
|
11
|
-
persistThreadStateById
|
|
12
|
-
|
|
13
|
-
} from "./chunk-27T5HZHO.js";
|
|
11
|
+
persistThreadStateById
|
|
12
|
+
} from "./chunk-MRXMFB4L.js";
|
|
14
13
|
import {
|
|
15
14
|
AgentInvocationBusyError,
|
|
16
15
|
AgentInvocationLimitError,
|
|
@@ -19,32 +18,32 @@ import {
|
|
|
19
18
|
agentBindingSchema,
|
|
20
19
|
agentInvocationSchema,
|
|
21
20
|
createAgentInvocationSchema
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import {
|
|
24
|
-
appendAndEnqueueInboundMessage
|
|
25
|
-
} from "./chunk-NIKLTFBP.js";
|
|
21
|
+
} from "./chunk-AC7MDOJW.js";
|
|
26
22
|
import {
|
|
27
23
|
TurnInputCommitLostError,
|
|
28
24
|
getAssistantReplyText,
|
|
29
25
|
getConversationTurnBoundaryError,
|
|
30
26
|
isTurnInputCommitLostError
|
|
31
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-GP32KD2J.js";
|
|
32
28
|
import {
|
|
33
29
|
failTurnRecord,
|
|
34
30
|
getTerminalAssistantMessages,
|
|
35
31
|
getTurnRecord,
|
|
36
32
|
openConversationProjection,
|
|
37
33
|
saveTurnCheckpoint
|
|
38
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-MFSET7Q7.js";
|
|
35
|
+
import {
|
|
36
|
+
appendAndEnqueueInboundMessage
|
|
37
|
+
} from "./chunk-WN6VLHOU.js";
|
|
39
38
|
import {
|
|
40
39
|
getConversationEventStore,
|
|
41
40
|
getConversationStore,
|
|
42
41
|
getSqlExecutor
|
|
43
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-CUYFCI4G.js";
|
|
44
43
|
import {
|
|
45
44
|
juniorAgentBindings,
|
|
46
45
|
juniorAgentInvocations
|
|
47
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-5VWAY27R.js";
|
|
48
47
|
|
|
49
48
|
// src/chat/agent-invocations/work.ts
|
|
50
49
|
import { z } from "zod";
|
|
@@ -98,7 +97,6 @@ function invocationFromRow(row) {
|
|
|
98
97
|
createdAtMs: row.createdAt.getTime(),
|
|
99
98
|
...row.credentialContext ? { credentialContext: row.credentialContext } : void 0,
|
|
100
99
|
destination: row.destination,
|
|
101
|
-
...row.destinationVisibility ? { destinationVisibility: row.destinationVisibility } : void 0,
|
|
102
100
|
...row.errorMessage !== null ? { errorMessage: row.errorMessage } : void 0,
|
|
103
101
|
input: row.input,
|
|
104
102
|
invocationId: row.invocationId,
|
|
@@ -113,7 +111,7 @@ function invocationFromRow(row) {
|
|
|
113
111
|
});
|
|
114
112
|
}
|
|
115
113
|
function sameCreateInput(invocation, input) {
|
|
116
|
-
return invocation.parentConversationId === input.parentConversationId && invocation.agentName === input.agentName && invocation.input === input.input && invocation.reasoningLevel === input.reasoningLevel && JSON.stringify(invocation.actor) === JSON.stringify(input.actor) && JSON.stringify(invocation.credentialContext) === JSON.stringify(input.credentialContext) && JSON.stringify(invocation.destination) === JSON.stringify(input.destination) &&
|
|
114
|
+
return invocation.parentConversationId === input.parentConversationId && invocation.agentName === input.agentName && invocation.input === input.input && invocation.reasoningLevel === input.reasoningLevel && JSON.stringify(invocation.actor) === JSON.stringify(input.actor) && JSON.stringify(invocation.credentialContext) === JSON.stringify(input.credentialContext) && JSON.stringify(invocation.destination) === JSON.stringify(input.destination) && JSON.stringify(invocation.source) === JSON.stringify(input.source);
|
|
117
115
|
}
|
|
118
116
|
async function getAgentBinding(args) {
|
|
119
117
|
const rows = await getSqlExecutor().db().select().from(juniorAgentBindings).where(
|
|
@@ -227,7 +225,6 @@ async function createAgentInvocation(rawInput, nowMs = Date.now()) {
|
|
|
227
225
|
credentialContext: input.credentialContext ?? null,
|
|
228
226
|
source: input.source,
|
|
229
227
|
destination: input.destination,
|
|
230
|
-
destinationVisibility: input.destinationVisibility ?? null,
|
|
231
228
|
reasoningLevel: input.reasoningLevel ?? null,
|
|
232
229
|
status: "pending",
|
|
233
230
|
mailboxStatus: "pending",
|
|
@@ -459,7 +456,6 @@ async function saveAgentInvocationResult(args) {
|
|
|
459
456
|
durationMs: args.result.diagnostics.durationMs,
|
|
460
457
|
usage: args.result.diagnostics.usage,
|
|
461
458
|
destination: args.invocation.destination,
|
|
462
|
-
destinationVisibility: args.invocation.destinationVisibility,
|
|
463
459
|
...failed ? {
|
|
464
460
|
errorMessage: args.result.diagnostics.errorMessage ?? "Agent invocation failed"
|
|
465
461
|
} : void 0,
|
|
@@ -558,8 +554,8 @@ function createAgentInvocationWorker(agentRunner) {
|
|
|
558
554
|
]);
|
|
559
555
|
sandboxRef = getPersistedSandboxState(persisted);
|
|
560
556
|
history = projection.messages;
|
|
561
|
-
location = (await
|
|
562
|
-
conversationId: invocation.
|
|
557
|
+
location = (await getConversationStore().get({
|
|
558
|
+
conversationId: invocation.parentConversationId
|
|
563
559
|
}))?.location;
|
|
564
560
|
} catch (error) {
|
|
565
561
|
if (isInvocationInputCommitLost(error)) {
|
|
@@ -594,10 +590,9 @@ function createAgentInvocationWorker(agentRunner) {
|
|
|
594
590
|
actor: invocation.actor,
|
|
595
591
|
credentialContext: invocation.credentialContext,
|
|
596
592
|
destination: invocation.destination,
|
|
597
|
-
...location ? { location } : void 0,
|
|
598
|
-
destinationVisibility: invocation.destinationVisibility,
|
|
599
593
|
publishExternally: context.publishExternally,
|
|
600
594
|
source: invocation.source,
|
|
595
|
+
...location ? { location } : void 0,
|
|
601
596
|
surface: "internal",
|
|
602
597
|
// TODO(dcramer): Issues #881 and #883 track a path for child runs to
|
|
603
598
|
// force interactive auth when a delegated tool requires credentials
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pluginCatalogRuntime
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-E3PDZPGV.js";
|
|
4
4
|
import {
|
|
5
5
|
skillRoots
|
|
6
6
|
} from "./chunk-TXKUKMVO.js";
|
|
7
7
|
import {
|
|
8
8
|
logWarn
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PY3EIEAF.js";
|
|
10
10
|
|
|
11
11
|
// src/chat/skills.ts
|
|
12
12
|
import fs from "fs/promises";
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveBaseUrl
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PCPSX4ES.js";
|
|
4
4
|
import {
|
|
5
5
|
createPluginLogger,
|
|
6
6
|
getPlugins,
|
|
7
7
|
getSlackClient,
|
|
8
8
|
withSlackRetries
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MI6ZBDTS.js";
|
|
10
10
|
import {
|
|
11
11
|
getDb,
|
|
12
12
|
parseDestination
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-CUYFCI4G.js";
|
|
14
14
|
import {
|
|
15
15
|
sleep
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-WDHPN2GH.js";
|
|
17
17
|
import {
|
|
18
18
|
acquireActiveLock,
|
|
19
19
|
getStateAdapter
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-5CXCGDIL.js";
|
|
21
21
|
import {
|
|
22
22
|
pluginCatalogRuntime
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-E3PDZPGV.js";
|
|
24
24
|
import {
|
|
25
25
|
fetchWithBoundedOAuthErrorBodies
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-ZV6PFUA4.js";
|
|
27
27
|
import {
|
|
28
28
|
isRecord
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-PY3EIEAF.js";
|
|
30
30
|
|
|
31
31
|
// src/chat/capabilities/router.ts
|
|
32
32
|
var ProviderCredentialRouter = class {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createAndEnqueueAgentInvocation
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YNZPOFF3.js";
|
|
4
4
|
import {
|
|
5
5
|
actorFromRun,
|
|
6
6
|
toolInvocationDestination
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-PCPSX4ES.js";
|
|
8
8
|
|
|
9
9
|
// src/chat/agent-invocations/spawn.ts
|
|
10
10
|
function bindSpawnAgent(run, options) {
|
|
@@ -21,9 +21,6 @@ function bindSpawnAgent(run, options) {
|
|
|
21
21
|
...input.name ? { agentName: input.name } : void 0,
|
|
22
22
|
...run.credentialContext ? { credentialContext: run.credentialContext } : void 0,
|
|
23
23
|
destination: toolInvocationDestination(run),
|
|
24
|
-
...run.destinationVisibility ? {
|
|
25
|
-
destinationVisibility: run.destinationVisibility
|
|
26
|
-
} : void 0,
|
|
27
24
|
idempotencyKey: `${run.turnId}:${call.toolCallId}`,
|
|
28
25
|
input: input.task,
|
|
29
26
|
parentConversationId: run.conversationId,
|
package/dist/cli/chat.js
CHANGED
|
@@ -1,52 +1,53 @@
|
|
|
1
1
|
import {
|
|
2
2
|
executeAgentRun
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-QNIOBNOY.js";
|
|
4
|
+
import "../chunk-AC7MDOJW.js";
|
|
5
5
|
import "../chunk-6Y5B5PEX.js";
|
|
6
6
|
import "../chunk-DIB4GX3G.js";
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-6FKNNUSN.js";
|
|
9
|
-
import "../chunk-MUPPP7A7.js";
|
|
10
|
-
import "../chunk-4A2R3AQB.js";
|
|
7
|
+
import "../chunk-YYZNESC3.js";
|
|
11
8
|
import {
|
|
12
9
|
createAgentRunner
|
|
13
|
-
} from "../chunk-
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-D5BWM37G.js";
|
|
10
|
+
} from "../chunk-PCPSX4ES.js";
|
|
11
|
+
import "../chunk-GP32KD2J.js";
|
|
12
|
+
import "../chunk-MFSET7Q7.js";
|
|
17
13
|
import "../chunk-2LYHWMR4.js";
|
|
18
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-CMWIMFM6.js";
|
|
15
|
+
import "../chunk-MVPLEPSI.js";
|
|
16
|
+
import "../chunk-WN6VLHOU.js";
|
|
17
|
+
import "../chunk-DA2KGZZI.js";
|
|
18
|
+
import "../chunk-O35GZCKL.js";
|
|
19
|
+
import "../chunk-6AUR6PWR.js";
|
|
19
20
|
import "../chunk-PDO5BLNM.js";
|
|
20
21
|
import "../chunk-UIE3R5XU.js";
|
|
21
22
|
import "../chunk-X6GDDWQH.js";
|
|
23
|
+
import "../chunk-S3SGZUOI.js";
|
|
22
24
|
import "../chunk-DKIJ2RP5.js";
|
|
23
25
|
import "../chunk-JAL3CH4G.js";
|
|
24
26
|
import "../chunk-7H2VZTWN.js";
|
|
25
|
-
import "../chunk-JCRXXEMC.js";
|
|
26
27
|
import {
|
|
27
28
|
loadAppPluginSet
|
|
28
29
|
} from "../chunk-Y2CM7HXH.js";
|
|
29
|
-
import "../chunk-
|
|
30
|
+
import "../chunk-MI6ZBDTS.js";
|
|
30
31
|
import "../chunk-3Y47VMHV.js";
|
|
31
|
-
import "../chunk-
|
|
32
|
-
import "../chunk-
|
|
33
|
-
import "../chunk-
|
|
34
|
-
import "../chunk-
|
|
32
|
+
import "../chunk-CUYFCI4G.js";
|
|
33
|
+
import "../chunk-5VWAY27R.js";
|
|
34
|
+
import "../chunk-WDHPN2GH.js";
|
|
35
|
+
import "../chunk-5CXCGDIL.js";
|
|
35
36
|
import "../chunk-GFBR4S3Q.js";
|
|
36
37
|
import "../chunk-VFUK3X5B.js";
|
|
37
|
-
import "../chunk-
|
|
38
|
+
import "../chunk-BYBSI5TI.js";
|
|
38
39
|
import "../chunk-D4YV5TDV.js";
|
|
39
|
-
import "../chunk-
|
|
40
|
-
import "../chunk-
|
|
41
|
-
import "../chunk-
|
|
42
|
-
import "../chunk-
|
|
40
|
+
import "../chunk-DYXVAO2E.js";
|
|
41
|
+
import "../chunk-YYSEH2WC.js";
|
|
42
|
+
import "../chunk-E3PDZPGV.js";
|
|
43
|
+
import "../chunk-ZV6PFUA4.js";
|
|
43
44
|
import "../chunk-CEMMLV5L.js";
|
|
44
45
|
import "../chunk-N7TMSOZH.js";
|
|
45
46
|
import "../chunk-DWPN6SCH.js";
|
|
46
47
|
import "../chunk-TXKUKMVO.js";
|
|
47
|
-
import "../chunk-
|
|
48
|
+
import "../chunk-PY3EIEAF.js";
|
|
48
49
|
import "../chunk-PEQXYSSE.js";
|
|
49
|
-
import "../chunk-
|
|
50
|
+
import "../chunk-NY2F7BZA.js";
|
|
50
51
|
|
|
51
52
|
// src/cli/chat.ts
|
|
52
53
|
import {
|
|
@@ -168,10 +169,10 @@ async function configureLocalChatPlugins(pluginSet) {
|
|
|
168
169
|
databaseModule
|
|
169
170
|
] = await Promise.all([
|
|
170
171
|
import("../plugins-YTYJMMJF.js"),
|
|
171
|
-
import("../agent-hooks-
|
|
172
|
-
import("../catalog-runtime-
|
|
173
|
-
import("../validation-
|
|
174
|
-
import("../db-
|
|
172
|
+
import("../agent-hooks-6QRYH6PX.js"),
|
|
173
|
+
import("../catalog-runtime-IETJLJFG.js"),
|
|
174
|
+
import("../validation-CH36LTOS.js"),
|
|
175
|
+
import("../db-LPJKR2EO.js")
|
|
175
176
|
]);
|
|
176
177
|
const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
|
|
177
178
|
const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
|
|
@@ -237,14 +238,14 @@ async function prepareLocalChatRun(io, pluginSet) {
|
|
|
237
238
|
await configureLocalChatPlugins(pluginSet);
|
|
238
239
|
const { setExperimentalFeatures } = await import("../experimental-P5FZM4CU.js");
|
|
239
240
|
setExperimentalFeatures({ subagents: true });
|
|
240
|
-
const { runLocalAgentTurn } = await import("../runner-
|
|
241
|
-
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-
|
|
241
|
+
const { runLocalAgentTurn } = await import("../runner-L5DPVYCN.js");
|
|
242
|
+
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-DMXF4TTQ.js");
|
|
242
243
|
const { createLocalOAuthState } = await import("../oauth-relay-5XPVRPYB.js");
|
|
243
244
|
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-FIL7EGPR.js");
|
|
244
|
-
const { bindSpawnAgent } = await import("../spawn-
|
|
245
|
-
const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-
|
|
245
|
+
const { bindSpawnAgent } = await import("../spawn-VRUIGKWW.js");
|
|
246
|
+
const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-HBC5Y5VZ.js");
|
|
246
247
|
const { createLocalConversationWork } = await import("../conversation-work-VIOQ5ZF3.js");
|
|
247
|
-
const { processConversationWork } = await import("../worker-
|
|
248
|
+
const { processConversationWork } = await import("../worker-5RDZHLXH.js");
|
|
248
249
|
let agentRunner;
|
|
249
250
|
const localConversationWork = createLocalConversationWork(async (message) => {
|
|
250
251
|
if (!agentRunner) {
|