@sentry/junior 0.145.0 → 0.147.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 (171) hide show
  1. package/dist/{agent-hooks-L7D2BDVV.js → agent-hooks-HS6VGUPM.js} +10 -10
  2. package/dist/api/conversations/detail.d.ts +1 -0
  3. package/dist/api/conversations/event-list.d.ts +1 -0
  4. package/dist/api/schema/conversation.d.ts +4 -0
  5. package/dist/api/schema.js +1 -1
  6. package/dist/api.js +26 -22
  7. package/dist/app.js +285 -290
  8. package/dist/{catalog-runtime-QLAC4Q3W.js → catalog-runtime-M6ZTPYRV.js} +5 -5
  9. package/dist/chat/agent/prompt.d.ts +0 -2
  10. package/dist/chat/agent/request.d.ts +2 -5
  11. package/dist/chat/agent/resume.d.ts +0 -3
  12. package/dist/chat/agent/sandbox.d.ts +2 -2
  13. package/dist/chat/agent/skills.d.ts +0 -1
  14. package/dist/chat/agent/tools.d.ts +0 -3
  15. package/dist/chat/agent-dispatch/types.d.ts +2 -2
  16. package/dist/chat/capabilities/jr-rpc-command.d.ts +2 -2
  17. package/dist/chat/configuration/service.d.ts +5 -2
  18. package/dist/chat/configuration/sql.d.ts +9 -0
  19. package/dist/chat/configuration/types.d.ts +17 -13
  20. package/dist/chat/conversations/history.d.ts +3 -0
  21. package/dist/chat/conversations/message-search.d.ts +32 -0
  22. package/dist/chat/conversations/projection.d.ts +10 -0
  23. package/dist/chat/conversations/sql/message-search.d.ts +4 -0
  24. package/dist/chat/conversations/tool-source.d.ts +5 -0
  25. package/dist/chat/credentials/unlink-provider.d.ts +2 -1
  26. package/dist/chat/credentials/user-token-store.d.ts +2 -0
  27. package/dist/chat/db.d.ts +2 -2
  28. package/dist/chat/event-tasks/tool-support.d.ts +2 -0
  29. package/dist/chat/identities/sql.d.ts +8 -0
  30. package/dist/chat/logging.d.ts +2 -0
  31. package/dist/chat/mcp/auth-store.d.ts +0 -2
  32. package/dist/chat/mcp/oauth.d.ts +0 -2
  33. package/dist/chat/oauth-flow.d.ts +3 -1
  34. package/dist/chat/pi/client.d.ts +2 -0
  35. package/dist/chat/plugins/credential-hooks.d.ts +2 -0
  36. package/dist/chat/prompt.d.ts +0 -2
  37. package/dist/chat/resource-events/notification.d.ts +2 -1
  38. package/dist/chat/runtime/delivered-turn-state.d.ts +1 -4
  39. package/dist/chat/runtime/thread-state.d.ts +8 -11
  40. package/dist/chat/runtime/turn-input.d.ts +4 -2
  41. package/dist/chat/runtime/turn-preparation.d.ts +2 -4
  42. package/dist/chat/sandbox/command-result.d.ts +2 -0
  43. package/dist/chat/sandbox/egress/schemas.d.ts +6 -0
  44. package/dist/chat/scheduled-tasks/tool-support.d.ts +2 -0
  45. package/dist/chat/scheduled-tasks/tools/create.d.ts +2 -0
  46. package/dist/chat/scheduled-tasks/tools/delete.d.ts +2 -0
  47. package/dist/chat/scheduled-tasks/tools/list.d.ts +2 -0
  48. package/dist/chat/scheduled-tasks/tools/run-now.d.ts +2 -0
  49. package/dist/chat/scheduled-tasks/tools/update.d.ts +2 -0
  50. package/dist/chat/services/mcp-auth-orchestration.d.ts +0 -3
  51. package/dist/chat/services/plugin-auth-orchestration.d.ts +2 -1
  52. package/dist/chat/services/provider-default-config.d.ts +2 -2
  53. package/dist/chat/services/subscribed-decision.d.ts +3 -0
  54. package/dist/chat/services/subscribed-reply-policy.d.ts +1 -0
  55. package/dist/chat/services/turn-result.d.ts +0 -3
  56. package/dist/chat/services/turn-router.d.ts +3 -0
  57. package/dist/chat/slack/assistant-thread/lifecycle.d.ts +0 -1
  58. package/dist/chat/slack/assistant-thread/title.d.ts +0 -3
  59. package/dist/chat/slack/dispatch-turn.d.ts +1 -1
  60. package/dist/chat/slack/message/attachments.d.ts +2 -0
  61. package/dist/chat/slack/message/blocks.d.ts +2 -0
  62. package/dist/chat/slack/message/content.d.ts +18 -0
  63. package/dist/chat/slack/message/identity.d.ts +7 -0
  64. package/dist/chat/slack/tools/canvas/context.d.ts +0 -10
  65. package/dist/chat/slack/tools/canvas/create.d.ts +2 -0
  66. package/dist/chat/slack/tools/canvas/edit.d.ts +2 -0
  67. package/dist/chat/slack/tools/canvas/read.d.ts +2 -0
  68. package/dist/chat/slack/tools/canvas/write.d.ts +2 -0
  69. package/dist/chat/slack/tools/channel-list-messages.d.ts +2 -0
  70. package/dist/chat/slack/tools/{conversation-search.d.ts → conversation-message-search.d.ts} +23 -14
  71. package/dist/chat/slack/tools/list/add-items.d.ts +4 -1
  72. package/dist/chat/slack/tools/list/api.d.ts +8 -1
  73. package/dist/chat/slack/tools/list/create.d.ts +2 -0
  74. package/dist/chat/slack/tools/list/get-items.d.ts +5 -3
  75. package/dist/chat/slack/tools/list/update-item.d.ts +5 -1
  76. package/dist/chat/slack/tools/message-add-reaction.d.ts +2 -0
  77. package/dist/chat/slack/tools/public-search.d.ts +2 -0
  78. package/dist/chat/slack/tools/send-files.d.ts +2 -0
  79. package/dist/chat/slack/tools/thread-read.d.ts +2 -0
  80. package/dist/chat/slack/vision-cache.d.ts +5 -0
  81. package/dist/chat/state/conversation.d.ts +4 -5
  82. package/dist/chat/task-execution/checkpoint.d.ts +1 -3
  83. package/dist/chat/task-execution/turn-cursor.d.ts +0 -9
  84. package/dist/chat/tool-support/structured-result.d.ts +1 -0
  85. package/dist/chat/tool-support/timed-out-tool-result.d.ts +11 -0
  86. package/dist/chat/tools/create-event-task.d.ts +2 -0
  87. package/dist/chat/tools/delete-event-task.d.ts +2 -0
  88. package/dist/chat/tools/handoff/tool.d.ts +2 -0
  89. package/dist/chat/tools/list-event-tasks.d.ts +2 -0
  90. package/dist/chat/tools/list-resource-event-subscriptions.d.ts +2 -0
  91. package/dist/chat/tools/runtime/report-progress.d.ts +2 -0
  92. package/dist/chat/tools/runtime/spawn-agent.d.ts +2 -0
  93. package/dist/chat/tools/{query-conversation-events.d.ts → search-conversation-events.d.ts} +5 -3
  94. package/dist/chat/tools/search-resource-event-types.d.ts +2 -0
  95. package/dist/chat/tools/search-tools.d.ts +2 -0
  96. package/dist/chat/tools/skill/load-skill.d.ts +2 -0
  97. package/dist/chat/tools/skill/search-mcp-tools.d.ts +2 -0
  98. package/dist/chat/tools/stop-watching-resources.d.ts +2 -0
  99. package/dist/chat/tools/system-time.d.ts +2 -0
  100. package/dist/chat/tools/types.d.ts +0 -6
  101. package/dist/chat/tools/update-event-task.d.ts +2 -0
  102. package/dist/chat/tools/user-lookup.d.ts +29 -0
  103. package/dist/chat/tools/watch-resource-events.d.ts +2 -0
  104. package/dist/chat/tools/web/fetch-tool.d.ts +2 -0
  105. package/dist/chat/tools/web/image-generate.d.ts +2 -0
  106. package/dist/chat/tools/web/search.d.ts +2 -0
  107. package/dist/{chunk-PJ4NMVQB.js → chunk-34GS7B6L.js} +2 -2
  108. package/dist/{chunk-2LWPFSB4.js → chunk-4LJO56OJ.js} +9 -1
  109. package/dist/{chunk-QJBDABQA.js → chunk-6H5SZR24.js} +16 -20
  110. package/dist/{chunk-LVVSIMBB.js → chunk-745QJ3ZA.js} +1 -1
  111. package/dist/{chunk-64SBYW2O.js → chunk-7A4M7PCV.js} +613 -561
  112. package/dist/{chunk-XFKIRN3Q.js → chunk-7NVJVJID.js} +4 -3
  113. package/dist/{chunk-FUBRJA5F.js → chunk-7UQIVT6G.js} +13 -6
  114. package/dist/{chunk-ZIAMN2UW.js → chunk-AIOK6LAG.js} +40 -513
  115. package/dist/{chunk-EIX2LQ6L.js → chunk-AVOCH2Z5.js} +3 -3
  116. package/dist/{chunk-GUWLDMGF.js → chunk-AVZDSUFB.js} +4 -4
  117. package/dist/{chunk-2XET6PKP.js → chunk-AYU72WO7.js} +102 -73
  118. package/dist/chunk-AZ7EAOBE.js +566 -0
  119. package/dist/{chunk-DXEQAIUV.js → chunk-CSZINQJ2.js} +1 -1
  120. package/dist/{chunk-HLOUZC5C.js → chunk-CWP5RHVX.js} +4 -4
  121. package/dist/{chunk-DS3J6WGY.js → chunk-DLDRQHG5.js} +1 -1
  122. package/dist/{chunk-27TEJTZO.js → chunk-DU74WPIC.js} +55 -37
  123. package/dist/{chunk-YD54Q45G.js → chunk-EFLJ2WJH.js} +6 -4
  124. package/dist/{chunk-CD2XFGYQ.js → chunk-GGB4WL5A.js} +1 -1
  125. package/dist/{chunk-GDV5LXRA.js → chunk-IIOOO4FQ.js} +1 -1
  126. package/dist/{chunk-SIN3MXH6.js → chunk-JUUKWRBE.js} +1 -1
  127. package/dist/{chunk-VTDMB7XX.js → chunk-K4SZAP3K.js} +1 -1
  128. package/dist/{chunk-QUG4JSZK.js → chunk-ORO3PWKQ.js} +1 -1
  129. package/dist/{chunk-RUSS62EN.js → chunk-PVNG6UMU.js} +3 -3
  130. package/dist/{chunk-I47UGQPJ.js → chunk-Q4R73I43.js} +365 -206
  131. package/dist/{chunk-JTGS3ZZE.js → chunk-RXBVB2JM.js} +1 -1
  132. package/dist/{chunk-TZRXYWRE.js → chunk-SGZO7UWH.js} +2 -2
  133. package/dist/{chunk-JLMVCNXL.js → chunk-SVHUEHUL.js} +1 -0
  134. package/dist/{chunk-B46ZMVOV.js → chunk-X5UY34KT.js} +6 -5
  135. package/dist/{chunk-5PNPQYTO.js → chunk-YBVXBNSV.js} +2 -2
  136. package/dist/{chunk-HISR3DTV.js → chunk-YEO3VX72.js} +10 -25
  137. package/dist/{chunk-ZIMRGFYL.js → chunk-YHDERDRO.js} +7 -6
  138. package/dist/{chunk-WF5HVH3M.js → chunk-YNTTROJT.js} +1 -1
  139. package/dist/{chunk-2UH3JI64.js → chunk-YSB2N563.js} +87 -34
  140. package/dist/{chunk-ZYAJMESY.js → chunk-Z4YU7Z4L.js} +3 -2
  141. package/dist/cli/chat.js +32 -32
  142. package/dist/cli/check.js +6 -6
  143. package/dist/cli/plugins.js +13 -13
  144. package/dist/cli/snapshot-create.js +9 -9
  145. package/dist/cli/upgrade.js +7 -7
  146. package/dist/db/schema/location-configurations.d.ts +127 -0
  147. package/dist/db/schema.d.ts +128 -1
  148. package/dist/{db-62PW6LM3.js → db-CSEW4RII.js} +9 -9
  149. package/dist/instrumentation.js +4 -4
  150. package/dist/nitro.js +2 -2
  151. package/dist/{oauth-callback-server-6NZNHJAM.js → oauth-callback-server-FUEV5HNG.js} +24 -24
  152. package/dist/{runner-GCRPG3GQ.js → runner-U3XHSKSH.js} +21 -41
  153. package/dist/{skills-2S3MDFIQ.js → skills-AKE6W3WI.js} +6 -6
  154. package/dist/spawn-B6GDTWJ4.js +39 -0
  155. package/dist/{validation-HAOLCJ5A.js → validation-WDTAULUF.js} +6 -6
  156. package/dist/version.js +1 -1
  157. package/dist/{work-R4XYKMUW.js → work-C3HAO2BG.js} +17 -17
  158. package/dist/{worker-U2UCVR7M.js → worker-LNP4YKBM.js} +10 -10
  159. package/migrations/0024_misty_typhoid_mary.sql +12 -0
  160. package/migrations/meta/0024_snapshot.json +2275 -0
  161. package/migrations/meta/_journal.json +7 -0
  162. package/package.json +4 -4
  163. package/dist/chat/conversations/search.d.ts +0 -24
  164. package/dist/chat/conversations/sql/search.d.ts +0 -4
  165. package/dist/chat/slack/legacy-attachments.d.ts +0 -4
  166. package/dist/chat/slack/message.d.ts +0 -12
  167. package/dist/chat/slack/tools/user-lookup.d.ts +0 -26
  168. package/dist/chat/state/artifacts.d.ts +0 -30
  169. package/dist/chat/tool-support/turn-deadline-result.d.ts +0 -3
  170. package/dist/chunk-Q6QZTTLS.js +0 -55
  171. package/dist/spawn-7WK37BTD.js +0 -39
@@ -11,6 +11,7 @@ export declare function createSlackMessageAddReactionTool(context: SlackToolCont
11
11
  [x: string]: unknown;
12
12
  target?: string | undefined;
13
13
  truncated?: boolean | undefined;
14
+ timed_out?: boolean | undefined;
14
15
  continuation?: {
15
16
  arguments: Record<string, unknown>;
16
17
  reason?: string | undefined;
@@ -19,6 +20,7 @@ export declare function createSlackMessageAddReactionTool(context: SlackToolCont
19
20
  [x: string]: unknown;
20
21
  target?: string | undefined;
21
22
  truncated?: boolean | undefined;
23
+ timed_out?: boolean | undefined;
22
24
  continuation?: {
23
25
  arguments: Record<string, unknown>;
24
26
  reason?: string | undefined;
@@ -28,6 +28,7 @@ export declare function createSlackPublicSearchTool(actionToken: SlackActionToke
28
28
  }[];
29
29
  target?: string | undefined;
30
30
  truncated?: boolean | undefined;
31
+ timed_out?: boolean | undefined;
31
32
  continuation?: {
32
33
  arguments: Record<string, unknown>;
33
34
  reason?: string | undefined;
@@ -49,6 +50,7 @@ export declare function createSlackPublicSearchTool(actionToken: SlackActionToke
49
50
  }[];
50
51
  target?: string | undefined;
51
52
  truncated?: boolean | undefined;
53
+ timed_out?: boolean | undefined;
52
54
  continuation?: {
53
55
  arguments: Record<string, unknown>;
54
56
  reason?: string | undefined;
@@ -22,6 +22,7 @@ export declare function createSendFilesTool(context: SlackToolContext, state: To
22
22
  file_count: number;
23
23
  thread_ts: string;
24
24
  truncated?: boolean | undefined;
25
+ timed_out?: boolean | undefined;
25
26
  continuation?: {
26
27
  arguments: Record<string, unknown>;
27
28
  reason?: string | undefined;
@@ -35,6 +36,7 @@ export declare function createSendFilesTool(context: SlackToolContext, state: To
35
36
  file_count: number;
36
37
  thread_ts: string;
37
38
  truncated?: boolean | undefined;
39
+ timed_out?: boolean | undefined;
38
40
  continuation?: {
39
41
  arguments: Record<string, unknown>;
40
42
  reason?: string | undefined;
@@ -17,6 +17,7 @@ export declare function createSlackThreadReadTool(context: SlackToolContext, dep
17
17
  [x: string]: unknown;
18
18
  target?: string | undefined;
19
19
  truncated?: boolean | undefined;
20
+ timed_out?: boolean | undefined;
20
21
  continuation?: {
21
22
  arguments: Record<string, unknown>;
22
23
  reason?: string | undefined;
@@ -25,6 +26,7 @@ export declare function createSlackThreadReadTool(context: SlackToolContext, dep
25
26
  [x: string]: unknown;
26
27
  target?: string | undefined;
27
28
  truncated?: boolean | undefined;
29
+ timed_out?: boolean | undefined;
28
30
  continuation?: {
29
31
  arguments: Record<string, unknown>;
30
32
  reason?: string | undefined;
@@ -0,0 +1,5 @@
1
+ import type { ConversationVisionState } from "@/chat/state/conversation";
2
+ /** Load the disposable image-analysis cache for one conversation. */
3
+ export declare function loadConversationVisionCache(conversationId: string): Promise<ConversationVisionState>;
4
+ /** Replace the disposable image-analysis cache with a bounded snapshot. */
5
+ export declare function persistConversationVisionCache(conversationId: string, vision: ConversationVisionState): Promise<void>;
@@ -66,13 +66,12 @@ export interface ThreadConversationState {
66
66
  /** Safely coerce an unknown persisted value into a ThreadConversationState. */
67
67
  export declare function coerceThreadConversationState(value: unknown): ThreadConversationState;
68
68
  /**
69
- * Wrap conversation runtime scratch into the storage envelope.
69
+ * Wrap active conversation control into the thread scratch envelope.
70
70
  *
71
- * Visible transcript and model history live in SQL. Redis only keeps
72
- * short-lived processing control and the vision cache, which has no other
73
- * authority yet.
71
+ * Visible history lives in SQL. Image summaries use a separate disposable
72
+ * cache, so thread scratch does not retain them.
74
73
  */
75
74
  export declare function buildConversationStatePatch(conversation: ThreadConversationState): {
76
- conversation: Pick<ThreadConversationState, "schemaVersion" | "processing" | "vision">;
75
+ conversation: Pick<ThreadConversationState, "schemaVersion" | "processing">;
77
76
  };
78
77
  export {};
@@ -32,12 +32,12 @@ export type TurnCheckpoint = {
32
32
  /**
33
33
  * Lifecycle fields for a checkpoint write.
34
34
  * Routing/metrics/provenance are only for SQL dual-write / resume restore.
35
+ * Profile, reasoning, concrete model id, and skills are not checkpoint fields.
35
36
  */
36
37
  interface TurnCheckpointWrite {
37
38
  conversationId: string;
38
39
  turnId: string;
39
40
  messages: PiMessage[];
40
- modelId: string;
41
41
  /** Required for running/paused; optional for completed/failed (falls back to stored). */
42
42
  sliceId?: number;
43
43
  actor?: Actor;
@@ -48,8 +48,6 @@ interface TurnCheckpointWrite {
48
48
  dispatchOutcome?: AgentDispatchOutcome;
49
49
  source?: Source;
50
50
  surface?: AgentTurnSurface;
51
- loadedSkillNames?: string[];
52
- reasoningLevel?: string;
53
51
  turnStartMessageIndex?: number;
54
52
  trailingMessageProvenance?: ConversationMessageProvenance[];
55
53
  turnContexts?: PluginTurnContext[];
@@ -32,9 +32,6 @@ export interface TurnRecord {
32
32
  resultMessageId?: string;
33
33
  errorMessage?: string;
34
34
  lastProgressAtMs: number;
35
- loadedSkillNames?: string[];
36
- modelId?: string;
37
- reasoningLevel?: string;
38
35
  piMessages: PiMessage[];
39
36
  /** Per-message provenance aligned one-to-one with `piMessages`. */
40
37
  piMessageProvenance: ConversationMessageProvenance[];
@@ -89,8 +86,6 @@ export declare function upsertTurnRecord(args: {
89
86
  destinationVisibility?: ConversationPrivacy;
90
87
  source?: Source;
91
88
  lastProgressAtMs?: number;
92
- loadedSkillNames?: string[];
93
- modelId: string;
94
89
  conversationStore?: ConversationStore;
95
90
  turnId: string;
96
91
  sliceId: number;
@@ -101,7 +96,6 @@ export declare function upsertTurnRecord(args: {
101
96
  trailingMessageProvenance?: ConversationMessageProvenance[];
102
97
  actor?: Actor;
103
98
  resumeReason?: TurnPauseReason;
104
- reasoningLevel?: string;
105
99
  errorMessage?: string;
106
100
  resumedFromSliceId?: number;
107
101
  traceId?: string;
@@ -121,12 +115,9 @@ type TurnSummaryWrite = {
121
115
  destinationVisibility?: ConversationPrivacy;
122
116
  source?: Source;
123
117
  lastProgressAtMs?: number;
124
- loadedSkillNames?: string[];
125
- modelId?: string;
126
118
  conversationStore?: ConversationStore;
127
119
  actor?: Actor;
128
120
  resumeReason?: TurnPauseReason;
129
- reasoningLevel?: string;
130
121
  turnId: string;
131
122
  sliceId: number;
132
123
  startedAtMs?: number;
@@ -13,6 +13,7 @@ export declare const juniorToolBoundContinuationSchema: z.ZodObject<{
13
13
  export declare const juniorToolOutputSchema: z.ZodObject<{
14
14
  target: z.ZodOptional<z.ZodString>;
15
15
  truncated: z.ZodOptional<z.ZodBoolean>;
16
+ timed_out: z.ZodOptional<z.ZodBoolean>;
16
17
  continuation: z.ZodOptional<z.ZodObject<{
17
18
  arguments: z.ZodRecord<z.ZodString, z.ZodUnknown>;
18
19
  reason: z.ZodOptional<z.ZodString>;
@@ -0,0 +1,11 @@
1
+ import type { AfterToolCallResult, AgentToolResult } from "@earendil-works/pi-agent-core";
2
+ /**
3
+ * Project a host-preempted tool attempt onto the normal tool-result shape.
4
+ *
5
+ * Only rewrite results that mark the attempt itself as aborted. A finished
6
+ * sibling tool that settles after the host abort signal must keep its real
7
+ * outcome. Host continuity stays in session state (`resumeReason: "timeout"`)
8
+ * and automatic continuation. The model only needs the same fact bash already
9
+ * reports for command timeouts: this attempt timed out.
10
+ */
11
+ export declare function projectTimedOutToolResult(result: AgentToolResult<unknown>): AfterToolCallResult | undefined;
@@ -35,6 +35,7 @@ export declare function createEventTaskTool(context: ToolRuntimeContext, catalog
35
35
  };
36
36
  target?: string | undefined;
37
37
  truncated?: boolean | undefined;
38
+ timed_out?: boolean | undefined;
38
39
  continuation?: {
39
40
  arguments: Record<string, unknown>;
40
41
  reason?: string | undefined;
@@ -58,6 +59,7 @@ export declare function createEventTaskTool(context: ToolRuntimeContext, catalog
58
59
  };
59
60
  target?: string | undefined;
60
61
  truncated?: boolean | undefined;
62
+ timed_out?: boolean | undefined;
61
63
  continuation?: {
62
64
  arguments: Record<string, unknown>;
63
65
  reason?: string | undefined;
@@ -26,6 +26,7 @@ export declare function createDeleteEventTaskTool(context: ToolRuntimeContext, c
26
26
  };
27
27
  target?: string | undefined;
28
28
  truncated?: boolean | undefined;
29
+ timed_out?: boolean | undefined;
29
30
  continuation?: {
30
31
  arguments: Record<string, unknown>;
31
32
  reason?: string | undefined;
@@ -49,6 +50,7 @@ export declare function createDeleteEventTaskTool(context: ToolRuntimeContext, c
49
50
  };
50
51
  target?: string | undefined;
51
52
  truncated?: boolean | undefined;
53
+ timed_out?: boolean | undefined;
52
54
  continuation?: {
53
55
  arguments: Record<string, unknown>;
54
56
  reason?: string | undefined;
@@ -12,6 +12,7 @@ export declare function createHandoffTool(handoff: NonNullable<ToolRuntimeContex
12
12
  model_profile: string;
13
13
  target?: string | undefined;
14
14
  truncated?: boolean | undefined;
15
+ timed_out?: boolean | undefined;
15
16
  continuation?: {
16
17
  arguments: Record<string, unknown>;
17
18
  reason?: string | undefined;
@@ -21,6 +22,7 @@ export declare function createHandoffTool(handoff: NonNullable<ToolRuntimeContex
21
22
  model_profile: string;
22
23
  target?: string | undefined;
23
24
  truncated?: boolean | undefined;
25
+ timed_out?: boolean | undefined;
24
26
  continuation?: {
25
27
  arguments: Record<string, unknown>;
26
28
  reason?: string | undefined;
@@ -24,6 +24,7 @@ export declare function createListEventTasksTool(context: ToolRuntimeContext, ca
24
24
  }[];
25
25
  truncated: boolean;
26
26
  target?: string | undefined;
27
+ timed_out?: boolean | undefined;
27
28
  continuation?: {
28
29
  arguments: Record<string, unknown>;
29
30
  reason?: string | undefined;
@@ -47,6 +48,7 @@ export declare function createListEventTasksTool(context: ToolRuntimeContext, ca
47
48
  }[];
48
49
  truncated: boolean;
49
50
  target?: string | undefined;
51
+ timed_out?: boolean | undefined;
50
52
  continuation?: {
51
53
  arguments: Record<string, unknown>;
52
54
  reason?: string | undefined;
@@ -17,6 +17,7 @@ export declare function createListResourceEventSubscriptionsTool(context: ToolRu
17
17
  }[];
18
18
  target?: string | undefined;
19
19
  truncated?: boolean | undefined;
20
+ timed_out?: boolean | undefined;
20
21
  continuation?: {
21
22
  arguments: Record<string, unknown>;
22
23
  reason?: string | undefined;
@@ -34,6 +35,7 @@ export declare function createListResourceEventSubscriptionsTool(context: ToolRu
34
35
  }[];
35
36
  target?: string | undefined;
36
37
  truncated?: boolean | undefined;
38
+ timed_out?: boolean | undefined;
37
39
  continuation?: {
38
40
  arguments: Record<string, unknown>;
39
41
  reason?: string | undefined;
@@ -9,6 +9,7 @@ export declare function createReportProgressTool(): Omit<import("../definition")
9
9
  [x: string]: unknown;
10
10
  target?: string | undefined;
11
11
  truncated?: boolean | undefined;
12
+ timed_out?: boolean | undefined;
12
13
  continuation?: {
13
14
  arguments: Record<string, unknown>;
14
15
  reason?: string | undefined;
@@ -17,6 +18,7 @@ export declare function createReportProgressTool(): Omit<import("../definition")
17
18
  [x: string]: unknown;
18
19
  target?: string | undefined;
19
20
  truncated?: boolean | undefined;
21
+ timed_out?: boolean | undefined;
20
22
  continuation?: {
21
23
  arguments: Record<string, unknown>;
22
24
  reason?: string | undefined;
@@ -14,6 +14,7 @@ export declare function createSpawnAgentTool(spawnAgent: NonNullable<ToolRuntime
14
14
  invocation_id: string;
15
15
  target?: string | undefined;
16
16
  truncated?: boolean | undefined;
17
+ timed_out?: boolean | undefined;
17
18
  continuation?: {
18
19
  arguments: Record<string, unknown>;
19
20
  reason?: string | undefined;
@@ -23,6 +24,7 @@ export declare function createSpawnAgentTool(spawnAgent: NonNullable<ToolRuntime
23
24
  invocation_id: string;
24
25
  target?: string | undefined;
25
26
  truncated?: boolean | undefined;
27
+ timed_out?: boolean | undefined;
26
28
  continuation?: {
27
29
  arguments: Record<string, unknown>;
28
30
  reason?: string | undefined;
@@ -1,11 +1,11 @@
1
1
  import { type KnownConversationEventType } from "@/chat/conversations/history";
2
2
  import type { ToolRuntimeContext } from "@/chat/tools/types";
3
- /** Create a deferred tool that returns a bounded conversation event page. */
4
- export declare function createQueryConversationEventsTool(context: ToolRuntimeContext): Omit<import("./definition").AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
3
+ /** Create a deferred tool that searches one conversation's durable event log. */
4
+ export declare function createSearchConversationEventsTool(context: ToolRuntimeContext): Omit<import("./definition").AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
5
5
  inputSchema: import("./definition").JsonSchemaObject;
6
6
  outputSchema: import("./definition").JsonSchemaObject;
7
7
  prepareArguments(args: unknown): {
8
- conversation_id: string;
8
+ conversation_id?: string | null | undefined;
9
9
  after_seq?: number | null | undefined;
10
10
  before_seq?: number | null | undefined;
11
11
  limit?: number | null | undefined;
@@ -25,6 +25,7 @@ export declare function createQueryConversationEventsTool(context: ToolRuntimeCo
25
25
  has_newer: boolean;
26
26
  target?: string | undefined;
27
27
  truncated?: boolean | undefined;
28
+ timed_out?: boolean | undefined;
28
29
  continuation?: {
29
30
  arguments: Record<string, unknown>;
30
31
  reason?: string | undefined;
@@ -44,6 +45,7 @@ export declare function createQueryConversationEventsTool(context: ToolRuntimeCo
44
45
  has_newer: boolean;
45
46
  target?: string | undefined;
46
47
  truncated?: boolean | undefined;
48
+ timed_out?: boolean | undefined;
47
49
  continuation?: {
48
50
  arguments: Record<string, unknown>;
49
51
  reason?: string | undefined;
@@ -20,6 +20,7 @@ export declare function createSearchResourceEventTypesTool(catalog: ResourceEven
20
20
  }[];
21
21
  target?: string | undefined;
22
22
  truncated?: boolean | undefined;
23
+ timed_out?: boolean | undefined;
23
24
  continuation?: {
24
25
  arguments: Record<string, unknown>;
25
26
  reason?: string | undefined;
@@ -36,6 +37,7 @@ export declare function createSearchResourceEventTypesTool(catalog: ResourceEven
36
37
  }[];
37
38
  target?: string | undefined;
38
39
  truncated?: boolean | undefined;
40
+ timed_out?: boolean | undefined;
39
41
  continuation?: {
40
42
  arguments: Record<string, unknown>;
41
43
  reason?: string | undefined;
@@ -34,6 +34,7 @@ export declare function createSearchToolsTool(catalogTools: Record<string, AnyTo
34
34
  }[];
35
35
  target?: string | undefined;
36
36
  truncated?: boolean | undefined;
37
+ timed_out?: boolean | undefined;
37
38
  continuation?: {
38
39
  arguments: Record<string, unknown>;
39
40
  reason?: string | undefined;
@@ -61,6 +62,7 @@ export declare function createSearchToolsTool(catalogTools: Record<string, AnyTo
61
62
  }[];
62
63
  target?: string | undefined;
63
64
  truncated?: boolean | undefined;
65
+ timed_out?: boolean | undefined;
64
66
  continuation?: {
65
67
  arguments: Record<string, unknown>;
66
68
  reason?: string | undefined;
@@ -24,6 +24,7 @@ export declare function createLoadSkillTool(availableSkills: SkillMetadata[], op
24
24
  [x: string]: unknown;
25
25
  target?: string | undefined;
26
26
  truncated?: boolean | undefined;
27
+ timed_out?: boolean | undefined;
27
28
  continuation?: {
28
29
  arguments: Record<string, unknown>;
29
30
  reason?: string | undefined;
@@ -32,6 +33,7 @@ export declare function createLoadSkillTool(availableSkills: SkillMetadata[], op
32
33
  [x: string]: unknown;
33
34
  target?: string | undefined;
34
35
  truncated?: boolean | undefined;
36
+ timed_out?: boolean | undefined;
35
37
  continuation?: {
36
38
  arguments: Record<string, unknown>;
37
39
  reason?: string | undefined;
@@ -43,6 +43,7 @@ export declare function createSearchMcpToolsTool(mcpToolManager: SearchMcpToolMa
43
43
  }[];
44
44
  target?: string | undefined;
45
45
  truncated?: boolean | undefined;
46
+ timed_out?: boolean | undefined;
46
47
  continuation?: {
47
48
  arguments: Record<string, unknown>;
48
49
  reason?: string | undefined;
@@ -70,6 +71,7 @@ export declare function createSearchMcpToolsTool(mcpToolManager: SearchMcpToolMa
70
71
  }[];
71
72
  target?: string | undefined;
72
73
  truncated?: boolean | undefined;
74
+ timed_out?: boolean | undefined;
73
75
  continuation?: {
74
76
  arguments: Record<string, unknown>;
75
77
  reason?: string | undefined;
@@ -11,6 +11,7 @@ export declare function createStopWatchingResourcesTool(context: ToolRuntimeCont
11
11
  stoppedIds: string[];
12
12
  target?: string | undefined;
13
13
  truncated?: boolean | undefined;
14
+ timed_out?: boolean | undefined;
14
15
  continuation?: {
15
16
  arguments: Record<string, unknown>;
16
17
  reason?: string | undefined;
@@ -20,6 +21,7 @@ export declare function createStopWatchingResourcesTool(context: ToolRuntimeCont
20
21
  stoppedIds: string[];
21
22
  target?: string | undefined;
22
23
  truncated?: boolean | undefined;
24
+ timed_out?: boolean | undefined;
23
25
  continuation?: {
24
26
  arguments: Record<string, unknown>;
25
27
  reason?: string | undefined;
@@ -19,6 +19,7 @@ export declare function createSystemTimeTool(): Omit<import("./definition").AnyT
19
19
  timezone_offset_minutes: number;
20
20
  target?: string | undefined;
21
21
  truncated?: boolean | undefined;
22
+ timed_out?: boolean | undefined;
22
23
  continuation?: {
23
24
  arguments: Record<string, unknown>;
24
25
  reason?: string | undefined;
@@ -32,6 +33,7 @@ export declare function createSystemTimeTool(): Omit<import("./definition").AnyT
32
33
  timezone_offset_minutes: number;
33
34
  target?: string | undefined;
34
35
  truncated?: boolean | undefined;
36
+ timed_out?: boolean | undefined;
35
37
  continuation?: {
36
38
  arguments: Record<string, unknown>;
37
39
  reason?: string | undefined;
@@ -3,7 +3,6 @@ import type { Destination, Identity, LocalDestination, LocalSource, PluginEgress
3
3
  import type { McpToolManager } from "@/chat/mcp/tool-manager";
4
4
  import type { SandboxWorkspace } from "@/chat/sandbox/workspace";
5
5
  import type { AgentTurnSurface } from "@/chat/task-execution/checkpoint";
6
- import type { ThreadArtifactsState } from "@/chat/state/artifacts";
7
6
  import type { Skill } from "@/chat/skills";
8
7
  import type { LoadSkillMetadata } from "@/chat/tools/skill/load-skill";
9
8
  import type { JuniorToolOutput } from "@/chat/tool-support/structured-result";
@@ -45,7 +44,6 @@ export interface ToolHooks {
45
44
  * generating tool reports success.
46
45
  */
47
46
  writeGeneratedArtifacts?: (files: FileUpload[]) => GeneratedArtifactFileRef[] | Promise<GeneratedArtifactFileRef[]>;
48
- onArtifactStatePatch?: (patch: Partial<ThreadArtifactsState>) => void | Promise<void>;
49
47
  onSkillLoaded?: (skill: Skill) => void | LoadSkillMetadata | Promise<void | LoadSkillMetadata>;
50
48
  toolOverrides?: {
51
49
  imageGenerate?: ImageGenerateToolDeps;
@@ -76,7 +74,6 @@ interface BaseToolRuntimeContext {
76
74
  /** Runtime surface that owns final delivery semantics for this turn. */
77
75
  surface?: AgentTurnSurface;
78
76
  userText?: string;
79
- artifactState?: ThreadArtifactsState;
80
77
  configuration?: Record<string, unknown>;
81
78
  egress: PluginEgress;
82
79
  mcpToolManager?: McpToolManager;
@@ -99,9 +96,6 @@ interface LocalToolRuntimeContext extends BaseToolRuntimeContext {
99
96
  }
100
97
  export type ToolRuntimeContext = LocalToolRuntimeContext | SlackToolRuntimeContext;
101
98
  export interface ToolState {
102
- artifactState: ThreadArtifactsState;
103
- patchArtifactState: (patch: Partial<ThreadArtifactsState>) => void | Promise<void>;
104
- getCurrentListId: () => string | undefined;
105
99
  getOperationResult: <T>(operationKey: string) => T | undefined;
106
100
  setOperationResult: (operationKey: string, result: unknown) => void;
107
101
  }
@@ -35,6 +35,7 @@ export declare function createUpdateEventTaskTool(context: ToolRuntimeContext, c
35
35
  };
36
36
  target?: string | undefined;
37
37
  truncated?: boolean | undefined;
38
+ timed_out?: boolean | undefined;
38
39
  continuation?: {
39
40
  arguments: Record<string, unknown>;
40
41
  reason?: string | undefined;
@@ -58,6 +59,7 @@ export declare function createUpdateEventTaskTool(context: ToolRuntimeContext, c
58
59
  };
59
60
  target?: string | undefined;
60
61
  truncated?: boolean | undefined;
62
+ timed_out?: boolean | undefined;
61
63
  continuation?: {
62
64
  arguments: Record<string, unknown>;
63
65
  reason?: string | undefined;
@@ -0,0 +1,29 @@
1
+ import { type SlackTeamId } from "@/chat/slack/ids";
2
+ /** Create the tool that resolves people by identity provider and query. */
3
+ export declare function createUserLookupTool(teamId: SlackTeamId, providers: [string, ...string[]]): Omit<import("./definition").AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
4
+ inputSchema: import("./definition").JsonSchemaObject;
5
+ outputSchema: import("./definition").JsonSchemaObject;
6
+ prepareArguments(args: unknown): {
7
+ provider: string;
8
+ query: string;
9
+ };
10
+ execute?: ((input: unknown, options: import("./definition").ToolExecuteOptions) => {
11
+ [x: string]: unknown;
12
+ target?: string | undefined;
13
+ truncated?: boolean | undefined;
14
+ timed_out?: boolean | undefined;
15
+ continuation?: {
16
+ arguments: Record<string, unknown>;
17
+ reason?: string | undefined;
18
+ } | undefined;
19
+ } | Promise<{
20
+ [x: string]: unknown;
21
+ target?: string | undefined;
22
+ truncated?: boolean | undefined;
23
+ timed_out?: boolean | undefined;
24
+ continuation?: {
25
+ arguments: Record<string, unknown>;
26
+ reason?: string | undefined;
27
+ } | undefined;
28
+ }>) | undefined;
29
+ };
@@ -30,6 +30,7 @@ export declare function createWatchResourceEventsTool(context: ToolRuntimeContex
30
30
  };
31
31
  target?: string | undefined;
32
32
  truncated?: boolean | undefined;
33
+ timed_out?: boolean | undefined;
33
34
  continuation?: {
34
35
  arguments: Record<string, unknown>;
35
36
  reason?: string | undefined;
@@ -51,6 +52,7 @@ export declare function createWatchResourceEventsTool(context: ToolRuntimeContex
51
52
  };
52
53
  target?: string | undefined;
53
54
  truncated?: boolean | undefined;
55
+ timed_out?: boolean | undefined;
54
56
  continuation?: {
55
57
  arguments: Record<string, unknown>;
56
58
  reason?: string | undefined;
@@ -13,6 +13,7 @@ export declare function createWebFetchTool(hooks: ToolHooks, options?: {
13
13
  [x: string]: unknown;
14
14
  target?: string | undefined;
15
15
  truncated?: boolean | undefined;
16
+ timed_out?: boolean | undefined;
16
17
  continuation?: {
17
18
  arguments: Record<string, unknown>;
18
19
  reason?: string | undefined;
@@ -21,6 +22,7 @@ export declare function createWebFetchTool(hooks: ToolHooks, options?: {
21
22
  [x: string]: unknown;
22
23
  target?: string | undefined;
23
24
  truncated?: boolean | undefined;
25
+ timed_out?: boolean | undefined;
24
26
  continuation?: {
25
27
  arguments: Record<string, unknown>;
26
28
  reason?: string | undefined;
@@ -23,6 +23,7 @@ export declare function createImageGenerateTool(hooks: Required<Pick<ToolHooks,
23
23
  delivery: string;
24
24
  target?: string | undefined;
25
25
  truncated?: boolean | undefined;
26
+ timed_out?: boolean | undefined;
26
27
  continuation?: {
27
28
  arguments: Record<string, unknown>;
28
29
  reason?: string | undefined;
@@ -41,6 +42,7 @@ export declare function createImageGenerateTool(hooks: Required<Pick<ToolHooks,
41
42
  delivery: string;
42
43
  target?: string | undefined;
43
44
  truncated?: boolean | undefined;
45
+ timed_out?: boolean | undefined;
44
46
  continuation?: {
45
47
  arguments: Record<string, unknown>;
46
48
  reason?: string | undefined;
@@ -10,6 +10,7 @@ export declare function createWebSearchTool(modelId: string, override?: WebSearc
10
10
  [x: string]: unknown;
11
11
  target?: string | undefined;
12
12
  truncated?: boolean | undefined;
13
+ timed_out?: boolean | undefined;
13
14
  continuation?: {
14
15
  arguments: Record<string, unknown>;
15
16
  reason?: string | undefined;
@@ -18,6 +19,7 @@ export declare function createWebSearchTool(modelId: string, override?: WebSearc
18
19
  [x: string]: unknown;
19
20
  target?: string | undefined;
20
21
  truncated?: boolean | undefined;
22
+ timed_out?: boolean | undefined;
21
23
  continuation?: {
22
24
  arguments: Record<string, unknown>;
23
25
  reason?: string | undefined;
@@ -3,10 +3,10 @@ import {
3
3
  } from "./chunk-UTL3MHPC.js";
4
4
  import {
5
5
  parseSlackThreadId
6
- } from "./chunk-DXEQAIUV.js";
6
+ } from "./chunk-CSZINQJ2.js";
7
7
  import {
8
8
  normalizeSlackConversationId
9
- } from "./chunk-TZRXYWRE.js";
9
+ } from "./chunk-SGZO7UWH.js";
10
10
 
11
11
  // src/handlers/health.ts
12
12
  function readHealthReport() {
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-6GWA276C.js";
10
10
  import {
11
11
  getDeploymentTelemetryAttributes
12
- } from "./chunk-DS3J6WGY.js";
12
+ } from "./chunk-DLDRQHG5.js";
13
13
 
14
14
  // src/chat/logging.ts
15
15
  import path from "path";
@@ -1184,6 +1184,13 @@ function logException(error, eventName, attributes = {}) {
1184
1184
  const normalizedError = error instanceof Error ? error : new Error(String(error));
1185
1185
  return log.exception(eventName, normalizedError, attributes);
1186
1186
  }
1187
+ async function runBestEffort(operation, eventName, attributes = {}) {
1188
+ try {
1189
+ await operation();
1190
+ } catch (error) {
1191
+ logException(error, eventName, attributes);
1192
+ }
1193
+ }
1187
1194
  function setTags(context = {}) {
1188
1195
  updateLogContext(context, contextToAttributes(context));
1189
1196
  setSentryTagsFromContext(context);
@@ -1476,6 +1483,7 @@ export {
1476
1483
  logWarn,
1477
1484
  logError,
1478
1485
  logException,
1486
+ runBestEffort,
1479
1487
  setTags,
1480
1488
  createRequestContext,
1481
1489
  withContext,