@sentry/junior 0.276.0 → 0.278.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{adapter-DoPR2jS-.js → adapter-BXosqTMx.js} +1 -1
- package/dist/{admin-BJTT-kXb.js → admin-Thn7NfOi.js} +1 -1
- package/dist/{agent-invocations-CUWrrzkc.js → agent-invocations-D7c4BQGc.js} +6 -2
- package/dist/{agent-runner-sMpA5qGM.js → agent-runner-DE-43MPb.js} +396 -877
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +5 -5
- package/dist/api.d.ts +13 -2
- package/dist/api.js +132 -61
- package/dist/{app-DTj-yAQt.d.ts → app-CHNS-AX2.d.ts} +6 -27
- package/dist/app.d.ts +3 -3
- package/dist/app.js +65 -57
- package/dist/{assistant-reply-DbxKnBQF.js → assistant-reply-pauL6qyn.js} +28 -6
- package/dist/{automation-B8_mC68r.js → automation-DphoTRYl.js} +1 -1
- package/dist/{background-compaction-queue-Bywqo1WJ.js → background-compaction-queue-CAL4A2y7.js} +2 -2
- package/dist/{briefs-IL7QnCCR.js → briefs-4fyPJJEu.js} +5 -6
- package/dist/{catalog-runtime--sC2CYLQ.js → catalog-runtime-BoOb5oUv.js} +1 -1
- package/dist/cli/chat.d.ts +1 -1
- package/dist/cli/chat.js +14 -14
- package/dist/cli/check.js +3 -3
- package/dist/cli/init.js +0 -2
- package/dist/cli/main.js +3 -3
- package/dist/cli/plugins.d.ts +1 -1
- package/dist/cli/plugins.js +4 -4
- package/dist/cli/snapshot-create.js +4 -4
- package/dist/cli/upgrade.d.ts +2 -2
- package/dist/cli/upgrade.js +3 -3
- package/dist/{client-7diKvInp.js → client-v_OVYuHZ.js} +3 -3
- package/dist/{config-Cb--cuv-.js → config-o2jLRY5J.js} +24 -99
- package/dist/{connections-C4-4fxaE.js → connections-RC4NXAx8.js} +10 -10
- package/dist/{conversation-DppJ83Hw.js → conversation-CZfyQvdm.js} +54 -109
- package/dist/{conversation-privacy-DTwdT3Pi.js → conversation-privacy-C23M8KaD.js} +1 -1
- package/dist/{credential-sync-Sl5RQCkS.js → credential-sync-Dd0WyNfF.js} +13 -13
- package/dist/{db-Ck6TXQIx.d.ts → db-BjLzDJCt.d.ts} +1 -1
- package/dist/{executor-BFKmqxYe.js → executor-CJfsD0VX.js} +13 -5
- package/dist/instrumentation.js +2 -2
- package/dist/{logging-B04X_eCB.js → logging-dFaXvBRK.js} +4 -2
- package/dist/{media-DstkkoNP.js → media-DTAA8Qs_.js} +21 -23
- package/dist/{message-DQMFyyE-.js → message-DSwxIZet.js} +22 -28
- package/dist/nitro.d.ts +2 -2
- package/dist/nitro.js +7 -3
- package/dist/{oauth-callback-server-BGq0_vQI.js → oauth-callback-server-CDcuCp27.js} +2 -2
- package/dist/{plugins-B_0Cr0MO.d.ts → plugins-DtmjkTza.d.ts} +1 -0
- package/dist/{projection-6dXaN0n-.js → projection-BTge9wrH.js} +5426 -5300
- package/dist/{prompt-B4fQKGZR.js → prompt-DDtCnlHP.js} +1 -1
- package/dist/{registry-CEqKR_ld.js → registry-Cp6CNmtP.js} +24 -8
- package/dist/{resolve-8I5DkrfI.js → resolve-B_7h2cXx.js} +3 -3
- package/dist/{result-BgAW90IM.js → result-5LBEfnLX.js} +9 -9
- package/dist/{runner-CSKDr_19.js → runner-C5-S4oq-.js} +11 -11
- package/dist/{sandbox-egress-signals-BxAT276e.js → sandbox-egress-signals-B4GehT1L.js} +1 -1
- package/dist/{schema-Cal-EFdi.js → schema-B5fpczDw.js} +82 -4
- package/dist/{schema-CaUWl2EV.d.ts → schema-Tr484cCC.d.ts} +935 -688
- package/dist/{service-account-CUuVJCKT.js → service-account-BkEv20zf.js} +3 -3
- package/dist/{service-account-CtOab1Xz.js → service-account-Cq_dLrZJ.js} +3 -3
- package/dist/{session-stop-DK8LuPZW.js → session-stop-BsS4qFS2.js} +26 -16
- package/dist/{skills-Bc0D7BGy.js → skills-M0BA0_s6.js} +2 -2
- package/dist/{spawn-DF_GUcd8.js → spawn-BO3y7H4d.js} +2 -3
- package/dist/{stop-DthSy-z8.js → stop-D5R82Wla.js} +612 -186
- package/dist/{store-C5uVTx2G.js → store-BGBzQWNf.js} +9 -16
- package/dist/{store-BgH2P3X9.js → store-CGJZTEVz.js} +3 -3
- package/dist/{task-queue-C6ROM_XJ.js → task-queue-UD27ei2U.js} +3 -3
- package/dist/{task-runner-BwAkjjVE.js → task-runner-noxjOjkM.js} +7 -7
- package/dist/{thread-state-BXjgk1pW.js → thread-state-BSu6rM6p.js} +4 -4
- package/dist/{turn-failure-response-CVI57qKL.js → turn-failure-response-wahwyPrZ.js} +7 -7
- package/dist/{turn-lifecycle-CF6ibonp.js → turn-lifecycle-Bo4Trccw.js} +1 -1
- package/dist/{turn-session-routing-DddybdNu.js → turn-session-routing-DnSaaEpn.js} +10 -10
- package/dist/{validation-BxF1nQbC.js → validation-B9-8iKyw.js} +1 -1
- package/dist/{version-CTzSbCmR.js → version-C7HejFP2.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-CQwBszc7.js → viewer-DLXajQZE.js} +94 -28
- package/dist/{work-BHlShEQ6.js → work-DRGSlfia.js} +12 -17
- package/dist/{worker-DhY9MnsH.js → worker-BGh5Dwc6.js} +6 -6
- package/migrations/0074_conversation_participant_pins.sql +1 -0
- package/migrations/0075_conversation_detail_version.sql +1 -0
- package/migrations/0076_conversation_auto_archive.sql +5 -0
- package/migrations/meta/0074_snapshot.json +4076 -0
- package/migrations/meta/0075_snapshot.json +4083 -0
- package/migrations/meta/0076_snapshot.json +4147 -0
- package/migrations/meta/_journal.json +21 -0
- package/package.json +5 -5
- package/dist/model-profile-B998sjVd.js +0 -67
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { H as conversationBriefSchema, U as parseBriefInput, V as briefOutcomeStatusSchema } from "./conversation-CZfyQvdm.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
// src/chat/briefs/generate.ts
|
|
4
4
|
const MAX_INPUT_CHARS = 6e4;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as setSpanAttributes, h as logWarn, m as logInfo } from "./logging-
|
|
1
|
+
import { b as setSpanAttributes, h as logWarn, m as logInfo } from "./logging-dFaXvBRK.js";
|
|
2
2
|
import { o as isUserActor, s as parseActorUserId } from "./actor-B4DYygOB.js";
|
|
3
3
|
import { n as normalizePluginPackageNames, o as pluginRoots, t as discoverInstalledPluginPackageContent } from "./package-discovery-DJBompdd.js";
|
|
4
4
|
import path from "node:path";
|
|
@@ -66,6 +66,7 @@ function inlineMcpSource(mcp) {
|
|
|
66
66
|
setDefined$1(result, "oauth-client", mcp.oauthClient && mcpOauthClientSource(mcp.oauthClient));
|
|
67
67
|
setDefined$1(result, "allowed-tools", mcp.allowedTools);
|
|
68
68
|
setDefined$1(result, "wrapped-tools", mcp.wrappedTools);
|
|
69
|
+
setDefined$1(result, "audit-tools", mcp.auditTools);
|
|
69
70
|
return result;
|
|
70
71
|
}
|
|
71
72
|
function inlineOauthSource(oauth) {
|
|
@@ -268,7 +269,8 @@ const mcpSourceSchema = z.object({
|
|
|
268
269
|
headers: stringMapSchema.optional(),
|
|
269
270
|
"oauth-client": mcpOauthClientSourceSchema.optional(),
|
|
270
271
|
"allowed-tools": nonEmptyStringArraySchema("allowed-tools").optional(),
|
|
271
|
-
"wrapped-tools": nonEmptyStringArraySchema("wrapped-tools").optional()
|
|
272
|
+
"wrapped-tools": nonEmptyStringArraySchema("wrapped-tools").optional(),
|
|
273
|
+
"audit-tools": nonEmptyStringArraySchema("audit-tools").optional()
|
|
272
274
|
}).passthrough();
|
|
273
275
|
const targetSourceSchema = z.object({
|
|
274
276
|
type: nonEmptyTrimmedString.refine((value) => PLUGIN_NAME_RE.test(value), { error: "type must be a lowercase target identifier" }),
|
|
@@ -329,6 +331,7 @@ function manifestConfigPatch(config) {
|
|
|
329
331
|
setDefined(mcp, "oauth-client", config.mcp.oauthClient && mcpOauthClientSource(config.mcp.oauthClient));
|
|
330
332
|
setDefined(mcp, "allowed-tools", config.mcp.allowedTools);
|
|
331
333
|
setDefined(mcp, "wrapped-tools", config.mcp.wrappedTools);
|
|
334
|
+
setDefined(mcp, "audit-tools", config.mcp.auditTools);
|
|
332
335
|
result.mcp = mcp;
|
|
333
336
|
}
|
|
334
337
|
}
|
|
@@ -605,6 +608,12 @@ function normalizeMcp(data, envVars, name) {
|
|
|
605
608
|
if (typeof prepared.url === "string") prepared.url = expandEnvPlaceholders(prepared.url, envVars, `Plugin ${name} mcp.url`);
|
|
606
609
|
const result = mcpSourceSchema.safeParse(prepared);
|
|
607
610
|
if (!result.success) throw new Error(issueMessage(result.error, `Plugin ${name} mcp`));
|
|
611
|
+
const auditTools = result.data["audit-tools"];
|
|
612
|
+
const unknownAuditTools = unloadedMcpTools({
|
|
613
|
+
allowedTools: result.data["allowed-tools"],
|
|
614
|
+
wrappedTools: result.data["wrapped-tools"]
|
|
615
|
+
}, auditTools ?? []);
|
|
616
|
+
if (unknownAuditTools.length > 0) throw new Error(`Plugin ${name} mcp.audit-tools must be listed in mcp.allowed-tools or mcp.wrapped-tools: ${unknownAuditTools.join(", ")}`);
|
|
608
617
|
const headers = result.data.headers ? normalizeStringMap(result.data.headers, `Plugin ${name} mcp.headers`, { forbiddenKeys: FORBIDDEN_API_HEADER_NAMES }) : void 0;
|
|
609
618
|
assertDeclaredHeaderEnvReferences(headers, envVars, `Plugin ${name} mcp.headers`);
|
|
610
619
|
if (result.data.auth) assertDeclaredHostSecretEnv(result.data.auth["private-key-env"], envVars, `Plugin ${name} mcp.auth.private-key-env`);
|
|
@@ -631,10 +640,20 @@ function normalizeMcp(data, envVars, name) {
|
|
|
631
640
|
...oauthClientAuthorizeParams ? { authorizeParams: oauthClientAuthorizeParams } : void 0
|
|
632
641
|
} } : void 0,
|
|
633
642
|
...result.data["allowed-tools"] ? { allowedTools: result.data["allowed-tools"] } : void 0,
|
|
634
|
-
...result.data["wrapped-tools"] ? { wrappedTools: result.data["wrapped-tools"] } : void 0
|
|
643
|
+
...result.data["wrapped-tools"] ? { wrappedTools: result.data["wrapped-tools"] } : void 0,
|
|
644
|
+
...auditTools ? { auditTools } : void 0
|
|
635
645
|
};
|
|
636
646
|
}
|
|
637
647
|
/**
|
|
648
|
+
* Return the tools that a set MCP allow-list does not load. An empty
|
|
649
|
+
* allow-list loads every tool, so only a set list can be checked.
|
|
650
|
+
*/
|
|
651
|
+
function unloadedMcpTools(mcp, tools) {
|
|
652
|
+
if (!mcp.allowedTools) return [];
|
|
653
|
+
const loadedTools = /* @__PURE__ */ new Set([...mcp.allowedTools, ...mcp.wrappedTools ?? []]);
|
|
654
|
+
return tools.filter((tool) => !loadedTools.has(tool));
|
|
655
|
+
}
|
|
656
|
+
/**
|
|
638
657
|
* Validate which accounts the plugin may use against the surfaces that
|
|
639
658
|
* support them. Today only MCP OAuth stores a service account.
|
|
640
659
|
*/
|
|
@@ -646,11 +665,8 @@ function normalizeAccounts(data, mcp, name) {
|
|
|
646
665
|
if (userOAuth === false && !serviceAccount) throw new Error(`Plugin ${name} accounts.user-oauth false requires accounts.service-account`);
|
|
647
666
|
if (!serviceAccount) return;
|
|
648
667
|
if (!mcp || mcp.auth || mcp.oauthClient) throw new Error(`Plugin ${name} accounts.service-account requires mcp without auth or oauth-client`);
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
const unknownTools = serviceAccount.tools.filter((tool) => !loadedTools.has(tool));
|
|
652
|
-
if (unknownTools.length > 0) throw new Error(`Plugin ${name} accounts.service-account.tools must be listed in mcp.allowed-tools or mcp.wrapped-tools: ${unknownTools.join(", ")}`);
|
|
653
|
-
}
|
|
668
|
+
const unknownTools = unloadedMcpTools(mcp, serviceAccount.tools);
|
|
669
|
+
if (unknownTools.length > 0) throw new Error(`Plugin ${name} accounts.service-account.tools must be listed in mcp.allowed-tools or mcp.wrapped-tools: ${unknownTools.join(", ")}`);
|
|
654
670
|
return {
|
|
655
671
|
...userOAuth === false ? { userOAuth } : void 0,
|
|
656
672
|
serviceAccount: { tools: serviceAccount.tools }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { E as withSpan, b as setSpanAttributes } from "./logging-
|
|
3
|
-
import { r as getStateAdapter } from "./adapter-
|
|
1
|
+
import { Oa as runNonInteractiveCommand, Sa as SANDBOX_WORKSPACE_ROOT, _a as SANDBOX_COMMAND_PATH, ai as create, da as sleep, li as getSandboxProvider, si as isStale } from "./projection-BTge9wrH.js";
|
|
2
|
+
import { E as withSpan, b as setSpanAttributes } from "./logging-dFaXvBRK.js";
|
|
3
|
+
import { r as getStateAdapter } from "./adapter-BXosqTMx.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
// src/chat/sandbox/resources.ts
|
|
6
6
|
let configuredResources;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import {
|
|
2
|
+
import { nt as listTurnSummaries, tt as getTurnRecord } from "./projection-BTge9wrH.js";
|
|
3
3
|
import { t as createActor } from "./actor-B4DYygOB.js";
|
|
4
|
-
import {
|
|
5
|
-
import { f as credentialContextForActor } from "./registry-
|
|
6
|
-
import { wt as listUnreportedSiblingAgents } from "./agent-runner-
|
|
7
|
-
import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-
|
|
8
|
-
import { _ as getLatestAgentInvocationForConversation, c as getAgentInvocation, d as getAgentInvocationIdForResult, l as getAgentInvocationIdForEvents, o as createAgentInvocationFromLatest, p as getAgentInvocationResultMessageId, u as getAgentInvocationIdForMessage, w as markAgentInvocationParentMailboxAppended, y as isTerminalAgentInvocation } from "./store-
|
|
9
|
-
import { a as EVENT_WAIT_MS, c as isEventMailboxMetadata, l as renderEventBatchText, u as timerWatchCredentialSubject } from "./session-stop-
|
|
10
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-
|
|
11
|
-
import { a as resolveAgentInvocationId, i as enqueueAgentInvocation, t as createAgentInvocationWorker } from "./work-
|
|
4
|
+
import { F as SYSTEM_IDENTITY_ID } from "./viewer-DLXajQZE.js";
|
|
5
|
+
import { f as credentialContextForActor } from "./registry-Cp6CNmtP.js";
|
|
6
|
+
import { wt as listUnreportedSiblingAgents } from "./agent-runner-DE-43MPb.js";
|
|
7
|
+
import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-DDtCnlHP.js";
|
|
8
|
+
import { _ as getLatestAgentInvocationForConversation, c as getAgentInvocation, d as getAgentInvocationIdForResult, l as getAgentInvocationIdForEvents, o as createAgentInvocationFromLatest, p as getAgentInvocationResultMessageId, u as getAgentInvocationIdForMessage, w as markAgentInvocationParentMailboxAppended, y as isTerminalAgentInvocation } from "./store-BGBzQWNf.js";
|
|
9
|
+
import { a as EVENT_WAIT_MS, c as isEventMailboxMetadata, l as renderEventBatchText, u as timerWatchCredentialSubject } from "./session-stop-BsS4qFS2.js";
|
|
10
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-CGJZTEVz.js";
|
|
11
|
+
import { a as resolveAgentInvocationId, i as enqueueAgentInvocation, t as createAgentInvocationWorker } from "./work-DRGSlfia.js";
|
|
12
12
|
import { z } from "zod";
|
|
13
13
|
import { createEventSource, createLocalSource, createWebSource } from "@sentry/junior-plugin-api";
|
|
14
14
|
// src/chat/conversations/web-mailbox.ts
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { S as setTags, T as withLogContext, p as logException } from "./logging-
|
|
3
|
-
import {
|
|
4
|
-
import { f as credentialContextForActor } from "./registry-
|
|
5
|
-
import {
|
|
6
|
-
import { $ as markTurnFailed, et as startActiveTurn } from "./store-
|
|
7
|
-
import { n as getAssistantReplyText } from "./assistant-reply-
|
|
8
|
-
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-
|
|
9
|
-
import { a as persistThreadStateById, n as getPersistedSandboxState, o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-
|
|
10
|
-
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-
|
|
11
|
-
import { i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent, u as loadPendingMessageCards } from "./turn-failure-response-
|
|
1
|
+
import { B as authorizationId, D as buildConversationContext, I as upsertConversationMessage, M as markConversationMessage, N as normalizeConversationText, P as recordDeliveredAssistantMessage, Ut as persistWithRetry, Z as saveTurnCheckpoint, a as loadProjection, d as recordAuthorizationCompleted, t as commitAcceptedReply, v as hydrateConversationMessages, y as persistConversationMessages } from "./projection-BTge9wrH.js";
|
|
2
|
+
import { S as setTags, T as withLogContext, p as logException } from "./logging-dFaXvBRK.js";
|
|
3
|
+
import { F as SYSTEM_IDENTITY_ID, x as getConversationStore, y as getConversationEventStore } from "./viewer-DLXajQZE.js";
|
|
4
|
+
import { f as credentialContextForActor } from "./registry-Cp6CNmtP.js";
|
|
5
|
+
import { j as messageCardText } from "./conversation-CZfyQvdm.js";
|
|
6
|
+
import { $ as markTurnFailed, et as startActiveTurn } from "./store-BGBzQWNf.js";
|
|
7
|
+
import { n as getAssistantReplyText } from "./assistant-reply-pauL6qyn.js";
|
|
8
|
+
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-Bo4Trccw.js";
|
|
9
|
+
import { a as persistThreadStateById, n as getPersistedSandboxState, o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-BSu6rM6p.js";
|
|
10
|
+
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-noxjOjkM.js";
|
|
11
|
+
import { i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent, u as loadPendingMessageCards } from "./turn-failure-response-wahwyPrZ.js";
|
|
12
12
|
import { randomUUID } from "node:crypto";
|
|
13
13
|
import { createLocalSource, localDestinationSchema } from "@sentry/junior-plugin-api";
|
|
14
14
|
// src/chat/local/runner.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { oa as sandboxEgressSignalsResponseSchema } from "./projection-BTge9wrH.js";
|
|
2
2
|
// src/chat/local/sandbox-egress-signals.ts
|
|
3
3
|
const SANDBOX_EGRESS_SIGNALS_PATH = "/api/internal/sandbox-egress/signals";
|
|
4
4
|
const LOCAL_DEV_SERVER_TIMEOUT_MS = 1e3;
|
|
@@ -1,10 +1,88 @@
|
|
|
1
|
-
import { r as AGENT_INVOCATION_STATUSES, u as juniorDestinationKindSchema } from "./agent-invocations-
|
|
2
|
-
import { E as
|
|
1
|
+
import { r as AGENT_INVOCATION_STATUSES, u as juniorDestinationKindSchema } from "./agent-invocations-D7c4BQGc.js";
|
|
2
|
+
import { E as conversationChildAgentTotalsSchema, L as messageAttachmentSchema, O as reviewItemChangeRecordSchema, o as conversationAuxiliaryCostsSchema, r as actorIdentitySchema, x as conversationUsageSchema, y as conversationSummaryReportSchema } from "./conversation-CZfyQvdm.js";
|
|
3
3
|
import { i as fillUtcHours, r as fillUtcDays, s as sumUtcHoursIntoSixHours, y as userInputRequestSchema } from "./reporting-window-DgHgwQB3.js";
|
|
4
|
-
import "./automation-
|
|
4
|
+
import "./automation-DphoTRYl.js";
|
|
5
5
|
import "./common-Eu6sx09c.js";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
import { codeChangeStateSchema, eventMatchSchema } from "@sentry/junior-plugin-api";
|
|
8
|
+
// src/api/schema/conversation-pin.ts
|
|
9
|
+
/** Pin or unpin one Conversation for the signed-in viewer. */
|
|
10
|
+
const pinConversationBodySchema = z.object({ pinned: z.boolean() }).strict();
|
|
11
|
+
/** The viewer's pin time after the change, or null when unpinned. */
|
|
12
|
+
const pinConversationResponseSchema = z.object({ pinnedAt: z.string().datetime().nullable() }).strict();
|
|
13
|
+
// src/api/schema/conversation-archive.ts
|
|
14
|
+
const archiveConversationBodySchema = z.object({
|
|
15
|
+
archived: z.boolean(),
|
|
16
|
+
lastSeenAt: z.string().datetime()
|
|
17
|
+
}).strict();
|
|
18
|
+
const archiveConversationResponseSchema = z.object({ archivedAt: z.string().datetime().nullable() }).strict();
|
|
19
|
+
/** Viewer's auto-archive choice for one conversation. */
|
|
20
|
+
const conversationAutoArchiveSchema = z.object({ autoArchive: z.boolean() }).strict();
|
|
21
|
+
/** Result of archiving all of the viewer's done conversations once. */
|
|
22
|
+
const archiveDoneConversationsResponseSchema = z.object({ archived: z.number().int().nonnegative() }).strict();
|
|
23
|
+
// src/api/schema/conversation-pending-messages.ts
|
|
24
|
+
/** Mailbox delivery mode for one accepted inbound message. */
|
|
25
|
+
const conversationPendingMessageDeliverySchema = z.enum(["defer", "interrupt"]);
|
|
26
|
+
/** One accepted mailbox message that has not reached durable history yet. */
|
|
27
|
+
const conversationPendingMessageSchema = z.object({
|
|
28
|
+
actorIdentity: actorIdentitySchema.optional(),
|
|
29
|
+
/** Identity id of the author. Detail `authors` maps it to the person. */
|
|
30
|
+
actorIdentityId: z.string().min(1).optional(),
|
|
31
|
+
createdAt: z.string().datetime(),
|
|
32
|
+
delivery: conversationPendingMessageDeliverySchema,
|
|
33
|
+
inboundMessageId: z.string().min(1),
|
|
34
|
+
messageId: z.string().min(1),
|
|
35
|
+
receivedAt: z.string().datetime(),
|
|
36
|
+
role: z.literal("user"),
|
|
37
|
+
source: z.enum(["slack", "web"]),
|
|
38
|
+
text: z.string().optional(),
|
|
39
|
+
/** People mentioned in the text, resolved at read time. */
|
|
40
|
+
mentions: z.array(actorIdentitySchema).optional(),
|
|
41
|
+
attachments: z.array(messageAttachmentSchema).optional(),
|
|
42
|
+
/** Review item change that this Message records. */
|
|
43
|
+
reviewItemChange: reviewItemChangeRecordSchema.optional(),
|
|
44
|
+
redacted: z.literal(true).optional()
|
|
45
|
+
}).strict().superRefine((data, context) => {
|
|
46
|
+
if (data.text === void 0 === (data.redacted !== true)) context.addIssue({
|
|
47
|
+
code: "custom",
|
|
48
|
+
message: "pending message content must be text or explicitly redacted"
|
|
49
|
+
});
|
|
50
|
+
if (data.redacted && (data.actorIdentity || data.attachments || data.mentions || data.reviewItemChange)) context.addIssue({
|
|
51
|
+
code: "custom",
|
|
52
|
+
message: "redacted pending messages must not expose actor identity, attachments, mentions, or a review item"
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
/** Participant-only authorization prompt for a parked web turn. */
|
|
56
|
+
const conversationPendingAuthorizationSchema = z.object({
|
|
57
|
+
authorizationUrl: z.string().url(),
|
|
58
|
+
completionText: z.string().min(1),
|
|
59
|
+
label: z.string().min(1)
|
|
60
|
+
}).strict();
|
|
61
|
+
/** Bounded mailbox snapshot for one conversation transcript. */
|
|
62
|
+
const conversationPendingMessagesReportSchema = z.object({
|
|
63
|
+
authorization: conversationPendingAuthorizationSchema.optional(),
|
|
64
|
+
conversationId: z.string().min(1),
|
|
65
|
+
generatedAt: z.string().datetime(),
|
|
66
|
+
messages: z.array(conversationPendingMessageSchema)
|
|
67
|
+
}).strict();
|
|
68
|
+
/** Optional filters for cancelling accepted mailbox rows. */
|
|
69
|
+
const cancelConversationPendingMessagesBodySchema = z.object({
|
|
70
|
+
inboundMessageIds: z.array(z.string().min(1)).min(1).optional(),
|
|
71
|
+
receivedBefore: z.string().datetime().optional()
|
|
72
|
+
}).strict();
|
|
73
|
+
/** Result of cancelling accepted human-facing mailbox rows. */
|
|
74
|
+
const cancelConversationPendingMessagesResponseSchema = z.object({
|
|
75
|
+
cancelledCount: z.number().int().nonnegative(),
|
|
76
|
+
cancelledInboundMessageIds: z.array(z.string().min(1)),
|
|
77
|
+
conversationId: z.string().min(1)
|
|
78
|
+
}).strict();
|
|
79
|
+
/** Queued web messages that the viewer wants Junior to read now. */
|
|
80
|
+
const steerConversationPendingMessagesBodySchema = z.object({ inboundMessageIds: z.array(z.string().min(1)).min(1) }).strict();
|
|
81
|
+
/** Result of steering queued web messages into the conversation. */
|
|
82
|
+
const steerConversationPendingMessagesResponseSchema = z.object({
|
|
83
|
+
conversationId: z.string().min(1),
|
|
84
|
+
steeredInboundMessageIds: z.array(z.string().min(1))
|
|
85
|
+
}).strict();
|
|
8
86
|
// src/api/schema/conversation-stats.ts
|
|
9
87
|
const conversationStatsItemSchema = z.object({
|
|
10
88
|
active: z.number(),
|
|
@@ -634,4 +712,4 @@ const statsReportSchema = z.object({
|
|
|
634
712
|
windowEnd: z.string(),
|
|
635
713
|
windowStart: z.string()
|
|
636
714
|
}).strict();
|
|
637
|
-
export { codeRepositorySummarySchema as $, avatarParamsSchema as A, dailyConversationActivitySchema as B, createdPersonalTokenSchema as C, revokePersonalTokenResponseSchema as D, personalTokenParamsSchema as E, locationDirectoryReportSchema as F, startConnectionResponseSchema as G, connectionParamsSchema as H, locationParamsSchema as I, codeChangeSummarySchema as J, codeActivityDaySchema as K, activityDays as L, personalSpendReportSchema as M, locationActivityDayReportSchema as N, actorDirectoryReportSchema as O, locationDetailReportSchema as P, codeRepositoryReportSchema as Q, activityHours as R, createPersonalTokenBodySchema as S, personalTokenMetadataSchema as T, connectionSchema as U, connectionListSchema as V, disconnectConnectionResponseSchema as W, codePersonReportSchema as X, codeOverviewReportSchema as Y, codeRepositoryParamsSchema as Z, disconnectServiceAccountResponseSchema as _, workspaceBodySchema as a, conversationStatsReportSchema as at, serviceAccountSchema as b, workspaceRepoSchema as c, reviewItemCountSchema as d, conversationWatchSchema as et, reviewItemListQuerySchema as f, reviewItemWaitingConversationsSchema as g, reviewItemSchema as h, deleteWorkspaceResponseSchema as i, stopConversationTurnResponseSchema as it, personParamsSchema as j, actorProfileReportSchema as k, workspaceSchema as l, reviewItemParamsSchema as m, statsReportSchema as n, conversationChildAgentSchema as nt, workspaceListSchema as o, reviewItemListSchema as p, codeChangeSummaryReportSchema as q, baselineSnapshotSchema as r, conversationChildAgentsReportSchema as rt, workspaceParamsSchema as s, statSchema as t, conversationWatchesReportSchema as tt, reviewItemActionSchema as u, serviceAccountListSchema as v, personalTokenListSchema as w, startServiceAccountSignInResponseSchema as x, serviceAccountParamsSchema as y, activitySixHours as z };
|
|
715
|
+
export { codeRepositorySummarySchema as $, avatarParamsSchema as A, dailyConversationActivitySchema as B, createdPersonalTokenSchema as C, revokePersonalTokenResponseSchema as D, personalTokenParamsSchema as E, locationDirectoryReportSchema as F, startConnectionResponseSchema as G, connectionParamsSchema as H, locationParamsSchema as I, codeChangeSummarySchema as J, codeActivityDaySchema as K, activityDays as L, personalSpendReportSchema as M, locationActivityDayReportSchema as N, actorDirectoryReportSchema as O, locationDetailReportSchema as P, codeRepositoryReportSchema as Q, activityHours as R, createPersonalTokenBodySchema as S, personalTokenMetadataSchema as T, connectionSchema as U, connectionListSchema as V, disconnectConnectionResponseSchema as W, codePersonReportSchema as X, codeOverviewReportSchema as Y, codeRepositoryParamsSchema as Z, disconnectServiceAccountResponseSchema as _, conversationAutoArchiveSchema as _t, workspaceBodySchema as a, conversationStatsReportSchema as at, serviceAccountSchema as b, workspaceRepoSchema as c, conversationPendingAuthorizationSchema as ct, reviewItemCountSchema as d, conversationPendingMessagesReportSchema as dt, conversationWatchSchema as et, reviewItemListQuerySchema as f, steerConversationPendingMessagesBodySchema as ft, reviewItemWaitingConversationsSchema as g, archiveDoneConversationsResponseSchema as gt, reviewItemSchema as h, archiveConversationResponseSchema as ht, deleteWorkspaceResponseSchema as i, stopConversationTurnResponseSchema as it, personParamsSchema as j, actorProfileReportSchema as k, workspaceSchema as l, conversationPendingMessageDeliverySchema as lt, reviewItemParamsSchema as m, archiveConversationBodySchema as mt, statsReportSchema as n, conversationChildAgentSchema as nt, workspaceListSchema as o, cancelConversationPendingMessagesBodySchema as ot, reviewItemListSchema as p, steerConversationPendingMessagesResponseSchema as pt, codeChangeSummaryReportSchema as q, baselineSnapshotSchema as r, conversationChildAgentsReportSchema as rt, workspaceParamsSchema as s, cancelConversationPendingMessagesResponseSchema as st, statSchema as t, conversationWatchesReportSchema as tt, reviewItemActionSchema as u, conversationPendingMessageSchema as ut, serviceAccountListSchema as v, pinConversationBodySchema as vt, personalTokenListSchema as w, startServiceAccountSignInResponseSchema as x, serviceAccountParamsSchema as y, pinConversationResponseSchema as yt, activitySixHours as z };
|