@sentry/junior 0.184.0 → 0.186.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-XTZVALGQ.js → agent-hooks-4B3Z4WRK.js} +13 -11
- package/dist/api/acp/schema.d.ts +20 -2
- package/dist/api/code/overview.d.ts +39 -0
- package/dist/api/locations/detail.d.ts +1 -1
- package/dist/api/people/code.d.ts +22 -0
- package/dist/api/schema/code.d.ts +46 -0
- package/dist/api/schema/conversation.d.ts +108 -20
- package/dist/api/schema/location.d.ts +1 -1
- package/dist/api/schema/person.d.ts +1 -1
- package/dist/api/schema.d.ts +4 -4
- package/dist/api/schema.js +12 -1
- package/dist/api.js +368 -78
- package/dist/app.js +1412 -538
- package/dist/{catalog-runtime-5357XR4F.js → catalog-runtime-AFJCAOHC.js} +4 -4
- package/dist/chat/api-turns/accepted-reply.d.ts +11 -0
- package/dist/chat/api-turns/cancellation.d.ts +3 -5
- package/dist/chat/api-turns/mailbox-input.d.ts +7 -0
- package/dist/chat/api-turns/routing.d.ts +18 -3
- package/dist/chat/api-turns/work.d.ts +4 -9
- package/dist/chat/app/conversation-work.d.ts +1 -1
- package/dist/chat/app/factory.d.ts +4 -0
- package/dist/chat/app/services.d.ts +4 -3
- package/dist/chat/conversations/history.d.ts +83 -9
- package/dist/chat/conversations/turn-lifecycle.d.ts +6 -3
- package/dist/chat/providers/slack/input.d.ts +32 -0
- package/dist/chat/{runtime → providers/slack}/processing-reaction.d.ts +6 -8
- package/dist/chat/{runtime/slack-resume.d.ts → providers/slack/resume.d.ts} +16 -19
- package/dist/chat/providers/slack/runtime.d.ts +1 -12
- package/dist/chat/providers/slack/turn.d.ts +10 -25
- package/dist/chat/resource-events/actor.d.ts +7 -2
- package/dist/chat/resource-events/app-publisher.d.ts +18 -0
- package/dist/chat/resource-events/catalog.d.ts +19 -0
- package/dist/chat/resource-events/ingest.d.ts +0 -1
- package/dist/chat/resource-events/notification.d.ts +28 -3
- package/dist/chat/resource-events/runtime-catalog.d.ts +7 -2
- package/dist/chat/resource-events/store.d.ts +2 -14
- package/dist/chat/resource-events/tool-support.d.ts +0 -5
- package/dist/chat/resource-events/workspace.d.ts +7 -3
- package/dist/chat/runtime/turn-execution.d.ts +7 -2
- package/dist/chat/sandbox/egress/credentials.d.ts +5 -4
- package/dist/chat/sandbox/egress/session.d.ts +10 -11
- package/dist/chat/sandbox/errors.d.ts +1 -1
- package/dist/chat/sandbox/ref.d.ts +1 -1
- package/dist/chat/sandbox/snapshot/events.d.ts +8 -1
- package/dist/chat/sandbox/snapshot/not-ready-error.d.ts +6 -1
- package/dist/chat/scheduled-tasks/tool-support.d.ts +5 -5
- package/dist/chat/scheduled-tasks/tools/create.d.ts +2 -2
- package/dist/chat/scheduled-tasks/tools/delete.d.ts +2 -2
- package/dist/chat/scheduled-tasks/tools/list.d.ts +2 -2
- package/dist/chat/scheduled-tasks/tools/run-now.d.ts +2 -2
- package/dist/chat/scheduled-tasks/tools/update.d.ts +2 -2
- package/dist/chat/scheduled-tasks/types.d.ts +1 -1
- package/dist/chat/sentry-links.d.ts +2 -0
- package/dist/chat/services/provider-retry.d.ts +2 -0
- package/dist/chat/services/turn-failure-response.d.ts +4 -0
- package/dist/chat/services/turn-session-routing.d.ts +20 -5
- package/dist/chat/task-execution/paused-turn.d.ts +0 -2
- package/dist/chat/task-execution/slack-resource-event.d.ts +47 -0
- package/dist/chat/task-execution/slack-work.d.ts +0 -21
- package/dist/chat/task-execution/state.d.ts +2 -2
- package/dist/chat/task-execution/store.d.ts +1 -1
- package/dist/chat/task-execution/turn-wake.d.ts +12 -0
- package/dist/chat/tool-support/action-review.d.ts +1 -1
- package/dist/chat/tools/event-tasks.d.ts +1 -1
- package/dist/chat/tools/resource-events.d.ts +2 -2
- package/dist/chat/tools/search-conversation-events.d.ts +1 -1
- package/dist/chat/tools/types.d.ts +1 -1
- package/dist/chat/tools/watch-resource-events.d.ts +2 -2
- package/dist/{chunk-Z3QAXJR7.js → chunk-2IBDVE62.js} +12 -9
- package/dist/{chunk-4RONS3WR.js → chunk-2U7EPTRZ.js} +11 -5
- package/dist/{chunk-3S7ULUWW.js → chunk-3CVEE6LA.js} +1 -1
- package/dist/{chunk-IZDYYYGP.js → chunk-43LODHJM.js} +24 -384
- package/dist/{chunk-LHXIZLFF.js → chunk-64WF2GQ3.js} +1 -1
- package/dist/{chunk-YKX6MTLU.js → chunk-7EOWT62G.js} +1 -1
- package/dist/{chunk-UBOIHNTH.js → chunk-7EU4YSZ4.js} +362 -188
- package/dist/{chunk-UF6BUA5W.js → chunk-ACGWTJ74.js} +3 -3
- package/dist/{chunk-6UDPINOX.js → chunk-AD64YMEC.js} +19 -44
- package/dist/{chunk-MLSQX2EX.js → chunk-BRKB5R7P.js} +1 -1
- package/dist/{chunk-E57WPXWY.js → chunk-CM6RTYSO.js} +5 -5
- package/dist/{chunk-MAPJFUMV.js → chunk-CV5CPRVG.js} +3 -3
- package/dist/chunk-D4YV5TDV.js +45 -0
- package/dist/{chunk-HIPUIPJM.js → chunk-DHYZ4VKG.js} +383 -254
- package/dist/{chunk-DUKIDPF6.js → chunk-DOP3FIQC.js} +1 -1
- package/dist/{chunk-BT53RIGJ.js → chunk-EWRPUXE3.js} +12 -50
- package/dist/{chunk-BHYRYYLY.js → chunk-FFYDRLXW.js} +1 -1
- package/dist/chunk-GFBR4S3Q.js +406 -0
- package/dist/chunk-GQMQCY7H.js +58 -0
- package/dist/{chunk-JNO2GUDS.js → chunk-GSB3NTNS.js} +926 -1856
- package/dist/{chunk-2ZQPVX7C.js → chunk-H7X2G2KS.js} +25 -12
- package/dist/{chunk-WQFEWULF.js → chunk-HKFLRIBD.js} +2 -2
- package/dist/{chunk-SHJK75Z2.js → chunk-HWXP6RHG.js} +38 -4
- package/dist/{chunk-RF6J3DIO.js → chunk-INQHUE72.js} +84 -1
- package/dist/{chunk-4CNDGK25.js → chunk-JFPY6XFF.js} +911 -993
- package/dist/{chunk-6WGC3SO4.js → chunk-MCLWOBPN.js} +80 -18
- package/dist/{chunk-PJPRXO2T.js → chunk-NRMAOGRS.js} +1 -1
- package/dist/{chunk-ACPDVEJO.js → chunk-O6GQO7VP.js} +201 -218
- package/dist/{chunk-M5YWNMTE.js → chunk-OZG7E22Y.js} +24 -6
- package/dist/{chunk-WVIA7V3M.js → chunk-PFAZSRGR.js} +29 -1
- package/dist/{chunk-LCP4EDKR.js → chunk-PZZOGHVR.js} +14 -4
- package/dist/{chunk-QABCY33S.js → chunk-QBL2AVFF.js} +2 -2
- package/dist/{chunk-FKEZZMXS.js → chunk-QU3URVWG.js} +9 -94
- package/dist/{chunk-M3QYTBQ6.js → chunk-STOCCPWH.js} +11 -2
- package/dist/{chunk-K7VDC2QW.js → chunk-TXLBLGNQ.js} +6 -6
- package/dist/{chunk-JA43DV4Y.js → chunk-VOGOTEW7.js} +1 -1
- package/dist/{chunk-HUXFMDBZ.js → chunk-VQIWBJOP.js} +1 -1
- package/dist/{chunk-JM2COLGC.js → chunk-VQZYIVYN.js} +6 -6
- package/dist/{chunk-BCHYQS4B.js → chunk-VXL2LBPK.js} +1 -1
- package/dist/{chunk-6VOYP4M6.js → chunk-YXSBZRP7.js} +1 -1
- package/dist/cli/chat.js +35 -33
- package/dist/cli/check.js +5 -5
- package/dist/cli/plugins.js +14 -12
- package/dist/cli/snapshot-create.js +10 -9
- package/dist/cli/upgrade.js +7 -6
- package/dist/{db-MA52H62H.js → db-7XL4UPAE.js} +8 -6
- package/dist/instrumentation.js +3 -3
- package/dist/nitro.js +7 -6
- package/dist/{oauth-callback-server-DXGHKN6S.js → oauth-callback-server-RAOYHWDI.js} +30 -27
- package/dist/{runner-4IXUAQNK.js → runner-KMPBWRPM.js} +24 -19
- package/dist/{skills-X3DY7AXO.js → skills-IPCALGLQ.js} +5 -5
- package/dist/spawn-OSOWTMBG.js +41 -0
- package/dist/task-runner-IQNBA3RY.js +34 -0
- package/dist/{validation-Z6JXSTJS.js → validation-BSRCCX6N.js} +5 -5
- package/dist/version.js +1 -1
- package/dist/{work-OKWRFBDW.js → work-T6UFTOJY.js} +24 -19
- package/dist/worker-L35OG7VA.js +24 -0
- package/package.json +5 -5
- package/dist/spawn-43WGS6CH.js +0 -37
- package/dist/task-runner-VDRKITPV.js +0 -32
- package/dist/worker-B236AE72.js +0 -22
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
} from "./chunk-7H2VZTWN.js";
|
|
7
7
|
import {
|
|
8
8
|
runWithTurnRequestDeadline
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-BRKB5R7P.js";
|
|
10
10
|
import {
|
|
11
11
|
logWarn
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-3CVEE6LA.js";
|
|
13
13
|
|
|
14
14
|
// src/chat/plugins/task-queue.ts
|
|
15
15
|
import { createHash } from "crypto";
|
|
@@ -129,7 +129,7 @@ function pluginTaskCallback() {
|
|
|
129
129
|
onRejected: logPluginTaskQueueMessageRejected,
|
|
130
130
|
// Load the runner on first use so this module can send without a cycle.
|
|
131
131
|
run: async (message) => {
|
|
132
|
-
const { processPluginTask } = await import("./task-runner-
|
|
132
|
+
const { processPluginTask } = await import("./task-runner-IQNBA3RY.js");
|
|
133
133
|
await processPluginTask(message);
|
|
134
134
|
},
|
|
135
135
|
topic: PLUGIN_TASK_QUEUE_TOPIC,
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
modelProfileSchema,
|
|
3
|
+
parseTurnReasoningLevel
|
|
4
|
+
} from "./chunk-D4YV5TDV.js";
|
|
1
5
|
import {
|
|
2
6
|
getCurrentConversationPrivacy,
|
|
3
7
|
toCanonicalInputMessage,
|
|
4
8
|
toCanonicalOutputMessage,
|
|
5
9
|
toGenAiMessagesTraceAttributes
|
|
6
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-FFYDRLXW.js";
|
|
7
11
|
import {
|
|
8
12
|
extractGenAiUsageAttributes,
|
|
9
13
|
logException,
|
|
@@ -11,7 +15,7 @@ import {
|
|
|
11
15
|
normalizeGenAiFinishReason,
|
|
12
16
|
serializeGenAiAttribute,
|
|
13
17
|
withSpan
|
|
14
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-3CVEE6LA.js";
|
|
15
19
|
|
|
16
20
|
// src/chat/services/provider-error.ts
|
|
17
21
|
var ProviderError = class extends Error {
|
|
@@ -72,6 +76,15 @@ var RETRYABLE_KINDS = /* @__PURE__ */ new Set([
|
|
|
72
76
|
function providerMessage(error) {
|
|
73
77
|
return (error instanceof Error ? error.message : String(error)).trim();
|
|
74
78
|
}
|
|
79
|
+
var PROVIDER_ERROR_SUMMARY_MAX_CHARS = 240;
|
|
80
|
+
function summarizeProviderErrorMessage(message) {
|
|
81
|
+
const normalized = message.trim().replace(/\s+/g, " ");
|
|
82
|
+
if (!normalized) return void 0;
|
|
83
|
+
const jsonStart = normalized.indexOf("{");
|
|
84
|
+
const summary = (jsonStart >= 0 ? normalized.slice(0, jsonStart) : normalized).trim();
|
|
85
|
+
if (!summary) return void 0;
|
|
86
|
+
return summary.length > PROVIDER_ERROR_SUMMARY_MAX_CHARS ? `${summary.slice(0, PROVIDER_ERROR_SUMMARY_MAX_CHARS)}...` : summary;
|
|
87
|
+
}
|
|
75
88
|
function extractTransportKind(error, depth = 0) {
|
|
76
89
|
if (!(error instanceof Error) || depth > 4) return void 0;
|
|
77
90
|
const providerError = error;
|
|
@@ -186,11 +199,15 @@ function getProviderErrorUserMessage(error) {
|
|
|
186
199
|
}
|
|
187
200
|
}
|
|
188
201
|
function getProviderErrorAttributes(error) {
|
|
202
|
+
const cause = error.cause;
|
|
203
|
+
const causeMessage = cause instanceof Error ? cause.message : typeof cause === "string" ? cause : void 0;
|
|
204
|
+
const summary = causeMessage ? summarizeProviderErrorMessage(causeMessage) : void 0;
|
|
189
205
|
return {
|
|
190
206
|
"app.ai.provider_error.kind": error.kind,
|
|
191
207
|
"app.ai.provider_error.retryable": error.retryable,
|
|
192
208
|
...error.status !== void 0 ? { "app.ai.provider_error.status": error.status } : void 0,
|
|
193
209
|
...error.retryAfterMs !== void 0 ? { "app.ai.provider_error.retry_after_ms": error.retryAfterMs } : void 0,
|
|
210
|
+
...summary ? { "app.ai.provider_error.summary": summary } : void 0,
|
|
194
211
|
...error.modelId ? { "gen_ai.request.model": error.modelId } : void 0
|
|
195
212
|
};
|
|
196
213
|
}
|
|
@@ -653,42 +670,6 @@ function normalizeSlackEmojiName(value) {
|
|
|
653
670
|
return SLACK_EMOJI_NAME_RE.test(normalized) ? normalized : null;
|
|
654
671
|
}
|
|
655
672
|
|
|
656
|
-
// src/chat/reasoning-level.ts
|
|
657
|
-
import { z } from "zod";
|
|
658
|
-
var TURN_REASONING_LEVELS = [
|
|
659
|
-
"none",
|
|
660
|
-
"low",
|
|
661
|
-
"medium",
|
|
662
|
-
"high",
|
|
663
|
-
"xhigh"
|
|
664
|
-
];
|
|
665
|
-
function parseTurnReasoningLevel(value) {
|
|
666
|
-
return z.enum(TURN_REASONING_LEVELS).parse(value);
|
|
667
|
-
}
|
|
668
|
-
|
|
669
|
-
// src/chat/model-profile.ts
|
|
670
|
-
import { z as z2 } from "zod";
|
|
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 defaultModelId(config) {
|
|
682
|
-
return modelIdForProfile(config, config.defaultProfile);
|
|
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
|
-
}
|
|
691
|
-
|
|
692
673
|
// src/chat/config.ts
|
|
693
674
|
var MIN_AGENT_TURN_TIMEOUT_MS = 10 * 1e3;
|
|
694
675
|
var DEFAULT_AGENT_TURN_TIMEOUT_MS = 12 * 60 * 1e3;
|
|
@@ -1104,12 +1085,6 @@ export {
|
|
|
1104
1085
|
completeObject,
|
|
1105
1086
|
embedTexts,
|
|
1106
1087
|
normalizeSlackEmojiName,
|
|
1107
|
-
TURN_REASONING_LEVELS,
|
|
1108
|
-
modelProfileSchema,
|
|
1109
|
-
ModelProfileNotConfiguredError,
|
|
1110
|
-
modelIdForProfile,
|
|
1111
|
-
defaultModelId,
|
|
1112
|
-
profileConfig,
|
|
1113
1088
|
DEFAULT_SQL_STATEMENT_TIMEOUT_MS,
|
|
1114
1089
|
FUNCTION_TIMEOUT_BUFFER_SECONDS,
|
|
1115
1090
|
configureFunctionMaxDurationSeconds,
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
persistConversationMessages
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-H7X2G2KS.js";
|
|
4
4
|
import {
|
|
5
5
|
JUNIOR_THREAD_STATE_TTL_MS
|
|
6
6
|
} from "./chunk-3Y47VMHV.js";
|
|
7
7
|
import {
|
|
8
8
|
getDb
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-43LODHJM.js";
|
|
10
10
|
import {
|
|
11
11
|
juniorLocationConfigurations
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-VXL2LBPK.js";
|
|
13
13
|
import {
|
|
14
14
|
getStateAdapter
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-DOP3FIQC.js";
|
|
16
16
|
import {
|
|
17
17
|
juniorDestinations
|
|
18
18
|
} from "./chunk-VFUK3X5B.js";
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
isRecord,
|
|
21
21
|
toOptionalNumber,
|
|
22
22
|
toOptionalString
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-3CVEE6LA.js";
|
|
24
24
|
|
|
25
25
|
// src/chat/state/conversation.ts
|
|
26
26
|
function defaultConversationState() {
|
|
@@ -6,14 +6,14 @@ import {
|
|
|
6
6
|
isStale,
|
|
7
7
|
runNonInteractiveCommand,
|
|
8
8
|
sleep
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-HWXP6RHG.js";
|
|
10
10
|
import {
|
|
11
11
|
getStateAdapter
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-DOP3FIQC.js";
|
|
13
13
|
import {
|
|
14
14
|
setSpanAttributes,
|
|
15
15
|
withSpan
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-3CVEE6LA.js";
|
|
17
17
|
|
|
18
18
|
// src/chat/sandbox/resources.ts
|
|
19
19
|
var configuredResources;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// src/chat/reasoning-level.ts
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
var TURN_REASONING_LEVELS = [
|
|
4
|
+
"none",
|
|
5
|
+
"low",
|
|
6
|
+
"medium",
|
|
7
|
+
"high",
|
|
8
|
+
"xhigh"
|
|
9
|
+
];
|
|
10
|
+
function parseTurnReasoningLevel(value) {
|
|
11
|
+
return z.enum(TURN_REASONING_LEVELS).parse(value);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// src/chat/model-profile.ts
|
|
15
|
+
import { z as z2 } from "zod";
|
|
16
|
+
var modelProfileSchema = z2.string().regex(/^[a-z][a-z0-9_-]*$/);
|
|
17
|
+
var ModelProfileNotConfiguredError = class extends Error {
|
|
18
|
+
constructor(profile) {
|
|
19
|
+
super(`Model profile "${profile}" is not configured`);
|
|
20
|
+
this.name = "ModelProfileNotConfiguredError";
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
function modelIdForProfile(config, profile) {
|
|
24
|
+
return profileConfig(config, profile).modelId;
|
|
25
|
+
}
|
|
26
|
+
function defaultModelId(config) {
|
|
27
|
+
return modelIdForProfile(config, config.defaultProfile);
|
|
28
|
+
}
|
|
29
|
+
function profileConfig(config, profile) {
|
|
30
|
+
const profileConfig2 = Object.hasOwn(config.profiles, profile) ? config.profiles[profile] : void 0;
|
|
31
|
+
if (!profileConfig2) {
|
|
32
|
+
throw new ModelProfileNotConfiguredError(profile);
|
|
33
|
+
}
|
|
34
|
+
return profileConfig2;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export {
|
|
38
|
+
TURN_REASONING_LEVELS,
|
|
39
|
+
parseTurnReasoningLevel,
|
|
40
|
+
modelProfileSchema,
|
|
41
|
+
ModelProfileNotConfiguredError,
|
|
42
|
+
modelIdForProfile,
|
|
43
|
+
defaultModelId,
|
|
44
|
+
profileConfig
|
|
45
|
+
};
|