@sentry/junior 0.291.0 → 0.292.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-zphAlWE2.js → adapter-Cigb1MTr.js} +1 -1
- package/dist/{admin-B3WR7Y6e.js → admin-BO9V7vnn.js} +2 -2
- package/dist/{agent-runner-ke-hOiuv.js → agent-runner-BuH7EHrX.js} +33 -26
- package/dist/api.js +23 -23
- package/dist/app.js +26 -26
- package/dist/{assistant-reply-BV8SZaVd.js → assistant-reply-ZjLRGHm2.js} +1 -1
- package/dist/{background-compaction-queue-QDH_JS3D.js → background-compaction-queue-CqZBPe9g.js} +4 -4
- package/dist/{briefs-Bdv9BG5J.js → briefs-DZrhXJss.js} +2 -2
- package/dist/{catalog-runtime-yGnL9ywD.js → catalog-runtime-Cj9I0dco.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.js +4 -3
- package/dist/{config-UsaBOQgC.js → config-BerMjSVL.js} +2 -2
- package/dist/{connections-CePSRCoR.js → connections-BWmTOVPB.js} +6 -6
- package/dist/{conversation-privacy-B3wmawmz.js → conversation-privacy-BMfbOUCo.js} +1 -1
- package/dist/{credential-sync-LNRLXZCn.js → credential-sync-DZDij2CU.js} +13 -13
- package/dist/{db-c__lw9GH.js → db-BlfjuqzW.js} +3 -3
- package/dist/{executor-N8-D5Gvv.js → executor-ikZvFaMD.js} +22 -3
- package/dist/instrumentation.js +2 -2
- package/dist/{logging-DbXHuhac.js → logging-CTCH5jOy.js} +1 -1
- package/dist/{message-D1MEh8iR.js → message-C1ID1tKi.js} +9 -9
- package/dist/nitro.js +2 -2
- package/dist/{oauth-callback-server-DUtqhYwP.js → oauth-callback-server-CStBgDU7.js} +2 -2
- package/dist/{projection-D7XadqRY.js → projection-DY93nCfX.js} +10 -10
- package/dist/{prompt-CzEV4BF4.js → prompt-exicBZeb.js} +3 -3
- package/dist/{registry-CTtGtXZP.js → registry-X_xdFY9L.js} +1 -1
- package/dist/{resolve-nUuQ8yyH.js → resolve-B9dYN-nS.js} +3 -3
- package/dist/{result-Cr9tUdfS.js → result-CC8bV8Fl.js} +8 -8
- package/dist/{runner-D7NMbBim.js → runner-D44qp4rc.js} +7 -7
- package/dist/{sandbox-egress-signals-BJAyfzOD.js → sandbox-egress-signals-BrH6DWkt.js} +1 -1
- package/dist/{service-account-_ml5D4Tk.js → service-account-89JZHWCE.js} +3 -3
- package/dist/{service-account-CP1oBWTc.js → service-account-DoNZuJb-.js} +3 -3
- package/dist/{session-stop-BbsyIbK2.js → session-stop-DNucbmPf.js} +11 -11
- package/dist/{skills-CayJ8-Bj.js → skills-BeUfmYXL.js} +2 -2
- package/dist/{spawn-CktAopv_.js → spawn-CIAcfcvZ.js} +5 -5
- package/dist/{stop-BUzUJuN_.js → stop-Ckd3735h.js} +24 -24
- package/dist/{store-lotbeXq3.js → store-CS0xoqXW.js} +3 -3
- package/dist/{task-runner-BinM1l5g.js → task-runner-DjjHCX_m.js} +10 -10
- package/dist/{turn-failure-response-DH5nE6HJ.js → turn-failure-response-D0bwI462.js} +7 -7
- package/dist/{validation-I0CqX5NC.js → validation-Cvx_AupF.js} +1 -1
- package/dist/{version-C3sVz3bv.js → version-BrDx4Fzc.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-so1MPU10.js → viewer-4CxdwLLQ.js} +3 -3
- package/dist/{warmup-BH9HRBCI.js → warmup-B62hd4lD.js} +8 -8
- package/dist/{work-Cw6Fzvfz.js → work-Cu315oJl.js} +11 -11
- package/dist/{worker-qEykG39-.js → worker-4ClZu6ry.js} +6 -6
- package/migrations/0095_web_linked_slack_identity_repair.sql +252 -0
- package/migrations/meta/0095_snapshot.json +4452 -0
- package/migrations/meta/_journal.json +7 -0
- package/package.json +4 -4
package/dist/cli/upgrade.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as getChatConfig } from "../config-
|
|
2
|
-
import { t as createJuniorSqlExecutor } from "../executor-
|
|
3
|
-
import { t as createPluginCatalogRuntime } from "../registry-
|
|
1
|
+
import { i as getChatConfig } from "../config-BerMjSVL.js";
|
|
2
|
+
import { t as createJuniorSqlExecutor } from "../executor-ikZvFaMD.js";
|
|
3
|
+
import { t as createPluginCatalogRuntime } from "../registry-X_xdFY9L.js";
|
|
4
4
|
import { n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "../plugins-HYh_JOdw.js";
|
|
5
5
|
import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
|
|
6
6
|
import { basename, dirname, join, resolve } from "node:path";
|
|
@@ -381,6 +381,7 @@ async function runUpgrade(io = DEFAULT_IO, options = {}) {
|
|
|
381
381
|
const sqlExecutor = createJuniorSqlExecutor({
|
|
382
382
|
connectionString: readMigrationDatabaseUrl(sql.databaseUrl),
|
|
383
383
|
driver: sql.driver,
|
|
384
|
+
onInfo: (message) => io.info(` ${message}`),
|
|
384
385
|
statementTimeoutMs: false
|
|
385
386
|
});
|
|
386
387
|
try {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { E as withSpan, g as normalizeGenAiFinishReason, h as logWarn, i as extractGenAiUsageAttributes, p as logException, v as serializeGenAiAttribute } from "./logging-
|
|
3
|
-
import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-
|
|
2
|
+
import { E as withSpan, g as normalizeGenAiFinishReason, h as logWarn, i as extractGenAiUsageAttributes, p as logException, v as serializeGenAiAttribute } from "./logging-CTCH5jOy.js";
|
|
3
|
+
import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-BMfbOUCo.js";
|
|
4
4
|
import { AwsClient } from "aws4fetch";
|
|
5
5
|
import { del, get, put } from "@vercel/blob";
|
|
6
6
|
import { calculateCost, completeSimple, getEnvApiKey, getModels, registerApiProvider } from "@earendil-works/pi-ai/compat";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Fi as startOAuthFlow } from "./projection-
|
|
2
|
-
import { n as botConfig } from "./config-
|
|
3
|
-
import { A as deleteProviderIdentityForUser, k as deleteProviderIdentityForSlackUser, s as getSqlExecutor } from "./db-
|
|
4
|
-
import { u as hasRequiredOAuthScope } from "./registry-
|
|
5
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
6
|
-
import { c as deleteMcpServerSessionId, l as deleteMcpStoredOAuthCredentials, s as deleteMcpAuthSessionsForUserProvider } from "./agent-runner-
|
|
1
|
+
import { Fi as startOAuthFlow } from "./projection-DY93nCfX.js";
|
|
2
|
+
import { n as botConfig } from "./config-BerMjSVL.js";
|
|
3
|
+
import { A as deleteProviderIdentityForUser, k as deleteProviderIdentityForSlackUser, s as getSqlExecutor } from "./db-BlfjuqzW.js";
|
|
4
|
+
import { u as hasRequiredOAuthScope } from "./registry-X_xdFY9L.js";
|
|
5
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-Cj9I0dco.js";
|
|
6
|
+
import { c as deleteMcpServerSessionId, l as deleteMcpStoredOAuthCredentials, s as deleteMcpAuthSessionsForUserProvider } from "./agent-runner-BuH7EHrX.js";
|
|
7
7
|
import { randomBytes } from "node:crypto";
|
|
8
8
|
// src/handlers/oauth-html.ts
|
|
9
9
|
/** Build pre-escaped callback HTML with the shared response security policy. */
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { An as resolvePluginOAuthAccount, En as createUserTokenStore, Ji as postSlackMessage, Mi as formatProviderLabel, Ni as parseOAuthStatePayload, Pi as resolveBaseUrl, Z as getConversationPendingAuth, aa as getSlackClient, d as recordAuthorizationCompleted, ot as getTurnRecord, u as recordAuthenticationLinked } from "./projection-
|
|
2
|
-
import { L as escapeXml, a as getRuntimeMetadata, n as botConfig } from "./config-
|
|
3
|
-
import { U as isNativeIdentityProvider, _ as runBestEffort, h as logWarn, p as logException } from "./logging-
|
|
1
|
+
import { An as resolvePluginOAuthAccount, En as createUserTokenStore, Ji as postSlackMessage, Mi as formatProviderLabel, Ni as parseOAuthStatePayload, Pi as resolveBaseUrl, Z as getConversationPendingAuth, aa as getSlackClient, d as recordAuthorizationCompleted, ot as getTurnRecord, u as recordAuthenticationLinked } from "./projection-DY93nCfX.js";
|
|
2
|
+
import { L as escapeXml, a as getRuntimeMetadata, n as botConfig } from "./config-BerMjSVL.js";
|
|
3
|
+
import { U as isNativeIdentityProvider, _ as runBestEffort, h as logWarn, p as logException } from "./logging-CTCH5jOy.js";
|
|
4
4
|
import { p as parseSlackUserId } from "./actor-6jsm_v96.js";
|
|
5
|
-
import { D as resolveActorIdentityId, F as upsertLinkedIdentity, j as findUserByVerifiedEmails, s as getSqlExecutor } from "./db-
|
|
5
|
+
import { D as resolveActorIdentityId, F as upsertLinkedIdentity, j as findUserByVerifiedEmails, s as getSqlExecutor } from "./db-BlfjuqzW.js";
|
|
6
6
|
import { i as homeDir } from "./package-discovery-DJhGdS4c.js";
|
|
7
|
-
import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-
|
|
8
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
9
|
-
import { t as discoverSkills } from "./skills-
|
|
10
|
-
import { It as wakeAuthorizedTurn, Lt as wakePausedTurn, Yt as deleteWebAuthorization, a as finalizeMcpAuthorization, d as getMcpStoredOAuthCredentials, f as putMcpStoredOAuthCredentials, o as deleteMcpAuthSession, u as getMcpAuthSession, y as lookupSlackUserProfile } from "./agent-runner-
|
|
7
|
+
import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-X_xdFY9L.js";
|
|
8
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-Cj9I0dco.js";
|
|
9
|
+
import { t as discoverSkills } from "./skills-BeUfmYXL.js";
|
|
10
|
+
import { It as wakeAuthorizedTurn, Lt as wakePausedTurn, Yt as deleteWebAuthorization, a as finalizeMcpAuthorization, d as getMcpStoredOAuthCredentials, f as putMcpStoredOAuthCredentials, o as deleteMcpAuthSession, u as getMcpAuthSession, y as lookupSlackUserProfile } from "./agent-runner-BuH7EHrX.js";
|
|
11
11
|
import { r as acquireActiveLock } from "./locks-D-0h111u.js";
|
|
12
|
-
import { o as readIdentityById } from "./viewer-
|
|
13
|
-
import { r as getStateAdapter } from "./adapter-
|
|
14
|
-
import { ht as getPersistedThreadState, vt as coerceThreadConversationState } from "./task-runner-
|
|
15
|
-
import { _ as getMcpProviderErrorAttributes } from "./service-account-
|
|
16
|
-
import { i as readConnectedOAuthTokens, s as htmlCallbackResponse } from "./connections-
|
|
12
|
+
import { o as readIdentityById } from "./viewer-4CxdwLLQ.js";
|
|
13
|
+
import { r as getStateAdapter } from "./adapter-Cigb1MTr.js";
|
|
14
|
+
import { ht as getPersistedThreadState, vt as coerceThreadConversationState } from "./task-runner-DjjHCX_m.js";
|
|
15
|
+
import { _ as getMcpProviderErrorAttributes } from "./service-account-89JZHWCE.js";
|
|
16
|
+
import { i as readConnectedOAuthTokens, s as htmlCallbackResponse } from "./connections-BWmTOVPB.js";
|
|
17
17
|
import { n as relayLocalOAuthCallback } from "./oauth-relay-D6xxVywK.js";
|
|
18
18
|
import path from "node:path";
|
|
19
19
|
import { createHmac, createSecretKey, timingSafeEqual } from "node:crypto";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { i as getChatConfig } from "./config-
|
|
3
|
-
import { H as GOOGLE_IDENTITY_PROVIDER, W as normalizeIdentityEmail, h as logWarn } from "./logging-
|
|
2
|
+
import { i as getChatConfig } from "./config-BerMjSVL.js";
|
|
3
|
+
import { H as GOOGLE_IDENTITY_PROVIDER, W as normalizeIdentityEmail, h as logWarn } from "./logging-CTCH5jOy.js";
|
|
4
4
|
import { a as isSlackUserId, d as parseSlackChannelReferenceId, f as parseSlackTeamId, s as parseActorUserId } from "./actor-6jsm_v96.js";
|
|
5
|
-
import { A as juniorConversations, E as juniorConversationAnnotations, M as juniorUsers, N as juniorDestinations, S as juniorConversationMetrics, j as juniorIdentities, t as createJuniorSqlExecutor, v as juniorConversationParticipants, w as juniorConversationEvents, x as CONVERSATION_METRICS, y as juniorConversationBindings } from "./executor-
|
|
5
|
+
import { A as juniorConversations, E as juniorConversationAnnotations, M as juniorUsers, N as juniorDestinations, S as juniorConversationMetrics, j as juniorIdentities, t as createJuniorSqlExecutor, v as juniorConversationParticipants, w as juniorConversationEvents, x as CONVERSATION_METRICS, y as juniorConversationBindings } from "./executor-ikZvFaMD.js";
|
|
6
6
|
import { d as historyReplacementSchema, f as newConversationEventSchema, p as encodeHistoryPayload, s as conversationEventDataSchema, u as decodeStoredConversationEvent, y as usageSchema } from "./media-BepyEUNm.js";
|
|
7
7
|
import { randomUUID } from "node:crypto";
|
|
8
8
|
import { and, asc, desc, eq, gt, gte, inArray, isNull, lt, lte, ne, or, sql } from "drizzle-orm";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { _ as withScope } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import "./config-
|
|
3
|
-
import { h as logWarn, p as logException } from "./logging-
|
|
2
|
+
import "./config-BerMjSVL.js";
|
|
3
|
+
import { h as logWarn, p as logException } from "./logging-CTCH5jOy.js";
|
|
4
4
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
5
5
|
import { sql } from "drizzle-orm";
|
|
6
6
|
import { bigint, boolean, check, date, doublePrecision, foreignKey, index, integer, jsonb, pgTable, primaryKey, text, timestamp, uniqueIndex, uuid } from "drizzle-orm/pg-core";
|
|
@@ -770,6 +770,20 @@ const juniorSqlSchema = {
|
|
|
770
770
|
juniorWorkspaceRepos,
|
|
771
771
|
juniorWorkspaces
|
|
772
772
|
};
|
|
773
|
+
// src/db/info-messages.ts
|
|
774
|
+
/**
|
|
775
|
+
* Send Postgres `INFO` messages from every pool connection to `onInfo`.
|
|
776
|
+
* A migration uses `RAISE INFO` to report its result to the operator.
|
|
777
|
+
* Postgres always sends `INFO` to the client. Its own messages, such as
|
|
778
|
+
* "already exists, skipping", are `NOTICE`, so they stay out.
|
|
779
|
+
*/
|
|
780
|
+
function forwardInfoMessages(pool, onInfo) {
|
|
781
|
+
pool.on("connect", (client) => {
|
|
782
|
+
client.on("notice", (notice) => {
|
|
783
|
+
if (notice.severity === "INFO" && notice.message) onInfo(notice.message);
|
|
784
|
+
});
|
|
785
|
+
});
|
|
786
|
+
}
|
|
773
787
|
// src/db/migrate.ts
|
|
774
788
|
const LOCK_TIMEOUT_MS = 5e3;
|
|
775
789
|
const LOCK_ATTEMPTS = 5;
|
|
@@ -1021,14 +1035,16 @@ var NeonExecutor = class {
|
|
|
1021
1035
|
};
|
|
1022
1036
|
/** Create the shared Neon-backed Junior SQL executor. */
|
|
1023
1037
|
function createNeonJuniorSqlExecutor(args) {
|
|
1038
|
+
const { onInfo, ...poolArgs } = args;
|
|
1024
1039
|
const dispatcher = new Agent({ allowH2: true });
|
|
1025
1040
|
const pool = new OverflowPool({
|
|
1026
|
-
...
|
|
1041
|
+
...poolArgs,
|
|
1027
1042
|
dispatcher
|
|
1028
1043
|
});
|
|
1029
1044
|
pool.on("error", (error) => {
|
|
1030
1045
|
logException(error, "db.pool.client.failed", { "app.db.driver": "neon" });
|
|
1031
1046
|
});
|
|
1047
|
+
if (onInfo) forwardInfoMessages(pool, onInfo);
|
|
1032
1048
|
return new NeonExecutor(pool, dispatcher);
|
|
1033
1049
|
}
|
|
1034
1050
|
// src/db/postgres.ts
|
|
@@ -1146,6 +1162,7 @@ function createPostgresJuniorSqlExecutor(args) {
|
|
|
1146
1162
|
pool.on("error", (error) => {
|
|
1147
1163
|
logException(error, "db.pool.client.failed", { "app.db.driver": "postgres" });
|
|
1148
1164
|
});
|
|
1165
|
+
if (args.onInfo) forwardInfoMessages(pool, args.onInfo);
|
|
1149
1166
|
return new PostgresExecutor(pool);
|
|
1150
1167
|
}
|
|
1151
1168
|
// src/db/executor.ts
|
|
@@ -1154,10 +1171,12 @@ function createJuniorSqlExecutor(args) {
|
|
|
1154
1171
|
const statementTimeoutMs = args.statementTimeoutMs ?? 3e4;
|
|
1155
1172
|
if (args.driver === "postgres") return createPostgresJuniorSqlExecutor({
|
|
1156
1173
|
connectionString: args.connectionString,
|
|
1174
|
+
onInfo: args.onInfo,
|
|
1157
1175
|
statementTimeoutMs
|
|
1158
1176
|
});
|
|
1159
1177
|
return createNeonJuniorSqlExecutor({
|
|
1160
1178
|
connectionString: args.connectionString,
|
|
1179
|
+
onInfo: args.onInfo,
|
|
1161
1180
|
statementTimeoutMs
|
|
1162
1181
|
});
|
|
1163
1182
|
}
|
package/dist/instrumentation.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as getClient, c as init, i as getActiveSpan, o as getGlobalScope, p as spanToJSON, s as getTraceData } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { B as getDeploymentTelemetryAttributes, z as getDeploymentServiceVersion } from "./logging-
|
|
3
|
-
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-
|
|
2
|
+
import { B as getDeploymentTelemetryAttributes, z as getDeploymentServiceVersion } from "./logging-CTCH5jOy.js";
|
|
3
|
+
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-BMfbOUCo.js";
|
|
4
4
|
import { n as redactSandboxEgressProxyPath } from "./proxy-path-BHYoKZdq.js";
|
|
5
5
|
import { t as consumePrivateTraceResultMarker } from "./private-trace-result-CE7_lEdq.js";
|
|
6
6
|
import { n as promoteHttpRouteName, r as routeNameMiddleware, t as nameRequestRoute } from "./sentry-route-name-BhwWnfqj.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ as withScope, d as setTag, f as setUser, h as startSpan, i as getActiveSpan, l as logger, n as captureMessage, p as spanToJSON, s as getTraceData, t as captureException } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { t as JUNIOR_VERSION } from "./version-
|
|
2
|
+
import { t as JUNIOR_VERSION } from "./version-BrDx4Fzc.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { styleText } from "node:util";
|
|
5
5
|
import { ConfigError, configureSync, getConfig, getLogger } from "@logtape/logtape";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { $a as readConversationAccessFromSql, Cn as renderUntrustedTag, Xa as canAccessConversation } from "./projection-
|
|
3
|
-
import { n as botConfig } from "./config-
|
|
4
|
-
import { T as SYSTEM_IDENTITY_ID, a as getConversationStore, o as getDb } from "./db-
|
|
5
|
-
import {
|
|
6
|
-
import { I as PARENT_AGENT_TARGET, v as getActiveAgentInvocationForConversation } from "./turn-failure-response-
|
|
7
|
-
import { G as admitAutomatedTurn, S as EVENT_WAIT_MS, V as postAutomatedTurnLimitNoticeForConversation } from "./session-stop-
|
|
8
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-
|
|
9
|
-
import { a as enqueueAgentInvocation, c as createAgentInvocationForMessage, u as findChildAgentConversationId } from "./work-
|
|
10
|
-
import { r as enqueueAgentMessageToParent } from "./result-
|
|
2
|
+
import { $a as readConversationAccessFromSql, Cn as renderUntrustedTag, Xa as canAccessConversation } from "./projection-DY93nCfX.js";
|
|
3
|
+
import { n as botConfig } from "./config-BerMjSVL.js";
|
|
4
|
+
import { T as SYSTEM_IDENTITY_ID, a as getConversationStore, o as getDb } from "./db-BlfjuqzW.js";
|
|
5
|
+
import { fn as actorFromRun, in as AgentMessageTargetError, nn as AgentMessagePausedError, pn as toolInvocationDestination } from "./agent-runner-BuH7EHrX.js";
|
|
6
|
+
import { I as PARENT_AGENT_TARGET, v as getActiveAgentInvocationForConversation } from "./turn-failure-response-D0bwI462.js";
|
|
7
|
+
import { G as admitAutomatedTurn, S as EVENT_WAIT_MS, V as postAutomatedTurnLimitNoticeForConversation } from "./session-stop-DNucbmPf.js";
|
|
8
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-CS0xoqXW.js";
|
|
9
|
+
import { a as enqueueAgentInvocation, c as createAgentInvocationForMessage, u as findChildAgentConversationId } from "./work-Cu315oJl.js";
|
|
10
|
+
import { r as enqueueAgentMessageToParent } from "./result-CC8bV8Fl.js";
|
|
11
11
|
// src/chat/agent-invocations/top-level-message.ts
|
|
12
12
|
const AGENT_MESSAGE_EVENT_NAMESPACE = "junior";
|
|
13
13
|
/** Event type of a message from another top-level agent. */
|
package/dist/nitro.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE, D as JUNIOR_AUTO_ARCHIVE_CRON_SCHEDULE, F as JUNIOR_RETENTION_CRON_SCHEDULE, I as JUNIOR_RETENTION_ROUTE, L as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, M as JUNIOR_HEARTBEAT_CRON_SCHEDULE, N as JUNIOR_HEARTBEAT_ROUTE, O as JUNIOR_AUTO_ARCHIVE_ROUTE, P as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, j as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, k as JUNIOR_CACHE_WARMUP_CALLBACK_ROUTE, z as getDeploymentServiceVersion } from "./logging-
|
|
1
|
+
import { A as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE, D as JUNIOR_AUTO_ARCHIVE_CRON_SCHEDULE, F as JUNIOR_RETENTION_CRON_SCHEDULE, I as JUNIOR_RETENTION_ROUTE, L as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, M as JUNIOR_HEARTBEAT_CRON_SCHEDULE, N as JUNIOR_HEARTBEAT_ROUTE, O as JUNIOR_AUTO_ARCHIVE_ROUTE, P as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, j as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, k as JUNIOR_CACHE_WARMUP_CALLBACK_ROUTE, z as getDeploymentServiceVersion } from "./logging-CTCH5jOy.js";
|
|
2
2
|
import { d as resolvePackageDir, t as discoverInstalledPluginPackageContent, u as isValidPackageName } from "./package-discovery-DJhGdS4c.js";
|
|
3
|
-
import { S as CACHE_WARMUP_QUEUE_TOPIC, _ as resolveConversationWorkQueueTopic, a as PLUGIN_TASK_QUEUE_TOPIC, f as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, t as BACKGROUND_COMPACTION_QUEUE_TOPIC } from "./background-compaction-queue-
|
|
3
|
+
import { S as CACHE_WARMUP_QUEUE_TOPIC, _ as resolveConversationWorkQueueTopic, a as PLUGIN_TASK_QUEUE_TOPIC, f as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, t as BACKGROUND_COMPACTION_QUEUE_TOPIC } from "./background-compaction-queue-CqZBPe9g.js";
|
|
4
4
|
import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-HYh_JOdw.js";
|
|
5
5
|
import { n as loadPluginSetFromModule, r as resolvePluginModule } from "./plugin-module-Cf5gVPWP.js";
|
|
6
6
|
import path from "node:path";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { En as createUserTokenStore } from "./projection-
|
|
2
|
-
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-
|
|
1
|
+
import { En as createUserTokenStore } from "./projection-DY93nCfX.js";
|
|
2
|
+
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-DZDij2CU.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,17 +1,17 @@
|
|
|
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, J as toOptionalTrimmed, L as escapeXml, S as completeObject, T as rerankTexts, 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-
|
|
2
|
+
import { A as estimateTextTokens, E as resolveGatewayModel, I as unwrapCurrentInstruction, J as toOptionalTrimmed, L as escapeXml, S as completeObject, T as rerankTexts, 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-BerMjSVL.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-CTCH5jOy.js";
|
|
4
|
+
import { t as canExposeConversationPayload } from "./conversation-privacy-BMfbOUCo.js";
|
|
5
5
|
import { c as parseStoredSlackActor, d as parseSlackChannelReferenceId, f as parseSlackTeamId, h as parseSlackMessageTs, i as isActorUserId, l as toStoredSlackActor, p as parseSlackUserId, s as parseActorUserId } from "./actor-6jsm_v96.js";
|
|
6
|
-
import { $ as sameDestination, B as addAgentTurnUsage, D as resolveActorIdentityId, I as bindProviderConversation, M as readUserTimezone, P as saveUserTimezone, W as hasAgentTurnUsage, Z as parseDestination, a as getConversationStore, d as createSqlConversationEventStore, f as eventFromRow, o as getDb, p as withConversationEventLock, q as conversationDetailTouch, r as getConversationEventStore, s as getSqlExecutor, w as startLocationThread, y as createSqlStore } from "./db-
|
|
7
|
-
import { A as juniorConversations, D as juniorCodeChanges, E as juniorConversationAnnotations, M as juniorUsers, N as juniorDestinations, O as juniorCodeRepositories, a as juniorPushSubscriptions, b as juniorConversationBriefs, f as juniorAutomations, i as juniorWorkspaces, j as juniorIdentities, k as juniorAttachments, 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-
|
|
6
|
+
import { $ as sameDestination, B as addAgentTurnUsage, D as resolveActorIdentityId, I as bindProviderConversation, M as readUserTimezone, P as saveUserTimezone, W as hasAgentTurnUsage, Z as parseDestination, a as getConversationStore, d as createSqlConversationEventStore, f as eventFromRow, o as getDb, p as withConversationEventLock, q as conversationDetailTouch, r as getConversationEventStore, s as getSqlExecutor, w as startLocationThread, y as createSqlStore } from "./db-BlfjuqzW.js";
|
|
7
|
+
import { A as juniorConversations, D as juniorCodeChanges, E as juniorConversationAnnotations, M as juniorUsers, N as juniorDestinations, O as juniorCodeRepositories, a as juniorPushSubscriptions, b as juniorConversationBriefs, f as juniorAutomations, i as juniorWorkspaces, j as juniorIdentities, k as juniorAttachments, 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-ikZvFaMD.js";
|
|
8
8
|
import { _ as instructionProvenanceFor, g as instructionActors, h as contextProvenance, o as agentHistoryItemSchema } from "./media-BepyEUNm.js";
|
|
9
|
-
import { _ as CredentialUnavailableError, a as resolveAuthTokenPlaceholder, f as credentialContextForActor, h as credentialSubjectSchema, m as credentialLogContext, o as resolvePluginCommandEnv, p as credentialContextSchema } from "./registry-
|
|
10
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
11
|
-
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-
|
|
9
|
+
import { _ as CredentialUnavailableError, a as resolveAuthTokenPlaceholder, f as credentialContextForActor, h as credentialSubjectSchema, m as credentialLogContext, o as resolvePluginCommandEnv, p as credentialContextSchema } from "./registry-X_xdFY9L.js";
|
|
10
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-Cj9I0dco.js";
|
|
11
|
+
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-exicBZeb.js";
|
|
12
12
|
import { a as withLock, i as fenceLock, n as MUTATION_LOCK_TTL_MS, r as acquireActiveLock } from "./locks-D-0h111u.js";
|
|
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-
|
|
14
|
-
import { a as setStateValues, i as getStateValues, n as getDefaultRedisStateAdapterFor, r as getStateAdapter } from "./adapter-
|
|
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-4CxdwLLQ.js";
|
|
14
|
+
import { a as setStateValues, i as getStateValues, n as getDefaultRedisStateAdapterFor, r as getStateAdapter } from "./adapter-Cigb1MTr.js";
|
|
15
15
|
import { n as isWithinNotificationSchedule, r as notificationScheduleSchema, s as isValidTimeZone, t as DEFAULT_NOTIFICATION_SCHEDULE } from "./schedule-cP0AACm1.js";
|
|
16
16
|
import { I as messageCardRef, J as briefResourceLabel, P as reviewItemChangeRecordSchema, R as readMessageCardRefs, W as readMessageAttachments, X as parseBriefInput, Y as conversationBriefSchema, Z as parseStoredBrief, _ as conversationReportEventSchema, v as conversationReportMessageEventSchema } from "./conversation-CtjR1Zcx.js";
|
|
17
17
|
import { n as redactSandboxEgressProxyPath, t as SANDBOX_EGRESS_PROXY_PATH } from "./proxy-path-BHYoKZdq.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
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 { V as agentTurnCostUsd, r as getConversationEventStore } from "./db-
|
|
1
|
+
import { C as completeText$1, S as completeObject$1, x as completeDecision$1 } from "./config-BerMjSVL.js";
|
|
2
|
+
import { _ as runBestEffort, a as extractGenAiUsageSummary } from "./logging-CTCH5jOy.js";
|
|
3
|
+
import { V as agentTurnCostUsd, r as getConversationEventStore } from "./db-BlfjuqzW.js";
|
|
4
4
|
import { X as parseBriefInput, Y as conversationBriefSchema, q as briefOutcomeStatusSchema } from "./conversation-CtjR1Zcx.js";
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { conversationEventPresentationSchema, defineConversationEvent } from "@sentry/junior-plugin-api";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as setSpanAttributes, h as logWarn, m as logInfo } from "./logging-
|
|
1
|
+
import { b as setSpanAttributes, h as logWarn, m as logInfo } from "./logging-CTCH5jOy.js";
|
|
2
2
|
import { o as isUserActor, s as parseActorUserId } from "./actor-6jsm_v96.js";
|
|
3
3
|
import { n as normalizePluginPackageNames, o as pluginRoots, t as discoverInstalledPluginPackageContent } from "./package-discovery-DJhGdS4c.js";
|
|
4
4
|
import path from "node:path";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Ei as isStale, La as SANDBOX_COMMAND_PATH, Oi as getSandboxProvider, Va as SANDBOX_WORKSPACE_ROOT, ja as sleep, qa as runNonInteractiveCommand, wi as create } from "./projection-
|
|
2
|
-
import { E as withSpan, b as setSpanAttributes } from "./logging-
|
|
3
|
-
import { r as getStateAdapter } from "./adapter-
|
|
1
|
+
import { Ei as isStale, La as SANDBOX_COMMAND_PATH, Oi as getSandboxProvider, Va as SANDBOX_WORKSPACE_ROOT, ja as sleep, qa as runNonInteractiveCommand, wi as create } from "./projection-DY93nCfX.js";
|
|
2
|
+
import { E as withSpan, b as setSpanAttributes } from "./logging-CTCH5jOy.js";
|
|
3
|
+
import { r as getStateAdapter } from "./adapter-Cigb1MTr.js";
|
|
4
4
|
import * as z from "zod";
|
|
5
5
|
// src/chat/sandbox/resources.ts
|
|
6
6
|
let configuredResources;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { Cn as renderUntrustedTag } from "./projection-
|
|
3
|
-
import { T as SYSTEM_IDENTITY_ID } from "./db-
|
|
4
|
-
import { f as credentialContextForActor } from "./registry-
|
|
5
|
-
import {
|
|
6
|
-
import { C as isTerminalAgentInvocation, G as getAgentInvocationIdForEvents, K as getAgentInvocationIdForMessage, Y as getAgentInvocationResultMessageId, k as markAgentInvocationParentMailboxAppended, q as getAgentInvocationIdForResult, x as getLatestAgentInvocationForConversation, y as getAgentInvocation } from "./turn-failure-response-
|
|
7
|
-
import { D as timerWatchCredentialSubject, E as renderEventBatchInputs, S as EVENT_WAIT_MS, T as isEventMailboxMetadata, f as getEventBatchDelayMs, m as parseEventMessages, n as isWatchEvent, s as eventReviewItemInputs, w as eventBatchMessageMeta } from "./session-stop-
|
|
8
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-
|
|
9
|
-
import { a as enqueueAgentInvocation, l as createAgentInvocationFromLatest, o as resolveAgentInvocationId, t as createAgentInvocationWorker } from "./work-
|
|
2
|
+
import { Cn as renderUntrustedTag } from "./projection-DY93nCfX.js";
|
|
3
|
+
import { T as SYSTEM_IDENTITY_ID } from "./db-BlfjuqzW.js";
|
|
4
|
+
import { f as credentialContextForActor } from "./registry-X_xdFY9L.js";
|
|
5
|
+
import { cn as listUnreportedSiblingAgents } from "./agent-runner-BuH7EHrX.js";
|
|
6
|
+
import { C as isTerminalAgentInvocation, G as getAgentInvocationIdForEvents, K as getAgentInvocationIdForMessage, Y as getAgentInvocationResultMessageId, k as markAgentInvocationParentMailboxAppended, q as getAgentInvocationIdForResult, x as getLatestAgentInvocationForConversation, y as getAgentInvocation } from "./turn-failure-response-D0bwI462.js";
|
|
7
|
+
import { D as timerWatchCredentialSubject, E as renderEventBatchInputs, S as EVENT_WAIT_MS, T as isEventMailboxMetadata, f as getEventBatchDelayMs, m as parseEventMessages, n as isWatchEvent, s as eventReviewItemInputs, w as eventBatchMessageMeta } from "./session-stop-DNucbmPf.js";
|
|
8
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-CS0xoqXW.js";
|
|
9
|
+
import { a as enqueueAgentInvocation, l as createAgentInvocationFromLatest, o as resolveAgentInvocationId, t as createAgentInvocationWorker } from "./work-Cu315oJl.js";
|
|
10
10
|
import { n as isAgentInvocationResultEventType, t as agentInvocationResultEventType } from "./result-event-type-DD6BAgT7.js";
|
|
11
11
|
// src/chat/agent-invocations/result.ts
|
|
12
12
|
var result_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { A as latestConversationMessageSeq, I as upsertConversationMessage, M as normalizeConversationText, N as recordDeliveredAssistantMessage, Qt as persistWithRetry, W as authorizationId, a as loadProjection, b as persistConversationMessages, d as recordAuthorizationCompleted, j as markConversationMessage, nt as saveTurnCheckpoint, t as commitAcceptedReply, v as hydrateConversationMessages } from "./projection-
|
|
2
|
-
import { S as setTags, T as withLogContext, p as logException } from "./logging-
|
|
3
|
-
import { T as SYSTEM_IDENTITY_ID, a as getConversationStore, r as getConversationEventStore } from "./db-
|
|
4
|
-
import { f as credentialContextForActor } from "./registry-
|
|
1
|
+
import { A as latestConversationMessageSeq, I as upsertConversationMessage, M as normalizeConversationText, N as recordDeliveredAssistantMessage, Qt as persistWithRetry, W as authorizationId, a as loadProjection, b as persistConversationMessages, d as recordAuthorizationCompleted, j as markConversationMessage, nt as saveTurnCheckpoint, t as commitAcceptedReply, v as hydrateConversationMessages } from "./projection-DY93nCfX.js";
|
|
2
|
+
import { S as setTags, T as withLogContext, p as logException } from "./logging-CTCH5jOy.js";
|
|
3
|
+
import { T as SYSTEM_IDENTITY_ID, a as getConversationStore, r as getConversationEventStore } from "./db-BlfjuqzW.js";
|
|
4
|
+
import { f as credentialContextForActor } from "./registry-X_xdFY9L.js";
|
|
5
5
|
import { L as messageCardText } from "./conversation-CtjR1Zcx.js";
|
|
6
|
-
import { dt as markTurnFailed, f as ConversationTurnLifecycleService, ft as startActiveTurn, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, m as loadPendingMessageCards, t as finalizeFailedTurnReplyWithEvent, u as buildTurnThreadContext } from "./turn-failure-response-
|
|
7
|
-
import { n as getAssistantReplyText } from "./assistant-reply-
|
|
8
|
-
import { _t as persistThreadStateById, ht as getPersistedThreadState, mt as getPersistedSandboxState, n as scheduleSessionCompletedPluginTasks, t as processPluginTask, vt as coerceThreadConversationState } from "./task-runner-
|
|
6
|
+
import { dt as markTurnFailed, f as ConversationTurnLifecycleService, ft as startActiveTurn, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, m as loadPendingMessageCards, t as finalizeFailedTurnReplyWithEvent, u as buildTurnThreadContext } from "./turn-failure-response-D0bwI462.js";
|
|
7
|
+
import { n as getAssistantReplyText } from "./assistant-reply-ZjLRGHm2.js";
|
|
8
|
+
import { _t as persistThreadStateById, ht as getPersistedThreadState, mt as getPersistedSandboxState, n as scheduleSessionCompletedPluginTasks, t as processPluginTask, vt as coerceThreadConversationState } from "./task-runner-DjjHCX_m.js";
|
|
9
9
|
import { randomUUID } from "node:crypto";
|
|
10
10
|
import { createLocalSource, localDestinationSchema } from "@sentry/junior-plugin-api";
|
|
11
11
|
// src/chat/local/runner.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ea as sandboxEgressSignalsResponseSchema } from "./projection-
|
|
1
|
+
import { Ea as sandboxEgressSignalsResponseSchema } from "./projection-DY93nCfX.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;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { G as isRecord, b as setSpanAttributes, h as logWarn } from "./logging-
|
|
2
|
-
import { c as fetchWithBoundedOAuthErrorBodies, i as resolvePluginHeaderEnvRefs } from "./registry-
|
|
1
|
+
import { G as isRecord, b as setSpanAttributes, h as logWarn } from "./logging-CTCH5jOy.js";
|
|
2
|
+
import { c as fetchWithBoundedOAuthErrorBodies, i as resolvePluginHeaderEnvRefs } from "./registry-X_xdFY9L.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-Cigb1MTr.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,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-Cj9I0dco.js";
|
|
2
|
+
import { t as disconnectStateAdapter } from "./adapter-Cigb1MTr.js";
|
|
3
|
+
import { n as finishServiceAccountSignIn, o as serviceAccountPlugins, r as getServiceAccountStatus, s as startServiceAccountSignIn, t as disconnectServiceAccount } from "./service-account-89JZHWCE.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,19 +1,19 @@
|
|
|
1
1
|
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { Cn as renderUntrustedTag, Fn as getPluginSlackConversationLink, Ha as sandboxSkillDir, Ii as escapeSlackMrkdwnText, In as getPluginSystemPromptContributions, Ji as postSlackMessage, Li as formatSlackLink, M as normalizeConversationText, Ra as SANDBOX_DATA_ROOT, Ri as normalizeSlackReplyMarkdown, Rn as getPluginUserPromptContributions, Rr as cancelSubscriptions, Sn as renderTag$1, Ua as sandboxSkillFile, Va as SANDBOX_WORKSPACE_ROOT, Wa as sandboxSkillPathResolution, _n as TURN_CONTEXT_TAG, dn as normalizeToolNameFromResult, ei as verifyTimerWatchCredentialSubject, fn as retainRuntimeTurnContext, gi as listWorkspaces, gn as SESSION_CONTEXT_SECTION_TAG, hn as REQUEST_CONTEXT_SECTION_TAG, li as ToolInputError, ln as isToolResultError, mo as buildSentryConversationUrl, ni as getDashboardConversationLink, on as isAssistantMessage, or as getReviewItem, ot as getTurnRecord, pn as stripRuntimeTurnContext, ri as getDashboardObjectIconLink, rn as hasRuntimeTurnContext, st as listTurnSummaries, ti as JUNIOR_THREAD_STATE_TTL_MS, un as isToolResultMessage, vn as escapeClosingTags, wn as tagJson, x as toStoredConversationMessage, xn as renderChildTag, yn as escapeTagText, zn as getPlugins } from "./projection-
|
|
3
|
-
import { F as renderCurrentInstruction, L as escapeXml, R as escapeXmlText, n as botConfig } from "./config-
|
|
4
|
-
import { h as logWarn, m as logInfo, p as logException, v as serializeGenAiAttribute } from "./logging-
|
|
2
|
+
import { Cn as renderUntrustedTag, Fn as getPluginSlackConversationLink, Ha as sandboxSkillDir, Ii as escapeSlackMrkdwnText, In as getPluginSystemPromptContributions, Ji as postSlackMessage, Li as formatSlackLink, M as normalizeConversationText, Ra as SANDBOX_DATA_ROOT, Ri as normalizeSlackReplyMarkdown, Rn as getPluginUserPromptContributions, Rr as cancelSubscriptions, Sn as renderTag$1, Ua as sandboxSkillFile, Va as SANDBOX_WORKSPACE_ROOT, Wa as sandboxSkillPathResolution, _n as TURN_CONTEXT_TAG, dn as normalizeToolNameFromResult, ei as verifyTimerWatchCredentialSubject, fn as retainRuntimeTurnContext, gi as listWorkspaces, gn as SESSION_CONTEXT_SECTION_TAG, hn as REQUEST_CONTEXT_SECTION_TAG, li as ToolInputError, ln as isToolResultError, mo as buildSentryConversationUrl, ni as getDashboardConversationLink, on as isAssistantMessage, or as getReviewItem, ot as getTurnRecord, pn as stripRuntimeTurnContext, ri as getDashboardObjectIconLink, rn as hasRuntimeTurnContext, st as listTurnSummaries, ti as JUNIOR_THREAD_STATE_TTL_MS, un as isToolResultMessage, vn as escapeClosingTags, wn as tagJson, x as toStoredConversationMessage, xn as renderChildTag, yn as escapeTagText, zn as getPlugins } from "./projection-DY93nCfX.js";
|
|
3
|
+
import { F as renderCurrentInstruction, L as escapeXml, R as escapeXmlText, n as botConfig } from "./config-BerMjSVL.js";
|
|
4
|
+
import { h as logWarn, m as logInfo, p as logException, v as serializeGenAiAttribute } from "./logging-CTCH5jOy.js";
|
|
5
5
|
import { o as isUserActor, t as createActor } from "./actor-6jsm_v96.js";
|
|
6
|
-
import { J as nextDetailVersion, T as SYSTEM_IDENTITY_ID, a as getConversationStore, o as getDb, r as getConversationEventStore, s as getSqlExecutor } from "./db-
|
|
7
|
-
import { A as juniorConversations, M as juniorUsers } from "./executor-
|
|
6
|
+
import { J as nextDetailVersion, T as SYSTEM_IDENTITY_ID, a as getConversationStore, o as getDb, r as getConversationEventStore, s as getSqlExecutor } from "./db-BlfjuqzW.js";
|
|
7
|
+
import { A as juniorConversations, M as juniorUsers } from "./executor-ikZvFaMD.js";
|
|
8
8
|
import { i as isVisionImageMediaType } from "./media-BepyEUNm.js";
|
|
9
9
|
import { a as listReferenceFiles, c as soulPathCandidates, l as worldPathCandidates } from "./package-discovery-DJhGdS4c.js";
|
|
10
|
-
import { h as credentialSubjectSchema } from "./registry-
|
|
11
|
-
import { a as EVENT_SYSTEM_ACTOR, d as JUNIOR_NATIVE_EVENT_NAMESPACE, h as conversationNoteEvent, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage, r as EVENT_AUTHOR_ID } from "./prompt-
|
|
12
|
-
import { r as getStateAdapter } from "./adapter-
|
|
13
|
-
import { i as NO_REPLY_TOOL_NAME, r as sanitizeAssistantText } from "./assistant-reply-
|
|
10
|
+
import { h as credentialSubjectSchema } from "./registry-X_xdFY9L.js";
|
|
11
|
+
import { a as EVENT_SYSTEM_ACTOR, d as JUNIOR_NATIVE_EVENT_NAMESPACE, h as conversationNoteEvent, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage, r as EVENT_AUTHOR_ID } from "./prompt-exicBZeb.js";
|
|
12
|
+
import { r as getStateAdapter } from "./adapter-Cigb1MTr.js";
|
|
13
|
+
import { i as NO_REPLY_TOOL_NAME, r as sanitizeAssistantText } from "./assistant-reply-ZjLRGHm2.js";
|
|
14
14
|
import { D as userCustomizationTextSchema, v as formatUserInputAnswer } from "./reporting-window-B3Ze-Qnt.js";
|
|
15
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-
|
|
16
|
-
import { Ct as eventGuidance, St as eventCatalogEntry, yt as CORE_EVENT_NAMESPACE } from "./task-runner-
|
|
15
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-CS0xoqXW.js";
|
|
16
|
+
import { Ct as eventGuidance, St as eventCatalogEntry, yt as CORE_EVENT_NAMESPACE } from "./task-runner-DjjHCX_m.js";
|
|
17
17
|
import path from "node:path";
|
|
18
18
|
import { isDeepStrictEqual } from "node:util";
|
|
19
19
|
import * as z from "zod";
|
|
@@ -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-CTCH5jOy.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-Cj9I0dco.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 {
|
|
6
|
-
import { n as createAndEnqueueAgentInvocation } from "./work-
|
|
2
|
+
import { n as botConfig } from "./config-BerMjSVL.js";
|
|
3
|
+
import { o as getDb, x as conversationKindFromRow } from "./db-BlfjuqzW.js";
|
|
4
|
+
import { A as juniorConversations } from "./executor-ikZvFaMD.js";
|
|
5
|
+
import { en as AgentDepthLimitError, fn as actorFromRun, pn as toolInvocationDestination } from "./agent-runner-BuH7EHrX.js";
|
|
6
|
+
import { n as createAndEnqueueAgentInvocation } from "./work-Cu315oJl.js";
|
|
7
7
|
import { desc, eq, sql } from "drizzle-orm";
|
|
8
8
|
// src/chat/conversations/lineage.ts
|
|
9
9
|
/**
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { h as startSpan } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { $ as loadTurnCheckpoint, $a as readConversationAccessFromSql, A as latestConversationMessageSeq, Ao as lookupSlackUserNames, Cr as reviewItemNeedsSomeone, D as estimateConversationMessagesTokens, E as buildConversationContext, En as createUserTokenStore, Eo as listConversationAnnotationsById, F as turnHasReply, Fo as piMessageFromHistoryItem, H as PluginCredentialFailureError, Hi as addReactionToMessage, I as upsertConversationMessage, Ii as escapeSlackMrkdwnText, Ji as postSlackMessage, Jt as buildTurnErrorResponse, K as AuthorizationFlowDisabledError, Li as formatSlackLink, M as normalizeConversationText, N as recordDeliveredAssistantMessage, No as configValueSchema, Nt as moveIdleConversationDestination, O as getConversationMessageSlackTs, On as webActorUserIds, P as trimConversationMessages, Qa as createConversationAccessReader, Qt as persistWithRetry, Rr as cancelSubscriptions, Rt as releaseInboundMessage, S as resolveConversationTitle, To as listConversationAnnotations, Ui as deleteSlackMessage, Vi as truncateStatusText, Wi as getSlackMessagePermalink, X as clearPendingAuth, Ya as createPluginLogger, Yi as removeReactionFromMessage, Za as canAddConversationMessages, _o as getSlackFileId, a as loadProjection, aa as getSlackClient, ao as viewerMarksFromParticipant, at as failTurnRecord, b as persistConversationMessages, bo as recordSlackAttachment, ca as normalizeSlackConversationId, co as readLatestConversationBrief, cr as listReplyActionItems, ct as recordTurnSummary, d as recordAuthorizationCompleted, do as readConversationEventPageAround, eo as conversationHasParticipantUser, et as lostWorkerBeforeFirstSave, fr as takeReviewItem, go as notInheritedByForkChild, h as recordSubscribedReplyRoute, hr as canActOnReviewItem, i as loadConversationProjection, ia as getHeaderString, io as conversationViewerMarks, it as completeTurnRecord, j as markConversationMessage, jo as createPluginCache, k as isHumanConversationMessage, ko as lookupSlackUser, lo as readConversationEventPage, lr as listWaitingConversations, mn as trimTrailingAssistantMessages, mo as buildSentryConversationUrl, n as commitMessages, na as downloadPrivateSlackFile, ni as getDashboardConversationLink, no as conversationIsNotUnsubscribedRoot, nr as closeReviewItem, nt as saveTurnCheckpoint, o as loadTurnProjection, or as getReviewItem, ot as getTurnRecord, ro as conversationPinnedForUser, rt as abandonTurnRecord, sa as isDmChannel, st as listTurnSummaries, t as commitAcceptedReply, ta as SlackActionError, to as conversationIsMemberRoot, tt as pauseLostWorkerTurn, ua as withSlackRetries, uo as readConversationEventPageAfter, v as hydrateConversationMessages, vr as canUserReadReviewItem, w as fallbackShortTitle, xo as slackAttachmentsVersionQuery, y as persistConversationMessageWindow, yo as readAttachmentVisionSummary, yr as isOnlyAssignee, zi as normalizeSlackStatusText, zn as getPlugins } from "./projection-
|
|
3
|
-
import { A as estimateTextTokens, E as resolveGatewayModel, L as escapeXml, W as isProviderRetryError, c as getSlackClientSecret, i as getChatConfig, j as textCharsForTokens, l as getSlackSigningSecret, n as botConfig, o as getSlackBotToken, s as getSlackClientId, v as normalizeSlackEmojiName } from "./config-
|
|
4
|
-
import { E as withSpan, G as isRecord, K as toOptionalNumber, S as setTags, T as withLogContext, b as setSpanAttributes, f as logError, h as logWarn, m as logInfo, n as createChatSdkLogger, o as getActiveTraceContext, p as logException, q as toOptionalString, s as getActiveTraceId, t as buildTurnFailureResponse, y as setSentryUser } from "./logging-
|
|
5
|
-
import { t as JUNIOR_VERSION } from "./version-
|
|
2
|
+
import { $ as loadTurnCheckpoint, $a as readConversationAccessFromSql, A as latestConversationMessageSeq, Ao as lookupSlackUserNames, Cr as reviewItemNeedsSomeone, D as estimateConversationMessagesTokens, E as buildConversationContext, En as createUserTokenStore, Eo as listConversationAnnotationsById, F as turnHasReply, Fo as piMessageFromHistoryItem, H as PluginCredentialFailureError, Hi as addReactionToMessage, I as upsertConversationMessage, Ii as escapeSlackMrkdwnText, Ji as postSlackMessage, Jt as buildTurnErrorResponse, K as AuthorizationFlowDisabledError, Li as formatSlackLink, M as normalizeConversationText, N as recordDeliveredAssistantMessage, No as configValueSchema, Nt as moveIdleConversationDestination, O as getConversationMessageSlackTs, On as webActorUserIds, P as trimConversationMessages, Qa as createConversationAccessReader, Qt as persistWithRetry, Rr as cancelSubscriptions, Rt as releaseInboundMessage, S as resolveConversationTitle, To as listConversationAnnotations, Ui as deleteSlackMessage, Vi as truncateStatusText, Wi as getSlackMessagePermalink, X as clearPendingAuth, Ya as createPluginLogger, Yi as removeReactionFromMessage, Za as canAddConversationMessages, _o as getSlackFileId, a as loadProjection, aa as getSlackClient, ao as viewerMarksFromParticipant, at as failTurnRecord, b as persistConversationMessages, bo as recordSlackAttachment, ca as normalizeSlackConversationId, co as readLatestConversationBrief, cr as listReplyActionItems, ct as recordTurnSummary, d as recordAuthorizationCompleted, do as readConversationEventPageAround, eo as conversationHasParticipantUser, et as lostWorkerBeforeFirstSave, fr as takeReviewItem, go as notInheritedByForkChild, h as recordSubscribedReplyRoute, hr as canActOnReviewItem, i as loadConversationProjection, ia as getHeaderString, io as conversationViewerMarks, it as completeTurnRecord, j as markConversationMessage, jo as createPluginCache, k as isHumanConversationMessage, ko as lookupSlackUser, lo as readConversationEventPage, lr as listWaitingConversations, mn as trimTrailingAssistantMessages, mo as buildSentryConversationUrl, n as commitMessages, na as downloadPrivateSlackFile, ni as getDashboardConversationLink, no as conversationIsNotUnsubscribedRoot, nr as closeReviewItem, nt as saveTurnCheckpoint, o as loadTurnProjection, or as getReviewItem, ot as getTurnRecord, ro as conversationPinnedForUser, rt as abandonTurnRecord, sa as isDmChannel, st as listTurnSummaries, t as commitAcceptedReply, ta as SlackActionError, to as conversationIsMemberRoot, tt as pauseLostWorkerTurn, ua as withSlackRetries, uo as readConversationEventPageAfter, v as hydrateConversationMessages, vr as canUserReadReviewItem, w as fallbackShortTitle, xo as slackAttachmentsVersionQuery, y as persistConversationMessageWindow, yo as readAttachmentVisionSummary, yr as isOnlyAssignee, zi as normalizeSlackStatusText, zn as getPlugins } from "./projection-DY93nCfX.js";
|
|
3
|
+
import { A as estimateTextTokens, E as resolveGatewayModel, L as escapeXml, W as isProviderRetryError, c as getSlackClientSecret, i as getChatConfig, j as textCharsForTokens, l as getSlackSigningSecret, n as botConfig, o as getSlackBotToken, s as getSlackClientId, v as normalizeSlackEmojiName } from "./config-BerMjSVL.js";
|
|
4
|
+
import { E as withSpan, G as isRecord, K as toOptionalNumber, S as setTags, T as withLogContext, b as setSpanAttributes, f as logError, h as logWarn, m as logInfo, n as createChatSdkLogger, o as getActiveTraceContext, p as logException, q as toOptionalString, s as getActiveTraceId, t as buildTurnFailureResponse, y as setSentryUser } from "./logging-CTCH5jOy.js";
|
|
5
|
+
import { t as JUNIOR_VERSION } from "./version-BrDx4Fzc.js";
|
|
6
6
|
import { f as parseSlackTeamId, h as parseSlackMessageTs, i as isActorUserId, n as createSlackActor, o as isUserActor, r as createSlackResumeActor, s as parseActorUserId, t as createActor, u as parseSlackChannelId } from "./actor-6jsm_v96.js";
|
|
7
|
-
import { B as addAgentTurnUsage, C as setFirstConversationLocation, D as resolveActorIdentityId, G as resolveRootConversationId, J as nextDetailVersion, L as claimProviderConversation, O as saveActorAvatar, Q as requireSlackDestination, R as getConversationIdByProviderConversation, S as locationFromRow, U as agentTurnUsageSchema, W as hasAgentTurnUsage, X as createSlackDestination, _ as setArchivedAt, a as getConversationStore, b as withConversationMutationLock, g as readConversationTrees, m as conversationAncestors, o as getDb, p as withConversationEventLock, r as getConversationEventStore, s as getSqlExecutor, v as loadConversationSlackTenantIds, x as conversationKindFromRow, z as parseSessionSource } from "./db-
|
|
8
|
-
import { A as juniorConversations, D as juniorCodeChanges, E as juniorConversationAnnotations, M as juniorUsers, N as juniorDestinations, _ as juniorConversationReadPositions, b as juniorConversationBriefs, j as juniorIdentities, l as juniorReviewItems, s as juniorReviewItemConversations, v as juniorConversationParticipants, w as juniorConversationEvents } from "./executor-
|
|
7
|
+
import { B as addAgentTurnUsage, C as setFirstConversationLocation, D as resolveActorIdentityId, G as resolveRootConversationId, J as nextDetailVersion, L as claimProviderConversation, O as saveActorAvatar, Q as requireSlackDestination, R as getConversationIdByProviderConversation, S as locationFromRow, U as agentTurnUsageSchema, W as hasAgentTurnUsage, X as createSlackDestination, _ as setArchivedAt, a as getConversationStore, b as withConversationMutationLock, g as readConversationTrees, m as conversationAncestors, o as getDb, p as withConversationEventLock, r as getConversationEventStore, s as getSqlExecutor, v as loadConversationSlackTenantIds, x as conversationKindFromRow, z as parseSessionSource } from "./db-BlfjuqzW.js";
|
|
8
|
+
import { A as juniorConversations, D as juniorCodeChanges, E as juniorConversationAnnotations, M as juniorUsers, N as juniorDestinations, _ as juniorConversationReadPositions, b as juniorConversationBriefs, j as juniorIdentities, l as juniorReviewItems, s as juniorReviewItemConversations, v as juniorConversationParticipants, w as juniorConversationEvents } from "./executor-ikZvFaMD.js";
|
|
9
9
|
import { _ as instructionProvenanceFor, a as KNOWN_CONVERSATION_EVENT_TYPES, h as contextProvenance, i as isVisionImageMediaType, r as detectImageMediaType } from "./media-BepyEUNm.js";
|
|
10
|
-
import { d as actorLogContext, f as credentialContextForActor } from "./registry-
|
|
11
|
-
import { A as runWithSlackInstallation, At as cancelSignInWait, B as listThreadReplies, Bt as canShareTurn, Dt as stopChildAgentsOf, Et as stopChildAgentsBelow, F as resolveSlackChannelIdFromThreadId, Ft as getPausedTurnRequest, I as checkSlackChannelReadAccess, Jt as withTurnSpan, Kt as getTurnInputSpanAttributes, L as joinPublicChannelForRead, Lt as wakePausedTurn, M as parseSlackThreadId, N as readSlackRawMessageContext, Nt as supersedeTurnForInput, P as resolveSlackChannelIdFromMessage, Pt as createPausedTurns, R as getConversationInfo, Rt as getTurnAuthorization, S as createSlackReviewItemShow, St as markConversationRead, Tt as throwApiError, Ut as AgentRunError, V as resolveDestinationVisibility, Wt as executeTurn, X as readConversationSourceTask, Xt as getWebAuthorization, Zt as canPauseConversationDelivery, at as deliverReviewItemChange, b as renderAttachmentText, ct as acceptsWebMessages, dt as createAndEnqueueConversation, ft as createConversationId, ht as decodeInputImages, i as buildAuthPauseResponse, jt as createConversationTurnWorker, lt as appendAndEnqueueWebMessage, mt as webActorFromUser, n as executeAgentRun,
|
|
12
|
-
import { a as EVENT_SYSTEM_ACTOR, c as completeDecision, o as isEventConversationMessage, u as completeText } from "./prompt-
|
|
10
|
+
import { d as actorLogContext, f as credentialContextForActor } from "./registry-X_xdFY9L.js";
|
|
11
|
+
import { A as runWithSlackInstallation, At as cancelSignInWait, B as listThreadReplies, Bt as canShareTurn, Dt as stopChildAgentsOf, Et as stopChildAgentsBelow, F as resolveSlackChannelIdFromThreadId, Ft as getPausedTurnRequest, I as checkSlackChannelReadAccess, Jt as withTurnSpan, Kt as getTurnInputSpanAttributes, L as joinPublicChannelForRead, Lt as wakePausedTurn, M as parseSlackThreadId, N as readSlackRawMessageContext, Nt as supersedeTurnForInput, P as resolveSlackChannelIdFromMessage, Pt as createPausedTurns, R as getConversationInfo, Rt as getTurnAuthorization, S as createSlackReviewItemShow, St as markConversationRead, Tt as throwApiError, Ut as AgentRunError, V as resolveDestinationVisibility, Wt as executeTurn, X as readConversationSourceTask, Xt as getWebAuthorization, Zt as canPauseConversationDelivery, at as deliverReviewItemChange, b as renderAttachmentText, ct as acceptsWebMessages, dn as RetryableDeliveryError, dt as createAndEnqueueConversation, ft as createConversationId, ht as decodeInputImages, i as buildAuthPauseResponse, jt as createConversationTurnWorker, lt as appendAndEnqueueWebMessage, mn as shouldEmitDevAgentTrace, mt as webActorFromUser, n as executeAgentRun, on as listedConversation, p as latestProgressStatus, pt as recordWebConversationActivity, qt as turnInputTelemetry, t as createAgentRunner, x as renderBlockText, xt as conversationReadPositionQuery, yt as storeAttachment, zt as canJoinTurn } from "./agent-runner-BuH7EHrX.js";
|
|
12
|
+
import { a as EVENT_SYSTEM_ACTOR, c as completeDecision, o as isEventConversationMessage, u as completeText } from "./prompt-exicBZeb.js";
|
|
13
13
|
import { r as acquireActiveLock } from "./locks-D-0h111u.js";
|
|
14
|
-
import { f as identityAvatarUrl, h as readUserAvatarUrls } from "./viewer-
|
|
15
|
-
import { a as setStateValues, i as getStateValues, r as getStateAdapter } from "./adapter-
|
|
14
|
+
import { f as identityAvatarUrl, h as readUserAvatarUrls } from "./viewer-4CxdwLLQ.js";
|
|
15
|
+
import { a as setStateValues, i as getStateValues, r as getStateAdapter } from "./adapter-Cigb1MTr.js";
|
|
16
16
|
import { W as readMessageAttachments, d as conversationEventPageSchema, l as conversationDetailReportSchema, m as conversationFeedSchema } from "./conversation-CtjR1Zcx.js";
|
|
17
|
-
import { c as listConversationWork, l as readLastUserMessageAtByConversation, s as isConversationWorkDone } from "./warmup-
|
|
18
|
-
import { g as getVercelConversationWorkQueue, k as getTurnRequestDeadline } from "./background-compaction-queue-
|
|
19
|
-
import { a as persistAuthPauseTurnState, at as getConversationTurnBoundaryError, b as getChildAgentLabel, c as getTurnUserSlackMessageTs, ct as isTurnInputDeferredError, d as loadThreadContextTrimFloor, dt as markTurnFailed, ft as startActiveTurn, i as completeAuthPauseTurn, it as TurnInputDeferredError, l as buildDeliveredTurnStatePatch, lt as markTurnClosed, m as loadPendingMessageCards, mt as buildDeterministicTurnId, n as getAgentTurnDiagnosticsAttributes, nt as CooperativeTurnYieldError, o as getTurnUserMessage, ot as isCooperativeTurnYieldError, p as getTurnLifecycle, pt as buildDeterministicAssistantMessageId, r as requireTurnFailureEventId, rt as TurnInputCommitLostError, s as getTurnUserReplyAttachmentContext, st as isTurnInputCommitLostError, t as finalizeFailedTurnReplyWithEvent, tt as ConversationTurnBoundaryError, u as buildTurnThreadContext, ut as markTurnCompleted } from "./turn-failure-response-
|
|
20
|
-
import { n as getAssistantReplyText } from "./assistant-reply-
|
|
21
|
-
import { $ as withoutSavedSteeringMessages, B as maybePostAutomatedTurnLimitNotice, H as resolveSlackReplyTarget, K as recordFinishedTurnForAutomatedLimit, U as sendSlackReply, X as buildSteeringPiMessage, b as conversationSubtree, c as loadReviewItemInput, dt as deliversFinalText, ft as finishedRunReply, g as resolveMailboxTurnWork, gt as runDispatchOutcome, l as savedInputInstruction, o as skipInputAfterConversationStop, pt as postsRunNotices, r as markConversationsStopped, rt as isExperimentalFeatureEnabled, x as conversationSubtreeColumns, y as legacyWebMailboxMetadataSchema } from "./session-stop-
|
|
17
|
+
import { c as listConversationWork, l as readLastUserMessageAtByConversation, s as isConversationWorkDone } from "./warmup-B62hd4lD.js";
|
|
18
|
+
import { g as getVercelConversationWorkQueue, k as getTurnRequestDeadline } from "./background-compaction-queue-CqZBPe9g.js";
|
|
19
|
+
import { a as persistAuthPauseTurnState, at as getConversationTurnBoundaryError, b as getChildAgentLabel, c as getTurnUserSlackMessageTs, ct as isTurnInputDeferredError, d as loadThreadContextTrimFloor, dt as markTurnFailed, ft as startActiveTurn, i as completeAuthPauseTurn, it as TurnInputDeferredError, l as buildDeliveredTurnStatePatch, lt as markTurnClosed, m as loadPendingMessageCards, mt as buildDeterministicTurnId, n as getAgentTurnDiagnosticsAttributes, nt as CooperativeTurnYieldError, o as getTurnUserMessage, ot as isCooperativeTurnYieldError, p as getTurnLifecycle, pt as buildDeterministicAssistantMessageId, r as requireTurnFailureEventId, rt as TurnInputCommitLostError, s as getTurnUserReplyAttachmentContext, st as isTurnInputCommitLostError, t as finalizeFailedTurnReplyWithEvent, tt as ConversationTurnBoundaryError, u as buildTurnThreadContext, ut as markTurnCompleted } from "./turn-failure-response-D0bwI462.js";
|
|
20
|
+
import { n as getAssistantReplyText } from "./assistant-reply-ZjLRGHm2.js";
|
|
21
|
+
import { $ as withoutSavedSteeringMessages, B as maybePostAutomatedTurnLimitNotice, H as resolveSlackReplyTarget, K as recordFinishedTurnForAutomatedLimit, U as sendSlackReply, X as buildSteeringPiMessage, b as conversationSubtree, c as loadReviewItemInput, dt as deliversFinalText, ft as finishedRunReply, g as resolveMailboxTurnWork, gt as runDispatchOutcome, l as savedInputInstruction, o as skipInputAfterConversationStop, pt as postsRunNotices, r as markConversationsStopped, rt as isExperimentalFeatureEnabled, x as conversationSubtreeColumns, y as legacyWebMailboxMetadataSchema } from "./session-stop-DNucbmPf.js";
|
|
22
22
|
import { b as normalizeUserInputAnswer, p as webMessageId, y as isEmptyUserInputAnswer } from "./reporting-window-B3Ze-Qnt.js";
|
|
23
|
-
import { T as stopConversationWork, a as cancelHumanFacingPendingMessages, g as getConversationWorkState, h as getConversation, m as ensureConversationWake, r as appendAndEnqueueInboundMessage, s as claimInboundMessage, w as steerWebPendingMessages } from "./store-
|
|
24
|
-
import { _ as markDispatchBlocked, _t as persistThreadStateById, a as claimDispatchMailboxAppend, b as markDispatchRunning, c as getDispatchConversationId, d as getDispatchRecord, dt as resolveConversationRouting, f as getDispatchTurnId, ft as resolveTurnSessionRouting, g as markDispatchAwaitingResume, gt as persistThreadRuntimeState, ht as getPersistedThreadState, m as isTerminalDispatchStatus, mt as getPersistedSandboxState, n as scheduleSessionCompletedPluginTasks, o as confirmDispatchMailboxAppend, pt as getLocationConfigurationService, st as readAutomationTitlesByConversationId, u as getDispatchInputMessageId, v as markDispatchCompleted, vt as coerceThreadConversationState, y as markDispatchFailed } from "./task-runner-
|
|
23
|
+
import { T as stopConversationWork, a as cancelHumanFacingPendingMessages, g as getConversationWorkState, h as getConversation, m as ensureConversationWake, r as appendAndEnqueueInboundMessage, s as claimInboundMessage, w as steerWebPendingMessages } from "./store-CS0xoqXW.js";
|
|
24
|
+
import { _ as markDispatchBlocked, _t as persistThreadStateById, a as claimDispatchMailboxAppend, b as markDispatchRunning, c as getDispatchConversationId, d as getDispatchRecord, dt as resolveConversationRouting, f as getDispatchTurnId, ft as resolveTurnSessionRouting, g as markDispatchAwaitingResume, gt as persistThreadRuntimeState, ht as getPersistedThreadState, m as isTerminalDispatchStatus, mt as getPersistedSandboxState, n as scheduleSessionCompletedPluginTasks, o as confirmDispatchMailboxAppend, pt as getLocationConfigurationService, st as readAutomationTitlesByConversationId, u as getDispatchInputMessageId, v as markDispatchCompleted, vt as coerceThreadConversationState, y as markDispatchFailed } from "./task-runner-DjjHCX_m.js";
|
|
25
25
|
import { d as healthReportSchema, s as conversationPendingMessagesReportSchema } from "./conversation-pending-messages-Cd7ShwBs.js";
|
|
26
|
-
import { r as endActiveAgentInvocations, s as resolveThreadTurnWork } from "./work-
|
|
27
|
-
import { a as withAgentInvocationResultActors, n as enqueueAgentInvocationResult, t as createChildConversationWorker } from "./result-
|
|
28
|
-
import { t as bindMessageAgent } from "./message-
|
|
29
|
-
import { r as readConversationLineage, t as bindSpawnAgent } from "./spawn-
|
|
26
|
+
import { r as endActiveAgentInvocations, s as resolveThreadTurnWork } from "./work-Cu315oJl.js";
|
|
27
|
+
import { a as withAgentInvocationResultActors, n as enqueueAgentInvocationResult, t as createChildConversationWorker } from "./result-CC8bV8Fl.js";
|
|
28
|
+
import { t as bindMessageAgent } from "./message-C1ID1tKi.js";
|
|
29
|
+
import { r as readConversationLineage, t as bindSpawnAgent } from "./spawn-CIAcfcvZ.js";
|
|
30
30
|
import { createHash, createHmac, timingSafeEqual } from "node:crypto";
|
|
31
31
|
import * as z from "zod";
|
|
32
32
|
import { and, asc, desc, eq, gt, inArray, isNotNull, isNull, lte, max, ne, or, sql } from "drizzle-orm";
|
|
@@ -9440,7 +9440,7 @@ async function conversationRows(db, { codeRepository, conversationIds, filter, i
|
|
|
9440
9440
|
return db.select({
|
|
9441
9441
|
...conversationRecordColumns,
|
|
9442
9442
|
awaitingAuthorization: treeAwaitsAuthorization(juniorConversations.conversationId)
|
|
9443
|
-
}).from(juniorConversations).leftJoin(juniorDestinations, conversationRecordJoins.location).leftJoin(juniorIdentities, conversationRecordJoins.identity).leftJoin(juniorUsers, conversationRecordJoins.user).where(and(
|
|
9443
|
+
}).from(juniorConversations).leftJoin(juniorDestinations, conversationRecordJoins.location).leftJoin(juniorIdentities, conversationRecordJoins.identity).leftJoin(juniorUsers, conversationRecordJoins.user).where(and(listedConversation(), conversationFeedMembershipFilter(status, filter), conversationIds ? inArray(juniorConversations.conversationId, conversationIds) : void 0, codeRepository ? conversationCodeRepositoryFilter(codeRepository.id, codeRepository.viewerUserId) : void 0, query ? or(sql`strpos(lower(coalesce(${juniorConversations.title}, '')), ${query}) > 0`, sql`exists (
|
|
9444
9444
|
select 1
|
|
9445
9445
|
from ${juniorConversationBriefs}
|
|
9446
9446
|
where ${juniorConversationBriefs.conversationId} = ${juniorConversations.conversationId}
|
|
@@ -9524,7 +9524,7 @@ function conversationFeedVersionQuery(db, userId) {
|
|
|
9524
9524
|
unread: unreadReplySql(db, userId, conversationId, read.lastReadSeq).as("unread"),
|
|
9525
9525
|
threads: sql`(${tree})`.as("threads"),
|
|
9526
9526
|
annotations: sql`(${annotations})`.as("annotations")
|
|
9527
|
-
}).from(juniorConversations).leftJoin(pin, and(eq(pin.rootConversationId, conversationId), eq(pin.userId, userId))).leftJoin(read, and(eq(read.conversationId, conversationId), eq(read.userId, userId))).where(and(
|
|
9527
|
+
}).from(juniorConversations).leftJoin(pin, and(eq(pin.rootConversationId, conversationId), eq(pin.userId, userId))).leftJoin(read, and(eq(read.conversationId, conversationId), eq(read.userId, userId))).where(and(listedConversation(), conversationFeedMembershipFilter("active", {
|
|
9528
9528
|
kind: "viewer",
|
|
9529
9529
|
userId
|
|
9530
9530
|
}))).orderBy(desc(isNotNull(pin.pinnedAt)), desc(juniorConversations.lastActivityAt), asc(conversationId)).limit(CONVERSATION_FEED_LIMIT).as("feed_page");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Bt as requestConversationWork$1, Ct as deadLetterAttempt$1, Et as getConversationWorkState$1, Ft as recordAttemptFailure$1, Ht as steerWebPendingMessages$1, It as recordConversationRetry$1, Lt as releaseConversationWork$1, Mt as markConversationWorkEnqueued$1, Ot as hasRunnableConversationWork, Rt as releaseInboundMessage, Tt as getConversation$1, Ut as stopConversationWork$1, Vt as startConversationWork$1, _t as claimInboundMessage$1, bt as completeConversationStop$1, dt as ackMessages$1, ft as appendExclusiveInboundMessage, gt as checkInConversationWork$1, ht as cancelHumanFacingPendingMessages$1, jt as listActiveConversationIds$1, mt as beginConversationResume$1, pt as appendInboundMessage, vt as clearConsumedConversationWake$1, wt as drainConversationMailbox$1, xt as completeConversationWork$1, yt as clearExpiredConversationLease$1, zt as requestAnotherSlice$1 } from "./projection-
|
|
2
|
-
import { a as getConversationStore } from "./db-
|
|
3
|
-
import "./background-compaction-queue-
|
|
1
|
+
import { Bt as requestConversationWork$1, Ct as deadLetterAttempt$1, Et as getConversationWorkState$1, Ft as recordAttemptFailure$1, Ht as steerWebPendingMessages$1, It as recordConversationRetry$1, Lt as releaseConversationWork$1, Mt as markConversationWorkEnqueued$1, Ot as hasRunnableConversationWork, Rt as releaseInboundMessage, Tt as getConversation$1, Ut as stopConversationWork$1, Vt as startConversationWork$1, _t as claimInboundMessage$1, bt as completeConversationStop$1, dt as ackMessages$1, ft as appendExclusiveInboundMessage, gt as checkInConversationWork$1, ht as cancelHumanFacingPendingMessages$1, jt as listActiveConversationIds$1, mt as beginConversationResume$1, pt as appendInboundMessage, vt as clearConsumedConversationWake$1, wt as drainConversationMailbox$1, xt as completeConversationWork$1, yt as clearExpiredConversationLease$1, zt as requestAnotherSlice$1 } from "./projection-DY93nCfX.js";
|
|
2
|
+
import { a as getConversationStore } from "./db-BlfjuqzW.js";
|
|
3
|
+
import "./background-compaction-queue-CqZBPe9g.js";
|
|
4
4
|
// src/chat/task-execution/store.ts
|
|
5
5
|
function metadataStore(options) {
|
|
6
6
|
return options.conversationStore ?? getConversationStore();
|