@sentry/junior 0.319.0 → 0.320.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/{adapter-8_S6Birm.js → adapter-DlLLoJKj.js} +1 -1
- package/dist/{admin-EsbUON1j.js → admin-BzRXDVfh.js} +1 -1
- package/dist/{agent-CtzMl32d.js → agent-DxZ7nHfD.js} +40 -50
- package/dist/{agent-update-delivery-pAvsbuGL.js → agent-update-delivery-CO4FU5Gg.js} +3 -3
- package/dist/api/schema.d.ts +2 -0
- package/dist/api/schema.js +1 -1
- package/dist/api.js +28 -23
- package/dist/{app-tACXxJPI.d.ts → app-CHCFIIDu.d.ts} +1 -0
- package/dist/app.d.ts +1 -1
- package/dist/app.js +20 -217
- package/dist/{channel-access-DET5hzZM.js → channel-access-BghWqlXx.js} +1 -1
- package/dist/{chat-core-engine-DpM3tMVi.js → chat-core-engine-BgfSLrDu.js} +31 -14
- package/dist/cli/chat.js +16 -16
- package/dist/cli/check.js +4 -4
- package/dist/cli/main.js +2 -2
- package/dist/cli/plugins.js +3 -3
- package/dist/cli/snapshot-create.js +4 -4
- package/dist/cli/upgrade.js +2 -2
- package/dist/{continue-in-slack-CFzDyxkH.js → continue-in-slack-DBlQP4PC.js} +3 -3
- package/dist/{conversation-privacy-C2vYK55O.js → conversation-privacy-qoh95v90.js} +1 -1
- package/dist/{create-Ta3SEIB5.js → create-jZSaDrCR.js} +2 -2
- package/dist/{credential-sync-DyRqDmY4.js → credential-sync-Bj9-UlNE.js} +11 -11
- package/dist/{db-BCaNWl9p.js → db-BacvswT0.js} +36 -23
- package/dist/{deployment-CfOew1Tm.js → deployment-BoJkRPDt.js} +1 -1
- package/dist/{engine-context-CiExoy1B.js → engine-context-Bi3Ync5t.js} +388 -12
- package/dist/{html-Bb2Si1bR.js → html-DW0pw5Pr.js} +4 -4
- package/dist/instrumentation.js +2 -2
- package/dist/{list-wwDcROh9.js → list-Dz3CdP3g.js} +20 -11
- package/dist/{logging-BRPTXAdf.js → logging-DsTnMqyi.js} +1 -1
- package/dist/{markers-9QoqW5ov.js → markers-C33gNYNE.js} +31 -30
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +2 -2
- package/dist/{oauth-callback-server-vhL9b-PZ.js → oauth-callback-server-C-pEhAQK.js} +2 -2
- package/dist/{oauth-relay-CH2v7WiB.js → oauth-relay-DIXdH-io.js} +1 -1
- package/dist/{profile-D9LdwmZi.js → profile-v9vA3RvH.js} +4 -4
- package/dist/{prompt-3TqxEOtc.js → prompt-C5CW2wKO.js} +1 -1
- package/dist/{reports-K-tbtEyx.js → reports-eBgrhPXS.js} +2 -2
- package/dist/{resolve-BBV2qf8A.js → resolve-HVXmbeCr.js} +5 -5
- package/dist/{result-5IdGJP4M.js → result-BPNzgeTl.js} +4 -4
- package/dist/{runner-BK_joPlM.js → runner-aNSDTST6.js} +6 -6
- package/dist/{sandbox-egress-signals-DXgWXXmm.js → sandbox-egress-signals-nzp9Ykf7.js} +1 -1
- package/dist/{schema-zWGG6VC1.js → schema-BlTO5M1d.js} +3 -1
- package/dist/{service-account-CateFyhw.js → service-account-DWIf1t6p.js} +2 -2
- package/dist/{skills-Ccjw8h2P.js → skills-50izzzdK.js} +4 -4
- package/dist/{slack-conversation-unfurl-ZC_TSpc4.js → slack-conversation-unfurl-C6jXhVYg.js} +7 -7
- package/dist/{storage-C9U7R5rM.js → storage-BtCxXiNt.js} +2 -2
- package/dist/{system-prompt-table-YBTHIFlP.js → system-prompt-table-CIR1B44Z.js} +3 -3
- package/dist/{users-CCRAqYb_.js → users-DOVo9sdU.js} +1 -1
- package/dist/{validation-BCUpJa8K.js → validation-CK0vuEHB.js} +1 -1
- package/dist/{version-BNm0JYj3.js → version-BuLVNlxB.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{worker-BhgpZ7_b.js → worker-C82kHU1R.js} +4 -4
- package/migrations/20261127150242_drop_space_members/migration.sql +9 -0
- package/migrations/20261127150242_drop_space_members/snapshot.json +53 -0
- package/package.json +6 -6
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
-
import { $ as resolveGatewayModel, B as getSlackBotToken, L as botConfig, P as parseSlackMessageTs, R as getChatConfig, S as isUserActor, T as toStoredSlackActor, Y as TURN_REASONING_LEVELS, _ as createActor, a as getStateValues, f as credentialContextForActor, h as credentialSubjectSchema, i as getStateAdapter, k as parseSlackUserId, l as fenceLock, s as MUTATION_LOCK_TTL_MS, u as withLock } from "./adapter-
|
|
3
|
-
import { $l as
|
|
2
|
+
import { $ as resolveGatewayModel, B as getSlackBotToken, L as botConfig, P as parseSlackMessageTs, R as getChatConfig, S as isUserActor, T as toStoredSlackActor, Y as TURN_REASONING_LEVELS, _ as createActor, a as getStateValues, f as credentialContextForActor, h as credentialSubjectSchema, i as getStateAdapter, k as parseSlackUserId, l as fenceLock, s as MUTATION_LOCK_TTL_MS, u as withLock } from "./adapter-DlLLoJKj.js";
|
|
3
|
+
import { $l as isPersonInput, $s as isDmChannel, Ad as conversationNoteEvent, Cc as findLinkedSlackUser, Cd as getProviderErrorUserMessage, Dd as JUNIOR_NATIVE_EVENT_NAMESPACE, Dn as releaseInboundMessage, Du as ToolInputError, Eo as publishAgentUpdate, Et as getRegistrations, Fn as readInboundMessageSender, Gp as juniorUsers, Ii as escapeSlackMrkdwnText, In as isEventMailboxMetadata, Is as findActorTimezone, Jo as verifyTimerWatchCredentialSubject, Kp as juniorDestinations, Li as formatSlackLink, N as claimProviderConversation, Nl as projectConversationMessages, Od as agentsInstructionsUpdatedEvent, Oi as postSlackEphemeralMessage, On as traceContextSchema, Op as juniorConversationEvents, Pd as getAppContext, Pf as addAgentTurnUsage, Pn as readParentMessage, Ql as instructionAuthor, Rr as getVercelConversationWorkQueue, Sd as getProviderErrorAttributes, Ts as conversationSubtreeColumns, Tt as getPlugins, Uf as nextDetailVersion, Ui as getPluginUserPromptContributions, Ut as appendAndEnqueueInboundMessage, W as conversationLastTurnOutcomeSql, Wt as appendInboundMessage, Xl as dispatchInstructionsInvokeSkills, Xo as JUNIOR_THREAD_STATE_TTL_MS, Xs as getSlackClient, Yu as completeText, Zr as formatSentryEventReference, _d as isCompactionSummaryText, _u as eventGuidance, a as getDb, aa as createPluginCache, ac as sleep, an as getConversationWorkState, ao as generateShortTitle, bd as createProviderError, bp as juniorLocationConfigurations, cu as EVENT_AUTHOR_ID, d as createSqlConversationEventStore, dd as estimateTextTokens, dr as readThroughHttpCache, du as eventBotAuthorId, ea as pluginConfigValues, fo as getEventCatalog, gn as takePendingEventMessages, hn as stopConversationWork, i as getConversationStore, ic as withSlackRetries, io as fallbackShortTitle, ip as juniorWorkspaces, j as startLocationThread, kd as authenticationLinkedEvent, ki as postSlackMessage, lu as EVENT_MESSAGE_AUTHOR, n as getConversationEventStore, nn as dropPendingMessages, np as juniorSnapshots, o as getSqlExecutor, oa as getConfigDefaults, od as createCache, on as getConversationWorkStates, pu as isEventConversationMessage, rp as juniorWorkspaceRepos, u as isPostgresErrorCode, uu as EVENT_SYSTEM_ACTOR, v as withConversationEventLock, vc as SYSTEM_IDENTITY_ID, wc as findSlackUserByPrimaryEmail, ws as conversationSubtree, xd as findProviderError, xp as juniorAgentBindings, yc as resolveActorIdentityId, yd as createAssistantProviderError, zc as getInboxItem, zp as juniorConversations } from "./db-BacvswT0.js";
|
|
4
4
|
import { Ct as instructionActors, St as contextProvenance, Un as isAgentUpdateEventType, Vt as messageCardRef, bt as piMessageSchema, gt as historyItemFromPiMessage, nt as agentTypeInstructions, pn as inboxItemQuestion, rt as agentTypeSchema, wt as instructionProvenanceFor, xn as normalizeUserInputAnswer, xt as agentInstructionProvenance, yn as formatUserInputAnswer, yt as piMessageFromHistoryItem } from "./types-BNHkJrOP.js";
|
|
5
|
-
import { A as toOptionalString, O as isNativeIdentityProvider, S as summarizeMessageText, T as withSpan, _ as serializeGenAiAttribute, a as getActiveTraceContext, f as logException, m as logWarn, p as logInfo, y as setSpanAttributes } from "./logging-
|
|
6
|
-
import { A as retainRuntimeTurnContext, B as authorAttrs, D as isToolResultError, G as mapBounded, I as TURN_CONTEXT_TAG, L as renderCurrentInstruction, M as trimTrailingAssistantMessages, O as isToolResultMessage, T as isContinuablePiBoundary, U as renderParentAgentTask, W as renderThreadContext, _ as extractAssistantText, c as SANDBOX_REPOS_ROOT, d as SANDBOX_WORKSPACE_ROOT, h as createPluginLogger, j as stripRuntimeTurnContext, k as normalizeToolNameFromResult, w as isAssistantMessage, x as hasRuntimeTurnContext, y as getTerminalAssistantMessages, z as THREAD_CONTEXT_TAGS } from "./prompt-
|
|
7
|
-
import { a as toCanonicalInputMessage } from "./conversation-privacy-
|
|
8
|
-
import { a as parseSkillFile, i as openAiPolicyDisablesImplicitInvocation } from "./skills-
|
|
9
|
-
import { N as resolveSandboxEgressProviderForHost, O as parseSandboxEgressAuthRequiredSignal, f as findInErrorChain, n as hash, o as getSandboxProvider, u as SANDBOX_RUNTIME, x as executeCredentialedEgressRequest } from "./profile-
|
|
10
|
-
import { S as readBlockedReport, _ as NO_REPLY_TOOL_NAME, a as buildCapabilitySections, b as readNoReply, d as readTurnAnswer, g as sanitizeAssistantText, l as REPLY_TOOL_NAME, m as decideReply, n as buildPluginSections, o as buildTurnContextPrompt, s as readPluginContributions, t as buildModeSections, x as REPORT_BLOCKED_TOOL_NAME, y as isLegacyNoReplyMarker } from "./system-prompt-table-
|
|
5
|
+
import { A as toOptionalString, O as isNativeIdentityProvider, S as summarizeMessageText, T as withSpan, _ as serializeGenAiAttribute, a as getActiveTraceContext, f as logException, m as logWarn, p as logInfo, y as setSpanAttributes } from "./logging-DsTnMqyi.js";
|
|
6
|
+
import { A as retainRuntimeTurnContext, B as authorAttrs, D as isToolResultError, G as mapBounded, I as TURN_CONTEXT_TAG, L as renderCurrentInstruction, M as trimTrailingAssistantMessages, O as isToolResultMessage, T as isContinuablePiBoundary, U as renderParentAgentTask, W as renderThreadContext, _ as extractAssistantText, c as SANDBOX_REPOS_ROOT, d as SANDBOX_WORKSPACE_ROOT, h as createPluginLogger, j as stripRuntimeTurnContext, k as normalizeToolNameFromResult, w as isAssistantMessage, x as hasRuntimeTurnContext, y as getTerminalAssistantMessages, z as THREAD_CONTEXT_TAGS } from "./prompt-C5CW2wKO.js";
|
|
7
|
+
import { a as toCanonicalInputMessage } from "./conversation-privacy-qoh95v90.js";
|
|
8
|
+
import { a as parseSkillFile, i as openAiPolicyDisablesImplicitInvocation } from "./skills-50izzzdK.js";
|
|
9
|
+
import { N as resolveSandboxEgressProviderForHost, O as parseSandboxEgressAuthRequiredSignal, f as findInErrorChain, n as hash, o as getSandboxProvider, u as SANDBOX_RUNTIME, x as executeCredentialedEgressRequest } from "./profile-v9vA3RvH.js";
|
|
10
|
+
import { S as readBlockedReport, _ as NO_REPLY_TOOL_NAME, a as buildCapabilitySections, b as readNoReply, d as readTurnAnswer, g as sanitizeAssistantText, l as REPLY_TOOL_NAME, m as decideReply, n as buildPluginSections, o as buildTurnContextPrompt, s as readPluginContributions, t as buildModeSections, x as REPORT_BLOCKED_TOOL_NAME, y as isLegacyNoReplyMarker } from "./system-prompt-table-CIR1B44Z.js";
|
|
11
11
|
import { t as isMissingVirtualModule } from "./virtual-module-BeKA_EII.js";
|
|
12
|
-
import { i as lookupSlackUserProfile, t as lookupActiveSlackWorkspaceMember } from "./users-
|
|
12
|
+
import { i as lookupSlackUserProfile, t as lookupActiveSlackWorkspaceMember } from "./users-DOVo9sdU.js";
|
|
13
13
|
import { r as userCustomizationTextSchema, s as isVisionImageMediaType } from "./user-customization-CvfuY9Eo.js";
|
|
14
14
|
import * as z from "zod";
|
|
15
15
|
import { getCurrentSystemMessage, getSystemMessageText } from "@earendil-works/pi-ai/compat";
|
|
16
16
|
import path from "node:path";
|
|
17
|
-
import { and, asc, desc, eq, inArray, isNotNull, isNull,
|
|
17
|
+
import { and, asc, desc, eq, inArray, isNotNull, isNull, lt, lte, ne, or, sql } from "drizzle-orm";
|
|
18
18
|
import { alias } from "drizzle-orm/pg-core";
|
|
19
19
|
import { actorSchema, agentEventKeys, createEventSource, createLocalSource, createWebSource, destinationSchema, escapeClosingTag, escapeClosingTags, escapeTagText, escapeTagTextAndQuotes, findTag, readTag, renderInlineTag, renderTag, sourceSchema, startsWithTag, tagJson, unescapeClosingTag, unescapeClosingTags } from "@sentry/junior-plugin-api";
|
|
20
20
|
import { isDeepStrictEqual } from "node:util";
|
|
@@ -1519,6 +1519,7 @@ function isEventInboundMessageId(id) {
|
|
|
1519
1519
|
return id.startsWith(EVENT_INBOUND_MESSAGE_PREFIX);
|
|
1520
1520
|
}
|
|
1521
1521
|
// src/chat/conversations/turn-lifecycle.ts
|
|
1522
|
+
/** The idempotency key of a Turn's `turn_started` event. */
|
|
1522
1523
|
function turnStartedKey(turnId) {
|
|
1523
1524
|
return `turn:${turnId}:started`;
|
|
1524
1525
|
}
|
|
@@ -1563,7 +1564,7 @@ var ConversationTurnLifecycleService = class {
|
|
|
1563
1564
|
/** Record a completion that is not a failure once. */
|
|
1564
1565
|
async complete(input) {
|
|
1565
1566
|
await this.events.append(input.conversationId, [{
|
|
1566
|
-
idempotencyKey:
|
|
1567
|
+
idempotencyKey: turnTerminalKey(input.turnId),
|
|
1567
1568
|
createdAtMs: input.createdAtMs,
|
|
1568
1569
|
data: {
|
|
1569
1570
|
type: "turn_completed",
|
|
@@ -1576,7 +1577,7 @@ var ConversationTurnLifecycleService = class {
|
|
|
1576
1577
|
/** Record a classified failure once. Do not store raw error text. */
|
|
1577
1578
|
async fail(input) {
|
|
1578
1579
|
await this.events.append(input.conversationId, [{
|
|
1579
|
-
idempotencyKey:
|
|
1580
|
+
idempotencyKey: turnTerminalKey(input.turnId),
|
|
1580
1581
|
createdAtMs: input.createdAtMs,
|
|
1581
1582
|
data: {
|
|
1582
1583
|
type: "turn_failed",
|
|
@@ -1601,7 +1602,7 @@ var ConversationTurnLifecycleService = class {
|
|
|
1601
1602
|
...input.reportAs ? { starter: input.reportAs } : void 0,
|
|
1602
1603
|
state: this.state
|
|
1603
1604
|
};
|
|
1604
|
-
const stored = await this.events.loadByIdempotencyKey(input.conversationId,
|
|
1605
|
+
const stored = await this.events.loadByIdempotencyKey(input.conversationId, turnTerminalKey(input.turnId));
|
|
1605
1606
|
if (stored?.data.type === "turn_failed") {
|
|
1606
1607
|
const { failureCode } = stored.data;
|
|
1607
1608
|
await publishAgentUpdate(input.conversationId, {
|
|
@@ -1642,6 +1643,13 @@ var ConversationTurnLifecycleService = class {
|
|
|
1642
1643
|
});
|
|
1643
1644
|
}
|
|
1644
1645
|
};
|
|
1646
|
+
/**
|
|
1647
|
+
* The idempotency key of a Turn's `turn_completed` or `turn_failed` event.
|
|
1648
|
+
* The two share it, so a Turn ends once.
|
|
1649
|
+
*/
|
|
1650
|
+
function turnTerminalKey(turnId) {
|
|
1651
|
+
return `turn:${turnId}:terminal`;
|
|
1652
|
+
}
|
|
1645
1653
|
/** Return the Turn lifecycle that records Conversation events. */
|
|
1646
1654
|
function getTurnLifecycle() {
|
|
1647
1655
|
return new ConversationTurnLifecycleService(getConversationEventStore(), { watchQueue: getVercelConversationWorkQueue });
|
|
@@ -3007,7 +3015,9 @@ function getConversationMessageSlackTs(message) {
|
|
|
3007
3015
|
return parseSlackMessageTs(message.meta?.slackTs);
|
|
3008
3016
|
}
|
|
3009
3017
|
// src/chat/services/conversation-title.ts
|
|
3010
|
-
|
|
3018
|
+
function inFlightTitles() {
|
|
3019
|
+
return getAppContext().conversationTitles;
|
|
3020
|
+
}
|
|
3011
3021
|
/**
|
|
3012
3022
|
* Set-once conversation title from the earliest human message.
|
|
3013
3023
|
*
|
|
@@ -3018,12 +3028,12 @@ const inFlightTitles = /* @__PURE__ */ new Map();
|
|
|
3018
3028
|
* is already titled or generation does not apply.
|
|
3019
3029
|
*/
|
|
3020
3030
|
async function ensureConversationTitle(args) {
|
|
3021
|
-
const pending = inFlightTitles.get(args.conversationId);
|
|
3031
|
+
const pending = inFlightTitles().get(args.conversationId);
|
|
3022
3032
|
if (pending) return pending;
|
|
3023
3033
|
const work = ensureConversationTitleOnce(args).finally(() => {
|
|
3024
|
-
inFlightTitles.delete(args.conversationId);
|
|
3034
|
+
inFlightTitles().delete(args.conversationId);
|
|
3025
3035
|
});
|
|
3026
|
-
inFlightTitles.set(args.conversationId, work);
|
|
3036
|
+
inFlightTitles().set(args.conversationId, work);
|
|
3027
3037
|
return work;
|
|
3028
3038
|
}
|
|
3029
3039
|
/** Return the earliest user message, which is the input of a dispatched run. */
|
|
@@ -3121,14 +3131,14 @@ function scheduleConversationTitle(args) {
|
|
|
3121
3131
|
* gives this to `waitUntil` so title work has an owner.
|
|
3122
3132
|
*/
|
|
3123
3133
|
async function settleConversationTitleWork(conversationId) {
|
|
3124
|
-
await inFlightTitles.get(conversationId);
|
|
3134
|
+
await inFlightTitles().get(conversationId);
|
|
3125
3135
|
}
|
|
3126
3136
|
/**
|
|
3127
3137
|
* Join in-flight generation when present, otherwise read the stored title.
|
|
3128
3138
|
* Does not start generation; providers use this only to project a title.
|
|
3129
3139
|
*/
|
|
3130
3140
|
async function resolveConversationTitle(args) {
|
|
3131
|
-
const pending = inFlightTitles.get(args.conversationId);
|
|
3141
|
+
const pending = inFlightTitles().get(args.conversationId);
|
|
3132
3142
|
if (pending) {
|
|
3133
3143
|
const generated = await pending;
|
|
3134
3144
|
if (generated?.trim()) return generated.trim();
|
|
@@ -5529,7 +5539,6 @@ async function withHeldInput(args, instruction) {
|
|
|
5529
5539
|
}]]);
|
|
5530
5540
|
}
|
|
5531
5541
|
// src/chat/events/workspace.ts
|
|
5532
|
-
const teamIdsByToken = /* @__PURE__ */ new Map();
|
|
5533
5542
|
/**
|
|
5534
5543
|
* Resolve the single-bot Slack team id for event-automation indexing, Event
|
|
5535
5544
|
* people mentions, and author trust.
|
|
@@ -5542,6 +5551,7 @@ const teamIdsByToken = /* @__PURE__ */ new Map();
|
|
|
5542
5551
|
async function resolveBotSlackTeamId() {
|
|
5543
5552
|
const token = getSlackBotToken();
|
|
5544
5553
|
if (!token) return void 0;
|
|
5554
|
+
const teamIdsByToken = getAppContext().slackBotTeamIds;
|
|
5545
5555
|
let pending = teamIdsByToken.get(token);
|
|
5546
5556
|
if (!pending) {
|
|
5547
5557
|
pending = getSlackClient().auth.test().then((result) => {
|
|
@@ -7113,15 +7123,6 @@ function isParentMessageAuthor(author) {
|
|
|
7113
7123
|
return typeof author?.userId === "string" && author.userId.startsWith(PARENT_MESSAGE_AUTHOR_PREFIX);
|
|
7114
7124
|
}
|
|
7115
7125
|
/**
|
|
7116
|
-
* Read when the root Turn code last saved a parent message to one child, or
|
|
7117
|
-
* undefined when it saved none.
|
|
7118
|
-
*/
|
|
7119
|
-
async function readLastParentMessageAtMs(conversationId) {
|
|
7120
|
-
const payload = juniorConversationEvents.payload;
|
|
7121
|
-
const [row] = await getSqlExecutor().db().select({ createdAt: juniorConversationEvents.createdAt }).from(juniorConversationEvents).where(and(eq(juniorConversationEvents.conversationId, conversationId), eq(juniorConversationEvents.type, "message"), like(sql`${payload}->'meta'->'author'->>'userId'`, `${PARENT_MESSAGE_AUTHOR_PREFIX}%`))).orderBy(desc(juniorConversationEvents.createdAt)).limit(1);
|
|
7122
|
-
return row?.createdAt.getTime();
|
|
7123
|
-
}
|
|
7124
|
-
/**
|
|
7125
7126
|
* Commit the parent's history for the first Turn of a fork child, before the
|
|
7126
7127
|
* Turn starts. `inputs` passed the sender check.
|
|
7127
7128
|
*/
|
|
@@ -7558,4 +7559,4 @@ async function appendSubagentEnded(parentConversationId, markerIds, outcome, cre
|
|
|
7558
7559
|
createdAtMs
|
|
7559
7560
|
})));
|
|
7560
7561
|
}
|
|
7561
|
-
export {
|
|
7562
|
+
export { deleteWebAuthorization as $, normalizeConversationText as $n, ToolActionReviewUnavailableError as $r, listWorkspaceNamesByRepository as $t, resumeForPersonInput as A, recordAgentsInstructionsUpdated as An, recordTurnSummary as Ar, readTaskInstructions as At, turnInputFactsFromConversationMessage as B, appendConversationMessages as Bn, TurnToolCallLimitExceededError as Br, isCooperativeTurnYieldError as Bt, getChildAgentLockName as C, writeAgentHistory as Cn, pauseLostWorkerTurn as Cr, buildPromptInput as Ct, notInheritedByForkChild as D, loadConversationProjection as Dn, failTurnRecord as Dr, loadPromptTurnContext as Dt, isInheritedForkHistory as E, loadConnectedMcpProviders as En, completeTurnRecord as Er, instructionForInputs as Et, getAuthPausedConversationTurnId as F, recordGuardianActionReviewed as Fn, turnTerminalKey as Fr, ConversationTurnBoundaryError as Ft, getTurnUserSlackMessageTs as G, resolveConversationTitle as Gn, captureTurnFailure as Gr, markTurnFailed as Gt, getTurnUserMessage as H, persistConversationMessageWindow as Hn, createTurnLimitGate as Hr, isTurnInputDeferredError as Ht, getEventBatchDelayMs as I, recordMcpProviderConnected as In, GATED_TURN_LIMIT_WRAP_UP_MESSAGE as Ir, CooperativeTurnYieldError as It, getPersistedThreadState as J, estimateConversationMessagesTokens as Jn, requireTurnFailureEventId as Jr, buildDeterministicTurnId as Jt, getLocationConfigurationService as K, settleConversationTitleWork as Kn, finalizeFailedTurnReplyWithEvent as Kr, startActiveTurn as Kt, listActiveMailboxTurns as L, recordSkillLoaded as Ln, TURN_LIMIT_WRAP_UP_MESSAGE as Lr, TurnInputCommitLostError as Lt, session_stop_exports as M, recordAuthenticationLinked as Mn, getTurnLifecycle as Mr, readUserCustomization as Mt, stopConversationTree as N, recordAuthorizationCompleted as Nn, loadTurnStart as Nr, saveUserCustomization as Nt, enqueueAutomatedInput as O, loadConversationSkillNames as On, getTurnRecord as Or, turnRequestText as Ot, completeCancelledConversationTurn as P, recordAuthorizationRequested as Pn, turnStartedKey as Pr, addConversationNote as Pt, createWebAuthorization as Q, markConversationMessage as Qn, ToolActionReviewLimitError as Qr, getWorkspaceByName as Qt, resolveMailboxTurnWork as R, recordSubscribedReplyRoute as Rn, TurnBudgetExceededError as Rr, TurnInputDeferredError as Rt, getAgentReplyMessageId as S, withAgentRequest as Sn, lostWorkerBeforeFirstSave as Sr, assemblePrompt as St, getSpawnedChildConversationId as T, commitMessages as Tn, abandonTurnRecord as Tr, instructionActorFor as Tt, getTurnUserMessageId as U, persistConversationMessages as Un, isTurnExecutionLimitExceededError as Ur, markTurnClosed as Ut, legacyWebMailboxMetadataSchema as V, hydrateConversationMessages as Vn, buildTurnErrorResponse as Vr, isTurnInputCommitLostError as Vt, getTurnUserReplyAttachmentContext as W, toStoredConversationMessage as Wn, buildTurnFailureResponse as Wr, markTurnCompleted as Wt, persistThreadStateById as X, isHumanConversationMessage as Xn, isCutOffStopReason as Xr, deleteWorkspace as Xt, persistThreadRuntimeState as Y, getConversationMessageSlackTs as Yn, buildTurnResult as Yr, createWorkspace as Yt, coerceThreadConversationState as Z, latestConversationMessageSeq as Zn, ToolActionRejectedError as Zr, getWorkspace as Zt, dropWaitingParentMessages as _, configValueSchema as _i, renderAgentsInstructions as _n, canReusePendingAuthLink as _r, resolveBotSlackTeamId as _t, listDescendantAgents as a, ROOT_LINE_BREAK as ai, workspaceRepoCheckoutPath as an, calculateContextCompactionTargetTokens as ar, addQuietEventNote as at, readAgentConfig as b, foldSystemMessages as bn, continuableMessages as br, loadThreadContextCursor as bt, resultAuthorId as c, CODE_MODE_CALL_STATUS_TEXT as ci, setWorkspaceSnapshot as cn, getAgentContextInputLimitTokens as cr, eventBatchMessageMeta as ct, isStopResult as d, formatProviderLabel as di, buildDeploymentSystemPrompt as dn, createPluginAuthOrchestration as dr, eventAuthorText as dt, createToolActionReview as ei, listWorkspaces as en, recordDeliveredAssistantMessage as er, getWebAuthorization as et, readChildConversationSender as f, parseOAuthStatePayload as fi, AGENTS_REMOVAL_NOTICE as fn, authorizationId as fr, findTrustedUser as ft, commitParentMessageFork as g, validateConfigValue as gi, readRepositoryInstructions as gn, abandonReplacedPendingAuth as gr, resolveEventAuthor as gt, childAgentTurnOptions as h, validateConfigKey as hi, findVisibleAgentsInstructions as hn, AuthorizationPauseError as hr, parseEmail as ht, listChildAgents as i, RISK_LEVELS as ii, tryWorkspaceRepoCheckoutPath as in, upsertConversationMessage as ir, EVENT_WAIT_MS as it, saveHeldInput as j, recordAttachmentsDelivered as jn, ConversationTurnLifecycleService as jr, renderTaskInput as jt, getConversationStoppedAtMs as k, loadTurnProjection as kn, listTurnSummaries as kr, withoutSavedSteeringMessages as kt, withSenderActors as l, persistWithRetry as li, setWorkspaceSnapshotBuild as ln, createPluginEgress as lr, renderEventBatchInputs as lt, buildParentMessage as m, projectConversationEvents as mi, buildAgentsInstructionsMessage as mn, AuthorizationFlowDisabledError as mr, isTrustedSlackAuthor as mt, recordSubagentStartedMarker as n, getToolActionRejectionMarker as ni, updateWorkspace as nn, trimConversationMessages as nr, loadInboxItemInput as nt, listOpenChildAgents as o, USER_AUTHORIZATION_LEVELS as oi, invalidateReadySnapshot as on, getAgentBackgroundCompactionMarkTokens as or, createEventInboundMessage as ot, appendParentMessage as p, startOAuthFlow as pi, AGENTS_REPLACEMENT_NOTICE as pn, AuthPausePersistenceError as pr, isAllowedDomain as pt, getPersistedSandboxState as q, conversationAuthorDisplayName as qn, getAgentTurnDiagnosticsAttributes as qr, buildDeterministicAssistantMessageId as qt, listAgentRelatives as r, restoreToolActionRejections as ri, WorkspaceValidationError as rn, turnHasReply as rr, savedInputInstruction as rt, listUnreportedSiblingAgents as s, CODEMODE_TOOL_NAME as si, loadSnapshotsForProfile as sn, getAgentContextCompactionTriggerTokens as sr, enqueueEventNotification as st, recordChildAgentEnded as t, reviewToolActions as ti, listWorkspacesByRepository as tn, renderConversationMessageLine as tr, eventInboxItemInputs as tt, isChildAgentEvent as u, deliverOAuthAuthorization as ui, isExperimentalFeatureEnabled as un, PluginCredentialFailureError as ur, timerWatchCredentialSubject as ut, isParentMessageAuthor as v, showsAgentsInstructions as vn, clearPendingAuth as vr, isHeldInputMessage as vt, getPersonStopTurnId as w, commitAcceptedReply as wn, saveTurnCheckpoint as wr, buildSteeringPiMessage as wt, getAgentMessageId as x, readAgentHistory as xn, loadTurnCheckpoint as xr, loadThreadContextTrimFloor as xt, agentConfigSchema as y, foldLeadingSystemMessages as yn, getConversationPendingAuth as yr, withHeldInput as yt, sourceFromTurnInput as z, recordToolExecutionStarted as zn, TurnSliceLimitExceededError as zr, getConversationTurnBoundaryError as zt };
|
package/dist/nitro.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as JuniorPluginSet } from "./plugins-DhGXZjlu.js";
|
|
2
|
-
import { r as JuniorDashboardOptions } from "./app-
|
|
2
|
+
import { r as JuniorDashboardOptions } from "./app-CHCFIIDu.js";
|
|
3
3
|
import { withSentryConfig as withSentryConfig$1 } from "@sentry/nitro";
|
|
4
4
|
type SentryNitroConfig = Parameters<typeof withSentryConfig$1>[0];
|
|
5
5
|
type SentryNitroOptions = NonNullable<Parameters<typeof withSentryConfig$1>[1]>;
|
package/dist/nitro.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as toOptionalTrimmed, a as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, g as resolvePackageDir, h as isValidPackageName, i as PLUGIN_TASK_QUEUE_TOPIC, n as CACHE_WARMUP_QUEUE_TOPIC, o as discoverInstalledPluginPackageContent, t as BACKGROUND_COMPACTION_QUEUE_TOPIC } from "./topics-DxuKurCX.js";
|
|
2
2
|
import { t as startLocalVercelQueueServer } from "./local-server-CpnGhYml.js";
|
|
3
3
|
import { n as TURN_STEP_TOPIC, t as TURN_ENDED_TOPIC } from "./topic-B2EWKKBT.js";
|
|
4
|
-
import { a as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, c as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, d as JUNIOR_TURN_ENDED_CALLBACK_ROUTE, f as JUNIOR_TURN_STEP_CALLBACK_ROUTE, g as getDeploymentServiceVersion, i as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE, l as JUNIOR_RETENTION_CRON_SCHEDULE, n as JUNIOR_AUTO_ARCHIVE_ROUTE, o as JUNIOR_HEARTBEAT_CRON_SCHEDULE, p as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, r as JUNIOR_CACHE_WARMUP_CALLBACK_ROUTE, s as JUNIOR_HEARTBEAT_ROUTE, t as JUNIOR_AUTO_ARCHIVE_CRON_SCHEDULE, u as JUNIOR_RETENTION_ROUTE } from "./deployment-
|
|
4
|
+
import { a as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, c as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, d as JUNIOR_TURN_ENDED_CALLBACK_ROUTE, f as JUNIOR_TURN_STEP_CALLBACK_ROUTE, g as getDeploymentServiceVersion, i as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE, l as JUNIOR_RETENTION_CRON_SCHEDULE, n as JUNIOR_AUTO_ARCHIVE_ROUTE, o as JUNIOR_HEARTBEAT_CRON_SCHEDULE, p as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, r as JUNIOR_CACHE_WARMUP_CALLBACK_ROUTE, s as JUNIOR_HEARTBEAT_ROUTE, t as JUNIOR_AUTO_ARCHIVE_CRON_SCHEDULE, u as JUNIOR_RETENTION_ROUTE } from "./deployment-BoJkRPDt.js";
|
|
5
5
|
import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-D_Ru4CWc.js";
|
|
6
6
|
import { n as loadPluginSetFromModule, r as resolvePluginModule } from "./plugin-module-Cv2ETe8Y.js";
|
|
7
7
|
import path from "node:path";
|
|
@@ -252,7 +252,7 @@ function injectVirtualConfig(nitro, options) {
|
|
|
252
252
|
*/
|
|
253
253
|
function injectVirtualSystemPrompts(nitro, options) {
|
|
254
254
|
nitro.options.virtual["#junior/system-prompts"] = async () => {
|
|
255
|
-
const { buildSystemPromptTable } = await import("./system-prompt-table-
|
|
255
|
+
const { buildSystemPromptTable } = await import("./system-prompt-table-CIR1B44Z.js").then((n) => n.r);
|
|
256
256
|
const table = await buildSystemPromptTable(await options.loadPlugins(), options.botName);
|
|
257
257
|
return `export const systemPrompts = ${JSON.stringify(table)};`;
|
|
258
258
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-
|
|
2
|
-
import { A as createUserTokenStore } from "./profile-
|
|
1
|
+
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-Bj9-UlNE.js";
|
|
2
|
+
import { A as createUserTokenStore } from "./profile-v9vA3RvH.js";
|
|
3
3
|
import { createServer } from "node:http";
|
|
4
4
|
// src/chat/local/oauth-callback-server.ts
|
|
5
5
|
const LOCAL_OAUTH_TIMEOUT_MS = 6e5;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
-
import { R as getChatConfig } from "./adapter-
|
|
2
|
+
import { R as getChatConfig } from "./adapter-DlLLoJKj.js";
|
|
3
3
|
import * as z from "zod";
|
|
4
4
|
import { randomBytes } from "node:crypto";
|
|
5
5
|
import { SignJWT, jwtVerify } from "jose";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { R as getChatConfig, c as acquireActiveLock, g as credentialUserSubjectId, i as getStateAdapter, m as credentialLogContext, p as credentialContextSchema, s as MUTATION_LOCK_TTL_MS, u as withLock } from "./adapter-
|
|
2
|
-
import { Af as
|
|
3
|
-
import { G as mapBounded, d as SANDBOX_WORKSPACE_ROOT, h as createPluginLogger } from "./prompt-
|
|
4
|
-
import { T as withSpan, f as logException, m as logWarn, u as logAudit, v as setSentryUser, y as setSpanAttributes } from "./logging-
|
|
1
|
+
import { R as getChatConfig, c as acquireActiveLock, g as credentialUserSubjectId, i as getStateAdapter, m as credentialLogContext, p as credentialContextSchema, s as MUTATION_LOCK_TTL_MS, u as withLock } from "./adapter-DlLLoJKj.js";
|
|
2
|
+
import { Af as ServiceAccountUnavailableError, Ld as HOST_MANAGED_CREDENTIAL_PLACEHOLDER, Nf as workloadIdentityHeader, Of as CredentialMintError, Pd as getAppContext, Rd as resolveAuthTokenPlaceholder, Tt as getPlugins, _f as resolvePluginCommandEnv, a as getDb, aa as createPluginCache, ac as sleep, df as createEncryptedState, ff as readEncryptedState, hf as resolveApiHeaderTransforms, ia as runNonInteractiveCommand, kf as CredentialUnavailableError, pf as findLegacyWebActorUserId, zd as mergeHeaderTransforms } from "./db-BacvswT0.js";
|
|
3
|
+
import { G as mapBounded, d as SANDBOX_WORKSPACE_ROOT, h as createPluginLogger } from "./prompt-C5CW2wKO.js";
|
|
4
|
+
import { T as withSpan, f as logException, m as logWarn, u as logAudit, v as setSentryUser, y as setSpanAttributes } from "./logging-DsTnMqyi.js";
|
|
5
5
|
import { n as redactSandboxEgressProxyPath, t as SANDBOX_EGRESS_PROXY_PATH } from "./proxy-path-BHYoKZdq.js";
|
|
6
6
|
import { r as continueTrace } from "./sentry-CPbZjomA.js";
|
|
7
7
|
import * as z from "zod";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as logException, m as logWarn, p as logInfo } from "./logging-
|
|
1
|
+
import { f as logException, m as logWarn, p as logInfo } from "./logging-DsTnMqyi.js";
|
|
2
2
|
import { escapeClosingTags, escapeTagText, escapeTagTextAndQuotes, findTag, openingTag, readTag, renderTag, startsWithTag, stripTags, unescapeClosingTags, unescapeTagText } from "@sentry/junior-plugin-api";
|
|
3
3
|
import pLimit from "p-limit";
|
|
4
4
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { h as createPluginLogger, r as runPluginHooksAtOnce } from "./prompt-
|
|
1
|
+
import { Et as getRegistrations, Gi as createPluginState, Qi as basePluginContext, fr as createPluginConversationEventStats } from "./db-BacvswT0.js";
|
|
2
|
+
import { h as createPluginLogger, r as runPluginHooksAtOnce } from "./prompt-C5CW2wKO.js";
|
|
3
3
|
// src/chat/plugins/hooks/reports.ts
|
|
4
4
|
const OPERATIONAL_REPORT_MAX_METRICS = 8;
|
|
5
5
|
const OPERATIONAL_REPORT_MAX_WIDGETS = 12;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { R as getChatConfig, i as getStateAdapter } from "./adapter-
|
|
2
|
-
import {
|
|
3
|
-
import { a as SANDBOX_COMMAND_PATH, d as SANDBOX_WORKSPACE_ROOT } from "./prompt-
|
|
4
|
-
import { i as CURL_DOWNLOAD_ARGS, o as getSandboxProvider, r as isStale, t as create } from "./profile-
|
|
5
|
-
import { T as withSpan, y as setSpanAttributes } from "./logging-
|
|
1
|
+
import { R as getChatConfig, i as getStateAdapter } from "./adapter-DlLLoJKj.js";
|
|
2
|
+
import { ac as sleep, ia as runNonInteractiveCommand } from "./db-BacvswT0.js";
|
|
3
|
+
import { a as SANDBOX_COMMAND_PATH, d as SANDBOX_WORKSPACE_ROOT } from "./prompt-C5CW2wKO.js";
|
|
4
|
+
import { i as CURL_DOWNLOAD_ARGS, o as getSandboxProvider, r as isStale, t as create } from "./profile-v9vA3RvH.js";
|
|
5
|
+
import { T as withSpan, y as setSpanAttributes } from "./logging-DsTnMqyi.js";
|
|
6
6
|
import * as z from "zod";
|
|
7
7
|
// src/chat/sandbox/resources.ts
|
|
8
8
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { H as renderDataTag } from "./prompt-
|
|
4
|
-
import { _ as NO_REPLY_TOOL_NAME } from "./system-prompt-table-
|
|
1
|
+
import { Eo as publishAgentUpdate, Fn as readInboundMessageSender, an as getConversationWorkState, au as remindsNoReplyForChildStatus, i as getConversationStore, mu as CORE_EVENT_NAMESPACE, nu as parentResultActor, uu as EVENT_SYSTEM_ACTOR, vc as SYSTEM_IDENTITY_ID } from "./db-BacvswT0.js";
|
|
2
|
+
import { Jt as buildDeterministicTurnId, L as listActiveMailboxTurns, O as enqueueAutomatedInput, S as getAgentReplyMessageId, b as readAgentConfig, c as resultAuthorId, f as readChildConversationSender, it as EVENT_WAIT_MS, k as getConversationStoppedAtMs, o as listOpenChildAgents, s as listUnreportedSiblingAgents, t as recordChildAgentEnded, x as getAgentMessageId } from "./markers-C33gNYNE.js";
|
|
3
|
+
import { H as renderDataTag } from "./prompt-C5CW2wKO.js";
|
|
4
|
+
import { _ as NO_REPLY_TOOL_NAME } from "./system-prompt-table-CIR1B44Z.js";
|
|
5
5
|
import { Bn as AGENT_UPDATE_EVENT_TYPE, zn as AGENT_MESSAGE_EVENT_TYPE } from "./types-BNHkJrOP.js";
|
|
6
6
|
// src/chat/child-agents/child-message.ts
|
|
7
7
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Ht as messageCardText } from "./types-BNHkJrOP.js";
|
|
2
|
-
import { St as loadPendingMessageCards, bt as completeAuthPauseTurn, ct as scheduleSessionCompletedPluginTasks, st as processPluginTask, xt as buildDeliveredTurnStatePatch } from "./agent-
|
|
3
|
-
import { h as getAssistantReplyText } from "./system-prompt-table-
|
|
4
|
-
import { f as logException, w as withLogContext, x as setTags } from "./logging-
|
|
5
|
-
import { $n as normalizeConversationText,
|
|
6
|
-
import { f as credentialContextForActor } from "./adapter-
|
|
7
|
-
import { i as getConversationStore,
|
|
2
|
+
import { St as loadPendingMessageCards, bt as completeAuthPauseTurn, ct as scheduleSessionCompletedPluginTasks, st as processPluginTask, xt as buildDeliveredTurnStatePatch } from "./agent-DxZ7nHfD.js";
|
|
3
|
+
import { h as getAssistantReplyText } from "./system-prompt-table-CIR1B44Z.js";
|
|
4
|
+
import { f as logException, w as withLogContext, x as setTags } from "./logging-DsTnMqyi.js";
|
|
5
|
+
import { $n as normalizeConversationText, Dn as loadConversationProjection, Gt as markTurnFailed, J as getPersistedThreadState, Kr as finalizeFailedTurnReplyWithEvent, Kt as startActiveTurn, Mr as getTurnLifecycle, Nn as recordAuthorizationCompleted, Qn as markConversationMessage, Un as persistConversationMessages, Vn as hydrateConversationMessages, X as persistThreadStateById, Z as coerceThreadConversationState, Zn as latestConversationMessageSeq, er as recordDeliveredAssistantMessage, fr as authorizationId, ir as upsertConversationMessage, li as persistWithRetry, q as getPersistedSandboxState, wn as commitAcceptedReply, wr as saveTurnCheckpoint } from "./markers-C33gNYNE.js";
|
|
6
|
+
import { f as credentialContextForActor } from "./adapter-DlLLoJKj.js";
|
|
7
|
+
import { i as getConversationStore, vc as SYSTEM_IDENTITY_ID } from "./db-BacvswT0.js";
|
|
8
8
|
import { createLocalSource, localDestinationSchema } from "@sentry/junior-plugin-api";
|
|
9
9
|
import { randomUUID } from "node:crypto";
|
|
10
10
|
// src/chat/local/runner.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { k as sandboxEgressSignalsResponseSchema } from "./profile-
|
|
1
|
+
import { k as sandboxEgressSignalsResponseSchema } from "./profile-v9vA3RvH.js";
|
|
2
2
|
// src/chat/local/sandbox-egress-signals.ts
|
|
3
3
|
const SANDBOX_EGRESS_SIGNALS_PATH = "/api/internal/sandbox-egress/signals";
|
|
4
4
|
const LOCAL_DEV_SERVER_TIMEOUT_MS = 1e3;
|
|
@@ -300,7 +300,9 @@ const todoAssigneeSchema = z.discriminatedUnion("kind", [
|
|
|
300
300
|
}).strict(),
|
|
301
301
|
z.object({
|
|
302
302
|
kind: z.literal("user"),
|
|
303
|
-
name: z.string().min(1).optional()
|
|
303
|
+
name: z.string().min(1).optional(),
|
|
304
|
+
/** The To-do is assigned to the person who reads it. */
|
|
305
|
+
viewer: z.literal(true).optional()
|
|
304
306
|
}).strict()
|
|
305
307
|
]);
|
|
306
308
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as disconnectStateAdapter } from "./adapter-
|
|
1
|
+
import { Bd as disconnectServiceAccount, Gd as serviceAccountPlugins, Hd as getServiceAccountStatus, Kd as startServiceAccountSignIn, Pd as getAppContext, Vd as finishServiceAccountSignIn } from "./db-BacvswT0.js";
|
|
2
|
+
import { n as disconnectStateAdapter } from "./adapter-DlLLoJKj.js";
|
|
3
3
|
import { CLI_USAGE } from "./cli/run.js";
|
|
4
4
|
import { createServer } from "node:http";
|
|
5
5
|
// src/cli/service-account.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
-
import { R as getChatConfig } from "./adapter-
|
|
2
|
+
import { R as getChatConfig } from "./adapter-DlLLoJKj.js";
|
|
3
3
|
import { f as skillRoots } from "./topics-DxuKurCX.js";
|
|
4
|
-
import { m as logWarn } from "./logging-
|
|
5
|
-
import {
|
|
6
|
-
import { G as mapBounded } from "./prompt-
|
|
4
|
+
import { m as logWarn } from "./logging-DsTnMqyi.js";
|
|
5
|
+
import { Pd as getAppContext } from "./db-BacvswT0.js";
|
|
6
|
+
import { G as mapBounded } from "./prompt-C5CW2wKO.js";
|
|
7
7
|
import * as z from "zod";
|
|
8
8
|
import path from "node:path";
|
|
9
9
|
import { parse } from "yaml";
|
package/dist/{slack-conversation-unfurl-ZC_TSpc4.js → slack-conversation-unfurl-C6jXhVYg.js}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
-
import {
|
|
3
|
-
import { A as slackBotIdSchema, C as parseActorUserId, E as parseSlackChannelId, I as slackMessageTsSchema, L as botConfig, M as slackTeamIdSchema, N as slackUserIdSchema, O as parseSlackTeamId, j as slackChannelIdSchema, k as parseSlackUserId, v as createSlackActor } from "./adapter-
|
|
4
|
-
import { i as lookupSlackUserProfile, n as lookupSlackBot } from "./users-
|
|
5
|
-
import { T as withSpan } from "./logging-
|
|
6
|
-
import { a as isMovableToSlack, i as continueConversationInSlack, n as alreadyContinuesInSlackMessage, t as BUSY } from "./continue-in-slack-
|
|
7
|
-
import { t as checkSlackChannelReadAccess } from "./channel-access-
|
|
8
|
-
import { G as mapBounded } from "./prompt-
|
|
2
|
+
import { Al as parseDashboardConversationLink, Ii as escapeSlackMrkdwnText, Li as formatSlackLink, Oi as postSlackEphemeralMessage, P as getConversationIdByProviderConversation, a as getDb, bn as deferConversationMove, dc as readActorIdentity, i as getConversationStore, ji as unfurlSlackLinks, kr as readConversationAccessFromSql, o as getSqlExecutor, oc as getWorkspaceTeamId, od as createCache, ti as runWithSlackInstallation } from "./db-BacvswT0.js";
|
|
3
|
+
import { A as slackBotIdSchema, C as parseActorUserId, E as parseSlackChannelId, I as slackMessageTsSchema, L as botConfig, M as slackTeamIdSchema, N as slackUserIdSchema, O as parseSlackTeamId, j as slackChannelIdSchema, k as parseSlackUserId, v as createSlackActor } from "./adapter-DlLLoJKj.js";
|
|
4
|
+
import { i as lookupSlackUserProfile, n as lookupSlackBot } from "./users-DOVo9sdU.js";
|
|
5
|
+
import { T as withSpan } from "./logging-DsTnMqyi.js";
|
|
6
|
+
import { a as isMovableToSlack, i as continueConversationInSlack, n as alreadyContinuesInSlackMessage, t as BUSY } from "./continue-in-slack-DBlQP4PC.js";
|
|
7
|
+
import { t as checkSlackChannelReadAccess } from "./channel-access-BghWqlXx.js";
|
|
8
|
+
import { G as mapBounded } from "./prompt-C5CW2wKO.js";
|
|
9
9
|
import * as z from "zod";
|
|
10
10
|
// src/chat/ingress/workspace-membership.ts
|
|
11
11
|
const MEMBER_TTL_MS = 3e5;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as getChatConfig } from "./adapter-
|
|
2
|
-
import { G as mapBounded } from "./prompt-
|
|
1
|
+
import { R as getChatConfig } from "./adapter-DlLLoJKj.js";
|
|
2
|
+
import { G as mapBounded } from "./prompt-C5CW2wKO.js";
|
|
3
3
|
import * as z from "zod";
|
|
4
4
|
import { AwsClient } from "aws4fetch";
|
|
5
5
|
import { del, get, issueSignedToken, presignUrl, put } from "@vercel/blob";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
-
import { D as isToolResultError, F as SESSION_CONTEXT_SECTION_TAG, I as TURN_CONTEXT_TAG, N as CAPABILITY_SECTION_TAG, O as isToolResultMessage, P as REQUEST_CONTEXT_SECTION_TAG, _ as extractAssistantText, d as SANDBOX_WORKSPACE_ROOT, f as sandboxSkillDir, h as createPluginLogger, k as normalizeToolNameFromResult, n as toPromptContributionContext, o as SANDBOX_DATA_ROOT, r as runPluginHooksAtOnce, t as PLUGIN_PROMPT_CONTRIBUTION_TOTAL_MAX_CHARS, w as isAssistantMessage } from "./prompt-
|
|
2
|
+
import { D as isToolResultError, F as SESSION_CONTEXT_SECTION_TAG, I as TURN_CONTEXT_TAG, N as CAPABILITY_SECTION_TAG, O as isToolResultMessage, P as REQUEST_CONTEXT_SECTION_TAG, _ as extractAssistantText, d as SANDBOX_WORKSPACE_ROOT, f as sandboxSkillDir, h as createPluginLogger, k as normalizeToolNameFromResult, n as toPromptContributionContext, o as SANDBOX_DATA_ROOT, r as runPluginHooksAtOnce, t as PLUGIN_PROMPT_CONTRIBUTION_TOTAL_MAX_CHARS, w as isAssistantMessage } from "./prompt-C5CW2wKO.js";
|
|
3
3
|
import { m as worldPathCandidates, p as soulPathCandidates, u as listReferenceFiles } from "./topics-DxuKurCX.js";
|
|
4
|
-
import { m as logWarn, p as logInfo } from "./logging-
|
|
4
|
+
import { m as logWarn, p as logInfo } from "./logging-DsTnMqyi.js";
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import { escapeClosingTag, escapeTagText, escapeTagTextAndQuotes, findTags, indentTagLines, markdownNodes, openingTag, parseMarkdown, promptMessageSchema, renderInlineTag, renderTag, unescapeTagText } from "@sentry/junior-plugin-api";
|
|
@@ -333,7 +333,7 @@ const LEAD_RULES = [
|
|
|
333
333
|
"- A member who tells you about a problem, a worry, or something they do not understand in the Space's area asks you to deal with it. Start the work that investigates it and delivers the fix or the answer, without asking first.",
|
|
334
334
|
"- A brief gives the goal, the targets, the facts with their source, the constraints, what done means, and the shape of the result. Hand off only the work that the member asked for, and name other work as a follow-up. When you pass on a member's approval, quote their exact words.",
|
|
335
335
|
"- When the result of one Thread changes the work of another, such as a renamed function or a moved file, tell the other Thread with `messageAgent`. Tell the members only when it changes what they get.",
|
|
336
|
-
"- When the done signal of a Thread's work is true, archive the Thread with `archiveAgent`.
|
|
336
|
+
"- When the done signal of a Thread's work is true, archive the Thread with `archiveAgent`.",
|
|
337
337
|
"- A decision is a member's only when it changes what ships or who sees it, and nothing that they said settles it. Look for their earlier words first. A child's question about how to do the work, such as a design detail, is not a member's decision. A confirmation that a child or Guardian asks for before an action is the member's, as `<task-execution>` says. Make every other decision yourself and say that it is your decision. Do not write that a member gave it to you, such as \"they delegated it to me\".",
|
|
338
338
|
`- When a child's result changes nothing for the members, end the Turn with \`${NO_REPLY_TOOL_NAME}\`.`,
|
|
339
339
|
"- When a member asks where the work is, answer from `listAgents` and the live state of its pull requests, which a Task reads for you, in this order: what needs them, what is in flight, what is done.",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ks as SlackActionError, Xs as getSlackClient, ic as withSlackRetries } from "./db-BacvswT0.js";
|
|
2
2
|
import * as z from "zod";
|
|
3
3
|
// src/chat/slack/users.ts
|
|
4
4
|
const profileFieldsSchema = z.object({ fields: z.record(z.string(), z.object({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
-
import {
|
|
2
|
+
import { Pd as getAppContext } from "./db-BacvswT0.js";
|
|
3
3
|
import { isDeepStrictEqual } from "node:util";
|
|
4
4
|
// src/chat/plugins/validation.ts
|
|
5
5
|
var validation_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// package.json
|
|
2
|
-
var version = "0.
|
|
2
|
+
var version = "0.320.0";
|
|
3
3
|
// src/version.ts
|
|
4
4
|
/** Installed Junior package version, or `unknown` when package metadata is unavailable. */
|
|
5
5
|
const JUNIOR_VERSION = typeof version === "string" && version.trim() ? version : "unknown";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as JUNIOR_VERSION } from "./version-
|
|
1
|
+
export { t as JUNIOR_VERSION } from "./version-BuLVNlxB.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
-
import { $t as
|
|
3
|
-
import { R as getChatConfig } from "./adapter-
|
|
4
|
-
import { f as logException, m as logWarn, p as logInfo, w as withLogContext, y as setSpanAttributes } from "./logging-
|
|
5
|
-
import {
|
|
2
|
+
import { $t as completeConversationWork, Cn as isFinalAttempt, Gt as beginConversationResume, Jt as claimConversationAttempt, Mn as isAttemptInterrupt, Nn as selectAttemptMessages, Qt as completeConversationStop, Td as isProviderRetryError, Vr as ConversationQueueMessageRejectedError, Vt as ackMessages, Wr as nudgeIdempotencyKey, Xt as clearConsumedConversationWake, an as getConversationWorkState, cn as recordAttemptFailure, dn as requestAnotherSlice, en as deadLetterAttempt, ln as recordConversationRetry, pn as startConversationWork, qt as checkInConversationWork, rn as ensureConversationWake, tn as drainConversationMailbox, tu as isTopLevel, un as releaseConversationWork, ur as getTurnRequestDeadline, wn as isInvalidConversationRecordError, xn as hasConversationStop, yn as countPendingConversationMessages } from "./db-BacvswT0.js";
|
|
3
|
+
import { R as getChatConfig } from "./adapter-DlLLoJKj.js";
|
|
4
|
+
import { f as logException, m as logWarn, p as logInfo, w as withLogContext, y as setSpanAttributes } from "./logging-DsTnMqyi.js";
|
|
5
|
+
import { j as saveHeldInput, k as getConversationStoppedAtMs } from "./markers-C33gNYNE.js";
|
|
6
6
|
// src/chat/task-execution/lost-lease.ts
|
|
7
7
|
/**
|
|
8
8
|
* Count a slice that lost its Conversation Lease as a failed attempt, then
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
-- Drop the junior_space_members table that space_lead_holds_name kept in
|
|
2
|
+
-- the database. No runtime code reads or writes it since 0.317.0.
|
|
3
|
+
-- The snapshot no longer has junior_spaces.name, visibility, or
|
|
4
|
+
-- archived_at, but they stay in the database for one release. 0.319.0 does
|
|
5
|
+
-- not read them, but its Space insert lists every column of its schema, so
|
|
6
|
+
-- it writes their defaults while this migration runs. The release that drops
|
|
7
|
+
-- them uses DROP COLUMN IF EXISTS.
|
|
8
|
+
-- squawk-ignore ban-drop-table -- unused since 0.317.0
|
|
9
|
+
DROP TABLE IF EXISTS "junior_space_members";
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "diff",
|
|
3
|
+
"version": "10",
|
|
4
|
+
"dialect": "postgres",
|
|
5
|
+
"id": "5dddf30d-1fa5-4f06-a90e-acd6a2f366d3",
|
|
6
|
+
"prevIds": ["8a318893-4b46-4fb3-9e04-6361efea0a02"],
|
|
7
|
+
"footprints": [
|
|
8
|
+
{
|
|
9
|
+
"statementType": "drop_column",
|
|
10
|
+
"statementTarget": ["column", "public", "junior_spaces", "name"],
|
|
11
|
+
"writes": [
|
|
12
|
+
"s|col|public.junior_spaces.name",
|
|
13
|
+
"n|col|public.junior_spaces.name",
|
|
14
|
+
"e|col|public.junior_spaces.name"
|
|
15
|
+
],
|
|
16
|
+
"reads": ["n|tbl|public.junior_spaces", "n|sch|public"]
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"statementType": "drop_column",
|
|
20
|
+
"statementTarget": ["column", "public", "junior_spaces", "archived_at"],
|
|
21
|
+
"writes": [
|
|
22
|
+
"s|col|public.junior_spaces.archived_at",
|
|
23
|
+
"n|col|public.junior_spaces.archived_at",
|
|
24
|
+
"e|col|public.junior_spaces.archived_at"
|
|
25
|
+
],
|
|
26
|
+
"reads": ["n|tbl|public.junior_spaces", "n|sch|public"]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"statementType": "drop_column",
|
|
30
|
+
"statementTarget": ["column", "public", "junior_spaces", "visibility"],
|
|
31
|
+
"writes": [
|
|
32
|
+
"s|col|public.junior_spaces.visibility",
|
|
33
|
+
"n|col|public.junior_spaces.visibility",
|
|
34
|
+
"e|col|public.junior_spaces.visibility"
|
|
35
|
+
],
|
|
36
|
+
"reads": ["n|tbl|public.junior_spaces", "n|sch|public"]
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"deltas": [
|
|
40
|
+
{
|
|
41
|
+
"op": "drop",
|
|
42
|
+
"key": "columns\u0000[\"public\",\"junior_spaces\",\"name\"]"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"op": "drop",
|
|
46
|
+
"key": "columns\u0000[\"public\",\"junior_spaces\",\"archived_at\"]"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"op": "drop",
|
|
50
|
+
"key": "columns\u0000[\"public\",\"junior_spaces\",\"visibility\"]"
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/junior",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.320.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@neondatabase/serverless": "^1.1.0",
|
|
67
67
|
"@sentry/api": "3.2.0",
|
|
68
68
|
"@sentry/http": "1.0.0",
|
|
69
|
-
"@sentry/junior-plugin-api": "0.
|
|
69
|
+
"@sentry/junior-plugin-api": "0.320.0",
|
|
70
70
|
"@sentry/nitro": "11.16.0",
|
|
71
71
|
"@sentry/node": "11.16.0",
|
|
72
72
|
"@sentry/server-utils": "11.16.0",
|
|
@@ -110,10 +110,10 @@
|
|
|
110
110
|
"@emnapi/core": "^1.10.0",
|
|
111
111
|
"@emnapi/runtime": "^1.10.0",
|
|
112
112
|
"@hono/node-server": "2.1.3",
|
|
113
|
-
"@sentry/junior-github": "0.
|
|
114
|
-
"@sentry/junior-linear": "0.
|
|
115
|
-
"@sentry/junior-notion": "0.
|
|
116
|
-
"@sentry/junior-sentry": "0.
|
|
113
|
+
"@sentry/junior-github": "0.320.0",
|
|
114
|
+
"@sentry/junior-linear": "0.320.0",
|
|
115
|
+
"@sentry/junior-notion": "0.320.0",
|
|
116
|
+
"@sentry/junior-sentry": "0.320.0",
|
|
117
117
|
"@sentry/junior-testing": "0.0.0",
|
|
118
118
|
"@types/node": "^24.19.2",
|
|
119
119
|
"@types/pg": "^8.15.6",
|