@sentry/junior 0.284.0 → 0.285.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{adapter-CW5UW7vL.js → adapter-DN5AB4VU.js} +37 -3
- package/dist/{admin-DUWN8zZX.js → admin-DOITMKnn.js} +1 -1
- package/dist/{agent-runner-Cqr21pOU.js → agent-runner-BsWhHe4N.js} +579 -1653
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +7 -6
- package/dist/api.d.ts +1 -1
- package/dist/api.js +141 -43
- package/dist/{app-CvGalMxi.d.ts → app-DyMs9330.d.ts} +2 -2
- package/dist/app.d.ts +1 -1
- package/dist/app.js +226 -186
- package/dist/{assistant-reply-CFE-OZMS.js → assistant-reply-9Jip5bsr.js} +1 -1
- package/dist/{automation-Zvx_I9Z5.js → automation-Mk8aaHzy.js} +1 -1
- package/dist/{background-compaction-queue-CHFzrQbS.js → background-compaction-queue-DXkLsWoH.js} +2 -2
- package/dist/{briefs-Cx7mkfSk.js → briefs-Cl8-nK9B.js} +5 -5
- package/dist/{catalog-runtime-dKOVbR7l.js → catalog-runtime-Bte6jRB2.js} +1 -1
- package/dist/cli/chat.js +19 -16
- package/dist/cli/check.js +3 -3
- package/dist/cli/init.js +3 -0
- package/dist/cli/main.js +3 -3
- package/dist/cli/plugins.js +4 -4
- package/dist/cli/snapshot-create.js +4 -4
- package/dist/cli/upgrade.d.ts +1 -1
- package/dist/cli/upgrade.js +12 -17
- package/dist/{client-CMyH5rDz.js → client-DDbBucBw.js} +2 -2
- package/dist/{config-Dt3CpG17.js → config-DqFnykQT.js} +1 -1
- package/dist/{connections-CCHPybZP.js → connections-DA4LT9LL.js} +10 -10
- package/dist/{conversation-DdT7SNar.js → conversation-D8kVoCrP.js} +58 -6
- package/dist/{conversation-pending-messages-Dct5pheX.js → conversation-pending-messages-BvROq1bq.js} +1 -1
- package/dist/{conversation-privacy-BpHHhEVp.js → conversation-privacy-D0j_h70R.js} +1 -1
- package/dist/{credential-sync-BBPw8dam.js → credential-sync-hcsYatw-.js} +13 -13
- package/dist/{db-D7CCwAo8.d.ts → db-BhHZSuFw.d.ts} +18 -2
- package/dist/{executor-CyIwHz9r.js → executor-BLEMIgIZ.js} +11 -3
- package/dist/instrumentation.js +2 -2
- package/dist/{logging-Qo-7xGp1.js → logging-BfORLKoq.js} +1 -1
- package/dist/{message-DFbtOWqv.js → message-DqjuKzUx.js} +13 -23
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-callback-server-BB1gixWo.js → oauth-callback-server-CFSRzu1n.js} +2 -2
- package/dist/{projection-0UcUeuzn.js → projection-DliWYrnT.js} +280 -71
- package/dist/{prompt-CCtaGgbI.js → prompt-BvIUzY4y.js} +8 -6
- package/dist/{registry-DOnPkI8g.js → registry-rC7MCxu8.js} +1 -1
- package/dist/{reporting-window-B-QP9zX1.js → reporting-window-B4TwyuJo.js} +14 -14
- package/dist/{resolve-Di3omymY.js → resolve-Biu8Qw3u.js} +3 -3
- package/dist/result-DxJMCX47.js +299 -0
- package/dist/result-event-type-DD6BAgT7.js +11 -0
- package/dist/{runner-CnX_dTKw.js → runner-BQJSFLKg.js} +11 -11
- package/dist/{sandbox-egress-signals-CtxLJmmg.js → sandbox-egress-signals-6aMxJSDn.js} +1 -1
- package/dist/{schema-B017enNE.d.ts → schema-BUviRAs8.d.ts} +157 -220
- package/dist/{schema-Bn3miEd_.js → schema-BasXTvi2.js} +63 -5
- package/dist/{service-account-KhZIqXRi.js → service-account-BI5Wgx22.js} +3 -3
- package/dist/{service-account-ewDAx4Mx.js → service-account-CAE-_1dR.js} +3 -3
- package/dist/session-stop-CA-jOJ84.js +2924 -0
- package/dist/{skills-CKyotM4g.js → skills-B22duVJU.js} +2 -2
- package/dist/{spawn-D5D2MQdz.js → spawn-BB2_4VYn.js} +2 -2
- package/dist/{stop-BSKRTaRS.js → stop-DioIcEAu.js} +4821 -4199
- package/dist/{store-G3S0kWSD.js → store-B26LV6UP.js} +78 -311
- package/dist/{store-ymkEUWe4.js → store-Dn4W7qgH.js} +30 -5
- package/dist/{task-queue-BcOHzXxe.js → task-queue-Bt0IoR2i.js} +3 -3
- package/dist/{task-runner-B65cDumh.js → task-runner-D8lddjzp.js} +7 -7
- package/dist/{thread-state-D6rNGQu9.js → thread-state-CrFk3K_7.js} +4 -4
- package/dist/{turn-failure-response-BlO4nuDJ.js → turn-failure-response-DaJ04qVj.js} +7 -7
- package/dist/{turn-lifecycle-BQ8ETk63.js → turn-lifecycle-C2mXS7AZ.js} +1 -1
- package/dist/{turn-session-routing-D_GXfcAG.js → turn-session-routing-CGMKrYOj.js} +10 -10
- package/dist/{validation-DJG_wrg2.js → validation-TzhfQABF.js} +1 -1
- package/dist/{version-i1An1eTS.js → version-DSk8CFvA.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-BlpnzZZa.js → viewer-1Ea81s0b.js} +190 -53
- package/dist/{work-BgCW3FDC.js → work-ybG4_q5C.js} +238 -32
- package/dist/{worker-BJz1mwYt.js → worker-ccSyZRNz.js} +6 -6
- package/migrations/0083_conversation_kind.sql +11 -0
- package/migrations/0084_read_position_backfill.sql +25 -0
- package/migrations/0085_child_archived_at.sql +1 -0
- package/migrations/meta/0083_snapshot.json +4388 -0
- package/migrations/meta/0084_snapshot.json +4388 -0
- package/migrations/meta/0085_snapshot.json +4394 -0
- package/migrations/meta/_journal.json +21 -0
- package/package.json +4 -4
- package/dist/result-NvndYzCb.js +0 -483
- package/dist/session-stop-D_1SysjC.js +0 -1438
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { i as getChatConfig } from "./config-
|
|
1
|
+
import { i as getChatConfig } from "./config-DqFnykQT.js";
|
|
2
2
|
import { t as ACTIVE_LOCK_TTL_MS } from "./locks-D-0h111u.js";
|
|
3
3
|
import { createMemoryState } from "@chat-adapter/state-memory";
|
|
4
4
|
import { createRedisState } from "@chat-adapter/state-redis";
|
|
5
5
|
// src/chat/state/adapter.ts
|
|
6
6
|
const ACTIVE_LOCK_HEARTBEAT_MS = 3e4;
|
|
7
|
+
const REDIS_STATE_KEY_PREFIX = "chat-sdk";
|
|
7
8
|
let stateAdapter;
|
|
8
9
|
let redisStateAdapter;
|
|
9
10
|
/** Lazily connect state operations, including queued-adapter lock heartbeats. */
|
|
@@ -184,7 +185,10 @@ function createStateAdapter() {
|
|
|
184
185
|
return createQueuedStateAdapter(createConnectingStateAdapter(withOptionalPrefix(createMemoryState(), config.state.keyPrefix)), { activeLockMaxAgeMs });
|
|
185
186
|
}
|
|
186
187
|
if (!config.state.redisUrl) throw new Error("REDIS_URL is required for durable Slack thread state");
|
|
187
|
-
const redisState = createRedisState({
|
|
188
|
+
const redisState = createRedisState({
|
|
189
|
+
keyPrefix: REDIS_STATE_KEY_PREFIX,
|
|
190
|
+
url: config.state.redisUrl
|
|
191
|
+
});
|
|
188
192
|
redisStateAdapter = redisState;
|
|
189
193
|
return createQueuedStateAdapter(createConnectingStateAdapter(withOptionalPrefix(redisState, config.state.keyPrefix)), { activeLockMaxAgeMs });
|
|
190
194
|
}
|
|
@@ -206,6 +210,36 @@ async function getDefaultRedisStateAdapterFor(adapter) {
|
|
|
206
210
|
const context = await getConnectedStateContext();
|
|
207
211
|
return context.stateAdapter === adapter ? context.redisStateAdapter : void 0;
|
|
208
212
|
}
|
|
213
|
+
function redisCacheKey(key) {
|
|
214
|
+
const prefix = getChatConfig().state.keyPrefix;
|
|
215
|
+
return `${REDIS_STATE_KEY_PREFIX}:cache:${prefix ? `${prefix}:` : ""}${key}`;
|
|
216
|
+
}
|
|
217
|
+
/** Read state values in one Redis round trip. Other adapters read each key. */
|
|
218
|
+
async function getStateValues(state, keys) {
|
|
219
|
+
if (keys.length === 0) return [];
|
|
220
|
+
const redis = await getDefaultRedisStateAdapterFor(state);
|
|
221
|
+
if (!redis) return await Promise.all(keys.map((key) => state.get(key)));
|
|
222
|
+
return (await redis.getClient().mGet(keys.map(redisCacheKey))).map((value) => {
|
|
223
|
+
if (value === null) return null;
|
|
224
|
+
try {
|
|
225
|
+
return JSON.parse(value);
|
|
226
|
+
} catch {
|
|
227
|
+
return value;
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
/** Write state values with one TTL in one Redis round trip. */
|
|
232
|
+
async function setStateValues(state, entries, ttlMs) {
|
|
233
|
+
if (entries.length === 0) return;
|
|
234
|
+
const redis = await getDefaultRedisStateAdapterFor(state);
|
|
235
|
+
if (!redis) {
|
|
236
|
+
await Promise.all(entries.map(({ key, value }) => state.set(key, value, ttlMs)));
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
const pipeline = redis.getClient().multi();
|
|
240
|
+
for (const { key, value } of entries) pipeline.set(redisCacheKey(key), JSON.stringify(value), { PX: ttlMs });
|
|
241
|
+
await pipeline.execAsPipeline();
|
|
242
|
+
}
|
|
209
243
|
function getStateAdapter() {
|
|
210
244
|
if (!stateAdapter) stateAdapter = createStateAdapter();
|
|
211
245
|
return stateAdapter;
|
|
@@ -219,4 +253,4 @@ async function disconnectStateAdapter() {
|
|
|
219
253
|
redisStateAdapter = void 0;
|
|
220
254
|
}
|
|
221
255
|
}
|
|
222
|
-
export { getDefaultRedisStateAdapterFor as n, getStateAdapter as r, disconnectStateAdapter as t };
|
|
256
|
+
export { setStateValues as a, getStateValues as i, getDefaultRedisStateAdapterFor as n, getStateAdapter as r, disconnectStateAdapter as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as getDb, r as listAdminUsersFromSql, u as setUserAdminFromSql } from "./viewer-
|
|
1
|
+
import { S as getDb, r as listAdminUsersFromSql, u as setUserAdminFromSql } from "./viewer-1Ea81s0b.js";
|
|
2
2
|
import { CLI_USAGE } from "./cli/run.js";
|
|
3
3
|
// src/cli/admin.ts
|
|
4
4
|
/**
|