@sentry/junior 0.148.0 → 0.150.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-SEOGOGKX.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.d.ts +1 -1
- package/dist/api.js +186 -35
- package/dist/app.js +152 -186
- package/dist/{catalog-runtime-WADOZVTB.js → catalog-runtime-HA7RIWYT.js} +5 -5
- package/dist/chat/agent/index.d.ts +5 -4
- package/dist/chat/agent/prompt.d.ts +8 -5
- package/dist/chat/agent/resume.d.ts +2 -2
- package/dist/chat/agent/tools.d.ts +4 -7
- package/dist/chat/agent/{request.d.ts → types.d.ts} +138 -129
- package/dist/chat/agent-dispatch/types.d.ts +2 -2
- package/dist/chat/agent-invocations/spawn.d.ts +2 -2
- package/dist/chat/api-turns/work.d.ts +6 -1
- package/dist/chat/app/services.d.ts +1 -1
- package/dist/chat/plugins/viewer.d.ts +4 -0
- package/dist/chat/runtime/agent-runner.d.ts +7 -5
- package/dist/chat/runtime/reply-executor.d.ts +0 -2
- package/dist/chat/runtime/slack-resume.d.ts +3 -3
- 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/chat/task-execution/paused-turn.d.ts +2 -2
- package/dist/chat/tools/types.d.ts +1 -1
- package/dist/{chunk-QOWHHM3F.js → chunk-3GL327SC.js} +1 -1
- package/dist/{chunk-45LOR4PU.js → chunk-3JVUWLR7.js} +45 -1
- package/dist/{chunk-4GXJUYJV.js → chunk-3ZMKDHCT.js} +2 -2
- package/dist/{chunk-DUY5CDAM.js → chunk-4KAYAIBV.js} +1 -1
- package/dist/{chunk-ULAU5ZGU.js → chunk-4VH7KLGC.js} +106 -113
- package/dist/{chunk-V2FXMOEA.js → chunk-64K7GKRW.js} +2 -2
- package/dist/{chunk-2B3PT3V2.js → chunk-6PFDWAK2.js} +1 -1
- package/dist/{chunk-LNVEIJ2L.js → chunk-7D4GNUV2.js} +5 -5
- package/dist/{chunk-ZPL2RR7F.js → chunk-7GOP6VFJ.js} +40 -36
- package/dist/{chunk-HWQGBIH7.js → chunk-7NLW2NF5.js} +1 -1
- package/dist/{chunk-55F4QU2V.js → chunk-7QB2CKCW.js} +1 -1
- package/dist/{chunk-WCN4YSH7.js → chunk-DWETNV66.js} +6 -6
- package/dist/{chunk-D3WPMGEX.js → chunk-F5NMSEBL.js} +1 -1
- package/dist/{chunk-IL4EDBMV.js → chunk-FEFEIA3Z.js} +5 -5
- package/dist/{chunk-WOONT5ZP.js → chunk-H2RLIJ7G.js} +1 -1
- package/dist/{chunk-VRHTNBA6.js → chunk-ILYL6YFD.js} +3 -3
- package/dist/{chunk-VCYSOXON.js → chunk-IPGNWXA3.js} +545 -7
- package/dist/{chunk-LAZGHEYU.js → chunk-IZRSLANA.js} +1 -1
- package/dist/{chunk-EAI67NTM.js → chunk-JQXJ2E53.js} +1 -1
- package/dist/{chunk-HLPLT3NY.js → chunk-M5OZSVJI.js} +8 -4
- package/dist/{chunk-XJ42NBP5.js → chunk-MCNP7A7T.js} +8 -8
- package/dist/{chunk-OJCP3C3J.js → chunk-NCGVQXX5.js} +22 -26
- package/dist/{chunk-4AQZYNHM.js → chunk-NNOCRVQO.js} +2 -2
- package/dist/{chunk-GXYDVZKM.js → chunk-P43QM7JY.js} +5 -5
- package/dist/{chunk-EINWQFXI.js → chunk-QPIPYVGE.js} +5 -5
- package/dist/{chunk-GDFF3BQG.js → chunk-RF6J3DIO.js} +34 -36
- package/dist/{chunk-D6YX4NNN.js → chunk-SH6ZKJFZ.js} +4 -4
- package/dist/{chunk-LE5H7LMT.js → chunk-SHDREBGC.js} +1 -1
- package/dist/{chunk-VMNRXKAH.js → chunk-TZLYAO2J.js} +191 -134
- package/dist/{chunk-RRJV5UR5.js → chunk-UIMBNY6O.js} +11 -337
- package/dist/{chunk-ZCHIC2GM.js → chunk-UOFQEVR5.js} +15 -6
- package/dist/{chunk-7OEIXFC3.js → chunk-Y2VZ54CQ.js} +12 -12
- package/dist/{chunk-VY6W3T43.js → chunk-ZBOGYZ53.js} +4 -4
- package/dist/{chunk-POSZWRGL.js → chunk-ZUQT35YC.js} +1 -1
- package/dist/cli/chat.js +31 -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-XUKZRFFK.js → db-HUW75QG7.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-DP7NIZPQ.js} +24 -25
- package/dist/{runner-DGKUTMPX.js → runner-AINV7K3M.js} +47 -45
- package/dist/{skills-P7YUFSXM.js → skills-PKS37E6B.js} +6 -6
- package/dist/spawn-NJCDEPPL.js +38 -0
- package/dist/{validation-S7U5M5NR.js → validation-PDC3MVMM.js} +6 -6
- package/dist/version.js +1 -1
- package/dist/{work-GAA7TVAD.js → work-KJLJRPXS.js} +17 -17
- package/dist/{worker-JXPJH3QB.js → worker-TYQ7YVIR.js} +11 -11
- package/package.json +5 -5
- package/dist/chunk-4EA2SFK2.js +0 -137
- package/dist/spawn-DSK3ZEVD.js +0 -38
|
@@ -1,33 +1,16 @@
|
|
|
1
1
|
import type { SlackAdapter } from "@chat-adapter/slack";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
/** Test-only: clear set-once DM title projection between cases. */
|
|
3
|
+
export declare function resetAssistantTitleProjectionForTests(): void;
|
|
4
4
|
/**
|
|
5
|
-
* Best-effort
|
|
5
|
+
* Best-effort Slack projection for a stored conversation title.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* generated and returned for dashboard reporting only — the Slack API for
|
|
11
|
-
* setting thread titles is DM-only and is not called.
|
|
12
|
-
*
|
|
13
|
-
* Stable Slack permission failures on DM title updates are treated as a
|
|
14
|
-
* terminal skip for the current source message so later turns do not keep
|
|
15
|
-
* paying for the same fast-model call that Slack will reject.
|
|
7
|
+
* Only DM assistant threads support `setAssistantTitle`. Channel conversations
|
|
8
|
+
* keep the title in Junior for dashboard reporting and do not call Slack.
|
|
9
|
+
* Projection is set-once per DM thread so later turns do not rewrite Slack.
|
|
16
10
|
*/
|
|
17
|
-
export declare function
|
|
18
|
-
assistantThreadContext?: {
|
|
19
|
-
channelId: string;
|
|
20
|
-
threadTs: string;
|
|
21
|
-
};
|
|
22
|
-
assistantUserName: string;
|
|
11
|
+
export declare function maybeSyncAssistantTitle(args: {
|
|
23
12
|
channelId?: string;
|
|
24
|
-
conversation: ThreadConversationState;
|
|
25
|
-
generateThreadTitle: ConversationMemoryService["generateThreadTitle"];
|
|
26
13
|
getSlackAdapter: () => Pick<SlackAdapter, "setAssistantTitle">;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
threadId?: string;
|
|
31
|
-
}): Promise<{
|
|
32
|
-
title?: string;
|
|
33
|
-
} | undefined>;
|
|
14
|
+
threadTs?: string;
|
|
15
|
+
title: string;
|
|
16
|
+
}): Promise<void>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { resumeSlackTurn } from "@/chat/runtime/slack-resume";
|
|
2
2
|
import { type PausedTurnRequest } from "@/chat/task-execution/turn-wake";
|
|
3
3
|
import type { AgentRunner } from "@/chat/runtime/agent-runner";
|
|
4
|
-
import type {
|
|
4
|
+
import type { AgentRun } from "@/chat/agent/types";
|
|
5
5
|
/** Runtime ports for paused turn scheduling. */
|
|
6
6
|
export interface PausedTurnOptions {
|
|
7
7
|
agentRunner: AgentRunner;
|
|
8
8
|
/** Exact persisted input ids accepted while running the paused turn. */
|
|
9
9
|
inputMessageIds?: readonly string[];
|
|
10
|
-
routingContext?: Pick<
|
|
10
|
+
routingContext?: Pick<AgentRun, "actor" | "credentialContext" | "destinationVisibility" | "dispatch" | "surface">;
|
|
11
11
|
resumeTurn?: typeof resumeSlackTurn;
|
|
12
12
|
wakePausedTurn?: (request: PausedTurnRequest) => Promise<void>;
|
|
13
13
|
scheduleSessionCompletedPluginTasks?: (params: {
|
|
@@ -10,7 +10,7 @@ import type { WebActor, LocalActor, Actor, SlackActor } from "@/chat/actor";
|
|
|
10
10
|
import type { SlackActionToken } from "@/chat/slack/action-token";
|
|
11
11
|
import type { ModelProfile } from "@/chat/model-profile";
|
|
12
12
|
import type { GeneratedArtifactFileRef } from "@/chat/tools/sandbox/file-uploads";
|
|
13
|
-
import type { SpawnAgent } from "@/chat/agent/
|
|
13
|
+
import type { SpawnAgent } from "@/chat/agent/types";
|
|
14
14
|
interface HandoffControl {
|
|
15
15
|
/** Non-empty catalog of configured targets. */
|
|
16
16
|
profiles: readonly [ModelProfile, ...ModelProfile[]];
|
|
@@ -70,7 +70,9 @@ var archiveConversationBodySchema = z2.object({ archived: z2.boolean(), lastSeen
|
|
|
70
70
|
var archiveConversationResponseSchema = z2.object({ archived: z2.boolean() }).strict();
|
|
71
71
|
var createConversationBodySchema = z2.object({
|
|
72
72
|
idempotencyKey: z2.string().trim().min(1).max(200),
|
|
73
|
-
message: z2.string().trim().min(1).max(32e3)
|
|
73
|
+
message: z2.string().trim().min(1).max(32e3),
|
|
74
|
+
/** New roots default public. Private roots stay participant-only. */
|
|
75
|
+
visibility: z2.enum(["private", "public"]).optional()
|
|
74
76
|
}).strict();
|
|
75
77
|
var createConversationMessageBodySchema = z2.object({
|
|
76
78
|
idempotencyKey: z2.string().trim().min(1).max(200),
|
|
@@ -87,6 +89,40 @@ var actorIdentitySchema = z2.object({
|
|
|
87
89
|
slackUserId: z2.string().optional(),
|
|
88
90
|
slackUserName: z2.string().optional()
|
|
89
91
|
}).strict();
|
|
92
|
+
var conversationPendingMessageDeliverySchema = z2.enum([
|
|
93
|
+
"defer",
|
|
94
|
+
"interrupt"
|
|
95
|
+
]);
|
|
96
|
+
var conversationPendingMessageSchema = z2.object({
|
|
97
|
+
actorIdentity: actorIdentitySchema.optional(),
|
|
98
|
+
createdAt: z2.string().datetime(),
|
|
99
|
+
delivery: conversationPendingMessageDeliverySchema,
|
|
100
|
+
inboundMessageId: z2.string().min(1),
|
|
101
|
+
messageId: z2.string().min(1),
|
|
102
|
+
receivedAt: z2.string().datetime(),
|
|
103
|
+
role: z2.literal("user"),
|
|
104
|
+
source: z2.enum(["slack", "web"]),
|
|
105
|
+
text: z2.string().optional(),
|
|
106
|
+
redacted: z2.literal(true).optional()
|
|
107
|
+
}).strict().superRefine((data, context) => {
|
|
108
|
+
if (data.text === void 0 === (data.redacted !== true)) {
|
|
109
|
+
context.addIssue({
|
|
110
|
+
code: "custom",
|
|
111
|
+
message: "pending message content must be text or explicitly redacted"
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
if (data.redacted && data.actorIdentity) {
|
|
115
|
+
context.addIssue({
|
|
116
|
+
code: "custom",
|
|
117
|
+
message: "redacted pending messages must not expose actor identity"
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
var conversationPendingMessagesReportSchema = z2.object({
|
|
122
|
+
conversationId: z2.string().min(1),
|
|
123
|
+
generatedAt: z2.string().datetime(),
|
|
124
|
+
messages: z2.array(conversationPendingMessageSchema)
|
|
125
|
+
}).strict();
|
|
90
126
|
var conversationAuxiliaryCostsSchema = z2.object({
|
|
91
127
|
costUsd: z2.number().finite().nonnegative(),
|
|
92
128
|
operations: z2.array(
|
|
@@ -138,6 +174,7 @@ var conversationReportMessageEventDataSchema = z2.object({
|
|
|
138
174
|
type: z2.literal("message"),
|
|
139
175
|
messageId: z2.string().min(1),
|
|
140
176
|
role: z2.enum(["assistant", "system", "user"]),
|
|
177
|
+
source: z2.literal("web").optional(),
|
|
141
178
|
actorIdentity: actorIdentitySchema.optional(),
|
|
142
179
|
eventType: z2.string().min(1).optional(),
|
|
143
180
|
text: z2.string().optional(),
|
|
@@ -462,10 +499,12 @@ var conversationStatsItemSchema = z2.object({
|
|
|
462
499
|
tokens: z2.number().optional()
|
|
463
500
|
}).strict();
|
|
464
501
|
var conversationMetricDaySchema = z2.object({
|
|
502
|
+
cachedInputTokens: z2.number().optional(),
|
|
465
503
|
conversations: z2.number(),
|
|
466
504
|
costUsd: z2.number().optional(),
|
|
467
505
|
date: z2.string(),
|
|
468
506
|
durationMs: z2.number(),
|
|
507
|
+
inputTokens: z2.number().optional(),
|
|
469
508
|
tokens: z2.number().optional()
|
|
470
509
|
}).strict();
|
|
471
510
|
var guardianMetricDaySchema = z2.object({
|
|
@@ -486,6 +525,7 @@ var guardianStatsSchema = z2.object({
|
|
|
486
525
|
}).strict();
|
|
487
526
|
var conversationStatsReportSchema = z2.object({
|
|
488
527
|
active: z2.number(),
|
|
528
|
+
cachedInputTokens: z2.number().optional(),
|
|
489
529
|
conversations: z2.number(),
|
|
490
530
|
durationMs: z2.number(),
|
|
491
531
|
failed: z2.number(),
|
|
@@ -496,6 +536,7 @@ var conversationStatsReportSchema = z2.object({
|
|
|
496
536
|
actors: z2.array(conversationStatsItemSchema),
|
|
497
537
|
source: z2.literal("conversation_index"),
|
|
498
538
|
costUsd: z2.number().optional(),
|
|
539
|
+
inputTokens: z2.number().optional(),
|
|
499
540
|
tokens: z2.number().optional(),
|
|
500
541
|
windowEnd: z2.string(),
|
|
501
542
|
windowStart: z2.string()
|
|
@@ -734,6 +775,9 @@ export {
|
|
|
734
775
|
createConversationBodySchema,
|
|
735
776
|
createConversationMessageBodySchema,
|
|
736
777
|
acceptedConversationMessageSchema,
|
|
778
|
+
conversationPendingMessageDeliverySchema,
|
|
779
|
+
conversationPendingMessageSchema,
|
|
780
|
+
conversationPendingMessagesReportSchema,
|
|
737
781
|
conversationAuxiliaryCostsSchema,
|
|
738
782
|
conversationSummaryReportSchema,
|
|
739
783
|
conversationReportEventDataSchema,
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
toCanonicalInputMessage,
|
|
4
4
|
toCanonicalOutputMessage,
|
|
5
5
|
toGenAiMessagesTraceAttributes
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SHDREBGC.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-JQXJ2E53.js";
|
|
15
15
|
|
|
16
16
|
// src/chat/services/provider-error.ts
|
|
17
17
|
var ProviderError = class extends Error {
|