@sentry/junior 0.211.0 → 0.212.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-XXC-9m0B.js → agent-Cgc7jAIH.js} +19 -19
- package/dist/{agent-hooks-7vR8uZw2.js → agent-hooks-B2Yt2b88.js} +207 -47
- package/dist/{agent-runner-CqXaUvvQ.js → agent-runner-CkNX-ynf.js} +5 -5
- package/dist/api/schema.js +2 -2
- package/dist/api.d.ts +1 -1
- package/dist/api.js +72 -33
- package/dist/{app-gyu3D9Gn.d.ts → app-D4nNdzPG.d.ts} +1 -1
- package/dist/app.d.ts +1 -1
- package/dist/app.js +31 -31
- package/dist/{auth-pause-state-r-1vEoSX.js → auth-pause-state-BbcDkPac.js} +6 -6
- package/dist/{briefs-DIj_YgLE.js → briefs-4-OVELML.js} +4 -4
- package/dist/{catalog-runtime-BMMLIpxX.js → catalog-runtime-BvN_lNVo.js} +1 -1
- package/dist/{checkpoint-B6jEtGHN.js → checkpoint-EAQ5Xerb.js} +7 -7
- package/dist/cli/chat.js +13 -13
- 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.d.ts +1 -1
- package/dist/cli/upgrade.js +3 -3
- package/dist/{client-BBPo9KiG.js → client-C1KycWNq.js} +2 -2
- package/dist/{config-DMq-uJAV.js → config-C0-PnQoF.js} +2 -2
- package/dist/{conversation-AA4R1VUn.js → conversation-CRWntH-A.js} +19 -19
- package/dist/{conversation-privacy-D99FrYrV.js → conversation-privacy-BFzYxnTS.js} +1 -1
- package/dist/{credential-sync-Cz1T9Ws-.js → credential-sync-CZz6Vk6X.js} +20 -20
- package/dist/{db-D74z7BZH.d.ts → db-Ca9Nt5ci.d.ts} +1 -1
- package/dist/{execution-stats-BkCnuVBv.js → execution-stats-CoDjBQbE.js} +3 -4
- package/dist/{executor-B5VURdwg.js → executor-CaVeGYeA.js} +39 -2
- package/dist/instrumentation.js +2 -2
- package/dist/{job-queue-DUs_jnBa.js → job-queue-BhaNX9DL.js} +1 -1
- package/dist/{logging-CXQcqM-W.js → logging-B5-PLvDo.js} +1 -1
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-callback-server-B0KXcd24.js → oauth-callback-server-G5q7i0Qp.js} +2 -2
- package/dist/{pending-auth-CxZjizu_.js → pending-auth-CDndLOLO.js} +2 -2
- package/dist/{profile-8K6D5LHD.js → profile-BcZ6EBQ4.js} +4 -4
- package/dist/{prompt-C1IA4qkj.js → prompt-kRlibHYT.js} +1 -1
- package/dist/{registry-DUa5NdZP.js → registry-BIeo1ST6.js} +1 -1
- package/dist/{resolve-E_-QQ8pM.js → resolve-BgAZ4KxF.js} +2 -2
- package/dist/{runner-Bf0HnWqY.js → runner-Cqd0EG3G.js} +9 -9
- package/dist/{sandbox-egress-signals-BW9FzWoQ.js → sandbox-egress-signals-DrOoklMj.js} +1 -1
- package/dist/{schema-CwTeb-BF.js → schema-xHUgeh46.js} +1 -1
- package/dist/short-title-CxQHLU3_.js +65 -0
- package/dist/{skills-B1f5Ku_s.js → skills-DlrAH1on.js} +2 -2
- package/dist/{spawn-BsOCLy8T.js → spawn-BtMqHjwx.js} +2 -2
- package/dist/{stats-CrITkCy5.js → stats-D5OWazLs.js} +5 -5
- package/dist/{store-Det8MQ9g.d.ts → store-DoewL5mG.d.ts} +3 -2
- package/dist/{task-queue-CcqJCAUd.js → task-queue-C-o2Q4O-.js} +3 -3
- package/dist/{task-runner-7IOXx_Uo.js → task-runner-Mt_TGUBH.js} +8 -8
- package/dist/{thread-state-Y3PGLZQa.js → thread-state-C81fvhJu.js} +5 -5
- package/dist/{turn-execution-Bm6Xbaoi.js → turn-execution-Ruj9SSJU.js} +3 -3
- package/dist/{turn-lifecycle-Czzk8ila.js → turn-lifecycle-xIZNwgaq.js} +1 -1
- package/dist/{validation-A2SMrAkJ.js → validation-sgYqCVwr.js} +1 -1
- package/dist/{version-CfRx6f_C.js → version-BE7Zf9Wx.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{web-authorization-DN3cJuLB.js → web-authorization-BXrGezGm.js} +1 -1
- package/dist/{web-input-lJH42B_R.js → web-input-FJ7NNJDx.js} +4 -4
- package/dist/{work-CRHJu3hb.js → work-DlYdbVfB.js} +9 -9
- package/dist/{worker-D6oTNemM.js → worker-BfxedsTU.js} +5 -5
- package/migrations/0042_conversation_metrics.sql +26 -0
- package/migrations/meta/0042_snapshot.json +3610 -0
- package/migrations/meta/_journal.json +7 -0
- package/package.json +5 -5
- package/dist/usage-DHJ3ng2s.js +0 -166
package/dist/api.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { f as logWarn, u as logException } from "./logging-
|
|
1
|
+
import { f as logWarn, u as logException } from "./logging-B5-PLvDo.js";
|
|
2
2
|
import { _ as parseSlackMessageTs, h as parseSlackTeamId, p as parseSlackChannelId } from "./context-Bplcgypl.js";
|
|
3
|
-
import { $ as resolveViewerUser, $t as parseSessionSource, Ct as conversationArchivedForEmail, D as SANDBOX_RUNTIME, Dt as conversationNotArchivedForEmail, Et as conversationHasParticipantUser, Ft as listConversationAnnotations, Gt as getDb, It as listConversationAnnotationsById, J as withSlackRetries, Kt as getSqlExecutor, Mt as readConversationEventPage, Nt as buildSentryConversationUrl, Ot as conversationNotArchivedForUser, S as WorkspaceValidationError, St as conversationArchiveTimes, Tt as conversationHasParticipantEmail, U as getSlackClient, Wt as getConversationStore, Z as findUserByEmail, Zt as locationFromRow, _ as deleteWorkspace,
|
|
3
|
+
import { $ as resolveViewerUser, $t as parseSessionSource, Ct as conversationArchivedForEmail, D as SANDBOX_RUNTIME, Dt as conversationNotArchivedForEmail, Et as conversationHasParticipantUser, Ft as listConversationAnnotations, Gt as getDb, It as listConversationAnnotationsById, J as withSlackRetries, Kt as getSqlExecutor, Mt as readConversationEventPage, Nt as buildSentryConversationUrl, Ot as conversationNotArchivedForUser, S as WorkspaceValidationError, St as conversationArchiveTimes, Tt as conversationHasParticipantEmail, U as getSlackClient, Wt as getConversationStore, Z as findUserByEmail, Zt as locationFromRow, _ as deleteWorkspace, an as resolveRootConversationId, b as listWorkspaces, bt as createPluginLogger, et as updateViewerDisplayName, g as createWorkspace, in as hasAgentTurnUsage, j as workspaceRepoCheckoutPath, jt as readLatestConversationBrief, kt as viewerConversationMembership, rn as agentTurnUsageSchema, u as getPlugins, v as getWorkspace, wt as conversationArchivedForUser, x as updateWorkspace, xt as readConversationAccessFromSql } from "./agent-hooks-B2Yt2b88.js";
|
|
4
4
|
import { n as juniorDestinations } from "./destinations-BeBiJeEM.js";
|
|
5
|
-
import { C as
|
|
6
|
-
import { D as createConversationBodySchema, O as createConversationMessageBodySchema, T as conversationStatsReportSchema, _ as conversationParamsSchema, a as cancelConversationPendingMessagesBodySchema, c as conversationAttachmentParamsSchema, d as conversationDetailReportSchema, g as conversationFeedSchema, h as conversationFeedQuerySchema, i as archiveConversationResponseSchema, m as conversationEventsQuerySchema, o as cancelConversationPendingMessagesResponseSchema, p as conversationEventPageSchema, r as archiveConversationBodySchema, t as acceptedConversationMessageSchema, u as conversationDetailQuerySchema, x as conversationPendingMessagesReportSchema } from "./conversation-
|
|
7
|
-
import {
|
|
8
|
-
import { n as hash, t as create } from "./profile-
|
|
9
|
-
import { A as eventAutomationTriggerAvailable, F as effectiveTaskOutcomes, G as listDeletedEventAutomationsCreatedBy, H as eventAutomationBelongsToUser, J as listPublicEventAutomationsForTeams, K as listEventAutomationsCreatedBy, Tt as getConversation, V as deleteEventAutomation, W as getEventAutomation, X as getEventCatalog, _ as parseScheduledAutomationRow, c as parseSlackThreadId, ht as cancelHumanFacingPendingMessages, i as readLiveAttachment, m as listPublicScheduledAutomationsForTeams, n as readStats, p as isListedScheduledAutomation, v as readScheduledAutomation, y as saveScheduledAutomation } from "./stats-
|
|
10
|
-
import { t as getCachedSnapshot } from "./resolve-
|
|
5
|
+
import { C as juniorCodeRepositories, D as juniorIdentities, E as juniorConversations, O as juniorUsers, S as juniorCodeChanges, T as conversationReadColumns, b as juniorApiTokens, g as juniorConversationBriefs, m as juniorConversationParticipants, o as juniorSchedulerTasks, v as juniorConversationMetrics, y as juniorConversationEvents } from "./executor-CaVeGYeA.js";
|
|
6
|
+
import { D as createConversationBodySchema, O as createConversationMessageBodySchema, T as conversationStatsReportSchema, _ as conversationParamsSchema, a as cancelConversationPendingMessagesBodySchema, c as conversationAttachmentParamsSchema, d as conversationDetailReportSchema, g as conversationFeedSchema, h as conversationFeedQuerySchema, i as archiveConversationResponseSchema, m as conversationEventsQuerySchema, o as cancelConversationPendingMessagesResponseSchema, p as conversationEventPageSchema, r as archiveConversationBodySchema, t as acceptedConversationMessageSchema, u as conversationDetailQuerySchema, x as conversationPendingMessagesReportSchema } from "./conversation-CRWntH-A.js";
|
|
7
|
+
import { t as fallbackShortTitle } from "./short-title-CxQHLU3_.js";
|
|
8
|
+
import { n as hash, t as create } from "./profile-BcZ6EBQ4.js";
|
|
9
|
+
import { A as eventAutomationTriggerAvailable, F as effectiveTaskOutcomes, G as listDeletedEventAutomationsCreatedBy, H as eventAutomationBelongsToUser, J as listPublicEventAutomationsForTeams, K as listEventAutomationsCreatedBy, Tt as getConversation, V as deleteEventAutomation, W as getEventAutomation, X as getEventCatalog, _ as parseScheduledAutomationRow, c as parseSlackThreadId, ht as cancelHumanFacingPendingMessages, i as readLiveAttachment, m as listPublicScheduledAutomationsForTeams, n as readStats, p as isListedScheduledAutomation, v as readScheduledAutomation, y as saveScheduledAutomation } from "./stats-D5OWazLs.js";
|
|
10
|
+
import { t as getCachedSnapshot } from "./resolve-BgAZ4KxF.js";
|
|
11
11
|
import { t as getVercelConversationWorkQueue } from "./vercel-queue-DIkVcfK4.js";
|
|
12
12
|
import { c as runtimeInfoReportSchema, n as pluginOperationalReportFeedSchema, s as pluginsSchema, t as healthReportSchema, u as skillReportsSchema } from "./reporting-schema-DosTN__Q.js";
|
|
13
|
-
import { a as webActorFromEmail, c as formatSlackConversationRedactedLabel, d as resolveSlackConversationContextFromThreadId, f as lookupSlackUser, g as readHealthReport, m as createVercelAttachmentStorage, p as legacyWebMailboxMetadataSchema, r as createAndEnqueueConversation, t as appendAndEnqueueWebMessage } from "./web-input-
|
|
14
|
-
import { a as readAutomationExecutionStatusDays, c as readAutomationExecutions, d as conversationActiveDaysColumn, f as conversationAggregateColumns, i as readAutomationExecutionHours, l as readAutomationRuns, n as readAutomationExecutionByConversationId, o as readAutomationExecutionStatusHours, p as conversationRangeColumns, r as readAutomationExecutionDays, s as readAutomationExecutionSummaries, t as emptyAutomationRunWindows } from "./execution-stats-
|
|
15
|
-
import { r as getWebAuthorization } from "./web-authorization-
|
|
16
|
-
import { $ as sumUtcHoursIntoSixHours, A as actorProfileReportSchema, C as createPersonalTokenBodySchema, D as personalTokenParamsSchema, F as locationDirectoryReportSchema, G as codePersonReportSchema, I as locationParamsSchema, J as HOUR_MS$1, L as activityDays$1, M as personalSpendReportSchema, O as revokePersonalTokenResponseSchema, P as locationDetailReportSchema, Q as startOfUtcHour, R as activityHours$1, T as personalTokenListSchema, W as codeOverviewReportSchema, X as fillUtcHours, Y as fillUtcDays, Z as fillUtcSixHours, _ as automationRunListSchema, a as workspaceBodySchema, at as apiErrorSchema, et as trailingUtcDayWindow, g as automationParamsSchema, h as automationListSchema, i as deleteWorkspaceResponseSchema, it as utcHourKey, j as personParamsSchema, k as actorDirectoryReportSchema, l as workspaceSchema, m as automationListQuerySchema, n as statsReportSchema, nt as trailingUtcSixHourWindow, o as workspaceListSchema, q as DAY_MS$1, rt as utcDayKey, s as workspaceParamsSchema, tt as trailingUtcHourWindow, u as automationExecutionListSchema, w as createdPersonalTokenSchema, z as activitySixHours$1 } from "./schema-
|
|
13
|
+
import { a as webActorFromEmail, c as formatSlackConversationRedactedLabel, d as resolveSlackConversationContextFromThreadId, f as lookupSlackUser, g as readHealthReport, m as createVercelAttachmentStorage, p as legacyWebMailboxMetadataSchema, r as createAndEnqueueConversation, t as appendAndEnqueueWebMessage } from "./web-input-FJ7NNJDx.js";
|
|
14
|
+
import { a as readAutomationExecutionStatusDays, c as readAutomationExecutions, d as conversationActiveDaysColumn, f as conversationAggregateColumns, i as readAutomationExecutionHours, l as readAutomationRuns, n as readAutomationExecutionByConversationId, o as readAutomationExecutionStatusHours, p as conversationRangeColumns, r as readAutomationExecutionDays, s as readAutomationExecutionSummaries, t as emptyAutomationRunWindows } from "./execution-stats-CoDjBQbE.js";
|
|
15
|
+
import { r as getWebAuthorization } from "./web-authorization-BXrGezGm.js";
|
|
16
|
+
import { $ as sumUtcHoursIntoSixHours, A as actorProfileReportSchema, C as createPersonalTokenBodySchema, D as personalTokenParamsSchema, F as locationDirectoryReportSchema, G as codePersonReportSchema, I as locationParamsSchema, J as HOUR_MS$1, L as activityDays$1, M as personalSpendReportSchema, O as revokePersonalTokenResponseSchema, P as locationDetailReportSchema, Q as startOfUtcHour, R as activityHours$1, T as personalTokenListSchema, W as codeOverviewReportSchema, X as fillUtcHours, Y as fillUtcDays, Z as fillUtcSixHours, _ as automationRunListSchema, a as workspaceBodySchema, at as apiErrorSchema, et as trailingUtcDayWindow, g as automationParamsSchema, h as automationListSchema, i as deleteWorkspaceResponseSchema, it as utcHourKey, j as personParamsSchema, k as actorDirectoryReportSchema, l as workspaceSchema, m as automationListQuerySchema, n as statsReportSchema, nt as trailingUtcSixHourWindow, o as workspaceListSchema, q as DAY_MS$1, rt as utcDayKey, s as workspaceParamsSchema, tt as trailingUtcHourWindow, u as automationExecutionListSchema, w as createdPersonalTokenSchema, z as activitySixHours$1 } from "./schema-xHUgeh46.js";
|
|
17
17
|
import { Hono } from "hono";
|
|
18
18
|
import path from "node:path";
|
|
19
19
|
import { z } from "zod";
|
|
@@ -1851,6 +1851,17 @@ async function requireConversationPendingMessages(conversationId, options = {})
|
|
|
1851
1851
|
return report;
|
|
1852
1852
|
}
|
|
1853
1853
|
//#endregion
|
|
1854
|
+
//#region src/api/conversations/metric-buckets.ts
|
|
1855
|
+
/** Sum all Conversation metrics into UTC day or hour buckets. */
|
|
1856
|
+
async function readConversationMetricBuckets(db, options) {
|
|
1857
|
+
const date = options.bucket === "day" ? sql`to_char(${juniorConversationMetrics.occurredAt} at time zone 'UTC', 'YYYY-MM-DD')` : sql`to_char(${juniorConversationMetrics.occurredAt} at time zone 'UTC', 'YYYY-MM-DD"T"HH24')`;
|
|
1858
|
+
return await db.select({
|
|
1859
|
+
date,
|
|
1860
|
+
metric: juniorConversationMetrics.metric,
|
|
1861
|
+
value: sql`sum(${juniorConversationMetrics.value})::double precision`
|
|
1862
|
+
}).from(juniorConversationMetrics).where(and(gte(juniorConversationMetrics.occurredAt, options.start), lte(juniorConversationMetrics.occurredAt, options.end))).groupBy(date, juniorConversationMetrics.metric).orderBy(asc(date), asc(juniorConversationMetrics.metric));
|
|
1863
|
+
}
|
|
1864
|
+
//#endregion
|
|
1854
1865
|
//#region src/api/conversations/stats.query.ts
|
|
1855
1866
|
const treeConversation$1 = alias(juniorConversations, "stats_tree_conversation");
|
|
1856
1867
|
const treeAggregateColumns$1 = conversationAggregateColumns({
|
|
@@ -1913,6 +1924,34 @@ function statsWindow(nowMs) {
|
|
|
1913
1924
|
};
|
|
1914
1925
|
}
|
|
1915
1926
|
const HOUR_MS = 36e5;
|
|
1927
|
+
function applyMetricBuckets(rows, metrics) {
|
|
1928
|
+
const byDate = new Map(rows.map((row) => [row.date, {
|
|
1929
|
+
...row,
|
|
1930
|
+
cachedInputTokens: null,
|
|
1931
|
+
costUsd: null,
|
|
1932
|
+
durationMs: 0,
|
|
1933
|
+
inputTokens: null,
|
|
1934
|
+
tokens: null
|
|
1935
|
+
}]));
|
|
1936
|
+
for (const metric of metrics) {
|
|
1937
|
+
const row = byDate.get(metric.date) ?? {
|
|
1938
|
+
cachedInputTokens: null,
|
|
1939
|
+
conversations: 0,
|
|
1940
|
+
costUsd: null,
|
|
1941
|
+
date: metric.date,
|
|
1942
|
+
durationMs: 0,
|
|
1943
|
+
inputTokens: null,
|
|
1944
|
+
tokens: null
|
|
1945
|
+
};
|
|
1946
|
+
if (metric.metric === "cached_input_tokens") row.cachedInputTokens = metric.value;
|
|
1947
|
+
else if (metric.metric === "cost_usd") row.costUsd = metric.value;
|
|
1948
|
+
else if (metric.metric === "duration_ms") row.durationMs = metric.value;
|
|
1949
|
+
else if (metric.metric === "input_tokens") row.inputTokens = metric.value;
|
|
1950
|
+
else if (metric.metric === "total_tokens") row.tokens = metric.value;
|
|
1951
|
+
byDate.set(metric.date, row);
|
|
1952
|
+
}
|
|
1953
|
+
return [...byDate.values()];
|
|
1954
|
+
}
|
|
1916
1955
|
function metricPoint(date, row) {
|
|
1917
1956
|
return {
|
|
1918
1957
|
conversations: row?.conversations ?? 0,
|
|
@@ -2039,7 +2078,7 @@ async function aggregateStats(db, start, end) {
|
|
|
2039
2078
|
${juniorConversations.lastActivityAt} AT TIME ZONE 'UTC',
|
|
2040
2079
|
'YYYY-MM-DD"T"HH24'
|
|
2041
2080
|
)`;
|
|
2042
|
-
const [totalsRows, actorRows, locationRows, metricRows, metricHourRows] = await Promise.all([
|
|
2081
|
+
const [totalsRows, actorRows, locationRows, metricRows, metricHourRows, dayMetrics, hourMetrics] = await Promise.all([
|
|
2043
2082
|
db.select(treeAggregateColumns$1).from(juniorConversations).innerJoin(treeConversation$1, eq(treeConversation$1.rootConversationId, juniorConversations.conversationId)).where(where),
|
|
2044
2083
|
db.select({
|
|
2045
2084
|
identityDisplayName: juniorIdentities.displayName,
|
|
@@ -2060,29 +2099,29 @@ async function aggregateStats(db, start, end) {
|
|
|
2060
2099
|
...treeAggregateColumns$1
|
|
2061
2100
|
}).from(juniorConversations).innerJoin(treeConversation$1, eq(treeConversation$1.rootConversationId, juniorConversations.conversationId)).leftJoin(juniorDestinations, eq(juniorDestinations.id, juniorConversations.destinationId)).where(where).groupBy(juniorConversations.channelName, juniorConversations.source, juniorDestinations.displayName, juniorDestinations.kind, juniorDestinations.provider, juniorDestinations.visibility),
|
|
2062
2101
|
db.select({
|
|
2063
|
-
cachedInputTokens: treeAggregateColumns$1.cachedInputTokens,
|
|
2064
2102
|
conversations: treeAggregateColumns$1.conversations,
|
|
2065
|
-
|
|
2066
|
-
date: activityDate,
|
|
2067
|
-
durationMs: treeAggregateColumns$1.durationMs,
|
|
2068
|
-
inputTokens: treeAggregateColumns$1.inputTokens,
|
|
2069
|
-
tokens: treeAggregateColumns$1.tokens
|
|
2103
|
+
date: activityDate
|
|
2070
2104
|
}).from(juniorConversations).innerJoin(treeConversation$1, eq(treeConversation$1.rootConversationId, juniorConversations.conversationId)).where(where).groupBy(activityDate),
|
|
2071
2105
|
db.select({
|
|
2072
|
-
cachedInputTokens: treeAggregateColumns$1.cachedInputTokens,
|
|
2073
2106
|
conversations: treeAggregateColumns$1.conversations,
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2107
|
+
date: activityHour
|
|
2108
|
+
}).from(juniorConversations).innerJoin(treeConversation$1, eq(treeConversation$1.rootConversationId, juniorConversations.conversationId)).where(where).groupBy(activityHour),
|
|
2109
|
+
readConversationMetricBuckets(db, {
|
|
2110
|
+
bucket: "day",
|
|
2111
|
+
start,
|
|
2112
|
+
end
|
|
2113
|
+
}),
|
|
2114
|
+
readConversationMetricBuckets(db, {
|
|
2115
|
+
bucket: "hour",
|
|
2116
|
+
start,
|
|
2117
|
+
end
|
|
2118
|
+
})
|
|
2080
2119
|
]);
|
|
2081
2120
|
return {
|
|
2082
2121
|
actorRows,
|
|
2083
2122
|
locationRows,
|
|
2084
|
-
metricHourRows,
|
|
2085
|
-
metricRows,
|
|
2123
|
+
metricHourRows: applyMetricBuckets(metricHourRows, hourMetrics),
|
|
2124
|
+
metricRows: applyMetricBuckets(metricRows, dayMetrics),
|
|
2086
2125
|
totals: totalsRows[0]
|
|
2087
2126
|
};
|
|
2088
2127
|
}
|
|
@@ -3409,7 +3448,7 @@ async function readPeoplePluginReports(args) {
|
|
|
3409
3448
|
reports: [],
|
|
3410
3449
|
source: "plugins"
|
|
3411
3450
|
});
|
|
3412
|
-
const { getPluginProfileReports } = await import("./agent-hooks-
|
|
3451
|
+
const { getPluginProfileReports } = await import("./agent-hooks-B2Yt2b88.js").then((n) => n.t);
|
|
3413
3452
|
return pluginOperationalReportFeedSchema.parse({
|
|
3414
3453
|
generatedAt: new Date(nowMs).toISOString(),
|
|
3415
3454
|
reports: await getPluginProfileReports({
|
|
@@ -4018,7 +4057,7 @@ function readDescriptionText(home) {
|
|
|
4018
4057
|
}
|
|
4019
4058
|
/** Read discovered skill names for authenticated runtime diagnostics. */
|
|
4020
4059
|
async function readSkillReports() {
|
|
4021
|
-
const { discoverSkills } = await import("./skills-
|
|
4060
|
+
const { discoverSkills } = await import("./skills-DlrAH1on.js").then((n) => n.o);
|
|
4022
4061
|
const skills = await discoverSkills();
|
|
4023
4062
|
return skillReportsSchema.parse(skills.map((skill) => ({
|
|
4024
4063
|
name: skill.name,
|
|
@@ -4027,7 +4066,7 @@ async function readSkillReports() {
|
|
|
4027
4066
|
}
|
|
4028
4067
|
/** Read safe configured plugin metadata for authenticated runtime diagnostics. */
|
|
4029
4068
|
async function readPlugins() {
|
|
4030
|
-
const { pluginCatalogRuntime } = await import("./catalog-runtime-
|
|
4069
|
+
const { pluginCatalogRuntime } = await import("./catalog-runtime-BvN_lNVo.js").then((n) => n.t);
|
|
4031
4070
|
return pluginsSchema.parse(pluginCatalogRuntime.getProviders().map((plugin) => ({
|
|
4032
4071
|
configKeys: plugin.manifest.configKeys ?? [],
|
|
4033
4072
|
description: plugin.manifest.description,
|
|
@@ -4039,7 +4078,7 @@ async function readPlugins() {
|
|
|
4039
4078
|
async function readRuntimeInfoReport() {
|
|
4040
4079
|
const [{ homeDir }, { pluginCatalogRuntime }, plugins, skills] = await Promise.all([
|
|
4041
4080
|
import("./package-discovery-7a9YqLhE.js").then((n) => n.r),
|
|
4042
|
-
import("./catalog-runtime-
|
|
4081
|
+
import("./catalog-runtime-BvN_lNVo.js").then((n) => n.t),
|
|
4043
4082
|
readPlugins(),
|
|
4044
4083
|
readSkillReports()
|
|
4045
4084
|
]);
|
|
@@ -4056,7 +4095,7 @@ async function readRuntimeInfoReport() {
|
|
|
4056
4095
|
/** Read sanitized operational summaries contributed by plugins. */
|
|
4057
4096
|
async function readPluginOperationalReportFeed() {
|
|
4058
4097
|
const nowMs = Date.now();
|
|
4059
|
-
const { getPluginOperationalReports } = await import("./agent-hooks-
|
|
4098
|
+
const { getPluginOperationalReports } = await import("./agent-hooks-B2Yt2b88.js").then((n) => n.t);
|
|
4060
4099
|
return pluginOperationalReportFeedSchema.parse({
|
|
4061
4100
|
source: "plugins",
|
|
4062
4101
|
generatedAt: new Date(nowMs).toISOString(),
|
package/dist/app.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as ModelProfileInput, n as JuniorDashboardOptions, r as createApp, t as JuniorAppOptions } from "./app-
|
|
1
|
+
import { i as ModelProfileInput, n as JuniorDashboardOptions, r as createApp, t as JuniorAppOptions } from "./app-D4nNdzPG.js";
|
|
2
2
|
import { i as defineJuniorPlugins, n as JuniorPluginSet, r as JuniorPluginSetOptions, t as JuniorPluginInput } from "./plugins-BI9A1vKA.js";
|
|
3
3
|
import { t as JUNIOR_VERSION } from "./version-CnXZ614E.js";
|
|
4
4
|
export { JUNIOR_VERSION, JuniorAppOptions, JuniorDashboardOptions, type JuniorPluginInput, type JuniorPluginSet, type JuniorPluginSetOptions, type ModelProfileInput, createApp, defineJuniorPlugins };
|
package/dist/app.js
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { $ as AuthorizationFlowDisabledError, B as recordFinishedTurnForAutomatedLimit, C as renderBlockText, D as getNextRunAtMs, E as scheduledAutomationRunAttributes, F as ingestEvent, G as clearSandboxEgressSignals, H as normalizeSandboxEgressTracePropagationDomains, I as EVENT_WAIT_MS, J as parseSandboxEgressCredentialToken, K as consumeSandboxEgressAuthRequiredSignal, L as isEventMailboxMetadata, P as processWorkspaceSnapshotJob, Q as isVisionImageMediaType, R as renderTaskInput, S as renderAttachmentText, T as logScheduledAutomationRunSkipped, U as shouldPropagateSandboxEgressTrace, V as resolveSandboxEgressProviderForHost, W as SANDBOX_EGRESS_PROXY_PATH, X as createUserTokenStore, Z as buildSteeringPiMessage, _ as readPublicArtifact, b as readAttachmentVisionSummary, c as deleteMcpStoredOAuthCredentials, et as shouldEmitDevAgentTrace, f as PluginCredentialFailureError, g as publicArtifactHeaders, m as latestReportedProgress, n as createContextCompactor, nt as setConfigDefaults, o as deleteMcpAuthSessionsForUserProvider, q as consumeSandboxEgressPermissionDeniedSignal, r as executeCredentialedEgressRequest, s as deleteMcpServerSessionId, t as executeAgentRun, tt as getConfigDefaults, v as unpublishedArtifactHeaders, w as listThreadReplies, x as recordSlackAttachment, z as maybePostAutomatedTurnLimitNotice } from "./agent-
|
|
2
|
-
import { b as isProviderRetryError, i as completeText, m as escapeXml, r as completeObject } from "./client-
|
|
3
|
-
import { A as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, C as withSpan, D as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, F as isRecord$1, I as toOptionalNumber, L as toOptionalString, S as withLogContext, _ as setSpanAttributes, d as logInfo, f as logWarn, g as setSentryUser, l as logError, n as createChatSdkLogger, o as getActiveTraceId, r as createRequestContext, t as buildTurnFailureResponse, u as logException, v as setSpanStatus, x as withContext, y as setTags } from "./logging-
|
|
1
|
+
import { $ as AuthorizationFlowDisabledError, B as recordFinishedTurnForAutomatedLimit, C as renderBlockText, D as getNextRunAtMs, E as scheduledAutomationRunAttributes, F as ingestEvent, G as clearSandboxEgressSignals, H as normalizeSandboxEgressTracePropagationDomains, I as EVENT_WAIT_MS, J as parseSandboxEgressCredentialToken, K as consumeSandboxEgressAuthRequiredSignal, L as isEventMailboxMetadata, P as processWorkspaceSnapshotJob, Q as isVisionImageMediaType, R as renderTaskInput, S as renderAttachmentText, T as logScheduledAutomationRunSkipped, U as shouldPropagateSandboxEgressTrace, V as resolveSandboxEgressProviderForHost, W as SANDBOX_EGRESS_PROXY_PATH, X as createUserTokenStore, Z as buildSteeringPiMessage, _ as readPublicArtifact, b as readAttachmentVisionSummary, c as deleteMcpStoredOAuthCredentials, et as shouldEmitDevAgentTrace, f as PluginCredentialFailureError, g as publicArtifactHeaders, m as latestReportedProgress, n as createContextCompactor, nt as setConfigDefaults, o as deleteMcpAuthSessionsForUserProvider, q as consumeSandboxEgressPermissionDeniedSignal, r as executeCredentialedEgressRequest, s as deleteMcpServerSessionId, t as executeAgentRun, tt as getConfigDefaults, v as unpublishedArtifactHeaders, w as listThreadReplies, x as recordSlackAttachment, z as maybePostAutomatedTurnLimitNotice } from "./agent-Cgc7jAIH.js";
|
|
2
|
+
import { b as isProviderRetryError, i as completeText, m as escapeXml, r as completeObject } from "./client-C1KycWNq.js";
|
|
3
|
+
import { A as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, C as withSpan, D as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, F as isRecord$1, I as toOptionalNumber, L as toOptionalString, S as withLogContext, _ as setSpanAttributes, d as logInfo, f as logWarn, g as setSentryUser, l as logError, n as createChatSdkLogger, o as getActiveTraceId, r as createRequestContext, t as buildTurnFailureResponse, u as logException, v as setSpanStatus, x as withContext, y as setTags } from "./logging-B5-PLvDo.js";
|
|
4
4
|
import { r as continueTrace } from "./sentry-CgWZM_kV.js";
|
|
5
|
-
import { t as JUNIOR_VERSION } from "./version-
|
|
6
|
-
import { a as getChatConfig, c as getSlackClientId, d as getSlackSigningSecret, f as setBotModelConfig, i as configureFunctionMaxDurationSeconds, l as getSlackClientSecret, m as setSlackReactionConfig, n as botConfig, p as setProfiles, s as getSlackBotToken, u as getSlackReactionConfig } from "./config-
|
|
5
|
+
import { t as JUNIOR_VERSION } from "./version-BE7Zf9Wx.js";
|
|
6
|
+
import { a as getChatConfig, c as getSlackClientId, d as getSlackSigningSecret, f as setBotModelConfig, i as configureFunctionMaxDurationSeconds, l as getSlackClientSecret, m as setSlackReactionConfig, n as botConfig, p as setProfiles, s as getSlackBotToken, u as getSlackReactionConfig } from "./config-C0-PnQoF.js";
|
|
7
7
|
import { a as modelIdForProfile, n as defaultModelId } from "./model-profile-CZmVoGdX.js";
|
|
8
8
|
import { _ as parseSlackMessageTs, a as createActor, c as isActorUserId, o as createSlackActor, p as parseSlackChannelId, s as createSlackResumeActor, t as credentialContextForActor, u as parseActorUserId } from "./context-Bplcgypl.js";
|
|
9
|
-
import { B as downloadPrivateSlackFile, F as bindSlackDirectCredentialSubject, G as isDmChannel, Gt as getDb, Ht as getConversationEventStore, I as verifyEventAutomationCredentialSubject, Jt as withConversationEventLock, K as normalizeSlackConversationId, Kt as getSqlExecutor, L as verifyScheduledAutomationCredentialSubject, N as bindEventAutomationCredentialSubject, P as bindScheduledAutomationCredentialSubject, Pt as resolveRootVisibility, R as verifySlackDirectCredentialSubject, U as getSlackClient, Wt as getConversationStore, X as runWithWorkspaceTeamId, Xt as withConversationMutationLock, Y as getWorkspaceTeamId, _t as createPluginState, a as getPluginRoutes, bt as createPluginLogger, ct as collectEventMatchKeys, d as setPlugins, dt as findMatchingWatches, f as validatePlugins, gt as setDashboardConversationLinkOptions, h as setBriefsConfig, i as getPluginApiRoutes,
|
|
9
|
+
import { B as downloadPrivateSlackFile, F as bindSlackDirectCredentialSubject, G as isDmChannel, Gt as getDb, Ht as getConversationEventStore, I as verifyEventAutomationCredentialSubject, Jt as withConversationEventLock, K as normalizeSlackConversationId, Kt as getSqlExecutor, L as verifyScheduledAutomationCredentialSubject, N as bindEventAutomationCredentialSubject, P as bindScheduledAutomationCredentialSubject, Pt as resolveRootVisibility, R as verifySlackDirectCredentialSubject, U as getSlackClient, Wt as getConversationStore, X as runWithWorkspaceTeamId, Xt as withConversationMutationLock, Y as getWorkspaceTeamId, _t as createPluginState, a as getPluginRoutes, bt as createPluginLogger, ct as collectEventMatchKeys, d as setPlugins, dn as requireSlackDestination, dt as findMatchingWatches, f as validatePlugins, gt as setDashboardConversationLinkOptions, h as setBriefsConfig, i as getPluginApiRoutes, ln as createSlackDestination, on as deleteProviderIdentityForSlackUser, ot as cancelSubscriptions, pt as JUNIOR_THREAD_STATE_TTL_MS, q as runWithSlackInstallationToken, u as getPlugins, xt as readConversationAccessFromSql, z as SlackActionError } from "./agent-hooks-B2Yt2b88.js";
|
|
10
10
|
import { n as juniorDestinations } from "./destinations-BeBiJeEM.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
14
|
-
import { $ as resolveConversationTitle, F as loadProjection, G as recordSubscribedReplyRoute, J as appendConversationMessages, M as commitMessages, P as loadConversationProjection, Q as persistConversationMessageSummaries, X as persistConversationMessages, Y as hydrateConversationMessages, Z as projectConversationMessages, a as completeTurnRecord, at as isHumanConversationMessage, c as getTurnRecordForResume, ct as recordDeliveredAssistantMessage, d as persistWithRetry, dt as estimateTextTokens, et as appendThreadContextMessages, i as abandonTurnRecord, it as getConversationMessageSlackTs, j as commitAcceptedReply, k as trimTrailingAssistantMessages, l as listTurnSummaries, lt as turnHasReply, m as buildTurnErrorResponse, n as loadTurnCheckpoint, nt as createConversationMemoryService, o as failTurnRecord, ot as markConversationMessage, r as saveTurnCheckpoint, rt as estimateConversationContextTokens, s as getTurnRecord, st as normalizeConversationText, tt as buildConversationContext, u as recordTurnSummary, ut as upsertConversationMessage } from "./checkpoint-
|
|
15
|
-
import { E as acquireActiveLock, O as withActiveLock, T as MUTATION_LOCK_TTL_MS$1, k as withLock$1, w as getStateAdapter } from "./profile-
|
|
16
|
-
import { Bt as hasRunnableConversationWork$1, Dt as hasRunnableConversationWork, Et as getConversationWorkState, F as effectiveTaskOutcomes, Ht as isInvalidConversationRecordError, It as stopConversationWork, Kt as buildDeterministicAssistantMessageId, Mt as removeActiveConversation, Ot as listActiveConversationIds, Pt as requestConversationWork, Rt as CONVERSATION_WORK_STALE_ENQUEUE_MS, S as withScheduledAutomationLock, Tt as getConversation, U as findMatchingEventAutomations, X as getEventCatalog, a as requestAttachmentDeletion, b as saveScheduledAutomationInLock, c as parseSlackThreadId, g as listScheduledAutomationsForTeam, h as listScheduledAutomations, o as storeAttachment, pt as appendAndEnqueueInboundMessage, qt as buildDeterministicTurnId, r as collectAttachmentGarbage, tt as eventGuidance, v as readScheduledAutomation, vt as clearExpiredConversationLease, w as scheduledRunSchema, wt as ensureConversationWake, x as scheduledRunId, z as collectEventAutomationMatchKeys } from "./stats-
|
|
17
|
-
import { S as startActiveTurn, _ as isTurnInputCommitLostError, b as markTurnCompleted, d as ConversationTurnBoundaryError, f as CooperativeTurnYieldError, g as isCooperativeTurnYieldError, h as getConversationTurnBoundaryError, m as TurnInputDeferredError, p as TurnInputCommitLostError, r as clearPendingAuth, s as getAssistantReplyText, v as isTurnInputDeferredError, x as markTurnFailed, y as markTurnClosed } from "./pending-auth-
|
|
18
|
-
import { h as postSlackMessage, i as formatProviderLabel, s as startOAuthFlow, t as createAgentRunner, v as RetryableDeliveryError } from "./agent-runner-
|
|
19
|
-
import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-
|
|
20
|
-
import { f as setSandboxResourceConfig, u as getSandboxResourceConfig } from "./resolve-
|
|
11
|
+
import { E as juniorConversations, a as juniorSchedulerRuns, f as juniorAgentBindings, g as juniorConversationBriefs, o as juniorSchedulerTasks, p as juniorAgentInvocations, y as juniorConversationEvents } from "./executor-CaVeGYeA.js";
|
|
12
|
+
import { W as instructionProvenanceFor } from "./conversation-CRWntH-A.js";
|
|
13
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-BvN_lNVo.js";
|
|
14
|
+
import { $ as resolveConversationTitle, F as loadProjection, G as recordSubscribedReplyRoute, J as appendConversationMessages, M as commitMessages, P as loadConversationProjection, Q as persistConversationMessageSummaries, X as persistConversationMessages, Y as hydrateConversationMessages, Z as projectConversationMessages, a as completeTurnRecord, at as isHumanConversationMessage, c as getTurnRecordForResume, ct as recordDeliveredAssistantMessage, d as persistWithRetry, dt as estimateTextTokens, et as appendThreadContextMessages, i as abandonTurnRecord, it as getConversationMessageSlackTs, j as commitAcceptedReply, k as trimTrailingAssistantMessages, l as listTurnSummaries, lt as turnHasReply, m as buildTurnErrorResponse, n as loadTurnCheckpoint, nt as createConversationMemoryService, o as failTurnRecord, ot as markConversationMessage, r as saveTurnCheckpoint, rt as estimateConversationContextTokens, s as getTurnRecord, st as normalizeConversationText, tt as buildConversationContext, u as recordTurnSummary, ut as upsertConversationMessage } from "./checkpoint-EAQ5Xerb.js";
|
|
15
|
+
import { E as acquireActiveLock, O as withActiveLock, T as MUTATION_LOCK_TTL_MS$1, k as withLock$1, w as getStateAdapter } from "./profile-BcZ6EBQ4.js";
|
|
16
|
+
import { Bt as hasRunnableConversationWork$1, Dt as hasRunnableConversationWork, Et as getConversationWorkState, F as effectiveTaskOutcomes, Ht as isInvalidConversationRecordError, It as stopConversationWork, Kt as buildDeterministicAssistantMessageId, Mt as removeActiveConversation, Ot as listActiveConversationIds, Pt as requestConversationWork, Rt as CONVERSATION_WORK_STALE_ENQUEUE_MS, S as withScheduledAutomationLock, Tt as getConversation, U as findMatchingEventAutomations, X as getEventCatalog, a as requestAttachmentDeletion, b as saveScheduledAutomationInLock, c as parseSlackThreadId, g as listScheduledAutomationsForTeam, h as listScheduledAutomations, o as storeAttachment, pt as appendAndEnqueueInboundMessage, qt as buildDeterministicTurnId, r as collectAttachmentGarbage, tt as eventGuidance, v as readScheduledAutomation, vt as clearExpiredConversationLease, w as scheduledRunSchema, wt as ensureConversationWake, x as scheduledRunId, z as collectEventAutomationMatchKeys } from "./stats-D5OWazLs.js";
|
|
17
|
+
import { S as startActiveTurn, _ as isTurnInputCommitLostError, b as markTurnCompleted, d as ConversationTurnBoundaryError, f as CooperativeTurnYieldError, g as isCooperativeTurnYieldError, h as getConversationTurnBoundaryError, m as TurnInputDeferredError, p as TurnInputCommitLostError, r as clearPendingAuth, s as getAssistantReplyText, v as isTurnInputDeferredError, x as markTurnFailed, y as markTurnClosed } from "./pending-auth-CDndLOLO.js";
|
|
18
|
+
import { h as postSlackMessage, i as formatProviderLabel, s as startOAuthFlow, t as createAgentRunner, v as RetryableDeliveryError } from "./agent-runner-CkNX-ynf.js";
|
|
19
|
+
import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-kRlibHYT.js";
|
|
20
|
+
import { f as setSandboxResourceConfig, u as getSandboxResourceConfig } from "./resolve-BgAZ4KxF.js";
|
|
21
21
|
import { l as conversationQueueMessageSchema, n as resolveConversationWorkQueueTopic, r as verifyConversationQueueMessage, t as getVercelConversationWorkQueue, u as isConversationQueueMessageRejectedError } from "./vercel-queue-DIkVcfK4.js";
|
|
22
|
-
import { a as getTurnRequestDeadline, i as verifyWorkspaceSnapshotJobMessage, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-
|
|
22
|
+
import { a as getTurnRequestDeadline, i as verifyWorkspaceSnapshotJobMessage, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-BhaNX9DL.js";
|
|
23
23
|
import { i as setExperimentalFeatures, n as getExperimentalFeatures, r as isExperimentalFeatureEnabled } from "./experimental-CIXf7Uye.js";
|
|
24
|
-
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "./validation-
|
|
24
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "./validation-sgYqCVwr.js";
|
|
25
25
|
import { a as pluginRuntimeRegistrationsFromPluginSet, n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "./plugins-egKWjgue.js";
|
|
26
|
-
import { a as webActorFromEmail, f as lookupSlackUser, h as GET$3, i as recordWebConversationActivity, l as resolveSlackChannelTypeFromMessage, m as createVercelAttachmentStorage, n as conversationTurnIdForMessage, o as resolveConversationDestination, p as legacyWebMailboxMetadataSchema, s as conversationVisibilityFromSlackChannelType, t as appendAndEnqueueWebMessage, u as resolveSlackConversationContext } from "./web-input-
|
|
27
|
-
import { u as recordAutomationExecution } from "./execution-stats-
|
|
28
|
-
import { _ as markDispatchCompleted, a as claimDispatchMailboxAppend, c as getDispatchConversationId, d as getDispatchTurnId, f as getPluginDispatchProjection, g as markDispatchBlocked, h as markDispatchAwaitingResume, i as resolveTurnSessionRouting, l as getDispatchInputMessageId, m as listPendingDispatchMailboxAppends, n as scheduleSessionCompletedPluginTasks, o as confirmDispatchMailboxAppend, p as isTerminalDispatchStatus, s as createOrGetDispatch, t as processPluginTask, u as getDispatchRecord, v as markDispatchFailed, y as markDispatchRunning } from "./task-runner-
|
|
29
|
-
import { i as resolveAgentInvocationId, o as listPendingAgentInvocationMailboxAppends, r as enqueueAgentInvocation, t as createAgentInvocationWorker } from "./work-
|
|
30
|
-
import { n as getTurnLifecycle, t as ConversationTurnLifecycleService } from "./turn-lifecycle-
|
|
31
|
-
import { n as executeTurn, t as AgentRunError } from "./turn-execution-
|
|
32
|
-
import { a as persistThreadState, i as persistThreadRuntimeState, n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState, t as getLocationConfigurationService } from "./thread-state-
|
|
33
|
-
import { a as requireTurnFailureEventId, d as buildDeliveredTurnStatePatch, i as getAgentTurnDiagnosticsAttributes, l as getTurnUserReplyAttachmentContext, n as persistAuthPauseTurnState, r as finalizeFailedTurnReplyWithEvent, s as getTurnUserMessage, t as completeAuthPauseTurn, u as getTurnUserSlackMessageTs } from "./auth-pause-state-
|
|
34
|
-
import { a as registerVercelPluginTaskDevConsumer, n as createVercelPluginTaskCallback, s as queueCallback } from "./task-queue-
|
|
35
|
-
import { C as isSlackTitlePermissionError, D as createSlackAdapterAssistantStatusSession, E as splitSlackReplyText, S as isRetryableSlackPostError, T as buildSlackOutputMessage, _ as getThreadId, a as GET$4, b as getSlackApiErrorCode, c as wakePausedTurn, d as shouldKeepProcessingReactionForToolInvocation, f as startProcessingReaction, g as getRunId, h as getMessageTs, i as publishAppHomeView, l as resumeSlackTurn, m as getChannelId, o as createPausedTurns, p as getAssistantThreadContext, r as GET$5, s as getPausedTurnRequest, t as receiveLocalOAuthCredential, u as buildAuthPauseResponse, v as getThreadTs, w as sendSlackReply, x as getSlackErrorObservabilityAttributes, y as stripLeadingBotMention } from "./credential-sync-
|
|
36
|
-
import { n as deleteWebAuthorization, t as createWebAuthorization } from "./web-authorization-
|
|
37
|
-
import { t as processConversationWork } from "./worker-
|
|
38
|
-
import { t as bindSpawnAgent } from "./spawn-
|
|
26
|
+
import { a as webActorFromEmail, f as lookupSlackUser, h as GET$3, i as recordWebConversationActivity, l as resolveSlackChannelTypeFromMessage, m as createVercelAttachmentStorage, n as conversationTurnIdForMessage, o as resolveConversationDestination, p as legacyWebMailboxMetadataSchema, s as conversationVisibilityFromSlackChannelType, t as appendAndEnqueueWebMessage, u as resolveSlackConversationContext } from "./web-input-FJ7NNJDx.js";
|
|
27
|
+
import { u as recordAutomationExecution } from "./execution-stats-CoDjBQbE.js";
|
|
28
|
+
import { _ as markDispatchCompleted, a as claimDispatchMailboxAppend, c as getDispatchConversationId, d as getDispatchTurnId, f as getPluginDispatchProjection, g as markDispatchBlocked, h as markDispatchAwaitingResume, i as resolveTurnSessionRouting, l as getDispatchInputMessageId, m as listPendingDispatchMailboxAppends, n as scheduleSessionCompletedPluginTasks, o as confirmDispatchMailboxAppend, p as isTerminalDispatchStatus, s as createOrGetDispatch, t as processPluginTask, u as getDispatchRecord, v as markDispatchFailed, y as markDispatchRunning } from "./task-runner-Mt_TGUBH.js";
|
|
29
|
+
import { i as resolveAgentInvocationId, o as listPendingAgentInvocationMailboxAppends, r as enqueueAgentInvocation, t as createAgentInvocationWorker } from "./work-DlYdbVfB.js";
|
|
30
|
+
import { n as getTurnLifecycle, t as ConversationTurnLifecycleService } from "./turn-lifecycle-xIZNwgaq.js";
|
|
31
|
+
import { n as executeTurn, t as AgentRunError } from "./turn-execution-Ruj9SSJU.js";
|
|
32
|
+
import { a as persistThreadState, i as persistThreadRuntimeState, n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState, t as getLocationConfigurationService } from "./thread-state-C81fvhJu.js";
|
|
33
|
+
import { a as requireTurnFailureEventId, d as buildDeliveredTurnStatePatch, i as getAgentTurnDiagnosticsAttributes, l as getTurnUserReplyAttachmentContext, n as persistAuthPauseTurnState, r as finalizeFailedTurnReplyWithEvent, s as getTurnUserMessage, t as completeAuthPauseTurn, u as getTurnUserSlackMessageTs } from "./auth-pause-state-BbcDkPac.js";
|
|
34
|
+
import { a as registerVercelPluginTaskDevConsumer, n as createVercelPluginTaskCallback, s as queueCallback } from "./task-queue-C-o2Q4O-.js";
|
|
35
|
+
import { C as isSlackTitlePermissionError, D as createSlackAdapterAssistantStatusSession, E as splitSlackReplyText, S as isRetryableSlackPostError, T as buildSlackOutputMessage, _ as getThreadId, a as GET$4, b as getSlackApiErrorCode, c as wakePausedTurn, d as shouldKeepProcessingReactionForToolInvocation, f as startProcessingReaction, g as getRunId, h as getMessageTs, i as publishAppHomeView, l as resumeSlackTurn, m as getChannelId, o as createPausedTurns, p as getAssistantThreadContext, r as GET$5, s as getPausedTurnRequest, t as receiveLocalOAuthCredential, u as buildAuthPauseResponse, v as getThreadTs, w as sendSlackReply, x as getSlackErrorObservabilityAttributes, y as stripLeadingBotMention } from "./credential-sync-CZz6Vk6X.js";
|
|
36
|
+
import { n as deleteWebAuthorization, t as createWebAuthorization } from "./web-authorization-BXrGezGm.js";
|
|
37
|
+
import { t as processConversationWork } from "./worker-BfxedsTU.js";
|
|
38
|
+
import { t as bindSpawnAgent } from "./spawn-BtMqHjwx.js";
|
|
39
39
|
import { createRequire } from "node:module";
|
|
40
40
|
import { pathToFileURL } from "node:url";
|
|
41
41
|
import { Hono } from "hono";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { _ as findProviderError, h as ProviderError, v as getProviderErrorAttributes, y as getProviderErrorUserMessage } from "./client-
|
|
2
|
-
import { t as buildTurnFailureResponse } from "./logging-
|
|
1
|
+
import { _ as findProviderError, h as ProviderError, v as getProviderErrorAttributes, y as getProviderErrorUserMessage } from "./client-C1KycWNq.js";
|
|
2
|
+
import { t as buildTurnFailureResponse } from "./logging-B5-PLvDo.js";
|
|
3
3
|
import { _ as parseSlackMessageTs } from "./context-Bplcgypl.js";
|
|
4
|
-
import { Y as hydrateConversationMessages, ot as markConversationMessage } from "./checkpoint-
|
|
5
|
-
import { qt as buildDeterministicTurnId } from "./stats-
|
|
6
|
-
import { b as markTurnCompleted, r as clearPendingAuth, y as markTurnClosed } from "./pending-auth-
|
|
7
|
-
import { o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-
|
|
4
|
+
import { Y as hydrateConversationMessages, ot as markConversationMessage } from "./checkpoint-EAQ5Xerb.js";
|
|
5
|
+
import { qt as buildDeterministicTurnId } from "./stats-D5OWazLs.js";
|
|
6
|
+
import { b as markTurnCompleted, r as clearPendingAuth, y as markTurnClosed } from "./pending-auth-CDndLOLO.js";
|
|
7
|
+
import { o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-C81fvhJu.js";
|
|
8
8
|
//#region src/chat/runtime/delivered-turn-state.ts
|
|
9
9
|
/** Build state after destination delivery or intentional no-reply completion. */
|
|
10
10
|
function buildDeliveredTurnStatePatch(args) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as completeObject } from "./client-
|
|
1
|
+
import { r as completeObject } from "./client-C1KycWNq.js";
|
|
2
2
|
import { n as defaultModelId } from "./model-profile-CZmVoGdX.js";
|
|
3
|
-
import { N as parseBriefInput, d as conversationDetailReportSchema, k as briefCodeChangeSchema, p as conversationEventPageSchema } from "./conversation-
|
|
4
|
-
import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-
|
|
3
|
+
import { N as parseBriefInput, d as conversationDetailReportSchema, k as briefCodeChangeSchema, p as conversationEventPageSchema } from "./conversation-CRWntH-A.js";
|
|
4
|
+
import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-kRlibHYT.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-C0-PnQoF.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-BIeo1ST6.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 { _ as setSpanAttributes, f as logWarn, o as getActiveTraceId, t as buildTurnFailureResponse, u as logException } from "./logging-
|
|
3
|
-
import { n as botConfig } from "./config-
|
|
1
|
+
import { i as completeText, m as escapeXml, o as resolveGatewayModel, p as unwrapCurrentInstruction } from "./client-C1KycWNq.js";
|
|
2
|
+
import { _ as setSpanAttributes, f as logWarn, o as getActiveTraceId, t as buildTurnFailureResponse, u as logException } from "./logging-B5-PLvDo.js";
|
|
3
|
+
import { n as botConfig } from "./config-C0-PnQoF.js";
|
|
4
4
|
import { _ as parseSlackMessageTs, f as toStoredSlackActor } from "./context-Bplcgypl.js";
|
|
5
|
-
import { Bt as authenticationUnlinkedEvent, Ht as getConversationEventStore, Jt as withConversationEventLock, Kt as getSqlExecutor, Lt as JUNIOR_NATIVE_EVENT_NAMESPACE, Qt as bindProviderConversation, Rt as agentsInstructionsUpdatedEvent, Wt as getConversationStore, Yt as sanitizePostgresJson, qt as createSqlConversationEventStore, zt as authenticationLinkedEvent } from "./agent-hooks-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { A as sleep, D as fenceLock, T as MUTATION_LOCK_TTL_MS, k as withLock, w as getStateAdapter } from "./profile-
|
|
5
|
+
import { Bt as authenticationUnlinkedEvent, Ht as getConversationEventStore, Jt as withConversationEventLock, Kt as getSqlExecutor, Lt as JUNIOR_NATIVE_EVENT_NAMESPACE, Qt as bindProviderConversation, Rt as agentsInstructionsUpdatedEvent, Wt as getConversationStore, Yt as sanitizePostgresJson, en as addAgentTurnUsage, qt as createSqlConversationEventStore, zt as authenticationLinkedEvent } from "./agent-hooks-B2Yt2b88.js";
|
|
6
|
+
import { F as agentHistoryItemSchema, H as contextProvenance, U as instructionActors, W as instructionProvenanceFor } from "./conversation-CRWntH-A.js";
|
|
7
|
+
import { n as generateShortTitle, t as fallbackShortTitle } from "./short-title-CxQHLU3_.js";
|
|
8
|
+
import { A as sleep, D as fenceLock, T as MUTATION_LOCK_TTL_MS, k as withLock, w as getStateAdapter } from "./profile-BcZ6EBQ4.js";
|
|
9
9
|
import { isDeepStrictEqual } from "node:util";
|
|
10
10
|
import { z } from "zod";
|
|
11
11
|
import { createHash } from "node:crypto";
|
package/dist/cli/chat.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as executeAgentRun } from "../agent-
|
|
2
|
-
import { t as createAgentRunner } from "../agent-runner-
|
|
1
|
+
import { t as executeAgentRun } from "../agent-Cgc7jAIH.js";
|
|
2
|
+
import { t as createAgentRunner } from "../agent-runner-CkNX-ynf.js";
|
|
3
3
|
import { t as loadAppPluginSet } from "../plugin-module-BKGOXca2.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -101,10 +101,10 @@ async function loadLocalPluginSet() {
|
|
|
101
101
|
async function configureLocalChatPlugins(pluginSet) {
|
|
102
102
|
const [pluginsModule, agentHooksModule, catalogRuntimeModule, validationModule, databaseModule] = await Promise.all([
|
|
103
103
|
import("../plugins-egKWjgue.js").then((n) => n.o),
|
|
104
|
-
import("../agent-hooks-
|
|
105
|
-
import("../catalog-runtime-
|
|
106
|
-
import("../validation-
|
|
107
|
-
import("../agent-hooks-
|
|
104
|
+
import("../agent-hooks-B2Yt2b88.js").then((n) => n.t),
|
|
105
|
+
import("../catalog-runtime-BvN_lNVo.js").then((n) => n.t),
|
|
106
|
+
import("../validation-sgYqCVwr.js").then((n) => n.r),
|
|
107
|
+
import("../agent-hooks-B2Yt2b88.js").then((n) => n.Vt)
|
|
108
108
|
]);
|
|
109
109
|
const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
|
|
110
110
|
const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
|
|
@@ -156,16 +156,16 @@ async function prepareLocalChatRun(io, pluginSet) {
|
|
|
156
156
|
await configureLocalChatPlugins(pluginSet);
|
|
157
157
|
const { setExperimentalFeatures } = await import("../experimental-CIXf7Uye.js").then((n) => n.t);
|
|
158
158
|
setExperimentalFeatures({ subagents: true });
|
|
159
|
-
const { setBriefsConfig } = await import("../agent-hooks-
|
|
159
|
+
const { setBriefsConfig } = await import("../agent-hooks-B2Yt2b88.js").then((n) => n.m);
|
|
160
160
|
setBriefsConfig({ enabled: true });
|
|
161
|
-
const { runLocalAgentTurn } = await import("../runner-
|
|
162
|
-
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-
|
|
161
|
+
const { runLocalAgentTurn } = await import("../runner-Cqd0EG3G.js");
|
|
162
|
+
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-G5q7i0Qp.js");
|
|
163
163
|
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-
|
|
164
|
+
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-DrOoklMj.js");
|
|
165
|
+
const { bindSpawnAgent } = await import("../spawn-BtMqHjwx.js").then((n) => n.n);
|
|
166
|
+
const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-DlYdbVfB.js").then((n) => n.a);
|
|
167
167
|
const { createLocalConversationWork } = await import("../conversation-work-C6y3T5Hx.js");
|
|
168
|
-
const { processConversationWork } = await import("../worker-
|
|
168
|
+
const { processConversationWork } = await import("../worker-BfxedsTU.js").then((n) => n.n);
|
|
169
169
|
let agentRunner;
|
|
170
170
|
const localConversationWork = createLocalConversationWork(async (message) => {
|
|
171
171
|
if (!agentRunner) throw new Error("Local agent runner is not ready");
|
package/dist/cli/check.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { E as JUNIOR_HEARTBEAT_ROUTE, j as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, w as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE } from "../logging-
|
|
2
|
-
import { d as parseInlinePluginManifest, f as parsePluginManifest } from "../registry-
|
|
3
|
-
import { i as parseSkillFile } from "../skills-
|
|
1
|
+
import { E as JUNIOR_HEARTBEAT_ROUTE, j as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, w as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE } from "../logging-B5-PLvDo.js";
|
|
2
|
+
import { d as parseInlinePluginManifest, f as parsePluginManifest } from "../registry-BIeo1ST6.js";
|
|
3
|
+
import { i as parseSkillFile } from "../skills-DlrAH1on.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-4-OVELML.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 { Gt as getDb, bt as createPluginLogger, d as setPlugins, f as validatePlugins } from "../agent-hooks-
|
|
2
|
-
import { n as pluginCatalogRuntime } from "../catalog-runtime-
|
|
3
|
-
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-
|
|
1
|
+
import { Gt as getDb, bt as createPluginLogger, d as setPlugins, f as validatePlugins } from "../agent-hooks-B2Yt2b88.js";
|
|
2
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-BvN_lNVo.js";
|
|
3
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-sgYqCVwr.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-BvN_lNVo.js";
|
|
2
|
+
import { S as disconnectStateAdapter, t as create } from "../profile-BcZ6EBQ4.js";
|
|
3
|
+
import { r as resolve } from "../resolve-BgAZ4KxF.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.d.ts
CHANGED
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-C0-PnQoF.js";
|
|
2
|
+
import { t as createJuniorSqlExecutor } from "../executor-CaVeGYeA.js";
|
|
3
|
+
import { t as createPluginCatalogRuntime } from "../registry-BIeo1ST6.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 { C as withSpan, f as logWarn, h as serializeGenAiAttribute, i as extractGenAiUsageAttributes, p as normalizeGenAiFinishReason, u as logException } from "./logging-
|
|
2
|
-
import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-
|
|
1
|
+
import { C as withSpan, f as logWarn, h as serializeGenAiAttribute, i as extractGenAiUsageAttributes, p as normalizeGenAiFinishReason, u as logException } from "./logging-B5-PLvDo.js";
|
|
2
|
+
import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-BFzYxnTS.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-B4FMCO8f.js";
|
|
2
|
-
import { o as resolveGatewayModel, w as toOptionalTrimmed } from "./client-
|
|
3
|
-
import { f as logWarn } from "./logging-
|
|
2
|
+
import { o as resolveGatewayModel, w as toOptionalTrimmed } from "./client-C1KycWNq.js";
|
|
3
|
+
import { f as logWarn } from "./logging-B5-PLvDo.js";
|
|
4
4
|
import { c as TURN_REASONING_LEVELS, l as parseTurnReasoningLevel, o as modelProfileSchema } from "./model-profile-CZmVoGdX.js";
|
|
5
5
|
import { getModel } from "@earendil-works/pi-ai/compat";
|
|
6
6
|
//#region src/chat/slack/emoji.ts
|
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
import { c as TURN_REASONING_LEVELS, o as modelProfileSchema } from "./model-profile-CZmVoGdX.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { actorSchema, codeChangeStateSchema, conversationAnnotationInputSchema, conversationEventPresentationSchema, conversationSidebarAnnotationSchema } from "@sentry/junior-plugin-api";
|
|
4
|
+
//#region src/usage-schema.ts
|
|
5
|
+
const usageCostSchema = z.object({
|
|
6
|
+
input: z.number().finite().nonnegative().optional(),
|
|
7
|
+
output: z.number().finite().nonnegative().optional(),
|
|
8
|
+
cacheRead: z.number().finite().nonnegative().optional(),
|
|
9
|
+
cacheWrite: z.number().finite().nonnegative().optional(),
|
|
10
|
+
total: z.number().finite().nonnegative().optional()
|
|
11
|
+
}).strict();
|
|
12
|
+
const usageSchema = z.object({
|
|
13
|
+
inputTokens: z.number().int().nonnegative().optional(),
|
|
14
|
+
outputTokens: z.number().int().nonnegative().optional(),
|
|
15
|
+
cachedInputTokens: z.number().int().nonnegative().optional(),
|
|
16
|
+
cacheCreationTokens: z.number().int().nonnegative().optional(),
|
|
17
|
+
reasoningTokens: z.number().int().nonnegative().optional(),
|
|
18
|
+
totalTokens: z.number().int().nonnegative().optional(),
|
|
19
|
+
cost: usageCostSchema.optional()
|
|
20
|
+
}).strict();
|
|
21
|
+
//#endregion
|
|
4
22
|
//#region src/chat/conversations/provenance.ts
|
|
5
23
|
/**
|
|
6
24
|
* Durable message attribution shared by storage and projections.
|
|
@@ -438,24 +456,6 @@ const newConversationEventSchema = z.object({
|
|
|
438
456
|
createdAtMs: z.number().finite()
|
|
439
457
|
}).strict();
|
|
440
458
|
//#endregion
|
|
441
|
-
//#region src/usage-schema.ts
|
|
442
|
-
const usageCostSchema = z.object({
|
|
443
|
-
input: z.number().finite().nonnegative().optional(),
|
|
444
|
-
output: z.number().finite().nonnegative().optional(),
|
|
445
|
-
cacheRead: z.number().finite().nonnegative().optional(),
|
|
446
|
-
cacheWrite: z.number().finite().nonnegative().optional(),
|
|
447
|
-
total: z.number().finite().nonnegative().optional()
|
|
448
|
-
}).strict();
|
|
449
|
-
const usageSchema = z.object({
|
|
450
|
-
inputTokens: z.number().int().nonnegative().optional(),
|
|
451
|
-
outputTokens: z.number().int().nonnegative().optional(),
|
|
452
|
-
cachedInputTokens: z.number().int().nonnegative().optional(),
|
|
453
|
-
cacheCreationTokens: z.number().int().nonnegative().optional(),
|
|
454
|
-
reasoningTokens: z.number().int().nonnegative().optional(),
|
|
455
|
-
totalTokens: z.number().int().nonnegative().optional(),
|
|
456
|
-
cost: usageCostSchema.optional()
|
|
457
|
-
}).strict();
|
|
458
|
-
//#endregion
|
|
459
459
|
//#region src/chat/briefs/schema.ts
|
|
460
460
|
/**
|
|
461
461
|
* Runtime schemas for the Brief record and the generator input. Both cross a
|
|
@@ -1159,4 +1159,4 @@ const conversationStatsReportSchema = z.object({
|
|
|
1159
1159
|
windowStart: z.string()
|
|
1160
1160
|
}).strict();
|
|
1161
1161
|
//#endregion
|
|
1162
|
-
export { briefLinkSchema as A,
|
|
1162
|
+
export { briefLinkSchema as A, historyReplacementSchema as B, conversationReportEventSchema as C, createConversationBodySchema as D, conversationSummaryReportSchema as E, agentHistoryItemSchema as F, sameActorIdentity as G, contextProvenance as H, conversationEventDataSchema as I, usageSchema as K, conversationTurnFailureCodeSchema as L, conversationBriefSchema as M, parseBriefInput as N, createConversationMessageBodySchema as O, KNOWN_CONVERSATION_EVENT_TYPES as P, conversationTurnFailureReasonSchema as R, conversationReportEventDataSchema as S, conversationStatsReportSchema as T, instructionActors as U, newConversationEventSchema as V, instructionProvenanceFor as W, conversationParamsSchema as _, cancelConversationPendingMessagesBodySchema as a, conversationPendingMessageSchema as b, conversationAttachmentParamsSchema as c, conversationDetailReportSchema as d, conversationEventHistorySchema as f, conversationFeedSchema as g, conversationFeedQuerySchema as h, archiveConversationResponseSchema as i, briefOutcomeStatusSchema as j, briefCodeChangeSchema as k, conversationAuxiliaryCostsSchema as l, conversationEventsQuerySchema as m, actorIdentitySchema as n, cancelConversationPendingMessagesResponseSchema as o, conversationEventPageSchema as p, archiveConversationBodySchema as r, conversationActivityPreviewSchema as s, acceptedConversationMessageSchema as t, conversationDetailQuerySchema as u, conversationPendingAuthorizationSchema as v, conversationStatsItemSchema as w, conversationPendingMessagesReportSchema as x, conversationPendingMessageDeliverySchema as y, decodeStoredConversationEvent as z };
|