@sentry/junior 0.300.0 → 0.302.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.
Files changed (81) hide show
  1. package/dist/adapter-context-Cx9fn9B3.js +43 -0
  2. package/dist/{admin-UrTniSPO.js → admin-_poE5NKL.js} +2 -2
  3. package/dist/{agent-runner-bY4_0UPm.js → agent-runner-CY9RvsTX.js} +1367 -10649
  4. package/dist/api/schema.d.ts +2 -2
  5. package/dist/api/schema.js +6 -7
  6. package/dist/api.d.ts +1 -1
  7. package/dist/api.js +124 -67
  8. package/dist/{app-D-AcIcCV.d.ts → app-BpY3wtRP.d.ts} +3 -3
  9. package/dist/app.d.ts +1 -1
  10. package/dist/app.js +71 -299
  11. package/dist/{automation-Dw82oQ-h.js → automation-Cva5ZOwW.js} +1 -1
  12. package/dist/{background-compaction-queue-B6U3060-.js → background-compaction-queue-CXFq1_Cz.js} +94 -203
  13. package/dist/{briefs-DqiwWu-n.js → briefs-B3NG-pid.js} +3 -3
  14. package/dist/{catalog-runtime-D1oYNv04.js → catalog-runtime-Dss0lSV6.js} +1 -1
  15. package/dist/cli/chat.js +15 -15
  16. package/dist/cli/check.js +3 -3
  17. package/dist/cli/main.js +3 -3
  18. package/dist/cli/plugins.js +4 -4
  19. package/dist/cli/snapshot-create.js +4 -4
  20. package/dist/cli/upgrade.d.ts +1 -1
  21. package/dist/cli/upgrade.js +3 -3
  22. package/dist/{config-9nHoFiJP.js → config-CzeZiMKs.js} +2 -2
  23. package/dist/{connections-DZjTN3JC.js → connections-CDYhMfrs.js} +6 -6
  24. package/dist/{continue-in-slack-Dtv7_U42.js → continue-in-slack-7Uf05ndC.js} +5 -6
  25. package/dist/{conversation-Dyjq2CZ8.js → conversation-BNXfq6Lb.js} +11 -1
  26. package/dist/{conversation-feed-CcDxlrlQ.js → conversation-feed-Clf_cv0n.js} +2 -1
  27. package/dist/{conversation-privacy-D-5HTXjS.js → conversation-privacy-D9xnM5mK.js} +1 -1
  28. package/dist/{conversation-turn-Cxl8WZD7.js → conversation-turn-D7SEZgTG.js} +16 -17
  29. package/dist/{credential-sync-C49ClwDX.js → credential-sync-DoD0gW-j.js} +13 -15
  30. package/dist/{db-BJNo6fK5.js → db-B-gtnNjr.js} +314 -5
  31. package/dist/{db-2resqBh1.d.ts → db-BdsCzytP.d.ts} +1 -1
  32. package/dist/{executor-DBIaOeJ_.js → executor-DZg20EqU.js} +39 -4
  33. package/dist/install-t1KQyTUs.js +228 -0
  34. package/dist/instrumentation.js +2 -2
  35. package/dist/{state-zSilNpbi.js → legacy-web-actor-id-C-cEeWqL.js} +33 -4
  36. package/dist/{lineage-0dereG7H.js → lineage-C79GjoQr.js} +2 -2
  37. package/dist/{logging-BIclibct.js → logging-C9oDAg4M.js} +7 -3
  38. package/dist/{message-dkOl-Iii.js → message-BLUCzJXN.js} +8 -8
  39. package/dist/{model-input-CLo9TaUd.js → model-input-5jwNC45G.js} +3 -3
  40. package/dist/nitro.d.ts +1 -1
  41. package/dist/nitro.js +4 -3
  42. package/dist/{oauth-callback-server-WmpjfJgQ.js → oauth-callback-server-BBl66vCb.js} +2 -2
  43. package/dist/{projection-w_X-zi7v.js → projection-CIBwgD3s.js} +437 -97
  44. package/dist/{prompt-B1Xw46-S.js → prompt-CRQbzp5e.js} +15 -5
  45. package/dist/queue-DtCDaIct.js +115 -0
  46. package/dist/{registry-BmP5vnlj.js → registry-DdFQHZ_d.js} +1 -1
  47. package/dist/{resolve-goo34bJK.js → resolve-CdW4BdrK.js} +4 -229
  48. package/dist/{result-PVBeU0Wf.js → result-oOMv1t4O.js} +9 -9
  49. package/dist/{runner-DKrfvNV6.js → runner-DqitLtm-.js} +9 -9
  50. package/dist/{sandbox-egress-signals-DsUcqrI0.js → sandbox-egress-signals-Bw9I0yfJ.js} +1 -1
  51. package/dist/{schema-Dns-sTas.d.ts → schema-BIFM-U1a.d.ts} +470 -30
  52. package/dist/{schema-C9iNFz5n.js → schema-DnVQepWP.js} +76 -31
  53. package/dist/{service-account-CMAAloAL.js → service-account-B6mKAPVo.js} +3 -3
  54. package/dist/{service-account-CmowamcB.js → service-account-CrZftRTb.js} +257 -6
  55. package/dist/{session-stop-BcAXze8a.js → session-stop-DW63Z3kj.js} +1103 -1007
  56. package/dist/{skills-DfsazET6.js → skills-C16fz60Z.js} +2 -2
  57. package/dist/{slack-conversation-unfurl-CzQonuWz.js → slack-conversation-unfurl-BHhefEb7.js} +8 -7
  58. package/dist/{spawn-C7o0FDDp.js → spawn-D_RnFYfy.js} +6 -6
  59. package/dist/{stop-CFOujp8C.js → stop-7p1i08CY.js} +941 -2311
  60. package/dist/{store-E3x2Fg_F.js → store-C28I0CVW.js} +5 -5
  61. package/dist/{task-queue-D-hCqdZW.js → task-queue-BVUJbQ28.js} +3 -3
  62. package/dist/{task-runner-vohUPLHe.js → task-runner-CWi8j7Z6.js} +6 -8
  63. package/dist/{thread-context-BzvdkgI9.js → thread-context-D3-yYUd0.js} +8 -8
  64. package/dist/{store-Dkeis_8o.js → turn-session-routing-BFMS9ATF.js} +382 -11
  65. package/dist/{turn-user-message-D5RnVmxQ.js → turn-user-message-C3-O8Omt.js} +3 -3
  66. package/dist/{validation-BbWikeSa.js → validation-BSFKUIb4.js} +1 -1
  67. package/dist/{version-GVBMW2jA.js → version-BHHXNi-0.js} +1 -1
  68. package/dist/version.js +1 -1
  69. package/dist/{viewer-BpxRliyO.js → viewer-B1SO21Qa.js} +3 -3
  70. package/dist/warmup-Bz9bzkzN.js +13927 -0
  71. package/dist/{statuses-Hn-HsOph.js → web-message-id-lNodcCOI.js} +136 -1
  72. package/dist/{worker-Cbd-iuwZ.js → worker-BspReIIK.js} +7 -7
  73. package/migrations/0108_conversation_embeddings.sql +13 -0
  74. package/migrations/meta/0108_snapshot.json +4688 -0
  75. package/migrations/meta/_journal.json +7 -0
  76. package/package.json +10 -8
  77. package/dist/adapter-S5UkjNK3.js +0 -303
  78. package/dist/reporting-window-DopzcOHh.js +0 -137
  79. package/dist/turn-session-routing-Bo_LxFum.js +0 -380
  80. package/dist/users-2bggndVg.js +0 -424
  81. package/dist/warmup-BW2qwnal.js +0 -3693
@@ -1,50 +1,189 @@
1
1
  import { h as startSpan } from "./sentry-BRTJqumy.js";
2
- import { $ as loadTurnCheckpoint, $n as webActorUserIds, A as latestConversationMessageSeq, Ao as readConversationEventPageAfter, Bo as readAttachmentVisionSummary, Co as conversationPinnedForUser, D as estimateConversationMessagesTokens, E as buildConversationContext, Ea as removeReactionFromMessage, F as turnHasReply, Fi as isDashboardLink, Fr as listWaitingConversations, Go as downloadPrivateSlackFile, Gr as isOnlyAssignee, H as PluginCredentialFailureError, Ho as recordSlackAttachment, Ht as releaseInboundMessage, I as upsertConversationMessage, Ii as parseDashboardConversationLink, Jo as getSlackClient, K as AuthorizationFlowDisabledError, Li as parseDashboardPersonLink, Ln as trimTrailingAssistantMessages, Lo as notInheritedByForkChild, M as normalizeConversationText, Mr as getReviewItem, N as recordDeliveredAssistantMessage, O as getConversationMessageSlackTs, Oi as getDashboardConversationLink, Oo as readLatestConversationBrief, Or as closeReviewItem, P as trimConversationMessages, Po as buildSentryConversationUrl, Pr as listReplyActionItems, Qo as normalizeSlackConversationId, Ro as getSlackFileId, Rr as takeReviewItem, S as resolveConversationTitle, So as conversationIsNotUnsubscribedRoot, To as viewerMarksFromParticipant, Uo as slackAttachmentsVersionQuery, V as createPluginEgress, Vr as canActOnReviewItem, Wo as SlackActionError, Wr as canUserReadReviewItem, X as clearPendingAuth, Xo as isDmChannel, Yr as reviewItemNeedsSomeone, Zn as createUserTokenStore, Zo as isSlackRequestTimeout, _a as slackMentionedUserIds, _o as canAddConversationMessages, _s as createPluginCache, a as loadProjection, at as failTurnRecord, b as persistConversationMessages, bn as persistWithRetry, bo as conversationHasParticipantUser, ct as listTurnSummaries, d as recordAuthorizationCompleted, da as SLACK_USER_MENTION_RE, dr as getPlugins, es as streamPrivateSlackFile, et as lostWorkerBeforeFirstSave, h as recordSubscribedReplyRoute, ha as normalizeSlackStatusText, ho as createPluginLogger, i as loadConversationProjection, it as completeTurnRecord, j as markConversationMessage, ji as getDashboardPersonLink, jo as readConversationEventPageAround, k as isHumanConversationMessage, ki as getDashboardLinkFilter, ko as readConversationEventPage, ls as listConversationAnnotations, lt as recordTurnSummary, ms as lookupSlackUserNames, n as commitMessages, nt as saveTurnCheckpoint, o as loadTurnProjection, ps as lookupSlackUser, qo as getHeaderString, rt as abandonTurnRecord, st as getTurnRecord, t as commitAcceptedReply, tn as buildTurnErrorResponse, ts as withSlackRetries, tt as pauseLostWorkerTurn, ui as cancelSubscriptions, un as getAssistantReplyText, us as listConversationAnnotationsById, v as hydrateConversationMessages, va as truncateStatusText, vo as createConversationAccessReader, w as fallbackShortTitle, wo as conversationViewerMarks, xo as conversationIsMemberRoot, xs as piMessageFromHistoryItem, y as persistConversationMessageWindow, ya as addReactionToMessage, yo as readConversationAccessFromSql, ys as configValueSchema } from "./projection-w_X-zi7v.js";
3
- import { D as resolveGatewayModel, M as textCharsForTokens, R as escapeXml, c as getSlackClientSecret, i as getChatConfig, j as estimateTextTokens, l as getSlackSigningSecret, n as botConfig, o as getSlackBotToken, q as isProviderRetryError, s as getSlackClientId, y as normalizeSlackEmojiName } from "./config-9nHoFiJP.js";
4
- import { E as withSpan, G as isRecord, K as toOptionalNumber, S as setTags, T as withLogContext, W as normalizeIdentityEmail, b as setSpanAttributes, f as logError, h as logWarn, m as logInfo, n as createChatSdkLogger, o as getActiveTraceContext, p as logException, q as toOptionalString, s as getActiveTraceId, t as buildTurnFailureResponse, y as setSentryUser } from "./logging-BIclibct.js";
5
- import { t as JUNIOR_VERSION } from "./version-GVBMW2jA.js";
2
+ import { $ as loadTurnCheckpoint, $o as isSlackRequestTimeout, A as latestConversationMessageSeq, Ai as getDashboardLinkFilter, Ao as readLatestConversationBrief, Bo as getSlackFileId, Co as conversationIsMemberRoot, Cs as configValueSchema, D as estimateConversationMessagesTokens, Do as viewerMarksFromParticipant, E as buildConversationContext, Eo as conversationViewerMarks, F as turnHasReply, Fr as listReplyActionItems, Go as slackAttachmentsVersionQuery, Gr as canUserReadReviewItem, H as PluginCredentialFailureError, Ho as readAttachmentVisionSummary, Hr as canActOnReviewItem, Ht as releaseInboundMessage, I as upsertConversationMessage, Ii as isDashboardLink, Io as buildSentryConversationUrl, Ir as listWaitingConversations, K as AuthorizationFlowDisabledError, Ko as SlackActionError, Kr as isOnlyAssignee, Li as parseDashboardConversationLink, Ln as trimTrailingAssistantMessages, M as normalizeConversationText, Mi as getDashboardPersonLink, Mo as readConversationEventPageAfter, N as recordDeliveredAssistantMessage, No as readConversationEventPageAround, Nr as getReviewItem, O as getConversationMessageSlackTs, Oa as removeReactionFromMessage, P as trimConversationMessages, Qo as isDmChannel, Ri as parseDashboardPersonLink, S as resolveConversationTitle, So as conversationHasParticipantUser, To as conversationPinnedForUser, Ts as piMessageFromHistoryItem, V as createPluginEgress, Wo as recordSlackAttachment, X as clearPendingAuth, Xo as getSlackClient, Xr as reviewItemNeedsSomeone, Yo as getHeaderString, Zn as createUserTokenStore, _o as createPluginLogger, _s as lookupSlackUser, a as loadProjection, at as failTurnRecord, b as persistConversationMessages, ba as truncateStatusText, bn as persistWithRetry, bo as createConversationAccessReader, ct as listTurnSummaries, d as recordAuthorizationCompleted, di as cancelSubscriptions, es as normalizeSlackConversationId, et as lostWorkerBeforeFirstSave, fa as SLACK_USER_MENTION_RE, ga as normalizeSlackStatusText, h as recordSubscribedReplyRoute, i as loadConversationProjection, it as completeTurnRecord, j as markConversationMessage, jo as readConversationEventPage, k as isHumanConversationMessage, ki as getDashboardConversationLink, kr as closeReviewItem, lt as recordTurnSummary, ms as listConversationAnnotationsById, n as commitMessages, ns as streamPrivateSlackFile, nt as saveTurnCheckpoint, o as loadTurnProjection, ps as listConversationAnnotations, qo as downloadPrivateSlackFile, rs as withSlackRetries, rt as abandonTurnRecord, st as getTurnRecord, t as commitAcceptedReply, tn as buildTurnErrorResponse, tr as applyPluginFormatMarkdown, tt as pauseLostWorkerTurn, ua as resolveBaseUrl, un as getAssistantReplyText, ur as getPlugins, v as hydrateConversationMessages, va as slackMentionedUserIds, vs as lookupSlackUserNames, w as fallbackShortTitle, wo as conversationIsNotUnsubscribedRoot, xa as addReactionToMessage, xo as readConversationAccessFromSql, xs as createPluginCache, y as persistConversationMessageWindow, ya as wrapBareSlackUserIds, yo as canAddConversationMessages, zo as notInheritedByForkChild, zr as takeReviewItem } from "./projection-CIBwgD3s.js";
3
+ import { D as resolveGatewayModel, M as textCharsForTokens, R as escapeXml, c as getSlackClientSecret, i as getChatConfig, j as estimateTextTokens, l as getSlackSigningSecret, n as botConfig, o as getSlackBotToken, q as isProviderRetryError, s as getSlackClientId, y as normalizeSlackEmojiName } from "./config-CzeZiMKs.js";
4
+ import { E as withSpan, G as normalizeIdentityEmail, J as toOptionalString, K as isRecord, S as setTags, T as withLogContext, b as setSpanAttributes, f as logError, h as logWarn, m as logInfo, n as createChatSdkLogger, o as getActiveTraceContext, p as logException, q as toOptionalNumber, s as getActiveTraceId, t as buildTurnFailureResponse, y as setSentryUser } from "./logging-C9oDAg4M.js";
5
+ import { t as JUNIOR_VERSION } from "./version-BHHXNi-0.js";
6
6
  import { f as parseSlackTeamId, i as isActorUserId, n as createSlackActor, o as isUserActor, r as createSlackResumeActor, s as parseActorUserId, t as createActor, u as parseSlackChannelId, v as parseSlackMessageTs } from "./actor-D2iXzvlN.js";
7
- import { $ as resolveRootConversationId, D as conversationKindFromRow, J as addAgentTurnUsage, N as resolveActorIdentityId, O as locationFromRow, P as saveActorAvatar, Q as hasAgentTurnUsage, S as deliversFinalText, T as postsRunNotices, U as readCachedUserByEmail, W as createCache, Z as agentTurnUsageSchema, _ as loadConversationSlackTenantIds, a as getConversationStore, f as withConversationEventLock, g as setArchivedAt, h as readConversationTrees, it as createSlackDestination, nt as nextDetailVersion, o as getDb, ot as requireSlackDestination, p as conversationAncestors, q as parseSessionSource, r as getConversationEventStore, s as getSqlExecutor, v as lastMessageAtSql, w as isTopLevelKind } from "./db-BJNo6fK5.js";
8
- import { D as juniorCodeChanges, E as juniorConversationAnnotations, M as juniorIdentities, N as juniorUsers, P as juniorDestinations, b as juniorConversationBriefs, j as juniorConversations, l as juniorReviewItems, s as juniorReviewItemConversations, v as juniorConversationParticipants, w as juniorConversationEvents } from "./executor-DBIaOeJ_.js";
7
+ import { F as saveActorAvatar, G as createCache, J as getStateAdapter, O as conversationKindFromRow, P as resolveActorIdentityId, Q as acquireActiveLock, S as deliversFinalText, T as postsRunNotices, W as readCachedUserByEmail, X as setStateValues, Y as getStateValues, _ as loadConversationSlackTenantIds, a as getConversationStore, ct as hasAgentTurnUsage, f as withConversationEventLock, ft as nextDetailVersion, g as setArchivedAt, gt as requireSlackDestination, h as readConversationTrees, it as addAgentTurnUsage, k as locationFromRow, lt as resolveRootConversationId, mt as createSlackDestination, o as getDb, p as conversationAncestors, r as getConversationEventStore, rt as parseSessionSource, s as getSqlExecutor, st as agentTurnUsageSchema, v as lastMessageAtSql, w as isTopLevelKind } from "./db-B-gtnNjr.js";
8
+ import { D as juniorConversationAnnotations, F as juniorDestinations, M as juniorConversations, N as juniorIdentities, O as juniorCodeChanges, P as juniorUsers, T as juniorConversationEvents, l as juniorReviewItems, s as juniorReviewItemConversations, v as juniorConversationParticipants, x as juniorConversationBriefs } from "./executor-DZg20EqU.js";
9
9
  import { d as contextProvenance, p as instructionProvenanceFor, t as KNOWN_CONVERSATION_EVENT_TYPES } from "./history-IjdmO_r6.js";
10
- import { a as setStateValues, i as getStateValues, r as getStateAdapter, s as acquireActiveLock } from "./adapter-S5UkjNK3.js";
11
- import { d as actorLogContext, f as credentialContextForActor } from "./registry-BmP5vnlj.js";
12
- import { C as renderBlockText, Dt as throwApiError, F as resolveSlackChannelIdFromMessage, I as resolveSlackChannelIdFromThreadId, It as shouldEmitDevAgentTrace, K as readConversationSourceTask, L as resolveDestinationVisibility, N as parseSlackThreadId, Nt as RetryableDeliveryError, P as readSlackRawMessageContext, S as renderAttachmentText, St as conversationReadPositionQuery, T as createSlackReviewItemShow, a as buildAuthPauseResponse, at as appendAndEnqueueWebMessage, bt as storeAttachment, ct as createConversationId, ft as AttachmentUploadError, ht as verifyAttachmentUploads, it as acceptsWebMessages, lt as recordWebConversationActivity, m as latestProgressStatus, n as executeAgentRun, st as createAndEnqueueConversation, t as createAgentRunner, tt as deliverReviewItemChange, ut as webActorFromUser, w as parseSlackMessageReference } from "./agent-runner-bY4_0UPm.js";
13
- import { a as EVENT_SYSTEM_ACTOR, c as completeDecision, o as isEventConversationMessage, u as completeText } from "./prompt-B1Xw46-S.js";
14
- import { f as identityAvatarUrl, g as userAvatarUrlsFromIdentities, h as readUserAvatarUrls } from "./viewer-BpxRliyO.js";
15
- import { G as MAX_ATTACHMENT_BYTES, Y as readMessageAttachments, f as conversationEventPageSchema, u as conversationDetailReportSchema } from "./conversation-Dyjq2CZ8.js";
10
+ import { d as actorLogContext, f as credentialContextForActor } from "./registry-DdFQHZ_d.js";
11
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-Dss0lSV6.js";
12
+ import { M as shouldEmitDevAgentTrace, a as buildAuthPauseResponse, c as createClientMetadata, g as resolveDestinationVisibility, k as RetryableDeliveryError, l as readMcpClientInformation, n as executeAgentRun, s as getMcpOAuthCallbackPath, t as createAgentRunner, u as latestProgressStatus, y as createSlackReviewItemShow } from "./agent-runner-CY9RvsTX.js";
13
+ import { a as EVENT_SYSTEM_ACTOR, c as completeDecision, o as isEventConversationMessage, u as completeText } from "./prompt-CRQbzp5e.js";
14
+ import { f as identityAvatarUrl, g as userAvatarUrlsFromIdentities, h as readUserAvatarUrls } from "./viewer-B1SO21Qa.js";
15
+ import { G as MAX_ATTACHMENT_BYTES, Y as readMessageAttachments, f as conversationEventPageSchema, u as conversationDetailReportSchema } from "./conversation-BNXfq6Lb.js";
16
+ import { n as webActorUserIds } from "./legacy-web-actor-id-C-cEeWqL.js";
16
17
  import { t as readJuniorSecret } from "./secrets-DebYU866.js";
17
- import { $ as sendSlackReply, O as resolveMailboxTurnWork, Q as resolveSlackReplyTarget, X as maybePostAutomatedTurnLimitNotice, at as conversationSubtreeColumns, b as isExperimentalFeatureEnabled, c as loadReviewItemInput, f as buildSteeringPiMessage, g as withoutSavedSteeringMessages, it as conversationSubtree, j as legacyWebMailboxMetadataSchema, l as savedInputInstruction, nt as recordFinishedTurnForAutomatedLimit, o as skipInputAfterConversationStop, p as instructionActorFor, r as markConversationsStopped } from "./session-stop-BcAXze8a.js";
18
- import { Et as executeTurn, J as cancelSignInWait, K as stopChildAgentsBelow, Tt as AgentRunError, W as dropOwnUnreadLoopReplies, _t as getTurnAuthorization, c as listConversationWork, ft as supersedeTurnForInput, gt as wakePausedTurn, l as readLastUserMessageAtByConversation, mt as getPausedTurnRequest, pt as createPausedTurns, q as stopChildAgentsOf, s as isConversationWorkDone, v as getChildAgentLabel, vt as canJoinTurn, wt as getWebAuthorization, yt as canShareTurn } from "./warmup-BW2qwnal.js";
19
- import { T as getTurnRequestDeadline, l as getVercelConversationWorkQueue } from "./background-compaction-queue-B6U3060-.js";
20
- import { L as buildDeterministicAssistantMessageId, R as buildDeterministicTurnId, a as ConversationTurnBoundaryError, c as TurnInputDeferredError, d as isTurnInputCommitLostError, f as isTurnInputDeferredError, g as startActiveTurn, h as markTurnFailed, i as getTurnUserSlackMessageTs, l as getConversationTurnBoundaryError, m as markTurnCompleted, o as CooperativeTurnYieldError, p as markTurnClosed, r as getTurnUserReplyAttachmentContext, s as TurnInputCommitLostError, t as getTurnUserMessage, u as isCooperativeTurnYieldError, v as getTurnLifecycle } from "./turn-user-message-D5RnVmxQ.js";
21
- import { D as stopConversationWork, E as steerWebPendingMessages, _ as getConversationWorkState, a as cancelHumanFacingPendingMessages, g as getConversation, h as ensureConversationWake, r as appendAndEnqueueInboundMessage, s as claimInboundMessage } from "./store-E3x2Fg_F.js";
22
- import { a as getPersistedThreadState, c as coerceThreadConversationState, i as getPersistedSandboxState, n as resolveTurnSessionRouting, o as persistThreadRuntimeState, r as getLocationConfigurationService, s as persistThreadStateById, t as resolveConversationRouting } from "./turn-session-routing-Bo_LxFum.js";
23
- import { c as isEmptyUserInputAnswer, l as normalizeUserInputAnswer, m as isVisionImageMediaType, p as detectImageMediaType } from "./statuses-Hn-HsOph.js";
24
- import { p as webMessageId } from "./reporting-window-DopzcOHh.js";
25
- import { D as readAutomationTitlesByConversationId, _ as markDispatchRunning, a as getDispatchConversationId, c as getDispatchRecord, d as isTerminalDispatchStatus, g as markDispatchFailed, h as markDispatchCompleted, l as getDispatchTurnId, m as markDispatchBlocked, n as claimDispatchMailboxAppend, o as getDispatchIdForConversation, p as markDispatchAwaitingResume, r as confirmDispatchMailboxAppend, s as getDispatchInputMessageId } from "./store-Dkeis_8o.js";
26
- import { a as runWithSlackInstallation, d as isConversationMember, f as isPublicSlackChannel, h as listThreadReplies, l as getChannelMessage, u as getConversationInfo } from "./users-2bggndVg.js";
27
- import { D as webPageObjectCard, E as personObjectCard, T as messageObjectCard, l as conversationPendingMessagesReportSchema, n as conversationFeedSchema, p as healthReportSchema, t as conversationFeedBriefSchema, w as conversationObjectCard } from "./conversation-feed-CcDxlrlQ.js";
28
- import { c as withTurnSpan, n as createConversationTurnWorker, o as getTurnInputSpanAttributes, r as canPauseConversationDelivery, s as turnInputTelemetry } from "./conversation-turn-Cxl8WZD7.js";
29
- import { n as buildStoredAttachmentPromptText } from "./model-input-CLo9TaUd.js";
30
- import { i as enqueueAgentInvocationResult, n as createDeliverToParent, s as withAgentInvocationResultActors, t as createChildConversationWorker } from "./result-PVBeU0Wf.js";
31
- import { t as bindMessageAgent } from "./message-dkOl-Iii.js";
32
- import { t as readConversationLineage } from "./lineage-0dereG7H.js";
33
- import { t as bindSpawnAgent } from "./spawn-C7o0FDDp.js";
34
- import { a as requireTurnFailureEventId, c as buildDeliveredTurnStatePatch, i as getAgentTurnDiagnosticsAttributes, l as loadPendingMessageCards, n as loadThreadContextTrimFloor, o as completeAuthPauseTurn, r as finalizeFailedTurnReplyWithEvent, s as persistAuthPauseTurnState, t as buildTurnThreadContext } from "./thread-context-BzvdkgI9.js";
35
- import { n as scheduleSessionCompletedPluginTasks } from "./task-runner-vohUPLHe.js";
36
- import { r as canContinueInSlack } from "./continue-in-slack-Dtv7_U42.js";
18
+ import { G as conversationSubtree, I as maybePostAutomatedTurnLimitNotice, J as isExperimentalFeatureEnabled, K as conversationSubtreeColumns, O as legacyWebMailboxMetadataSchema, R as resolveSlackReplyTarget, T as resolveMailboxTurnWork, U as recordFinishedTurnForAutomatedLimit, c as loadReviewItemInput, f as buildSteeringPiMessage, g as withoutSavedSteeringMessages, l as savedInputInstruction, o as skipInputAfterConversationStop, p as instructionActorFor, r as markConversationsStopped, z as sendSlackReply } from "./session-stop-DW63Z3kj.js";
19
+ import { $n as renderBlockText, Cr as listThreadReplies, Ct as recordWebConversationActivity, Et as AttachmentUploadError, Fn as wakePausedTurn, Gn as executeTurn, In as getTurnAuthorization, Kt as getChildAgentLabel, Ln as canJoinTurn, Mn as createPausedTurns, Ni as NO_REPLY_GAP_MS, Nn as getPausedTurnRequest, Pi as gapSegment, Pt as storeAttachment, Qn as renderAttachmentText, Rn as canShareTurn, St as createConversationId, Un as getWebAuthorization, Wn as AgentRunError, Xn as throwApiError, _ as connectedState, _n as stopChildAgentsBelow, a as segmentGapsKey, br as isConversationMember, c as listConversationWork, d as firstLiveSavingsDate, dr as resolveSlackChannelIdFromMessage, er as parseSlackMessageReference, f as idlePeriodSavings, fi as readConversationSourceTask, fr as resolveSlackChannelIdFromThreadId, gn as dropOwnUnreadLoopReplies, ht as deliverReviewItemChange, ji as MINUTE_MS, jn as supersedeTurnForInput, kt as verifyAttachmentUploads, lr as parseSlackThreadId, lt as conversationReadPositionQuery, n as GLOBAL_GAPS_MAX, p as replaceHistorySavings, r as GLOBAL_GAPS_TTL_MS, s as isConversationWorkDone, st as readLastUserMessageAtByConversation, t as CONVERSATION_STATE_TTL_MS, u as addHistoryPeriod, ur as readSlackRawMessageContext, v as providerCacheTtlMs, vn as stopChildAgentsOf, vr as getChannelMessage, vt as acceptsWebMessages, wt as webActorFromUser, xr as isPublicSlackChannel, xt as createAndEnqueueConversation, yn as cancelSignInWait, yr as getConversationInfo, yt as appendAndEnqueueWebMessage } from "./warmup-Bz9bzkzN.js";
20
+ import { C as markDispatchCompleted, F as readAutomationTitlesByConversationId, S as markDispatchBlocked, T as markDispatchRunning, _ as getDispatchTurnId, a as getPersistedThreadState, c as coerceThreadConversationState, d as confirmDispatchMailboxAppend, g as getDispatchRecord, h as getDispatchInputMessageId, i as getPersistedSandboxState, m as getDispatchIdForConversation, n as resolveTurnSessionRouting, o as persistThreadRuntimeState, p as getDispatchConversationId, r as getLocationConfigurationService, s as persistThreadStateById, t as resolveConversationRouting, u as claimDispatchMailboxAppend, w as markDispatchFailed, x as markDispatchAwaitingResume, y as isTerminalDispatchStatus } from "./turn-session-routing-BFMS9ATF.js";
21
+ import { h as isVisionImageMediaType, l as isEmptyUserInputAnswer, m as detectImageMediaType, t as webMessageId, u as normalizeUserInputAnswer } from "./web-message-id-lNodcCOI.js";
22
+ import { L as buildDeterministicAssistantMessageId, R as buildDeterministicTurnId, a as ConversationTurnBoundaryError, c as TurnInputDeferredError, d as isTurnInputCommitLostError, f as isTurnInputDeferredError, g as startActiveTurn, h as markTurnFailed, i as getTurnUserSlackMessageTs, l as getConversationTurnBoundaryError, m as markTurnCompleted, o as CooperativeTurnYieldError, p as markTurnClosed, r as getTurnUserReplyAttachmentContext, s as TurnInputCommitLostError, t as getTurnUserMessage, u as isCooperativeTurnYieldError, v as getTurnLifecycle } from "./turn-user-message-C3-O8Omt.js";
23
+ import { o as getVercelConversationWorkQueue, p as getTurnRequestDeadline } from "./background-compaction-queue-CXFq1_Cz.js";
24
+ import { D as stopConversationWork, E as steerWebPendingMessages, _ as getConversationWorkState, a as cancelHumanFacingPendingMessages, g as getConversation, h as ensureConversationWake, r as appendAndEnqueueInboundMessage, s as claimInboundMessage } from "./store-C28I0CVW.js";
25
+ import { d as PluginMcpClient, u as McpAuthorizationRequiredError, v as getMcpStoredOAuthCredentials } from "./service-account-CrZftRTb.js";
26
+ import { t as runWithSlackInstallation } from "./adapter-context-Cx9fn9B3.js";
27
+ import { D as webPageObjectCard, E as personObjectCard, T as messageObjectCard, l as conversationPendingMessagesReportSchema, n as conversationFeedSchema, p as healthReportSchema, t as conversationFeedBriefSchema, w as conversationObjectCard } from "./conversation-feed-Clf_cv0n.js";
28
+ import { c as withTurnSpan, n as createConversationTurnWorker, o as getTurnInputSpanAttributes, r as canPauseConversationDelivery, s as turnInputTelemetry } from "./conversation-turn-D7SEZgTG.js";
29
+ import { n as buildStoredAttachmentPromptText } from "./model-input-5jwNC45G.js";
30
+ import { i as enqueueAgentInvocationResult, n as createDeliverToParent, s as withAgentInvocationResultActors, t as createChildConversationWorker } from "./result-oOMv1t4O.js";
31
+ import { t as bindMessageAgent } from "./message-BLUCzJXN.js";
32
+ import { t as readConversationLineage } from "./lineage-C79GjoQr.js";
33
+ import { t as bindSpawnAgent } from "./spawn-D_RnFYfy.js";
34
+ import { a as requireTurnFailureEventId, c as buildDeliveredTurnStatePatch, i as getAgentTurnDiagnosticsAttributes, l as loadPendingMessageCards, n as loadThreadContextTrimFloor, o as completeAuthPauseTurn, r as finalizeFailedTurnReplyWithEvent, s as persistAuthPauseTurnState, t as buildTurnThreadContext } from "./thread-context-D3-yYUd0.js";
35
+ import { n as scheduleSessionCompletedPluginTasks } from "./task-runner-CWi8j7Z6.js";
36
+ import { r as canContinueInSlack } from "./continue-in-slack-7Uf05ndC.js";
37
37
  import * as z from "zod";
38
- import { createHash, createHmac, timingSafeEqual } from "node:crypto";
39
- import { and, asc, count, desc, eq, gt, inArray, isNotNull, isNull, lte, ne, not, or, sql } from "drizzle-orm";
40
- import { conversationSidebarAnnotationSchema, createSlackSource, objectAnnotationSchema, objectLinkFilterMatches, objectLinkFilterSpecificity, objectTypeSchema, ownedObjectAnnotationSchema } from "@sentry/junior-plugin-api";
38
+ import { createHash, createHmac, randomUUID, timingSafeEqual } from "node:crypto";
39
+ import { and, asc, count, desc, eq, gt, gte, inArray, isNotNull, isNull, lte, ne, not, or, sql } from "drizzle-orm";
40
+ import { conversationSidebarAnnotationSchema, createSlackSource, encodeObjectImageRef, objectAnnotationSchema, objectLinkFilterMatches, objectLinkFilterSpecificity, objectTypeSchema, ownedObjectAnnotationSchema } from "@sentry/junior-plugin-api";
41
41
  import { alias } from "drizzle-orm/pg-core";
42
+ import { Message, ThreadImpl, stringifyMarkdown } from "chat";
42
43
  import net from "node:net";
44
+ import { performance } from "node:perf_hooks";
43
45
  import https from "node:https";
44
46
  import { SlackFormatConverter, createSlackAdapter } from "@chat-adapter/slack";
45
- import { Message, ThreadImpl, stringifyMarkdown } from "chat";
46
47
  import dns from "node:dns";
47
48
  import { parse } from "parse5";
49
+ // src/chat/images/ids.ts
50
+ /**
51
+ * Opaque, signed ids for images that Junior serves. A browser never gets the
52
+ * address of the image, and it cannot ask for an image that Junior did not
53
+ * name.
54
+ */
55
+ const IMAGE_ID_CONTEXT = "junior-image-id";
56
+ /**
57
+ * Widths that the image route serves. A fixed set keeps the cache small.
58
+ * Callers ask for at least 2x the CSS width, so images stay sharp on
59
+ * high-density screens.
60
+ */
61
+ const IMAGE_WIDTHS = [
62
+ 64,
63
+ 128,
64
+ 320,
65
+ 640,
66
+ 1280
67
+ ];
68
+ const imageIdPayloadSchema = z.object({
69
+ ref: z.string().min(1),
70
+ source: z.string().min(1)
71
+ }).strict();
72
+ function signature$1(payload) {
73
+ const secret = readJuniorSecret();
74
+ if (!secret) throw new Error("Cannot sign image ids without JUNIOR_SECRET");
75
+ return createHmac("sha256", secret).update(`${IMAGE_ID_CONTEXT}:${payload}`).digest("base64url");
76
+ }
77
+ /** Return the signed id of one image. */
78
+ function encodeImageId(image) {
79
+ const payload = Buffer.from(JSON.stringify({
80
+ ref: image.ref,
81
+ source: image.source
82
+ }), "utf8").toString("base64url");
83
+ return `${payload}.${signature$1(payload)}`;
84
+ }
85
+ /** Return the image of a signed id, or nothing when the id is not valid. */
86
+ function decodeImageId(id) {
87
+ const [payload, actual, extra] = id.split(".");
88
+ if (!payload || !actual || extra !== void 0) return void 0;
89
+ const expected = Buffer.from(signature$1(payload));
90
+ const given = Buffer.from(actual);
91
+ if (expected.length !== given.length || !timingSafeEqual(expected, given)) return;
92
+ try {
93
+ const parsed = imageIdPayloadSchema.safeParse(JSON.parse(Buffer.from(payload, "base64url").toString("utf8")));
94
+ return parsed.success ? parsed.data : void 0;
95
+ } catch {
96
+ return;
97
+ }
98
+ }
99
+ /**
100
+ * Return the Junior API path of one image at one width. `version` changes
101
+ * the path when the image changes, so a browser can keep each path.
102
+ */
103
+ function imagePath(image, width, version) {
104
+ const query = new URLSearchParams({ w: String(width) });
105
+ if (version) query.set("v", version);
106
+ return `/api/images/${encodeImageId(image)}?${query}`;
107
+ }
108
+ // src/chat/mcp/viewer.ts
109
+ function viewerAuthProvider(plugin, userId) {
110
+ const provider = plugin.manifest.name;
111
+ const baseUrl = resolveBaseUrl();
112
+ if (!baseUrl) throw new Error("Cannot determine base URL (set JUNIOR_BASE_URL or deploy to Vercel)");
113
+ const callbackUrl = `${baseUrl}${getMcpOAuthCallbackPath(provider)}`;
114
+ return {
115
+ redirectUrl: callbackUrl,
116
+ clientMetadata: createClientMetadata(callbackUrl),
117
+ clientInformation: async () => await readMcpClientInformation({
118
+ callbackUrl,
119
+ oauthClient: plugin.manifest.mcp?.oauthClient,
120
+ provider,
121
+ userId
122
+ }),
123
+ saveClientInformation: () => {
124
+ throw new Error(`A ${provider} viewer read cannot register a client`);
125
+ },
126
+ tokens: async () => (await getMcpStoredOAuthCredentials(userId, provider))?.tokens,
127
+ saveTokens: () => void 0,
128
+ discoveryState: async () => (await getMcpStoredOAuthCredentials(userId, provider))?.discoveryState,
129
+ invalidateCredentials: () => void 0,
130
+ redirectToAuthorization: () => void 0,
131
+ saveCodeVerifier: () => void 0,
132
+ codeVerifier: () => {
133
+ throw new Error(`A ${provider} viewer read has no sign-in`);
134
+ },
135
+ mcpLoginOwner: async () => ({
136
+ provider,
137
+ userId
138
+ })
139
+ };
140
+ }
141
+ function providerContent(content) {
142
+ return content.flatMap((part) => {
143
+ if (part.type === "text" && "text" in part) return [{
144
+ type: "text",
145
+ text: String(part.text)
146
+ }];
147
+ if (part.type === "image" && "data" in part && "mimeType" in part) return [{
148
+ type: "image",
149
+ data: String(part.data),
150
+ mimeType: String(part.mimeType)
151
+ }];
152
+ return [];
153
+ });
154
+ }
155
+ /**
156
+ * Create read-only MCP access to one plugin's provider as one viewer. The
157
+ * viewer's User id is the subject of their stored MCP login.
158
+ */
159
+ function createViewerMcp(provider, userId) {
160
+ return { async callTool(input) {
161
+ const plugin = pluginCatalogRuntime.getDefinition(provider);
162
+ if (!plugin?.manifest.mcp) throw new Error(`Plugin "${provider}" does not support MCP`);
163
+ if (!plugin.manifest.mcp.allowedTools?.includes(input.name)) throw new Error(`Plugin ${provider} does not allow MCP tool ${input.name} for viewer reads`);
164
+ if (!(await getMcpStoredOAuthCredentials(userId, provider))?.tokens) return { status: "not_connected" };
165
+ const client = new PluginMcpClient(plugin, { authProvider: viewerAuthProvider(plugin, userId) });
166
+ try {
167
+ if ((await client.listTools()).find((candidate) => candidate.name === input.name)?.annotations?.readOnlyHint !== true) throw new Error(`MCP tool ${provider}/${input.name} is not read-only`);
168
+ const result = await client.callTool(input.name, input.arguments ?? {});
169
+ const content = Array.isArray(result.content) ? providerContent(result.content) : [];
170
+ if (result.isError) return {
171
+ status: "error",
172
+ message: content.flatMap((part) => part.type === "text" ? [part.text] : []).join("\n").trim() || "MCP tool call failed"
173
+ };
174
+ return {
175
+ status: "success",
176
+ content,
177
+ ...result.structuredContent !== void 0 ? { structuredContent: result.structuredContent } : void 0
178
+ };
179
+ } catch (error) {
180
+ if (error instanceof McpAuthorizationRequiredError) return { status: "not_connected" };
181
+ throw error;
182
+ } finally {
183
+ await client.close().catch(() => void 0);
184
+ }
185
+ } };
186
+ }
48
187
  // src/api/conversations/first-message.ts
49
188
  /**
50
189
  * Read the text of the first human message for each untitled conversation.
@@ -433,11 +572,23 @@ function conversationSummaryFromStoredConversation(args) {
433
572
  };
434
573
  }
435
574
  // src/api/objects/conversation.ts
575
+ async function readViewerAccess(viewer, conversationId) {
576
+ return (await readConversationAccessFromSql(getDb(), [conversationId], viewer)).get(conversationId);
577
+ }
578
+ /**
579
+ * Return whether the viewer sees the private content of the linked
580
+ * Conversation: a public Conversation, or a private one that they take part
581
+ * in. A link to no Conversation returns false.
582
+ */
583
+ async function canViewConversationLink(viewer, url) {
584
+ const conversationId = parseDashboardConversationLink(url.href);
585
+ if (!conversationId) return false;
586
+ return (await readViewerAccess(viewer, conversationId))?.canViewPrivateContent ?? false;
587
+ }
436
588
  /**
437
- * Resolve a dashboard Conversation link for the viewer. The viewer sees the
438
- * card only where they see the Conversation's private content: a public
439
- * Conversation, or a private one that they take part in. Any other link
440
- * returns nothing, the same as a link to no Conversation.
589
+ * Resolve a dashboard Conversation link for a viewer that
590
+ * `canViewConversationLink` allows. A link to no Conversation returns
591
+ * nothing.
441
592
  */
442
593
  async function resolveConversationLink(viewer, url) {
443
594
  const conversationId = parseDashboardConversationLink(url.href);
@@ -446,7 +597,7 @@ async function resolveConversationLink(viewer, url) {
446
597
  const conversation = await getConversationStore().get({ conversationId });
447
598
  if (!conversation) return void 0;
448
599
  const db = getDb();
449
- const access = (await readConversationAccessFromSql(db, [conversationId], viewer)).get(conversationId);
600
+ const access = await readViewerAccess(viewer, conversationId);
450
601
  if (!access?.canViewPrivateContent) return void 0;
451
602
  const [firstTexts, automationTitles, brief, participants] = await Promise.all([
452
603
  readFirstHumanMessageTexts(db, [conversation]),
@@ -553,6 +704,16 @@ async function resolvePersonLink(url) {
553
704
  url: canonicalUrl
554
705
  });
555
706
  }
707
+ /**
708
+ * Resolve the card of the one known person who linked this provider account.
709
+ * Only account-linking flows put a provider Identity on a User, so the match
710
+ * is verified. Two people with the same handle get no card.
711
+ */
712
+ async function resolvePersonByAccount(account) {
713
+ const rows = await getDb().selectDistinct({ email: juniorUsers.primaryEmail }).from(juniorIdentities).innerJoin(juniorUsers, eq(juniorUsers.id, juniorIdentities.userId)).where(and(eq(juniorIdentities.kind, "user"), eq(juniorIdentities.provider, account.provider), isNotNull(juniorIdentities.userId), sql`lower(${juniorIdentities.handle}) = lower(${account.handle})`)).limit(2);
714
+ const link = rows.length === 1 && getDashboardPersonLink(rows[0].email);
715
+ return link ? await resolvePersonLink(new URL(link)) : void 0;
716
+ }
556
717
  // src/chat/services/subscribed-reply-router-policy.ts
557
718
  /**
558
719
  * Passive subscribed-thread reply router policy.
@@ -3598,6 +3759,10 @@ function createSlackTurn(deps) {
3598
3759
  const messageIds = await sendSlackReply({
3599
3760
  cards,
3600
3761
  channelId: outcome.destination.channelId,
3762
+ formatting: {
3763
+ configuration: preparedState.configuration,
3764
+ teamId: outcome.destination.teamId
3765
+ },
3601
3766
  conversationId,
3602
3767
  replyAttribution: options.execution?.dispatch?.replyAttribution,
3603
3768
  text,
@@ -3614,6 +3779,10 @@ function createSlackTurn(deps) {
3614
3779
  ...replyTarget,
3615
3780
  cards,
3616
3781
  conversationId,
3782
+ formatting: {
3783
+ configuration: preparedState.configuration,
3784
+ teamId: destination.teamId
3785
+ },
3617
3786
  replyAttribution: options.execution?.dispatch?.replyAttribution,
3618
3787
  text
3619
3788
  });
@@ -5578,12 +5747,21 @@ async function resumeSlackTurnInContext(args) {
5578
5747
  failureCode = "delivery_failed";
5579
5748
  const cards = await loadPendingMessageCards(conversationId);
5580
5749
  const deliveryState = await getDeliveryConversation();
5750
+ const configuration = {
5751
+ ...savedRun.environment?.configuration,
5752
+ ...await savedRun.environment?.locationConfiguration?.resolveValues()
5753
+ };
5754
+ const replyTeamId = savedRun.destination.platform === "slack" ? savedRun.destination.teamId : void 0;
5581
5755
  let slackMessageTs = [];
5582
5756
  try {
5583
5757
  const outcomes = runArgs.run?.dispatch?.outcomes;
5584
5758
  if (outcomes) for (const outcome of outcomes) slackMessageTs.push(...await sendSlackReply({
5585
5759
  cards,
5586
5760
  channelId: outcome.destination.channelId,
5761
+ formatting: {
5762
+ configuration,
5763
+ teamId: outcome.destination.teamId
5764
+ },
5587
5765
  conversationId: runArgs.conversationId,
5588
5766
  replyAttribution: runArgs.run?.dispatch?.replyAttribution,
5589
5767
  text,
@@ -5592,6 +5770,10 @@ async function resumeSlackTurnInContext(args) {
5592
5770
  else slackMessageTs = await sendSlackReply({
5593
5771
  cards,
5594
5772
  channelId: runArgs.channelId,
5773
+ ...replyTeamId ? { formatting: {
5774
+ configuration,
5775
+ teamId: replyTeamId
5776
+ } } : void 0,
5595
5777
  conversationId: runArgs.conversationId,
5596
5778
  replyAttribution: runArgs.run?.dispatch?.replyAttribution,
5597
5779
  text,
@@ -6401,6 +6583,14 @@ function createSlackSystemTurnDelivery(args) {
6401
6583
  }),
6402
6584
  cards,
6403
6585
  conversationId,
6586
+ formatting: {
6587
+ configuration: await getLocationConfigurationService({
6588
+ platform: "slack",
6589
+ teamId: location.teamId,
6590
+ channelId: location.channelId
6591
+ }).resolveValues(),
6592
+ teamId: location.teamId
6593
+ },
6404
6594
  text
6405
6595
  })
6406
6596
  });
@@ -6775,65 +6965,6 @@ async function resolveSlackMessageLink(viewer, url) {
6775
6965
  }));
6776
6966
  }
6777
6967
  }
6778
- // src/chat/images/ids.ts
6779
- /**
6780
- * Opaque, signed ids for images that Junior serves. A browser never gets the
6781
- * address of the image, and it cannot ask for an image that Junior did not
6782
- * name.
6783
- */
6784
- const IMAGE_ID_CONTEXT = "junior-image-id";
6785
- /**
6786
- * Widths that the image route serves. A fixed set keeps the cache small.
6787
- * Callers ask for at least 2x the CSS width, so images stay sharp on
6788
- * high-density screens.
6789
- */
6790
- const IMAGE_WIDTHS = [
6791
- 64,
6792
- 128,
6793
- 320,
6794
- 640,
6795
- 1280
6796
- ];
6797
- const imageIdPayloadSchema = z.object({
6798
- ref: z.string().min(1),
6799
- source: z.string().min(1)
6800
- }).strict();
6801
- function signature$1(payload) {
6802
- const secret = readJuniorSecret();
6803
- if (!secret) throw new Error("Cannot sign image ids without JUNIOR_SECRET");
6804
- return createHmac("sha256", secret).update(`${IMAGE_ID_CONTEXT}:${payload}`).digest("base64url");
6805
- }
6806
- /** Return the signed id of one image. */
6807
- function encodeImageId(image) {
6808
- const payload = Buffer.from(JSON.stringify({
6809
- ref: image.ref,
6810
- source: image.source
6811
- }), "utf8").toString("base64url");
6812
- return `${payload}.${signature$1(payload)}`;
6813
- }
6814
- /** Return the image of a signed id, or nothing when the id is not valid. */
6815
- function decodeImageId(id) {
6816
- const [payload, actual, extra] = id.split(".");
6817
- if (!payload || !actual || extra !== void 0) return void 0;
6818
- const expected = Buffer.from(signature$1(payload));
6819
- const given = Buffer.from(actual);
6820
- if (expected.length !== given.length || !timingSafeEqual(expected, given)) return;
6821
- try {
6822
- const parsed = imageIdPayloadSchema.safeParse(JSON.parse(Buffer.from(payload, "base64url").toString("utf8")));
6823
- return parsed.success ? parsed.data : void 0;
6824
- } catch {
6825
- return;
6826
- }
6827
- }
6828
- /**
6829
- * Return the Junior API path of one image at one width. `version` changes
6830
- * the path when the image changes, so a browser can keep each path.
6831
- */
6832
- function imagePath(image, width, version) {
6833
- const query = new URLSearchParams({ w: String(width) });
6834
- if (version) query.set("v", version);
6835
- return `/api/images/${encodeImageId(image)}?${query}`;
6836
- }
6837
6968
  // src/net/public-address.ts
6838
6969
  /**
6839
6970
  * Own the public-address rule for fetches of URLs that any person can submit.
@@ -7155,2234 +7286,104 @@ function parsePageMeta(html) {
7155
7286
  "twitter:image",
7156
7287
  "twitter:image:src"
7157
7288
  ].flatMap((name) => tags.get(name) ?? []),
7289
+ media: tags.get("og:type")?.startsWith("video") || first("og:video", "og:video:url") ? "video" : void 0,
7158
7290
  siteName: first("og:site_name", "application-name"),
7159
7291
  title: first("og:title", "twitter:title") ?? title
7160
7292
  };
7161
7293
  }
7162
- // src/api/objects/web-page/oembed-providers.json
7163
- var oembed_providers_default = [
7164
- {
7165
- "schemes": [
7166
- "https://app.1mind.com/embed/*",
7167
- "https://app.1mind.com/embed/*/*",
7168
- "https://app.dev.1mind.com/embed/*",
7169
- "https://app.dev.1mind.com/embed/*/*"
7170
- ],
7171
- "url": "https://app.1mind.com/oembed"
7172
- },
7173
- {
7174
- "schemes": ["http://www.23hq.com/*/photo/*"],
7175
- "url": "https://www.23hq.com/23/oembed"
7176
- },
7177
- {
7178
- "schemes": ["https://playout.3qsdn.com/embed/*"],
7179
- "url": "https://playout.3qsdn.com/oembed"
7180
- },
7181
- {
7182
- "schemes": [
7183
- "https://3speak.tv/watch?v=*",
7184
- "https://www.3speak.tv/watch?v=*",
7185
- "https://3speak.tv/shorts?v=*",
7186
- "https://www.3speak.tv/shorts?v=*"
7187
- ],
7188
- "url": "https://3speak.tv/oembed"
7189
- },
7190
- {
7191
- "schemes": ["https://store.abraia.me/*"],
7192
- "url": "https://api.abraia.me/oembed"
7193
- },
7194
- {
7195
- "schemes": ["https://play.acast.com/s/*", "https://shows.acast.com/*/episodes/*"],
7196
- "url": "https://oembed.acast.com/v1/embed-player"
7197
- },
7198
- {
7199
- "schemes": ["https://secure.actblue.com/donate/*"],
7200
- "url": "https://secure.actblue.com/cf/oembed"
7201
- },
7202
- {
7203
- "schemes": ["https://adilo.bigcommand.com/watch/*"],
7204
- "url": "https://adilo.bigcommand.com/web/oembed"
7205
- },
7206
- {
7207
- "schemes": [
7208
- "https://vod.afreecatv.com/player/",
7209
- "https://v.afree.ca/ST/",
7210
- "https://vod.afreecatv.com/ST/",
7211
- "https://vod.afreecatv.com/PLAYER/STATION/",
7212
- "https://play.afreecatv.com/"
7213
- ],
7214
- "url": "https://openapi.afreecatv.com/oembed/embedinfo"
7215
- },
7216
- {
7217
- "schemes": ["https://altium.com/viewer/*"],
7218
- "url": "https://viewer.altium.com/shell/oembed"
7219
- },
7220
- {
7221
- "schemes": ["https://app.altrulabs.com/*/*?answer_id=*", "https://app.altrulabs.com/player/*"],
7222
- "url": "https://api.altrulabs.com/api/v1/social/oembed"
7223
- },
7224
- {
7225
- "schemes": ["https://chart.amcharts.com/*/*"],
7226
- "url": "https://live.amcharts.com/api/oembed"
7227
- },
7228
- {
7229
- "schemes": [
7230
- "https://amtraker.com/trains/*",
7231
- "https://amtraker.com/trains/*/*",
7232
- "https://*.amtraker.com/trains/*",
7233
- "https://*.amtraker.com/trains/*/*"
7234
- ],
7235
- "url": "https://api.amtraker.com/v3/oembed"
7236
- },
7237
- {
7238
- "schemes": ["https://www.animatron.com/project/*", "https://animatron.com/project/*"],
7239
- "url": "https://animatron.com/oembed/json"
7240
- },
7241
- {
7242
- "schemes": ["http://animoto.com/play/*"],
7243
- "url": "https://animoto.com/oembeds/create"
7244
- },
7245
- {
7246
- "schemes": ["https://anniemusic.app/t/*", "https://anniemusic.app/p/*"],
7247
- "url": "https://api.anniemusic.app/api/v1/oembed"
7248
- },
7249
- {
7250
- "schemes": ["https://appforcestudio.com/playground/*"],
7251
- "url": "https://us-central1-themerax-cc903.cloudfunctions.net/playgroundApi/oembed"
7252
- },
7253
- {
7254
- "schemes": ["https://podcasts.apple.com/*"],
7255
- "url": "https://podcasts.apple.com/api/oembed"
7256
- },
7257
- {
7258
- "schemes": ["https://storymaps.arcgis.com/stories/*"],
7259
- "url": "https://storymaps.arcgis.com/oembed"
7260
- },
7261
- {
7262
- "schemes": [
7263
- "http://*.studio.assemblrworld.com/creation/*",
7264
- "http://studio.assemblrworld.com/creation/*",
7265
- "http://*.app-edu.assemblrworld.com/Creation/*",
7266
- "http://app-edu.assemblrworld.com/Creation/*",
7267
- "http://assemblr.world/*",
7268
- "http://editor.assemblrworld.com/*",
7269
- "http://*.assemblrworld.com/creation/*",
7270
- "http://*.assemblrworld.com/Creation/*",
7271
- "https://*.studio.assemblrworld.com/creation/*",
7272
- "https://studio.assemblrworld.com/creation/*",
7273
- "https://*.app-edu.assemblrworld.com/Creation/*",
7274
- "https://app-edu.assemblrworld.com/Creation/*",
7275
- "https://assemblr.world/*",
7276
- "https://editor.assemblrworld.com/*",
7277
- "https://*.assemblrworld.com/creation/*",
7278
- "https://*.assemblrworld.com/Creation/*"
7279
- ],
7280
- "url": "https://studio.assemblrworld.com/api/oembed"
7281
- },
7282
- {
7283
- "schemes": [
7284
- "https://atlantisdatasolutions.com/*/*",
7285
- "https://atlantisdatasolutions.com/embed/chart/*/*",
7286
- "https://atlantisdatasolutions.com/yield-curves",
7287
- "https://atlantisdatasolutions.com/sovereign-yield-curves",
7288
- "https://atlantisdatasolutions.com/screener",
7289
- "https://atlantisdatasolutions.com/bubble-chart-screener",
7290
- "https://atlantisdatasolutions.com/embed/yield-curve",
7291
- "https://atlantisdatasolutions.com/embed/sovereign-curve",
7292
- "https://atlantisdatasolutions.com/embed/screener",
7293
- "https://atlantisdatasolutions.com/embed/europe-screener",
7294
- "https://atlantisdatasolutions.com/embed/rankings/*"
7295
- ],
7296
- "url": "https://atlantisdatasolutions.com/oembed"
7297
- },
7298
- {
7299
- "schemes": [
7300
- "https://audio.com/*",
7301
- "https://www.audio.com/*",
7302
- "http://audio.com/*",
7303
- "http://www.audio.com/*"
7304
- ],
7305
- "url": "https://api.audio.com/oembed"
7306
- },
7307
- {
7308
- "schemes": [
7309
- "https://audioboom.com/channels/*",
7310
- "https://audioboom.com/channel/*",
7311
- "https://audioboom.com/playlists/*",
7312
- "https://audioboom.com/podcasts/*",
7313
- "https://audioboom.com/podcast/*",
7314
- "https://audioboom.com/posts/*",
7315
- "https://audioboom.com/episodes/*"
7316
- ],
7317
- "url": "https://audioboom.com/publishing/oembed.{format}"
7318
- },
7319
- {
7320
- "schemes": ["https://audioclip.naver.com/channels/*/clips/*", "https://audioclip.naver.com/audiobooks/*"],
7321
- "url": "https://audioclip.naver.com/oembed"
7322
- },
7323
- {
7324
- "schemes": [
7325
- "https://audiomack.com/*/song/*",
7326
- "https://audiomack.com/*/album/*",
7327
- "https://audiomack.com/*/playlist/*"
7328
- ],
7329
- "url": "https://audiomack.com/oembed"
7330
- },
7331
- {
7332
- "schemes": ["https://podcasts.audiomeans.fr/*"],
7333
- "url": "https://podcasts.audiomeans.fr/services/oembed"
7334
- },
7335
- {
7336
- "schemes": ["https://audiosfx.org/audio/*", "https://audiosfx.org/playlist/*"],
7337
- "url": "https://audiosfx.org/api/oembed"
7338
- },
7339
- {
7340
- "schemes": ["https://audius.co/*"],
7341
- "url": "https://audius.co/oembed"
7342
- },
7343
- {
7344
- "schemes": [
7345
- "https://backtracks.fm/*/*/e/*",
7346
- "https://backtracks.fm/*/s/*/*",
7347
- "https://backtracks.fm/*/*/*/*/e/*/*",
7348
- "https://backtracks.fm/*",
7349
- "http://backtracks.fm/*"
7350
- ],
7351
- "url": "https://backtracks.fm/oembed"
7352
- },
7353
- {
7354
- "schemes": ["https://balsamiq.cloud/*"],
7355
- "url": "https://balsamiq.cloud/oembed"
7356
- },
7357
- {
7358
- "schemes": ["https://www.behance.net/gallery/*/*", "https://www.behance.net/*/services/*/*"],
7359
- "url": "https://www.behance.net/services/oembed"
7360
- },
7361
- {
7362
- "schemes": ["http://beta.quellensuche.de/*"],
7363
- "url": "https://beta.quellensuche.de/api/oembed"
7364
- },
7365
- {
7366
- "schemes": ["https://biqapp.net/f/*", "https://www.biqapp.net/f/*"],
7367
- "url": "https://biqapp.net/api/oembed"
7368
- },
7369
- {
7370
- "schemes": ["https://blackfire.io/profiles/*/graph", "https://blackfire.io/profiles/compare/*/graph"],
7371
- "url": "https://blackfire.io/oembed"
7372
- },
7373
- {
7374
- "schemes": ["https://blogcast.host/embed/*", "https://blogcast.host/embedly/*"],
7375
- "url": "https://blogcast.host/oembed"
7376
- },
7377
- {
7378
- "schemes": ["https://bsky.app/profile/*/post/*"],
7379
- "url": "https://embed.bsky.app/oembed"
7380
- },
7381
- {
7382
- "schemes": [
7383
- "https://bondbyisin.com/bond/*",
7384
- "https://bondbyisin.com/swap-curves*",
7385
- "https://bondbyisin.com/embed/bond-price/*",
7386
- "https://bondbyisin.com/embed/swap-curve*",
7387
- "https://www.bondbyisin.com/bond/*",
7388
- "https://www.bondbyisin.com/swap-curves*",
7389
- "https://www.bondbyisin.com/embed/bond-price/*",
7390
- "https://www.bondbyisin.com/embed/swap-curve*"
7391
- ],
7392
- "url": "https://bondbyisin.com/oembed"
7393
- },
7394
- {
7395
- "schemes": ["https://www.bookingmood.com/embed/*/*"],
7396
- "url": "https://bookingmood.com/api/oembed"
7397
- },
7398
- {
7399
- "schemes": ["https://www.bornetube.dk/media/*", "https://www.bornetube.dk/video/*"],
7400
- "url": "https://www.bornetube.dk/media/lasync/oembed/"
7401
- },
7402
- {
7403
- "schemes": ["https://boxofficebuz.com/embed/video/*"],
7404
- "url": "https://api.boxofficebuz.com/v2/oembed"
7405
- },
7406
- {
7407
- "schemes": [
7408
- "https://players.brightcove.net/*/*/index.html?videoId=*",
7409
- "https://players.brightcove.net/*/*/index.html?playlistId=*",
7410
- "https://bcove.video/*"
7411
- ],
7412
- "url": "https://oembed.brightcove.com/"
7413
- },
7414
- {
7415
- "schemes": [
7416
- "https://budgetpixel.com/p/*",
7417
- "https://budgetpixel.com/sfx/*",
7418
- "https://budgetpixel.com/background-music/*"
7419
- ],
7420
- "url": "https://budgetpixel.com/oembed"
7421
- },
7422
- {
7423
- "schemes": ["https://www.bumper.com/oembed/bumper", "https://www.bumper.com/oembed-s/bumper"],
7424
- "url": "https://www.bumper.com/oembed/bumper"
7425
- },
7426
- {
7427
- "schemes": [
7428
- "https://player.mediadelivery.net/*",
7429
- "http://player.mediadelivery.net/*",
7430
- "https://iframe.mediadelivery.net/*",
7431
- "http://iframe.mediadelivery.net/*",
7432
- "https://video.bunnycdn.com/*",
7433
- "http://video.bunnycdn.com/*"
7434
- ],
7435
- "url": "https://video.bunnycdn.com/OEmbed"
7436
- },
7437
- {
7438
- "schemes": ["https://buttondown.email/*"],
7439
- "url": "https://buttondown.email/embed"
7440
- },
7441
- {
7442
- "schemes": ["https://cmc.byzart.eu/files/*"],
7443
- "url": "https://cmc.byzart.eu/oembed/"
7444
- },
7445
- {
7446
- "schemes": ["https://cacoo.com/diagrams/*"],
7447
- "url": "https://cacoo.com/oembed.{format}"
7448
- },
7449
- {
7450
- "schemes": ["https://calget.com/calendar-embed/*"],
7451
- "url": "https://calget.com/oembed"
7452
- },
7453
- {
7454
- "schemes": ["https://www.canva.com/design/*/view"],
7455
- "url": "https://www.canva.com/_oembed"
7456
- },
7457
- {
7458
- "schemes": ["https://carbon.music/*", "https://www.carbon.music/*"],
7459
- "url": "https://carbon.music/oembed"
7460
- },
7294
+ // src/api/objects/web-page/oembed.ts
7295
+ /**
7296
+ * A short, hand-kept list of well-known oEmbed providers. Every other page
7297
+ * falls back to its Open Graph tags. Junior uses only the plain oEmbed
7298
+ * fields, never `html`. A provider that needs an access token, such as
7299
+ * Instagram, is not listed.
7300
+ */
7301
+ const PATTERNS = [
7461
7302
  {
7462
- "schemes": [
7463
- "https://carbonvoice.app/s/*",
7464
- "https://carbonvoice.app/m/*",
7465
- "https://carbonvoice.app/c/*"
7466
- ],
7467
- "url": "https://carbonvoice.app/api/oembed"
7303
+ endpoint: "https://www.youtube.com/oembed",
7304
+ schemes: [
7305
+ "https://{*.}?youtube.com/watch*",
7306
+ "https://{*.}?youtube.com/shorts/*",
7307
+ "https://{*.}?youtube.com/live/*",
7308
+ "https://{*.}?youtube.com/playlist*",
7309
+ "https://youtu.be/*"
7310
+ ]
7468
7311
  },
7469
7312
  {
7470
- "schemes": ["https://castle.xyz/d/*"],
7471
- "url": "https://castle.xyz/api/oembed"
7313
+ endpoint: "https://vimeo.com/api/oembed.json",
7314
+ schemes: ["https://vimeo.com/*", "https://player.vimeo.com/video/*"]
7472
7315
  },
7473
7316
  {
7474
- "schemes": ["https://www.castmake-ai.com/c/*/episodes/*"],
7475
- "url": "https://castmake-ai.com/api/embed"
7317
+ endpoint: "https://publish.x.com/oembed",
7318
+ schemes: ["https://{*.}?x.com/*/status/*"]
7476
7319
  },
7477
7320
  {
7478
- "schemes": ["http://img.catbo.at/*"],
7479
- "url": "https://img.catbo.at/oembed.json"
7321
+ endpoint: "https://publish.twitter.com/oembed",
7322
+ schemes: ["https://{*.}?twitter.com/*/status/*"]
7480
7323
  },
7481
7324
  {
7482
- "schemes": ["https://embeds.celero.io/*"],
7483
- "url": "https://api.celero.io/api/oembed"
7325
+ endpoint: "https://www.figma.com/api/oembed",
7326
+ schemes: ["https://www.figma.com/(file|design|board|slides|proto)/*"]
7484
7327
  },
7485
7328
  {
7486
- "schemes": ["http://view.ceros.com/*", "https://view.ceros.com/*"],
7487
- "url": "https://view.ceros.com/oembed"
7329
+ endpoint: "https://www.loom.com/v1/oembed",
7330
+ schemes: ["https://{www.}?loom.com/(share|i)/*"]
7488
7331
  },
7489
7332
  {
7490
- "schemes": ["https://chanceindex.com/odds/*"],
7491
- "url": "https://chanceindex.com/api/oembed"
7333
+ endpoint: "https://open.spotify.com/oembed",
7334
+ schemes: ["https://open.spotify.com/*", "https://spotify.link/*"]
7492
7335
  },
7493
7336
  {
7494
- "schemes": ["http://public.chartblocks.com/c/*"],
7495
- "url": "https://embed.chartblocks.com/1.0/oembed"
7337
+ endpoint: "https://soundcloud.com/oembed",
7338
+ schemes: ["https://soundcloud.com/*", "https://on.soundcloud.com/*"]
7496
7339
  },
7497
7340
  {
7498
- "schemes": ["https://chroco.ooo/mypage/*", "https://chroco.ooo/story/*"],
7499
- "url": "https://chroco.ooo/embed"
7341
+ endpoint: "https://codepen.io/api/oembed",
7342
+ schemes: ["https://codepen.io/*/pen/*"]
7500
7343
  },
7501
7344
  {
7502
- "schemes": [
7503
- "https://www.circlezeroeight.com/features/*",
7504
- "https://www.circlezeroeight.com/news/*",
7505
- "https://www.circlezeroeight.com/sport/*",
7506
- "https://www.circlezeroeight.com/style/*",
7507
- "https://www.circlezeroeight.com/culture/*"
7508
- ],
7509
- "url": "https://www.circlezeroeight.com/api/oembed"
7345
+ endpoint: "https://giphy.com/services/oembed",
7346
+ schemes: ["https://giphy.com/(gifs|clips)/*"]
7510
7347
  },
7511
7348
  {
7512
- "schemes": ["https://www.circuitlab.com/circuit/*"],
7513
- "url": "https://www.circuitlab.com/circuit/oembed/"
7349
+ endpoint: "https://www.flickr.com/services/oembed/",
7350
+ schemes: ["https://{*.}?flickr.com/photos/*", "https://flic.kr/*"]
7514
7351
  },
7515
7352
  {
7516
- "schemes": ["https://clipform.io/*"],
7517
- "url": "https://api.clipform.io/v1/oembed"
7353
+ endpoint: "https://www.tiktok.com/oembed",
7354
+ schemes: ["https://www.tiktok.com/*/video/*"]
7518
7355
  },
7519
7356
  {
7520
- "schemes": ["http://www.clipland.com/v/*", "https://www.clipland.com/v/*"],
7521
- "url": "https://www.clipland.com/api/oembed"
7357
+ endpoint: "https://www.reddit.com/oembed",
7358
+ schemes: ["https://{www.}?reddit.com/r/*/comments/*"]
7522
7359
  },
7523
7360
  {
7524
- "schemes": ["https://clueso.site/*"],
7525
- "url": "https://clueso.site/api/oembed"
7361
+ endpoint: "https://www.slideshare.net/api/oembed/2",
7362
+ schemes: ["https://{*.}?slideshare.net/*/*"]
7526
7363
  },
7527
7364
  {
7528
- "schemes": ["http://clyp.it/*", "http://clyp.it/playlist/*"],
7529
- "url": "https://api.clyp.it/oembed/"
7365
+ endpoint: "https://speakerdeck.com/oembed.json",
7366
+ schemes: ["https://speakerdeck.com/*/*"]
7530
7367
  },
7531
7368
  {
7532
- "schemes": ["https://codehs.com/editor/share_abacus/*"],
7533
- "url": "https://codehs.com/api/sharedprogram/1/oembed/"
7369
+ endpoint: "https://www.dailymotion.com/services/oembed",
7370
+ schemes: ["https://www.dailymotion.com/video/*", "https://dai.ly/*"]
7534
7371
  },
7535
7372
  {
7536
- "schemes": ["http://codepen.io/*", "https://codepen.io/*"],
7537
- "url": "https://codepen.io/api/oembed"
7373
+ endpoint: "https://www.ted.com/services/v1/oembed.json",
7374
+ schemes: ["https://{www.}?ted.com/talks/*"]
7538
7375
  },
7539
7376
  {
7540
- "schemes": [
7541
- "http://codepoints.net/*",
7542
- "https://codepoints.net/*",
7543
- "http://www.codepoints.net/*",
7544
- "https://www.codepoints.net/*"
7545
- ],
7546
- "url": "https://codepoints.net/api/v1/oembed"
7547
- },
7548
- {
7549
- "schemes": ["https://codesandbox.io/s/*", "https://codesandbox.io/embed/*"],
7550
- "url": "https://codesandbox.io/oembed"
7551
- },
7552
- {
7553
- "schemes": ["http://www.collegehumor.com/video/*"],
7554
- "url": "https://www.collegehumor.com/oembed.{format}"
7555
- },
7556
- {
7557
- "schemes": ["https://coloringmonster.com/coloring-page/*", "https://coloringmonster.com/monsterpieces/*"],
7558
- "url": "https://coloringmonster.com/oembed"
7559
- },
7560
- {
7561
- "schemes": ["https://commaful.com/play/*"],
7562
- "url": "https://commaful.com/api/oembed/"
7563
- },
7564
- {
7565
- "schemes": ["http://coub.com/view/*", "http://coub.com/embed/*"],
7566
- "url": "https://coub.com/api/oembed.{format}"
7567
- },
7568
- {
7569
- "schemes": ["https://crumb.sh/*"],
7570
- "url": "https://crumb.sh/oembed/"
7571
- },
7572
- {
7573
- "schemes": ["https://cueup.io/user/*/sounds/*"],
7574
- "url": "https://gql.cueup.io/oembed"
7575
- },
7576
- {
7577
- "schemes": ["https://*.curated.co/*"],
7578
- "url": "https://api.curated.co/oembed"
7579
- },
7580
- {
7581
- "schemes": ["https://dcalculators.com/*/*/*/"],
7582
- "url": "https://dcalculators.com/oembed"
7583
- },
7584
- {
7585
- "schemes": ["https://app.dadan.io/*", "https://stage.dadan.io/*"],
7586
- "url": "https://app.dadan.io/api/video/oembed"
7587
- },
7588
- {
7589
- "schemes": ["https://www.dailymotion.com/video/*", "https://geo.dailymotion.com/player.html?video=*"],
7590
- "url": "https://www.dailymotion.com/services/oembed"
7591
- },
7592
- {
7593
- "schemes": ["https://dalexni.com/i/*"],
7594
- "url": "https://dalexni.com/oembed/"
7595
- },
7596
- {
7597
- "schemes": ["https://datawrapper.dwcdn.net/*"],
7598
- "url": "https://api.datawrapper.de/v3/oembed/"
7599
- },
7600
- {
7601
- "schemes": [
7602
- "https://debatr.tv/d/*",
7603
- "https://debatr.tv/t/*",
7604
- "https://debatr.tv/embed/*"
7605
- ],
7606
- "url": "https://debatr.tv/api/oembed"
7607
- },
7608
- {
7609
- "schemes": ["https://app.demofly.ai/s/*", "https://demofly.ai/s/*"],
7610
- "url": "https://app.demofly.ai/api/oembed"
7611
- },
7612
- {
7613
- "schemes": ["https://*.deseret.com/*"],
7614
- "url": "https://embed.deseret.com/"
7615
- },
7616
- {
7617
- "schemes": [
7618
- "http://*.deviantart.com/art/*",
7619
- "http://*.deviantart.com/*#/d*",
7620
- "http://fav.me/*",
7621
- "http://sta.sh/*",
7622
- "https://*.deviantart.com/art/*",
7623
- "https://*.deviantart.com/*/art/*",
7624
- "https://sta.sh/*",
7625
- "https://*.deviantart.com/*#/d*"
7626
- ],
7627
- "url": "https://backend.deviantart.com/oembed"
7628
- },
7629
- {
7630
- "schemes": [
7631
- "https://www.ultimedia.com/central/video/edit/id/*/topic_id/*/",
7632
- "https://www.ultimedia.com/default/index/videogeneric/id/*/showtitle/1/viewnc/1",
7633
- "https://www.ultimedia.com/default/index/videogeneric/id/*"
7634
- ],
7635
- "url": "https://www.ultimedia.com/api/search/oembed"
7636
- },
7637
- {
7638
- "schemes": [
7639
- "https://*.docdroid.net/*",
7640
- "http://*.docdroid.net/*",
7641
- "https://docdro.id/*",
7642
- "http://docdro.id/*",
7643
- "https://*.docdroid.com/*",
7644
- "http://*.docdroid.com/*"
7645
- ],
7646
- "url": "https://www.docdroid.net/api/oembed"
7647
- },
7648
- {
7649
- "schemes": [
7650
- "http://docswell.com/s/*/*",
7651
- "https://docswell.com/s/*/*",
7652
- "http://www.docswell.com/s/*/*",
7653
- "https://www.docswell.com/s/*/*"
7654
- ],
7655
- "url": "https://www.docswell.com/service/oembed"
7656
- },
7657
- {
7658
- "schemes": ["https://www.documentcloud.org/documents/*"],
7659
- "url": "https://api.www.documentcloud.org/api/oembed"
7660
- },
7661
- {
7662
- "schemes": ["http://dotsub.com/view/*"],
7663
- "url": "https://dotsub.com/services/oembed"
7664
- },
7665
- {
7666
- "schemes": ["https://www.dreambroker.com/channel/*/*"],
7667
- "url": "https://dreambroker.com/channel/oembed"
7668
- },
7669
- {
7670
- "schemes": ["https://d.tube/v/*"],
7671
- "url": "https://api.d.tube/oembed"
7672
- },
7673
- {
7674
- "schemes": ["https://ecency.com/@*/*", "https://ecency.com/*/@*/*"],
7675
- "url": "https://ecency.com/api/oembed"
7676
- },
7677
- {
7678
- "schemes": ["http://egliseinfo.catholique.fr/*"],
7679
- "url": "https://egliseinfo.catholique.fr/api/oembed"
7680
- },
7681
- {
7682
- "schemes": ["https://electiontracker.eu/*"],
7683
- "url": "https://electiontracker.eu/oembed"
7684
- },
7685
- {
7686
- "schemes": ["https://elevenlabs.io/*"],
7687
- "url": "https://elevenlabs.io/next/oembed"
7688
- },
7689
- {
7690
- "schemes": ["https://www.elupedia.fr/elus/*", "https://www.elupedia.fr/scrutins/*"],
7691
- "url": "https://www.elupedia.fr/api/oembed"
7692
- },
7693
- {
7694
- "schemes": ["https://www.embases.com/e/*"],
7695
- "url": "https://www.embases.com/api/oembed"
7696
- },
7697
- {
7698
- "schemes": ["https://embedery.com/widget/*"],
7699
- "url": "https://embedery.com/api/oembed"
7700
- },
7701
- {
7702
- "schemes": ["https://ethfiddle.com/*"],
7703
- "url": "https://ethfiddle.com/services/oembed/"
7704
- },
7705
- {
7706
- "schemes": [
7707
- "https://evt.live/*",
7708
- "https://evt.live/*/*",
7709
- "https://live.eventlive.pro/*",
7710
- "https://live.eventlive.pro/*/*"
7711
- ],
7712
- "url": "https://evt.live/api/oembed"
7713
- },
7714
- {
7715
- "schemes": ["https://app.everviz.com/embed/*", "http://app.everviz.com/embed/*"],
7716
- "url": "https://api.everviz.com/oembed"
7717
- },
7718
- {
7719
- "schemes": ["https://cdn.everwall.com/hubs/iframe/*"],
7720
- "url": "https://cdn.everwall.com/hubs/oembed"
7721
- },
7722
- {
7723
- "schemes": ["https://everypage.co/*"],
7724
- "url": "https://everypage.co/oembed"
7725
- },
7726
- {
7727
- "schemes": [
7728
- "https://www.facebook.com/*/posts/*",
7729
- "https://www.facebook.com/*/activity/*",
7730
- "https://www.facebook.com/*/photos/*",
7731
- "https://www.facebook.com/photo.php?fbid=*",
7732
- "https://www.facebook.com/photos/*",
7733
- "https://www.facebook.com/permalink.php?story_fbid=*",
7734
- "https://www.facebook.com/media/set?set=*",
7735
- "https://www.facebook.com/questions/*",
7736
- "https://www.facebook.com/notes/*/*/*"
7737
- ],
7738
- "url": "https://graph.facebook.com/v16.0/oembed_post"
7739
- },
7740
- {
7741
- "schemes": [
7742
- "https://www.facebook.com/*/videos/*",
7743
- "https://www.facebook.com/video.php?id=*",
7744
- "https://www.facebook.com/video.php?v=*"
7745
- ],
7746
- "url": "https://graph.facebook.com/v16.0/oembed_video"
7747
- },
7748
- {
7749
- "schemes": ["https://www.facebook.com/*"],
7750
- "url": "https://graph.facebook.com/v16.0/oembed_page"
7751
- },
7752
- {
7753
- "schemes": [
7754
- "https://faithlifetv.com/items/*",
7755
- "https://faithlifetv.com/items/resource/*/*",
7756
- "https://faithlifetv.com/media/*",
7757
- "https://faithlifetv.com/media/assets/*",
7758
- "https://faithlifetv.com/media/resource/*/*"
7759
- ],
7760
- "url": "https://faithlifetv.com/api/oembed"
7761
- },
7762
- {
7763
- "schemes": ["https://haus.fazen.co/embed/music/*"],
7764
- "url": "https://haus.fazen.co/api/oembed"
7765
- },
7766
- {
7767
- "schemes": [
7768
- "https://www.figma.com/file/*",
7769
- "https://www.figma.com/design/*",
7770
- "https://www.figma.com/board/*",
7771
- "https://www.figma.com/slides/*",
7772
- "https://www.figma.com/buzz/*",
7773
- "https://www.figma.com/site/*",
7774
- "https://www.figma.com/make/*"
7775
- ],
7776
- "url": "https://www.figma.com/api/oembed"
7777
- },
7778
- {
7779
- "schemes": ["https://app.filestage.io/step/**"],
7780
- "url": "https://app.filestage.io/oembed"
7781
- },
7782
- {
7783
- "schemes": ["https://*.fireworktv.com/*", "https://*.fireworktv.com/embed/*/v/*"],
7784
- "url": "https://www.fireworktv.com/oembed"
7785
- },
7786
- {
7787
- "schemes": ["https://www.fite.tv/watch/*"],
7788
- "url": "https://www.fite.tv/oembed"
7789
- },
7790
- {
7791
- "schemes": ["https://flat.io/score/*", "https://*.flat.io/score/*"],
7792
- "url": "https://flat.io/services/oembed"
7793
- },
7794
- {
7795
- "schemes": [
7796
- "http://*.flickr.com/photos/*",
7797
- "http://flic.kr/p/*",
7798
- "http://flic.kr/s/*",
7799
- "https://*.flickr.com/photos/*",
7800
- "https://flic.kr/p/*",
7801
- "https://flic.kr/s/*",
7802
- "https://*.*.flickr.com/*/*",
7803
- "http://*.*.flickr.com/*/*"
7804
- ],
7805
- "url": "https://www.flickr.com/services/oembed/"
7806
- },
7807
- {
7808
- "schemes": ["https://public.flourish.studio/visualisation/*", "https://public.flourish.studio/story/*"],
7809
- "url": "https://app.flourish.studio/api/v1/oembed"
7810
- },
7811
- {
7812
- "schemes": ["https://flowhub.org/f/*", "https://flowhub.org/s/*"],
7813
- "url": "https://flowhub.org/o/embed"
7814
- },
7815
- {
7816
- "schemes": ["https://fomr.io/s/*", "https://www.fomr.io/s/*"],
7817
- "url": "https://api.fomr.io/public/oembed"
7818
- },
7819
- {
7820
- "schemes": ["https://fooday.app/*/reviews/*", "https://fooday.app/*/spots/*"],
7821
- "url": "https://fooday.app/oembed"
7822
- },
7823
- {
7824
- "schemes": ["https://forms.form-data.com/*"],
7825
- "url": "https://forms.form-data.com/api/oembed"
7826
- },
7827
- {
7828
- "schemes": ["http://fiso.foxsports.com.au/isomorphic-widget/*", "https://fiso.foxsports.com.au/isomorphic-widget/*"],
7829
- "url": "https://fiso.foxsports.com.au/oembed"
7830
- },
7831
- {
7832
- "schemes": ["https://framatube.org/w/*"],
7833
- "url": "https://framatube.org/services/oembed"
7834
- },
7835
- {
7836
- "schemes": ["http://framebuzz.com/v/*", "https://framebuzz.com/v/*"],
7837
- "url": "https://framebuzz.com/oembed/"
7838
- },
7839
- {
7840
- "schemes": ["https://framer.com/share/*", "https://framer.com/embed/*"],
7841
- "url": "https://api.framer.com/web/oembed"
7842
- },
7843
- {
7844
- "schemes": ["https://framerate.tv/watch/*"],
7845
- "url": "https://framerate.tv/api/oembed"
7846
- },
7847
- {
7848
- "schemes": [
7849
- "https://frequencing.com/track/*",
7850
- "https://frequencing.com/post/*",
7851
- "https://frequencing.com/user/*/playlists/*",
7852
- "https://frequencing.com/groups/*"
7853
- ],
7854
- "url": "https://frequencing.com/api/oembed"
7855
- },
7856
- {
7857
- "schemes": ["https://fritube.ch/v/*"],
7858
- "url": "https://fritube.ch/services/oembed"
7859
- },
7860
- {
7861
- "schemes": [
7862
- "https://www.gentoon.ai/community/posts/*",
7863
- "https://www.gentoon.ai/*/community/posts/*",
7864
- "https://gentoon.ai/community/posts/*",
7865
- "https://gentoon.ai/*/community/posts/*",
7866
- "https://www.gentoon.ai/embed/post/*"
7867
- ],
7868
- "url": "https://www.gentoon.ai/api/oembed"
7869
- },
7870
- {
7871
- "schemes": ["https://geometryviewer.com/v/*", "https://www.geometryviewer.com/v/*"],
7872
- "url": "https://geometryviewer.com/oembed"
7873
- },
7874
- {
7875
- "schemes": ["http://gty.im/*"],
7876
- "url": "https://embed.gettyimages.com/oembed"
7877
- },
7878
- {
7879
- "schemes": ["https://www.gifnote.com/play/*"],
7880
- "url": "https://www.gifnote.com/services/oembed"
7881
- },
7882
- {
7883
- "schemes": ["https://gigngo.org/watch/*", "https://gigngo.org/embed/*"],
7884
- "url": "https://gigngo.org/oembed"
7885
- },
7886
- {
7887
- "schemes": [
7888
- "https://giphy.com/gifs/*",
7889
- "https://giphy.com/clips/*",
7890
- "http://gph.is/*",
7891
- "https://media.giphy.com/media/*/giphy.gif"
7892
- ],
7893
- "url": "https://giphy.com/services/oembed"
7894
- },
7895
- {
7896
- "schemes": ["https://view.gmetri.com/*", "https://*.gmetri.com/*"],
7897
- "url": "https://embed.gmetri.com/oembed/"
7898
- },
7899
- {
7900
- "schemes": ["https://app.gong.io/call?id=*"],
7901
- "url": "https://app.gong.io/oembed"
7902
- },
7903
- {
7904
- "schemes": ["https://www.good-for-job.jp/slides/*"],
7905
- "url": "https://www.good-for-job.jp/api/oembed"
7906
- },
7907
- {
7908
- "schemes": [
7909
- "https://grain.co/highlight/*",
7910
- "https://grain.co/share/*",
7911
- "https://grain.com/share/*"
7912
- ],
7913
- "url": "https://api.grain.com/_/api/oembed"
7914
- },
7915
- {
7916
- "schemes": ["https://gumlet.tv/watch/*", "https://play.gumlet.io/embed/*"],
7917
- "url": "https://api.gumlet.com/v1/oembed"
7918
- },
7919
- {
7920
- "schemes": ["https://gw2fashions.com/fashion/*"],
7921
- "url": "https://gw2fashions.com/fashion/oembed"
7922
- },
7923
- {
7924
- "schemes": ["https://gyazo.com/*"],
7925
- "url": "https://api.gyazo.com/api/oembed"
7926
- },
7927
- {
7928
- "schemes": ["https://core.hash.ai/@*"],
7929
- "url": "https://api.hash.ai/oembed"
7930
- },
7931
- {
7932
- "schemes": ["https://hdr.show/view/*"],
7933
- "url": "https://hdr.show/api/oembed"
7934
- },
7935
- {
7936
- "schemes": ["https://hearthis.at/*/*/", "https://hearthis.at/*/set/*/"],
7937
- "url": "https://hearthis.at/oembed/?format=json"
7938
- },
7939
- {
7940
- "schemes": [
7941
- "https://heyzine.com/flip-book/*",
7942
- "https://*.hflip.co/*",
7943
- "https://*.aflip.in/*"
7944
- ],
7945
- "url": "https://heyzine.com/api1/oembed"
7946
- },
7947
- {
7948
- "schemes": ["https://player.hihaho.com/*"],
7949
- "url": "https://player.hihaho.com/services/oembed"
7950
- },
7951
- {
7952
- "schemes": ["http://*.hippovideo.io/*", "https://*.hippovideo.io/*"],
7953
- "url": "https://www.hippovideo.io/services/oembed"
7954
- },
7955
- {
7956
- "schemes": [
7957
- "https://cdn.hivo.com.au/*",
7958
- "https://cdn.digital-assets.uq.edu.au/*",
7959
- "https://cdn.southerndesigngroup.com/*",
7960
- "https://freedom.hivocdn.com/*",
7961
- "https://cdn.cockburn.wa.gov.au/*",
7962
- "https://cdn.somnomed.com/*",
7963
- "https://cdn.snowtunnel.com/*",
7964
- "https://cdn.brenclosures.com.au/*"
7965
- ],
7966
- "url": "https://app.hivo.com.au/api/drupal/oembed"
7967
- },
7968
- {
7969
- "schemes": ["https://homey.app/f/*", "https://homey.app/*/flow/*"],
7970
- "url": "https://homey.app/api/oembed/flow"
7971
- },
7972
- {
7973
- "schemes": ["http://huffduffer.com/*/*"],
7974
- "url": "https://huffduffer.com/oembed"
7975
- },
7976
- {
7977
- "schemes": ["http://www.hulu.com/watch/*"],
7978
- "url": "https://www.hulu.com/api/oembed.{format}"
7979
- },
7980
- {
7981
- "schemes": ["https://icosa.gallery/view/*"],
7982
- "url": "https://api.icosa.gallery/v1/oembed"
7983
- },
7984
- {
7985
- "schemes": ["https://oembed.ideamapper.com/*"],
7986
- "url": "https://oembed.ideamapper.com/oembed"
7987
- },
7988
- {
7989
- "schemes": ["https://*.idomoo.com/*"],
7990
- "url": "https://oembed.idomoo.com/oembed"
7991
- },
7992
- {
7993
- "schemes": ["http://www.ifixit.com/Guide/View/*"],
7994
- "url": "https://www.ifixit.com/Embed"
7995
- },
7996
- {
7997
- "schemes": ["http://ifttt.com/recipes/*"],
7998
- "url": "https://www.ifttt.com/oembed/"
7999
- },
8000
- {
8001
- "schemes": ["https://*.videocdn.net/player/*", "https://*.euvideocdn.com/player/*"],
8002
- "url": "https://app.ignitevideo.cloud/api/oembed"
8003
- },
8004
- {
8005
- "schemes": ["https://www.iheart.com/podcast/*/*"],
8006
- "url": "https://www.iheart.com/oembed"
8007
- },
8008
- {
8009
- "schemes": ["http://qr.imenupro.com/*", "https://qr.imenupro.com/*"],
8010
- "url": "https://qr.imenupro.com/api/oembed"
8011
- },
8012
- {
8013
- "schemes": ["https://player.indacolive.com/player/jwp/clients/*"],
8014
- "url": "https://player.indacolive.com/services/oembed"
8015
- },
8016
- {
8017
- "schemes": ["https://infogram.com/*"],
8018
- "url": "https://infogram.com/oembed"
8019
- },
8020
- {
8021
- "schemes": ["https://*.infoveave.net/E/*", "https://*.infoveave.net/P/*"],
8022
- "url": "https://infoveave.net/services/oembed/"
8023
- },
8024
- {
8025
- "schemes": ["https://www.injurymap.com/exercises/*"],
8026
- "url": "https://www.injurymap.com/services/oembed"
8027
- },
8028
- {
8029
- "schemes": ["https://www.inoreader.com/oembed/"],
8030
- "url": "https://www.inoreader.com/oembed/api/"
8031
- },
8032
- {
8033
- "schemes": ["http://*.inphood.com/*"],
8034
- "url": "https://api.inphood.com/oembed"
8035
- },
8036
- {
8037
- "schemes": ["https://insighttimer.com/*"],
8038
- "url": "https://widgets.insighttimer.com/services/oembed"
8039
- },
8040
- {
8041
- "schemes": [
8042
- "http://instagram.com/*/p/*",
8043
- "http://www.instagram.com/*/p/*",
8044
- "https://instagram.com/*/p/*",
8045
- "https://www.instagram.com/*/p/*",
8046
- "http://instagram.com/p/*",
8047
- "http://instagr.am/p/*",
8048
- "http://www.instagram.com/p/*",
8049
- "http://www.instagr.am/p/*",
8050
- "https://instagram.com/p/*",
8051
- "https://instagr.am/p/*",
8052
- "https://www.instagram.com/p/*",
8053
- "https://www.instagr.am/p/*",
8054
- "http://instagram.com/tv/*",
8055
- "http://instagr.am/tv/*",
8056
- "http://www.instagram.com/tv/*",
8057
- "http://www.instagr.am/tv/*",
8058
- "https://instagram.com/tv/*",
8059
- "https://instagr.am/tv/*",
8060
- "https://www.instagram.com/tv/*",
8061
- "https://www.instagr.am/tv/*",
8062
- "http://www.instagram.com/reel/*",
8063
- "https://www.instagram.com/reel/*",
8064
- "http://instagram.com/reel/*",
8065
- "https://instagram.com/reel/*",
8066
- "http://instagr.am/reel/*",
8067
- "https://instagr.am/reel/*",
8068
- "http://www.instagram.com/*/reel/*",
8069
- "https://www.instagram.com/*/reel/*",
8070
- "http://instagram.com/*/reel/*",
8071
- "https://instagram.com/*/reel/*"
8072
- ],
8073
- "url": "https://graph.facebook.com/v16.0/instagram_oembed"
8074
- },
8075
- {
8076
- "schemes": ["https://ppa.insticator.com/embed-unit/*"],
8077
- "url": "https://www.insticator.com/oembed"
8078
- },
8079
- {
8080
- "schemes": ["https://issuu.com/*/docs/*"],
8081
- "url": "https://issuu.com/oembed"
8082
- },
8083
- {
8084
- "schemes": ["https://samay.itabtechinfosys.com/*"],
8085
- "url": "https://samay.itabtechinfosys.com/oembed/"
8086
- },
8087
- {
8088
- "schemes": ["https://jawafdehi.org/case/*"],
8089
- "url": "https://api.jawafdehi.org/oembed/"
8090
- },
8091
- {
8092
- "schemes": [
8093
- "https://jovian.ml/*",
8094
- "https://jovian.ml/viewer*",
8095
- "https://*.jovian.ml/*",
8096
- "https://jovian.ai/*",
8097
- "https://jovian.ai/viewer*",
8098
- "https://*.jovian.ai/*",
8099
- "https://jovian.com/*",
8100
- "https://jovian.com/viewer*",
8101
- "https://*.jovian.com/*"
8102
- ],
8103
- "url": "https://api.jovian.com/oembed.json"
8104
- },
8105
- {
8106
- "schemes": ["https://play.juntos.live/solo/*", "https://play.juntos.live/host/quiz/*"],
8107
- "url": "https://play.juntos.live/api/oembed"
8108
- },
8109
- {
8110
- "schemes": ["https://www.justspin.cc/workouts/*"],
8111
- "url": "https://www.justspin.cc/api/oembed"
8112
- },
8113
- {
8114
- "schemes": ["https://keystonepractice.co/tools/*", "https://keystonepractice.co/embed/*"],
8115
- "url": "https://keystonepractice.co/api/oembed"
8116
- },
8117
- {
8118
- "schemes": ["http://www.kickstarter.com/projects/*"],
8119
- "url": "https://www.kickstarter.com/services/oembed"
8120
- },
8121
- {
8122
- "schemes": ["https://halaman.email/form/*", "https://aplikasi.kirim.email/form/*"],
8123
- "url": "https://halaman.email/service/oembed"
8124
- },
8125
- {
8126
- "schemes": ["http://www.kitchenbowl.com/recipe/*"],
8127
- "url": "https://www.kitchenbowl.com/oembed"
8128
- },
8129
- {
8130
- "schemes": ["https://knowledgepad.co/#/knowledge/*"],
8131
- "url": "https://api.spoonacular.com/knowledge/oembed"
8132
- },
8133
- {
8134
- "schemes": ["https://kommodo.ai/recordings/*", "https://kommodo.ai/guides/*"],
8135
- "url": "https://kommodo.ai/api/oembed"
8136
- },
8137
- {
8138
- "schemes": ["https://kubit.ai/*", "https://*.kubit.ai/*"],
8139
- "url": "https://kubit.ai/services/oembed"
8140
- },
8141
- {
8142
- "schemes": ["https://kurozora.app/episodes/*", "https://kurozora.app/songs/*"],
8143
- "url": "https://kurozora.app/oembed"
8144
- },
8145
- {
8146
- "schemes": [
8147
- "https://landofassets.com/*",
8148
- "https://landofassets.com/*/assets",
8149
- "https://landofassets.com/*/assets/*",
8150
- "https://landofassets.com/*/assets/*/embed"
8151
- ],
8152
- "url": "https://api.landofassets.com/oembed"
8153
- },
8154
- {
8155
- "schemes": [
8156
- "https://www.laude.org/impact/*",
8157
- "https://laude.org/impact/*",
8158
- "https://www.laude.org/im/*",
8159
- "https://laude.org/im/*"
8160
- ],
8161
- "url": "https://laude.org/api/oembed"
8162
- },
8163
- {
8164
- "schemes": [
8165
- "https://leaguemakerapp.com/competitions/*",
8166
- "https://leaguemakerapp.com/*/competitions/*",
8167
- "https://leaguemakerapp.com/c/*",
8168
- "https://www.leaguemakerapp.com/competitions/*",
8169
- "https://www.leaguemakerapp.com/*/competitions/*",
8170
- "https://www.leaguemakerapp.com/c/*"
8171
- ],
8172
- "url": "https://leaguemakerapp.com/oembed"
8173
- },
8174
- {
8175
- "schemes": ["http://learningapps.org/*"],
8176
- "url": "https://learningapps.org/oembed.php"
8177
- },
8178
- {
8179
- "schemes": ["https://pod.univ-lille.fr/video/*"],
8180
- "url": "https://pod.univ-lille.fr/video/oembed"
8181
- },
8182
- {
8183
- "schemes": ["https://place.line.me/businesses/*"],
8184
- "url": "https://place.line.me/oembed"
8185
- },
8186
- {
8187
- "schemes": ["https://linkstackz.com/irf/*", "https://linkstackz.com/post/*"],
8188
- "url": "https://api.linkstackz.com/oembed"
8189
- },
8190
- {
8191
- "schemes": [
8192
- "https://livecodes.io/",
8193
- "https://livecodes.io/?*",
8194
- "https://*.livecodes.io/",
8195
- "https://*.livecodes.io/?*"
8196
- ],
8197
- "url": "https://livecodes.io/oembed"
8198
- },
8199
- {
8200
- "schemes": ["https://livid.com/watch/*", "https://livid.com/showcase/*"],
8201
- "url": "https://livid.com/oembed"
8202
- },
8203
- {
8204
- "schemes": ["https://loom.com/i/*", "https://loom.com/share/*"],
8205
- "url": "https://www.loom.com/v1/oembed"
8206
- },
8207
- {
8208
- "schemes": [
8209
- "https://lottiefiles.com/*",
8210
- "https://*.lottiefiles.com/*",
8211
- "https://*.lottie.host/*",
8212
- "https://lottie.host/*"
8213
- ],
8214
- "url": "https://embed.lottiefiles.com/oembed"
8215
- },
8216
- {
8217
- "schemes": ["https://app.ludus.one/*"],
8218
- "url": "https://app.ludus.one/oembed"
8219
- },
8220
- {
8221
- "schemes": ["https://*.lumiere.is/v/*"],
8222
- "url": "https://admin.lumiere.is/api/services/oembed"
8223
- },
8224
- {
8225
- "schemes": ["https://marbellawire.com/*"],
8226
- "url": "https://api.marbellawire.com/oembed"
8227
- },
8228
- {
8229
- "schemes": ["https://marimo.app/*"],
8230
- "url": "https://marimo.app/oembed"
8231
- },
8232
- {
8233
- "schemes": ["http://mathembed.com/latex?inputText=*", "http://mathembed.com/latex?inputText=*"],
8234
- "url": "https://mathembed.com/oembed"
8235
- },
8236
- {
8237
- "schemes": ["https://me.me/i/*"],
8238
- "url": "https://me.me/oembed"
8239
- },
8240
- {
8241
- "schemes": [
8242
- "https://mdstrm.com/embed/*",
8243
- "https://mdstrm.com/live-stream/*",
8244
- "https://mdstrm.com/image/*"
8245
- ],
8246
- "url": "https://mdstrm.com/oembed"
8247
- },
8248
- {
8249
- "schemes": ["https://medienarchiv.zhdk.ch/entries/*", "https://zhdk.medienarchiv.ch/entries/*"],
8250
- "url": "https://medienarchiv.zhdk.ch/oembed.{format}"
8251
- },
8252
- {
8253
- "schemes": ["https://memestack.ai/gallery/*"],
8254
- "url": "https://api.memestack.ai/v1/oembed"
8255
- },
8256
- {
8257
- "schemes": ["https://mermaid.ink/img/*", "https://mermaid.ink/svg/*"],
8258
- "url": "https://mermaid.ink/services/oembed"
8259
- },
8260
- {
8261
- "schemes": ["https://*.microsoftstream.com/video/*", "https://*.microsoftstream.com/channel/*"],
8262
- "url": "https://web.microsoftstream.com/oembed"
8263
- },
8264
- {
8265
- "schemes": [
8266
- "https://mirame360.com/embed/*",
8267
- "https://mirame360.com/embed/tour/*",
8268
- "https://mirame360.com/video/url/*",
8269
- "https://mirame360.com/tour/*",
8270
- "https://mirame360.com/user/*/media/*"
8271
- ],
8272
- "url": "https://mirame360.com/api/oembed/"
8273
- },
8274
- {
8275
- "schemes": ["https://miro.com/app/board/*"],
8276
- "url": "https://miro.com/api/v1/oembed"
8277
- },
8278
- {
8279
- "schemes": ["https://miro.com/video-player/*"],
8280
- "url": "https://miro.com/video-player/oembed"
8281
- },
8282
- {
8283
- "schemes": ["http://www.mixcloud.com/*/*/", "https://www.mixcloud.com/*/*/"],
8284
- "url": "https://www.mixcloud.com/oembed/"
8285
- },
8286
- {
8287
- "schemes": ["https://mixpanel.com/*", "https://*.mixpanel.com/*"],
8288
- "url": "https://mixpanel.com/api/app/embed/oembed/"
8289
- },
8290
- {
8291
- "schemes": ["http://www.mobypicture.com/user/*/view/*", "http://moby.to/*"],
8292
- "url": "https://api.mobypicture.com/oEmbed"
8293
- },
8294
- {
8295
- "schemes": ["https://musicboxmaniacs.com/explore/melody/*"],
8296
- "url": "https://musicboxmaniacs.com/embed/"
8297
- },
8298
- {
8299
- "schemes": ["https://mybeweeg.com/w/*"],
8300
- "url": "https://mybeweeg.com/services/oembed"
8301
- },
8302
- {
8303
- "schemes": ["https://mysqlexplain.com/explain/*", "https://embed.mysqlexplain.com/explain/*"],
8304
- "url": "https://api.mysqlexplain.com/v2/oembed.json"
8305
- },
8306
- {
8307
- "schemes": ["https://namchey.com/embeds/*"],
8308
- "url": "https://namchey.com/api/oembed"
8309
- },
8310
- {
8311
- "schemes": [
8312
- "http://*.nanoo.tv/link/*",
8313
- "http://nanoo.tv/link/*",
8314
- "http://*.nanoo.pro/link/*",
8315
- "http://nanoo.pro/link/*",
8316
- "https://*.nanoo.tv/link/*",
8317
- "https://nanoo.tv/link/*",
8318
- "https://*.nanoo.pro/link/*",
8319
- "https://nanoo.pro/link/*",
8320
- "http://media.zhdk.ch/signatur/*",
8321
- "http://new.media.zhdk.ch/signatur/*",
8322
- "https://media.zhdk.ch/signatur/*",
8323
- "https://new.media.zhdk.ch/signatur/*"
8324
- ],
8325
- "url": "https://www.nanoo.tv/services/oembed"
8326
- },
8327
- {
8328
- "schemes": ["https://www.nb.no/items/*"],
8329
- "url": "https://api.nb.no/catalog/v1/oembed"
8330
- },
8331
- {
8332
- "schemes": [
8333
- "https://naturalatlas.com/*",
8334
- "https://naturalatlas.com/*/*",
8335
- "https://naturalatlas.com/*/*/*",
8336
- "https://naturalatlas.com/*/*/*/*"
8337
- ],
8338
- "url": "https://naturalatlas.com/oembed.{format}"
8339
- },
8340
- {
8341
- "schemes": ["https://naver.me/*", "https://m.naver.com/shorts/*"],
8342
- "url": "https://m.naver.com/shorts/oEmbed"
8343
- },
8344
- {
8345
- "schemes": [
8346
- "https://ndla.no/*",
8347
- "https://ndla.no/article/*",
8348
- "https://ndla.no/audio/*",
8349
- "https://ndla.no/concept/*",
8350
- "https://ndla.no/image/*",
8351
- "https://ndla.no/video/*"
8352
- ],
8353
- "url": "https://ndla.no/oembed"
8354
- },
8355
- {
8356
- "schemes": ["https://nebula.tv/videos/*"],
8357
- "url": "https://nebula.tv/api/oembed"
8358
- },
8359
- {
8360
- "schemes": ["https://beta.nebula.tv/videos/*"],
8361
- "url": "https://beta.nebula.tv/api/oembed"
8362
- },
8363
- {
8364
- "schemes": [
8365
- "https://cloud.needle.tools/-/assets/*/file",
8366
- "https://cloud.needle.tools/view?file=*",
8367
- "https://*.needle.run/*"
8368
- ],
8369
- "url": "https://cloud.needle.tools/oembed"
8370
- },
8371
- {
8372
- "schemes": ["https://*.neetorecord.com/watch/*"],
8373
- "url": "https://api.neetorecord.com/api/v1/oembed"
8374
- },
8375
- {
8376
- "schemes": ["http://*.nfb.ca/film/*"],
8377
- "url": "https://www.nfb.ca/remote/services/oembed/"
8378
- },
8379
- {
8380
- "schemes": [
8381
- "https://northlink.cc/t/*",
8382
- "https://northlink.cc/r/*",
8383
- "https://northlink.cc/@*"
8384
- ],
8385
- "url": "https://northlink.cc/oembed"
8386
- },
8387
- {
8388
- "schemes": [
8389
- "https://nouncify.com/i/*",
8390
- "https://nouncify.com/brand/*",
8391
- "https://nouncify.com/e/*",
8392
- "https://sandbox.nouncify.com/i/*",
8393
- "https://sandbox.nouncify.com/brand/*",
8394
- "https://sandbox.nouncify.com/e/*"
8395
- ],
8396
- "url": "https://nouncify.com/api/oembed"
8397
- },
8398
- {
8399
- "schemes": [
8400
- "https://observablehq.com/@*/*",
8401
- "https://observablehq.com/d/*",
8402
- "https://observablehq.com/embed/*"
8403
- ],
8404
- "url": "https://api.observablehq.com/oembed"
8405
- },
8406
- {
8407
- "schemes": ["https://www.odds.com.au/*", "https://odds.com.au/*"],
8408
- "url": "https://www.odds.com.au/api/oembed/"
8409
- },
8410
- {
8411
- "schemes": [
8412
- "https://song.link/*",
8413
- "https://album.link/*",
8414
- "https://artist.link/*",
8415
- "https://playlist.link/*",
8416
- "https://pods.link/*",
8417
- "https://mylink.page/*",
8418
- "https://odesli.co/*"
8419
- ],
8420
- "url": "https://song.link/oembed"
8421
- },
8422
- {
8423
- "schemes": ["https://odysee.com/*/*", "https://odysee.com/*"],
8424
- "url": "https://odysee.com/$/oembed"
8425
- },
8426
- {
8427
- "schemes": ["http://official.fm/tracks/*", "http://official.fm/playlists/*"],
8428
- "url": "https://official.fm/services/oembed.{format}"
8429
- },
8430
- {
8431
- "schemes": ["https://omniscope.me/*"],
8432
- "url": "https://omniscope.me/_global_/oembed/json"
8433
- },
8434
- {
8435
- "schemes": ["https://omny.fm/shows/*"],
8436
- "url": "https://omny.fm/oembed"
8437
- },
8438
- {
8439
- "schemes": [
8440
- "https://orbitvu.co/001/*/ov3601/view",
8441
- "https://orbitvu.co/001/*/ov3601/*/view",
8442
- "https://orbitvu.co/001/*/ov3602/*/view",
8443
- "https://orbitvu.co/001/*/2/orbittour/*/view",
8444
- "https://orbitvu.co/001/*/1/2/orbittour/*/view",
8445
- "http://orbitvu.co/001/*/ov3601/view",
8446
- "http://orbitvu.co/001/*/ov3601/*/view",
8447
- "http://orbitvu.co/001/*/ov3602/*/view",
8448
- "http://orbitvu.co/001/*/2/orbittour/*/view",
8449
- "http://orbitvu.co/001/*/1/2/orbittour/*/view"
8450
- ],
8451
- "url": "https://orbitvu.co/service/oembed"
8452
- },
8453
- {
8454
- "schemes": ["https://origits.com/v/*"],
8455
- "url": "https://origits.net/oembed"
8456
- },
8457
- {
8458
- "schemes": ["https://origits.com/v/*"],
8459
- "url": "https://origits.com/oembed"
8460
- },
8461
- {
8462
- "schemes": ["https://embed.orizn.app/frame/*", "https://embed.orizn.app/widgets/*"],
8463
- "url": "https://embed.orizn.app/api/oembed"
8464
- },
8465
- {
8466
- "schemes": ["https://outplayed.tv/media/*"],
8467
- "url": "https://outplayed.tv/oembed"
8468
- },
8469
- {
8470
- "schemes": ["https://overflow.io/s/*", "https://overflow.io/embed/*"],
8471
- "url": "https://overflow.io/services/oembed"
8472
- },
8473
- {
8474
- "schemes": ["https://padlet.com/*"],
8475
- "url": "https://padlet.com/oembed/"
8476
- },
8477
- {
8478
- "schemes": [
8479
- "https://*.tv.pandavideo.com.br/embed/?v=*",
8480
- "https://*.tv.pandavideo.com.br/*/playlist.m3u8",
8481
- "https://dashboard.pandavideo.com.br/#/videos/*"
8482
- ],
8483
- "url": "https://api-v2.pandavideo.com.br/oembed"
8484
- },
8485
- {
8486
- "schemes": ["https://app.parler.com/post/*", "https://app.parler.com/b/*"],
8487
- "url": "https://app.parler.com/oembed"
8488
- },
8489
- {
8490
- "schemes": ["https://app.parta.io/core/embed/*", "https://*.parta.io/core/embed/*"],
8491
- "url": "https://app.parta.io/core/oembed"
8492
- },
8493
- {
8494
- "schemes": [
8495
- "http://pastery.net/*",
8496
- "https://pastery.net/*",
8497
- "http://www.pastery.net/*",
8498
- "https://www.pastery.net/*"
8499
- ],
8500
- "url": "https://www.pastery.net/oembed"
8501
- },
8502
- {
8503
- "schemes": ["https://peertube.tv/w/*"],
8504
- "url": "https://peertube.tv/services/oembed"
8505
- },
8506
- {
8507
- "schemes": ["https://picjury.app/p/*"],
8508
- "url": "https://picjury.app/oembed"
8509
- },
8510
- {
8511
- "schemes": ["https://tools.pinpoll.com/embed/*"],
8512
- "url": "https://tools.pinpoll.com/oembed"
8513
- },
8514
- {
8515
- "schemes": ["https://www.pinterest.com/*"],
8516
- "url": "https://www.pinterest.com/oembed.json"
8517
- },
8518
- {
8519
- "schemes": ["https://player.pitchhub.com/en/public/player/*"],
8520
- "url": "https://player.pitchhub.com/en/public/oembed"
8521
- },
8522
- {
8523
- "schemes": ["https://store.pixdor.com/place-marker-widget/*/show", "https://store.pixdor.com/map/*/show"],
8524
- "url": "https://store.pixdor.com/oembed"
8525
- },
8526
- {
8527
- "schemes": ["https://plinth.it/model-viewer/*/*"],
8528
- "url": "https://plinth.it/model-viewer/oembed"
8529
- },
8530
- {
8531
- "schemes": [
8532
- "https://app.plusdocs.com/*/snapshots/*",
8533
- "https://app.plusdocs.com/*/pages/edit/*",
8534
- "https://app.plusdocs.com/*/pages/share/*"
8535
- ],
8536
- "url": "https://app.plusdocs.com/oembed"
8537
- },
8538
- {
8539
- "schemes": ["https://*.podbean.com/e/*", "http://*.podbean.com/e/*"],
8540
- "url": "https://api.podbean.com/v1/oembed"
8541
- },
8542
- {
8543
- "schemes": ["https://podcast.pizza/shows/*", "https://www.podcast.pizza/shows/*"],
8544
- "url": "https://podcast.pizza/oembed"
8545
- },
8546
- {
8547
- "schemes": [
8548
- "http://*.polldaddy.com/s/*",
8549
- "http://*.polldaddy.com/poll/*",
8550
- "http://*.polldaddy.com/ratings/*"
8551
- ],
8552
- "url": "https://polldaddy.com/oembed/"
8553
- },
8554
- {
8555
- "schemes": ["https://portfolium.com/entry/*"],
8556
- "url": "https://api.portfolium.com/oembed"
8557
- },
8558
- {
8559
- "schemes": ["https://prezi.com/v/*", "https://*.prezi.com/v/*"],
8560
- "url": "https://prezi.com/v/oembed"
8561
- },
8562
- {
8563
- "schemes": ["https://puzzel.org/*/*/play?p=*", "https://puzzel.org/*/*/embed?p=*"],
8564
- "url": "https://puzzel.org/api/oembed"
8565
- },
8566
- {
8567
- "schemes": [
8568
- "https://www.pyzia.app/dashboard?*",
8569
- "https://pyzia.app/dashboard?*",
8570
- "https://www.pyzia.app/embed/chart?*",
8571
- "https://pyzia.app/embed/chart?*"
8572
- ],
8573
- "url": "https://www.pyzia.app/api/oembed"
8574
- },
8575
- {
8576
- "schemes": ["https://qtpi.gg/fashion/*"],
8577
- "url": "https://qtpi.gg/fashion/oembed"
8578
- },
8579
- {
8580
- "schemes": ["https://quartr.com/*", "https://web.quartr.com/*"],
8581
- "url": "https://web.quartr.com/api/oembed"
8582
- },
8583
- {
8584
- "schemes": ["http://quellensuche.de/*"],
8585
- "url": "https://quellensuche.de/api/oembed"
8586
- },
8587
- {
8588
- "schemes": ["http://www.quiz.biz/quizz-*.html"],
8589
- "url": "https://www.quiz.biz/api/oembed"
8590
- },
8591
- {
8592
- "schemes": ["http://www.quizz.biz/quizz-*.html"],
8593
- "url": "https://www.quizz.biz/api/oembed"
8594
- },
8595
- {
8596
- "schemes": [
8597
- "https://www.rcvis.com/v/*",
8598
- "https://www.rcvis.com/visualize=*",
8599
- "https://www.rcvis.com/ve/*",
8600
- "https://www.rcvis.com/visualizeEmbedded=*"
8601
- ],
8602
- "url": "https://animatron.com/oembed"
8603
- },
8604
- {
8605
- "schemes": ["https://reddit.com/r/*/comments/*/*", "https://www.reddit.com/r/*/comments/*/*"],
8606
- "url": "https://www.reddit.com/oembed"
8607
- },
8608
- {
8609
- "schemes": ["https://redlof-medien.de/*", "https://www.redlof-medien.de/*"],
8610
- "url": "https://redlof-medien.de/wp-json/oembed/1.0/embed"
8611
- },
8612
- {
8613
- "schemes": ["https://show.wexcreator.com/*", "https://showroom.redlof-medien.de/*"],
8614
- "url": "https://api.wexcreator.com/oembed/"
8615
- },
8616
- {
8617
- "schemes": ["http://rwire.com/*"],
8618
- "url": "https://publisher.releasewire.com/oembed/"
8619
- },
8620
- {
8621
- "schemes": ["https://repl.it/@*/*", "https://replit.com/@*/*"],
8622
- "url": "https://replit.com/data/oembed"
8623
- },
8624
- {
8625
- "schemes": ["https://www.reverbnation.com/*", "https://www.reverbnation.com/*/songs/*"],
8626
- "url": "https://www.reverbnation.com/oembed"
8627
- },
8628
- {
8629
- "schemes": ["https://risky.biz/*"],
8630
- "url": "https://risky.biz/oembed"
8631
- },
8632
- {
8633
- "schemes": ["http://roomshare.jp/post/*", "http://roomshare.jp/en/post/*"],
8634
- "url": "https://roomshare.jp/en/oembed.{format}"
8635
- },
8636
- {
8637
- "schemes": ["https://roosterteeth.com/*"],
8638
- "url": "https://roosterteeth.com/oembed"
8639
- },
8640
- {
8641
- "schemes": ["https://rumble.com/*", "https://rumble.com/shorts/*"],
8642
- "url": "https://rumble.com/api/Media/oembed.{format}"
8643
- },
8644
- {
8645
- "schemes": [
8646
- "https://www.rushes.cc/video/*",
8647
- "https://www.rushes.cc/embed/*",
8648
- "https://rushes.cc/video/*",
8649
- "https://rushes.cc/embed/*"
8650
- ],
8651
- "url": "https://api.rushes.cc/oembed"
8652
- },
8653
- {
8654
- "schemes": ["https://app2.sagenverse.com/embed/*"],
8655
- "url": "https://app2.sagenverse.com/oembed"
8656
- },
8657
- {
8658
- "schemes": ["https://octopus.saooti.com/main/pub/podcast/*"],
8659
- "url": "https://octopus.saooti.com/oembed"
8660
- },
8661
- {
8662
- "schemes": ["http://videos.sapo.pt/*"],
8663
- "url": "https://videos.sapo.pt/oembed"
8664
- },
8665
- {
8666
- "schemes": ["https://www.satcat.com/sats/*"],
8667
- "url": "https://www.satcat.com/api/sats/oembed"
8668
- },
8669
- {
8670
- "schemes": ["https://api.satoplayer.com/players/embed/*"],
8671
- "url": "https://api.satoplayer.com/players/oembed"
8672
- },
8673
- {
8674
- "schemes": ["https://sbedit.net/*"],
8675
- "url": "https://sbedit.net/oembed/"
8676
- },
8677
- {
8678
- "schemes": [
8679
- "https://app.scibly.com/public/courses/*",
8680
- "https://app.scibly.com/embed/courses/*",
8681
- "https://app.scibly.com/en/public/courses/*",
8682
- "https://app.scibly.com/en/embed/courses/*",
8683
- "https://app.scibly.com/de/public/courses/*",
8684
- "https://app.scibly.com/de/embed/courses/*"
8685
- ],
8686
- "url": "https://app.scibly.com/api/oembed"
8687
- },
8688
- {
8689
- "schemes": ["https://console.screen9.com/*", "https://*.screen9.tv/*"],
8690
- "url": "https://api.screen9.com/oembed"
8691
- },
8692
- {
8693
- "schemes": ["http://www.screencast.com/*"],
8694
- "url": "https://api.screencast.com/external/oembed"
8695
- },
8696
- {
8697
- "schemes": ["http://www.screenr.com/*/"],
8698
- "url": "https://www.screenr.com/api/oembed.{format}"
8699
- },
8700
- {
8701
- "schemes": [
8702
- "http://www.scribblemaps.com/maps/view/*",
8703
- "https://www.scribblemaps.com/maps/view/*",
8704
- "http://scribblemaps.com/maps/view/*",
8705
- "https://scribblemaps.com/maps/view/*"
8706
- ],
8707
- "url": "https://scribblemaps.com/api/services/oembed.{format}"
8708
- },
8709
- {
8710
- "schemes": ["http://www.scribd.com/doc/*"],
8711
- "url": "https://www.scribd.com/services/oembed/"
8712
- },
8713
- {
8714
- "schemes": ["https://embed.sendtonews.com/oembed/*"],
8715
- "url": "https://embed.sendtonews.com/services/oembed"
8716
- },
8717
- {
8718
- "schemes": ["https://shared-file-kappa.vercel.app/file/*"],
8719
- "url": "https://shared-file-kappa.vercel.app/file/api/oembed"
8720
- },
8721
- {
8722
- "schemes": ["http://shoudio.com/*", "http://shoud.io/*"],
8723
- "url": "https://shoudio.com/api/oembed"
8724
- },
8725
- {
8726
- "schemes": ["https://app.getshow.io/iframe/*", "https://*.getshow.io/share/*"],
8727
- "url": "https://api.getshow.io/oembed.{format}"
8728
- },
8729
- {
8730
- "schemes": ["https://showtheway.io/to/*"],
8731
- "url": "https://showtheway.io/oembed"
8732
- },
8733
- {
8734
- "schemes": ["https://simplecast.com/s/*"],
8735
- "url": "https://simplecast.com/oembed"
8736
- },
8737
- {
8738
- "schemes": ["https://onsizzle.com/i/*"],
8739
- "url": "https://onsizzle.com/oembed"
8740
- },
8741
- {
8742
- "schemes": ["https://www.sketch.com/s/*", "https://www.sketch.com/preview/*"],
8743
- "url": "https://graphql.sketch.cloud/embed/oembed"
8744
- },
8745
- {
8746
- "schemes": [
8747
- "http://sketchfab.com/*models/*",
8748
- "https://sketchfab.com/*models/*",
8749
- "https://sketchfab.com/*/folders/*"
8750
- ],
8751
- "url": "https://sketchfab.com/oembed"
8752
- },
8753
- {
8754
- "schemes": ["https://skhema.com/embed/e/*", "https://skhema.com/embed/c/*"],
8755
- "url": "https://skhema.com/api/oembed"
8756
- },
8757
- {
8758
- "schemes": [
8759
- "https://www.skoletube.dk/media/*",
8760
- "https://www.skoletube.dk/video/*",
8761
- "https://www.studietube.dk/media/*",
8762
- "https://www.studietube.dk/video/*"
8763
- ],
8764
- "url": "https://www.skoletube.dk/media/lasync/oembed/"
8765
- },
8766
- {
8767
- "schemes": ["https://slidesfly.xyz/d/*"],
8768
- "url": "https://slidesfly.com/api/oembed"
8769
- },
8770
- {
8771
- "schemes": [
8772
- "https://www.slideshare.net/*/*",
8773
- "http://www.slideshare.net/*/*",
8774
- "https://fr.slideshare.net/*/*",
8775
- "http://fr.slideshare.net/*/*",
8776
- "https://de.slideshare.net/*/*",
8777
- "http://de.slideshare.net/*/*",
8778
- "https://es.slideshare.net/*/*",
8779
- "http://es.slideshare.net/*/*",
8780
- "https://pt.slideshare.net/*/*",
8781
- "http://pt.slideshare.net/*/*"
8782
- ],
8783
- "url": "https://www.slideshare.net/api/oembed/2"
8784
- },
8785
- {
8786
- "schemes": ["https://smashnotes.com/p/*"],
8787
- "url": "https://smashnotes.com/services/oembed"
8788
- },
8789
- {
8790
- "schemes": ["https://www.smrthi.com/book/*"],
8791
- "url": "https://www.smrthi.com/api/oembed"
8792
- },
8793
- {
8794
- "schemes": ["http://*.smugmug.com/*", "https://*.smugmug.com/*"],
8795
- "url": "https://api.smugmug.com/services/oembed/"
8796
- },
8797
- {
8798
- "schemes": [
8799
- "https://www.socialexplorer.com/*/explore",
8800
- "https://www.socialexplorer.com/*/view",
8801
- "https://www.socialexplorer.com/*/edit",
8802
- "https://www.socialexplorer.com/*/embed"
8803
- ],
8804
- "url": "https://www.socialexplorer.com/services/oembed/"
8805
- },
8806
- {
8807
- "schemes": [
8808
- "https://vod.sooplive.com/player/",
8809
- "https://v.afree.ca/ST/",
8810
- "https://vod.sooplive.com/ST/",
8811
- "https://vod.sooplive.com/PLAYER/STATION/",
8812
- "https://play.sooplive.com/"
8813
- ],
8814
- "url": "https://openapi.sooplive.com/oembed/embedinfo"
8815
- },
8816
- {
8817
- "schemes": [
8818
- "http://soundcloud.com/*",
8819
- "https://soundcloud.com/*",
8820
- "https://on.soundcloud.com/*",
8821
- "https://soundcloud.app.goog.gl/*"
8822
- ],
8823
- "url": "https://soundcloud.com/oembed"
8824
- },
8825
- {
8826
- "schemes": ["http://speakerdeck.com/*/*", "https://speakerdeck.com/*/*"],
8827
- "url": "https://speakerdeck.com/oembed.json"
8828
- },
8829
- {
8830
- "schemes": [
8831
- "https://open.spotify.com/*",
8832
- "spotify:*",
8833
- "https://spotify.link/*"
8834
- ],
8835
- "url": "https://open.spotify.com/oembed"
8836
- },
8837
- {
8838
- "schemes": [
8839
- "https://*.spotlightr.com/watch/*",
8840
- "https://*.spotlightr.com/publish/*",
8841
- "https://*.cdn.spotlightr.com/watch/*",
8842
- "https://*.cdn.spotlightr.com/publish/*"
8843
- ],
8844
- "url": "https://api.spotlightr.com/getOEmbed"
8845
- },
8846
- {
8847
- "schemes": ["http://*.spreaker.com/*", "https://*.spreaker.com/*"],
8848
- "url": "https://api.spreaker.com/oembed"
8849
- },
8850
- {
8851
- "schemes": ["https://sproutvideo.com/videos/*", "https://*.vids.io/videos/*"],
8852
- "url": "https://sproutvideo.com/oembed.{format}"
8853
- },
8854
- {
8855
- "schemes": [
8856
- "http://spyke.social/p/*",
8857
- "http://spyke.social/u/*",
8858
- "http://spyke.social/g/*",
8859
- "http://spyke.social/c/*",
8860
- "https://spyke.social/p/*",
8861
- "https://spyke.social/u/*",
8862
- "https://spyke.social/g/*",
8863
- "https://spyke.social/c/*",
8864
- "http://www.spyke.social/p/*",
8865
- "http://www.spyke.social/u/*",
8866
- "http://www.spyke.social/g/*",
8867
- "http://www.spyke.social/c/*",
8868
- "https://www.spyke.social/p/*",
8869
- "https://www.spyke.social/u/*",
8870
- "https://www.spyke.social/g/*",
8871
- "https://www.spyke.social/c/*"
8872
- ],
8873
- "url": "https://api.spyke.social/embed/oembed"
8874
- },
8875
- {
8876
- "schemes": ["https://purl.stanford.edu/*"],
8877
- "url": "https://purl.stanford.edu/embed.{format}"
8878
- },
8879
- {
8880
- "schemes": [
8881
- "https://stem.fm/session/*",
8882
- "https://www.stem.fm/session/*",
8883
- "https://stem.fm/s/*",
8884
- "https://www.stem.fm/s/*"
8885
- ],
8886
- "url": "https://www.stem.fm/oembed"
8887
- },
8888
- {
8889
- "schemes": ["http://streamable.com/*", "https://streamable.com/*"],
8890
- "url": "https://api.streamable.com/oembed.json"
8891
- },
8892
- {
8893
- "schemes": ["https://s3m.io/*", "https://23m.io/*"],
8894
- "url": "https://streamio.com/api/v1/oembed"
8895
- },
8896
- {
8897
- "schemes": ["https://streetartcities.com/markers/*"],
8898
- "url": "https://oembed.streetartcities.com/oembed"
8899
- },
8900
- {
8901
- "schemes": [
8902
- "https://www.sudomemo.net/watch/*",
8903
- "http://www.sudomemo.net/watch/*",
8904
- "https://archive.sudomemo.net/watch/*",
8905
- "http://archive.sudomemo.net/watch/*",
8906
- "https://flipnot.es/*",
8907
- "http://flipnot.es/*"
8908
- ],
8909
- "url": "https://www.sudomemo.net/oembed"
8910
- },
8911
- {
8912
- "schemes": ["https://supercut.ai/share/*"],
8913
- "url": "https://supercut.ai/oembed"
8914
- },
8915
- {
8916
- "schemes": ["https://www.sutori.com/story/*"],
8917
- "url": "https://www.sutori.com/api/oembed"
8918
- },
8919
- {
8920
- "schemes": ["https://sway.com/*", "https://www.sway.com/*"],
8921
- "url": "https://sway.com/api/v1.0/oembed"
8922
- },
8923
- {
8924
- "schemes": ["https://sway.office.com/*"],
8925
- "url": "https://sway.office.com/api/v1.0/oembed"
8926
- },
8927
- {
8928
- "schemes": ["https://synthcamp.net/r/*"],
8929
- "url": "https://synthcamp.net/api/oembed"
8930
- },
8931
- {
8932
- "schemes": ["https://share.synthesia.io/*"],
8933
- "url": "https://69jr5v75rc.execute-api.eu-west-1.amazonaws.com/prod/v2/oembed"
8934
- },
8935
- {
8936
- "schemes": ["https://techpostcast.com/headline-topic-programs/*"],
8937
- "url": "https://techpostcast.com/oembed/"
8938
- },
8939
- {
8940
- "schemes": [
8941
- "http://ted.com/talks/*",
8942
- "https://ted.com/talks/*",
8943
- "http://www.ted.com/talks/*",
8944
- "https://www.ted.com/talks/*",
8945
- "https://embed.ted.com/talks/*"
8946
- ],
8947
- "url": "https://www.ted.com/services/v1/oembed.{format}"
8948
- },
8949
- {
8950
- "schemes": [
8951
- "https://tegula.io/m/*",
8952
- "https://www.tegula.io/m/*",
8953
- "https://tegula.io/c/*",
8954
- "https://www.tegula.io/c/*",
8955
- "https://tegula.io/cat.html?model=*",
8956
- "https://www.tegula.io/cat.html?model=*"
8957
- ],
8958
- "url": "https://tegula.io/api/oembed/"
8959
- },
8960
- {
8961
- "schemes": ["https://www.tella.tv/video/*", "https://tella.video/*"],
8962
- "url": "https://www.tella.tv/api/oembed"
8963
- },
8964
- {
8965
- "schemes": ["https://rest-prod.tenet.textexpander.com/share/*"],
8966
- "url": "https://rest-prod.tenet.textexpander.com/oembed"
8967
- },
8968
- {
8969
- "schemes": ["https://hubspot-media-bridge.thedamconsultants.com/*"],
8970
- "url": "https://hubspot-media-bridge.thedamconsultants.com/oembed/"
8971
- },
8972
- {
8973
- "schemes": [
8974
- "https://www.nytimes.com/svc/oembed",
8975
- "https://nytimes.com/*",
8976
- "https://*.nytimes.com/*"
8977
- ],
8978
- "url": "https://www.nytimes.com/svc/oembed/json/"
8979
- },
8980
- {
8981
- "schemes": [
8982
- "https://theprototype.app/s/*",
8983
- "https://theprototype.app/e/*",
8984
- "https://theprototype.app/p/*"
8985
- ],
8986
- "url": "https://theprototype.app/oembed"
8987
- },
8988
- {
8989
- "schemes": ["https://theysaidso.com/image/*"],
8990
- "url": "https://theysaidso.com/extensions/oembed/"
8991
- },
8992
- {
8993
- "schemes": [
8994
- "http://www.tickcounter.com/widget/*",
8995
- "http://www.tickcounter.com/countdown/*",
8996
- "http://www.tickcounter.com/countup/*",
8997
- "http://www.tickcounter.com/ticker/*",
8998
- "http://www.tickcounter.com/clock/*",
8999
- "http://www.tickcounter.com/worldclock/*",
9000
- "http://www.tickcounter.com/embed/*",
9001
- "http://www.tickcounter.com/full/*",
9002
- "https://www.tickcounter.com/widget/*",
9003
- "https://www.tickcounter.com/countdown/*",
9004
- "https://www.tickcounter.com/countup/*",
9005
- "https://www.tickcounter.com/ticker/*",
9006
- "https://www.tickcounter.com/clock/*",
9007
- "https://www.tickcounter.com/worldclock/*",
9008
- "https://www.tickcounter.com/embed/*",
9009
- "https://www.tickcounter.com/full/*"
9010
- ],
9011
- "url": "https://www.tickcounter.com/oembed"
9012
- },
9013
- {
9014
- "schemes": ["https://www.tiktok.com/*", "https://www.tiktok.com/*/video/*"],
9015
- "url": "https://www.tiktok.com/oembed"
9016
- },
9017
- {
9018
- "schemes": ["https://tixfox.co/e/*", "https://tixfox.co/o/*"],
9019
- "url": "https://tixfox.co/api/oembed"
9020
- },
9021
- {
9022
- "schemes": ["https://tksn.me/*", "https://*.tksn.me/*"],
9023
- "url": "https://tksn.me/api/oembed/"
9024
- },
9025
- {
9026
- "schemes": ["https://tlexdr.com/episode/*"],
9027
- "url": "https://tlexdr.com/oembed"
9028
- },
9029
- {
9030
- "schemes": [
9031
- "https://tonicaudio.com/take/*",
9032
- "https://tonicaudio.com/song/*",
9033
- "https://tnic.io/song/*",
9034
- "https://tnic.io/take/*"
9035
- ],
9036
- "url": "https://tonicaudio.com/oembed"
9037
- },
9038
- {
9039
- "schemes": [
9040
- "https://www.toornament.com/tournaments/*/information",
9041
- "https://www.toornament.com/tournaments/*/registration/",
9042
- "https://www.toornament.com/tournaments/*/matches/schedule",
9043
- "https://www.toornament.com/tournaments/*/stages/*/"
9044
- ],
9045
- "url": "https://widget.toornament.com/oembed"
9046
- },
9047
- {
9048
- "schemes": ["http://www.topy.se/image/*"],
9049
- "url": "https://www.topy.se/oembed/"
9050
- },
9051
- {
9052
- "schemes": ["https://app-test.totango.com/*"],
9053
- "url": "https://app-test.totango.com/oembed"
9054
- },
9055
- {
9056
- "schemes": ["http://trackspace.upitup.com/*"],
9057
- "url": "https://trackspace.upitup.com/oembed"
9058
- },
9059
- {
9060
- "schemes": [
9061
- "https://trinitymedia.ai/player/*",
9062
- "https://trinitymedia.ai/player/*/*",
9063
- "https://trinitymedia.ai/player/*/*/*"
9064
- ],
9065
- "url": "https://trinitymedia.ai/services/oembed"
9066
- },
9067
- {
9068
- "schemes": ["https://trycli.com/e/*", "https://trycli.com/*/*"],
9069
- "url": "https://trycli.com/api/oembed"
9070
- },
9071
- {
9072
- "schemes": ["https://*.tumblr.com/post/*"],
9073
- "url": "https://www.tumblr.com/oembed/1.0"
9074
- },
9075
- {
9076
- "schemes": ["https://tuvelia.com/embed/*", "https://www.tuvelia.com/embed/*"],
9077
- "url": "https://tuvelia.com/oembed"
9078
- },
9079
- {
9080
- "schemes": ["https://www.tuxx.be/*"],
9081
- "url": "https://www.tuxx.be/services/oembed"
9082
- },
9083
- {
9084
- "schemes": ["https://play.tvcf.co.kr/*", "https://*.tvcf.co.kr/*"],
9085
- "url": "https://play.tvcf.co.kr/rest/oembed"
9086
- },
9087
- {
9088
- "schemes": ["https://twinmotion.unrealengine.com/presentation/*", "https://twinmotion.unrealengine.com/panorama/*"],
9089
- "url": "https://twinmotion.unrealengine.com/oembed"
9090
- },
9091
- {
9092
- "schemes": [
9093
- "https://twitter.com/*",
9094
- "https://twitter.com/*/status/*",
9095
- "https://*.twitter.com/*/status/*"
9096
- ],
9097
- "url": "https://publish.twitter.com/oembed"
9098
- },
9099
- {
9100
- "schemes": ["https://app.typecel.io/*/*", "https://app.typecel.io/embed/*/*"],
9101
- "url": "https://app.typecel.io/api/oembed"
9102
- },
9103
- {
9104
- "schemes": ["https://u-poll.com/p/*"],
9105
- "url": "https://u-poll.com/oembed"
9106
- },
9107
- {
9108
- "schemes": ["https://uapod.univ-antilles.fr/video/*"],
9109
- "url": "https://uapod.univ-antilles.fr/oembed"
9110
- },
9111
- {
9112
- "schemes": ["https://map.cam.ac.uk/*"],
9113
- "url": "https://map.cam.ac.uk/oembed/"
9114
- },
9115
- {
9116
- "schemes": ["https://mediatheque.univ-paris1.fr/video/*"],
9117
- "url": "https://mediatheque.univ-paris1.fr/oembed"
9118
- },
9119
- {
9120
- "schemes": ["https://pod.u-pec.fr/video/*"],
9121
- "url": "https://pod.u-pec.fr/oembed"
9122
- },
9123
- {
9124
- "schemes": ["http://*.ustream.tv/*", "http://*.ustream.com/*"],
9125
- "url": "https://www.ustream.tv/oembed"
9126
- },
9127
- {
9128
- "schemes": ["https://*.ustudio.com/embed/*", "https://*.ustudio.com/embed/*/*"],
9129
- "url": "https://app.ustudio.com/api/v2/oembed"
9130
- },
9131
- {
9132
- "schemes": ["https://vectree.io/c/*", "http://vectree.io/c/*"],
9133
- "url": "https://vectree.io/api/oembed"
9134
- },
9135
- {
9136
- "schemes": [
9137
- "https://versedb.com/title/*",
9138
- "https://versedb.com/series/*",
9139
- "https://versedb.com/issue/*",
9140
- "https://versedb.com/event/*",
9141
- "https://versedb.com/creator/*"
9142
- ],
9143
- "url": "https://versedb.com/oembed"
9144
- },
9145
- {
9146
- "schemes": ["http://www.vevo.com/*", "https://www.vevo.com/*"],
9147
- "url": "https://www.vevo.com/oembed"
9148
- },
9149
- {
9150
- "schemes": ["https://videfit.com/videos/*"],
9151
- "url": "https://videfit.com/oembed"
9152
- },
9153
- {
9154
- "schemes": ["https://videobot.com/embed/*"],
9155
- "url": "https://videobot.com/embed/oembed"
9156
- },
9157
- {
9158
- "schemes": ["https://vidlink.it/videos/*", "https://www.vidlink.it/videos/*"],
9159
- "url": "https://www.vidlink.it/api/oembed"
9160
- },
9161
- {
9162
- "schemes": ["https://vidmount.com/*"],
9163
- "url": "https://vidmount.com/oembed"
9164
- },
9165
- {
9166
- "schemes": [
9167
- "http://*.vidyard.com/*",
9168
- "https://*.vidyard.com/*",
9169
- "http://*.hubs.vidyard.com/*",
9170
- "https://*.hubs.vidyard.com/*"
9171
- ],
9172
- "url": "https://api.vidyard.com/dashboard/v1.1/oembed"
9173
- },
9174
- {
9175
- "schemes": [
9176
- "https://vimeo.com/*",
9177
- "https://vimeo.com/album/*/video/*",
9178
- "https://vimeo.com/channels/*/*",
9179
- "https://vimeo.com/groups/*/videos/*",
9180
- "https://vimeo.com/ondemand/*/*",
9181
- "https://player.vimeo.com/video/*",
9182
- "https://vimeo.com/event/*/*"
9183
- ],
9184
- "url": "https://vimeo.com/api/oembed.{format}"
9185
- },
9186
- {
9187
- "schemes": ["https://share.viostream.com/*"],
9188
- "url": "https://play.viostream.com/oembed"
9189
- },
9190
- {
9191
- "schemes": ["https://www.viously.com/*/*"],
9192
- "url": "https://www.viously.com/oembed"
9193
- },
9194
- {
9195
- "schemes": ["https://vizdom.dev/link/*"],
9196
- "url": "https://vizdom.dev/api/v1/oembed"
9197
- },
9198
- {
9199
- "schemes": [
9200
- "https://vizzlo.com/d/*",
9201
- "https://vizzlo.com/share/*",
9202
- "https://vizzlo.com/embed/*"
9203
- ],
9204
- "url": "https://vizzlo.com/oembed"
9205
- },
9206
- {
9207
- "schemes": [
9208
- "https://eu.vizzlo.com/d/*",
9209
- "https://eu.vizzlo.com/share/*",
9210
- "https://eu.vizzlo.com/embed/*"
9211
- ],
9212
- "url": "https://eu.vizzlo.com/oembed"
9213
- },
9214
- {
9215
- "schemes": ["https://vlipsy.com/*"],
9216
- "url": "https://vlipsy.com/oembed"
9217
- },
9218
- {
9219
- "schemes": ["https://www.vlive.tv/video/*"],
9220
- "url": "https://www.vlive.tv/oembed"
9221
- },
9222
- {
9223
- "schemes": ["https://*.vouchfor.com/*"],
9224
- "url": "https://embed.vouchfor.com/v1/oembed"
9225
- },
9226
- {
9227
- "schemes": ["https://article.voxsnap.com/*/*"],
9228
- "url": "https://data.voxsnap.com/oembed"
9229
- },
9230
- {
9231
- "schemes": ["https://watchpeoplefight.com/watch/*"],
9232
- "url": "https://watchpeoplefight.com/api/oembed"
9233
- },
9234
- {
9235
- "schemes": ["https://watch.wave.video/*", "https://embed.wave.video/*"],
9236
- "url": "https://embed.wave.video/oembed"
9237
- },
9238
- {
9239
- "schemes": [
9240
- "https://www.web3isgoinggreat.com/?id=*",
9241
- "https://www.web3isgoinggreat.com/single/*",
9242
- "https://www.web3isgoinggreat.com/embed/*"
9243
- ],
9244
- "url": "https://www.web3isgoinggreat.com/api/oembed"
9245
- },
9246
- {
9247
- "schemes": ["https://play.wecandeo.com/video/v/*"],
9248
- "url": "https://play.wecandeo.com/oembed/"
9249
- },
9250
- {
9251
- "schemes": ["https://www.wewtalk.com/voice/*", "https://wewtalk.com/voice/*"],
9252
- "url": "https://www.wewtalk.com/api/oembed"
9253
- },
9254
- {
9255
- "schemes": ["https://whimsical.com/*", "https://whimsical.com/*/*"],
9256
- "url": "https://whimsical.com/api/oembed"
9257
- },
9258
- {
9259
- "schemes": [
9260
- "https://whyp.it/tracks/*",
9261
- "https://whyp.it/collections/*",
9262
- "https://www.whyp.it/tracks/*",
9263
- "https://www.whyp.it/collections/*"
9264
- ],
9265
- "url": "https://api.whyp.it/api/oembed"
9266
- },
9267
- {
9268
- "schemes": ["https://www.wikitolica.com/*/*/"],
9269
- "url": "https://www.wikitolica.com/oembed"
9270
- },
9271
- {
9272
- "schemes": [
9273
- "https://fast.wistia.com/embed/iframe/*",
9274
- "https://fast.wistia.com/embed/playlists/*",
9275
- "https://*.wistia.com/medias/*",
9276
- "https://*.wistia.com/s/*"
9277
- ],
9278
- "url": "https://fast.wistia.com/oembed.{format}"
9279
- },
9280
- {
9281
- "schemes": ["https://*.wizer.me/learn/*", "https://*.wizer.me/preview/*"],
9282
- "url": "https://app.wizer.me/api/oembed.{format}"
9283
- },
9284
- {
9285
- "schemes": ["https://wokwi.com/share/*"],
9286
- "url": "https://wokwi.com/api/oembed"
9287
- },
9288
- {
9289
- "schemes": ["https://*.wolframcloud.com/*"],
9290
- "url": "https://www.wolframcloud.com/oembed"
9291
- },
9292
- {
9293
- "schemes": [
9294
- "https://wordpress.com/*",
9295
- "http://wordpress.com/*",
9296
- "https://*.wordpress.com/*",
9297
- "http://*.wordpress.com/*",
9298
- "https://*.*.wordpress.com/*",
9299
- "http://*.*.wordpress.com/*",
9300
- "https://wp.me/*",
9301
- "http://wp.me/*"
9302
- ],
9303
- "url": "https://public-api.wordpress.com/oembed/"
9304
- },
9305
- {
9306
- "schemes": ["https://worldeventtrading.com/predictions/*", "https://www.worldeventtrading.com/predictions/*"],
9307
- "url": "https://www.worldeventtrading.com/api/oembed"
9308
- },
9309
- {
9310
- "schemes": ["https://wppaste.com/p/*"],
9311
- "url": "https://wppaste.com/api/oembed"
9312
- },
9313
- {
9314
- "schemes": [
9315
- "https://x.com/*",
9316
- "https://x.com/*/status/*",
9317
- "https://*.x.com/*/status/*"
9318
- ],
9319
- "url": "https://publish.x.com/oembed"
9320
- },
9321
- {
9322
- "schemes": ["https://youpick.best/ranking/*"],
9323
- "url": "https://youpick.best/api/oembed"
9324
- },
9325
- {
9326
- "schemes": [
9327
- "https://*.youtube.com/watch*",
9328
- "https://*.youtube.com/v/*",
9329
- "https://youtu.be/*",
9330
- "https://*.youtube.com/playlist?list=*",
9331
- "https://youtube.com/playlist?list=*",
9332
- "https://*.youtube.com/shorts*",
9333
- "https://youtube.com/shorts*",
9334
- "https://*.youtube.com/embed/*",
9335
- "https://*.youtube.com/live*",
9336
- "https://youtube.com/live*"
9337
- ],
9338
- "url": "https://www.youtube.com/oembed"
9339
- },
9340
- {
9341
- "schemes": ["https://www.yumpu.com/*/document/view/*/*"],
9342
- "url": "https://www.yumpu.com/services/oembed"
9343
- },
9344
- {
9345
- "schemes": [
9346
- "https://app.zeplin.io/project/*/screen/*",
9347
- "https://app.zeplin.io/project/*/screen/*/version/*",
9348
- "https://app.zeplin.io/project/*/styleguide/components?coid=*",
9349
- "https://app.zeplin.io/styleguide/*/components?coid=*"
9350
- ],
9351
- "url": "https://app.zeplin.io/embed"
9352
- },
9353
- {
9354
- "schemes": ["https://app.zingsoft.com/embed/*", "https://app.zingsoft.com/view/*"],
9355
- "url": "https://app.zingsoft.com/oembed"
9356
- },
9357
- {
9358
- "schemes": ["https://*.znipe.tv/*"],
9359
- "url": "https://api.znipe.tv/v3/oembed/"
9360
- },
9361
- {
9362
- "schemes": ["https://srv2.zoomable.ca/viewer.php*"],
9363
- "url": "https://srv2.zoomable.ca/oembed"
7377
+ endpoint: "https://embed.bsky.app/oembed",
7378
+ schemes: ["https://bsky.app/profile/*/post/*"]
9364
7379
  }
9365
- ];
9366
- // src/api/objects/web-page/oembed.ts
9367
- /**
9368
- * oEmbed providers from a vendored copy of oembed.com's `providers.json`.
9369
- * `scripts/refresh-oembed-providers.mjs` refreshes the copy. Junior matches
9370
- * page URLs with `URLPattern` and uses only the plain oEmbed fields, never
9371
- * `html`.
9372
- */
9373
- let compiled;
9374
- function readProviders() {
9375
- compiled ??= oembed_providers_default.map((provider) => ({
9376
- endpoint: provider.url.replace("{format}", "json"),
9377
- patterns: provider.schemes.map((scheme) => new URLPattern(scheme))
9378
- }));
9379
- return compiled;
9380
- }
7380
+ ].map((provider) => ({
7381
+ endpoint: provider.endpoint,
7382
+ patterns: provider.schemes.map((scheme) => new URLPattern(scheme))
7383
+ }));
9381
7384
  /** Return the oEmbed request URL for a page, or nothing for other hosts. */
9382
7385
  function oembedRequestUrl(url) {
9383
- const http = new URL(url);
9384
- http.protocol = "http:";
9385
- const provider = readProviders().find((candidate) => candidate.patterns.some((pattern) => pattern.test(url.href) || pattern.test(http.href)));
7386
+ const provider = PATTERNS.find((candidate) => candidate.patterns.some((pattern) => pattern.test(url.href)));
9386
7387
  if (!provider) return void 0;
9387
7388
  const request = new URL(provider.endpoint);
9388
7389
  request.searchParams.set("url", url.href);
@@ -9395,6 +7396,7 @@ const oembedResponseSchema = z.object({
9395
7396
  author_name: optionalText,
9396
7397
  provider_name: optionalText,
9397
7398
  thumbnail_url: optionalText,
7399
+ type: optionalText,
9398
7400
  cache_age: z.coerce.number().positive().optional().catch(void 0)
9399
7401
  });
9400
7402
  /** Read an oEmbed JSON body, or nothing when it is not one. */
@@ -9443,6 +7445,7 @@ async function readOembed(url) {
9443
7445
  author: oembed.author_name,
9444
7446
  cacheAgeSeconds: oembed.cache_age,
9445
7447
  images: oembed.thumbnail_url ? [oembed.thumbnail_url] : [],
7448
+ media: oembed.type === "video" ? "video" : oembed.type === "photo" ? "image" : void 0,
9446
7449
  siteName: oembed.provider_name,
9447
7450
  title: oembed.title
9448
7451
  };
@@ -9482,6 +7485,7 @@ async function loadWebPage(url) {
9482
7485
  value: webPageObjectCard({
9483
7486
  author: page.author,
9484
7487
  description: page.description,
7488
+ media: page.media,
9485
7489
  siteName: page.siteName ?? url.hostname,
9486
7490
  thumbnailUrl: thumbnailPath(page.images, page.pageUrl),
9487
7491
  title: page.title,
@@ -9508,6 +7512,7 @@ async function resolveWebPageLink(url) {
9508
7512
  function webPageLinkType() {
9509
7513
  return {
9510
7514
  cacheCards: false,
7515
+ canView: async () => true,
9511
7516
  filters: [{ scheme: "https" }],
9512
7517
  objectType: "web_page",
9513
7518
  owner: "junior",
@@ -9523,6 +7528,7 @@ const OBJECT_LINK_SYSTEM_ACTOR = {
9523
7528
  };
9524
7529
  function coreLinkTypes() {
9525
7530
  const slack = {
7531
+ canView: async () => true,
9526
7532
  filters: [SLACK_MESSAGE_LINK_FILTER],
9527
7533
  objectType: "message",
9528
7534
  owner: "junior",
@@ -9536,6 +7542,7 @@ function coreLinkTypes() {
9536
7542
  slack,
9537
7543
  webPages,
9538
7544
  {
7545
+ canView: canViewConversationLink,
9539
7546
  filters: [conversations],
9540
7547
  objectType: "conversation",
9541
7548
  owner: "junior",
@@ -9543,6 +7550,7 @@ function coreLinkTypes() {
9543
7550
  },
9544
7551
  {
9545
7552
  cacheCards: false,
7553
+ canView: async () => true,
9546
7554
  filters: [people, { scheme: "mailto" }],
9547
7555
  objectType: "person",
9548
7556
  owner: "junior",
@@ -9550,24 +7558,40 @@ function coreLinkTypes() {
9550
7558
  }
9551
7559
  ];
9552
7560
  }
7561
+ function objectLinkContext(name, viewer) {
7562
+ return {
7563
+ cache: createPluginCache(name),
7564
+ db: getDb(),
7565
+ egress: createPluginEgress({
7566
+ credentialContext: credentialContextForActor(OBJECT_LINK_SYSTEM_ACTOR),
7567
+ pluginAuth: { async handleAuthRequired() {} }
7568
+ }),
7569
+ imagePath: (ref, version) => imagePath({
7570
+ ref,
7571
+ source: name
7572
+ }, 640, version),
7573
+ findPerson: resolvePersonByAccount,
7574
+ log: createPluginLogger(name),
7575
+ plugin: { name },
7576
+ viewer,
7577
+ viewerEgress: createPluginEgress({
7578
+ credentialContext: credentialContextForActor(webActorFromUser(viewer)),
7579
+ pluginAuth: { async handleAuthRequired() {} },
7580
+ userOAuthOnly: true
7581
+ }),
7582
+ viewerMcp: createViewerMcp(name, viewer.id)
7583
+ };
7584
+ }
9553
7585
  function pluginLinkTypes(plugin) {
9554
7586
  const name = plugin.manifest.name;
9555
7587
  return (plugin.objectLinks ?? []).map((link) => ({
7588
+ canView: (viewer, url) => link.canView(objectLinkContext(name, viewer), url),
9556
7589
  filters: link.filters,
9557
7590
  objectType: link.objectType,
9558
7591
  owner: name,
9559
7592
  readTool: link.readTool,
9560
- resolve: (viewer, url) => link.resolve({
9561
- cache: createPluginCache(name),
9562
- db: getDb(),
9563
- egress: createPluginEgress({
9564
- credentialContext: credentialContextForActor(OBJECT_LINK_SYSTEM_ACTOR),
9565
- pluginAuth: { async handleAuthRequired() {} }
9566
- }),
9567
- log: createPluginLogger(name),
9568
- plugin: { name },
9569
- viewer
9570
- }, url)
7593
+ resolve: (viewer, url) => link.resolve(objectLinkContext(name, viewer), url),
7594
+ ...link.webPageFallback ? { webPageFallback: true } : void 0
9571
7595
  }));
9572
7596
  }
9573
7597
  /**
@@ -9580,14 +7604,18 @@ function readObjectLinkTypes(plugins = getPlugins()) {
9580
7604
  return linkTypes;
9581
7605
  }
9582
7606
  async function resolveWithLinkType(linkType, viewer, url) {
7607
+ if (!await linkType.canView(viewer, url)) return linkType.webPageFallback ? await resolveWithLinkType(webPageLinkType(), viewer, url) : null;
9583
7608
  const resolved = await linkType.resolve(viewer, url);
9584
7609
  if (!resolved) return null;
9585
7610
  const object = objectAnnotationSchema.parse(resolved);
9586
7611
  if (object.objectType !== linkType.objectType) throw new Error(`Link type "${linkType.owner}/${linkType.objectType}" returned a ${object.objectType} object.`);
9587
- return ownedObjectAnnotationSchema.parse({
9588
- ...object,
9589
- plugin: linkType.owner
9590
- });
7612
+ return {
7613
+ linkType,
7614
+ object: ownedObjectAnnotationSchema.parse({
7615
+ ...object,
7616
+ plugin: linkType.owner
7617
+ })
7618
+ };
9591
7619
  }
9592
7620
  /**
9593
7621
  * Resolve one link for one viewer without the card cache, so a change of
@@ -9597,11 +7625,7 @@ async function resolveWithLinkType(linkType, viewer, url) {
9597
7625
  async function resolveObjectLinkNow(viewer, url) {
9598
7626
  const linkType = findObjectLinkType(readObjectLinkTypes(), url);
9599
7627
  if (!linkType) return void 0;
9600
- const object = await resolveWithLinkType(linkType, viewer, url);
9601
- return object ? {
9602
- linkType,
9603
- object
9604
- } : void 0;
7628
+ return await resolveWithLinkType(linkType, viewer, url) ?? void 0;
9605
7629
  }
9606
7630
  /**
9607
7631
  * Resolve links to object cards for one viewer. A link without a link type,
@@ -9616,7 +7640,7 @@ async function resolveObjectLinks(viewer, urls) {
9616
7640
  const linkType = parsed && findObjectLinkType(linkTypes, parsed);
9617
7641
  if (!parsed || !linkType) return [];
9618
7642
  const key = `${viewer.id}:${createHash("sha256").update(url).digest("hex")}`;
9619
- const resolve = () => resolveWithLinkType(linkType, viewer, parsed);
7643
+ const resolve = async () => (await resolveWithLinkType(linkType, viewer, parsed))?.object ?? null;
9620
7644
  try {
9621
7645
  const object = linkType.cacheCards === false ? await resolve() : await cache.getOrLoad(key, async () => ({
9622
7646
  value: await resolve(),
@@ -9647,6 +7671,530 @@ function readHealthReport() {
9647
7671
  function GET() {
9648
7672
  return Response.json(readHealthReport());
9649
7673
  }
7674
+ // src/chat/cache-warming/backfill.ts
7675
+ /**
7676
+ * Fill of the empty cache warming gap lists from stored Conversation
7677
+ * history, about once a month.
7678
+ *
7679
+ * `warmup.ts` learns reply gaps only from idle periods after it is deployed.
7680
+ * Until a `gapSegment` has gaps, Junior sends no warmups for it. This replays
7681
+ * the stored model calls of the last `GLOBAL_GAPS_TTL_MS` with the same rules
7682
+ * as live recording, so warming can start soon after the first deploy.
7683
+ *
7684
+ * The heartbeat runs it. Only one run claims it, and a completed run marks
7685
+ * the install as done, also when it stopped on its time budget or skipped a
7686
+ * batch that the statement timeout canceled. It fills only segment lists
7687
+ * that are empty when it starts, so it does not add history to gaps that
7688
+ * live recording already has.
7689
+ *
7690
+ * History does not tell the plugin work state or the archive state that a
7691
+ * Conversation had when an idle period started. So it fills only the
7692
+ * segments of Conversations that are not archived and have work state
7693
+ * `none`, which most Conversations have. The `open` and `done` segments and
7694
+ * the `archived:*` segments stay empty until live gaps arrive. Until then,
7695
+ * `decideWarmup` leans on their `parentGapSegment`, a `none` segment that
7696
+ * this fills. Each idle period still records its gap, so the segment fills
7697
+ * from live idle periods.
7698
+ */
7699
+ const BACKFILL_KEY = "junior:cache_warming:backfill:work_state:v2";
7700
+ const BACKFILL_CLAIM_TTL_MS = 60 * MINUTE_MS;
7701
+ const BACKFILL_DONE_TTL_MS = GLOBAL_GAPS_TTL_MS;
7702
+ const CONVERSATION_BATCH_SIZE = 10;
7703
+ const CONVERSATION_PAGE_SIZE = 500;
7704
+ const QUERY_CANCELED = "57014";
7705
+ /**
7706
+ * Scan time of one backfill run. The heartbeat gives no deadline. This leaves
7707
+ * most of its function time for the writes and the other heartbeat work.
7708
+ */
7709
+ const BACKFILL_BUDGET_MS = 6e4;
7710
+ const BACKFILL_GAPS_MAX = GLOBAL_GAPS_MAX / 2;
7711
+ const BACKFILL_SEGMENTS = new Set([true, false].flatMap((userActor) => [
7712
+ 0,
7713
+ 1,
7714
+ 2,
7715
+ 3
7716
+ ].map((endedTurns) => historySegment(userActor, endedTurns))));
7717
+ function historySegment(userActor, endedTurns) {
7718
+ return gapSegment({
7719
+ userActor,
7720
+ endedTurns,
7721
+ workState: "none",
7722
+ archived: false
7723
+ });
7724
+ }
7725
+ const inWindow = (windowStartMs) => and(gte(juniorConversations.lastActivityAt, new Date(windowStartMs)), isNull(juniorConversations.transcriptPurgedAt));
7726
+ const conversationColumns = {
7727
+ conversationId: juniorConversations.conversationId,
7728
+ kind: juniorConversations.kind,
7729
+ parentConversationId: juniorConversations.parentConversationId
7730
+ };
7731
+ async function loadConversations(windowStartMs) {
7732
+ return await getDb().select(conversationColumns).from(juniorConversations).where(inWindow(windowStartMs)).orderBy(desc(juniorConversations.lastActivityAt), juniorConversations.conversationId);
7733
+ }
7734
+ async function loadConversationPage(windowStartMs, afterConversationId) {
7735
+ return await getDb().select(conversationColumns).from(juniorConversations).where(and(inWindow(windowStartMs), afterConversationId === void 0 ? void 0 : gt(juniorConversations.conversationId, afterConversationId))).orderBy(juniorConversations.conversationId).limit(CONVERSATION_PAGE_SIZE);
7736
+ }
7737
+ /** Count the Conversations that a history scan from `windowStartMs` reads. */
7738
+ async function countHistoryConversations(windowStartMs) {
7739
+ const [row] = await getDb().select({ count: count() }).from(juniorConversations).where(inWindow(windowStartMs));
7740
+ return row?.count ?? 0;
7741
+ }
7742
+ async function loadEvents(conversationIds) {
7743
+ const events = juniorConversationEvents;
7744
+ const isUserMessage = sql`${events.type} = 'user_message'`;
7745
+ const message = sql`CASE
7746
+ WHEN ${events.type} <> 'assistant_message' THEN NULL
7747
+ WHEN ${events.schemaVersion} >= 2 THEN (${events.payload}->>'message')::jsonb
7748
+ ELSE ${events.payload}
7749
+ END`;
7750
+ return await getDb().select({
7751
+ conversationId: events.conversationId,
7752
+ type: sql`${events.type}`,
7753
+ personInstruction: sql`CASE WHEN ${isUserMessage} THEN (${events.payload}->'provenance'->'actor'->>'userId') IS NOT NULL END`,
7754
+ stopReason: sql`(${message})->>'stopReason'`,
7755
+ startedAtMs: sql`(${message})->>'timestamp'`,
7756
+ modelId: sql`(${message})->>'model'`,
7757
+ cacheRead: sql`${events.payload}->'usage'->>'cacheRead'`,
7758
+ cacheWrite: sql`${events.payload}->'usage'->>'cacheWrite'`
7759
+ }).from(events).innerJoin(juniorConversations, eq(juniorConversations.conversationId, events.conversationId)).where(and(inArray(events.conversationId, conversationIds), or(eq(events.type, "assistant_message"), and(isUserMessage, sql`(${events.payload}->'provenance'->>'authority') = 'instruction'`)), gte(events.createdAt, juniorConversations.createdAt))).orderBy(events.conversationId, events.seq);
7760
+ }
7761
+ /**
7762
+ * Replay the model calls of one Conversation the way the recorders in
7763
+ * `warmup.ts` and `tool-wait.ts` see them, and return each idle period and
7764
+ * tool wait. An idle period starts at a `stop` call and a tool wait at a
7765
+ * `toolUse` call, so no pair of calls is in both.
7766
+ *
7767
+ * Live recording measures from the start of the request that ended a Turn to
7768
+ * the start of the next recorded request. Here both times are the
7769
+ * `timestamp` of the stored assistant message, which Pi sets when it starts
7770
+ * the request. That is the closest stored time to the recorder's clock.
7771
+ */
7772
+ function replayConversation(kind, events, nowMs) {
7773
+ const periods = [];
7774
+ const toolWaits = [];
7775
+ const close = (idle, untilMs, next) => {
7776
+ const gapMs = untilMs - idle.sinceMs;
7777
+ if (gapMs <= 0) return;
7778
+ const period = {
7779
+ ...idle,
7780
+ gapMs
7781
+ };
7782
+ if (next) period.next = next;
7783
+ periods.push(period);
7784
+ };
7785
+ let userActor = false;
7786
+ let inTurn = false;
7787
+ let endedTurns = 0;
7788
+ let lastCallMs;
7789
+ let idle;
7790
+ let waiting;
7791
+ for (const event of events) {
7792
+ if (event.type === "user_message") {
7793
+ if (!inTurn) {
7794
+ userActor = event.personInstruction === true && kind !== "task";
7795
+ inTurn = true;
7796
+ }
7797
+ continue;
7798
+ }
7799
+ if (event.stopReason !== "toolUse") inTurn = false;
7800
+ const startedAtMs = event.startedAtMs === null ? NaN : Number(event.startedAtMs);
7801
+ if (!Number.isFinite(startedAtMs)) continue;
7802
+ const next = {
7803
+ modelId: event.modelId,
7804
+ cacheRead: Number(event.cacheRead ?? 0),
7805
+ cacheWrite: Number(event.cacheWrite ?? 0)
7806
+ };
7807
+ if (waiting && startedAtMs > waiting.sinceMs) toolWaits.push({
7808
+ ...waiting,
7809
+ gapMs: startedAtMs - waiting.sinceMs,
7810
+ next
7811
+ });
7812
+ waiting = event.stopReason === "toolUse" ? {
7813
+ sinceMs: startedAtMs,
7814
+ prefixTokens: next.cacheRead + next.cacheWrite
7815
+ } : void 0;
7816
+ if (event.stopReason === "error" || event.stopReason === "aborted") continue;
7817
+ const { cacheRead, cacheWrite } = next;
7818
+ if (idle) close(idle, startedAtMs, next);
7819
+ idle = void 0;
7820
+ if (lastCallMs !== void 0 && startedAtMs - lastCallMs > CONVERSATION_STATE_TTL_MS) endedTurns = 0;
7821
+ lastCallMs = startedAtMs;
7822
+ if (event.stopReason === "stop") {
7823
+ idle = {
7824
+ sinceMs: startedAtMs,
7825
+ segment: historySegment(userActor, endedTurns),
7826
+ prefixTokens: cacheRead + cacheWrite
7827
+ };
7828
+ endedTurns += 1;
7829
+ }
7830
+ }
7831
+ if (idle && nowMs - idle.sinceMs >= 33e5) close(idle, nowMs);
7832
+ return {
7833
+ periods,
7834
+ toolWaits
7835
+ };
7836
+ }
7837
+ function isQueryCanceled(error) {
7838
+ let current = error;
7839
+ for (let depth = 0; current && depth < 6; depth += 1) {
7840
+ if (typeof current !== "object") return false;
7841
+ if (current.code === QUERY_CANCELED) return true;
7842
+ current = current.cause;
7843
+ }
7844
+ return false;
7845
+ }
7846
+ async function replayConversations(conversations, args) {
7847
+ const { windowStartMs, nowMs, budgetMs } = args;
7848
+ const startedAt = performance.now();
7849
+ const periods = [];
7850
+ const toolWaits = [];
7851
+ let scanned = 0;
7852
+ let canceledBatches = 0;
7853
+ let budgetExceeded = false;
7854
+ let lastConversationId;
7855
+ for (let i = 0; i < conversations.length; i += CONVERSATION_BATCH_SIZE) {
7856
+ if (i > 0 && performance.now() - startedAt >= budgetMs) {
7857
+ budgetExceeded = true;
7858
+ break;
7859
+ }
7860
+ const batch = conversations.slice(i, i + CONVERSATION_BATCH_SIZE);
7861
+ lastConversationId = batch.at(-1).conversationId;
7862
+ let rows;
7863
+ try {
7864
+ rows = await loadEvents(batch.map((row) => row.conversationId));
7865
+ } catch (error) {
7866
+ if (!isQueryCanceled(error)) throw error;
7867
+ canceledBatches += 1;
7868
+ continue;
7869
+ }
7870
+ const events = /* @__PURE__ */ new Map();
7871
+ for (const event of rows) {
7872
+ const list = events.get(event.conversationId) ?? [];
7873
+ list.push(event);
7874
+ events.set(event.conversationId, list);
7875
+ }
7876
+ for (const conversation of batch) {
7877
+ const replayed = replayConversation(conversationKindFromRow(conversation), events.get(conversation.conversationId) ?? [], nowMs);
7878
+ const inScanWindow = (period) => period.sinceMs >= windowStartMs;
7879
+ periods.push(...replayed.periods.filter(inScanWindow));
7880
+ toolWaits.push(...replayed.toolWaits.filter(inScanWindow));
7881
+ }
7882
+ scanned += batch.length;
7883
+ }
7884
+ periods.sort((a, b) => a.sinceMs - b.sinceMs);
7885
+ return {
7886
+ periods,
7887
+ toolWaits,
7888
+ scanned,
7889
+ canceledBatches,
7890
+ budgetExceeded,
7891
+ lastConversationId
7892
+ };
7893
+ }
7894
+ /**
7895
+ * Replay the stored history of each Conversation with activity since
7896
+ * `windowStartMs`, newest first, and return its idle periods that started in
7897
+ * the window, oldest first. The scan stops before the next batch when the
7898
+ * budget is used. The budget uses the monotonic clock, not `nowMs`.
7899
+ */
7900
+ async function scanIdlePeriods(args) {
7901
+ const { lastConversationId: _, ...scan } = await replayConversations(await loadConversations(args.windowStartMs), args);
7902
+ return scan;
7903
+ }
7904
+ /**
7905
+ * Replay the next Conversations in id order after `afterConversationId`,
7906
+ * until the budget is used, as `scanIdlePeriods` does. Continue with the
7907
+ * returned `lastConversationId` until the slice is `complete`.
7908
+ */
7909
+ async function scanIdlePeriodSlice(args) {
7910
+ const page = await loadConversationPage(args.windowStartMs, args.afterConversationId);
7911
+ const scan = await replayConversations(page, args);
7912
+ return {
7913
+ ...scan,
7914
+ complete: !scan.budgetExceeded && page.length < CONVERSATION_PAGE_SIZE
7915
+ };
7916
+ }
7917
+ function gapsBySegment(periods) {
7918
+ const bySegment = /* @__PURE__ */ new Map();
7919
+ for (const period of periods) {
7920
+ if (period.prefixTokens < 5e4) continue;
7921
+ const list = bySegment.get(period.segment) ?? [];
7922
+ list.push(period.gapMs >= 33e5 ? NO_REPLY_GAP_MS : period.gapMs);
7923
+ bySegment.set(period.segment, list);
7924
+ }
7925
+ return bySegment;
7926
+ }
7927
+ /**
7928
+ * Fill each empty cache warming gap list from the stored Conversation
7929
+ * history. The heartbeat calls it each minute. After a run completes, a call
7930
+ * makes one state request and returns, until the completed run expires.
7931
+ *
7932
+ * A run that uses its scan budget writes the gaps that it has and also
7933
+ * completes. Some gaps are better than none, and a run that cannot finish
7934
+ * would otherwise try again each hour.
7935
+ */
7936
+ async function backfillCacheWarmingGaps(args) {
7937
+ if (!getChatConfig().cacheWarmingEnabled) return;
7938
+ const state = getStateAdapter();
7939
+ await state.connect();
7940
+ if (!await state.setIfNotExists(BACKFILL_KEY, "running", BACKFILL_CLAIM_TTL_MS)) return;
7941
+ await withSpan("cache_warming.backfill", "cache_warming.backfill", {}, async (setSpanAttributes) => {
7942
+ const emptySegments = /* @__PURE__ */ new Set();
7943
+ for (const segment of BACKFILL_SEGMENTS) if ((await state.getList(segmentGapsKey(segment))).length === 0) emptySegments.add(segment);
7944
+ const { periods, scanned, canceledBatches, budgetExceeded } = await scanIdlePeriods({
7945
+ windowStartMs: args.nowMs - GLOBAL_GAPS_TTL_MS,
7946
+ nowMs: args.nowMs,
7947
+ budgetMs: args.budgetMs ?? 6e4
7948
+ });
7949
+ const bySegment = gapsBySegment(periods);
7950
+ const logAttributes = {
7951
+ "app.cache_warming.backfill.conversation_count": scanned,
7952
+ "app.cache_warming.backfill.canceled_batch_count": canceledBatches,
7953
+ "app.cache_warming.backfill.budget_exceeded": budgetExceeded
7954
+ };
7955
+ if (scanned === 0 && canceledBatches > 0) {
7956
+ logInfo("cache_warming.backfill.not_completed", logAttributes);
7957
+ setSpanAttributes({
7958
+ ...logAttributes,
7959
+ "app.cache_warming.backfill.outcome": "not_completed"
7960
+ });
7961
+ return;
7962
+ }
7963
+ let gapCount = 0;
7964
+ let segmentCount = 0;
7965
+ for (const [segment, gaps] of bySegment) {
7966
+ if (!emptySegments.has(segment)) continue;
7967
+ const key = segmentGapsKey(segment);
7968
+ const newest = gaps.slice(-BACKFILL_GAPS_MAX);
7969
+ for (const gapMs of newest) await state.appendToList(key, gapMs, {
7970
+ maxLength: GLOBAL_GAPS_MAX,
7971
+ ttlMs: GLOBAL_GAPS_TTL_MS
7972
+ });
7973
+ gapCount += newest.length;
7974
+ segmentCount += 1;
7975
+ }
7976
+ await state.set(BACKFILL_KEY, "done", BACKFILL_DONE_TTL_MS);
7977
+ const completed = {
7978
+ ...logAttributes,
7979
+ "app.cache_warming.backfill.gap_count": gapCount,
7980
+ "app.cache_warming.backfill.segment_count": segmentCount
7981
+ };
7982
+ logInfo("cache_warming.backfill.completed", completed);
7983
+ setSpanAttributes({
7984
+ ...completed,
7985
+ "app.cache_warming.backfill.outcome": "completed"
7986
+ });
7987
+ });
7988
+ }
7989
+ // src/chat/cache-warming/savings-refill.ts
7990
+ /**
7991
+ * Re-fill of the cache warming savings counters from stored Conversation
7992
+ * history. A Junior admin starts it from the System page.
7993
+ *
7994
+ * Live recording (`savings.ts`) counts only idle periods and tool waits that
7995
+ * end after it is deployed. A re-fill replays the stored model calls of the
7996
+ * last `REFILL_DAYS` with the same rules into the days before the first day
7997
+ * with live counters. It replaces those days, so a second re-fill does not
7998
+ * add to the first. It never writes a live day: live days have data that
7999
+ * history does not, the real warmup cost and the warm state split.
8000
+ *
8001
+ * The start request only stores a pending job. The heartbeat runs one slice
8002
+ * of the scan each minute, with a time budget. Each slice keeps its sums and
8003
+ * the scan position in the job with one state write, so a retried slice does
8004
+ * not count twice. The last slice replaces the days in one transaction. A
8005
+ * job whose lease expires, because its slices stopped or kept failing, is
8006
+ * failed, and an admin can start a new one.
8007
+ */
8008
+ const JOB_KEY = "junior:cache_warming:savings_refill:v1";
8009
+ const SLICE_LOCK_KEY = "junior:cache_warming:savings_refill:v1:slice";
8010
+ const SLICE_LOCK_TTL_MS = 5 * MINUTE_MS;
8011
+ const START_LOCK_KEY = "junior:cache_warming:savings_refill:v1:start";
8012
+ const START_LOCK_TTL_MS = MINUTE_MS;
8013
+ const LEASE_MS = 10 * MINUTE_MS;
8014
+ const MAX_JOB_AGE_MS = 360 * MINUTE_MS;
8015
+ const JOB_TTL_MS = 129600 * MINUTE_MS;
8016
+ const REFILL_DAYS = 90;
8017
+ const DAY_MS = 1440 * MINUTE_MS;
8018
+ const SLICE_BUDGET_MS = BACKFILL_BUDGET_MS / 2;
8019
+ const STOPPED_ERROR = "The re-fill stopped before it finished.";
8020
+ const CANCELED_ERROR = "The history queries timed out.";
8021
+ const refillJobSchema = z.object({
8022
+ id: z.string(),
8023
+ status: z.enum([
8024
+ "pending",
8025
+ "running",
8026
+ "done",
8027
+ "failed"
8028
+ ]),
8029
+ startedAtMs: z.number(),
8030
+ finishedAtMs: z.number().optional(),
8031
+ error: z.string().optional(),
8032
+ leaseExpiresAtMs: z.number(),
8033
+ windowStartMs: z.number(),
8034
+ /** First day with live counters. The job writes only days before it. */
8035
+ liveStartDate: z.string(),
8036
+ afterConversationId: z.string().optional(),
8037
+ scannedConversations: z.number(),
8038
+ totalConversations: z.number(),
8039
+ /** Sums of the slices so far, per day and model. */
8040
+ sums: z.record(z.string(), z.record(z.string(), z.record(z.string(), z.number())))
8041
+ }).strict();
8042
+ const utcDate = (ms) => new Date(ms).toISOString().slice(0, 10);
8043
+ const isoTime = (ms) => ms === void 0 ? void 0 : new Date(ms).toISOString();
8044
+ const isActive = (job) => job.status === "pending" || job.status === "running";
8045
+ const isStopped = (job, nowMs) => isActive(job) && (job.leaseExpiresAtMs <= nowMs || nowMs - job.startedAtMs > MAX_JOB_AGE_MS);
8046
+ async function readJob() {
8047
+ const stored = await (await connectedState()).get(JOB_KEY);
8048
+ return stored === null ? void 0 : refillJobSchema.parse(stored);
8049
+ }
8050
+ function toStatus(job, nowMs) {
8051
+ if (!job) return { status: "idle" };
8052
+ const stopped = isStopped(job, nowMs);
8053
+ return {
8054
+ status: stopped ? "failed" : job.status,
8055
+ startedAt: isoTime(job.startedAtMs),
8056
+ finishedAt: isoTime(job.finishedAtMs),
8057
+ error: stopped ? job.error ?? STOPPED_ERROR : job.error,
8058
+ scannedConversations: job.scannedConversations,
8059
+ totalConversations: job.totalConversations
8060
+ };
8061
+ }
8062
+ /** Read the state of the last savings re-fill. */
8063
+ async function readSavingsRefill(nowMs = Date.now()) {
8064
+ return toStatus(await readJob(), nowMs);
8065
+ }
8066
+ /**
8067
+ * Start a savings re-fill. Return `started: false` and the current state
8068
+ * when a job is still pending or running.
8069
+ */
8070
+ async function startSavingsRefill(nowMs = Date.now()) {
8071
+ const state = await connectedState();
8072
+ if (!await state.setIfNotExists(START_LOCK_KEY, true, START_LOCK_TTL_MS)) return {
8073
+ started: false,
8074
+ refill: await readSavingsRefill(nowMs)
8075
+ };
8076
+ try {
8077
+ const current = await readJob();
8078
+ if (current && isActive(current) && !isStopped(current, nowMs)) return {
8079
+ started: false,
8080
+ refill: toStatus(current, nowMs)
8081
+ };
8082
+ const windowStartMs = Date.parse(utcDate(nowMs - REFILL_DAYS * DAY_MS));
8083
+ const job = {
8084
+ id: randomUUID(),
8085
+ status: "pending",
8086
+ startedAtMs: nowMs,
8087
+ leaseExpiresAtMs: nowMs + LEASE_MS,
8088
+ windowStartMs,
8089
+ liveStartDate: await firstLiveSavingsDate() ?? utcDate(nowMs),
8090
+ scannedConversations: 0,
8091
+ totalConversations: await countHistoryConversations(windowStartMs),
8092
+ sums: {}
8093
+ };
8094
+ await state.set(JOB_KEY, job, JOB_TTL_MS);
8095
+ logInfo("cache_warming.savings_refill.started", { "app.cache_warming.backfill.conversation_count": job.totalConversations });
8096
+ return {
8097
+ started: true,
8098
+ refill: toStatus(job, nowMs)
8099
+ };
8100
+ } finally {
8101
+ await state.delete(START_LOCK_KEY);
8102
+ }
8103
+ }
8104
+ function addPeriod(job, period) {
8105
+ const modelId = period.next.modelId;
8106
+ if (!modelId) return;
8107
+ const ttlMs = providerCacheTtlMs(modelId);
8108
+ if (ttlMs === void 0) return;
8109
+ let cost;
8110
+ try {
8111
+ cost = resolveGatewayModel(modelId).cost;
8112
+ } catch {
8113
+ return;
8114
+ }
8115
+ const savings = idlePeriodSavings({
8116
+ cacheTtlMs: ttlMs,
8117
+ gapMs: period.gapMs,
8118
+ prefixTokens: period.prefixTokens,
8119
+ cacheRead: period.next.cacheRead,
8120
+ cacheWrite: period.next.cacheWrite,
8121
+ cacheReadPrice: cost.cacheRead,
8122
+ cacheWritePrice: cost.cacheWrite
8123
+ });
8124
+ if (savings) addHistoryPeriod(job.sums, period.sinceMs + period.gapMs, modelId, savings);
8125
+ }
8126
+ /**
8127
+ * Run the next slice of a pending or running savings re-fill. The heartbeat
8128
+ * calls it each minute. With no job to run, it makes one state request.
8129
+ */
8130
+ async function runSavingsRefillSlice(args) {
8131
+ const { nowMs } = args;
8132
+ const job = await readJob();
8133
+ if (!job || !isActive(job)) return;
8134
+ const state = await connectedState();
8135
+ if (isStopped(job, nowMs)) return;
8136
+ if (!await state.setIfNotExists(SLICE_LOCK_KEY, job.id, SLICE_LOCK_TTL_MS)) return;
8137
+ try {
8138
+ await withSpan("cache_warming.savings_refill.slice", "cache_warming.backfill", {}, async (setSpanAttributes) => {
8139
+ const range = {
8140
+ start: utcDate(job.windowStartMs),
8141
+ end: job.liveStartDate
8142
+ };
8143
+ const scan = range.start < range.end ? await scanIdlePeriodSlice({
8144
+ windowStartMs: job.windowStartMs,
8145
+ nowMs,
8146
+ budgetMs: args.budgetMs ?? SLICE_BUDGET_MS,
8147
+ afterConversationId: job.afterConversationId
8148
+ }) : void 0;
8149
+ for (const period of scan?.periods ?? []) if (period.next) addPeriod(job, {
8150
+ ...period,
8151
+ next: period.next
8152
+ });
8153
+ for (const toolWait of scan?.toolWaits ?? []) addPeriod(job, toolWait);
8154
+ if ((await readJob())?.id !== job.id) return;
8155
+ const next = {
8156
+ ...job,
8157
+ status: "running",
8158
+ leaseExpiresAtMs: nowMs + LEASE_MS,
8159
+ afterConversationId: scan?.lastConversationId ?? job.afterConversationId,
8160
+ scannedConversations: job.scannedConversations + (scan?.scanned ?? 0)
8161
+ };
8162
+ delete next.error;
8163
+ const complete = scan?.complete ?? true;
8164
+ if (scan && complete && next.scannedConversations === 0 && job.totalConversations > 0) Object.assign(next, {
8165
+ status: "failed",
8166
+ finishedAtMs: nowMs,
8167
+ error: CANCELED_ERROR,
8168
+ sums: {}
8169
+ });
8170
+ else if (complete) {
8171
+ await replaceHistorySavings(job.sums, range);
8172
+ Object.assign(next, {
8173
+ status: "done",
8174
+ finishedAtMs: nowMs,
8175
+ sums: {}
8176
+ });
8177
+ }
8178
+ await state.set(JOB_KEY, next, JOB_TTL_MS);
8179
+ const attributes = {
8180
+ "app.cache_warming.backfill.conversation_count": scan?.scanned ?? 0,
8181
+ "app.cache_warming.backfill.canceled_batch_count": scan?.canceledBatches ?? 0,
8182
+ "app.cache_warming.backfill.outcome": complete ? "completed" : "continued"
8183
+ };
8184
+ setSpanAttributes(attributes);
8185
+ if (complete) logInfo("cache_warming.savings_refill.completed", attributes);
8186
+ });
8187
+ } catch (error) {
8188
+ const current = await readJob();
8189
+ if (current?.id === job.id) await state.set(JOB_KEY, {
8190
+ ...current,
8191
+ error: error instanceof Error ? error.message : String(error)
8192
+ }, JOB_TTL_MS);
8193
+ throw error;
8194
+ } finally {
8195
+ await state.delete(SLICE_LOCK_KEY);
8196
+ }
8197
+ }
9650
8198
  // src/chat/conversations/sql/authorization-wait.ts
9651
8199
  /**
9652
8200
  * How long a person can finish an authorization. The MCP auth session and the
@@ -11286,6 +9834,51 @@ async function readConversationAgentTree(conversation, readAccess) {
11286
9834
  };
11287
9835
  }));
11288
9836
  }
9837
+ // src/api/conversations/display-markdown.ts
9838
+ function format(text, provider) {
9839
+ return applyPluginFormatMarkdown(text, {
9840
+ platform: "web",
9841
+ ...provider ? { provider } : void 0
9842
+ });
9843
+ }
9844
+ /**
9845
+ * Apply plugin Markdown rewrites to transcript text for the dashboard, such
9846
+ * as GitHub reference and `@login` links that show as object cards. A reply
9847
+ * posted to a provider, and the summary of an Event from one, is that
9848
+ * provider's text. In a chat reply, a bare `@U123` is a Slack user, as in
9849
+ * Slack, and not an account of a plugin's provider. Raw Event text and user
9850
+ * text show as written.
9851
+ */
9852
+ function formatConversationEventText(event) {
9853
+ const { data } = event;
9854
+ if (data.type === "reply_posted") return {
9855
+ ...event,
9856
+ data: {
9857
+ ...data,
9858
+ text: format(data.text, data.plugin)
9859
+ }
9860
+ };
9861
+ if (data.type !== "message" || data.redacted) return event;
9862
+ const provider = data.eventNamespace;
9863
+ if (provider) return {
9864
+ ...event,
9865
+ data: {
9866
+ ...data,
9867
+ ...data.trustedSummary ? { trustedSummary: format(data.trustedSummary, provider) } : void 0,
9868
+ ...data.events ? { events: data.events.map((item) => item.trustedSummary ? {
9869
+ ...item,
9870
+ trustedSummary: format(item.trustedSummary, provider)
9871
+ } : item) } : void 0
9872
+ }
9873
+ };
9874
+ return data.role === "assistant" && data.text !== void 0 ? {
9875
+ ...event,
9876
+ data: {
9877
+ ...data,
9878
+ text: format(wrapBareSlackUserIds(data.text))
9879
+ }
9880
+ } : event;
9881
+ }
11289
9882
  // src/api/conversations/mentions.ts
11290
9883
  /** Text in one event that the dashboard renders with mentions. */
11291
9884
  function eventMentionTexts(data) {
@@ -11499,7 +10092,7 @@ async function conversationEventPageReport(executor, args) {
11499
10092
  seq
11500
10093
  });
11501
10094
  return {
11502
- events: (await attachConversationMentions(executor, conversationId, { events: page.events })).events,
10095
+ events: (await attachConversationMentions(executor, conversationId, { events: page.events.map(formatConversationEventText) })).events,
11503
10096
  eventHistory: args.eventHistory,
11504
10097
  ...page.previousSeq === void 0 ? void 0 : { previousCursor: cursorAt(page.previousSeq) },
11505
10098
  ...page.nextSeq === void 0 ? void 0 : { nextCursor: cursorAt(page.nextSeq) },
@@ -11998,6 +10591,37 @@ async function readConversationAuxiliaryCostsFromSql(db, conversationIds) {
11998
10591
  }
11999
10592
  return result;
12000
10593
  }
10594
+ // src/chat/images/objects.ts
10595
+ /**
10596
+ * Preview images of object annotations, as Junior image paths. The browser
10597
+ * never gets the saved image URL in an image `src`, and the plugin that owns
10598
+ * the annotation checks each viewer when the image is read.
10599
+ */
10600
+ const MAX_PREVIEW_IMAGES = 4;
10601
+ /**
10602
+ * Return the preview images of an object annotation at 1x and 2x of a 320
10603
+ * pixel card slot, when its plugin serves images. Return nothing for other
10604
+ * annotations.
10605
+ */
10606
+ function objectPreviewImages(annotation) {
10607
+ if (annotation.kind !== "object") return void 0;
10608
+ const urls = annotation.facts?.type === "code_change" ? annotation.facts.previewImageUrls : void 0;
10609
+ if (!urls || !getPlugins().some((plugin) => plugin.manifest.name === annotation.plugin && plugin.images)) return;
10610
+ return urls.slice(0, MAX_PREVIEW_IMAGES).map((url) => {
10611
+ const image = {
10612
+ ref: encodeObjectImageRef({
10613
+ key: annotation.key,
10614
+ url
10615
+ }),
10616
+ source: annotation.plugin
10617
+ };
10618
+ const small = imagePath(image, 320);
10619
+ return {
10620
+ src: small,
10621
+ srcSet: `${small} 1x, ${imagePath(image, 640)} 2x`
10622
+ };
10623
+ });
10624
+ }
12001
10625
  // src/api/conversations/detail.ts
12002
10626
  /** Project stored metadata and a bounded event page into a signed history cursor. */
12003
10627
  function projectConversationDetail(args) {
@@ -12090,7 +10714,13 @@ async function readConversationDetailFromSql(conversationId, options) {
12090
10714
  conversationId,
12091
10715
  ...record.conversation.parentConversationId ? { parentConversationId: record.conversation.parentConversationId } : void 0
12092
10716
  }, readAccess),
12093
- listConversationAnnotations(getDb(), conversationId),
10717
+ listConversationAnnotations(getDb(), conversationId).then((saved) => saved.map((annotation) => {
10718
+ const previewImages = objectPreviewImages(annotation);
10719
+ return previewImages ? {
10720
+ ...annotation,
10721
+ previewImages
10722
+ } : annotation;
10723
+ })),
12094
10724
  readAutomationTitlesByConversationId([record.conversation]),
12095
10725
  readConversationAuxiliaryCostsFromSql(getDb(), [conversationId]),
12096
10726
  readLatestConversationBrief(getDb(), conversationId),
@@ -12114,7 +10744,7 @@ async function readConversationDetailFromSql(conversationId, options) {
12114
10744
  op: "function"
12115
10745
  }, () => attachConversationMentions(executor, conversationId, {
12116
10746
  ...brief ? { brief } : void 0,
12117
- events: page.events
10747
+ events: page.events.map(formatConversationEventText)
12118
10748
  })),
12119
10749
  options.unreadPage && unreadAfterSeq !== void 0 ? readConversationEventPageAround(executor, {
12120
10750
  canExposePayload,
@@ -12846,4 +11476,4 @@ function viewerWebMessages(messages, viewer) {
12846
11476
  }] : [];
12847
11477
  });
12848
11478
  }
12849
- export { decodeImageId as $, resolveAllowedDomains as A, runAutoArchiveSweep as B, readConversationPendingMessages as C, isAllowedDomain as D, assertNoLegacyAllowedDomains as E, readReviewItemForUser as F, OBJECT_LINK_TTL_MS as G, updateUserAutoArchiveSettings as H, reviewItemChange as I, resolveObjectLinks as J, readObjectLinkTypes as K, DEFAULT_AUTO_ARCHIVE_SETTINGS as L, ReviewItemActionError as M, actOnReviewItem as N, isAllowedSignInEmail as O, closeReviewItemsAnsweredByReply as P, IMAGE_WIDTHS as Q, archiveViewerDoneConversations as R, cancelConversationPendingMessagesForViewer as S, resolveMentions as T, GET as U, setConversationAutoArchive as V, readHealthReport as W, isPublicAddress as X, guardedFetch as Y, publicAddressLookup as Z, appendConversationMessageForViewer as _, SubscribedReplyReason as _t, pinConversation as a, slackInboundMessageId as at, decodeConversationCursor as b, readFirstHumanMessageTexts as bt, readConversationAuxiliaryCostsFromSql as c, AGENT_DISPATCH_MAX_AGE_MS as ct, conversationVersionQuery as d, recordSkippedConversationMessage as dt, createProductionConversationWorkOptions as et, readConversationDetailEtag as f, createSlackWebApiStatusSender as ft, readConversationRecordFromSql as g, parseContent as gt, readConversationEvents as h, stripLeadingBotMention as ht, readConversationFeed as i, clearSlackPendingReactions as it, stopConversation as j, readEnvList as k, childAgentTotalsReport as l, enqueueAgentDispatch as lt, keepQuickQuestionForViewer as m, startProcessingReaction as mt, steerConversationPendingMessagesForViewer as n, getProductionSlackAdapter as nt, reorderPinnedConversations as o, normalizeIncomingSlackThreadId as ot, forkConversationForViewer as p, bindMessageAuthorIdentityId as pt, resolveObjectLinkNow as q, conversationFeedVersionQuery as r, buildSlackInboundMessage as rt, readConversationDetail as s, withNormalizedThreadId as st, stopConversationTurnForViewer as t, createProductionSlackWebhookServices as tt, readConversationTreeMetricsFromSql as u, failStoppedDispatch as ut, createConversationForViewer as v, getThreadStopDecision as vt, requireConversationPendingMessages as w, encodeConversationCursor as x, requireWebMessageConversation as y, conversationSummaryFromStoredConversation as yt, readUserAutoArchiveSettings as z };
11479
+ export { guardedFetch as $, resolveAllowedDomains as A, runAutoArchiveSweep as B, readConversationPendingMessages as C, createViewerMcp as Ct, isAllowedDomain as D, assertNoLegacyAllowedDomains as E, readReviewItemForUser as F, startSavingsRefill as G, updateUserAutoArchiveSettings as H, reviewItemChange as I, readHealthReport as J, backfillCacheWarmingGaps as K, DEFAULT_AUTO_ARCHIVE_SETTINGS as L, ReviewItemActionError as M, actOnReviewItem as N, isAllowedSignInEmail as O, closeReviewItemsAnsweredByReply as P, resolveObjectLinks as Q, archiveViewerDoneConversations as R, cancelConversationPendingMessagesForViewer as S, readFirstHumanMessageTexts as St, resolveMentions as T, decodeImageId as Tt, readSavingsRefill as U, setConversationAutoArchive as V, runSavingsRefillSlice as W, readObjectLinkTypes as X, OBJECT_LINK_TTL_MS as Y, resolveObjectLinkNow as Z, appendConversationMessageForViewer as _, stripLeadingBotMention as _t, pinConversation as a, buildSlackInboundMessage as at, decodeConversationCursor as b, getThreadStopDecision as bt, readConversationAuxiliaryCostsFromSql as c, normalizeIncomingSlackThreadId as ct, conversationVersionQuery as d, enqueueAgentDispatch as dt, isPublicAddress as et, readConversationDetailEtag as f, failStoppedDispatch as ft, readConversationRecordFromSql as g, startProcessingReaction as gt, readConversationEvents as h, bindMessageAuthorIdentityId as ht, readConversationFeed as i, getProductionSlackAdapter as it, stopConversation as j, readEnvList as k, childAgentTotalsReport as l, withNormalizedThreadId as lt, keepQuickQuestionForViewer as m, createSlackWebApiStatusSender as mt, steerConversationPendingMessagesForViewer as n, createProductionConversationWorkOptions as nt, reorderPinnedConversations as o, clearSlackPendingReactions as ot, forkConversationForViewer as p, recordSkippedConversationMessage as pt, GET as q, conversationFeedVersionQuery as r, createProductionSlackWebhookServices as rt, readConversationDetail as s, slackInboundMessageId as st, stopConversationTurnForViewer as t, publicAddressLookup as tt, readConversationTreeMetricsFromSql as u, AGENT_DISPATCH_MAX_AGE_MS as ut, createConversationForViewer as v, parseContent as vt, requireConversationPendingMessages as w, IMAGE_WIDTHS as wt, encodeConversationCursor as x, conversationSummaryFromStoredConversation as xt, requireWebMessageConversation as y, SubscribedReplyReason as yt, readUserAutoArchiveSettings as z };