@sentry/junior 0.144.0 → 0.145.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-GCUTGKY3.js → agent-hooks-L7D2BDVV.js} +10 -10
- package/dist/api/conversations/detail.d.ts +1 -0
- package/dist/api/schema/conversation.d.ts +2 -0
- package/dist/api/schema.js +1 -1
- package/dist/api.js +40 -22
- package/dist/app.js +335 -409
- package/dist/{catalog-runtime-DWVYKDC6.js → catalog-runtime-QLAC4Q3W.js} +5 -5
- package/dist/chat/agent/request.d.ts +1 -1
- package/dist/chat/agent/resume.d.ts +6 -15
- package/dist/chat/agent/tools.d.ts +1 -1
- package/dist/chat/agent-dispatch/types.d.ts +1 -1
- package/dist/chat/app/conversation-work.d.ts +24 -0
- package/dist/chat/conversations/projection.d.ts +11 -3
- package/dist/chat/conversations/store.d.ts +1 -1
- package/dist/chat/runtime/agent-run-outcome.d.ts +1 -1
- package/dist/chat/runtime/reply-executor.d.ts +5 -5
- package/dist/chat/runtime/slack-resume.d.ts +12 -4
- package/dist/chat/state/locks.d.ts +28 -0
- package/dist/chat/task-execution/checkpoint.d.ts +86 -0
- package/dist/chat/task-execution/paused-turn.d.ts +29 -0
- package/dist/chat/task-execution/queue-signing.d.ts +1 -0
- package/dist/chat/task-execution/queue.d.ts +7 -1
- package/dist/chat/task-execution/slack-work.d.ts +1 -1
- package/dist/chat/task-execution/state.d.ts +4 -4
- package/dist/chat/task-execution/store.d.ts +2 -2
- package/dist/chat/task-execution/turn-cursor-keys.d.ts +6 -0
- package/dist/chat/{state/turn-session.d.ts → task-execution/turn-cursor.d.ts} +52 -42
- package/dist/chat/task-execution/turn-wake.d.ts +29 -0
- package/dist/chat/tools/types.d.ts +1 -1
- package/dist/{chunk-HNO2E5WB.js → chunk-27TEJTZO.js} +1 -1
- package/dist/{chunk-RIFJUJSI.js → chunk-2LWPFSB4.js} +1 -1
- package/dist/{chunk-SBZP2J5Q.js → chunk-2UH3JI64.js} +10 -9
- package/dist/{chunk-QUZJDAQQ.js → chunk-2XET6PKP.js} +93 -89
- package/dist/{chunk-SUK7NC5A.js → chunk-5PNPQYTO.js} +2 -2
- package/dist/{chunk-SSDTQDYQ.js → chunk-64SBYW2O.js} +132 -127
- package/dist/{chunk-DVO5VKYQ.js → chunk-B46ZMVOV.js} +5 -5
- package/dist/{chunk-A67GZN73.js → chunk-CD2XFGYQ.js} +1 -1
- package/dist/{chunk-WTX2RFJG.js → chunk-DS3J6WGY.js} +1 -1
- package/dist/{chunk-PKH6762I.js → chunk-DXEQAIUV.js} +1 -1
- package/dist/{chunk-WSOLZJJS.js → chunk-EIX2LQ6L.js} +3 -3
- package/dist/{chunk-KQBXT5B7.js → chunk-FUBRJA5F.js} +6 -6
- package/dist/{chunk-I44JB7HQ.js → chunk-GDV5LXRA.js} +1 -1
- package/dist/{chunk-7KAW7UF4.js → chunk-GUWLDMGF.js} +4 -4
- package/dist/{chunk-PELZ2ZSY.js → chunk-HISR3DTV.js} +33 -61
- package/dist/{chunk-HD6BHR25.js → chunk-HLOUZC5C.js} +32 -34
- package/dist/{chunk-BBCWYXHB.js → chunk-I47UGQPJ.js} +7 -7
- package/dist/{chunk-IUFM5JWV.js → chunk-JAL3CH4G.js} +3 -0
- package/dist/{chunk-E7HCWOHG.js → chunk-JLMVCNXL.js} +2 -1
- package/dist/{chunk-STFCL3K4.js → chunk-JTGS3ZZE.js} +1 -1
- package/dist/{chunk-GKA74DRA.js → chunk-LVVSIMBB.js} +1 -1
- package/dist/{chunk-SHEEZSLY.js → chunk-PJ4NMVQB.js} +2 -2
- package/dist/{chunk-W7JFV5SB.js → chunk-QJBDABQA.js} +14 -17
- package/dist/{chunk-UDQMY6RS.js → chunk-QUG4JSZK.js} +43 -1
- package/dist/{chunk-4X5KM7Z6.js → chunk-RUSS62EN.js} +14 -14
- package/dist/{chunk-ZF3N3JD6.js → chunk-SIN3MXH6.js} +1 -1
- package/dist/{chunk-QE3TICD4.js → chunk-TZRXYWRE.js} +2 -2
- package/dist/{chunk-CNTWB2SM.js → chunk-VTDMB7XX.js} +1 -1
- package/dist/{chunk-LDWNYCZ6.js → chunk-WF5HVH3M.js} +1 -1
- package/dist/{chunk-KCBZSJRU.js → chunk-WR76IVA5.js} +5 -2
- package/dist/{chunk-3GU4PWA3.js → chunk-XFKIRN3Q.js} +29 -29
- package/dist/{chunk-ZZCTGAIT.js → chunk-YD54Q45G.js} +4 -4
- package/dist/{chunk-BEGGFVFR.js → chunk-ZIAMN2UW.js} +407 -523
- package/dist/{chunk-44RJWAND.js → chunk-ZIMRGFYL.js} +6 -6
- package/dist/{chunk-54JMYQYS.js → chunk-ZYAJMESY.js} +2 -2
- package/dist/cli/chat.js +32 -32
- 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-EFLHTBU6.js → db-62PW6LM3.js} +7 -7
- package/dist/instrumentation.js +4 -4
- package/dist/nitro.js +4 -4
- package/dist/{oauth-callback-server-RO3IQKWM.js → oauth-callback-server-6NZNHJAM.js} +25 -25
- package/dist/{runner-LOWW7JKA.js → runner-GCRPG3GQ.js} +19 -18
- package/dist/{skills-ZLMUG7AE.js → skills-2S3MDFIQ.js} +6 -6
- package/dist/spawn-7WK37BTD.js +39 -0
- package/dist/{validation-MAKEZNTS.js → validation-HAOLCJ5A.js} +6 -6
- package/dist/version.js +1 -1
- package/dist/{work-5OAGC3I4.js → work-R4XYKMUW.js} +17 -16
- package/dist/worker-U2UCVR7M.js +24 -0
- package/package.json +4 -4
- package/dist/chat/agent/session.d.ts +0 -19
- package/dist/chat/runtime/agent-continue-runner.d.ts +0 -37
- package/dist/chat/services/agent-continue.d.ts +0 -29
- package/dist/chat/services/turn-session-record.d.ts +0 -164
- package/dist/chat/state/turn-session-keys.d.ts +0 -6
- package/dist/spawn-R3LUV6RF.js +0 -38
- package/dist/worker-KTGGRTTP.js +0 -24
|
@@ -16,22 +16,22 @@ import {
|
|
|
16
16
|
recordAttemptFailure,
|
|
17
17
|
recordConversationRetry,
|
|
18
18
|
releaseConversationWork,
|
|
19
|
-
|
|
19
|
+
requestAnotherSlice,
|
|
20
20
|
startConversationWork
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-HLOUZC5C.js";
|
|
22
22
|
import {
|
|
23
23
|
ConversationQueueMessageRejectedError
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-JAL3CH4G.js";
|
|
25
25
|
import {
|
|
26
26
|
getChatConfig,
|
|
27
27
|
isProviderRetryError
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-XFKIRN3Q.js";
|
|
29
29
|
import {
|
|
30
30
|
logException,
|
|
31
31
|
logInfo,
|
|
32
32
|
logWarn,
|
|
33
33
|
withLogContext
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-2LWPFSB4.js";
|
|
35
35
|
|
|
36
36
|
// src/chat/task-execution/worker.ts
|
|
37
37
|
var CONVERSATION_WORK_DEFER_DELAY_MS = 15e3;
|
|
@@ -59,7 +59,7 @@ function selectAttemptMessages(work) {
|
|
|
59
59
|
if (interrupts.length > 0) {
|
|
60
60
|
return selectContiguousActorBatch(interrupts);
|
|
61
61
|
}
|
|
62
|
-
return work.execution.status === "
|
|
62
|
+
return work.execution.status === "paused" ? [] : selectContiguousActorBatch(messages);
|
|
63
63
|
}
|
|
64
64
|
function nudgeIdempotencyKey(reason, conversationId, nowMs) {
|
|
65
65
|
return `${reason}:${conversationId}:${nowMs}`;
|
|
@@ -91,7 +91,7 @@ async function requestLostLeaseRecovery(args) {
|
|
|
91
91
|
);
|
|
92
92
|
return;
|
|
93
93
|
}
|
|
94
|
-
const
|
|
94
|
+
const sliceRequested = await requestAnotherSlice({
|
|
95
95
|
conversationId: args.conversationId,
|
|
96
96
|
destination: args.destination,
|
|
97
97
|
leaseToken: args.leaseToken,
|
|
@@ -99,7 +99,7 @@ async function requestLostLeaseRecovery(args) {
|
|
|
99
99
|
nowMs: args.nowMs,
|
|
100
100
|
state: args.options.state
|
|
101
101
|
});
|
|
102
|
-
if (!
|
|
102
|
+
if (!sliceRequested) {
|
|
103
103
|
return;
|
|
104
104
|
}
|
|
105
105
|
const released = await releaseConversationWork({
|
|
@@ -343,7 +343,7 @@ async function processConversationWorkInContext(message, options) {
|
|
|
343
343
|
});
|
|
344
344
|
return { status: "lost_lease" };
|
|
345
345
|
}
|
|
346
|
-
const resumePending = leasedWork.execution.status === "
|
|
346
|
+
const resumePending = leasedWork.execution.status === "paused";
|
|
347
347
|
const attemptMessages = selectAttemptMessages(leasedWork);
|
|
348
348
|
attemptStartMessageIds = new Set(
|
|
349
349
|
leasedWork.messages.map((message2) => message2.inboundMessageId)
|
|
@@ -433,7 +433,7 @@ async function processConversationWorkInContext(message, options) {
|
|
|
433
433
|
return { status: "lost_lease" };
|
|
434
434
|
}
|
|
435
435
|
if (result.status === "yielded") {
|
|
436
|
-
const
|
|
436
|
+
const sliceRequested = await requestAnotherSlice({
|
|
437
437
|
conversationId,
|
|
438
438
|
destination,
|
|
439
439
|
leaseToken: lease.leaseToken,
|
|
@@ -441,7 +441,7 @@ async function processConversationWorkInContext(message, options) {
|
|
|
441
441
|
nowMs: now(options),
|
|
442
442
|
state: options.state
|
|
443
443
|
});
|
|
444
|
-
if (!
|
|
444
|
+
if (!sliceRequested) {
|
|
445
445
|
return { status: "lost_lease" };
|
|
446
446
|
}
|
|
447
447
|
return await yieldWork();
|
|
@@ -514,7 +514,7 @@ async function processConversationWorkInContext(message, options) {
|
|
|
514
514
|
if (!next || next.lease?.leaseToken !== lease.leaseToken) {
|
|
515
515
|
return { status: "lost_lease" };
|
|
516
516
|
}
|
|
517
|
-
if (next.execution.status !== "
|
|
517
|
+
if (next.execution.status !== "paused" && countPendingConversationMessages(next) === 0) {
|
|
518
518
|
break;
|
|
519
519
|
}
|
|
520
520
|
}
|
|
@@ -613,7 +613,7 @@ async function processConversationWorkInContext(message, options) {
|
|
|
613
613
|
recoveryRecorded = true;
|
|
614
614
|
return { status: "failed" };
|
|
615
615
|
}
|
|
616
|
-
const
|
|
616
|
+
const sliceRequested = await requestAnotherSlice({
|
|
617
617
|
conversationId,
|
|
618
618
|
destination,
|
|
619
619
|
leaseToken: lease.leaseToken,
|
|
@@ -621,7 +621,7 @@ async function processConversationWorkInContext(message, options) {
|
|
|
621
621
|
nowMs: errorNowMs,
|
|
622
622
|
state: options.state
|
|
623
623
|
});
|
|
624
|
-
if (
|
|
624
|
+
if (sliceRequested) {
|
|
625
625
|
await ensureConversationWake({
|
|
626
626
|
conversationId,
|
|
627
627
|
conversationStore: options.conversationStore,
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-EM225ITJ.js";
|
|
4
4
|
import {
|
|
5
5
|
getSlackBotToken
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-XFKIRN3Q.js";
|
|
7
7
|
import {
|
|
8
8
|
parseSlackChannelReferenceId
|
|
9
9
|
} from "./chunk-F3B2YJ76.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
setSpanAttributes,
|
|
13
13
|
setSpanStatus,
|
|
14
14
|
withSpan
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-2LWPFSB4.js";
|
|
16
16
|
|
|
17
17
|
// src/chat/slack/client.ts
|
|
18
18
|
import { AsyncLocalStorage as AsyncLocalStorage2 } from "async_hooks";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
conversationQueueMessageSchema
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JAL3CH4G.js";
|
|
4
4
|
import {
|
|
5
5
|
createVercelQueueClient
|
|
6
6
|
} from "./chunk-5I6ORJUY.js";
|
|
@@ -79,7 +79,10 @@ function verifyConversationQueueMessage(value, nowMs = Date.now()) {
|
|
|
79
79
|
}
|
|
80
80
|
return {
|
|
81
81
|
status: "verified",
|
|
82
|
-
message: {
|
|
82
|
+
message: {
|
|
83
|
+
schemaVersion: message.schemaVersion,
|
|
84
|
+
conversationId: message.conversationId
|
|
85
|
+
}
|
|
83
86
|
};
|
|
84
87
|
}
|
|
85
88
|
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
toCanonicalInputMessage,
|
|
4
4
|
toCanonicalOutputMessage,
|
|
5
5
|
toGenAiMessagesTraceAttributes
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-JTGS3ZZE.js";
|
|
7
7
|
import {
|
|
8
8
|
extractGenAiUsageAttributes,
|
|
9
9
|
logException,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
normalizeGenAiFinishReason,
|
|
12
12
|
serializeGenAiAttribute,
|
|
13
13
|
withSpan
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-2LWPFSB4.js";
|
|
15
15
|
|
|
16
16
|
// src/chat/services/provider-error.ts
|
|
17
17
|
var ProviderError = class extends Error {
|
|
@@ -195,31 +195,6 @@ function getProviderErrorAttributes(error) {
|
|
|
195
195
|
};
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
-
// src/chat/model-profile.ts
|
|
199
|
-
import { z } from "zod";
|
|
200
|
-
var STANDARD_MODEL_PROFILE = "standard";
|
|
201
|
-
var DEFAULT_HANDOFF_MODEL_PROFILE = "handoff";
|
|
202
|
-
var modelProfileSchema = z.string().regex(/^[a-z][a-z0-9_-]*$/);
|
|
203
|
-
var ModelProfileNotConfiguredError = class extends Error {
|
|
204
|
-
constructor(profile) {
|
|
205
|
-
super(`Model profile "${profile}" is not configured`);
|
|
206
|
-
this.name = "ModelProfileNotConfiguredError";
|
|
207
|
-
}
|
|
208
|
-
};
|
|
209
|
-
function modelIdForProfile(config, profile) {
|
|
210
|
-
return profileConfig(config, profile).modelId;
|
|
211
|
-
}
|
|
212
|
-
function standardModelId(config) {
|
|
213
|
-
return modelIdForProfile(config, STANDARD_MODEL_PROFILE);
|
|
214
|
-
}
|
|
215
|
-
function profileConfig(config, profile) {
|
|
216
|
-
const profileConfig2 = Object.hasOwn(config.profiles, profile) ? config.profiles[profile] : void 0;
|
|
217
|
-
if (!profileConfig2) {
|
|
218
|
-
throw new ModelProfileNotConfiguredError(profile);
|
|
219
|
-
}
|
|
220
|
-
return profileConfig2;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
198
|
// src/chat/config.ts
|
|
224
199
|
import { getModel as getModel2 } from "@earendil-works/pi-ai/compat";
|
|
225
200
|
|
|
@@ -677,7 +652,7 @@ function normalizeSlackEmojiName(value) {
|
|
|
677
652
|
}
|
|
678
653
|
|
|
679
654
|
// src/chat/reasoning-level.ts
|
|
680
|
-
import { z
|
|
655
|
+
import { z } from "zod";
|
|
681
656
|
var TURN_REASONING_LEVELS = [
|
|
682
657
|
"none",
|
|
683
658
|
"low",
|
|
@@ -686,7 +661,32 @@ var TURN_REASONING_LEVELS = [
|
|
|
686
661
|
"xhigh"
|
|
687
662
|
];
|
|
688
663
|
function parseTurnReasoningLevel(value) {
|
|
689
|
-
return
|
|
664
|
+
return z.enum(TURN_REASONING_LEVELS).parse(value);
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
// src/chat/model-profile.ts
|
|
668
|
+
import { z as z2 } from "zod";
|
|
669
|
+
var STANDARD_MODEL_PROFILE = "standard";
|
|
670
|
+
var DEFAULT_HANDOFF_MODEL_PROFILE = "handoff";
|
|
671
|
+
var modelProfileSchema = z2.string().regex(/^[a-z][a-z0-9_-]*$/);
|
|
672
|
+
var ModelProfileNotConfiguredError = class extends Error {
|
|
673
|
+
constructor(profile) {
|
|
674
|
+
super(`Model profile "${profile}" is not configured`);
|
|
675
|
+
this.name = "ModelProfileNotConfiguredError";
|
|
676
|
+
}
|
|
677
|
+
};
|
|
678
|
+
function modelIdForProfile(config, profile) {
|
|
679
|
+
return profileConfig(config, profile).modelId;
|
|
680
|
+
}
|
|
681
|
+
function standardModelId(config) {
|
|
682
|
+
return modelIdForProfile(config, STANDARD_MODEL_PROFILE);
|
|
683
|
+
}
|
|
684
|
+
function profileConfig(config, profile) {
|
|
685
|
+
const profileConfig2 = Object.hasOwn(config.profiles, profile) ? config.profiles[profile] : void 0;
|
|
686
|
+
if (!profileConfig2) {
|
|
687
|
+
throw new ModelProfileNotConfiguredError(profile);
|
|
688
|
+
}
|
|
689
|
+
return profileConfig2;
|
|
690
690
|
}
|
|
691
691
|
|
|
692
692
|
// src/chat/config.ts
|
|
@@ -4,22 +4,22 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
canRouteResourceEvents,
|
|
6
6
|
getPlugins
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ZIMRGFYL.js";
|
|
8
8
|
import {
|
|
9
9
|
getDb
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-2UH3JI64.js";
|
|
11
11
|
import {
|
|
12
12
|
juniorEventTasks,
|
|
13
13
|
juniorSchedulerRuns,
|
|
14
14
|
juniorSchedulerTasks,
|
|
15
15
|
juniorStats
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-27TEJTZO.js";
|
|
17
17
|
import {
|
|
18
18
|
juniorDestinations
|
|
19
19
|
} from "./chunk-VFUK3X5B.js";
|
|
20
20
|
import {
|
|
21
21
|
logInfo
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-2LWPFSB4.js";
|
|
23
23
|
|
|
24
24
|
// src/chat/event-tasks/store.ts
|
|
25
25
|
import { and, asc, desc, eq, inArray, or, sql } from "drizzle-orm";
|