@sentry/junior 0.316.0 → 0.318.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/{admin-QYiDMnsu.js → admin-UOHix_5P.js} +1 -1
- package/dist/{agent-runner-Cr5Fhjf-.js → agent-runner-DeYymwh2.js} +13494 -13135
- package/dist/{reporting-window-C4dbzDiR.js → agent-status-BA5x3Xtp.js} +33 -1
- package/dist/{agent-update-delivery-BY13DPSD.js → agent-update-delivery-DH8bx7jU.js} +5 -5
- package/dist/api/schema.d.ts +600 -130
- package/dist/api/schema.js +6 -6
- package/dist/api.js +228 -214
- package/dist/{app-BhvzRD__.d.ts → app-DKAOuaoC.d.ts} +33 -18
- package/dist/app.d.ts +1 -1
- package/dist/app.js +193 -177
- package/dist/{thread-context-fiMNylbg.js → auth-pause-state-f9hJM_zO.js} +6 -59
- package/dist/catalog-runtime-BfdAnztW.js +6 -0
- package/dist/{change-record-Bqsa5ZXE.d.ts → change-record-BzJgLsv7.d.ts} +60 -1
- package/dist/{adapter-context-Bref7aPI.js → channel-access-A0de5lRv.js} +2 -42
- package/dist/{chat-core-engine-3dtlMku3.js → chat-core-engine-D3Wd7f5n.js} +6 -5
- package/dist/{child-message--2G3Ft26.js → child-message-peFWLcCZ.js} +2 -6
- package/dist/cli/chat.js +38 -30
- package/dist/cli/check.js +5 -5
- package/dist/cli/main.js +2 -2
- package/dist/cli/plugins.js +5 -4
- package/dist/cli/snapshot-create.js +4 -2
- package/dist/cli/upgrade.js +5 -3
- package/dist/context-BKF_5zzI.js +1833 -0
- package/dist/{continue-in-slack-DbQUFe_F.js → continue-in-slack-YxwMQVeR.js} +3 -3
- package/dist/{conversation-feed-B84pMjHo.js → conversation-feed-Cj7IuBtM.js} +3 -3
- package/dist/{proxy-path-BTmXDjfx.js → conversation-privacy-Cr_dNW1p.js} +2 -16
- package/dist/{conversation-turn-DzEpTIaf.js → conversation-turn-Bru4w_FD.js} +196 -80
- package/dist/{create-DUJBXr6E.js → create-Btl1y1rq.js} +12 -11
- package/dist/{credential-sync-JH_K9Adg.js → credential-sync-DTarZ63K.js} +20 -15
- package/dist/{db-DhzvUY23.js → db-of6e3sGt.js} +20724 -27256
- package/dist/{deployment-BhvrhQeh.js → deployment-C0qXa0FD.js} +17 -15
- package/dist/{engine-context-C9Nal48K.js → engine-context-C_QL_bMQ.js} +304 -56
- package/dist/{html-B_12WjKT.js → html-9_pS9SjY.js} +6 -2
- package/dist/instrumentation.js +15 -7
- package/dist/{job-runner-DO8nslyY.js → job-runner-B2XEvpif.js} +392 -26
- package/dist/{lineage-D3AZAJVe.js → lineage-nh4z9iQN.js} +1 -1
- package/dist/{list-B0zsb5Cp.js → list-HRP3TIRl.js} +238 -550
- package/dist/{logging-B8KEJegM.js → logging-BnOG0qz2.js} +4 -50
- package/dist/{session-stop-DponjDUZ.js → mailbox-turn-Byrry9o1.js} +4807 -7102
- package/dist/{list-mkB_GU8R.js → markers-CTTtJqYn.js} +171 -124
- package/dist/{message-B5fKDYzz.js → message-BRUuLgrY.js} +13 -24
- package/dist/{model-input-CuMWy37l.js → model-input-CFC62mf-.js} +3 -3
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +21 -7
- package/dist/{oauth-callback-server-B3Vvlydo.js → oauth-callback-server-CjnnUr4o.js} +2 -2
- package/dist/{oauth-relay-6ERrGPbA.js → oauth-relay-BvHFH0fV.js} +2 -2
- package/dist/{package-discovery-BI6T_RkD.js → package-discovery-DD9vencX.js} +1 -50
- package/dist/{plugins-BXMdNdyA.js → plugins-D_Ru4CWc.js} +1 -1
- package/dist/profile-iHw1uu32.js +4657 -0
- package/dist/{transcript-CCi7323k.js → prompt-DEkStuxG.js} +92 -98
- package/dist/proxy-path-BHYoKZdq.js +15 -0
- package/dist/registry-Cl7Labpe.js +3279 -0
- package/dist/reports-C1d9azyV.js +195 -0
- package/dist/{resolve-D5JVvv6A.js → resolve-DC6zBuDV.js} +9 -29
- package/dist/{result-CS_7mo8a.js → result-DxewDuXb.js} +27 -118
- package/dist/run-conversation-Cz2ubZK-.js +337 -0
- package/dist/{runner-BzAES5W3.js → runner-99YxVN_r.js} +10 -18
- package/dist/{sandbox-egress-signals-Dwhk2Q5F.js → sandbox-egress-signals-CgoX5CTI.js} +1 -1
- package/dist/{schema-z5-wA6N4.js → schema-BTojNBr5.js} +48 -86
- package/dist/sender-actors-77zTQbSG.js +84 -0
- package/dist/{service-account-D6AsAtc1.js → service-account-YDCPSByj.js} +3 -1
- package/dist/{skills-DgJ9GBPR.js → skills-CleC0Hze.js} +6 -5
- package/dist/{slack-conversation-unfurl-Dq71EkhM.js → slack-conversation-unfurl-BNQLC12R.js} +7 -6
- package/dist/{spawn-BJWpdwhQ.js → spawn-DuZfodPa.js} +5 -5
- package/dist/{system-prompt-table-iIgpmslr.js → system-prompt-table-Ci6Ck4gk.js} +88 -69
- package/dist/{task-runner-BJae4JwE.js → task-runner-BJ9Up3bG.js} +30 -53
- package/dist/topics-BoCkoPJJ.js +21 -0
- package/dist/turn-membership-VT7XZh-L.js +856 -0
- package/dist/{turn-wake-BjDW7x-5.js → turn-wake-C7HeLHAM.js} +3 -4
- package/dist/{media-BebquhET.js → types-DCzTAA63.js} +629 -593
- package/dist/user-customization-CvfuY9Eo.js +93 -0
- package/dist/users-Cb9c1k9q.js +181 -0
- package/dist/{validation-D5WmmmhX.js → validation-BiUmWPhy.js} +1 -1
- package/dist/{version-CBQoanXb.js → version-VEXiEcZu.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{worker-Cyb4kF17.js → worker-ChWYQdhm.js} +5 -4
- package/migrations/20261126025226_drop_agent_invocations/migration.sql +6 -0
- package/migrations/20261126025226_drop_agent_invocations/snapshot.json +9 -0
- package/migrations/20261126033000_space_conversations_lead_children/migration.sql +155 -0
- package/migrations/20261126033000_space_conversations_lead_children/snapshot.json +9 -0
- package/migrations/20261126144620_drop_user_message_time_index/migration.sql +1 -0
- package/migrations/20261126144620_drop_user_message_time_index/snapshot.json +38 -0
- package/migrations/20261126153100_inbox_item_subjects/migration.sql +140 -0
- package/migrations/20261126153100_inbox_item_subjects/snapshot.json +9 -0
- package/migrations/20261126153103_inbox_item_subjects_not_null/migration.sql +12 -0
- package/migrations/20261126153103_inbox_item_subjects_not_null/snapshot.json +9 -0
- package/migrations/20261126153105_inbox_item_subject_indexes/migration.sql +1 -0
- package/migrations/20261126153105_inbox_item_subject_indexes/snapshot.json +9 -0
- package/migrations/20261126153108_automation_run_conversation_index/migration.sql +1 -0
- package/migrations/20261126153108_automation_run_conversation_index/snapshot.json +9 -0
- package/migrations/20261126153159_inbox_item_subjects_schema/migration.sql +4 -0
- package/migrations/20261126153159_inbox_item_subjects_schema/snapshot.json +437 -0
- package/migrations/20261126153259_inbox_questions/migration.sql +76 -0
- package/migrations/20261126153259_inbox_questions/snapshot.json +9 -0
- package/migrations/20261126153301_inbox_questions_valid/migration.sql +3 -0
- package/migrations/20261126153301_inbox_questions_valid/snapshot.json +9 -0
- package/migrations/20261126153343_inbox_questions_schema/migration.sql +5 -0
- package/migrations/20261126153343_inbox_questions_schema/snapshot.json +407 -0
- package/migrations/20261126154025_inbox_item_owners/migration.sql +74 -0
- package/migrations/20261126154025_inbox_item_owners/snapshot.json +9 -0
- package/migrations/20261126154048_inbox_item_open_subject_key_index/migration.sql +1 -0
- package/migrations/20261126154048_inbox_item_open_subject_key_index/snapshot.json +9 -0
- package/migrations/20261126154051_drop_inbox_item_owner_indexes/migration.sql +7 -0
- package/migrations/20261126154051_drop_inbox_item_owner_indexes/snapshot.json +9 -0
- package/migrations/20261126154121_inbox_item_owners_schema/migration.sql +8 -0
- package/migrations/20261126154121_inbox_item_owners_schema/snapshot.json +311 -0
- package/migrations/20261126175601_conversation_event_turn/migration.sql +5 -0
- package/migrations/20261126175601_conversation_event_turn/snapshot.json +103 -0
- package/migrations/20261126175614_conversation_event_turn_index/migration.sql +1 -0
- package/migrations/20261126175614_conversation_event_turn_index/snapshot.json +62 -0
- package/migrations/20261126230028_merge_leaves/migration.sql +2 -0
- package/migrations/20261126230028_merge_leaves/snapshot.json +12 -0
- package/migrations/20261126231932_space_lead_holds_name/migration.sql +46 -0
- package/migrations/20261126231932_space_lead_holds_name/snapshot.json +58 -0
- package/migrations/20261127001022_merge_leaves/migration.sql +2 -0
- package/migrations/20261127001022_merge_leaves/snapshot.json +12 -0
- package/migrations/20261127002500_turn_discarded_usage/migration.sql +2 -0
- package/migrations/20261127002500_turn_discarded_usage/snapshot.json +73 -0
- package/package.json +5 -5
- package/dist/people-CUtFApfL.js +0 -81
- package/dist/start-conversation-B-LIqqNi.js +0 -162
- package/dist/turn-session-routing-D15orfwy.js +0 -1309
- package/dist/user-customization-B27StpVQ.js +0 -9
- package/dist/web-message-id-C6P83ans.js +0 -10
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { i as matchSlackAttachments, n as
|
|
2
|
+
import { Bi as createPluginState, D as createSqlStore, Eu as completeObject, Gi as createPluginConversationEvents, Gr as buildSentryEventUrl, Hi as createPluginEmbedder, Ki as renderPluginConversationEvent, Qr as resolveConversationRouting, Su as createConversationEmbedder, Ui as createPluginModel, Wi as createPluginModelCostRecorder, Wl as isEventAuthorId, Ws as createPluginUsers, Yo as codeChangeUrl, a as getDb, df as juniorCodeRepositories, dr as createPluginCodeChanges, ds as writeConversationMetadata, ea as createPluginCache, er as createPluginEventPublisher, f as eventFromRow, gr as createPluginInboxItems, hf as juniorConversations, i as getConversationStore, if as juniorConversationEvents, ir as startedTaskDefinition, is as listConversationAnnotations, kl as hasConversationMetadata, ld as renderJuniorNativeConversationEvent, md as hasAgentTurnUsage, mr as createPluginConversationChanges, o as getSqlExecutor, or as pluginTaskId, pr as createPluginTurnEventReader, ps as resolveRootVisibility, qs as readActorIdentity, rr as createPluginTaskStarter, rs as createPluginAnnotations, si as getDispatchRecord, sr as pluginTaskParamsSchema, uf as juniorCodeChanges, us as readConversationMetadata, wt as getRegistrations, wu as storeConversationEmbedding } from "./db-of6e3sGt.js";
|
|
3
|
+
import { T as withSpan, f as logException, i as extractGenAiUsageSummary, p as logInfo } from "./logging-BnOG0qz2.js";
|
|
4
|
+
import { C as instructionTextForProjection, D as isToolResultError, G as mapBounded, O as isToolResultMessage, b as getUserMessageInstructionText, h as createPluginLogger, j as stripRuntimeTurnContext, k as normalizeToolNameFromResult, v as getPiMessageRole } from "./prompt-DEkStuxG.js";
|
|
5
|
+
import { E as isInheritedForkHistory, Pn as hydrateConversationMessages, Tr as loadTurnStart, br as getTurnRecord, gt as coerceThreadConversationState, h as isParentMessageAuthor, pt as getPersistedThreadState } from "./mailbox-turn-Byrry9o1.js";
|
|
6
|
+
import { L as botConfig, P as parseSlackMessageTs, T as withLock, y as getStateAdapter } from "./context-BKF_5zzI.js";
|
|
7
|
+
import { J as conversationReportMessageEventSchema, Tt as sameActorIdentity, Ut as readMessageCardRefs, Xt as readMessageAttachments, q as conversationReportEventSchema, zt as inboxItemChangeRecordSchema } from "./types-DCzTAA63.js";
|
|
8
|
+
import { i as matchSlackAttachments, n as savedTurnMessages } from "./turn-membership-VT7XZh-L.js";
|
|
9
9
|
import { h as startSpan } from "./sentry-CPbZjomA.js";
|
|
10
10
|
import * as z from "zod";
|
|
11
|
-
import { objectTypeSchema, pluginRunContextSchema, renderTag, tagJson } from "@sentry/junior-plugin-api";
|
|
12
11
|
import { and, arrayContains, asc, desc, eq, getTableColumns, gt, inArray, lt, max, sql } from "drizzle-orm";
|
|
13
12
|
import { alias } from "drizzle-orm/pg-core";
|
|
13
|
+
import { objectTypeSchema, pluginRunContextSchema, renderTag, tagJson } from "@sentry/junior-plugin-api";
|
|
14
14
|
// src/chat/conversations/metadata/generate.ts
|
|
15
15
|
const MAX_INPUT_CHARS = 6e4;
|
|
16
16
|
const MAX_MESSAGE_TEXT_CHARS = 4e3;
|
|
@@ -267,13 +267,12 @@ function reportMessageActorIdentity(data) {
|
|
|
267
267
|
}
|
|
268
268
|
/**
|
|
269
269
|
* Mark a child's input that its parent agent wrote, so the dashboard does not
|
|
270
|
-
* show the person who started the root as its author. Rows from
|
|
271
|
-
*
|
|
272
|
-
*
|
|
270
|
+
* show the person who started the root as its author. Rows from earlier
|
|
271
|
+
* releases store the id of the work that wrote them at the
|
|
272
|
+
* `agentInvocationId` meta key. A parent message names its author.
|
|
273
273
|
*/
|
|
274
274
|
function reportParentAgentInput(message) {
|
|
275
|
-
|
|
276
|
-
return isParentMessageAuthor({ userId: message.authorUserId }) ? { agentInvocationId: message.messageId } : void 0;
|
|
275
|
+
return typeof message.agentInvocationId === "string" || isParentMessageAuthor({ userId: message.authorUserId }) ? { fromParentAgent: true } : void 0;
|
|
277
276
|
}
|
|
278
277
|
/** Project native assistant tool calls through the existing reporting shape. */
|
|
279
278
|
function reportToolCalls(args) {
|
|
@@ -347,7 +346,6 @@ function reportToolResult(args) {
|
|
|
347
346
|
const output = modelVisibleToolOutput(message.data.content);
|
|
348
347
|
const name = message.data.toolName ?? message.data.name ?? args.start?.name;
|
|
349
348
|
if (!name) return void 0;
|
|
350
|
-
const started = args.canExposePayload && name === "startConversation" && outcome === "completed" ? startConversationToolDefinition.outputSchema.safeParse(message.data.details) : void 0;
|
|
351
349
|
return {
|
|
352
350
|
type: "tool_calls",
|
|
353
351
|
calls: [{
|
|
@@ -358,8 +356,7 @@ function reportToolResult(args) {
|
|
|
358
356
|
startedAt: new Date(args.start.createdAtMs).toISOString(),
|
|
359
357
|
startedSeq: args.start.seq
|
|
360
358
|
} : void 0,
|
|
361
|
-
...args.canExposePayload && output !== void 0 ? { output } : void 0
|
|
362
|
-
...started?.success ? { startedConversationId: started.data.conversation_id } : void 0
|
|
359
|
+
...args.canExposePayload && output !== void 0 ? { output } : void 0
|
|
363
360
|
}]
|
|
364
361
|
};
|
|
365
362
|
}
|
|
@@ -406,6 +403,10 @@ function reportEventData(args) {
|
|
|
406
403
|
switch (data.type) {
|
|
407
404
|
case "message": {
|
|
408
405
|
const actorIdentity = args.canExposePayload ? reportMessageActorIdentity(data) : void 0;
|
|
406
|
+
const parentInput = reportParentAgentInput({
|
|
407
|
+
agentInvocationId: data.meta?.["agentInvocationId"],
|
|
408
|
+
authorUserId: reportingMessageAuthorSchema.safeParse(data.meta?.["author"]).data?.userId
|
|
409
|
+
});
|
|
409
410
|
return {
|
|
410
411
|
type: "message",
|
|
411
412
|
messageId: data.messageId,
|
|
@@ -413,11 +414,7 @@ function reportEventData(args) {
|
|
|
413
414
|
...data.meta?.["source"] === "web" || data.meta?.["source"] === "slack" ? { source: data.meta["source"] } : void 0,
|
|
414
415
|
...actorIdentity ? { actorIdentity } : void 0,
|
|
415
416
|
...args.canExposePayload && data.role === "user" && data.authorIdentityId && data.authorIdentityId !== "system" ? { actorIdentityId: data.authorIdentityId } : void 0,
|
|
416
|
-
...
|
|
417
|
-
agentInvocationId: data.meta?.["agentInvocationId"],
|
|
418
|
-
authorUserId: reportingMessageAuthorSchema.safeParse(data.meta?.["author"]).data?.userId,
|
|
419
|
-
messageId: data.messageId
|
|
420
|
-
}),
|
|
417
|
+
...parentInput,
|
|
421
418
|
...args.canExposePayload ? reportInboxItemChanges(data.meta) : void 0,
|
|
422
419
|
eventObjectType: objectTypeSchema.safeParse(data.meta?.["eventObjectType"]).data,
|
|
423
420
|
...typeof data.meta?.["eventType"] === "string" ? { eventType: data.meta["eventType"] } : void 0,
|
|
@@ -431,7 +428,7 @@ function reportEventData(args) {
|
|
|
431
428
|
...args.canExposePayload ? reportMessageEvents(data.meta) : void 0,
|
|
432
429
|
...args.canExposePayload && (data.meta?.["cards"] || data.meta?.["objectCards"]) ? { cards: readMessageCardRefs(data.meta) } : void 0,
|
|
433
430
|
...args.canExposePayload ? {
|
|
434
|
-
text: data.text,
|
|
431
|
+
text: parentInput && typeof data.meta?.["requestText"] === "string" ? data.meta["requestText"] : data.text,
|
|
435
432
|
...data.meta?.["attachments"] ? { attachments: readMessageAttachments(data.meta["attachments"]) } : void 0
|
|
436
433
|
} : { redacted: true }
|
|
437
434
|
};
|
|
@@ -476,8 +473,10 @@ function reportEventData(args) {
|
|
|
476
473
|
toolCallId: data.toolCallId,
|
|
477
474
|
toolName: data.toolName,
|
|
478
475
|
decision: data.decision,
|
|
479
|
-
|
|
480
|
-
|
|
476
|
+
...data.rule ? { rule: data.rule } : void 0,
|
|
477
|
+
...data.reason ? { reason: data.reason } : void 0,
|
|
478
|
+
...data.riskLevel ? { riskLevel: data.riskLevel } : void 0,
|
|
479
|
+
...data.userAuthorization ? { userAuthorization: data.userAuthorization } : void 0
|
|
481
480
|
};
|
|
482
481
|
case "turn_completed": return {
|
|
483
482
|
type: "turn_lifecycle",
|
|
@@ -647,7 +646,7 @@ async function readConversationEventRows(executor, args) {
|
|
|
647
646
|
)
|
|
648
647
|
else ${juniorConversationEvents.payload}
|
|
649
648
|
end`
|
|
650
|
-
}).from(juniorConversationEvents).where(and(eq(juniorConversationEvents.conversationId, args.conversationId), args.beforeSeq === void 0 ? void 0 : lt(juniorConversationEvents.seq, args.beforeSeq), args.afterSeq === void 0 ? void 0 : gt(juniorConversationEvents.seq, args.afterSeq), inArray(juniorConversationEvents.type, args.types ?? [...conversationReportSourceEventTypes]), args.
|
|
649
|
+
}).from(juniorConversationEvents).where(and(eq(juniorConversationEvents.conversationId, args.conversationId), args.beforeSeq === void 0 ? void 0 : lt(juniorConversationEvents.seq, args.beforeSeq), args.afterSeq === void 0 ? void 0 : gt(juniorConversationEvents.seq, args.afterSeq), inArray(juniorConversationEvents.type, args.types ?? [...conversationReportSourceEventTypes]), args.subagentMarkerIds === void 0 ? void 0 : inArray(sql`${juniorConversationEvents.payload}->>'subagentInvocationId'`, args.subagentMarkerIds), args.toolCallIds === void 0 ? void 0 : inArray(sql`${juniorConversationEvents.payload}->>'toolCallId'`, args.toolCallIds))).orderBy(args.direction === "forward" ? asc(juniorConversationEvents.seq) : desc(juniorConversationEvents.seq)).limit(args.limit);
|
|
651
650
|
}
|
|
652
651
|
/**
|
|
653
652
|
* Read the last Turn end before the `turns`-th latest Turn start. Its seq is
|
|
@@ -685,7 +684,7 @@ function projectEventPage(args) {
|
|
|
685
684
|
async function projectConversationEvents(executor, args) {
|
|
686
685
|
const events = args.events.sort((left, right) => left.seq - right.seq);
|
|
687
686
|
const firstSeq = events[0]?.seq;
|
|
688
|
-
const
|
|
687
|
+
const endedMarkerIds = [...new Set(events.flatMap((event) => event.data.type === "subagent_ended" ? [event.data.subagentInvocationId] : []))];
|
|
689
688
|
const toolResultIds = conversationReportToolResultIds(events);
|
|
690
689
|
const [turnBoundaryRows, modelCallRows, subagentStartRows, toolStartRows] = await Promise.all([
|
|
691
690
|
firstSeq === void 0 ? [] : readConversationEventRows(executor, {
|
|
@@ -706,11 +705,11 @@ async function projectConversationEvents(executor, args) {
|
|
|
706
705
|
limit: 1,
|
|
707
706
|
types: ["assistant_message"]
|
|
708
707
|
}),
|
|
709
|
-
|
|
708
|
+
endedMarkerIds.length === 0 ? [] : readConversationEventRows(executor, {
|
|
710
709
|
conversationId: args.conversationId,
|
|
711
710
|
direction: "forward",
|
|
712
|
-
limit:
|
|
713
|
-
|
|
711
|
+
limit: endedMarkerIds.length,
|
|
712
|
+
subagentMarkerIds: endedMarkerIds,
|
|
714
713
|
types: ["subagent_started"]
|
|
715
714
|
}),
|
|
716
715
|
toolResultIds.length === 0 ? [] : readConversationEventRows(executor, {
|
|
@@ -855,28 +854,6 @@ async function readConversationMessageEventSeq(executor, conversationId, message
|
|
|
855
854
|
const [row] = await executor.db().select({ seq: juniorConversationEvents.seq }).from(juniorConversationEvents).where(and(eq(juniorConversationEvents.conversationId, conversationId), eq(juniorConversationEvents.type, "message"), sql`${juniorConversationEvents.payload}->>'messageId' = ${messageId}`)).orderBy(asc(juniorConversationEvents.seq)).limit(1);
|
|
856
855
|
return row?.seq;
|
|
857
856
|
}
|
|
858
|
-
// src/chat/code/links.ts
|
|
859
|
-
function codeLinks(provider) {
|
|
860
|
-
return getPlugins().find((plugin) => plugin.manifest.name === provider)?.codeLinks;
|
|
861
|
-
}
|
|
862
|
-
/** Providers whose installed plugin builds code links. */
|
|
863
|
-
function linkedCodeProviders() {
|
|
864
|
-
return getPlugins().flatMap((plugin) => plugin.codeLinks ? [plugin.manifest.name] : []);
|
|
865
|
-
}
|
|
866
|
-
/**
|
|
867
|
-
* Build the web page of one code change from its repository and number.
|
|
868
|
-
* Undefined when no installed plugin builds links for the provider.
|
|
869
|
-
*/
|
|
870
|
-
function codeChangeUrl(change) {
|
|
871
|
-
return codeLinks(change.provider)?.change(change);
|
|
872
|
-
}
|
|
873
|
-
/**
|
|
874
|
-
* Build the web page of one repository from its name. Undefined when no
|
|
875
|
-
* installed plugin builds links for the provider.
|
|
876
|
-
*/
|
|
877
|
-
function codeRepositoryUrl(repository) {
|
|
878
|
-
return codeLinks(repository.provider)?.repository(repository.name);
|
|
879
|
-
}
|
|
880
857
|
// src/chat/conversations/transcript-entries.ts
|
|
881
858
|
const TOOL_TEXT_LIMIT = 1500;
|
|
882
859
|
function actorIdentityKey(actor) {
|
|
@@ -1224,7 +1201,7 @@ function startedTaskContext(plugin, name, payload, options) {
|
|
|
1224
1201
|
send: options.sendPluginTask,
|
|
1225
1202
|
tasks: plugin.tasks
|
|
1226
1203
|
}),
|
|
1227
|
-
users:
|
|
1204
|
+
users: createPluginUsers(pluginName)
|
|
1228
1205
|
};
|
|
1229
1206
|
}
|
|
1230
1207
|
/** Run one delivery of a started task. */
|
|
@@ -1549,4 +1526,4 @@ async function processPluginTask(message, options = {}) {
|
|
|
1549
1526
|
"app.plugin.task": message.name
|
|
1550
1527
|
});
|
|
1551
1528
|
}
|
|
1552
|
-
export { transcriptEntriesFromReportEvents as a,
|
|
1529
|
+
export { transcriptEntriesFromReportEvents as a, readConversationEventPageAround as c, reportParentAgentInput as d, CONVERSATION_METADATA_TASK as i, readConversationLastEventSeq as l, scheduleSessionCompletedPluginTasks as n, readConversationEventPage as o, task_runner_exports as r, readConversationEventPageAfter as s, processPluginTask as t, readConversationMessageEventSeq as u };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// src/chat/optional-string.ts
|
|
2
|
+
/**
|
|
3
|
+
* Normalize optional env-style strings so blank values do not masquerade as
|
|
4
|
+
* configured inputs.
|
|
5
|
+
*/
|
|
6
|
+
function toOptionalTrimmed(value) {
|
|
7
|
+
if (!value) return;
|
|
8
|
+
const trimmed = value.trim();
|
|
9
|
+
return trimmed.length > 0 ? trimmed : void 0;
|
|
10
|
+
}
|
|
11
|
+
// src/chat/queue/topics.ts
|
|
12
|
+
/**
|
|
13
|
+
* Queue topic names. Vercel queue wiring uses them at build, so keep them
|
|
14
|
+
* stable, and keep this module free of runtime configuration.
|
|
15
|
+
*/
|
|
16
|
+
const CACHE_WARMUP_QUEUE_TOPIC = "junior_cache_warmups";
|
|
17
|
+
const PLUGIN_TASK_QUEUE_TOPIC = "junior_plugin_tasks";
|
|
18
|
+
const WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC = "junior_workspace_snapshots";
|
|
19
|
+
const BACKGROUND_COMPACTION_QUEUE_TOPIC = "junior_context_compaction";
|
|
20
|
+
const DEFAULT_CONVERSATION_WORK_QUEUE_TOPIC = "junior_conversation_work";
|
|
21
|
+
export { WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC as a, PLUGIN_TASK_QUEUE_TOPIC as i, CACHE_WARMUP_QUEUE_TOPIC as n, toOptionalTrimmed as o, DEFAULT_CONVERSATION_WORK_QUEUE_TOPIC as r, BACKGROUND_COMPACTION_QUEUE_TOPIC as t };
|