@sentry/junior 0.297.0 → 0.299.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/{actor-6jsm_v96.js → actor-D2iXzvlN.js} +2 -1
- package/dist/{state-DFnmLmfn.js → adapter-AgCNqqsG.js} +49 -133
- package/dist/{admin-tmGIw4KS.js → admin-1VwEXztm.js} +2 -2
- package/dist/{agent-runner-CneTquAE.js → agent-runner-Ciet8_nn.js} +1067 -1353
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +8 -7
- package/dist/api.d.ts +1 -1
- package/dist/api.js +125 -43
- package/dist/{app-BJojZ7HL.d.ts → app--ky-Eu33.d.ts} +6 -4
- package/dist/app.d.ts +1 -1
- package/dist/app.js +126 -299
- package/dist/{automation-BrP6ImrC.js → automation-M3RFJUBf.js} +1 -1
- package/dist/{background-compaction-queue-CwfJy3Cd.js → background-compaction-queue-CnimvRdk.js} +4 -4
- package/dist/{briefs-uFTuhMqA.js → briefs-CwzvgdCa.js} +4 -4
- package/dist/{catalog-runtime-0kuQqYL4.js → catalog-runtime-DaBaHY7u.js} +1 -1
- package/dist/cli/chat.js +17 -17
- package/dist/cli/check.js +3 -3
- package/dist/cli/main.js +3 -3
- package/dist/cli/plugins.js +5 -5
- package/dist/cli/snapshot-create.js +4 -4
- package/dist/cli/upgrade.d.ts +1 -1
- package/dist/cli/upgrade.js +4 -4
- package/dist/{config-Dj9M_nqB.js → config-CAXIpWQb.js} +80 -6
- package/dist/{connections-B96JUM5o.js → connections-Dy0hPdUq.js} +6 -6
- package/dist/continue-in-slack-DIOjFj76.js +176 -0
- package/dist/{conversation-CvcBU1z2.js → conversation-fCWD9Az3.js} +73 -13
- package/dist/{conversation-feed-BSMlGZnS.js → conversation-feed-BPK8vkkZ.js} +88 -3
- package/dist/{conversation-privacy-DI29jbZV.js → conversation-privacy-DUgtRkf8.js} +1 -1
- package/dist/{conversation-turn-CZWBr091.js → conversation-turn-DkJB6yMF.js} +85 -68
- package/dist/{credential-sync-Blhx4_xf.js → credential-sync-RX24Y8aY.js} +18 -18
- package/dist/{db-CrtyFRz7.d.ts → db-B07FtU9g.d.ts} +1 -1
- package/dist/{db-Br0tfAo7.js → db-COYOGzYS.js} +171 -12
- package/dist/{executor-BMPipFVA.js → executor-BWmAgSyi.js} +40 -11
- package/dist/{media-BepyEUNm.js → history-IjdmO_r6.js} +1 -85
- package/dist/instrumentation.js +2 -2
- package/dist/lineage-D-5jm_oj.js +37 -0
- package/dist/{logging-CQjlDQYX.js → logging-DPLEa8Bn.js} +1 -1
- package/dist/media-BAHvgkok.js +85 -0
- package/dist/{message-BOZEIuxy.js → message-BIHR1yRk.js} +9 -10
- package/dist/model-input-BPZYH8Nd.js +82 -0
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +17 -9
- package/dist/{oauth-callback-server-V_DuMuNX.js → oauth-callback-server-R7qvSzFG.js} +2 -2
- package/dist/{plugins-HYh_JOdw.js → plugins-CBW2Prb_.js} +1 -1
- package/dist/{projection-B08mfi0u.js → projection-DEdP1q6f.js} +261 -36
- package/dist/{prompt-BlutWLNt.js → prompt-4M98h_tC.js} +4 -4
- package/dist/{registry-BDWgCJDf.js → registry-BTKmKM-r.js} +3 -3
- package/dist/{resolve-2Z_o_SsI.js → resolve-B8hXNVZ3.js} +3 -3
- package/dist/{result-CAujiaci.js → result-g-XAaOj6.js} +158 -69
- package/dist/{runner-D2Chc02N.js → runner-BlPSA5A8.js} +9 -9
- package/dist/{sandbox-egress-signals-CFoJduFj.js → sandbox-egress-signals-Pai-MzEY.js} +1 -1
- package/dist/{schema-Bqa5NbcP.js → schema-BNnY_trV.js} +47 -7
- package/dist/{schema-Ce2XCS7O.d.ts → schema-DbuWR-DN.d.ts} +663 -346
- package/dist/{service-account-C9kRQEb_.js → service-account-9OLNQMyz.js} +4 -4
- package/dist/{service-account-CERfXEVU.js → service-account-BYGZ08DQ.js} +3 -3
- package/dist/session-stop-2XJrcNCy.js +3356 -0
- package/dist/{skills-B0m1nZ_j.js → skills-DpBQoeHV.js} +3 -3
- package/dist/slack-conversation-unfurl-BcDIWo67.js +370 -0
- package/dist/spawn-09GssFod.js +73 -0
- package/dist/state-Cufq0_rH.js +132 -0
- package/dist/{user-input-request-CXNIov9n.js → statuses-B8mUfghF.js} +30 -25
- package/dist/{stop-BCH9VNGf.js → stop-U7iUrR1g.js} +6011 -5773
- package/dist/{store-B59rOYbS.js → store-BHiaHCQu.js} +24 -4
- package/dist/{store-m5bmdmsP.js → store-CSgUTMdv.js} +10 -10
- package/dist/{task-queue-N0kuCknH.js → task-queue-bMNq0clp.js} +4 -4
- package/dist/{task-runner-COOwR8qm.js → task-runner-B__rxwxU.js} +10 -10
- package/dist/{thread-context-Cd44z_W5.js → thread-context-d0ceWbVT.js} +18 -18
- package/dist/{turn-session-routing-BlCtVFRN.js → turn-session-routing-BVZHBFCF.js} +5 -5
- package/dist/turn-user-message-BEw7acTP.js +355 -0
- package/dist/users-BK3dbxZL.js +424 -0
- package/dist/{validation-Ba2OcUse.js → validation-BDVJjO2E.js} +1 -1
- package/dist/{version-KNDzIAh6.js → version-DQgZoQ3D.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-BPpuN2f9.js → viewer-CAWfFo29.js} +25 -54
- package/dist/{warmup-Bskrwmk1.js → warmup-9ySPacF9.js} +1137 -143
- package/dist/{worker-B1skZlit.js → worker-D8jJO-WO.js} +8 -7
- package/migrations/0104_code_change_draft.sql +1 -0
- package/migrations/0105_attachment_uploads.sql +14 -0
- package/migrations/0106_conversation_agent_config.sql +1 -0
- package/migrations/meta/0104_snapshot.json +4516 -0
- package/migrations/meta/0105_snapshot.json +4611 -0
- package/migrations/meta/0106_snapshot.json +4617 -0
- package/migrations/meta/_journal.json +21 -0
- package/package.json +4 -4
- package/dist/attempt-selection-ClP3MMPr.js +0 -61
- package/dist/locks-D-0h111u.js +0 -48
- package/dist/notification-gusCgdQ6.js +0 -1284
- package/dist/prompt-input-Dxn8cDC0.js +0 -1424
- package/dist/session-stop-B-I1rAS1.js +0 -181
- package/dist/spawn-CwMjRRtn.js +0 -80
- package/dist/turn-cancel-DDu8TOwt.js +0 -201
- package/dist/turn-user-message-ygLG3ylQ.js +0 -641
- package/dist/turn-wake-DmQec4AG.js +0 -161
- package/dist/{oauth-relay-CsfIazeF.js → oauth-relay-DRzq73b6.js} +1 -1
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { a as getClient$1, h as startSpan, n as captureMessage, r as continueTrace, v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { A as estimateTextTokens, E as resolveGatewayModel, I as unwrapCurrentInstruction, L as escapeXml, S as completeObject, T as rerankTexts, X as toOptionalTrimmed, i as getChatConfig, n as botConfig, o as getSlackBotToken, v as normalizeSlackEmojiName, w as embedTexts, x as completeDecision, y as GEN_AI_PROVIDER_NAME } from "./config-
|
|
3
|
-
import { E as withSpan, G as isRecord$2, K as toOptionalNumber, _ as runBestEffort, a as extractGenAiUsageSummary, b as setSpanAttributes, c as getLogContextAttributes, d as logAudit, h as logWarn, m as logInfo, o as getActiveTraceContext, p as logException, q as toOptionalString, t as buildTurnFailureResponse, x as setSpanStatus, y as setSentryUser } from "./logging-
|
|
4
|
-
import { t as canExposeConversationPayload } from "./conversation-privacy-
|
|
5
|
-
import { c as parseStoredSlackActor, d as parseSlackChannelReferenceId, f as parseSlackTeamId,
|
|
6
|
-
import {
|
|
7
|
-
import { A as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { g as createCache, i as readActorIdentity, l as resolveViewerUser, n as findUserByEmailFromSql, o as readIdentityById, p as parseAvatarUrl, s as readIdentityByIdFromSql } from "./viewer-BPpuN2f9.js";
|
|
14
|
-
import { a as getStateAdapter, i as getDefaultRedisStateAdapterFor, n as readEncryptedState, o as getStateValues, s as setStateValues, t as createEncryptedState } from "./state-DFnmLmfn.js";
|
|
2
|
+
import { A as estimateTextTokens, E as resolveGatewayModel, I as unwrapCurrentInstruction, L as escapeXml, S as completeObject, T as rerankTexts, X as toOptionalTrimmed, i as getChatConfig, n as botConfig, o as getSlackBotToken, v as normalizeSlackEmojiName, w as embedTexts, x as completeDecision, y as GEN_AI_PROVIDER_NAME } from "./config-CAXIpWQb.js";
|
|
3
|
+
import { E as withSpan, G as isRecord$2, K as toOptionalNumber, _ as runBestEffort, a as extractGenAiUsageSummary, b as setSpanAttributes, c as getLogContextAttributes, d as logAudit, h as logWarn, m as logInfo, o as getActiveTraceContext, p as logException, q as toOptionalString, t as buildTurnFailureResponse, x as setSpanStatus, y as setSentryUser } from "./logging-DPLEa8Bn.js";
|
|
4
|
+
import { t as canExposeConversationPayload } from "./conversation-privacy-DUgtRkf8.js";
|
|
5
|
+
import { c as parseStoredSlackActor, d as parseSlackChannelReferenceId, f as parseSlackTeamId, i as isActorUserId, l as toStoredSlackActor, p as parseSlackUserId, s as parseActorUserId, v as parseSlackMessageTs } from "./actor-D2iXzvlN.js";
|
|
6
|
+
import { A as startLocationThread, B as saveUserTimezone, C as isPersonInput, G as claimProviderConversation, J as addAgentTurnUsage, N as resolveActorIdentityId, Q as hasAgentTurnUsage, R as readUserTimezone, W as createCache, a as getConversationStore, at as parseDestination, b as createSqlStore, d as eventFromRow, f as withConversationEventLock, o as getDb, r as getConversationEventStore, s as getSqlExecutor, st as sameDestination, tt as conversationDetailTouch, u as createSqlConversationEventStore } from "./db-COYOGzYS.js";
|
|
7
|
+
import { A as juniorAttachments, D as juniorCodeChanges, E as juniorConversationAnnotations, M as juniorIdentities, N as juniorUsers, O as juniorCodeRepositories, P as juniorDestinations, a as juniorPushSubscriptions, b as juniorConversationBriefs, f as juniorAutomations, i as juniorWorkspaces, j as juniorConversations, l as juniorReviewItems, m as juniorLocationConfigurations, n as juniorSnapshots, o as juniorReviewItemAssignees, r as juniorWorkspaceRepos, s as juniorReviewItemConversations, v as juniorConversationParticipants, w as juniorConversationEvents } from "./executor-BWmAgSyi.js";
|
|
8
|
+
import { d as contextProvenance, f as instructionActors, n as agentHistoryItemSchema, p as instructionProvenanceFor } from "./history-IjdmO_r6.js";
|
|
9
|
+
import { a as setStateValues, c as fenceLock, i as getStateValues, l as withLock, n as getDefaultRedisStateAdapterFor, o as MUTATION_LOCK_TTL_MS, r as getStateAdapter, s as acquireActiveLock } from "./adapter-AgCNqqsG.js";
|
|
10
|
+
import { _ as CredentialUnavailableError, a as resolveAuthTokenPlaceholder, f as credentialContextForActor, g as credentialUserSubjectId, h as credentialSubjectSchema, m as credentialLogContext, o as resolvePluginCommandEnv, p as credentialContextSchema } from "./registry-BTKmKM-r.js";
|
|
11
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-DaBaHY7u.js";
|
|
12
|
+
import { d as JUNIOR_NATIVE_EVENT_NAMESPACE, f as agentsInstructionsUpdatedEvent, g as renderJuniorNativeConversationEvent, l as completeObject$1, m as authenticationUnlinkedEvent, n as briefEntriesFromReportEvents, o as isEventConversationMessage, p as authenticationLinkedEvent, s as generateBrief, t as BRIEF_PROMPT, u as completeText } from "./prompt-4M98h_tC.js";
|
|
15
13
|
import { n as isWithinNotificationSchedule, r as notificationScheduleSchema, s as isValidTimeZone, t as DEFAULT_NOTIFICATION_SCHEDULE } from "./schedule-cP0AACm1.js";
|
|
16
|
-
import {
|
|
14
|
+
import { i as readActorIdentity, l as resolveViewerUser, n as findUserByEmailFromSql, o as readIdentityById, p as parseAvatarUrl, s as readIdentityByIdFromSql } from "./viewer-CAWfFo29.js";
|
|
15
|
+
import { $ as conversationBriefSchema, J as readMessageAttachments, L as reviewItemChangeRecordSchema, Q as briefResourceLabel, V as readMessageCardRefs, _ as conversationReportMessageEventSchema, et as parseBriefInput, g as conversationReportEventSchema, tt as parseStoredBrief, z as messageCardRef } from "./conversation-fCWD9Az3.js";
|
|
17
16
|
import { n as redactSandboxEgressProxyPath, t as SANDBOX_EGRESS_PROXY_PATH } from "./proxy-path-BHYoKZdq.js";
|
|
17
|
+
import { n as readEncryptedState, t as createEncryptedState } from "./state-Cufq0_rH.js";
|
|
18
18
|
import { i as readWebPushPrivateKey, t as readJuniorSecret } from "./secrets-DebYU866.js";
|
|
19
|
+
import * as z from "zod";
|
|
19
20
|
import path from "node:path";
|
|
20
21
|
import { isDeepStrictEqual } from "node:util";
|
|
21
22
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
22
23
|
import { createHash, createHmac, createPrivateKey, createPublicKey, generateKeyPairSync, randomBytes, randomUUID, sign, timingSafeEqual } from "node:crypto";
|
|
23
|
-
import * as z from "zod";
|
|
24
24
|
import { and, arrayContains, asc, count, desc, eq, exists, getTableColumns, gt, gte, ilike, inArray, isNotNull, isNull, lt, lte, max, ne, not, notLike, or, sql } from "drizzle-orm";
|
|
25
|
-
import { EgressAuthRequired, EgressPolicyDenied, actorSchema, codeChangeInputSchema, conversationAnnotationInputSchema, defineConversationEvent, destinationSchema, eventDataSchema, eventInputSchema, eventMatchSchema, eventMatches, eventTypeSchema, isPluginModelCostEventName, missingToolAnnotationKeys, normalizeEventIdentifier, objectAnnotationSchema, objectIconPath, objectTypeSchema, pluginAuditAttributesSchema, pluginAuthorizationSchema, pluginCredentialHeaderTransformSchema, pluginCredentialResultSchema, pluginEventsSchema, pluginGrantSchema, pluginModelCostEventNames, pluginProviderAccountSchema, pluginStoredTokensSchema, pluginToolReplySchema, promptContextSchema, promptMessageSchema, sourceSchema, stableEventMatchKey } from "@sentry/junior-plugin-api";
|
|
25
|
+
import { EgressAuthRequired, EgressPolicyDenied, PluginToolInputError, actorSchema, codeChangeInputSchema, conversationAnnotationInputSchema, defineConversationEvent, destinationSchema, eventDataSchema, eventInputSchema, eventMatchSchema, eventMatches, eventTypeSchema, isPluginModelCostEventName, missingToolAnnotationKeys, normalizeEventIdentifier, objectAnnotationSchema, objectIconPath, objectLinkFilterSchema, objectTypeSchema, pluginAuditAttributesSchema, pluginAuthorizationSchema, pluginCredentialHeaderTransformSchema, pluginCredentialResultSchema, pluginEventsSchema, pluginGrantSchema, pluginModelCostEventNames, pluginProviderAccountSchema, pluginStoredTokensSchema, pluginToolReplySchema, promptContextSchema, promptMessageSchema, sourceSchema, stableEventMatchKey } from "@sentry/junior-plugin-api";
|
|
26
26
|
import { alias } from "drizzle-orm/pg-core";
|
|
27
27
|
import fs from "node:fs/promises";
|
|
28
28
|
import pLimit from "p-limit";
|
|
@@ -636,6 +636,8 @@ function fragmentSelectionSet(selection, fragments, seen) {
|
|
|
636
636
|
const slackUserInfoSchema = z.object({
|
|
637
637
|
ok: z.literal(true),
|
|
638
638
|
user: z.object({
|
|
639
|
+
is_restricted: z.boolean().nullish(),
|
|
640
|
+
is_ultra_restricted: z.boolean().nullish(),
|
|
639
641
|
name: z.string().nullish(),
|
|
640
642
|
tz: z.string().nullish(),
|
|
641
643
|
profile: z.object({
|
|
@@ -696,6 +698,8 @@ async function lookupSlackUser(teamId, userId) {
|
|
|
696
698
|
...avatarUrl ? { avatarUrl } : void 0,
|
|
697
699
|
timezone: payload.user.tz?.trim() || void 0
|
|
698
700
|
};
|
|
701
|
+
const { is_restricted, is_ultra_restricted } = payload.user;
|
|
702
|
+
if (typeof is_restricted === "boolean" && typeof is_ultra_restricted === "boolean") result.isGuest = is_restricted || is_ultra_restricted;
|
|
699
703
|
writeToCache(teamId, userId, result);
|
|
700
704
|
return result;
|
|
701
705
|
} catch (error) {
|
|
@@ -2843,6 +2847,18 @@ var PluginToolDeniedError = class extends Error {
|
|
|
2843
2847
|
this.name = "PluginToolDeniedError";
|
|
2844
2848
|
}
|
|
2845
2849
|
};
|
|
2850
|
+
// src/chat/tools/execution/tool-input-error.ts
|
|
2851
|
+
/** Thrown when a tool fails due to invalid model/user input, not a system error. */
|
|
2852
|
+
var ToolInputError = class extends Error {
|
|
2853
|
+
constructor(message, options) {
|
|
2854
|
+
super(message, options);
|
|
2855
|
+
this.name = "ToolInputError";
|
|
2856
|
+
}
|
|
2857
|
+
};
|
|
2858
|
+
/** Whether an error is an expected tool input failure that is not a Sentry exception. */
|
|
2859
|
+
function isToolInputError(error) {
|
|
2860
|
+
return error instanceof ToolInputError || error instanceof PluginToolInputError || error instanceof Error && error.name === "PluginToolInputError";
|
|
2861
|
+
}
|
|
2846
2862
|
// src/chat/workspaces/checkout-path.ts
|
|
2847
2863
|
/** Derive the fixed sandbox checkout path for one repository, or undefined when invalid. */
|
|
2848
2864
|
function tryWorkspaceRepoCheckoutPath(repo) {
|
|
@@ -5400,6 +5416,8 @@ var SlackActionError = class extends Error {
|
|
|
5400
5416
|
detail;
|
|
5401
5417
|
detailLine;
|
|
5402
5418
|
detailRule;
|
|
5419
|
+
/** Network error code, such as `ECONNABORTED`, when no Slack response arrived. */
|
|
5420
|
+
networkCode;
|
|
5403
5421
|
constructor(message, code, options = {}) {
|
|
5404
5422
|
super(message);
|
|
5405
5423
|
this.name = "SlackActionError";
|
|
@@ -5414,6 +5432,7 @@ var SlackActionError = class extends Error {
|
|
|
5414
5432
|
this.detail = options.detail;
|
|
5415
5433
|
this.detailLine = options.detailLine;
|
|
5416
5434
|
this.detailRule = options.detailRule;
|
|
5435
|
+
this.networkCode = options.networkCode;
|
|
5417
5436
|
}
|
|
5418
5437
|
};
|
|
5419
5438
|
function serializeSlackErrorData(data) {
|
|
@@ -5515,6 +5534,7 @@ function mapSlackError(error) {
|
|
|
5515
5534
|
const message = candidate.message ?? "Slack action failed";
|
|
5516
5535
|
const baseOptions = {
|
|
5517
5536
|
apiError,
|
|
5537
|
+
networkCode: findNetworkErrorCode(error),
|
|
5518
5538
|
statusCode: candidate.statusCode,
|
|
5519
5539
|
requestId: getHeaderString(candidate.headers, "x-slack-req-id"),
|
|
5520
5540
|
errorData: serializeSlackErrorData(candidate.data),
|
|
@@ -5561,6 +5581,11 @@ function findNetworkErrorCode(error, depth = 0) {
|
|
|
5561
5581
|
if (typeof candidate.code === "string" && (CONNECTION_ERROR_CODES.has(candidate.code) || TIMEOUT_ERROR_CODES.has(candidate.code))) return candidate.code;
|
|
5562
5582
|
return findNetworkErrorCode(candidate.original, depth + 1) ?? findNetworkErrorCode(candidate.cause, depth + 1);
|
|
5563
5583
|
}
|
|
5584
|
+
/** Report whether a Slack call failed because its request deadline elapsed. */
|
|
5585
|
+
function isSlackRequestTimeout(error) {
|
|
5586
|
+
const networkCode = error instanceof SlackActionError ? error.networkCode : findNetworkErrorCode(error);
|
|
5587
|
+
return networkCode !== void 0 && TIMEOUT_ERROR_CODES.has(networkCode);
|
|
5588
|
+
}
|
|
5564
5589
|
function hasSocketHangUpMessage(error) {
|
|
5565
5590
|
return error instanceof Error && error.message.toLowerCase().includes("socket hang up");
|
|
5566
5591
|
}
|
|
@@ -6369,6 +6394,12 @@ function normalizeSlackStatusText(text) {
|
|
|
6369
6394
|
function slackMention(userId) {
|
|
6370
6395
|
return `<@${userId}>`;
|
|
6371
6396
|
}
|
|
6397
|
+
/** Slack user mentions: `<@U123>` or `<@U123|label>`. */
|
|
6398
|
+
const SLACK_USER_MENTION_RE = /<@([UW][A-Z0-9]+)(?:\|[^<>]*)?>/g;
|
|
6399
|
+
/** Return the Slack user IDs that the text mentions, once each, in order. */
|
|
6400
|
+
function slackMentionedUserIds(text) {
|
|
6401
|
+
return [...new Set([...text.matchAll(SLACK_USER_MENTION_RE)].map((m) => m[1]))];
|
|
6402
|
+
}
|
|
6372
6403
|
// src/chat/slack/oauth-authorization-message.ts
|
|
6373
6404
|
const ACCOUNT_SCOPE_NOTE = "This connects only your account. I can see only what you can see.";
|
|
6374
6405
|
/** Present private OAuth authorization with a clear action and text fallback. */
|
|
@@ -6857,10 +6888,14 @@ function isTransient(error) {
|
|
|
6857
6888
|
return isRecord$1(response) && typeof response.status === "number" && response.status >= 500 && response.status < 600;
|
|
6858
6889
|
});
|
|
6859
6890
|
}
|
|
6891
|
+
const SOCKET_FAILURE_CODES = /* @__PURE__ */ new Set(["ECONNRESET", "UND_ERR_SOCKET"]);
|
|
6892
|
+
function isFetchSocketFailure(error) {
|
|
6893
|
+
return error.name === "TypeError" && (error.message === "terminated" || error.message === "fetch failed") && isRecord$1(error.cause) && typeof error.cause.code === "string" && SOCKET_FAILURE_CODES.has(error.cause.code);
|
|
6894
|
+
}
|
|
6860
6895
|
function isCommandStreamInterrupted(error) {
|
|
6861
6896
|
return findInErrorChain(error, (candidate) => {
|
|
6862
6897
|
if (!(candidate instanceof Error)) return false;
|
|
6863
|
-
return candidate.name === "StreamError" && candidate.message.toLowerCase().includes("stream ended before command finished");
|
|
6898
|
+
return candidate.name === "StreamError" && candidate.message.toLowerCase().includes("stream ended before command finished") || isFetchSocketFailure(candidate);
|
|
6864
6899
|
});
|
|
6865
6900
|
}
|
|
6866
6901
|
/** Map Vercel Sandbox API and SDK errors to the shared sandbox error cases. */
|
|
@@ -7713,10 +7748,15 @@ async function runAfterToolExecuteHooks(args) {
|
|
|
7713
7748
|
}));
|
|
7714
7749
|
} catch (error) {
|
|
7715
7750
|
if (signal?.aborted) break;
|
|
7716
|
-
|
|
7751
|
+
const attributes = {
|
|
7717
7752
|
"app.plugin.name": pluginName,
|
|
7718
7753
|
"gen_ai.tool.name": args.tool.name
|
|
7754
|
+
};
|
|
7755
|
+
if (isToolInputError(error)) logWarn("agent.plugin.after_tool_execute.failed", {
|
|
7756
|
+
...attributes,
|
|
7757
|
+
"error.type": "tool_input_error"
|
|
7719
7758
|
});
|
|
7759
|
+
else logException(error, "agent.plugin.after_tool_execute.failed", attributes);
|
|
7720
7760
|
continue;
|
|
7721
7761
|
}
|
|
7722
7762
|
if (denial !== void 0) throw new PluginToolDeniedError(denial, { ran: true });
|
|
@@ -7780,14 +7820,6 @@ function createPluginState(plugin, adapter) {
|
|
|
7780
7820
|
}
|
|
7781
7821
|
};
|
|
7782
7822
|
}
|
|
7783
|
-
// src/chat/tools/execution/tool-input-error.ts
|
|
7784
|
-
/** Thrown when a tool fails due to invalid model/user input, not a system error. */
|
|
7785
|
-
var ToolInputError = class extends Error {
|
|
7786
|
-
constructor(message, options) {
|
|
7787
|
-
super(message, options);
|
|
7788
|
-
this.name = "ToolInputError";
|
|
7789
|
-
}
|
|
7790
|
-
};
|
|
7791
7823
|
// src/chat/dashboard-link.ts
|
|
7792
7824
|
let dashboardConversationLinkOptions;
|
|
7793
7825
|
function withHttps(host) {
|
|
@@ -7831,14 +7863,14 @@ function getDashboardConversationLink(conversationId) {
|
|
|
7831
7863
|
function getDashboardSettingsLink() {
|
|
7832
7864
|
return resolveDashboardPath("/settings");
|
|
7833
7865
|
}
|
|
7834
|
-
|
|
7835
|
-
|
|
7836
|
-
const prefix = resolveDashboardPath("/conversations/");
|
|
7866
|
+
function parseDashboardPageLink(url, pagePrefix) {
|
|
7867
|
+
const prefix = resolveDashboardPath(pagePrefix);
|
|
7837
7868
|
if (!prefix || !URL.canParse(url)) return void 0;
|
|
7838
7869
|
const base = new URL(prefix);
|
|
7839
7870
|
const link = new URL(url);
|
|
7840
7871
|
if (link.origin !== base.origin || !link.pathname.startsWith(base.pathname)) return;
|
|
7841
|
-
const
|
|
7872
|
+
const path = link.pathname.slice(base.pathname.length);
|
|
7873
|
+
const segment = path.endsWith("/") ? path.slice(0, -1) : path;
|
|
7842
7874
|
if (!segment || segment.includes("/")) return void 0;
|
|
7843
7875
|
try {
|
|
7844
7876
|
return decodeURIComponent(segment);
|
|
@@ -7846,6 +7878,32 @@ function parseDashboardConversationLink(url) {
|
|
|
7846
7878
|
return;
|
|
7847
7879
|
}
|
|
7848
7880
|
}
|
|
7881
|
+
/** Return the Conversation id in a dashboard conversation URL, if it is one. */
|
|
7882
|
+
function parseDashboardConversationLink(url) {
|
|
7883
|
+
return parseDashboardPageLink(url, "/conversations/");
|
|
7884
|
+
}
|
|
7885
|
+
/** Build the dashboard URL of one person's page. */
|
|
7886
|
+
function getDashboardPersonLink(email) {
|
|
7887
|
+
return resolveDashboardPath(`/people/${encodeURIComponent(email)}`);
|
|
7888
|
+
}
|
|
7889
|
+
/** Return the email in a dashboard person URL, if it is one. */
|
|
7890
|
+
function parseDashboardPersonLink(url) {
|
|
7891
|
+
return parseDashboardPageLink(url, "/people/");
|
|
7892
|
+
}
|
|
7893
|
+
/**
|
|
7894
|
+
* Return the link filter for one dashboard page pattern, such as
|
|
7895
|
+
* `/conversations/*`, when the core dashboard is enabled.
|
|
7896
|
+
*/
|
|
7897
|
+
function getDashboardLinkFilter(pagePattern) {
|
|
7898
|
+
const link = resolveDashboardPath(pagePattern);
|
|
7899
|
+
if (!link) return void 0;
|
|
7900
|
+
const url = new URL(link);
|
|
7901
|
+
return objectLinkFilterSchema.parse({
|
|
7902
|
+
scheme: url.protocol.slice(0, -1),
|
|
7903
|
+
host: url.host,
|
|
7904
|
+
pathPattern: url.pathname
|
|
7905
|
+
});
|
|
7906
|
+
}
|
|
7849
7907
|
/** Build the dashboard task detail URL when the core dashboard is enabled. */
|
|
7850
7908
|
function getDashboardTaskLink(taskId) {
|
|
7851
7909
|
return resolveDashboardPath(`/automations/${encodeURIComponent(taskId)}`);
|
|
@@ -8584,6 +8642,7 @@ async function recordCodeChange(db, provider, input) {
|
|
|
8584
8642
|
) AS value
|
|
8585
8643
|
ORDER BY value
|
|
8586
8644
|
)` : juniorCodeChanges.conversationIds,
|
|
8645
|
+
...change.draft !== void 0 ? { draft: change.draft } : void 0,
|
|
8587
8646
|
mergedAt: change.mergedAt ?? null,
|
|
8588
8647
|
number: change.number,
|
|
8589
8648
|
openedAt: change.openedAt,
|
|
@@ -10048,6 +10107,7 @@ function getPluginTools(context, sandbox = createSandboxCapability(context.works
|
|
|
10048
10107
|
locationId: context.locationId,
|
|
10049
10108
|
...slackContext ? { slack: slackContext } : void 0,
|
|
10050
10109
|
userText: context.userText,
|
|
10110
|
+
decider: createPluginDecider(pluginName, { onCost }),
|
|
10051
10111
|
embedder: createPluginEmbedder(pluginName, { onCost }),
|
|
10052
10112
|
egress: context.egress,
|
|
10053
10113
|
...mcp ? { mcp } : void 0,
|
|
@@ -11766,6 +11826,23 @@ const TURN_CONTEXT_TAG = "runtime-turn-context";
|
|
|
11766
11826
|
/** Turn context section that only session context includes. */
|
|
11767
11827
|
const SESSION_CONTEXT_SECTION_TAG = "runtime";
|
|
11768
11828
|
/**
|
|
11829
|
+
* Turn context section with the tools a Code Mode script can call. A Turn
|
|
11830
|
+
* adds it only when it differs from the latest copy in history, and context
|
|
11831
|
+
* compaction keeps only that latest copy.
|
|
11832
|
+
*/
|
|
11833
|
+
const SCRIPT_TOOLS_SECTION_TAG = "script-tools";
|
|
11834
|
+
/**
|
|
11835
|
+
* Turn context sections that list what the model can use now. A Turn adds
|
|
11836
|
+
* one only when it differs from the latest copy in history, and context
|
|
11837
|
+
* compaction keeps only that latest copy.
|
|
11838
|
+
*/
|
|
11839
|
+
const CAPABILITY_SECTION_TAG = {
|
|
11840
|
+
availableSkills: "available-skills",
|
|
11841
|
+
activeMcpCatalogs: "active-mcp-catalogs",
|
|
11842
|
+
toolGuidance: "tool-guidance",
|
|
11843
|
+
workspaces: "workspaces"
|
|
11844
|
+
};
|
|
11845
|
+
/**
|
|
11769
11846
|
* Turn context sections that are true only for the Turn that received them.
|
|
11770
11847
|
* Context compaction removes them from the context of earlier Turns.
|
|
11771
11848
|
*/
|
|
@@ -11880,6 +11957,23 @@ function retainRuntimeTurnContext(messages) {
|
|
|
11880
11957
|
});
|
|
11881
11958
|
}
|
|
11882
11959
|
/**
|
|
11960
|
+
* Find the latest copy of one `<runtime-turn-context>` section in history,
|
|
11961
|
+
* such as `<script-tools>`, with its tags.
|
|
11962
|
+
*/
|
|
11963
|
+
function latestTurnContextSection(messages, tag) {
|
|
11964
|
+
const section = new RegExp(`\\n<${tag}>\\n[\\s\\S]*?\\n</${tag}>`, "g");
|
|
11965
|
+
for (let index = messages.length - 1; index >= 0; index -= 1) {
|
|
11966
|
+
const texts = (userMessageContent(messages[index]) ?? []).flatMap((part) => {
|
|
11967
|
+
const text = textPartValue(part);
|
|
11968
|
+
return text?.startsWith(RUNTIME_TURN_CONTEXT_START) ? [text] : [];
|
|
11969
|
+
});
|
|
11970
|
+
for (const text of texts.reverse()) {
|
|
11971
|
+
const match = [...text.matchAll(section)].at(-1);
|
|
11972
|
+
if (match) return match[0].slice(1);
|
|
11973
|
+
}
|
|
11974
|
+
}
|
|
11975
|
+
}
|
|
11976
|
+
/**
|
|
11883
11977
|
* Reduce a runtime user-turn prompt to only the current turn's instruction.
|
|
11884
11978
|
*
|
|
11885
11979
|
* Live user prompts embed prior-thread context as `<thread-context
|
|
@@ -11978,6 +12072,17 @@ function readBlockedReport(messages) {
|
|
|
11978
12072
|
* their dispatcher name.
|
|
11979
12073
|
*/
|
|
11980
12074
|
const CODEMODE_TOOL_NAME = "codemode";
|
|
12075
|
+
/**
|
|
12076
|
+
* How the `codemode` result text names each call status. The eval harness
|
|
12077
|
+
* reads script calls back from this text.
|
|
12078
|
+
*/
|
|
12079
|
+
const CODE_MODE_CALL_STATUS_TEXT = {
|
|
12080
|
+
ok: "ok",
|
|
12081
|
+
error: "failed",
|
|
12082
|
+
rejected: "rejected by action review",
|
|
12083
|
+
interrupted: "interrupted, outcome unknown",
|
|
12084
|
+
not_started: "not started"
|
|
12085
|
+
};
|
|
11981
12086
|
// src/chat/no-reply.ts
|
|
11982
12087
|
/** No-reply result of a Turn. */
|
|
11983
12088
|
/** Model-facing tool that ends a Turn with no reply. */
|
|
@@ -12201,6 +12306,48 @@ function buildTurnLimitResponse(eventId) {
|
|
|
12201
12306
|
function buildTurnErrorResponse(error, eventId) {
|
|
12202
12307
|
return isTurnExecutionLimitExceededError(error) ? buildTurnLimitResponse(eventId) : buildTurnFailureResponse(eventId);
|
|
12203
12308
|
}
|
|
12309
|
+
// src/chat/task-execution/message-sender.ts
|
|
12310
|
+
/**
|
|
12311
|
+
* The Conversation and Turn that sent one inbound message, such as a child's
|
|
12312
|
+
* reply to its parent. The sender writes it at `input.metadata.sender`, so
|
|
12313
|
+
* readers never take meaning from the message id. `agentInvocationId` names
|
|
12314
|
+
* the Agent invocation that the message comes from, when there is one.
|
|
12315
|
+
*/
|
|
12316
|
+
const inboundMessageSenderSchema = z.object({
|
|
12317
|
+
agentInvocationId: z.string().min(1).optional(),
|
|
12318
|
+
conversationId: z.string().min(1),
|
|
12319
|
+
turnId: z.string().min(1)
|
|
12320
|
+
}).strict();
|
|
12321
|
+
/** Read the sender fields that one inbound message stores, if any. */
|
|
12322
|
+
function readInboundMessageSender(message) {
|
|
12323
|
+
const parsed = inboundMessageSenderSchema.safeParse(message.input.metadata?.sender);
|
|
12324
|
+
return parsed.success ? parsed.data : void 0;
|
|
12325
|
+
}
|
|
12326
|
+
/**
|
|
12327
|
+
* Keep the sender fields of `messages` next to their ids, so a reader still
|
|
12328
|
+
* has them after the mailbox drops the message itself.
|
|
12329
|
+
*/
|
|
12330
|
+
function withMessageSenders(senders, messages) {
|
|
12331
|
+
let next = senders;
|
|
12332
|
+
for (const message of messages) {
|
|
12333
|
+
const sender = readInboundMessageSender(message);
|
|
12334
|
+
if (sender && !next?.[message.inboundMessageId]) next = {
|
|
12335
|
+
...next,
|
|
12336
|
+
[message.inboundMessageId]: sender
|
|
12337
|
+
};
|
|
12338
|
+
}
|
|
12339
|
+
return next;
|
|
12340
|
+
}
|
|
12341
|
+
/** Decode stored sender fields. Invalid entries are dropped. */
|
|
12342
|
+
function normalizeMessageSenders(value) {
|
|
12343
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return;
|
|
12344
|
+
const senders = {};
|
|
12345
|
+
for (const [id, raw] of Object.entries(value)) {
|
|
12346
|
+
const parsed = inboundMessageSenderSchema.safeParse(raw);
|
|
12347
|
+
if (parsed.success) senders[id] = parsed.data;
|
|
12348
|
+
}
|
|
12349
|
+
return Object.keys(senders).length ? senders : void 0;
|
|
12350
|
+
}
|
|
12204
12351
|
// src/chat/task-execution/state.ts
|
|
12205
12352
|
/**
|
|
12206
12353
|
* Expiring conversation mailbox and execution index store.
|
|
@@ -12287,6 +12434,9 @@ function conversationKey(conversationId) {
|
|
|
12287
12434
|
function conversationStopKey(conversationId) {
|
|
12288
12435
|
return `${CONVERSATION_PREFIX}:stop:${conversationId}`;
|
|
12289
12436
|
}
|
|
12437
|
+
function deferredMoveKey(conversationId) {
|
|
12438
|
+
return `${CONVERSATION_PREFIX}:deferred-move:${conversationId}`;
|
|
12439
|
+
}
|
|
12290
12440
|
function indexLockKey(indexKey) {
|
|
12291
12441
|
return `${indexKey}:lock`;
|
|
12292
12442
|
}
|
|
@@ -12397,9 +12547,12 @@ function normalizeExecution(conversationId, value) {
|
|
|
12397
12547
|
}
|
|
12398
12548
|
pendingMessages.sort(compareMessages);
|
|
12399
12549
|
}
|
|
12550
|
+
const inboundMessageIds = Array.isArray(value.inboundMessageIds) ? uniqueStrings(value.inboundMessageIds.map((id) => typeof id === "string" ? id : void 0).filter((id) => Boolean(id))) : [];
|
|
12551
|
+
const messageSenders = withMessageSenders(normalizeMessageSenders(value.messageSenders), pendingMessages);
|
|
12400
12552
|
return {
|
|
12401
12553
|
status,
|
|
12402
|
-
inboundMessageIds: uniqueStrings([...
|
|
12554
|
+
inboundMessageIds: uniqueStrings([...inboundMessageIds, ...pendingMessages.map((message) => message.inboundMessageId)]),
|
|
12555
|
+
...messageSenders ? { messageSenders } : void 0,
|
|
12403
12556
|
pendingCount: pendingMessages.length,
|
|
12404
12557
|
pendingMessages,
|
|
12405
12558
|
lease: normalizeLease(value.lease),
|
|
@@ -12482,9 +12635,11 @@ function assertLegalExecution(conversationId, execution) {
|
|
|
12482
12635
|
}
|
|
12483
12636
|
function executionWithPendingMessages(execution, pending) {
|
|
12484
12637
|
const pendingMessages = [...pending].sort(compareMessages);
|
|
12638
|
+
const messageSenders = withMessageSenders(execution.messageSenders, pendingMessages);
|
|
12485
12639
|
return {
|
|
12486
12640
|
...execution,
|
|
12487
12641
|
inboundMessageIds: uniqueStrings([...execution.inboundMessageIds, ...pendingMessages.map((message) => message.inboundMessageId)]),
|
|
12642
|
+
...messageSenders ? { messageSenders } : void 0,
|
|
12488
12643
|
pendingMessages,
|
|
12489
12644
|
pendingCount: pendingMessages.length
|
|
12490
12645
|
};
|
|
@@ -12711,7 +12866,9 @@ async function withConversationMutation(args, callback) {
|
|
|
12711
12866
|
}
|
|
12712
12867
|
}
|
|
12713
12868
|
async function readConversation(state, conversationId) {
|
|
12714
|
-
|
|
12869
|
+
return conversationFromValue(conversationId, await state.get(conversationKey(conversationId)));
|
|
12870
|
+
}
|
|
12871
|
+
function conversationFromValue(conversationId, raw) {
|
|
12715
12872
|
if (raw == null) return;
|
|
12716
12873
|
const conversation = normalizeConversation(conversationId, raw);
|
|
12717
12874
|
if (!conversation) throw new InvalidConversationRecordError(conversationId);
|
|
@@ -12792,6 +12949,20 @@ async function getConversationWorkState(args) {
|
|
|
12792
12949
|
const conversation = await getConversation(args);
|
|
12793
12950
|
return conversation ? conversationWorkState(conversation) : void 0;
|
|
12794
12951
|
}
|
|
12952
|
+
/**
|
|
12953
|
+
* Return the persisted work records of several Conversations in one state
|
|
12954
|
+
* read. A Conversation with no record has no entry.
|
|
12955
|
+
*/
|
|
12956
|
+
async function getConversationWorkStates(conversationIds) {
|
|
12957
|
+
const state = await getConnectedState();
|
|
12958
|
+
const values = await getStateValues(state, conversationIds.map(conversationKey));
|
|
12959
|
+
const workStates = /* @__PURE__ */ new Map();
|
|
12960
|
+
for (const [index, conversationId] of conversationIds.entries()) {
|
|
12961
|
+
const conversation = conversationFromValue(conversationId, values[index]);
|
|
12962
|
+
if (conversation) workStates.set(conversationId, conversationWorkState(conversation));
|
|
12963
|
+
}
|
|
12964
|
+
return workStates;
|
|
12965
|
+
}
|
|
12795
12966
|
/** Count mailbox messages that have not yet reached the conversation event log. */
|
|
12796
12967
|
function countPendingConversationMessages(conversation) {
|
|
12797
12968
|
return pendingMessages(conversation).length;
|
|
@@ -12835,11 +13006,12 @@ async function appendInboundMessageWithAdmission(args) {
|
|
|
12835
13006
|
return { status: "duplicate" };
|
|
12836
13007
|
}
|
|
12837
13008
|
if (args.exclusive && hasRunnableWork(current)) return { status: "active" };
|
|
12838
|
-
const text = args.renderText ? await args.renderText(current.execution.inboundMessageIds) : args.message.input.text;
|
|
13009
|
+
const text = args.renderText ? await args.renderText(current.execution.inboundMessageIds, current.execution.messageSenders ?? {}) : args.message.input.text;
|
|
12839
13010
|
if (text === void 0) {
|
|
12840
13011
|
await writeConversation(state, lock, withExecutionUpdate(current, {
|
|
12841
13012
|
...current.execution,
|
|
12842
|
-
inboundMessageIds: [...current.execution.inboundMessageIds, args.message.inboundMessageId]
|
|
13013
|
+
inboundMessageIds: [...current.execution.inboundMessageIds, args.message.inboundMessageId],
|
|
13014
|
+
messageSenders: withMessageSenders(current.execution.messageSenders, [args.message])
|
|
12843
13015
|
}, nowMs));
|
|
12844
13016
|
return { status: "duplicate" };
|
|
12845
13017
|
}
|
|
@@ -12982,7 +13154,7 @@ async function requestConversationWork(args) {
|
|
|
12982
13154
|
async function moveIdleConversationDestination(args) {
|
|
12983
13155
|
return await withConversationMutation(args, async (state, lock) => {
|
|
12984
13156
|
const existing = await readConversation(state, args.conversationId);
|
|
12985
|
-
if (existing && (existing
|
|
13157
|
+
if (existing && isHeldByRun(existing)) return "busy";
|
|
12986
13158
|
if (!await args.move()) return "not_moved";
|
|
12987
13159
|
if (existing) await writeConversation(state, lock, {
|
|
12988
13160
|
...existing,
|
|
@@ -12998,6 +13170,50 @@ async function moveIdleConversationDestination(args) {
|
|
|
12998
13170
|
return "moved";
|
|
12999
13171
|
});
|
|
13000
13172
|
}
|
|
13173
|
+
function isHeldByRun(conversation) {
|
|
13174
|
+
return conversation.execution.lease !== void 0 || conversation.execution.status === "running" || conversation.execution.status === "paused";
|
|
13175
|
+
}
|
|
13176
|
+
/**
|
|
13177
|
+
* Store one Destination move until the Run that holds the Conversation ends.
|
|
13178
|
+
*
|
|
13179
|
+
* The first stored move wins: a later call gets it back. With no Run, this
|
|
13180
|
+
* stores nothing and returns `idle`, so the caller moves now.
|
|
13181
|
+
*/
|
|
13182
|
+
async function deferConversationMove(args) {
|
|
13183
|
+
return await withConversationMutation(args, async (state, lock) => {
|
|
13184
|
+
const existing = await readConversation(state, args.conversationId);
|
|
13185
|
+
if (!existing || !isHeldByRun(existing)) return { status: "idle" };
|
|
13186
|
+
const key = deferredMoveKey(args.conversationId);
|
|
13187
|
+
const stored = await state.get(key);
|
|
13188
|
+
if (stored !== null) return {
|
|
13189
|
+
move: stored,
|
|
13190
|
+
status: "deferred"
|
|
13191
|
+
};
|
|
13192
|
+
await fenceConversationMutation(state, lock, args.conversationId);
|
|
13193
|
+
await state.set(key, args.move, JUNIOR_THREAD_STATE_TTL_MS);
|
|
13194
|
+
return {
|
|
13195
|
+
move: args.move,
|
|
13196
|
+
status: "deferred"
|
|
13197
|
+
};
|
|
13198
|
+
});
|
|
13199
|
+
}
|
|
13200
|
+
/**
|
|
13201
|
+
* Remove and return the deferred move once no Run holds the Conversation.
|
|
13202
|
+
* The caller runs it, and defers it again when a new Run started first.
|
|
13203
|
+
*/
|
|
13204
|
+
async function takeDeferredConversationMove(args) {
|
|
13205
|
+
const key = deferredMoveKey(args.conversationId);
|
|
13206
|
+
if (await (await getConnectedState(args.state)).get(key) === null) return;
|
|
13207
|
+
return await withConversationMutation(args, async (state, lock) => {
|
|
13208
|
+
const existing = await readConversation(state, args.conversationId);
|
|
13209
|
+
if (existing && isHeldByRun(existing)) return void 0;
|
|
13210
|
+
const stored = await state.get(key);
|
|
13211
|
+
if (stored === null) return void 0;
|
|
13212
|
+
await fenceConversationMutation(state, lock, args.conversationId);
|
|
13213
|
+
await state.delete(key);
|
|
13214
|
+
return stored;
|
|
13215
|
+
});
|
|
13216
|
+
}
|
|
13001
13217
|
/** Record that a wake-up nudge was accepted for the conversation. */
|
|
13002
13218
|
async function markConversationWorkEnqueued(args) {
|
|
13003
13219
|
const nowMs = args.nowMs ?? now();
|
|
@@ -13745,6 +13961,15 @@ async function getStoredTurnRecord(conversationId, turnId) {
|
|
|
13745
13961
|
const value = await stateAdapter.get(turnCursorKey(conversationId, turnId));
|
|
13746
13962
|
return value == null ? void 0 : parseTurnRecord(value);
|
|
13747
13963
|
}
|
|
13964
|
+
/**
|
|
13965
|
+
* Read several stored Turn cursors in one state read, without their Turn
|
|
13966
|
+
* history. A missing cursor gives `undefined`.
|
|
13967
|
+
*/
|
|
13968
|
+
async function getStoredTurnFields(turns) {
|
|
13969
|
+
const stateAdapter = getStateAdapter();
|
|
13970
|
+
await stateAdapter.connect();
|
|
13971
|
+
return (await getStateValues(stateAdapter, turns.map((turn) => turnCursorKey(turn.conversationId, turn.turnId)))).map((value) => value == null ? void 0 : parseTurnRecord(value));
|
|
13972
|
+
}
|
|
13748
13973
|
/** Read a materialized turn cursor for resume and history loading. */
|
|
13749
13974
|
async function materializeStoredTurnRecord(conversationId, turnId, followCurrentReplacement) {
|
|
13750
13975
|
const parsed = await getStoredTurnRecord(conversationId, turnId);
|
|
@@ -15649,4 +15874,4 @@ async function recordGuardianActionReviewed(args) {
|
|
|
15649
15874
|
createdAtMs: Date.now()
|
|
15650
15875
|
}]);
|
|
15651
15876
|
}
|
|
15652
|
-
export { loadTurnCheckpoint as $, createPluginModel as $a, escapeSlackMrkdwnText as $i, getPluginSystemPromptContributions as $n, configValueSchema as $o, RESOURCE_WATCH_TOOL_SOURCE as $r, REPLY_TOOL_NAME as $t, latestConversationMessageSeq as A, isAbortError as Aa, deleteWorkspace as Ai, trimTrailingAssistantMessages as An, readConversationMessageEventSeq as Ao, updateReviewItemContent as Ar, isFinalAttempt as At, getAgentContextInputLimitTokens as B, consumeSandboxEgressPermissionDeniedSignal as Ba, setWorkspaceSnapshotBuild as Bi, tagJson as Bn, resolveRootVisibility as Bo, reviewItemNeedsSomeone as Br, requestAnotherSlice as Bt, settleConversationTitleWork as C, isConversationScopedChannel as Ca, getDashboardTaskLink as Ci, isContinuablePiBoundary as Cn, createPluginConversationEvents as Co, getReviewItem as Cr, deadLetterAttempt as Ct, estimateConversationMessagesTokens as D, withSlackRetries as Da, createPluginState as Di, normalizeToolNameFromResult as Dn, readConversationEventPageAfter as Do, reviewItemsNeedingUserVersionQuery as Dr, getConversationWorkState as Dt, buildConversationContext as E, runWithSlackInstallationToken as Ea, ToolInputError as Ei, isToolResultMessage as En, readConversationEventPage as Eo, listWaitingConversations as Er, getConversation as Et, turnHasReply as F, getWorkspaceSnapshotNotReadyError as Fa, updateWorkspace as Fi, escapeTagText as Fn, getSlackFileId as Fo, canUserReadReviewItem as Fr, pruneActiveConversation as Ft, AuthPausePersistenceError as G, resolveSandboxCommandEnvironment as Ga, getSandboxProvider as Gi, getOAuthAccountProviders as Gn, defaultTimezone as Go, automationCreatorUserId as Gr, GATED_TURN_LIMIT_WRAP_UP_MESSAGE as Gt, PluginCredentialFailureError as H, parseSandboxEgressCredentialToken as Ha, hash as Hi, createUserTokenStore as Hn, createPluginAnnotations as Ho, reviewItemReaderForUserInConversation as Hr, startConversationWork as Ht, upsertConversationMessage as I, isWorkspaceSnapshotNotReadyError as Ia, WorkspaceValidationError as Ii, readParentAgentTask as In, matchSlackAttachments as Io, isOnlyAssignee as Ir, recordAttemptFailure as It, abandonReplacedPendingAuth as J, sleep$2 as Ja, deliverOAuthAuthorization as Ji, createPluginEventPublisher as Jn, lookupSlackUserNames as Jo, createCodeChangePublisher as Jr, TurnSliceLimitExceededError as Jt, AuthorizationFlowDisabledError as K, normalizeSandboxEgressTracePropagationDomains as Ka, isVercelSandboxEgressRequest as Ki, resolvePluginOAuthAccount as Kn, resolveUserTimezone as Ko, resolveAssignee as Kr, TURN_LIMIT_WRAP_UP_MESSAGE as Kt, calculateContextCompactionTargetTokens as L, workspaceSnapshotNotReadyUserMessage as La, invalidateReadySnapshot as Li, renderChildTag as Ln, readAttachmentVisionSummary as Lo, readReviewItemAgentScope as Lr, recordConversationRetry as Lt, normalizeConversationText as M, throwSandboxOperationError as Ma, getWorkspaceByName as Mi, SESSION_CONTEXT_SECTION_TAG as Mn, FORK_INSTRUCTIONS as Mo, canActOnReviewItem as Mr, listActiveConversationIds as Mt, recordDeliveredAssistantMessage as N, wrapSandboxSetupError as Na, listWorkspaces as Ni, TURN_CONTEXT_TAG as Nn, loadForkHistory as No, canAgentChangeReviewItem as Nr, markConversationWorkEnqueued as Nt, getConversationMessageSlackTs as O, getWorkspaceTeamId as Oa, renderToolResultNudge as Oi, retainRuntimeTurnContext as On, readConversationEventPageAround as Oo, searchReviewItems as Or, hasConversationStop as Ot, trimConversationMessages as P, WorkspaceSnapshotNotReadyError as Pa, listWorkspacesByRepository as Pi, escapeClosingTags as Pn, notInheritedByForkChild as Po, canReadReviewItem as Pr, moveIdleConversationDestination as Pt, continuableMessages as Q, createPluginEmbedder as Qa, startOAuthFlow as Qi, getPluginSlackConversationLink as Qn, createDurableLocationConfigurationService as Qo, RESOURCE_SUBSCRIPTION_MAX_TTL_MS as Qr, isTurnExecutionLimitExceededError as Qt, getAgentBackgroundCompactionMarkTokens as R, clearSandboxEgressSignals as Ra, loadSnapshotsForProfile as Ri, renderTag as Rn, recordSlackAttachment as Ro, requireReviewItemAssignees as Rr, releaseConversationWork as Rt, resolveConversationTitle as S, getSlackClient as Sa, getDashboardSettingsLink as Si, isAssistantMessage as Sn, viewerMarksFromParticipant as So, getOpenReviewItemByDedupeKey as Sr, countPendingConversationMessages as St, resolveTaskTitle as T, normalizeSlackConversationId as Ta, setDashboardConversationLinkOptions as Ti, isToolResultError as Tn, readLatestConversationBrief as To, listReplyActionItems as Tr, dropPendingMessages as Tt, createPluginAuthOrchestration as U, sandboxEgressSignalsResponseSchema as Ua, isStale as Ui, findLegacyWebActorUserId as Un, listConversationAnnotations as Uo, EVERYONE_ASSIGNEE as Ur, steerWebPendingMessages as Ut, createPluginEgress as V, createSandboxEgressCredentialToken as Va, create as Vi, SANDBOX_EGRESS_AUTH_REQUIRED_MARKER as Vn, saveObjectAnnotations as Vo, reviewItemReaderForUser as Vr, requestConversationWork as Vt, authorizationId as W, buildSandboxEgressNetworkPolicy as Wa, ensureDockerDaemon as Wi, webActorUserIds as Wn, listConversationAnnotationsById as Wo, activeParticipantUserIds as Wr, stopConversationWork as Wt, clearPendingAuth as X, workspaceRepoCheckoutPath as Xa, parseOAuthStatePayload as Xi, getPluginApiRoutes as Xn, credentialAuditSource as Xo, getSlackToolContext as Xr, buildTurnErrorResponse as Xt, canReusePendingAuthLink as Y, tryWorkspaceRepoCheckoutPath as Ya, formatProviderLabel as Yi, createPluginHookRunner as Yn, credentialAuditAttributes as Yo, resolveChannelCapabilities as Yr, TurnToolCallLimitExceededError as Yt, getConversationPendingAuth as Z, PluginToolDeniedError as Za, resolveBaseUrl as Zi, getPluginRoutes as Zn, createPluginCache as Zo, RESOURCE_SUBSCRIPTION_DEFAULT_TTL_MS as Zr, createTurnLimitGate as Zt, appendConversationMessages as _, slackExternalRefIdSchema as _a, verifyTimerWatchCredentialSubject as _i, getTerminalAssistantMessages as _n, conversationHasParticipantUser as _o, projectConversationMessages as _r, claimInboundMessage as _t, loadProjection as a, addReactionToMessage as aa, createWatch as ai, getAssistantReplyText as an, sandboxSkillDir as ao, coreTaskRegistrations as ar, failTurnRecord as at, persistConversationMessages as b, getFilePermalink as ba, getDashboardObjectIconLink as bi, hasTurnInput as bn, conversationPinnedForUser as bo, countReviewItemsNeedingUser as br, completeConversationStop as bt, recordAgentsInstructionsUpdated as c, openSlackDirectMessage as ca, getWatch as ci, findLegacyNoReplyMarker as cn, buildCommandScript as co, readWebPushConfig as cr, recordTurnSummary as ct, recordAuthorizationCompleted as d, postSlackMessage as da, bindEventAutomationCredentialSubject as di, CODEMODE_TOOL_NAME as dn, createPluginModelCostRecorder as do, deletePushSubscription as dr, ackMessages as dt, formatSlackLink as ea, STOP_WATCHING_TOOL_NAME as ei, isAnswerToolName as en, SANDBOX_COMMAND_PATH as eo, getPluginTools as er, historyItemFromPiMessage as es, lostWorkerBeforeFirstSave as et, recordAuthorizationRequested as f, removeReactionFromMessage as fa, bindScheduledAutomationCredentialSubject as fi, REPORT_BLOCKED_TOOL_NAME as fn, createPluginLogger as fo, listPushSubscriptions as fr, appendExclusiveInboundMessage as ft, recordToolExecutionStarted as g, slackEntitySchema as ga, verifySlackDirectCredentialSubject as gi, getPiMessageRole as gn, readConversationAccessFromSql as go, isPausedBySlack as gr, checkInConversationWork as gt, recordSubscribedReplyRoute as h, uploadFilesToConversation as ha, verifyScheduledAutomationCredentialSubject as hi, extractAssistantText as hn, createConversationAccessReader as ho, savePushSubscription as hr, cancelHumanFacingPendingMessages as ht, loadConversationProjection as i, truncateStatusText as ia, createTimerWatch as ii, decideReply as in, SANDBOX_WORKSPACE_ROOT as io, validatePlugins as ir, setConfigDefaults as is, completeTurnRecord as it, markConversationMessage as j, isAlreadyExistsError as ja, getWorkspace as ji, REQUEST_CONTEXT_SECTION_TAG as jn, buildSentryConversationUrl as jo, PLUGIN_REVIEW_ITEM_KEY_PREFIX as jr, isInvalidConversationRecordError as jt, isHumanConversationMessage as k, runWithWorkspaceTeamId as ka, createWorkspace as ki, stripRuntimeTurnContext as kn, readConversationLastEventSeq as ko, takeReviewItem as kr, hasRunnableConversationWork as kt, recordAttachmentsDelivered as l, openSlackModal as la, listWatches as li, isLegacyNoReplyMarker as ln, buildNonInteractiveShellScript as lo, sendPushNotificationToUser as lr, CONVERSATION_WORK_CHECK_IN_INTERVAL_MS as lt, recordMcpProviderConnected as m, updateSlackMessage as ma, verifyEventAutomationCredentialSubject as mi, persistWithRetry as mn, canAddConversationMessages as mo, saveNotificationSchedule as mr, beginConversationResume as mt, commitMessages as n, normalizeSlackStatusText as na, cancelWatch as ni, remindMissingAnswer as nn, SANDBOX_REPOS_ROOT as no, getPlugins as nr, projectConversationEvents$1 as ns, saveTurnCheckpoint as nt, loadTurnProjection as o, deleteSlackMessage as oa, deliverWatch as oi, sanitizeAssistantText as on, sandboxSkillFile as oo, registration_exports as or, getTurnRecord as ot, recordGuardianActionReviewed as p, unfurlSlackLinks as pa, bindSlackDirectCredentialSubject as pi, readBlockedReport as pn, canAccessConversation as po, readNotificationSchedule as pr, appendInboundMessage as pt, AuthorizationPauseError as q, SANDBOX_RUNTIME as qa, proxyVercelSandboxEgressRequest as qi, agent_hooks_exports as qn, lookupSlackUser as qo, resolveAssignees as qr, TurnBudgetExceededError as qt, loadConnectedMcpProviders as r, slackMention as ra, collectEventMatchKeys as ri, replyTextSchema as rn, SANDBOX_SKILLS_ROOT as ro, setPlugins as rr, getConfigDefaults as rs, abandonTurnRecord as rt, openConversationProjection as s, getSlackMessagePermalink as sa, findMatchingWatches as si, NO_REPLY_TOOL_NAME as sn, sandboxSkillPathResolution as so, setBriefsConfig as sr, listTurnSummaries as st, commitAcceptedReply as t, normalizeSlackReplyMarkdown as ta, cancelSubscriptions as ti, readTurnAnswer as tn, SANDBOX_DATA_ROOT as to, getPluginUserPromptContributions as tr, piMessageFromHistoryItem as ts, pauseLostWorkerTurn as tt, recordAuthenticationLinked as u, postSlackEphemeralMessage as ua, takeDueTimerWatches as ui, readNoReply as un, runNonInteractiveCommand as uo, resolveNotificationTimezone as ur, CONVERSATION_WORK_STALE_ENQUEUE_MS as ut, hydrateConversationMessages as v, SlackActionError as va, JUNIOR_THREAD_STATE_TTL_MS as vi, getUserMessageInstructionText as vn, conversationIsMemberRoot as vo, REVIEW_ITEM_REPLIED_REASON as vr, clearConsumedConversationWake as vt, fallbackShortTitle as w, isDmChannel as wa, parseDashboardConversationLink as wi, isStandaloneRuntimeContextMessage as wn, readConversationBriefThrough as wo, insertReviewItem as wr, drainConversationMailbox as wt, toStoredConversationMessage as x, getHeaderString as xa, getDashboardReviewItemLink as xi, instructionTextForProjection as xn, conversationViewerMarks as xo, dismissOpenReviewItems as xr, completeConversationWork as xt, persistConversationMessageWindow as y, downloadPrivateSlackFile as ya, getDashboardConversationLink as yi, hasRuntimeTurnContext as yn, conversationIsNotUnsubscribedRoot as yo, closeReviewItem as yr, clearExpiredConversationLease as yt, getAgentContextCompactionTriggerTokens as z, consumeSandboxEgressAuthRequiredSignal as za, setWorkspaceSnapshot as zi, renderUntrustedTag as zn, slackAttachmentsVersionQuery as zo, requireReviewItemLinks as zr, releaseInboundMessage as zt };
|
|
15877
|
+
export { loadTurnCheckpoint as $, consumeSandboxEgressAuthRequiredSignal as $a, hash as $i, webActorUserIds as $n, readAttachmentVisionSummary as $o, activeParticipantUserIds as $r, TurnSliceLimitExceededError as $t, latestConversationMessageSeq as A, slackExternalRefIdSchema as Aa, getDashboardObjectIconLink as Ai, isStandaloneRuntimeContextMessage as An, canAddConversationMessages as Ao, dismissOpenReviewItems as Ar, getConversationWorkStates as At, getAgentContextInputLimitTokens as B, runWithSlackInstallationToken as Ba, createWorkspace as Bi, SCRIPT_TOOLS_SECTION_TAG as Bn, readConversationBriefThrough as Bo, PLUGIN_REVIEW_ITEM_KEY_PREFIX as Br, recordConversationRetry as Bt, settleConversationTitleWork as C, postSlackEphemeralMessage as Ca, verifyEventAutomationCredentialSubject as Ci, getTerminalAssistantMessages as Cn, sandboxSkillPathResolution as Co, saveNotificationSchedule as Cr, countPendingConversationMessages as Ct, estimateConversationMessagesTokens as D, updateSlackMessage as Da, JUNIOR_THREAD_STATE_TTL_MS as Di, instructionTextForProjection as Dn, createPluginModelCostRecorder as Do, REVIEW_ITEM_REPLIED_REASON as Dr, dropPendingMessages as Dt, buildConversationContext as E, unfurlSlackLinks as Ea, verifyTimerWatchCredentialSubject as Ei, hasTurnInput as En, runNonInteractiveCommand as Eo, projectConversationMessages as Er, drainConversationMailbox as Et, turnHasReply as F, getSlackClient as Fa, parseDashboardConversationLink as Fi, retainRuntimeTurnContext as Fn, conversationIsNotUnsubscribedRoot as Fo, listWaitingConversations as Fr, listActiveConversationIds as Ft, AuthPausePersistenceError as G, isAlreadyExistsError as Ga, listWorkspacesByRepository as Gi, readParentAgentTask as Gn, readConversationLastEventSeq as Go, isOnlyAssignee as Gr, startConversationWork as Gt, PluginCredentialFailureError as H, getWorkspaceTeamId as Ha, getWorkspace as Hi, TURN_CONTEXT_TAG as Hn, readConversationEventPage as Ho, canAgentChangeReviewItem as Hr, releaseInboundMessage as Ht, upsertConversationMessage as I, isConversationScopedChannel as Ia, parseDashboardPersonLink as Ii, stripRuntimeTurnContext as In, conversationPinnedForUser as Io, reviewItemsNeedingUserVersionQuery as Ir, markConversationWorkEnqueued as It, abandonReplacedPendingAuth as J, WorkspaceSnapshotNotReadyError as Ja, invalidateReadySnapshot as Ji, renderUntrustedTag as Jn, FORK_INSTRUCTIONS as Jo, requireReviewItemLinks as Jr, takeDeferredConversationMove as Jt, AuthorizationFlowDisabledError as K, throwSandboxOperationError as Ka, updateWorkspace as Ki, renderChildTag as Kn, readConversationMessageEventSeq as Ko, readReviewItemAgentScope as Kr, steerWebPendingMessages as Kt, calculateContextCompactionTargetTokens as L, isDmChannel as La, setDashboardConversationLinkOptions as Li, trimTrailingAssistantMessages as Ln, conversationViewerMarks as Lo, searchReviewItems as Lr, moveIdleConversationDestination as Lt, normalizeConversationText as M, downloadPrivateSlackFile as Ma, getDashboardReviewItemLink as Mi, isToolResultMessage as Mn, readConversationAccessFromSql as Mo, getReviewItem as Mr, hasRunnableConversationWork as Mt, recordDeliveredAssistantMessage as N, getFilePermalink as Na, getDashboardSettingsLink as Ni, latestTurnContextSection as Nn, conversationHasParticipantUser as No, insertReviewItem as Nr, isFinalAttempt as Nt, getConversationMessageSlackTs as O, uploadFilesToConversation as Oa, getDashboardConversationLink as Oi, isAssistantMessage as On, createPluginLogger as Oo, closeReviewItem as Or, getConversation as Ot, trimConversationMessages as P, getHeaderString as Pa, getDashboardTaskLink as Pi, normalizeToolNameFromResult as Pn, conversationIsMemberRoot as Po, listReplyActionItems as Pr, isInvalidConversationRecordError as Pt, continuableMessages as Q, clearSandboxEgressSignals as Qa, create as Qi, findLegacyWebActorUserId as Qn, matchSlackAttachments as Qo, EVERYONE_ASSIGNEE as Qr, TurnBudgetExceededError as Qt, getAgentBackgroundCompactionMarkTokens as R, isSlackRequestTimeout as Ra, createPluginState as Ri, CAPABILITY_SECTION_TAG as Rn, viewerMarksFromParticipant as Ro, takeReviewItem as Rr, pruneActiveConversation as Rt, resolveConversationTitle as S, openSlackModal as Sa, bindSlackDirectCredentialSubject as Si, getPiMessageRole as Sn, sandboxSkillFile as So, readNotificationSchedule as Sr, completeConversationWork as St, resolveTaskTitle as T, removeReactionFromMessage as Ta, verifySlackDirectCredentialSubject as Ti, hasRuntimeTurnContext as Tn, buildNonInteractiveShellScript as To, isPausedBySlack as Tr, deferConversationMove as Tt, createPluginAuthOrchestration as U, runWithWorkspaceTeamId as Ua, getWorkspaceByName as Ui, escapeClosingTags as Un, readConversationEventPageAfter as Uo, canReadReviewItem as Ur, requestAnotherSlice as Ut, createPluginEgress as V, withSlackRetries as Va, deleteWorkspace as Vi, SESSION_CONTEXT_SECTION_TAG as Vn, readLatestConversationBrief as Vo, canActOnReviewItem as Vr, releaseConversationWork as Vt, authorizationId as W, isAbortError as Wa, listWorkspaces as Wi, escapeTagText as Wn, readConversationEventPageAround as Wo, canUserReadReviewItem as Wr, requestConversationWork as Wt, clearPendingAuth as X, isWorkspaceSnapshotNotReadyError as Xa, setWorkspaceSnapshot as Xi, SANDBOX_EGRESS_AUTH_REQUIRED_MARKER as Xn, notInheritedByForkChild as Xo, reviewItemReaderForUser as Xr, GATED_TURN_LIMIT_WRAP_UP_MESSAGE as Xt, canReusePendingAuthLink as Y, getWorkspaceSnapshotNotReadyError as Ya, loadSnapshotsForProfile as Yi, tagJson as Yn, loadForkHistory as Yo, reviewItemNeedsSomeone as Yr, readInboundMessageSender as Yt, getConversationPendingAuth as Z, workspaceSnapshotNotReadyUserMessage as Za, setWorkspaceSnapshotBuild as Zi, createUserTokenStore as Zn, getSlackFileId as Zo, reviewItemReaderForUserInConversation as Zr, TURN_LIMIT_WRAP_UP_MESSAGE as Zt, appendConversationMessages as _, truncateStatusText as _a, getWatch as _i, CODE_MODE_CALL_STATUS_TEXT as _n, SANDBOX_DATA_ROOT as _o, readWebPushConfig as _r, piMessageFromHistoryItem as _s, checkInConversationWork as _t, loadProjection as a, deliverOAuthAuthorization as aa, getSlackToolContext as ai, isAnswerToolName as an, resolveSandboxCommandEnvironment as ao, getPluginApiRoutes as ar, listConversationAnnotations as as, failTurnRecord as at, persistConversationMessages as b, getSlackMessagePermalink as ba, bindEventAutomationCredentialSubject as bi, persistWithRetry as bn, SANDBOX_WORKSPACE_ROOT as bo, deletePushSubscription as br, setConfigDefaults as bs, clearExpiredConversationLease as bt, recordAgentsInstructionsUpdated as c, resolveBaseUrl as ca, RESOURCE_WATCH_TOOL_SOURCE as ci, replyTextSchema as cn, sleep$2 as co, getPluginSystemPromptContributions as cr, resolveUserTimezone as cs, listTurnSummaries as ct, recordAuthorizationCompleted as d, escapeSlackMrkdwnText as da, cancelWatch as di, sanitizeAssistantText as dn, ToolInputError as do, getPlugins as dr, credentialAuditAttributes as ds, CONVERSATION_WORK_STALE_ENQUEUE_MS as dt, isStale as ea, automationCreatorUserId as ei, TurnToolCallLimitExceededError as en, consumeSandboxEgressPermissionDeniedSignal as eo, getOAuthAccountProviders as er, recordSlackAttachment as es, lostWorkerBeforeFirstSave as et, recordAuthorizationRequested as f, formatSlackLink as fa, collectEventMatchKeys as fi, NO_REPLY_TOOL_NAME as fn, isToolInputError as fo, setPlugins as fr, credentialAuditSource as fs, ackMessages as ft, recordToolExecutionStarted as g, slackMentionedUserIds as ga, findMatchingWatches as gi, CODEMODE_TOOL_NAME as gn, SANDBOX_COMMAND_PATH as go, setBriefsConfig as gr, historyItemFromPiMessage as gs, cancelHumanFacingPendingMessages as gt, recordSubscribedReplyRoute as h, slackMention as ha, deliverWatch as hi, readNoReply as hn, createPluginModel as ho, registration_exports as hr, configValueSchema as hs, beginConversationResume as ht, loadConversationProjection as i, proxyVercelSandboxEgressRequest as ia, resolveChannelCapabilities as ii, REPLY_TOOL_NAME as in, buildSandboxEgressNetworkPolicy as io, createPluginHookRunner as ir, createPluginAnnotations as is, completeTurnRecord as it, markConversationMessage as j, SlackActionError as ja, getDashboardPersonLink as ji, isToolResultError as jn, createConversationAccessReader as jo, getOpenReviewItemByDedupeKey as jr, hasConversationStop as jt, isHumanConversationMessage as k, slackEntitySchema as ka, getDashboardLinkFilter as ki, isContinuablePiBoundary as kn, canAccessConversation as ko, countReviewItemsNeedingUser as kr, getConversationWorkState as kt, recordAttachmentsDelivered as l, startOAuthFlow as la, STOP_WATCHING_TOOL_NAME as li, decideReply as ln, tryWorkspaceRepoCheckoutPath as lo, getPluginTools as lr, lookupSlackUser as ls, recordTurnSummary as lt, recordMcpProviderConnected as m, normalizeSlackStatusText as ma, createWatch as mi, isLegacyNoReplyMarker as mn, createPluginEmbedder as mo, coreTaskRegistrations as mr, createDurableLocationConfigurationService as ms, appendInboundMessage as mt, commitMessages as n, getSandboxProvider as na, resolveAssignees as ni, createTurnLimitGate as nn, parseSandboxEgressCredentialToken as no, agent_hooks_exports as nr, resolveRootVisibility as ns, saveTurnCheckpoint as nt, loadTurnProjection as o, formatProviderLabel as oa, RESOURCE_SUBSCRIPTION_DEFAULT_TTL_MS as oi, readTurnAnswer as on, normalizeSandboxEgressTracePropagationDomains as oo, getPluginRoutes as or, listConversationAnnotationsById as os, getStoredTurnFields as ot, recordGuardianActionReviewed as p, normalizeSlackReplyMarkdown as pa, createTimerWatch as pi, findLegacyNoReplyMarker as pn, PluginToolDeniedError as po, validatePlugins as pr, createPluginCache as ps, appendExclusiveInboundMessage as pt, AuthorizationPauseError as q, wrapSandboxSetupError as qa, WorkspaceValidationError as qi, renderTag as qn, buildSentryConversationUrl as qo, requireReviewItemAssignees as qr, stopConversationWork as qt, loadConnectedMcpProviders as r, isVercelSandboxEgressRequest as ra, createCodeChangePublisher as ri, isTurnExecutionLimitExceededError as rn, sandboxEgressSignalsResponseSchema as ro, createPluginEventPublisher as rr, saveObjectAnnotations as rs, abandonTurnRecord as rt, openConversationProjection as s, parseOAuthStatePayload as sa, RESOURCE_SUBSCRIPTION_MAX_TTL_MS as si, remindMissingAnswer as sn, SANDBOX_RUNTIME as so, getPluginSlackConversationLink as sr, defaultTimezone as ss, getTurnRecord as st, commitAcceptedReply as t, ensureDockerDaemon as ta, resolveAssignee as ti, buildTurnErrorResponse as tn, createSandboxEgressCredentialToken as to, resolvePluginOAuthAccount as tr, slackAttachmentsVersionQuery as ts, pauseLostWorkerTurn as tt, recordAuthenticationLinked as u, SLACK_USER_MENTION_RE as ua, cancelSubscriptions as ui, getAssistantReplyText as un, workspaceRepoCheckoutPath as uo, getPluginUserPromptContributions as ur, lookupSlackUserNames as us, CONVERSATION_WORK_CHECK_IN_INTERVAL_MS as ut, hydrateConversationMessages as v, addReactionToMessage as va, listWatches as vi, REPORT_BLOCKED_TOOL_NAME as vn, SANDBOX_REPOS_ROOT as vo, sendPushNotificationToUser as vr, projectConversationEvents$1 as vs, claimInboundMessage as vt, fallbackShortTitle as w, postSlackMessage as wa, verifyScheduledAutomationCredentialSubject as wi, getUserMessageInstructionText as wn, buildCommandScript as wo, savePushSubscription as wr, deadLetterAttempt as wt, toStoredConversationMessage as x, openSlackDirectMessage as xa, bindScheduledAutomationCredentialSubject as xi, extractAssistantText as xn, sandboxSkillDir as xo, listPushSubscriptions as xr, completeConversationStop as xt, persistConversationMessageWindow as y, deleteSlackMessage as ya, takeDueTimerWatches as yi, readBlockedReport as yn, SANDBOX_SKILLS_ROOT as yo, resolveNotificationTimezone as yr, getConfigDefaults as ys, clearConsumedConversationWake as yt, getAgentContextCompactionTriggerTokens as z, normalizeSlackConversationId as za, renderToolResultNudge as zi, REQUEST_CONTEXT_SECTION_TAG as zn, createPluginConversationEvents as zo, updateReviewItemContent as zr, recordAttemptFailure as zt };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { C as completeText$1, S as completeObject$1, x as completeDecision$1 } from "./config-
|
|
2
|
-
import { _ as runBestEffort, a as extractGenAiUsageSummary } from "./logging-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { C as completeText$1, S as completeObject$1, x as completeDecision$1 } from "./config-CAXIpWQb.js";
|
|
2
|
+
import { _ as runBestEffort, a as extractGenAiUsageSummary } from "./logging-DPLEa8Bn.js";
|
|
3
|
+
import { Y as agentTurnCostUsd, r as getConversationEventStore } from "./db-COYOGzYS.js";
|
|
4
|
+
import { $ as conversationBriefSchema, Z as briefOutcomeStatusSchema, et as parseBriefInput } from "./conversation-fCWD9Az3.js";
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { conversationEventPresentationSchema, defineConversationEvent } from "@sentry/junior-plugin-api";
|
|
7
7
|
// src/chat/conversations/structured-events.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { b as setSpanAttributes, h as logWarn, m as logInfo } from "./logging-
|
|
2
|
-
import { o as isUserActor, s as parseActorUserId } from "./actor-
|
|
1
|
+
import { b as setSpanAttributes, h as logWarn, m as logInfo } from "./logging-DPLEa8Bn.js";
|
|
2
|
+
import { o as isUserActor, s as parseActorUserId } from "./actor-D2iXzvlN.js";
|
|
3
3
|
import { n as normalizePluginPackageNames, o as pluginRoots, t as discoverInstalledPluginPackageContent } from "./package-discovery-DJhGdS4c.js";
|
|
4
|
+
import * as z from "zod";
|
|
4
5
|
import path from "node:path";
|
|
5
6
|
import { randomUUID } from "node:crypto";
|
|
6
|
-
import * as z from "zod";
|
|
7
7
|
import { parse } from "yaml";
|
|
8
8
|
import { readFileSync, readdirSync, statSync } from "node:fs";
|
|
9
9
|
// src/chat/plugins/inline-manifest-source.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { E as withSpan, b as setSpanAttributes } from "./logging-
|
|
3
|
-
import {
|
|
1
|
+
import { Eo as runNonInteractiveCommand, Qi as create, bo as SANDBOX_WORKSPACE_ROOT, co as sleep, ea as isStale, go as SANDBOX_COMMAND_PATH, na as getSandboxProvider } from "./projection-DEdP1q6f.js";
|
|
2
|
+
import { E as withSpan, b as setSpanAttributes } from "./logging-DPLEa8Bn.js";
|
|
3
|
+
import { r as getStateAdapter } from "./adapter-AgCNqqsG.js";
|
|
4
4
|
import * as z from "zod";
|
|
5
5
|
// src/chat/sandbox/resources.ts
|
|
6
6
|
let configuredResources;
|