@sentry/junior 0.298.0 → 0.299.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-6jsm_v96.js → actor-D2iXzvlN.js} +2 -1
- package/dist/{state-CSuA2J1V.js → adapter-AgCNqqsG.js} +49 -133
- package/dist/{admin-BF3DbYGf.js → admin-1VwEXztm.js} +2 -2
- package/dist/{agent-runner-Q9GkoerG.js → agent-runner-Ciet8_nn.js} +977 -1316
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +8 -7
- package/dist/api.d.ts +1 -1
- package/dist/api.js +125 -43
- package/dist/{app-DOg_mCtV.d.ts → app--ky-Eu33.d.ts} +6 -4
- package/dist/app.d.ts +1 -1
- package/dist/app.js +126 -299
- package/dist/{automation-Cn8qmbdr.js → automation-M3RFJUBf.js} +1 -1
- package/dist/{background-compaction-queue-BZhGFOK6.js → background-compaction-queue-CnimvRdk.js} +4 -4
- package/dist/{briefs-CQrCRF6-.js → briefs-CwzvgdCa.js} +4 -4
- package/dist/{catalog-runtime-DZeD2WbL.js → catalog-runtime-DaBaHY7u.js} +1 -1
- package/dist/cli/chat.js +17 -17
- package/dist/cli/check.js +3 -3
- package/dist/cli/main.js +3 -3
- package/dist/cli/plugins.js +5 -5
- package/dist/cli/snapshot-create.js +4 -4
- package/dist/cli/upgrade.d.ts +1 -1
- package/dist/cli/upgrade.js +4 -4
- package/dist/{config-BOByVnxe.js → config-CAXIpWQb.js} +80 -6
- package/dist/{connections-BNN5cJam.js → connections-Dy0hPdUq.js} +6 -6
- package/dist/continue-in-slack-DIOjFj76.js +176 -0
- package/dist/{conversation-DCkzvxqB.js → conversation-fCWD9Az3.js} +24 -12
- package/dist/{conversation-feed-CMA12Rjs.js → conversation-feed-BPK8vkkZ.js} +88 -3
- package/dist/{conversation-privacy-C0eRxsgb.js → conversation-privacy-DUgtRkf8.js} +1 -1
- package/dist/{conversation-turn-D9qvcDX6.js → conversation-turn-DkJB6yMF.js} +85 -68
- package/dist/{credential-sync-B_iUpxGL.js → credential-sync-RX24Y8aY.js} +18 -18
- package/dist/{db-DoMcnYol.d.ts → db-B07FtU9g.d.ts} +1 -1
- package/dist/{db-CoMNr2Zm.js → db-COYOGzYS.js} +171 -12
- package/dist/{executor-C-m8VrzX.js → executor-BWmAgSyi.js} +40 -11
- package/dist/{media-BepyEUNm.js → history-IjdmO_r6.js} +1 -85
- package/dist/instrumentation.js +2 -2
- package/dist/lineage-D-5jm_oj.js +37 -0
- package/dist/{logging-CJTi5niy.js → logging-DPLEa8Bn.js} +1 -1
- package/dist/media-BAHvgkok.js +85 -0
- package/dist/{message-Q6_5DAWR.js → message-BIHR1yRk.js} +9 -10
- package/dist/model-input-BPZYH8Nd.js +82 -0
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +17 -9
- package/dist/{oauth-callback-server-CH5XAyo-.js → oauth-callback-server-R7qvSzFG.js} +2 -2
- package/dist/{plugins-HYh_JOdw.js → plugins-CBW2Prb_.js} +1 -1
- package/dist/{projection-BgwEE36_.js → projection-DEdP1q6f.js} +261 -36
- package/dist/{prompt-DXc9DYT9.js → prompt-4M98h_tC.js} +4 -4
- package/dist/{registry-9XwqSnM-.js → registry-BTKmKM-r.js} +3 -3
- package/dist/{resolve-DUIAbcRL.js → resolve-B8hXNVZ3.js} +3 -3
- package/dist/{result-C2Vn8QGn.js → result-g-XAaOj6.js} +158 -69
- package/dist/{runner-CXGtw-Mc.js → runner-BlPSA5A8.js} +9 -9
- package/dist/{sandbox-egress-signals-Di3S_dO7.js → sandbox-egress-signals-Pai-MzEY.js} +1 -1
- package/dist/{schema-Dyp7racy.js → schema-BNnY_trV.js} +47 -7
- package/dist/{schema-BnbZ-rKv.d.ts → schema-DbuWR-DN.d.ts} +657 -346
- package/dist/{service-account-GzAMUQ8a.js → service-account-9OLNQMyz.js} +4 -4
- package/dist/{service-account-DM3KBBeG.js → service-account-BYGZ08DQ.js} +3 -3
- package/dist/session-stop-2XJrcNCy.js +3356 -0
- package/dist/{skills-DCK9SD_l.js → skills-DpBQoeHV.js} +3 -3
- package/dist/slack-conversation-unfurl-BcDIWo67.js +370 -0
- package/dist/spawn-09GssFod.js +73 -0
- package/dist/state-Cufq0_rH.js +132 -0
- package/dist/{user-input-request-CXNIov9n.js → statuses-B8mUfghF.js} +30 -25
- package/dist/{stop-Dh2DfwpK.js → stop-U7iUrR1g.js} +6008 -5772
- package/dist/{store-B1zepKG8.js → store-BHiaHCQu.js} +24 -4
- package/dist/{store-DrA17Fbz.js → store-CSgUTMdv.js} +10 -10
- package/dist/{task-queue-D1rXWfFN.js → task-queue-bMNq0clp.js} +4 -4
- package/dist/{task-runner-CT4M8oDz.js → task-runner-B__rxwxU.js} +10 -10
- package/dist/{thread-context-DnqUkbzN.js → thread-context-d0ceWbVT.js} +18 -18
- package/dist/{turn-session-routing-VXDVXLRl.js → turn-session-routing-BVZHBFCF.js} +5 -5
- package/dist/turn-user-message-BEw7acTP.js +355 -0
- package/dist/users-BK3dbxZL.js +424 -0
- package/dist/{validation-zxAJBDDy.js → validation-BDVJjO2E.js} +1 -1
- package/dist/{version-DcZ40a0g.js → version-DQgZoQ3D.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-CgiGjW10.js → viewer-CAWfFo29.js} +25 -54
- package/dist/{warmup-CwKbxQLl.js → warmup-9ySPacF9.js} +1137 -144
- package/dist/{worker-CbDUzaBA.js → worker-D8jJO-WO.js} +8 -7
- package/migrations/0104_code_change_draft.sql +1 -0
- package/migrations/0105_attachment_uploads.sql +14 -0
- package/migrations/0106_conversation_agent_config.sql +1 -0
- package/migrations/meta/0104_snapshot.json +4516 -0
- package/migrations/meta/0105_snapshot.json +4611 -0
- package/migrations/meta/0106_snapshot.json +4617 -0
- package/migrations/meta/_journal.json +21 -0
- package/package.json +4 -4
- package/dist/attempt-selection-ClP3MMPr.js +0 -61
- package/dist/locks-D-0h111u.js +0 -48
- package/dist/notification-Bv25xbj0.js +0 -1284
- package/dist/prompt-input-BUr4J9RO.js +0 -1424
- package/dist/session-stop-D4i7e6iT.js +0 -181
- package/dist/spawn-6cX6xE9G.js +0 -80
- package/dist/turn-cancel-l460pfGW.js +0 -201
- package/dist/turn-user-message-BSPmkm7X.js +0 -608
- package/dist/turn-wake-DVFVXyhX.js +0 -161
- package/dist/{oauth-relay-CsfIazeF.js → oauth-relay-DRzq73b6.js} +1 -1
|
@@ -729,6 +729,27 @@
|
|
|
729
729
|
"when": 1794424481991,
|
|
730
730
|
"tag": "0103_agent_invocation_fork",
|
|
731
731
|
"breakpoints": true
|
|
732
|
+
},
|
|
733
|
+
{
|
|
734
|
+
"idx": 104,
|
|
735
|
+
"version": "7",
|
|
736
|
+
"when": 1794493721940,
|
|
737
|
+
"tag": "0104_code_change_draft",
|
|
738
|
+
"breakpoints": true
|
|
739
|
+
},
|
|
740
|
+
{
|
|
741
|
+
"idx": 105,
|
|
742
|
+
"version": "7",
|
|
743
|
+
"when": 1794515341853,
|
|
744
|
+
"tag": "0105_attachment_uploads",
|
|
745
|
+
"breakpoints": true
|
|
746
|
+
},
|
|
747
|
+
{
|
|
748
|
+
"idx": 106,
|
|
749
|
+
"version": "7",
|
|
750
|
+
"when": 1794521047106,
|
|
751
|
+
"tag": "0106_conversation_agent_config",
|
|
752
|
+
"breakpoints": true
|
|
732
753
|
}
|
|
733
754
|
]
|
|
734
755
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/junior",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.299.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"web-push": "^3.6.7",
|
|
96
96
|
"yaml": "^2.9.0",
|
|
97
97
|
"zod": "^4.5.4",
|
|
98
|
-
"@sentry/junior-plugin-api": "0.
|
|
98
|
+
"@sentry/junior-plugin-api": "0.299.0"
|
|
99
99
|
},
|
|
100
100
|
"peerDependencies": {
|
|
101
101
|
"bullmq": "^6.5.0",
|
|
@@ -131,8 +131,8 @@
|
|
|
131
131
|
"typescript": "^7.0.2",
|
|
132
132
|
"vercel": "^54.4.0",
|
|
133
133
|
"vitest": "^4.1.12",
|
|
134
|
-
"@sentry/junior-
|
|
135
|
-
"@sentry/junior-
|
|
134
|
+
"@sentry/junior-memory": "0.299.0",
|
|
135
|
+
"@sentry/junior-github": "0.299.0",
|
|
136
136
|
"@sentry/junior-testing": "0.0.0"
|
|
137
137
|
},
|
|
138
138
|
"scripts": {
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { o as isUserActor } from "./actor-6jsm_v96.js";
|
|
2
|
-
// src/chat/task-execution/attempt-selection.ts
|
|
3
|
-
function inputOwner(message) {
|
|
4
|
-
return {
|
|
5
|
-
authorId: message.input.authorId,
|
|
6
|
-
identityId: message.input.authorIdentityId,
|
|
7
|
-
source: message.source
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
function turnOwner(turn) {
|
|
11
|
-
return {
|
|
12
|
-
authorId: isUserActor(turn.actor) ? turn.actor.userId : void 0,
|
|
13
|
-
identityId: turn.actorIdentityId,
|
|
14
|
-
source: turn.source?.kind
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* One Turn has one Actor and one Source: it runs with that Actor's
|
|
19
|
-
* credentials, so input from anyone else must not join it. Every value that
|
|
20
|
-
* both sides know must match, and they must share an Identity id or an author
|
|
21
|
-
* id. Input with no known author matches nothing.
|
|
22
|
-
*/
|
|
23
|
-
function hasSameOwner(a, b) {
|
|
24
|
-
if (a.source && b.source && a.source !== b.source) return false;
|
|
25
|
-
const sameIdentity = a.identityId && b.identityId ? a.identityId === b.identityId : void 0;
|
|
26
|
-
const sameAuthor = a.authorId && b.authorId ? a.authorId === b.authorId : void 0;
|
|
27
|
-
return sameIdentity !== false && sameAuthor !== false && (sameIdentity ?? sameAuthor) === true;
|
|
28
|
-
}
|
|
29
|
-
/** True when two Inbound messages may share one Turn. */
|
|
30
|
-
function canShareTurn(a, b) {
|
|
31
|
-
return hasSameOwner(inputOwner(a), inputOwner(b));
|
|
32
|
-
}
|
|
33
|
-
/** True when an Inbound message may join `turn`. */
|
|
34
|
-
function canJoinTurn(turn, message) {
|
|
35
|
-
return hasSameOwner(turnOwner(turn), inputOwner(message));
|
|
36
|
-
}
|
|
37
|
-
function selectContiguousTurnBatch(messages) {
|
|
38
|
-
const first = messages[0];
|
|
39
|
-
if (!first) return [];
|
|
40
|
-
const nextTurnIndex = messages.findIndex((message, index) => index > 0 && !canShareTurn(first, message));
|
|
41
|
-
return messages.slice(0, nextTurnIndex === -1 ? messages.length : nextTurnIndex);
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* True when an interrupt can start its own attempt.
|
|
45
|
-
*
|
|
46
|
-
* A steered web message must not start a second Turn while a yielded Turn
|
|
47
|
-
* waits to resume. It stays pending for that Turn's drain or the next attempt.
|
|
48
|
-
*/
|
|
49
|
-
function isAttemptInterrupt(message, work) {
|
|
50
|
-
return message.delivery === "interrupt" && !(work.execution.status === "paused" && message.source === "web");
|
|
51
|
-
}
|
|
52
|
-
/** Prioritize interrupts while keeping each attempt to one Actor and Source. */
|
|
53
|
-
function selectAttemptMessages(work) {
|
|
54
|
-
const messages = work.messages;
|
|
55
|
-
const interrupts = messages.filter((message) => isAttemptInterrupt(message, work));
|
|
56
|
-
if (interrupts.length > 0) return selectContiguousTurnBatch(interrupts);
|
|
57
|
-
if (work.execution.status === "paused") return [];
|
|
58
|
-
const nonEventMessages = messages.filter((message) => message.source !== "event");
|
|
59
|
-
return selectContiguousTurnBatch(nonEventMessages.length > 0 ? nonEventMessages : messages);
|
|
60
|
-
}
|
|
61
|
-
export { selectAttemptMessages as i, canShareTurn as n, isAttemptInterrupt as r, canJoinTurn as t };
|
package/dist/locks-D-0h111u.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { setTimeout } from "node:timers/promises";
|
|
2
|
-
// src/chat/state/locks.ts
|
|
3
|
-
const ACTIVE_LOCK_TTL_MS = 9e4;
|
|
4
|
-
const MUTATION_LOCK_TTL_MS = 1e4;
|
|
5
|
-
/**
|
|
6
|
-
* Acquire a lock for long-running work that the queued state adapter should
|
|
7
|
-
* keep alive while the owning invocation is still making progress.
|
|
8
|
-
*/
|
|
9
|
-
async function acquireActiveLock(state, threadId) {
|
|
10
|
-
return await state.acquireLock(threadId, ACTIVE_LOCK_TTL_MS);
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Run work under one lock, optionally waiting for the current owner.
|
|
14
|
-
* `keepAlive` is for multi-store mutations that must retain ownership until all
|
|
15
|
-
* side effects finish; callers should still fence each blind write.
|
|
16
|
-
*/
|
|
17
|
-
async function withLock(state, key, run, options = {}) {
|
|
18
|
-
const ttlMs = options.ttlMs ?? 9e4;
|
|
19
|
-
const startedAtMs = Date.now();
|
|
20
|
-
let lock;
|
|
21
|
-
while (true) {
|
|
22
|
-
lock = await state.acquireLock(key, ttlMs);
|
|
23
|
-
if (lock) break;
|
|
24
|
-
if (Date.now() - startedAtMs >= (options.waitMs ?? 0)) return { acquired: false };
|
|
25
|
-
await setTimeout(options.retryMs ?? 25, void 0, { ref: false });
|
|
26
|
-
}
|
|
27
|
-
const heartbeat = options.keepAlive ? setInterval(() => void state.extendLock(lock, ttlMs).catch(() => void 0), Math.max(1, Math.floor(ttlMs / 3))) : void 0;
|
|
28
|
-
heartbeat?.unref();
|
|
29
|
-
try {
|
|
30
|
-
return {
|
|
31
|
-
acquired: true,
|
|
32
|
-
value: await run(lock)
|
|
33
|
-
};
|
|
34
|
-
} finally {
|
|
35
|
-
if (heartbeat) clearInterval(heartbeat);
|
|
36
|
-
await state.releaseLock(lock);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Prove lock ownership immediately before a blind write.
|
|
41
|
-
*
|
|
42
|
-
* Whole-record mutations must stop if their lock expired rather than overwrite
|
|
43
|
-
* state committed by a newer owner.
|
|
44
|
-
*/
|
|
45
|
-
async function fenceLock(state, lock, ttlMs = MUTATION_LOCK_TTL_MS) {
|
|
46
|
-
if (!await state.extendLock(lock, ttlMs)) throw new Error(`Lock ownership was lost before write for ${lock.threadId}`);
|
|
47
|
-
}
|
|
48
|
-
export { withLock as a, fenceLock as i, MUTATION_LOCK_TTL_MS as n, acquireActiveLock as r, ACTIVE_LOCK_TTL_MS as t };
|