@sentry/junior 0.156.0 → 0.158.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-CCAR46PQ.js → agent-hooks-BOWFTDE5.js} +10 -10
- package/dist/api/conversations/attachments.d.ts +32 -0
- package/dist/api/conversations/priority.d.ts +22 -0
- package/dist/api/conversations/routes.d.ts +4 -1
- package/dist/api/conversations/user-message-activity.d.ts +3 -0
- package/dist/api/locations/detail.d.ts +3 -1
- package/dist/api/schema/conversation.d.ts +14 -4
- package/dist/api/schema/location.d.ts +3 -1
- package/dist/api/schema/person.d.ts +3 -1
- package/dist/api/schema/task.d.ts +8 -8
- package/dist/api/schema.js +1 -1
- package/dist/api.js +350 -187
- package/dist/app.js +35 -54
- package/dist/{catalog-runtime-3SNKYCBG.js → catalog-runtime-7GZ25WTR.js} +5 -5
- package/dist/chat/agent-invocations/types.d.ts +12 -12
- package/dist/chat/attachments/storage.d.ts +2 -0
- package/dist/chat/attachments/store.d.ts +16 -0
- package/dist/chat/event-tasks/tool-support.d.ts +1 -1
- package/dist/chat/event-tasks/types.d.ts +1 -1
- package/dist/chat/plugins/unfinished-work.d.ts +6 -1
- package/dist/chat/scheduled-tasks/tool-support.d.ts +5 -5
- package/dist/chat/scheduled-tasks/tools/create.d.ts +2 -2
- package/dist/chat/scheduled-tasks/tools/delete.d.ts +2 -2
- package/dist/chat/scheduled-tasks/tools/list.d.ts +2 -2
- package/dist/chat/scheduled-tasks/tools/run-now.d.ts +2 -2
- package/dist/chat/scheduled-tasks/tools/update.d.ts +2 -2
- package/dist/chat/task-execution/slack-work.d.ts +2 -2
- package/dist/{chunk-4ZZDTHFC.js → chunk-3A7VXSPJ.js} +8 -8
- package/dist/{chunk-7RAETIYO.js → chunk-4JAOLUDB.js} +6 -6
- package/dist/{chunk-KCA5MKHU.js → chunk-4Q6QVTKA.js} +351 -5
- package/dist/{chunk-TN4LVILT.js → chunk-4XJ2WSTI.js} +5 -5
- package/dist/{chunk-OGZPRMZA.js → chunk-6GJCOUTA.js} +1 -1
- package/dist/{chunk-6CINHXIL.js → chunk-A7EDLNGU.js} +4 -4
- package/dist/{chunk-IIO5PFZX.js → chunk-AF4PHIP6.js} +3 -3
- package/dist/{chunk-IZEBHYI4.js → chunk-BNFGY66A.js} +1 -1
- package/dist/{chunk-3L2PMOSR.js → chunk-C3FYJZSA.js} +4 -4
- package/dist/{chunk-X5NZQH5U.js → chunk-CZCMFRUQ.js} +16 -0
- package/dist/{chunk-CK2H7CFO.js → chunk-DTVTBZNP.js} +1 -1
- package/dist/{chunk-WD7SEUZO.js → chunk-EQ6Y37MD.js} +1 -1
- package/dist/{chunk-53W3LZEW.js → chunk-EXITAVHO.js} +64 -361
- package/dist/{chunk-ZNWRYNCA.js → chunk-FA32YRZ3.js} +5 -5
- package/dist/{chunk-GKC43TLS.js → chunk-FAJ6SMEE.js} +2 -2
- package/dist/{chunk-GSBPZHLQ.js → chunk-IEM3GFXL.js} +9 -9
- package/dist/{chunk-KBGMYLSV.js → chunk-IXYGGJRA.js} +1 -1
- package/dist/{chunk-OMQJB7YN.js → chunk-JEXQQLEC.js} +18 -18
- package/dist/{chunk-PMFGVLDU.js → chunk-KAFYW3O6.js} +35 -10
- package/dist/{chunk-X7W45B5G.js → chunk-KSZXVR5G.js} +1 -1
- package/dist/{chunk-SRJA6QLM.js → chunk-LUSAAJJA.js} +2 -2
- package/dist/{chunk-3FFUC32L.js → chunk-NOEERHHR.js} +6 -6
- package/dist/{chunk-MC57E5U5.js → chunk-PHQDXC27.js} +1 -1
- package/dist/{chunk-A6WPDFHQ.js → chunk-RCIKTZZF.js} +1 -1
- package/dist/{chunk-NTNU6T2D.js → chunk-ROOTB7J7.js} +2 -2
- package/dist/{chunk-TNXGMFWV.js → chunk-SAJPQLTY.js} +1 -1
- package/dist/{chunk-SE3D225X.js → chunk-SSU65ZTZ.js} +1 -1
- package/dist/{chunk-6JUU7J2B.js → chunk-UJ6N32ZM.js} +4 -4
- package/dist/{chunk-MJE7XKWP.js → chunk-UPPU3FQU.js} +1 -1
- package/dist/{chunk-JUJR6WTL.js → chunk-UQJO35BP.js} +4 -4
- package/dist/{chunk-AIJRG227.js → chunk-VURJ2NSF.js} +1 -1
- package/dist/{chunk-CN2XSVKF.js → chunk-X4BLYIMV.js} +6 -6
- package/dist/{chunk-EDJ64P2P.js → chunk-YEZS4TEY.js} +1 -1
- package/dist/cli/chat.js +30 -30
- 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/schema/agent-invocations.d.ts +4 -4
- package/dist/db/schema.d.ts +4 -4
- package/dist/{db-TYUUKGJX.js → db-HFWTPYT7.js} +7 -7
- package/dist/instrumentation.js +4 -4
- package/dist/nitro.js +2 -2
- package/dist/{oauth-callback-server-AWVDKPR5.js → oauth-callback-server-J3NW4QL5.js} +23 -23
- package/dist/{runner-JUQXMACC.js → runner-CL6QHML5.js} +14 -15
- package/dist/{skills-4GZTZX4V.js → skills-WZWKZIFQ.js} +6 -6
- package/dist/spawn-TQJWADG4.js +37 -0
- package/dist/{validation-DRLNJRND.js → validation-4HVSSLJV.js} +6 -6
- package/dist/version.js +1 -1
- package/dist/{work-TGIXRRJY.js → work-UF4KXPVG.js} +17 -17
- package/dist/worker-HI7I2W2U.js +24 -0
- package/package.json +5 -5
- package/dist/spawn-32SSRWU4.js +0 -37
- package/dist/worker-IFXZOYED.js +0 -24
package/dist/app.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
processConversationWork
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UQJO35BP.js";
|
|
4
4
|
import {
|
|
5
5
|
bindSpawnAgent
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-BNFGY66A.js";
|
|
7
7
|
import {
|
|
8
8
|
createAgentInvocationWorker,
|
|
9
9
|
enqueueAgentInvocation,
|
|
10
10
|
listPendingAgentInvocationMailboxAppends,
|
|
11
11
|
routeAgentInvocationWork
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-X4BLYIMV.js";
|
|
13
13
|
import {
|
|
14
14
|
GET as GET2,
|
|
15
15
|
GET2 as GET3,
|
|
@@ -36,22 +36,23 @@ import {
|
|
|
36
36
|
startSlackProcessingReaction,
|
|
37
37
|
stripLeadingBotMention,
|
|
38
38
|
wakePausedTurn
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-JEXQQLEC.js";
|
|
40
40
|
import "./chunk-FA6POGLH.js";
|
|
41
41
|
import {
|
|
42
42
|
getTurnRequestDeadline,
|
|
43
43
|
runWithTurnRequestDeadline
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-RCIKTZZF.js";
|
|
45
45
|
import {
|
|
46
46
|
GET,
|
|
47
47
|
conversationVisibilityFromSlackChannelType,
|
|
48
48
|
createApiTurnWorker,
|
|
49
|
+
createVercelAttachmentStorage,
|
|
49
50
|
lookupSlackUser,
|
|
50
51
|
resolveSlackChannelTypeFromMessage,
|
|
51
52
|
resolveSlackConversationContext,
|
|
52
53
|
routeApiTurnWork
|
|
53
|
-
} from "./chunk-
|
|
54
|
-
import "./chunk-
|
|
54
|
+
} from "./chunk-KAFYW3O6.js";
|
|
55
|
+
import "./chunk-SSU65ZTZ.js";
|
|
55
56
|
import {
|
|
56
57
|
CONVERSATION_WORK_STALE_ENQUEUE_MS,
|
|
57
58
|
appendAndEnqueueInboundMessage,
|
|
@@ -62,7 +63,7 @@ import {
|
|
|
62
63
|
isInvalidConversationRecordError,
|
|
63
64
|
listActiveConversationIds,
|
|
64
65
|
removeActiveConversation
|
|
65
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-A7EDLNGU.js";
|
|
66
67
|
import {
|
|
67
68
|
buildDeliveredTurnStatePatch,
|
|
68
69
|
claimDispatchMailboxAppend,
|
|
@@ -93,7 +94,7 @@ import {
|
|
|
93
94
|
requireTurnFailureEventId,
|
|
94
95
|
resolveTurnSessionRouting,
|
|
95
96
|
scheduleSessionCompletedPluginTasks
|
|
96
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-IEM3GFXL.js";
|
|
97
98
|
import {
|
|
98
99
|
ConversationTurnLifecycleService,
|
|
99
100
|
coerceThreadConversationState,
|
|
@@ -103,7 +104,7 @@ import {
|
|
|
103
104
|
persistThreadRuntimeState,
|
|
104
105
|
persistThreadState,
|
|
105
106
|
persistThreadStateById
|
|
106
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-4XJ2WSTI.js";
|
|
107
108
|
import "./chunk-UTL3MHPC.js";
|
|
108
109
|
import {
|
|
109
110
|
getVercelConversationWorkQueue,
|
|
@@ -122,7 +123,7 @@ import {
|
|
|
122
123
|
import {
|
|
123
124
|
validatePluginEgressCredentialHooks,
|
|
124
125
|
validatePluginRegistrations
|
|
125
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-SAJPQLTY.js";
|
|
126
127
|
import {
|
|
127
128
|
defineJuniorPlugins,
|
|
128
129
|
pluginCatalogConfigFromEnv,
|
|
@@ -134,7 +135,6 @@ import {
|
|
|
134
135
|
buildSteeringPiMessage,
|
|
135
136
|
cancelSubscriptions,
|
|
136
137
|
clearSandboxEgressSignals,
|
|
137
|
-
collectAttachmentGarbage,
|
|
138
138
|
consumeSandboxEgressAuthRequiredSignal,
|
|
139
139
|
consumeSandboxEgressPermissionDeniedSignal,
|
|
140
140
|
createContextCompactor,
|
|
@@ -149,18 +149,17 @@ import {
|
|
|
149
149
|
parseSandboxEgressCredentialToken,
|
|
150
150
|
renderAttachmentText,
|
|
151
151
|
renderBlockText,
|
|
152
|
-
requestAttachmentDeletion,
|
|
153
152
|
resolveDestinationVisibility,
|
|
154
153
|
resolveSandboxEgressProviderForHost,
|
|
155
154
|
sanitizeScheduledTaskPrincipal,
|
|
156
155
|
setConfigDefaults,
|
|
157
156
|
shouldEmitDevAgentTrace,
|
|
158
157
|
shouldPropagateSandboxEgressTrace
|
|
159
|
-
} from "./chunk-
|
|
158
|
+
} from "./chunk-EXITAVHO.js";
|
|
160
159
|
import {
|
|
161
160
|
AuthorizationFlowDisabledError,
|
|
162
161
|
PluginCredentialFailureError
|
|
163
|
-
} from "./chunk-
|
|
162
|
+
} from "./chunk-FA32YRZ3.js";
|
|
164
163
|
import "./chunk-DIB4GX3G.js";
|
|
165
164
|
import {
|
|
166
165
|
createAgentRunner,
|
|
@@ -168,7 +167,7 @@ import {
|
|
|
168
167
|
deleteMcpAuthSessionsForUserProvider,
|
|
169
168
|
deleteMcpServerSessionId,
|
|
170
169
|
deleteMcpStoredOAuthCredentials
|
|
171
|
-
} from "./chunk-
|
|
170
|
+
} from "./chunk-3A7VXSPJ.js";
|
|
172
171
|
import {
|
|
173
172
|
RetryableDeliveryError
|
|
174
173
|
} from "./chunk-RF6J3DIO.js";
|
|
@@ -176,7 +175,7 @@ import {
|
|
|
176
175
|
formatProviderLabel,
|
|
177
176
|
postSlackMessage,
|
|
178
177
|
startOAuthFlow
|
|
179
|
-
} from "./chunk-
|
|
178
|
+
} from "./chunk-4JAOLUDB.js";
|
|
180
179
|
import "./chunk-7MA4HV4W.js";
|
|
181
180
|
import {
|
|
182
181
|
getExperimentalFeatures,
|
|
@@ -185,16 +184,18 @@ import {
|
|
|
185
184
|
import {
|
|
186
185
|
getSandboxResourceConfig,
|
|
187
186
|
setSandboxResourceConfig
|
|
188
|
-
} from "./chunk-
|
|
187
|
+
} from "./chunk-UJ6N32ZM.js";
|
|
189
188
|
import {
|
|
189
|
+
collectAttachmentGarbage,
|
|
190
190
|
createSchedulerSqlStore,
|
|
191
191
|
findMatchingEventTasks,
|
|
192
192
|
logScheduledTaskRunSkipped,
|
|
193
|
+
requestAttachmentDeletion,
|
|
193
194
|
scheduledTaskRunAttributes
|
|
194
|
-
} from "./chunk-
|
|
195
|
+
} from "./chunk-4Q6QVTKA.js";
|
|
195
196
|
import {
|
|
196
197
|
parseSlackThreadId
|
|
197
|
-
} from "./chunk-
|
|
198
|
+
} from "./chunk-DTVTBZNP.js";
|
|
198
199
|
import {
|
|
199
200
|
ConversationTurnBoundaryError,
|
|
200
201
|
CooperativeTurnYieldError,
|
|
@@ -244,7 +245,7 @@ import {
|
|
|
244
245
|
trimTrailingAssistantMessages,
|
|
245
246
|
turnHasReply,
|
|
246
247
|
upsertConversationMessage
|
|
247
|
-
} from "./chunk-
|
|
248
|
+
} from "./chunk-C3FYJZSA.js";
|
|
248
249
|
import "./chunk-3Y47VMHV.js";
|
|
249
250
|
import "./chunk-PDO5BLNM.js";
|
|
250
251
|
import "./chunk-UIE3R5XU.js";
|
|
@@ -264,7 +265,7 @@ import {
|
|
|
264
265
|
verifyEventTaskCredentialSubject,
|
|
265
266
|
verifyScheduledTaskCredentialSubject,
|
|
266
267
|
verifySlackDirectCredentialSubject
|
|
267
|
-
} from "./chunk-
|
|
268
|
+
} from "./chunk-NOEERHHR.js";
|
|
268
269
|
import {
|
|
269
270
|
SlackActionError,
|
|
270
271
|
downloadPrivateSlackFile,
|
|
@@ -274,7 +275,7 @@ import {
|
|
|
274
275
|
normalizeSlackConversationId,
|
|
275
276
|
runWithSlackInstallationToken,
|
|
276
277
|
runWithWorkspaceTeamId
|
|
277
|
-
} from "./chunk-
|
|
278
|
+
} from "./chunk-ROOTB7J7.js";
|
|
278
279
|
import {
|
|
279
280
|
contextProvenance,
|
|
280
281
|
createSlackDestination,
|
|
@@ -287,19 +288,19 @@ import {
|
|
|
287
288
|
requireSlackDestination,
|
|
288
289
|
withConversationEventLock,
|
|
289
290
|
withConversationMutationLock
|
|
290
|
-
} from "./chunk-
|
|
291
|
+
} from "./chunk-AF4PHIP6.js";
|
|
291
292
|
import {
|
|
292
293
|
juniorAgentBindings,
|
|
293
294
|
juniorAgentInvocations,
|
|
294
295
|
juniorConversationEvents,
|
|
295
296
|
juniorConversations
|
|
296
|
-
} from "./chunk-
|
|
297
|
+
} from "./chunk-VURJ2NSF.js";
|
|
297
298
|
import "./chunk-EM225ITJ.js";
|
|
298
299
|
import {
|
|
299
300
|
acquireActiveLock,
|
|
300
301
|
getStateAdapter,
|
|
301
302
|
withActiveLock
|
|
302
|
-
} from "./chunk-
|
|
303
|
+
} from "./chunk-PHQDXC27.js";
|
|
303
304
|
import {
|
|
304
305
|
STANDARD_MODEL_PROFILE,
|
|
305
306
|
botConfig,
|
|
@@ -317,16 +318,16 @@ import {
|
|
|
317
318
|
modelIdForProfile,
|
|
318
319
|
setSlackReactionConfig,
|
|
319
320
|
standardModelId
|
|
320
|
-
} from "./chunk-
|
|
321
|
+
} from "./chunk-FAJ6SMEE.js";
|
|
321
322
|
import {
|
|
322
323
|
juniorDestinations
|
|
323
324
|
} from "./chunk-VFUK3X5B.js";
|
|
324
|
-
import "./chunk-
|
|
325
|
-
import "./chunk-
|
|
325
|
+
import "./chunk-UPPU3FQU.js";
|
|
326
|
+
import "./chunk-LUSAAJJA.js";
|
|
326
327
|
import {
|
|
327
328
|
pluginCatalogRuntime
|
|
328
|
-
} from "./chunk-
|
|
329
|
-
import "./chunk-
|
|
329
|
+
} from "./chunk-YEZS4TEY.js";
|
|
330
|
+
import "./chunk-EQ6Y37MD.js";
|
|
330
331
|
import {
|
|
331
332
|
credentialContextForActor
|
|
332
333
|
} from "./chunk-BDUENQD3.js";
|
|
@@ -358,7 +359,7 @@ import {
|
|
|
358
359
|
withContext,
|
|
359
360
|
withLogContext,
|
|
360
361
|
withSpan
|
|
361
|
-
} from "./chunk-
|
|
362
|
+
} from "./chunk-KSZXVR5G.js";
|
|
362
363
|
import {
|
|
363
364
|
continueTrace
|
|
364
365
|
} from "./chunk-6GWA276C.js";
|
|
@@ -366,10 +367,10 @@ import "./chunk-OOUNJNMR.js";
|
|
|
366
367
|
import "./chunk-H4HBKISO.js";
|
|
367
368
|
import {
|
|
368
369
|
JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE
|
|
369
|
-
} from "./chunk-
|
|
370
|
+
} from "./chunk-6GJCOUTA.js";
|
|
370
371
|
import {
|
|
371
372
|
JUNIOR_VERSION
|
|
372
|
-
} from "./chunk-
|
|
373
|
+
} from "./chunk-IXYGGJRA.js";
|
|
373
374
|
import "./chunk-MLKGABMK.js";
|
|
374
375
|
|
|
375
376
|
// src/app.ts
|
|
@@ -2014,26 +2015,6 @@ async function runRetentionPurge(executor, args) {
|
|
|
2014
2015
|
};
|
|
2015
2016
|
}
|
|
2016
2017
|
|
|
2017
|
-
// src/chat/attachments/vercel.ts
|
|
2018
|
-
import { del, put } from "@vercel/blob";
|
|
2019
|
-
function createVercelAttachmentStorage() {
|
|
2020
|
-
return {
|
|
2021
|
-
provider: "vercel-blob",
|
|
2022
|
-
async put(input) {
|
|
2023
|
-
await put(input.key, input.body, {
|
|
2024
|
-
access: "private",
|
|
2025
|
-
addRandomSuffix: false,
|
|
2026
|
-
allowOverwrite: true,
|
|
2027
|
-
contentType: input.contentType
|
|
2028
|
-
});
|
|
2029
|
-
},
|
|
2030
|
-
async delete(keys) {
|
|
2031
|
-
if (keys.length === 0) return;
|
|
2032
|
-
await del(keys);
|
|
2033
|
-
}
|
|
2034
|
-
};
|
|
2035
|
-
}
|
|
2036
|
-
|
|
2037
2018
|
// src/handlers/retention.ts
|
|
2038
2019
|
function getRetentionSecret() {
|
|
2039
2020
|
return process.env.JUNIOR_SCHEDULER_SECRET?.trim() || process.env.CRON_SECRET?.trim();
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pluginCatalogRuntime
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-YEZS4TEY.js";
|
|
4
|
+
import "./chunk-EQ6Y37MD.js";
|
|
5
5
|
import "./chunk-BDUENQD3.js";
|
|
6
6
|
import "./chunk-V7YE4WCP.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-KSZXVR5G.js";
|
|
8
8
|
import "./chunk-6GWA276C.js";
|
|
9
9
|
import "./chunk-OOUNJNMR.js";
|
|
10
10
|
import "./chunk-H4HBKISO.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-6GJCOUTA.js";
|
|
12
|
+
import "./chunk-IXYGGJRA.js";
|
|
13
13
|
import "./chunk-MLKGABMK.js";
|
|
14
14
|
export {
|
|
15
15
|
pluginCatalogRuntime
|
|
@@ -86,8 +86,8 @@ export declare const agentInvocationSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
86
86
|
conversationId: z.ZodString;
|
|
87
87
|
}, z.core.$strict>], "platform">;
|
|
88
88
|
destinationVisibility: z.ZodOptional<z.ZodEnum<{
|
|
89
|
-
public: "public";
|
|
90
89
|
private: "private";
|
|
90
|
+
public: "public";
|
|
91
91
|
}>>;
|
|
92
92
|
input: z.ZodString;
|
|
93
93
|
invocationId: z.ZodString;
|
|
@@ -108,8 +108,8 @@ export declare const agentInvocationSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
108
108
|
teamId: z.ZodString;
|
|
109
109
|
channelId: z.ZodString;
|
|
110
110
|
visibility: z.ZodEnum<{
|
|
111
|
-
public: "public";
|
|
112
111
|
private: "private";
|
|
112
|
+
public: "public";
|
|
113
113
|
}>;
|
|
114
114
|
messageTs: z.ZodOptional<z.ZodString>;
|
|
115
115
|
threadTs: z.ZodOptional<z.ZodString>;
|
|
@@ -120,8 +120,8 @@ export declare const agentInvocationSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
120
120
|
}, z.core.$strict>, z.ZodObject<{
|
|
121
121
|
platform: z.ZodLiteral<"web">;
|
|
122
122
|
visibility: z.ZodEnum<{
|
|
123
|
-
public: "public";
|
|
124
123
|
private: "private";
|
|
124
|
+
public: "public";
|
|
125
125
|
}>;
|
|
126
126
|
conversationId: z.ZodString;
|
|
127
127
|
}, z.core.$strict>], "platform">;
|
|
@@ -211,8 +211,8 @@ export declare const agentInvocationSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
211
211
|
conversationId: z.ZodString;
|
|
212
212
|
}, z.core.$strict>], "platform">;
|
|
213
213
|
destinationVisibility: z.ZodOptional<z.ZodEnum<{
|
|
214
|
-
public: "public";
|
|
215
214
|
private: "private";
|
|
215
|
+
public: "public";
|
|
216
216
|
}>>;
|
|
217
217
|
input: z.ZodString;
|
|
218
218
|
invocationId: z.ZodString;
|
|
@@ -233,8 +233,8 @@ export declare const agentInvocationSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
233
233
|
teamId: z.ZodString;
|
|
234
234
|
channelId: z.ZodString;
|
|
235
235
|
visibility: z.ZodEnum<{
|
|
236
|
-
public: "public";
|
|
237
236
|
private: "private";
|
|
237
|
+
public: "public";
|
|
238
238
|
}>;
|
|
239
239
|
messageTs: z.ZodOptional<z.ZodString>;
|
|
240
240
|
threadTs: z.ZodOptional<z.ZodString>;
|
|
@@ -245,8 +245,8 @@ export declare const agentInvocationSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
245
245
|
}, z.core.$strict>, z.ZodObject<{
|
|
246
246
|
platform: z.ZodLiteral<"web">;
|
|
247
247
|
visibility: z.ZodEnum<{
|
|
248
|
-
public: "public";
|
|
249
248
|
private: "private";
|
|
249
|
+
public: "public";
|
|
250
250
|
}>;
|
|
251
251
|
conversationId: z.ZodString;
|
|
252
252
|
}, z.core.$strict>], "platform">;
|
|
@@ -334,8 +334,8 @@ export declare const agentInvocationSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
334
334
|
conversationId: z.ZodString;
|
|
335
335
|
}, z.core.$strict>], "platform">;
|
|
336
336
|
destinationVisibility: z.ZodOptional<z.ZodEnum<{
|
|
337
|
-
public: "public";
|
|
338
337
|
private: "private";
|
|
338
|
+
public: "public";
|
|
339
339
|
}>>;
|
|
340
340
|
input: z.ZodString;
|
|
341
341
|
invocationId: z.ZodString;
|
|
@@ -356,8 +356,8 @@ export declare const agentInvocationSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
356
356
|
teamId: z.ZodString;
|
|
357
357
|
channelId: z.ZodString;
|
|
358
358
|
visibility: z.ZodEnum<{
|
|
359
|
-
public: "public";
|
|
360
359
|
private: "private";
|
|
360
|
+
public: "public";
|
|
361
361
|
}>;
|
|
362
362
|
messageTs: z.ZodOptional<z.ZodString>;
|
|
363
363
|
threadTs: z.ZodOptional<z.ZodString>;
|
|
@@ -368,8 +368,8 @@ export declare const agentInvocationSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
368
368
|
}, z.core.$strict>, z.ZodObject<{
|
|
369
369
|
platform: z.ZodLiteral<"web">;
|
|
370
370
|
visibility: z.ZodEnum<{
|
|
371
|
-
public: "public";
|
|
372
371
|
private: "private";
|
|
372
|
+
public: "public";
|
|
373
373
|
}>;
|
|
374
374
|
conversationId: z.ZodString;
|
|
375
375
|
}, z.core.$strict>], "platform">;
|
|
@@ -459,8 +459,8 @@ export declare const createAgentInvocationSchema: z.ZodObject<{
|
|
|
459
459
|
conversationId: z.ZodString;
|
|
460
460
|
}, z.core.$strict>], "platform">;
|
|
461
461
|
destinationVisibility: z.ZodOptional<z.ZodEnum<{
|
|
462
|
-
public: "public";
|
|
463
462
|
private: "private";
|
|
463
|
+
public: "public";
|
|
464
464
|
}>>;
|
|
465
465
|
idempotencyKey: z.ZodString;
|
|
466
466
|
input: z.ZodString;
|
|
@@ -477,8 +477,8 @@ export declare const createAgentInvocationSchema: z.ZodObject<{
|
|
|
477
477
|
teamId: z.ZodString;
|
|
478
478
|
channelId: z.ZodString;
|
|
479
479
|
visibility: z.ZodEnum<{
|
|
480
|
-
public: "public";
|
|
481
480
|
private: "private";
|
|
481
|
+
public: "public";
|
|
482
482
|
}>;
|
|
483
483
|
messageTs: z.ZodOptional<z.ZodString>;
|
|
484
484
|
threadTs: z.ZodOptional<z.ZodString>;
|
|
@@ -489,8 +489,8 @@ export declare const createAgentInvocationSchema: z.ZodObject<{
|
|
|
489
489
|
}, z.core.$strict>, z.ZodObject<{
|
|
490
490
|
platform: z.ZodLiteral<"web">;
|
|
491
491
|
visibility: z.ZodEnum<{
|
|
492
|
-
public: "public";
|
|
493
492
|
private: "private";
|
|
493
|
+
public: "public";
|
|
494
494
|
}>;
|
|
495
495
|
conversationId: z.ZodString;
|
|
496
496
|
}, z.core.$strict>], "platform">;
|
|
@@ -8,5 +8,7 @@ export interface AttachmentWrite {
|
|
|
8
8
|
export interface AttachmentStorage {
|
|
9
9
|
readonly provider: string;
|
|
10
10
|
put(input: AttachmentWrite): Promise<void>;
|
|
11
|
+
/** Return live object bytes, or null when the key is missing. */
|
|
12
|
+
get(key: string): Promise<ReadableStream<Uint8Array> | null>;
|
|
11
13
|
delete(keys: string[]): Promise<void>;
|
|
12
14
|
}
|
|
@@ -4,6 +4,16 @@ import type { AttachmentStorage } from "./storage";
|
|
|
4
4
|
export interface StoredAttachment {
|
|
5
5
|
id: string;
|
|
6
6
|
}
|
|
7
|
+
/** Live conversation-owned attachment metadata. */
|
|
8
|
+
export interface AttachmentRecord {
|
|
9
|
+
bytes: number;
|
|
10
|
+
contentType: string;
|
|
11
|
+
conversationId: string;
|
|
12
|
+
filename: string;
|
|
13
|
+
id: string;
|
|
14
|
+
provider: string;
|
|
15
|
+
storageKey: string;
|
|
16
|
+
}
|
|
7
17
|
export interface AttachmentGarbageCollectionResult {
|
|
8
18
|
deleted: number;
|
|
9
19
|
}
|
|
@@ -26,6 +36,12 @@ export declare function storeAttachment(args: {
|
|
|
26
36
|
nowMs?: number;
|
|
27
37
|
storage: AttachmentStorage;
|
|
28
38
|
}): Promise<StoredAttachment>;
|
|
39
|
+
/** Load one live attachment owned by a conversation. */
|
|
40
|
+
export declare function readLiveAttachment(args: {
|
|
41
|
+
attachmentId: string;
|
|
42
|
+
conversationId: string;
|
|
43
|
+
db: JuniorSqlDatabase;
|
|
44
|
+
}): Promise<AttachmentRecord | null>;
|
|
29
45
|
/** Persist many conversation-owned files. */
|
|
30
46
|
export declare function storeAttachments(args: {
|
|
31
47
|
conversationId: string;
|
|
@@ -92,7 +92,7 @@ export declare function requireEventTaskSlackContext(context: ToolRuntimeContext
|
|
|
92
92
|
platform: "slack";
|
|
93
93
|
teamId: string;
|
|
94
94
|
channelId: string;
|
|
95
|
-
visibility: "
|
|
95
|
+
visibility: "private" | "public";
|
|
96
96
|
messageTs?: string | undefined;
|
|
97
97
|
threadTs?: string | undefined;
|
|
98
98
|
};
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
export type ConversationWork = {
|
|
2
2
|
assignedIds: string[];
|
|
3
|
+
/** Latest finish time per conversation, used with activity for Priority. */
|
|
4
|
+
finishedAtById: Record<string, string>;
|
|
3
5
|
unfinishedIds: string[];
|
|
4
6
|
};
|
|
5
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* Return assigned and unfinished plugin work for the candidate conversations.
|
|
9
|
+
* Feed Priority combines these signals with conversation activity on the host.
|
|
10
|
+
*/
|
|
6
11
|
export declare function listConversationWork(conversationIds: string[]): Promise<ConversationWork>;
|
|
7
12
|
/** Return candidate conversations that have unfinished plugin work. */
|
|
8
13
|
export declare function listUnfinishedWork(conversationIds: string[]): Promise<string[]>;
|
|
@@ -41,8 +41,8 @@ declare const compactTaskResultSchema: z.ZodObject<{
|
|
|
41
41
|
group: "group";
|
|
42
42
|
}>;
|
|
43
43
|
visibility: z.ZodEnum<{
|
|
44
|
-
public: "public";
|
|
45
44
|
private: "private";
|
|
45
|
+
public: "public";
|
|
46
46
|
}>;
|
|
47
47
|
}, z.core.$strict>;
|
|
48
48
|
credential_mode: z.ZodEnum<{
|
|
@@ -86,8 +86,8 @@ export declare const scheduleTaskToolResultSchema: z.ZodObject<{
|
|
|
86
86
|
group: "group";
|
|
87
87
|
}>;
|
|
88
88
|
visibility: z.ZodEnum<{
|
|
89
|
-
public: "public";
|
|
90
89
|
private: "private";
|
|
90
|
+
public: "public";
|
|
91
91
|
}>;
|
|
92
92
|
}, z.core.$strict>;
|
|
93
93
|
credential_mode: z.ZodEnum<{
|
|
@@ -131,8 +131,8 @@ export declare const scheduleListToolResultSchema: z.ZodObject<{
|
|
|
131
131
|
group: "group";
|
|
132
132
|
}>;
|
|
133
133
|
visibility: z.ZodEnum<{
|
|
134
|
-
public: "public";
|
|
135
134
|
private: "private";
|
|
135
|
+
public: "public";
|
|
136
136
|
}>;
|
|
137
137
|
}, z.core.$strict>;
|
|
138
138
|
credential_mode: z.ZodEnum<{
|
|
@@ -181,7 +181,7 @@ export declare function scheduleTaskToolResult(target: string, task: CompactTask
|
|
|
181
181
|
};
|
|
182
182
|
conversation_access: {
|
|
183
183
|
audience: "channel" | "direct" | "group";
|
|
184
|
-
visibility: "
|
|
184
|
+
visibility: "private" | "public";
|
|
185
185
|
};
|
|
186
186
|
credential_mode: "system" | "creator";
|
|
187
187
|
dashboard_url: string | null;
|
|
@@ -211,7 +211,7 @@ export declare function scheduleListToolResult(args: {
|
|
|
211
211
|
};
|
|
212
212
|
conversation_access: {
|
|
213
213
|
audience: "channel" | "direct" | "group";
|
|
214
|
-
visibility: "
|
|
214
|
+
visibility: "private" | "public";
|
|
215
215
|
};
|
|
216
216
|
credential_mode: "system" | "creator";
|
|
217
217
|
dashboard_url: string | null;
|
|
@@ -48,7 +48,7 @@ export declare function createSlackScheduleCreateTaskTool(context: SchedulerTool
|
|
|
48
48
|
};
|
|
49
49
|
conversation_access: {
|
|
50
50
|
audience: "channel" | "direct" | "group";
|
|
51
|
-
visibility: "
|
|
51
|
+
visibility: "private" | "public";
|
|
52
52
|
};
|
|
53
53
|
credential_mode: "system" | "creator";
|
|
54
54
|
dashboard_url: string | null;
|
|
@@ -78,7 +78,7 @@ export declare function createSlackScheduleCreateTaskTool(context: SchedulerTool
|
|
|
78
78
|
};
|
|
79
79
|
conversation_access: {
|
|
80
80
|
audience: "channel" | "direct" | "group";
|
|
81
|
-
visibility: "
|
|
81
|
+
visibility: "private" | "public";
|
|
82
82
|
};
|
|
83
83
|
credential_mode: "system" | "creator";
|
|
84
84
|
dashboard_url: string | null;
|
|
@@ -23,7 +23,7 @@ export declare function createSlackScheduleDeleteTaskTool(context: SchedulerTool
|
|
|
23
23
|
};
|
|
24
24
|
conversation_access: {
|
|
25
25
|
audience: "channel" | "direct" | "group";
|
|
26
|
-
visibility: "
|
|
26
|
+
visibility: "private" | "public";
|
|
27
27
|
};
|
|
28
28
|
credential_mode: "system" | "creator";
|
|
29
29
|
dashboard_url: string | null;
|
|
@@ -53,7 +53,7 @@ export declare function createSlackScheduleDeleteTaskTool(context: SchedulerTool
|
|
|
53
53
|
};
|
|
54
54
|
conversation_access: {
|
|
55
55
|
audience: "channel" | "direct" | "group";
|
|
56
|
-
visibility: "
|
|
56
|
+
visibility: "private" | "public";
|
|
57
57
|
};
|
|
58
58
|
credential_mode: "system" | "creator";
|
|
59
59
|
dashboard_url: string | null;
|
|
@@ -24,7 +24,7 @@ export declare function createSlackScheduleListTasksTool(context: SchedulerToolC
|
|
|
24
24
|
};
|
|
25
25
|
conversation_access: {
|
|
26
26
|
audience: "channel" | "direct" | "group";
|
|
27
|
-
visibility: "
|
|
27
|
+
visibility: "private" | "public";
|
|
28
28
|
};
|
|
29
29
|
credential_mode: "system" | "creator";
|
|
30
30
|
dashboard_url: string | null;
|
|
@@ -54,7 +54,7 @@ export declare function createSlackScheduleListTasksTool(context: SchedulerToolC
|
|
|
54
54
|
};
|
|
55
55
|
conversation_access: {
|
|
56
56
|
audience: "channel" | "direct" | "group";
|
|
57
|
-
visibility: "
|
|
57
|
+
visibility: "private" | "public";
|
|
58
58
|
};
|
|
59
59
|
credential_mode: "system" | "creator";
|
|
60
60
|
dashboard_url: string | null;
|
|
@@ -23,7 +23,7 @@ export declare function createSlackScheduleRunTaskNowTool(context: SchedulerTool
|
|
|
23
23
|
};
|
|
24
24
|
conversation_access: {
|
|
25
25
|
audience: "channel" | "direct" | "group";
|
|
26
|
-
visibility: "
|
|
26
|
+
visibility: "private" | "public";
|
|
27
27
|
};
|
|
28
28
|
credential_mode: "system" | "creator";
|
|
29
29
|
dashboard_url: string | null;
|
|
@@ -53,7 +53,7 @@ export declare function createSlackScheduleRunTaskNowTool(context: SchedulerTool
|
|
|
53
53
|
};
|
|
54
54
|
conversation_access: {
|
|
55
55
|
audience: "channel" | "direct" | "group";
|
|
56
|
-
visibility: "
|
|
56
|
+
visibility: "private" | "public";
|
|
57
57
|
};
|
|
58
58
|
credential_mode: "system" | "creator";
|
|
59
59
|
dashboard_url: string | null;
|
|
@@ -50,7 +50,7 @@ export declare function createSlackScheduleUpdateTaskTool(context: SchedulerTool
|
|
|
50
50
|
};
|
|
51
51
|
conversation_access: {
|
|
52
52
|
audience: "channel" | "direct" | "group";
|
|
53
|
-
visibility: "
|
|
53
|
+
visibility: "private" | "public";
|
|
54
54
|
};
|
|
55
55
|
credential_mode: "system" | "creator";
|
|
56
56
|
dashboard_url: string | null;
|
|
@@ -80,7 +80,7 @@ export declare function createSlackScheduleUpdateTaskTool(context: SchedulerTool
|
|
|
80
80
|
};
|
|
81
81
|
conversation_access: {
|
|
82
82
|
audience: "channel" | "direct" | "group";
|
|
83
|
-
visibility: "
|
|
83
|
+
visibility: "private" | "public";
|
|
84
84
|
};
|
|
85
85
|
credential_mode: "system" | "creator";
|
|
86
86
|
dashboard_url: string | null;
|
|
@@ -72,9 +72,9 @@ declare const slackConversationMessageMetadataSchema: z.ZodUnion<readonly [z.Zod
|
|
|
72
72
|
adapterName: z.ZodLiteral<"slack">;
|
|
73
73
|
channelId: z.ZodString;
|
|
74
74
|
channelVisibility: z.ZodOptional<z.ZodEnum<{
|
|
75
|
+
private: "private";
|
|
75
76
|
unknown: "unknown";
|
|
76
77
|
external: "external";
|
|
77
|
-
private: "private";
|
|
78
78
|
workspace: "workspace";
|
|
79
79
|
}>>;
|
|
80
80
|
currentMessage: z.ZodOptional<z.ZodObject<{
|
|
@@ -182,9 +182,9 @@ declare const slackConversationMessageMetadataSchema: z.ZodUnion<readonly [z.Zod
|
|
|
182
182
|
adapterName: z.ZodLiteral<"slack">;
|
|
183
183
|
channelId: z.ZodString;
|
|
184
184
|
channelVisibility: z.ZodOptional<z.ZodEnum<{
|
|
185
|
+
private: "private";
|
|
185
186
|
unknown: "unknown";
|
|
186
187
|
external: "external";
|
|
187
|
-
private: "private";
|
|
188
188
|
workspace: "workspace";
|
|
189
189
|
}>>;
|
|
190
190
|
currentMessage: z.ZodOptional<z.ZodObject<{
|