@sentry/junior 0.266.0 → 0.268.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-tlxzqaRe.js → actor-CP9K2Idu.js} +9 -1
- package/dist/{adapter-eRFA_naf.js → adapter-04AcD2SO.js} +5 -7
- package/dist/{admin-tILpP51p.js → admin-DIU1QyG3.js} +1 -1
- package/dist/{agent-invocations-CxKldAeB.js → agent-invocations-C1RNOCs8.js} +2 -0
- package/dist/{agent-runner-BtYK7bht.js → agent-runner-CAYfFmU7.js} +2636 -601
- package/dist/api/schema.d.ts +2 -5454
- package/dist/api/schema.js +6 -5
- package/dist/api.d.ts +6 -1
- package/dist/api.js +255 -1208
- package/dist/{app-Csbi9dW7.d.ts → app-z6Uuyq3j.d.ts} +23 -4
- package/dist/app.d.ts +2 -2
- package/dist/app.js +1869 -378
- package/dist/{automation-BKpY9LPa.js → automation-CmeFBSEh.js} +42 -14
- package/dist/{briefs-DgfWMU7e.js → briefs-DQbV2jNr.js} +4 -4
- package/dist/{catalog-runtime-DAJjAbSx.js → catalog-runtime-BD9GSpc6.js} +1 -1
- package/dist/cli/chat.js +15 -15
- package/dist/cli/check.js +3 -3
- package/dist/cli/init.js +0 -1
- 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 +3 -3
- package/dist/{client-B0YZfxNy.js → client-C1yDYjoS.js} +2 -2
- package/dist/{config-C0UwYqDK.js → config-DrTeF80T.js} +32 -10
- package/dist/{connections-Bwu3VORi.js → connections-D46f8vvi.js} +12 -12
- package/dist/{conversation-DF4rUcjb.js → conversation-DSo310Ps.js} +8 -1
- package/dist/{conversation-privacy-CY7JVjxn.js → conversation-privacy-CxlOCiUo.js} +1 -1
- package/dist/{credential-sync-VGAMUTGp.js → credential-sync-sm9fegLY.js} +29 -34
- package/dist/{credentialed-enF5Bf3y.js → credentialed-lukuD-cc.js} +2933 -1026
- package/dist/db-BU4LQD8s.d.ts +6 -0
- package/dist/{executor-TnWbvL09.js → executor-4vhvsMZJ.js} +83 -6
- package/dist/instrumentation.js +6 -2
- package/dist/{assistant-reply-UyzAfZQo.js → interruption-marker-CkncDT8d.js} +8 -2
- package/dist/{job-queue-DBpHmKnd.js → job-queue-In9QKz-I.js} +128 -3
- package/dist/{web-input-B-bMjD1V.js → list-BkgnXEEB.js} +1611 -817
- package/dist/{logging-Ce0mXZ8J.js → logging-DLSpkSSr.js} +11 -3
- package/dist/{message-VZ3DFpGb.js → message-BObyg59s.js} +4 -4
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-callback-server-CpqWLjVY.js → oauth-callback-server-B-WbSdoH.js} +2 -2
- package/dist/{prompt-BcCGlmg2.js → prompt-BW9jFsqZ.js} +1 -1
- package/dist/{registry-1BEIPdbT.js → registry-BgecKva0.js} +2 -2
- package/dist/{web-message-id-CJSUiksE.js → reporting-window-DVCD_10C.js} +1 -10
- package/dist/{resolve-BSHHkEGE.js → resolve-Cpa4Bu1O.js} +3 -3
- package/dist/{result-CwOpzqdh.js → result-D3TSmZZ8.js} +9 -9
- package/dist/{runner-CEaX04kz.js → runner-DS5OKhEp.js} +11 -11
- package/dist/{sandbox-egress-signals-BwtGHwqa.js → sandbox-egress-signals-CnDjY5rx.js} +1 -1
- package/dist/{schema-RsaBHxRH.js → schema-0050HFnB.js} +82 -5
- package/dist/schema-ZngqcOWM.d.ts +5813 -0
- package/dist/{service-account-6wC76eBZ.js → service-account-CKV2WTY7.js} +3 -3
- package/dist/{service-account-Dg4lIbHm.js → service-account-DGjnDw9y.js} +3 -3
- package/dist/{session-stop-tZOw9AJD.js → session-stop-Dam1EI7B.js} +527 -134
- package/dist/{skills-DzyGN7wd.js → skills-CfAnfImD.js} +2 -2
- package/dist/{spawn-6rokq7l_.js → spawn-cmq9p4Ly.js} +2 -2
- package/dist/{store-DcKkzrdt.js → store-C5PN02QO.js} +4 -4
- package/dist/{store-CG0VJyye.d.ts → store-xMuuXRE0.d.ts} +23 -9
- package/dist/store-zPEoJPBB.js +295 -0
- package/dist/{task-queue-Bg4RS2Gy.js → task-queue-_mf28dSu.js} +10 -5
- package/dist/{task-runner-8N5LIkSg.js → task-runner-DMI2prDO.js} +25 -14
- package/dist/{tasks-DDT-J3Rf.js → tasks-SB9z-VTU.js} +1551 -54
- package/dist/{thread-state-cprEaxgl.js → thread-state-BbbPh0Sn.js} +8 -18
- package/dist/{turn-failure-response-C8sMdsdX.js → turn-failure-response-BKKmnMB5.js} +11 -16
- package/dist/{turn-lifecycle-DaBVoz7h.js → turn-lifecycle-oP0kVeGz.js} +1 -1
- package/dist/{validation-C2lllinq.js → validation--JsAGLwc.js} +1 -1
- package/dist/{version-oaLfxxnf.js → version-jHwJp4hC.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-BpE6Z3qf.js → viewer-CpXTGlep.js} +329 -230
- package/dist/web-message-id-DlHNANtd.js +132 -0
- package/dist/{work-VX1SHWha.js → work-3N-GHY9m.js} +10 -10
- package/dist/{worker-hook-y_Y.js → worker-CCdbcItd.js} +30 -19
- package/migrations/0064_any_resource_event_triggers.sql +2 -0
- package/migrations/0065_user_customization.sql +1 -0
- package/migrations/0066_review_items.sql +53 -0
- package/migrations/0067_review_item_dedupe_tenant.sql +2 -0
- package/migrations/0068_review_item_slack_cards.sql +10 -0
- package/migrations/meta/0064_snapshot.json +3505 -0
- package/migrations/meta/0065_snapshot.json +3511 -0
- package/migrations/meta/0066_snapshot.json +4099 -0
- package/migrations/meta/0067_snapshot.json +3921 -0
- package/migrations/meta/0068_snapshot.json +4176 -0
- package/migrations/meta/_journal.json +36 -1
- package/package.json +19 -4
- package/dist/db-BnRqQ7G5.d.ts +0 -5
- package/dist/images-BKQqSi5W.js +0 -64
- package/dist/store-FALy-JQb.js +0 -1424
- package/dist/turn-session-routing-a9CHX-w6.js +0 -76
|
@@ -8,6 +8,13 @@ function parseSlackMessageTs(value) {
|
|
|
8
8
|
const parsed = slackMessageTsSchema.safeParse(value);
|
|
9
9
|
return parsed.success ? parsed.data : void 0;
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* Write a time in milliseconds as a Slack timestamp, for input that has no
|
|
13
|
+
* Slack message of its own, such as a submitted form.
|
|
14
|
+
*/
|
|
15
|
+
function slackMessageTsFromMs(ms) {
|
|
16
|
+
return slackMessageTsSchema.parse((ms / 1e3).toFixed(6));
|
|
17
|
+
}
|
|
11
18
|
// src/chat/slack/ids.ts
|
|
12
19
|
const slackChannelIdSchema = z.string().regex(/^[CDG][A-Z0-9]+$/).brand();
|
|
13
20
|
const slackTeamIdSchema = z.string().regex(/^T[A-Z0-9]+$/).brand();
|
|
@@ -82,6 +89,7 @@ function clean(value) {
|
|
|
82
89
|
function isSyntheticActorUserId(value) {
|
|
83
90
|
return value.toLowerCase() === "unknown";
|
|
84
91
|
}
|
|
92
|
+
/** Return whether a value has the shape of a Slack user id. */
|
|
85
93
|
function isSlackUserId(value) {
|
|
86
94
|
return SLACK_USER_ID_DISPLAY_PATTERN.test(value);
|
|
87
95
|
}
|
|
@@ -197,4 +205,4 @@ function createSlackResumeActor(args) {
|
|
|
197
205
|
if (!actor || actor.platform !== "slack") throw new Error("Slack actor requires team and user ids");
|
|
198
206
|
return actor;
|
|
199
207
|
}
|
|
200
|
-
export {
|
|
208
|
+
export { isSlackUserId as a, parseStoredSlackActor as c, parseSlackChannelReferenceId as d, parseSlackTeamId as f, slackMessageTsSchema as g, slackMessageTsFromMs as h, isActorUserId as i, toStoredSlackActor as l, parseSlackMessageTs as m, createSlackActor as n, isUserActor as o, parseSlackUserId as p, createSlackResumeActor as r, parseActorUserId as s, createActor as t, parseSlackChannelId as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as getChatConfig } from "./config-
|
|
1
|
+
import { i as getChatConfig } from "./config-DrTeF80T.js";
|
|
2
2
|
import { setTimeout } from "node:timers/promises";
|
|
3
3
|
import { createMemoryState } from "@chat-adapter/state-memory";
|
|
4
4
|
import { createRedisState } from "@chat-adapter/state-redis";
|
|
@@ -18,18 +18,16 @@ async function acquireActiveLock(state, threadId) {
|
|
|
18
18
|
* side effects finish; callers should still fence each blind write.
|
|
19
19
|
*/
|
|
20
20
|
async function withLock(state, key, run, options = {}) {
|
|
21
|
+
const ttlMs = options.ttlMs ?? 9e4;
|
|
21
22
|
const startedAtMs = Date.now();
|
|
22
23
|
let lock;
|
|
23
24
|
while (true) {
|
|
24
|
-
lock = await state.acquireLock(key,
|
|
25
|
+
lock = await state.acquireLock(key, ttlMs);
|
|
25
26
|
if (lock) break;
|
|
26
27
|
if (Date.now() - startedAtMs >= (options.waitMs ?? 0)) return { acquired: false };
|
|
27
28
|
await setTimeout(options.retryMs ?? 25, void 0, { ref: false });
|
|
28
29
|
}
|
|
29
|
-
const
|
|
30
|
-
const heartbeat = options.keepAlive ? setInterval(() => {
|
|
31
|
-
state.extendLock(lock, ttlMs);
|
|
32
|
-
}, Math.max(1, Math.floor(ttlMs / 3))) : void 0;
|
|
30
|
+
const heartbeat = options.keepAlive ? setInterval(() => void state.extendLock(lock, ttlMs).catch(() => void 0), Math.max(1, Math.floor(ttlMs / 3))) : void 0;
|
|
33
31
|
heartbeat?.unref();
|
|
34
32
|
try {
|
|
35
33
|
return {
|
|
@@ -267,4 +265,4 @@ async function disconnectStateAdapter() {
|
|
|
267
265
|
redisStateAdapter = void 0;
|
|
268
266
|
}
|
|
269
267
|
}
|
|
270
|
-
export {
|
|
268
|
+
export { MUTATION_LOCK_TTL_MS as a, withLock as c, getStateAdapter as i, getConnectedStateContext as n, acquireActiveLock as o, getDefaultRedisStateAdapterFor as r, fenceLock as s, disconnectStateAdapter as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { m as getDb, r as listAdminUsersFromSql, s as setUserAdminFromSql } from "./viewer-CpXTGlep.js";
|
|
2
2
|
import { CLI_USAGE } from "./cli/run.js";
|
|
3
3
|
// src/cli/admin.ts
|
|
4
4
|
/**
|
|
@@ -32,6 +32,8 @@ const juniorUsers = pgTable("junior_users", {
|
|
|
32
32
|
primaryEmailNormalized: text("primary_email_normalized").notNull(),
|
|
33
33
|
displayName: text("display_name"),
|
|
34
34
|
timezone: text("timezone"),
|
|
35
|
+
/** Text the user saved to change how Junior replies to them. */
|
|
36
|
+
customization: text("customization"),
|
|
35
37
|
/** Junior-wide admin role. Only the `junior admin` CLI changes it. */
|
|
36
38
|
isAdmin: boolean("is_admin").notNull().default(false),
|
|
37
39
|
createdAt: timestamptz("created_at").notNull(),
|