@sentry/junior 0.278.0 → 0.279.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-BXosqTMx.js → adapter-phTTgw7H.js} +1 -1
- package/dist/{admin-Thn7NfOi.js → admin-PcpJDugZ.js} +1 -1
- package/dist/{agent-invocations-D7c4BQGc.js → agent-invocations-CUg_SODU.js} +0 -1
- package/dist/{agent-runner-DE-43MPb.js → agent-runner-DwvT1BY0.js} +76 -35
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +5 -5
- package/dist/api.d.ts +1 -1
- package/dist/api.js +37 -367
- package/dist/{app-CHNS-AX2.d.ts → app-DVs6noo7.d.ts} +3 -3
- package/dist/app.d.ts +1 -1
- package/dist/app.js +460 -77
- package/dist/{assistant-reply-pauL6qyn.js → assistant-reply-BXfxczd7.js} +1 -1
- package/dist/{automation-DphoTRYl.js → automation-BehArCcq.js} +1 -1
- package/dist/{background-compaction-queue-CAL4A2y7.js → background-compaction-queue-CcbuLJrZ.js} +2 -2
- package/dist/{briefs-4fyPJJEu.js → briefs-Dd_ezwED.js} +10 -9
- package/dist/{catalog-runtime-BoOb5oUv.js → catalog-runtime-BWVMeZhW.js} +2 -2
- package/dist/cli/chat.js +16 -16
- package/dist/cli/check.js +3 -3
- package/dist/cli/main.js +4 -4
- package/dist/cli/plugins.js +5 -5
- package/dist/cli/snapshot-create.js +4 -4
- package/dist/cli/upgrade.d.ts +1 -1
- package/dist/cli/upgrade.js +4 -4
- package/dist/{client-v_OVYuHZ.js → client-Bpxe4vKa.js} +7 -3
- package/dist/{config-o2jLRY5J.js → config-C_bmRhrJ.js} +2 -2
- package/dist/{connections-RC4NXAx8.js → connections-B2rHe5W5.js} +10 -10
- package/dist/{conversation-CZfyQvdm.js → conversation-CIiJtx5q.js} +6 -1
- package/dist/conversation-pending-messages-CnBvE6-6.js +173 -0
- package/dist/{conversation-privacy-C23M8KaD.js → conversation-privacy-CzOfcz0U.js} +1 -1
- package/dist/{credential-sync-Dd0WyNfF.js → credential-sync-Dal_unpv.js} +15 -15
- package/dist/{db-BjLzDJCt.d.ts → db-CyLrV9C7.d.ts} +1 -1
- package/dist/{executor-CJfsD0VX.js → executor-BfYH-Wws.js} +6 -4
- package/dist/instrumentation.d.ts +12 -0
- package/dist/instrumentation.js +56 -23
- package/dist/{logging-dFaXvBRK.js → logging-CkT3_Xxp.js} +2 -2
- package/dist/{message-DSwxIZet.js → message-Q5dkgaJ5.js} +10 -10
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +18 -6
- package/dist/{oauth-callback-server-CDcuCp27.js → oauth-callback-server-BDRaqe8O.js} +2 -2
- package/dist/{oauth-relay-C6ZAyJgf.js → oauth-relay-D0G3T16m.js} +1 -1
- package/dist/{package-discovery-DJBompdd.js → package-discovery-DJhGdS4c.js} +1 -1
- package/dist/{plugins-DOm9Y6qI.js → plugins-HYh_JOdw.js} +1 -1
- package/dist/{projection-BTge9wrH.js → projection-DWxX7pb1.js} +122 -44
- package/dist/{prompt-DDtCnlHP.js → prompt--dwus7Y-.js} +1 -1
- package/dist/proxy-path-BHYoKZdq.js +15 -0
- package/dist/{registry-Cp6CNmtP.js → registry-DnrdeO4s.js} +2 -2
- package/dist/{resolve-B_7h2cXx.js → resolve-C_QXfqD_.js} +3 -3
- package/dist/{result-5LBEfnLX.js → result-DNmOxT-N.js} +10 -10
- package/dist/{runner-C5-S4oq-.js → runner-zd_noJ1l.js} +11 -11
- package/dist/{sandbox-egress-signals-B4GehT1L.js → sandbox-egress-signals-DQjv-nbG.js} +1 -1
- package/dist/{schema-B5fpczDw.js → schema-CNJNzvr8.js} +5 -68
- package/dist/{schema-Tr484cCC.d.ts → schema-e90H5FIN.d.ts} +988 -1
- package/dist/sentry-BRTJqumy.js +51 -0
- package/dist/sentry-DrKC2NeM.d.ts +1 -0
- package/dist/sentry-route-name-BhwWnfqj.js +51 -0
- package/dist/{service-account-Cq_dLrZJ.js → service-account-BK26XlHo.js} +3 -3
- package/dist/{service-account-BkEv20zf.js → service-account-CCH2Hv4h.js} +3 -3
- package/dist/{session-stop-BsS4qFS2.js → session-stop-6Tf--T7G.js} +14 -14
- package/dist/{skills-M0BA0_s6.js → skills-BNrk8gi4.js} +4 -4
- package/dist/{spawn-BO3y7H4d.js → spawn-C75hAB9l.js} +3 -3
- package/dist/{stop-D5R82Wla.js → stop-RYbf7PWi.js} +516 -172
- package/dist/{store-BGBzQWNf.js → store-CO5vGjwD.js} +5 -5
- package/dist/{store-CGJZTEVz.js → store-G3h2djJU.js} +3 -3
- package/dist/{task-queue-UD27ei2U.js → task-queue-DlN58XeM.js} +3 -3
- package/dist/{task-runner-noxjOjkM.js → task-runner-B-Bdm23d.js} +21 -9
- package/dist/{thread-state-BSu6rM6p.js → thread-state-Cj_7Slru.js} +4 -4
- package/dist/{turn-failure-response-wahwyPrZ.js → turn-failure-response-CE7gaoC7.js} +7 -7
- package/dist/{turn-lifecycle-Bo4Trccw.js → turn-lifecycle-7sXwXLJ6.js} +1 -1
- package/dist/{turn-session-routing-DnSaaEpn.js → turn-session-routing-FBdaH1zf.js} +10 -10
- package/dist/{validation-B9-8iKyw.js → validation-DLWxEzWW.js} +2 -2
- package/dist/{version-C7HejFP2.js → version-DtQ8WFIZ.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-DLXajQZE.js → viewer-vsM8_90o.js} +5 -5
- package/dist/{work-DRGSlfia.js → work-DsoFRO_0.js} +10 -10
- package/dist/{worker-BGh5Dwc6.js → worker-6kZEsCXs.js} +7 -7
- package/migrations/0077_drop_agent_invocation_model_profile.sql +1 -0
- package/migrations/0078_plugin_conversation_index.sql +20 -0
- package/migrations/0079_conversation_event_author_index.sql +20 -0
- package/migrations/meta/0077_snapshot.json +4141 -0
- package/migrations/meta/0078_snapshot.json +4175 -0
- package/migrations/meta/0079_snapshot.json +4203 -0
- package/migrations/meta/_journal.json +21 -0
- package/package.json +5 -5
- package/dist/common-Eu6sx09c.js +0 -107
- package/dist/rolldown-runtime-nwUcYXjP.js +0 -27
- package/dist/sentry-MDkYAVPV.js +0 -23
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as resolveLocalScheduleAtMs, i as isValidTimeZone, r as getZonedDateTimeParts, t as getFirstRunAtMs } from "./cadence-R7Em4RjE.js";
|
|
2
|
-
import { r as actorIdentitySchema } from "./conversation-
|
|
2
|
+
import { r as actorIdentitySchema } from "./conversation-CIiJtx5q.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { actorUserIdSchema, destinationVisibilitySchema, eventMatchFieldsSchema, eventMatchSchema, eventReachSchema, eventTypeSchema, pluginEventTypeSchema, slackDestinationSchema, taskOutcomeSchema } from "@sentry/junior-plugin-api";
|
|
5
5
|
// src/chat/scheduled-automations/schedule-intent.ts
|
package/dist/{background-compaction-queue-CAL4A2y7.js → background-compaction-queue-CcbuLJrZ.js}
RENAMED
|
@@ -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-C_bmRhrJ.js";
|
|
2
|
+
import { E as withSpan, m as logInfo, p as logException } from "./logging-CkT3_Xxp.js";
|
|
3
3
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
4
4
|
import { createHash, createHmac, timingSafeEqual } from "node:crypto";
|
|
5
5
|
import { z } from "zod";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as completeObject } from "./client-
|
|
2
|
-
import { U as parseBriefInput, c as conversationDetailReportSchema, u as conversationEventPageSchema, z as briefCodeChangeSchema } from "./conversation-
|
|
3
|
-
import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt
|
|
1
|
+
import { i as completeObject } from "./client-Bpxe4vKa.js";
|
|
2
|
+
import { U as parseBriefInput, c as conversationDetailReportSchema, u as conversationEventPageSchema, z as briefCodeChangeSchema } from "./conversation-CIiJtx5q.js";
|
|
3
|
+
import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt--dwus7Y-.js";
|
|
4
4
|
import { CLI_USAGE } from "./cli/run.js";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { z } from "zod";
|
|
@@ -254,7 +254,7 @@ async function parseRunOptions(argv) {
|
|
|
254
254
|
}
|
|
255
255
|
if (snapshots.length === 0) throw new Error(CLI_USAGE);
|
|
256
256
|
return {
|
|
257
|
-
model: model ?? await
|
|
257
|
+
model: model ?? await configuredBriefModelId(),
|
|
258
258
|
out,
|
|
259
259
|
promptFile,
|
|
260
260
|
snapshots,
|
|
@@ -262,12 +262,13 @@ async function parseRunOptions(argv) {
|
|
|
262
262
|
};
|
|
263
263
|
}
|
|
264
264
|
/**
|
|
265
|
-
* Read the
|
|
266
|
-
* `DATABASE_URL` at import, and `briefs pull` must work with only a
|
|
265
|
+
* Read the production Brief model only when a run needs it. `chat/config`
|
|
266
|
+
* reads `DATABASE_URL` at import, and `briefs pull` must work with only a
|
|
267
|
+
* token.
|
|
267
268
|
*/
|
|
268
|
-
async function
|
|
269
|
-
const { botConfig } = await import("./config-
|
|
270
|
-
return botConfig.
|
|
269
|
+
async function configuredBriefModelId() {
|
|
270
|
+
const { botConfig } = await import("./config-C_bmRhrJ.js").then((n) => n.r);
|
|
271
|
+
return botConfig.fastModelId;
|
|
271
272
|
}
|
|
272
273
|
function apiUrl(baseUrl, pathname) {
|
|
273
274
|
const base = new URL(baseUrl);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as createPluginCatalogRuntime } from "./registry-
|
|
1
|
+
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
+
import { t as createPluginCatalogRuntime } from "./registry-DnrdeO4s.js";
|
|
3
3
|
// src/chat/plugins/catalog-runtime.ts
|
|
4
4
|
var catalog_runtime_exports = /* @__PURE__ */ __exportAll({ pluginCatalogRuntime: () => pluginCatalogRuntime });
|
|
5
5
|
const pluginCatalogRuntime = createPluginCatalogRuntime();
|
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-DwvT1BY0.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";
|
|
@@ -98,11 +98,11 @@ async function loadLocalPluginSet() {
|
|
|
98
98
|
/** Configure plugin hooks after local chat has selected its state adapter. */
|
|
99
99
|
async function configureLocalChatPlugins(pluginSet) {
|
|
100
100
|
const [pluginsModule, agentHooksModule, catalogRuntimeModule, validationModule, databaseModule] = await Promise.all([
|
|
101
|
-
import("../plugins-
|
|
102
|
-
import("../projection-
|
|
103
|
-
import("../catalog-runtime-
|
|
104
|
-
import("../validation-
|
|
105
|
-
import("../viewer-
|
|
101
|
+
import("../plugins-HYh_JOdw.js").then((n) => n.o),
|
|
102
|
+
import("../projection-DWxX7pb1.js").then((n) => n.kn),
|
|
103
|
+
import("../catalog-runtime-BWVMeZhW.js").then((n) => n.t),
|
|
104
|
+
import("../validation-DLWxEzWW.js").then((n) => n.r),
|
|
105
|
+
import("../viewer-vsM8_90o.js").then((n) => n.v)
|
|
106
106
|
]);
|
|
107
107
|
const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
|
|
108
108
|
const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
|
|
@@ -152,18 +152,18 @@ function localDevServerUrl() {
|
|
|
152
152
|
async function prepareLocalChatRun(io, pluginSet) {
|
|
153
153
|
defaultStateAdapterForLocalChat();
|
|
154
154
|
await configureLocalChatPlugins(pluginSet);
|
|
155
|
-
const { setBriefsConfig } = await import("../projection-
|
|
155
|
+
const { setBriefsConfig } = await import("../projection-DWxX7pb1.js").then((n) => n.Vn);
|
|
156
156
|
setBriefsConfig({ enabled: true });
|
|
157
|
-
const { runLocalAgentTurn } = await import("../runner-
|
|
158
|
-
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-
|
|
159
|
-
const { createLocalOAuthState } = await import("../oauth-relay-
|
|
160
|
-
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-
|
|
161
|
-
const { bindSpawnAgent } = await import("../spawn-
|
|
162
|
-
const { bindMessageAgent } = await import("../message-
|
|
163
|
-
const { createChildConversationWorker } = await import("../result-
|
|
164
|
-
const { skipInputBeforeConversationStop } = await import("../session-stop-
|
|
157
|
+
const { runLocalAgentTurn } = await import("../runner-zd_noJ1l.js");
|
|
158
|
+
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-BDRaqe8O.js");
|
|
159
|
+
const { createLocalOAuthState } = await import("../oauth-relay-D0G3T16m.js").then((n) => n.t);
|
|
160
|
+
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-DQjv-nbG.js");
|
|
161
|
+
const { bindSpawnAgent } = await import("../spawn-C75hAB9l.js").then((n) => n.n);
|
|
162
|
+
const { bindMessageAgent } = await import("../message-Q5dkgaJ5.js").then((n) => n.n);
|
|
163
|
+
const { createChildConversationWorker } = await import("../result-DNmOxT-N.js").then((n) => n.i);
|
|
164
|
+
const { skipInputBeforeConversationStop } = await import("../session-stop-6Tf--T7G.js").then((n) => n.r);
|
|
165
165
|
const { createLocalConversationWork } = await import("../conversation-work-BaT_T6EB.js");
|
|
166
|
-
const { processConversationWork } = await import("../worker-
|
|
166
|
+
const { processConversationWork } = await import("../worker-6kZEsCXs.js").then((n) => n.n);
|
|
167
167
|
let agentRunner;
|
|
168
168
|
const localConversationWork = createLocalConversationWork(async (message) => {
|
|
169
169
|
if (!agentRunner) throw new Error("Local agent runner is not ready");
|
package/dist/cli/check.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, L as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, M 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 { A as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, L as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, M as JUNIOR_HEARTBEAT_ROUTE } from "../logging-CkT3_Xxp.js";
|
|
2
|
+
import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-DnrdeO4s.js";
|
|
3
|
+
import { i as parseSkillFile } from "../skills-BNrk8gi4.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
|
@@ -4,7 +4,7 @@ import { pathToFileURL } from "node:url";
|
|
|
4
4
|
// src/cli/main.ts
|
|
5
5
|
const SENTRY_FLUSH_TIMEOUT_MS = 2e3;
|
|
6
6
|
async function flushSentry() {
|
|
7
|
-
await (await import("../sentry-
|
|
7
|
+
await (await import("../sentry-BRTJqumy.js").then((n) => n.u)).flush(SENTRY_FLUSH_TIMEOUT_MS);
|
|
8
8
|
}
|
|
9
9
|
async function initSentry() {
|
|
10
10
|
(await import("../instrumentation.js")).initSentry();
|
|
@@ -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-PcpJDugZ.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-BK26XlHo.js")).runServiceAccount(argv);
|
|
32
32
|
}
|
|
33
33
|
async function runBriefs(argv) {
|
|
34
|
-
return await (await import("../briefs-
|
|
34
|
+
return await (await import("../briefs-Dd_ezwED.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,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { S as getDb } from "../viewer-
|
|
3
|
-
import { n as pluginCatalogRuntime } from "../catalog-runtime-
|
|
4
|
-
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-
|
|
5
|
-
import { a as pluginRuntimeRegistrationsFromPluginSet, i as pluginCliRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "../plugins-
|
|
1
|
+
import { Aa as createPluginLogger, Rn as setPlugins, zn as validatePlugins } from "../projection-DWxX7pb1.js";
|
|
2
|
+
import { S as getDb } from "../viewer-vsM8_90o.js";
|
|
3
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-BWVMeZhW.js";
|
|
4
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-DLWxEzWW.js";
|
|
5
|
+
import { a as pluginRuntimeRegistrationsFromPluginSet, i as pluginCliRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "../plugins-HYh_JOdw.js";
|
|
6
6
|
import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
|
|
7
7
|
import { stderr, stdout } from "node:process";
|
|
8
8
|
import { createJiti } from "jiti";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ai as create } from "../projection-
|
|
2
|
-
import { n as pluginCatalogRuntime } from "../catalog-runtime-
|
|
3
|
-
import { t as disconnectStateAdapter } from "../adapter-
|
|
4
|
-
import { n as resolve } from "../resolve-
|
|
1
|
+
import { ai as create } from "../projection-DWxX7pb1.js";
|
|
2
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-BWVMeZhW.js";
|
|
3
|
+
import { t as disconnectStateAdapter } from "../adapter-phTTgw7H.js";
|
|
4
|
+
import { n as resolve } from "../resolve-C_QXfqD_.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,7 +1,7 @@
|
|
|
1
|
-
import { i as getChatConfig } from "../config-
|
|
2
|
-
import { t as createJuniorSqlExecutor } from "../executor-
|
|
3
|
-
import { t as createPluginCatalogRuntime } from "../registry-
|
|
4
|
-
import { n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "../plugins-
|
|
1
|
+
import { i as getChatConfig } from "../config-C_bmRhrJ.js";
|
|
2
|
+
import { t as createJuniorSqlExecutor } from "../executor-BfYH-Wws.js";
|
|
3
|
+
import { t as createPluginCatalogRuntime } from "../registry-DnrdeO4s.js";
|
|
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";
|
|
7
7
|
import { createHash } from "node:crypto";
|
|
@@ -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-CkT3_Xxp.js";
|
|
2
|
+
import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-CzOfcz0U.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";
|
|
@@ -231,6 +231,10 @@ function getProviderErrorAttributes(error) {
|
|
|
231
231
|
};
|
|
232
232
|
}
|
|
233
233
|
// src/chat/xml.ts
|
|
234
|
+
/** Escape untrusted body text for a prompt tag. Quotes stay as written. */
|
|
235
|
+
function escapeXmlText(value) {
|
|
236
|
+
return value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">");
|
|
237
|
+
}
|
|
234
238
|
function escapeXml(value) {
|
|
235
239
|
return value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll("\"", """).replaceAll("'", "'");
|
|
236
240
|
}
|
|
@@ -786,4 +790,4 @@ async function rerankTexts(params) {
|
|
|
786
790
|
throw providerError;
|
|
787
791
|
}
|
|
788
792
|
}
|
|
789
|
-
export {
|
|
793
|
+
export { resolveGatewayCredential as C, getGatewayApiKey as S, createProviderError as _, completeText as a, getProviderErrorUserMessage as b, resolveGatewayModel as c, isCompactionSummaryText as d, renderCurrentInstruction as f, ProviderError as g, escapeXmlText as h, completeObject as i, COMPACTION_SUMMARY_PREFIX as l, escapeXml as m, GEN_AI_SERVER_ADDRESS as n, embedTexts as o, unwrapCurrentInstruction as p, completeDecision as r, rerankTexts as s, GEN_AI_PROVIDER_NAME as t, hasCompactedConversationContext as u, findProviderError as v, toOptionalTrimmed as w, isProviderRetryError as x, getProviderErrorAttributes as y };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
+
import { c as resolveGatewayModel, w as toOptionalTrimmed } from "./client-Bpxe4vKa.js";
|
|
3
3
|
import { AwsClient } from "aws4fetch";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
// src/chat/attachments/s3.ts
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { X as loadTurnCheckpoint, et as failTurnRecord, gi as startOAuthFlow, tt as getTurnRecord } from "./projection-
|
|
2
|
-
import { n as botConfig } from "./config-
|
|
3
|
-
import { C as getSqlExecutor, R as deleteProviderIdentityForSlackUser, y as getConversationEventStore, z as deleteProviderIdentityForUser } from "./viewer-
|
|
4
|
-
import { u as hasRequiredOAuthScope } from "./registry-
|
|
5
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
6
|
-
import { c as deleteMcpAuthSessionsForUserProvider, l as deleteMcpServerSessionId, u as deleteMcpStoredOAuthCredentials } from "./agent-runner-
|
|
7
|
-
import { r as getStateAdapter } from "./adapter-
|
|
8
|
-
import { l as getVercelConversationWorkQueue } from "./background-compaction-queue-
|
|
9
|
-
import { m as ensureConversationWake, w as requestConversationWork } from "./store-
|
|
10
|
-
import { n as resolveTurnSessionRouting } from "./turn-session-routing-
|
|
1
|
+
import { X as loadTurnCheckpoint, et as failTurnRecord, gi as startOAuthFlow, tt as getTurnRecord } from "./projection-DWxX7pb1.js";
|
|
2
|
+
import { n as botConfig } from "./config-C_bmRhrJ.js";
|
|
3
|
+
import { C as getSqlExecutor, R as deleteProviderIdentityForSlackUser, y as getConversationEventStore, z as deleteProviderIdentityForUser } from "./viewer-vsM8_90o.js";
|
|
4
|
+
import { u as hasRequiredOAuthScope } from "./registry-DnrdeO4s.js";
|
|
5
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-BWVMeZhW.js";
|
|
6
|
+
import { c as deleteMcpAuthSessionsForUserProvider, l as deleteMcpServerSessionId, u as deleteMcpStoredOAuthCredentials } from "./agent-runner-DwvT1BY0.js";
|
|
7
|
+
import { r as getStateAdapter } from "./adapter-phTTgw7H.js";
|
|
8
|
+
import { l as getVercelConversationWorkQueue } from "./background-compaction-queue-CcbuLJrZ.js";
|
|
9
|
+
import { m as ensureConversationWake, w as requestConversationWork } from "./store-G3h2djJU.js";
|
|
10
|
+
import { n as resolveTurnSessionRouting } from "./turn-session-routing-FBdaH1zf.js";
|
|
11
11
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
12
12
|
import { z } from "zod";
|
|
13
13
|
// src/chat/task-execution/authorized-turn.ts
|
|
@@ -287,7 +287,12 @@ const conversationAttachmentParamsSchema = z.object({
|
|
|
287
287
|
const conversationDetailQuerySchema = z.object({
|
|
288
288
|
limit: z.coerce.number().int().min(1).max(1e3).default(500),
|
|
289
289
|
/** Also return `unreadPage` when the detail has an `unreadCursor`. */
|
|
290
|
-
unreadPage: z.stringbool().optional()
|
|
290
|
+
unreadPage: z.stringbool().optional(),
|
|
291
|
+
/**
|
|
292
|
+
* Also return `mailbox`, read before history, and never answer 304. A
|
|
293
|
+
* first load gets both in one request.
|
|
294
|
+
*/
|
|
295
|
+
mailbox: z.stringbool().optional()
|
|
291
296
|
}).strict();
|
|
292
297
|
const conversationEventsLimitSchema = z.coerce.number().int().min(1).max(1e3).default(500);
|
|
293
298
|
/**
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { L as messageAttachmentSchema, O as reviewItemChangeRecordSchema, c as conversationDetailReportSchema, r as actorIdentitySchema } from "./conversation-CIiJtx5q.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
// src/reporting-schema.ts
|
|
4
|
+
const healthReportSchema = z.object({
|
|
5
|
+
status: z.literal("ok"),
|
|
6
|
+
service: z.string(),
|
|
7
|
+
timestamp: z.string()
|
|
8
|
+
}).strict();
|
|
9
|
+
const pluginSchema = z.object({
|
|
10
|
+
configKeys: z.array(z.string()),
|
|
11
|
+
description: z.string(),
|
|
12
|
+
displayName: z.string(),
|
|
13
|
+
name: z.string()
|
|
14
|
+
}).strict();
|
|
15
|
+
const pluginsSchema = z.array(pluginSchema);
|
|
16
|
+
const skillReportSchema = z.object({
|
|
17
|
+
name: z.string(),
|
|
18
|
+
pluginProvider: z.string().optional()
|
|
19
|
+
}).strict();
|
|
20
|
+
const skillReportsSchema = z.array(skillReportSchema);
|
|
21
|
+
const pluginPackageContentItemReportSchema = z.object({
|
|
22
|
+
dir: z.string(),
|
|
23
|
+
hasMigrationsDir: z.boolean(),
|
|
24
|
+
hasSkillsDir: z.boolean(),
|
|
25
|
+
packageName: z.string()
|
|
26
|
+
}).strict();
|
|
27
|
+
const pluginPackageContentReportSchema = z.object({
|
|
28
|
+
packageNames: z.array(z.string()),
|
|
29
|
+
packages: z.array(pluginPackageContentItemReportSchema),
|
|
30
|
+
manifestRoots: z.array(z.string()),
|
|
31
|
+
skillRoots: z.array(z.string()),
|
|
32
|
+
tracingIncludes: z.array(z.string())
|
|
33
|
+
}).strict();
|
|
34
|
+
const runtimeInfoReportSchema = z.object({
|
|
35
|
+
cwd: z.string(),
|
|
36
|
+
homeDir: z.string(),
|
|
37
|
+
descriptionText: z.string().optional(),
|
|
38
|
+
providers: z.array(z.string()),
|
|
39
|
+
skills: z.array(skillReportSchema),
|
|
40
|
+
packagedContent: pluginPackageContentReportSchema
|
|
41
|
+
}).strict();
|
|
42
|
+
const pluginOperationalToneSchema = z.enum([
|
|
43
|
+
"danger",
|
|
44
|
+
"good",
|
|
45
|
+
"neutral",
|
|
46
|
+
"warning"
|
|
47
|
+
]);
|
|
48
|
+
const pluginOperationalMetricSchema = z.object({
|
|
49
|
+
label: z.string(),
|
|
50
|
+
tone: pluginOperationalToneSchema.optional(),
|
|
51
|
+
value: z.string()
|
|
52
|
+
}).strict();
|
|
53
|
+
const pluginOperationalFieldSchema = z.object({
|
|
54
|
+
key: z.string(),
|
|
55
|
+
label: z.string()
|
|
56
|
+
}).strict();
|
|
57
|
+
const pluginOperationalRecordSchema = z.object({
|
|
58
|
+
id: z.string(),
|
|
59
|
+
tone: pluginOperationalToneSchema.optional(),
|
|
60
|
+
values: z.record(z.string(), z.string())
|
|
61
|
+
}).strict();
|
|
62
|
+
const pluginOperationalRecordSetSchema = z.object({
|
|
63
|
+
fields: z.array(pluginOperationalFieldSchema).optional(),
|
|
64
|
+
emptyText: z.string().optional(),
|
|
65
|
+
records: z.array(pluginOperationalRecordSchema).optional(),
|
|
66
|
+
title: z.string()
|
|
67
|
+
}).strict();
|
|
68
|
+
const pluginOperationalBarChartWidgetSchema = z.object({
|
|
69
|
+
categories: z.array(z.object({
|
|
70
|
+
id: z.string().min(1),
|
|
71
|
+
label: z.string().min(1),
|
|
72
|
+
values: z.record(z.string(), z.number().finite())
|
|
73
|
+
}).strict()).max(100),
|
|
74
|
+
description: z.string().optional(),
|
|
75
|
+
emptyText: z.string().optional(),
|
|
76
|
+
id: z.string().min(1),
|
|
77
|
+
series: z.array(z.object({
|
|
78
|
+
format: z.literal("usd").optional(),
|
|
79
|
+
key: z.string().min(1),
|
|
80
|
+
label: z.string().min(1),
|
|
81
|
+
tone: pluginOperationalToneSchema.optional()
|
|
82
|
+
}).strict()).min(1).max(8),
|
|
83
|
+
timeRangeDays: z.array(z.union([
|
|
84
|
+
z.literal(1),
|
|
85
|
+
z.literal(7),
|
|
86
|
+
z.literal(30),
|
|
87
|
+
z.literal(90)
|
|
88
|
+
])).min(1).max(4).optional(),
|
|
89
|
+
title: z.string().min(1),
|
|
90
|
+
type: z.literal("bar_chart")
|
|
91
|
+
}).strict();
|
|
92
|
+
const pluginOperationalReportSchema = z.object({
|
|
93
|
+
generatedAt: z.string().optional(),
|
|
94
|
+
metrics: z.array(pluginOperationalMetricSchema).optional(),
|
|
95
|
+
recordSets: z.array(pluginOperationalRecordSetSchema).optional(),
|
|
96
|
+
title: z.string().optional(),
|
|
97
|
+
pluginName: z.string(),
|
|
98
|
+
widgets: z.array(pluginOperationalBarChartWidgetSchema).max(12).optional()
|
|
99
|
+
}).strict();
|
|
100
|
+
const pluginOperationalReportFeedSchema = z.object({
|
|
101
|
+
generatedAt: z.string(),
|
|
102
|
+
reports: z.array(pluginOperationalReportSchema),
|
|
103
|
+
source: z.literal("plugins")
|
|
104
|
+
}).strict();
|
|
105
|
+
// src/api/schema/common.ts
|
|
106
|
+
/** Stable error body returned by Junior-owned REST endpoints. */
|
|
107
|
+
const apiErrorSchema = z.object({ error: z.string().min(1) }).strict();
|
|
108
|
+
// src/api/schema/conversation-pending-messages.ts
|
|
109
|
+
/** Mailbox delivery mode for one accepted inbound message. */
|
|
110
|
+
const conversationPendingMessageDeliverySchema = z.enum(["defer", "interrupt"]);
|
|
111
|
+
/** One accepted mailbox message that has not reached durable history yet. */
|
|
112
|
+
const conversationPendingMessageSchema = z.object({
|
|
113
|
+
actorIdentity: actorIdentitySchema.optional(),
|
|
114
|
+
/** Identity id of the author. Detail `authors` maps it to the person. */
|
|
115
|
+
actorIdentityId: z.string().min(1).optional(),
|
|
116
|
+
createdAt: z.string().datetime(),
|
|
117
|
+
delivery: conversationPendingMessageDeliverySchema,
|
|
118
|
+
inboundMessageId: z.string().min(1),
|
|
119
|
+
messageId: z.string().min(1),
|
|
120
|
+
receivedAt: z.string().datetime(),
|
|
121
|
+
role: z.literal("user"),
|
|
122
|
+
source: z.enum(["slack", "web"]),
|
|
123
|
+
text: z.string().optional(),
|
|
124
|
+
/** People mentioned in the text, resolved at read time. */
|
|
125
|
+
mentions: z.array(actorIdentitySchema).optional(),
|
|
126
|
+
attachments: z.array(messageAttachmentSchema).optional(),
|
|
127
|
+
/** Review item change that this Message records. */
|
|
128
|
+
reviewItemChange: reviewItemChangeRecordSchema.optional(),
|
|
129
|
+
redacted: z.literal(true).optional()
|
|
130
|
+
}).strict().superRefine((data, context) => {
|
|
131
|
+
if (data.text === void 0 === (data.redacted !== true)) context.addIssue({
|
|
132
|
+
code: "custom",
|
|
133
|
+
message: "pending message content must be text or explicitly redacted"
|
|
134
|
+
});
|
|
135
|
+
if (data.redacted && (data.actorIdentity || data.attachments || data.mentions || data.reviewItemChange)) context.addIssue({
|
|
136
|
+
code: "custom",
|
|
137
|
+
message: "redacted pending messages must not expose actor identity, attachments, mentions, or a review item"
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
/** Participant-only authorization prompt for a parked web turn. */
|
|
141
|
+
const conversationPendingAuthorizationSchema = z.object({
|
|
142
|
+
authorizationUrl: z.string().url(),
|
|
143
|
+
completionText: z.string().min(1),
|
|
144
|
+
label: z.string().min(1)
|
|
145
|
+
}).strict();
|
|
146
|
+
/** Bounded mailbox snapshot for one conversation transcript. */
|
|
147
|
+
const conversationPendingMessagesReportSchema = z.object({
|
|
148
|
+
authorization: conversationPendingAuthorizationSchema.optional(),
|
|
149
|
+
conversationId: z.string().min(1),
|
|
150
|
+
generatedAt: z.string().datetime(),
|
|
151
|
+
messages: z.array(conversationPendingMessageSchema)
|
|
152
|
+
}).strict();
|
|
153
|
+
/** Detail report with the mailbox that was read before its history. */
|
|
154
|
+
const conversationDetailWithMailboxReportSchema = conversationDetailReportSchema.extend({ mailbox: conversationPendingMessagesReportSchema });
|
|
155
|
+
/** Optional filters for cancelling accepted mailbox rows. */
|
|
156
|
+
const cancelConversationPendingMessagesBodySchema = z.object({
|
|
157
|
+
inboundMessageIds: z.array(z.string().min(1)).min(1).optional(),
|
|
158
|
+
receivedBefore: z.string().datetime().optional()
|
|
159
|
+
}).strict();
|
|
160
|
+
/** Result of cancelling accepted human-facing mailbox rows. */
|
|
161
|
+
const cancelConversationPendingMessagesResponseSchema = z.object({
|
|
162
|
+
cancelledCount: z.number().int().nonnegative(),
|
|
163
|
+
cancelledInboundMessageIds: z.array(z.string().min(1)),
|
|
164
|
+
conversationId: z.string().min(1)
|
|
165
|
+
}).strict();
|
|
166
|
+
/** Queued web messages that the viewer wants Junior to read now. */
|
|
167
|
+
const steerConversationPendingMessagesBodySchema = z.object({ inboundMessageIds: z.array(z.string().min(1)).min(1) }).strict();
|
|
168
|
+
/** Result of steering queued web messages into the conversation. */
|
|
169
|
+
const steerConversationPendingMessagesResponseSchema = z.object({
|
|
170
|
+
conversationId: z.string().min(1),
|
|
171
|
+
steeredInboundMessageIds: z.array(z.string().min(1))
|
|
172
|
+
}).strict();
|
|
173
|
+
export { pluginsSchema as _, conversationPendingMessageDeliverySchema as a, skillReportsSchema as b, steerConversationPendingMessagesBodySchema as c, healthReportSchema as d, pluginOperationalReportFeedSchema as f, pluginSchema as g, pluginPackageContentReportSchema as h, conversationPendingAuthorizationSchema as i, steerConversationPendingMessagesResponseSchema as l, pluginPackageContentItemReportSchema as m, cancelConversationPendingMessagesResponseSchema as n, conversationPendingMessageSchema as o, pluginOperationalReportSchema as p, conversationDetailWithMailboxReportSchema as r, conversationPendingMessagesReportSchema as s, cancelConversationPendingMessagesBodySchema as t, apiErrorSchema as u, runtimeInfoReportSchema as v, skillReportSchema as y };
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { On as resolvePluginOAuthAccount, d as recordAuthorizationCompleted, hi as resolveBaseUrl, ki as postSlackMessage, mi as parseOAuthStatePayload, pi as formatProviderLabel, q as getConversationPendingAuth, tt as getTurnRecord, u as recordAuthenticationLinked, wn as createUserTokenStore, zi as getSlackClient } from "./projection-
|
|
2
|
-
import { m as escapeXml } from "./client-
|
|
3
|
-
import { a as getRuntimeMetadata, n as botConfig } from "./config-
|
|
4
|
-
import { H as isNativeIdentityProvider, _ as runBestEffort, h as logWarn, p as logException } from "./logging-
|
|
1
|
+
import { On as resolvePluginOAuthAccount, d as recordAuthorizationCompleted, hi as resolveBaseUrl, ki as postSlackMessage, mi as parseOAuthStatePayload, pi as formatProviderLabel, q as getConversationPendingAuth, tt as getTurnRecord, u as recordAuthenticationLinked, wn as createUserTokenStore, zi as getSlackClient } from "./projection-DWxX7pb1.js";
|
|
2
|
+
import { m as escapeXml } from "./client-Bpxe4vKa.js";
|
|
3
|
+
import { a as getRuntimeMetadata, n as botConfig } from "./config-C_bmRhrJ.js";
|
|
4
|
+
import { H as isNativeIdentityProvider, _ as runBestEffort, h as logWarn, p as logException } from "./logging-CkT3_Xxp.js";
|
|
5
5
|
import { p as parseSlackUserId } from "./actor-B4DYygOB.js";
|
|
6
|
-
import { B as findUserByVerifiedEmails, C as getSqlExecutor, I as resolveActorIdentityId, W as upsertLinkedIdentity, o as readIdentityById } from "./viewer-
|
|
7
|
-
import { i as homeDir } from "./package-discovery-
|
|
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 { d as getMcpAuthSession, f as getMcpStoredOAuthCredentials, o as finalizeMcpAuthorization, p as putMcpStoredOAuthCredentials, s as deleteMcpAuthSession, y as lookupSlackUserProfile } from "./agent-runner-
|
|
6
|
+
import { B as findUserByVerifiedEmails, C as getSqlExecutor, I as resolveActorIdentityId, W as upsertLinkedIdentity, o as readIdentityById } from "./viewer-vsM8_90o.js";
|
|
7
|
+
import { i as homeDir } from "./package-discovery-DJhGdS4c.js";
|
|
8
|
+
import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-DnrdeO4s.js";
|
|
9
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-BWVMeZhW.js";
|
|
10
|
+
import { t as discoverSkills } from "./skills-BNrk8gi4.js";
|
|
11
|
+
import { d as getMcpAuthSession, f as getMcpStoredOAuthCredentials, o as finalizeMcpAuthorization, p as putMcpStoredOAuthCredentials, s as deleteMcpAuthSession, y as lookupSlackUserProfile } from "./agent-runner-DwvT1BY0.js";
|
|
12
12
|
import { r as acquireActiveLock } from "./locks-D-0h111u.js";
|
|
13
|
-
import { r as getStateAdapter } from "./adapter-
|
|
14
|
-
import { _ as getMcpProviderErrorAttributes } from "./service-account-
|
|
15
|
-
import { o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-
|
|
16
|
-
import { c as deleteWebAuthorization, i as readConnectedOAuthTokens, m as wakePausedTurn, p as wakeAuthorizedTurn, u as htmlCallbackResponse } from "./connections-
|
|
17
|
-
import { n as relayLocalOAuthCallback } from "./oauth-relay-
|
|
13
|
+
import { r as getStateAdapter } from "./adapter-phTTgw7H.js";
|
|
14
|
+
import { _ as getMcpProviderErrorAttributes } from "./service-account-CCH2Hv4h.js";
|
|
15
|
+
import { o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-Cj_7Slru.js";
|
|
16
|
+
import { c as deleteWebAuthorization, i as readConnectedOAuthTokens, m as wakePausedTurn, p as wakeAuthorizedTurn, u as htmlCallbackResponse } from "./connections-B2rHe5W5.js";
|
|
17
|
+
import { n as relayLocalOAuthCallback } from "./oauth-relay-D0G3T16m.js";
|
|
18
18
|
import path from "node:path";
|
|
19
19
|
import { createHmac, createSecretKey, timingSafeEqual } from "node:crypto";
|
|
20
20
|
import { z } from "zod";
|
|
@@ -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-C_bmRhrJ.js";
|
|
2
|
+
import { p as logException } from "./logging-CkT3_Xxp.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-CUg_SODU.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";
|
|
@@ -153,7 +153,9 @@ const juniorConversationEvents = pgTable("junior_conversation_events", {
|
|
|
153
153
|
index("junior_conversation_events_history_version_idx").on(table.conversationId, table.historyVersion, table.seq),
|
|
154
154
|
index("junior_conversation_events_type_idx").on(table.conversationId, table.type, table.seq),
|
|
155
155
|
index("junior_conversation_events_plugin_report_idx").on(sql`(${table.payload}->>'namespace')`, sql`(${table.payload}->>'name')`, table.createdAt).where(sql`${table.type} = 'structured_event'`),
|
|
156
|
+
index("junior_conversation_events_plugin_conversation_idx").on(table.conversationId, sql`(${table.payload}->>'namespace')`, sql`(${table.payload}->>'name')`, table.seq).where(sql`${table.type} = 'structured_event'`),
|
|
156
157
|
index("junior_conversation_events_actor_identity_idx").on(table.actorIdentityId, table.conversationId, table.seq),
|
|
158
|
+
index("junior_conversation_events_author_idx").on(table.conversationId, table.actorIdentityId, table.seq).where(sql`${table.actorIdentityId} is not null`),
|
|
157
159
|
index("junior_conversation_events_message_search_idx").using("gin", sql`to_tsvector('english', ${table.payload}->>'text')`).where(sql`${table.type} = 'message'`),
|
|
158
160
|
uniqueIndex("junior_conversation_events_idempotency_idx").on(table.conversationId, table.idempotencyKey)
|
|
159
161
|
]);
|
|
@@ -676,7 +678,7 @@ var NeonExecutor = class {
|
|
|
676
678
|
function createNeonJuniorSqlExecutor(args) {
|
|
677
679
|
const pool = new Pool({
|
|
678
680
|
connectionString: args.connectionString,
|
|
679
|
-
max:
|
|
681
|
+
max: 10,
|
|
680
682
|
statement_timeout: args.statementTimeoutMs
|
|
681
683
|
});
|
|
682
684
|
pool.on("error", (error) => {
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
import "./sentry-DrKC2NeM.js";
|
|
2
|
+
import { MiddlewareHandler } from "hono";
|
|
3
|
+
/**
|
|
4
|
+
* Name the current request span after a route pattern. Spans that end during
|
|
5
|
+
* the request take this name as their segment name.
|
|
6
|
+
*/
|
|
7
|
+
export declare function nameRequestRoute(method: string, route: string): void;
|
|
8
|
+
/**
|
|
9
|
+
* Name the request span after the first route handler that matches in this
|
|
10
|
+
* app. Register it first in an app that another app calls through `fetch()`.
|
|
11
|
+
*/
|
|
12
|
+
export declare function routeNameMiddleware(): MiddlewareHandler;
|
|
1
13
|
/** Browser SDK settings and the current request's trace, for an HTML page. */
|
|
2
14
|
export interface BrowserSentryConfig {
|
|
3
15
|
baggage?: string;
|