@sentry/junior 0.149.0 → 0.150.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-CWMCXAMT.js → agent-hooks-SEOGOGKX.js} +10 -10
- package/dist/api.d.ts +1 -1
- package/dist/api.js +25 -23
- package/dist/app.js +92 -85
- package/dist/{catalog-runtime-GAW5APVI.js → catalog-runtime-HA7RIWYT.js} +5 -5
- package/dist/chat/agent/index.d.ts +5 -4
- package/dist/chat/agent/prompt.d.ts +8 -5
- package/dist/chat/agent/resume.d.ts +2 -2
- package/dist/chat/agent/tools.d.ts +4 -7
- package/dist/chat/agent/{request.d.ts → types.d.ts} +138 -129
- package/dist/chat/agent-dispatch/types.d.ts +2 -2
- package/dist/chat/agent-invocations/spawn.d.ts +2 -2
- package/dist/chat/plugins/viewer.d.ts +4 -0
- package/dist/chat/runtime/agent-runner.d.ts +7 -5
- package/dist/chat/runtime/slack-resume.d.ts +3 -3
- package/dist/chat/task-execution/paused-turn.d.ts +2 -2
- package/dist/chat/tools/types.d.ts +1 -1
- package/dist/{chunk-QIW7OQEO.js → chunk-3GL327SC.js} +1 -1
- package/dist/{chunk-32CXPIZE.js → chunk-3ZMKDHCT.js} +2 -2
- package/dist/{chunk-EXW76GW4.js → chunk-4KAYAIBV.js} +1 -1
- package/dist/{chunk-75DSYFFB.js → chunk-4VH7KLGC.js} +100 -107
- package/dist/{chunk-SWHPVZBV.js → chunk-64K7GKRW.js} +2 -2
- package/dist/{chunk-25SC7D6Z.js → chunk-6PFDWAK2.js} +1 -1
- package/dist/{chunk-ART7P442.js → chunk-7D4GNUV2.js} +3 -3
- package/dist/{chunk-5CWUQXXT.js → chunk-7GOP6VFJ.js} +20 -24
- package/dist/{chunk-X22XXSZA.js → chunk-7NLW2NF5.js} +1 -1
- package/dist/{chunk-ZYMYLLWG.js → chunk-7QB2CKCW.js} +1 -1
- package/dist/{chunk-JMH3DBM5.js → chunk-DWETNV66.js} +6 -6
- package/dist/{chunk-3I2IVWSZ.js → chunk-F5NMSEBL.js} +1 -1
- package/dist/{chunk-4YKPOYRV.js → chunk-FEFEIA3Z.js} +5 -5
- package/dist/{chunk-MEMURSBG.js → chunk-H2RLIJ7G.js} +1 -1
- package/dist/{chunk-3GYZ5YEH.js → chunk-ILYL6YFD.js} +3 -3
- package/dist/{chunk-EW2LNCRL.js → chunk-IPGNWXA3.js} +4 -4
- package/dist/{chunk-6G5RCDKP.js → chunk-IZRSLANA.js} +1 -1
- package/dist/{chunk-RLVZIWNQ.js → chunk-JQXJ2E53.js} +1 -1
- package/dist/{chunk-JMSMXXED.js → chunk-M5OZSVJI.js} +4 -4
- package/dist/{chunk-RB26T3LU.js → chunk-MCNP7A7T.js} +8 -8
- package/dist/{chunk-W7UONUIZ.js → chunk-NCGVQXX5.js} +22 -26
- package/dist/{chunk-4JGM7FXO.js → chunk-NNOCRVQO.js} +2 -2
- package/dist/{chunk-URDCZAL4.js → chunk-P43QM7JY.js} +5 -5
- package/dist/{chunk-XPYWWMHR.js → chunk-QPIPYVGE.js} +5 -5
- package/dist/{chunk-GDFF3BQG.js → chunk-RF6J3DIO.js} +34 -36
- package/dist/{chunk-TFBNBXPU.js → chunk-SH6ZKJFZ.js} +4 -4
- package/dist/{chunk-3KGQOKIG.js → chunk-SHDREBGC.js} +1 -1
- package/dist/{chunk-DK5UT6PQ.js → chunk-TZLYAO2J.js} +185 -126
- package/dist/{chunk-UZGASGOD.js → chunk-UIMBNY6O.js} +9 -9
- package/dist/{chunk-7BH46NB4.js → chunk-UOFQEVR5.js} +15 -6
- package/dist/{chunk-ALJG73MQ.js → chunk-Y2VZ54CQ.js} +12 -12
- package/dist/{chunk-2P6BQQER.js → chunk-ZBOGYZ53.js} +4 -4
- package/dist/{chunk-2JHKISQA.js → chunk-ZUQT35YC.js} +1 -1
- package/dist/cli/chat.js +31 -31
- package/dist/cli/check.js +6 -6
- package/dist/cli/plugins.js +13 -13
- package/dist/cli/snapshot-create.js +9 -9
- package/dist/cli/upgrade.js +7 -7
- package/dist/{db-JBZLRIVY.js → db-HUW75QG7.js} +7 -7
- package/dist/instrumentation.js +4 -4
- package/dist/nitro.js +2 -2
- package/dist/{oauth-callback-server-MNTVYY2I.js → oauth-callback-server-DP7NIZPQ.js} +24 -24
- package/dist/{runner-K24BWZSZ.js → runner-AINV7K3M.js} +40 -37
- package/dist/{skills-AU5ST2CG.js → skills-PKS37E6B.js} +6 -6
- package/dist/spawn-NJCDEPPL.js +38 -0
- package/dist/{validation-IXGZCFRO.js → validation-PDC3MVMM.js} +6 -6
- package/dist/version.js +1 -1
- package/dist/{work-WCZIYILX.js → work-KJLJRPXS.js} +17 -17
- package/dist/{worker-U2AACBEY.js → worker-TYQ7YVIR.js} +11 -11
- package/package.json +4 -4
- package/dist/spawn-6PO7CVJ6.js +0 -38
|
@@ -11,21 +11,21 @@ import {
|
|
|
11
11
|
getPlugins,
|
|
12
12
|
setPlugins,
|
|
13
13
|
validatePlugins
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-UOFQEVR5.js";
|
|
15
|
+
import "./chunk-64K7GKRW.js";
|
|
16
|
+
import "./chunk-ILYL6YFD.js";
|
|
17
|
+
import "./chunk-F5NMSEBL.js";
|
|
18
18
|
import "./chunk-EM225ITJ.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-6PFDWAK2.js";
|
|
20
|
+
import "./chunk-3ZMKDHCT.js";
|
|
21
21
|
import "./chunk-VFUK3X5B.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-SHDREBGC.js";
|
|
23
23
|
import "./chunk-HZF5P5UN.js";
|
|
24
24
|
import "./chunk-F3B2YJ76.js";
|
|
25
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-JQXJ2E53.js";
|
|
26
26
|
import "./chunk-6GWA276C.js";
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-IZRSLANA.js";
|
|
28
|
+
import "./chunk-7QB2CKCW.js";
|
|
29
29
|
import "./chunk-MLKGABMK.js";
|
|
30
30
|
export {
|
|
31
31
|
PluginHookDeniedError,
|
package/dist/api.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { Hono } from "hono";
|
|
|
2
2
|
import { jsonResponse } from "./api/http";
|
|
3
3
|
import type { JuniorApiEnv, JuniorApiVariables } from "./api/route";
|
|
4
4
|
export { authenticatePersonalToken } from "./personal-tokens/store";
|
|
5
|
-
export { resolveViewerUser } from "./chat/plugins/viewer";
|
|
5
|
+
export { resolveViewerUser, updateViewerDisplayName, } from "./chat/plugins/viewer";
|
|
6
6
|
export type { JuniorApiVariables };
|
|
7
7
|
export { jsonResponse };
|
|
8
8
|
/** Create Junior's production REST API for authenticated dashboard consumers. */
|
package/dist/api.js
CHANGED
|
@@ -41,13 +41,13 @@ import {
|
|
|
41
41
|
readHealthReport,
|
|
42
42
|
resolveSlackConversationContextFromThreadId,
|
|
43
43
|
webActorFromEmail
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-7GOP6VFJ.js";
|
|
45
45
|
import {
|
|
46
46
|
buildSentryConversationUrl
|
|
47
47
|
} from "./chunk-4CODA7P5.js";
|
|
48
48
|
import {
|
|
49
49
|
getConversation
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-M5OZSVJI.js";
|
|
51
51
|
import {
|
|
52
52
|
readTaskExecutionByConversationId,
|
|
53
53
|
readTaskExecutionDays,
|
|
@@ -55,8 +55,8 @@ import {
|
|
|
55
55
|
readTaskExecutionSummaries,
|
|
56
56
|
readTaskExecutions,
|
|
57
57
|
readTaskRuns
|
|
58
|
-
} from "./chunk-
|
|
59
|
-
import "./chunk-
|
|
58
|
+
} from "./chunk-UIMBNY6O.js";
|
|
59
|
+
import "./chunk-FEFEIA3Z.js";
|
|
60
60
|
import {
|
|
61
61
|
healthReportSchema,
|
|
62
62
|
pluginOperationalReportFeedSchema,
|
|
@@ -80,16 +80,16 @@ import {
|
|
|
80
80
|
listPublicEventTasksForTeams,
|
|
81
81
|
listPublicScheduledTasksForTeams,
|
|
82
82
|
readStats
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-P43QM7JY.js";
|
|
84
84
|
import {
|
|
85
85
|
parseSlackThreadId
|
|
86
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-H2RLIJ7G.js";
|
|
87
87
|
import {
|
|
88
88
|
agentTurnUsageSchema,
|
|
89
89
|
fallbackShortTitle,
|
|
90
90
|
hasAgentTurnUsage,
|
|
91
91
|
renderJuniorNativeConversationEvent
|
|
92
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-IPGNWXA3.js";
|
|
93
93
|
import "./chunk-3Y47VMHV.js";
|
|
94
94
|
import "./chunk-PDO5BLNM.js";
|
|
95
95
|
import {
|
|
@@ -97,12 +97,13 @@ import {
|
|
|
97
97
|
getPlugins,
|
|
98
98
|
listConversationAnnotations,
|
|
99
99
|
renderPluginConversationEvent,
|
|
100
|
-
resolveViewerUser
|
|
101
|
-
|
|
100
|
+
resolveViewerUser,
|
|
101
|
+
updateViewerDisplayName
|
|
102
|
+
} from "./chunk-UOFQEVR5.js";
|
|
102
103
|
import {
|
|
103
104
|
getSlackClient,
|
|
104
105
|
withSlackRetries
|
|
105
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-64K7GKRW.js";
|
|
106
107
|
import {
|
|
107
108
|
decodeStoredConversationEvent,
|
|
108
109
|
getConversationStore,
|
|
@@ -110,23 +111,23 @@ import {
|
|
|
110
111
|
getSqlExecutor,
|
|
111
112
|
locationFromRow,
|
|
112
113
|
parseSessionSource
|
|
113
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-ILYL6YFD.js";
|
|
114
115
|
import {
|
|
115
116
|
juniorApiTokens,
|
|
116
117
|
juniorConversationEvents,
|
|
117
118
|
juniorConversations,
|
|
118
119
|
juniorIdentities,
|
|
119
120
|
juniorUsers
|
|
120
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-F5NMSEBL.js";
|
|
121
122
|
import "./chunk-EM225ITJ.js";
|
|
122
|
-
import "./chunk-
|
|
123
|
-
import "./chunk-
|
|
123
|
+
import "./chunk-6PFDWAK2.js";
|
|
124
|
+
import "./chunk-3ZMKDHCT.js";
|
|
124
125
|
import {
|
|
125
126
|
juniorDestinations
|
|
126
127
|
} from "./chunk-VFUK3X5B.js";
|
|
127
128
|
import {
|
|
128
129
|
canExposeConversationPayload
|
|
129
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-SHDREBGC.js";
|
|
130
131
|
import "./chunk-RUIXF3YQ.js";
|
|
131
132
|
import "./chunk-HZF5P5UN.js";
|
|
132
133
|
import {
|
|
@@ -136,10 +137,10 @@ import {
|
|
|
136
137
|
} from "./chunk-F3B2YJ76.js";
|
|
137
138
|
import {
|
|
138
139
|
logException
|
|
139
|
-
} from "./chunk-
|
|
140
|
+
} from "./chunk-JQXJ2E53.js";
|
|
140
141
|
import "./chunk-6GWA276C.js";
|
|
141
|
-
import "./chunk-
|
|
142
|
-
import "./chunk-
|
|
142
|
+
import "./chunk-IZRSLANA.js";
|
|
143
|
+
import "./chunk-7QB2CKCW.js";
|
|
143
144
|
import "./chunk-MLKGABMK.js";
|
|
144
145
|
|
|
145
146
|
// src/api.ts
|
|
@@ -4309,7 +4310,7 @@ function readDescriptionText(home) {
|
|
|
4309
4310
|
}
|
|
4310
4311
|
}
|
|
4311
4312
|
async function readSkillReports() {
|
|
4312
|
-
const { discoverSkills } = await import("./skills-
|
|
4313
|
+
const { discoverSkills } = await import("./skills-PKS37E6B.js");
|
|
4313
4314
|
const skills = await discoverSkills();
|
|
4314
4315
|
return skillReportsSchema.parse(
|
|
4315
4316
|
skills.map((skill) => ({
|
|
@@ -4319,7 +4320,7 @@ async function readSkillReports() {
|
|
|
4319
4320
|
);
|
|
4320
4321
|
}
|
|
4321
4322
|
async function readPlugins() {
|
|
4322
|
-
const { pluginCatalogRuntime } = await import("./catalog-runtime-
|
|
4323
|
+
const { pluginCatalogRuntime } = await import("./catalog-runtime-HA7RIWYT.js");
|
|
4323
4324
|
return pluginsSchema.parse(
|
|
4324
4325
|
pluginCatalogRuntime.getProviders().map((plugin) => ({
|
|
4325
4326
|
configKeys: plugin.manifest.configKeys ?? [],
|
|
@@ -4332,7 +4333,7 @@ async function readPlugins() {
|
|
|
4332
4333
|
async function readRuntimeInfoReport() {
|
|
4333
4334
|
const [{ homeDir }, { pluginCatalogRuntime }, plugins, skills] = await Promise.all([
|
|
4334
4335
|
import("./discovery-GUFTFBTL.js"),
|
|
4335
|
-
import("./catalog-runtime-
|
|
4336
|
+
import("./catalog-runtime-HA7RIWYT.js"),
|
|
4336
4337
|
readPlugins(),
|
|
4337
4338
|
readSkillReports()
|
|
4338
4339
|
]);
|
|
@@ -4348,7 +4349,7 @@ async function readRuntimeInfoReport() {
|
|
|
4348
4349
|
}
|
|
4349
4350
|
async function readPluginOperationalReportFeed() {
|
|
4350
4351
|
const nowMs = Date.now();
|
|
4351
|
-
const { getPluginOperationalReports } = await import("./agent-hooks-
|
|
4352
|
+
const { getPluginOperationalReports } = await import("./agent-hooks-SEOGOGKX.js");
|
|
4352
4353
|
return pluginOperationalReportFeedSchema.parse({
|
|
4353
4354
|
source: "plugins",
|
|
4354
4355
|
generatedAt: new Date(nowMs).toISOString(),
|
|
@@ -4423,5 +4424,6 @@ export {
|
|
|
4423
4424
|
authenticatePersonalToken,
|
|
4424
4425
|
createJuniorApi,
|
|
4425
4426
|
jsonResponse,
|
|
4426
|
-
resolveViewerUser
|
|
4427
|
+
resolveViewerUser,
|
|
4428
|
+
updateViewerDisplayName
|
|
4427
4429
|
};
|
package/dist/app.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
processConversationWork
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SH6ZKJFZ.js";
|
|
4
4
|
import {
|
|
5
5
|
bindSpawnAgent
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-Y2VZ54CQ.js";
|
|
7
7
|
import {
|
|
8
8
|
createAgentInvocationWorker,
|
|
9
9
|
enqueueAgentInvocation,
|
|
10
10
|
listPendingAgentInvocationMailboxAppends,
|
|
11
11
|
routeAgentInvocationWork
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-NCGVQXX5.js";
|
|
13
13
|
import {
|
|
14
14
|
GET as GET2,
|
|
15
15
|
GET2 as GET3,
|
|
@@ -36,16 +36,16 @@ import {
|
|
|
36
36
|
startSlackProcessingReaction,
|
|
37
37
|
stripLeadingBotMention,
|
|
38
38
|
wakePausedTurn
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-4VH7KLGC.js";
|
|
40
40
|
import "./chunk-FA6POGLH.js";
|
|
41
41
|
import {
|
|
42
42
|
getTurnRequestDeadline,
|
|
43
43
|
runWithTurnRequestDeadline
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-4KAYAIBV.js";
|
|
45
45
|
import {
|
|
46
46
|
completeAuthPauseTurn,
|
|
47
47
|
persistAuthPauseTurnState
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-7D4GNUV2.js";
|
|
49
49
|
import {
|
|
50
50
|
GET,
|
|
51
51
|
conversationVisibilityFromSlackChannelType,
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
resolveSlackChannelTypeFromMessage,
|
|
54
54
|
resolveSlackConversationContext,
|
|
55
55
|
routeApiTurnWork
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-7GOP6VFJ.js";
|
|
57
57
|
import "./chunk-4CODA7P5.js";
|
|
58
58
|
import {
|
|
59
59
|
CONVERSATION_WORK_STALE_ENQUEUE_MS,
|
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
isInvalidConversationRecordError,
|
|
66
66
|
listActiveConversationIds,
|
|
67
67
|
removeActiveConversation
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-M5OZSVJI.js";
|
|
69
69
|
import {
|
|
70
70
|
buildDeliveredTurnStatePatch,
|
|
71
71
|
claimDispatchMailboxAppend,
|
|
@@ -94,7 +94,7 @@ import {
|
|
|
94
94
|
requireTurnFailureEventId,
|
|
95
95
|
resolveTurnSessionRouting,
|
|
96
96
|
scheduleSessionCompletedPluginTasks
|
|
97
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-UIMBNY6O.js";
|
|
98
98
|
import {
|
|
99
99
|
ConversationTurnLifecycleService,
|
|
100
100
|
coerceThreadConversationState,
|
|
@@ -104,7 +104,7 @@ import {
|
|
|
104
104
|
persistThreadRuntimeState,
|
|
105
105
|
persistThreadState,
|
|
106
106
|
persistThreadStateById
|
|
107
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-FEFEIA3Z.js";
|
|
108
108
|
import "./chunk-UTL3MHPC.js";
|
|
109
109
|
import {
|
|
110
110
|
getVercelConversationWorkQueue,
|
|
@@ -123,7 +123,7 @@ import {
|
|
|
123
123
|
import {
|
|
124
124
|
validatePluginEgressCredentialHooks,
|
|
125
125
|
validatePluginRegistrations
|
|
126
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-3GL327SC.js";
|
|
127
127
|
import {
|
|
128
128
|
defineJuniorPlugins,
|
|
129
129
|
pluginCatalogConfigFromEnv,
|
|
@@ -156,26 +156,26 @@ import {
|
|
|
156
156
|
setConfigDefaults,
|
|
157
157
|
shouldEmitDevAgentTrace,
|
|
158
158
|
shouldPropagateSandboxEgressTrace
|
|
159
|
-
} from "./chunk-
|
|
159
|
+
} from "./chunk-TZLYAO2J.js";
|
|
160
160
|
import {
|
|
161
161
|
AuthorizationFlowDisabledError,
|
|
162
162
|
PluginCredentialFailureError
|
|
163
|
-
} from "./chunk-
|
|
163
|
+
} from "./chunk-QPIPYVGE.js";
|
|
164
164
|
import "./chunk-DIB4GX3G.js";
|
|
165
165
|
import {
|
|
166
166
|
createUserTokenStore,
|
|
167
167
|
deleteMcpAuthSessionsForUserProvider,
|
|
168
168
|
deleteMcpServerSessionId,
|
|
169
169
|
deleteMcpStoredOAuthCredentials
|
|
170
|
-
} from "./chunk-
|
|
170
|
+
} from "./chunk-MCNP7A7T.js";
|
|
171
171
|
import {
|
|
172
172
|
RetryableDeliveryError
|
|
173
|
-
} from "./chunk-
|
|
173
|
+
} from "./chunk-RF6J3DIO.js";
|
|
174
174
|
import {
|
|
175
175
|
formatProviderLabel,
|
|
176
176
|
postSlackMessage,
|
|
177
177
|
startOAuthFlow
|
|
178
|
-
} from "./chunk-
|
|
178
|
+
} from "./chunk-DWETNV66.js";
|
|
179
179
|
import "./chunk-HUO3UTAQ.js";
|
|
180
180
|
import {
|
|
181
181
|
getExperimentalFeatures,
|
|
@@ -184,16 +184,16 @@ import {
|
|
|
184
184
|
import {
|
|
185
185
|
getSandboxResourceConfig,
|
|
186
186
|
setSandboxResourceConfig
|
|
187
|
-
} from "./chunk-
|
|
187
|
+
} from "./chunk-ZBOGYZ53.js";
|
|
188
188
|
import {
|
|
189
189
|
createSchedulerSqlStore,
|
|
190
190
|
findMatchingEventTasks,
|
|
191
191
|
logScheduledTaskRunSkipped,
|
|
192
192
|
scheduledTaskRunAttributes
|
|
193
|
-
} from "./chunk-
|
|
193
|
+
} from "./chunk-P43QM7JY.js";
|
|
194
194
|
import {
|
|
195
195
|
parseSlackThreadId
|
|
196
|
-
} from "./chunk-
|
|
196
|
+
} from "./chunk-H2RLIJ7G.js";
|
|
197
197
|
import {
|
|
198
198
|
ConversationTurnBoundaryError,
|
|
199
199
|
CooperativeTurnYieldError,
|
|
@@ -243,7 +243,7 @@ import {
|
|
|
243
243
|
trimTrailingAssistantMessages,
|
|
244
244
|
turnHasReply,
|
|
245
245
|
upsertConversationMessage
|
|
246
|
-
} from "./chunk-
|
|
246
|
+
} from "./chunk-IPGNWXA3.js";
|
|
247
247
|
import "./chunk-3Y47VMHV.js";
|
|
248
248
|
import "./chunk-PDO5BLNM.js";
|
|
249
249
|
import "./chunk-UIE3R5XU.js";
|
|
@@ -263,7 +263,7 @@ import {
|
|
|
263
263
|
verifyEventTaskCredentialSubject,
|
|
264
264
|
verifyScheduledTaskCredentialSubject,
|
|
265
265
|
verifySlackDirectCredentialSubject
|
|
266
|
-
} from "./chunk-
|
|
266
|
+
} from "./chunk-UOFQEVR5.js";
|
|
267
267
|
import {
|
|
268
268
|
SlackActionError,
|
|
269
269
|
downloadPrivateSlackFile,
|
|
@@ -273,7 +273,7 @@ import {
|
|
|
273
273
|
normalizeSlackConversationId,
|
|
274
274
|
runWithSlackInstallationToken,
|
|
275
275
|
runWithWorkspaceTeamId
|
|
276
|
-
} from "./chunk-
|
|
276
|
+
} from "./chunk-64K7GKRW.js";
|
|
277
277
|
import {
|
|
278
278
|
contextProvenance,
|
|
279
279
|
createSlackDestination,
|
|
@@ -286,19 +286,19 @@ import {
|
|
|
286
286
|
requireSlackDestination,
|
|
287
287
|
withConversationEventLock,
|
|
288
288
|
withConversationMutationLock
|
|
289
|
-
} from "./chunk-
|
|
289
|
+
} from "./chunk-ILYL6YFD.js";
|
|
290
290
|
import {
|
|
291
291
|
juniorAgentBindings,
|
|
292
292
|
juniorAgentInvocations,
|
|
293
293
|
juniorConversationEvents,
|
|
294
294
|
juniorConversations
|
|
295
|
-
} from "./chunk-
|
|
295
|
+
} from "./chunk-F5NMSEBL.js";
|
|
296
296
|
import "./chunk-EM225ITJ.js";
|
|
297
297
|
import {
|
|
298
298
|
acquireActiveLock,
|
|
299
299
|
getStateAdapter,
|
|
300
300
|
withActiveLock
|
|
301
|
-
} from "./chunk-
|
|
301
|
+
} from "./chunk-6PFDWAK2.js";
|
|
302
302
|
import {
|
|
303
303
|
STANDARD_MODEL_PROFILE,
|
|
304
304
|
botConfig,
|
|
@@ -316,16 +316,16 @@ import {
|
|
|
316
316
|
modelIdForProfile,
|
|
317
317
|
setSlackReactionConfig,
|
|
318
318
|
standardModelId
|
|
319
|
-
} from "./chunk-
|
|
319
|
+
} from "./chunk-3ZMKDHCT.js";
|
|
320
320
|
import {
|
|
321
321
|
juniorDestinations
|
|
322
322
|
} from "./chunk-VFUK3X5B.js";
|
|
323
|
-
import "./chunk-
|
|
324
|
-
import "./chunk-
|
|
323
|
+
import "./chunk-SHDREBGC.js";
|
|
324
|
+
import "./chunk-NNOCRVQO.js";
|
|
325
325
|
import {
|
|
326
326
|
pluginCatalogRuntime
|
|
327
|
-
} from "./chunk-
|
|
328
|
-
import "./chunk-
|
|
327
|
+
} from "./chunk-7NLW2NF5.js";
|
|
328
|
+
import "./chunk-ZUQT35YC.js";
|
|
329
329
|
import {
|
|
330
330
|
credentialContextForActor
|
|
331
331
|
} from "./chunk-RUIXF3YQ.js";
|
|
@@ -359,7 +359,7 @@ import {
|
|
|
359
359
|
withContext,
|
|
360
360
|
withLogContext,
|
|
361
361
|
withSpan
|
|
362
|
-
} from "./chunk-
|
|
362
|
+
} from "./chunk-JQXJ2E53.js";
|
|
363
363
|
import {
|
|
364
364
|
continueTrace
|
|
365
365
|
} from "./chunk-6GWA276C.js";
|
|
@@ -367,10 +367,10 @@ import "./chunk-OOUNJNMR.js";
|
|
|
367
367
|
import "./chunk-H4HBKISO.js";
|
|
368
368
|
import {
|
|
369
369
|
JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE
|
|
370
|
-
} from "./chunk-
|
|
370
|
+
} from "./chunk-IZRSLANA.js";
|
|
371
371
|
import {
|
|
372
372
|
JUNIOR_VERSION
|
|
373
|
-
} from "./chunk-
|
|
373
|
+
} from "./chunk-7QB2CKCW.js";
|
|
374
374
|
import "./chunk-MLKGABMK.js";
|
|
375
375
|
|
|
376
376
|
// src/app.ts
|
|
@@ -6425,7 +6425,7 @@ function createReplyToThread(deps) {
|
|
|
6425
6425
|
text: queued.userText,
|
|
6426
6426
|
timestampMs: queued.message.metadata.dateSent.getTime(),
|
|
6427
6427
|
omittedImageAttachmentCount: !isVisionEnabled() && hasPotentialImageAttachment(attachments) ? countPotentialImageAttachments(attachments) : 0,
|
|
6428
|
-
|
|
6428
|
+
attachments: await deps.resolveUserAttachments(
|
|
6429
6429
|
attachments,
|
|
6430
6430
|
{
|
|
6431
6431
|
threadId,
|
|
@@ -6955,48 +6955,54 @@ function createReplyToThread(deps) {
|
|
|
6955
6955
|
conversationId,
|
|
6956
6956
|
turnId,
|
|
6957
6957
|
...runId ? { runId } : {},
|
|
6958
|
-
|
|
6958
|
+
instruction: {
|
|
6959
6959
|
actor: {
|
|
6960
6960
|
...activeInstructionAuthorId ? { authorId: activeInstructionAuthorId } : {},
|
|
6961
6961
|
...activeInstructionAuthorName ? { authorName: activeInstructionAuthorName } : {},
|
|
6962
6962
|
...slackMessageTs ? { slackTs: slackMessageTs } : {}
|
|
6963
6963
|
},
|
|
6964
|
-
|
|
6965
|
-
|
|
6966
|
-
|
|
6967
|
-
piMessages,
|
|
6964
|
+
includeConversationContextWithHistory: hasDurablePromptHistory,
|
|
6965
|
+
text: effectiveUserText,
|
|
6966
|
+
context: promptConversationContext,
|
|
6968
6967
|
inboundAttachmentCount: turnAttachments.length,
|
|
6969
6968
|
omittedImageAttachmentCount,
|
|
6970
|
-
userAttachments
|
|
6971
|
-
},
|
|
6972
|
-
routing: {
|
|
6973
|
-
credentialContext,
|
|
6974
|
-
// Always set the execution actor when known. Resource-event turns
|
|
6975
|
-
// carry the system principal; interactive turns carry the Slack user.
|
|
6976
|
-
actor: executionActor,
|
|
6977
|
-
slackConversation,
|
|
6978
|
-
source,
|
|
6979
|
-
destination,
|
|
6980
|
-
publishExternally: shouldPublishExternally2(options.publishExternally),
|
|
6981
|
-
...destinationVisibility ? { destinationVisibility } : {},
|
|
6982
|
-
surface: options.execution?.surface ?? "slack",
|
|
6983
|
-
dispatch: options.execution?.dispatch,
|
|
6984
|
-
toolChannelId,
|
|
6985
|
-
slackActionToken
|
|
6969
|
+
attachments: userAttachments
|
|
6986
6970
|
},
|
|
6987
|
-
|
|
6971
|
+
history: piMessages,
|
|
6972
|
+
credentialContext,
|
|
6973
|
+
// Always set the execution actor when known. Resource-event turns
|
|
6974
|
+
// carry the system principal; interactive turns carry the Slack user.
|
|
6975
|
+
actor: executionActor,
|
|
6976
|
+
slackConversation,
|
|
6977
|
+
source,
|
|
6978
|
+
destination,
|
|
6979
|
+
publishExternally: shouldPublishExternally2(options.publishExternally),
|
|
6980
|
+
...destinationVisibility ? { destinationVisibility } : {},
|
|
6981
|
+
surface: options.execution?.surface ?? "slack",
|
|
6982
|
+
dispatch: options.execution?.dispatch,
|
|
6983
|
+
toolChannelId,
|
|
6984
|
+
slackActionToken,
|
|
6985
|
+
environment: {
|
|
6988
6986
|
configuration: preparedState.configuration,
|
|
6989
|
-
locationConfiguration: preparedState.locationConfiguration
|
|
6990
|
-
disabledFeatures: options.execution?.disabledFeatures ?? (message.author.isBot === true ? ["interactive-auth"] : void 0),
|
|
6991
|
-
turnDeadlineAtMs: getTurnRequestDeadline()?.deadlineAtMs
|
|
6987
|
+
locationConfiguration: preparedState.locationConfiguration
|
|
6992
6988
|
},
|
|
6989
|
+
disabledFeatures: options.execution?.disabledFeatures ?? (message.author.isBot === true ? ["interactive-auth"] : void 0),
|
|
6990
|
+
deadlineAtMs: getTurnRequestDeadline()?.deadlineAtMs,
|
|
6993
6991
|
state: {
|
|
6994
6992
|
pendingAuth: preparedState.conversation.processing.pendingAuth,
|
|
6995
6993
|
sandboxRef: preparedState.sandboxRef
|
|
6996
6994
|
},
|
|
6997
|
-
|
|
6998
|
-
|
|
6999
|
-
|
|
6995
|
+
onEvent: async (event) => {
|
|
6996
|
+
if (event.type === "status") {
|
|
6997
|
+
status.update({ text: event.text });
|
|
6998
|
+
return;
|
|
6999
|
+
}
|
|
7000
|
+
if (event.type === "tool_started") {
|
|
7001
|
+
await options.onToolInvocation?.({
|
|
7002
|
+
params: event.params,
|
|
7003
|
+
toolName: event.toolName
|
|
7004
|
+
});
|
|
7005
|
+
}
|
|
7000
7006
|
},
|
|
7001
7007
|
delivery: deliverAssistantMessage,
|
|
7002
7008
|
durability: {
|
|
@@ -8158,29 +8164,29 @@ async function runPausedTurnInContext(payload, options, runOptions) {
|
|
|
8158
8164
|
inputMessageIds: [userMessage.id],
|
|
8159
8165
|
initialStatus: latestReportedProgress(turnMessages),
|
|
8160
8166
|
replyContext: {
|
|
8161
|
-
|
|
8162
|
-
...conversationContext ? { conversationContext } : {},
|
|
8163
|
-
//
|
|
8164
|
-
|
|
8165
|
-
|
|
8166
|
-
// projection so queued steering remains visible.
|
|
8167
|
-
piMessages: dispatchId ? activeTurn.piMessages : await loadProjection({
|
|
8168
|
-
conversationId: payload.conversationId
|
|
8169
|
-
}),
|
|
8170
|
-
...getTurnUserReplyAttachmentContext(userMessage)
|
|
8171
|
-
},
|
|
8172
|
-
routing: {
|
|
8173
|
-
...options.routingContext,
|
|
8174
|
-
credentialContext,
|
|
8175
|
-
actor,
|
|
8176
|
-
destination: routingDestination,
|
|
8177
|
-
// Slack resume publishes unless the checkpoint opted out.
|
|
8178
|
-
// Missing means legacy/in-flight Slack turns still post.
|
|
8179
|
-
publishExternally: activeTurn.publishExternally !== false,
|
|
8180
|
-
source,
|
|
8181
|
-
toolChannelId: destination.channelId
|
|
8167
|
+
instruction: {
|
|
8168
|
+
...conversationContext ? { context: conversationContext } : {},
|
|
8169
|
+
// Attachment fields come from the turn user message context helper.
|
|
8170
|
+
...getTurnUserReplyAttachmentContext(userMessage),
|
|
8171
|
+
text: userMessage.text
|
|
8182
8172
|
},
|
|
8183
|
-
|
|
8173
|
+
// Pi history is SQL-authoritative: the resumed run reads its
|
|
8174
|
+
// exact dispatch session so unrelated conversation input cannot
|
|
8175
|
+
// gain system authority. Interactive turns retain their merged
|
|
8176
|
+
// projection so queued steering remains visible.
|
|
8177
|
+
history: dispatchId ? activeTurn.piMessages : await loadProjection({
|
|
8178
|
+
conversationId: payload.conversationId
|
|
8179
|
+
}),
|
|
8180
|
+
...options.routingContext,
|
|
8181
|
+
credentialContext,
|
|
8182
|
+
actor,
|
|
8183
|
+
destination: routingDestination,
|
|
8184
|
+
// Slack resume publishes unless the checkpoint opted out.
|
|
8185
|
+
// Missing means legacy/in-flight Slack turns still post.
|
|
8186
|
+
publishExternally: activeTurn.publishExternally !== false,
|
|
8187
|
+
source,
|
|
8188
|
+
toolChannelId: destination.channelId,
|
|
8189
|
+
environment: {
|
|
8184
8190
|
locationConfiguration
|
|
8185
8191
|
},
|
|
8186
8192
|
state: {
|
|
@@ -8910,7 +8916,8 @@ function dashboardHostRoutePaths(dashboard) {
|
|
|
8910
8916
|
`${pagePath("system")}/*`,
|
|
8911
8917
|
pagePath("plugins"),
|
|
8912
8918
|
`${pagePath("plugins")}/*`,
|
|
8913
|
-
pagePath("settings
|
|
8919
|
+
pagePath("settings"),
|
|
8920
|
+
`${pagePath("settings")}/*`
|
|
8914
8921
|
];
|
|
8915
8922
|
if (dashboard.componentGallery) {
|
|
8916
8923
|
pagePaths.push(pagePath("dev"), `${pagePath("dev")}/*`);
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pluginCatalogRuntime
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-7NLW2NF5.js";
|
|
4
|
+
import "./chunk-ZUQT35YC.js";
|
|
5
5
|
import "./chunk-RUIXF3YQ.js";
|
|
6
6
|
import "./chunk-HZF5P5UN.js";
|
|
7
7
|
import "./chunk-F3B2YJ76.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-JQXJ2E53.js";
|
|
9
9
|
import "./chunk-6GWA276C.js";
|
|
10
10
|
import "./chunk-OOUNJNMR.js";
|
|
11
11
|
import "./chunk-H4HBKISO.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-IZRSLANA.js";
|
|
13
|
+
import "./chunk-7QB2CKCW.js";
|
|
14
14
|
import "./chunk-MLKGABMK.js";
|
|
15
15
|
export {
|
|
16
16
|
pluginCatalogRuntime
|
|
@@ -11,11 +11,12 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import { type StreamFn } from "@earendil-works/pi-agent-core";
|
|
13
13
|
import type { AgentRunOutcome } from "@/chat/runtime/agent-run-outcome";
|
|
14
|
-
import { type
|
|
14
|
+
import { type AgentRun } from "@/chat/agent/types";
|
|
15
15
|
/**
|
|
16
16
|
* Run a full agent turn, optionally using a caller-provided model stream.
|
|
17
17
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
18
|
+
* Prefer binding `streamFn` through `createAgentRunner`. The stream changes
|
|
19
|
+
* model output only; prompt assembly, persistence, tools, delivery, and
|
|
20
|
+
* completion still use the normal agent runtime.
|
|
20
21
|
*/
|
|
21
|
-
export declare function executeAgentRun(
|
|
22
|
+
export declare function executeAgentRun(run: AgentRun, streamFn?: StreamFn): Promise<AgentRunOutcome>;
|
|
@@ -7,7 +7,7 @@ import type { ToolRuntimeContext } from "@/chat/tools/types";
|
|
|
7
7
|
import type { AnyToolDefinition } from "@/chat/tools/definition";
|
|
8
8
|
import { type Actor } from "@/chat/actor";
|
|
9
9
|
import type { PluginTurnContext } from "@/chat/plugins/prompt";
|
|
10
|
-
import type {
|
|
10
|
+
import type { AgentInstruction, AgentInstructionActor, AgentRun, AgentSteeringMessage } from "@/chat/agent/types";
|
|
11
11
|
export type UserContentPart = {
|
|
12
12
|
type: "text";
|
|
13
13
|
text: string;
|
|
@@ -38,7 +38,7 @@ export interface PromptAssembly {
|
|
|
38
38
|
userContentParts: UserContentPart[];
|
|
39
39
|
}
|
|
40
40
|
/** Render the current actor's instruction without host-owned thread context. */
|
|
41
|
-
export declare function buildUserTurnText(userInput: string, actor?:
|
|
41
|
+
export declare function buildUserTurnText(userInput: string, actor?: AgentInstructionActor): string;
|
|
42
42
|
/** Render an explicitly selected skill as instructions for the current turn. */
|
|
43
43
|
export declare function renderExplicitSkillInstructions(skill: Skill): string;
|
|
44
44
|
/** Encode a non-image attachment as base64 XML for the prompt. */
|
|
@@ -50,13 +50,16 @@ export declare function encodeNonImageAttachmentForPrompt(attachment: {
|
|
|
50
50
|
/** Redact image data from prompt content parts for observability. */
|
|
51
51
|
export declare function toObservablePromptPart(part: UserContentPart): Record<string, unknown>;
|
|
52
52
|
/** Build the prompt-facing user input, keeping router text aligned with Pi content. */
|
|
53
|
-
export declare function buildPromptInput(
|
|
53
|
+
export declare function buildPromptInput(args: {
|
|
54
|
+
instruction: AgentInstruction;
|
|
55
|
+
history?: readonly import("@/chat/pi/messages").PiMessage[];
|
|
56
|
+
}): PromptInput;
|
|
54
57
|
/**
|
|
55
58
|
* Convert a mid-run user message into the Pi user message shape used for
|
|
56
59
|
* steering injection and parked-conversation event-log appends, so both
|
|
57
60
|
* paths store identical durable history.
|
|
58
61
|
*/
|
|
59
|
-
export declare function buildSteeringPiMessage(message:
|
|
62
|
+
export declare function buildSteeringPiMessage(message: AgentSteeringMessage): PiMessage;
|
|
60
63
|
/** Assemble prompt history, instructions, and telemetry input for one slice. */
|
|
61
64
|
export declare function assemblePrompt(args: {
|
|
62
65
|
activeMcpCatalogs: ActiveMcpCatalogSummary[];
|
|
@@ -70,7 +73,7 @@ export declare function assemblePrompt(args: {
|
|
|
70
73
|
explicitSkill: Skill | null;
|
|
71
74
|
priorPiMessages?: PiMessage[];
|
|
72
75
|
resumedFromSessionRecord: boolean;
|
|
73
|
-
|
|
76
|
+
run: Pick<AgentRun, "source" | "destination" | "dispatch" | "slackConversation">;
|
|
74
77
|
spanContext: LogContext;
|
|
75
78
|
turnId: string;
|
|
76
79
|
toolGuidance: Array<{
|
|
@@ -12,7 +12,7 @@ import type { Actor } from "@/chat/actor";
|
|
|
12
12
|
import { type AgentTurnSurface, type TurnCheckpoint } from "@/chat/task-execution/checkpoint";
|
|
13
13
|
import { type AuthorizationPauseError } from "@/chat/services/auth-pause";
|
|
14
14
|
import { type AgentTurnUsage } from "@/chat/usage";
|
|
15
|
-
import { type
|
|
15
|
+
import { type AgentDurability } from "@/chat/agent/types";
|
|
16
16
|
import type { PluginTurnContext } from "@/chat/plugins/prompt";
|
|
17
17
|
import type { ConversationPrivacy } from "@/chat/conversation-privacy";
|
|
18
18
|
interface ResumeStateArgs {
|
|
@@ -20,7 +20,7 @@ interface ResumeStateArgs {
|
|
|
20
20
|
destination: Destination;
|
|
21
21
|
destinationVisibility?: ConversationPrivacy;
|
|
22
22
|
dispatchId?: string;
|
|
23
|
-
durability:
|
|
23
|
+
durability: AgentDurability;
|
|
24
24
|
recordActiveMcpProviders: () => Promise<void>;
|
|
25
25
|
publishExternally: boolean;
|
|
26
26
|
actor?: Actor;
|