@sentry/junior 0.148.0 → 0.149.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/{agent-hooks-VAUYT6PD.js → agent-hooks-CWMCXAMT.js} +10 -10
- package/dist/api/conversations/aggregate.d.ts +2 -0
- package/dist/api/conversations/create.d.ts +1 -1
- package/dist/api/conversations/pending-messages.d.ts +15 -0
- package/dist/api/people/shared.d.ts +2 -0
- package/dist/api/schema/conversation.d.ts +78 -4
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +7 -1
- package/dist/api.js +182 -33
- package/dist/app.js +92 -133
- package/dist/{catalog-runtime-WADOZVTB.js → catalog-runtime-GAW5APVI.js} +5 -5
- package/dist/chat/api-turns/work.d.ts +6 -1
- package/dist/chat/app/services.d.ts +1 -1
- package/dist/chat/runtime/reply-executor.d.ts +0 -2
- package/dist/chat/services/conversation-memory.d.ts +2 -2
- package/dist/chat/services/conversation-title.d.ts +20 -0
- package/dist/chat/slack/assistant-thread/title.d.ts +10 -27
- package/dist/chat/state/conversation.d.ts +1 -0
- package/dist/{chunk-2B3PT3V2.js → chunk-25SC7D6Z.js} +1 -1
- package/dist/{chunk-POSZWRGL.js → chunk-2JHKISQA.js} +1 -1
- package/dist/{chunk-VY6W3T43.js → chunk-2P6BQQER.js} +4 -4
- package/dist/{chunk-4GXJUYJV.js → chunk-32CXPIZE.js} +2 -2
- package/dist/{chunk-VRHTNBA6.js → chunk-3GYZ5YEH.js} +3 -3
- package/dist/{chunk-D3WPMGEX.js → chunk-3I2IVWSZ.js} +1 -1
- package/dist/{chunk-45LOR4PU.js → chunk-3JVUWLR7.js} +45 -1
- package/dist/{chunk-LE5H7LMT.js → chunk-3KGQOKIG.js} +1 -1
- package/dist/{chunk-4AQZYNHM.js → chunk-4JGM7FXO.js} +2 -2
- package/dist/{chunk-IL4EDBMV.js → chunk-4YKPOYRV.js} +5 -5
- package/dist/{chunk-ZPL2RR7F.js → chunk-5CWUQXXT.js} +28 -20
- package/dist/{chunk-LAZGHEYU.js → chunk-6G5RCDKP.js} +1 -1
- package/dist/{chunk-ULAU5ZGU.js → chunk-75DSYFFB.js} +24 -24
- package/dist/{chunk-ZCHIC2GM.js → chunk-7BH46NB4.js} +6 -6
- package/dist/{chunk-7OEIXFC3.js → chunk-ALJG73MQ.js} +1 -1
- package/dist/{chunk-LNVEIJ2L.js → chunk-ART7P442.js} +5 -5
- package/dist/{chunk-VMNRXKAH.js → chunk-DK5UT6PQ.js} +24 -26
- package/dist/{chunk-VCYSOXON.js → chunk-EW2LNCRL.js} +545 -7
- package/dist/{chunk-DUY5CDAM.js → chunk-EXW76GW4.js} +1 -1
- package/dist/{chunk-WCN4YSH7.js → chunk-JMH3DBM5.js} +6 -6
- package/dist/{chunk-HLPLT3NY.js → chunk-JMSMXXED.js} +8 -4
- package/dist/{chunk-WOONT5ZP.js → chunk-MEMURSBG.js} +1 -1
- package/dist/{chunk-QOWHHM3F.js → chunk-QIW7OQEO.js} +1 -1
- package/dist/{chunk-XJ42NBP5.js → chunk-RB26T3LU.js} +8 -8
- package/dist/{chunk-EAI67NTM.js → chunk-RLVZIWNQ.js} +1 -1
- package/dist/{chunk-V2FXMOEA.js → chunk-SWHPVZBV.js} +2 -2
- package/dist/{chunk-D6YX4NNN.js → chunk-TFBNBXPU.js} +4 -4
- package/dist/{chunk-GXYDVZKM.js → chunk-URDCZAL4.js} +5 -5
- package/dist/{chunk-RRJV5UR5.js → chunk-UZGASGOD.js} +11 -337
- package/dist/{chunk-OJCP3C3J.js → chunk-W7UONUIZ.js} +6 -6
- package/dist/{chunk-HWQGBIH7.js → chunk-X22XXSZA.js} +1 -1
- package/dist/{chunk-EINWQFXI.js → chunk-XPYWWMHR.js} +5 -5
- package/dist/{chunk-55F4QU2V.js → chunk-ZYMYLLWG.js} +1 -1
- package/dist/cli/chat.js +30 -31
- package/dist/cli/check.js +6 -6
- package/dist/cli/plugins.js +13 -13
- package/dist/cli/snapshot-create.js +9 -9
- package/dist/cli/upgrade.js +7 -7
- package/dist/{db-XUKZRFFK.js → db-JBZLRIVY.js} +7 -7
- package/dist/instrumentation.js +4 -4
- package/dist/nitro.js +2 -2
- package/dist/{oauth-callback-server-LPZMMGFI.js → oauth-callback-server-MNTVYY2I.js} +23 -24
- package/dist/{runner-DGKUTMPX.js → runner-K24BWZSZ.js} +21 -22
- package/dist/{skills-P7YUFSXM.js → skills-AU5ST2CG.js} +6 -6
- package/dist/spawn-6PO7CVJ6.js +38 -0
- package/dist/{validation-S7U5M5NR.js → validation-IXGZCFRO.js} +6 -6
- package/dist/version.js +1 -1
- package/dist/{work-GAA7TVAD.js → work-WCZIYILX.js} +17 -17
- package/dist/{worker-JXPJH3QB.js → worker-U2AACBEY.js} +11 -11
- package/package.json +5 -5
- package/dist/chunk-4EA2SFK2.js +0 -137
- package/dist/spawn-DSK3ZEVD.js +0 -38
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CONVERSATION_WORK_DEFER_DELAY_MS,
|
|
3
3
|
processConversationWork
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-TFBNBXPU.js";
|
|
5
|
+
import "./chunk-EXW76GW4.js";
|
|
6
|
+
import "./chunk-JMSMXXED.js";
|
|
7
7
|
import "./chunk-JAL3CH4G.js";
|
|
8
8
|
import "./chunk-3Y47VMHV.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-3GYZ5YEH.js";
|
|
10
|
+
import "./chunk-3I2IVWSZ.js";
|
|
11
|
+
import "./chunk-25SC7D6Z.js";
|
|
12
|
+
import "./chunk-32CXPIZE.js";
|
|
13
13
|
import "./chunk-VFUK3X5B.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-3KGQOKIG.js";
|
|
15
15
|
import "./chunk-HZF5P5UN.js";
|
|
16
16
|
import "./chunk-F3B2YJ76.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-RLVZIWNQ.js";
|
|
18
18
|
import "./chunk-6GWA276C.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-6G5RCDKP.js";
|
|
20
|
+
import "./chunk-ZYMYLLWG.js";
|
|
21
21
|
import "./chunk-MLKGABMK.js";
|
|
22
22
|
export {
|
|
23
23
|
CONVERSATION_WORK_DEFER_DELAY_MS,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/junior",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.149.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"pg": "^8.16.3",
|
|
82
82
|
"yaml": "^2.9.0",
|
|
83
83
|
"zod": "^4.4.3",
|
|
84
|
-
"@sentry/junior-plugin-api": "0.
|
|
84
|
+
"@sentry/junior-plugin-api": "0.149.0"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
87
|
"@emnapi/core": "^1.10.0",
|
|
@@ -98,9 +98,9 @@
|
|
|
98
98
|
"typescript": "^6.0.3",
|
|
99
99
|
"vercel": "^54.4.0",
|
|
100
100
|
"vitest": "^4.1.7",
|
|
101
|
-
"@sentry/junior-github": "0.
|
|
102
|
-
"@sentry/junior-
|
|
103
|
-
"@sentry/junior-
|
|
101
|
+
"@sentry/junior-github": "0.149.0",
|
|
102
|
+
"@sentry/junior-memory": "0.149.0",
|
|
103
|
+
"@sentry/junior-testing": "0.0.0"
|
|
104
104
|
},
|
|
105
105
|
"scripts": {
|
|
106
106
|
"build": "tsup && tsc -p tsconfig.build.json --emitDeclarationOnly",
|
package/dist/chunk-4EA2SFK2.js
DELETED
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
botConfig,
|
|
3
|
-
resolveGatewayModel
|
|
4
|
-
} from "./chunk-4GXJUYJV.js";
|
|
5
|
-
import {
|
|
6
|
-
logWarn
|
|
7
|
-
} from "./chunk-EAI67NTM.js";
|
|
8
|
-
|
|
9
|
-
// src/chat/services/short-title.ts
|
|
10
|
-
var SHORT_TITLE_MAX_LENGTH = 60;
|
|
11
|
-
var TITLE_PROMPTS = {
|
|
12
|
-
conversation: [
|
|
13
|
-
"Generate a concise 5-8 word Slack conversation title from the first user message below.",
|
|
14
|
-
"Capture the user's main request.",
|
|
15
|
-
"Reply with ONLY the title, with no quotes or trailing punctuation."
|
|
16
|
-
],
|
|
17
|
-
task: [
|
|
18
|
-
"Generate a concise 5-8 word task title from the task instruction below.",
|
|
19
|
-
"Capture the task's main purpose.",
|
|
20
|
-
"Reply with ONLY the title, with no quotes or trailing punctuation."
|
|
21
|
-
]
|
|
22
|
-
};
|
|
23
|
-
function normalizeShortTitle(value) {
|
|
24
|
-
return value.replace(/\s+/g, " ").trim().slice(0, SHORT_TITLE_MAX_LENGTH);
|
|
25
|
-
}
|
|
26
|
-
function fallbackShortTitle(sourceText, fallback = "Untitled") {
|
|
27
|
-
const firstLine = sourceText.split(/\r?\n/).map((line) => line.trim()).find((line) => line.length > 0) ?? "";
|
|
28
|
-
return normalizeShortTitle(firstLine) || fallback;
|
|
29
|
-
}
|
|
30
|
-
async function generateShortTitle(args) {
|
|
31
|
-
const sourceText = args.sourceText.trim();
|
|
32
|
-
if (!sourceText) return void 0;
|
|
33
|
-
try {
|
|
34
|
-
const result = await args.completeText({
|
|
35
|
-
modelId: botConfig.fastModelId,
|
|
36
|
-
temperature: 0,
|
|
37
|
-
promptName: `junior.${args.kind}_title`,
|
|
38
|
-
messages: [
|
|
39
|
-
{
|
|
40
|
-
role: "user",
|
|
41
|
-
content: [
|
|
42
|
-
...TITLE_PROMPTS[args.kind],
|
|
43
|
-
"",
|
|
44
|
-
args.kind === "conversation" ? `First user message: ${sourceText.slice(0, 500)}` : `Task instruction: ${sourceText.slice(0, 500)}`
|
|
45
|
-
].join("\n"),
|
|
46
|
-
timestamp: Date.now()
|
|
47
|
-
}
|
|
48
|
-
],
|
|
49
|
-
metadata: {
|
|
50
|
-
modelId: botConfig.fastModelId
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
const title = normalizeShortTitle(result.text);
|
|
54
|
-
return title || void 0;
|
|
55
|
-
} catch (error) {
|
|
56
|
-
logWarn(`${args.kind}.title.generation.failed`, {
|
|
57
|
-
"exception.message": error instanceof Error ? error.message : String(error)
|
|
58
|
-
});
|
|
59
|
-
return void 0;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
async function resolveTaskTitle(args) {
|
|
63
|
-
const explicit = normalizeShortTitle(args.title ?? "");
|
|
64
|
-
if (explicit) return explicit;
|
|
65
|
-
return generateShortTitle({
|
|
66
|
-
completeText: args.completeText,
|
|
67
|
-
kind: "task",
|
|
68
|
-
sourceText: args.instruction
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
// src/chat/services/context-budget.ts
|
|
73
|
-
var COMPACTION_TRIGGER_RATIO = 0.9;
|
|
74
|
-
var CONTEXT_INPUT_LIMIT_RATIO = 0.95;
|
|
75
|
-
var COMPACTION_TARGET_RATIO = 0.8;
|
|
76
|
-
var FALLBACK_CONTEXT_WINDOW_TOKENS = 4e5;
|
|
77
|
-
function positiveInteger(value, fallback) {
|
|
78
|
-
return Number.isFinite(value) && value > 0 ? Math.floor(value) : fallback;
|
|
79
|
-
}
|
|
80
|
-
function estimateTextTokens(text) {
|
|
81
|
-
return Math.ceil(text.length / 4);
|
|
82
|
-
}
|
|
83
|
-
function calculateContextCompactionTriggerTokens(model) {
|
|
84
|
-
const contextWindow = positiveInteger(
|
|
85
|
-
model.contextWindow,
|
|
86
|
-
FALLBACK_CONTEXT_WINDOW_TOKENS
|
|
87
|
-
);
|
|
88
|
-
return Math.max(1, Math.floor(contextWindow * COMPACTION_TRIGGER_RATIO));
|
|
89
|
-
}
|
|
90
|
-
function calculateContextInputLimitTokens(model) {
|
|
91
|
-
const contextWindow = positiveInteger(
|
|
92
|
-
model.contextWindow,
|
|
93
|
-
FALLBACK_CONTEXT_WINDOW_TOKENS
|
|
94
|
-
);
|
|
95
|
-
return Math.max(1, Math.floor(contextWindow * CONTEXT_INPUT_LIMIT_RATIO));
|
|
96
|
-
}
|
|
97
|
-
function calculateContextCompactionTargetTokens(triggerTokens) {
|
|
98
|
-
return Math.max(1, Math.floor(triggerTokens * COMPACTION_TARGET_RATIO));
|
|
99
|
-
}
|
|
100
|
-
function getModelContextBudget(modelId) {
|
|
101
|
-
const model = resolveGatewayModel(modelId);
|
|
102
|
-
const advertisedContextWindow = positiveInteger(
|
|
103
|
-
model.contextWindow,
|
|
104
|
-
FALLBACK_CONTEXT_WINDOW_TOKENS
|
|
105
|
-
);
|
|
106
|
-
return {
|
|
107
|
-
contextWindow: Math.min(
|
|
108
|
-
botConfig.contextWindowTokens,
|
|
109
|
-
advertisedContextWindow
|
|
110
|
-
)
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
function getAgentContextCompactionTriggerTokens(modelId) {
|
|
114
|
-
return calculateContextCompactionTriggerTokens(
|
|
115
|
-
getModelContextBudget(modelId)
|
|
116
|
-
);
|
|
117
|
-
}
|
|
118
|
-
function getAgentContextInputLimitTokens(modelId) {
|
|
119
|
-
return calculateContextInputLimitTokens(getModelContextBudget(modelId));
|
|
120
|
-
}
|
|
121
|
-
function getConversationContextCompactionTriggerTokens() {
|
|
122
|
-
return calculateContextCompactionTriggerTokens(
|
|
123
|
-
getModelContextBudget(botConfig.fastModelId)
|
|
124
|
-
);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
export {
|
|
128
|
-
SHORT_TITLE_MAX_LENGTH,
|
|
129
|
-
fallbackShortTitle,
|
|
130
|
-
generateShortTitle,
|
|
131
|
-
resolveTaskTitle,
|
|
132
|
-
estimateTextTokens,
|
|
133
|
-
calculateContextCompactionTargetTokens,
|
|
134
|
-
getAgentContextCompactionTriggerTokens,
|
|
135
|
-
getAgentContextInputLimitTokens,
|
|
136
|
-
getConversationContextCompactionTriggerTokens
|
|
137
|
-
};
|
package/dist/spawn-DSK3ZEVD.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
bindSpawnAgent
|
|
3
|
-
} from "./chunk-7OEIXFC3.js";
|
|
4
|
-
import "./chunk-OJCP3C3J.js";
|
|
5
|
-
import "./chunk-HLPLT3NY.js";
|
|
6
|
-
import "./chunk-IL4EDBMV.js";
|
|
7
|
-
import "./chunk-JAL3CH4G.js";
|
|
8
|
-
import "./chunk-EINWQFXI.js";
|
|
9
|
-
import "./chunk-DIB4GX3G.js";
|
|
10
|
-
import "./chunk-GDFF3BQG.js";
|
|
11
|
-
import "./chunk-WCN4YSH7.js";
|
|
12
|
-
import "./chunk-HUO3UTAQ.js";
|
|
13
|
-
import "./chunk-VCYSOXON.js";
|
|
14
|
-
import "./chunk-3Y47VMHV.js";
|
|
15
|
-
import "./chunk-PDO5BLNM.js";
|
|
16
|
-
import "./chunk-V2FXMOEA.js";
|
|
17
|
-
import "./chunk-VRHTNBA6.js";
|
|
18
|
-
import "./chunk-D3WPMGEX.js";
|
|
19
|
-
import "./chunk-EM225ITJ.js";
|
|
20
|
-
import "./chunk-2B3PT3V2.js";
|
|
21
|
-
import "./chunk-4GXJUYJV.js";
|
|
22
|
-
import "./chunk-VFUK3X5B.js";
|
|
23
|
-
import "./chunk-LE5H7LMT.js";
|
|
24
|
-
import "./chunk-HWQGBIH7.js";
|
|
25
|
-
import "./chunk-POSZWRGL.js";
|
|
26
|
-
import "./chunk-RUIXF3YQ.js";
|
|
27
|
-
import "./chunk-HZF5P5UN.js";
|
|
28
|
-
import "./chunk-F3B2YJ76.js";
|
|
29
|
-
import "./chunk-EAI67NTM.js";
|
|
30
|
-
import "./chunk-6GWA276C.js";
|
|
31
|
-
import "./chunk-OOUNJNMR.js";
|
|
32
|
-
import "./chunk-H4HBKISO.js";
|
|
33
|
-
import "./chunk-LAZGHEYU.js";
|
|
34
|
-
import "./chunk-55F4QU2V.js";
|
|
35
|
-
import "./chunk-MLKGABMK.js";
|
|
36
|
-
export {
|
|
37
|
-
bindSpawnAgent
|
|
38
|
-
};
|