@sentry/junior 0.268.0 → 0.270.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/README.md +2 -9
- package/dist/{adapter-04AcD2SO.js → adapter-BQNTKVTF.js} +3 -49
- package/dist/{admin-DIU1QyG3.js → admin-CKVEoXa4.js} +1 -1
- package/dist/{agent-runner-CAYfFmU7.js → agent-runner-MSQSMFkq.js} +4538 -3251
- package/dist/api/schema.d.ts +2 -3
- package/dist/api/schema.js +7 -7
- package/dist/api.d.ts +3 -1
- package/dist/api.js +190 -301
- package/dist/{app-z6Uuyq3j.d.ts → app-Bz8t4P8p.d.ts} +9 -3
- package/dist/app.d.ts +1 -1
- package/dist/app.js +129 -209
- package/dist/{automation-CmeFBSEh.js → automation-Dwh_xcqM.js} +74 -74
- package/dist/{briefs-DQbV2jNr.js → briefs-DNFzFFVx.js} +5 -5
- package/dist/{catalog-runtime-BD9GSpc6.js → catalog-runtime-Bdym_wKy.js} +1 -1
- package/dist/cli/chat.js +16 -26
- package/dist/cli/check.js +3 -3
- package/dist/cli/main.js +5 -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-C1yDYjoS.js → client-B2MjENki.js} +31 -16
- package/dist/{config-DrTeF80T.js → config-Dm3pWRqY.js} +3 -3
- package/dist/{connections-D46f8vvi.js → connections-0BBhiD-p.js} +10 -10
- package/dist/{conversation-DSo310Ps.js → conversation-AhOVzN_k.js} +11 -86
- package/dist/{conversation-privacy-CxlOCiUo.js → conversation-privacy-C1pJ89rs.js} +1 -1
- package/dist/{credential-sync-sm9fegLY.js → credential-sync-BRiWYs6_.js} +15 -14
- package/dist/{credentialed-lukuD-cc.js → credentialed-BeBaJMZ_.js} +565 -83
- package/dist/{store-xMuuXRE0.d.ts → db-BYOuu6v2.d.ts} +4 -0
- package/dist/{executor-4vhvsMZJ.js → executor-BB6eJkD4.js} +6 -6
- package/dist/instrumentation.js +2 -2
- package/dist/{interruption-marker-CkncDT8d.js → interruption-marker-CdblrIQK.js} +1 -1
- package/dist/{job-queue-In9QKz-I.js → job-queue-DiaXoSDg.js} +2 -2
- package/dist/{list-BkgnXEEB.js → list-BTDRxkOg.js} +331 -662
- package/dist/locks-D-0h111u.js +48 -0
- package/dist/{logging-DLSpkSSr.js → logging-C6EdT6PP.js} +1 -1
- package/dist/{history-C84mlAwO.js → media-U6Tuz6Mi.js} +84 -2
- package/dist/{message-BObyg59s.js → message-DsjiWRVg.js} +4 -4
- package/dist/{model-profile-Bg8EoCKD.js → model-profile-B998sjVd.js} +9 -2
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +5 -3
- package/dist/{oauth-callback-server-B-WbSdoH.js → oauth-callback-server-CjFFVGqa.js} +2 -2
- package/dist/{prompt-BW9jFsqZ.js → prompt-BPSdXYXV.js} +1 -1
- package/dist/{registry-BgecKva0.js → registry-CndmkP2P.js} +1 -1
- package/dist/reporting-schema-CZREhYc-.js +104 -0
- package/dist/{web-message-id-DlHNANtd.js → reporting-window-DRCi1Ls_.js} +139 -7
- package/dist/{resolve-Cpa4Bu1O.js → resolve-BkAA1wH7.js} +3 -3
- package/dist/{result-D3TSmZZ8.js → result-9TJTpuYP.js} +30 -11
- package/dist/{runner-DS5OKhEp.js → runner-BmKLSyJm.js} +12 -11
- package/dist/{sandbox-egress-signals-CnDjY5rx.js → sandbox-egress-signals-CjLaogMo.js} +1 -1
- package/dist/{schema-0050HFnB.js → schema-DNLJ_MzW.js} +36 -20
- package/dist/{schema-ZngqcOWM.d.ts → schema-WayPSHFu.d.ts} +149 -12
- package/dist/{service-account-CKV2WTY7.js → service-account-D6e9cVmH.js} +4 -3
- package/dist/{service-account-DGjnDw9y.js → service-account-DlhYl-Mu.js} +3 -3
- package/dist/{session-stop-Dam1EI7B.js → session-stop-MZRgYqYH.js} +24 -16
- package/dist/{skills-CfAnfImD.js → skills-BggTR_ue.js} +2 -2
- package/dist/{spawn-cmq9p4Ly.js → spawn-DmtlcAT_.js} +2 -2
- package/dist/{store-zPEoJPBB.js → store-BeWGgaMA.js} +3 -3
- package/dist/{store-C5PN02QO.js → store-Byarin7b.js} +4 -4
- package/dist/{task-queue-_mf28dSu.js → task-queue-Dt1_ZoI_.js} +3 -3
- package/dist/task-runner-DyKqAPpm.js +269 -0
- package/dist/{thread-state-BbbPh0Sn.js → thread-state-BHBLMvgb.js} +5 -5
- package/dist/{turn-failure-response-BKKmnMB5.js → turn-failure-response-DWXy_0oJ.js} +9 -9
- package/dist/{turn-lifecycle-oP0kVeGz.js → turn-lifecycle-AiXkVqCB.js} +1 -1
- package/dist/{tasks-SB9z-VTU.js → turn-session-routing-B9KLBhaT.js} +939 -120
- package/dist/{validation--JsAGLwc.js → validation-BW60Vtx_.js} +1 -1
- package/dist/{version-jHwJp4hC.js → version-CivPYmkH.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-CpXTGlep.js → viewer-BTgAfdUg.js} +216 -27
- package/dist/{work-3N-GHY9m.js → work-Bjm52fHo.js} +17 -36
- package/dist/{worker-CCdbcItd.js → worker-CMbgtHLu.js} +15 -7
- package/migrations/0069_system_identity.sql +25 -0
- package/migrations/0070_review_item_foreign_keys.sql +5 -0
- package/migrations/AGENTS.md +17 -0
- package/migrations/meta/0069_snapshot.json +3979 -0
- package/migrations/meta/0070_snapshot.json +3997 -0
- package/migrations/meta/_journal.json +15 -1
- package/package.json +5 -4
- package/dist/db-BU4LQD8s.d.ts +0 -6
- package/dist/history-BgI33Kie.d.ts +0 -78
- package/dist/reporting-window-DVCD_10C.js +0 -227
- package/dist/task-runner-DMI2prDO.js +0 -1073
- package/migrations/README.md +0 -30
package/README.md
CHANGED
|
@@ -34,15 +34,8 @@ const app = await createApp({
|
|
|
34
34
|
export default app;
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
Run `junior init my-bot` to scaffold a complete project including `vercel.json` for Vercel deployment.
|
|
40
|
-
|
|
41
|
-
Use `defineJuniorPlugins([...])` in a runtime-safe plugin module, then point
|
|
42
|
-
`juniorNitro({ plugins: "./plugins" })` at that module and pass the same set to
|
|
43
|
-
`createApp({ plugins })`. Manifest-only packages use package-name strings;
|
|
44
|
-
factories such as `githubPlugin()` register their manifest and in-process hooks
|
|
45
|
-
together.
|
|
37
|
+
Run `junior init my-bot` to scaffold a complete project, including
|
|
38
|
+
`vercel.json` for Vercel deployment.
|
|
46
39
|
|
|
47
40
|
## Full docs
|
|
48
41
|
|
|
@@ -1,53 +1,7 @@
|
|
|
1
|
-
import { i as getChatConfig } from "./config-
|
|
2
|
-
import {
|
|
1
|
+
import { i as getChatConfig } from "./config-Dm3pWRqY.js";
|
|
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
|
-
// src/chat/state/locks.ts
|
|
6
|
-
const ACTIVE_LOCK_TTL_MS = 9e4;
|
|
7
|
-
const MUTATION_LOCK_TTL_MS = 1e4;
|
|
8
|
-
/**
|
|
9
|
-
* Acquire a lock for long-running work that the queued state adapter should
|
|
10
|
-
* keep alive while the owning invocation is still making progress.
|
|
11
|
-
*/
|
|
12
|
-
async function acquireActiveLock(state, threadId) {
|
|
13
|
-
return await state.acquireLock(threadId, ACTIVE_LOCK_TTL_MS);
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Run work under one lock, optionally waiting for the current owner.
|
|
17
|
-
* `keepAlive` is for multi-store mutations that must retain ownership until all
|
|
18
|
-
* side effects finish; callers should still fence each blind write.
|
|
19
|
-
*/
|
|
20
|
-
async function withLock(state, key, run, options = {}) {
|
|
21
|
-
const ttlMs = options.ttlMs ?? 9e4;
|
|
22
|
-
const startedAtMs = Date.now();
|
|
23
|
-
let lock;
|
|
24
|
-
while (true) {
|
|
25
|
-
lock = await state.acquireLock(key, ttlMs);
|
|
26
|
-
if (lock) break;
|
|
27
|
-
if (Date.now() - startedAtMs >= (options.waitMs ?? 0)) return { acquired: false };
|
|
28
|
-
await setTimeout(options.retryMs ?? 25, void 0, { ref: false });
|
|
29
|
-
}
|
|
30
|
-
const heartbeat = options.keepAlive ? setInterval(() => void state.extendLock(lock, ttlMs).catch(() => void 0), Math.max(1, Math.floor(ttlMs / 3))) : void 0;
|
|
31
|
-
heartbeat?.unref();
|
|
32
|
-
try {
|
|
33
|
-
return {
|
|
34
|
-
acquired: true,
|
|
35
|
-
value: await run(lock)
|
|
36
|
-
};
|
|
37
|
-
} finally {
|
|
38
|
-
if (heartbeat) clearInterval(heartbeat);
|
|
39
|
-
await state.releaseLock(lock);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Prove lock ownership immediately before a blind write.
|
|
44
|
-
*
|
|
45
|
-
* Whole-record mutations must stop if their lock expired rather than overwrite
|
|
46
|
-
* state committed by a newer owner.
|
|
47
|
-
*/
|
|
48
|
-
async function fenceLock(state, lock, ttlMs = MUTATION_LOCK_TTL_MS) {
|
|
49
|
-
if (!await state.extendLock(lock, ttlMs)) throw new Error(`Lock ownership was lost before write for ${lock.threadId}`);
|
|
50
|
-
}
|
|
51
5
|
// src/chat/state/adapter.ts
|
|
52
6
|
const ACTIVE_LOCK_HEARTBEAT_MS = 3e4;
|
|
53
7
|
let stateAdapter;
|
|
@@ -265,4 +219,4 @@ async function disconnectStateAdapter() {
|
|
|
265
219
|
redisStateAdapter = void 0;
|
|
266
220
|
}
|
|
267
221
|
}
|
|
268
|
-
export {
|
|
222
|
+
export { getDefaultRedisStateAdapterFor as n, getStateAdapter as r, disconnectStateAdapter as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { S as getDb, r as listAdminUsersFromSql, u as setUserAdminFromSql } from "./viewer-BTgAfdUg.js";
|
|
2
2
|
import { CLI_USAGE } from "./cli/run.js";
|
|
3
3
|
// src/cli/admin.ts
|
|
4
4
|
/**
|