@sentry/junior 0.57.0 → 0.58.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.
Files changed (54) hide show
  1. package/dist/app.js +1301 -1278
  2. package/dist/chat/agent-dispatch/types.d.ts +0 -1
  3. package/dist/chat/conversation-privacy.d.ts +23 -0
  4. package/dist/chat/logging.d.ts +2 -0
  5. package/dist/chat/mcp/tool-manager.d.ts +18 -5
  6. package/dist/chat/mcp/tool-name.d.ts +2 -0
  7. package/dist/chat/pi/client.d.ts +2 -0
  8. package/dist/chat/pi/derived-state.d.ts +5 -0
  9. package/dist/chat/pi/traced-stream.d.ts +5 -1
  10. package/dist/chat/prompt.d.ts +3 -9
  11. package/dist/chat/respond-helpers.d.ts +5 -3
  12. package/dist/chat/respond.d.ts +1 -0
  13. package/dist/chat/runtime/conversation-message.d.ts +10 -0
  14. package/dist/chat/runtime/processing-reaction.d.ts +2 -4
  15. package/dist/chat/runtime/reply-executor.d.ts +13 -16
  16. package/dist/chat/runtime/slack-runtime.d.ts +19 -32
  17. package/dist/chat/runtime/thread-state.d.ts +1 -1
  18. package/dist/chat/runtime/turn-input.d.ts +29 -0
  19. package/dist/chat/runtime/turn-preparation.d.ts +4 -24
  20. package/dist/chat/runtime/turn.d.ts +2 -3
  21. package/dist/chat/sentry-links.d.ts +4 -0
  22. package/dist/chat/services/context-compaction.d.ts +3 -4
  23. package/dist/chat/services/pending-auth.d.ts +1 -1
  24. package/dist/chat/services/subscribed-reply-policy.d.ts +2 -13
  25. package/dist/chat/services/timeout-resume.d.ts +1 -2
  26. package/dist/chat/services/turn-session-record.d.ts +82 -0
  27. package/dist/chat/slack/assistant-thread/title.d.ts +4 -1
  28. package/dist/chat/state/artifacts.d.ts +1 -0
  29. package/dist/chat/state/conversation.d.ts +0 -1
  30. package/dist/chat/state/session-log.d.ts +117 -0
  31. package/dist/chat/state/ttl.d.ts +2 -0
  32. package/dist/chat/state/turn-session.d.ts +89 -0
  33. package/dist/chat/tools/advisor/tool.d.ts +2 -0
  34. package/dist/chat/tools/agent-tools.d.ts +2 -1
  35. package/dist/chat/tools/skill/call-mcp-tool.d.ts +7 -3
  36. package/dist/chat/tools/skill/search-mcp-tools.d.ts +15 -3
  37. package/dist/chat/tools/types.d.ts +0 -1
  38. package/dist/{chunk-AA5TIFN5.js → chunk-FKEKRBUB.js} +267 -735
  39. package/dist/{chunk-TTUY467K.js → chunk-H652GMDH.js} +30 -14
  40. package/dist/chunk-I4FDGMFI.js +950 -0
  41. package/dist/{chunk-D3G3YOU4.js → chunk-ITOW4DED.js} +1 -1
  42. package/dist/chunk-QDGD5WVN.js +708 -0
  43. package/dist/cli/check.js +2 -2
  44. package/dist/cli/init.js +0 -1
  45. package/dist/cli/snapshot-warmup.js +5 -3
  46. package/dist/instrumentation.js +3 -0
  47. package/dist/reporting.d.ts +113 -0
  48. package/dist/reporting.js +390 -0
  49. package/package.json +25 -11
  50. package/dist/chat/services/turn-checkpoint.d.ts +0 -74
  51. package/dist/chat/state/pi-session-message-store.d.ts +0 -15
  52. package/dist/chat/state/turn-session-store.d.ts +0 -49
  53. package/dist/handlers/diagnostics-dashboard.d.ts +0 -2
  54. package/dist/handlers/diagnostics.d.ts +0 -2
@@ -1,74 +0,0 @@
1
- import { type AgentTurnSessionCheckpoint } from "@/chat/state/turn-session-store";
2
- import type { PiMessage } from "@/chat/pi/messages";
3
- import { type AgentTurnUsage } from "@/chat/usage";
4
- export interface TurnCheckpointContext {
5
- conversationId?: string;
6
- sessionId?: string;
7
- }
8
- export interface TurnCheckpointState {
9
- canUseTurnSession: boolean;
10
- resumedFromCheckpoint: boolean;
11
- currentSliceId: number;
12
- existingCheckpoint?: AgentTurnSessionCheckpoint;
13
- }
14
- interface CheckpointLogContext {
15
- threadId?: string;
16
- requesterId?: string;
17
- channelId?: string;
18
- runId?: string;
19
- assistantUserName?: string;
20
- modelId: string;
21
- }
22
- /** Load turn checkpoint state for a conversation/session pair. */
23
- export declare function loadTurnCheckpoint(ctx: TurnCheckpointContext): Promise<TurnCheckpointState>;
24
- /** Persist the latest safe in-progress boundary without scheduling continuation. */
25
- export declare function persistRunningCheckpoint(args: {
26
- conversationId: string;
27
- sessionId: string;
28
- sliceId: number;
29
- messages: PiMessage[];
30
- loadedSkillNames: string[];
31
- logContext: CheckpointLogContext;
32
- }): Promise<void>;
33
- /** Persist a completed turn checkpoint. */
34
- export declare function persistCompletedCheckpoint(args: {
35
- conversationId: string;
36
- currentDurationMs?: number;
37
- currentUsage?: AgentTurnUsage;
38
- sessionId: string;
39
- sliceId: number;
40
- allMessages: PiMessage[];
41
- loadedSkillNames: string[];
42
- logContext: CheckpointLogContext;
43
- }): Promise<void>;
44
- /**
45
- * Persist an auth-pause checkpoint. Returns the durable checkpoint only when
46
- * the caller can safely hand the user to an authorization resume flow.
47
- */
48
- export declare function persistAuthPauseCheckpoint(args: {
49
- conversationId: string;
50
- sessionId: string;
51
- currentSliceId: number;
52
- currentDurationMs?: number;
53
- currentUsage?: AgentTurnUsage;
54
- messages: PiMessage[];
55
- loadedSkillNames: string[];
56
- errorMessage: string;
57
- logContext: CheckpointLogContext;
58
- }): Promise<AgentTurnSessionCheckpoint | undefined>;
59
- /**
60
- * Persist a timeout checkpoint at the last safe boundary. Returns the durable
61
- * checkpoint when persistence succeeds so callers can enqueue a continuation.
62
- */
63
- export declare function persistTimeoutCheckpoint(args: {
64
- conversationId: string;
65
- sessionId: string;
66
- currentSliceId: number;
67
- currentDurationMs?: number;
68
- currentUsage?: AgentTurnUsage;
69
- messages: PiMessage[];
70
- loadedSkillNames: string[];
71
- errorMessage: string;
72
- logContext: CheckpointLogContext;
73
- }): Promise<AgentTurnSessionCheckpoint | undefined>;
74
- export {};
@@ -1,15 +0,0 @@
1
- import type { PiMessage } from "@/chat/pi/messages";
2
- interface PiSessionScope {
3
- conversationId: string;
4
- sessionId: string;
5
- }
6
- /** Load the exact stable Pi message prefix for a session. */
7
- export declare function loadPiSessionMessages(args: PiSessionScope & {
8
- messageCount: number;
9
- }): Promise<PiMessage[] | undefined>;
10
- /** Commit new stable Pi messages before the caller advances its cursor. */
11
- export declare function commitPiSessionMessages(args: PiSessionScope & {
12
- messages: PiMessage[];
13
- ttlMs: number;
14
- }): Promise<void>;
15
- export {};
@@ -1,49 +0,0 @@
1
- import type { PiMessage } from "@/chat/pi/messages";
2
- import type { AgentTurnUsage } from "@/chat/usage";
3
- export type AgentTurnSessionStatus = "running" | "awaiting_resume" | "completed" | "failed" | "superseded";
4
- export type AgentTurnResumeReason = "timeout" | "auth";
5
- export interface AgentTurnSessionCheckpoint {
6
- checkpointVersion: number;
7
- conversationId: string;
8
- cumulativeDurationMs?: number;
9
- cumulativeUsage?: AgentTurnUsage;
10
- errorMessage?: string;
11
- loadedSkillNames?: string[];
12
- piMessages: PiMessage[];
13
- resumeReason?: AgentTurnResumeReason;
14
- resumedFromSliceId?: number;
15
- sessionId: string;
16
- sliceId: number;
17
- state: AgentTurnSessionStatus;
18
- updatedAtMs: number;
19
- }
20
- /** Read a materialized turn-session checkpoint for resume and history loading. */
21
- export declare function getAgentTurnSessionCheckpoint(conversationId: string, sessionId: string): Promise<AgentTurnSessionCheckpoint | undefined>;
22
- /** Commit stable Pi session state and advance the turn-session checkpoint cursor. */
23
- export declare function upsertAgentTurnSessionCheckpoint(args: {
24
- conversationId: string;
25
- cumulativeDurationMs?: number;
26
- cumulativeUsage?: AgentTurnUsage;
27
- sessionId: string;
28
- sliceId: number;
29
- state: AgentTurnSessionStatus;
30
- piMessages: PiMessage[];
31
- loadedSkillNames?: string[];
32
- resumeReason?: AgentTurnResumeReason;
33
- errorMessage?: string;
34
- resumedFromSliceId?: number;
35
- ttlMs?: number;
36
- }): Promise<AgentTurnSessionCheckpoint>;
37
- /** Mark an unfinished turn-session checkpoint as superseded when a newer turn wins. */
38
- export declare function supersedeAgentTurnSessionCheckpoint(args: {
39
- conversationId: string;
40
- sessionId: string;
41
- errorMessage?: string;
42
- }): Promise<AgentTurnSessionCheckpoint | undefined>;
43
- /** Mark an unfinished turn-session checkpoint as failed so it cannot resume. */
44
- export declare function failAgentTurnSessionCheckpoint(args: {
45
- conversationId: string;
46
- expectedCheckpointVersion?: number;
47
- sessionId: string;
48
- errorMessage?: string;
49
- }): Promise<AgentTurnSessionCheckpoint | undefined>;
@@ -1,2 +0,0 @@
1
- /** Serve an HTML diagnostics dashboard showing health, plugins, and skills. */
2
- export declare function GET(): Promise<Response>;
@@ -1,2 +0,0 @@
1
- /** Return a runtime discovery snapshot for built-app diagnostics. */
2
- export declare function GET(): Promise<Response>;