@sentry/junior 0.180.0 → 0.181.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-DKDDRKZA.js → agent-hooks-IQUW6ERD.js} +11 -11
- package/dist/api/schema/workspace.d.ts +2 -0
- package/dist/api/schema.js +1 -1
- package/dist/api.js +32 -31
- package/dist/app.js +34 -34
- package/dist/{catalog-runtime-WXKGUF3W.js → catalog-runtime-PMQWNIXA.js} +4 -4
- package/dist/chat/plugins/agent-hooks.d.ts +1 -1
- package/dist/chat/services/turn-session-routing.d.ts +1 -0
- package/dist/chat/tools/types.d.ts +2 -0
- package/dist/chat/workspaces/types.d.ts +2 -0
- package/dist/{chunk-LGVQLNLS.js → chunk-3KCQEG6W.js} +8 -8
- package/dist/{chunk-CK6EINVZ.js → chunk-3KSSALN4.js} +5 -5
- package/dist/{chunk-VG722ONZ.js → chunk-3X55QRAG.js} +6 -6
- package/dist/{chunk-2YIRH4E3.js → chunk-4IX32NSL.js} +1 -1
- package/dist/{chunk-TKB25A3L.js → chunk-CZYNWPWD.js} +2 -1
- package/dist/{chunk-DHLOGWYH.js → chunk-D6ZD7VXP.js} +19 -8
- package/dist/{chunk-KCL6AWYW.js → chunk-DSA6WTRP.js} +19 -19
- package/dist/{chunk-RAZG3YHC.js → chunk-EBMRB6Z6.js} +1 -1
- package/dist/{chunk-VGPPWWHF.js → chunk-EM7EECT5.js} +2 -2
- package/dist/{chunk-6YCEWOLO.js → chunk-ETJTXYHY.js} +1 -1
- package/dist/{chunk-MXEUIGHO.js → chunk-EU7KJDOG.js} +1 -1
- package/dist/{chunk-5TUR4M3M.js → chunk-FWILPBVQ.js} +5 -5
- package/dist/{chunk-ZE2KOV3G.js → chunk-GPA3ZSYY.js} +1 -1
- package/dist/{chunk-SDBKZ5LV.js → chunk-GREV5PJK.js} +4 -4
- package/dist/{chunk-3ILJBWP7.js → chunk-GWFRPQNP.js} +17 -12
- package/dist/{chunk-DRHEGXTZ.js → chunk-HEBMSITT.js} +1 -1
- package/dist/{chunk-GUKXEPMX.js → chunk-HJ27A6YB.js} +1 -1
- package/dist/{chunk-IANUX7HX.js → chunk-HZHUMCNV.js} +1 -1
- package/dist/{chunk-QSO7B5JO.js → chunk-IJ6SS4WB.js} +1 -1
- package/dist/{chunk-2AYEVN7K.js → chunk-IKKETMQC.js} +3 -3
- package/dist/{chunk-FGC3PHNH.js → chunk-KKSVCHDO.js} +8 -1
- package/dist/{chunk-WVAMRKYG.js → chunk-KMBU4PJP.js} +3 -3
- package/dist/{chunk-U5EUCUBH.js → chunk-KQZX24QQ.js} +3 -3
- package/dist/{chunk-TC5DE5KJ.js → chunk-LCNPXLE7.js} +7 -7
- package/dist/{chunk-O4QYZTDK.js → chunk-LG5MYY6U.js} +6 -6
- package/dist/{chunk-EWHP2IRG.js → chunk-LZOQFC5F.js} +5 -5
- package/dist/{chunk-GPXAHUQH.js → chunk-NQTA72Q3.js} +6 -6
- package/dist/{chunk-5PUMIMNQ.js → chunk-PBKZQAUA.js} +53 -33
- package/dist/{chunk-GA5NS74S.js → chunk-PL57B6NC.js} +1 -1
- package/dist/{chunk-CP73FKME.js → chunk-PPYDHUEL.js} +13 -13
- package/dist/{chunk-L7LTGN4Z.js → chunk-Q2KY27IX.js} +4 -4
- package/dist/{chunk-S7YRTOSQ.js → chunk-RNMASWLP.js} +3 -3
- package/dist/{chunk-CCDXTDSY.js → chunk-TDT2R77B.js} +1 -1
- package/dist/{chunk-ZM7ZURJS.js → chunk-TJHSAHQN.js} +1 -1
- package/dist/{chunk-I6IFTAPF.js → chunk-XYTJUHRZ.js} +2 -2
- package/dist/cli/chat.js +32 -32
- 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/snapshots.d.ts +17 -0
- package/dist/db/schema.d.ts +17 -0
- package/dist/{db-6SBHIAJK.js → db-QNPVCQPT.js} +6 -6
- package/dist/instrumentation.js +3 -3
- package/dist/nitro.js +6 -6
- package/dist/{oauth-callback-server-WSDQPZZS.js → oauth-callback-server-KYMPJOTC.js} +25 -25
- package/dist/{runner-GWTSWESR.js → runner-3RS2D2ZR.js} +18 -18
- package/dist/{skills-F32BPFYW.js → skills-5B3Y6XX6.js} +5 -5
- package/dist/spawn-VYARS3DU.js +37 -0
- package/dist/task-runner-4IXKKZHL.js +32 -0
- package/dist/{validation-62WO524A.js → validation-Q65QD27B.js} +5 -5
- package/dist/version.js +1 -1
- package/dist/{work-3C3CMZ24.js → work-DCMQWAAP.js} +18 -18
- package/dist/worker-QL3CHLZL.js +22 -0
- package/migrations/0035_workspace_snapshot_size_bytes.sql +2 -0
- package/migrations/meta/0035_snapshot.json +3048 -0
- package/migrations/meta/_journal.json +7 -0
- package/package.json +5 -5
- package/dist/spawn-X5BPP5OE.js +0 -37
- package/dist/task-runner-2FPBV5PP.js +0 -32
- package/dist/worker-MFAI6ZEK.js +0 -22
|
@@ -2,29 +2,29 @@ import {
|
|
|
2
2
|
coerceThreadConversationState,
|
|
3
3
|
getPersistedThreadState,
|
|
4
4
|
persistThreadStateById
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FWILPBVQ.js";
|
|
6
6
|
import {
|
|
7
7
|
buildDeterministicTurnId,
|
|
8
8
|
clearPendingAuth,
|
|
9
9
|
markTurnClosed,
|
|
10
10
|
markTurnCompleted
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-HJ27A6YB.js";
|
|
12
12
|
import {
|
|
13
13
|
hydrateConversationMessages,
|
|
14
14
|
markConversationMessage
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-NQTA72Q3.js";
|
|
16
16
|
import {
|
|
17
17
|
ProviderError,
|
|
18
18
|
findProviderError,
|
|
19
19
|
getProviderErrorAttributes,
|
|
20
20
|
getProviderErrorUserMessage
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-XYTJUHRZ.js";
|
|
22
22
|
import {
|
|
23
23
|
parseSlackMessageTs
|
|
24
24
|
} from "./chunk-N7TMSOZH.js";
|
|
25
25
|
import {
|
|
26
26
|
buildTurnFailureResponse
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-EBMRB6Z6.js";
|
|
28
28
|
|
|
29
29
|
// src/chat/runtime/delivered-turn-state.ts
|
|
30
30
|
function buildDeliveredTurnStatePatch(args) {
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-PDO5BLNM.js";
|
|
4
4
|
import {
|
|
5
5
|
ToolInputError
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-D6ZD7VXP.js";
|
|
7
7
|
import {
|
|
8
8
|
agentHistoryItemSchema,
|
|
9
9
|
bindProviderConversation,
|
|
@@ -16,25 +16,25 @@ import {
|
|
|
16
16
|
instructionProvenanceFor,
|
|
17
17
|
sanitizePostgresJson,
|
|
18
18
|
withConversationEventLock
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-RNMASWLP.js";
|
|
20
20
|
import {
|
|
21
21
|
SANDBOX_REPOS_ROOT,
|
|
22
22
|
SANDBOX_WORKSPACE_ROOT,
|
|
23
23
|
sleep
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-KMBU4PJP.js";
|
|
25
25
|
import {
|
|
26
26
|
MUTATION_LOCK_TTL_MS,
|
|
27
27
|
fenceLock,
|
|
28
28
|
getStateAdapter,
|
|
29
29
|
withLock
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-PL57B6NC.js";
|
|
31
31
|
import {
|
|
32
32
|
botConfig,
|
|
33
33
|
completeText,
|
|
34
34
|
escapeXml,
|
|
35
35
|
resolveGatewayModel,
|
|
36
36
|
unwrapCurrentInstruction
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-XYTJUHRZ.js";
|
|
38
38
|
import {
|
|
39
39
|
parseSlackMessageTs,
|
|
40
40
|
toStoredSlackActor
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
logException,
|
|
45
45
|
logWarn,
|
|
46
46
|
setSpanAttributes
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-EBMRB6Z6.js";
|
|
48
48
|
|
|
49
49
|
// src/chat/turn-context-tag.ts
|
|
50
50
|
var TURN_CONTEXT_TAG = "runtime-turn-context";
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
PluginCredentialFailureError,
|
|
8
8
|
agentNameSchema,
|
|
9
9
|
createPluginAuthOrchestration
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-3X55QRAG.js";
|
|
11
11
|
import {
|
|
12
12
|
parseSandboxEgressAuthRequiredSignal,
|
|
13
13
|
parseSandboxEgressPermissionDeniedSignal,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
searchSlackUsers,
|
|
39
39
|
selectPluginGrant,
|
|
40
40
|
toMcpProviderError
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-3KCQEG6W.js";
|
|
42
42
|
import {
|
|
43
43
|
RetryableDeliveryError,
|
|
44
44
|
actorFromRun,
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
getSlackMessagePermalink,
|
|
55
55
|
resolveBaseUrl,
|
|
56
56
|
uploadFilesToConversation
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-LG5MYY6U.js";
|
|
58
58
|
import {
|
|
59
59
|
SCHEDULED_TASK_SYSTEM_ACTOR,
|
|
60
60
|
compactEventTask,
|
|
@@ -88,13 +88,13 @@ import {
|
|
|
88
88
|
saveScheduledTask,
|
|
89
89
|
storeAttachments,
|
|
90
90
|
writableEventTask
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-3KSSALN4.js";
|
|
92
92
|
import {
|
|
93
93
|
parseSlackThreadId
|
|
94
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-TDT2R77B.js";
|
|
95
95
|
import {
|
|
96
96
|
appendAndEnqueueInboundMessage
|
|
97
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-Q2KY27IX.js";
|
|
98
98
|
import {
|
|
99
99
|
CooperativeTurnYieldError,
|
|
100
100
|
NO_REPLY_MARKER,
|
|
@@ -109,7 +109,7 @@ import {
|
|
|
109
109
|
isTurnInputCommitLostError,
|
|
110
110
|
isTurnInputDeferredError,
|
|
111
111
|
sanitizeAssistantText
|
|
112
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-HJ27A6YB.js";
|
|
113
113
|
import {
|
|
114
114
|
AGENTS_REMOVAL_NOTICE,
|
|
115
115
|
AGENTS_REPLACEMENT_NOTICE,
|
|
@@ -168,7 +168,7 @@ import {
|
|
|
168
168
|
stripRuntimeTurnContext,
|
|
169
169
|
trimTrailingAssistantMessages,
|
|
170
170
|
truncateText
|
|
171
|
-
} from "./chunk-
|
|
171
|
+
} from "./chunk-NQTA72Q3.js";
|
|
172
172
|
import {
|
|
173
173
|
bindSandboxFileSystem,
|
|
174
174
|
createSandboxSession,
|
|
@@ -179,7 +179,7 @@ import {
|
|
|
179
179
|
resolve,
|
|
180
180
|
setSnapshotSpanAttributes,
|
|
181
181
|
stopSession
|
|
182
|
-
} from "./chunk-
|
|
182
|
+
} from "./chunk-IKKETMQC.js";
|
|
183
183
|
import {
|
|
184
184
|
privateTraceResultAttributes
|
|
185
185
|
} from "./chunk-UIE3R5XU.js";
|
|
@@ -192,7 +192,7 @@ import {
|
|
|
192
192
|
} from "./chunk-DKIJ2RP5.js";
|
|
193
193
|
import {
|
|
194
194
|
getTurnRequestDeadline
|
|
195
|
-
} from "./chunk-
|
|
195
|
+
} from "./chunk-GPA3ZSYY.js";
|
|
196
196
|
import {
|
|
197
197
|
RESOURCE_SUBSCRIPTION_DEFAULT_TTL_MS,
|
|
198
198
|
RESOURCE_SUBSCRIPTION_MAX_TTL_MS,
|
|
@@ -242,7 +242,7 @@ import {
|
|
|
242
242
|
updateWorkspace,
|
|
243
243
|
withSlackRetries,
|
|
244
244
|
workspaceRepoCheckoutPath
|
|
245
|
-
} from "./chunk-
|
|
245
|
+
} from "./chunk-D6ZD7VXP.js";
|
|
246
246
|
import {
|
|
247
247
|
KNOWN_CONVERSATION_EVENT_TYPES,
|
|
248
248
|
contextProvenance,
|
|
@@ -256,12 +256,12 @@ import {
|
|
|
256
256
|
instructionProvenanceFor,
|
|
257
257
|
requireSlackDestination,
|
|
258
258
|
sameActorIdentity
|
|
259
|
-
} from "./chunk-
|
|
259
|
+
} from "./chunk-RNMASWLP.js";
|
|
260
260
|
import {
|
|
261
261
|
juniorArtifacts,
|
|
262
262
|
juniorIdentities,
|
|
263
263
|
juniorSchedulerRuns
|
|
264
|
-
} from "./chunk-
|
|
264
|
+
} from "./chunk-KKSVCHDO.js";
|
|
265
265
|
import {
|
|
266
266
|
SANDBOX_DATA_ROOT,
|
|
267
267
|
SANDBOX_REPOS_ROOT,
|
|
@@ -288,12 +288,12 @@ import {
|
|
|
288
288
|
sleep,
|
|
289
289
|
throwSandboxOperationError,
|
|
290
290
|
wrapSandboxSetupError
|
|
291
|
-
} from "./chunk-
|
|
291
|
+
} from "./chunk-KMBU4PJP.js";
|
|
292
292
|
import {
|
|
293
293
|
fenceLock,
|
|
294
294
|
getStateAdapter,
|
|
295
295
|
withLock
|
|
296
|
-
} from "./chunk-
|
|
296
|
+
} from "./chunk-PL57B6NC.js";
|
|
297
297
|
import {
|
|
298
298
|
ACTIVE_TURN_COMPACTION_SUMMARY_PREFIX,
|
|
299
299
|
COMPACTION_SUMMARY_PREFIX,
|
|
@@ -324,7 +324,7 @@ import {
|
|
|
324
324
|
resolveGatewayCredential,
|
|
325
325
|
resolveGatewayModel,
|
|
326
326
|
unwrapCurrentInstruction
|
|
327
|
-
} from "./chunk-
|
|
327
|
+
} from "./chunk-XYTJUHRZ.js";
|
|
328
328
|
import {
|
|
329
329
|
canExposeConversationPayload,
|
|
330
330
|
resolveConversationPrivacy,
|
|
@@ -334,16 +334,16 @@ import {
|
|
|
334
334
|
toGenAiMessagesTraceAttributes,
|
|
335
335
|
toGenAiPayloadMetadata,
|
|
336
336
|
toGenAiPayloadTraceAttributes
|
|
337
|
-
} from "./chunk-
|
|
337
|
+
} from "./chunk-ETJTXYHY.js";
|
|
338
338
|
import {
|
|
339
339
|
discoverSkills,
|
|
340
340
|
findSkillByName,
|
|
341
341
|
loadSkillsByName,
|
|
342
342
|
parseSkillInvocation
|
|
343
|
-
} from "./chunk-
|
|
343
|
+
} from "./chunk-EM7EECT5.js";
|
|
344
344
|
import {
|
|
345
345
|
pluginCatalogRuntime
|
|
346
|
-
} from "./chunk-
|
|
346
|
+
} from "./chunk-HEBMSITT.js";
|
|
347
347
|
import {
|
|
348
348
|
CredentialUnavailableError,
|
|
349
349
|
OAuthProviderError,
|
|
@@ -351,7 +351,7 @@ import {
|
|
|
351
351
|
getOAuthProviderErrorAttributes,
|
|
352
352
|
resolveAuthTokenPlaceholder,
|
|
353
353
|
resolvePluginCommandEnv
|
|
354
|
-
} from "./chunk-
|
|
354
|
+
} from "./chunk-4IX32NSL.js";
|
|
355
355
|
import {
|
|
356
356
|
credentialContextForActor,
|
|
357
357
|
credentialUserSubjectId
|
|
@@ -391,7 +391,7 @@ import {
|
|
|
391
391
|
summarizeMessageText,
|
|
392
392
|
withLogContext,
|
|
393
393
|
withSpan
|
|
394
|
-
} from "./chunk-
|
|
394
|
+
} from "./chunk-EBMRB6Z6.js";
|
|
395
395
|
import {
|
|
396
396
|
startInactiveSpan,
|
|
397
397
|
withActiveSpan
|
|
@@ -2670,7 +2670,7 @@ var TOOL_POLICY_RULES = [
|
|
|
2670
2670
|
"- If a sandbox-backed tool reports that sandbox execution is unavailable, treat that as a blocker for local file/shell inspection; do not pretend host files were inspected.",
|
|
2671
2671
|
"- For user-provided URLs, use `webFetch`; for discovery, use `webSearch` then fetch/read promising sources; for current time/date context, use `systemTime`.",
|
|
2672
2672
|
"- When searchResourceEventTypes is exposed, use it only when the user asks what resource events are supported or the required resource type or event name is unclear. It discovers options but does not watch a resource or create a task. When explaining how results can be used, distinguish temporary current-thread watches from durable event tasks.",
|
|
2673
|
-
"- When a tool result includes a subscribable resource, use watchResourceEvents for
|
|
2673
|
+
"- When a tool result includes a subscription, those events are already watched; do not call watchResourceEvents for them. When a tool result includes a subscribable resource with suggestedEvents, use watchResourceEvents only for those remaining events that serve the current intent. If suggestedEvents is empty or omitted, do not invent a watch. Do not create scheduled polling tasks for events a watch can deliver. Write a concise intent summary, and tell the user when the temporary watch expires. Stop only the requested watch by id unless the user explicitly asks to stop every watch in the thread.",
|
|
2674
2674
|
"- Use createEventTask only when the user explicitly asks for an event task or durable whenever-this-happens-do-X automation. Ordinary watch, notify, and tell-me-when requests use watchResourceEvents. When an event task's resource and events are known, create it without redundant confirmation.",
|
|
2675
2675
|
"- Event tasks make the task creator's connected credentials available by default when the requested work needs user-bound authorization. Do not ask for separate confirmation merely to use credentials needed for the requested work. On creation, omit credentialMode for the creator default and set system only when the creator explicitly requires it. For later changes, creator always means the task's original createdBy actor, never the current requester. If the requester is not that creator, do not attempt to enable creator credential use or suggest that confirmation could authorize it.",
|
|
2676
2676
|
"- Event tasks are managed for the current Slack channel or DM, not one thread. When listing them, use createdBy to explain creator-only credential changes and warn when triggerAvailable is false; an unavailable task remains stored but cannot receive events until its plugin event is enabled again.",
|
|
@@ -4184,6 +4184,7 @@ async function finishBuild(workspace, value, signal, beforeWrite) {
|
|
|
4184
4184
|
0,
|
|
4185
4185
|
createdAtMs - build.startedAt.getTime()
|
|
4186
4186
|
);
|
|
4187
|
+
const sizeBytes = typeof snapshot.sizeBytes === "number" && Number.isFinite(snapshot.sizeBytes) && snapshot.sizeBytes >= 0 ? snapshot.sizeBytes : null;
|
|
4187
4188
|
await beforeWrite();
|
|
4188
4189
|
const result = await setWorkspaceSnapshot(
|
|
4189
4190
|
workspace.id,
|
|
@@ -4191,6 +4192,7 @@ async function finishBuild(workspace, value, signal, beforeWrite) {
|
|
|
4191
4192
|
id: snapshot.snapshotId,
|
|
4192
4193
|
generatedAt: new Date(createdAtMs),
|
|
4193
4194
|
buildDurationMs,
|
|
4195
|
+
sizeBytes,
|
|
4194
4196
|
profileHash: value.hash
|
|
4195
4197
|
},
|
|
4196
4198
|
{ buildId: build.id }
|
|
@@ -15284,7 +15286,9 @@ function createWriteFileTool() {
|
|
|
15284
15286
|
|
|
15285
15287
|
// src/chat/workspaces/tools.ts
|
|
15286
15288
|
import { z as z63 } from "zod";
|
|
15287
|
-
import {
|
|
15289
|
+
import {
|
|
15290
|
+
resourceEventSubscriptionResultSchema
|
|
15291
|
+
} from "@sentry/junior-plugin-api";
|
|
15288
15292
|
async function tryRecordWorkspaceSwitchStat(workspace) {
|
|
15289
15293
|
if (!process.env.DATABASE_URL) return;
|
|
15290
15294
|
try {
|
|
@@ -15336,6 +15340,18 @@ function view(workspace) {
|
|
|
15336
15340
|
}))
|
|
15337
15341
|
};
|
|
15338
15342
|
}
|
|
15343
|
+
function buildingWorkspaceResult(input) {
|
|
15344
|
+
return {
|
|
15345
|
+
workspace: input.workspace,
|
|
15346
|
+
status: "building",
|
|
15347
|
+
...input.subscription ? {
|
|
15348
|
+
subscription: {
|
|
15349
|
+
id: input.subscription.id,
|
|
15350
|
+
events: [...input.subscription.events]
|
|
15351
|
+
}
|
|
15352
|
+
} : void 0
|
|
15353
|
+
};
|
|
15354
|
+
}
|
|
15339
15355
|
function workspaceProviderNames() {
|
|
15340
15356
|
const providers = getPlugins().filter((plugin) => plugin.hooks?.workspacePrepare).map((plugin) => plugin.manifest.name).sort((left, right) => left.localeCompare(right));
|
|
15341
15357
|
if (providers.length === 0) return void 0;
|
|
@@ -15511,14 +15527,16 @@ function createWorkspaceTools(context) {
|
|
|
15511
15527
|
openWorldHint: true,
|
|
15512
15528
|
readOnlyHint: false
|
|
15513
15529
|
},
|
|
15514
|
-
description: "Replace the current sandbox with a named repository Workspace. Files in the old sandbox do not carry over.
|
|
15530
|
+
description: "Replace the current sandbox with a named repository Workspace. Files in the old sandbox do not carry over. Returns ready after the switch, or building when the snapshot is still being prepared.",
|
|
15515
15531
|
inputSchema: z63.object({
|
|
15516
15532
|
name: z63.string().trim().min(1).describe("Exact workspace name.")
|
|
15517
15533
|
}).strict(),
|
|
15518
15534
|
outputSchema: juniorToolOutputSchema.extend({
|
|
15519
15535
|
workspace: workspaceSchema,
|
|
15520
15536
|
status: z63.enum(["ready", "building"]),
|
|
15521
|
-
|
|
15537
|
+
subscription: resourceEventSubscriptionResultSchema.optional().describe(
|
|
15538
|
+
"Present when the snapshot ready and failed events are already watched for this conversation."
|
|
15539
|
+
)
|
|
15522
15540
|
}),
|
|
15523
15541
|
async execute({ name }, options) {
|
|
15524
15542
|
const workspace = await getWorkspaceByName(getDb(), name);
|
|
@@ -15548,11 +15566,10 @@ function createWorkspaceTools(context) {
|
|
|
15548
15566
|
const status = await ensureWorkspaceSnapshotBuild({ workspace });
|
|
15549
15567
|
if (status === "building") {
|
|
15550
15568
|
keepWatch = true;
|
|
15551
|
-
return {
|
|
15569
|
+
return buildingWorkspaceResult({
|
|
15552
15570
|
workspace: view(workspace),
|
|
15553
|
-
|
|
15554
|
-
|
|
15555
|
-
};
|
|
15571
|
+
subscription
|
|
15572
|
+
});
|
|
15556
15573
|
}
|
|
15557
15574
|
try {
|
|
15558
15575
|
await context.workspaces.switch(workspace, options.signal);
|
|
@@ -15560,11 +15577,10 @@ function createWorkspaceTools(context) {
|
|
|
15560
15577
|
if (!isWorkspaceSnapshotNotReadyError(error)) throw error;
|
|
15561
15578
|
await ensureWorkspaceSnapshotBuild({ workspace, sendAgain: true });
|
|
15562
15579
|
keepWatch = true;
|
|
15563
|
-
return {
|
|
15580
|
+
return buildingWorkspaceResult({
|
|
15564
15581
|
workspace: view(workspace),
|
|
15565
|
-
|
|
15566
|
-
|
|
15567
|
-
};
|
|
15582
|
+
subscription
|
|
15583
|
+
});
|
|
15568
15584
|
}
|
|
15569
15585
|
await tryRecordWorkspaceSwitchStat(workspace);
|
|
15570
15586
|
return {
|
|
@@ -18268,6 +18284,9 @@ async function wireAgentTools(args) {
|
|
|
18268
18284
|
const runSource = args.run.source;
|
|
18269
18285
|
const credentialUserId = args.run.credentialContext ? credentialUserSubjectId(args.run.credentialContext) : void 0;
|
|
18270
18286
|
const userTokenStore = createUserTokenStore();
|
|
18287
|
+
const conversation = await getConversationStore().get({
|
|
18288
|
+
conversationId: args.run.conversationId
|
|
18289
|
+
});
|
|
18271
18290
|
const pluginHooks = createPluginHookRunner({
|
|
18272
18291
|
actor: args.currentActor,
|
|
18273
18292
|
actors: args.currentActors
|
|
@@ -18354,6 +18373,7 @@ async function wireAgentTools(args) {
|
|
|
18354
18373
|
);
|
|
18355
18374
|
const commonToolRuntimeContext = {
|
|
18356
18375
|
conversationId: args.run.conversationId,
|
|
18376
|
+
...conversation?.location ? { locationId: conversation.location.id } : void 0,
|
|
18357
18377
|
userText: args.userInput,
|
|
18358
18378
|
configuration: args.configurationValues,
|
|
18359
18379
|
egress: createPluginEgress({
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createWebAuthorization,
|
|
3
3
|
deleteWebAuthorization
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-EU7KJDOG.js";
|
|
5
5
|
import {
|
|
6
6
|
buildDeliveredTurnStatePatch,
|
|
7
7
|
completeAuthPauseTurn,
|
|
8
8
|
finalizeFailedTurnReplyWithEvent,
|
|
9
9
|
getTurnUserMessage
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-LZOQFC5F.js";
|
|
11
11
|
import {
|
|
12
12
|
processPluginTask,
|
|
13
13
|
scheduleSessionCompletedPluginTasks
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-GWFRPQNP.js";
|
|
15
15
|
import {
|
|
16
16
|
ConversationTurnLifecycleService
|
|
17
17
|
} from "./chunk-M3QYTBQ6.js";
|
|
@@ -20,16 +20,16 @@ import {
|
|
|
20
20
|
getPersistedSandboxState,
|
|
21
21
|
getPersistedThreadState,
|
|
22
22
|
persistThreadStateById
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-FWILPBVQ.js";
|
|
24
24
|
import {
|
|
25
25
|
healthReportSchema
|
|
26
26
|
} from "./chunk-UTL3MHPC.js";
|
|
27
27
|
import {
|
|
28
28
|
parseSlackThreadId
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-TDT2R77B.js";
|
|
30
30
|
import {
|
|
31
31
|
appendAndEnqueueInboundMessage
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-Q2KY27IX.js";
|
|
33
33
|
import {
|
|
34
34
|
TurnInputCommitLostError,
|
|
35
35
|
buildDeterministicTurnId,
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
markTurnClosed,
|
|
41
41
|
markTurnFailed,
|
|
42
42
|
startActiveTurn
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-HJ27A6YB.js";
|
|
44
44
|
import {
|
|
45
45
|
abandonTurnRecord,
|
|
46
46
|
buildConversationContext,
|
|
@@ -55,28 +55,28 @@ import {
|
|
|
55
55
|
recordDeliveredAssistantMessage,
|
|
56
56
|
saveTurnCheckpoint,
|
|
57
57
|
upsertConversationMessage
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-NQTA72Q3.js";
|
|
59
59
|
import {
|
|
60
60
|
normalizeSlackConversationId
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-D6ZD7VXP.js";
|
|
62
62
|
import {
|
|
63
63
|
getConversationEventStore,
|
|
64
64
|
getConversationStore,
|
|
65
65
|
getDb
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-RNMASWLP.js";
|
|
67
67
|
import {
|
|
68
68
|
juniorApiTokens,
|
|
69
69
|
juniorConversationParticipants,
|
|
70
70
|
juniorConversations,
|
|
71
71
|
juniorIdentities,
|
|
72
72
|
juniorUsers
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-KKSVCHDO.js";
|
|
74
74
|
import {
|
|
75
75
|
juniorDestinations
|
|
76
76
|
} from "./chunk-VFUK3X5B.js";
|
|
77
77
|
import {
|
|
78
78
|
canExposeConversationPayload
|
|
79
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-ETJTXYHY.js";
|
|
80
80
|
import {
|
|
81
81
|
credentialContextForActor
|
|
82
82
|
} from "./chunk-CEMMLV5L.js";
|
|
@@ -84,7 +84,7 @@ import {
|
|
|
84
84
|
logException,
|
|
85
85
|
setTags,
|
|
86
86
|
withLogContext
|
|
87
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-EBMRB6Z6.js";
|
|
88
88
|
|
|
89
89
|
// src/handlers/health.ts
|
|
90
90
|
function readHealthReport() {
|
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
getConversationStore,
|
|
9
9
|
parseDestination,
|
|
10
10
|
sameDestination
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-RNMASWLP.js";
|
|
12
12
|
import {
|
|
13
13
|
getDefaultRedisStateAdapterFor,
|
|
14
14
|
getStateAdapter
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-PL57B6NC.js";
|
|
16
16
|
import {
|
|
17
17
|
getChatConfig
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-XYTJUHRZ.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-EBMRB6Z6.js";
|
|
27
27
|
|
|
28
28
|
// src/chat/task-execution/state.ts
|
|
29
29
|
import { randomUUID } from "crypto";
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
juniorConversations,
|
|
9
9
|
juniorIdentities,
|
|
10
10
|
juniorUsers
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-KKSVCHDO.js";
|
|
12
12
|
import {
|
|
13
13
|
juniorDestinations
|
|
14
14
|
} from "./chunk-VFUK3X5B.js";
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
TURN_REASONING_LEVELS,
|
|
17
17
|
getChatConfig,
|
|
18
18
|
modelProfileSchema
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-XYTJUHRZ.js";
|
|
20
20
|
import {
|
|
21
21
|
parseActorUserId,
|
|
22
22
|
parseSlackChannelReferenceId,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
} from "./chunk-N7TMSOZH.js";
|
|
25
25
|
import {
|
|
26
26
|
normalizeIdentityEmail
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-EBMRB6Z6.js";
|
|
28
28
|
|
|
29
29
|
// src/chat/conversations/sql/store.ts
|
|
30
30
|
import { randomUUID as randomUUID2 } from "crypto";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
toCanonicalInputMessage,
|
|
4
4
|
toCanonicalOutputMessage,
|
|
5
5
|
toGenAiMessagesTraceAttributes
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ETJTXYHY.js";
|
|
7
7
|
import {
|
|
8
8
|
extractGenAiUsageAttributes,
|
|
9
9
|
logException,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
normalizeGenAiFinishReason,
|
|
12
12
|
serializeGenAiAttribute,
|
|
13
13
|
withSpan
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-EBMRB6Z6.js";
|
|
15
15
|
|
|
16
16
|
// src/chat/services/provider-error.ts
|
|
17
17
|
var ProviderError = class extends Error {
|
package/dist/cli/chat.js
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
1
|
import {
|
|
2
2
|
executeAgentRun
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-PBKZQAUA.js";
|
|
4
|
+
import "../chunk-3X55QRAG.js";
|
|
5
5
|
import "../chunk-6Y5B5PEX.js";
|
|
6
6
|
import "../chunk-DIB4GX3G.js";
|
|
7
7
|
import {
|
|
8
8
|
createAgentRunner
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-3KCQEG6W.js";
|
|
10
10
|
import "../chunk-RF6J3DIO.js";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-LG5MYY6U.js";
|
|
12
12
|
import "../chunk-VRS6WDK5.js";
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-3KSSALN4.js";
|
|
14
|
+
import "../chunk-TDT2R77B.js";
|
|
15
|
+
import "../chunk-Q2KY27IX.js";
|
|
16
|
+
import "../chunk-HJ27A6YB.js";
|
|
17
|
+
import "../chunk-NQTA72Q3.js";
|
|
18
|
+
import "../chunk-IKKETMQC.js";
|
|
19
19
|
import "../chunk-PDO5BLNM.js";
|
|
20
20
|
import "../chunk-UIE3R5XU.js";
|
|
21
21
|
import "../chunk-X6GDDWQH.js";
|
|
22
22
|
import "../chunk-DKIJ2RP5.js";
|
|
23
23
|
import "../chunk-JAL3CH4G.js";
|
|
24
24
|
import "../chunk-7H2VZTWN.js";
|
|
25
|
-
import "../chunk-
|
|
25
|
+
import "../chunk-GPA3ZSYY.js";
|
|
26
26
|
import {
|
|
27
27
|
loadAppPluginSet
|
|
28
28
|
} from "../chunk-Y2CM7HXH.js";
|
|
29
|
-
import "../chunk-
|
|
29
|
+
import "../chunk-D6ZD7VXP.js";
|
|
30
30
|
import "../chunk-3Y47VMHV.js";
|
|
31
|
-
import "../chunk-
|
|
32
|
-
import "../chunk-
|
|
33
|
-
import "../chunk-
|
|
34
|
-
import "../chunk-
|
|
31
|
+
import "../chunk-RNMASWLP.js";
|
|
32
|
+
import "../chunk-KKSVCHDO.js";
|
|
33
|
+
import "../chunk-KMBU4PJP.js";
|
|
34
|
+
import "../chunk-PL57B6NC.js";
|
|
35
35
|
import "../chunk-VFUK3X5B.js";
|
|
36
|
-
import "../chunk-
|
|
37
|
-
import "../chunk-
|
|
38
|
-
import "../chunk-
|
|
39
|
-
import "../chunk-
|
|
40
|
-
import "../chunk-
|
|
36
|
+
import "../chunk-XYTJUHRZ.js";
|
|
37
|
+
import "../chunk-ETJTXYHY.js";
|
|
38
|
+
import "../chunk-EM7EECT5.js";
|
|
39
|
+
import "../chunk-HEBMSITT.js";
|
|
40
|
+
import "../chunk-4IX32NSL.js";
|
|
41
41
|
import "../chunk-CEMMLV5L.js";
|
|
42
42
|
import "../chunk-N7TMSOZH.js";
|
|
43
43
|
import "../chunk-DWPN6SCH.js";
|
|
44
44
|
import "../chunk-TXKUKMVO.js";
|
|
45
|
-
import "../chunk-
|
|
45
|
+
import "../chunk-EBMRB6Z6.js";
|
|
46
46
|
import "../chunk-PEQXYSSE.js";
|
|
47
|
-
import "../chunk-
|
|
47
|
+
import "../chunk-TJHSAHQN.js";
|
|
48
48
|
|
|
49
49
|
// src/cli/chat.ts
|
|
50
50
|
import {
|
|
@@ -166,10 +166,10 @@ async function configureLocalChatPlugins(pluginSet) {
|
|
|
166
166
|
databaseModule
|
|
167
167
|
] = await Promise.all([
|
|
168
168
|
import("../plugins-YTYJMMJF.js"),
|
|
169
|
-
import("../agent-hooks-
|
|
170
|
-
import("../catalog-runtime-
|
|
171
|
-
import("../validation-
|
|
172
|
-
import("../db-
|
|
169
|
+
import("../agent-hooks-IQUW6ERD.js"),
|
|
170
|
+
import("../catalog-runtime-PMQWNIXA.js"),
|
|
171
|
+
import("../validation-Q65QD27B.js"),
|
|
172
|
+
import("../db-QNPVCQPT.js")
|
|
173
173
|
]);
|
|
174
174
|
const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
|
|
175
175
|
const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
|
|
@@ -235,14 +235,14 @@ async function prepareLocalChatRun(io, pluginSet) {
|
|
|
235
235
|
await configureLocalChatPlugins(pluginSet);
|
|
236
236
|
const { setExperimentalFeatures } = await import("../experimental-SIJSRDJD.js");
|
|
237
237
|
setExperimentalFeatures({ subagents: true });
|
|
238
|
-
const { runLocalAgentTurn } = await import("../runner-
|
|
239
|
-
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-
|
|
238
|
+
const { runLocalAgentTurn } = await import("../runner-3RS2D2ZR.js");
|
|
239
|
+
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-KYMPJOTC.js");
|
|
240
240
|
const { createLocalOAuthState } = await import("../oauth-relay-5XPVRPYB.js");
|
|
241
241
|
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-FIL7EGPR.js");
|
|
242
|
-
const { bindSpawnAgent } = await import("../spawn-
|
|
243
|
-
const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-
|
|
242
|
+
const { bindSpawnAgent } = await import("../spawn-VYARS3DU.js");
|
|
243
|
+
const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-DCMQWAAP.js");
|
|
244
244
|
const { createLocalConversationWork } = await import("../conversation-work-VIOQ5ZF3.js");
|
|
245
|
-
const { processConversationWork } = await import("../worker-
|
|
245
|
+
const { processConversationWork } = await import("../worker-QL3CHLZL.js");
|
|
246
246
|
let agentRunner;
|
|
247
247
|
const localConversationWork = createLocalConversationWork(async (message) => {
|
|
248
248
|
if (!agentRunner) {
|