@sentry/junior 0.267.0 → 0.268.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{actor-DZSokpwj.js → actor-CP9K2Idu.js} +2 -1
- package/dist/{adapter-BybMEezj.js → adapter-04AcD2SO.js} +4 -6
- package/dist/{admin-DOs1_EiW.js → admin-DIU1QyG3.js} +1 -1
- package/dist/{agent-invocations-CxKldAeB.js → agent-invocations-C1RNOCs8.js} +2 -0
- package/dist/{agent-runner-DgNATN4D.js → agent-runner-CAYfFmU7.js} +4409 -3020
- package/dist/api/schema.d.ts +2 -5629
- package/dist/api/schema.js +4 -4
- package/dist/api.d.ts +1 -1
- package/dist/api.js +154 -32
- package/dist/{app-DAB3fzyp.d.ts → app-z6Uuyq3j.d.ts} +3 -2
- package/dist/app.d.ts +1 -1
- package/dist/app.js +332 -98
- package/dist/{briefs-CWKjka7v.js → briefs-DQbV2jNr.js} +2 -2
- package/dist/{catalog-runtime-cMlAI5LY.js → catalog-runtime-BD9GSpc6.js} +1 -1
- package/dist/cli/chat.js +15 -15
- 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/{client-BjgbMawj.js → client-C1yDYjoS.js} +2 -2
- package/dist/{config-CdB6yJj5.js → config-DrTeF80T.js} +2 -2
- package/dist/{connections-RE_65jzK.js → connections-D46f8vvi.js} +10 -11
- package/dist/{conversation-privacy-BzgJC5k0.js → conversation-privacy-CxlOCiUo.js} +1 -1
- package/dist/{credential-sync-DhEGEpgq.js → credential-sync-sm9fegLY.js} +29 -34
- package/dist/{credentialed-CIGwoLU2.js → credentialed-lukuD-cc.js} +39 -13
- package/dist/db-BU4LQD8s.d.ts +6 -0
- package/dist/{executor-VYrx_K4w.js → executor-4vhvsMZJ.js} +78 -4
- package/dist/instrumentation.js +2 -2
- package/dist/{assistant-reply-CT7VcXQe.js → interruption-marker-CkncDT8d.js} +8 -2
- package/dist/{job-queue-C0BZSa7r.js → job-queue-In9QKz-I.js} +2 -2
- package/dist/{list-1XQP-o6K.js → list-BkgnXEEB.js} +298 -807
- package/dist/{logging-DuZ1A4ab.js → logging-DLSpkSSr.js} +1 -1
- package/dist/{message-NKSbbnA6.js → message-BObyg59s.js} +4 -4
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-callback-server-qAHLPtml.js → oauth-callback-server-B-WbSdoH.js} +2 -2
- package/dist/{registry-FQutO926.js → registry-BgecKva0.js} +2 -2
- package/dist/{web-message-id-CJSUiksE.js → reporting-window-DVCD_10C.js} +1 -10
- package/dist/{resolve-Bk4yeuHy.js → resolve-Cpa4Bu1O.js} +3 -3
- package/dist/{result-B9e9ATOU.js → result-D3TSmZZ8.js} +8 -8
- package/dist/{runner-C3S2ObH-.js → runner-DS5OKhEp.js} +10 -10
- package/dist/{sandbox-egress-signals-DqpGzzMB.js → sandbox-egress-signals-CnDjY5rx.js} +1 -1
- package/dist/{schema-X7Fj4fv1.js → schema-0050HFnB.js} +80 -4
- package/dist/schema-ZngqcOWM.d.ts +5813 -0
- package/dist/{service-account-Do30HUNv.js → service-account-CKV2WTY7.js} +3 -3
- package/dist/{service-account-BQasl-qq.js → service-account-DGjnDw9y.js} +3 -3
- package/dist/{session-stop-DkOjt46_.js → session-stop-Dam1EI7B.js} +494 -18
- package/dist/{skills-CQHrwfOa.js → skills-CfAnfImD.js} +2 -2
- package/dist/{spawn-BHuqN14f.js → spawn-cmq9p4Ly.js} +2 -2
- package/dist/{store-6EetVP-m.js → store-C5PN02QO.js} +4 -4
- package/dist/{store-B8CABbmR.d.ts → store-xMuuXRE0.d.ts} +13 -7
- package/dist/{store-DvNZIsCr.js → store-zPEoJPBB.js} +3 -3
- package/dist/{task-queue-B0DLgd2P.js → task-queue-_mf28dSu.js} +3 -3
- package/dist/{task-runner-B-PD_JOj.js → task-runner-DMI2prDO.js} +11 -12
- package/dist/{tasks-0ilmuCux.js → tasks-SB9z-VTU.js} +124 -21
- package/dist/{thread-state-DRmdJ2QN.js → thread-state-BbbPh0Sn.js} +8 -18
- package/dist/{turn-failure-response-G11cs2gE.js → turn-failure-response-BKKmnMB5.js} +10 -15
- package/dist/{turn-lifecycle-OzLIwvi1.js → turn-lifecycle-oP0kVeGz.js} +1 -1
- package/dist/{validation-CxEmt1id.js → validation--JsAGLwc.js} +1 -1
- package/dist/{version-Bapedn4A.js → version-jHwJp4hC.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-DrN3oC2X.js → viewer-CpXTGlep.js} +323 -235
- package/dist/{user-input-request-BDFBdF8r.js → web-message-id-DlHNANtd.js} +17 -1
- package/dist/{work-DUQoNcqP.js → work-3N-GHY9m.js} +10 -10
- package/dist/{worker-D1l4Ugk0.js → worker-CCdbcItd.js} +6 -6
- package/migrations/0065_user_customization.sql +1 -0
- package/migrations/0066_review_items.sql +53 -0
- package/migrations/0067_review_item_dedupe_tenant.sql +2 -0
- package/migrations/0068_review_item_slack_cards.sql +10 -0
- package/migrations/meta/0065_snapshot.json +3511 -0
- package/migrations/meta/0066_snapshot.json +4099 -0
- package/migrations/meta/0067_snapshot.json +3921 -0
- package/migrations/meta/0068_snapshot.json +4176 -0
- package/migrations/meta/_journal.json +29 -1
- package/package.json +5 -5
- package/dist/db-Bg-zC3r5.d.ts +0 -5
- package/dist/images-CecjXAAz.js +0 -64
- package/dist/turn-session-routing-Dyut9l7Y.js +0 -76
package/dist/cli/chat.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-
|
|
1
|
+
import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-CAYfFmU7.js";
|
|
2
2
|
import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -99,10 +99,10 @@ async function loadLocalPluginSet() {
|
|
|
99
99
|
async function configureLocalChatPlugins(pluginSet) {
|
|
100
100
|
const [pluginsModule, agentHooksModule, catalogRuntimeModule, validationModule, databaseModule] = await Promise.all([
|
|
101
101
|
import("../plugins-DOm9Y6qI.js").then((n) => n.o),
|
|
102
|
-
import("../credentialed-
|
|
103
|
-
import("../catalog-runtime-
|
|
104
|
-
import("../validation
|
|
105
|
-
import("../viewer-
|
|
102
|
+
import("../credentialed-lukuD-cc.js").then((n) => n.a),
|
|
103
|
+
import("../catalog-runtime-BD9GSpc6.js").then((n) => n.t),
|
|
104
|
+
import("../validation--JsAGLwc.js").then((n) => n.r),
|
|
105
|
+
import("../viewer-CpXTGlep.js").then((n) => n.u)
|
|
106
106
|
]);
|
|
107
107
|
const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
|
|
108
108
|
const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
|
|
@@ -152,19 +152,19 @@ function localDevServerUrl() {
|
|
|
152
152
|
async function prepareLocalChatRun(io, pluginSet) {
|
|
153
153
|
defaultStateAdapterForLocalChat();
|
|
154
154
|
await configureLocalChatPlugins(pluginSet);
|
|
155
|
-
const { setBriefsConfig } = await import("../credentialed-
|
|
155
|
+
const { setBriefsConfig } = await import("../credentialed-lukuD-cc.js").then((n) => n._);
|
|
156
156
|
setBriefsConfig({ enabled: true });
|
|
157
|
-
const { runLocalAgentTurn } = await import("../runner-
|
|
158
|
-
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-
|
|
157
|
+
const { runLocalAgentTurn } = await import("../runner-DS5OKhEp.js");
|
|
158
|
+
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-B-WbSdoH.js");
|
|
159
159
|
const { createLocalOAuthState } = await import("../oauth-relay-CTygMkNx.js").then((n) => n.t);
|
|
160
|
-
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-
|
|
161
|
-
const { bindSpawnAgent } = await import("../spawn-
|
|
162
|
-
const { bindMessageAgent } = await import("../message-
|
|
163
|
-
const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-
|
|
164
|
-
const { startAgentInvocationsForChildInput } = await import("../result-
|
|
165
|
-
const { skipInputBeforeConversationStop } = await import("../session-stop-
|
|
160
|
+
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-CnDjY5rx.js");
|
|
161
|
+
const { bindSpawnAgent } = await import("../spawn-cmq9p4Ly.js").then((n) => n.n);
|
|
162
|
+
const { bindMessageAgent } = await import("../message-BObyg59s.js").then((n) => n.n);
|
|
163
|
+
const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-3N-GHY9m.js").then((n) => n.a);
|
|
164
|
+
const { startAgentInvocationsForChildInput } = await import("../result-D3TSmZZ8.js").then((n) => n.r);
|
|
165
|
+
const { skipInputBeforeConversationStop } = await import("../session-stop-Dam1EI7B.js").then((n) => n.r);
|
|
166
166
|
const { createLocalConversationWork } = await import("../conversation-work-BaT_T6EB.js");
|
|
167
|
-
const { processConversationWork } = await import("../worker-
|
|
167
|
+
const { processConversationWork } = await import("../worker-CCdbcItd.js").then((n) => n.n);
|
|
168
168
|
let agentRunner;
|
|
169
169
|
const localConversationWork = createLocalConversationWork(async (message) => {
|
|
170
170
|
if (!agentRunner) throw new Error("Local agent runner is not ready");
|
package/dist/cli/check.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { D as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, P as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, k as JUNIOR_HEARTBEAT_ROUTE } from "../logging-
|
|
2
|
-
import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-
|
|
3
|
-
import { i as parseSkillFile } from "../skills-
|
|
1
|
+
import { D as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, P as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, k as JUNIOR_HEARTBEAT_ROUTE } from "../logging-DLSpkSSr.js";
|
|
2
|
+
import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-BgecKva0.js";
|
|
3
|
+
import { i as parseSkillFile } from "../skills-CfAnfImD.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import fs from "node:fs/promises";
|
|
6
6
|
import { pathToFileURL } from "node:url";
|
package/dist/cli/main.js
CHANGED
|
@@ -25,13 +25,13 @@ async function runChat(argv, pluginSet) {
|
|
|
25
25
|
return await (await import("./chat.js")).runChat(argv, void 0, { pluginSet });
|
|
26
26
|
}
|
|
27
27
|
async function runAdmin(argv) {
|
|
28
|
-
return await (await import("../admin-
|
|
28
|
+
return await (await import("../admin-DIU1QyG3.js")).runAdmin(argv);
|
|
29
29
|
}
|
|
30
30
|
async function runServiceAccount(argv) {
|
|
31
|
-
return await (await import("../service-account-
|
|
31
|
+
return await (await import("../service-account-DGjnDw9y.js")).runServiceAccount(argv);
|
|
32
32
|
}
|
|
33
33
|
async function runBriefs(argv) {
|
|
34
|
-
return await (await import("../briefs-
|
|
34
|
+
return await (await import("../briefs-DQbV2jNr.js")).runBriefs(argv);
|
|
35
35
|
}
|
|
36
36
|
function topLevelCommand(argv) {
|
|
37
37
|
return (argv[0] === "--" ? argv.slice(1) : argv)[0];
|
package/dist/cli/plugins.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as pluginCatalogRuntime } from "../catalog-runtime-
|
|
3
|
-
import {
|
|
4
|
-
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation
|
|
1
|
+
import { m as getDb } from "../viewer-CpXTGlep.js";
|
|
2
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-BD9GSpc6.js";
|
|
3
|
+
import { In as createPluginLogger, h as validatePlugins, m as setPlugins } from "../credentialed-lukuD-cc.js";
|
|
4
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation--JsAGLwc.js";
|
|
5
5
|
import { a as pluginRuntimeRegistrationsFromPluginSet, i as pluginCliRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "../plugins-DOm9Y6qI.js";
|
|
6
6
|
import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
|
|
7
7
|
import { stderr, stdout } from "node:process";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as pluginCatalogRuntime } from "../catalog-runtime-
|
|
2
|
-
import { j as create } from "../credentialed-
|
|
3
|
-
import { t as disconnectStateAdapter } from "../adapter-
|
|
4
|
-
import { n as resolve } from "../resolve-
|
|
1
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-BD9GSpc6.js";
|
|
2
|
+
import { j as create } from "../credentialed-lukuD-cc.js";
|
|
3
|
+
import { t as disconnectStateAdapter } from "../adapter-04AcD2SO.js";
|
|
4
|
+
import { n as resolve } from "../resolve-Cpa4Bu1O.js";
|
|
5
5
|
// src/cli/snapshot-create.ts
|
|
6
6
|
const DEFAULT_RUNTIME = "node22";
|
|
7
7
|
const DEFAULT_TIMEOUT_MS = 6e5;
|
package/dist/cli/upgrade.d.ts
CHANGED
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-DrTeF80T.js";
|
|
2
|
+
import { t as createJuniorSqlExecutor } from "../executor-4vhvsMZJ.js";
|
|
3
|
+
import { t as createPluginCatalogRuntime } from "../registry-BgecKva0.js";
|
|
4
4
|
import { n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "../plugins-DOm9Y6qI.js";
|
|
5
5
|
import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
|
|
6
6
|
import { basename, dirname, join, resolve } from "node:path";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as withSpan, g as normalizeGenAiFinishReason, h as logWarn, i as extractGenAiUsageAttributes, p as logException, v as serializeGenAiAttribute } from "./logging-
|
|
2
|
-
import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-
|
|
1
|
+
import { E as withSpan, g as normalizeGenAiFinishReason, h as logWarn, i as extractGenAiUsageAttributes, p as logException, v as serializeGenAiAttribute } from "./logging-DLSpkSSr.js";
|
|
2
|
+
import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-CxlOCiUo.js";
|
|
3
3
|
import { calculateCost, completeSimple, getEnvApiKey, getModels, registerApiProvider } from "@earendil-works/pi-ai/compat";
|
|
4
4
|
import { stream as streamAnthropic, streamSimple as streamSimpleAnthropic } from "@earendil-works/pi-ai/api/anthropic-messages";
|
|
5
5
|
import { createGatewayProvider } from "@ai-sdk/gateway";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import { C as toOptionalTrimmed, s as resolveGatewayModel } from "./client-
|
|
3
|
-
import { h as logWarn } from "./logging-
|
|
2
|
+
import { C as toOptionalTrimmed, s as resolveGatewayModel } from "./client-C1yDYjoS.js";
|
|
3
|
+
import { h as logWarn } from "./logging-DLSpkSSr.js";
|
|
4
4
|
import { l as TURN_REASONING_LEVELS, s as modelProfileSchema, t as DEFAULT_MODEL_PROFILES, u as parseTurnReasoningLevel } from "./model-profile-Bg8EoCKD.js";
|
|
5
5
|
import { AwsClient } from "aws4fetch";
|
|
6
6
|
// src/chat/attachments/s3.ts
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as botConfig } from "./config-
|
|
3
|
-
import {
|
|
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-
|
|
7
|
-
import { H as startOAuthFlow } from "./credentialed-
|
|
8
|
-
import { i as getStateAdapter } from "./adapter-
|
|
9
|
-
import { a as getVercelConversationWorkQueue } from "./job-queue-
|
|
10
|
-
import { m as ensureConversationWake, w as requestConversationWork } from "./store-
|
|
11
|
-
import { n as resolveTurnSessionRouting } from "./turn-session-routing-Dyut9l7Y.js";
|
|
1
|
+
import { Jt as failTurnRecord, Wt as loadTurnCheckpoint, Yt as getTurnRecord, j as resolveTurnSessionRouting } from "./tasks-SB9z-VTU.js";
|
|
2
|
+
import { n as botConfig } from "./config-DrTeF80T.js";
|
|
3
|
+
import { T as deleteProviderIdentityForUser, d as getConversationEventStore, h as getSqlExecutor, w as deleteProviderIdentityForSlackUser } from "./viewer-CpXTGlep.js";
|
|
4
|
+
import { u as hasRequiredOAuthScope } from "./registry-BgecKva0.js";
|
|
5
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-BD9GSpc6.js";
|
|
6
|
+
import { c as deleteMcpServerSessionId, l as deleteMcpStoredOAuthCredentials, s as deleteMcpAuthSessionsForUserProvider } from "./agent-runner-CAYfFmU7.js";
|
|
7
|
+
import { H as startOAuthFlow } from "./credentialed-lukuD-cc.js";
|
|
8
|
+
import { i as getStateAdapter } from "./adapter-04AcD2SO.js";
|
|
9
|
+
import { a as getVercelConversationWorkQueue } from "./job-queue-In9QKz-I.js";
|
|
10
|
+
import { m as ensureConversationWake, w as requestConversationWork } from "./store-zPEoJPBB.js";
|
|
12
11
|
import { z } from "zod";
|
|
13
12
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
14
13
|
// src/chat/task-execution/authorized-turn.ts
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { p as escapeXml } from "./client-
|
|
3
|
-
import { a as getRuntimeMetadata, n as botConfig } from "./config-
|
|
4
|
-
import { R as isNativeIdentityProvider, _ as runBestEffort, h as logWarn, p as logException } from "./logging-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { Vt as getConversationPendingAuth, Yt as getTurnRecord, it as recordAuthorizationCompleted, rt as recordAuthenticationLinked } from "./tasks-SB9z-VTU.js";
|
|
2
|
+
import { p as escapeXml } from "./client-C1yDYjoS.js";
|
|
3
|
+
import { a as getRuntimeMetadata, n as botConfig } from "./config-DrTeF80T.js";
|
|
4
|
+
import { R as isNativeIdentityProvider, _ as runBestEffort, h as logWarn, p as logException } from "./logging-DLSpkSSr.js";
|
|
5
|
+
import { p as parseSlackUserId } from "./actor-CP9K2Idu.js";
|
|
6
|
+
import { A as upsertLinkedIdentity, C as resolveActorIdentityId, E as findUserByVerifiedEmails, a as readIdentityById, h as getSqlExecutor } from "./viewer-CpXTGlep.js";
|
|
7
7
|
import { i as homeDir } from "./package-discovery-DJBompdd.js";
|
|
8
|
-
import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-
|
|
9
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
10
|
-
import { t as discoverSkills } from "./skills-
|
|
11
|
-
import { a as finalizeMcpAuthorization, d as getMcpStoredOAuthCredentials, f as putMcpStoredOAuthCredentials, o as deleteMcpAuthSession, u as getMcpAuthSession, v as lookupSlackUserProfile } from "./agent-runner-
|
|
12
|
-
import {
|
|
13
|
-
import { i as getStateAdapter, o as acquireActiveLock } from "./adapter-
|
|
14
|
-
import { _ as getMcpProviderErrorAttributes } from "./service-account-
|
|
15
|
-
import {
|
|
16
|
-
import { c as deleteWebAuthorization, i as readConnectedOAuthTokens, m as wakePausedTurn, p as wakeAuthorizedTurn, u as htmlCallbackResponse } from "./connections-
|
|
8
|
+
import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-BgecKva0.js";
|
|
9
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-BD9GSpc6.js";
|
|
10
|
+
import { t as discoverSkills } from "./skills-CfAnfImD.js";
|
|
11
|
+
import { a as finalizeMcpAuthorization, d as getMcpStoredOAuthCredentials, f as putMcpStoredOAuthCredentials, o as deleteMcpAuthSession, u as getMcpAuthSession, v as lookupSlackUserProfile } from "./agent-runner-CAYfFmU7.js";
|
|
12
|
+
import { B as parseOAuthStatePayload, V as resolveBaseUrl, i as resolvePluginOAuthAccount, in as getSlackClient, n as createUserTokenStore, tt as postSlackMessage, z as formatProviderLabel } from "./credentialed-lukuD-cc.js";
|
|
13
|
+
import { i as getStateAdapter, o as acquireActiveLock } from "./adapter-04AcD2SO.js";
|
|
14
|
+
import { _ as getMcpProviderErrorAttributes } from "./service-account-CKV2WTY7.js";
|
|
15
|
+
import { o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-BbbPh0Sn.js";
|
|
16
|
+
import { c as deleteWebAuthorization, i as readConnectedOAuthTokens, m as wakePausedTurn, p as wakeAuthorizedTurn, u as htmlCallbackResponse } from "./connections-D46f8vvi.js";
|
|
17
17
|
import { n as relayLocalOAuthCallback } from "./oauth-relay-CTygMkNx.js";
|
|
18
18
|
import path from "node:path";
|
|
19
19
|
import { z } from "zod";
|
|
@@ -394,28 +394,23 @@ function pluginAuthorizationId(args) {
|
|
|
394
394
|
}
|
|
395
395
|
/** Return the Junior user of the person who started the OAuth connection. */
|
|
396
396
|
async function resolveOAuthActorUserId(actor) {
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
}
|
|
397
|
+
const identityActor = actor.platform === "web" ? actor : await slackProfileActor(actor);
|
|
398
|
+
const identityId = await resolveActorIdentityId(getSqlExecutor(), identityActor);
|
|
399
|
+
return identityId ? (await readIdentityById(identityId))?.user?.id : void 0;
|
|
400
|
+
}
|
|
401
|
+
/** Refresh a Slack actor with the profile Slack returns for that user. */
|
|
402
|
+
async function slackProfileActor(actor) {
|
|
404
403
|
const slackUserId = parseSlackUserId(actor.userId);
|
|
405
404
|
if (!slackUserId) throw new Error("OAuth Slack actor user id is invalid");
|
|
406
405
|
const profile = await lookupSlackUserProfile(slackUserId);
|
|
407
|
-
return
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
email: profile.email,
|
|
416
|
-
emailVerified: true
|
|
417
|
-
} : void 0
|
|
418
|
-
})).userId;
|
|
406
|
+
return {
|
|
407
|
+
platform: "slack",
|
|
408
|
+
teamId: actor.teamId,
|
|
409
|
+
userId: profile.id,
|
|
410
|
+
...profile.real_name || profile.display_name ? { fullName: profile.real_name || profile.display_name } : void 0,
|
|
411
|
+
...profile.name ? { userName: profile.name } : void 0,
|
|
412
|
+
...profile.email ? { email: profile.email } : void 0
|
|
413
|
+
};
|
|
419
414
|
}
|
|
420
415
|
/**
|
|
421
416
|
* Link a connected provider account to the person who connected it.
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import { C as toOptionalTrimmed, i as completeObject, o as embedTexts } from "./client-
|
|
3
|
-
import { i as getChatConfig, n as botConfig, o as getSlackBotToken, v as normalizeSlackEmojiName } from "./config-
|
|
4
|
-
import { B as isRecord$2, E as withSpan, a as extractGenAiUsageSummary, b as setSpanAttributes, c as getLogContextAttributes, d as logAudit, h as logWarn, m as logInfo, p as logException, y as setSentryUser } from "./logging-
|
|
2
|
+
import { C as toOptionalTrimmed, i as completeObject, o as embedTexts } from "./client-C1yDYjoS.js";
|
|
3
|
+
import { i as getChatConfig, n as botConfig, o as getSlackBotToken, v as normalizeSlackEmojiName } from "./config-DrTeF80T.js";
|
|
4
|
+
import { B as isRecord$2, E as withSpan, a as extractGenAiUsageSummary, b as setSpanAttributes, c as getLogContextAttributes, d as logAudit, h as logWarn, m as logInfo, p as logException, y as setSentryUser } from "./logging-DLSpkSSr.js";
|
|
5
5
|
import { a as getClient$1, n as captureMessage, r as continueTrace } from "./sentry-MDkYAVPV.js";
|
|
6
|
-
import { t as canExposeConversationPayload } from "./conversation-privacy-
|
|
6
|
+
import { t as canExposeConversationPayload } from "./conversation-privacy-CxlOCiUo.js";
|
|
7
7
|
import { r as defaultModelId } from "./model-profile-Bg8EoCKD.js";
|
|
8
|
-
import { d as
|
|
9
|
-
import { B as parseDestination,
|
|
10
|
-
import { c as juniorIdentities, d as juniorDestinations, l as juniorUsers, s as juniorConversations } from "./agent-invocations-
|
|
11
|
-
import {
|
|
8
|
+
import { d as parseSlackChannelReferenceId, f as parseSlackTeamId, i as isActorUserId, m as parseSlackMessageTs, p as parseSlackUserId, s as parseActorUserId } from "./actor-CP9K2Idu.js";
|
|
9
|
+
import { B as parseDestination, D as readUserTimezone, L as hasAgentTurnUsage, a as readIdentityById, d as getConversationEventStore, h as getSqlExecutor, i as readActorIdentity, k as saveUserTimezone, m as getDb, o as resolveViewerUser, y as createSqlStore } from "./viewer-CpXTGlep.js";
|
|
10
|
+
import { c as juniorIdentities, d as juniorDestinations, l as juniorUsers, s as juniorConversations } from "./agent-invocations-C1RNOCs8.js";
|
|
11
|
+
import { C as juniorCodeRepositories, S as juniorCodeChanges, g as juniorConversationBriefs, i as juniorWorkspaces, m as juniorConversationParticipants, n as juniorSnapshots, r as juniorWorkspaceRepos, w as juniorAttachments, x as juniorConversationAnnotations, y as juniorConversationEvents } from "./executor-4vhvsMZJ.js";
|
|
12
12
|
import { o as decodeStoredConversationEvent } from "./history-C84mlAwO.js";
|
|
13
|
-
import { _ as CredentialUnavailableError, a as resolveAuthTokenPlaceholder, h as credentialSubjectSchema, m as credentialLogContext, o as resolvePluginCommandEnv, p as credentialContextSchema } from "./registry-
|
|
14
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
15
|
-
import { c as withLock, i as getStateAdapter, o as acquireActiveLock, r as getDefaultRedisStateAdapterFor } from "./adapter-
|
|
13
|
+
import { _ as CredentialUnavailableError, a as resolveAuthTokenPlaceholder, h as credentialSubjectSchema, m as credentialLogContext, o as resolvePluginCommandEnv, p as credentialContextSchema } from "./registry-BgecKva0.js";
|
|
14
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-BD9GSpc6.js";
|
|
15
|
+
import { c as withLock, i as getStateAdapter, o as acquireActiveLock, r as getDefaultRedisStateAdapterFor } from "./adapter-04AcD2SO.js";
|
|
16
16
|
import { i as isValidTimeZone } from "./cadence-R7Em4RjE.js";
|
|
17
17
|
import { C as conversationReportEventSchema, Q as parseBriefInput, W as readMessageAttachments, Z as conversationBriefSchema, w as conversationReportMessageEventSchema, z as readMessageCardRefs } from "./conversation-DSo310Ps.js";
|
|
18
18
|
import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-BW9jFsqZ.js";
|
|
@@ -1599,6 +1599,8 @@ async function readConversationAccessFromSql(db, conversationIds, viewer) {
|
|
|
1599
1599
|
rootParentConversationId: rootConversation.parentConversationId,
|
|
1600
1600
|
rootRootConversationId: rootConversation.rootConversationId,
|
|
1601
1601
|
visibility: rootDestination.visibility,
|
|
1602
|
+
provider: rootDestination.provider,
|
|
1603
|
+
providerTenantId: rootDestination.providerTenantId,
|
|
1602
1604
|
rootEmailNormalized: rootIdentity.emailNormalized,
|
|
1603
1605
|
rootEmailVerified: rootIdentity.emailVerified,
|
|
1604
1606
|
rootUserId: rootIdentity.userId
|
|
@@ -1619,7 +1621,11 @@ async function readConversationAccessFromSql(db, conversationIds, viewer) {
|
|
|
1619
1621
|
return [row.conversationId, {
|
|
1620
1622
|
canViewPrivateContent,
|
|
1621
1623
|
isParticipant,
|
|
1622
|
-
visibility
|
|
1624
|
+
visibility,
|
|
1625
|
+
...validRootConversationId !== void 0 && row.provider !== null && row.providerTenantId ? { tenant: {
|
|
1626
|
+
provider: row.provider,
|
|
1627
|
+
providerTenantId: row.providerTenantId
|
|
1628
|
+
} } : void 0
|
|
1623
1629
|
}];
|
|
1624
1630
|
}));
|
|
1625
1631
|
}
|
|
@@ -2030,6 +2036,10 @@ function getDashboardConversationLink(conversationId) {
|
|
|
2030
2036
|
function getDashboardTaskLink(taskId) {
|
|
2031
2037
|
return resolveDashboardPath(`/automations/${encodeURIComponent(taskId)}`);
|
|
2032
2038
|
}
|
|
2039
|
+
/** Build the review desk URL that selects one Review item. */
|
|
2040
|
+
function getDashboardReviewItemLink(itemId) {
|
|
2041
|
+
return resolveDashboardPath(`/review?item=${encodeURIComponent(itemId)}`);
|
|
2042
|
+
}
|
|
2033
2043
|
/** Public icon asset URL. Headless and local installs keep text-only identity. */
|
|
2034
2044
|
function getDashboardObjectIconLink(icon) {
|
|
2035
2045
|
if (!dashboardConversationLinkOptions) return void 0;
|
|
@@ -5812,6 +5822,22 @@ async function postSlackMessage(input) {
|
|
|
5812
5822
|
}) } : void 0
|
|
5813
5823
|
};
|
|
5814
5824
|
}
|
|
5825
|
+
/** Delete a previously posted Slack message through the shared outbound boundary. */
|
|
5826
|
+
async function deleteSlackMessage(input) {
|
|
5827
|
+
const channelId = requireSlackConversationId(input.channelId, "Slack message deletion");
|
|
5828
|
+
const timestamp = requireSlackMessageTimestamp(input.timestamp, "Slack message deletion");
|
|
5829
|
+
await withSlackRetries(() => getSlackClient().chat.delete({
|
|
5830
|
+
channel: channelId,
|
|
5831
|
+
ts: timestamp
|
|
5832
|
+
}), 3, {
|
|
5833
|
+
action: "chat.delete",
|
|
5834
|
+
idempotent: true,
|
|
5835
|
+
spanAttributes: {
|
|
5836
|
+
"app.slack.channel_id": channelId,
|
|
5837
|
+
"app.slack.message_ts": timestamp
|
|
5838
|
+
}
|
|
5839
|
+
});
|
|
5840
|
+
}
|
|
5815
5841
|
/** Replace the text and blocks of a message that Junior posted. */
|
|
5816
5842
|
async function updateSlackMessage(input) {
|
|
5817
5843
|
const channelId = requireSlackConversationId(input.channelId, "Slack message update");
|
|
@@ -9457,4 +9483,4 @@ async function executeCredentialedEgressRequest(input) {
|
|
|
9457
9483
|
});
|
|
9458
9484
|
}
|
|
9459
9485
|
}
|
|
9460
|
-
export {
|
|
9486
|
+
export { openSlackModal as $, recordSlackAttachment as $n, verifyTimerWatchCredentialSubject as $t, setWorkspaceSnapshotBuild as A, sandboxSkillDir as An, getSlackToolContext as At, parseOAuthStatePayload as B, conversationArchivedForUser as Bn, createTimerWatch as Bt, listWorkspaces as C, runNonInteractiveCommand as Cn, resolveSandboxCommandEnvironment as Ct, invalidateReadySnapshot as D, SANDBOX_REPOS_ROOT as Dn, tryWorkspaceRepoCheckoutPath as Dt, WorkspaceValidationError as E, SANDBOX_JUNIOR_ROOT as En, SANDBOX_RUNTIME as Et, getSandboxProvider as F, createPluginModel as Fn, RESOURCE_WATCH_TOOL_SOURCE as Ft, normalizeSlackReplyMarkdown as G, viewerConversationMembership as Gn, listWatches as Gt, startOAuthFlow as H, conversationIsMemberRoot as Hn, deliverWatch as Ht, isVercelSandboxEgressRequest as I, createPluginLogger as In, STOP_WATCHING_TOOL_NAME as It, truncateStatusText as J, readConversationEventPage as Jn, bindScheduledAutomationCredentialSubject as Jt, normalizeSlackStatusText as K, createPluginConversationEvents as Kn, takeDueTimerWatches as Kt, proxyVercelSandboxEgressRequest as L, readConversationAccessFromSql as Ln, cancelSubscriptions as Lt, hash as M, sandboxSkillPathResolution as Mn, slackMessageTurnDisabledReason as Mt, isStale as N, createPluginState as Nn, RESOURCE_SUBSCRIPTION_DEFAULT_TTL_MS as Nt, loadSnapshotsForProfile as O, SANDBOX_SKILLS_ROOT as On, workspaceRepoCheckoutPath as Ot, ensureDockerDaemon as P, createPluginEmbedder as Pn, RESOURCE_SUBSCRIPTION_MAX_TTL_MS as Pt, openSlackDirectMessage as Q, readAttachmentVisionSummary as Qn, verifySlackDirectCredentialSubject as Qt, deliverOAuthAuthorization as R, conversationArchiveTimes as Rn, cancelWatch as Rt, getWorkspaceByName as S, buildNonInteractiveShellScript as Sn, buildSandboxEgressNetworkPolicy as St, updateWorkspace as T, SANDBOX_DATA_ROOT as Tn, normalizeSandboxEgressTracePropagationDomains as Tt, escapeSlackMrkdwnText as U, conversationNotArchivedForEmail as Un, findMatchingWatches as Ut, resolveBaseUrl as V, conversationHasParticipantUser as Vn, createWatch as Vt, formatSlackLink as W, conversationNotArchivedForUser as Wn, getWatch as Wt, deleteSlackMessage as X, getSlackFileId as Xn, verifyEventAutomationCredentialSubject as Xt, addReactionToMessage as Y, buildSentryConversationUrl as Yn, bindSlackDirectCredentialSubject as Yt, getSlackMessagePermalink as Z, matchSlackAttachments as Zn, verifyScheduledAutomationCredentialSubject as Zt, registration_exports as _, getDashboardTaskLink as _n, consumeSandboxEgressPermissionDeniedSignal as _t, agent_hooks_exports as a, isConversationScopedChannel as an, defaultTimezone as ar, slackEntitySchema as at, deleteWorkspace as b, PluginToolDeniedError as bn, parseSandboxEgressAuthRequiredSignal as bt, getPluginRoutes as c, runWithSlackInstallationToken as cn, createPluginCache as cr, isAlreadyExistsError as ct, getPluginTools as d, getWorkspaceTeamId as dn, agentsInstructionsUpdatedEvent as dr, WorkspaceSnapshotNotReadyError as dt, SlackActionError as en, resolveRootVisibility as er, postSlackEphemeralMessage as et, getPluginUserPromptContributions as f, runWithWorkspaceTeamId as fn, authenticationLinkedEvent as fr, getWorkspaceSnapshotNotReadyError as ft, coreTaskRegistrations as g, getDashboardReviewItemLink as gn, consumeSandboxEgressAuthRequiredSignal as gt, validatePlugins as h, getDashboardObjectIconLink as hn, clearSandboxEgressSignals as ht, resolvePluginOAuthAccount as i, getSlackClient as in, listConversationAnnotationsById as ir, uploadFilesToConversation as it, create as j, sandboxSkillFile as jn, isSlackMessageTurn as jt, setWorkspaceSnapshot as k, SANDBOX_WORKSPACE_ROOT as kn, resolveChannelCapabilities as kt, getPluginSlackConversationLink as l, withSlackRetries as ln, createCache as lr, throwSandboxOperationError as lt, setPlugins as m, getDashboardConversationLink as mn, conversationNoteEvent as mr, workspaceSnapshotNotReadyUserMessage as mt, createUserTokenStore as n, getFilePermalink as nn, createPluginAnnotations as nr, removeReactionFromMessage as nt, createPluginHookRunner as o, isDmChannel as on, resolveUserTimezone as or, slackExternalRefIdSchema as ot, getPlugins as p, JUNIOR_THREAD_STATE_TTL_MS as pn, authenticationUnlinkedEvent as pr, isWorkspaceSnapshotNotReadyError as pt, slackMention as q, readLatestConversationBrief as qn, bindEventAutomationCredentialSubject as qt, getOAuthAccountProviders as r, getHeaderString as rn, listConversationAnnotations as rr, updateSlackMessage as rt, getPluginApiRoutes as s, normalizeSlackConversationId as sn, lookupSlackUser as sr, isAbortError as st, executeCredentialedEgressRequest as t, downloadPrivateSlackFile as tn, saveObjectAnnotations as tr, postSlackMessage as tt, getPluginSystemPromptContributions as u, sleep$1 as un, JUNIOR_NATIVE_EVENT_NAMESPACE as ur, wrapSandboxSetupError as ut, setBriefsConfig as v, setDashboardConversationLinkOptions as vn, createSandboxEgressCredentialToken as vt, listWorkspacesByRepository as w, SANDBOX_COMMAND_PATH as wn, resolveSandboxEgressProviderForHost as wt, getWorkspace as x, buildCommandScript as xn, sandboxEgressSignalsResponseSchema as xt, createWorkspace as y, ToolInputError as yn, parseSandboxEgressCredentialToken as yt, formatProviderLabel as z, conversationArchivedForEmail as zn, collectEventMatchKeys as zt };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./config-
|
|
2
|
-
import { p as logException } from "./logging-
|
|
3
|
-
import { a as juniorAgentInvocations, c as juniorIdentities, d as juniorDestinations, f as timestamptz, i as juniorAgentBindings, l as juniorUsers, s as juniorConversations } from "./agent-invocations-
|
|
1
|
+
import "./config-DrTeF80T.js";
|
|
2
|
+
import { p as logException } from "./logging-DLSpkSSr.js";
|
|
3
|
+
import { a as juniorAgentInvocations, c as juniorIdentities, d as juniorDestinations, f as timestamptz, i as juniorAgentBindings, l as juniorUsers, s as juniorConversations } from "./agent-invocations-C1RNOCs8.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, uniqueIndex, uuid } from "drizzle-orm/pg-core";
|
|
@@ -382,6 +382,76 @@ const juniorAutomationRuns = pgTable("junior_automation_runs", {
|
|
|
382
382
|
index("junior_automation_runs_completed_idx").on(table.completedAtMs),
|
|
383
383
|
index("junior_automation_runs_incomplete_idx").on(table.automationId, table.scheduledForMs).where(sql`${table.status} in ('pending', 'running')`)
|
|
384
384
|
]);
|
|
385
|
+
// src/db/schema/review-items.ts
|
|
386
|
+
/**
|
|
387
|
+
* One Review item: something that needs a person. See
|
|
388
|
+
* `chat/review-items/README.md`. An action item stores its `request`, and
|
|
389
|
+
* its `answer` after an assignee submits it. `closed_at` is set for `done`
|
|
390
|
+
* and `dismissed`. `closed_by_user_id` is null when an agent closed it.
|
|
391
|
+
*/
|
|
392
|
+
const juniorReviewItems = pgTable("junior_review_items", {
|
|
393
|
+
id: text("id").primaryKey(),
|
|
394
|
+
kind: text("kind").$type().notNull(),
|
|
395
|
+
status: text("status").$type().notNull(),
|
|
396
|
+
/**
|
|
397
|
+
* `private` when the Conversation that added it is not public. A private
|
|
398
|
+
* item stays private and links only to that Conversation.
|
|
399
|
+
*/
|
|
400
|
+
visibility: text("visibility").$type().notNull(),
|
|
401
|
+
title: text("title").notNull(),
|
|
402
|
+
body: text("body").notNull(),
|
|
403
|
+
request: jsonb("request").$type(),
|
|
404
|
+
answer: jsonb("answer").$type(),
|
|
405
|
+
assignedToEveryone: boolean("assigned_to_everyone").notNull().default(false),
|
|
406
|
+
dedupeKey: text("dedupe_key").notNull(),
|
|
407
|
+
subjectId: text("subject_id"),
|
|
408
|
+
subjectTitle: text("subject_title"),
|
|
409
|
+
subjectUrl: text("subject_url"),
|
|
410
|
+
/** Conversation of the agent that added the item. */
|
|
411
|
+
addedByConversationId: text("added_by_conversation_id").notNull(),
|
|
412
|
+
/**
|
|
413
|
+
* Provider tenant, such as a Slack workspace, of the Conversation that
|
|
414
|
+
* added the item. A public item is visible only inside it.
|
|
415
|
+
*/
|
|
416
|
+
provider: text("provider"),
|
|
417
|
+
providerTenantId: text("provider_tenant_id"),
|
|
418
|
+
automationId: text("automation_id").references(() => juniorAutomations.id, { onDelete: "set null" }),
|
|
419
|
+
closedAt: timestamptz("closed_at"),
|
|
420
|
+
closedByUserId: text("closed_by_user_id").references(() => juniorUsers.id),
|
|
421
|
+
closeReason: text("close_reason"),
|
|
422
|
+
createdAt: timestamptz("created_at").notNull(),
|
|
423
|
+
updatedAt: timestamptz("updated_at").notNull()
|
|
424
|
+
}, (table) => [
|
|
425
|
+
check("junior_review_items_kind_check", sql`(${table.kind} = 'notice' and ${table.request} is null and ${table.answer} is null) or (${table.kind} = 'action' and ${table.request} is not null)`),
|
|
426
|
+
check("junior_review_items_status_check", sql`(${table.status} = 'open' and ${table.closedAt} is null) or (${table.status} in ('done', 'dismissed') and ${table.closedAt} is not null)`),
|
|
427
|
+
check("junior_review_items_tenant_check", sql`(${table.provider} is null) = (${table.providerTenantId} is null)`),
|
|
428
|
+
check("junior_review_items_visibility_check", sql`${table.visibility} = 'public' or not ${table.assignedToEveryone}`),
|
|
429
|
+
uniqueIndex("junior_review_items_open_dedupe_uidx").on(sql`coalesce(${table.provider}, '')`, sql`coalesce(${table.providerTenantId}, '')`, table.dedupeKey).where(sql`${table.status} = 'open'`),
|
|
430
|
+
index("junior_review_items_status_idx").on(table.status, table.updatedAt, table.id),
|
|
431
|
+
index("junior_review_items_subject_idx").on(table.subjectId, table.status),
|
|
432
|
+
index("junior_review_items_automation_idx").on(table.automationId, table.status)
|
|
433
|
+
]);
|
|
434
|
+
/** The assigned Users of a Review item. Everyone is a flag on the item. */
|
|
435
|
+
const juniorReviewItemAssignees = pgTable("junior_review_item_assignees", {
|
|
436
|
+
itemId: text("item_id").notNull().references(() => juniorReviewItems.id, { onDelete: "cascade" }),
|
|
437
|
+
userId: text("user_id").notNull().references(() => juniorUsers.id, { onDelete: "cascade" })
|
|
438
|
+
}, (table) => [primaryKey({ columns: [table.itemId, table.userId] }), index("junior_review_item_assignees_user_idx").on(table.userId)]);
|
|
439
|
+
/** The Conversations linked to a Review item. */
|
|
440
|
+
const juniorReviewItemConversations = pgTable("junior_review_item_conversations", {
|
|
441
|
+
itemId: text("item_id").notNull().references(() => juniorReviewItems.id, { onDelete: "cascade" }),
|
|
442
|
+
conversationId: text("conversation_id").notNull().references(() => juniorConversations.conversationId, { onDelete: "cascade" })
|
|
443
|
+
}, (table) => [primaryKey({ columns: [table.itemId, table.conversationId] }), index("junior_review_item_conversations_conversation_idx").on(table.conversationId)]);
|
|
444
|
+
/**
|
|
445
|
+
* The Slack message that shows a Review item in one linked Slack thread.
|
|
446
|
+
* Junior updates it in place after each change.
|
|
447
|
+
*/
|
|
448
|
+
const juniorReviewItemSlackCards = pgTable("junior_review_item_slack_cards", {
|
|
449
|
+
itemId: text("item_id").notNull().references(() => juniorReviewItems.id, { onDelete: "cascade" }),
|
|
450
|
+
conversationId: text("conversation_id").notNull(),
|
|
451
|
+
teamId: text("team_id").notNull(),
|
|
452
|
+
channelId: text("channel_id").notNull(),
|
|
453
|
+
messageTs: text("message_ts").notNull()
|
|
454
|
+
}, (table) => [primaryKey({ columns: [table.itemId, table.conversationId] })]);
|
|
385
455
|
// src/db/schema/workspaces.ts
|
|
386
456
|
/** Named recipe used to prepare a reusable Sandbox. */
|
|
387
457
|
const juniorWorkspaces = pgTable("junior_workspaces", {
|
|
@@ -455,6 +525,10 @@ const juniorSqlSchema = {
|
|
|
455
525
|
juniorLocationConfigurations,
|
|
456
526
|
juniorDestinations,
|
|
457
527
|
juniorIdentities,
|
|
528
|
+
juniorReviewItemAssignees,
|
|
529
|
+
juniorReviewItemConversations,
|
|
530
|
+
juniorReviewItemSlackCards,
|
|
531
|
+
juniorReviewItems,
|
|
458
532
|
juniorSnapshots,
|
|
459
533
|
juniorStats,
|
|
460
534
|
juniorAutomationRuns,
|
|
@@ -709,4 +783,4 @@ function createJuniorSqlExecutor(args) {
|
|
|
709
783
|
statementTimeoutMs
|
|
710
784
|
});
|
|
711
785
|
}
|
|
712
|
-
export {
|
|
786
|
+
export { juniorCodeRepositories as C, juniorCodeChanges as S, juniorArtifacts as T, CONVERSATION_METRICS as _, juniorReviewItemAssignees as a, juniorApiTokens as b, juniorReviewItems as c, juniorAutomations as d, juniorStats as f, juniorConversationBriefs as g, juniorConversationBindings as h, juniorWorkspaces as i, juniorAutomationRuns as l, juniorConversationParticipants as m, juniorSnapshots as n, juniorReviewItemConversations as o, juniorLocationConfigurations as p, juniorWorkspaceRepos as r, juniorReviewItemSlackCards as s, createJuniorSqlExecutor as t, juniorAutomationVersions as u, juniorConversationMetrics as v, juniorAttachments as w, juniorConversationAnnotations as x, juniorConversationEvents as y };
|
package/dist/instrumentation.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { F as getDeploymentServiceVersion, I as getDeploymentTelemetryAttributes } from "./logging-
|
|
1
|
+
import { F as getDeploymentServiceVersion, I as getDeploymentTelemetryAttributes } from "./logging-DLSpkSSr.js";
|
|
2
2
|
import { a as getClient, c as init, o as getGlobalScope } from "./sentry-MDkYAVPV.js";
|
|
3
|
-
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-
|
|
3
|
+
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-CxlOCiUo.js";
|
|
4
4
|
import { t as consumePrivateTraceResultMarker } from "./private-trace-result-CE7_lEdq.js";
|
|
5
5
|
// src/chat/sentry-payload-filter.ts
|
|
6
6
|
const PAYLOAD_ATTRIBUTE_KEYS = /* @__PURE__ */ new Set([
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ln as extractAssistantText } from "./tasks-SB9z-VTU.js";
|
|
2
2
|
// src/chat/no-reply.ts
|
|
3
3
|
const NO_REPLY_MARKER = "[[NO_REPLY]]";
|
|
4
4
|
/**
|
|
@@ -40,4 +40,10 @@ function getAssistantReplyText(message) {
|
|
|
40
40
|
const decision = decideReply(message);
|
|
41
41
|
return decision.kind === "deliver" ? decision.text : void 0;
|
|
42
42
|
}
|
|
43
|
-
|
|
43
|
+
// src/chat/interruption-marker.ts
|
|
44
|
+
const INTERRUPTED_MARKER = "\n\n[Response interrupted before completion]";
|
|
45
|
+
/** Return the marker added when a visible reply ended mid-execution. */
|
|
46
|
+
function getInterruptionMarker() {
|
|
47
|
+
return INTERRUPTED_MARKER;
|
|
48
|
+
}
|
|
49
|
+
export { NO_REPLY_MARKER as a, sanitizeAssistantText as i, decideReply as n, isNoReplyMarker as o, getAssistantReplyText as r, getInterruptionMarker as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as getChatConfig } from "./config-
|
|
2
|
-
import { E as withSpan, m as logInfo, p as logException } from "./logging-
|
|
1
|
+
import { i as getChatConfig } from "./config-DrTeF80T.js";
|
|
2
|
+
import { E as withSpan, m as logInfo, p as logException } from "./logging-DLSpkSSr.js";
|
|
3
3
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { createHash, createHmac, timingSafeEqual } from "node:crypto";
|