@sentry/junior 0.226.0 → 0.227.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agent-hooks-FUetyyLe.js → agent-hooks-bEwEJhlg.js} +218 -11
- package/dist/{agent-runner-DEF7auSj.js → agent-runner-BGDSjciH.js} +114 -73
- package/dist/api/schema.d.ts +65 -6
- package/dist/api/schema.js +3 -3
- package/dist/api.js +52 -31
- package/dist/{app-TVL42pGL.d.ts → app-CjRIKZb5.d.ts} +1 -1
- package/dist/app.d.ts +1 -1
- package/dist/app.js +208 -136
- package/dist/{briefs-Cb4T2BUI.js → briefs-BkM_ZW4B.js} +4 -4
- package/dist/{catalog-runtime-BYGR3Dr4.js → catalog-runtime-Cw9V2jpn.js} +1 -1
- package/dist/{checkpoint-CJe-dZFF.js → checkpoint-oZYD3-Ar.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.js +3 -3
- package/dist/{client-C2WBBx7m.js → client-Pcxo3lGn.js} +2 -2
- package/dist/{config-Bws6Rpsh.js → config-CYvEow1F.js} +2 -2
- package/dist/{context-Bplcgypl.js → context-0Et9iVSB.js} +1 -1
- package/dist/{conversation-DPbmIwjy.js → conversation-BnhOMfEB.js} +49 -22
- package/dist/{conversation-privacy-pCcW0a5Y.js → conversation-privacy-hQmyZbOC.js} +1 -1
- package/dist/{credential-sync-ibuNsMyl.js → credential-sync-CUGbiiCM.js} +14 -14
- package/dist/{executor-D36FWjcf.js → executor-BXMlFrV6.js} +1 -1
- package/dist/{history-DI9KJT3J.d.ts → history-nukv1YN8.d.ts} +26 -1
- package/dist/images-8siTAUNW.js +82 -0
- package/dist/instrumentation.js +2 -2
- package/dist/{job-queue-2mFFDMHB.js → job-queue-AI0_QAgc.js} +1 -1
- package/dist/{logging-CvjMHRvg.js → logging-BPBx6WF-.js} +1 -1
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-authorization-l4O1rXsL.js → oauth-authorization-Cq1GaLIP.js} +1 -1
- package/dist/{oauth-callback-server-Ds8M5FFX.js → oauth-callback-server-CnF03VYh.js} +2 -2
- package/dist/{pending-auth-DLNJbD8H.js → pending-auth-CHUjr_6d.js} +1 -1
- package/dist/{profile-dvV7PB7u.js → profile-upzC-wN1.js} +4 -4
- package/dist/{prompt-DehgjkO5.js → prompt-CZIQcPHy.js} +1 -1
- package/dist/{registry-C6FHctIu.js → registry-DM5aMhjm.js} +2 -2
- package/dist/{resolve-DqwGI9wq.js → resolve-sF6Lg7Ay.js} +2 -2
- package/dist/{runner-CzYEcB73.js → runner-Bu2wYpK8.js} +10 -10
- package/dist/{sandbox-egress-signals-BZOv0fns.js → sandbox-egress-signals-Dgerhizb.js} +1 -1
- package/dist/{schema-BZg-xzfG.js → schema-BSiwcvjm.js} +1 -1
- package/dist/{skills-EhiVbjF4.js → skills-CAI5s___.js} +2 -2
- package/dist/{spawn-Ck3L0rEr.js → spawn-DRK9TBgY.js} +2 -2
- package/dist/{task-queue-TXhAWQwj.js → task-queue-iuDAqfZg.js} +3 -3
- package/dist/{task-runner-axUJS1No.js → task-runner-S3QtH38c.js} +10 -10
- package/dist/{thread-state-CTuWhjru.js → thread-state-C_arVuaN.js} +5 -5
- package/dist/{turn-failure-response-csVoLOzx.js → turn-failure-response-DarwGYgC.js} +9 -9
- package/dist/{turn-lifecycle-C1S6vELh.js → turn-lifecycle-CdiIejXH.js} +1 -1
- package/dist/{turn-session-routing-5RejBvit.js → turn-session-routing-DyLGd_wU.js} +1 -1
- package/dist/{validation-q2PFxkTQ.js → validation-BMig74Zp.js} +1 -1
- package/dist/{version-ByLtIYyy.js → version-lhQSfLjx.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{web-authorization-Biy8nsS7.js → web-authorization-r2lKYKJ2.js} +6 -6
- package/dist/{web-input-DM9LaEdn.js → web-input-BU-Fu7iq.js} +46 -36
- package/dist/{work-QrbHdXTc.js → work-B9koS8sW.js} +7 -7
- package/dist/{worker-r17aopXW.js → worker-C_iJSRgG.js} +5 -5
- package/package.json +5 -4
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { C as resolveGatewayCredential, S as getGatewayApiKey, _ as findProviderError, b as isProviderRetryError, c as COMPACTION_SUMMARY_PREFIX, d as isCompactionSummaryText, f as renderCurrentInstruction, g as createProviderError, h as ProviderError, i as completeText, l as MODEL_HANDOFF_SUMMARY_PREFIX, m as escapeXml, n as GEN_AI_SERVER_ADDRESS, o as resolveGatewayModel, p as unwrapCurrentInstruction, r as completeObject, s as ACTIVE_TURN_COMPACTION_SUMMARY_PREFIX, t as GEN_AI_PROVIDER_NAME, u as hasCompactedConversationContext, v as getProviderErrorAttributes, x as MISSING_GATEWAY_CREDENTIALS_ERROR } from "./client-
|
|
3
|
-
import { C as withLogContext, F as normalizeIdentityEmail, I as isRecord$3, L as toOptionalNumber, R as toOptionalString, a as extractGenAiUsageSummary, b as setTags, c as getLogContextAttributesForSpan, d as logException, f as logInfo, g as serializeGenAiAttribute, i as extractGenAiUsageAttributes, l as getTracePropagationHeaders, m as normalizeGenAiFinishReason, p as logWarn, s as getLogContextAttributes, u as logError, v as setSpanAttributes, w as withSpan, x as summarizeMessageText, y as setSpanStatus } from "./logging-
|
|
2
|
+
import { C as resolveGatewayCredential, S as getGatewayApiKey, _ as findProviderError, b as isProviderRetryError, c as COMPACTION_SUMMARY_PREFIX, d as isCompactionSummaryText, f as renderCurrentInstruction, g as createProviderError, h as ProviderError, i as completeText, l as MODEL_HANDOFF_SUMMARY_PREFIX, m as escapeXml, n as GEN_AI_SERVER_ADDRESS, o as resolveGatewayModel, p as unwrapCurrentInstruction, r as completeObject, s as ACTIVE_TURN_COMPACTION_SUMMARY_PREFIX, t as GEN_AI_PROVIDER_NAME, u as hasCompactedConversationContext, v as getProviderErrorAttributes, x as MISSING_GATEWAY_CREDENTIALS_ERROR } from "./client-Pcxo3lGn.js";
|
|
3
|
+
import { C as withLogContext, F as normalizeIdentityEmail, I as isRecord$3, L as toOptionalNumber, R as toOptionalString, a as extractGenAiUsageSummary, b as setTags, c as getLogContextAttributesForSpan, d as logException, f as logInfo, g as serializeGenAiAttribute, i as extractGenAiUsageAttributes, l as getTracePropagationHeaders, m as normalizeGenAiFinishReason, p as logWarn, s as getLogContextAttributes, u as logError, v as setSpanAttributes, w as withSpan, x as summarizeMessageText, y as setSpanStatus } from "./logging-BPBx6WF-.js";
|
|
4
4
|
import { m as startInactiveSpan, n as captureMessage, v as withActiveSpan } from "./sentry-CgWZM_kV.js";
|
|
5
|
-
import { a as toCanonicalInputMessage, c as toGenAiPayloadMetadata, i as runWithConversationPrivacy, l as toGenAiPayloadTraceAttributes, o as toCanonicalOutputMessage, r as resolveConversationPrivacy, s as toGenAiMessagesTraceAttributes, t as canExposeConversationPayload } from "./conversation-privacy-
|
|
6
|
-
import { a as getChatConfig, h as normalizeSlackEmojiName, n as botConfig } from "./config-
|
|
5
|
+
import { a as toCanonicalInputMessage, c as toGenAiPayloadMetadata, i as runWithConversationPrivacy, l as toGenAiPayloadTraceAttributes, o as toCanonicalOutputMessage, r as resolveConversationPrivacy, s as toGenAiMessagesTraceAttributes, t as canExposeConversationPayload } from "./conversation-privacy-hQmyZbOC.js";
|
|
6
|
+
import { a as getChatConfig, h as normalizeSlackEmojiName, n as botConfig } from "./config-CYvEow1F.js";
|
|
7
7
|
import { a as formatModelProfiles, c as profileConfig, i as formatModelProfile, l as TURN_REASONING_LEVELS, n as ModelProfileNotConfiguredError, o as modelIdForProfile, s as modelProfileSchema } from "./model-profile-BwU8mqwD.js";
|
|
8
|
-
import {
|
|
9
|
-
import { A as tryWorkspaceRepoCheckoutPath, B as downloadPrivateSlackFile, C as invalidateReadySnapshot, D as SANDBOX_RUNTIME, E as setWorkspaceSnapshotBuild,
|
|
8
|
+
import { b as parseSlackMessageTs, d as parseStoredSlackActor, g as parseSlackUserId, h as parseSlackTeamId, i as credentialUserSubjectId, l as isUserActor, m as parseSlackChannelReferenceId, n as credentialContextSchema, p as parseSlackChannelId, t as credentialContextForActor } from "./context-0Et9iVSB.js";
|
|
9
|
+
import { $t as getDb, A as tryWorkspaceRepoCheckoutPath, B as downloadPrivateSlackFile, C as invalidateReadySnapshot, D as SANDBOX_RUNTIME, E as setWorkspaceSnapshotBuild, G as isDmChannel$1, Ht as createPluginAnnotations, J as withSlackRetries, K as normalizeSlackConversationId, Lt as matchSlackAttachments, M as resolveChannelCapabilities, O as deleteWorkspaceSnapshotBuilders, Q as readActorIdentity, Qt as getConversationStore, S as WorkspaceValidationError, St as createPluginLogger, T as setWorkspaceSnapshot, U as getSlackClient, V as getFilePermalink, Vt as saveObjectAnnotations, W as isConversationScopedChannel, Xt as getConversationEventStore, Zt as getConversationMessageSearchStore, _ as deleteWorkspace, _n as parseDestination, _t as getDashboardTaskLink, at as STOP_WATCHING_TOOL_NAME, b as listWorkspaces, c as getPluginTools, dn as hasAgentTurnUsage, dt as deliverWatch, en as getSqlExecutor, ft as findMatchingWatches, g as createWorkspace, gt as getDashboardConversationLink, ht as JUNIOR_THREAD_STATE_TTL_MS, it as RESOURCE_WATCH_TOOL_SOURCE, j as workspaceRepoCheckoutPath, k as getWorkspaceSnapshotBuilder, l as getPluginUserPromptContributions, lt as createTimerWatch, n as applyPluginFormatMarkdown, nt as RESOURCE_SUBSCRIPTION_DEFAULT_TTL_MS, ot as cancelSubscriptions, pt as listWatches, r as createPluginHookRunner, rt as RESOURCE_SUBSCRIPTION_MAX_TTL_MS, s as getPluginSystemPromptContributions, sn as addAgentTurnUsage, st as cancelWatch, tt as getSlackToolContext, u as getPlugins, ut as createWatch, v as getWorkspace, w as loadSnapshotsForProfile, x as updateWorkspace, y as getWorkspaceByName, yn as sameDestination$1, z as SlackActionError } from "./agent-hooks-bEwEJhlg.js";
|
|
10
10
|
import { n as juniorDestinations } from "./destinations-BeBiJeEM.js";
|
|
11
|
-
import { D as juniorIdentities, E as juniorConversations, a as juniorSchedulerRuns, c as juniorStats, d as AGENT_INVOCATION_MAILBOX_STATUSES, g as juniorConversationBriefs, k as juniorArtifacts, l as juniorEventAutomations, o as juniorSchedulerTasks, w as juniorAttachments, x as juniorConversationAnnotations } from "./executor-
|
|
12
|
-
import {
|
|
11
|
+
import { D as juniorIdentities, E as juniorConversations, a as juniorSchedulerRuns, c as juniorStats, d as AGENT_INVOCATION_MAILBOX_STATUSES, g as juniorConversationBriefs, k as juniorArtifacts, l as juniorEventAutomations, o as juniorSchedulerTasks, w as juniorAttachments, x as juniorConversationAnnotations } from "./executor-BXMlFrV6.js";
|
|
12
|
+
import { $ as contextProvenance, B as briefLinkSchema, H as conversationBriefSchema, R as isVisionImageMediaType, V as briefOutcomeStatusSchema, W as KNOWN_CONVERSATION_EVENT_TYPES, et as instructionActors, j as messageCardRefSchema, nt as sameActorIdentity, tt as instructionProvenanceFor } from "./conversation-BnhOMfEB.js";
|
|
13
13
|
import { a as listReferenceFiles, c as soulPathCandidates, l as worldPathCandidates } from "./package-discovery-7a9YqLhE.js";
|
|
14
|
-
import { a as resolveAuthTokenPlaceholder, c as fetchWithBoundedOAuthErrorBodies, d as CredentialUnavailableError, i as resolvePluginHeaderEnvRefs, l as getOAuthProviderErrorAttributes, o as resolvePluginCommandEnv, s as OAuthProviderError } from "./registry-
|
|
15
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
16
|
-
import { a as parseSkillInvocation, n as findSkillByName, r as loadSkillsByName, t as discoverSkills } from "./skills-
|
|
17
|
-
import { $ as fallbackShortTitle, C as isToolResultError, D as stripRuntimeTurnContext, E as retainRuntimeTurnContext, F as loadTurnRoute, G as recordToolExecutionStarted, H as recordGuardianActionReviewed, I as openConversationProjection, K as recordTurnRoute, L as recordAgentsInstructionsUpdated, M as loadConnectedMcpProviders, N as loadConversationProjection, O as trimTrailingAssistantMessages, R as recordAttachmentsDelivered, S as isContinuablePiBoundary, T as normalizeToolNameFromResult, U as recordMcpProviderConnected, V as recordAuthorizationRequested, _ as getTerminalAssistantMessages, _t as piMessageFromHistoryItem, d as TurnSliceLimitExceededError, et as generateShortTitle, f as assertTurnToolCallLimit, g as getPiMessageRole, gt as historyItemFromPiMessage, h as extractAssistantText, ht as getAgentContextInputLimitTokens, k as TURN_CONTEXT_TAG, m as isTurnExecutionLimitExceededError, mt as getAgentContextCompactionTriggerTokens, n as loadTurnCheckpoint, pt as estimateTextTokens, r as saveTurnCheckpoint, t as continuableMessages, tt as resolveTaskTitle, v as getUserMessageInstructionText, w as isToolResultMessage, x as isAssistantMessage, y as hasRuntimeTurnContext } from "./checkpoint-
|
|
18
|
-
import { A as SANDBOX_DATA_ROOT, C as getDefaultRedisStateAdapterFor, D as fenceLock, E as acquireActiveLock, F as sandboxSkillFile, I as sandboxSkillPathResolution, M as SANDBOX_SKILLS_ROOT, N as SANDBOX_WORKSPACE_ROOT, O as withLock, P as sandboxSkillDir, _ as workspaceSnapshotNotReadyUserMessage, a as isAbortError, b as buildNonInteractiveShellScript, c as isSandboxCommandStreamInterruptedError, d as isSnapshottingError, f as throwSandboxOperationError, g as isWorkspaceSnapshotNotReadyError, h as getWorkspaceSnapshotNotReadyError, i as ensureDockerDaemon, j as SANDBOX_REPOS_ROOT, k as sleep$2, l as isSandboxMissingError, m as WorkspaceSnapshotNotReadyError, n as hash, o as isAlreadyExistsError, p as wrapSandboxSetupError, r as isStale, s as isSandboxApiTransientError, t as create, u as isSandboxUnavailableError, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand, y as buildCommandScript } from "./profile-
|
|
19
|
-
import { n as canReusePendingAuthLink, t as abandonReplacedPendingAuth } from "./pending-auth-
|
|
20
|
-
import { a as NO_REPLY_MARKER, c as CooperativeTurnYieldError, i as sanitizeAssistantText, l as TurnInputCommitLostError, n as decideReply, o as isNoReplyMarker, p as isTurnInputCommitLostError, r as getAssistantReplyText, t as authorizationId } from "./oauth-authorization-
|
|
21
|
-
import { r as EVENT_AUTHOR_ID } from "./prompt-
|
|
22
|
-
import { a as createSandboxSession, c as postinstall, d as getSandboxResources, i as bindSandboxFileSystem, l as setSnapshotSpanAttributes, n as isMissingError, o as stopSession, r as resolve$1, s as dependencies } from "./resolve-
|
|
23
|
-
import { a as getVercelConversationWorkQueue, f as getTurnRequestDeadline, n as sendNextWorkspaceSnapshotJob, r as sendWorkspaceSnapshotJob } from "./job-queue-
|
|
14
|
+
import { a as resolveAuthTokenPlaceholder, c as fetchWithBoundedOAuthErrorBodies, d as CredentialUnavailableError, i as resolvePluginHeaderEnvRefs, l as getOAuthProviderErrorAttributes, o as resolvePluginCommandEnv, s as OAuthProviderError } from "./registry-DM5aMhjm.js";
|
|
15
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-Cw9V2jpn.js";
|
|
16
|
+
import { a as parseSkillInvocation, n as findSkillByName, r as loadSkillsByName, t as discoverSkills } from "./skills-CAI5s___.js";
|
|
17
|
+
import { $ as fallbackShortTitle, C as isToolResultError, D as stripRuntimeTurnContext, E as retainRuntimeTurnContext, F as loadTurnRoute, G as recordToolExecutionStarted, H as recordGuardianActionReviewed, I as openConversationProjection, K as recordTurnRoute, L as recordAgentsInstructionsUpdated, M as loadConnectedMcpProviders, N as loadConversationProjection, O as trimTrailingAssistantMessages, R as recordAttachmentsDelivered, S as isContinuablePiBoundary, T as normalizeToolNameFromResult, U as recordMcpProviderConnected, V as recordAuthorizationRequested, _ as getTerminalAssistantMessages, _t as piMessageFromHistoryItem, d as TurnSliceLimitExceededError, et as generateShortTitle, f as assertTurnToolCallLimit, g as getPiMessageRole, gt as historyItemFromPiMessage, h as extractAssistantText, ht as getAgentContextInputLimitTokens, k as TURN_CONTEXT_TAG, m as isTurnExecutionLimitExceededError, mt as getAgentContextCompactionTriggerTokens, n as loadTurnCheckpoint, pt as estimateTextTokens, r as saveTurnCheckpoint, t as continuableMessages, tt as resolveTaskTitle, v as getUserMessageInstructionText, w as isToolResultMessage, x as isAssistantMessage, y as hasRuntimeTurnContext } from "./checkpoint-oZYD3-Ar.js";
|
|
18
|
+
import { A as SANDBOX_DATA_ROOT, C as getDefaultRedisStateAdapterFor, D as fenceLock, E as acquireActiveLock, F as sandboxSkillFile, I as sandboxSkillPathResolution, M as SANDBOX_SKILLS_ROOT, N as SANDBOX_WORKSPACE_ROOT, O as withLock, P as sandboxSkillDir, _ as workspaceSnapshotNotReadyUserMessage, a as isAbortError, b as buildNonInteractiveShellScript, c as isSandboxCommandStreamInterruptedError, d as isSnapshottingError, f as throwSandboxOperationError, g as isWorkspaceSnapshotNotReadyError, h as getWorkspaceSnapshotNotReadyError, i as ensureDockerDaemon, j as SANDBOX_REPOS_ROOT, k as sleep$2, l as isSandboxMissingError, m as WorkspaceSnapshotNotReadyError, n as hash, o as isAlreadyExistsError, p as wrapSandboxSetupError, r as isStale, s as isSandboxApiTransientError, t as create, u as isSandboxUnavailableError, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand, y as buildCommandScript } from "./profile-upzC-wN1.js";
|
|
19
|
+
import { n as canReusePendingAuthLink, t as abandonReplacedPendingAuth } from "./pending-auth-CHUjr_6d.js";
|
|
20
|
+
import { a as NO_REPLY_MARKER, c as CooperativeTurnYieldError, i as sanitizeAssistantText, l as TurnInputCommitLostError, n as decideReply, o as isNoReplyMarker, p as isTurnInputCommitLostError, r as getAssistantReplyText, t as authorizationId } from "./oauth-authorization-Cq1GaLIP.js";
|
|
21
|
+
import { r as EVENT_AUTHOR_ID } from "./prompt-CZIQcPHy.js";
|
|
22
|
+
import { a as createSandboxSession, c as postinstall, d as getSandboxResources, i as bindSandboxFileSystem, l as setSnapshotSpanAttributes, n as isMissingError, o as stopSession, r as resolve$1, s as dependencies } from "./resolve-sF6Lg7Ay.js";
|
|
23
|
+
import { a as getVercelConversationWorkQueue, f as getTurnRequestDeadline, n as sendNextWorkspaceSnapshotJob, r as sendWorkspaceSnapshotJob } from "./job-queue-AI0_QAgc.js";
|
|
24
24
|
import { n as privateTraceResultAttributes } from "./private-trace-result-BLvBjy_e.js";
|
|
25
25
|
import { streamSimple } from "@earendil-works/pi-ai/compat";
|
|
26
26
|
import { createGatewayProvider } from "@ai-sdk/gateway";
|
|
@@ -1845,19 +1845,6 @@ function buildTurnContextPrompt(params) {
|
|
|
1845
1845
|
].filter((section) => Boolean(section)).join("\n\n");
|
|
1846
1846
|
}
|
|
1847
1847
|
//#endregion
|
|
1848
|
-
//#region src/chat/attachments/media.ts
|
|
1849
|
-
const VISION_IMAGE_MEDIA_TYPES = /* @__PURE__ */ new Set([
|
|
1850
|
-
"image/gif",
|
|
1851
|
-
"image/jpeg",
|
|
1852
|
-
"image/png",
|
|
1853
|
-
"image/webp"
|
|
1854
|
-
]);
|
|
1855
|
-
/** Report whether a media type is a raster image accepted by vision models. */
|
|
1856
|
-
function isVisionImageMediaType(mediaType) {
|
|
1857
|
-
const normalized = mediaType.split(";", 1)[0]?.trim().toLowerCase();
|
|
1858
|
-
return normalized ? VISION_IMAGE_MEDIA_TYPES.has(normalized) : false;
|
|
1859
|
-
}
|
|
1860
|
-
//#endregion
|
|
1861
1848
|
//#region src/chat/agent/prompt.ts
|
|
1862
1849
|
/**
|
|
1863
1850
|
* Per-run prompt assembly.
|
|
@@ -1990,6 +1977,14 @@ function buildUserTurnInput(args) {
|
|
|
1990
1977
|
});
|
|
1991
1978
|
continue;
|
|
1992
1979
|
}
|
|
1980
|
+
if (attachment.attachmentId) userContentParts.push({
|
|
1981
|
+
type: "text",
|
|
1982
|
+
text: `Stored attachment: ${JSON.stringify({
|
|
1983
|
+
attachment_id: attachment.attachmentId,
|
|
1984
|
+
filename: attachment.filename,
|
|
1985
|
+
media_type: attachment.mediaType
|
|
1986
|
+
})}. Use loadAttachment to access the original file.`
|
|
1987
|
+
});
|
|
1993
1988
|
if (isVisionImageMediaType(attachment.mediaType)) {
|
|
1994
1989
|
if (!attachment.data) throw new Error("Image attachment is missing image data");
|
|
1995
1990
|
userContentParts.push({
|
|
@@ -5559,11 +5554,15 @@ function workspaceSnapshotFinishedEvent(input) {
|
|
|
5559
5554
|
* every enabled plugin registration. Plugins may not use the `junior` namespace.
|
|
5560
5555
|
*/
|
|
5561
5556
|
function getEventCatalog() {
|
|
5562
|
-
const catalog = { [CORE_EVENT_NAMESPACE]: workspaceSnapshotEvents()
|
|
5557
|
+
const catalog = { [CORE_EVENT_NAMESPACE]: { resourceTypes: [...workspaceSnapshotEvents().resourceTypes, {
|
|
5558
|
+
type: "timer",
|
|
5559
|
+
supportedEvents: ["timer.fired"],
|
|
5560
|
+
suggestedEvents: []
|
|
5561
|
+
}] } };
|
|
5563
5562
|
for (const plugin of getPlugins()) {
|
|
5564
5563
|
const registration = plugin.events;
|
|
5565
5564
|
if (!registration || registration.isEnabled?.() === false) continue;
|
|
5566
|
-
if (plugin.manifest.name === "junior") throw new Error(`Plugin "${CORE_EVENT_NAMESPACE}" cannot register events; that namespace is reserved for core
|
|
5565
|
+
if (plugin.manifest.name === "junior") throw new Error(`Plugin "${CORE_EVENT_NAMESPACE}" cannot register events; that namespace is reserved for core events`);
|
|
5567
5566
|
catalog[plugin.manifest.name] = registration;
|
|
5568
5567
|
}
|
|
5569
5568
|
return catalog;
|
|
@@ -9945,7 +9944,8 @@ const listedResourceWatchSchema = z.object({
|
|
|
9945
9944
|
events: z.array(z.string().min(1)).min(1),
|
|
9946
9945
|
match: z.record(z.string(), z.unknown()).optional(),
|
|
9947
9946
|
intent: z.string().min(1),
|
|
9948
|
-
expiresAtMs: z.number().finite()
|
|
9947
|
+
expiresAtMs: z.number().finite(),
|
|
9948
|
+
firesAtMs: z.number().finite().optional()
|
|
9949
9949
|
}).strict();
|
|
9950
9950
|
const resultDataSchema$2 = z.object({ subscriptions: z.array(listedResourceWatchSchema) }).strict();
|
|
9951
9951
|
const outputSchema$5 = juniorToolOutputSchema.merge(resultDataSchema$2);
|
|
@@ -9973,7 +9973,8 @@ function createListWatchesTool(context) {
|
|
|
9973
9973
|
events: subscription.events,
|
|
9974
9974
|
...subscription.match ? { match: subscription.match } : void 0,
|
|
9975
9975
|
intent: subscription.intent,
|
|
9976
|
-
expiresAtMs: subscription.expiresAtMs
|
|
9976
|
+
expiresAtMs: subscription.expiresAtMs,
|
|
9977
|
+
firesAtMs: subscription.firesAtMs
|
|
9977
9978
|
})) };
|
|
9978
9979
|
}
|
|
9979
9980
|
});
|
|
@@ -10083,6 +10084,7 @@ function createStopWatchingResourcesTool(context) {
|
|
|
10083
10084
|
id
|
|
10084
10085
|
});
|
|
10085
10086
|
if (!stopped) throw new ToolInputError("Watch was not found in the current conversation.");
|
|
10087
|
+
if (stopped.status === "completed") throw new ToolInputError("Watch already completed; delivered input cannot be recalled.");
|
|
10086
10088
|
stoppedIds = [stopped.id];
|
|
10087
10089
|
} else {
|
|
10088
10090
|
const subscriptions = await listWatches({ conversationId: context.conversationId });
|
|
@@ -10097,6 +10099,40 @@ function createStopWatchingResourcesTool(context) {
|
|
|
10097
10099
|
});
|
|
10098
10100
|
}
|
|
10099
10101
|
//#endregion
|
|
10102
|
+
//#region src/chat/tools/watch-timer.ts
|
|
10103
|
+
/** Create one heartbeat-backed Watch in the current Conversation. */
|
|
10104
|
+
function createWatchTimerTool(context) {
|
|
10105
|
+
return zodTool({
|
|
10106
|
+
annotations: {
|
|
10107
|
+
destructiveHint: false,
|
|
10108
|
+
idempotentHint: true,
|
|
10109
|
+
openWorldHint: false,
|
|
10110
|
+
readOnlyHint: false
|
|
10111
|
+
},
|
|
10112
|
+
description: "Wake this conversation once after a delay so you can check back later. Returns immediately. Timing is approximate. Use watchEvents instead when you can watch for the event.",
|
|
10113
|
+
inputSchema: z.object({
|
|
10114
|
+
afterMs: z.number().int().positive().max(RESOURCE_SUBSCRIPTION_MAX_TTL_MS - 864e5).describe("Delay in milliseconds, up to 29 days."),
|
|
10115
|
+
intent: z.string().trim().min(1).max(1e3).describe("What to do when the timer fires.")
|
|
10116
|
+
}).strict(),
|
|
10117
|
+
outputSchema: z.object({
|
|
10118
|
+
id: z.string(),
|
|
10119
|
+
firesAtMs: z.number()
|
|
10120
|
+
}).strict(),
|
|
10121
|
+
async execute(input, options) {
|
|
10122
|
+
if (!options.toolCallId) throw new Error("Timer creation requires a tool-call identity");
|
|
10123
|
+
const watch = await createTimerWatch({
|
|
10124
|
+
...input,
|
|
10125
|
+
conversationId: context.conversationId,
|
|
10126
|
+
toolCallId: options.toolCallId
|
|
10127
|
+
});
|
|
10128
|
+
return {
|
|
10129
|
+
id: watch.id,
|
|
10130
|
+
firesAtMs: watch.firesAtMs
|
|
10131
|
+
};
|
|
10132
|
+
}
|
|
10133
|
+
});
|
|
10134
|
+
}
|
|
10135
|
+
//#endregion
|
|
10100
10136
|
//#region src/chat/tools/watch-events.ts
|
|
10101
10137
|
function inputSchema(catalog) {
|
|
10102
10138
|
return z.object({
|
|
@@ -10161,6 +10197,7 @@ function createWatchEventsTool(context, catalog) {
|
|
|
10161
10197
|
inputSchema: inputSchema(catalog),
|
|
10162
10198
|
outputSchema: outputSchema$2,
|
|
10163
10199
|
async execute(input) {
|
|
10200
|
+
if (input.namespace === "junior" && input.resourceType === "timer") throw new ToolInputError("Use watchTimer to create a timer Watch.");
|
|
10164
10201
|
const events = cleanStrings(input.events);
|
|
10165
10202
|
for (const eventType of events) if (!pluginSupportsEvent(catalog, input.namespace, input.resourceType, eventType)) throw new ToolInputError(`Resource type "${input.namespace}:${input.resourceType}" does not support event "${eventType}".`);
|
|
10166
10203
|
const intent = input.intent.trim();
|
|
@@ -10204,8 +10241,10 @@ function createWatchEventsTool(context, catalog) {
|
|
|
10204
10241
|
//#region src/chat/tools/events.ts
|
|
10205
10242
|
/** Build the complete resource-watch tool set for this runtime context. */
|
|
10206
10243
|
function createEventTools(context, catalog) {
|
|
10244
|
+
const enabled = hasEventCatalogEntries(catalog);
|
|
10207
10245
|
return {
|
|
10208
|
-
|
|
10246
|
+
watchTimer: createWatchTimerTool(context),
|
|
10247
|
+
...enabled ? {
|
|
10209
10248
|
searchEventTypes: createSearchEventTypesTool(catalog),
|
|
10210
10249
|
watchEvents: createWatchEventsTool(context, catalog)
|
|
10211
10250
|
} : void 0,
|
|
@@ -12315,6 +12354,7 @@ function createScheduledAutomationTools(context) {
|
|
|
12315
12354
|
}
|
|
12316
12355
|
//#endregion
|
|
12317
12356
|
//#region src/chat/slack/channel.ts
|
|
12357
|
+
const replySubtypeSchema = z.object({ subtype: z.string().optional() });
|
|
12318
12358
|
/** List channel history using Slack-native, pre-validated timestamp bounds. */
|
|
12319
12359
|
async function listChannelMessages(input) {
|
|
12320
12360
|
const client = getSlackClient();
|
|
@@ -12366,7 +12406,10 @@ async function listThreadReplies(input) {
|
|
|
12366
12406
|
cursor
|
|
12367
12407
|
}), 3, { action: "conversations.replies" });
|
|
12368
12408
|
const batch = response.messages ?? [];
|
|
12369
|
-
replies.push(...batch)
|
|
12409
|
+
replies.push(...batch.map((reply) => ({
|
|
12410
|
+
...reply,
|
|
12411
|
+
...replySubtypeSchema.parse(reply)
|
|
12412
|
+
})));
|
|
12370
12413
|
for (const reply of batch) if (typeof reply.ts === "string" && pendingTargets.size > 0) pendingTargets.delete(reply.ts);
|
|
12371
12414
|
cursor = response.response_metadata?.next_cursor || void 0;
|
|
12372
12415
|
if (!cursor || hasTargetMessages && pendingTargets.size === 0) break;
|
|
@@ -12381,15 +12424,14 @@ async function getConversationInfo(channelId) {
|
|
|
12381
12424
|
idempotent: true
|
|
12382
12425
|
})).channel;
|
|
12383
12426
|
if (!channel || typeof channel !== "object") throw new Error(`Slack conversations.info returned no channel for ${channelId}`);
|
|
12384
|
-
const record = channel;
|
|
12385
12427
|
return {
|
|
12386
12428
|
id: channelId,
|
|
12387
|
-
...typeof
|
|
12388
|
-
isChannel:
|
|
12389
|
-
isPrivate:
|
|
12390
|
-
isIm:
|
|
12391
|
-
isMpim:
|
|
12392
|
-
...typeof
|
|
12429
|
+
...typeof channel.name === "string" && channel.name ? { name: channel.name } : void 0,
|
|
12430
|
+
isChannel: channel.is_channel === true,
|
|
12431
|
+
isPrivate: channel.is_private === true,
|
|
12432
|
+
isIm: channel.is_im === true,
|
|
12433
|
+
isMpim: channel.is_mpim === true,
|
|
12434
|
+
...typeof channel.is_member === "boolean" ? { isMember: channel.is_member } : void 0
|
|
12393
12435
|
};
|
|
12394
12436
|
}
|
|
12395
12437
|
/** Join a public channel so the bot can read history and threads there. */
|
|
@@ -14225,7 +14267,7 @@ function createSlackCanvasWriteTool(state) {
|
|
|
14225
14267
|
//#endregion
|
|
14226
14268
|
//#region src/chat/slack/tool-support/list/api.ts
|
|
14227
14269
|
function normalizeKey(value) {
|
|
14228
|
-
return value.toLowerCase().replace(/[^a-z0-9]+/g, "_");
|
|
14270
|
+
return (value ?? "").toLowerCase().replace(/[^a-z0-9]+/g, "_");
|
|
14229
14271
|
}
|
|
14230
14272
|
/** Infer well-known column roles (title, completed, assignee, due date) from a list schema. */
|
|
14231
14273
|
function inferListColumnMap(schema = []) {
|
|
@@ -14310,11 +14352,10 @@ async function createTodoList(name) {
|
|
|
14310
14352
|
/** Read a Slack list schema and map its standard columns. */
|
|
14311
14353
|
async function getListColumnMap(listId) {
|
|
14312
14354
|
const client = getSlackClient();
|
|
14313
|
-
|
|
14355
|
+
return inferListColumnMap((await withSlackRetries(() => client.files.info({ file: listId }), 3, {
|
|
14314
14356
|
action: "files.info",
|
|
14315
14357
|
idempotent: true
|
|
14316
|
-
})).file;
|
|
14317
|
-
return inferListColumnMap(file?.list_metadata?.schema ?? []);
|
|
14358
|
+
})).file?.list_metadata?.schema);
|
|
14318
14359
|
}
|
|
14319
14360
|
/** Add one or more items to an existing Slack list. */
|
|
14320
14361
|
async function addListItems(input) {
|
|
@@ -14817,25 +14858,6 @@ function renderAttachmentText(input) {
|
|
|
14817
14858
|
return getAttachmentPayload(input).slice(0, MAX_ATTACHMENTS).map(renderAttachment).filter((line) => line.length > 0).map((line) => `[attachment] ${line}`).join("\n").slice(0, MAX_ATTACHMENT_TEXT_CHARS);
|
|
14818
14859
|
}
|
|
14819
14860
|
//#endregion
|
|
14820
|
-
//#region src/chat/slack/attachments.ts
|
|
14821
|
-
/** Save the vision summary for a stored Slack attachment. */
|
|
14822
|
-
async function recordSlackAttachment(args) {
|
|
14823
|
-
await args.db.db().update(juniorAttachments).set({ visionSummary: args.visionSummary }).where(and(eq(juniorAttachments.id, args.attachmentId), eq(juniorAttachments.conversationId, args.conversationId), isNull(juniorAttachments.deleteRequestedAt)));
|
|
14824
|
-
}
|
|
14825
|
-
/** Read a saved vision summary for one live attachment. */
|
|
14826
|
-
async function readAttachmentVisionSummary(args) {
|
|
14827
|
-
const [row] = await args.db.db().select({ visionSummary: juniorAttachments.visionSummary }).from(juniorAttachments).where(and(eq(juniorAttachments.id, args.attachmentId), eq(juniorAttachments.conversationId, args.conversationId), isNull(juniorAttachments.deleteRequestedAt)));
|
|
14828
|
-
return row?.visionSummary;
|
|
14829
|
-
}
|
|
14830
|
-
/** Match live conversation attachments to Slack file ids. */
|
|
14831
|
-
async function matchSlackAttachments(args) {
|
|
14832
|
-
if (args.providerIds.length === 0) return [];
|
|
14833
|
-
return await args.db.db().select({
|
|
14834
|
-
id: juniorAttachments.id,
|
|
14835
|
-
providerId: juniorAttachments.providerId
|
|
14836
|
-
}).from(juniorAttachments).where(and(eq(juniorAttachments.conversationId, args.conversationId), eq(juniorAttachments.provider, "slack"), inArray(juniorAttachments.providerId, args.providerIds), isNull(juniorAttachments.deleteRequestedAt)));
|
|
14837
|
-
}
|
|
14838
|
-
//#endregion
|
|
14839
14861
|
//#region src/chat/slack/tools/thread-read.ts
|
|
14840
14862
|
const MAX_THREAD_READ_CHARS = 4e4;
|
|
14841
14863
|
/**
|
|
@@ -15009,10 +15031,15 @@ function createSlackThreadReadTool(context, attachmentDeps) {
|
|
|
15009
15031
|
}
|
|
15010
15032
|
//#endregion
|
|
15011
15033
|
//#region src/chat/slack/users.ts
|
|
15034
|
+
const profileFieldsSchema = z.object({ fields: z.record(z.string(), z.object({
|
|
15035
|
+
value: z.string().optional(),
|
|
15036
|
+
alt: z.string().optional(),
|
|
15037
|
+
label: z.string().optional()
|
|
15038
|
+
}).nullable()).nullish() });
|
|
15012
15039
|
function normalizeUser(raw) {
|
|
15013
|
-
const rawFields = raw.profile
|
|
15040
|
+
const rawFields = profileFieldsSchema.parse(raw.profile ?? {}).fields;
|
|
15014
15041
|
const profileFields = [];
|
|
15015
|
-
if (rawFields
|
|
15042
|
+
if (rawFields) for (const [id, field] of Object.entries(rawFields)) {
|
|
15016
15043
|
if (!field) continue;
|
|
15017
15044
|
profileFields.push({
|
|
15018
15045
|
id,
|
|
@@ -15061,7 +15088,7 @@ async function lookupSlackUserByEmail(email) {
|
|
|
15061
15088
|
try {
|
|
15062
15089
|
result = await withSlackRetries(() => client.users.lookupByEmail({ email }), 3, { action: "users.lookupByEmail" });
|
|
15063
15090
|
} catch (error) {
|
|
15064
|
-
if (error.apiError === "users_not_found") return null;
|
|
15091
|
+
if (error instanceof SlackActionError && error.apiError === "users_not_found") return null;
|
|
15065
15092
|
throw error;
|
|
15066
15093
|
}
|
|
15067
15094
|
const user = result.user;
|
|
@@ -21869,7 +21896,7 @@ function createAgentRunner(execute, options) {
|
|
|
21869
21896
|
const canBindSpawn = Boolean(bindSpawnAgent) && isExperimentalFeatureEnabled("subagents");
|
|
21870
21897
|
return { run: async (run) => {
|
|
21871
21898
|
const spawnAgent = bindSpawnAgent && canBindSpawn && !isAgentRunFeatureDisabled(run.disabledFeatures, "subagents") ? bindSpawnAgent(run) : void 0;
|
|
21872
|
-
|
|
21899
|
+
const nextRun = {
|
|
21873
21900
|
...run,
|
|
21874
21901
|
environment: {
|
|
21875
21902
|
...run.environment,
|
|
@@ -21880,7 +21907,21 @@ function createAgentRunner(execute, options) {
|
|
|
21880
21907
|
...run.durability,
|
|
21881
21908
|
spawnAgent
|
|
21882
21909
|
} } : void 0
|
|
21883
|
-
}
|
|
21910
|
+
};
|
|
21911
|
+
if (run.instruction.storedAttachments?.length) {
|
|
21912
|
+
const { loadInputImages } = await import("./images-8siTAUNW.js").then((n) => n.n);
|
|
21913
|
+
const storage = nextRun.environment?.attachmentStorage;
|
|
21914
|
+
if (!storage) throw new Error("Attachment storage is unavailable.");
|
|
21915
|
+
nextRun.instruction = {
|
|
21916
|
+
...run.instruction,
|
|
21917
|
+
attachments: await loadInputImages({
|
|
21918
|
+
attachments: run.instruction.storedAttachments,
|
|
21919
|
+
conversationId: run.conversationId,
|
|
21920
|
+
storage
|
|
21921
|
+
})
|
|
21922
|
+
};
|
|
21923
|
+
}
|
|
21924
|
+
return await execute(nextRun, streamFn);
|
|
21884
21925
|
} };
|
|
21885
21926
|
}
|
|
21886
21927
|
async function waitForAgentSettlement(runPromise) {
|
|
@@ -21919,4 +21960,4 @@ async function runAgentWithTimeout(agentRunner, run, timeoutMs) {
|
|
|
21919
21960
|
}
|
|
21920
21961
|
}
|
|
21921
21962
|
//#endregion
|
|
21922
|
-
export {
|
|
21963
|
+
export { collectEventAutomationMatchKeys as $, recordFinishedTurnForAutomatedLimit as $t, requestAttachmentDeletion as A, getConfigDefaults as An, deadLetterAttempt as At, isListedScheduledAutomation as B, removeActiveConversation as Bt, readPublicArtifact as C, createUserTokenStore as Cn, cancelHumanFacingPendingMessages as Ct, renderBlockText as D, toolInvocationDestination as Dn, completeConversationStop as Dt, renderAttachmentText as E, actorFromRun as En, clearExpiredConversationLease as Et, resolveSlackChannelIdFromThreadId as F, hasRunnableConversationWork as Ft, readScheduledAutomation as G, CONVERSATION_WORK_CHECK_IN_INTERVAL_MS as Gt, listScheduledAutomations as H, requestConversationWork as Ht, listThreadReplies as I, listActiveConversationIds as It, scheduledRunId as J, hasRunnableConversationWork$1 as Jt, saveScheduledAutomation as K, CONVERSATION_WORK_STALE_ENQUEUE_MS as Kt, logScheduledAutomationRunSkipped as L, recordAttemptFailure as Lt, parseSlackThreadId as M, ensureConversationWake as Mt, readSlackRawMessageContext as N, getConversation as Nt, collectAttachmentGarbage as O, AuthorizationFlowDisabledError as On, completeConversationWork as Ot, resolveSlackChannelIdFromMessage as P, getConversationWorkState as Pt, effectiveTaskOutcomes as Q, maybePostAutomatedTurnLimitNotice as Qt, scheduledAutomationRunAttributes as R, recordConversationRetry as Rt, publicArtifactHeaders as S, slackExternalRefIdSchema as Sn, beginConversationResume as St, lookupSlackUserProfile as T, RetryableDeliveryError as Tn, clearConsumedConversationWake as Tt, listScheduledAutomationsForTeam as U, startConversationWork as Ut, listPublicScheduledAutomationsForTeams as V, requestAnotherSlice as Vt, parseScheduledAutomationRow as W, stopConversationWork as Wt, scheduledRunSchema as X, isInvalidConversationRecordError as Xt, withScheduledAutomationLock as Y, isFinalAttempt as Yt, eventAutomationTriggerAvailable as Z, renderTaskInput as Zt, putMcpStoredOAuthCredentials as _, truncateStatusText as _n, getEventCatalog as _t, isExperimentalFeatureEnabled as a, consumeSandboxEgressAuthRequiredSignal as an, listEventAutomationsCreatedBy as at, readStats as b, removeReactionFromMessage as bn, appendAndEnqueueExclusiveInboundMessage as bt, createContextCompactor as c, sandboxEgressSignalsResponseSchema as cn, agentInvocationSchema as ct, deleteMcpAuthSession as d, resolveBaseUrl as dn, AgentInvocationLimitError as dt, resolveSandboxEgressProviderForHost as en, deleteEventAutomation as et, deleteMcpAuthSessionsForUserProvider as f, startOAuthFlow as fn, getMcpProviderErrorAttributes as ft, getMcpStoredOAuthCredentials as g, normalizeSlackStatusText as gn, isEventMailboxMetadata as gt, getMcpAuthSession as h, normalizeSlackReplyMarkdown as hn, EVENT_WAIT_MS as ht, getExperimentalFeatures as i, clearSandboxEgressSignals as in, listDeletedEventAutomationsCreatedBy as it, storeAttachment as j, setConfigDefaults as jn, drainConversationMailbox as jt, readLiveAttachment as k, shouldEmitDevAgentTrace as kn, countPendingConversationMessages as kt, executeCredentialedEgressRequest as l, formatProviderLabel as ln, createAgentInvocationSchema as lt, deleteMcpStoredOAuthCredentials as m, formatSlackLink as mn, ingestEvent as mt, runAgentWithTimeout as n, shouldPropagateSandboxEgressTrace as nn, findMatchingEventAutomations as nt, setExperimentalFeatures as o, consumeSandboxEgressPermissionDeniedSignal as on, listPublicEventAutomationsForTeams as ot, deleteMcpServerSessionId as p, escapeSlackMrkdwnText as pn, processWorkspaceSnapshotJob as pt, saveScheduledAutomationInLock as q, hasConversationStop as qt, experimental_exports as r, SANDBOX_EGRESS_PROXY_PATH as rn, getEventAutomation as rt, executeAgentRun as s, parseSandboxEgressCredentialToken as sn, agentBindingSchema as st, createAgentRunner as t, normalizeSandboxEgressTracePropagationDomains as tn, eventAutomationBelongsToUser as tt, finalizeMcpAuthorization as u, parseOAuthStatePayload as un, AgentInvocationBusyError as ut, PluginCredentialFailureError as v, addReactionToMessage as vn, eventGuidance as vt, unpublishedArtifactHeaders as w, buildSteeringPiMessage as wn, checkInConversationWork as wt, resolvePluginOAuthAccount as x, slackEntitySchema as xn, appendAndEnqueueInboundMessage as xt, latestProgressStatus as y, postSlackMessage as yn, ackMessages as yt, getNextRunAtMs as z, releaseConversationWork as zt };
|
package/dist/api/schema.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { i as messageCardText, n as conversationTurnFailureReasonSchema, r as MessageCard, t as conversationTurnFailureCodeSchema } from "../history-
|
|
1
|
+
import { a as InputImage, c as MessageAttachment, i as messageCardText, n as conversationTurnFailureReasonSchema, o as MAX_INPUT_IMAGES, r as MessageCard, s as MAX_INPUT_IMAGE_BYTES, t as conversationTurnFailureCodeSchema } from "../history-nukv1YN8.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { OwnedObjectAnnotation } from "@sentry/junior-plugin-api";
|
|
4
|
+
//#region src/chat/attachments/media.d.ts
|
|
5
|
+
export declare const INPUT_IMAGE_TYPES: readonly ["image/png", "image/jpeg", "image/gif", "image/webp"];
|
|
6
|
+
//#endregion
|
|
4
7
|
//#region src/chat/conversations/web-message-id.d.ts
|
|
5
8
|
/**
|
|
6
9
|
* Build the retry-stable Message id shared by web ingress and browser sends.
|
|
@@ -240,18 +243,38 @@ export declare const archiveConversationBodySchema: z.ZodObject<{
|
|
|
240
243
|
export declare const archiveConversationResponseSchema: z.ZodObject<{
|
|
241
244
|
archivedAt: z.ZodNullable<z.ZodString>;
|
|
242
245
|
}, z.core.$strict>;
|
|
246
|
+
export declare const createConversationMessageBodySchema: z.ZodObject<{
|
|
247
|
+
idempotencyKey: z.ZodString;
|
|
248
|
+
message: z.ZodString;
|
|
249
|
+
images: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
250
|
+
filename: z.ZodString;
|
|
251
|
+
contentType: z.ZodEnum<{
|
|
252
|
+
"image/png": "image/png";
|
|
253
|
+
"image/jpeg": "image/jpeg";
|
|
254
|
+
"image/gif": "image/gif";
|
|
255
|
+
"image/webp": "image/webp";
|
|
256
|
+
}>;
|
|
257
|
+
data: z.ZodString;
|
|
258
|
+
}, z.core.$strict>>>;
|
|
259
|
+
}, z.core.$strict>;
|
|
243
260
|
export declare const createConversationBodySchema: z.ZodObject<{
|
|
244
261
|
idempotencyKey: z.ZodString;
|
|
245
262
|
message: z.ZodString;
|
|
263
|
+
images: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
264
|
+
filename: z.ZodString;
|
|
265
|
+
contentType: z.ZodEnum<{
|
|
266
|
+
"image/png": "image/png";
|
|
267
|
+
"image/jpeg": "image/jpeg";
|
|
268
|
+
"image/gif": "image/gif";
|
|
269
|
+
"image/webp": "image/webp";
|
|
270
|
+
}>;
|
|
271
|
+
data: z.ZodString;
|
|
272
|
+
}, z.core.$strict>>>;
|
|
246
273
|
visibility: z.ZodOptional<z.ZodEnum<{
|
|
247
274
|
public: "public";
|
|
248
275
|
private: "private";
|
|
249
276
|
}>>;
|
|
250
277
|
}, z.core.$strict>;
|
|
251
|
-
export declare const createConversationMessageBodySchema: z.ZodObject<{
|
|
252
|
-
idempotencyKey: z.ZodString;
|
|
253
|
-
message: z.ZodString;
|
|
254
|
-
}, z.core.$strict>;
|
|
255
278
|
export declare const acceptedConversationMessageSchema: z.ZodObject<{
|
|
256
279
|
conversationId: z.ZodString;
|
|
257
280
|
messageId: z.ZodString;
|
|
@@ -293,6 +316,12 @@ export declare const conversationPendingMessageSchema: z.ZodObject<{
|
|
|
293
316
|
web: "web";
|
|
294
317
|
}>;
|
|
295
318
|
text: z.ZodOptional<z.ZodString>;
|
|
319
|
+
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
320
|
+
id: z.ZodString;
|
|
321
|
+
filename: z.ZodString;
|
|
322
|
+
contentType: z.ZodString;
|
|
323
|
+
bytes: z.ZodNumber;
|
|
324
|
+
}, z.core.$strict>>>;
|
|
296
325
|
redacted: z.ZodOptional<z.ZodLiteral<true>>;
|
|
297
326
|
}, z.core.$strict>;
|
|
298
327
|
/** Participant-only authorization prompt for a parked web turn. */
|
|
@@ -331,6 +360,12 @@ export declare const conversationPendingMessagesReportSchema: z.ZodObject<{
|
|
|
331
360
|
web: "web";
|
|
332
361
|
}>;
|
|
333
362
|
text: z.ZodOptional<z.ZodString>;
|
|
363
|
+
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
364
|
+
id: z.ZodString;
|
|
365
|
+
filename: z.ZodString;
|
|
366
|
+
contentType: z.ZodString;
|
|
367
|
+
bytes: z.ZodNumber;
|
|
368
|
+
}, z.core.$strict>>>;
|
|
334
369
|
redacted: z.ZodOptional<z.ZodLiteral<true>>;
|
|
335
370
|
}, z.core.$strict>>;
|
|
336
371
|
}, z.core.$strict>;
|
|
@@ -621,6 +656,12 @@ export declare const conversationReportEventDataSchema: z.ZodDiscriminatedUnion<
|
|
|
621
656
|
plugin: z.ZodString;
|
|
622
657
|
}, z.core.$strict>], "kind">>>;
|
|
623
658
|
text: z.ZodOptional<z.ZodString>;
|
|
659
|
+
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
660
|
+
id: z.ZodString;
|
|
661
|
+
filename: z.ZodString;
|
|
662
|
+
contentType: z.ZodString;
|
|
663
|
+
bytes: z.ZodNumber;
|
|
664
|
+
}, z.core.$strict>>>;
|
|
624
665
|
redacted: z.ZodOptional<z.ZodLiteral<true>>;
|
|
625
666
|
}, z.core.$strict>, z.ZodObject<{
|
|
626
667
|
type: z.ZodLiteral<"message_handled">;
|
|
@@ -901,6 +942,12 @@ export declare const conversationReportEventSchema: z.ZodObject<{
|
|
|
901
942
|
plugin: z.ZodString;
|
|
902
943
|
}, z.core.$strict>], "kind">>>;
|
|
903
944
|
text: z.ZodOptional<z.ZodString>;
|
|
945
|
+
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
946
|
+
id: z.ZodString;
|
|
947
|
+
filename: z.ZodString;
|
|
948
|
+
contentType: z.ZodString;
|
|
949
|
+
bytes: z.ZodNumber;
|
|
950
|
+
}, z.core.$strict>>>;
|
|
904
951
|
redacted: z.ZodOptional<z.ZodLiteral<true>>;
|
|
905
952
|
}, z.core.$strict>, z.ZodObject<{
|
|
906
953
|
type: z.ZodLiteral<"message_handled">;
|
|
@@ -1466,6 +1513,12 @@ export declare const conversationDetailReportSchema: z.ZodObject<{
|
|
|
1466
1513
|
plugin: z.ZodString;
|
|
1467
1514
|
}, z.core.$strict>], "kind">>>;
|
|
1468
1515
|
text: z.ZodOptional<z.ZodString>;
|
|
1516
|
+
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1517
|
+
id: z.ZodString;
|
|
1518
|
+
filename: z.ZodString;
|
|
1519
|
+
contentType: z.ZodString;
|
|
1520
|
+
bytes: z.ZodNumber;
|
|
1521
|
+
}, z.core.$strict>>>;
|
|
1469
1522
|
redacted: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1470
1523
|
}, z.core.$strict>, z.ZodObject<{
|
|
1471
1524
|
type: z.ZodLiteral<"message_handled">;
|
|
@@ -1769,6 +1822,12 @@ export declare const conversationEventPageSchema: z.ZodObject<{
|
|
|
1769
1822
|
plugin: z.ZodString;
|
|
1770
1823
|
}, z.core.$strict>], "kind">>>;
|
|
1771
1824
|
text: z.ZodOptional<z.ZodString>;
|
|
1825
|
+
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1826
|
+
id: z.ZodString;
|
|
1827
|
+
filename: z.ZodString;
|
|
1828
|
+
contentType: z.ZodString;
|
|
1829
|
+
bytes: z.ZodNumber;
|
|
1830
|
+
}, z.core.$strict>>>;
|
|
1772
1831
|
redacted: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1773
1832
|
}, z.core.$strict>, z.ZodObject<{
|
|
1774
1833
|
type: z.ZodLiteral<"message_handled">;
|
|
@@ -3904,4 +3963,4 @@ type PluginPackageContentReport = z.infer<typeof pluginPackageContentReportSchem
|
|
|
3904
3963
|
type PluginOperationalReport = z.infer<typeof pluginOperationalReportSchema>;
|
|
3905
3964
|
type PluginOperationalReportFeed = z.infer<typeof pluginOperationalReportFeedSchema>;
|
|
3906
3965
|
//#endregion
|
|
3907
|
-
export { type AcceptedConversationMessage, type ActorActivityDayReport, type ActorDirectoryReport, type ActorDirectoryWindows, type ActorIdentity, type ActorProfileReport, type ActorSummaryReport, type ActorTotalsReport, type ActorWindowMetrics, type ApiError, type ArchiveConversationBody, type ArchiveConversationResponse, type AutomationCard, type AutomationExecution, type AutomationExecutionDay, type AutomationExecutionList, type AutomationExecutionStatusDay, type AutomationList, type AutomationRun, type AutomationRunList, type AutomationRunWindows, type AutomationSummary, type BaselineSnapshotReport, type CancelConversationPendingMessagesBody, type CancelConversationPendingMessagesResponse, type CodeActivityDay, type CodeChangeSummaryReport, type CodeOverviewReport, type CodePersonReport, type CodeRepositorySummary, type ConversationActivityPreview, type ConversationAuxiliaryCosts, type ConversationCost, type ConversationDetailReport, type ConversationEventHistory, type ConversationEventPage, type ConversationFeed, type ConversationMetricDay, type ConversationModelUsage, type ConversationParams, type ConversationPendingMessage, type ConversationPendingMessageDelivery, type ConversationPendingMessagesReport, type ConversationReportEvent, type ConversationReportEventData, type ConversationReportStatus, type ConversationSourceTask, type ConversationStatsItem, type ConversationStatsReport, type ConversationSummaryReport, type ConversationSurface, type ConversationTurnFailureCode, type ConversationTurnFailureReason, type ConversationUsage, type CreateConversationBody, type CreateConversationMessageBody, type DailyConversationActivity, type GuardianMetricDay, type GuardianStats, type HealthReport, type LocationActivityDayReport, type LocationActorSummaryReport, type LocationDetailReport, type LocationDirectoryReport, type LocationParams, type LocationSummaryReport, type MessageCard, type OwnedObjectAnnotation, type PeopleActivityDayReport, type PersonParams, type PersonalSpendReport, type PersonalTokenMetadata, type Plugin, type PluginOperationalReport, type PluginOperationalReportFeed, type PluginPackageContentItemReport, type PluginPackageContentReport, type Plugins, type RuntimeInfoReport, type SkillReport, type SkillReports, type StatReport, type StatsReport, type WorkspaceReport, conversationTurnFailureCodeSchema, conversationTurnFailureReasonSchema, messageCardText };
|
|
3966
|
+
export { type AcceptedConversationMessage, type ActorActivityDayReport, type ActorDirectoryReport, type ActorDirectoryWindows, type ActorIdentity, type ActorProfileReport, type ActorSummaryReport, type ActorTotalsReport, type ActorWindowMetrics, type ApiError, type ArchiveConversationBody, type ArchiveConversationResponse, type AutomationCard, type AutomationExecution, type AutomationExecutionDay, type AutomationExecutionList, type AutomationExecutionStatusDay, type AutomationList, type AutomationRun, type AutomationRunList, type AutomationRunWindows, type AutomationSummary, type BaselineSnapshotReport, type CancelConversationPendingMessagesBody, type CancelConversationPendingMessagesResponse, type CodeActivityDay, type CodeChangeSummaryReport, type CodeOverviewReport, type CodePersonReport, type CodeRepositorySummary, type ConversationActivityPreview, type ConversationAuxiliaryCosts, type ConversationCost, type ConversationDetailReport, type ConversationEventHistory, type ConversationEventPage, type ConversationFeed, type ConversationMetricDay, type ConversationModelUsage, type ConversationParams, type ConversationPendingMessage, type ConversationPendingMessageDelivery, type ConversationPendingMessagesReport, type ConversationReportEvent, type ConversationReportEventData, type ConversationReportStatus, type ConversationSourceTask, type ConversationStatsItem, type ConversationStatsReport, type ConversationSummaryReport, type ConversationSurface, type ConversationTurnFailureCode, type ConversationTurnFailureReason, type ConversationUsage, type CreateConversationBody, type CreateConversationMessageBody, type DailyConversationActivity, type GuardianMetricDay, type GuardianStats, type HealthReport, type InputImage, type LocationActivityDayReport, type LocationActorSummaryReport, type LocationDetailReport, type LocationDirectoryReport, type LocationParams, type LocationSummaryReport, MAX_INPUT_IMAGES, MAX_INPUT_IMAGE_BYTES, type MessageAttachment, type MessageCard, type OwnedObjectAnnotation, type PeopleActivityDayReport, type PersonParams, type PersonalSpendReport, type PersonalTokenMetadata, type Plugin, type PluginOperationalReport, type PluginOperationalReportFeed, type PluginPackageContentItemReport, type PluginPackageContentReport, type Plugins, type RuntimeInfoReport, type SkillReport, type SkillReports, type StatReport, type StatsReport, type WorkspaceReport, conversationTurnFailureCodeSchema, conversationTurnFailureReasonSchema, messageCardText };
|
package/dist/api/schema.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as conversationReportEventSchema, D as createConversationBodySchema, E as conversationSummaryReportSchema,
|
|
1
|
+
import { C as conversationReportEventSchema, D as createConversationBodySchema, E as conversationSummaryReportSchema, F as MAX_INPUT_IMAGE_BYTES, J as conversationTurnFailureReasonSchema, L as INPUT_IMAGE_TYPES, M as messageCardText, O as createConversationMessageBodySchema, P as MAX_INPUT_IMAGES, S as conversationReportEventDataSchema, T as conversationStatsReportSchema, _ as conversationParamsSchema, a as cancelConversationPendingMessagesBodySchema, b as conversationPendingMessageSchema, d as conversationDetailReportSchema, f as conversationEventHistorySchema, g as conversationFeedSchema, h as conversationFeedQuerySchema, i as archiveConversationResponseSchema, l as conversationAuxiliaryCostsSchema, m as conversationEventsQuerySchema, o as cancelConversationPendingMessagesResponseSchema, p as conversationEventPageSchema, q as conversationTurnFailureCodeSchema, r as archiveConversationBodySchema, s as conversationActivityPreviewSchema, t as acceptedConversationMessageSchema, u as conversationDetailQuerySchema, v as conversationPendingAuthorizationSchema, x as conversationPendingMessagesReportSchema, y as conversationPendingMessageDeliverySchema } from "../conversation-BnhOMfEB.js";
|
|
2
2
|
import { C as skillReportsSchema, S as skillReportSchema, _ as pluginPackageContentItemReportSchema, b as pluginsSchema, g as pluginOperationalReportSchema, h as pluginOperationalReportFeedSchema, m as healthReportSchema, t as webMessageId, v as pluginPackageContentReportSchema, x as runtimeInfoReportSchema, y as pluginSchema } from "../web-message-id-xPI_EFSC.js";
|
|
3
|
-
import { A as actorProfileReportSchema, B as dailyConversationActivitySchema, C as createPersonalTokenBodySchema, D as personalTokenParamsSchema, E as personalTokenMetadataSchema, F as locationDirectoryReportSchema, G as codePersonReportSchema, H as codeChangeSummaryReportSchema, I as locationParamsSchema, K as codeRepositorySummarySchema, M as personalSpendReportSchema, N as locationActivityDayReportSchema, O as revokePersonalTokenResponseSchema, P as locationDetailReportSchema, S as scheduledAutomationSummarySchema, T as personalTokenListSchema, U as codeChangeSummarySchema, V as codeActivityDaySchema, W as codeOverviewReportSchema, _ as automationRunListSchema, a as workspaceBodySchema, b as automationSummarySchema, c as workspaceRepoSchema, d as automationExecutionSchema, f as automationExecutionStatusDaySchema, g as automationParamsSchema, h as automationListSchema, i as deleteWorkspaceResponseSchema, j as personParamsSchema, k as actorDirectoryReportSchema, l as workspaceSchema, m as automationListQuerySchema, n as statsReportSchema, o as workspaceListSchema, p as automationExecutionStatusSchema, q as apiErrorSchema, r as baselineSnapshotSchema, s as workspaceParamsSchema, t as statSchema, u as automationExecutionListSchema, v as automationRunSchema, w as createdPersonalTokenSchema, x as eventAutomationSummarySchema, y as automationRunWindowsSchema } from "../schema-
|
|
4
|
-
export { acceptedConversationMessageSchema, actorDirectoryReportSchema, actorProfileReportSchema, apiErrorSchema, archiveConversationBodySchema, archiveConversationResponseSchema, automationExecutionListSchema, automationExecutionSchema, automationExecutionStatusDaySchema, automationExecutionStatusSchema, automationListQuerySchema, automationListSchema, automationParamsSchema, automationRunListSchema, automationRunSchema, automationRunWindowsSchema, automationSummarySchema, baselineSnapshotSchema, cancelConversationPendingMessagesBodySchema, cancelConversationPendingMessagesResponseSchema, codeActivityDaySchema, codeChangeSummaryReportSchema, codeChangeSummarySchema, codeOverviewReportSchema, codePersonReportSchema, codeRepositorySummarySchema, conversationActivityPreviewSchema, conversationAuxiliaryCostsSchema, conversationDetailQuerySchema, conversationDetailReportSchema, conversationEventHistorySchema, conversationEventPageSchema, conversationEventsQuerySchema, conversationFeedQuerySchema, conversationFeedSchema, conversationParamsSchema, conversationPendingAuthorizationSchema, conversationPendingMessageDeliverySchema, conversationPendingMessageSchema, conversationPendingMessagesReportSchema, conversationReportEventDataSchema, conversationReportEventSchema, conversationStatsReportSchema, conversationSummaryReportSchema, conversationTurnFailureCodeSchema, conversationTurnFailureReasonSchema, createConversationBodySchema, createConversationMessageBodySchema, createPersonalTokenBodySchema, createdPersonalTokenSchema, dailyConversationActivitySchema, deleteWorkspaceResponseSchema, eventAutomationSummarySchema, healthReportSchema, locationActivityDayReportSchema, locationDetailReportSchema, locationDirectoryReportSchema, locationParamsSchema, messageCardText, personParamsSchema, personalSpendReportSchema, personalTokenListSchema, personalTokenMetadataSchema, personalTokenParamsSchema, pluginOperationalReportFeedSchema, pluginOperationalReportSchema, pluginPackageContentItemReportSchema, pluginPackageContentReportSchema, pluginSchema, pluginsSchema, revokePersonalTokenResponseSchema, runtimeInfoReportSchema, scheduledAutomationSummarySchema, skillReportSchema, skillReportsSchema, statSchema, statsReportSchema, webMessageId, workspaceBodySchema, workspaceListSchema, workspaceParamsSchema, workspaceRepoSchema, workspaceSchema };
|
|
3
|
+
import { A as actorProfileReportSchema, B as dailyConversationActivitySchema, C as createPersonalTokenBodySchema, D as personalTokenParamsSchema, E as personalTokenMetadataSchema, F as locationDirectoryReportSchema, G as codePersonReportSchema, H as codeChangeSummaryReportSchema, I as locationParamsSchema, K as codeRepositorySummarySchema, M as personalSpendReportSchema, N as locationActivityDayReportSchema, O as revokePersonalTokenResponseSchema, P as locationDetailReportSchema, S as scheduledAutomationSummarySchema, T as personalTokenListSchema, U as codeChangeSummarySchema, V as codeActivityDaySchema, W as codeOverviewReportSchema, _ as automationRunListSchema, a as workspaceBodySchema, b as automationSummarySchema, c as workspaceRepoSchema, d as automationExecutionSchema, f as automationExecutionStatusDaySchema, g as automationParamsSchema, h as automationListSchema, i as deleteWorkspaceResponseSchema, j as personParamsSchema, k as actorDirectoryReportSchema, l as workspaceSchema, m as automationListQuerySchema, n as statsReportSchema, o as workspaceListSchema, p as automationExecutionStatusSchema, q as apiErrorSchema, r as baselineSnapshotSchema, s as workspaceParamsSchema, t as statSchema, u as automationExecutionListSchema, v as automationRunSchema, w as createdPersonalTokenSchema, x as eventAutomationSummarySchema, y as automationRunWindowsSchema } from "../schema-BSiwcvjm.js";
|
|
4
|
+
export { INPUT_IMAGE_TYPES, MAX_INPUT_IMAGES, MAX_INPUT_IMAGE_BYTES, acceptedConversationMessageSchema, actorDirectoryReportSchema, actorProfileReportSchema, apiErrorSchema, archiveConversationBodySchema, archiveConversationResponseSchema, automationExecutionListSchema, automationExecutionSchema, automationExecutionStatusDaySchema, automationExecutionStatusSchema, automationListQuerySchema, automationListSchema, automationParamsSchema, automationRunListSchema, automationRunSchema, automationRunWindowsSchema, automationSummarySchema, baselineSnapshotSchema, cancelConversationPendingMessagesBodySchema, cancelConversationPendingMessagesResponseSchema, codeActivityDaySchema, codeChangeSummaryReportSchema, codeChangeSummarySchema, codeOverviewReportSchema, codePersonReportSchema, codeRepositorySummarySchema, conversationActivityPreviewSchema, conversationAuxiliaryCostsSchema, conversationDetailQuerySchema, conversationDetailReportSchema, conversationEventHistorySchema, conversationEventPageSchema, conversationEventsQuerySchema, conversationFeedQuerySchema, conversationFeedSchema, conversationParamsSchema, conversationPendingAuthorizationSchema, conversationPendingMessageDeliverySchema, conversationPendingMessageSchema, conversationPendingMessagesReportSchema, conversationReportEventDataSchema, conversationReportEventSchema, conversationStatsReportSchema, conversationSummaryReportSchema, conversationTurnFailureCodeSchema, conversationTurnFailureReasonSchema, createConversationBodySchema, createConversationMessageBodySchema, createPersonalTokenBodySchema, createdPersonalTokenSchema, dailyConversationActivitySchema, deleteWorkspaceResponseSchema, eventAutomationSummarySchema, healthReportSchema, locationActivityDayReportSchema, locationDetailReportSchema, locationDirectoryReportSchema, locationParamsSchema, messageCardText, personParamsSchema, personalSpendReportSchema, personalTokenListSchema, personalTokenMetadataSchema, personalTokenParamsSchema, pluginOperationalReportFeedSchema, pluginOperationalReportSchema, pluginPackageContentItemReportSchema, pluginPackageContentReportSchema, pluginSchema, pluginsSchema, revokePersonalTokenResponseSchema, runtimeInfoReportSchema, scheduledAutomationSummarySchema, skillReportSchema, skillReportsSchema, statSchema, statsReportSchema, webMessageId, workspaceBodySchema, workspaceListSchema, workspaceParamsSchema, workspaceRepoSchema, workspaceSchema };
|