@sentry/junior 0.287.0 → 0.289.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-CL-HUKgd.js → adapter-tE1wnl0T.js} +1 -1
- package/dist/{admin-C9urXVfi.js → admin-BmsPbmO_.js} +2 -2
- package/dist/{agent-runner-Bfnw551N.js → agent-runner-bvl8U5uH.js} +489 -165
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +7 -7
- package/dist/api.d.ts +1 -1
- package/dist/api.js +628 -238
- package/dist/{app-DBY5TnfY.d.ts → app-Cu454FXq.d.ts} +2 -2
- package/dist/app.d.ts +1 -1
- package/dist/app.js +550 -71
- package/dist/assistant-reply-1N9oxyyb.js +58 -0
- package/dist/{automation-DksGNDRO.js → automation-DWbjJltM.js} +2 -2
- package/dist/{background-compaction-queue-CYI909P5.js → background-compaction-queue-D36oCldp.js} +161 -90
- package/dist/{briefs-DaXiMWzT.js → briefs-CV-1qkXa.js} +3 -3
- package/dist/{catalog-runtime-BCIuBe4d.js → catalog-runtime-BNK4uJVZ.js} +1 -1
- package/dist/cli/chat.js +14 -14
- package/dist/cli/check.js +3 -3
- 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/{config-CkHcUMN7.js → config-DHAy7XlP.js} +363 -8
- package/dist/{connections-BnIj0wtx.js → connections-C3VmH3cf.js} +7 -129
- package/dist/{conversation-E7ZPJx2H.js → conversation-CwC8K3RZ.js} +22 -5
- package/dist/{conversation-pending-messages-DVch6YQw.js → conversation-pending-messages-B0cuLReP.js} +1 -1
- package/dist/{conversation-privacy-DF1hW0ja.js → conversation-privacy-Bky_veSp.js} +1 -1
- package/dist/{credential-sync-CzMar9hq.js → credential-sync-dY9o0YSj.js} +28 -20
- package/dist/{db-DJ11eZqq.js → db-BS2Kql3j.js} +81 -46
- package/dist/{db-YDKKDxlh.d.ts → db-BebRmhsH.d.ts} +10 -2
- package/dist/{executor-BY9TB31g.js → executor-cc4nH86C.js} +125 -18
- package/dist/instrumentation.js +2 -2
- package/dist/{logging-BO5zU6Mt.js → logging-CtCJmt9p.js} +3 -2
- package/dist/{media-Cz1ZiV1U.js → media-BepyEUNm.js} +5 -1
- package/dist/{message-CsUbuEc8.js → message-C5VuRcP9.js} +9 -9
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +19 -41
- package/dist/{oauth-callback-server-hiDKK0_n.js → oauth-callback-server-KRrYUZ35.js} +2 -2
- package/dist/{projection-CL_YWeGf.js → projection-BFJG58TG.js} +448 -721
- package/dist/{prompt-BHOEQSmf.js → prompt-D15oftoL.js} +5 -5
- package/dist/{registry-BriFLnaJ.js → registry-C_JrgqUz.js} +1 -1
- package/dist/{resolve-Bt6GgAiA.js → resolve-Cn_7JfP-.js} +3 -3
- package/dist/{result-Bo1TZu0Q.js → result-CIbQFLp6.js} +16 -10
- package/dist/{runner-D3YeCQgt.js → runner-BwmaMJVO.js} +8 -8
- package/dist/{sandbox-egress-signals-CcnSPP4S.js → sandbox-egress-signals-BOQ8gn7i.js} +1 -1
- package/dist/{schedule-BTp__wrw.js → schedule-cP0AACm1.js} +11 -2
- package/dist/{schema-BWE3RJEB.js → schema-Bptz19Ja.js} +72 -14
- package/dist/{schema-C6fsEwjo.d.ts → schema-DQaFSkZZ.d.ts} +122 -3
- package/dist/{service-account-DiQQuuw7.js → service-account-AGw_pANb.js} +3 -3
- package/dist/{service-account-r6fl0b-9.js → service-account-CLZfF8O1.js} +3 -3
- package/dist/{session-stop-B2Nut40V.js → session-stop-CbzKf7UI.js} +84 -31
- package/dist/{skills-CD5aJdzg.js → skills-CcAJBquq.js} +2 -2
- package/dist/{spawn-CalgZQiu.js → spawn-BvAk2vTI.js} +5 -5
- package/dist/{stop-kujZLbi0.js → stop-BQU4u7la.js} +893 -519
- package/dist/{store-DdIEUL1q.js → store-DE7NJOvQ.js} +4 -16
- package/dist/{task-runner-D_RDr2Hu.js → task-runner-Q_7duP_T.js} +31 -27
- package/dist/{turn-failure-response-B5nV1Er-.js → turn-failure-response-aWZLfUM8.js} +18 -9
- package/dist/{validation-K4pqwoVZ.js → validation-BOoPeIJR.js} +1 -1
- package/dist/{version-DBvhk1X9.js → version-Db0MFy61.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-DrMmFUul.js → viewer-FFEFu9In.js} +4 -4
- package/dist/warmup-DDzrA9Gv.js +967 -0
- package/dist/{work-ljRoODGu.js → work-BBJK458E.js} +16 -15
- package/dist/{worker-CYO1Q0Js.js → worker-2iU5RFyq.js} +7 -31
- package/migrations/0089_conversation_paused_status.sql +3 -0
- package/migrations/0090_guardian_review_time_index.sql +20 -0
- package/migrations/0091_conversation_participant_unsubscribed_index.sql +20 -0
- package/migrations/0092_turn_metric_actor.sql +12 -0
- package/migrations/0093_participant_root_actor_backfill.sql +18 -0
- package/migrations/0094_conversation_delivery_paused_at.sql +1 -0
- package/migrations/meta/0089_snapshot.json +4372 -0
- package/migrations/meta/0090_snapshot.json +4388 -0
- package/migrations/meta/0091_snapshot.json +4410 -0
- package/migrations/meta/0092_snapshot.json +4446 -0
- package/migrations/meta/0093_snapshot.json +4446 -0
- package/migrations/meta/0094_snapshot.json +4452 -0
- package/migrations/meta/_journal.json +42 -0
- package/package.json +6 -5
- package/dist/assistant-reply-u_PRYzuz.js +0 -65
|
@@ -624,6 +624,48 @@
|
|
|
624
624
|
"when": 1794165567814,
|
|
625
625
|
"tag": "0088_conversation_unsubscribe",
|
|
626
626
|
"breakpoints": true
|
|
627
|
+
},
|
|
628
|
+
{
|
|
629
|
+
"idx": 89,
|
|
630
|
+
"version": "7",
|
|
631
|
+
"when": 1794190578909,
|
|
632
|
+
"tag": "0089_conversation_paused_status",
|
|
633
|
+
"breakpoints": true
|
|
634
|
+
},
|
|
635
|
+
{
|
|
636
|
+
"idx": 90,
|
|
637
|
+
"version": "7",
|
|
638
|
+
"when": 1794222953219,
|
|
639
|
+
"tag": "0090_guardian_review_time_index",
|
|
640
|
+
"breakpoints": true
|
|
641
|
+
},
|
|
642
|
+
{
|
|
643
|
+
"idx": 91,
|
|
644
|
+
"version": "7",
|
|
645
|
+
"when": 1794245490321,
|
|
646
|
+
"tag": "0091_conversation_participant_unsubscribed_index",
|
|
647
|
+
"breakpoints": true
|
|
648
|
+
},
|
|
649
|
+
{
|
|
650
|
+
"idx": 92,
|
|
651
|
+
"version": "7",
|
|
652
|
+
"when": 1794248406305,
|
|
653
|
+
"tag": "0092_turn_metric_actor",
|
|
654
|
+
"breakpoints": true
|
|
655
|
+
},
|
|
656
|
+
{
|
|
657
|
+
"idx": 93,
|
|
658
|
+
"version": "7",
|
|
659
|
+
"when": 1794256116275,
|
|
660
|
+
"tag": "0093_participant_root_actor_backfill",
|
|
661
|
+
"breakpoints": true
|
|
662
|
+
},
|
|
663
|
+
{
|
|
664
|
+
"idx": 94,
|
|
665
|
+
"version": "7",
|
|
666
|
+
"when": 1794266800377,
|
|
667
|
+
"tag": "0094_conversation_delivery_paused_at",
|
|
668
|
+
"breakpoints": true
|
|
627
669
|
}
|
|
628
670
|
]
|
|
629
671
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/junior",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.289.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -90,10 +90,11 @@
|
|
|
90
90
|
"p-limit": "^7.3.1",
|
|
91
91
|
"pg": "^8.16.3",
|
|
92
92
|
"sharp": "^0.35.3",
|
|
93
|
+
"undici": "7.30.1",
|
|
93
94
|
"web-push": "^3.6.7",
|
|
94
95
|
"yaml": "^2.9.0",
|
|
95
96
|
"zod": "^4.5.4",
|
|
96
|
-
"@sentry/junior-plugin-api": "0.
|
|
97
|
+
"@sentry/junior-plugin-api": "0.289.0"
|
|
97
98
|
},
|
|
98
99
|
"peerDependencies": {
|
|
99
100
|
"bullmq": "^6.5.0",
|
|
@@ -129,9 +130,9 @@
|
|
|
129
130
|
"typescript": "^7.0.2",
|
|
130
131
|
"vercel": "^54.4.0",
|
|
131
132
|
"vitest": "^4.1.12",
|
|
132
|
-
"@sentry/junior-
|
|
133
|
-
"@sentry/junior-github": "0.
|
|
134
|
-
"@sentry/junior-
|
|
133
|
+
"@sentry/junior-testing": "0.0.0",
|
|
134
|
+
"@sentry/junior-github": "0.289.0",
|
|
135
|
+
"@sentry/junior-memory": "0.289.0"
|
|
135
136
|
},
|
|
136
137
|
"scripts": {
|
|
137
138
|
"build": "tsdown",
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { Xt as extractAssistantText } from "./projection-CL_YWeGf.js";
|
|
2
|
-
// src/chat/no-reply.ts
|
|
3
|
-
const NO_REPLY_MARKER = "[[NO_REPLY]]";
|
|
4
|
-
/**
|
|
5
|
-
* Trailing marker for a Quiet message: an Event Turn reply that Junior stores
|
|
6
|
-
* but does not deliver to the Location.
|
|
7
|
-
*/
|
|
8
|
-
const QUIET_MARKER = "[[QUIET]]";
|
|
9
|
-
/**
|
|
10
|
-
* True when one assistant message ends with the silence marker, or is only
|
|
11
|
-
* the quiet marker. Mid-sentence mentions do not match. Detection is per
|
|
12
|
-
* message only.
|
|
13
|
-
*/
|
|
14
|
-
function isNoReplyMarker(text) {
|
|
15
|
-
const trimmed = text.trim();
|
|
16
|
-
return trimmed.endsWith("[[NO_REPLY]]") || trimmed === "[[QUIET]]";
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Return the text before a trailing quiet marker, or undefined when the text
|
|
20
|
-
* does not end with one. Mid-sentence mentions do not match.
|
|
21
|
-
*/
|
|
22
|
-
function stripQuietMarker(text) {
|
|
23
|
-
const trimmed = text.trimEnd();
|
|
24
|
-
if (!trimmed.endsWith("[[QUIET]]")) return void 0;
|
|
25
|
-
return trimmed.slice(0, -9).trimEnd();
|
|
26
|
-
}
|
|
27
|
-
// src/chat/services/assistant-reply.ts
|
|
28
|
-
const THINKING_XML_BLOCK_PATTERN = /[ \t]*<thinking\b[^>]*>[\s\S]*?<\/thinking>[ \t]*(?:\r?\n)?/gi;
|
|
29
|
-
const FENCED_CODE_BLOCK_PATTERN = /```[\s\S]*?```/g;
|
|
30
|
-
/** Remove provider reasoning wrappers while preserving fenced code examples. */
|
|
31
|
-
function sanitizeAssistantText(text) {
|
|
32
|
-
let result = "";
|
|
33
|
-
let cursor = 0;
|
|
34
|
-
for (const match of text.matchAll(FENCED_CODE_BLOCK_PATTERN)) {
|
|
35
|
-
const start = match.index;
|
|
36
|
-
if (start === void 0) continue;
|
|
37
|
-
result += text.slice(cursor, start).replace(THINKING_XML_BLOCK_PATTERN, "");
|
|
38
|
-
result += match[0];
|
|
39
|
-
cursor = start + match[0].length;
|
|
40
|
-
}
|
|
41
|
-
return (result + text.slice(cursor).replace(THINKING_XML_BLOCK_PATTERN, "")).trim();
|
|
42
|
-
}
|
|
43
|
-
/** Decide whether one completed assistant message becomes a reply. */
|
|
44
|
-
function decideReply(message) {
|
|
45
|
-
if (message.content.some((part) => part.type === "toolCall")) return { kind: "suppress" };
|
|
46
|
-
const text = sanitizeAssistantText(extractAssistantText(message));
|
|
47
|
-
if (!text) return { kind: "empty" };
|
|
48
|
-
if (isNoReplyMarker(text)) return { kind: "suppress" };
|
|
49
|
-
const quietText = stripQuietMarker(text);
|
|
50
|
-
if (quietText === void 0) return {
|
|
51
|
-
kind: "deliver",
|
|
52
|
-
text
|
|
53
|
-
};
|
|
54
|
-
return {
|
|
55
|
-
kind: "deliver",
|
|
56
|
-
text: quietText,
|
|
57
|
-
quiet: true
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
/** Return destination-visible reply text when the message is deliverable. */
|
|
61
|
-
function getAssistantReplyText(message) {
|
|
62
|
-
const decision = decideReply(message);
|
|
63
|
-
return decision.kind === "deliver" ? decision.text : void 0;
|
|
64
|
-
}
|
|
65
|
-
export { QUIET_MARKER as a, NO_REPLY_MARKER as i, getAssistantReplyText as n, isNoReplyMarker as o, sanitizeAssistantText as r, decideReply as t };
|