@sentry/junior 0.276.0 → 0.277.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-DoPR2jS-.js → adapter-BtfBHVM5.js} +1 -1
- package/dist/{admin-BJTT-kXb.js → admin-DzAKbZsm.js} +1 -1
- package/dist/{agent-invocations-CUWrrzkc.js → agent-invocations-Crs3XHhg.js} +5 -1
- package/dist/{agent-runner-sMpA5qGM.js → agent-runner-BsYAbniN.js} +151 -65
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +4 -4
- package/dist/api.d.ts +13 -2
- package/dist/api.js +137 -28
- package/dist/{app-DTj-yAQt.d.ts → app-BjEQwNVP.d.ts} +3 -3
- package/dist/app.d.ts +2 -2
- package/dist/app.js +65 -56
- package/dist/{assistant-reply-DbxKnBQF.js → assistant-reply-NebRGG4G.js} +1 -1
- package/dist/{automation-B8_mC68r.js → automation-Cql9h2vO.js} +1 -1
- package/dist/{background-compaction-queue-Bywqo1WJ.js → background-compaction-queue-hh18yCeU.js} +2 -2
- package/dist/{briefs-IL7QnCCR.js → briefs-BBo0Eimi.js} +4 -4
- package/dist/{catalog-runtime--sC2CYLQ.js → catalog-runtime-DE-F4Awo.js} +1 -1
- package/dist/cli/chat.d.ts +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.d.ts +1 -1
- package/dist/cli/plugins.js +4 -4
- package/dist/cli/snapshot-create.js +4 -4
- package/dist/cli/upgrade.d.ts +2 -2
- package/dist/cli/upgrade.js +3 -3
- package/dist/{client-7diKvInp.js → client-DZ8HTnYH.js} +2 -2
- package/dist/{config-Cb--cuv-.js → config-D5uUtrCP.js} +2 -2
- package/dist/{connections-C4-4fxaE.js → connections-Do24CGP5.js} +10 -10
- package/dist/{conversation-DppJ83Hw.js → conversation-SsASlWL7.js} +4 -6
- package/dist/{conversation-privacy-DTwdT3Pi.js → conversation-privacy-VuylvlKr.js} +1 -1
- package/dist/{credential-sync-Sl5RQCkS.js → credential-sync-BGQK3pOa.js} +13 -13
- package/dist/{db-Ck6TXQIx.d.ts → db-DEiwO5Sh.d.ts} +1 -1
- package/dist/{executor-BFKmqxYe.js → executor-hPfFTH0C.js} +13 -5
- package/dist/instrumentation.js +2 -2
- package/dist/{logging-B04X_eCB.js → logging-cI3T1dNc.js} +4 -2
- package/dist/{message-DQMFyyE-.js → message-DBwsAl7O.js} +9 -9
- package/dist/nitro.d.ts +2 -2
- package/dist/nitro.js +7 -3
- package/dist/{oauth-callback-server-BGq0_vQI.js → oauth-callback-server-DXrnbplb.js} +2 -2
- package/dist/{plugins-B_0Cr0MO.d.ts → plugins-DtmjkTza.d.ts} +1 -0
- package/dist/{projection-6dXaN0n-.js → projection-7EFIqzuj.js} +4476 -4348
- package/dist/{prompt-B4fQKGZR.js → prompt-oRfGsxd3.js} +1 -1
- package/dist/{registry-CEqKR_ld.js → registry-Bzefs7kT.js} +24 -8
- package/dist/{resolve-8I5DkrfI.js → resolve-CuiEY_2u.js} +3 -3
- package/dist/{result-BgAW90IM.js → result-DrcUtFaD.js} +9 -9
- package/dist/{runner-CSKDr_19.js → runner-CDE4CZ52.js} +11 -11
- package/dist/{sandbox-egress-signals-BxAT276e.js → sandbox-egress-signals-0tcmGd13.js} +1 -1
- package/dist/{schema-CaUWl2EV.d.ts → schema-B6N2nc6v.d.ts} +35 -10
- package/dist/{schema-Cal-EFdi.js → schema-Dzi3lkdP.js} +19 -4
- package/dist/{service-account-CtOab1Xz.js → service-account-BOz9pqOE.js} +3 -3
- package/dist/{service-account-CUuVJCKT.js → service-account-DIyz_9Uh.js} +3 -3
- package/dist/{session-stop-DK8LuPZW.js → session-stop-0juF_BP0.js} +17 -14
- package/dist/{skills-Bc0D7BGy.js → skills-CU5Is147.js} +2 -2
- package/dist/{spawn-DF_GUcd8.js → spawn-6C9jHH4b.js} +2 -2
- package/dist/{stop-DthSy-z8.js → stop-6FVG1c-r.js} +388 -153
- package/dist/{store-BgH2P3X9.js → store-DKs1WwdB.js} +3 -3
- package/dist/{store-C5uVTx2G.js → store-DtHZviJ1.js} +4 -4
- package/dist/{task-queue-C6ROM_XJ.js → task-queue-CcvFQE_p.js} +3 -3
- package/dist/{task-runner-BwAkjjVE.js → task-runner-DBkNejLl.js} +6 -6
- package/dist/{thread-state-BXjgk1pW.js → thread-state-4hjEIkIq.js} +4 -4
- package/dist/{turn-failure-response-CVI57qKL.js → turn-failure-response-BZNLydC3.js} +7 -7
- package/dist/{turn-lifecycle-CF6ibonp.js → turn-lifecycle-BhqYjaa4.js} +1 -1
- package/dist/{turn-session-routing-DddybdNu.js → turn-session-routing-jnLOfBHJ.js} +10 -10
- package/dist/{validation-BxF1nQbC.js → validation-BUFmsnKs.js} +1 -1
- package/dist/{version-CTzSbCmR.js → version-DJTk0ZCE.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-CQwBszc7.js → viewer-WY0RYE4E.js} +47 -12
- package/dist/{work-BHlShEQ6.js → work-C5AKvXJV.js} +10 -10
- package/dist/{worker-DhY9MnsH.js → worker-BcYVDVUy.js} +6 -6
- package/migrations/0074_conversation_participant_pins.sql +1 -0
- package/migrations/0075_conversation_detail_version.sql +1 -0
- package/migrations/0076_conversation_auto_archive.sql +5 -0
- package/migrations/meta/0074_snapshot.json +4076 -0
- package/migrations/meta/0075_snapshot.json +4299 -0
- package/migrations/meta/0076_snapshot.json +4363 -0
- package/migrations/meta/_journal.json +22 -1
- package/package.json +5 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import { t as createPluginCatalogRuntime } from "./registry-
|
|
2
|
+
import { t as createPluginCatalogRuntime } from "./registry-Bzefs7kT.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.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as JuniorPluginSet } from "../plugins-
|
|
1
|
+
import { n as JuniorPluginSet } from "../plugins-DtmjkTza.js";
|
|
2
2
|
export declare const CHAT_USAGE = "usage: junior chat\n junior chat -p <message>";
|
|
3
3
|
export type ChatCommandOptions = {
|
|
4
4
|
mode: "interactive";
|
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-BsYAbniN.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("../projection-
|
|
103
|
-
import("../catalog-runtime
|
|
104
|
-
import("../validation-
|
|
105
|
-
import("../viewer-
|
|
102
|
+
import("../projection-7EFIqzuj.js").then((n) => n.Mn),
|
|
103
|
+
import("../catalog-runtime-DE-F4Awo.js").then((n) => n.t),
|
|
104
|
+
import("../validation-BUFmsnKs.js").then((n) => n.r),
|
|
105
|
+
import("../viewer-WY0RYE4E.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-7EFIqzuj.js").then((n) => n.Wn);
|
|
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-CDE4CZ52.js");
|
|
158
|
+
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-DXrnbplb.js");
|
|
159
159
|
const { createLocalOAuthState } = await import("../oauth-relay-C6ZAyJgf.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 { createChildConversationWorker } = await import("../result-
|
|
164
|
-
const { skipInputBeforeConversationStop } = await import("../session-stop-
|
|
160
|
+
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-0tcmGd13.js");
|
|
161
|
+
const { bindSpawnAgent } = await import("../spawn-6C9jHH4b.js").then((n) => n.n);
|
|
162
|
+
const { bindMessageAgent } = await import("../message-DBwsAl7O.js").then((n) => n.n);
|
|
163
|
+
const { createChildConversationWorker } = await import("../result-DrcUtFaD.js").then((n) => n.i);
|
|
164
|
+
const { skipInputBeforeConversationStop } = await import("../session-stop-0juF_BP0.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-BcYVDVUy.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
|
|
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-cI3T1dNc.js";
|
|
2
|
+
import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-Bzefs7kT.js";
|
|
3
|
+
import { i as parseSkillFile } from "../skills-CU5Is147.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-DzAKbZsm.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-BOz9pqOE.js")).runServiceAccount(argv);
|
|
32
32
|
}
|
|
33
33
|
async function runBriefs(argv) {
|
|
34
|
-
return await (await import("../briefs-
|
|
34
|
+
return await (await import("../briefs-BBo0Eimi.js")).runBriefs(argv);
|
|
35
35
|
}
|
|
36
36
|
function topLevelCommand(argv) {
|
|
37
37
|
return (argv[0] === "--" ? argv.slice(1) : argv)[0];
|
package/dist/cli/plugins.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as JuniorPluginSet } from "../plugins-
|
|
1
|
+
import { n as JuniorPluginSet } from "../plugins-DtmjkTza.js";
|
|
2
2
|
import { PluginCliIo } from "@sentry/junior-plugin-api";
|
|
3
3
|
export type PluginCommandIo = PluginCliIo;
|
|
4
4
|
export interface CliPluginCommandDispatcher {
|
package/dist/cli/plugins.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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-
|
|
1
|
+
import { Hn as validatePlugins, Ma as createPluginLogger, Vn as setPlugins } from "../projection-7EFIqzuj.js";
|
|
2
|
+
import { S as getDb } from "../viewer-WY0RYE4E.js";
|
|
3
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-DE-F4Awo.js";
|
|
4
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-BUFmsnKs.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 {
|
|
2
|
-
import { n as pluginCatalogRuntime } from "../catalog-runtime
|
|
3
|
-
import { t as disconnectStateAdapter } from "../adapter-
|
|
4
|
-
import { n as resolve } from "../resolve-
|
|
1
|
+
import { ci as create } from "../projection-7EFIqzuj.js";
|
|
2
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-DE-F4Awo.js";
|
|
3
|
+
import { t as disconnectStateAdapter } from "../adapter-BtfBHVM5.js";
|
|
4
|
+
import { n as resolve } from "../resolve-CuiEY_2u.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-D5uUtrCP.js";
|
|
2
|
+
import { t as createJuniorSqlExecutor } from "../executor-hPfFTH0C.js";
|
|
3
|
+
import { t as createPluginCatalogRuntime } from "../registry-Bzefs7kT.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-cI3T1dNc.js";
|
|
2
|
+
import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-VuylvlKr.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, c as resolveGatewayModel } from "./client-
|
|
3
|
-
import { h as logWarn } from "./logging-
|
|
2
|
+
import { C as toOptionalTrimmed, c as resolveGatewayModel } from "./client-DZ8HTnYH.js";
|
|
3
|
+
import { h as logWarn } from "./logging-cI3T1dNc.js";
|
|
4
4
|
import { c as modelProfileSchema, d as parseTurnReasoningLevel, t as DEFAULT_MODEL_PROFILES, u as TURN_REASONING_LEVELS } from "./model-profile-B998sjVd.js";
|
|
5
5
|
import { AwsClient } from "aws4fetch";
|
|
6
6
|
// src/chat/attachments/s3.ts
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { $ as loadTurnCheckpoint,
|
|
2
|
-
import { n as botConfig } from "./config-
|
|
3
|
-
import { C as getSqlExecutor, F as deleteProviderIdentityForSlackUser, I as deleteProviderIdentityForUser, y as getConversationEventStore } 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 { $ as loadTurnCheckpoint, it as getTurnRecord, rt as failTurnRecord, yi as startOAuthFlow } from "./projection-7EFIqzuj.js";
|
|
2
|
+
import { n as botConfig } from "./config-D5uUtrCP.js";
|
|
3
|
+
import { C as getSqlExecutor, F as deleteProviderIdentityForSlackUser, I as deleteProviderIdentityForUser, y as getConversationEventStore } from "./viewer-WY0RYE4E.js";
|
|
4
|
+
import { u as hasRequiredOAuthScope } from "./registry-Bzefs7kT.js";
|
|
5
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-DE-F4Awo.js";
|
|
6
|
+
import { c as deleteMcpAuthSessionsForUserProvider, l as deleteMcpServerSessionId, u as deleteMcpStoredOAuthCredentials } from "./agent-runner-BsYAbniN.js";
|
|
7
|
+
import { r as getStateAdapter } from "./adapter-BtfBHVM5.js";
|
|
8
|
+
import { l as getVercelConversationWorkQueue } from "./background-compaction-queue-hh18yCeU.js";
|
|
9
|
+
import { m as ensureConversationWake, w as requestConversationWork } from "./store-DKs1WwdB.js";
|
|
10
|
+
import { n as resolveTurnSessionRouting } from "./turn-session-routing-jnLOfBHJ.js";
|
|
11
11
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
12
12
|
import { z } from "zod";
|
|
13
13
|
// src/chat/task-execution/authorized-turn.ts
|
|
@@ -295,11 +295,6 @@ const conversationFeedQuerySchema = z.object({
|
|
|
295
295
|
q: z.string().trim().max(200).optional(),
|
|
296
296
|
status: z.enum(["active", "archived"]).default("active")
|
|
297
297
|
}).strict();
|
|
298
|
-
const archiveConversationBodySchema = z.object({
|
|
299
|
-
archived: z.boolean(),
|
|
300
|
-
lastSeenAt: z.string().datetime()
|
|
301
|
-
}).strict();
|
|
302
|
-
const archiveConversationResponseSchema = z.object({ archivedAt: z.string().datetime().nullable() }).strict();
|
|
303
298
|
const createConversationMessageBodySchema = z.object({
|
|
304
299
|
idempotencyKey: z.string().trim().min(1).max(200),
|
|
305
300
|
message: z.string().trim().max(32e3),
|
|
@@ -444,6 +439,7 @@ const conversationSummaryReportSchema = z.object({
|
|
|
444
439
|
actorIdentity: actorIdentitySchema.optional(),
|
|
445
440
|
participants: z.array(actorIdentitySchema).optional(),
|
|
446
441
|
archivedAt: z.string().datetime().nullable().optional(),
|
|
442
|
+
pinnedAt: z.string().datetime().nullable().optional(),
|
|
447
443
|
channel: z.string().optional(),
|
|
448
444
|
channelName: z.string().optional(),
|
|
449
445
|
channelNameRedacted: z.boolean().optional(),
|
|
@@ -851,6 +847,8 @@ const conversationDetailReportSchema = conversationSummaryReportSchema.extend({
|
|
|
851
847
|
* Conversation last. Root Conversations omit it.
|
|
852
848
|
*/
|
|
853
849
|
agentTree: z.array(conversationAgentTreeNodeSchema).min(2).optional(),
|
|
850
|
+
/** The viewer's effective auto-archive choice. Participants only. */
|
|
851
|
+
autoArchive: z.boolean().optional(),
|
|
854
852
|
/** The viewer can fork this conversation from an assistant reply. */
|
|
855
853
|
canFork: z.boolean().optional(),
|
|
856
854
|
/** How far the signed-in viewer has read. Absent until they read. */
|
|
@@ -891,4 +889,4 @@ const conversationFeedSchema = z.object({
|
|
|
891
889
|
source: z.literal("conversation_index"),
|
|
892
890
|
generatedAt: z.string()
|
|
893
891
|
}).strict();
|
|
894
|
-
export {
|
|
892
|
+
export { forkConversationResponseSchema as A, removedCardSchema as B, conversationReportStatusSchema as C, createConversationBodySchema as D, conversationUsageSchema as E, reviewItemChangeRecordSchema as F, briefCodeChangeSchema as G, MAX_INPUT_IMAGES as H, annotationCard as I, conversationBriefSchema as J, briefLinkSchema as K, messageCardRef as L, steerConversationPendingMessagesResponseSchema as M, conversationChildAgentTotalsSchema as N, createConversationMessageBodySchema as O, conversationReadPositionSchema as P, messageCardText as R, conversationReportMessageEventSchema as S, conversationSurfaceSchema as T, MAX_INPUT_IMAGE_BYTES as U, resolveMessageCards as V, readMessageAttachments as W, parseBriefInput as Y, conversationPendingMessageDeliverySchema as _, conversationActivityPreviewSchema as a, conversationReportEventDataSchema as b, conversationDetailQuerySchema as c, conversationEventPageSchema as d, conversationEventsQuerySchema as f, conversationPendingAuthorizationSchema as g, conversationParamsSchema as h, cancelConversationPendingMessagesResponseSchema as i, steerConversationPendingMessagesBodySchema as j, forkConversationBodySchema as k, conversationDetailReportSchema as l, conversationFeedSchema as m, actorIdentitySchema as n, conversationAttachmentParamsSchema as o, conversationFeedQuerySchema as p, briefOutcomeStatusSchema as q, cancelConversationPendingMessagesBodySchema as r, conversationAuxiliaryCostsSchema as s, acceptedConversationMessageSchema as t, conversationEventHistorySchema as u, conversationPendingMessageSchema as v, conversationSummaryReportSchema as w, conversationReportEventSchema as x, conversationPendingMessagesReportSchema as y, readMessageCardRefs as z };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { m as escapeXml } from "./client-
|
|
3
|
-
import { a as getRuntimeMetadata, n as botConfig } from "./config-
|
|
4
|
-
import {
|
|
1
|
+
import { Dn as createUserTokenStore, Hi as getSlackClient, Mi as postSlackMessage, X as getConversationPendingAuth, _i as parseOAuthStatePayload, f as recordAuthenticationLinked, gi as formatProviderLabel, it as getTurnRecord, jn as resolvePluginOAuthAccount, p as recordAuthorizationCompleted, vi as resolveBaseUrl } from "./projection-7EFIqzuj.js";
|
|
2
|
+
import { m as escapeXml } from "./client-DZ8HTnYH.js";
|
|
3
|
+
import { a as getRuntimeMetadata, n as botConfig } from "./config-D5uUtrCP.js";
|
|
4
|
+
import { H as isNativeIdentityProvider, _ as runBestEffort, h as logWarn, p as logException } from "./logging-cI3T1dNc.js";
|
|
5
5
|
import { p as parseSlackUserId } from "./actor-B4DYygOB.js";
|
|
6
|
-
import { C as getSqlExecutor, L as findUserByVerifiedEmails, N as resolveActorIdentityId, V as upsertLinkedIdentity, o as readIdentityById } from "./viewer-
|
|
6
|
+
import { C as getSqlExecutor, L as findUserByVerifiedEmails, N as resolveActorIdentityId, V as upsertLinkedIdentity, o as readIdentityById } from "./viewer-WY0RYE4E.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 { d as getMcpAuthSession, f as getMcpStoredOAuthCredentials, o as finalizeMcpAuthorization, p as putMcpStoredOAuthCredentials, s as deleteMcpAuthSession, y as lookupSlackUserProfile } from "./agent-runner-
|
|
8
|
+
import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-Bzefs7kT.js";
|
|
9
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-DE-F4Awo.js";
|
|
10
|
+
import { t as discoverSkills } from "./skills-CU5Is147.js";
|
|
11
|
+
import { d as getMcpAuthSession, f as getMcpStoredOAuthCredentials, o as finalizeMcpAuthorization, p as putMcpStoredOAuthCredentials, s as deleteMcpAuthSession, y as lookupSlackUserProfile } from "./agent-runner-BsYAbniN.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-
|
|
13
|
+
import { r as getStateAdapter } from "./adapter-BtfBHVM5.js";
|
|
14
|
+
import { _ as getMcpProviderErrorAttributes } from "./service-account-DIyz_9Uh.js";
|
|
15
|
+
import { o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-4hjEIkIq.js";
|
|
16
|
+
import { c as deleteWebAuthorization, i as readConnectedOAuthTokens, m as wakePausedTurn, p as wakeAuthorizedTurn, u as htmlCallbackResponse } from "./connections-Do24CGP5.js";
|
|
17
17
|
import { n as relayLocalOAuthCallback } from "./oauth-relay-C6ZAyJgf.js";
|
|
18
18
|
import path from "node:path";
|
|
19
19
|
import { createHmac, createSecretKey, timingSafeEqual } from "node:crypto";
|
|
@@ -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-D5uUtrCP.js";
|
|
2
|
+
import { p as logException } from "./logging-cI3T1dNc.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-Crs3XHhg.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";
|
|
@@ -246,14 +246,22 @@ const juniorConversationParticipants = pgTable("junior_conversation_participants
|
|
|
246
246
|
userId: text("user_id").notNull().references(() => juniorUsers.id),
|
|
247
247
|
rootConversationId: text("root_conversation_id").notNull().references(() => juniorConversations.conversationId),
|
|
248
248
|
lastMessageAt: timestamptz("last_message_at").notNull(),
|
|
249
|
-
archivedAt: timestamptz("archived_at")
|
|
249
|
+
archivedAt: timestamptz("archived_at"),
|
|
250
|
+
pinnedAt: timestamptz("pinned_at"),
|
|
251
|
+
/**
|
|
252
|
+
* Per-conversation auto-archive choice for this user. Null uses the
|
|
253
|
+
* user's `autoArchiveDefault`.
|
|
254
|
+
*/
|
|
255
|
+
autoArchive: boolean("auto_archive")
|
|
250
256
|
}, (table) => [
|
|
251
257
|
primaryKey({
|
|
252
258
|
name: "junior_conversation_participants_user_root_pk",
|
|
253
259
|
columns: [table.userId, table.rootConversationId]
|
|
254
260
|
}),
|
|
255
261
|
index("junior_conversation_participants_user_activity_idx").on(table.userId, table.lastMessageAt.desc()),
|
|
256
|
-
index("junior_conversation_participants_root_idx").on(table.rootConversationId)
|
|
262
|
+
index("junior_conversation_participants_root_idx").on(table.rootConversationId),
|
|
263
|
+
index("junior_conversation_participants_auto_archive_idx").on(table.userId).where(sql`${table.autoArchive} and ${table.archivedAt} is null`),
|
|
264
|
+
index("junior_conversation_participants_unarchived_activity_idx").on(table.userId, table.lastMessageAt, table.rootConversationId).where(sql`${table.archivedAt} is null`)
|
|
257
265
|
]);
|
|
258
266
|
// src/db/schema/conversation-read-positions.ts
|
|
259
267
|
/**
|
package/dist/instrumentation.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { R as getDeploymentServiceVersion, z as getDeploymentTelemetryAttributes } from "./logging-cI3T1dNc.js";
|
|
2
2
|
import { a as getClient, c as init, i as getActiveSpan, o as getGlobalScope, p as spanToJSON, s as getTraceData } from "./sentry-MDkYAVPV.js";
|
|
3
|
-
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-
|
|
3
|
+
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-VuylvlKr.js";
|
|
4
4
|
import { t as consumePrivateTraceResultMarker } from "./private-trace-result-CE7_lEdq.js";
|
|
5
5
|
import { performance } from "node:perf_hooks";
|
|
6
6
|
import { subscribe, unsubscribe } from "node:diagnostics_channel";
|
|
@@ -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-MDkYAVPV.js";
|
|
2
|
-
import { t as JUNIOR_VERSION } from "./version-
|
|
2
|
+
import { t as JUNIOR_VERSION } from "./version-DJTk0ZCE.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";
|
|
@@ -112,6 +112,8 @@ const JUNIOR_HEARTBEAT_ROUTE = "/api/internal/heartbeat";
|
|
|
112
112
|
const JUNIOR_HEARTBEAT_CRON_SCHEDULE = "* * * * *";
|
|
113
113
|
const JUNIOR_RETENTION_ROUTE = "/api/internal/retention";
|
|
114
114
|
const JUNIOR_RETENTION_CRON_SCHEDULE = "0 4 * * *";
|
|
115
|
+
const JUNIOR_AUTO_ARCHIVE_ROUTE = "/api/internal/auto-archive";
|
|
116
|
+
const JUNIOR_AUTO_ARCHIVE_CRON_SCHEDULE = "17 * * * *";
|
|
115
117
|
const JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE = "/api/internal/agent/continue";
|
|
116
118
|
const JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE = "/api/internal/plugin/tasks";
|
|
117
119
|
const JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE = "/api/internal/workspace/snapshots";
|
|
@@ -1245,4 +1247,4 @@ function extractGenAiUsageAttributes(...sources) {
|
|
|
1245
1247
|
...cost?.total !== void 0 ? { "app.cost.total_usd": cost.total } : void 0
|
|
1246
1248
|
};
|
|
1247
1249
|
}
|
|
1248
|
-
export {
|
|
1250
|
+
export { JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE as A, runWithLogAttributes as B, summarizeMessageText as C, JUNIOR_AUTO_ARCHIVE_CRON_SCHEDULE as D, withSpan as E, JUNIOR_RETENTION_ROUTE as F, toOptionalNumber as G, isNativeIdentityProvider as H, JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE as I, toOptionalString as K, LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION as L, JUNIOR_HEARTBEAT_ROUTE as M, JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE as N, JUNIOR_AUTO_ARCHIVE_ROUTE as O, JUNIOR_RETENTION_CRON_SCHEDULE as P, getDeploymentServiceVersion as R, setTags as S, withLogContext as T, normalizeIdentityEmail as U, GOOGLE_IDENTITY_PROVIDER as V, isRecord as W, runBestEffort as _, extractGenAiUsageSummary as a, setSpanAttributes as b, getLogContextAttributes as c, logAudit as d, logError as f, normalizeGenAiFinishReason as g, logWarn as h, extractGenAiUsageAttributes as i, JUNIOR_HEARTBEAT_CRON_SCHEDULE as j, JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE as k, getLogContextAttributesForSpan as l, logInfo as m, createChatSdkLogger as n, getActiveTraceContext as o, logException as p, createRequestContext as r, getActiveTraceId as s, buildTurnFailureResponse as t, getTracePropagationHeaders as u, serializeGenAiAttribute as v, withContext as w, setSpanStatus as x, setSentryUser as y, getDeploymentTelemetryAttributes as z };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import {
|
|
3
|
-
import { n as botConfig } from "./config-
|
|
4
|
-
import { M as SYSTEM_IDENTITY_ID, S as getDb, i as readActorIdentity, x as getConversationStore } from "./viewer-
|
|
5
|
-
import { Ft as toolInvocationDestination, Pt as actorFromRun } from "./agent-runner-
|
|
6
|
-
import { F as findChildAgentConversationId, L as PARENT_AGENT_TARGET, N as AgentMessageTargetError, a as createAgentInvocationForMessage, j as AgentMessagePausedError, s as getActiveAgentInvocationForConversation } from "./store-
|
|
7
|
-
import { D as postAutomatedTurnLimitNoticeForConversation, a as EVENT_WAIT_MS, j as admitAutomatedTurn } from "./session-stop-
|
|
8
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-
|
|
9
|
-
import { r as enqueueAgentMessageToParent } from "./result-
|
|
10
|
-
import { i as enqueueAgentInvocation } from "./work-
|
|
2
|
+
import { Na as readConversationAccessFromSql } from "./projection-7EFIqzuj.js";
|
|
3
|
+
import { n as botConfig } from "./config-D5uUtrCP.js";
|
|
4
|
+
import { M as SYSTEM_IDENTITY_ID, S as getDb, i as readActorIdentity, x as getConversationStore } from "./viewer-WY0RYE4E.js";
|
|
5
|
+
import { Ft as toolInvocationDestination, Pt as actorFromRun } from "./agent-runner-BsYAbniN.js";
|
|
6
|
+
import { F as findChildAgentConversationId, L as PARENT_AGENT_TARGET, N as AgentMessageTargetError, a as createAgentInvocationForMessage, j as AgentMessagePausedError, s as getActiveAgentInvocationForConversation } from "./store-DtHZviJ1.js";
|
|
7
|
+
import { D as postAutomatedTurnLimitNoticeForConversation, a as EVENT_WAIT_MS, j as admitAutomatedTurn } from "./session-stop-0juF_BP0.js";
|
|
8
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-DKs1WwdB.js";
|
|
9
|
+
import { r as enqueueAgentMessageToParent } from "./result-DrcUtFaD.js";
|
|
10
|
+
import { i as enqueueAgentInvocation } from "./work-C5AKvXJV.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.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as JuniorDashboardOptions } from "./app-
|
|
2
|
-
import { n as JuniorPluginSet } from "./plugins-
|
|
1
|
+
import { i as JuniorDashboardOptions } from "./app-BjEQwNVP.js";
|
|
2
|
+
import { n as JuniorPluginSet } from "./plugins-DtmjkTza.js";
|
|
3
3
|
import { withSentryConfig as withSentryConfig$1 } from "@sentry/nitro";
|
|
4
4
|
type SentryNitroConfig = Parameters<typeof withSentryConfig$1>[0];
|
|
5
5
|
type SentryNitroOptions = NonNullable<Parameters<typeof withSentryConfig$1>[1]>;
|
package/dist/nitro.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, D as JUNIOR_AUTO_ARCHIVE_CRON_SCHEDULE, F as JUNIOR_RETENTION_ROUTE, I as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, M as JUNIOR_HEARTBEAT_ROUTE, N as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, O as JUNIOR_AUTO_ARCHIVE_ROUTE, P as JUNIOR_RETENTION_CRON_SCHEDULE, R as getDeploymentServiceVersion, j as JUNIOR_HEARTBEAT_CRON_SCHEDULE, k as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE } from "./logging-cI3T1dNc.js";
|
|
2
2
|
import { d as resolvePackageDir, t as discoverInstalledPluginPackageContent, u as isValidPackageName } from "./package-discovery-DJBompdd.js";
|
|
3
|
-
import { a as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, t as BACKGROUND_COMPACTION_QUEUE_TOPIC, u as resolveConversationWorkQueueTopic } from "./background-compaction-queue-
|
|
3
|
+
import { a as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, t as BACKGROUND_COMPACTION_QUEUE_TOPIC, u as resolveConversationWorkQueueTopic } from "./background-compaction-queue-hh18yCeU.js";
|
|
4
4
|
import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-DOm9Y6qI.js";
|
|
5
|
-
import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-
|
|
5
|
+
import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-CcvFQE_p.js";
|
|
6
6
|
import { n as loadPluginSetFromModule, r as resolvePluginModule } from "./plugin-module-Cf5gVPWP.js";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import { cpSync, existsSync, mkdirSync, readdirSync, statSync } from "node:fs";
|
|
@@ -234,6 +234,10 @@ function configureVercelDeployment(nitro, options) {
|
|
|
234
234
|
path: JUNIOR_RETENTION_ROUTE,
|
|
235
235
|
schedule: JUNIOR_RETENTION_CRON_SCHEDULE
|
|
236
236
|
});
|
|
237
|
+
if (!nitro.options.vercel.config.crons.some((cron) => cron.path === "/api/internal/auto-archive")) nitro.options.vercel.config.crons.push({
|
|
238
|
+
path: JUNIOR_AUTO_ARCHIVE_ROUTE,
|
|
239
|
+
schedule: JUNIOR_AUTO_ARCHIVE_CRON_SCHEDULE
|
|
240
|
+
});
|
|
237
241
|
nitro.options.vercel.functions ??= {};
|
|
238
242
|
nitro.options.vercel.functions.maxDuration = defaultMaxDuration;
|
|
239
243
|
nitro.options.vercel.functionRules ??= {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Dn as createUserTokenStore } from "./projection-
|
|
2
|
-
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-
|
|
1
|
+
import { Dn as createUserTokenStore } from "./projection-7EFIqzuj.js";
|
|
2
|
+
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-BGQK3pOa.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;
|