@sentry/junior 0.287.0 → 0.288.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-CL-HUKgd.js → adapter-Cikcqdty.js} +1 -1
- package/dist/{admin-C9urXVfi.js → admin-BcSxHuTB.js} +2 -2
- package/dist/{agent-runner-Bfnw551N.js → agent-runner-9MXyWUL8.js} +173 -89
- 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 +403 -40
- package/dist/{app-DBY5TnfY.d.ts → app-BUklJVBe.d.ts} +4 -2
- package/dist/app.d.ts +1 -1
- package/dist/app.js +521 -70
- package/dist/{assistant-reply-u_PRYzuz.js → assistant-reply-mj47jMRV.js} +1 -1
- package/dist/{automation-DksGNDRO.js → automation-DDXwHQs5.js} +2 -2
- package/dist/{background-compaction-queue-CYI909P5.js → background-compaction-queue-CjllSPir.js} +161 -90
- package/dist/{briefs-DaXiMWzT.js → briefs-DW9iuolG.js} +4 -3
- package/dist/{catalog-runtime-BCIuBe4d.js → catalog-runtime-B3gfH58M.js} +1 -1
- package/dist/cli/chat.js +14 -14
- package/dist/cli/check.js +3 -3
- package/dist/cli/main.js +3 -3
- package/dist/cli/plugins.js +4 -4
- package/dist/cli/snapshot-create.js +4 -4
- package/dist/cli/upgrade.d.ts +1 -1
- package/dist/cli/upgrade.js +3 -3
- package/dist/{config-CkHcUMN7.js → config-CLJcyYEF.js} +401 -9
- package/dist/{connections-BnIj0wtx.js → connections-BtdJftow.js} +9 -9
- package/dist/{conversation-E7ZPJx2H.js → conversation-DhoqHtQ7.js} +23 -6
- package/dist/{conversation-pending-messages-DVch6YQw.js → conversation-pending-messages-DHV0S4uF.js} +1 -1
- package/dist/{conversation-privacy-DF1hW0ja.js → conversation-privacy-BPirIVlX.js} +1 -1
- package/dist/core-model-BTt5E5b0.js +182 -0
- package/dist/{credential-sync-CzMar9hq.js → credential-sync-Co8Q2xRW.js} +28 -20
- package/dist/{db-DJ11eZqq.js → db-Co7DTYYh.js} +30 -20
- package/dist/{db-YDKKDxlh.d.ts → db-zIs8-Ba3.d.ts} +6 -2
- package/dist/{executor-BY9TB31g.js → executor-m0kIN71Q.js} +93 -12
- package/dist/{media-Cz1ZiV1U.js → history-IjdmO_r6.js} +6 -86
- package/dist/instrumentation.js +2 -2
- package/dist/{logging-BO5zU6Mt.js → logging-DbD-dErY.js} +3 -2
- package/dist/media-BAHvgkok.js +85 -0
- package/dist/{message-CsUbuEc8.js → message-DKTdTYm-.js} +9 -9
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +19 -41
- package/dist/{oauth-callback-server-hiDKK0_n.js → oauth-callback-server-CpbepSbp.js} +2 -2
- package/dist/{projection-CL_YWeGf.js → projection-BViECfYu.js} +309 -616
- package/dist/{prompt-BHOEQSmf.js → prompt-KT6MaDHN.js} +2 -182
- package/dist/{registry-BriFLnaJ.js → registry-D-Acyjhh.js} +1 -1
- package/dist/{resolve-Bt6GgAiA.js → resolve-gkT2R66z.js} +3 -3
- package/dist/{result-Bo1TZu0Q.js → result-DHmCFEt8.js} +8 -8
- package/dist/{runner-D3YeCQgt.js → runner-DBKjGjH-.js} +8 -8
- package/dist/{sandbox-egress-signals-CcnSPP4S.js → sandbox-egress-signals-9n8hqx29.js} +1 -1
- package/dist/{schedule-BTp__wrw.js → schedule-cP0AACm1.js} +11 -2
- package/dist/{schema-C6fsEwjo.d.ts → schema-B_6aOcx5.d.ts} +114 -3
- package/dist/{schema-BWE3RJEB.js → schema-DxicIQbc.js} +66 -13
- package/dist/{service-account-r6fl0b-9.js → service-account-Bi0HsY6w.js} +3 -3
- package/dist/{service-account-DiQQuuw7.js → service-account-CDlC9ssy.js} +3 -3
- package/dist/{session-stop-B2Nut40V.js → session-stop-BWOsuo8p.js} +56 -14
- package/dist/{skills-CD5aJdzg.js → skills-DO5K68Rq.js} +2 -2
- package/dist/{spawn-CalgZQiu.js → spawn-BBqZDcPa.js} +5 -5
- package/dist/{stop-kujZLbi0.js → stop-WC97cmHz.js} +802 -338
- package/dist/{store-DdIEUL1q.js → store-ByR1Lr7e.js} +4 -16
- package/dist/{task-runner-D_RDr2Hu.js → task-runner-B-Ewf8TX.js} +30 -22
- package/dist/{turn-failure-response-B5nV1Er-.js → turn-failure-response-CpdPoZSl.js} +18 -9
- package/dist/{validation-K4pqwoVZ.js → validation-B4sbIoES.js} +1 -1
- package/dist/{version-DBvhk1X9.js → version-D6lpuAgL.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-DrMmFUul.js → viewer-CeP27tC3.js} +4 -4
- package/dist/warmup-P_GJCL1c.js +767 -0
- package/dist/{work-ljRoODGu.js → work-DI7x1Slm.js} +14 -13
- package/dist/{worker-CYO1Q0Js.js → worker-CYPTOT4j.js} +6 -6
- package/migrations/0089_conversation_paused_status.sql +3 -0
- package/migrations/0090_guardian_review_time_index.sql +20 -0
- package/migrations/meta/0089_snapshot.json +4372 -0
- package/migrations/meta/0090_snapshot.json +4388 -0
- package/migrations/meta/_journal.json +14 -0
- package/package.json +5 -4
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as notificationScheduleSchema } from "./schedule-
|
|
2
|
-
import { D as conversationChildAgentTotalsSchema, S as conversationUsageSchema, b as conversationSummaryReportSchema, i as actorIdentitySchema, s as conversationAuxiliaryCostsSchema } from "./conversation-
|
|
1
|
+
import { r as notificationScheduleSchema } from "./schedule-cP0AACm1.js";
|
|
2
|
+
import { D as conversationChildAgentTotalsSchema, S as conversationUsageSchema, U as base64DataSchema, b as conversationSummaryReportSchema, i as actorIdentitySchema, s as conversationAuxiliaryCostsSchema } from "./conversation-DhoqHtQ7.js";
|
|
3
3
|
import { i as fillUtcHours, r as fillUtcDays, s as sumUtcHoursIntoSixHours, w as AGENT_INVOCATION_STATUSES, x as userInputRequestSchema } from "./reporting-window-B3Ze-Qnt.js";
|
|
4
|
-
import "./automation-
|
|
5
|
-
import "./conversation-pending-messages-
|
|
4
|
+
import "./automation-DDXwHQs5.js";
|
|
5
|
+
import "./conversation-pending-messages-DHV0S4uF.js";
|
|
6
6
|
import { t as isPushServiceEndpoint } from "./push-endpoint-CO-nomUd.js";
|
|
7
7
|
import * as z from "zod";
|
|
8
8
|
import { codeChangeStateSchema, eventMatchSchema } from "@sentry/junior-plugin-api";
|
|
@@ -70,13 +70,22 @@ const archiveConversationResponseSchema = z.object({ archivedAt: z.string().date
|
|
|
70
70
|
const conversationAutoArchiveSchema = z.object({ autoArchive: z.boolean() }).strict();
|
|
71
71
|
/** Result of archiving all of the viewer's done conversations once. */
|
|
72
72
|
const archiveDoneConversationsResponseSchema = z.object({ archived: z.number().int().nonnegative() }).strict();
|
|
73
|
-
// src/api/schema/conversation-
|
|
74
|
-
/**
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
73
|
+
// src/api/schema/conversation-outline.ts
|
|
74
|
+
/**
|
|
75
|
+
* Longest outline item text. The outline previews each message, so the
|
|
76
|
+
* server cuts the text and does not send whole messages.
|
|
77
|
+
*/
|
|
78
|
+
const CONVERSATION_OUTLINE_TEXT_LENGTH = 200;
|
|
79
|
+
/**
|
|
80
|
+
* The person messages of a whole Conversation, in seq order. The dashboard
|
|
81
|
+
* outline uses it to show messages that the transcript did not load. It has
|
|
82
|
+
* no items when the viewer cannot see the transcript.
|
|
83
|
+
*/
|
|
84
|
+
const conversationOutlineSchema = z.object({ items: z.array(z.object({
|
|
85
|
+
seq: z.number().int().nonnegative(),
|
|
86
|
+
text: z.string().min(1),
|
|
87
|
+
mentions: z.array(actorIdentitySchema).optional()
|
|
88
|
+
}).strict()) }).strict();
|
|
80
89
|
// src/api/schema/conversation-stats.ts
|
|
81
90
|
const conversationStatsItemSchema = z.object({
|
|
82
91
|
active: z.number(),
|
|
@@ -249,6 +258,41 @@ const conversationWatchesReportSchema = z.object({
|
|
|
249
258
|
conversationId: z.string().min(1),
|
|
250
259
|
watches: z.array(conversationWatchSchema)
|
|
251
260
|
}).strict();
|
|
261
|
+
// src/api/schema/board.ts
|
|
262
|
+
const boardColumnSchema = z.enum([
|
|
263
|
+
"planned",
|
|
264
|
+
"in_progress",
|
|
265
|
+
"ready",
|
|
266
|
+
"done"
|
|
267
|
+
]);
|
|
268
|
+
const boardCardSchema = z.object({
|
|
269
|
+
/** Stable card id. One object gives one card. */
|
|
270
|
+
key: z.string().min(1),
|
|
271
|
+
column: boardColumnSchema,
|
|
272
|
+
objectType: z.enum(["task", "code_change"]),
|
|
273
|
+
title: z.string().min(1),
|
|
274
|
+
/** Short object reference, such as `getsentry/junior#42`. */
|
|
275
|
+
label: z.string().min(1),
|
|
276
|
+
url: z.string().url().optional(),
|
|
277
|
+
status: z.string().min(1),
|
|
278
|
+
/** When the card last changed. A Done card uses its finish time. */
|
|
279
|
+
updatedAt: z.string(),
|
|
280
|
+
conversation: z.object({
|
|
281
|
+
conversationId: z.string().min(1),
|
|
282
|
+
title: z.string().optional(),
|
|
283
|
+
/** Root title when the card comes from a Thread. */
|
|
284
|
+
rootTitle: z.string().optional()
|
|
285
|
+
}).strict(),
|
|
286
|
+
participants: z.array(actorIdentitySchema),
|
|
287
|
+
/** A Turn runs in the Conversation of the card or in one of its Tasks. */
|
|
288
|
+
working: z.boolean(),
|
|
289
|
+
/** The Conversation has an open review item that needs the viewer. */
|
|
290
|
+
needsViewer: z.boolean()
|
|
291
|
+
}).strict();
|
|
292
|
+
const boardReportSchema = z.object({
|
|
293
|
+
cards: z.array(boardCardSchema),
|
|
294
|
+
doneWindowHours: z.number().int().positive()
|
|
295
|
+
}).strict();
|
|
252
296
|
// src/api/schema/code.ts
|
|
253
297
|
const codeChangeSummarySchema = z.object({
|
|
254
298
|
closed: z.number().int().nonnegative(),
|
|
@@ -358,7 +402,7 @@ const notificationTimezoneSourceSchema = z.enum([
|
|
|
358
402
|
"saved",
|
|
359
403
|
"default"
|
|
360
404
|
]);
|
|
361
|
-
/** The viewer's
|
|
405
|
+
/** The viewer's push notification settings. */
|
|
362
406
|
const notificationSettingsSchema = z.object({
|
|
363
407
|
/** Server VAPID public key. Absent when Web Push is not configured. */
|
|
364
408
|
publicKey: z.string().min(1).optional(),
|
|
@@ -366,6 +410,11 @@ const notificationSettingsSchema = z.object({
|
|
|
366
410
|
/** Timezone that Junior uses for the schedule now. */
|
|
367
411
|
timezone: z.string().min(1),
|
|
368
412
|
timezoneSource: notificationTimezoneSourceSchema,
|
|
413
|
+
/**
|
|
414
|
+
* Whether the viewer's Slack notification schedule pauses notifications
|
|
415
|
+
* now. Absent when Junior cannot read it.
|
|
416
|
+
*/
|
|
417
|
+
slackPausedNow: z.boolean().optional(),
|
|
369
418
|
/** Number of browsers that receive the viewer's notifications. */
|
|
370
419
|
deviceCount: z.number().int().nonnegative()
|
|
371
420
|
}).strict();
|
|
@@ -592,6 +641,10 @@ const serviceAccountListSchema = z.object({ serviceAccounts: z.array(serviceAcco
|
|
|
592
641
|
const serviceAccountParamsSchema = z.object({ provider: z.string().regex(/^[a-z][a-z0-9-]*$/).max(64) }).strict();
|
|
593
642
|
const startServiceAccountSignInResponseSchema = z.object({ authorizationUrl: z.string().url() }).strict();
|
|
594
643
|
const disconnectServiceAccountResponseSchema = z.object({ disconnected: z.literal(true) }).strict();
|
|
644
|
+
/** One dictation recording. The model reads the audio format from the bytes. */
|
|
645
|
+
const transcriptionRequestSchema = z.object({ audio: base64DataSchema(3145728) }).strict();
|
|
646
|
+
/** Text transcribed from one dictation recording. */
|
|
647
|
+
const transcriptionSchema = z.object({ text: z.string() }).strict();
|
|
595
648
|
// src/api/schema/review-item.ts
|
|
596
649
|
const answerSchema = z.object({
|
|
597
650
|
other: z.string().max(4e3).optional(),
|
|
@@ -780,4 +833,4 @@ const versionsSchema = z.object({
|
|
|
780
833
|
/** The viewer's rolling model spend. */
|
|
781
834
|
spend: z.string().min(1)
|
|
782
835
|
}).strict();
|
|
783
|
-
export {
|
|
836
|
+
export { startConnectionResponseSchema as $, personalTokenParamsSchema as A, reorderPinnedConversationsResponseSchema as At, locationParamsSchema as B, serviceAccountParamsSchema as C, conversationUnreadSchema as Ct, createdPersonalTokenSchema as D, pinConversationBodySchema as Dt, createPersonalTokenBodySchema as E, conversationSubscriptionResponseSchema as Et, personParamsSchema as F, notificationSettingsSchema as G, activityHours as H, personalSpendReportSchema as I, testNotificationResponseSchema as J, pushSubscriptionBodySchema as K, locationActivityDayReportSchema as L, actorDirectoryReportSchema as M, conversationCatchUpSchema as Mt, actorProfileReportSchema as N, personalTokenListSchema as O, pinConversationResponseSchema as Ot, avatarParamsSchema as P, disconnectConnectionResponseSchema as Q, locationDetailReportSchema as R, serviceAccountListSchema as S, conversationAutoArchiveSchema as St, startServiceAccountSignInResponseSchema as T, conversationSubscriptionBodySchema as Tt, activitySixHours as U, activityDays as V, dailyConversationActivitySchema as W, connectionParamsSchema as X, connectionListSchema as Y, connectionSchema as Z, reviewItemSchema as _, CONVERSATION_OUTLINE_TEXT_LENGTH as _t, baselineSnapshotSchema as a, codeRepositoryParamsSchema as at, transcriptionSchema as b, archiveConversationResponseSchema as bt, workspaceListSchema as c, boardReportSchema as ct, workspaceSchema as d, conversationChildAgentSchema as dt, codeActivityDaySchema as et, reviewItemActionSchema as f, conversationChildAgentsReportSchema as ft, reviewItemParamsSchema as g, conversationStatsReportSchema as gt, reviewItemListSchema as h, stopConversationTurnResponseSchema as ht, statsReportSchema as i, codePersonReportSchema as it, revokePersonalTokenResponseSchema as j, conversationCatchUpBodySchema as jt, personalTokenMetadataSchema as k, reorderPinnedConversationsBodySchema as kt, workspaceParamsSchema as l, conversationWatchSchema as lt, reviewItemListQuerySchema as m, continueConversationInSlackResponseSchema as mt, versionsSchema as n, codeChangeSummarySchema as nt, deleteWorkspaceResponseSchema as o, codeRepositoryReportSchema as ot, reviewItemCountSchema as p, continueConversationInSlackBodySchema as pt, pushSubscriptionDeleteBodySchema as q, statSchema as r, codeOverviewReportSchema as rt, workspaceBodySchema as s, codeRepositorySummarySchema as st, versionsQuerySchema as t, codeChangeSummaryReportSchema as tt, workspaceRepoSchema as u, conversationWatchesReportSchema as ut, reviewItemWaitingConversationsSchema as v, conversationOutlineSchema as vt, serviceAccountSchema as w, markConversationUnreadBodySchema as wt, disconnectServiceAccountResponseSchema as x, archiveDoneConversationsResponseSchema as xt, transcriptionRequestSchema as y, archiveConversationBodySchema as yt, locationDirectoryReportSchema as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
2
|
-
import { t as disconnectStateAdapter } from "./adapter-
|
|
3
|
-
import { n as finishServiceAccountSignIn, o as serviceAccountPlugins, r as getServiceAccountStatus, s as startServiceAccountSignIn, t as disconnectServiceAccount } from "./service-account-
|
|
1
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-B3gfH58M.js";
|
|
2
|
+
import { t as disconnectStateAdapter } from "./adapter-Cikcqdty.js";
|
|
3
|
+
import { n as finishServiceAccountSignIn, o as serviceAccountPlugins, r as getServiceAccountStatus, s as startServiceAccountSignIn, t as disconnectServiceAccount } from "./service-account-CDlC9ssy.js";
|
|
4
4
|
import { CLI_USAGE } from "./cli/run.js";
|
|
5
5
|
import { createServer } from "node:http";
|
|
6
6
|
// src/cli/service-account.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as fetchWithBoundedOAuthErrorBodies, i as resolvePluginHeaderEnvRefs } from "./registry-
|
|
1
|
+
import { K as isRecord, b as setSpanAttributes, h as logWarn } from "./logging-DbD-dErY.js";
|
|
2
|
+
import { c as fetchWithBoundedOAuthErrorBodies, i as resolvePluginHeaderEnvRefs } from "./registry-D-Acyjhh.js";
|
|
3
3
|
import { a as withLock, i as fenceLock, n as MUTATION_LOCK_TTL_MS } from "./locks-D-0h111u.js";
|
|
4
|
-
import { r as getStateAdapter } from "./adapter-
|
|
4
|
+
import { r as getStateAdapter } from "./adapter-Cikcqdty.js";
|
|
5
5
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
6
6
|
import { randomUUID } from "node:crypto";
|
|
7
7
|
import { UnauthorizedError, auth } from "@modelcontextprotocol/sdk/client/auth.js";
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { $
|
|
3
|
-
import {
|
|
4
|
-
import { h as logWarn, m as logInfo, p as logException, v as serializeGenAiAttribute } from "./logging-
|
|
2
|
+
import { $r as getDashboardConversationLink, Ba as sandboxSkillFile, Bn as getPlugins, Cn as renderTag$1, Fa as SANDBOX_DATA_ROOT, Fi as normalizeSlackReplyMarkdown, Fr as cancelSubscriptions, Gi as postSlackMessage, In as getPluginSlackConversationLink, Ln as getPluginSystemPromptContributions, N as normalizeConversationText, Ni as escapeSlackMrkdwnText, Pi as formatSlackLink, Qr as JUNIOR_THREAD_STATE_TTL_MS, Ra as SANDBOX_WORKSPACE_ROOT, Sn as renderChildTag, Tn as tagJson, Va as sandboxSkillPathResolution, Zr as verifyTimerWatchCredentialSubject, _n as SESSION_CONTEXT_SECTION_TAG, bn as escapeTagText, ct as listTurnSummaries, dn as isToolResultMessage, do as buildSentryConversationUrl, ei as getDashboardObjectIconLink, fn as normalizeToolNameFromResult, gn as REQUEST_CONTEXT_SECTION_TAG, in as hasRuntimeTurnContext, mn as stripRuntimeTurnContext, oi as ToolInputError, or as getReviewItem, pi as listWorkspaces, pn as retainRuntimeTurnContext, sn as isAssistantMessage, st as getTurnRecord, un as isToolResultError, vn as TURN_CONTEXT_TAG, wn as renderUntrustedTag, x as toStoredConversationMessage, yn as escapeClosingTags, za as sandboxSkillDir, zn as getPluginUserPromptContributions } from "./projection-BViECfYu.js";
|
|
3
|
+
import { I as renderCurrentInstruction, R as escapeXml, n as botConfig, z as escapeXmlText } from "./config-CLJcyYEF.js";
|
|
4
|
+
import { h as logWarn, m as logInfo, p as logException, v as serializeGenAiAttribute } from "./logging-DbD-dErY.js";
|
|
5
5
|
import { o as isUserActor, t as createActor } from "./actor-6jsm_v96.js";
|
|
6
|
-
import { T as SYSTEM_IDENTITY_ID, a as getConversationStore, o as getDb, r as getConversationEventStore, s as getSqlExecutor
|
|
7
|
-
import { A as juniorConversations, M as juniorUsers } from "./executor-
|
|
8
|
-
import { i as isVisionImageMediaType } from "./media-Cz1ZiV1U.js";
|
|
6
|
+
import { T as SYSTEM_IDENTITY_ID, V as nextDetailVersion, a as getConversationStore, o as getDb, r as getConversationEventStore, s as getSqlExecutor } from "./db-Co7DTYYh.js";
|
|
7
|
+
import { A as juniorConversations, M as juniorUsers } from "./executor-m0kIN71Q.js";
|
|
9
8
|
import { a as listReferenceFiles, c as soulPathCandidates, l as worldPathCandidates } from "./package-discovery-DJhGdS4c.js";
|
|
10
|
-
import { h as credentialSubjectSchema } from "./registry-
|
|
11
|
-
import {
|
|
12
|
-
import { r as getStateAdapter } from "./adapter-
|
|
13
|
-
import {
|
|
9
|
+
import { h as credentialSubjectSchema } from "./registry-D-Acyjhh.js";
|
|
10
|
+
import { c as conversationNoteEvent, i as JUNIOR_NATIVE_EVENT_NAMESPACE } from "./core-model-BTt5E5b0.js";
|
|
11
|
+
import { r as getStateAdapter } from "./adapter-Cikcqdty.js";
|
|
12
|
+
import { i as isVisionImageMediaType } from "./media-BAHvgkok.js";
|
|
13
|
+
import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage, r as EVENT_AUTHOR_ID } from "./prompt-KT6MaDHN.js";
|
|
14
|
+
import { a as QUIET_MARKER, i as NO_REPLY_MARKER, r as sanitizeAssistantText } from "./assistant-reply-mj47jMRV.js";
|
|
14
15
|
import { D as userCustomizationTextSchema, v as formatUserInputAnswer } from "./reporting-window-B3Ze-Qnt.js";
|
|
15
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-
|
|
16
|
-
import { Tt as eventGuidance, wt as eventCatalogEntry, xt as CORE_EVENT_NAMESPACE } from "./task-runner-
|
|
16
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-ByR1Lr7e.js";
|
|
17
|
+
import { Tt as eventGuidance, wt as eventCatalogEntry, xt as CORE_EVENT_NAMESPACE } from "./task-runner-B-Ewf8TX.js";
|
|
17
18
|
import path from "node:path";
|
|
18
19
|
import { isDeepStrictEqual } from "node:util";
|
|
19
20
|
import * as z from "zod";
|
|
@@ -865,6 +866,47 @@ async function loadTurnConversationNotes(input) {
|
|
|
865
866
|
}
|
|
866
867
|
return newestFirst.reverse();
|
|
867
868
|
}
|
|
869
|
+
// src/chat/experimental.ts
|
|
870
|
+
/**
|
|
871
|
+
* Known unstable product features that must be opted into explicitly.
|
|
872
|
+
* Add new keys here as features graduate from private experiments; remove them
|
|
873
|
+
* once they become stable defaults.
|
|
874
|
+
*/
|
|
875
|
+
const EXPERIMENTAL_FEATURES = [
|
|
876
|
+
"operator-tools",
|
|
877
|
+
"passive-routing",
|
|
878
|
+
"user-customization"
|
|
879
|
+
];
|
|
880
|
+
const EXPERIMENTAL_FEATURE_SET = new Set(EXPERIMENTAL_FEATURES);
|
|
881
|
+
let configuredExperimental = {};
|
|
882
|
+
function isExperimentalFeature(value) {
|
|
883
|
+
return EXPERIMENTAL_FEATURE_SET.has(value);
|
|
884
|
+
}
|
|
885
|
+
/** Replace app-level experimental opt-ins and return the previous setting. */
|
|
886
|
+
function setExperimentalFeatures(config) {
|
|
887
|
+
const previous = { ...configuredExperimental };
|
|
888
|
+
if (config === void 0) {
|
|
889
|
+
configuredExperimental = {};
|
|
890
|
+
return previous;
|
|
891
|
+
}
|
|
892
|
+
const next = {};
|
|
893
|
+
for (const [rawName, enabled] of Object.entries(config)) {
|
|
894
|
+
if (enabled === void 0) continue;
|
|
895
|
+
if (typeof enabled !== "boolean") throw new Error(`experimental.${rawName} must be a boolean when provided`);
|
|
896
|
+
if (!isExperimentalFeature(rawName)) throw new Error(`experimental.${rawName} is not a known experimental feature. Known features: ${EXPERIMENTAL_FEATURES.join(", ")}`);
|
|
897
|
+
next[rawName] = enabled;
|
|
898
|
+
}
|
|
899
|
+
configuredExperimental = next;
|
|
900
|
+
return previous;
|
|
901
|
+
}
|
|
902
|
+
/** Return a copy of the app-level experimental opt-ins configured by createApp(). */
|
|
903
|
+
function getExperimentalFeatures() {
|
|
904
|
+
return { ...configuredExperimental };
|
|
905
|
+
}
|
|
906
|
+
/** Return whether one experimental feature is enabled via createApp({ experimental }). */
|
|
907
|
+
function isExperimentalFeatureEnabled(feature) {
|
|
908
|
+
return configuredExperimental[feature] === true;
|
|
909
|
+
}
|
|
868
910
|
// src/chat/identities/customization.ts
|
|
869
911
|
/** Read the saved customization for one user. */
|
|
870
912
|
async function readUserCustomization(userId) {
|
|
@@ -2568,7 +2610,7 @@ function conversationSubtree(conversationIds) {
|
|
|
2568
2610
|
from junior_conversations child
|
|
2569
2611
|
join tree
|
|
2570
2612
|
on child.parent_conversation_id = tree.conversation_id
|
|
2571
|
-
and child.root_conversation_id = tree.root_conversation_id
|
|
2613
|
+
and (child.root_conversation_id || '') = tree.root_conversation_id
|
|
2572
2614
|
)
|
|
2573
2615
|
select scope_conversation_id, conversation_id from tree
|
|
2574
2616
|
) conversation_subtree`;
|
|
@@ -2923,4 +2965,4 @@ async function saveStoppedConversationEvents(conversationId, messages) {
|
|
|
2923
2965
|
}
|
|
2924
2966
|
}]);
|
|
2925
2967
|
}
|
|
2926
|
-
export { withoutSavedSteeringMessages as $, requireSlackChannelMessageScope as A, maybePostAutomatedTurnLimitNotice as B, enqueueEventNotification as C, timerWatchCredentialSubject as D, renderEventBatchInputs as E, WORKSPACE_SNAPSHOT_FAILED_EVENT as F, admitAutomatedTurn as G, resolveSlackReplyTarget as H, WORKSPACE_SNAPSHOT_READY_EVENT as I, assemblePrompt as J, recordFinishedTurnForAutomatedLimit as K, workspaceSnapshotFinishedEvent as L, slackChannelMessageReplyThreadTs as M, slackChannelMessageRunsAutomation as N, getEventCatalog as O, slackChannelMessageTrigger as P, loadPromptTurnContext as Q, workspaceSnapshotWatch as R, EVENT_WAIT_MS as S, isEventMailboxMetadata as T, sendSlackReply as U, postAutomatedTurnLimitNoticeForConversation as V, renderSlackObjectCard as W, buildSteeringPiMessage as X, buildPromptInput as Y, instructionForInputs as Z, sourceFromTurnInput as _, session_stop_exports as a,
|
|
2968
|
+
export { withoutSavedSteeringMessages as $, requireSlackChannelMessageScope as A, maybePostAutomatedTurnLimitNotice as B, enqueueEventNotification as C, timerWatchCredentialSubject as D, renderEventBatchInputs as E, WORKSPACE_SNAPSHOT_FAILED_EVENT as F, admitAutomatedTurn as G, resolveSlackReplyTarget as H, WORKSPACE_SNAPSHOT_READY_EVENT as I, assemblePrompt as J, recordFinishedTurnForAutomatedLimit as K, workspaceSnapshotFinishedEvent as L, slackChannelMessageReplyThreadTs as M, slackChannelMessageRunsAutomation as N, getEventCatalog as O, slackChannelMessageTrigger as P, loadPromptTurnContext as Q, workspaceSnapshotWatch as R, EVENT_WAIT_MS as S, isEventMailboxMetadata as T, sendSlackReply as U, postAutomatedTurnLimitNoticeForConversation as V, renderSlackObjectCard as W, buildSteeringPiMessage as X, buildPromptInput as Y, instructionForInputs as Z, sourceFromTurnInput as _, session_stop_exports as a, addConversationNote as at, conversationSubtree as b, loadReviewItemInput as c, readBlockedReport as ct, getAuthPausedConversationTurnId as d, deliversFinalText as dt, readUserCustomization as et, getEventBatchDelayMs as f, finishedRunReply as ft, resolveMailboxTurnWork as g, runDispatchOutcome as gt, parseWebMessages as h, remindMissingAutomationResult as ht, resumeStoppedConversationTree as i, setExperimentalFeatures as it, slackChannelMessageEvent as j, SLACK_EVENT_NAMESPACE as k, savedInputInstruction as l, FINISH_AUTOMATION_RUN_TOOL_NAME as lt, parseEventMessages as m, readAutomationResult as mt, isWatchEvent as n, getExperimentalFeatures as nt, skipInputAfterConversationStop as o, JUNIOR_PERSONALITY as ot, listActiveMailboxTurns as p, postsRunNotices as pt, resetAutomatedTurnLimit as q, markConversationsStopped as r, isExperimentalFeatureEnabled as rt, eventReviewItemInputs as s, REPORT_BLOCKED_TOOL_NAME as st, getConversationStoppedAtMs as t, saveUserCustomization as tt, getActiveConversationTurnId as u, automationResultSchema as ut, turnInputFactsFromConversationMessage as v, eventBatchMessageMeta as w, conversationSubtreeColumns as x, legacyWebMailboxMetadataSchema as y, renderTaskInput as z };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { h as logWarn } from "./logging-
|
|
2
|
+
import { h as logWarn } from "./logging-DbD-dErY.js";
|
|
3
3
|
import { s as skillRoots } from "./package-discovery-DJhGdS4c.js";
|
|
4
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
4
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-B3gfH58M.js";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import * as z from "zod";
|
|
7
7
|
import fs from "node:fs/promises";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { n as botConfig } from "./config-
|
|
3
|
-
import { o as getDb, x as conversationKindFromRow } from "./db-
|
|
4
|
-
import { A as juniorConversations } from "./executor-
|
|
5
|
-
import { $t as
|
|
6
|
-
import { n as createAndEnqueueAgentInvocation } from "./work-
|
|
2
|
+
import { n as botConfig } from "./config-CLJcyYEF.js";
|
|
3
|
+
import { o as getDb, x as conversationKindFromRow } from "./db-Co7DTYYh.js";
|
|
4
|
+
import { A as juniorConversations } from "./executor-m0kIN71Q.js";
|
|
5
|
+
import { $t as actorFromRun, Ht as AgentDepthLimitError, en as toolInvocationDestination } from "./agent-runner-9MXyWUL8.js";
|
|
6
|
+
import { n as createAndEnqueueAgentInvocation } from "./work-DI7x1Slm.js";
|
|
7
7
|
import { desc, eq, sql } from "drizzle-orm";
|
|
8
8
|
// src/chat/conversations/lineage.ts
|
|
9
9
|
/**
|