@sentry/junior 0.223.0 → 0.225.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/{agent-hooks-DZU5nsd1.js → agent-hooks-CRuRcOg9.js} +9 -9
- package/dist/{agent-Bzbf92vv.js → agent-runner-Cad1RtWn.js} +1016 -144
- package/dist/api/schema.js +2 -2
- package/dist/api.js +16 -16
- package/dist/app.js +1538 -71
- package/dist/{briefs-BJPfCrlT.js → briefs-BtnkPWT5.js} +5 -5
- package/dist/{catalog-runtime-BthunUDD.js → catalog-runtime-pv4grNNb.js} +1 -1
- package/dist/{checkpoint-Deu-OVb3.js → checkpoint-6fkAdB3g.js} +8 -8
- package/dist/cli/chat.js +14 -15
- package/dist/cli/check.js +3 -3
- package/dist/cli/main.js +1 -1
- package/dist/cli/plugins.js +3 -3
- package/dist/cli/snapshot-create.js +3 -3
- package/dist/cli/upgrade.js +3 -3
- package/dist/{client-DjC6-6iU.js → client-ihmkx60d.js} +2 -2
- package/dist/{config-CtoUVs72.js → config-DMg679BW.js} +11 -13
- package/dist/{conversation-1HUoZr2l.js → conversation-Bygi39Xj.js} +1 -1
- package/dist/{conversation-privacy-xS1t92xa.js → conversation-privacy-ZYy05Y3q.js} +1 -1
- package/dist/credential-sync-DCB2SwnQ.js +940 -0
- package/dist/{execution-stats-CrXs9vSH.js → execution-stats-CR9CYpyj.js} +3 -3
- package/dist/{executor-AOhG9X1t.js → executor-B9R4cHte.js} +1 -1
- package/dist/instrumentation.js +2 -2
- package/dist/{job-queue-CNd9cpIy.js → job-queue-D2SiTrnt.js} +1 -1
- package/dist/{logging-DiN3o3nB.js → logging-CcTvYQ8A.js} +2 -2
- package/dist/{model-profile-CZmVoGdX.js → model-profile-BwU8mqwD.js} +14 -1
- package/dist/nitro.js +3 -3
- package/dist/{pending-auth-D7vmttn_.js → oauth-authorization-BS4vPJmu.js} +6 -48
- package/dist/{oauth-callback-server-Ca0VLUEw.js → oauth-callback-server-DnlQsGBJ.js} +4 -4
- package/dist/{profile-BsNrw8lj.js → profile-CV97YuiL.js} +5 -9
- package/dist/{prompt-90miy8VV.js → prompt-CL8zxsmm.js} +1 -1
- package/dist/{registry-Dankt-Pl.js → registry-C8I4IejN.js} +3 -3
- package/dist/{resolve-B38CpJe2.js → resolve-DXVAzYa3.js} +2 -2
- package/dist/{runner-Ck5rEjCm.js → runner-Die1RJ_z.js} +9 -10
- package/dist/{sandbox-egress-signals-BOfFkvly.js → sandbox-egress-signals-BZepyVh1.js} +1 -1
- package/dist/{schema-RpbW5Od2.js → schema-BE4uso4i.js} +1 -1
- package/dist/{short-title-BHd_jUFX.js → short-title-3wYH3ipl.js} +11 -5
- package/dist/{skills-DbP4TDft.js → skills-DUcDEgDI.js} +2 -2
- package/dist/{spawn-DzXc_PKO.js → spawn-o15i3tJu.js} +2 -2
- package/dist/{stats-pNGp3G5q.js → stats-DawHjcTw.js} +6 -6
- package/dist/{task-queue-Cy9y1foT.js → task-queue-D3PLY59C.js} +3 -3
- package/dist/{task-runner-DI1FBJFJ.js → task-runner-BMl2aM2v.js} +9 -84
- package/dist/{thread-state-DXgxOYpZ.js → thread-state-CAR6gdAm.js} +5 -5
- package/dist/{auth-pause-state-Bn2vX4PA.js → turn-failure-response-CZyoUMkD.js} +74 -73
- package/dist/{turn-lifecycle-Bjf6y2GO.js → turn-lifecycle-DPDHKi2U.js} +1 -1
- package/dist/turn-session-routing-Jkmmxpp-.js +77 -0
- package/dist/{validation-D5CIslEu.js → validation-BcGGxOa6.js} +1 -1
- package/dist/{version-_ZQFlslB.js → version-DYcuOFQb.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{web-authorization-6mmfS_o-.js → web-authorization-B09B8A8R.js} +1 -1
- package/dist/{web-input-BJpWm6go.js → web-input-CGE58TpK.js} +7 -7
- package/dist/{work-DvIlJR3C.js → work-Bm90pR9P.js} +52 -10
- package/dist/{worker-D1qidg-Y.js → worker-BvHr6JhE.js} +5 -5
- package/package.json +4 -4
- package/dist/agent-runner-2VQ9WhkG.js +0 -679
- package/dist/credential-sync-CKdXEUDO.js +0 -2811
- package/dist/experimental-CIXf7Uye.js +0 -46
- package/dist/turn-execution-BNOXrZ-M.js +0 -47
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as completeObject } from "./client-
|
|
2
|
-
import {
|
|
3
|
-
import { P as briefCodeChangeSchema, R as parseBriefInput, d as conversationDetailReportSchema, p as conversationEventPageSchema } from "./conversation-
|
|
4
|
-
import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-
|
|
1
|
+
import { r as completeObject } from "./client-ihmkx60d.js";
|
|
2
|
+
import { r as defaultModelId } from "./model-profile-BwU8mqwD.js";
|
|
3
|
+
import { P as briefCodeChangeSchema, R as parseBriefInput, d as conversationDetailReportSchema, p as conversationEventPageSchema } from "./conversation-Bygi39Xj.js";
|
|
4
|
+
import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-CL8zxsmm.js";
|
|
5
5
|
import { CLI_USAGE } from "./cli/run.js";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import { z } from "zod";
|
|
@@ -269,7 +269,7 @@ async function parseRunOptions(argv) {
|
|
|
269
269
|
* `DATABASE_URL` at import, and `briefs pull` must work with only a token.
|
|
270
270
|
*/
|
|
271
271
|
async function configuredDefaultModelId() {
|
|
272
|
-
const { botConfig } = await import("./config-
|
|
272
|
+
const { botConfig } = await import("./config-DMg679BW.js").then((n) => n.r);
|
|
273
273
|
return defaultModelId(botConfig);
|
|
274
274
|
}
|
|
275
275
|
function apiUrl(baseUrl, pathname) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { t as createPluginCatalogRuntime } from "./registry-
|
|
2
|
+
import { t as createPluginCatalogRuntime } from "./registry-C8I4IejN.js";
|
|
3
3
|
//#region src/chat/plugins/catalog-runtime.ts
|
|
4
4
|
var catalog_runtime_exports = /* @__PURE__ */ __exportAll({ pluginCatalogRuntime: () => pluginCatalogRuntime });
|
|
5
5
|
const pluginCatalogRuntime = createPluginCatalogRuntime();
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { i as completeText, m as escapeXml, o as resolveGatewayModel, p as unwrapCurrentInstruction } from "./client-
|
|
2
|
-
import {
|
|
3
|
-
import { n as botConfig } from "./config-
|
|
1
|
+
import { i as completeText, m as escapeXml, o as resolveGatewayModel, p as unwrapCurrentInstruction } from "./client-ihmkx60d.js";
|
|
2
|
+
import { d as logException, o as getActiveTraceId, p as logWarn, t as buildTurnFailureResponse, v as setSpanAttributes } from "./logging-CcTvYQ8A.js";
|
|
3
|
+
import { n as botConfig } from "./config-DMg679BW.js";
|
|
4
4
|
import { _ as parseSlackMessageTs, f as toStoredSlackActor } from "./context-Bplcgypl.js";
|
|
5
|
-
import { Bt as agentsInstructionsUpdatedEvent, Ht as authenticationUnlinkedEvent, Jt as getSqlExecutor, Kt as getConversationStore, Vt as authenticationLinkedEvent, Wt as getConversationEventStore, Xt as withConversationEventLock, Yt as createSqlConversationEventStore, Zt as sanitizePostgresJson, en as bindProviderConversation, nn as addAgentTurnUsage, zt as JUNIOR_NATIVE_EVENT_NAMESPACE } from "./agent-hooks-
|
|
6
|
-
import { B as agentHistoryItemSchema, J as instructionActors, Y as instructionProvenanceFor, q as contextProvenance } from "./conversation-
|
|
7
|
-
import { n as generateShortTitle, t as fallbackShortTitle } from "./short-title-
|
|
8
|
-
import {
|
|
5
|
+
import { Bt as agentsInstructionsUpdatedEvent, Ht as authenticationUnlinkedEvent, Jt as getSqlExecutor, Kt as getConversationStore, Vt as authenticationLinkedEvent, Wt as getConversationEventStore, Xt as withConversationEventLock, Yt as createSqlConversationEventStore, Zt as sanitizePostgresJson, en as bindProviderConversation, nn as addAgentTurnUsage, zt as JUNIOR_NATIVE_EVENT_NAMESPACE } from "./agent-hooks-CRuRcOg9.js";
|
|
6
|
+
import { B as agentHistoryItemSchema, J as instructionActors, Y as instructionProvenanceFor, q as contextProvenance } from "./conversation-Bygi39Xj.js";
|
|
7
|
+
import { n as generateShortTitle, t as fallbackShortTitle } from "./short-title-3wYH3ipl.js";
|
|
8
|
+
import { D as fenceLock, O as withLock, T as MUTATION_LOCK_TTL_MS, k as sleep, w as getStateAdapter } from "./profile-CV97YuiL.js";
|
|
9
9
|
import { isDeepStrictEqual } from "node:util";
|
|
10
10
|
import { z } from "zod";
|
|
11
11
|
import { createHash } from "node:crypto";
|
|
@@ -2075,4 +2075,4 @@ async function saveDone(args) {
|
|
|
2075
2075
|
});
|
|
2076
2076
|
}
|
|
2077
2077
|
//#endregion
|
|
2078
|
-
export {
|
|
2078
|
+
export { appendThreadContextMessages as $, commitAcceptedReply as A, recordAuthorizationCompleted as B, isToolResultError as C, stripRuntimeTurnContext as D, retainRuntimeTurnContext as E, loadTurnRoute as F, recordToolExecutionStarted as G, recordGuardianActionReviewed as H, openConversationProjection as I, hydrateConversationMessages as J, recordTurnRoute as K, recordAgentsInstructionsUpdated as L, loadConnectedMcpProviders as M, loadConversationProjection as N, trimTrailingAssistantMessages as O, loadProjection as P, resolveConversationTitle as Q, recordAttachmentsDelivered as R, isContinuablePiBoundary as S, normalizeToolNameFromResult as T, recordMcpProviderConnected as U, recordAuthorizationRequested as V, recordSubscribedReplyRoute as W, projectConversationMessages as X, persistConversationMessages as Y, persistConversationMessageSummaries as Z, getTerminalAssistantMessages as _, completeTurnRecord as a, markConversationMessage as at, instructionTextForProjection as b, listTurnSummaries as c, turnHasReply as ct, TurnSliceLimitExceededError as d, getAgentContextCompactionTriggerTokens as dt, buildConversationContext as et, assertTurnToolCallLimit as f, getAgentContextInputLimitTokens as ft, getPiMessageRole as g, extractAssistantText as h, abandonTurnRecord as i, isHumanConversationMessage as it, commitMessages as j, TURN_CONTEXT_TAG as k, recordTurnSummary as l, upsertConversationMessage as lt, isTurnExecutionLimitExceededError as m, piMessageFromHistoryItem as mt, loadTurnCheckpoint as n, estimateConversationContextTokens as nt, failTurnRecord as o, normalizeConversationText as ot, buildTurnErrorResponse as p, historyItemFromPiMessage as pt, appendConversationMessages as q, saveTurnCheckpoint as r, getConversationMessageSlackTs as rt, getTurnRecord as s, recordDeliveredAssistantMessage as st, continuableMessages as t, createConversationMemoryService as tt, persistWithRetry as u, estimateTextTokens as ut, getUserMessageInstructionText as v, isToolResultMessage as w, isAssistantMessage as x, hasRuntimeTurnContext as y, recordAuthenticationLinked as z };
|
package/dist/cli/chat.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as createAgentRunner } from "../agent-runner-2VQ9WhkG.js";
|
|
1
|
+
import { s as executeAgentRun, t as createAgentRunner } from "../agent-runner-Cad1RtWn.js";
|
|
3
2
|
import { t as loadAppPluginSet } from "../plugin-module-BKGOXca2.js";
|
|
4
3
|
import path from "node:path";
|
|
5
4
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -101,10 +100,10 @@ async function loadLocalPluginSet() {
|
|
|
101
100
|
async function configureLocalChatPlugins(pluginSet) {
|
|
102
101
|
const [pluginsModule, agentHooksModule, catalogRuntimeModule, validationModule, databaseModule] = await Promise.all([
|
|
103
102
|
import("../plugins-egKWjgue.js").then((n) => n.o),
|
|
104
|
-
import("../agent-hooks-
|
|
105
|
-
import("../catalog-runtime-
|
|
106
|
-
import("../validation-
|
|
107
|
-
import("../agent-hooks-
|
|
103
|
+
import("../agent-hooks-CRuRcOg9.js").then((n) => n.t),
|
|
104
|
+
import("../catalog-runtime-pv4grNNb.js").then((n) => n.t),
|
|
105
|
+
import("../validation-BcGGxOa6.js").then((n) => n.r),
|
|
106
|
+
import("../agent-hooks-CRuRcOg9.js").then((n) => n.Ut)
|
|
108
107
|
]);
|
|
109
108
|
const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
|
|
110
109
|
const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
|
|
@@ -154,18 +153,18 @@ function localDevServerUrl() {
|
|
|
154
153
|
async function prepareLocalChatRun(io, pluginSet) {
|
|
155
154
|
defaultStateAdapterForLocalChat();
|
|
156
155
|
await configureLocalChatPlugins(pluginSet);
|
|
157
|
-
const { setExperimentalFeatures } = await import("../
|
|
156
|
+
const { setExperimentalFeatures } = await import("../agent-runner-Cad1RtWn.js").then((n) => n.r);
|
|
158
157
|
setExperimentalFeatures({ subagents: true });
|
|
159
|
-
const { setBriefsConfig } = await import("../agent-hooks-
|
|
158
|
+
const { setBriefsConfig } = await import("../agent-hooks-CRuRcOg9.js").then((n) => n.m);
|
|
160
159
|
setBriefsConfig({ enabled: true });
|
|
161
|
-
const { runLocalAgentTurn } = await import("../runner-
|
|
162
|
-
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-
|
|
160
|
+
const { runLocalAgentTurn } = await import("../runner-Die1RJ_z.js");
|
|
161
|
+
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-DnlQsGBJ.js");
|
|
163
162
|
const { createLocalOAuthState } = await import("../oauth-relay-CdCnu80W.js").then((n) => n.t);
|
|
164
|
-
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-
|
|
165
|
-
const { bindSpawnAgent } = await import("../spawn-
|
|
166
|
-
const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-
|
|
163
|
+
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-BZepyVh1.js");
|
|
164
|
+
const { bindSpawnAgent } = await import("../spawn-o15i3tJu.js").then((n) => n.n);
|
|
165
|
+
const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-Bm90pR9P.js").then((n) => n.a);
|
|
167
166
|
const { createLocalConversationWork } = await import("../conversation-work-C6y3T5Hx.js");
|
|
168
|
-
const { processConversationWork } = await import("../worker-
|
|
167
|
+
const { processConversationWork } = await import("../worker-BvHr6JhE.js").then((n) => n.n);
|
|
169
168
|
let agentRunner;
|
|
170
169
|
const localConversationWork = createLocalConversationWork(async (message) => {
|
|
171
170
|
if (!agentRunner) throw new Error("Local agent runner is not ready");
|
|
@@ -181,7 +180,7 @@ async function prepareLocalChatRun(io, pluginSet) {
|
|
|
181
180
|
});
|
|
182
181
|
});
|
|
183
182
|
agentRunner = createAgentRunner(executeAgentRun, { bindSpawnAgent: (request) => bindSpawnAgent(request, { queue: localConversationWork.queue }) });
|
|
184
|
-
const oauthCallback = await startLocalOAuthCallbackServer(
|
|
183
|
+
const oauthCallback = await startLocalOAuthCallbackServer();
|
|
185
184
|
const deps = {
|
|
186
185
|
agentRunner,
|
|
187
186
|
authorization: {
|
package/dist/cli/check.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { f as parseInlinePluginManifest, p as parsePluginManifest } from "../registry-
|
|
3
|
-
import { i as parseSkillFile } from "../skills-
|
|
1
|
+
import { D as JUNIOR_HEARTBEAT_ROUTE, M as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE } from "../logging-CcTvYQ8A.js";
|
|
2
|
+
import { f as parseInlinePluginManifest, p as parsePluginManifest } from "../registry-C8I4IejN.js";
|
|
3
|
+
import { i as parseSkillFile } from "../skills-DUcDEgDI.js";
|
|
4
4
|
import { pathToFileURL } from "node:url";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import fs from "node:fs/promises";
|
package/dist/cli/main.js
CHANGED
|
@@ -25,7 +25,7 @@ async function runChat(argv, pluginSet) {
|
|
|
25
25
|
return await (await import("./chat.js")).runChat(argv, void 0, { pluginSet });
|
|
26
26
|
}
|
|
27
27
|
async function runBriefs(argv) {
|
|
28
|
-
return await (await import("../briefs-
|
|
28
|
+
return await (await import("../briefs-BtnkPWT5.js")).runBriefs(argv);
|
|
29
29
|
}
|
|
30
30
|
function topLevelCommand(argv) {
|
|
31
31
|
return (argv[0] === "--" ? argv.slice(1) : argv)[0];
|
package/dist/cli/plugins.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { bt as createPluginLogger, d as setPlugins, f as validatePlugins, qt as getDb } from "../agent-hooks-
|
|
2
|
-
import { n as pluginCatalogRuntime } from "../catalog-runtime-
|
|
3
|
-
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-
|
|
1
|
+
import { bt as createPluginLogger, d as setPlugins, f as validatePlugins, qt as getDb } from "../agent-hooks-CRuRcOg9.js";
|
|
2
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-pv4grNNb.js";
|
|
3
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-BcGGxOa6.js";
|
|
4
4
|
import { a as pluginRuntimeRegistrationsFromPluginSet, i as pluginCliRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "../plugins-egKWjgue.js";
|
|
5
5
|
import { t as loadAppPluginSet } from "../plugin-module-BKGOXca2.js";
|
|
6
6
|
import { stderr, stdout } from "node:process";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as pluginCatalogRuntime } from "../catalog-runtime-
|
|
2
|
-
import { S as disconnectStateAdapter, t as create } from "../profile-
|
|
3
|
-
import { r as resolve } from "../resolve-
|
|
1
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-pv4grNNb.js";
|
|
2
|
+
import { S as disconnectStateAdapter, t as create } from "../profile-CV97YuiL.js";
|
|
3
|
+
import { r as resolve } from "../resolve-DXVAzYa3.js";
|
|
4
4
|
//#region src/cli/snapshot-create.ts
|
|
5
5
|
const DEFAULT_RUNTIME = "node22";
|
|
6
6
|
const DEFAULT_TIMEOUT_MS = 6e5;
|
package/dist/cli/upgrade.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as getChatConfig } from "../config-
|
|
2
|
-
import { t as createJuniorSqlExecutor } from "../executor-
|
|
3
|
-
import { t as createPluginCatalogRuntime } from "../registry-
|
|
1
|
+
import { a as getChatConfig } from "../config-DMg679BW.js";
|
|
2
|
+
import { t as createJuniorSqlExecutor } from "../executor-B9R4cHte.js";
|
|
3
|
+
import { t as createPluginCatalogRuntime } from "../registry-C8I4IejN.js";
|
|
4
4
|
import { n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "../plugins-egKWjgue.js";
|
|
5
5
|
import { t as loadAppPluginSet } from "../plugin-module-BKGOXca2.js";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-
|
|
1
|
+
import { d as logException, g as serializeGenAiAttribute, i as extractGenAiUsageAttributes, m as normalizeGenAiFinishReason, p as logWarn, w as withSpan } from "./logging-CcTvYQ8A.js";
|
|
2
|
+
import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-ZYy05Y3q.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,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { o as resolveGatewayModel, w as toOptionalTrimmed } from "./client-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { o as resolveGatewayModel, w as toOptionalTrimmed } from "./client-ihmkx60d.js";
|
|
3
|
+
import { p as logWarn } from "./logging-CcTvYQ8A.js";
|
|
4
|
+
import { l as TURN_REASONING_LEVELS, s as modelProfileSchema, t as DEFAULT_MODEL_PROFILES, u as parseTurnReasoningLevel } from "./model-profile-BwU8mqwD.js";
|
|
5
5
|
//#region src/chat/slack/emoji.ts
|
|
6
6
|
const SLACK_EMOJI_NAME_RE = /^(?:[a-z0-9_+-]+)(?:::(?:skin-tone-[2-6]))?$/;
|
|
7
7
|
function normalizeSlackEmojiName(value) {
|
|
@@ -124,13 +124,14 @@ function parseCrossActorMidRunMode(rawValue) {
|
|
|
124
124
|
if (value === "follow_up" || value === "steer") return value;
|
|
125
125
|
throw new Error("JUNIOR_CROSS_ACTOR_MID_RUN_MODE must be follow_up or steer");
|
|
126
126
|
}
|
|
127
|
-
const DEFAULT_MODEL_ID =
|
|
127
|
+
const DEFAULT_MODEL_ID = resolveGatewayModel(DEFAULT_MODEL_PROFILES.standard.modelId).id;
|
|
128
128
|
const DEFAULT_FAST_MODEL_ID = resolveGatewayModel("openai/gpt-6-luna").id;
|
|
129
129
|
const DEFAULT_GUARDIAN_MODEL_ID = resolveGatewayModel("openai/gpt-6-luna").id;
|
|
130
|
-
const DEFAULT_HANDOFF_MODEL_ID = resolveGatewayModel(
|
|
130
|
+
const DEFAULT_HANDOFF_MODEL_ID = resolveGatewayModel(DEFAULT_MODEL_PROFILES.handoff.modelId).id;
|
|
131
131
|
const DEFAULT_WEB_SEARCH_MODEL_ID = resolveGatewayModel("openai/gpt-6-luna").id;
|
|
132
132
|
const DEFAULT_EMBEDDING_MODEL_ID = "openai/text-embedding-3-small";
|
|
133
133
|
const DEFAULT_IMAGE_GENERATION_MODEL_ID = "google/gemini-3-pro-image";
|
|
134
|
+
const DEFAULT_VISION_MODEL_ID = resolveGatewayModel("openai/gpt-5.6-sol").id;
|
|
134
135
|
function validateGatewayModelId(raw) {
|
|
135
136
|
const trimmed = toOptionalTrimmed(raw);
|
|
136
137
|
if (trimmed === void 0) return void 0;
|
|
@@ -145,8 +146,6 @@ function requireModelId(configName, raw, validate) {
|
|
|
145
146
|
if (!modelId) throw new Error(`${configName} must not be empty`);
|
|
146
147
|
return modelId;
|
|
147
148
|
}
|
|
148
|
-
const DEFAULT_STANDARD_PROFILE_DESCRIPTION = "Use for default assistant work: lookups, explanations, ordinary tool use, short answers, and light investigation of one source. Avoid for implementation, debugging, multi-file changes, architecture decisions, or research across several systems.";
|
|
149
|
-
const DEFAULT_HANDOFF_PROFILE_DESCRIPTION = "Use for coding and difficult multi-step work: implementation, debugging, root-cause analysis, broad refactors, multi-file changes, architecture decisions, and research across several systems. Avoid for simple lookups, short answers, single-file reads, or ordinary tool use that the default profile can finish.";
|
|
150
149
|
function parseOptionalProfileDescription(rawDescription, configName, profile) {
|
|
151
150
|
if (rawDescription === void 0) return;
|
|
152
151
|
if (typeof rawDescription !== "string") throw new Error(`${configName}.${profile}.description must be a string when set`);
|
|
@@ -193,13 +192,12 @@ function parseProfileMap(rawProfiles, configName) {
|
|
|
193
192
|
function parseProfiles(rawValue, standardModelId, handoffModelId) {
|
|
194
193
|
const profiles = {
|
|
195
194
|
standard: {
|
|
196
|
-
|
|
197
|
-
|
|
195
|
+
...DEFAULT_MODEL_PROFILES.standard,
|
|
196
|
+
modelId: standardModelId
|
|
198
197
|
},
|
|
199
198
|
handoff: {
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
reasoningLevel: "high"
|
|
199
|
+
...DEFAULT_MODEL_PROFILES.handoff,
|
|
200
|
+
modelId: handoffModelId
|
|
203
201
|
}
|
|
204
202
|
};
|
|
205
203
|
const trimmed = toOptionalTrimmed(rawValue);
|
|
@@ -252,7 +250,7 @@ function readBotConfig(env, functionMaxDurationSeconds) {
|
|
|
252
250
|
imageGenerationModelId: toOptionalTrimmed(env.AI_IMAGE_MODEL) ?? DEFAULT_IMAGE_GENERATION_MODEL_ID,
|
|
253
251
|
embeddingModelId: validateEmbeddingModelId(env.AI_EMBEDDING_MODEL) ?? DEFAULT_EMBEDDING_MODEL_ID,
|
|
254
252
|
loadingMessages: parseLoadingMessages(env.JUNIOR_LOADING_MESSAGES),
|
|
255
|
-
visionModelId: validateGatewayModelId(env.AI_VISION_MODEL),
|
|
253
|
+
visionModelId: env.AI_VISION_MODEL === void 0 ? DEFAULT_VISION_MODEL_ID : validateGatewayModelId(env.AI_VISION_MODEL),
|
|
256
254
|
maxSlicesPerTurn: MAX_SLICES_PER_TURN,
|
|
257
255
|
maxToolCallsPerTurn: MAX_TOOL_CALLS_PER_TURN,
|
|
258
256
|
maxConsecutiveAutomatedTurns: MAX_CONSECUTIVE_AUTOMATED_TURNS,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { l as TURN_REASONING_LEVELS, s as modelProfileSchema } from "./model-profile-BwU8mqwD.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { actorSchema, codeChangeStateSchema, conversationAnnotationInputSchema, conversationEventPresentationSchema, conversationSidebarAnnotationSchema, ownedObjectAnnotationSchema } from "@sentry/junior-plugin-api";
|
|
4
4
|
//#region src/usage-schema.ts
|