@sentry/junior 0.257.0 → 0.259.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{actor-BTtLaeWy.js → actor-tlxzqaRe.js} +3 -6
- package/dist/adapter-Bn0gFVSF.js +270 -0
- package/dist/{admin-DgIkm6Vy.js → admin-C8xz2f10.js} +2 -3
- package/dist/{agent-hooks-BjtTzvru.js → agent-hooks-B00FaKdP.js} +70 -109
- package/dist/{agent-invocations-Bdu3ROfo.js → agent-invocations-Qfz7dWgU.js} +6 -12
- package/dist/{agent-runner-D7OboVb3.js → agent-runner-CPSd7rKm.js} +324 -742
- package/dist/api/schema.d.ts +442 -447
- package/dist/api/schema.js +6 -6
- package/dist/api.d.ts +2 -12
- package/dist/api.js +165 -158
- package/dist/{app-BsU5QNBd.d.ts → app-Bbxrehjf.d.ts} +25 -45
- package/dist/app.d.ts +3 -3
- package/dist/app.js +206 -321
- package/dist/{assistant-reply-CbTPebzL.js → assistant-reply-CqthTerd.js} +3 -5
- package/dist/{automation-CHdlHVZP.js → automation-DWBFBenG.js} +6 -11
- package/dist/{briefs-oLOldnDM.js → briefs-DNYbQ9cD.js} +8 -11
- package/dist/{cadence-D00SCzT1.js → cadence-R7Em4RjE.js} +1 -2
- package/dist/{catalog-runtime-CZzhGQ7F.js → catalog-runtime-B8SuFPGb.js} +3 -4
- package/dist/cli/chat.d.ts +2 -4
- package/dist/cli/chat.js +22 -24
- package/dist/cli/check.d.ts +1 -3
- package/dist/cli/check.js +4 -5
- package/dist/cli/env.d.ts +1 -3
- package/dist/cli/env.js +1 -2
- package/dist/cli/init.d.ts +1 -3
- package/dist/cli/init.js +3 -3
- package/dist/cli/main.d.ts +1 -3
- package/dist/cli/main.js +8 -5
- package/dist/cli/plugins.d.ts +2 -4
- package/dist/cli/plugins.js +7 -8
- package/dist/cli/run.d.ts +3 -3
- package/dist/cli/run.js +3 -3
- package/dist/cli/snapshot-create.d.ts +1 -3
- package/dist/cli/snapshot-create.js +5 -5
- package/dist/cli/upgrade.d.ts +3 -6
- package/dist/cli/upgrade.js +11 -17
- package/dist/{client-D8HnkOQX.js → client-BZdxgKyL.js} +64 -18
- package/dist/{config-CJRnWK9H.js → config-Deqpfpg9.js} +21 -15
- package/dist/{connections-ClYrKzpX.js → connections-9gJkfS85.js} +179 -20
- package/dist/{conversation-CKNLYBJt.js → conversation-DjN3mlog.js} +8 -15
- package/dist/{conversation-privacy-C8b1nphZ.js → conversation-privacy-CFhNKxp-.js} +2 -3
- package/dist/{conversation-work-C6y3T5Hx.js → conversation-work-BaT_T6EB.js} +1 -2
- package/dist/{credential-sync-BXfohNmJ.js → credential-sync-BABGymK3.js} +23 -190
- package/dist/{db-Ca9Nt5ci.d.ts → db-BnRqQ7G5.d.ts} +1 -1
- package/dist/{executor-Do0THDRR.js → executor-Bb3eQb8q.js} +30 -52
- package/dist/{experimental-CQIvMUO7.js → experimental-BNK1l1jv.js} +2 -4
- package/dist/{history-9pO1Zd4Y.js → history-AY8rs-FR.js} +5 -9
- package/dist/{history-DvqWZlYX.d.ts → history-BgI33Kie.d.ts} +12 -20
- package/dist/{images-BN_BiBXF.js → images-BbSdVHC6.js} +5 -6
- package/dist/instrumentation.d.ts +1 -3
- package/dist/instrumentation.js +6 -8
- package/dist/{job-queue-B6SV9uVa.js → job-queue-vdGU-5ge.js} +6 -12
- package/dist/{logging-CWxiIuCF.js → logging-BStXN56b.js} +7 -12
- package/dist/{message-TUOdbSBW.js → message-DRf6m4uO.js} +5 -6
- package/dist/{model-profile-BwU8mqwD.js → model-profile-Bg8EoCKD.js} +2 -4
- package/dist/nitro.d.ts +3 -5
- package/dist/nitro.js +12 -17
- package/dist/{oauth-authorization-BA4Dt6a7.js → oauth-authorization-djQn5Nhy.js} +2 -4
- package/dist/{oauth-callback-server-Dj5UJODo.js → oauth-callback-server-JmOgLcGl.js} +3 -4
- package/dist/{oauth-relay-CdCnu80W.js → oauth-relay-CTygMkNx.js} +2 -3
- package/dist/{package-discovery-BVvSnQBB.js → package-discovery-DJBompdd.js} +17 -21
- package/dist/{pending-auth-s_QFribU.js → pending-auth-rG5U_QS1.js} +92 -83
- package/dist/{plugin-module-CVvEUSMH.js → plugin-module-Cf5gVPWP.js} +1 -2
- package/dist/{plugins-CjfUP5gJ.d.ts → plugins-B_0Cr0MO.d.ts} +5 -5
- package/dist/{plugins-egKWjgue.js → plugins-DOm9Y6qI.js} +2 -3
- package/dist/{private-trace-result-BLvBjy_e.js → private-trace-result-CE7_lEdq.js} +1 -2
- package/dist/{profile-h-72wM78.js → profile-qBM6B_-V.js} +14 -295
- package/dist/{prompt-DyoEj9c2.js → prompt-xgpyMtg7.js} +5 -9
- package/dist/{queue-B5SnqRln.d.ts → queue-C37RbDVc.d.ts} +0 -2
- package/dist/{registry-sLTr-sV9.js → registry-B_M_x_iS.js} +56 -30
- package/dist/{resolve-ncQPZROQ.js → resolve-BzpuLh8c.js} +8 -12
- package/dist/{result-C883vngT.js → result-DEZH_AnZ.js} +13 -17
- package/dist/{rolldown-runtime-B4FMCO8f.js → rolldown-runtime-nwUcYXjP.js} +1 -2
- package/dist/{runner-CzYImdOF.js → runner-BqQlG10t.js} +12 -13
- package/dist/{sandbox-egress-signals-CZbMINHI.js → sandbox-egress-signals-DCq3WLs5.js} +2 -3
- package/dist/{schema-Dy69D4Ge.js → schema-CF9HqNRY.js} +30 -27
- package/dist/{sentry-CgWZM_kV.js → sentry-BBUlHih9.js} +2 -3
- package/dist/service-account-BqTBkyD7.js +120 -0
- package/dist/service-account-BzhW7kXu.js +661 -0
- package/dist/{session-stop-CQjKd4a2.js → session-stop-CV65ZlU3.js} +23 -33
- package/dist/{skills-C22SLruK.js → skills-CiWS5_Ub.js} +9 -9
- package/dist/{spawn-DY9CLXDL.js → spawn-BSAQ7UQZ.js} +4 -5
- package/dist/{store-DXFIQy-G.js → store-B1GES4gC.js} +13 -15
- package/dist/{store-DoewL5mG.d.ts → store-CG0VJyye.d.ts} +0 -14
- package/dist/{task-queue-B17vV0La.js → task-queue-BAeGEMjJ.js} +5 -7
- package/dist/{task-runner-DUjvzYXj.js → task-runner-BlGhcQPi.js} +22 -26
- package/dist/{tasks-D_WIJtvO.js → tasks-DieKX3d4.js} +63 -78
- package/dist/{thread-state-Ch4yuCqG.js → thread-state-DpSWS4Rr.js} +13 -19
- package/dist/{turn-failure-response-C5nBKC4S.js → turn-failure-response-DQljogGJ.js} +16 -22
- package/dist/{turn-lifecycle-CO-ylUmV.js → turn-lifecycle-BLgrkV_L.js} +2 -3
- package/dist/{turn-session-routing-B3LWooK5.js → turn-session-routing-BlajheOU.js} +2 -3
- package/dist/{validation-CXYxaNYx.js → validation-23d7K9tX.js} +3 -4
- package/dist/vercel.d.ts +1 -3
- package/dist/vercel.js +1 -2
- package/dist/{version-BcdZy2zg.js → version-B_XumRx-.js} +3 -5
- package/dist/{version-CnXZ614E.d.ts → version-Cc2OFd9G.d.ts} +0 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -2
- package/dist/{viewer-DSZXygMU.js → viewer-B2_ABsYi.js} +26 -57
- package/dist/{web-input-B9Bv0_lR.js → web-input-BZDyxpzR.js} +101 -158
- package/dist/{web-message-id-xPI_EFSC.js → web-message-id-CJSUiksE.js} +3 -6
- package/dist/{work-nAfDSUFP.js → work-D3QKiV0O.js} +14 -16
- package/dist/{worker-vGXZ6XFT.js → worker-C8mUjYf9.js} +7 -8
- package/package.json +10 -9
|
@@ -1,190 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { L as isNativeIdentityProvider, f as logException, g as runBestEffort, m as logWarn } from "./logging-
|
|
4
|
-
import { a as getRuntimeMetadata, n as botConfig } from "./config-
|
|
5
|
-
import { f as parseSlackUserId } from "./actor-
|
|
6
|
-
import {
|
|
7
|
-
import { i as homeDir } from "./package-discovery-
|
|
8
|
-
import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-
|
|
9
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
10
|
-
import { t as discoverSkills } from "./skills-
|
|
11
|
-
import { B as postSlackMessage, Ft as recordAuthenticationLinked, It as recordAuthorizationCompleted, Z as getTurnRecord } from "./tasks-
|
|
12
|
-
import { Ht as getSlackClient } from "./agent-hooks-
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
1
|
+
import { It as createUserTokenStore, Mt as formatProviderLabel, Nt as parseOAuthStatePayload, Pt as resolveBaseUrl, _ as resolvePluginOAuthAccount, d as getMcpAuthSession, f as getMcpStoredOAuthCredentials, o as finalizeMcpAuthorization, p as putMcpStoredOAuthCredentials, s as deleteMcpAuthSession, x as lookupSlackUserProfile } from "./agent-runner-CPSd7rKm.js";
|
|
2
|
+
import { p as escapeXml } from "./client-BZdxgKyL.js";
|
|
3
|
+
import { L as isNativeIdentityProvider, f as logException, g as runBestEffort, m as logWarn } from "./logging-BStXN56b.js";
|
|
4
|
+
import { a as getRuntimeMetadata, n as botConfig } from "./config-Deqpfpg9.js";
|
|
5
|
+
import { f as parseSlackUserId } from "./actor-tlxzqaRe.js";
|
|
6
|
+
import { F as upsertIdentity, I as upsertLinkedIdentity, b as identityFromActor, f as getSqlExecutor, j as findUserByVerifiedEmails } from "./viewer-B2_ABsYi.js";
|
|
7
|
+
import { i as homeDir } from "./package-discovery-DJBompdd.js";
|
|
8
|
+
import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-B_M_x_iS.js";
|
|
9
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-B8SuFPGb.js";
|
|
10
|
+
import { t as discoverSkills } from "./skills-CiWS5_Ub.js";
|
|
11
|
+
import { B as postSlackMessage, Ft as recordAuthenticationLinked, It as recordAuthorizationCompleted, Z as getTurnRecord } from "./tasks-DieKX3d4.js";
|
|
12
|
+
import { Ht as getSlackClient } from "./agent-hooks-B00FaKdP.js";
|
|
13
|
+
import { i as getConversationPendingAuth } from "./pending-auth-rG5U_QS1.js";
|
|
14
|
+
import { a as acquireActiveLock, r as getStateAdapter } from "./adapter-Bn0gFVSF.js";
|
|
15
|
+
import { _ as getMcpProviderErrorAttributes } from "./service-account-BzhW7kXu.js";
|
|
16
|
+
import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-DpSWS4Rr.js";
|
|
17
|
+
import { c as deleteWebAuthorization, i as readConnectedOAuthTokens, m as wakePausedTurn, p as wakeAuthorizedTurn, u as htmlCallbackResponse } from "./connections-9gJkfS85.js";
|
|
18
|
+
import { n as relayLocalOAuthCallback } from "./oauth-relay-CTygMkNx.js";
|
|
18
19
|
import path from "node:path";
|
|
19
20
|
import { z } from "zod";
|
|
20
21
|
import { createHmac, createSecretKey, timingSafeEqual } from "node:crypto";
|
|
21
22
|
import { pluginStoredTokensSchema } from "@sentry/junior-plugin-api";
|
|
22
23
|
import fs from "node:fs";
|
|
23
|
-
|
|
24
|
-
/** Build pre-escaped callback HTML with the shared response security policy. */
|
|
25
|
-
function htmlCallbackResponse(title, message, status, options = {}) {
|
|
26
|
-
const footerMessage = options.footerMessage ?? `You can close this tab and return to ${botConfig.userName}.`;
|
|
27
|
-
const isSuccess = status >= 200 && status < 300;
|
|
28
|
-
const statusClass = isSuccess ? "success" : "error";
|
|
29
|
-
const statusIcon = isSuccess ? "" : "!";
|
|
30
|
-
const html = `<!DOCTYPE html>
|
|
31
|
-
<html lang="en">
|
|
32
|
-
<head>
|
|
33
|
-
<meta charset="utf-8">
|
|
34
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
35
|
-
<meta name="color-scheme" content="light dark">
|
|
36
|
-
<title>${title}</title>
|
|
37
|
-
<style>
|
|
38
|
-
:root {
|
|
39
|
-
color-scheme: light dark;
|
|
40
|
-
--canvas: #f4f1fa;
|
|
41
|
-
--surface: #ffffff;
|
|
42
|
-
--text: #211a2c;
|
|
43
|
-
--muted: #6e6479;
|
|
44
|
-
--border: #ded7e8;
|
|
45
|
-
--accent: #6c5fc7;
|
|
46
|
-
--success: #16835c;
|
|
47
|
-
--success-soft: #ddf5ea;
|
|
48
|
-
--error: #bc3d50;
|
|
49
|
-
--error-soft: #fce7eb;
|
|
50
|
-
--shadow: 0 24px 64px rgba(45, 31, 63, 0.14);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
* { box-sizing: border-box; }
|
|
54
|
-
|
|
55
|
-
body {
|
|
56
|
-
min-height: 100vh;
|
|
57
|
-
margin: 0;
|
|
58
|
-
display: grid;
|
|
59
|
-
place-items: center;
|
|
60
|
-
padding: 24px;
|
|
61
|
-
background: var(--canvas);
|
|
62
|
-
color: var(--text);
|
|
63
|
-
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
main {
|
|
67
|
-
width: min(100%, 480px);
|
|
68
|
-
padding: 48px 40px 40px;
|
|
69
|
-
text-align: center;
|
|
70
|
-
background: var(--surface);
|
|
71
|
-
border: 1px solid var(--border);
|
|
72
|
-
border-radius: 24px;
|
|
73
|
-
box-shadow: var(--shadow);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.brand {
|
|
77
|
-
display: inline-flex;
|
|
78
|
-
align-items: center;
|
|
79
|
-
gap: 8px;
|
|
80
|
-
margin-bottom: 32px;
|
|
81
|
-
color: var(--muted);
|
|
82
|
-
font-size: 14px;
|
|
83
|
-
font-weight: 700;
|
|
84
|
-
letter-spacing: 0.08em;
|
|
85
|
-
text-transform: uppercase;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.brand-mark {
|
|
89
|
-
width: 10px;
|
|
90
|
-
height: 10px;
|
|
91
|
-
background: var(--accent);
|
|
92
|
-
border-radius: 3px;
|
|
93
|
-
transform: rotate(12deg);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.status {
|
|
97
|
-
width: 64px;
|
|
98
|
-
height: 64px;
|
|
99
|
-
margin: 0 auto 24px;
|
|
100
|
-
display: grid;
|
|
101
|
-
place-items: center;
|
|
102
|
-
border-radius: 20px;
|
|
103
|
-
font-size: 32px;
|
|
104
|
-
font-weight: 750;
|
|
105
|
-
line-height: 1;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.status.success { color: var(--success); background: var(--success-soft); }
|
|
109
|
-
.status.success::before {
|
|
110
|
-
content: "";
|
|
111
|
-
width: 12px;
|
|
112
|
-
height: 24px;
|
|
113
|
-
margin-top: -5px;
|
|
114
|
-
border-right: 4px solid currentColor;
|
|
115
|
-
border-bottom: 4px solid currentColor;
|
|
116
|
-
transform: rotate(45deg);
|
|
117
|
-
}
|
|
118
|
-
.status.error { color: var(--error); background: var(--error-soft); }
|
|
119
|
-
|
|
120
|
-
h1 {
|
|
121
|
-
margin: 0;
|
|
122
|
-
font-size: clamp(28px, 7vw, 36px);
|
|
123
|
-
line-height: 1.12;
|
|
124
|
-
letter-spacing: -0.035em;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.message {
|
|
128
|
-
margin: 16px auto 0;
|
|
129
|
-
color: var(--muted);
|
|
130
|
-
font-size: 17px;
|
|
131
|
-
line-height: 1.6;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.footer {
|
|
135
|
-
margin: 32px 0 0;
|
|
136
|
-
padding-top: 24px;
|
|
137
|
-
color: var(--muted);
|
|
138
|
-
border-top: 1px solid var(--border);
|
|
139
|
-
font-size: 14px;
|
|
140
|
-
line-height: 1.5;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
@media (prefers-color-scheme: dark) {
|
|
144
|
-
:root {
|
|
145
|
-
--canvas: #15121a;
|
|
146
|
-
--surface: #211c28;
|
|
147
|
-
--text: #f6f1fb;
|
|
148
|
-
--muted: #b8adbf;
|
|
149
|
-
--border: #3a3243;
|
|
150
|
-
--accent: #a99af0;
|
|
151
|
-
--success: #72d6ad;
|
|
152
|
-
--success-soft: #193c30;
|
|
153
|
-
--error: #ff9aaa;
|
|
154
|
-
--error-soft: #48262e;
|
|
155
|
-
--shadow: 0 24px 64px rgba(0, 0, 0, 0.36);
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
@media (max-width: 520px) {
|
|
160
|
-
body { padding: 16px; }
|
|
161
|
-
main { padding: 40px 24px 32px; border-radius: 20px; }
|
|
162
|
-
}
|
|
163
|
-
</style>
|
|
164
|
-
</head>
|
|
165
|
-
<body>
|
|
166
|
-
<main>
|
|
167
|
-
<div class="brand"><span class="brand-mark" aria-hidden="true"></span>${botConfig.userName}</div>
|
|
168
|
-
<div class="status ${statusClass}" aria-hidden="true">${statusIcon}</div>
|
|
169
|
-
<h1>${title}</h1>
|
|
170
|
-
<p class="message">${message}</p>
|
|
171
|
-
<p class="footer">${footerMessage}</p>
|
|
172
|
-
</main>
|
|
173
|
-
</body>
|
|
174
|
-
</html>`;
|
|
175
|
-
return new Response(html, {
|
|
176
|
-
status,
|
|
177
|
-
headers: {
|
|
178
|
-
"Cache-Control": "no-store",
|
|
179
|
-
"Content-Security-Policy": "default-src 'none'; style-src 'unsafe-inline'; frame-ancestors 'none'; base-uri 'none'; form-action 'none'",
|
|
180
|
-
"Content-Type": "text/html; charset=utf-8",
|
|
181
|
-
"Referrer-Policy": "no-referrer",
|
|
182
|
-
"X-Content-Type-Options": "nosniff"
|
|
183
|
-
}
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
//#endregion
|
|
187
|
-
//#region src/handlers/mcp-oauth-callback.ts
|
|
24
|
+
// src/handlers/mcp-oauth-callback.ts
|
|
188
25
|
/**
|
|
189
26
|
* MCP OAuth callback handler.
|
|
190
27
|
*
|
|
@@ -404,8 +241,7 @@ async function GET$1(request, provider, waitUntil, options) {
|
|
|
404
241
|
return htmlResponse("failure");
|
|
405
242
|
}
|
|
406
243
|
}
|
|
407
|
-
|
|
408
|
-
//#region src/chat/slack/app-home.ts
|
|
244
|
+
// src/chat/slack/app-home.ts
|
|
409
245
|
const DEFAULT_DESCRIPTION_TEXT = "I help your team investigate, summarize, and act on work in Slack.";
|
|
410
246
|
const MAX_HOME_SKILLS = 6;
|
|
411
247
|
const MAX_SECTION_TEXT_CHARS = 3e3;
|
|
@@ -536,8 +372,7 @@ async function publishAppHomeView(slackClient, userId, userTokenStore) {
|
|
|
536
372
|
view
|
|
537
373
|
});
|
|
538
374
|
}
|
|
539
|
-
|
|
540
|
-
//#region src/handlers/oauth-callback.ts
|
|
375
|
+
// src/handlers/oauth-callback.ts
|
|
541
376
|
/**
|
|
542
377
|
* OAuth callbacks exchange and store credentials. Public signed callbacks
|
|
543
378
|
* relay to the owning CLI, which controls local continuation. Slack callbacks
|
|
@@ -793,8 +628,7 @@ async function GET(request, provider, waitUntil, options) {
|
|
|
793
628
|
const footerMessage = stored.destination?.platform === "local" || resumesWebTurn || webActor ? `You can close this tab and return to ${botName}.` : "You can close this tab and return to Slack.";
|
|
794
629
|
return htmlCallbackResponse(escapeXml(`${providerLabel} account connected`), escapeXml(statusMessage), 200, { footerMessage: escapeXml(footerMessage) });
|
|
795
630
|
}
|
|
796
|
-
|
|
797
|
-
//#region src/chat/local/credential-sync.ts
|
|
631
|
+
// src/chat/local/credential-sync.ts
|
|
798
632
|
const LOCAL_CREDENTIAL_SYNC_CONTEXT = "junior.local-credential-sync.v1";
|
|
799
633
|
const LOCAL_CREDENTIAL_SYNC_MAX_AGE_MS = 6e4;
|
|
800
634
|
const localCredentialSyncSchema = z.object({
|
|
@@ -854,5 +688,4 @@ async function receiveLocalOAuthCredential(request) {
|
|
|
854
688
|
await createUserTokenStore().set("local-cli", payload.data.provider, payload.data.tokens);
|
|
855
689
|
return new Response(null, { status: 204 });
|
|
856
690
|
}
|
|
857
|
-
|
|
858
|
-
export { GET$1 as a, publishAppHomeView as i, syncLocalOAuthCredential as n, htmlCallbackResponse as o, GET as r, receiveLocalOAuthCredential as t };
|
|
691
|
+
export { GET$1 as a, publishAppHomeView as i, syncLocalOAuthCredential as n, GET as r, receiveLocalOAuthCredential as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { f as logException } from "./logging-
|
|
2
|
-
import { g as startSpanManual } from "./sentry-
|
|
3
|
-
import "./config-
|
|
4
|
-
import { a as juniorAgentInvocations, c as juniorIdentities, d as juniorDestinations, f as timestamptz, i as juniorAgentBindings, l as juniorUsers, s as juniorConversations } from "./agent-invocations-
|
|
1
|
+
import { f as logException } from "./logging-BStXN56b.js";
|
|
2
|
+
import { g as startSpanManual } from "./sentry-BBUlHih9.js";
|
|
3
|
+
import "./config-Deqpfpg9.js";
|
|
4
|
+
import { a as juniorAgentInvocations, c as juniorIdentities, d as juniorDestinations, f as timestamptz, i as juniorAgentBindings, l as juniorUsers, s as juniorConversations } from "./agent-invocations-Qfz7dWgU.js";
|
|
5
5
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
6
6
|
import { sql } from "drizzle-orm";
|
|
7
7
|
import { bigint, boolean, check, date, doublePrecision, foreignKey, index, integer, jsonb, pgTable, primaryKey, text, uniqueIndex, uuid } from "drizzle-orm/pg-core";
|
|
@@ -12,7 +12,7 @@ import { SpanKind } from "@opentelemetry/api";
|
|
|
12
12
|
import pg from "pg";
|
|
13
13
|
import { drizzle as drizzle$1 } from "drizzle-orm/node-postgres";
|
|
14
14
|
import { migrate as migrate$1 } from "drizzle-orm/node-postgres/migrator";
|
|
15
|
-
|
|
15
|
+
// src/db/schema/artifacts.ts
|
|
16
16
|
/** Durable metadata for conversation-owned public artifacts. */
|
|
17
17
|
const juniorArtifacts = pgTable("junior_artifacts", {
|
|
18
18
|
/** Public identity used in `/public/artifacts/<id>.<ext>`. */
|
|
@@ -32,8 +32,7 @@ const juniorArtifacts = pgTable("junior_artifacts", {
|
|
|
32
32
|
index("junior_artifacts_gc_idx").on(table.deleteRequestedAt, table.createdAt),
|
|
33
33
|
index("junior_artifacts_conversation_idx").on(table.conversationId)
|
|
34
34
|
]);
|
|
35
|
-
|
|
36
|
-
//#region src/db/schema/attachments.ts
|
|
35
|
+
// src/db/schema/attachments.ts
|
|
37
36
|
/** Durable metadata for files owned by one conversation. */
|
|
38
37
|
const juniorAttachments = pgTable("junior_attachments", {
|
|
39
38
|
id: text("id").primaryKey(),
|
|
@@ -58,8 +57,7 @@ const juniorAttachments = pgTable("junior_attachments", {
|
|
|
58
57
|
index("junior_attachments_provider_idx").on(table.conversationId, table.provider, table.providerId),
|
|
59
58
|
index("junior_attachments_gc_idx").on(table.storageProvider, table.deleteRequestedAt, table.createdAt)
|
|
60
59
|
]);
|
|
61
|
-
|
|
62
|
-
//#region src/db/schema/code.ts
|
|
60
|
+
// src/db/schema/code.ts
|
|
63
61
|
/** Repository known to Junior through an installed code plugin. */
|
|
64
62
|
const juniorCodeRepositories = pgTable("junior_code_repositories", {
|
|
65
63
|
id: uuid("id").primaryKey(),
|
|
@@ -91,8 +89,7 @@ const juniorCodeChanges = pgTable("junior_code_changes", {
|
|
|
91
89
|
index("junior_code_changes_closed_at_idx").on(table.closedAt),
|
|
92
90
|
index("junior_code_changes_open_idx").on(table.id).where(sql`${table.state} = 'open'`)
|
|
93
91
|
]);
|
|
94
|
-
|
|
95
|
-
//#region src/db/schema/conversation-annotations.ts
|
|
92
|
+
// src/db/schema/conversation-annotations.ts
|
|
96
93
|
const juniorConversationAnnotations = pgTable("junior_conversation_annotations", {
|
|
97
94
|
conversationId: text("conversation_id").notNull(),
|
|
98
95
|
plugin: text("plugin").notNull(),
|
|
@@ -114,8 +111,7 @@ const juniorConversationAnnotations = pgTable("junior_conversation_annotations",
|
|
|
114
111
|
columns: [table.conversationId],
|
|
115
112
|
foreignColumns: [juniorConversations.conversationId]
|
|
116
113
|
}).onDelete("cascade")]);
|
|
117
|
-
|
|
118
|
-
//#region src/db/schema/api-tokens.ts
|
|
114
|
+
// src/db/schema/api-tokens.ts
|
|
119
115
|
const juniorApiTokens = pgTable("junior_api_tokens", {
|
|
120
116
|
id: text("id").primaryKey(),
|
|
121
117
|
ownerEmailNormalized: text("owner_email_normalized").notNull(),
|
|
@@ -127,8 +123,7 @@ const juniorApiTokens = pgTable("junior_api_tokens", {
|
|
|
127
123
|
lastUsedAt: timestamptz("last_used_at"),
|
|
128
124
|
revokedAt: timestamptz("revoked_at")
|
|
129
125
|
}, (table) => [uniqueIndex("junior_api_tokens_token_hash_uidx").on(table.tokenHash), index("junior_api_tokens_owner_email_idx").on(table.ownerEmailNormalized)]);
|
|
130
|
-
|
|
131
|
-
//#region src/db/schema/conversation-events.ts
|
|
126
|
+
// src/db/schema/conversation-events.ts
|
|
132
127
|
/**
|
|
133
128
|
* Append-only canonical conversation history. `history_version` partitions
|
|
134
129
|
* model-history replacements, while `(conversation_id, seq)` is the stable
|
|
@@ -163,8 +158,7 @@ const juniorConversationEvents = pgTable("junior_conversation_events", {
|
|
|
163
158
|
index("junior_conversation_events_message_search_idx").using("gin", sql`to_tsvector('english', ${table.payload}->>'text')`).where(sql`${table.type} = 'message'`),
|
|
164
159
|
uniqueIndex("junior_conversation_events_idempotency_idx").on(table.conversationId, table.idempotencyKey)
|
|
165
160
|
]);
|
|
166
|
-
|
|
167
|
-
//#region src/db/schema/conversation-metrics.ts
|
|
161
|
+
// src/db/schema/conversation-metrics.ts
|
|
168
162
|
const CONVERSATION_METRICS = [
|
|
169
163
|
"duration_ms",
|
|
170
164
|
"total_tokens",
|
|
@@ -199,8 +193,7 @@ const juniorConversationMetrics = pgTable("junior_conversation_metrics", {
|
|
|
199
193
|
}),
|
|
200
194
|
index("junior_conversation_metrics_occurred_at_metric_idx").on(table.occurredAt, table.metric)
|
|
201
195
|
]);
|
|
202
|
-
|
|
203
|
-
//#region src/db/schema/conversation-briefs.ts
|
|
196
|
+
// src/db/schema/conversation-briefs.ts
|
|
204
197
|
/** Append-only Brief versions produced for completed Conversation turns. */
|
|
205
198
|
const juniorConversationBriefs = pgTable("junior_conversation_briefs", {
|
|
206
199
|
conversationId: text("conversation_id").notNull(),
|
|
@@ -226,8 +219,7 @@ const juniorConversationBriefs = pgTable("junior_conversation_briefs", {
|
|
|
226
219
|
index("junior_conversation_briefs_conversation_version_idx").on(table.conversationId, table.version.desc()),
|
|
227
220
|
index("junior_conversation_briefs_search_idx").using("gin", sql`to_tsvector('english', ${table.searchText})`)
|
|
228
221
|
]);
|
|
229
|
-
|
|
230
|
-
//#region src/db/schema/conversation-bindings.ts
|
|
222
|
+
// src/db/schema/conversation-bindings.ts
|
|
231
223
|
/** Provider conversation coordinates bound to Junior's opaque durable conversation id. */
|
|
232
224
|
const juniorConversationBindings = pgTable("junior_conversation_bindings", {
|
|
233
225
|
conversationId: text("conversation_id").notNull().references(() => juniorConversations.conversationId),
|
|
@@ -245,8 +237,7 @@ const juniorConversationBindings = pgTable("junior_conversation_bindings", {
|
|
|
245
237
|
table.providerConversationId
|
|
246
238
|
]
|
|
247
239
|
}), index("junior_conversation_bindings_conversation_idx").on(table.conversationId)]);
|
|
248
|
-
|
|
249
|
-
//#region src/db/schema/conversation-participants.ts
|
|
240
|
+
// src/db/schema/conversation-participants.ts
|
|
250
241
|
/**
|
|
251
242
|
* Materialized personal-feed membership for one linked user on one root
|
|
252
243
|
* conversation. Rows come from the root actor and from durable human user
|
|
@@ -265,8 +256,7 @@ const juniorConversationParticipants = pgTable("junior_conversation_participants
|
|
|
265
256
|
index("junior_conversation_participants_user_activity_idx").on(table.userId, table.lastMessageAt.desc()),
|
|
266
257
|
index("junior_conversation_participants_root_idx").on(table.rootConversationId)
|
|
267
258
|
]);
|
|
268
|
-
|
|
269
|
-
//#region src/db/schema/location-configurations.ts
|
|
259
|
+
// src/db/schema/location-configurations.ts
|
|
270
260
|
/** Durable user configuration entries scoped to provider Locations. */
|
|
271
261
|
const juniorLocationConfigurations = pgTable("junior_location_configurations", {
|
|
272
262
|
locationId: text("location_id").notNull().references(() => juniorDestinations.id, { onDelete: "cascade" }),
|
|
@@ -277,8 +267,7 @@ const juniorLocationConfigurations = pgTable("junior_location_configurations", {
|
|
|
277
267
|
source: text("source"),
|
|
278
268
|
expiresAt: text("expires_at")
|
|
279
269
|
}, (table) => [primaryKey({ columns: [table.locationId, table.key] })]);
|
|
280
|
-
|
|
281
|
-
//#region src/db/schema/stats.ts
|
|
270
|
+
// src/db/schema/stats.ts
|
|
282
271
|
/**
|
|
283
272
|
* Daily named counters used by Junior and loaded plugins.
|
|
284
273
|
* TODO: store hour keys when dashboard 24h workspace usage needs hourly bars.
|
|
@@ -299,8 +288,7 @@ const juniorStats = pgTable("junior_stats", {
|
|
|
299
288
|
table.name
|
|
300
289
|
]
|
|
301
290
|
})]);
|
|
302
|
-
|
|
303
|
-
//#region src/db/schema/automations.ts
|
|
291
|
+
// src/db/schema/automations.ts
|
|
304
292
|
/**
|
|
305
293
|
* One row per Automation of either kind. `record` holds the fields that have
|
|
306
294
|
* no column. Each write also copies the nested fields that queries filter or
|
|
@@ -337,8 +325,7 @@ const juniorAutomations = pgTable("junior_automations", {
|
|
|
337
325
|
index("junior_automations_next_run_due_idx").on(table.nextRunAtMs, table.createdAtMs, table.id).where(sql`${table.status} = 'active' AND ${table.nextRunAtMs} IS NOT NULL`),
|
|
338
326
|
index("junior_automations_match_idx").on(table.namespace, table.identifier, table.createdAtMs, table.id).where(sql`${table.status} <> 'deleted'`)
|
|
339
327
|
]);
|
|
340
|
-
|
|
341
|
-
//#region src/db/schema/automation-versions.ts
|
|
328
|
+
// src/db/schema/automation-versions.ts
|
|
342
329
|
/** One saved Automation definition. Lifecycle and scheduler state are not versioned. */
|
|
343
330
|
const juniorAutomationVersions = pgTable("junior_automation_versions", {
|
|
344
331
|
automationId: text("automation_id").notNull(),
|
|
@@ -356,8 +343,7 @@ const juniorAutomationVersions = pgTable("junior_automation_versions", {
|
|
|
356
343
|
columns: [table.automationId],
|
|
357
344
|
foreignColumns: [juniorAutomations.id]
|
|
358
345
|
}).onDelete("cascade")]);
|
|
359
|
-
|
|
360
|
-
//#region src/db/schema/automation-runs.ts
|
|
346
|
+
// src/db/schema/automation-runs.ts
|
|
361
347
|
/**
|
|
362
348
|
* One dispatch of an Automation, from claim or dispatch to its outcome. A
|
|
363
349
|
* Scheduled automation run id is `<automation id>:<scheduled time>`. An event
|
|
@@ -394,8 +380,7 @@ const juniorAutomationRuns = pgTable("junior_automation_runs", {
|
|
|
394
380
|
index("junior_automation_runs_completed_idx").on(table.completedAtMs),
|
|
395
381
|
index("junior_automation_runs_incomplete_idx").on(table.automationId, table.scheduledForMs).where(sql`${table.status} in ('pending', 'running')`)
|
|
396
382
|
]);
|
|
397
|
-
|
|
398
|
-
//#region src/db/schema/workspaces.ts
|
|
383
|
+
// src/db/schema/workspaces.ts
|
|
399
384
|
/** Named recipe used to prepare a reusable Sandbox. */
|
|
400
385
|
const juniorWorkspaces = pgTable("junior_workspaces", {
|
|
401
386
|
id: text("id").primaryKey(),
|
|
@@ -414,8 +399,7 @@ const juniorWorkspaceRepos = pgTable("junior_workspace_repos", {
|
|
|
414
399
|
table.provider,
|
|
415
400
|
table.repo
|
|
416
401
|
] })]);
|
|
417
|
-
|
|
418
|
-
//#region src/db/schema/snapshots.ts
|
|
402
|
+
// src/db/schema/snapshots.ts
|
|
419
403
|
/**
|
|
420
404
|
* Sandbox snapshot build and ready artifact for one Workspace recipe.
|
|
421
405
|
* A ready row keeps its builder owner until the snapshot is discarded.
|
|
@@ -449,8 +433,7 @@ const juniorSnapshots = pgTable("junior_snapshots", {
|
|
|
449
433
|
uniqueIndex("junior_snapshots_active_build_uidx").on(table.workspaceId, table.profileHash).where(sql`${table.status} = 'building'`),
|
|
450
434
|
index("junior_snapshots_workspace_status_idx").on(table.workspaceId, table.status)
|
|
451
435
|
]);
|
|
452
|
-
|
|
453
|
-
//#region src/db/schema.ts
|
|
436
|
+
// src/db/schema.ts
|
|
454
437
|
const juniorSqlSchema = {
|
|
455
438
|
juniorArtifacts,
|
|
456
439
|
juniorAttachments,
|
|
@@ -478,8 +461,7 @@ const juniorSqlSchema = {
|
|
|
478
461
|
juniorWorkspaceRepos,
|
|
479
462
|
juniorWorkspaces
|
|
480
463
|
};
|
|
481
|
-
|
|
482
|
-
//#region src/db/tracing.ts
|
|
464
|
+
// src/db/tracing.ts
|
|
483
465
|
const traced = Symbol("junior.db.traced");
|
|
484
466
|
const MAX_QUERY_TEXT_LENGTH = 1e4;
|
|
485
467
|
const MAX_QUERY_SUMMARY_LENGTH = 255;
|
|
@@ -751,14 +733,13 @@ function traceQueries(client, options) {
|
|
|
751
733
|
});
|
|
752
734
|
return client;
|
|
753
735
|
}
|
|
754
|
-
|
|
755
|
-
//#region src/db/neon.ts
|
|
736
|
+
// src/db/neon.ts
|
|
756
737
|
var NeonExecutor = class {
|
|
757
|
-
pool;
|
|
758
|
-
connectionString;
|
|
759
738
|
transactionClient = new AsyncLocalStorage();
|
|
760
739
|
savepointId = 0;
|
|
761
740
|
isolatedQueryId = 0;
|
|
741
|
+
pool;
|
|
742
|
+
connectionString;
|
|
762
743
|
constructor(pool, connectionString) {
|
|
763
744
|
this.pool = pool;
|
|
764
745
|
this.connectionString = connectionString;
|
|
@@ -875,15 +856,14 @@ function createNeonJuniorSqlExecutor(args) {
|
|
|
875
856
|
});
|
|
876
857
|
return new NeonExecutor(pool, args.connectionString);
|
|
877
858
|
}
|
|
878
|
-
|
|
879
|
-
//#region src/db/postgres.ts
|
|
859
|
+
// src/db/postgres.ts
|
|
880
860
|
const { Pool: Pool$1 } = pg;
|
|
881
861
|
var PostgresExecutor = class {
|
|
882
|
-
pool;
|
|
883
|
-
connectionString;
|
|
884
862
|
transactionClient = new AsyncLocalStorage();
|
|
885
863
|
savepointId = 0;
|
|
886
864
|
isolatedQueryId = 0;
|
|
865
|
+
pool;
|
|
866
|
+
connectionString;
|
|
887
867
|
constructor(pool, connectionString) {
|
|
888
868
|
this.pool = pool;
|
|
889
869
|
this.connectionString = connectionString;
|
|
@@ -1001,8 +981,7 @@ function createPostgresJuniorSqlExecutor(args) {
|
|
|
1001
981
|
});
|
|
1002
982
|
return new PostgresExecutor(pool, args.connectionString);
|
|
1003
983
|
}
|
|
1004
|
-
|
|
1005
|
-
//#region src/db/executor.ts
|
|
984
|
+
// src/db/executor.ts
|
|
1006
985
|
/** Create the SQL executor appropriate for the configured database URL. */
|
|
1007
986
|
function createJuniorSqlExecutor(args) {
|
|
1008
987
|
const statementTimeoutMs = args.statementTimeoutMs ?? 3e4;
|
|
@@ -1015,5 +994,4 @@ function createJuniorSqlExecutor(args) {
|
|
|
1015
994
|
statementTimeoutMs
|
|
1016
995
|
});
|
|
1017
996
|
}
|
|
1018
|
-
//#endregion
|
|
1019
997
|
export { juniorConversationAnnotations as _, juniorAutomationRuns as a, juniorAttachments as b, juniorStats as c, juniorConversationBindings as d, juniorConversationBriefs as f, juniorApiTokens as g, juniorConversationEvents as h, juniorWorkspaces as i, juniorLocationConfigurations as l, juniorConversationMetrics as m, juniorSnapshots as n, juniorAutomationVersions as o, CONVERSATION_METRICS as p, juniorWorkspaceRepos as r, juniorAutomations as s, createJuniorSqlExecutor as t, juniorConversationParticipants as u, juniorCodeChanges as v, juniorArtifacts as x, juniorCodeRepositories as y };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
+
// src/chat/experimental.ts
|
|
3
3
|
var experimental_exports = /* @__PURE__ */ __exportAll({
|
|
4
4
|
EXPERIMENTAL_FEATURES: () => EXPERIMENTAL_FEATURES,
|
|
5
5
|
getExperimentalFeatures: () => getExperimentalFeatures,
|
|
@@ -14,7 +14,6 @@ var experimental_exports = /* @__PURE__ */ __exportAll({
|
|
|
14
14
|
const EXPERIMENTAL_FEATURES = [
|
|
15
15
|
"operator-tools",
|
|
16
16
|
"passive-routing",
|
|
17
|
-
"slack-sign-in",
|
|
18
17
|
"subagents"
|
|
19
18
|
];
|
|
20
19
|
const EXPERIMENTAL_FEATURE_SET = new Set(EXPERIMENTAL_FEATURES);
|
|
@@ -47,5 +46,4 @@ function getExperimentalFeatures() {
|
|
|
47
46
|
function isExperimentalFeatureEnabled(feature) {
|
|
48
47
|
return configuredExperimental[feature] === true;
|
|
49
48
|
}
|
|
50
|
-
//#endregion
|
|
51
49
|
export { setExperimentalFeatures as i, getExperimentalFeatures as n, isExperimentalFeatureEnabled as r, experimental_exports as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { l as TURN_REASONING_LEVELS, s as modelProfileSchema } from "./model-profile-
|
|
1
|
+
import { l as TURN_REASONING_LEVELS, s as modelProfileSchema } from "./model-profile-Bg8EoCKD.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { actorSchema } from "@sentry/junior-plugin-api";
|
|
4
|
-
|
|
4
|
+
// src/usage-schema.ts
|
|
5
5
|
const usageCostSchema = z.object({
|
|
6
6
|
input: z.number().finite().nonnegative().optional(),
|
|
7
7
|
output: z.number().finite().nonnegative().optional(),
|
|
@@ -18,8 +18,7 @@ const usageSchema = z.object({
|
|
|
18
18
|
totalTokens: z.number().int().nonnegative().optional(),
|
|
19
19
|
cost: usageCostSchema.optional()
|
|
20
20
|
}).strict();
|
|
21
|
-
|
|
22
|
-
//#region src/chat/conversations/provenance.ts
|
|
21
|
+
// src/chat/conversations/provenance.ts
|
|
23
22
|
/**
|
|
24
23
|
* Durable message attribution shared by storage and projections.
|
|
25
24
|
* Attribution never grants credential authority.
|
|
@@ -69,8 +68,7 @@ function instructionActors(provenance) {
|
|
|
69
68
|
}
|
|
70
69
|
return actors;
|
|
71
70
|
}
|
|
72
|
-
|
|
73
|
-
//#region src/chat/conversations/history-payload.ts
|
|
71
|
+
// src/chat/conversations/history-payload.ts
|
|
74
72
|
const messageFieldsSchema = z.record(z.string(), z.unknown());
|
|
75
73
|
const replacementEntrySchema = z.object({ item: z.string() }).passthrough();
|
|
76
74
|
/** Identify history events that store message fields as JSON strings. */
|
|
@@ -121,8 +119,7 @@ function decodeHistoryPayload(type, payload) {
|
|
|
121
119
|
if (fields.provenance !== void 0) message.provenance = fields.provenance;
|
|
122
120
|
return message;
|
|
123
121
|
}
|
|
124
|
-
|
|
125
|
-
//#region src/chat/conversations/history.ts
|
|
122
|
+
// src/chat/conversations/history.ts
|
|
126
123
|
/**
|
|
127
124
|
* Durable conversation event history port.
|
|
128
125
|
*
|
|
@@ -524,5 +521,4 @@ const newConversationEventSchema = z.object({
|
|
|
524
521
|
idempotencyKey: z.string().min(1).optional(),
|
|
525
522
|
createdAtMs: z.number().finite()
|
|
526
523
|
}).strict();
|
|
527
|
-
//#endregion
|
|
528
524
|
export { conversationTurnFailureReasonSchema as a, newConversationEventSchema as c, contextProvenance as d, instructionActors as f, usageSchema as h, conversationTurnFailureCodeSchema as i, encodeHistoryPayload as l, sameActorIdentity as m, agentHistoryItemSchema as n, decodeStoredConversationEvent as o, instructionProvenanceFor as p, conversationEventDataSchema as r, historyReplacementSchema as s, KNOWN_CONVERSATION_EVENT_TYPES as t, agentInstructionProvenance as u };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { ConversationAnnotation, OwnedObjectAnnotation } from "@sentry/junior-plugin-api";
|
|
3
|
-
//#region src/chat/attachments/input.d.ts
|
|
4
3
|
/** Bound JSON image input below the hosting platform's request size limit. */
|
|
5
4
|
declare const MAX_INPUT_IMAGE_BYTES: number;
|
|
6
5
|
declare const MAX_INPUT_IMAGES = 3;
|
|
@@ -8,9 +7,9 @@ declare const MAX_INPUT_IMAGES = 3;
|
|
|
8
7
|
declare const inputImageSchema: z.ZodObject<{
|
|
9
8
|
filename: z.ZodString;
|
|
10
9
|
contentType: z.ZodEnum<{
|
|
11
|
-
"image/png": "image/png";
|
|
12
|
-
"image/jpeg": "image/jpeg";
|
|
13
10
|
"image/gif": "image/gif";
|
|
11
|
+
"image/jpeg": "image/jpeg";
|
|
12
|
+
"image/png": "image/png";
|
|
14
13
|
"image/webp": "image/webp";
|
|
15
14
|
}>;
|
|
16
15
|
data: z.ZodString;
|
|
@@ -24,8 +23,6 @@ declare const messageAttachmentSchema: z.ZodObject<{
|
|
|
24
23
|
bytes: z.ZodNumber;
|
|
25
24
|
}, z.core.$strict>;
|
|
26
25
|
type MessageAttachment = z.output<typeof messageAttachmentSchema>;
|
|
27
|
-
//#endregion
|
|
28
|
-
//#region src/chat/automations/card.d.ts
|
|
29
26
|
/** Saved automation facts shown with a Message, not a live status view. */
|
|
30
27
|
declare const automationCardSchema: z.ZodObject<{
|
|
31
28
|
kind: z.ZodLiteral<"automation">;
|
|
@@ -37,8 +34,6 @@ declare const automationCardSchema: z.ZodObject<{
|
|
|
37
34
|
warning: z.ZodNullable<z.ZodString>;
|
|
38
35
|
}, z.core.$strict>;
|
|
39
36
|
type AutomationCard = z.output<typeof automationCardSchema>;
|
|
40
|
-
//#endregion
|
|
41
|
-
//#region src/chat/conversations/cards.d.ts
|
|
42
37
|
/** Facts for delivery and display. Messages store only references. */
|
|
43
38
|
type MessageCard = OwnedObjectAnnotation | AutomationCard;
|
|
44
39
|
/** Render each built-in card with its own text format. */
|
|
@@ -52,8 +47,6 @@ declare const messageCardRefSchema: z.ZodObject<{
|
|
|
52
47
|
type MessageCardRef = z.output<typeof messageCardRefSchema>;
|
|
53
48
|
/** Resolve current saved facts without fetching providers or changing history. */
|
|
54
49
|
declare function resolveMessageCards(refs: readonly MessageCardRef[], annotations: readonly ConversationAnnotation[]): OwnedObjectAnnotation[];
|
|
55
|
-
//#endregion
|
|
56
|
-
//#region src/chat/conversations/history.d.ts
|
|
57
50
|
/** Where a failed turn stopped. */
|
|
58
51
|
declare const conversationTurnFailureCodeSchema: z.ZodEnum<{
|
|
59
52
|
agent_run_failed: "agent_run_failed";
|
|
@@ -66,21 +59,20 @@ declare const conversationTurnFailureCodeSchema: z.ZodEnum<{
|
|
|
66
59
|
* Values are fixed labels only. Do not store raw exception text.
|
|
67
60
|
*/
|
|
68
61
|
declare const conversationTurnFailureReasonSchema: z.ZodEnum<{
|
|
69
|
-
unknown: "unknown";
|
|
70
|
-
capacity: "capacity";
|
|
71
62
|
auth: "auth";
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
network: "network";
|
|
76
|
-
server: "server";
|
|
63
|
+
capacity: "capacity";
|
|
64
|
+
content_policy: "content_policy";
|
|
65
|
+
empty_output: "empty_output";
|
|
77
66
|
invalid_request: "invalid_request";
|
|
78
67
|
invalid_response: "invalid_response";
|
|
68
|
+
network: "network";
|
|
69
|
+
permission: "permission";
|
|
79
70
|
quota: "quota";
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
tool_errors: "tool_errors";
|
|
71
|
+
rate_limit: "rate_limit";
|
|
72
|
+
server: "server";
|
|
83
73
|
suppressed_output: "suppressed_output";
|
|
74
|
+
timeout: "timeout";
|
|
75
|
+
tool_errors: "tool_errors";
|
|
76
|
+
unknown: "unknown";
|
|
84
77
|
}>;
|
|
85
|
-
//#endregion
|
|
86
78
|
export { resolveMessageCards as a, MAX_INPUT_IMAGES as c, messageCardText as i, MAX_INPUT_IMAGE_BYTES as l, conversationTurnFailureReasonSchema as n, AutomationCard as o, MessageCard as r, InputImage as s, conversationTurnFailureCodeSchema as t, MessageAttachment as u };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { D as storeAttachment, T as readLiveAttachment } from "./agent-runner-
|
|
3
|
-
import {
|
|
4
|
-
import { L as detectImageMediaType } from "./conversation-
|
|
5
|
-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
+
import { D as storeAttachment, T as readLiveAttachment } from "./agent-runner-CPSd7rKm.js";
|
|
3
|
+
import { f as getSqlExecutor } from "./viewer-B2_ABsYi.js";
|
|
4
|
+
import { L as detectImageMediaType } from "./conversation-DjN3mlog.js";
|
|
5
|
+
// src/chat/attachments/images.ts
|
|
6
6
|
var images_exports = /* @__PURE__ */ __exportAll({
|
|
7
7
|
decodeInputImages: () => decodeInputImages,
|
|
8
8
|
loadInputImages: () => loadInputImages,
|
|
@@ -61,5 +61,4 @@ async function loadInputImages(args) {
|
|
|
61
61
|
};
|
|
62
62
|
}));
|
|
63
63
|
}
|
|
64
|
-
//#endregion
|
|
65
64
|
export { images_exports as n, storeInputImages as r, decodeInputImages as t };
|